remove duplicate nested release tag

git-svn-id: https://svn.apache.org/repos/asf/activemq/tags/activemq-5.5.0@1086323 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/trunk/KEYS b/trunk/KEYS
deleted file mode 100644
index 05f26ba..0000000
--- a/trunk/KEYS
+++ /dev/null
@@ -1,402 +0,0 @@
-pub   1024D/F5BA7E4F 2006-02-10
-uid                  Hiram Chirino <hiram@hiramchirino.com>
-sig 3        F5BA7E4F 2006-02-10  Hiram Chirino <hiram@hiramchirino.com>
-sub   1024g/6733C080 2006-02-10
-sig          F5BA7E4F 2006-02-10  Hiram Chirino <hiram@hiramchirino.com>
-
------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) <djencks@apache.org>
-sig 3        A2F9E313 2009-11-25  David Jencks (CODE SIGNING KEY) <djencks@apache.org>
-sig          56F3E01B 2009-11-25  David Jencks (geronimo) <david_jencks@yahoo.com>
-sub   4096R/15B6F699 2009-11-25
-sig          A2F9E313 2009-11-25  David Jencks (CODE SIGNING KEY) <djencks@apache.org>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.7 (Darwin)
-
-mQINBEsM0K0BEADsxU+6EeeFuENlLLYvEQrWZlqkRrbPARx8TSbFkIgIHKGv+yvx
-MGbXXA/PXdvOqQV3nVhNFPrRR3NpXF8vZg7Ud5IrOT39GxYDluaQVsU/g2cgQgJi
-EW8E3pzShlOPVcv1Eq/W8Tfx0DzvCL8YECDMpEfkG2hfoC1N5Q7uup5eHBWVTn3A
-Ft3QVAogzJun45TrLrVG/Z8V2cNS4GJ1TPhyuZRjrcQnEYl1hOfhNtUbrJ0o4vi+
-UkcWtpnmHG59KI/Aof0HLiwOeogDVSM9Mq/+CjEcklAtL/s3/DaOlTvZYXTYMtKg
-zisdr8t1q97nCymEtgJ16cyPePhp+W77NOtohTUqkvE68woknkF7XbxtsyAZdgl8
-M1QZGt4q6sGJJQiXKlMk4EpZgt+Go2ZTJGhAtiTbYheRNMN3wizytpBrGtziu02j
-nmMfotPLyMKvFPmYtWpFyIdZAhRBjAbHSLv6pczaRcgiy0o+9ey6E/TMcioh31Gc
-rbcKPUVl5A4wBBwi5CcG+2ExHNuPuDfaXypRllk6KcEZq2UAETrXWDAgQBIWMSpa
-CYYT7difZNdtUiV+Y1RxUQ9ITq9L36H5P+NdccuJh1LMGJ2rTwTRedHpW4dR3ynO
-Ms/Hzlp5p9KE7cOfiCURY1sk/By13CucR1XlqBRoxuyNwf735Gvx3ur1swARAQAB
-tDREYXZpZCBKZW5ja3MgKENPREUgU0lHTklORyBLRVkpIDxkamVuY2tzQGFwYWNo
-ZS5vcmc+iQI3BBMBCgAhBQJLDNCtAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheA
-AAoJEP7+/tei+eMTResQAI1tnsTMpILzkK07oPt9k4F/PeMnWaAABxBxaa803d50
-yEU5UYTsyq3ENZHhWQmNi62MRIR1rPmcAK96IiXEadEA7IeQX1WExwgYWA6mgwpa
-YDnI5VQHw2VFAKyiBZifO4kyb+G6Hienu7DpmSp+66mdikYpg2+pVbWdizM9kpmN
-LPn7Dt4bAqACbfJ4N1pGJfNlxLqB+62eJOMFbgXB3FMH0jgBzGj5NCKLm9NsvWeT
-uQBTNXuYPhpp8I8ZJEldJR7l7NZ41dZdELjhH0FWJfd1zxongmdtKuEzw4pE8e9w
-NKA/kjylbHL3CZdfZ5wZG+6NXrGNIzNHkDNh+7kuHMFXTIySpq3zD/3lLjNk9GPD
-U8tKH8O7ZM8lbQaLRFFPJ5p6qnBG0BZ0RfiFgQkoQg3occ1wTEhT1sKfUu4h6czI
-G9WGAW+Kb/MVulX1IGmW7uRSa7CpPL8ASwmd7+LnCT4MgP4InWAoNk7tpGYA2V7m
-tb/MWRclDq3z3GwZE6te7IualjOEkxw3NyElDeefsGWk7Li1vdpG6VLE42tOqw+u
-HIjtJltVraNTJez6l6DYYZoW+Jml3mBNZDReNe3dmbaaGrL7qqAxxlWUG7TIqhiJ
-7gCdXxidm0qVkRgS6ZHpZNp5rYh0DdIsZ4N6Ssnlm7AYhB3b/uTEtC/OXiwdstGc
-iEYEEBEKAAYFAksM0wYACgkQoF6+5lbz4BvLUACffrM/HunLOex7WuS9yLQEh4XO
-qwQAnjq7bYG/yUTepbuAHgXRxIQlup7BuQINBEsM0K0BEACsWFgPBmVvBlC9E8ca
-x9dQK8m/j872aupmUEKP3tCCiABTwddZZ5gsdQc4cJNbAnEglV1lOwSwMJsz4brn
-uqk8oPWWG6tJRgbwyBMo65MKPJ04bpMvjNRznIF1LQZcbopSKZiHgIEpw1JPk5fy
-QUMlhORHdCRwT8yNpUrXFgg/lvXWypgy1+7/KPywxZ3JtdlMQDKacmaQIp12QJjO
-U+ZL8batkA3/sj1EtQX0zX5vep/vUvl3c7alIid8BRCP3XRKD+fiOKcRCjfBFnKM
-QTQtbGfD2r3lYgXA8pChCUty7RlFRFkETum/66wG8BUigVLAVRy5YTR0BMhx5TM4
-hPgj54oKTC5zC7tsLJ093BYoYKY63qmajfFv+/60k2bADyAiahC6n68hGM/kf/xy
-Qc+gSjpAVgblIAXn1e8YnsNEKMK1Uz1ziFxEjO9hcAGEADEtsbEBywwqxt6Mqq46
-fj9MfUFrTnVd62gtwo19iCwMuPs7wtFL081E7D3IKW6p/u6iZ0C6bwliSABY8F1b
-dIqVzSBNr3TrY1jys+62r7cHY7aJ+rc/dQ1e79kEaIdmya1JIAUc1e4Dtgdwjy6s
-BBQFQHeN+XgN0IPAk3xaEW1pajBe8d7ahC+ygkFQF3wN39KRCmRff372uBW6Xn6k
-psYOy6o72+2cz3ib5qdWUNorBQARAQABiQIfBBgBCgAJBQJLDNCtAhsMAAoJEP7+
-/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) <david_jencks@yahoo.com>
-sig 3        56F3E01B 2007-08-01  David Jencks (geronimo) <david_jencks@yahoo.com>
-sub   2048g/4E525FE0 2007-08-01
-sig          56F3E01B 2007-08-01  David Jencks (geronimo) <david_jencks@yahoo.com>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.7 (Darwin)
-
-mQGiBEawPygRBADKQe8iEQdS45n4jbSopR4XfDOLEVcxHHZBHrdj357vAZvSdgYI
-U738HNAX5INMHub1+pv/B2DpUkfmnnfRENGBeSYWtl6XsKZYRjodR2muI33daUYj
-lRqvxrY0ZSgmSbKlcQHAP8jMAtmPi+EG8tDcufLXSELtoLT6KTMJ183vgwCgxXgM
-xUYSo5JTdoKl426Ix9MzMjcEAKBlHorZ39y8kt+YtCaqoJdmTAqXb1YF/lSX08++
-knpPmxyjFaCZZGXaFLhRN9ru5+pTvebwjERm+/m+bObXWtWhovS3NOquykpKNJr8
-gDvo/B8ony4IlDwozDlsaa+yNx7TpkoAZ43wVh15L6Jn2j+LD4C91yFUC9EB4E5Z
-gQMuBACMD+Pf6TsT26ObkKG8aaNvk9nmPCbIhVSERWB8A/4+yloJEeskbU2HPOZL
-/74Ap5c9KWxMgajDqK/OJ7AS3ioM3emk7nAiWQ4GJfjA9eQq5DwK7zmDIBXH90wR
-sFW6YXXoJe0YdFnp0iUUg+77K+Jndmew0S0orfjUI+PPIYl4GbQwRGF2aWQgSmVu
-Y2tzIChnZXJvbmltbykgPGRhdmlkX2plbmNrc0B5YWhvby5jb20+iGAEExECACAF
-AkawPygCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRCgXr7mVvPgG3GRAJ9R
-HPXrbn4pG4/1T0L0x6OaKMOlAgCfXVpywuj+t4AmBBUMtDYLCX5nFxi5Ag0ERrA/
-KBAIAJjFzBHoHeZxj22hxzdwVS0uI3GGizrANwL6HAf+EaVLvwOFmNiUjeg757z3
-XsM/mLVABc6TueB4PPjVJTYlSrBvgsAbIYtcC0BPyZ0hDRDJPj5sj2kgq8mxZjWY
-D8ZrEzxqVmQ94uL5uHfsVdMPubtaJvDRHMr8vagETlNgMQsUvHtILEwRQagOwtUi
-Un/PnItw99DJTVADvS/N+1Yk0Wxf+/BCuafECgSl3w1/vsA23yLAAEdBLhERpWql
-BRteCug1vkA8BQtstdW0GwXZ6k0jXTkG27sCtImQklvWWFYFQtRSWutLdvQRdjkj
-jJucEgEh1nxmj6tbGkwizmd1+9MAAwYH/iQ8GcbnFJc5KdLBd1BkmGglcFeGDHC7
-0BDZdpXuCKQqSe9IG/i2DMdg6b2T+dsyejdBVzAe7mmVp2yXwZ21e2+YllfrD2kO
-0YgCkAEf+WMN2ABv+VHSN+XfUjiNHvWDXUvbq4Ul5xlQ3Nj8d5NdiXEabd6QuVD7
-DduGMZPmreosqdjLODRuifRdC5RXyGzoM4CghibNIHtDqDAsFxaOgON8nP7yooo8
-D3AnYprsWRTKV88YlULxpnPXwNZuMnsIiwstZinLdCUs9laZx+UC/FaD3CMV720x
-ZDfHJ2hMS+MqGU8A7Cpu4qXEDfB4Py9D1DJe/v3mML/TX94gklTw2ZGISQQYEQIA
-CQUCRrA/KAIbDAAKCRCgXr7mVvPgGxy3AKCwWsjL+86/X9NhVkCATFmxRR97EQCe
-N7cG7JasIe/XD/3vwMpY6s1HQ9+ZAaIERGuO4BEEAKof0LWrTOJcizRIQPWm/HaF
-OEIkuk8AuLoC4O2bPO7x1cxPdeUKNvy9gGvsmxJUBFic3dTUhJAB3QW5FFUzXjLc
-GIjTV0fnsQBHJNdFUTEE8r+EBlvsgOYxDsuMYgeRNlLji6Th3H5dGd02+ze7vq6P
-E2VZNUvs/h2ZqHmKM6lrAKDX9aZpCuE/DUUep5c6DKSGtdimlQQAjNl/K60zbL8V
-cnq2hznzfdCrgItzocwGoxGs/6l8kI9POUqChDRAtXjhgPWfpkLz6nYf7hd3GUgh
-TmlZ7y0ivzMXraa6rmmFgBL7yRGiqSoCtOGSnsKyR76JkrTCcWHSXrmYTxDJ2Lou
-wtGEDqbPcnK+LYQoO/LzLwV3HGKJFNwEAKXFRwmd74QIazMNtgZVppJWSQepK+ay
-l01AF9Gs9dk/ZSdq8fxWmPFpnifNTUarW2HxmCft15fFuuQaVhJPbDiNuXtbNUfo
-5gS912pg8slG/633eDa7lRJ8IpCBFDQUMbKC6PQYGt8SOzWKoUFuHlI9WaGTsjwE
-zXqPEeNea5BYtDZEYXZpZCBNLiBKb2huc29uIChEYXZlIEpvaG5zb24pIDxzbm9v
-cGRhdmVAYXBhY2hlLm9yZz6IXgQTEQIAHgUCRGuO4AIbAwYLCQgHAwIDFQIDAxYC
-AQIeAQIXgAAKCRDS475zRW3+qT4cAJ4szy1AZSHZiuj2cIzGpCNkF56TqACfWtoI
-PBSi4LwRhekMmM+EtKE8IJi5Ag0ERGuPARAIANRyV+xiYHZ4U0Emquc0Q8EXaAKs
-YJ9ZxRjUr7XRyLYFfSSPzPJSEZeCMLk88+FvjBEVffkHSZHSCiQnd6JZ22N41SfL
-tj5f1B1NBE2+4oB81K2sqMzMX/RD6DdgL2Qff6Tp1Y2+zlZzjl+RJRSFuADyOX1X
-e+f6Ika/fR+gpiYqwWwIQKH82omD1kGdZZhwP7/eELOpN525NJlVeGTOUQbhVS87
-EG+U1o+cCk4RfoupNQw9HeLXvS50MmMldMLEParcJofJ7g/2YKxKfg3qyTbc9HsR
-kwaktxah/3D6nKy1RNZyK5Kjn7Ql+F+8j+M503ZFCVgotUa/0oRgteR2IlMAAwYI
-AJZCNAAoylWbJPaDd9CxRY13GDv/a/p3kgf1pTrkqtBFnMhnrExvb/aEwxFYa+be
-VXZiU+tPknNYTn14xG2CXw7CWy/Ua5P0Y/SgioBmyciPVcsx/9WzPpeHrDLRrcB/
-4lbp7yR9nIvP9EZ9EZcwvhD2jwPxtqnPkpbM7mpyVdz4ghkYyw3TuA0NsUcTE8YA
-foYvDMISbtU6Cjh/njEdNH3MxA0NAQXC8bGCzGehiEOD9iXQoJ1rjdAUPNOP8nry
-YLjqXHMMNcv7tLMPaJHd3UDRpUzrKtyeNQ47ywDwfNL6w1jLv+vZbaTZPIRs9WrW
-vNUfgJUVh+OmVCGgfIL9noOISQQYEQIACQUCRGuPAQIbDAAKCRDS475zRW3+qYLc
-AJ9cedvS6uxGo16+cqYaN9V4lhRn1ACeMjIZjW/rhCjwaKL9PITjPSt2k2GZAaIE
-Q55JXxEEAMvNaI5I+tdfXeKsJdPjaXpwWPhyorbUrTbJlYZAp+sUu06uuvtfM3/c
-rRqYUpPgK6sEPHffKTZA+Vku7+F7U/vJoQJEvrtR6jK5zkom25n9PopoiefFhXM3
-Rp0dy6GzDY15RccGBZM6YSVgkshizGbYvknzp2MB/M46VKOGim1rAKD8FiC1vZaI
-WfoWYu7kBzbS575OdwP/Z0nTDgLl0iTrRZK+qAzRO5o3a7eW+8RYoLD3gv0/5WcN
-IfrvYd4UuMOcRzRJv3mRSEXWEIATMRJfPyDxoHO8CYclem5fX3CmJsI5zA4WiTt4
-Cig45Uoy44CDl3dCsZyEQQVqBnhU58uAdm+yIkto6BVFJid5UXUgjvFFONKvpAUD
-/1Yv8HauQLLd3yycusPm5ryTlubEAgdVn3N1tMVt3bhOxtvA65KOgmB/teKHs08+
-xlJxDgIVFK+15ABJ1UiWIe/Yl38USFVRL9OGrWmqqgG7pgZFQr4EvMmpavK9ivsL
-GneKBVWu7kvCI9zJP5WtRRbJTRXtdIEnaRQXXhG1bMz3tCREYXZpZCBKb2huc29u
-IDxzbm9vcGRhdmVAYXBhY2hlLm9yZz6IRQQQEQIABgUCRYWJ+QAKCRATLknU5B7c
-fmAHAJiCBzQ/q1vgg2gPwC2e+zI24wemAJ9HBRpfjI4eIIlyaz7tUCN4aO/804hG
-BBARAgAGBQJEe8ToAAoJEAEFZrzkE2OSCKkAn0GIpUl/zmjn6l1f9p5qNOXzG0wQ
-AJ4nQco6HKNaEn/g0kl3fQvNhWQpRIhGBBARAgAGBQJFLyxiAAoJEFuWgBDgT5qJ
-8LwAn3EBUDHcxfXNL0OXuY8hTntwZ+y+AJ9/Klov0NSFpbtbKhoZahoUmz705ohG
-BBARAgAGBQJFMJiLAAoJEA3wdF2rgh+8JioAmwW7sg/VB45nI0CJK0WCVBzcqJ2B
-AJ9nt04X9kH49HkwTVFTWhR2odn3TYhGBBARAgAGBQJFNCP6AAoJEF5FJs6Zkq38
-bUAAoIprJiO1GTFLq+EoClM/KAn28jWzAKDhTNUkiQmS7E7azLWFNP/O1tKvSohG
-BBARAgAGBQJFNDBAAAoJEJksQ/1feJipsnQAni8HC3R8n1Y9D02c98ck7lk1MKmi
-AJ4uWT/LCSwq0noWLWdZD8TEZRs8c4hGBBARAgAGBQJFNPrmAAoJEKvI7jm7VQdG
-44kAnRpcqEI8zUHTYDHUTlAqG6uduJikAJ9IKY2pcr1FSGfpauCsU+t60eh26ohG
-BBARAgAGBQJFNk9JAAoJEIs6YB8IyXXlfUYAoKTSEl6R7Ha2cOojX6mHXL/koznf
-AJ9yvgWwHm5gwT0MvvV06oED6yO+WohGBBARAgAGBQJFPYQAAAoJEMkduNqbz84v
-dSUAnR4auNDXzNGpxblGdbL0eA7zu6OFAKDzt8q4QBYs6gZZgWyi2q6sDNxfx4hG
-BBARAgAGBQJFPrULAAoJEGvijq6/0DB8EpkAnith6mCJPuiTbDD80VDXzV6FMW8u
-AJ9XWz0caY7KPOJnxQNMtLsi5QEilohGBBARAgAGBQJFQIT2AAoJEJd7/dDYcuJw
-6ZcAoLK6IWR2Fx7ZiXMvv6yk9Knuu40HAKCBN/fkJD+IZJQ1S8sGqDKiFfR7dIhG
-BBARAgAGBQJFQqiiAAoJEBJBvIcsXk7Ac/YAn28oplMOif3sCioeYTTYKtT/+Y3W
-AJwIVqixX+cXLntknf69mTVXzstc7YhGBBARAgAGBQJFRtwWAAoJEPx3dBEynYDS
-cskAn0Ri7cS1WXxZ+5GYerBMe5RQrWYbAJ94EAnW/ycxEyJzHmEiMKzPTIAMhIhG
-BBARAgAGBQJFgnGgAAoJEEriyIdmXgdgeVkAoJiNYq0f/th5vBNjfoRLPOi65QK+
-AJ4mU4zkcMwLLeAx/YVTrRERUbDi1oheBBMRAgAeBQJDnklfAhsDBgsJCAcDAgMV
-AgMDFgIBAh4BAheAAAoJEP2e2fEXqlsly8kAmwSJ+1IUOo67g5V8g7ijyF05pIP9
-AJ9iUF3BBlY+i0+T+KxsyMMT86bxpIheBBMRAgAeBQJDnklfAhsDBgsJCAcDAgMV
-AgMDFgIBAh4BAheAAAoJEP2e2fEXqlsly8kAoPF9yjw8EYKnOhdl5Q9yedcrIvMh
-AKD3VaxwH2fBy9ecR5JDnzWu9AM2zrkCDQRDnknHEAgA6sRNVHsmMPA72smxPYxp
-whOwYEgjT5IwRS+RdTE/fpBwVAUs50ww4b754mKsBjGl8zwHSAnjXIsfDC7YHEOJ
-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) <gary.tully@gmail.com>
-sig 3        69CC103E 2008-09-04  Gary Tully (key for apache releases) <gary.tully@gmail.com>
-sub   2048g/4700624C 2008-09-04
-sig          69CC103E 2008-09-04  Gary Tully (key for apache releases) <gary.tully@gmail.com>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.6 (GNU/Linux)
-
-mQGiBEi/0oIRBAD3B1qa7X29fw5mS4uIUUwAmRo8ft1ZG05NXXDffHkliJ2YXxtD
-7i/njkhw0DIpyP1TFKRtnFGJYGzde4rbc0imm6BXfT0WY1BRWIL0FsyFcqOauffQ
-fiRdnX1wnTIpwbH8548iDbZSTvfuudrsY94rgBE1JWbqIq/RxkKBiiTySwCgxF8U
-6PHMqhtL+UV1lnYG0LxiKN8EAOGhLDH4z3fx7SG9Y0Z9H/GJjFyDAjWChfx0Th3x
-l0GXUQNjaPemucZODJiniDPaQpOSAXjrIBxYA0dAiSUQfi7qS9oMS7fj3MSOZn2I
-do5xzXgbP7W7FIl6LI3Ff3kXn/d31HzKY72bwh4oBpCaJ0Q1empT8Yo4AZStSsTx
-92RUA/48ZBm6J6qy+YgiWEQk8nH0Sm/B3LJSCwegdl8JpPAtlwBLjynSkfKWzhPE
-Tm6HZOIUJNyKWZsqbfWvu6CcteOaSiAHwkzXKdEA86xjjNc+PRJz5UddXM9waT2m
-QHz0H2TQCDFjjUPiW5pKszOBfFG2kVFtM6YLmpVr4LXBrIG4IrQ7R2FyeSBUdWxs
-eSAoa2V5IGZvciBhcGFjaGUgcmVsZWFzZXMpIDxnYXJ5LnR1bGx5QGdtYWlsLmNv
-bT6IYAQTEQIAIAUCSL/SggIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEPE1
-2+JpzBA+KJUAoJMkOUou4a7SwnAK3orgKIbHJG9yAKCwFS0p2/srBONY0WB8oG9C
-lLNJZbkCDQRIv9KKEAgA8VL4dGPaFaoIRfWQMlvqIhOP8gt49XtAwiQsHXRJuJUs
-xA96/LBKRl6H2lvpLZzTmSBfOo67nfIBIyuXc823vkTBvtnXTD05dbRFTclgFsod
-lvGiqgyST7iodKWdBv1EkLlNQysHkgoDqrJzLWxFzOOxVEddf3l2RnGlzYkt+Cag
-2r2LmD74vdGioeGu8xxLOlPrmQAZm48etejNgMWWQHKXZ1l2gLeV7XBuIwhG3V+0
-/S16+kOEF5TV8VaDhL2oYCP6ljquYaOas0mY3plPvNHzsNNA4YAzCoHSXO/iNmPW
-Pw/LuDdAOwE1qhu6VbnPFbwMraQYNjzBL+EsJ/b/ZwADBwf/ccnBicBinW+TO8t1
-h5DlIPhHFNVmESa44Rt1yWzAuilLLLnf9smg8u6LcW8Qoi2Q6Q7iN0GZTt4DSGcE
-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 <bsnyder@apache.org>
-sig 3        2C983957 2008-04-10  Bruce Snyder <bsnyder@apache.org>
-uid                  Bruce Snyder <bruce.snyder@gmail.com>
-sig 3        2C983957 2006-04-21  Bruce Snyder <bsnyder@apache.org>
-
------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 <dejan@nighttale.net>
-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/ImSDT8tBOuv8m7b1rAR8X0d3MbofroBfgwCghx18
-Fm/xQel1ieLSAJ/WEWt/oV0EAMI9hnHYDuKwxRZ6pdk0/lpnbPgApQv26I5y3XZk
-osdVxaZAWckWzAPI0k+8oqO6Esv8U2LsTqEKUJJo43cKFCUQbRumTOQAYW3zm7O+
-d5kVvODV9sULIS3a851i3L4PAR1yaCvK/8bTgaDelEI+42J2ZN5yWzLcUjWmq/pc
-QOIrBACb+3QK3+nGdBZ1lYtAqaTnrcTBoV7Q7T+aeUwX4+LfCaz8l7Ub6kQyIDaZ
-Wllz7xQ1m1XkY6SWiEev8yvE4i95e0ti5K5y+5hiW3WZOzFye/Ljju/Vn+Camc6M
-bRjGGp4Vti+3lGHU0NPEaXeP8gA5kakPuzo2uZ1x/hgWQPy137QjRGVqYW4gQm9z
-YW5hYyA8ZGVqYW5AbmlnaHR0YWxlLm5ldD6IYQQTEQIAIQUCQoOFDgUJCWYBgAYL
-CQgHAwIDFQIDAxYCAQIeAQIXgAAKCRDDGj9waFLH2jxBAJ97QDtp0/NUFohuIH+2
-w+jMWhknkACeIN1XW5chDe3HgAEvvvbnQm73g4CIYQQTEQIAIQUCQoOFDwUJCWYB
-gAYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRDDGj9waFLH2n+6AJ0XKKKZ/2WLUUc8
-BWyeFl8wslES5ACfdk/JMFqCXB6gu9inwJNpLuk8tsK5Ag0EQoOFGhAIANaEkdCX
-iNJdlHMdTuBEJOIQLKMuIuHNkIaiNLRr6nJ7rx8ccXSwo7yZnzA2u38tFUa4C7FZ
-UgEAOX5YN6vyK/uAoGI7B9nEED1DC59MlDLe7jXI7m8gasEerkb7yV9IKI/gNL9i
-ZEXAU101RmaMF8SXMJ/8g4dG77PDtXAAELbfAuvtsd+ISPo0P2gnai+Mfd0wu28W
-ilwY2jd8qV2+CIQaFRVqCOKI5Y+S5flHxNDoXn/pcCoDpKJUXWNsIdNz+GXKflCv
-gmU9DLXcKEFiMBU5/8gFW9sNsmBP8CPvCFjvLs/CrMymK7yplaLYrnZvtr0vBhf1
-E0+3GKeHYgcUo0MAAwYIAJQBptZLCuCib03S2HesX53tsyzJoqPF+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 <dejan@nighttale.net>
-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+tcJH0mYkZGwHDEMoF3oPhDMmPTjHbO4g6TcZKq/9DjGhvqVBWvRcd
-QwnZ/K9nhryYb2PWFskM2MANcfNfaHzIdlmmmmp0iAtM8GRsyLQjRGVqYW4gQm9z
-YW5hYyA8ZGVqYW5AbmlnaHR0YWxlLm5ldD6IYAQTEQIAIAUCTFfysQIbAwYLCQgH
-AwIEFQIIAwQWAgMBAh4BAheAAAoJEGLtTfC6y4eTUwoAn0gci9+ctMhPl+G5G4G+
-+5LwOo8mAJ9ax/tWv5yeoiN/owoRk8ulVPWXrohGBBARAgAGBQJMV/QEAAoJEMMa
-P3BoUsfaizkAnjpOjrdX5Fm5O0fHUai4AIRNOf1GAJ43oXr0SDypeTmJ+X8Isn4/
-kOW6W7kCDQRMV/KxEAgAjRAZNCZS4XBdY8FCFqL6PNIgCmiL1Ztvw53V9lDXHB2D
-LyXUu3uPjzHyU6GhH7N2/unPPX1O+sQ69tYASIdvn5+CWxALXo1czGmPXfHiwQei
-YG3J9jEueNi9CzefD4ZUXLpAiQRa7lNuZP4vB0U3BNMNci5n5ZwSb92eIeRjQv2M
-At6kvLIK9gV5QyukUEmN+ygSYY6PhPx+MshuL+O86cj25lwDkMKVR6WHV2IIkzGI
-Q7gy5V2++0we1gfN6q8XG9006hmzLu+ys5Ew9+B1N0F1cDjiCEzuAnK7bsylA+gH
-ds4wv7DzGCdNT86BROqSTJZkc0F9SiO+GirLyyhz8wADBQf/QF2cToPUvTVsVkgQ
-BSZsu20BKPsgSAsze0l+W17zfqdadiWZ2zLQ7aL2ySkXqVpjtsSM/yj6MmKuK7O/
-pmA6CUJVjDh3Gl8p3HwAahQw5L3pfnic2oVhxRmR9LkpYXopfUm8pYggbPH+N/z8
-Ahud6AP7X2ThaYDakWL10AXV5pqn+JnZbLRd9XcSsqvdvRalvOuleZ80OAMxDL11
-W7CDivjmsfpEmFIfaHITmUtjkZOpZK7hf0Sjwiz6lGh4zINKg5JfxMU7LeAN5eMh
-jpYgNNI1/RrIILKMOm53DSaQGHTX6f9cdGiI348b7k3b6btY+d77+wysZ6cNMzYH
-EpLyCIhJBBgRAgAJBQJMV/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 <hadrian@apache.org>
-sig  sig3  6A70C608 2009-06-10 __________ __________ [selfsig]
-sig  sig   B4493B94 2009-06-10 __________ __________ Guillaume Nodet <gnodet@apache.org>
-
------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
-YXJjZWEgPGhhZHJpYW5AYXBhY2hlLm9yZz6IRgQQEQIABgUCSi/VpQAKCRDs3+o8tEk7lJOP
-AJ9Kh+zo7Peb0HHtIoottsWVFw8s2ACfURR12Dj/XNC6d/8jDM3q9Gra0d2JAjcEEwEIACEF
-Akovye4CGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQFSJmcmpwxgim1BAArm+4WmwT
-icdTi7PIKJk5PvvEfyk1wVMWEyOBDBW7CdBKvNAWKEKMGssHoGG2y+X5VvaTdBvw+VNQLahX
-Wdfn+HIXJ5al8Rsr5qNODDHjWt7aqfEbibbbAL6sAQ6HOycIn0OR9flJW5ozXsOGDkHl+ZTd
-3Z1LkvrnoK9355I1A8jH6PqBO5YncJlfgxEClg5F7GYHbnSpi/9jwB1QkYMjyS4mtOOW+Fyc
-NeTjivaEk9em+r33w1ismpRIay2WI+FmaiTMiNYXaF3Aa+Cxfu6/bfbjVT/+BFbiuF5S2SWf
-myAhUeyiqkG3aICsABQs4o1k4CNSd55dusI2Uzp8yvCbHRFvmUfWcLy5dIKLO7CXpE0vlw0i
-FIQGKuKhcK2bAIokQHkPNGXlIlywDefYXZAaXbfVxDuPvux1N2fwTLh73YjjAWN9F7C3Xowy
-u2x92dcMG1/uNFm+f2yC7UA4P2dGRHSZO6nWg4128/m1ZH8X3n1QMoXxwPjH2b8akfEobdsM
-sSAei7JmEbG0UVGhAQEWb6mxE4iVSLqKlGT1fjJpkBqj/2k1CWOExwHOPH5wBfYZE2AKT3c5
-+3OFWC4fomfhmCBX8CXNFGuSY5FCYO2d34sD3MbRZcd/z49VOMjc+uqvnAk6WBbBtQwGQWdO
-kPEV2oVxawL15LkwiAtshA84NT65Ag0ESi/LkgEQAOIhQZkgS8ugmRyeNA/NtFBfEOtehfVC
-MJ/gFmpwV56Fo1brUXT0U0RHqWyuEakuEhLUaYw1jWGu8ZoVvR/dF2VgQz+uDGnHQebYtA6h
-WQ8LpB9/9/hKSzEuSqdC9+db7S5jpF341YpEwpRFVFynUw8DlhvCt5QVs7tKK5w/x3ENnYDA
-UmAcV3h8HrzW2WSxzQXNPymCE95lY94/ToON4md/HRGcLqqQ26c+PTqTxcDbDs7AT5L3InOh
-kKB0Mz/Fb9076otWY5e4TDa7LquuWhJK7n9TsZx/zVPJRx7wslVJhTanRXmkDJXcpogXwbsP
-TPfiwrTNClABV0MOcZCB3jPcXLPmMwu5r1azE5EoJ+hukglqHWwS5K8ZOMRY+4BpXv/0fRJs
-KGcs5oSKuM63a3Rew3vNW778JR1Jx8prfGsNf9x543mwHJ/rmWo+rBjquqGlEwsPv5Wf2Qra
-SuHBl/8wN6ay8vOwAN3Od0EUO/28VsZYfqFCRh0Va4E5XoFPTx344xapVF+/3SzfRtQPDpxc
-whuFbFzA4m/QvFVLYhQStlpCD6NEXxC6i/IuSlyCKP7EtNqrNg8C9WE3OGq7fjxJmTALpank
-HCtTNIsfMzOPEB8enAW3C4axqBBhYlA1LT9yvHuOCA2rVaqCHpJqI2hY22IlflUt2BUJmgMr
-G59vABEBAAGJAh8EGAEIAAkFAkovy5ICGwwACgkQFSJmcmpwxgjTsQ/+Nt7BfEu5pYdwBt/T
-FLGlj2zirahuxCoAE3vdhCX0kJ1yB2nqMsjqJqW+Z7lNdNdeUDJLLCrzoiR9bzuzt8yM4WPd
-ZkNK+IlP58hOB0qchIOawjhgz8WFO89j9t3EPxmeP6/n+JEUrd7xsffcTprUd8iP/c6FBWDx
-qCKzuSjxJL3ivh6SxGC0Sr4qVLX1Yj/mGPQpthW8/z1NrJ6CDeDpVtLEnrfCkLj098ubDzzY
-3v5j0dcUqkqIgXGSEQW/xH0fScwDJ8wAt8JVhF1SOfIWJ4JN/WdFrC6JTW3ziHohzjpC4Cu2
-TTdmq9XYVoLkX4ogKOTiWf9GmhDlaJtJBonKKOzb8N9by4JVZigZQB9HO+hJQcrDkZ7skcmG
-tLkUiafqFx3w7UEadOy9LeVysLpMl46uZYpcykZZTxjw7XPgiG3yCqr0k4kz5CSSwS4U1B0a
-8PJp0ZPtJLT3vO6CKw+fqHv6T2nw8JnG4OrsJeFEwRI6ID4mci5F5Xb3k1l10madfC2hzFcV
-n9gV58TyZAI8j1GV+aYnuuHqie8Ywnh30dws8EFRzckcq+nUSM0e3zfPvK0r98WntAGKuFPZ
-zyukYmrD62v+HepLN8meDlEJMQJWKpCLp6SYwnBBxGY3rUpkbuoZ/vNbuBYWdyHcq3dxHEu5
-HzSpeZz97HtFnC/bNqM=
-=H3nh
------END PGP PUBLIC KEY BLOCK-----
-
diff --git a/trunk/LICENSE b/trunk/LICENSE
deleted file mode 100755
index 1e45cff..0000000
--- a/trunk/LICENSE
+++ /dev/null
@@ -1,807 +0,0 @@
-
-                                 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                                           ==
-=========================================================================
-
-<p><em>License</em> </p>
-
-<p>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. </p>
-
-<p>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. </p>
-
-
-<p><strong>1. Definitions</strong> </p>
-
-<ol type="a">
-
-<li>
-<strong>"Collective Work"</strong> 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.
-</li>
-
-<li>
-<strong>"Derivative Work"</strong> 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.</li>
-
-<li>
-<strong>"Licensor"</strong> means the individual or entity that offers the Work under the terms of this License.
-</li>
-
-<li>
-<strong>"Original Author"</strong> means the individual or entity who created the Work.
-</li>
-
-<li>
-<strong>"Work"</strong> means the copyrightable work of authorship offered under the terms of this License.
-</li>
-
-<li>
-<strong>"You"</strong> 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.
-
-</li>
-</ol>
-
-<p><strong>2. Fair Use Rights.</strong> 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. </p>
-
-
-<p><strong>3. License Grant.</strong> 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: </p>
-
-
-<ol type="a">
-<li>
-
-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;
-</li>
-
-<li>
-to create and reproduce Derivative Works;
-</li>
-
-<li>
-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;
-
-</li>
-
-<li>
-to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
-</li>
-
-<li><p>For the avoidance of doubt, where the work is a musical composition:</p>
-
-<ol type="i">
-<li><strong>Performance Royalties Under Blanket Licenses</strong>. 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.</li>
-
-<li><strong>Mechanical Rights and Statutory Royalties</strong>. 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).</li></ol></li>
-
-<li><strong>Webcasting Rights and Statutory Royalties</strong>. 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).</li>
-
-</ol>
-
-
-<p>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.</p>
-
-<p><strong>4. Restrictions.</strong>The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: </p>
-
-
-<ol type="a">
-<li>
-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.
-</li>
-
-
-<li>
-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.
-</li>
-
-</ol>
-
-
-
-
-
-
-<p><strong>5. Representations, Warranties and Disclaimer</strong></p>
-
-<p>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.</p>
-
-
-<p><strong>6. Limitation on Liability.</strong> 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. </p>
-
-<p><strong>7. Termination</strong> </p>
-
-<ol type="a">
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-</ol>
-
-<p><strong>8. Miscellaneous</strong> </p>
-
-<ol type="a">
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-
-<li>
-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.
-
-</li>
-
-<li>
-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.
-</li>
-</ol>
-
---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                                           ==
-      =========================================================================
-
-      <p><em>License</em> </p>
-
-      <p>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. </p>
-
-      <p>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. </p>
-
-
-      <p><strong>1. Definitions</strong> </p>
-
-      <ol type="a">
-
-      <li>
-      <strong>"Collective Work"</strong> 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.
-      </li>
-
-      <li>
-      <strong>"Derivative Work"</strong> 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.</li>
-
-      <li>
-      <strong>"Licensor"</strong> means the individual or entity that offers the Work under the terms of this License.
-      </li>
-
-      <li>
-      <strong>"Original Author"</strong> means the individual or entity who created the Work.
-      </li>
-
-      <li>
-      <strong>"Work"</strong> means the copyrightable work of authorship offered under the terms of this License.
-      </li>
-
-      <li>
-      <strong>"You"</strong> 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.
-
-      </li>
-      </ol>
-
-      <p><strong>2. Fair Use Rights.</strong> 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. </p>
-
-
-      <p><strong>3. License Grant.</strong> 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: </p>
-
-
-      <ol type="a">
-      <li>
-
-      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;
-      </li>
-
-      <li>
-      to create and reproduce Derivative Works;
-      </li>
-
-      <li>
-      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;
-
-      </li>
-
-      <li>
-      to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
-      </li>
-
-      <li><p>For the avoidance of doubt, where the work is a musical composition:</p>
-
-      <ol type="i">
-      <li><strong>Performance Royalties Under Blanket Licenses</strong>. 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.</li>
-
-      <li><strong>Mechanical Rights and Statutory Royalties</strong>. 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).</li></ol></li>
-
-      <li><strong>Webcasting Rights and Statutory Royalties</strong>. 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).</li>
-
-      </ol>
-
-
-      <p>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.</p>
-
-      <p><strong>4. Restrictions.</strong>The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: </p>
-
-
-      <ol type="a">
-      <li>
-      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.
-      </li>
-
-
-      <li>
-      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.
-      </li>
-
-      </ol>
-
-
-
-
-
-
-      <p><strong>5. Representations, Warranties and Disclaimer</strong></p>
-
-      <p>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.</p>
-
-
-      <p><strong>6. Limitation on Liability.</strong> 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. </p>
-
-      <p><strong>7. Termination</strong> </p>
-
-      <ol type="a">
-
-      <li>
-      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.
-      </li>
-
-      <li>
-      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.
-      </li>
-      </ol>
-
-      <p><strong>8. Miscellaneous</strong> </p>
-
-      <ol type="a">
-
-      <li>
-      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.
-      </li>
-
-      <li>
-      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.
-      </li>
-
-      <li>
-      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.
-      </li>
-
-      <li>
-      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.
-
-      </li>
-
-      <li>
-      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.
-      </li>
-      </ol>
diff --git a/trunk/NOTICE b/trunk/NOTICE
deleted file mode 100644
index 4706e52..0000000
--- a/trunk/NOTICE
+++ /dev/null
@@ -1,49 +0,0 @@
-Apache 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.
-
diff --git a/trunk/README.txt b/trunk/README.txt
deleted file mode 100755
index d0250a6..0000000
--- a/trunk/README.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-Welcome 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 <http://www.wassenaar.org/> 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
-   <http://java.sun.com/javase/technologies/security/>.  ActiveMQ does 
-   not include these libraries itself, but is designed to use them.
-
diff --git a/trunk/activemq-all/pom.xml b/trunk/activemq-all/pom.xml
deleted file mode 100644
index dc9b6ce..0000000
--- a/trunk/activemq-all/pom.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-all</artifactId>
-  <packaging>jar</packaging>
-  <name>ActiveMQ :: Jar Bundle</name>
-  <description>Puts together an ActiveMQ jar bundle</description>
-
-  <dependencies>
-
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-camel</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-console</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-optional</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>kahadb</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-annotation_1.0_spec</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    
-    <plugins>
-      
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>1.0.1</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-
-              <artifactSet>
-                <includes>
-                  <include>${project.groupId}:activemq-camel</include>
-                  <include>${project.groupId}:activemq-core</include>
-                  <include>${project.groupId}:activemq-console</include>
-                  <include>${project.groupId}:activemq-jaas</include>
-                  <include>${project.groupId}:activemq-optional</include>
-                  <include>${project.groupId}:kahadb</include>
-                  <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
-                  <include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
-                  <include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
-                  <include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
-                  <include>org.slf4j:slf4j-api</include>
-                </includes>
-              </artifactSet>
-
-              <transformers>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
-                    <projectName>Apache ActiveMQ</projectName>
-                </transformer>
-                
-                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                    <resource>META-INF/spring.handlers</resource>
-                </transformer>
-                
-                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                    <resource>META-INF/services/com.sun.tools.xjc.Plugin</resource>
-                </transformer>
-                
-                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                    <resource>META-INF/spring.schemas</resource>
-                </transformer>
-              </transformers>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-blueprint/pom.xml b/trunk/activemq-blueprint/pom.xml
deleted file mode 100644
index 0ab0a21..0000000
--- a/trunk/activemq-blueprint/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-blueprint</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Blueprint</name>
-  <description>The ActiveMQ Message Broker and Client implementations</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-		org.apache.xbean*;version="[3.7,4)",
-      	*
-    </activemq.osgi.import.pkg>
-  </properties>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.aries.blueprint</groupId>
-			<artifactId>org.apache.aries.blueprint</artifactId>
-			<version>${aries-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.xbean</groupId>
-			<artifactId>xbean-blueprint</artifactId>
-			<version>${xbean-version}</version>
-		</dependency>
-	</dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-          <instructions>
-			<!--Fragment-Host>org.apache.activemq.activemq-core;version=[$(version;==;${activemq.osgi.version}),$(version;=+;${activemq.osgi.version}))</Fragment-Host-->
-			<Fragment-Host>org.apache.activemq.activemq-core</Fragment-Host>
-          </instructions>
-        </configuration>
-      </plugin>
-	<plugin>
-		<artifactId>maven-resources-plugin</artifactId>
-		<version>2.3</version>
-	</plugin>
-	<plugin>
-		<artifactId>maven-install-plugin</artifactId>
-		<version>2.2</version>
-	</plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-blueprint/src/main/resources/OSGI-INF/blueprint/activemq-blueprint.xml b/trunk/activemq-blueprint/src/main/resources/OSGI-INF/blueprint/activemq-blueprint.xml
deleted file mode 100644
index d85c088..0000000
--- a/trunk/activemq-blueprint/src/main/resources/OSGI-INF/blueprint/activemq-blueprint.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
-
-    <service id="ActiveMQXBeanNamespaceHandler"
-             interface="org.apache.aries.blueprint.NamespaceHandler">
-        <service-properties>
-            <entry key="osgi.service.blueprint.namespace" value="http://activemq.apache.org/schema/core"/>
-        </service-properties>
-        <bean class="org.apache.xbean.blueprint.context.impl.XBeanNamespaceHandler">
-            <argument value="http://activemq.apache.org/schema/core"/>
-            <argument value="activemq.xsd"/>
-            <argument ref="blueprintBundle"/>
-            <argument value="META-INF/services/org/apache/xbean/spring/http/activemq.apache.org/schema/core"/>
-        </bean>
-    </service>
-
-</blueprint>
diff --git a/trunk/activemq-camel/pom.xml b/trunk/activemq-camel/pom.xml
deleted file mode 100755
index d5ac036..0000000
--- a/trunk/activemq-camel/pom.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-camel</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Camel</name>
-  <description>ActiveMQ component for Camel</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-      org.apache.activemq.pool;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,
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.activemq.camel*;version=${project.version};-noimport:=true,
-      '=META-INF.services.org.apache.camel';-noimport:=true
-    </activemq.osgi.export>
-  </properties>
-
-  <dependencies>
-
-    <!-- =============================== -->
-    <!-- Required Dependencies -->
-    <!-- =============================== -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-jms</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-
-    <!-- TODO we could maybe remove this dependency and use the Spring pool implementation? -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-pool</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-annotation_1.0_spec</artifactId>
-      <optional>true</optional>
-    </dependency>
-
-    <!-- testing helpers -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-spring</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <scope>test</scope>
-    </dependency>    
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.components</groupId>
-      <artifactId>geronimo-transaction</artifactId>
-      <version>2.1</version>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jencks</groupId>
-      <artifactId>jencks</artifactId>
-      <version>2.2</version>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jencks</groupId>
-      <artifactId>jencks-amqpool</artifactId>
-      <version>2.2</version>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-jdbc</artifactId>
-      <version>${camel-version}</version>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-
-  </dependencies>
-
-  <build>
-    <plugins>
-      <!-- Configure which tests are included/excuded -->
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>pertest</forkMode>
-          <childDelegation>false</childDelegation>
-          <useFile>true</useFile>
-          <argLine>-Xmx512M</argLine>
-
-           <systemProperties>
-            <property>
-              <name>org.apache.activemq.default.directory.prefix</name>
-              <value>target/</value>
-            </property>
-          </systemProperties>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelConnection.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelConnection.java
deleted file mode 100644
index 16d5c60..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelConnection.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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, JMSStatsImpl factoryStats) throws Exception {
-        super(transport, clientIdGenerator, factoryStats);
-    }
-
-    public CamelContext getCamelContext() {
-        return camelContext;
-    }
-
-    public void setCamelContext(CamelContext camelContext) {
-        this.camelContext = camelContext;
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelConnectionFactory.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelConnectionFactory.java
deleted file mode 100644
index 10e5b40..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelConnectionFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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(), stats);
-        CamelContext context = getCamelContext();
-        if (context != null) {
-            connection.setCamelContext(context);
-        }
-        return connection;
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelDestination.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelDestination.java
deleted file mode 100644
index 76c2633..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelDestination.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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;
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java
deleted file mode 100644
index dbe211e..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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");
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
deleted file mode 100644
index 3e54b1f..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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");
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueue.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueue.java
deleted file mode 100644
index 6fd908a..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueue.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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);
-    }
-
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java
deleted file mode 100644
index 54221d1..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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 <CODE>Queue</CODE> associated with this queue receiver.
-     *
-     * @return this receiver's <CODE>Queue</CODE>
-     * @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();
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueSender.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueSender.java
deleted file mode 100644
index 9f96102..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueSender.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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 <CODE>QueueSender</CODE>.
-     * 
-     * @return this sender's queue
-     * @throws JMSException if the JMS provider fails to get the queue for this
-     *                 <CODE>QueueSender</CODE> 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
-     * <CODE>QueueSender</CODE>'s default delivery mode, priority, and time
-     * to live. <p/> <p/> 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. <p/> <p/> 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);
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopic.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopic.java
deleted file mode 100644
index 32b24ee..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopic.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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);
-    }
-
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java
deleted file mode 100644
index 438067a..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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 <CODE>TopicPublisher</CODE>.
-     *
-     * @return this publisher's topic
-     * @throws JMSException if the JMS provider fails to get the topic for this
-     *                      <CODE>TopicPublisher</CODE> due to some internal error.
-     */
-
-    public Topic getTopic() throws JMSException {
-        return (Topic) super.getDestination();
-    }
-
-    /**
-     * Publishes a message to the topic. Uses the <CODE>TopicPublisher</CODE>'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 <CODE>TopicPublisher
-     *                                     </CODE> with an invalid topic.
-     * @throws java.lang.UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> 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 <CODE>TopicPublisher
-     *                                     </CODE> with an invalid topic.
-     * @throws java.lang.UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> 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 <CODE>TopicPublisher</CODE>'s default delivery mode,
-     * priority, and time to live.
-     * <p/>
-     * <P>
-     * 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.
-     * <p/>
-     * <P>
-     * 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);
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java
deleted file mode 100644
index 8e772ca..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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 <CODE>Topic</CODE> associated with this subscriber.
-     *
-     * @return this subscriber's <CODE>Topic</CODE>
-     * @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 <CODE>NoLocal</CODE> 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 <CODE>NoLocal
-     *                      </CODE> attribute for this topic subscriber due to some
-     *                      internal error.
-     */
-
-    public boolean getNoLocal() throws JMSException {
-        checkClosed();
-        return super.isNoLocal();
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java
deleted file mode 100644
index 7f842cf..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.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.springframework.jms.connection.SingleConnectionFactory;
-
-/**
- * The <a href="http://activemq.apache.org/camel/activemq.html">ActiveMQ Component</a>
- *
- * 
- */
-public class ActiveMQComponent extends JmsComponent {
-    private final CopyOnWriteArrayList<SingleConnectionFactory> singleConnectionFactoryList =
-        new CopyOnWriteArrayList<SingleConnectionFactory>();
-    private final CopyOnWriteArrayList<Service> pooledConnectionFactoryServiceList =
-        new CopyOnWriteArrayList<Service>();
-    private boolean exposeAllQueues;
-    private CamelEndpointLoader endpointLoader;
-
-    /**
-     * Creates an <a href="http://camel.apache.org/activemq.html">ActiveMQ Component</a>
-     *
-     * @return the created component
-     */
-    public static ActiveMQComponent activeMQComponent() {
-        return new ActiveMQComponent();
-    }
-
-    /**
-     * Creates an <a href="http://camel.apache.org/activemq.html">ActiveMQ Component</a>
-     * connecting to the given <a href="http://activemq.apache.org/configuring-transports.html">broker URL</a>
-     *
-     * @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
-    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;
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java
deleted file mode 100644
index 5cc6100..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * 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
-     * <a href="http://activemq.apache.org/configuring-transports.html">ActiveMQ URI format</a>
-     *
-     * @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.
-     * <p/>
-     * 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.
-     * <p/>
-     * 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);
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
deleted file mode 100644
index 92049de..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- *
- * 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<ActiveMQQueue> queues = source.getQueues();
-        for (ActiveMQQueue queue : queues) {
-            addQueue(queue);
-        }
-
-        Set<ActiveMQTopic> 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);
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalComponent.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalComponent.java
deleted file mode 100644
index bde3df7..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalComponent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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 <a href="http://camel.apache.org/activemq-journal.html">ActiveMQ Journal Component</a>
- *
- * 
- */
-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;
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java
deleted file mode 100644
index 2e92f47..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/**
- * 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<DefaultConsumer> consumer = new AtomicReference<DefaultConsumer>();
-    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;
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/package.html b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/package.html
deleted file mode 100644
index e970f83..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Defines the <a href="http://activemq.apache.org/camel/activemq.html">ActiveMQ Component</a> for
-<a href="http://activemq.apache.org/camel/">Camel</a> to provide great
-<a href="http://activemq.apache.org/camel/enterprise-integration-patterns.html">Enterprise Integration Patterns</a>
-integration for ActiveMQ users.
-
-
-</body>
-</html>
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/ActiveMQConverter.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/ActiveMQConverter.java
deleted file mode 100644
index 4c568cf..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/ActiveMQConverter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- *
- * 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);
-    }
-
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/ActiveMQMessageConverter.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/ActiveMQMessageConverter.java
deleted file mode 100644
index 4dec6b3..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/ActiveMQMessageConverter.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- *
- * 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
-     * <a href="">Bean Integration</a> 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;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/IdentityMessageReuseConverter.java b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/IdentityMessageReuseConverter.java
deleted file mode 100644
index bb3194c..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/IdentityMessageReuseConverter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.");
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/package.html b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/package.html
deleted file mode 100644
index f8491e6..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/converter/package.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Defines the <a href="http://activemq.apache.org/camel/type-converter.html">Type Converters</a> for working
-with JMS and ActiveMQ with <a href="http://activemq.apache.org/camel/">Camel</a>
-<a href="http://activemq.apache.org/camel/enterprise-integration-patterns.html">Enterprise Integration Patterns</a>
-
-
-</body>
-</html>
diff --git a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/package.html b/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/package.html
deleted file mode 100644
index 592a9b1..0000000
--- a/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Defines a JMS client which is capable of sending and receiving messages to
-<a href="http://activemq.apache.org/camel/">Camel</a>
-<a href="http://activemq.apache.org/camel/endpoint.html">endpoints</a> to provide
-<a href="http://activemq.apache.org/camel/enterprise-integration-patterns.html">Enterprise Integration Patterns</a> 
-integration in any JMS client application.
-
-</body>
-</html>
diff --git a/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/TypeConverter b/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
deleted file mode 100644
index f888a55..0000000
--- a/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component/activemq b/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component/activemq
deleted file mode 100644
index 7df5d45..0000000
--- a/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component/activemq
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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
diff --git a/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component/activemq.journal b/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component/activemq.journal
deleted file mode 100644
index bac5c46..0000000
--- a/trunk/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component/activemq.journal
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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
diff --git a/trunk/activemq-camel/src/test/data/message1.xml b/trunk/activemq-camel/src/test/data/message1.xml
deleted file mode 100644
index d6a4645..0000000
--- a/trunk/activemq-camel/src/test/data/message1.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<person user="james">
-  <firstName>James</firstName>
-  <lastName>Strachan</lastName>
-  <city>London</city>
-</person>
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java
deleted file mode 100644
index 71d3835..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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);
-        }
-    }
-
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelEmbeddedBrokerTestSupport.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelEmbeddedBrokerTestSupport.java
deleted file mode 100644
index 73d588e..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelEmbeddedBrokerTestSupport.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- *
- * 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 <a href="">URI</a> 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 <a href="">URI</a> to use to create or resolve an endpoint
-     * @return the endpoint
-     */
-    protected <T extends Endpoint> T resolveMandatoryEndpoint(String uri, Class<T> 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 extends Endpoint> T resolveMandatoryEndpoint(CamelContext context, String uri,
-                                                              Class<T> 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 <code>mock:someName</code>
-     *
-     * @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);
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java
deleted file mode 100644
index d6fc5de..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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 junit.framework.Assert;
-
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.impl.DefaultProducerTemplate;
-import org.apache.camel.spring.SpringTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * 
- */
-public class CamelJmsTest extends SpringTestSupport {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(CamelJmsTest.class);
-    
-    protected String expectedBody = "<hello>world!</hello>";
-
-    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());
-    }
-
-    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);
-        Assert.assertNotNull("Should have received a message from destination: " + destination, message);
-
-        TextMessage textMessage = assertIsInstanceOf(TextMessage.class, message);
-        Assert.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");
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java
deleted file mode 100644
index 63e3bd5..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- *
- * 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.ActiveMQQueue;
-import org.apache.camel.CamelContext;
-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"));
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelVMTransportRoutingTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelVMTransportRoutingTest.java
deleted file mode 100644
index 02cba90..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/CamelVMTransportRoutingTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- *
- * 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();
-    }
-
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java
deleted file mode 100644
index 1f57b2c..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * 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 java.util.concurrent.TimeUnit;
-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.spring.SpringTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.enhydra.jdbc.pool.StandardXAPoolDataSource;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- *  shows broker heuristic rollback (no prepare memory), hence duplicate message delivery
- */
-public class JmsJdbcXATest extends SpringTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsJdbcXATest.class);
-    BrokerService broker = null;
-
-    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 = null;
-        StandardXAPoolDataSource pool = getMandatoryBean(StandardXAPoolDataSource.class, "jdbcEnhydraXaDataSource");
-        conn = pool.getConnection();
-        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 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;
-    }
-
-    public void testRecovery() throws Exception {
-
-        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();
-
-        final java.sql.Connection jdbcConn = initDb();
-
-        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");
-        message.setJMSCorrelationID("pleaseCorrelate");
-        producer.send(message);
-
-        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();
-
-        LOG.info("waiting for completion or route with replayed message");
-        assertTrue("got a second message in the db", Wait.waitFor(new Wait.Condition() {
-            @Override
-            public boolean isSatisified() throws Exception {
-                return 2 == dumpDb(jdbcConn);
-            }
-        }));
-        assertEquals("message in db", 2, dumpDb(jdbcConn));
-    }
-
-    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() {
-        return new ClassPathXmlApplicationContext("org/apache/activemq/camel/jmsXajdbc.xml");
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/SetGroupIdProcessor.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/SetGroupIdProcessor.java
deleted file mode 100644
index 384a4a9..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/SetGroupIdProcessor.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *
- * 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");
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java
deleted file mode 100644
index 8618f24..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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<Exchange> list = expectedEndpoint.getReceivedExchanges();
-        for (Exchange exchange : list) {
-            Object body = exchange.getIn().getBody();
-            LOG.debug("Received: body: " + body + " of type: " + ObjectHelper.className(body) + " on: " + exchange);
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQConfigureTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQConfigureTest.java
deleted file mode 100644
index b574084..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQConfigureTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.spring.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Endpoint;
-import org.apache.camel.component.jms.JmsConsumer;
-import org.apache.camel.component.jms.JmsEndpoint;
-import org.apache.camel.component.jms.JmsProducer;
-import org.apache.camel.processor.CamelLogger;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.listener.AbstractMessageListenerContainer;
-import org.springframework.jms.connection.SingleConnectionFactory;
-
-/**
- * 
- */
-public class ActiveMQConfigureTest extends ContextTestSupport {
-    
-    public void testJmsTemplateUsesPoolingConnectionFactory() throws Exception {
-        JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:test.foo");
-        JmsProducer producer = (JmsProducer) endpoint.createProducer();
-
-        JmsTemplate template = assertIsInstanceOf(JmsTemplate.class, producer.getInOutTemplate());
-        assertEquals("pubSubDomain", false, template.isPubSubDomain());
-        assertIsInstanceOf(PooledConnectionFactory.class, template.getConnectionFactory());
-    }
-
-    public void testJmsTemplateUsesSingleConnectionFactory() throws Exception {
-        JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:test.foo?useSingleConnection=true");
-        JmsProducer producer = (JmsProducer) endpoint.createProducer();
-
-        JmsTemplate template = assertIsInstanceOf(JmsTemplate.class, producer.getInOutTemplate());
-        assertEquals("pubSubDomain", false, template.isPubSubDomain());
-        SingleConnectionFactory connectionFactory = assertIsInstanceOf(SingleConnectionFactory.class, template.getConnectionFactory());
-        assertIsInstanceOf(ActiveMQConnectionFactory.class, connectionFactory.getTargetConnectionFactory());
-    }
-
-    public void testJmsTemplateDoesNotUsePoolingConnectionFactory() throws Exception {
-        JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:test.foo?usePooledConnection=false");
-        JmsProducer producer = (JmsProducer) endpoint.createProducer();
-
-        JmsTemplate template = assertIsInstanceOf(JmsTemplate.class, producer.getInOutTemplate());
-        assertEquals("pubSubDomain", false, template.isPubSubDomain());
-        assertIsInstanceOf(ActiveMQConnectionFactory.class, template.getConnectionFactory());
-    }
-
-    public void testListenerContainerUsesSpringConnectionFactory() throws Exception {
-        JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:topic:test.foo");
-        JmsConsumer consumer = endpoint.createConsumer(new CamelLogger());
-
-        AbstractMessageListenerContainer listenerContainer = consumer.getListenerContainer();
-        assertEquals("pubSubDomain", true, listenerContainer.isPubSubDomain());
-        assertIsInstanceOf(PooledConnectionFactory.class, listenerContainer.getConnectionFactory());
-    }
-
-    @Override
-    protected JmsEndpoint resolveMandatoryEndpoint(String uri) {
-        Endpoint endpoint = super.resolveMandatoryEndpoint(uri);
-        return assertIsInstanceOf(JmsEndpoint.class, endpoint);
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java
deleted file mode 100644
index bbc7418..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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 java.util.Date;
-import java.util.List;
-
-import javax.jms.Destination;
-import javax.jms.Message;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.JmsMessage;
-import org.apache.camel.component.mock.AssertionClause;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ActiveMQJmsHeaderRouteTest extends ContextTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQJmsHeaderRouteTest.class);
-
-    protected Object expectedBody = "<time>" + new Date() + "</time>";
-    protected ActiveMQQueue replyQueue = new ActiveMQQueue("test.reply.queue");
-    protected String correlationID = "ABC-123";
-    protected String messageType = getClass().getName();
-
-    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<Exchange> 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");
-            }
-        };
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQReplyToHeaderUsingConverterTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQReplyToHeaderUsingConverterTest.java
deleted file mode 100644
index 372cbb8..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQReplyToHeaderUsingConverterTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.ContextTestSupport;
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ActiveMQReplyToHeaderUsingConverterTest extends ContextTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQReplyToHeaderUsingConverterTest.class);
-    protected Object expectedBody = "<time>" + new Date() + "</time>";
-    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;
-
-    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<String, Object> headers = new HashMap<String, Object>();
-        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<Exchange> 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");
-            }
-        };
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java
deleted file mode 100644
index 6c40b46..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.springframework.jms.connection.JmsTransactionManager;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import static org.apache.activemq.camel.component.ActiveMQComponent.activeMQComponent;
-import org.apache.camel.component.jms.JmsEndpoint;
-import org.apache.camel.component.mock.MockEndpoint;
-
-/**
- * 
- */
-public class ActiveMQRouteTest extends ContextTestSupport {
-    protected MockEndpoint resultEndpoint;
-    protected String startEndpointUri = "activemq:queue:test.a";
-
-    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);
-    }
-
-    @Override
-    protected 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;
-    }
-
-    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");
-            }
-        };
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/AdvisoryConsumerExample.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/AdvisoryConsumerExample.java
deleted file mode 100644
index 059aa45..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/AdvisoryConsumerExample.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.camel.ContextTestSupport;
-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.mock.AssertionClause;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.component.jms.JmsMessage;
-
-/**
- * 
- */
-public class AdvisoryConsumerExample extends ContextTestSupport {
-
-    public void testWorks() throws Exception {
-        // lets create a new queue
-        template.sendBody("activemq:NewQueue." + System.currentTimeMillis(), "<hello>world!</hello>");
-
-        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);
-                                }
-                            }
-                        }
-                    }
-                });
-            }
-        };
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/AutoExposeQueuesInCamelTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/AutoExposeQueuesInCamelTest.java
deleted file mode 100644
index 44f622e..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/AutoExposeQueuesInCamelTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.apache.camel.util.CamelContextHelper;
-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<BrowsableEndpoint> endpoints = getEndpoints(camelContext, BrowsableEndpoint.class);
-        for (BrowsableEndpoint endpoint : endpoints) {
-            LOG.debug("Endpoint: " + endpoint);
-        }
-        assertEquals("Should have found an endpoint: "+ endpoints, 1, endpoints.size());
-    }
-
-    public <T> List<T> getEndpoints(CamelContext camelContext, Class<T> type) {
-        List<T> answer = new ArrayList<T>();
-        Collection<Endpoint> 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;
-    }
-
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/InvokeRequestReplyUsingJmsReplyToHeaderTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/InvokeRequestReplyUsingJmsReplyToHeaderTest.java
deleted file mode 100644
index 2756b87..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/InvokeRequestReplyUsingJmsReplyToHeaderTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
-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.jms.JmsConstants;
-import org.apache.camel.component.mock.AssertionClause;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends ContextTestSupport {
-    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();
-
-    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<String, Object> headers = new HashMap<String, Object>();
-        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<String, Object> headers = new HashMap<String, Object>();
-                headers.put("cheese", 123);
-                headers.put("JMSReplyTo", replyQueueName);
-                headers.put("JMSCorrelationID", correlationID);
-                headers.put("JMSXGroupID", groupID);
-                exchange.getIn().setHeaders(headers);
-            }
-        });
-
-        resultEndpoint.assertIsSatisfied();
-
-        List<Exchange> 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<String,Object> 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<String,Object> headers;
-
-        public String process(@Headers Map<String,Object> headers, String body) {
-            this.headers = headers;
-            LOG.info("process() invoked with headers: " + headers);
-            return "Hello " + body;
-        }
-
-        public Map<String,Object> getHeaders() {
-            return headers;
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalConfigureTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalConfigureTest.java
deleted file mode 100644
index 7d20ca8..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalConfigureTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.ContextTestSupport;
-import org.apache.camel.Endpoint;
-
-/**
- * 
- */
-public class JournalConfigureTest extends ContextTestSupport {
-
-    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());
-    }
-
-    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);
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRoutePerformance.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRoutePerformance.java
deleted file mode 100644
index 4dbfbfd..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRoutePerformance.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-
-/**
- * Used to get an idea of what kind of performance can be expected from 
- * the journal.
- * 
- * 
- */
-public class JournalRoutePerformance extends ContextTestSupport {
-
-    AtomicLong produceCounter = new AtomicLong();
-    AtomicLong consumeCounter = new AtomicLong();
-    AtomicBoolean running = new AtomicBoolean(true);
-
-    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();
-                    }
-                });
-            }
-        };
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java
deleted file mode 100644
index 2dff1a2..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.CamelContext;
-import org.apache.camel.ContextTestSupport;
-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.impl.DefaultCamelContext;
-
-/**
- * 
- */
-public class JournalRouteTest extends ContextTestSupport {
-
-    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<Exchange> 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");
-            }
-        };
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/converter/InvokeJmsMessageListenerTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/converter/InvokeJmsMessageListenerTest.java
deleted file mode 100644
index caa92a2..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/converter/InvokeJmsMessageListenerTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * 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.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-
-/**
- * 
- */
-public class InvokeJmsMessageListenerTest extends ContextTestSupport {
-    protected MyMessageListener messageListener = new MyMessageListener();
-    private String expectedBody = "<hello>world!</hello>";
-
-    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;
-        }
-    }
-}
diff --git a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/converter/InvokeMessageListenerTest.java b/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/converter/InvokeMessageListenerTest.java
deleted file mode 100644
index 176c0cb..0000000
--- a/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/converter/InvokeMessageListenerTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-
-/**
- * 
- */
-public class InvokeMessageListenerTest extends ContextTestSupport {    protected MockEndpoint resultEndpoint;
-    protected String startEndpointUri = "activemq:queue:test.a";
-    protected ConsumerBean listener = new ConsumerBean();
-
-    public void testSendTextMessage() throws Exception {
-        String expectedBody = "Hello there!";
-
-        template.sendBodyAndHeader(startEndpointUri, expectedBody, "cheese", 123);
-
-        listener.assertMessagesArrived(1);
-
-        List<Message> 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);
-            }
-        };
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-camel/src/test/resources/log4j.properties b/trunk/activemq-camel/src/test/resources/log4j.properties
deleted file mode 100755
index bb20bc5..0000000
--- a/trunk/activemq-camel/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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
diff --git a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/CamelRedeliveryTest-context.xml b/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/CamelRedeliveryTest-context.xml
deleted file mode 100644
index ff18de0..0000000
--- a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/CamelRedeliveryTest-context.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring" trace="true">
-    <route>
-      <from uri="activemq:ActiveMQ.DLQ?mapJmsMessage=false"/>
-      <setHeader headerName="CamelRedeliveryMarker"><constant>true</constant></setHeader>
-      <!--  delay redelivery by 1 second using schedualler, the determination 
-              of the delay can come form a processor to make it as complicated as needed -->
-      <setHeader headerName="AMQ_SCHEDULED_DELAY"><constant>1000</constant></setHeader>
-      <to pattern="InOnly" uri="activemq:camelRedeliveryQ?explicitQosEnabled=true&amp;messageConverter=#messageConverter"/>
-    </route>
-  </camelContext>
-
-  <bean id="connectionFactory" class="org.apache.activemq.spring.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
-  </bean>
-  
-  <bean id="messageConverter" class="org.apache.activemq.camel.converter.IdentityMessageReuseConverter" />
-
-</beans>
-        <!-- END SNIPPET: example -->
diff --git a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/SetHeaderTest-context.xml b/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/SetHeaderTest-context.xml
deleted file mode 100644
index 5c80044..0000000
--- a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/SetHeaderTest-context.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
-    <route>
-      <from uri="file://src/test/data?noop=true"/>
-      <to uri="activemq:testQ-input"/>
-    </route>
-    <route>
-      <from uri="activemq:testQ-input"/>
-      <process ref="groupIdInsertionProcessor"/>
-      <to uri="activemq:testQ-output"/>
-    </route>
-    <route>
-      <from uri="activemq:testQ-output"/>
-      <to uri="mock:results"/>
-    </route>
-  </camelContext>
-
-  <bean id="groupIdInsertionProcessor" class="org.apache.activemq.camel.SetGroupIdProcessor"/>
-
-  <bean id="connectionFactory" class="org.apache.activemq.spring.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
-  </bean>
-
-</beans>
-        <!-- END SNIPPET: example -->
diff --git a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/component/BrowseQueuesInUFace-context.xml b/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/component/BrowseQueuesInUFace-context.xml
deleted file mode 100644
index d4068ee..0000000
--- a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/component/BrowseQueuesInUFace-context.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
-    <template id="camelTemplate"/>
-  </camelContext>
-
-
-  <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
-    <property name="exposeAllQueues" value="true"/>
-    <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
-  </bean>
-
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/jmsXajdbc.xml b/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/jmsXajdbc.xml
deleted file mode 100644
index 8ac4df9..0000000
--- a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/jmsXajdbc.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-       http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-    ">
-
-        <!-- build broker in code so it can be restarted and modified to test recovery -->
-
-        <!-- some logging that can help
-          log4j.logger.org.apache.activemq.TransactionContext=TRACE
-          log4j.logger.org.springframework.transaction.support.AbstractPlatformTransactionManager=TRACE
-          log4j.logger.org.apache.geronimo.transaction.manager=TRACE
-          log4j.logger.org.enhydra.jdbc=TRACE
-        -->
-
-		<!-- XID factory -->
-		<bean id="xidFactory" class="org.apache.geronimo.transaction.manager.XidFactoryImpl" />
-
-		<!-- Transaction log -->
-		<bean id="transactionLog" class="org.jencks.factory.HowlLogFactoryBean">	
-			<property name="logFileDir" value="target/data/howl/txlog"/>
-			<property name="xidFactory" ref="xidFactory"/>
-		</bean>
-
-		<!-- Setup the geronimo transaction manager -->
-		<bean id="jenckTransactionManager" class="org.jencks.factory.TransactionManagerFactoryBean">
-			<property name="transactionLog" ref="transactionLog"/>
-		</bean>
-
-		<!-- Configure the Spring framework to use JTA transactions from Geronimo -->
-		<bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
-			<property name="transactionManager" ref="jenckTransactionManager"/>
-		</bean>
-
-		<!-- Using the jencks ActiveMQ pool to enable XA -->
-		<bean id="jmsXaConnectionFactory" class="org.jencks.amqpool.XaPooledConnectionFactory">
-	    	<constructor-arg value="tcp://localhost:61616" />
-	    	<property name="maxConnections" value="8" />
-	    	<property name="transactionManager" ref="jenckTransactionManager" />
-		</bean>
-
-		<!-- Define the activemq Camel component so we can integrate with the AMQ broker -->
-		<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
-			<property name="transacted" value="true"/>
-			<property name="transactionManager" ref="jtaTransactionManager"/>
-			<property name="connectionFactory" ref="jmsXaConnectionFactory"/>
-            <!-- cache level is important, can be cache connection or none, as session needs to be enlisted
-            in the current transaction they can't be cached, with default cache sessions, they are created
-            up front, before the transaction (required for the route) -->
-            <property name="cacheLevel" value="0" />
-		</bean>
-
-	  <!-- Setup the connection manager -->
-	  <bean id="connectionManager" class="org.jencks.factory.ConnectionManagerFactoryBean">
-	    <property name="transactionManager" ref="jenckTransactionManager" />
-	    <property name="transaction" value="xa" />
-	  </bean>
-
-	  <!-- Setup the JDBC Managed Connection Factory (that supports XA) -->
-	  <!--bean id="jdbcManagedConnectionFactory" class="org.jencks.tranql.XAPoolDataSourceMCF">
-	    <property name="driverName" value="com.mysql.jdbc.Driver"/>
-	    <property name="url" value="jdbc:mysql://localhost/ScpBuffer?relaxAutoCommit=true"/>
-	    <property name="user" value="rails"/>
-	    <property name="password" value="rails"/>
-	  </bean -->
-	
-	  <bean id="jdbcEnhydraXaDataSource" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource" destroy-method="shutdown">
-	        <property name="dataSource">
-	            <bean class="org.enhydra.jdbc.standard.StandardXADataSource" destroy-method="shutdown">
-
-	                <!-- property name="driverName" value="com.mysql.jdbc.Driver" />
-	                <property name="url" value="jdbc:mysql://localhost/ScpBuffer?relaxAutoCommit=true" / -->
-                    <!-- try embedded derby xa -->
-                    <property name="driverName" value="org.apache.derby.jdbc.EmbeddedDriver" />
-                    <property name="url" value="jdbc:derby:target/XatestDs;create=true" />
-                    <property name="transactionManager" ref="jenckTransactionManager" />
-	            </bean>
-	        </property>
-            <property name="transactionManager" ref="jenckTransactionManager" />
-	   </bean>
-
-		<bean id="required" class="org.apache.camel.spring.spi.SpringTransactionPolicy">
-			<property name="transactionManager" ref="jenckTransactionManager"/>
-			<property name="propagationBehaviorName" value="PROPAGATION_REQUIRED"/>
-		</bean>
-
-		<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-				<route id="queueToDbTransacted">
-					<from uri="activemq:queue:scp_transacted"/>
-                    <transacted ref="required"/>
-					<convertBodyTo type="java.lang.String"/>
-					<to uri="log:BeforeSettingBody?showAll=true"/>
-					<setBody>
-						<simple>INSERT INTO SCP_INPUT_MESSAGES(messageId, messageCorrelationId, messageContent) VALUES('${in.header.JMSMessageId}','${in.header.JMSCorrelationId}','${in.body}')</simple>
-					</setBody>
-					<to uri="jdbc:jdbcEnhydraXaDataSource"/>
-				</route>
-			</camelContext>
-
-</beans>
diff --git a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/spring.xml b/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/spring.xml
deleted file mode 100644
index eb34816..0000000
--- a/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/spring.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-  <!-- START SNIPPET: example -->
-  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"/>
-
-  <bean id="connectionFactory" class="org.apache.activemq.spring.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
-  </bean>
-
-  <bean id="sendTo" class="org.apache.activemq.camel.CamelDestination">
-    <property name="uri" value="mock:result"/>
-  </bean>
-
-  <bean id="consumeFrom" class="org.apache.activemq.camel.CamelDestination">
-    <property name="uri" value="seda:consumer"/>
-  </bean>
-
-  <bean id="camelTemplate" class="org.apache.camel.spring.CamelProducerTemplateFactoryBean"/>
-  <!-- END SNIPPET: example -->
-
-<!--
-  <bean id="connectionFactory" class="org.apache.camel.jms.CamelConnectionFactory">
-    <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
-  </bean>
--->
-
-</beans>
diff --git a/trunk/activemq-console/pom.xml b/trunk/activemq-console/pom.xml
deleted file mode 100644
index 8b98d5c..0000000
--- a/trunk/activemq-console/pom.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-console</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Console</name>
-  <description>ActiveMQ Management Console</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-      org.apache.activemq*;resolution:=optional,
-      org.springframework*;resolution:=optional,
-      sun.management*;resolution:=optional,
-      org.josql*;resolution:=optional,
-      org.apache.velocity*;resolution:=optional,
-      org.apache.commons.deamon*;resolution:=optional;
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.activemq.console*;version=${project.version};-noimport:=true,
-    </activemq.osgi.export>
-  </properties>
-  
-  <repositories>
-    <!-- for net.sf.josql dependency not yet in central -->
-    <repository>
-      <id>com.fusesource.m2</id>
-      <name>Fusesource Release Repository</name>
-      <url>http://repo.fusesource.com/maven2</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-      <releases>
-        <enabled>true</enabled>
-      </releases>
-    </repository>
-  </repositories>
-
-  <dependencies>
-    <!-- activemq related dependencies -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <type>test-jar</type>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>
-        
-    <!-- geronimo -->
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.velocity</groupId>
-      <artifactId>velocity</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-      <version>${commons-lang-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>net.sf.josql</groupId>
-      <artifactId>josql</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>net.sf.josql</groupId>
-      <artifactId>gentlyweb-utils</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jasypt</groupId>
-      <artifactId>jasypt</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>commons-daemon</groupId>
-      <artifactId>commons-daemon</artifactId>
-    </dependency> 
-
-  </dependencies>
-
-  <build>
-
-    <plugins>
-      <!-- Configure which tests are included/excuded -->
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>pertest</forkMode>
-          <childDelegation>false</childDelegation>
-          <useFile>true</useFile>          
-          <includes>
-            <include>**/*Test.*</include>
-          </includes>
-        </configuration>
-      </plugin>
-
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/ActiveMQLauncher.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/ActiveMQLauncher.java
deleted file mode 100644
index 4527b6f..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/ActiveMQLauncher.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.console;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.activemq.console.command.Command;
-import org.apache.activemq.console.command.ShutdownCommand;
-import org.apache.activemq.console.command.StartCommand;
-import org.apache.activemq.console.CommandContext;
-import org.apache.activemq.console.Main;
-import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
-import org.apache.commons.daemon.Daemon;
-import org.apache.commons.daemon.DaemonContext;
-
-/**
- * This class launches activemq under Apache JSVC {@link http://commons.apache.org/daemon/jsvc.html}
- * 
- * @author areese
- * 
- */
-public class ActiveMQLauncher implements Daemon {
-    private List<String> args;
-
-    /**
-     * 
-     */
-    public ActiveMQLauncher() {
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.commons.daemon.Daemon#destroy()
-     */
-    public void destroy() {
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.commons.daemon.Daemon#init(org.apache.commons.daemon.DaemonContext
-     * )
-     */
-    public void init(DaemonContext arg0) throws Exception {
-        // we need to save the args we started with.
-        args = Arrays.asList(arg0.getArguments());
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.commons.daemon.Daemon#start()
-     */
-    public void start() throws Exception {
-        CommandContext context = new CommandContext();
-        context.setFormatter(new CommandShellOutputFormatter(System.out));
-
-        Command command = new StartCommand();
-        command.setCommandContext(context);
-
-        command.execute(args);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.commons.daemon.Daemon#stop()
-     */
-    public void stop() throws Exception {
-        CommandContext context = new CommandContext();
-        context.setFormatter(new CommandShellOutputFormatter(System.out));
-
-        Command command = new ShutdownCommand();
-        command.setCommandContext(context);
-
-        List<String> tokens = new ArrayList<String>(Arrays.asList(new String[] {
-                "--jmxlocal", "--all", }));
-
-        command.execute(tokens);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/CommandContext.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/CommandContext.java
deleted file mode 100644
index e84fa50..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/CommandContext.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/**
- * 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.console;
-
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.Map;
-
-import javax.jms.Message;
-import javax.management.AttributeList;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-import org.apache.activemq.console.formatter.OutputFormatter;
-
-public final class CommandContext {
-    private OutputFormatter formatter;
-
-    /**
-     * Retrieve the output stream being used by the global formatter
-     * 
-     * @return
-     */
-    public OutputStream getOutputStream() {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        return formatter.getOutputStream();
-    }
-
-    /**
-     * Print an ObjectInstance format of an mbean
-     * 
-     * @param mbean - mbean to print
-     */
-    public void printMBean(ObjectInstance mbean) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMBean(mbean);
-    }
-
-    /**
-     * Print an ObjectName format of an mbean
-     * 
-     * @param mbean - mbean to print
-     */
-    public void printMBean(ObjectName mbean) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMBean(mbean);
-    }
-
-    /**
-     * Print an AttributeList format of an mbean
-     * 
-     * @param mbean - mbean to print
-     */
-    public void printMBean(AttributeList mbean) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMBean(mbean);
-    }
-
-    /**
-     * Print a Map format of an mbean
-     * 
-     * @param mbean
-     */
-    public void printMBean(Map mbean) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMBean(mbean);
-    }
-
-    /**
-     * Print a Collection format of mbeans
-     * 
-     * @param mbean - collection of mbeans
-     */
-    public void printMBean(Collection mbean) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMBean(mbean);
-    }
-
-    /**
-     * Print a Map format of a JMS message
-     * 
-     * @param msg
-     */
-    public void printMessage(Map msg) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMessage(msg);
-    }
-
-    /**
-     * Print a Message format of a JMS message
-     * 
-     * @param msg - JMS message to print
-     */
-    public void printMessage(Message msg) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMessage(msg);
-    }
-
-    /**
-     * Print a collection of JMS messages
-     * 
-     * @param msg - collection of JMS messages
-     */
-    public void printMessage(Collection msg) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printMessage(msg);
-    }
-
-    /**
-     * Print help messages
-     * 
-     * @param helpMsgs - help messages to print
-     */
-    public void printHelp(String[] helpMsgs) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printHelp(helpMsgs);
-    }
-
-    /**
-     * Print an information message
-     * 
-     * @param info - information message to print
-     */
-    public void printInfo(String info) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printInfo(info);
-    }
-
-    /**
-     * Print an exception message
-     * 
-     * @param e - exception to print
-     */
-    public void printException(Exception e) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printException(e);
-    }
-
-    /**
-     * Print a version information
-     * 
-     * @param version - version info to print
-     */
-    public void printVersion(String version) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.printVersion(version);
-    }
-
-    /**
-     * Print a generic key value mapping
-     * 
-     * @param map to print
-     */
-    public void print(Map map) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.print(map);
-    }
-
-    /**
-     * Print a generic array of strings
-     * 
-     * @param strings - string array to print
-     */
-    public void print(String[] strings) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.print(strings);
-    }
-
-    /**
-     * Print a collection of objects
-     * 
-     * @param collection - collection to print
-     */
-    public void print(Collection collection) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.print(collection);
-    }
-
-    /**
-     * Print a java string
-     * 
-     * @param string - string to print
-     */
-    public void print(String string) {
-        if (formatter == null) {
-            throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
-        }
-        formatter.print(string);
-    }
-
-    public OutputFormatter getFormatter() {
-        return formatter;
-    }
-
-    public void setFormatter(OutputFormatter formatter) {
-        this.formatter = formatter;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java
deleted file mode 100644
index 0e4d932..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.console;
-
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.jms.TextMessage;
-
-import org.apache.activemq.broker.util.CommandHandler;
-import org.apache.activemq.console.command.ShellCommand;
-import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
-
-/**
- * A default implementation of the @{link CommandHandler} interface
- *
- * 
- */
-public class ConsoleCommandHandler implements CommandHandler {
-
-    private ShellCommand command = new ShellCommand(true);
-
-    public void processCommand(TextMessage request, TextMessage response) throws Exception {
-
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        CommandContext ctx = new CommandContext();
-        ctx.setFormatter(new CommandShellOutputFormatter(out));
-
-        // lets turn the text into a list of arguments
-        String requestText = request.getText();
-
-        List<String> tokens = tokenize(requestText);
-        command.setCommandContext(ctx);
-        command.execute(tokens);
-
-        out.flush();
-        byte[] bytes = out.toByteArray();
-
-        String answer = new String(bytes);
-
-        response.setText(answer);
-    }
-
-    protected List<String> tokenize(String text) {
-        List<String> answer = new ArrayList<String>();
-        StringTokenizer iter = new StringTokenizer(text);
-        while (iter.hasMoreTokens()) {
-            answer.add(iter.nextToken());
-        }
-        return answer;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
deleted file mode 100644
index bf35d33..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/**
- * 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.console;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.lang.management.ManagementFactory;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.JarURLConnection;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-/**
- * Main class that can bootstrap an ActiveMQ broker console. Handles command
- * line argument parsing to set up and run broker tasks.
- * 
- * 
- */
-public class Main {
-
-    public static final String TASK_DEFAULT_CLASS = "org.apache.activemq.console.command.ShellCommand";
-    private static boolean useDefExt = true;
-
-    private File activeMQHome;
-    private File activeMQBase;
-    private ClassLoader classLoader;
-    private Set<File> extensions = new HashSet<File>(5);
-    private Set<File> activeMQClassPath = new HashSet<File>(5);
-
-    public static void main(String[] args) {
-        Main app = new Main();
-
-        // Convert arguments to collection for easier management
-        List<String> tokens = new LinkedList<String>(Arrays.asList(args));
-        // Parse for extension directory option
-        app.parseExtensions(tokens);
-
-		// lets add the conf directory first, to find the log4j.properties just in case its not 
-		// in the activemq.classpath system property or some jar incorrectly includes one
-		File confDir = new File(app.getActiveMQBase(), "conf");
-		app.addClassPath(confDir);
-
-        // Add the following to the classpath:
-        //
-        // ${activemq.base}/conf
-        // ${activemq.base}/lib/* (only if activemq.base != activemq.home)
-        // ${activemq.home}/lib/*
-        // ${activemq.base}/lib/optional/* (only if activemq.base !=
-        // activemq.home)
-        // ${activemq.home}/lib/optional/*
-        // ${activemq.base}/lib/web/* (only if activemq.base != activemq.home)
-        // ${activemq.home}/lib/web/*
-        //
-        if (useDefExt && app.canUseExtdir()) {
-
-            boolean baseIsHome = app.getActiveMQBase().equals(app.getActiveMQHome());
-
-            File baseLibDir = new File(app.getActiveMQBase(), "lib");
-            File homeLibDir = new File(app.getActiveMQHome(), "lib");
-
-            if (!baseIsHome) {
-                app.addExtensionDirectory(baseLibDir);
-            }
-            app.addExtensionDirectory(homeLibDir);
-
-            if (!baseIsHome) {
-                app.addExtensionDirectory(new File(baseLibDir, "optional"));
-                app.addExtensionDirectory(new File(baseLibDir, "web"));
-            }
-            app.addExtensionDirectory(new File(homeLibDir, "optional"));
-            app.addExtensionDirectory(new File(homeLibDir, "web"));
-
-        }
-
-        // Add any custom classpath specified from the system property
-        // activemq.classpath
-        app.addClassPathList(System.getProperty("activemq.classpath"));
-
-        try {
-            app.runTaskClass(tokens);
-            System.exit(0);
-        } catch (ClassNotFoundException e) {
-            System.out.println("Could not load class: " + e.getMessage());
-            try {
-                ClassLoader cl = app.getClassLoader();
-                if (cl != null) {
-                    System.out.println("Class loader setup: ");
-                    printClassLoaderTree(cl);
-                }
-            } catch (MalformedURLException e1) {
-            }
-            System.exit(1);
-        } catch (Throwable e) {
-            System.out.println("Failed to execute main task. Reason: " + e);
-            System.exit(1);
-        }
-    }
-
-    /**
-     * Print out what's in the classloader tree being used.
-     * 
-     * @param cl
-     * @return depth
-     */
-    private static int printClassLoaderTree(ClassLoader cl) {
-        int depth = 0;
-        if (cl.getParent() != null) {
-            depth = printClassLoaderTree(cl.getParent()) + 1;
-        }
-
-        StringBuffer indent = new StringBuffer();
-        for (int i = 0; i < depth; i++) {
-            indent.append("  ");
-        }
-
-        if (cl instanceof URLClassLoader) {
-            URLClassLoader ucl = (URLClassLoader)cl;
-            System.out.println(indent + cl.getClass().getName() + " {");
-            URL[] urls = ucl.getURLs();
-            for (int i = 0; i < urls.length; i++) {
-                System.out.println(indent + "  " + urls[i]);
-            }
-            System.out.println(indent + "}");
-        } else {
-            System.out.println(indent + cl.getClass().getName());
-        }
-        return depth;
-    }
-
-    public void parseExtensions(List<String> tokens) {
-        if (tokens.isEmpty()) {
-            return;
-        }
-
-        int count = tokens.size();
-        int i = 0;
-
-        // Parse for all --extdir and --noDefExt options
-        while (i < count) {
-            String token = tokens.get(i);
-            // If token is an extension dir option
-            if (token.equals("--extdir")) {
-                // Process token
-                count--;
-                tokens.remove(i);
-
-                // If no extension directory is specified, or next token is
-                // another option
-                if (i >= count || tokens.get(i).startsWith("-")) {
-                    System.out.println("Extension directory not specified.");
-                    System.out.println("Ignoring extension directory option.");
-                    continue;
-                }
-
-                // Process extension dir token
-                count--;
-                File extDir = new File(tokens.remove(i));
-
-                if (!canUseExtdir()) {
-                    System.out.println("Extension directory feature not available due to the system classpath being able to load: " + TASK_DEFAULT_CLASS);
-                    System.out.println("Ignoring extension directory option.");
-                    continue;
-                }
-
-                if (!extDir.isDirectory()) {
-                    System.out.println("Extension directory specified is not valid directory: " + extDir);
-                    System.out.println("Ignoring extension directory option.");
-                    continue;
-                }
-
-                addExtensionDirectory(extDir);
-            } else if (token.equals("--noDefExt")) { // If token is
-                // --noDefExt option
-                count--;
-                tokens.remove(i);
-                useDefExt = false;
-            } else {
-                i++;
-            }
-        }
-
-    }
-
-    public void runTaskClass(List<String> tokens) throws Throwable {
-
-        StringBuilder buffer = new StringBuilder();
-        buffer.append(System.getProperty("java.vendor"));
-        buffer.append(" ");
-        buffer.append(System.getProperty("java.version"));
-        buffer.append(" ");
-        buffer.append(System.getProperty("java.home"));
-        System.out.println("Java Runtime: " + buffer.toString());
-
-        buffer = new StringBuilder();
-        buffer.append("current="); 
-        buffer.append(Runtime.getRuntime().totalMemory()/1024L); 
-        buffer.append("k  free="); 
-        buffer.append(Runtime.getRuntime().freeMemory()/1024L); 
-        buffer.append("k  max="); 
-        buffer.append(Runtime.getRuntime().maxMemory()/1024L); 
-        buffer.append("k");
-        System.out.println("  Heap sizes: " + buffer.toString());
-
-        List jvmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments();
-        buffer = new StringBuilder(); 
-        for (Object arg : jvmArgs) {
-            buffer.append(" ").append(arg);
-        }
-        System.out.println("    JVM args:" + buffer.toString());
-
-        System.out.println("ACTIVEMQ_HOME: " + getActiveMQHome());
-        System.out.println("ACTIVEMQ_BASE: " + getActiveMQBase());
-
-        ClassLoader cl = getClassLoader();
-		Thread.currentThread().setContextClassLoader(cl);
-
-        // Use reflection to run the task.
-        try {
-            String[] args = tokens.toArray(new String[tokens.size()]);
-            Class task = cl.loadClass(TASK_DEFAULT_CLASS);
-            Method runTask = task.getMethod("main", new Class[] {
-                String[].class, InputStream.class, PrintStream.class
-            });
-            runTask.invoke(task.newInstance(), new Object[] {
-                args, System.in, System.out
-            });
-        } catch (InvocationTargetException e) {
-            throw e.getCause();
-        }
-    }
-
-    public void addExtensionDirectory(File directory) {
-        extensions.add(directory);
-    }
-
-    public void addClassPathList(String fileList) {
-        if (fileList != null && fileList.length() > 0) {
-            StringTokenizer tokenizer = new StringTokenizer(fileList, ";");
-            while (tokenizer.hasMoreTokens()) {
-                addClassPath(new File(tokenizer.nextToken()));
-            }
-        }
-    }
-
-    public void addClassPath(File classpath) {
-        activeMQClassPath.add(classpath);
-    }
-
-    /**
-     * The extension directory feature will not work if the broker factory is
-     * already in the classpath since we have to load him from a child
-     * ClassLoader we build for it to work correctly.
-     * 
-     * @return true, if extension dir can be used. false otherwise.
-     */
-    public boolean canUseExtdir() {
-        try {
-            Main.class.getClassLoader().loadClass(TASK_DEFAULT_CLASS);
-            return false;
-        } catch (ClassNotFoundException e) {
-            return true;
-        }
-    }
-
-    public ClassLoader getClassLoader() throws MalformedURLException {
-        if (classLoader == null) {
-            // Setup the ClassLoader
-            classLoader = Main.class.getClassLoader();
-            if (!extensions.isEmpty() || !activeMQClassPath.isEmpty()) {
-
-                ArrayList<URL> urls = new ArrayList<URL>();
-
-                for (Iterator<File> iter = activeMQClassPath.iterator(); iter.hasNext();) {
-                    File dir = iter.next();
-                    // try{ System.out.println("Adding to classpath: " +
-                    // dir.getCanonicalPath()); }catch(Exception e){}
-                    urls.add(dir.toURI().toURL());
-                }
-
-                for (Iterator<File> iter = extensions.iterator(); iter.hasNext();) {
-                    File dir = iter.next();
-                    if (dir.isDirectory()) {
-                        File[] files = dir.listFiles();
-                        if (files != null) {
-
-                            // Sort the jars so that classpath built is
-                            // consistently
-                            // in the same order. Also allows us to use jar
-                            // names to control
-                            // classpath order.
-                            Arrays.sort(files, new Comparator() {
-                                public int compare(Object o1, Object o2) {
-                                    File f1 = (File)o1;
-                                    File f2 = (File)o2;
-                                    return f1.getName().compareTo(f2.getName());
-                                }
-                            });
-
-                            for (int j = 0; j < files.length; j++) {
-                                if (files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar")) {
-                                    // try{ System.out.println("Adding to
-                                    // classpath: " +
-                                    // files[j].getCanonicalPath());
-                                    // }catch(Exception e){}
-                                    urls.add(files[j].toURI().toURL());
-                                }
-                            }
-                        }
-                    }
-                }
-
-                URL u[] = new URL[urls.size()];
-                urls.toArray(u);
-                classLoader = new URLClassLoader(u, classLoader);
-            }
-            Thread.currentThread().setContextClassLoader(classLoader);
-        }
-        return classLoader;
-    }
-
-    public void setActiveMQHome(File activeMQHome) {
-        this.activeMQHome = activeMQHome;
-    }
-
-    public File getActiveMQHome() {
-        if (activeMQHome == null) {
-            if (System.getProperty("activemq.home") != null) {
-                activeMQHome = new File(System.getProperty("activemq.home"));
-            }
-
-            if (activeMQHome == null) {
-                // guess from the location of the jar
-                URL url = Main.class.getClassLoader().getResource("org/apache/activemq/console/Main.class");
-                if (url != null) {
-                    try {
-                        JarURLConnection jarConnection = (JarURLConnection)url.openConnection();
-                        url = jarConnection.getJarFileURL();
-                        URI baseURI = new URI(url.toString()).resolve("..");
-                        activeMQHome = new File(baseURI).getCanonicalFile();
-                        System.setProperty("activemq.home", activeMQHome.getAbsolutePath());
-                    } catch (Exception ignored) {
-                    }
-                }
-            }
-
-            if (activeMQHome == null) {
-                activeMQHome = new File("../.");
-                System.setProperty("activemq.home", activeMQHome.getAbsolutePath());
-            }
-        }
-
-        return activeMQHome;
-    }
-
-    public File getActiveMQBase() {
-        if (activeMQBase == null) {
-            if (System.getProperty("activemq.base") != null) {
-                activeMQBase = new File(System.getProperty("activemq.base"));
-            }
-
-            if (activeMQBase == null) {
-                activeMQBase = getActiveMQHome();
-                System.setProperty("activemq.base", activeMQBase.getAbsolutePath());
-            }
-        }
-
-        return activeMQBase;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java
deleted file mode 100644
index 3092460..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * 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.console.command;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-public abstract class AbstractAmqCommand extends AbstractCommand {
-    private URI brokerUrl;
-    private ConnectionFactory factory;
-    private final List<Connection> connections = new ArrayList<Connection>();
-
-    /**
-     * Establishes a connection to the remote broker specified by the broker
-     * url.
-     * 
-     * @return - connection to the broker
-     * @throws JMSException
-     */
-    protected Connection createConnection() throws JMSException {
-        if (getBrokerUrl() == null) {
-            context
-                .printException(new IllegalStateException("You must specify a broker "
-                                                          + "URL to connect to using the --amqurl option."));
-            return null;
-        }
-
-        if (factory == null) {
-            factory = new ActiveMQConnectionFactory(getBrokerUrl());
-        }
-
-        Connection conn = factory.createConnection();
-        connections.add(conn);
-
-        return conn;
-    }
-
-    /**
-     * Establishes a connection to the remote broker specified by the broker
-     * url.
-     * 
-     * @param username - username for the connection
-     * @param password - password for the connection
-     * @return - connection to the broker
-     * @throws JMSException
-     */
-    protected Connection createConnection(String username, String password) throws JMSException {
-        if (getBrokerUrl() == null) {
-            context
-                .printException(new IllegalStateException(
-                                                          "You must specify a broker URL to connect to using the --amqurl option."));
-            return null;
-        }
-
-        if (factory == null) {
-            factory = new ActiveMQConnectionFactory(getBrokerUrl());
-        }
-
-        Connection conn = factory.createConnection(username, password);
-        connections.add(conn);
-        conn.start();
-
-        return conn;
-    }
-
-    /**
-     * Close all created connections.
-     */
-    protected void closeAllConnections() {
-        for (Iterator<Connection> i = connections.iterator(); i.hasNext();) {
-            try {
-                i.next().close();
-            } catch (Exception e) {
-            }
-        }
-
-        connections.clear();
-    }
-
-    /**
-     * Handle the --amqurl option.
-     * 
-     * @param token - current option
-     * @param tokens - succeeding list of arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List tokens) throws Exception {
-        // Try to handle the options first
-        if (token.equals("--amqurl")) {
-            // If no broker url specified, or next token is a new option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Broker URL not specified."));
-                tokens.clear();
-                return;
-            }
-
-            // If broker url already specified
-            if (getBrokerUrl() != null) {
-                context
-                    .printException(new IllegalArgumentException("Multiple broker URL cannot be specified."));
-                tokens.clear();
-                return;
-            }
-
-            String strBrokerUrl = (String)tokens.remove(0);
-
-            try {
-                setBrokerUrl(new URI(strBrokerUrl));
-            } catch (URISyntaxException e) {
-                context.printException(e);
-                tokens.clear();
-                return;
-            }
-        } else {
-            // Let the super class handle the option
-            super.handleOption(token, tokens);
-        }
-    }
-
-    /**
-     * Set the broker url.
-     * 
-     * @param brokerUrl - new broker url
-     */
-    protected void setBrokerUrl(URI brokerUrl) {
-        this.brokerUrl = brokerUrl;
-    }
-
-    /**
-     * Set the broker url.
-     * 
-     * @param address - address of the new broker url
-     * @throws URISyntaxException
-     */
-    protected void setBrokerUrl(String address) throws URISyntaxException {
-        this.brokerUrl = new URI(address);
-    }
-
-    /**
-     * Get the current broker url.
-     * 
-     * @return current broker url
-     */
-    protected URI getBrokerUrl() {
-        return brokerUrl;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java
deleted file mode 100644
index de63347..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.List;
-
-import org.apache.activemq.ActiveMQConnectionMetaData;
-import org.apache.activemq.console.CommandContext;
-
-public abstract class AbstractCommand implements Command {
-    public static final String COMMAND_OPTION_DELIMETER = ",";
-
-    private boolean isPrintHelp;
-    private boolean isPrintVersion;
-
-    protected CommandContext context;
-
-    public void setCommandContext(CommandContext context) {
-        this.context = context;
-    }
-    
-    /**
-     * Execute a generic command, which includes parsing the options for the
-     * command and running the specific task.
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    public void execute(List<String> tokens) throws Exception {
-        // Parse the options specified by "-"
-        parseOptions(tokens);
-
-        // Print the help file of the task
-        if (isPrintHelp) {
-            printHelp();
-
-            // Print the AMQ version
-        } else if (isPrintVersion) {
-            context.printVersion(ActiveMQConnectionMetaData.PROVIDER_VERSION);
-
-            // Run the specified task
-        } else {
-            runTask(tokens);
-        }
-    }
-
-    /**
-     * Parse any option parameters in the command arguments specified by a '-'
-     * as the first character of the token.
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void parseOptions(List<String> tokens) throws Exception {
-        while (!tokens.isEmpty()) {
-            String token = tokens.remove(0);
-            if (token.startsWith("-")) {
-                // Token is an option
-                handleOption(token, tokens);
-            } else {
-                // Push back to list of tokens
-                tokens.add(0, token);
-                return;
-            }
-        }
-    }
-
-    /**
-     * Handle the general options for each command, which includes -h, -?,
-     * --help, -D, --version.
-     * 
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-        isPrintHelp = false;
-        isPrintVersion = false;
-        // If token is a help option
-        if (token.equals("-h") || token.equals("-?") || token.equals("--help")) {
-            isPrintHelp = true;
-            tokens.clear();
-
-            // If token is a version option
-        } else if (token.equals("--version")) {
-            isPrintVersion = true;
-            tokens.clear();
-        } else if (token.startsWith("-D")) {
-            // If token is a system property define option
-            String key = token.substring(2);
-            String value = "";
-            int pos = key.indexOf("=");
-            if (pos >= 0) {
-                value = key.substring(pos + 1);
-                key = key.substring(0, pos);
-            }
-            System.setProperty(key, value);
-        } else {
-            // Token is unrecognized
-            context.printInfo("Unrecognized option: " + token);
-            isPrintHelp = true;
-        }
-    }
-
-    /**
-     * Run the specific task.
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected abstract void runTask(List<String> tokens) throws Exception;
-
-    /**
-     * Print the help messages for the specific task
-     */
-    protected abstract void printHelp();
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
deleted file mode 100644
index c7ccd42..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/**
- * 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.console.command;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import sun.management.ConnectorAddressLink;
-
-public abstract class AbstractJmxCommand extends AbstractCommand {
-    public static final String DEFAULT_JMX_URL    = "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi";
-
-    private JMXServiceURL jmxServiceUrl;
-    private String jmxUser;
-    private String jmxPassword;
-    private boolean jmxUseLocal;
-    private JMXConnector jmxConnector;
-    private MBeanServerConnection jmxConnection;
-
-    /**
-     * Get the current specified JMX service url.
-     * @return JMX service url
-     */
-    protected JMXServiceURL getJmxServiceUrl() {
-        return jmxServiceUrl;
-    }
-    
-    public static String getJVM() { 
-        return System.getProperty("java.vm.specification.vendor"); 
-    } 
-
-    public static boolean isSunJVM() { 
-        return getJVM().equals("Sun Microsystems Inc."); 
-    }
-
-    /**
-     * Get the current JMX service url being used, or create a default one if no JMX service url has been specified.
-     * @return JMX service url
-     * @throws MalformedURLException
-     */
-    protected JMXServiceURL useJmxServiceUrl() throws MalformedURLException {
-        if (getJmxServiceUrl() == null) {
-            String jmxUrl = DEFAULT_JMX_URL;
-            int connectingPid = -1;
-            if (isSunJVM()) {
-                try {
-                    // Try to attach to the local process
-                    // Classes are all dynamically loaded, since they are specific to Sun VM
-                    // if it fails for any reason default jmx url will be used
-                	
-                	
-                    // tools.jar are not always included used by default 
-                    // class loader, so we will try to use custom loader that will
-                    // try to load tools.jar
-                    String javaHome = System.getProperty("java.home");
-                    String tools = javaHome + File.separator +
-                            ".." + File.separator + "lib" + File.separator + "tools.jar";
-                    URLClassLoader loader = new URLClassLoader(new URL[]{new File(tools).toURI().toURL()});
-                    
-                    // load all classes dynamically so we can compile on non-Sun VMs
-                    
-                    //MonitoredHost host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));
-                	Class monitoredHostClass = Class.forName("sun.jvmstat.monitor.MonitoredHost", true, loader);
-                	Method getMonitoredHostMethod = monitoredHostClass.getMethod("getMonitoredHost", String.class);
-                	Object host = getMonitoredHostMethod.invoke(null, (String)null);
-                	//Set vms = host.activeVms();
-                	Method activeVmsMethod = host.getClass().getMethod("activeVms", null);
-                	Set vms = (Set)activeVmsMethod.invoke(host, null);
-                    for (Object vmid: vms) {
-                        int pid = ((Integer) vmid).intValue();
-                        //MonitoredVm mvm = host.getMonitoredVm(new VmIdentifier(vmid.toString()));
-                        Class vmIdentifierClass = Class.forName("sun.jvmstat.monitor.VmIdentifier", true, loader);
-                        Constructor vmIdentifierConstructor = vmIdentifierClass.getConstructor(String.class);
-                        Object vmIdentifier = vmIdentifierConstructor.newInstance(vmid.toString());
-                        Method getMonitoredVmMethod = host.getClass().getMethod("getMonitoredVm", vmIdentifierClass);
-                        Object mvm = getMonitoredVmMethod.invoke(host, vmIdentifier);
-                        //String name =  MonitoredVmUtil.commandLine(mvm);
-                        Class monitoredVmUtilClass = Class.forName("sun.jvmstat.monitor.MonitoredVmUtil", true, loader);
-                        Method commandLineMethod = monitoredVmUtilClass.getMethod("commandLine", Class.forName("sun.jvmstat.monitor.MonitoredVm", true, loader));
-                        String name = (String)commandLineMethod.invoke(null, mvm);
-                        if (name.contains("run.jar start")) {
-                        	connectingPid = pid;
-                            jmxUrl = ConnectorAddressLink.importFrom(pid);
-                            break;
-                        }
-                    }
-                } catch (Exception ignore) {}
-            }
-            
-            if (connectingPid != -1) {
-            	context.print("Connecting to pid: " + connectingPid);
-            } else {
-            	context.print("Connecting to JMX URL: " + jmxUrl);
-            }
-            setJmxServiceUrl(jmxUrl);
-        }
-
-        return getJmxServiceUrl();
-    }
-
-    /**
-     * Sets the JMX service url to use.
-     * @param jmxServiceUrl - new JMX service url to use
-     */
-    protected void setJmxServiceUrl(JMXServiceURL jmxServiceUrl) {
-        this.jmxServiceUrl = jmxServiceUrl;
-    }
-
-    /**
-     * Sets the JMX service url to use.
-     * @param jmxServiceUrl - new JMX service url to use
-     * @throws MalformedURLException
-     */
-    protected void setJmxServiceUrl(String jmxServiceUrl) throws MalformedURLException {
-        setJmxServiceUrl(new JMXServiceURL(jmxServiceUrl));
-    }
-
-    /**
-     * Get the JMX user name to be used when authenticating.
-     * @return the JMX user name
-     */
-    public String getJmxUser() {
-        return jmxUser;
-    }
-
-    /**
-     * Sets the JMS user name to use
-     * @param jmxUser - the jmx 
-     */
-    public void setJmxUser(String jmxUser) {
-        this.jmxUser = jmxUser;
-    }
-
-    /**
-     * Get the password used when authenticating
-     * @return the password used for JMX authentication
-     */
-    public String getJmxPassword() {
-        return jmxPassword;
-    }
-
-    /**
-     * Sets the password to use when authenticating
-     * @param jmxPassword - the password used for JMX authentication
-     */
-    public void setJmxPassword(String jmxPassword) {
-        this.jmxPassword = jmxPassword;
-    }
-
-    /**
-     * Get whether the default mbean server for this JVM should be used instead of the jmx url
-     * @return <code>true</code> if the mbean server from this JVM should be used, <code>false<code> if the jmx url should be used
-     */
-    public boolean isJmxUseLocal() {
-        return jmxUseLocal;
-    }
-
-    /**
-     * Sets whether the the default mbean server for this JVM should be used instead of the jmx url
-     * @param jmxUseLocal - <code>true</code> if the mbean server from this JVM should be used, <code>false<code> if the jmx url should be used
-     */
-    public void setJmxUseLocal(boolean jmxUseLocal) {
-        this.jmxUseLocal = jmxUseLocal;
-    }
-
-    /**
-     * Create a JMX connector using the current specified JMX service url. If there is an existing connection,
-     * it tries to reuse this connection.
-     * @return created JMX connector
-     * @throws IOException
-     */
-    private JMXConnector createJmxConnector() throws IOException {
-        // Reuse the previous connection
-        if (jmxConnector != null) {
-            jmxConnector.connect();
-            return jmxConnector;
-        }
-
-        // Create a new JMX connector
-        if (jmxUser != null && jmxPassword != null) {
-            Map<String,Object> props = new HashMap<String,Object>();
-            props.put(JMXConnector.CREDENTIALS, new String[] { jmxUser, jmxPassword });
-            jmxConnector = JMXConnectorFactory.connect(useJmxServiceUrl(), props);
-        } else {
-            jmxConnector = JMXConnectorFactory.connect(useJmxServiceUrl());
-        }
-        return jmxConnector;
-    }
-
-    /**
-     * Close the current JMX connector
-     */
-    protected void closeJmxConnection() {
-        try {
-            if (jmxConnector != null) {
-                jmxConnector.close();
-                jmxConnector = null;
-            }
-        } catch (IOException e) {
-        }
-    }
-
-    protected MBeanServerConnection createJmxConnection() throws IOException {
-        if (jmxConnection == null) {
-            if (isJmxUseLocal()) {
-                jmxConnection = ManagementFactory.getPlatformMBeanServer();
-            } else {
-                jmxConnection = createJmxConnector().getMBeanServerConnection();
-            }
-        }
-        return jmxConnection;
-    }
-
-    /**
-     * Handle the --jmxurl option.
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-        // Try to handle the options first
-        if (token.equals("--jmxurl")) {
-            // If no jmx url specified, or next token is a new option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("JMX URL not specified."));
-            }
-
-            // If jmx url already specified
-            if (getJmxServiceUrl() != null) {
-                context.printException(new IllegalArgumentException("Multiple JMX URL cannot be specified."));
-                tokens.clear();
-            }
-
-            String strJmxUrl = (String)tokens.remove(0);
-            try {
-                this.setJmxServiceUrl(new JMXServiceURL(strJmxUrl));
-            } catch (MalformedURLException e) {
-                context.printException(e);
-                tokens.clear();
-            }
-        } else if(token.equals("--pid")) {
-           if (isSunJVM()) {
-               if (tokens.isEmpty() || ((String) tokens.get(0)).startsWith("-")) {
-                   context.printException(new IllegalArgumentException("pid not specified"));
-                   return;
-               }
-               int pid = Integer.parseInt(tokens.remove(0));
-               context.print("Connecting to pid: " + pid);
-
-               String jmxUrl = ConnectorAddressLink.importFrom(pid);
-               // If jmx url already specified
-               if (getJmxServiceUrl() != null) {
-                   context.printException(new IllegalArgumentException("JMX URL already specified."));
-                   tokens.clear();
-               }
-               try {
-                   this.setJmxServiceUrl(new JMXServiceURL(jmxUrl));
-               } catch (MalformedURLException e) {
-                   context.printException(e);
-                   tokens.clear();
-               }
-           }  else {
-              context.printInfo("--pid option is not available for this VM, using default JMX url");
-           }
-        } else if (token.equals("--jmxuser")) {
-            // If no jmx user specified, or next token is a new option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("JMX user not specified."));
-            }
-            this.setJmxUser((String) tokens.remove(0));
-        } else if (token.equals("--jmxpassword")) {
-            // If no jmx password specified, or next token is a new option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("JMX password not specified."));
-            }
-            this.setJmxPassword((String) tokens.remove(0));
-        } else if (token.equals("--jmxlocal")) {
-            this.setJmxUseLocal(true);
-        } else {
-            // Let the super class handle the option
-            super.handleOption(token, tokens);
-        }
-    }
-
-    public void execute(List<String> tokens) throws Exception {
-        try {
-            super.execute(tokens);
-        } finally {
-            closeJmxConnection();
-        }
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java
deleted file mode 100644
index a2cb7a0..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.console.util.AmqMessagesUtil;
-
-public class AmqBrowseCommand extends AbstractAmqCommand {
-    public static final String QUEUE_PREFIX = "queue:";
-    public static final String TOPIC_PREFIX = "topic:";
-
-    public static final String VIEW_GROUP_HEADER = "header:";
-    public static final String VIEW_GROUP_CUSTOM = "custom:";
-    public static final String VIEW_GROUP_BODY = "body:";
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: Main browse --amqurl <broker url> [browse-options] <destinations>",
-        "Description: Display selected destination's messages.",
-        "",
-        "Browse Options:",
-        "    --amqurl <url>                Set the broker URL to connect to.",
-        "    --msgsel <msgsel1,msglsel2>   Add to the search list messages matched by the query similar to",
-        "                                  the messages selector format.",
-        "    -V<header|custom|body>        Predefined view that allows you to view the message header, custom",
-        "                                  message header, or the message body.",
-        "    --view <attr1>,<attr2>,...    Select the specific attribute of the message to view.",
-        "    --version                     Display the version information.",
-        "    -h,-?,--help                  Display the browse broker help information.",
-        "",
-        "Examples:",
-        "    Main browse --amqurl tcp://localhost:61616 FOO.BAR",
-        "        - Print the message header, custom message header, and message body of all messages in the",
-        "          queue FOO.BAR",
-        "",
-        "    Main browse --amqurl tcp://localhost:61616 -Vheader,body queue:FOO.BAR",
-        "        - Print only the message header and message body of all messages in the queue FOO.BAR",
-        "",
-        "    Main browse --amqurl tcp://localhost:61616 -Vheader --view custom:MyField queue:FOO.BAR",
-        "        - Print the message header and the custom field 'MyField' of all messages in the queue FOO.BAR",
-        "",
-        "    Main browse --amqurl tcp://localhost:61616 --msgsel JMSMessageID='*:10',JMSPriority>5 FOO.BAR",
-        "        - Print all the message fields that has a JMSMessageID in the header field that matches the",
-        "          wildcard *:10, and has a JMSPriority field > 5 in the queue FOO.BAR",
-        "        * To use wildcard queries, the field must be a string and the query enclosed in ''",
-        "",
-    };
-
-    private final List<String> queryAddObjects = new ArrayList<String>(10);
-    private final List<String> querySubObjects = new ArrayList<String>(10);
-    private final Set<String> groupViews = new HashSet<String>(10);
-    private final Set queryViews = new HashSet(10);
-
-    /**
-     * Execute the browse command, which allows you to browse the messages in a
-     * given JMS destination
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void runTask(List tokens) throws Exception {
-        try {
-            // If no destination specified
-            if (tokens.isEmpty()) {
-                context.printException(new IllegalArgumentException("No JMS destination specified."));
-                return;
-            }
-
-            // If no broker url specified
-            if (getBrokerUrl() == null) {
-                context.printException(new IllegalStateException("No broker url specified. Use the --amqurl option to specify a broker url."));
-                return;
-            }
-
-            // Display the messages for each destination
-            for (Iterator i = tokens.iterator(); i.hasNext();) {
-                String destName = (String)i.next();
-                Destination dest;
-
-                // If destination has been explicitly specified as a queue
-                if (destName.startsWith(QUEUE_PREFIX)) {
-                    dest = new ActiveMQQueue(destName.substring(QUEUE_PREFIX.length()));
-
-                    // If destination has been explicitly specified as a topic
-                } else if (destName.startsWith(TOPIC_PREFIX)) {
-                    dest = new ActiveMQTopic(destName.substring(TOPIC_PREFIX.length()));
-
-                    // By default destination is assumed to be a queue
-                } else {
-                    dest = new ActiveMQQueue(destName);
-                }
-
-                // Query for the messages to view
-                List addMsgs = AmqMessagesUtil.getMessages(getBrokerUrl(), dest, queryAddObjects);
-
-                // Query for the messages to remove from view
-                if (querySubObjects.size() > 0) {
-                    List subMsgs = AmqMessagesUtil.getMessages(getBrokerUrl(), dest, querySubObjects);
-                    addMsgs.removeAll(subMsgs);
-                }
-
-                // Display the messages
-                context.printMessage(AmqMessagesUtil.filterMessagesView(addMsgs, groupViews, queryViews));
-            }
-
-        } catch (Exception e) {
-            context.printException(new RuntimeException("Failed to execute browse task. Reason: " + e));
-            throw new Exception(e);
-        }
-    }
-
-    /**
-     * Handle the --msgsel, --xmsgsel, --view, -V options.
-     * 
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List tokens) throws Exception {
-
-        // If token is an additive message selector option
-        if (token.startsWith("--msgsel")) {
-
-            // If no message selector is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Message selector not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                queryAddObjects.add(queryTokens.nextToken());
-            }
-        } else if (token.startsWith("--xmsgsel")) {
-            // If token is a substractive message selector option
-
-            // If no message selector is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Message selector not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                querySubObjects.add(queryTokens.nextToken());
-            }
-
-        } else if (token.startsWith("--view")) {
-            // If token is a view option
-
-            // If no view specified, or next token is a new option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Attributes to view not specified"));
-                return;
-            }
-
-            // Add the attributes to view
-            StringTokenizer viewTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (viewTokens.hasMoreTokens()) {
-                String viewToken = viewTokens.nextToken();
-
-                // If view is explicitly specified to belong to the JMS header
-                if (viewToken.equals(VIEW_GROUP_HEADER)) {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + viewToken.substring(VIEW_GROUP_HEADER.length()));
-
-                    // If view is explicitly specified to belong to the JMS
-                    // custom header
-                } else if (viewToken.equals(VIEW_GROUP_CUSTOM)) {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + viewToken.substring(VIEW_GROUP_CUSTOM.length()));
-
-                    // If view is explicitly specified to belong to the JMS body
-                } else if (viewToken.equals(VIEW_GROUP_BODY)) {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + viewToken.substring(VIEW_GROUP_BODY.length()));
-
-                    // If no view explicitly specified, let's check the view for
-                    // each group
-                } else {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + viewToken);
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + viewToken);
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + viewToken);
-                }
-            }
-        } else if (token.startsWith("-V")) {
-            // If token is a predefined group view option
-            String viewGroup = token.substring(2);
-            // If option is a header group view
-            if (viewGroup.equals("header")) {
-                groupViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX);
-
-                // If option is a custom header group view
-            } else if (viewGroup.equals("custom")) {
-                groupViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX);
-
-                // If option is a body group view
-            } else if (viewGroup.equals("body")) {
-                groupViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX);
-
-                // Unknown group view
-            } else {
-                context.printInfo("Unknown group view: " + viewGroup + ". Ignoring group view option.");
-            }
-        } else {
-            // Let super class handle unknown option
-            super.handleOption(token, tokens);
-        }
-    }
-
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BrowseCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BrowseCommand.java
deleted file mode 100644
index 3dc1b84..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BrowseCommand.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.management.ObjectInstance;
-
-import org.apache.activemq.console.util.AmqMessagesUtil;
-import org.apache.activemq.console.util.JmxMBeansUtil;
-
-public class BrowseCommand extends AbstractJmxCommand {
-
-    public static final String QUEUE_PREFIX = "queue:";
-    public static final String TOPIC_PREFIX = "topic:";
-
-    public static final String VIEW_GROUP_HEADER = "header:";
-    public static final String VIEW_GROUP_CUSTOM = "custom:";
-    public static final String VIEW_GROUP_BODY = "body:";
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: Main browse [browse-options] <destinations>", "Description: Display selected destination's messages.", 
-        "", 
-        "Browse Options:",
-        "    --msgsel <msgsel1,msglsel2>   Add to the search list messages matched by the query similar to", 
-        "                                  the messages selector format.",
-        "    -V<header|custom|body>        Predefined view that allows you to view the message header, custom", 
-        "                                  message header, or the message body.",
-        "    --view <attr1>,<attr2>,...    Select the specific attribute of the message to view.", 
-        "    --jmxurl <url>                Set the JMX URL to connect to.",
-        "    --pid <pid>                   Set the pid to connect to (only on Sun JVM).",            
-        "    --jmxuser <user>              Set the JMX user used for authenticating.",
-        "    --jmxpassword <password>      Set the JMX password used for authenticating.",
-        "    --jmxlocal                    Use the local JMX server instead of a remote one.",
-        "    --version                     Display the version information.",
-        "    -h,-?,--help                  Display the browse broker help information.", 
-        "", 
-        "Examples:",
-        "    Main browse FOO.BAR", 
-        "        - Print the message header, custom message header, and message body of all messages in the", 
-        "          queue FOO.BAR",
-        "",
-        "    Main browse -Vheader,body queue:FOO.BAR",
-        "        - Print only the message header and message body of all messages in the queue FOO.BAR",
-        "",
-        "    Main browse -Vheader --view custom:MyField queue:FOO.BAR",
-        "        - Print the message header and the custom field 'MyField' of all messages in the queue FOO.BAR",
-        "",
-        "    Main browse --msgsel JMSMessageID='*:10',JMSPriority>5 FOO.BAR", 
-        "        - Print all the message fields that has a JMSMessageID in the header field that matches the",
-        "          wildcard *:10, and has a JMSPriority field > 5 in the queue FOO.BAR", 
-        "        * To use wildcard queries, the field must be a string and the query enclosed in ''", 
-        ""
-    };
-
-    private final List<String> queryAddObjects = new ArrayList<String>(10);
-    private final List<String> querySubObjects = new ArrayList<String>(10);
-    private final Set<String> groupViews = new HashSet<String>(10);
-    private final Set queryViews = new HashSet(10);
-
-    /**
-     * Execute the browse command, which allows you to browse the messages in a
-     * given JMS destination
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void runTask(List<String> tokens) throws Exception {
-        try {
-            // If there is no queue name specified, let's select all
-            if (tokens.isEmpty()) {
-                tokens.add("*");
-            }
-
-            // Iterate through the queue names
-            for (Iterator<String> i = tokens.iterator(); i.hasNext();) {
-                List queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), "Type=Queue,Destination=" + i.next() + ",*");
-
-                // Iterate through the queue result
-                for (Iterator j = queueList.iterator(); j.hasNext();) {
-                    List messages = JmxMBeansUtil.createMessageQueryFilter(createJmxConnection(), ((ObjectInstance)j.next()).getObjectName()).query(queryAddObjects);
-                    context.printMessage(JmxMBeansUtil.filterMessagesView(messages, groupViews, queryViews));
-                }
-            }
-        } catch (Exception e) {
-            context.printException(new RuntimeException("Failed to execute browse task. Reason: " + e));
-            throw new Exception(e);
-        }
-    }
-
-    /**
-     * Handle the --msgsel, --xmsgsel, --view, -V options.
-     * 
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-
-        // If token is an additive message selector option
-        if (token.startsWith("--msgsel")) {
-
-            // If no message selector is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Message selector not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                queryAddObjects.add(queryTokens.nextToken());
-            }
-        } else if (token.startsWith("--xmsgsel")) {
-            // If token is a substractive message selector option
-
-            // If no message selector is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Message selector not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                querySubObjects.add(queryTokens.nextToken());
-            }
-
-        } else if (token.startsWith("--view")) {
-            // If token is a view option
-
-            // If no view specified, or next token is a new option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Attributes to view not specified"));
-                return;
-            }
-
-            // Add the attributes to view
-            StringTokenizer viewTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (viewTokens.hasMoreTokens()) {
-                String viewToken = viewTokens.nextToken();
-
-                // If view is explicitly specified to belong to the JMS header
-                if (viewToken.equals(VIEW_GROUP_HEADER)) {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + viewToken.substring(VIEW_GROUP_HEADER.length()));
-
-                    // If view is explicitly specified to belong to the JMS
-                    // custom header
-                } else if (viewToken.equals(VIEW_GROUP_CUSTOM)) {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + viewToken.substring(VIEW_GROUP_CUSTOM.length()));
-
-                    // If view is explicitly specified to belong to the JMS body
-                } else if (viewToken.equals(VIEW_GROUP_BODY)) {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + viewToken.substring(VIEW_GROUP_BODY.length()));
-
-                    // If no view explicitly specified, let's check the view for
-                    // each group
-                } else {
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + viewToken);
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + viewToken);
-                    queryViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + viewToken);
-                }
-            }
-        } else if (token.startsWith("-V")) {
-            // If token is a predefined group view option
-            String viewGroup = token.substring(2);
-            // If option is a header group view
-            if (viewGroup.equals("header")) {
-                groupViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX);
-
-                // If option is a custom header group view
-            } else if (viewGroup.equals("custom")) {
-                groupViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX);
-
-                // If option is a body group view
-            } else if (viewGroup.equals("body")) {
-                groupViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX);
-
-                // Unknown group view
-            } else {
-                context.printInfo("Unknown group view: " + viewGroup + ". Ignoring group view option.");
-            }
-        } else {
-            // Let super class handle unknown option
-            super.handleOption(token, tokens);
-        }
-    }
-
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java
deleted file mode 100644
index 61c7fed..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-public class BstatCommand extends QueryCommand {
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: activemq-admin bstat [bstat-options] [broker-name]",
-        "Description: Performs a predefined query that displays useful statistics regarding the specified broker.",
-        "             If no broker name is specified, it will try and select from all registered brokers.",
-        "",
-        "Bstat Options:",
-        "    --jmxurl <url>                Set the JMX URL to connect to.",
-        "    --pid <pid>                   Set the pid to connect to (only on Sun JVM).",            
-        "    --jmxuser <user>              Set the JMX user used for authenticating.",
-        "    --jmxpassword <password>      Set the JMX password used for authenticating.",
-        "    --jmxlocal                    Use the local JMX server instead of a remote one.",
-        "    --version                     Display the version information.",
-        "    -h,-?,--help                  Display the query broker help information.",
-        "",
-        "Examples:",
-        "    activemq-admin bstat localhost",
-        "        - Display a summary of statistics for the broker 'localhost'"
-    };
-    
-    /**
-     * Performs a predefiend query option
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void runTask(List<String> tokens) throws Exception {
-        List<String> queryTokens = new ArrayList<String>();
-        // Find the first non-option token
-        String brokerName = "*";
-        for (Iterator i = tokens.iterator(); i.hasNext();) {
-            String token = (String)i.next();
-            if (!token.startsWith("-")) {
-                brokerName = token;
-                break;
-            } else {
-                // Re-insert options
-                queryTokens.add(token);
-            }
-        }
-
-        // Build the predefined option
-        queryTokens.add("--objname");
-        queryTokens.add("Type=*,BrokerName=" + brokerName);
-        queryTokens.add("-xQTopic=ActiveMQ.Advisory.*");
-        queryTokens.add("--vuew");
-        queryTokens.add("Type,BrokerName,Destination,ConnectorName,EnqueueCount,"
-                        + "DequeueCount,TotalEnqueueCount,TotalDequeueCount,Messages,"
-                        + "TotalMessages,ConsumerCount,TotalConsumerCount,DispatchQueueSize");
-
-        // Call the query command
-        super.runTask(queryTokens);
-    }
-
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/Command.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/Command.java
deleted file mode 100644
index 5b62687..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/Command.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.List;
-
-import org.apache.activemq.console.CommandContext;
-
-public interface Command {
-    
-    void setCommandContext( CommandContext context );
-    
-    /**
-     * Execute the specified command
-     * @param tokens - arguments to the command
-     * @throws Exception
-     */
-    void execute(List<String> tokens) throws Exception;
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java
deleted file mode 100644
index 0ef7d06..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/CreateCommand.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*

- * 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.console.command;

-

-import java.io.BufferedReader;

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileNotFoundException;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.InputStreamReader;

-import java.nio.ByteBuffer;

-import java.nio.channels.FileChannel;

-import java.util.List;

-

-import javax.xml.parsers.DocumentBuilder;

-import javax.xml.parsers.DocumentBuilderFactory;

-import javax.xml.parsers.ParserConfigurationException;

-import javax.xml.transform.Result;

-import javax.xml.transform.Source;

-import javax.xml.transform.Transformer;

-import javax.xml.transform.TransformerException;

-import javax.xml.transform.TransformerFactory;

-import javax.xml.transform.dom.DOMSource;

-import javax.xml.transform.stream.StreamResult;

-import javax.xml.xpath.XPath;

-import javax.xml.xpath.XPathConstants;

-import javax.xml.xpath.XPathExpressionException;

-import javax.xml.xpath.XPathFactory;

-

-import org.w3c.dom.Attr;

-import org.w3c.dom.Element;

-import org.xml.sax.SAXException;

-

-public class CreateCommand extends AbstractCommand {

-

-    protected final String[] helpFile = new String[] {

-        "Task Usage: Main create path/to/brokerA [create-options]",

-        "Description:  Creates a runnable broker instance in the specified path.",

-        "",

-        "List Options:",

-        "    --amqconf <file path>   Path to ActiveMQ conf file that will be used in the broker instance. Default is: conf/activemq.xml",

-        "    --version               Display the version information.",

-        "    -h,-?,--help            Display the create broker help information.",

-        ""

-    };

-

-    protected final String DEFAULT_TARGET_ACTIVEMQ_CONF = "conf/activemq.xml"; // default activemq conf to create in the new broker instance

-    protected final String DEFAULT_BROKERNAME_XPATH = "/beans/broker/@brokerName"; // default broker name xpath to change the broker name

-

-    protected final String[] BASE_SUB_DIRS = { "bin", "conf" }; // default sub directories that will be created

-    protected final String BROKER_NAME_REGEX = "[$][{]brokerName[}]"; // use to replace broker name property holders

-

-    protected String amqConf = "conf/activemq.xml"; // default conf if no conf is specified via --amqconf

-

-    // default files to copy from activemq home to the new broker instance

-    protected String[][] fileCopyMap = {

-        { "conf/log4j.properties", "conf/log4j.properties" },

-        { "conf/broker.ks", "conf/broker.ks" },

-        { "conf/broker.ts", "conf/broker.ts" },

-        { "conf/camel.xml", "conf/camel.xml" },

-        { "conf/jetty.xml", "conf/jetty.xml" },

-        { "conf/jetty-realm.properties", "conf/jetty-realm.properties" },

-        { "conf/credentials.properties", "conf/credentials.properties" }

-    };

-

-    // default files to create 

-    protected String[][] fileWriteMap = {

-        { "winActivemq", "bin/${brokerName}.bat" },

-        { "unixActivemq", "bin/${brokerName}" }

-    };

-

-

-    protected String brokerName;

-    protected File amqHome;

-    protected File targetAmqBase;

-

-    protected void runTask(List<String> tokens) throws Exception {

-        context.print("Running create broker task...");

-        amqHome = new File(System.getProperty("activemq.home"));

-        for (String token : tokens) {

-

-            targetAmqBase = new File(token);

-            brokerName = targetAmqBase.getName();

-            

-

-            if (targetAmqBase.exists()) {

-                BufferedReader console = new BufferedReader(new InputStreamReader(System.in));

-                String resp;

-                while (true) {

-                    context.print("Target directory (" + targetAmqBase.getCanonicalPath() + ") already exists. Overwrite (y/n): ");

-                    resp = console.readLine();

-                    if (resp.equalsIgnoreCase("y") || resp.equalsIgnoreCase("yes")) {

-                        break;

-                    } else if (resp.equalsIgnoreCase("n") || resp.equalsIgnoreCase("no")) {

-                        return;

-                    }

-                }

-            }

-

-            context.print("Creating directory: " + targetAmqBase.getCanonicalPath());

-            targetAmqBase.mkdirs();

-            createSubDirs(targetAmqBase, BASE_SUB_DIRS);

-            writeFileMapping(targetAmqBase, fileWriteMap);

-            copyActivemqConf(amqHome, targetAmqBase, amqConf);

-            copyFileMapping(amqHome, targetAmqBase, fileCopyMap);

-        }

-    }

-

-    /**

-     * Handle the --amqconf options.

-     *

-     * @param token  - option token to handle

-     * @param tokens - succeeding command arguments

-     * @throws Exception

-     */

-    protected void handleOption(String token, List<String> tokens) throws Exception {

-        if (token.startsWith("--amqconf")) {

-            // If no amqconf specified, or next token is a new option

-            if (tokens.isEmpty() || tokens.get(0).startsWith("-")) {

-                context.printException(new IllegalArgumentException("Attributes to amqconf not specified"));

-                return;

-            }

-

-            amqConf = tokens.remove(0);

-        } else {

-            // Let super class handle unknown option

-            super.handleOption(token, tokens);

-        }

-    }

-

-    protected void createSubDirs(File target, String[] subDirs) throws IOException {

-        File subDirFile;

-        for (String subDir : BASE_SUB_DIRS) {

-            subDirFile = new File(target, subDir);

-            context.print("Creating directory: " + subDirFile.getCanonicalPath());

-            subDirFile.mkdirs();

-        }

-    }

-

-    protected void writeFileMapping(File targetBase, String[][] fileWriteMapping) throws IOException {

-        for (String[] fileWrite : fileWriteMapping) {

-            File dest = new File(targetBase, resolveParam(BROKER_NAME_REGEX, brokerName, fileWrite[1]));

-            context.print("Creating new file: " + dest.getCanonicalPath());

-            writeFile(fileWrite[0], dest);

-        }

-    }

-

-    protected void copyFileMapping(File srcBase, File targetBase, String[][] fileMapping) throws IOException {

-        for (String[] fileMap : fileMapping) {

-            File src = new File(srcBase, fileMap[0]);

-            File dest = new File(targetBase, resolveParam(BROKER_NAME_REGEX, brokerName, fileMap[1]));

-            context.print("Copying from: " + src.getCanonicalPath() + "\n          to: " + dest.getCanonicalPath());

-            copyFile(src, dest);

-        }

-    }

-

-    protected void copyActivemqConf(File srcBase, File targetBase, String activemqConf) throws IOException, ParserConfigurationException, SAXException, TransformerException, XPathExpressionException {

-        File src = new File(srcBase, activemqConf);

-

-        if (!src.exists()) {

-            throw new FileNotFoundException("File: " + src.getCanonicalPath() + " not found.");

-        }

-

-        File dest = new File(targetBase, DEFAULT_TARGET_ACTIVEMQ_CONF);

-        context.print("Copying from: " + src.getCanonicalPath() + "\n          to: " + dest.getCanonicalPath());

-

-        DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();

-        Element docElem = builder.parse(src).getDocumentElement();

-

-        XPath xpath = XPathFactory.newInstance().newXPath();

-        Attr brokerNameAttr = (Attr) xpath.evaluate(DEFAULT_BROKERNAME_XPATH, docElem, XPathConstants.NODE);

-        brokerNameAttr.setValue(brokerName);

-

-        writeToFile(new DOMSource(docElem), dest);

-    }

-

-    protected void printHelp() {

-        context.printHelp(helpFile);

-    }

-

-    // write the default files to create (i.e. script files)

-    private void writeFile(String typeName, File dest) throws IOException {

-        String data;

-        if (typeName.equals("winActivemq")) {

-            data = winActivemqData;

-            data = resolveParam("[$][{]activemq.home[}]", amqHome.getCanonicalPath().replaceAll("[\\\\]", "/"), data);

-            data = resolveParam("[$][{]activemq.base[}]", targetAmqBase.getCanonicalPath().replaceAll("[\\\\]", "/"), data);

-        } else if (typeName.equals("unixActivemq")) {

-            data = unixActivemqData;

-            data = resolveParam("[$][{]activemq.home[}]", amqHome.getCanonicalPath().replaceAll("[\\\\]", "/"), data);

-            data = resolveParam("[$][{]activemq.base[}]", targetAmqBase.getCanonicalPath().replaceAll("[\\\\]", "/"), data);

-        } else {

-            throw new IllegalStateException("Unknown file type: " + typeName);

-        }

-

-        ByteBuffer buf = ByteBuffer.allocate(data.length());

-        buf.put(data.getBytes());

-        buf.flip();

-

-        FileChannel destinationChannel = new FileOutputStream(dest).getChannel();

-        destinationChannel.write(buf);

-        destinationChannel.close();

-

-        // Set file permissions available for Java 6.0 only

-//        dest.setExecutable(true);

-//        dest.setReadable(true);

-//        dest.setWritable(true);

-    }

-

-    // utlity method to write an xml source to file

-    private void writeToFile(Source src, File file) throws TransformerException {

-        TransformerFactory tFactory = TransformerFactory.newInstance();

-        Transformer fileTransformer = tFactory.newTransformer();

-

-        Result res = new StreamResult(file);

-        fileTransformer.transform(src, res);

-    }

-

-    // utility method to copy one file to another

-    private void copyFile(File from, File dest) throws IOException {

-        if (!from.exists()) {

-            return;

-        }

-        FileChannel sourceChannel = new FileInputStream(from).getChannel();

-        FileChannel destinationChannel = new FileOutputStream(dest).getChannel();

-        sourceChannel.transferTo(0, sourceChannel.size(), destinationChannel);

-        sourceChannel.close();

-        destinationChannel.close();

-    }

-

-    // replace a property place holder (paramName) with the paramValue

-    private String resolveParam(String paramName, String paramValue, String target) {

-        return target.replaceAll(paramName, paramValue);

-    }

-

-    // Embedded windows script data

-    private static final String winActivemqData =

-        "@echo off\n"

-            + "set ACTIVEMQ_HOME=\"${activemq.home}\"\n"

-            + "set ACTIVEMQ_BASE=\"${activemq.base}\"\n"

-            + "\n"

-            + "set PARAM=%1\n"

-            + ":getParam\n"

-            + "shift\n"

-            + "if \"%1\"==\"\" goto end\n"

-            + "set PARAM=%PARAM% %1\n"

-            + "goto getParam\n"

-            + ":end\n"

-            + "\n"

-            + "%ACTIVEMQ_HOME%/bin/activemq %PARAM%";

-

-

-    // Embedded unix script data

-    private static final String unixActivemqData = "## Figure out the ACTIVEMQ_BASE from the directory this script was run from\n"

-        + "PRG=\"$0\"\n"

-        + "progname=`basename \"$0\"`\n"

-        + "saveddir=`pwd`\n"

-        + "# need this for relative symlinks\n"

-        + "dirname_prg=`dirname \"$PRG\"`\n"

-        + "cd \"$dirname_prg\"\n"

-        + "while [ -h \"$PRG\" ] ; do\n"

-        + "  ls=`ls -ld \"$PRG\"`\n"

-        + "  link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n"

-        + "  if expr \"$link\" : '.*/.*' > /dev/null; then\n"

-        + "    PRG=\"$link\"\n"

-        + "  else\n"

-        + "    PRG=`dirname \"$PRG\"`\"/$link\"\n"

-        + "  fi\n"

-        + "done\n"

-        + "ACTIVEMQ_BASE=`dirname \"$PRG\"`/..\n"

-        + "cd \"$saveddir\"\n"

-        + "\n"

-        + "ACTIVEMQ_BASE=`cd \"$ACTIVEMQ_BASE\" && pwd`\n\n"

-        + "export ACTIVEMQ_HOME=${activemq.home}\n"

-        + "export ACTIVEMQ_BASE=$ACTIVEMQ_BASE\n\n"

-        + "${ACTIVEMQ_HOME}/bin/activemq \"$*\"";

-

-}

diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/DecryptCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/DecryptCommand.java
deleted file mode 100644
index 2bff397..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/DecryptCommand.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.console.command;
-
-import java.util.List;
-
-import org.jasypt.exceptions.EncryptionOperationNotPossibleException;
-
-public class DecryptCommand extends EncryptCommand {
-
-    protected String[] helpFile = new String[] {
-            "Task Usage: Main decrypt --password <password> --input <input>",
-            "Description: Decrypts given text.",
-            "", 
-            "Encrypt Options:",
-            "    --password <password>      Password to be used by the encryptor.",
-            "    --input <input>            Text to be encrypted.",
-            "    --version                  Display the version information.",
-            "    -h,-?,--help               Display the stop broker help information.",
-            ""
-        };    
-    
-    @Override
-    protected void runTask(List<String> tokens) throws Exception {
-        if (password == null || input == null) {
-            context.printException(new IllegalArgumentException("input and password parameters are mandatory"));
-            return;
-        }
-        encryptor.setPassword(password);
-        try {
-            context.print("Decrypted text: " + encryptor.decrypt(input));
-        } catch (EncryptionOperationNotPossibleException e) {
-            context.print("ERROR: Text cannot be decrypted, check your input and password and try again!");
-        }
-    }
-
-    
-    
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/EncryptCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/EncryptCommand.java
deleted file mode 100644
index d3d81fd..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/EncryptCommand.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.console.command;
-
-import java.util.List;
-
-import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
-
-public class EncryptCommand extends AbstractCommand {
-
-    protected String[] helpFile = new String[] {
-            "Task Usage: Main encrypt --password <password> --input <input>",
-            "Description: Encrypts given text.",
-            "", 
-            "Encrypt Options:",
-            "    --password <password>      Password to be used by the encryptor.",
-            "    --input <input>            Text to be encrypted.",
-            "    --version                  Display the version information.",
-            "    -h,-?,--help               Display the stop broker help information.",
-            ""
-        };
-    
-    StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
-    String input;
-    String password;
-    
-    @Override
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-    @Override
-    protected void runTask(List<String> tokens) throws Exception {
-        if (password == null || input == null) {
-            context.printException(new IllegalArgumentException("input and password parameters are mandatory"));
-            return;
-        }
-        encryptor.setPassword(password);
-        context.print("Encrypted text: " + encryptor.encrypt(input));
-    }
-
-    @Override
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-        if (token.startsWith("--input")) {
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("input not specified"));
-                return;
-            }
-
-            input=(String)tokens.remove(0);
-        } else if (token.startsWith("--password")) {
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("password not specified"));
-                return;
-            }
-
-            password=(String)tokens.remove(0);            
-        } else {
-            super.handleOption(token, tokens);
-        }
-    }
-    
-    
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java
deleted file mode 100644
index 62d0165..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.activemq.console.util.JmxMBeansUtil;
-
-public class ListCommand extends AbstractJmxCommand {
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: Main list [list-options]",
-        "Description:  Lists all available broker in the specified JMX context.",
-        "",
-        "List Options:",
-        "    --jmxurl <url>             Set the JMX URL to connect to.",
-        "    --pid <pid>                Set the pid to connect to (only on Sun JVM).",            
-        "    --jmxuser <user>           Set the JMX user used for authenticating.",
-        "    --jmxpassword <password>   Set the JMX password used for authenticating.",
-        "    --jmxlocal                 Use the local JMX server instead of a remote one.",
-        "    --version                  Display the version information.",
-        "    -h,-?,--help               Display the stop broker help information.",
-        ""
-    };
-
-    /**
-     * List all running brokers registered in the specified JMX context
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void runTask(List tokens) throws Exception {
-        try {
-            Set<String> propsView = new HashSet<String>();
-            propsView.add("BrokerName");
-            context.printMBean(JmxMBeansUtil.filterMBeansView(JmxMBeansUtil.getAllBrokers(createJmxConnection()), propsView));
-        } catch (Exception e) {
-            context.printException(new RuntimeException("Failed to execute list task. Reason: " + e));
-            throw new Exception(e);
-        }
-    }
-    
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java
deleted file mode 100644
index a24a5a6..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.remote.JMXConnector;
-
-import org.apache.activemq.console.util.JmxMBeansUtil;
-
-public class PurgeCommand extends AbstractJmxCommand {
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: Main purge [browse-options] <destinations>",
-        "Description: Delete selected destination's messages that matches the message selector.", 
-        "", 
-        "Purge Options:",
-        "    --msgsel <msgsel1,msglsel2>   Add to the search list messages matched by the query similar to",
-        "                                  the messages selector format.",
-        "    --jmxurl <url>                Set the JMX URL to connect to.",
-        "    --pid <pid>                   Set the pid to connect to (only on Sun JVM).",            
-        "    --jmxuser <user>              Set the JMX user used for authenticating.",
-        "    --jmxpassword <password>      Set the JMX password used for authenticating.",
-        "    --jmxlocal                    Use the local JMX server instead of a remote one.",
-        "    --version                     Display the version information.",
-        "    -h,-?,--help                  Display the browse broker help information.", 
-        "", 
-        "Examples:",
-        "    Main purge FOO.BAR", 
-        "        - Delete all the messages in queue FOO.BAR",
-
-        "    Main purge --msgsel JMSMessageID='*:10',JMSPriority>5 FOO.*", 
-        "        - Delete all the messages in the destinations that matches FOO.* and has a JMSMessageID in",
-        "          the header field that matches the wildcard *:10, and has a JMSPriority field > 5 in the",
-        "          queue FOO.BAR",
-        "        * To use wildcard queries, the field must be a string and the query enclosed in ''",
-        "",
-    };
-
-    private final List<String> queryAddObjects = new ArrayList<String>(10);
-    private final List<String> querySubObjects = new ArrayList<String>(10);
-
-    /**
-     * Execute the purge command, which allows you to purge the messages in a
-     * given JMS destination
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void runTask(List<String> tokens) throws Exception {
-        try {
-            // If there is no queue name specified, let's select all
-            if (tokens.isEmpty()) {
-                tokens.add("*");
-            }
-
-            // Iterate through the queue names
-            for (Iterator<String> i = tokens.iterator(); i.hasNext();) {
-                List queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), "Type=Queue,Destination=" + i.next() + ",*");
-
-                for (Iterator j = queueList.iterator(); j.hasNext();) {
-                    ObjectName queueName = ((ObjectInstance)j.next()).getObjectName();
-                    if (queryAddObjects.isEmpty()) {
-                        purgeQueue(queueName);
-                    } else {
-                        List messages = JmxMBeansUtil.createMessageQueryFilter(createJmxConnection(), queueName).query(queryAddObjects);
-                        purgeMessages(queueName, messages);
-                    }
-                }
-            }
-        } catch (Exception e) {
-            context.printException(new RuntimeException("Failed to execute purge task. Reason: " + e));
-            throw new Exception(e);
-        }
-    }
-
-    /**
-     * Purge all the messages in the queue
-     * 
-     * @param queue - ObjectName of the queue to purge
-     * @throws Exception
-     */
-    public void purgeQueue(ObjectName queue) throws Exception {
-        context.printInfo("Purging all messages in queue: " + queue.getKeyProperty("Destination"));
-        createJmxConnection().invoke(queue, "purge", new Object[] {}, new String[] {});
-    }
-
-    /**
-     * Purge selected messages in the queue
-     * 
-     * @param queue - ObjectName of the queue to purge the messages from
-     * @param messages - List of messages to purge
-     * @throws Exception
-     */
-    public void purgeMessages(ObjectName queue, List messages) throws Exception {
-        Object[] param = new Object[1];
-        for (Iterator i = messages.iterator(); i.hasNext();) {
-            CompositeData msg = (CompositeData)i.next();
-            param[0] = "" + msg.get("JMSMessageID");
-            context.printInfo("Removing message: " + param[0] + " from queue: " + queue.getKeyProperty("Destination"));
-            createJmxConnection().invoke(queue, "removeMessage", param, new String[] {
-                "java.lang.String"
-            });
-        }
-    }
-
-    /**
-     * Handle the --msgsel, --xmsgsel.
-     * 
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-        // If token is an additive message selector option
-        if (token.startsWith("--msgsel")) {
-
-            // If no message selector is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Message selector not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                queryAddObjects.add(queryTokens.nextToken());
-            }
-        } else if (token.startsWith("--xmsgsel")) {
-            // If token is a substractive message selector option
-
-            // If no message selector is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Message selector not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                querySubObjects.add(queryTokens.nextToken());
-            }
-
-        } else {
-            // Let super class handle unknown option
-            super.handleOption(token, tokens);
-        }
-    }
-
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java
deleted file mode 100644
index e2267ba..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.activemq.console.util.JmxMBeansUtil;
-
-public class QueryCommand extends AbstractJmxCommand {
-    // Predefined type=identifier query
-    private static final Properties PREDEFINED_OBJNAME_QUERY = new Properties();
-
-    static {
-        PREDEFINED_OBJNAME_QUERY.setProperty("Broker", "Type=Broker,BrokerName=%1,*");
-        PREDEFINED_OBJNAME_QUERY.setProperty("Connection", "Type=Connection,Connection=%1,*");
-        PREDEFINED_OBJNAME_QUERY.setProperty("Connector", "Type=Connector,ConnectorName=%1,*");
-        PREDEFINED_OBJNAME_QUERY.setProperty("NetworkConnector", "Type=NetworkConnector,BrokerName=%1,*");
-        PREDEFINED_OBJNAME_QUERY.setProperty("Queue", "Type=Queue,Destination=%1,*");
-        PREDEFINED_OBJNAME_QUERY.setProperty("Topic", "Type=Topic,Destination=%1,*");
-    };
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: Main query [query-options]",
-        "Description: Display selected broker component's attributes and statistics.",
-        "",
-        "Query Options:",
-        "    -Q<type>=<name>               Add to the search list the specific object type matched",
-        "                                  by the defined object identifier.",
-        "    -xQ<type>=<name>              Remove from the search list the specific object type",
-        "                                  matched by the object identifier.",
-        "    --objname <query>             Add to the search list objects matched by the query similar",
-        "                                  to the JMX object name format.",
-        "    --xobjname <query>            Remove from the search list objects matched by the query",
-        "                                  similar to the JMX object name format.",
-        "    --view <attr1>,<attr2>,...    Select the specific attribute of the object to view.",
-        "                                  By default all attributes will be displayed.",
-        "    --jmxurl <url>                Set the JMX URL to connect to.",
-        "    --pid <pid>                   Set the pid to connect to (only on Sun JVM).",            
-        "    --jmxuser <user>              Set the JMX user used for authenticating.",
-        "    --jmxpassword <password>      Set the JMX password used for authenticating.",
-        "    --jmxlocal                    Use the local JMX server instead of a remote one.",
-        "    --version                     Display the version information.",
-        "    -h,-?,--help                  Display the query broker help information.",
-        "", "Examples:",
-        "    query",
-        "        - Print all the attributes of all registered objects queues, topics, connections, etc).",
-        "",
-        "    query -QQueue=TEST.FOO",
-        "        - Print all the attributes of the queue with destination name TEST.FOO.",
-        "",
-        "    query -QTopic=*",
-        "        - Print all the attributes of all registered topics.",
-        "",
-        "    query --view EnqueueCount,DequeueCount", 
-        "        - Print the attributes EnqueueCount and DequeueCount of all registered objects.",
-        "",
-        "    query -QTopic=* --view EnqueueCount,DequeueCount",
-        "        - Print the attributes EnqueueCount and DequeueCount of all registered topics.",
-        "",
-        "    query -QTopic=* -QQueue=* --view EnqueueCount,DequeueCount",
-        "        - Print the attributes EnqueueCount and DequeueCount of all registered topics and",
-        "          queues.",
-        "",
-        "    query -QTopic=* -xQTopic=ActiveMQ.Advisory.*", 
-        "        - Print all attributes of all topics except those that has a name that begins",
-        "          with \"ActiveMQ.Advisory\".",
-        "",
-        "    query --objname Type=*Connect*,BrokerName=local* -xQNetworkConnector=*",
-        "        - Print all attributes of all connectors, connections excluding network connectors",
-        "          that belongs to the broker that begins with local.", 
-        "", 
-        "    query -QQueue=* -xQQueue=????", 
-        "        - Print all attributes of all queues except those that are 4 letters long.",
-        "",
-    };
-
-    private final List<String> queryAddObjects = new ArrayList<String>(10);
-    private final List<String> querySubObjects = new ArrayList<String>(10);
-    private final Set queryViews = new HashSet(10);
-
-    /**
-     * Queries the mbeans registered in the specified JMX context
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void runTask(List<String> tokens) throws Exception {
-        try {
-            // Query for the mbeans to add
-            List addMBeans = JmxMBeansUtil.queryMBeans(createJmxConnection(), queryAddObjects, queryViews);
-
-            // Query for the mbeans to sub
-            if (querySubObjects.size() > 0) {
-                List subMBeans = JmxMBeansUtil.queryMBeans(createJmxConnection(), querySubObjects, queryViews);
-                addMBeans.removeAll(subMBeans);
-            }
-
-            context.printMBean(JmxMBeansUtil.filterMBeansView(addMBeans, queryViews));
-
-        } catch (Exception e) {
-            context.printException(new RuntimeException("Failed to execute query task. Reason: " + e));
-            throw new Exception(e);
-        }
-    }
-
-    /**
-     * Handle the -Q, -xQ, --objname, --xobjname, --view options.
-     * 
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-        // If token is a additive predefined query define option
-        if (token.startsWith("-Q")) {
-            String key = token.substring(2);
-            String value = "";
-            int pos = key.indexOf("=");
-            if (pos >= 0) {
-                value = key.substring(pos + 1);
-                key = key.substring(0, pos);
-            }
-
-            // If additive query
-            String predefQuery = PREDEFINED_OBJNAME_QUERY.getProperty(key);
-            if (predefQuery == null) {
-                context.printException(new IllegalArgumentException("Unknown query object type: " + key));
-                return;
-            }
-            String queryStr = JmxMBeansUtil.createQueryString(predefQuery, value);
-            StringTokenizer queryTokens = new StringTokenizer(queryStr, COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                queryAddObjects.add(queryTokens.nextToken());
-            }
-        } else if (token.startsWith("-xQ")) {
-            // If token is a substractive predefined query define option
-            String key = token.substring(3);
-            String value = "";
-            int pos = key.indexOf("=");
-            if (pos >= 0) {
-                value = key.substring(pos + 1);
-                key = key.substring(0, pos);
-            }
-
-            // If subtractive query
-            String predefQuery = PREDEFINED_OBJNAME_QUERY.getProperty(key);
-            if (predefQuery == null) {
-                context.printException(new IllegalArgumentException("Unknown query object type: " + key));
-                return;
-            }
-            String queryStr = JmxMBeansUtil.createQueryString(predefQuery, value);
-            StringTokenizer queryTokens = new StringTokenizer(queryStr, COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                querySubObjects.add(queryTokens.nextToken());
-            }
-        } else if (token.startsWith("--objname")) {
-            // If token is an additive object name query option
-
-            // If no object name query is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Object name query not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                queryAddObjects.add(queryTokens.nextToken());
-            }
-        } else if (token.startsWith("--xobjname")) {
-            // If token is a substractive object name query option
-
-            // If no object name query is specified, or next token is a new
-            // option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Object name query not specified"));
-                return;
-            }
-
-            StringTokenizer queryTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (queryTokens.hasMoreTokens()) {
-                querySubObjects.add(queryTokens.nextToken());
-            }
-        } else if (token.startsWith("--view")) {
-            // If token is a view option
-
-            // If no view specified, or next token is a new option
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("Attributes to view not specified"));
-                return;
-            }
-
-            // Add the attributes to view
-            Enumeration viewTokens = new StringTokenizer((String)tokens.remove(0), COMMAND_OPTION_DELIMETER);
-            while (viewTokens.hasMoreElements()) {
-                queryViews.add(viewTokens.nextElement());
-            }
-        } else {
-            // Let super class handle unknown option
-            super.handleOption(token, tokens);
-        }
-    }
-
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java
deleted file mode 100644
index c4a15d1..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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.console.command;
-
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.activemq.console.CommandContext;
-import org.apache.activemq.console.command.store.amq.AMQJournalToolCommand;
-import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
-
-public class ShellCommand extends AbstractCommand {
-
-    private boolean interactive;
-    private String[] helpFile;
-
-    public ShellCommand() {
-        this(false);
-    }
-
-    public ShellCommand(boolean interactive) {
-        this.interactive = interactive;
-        this.helpFile = new String[] {
-            interactive ? "Usage: [task] [task-options] [task data]" : "Usage: Main [--extdir <dir>] [task] [task-options] [task data]", 
-            "",
-            "Tasks (default task is start):",
-            "    start           - Creates and starts a broker using a configuration file, or a broker URI.",
-            "    create          - Creates a runnable broker instance in the specified path",
-            "    stop            - Stops a running broker specified by the broker name.",
-            "    list            - Lists all available brokers in the specified JMX context.",
-            "    query           - Display selected broker component's attributes and statistics.",
-            "    browse          - Display selected messages in a specified destination.",
-            "    journal-audit   - Allows you to view records stored in the persistent journal.",
-            "    purge           - Delete selected destination's messages that matches the message selector",
-            "    encrypt         - Encrypts given text",
-            "    decrypt         - Decrypts given text",
-            "",
-            "Task Options (Options specific to each task):",
-            "    --extdir <dir>  - Add the jar files in the directory to the classpath.",
-            "    --version       - Display the version information.",
-            "    -h,-?,--help    - Display this help information. To display task specific help, use " + (interactive ? "" : "Main ") + "[task] -h,-?,--help", 
-            "",
-            "Task Data:",
-            "    - Information needed by each specific task.",
-            ""
-        };
-    }
-
-    /**
-     * Main method to run a command shell client.
-     * 
-     * @param args - command line arguments
-     * @param in - input stream to use
-     * @param out - output stream to use
-     * @return 0 for a successful run, -1 if there are any exception
-     */
-    public static int main(String[] args, InputStream in, PrintStream out) {
-        
-        CommandContext context = new CommandContext();
-        context.setFormatter(new CommandShellOutputFormatter(out));
-
-        // Convert arguments to list for easier management
-        List<String> tokens = new ArrayList<String>(Arrays.asList(args));
-
-        ShellCommand main = new ShellCommand();
-        try {
-            main.setCommandContext(context);
-            main.execute(tokens);
-            return 0;
-        } catch (Exception e) {
-            context.printException(e);
-            return -1;
-        }
-    }
-
-    public boolean isInteractive() {
-        return interactive;
-    }
-
-    public void setInteractive(boolean interactive) {
-        this.interactive = interactive;
-    }
-
-    /**
-     * Parses for specific command task.
-     * 
-     * @param tokens - command arguments
-     * @throws Exception
-     */
-    protected void runTask(List<String> tokens) throws Exception {
-
-        // Process task token
-        if (tokens.size() > 0) {
-            Command command=null;
-            String taskToken = (String)tokens.remove(0);
-            if (taskToken.equals("start")) {
-                command = new StartCommand();
-            } else if (taskToken.equals("create")) {
-                command = new CreateCommand();
-            } else if (taskToken.equals("stop")) {
-                command = new ShutdownCommand();
-            } else if (taskToken.equals("list")) {
-                command = new ListCommand();
-            } else if (taskToken.equals("query")) {
-                command = new QueryCommand();
-            } else if (taskToken.equals("bstat")) {
-                command = new BstatCommand();
-            } else if (taskToken.equals("browse")) {
-                command = new AmqBrowseCommand();
-            } else if (taskToken.equals("purge")) {
-                command = new PurgeCommand();
-            } else if (taskToken.equals("journal-audit")) {
-                command = new AMQJournalToolCommand();
-            } else if (taskToken.equals("encrypt")) {
-                command = new EncryptCommand();
-            } else if (taskToken.equals("decrypt")) {
-                command = new DecryptCommand();
-            } else if (taskToken.equals("help")) {
-                printHelp();
-            } else {
-                printHelp();
-            }
-            
-            if( command!=null ) {
-                command.setCommandContext(context);
-                command.execute(tokens);
-            }
-        } else {
-            printHelp();
-        }
-
-    }
-
-	/**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShutdownCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShutdownCommand.java
deleted file mode 100644
index a88c935..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShutdownCommand.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * 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.console.command;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-import org.apache.activemq.console.util.JmxMBeansUtil;
-
-public class ShutdownCommand extends AbstractJmxCommand {
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: Main stop [stop-options] [broker-name1] [broker-name2] ...",
-        "Description: Stops a running broker.",
-        "", 
-        "Stop Options:",
-        "    --jmxurl <url>             Set the JMX URL to connect to.",
-        "    --pid <pid>                   Set the pid to connect to (only on Sun JVM).",            
-        "    --jmxuser <user>           Set the JMX user used for authenticating.",
-        "    --jmxpassword <password>   Set the JMX password used for authenticating.",
-        "    --jmxlocal                 Use the local JMX server instead of a remote one.",
-        "    --all                      Stop all brokers.",
-        "    --version                  Display the version information.",
-        "    -h,-?,--help               Display the stop broker help information.",
-        "",
-        "Broker Names:",
-        "    Name of the brokers that will be stopped.",
-        "    If omitted, it is assumed that there is only one broker running, and it will be stopped.",
-        "    Use -all to stop all running brokers.",
-        ""
-    };
-
-    private boolean isStopAllBrokers;
-
-    /**
-     * Shuts down the specified broker or brokers
-     * 
-     * @param brokerNames - names of brokers to shutdown
-     * @throws Exception
-     */
-    protected void runTask(List brokerNames) throws Exception {
-        try {
-            Collection mbeans;
-
-            // Stop all brokers
-            if (isStopAllBrokers) {
-                mbeans = JmxMBeansUtil.getAllBrokers(createJmxConnection());
-                brokerNames.clear();
-            } else if (brokerNames.isEmpty()) {
-                // Stop the default broker
-                mbeans = JmxMBeansUtil.getAllBrokers(createJmxConnection());
-
-                // If there is no broker to stop
-                if (mbeans.isEmpty()) {
-                    context.printInfo("There are no brokers to stop.");
-                    return;
-
-                    // There should only be one broker to stop
-                } else if (mbeans.size() > 1) {
-                    context.printInfo("There are multiple brokers to stop. Please select the broker(s) to stop or use --all to stop all brokers.");
-                    return;
-
-                    // Get the first broker only
-                } else {
-                    Object firstBroker = mbeans.iterator().next();
-                    mbeans.clear();
-                    mbeans.add(firstBroker);
-                }
-            } else {
-                // Stop each specified broker
-                String brokerName;
-                mbeans = new HashSet();
-                while (!brokerNames.isEmpty()) {
-                    brokerName = (String)brokerNames.remove(0);
-                    Collection matchedBrokers = JmxMBeansUtil.getBrokersByName(createJmxConnection(), brokerName);
-                    if (matchedBrokers.isEmpty()) {
-                        context.printInfo(brokerName + " did not match any running brokers.");
-                    } else {
-                        mbeans.addAll(matchedBrokers);
-                    }
-                }
-            }
-
-            // Stop all brokers in set
-            stopBrokers(createJmxConnection(), mbeans);
-        } catch (Exception e) {
-            context.printException(new RuntimeException("Failed to execute stop task. Reason: " + e));
-            throw new Exception(e);
-        }
-    }
-
-    /**
-     * Stops the list of brokers.
-     * 
-     * @param jmxConnection - connection to the mbean server
-     * @param brokerBeans - broker mbeans to stop @throws Exception
-     */
-    protected void stopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans) throws Exception {
-        ObjectName brokerObjName;
-        for (Iterator i = brokerBeans.iterator(); i.hasNext();) {
-            brokerObjName = ((ObjectInstance)i.next()).getObjectName();
-
-            String brokerName = brokerObjName.getKeyProperty("BrokerName");
-            context.print("Stopping broker: " + brokerName);
-
-            try {
-                jmxConnection.invoke(brokerObjName, "terminateJVM", new Object[] {
-                    Integer.valueOf(0)
-                }, new String[] {
-                    "int"
-                });
-                context.print("Succesfully stopped broker: " + brokerName);
-            } catch (Exception e) {
-                // TODO: Check exceptions throwned
-                // System.out.println("Failed to stop broker: [ " + brokerName +
-                // " ]. Reason: " + e.getMessage());
-            }
-        }
-
-        closeJmxConnection();
-    }
-
-    /**
-     * Handle the --all option.
-     * 
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-        // Try to handle the options first
-        if (token.equals("--all")) {
-            isStopAllBrokers = true;
-        } else {
-            // Let the super class handle the option
-            super.handleOption(token, tokens);
-        }
-    }
-
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/StartCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/StartCommand.java
deleted file mode 100644
index 9862eff..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/StartCommand.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * 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.console.command;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-
-public class StartCommand extends AbstractCommand {
-
-    public static final String DEFAULT_CONFIG_URI = "xbean:activemq.xml";
-
-    protected String[] helpFile = new String[] {
-        "Task Usage: Main start [start-options] [uri]",
-        "Description: Creates and starts a broker using a configuration file, or a broker URI.",
-        "",
-        "Start Options:",
-        "    -D<name>=<value>      Define a system property.",
-        "    --version             Display the version information.", 
-        "    -h,-?,--help          Display the start broker help information.",
-        "",
-        "URI:",
-        "",
-        "    XBean based broker configuration:",
-        "",
-        "        Example: Main xbean:file:activemq.xml",
-        "            Loads the xbean configuration file from the current working directory",
-        "        Example: Main xbean:activemq.xml",
-        "            Loads the xbean configuration file from the classpath",
-        "",
-        "    URI Parameter based broker configuration:",
-        "",
-        "        Example: Main broker:(tcp://localhost:61616, tcp://localhost:5000)?useJmx=true",
-        "            Configures the broker with 2 transport connectors and jmx enabled",
-        "        Example: Main broker:(tcp://localhost:61616, network:tcp://localhost:5000)?persistent=false",
-        "            Configures the broker with 1 transport connector, and 1 network connector and persistence disabled",
-        ""
-    };
-
-    private URI configURI;
-    private List<BrokerService> brokers = new ArrayList<BrokerService>(5);
-
-    /**
-     * The default task to start a broker or a group of brokers
-     * 
-     * @param brokerURIs
-     */
-    protected void runTask(List<String> brokerURIs) throws Exception {
-        try {
-            // If no config uri, use default setting
-            if (brokerURIs.isEmpty()) {
-                setConfigUri(new URI(DEFAULT_CONFIG_URI));
-                startBroker(getConfigUri());
-
-                // Set configuration data, if available, which in this case
-                // would be the config URI
-            } else {
-                String strConfigURI;
-
-                while (!brokerURIs.isEmpty()) {
-                    strConfigURI = (String)brokerURIs.remove(0);
-
-                    try {
-                        setConfigUri(new URI(strConfigURI));
-                    } catch (URISyntaxException e) {
-                        context.printException(e);
-                        return;
-                    }
-
-                    startBroker(getConfigUri());
-                }
-            }
-
-            // Prevent the main thread from exiting unless it is terminated
-            // elsewhere
-        } catch (Exception e) {
-            context.printException(new RuntimeException("Failed to execute start task. Reason: " + e, e));
-            throw new Exception(e);
-        }
-        
-        // The broker start up fine.  If this unblocks it's cause they were stopped
-        // and this would occur because of an internal error (like the DB going offline)
-        waitForShutdown();
-    }
-
-    /**
-     * Create and run a broker specified by the given configuration URI
-     * 
-     * @param configURI
-     * @throws Exception
-     */
-    public void startBroker(URI configURI) throws Exception {
-        System.out.println("Loading message broker from: " + configURI);
-        BrokerService broker = BrokerFactory.createBroker(configURI);
-        brokers.add(broker);
-        broker.start();
-    }
-
-    /**
-     * Wait for a shutdown invocation elsewhere
-     * 
-     * @throws Exception
-     */
-    protected void waitForShutdown() throws Exception {
-        final boolean[] shutdown = new boolean[] {
-            false
-        };
-        
-        Runtime.getRuntime().addShutdownHook(new Thread() {
-            public void run() {
-                for (Iterator<BrokerService> i = brokers.iterator(); i.hasNext();) {
-                    try {
-                        BrokerService broker = i.next();
-                        broker.stop();
-                    } catch (Exception e) {
-                    }
-                }
-            }
-        });
-        
-        final AtomicInteger brokerCounter = new AtomicInteger(brokers.size());
-        for (BrokerService bs : brokers) {
-            bs.addShutdownHook(new Runnable() {
-                public void run() {
-                    // When the last broker lets us know he is closed....
-                    if( brokerCounter.decrementAndGet() == 0 ) {
-                        synchronized (shutdown) {
-                            shutdown[0] = true;
-                            shutdown.notify();
-                        }
-                    }
-                }
-            });
-        }
-
-        // Wait for any shutdown event
-        synchronized (shutdown) {
-            while (!shutdown[0]) {
-                try {
-                    shutdown.wait();
-                } catch (InterruptedException e) {
-                }
-            }
-        }
-
-    }
-
-    /**
-     * Sets the current configuration URI used by the start task
-     * 
-     * @param uri
-     */
-    public void setConfigUri(URI uri) {
-        configURI = uri;
-    }
-
-    /**
-     * Gets the current configuration URI used by the start task
-     * 
-     * @return current configuration URI
-     */
-    public URI getConfigUri() {
-        return configURI;
-    }
-
-    /**
-     * Print the help messages for the browse command
-     */
-    protected void printHelp() {
-        context.printHelp(helpFile);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/StopGracefullyCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/StopGracefullyCommand.java
deleted file mode 100644
index 75de2fd..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/StopGracefullyCommand.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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.console.command;
-
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-
-/**
- * A StopGracefullyCommand
- *
- */
-public class StopGracefullyCommand extends ShutdownCommand {
-    
-        protected String connectorName, queueName;
-        protected long timeout;
-        protected long pollInterval;
-        /**
-         * Constructor
-         */
-        public StopGracefullyCommand(){
-            super();
-            this.helpFile = new String[] {
-                "Task Usage: Main stopGracefully [stop-options] [broker-name1] [broker-name2] ...",
-                "Description: Stops a running broker if there is no pending messages in the queues. It first stops the connector for client connection, then check queuesize until it becomes 0 before stop the broker.",
-                "", 
-                "Stop Options:",
-                "    --connectorName <connectorName> connectorName to stop",
-                "    --queueName <queueName>         check the queuesize of the queueName for pending message",
-                "    --timeout <timeout>             periodically check the queuesize before the timeout expires",
-                "    --pollInterval <pollInterval>   the time interval it checks the queuesize",
-                "    --jmxurl <url>             Set the JMX URL to connect to.",
-                "    --jmxuser <user>           Set the JMX user used for authenticating.",
-                "    --jmxpassword <password>   Set the JMX password used for authenticating.",
-                "    --jmxlocal                 Use the local JMX server instead of a remote one.",
-                "    --localProcessId           Use the local process id to connect( ignore jmxurl, jmxuser, jmxpassword), need to be root to use this option",
-                "    --all                      Stop all brokers.",
-                "    --version                  Display the version information.",
-                "    -h,-?,--help               Display the stop broker help information.",
-                "",
-                "Broker Names:",
-                "    Name of the brokers that will be stopped.",
-                "    If omitted, it is assumed that there is only one broker running, and it will be stopped.",
-                "    Use -all to stop all running brokers.",
-                ""
-            };
-        }
-
-        /**
-         * Stops the list of brokers.
-         * 
-         * @param jmxConnection - connection to the mbean server
-         * @param brokerBeans - broker mbeans to stop @throws Exception
-         */
-        protected void stopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans) throws Exception {
-            ObjectName brokerObjName;
-            for (Iterator i = brokerBeans.iterator(); i.hasNext();) {
-                brokerObjName = ((ObjectInstance)i.next()).getObjectName();
-
-                String brokerName = brokerObjName.getKeyProperty("BrokerName");
-                context.print("Stopping broker: " + brokerName);
-
-                try {
-                    jmxConnection.invoke(brokerObjName, "stopGracefully", new Object[] {
-                       connectorName, queueName, timeout, pollInterval
-                    }, new String[] {
-                        "java.lang.String", "java.lang.String", "long", "long"
-                    });
-                    context.print("Succesfully stopped broker: " + brokerName);
-                } catch (Exception e) {
-                    if(!(e.getMessage().startsWith("Error unmarshaling return header"))){
-                        context.print("Exception:"+e.getMessage());
-                    }
-                }
-            }
-
-            closeJmxConnection();
-        }
-    /**
-     * @param token - option token to handle
-     * @param tokens - succeeding command arguments
-     * @throws Exception
-     */
-    protected void handleOption(String token, List<String> tokens) throws Exception {
-        // Try to handle the options first
-        if (token.equals("--connectorName")) {
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("connectorName not specified"));
-                return;
-            }
-
-            connectorName=(String)tokens.remove(0);
-        } else if (token.equals("--timeout")) {
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("timeout not specified"));
-                return;
-            }
-            timeout=Long.parseLong(tokens.remove(0));
-        } else if (token.equals("--pollInterval")) {
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("pollInterval not specified"));
-                return;
-            }
-            pollInterval=Long.parseLong(tokens.remove(0));
-        }else if(token.equals("--queueName")) {
-            if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
-                context.printException(new IllegalArgumentException("queueName not specified"));
-                return;
-            }
-            queueName=(String)tokens.remove(0);
-        }else {
-            // Let the super class handle the option
-            super.handleOption(token, tokens);
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/AMQJournalTool.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/AMQJournalTool.java
deleted file mode 100644
index 8d8bb09..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/AMQJournalTool.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * 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.console.command.store.amq;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Scanner;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.kaha.impl.async.ReadOnlyAsyncDataManager;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.Velocity;
-import org.apache.velocity.app.VelocityEngine;
-import org.josql.Query;
-
-/**
- * Allows you to view the contents of a Journal.
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-public class AMQJournalTool {
-
-	private final ArrayList<File> dirs = new ArrayList<File>();
-	private final WireFormat wireFormat = new OpenWireFormat();
-	private final HashMap<String, String> resources = new HashMap<String, String>();
-
-	private String messageFormat = "${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageId}|${record.properties}|${body}";
-	private String topicAckFormat = "${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.clientId}|${record.subscritionName}|${record.messageId}";
-	private String queueAckFormat = "${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageAck.lastMessageId}";
-	private String transactionFormat = "${location.dataFileId},${location.offset}|${type}|${record.transactionId}";
-	private String traceFormat = "${location.dataFileId},${location.offset}|${type}|${record.message}";
-	private String unknownFormat = "${location.dataFileId},${location.offset}|${type}|${record.class.name}";
-	private String where;
-	private VelocityContext context;
-	private VelocityEngine velocity;
-	private boolean help;
-
-	public static void main(String[] args) throws Exception {
-		AMQJournalTool consumerTool = new AMQJournalTool();
-		String[] directories = CommandLineSupport
-				.setOptions(consumerTool, args);
-		if (directories.length < 1) {
-			System.out
-					.println("Please specify the directories with journal data to scan");
-			return;
-		}
-		for (int i = 0; i < directories.length; i++) {
-			consumerTool.getDirs().add(new File(directories[i]));
-		}
-		consumerTool.execute();
-	}
-
-	public void execute() throws Exception {
-
-		if( help ) {
-			showHelp();
-			return;
-		}
-		
-		if (getDirs().size() < 1) {
-			System.out.println("");
-			System.out.println("Invalid Usage: Please specify the directories with journal data to scan");
-			System.out.println("");
-			showHelp();
-			return;
-		}
-
-		for (File dir : getDirs()) {
-			if( !dir.exists() ) {
-				System.out.println("");
-				System.out.println("Invalid Usage: the directory '"+dir.getPath()+"' does not exist");
-				System.out.println("");
-				showHelp();
-				return;
-			}
-			if( !dir.isDirectory() ) {
-				System.out.println("");
-				System.out.println("Invalid Usage: the argument '"+dir.getPath()+"' is not a directory");
-				System.out.println("");
-				showHelp();
-				return;
-			}
-		}
-		
-		
-		context = new VelocityContext();
-		List keys = Arrays.asList(context.getKeys());
-
-		for (Iterator iterator = System.getProperties().entrySet()
-				.iterator(); iterator.hasNext();) {
-			Map.Entry kv = (Map.Entry) iterator.next();
-			String name = (String) kv.getKey();
-			String value = (String) kv.getValue();
-
-			if (!keys.contains(name)) {
-				context.put(name, value);
-			}
-		}
-		
-		velocity = new VelocityEngine();
-		velocity.setProperty(Velocity.RESOURCE_LOADER, "all");
-		velocity.setProperty("all.resource.loader.class", CustomResourceLoader.class.getName());
-		velocity.init();
-
-
-		resources.put("message", messageFormat);
-		resources.put("topicAck", topicAckFormat);
-		resources.put("queueAck", queueAckFormat);
-		resources.put("transaction", transactionFormat);
-		resources.put("trace", traceFormat);
-		resources.put("unknown", unknownFormat);
-
-		Query query = null;
-		if (where != null) {
-			query = new Query();
-			query.parse("select * from "+Entry.class.getName()+" where "+where);
-
-		}
-
-		ReadOnlyAsyncDataManager manager = new ReadOnlyAsyncDataManager(getDirs());
-		manager.start();
-		try {
-			Location curr = manager.getFirstLocation();
-			while (curr != null) {
-
-				ByteSequence data = manager.read(curr);
-				DataStructure c = (DataStructure) wireFormat.unmarshal(data);
-
-				Entry entry = new Entry();
-				entry.setLocation(curr);
-				entry.setRecord(c);
-				entry.setData(data);
-				entry.setQuery(query);
-				process(entry);
-
-				curr = manager.getNextLocation(curr);
-			}
-		} finally {
-			manager.close();
-		}
-	}
-
-	private void showHelp() {
-		InputStream is = AMQJournalTool.class.getResourceAsStream("help.txt");
-		Scanner scanner = new Scanner(is);
-		while (scanner.hasNextLine()) {
-			String line = scanner.nextLine();
-			System.out.println(line);
-		}
-		scanner.close();	}
-
-	private void process(Entry entry) throws Exception {
-
-		Location location = entry.getLocation();
-		DataStructure record = entry.getRecord();
-
-		switch (record.getDataStructureType()) {
-		case ActiveMQMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQBytesMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQBytesMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQBlobMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQBlobMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQMapMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQMapMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQObjectMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQObjectMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQStreamMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQStreamMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQTextMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQTextMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case JournalQueueAck.DATA_STRUCTURE_TYPE:
-			entry.setType("Queue Ack");
-			entry.setFormater("queueAck");
-			display(entry);
-			break;
-		case JournalTopicAck.DATA_STRUCTURE_TYPE:
-			entry.setType("Topic Ack");
-			entry.setFormater("topicAck");
-			display(entry);
-			break;
-		case JournalTransaction.DATA_STRUCTURE_TYPE:
-			entry.setType(getType((JournalTransaction) record));
-			entry.setFormater("transaction");
-			display(entry);
-			break;
-		case JournalTrace.DATA_STRUCTURE_TYPE:
-			entry.setType("Trace");
-			entry.setFormater("trace");
-			display(entry);
-			break;
-		default:
-			entry.setType("Unknown");
-			entry.setFormater("unknown");
-			display(entry);
-			break;
-		}
-	}
-
-	private String getType(JournalTransaction record) {
-		switch (record.getType()) {
-		case JournalTransaction.XA_PREPARE:
-			return "XA Prepare";
-		case JournalTransaction.XA_COMMIT:
-			return "XA Commit";
-		case JournalTransaction.XA_ROLLBACK:
-			return "XA Rollback";
-		case JournalTransaction.LOCAL_COMMIT:
-			return "Commit";
-		case JournalTransaction.LOCAL_ROLLBACK:
-			return "Rollback";
-		}
-		return "Unknown Transaction";
-	}
-
-	private void display(Entry entry) throws Exception {
-
-		if (entry.getQuery() != null) {
-			List list = Collections.singletonList(entry);
-			List results = entry.getQuery().execute(list).getResults();
-			if (results.isEmpty()) {
-				return;
-			}
-		}
-
-		CustomResourceLoader.setResources(resources);
-		try {
-
-			context.put("location", entry.getLocation());
-			context.put("record", entry.getRecord());
-			context.put("type", entry.getType());
-			if (entry.getRecord() instanceof ActiveMQMessage) {
-				context.put("body", new MessageBodyFormatter(
-						(ActiveMQMessage) entry.getRecord()));
-			}
-
-			Template template = velocity.getTemplate(entry.getFormater());
-			PrintWriter writer = new PrintWriter(System.out);
-			template.merge(context, writer);
-			writer.println();
-			writer.flush();
-		} finally {
-			CustomResourceLoader.setResources(null);
-		}
-	}
-
-	public void setMessageFormat(String messageFormat) {
-		this.messageFormat = messageFormat;
-	}
-
-	public void setTopicAckFormat(String ackFormat) {
-		this.topicAckFormat = ackFormat;
-	}
-
-	public void setTransactionFormat(String transactionFormat) {
-		this.transactionFormat = transactionFormat;
-	}
-
-	public void setTraceFormat(String traceFormat) {
-		this.traceFormat = traceFormat;
-	}
-
-	public void setUnknownFormat(String unknownFormat) {
-		this.unknownFormat = unknownFormat;
-	}
-
-	public void setQueueAckFormat(String queueAckFormat) {
-		this.queueAckFormat = queueAckFormat;
-	}
-
-	public String getQuery() {
-		return where;
-	}
-
-	public void setWhere(String query) {
-		this.where = query;
-	}
-
-	public boolean isHelp() {
-		return help;
-	}
-
-	public void setHelp(boolean help) {
-		this.help = help;
-	}
-
-	/**
-	 * @return the dirs
-	 */
-	public ArrayList<File> getDirs() {
-		return dirs;
-	}
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/AMQJournalToolCommand.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/AMQJournalToolCommand.java
deleted file mode 100644
index c522cb4..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/AMQJournalToolCommand.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.console.command.store.amq;
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.activemq.console.CommandContext;
-import org.apache.activemq.console.command.Command;
-
-public class AMQJournalToolCommand implements Command {
-
-	private CommandContext context;
-
-	public void execute(List<String> tokens) throws Exception {
-		AMQJournalTool consumerTool = new AMQJournalTool();
-		String args[] = new String[tokens.size()];
-		tokens.toArray(args);
-		String[] directories = CommandLineSupport.setOptions(consumerTool, args);
-		for (int i = 0; i < directories.length; i++) {
-			consumerTool.getDirs().add(new File(directories[i]));
-		}
-		consumerTool.execute();		
-	}
-
-	public void setCommandContext(CommandContext context) {
-		this.context = context;		
-	}
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/CommandLineSupport.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/CommandLineSupport.java
deleted file mode 100644
index 4844945..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/CommandLineSupport.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.console.command.store.amq;
-
-import java.util.ArrayList;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * Helper utility that can be used to set the properties on any object using
- * command line arguments.
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-public final class CommandLineSupport {
-
-    private CommandLineSupport() {
-    }
-    
-    /**
-     * Sets the properties of an object given the command line args.
-     * 
-     * if args contains: --ack-mode=AUTO --url=tcp://localhost:61616 --persistent 
-     * 
-     * then it will try to call the following setters on the target object.
-     * 
-     * target.setAckMode("AUTO");
-     * target.setURL(new URI("tcp://localhost:61616") );
-     * target.setPersistent(true);
-     * 
-     * Notice the the proper conversion for the argument is determined by examining the 
-     * setter arguement type.  
-     * 
-     * @param target the object that will have it's properties set
-     * @param args the commline options
-     * @return any arguments that are not valid options for the target
-     */
-    public static String[] setOptions(Object target, String[] args) {
-        ArrayList<String> rc = new ArrayList<String>();
-
-        for (int i = 0; i < args.length; i++) {
-            if (args[i] == null) {
-                continue;
-            }
-
-            if (args[i].startsWith("--")) {
-
-                // --options without a specified value are considered boolean
-                // flags that are enabled.
-                String value = "true";
-                String name = args[i].substring(2);
-
-                // if --option=value case
-                int p = name.indexOf("=");
-                if (p > 0) {
-                    value = name.substring(p + 1);
-                    name = name.substring(0, p);
-                }
-
-                // name not set, then it's an unrecognized option
-                if (name.length() == 0) {
-                    rc.add(args[i]);
-                    continue;
-                }
-
-                String propName = convertOptionToPropertyName(name);
-                if (!IntrospectionSupport.setProperty(target, propName, value)) {
-                    rc.add(args[i]);
-                    continue;
-                }
-            } else {
-                rc.add(args[i]);
-            }
-
-        }
-
-        String r[] = new String[rc.size()];
-        rc.toArray(r);
-        return r;
-    }
-
-    /**
-     * converts strings like: test-enabled to testEnabled
-     * 
-     * @param name
-     * @return
-     */
-    private static String convertOptionToPropertyName(String name) {
-        String rc = "";
-
-        // Look for '-' and strip and then convert the subsequent char to
-        // uppercase
-        int p = name.indexOf("-");
-        while (p > 0) {
-            // strip
-            rc += name.substring(0, p);
-            name = name.substring(p + 1);
-
-            // can I convert the next char to upper?
-            if (name.length() > 0) {
-                rc += name.substring(0, 1).toUpperCase();
-                name = name.substring(1);
-            }
-
-            p = name.indexOf("-");
-        }
-        return rc + name;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/CustomResourceLoader.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/CustomResourceLoader.java
deleted file mode 100644
index 87cb39d..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/CustomResourceLoader.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.console.command.store.amq;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.HashMap;
-
-import org.apache.commons.collections.ExtendedProperties;
-import org.apache.velocity.exception.ResourceNotFoundException;
-import org.apache.velocity.runtime.RuntimeServices;
-import org.apache.velocity.runtime.resource.Resource;
-import org.apache.velocity.runtime.resource.loader.FileResourceLoader;
-import org.apache.velocity.runtime.resource.loader.ResourceLoader;
-
-public class CustomResourceLoader extends ResourceLoader {
-	
-	private final static ThreadLocal<HashMap<String, String>> resourcesTL = new ThreadLocal<HashMap<String, String>>();
-	private final FileResourceLoader fileResourceLoader = new FileResourceLoader();
-	
-	@Override
-	public void commonInit(RuntimeServices rs, ExtendedProperties configuration) {
-		super.commonInit(rs, configuration);
-		fileResourceLoader.commonInit(rs, configuration);
-	}
-	
-    public void init( ExtendedProperties configuration)
-    {
-    	fileResourceLoader.init(configuration);
-    }
-    
-    /**
-     */
-    public synchronized InputStream getResourceStream( String name )
-        throws ResourceNotFoundException
-    {
-        InputStream result = null;
-        
-        if (name == null || name.length() == 0)
-        {
-            throw new ResourceNotFoundException ("No template name provided");
-        }
-        
-        String value = null;
-        HashMap<String, String> resources = resourcesTL.get();
-        if( resources!=null ) {
-        	value = resources.get(name);
-        }
-        
-    	if( value == null ) {
-    		result = this.fileResourceLoader.getResourceStream(name);
-    	} else {
-            try 
-            {
-            	result = new ByteArrayInputStream(value.getBytes());
-            }
-            catch( Exception e )
-            {
-                throw new ResourceNotFoundException( e.getMessage() );
-            }
-    	}
-        return result;
-    }
-    
-    public boolean isSourceModified(Resource resource)
-    {
-        return false;
-    }
-
-    public long getLastModified(Resource resource)
-    {
-        return 0;
-    }
-
-	static public HashMap<String, String> getResources() {
-		return resourcesTL.get();
-	}
-
-	static public void setResources(HashMap<String, String> arg0) {
-		resourcesTL.set(arg0);
-	}
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/Entry.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/Entry.java
deleted file mode 100644
index 854a764..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/Entry.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.console.command.store.amq;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.util.ByteSequence;
-import org.josql.Query;
-
-public class Entry {
-	
-	Location location;
-	DataStructure record;
-	private ByteSequence data;
-	private String type;
-	private String formater;
-	private Query query;
-	
-	public Location getLocation() {
-		return location;
-	}
-	public void setLocation(Location location) {
-		this.location = location;
-	}
-	public DataStructure getRecord() {
-		return record;
-	}
-	public void setRecord(DataStructure record) {
-		this.record = record;
-	}
-	public void setData(ByteSequence data) {
-		this.data = data;
-	}
-	public void setType(String type) {
-		this.type = type;
-	}
-	public ByteSequence getData() {
-		return data;
-	}
-	public String getType() {
-		return type;
-	}
-	public void setFormater(String formater) {
-		this.formater = formater;
-	}
-	public String getFormater() {
-		return formater;
-	}
-	public void setQuery(Query query) {
-		this.query = query;
-	}
-	public Query getQuery() {
-		return query;
-	}
-	
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/MessageBodyFormatter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/MessageBodyFormatter.java
deleted file mode 100644
index 386568c..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/MessageBodyFormatter.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.console.command.store.amq;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.util.ByteSequence;
-
-public class MessageBodyFormatter {
-	final ActiveMQMessage message;
-	
-	public MessageBodyFormatter(ActiveMQMessage message) {
-		this.message=message;
-	}
-
-	@Override
-	public String toString() {
-		try {
-			switch (message.getDataStructureType()) {
-			case ActiveMQMessage.DATA_STRUCTURE_TYPE:
-				return "";
-			case ActiveMQBlobMessage.DATA_STRUCTURE_TYPE:
-				ActiveMQBlobMessage blob = (ActiveMQBlobMessage) message;
-				return blob.getRemoteBlobUrl();
-			case ActiveMQMapMessage.DATA_STRUCTURE_TYPE:
-				ActiveMQMapMessage map = (ActiveMQMapMessage)message;
-				return map.getContentMap().toString();			
-			case ActiveMQTextMessage.DATA_STRUCTURE_TYPE:
-				ActiveMQTextMessage text = (ActiveMQTextMessage)message;
-				return text.getText();
-			case ActiveMQBytesMessage.DATA_STRUCTURE_TYPE:
-			case ActiveMQObjectMessage.DATA_STRUCTURE_TYPE:
-			case ActiveMQStreamMessage.DATA_STRUCTURE_TYPE:
-				ByteSequence data = message.getContent();
-				return "binary payload {length="+data.getLength()+", compressed="+message.isCompressed()+"}";
-			}
-		} catch (JMSException e) {
-		}
-		return "";
-	}
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/AMQIterator.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/AMQIterator.java
deleted file mode 100644
index 150e469..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/AMQIterator.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.console.command.store.amq.reader;
-
-import java.util.Iterator;
-import javax.jms.InvalidSelectorException;
-import javax.jms.Message;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.selector.SelectorParser;
-
-/**
- * An Iterator for the AMQReader
- *
- */
-class AMQIterator  implements Iterator<Message>{
-    private AMQReader reader;
-    private BooleanExpression expression;
-    private MessageLocation currentLocation;
-    private MessageLocation nextLocation;
-    private boolean valid=true;
-    
-        
-    AMQIterator(AMQReader reader, BooleanExpression expression){
-        this.reader=reader;
-        this.expression=expression;
-    } 
-    
-    public boolean hasNext() {
-        try {
-            this.nextLocation = reader.getNextMessage(currentLocation);
-            Message next = nextLocation != null ? nextLocation.getMessage()
-                    : null;
-            if (expression == null) {
-                return next != null;
-            } else {
-                while (next != null) {
-                    MessageEvaluationContext context = new MessageEvaluationContext();
-                    context.setMessageReference((MessageReference) next);
-                    if (expression.matches(context)) {
-                        return true;
-                    }
-                    this.nextLocation = reader.getNextMessage(currentLocation);
-                    next = nextLocation != null ? nextLocation.getMessage()
-                            : null;
-                }
-                valid=false;
-                return false;
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(
-                    "Failed to get next message from reader ", e);
-        }
-    }
-
-   
-    public Message next() {
-        if (valid && (nextLocation != null || hasNext())) {
-            this.currentLocation=nextLocation;
-            return nextLocation.getMessage();
-        }
-        return null;
-    }
-
-   
-    public void remove() {
-        throw new IllegalStateException("Not supported");
-        
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/AMQReader.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/AMQReader.java
deleted file mode 100644
index 75add31..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/AMQReader.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * 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.console.command.store.amq.reader;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.jms.InvalidSelectorException;
-import javax.jms.Message;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.kaha.impl.async.AsyncDataManager;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Reads and iterates through data log files for the AMQMessage Store
- * 
- */
-public class AMQReader implements Iterable<Message> {
-
-    private AsyncDataManager dataManager;
-    private WireFormat wireFormat = new OpenWireFormat();
-    private File file;
-    private BooleanExpression expression;
-
-    /**
-     * List all the data files in a directory
-     * @param directory
-     * @return
-     * @throws IOException
-     */
-    public static Set<File> listDataFiles(File directory) throws IOException{
-        Set<File>result = new HashSet<File>();
-        if (directory == null || !directory.exists() || !directory.isDirectory()) {
-            throw new IOException("Invalid Directory " + directory);
-        }
-        AsyncDataManager dataManager = new AsyncDataManager();
-        dataManager.setDirectory(directory);
-        dataManager.start();
-        Set<File> set = dataManager.getFiles();
-        if (set != null) {
-            result.addAll(set);
-        }
-        dataManager.close();
-        return result;
-    }
-    /**
-     * Create the AMQReader to read a directory of amq data logs - or an
-     * individual data log file
-     * 
-     * @param file the directory - or file
-     * @throws IOException 
-     * @throws InvalidSelectorException 
-     * @throws IOException
-     * @throws InvalidSelectorException 
-     */
-    public AMQReader(File file) throws InvalidSelectorException, IOException {
-        this(file,null);
-    }
-    
-    /**
-     * Create the AMQReader to read a directory of amq data logs - or an
-     * individual data log file
-     * 
-     * @param file the directory - or file
-     * @param selector the JMS selector or null to select all
-     * @throws IOException
-     * @throws InvalidSelectorException 
-     */
-    public AMQReader(File file, String selector) throws IOException, InvalidSelectorException {
-        String str = selector != null ? selector.trim() : null;
-        if (str != null && str.length() > 0) {
-            this.expression=SelectorParser.parse(str);
-        }
-        dataManager = new AsyncDataManager();
-        dataManager.setArchiveDataLogs(false);
-        if (file.isDirectory()) {
-            dataManager.setDirectory(file);
-        } else {
-            dataManager.setDirectory(file.getParentFile());
-            dataManager.setDirectoryArchive(file);
-            this.file = file;
-        }
-        dataManager.start();
-    }
-
-    public Iterator<Message> iterator() {
-        return new AMQIterator(this,this.expression);
-    }
-
-    
-    protected MessageLocation getNextMessage(MessageLocation lastLocation)
-            throws IllegalStateException, IOException {
-        if (this.file != null) {
-            return getInternalNextMessage(this.file, lastLocation);
-        }
-        return getInternalNextMessage(lastLocation);
-    }
-
-    private MessageLocation getInternalNextMessage(MessageLocation lastLocation)
-            throws IllegalStateException, IOException {
-        return getInternalNextMessage(null, lastLocation);
-    }
-
-    private MessageLocation getInternalNextMessage(File file,
-            MessageLocation lastLocation) throws IllegalStateException,
-            IOException {
-        MessageLocation result = lastLocation;
-        if (result != null) {
-            result.setMessage(null);
-        }
-        Message message = null;
-        Location pos = lastLocation != null ? lastLocation.getLocation() : null;
-        while ((pos = getNextLocation(file, pos)) != null) {
-            message = getMessage(pos);
-            if (message != null) {
-                if (result == null) {
-                    result = new MessageLocation();
-                }
-                result.setMessage(message);
-                break;
-            }
-        }
-        result.setLocation(pos);
-        if (pos == null && message == null) {
-            result = null;
-        } else {
-            result.setLocation(pos);
-        }
-        return result;
-    }
-
-    private Location getNextLocation(File file, Location last)
-            throws IllegalStateException, IOException {
-        if (file != null) {
-            return dataManager.getNextLocation(file, last, true);
-        }
-        return dataManager.getNextLocation(last);
-    }
-
-    private Message getMessage(Location location) throws IOException {
-        ByteSequence data = dataManager.read(location);
-        DataStructure c = (DataStructure) wireFormat.unmarshal(data);
-        if (c instanceof Message) {
-            return (Message) c;
-        }
-        return null;
-
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/MessageLocation.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/MessageLocation.java
deleted file mode 100644
index 7caf504..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/store/amq/reader/MessageLocation.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.console.command.store.amq.reader;
-
-import javax.jms.Message;
-
-import org.apache.activemq.kaha.impl.async.Location;
-
-/**
- * A holder for a message
- *
- */
-class MessageLocation {
-    private Message message;
-    private Location location;
-
-    
-    /**
-     * @return the location
-     */
-    public Location getLocation() {
-        return location;
-    }
-
-    /**
-     * @param location
-     */
-    public void setLocation(Location location) {
-        this.location = location;
-    }
-    /**
-     * @return the message
-     */
-    public Message getMessage() {
-        return message;
-    }
-
-    /**
-     * @param message
-     */
-    public void setMessage(Message message) {
-        this.message = message;
-    }
-
-    
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AbstractQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AbstractQueryFilter.java
deleted file mode 100644
index fc989d5..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AbstractQueryFilter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.StringTokenizer;
-
-public abstract class AbstractQueryFilter implements QueryFilter {
-    protected QueryFilter next;
-
-    /**
-     * Creates a query filter, with the next filter specified by next.
-     * @param next - the next query filter
-     */
-    protected AbstractQueryFilter(QueryFilter next) {
-        this.next = next;
-    }
-
-    /**
-     * Performs a query given the query string
-     * @param query - query string
-     * @return objects that matches the query
-     * @throws Exception
-     */
-    public List query(String query) throws Exception {
-        // Converts string query to map query
-        StringTokenizer tokens = new StringTokenizer(query, QUERY_DELIMETER);
-        return query(Collections.list(tokens));
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AmqMessagesQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AmqMessagesQueryFilter.java
deleted file mode 100644
index ebf3f4e..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AmqMessagesQueryFilter.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-public class AmqMessagesQueryFilter extends AbstractQueryFilter {
-
-    private URI brokerUrl;
-    private Destination destination;
-
-    /**
-     * Create a JMS message query filter
-     * 
-     * @param brokerUrl - broker url to connect to
-     * @param destination - JMS destination to query
-     */
-    public AmqMessagesQueryFilter(URI brokerUrl, Destination destination) {
-        super(null);
-        this.brokerUrl = brokerUrl;
-        this.destination = destination;
-    }
-
-    /**
-     * Queries the specified destination using the message selector format query
-     * 
-     * @param queries - message selector queries
-     * @return list messages that matches the selector
-     * @throws Exception
-     */
-    public List query(List queries) throws Exception {
-        String selector = "";
-
-        // Convert to message selector
-        for (Iterator i = queries.iterator(); i.hasNext();) {
-            selector = selector + "(" + i.next().toString() + ") AND ";
-        }
-
-        // Remove last AND
-        if (!selector.equals("")) {
-            selector = selector.substring(0, selector.length() - 5);
-        }
-
-        if (destination instanceof ActiveMQQueue) {
-            return queryMessages((ActiveMQQueue)destination, selector);
-        } else {
-            return queryMessages((ActiveMQTopic)destination, selector);
-        }
-    }
-
-    /**
-     * Query the messages of a queue destination using a queue browser
-     * 
-     * @param queue - queue destination
-     * @param selector - message selector
-     * @return list of messages that matches the selector
-     * @throws Exception
-     */
-    protected List queryMessages(ActiveMQQueue queue, String selector) throws Exception {
-        Connection conn = createConnection(getBrokerUrl());
-
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        QueueBrowser browser = sess.createBrowser(queue, selector);
-
-        List messages = Collections.list(browser.getEnumeration());
-
-        conn.close();
-
-        return messages;
-    }
-
-    /**
-     * Query the messages of a topic destination using a message consumer
-     * 
-     * @param topic - topic destination
-     * @param selector - message selector
-     * @return list of messages that matches the selector
-     * @throws Exception
-     */
-    protected List queryMessages(ActiveMQTopic topic, String selector) throws Exception {
-        // TODO: should we use a durable subscriber or a retroactive non-durable
-        // subscriber?
-        // TODO: if a durable subscriber is used, how do we manage it?
-        // subscribe/unsubscribe tasks?
-        return null;
-    }
-
-    /**
-     * Create and start a JMS connection
-     * 
-     * @param brokerUrl - broker url to connect to.
-     * @return JMS connection
-     * @throws JMSException
-     */
-    protected Connection createConnection(URI brokerUrl) throws JMSException {
-        Connection conn = (new ActiveMQConnectionFactory(brokerUrl)).createConnection();
-        conn.start();
-        return conn;
-    }
-
-    /**
-     * Get the broker url being used.
-     * 
-     * @return broker url
-     */
-    public URI getBrokerUrl() {
-        return brokerUrl;
-    }
-
-    /**
-     * Set the broker url to use.
-     * 
-     * @param brokerUrl - broker url
-     */
-    public void setBrokerUrl(URI brokerUrl) {
-        this.brokerUrl = brokerUrl;
-    }
-
-    /**
-     * Get the destination being used.
-     * 
-     * @return - JMS destination
-     */
-    public Destination getDestination() {
-        return destination;
-    }
-
-    /**
-     * Set the destination to use.
-     * 
-     * @param destination - JMS destination
-     */
-    public void setDestination(Destination destination) {
-        this.destination = destination;
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/GroupPropertiesViewFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/GroupPropertiesViewFilter.java
deleted file mode 100644
index adf8a89..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/GroupPropertiesViewFilter.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-public class GroupPropertiesViewFilter extends PropertiesViewFilter {
-
-    /**
-     * Creates a group properties filter that is able to filter the display
-     * result based on a group prefix
-     * 
-     * @param next - the next query filter
-     */
-    public GroupPropertiesViewFilter(QueryFilter next) {
-        super(next);
-    }
-
-    /**
-     * Creates a group properties filter that is able to filter the display
-     * result based on a group prefix
-     * 
-     * @param groupView - the group filter to use
-     * @param next - the next query filter
-     */
-    public GroupPropertiesViewFilter(Set groupView, QueryFilter next) {
-        super(groupView, next);
-    }
-
-    /**
-     * Filter the properties that matches the group prefix only.
-     * 
-     * @param data - map data to filter
-     * @return - filtered map data
-     */
-    protected Map filterView(Map data) {
-        // If no view specified, display all attributes
-        if (viewFilter == null || viewFilter.isEmpty()) {
-            return data;
-        }
-
-        Map newData;
-        try {
-            // Lets try to use the same class as the original
-            newData = data.getClass().newInstance();
-        } catch (Exception e) {
-            // Lets use a default HashMap
-            newData = new HashMap();
-        }
-
-        // Filter the keys to view
-        for (Iterator<String> i = data.keySet().iterator(); i.hasNext();) {
-            String key = i.next();
-
-            // Checks if key matches any of the group filter
-            for (Iterator j = viewFilter.iterator(); j.hasNext();) {
-                String group = (String)j.next();
-                if (key.startsWith(group)) {
-                    newData.put(key, data.get(key));
-                    break;
-                }
-            }
-        }
-
-        return newData;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansAttributeQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansAttributeQueryFilter.java
deleted file mode 100644
index 2f01f79..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansAttributeQueryFilter.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.InstanceNotFoundException;
-import javax.management.IntrospectionException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-public class MBeansAttributeQueryFilter extends AbstractQueryFilter {
-    public static final String KEY_OBJECT_NAME_ATTRIBUTE = "Attribute:ObjectName:";
-
-    private MBeanServerConnection jmxConnection;
-    private Set attribView;
-
-    /**
-     * Create an mbean attributes query filter that is able to select specific
-     * mbean attributes based on the object name to get.
-     * 
-     * @param jmxConnection - JMX connection to use.
-     * @param attribView - the attributes to extract
-     * @param next - the next query filter
-     */
-    public MBeansAttributeQueryFilter(MBeanServerConnection jmxConnection, Set attribView, MBeansObjectNameQueryFilter next) {
-        super(next);
-        this.jmxConnection = jmxConnection;
-        this.attribView = attribView;
-    }
-
-    /**
-     * Filter the query by retrieving the attributes specified, this will modify
-     * the collection to a list of AttributeList
-     * 
-     * @param queries - query list
-     * @return List of AttributeList, which includes the ObjectName, which has a
-     *         key of MBeansAttributeQueryFilter.KEY_OBJECT_NAME_ATTRIBUTE
-     * @throws Exception
-     */
-    public List query(List queries) throws Exception {
-        return getMBeanAttributesCollection(next.query(queries));
-    }
-
-    /**
-     * Retrieve the specified attributes of the mbean
-     * 
-     * @param result - collection of ObjectInstances and/or ObjectNames
-     * @return List of AttributeList
-     * @throws IOException
-     * @throws ReflectionException
-     * @throws InstanceNotFoundException
-     * @throws NoSuchMethodException
-     */
-    protected List getMBeanAttributesCollection(Collection result) throws IOException, ReflectionException, InstanceNotFoundException, NoSuchMethodException, IntrospectionException {
-        List mbeansCollection = new ArrayList();
-
-        for (Iterator i = result.iterator(); i.hasNext();) {
-            Object mbean = i.next();
-            if (mbean instanceof ObjectInstance) {
-                mbeansCollection.add(getMBeanAttributes(((ObjectInstance)mbean).getObjectName(), attribView));
-            } else if (mbean instanceof ObjectName) {
-                mbeansCollection.add(getMBeanAttributes((ObjectName)mbean, attribView));
-            } else {
-                throw new NoSuchMethodException("Cannot get the mbean attributes for class: " + mbean.getClass().getName());
-            }
-        }
-
-        return mbeansCollection;
-    }
-
-    /**
-     * Retrieve the specified attributes of the mbean
-     * 
-     * @param obj - mbean ObjectInstance
-     * @param attrView - list of attributes to retrieve
-     * @return AttributeList for the mbean
-     * @throws ReflectionException
-     * @throws InstanceNotFoundException
-     * @throws IOException
-     */
-    protected AttributeList getMBeanAttributes(ObjectInstance obj, Set attrView) throws ReflectionException, InstanceNotFoundException, IOException, IntrospectionException {
-        return getMBeanAttributes(obj.getObjectName(), attrView);
-    }
-
-    /**
-     * Retrieve the specified attributes of the mbean
-     * 
-     * @param objName - mbean ObjectName
-     * @param attrView - list of attributes to retrieve
-     * @return AttributeList for the mbean
-     * @throws IOException
-     * @throws ReflectionException
-     * @throws InstanceNotFoundException
-     */
-    protected AttributeList getMBeanAttributes(ObjectName objName, Set attrView) throws IOException, ReflectionException, InstanceNotFoundException, IntrospectionException {
-        // If no attribute view specified, get all attributes
-        String[] attribs;
-        if (attrView == null || attrView.isEmpty()) {
-            MBeanAttributeInfo[] infos = jmxConnection.getMBeanInfo(objName).getAttributes();
-            attribs = new String[infos.length];
-
-            for (int i = 0; i < infos.length; i++) {
-                if (infos[i].isReadable()) {
-                    attribs[i] = infos[i].getName();
-                }
-            }
-
-            // Get selected attributes
-        } else {
-
-            attribs = new String[attrView.size()];
-            int count = 0;
-            for (Iterator i = attrView.iterator(); i.hasNext();) {
-                attribs[count++] = (String)i.next();
-            }
-        }
-
-        AttributeList attribList = jmxConnection.getAttributes(objName, attribs);
-
-        attribList.add(0, new Attribute(KEY_OBJECT_NAME_ATTRIBUTE, objName));
-
-        return attribList;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java
deleted file mode 100644
index 5f4430b..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.QueryExp;
-
-public class MBeansObjectNameQueryFilter extends AbstractQueryFilter {
-
-    public static final String DEFAULT_JMX_DOMAIN = "org.apache.activemq";
-    public static final String QUERY_EXP_PREFIX = "MBeans.QueryExp.";
-
-    private MBeanServerConnection jmxConnection;
-
-    /**
-     * Creates an mbeans object name query filter that will query on the given
-     * JMX connection
-     * 
-     * @param jmxConnection - JMX connection to use
-     */
-    public MBeansObjectNameQueryFilter(MBeanServerConnection jmxConnection) {
-        super(null);
-        this.jmxConnection = jmxConnection;
-    }
-
-    /**
-     * Queries the JMX service using a mapping of keys and values to construct
-     * the object name
-     * 
-     * @param queries - mapping of keys and values
-     * @return collection of ObjectInstance that matches the query
-     * @throws MalformedObjectNameException - if the given string is an invalid
-     *                 object name
-     * @throws IOException - if there is a problem querying the JMX context
-     */
-    public List query(List queries) throws MalformedObjectNameException, IOException {
-        // Query all mbeans
-        if (queries == null || queries.isEmpty()) {
-            return queryMBeans(new ObjectName(DEFAULT_JMX_DOMAIN + ":*"), null);
-        }
-
-        // Constructs object name query
-        String objNameQuery = "";
-        String queryExp = "";
-        for (Iterator i = queries.iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            String val = "";
-            int pos = key.indexOf("=");
-            if (pos >= 0) {
-                val = key.substring(pos + 1);
-                key = key.substring(0, pos);
-            }
-
-            if (val.startsWith(QUERY_EXP_PREFIX)) {
-                // do nothing as of the moment
-            } else if (!key.equals("") && !val.equals("")) {
-                objNameQuery = objNameQuery + key + "=" + val + ",";
-            }
-        }
-
-        // Append * to object name
-        objNameQuery = objNameQuery + "*";
-
-        return queryMBeans(new ObjectName(DEFAULT_JMX_DOMAIN + ":" + objNameQuery), queryExp);
-    }
-
-    /**
-     * Advance query that enables you to specify both the object name and the
-     * query expression to use. Note: Query expression is currently unsupported.
-     * 
-     * @param objName - object name to use for query
-     * @param queryExpStr - query expression string
-     * @return set of mbeans that matches the query
-     * @throws IOException - if there is a problem querying the JMX context
-     */
-    protected List queryMBeans(ObjectName objName, String queryExpStr) throws IOException {
-        QueryExp queryExp = createQueryExp(queryExpStr);
-
-        // Convert mbeans set to list to make it standard throughout the query
-        // filter
-        List mbeans = new ArrayList(jmxConnection.queryMBeans(objName, queryExp));
-
-        return mbeans;
-    }
-
-    /**
-     * Creates a query expression based on the query expression string Note:
-     * currently unsupported
-     * 
-     * @param queryExpStr - query expression string
-     * @return the created query expression
-     */
-    protected QueryExp createQueryExp(String queryExpStr) {
-        // Currently unsupported
-        return null;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansRegExQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansRegExQueryFilter.java
deleted file mode 100644
index 0e83c36..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansRegExQueryFilter.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.lang.reflect.Method;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.regex.Pattern;
-
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-public class MBeansRegExQueryFilter extends RegExQueryFilter {
-    /**
-     * Creates a regular expression query that is able to match the values of
-     * specific mbeans
-     * 
-     * @param next - next query filter
-     */
-    public MBeansRegExQueryFilter(QueryFilter next) {
-        super(next);
-    }
-
-    /**
-     * Try to match the object data using the regular expression map. The regex
-     * map contains a key-value mapping of an attribute key to a regular
-     * expression the value of the key should match. The basic rule of matching
-     * is that the data must contain a property key that is included in the
-     * regex map, and that the value of the property key should match the regex
-     * specified.
-     * 
-     * @param data - object data to match
-     * @param regex - regex map
-     * @return true if the data matches the regex map specified
-     * @throws Exception
-     */
-    protected boolean matches(Object data, Map regex) throws Exception {
-        // TODO why not just use instanceof?
-
-        // Use reflection to determine where the object should go
-        try {
-            Method method = this.getClass().getDeclaredMethod("matches", new Class[] {
-                data.getClass(), Map.class
-            });
-            return ((Boolean)method.invoke(this, new Object[] {
-                data, regex
-            })).booleanValue();
-        } catch (NoSuchMethodException e) {
-            return false;
-        }
-    }
-
-    /**
-     * Try to match the object instance using the regular expression map
-     * 
-     * @param data - object instance to match
-     * @param regex - regex map
-     * @return true if the object instance matches the regex map
-     */
-    protected boolean matches(ObjectInstance data, Map regex) {
-        return matches(data.getObjectName(), regex);
-    }
-
-    /**
-     * Try to match the object name instance using the regular expression map
-     * 
-     * @param data - object name to match
-     * @param regex - regex map
-     * @return true if the object name matches the regex map
-     */
-    protected boolean matches(ObjectName data, Map regex) {
-        for (Iterator i = regex.keySet().iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            String target = data.getKeyProperty(key);
-
-            // Try to match the value of the property of the object name
-            if (target != null && !((Pattern)regex.get(key)).matcher(target).matches()) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Try to match the attribute list using the regular expression map
-     * 
-     * @param data - attribute list to match
-     * @param regex - regex map
-     * @return true if the attribute list matches the regex map
-     */
-    protected boolean matches(AttributeList data, Map regex) {
-        for (Iterator i = regex.keySet().iterator(); i.hasNext();) {
-            String key = (String)i.next();
-
-            // Try to match each regex to the attributes of the mbean including
-            // its ObjectName
-            for (Iterator j = data.iterator(); j.hasNext();) {
-                Attribute attrib = (Attribute)j.next();
-
-                // Try to match to the properties of the ObjectName
-                if (attrib.getName().equals(MBeansAttributeQueryFilter.KEY_OBJECT_NAME_ATTRIBUTE)) {
-                    String target = ((ObjectName)attrib.getValue()).getKeyProperty(key);
-
-                    if (target == null || !((Pattern)regex.get(key)).matcher(target).matches()) {
-                        return false;
-                    } else {
-                        // If match skip to the next regex
-                        break;
-                    }
-
-                    // Try to match to the mbean attributes
-                } else if (attrib.getName().equals(key)) {
-                    if (!((Pattern)regex.get(key)).matcher(attrib.getValue().toString()).matches()) {
-                        return false;
-                    } else {
-                        // If match skip to the next regex
-                        break;
-                    }
-
-                    // If mbean does not contain the specified attribute
-                } else {
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MapTransformFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MapTransformFilter.java
deleted file mode 100644
index eae6f0a..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MapTransformFilter.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.lang.reflect.Method;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Arrays;
-
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeDataSupport;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.console.util.AmqMessagesUtil;
-
-public class MapTransformFilter extends ResultTransformFilter {
-    /**
-     * Creates a Map transform filter that is able to transform a variety of
-     * objects to a properties map object
-     * 
-     * @param next - the next query filter
-     */
-    public MapTransformFilter(QueryFilter next) {
-        super(next);
-    }
-
-    /**
-     * Transform the given object to a Map object
-     * 
-     * @param object - object to transform
-     * @return map object
-     */
-    protected Object transformElement(Object object) throws Exception {
-        // Use reflection to determine how the object should be transformed
-        try {
-            Method method = this.getClass().getDeclaredMethod("transformToMap", new Class[] {
-                object.getClass()
-            });
-            return (Map)method.invoke(this, new Object[] {
-                object
-            });
-        } catch (NoSuchMethodException e) {
-//            CommandContext.print("Unable to transform mbean of type: " + object.getClass().getName() + ". No corresponding transformToMap method found.");
-            return null;
-        }
-    }
-
-    /**
-     * Transform an ObjectInstance mbean to a Map
-     * 
-     * @param obj - ObjectInstance format of an mbean
-     * @return map object
-     */
-    protected Map transformToMap(ObjectInstance obj) {
-        return transformToMap(obj.getObjectName());
-    }
-
-    /**
-     * Transform an ObjectName mbean to a Map
-     * 
-     * @param objname - ObjectName format of an mbean
-     * @return map object
-     */
-    protected Map transformToMap(ObjectName objname) {
-        Properties props = new Properties();
-
-        // Parse object properties
-        Map objProps = objname.getKeyPropertyList();
-        for (Iterator i = objProps.keySet().iterator(); i.hasNext();) {
-            Object key = i.next();
-            Object val = objProps.get(key);
-            if (val != null) {
-                props.setProperty(key.toString(), getDisplayString(val));
-            }
-        }
-
-        return props;
-    }
-
-    /**
-     * Transform an Attribute List format of an mbean to a Map
-     * 
-     * @param list - AttributeList format of an mbean
-     * @return map object
-     */
-    protected Map transformToMap(AttributeList list) {
-        Properties props = new Properties();
-        for (Iterator i = list.iterator(); i.hasNext();) {
-            Attribute attrib = (Attribute)i.next();
-
-            // If attribute is an ObjectName
-            if (attrib.getName().equals(MBeansAttributeQueryFilter.KEY_OBJECT_NAME_ATTRIBUTE)) {
-                props.putAll(transformToMap((ObjectName)attrib.getValue()));
-            } else {
-                if (attrib.getValue() != null) {
-                    props.setProperty(attrib.getName(), getDisplayString(attrib.getValue()));
-                }
-            }
-        }
-
-        return props;
-    }
-
-    /**
-     * Transform an ActiveMQTextMessage to a Map
-     * 
-     * @param msg - text message to trasnform
-     * @return map object
-     * @throws JMSException
-     */
-    protected Map transformToMap(ActiveMQTextMessage msg) throws JMSException {
-        Properties props = new Properties();
-
-        props.putAll(transformToMap((ActiveMQMessage)msg));
-        if (msg.getText() != null) {
-            props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "JMSText", msg.getText());
-        }
-
-        return props;
-    }
-
-    /**
-     * Transform an ActiveMQBytesMessage to a Map
-     * 
-     * @param msg - bytes message to transform
-     * @return map object
-     * @throws JMSException
-     */
-    protected Map transformToMap(ActiveMQBytesMessage msg) throws JMSException {
-        Properties props = new Properties();
-
-        props.putAll(transformToMap((ActiveMQMessage)msg));
-
-        long bodyLength = msg.getBodyLength();
-        byte[] msgBody;
-        int i = 0;
-        // Create separate bytes messages
-        for (i = 0; i < (bodyLength / Integer.MAX_VALUE); i++) {
-            msgBody = new byte[Integer.MAX_VALUE];
-            props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "JMSBytes:" + (i + 1), new String(msgBody));
-        }
-        msgBody = new byte[(int)(bodyLength % Integer.MAX_VALUE)];
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "JMSBytes:" + (i + 1), new String(msgBody));
-
-        return props;
-    }
-
-    /**
-     * Transform an ActiveMQMessage to a Map
-     * 
-     * @param msg - object message to transform
-     * @return map object
-     * @throws JMSException
-     */
-    protected Map transformToMap(ActiveMQObjectMessage msg) throws JMSException {
-        Properties props = new Properties();
-
-        props.putAll(transformToMap((ActiveMQMessage)msg));
-        if (msg.getObject() != null) {
-            // Just add the class name and toString value of the object
-            props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "JMSObjectClass", msg.getObject().getClass().getName());
-            props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "JMSObjectString", getDisplayString(msg.getObject()));
-        }
-        return props;
-    }
-
-    /**
-     * Transform an ActiveMQMapMessage to a Map
-     * 
-     * @param msg - map message to transform
-     * @return map object
-     * @throws JMSException
-     */
-    protected Map transformToMap(ActiveMQMapMessage msg) throws JMSException {
-        Properties props = new Properties();
-
-        props.putAll(transformToMap((ActiveMQMessage)msg));
-
-        // Get map properties
-        Enumeration e = msg.getMapNames();
-        while (e.hasMoreElements()) {
-            String key = (String)e.nextElement();
-            Object val = msg.getObject(key);
-            if (val != null) {
-                props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + key, getDisplayString(val));
-            }
-        }
-
-        return props;
-    }
-
-    /**
-     * Transform an ActiveMQStreamMessage to a Map
-     * 
-     * @param msg - stream message to transform
-     * @return map object
-     * @throws JMSException
-     */
-    protected Map transformToMap(ActiveMQStreamMessage msg) throws JMSException {
-        Properties props = new Properties();
-
-        props.putAll(transformToMap((ActiveMQMessage)msg));
-        // Just set the toString of the message as the body of the stream
-        // message
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "JMSStreamMessage", getDisplayString(msg));
-
-        return props;
-    }
-
-    /**
-     * Transform an ActiveMQMessage to a Map
-     * 
-     * @param msg - message to transform
-     * @return map object
-     * @throws JMSException
-     */
-    protected Map<String, String> transformToMap(ActiveMQMessage msg) throws JMSException {
-        Map<String, String> props = new HashMap<String, String>();
-
-        // Get JMS properties
-        if (msg.getJMSCorrelationID() != null) {
-            props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSCorrelationID", msg.getJMSCorrelationID());
-        }
-        props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSDeliveryMode", (msg.getJMSDeliveryMode() == DeliveryMode.PERSISTENT) ? "persistent" : "non-persistent");
-        if (msg.getJMSDestination() != null) {
-            props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSDestination", ((ActiveMQDestination)msg.getJMSDestination()).getPhysicalName());
-        }
-        props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSExpiration", Long.toString(msg.getJMSExpiration()));
-        props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSMessageID", msg.getJMSMessageID());
-        props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSPriority", Integer.toString(msg.getJMSPriority()));
-        props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSRedelivered", Boolean.toString(msg.getJMSRedelivered()));
-        if (msg.getJMSReplyTo() != null) {
-            props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSReplyTo", ((ActiveMQDestination)msg.getJMSReplyTo()).getPhysicalName());
-        }
-        props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSTimestamp", Long.toString(msg.getJMSTimestamp()));
-        if (msg.getJMSType() != null) {
-            props.put(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSType", msg.getJMSType());
-        }
-
-        // Get custom properties
-        Enumeration e = msg.getPropertyNames();
-        while (e.hasMoreElements()) {
-            String name = (String)e.nextElement();
-            if (msg.getObjectProperty(name) != null) {
-                props.put(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + name, getDisplayString(msg.getObjectProperty(name)));
-            }
-        }
-
-        return props;
-    }
-
-    /**
-     * Transform an openMBean composite data to a Map
-     * 
-     * @param data - composite data to transform
-     * @return map object
-     */
-    protected Map transformToMap(CompositeDataSupport data) {
-        Properties props = new Properties();
-
-        String typeName = data.getCompositeType().getTypeName();
-
-        // Retrieve text message
-        if (typeName.equals(ActiveMQTextMessage.class.getName())) {
-            props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "Text", data.get("Text").toString());
-
-            // Retrieve byte preview
-        } else if (typeName.equals(ActiveMQBytesMessage.class.getName())) {
-            props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "BodyLength", data.get("BodyLength").toString());
-            props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + "BodyPreview", new String((byte[])data.get("BodyPreview")));
-
-            // Expand content map
-        } else if (typeName.equals(ActiveMQMapMessage.class.getName())) {
-            Map contentMap = (Map)data.get("ContentMap");
-            for (Iterator i = contentMap.keySet().iterator(); i.hasNext();) {
-                String key = (String)i.next();
-                props.setProperty(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + key, contentMap.get(key).toString());
-            }
-
-            // Do nothing
-        } else if (typeName.equals(ActiveMQObjectMessage.class.getName()) || typeName.equals(ActiveMQStreamMessage.class.getName()) || typeName.equals(ActiveMQMessage.class.getName())) {
-
-            // Unrecognized composite data. Throw exception.
-        } else {
-            throw new IllegalArgumentException("Unrecognized composite data to transform. composite type: " + typeName);
-        }
-
-        // Process the JMS message header values
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSCorrelationID", "" + data.get("JMSCorrelationID"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSDestination", "" + data.get("JMSDestination"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSMessageID", "" + data.get("JMSMessageID"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSReplyTo", "" + data.get("JMSReplyTo"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSType", "" + data.get("JMSType"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSDeliveryMode", "" + data.get("JMSDeliveryMode"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSExpiration", "" + data.get("JMSExpiration"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSPriority", "" + data.get("JMSPriority"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSRedelivered", "" + data.get("JMSRedelivered"));
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + "JMSTimestamp", "" + data.get("JMSTimestamp"));
-
-        // Process the JMS custom message properties
-        props.setProperty(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + "Properties", "" + data.get("Properties"));
-
-        return props;
-    }
-
-    protected String getDisplayString(Object obj) {
-        if (obj != null && obj.getClass().isArray()) {
-            obj = Arrays.asList((Object[]) obj);
-        }
-        return obj.toString();
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MessagesQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MessagesQueryFilter.java
deleted file mode 100644
index 720bbc7..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MessagesQueryFilter.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-public class MessagesQueryFilter extends AbstractQueryFilter {
-
-    private MBeanServerConnection jmxConnection;
-    private ObjectName destName;
-
-    /**
-     * Create a JMS message query filter
-     * 
-     * @param jmxConnection - JMX connection to use
-     * @param destName - object name query to retrieve the destination
-     */
-    public MessagesQueryFilter(MBeanServerConnection jmxConnection, ObjectName destName) {
-        super(null);
-        this.jmxConnection = jmxConnection;
-        this.destName = destName;
-    }
-
-    /**
-     * Queries the specified destination using the message selector format query
-     * 
-     * @param queries - message selector queries
-     * @return list messages that matches the selector
-     * @throws Exception
-     */
-    public List query(List queries) throws Exception {
-        String selector = "";
-
-        // Convert to message selector
-        for (Iterator i = queries.iterator(); i.hasNext();) {
-            selector = selector + "(" + i.next().toString() + ") AND ";
-        }
-
-        // Remove last AND
-        if (!selector.equals("")) {
-            selector = selector.substring(0, selector.length() - 5);
-        }
-
-        return queryMessages(selector);
-    }
-
-    /**
-     * Query the messages of a queue destination using JMX
-     * 
-     * @param selector - message selector
-     * @return list of messages that matches the selector
-     * @throws Exception
-     */
-    protected List queryMessages(String selector) throws Exception {
-        CompositeData[] messages = (CompositeData[]) jmxConnection.invoke(destName, "browse", new Object[] {}, new String[] {});
-        return Arrays.asList(messages);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/PropertiesViewFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/PropertiesViewFilter.java
deleted file mode 100644
index c2bedd2..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/PropertiesViewFilter.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class PropertiesViewFilter implements QueryFilter {
-    protected QueryFilter next;
-    protected Set viewFilter;
-
-    /**
-     * Creates a filter that will select the properties of a map object to view
-     * 
-     * @param next - the next query filter that will return a collection of maps
-     */
-    public PropertiesViewFilter(QueryFilter next) {
-        this(null, next);
-    }
-
-    /**
-     * Creates a filter that will select the properties of a map object to view
-     * 
-     * @param viewFilter - the properties to view
-     * @param next - the next query filter that will return a collection of maps
-     */
-    public PropertiesViewFilter(Set viewFilter, QueryFilter next) {
-        this.next = next;
-        this.viewFilter = viewFilter;
-    }
-
-    /**
-     * Filter the properties to view of the query result
-     * 
-     * @param query - the query string
-     * @return list of objects that has been view filtered
-     */
-    public List<Map<Object, Object>> query(String query) throws Exception {
-        return filterViewCollection(next.query(query), viewFilter);
-    }
-
-    /**
-     * Filter the properties to view of the query result
-     * 
-     * @param queries - the query map
-     * @return list of objects that has been view filtered
-     * @throws Exception
-     */
-    public List<Map<Object, Object>> query(List queries) throws Exception {
-        return filterViewCollection(next.query(queries), viewFilter);
-    }
-
-    /**
-     * Filter the view of each element in the collection
-     * 
-     * @param result - the lists to filter the view from
-     * @param viewFilter - the views to select
-     * @return list of objects whose view has been filtered
-     */
-    protected List<Map<Object, Object>> filterViewCollection(Collection<Map<Object, Object>> result, Set viewFilter) {
-        // Use a list to allow duplicate entries
-        List<Map<Object, Object>> newCollection = new ArrayList<Map<Object, Object>>();
-
-        for (Iterator<Map<Object, Object>> i = result.iterator(); i.hasNext();) {
-            newCollection.add(filterView(i.next()));
-        }
-
-        return newCollection;
-    }
-
-    /**
-     * Select only the attributes to view from the map data
-     * 
-     * @param data - data to filter the view from
-     * @return - data with the view filtered
-     */
-    protected Map<Object, Object> filterView(Map<Object, Object> data) {
-        // If no view specified, display all attributes
-        if (viewFilter == null || viewFilter.isEmpty()) {
-            return data;
-        }
-
-        Map<Object, Object> newData;
-        try {
-            // Lets try to use the same class as the original
-            newData = data.getClass().newInstance();
-        } catch (Exception e) {
-            // Lets use a default HashMap
-            newData = new HashMap<Object, Object>();
-        }
-
-        // Filter the keys to view
-        for (Iterator i = viewFilter.iterator(); i.hasNext();) {
-            Object key = i.next();
-            Object val = data.get(key);
-
-            if (val != null) {
-                newData.put(key, val);
-            }
-        }
-
-        return newData;
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/QueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/QueryFilter.java
deleted file mode 100644
index 11437cf..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/QueryFilter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.List;
-import java.util.Map;
-
-public interface QueryFilter {
-    
-    String QUERY_DELIMETER = ",";
-
-    /**
-     * Interface for querying
-     * @param queryStr - the query string
-     * @return collection of objects that satisfies the query
-     * @throws Exception
-     */
-    List query(String queryStr) throws Exception;
-
-    /**
-     * Interface for querying
-     * @param queries - list of individual queries
-     * @return collection of objects that satisfies the query
-     * @throws Exception
-     */
-    List query(List queries) throws Exception;
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/RegExQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/RegExQueryFilter.java
deleted file mode 100644
index f43c36f..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/RegExQueryFilter.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-
-public abstract class RegExQueryFilter extends AbstractQueryFilter {
-    public static final String REGEX_PREFIX = "REGEX:QUERY:";
-
-    /**
-     * Creates a regular expression query that is able to match an object using
-     * key-value pattern regex filtering
-     * 
-     * @param next
-     */
-    protected RegExQueryFilter(QueryFilter next) {
-        super(next);
-    }
-
-    /**
-     * Separates the regular expressions queries from the usual queries. A query
-     * is a regex query, if it is key-value pair with the format <key>=<value>,
-     * and value is a pattern that satisfies the isRegularExpression method.
-     * 
-     * @param queries - list of queries
-     * @return filtered objects that matches the regex query
-     * @throws Exception
-     */
-    public List query(List queries) throws Exception {
-        Map regex = new HashMap();
-        List newQueries = new ArrayList();
-
-        // Lets parse for regular expression queries
-        for (Iterator i = queries.iterator(); i.hasNext();) {
-            // Get key-value pair
-            String token = (String)i.next();
-            String key = "";
-            String val = "";
-            int pos = token.indexOf("=");
-            if (pos >= 0) {
-                val = token.substring(pos + 1);
-                key = token.substring(0, pos);
-            }
-
-            // Add the regex query to list and make it a non-factor in the
-            // succeeding queries
-            if (isRegularExpression(val)) {
-                regex.put(key, compileQuery(val));
-
-                // Add the normal query to the query list
-            } else {
-                newQueries.add(token);
-            }
-        }
-
-        // Filter the result using the regular expressions specified
-        return filterCollectionUsingRegEx(regex, next.query(newQueries));
-    }
-
-    /**
-     * Checks if a given string is a regular expression query. Currently, a
-     * pattern is a regex query, if it starts with the
-     * RegExQueryFilter.REGEX_PREFIX.
-     * 
-     * @param query
-     * @return
-     */
-    protected boolean isRegularExpression(String query) {
-        return query.startsWith(REGEX_PREFIX);
-    }
-
-    /**
-     * Compiles the regex query to a pattern.
-     * 
-     * @param query - query string to compile
-     * @return regex pattern
-     */
-    protected Pattern compileQuery(String query) {
-        return Pattern.compile(query.substring(REGEX_PREFIX.length()));
-    }
-
-    /**
-     * Filter the specified colleciton using the regex patterns extracted.
-     * 
-     * @param regex - regex map
-     * @param data - list of objects to filter
-     * @return filtered list of objects that matches the regex map
-     * @throws Exception
-     */
-    protected List filterCollectionUsingRegEx(Map regex, List data) throws Exception {
-        // No regular expressions filtering needed
-        if (regex == null || regex.isEmpty()) {
-            return data;
-        }
-
-        List filteredElems = new ArrayList();
-
-        // Get each data object to filter
-        for (Iterator i = data.iterator(); i.hasNext();) {
-            Object dataElem = i.next();
-            // If properties of data matches all the regex pattern, add it
-            if (matches(dataElem, regex)) {
-                filteredElems.add(dataElem);
-            }
-        }
-
-        return filteredElems;
-    }
-
-    /**
-     * Determines how the object is to be matched to the regex map.
-     * 
-     * @param data - object to match
-     * @param regex - regex map
-     * @return true, if the object matches the regex map, false otherwise
-     * @throws Exception
-     */
-    protected abstract boolean matches(Object data, Map regex) throws Exception;
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/ResultTransformFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/ResultTransformFilter.java
deleted file mode 100644
index fcb479a..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/ResultTransformFilter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-public abstract class ResultTransformFilter implements QueryFilter {
-    private QueryFilter next;
-
-    /**
-     * Constructs a query filter that transform the format of the query result
-     * 
-     * @param next - the query filter to retrieve the results from
-     */
-    protected ResultTransformFilter(QueryFilter next) {
-        this.next = next;
-    }
-
-    /**
-     * Transforms the queried results to a collection of different objects
-     * 
-     * @param query - the query string
-     * @return collections of transformed objects
-     * @throws Exception
-     */
-    public List query(String query) throws Exception {
-        return transformList(next.query(query));
-    }
-
-    /**
-     * Transforms the queried results to a collection of different objects
-     * 
-     * @param queries - the query map
-     * @return collections of transformed objects
-     * @throws Exception
-     */
-    public List<Object> query(List queries) throws Exception {
-        return transformList(next.query(queries));
-    }
-
-    /**
-     * Transforms a collection to a collection of different objects.
-     * 
-     * @param result - the collection to transform
-     * @return collection of properties objects
-     */
-    protected List<Object> transformList(List<Object> result) throws Exception {
-        List<Object> props = new ArrayList<Object>();
-
-        for (Iterator<Object> i = result.iterator(); i.hasNext();) {
-            props.add(transformElement(i.next()));
-        }
-
-        return props;
-    }
-
-    /**
-     * Transform a result object
-     * 
-     * @param obj - the object instance to transform
-     * @return the transformed object
-     */
-    protected abstract Object transformElement(Object obj) throws Exception;
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/StubQueryFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/StubQueryFilter.java
deleted file mode 100644
index aa7081b..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/StubQueryFilter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.List;
-
-public class StubQueryFilter implements QueryFilter {
-    private List data;
-
-    /**
-     * Creates a stub query that returns the given collections as the query
-     * result
-     * 
-     * @param data - the stub query result
-     */
-    public StubQueryFilter(List data) {
-        this.data = data;
-    }
-
-    /**
-     * Returns the provided stub data as a stub query result
-     * 
-     * @param queryStr - not use
-     * @return the stub query result
-     * @throws Exception
-     */
-    public List query(String queryStr) throws Exception {
-        return data;
-    }
-
-    /**
-     * Returns the provided stub data as a stub query result
-     * 
-     * @param queries - not use
-     * @return the stub query result
-     * @throws Exception
-     */
-    public List query(List queries) throws Exception {
-        return data;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToMsgSelectorTransformFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToMsgSelectorTransformFilter.java
deleted file mode 100644
index 465e25d..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToMsgSelectorTransformFilter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.console.filter;
-
-public class WildcardToMsgSelectorTransformFilter extends WildcardTransformFilter {
-    /**
-     * Creates a filter that is able to transform a wildcard query to a message
-     * selector format
-     * 
-     * @param next - next query filter
-     */
-    public WildcardToMsgSelectorTransformFilter(QueryFilter next) {
-        super(next);
-    }
-
-    /**
-     * Use to determine if a query string is a wildcard query. A query string is
-     * a wildcard query if it is a key-value pair with the format <key>=<value>
-     * and the value is enclosed in '' and contains '*' and '?'.
-     * 
-     * @param query - query string
-     * @return true, if the query string is a wildcard query, false otherwise
-     */
-    protected boolean isWildcardQuery(String query) {
-        // If the query is a key=value pair
-        String key = query;
-        String val = "";
-        int pos = key.indexOf("=");
-        if (pos >= 0) {
-            val = key.substring(pos + 1);
-        }
-
-        // If the value contains wildcards and is enclose by '
-        return val.startsWith("'") && val.endsWith("'") && ((val.indexOf("*") >= 0) || (val.indexOf("?") >= 0));
-    }
-
-    /**
-     * Transform a wildcard query to message selector format
-     * 
-     * @param query - query string to transform
-     * @return message selector format string
-     */
-    protected String transformWildcardQuery(String query) {
-        // If the query is a key=value pair
-        String key = query;
-        String val = "";
-        int pos = key.indexOf("=");
-        if (pos >= 0) {
-            val = key.substring(pos + 1);
-            key = key.substring(0, pos);
-        }
-
-        val = val.replaceAll("[?]", "_");
-        val = val.replaceAll("[*]", "%");
-
-        return key + " LIKE " + val;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToRegExTransformFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToRegExTransformFilter.java
deleted file mode 100644
index 8840103..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToRegExTransformFilter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.console.filter;
-
-public class WildcardToRegExTransformFilter extends WildcardTransformFilter {
-    /**
-     * Creates a filter that is able to transform a wildcard query to a regular
-     * expression query string
-     * 
-     * @param next - next query filter
-     */
-    public WildcardToRegExTransformFilter(RegExQueryFilter next) {
-        super(next);
-    }
-
-    /**
-     * Use to determine if a query string is a wildcard query. A query string is
-     * a wildcard query if it is a key-value pair with the format <key>=<value>
-     * and the value contains '*' and '?'.
-     * 
-     * @param query - query string
-     * @return true, if the query string is a wildcard query, false otherwise
-     */
-    protected boolean isWildcardQuery(String query) {
-        // If the query is a key=value pair
-        String key = query;
-        String val = "";
-        int pos = key.indexOf("=");
-        if (pos >= 0) {
-            val = key.substring(pos + 1);
-        }
-
-        // If the value contains wildcards
-        return (val.indexOf("*") >= 0) || (val.indexOf("?") >= 0);
-    }
-
-    /**
-     * Transform a wildcard query to regular expression format
-     * 
-     * @param query - query string to transform
-     * @return regex query string
-     */
-    protected String transformWildcardQuery(String query) {
-        // Get the key=value pair
-        String key = query;
-        String val = "";
-        int pos = key.indexOf("=");
-        if (pos >= 0) {
-            val = key.substring(pos + 1);
-            key = key.substring(0, pos);
-        }
-
-        val = val.replaceAll("[.]", "\\\\."); // Escape all dot characters.
-                                                // From (.) to (\.)
-        val = val.replaceAll("[?]", "."); // Match single characters
-        val = val.replaceAll("[*]", ".*?"); // Match all characters, use
-                                            // reluctant quantifier
-        val = "(" + val + ")"; // Let's group the query for clarity
-        val = RegExQueryFilter.REGEX_PREFIX + val; // Flag as a regular
-                                                    // expression query
-
-        return key + "=" + val;
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardTransformFilter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardTransformFilter.java
deleted file mode 100644
index da8f3fb..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardTransformFilter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.console.filter;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-public abstract class WildcardTransformFilter extends AbstractQueryFilter {
-
-    /**
-     * Creates a wildcard transform filter that is able to convert a wildcard
-     * expression (determined by isWildcardQuery) to a another query type (use
-     * transformWildcardQuery).
-     * 
-     * @param next - the next query filter
-     */
-    protected WildcardTransformFilter(QueryFilter next) {
-        super(next);
-    }
-
-    /**
-     * Converts the query list to set of different queries
-     * 
-     * @param queries - query list to transform
-     * @return - result of the query
-     * @throws Exception
-     */
-    public List query(List queries) throws Exception {
-        List newQueries = new ArrayList();
-
-        for (Iterator i = queries.iterator(); i.hasNext();) {
-            String queryToken = (String)i.next();
-
-            // Transform the wildcard query
-            if (isWildcardQuery(queryToken)) {
-                // Transform the value part only
-                newQueries.add(transformWildcardQuery(queryToken));
-
-                // Maintain the query as is
-            } else {
-                newQueries.add(queryToken);
-            }
-        }
-
-        return next.query(newQueries);
-    }
-
-    /**
-     * Use to determine is a query string is a wildcard query
-     * 
-     * @param query - query string
-     * @return true, if the query string is a wildcard query, false otherwise
-     */
-    protected abstract boolean isWildcardQuery(String query);
-
-    /**
-     * Use to transform a wildcard query string to another query format
-     * 
-     * @param query - query string to transform
-     * @return transformed query
-     */
-    protected abstract String transformWildcardQuery(String query);
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/CommandShellOutputFormatter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/CommandShellOutputFormatter.java
deleted file mode 100644
index df6ea55..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/CommandShellOutputFormatter.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * 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.console.formatter;
-
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Arrays;
-
-import javax.jms.Message;
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-public class CommandShellOutputFormatter implements OutputFormatter {
-    private OutputStream outputStream;
-    private PrintStream out;
-
-    public CommandShellOutputFormatter(OutputStream out) {
-
-        this.outputStream = out;
-        if (out instanceof PrintStream) {
-            this.out = (PrintStream)out;
-        } else {
-            this.out = new PrintStream(out);
-        }
-    }
-
-    /**
-     * Retrieve the output stream being used by the formatter
-     * 
-     * @return
-     */
-    public OutputStream getOutputStream() {
-        return outputStream;
-    }
-
-    /**
-     * Print an ObjectInstance format of an mbean
-     * 
-     * @param mbean - mbean to print
-     */
-    public void printMBean(ObjectInstance mbean) {
-        printMBean(mbean.getObjectName());
-    }
-
-    /**
-     * Print an ObjectName format of an mbean
-     * 
-     * @param mbean - mbean to print
-     */
-    public void printMBean(ObjectName mbean) {
-        printMBean(mbean.getKeyPropertyList());
-    }
-
-    /**
-     * Print an AttributeList format of an mbean
-     * 
-     * @param mbean - mbean to print
-     */
-    public void printMBean(AttributeList mbean) {
-        for (Iterator i = mbean.iterator(); i.hasNext();) {
-            Attribute attrib = (Attribute)i.next();
-            if (attrib.getValue() instanceof ObjectName) {
-                printMBean((ObjectName)attrib.getValue());
-            } else if (attrib.getValue() instanceof ObjectInstance) {
-                printMBean((ObjectInstance)attrib.getValue());
-            } else {
-                out.println(attrib.getName() + " = " + attrib.getValue().toString());
-                out.println();
-            }
-        }
-    }
-
-    /**
-     * Print a Map format of an mbean
-     * 
-     * @param mbean - mbean to print
-     */
-    public void printMBean(Map mbean) {
-        for (Iterator i = mbean.keySet().iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            String val = mbean.get(key).toString();
-            out.println(key + " = " + val);
-        }
-        out.println();
-    }
-
-    /**
-     * Print a collection of mbean
-     * 
-     * @param mbean - collection of mbeans
-     */
-    public void printMBean(Collection mbean) {
-        for (Iterator i = mbean.iterator(); i.hasNext();) {
-            Object obj = i.next();
-            if (obj instanceof ObjectInstance) {
-                printMBean((ObjectInstance)obj);
-            } else if (obj instanceof ObjectName) {
-                printMBean((ObjectName)obj);
-            } else if (obj instanceof Map) {
-                printMBean((Map)obj);
-            } else if (obj instanceof AttributeList) {
-                printMBean((AttributeList)obj);
-            } else if (obj instanceof Collection) {
-                printMessage((Collection)obj);
-            } else {
-                printException(new UnsupportedOperationException("Unknown mbean type: " + obj.getClass().getName()));
-            }
-        }
-    }
-
-    /**
-     * Print a Map format of a JMS message
-     * 
-     * @param msg
-     */
-    public void printMessage(Map msg) {
-        for (Iterator i = msg.keySet().iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            String val = msg.get(key).toString();
-            out.println(key + " = " + val);
-        }
-        out.println();
-    }
-
-    /**
-     * Print a Message format of a JMS message
-     * 
-     * @param msg - JMS message to print
-     */
-    public void printMessage(Message msg) {
-        // TODO
-    }
-
-    /**
-     * Print a collection of JMS messages
-     * 
-     * @param msg - collection of JMS messages
-     */
-    public void printMessage(Collection msg) {
-        for (Iterator i = msg.iterator(); i.hasNext();) {
-            Object obj = i.next();
-            if (obj instanceof Message) {
-                printMessage((Message)obj);
-            } else if (obj instanceof Map) {
-                printMessage((Map)obj);
-            } else if (obj instanceof Collection) {
-                printMessage((Collection)obj);
-            } else {
-                printException(new UnsupportedOperationException("Unknown message type: " + obj.getClass().getName()));
-            }
-        }
-    }
-
-    /**
-     * Print help messages
-     * 
-     * @param helpMsgs - help messages to print
-     */
-    public void printHelp(String[] helpMsgs) {
-        for (int i = 0; i < helpMsgs.length; i++) {
-            out.println(helpMsgs[i]);
-        }
-        out.println();
-    }
-
-    /**
-     * Print an information message
-     * 
-     * @param info - information message to print
-     */
-    public void printInfo(String info) {
-        out.println("INFO: " + info);
-    }
-
-    /**
-     * Print an exception message
-     * 
-     * @param e - exception to print
-     */
-    public void printException(Exception e) {
-        out.println("ERROR: " + e);
-        e.printStackTrace(out);
-    }
-
-    /**
-     * Print a version information
-     * 
-     * @param version - version info to print
-     */
-    public void printVersion(String version) {
-        out.println("");
-        out.println("ActiveMQ " + version);
-        out.println("For help or more information please see: http://activemq.apache.org");
-        out.println("");
-    }
-
-    /**
-     * Print a generic key value mapping
-     * 
-     * @param map to print
-     */
-    public void print(Map map) {
-        for (Iterator i = map.keySet().iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            String val = map.get(key).toString();
-            out.println(key + " = " + val);
-        }
-        out.println();
-    }
-
-    /**
-     * Print a generic array of strings
-     * 
-     * @param strings - string array to print
-     */
-    public void print(String[] strings) {
-        for (int i = 0; i < strings.length; i++) {
-            out.println(strings[i]);
-        }
-        out.println();
-    }
-
-    /**
-     * Print a collection of objects
-     * 
-     * @param collection - collection to print
-     */
-    public void print(Collection collection) {
-        for (Iterator i = collection.iterator(); i.hasNext();) {
-            out.println(i.next().toString());
-        }
-        out.println();
-    }
-
-    /**
-     * Print a java string
-     * 
-     * @param string - string to print
-     */
-    public void print(String string) {
-        out.println(string);
-    }
-
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/OutputFormatter.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/OutputFormatter.java
deleted file mode 100644
index 9b09e9e..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/OutputFormatter.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.console.formatter;
-
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.Map;
-
-import javax.jms.Message;
-import javax.management.AttributeList;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-public interface OutputFormatter {
-
-    /**
-     * Retrieve the output stream being used by the formatter
-     * @return
-     */
-    OutputStream getOutputStream();
-
-    /**
-     * Print an ObjectInstance format of an mbean
-     * @param mbean - mbean to print
-     */
-    void printMBean(ObjectInstance mbean);
-
-    /**
-     * Print an ObjectName format of an mbean
-     * @param mbean - mbean to print
-     */
-    void printMBean(ObjectName mbean);
-
-    /**
-     * Print an AttributeList format of an mbean
-     * @param mbean - mbean to print
-     */
-    void printMBean(AttributeList mbean);
-
-    /**
-     * Print a Map format of an mbean
-     * @param mbean - mbean to print
-     */
-    void printMBean(Map mbean);
-
-    /**
-     * Print a Collection format of mbeans
-     * @param mbean - collection of mbeans
-     */
-    void printMBean(Collection mbean);
-
-    /**
-     * Print a Map format of a JMS message
-     * @param msg
-     */
-    void printMessage(Map msg);
-
-    /**
-     * Print a Message format of a JMS message
-     * @param msg - JMS message to print
-     */
-    void printMessage(Message msg);
-
-    /**
-     * Print a Collection format of JMS messages
-     * @param msg - collection of JMS messages
-     */
-    void printMessage(Collection msg);
-
-    /**
-     * Print help messages
-     * @param helpMsgs - help messages to print
-     */
-    void printHelp(String[] helpMsgs);
-
-    /**
-     * Print an information message
-     * @param info - information message to print
-     */
-    void printInfo(String info);
-
-    /**
-     * Print an exception message
-     * @param e - exception to print
-     */
-    void printException(Exception e);
-
-    /**
-     * Print a version information
-     * @param version - version info to print
-     */
-    void printVersion(String version);
-
-    /**
-     * Print a generic key value mapping
-     * @param map to print
-     */
-    void print(Map map);
-
-    /**
-     * Print a generic array of strings
-     * @param strings - string array to print
-     */
-    void print(String[] strings);
-
-    /**
-     * Print a collection of objects
-     * @param collection - collection to print
-     */
-    void print(Collection collection);
-
-    /**
-     * Print a java string
-     * @param string - string to print
-     */
-    void print(String string);
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/AmqMessagesUtil.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/AmqMessagesUtil.java
deleted file mode 100644
index 470ec04..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/AmqMessagesUtil.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.console.util;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Set;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.console.filter.AmqMessagesQueryFilter;
-import org.apache.activemq.console.filter.GroupPropertiesViewFilter;
-import org.apache.activemq.console.filter.MapTransformFilter;
-import org.apache.activemq.console.filter.PropertiesViewFilter;
-import org.apache.activemq.console.filter.QueryFilter;
-import org.apache.activemq.console.filter.StubQueryFilter;
-import org.apache.activemq.console.filter.WildcardToMsgSelectorTransformFilter;
-
-public final class AmqMessagesUtil {
-
-    public static final String JMS_MESSAGE_HEADER_PREFIX = "JMS_HEADER_FIELD:";
-    public static final String JMS_MESSAGE_CUSTOM_PREFIX = "JMS_CUSTOM_FIELD:";
-    public static final String JMS_MESSAGE_BODY_PREFIX = "JMS_BODY_FIELD:";
-
-    private AmqMessagesUtil() {
-    }
-
-    public static List getAllMessages(URI brokerUrl, Destination dest) throws Exception {
-        return getMessages(brokerUrl, dest, "");
-    }
-
-    public static List getMessages(URI brokerUrl, Destination dest, String selector) throws Exception {
-        return createMessageQueryFilter(brokerUrl, dest).query(selector);
-    }
-
-    public static List getMessages(URI brokerUrl, Destination dest, List selectors) throws Exception {
-        return createMessageQueryFilter(brokerUrl, dest).query(selectors);
-    }
-
-    public static List filterMessagesView(List messages, Set groupViews, Set attributeViews) throws Exception {
-        return (new PropertiesViewFilter(attributeViews, new GroupPropertiesViewFilter(groupViews, new MapTransformFilter(new StubQueryFilter(messages))))).query("");
-    }
-
-    public static QueryFilter createMessageQueryFilter(URI brokerUrl, Destination dest) {
-        return new WildcardToMsgSelectorTransformFilter(new AmqMessagesQueryFilter(brokerUrl, dest));
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/JmxMBeansUtil.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/JmxMBeansUtil.java
deleted file mode 100644
index dbcfac3..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/JmxMBeansUtil.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.console.util;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.management.ObjectName;
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXServiceURL;
-
-import org.apache.activemq.console.filter.GroupPropertiesViewFilter;
-import org.apache.activemq.console.filter.MBeansAttributeQueryFilter;
-import org.apache.activemq.console.filter.MBeansObjectNameQueryFilter;
-import org.apache.activemq.console.filter.MBeansRegExQueryFilter;
-import org.apache.activemq.console.filter.MapTransformFilter;
-import org.apache.activemq.console.filter.MessagesQueryFilter;
-import org.apache.activemq.console.filter.PropertiesViewFilter;
-import org.apache.activemq.console.filter.QueryFilter;
-import org.apache.activemq.console.filter.StubQueryFilter;
-import org.apache.activemq.console.filter.WildcardToMsgSelectorTransformFilter;
-import org.apache.activemq.console.filter.WildcardToRegExTransformFilter;
-
-public final class JmxMBeansUtil {
-
-    private JmxMBeansUtil() {
-    }
-
-    public static List getAllBrokers(MBeanServerConnection jmxConnection) throws Exception {
-        return (new MBeansObjectNameQueryFilter(jmxConnection)).query("Type=Broker");
-    }
-
-    public static List getBrokersByName(MBeanServerConnection jmxConnection, String brokerName) throws Exception {
-        return (new MBeansObjectNameQueryFilter(jmxConnection)).query("Type=Broker,BrokerName=" + brokerName);
-    }
-
-    public static List getAllBrokers(MBeanServerConnection jmxConnection, Set attributes) throws Exception {
-        return (new MBeansAttributeQueryFilter(jmxConnection, attributes, new MBeansObjectNameQueryFilter(jmxConnection))).query("Type=Broker");
-    }
-
-    public static List getBrokersByName(MBeanServerConnection jmxConnection, String brokerName, Set attributes) throws Exception {
-        return (new MBeansAttributeQueryFilter(jmxConnection, attributes, new MBeansObjectNameQueryFilter(jmxConnection))).query("Type=Broker,BrokerName=" + brokerName);
-    }
-
-    public static List queryMBeans(MBeanServerConnection jmxConnection, List queryList) throws Exception {
-        // If there is no query defined get all mbeans
-        if (queryList == null || queryList.size() == 0) {
-            return createMBeansObjectNameQuery(jmxConnection).query("");
-
-            // Parse through all the query strings
-        } else {
-            return createMBeansObjectNameQuery(jmxConnection).query(queryList);
-        }
-    }
-
-    public static List queryMBeans(MBeanServerConnection jmxConnection, List queryList, Set attributes) throws Exception {
-        // If there is no query defined get all mbeans
-        if (queryList == null || queryList.size() == 0) {
-            return createMBeansAttributeQuery(jmxConnection, attributes).query("");
-
-            // Parse through all the query strings
-        } else {
-            return createMBeansAttributeQuery(jmxConnection, attributes).query(queryList);
-        }
-    }
-
-    public static List queryMBeans(MBeanServerConnection jmxConnection, String queryString) throws Exception {
-        return createMBeansObjectNameQuery(jmxConnection).query(queryString);
-    }
-
-    public static List queryMBeans(MBeanServerConnection jmxConnection, String queryString, Set attributes) throws Exception {
-        return createMBeansAttributeQuery(jmxConnection, attributes).query(queryString);
-    }
-
-    public static List filterMBeansView(List mbeans, Set viewFilter) throws Exception {
-        return new PropertiesViewFilter(viewFilter, new MapTransformFilter(new StubQueryFilter(mbeans))).query("");
-    }
-
-    public static String createQueryString(String query, String param) {
-        return query.replaceAll("%1", param);
-    }
-
-    public static String createQueryString(String query, List params) {
-        String output = query;
-        int count = 1;
-        for (Iterator i = params.iterator(); i.hasNext();) {
-            output = output.replaceAll("%" + count++, i.next().toString());
-        }
-
-        return output;
-    }
-
-    public static QueryFilter createMBeansObjectNameQuery(MBeanServerConnection jmxConnection) {
-        // Let us be able to accept wildcard queries
-        // Use regular expressions to filter the query results
-        // Let us retrieve the mbeans object name specified by the query
-        return new WildcardToRegExTransformFilter(new MBeansRegExQueryFilter(new MBeansObjectNameQueryFilter(jmxConnection)));
-    }
-
-    public static QueryFilter createMBeansAttributeQuery(MBeanServerConnection jmxConnection, Set attributes) {
-        // Let use be able to accept wildcard queries
-        // Use regular expressions to filter the query result
-        // Retrieve the attributes needed
-        // Retrieve the mbeans object name specified by the query
-        return new WildcardToRegExTransformFilter(new MBeansRegExQueryFilter(new MBeansAttributeQueryFilter(jmxConnection, attributes, new MBeansObjectNameQueryFilter(jmxConnection))));
-    }
-
-    public static QueryFilter createMessageQueryFilter(MBeanServerConnection jmxConnection, ObjectName destName) {
-        return new WildcardToMsgSelectorTransformFilter(new MessagesQueryFilter(jmxConnection, destName));
-    }
-
-    public static List filterMessagesView(List messages, Set groupViews, Set attributeViews) throws Exception {
-        return (new PropertiesViewFilter(attributeViews, new GroupPropertiesViewFilter(groupViews, new MapTransformFilter(new StubQueryFilter(messages))))).query("");
-    }
-}
diff --git a/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/SimpleConsole.java b/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/SimpleConsole.java
deleted file mode 100644
index c660f8a..0000000
--- a/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/SimpleConsole.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.console.util;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-import org.apache.activemq.broker.util.CommandMessageListener;
-
-/**
- * A simple interactive console which can be used to communicate with a running
- * broker assuming that the classpath is fully setup
- * 
- * 
- */
-public final class SimpleConsole {
-    
-    private SimpleConsole() {
-    }
-
-    public static void main(String[] args) {
-        CommandMessageListener listener = new CommandMessageListener(null);
-
-        try {
-            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
-            while (true) {
-                String line = reader.readLine();
-                if (line == null || "quit".equalsIgnoreCase(line)) {
-                    break;
-                }
-                line = line.trim();
-                if (line.length() == 0) {
-                    continue;
-                }
-
-                System.out.println(listener.processCommandText(line));
-            }
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/trunk/activemq-console/src/main/resources/META-INF/services/org/apache/activemq/broker/agent b/trunk/activemq-console/src/main/resources/META-INF/services/org/apache/activemq/broker/agent
deleted file mode 100644
index 614b162..0000000
--- a/trunk/activemq-console/src/main/resources/META-INF/services/org/apache/activemq/broker/agent
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.console.ConsoleCommandHandler
diff --git a/trunk/activemq-console/src/main/resources/org/apache/activemq/console/command/store/amq/help.txt b/trunk/activemq-console/src/main/resources/org/apache/activemq/console/command/store/amq/help.txt
deleted file mode 100644
index afc70fb..0000000
--- a/trunk/activemq-console/src/main/resources/org/apache/activemq/console/command/store/amq/help.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-Usage:
-  java org.apache.activemq.console.command.store.amq.AMQJournalTool [options]* (directory) * 
-  
-Displays the records stored in the Journal log files used by ActiveMQ.  This
-tool supports loading the journal data files from multiple directories.  Normally
-it is run against the journal archive directory and the active journal directory.
-
-This tool supports controlling the output format using Velocity [1] templates.  
-It also supports filtering out records using a SQL like WHERE syntax implemented
-using JoSQL.
-  
-Options to control output format:
-  
-Any valid Velocity Template Language (VTL) expression can be used to control the 
-display of the record.  
-  
-  --message-format=VTL          The format used to display message records. Message
-      records get created every time a producer sends a persistent message to the broker.
-      The message gets recorded in the journal even if it's transaction is rolled back.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageId}|${record.properties}|${body}
-      
-  --topic-ack-format=VTL        The format used to display topic ack records.  A topic
-      ack records that a durable subscription for a topic has acknowleged a set of messages.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.clientId}|${record.subscritionName}|${record.messageId}
-      
-  --queue-ack-format=VTL        The format used to display queue ack records. A queue
-      ack records that a consumer for a quue has acknowleged a message.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageAck.lastMessageId}
-      
-  --transaction-format=VTL      The format used to display transaction records. Transaction records
-      are used to record transaction related actions like commit and rollback.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.transactionId}
-      
-  --trace-format=VTL            The format used to display trace records.
-      Trace records are informational messages stored in the journal that assist in Auditing.  
-      For example a trace message is recorded whenever the broker is restarted or when the 
-      long term store is checkpointed.  
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.message}
-  
-Options to control the selection of records displayed:  
-  --where=VALUE                 The where clause used to control the records selected
-      for display.  It can select on all the fields available in the velocity context.
-      example:  --where="type='ActiveMQTextMessage' and location.dataFileId > 2"
-      
-Other Options:
-  --help                        Show this help screen.
-
-Example:
-
-  java org.apache.activemq.console.command.store.amq.AMQJournalTool /path/to/archive /path/to/journal
-  
- 
\ No newline at end of file
diff --git a/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Consumer.java b/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Consumer.java
deleted file mode 100644
index b82ccd6..0000000
--- a/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Consumer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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 SimpleQueueSender class consists only of a main method,
- * which sends several messages to a queue.
- *
- * Run this program in conjunction with SimpleQueueReceiver.
- * Specify a queue name on the command line when you run the
- * program.  By default, the program sends one message.  Specify
- * a number after the queue name to send that number of messages.
- */
-package org.apache.activemq.simple;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- *
- */
-public final class Consumer {
-
-    /**
-     *
-     */
-    private Consumer() {
-    }
-
-    public static void main(String[] args) throws JMSException, InterruptedException {
-
-        String url = "tcp://localhost:61616";
-        if (args.length > 0) {
-            url = args[0];
-        }
-
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
-        Destination destination = new ActiveMQQueue("TEST.QUEUE");
-
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        for (;;) {
-            System.out.println("Waiting for message.");
-            Message message = consumer.receive();
-            if (message == null) {
-                break;
-            }
-            System.out.println("Got message: " + message);
-        }
-
-        connection.close();
-    }
-}
-
-// END SNIPPET: demo
diff --git a/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java b/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java
deleted file mode 100644
index e132324..0000000
--- a/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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 SimpleQueueSender class consists only of a main method,
- * which sends several messages to a queue.
- *
- * Run this program in conjunction with SimpleQueueReceiver.
- * Specify a queue name on the command line when you run the
- * program.  By default, the program sends one message.  Specify
- * a number after the queue name to send that number of messages.
- */
-package org.apache.activemq.simple;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class Producer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Producer.class);
-
-    private Producer() {
-    }
-
-    public static void main(String[] args) throws JMSException, InterruptedException {
-
-        String url = "peer://localhost1/groupA?persistent=false";
-        if (args.length > 0) {
-            url = args[0];
-        }
-
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
-        Destination destination = new ActiveMQQueue("TEST.QUEUE");
-
-        Connection connection = connectionFactory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage();
-        for (int i = 0; i < 1000; i++) {
-            message.setText("This is message " + (i + 1));
-            LOG.info("Sending message: " + message.getText());
-            producer.send(message);
-            Thread.sleep(1000);
-        }
-        connection.close();
-
-    }
-}
-
-// END SNIPPET: demo
diff --git a/trunk/activemq-console/src/test/resources/activemq.xml b/trunk/activemq-console/src/test/resources/activemq.xml
deleted file mode 100644
index ab02806..0000000
--- a/trunk/activemq-console/src/test/resources/activemq.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-  
-  <!-- Default configuration -->
-  <broker useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-	  
-	<persistenceFactory>
-	  <journalPersistenceAdapterFactory journalLogFiles="2" dataDirectory="target/foo"/>
-	</persistenceFactory>
-
-	<transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnector>
-    	  
-  </broker>
-
-  <!-- Example of broker configuration that uses new logging options and dynamic management of logging
-  <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core" persistent="false" deleteAllMessagesOnStartup="true">
-  
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616?trace=true&amp;logWriterName=custom&amp;dynamicManagement=true&amp;startLogging=true"/>
-    </transportConnectors>
-    
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-    
-  </broker>
-  End of example-->
-  
-<!-- Note: the jmxPort=portnumber option on transportConnectors should only be used on clients.
-On brokers, there is a default port (usually 1099) -->
-  
-  
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-console/src/test/resources/log4j.properties b/trunk/activemq-console/src/test/resources/log4j.properties
deleted file mode 100644
index f8bb2ea..0000000
--- a/trunk/activemq-console/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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=DEBUG, stdout
-log4j.logger.org.apache.activemq.spring=WARN
-
-# 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
-
-# Example of properties to make use of new logging options
-#
-#log4j.rootLogger=INFO, A
-#log4j.additivity.org.apache.activemq.transport.TransportLogger=false
-#log4j.logger.org.apache.activemq.transport.TransportLogger=DEBUG, B
-#
-# 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 for normal output
-#log4j.appender.A=org.apache.log4j.FileAppender
-#log4j.appender.A.File=applog
-#log4j.appender.A.BufferedIO=false
-#log4j.appender.A.layout=org.apache.log4j.PatternLayout
-#log4j.appender.A.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-#
-# File appender for transport level logging output
-#log4j.appender.B=org.apache.log4j.FileAppender
-#log4j.appender.B.File=transportlog
-#log4j.appender.B.BufferedIO=false
-#log4j.appender.B.layout=org.apache.log4j.PatternLayout
-#log4j.appender.B.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-#
-# End of example
\ No newline at end of file
diff --git a/trunk/activemq-core/pom.xml b/trunk/activemq-core/pom.xml
deleted file mode 100755
index 4af6ffd..0000000
--- a/trunk/activemq-core/pom.xml
+++ /dev/null
@@ -1,705 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-core</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Core</name>
-  <description>The ActiveMQ Message Broker and Client implementations</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-      com.thoughtworks.xstream*;resolution:=optional,
-      javax.xml.stream*;resolution:=optional,
-      org.codehaus.jettison*;resolution:=optional,
-      org.apache.activeio*;resolution:=optional,
-      org.apache.camel*;resolution:=optional,
-      org.apache.commons.pool*;resolution:=optional,
-      org.apache.commons.net*;resolution:=optional,
-      org.apache.derby*;resolution:=optional,
-      org.apache.tools.ant*;resolution:=optional,
-      org.apache.maven*;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,
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.activemq*;version=${project.version};-noimport:=true,
-      '=META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema';-noimport:=true
-    </activemq.osgi.export>
-    <activemq.osgi.dynamic.import>*</activemq.osgi.dynamic.import>
-    <surefire.argLine>-Xmx512M</surefire.argLine>
-  </properties>
-
-  <dependencies>
-
-    <!-- =============================== -->
-    <!-- Required Dependencies -->
-    <!-- =============================== -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-      <optional>false</optional>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>kahadb</artifactId>
-      <optional>false</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq.protobuf</groupId>
-      <artifactId>activemq-protobuf</artifactId>
-      <optional>false</optional>
-    </dependency>
-
-    <!-- =============================== -->
-    <!-- Optional Dependencies           -->
-    <!-- =============================== -->
-
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-    </dependency>
-    
-
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-jaas</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-annotation_1.0_spec</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jacc_1.1_spec</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-      <optional>true</optional>
-    </dependency>        
-    <dependency>
-        <groupId>org.codehaus.jettison</groupId>
-        <artifactId>jettison</artifactId>
-        <optional>true</optional>
-    </dependency>
-
-    <!-- for XML parsing -->
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax-api</artifactId>
-      <optional>true</optional>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-    </dependency>    
-
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>xalan</groupId>
-      <artifactId>xalan</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>commons-net</groupId>
-      <artifactId>commons-net</artifactId>
-    </dependency>
-
-    <!-- not really a dependency at all - just added optionally to get the generator working -->
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-openwire-generator</artifactId>
-      <optional>true</optional>
-    </dependency>
-
-    <!-- =============================== -->
-    <!-- Testing Dependencies            -->
-    <!-- =============================== -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-      <optional>false</optional>
-      <type>test-jar</type>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-jms</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-jmdns_1.0</artifactId>
-      <optional>true</optional>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jasypt</groupId>
-      <artifactId>jasypt</artifactId>
-    </dependency>
-
-    <!-- database testing -->
-    <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>commons-primitives</groupId>
-      <artifactId>commons-primitives</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>axion</groupId>
-      <artifactId>axion</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>regexp</groupId>
-      <artifactId>regexp</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <!--  LDAP tests -->
-    <dependency>
-      <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-core</artifactId>
-      <version>1.0.0</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jmock</groupId>
-      <artifactId>jmock-junit4</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jmock</groupId>
-      <artifactId>jmock-legacy</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.ftpserver</groupId>
-      <artifactId>ftpserver-core</artifactId>
-      <version>${ftpserver-version}</version>
-      <scope>test</scope>
-    </dependency>
-
-
-  </dependencies>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <configuration>
-          <links>
-            <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
-            <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
-            <link>http://jakarta.apache.org/commons/logging/apidocs/</link>
-            <link>http://junit.sourceforge.net/javadoc/</link>
-          </links>
-          <stylesheetfile>${basedir}/../etc/css/stylesheet.css</stylesheetfile>
-          <linksource>true</linksource>
-          <maxmemory>256m</maxmemory>
-          <source>1.5</source>
-          <groups>
-            <group>
-              <title>JMS Client</title>
-              <packages>org.apache.activemq:org.apache.activemq.command</packages>
-            </group>
-            <group>
-              <title>JMS Client support classes for working with BLOBs and JNDI</title>
-              <packages>org.apache.activemq.blob:org.apache.activemq.jndi</packages>
-            </group>
-            <group>
-              <title>Enterprise Integration Pattern support via Camel</title>
-              <packages>org.apache.activemq.camel:org.apache.activemq.camel.*</packages>
-            </group>
-            <group>
-              <title>Spring support</title>
-              <packages>org.apache.activemq.spring:org.apache.activemq.xbean:org.apache.activemq.pool</packages>
-            </group>
-            <group>
-              <title>JMS Client Implementation classes</title>
-              <packages>org.apache.activemq.filter:org.apache.activemq.management:org.apache.activemq.selector:org.apache.activemq.thread</packages>
-            </group>
-            <group>
-              <title>Broker implementation</title>
-              <packages>org.apache.activemq.advisory:org.apache.activemq.broker:org.apache.activemq.broker.*:org.apache.activemq.state:org.apache.activemq.security:org.apache.activemq.transaction</packages>
-            </group>
-            <group>
-              <title>Broker Persistent Store</title>
-              <packages>org.apache.activemq.store:org.apache.activemq.store.*</packages>
-            </group>
-            <group>
-              <title>Kaha fast file based storage</title>
-              <packages>org.apache.activemq.kaha:org.apache.activemq.kaha.*</packages>
-            </group>
-            <group>
-              <title>Transports</title>
-              <packages>org.apache.activemq.transport:org.apache.activemq.transport.*</packages>
-            </group>
-            <group>
-              <title>Memory handling</title>
-              <packages>org.apache.activemq.memory:org.apache.activemq.memory.*</packages>
-            </group>
-            <group>
-              <title>Networks of Brokers</title>
-              <packages>org.apache.activemq.network:org.apache.activemq.network.*</packages>
-            </group>
-            <group>
-              <title>OpenWire support</title>
-              <packages>org.apache.activemq.openwire:org.apache.activemq.openwire.*</packages>
-            </group>
-            <group>
-              <title>Utility classes</title>
-              <packages>org.apache.activemq.util:org.apache.activemq.wireformat:org.apache.activemq.proxy</packages>
-            </group>
-          </groups>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <version>1.1</version>
-        <configuration>
-          <threshold>Normal</threshold>
-          <effort>Default</effort>
-        </configuration>
-      </plugin>
-    </plugins>
-    </reporting>
-    
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-          <instructions>
-            <Bundle-Activator>org.apache.activemq.util.osgi.Activator</Bundle-Activator>
-          </instructions>
-        </configuration>
-      </plugin>
-      
-      <!-- Configure which tests are included/excuded -->
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>pertest</forkMode>
-          <childDelegation>false</childDelegation>
-          <useFile>true</useFile>
-          <argLine>${surefire.argLine}</argLine>
-
-           <systemProperties>
-            <property>
-              <name>org.apache.activemq.default.directory.prefix</name>
-              <value>target/</value>
-            </property>
-            <!-- Uncomment the following if you want to configure custom logging (using src/test/resources/log4j.properties)
-                 while running mvn:test
-                 Note: if you want to see log messages on the console window remove
-                       "redirectTestOutputToFile" from the parent pom
-            -->
-            <!--           
-            <property>
-              <name>log4j.configuration</name>
-              <value>file:target/test-classes/log4j.properties</value>
-            </property>
-            -->
-          </systemProperties>
-
-          <includes>
-            <include>**/*Test.*</include>
-          </includes>
-          <excludes>
-            <exclude>**/perf/SimpleDurableTopicTest.*</exclude>
-            <!-- These tests run too slow to execute as part of the unit tests -->
-            <exclude>**/TransactionNotStartedErrorTest.*</exclude>
-            <exclude>**/DefaultStoreBrokerTest.*</exclude>
-            <exclude>**/TcpTransportBrokerTest.*</exclude>
-            <exclude>**/activeio/*</exclude>
-
-            <!-- These are performance tests so take too long to run -->
-            <exclude>**/perf/*</exclude>
-            
-            <!-- These are load tests so take too long to run -->
-            <exclude>**/load/*</exclude>
-
-            <!-- http://jira.activemq.org/jira/browse/AMQ-626 -->
-            <exclude>**/MultipleTestsWithSpringFactoryBeanTest.*</exclude>
-            <exclude>**/MultipleTestsWithXBeanFactoryBeanTest.*</exclude>
-            <exclude>**/MultipleTestsWithSpringXBeanFactoryBeanTest.*</exclude>
-
-            <!--  these seem to fail only in m2 -->
-            <!--<exclude>**/TransactedTopicMasterSlaveTest.*</exclude>-->
-
-            <!-- Kaha in flux - removing tests -->
-            <exclude>**/KahaDBStoreXARecoveryBrokerTest.*</exclude>
-            <exclude>**/KahaDBStoreRecoveryBrokerTest.*</exclude>
-
-            <!-- Multicast and UDP based tests fail on GBuild -->
-            <exclude>**/PeerTransportTest.*</exclude>
-            <exclude>**/MulticastTransportTest.*</exclude>
-            <exclude>**/MulticastNetworkTest.*</exclude>
-            <exclude>**/UnreliableUdpTransportTest.*</exclude>
-            <exclude>**/SslTransportBrokerTest.*</exclude>
-
-            <!-- this one is a little flaky and can fail on some platforms randomly -->
-            <exclude>**/QuickJournalRecoveryBrokerTest.*</exclude>
-            <exclude>**/QuickJournalXARecoveryBrokerTest.*</exclude>
-            <exclude>**/RendezvousDiscoverTransportTest.*</exclude>
-            <exclude>**/MissingDataFileTest.*</exclude>
-
-            <!-- UDP related tests someimes fail on some platforms -->
-            <exclude>**/UdpTransportTest.*</exclude>
-            <exclude>**/UdpTransportUsingServerTest.*</exclude>
-            <exclude>**/UdpSendReceiveWithTwoConnectionsTest.*</exclude>
-            <exclude>**/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.*</exclude>
-
-            <!-- m2 tests failing since move from assembly  -->
-            <exclude>**/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.*</exclude>
-            <exclude>**/TwoBrokerQueueClientsReconnectTest.*</exclude>
-            <exclude>**/QueueConsumerCloseAndReconnectTest.*</exclude>
-            <exclude>**/TwoBrokerMulticastQueueTest.*</exclude>
-
-            <!-- TODO move to optional module...  -->
-            <exclude>**/TwoBrokerTopicSendReceiveUsingHttpTest.*</exclude>
-
-            <!-- This test only works on machines which have ssh propertly configured -->
-            <exclude>**/SSHTunnelNetworkReconnectTest.*</exclude>
-
-            <!--  see  http://issues.apache.org/activemq/browse/AMQ-826 -->
-            <!--  have not yet figured out the way to configure ApacheDS via Spring  -->
-            <exclude>**/LDAPAuthorizationMapTest.*</exclude>
-
-            <!-- http://issues.apache.org/activemq/browse/AMQ-1027 -->
-            <exclude>**/FailoverConsumerTest.*</exclude>
-
-            <!-- The NIO implemenation is not working properly on OS X.. -->
-            <exclude>**/nio/**</exclude>
-            <exclude>**/NioQueueSubscriptionTest.*/</exclude>
-
-             <!-- A test used for memory profiling only. -->
-             <exclude>**/NetworkConnectionsCleanedupTest.*/**</exclude>
-             
-             <exclude>**/NetworkConnectionsCleanedupTest.*/**</exclude>
-             
-             <!-- used just to test potential memory leaks manually -->
-             <exclude>**/JDBCTestMemory.*</exclude>
-             
-             <exclude>**/amq1490/*</exclude>
-             <exclude>**/archive/*</exclude>
-             <exclude>**/NetworkFailoverTest.*/**</exclude>
-             
-             <exclude>**/vm/VMTransportBrokerTest.*</exclude>
-             <exclude>**/broker/MarshallingBrokerTest.*</exclude>
-             
-
-            <exclude>**/AMQDeadlockTest3.*</exclude>
-
-            <!-- https://issues.apache.org/activemq/browse/AMQ-2050 -->
-            <exclude>**/ProxyConnectorTest.*</exclude>
-
-            <!-- breaks hudson: disable till we get a chance to give it the time that it needs - http://hudson.zones.apache.org/hudson/job/ActiveMQ/org.apache.activemq$activemq-core/199/testReport/org.apache.activemq.network/BrokerNetworkWithStuckMessagesTest/testBrokerNetworkWithStuckMessages/ -->
-            <exclude>**/BrokerNetworkWithStuckMessagesTest.*</exclude>
-            
-          </excludes>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.activemq.protobuf</groupId>
-        <artifactId>activemq-protobuf</artifactId>
-         <executions>
-          <execution>
-            <goals>
-              <goal>compile</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-clean-plugin</artifactId>
-        <configuration>
-          <filesets>
-            <fileset>
-              <directory>${basedir}/activemq-data</directory>
-            </fileset>
-          </filesets>
-        </configuration>
-      </plugin>
-      
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-
-        <executions>
-	        <execution>
-            <id>package</id>
-            <phase>package</phase>
-            <configuration>
-              <tasks>
-                <echo>Deleting unwanted resources from the test-jar</echo>
-                <delete dir="${project.build.directory}/test-classes" verbose="true">
-									<include name="*.*" />
-								</delete>
-              </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-  
-          <execution>
-            <id>site</id>
-            <phase>site</phase>
-            <configuration>
-              <tasks>
-                <echo>Running the XSDDoc task</echo>
-                <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" />
-                <mkdir dir="${basedir}/target/site/xsddoc" />
-                <xsddoc file="${basedir}/target/classes/activemq.xsd" out="${basedir}/target/site/xsddoc" doctitle="Apache ActiveMQ XML Schema Reference" header="&lt;a href='http://activemq.apache.org/'&gt;Apache ActiveMQ&lt;/a&gt;" footer="Copyright 2007 (c) the &lt;a href='http://www.apache.org/'&gt;Apache Software Foundation&lt;/a&gt;" verbose="false" />
-                <!--
-                        css="${basedir}/../etc/css/stylesheet.css"
-                -->
-              </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-        <dependencies>
-          <dependency>
-            <groupId>xsddoc</groupId>
-            <artifactId>maven-xsddoc-plugin</artifactId>
-            <version>1.0</version>
-          </dependency>
-        </dependencies>
-      </plugin>
-
-      <!-- generate the attached tests jar -->
-      <plugin>
-        <artifactId>maven-jar-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>javacc-maven-plugin</artifactId>
-        <version>2.0</version>
-        <executions>
-          <execution>
-            <phase>generate-sources</phase>
-            <configuration>
-              <sourceDirectory>${basedir}/src/main/grammar</sourceDirectory>
-              <outputDirectory>${basedir}/target/generated-javacc</outputDirectory>
-              <packageName>org.apache.activemq.selector</packageName>
-            </configuration>
-            <goals>
-              <goal>javacc</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>maven-xbean-plugin</artifactId>
-        <version>${xbean-version}</version>
-        <executions>
-          <execution>
-          <phase>process-classes</phase>
-            <configuration>
-              <namespace>http://activemq.apache.org/schema/core</namespace>
-              <schema>${basedir}/target/classes/activemq.xsd</schema>
-              <outputDir>${basedir}/target/classes</outputDir>
-              <generateSpringSchemasFile>false</generateSpringSchemasFile>
-              <excludedClasses>org.apache.activemq.broker.jmx.AnnotatedMBean,org.apache.activemq.broker.jmx.DestinationViewMBean</excludedClasses>
-            </configuration>
-            <goals>
-              <goal>mapping</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>2.0</version>
-        <configuration>
-	  <check>
-            <branchRate>50</branchRate>
-            <lineRate>50</lineRate>
-            <haltOnFailure>true</haltOnFailure>
-            <totalBranchRate>50</totalBranchRate>
-            <totalLineRate>50</totalLineRate>
-          </check>
-        </configuration>
-      </plugin>      
-    </plugins>
-  </build>
-
-  <profiles>
-    
-    <profile>
-      <id>openwire-generate</id>
-      <dependencies>
-        <dependency>
-          <groupId>org.apache.activemq</groupId>
-          <artifactId>activemq-openwire-generator</artifactId>
-          <version>${activemq-version}</version>
-          <optional>true</optional>
-        </dependency>
-      </dependencies>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>default</id>
-                <phase>generate-sources</phase>
-                <configuration>
-                  <tasks>
-                    <echo>Running OpenWire Generator</echo>
-                    <taskdef name="generate" classname="org.apache.activemq.openwire.tool.JavaGeneratorTask" classpathref="maven.compile.classpath" />
-                    <generate version="7" basedir="${basedir}" />
-                  </tasks>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    
-    <profile>
-      <id>jdk1.4</id>
-      <activation>
-        <jdk>1.4</jdk>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>activesoap</groupId>
-          <artifactId>jaxp-api</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-    
-  </profiles>
-
-</project>
diff --git a/trunk/activemq-core/src/main/grammar/SelectorParser.jj b/trunk/activemq-core/src/main/grammar/SelectorParser.jj
deleted file mode 100755
index 176ec23..0000000
--- a/trunk/activemq-core/src/main/grammar/SelectorParser.jj
+++ /dev/null
@@ -1,611 +0,0 @@
-/**
- * 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.
- */
-
-// ----------------------------------------------------------------------------
-// OPTIONS
-// ----------------------------------------------------------------------------
-options {
-  STATIC = false;
-  UNICODE_INPUT = true;
-  
-  // some performance optimizations
-  OPTIMIZE_TOKEN_MANAGER = true;
-  ERROR_REPORTING = false;
-}
-
-// ----------------------------------------------------------------------------
-// PARSER
-// ----------------------------------------------------------------------------
-
-PARSER_BEGIN(SelectorParser)
-/**
- * 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.selector;
-
-import java.io.*;
-import java.util.*;
-
-import javax.jms.InvalidSelectorException;
-
-import org.apache.activemq.filter.*;
-import org.apache.activemq.util.LRUCache;
-
-/** 
- * JMS Selector Parser generated by JavaCC
- * 
- * Do not edit this .java file directly - it is autogenerated from SelectorParser.jj
- */
-public class SelectorParser {
-
-    private static final Map cache = Collections.synchronizedMap(new LRUCache(100));
-
-    public static BooleanExpression parse(String sql) throws InvalidSelectorException {
-        Object result = cache.get(sql);
-        if (result instanceof InvalidSelectorException) {
-            throw (InvalidSelectorException) result;
-        } else if (result instanceof BooleanExpression) {
-            return (BooleanExpression) result;
-        } else {
-            try {
-                BooleanExpression e = new SelectorParser(sql).parse();
-                cache.put(sql, e);
-                return e;
-            } catch (InvalidSelectorException t) {
-                cache.put(sql, t);
-                throw t;
-            }
-        }
-    }
-
-    public static void clearCache() {
-        cache.clear();
-    }
-
-    private String sql;
-
-    protected SelectorParser(String sql) {
-        this(new StringReader(sql));
-        this.sql = sql;
-    }
-
-    protected BooleanExpression parse() throws InvalidSelectorException {
-        try {
-            return this.JmsSelector();
-        }
-        catch (Throwable e) {
-            throw (InvalidSelectorException) new InvalidSelectorException(sql).initCause(e);
-        }
-    }
-
-    private BooleanExpression asBooleanExpression(Expression value) throws ParseException  {
-        if (value instanceof BooleanExpression) {
-            return (BooleanExpression) value;
-        }
-        if (value instanceof PropertyExpression) {
-            return UnaryExpression.createBooleanCast( value );
-        }
-        throw new ParseException("Expression will not result in a boolean value: " + value);
-    }
-    
-
-}
-
-PARSER_END(SelectorParser)
-
-// ----------------------------------------------------------------------------
-// Tokens
-// ----------------------------------------------------------------------------
-
-/* White Space */
-SPECIAL_TOKEN :
-{
-  " " | "\t" | "\n" | "\r" | "\f"
-}
-
-/* Comments */
-SKIP:
-{
-  <LINE_COMMENT: "--" (~["\n","\r"])* ("\n"|"\r"|"\r\n") >
-}
-
-SKIP:
-{
-  <BLOCK_COMMENT: "/*" (~["*"])* "*" ("*" | (~["*","/"] (~["*"])* "*"))* "/">
-}
-
-/* Reserved Words */
-TOKEN [IGNORE_CASE] :
-{
-    <  NOT     : "NOT">
-  | <  AND     : "AND">
-  | <  OR      : "OR">
-  | <  BETWEEN : "BETWEEN">
-  | <  LIKE    : "LIKE">
-  | <  ESCAPE  : "ESCAPE">
-  | <  IN      : "IN">
-  | <  IS      : "IS">
-  | <  TRUE    : "TRUE" >
-  | <  FALSE   : "FALSE" >
-  | <  NULL    : "NULL" >
-  | <  XPATH   : "XPATH" >
-  | <  XQUERY  : "XQUERY" >
-}
-
-/* Literals */
-TOKEN [IGNORE_CASE] :
-{
-
-    < DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* (["l","L"])? >
-  | < HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ >
-  | < OCTAL_LITERAL: "0" (["0"-"7"])* >  
-  | < FLOATING_POINT_LITERAL:  		  
-          (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)? // matches: 5.5 or 5. or 5.5E10 or 5.E10
-        | "." (["0"-"9"])+ (<EXPONENT>)?              // matches: .5 or .5E10
-        | (["0"-"9"])+ <EXPONENT>                     // matches: 5E10
-    >
-  | < #EXPONENT: "E" (["+","-"])? (["0"-"9"])+ >
-  | < STRING_LITERAL: "'" ( ("''") | ~["'"] )*  "'" >
-}
-
-TOKEN [IGNORE_CASE] :
-{
-    < ID : ["a"-"z", "_", "$"] (["a"-"z","0"-"9","_", "$"])* >
-}
-
-// ----------------------------------------------------------------------------
-// Grammer
-// ----------------------------------------------------------------------------
-BooleanExpression JmsSelector() :
-{
-    Expression left=null;
-}
-{
-    (
-        left = orExpression()
-    ) 
-    {
-        return asBooleanExpression(left);
-    }
-
-}
-
-Expression orExpression() :
-{
-    Expression left;
-    Expression right;
-}
-{
-    (
-        left = andExpression() 
-        ( 
-            <OR> right = andExpression() 
-            {
-                left = LogicExpression.createOR(asBooleanExpression(left), asBooleanExpression(right));
-            }
-        )*
-    ) 
-    {
-        return left;
-    }
-
-}
-
-
-Expression andExpression() :
-{
-    Expression left;
-    Expression right;
-}
-{
-    (
-        left = equalityExpression() 
-        ( 
-            <AND> right = equalityExpression() 
-            {
-                left = LogicExpression.createAND(asBooleanExpression(left), asBooleanExpression(right));
-            }
-        )*
-    ) 
-    {
-        return left;
-    }
-}
-
-Expression equalityExpression() :
-{
-    Expression left;
-    Expression right;
-}
-{
-    (
-        left = comparisonExpression() 
-        ( 
-            
-            "=" right = comparisonExpression() 
-            {
-                left = ComparisonExpression.createEqual(left, right);
-            }
-            |            
-            "<>" right = comparisonExpression() 
-            {
-                left = ComparisonExpression.createNotEqual(left, right);
-            }
-            |            
-            LOOKAHEAD(2)
-            <IS> <NULL>
-            {
-                left = ComparisonExpression.createIsNull(left);
-            }
-            |            
-            <IS> <NOT> <NULL>
-            {
-                left = ComparisonExpression.createIsNotNull(left);
-            }
-        )*
-    ) 
-    {
-        return left;
-    }
-}
-
-Expression comparisonExpression() :
-{
-    Expression left;
-    Expression right;
-    Expression low;
-    Expression high;
-    String t, u;
-	boolean not;
-	ArrayList list;
-}
-{
-    (
-        left = addExpression() 
-        ( 
-            
-                ">" right = addExpression() 
-                {
-                    left = ComparisonExpression.createGreaterThan(left, right);
-                }
-            |            
-                ">=" right = addExpression() 
-                {
-                    left = ComparisonExpression.createGreaterThanEqual(left, right);
-                }
-            |            
-                "<" right = addExpression() 
-                {
-                    left = ComparisonExpression.createLessThan(left, right);
-                }
-            |            
-                "<=" right = addExpression() 
-                {
-                    left = ComparisonExpression.createLessThanEqual(left, right);
-                }
-           |
-				{
-					u=null;
-				}           		
-		        <LIKE> t = stringLitteral() 
-		        	[ <ESCAPE> u = stringLitteral() ]
-		        {
-                    left = ComparisonExpression.createLike(left, t, u);
-		        }
-           |
-	        	LOOKAHEAD(2)
-				{
-					u=null;
-				}           		
-		        <NOT> <LIKE> t = stringLitteral() [ <ESCAPE> u = stringLitteral() ]
-		        {
-                    left = ComparisonExpression.createNotLike(left, t, u);
-		        }
-            |
-		        <BETWEEN> low = addExpression() <AND> high = addExpression()
-		        {
-					left = ComparisonExpression.createBetween(left, low, high);
-		        }
-	        |
-	        	LOOKAHEAD(2)
-		        <NOT> <BETWEEN> low = addExpression() <AND> high = addExpression()
-		        {
-					left = ComparisonExpression.createNotBetween(left, low, high);
-		        }
-            |
-				<IN> 
-		        "(" 
-		            t = stringLitteral()
-		            {
-			            list = new ArrayList();
-			            list.add( t );
-		            }
-			        ( 
-			        	","
-			            t = stringLitteral() 
-			            {
-				            list.add( t );
-			            }
-			        	
-			        )*
-		        ")"
-		        {
-		           left = ComparisonExpression.createInFilter(left, list);
-		        }
-            |
-	        	LOOKAHEAD(2)
-	            <NOT> <IN> 
-		        "(" 
-		            t = stringLitteral()
-		            {
-			            list = new ArrayList();
-			            list.add( t );
-		            }
-			        ( 
-			        	","
-			            t = stringLitteral() 
-			            {
-				            list.add( t );
-			            }
-			        	
-			        )*
-		        ")"
-		        {
-		           left = ComparisonExpression.createNotInFilter(left, list);
-		        }
-            
-        )*
-    ) 
-    {
-        return left;
-    }
-}
-
-Expression addExpression() :
-{
-    Expression left;
-    Expression right;
-}
-{
-    left = multExpr() 
-    ( 
-	    LOOKAHEAD( ("+"|"-") multExpr())
-	    (
-	        "+" right = multExpr() 
-	        {
-	            left = ArithmeticExpression.createPlus(left, right);
-	        }
-	        |            
-	        "-" right = multExpr() 
-	        {
-	            left = ArithmeticExpression.createMinus(left, right);
-	        }
-        )
-        
-    )*
-    {
-        return left;
-    }
-}
-
-Expression multExpr() :
-{
-    Expression left;
-    Expression right;
-}
-{
-    left = unaryExpr() 
-    ( 
-        "*" right = unaryExpr() 
-        {
-	        left = ArithmeticExpression.createMultiply(left, right);
-        }
-        |            
-        "/" right = unaryExpr() 
-        {
-	        left = ArithmeticExpression.createDivide(left, right);
-        }
-        |            
-        "%" right = unaryExpr() 
-        {
-	        left = ArithmeticExpression.createMod(left, right);
-        }
-        
-    )*
-    {
-        return left;
-    }
-}
-
-
-Expression unaryExpr() :
-{
-    String s=null;
-    Expression left=null;
-}
-{
-	(
-		LOOKAHEAD( "+" unaryExpr() )
-	    "+" left=unaryExpr()
-	    |
-	    "-" left=unaryExpr()
-	    {
-	        left = UnaryExpression.createNegate(left);
-	    }
-	    |
-	    <NOT> left=unaryExpr()
-	    {
-		    left = UnaryExpression.createNOT( asBooleanExpression(left) );
-	    }
-	    |
-	    <XPATH> s=stringLitteral()
-	    {
-		    left = UnaryExpression.createXPath( s );
-	    }
-	    |
-	    <XQUERY> s=stringLitteral()
-	    {
-		    left = UnaryExpression.createXQuery( s );
-	    }
-	    |
-	    left = primaryExpr()
-    )
-    {
-        return left;
-    }
-
-}
-
-Expression primaryExpr() :
-{
-    Expression left=null;
-}
-{
-    (
-        left = literal()
-        |
-        left = variable()
-        |
-        "(" left = orExpression() ")"
-    ) 
-    {
-        return left;
-    }
-}
-
-
-
-ConstantExpression literal() :
-{
-    Token t;
-    String s;
-    ConstantExpression left=null;
-}
-{
-    (
-        (
-            s = stringLitteral()
-            {
-                left = new ConstantExpression(s);
-            }
-        ) 
-        | 
-        (
-            t = <DECIMAL_LITERAL>
-            {
-            	left = ConstantExpression.createFromDecimal(t.image);
-            }    
-        ) 
-        | 
-        (
-            t = <HEX_LITERAL>
-            {
-            	left = ConstantExpression.createFromHex(t.image);
-            }    
-        ) 
-        | 
-        (
-            t = <OCTAL_LITERAL>
-            {
-            	left = ConstantExpression.createFromOctal(t.image);
-            }    
-        ) 
-        | 
-        (
-            t = <FLOATING_POINT_LITERAL>
-            {
-            	left = ConstantExpression.createFloat(t.image);
-            }    
-        ) 
-        | 
-        (
-            <TRUE>
-            {
-                left = ConstantExpression.TRUE;
-            }    
-        ) 
-        | 
-        (
-            <FALSE>
-            {
-                left = ConstantExpression.FALSE;
-            }    
-        ) 
-        | 
-        (
-            <NULL>
-            {
-                left = ConstantExpression.NULL;
-            }    
-        )
-    )
-    {
-        return left;
-    }
-}
-
-String stringLitteral() :
-{
-    Token t;
-    StringBuffer rc = new StringBuffer();
-    boolean first=true;
-}
-{
-    t = <STRING_LITERAL> 
-    {
-    	// Decode the sting value.
-    	String image = t.image;
-    	for( int i=1; i < image.length()-1; i++ ) {
-    		char c = image.charAt(i);
-    		if( c == '\'' )
-    			i++;    			
-   			rc.append(c);
-    	}
-	    return rc.toString();
-    }    
-}
-
-PropertyExpression variable() :
-{
-    Token t;
-    PropertyExpression left=null;
-}
-{
-    ( 
-        t = <ID> 
-        {
-            left = new PropertyExpression(t.image);
-        }    
-    )
-    {
-        return left;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
deleted file mode 100755
index 101440c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
+++ /dev/null
@@ -1,2389 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.ConnectionMetaData;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicSession;
-import javax.jms.XAConnection;
-import org.apache.activemq.advisory.DestinationSource;
-import org.apache.activemq.blob.BlobTransferPolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ControlCommand;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.management.JMSConnectionStatsImpl;
-import org.apache.activemq.management.JMSStatsImpl;
-import org.apache.activemq.management.StatsCapable;
-import org.apache.activemq.management.StatsImpl;
-import org.apache.activemq.state.CommandVisitorAdapter;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.failover.FailoverTransport;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ActiveMQConnection implements Connection, TopicConnection, QueueConnection, StatsCapable, Closeable, StreamConnection, TransportListener, EnhancedConnection {
-
-    public static final String DEFAULT_USER = ActiveMQConnectionFactory.DEFAULT_USER;
-    public static final String DEFAULT_PASSWORD = ActiveMQConnectionFactory.DEFAULT_PASSWORD;
-    public static final String DEFAULT_BROKER_URL = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQConnection.class);
-    private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
-
-    public final ConcurrentHashMap<ActiveMQTempDestination, ActiveMQTempDestination> activeTempDestinations = new ConcurrentHashMap<ActiveMQTempDestination, ActiveMQTempDestination>();
-
-    protected boolean dispatchAsync=true;
-    protected boolean alwaysSessionAsync = true;
-
-    private TaskRunnerFactory sessionTaskRunner;
-    private final ThreadPoolExecutor executor;
-
-    // Connection state variables
-    private final ConnectionInfo info;
-    private ExceptionListener exceptionListener;
-    private ClientInternalExceptionListener clientInternalExceptionListener;
-    private boolean clientIDSet;
-    private boolean isConnectionInfoSentToBroker;
-    private boolean userSpecifiedClientID;
-
-    // Configuration options variables
-    private ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-    private BlobTransferPolicy blobTransferPolicy;
-    private RedeliveryPolicy redeliveryPolicy;
-    private MessageTransformer transformer;
-
-    private boolean disableTimeStampsByDefault;
-    private boolean optimizedMessageDispatch = true;
-    private boolean copyMessageOnSend = true;
-    private boolean useCompression;
-    private boolean objectMessageSerializationDefered;
-    private boolean useAsyncSend;
-    private boolean optimizeAcknowledge;
-    private boolean nestedMapAndListEnabled = true;
-    private boolean useRetroactiveConsumer;
-    private boolean exclusiveConsumer;
-    private boolean alwaysSyncSend;
-    private int closeTimeout = 15000;
-    private boolean watchTopicAdvisories = true;
-    private long warnAboutUnstartedConnectionTimeout = 500L;
-    private int sendTimeout =0;
-    private boolean sendAcksAsync=true;
-    private boolean checkForDuplicates = true;
-
-    private final Transport transport;
-    private final IdGenerator clientIdGenerator;
-    private final JMSStatsImpl factoryStats;
-    private final JMSConnectionStatsImpl stats;
-
-    private final AtomicBoolean started = new AtomicBoolean(false);
-    private final AtomicBoolean closing = new AtomicBoolean(false);
-    private final AtomicBoolean closed = new AtomicBoolean(false);
-    private final AtomicBoolean transportFailed = new AtomicBoolean(false);
-    private final CopyOnWriteArrayList<ActiveMQSession> sessions = new CopyOnWriteArrayList<ActiveMQSession>();
-    private final CopyOnWriteArrayList<ActiveMQConnectionConsumer> connectionConsumers = new CopyOnWriteArrayList<ActiveMQConnectionConsumer>();
-    private final CopyOnWriteArrayList<ActiveMQInputStream> inputStreams = new CopyOnWriteArrayList<ActiveMQInputStream>();
-    private final CopyOnWriteArrayList<ActiveMQOutputStream> outputStreams = new CopyOnWriteArrayList<ActiveMQOutputStream>();
-    private final CopyOnWriteArrayList<TransportListener> transportListeners = new CopyOnWriteArrayList<TransportListener>();
-
-    // Maps ConsumerIds to ActiveMQConsumer objects
-    private final ConcurrentHashMap<ConsumerId, ActiveMQDispatcher> dispatchers = new ConcurrentHashMap<ConsumerId, ActiveMQDispatcher>();
-    private final ConcurrentHashMap<ProducerId, ActiveMQMessageProducer> producers = new ConcurrentHashMap<ProducerId, ActiveMQMessageProducer>();
-    private final LongSequenceGenerator sessionIdGenerator = new LongSequenceGenerator();
-    private final SessionId connectionSessionId;
-    private final LongSequenceGenerator consumerIdGenerator = new LongSequenceGenerator();
-    private final LongSequenceGenerator producerIdGenerator = new LongSequenceGenerator();
-    private final LongSequenceGenerator tempDestinationIdGenerator = new LongSequenceGenerator();
-    private final LongSequenceGenerator localTransactionIdGenerator = new LongSequenceGenerator();
-
-    private AdvisoryConsumer advisoryConsumer;
-    private final CountDownLatch brokerInfoReceived = new CountDownLatch(1);
-    private BrokerInfo brokerInfo;
-    private IOException firstFailureError;
-    private int producerWindowSize = ActiveMQConnectionFactory.DEFAULT_PRODUCER_WINDOW_SIZE;
-
-    // Assume that protocol is the latest. Change to the actual protocol
-    // version when a WireFormatInfo is received.
-    private final AtomicInteger protocolVersion = new AtomicInteger(CommandTypes.PROTOCOL_VERSION);
-    private final long timeCreated;
-    private final ConnectionAudit connectionAudit = new ConnectionAudit();
-    private DestinationSource destinationSource;
-    private final Object ensureConnectionInfoSentMutex = new Object();
-    private boolean useDedicatedTaskRunner;
-    protected volatile CountDownLatch transportInterruptionProcessingComplete;
-    private long consumerFailoverRedeliveryWaitPeriod;
-    private final Scheduler scheduler;
-    private boolean messagePrioritySupported=true;
-
-    /**
-     * Construct an <code>ActiveMQConnection</code>
-     * 
-     * @param transport
-     * @param factoryStats
-     * @throws Exception
-     */
-    protected ActiveMQConnection(final Transport transport, IdGenerator clientIdGenerator, JMSStatsImpl factoryStats) throws Exception {
-
-        this.transport = transport;
-        this.clientIdGenerator = clientIdGenerator;
-        this.factoryStats = factoryStats;
-
-        // Configure a single threaded executor who's core thread can timeout if
-        // idle
-        executor = new ThreadPoolExecutor(1, 1, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
-            public Thread newThread(Runnable r) {
-                Thread thread = new Thread(r, "ActiveMQ Connection Executor: " + transport);
-                thread.setDaemon(true);
-                return thread;
-            }
-        });
-        // asyncConnectionThread.allowCoreThreadTimeOut(true);
-        String uniqueId = CONNECTION_ID_GENERATOR.generateId();
-        this.info = new ConnectionInfo(new ConnectionId(uniqueId));
-        this.info.setManageable(true);
-        this.info.setFaultTolerant(transport.isFaultTolerant());
-        this.connectionSessionId = new SessionId(info.getConnectionId(), -1);
-
-        this.transport.setTransportListener(this);
-
-        this.stats = new JMSConnectionStatsImpl(sessions, this instanceof XAConnection);
-        this.factoryStats.addConnection(this);
-        this.timeCreated = System.currentTimeMillis();
-        this.connectionAudit.setCheckForDuplicates(transport.isFaultTolerant());
-        this.scheduler = new Scheduler("ActiveMQConnection["+uniqueId+"] Scheduler");
-        this.scheduler.start();
-    }
-
-    protected void setUserName(String userName) {
-        this.info.setUserName(userName);
-    }
-
-    protected void setPassword(String password) {
-        this.info.setPassword(password);
-    }
-
-    /**
-     * A static helper method to create a new connection
-     * 
-     * @return an ActiveMQConnection
-     * @throws JMSException
-     */
-    public static ActiveMQConnection makeConnection() throws JMSException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
-        return (ActiveMQConnection)factory.createConnection();
-    }
-
-    /**
-     * A static helper method to create a new connection
-     * 
-     * @param uri
-     * @return and ActiveMQConnection
-     * @throws JMSException
-     */
-    public static ActiveMQConnection makeConnection(String uri) throws JMSException, URISyntaxException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(uri);
-        return (ActiveMQConnection)factory.createConnection();
-    }
-
-    /**
-     * A static helper method to create a new connection
-     * 
-     * @param user
-     * @param password
-     * @param uri
-     * @return an ActiveMQConnection
-     * @throws JMSException
-     */
-    public static ActiveMQConnection makeConnection(String user, String password, String uri) throws JMSException, URISyntaxException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(user, password, new URI(uri));
-        return (ActiveMQConnection)factory.createConnection();
-    }
-
-    /**
-     * @return a number unique for this connection
-     */
-    public JMSConnectionStatsImpl getConnectionStats() {
-        return stats;
-    }
-
-    /**
-     * Creates a <CODE>Session</CODE> object.
-     * 
-     * @param transacted indicates whether the session is transacted
-     * @param acknowledgeMode indicates whether the consumer or the client will
-     *                acknowledge any messages it receives; ignored if the
-     *                session is transacted. Legal values are
-     *                <code>Session.AUTO_ACKNOWLEDGE</code>,
-     *                <code>Session.CLIENT_ACKNOWLEDGE</code>, and
-     *                <code>Session.DUPS_OK_ACKNOWLEDGE</code>.
-     * @return a newly created session
-     * @throws JMSException if the <CODE>Connection</CODE> object fails to
-     *                 create a session due to some internal error or lack of
-     *                 support for the specific transaction and acknowledgement
-     *                 mode.
-     * @see Session#AUTO_ACKNOWLEDGE
-     * @see Session#CLIENT_ACKNOWLEDGE
-     * @see Session#DUPS_OK_ACKNOWLEDGE
-     * @since 1.1
-     */
-    public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException {
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-        if(!transacted) {
-            if (acknowledgeMode==Session.SESSION_TRANSACTED) {
-                throw new JMSException("acknowledgeMode SESSION_TRANSACTED cannot be used for an non-transacted Session");
-            } else if (acknowledgeMode < Session.SESSION_TRANSACTED || acknowledgeMode > ActiveMQSession.MAX_ACK_CONSTANT) {
-                throw new JMSException("invalid acknowledgeMode: " + acknowledgeMode + ". Valid values are Session.AUTO_ACKNOWLEDGE (1), " +
-                        "Session.CLIENT_ACKNOWLEDGE (2), Session.DUPS_OK_ACKNOWLEDGE (3), ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE (4) or for transacted sessions Session.SESSION_TRANSACTED (0)");
-            }
-        }
-        return new ActiveMQSession(this, getNextSessionId(), transacted ? Session.SESSION_TRANSACTED : (acknowledgeMode == Session.SESSION_TRANSACTED
-            ? Session.AUTO_ACKNOWLEDGE : acknowledgeMode), isDispatchAsync(), isAlwaysSessionAsync());
-    }
-
-    /**
-     * @return sessionId
-     */
-    protected SessionId getNextSessionId() {
-        return new SessionId(info.getConnectionId(), sessionIdGenerator.getNextSequenceId());
-    }
-
-    /**
-     * Gets the client identifier for this connection.
-     * <P>
-     * This value is specific to the JMS provider. It is either preconfigured by
-     * an administrator in a <CODE> ConnectionFactory</CODE> object or assigned
-     * dynamically by the application by calling the <code>setClientID</code>
-     * method.
-     * 
-     * @return the unique client identifier
-     * @throws JMSException if the JMS provider fails to return the client ID
-     *                 for this connection due to some internal error.
-     */
-    public String getClientID() throws JMSException {
-        checkClosedOrFailed();
-        return this.info.getClientId();
-    }
-
-    /**
-     * Sets the client identifier for this connection.
-     * <P>
-     * The preferred way to assign a JMS client's client identifier is for it to
-     * be configured in a client-specific <CODE>ConnectionFactory</CODE>
-     * object and transparently assigned to the <CODE>Connection</CODE> object
-     * it creates.
-     * <P>
-     * Alternatively, a client can set a connection's client identifier using a
-     * provider-specific value. The facility to set a connection's client
-     * identifier explicitly is not a mechanism for overriding the identifier
-     * that has been administratively configured. It is provided for the case
-     * where no administratively specified identifier exists. If one does exist,
-     * an attempt to change it by setting it must throw an
-     * <CODE>IllegalStateException</CODE>. If a client sets the client
-     * identifier explicitly, it must do so immediately after it creates the
-     * connection and before any other action on the connection is taken. After
-     * this point, setting the client identifier is a programming error that
-     * should throw an <CODE>IllegalStateException</CODE>.
-     * <P>
-     * The purpose of the client identifier is to associate a connection and its
-     * objects with a state maintained on behalf of the client by a provider.
-     * The only such state identified by the JMS API is that required to support
-     * durable subscriptions.
-     * <P>
-     * If another connection with the same <code>clientID</code> is already
-     * running when this method is called, the JMS provider should detect the
-     * duplicate ID and throw an <CODE>InvalidClientIDException</CODE>.
-     * 
-     * @param newClientID the unique client identifier
-     * @throws JMSException if the JMS provider fails to set the client ID for
-     *                 this connection due to some internal error.
-     * @throws javax.jms.InvalidClientIDException if the JMS client specifies an
-     *                 invalid or duplicate client ID.
-     * @throws javax.jms.IllegalStateException if the JMS client attempts to set
-     *                 a connection's client ID at the wrong time or when it has
-     *                 been administratively configured.
-     */
-    public void setClientID(String newClientID) throws JMSException {
-        checkClosedOrFailed();
-
-        if (this.clientIDSet) {
-            throw new IllegalStateException("The clientID has already been set");
-        }
-
-        if (this.isConnectionInfoSentToBroker) {
-            throw new IllegalStateException("Setting clientID on a used Connection is not allowed");
-        }
-
-        this.info.setClientId(newClientID);
-        this.userSpecifiedClientID = true;
-        ensureConnectionInfoSent();
-    }
-
-    /**
-     * Sets the default client id that the connection will use if explicitly not
-     * set with the setClientId() call.
-     */
-    public void setDefaultClientID(String clientID) throws JMSException {
-        this.info.setClientId(clientID);
-        this.userSpecifiedClientID = true;
-    }
-
-    /**
-     * Gets the metadata for this connection.
-     * 
-     * @return the connection metadata
-     * @throws JMSException if the JMS provider fails to get the connection
-     *                 metadata for this connection.
-     * @see javax.jms.ConnectionMetaData
-     */
-    public ConnectionMetaData getMetaData() throws JMSException {
-        checkClosedOrFailed();
-        return ActiveMQConnectionMetaData.INSTANCE;
-    }
-
-    /**
-     * Gets the <CODE>ExceptionListener</CODE> object for this connection. Not
-     * every <CODE>Connection</CODE> has an <CODE>ExceptionListener</CODE>
-     * associated with it.
-     * 
-     * @return the <CODE>ExceptionListener</CODE> for this connection, or
-     *         null, if no <CODE>ExceptionListener</CODE> is associated with
-     *         this connection.
-     * @throws JMSException if the JMS provider fails to get the
-     *                 <CODE>ExceptionListener</CODE> for this connection.
-     * @see javax.jms.Connection#setExceptionListener(ExceptionListener)
-     */
-    public ExceptionListener getExceptionListener() throws JMSException {
-        checkClosedOrFailed();
-        return this.exceptionListener;
-    }
-
-    /**
-     * Sets an exception listener for this connection.
-     * <P>
-     * If a JMS provider detects a serious problem with a connection, it informs
-     * the connection's <CODE> ExceptionListener</CODE>, if one has been
-     * registered. It does this by calling the listener's <CODE>onException
-     * </CODE>
-     * method, passing it a <CODE>JMSException</CODE> object describing the
-     * problem.
-     * <P>
-     * An exception listener allows a client to be notified of a problem
-     * asynchronously. Some connections only consume messages, so they would
-     * have no other way to learn their connection has failed.
-     * <P>
-     * A connection serializes execution of its <CODE>ExceptionListener</CODE>.
-     * <P>
-     * A JMS provider should attempt to resolve connection problems itself
-     * before it notifies the client of them.
-     * 
-     * @param listener the exception listener
-     * @throws JMSException if the JMS provider fails to set the exception
-     *                 listener for this connection.
-     */
-    public void setExceptionListener(ExceptionListener listener) throws JMSException {
-        checkClosedOrFailed();
-        this.exceptionListener = listener;
-    }
-
-    /**
-     * Gets the <code>ClientInternalExceptionListener</code> object for this connection.
-     * Not every <CODE>ActiveMQConnectionn</CODE> has a <CODE>ClientInternalExceptionListener</CODE>
-     * associated with it.
-     * 
-     * @return the listener or <code>null</code> if no listener is registered with the connection.
-     */
-    public ClientInternalExceptionListener getClientInternalExceptionListener()
-    {
-        return clientInternalExceptionListener;
-    }
-
-    /**
-     * Sets a client internal exception listener for this connection.
-     * The connection will notify the listener, if one has been registered, of exceptions thrown by container components
-     * (e.g. an EJB container in case of Message Driven Beans) during asynchronous processing of a message.
-     * It does this by calling the listener's <code>onException()</code> method passing it a <code>Throwable</code>
-     * describing the problem.
-     * 
-     * @param listener the exception listener
-     */
-    public void setClientInternalExceptionListener(ClientInternalExceptionListener listener)
-    {
-        this.clientInternalExceptionListener = listener;
-    }
-    
-    /**
-     * Starts (or restarts) a connection's delivery of incoming messages. A call
-     * to <CODE>start</CODE> on a connection that has already been started is
-     * ignored.
-     * 
-     * @throws JMSException if the JMS provider fails to start message delivery
-     *                 due to some internal error.
-     * @see javax.jms.Connection#stop()
-     */
-    public void start() throws JMSException {
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-        if (started.compareAndSet(false, true)) {
-            for (Iterator<ActiveMQSession> i = sessions.iterator(); i.hasNext();) {
-                ActiveMQSession session = i.next();
-                session.start();
-            }
-        }
-    }
-
-    /**
-     * Temporarily stops a connection's delivery of incoming messages. Delivery
-     * can be restarted using the connection's <CODE>start</CODE> method. When
-     * the connection is stopped, delivery to all the connection's message
-     * consumers is inhibited: synchronous receives block, and messages are not
-     * delivered to message listeners.
-     * <P>
-     * This call blocks until receives and/or message listeners in progress have
-     * completed.
-     * <P>
-     * Stopping a connection has no effect on its ability to send messages. A
-     * call to <CODE>stop</CODE> on a connection that has already been stopped
-     * is ignored.
-     * <P>
-     * A call to <CODE>stop</CODE> must not return until delivery of messages
-     * has paused. This means that a client can rely on the fact that none of
-     * its message listeners will be called and that all threads of control
-     * waiting for <CODE>receive</CODE> calls to return will not return with a
-     * message until the connection is restarted. The receive timers for a
-     * stopped connection continue to advance, so receives may time out while
-     * the connection is stopped.
-     * <P>
-     * If message listeners are running when <CODE>stop</CODE> is invoked, the
-     * <CODE>stop</CODE> call must wait until all of them have returned before
-     * it may return. While these message listeners are completing, they must
-     * have the full services of the connection available to them.
-     * 
-     * @throws JMSException if the JMS provider fails to stop message delivery
-     *                 due to some internal error.
-     * @see javax.jms.Connection#start()
-     */
-    public void stop() throws JMSException {
-        checkClosedOrFailed();
-        if (started.compareAndSet(true, false)) {
-            synchronized(sessions) {
-                for (Iterator<ActiveMQSession> i = sessions.iterator(); i.hasNext();) {
-                    ActiveMQSession s = i.next();
-                    s.stop();
-                }
-            }
-        }
-    }
-
-    /**
-     * Closes the connection.
-     * <P>
-     * Since a provider typically allocates significant resources outside the
-     * JVM on behalf of a connection, clients should close these resources when
-     * they are not needed. Relying on garbage collection to eventually reclaim
-     * these resources may not be timely enough.
-     * <P>
-     * There is no need to close the sessions, producers, and consumers of a
-     * closed connection.
-     * <P>
-     * Closing a connection causes all temporary destinations to be deleted.
-     * <P>
-     * When this method is invoked, it should not return until message
-     * processing has been shut down in an orderly fashion. This means that all
-     * message listeners that may have been running have returned, and that all
-     * pending receives have returned. A close terminates all pending message
-     * receives on the connection's sessions' consumers. The receives may return
-     * with a message or with null, depending on whether there was a message
-     * available at the time of the close. If one or more of the connection's
-     * sessions' message listeners is processing a message at the time when
-     * connection <CODE>close</CODE> is invoked, all the facilities of the
-     * connection and its sessions must remain available to those listeners
-     * until they return control to the JMS provider.
-     * <P>
-     * Closing a connection causes any of its sessions' transactions in progress
-     * to be rolled back. In the case where a session's work is coordinated by
-     * an external transaction manager, a session's <CODE>commit</CODE> and
-     * <CODE> rollback</CODE> methods are not used and the result of a closed
-     * session's work is determined later by the transaction manager. Closing a
-     * connection does NOT force an acknowledgment of client-acknowledged
-     * sessions.
-     * <P>
-     * Invoking the <CODE>acknowledge</CODE> method of a received message from
-     * a closed connection's session must throw an
-     * <CODE>IllegalStateException</CODE>. Closing a closed connection must
-     * NOT throw an exception.
-     * 
-     * @throws JMSException if the JMS provider fails to close the connection
-     *                 due to some internal error. For example, a failure to
-     *                 release resources or to close a socket connection can
-     *                 cause this exception to be thrown.
-     */
-    public void close() throws JMSException {
-        try {
-            // If we were running, lets stop first.
-            if (!closed.get() && !transportFailed.get()) {
-                stop();
-            }
-
-            synchronized (this) {
-                if (!closed.get()) {
-                    closing.set(true);
-
-                    if (destinationSource != null) {
-                        destinationSource.stop();
-                        destinationSource = null;
-                    }
-                    if (advisoryConsumer != null) {
-                        advisoryConsumer.dispose();
-                        advisoryConsumer = null;
-                    }
-                    if (this.scheduler != null) {
-                        try {
-                            this.scheduler.stop();
-                        } catch (Exception e) {
-                            JMSException ex =  JMSExceptionSupport.create(e);
-                            throw ex;
-                        }
-                    }
-
-                    long lastDeliveredSequenceId = 0;
-                    for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) {
-                        ActiveMQSession s = i.next();
-                        s.dispose();
-                        lastDeliveredSequenceId = Math.max(lastDeliveredSequenceId, s.getLastDeliveredSequenceId());
-                    }
-                    for (Iterator<ActiveMQConnectionConsumer> i = this.connectionConsumers.iterator(); i.hasNext();) {
-                        ActiveMQConnectionConsumer c = i.next();
-                        c.dispose();
-                    }
-                    for (Iterator<ActiveMQInputStream> i = this.inputStreams.iterator(); i.hasNext();) {
-                        ActiveMQInputStream c = i.next();
-                        c.dispose();
-                    }
-                    for (Iterator<ActiveMQOutputStream> i = this.outputStreams.iterator(); i.hasNext();) {
-                        ActiveMQOutputStream c = i.next();
-                        c.dispose();
-                    }
-
-                    // As TemporaryQueue and TemporaryTopic instances are bound
-                    // to a connection we should just delete them after the connection
-                    // is closed to free up memory
-                    for (Iterator<ActiveMQTempDestination> i = this.activeTempDestinations.values().iterator(); i.hasNext();) {
-                        ActiveMQTempDestination c = i.next();
-                        c.delete();
-                    }
-                    
-                    if (isConnectionInfoSentToBroker) {
-                        // If we announced ourselfs to the broker.. Try to let
-                        // the broker
-                        // know that the connection is being shutdown.
-                        RemoveInfo removeCommand = info.createRemoveCommand();
-                        removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId);
-                        doSyncSendPacket(info.createRemoveCommand(), closeTimeout);
-                        doAsyncSendPacket(new ShutdownInfo());
-                    }
-
-                    ServiceSupport.dispose(this.transport);
-
-                    started.set(false);
-
-                    // TODO if we move the TaskRunnerFactory to the connection
-                    // factory
-                    // then we may need to call
-                    // factory.onConnectionClose(this);
-                    if (sessionTaskRunner != null) {
-                        sessionTaskRunner.shutdown();
-                    }
-                    closed.set(true);
-                    closing.set(false);
-                }
-            }
-        } finally {
-            try {
-                if (executor != null){
-                    executor.shutdown();
-                }
-            }catch(Throwable e) {
-                LOG.error("Error shutting down thread pool " + e,e);
-            }
-            factoryStats.removeConnection(this);
-        }
-    }
-
-    /**
-     * Tells the broker to terminate its VM. This can be used to cleanly
-     * terminate a broker running in a standalone java process. Server must have
-     * property enable.vm.shutdown=true defined to allow this to work.
-     */
-    // TODO : org.apache.activemq.message.BrokerAdminCommand not yet
-    // implemented.
-    /*
-     * public void terminateBrokerVM() throws JMSException { BrokerAdminCommand
-     * command = new BrokerAdminCommand();
-     * command.setCommand(BrokerAdminCommand.SHUTDOWN_SERVER_VM);
-     * asyncSendPacket(command); }
-     */
-
-    /**
-     * Create a durable connection consumer for this connection (optional
-     * operation). This is an expert facility not used by regular JMS clients.
-     * 
-     * @param topic topic to access
-     * @param subscriptionName durable subscription name
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param sessionPool the server session pool to associate with this durable
-     *                connection consumer
-     * @param maxMessages the maximum number of messages that can be assigned to
-     *                a server session at one time
-     * @return the durable connection consumer
-     * @throws JMSException if the <CODE>Connection</CODE> object fails to
-     *                 create a connection consumer due to some internal error
-     *                 or invalid arguments for <CODE>sessionPool</CODE> and
-     *                 <CODE>messageSelector</CODE>.
-     * @throws javax.jms.InvalidDestinationException if an invalid destination
-     *                 is specified.
-     * @throws javax.jms.InvalidSelectorException if the message selector is
-     *                 invalid.
-     * @see javax.jms.ConnectionConsumer
-     * @since 1.1
-     */
-    public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
-        throws JMSException {
-        return this.createDurableConnectionConsumer(topic, subscriptionName, messageSelector, sessionPool, maxMessages, false);
-    }
-
-    /**
-     * Create a durable connection consumer for this connection (optional
-     * operation). This is an expert facility not used by regular JMS clients.
-     * 
-     * @param topic topic to access
-     * @param subscriptionName durable subscription name
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param sessionPool the server session pool to associate with this durable
-     *                connection consumer
-     * @param maxMessages the maximum number of messages that can be assigned to
-     *                a server session at one time
-     * @param noLocal set true if you want to filter out messages published
-     *                locally
-     * @return the durable connection consumer
-     * @throws JMSException if the <CODE>Connection</CODE> object fails to
-     *                 create a connection consumer due to some internal error
-     *                 or invalid arguments for <CODE>sessionPool</CODE> and
-     *                 <CODE>messageSelector</CODE>.
-     * @throws javax.jms.InvalidDestinationException if an invalid destination
-     *                 is specified.
-     * @throws javax.jms.InvalidSelectorException if the message selector is
-     *                 invalid.
-     * @see javax.jms.ConnectionConsumer
-     * @since 1.1
-     */
-    public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages,
-                                                              boolean noLocal) throws JMSException {
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-        SessionId sessionId = new SessionId(info.getConnectionId(), -1);
-        ConsumerInfo info = new ConsumerInfo(new ConsumerId(sessionId, consumerIdGenerator.getNextSequenceId()));
-        info.setDestination(ActiveMQMessageTransformation.transformDestination(topic));
-        info.setSubscriptionName(subscriptionName);
-        info.setSelector(messageSelector);
-        info.setPrefetchSize(maxMessages);
-        info.setDispatchAsync(isDispatchAsync());
-
-        // Allows the options on the destination to configure the consumerInfo
-        if (info.getDestination().getOptions() != null) {
-            Map<String, String> options = new HashMap<String, String>(info.getDestination().getOptions());
-            IntrospectionSupport.setProperties(this.info, options, "consumer.");
-        }
-
-        return new ActiveMQConnectionConsumer(this, sessionPool, info);
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    /**
-     * Returns true if this connection has been started
-     * 
-     * @return true if this Connection is started
-     */
-    public boolean isStarted() {
-        return started.get();
-    }
-
-    /**
-     * Returns true if the connection is closed
-     */
-    public boolean isClosed() {
-        return closed.get();
-    }
-
-    /**
-     * Returns true if the connection is in the process of being closed
-     */
-    public boolean isClosing() {
-        return closing.get();
-    }
-
-    /**
-     * Returns true if the underlying transport has failed
-     */
-    public boolean isTransportFailed() {
-        return transportFailed.get();
-    }
-
-    /**
-     * @return Returns the prefetchPolicy.
-     */
-    public ActiveMQPrefetchPolicy getPrefetchPolicy() {
-        return prefetchPolicy;
-    }
-
-    /**
-     * Sets the <a
-     * href="http://activemq.apache.org/what-is-the-prefetch-limit-for.html">prefetch
-     * policy</a> for consumers created by this connection.
-     */
-    public void setPrefetchPolicy(ActiveMQPrefetchPolicy prefetchPolicy) {
-        this.prefetchPolicy = prefetchPolicy;
-    }
-
-    /**
-     */
-    public Transport getTransportChannel() {
-        return transport;
-    }
-
-    /**
-     * @return Returns the clientID of the connection, forcing one to be
-     *         generated if one has not yet been configured.
-     */
-    public String getInitializedClientID() throws JMSException {
-        ensureConnectionInfoSent();
-        return info.getClientId();
-    }
-
-    /**
-     * @return Returns the timeStampsDisableByDefault.
-     */
-    public boolean isDisableTimeStampsByDefault() {
-        return disableTimeStampsByDefault;
-    }
-
-    /**
-     * Sets whether or not timestamps on messages should be disabled or not. If
-     * you disable them it adds a small performance boost.
-     */
-    public void setDisableTimeStampsByDefault(boolean timeStampsDisableByDefault) {
-        this.disableTimeStampsByDefault = timeStampsDisableByDefault;
-    }
-
-    /**
-     * @return Returns the dispatchOptimizedMessage.
-     */
-    public boolean isOptimizedMessageDispatch() {
-        return optimizedMessageDispatch;
-    }
-
-    /**
-     * If this flag is set then an larger prefetch limit is used - only
-     * applicable for durable topic subscribers.
-     */
-    public void setOptimizedMessageDispatch(boolean dispatchOptimizedMessage) {
-        this.optimizedMessageDispatch = dispatchOptimizedMessage;
-    }
-
-    /**
-     * @return Returns the closeTimeout.
-     */
-    public int getCloseTimeout() {
-        return closeTimeout;
-    }
-
-    /**
-     * Sets the timeout before a close is considered complete. Normally a
-     * close() on a connection waits for confirmation from the broker; this
-     * allows that operation to timeout to save the client hanging if there is
-     * no broker
-     */
-    public void setCloseTimeout(int closeTimeout) {
-        this.closeTimeout = closeTimeout;
-    }
-
-    /**
-     * @return ConnectionInfo
-     */
-    public ConnectionInfo getConnectionInfo() {
-        return this.info;
-    }
-
-    public boolean isUseRetroactiveConsumer() {
-        return useRetroactiveConsumer;
-    }
-
-    /**
-     * Sets whether or not retroactive consumers are enabled. Retroactive
-     * consumers allow non-durable topic subscribers to receive old messages
-     * that were published before the non-durable subscriber started.
-     */
-    public void setUseRetroactiveConsumer(boolean useRetroactiveConsumer) {
-        this.useRetroactiveConsumer = useRetroactiveConsumer;
-    }
-
-    public boolean isNestedMapAndListEnabled() {
-        return nestedMapAndListEnabled;
-    }
-
-    /**
-     * Enables/disables whether or not Message properties and MapMessage entries
-     * support <a
-     * href="http://activemq.apache.org/structured-message-properties-and-mapmessages.html">Nested
-     * Structures</a> of Map and List objects
-     */
-    public void setNestedMapAndListEnabled(boolean structuredMapsEnabled) {
-        this.nestedMapAndListEnabled = structuredMapsEnabled;
-    }
-
-    public boolean isExclusiveConsumer() {
-        return exclusiveConsumer;
-    }
-
-    /**
-     * Enables or disables whether or not queue consumers should be exclusive or
-     * not for example to preserve ordering when not using <a
-     * href="http://activemq.apache.org/message-groups.html">Message Groups</a>
-     * 
-     * @param exclusiveConsumer
-     */
-    public void setExclusiveConsumer(boolean exclusiveConsumer) {
-        this.exclusiveConsumer = exclusiveConsumer;
-    }
-
-    /**
-     * Adds a transport listener so that a client can be notified of events in
-     * the underlying transport
-     */
-    public void addTransportListener(TransportListener transportListener) {
-        transportListeners.add(transportListener);
-    }
-
-    public void removeTransportListener(TransportListener transportListener) {
-        transportListeners.remove(transportListener);
-    }
-
-    public boolean isUseDedicatedTaskRunner() {
-        return useDedicatedTaskRunner;
-    }
-    
-    public void setUseDedicatedTaskRunner(boolean useDedicatedTaskRunner) {
-        this.useDedicatedTaskRunner = useDedicatedTaskRunner;
-    }
-
-    public TaskRunnerFactory getSessionTaskRunner() {
-        synchronized (this) {
-            if (sessionTaskRunner == null) {
-                sessionTaskRunner = new TaskRunnerFactory("ActiveMQ Session Task", ThreadPriorities.INBOUND_CLIENT_SESSION, false, 1000, isUseDedicatedTaskRunner());
-            }
-        }
-        return sessionTaskRunner;
-    }
-
-    public void setSessionTaskRunner(TaskRunnerFactory sessionTaskRunner) {
-        this.sessionTaskRunner = sessionTaskRunner;
-    }
-
-    public MessageTransformer getTransformer() {
-        return transformer;
-    }
-
-    /**
-     * Sets the transformer used to transform messages before they are sent on
-     * to the JMS bus or when they are received from the bus but before they are
-     * delivered to the JMS client
-     */
-    public void setTransformer(MessageTransformer transformer) {
-        this.transformer = transformer;
-    }
-
-    /**
-     * @return the statsEnabled
-     */
-    public boolean isStatsEnabled() {
-        return this.stats.isEnabled();
-    }
-
-    /**
-     * @param statsEnabled the statsEnabled to set
-     */
-    public void setStatsEnabled(boolean statsEnabled) {
-        this.stats.setEnabled(statsEnabled);
-    }
-
-    /**
-     * Returns the {@link DestinationSource} object which can be used to listen to destinations
-     * being created or destroyed or to enquire about the current destinations available on the broker
-     *
-     * @return a lazily created destination source
-     * @throws JMSException
-     */
-    public DestinationSource getDestinationSource() throws JMSException {
-        if (destinationSource == null) {
-            destinationSource = new DestinationSource(this);
-            destinationSource.start();
-        }
-        return destinationSource;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    /**
-     * Used internally for adding Sessions to the Connection
-     * 
-     * @param session
-     * @throws JMSException
-     * @throws JMSException
-     */
-    protected void addSession(ActiveMQSession session) throws JMSException {
-        this.sessions.add(session);
-        if (sessions.size() > 1 || session.isTransacted()) {
-            optimizedMessageDispatch = false;
-        }
-    }
-
-    /**
-     * Used interanlly for removing Sessions from a Connection
-     * 
-     * @param session
-     */
-    protected void removeSession(ActiveMQSession session) {
-        this.sessions.remove(session);
-        this.removeDispatcher(session);
-    }
-
-    /**
-     * Add a ConnectionConsumer
-     * 
-     * @param connectionConsumer
-     * @throws JMSException
-     */
-    protected void addConnectionConsumer(ActiveMQConnectionConsumer connectionConsumer) throws JMSException {
-        this.connectionConsumers.add(connectionConsumer);
-    }
-
-    /**
-     * Remove a ConnectionConsumer
-     * 
-     * @param connectionConsumer
-     */
-    protected void removeConnectionConsumer(ActiveMQConnectionConsumer connectionConsumer) {
-        this.connectionConsumers.remove(connectionConsumer);
-        this.removeDispatcher(connectionConsumer);
-    }
-
-    /**
-     * Creates a <CODE>TopicSession</CODE> object.
-     * 
-     * @param transacted indicates whether the session is transacted
-     * @param acknowledgeMode indicates whether the consumer or the client will
-     *                acknowledge any messages it receives; ignored if the
-     *                session is transacted. Legal values are
-     *                <code>Session.AUTO_ACKNOWLEDGE</code>,
-     *                <code>Session.CLIENT_ACKNOWLEDGE</code>, and
-     *                <code>Session.DUPS_OK_ACKNOWLEDGE</code>.
-     * @return a newly created topic session
-     * @throws JMSException if the <CODE>TopicConnection</CODE> object fails
-     *                 to create a session due to some internal error or lack of
-     *                 support for the specific transaction and acknowledgement
-     *                 mode.
-     * @see Session#AUTO_ACKNOWLEDGE
-     * @see Session#CLIENT_ACKNOWLEDGE
-     * @see Session#DUPS_OK_ACKNOWLEDGE
-     */
-    public TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws JMSException {
-        return new ActiveMQTopicSession((ActiveMQSession)createSession(transacted, acknowledgeMode));
-    }
-
-    /**
-     * Creates a connection consumer for this connection (optional operation).
-     * This is an expert facility not used by regular JMS clients.
-     * 
-     * @param topic the topic to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param sessionPool the server session pool to associate with this
-     *                connection consumer
-     * @param maxMessages the maximum number of messages that can be assigned to
-     *                a server session at one time
-     * @return the connection consumer
-     * @throws JMSException if the <CODE>TopicConnection</CODE> object fails
-     *                 to create a connection consumer due to some internal
-     *                 error or invalid arguments for <CODE>sessionPool</CODE>
-     *                 and <CODE>messageSelector</CODE>.
-     * @throws javax.jms.InvalidDestinationException if an invalid topic is
-     *                 specified.
-     * @throws javax.jms.InvalidSelectorException if the message selector is
-     *                 invalid.
-     * @see javax.jms.ConnectionConsumer
-     */
-    public ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
-        return createConnectionConsumer(topic, messageSelector, sessionPool, maxMessages, false);
-    }
-
-    /**
-     * Creates a connection consumer for this connection (optional operation).
-     * This is an expert facility not used by regular JMS clients.
-     * 
-     * @param queue the queue to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param sessionPool the server session pool to associate with this
-     *                connection consumer
-     * @param maxMessages the maximum number of messages that can be assigned to
-     *                a server session at one time
-     * @return the connection consumer
-     * @throws JMSException if the <CODE>QueueConnection</CODE> object fails
-     *                 to create a connection consumer due to some internal
-     *                 error or invalid arguments for <CODE>sessionPool</CODE>
-     *                 and <CODE>messageSelector</CODE>.
-     * @throws javax.jms.InvalidDestinationException if an invalid queue is
-     *                 specified.
-     * @throws javax.jms.InvalidSelectorException if the message selector is
-     *                 invalid.
-     * @see javax.jms.ConnectionConsumer
-     */
-    public ConnectionConsumer createConnectionConsumer(Queue queue, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
-        return createConnectionConsumer(queue, messageSelector, sessionPool, maxMessages, false);
-    }
-
-    /**
-     * Creates a connection consumer for this connection (optional operation).
-     * This is an expert facility not used by regular JMS clients.
-     * 
-     * @param destination the destination to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param sessionPool the server session pool to associate with this
-     *                connection consumer
-     * @param maxMessages the maximum number of messages that can be assigned to
-     *                a server session at one time
-     * @return the connection consumer
-     * @throws JMSException if the <CODE>Connection</CODE> object fails to
-     *                 create a connection consumer due to some internal error
-     *                 or invalid arguments for <CODE>sessionPool</CODE> and
-     *                 <CODE>messageSelector</CODE>.
-     * @throws javax.jms.InvalidDestinationException if an invalid destination
-     *                 is specified.
-     * @throws javax.jms.InvalidSelectorException if the message selector is
-     *                 invalid.
-     * @see javax.jms.ConnectionConsumer
-     * @since 1.1
-     */
-    public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
-        return createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages, false);
-    }
-
-    public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages, boolean noLocal)
-        throws JMSException {
-
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-
-        ConsumerId consumerId = createConsumerId();
-        ConsumerInfo consumerInfo = new ConsumerInfo(consumerId);
-        consumerInfo.setDestination(ActiveMQMessageTransformation.transformDestination(destination));
-        consumerInfo.setSelector(messageSelector);
-        consumerInfo.setPrefetchSize(maxMessages);
-        consumerInfo.setNoLocal(noLocal);
-        consumerInfo.setDispatchAsync(isDispatchAsync());
-
-        // Allows the options on the destination to configure the consumerInfo
-        if (consumerInfo.getDestination().getOptions() != null) {
-            Map<String, String> options = new HashMap<String, String>(consumerInfo.getDestination().getOptions());
-            IntrospectionSupport.setProperties(consumerInfo, options, "consumer.");
-        }
-
-        return new ActiveMQConnectionConsumer(this, sessionPool, consumerInfo);
-    }
-
-    /**
-     * @return
-     */
-    private ConsumerId createConsumerId() {
-        return new ConsumerId(connectionSessionId, consumerIdGenerator.getNextSequenceId());
-    }
-
-    /**
-     * @return
-     */
-    private ProducerId createProducerId() {
-        return new ProducerId(connectionSessionId, producerIdGenerator.getNextSequenceId());
-    }
-
-    /**
-     * Creates a <CODE>QueueSession</CODE> object.
-     * 
-     * @param transacted indicates whether the session is transacted
-     * @param acknowledgeMode indicates whether the consumer or the client will
-     *                acknowledge any messages it receives; ignored if the
-     *                session is transacted. Legal values are
-     *                <code>Session.AUTO_ACKNOWLEDGE</code>,
-     *                <code>Session.CLIENT_ACKNOWLEDGE</code>, and
-     *                <code>Session.DUPS_OK_ACKNOWLEDGE</code>.
-     * @return a newly created queue session
-     * @throws JMSException if the <CODE>QueueConnection</CODE> object fails
-     *                 to create a session due to some internal error or lack of
-     *                 support for the specific transaction and acknowledgement
-     *                 mode.
-     * @see Session#AUTO_ACKNOWLEDGE
-     * @see Session#CLIENT_ACKNOWLEDGE
-     * @see Session#DUPS_OK_ACKNOWLEDGE
-     */
-    public QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws JMSException {
-        return new ActiveMQQueueSession((ActiveMQSession)createSession(transacted, acknowledgeMode));
-    }
-
-    /**
-     * Ensures that the clientID was manually specified and not auto-generated.
-     * If the clientID was not specified this method will throw an exception.
-     * This method is used to ensure that the clientID + durableSubscriber name
-     * are used correctly.
-     * 
-     * @throws JMSException
-     */
-    public void checkClientIDWasManuallySpecified() throws JMSException {
-        if (!userSpecifiedClientID) {
-            throw new JMSException("You cannot create a durable subscriber without specifying a unique clientID on a Connection");
-        }
-    }
-
-    /**
-     * send a Packet through the Connection - for internal use only
-     * 
-     * @param command
-     * @throws JMSException
-     */
-    public void asyncSendPacket(Command command) throws JMSException {
-        if (isClosed()) {
-            throw new ConnectionClosedException();
-        } else {
-            doAsyncSendPacket(command);
-        }
-    }
-
-	private void doAsyncSendPacket(Command command) throws JMSException {
-		try {
-		    this.transport.oneway(command);
-		} catch (IOException e) {
-		    throw JMSExceptionSupport.create(e);
-		}
-	}
-
-    /**
-     * Send a packet through a Connection - for internal use only
-     * 
-     * @param command
-     * @return
-     * @throws JMSException
-     */
-    public Response syncSendPacket(Command command) throws JMSException {
-        if (isClosed()) {
-            throw new ConnectionClosedException();
-        } else {
-
-            try {
-                Response response = (Response)this.transport.request(command);
-                if (response.isException()) {
-                    ExceptionResponse er = (ExceptionResponse)response;
-                    if (er.getException() instanceof JMSException) {
-                        throw (JMSException)er.getException();
-                    } else {
-                        if (isClosed()||closing.get()) {
-                            LOG.debug("Received an exception but connection is closing");
-                        }
-                        JMSException jmsEx = null;
-                        try {
-                         jmsEx = JMSExceptionSupport.create(er.getException());
-                        }catch(Throwable e) {
-                            LOG.error("Caught an exception trying to create a JMSException for " +er.getException(),e);
-                        }
-                        if(jmsEx !=null) {
-                            throw jmsEx;
-                        }
-                    }
-                }
-                return response;
-            } catch (IOException e) {
-                throw JMSExceptionSupport.create(e);
-            }
-        }
-    }
-
-    /**
-     * Send a packet through a Connection - for internal use only
-     * 
-     * @param command
-     * @return
-     * @throws JMSException
-     */
-    public Response syncSendPacket(Command command, int timeout) throws JMSException {
-        if (isClosed() || closing.get()) {
-            throw new ConnectionClosedException();
-        } else {
-            return doSyncSendPacket(command, timeout);
-        }
-    }
-
-	private Response doSyncSendPacket(Command command, int timeout)
-			throws JMSException {
-		try {
-		    Response response = (Response) (timeout > 0
-                    ? this.transport.request(command, timeout) 
-                    : this.transport.request(command));
-		    if (response != null && response.isException()) {
-		        ExceptionResponse er = (ExceptionResponse)response;
-		        if (er.getException() instanceof JMSException) {
-		            throw (JMSException)er.getException();
-		        } else {
-		            throw JMSExceptionSupport.create(er.getException());
-		        }
-		    }
-		    return response;
-		} catch (IOException e) {
-		    throw JMSExceptionSupport.create(e);
-		}
-	}
-
-    /**
-     * @return statistics for this Connection
-     */
-    public StatsImpl getStats() {
-        return stats;
-    }
-
-    /**
-     * simply throws an exception if the Connection is already closed or the
-     * Transport has failed
-     * 
-     * @throws JMSException
-     */
-    protected synchronized void checkClosedOrFailed() throws JMSException {
-        checkClosed();
-        if (transportFailed.get()) {
-            throw new ConnectionFailedException(firstFailureError);
-        }
-    }
-
-    /**
-     * simply throws an exception if the Connection is already closed
-     * 
-     * @throws JMSException
-     */
-    protected synchronized void checkClosed() throws JMSException {
-        if (closed.get()) {
-            throw new ConnectionClosedException();
-        }
-    }
-
-    /**
-     * Send the ConnectionInfo to the Broker
-     * 
-     * @throws JMSException
-     */
-    protected void ensureConnectionInfoSent() throws JMSException {
-        synchronized(this.ensureConnectionInfoSentMutex) {
-            // Can we skip sending the ConnectionInfo packet??
-            if (isConnectionInfoSentToBroker || closed.get()) {
-                return;
-            }
-            //TODO shouldn't this check be on userSpecifiedClientID rather than the value of clientID?
-            if (info.getClientId() == null || info.getClientId().trim().length() == 0) {
-                info.setClientId(clientIdGenerator.generateId());
-            }
-            syncSendPacket(info.copy());
-    
-            this.isConnectionInfoSentToBroker = true;
-            // Add a temp destination advisory consumer so that
-            // We know what the valid temporary destinations are on the
-            // broker without having to do an RPC to the broker.
-    
-            ConsumerId consumerId = new ConsumerId(new SessionId(info.getConnectionId(), -1), consumerIdGenerator.getNextSequenceId());
-            if (watchTopicAdvisories) {
-                advisoryConsumer = new AdvisoryConsumer(this, consumerId);
-            }
-        }
-    }
-
-    public synchronized boolean isWatchTopicAdvisories() {
-        return watchTopicAdvisories;
-    }
-
-    public synchronized void setWatchTopicAdvisories(boolean watchTopicAdvisories) {
-        this.watchTopicAdvisories = watchTopicAdvisories;
-    }
-
-    /**
-     * @return Returns the useAsyncSend.
-     */
-    public boolean isUseAsyncSend() {
-        return useAsyncSend;
-    }
-
-    /**
-     * Forces the use of <a
-     * href="http://activemq.apache.org/async-sends.html">Async Sends</a> which
-     * adds a massive performance boost; but means that the send() method will
-     * return immediately whether the message has been sent or not which could
-     * lead to message loss.
-     */
-    public void setUseAsyncSend(boolean useAsyncSend) {
-        this.useAsyncSend = useAsyncSend;
-    }
-
-    /**
-     * @return true if always sync send messages
-     */
-    public boolean isAlwaysSyncSend() {
-        return this.alwaysSyncSend;
-    }
-
-    /**
-     * Set true if always require messages to be sync sent
-     * 
-     * @param alwaysSyncSend
-     */
-    public void setAlwaysSyncSend(boolean alwaysSyncSend) {
-        this.alwaysSyncSend = alwaysSyncSend;
-    }
-    
-    /**
-     * @return the messagePrioritySupported
-     */
-    public boolean isMessagePrioritySupported() {
-        return this.messagePrioritySupported;
-    }
-
-    /**
-     * @param messagePrioritySupported the messagePrioritySupported to set
-     */
-    public void setMessagePrioritySupported(boolean messagePrioritySupported) {
-        this.messagePrioritySupported = messagePrioritySupported;
-    }
-
-    /**
-     * Cleans up this connection so that it's state is as if the connection was
-     * just created. This allows the Resource Adapter to clean up a connection
-     * so that it can be reused without having to close and recreate the
-     * connection.
-     */
-    public void cleanup() throws JMSException {
-
-        if (advisoryConsumer != null && !isTransportFailed()) {
-            advisoryConsumer.dispose();
-            advisoryConsumer = null;
-        }
-
-        for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) {
-            ActiveMQSession s = i.next();
-            s.dispose();
-        }
-        for (Iterator<ActiveMQConnectionConsumer> i = this.connectionConsumers.iterator(); i.hasNext();) {
-            ActiveMQConnectionConsumer c = i.next();
-            c.dispose();
-        }
-        for (Iterator<ActiveMQInputStream> i = this.inputStreams.iterator(); i.hasNext();) {
-            ActiveMQInputStream c = i.next();
-            c.dispose();
-        }
-        for (Iterator<ActiveMQOutputStream> i = this.outputStreams.iterator(); i.hasNext();) {
-            ActiveMQOutputStream c = i.next();
-            c.dispose();
-        }
-
-        if (isConnectionInfoSentToBroker) {
-            if (!transportFailed.get() && !closing.get()) {
-                syncSendPacket(info.createRemoveCommand());
-            }
-            isConnectionInfoSentToBroker = false;
-        }
-        if (userSpecifiedClientID) {
-            info.setClientId(null);
-            userSpecifiedClientID = false;
-        }
-        clientIDSet = false;
-
-        started.set(false);
-    }
-
-    /**
-     * Changes the associated username/password that is associated with this
-     * connection. If the connection has been used, you must called cleanup()
-     * before calling this method.
-     * 
-     * @throws IllegalStateException if the connection is in used.
-     */
-    public void changeUserInfo(String userName, String password) throws JMSException {
-        if (isConnectionInfoSentToBroker) {
-            throw new IllegalStateException("changeUserInfo used Connection is not allowed");
-        }
-        this.info.setUserName(userName);
-        this.info.setPassword(password);
-    }
-
-    /**
-     * @return Returns the resourceManagerId.
-     * @throws JMSException
-     */
-    public String getResourceManagerId() throws JMSException {
-        waitForBrokerInfo();
-        if (brokerInfo == null) {
-            throw new JMSException("Connection failed before Broker info was received.");
-        }
-        return brokerInfo.getBrokerId().getValue();
-    }
-
-    /**
-     * Returns the broker name if one is available or null if one is not
-     * available yet.
-     */
-    public String getBrokerName() {
-        try {
-            brokerInfoReceived.await(5, TimeUnit.SECONDS);
-            if (brokerInfo == null) {
-                return null;
-            }
-            return brokerInfo.getBrokerName();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            return null;
-        }
-    }
-
-    /**
-     * Returns the broker information if it is available or null if it is not
-     * available yet.
-     */
-    public BrokerInfo getBrokerInfo() {
-        return brokerInfo;
-    }
-
-    /**
-     * @return Returns the RedeliveryPolicy.
-     * @throws JMSException
-     */
-    public RedeliveryPolicy getRedeliveryPolicy() throws JMSException {
-        return redeliveryPolicy;
-    }
-
-    /**
-     * Sets the redelivery policy to be used when messages are rolled back
-     */
-    public void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy) {
-        this.redeliveryPolicy = redeliveryPolicy;
-    }
-
-    public BlobTransferPolicy getBlobTransferPolicy() {
-        if (blobTransferPolicy == null) {
-            blobTransferPolicy = createBlobTransferPolicy();
-        }
-        return blobTransferPolicy;
-    }
-
-    /**
-     * Sets the policy used to describe how out-of-band BLOBs (Binary Large
-     * OBjects) are transferred from producers to brokers to consumers
-     */
-    public void setBlobTransferPolicy(BlobTransferPolicy blobTransferPolicy) {
-        this.blobTransferPolicy = blobTransferPolicy;
-    }
-
-    /**
-     * @return Returns the alwaysSessionAsync.
-     */
-    public boolean isAlwaysSessionAsync() {
-        return alwaysSessionAsync;
-    }
-
-    /**
-     * If this flag is set then a separate thread is not used for dispatching
-     * messages for each Session in the Connection. However, a separate thread
-     * is always used if there is more than one session, or the session isn't in
-     * auto acknowledge or duplicates ok mode
-     */
-    public void setAlwaysSessionAsync(boolean alwaysSessionAsync) {
-        this.alwaysSessionAsync = alwaysSessionAsync;
-    }
-
-    /**
-     * @return Returns the optimizeAcknowledge.
-     */
-    public boolean isOptimizeAcknowledge() {
-        return optimizeAcknowledge;
-    }
-
-    /**
-     * Enables an optimised acknowledgement mode where messages are acknowledged
-     * in batches rather than individually
-     * 
-     * @param optimizeAcknowledge The optimizeAcknowledge to set.
-     */
-    public void setOptimizeAcknowledge(boolean optimizeAcknowledge) {
-        this.optimizeAcknowledge = optimizeAcknowledge;
-    }
-
-    public long getWarnAboutUnstartedConnectionTimeout() {
-        return warnAboutUnstartedConnectionTimeout;
-    }
-
-    /**
-     * Enables the timeout from a connection creation to when a warning is
-     * generated if the connection is not properly started via {@link #start()}
-     * and a message is received by a consumer. It is a very common gotcha to
-     * forget to <a
-     * href="http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html">start
-     * the connection</a> so this option makes the default case to create a
-     * warning if the user forgets. To disable the warning just set the value to <
-     * 0 (say -1).
-     */
-    public void setWarnAboutUnstartedConnectionTimeout(long warnAboutUnstartedConnectionTimeout) {
-        this.warnAboutUnstartedConnectionTimeout = warnAboutUnstartedConnectionTimeout;
-    }
-    
-    /**
-     * @return the sendTimeout
-     */
-    public int getSendTimeout() {
-        return sendTimeout;
-    }
-
-    /**
-     * @param sendTimeout the sendTimeout to set
-     */
-    public void setSendTimeout(int sendTimeout) {
-        this.sendTimeout = sendTimeout;
-    }
-    
-    /**
-     * @return the sendAcksAsync
-     */
-    public boolean isSendAcksAsync() {
-        return sendAcksAsync;
-    }
-
-    /**
-     * @param sendAcksAsync the sendAcksAsync to set
-     */
-    public void setSendAcksAsync(boolean sendAcksAsync) {
-        this.sendAcksAsync = sendAcksAsync;
-    }
-
-
-    /**
-     * Returns the time this connection was created
-     */
-    public long getTimeCreated() {
-        return timeCreated;
-    }
-
-    private void waitForBrokerInfo() throws JMSException {
-        try {
-            brokerInfoReceived.await();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    // Package protected so that it can be used in unit tests
-    public Transport getTransport() {
-        return transport;
-    }
-
-    public void addProducer(ProducerId producerId, ActiveMQMessageProducer producer) {
-        producers.put(producerId, producer);
-    }
-
-    public void removeProducer(ProducerId producerId) {
-        producers.remove(producerId);
-    }
-
-    public void addDispatcher(ConsumerId consumerId, ActiveMQDispatcher dispatcher) {
-        dispatchers.put(consumerId, dispatcher);
-    }
-
-    public void removeDispatcher(ConsumerId consumerId) {
-        dispatchers.remove(consumerId);
-    }
-
-    /**
-     * @param o - the command to consume
-     */
-    public void onCommand(final Object o) {
-        final Command command = (Command)o;
-        if (!closed.get() && command != null) {
-            try {
-                command.visit(new CommandVisitorAdapter() {
-                    @Override
-                    public Response processMessageDispatch(MessageDispatch md) throws Exception {
-                        waitForTransportInterruptionProcessingToComplete();
-                        ActiveMQDispatcher dispatcher = dispatchers.get(md.getConsumerId());
-                        if (dispatcher != null) {
-                            // Copy in case a embedded broker is dispatching via
-                            // vm://
-                            // md.getMessage() == null to signal end of queue
-                            // browse.
-                            Message msg = md.getMessage();
-                            if (msg != null) {
-                                msg = msg.copy();
-                                msg.setReadOnlyBody(true);
-                                msg.setReadOnlyProperties(true);
-                                msg.setRedeliveryCounter(md.getRedeliveryCounter());
-                                msg.setConnection(ActiveMQConnection.this);
-                                md.setMessage(msg);
-                            }
-                            dispatcher.dispatch(md);
-                        }
-                        return null;
-                    }
-
-                    @Override
-                    public Response processProducerAck(ProducerAck pa) throws Exception {
-                        if (pa != null && pa.getProducerId() != null) {
-                            ActiveMQMessageProducer producer = producers.get(pa.getProducerId());
-                            if (producer != null) {
-                                producer.onProducerAck(pa);
-                            }
-                        }
-                        return null;
-                    }
-
-                    @Override
-                    public Response processBrokerInfo(BrokerInfo info) throws Exception {
-                        brokerInfo = info;
-                        brokerInfoReceived.countDown();
-                        optimizeAcknowledge &= !brokerInfo.isFaultTolerantConfiguration();
-                        getBlobTransferPolicy().setBrokerUploadUrl(info.getBrokerUploadUrl());
-                        return null;
-                    }
-
-                    @Override
-                    public Response processConnectionError(final ConnectionError error) throws Exception {
-                        executor.execute(new Runnable() {
-                            public void run() {
-                                onAsyncException(error.getException());
-                            }
-                        });
-                        return null;
-                    }
-
-                    @Override
-                    public Response processControlCommand(ControlCommand command) throws Exception {
-                        onControlCommand(command);
-                        return null;
-                    }
-
-                    @Override
-                    public Response processConnectionControl(ConnectionControl control) throws Exception {
-                        onConnectionControl((ConnectionControl)command);
-                        return null;
-                    }
-
-                    @Override
-                    public Response processConsumerControl(ConsumerControl control) throws Exception {
-                        onConsumerControl((ConsumerControl)command);
-                        return null;
-                    }
-
-                    @Override
-                    public Response processWireFormat(WireFormatInfo info) throws Exception {
-                        onWireFormatInfo((WireFormatInfo)command);
-                        return null;
-                    }
-                });
-            } catch (Exception e) {
-                onClientInternalException(e);
-            }
-
-        }
-        for (Iterator<TransportListener> iter = transportListeners.iterator(); iter.hasNext();) {
-            TransportListener listener = iter.next();
-            listener.onCommand(command);
-        }
-    }
-
-    protected void onWireFormatInfo(WireFormatInfo info) {
-        protocolVersion.set(info.getVersion());
-    }
-
-    /**
-     * Handles async client internal exceptions.
-     * A client internal exception is usually one that has been thrown
-     * by a container runtime component during asynchronous processing of a
-     * message that does not affect the connection itself.
-     * This method notifies the <code>ClientInternalExceptionListener</code> by invoking
-     * its <code>onException</code> method, if one has been registered with this connection.
-     * 
-     * @param error the exception that the problem
-     */
-    public void onClientInternalException(final Throwable error) {
-        if ( !closed.get() && !closing.get() ) {
-            if ( this.clientInternalExceptionListener != null ) {
-                executor.execute(new Runnable() {
-                    public void run() {
-                        ActiveMQConnection.this.clientInternalExceptionListener.onException(error);
-                    }
-                });
-            } else {
-                LOG.debug("Async client internal exception occurred with no exception listener registered: " 
-                        + error, error);
-            }
-        }
-    }
-    /**
-     * Used for handling async exceptions
-     * 
-     * @param error
-     */
-    public void onAsyncException(Throwable error) {
-        if (!closed.get() && !closing.get()) {
-            if (this.exceptionListener != null) {
-
-                if (!(error instanceof JMSException)) {
-                    error = JMSExceptionSupport.create(error);
-                }
-                final JMSException e = (JMSException)error;
-
-                executor.execute(new Runnable() {
-                    public void run() {
-                        ActiveMQConnection.this.exceptionListener.onException(e);
-                    }
-                });
-
-            } else {
-                LOG.debug("Async exception with no exception listener: " + error, error);
-            }
-        }
-    }
-
-    public void onException(final IOException error) {
-		onAsyncException(error);
-		if (!closing.get() && !closed.get()) {
-			executor.execute(new Runnable() {
-				public void run() {
-					transportFailed(error);
-					ServiceSupport.dispose(ActiveMQConnection.this.transport);
-					brokerInfoReceived.countDown();
-					try {
-						cleanup();
-					} catch (JMSException e) {
-						LOG.warn("Exception during connection cleanup, " + e, e);
-					}
-					for (Iterator<TransportListener> iter = transportListeners
-							.iterator(); iter.hasNext();) {
-						TransportListener listener = iter.next();
-						listener.onException(error);
-					}
-				}
-			});
-		}
-	}
-
-    public void transportInterupted() {
-        this.transportInterruptionProcessingComplete = new CountDownLatch(dispatchers.size() - (advisoryConsumer != null ? 1:0));
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("transport interrupted, dispatchers: " + transportInterruptionProcessingComplete.getCount());
-        }
-        signalInterruptionProcessingNeeded();
-
-        for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) {
-            ActiveMQSession s = i.next();
-            s.clearMessagesInProgress();
-        }
-        
-        for (ActiveMQConnectionConsumer connectionConsumer : this.connectionConsumers) {
-            connectionConsumer.clearMessagesInProgress();    
-        }
-        
-        for (Iterator<TransportListener> iter = transportListeners.iterator(); iter.hasNext();) {
-            TransportListener listener = iter.next();
-            listener.transportInterupted();
-        }
-    }
-
-    public void transportResumed() {
-        for (Iterator<TransportListener> iter = transportListeners.iterator(); iter.hasNext();) {
-            TransportListener listener = iter.next();
-            listener.transportResumed();
-        }
-    }
-
-    /**
-     * Create the DestinationInfo object for the temporary destination.
-     * 
-     * @param topic - if its true topic, else queue.
-     * @return DestinationInfo
-     * @throws JMSException
-     */
-    protected ActiveMQTempDestination createTempDestination(boolean topic) throws JMSException {
-
-        // Check if Destination info is of temporary type.
-        ActiveMQTempDestination dest;
-        if (topic) {
-            dest = new ActiveMQTempTopic(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
-        } else {
-            dest = new ActiveMQTempQueue(info.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
-        }
-
-        DestinationInfo info = new DestinationInfo();
-        info.setConnectionId(this.info.getConnectionId());
-        info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
-        info.setDestination(dest);
-        syncSendPacket(info);
-
-        dest.setConnection(this);
-        activeTempDestinations.put(dest, dest);
-        return dest;
-    }
-
-    /**
-     * @param destination
-     * @throws JMSException
-     */
-    public void deleteTempDestination(ActiveMQTempDestination destination) throws JMSException {
-
-        checkClosedOrFailed();
-
-        for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) {
-            ActiveMQSession s = i.next();
-            if (s.isInUse(destination)) {
-                throw new JMSException("A consumer is consuming from the temporary destination");
-            }
-        }
-
-        activeTempDestinations.remove(destination);
-
-        DestinationInfo destInfo = new DestinationInfo();
-        destInfo.setConnectionId(this.info.getConnectionId());
-        destInfo.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE);
-        destInfo.setDestination(destination);
-        destInfo.setTimeout(0);
-        syncSendPacket(destInfo);
-    }
-
-    public boolean isDeleted(ActiveMQDestination dest) {
-
-        // If we are not watching the advisories.. then
-        // we will assume that the temp destination does exist.
-        if (advisoryConsumer == null) {
-            return false;
-        }
-
-        return !activeTempDestinations.contains(dest);
-    }
-
-    public boolean isCopyMessageOnSend() {
-        return copyMessageOnSend;
-    }
-
-    public LongSequenceGenerator getLocalTransactionIdGenerator() {
-        return localTransactionIdGenerator;
-    }
-
-    public boolean isUseCompression() {
-        return useCompression;
-    }
-
-    /**
-     * Enables the use of compression of the message bodies
-     */
-    public void setUseCompression(boolean useCompression) {
-        this.useCompression = useCompression;
-    }
-
-    public void destroyDestination(ActiveMQDestination destination) throws JMSException {
-
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-
-        DestinationInfo info = new DestinationInfo();
-        info.setConnectionId(this.info.getConnectionId());
-        info.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE);
-        info.setDestination(destination);
-        info.setTimeout(0);
-        syncSendPacket(info);
-
-    }
-
-    public boolean isDispatchAsync() {
-        return dispatchAsync;
-    }
-
-    /**
-     * Enables or disables the default setting of whether or not consumers have
-     * their messages <a
-     * href="http://activemq.apache.org/consumer-dispatch-async.html">dispatched
-     * synchronously or asynchronously by the broker</a>. For non-durable
-     * topics for example we typically dispatch synchronously by default to
-     * minimize context switches which boost performance. However sometimes its
-     * better to go slower to ensure that a single blocked consumer socket does
-     * not block delivery to other consumers.
-     * 
-     * @param asyncDispatch If true then consumers created on this connection
-     *                will default to having their messages dispatched
-     *                asynchronously. The default value is false.
-     */
-    public void setDispatchAsync(boolean asyncDispatch) {
-        this.dispatchAsync = asyncDispatch;
-    }
-
-    public boolean isObjectMessageSerializationDefered() {
-        return objectMessageSerializationDefered;
-    }
-
-    /**
-     * When an object is set on an ObjectMessage, the JMS spec requires the
-     * object to be serialized by that set method. Enabling this flag causes the
-     * object to not get serialized. The object may subsequently get serialized
-     * if the message needs to be sent over a socket or stored to disk.
-     */
-    public void setObjectMessageSerializationDefered(boolean objectMessageSerializationDefered) {
-        this.objectMessageSerializationDefered = objectMessageSerializationDefered;
-    }
-
-    public InputStream createInputStream(Destination dest) throws JMSException {
-        return createInputStream(dest, null);
-    }
-
-    public InputStream createInputStream(Destination dest, String messageSelector) throws JMSException {
-        return createInputStream(dest, messageSelector, false);
-    }
-
-    public InputStream createInputStream(Destination dest, String messageSelector, boolean noLocal) throws JMSException {
-        return createInputStream(dest, messageSelector, noLocal,  -1);
-    }
-
-
-
-    public InputStream createInputStream(Destination dest, String messageSelector, boolean noLocal, long timeout) throws JMSException {
-        return doCreateInputStream(dest, messageSelector, noLocal, null, timeout);
-    }
-    
-    public InputStream createDurableInputStream(Topic dest, String name) throws JMSException {
-        return createInputStream(dest, null, false);
-    }
-
-    public InputStream createDurableInputStream(Topic dest, String name, String messageSelector) throws JMSException {
-        return createDurableInputStream(dest, name, messageSelector, false);
-    }
-
-    public InputStream createDurableInputStream(Topic dest, String name, String messageSelector, boolean noLocal) throws JMSException {
-        return createDurableInputStream(dest, name, messageSelector, noLocal, -1);
-    }
-
-    public InputStream createDurableInputStream(Topic dest, String name, String messageSelector, boolean noLocal, long timeout) throws JMSException {
-        return doCreateInputStream(dest, messageSelector, noLocal, name, timeout);
-    }
-    
-    private InputStream doCreateInputStream(Destination dest, String messageSelector, boolean noLocal, String subName, long timeout) throws JMSException {
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-        return new ActiveMQInputStream(this, createConsumerId(), ActiveMQDestination.transform(dest), messageSelector, noLocal, subName, prefetchPolicy.getInputStreamPrefetch(), timeout);
-    }
-
-    /**
-     * Creates a persistent output stream; individual messages will be written
-     * to disk/database by the broker
-     */
-    public OutputStream createOutputStream(Destination dest) throws JMSException {
-        return createOutputStream(dest, null, ActiveMQMessage.DEFAULT_DELIVERY_MODE, ActiveMQMessage.DEFAULT_PRIORITY, ActiveMQMessage.DEFAULT_TIME_TO_LIVE);
-    }
-
-    /**
-     * Creates a non persistent output stream; messages will not be written to
-     * disk
-     */
-    public OutputStream createNonPersistentOutputStream(Destination dest) throws JMSException {
-        return createOutputStream(dest, null, DeliveryMode.NON_PERSISTENT, ActiveMQMessage.DEFAULT_PRIORITY, ActiveMQMessage.DEFAULT_TIME_TO_LIVE);
-    }
-
-    /**
-     * Creates an output stream allowing full control over the delivery mode,
-     * the priority and time to live of the messages and the properties added to
-     * messages on the stream.
-     * 
-     * @param streamProperties defines a map of key-value pairs where the keys
-     *                are strings and the values are primitive values (numbers
-     *                and strings) which are appended to the messages similarly
-     *                to using the
-     *                {@link javax.jms.Message#setObjectProperty(String, Object)}
-     *                method
-     */
-    public OutputStream createOutputStream(Destination dest, Map<String, Object> streamProperties, int deliveryMode, int priority, long timeToLive) throws JMSException {
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-        return new ActiveMQOutputStream(this, createProducerId(), ActiveMQDestination.transform(dest), streamProperties, deliveryMode, priority, timeToLive);
-    }
-
-    /**
-     * Unsubscribes a durable subscription that has been created by a client.
-     * <P>
-     * This method deletes the state being maintained on behalf of the
-     * subscriber by its provider.
-     * <P>
-     * It is erroneous for a client to delete a durable subscription while there
-     * is an active <CODE>MessageConsumer </CODE> or
-     * <CODE>TopicSubscriber</CODE> for the subscription, or while a consumed
-     * message is part of a pending transaction or has not been acknowledged in
-     * the session.
-     * 
-     * @param name the name used to identify this subscription
-     * @throws JMSException if the session fails to unsubscribe to the durable
-     *                 subscription due to some internal error.
-     * @throws InvalidDestinationException if an invalid subscription name is
-     *                 specified.
-     * @since 1.1
-     */
-    public void unsubscribe(String name) throws InvalidDestinationException, JMSException {
-        checkClosedOrFailed();
-        RemoveSubscriptionInfo rsi = new RemoveSubscriptionInfo();
-        rsi.setConnectionId(getConnectionInfo().getConnectionId());
-        rsi.setSubscriptionName(name);
-        rsi.setClientId(getConnectionInfo().getClientId());
-        syncSendPacket(rsi);
-    }
-
-    /**
-     * Internal send method optimized: - It does not copy the message - It can
-     * only handle ActiveMQ messages. - You can specify if the send is async or
-     * sync - Does not allow you to send /w a transaction.
-     */
-    void send(ActiveMQDestination destination, ActiveMQMessage msg, MessageId messageId, int deliveryMode, int priority, long timeToLive, boolean async) throws JMSException {
-        checkClosedOrFailed();
-
-        if (destination.isTemporary() && isDeleted(destination)) {
-            throw new JMSException("Cannot publish to a deleted Destination: " + destination);
-        }
-
-        msg.setJMSDestination(destination);
-        msg.setJMSDeliveryMode(deliveryMode);
-        long expiration = 0L;
-
-        if (!isDisableTimeStampsByDefault()) {
-            long timeStamp = System.currentTimeMillis();
-            msg.setJMSTimestamp(timeStamp);
-            if (timeToLive > 0) {
-                expiration = timeToLive + timeStamp;
-            }
-        }
-
-        msg.setJMSExpiration(expiration);
-        msg.setJMSPriority(priority);
-
-        msg.setJMSRedelivered(false);
-        msg.setMessageId(messageId);
-
-        msg.onSend();
-
-        msg.setProducerId(msg.getMessageId().getProducerId());
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Sending message: " + msg);
-        }
-
-        if (async) {
-            asyncSendPacket(msg);
-        } else {
-            syncSendPacket(msg);
-        }
-
-    }
-
-    public void addOutputStream(ActiveMQOutputStream stream) {
-        outputStreams.add(stream);
-    }
-
-    public void removeOutputStream(ActiveMQOutputStream stream) {
-        outputStreams.remove(stream);
-    }
-
-    public void addInputStream(ActiveMQInputStream stream) {
-        inputStreams.add(stream);
-    }
-
-    public void removeInputStream(ActiveMQInputStream stream) {
-        inputStreams.remove(stream);
-    }
-
-    protected void onControlCommand(ControlCommand command) {
-        String text = command.getCommand();
-        if (text != null) {
-            if (text.equals("shutdown")) {
-                LOG.info("JVM told to shutdown");
-                System.exit(0);
-            }
-        }
-    }
-
-    protected void onConnectionControl(ConnectionControl command) {
-        if (command.isFaultTolerant()) {
-            this.optimizeAcknowledge = false;
-            for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) {
-                ActiveMQSession s = i.next();
-                s.setOptimizeAcknowledge(false);
-            }
-        }
-    }
-
-    protected void onConsumerControl(ConsumerControl command) {
-        if (command.isClose()) {
-            for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) {
-                ActiveMQSession s = i.next();
-                s.close(command.getConsumerId());
-            }
-        } else {
-            for (Iterator<ActiveMQSession> i = this.sessions.iterator(); i.hasNext();) {
-                ActiveMQSession s = i.next();
-                s.setPrefetchSize(command.getConsumerId(), command.getPrefetch());
-            }
-        }
-    }
-
-    protected void transportFailed(IOException error) {
-        transportFailed.set(true);
-        if (firstFailureError == null) {
-            firstFailureError = error;
-        }
-    }
-
-    /**
-     * Should a JMS message be copied to a new JMS Message object as part of the
-     * send() method in JMS. This is enabled by default to be compliant with the
-     * JMS specification. You can disable it if you do not mutate JMS messages
-     * after they are sent for a performance boost
-     */
-    public void setCopyMessageOnSend(boolean copyMessageOnSend) {
-        this.copyMessageOnSend = copyMessageOnSend;
-    }
-
-    @Override
-    public String toString() {
-        return "ActiveMQConnection {id=" + info.getConnectionId() + ",clientId=" + info.getClientId() + ",started=" + started.get() + "}";
-    }
-
-    protected BlobTransferPolicy createBlobTransferPolicy() {
-        return new BlobTransferPolicy();
-    }
-
-    public int getProtocolVersion() {
-        return protocolVersion.get();
-    }
-
-    public int getProducerWindowSize() {
-        return producerWindowSize;
-    }
-
-    public void setProducerWindowSize(int producerWindowSize) {
-        this.producerWindowSize = producerWindowSize;
-    }
-
-    public void setAuditDepth(int auditDepth) {
-        connectionAudit.setAuditDepth(auditDepth);
-	}
-
-    public void setAuditMaximumProducerNumber(int auditMaximumProducerNumber) {
-        connectionAudit.setAuditMaximumProducerNumber(auditMaximumProducerNumber);
-	}
-
-    protected void removeDispatcher(ActiveMQDispatcher dispatcher) {
-        connectionAudit.removeDispatcher(dispatcher);
-    }
-
-    protected boolean isDuplicate(ActiveMQDispatcher dispatcher, Message message) {
-        return checkForDuplicates && connectionAudit.isDuplicate(dispatcher, message);
-    }
-
-    protected void rollbackDuplicate(ActiveMQDispatcher dispatcher, Message message) {
-        connectionAudit.rollbackDuplicate(dispatcher, message);
-    }
-
-	public IOException getFirstFailureError() {
-		return firstFailureError;
-	}
-	
-	protected void waitForTransportInterruptionProcessingToComplete() throws InterruptedException {
-	    CountDownLatch cdl = this.transportInterruptionProcessingComplete;
-	    if (cdl != null) {
-            if (!closed.get() && !transportFailed.get() && cdl.getCount()>0) {
-                LOG.warn("dispatch paused, waiting for outstanding dispatch interruption processing (" + cdl.getCount() + ") to complete..");
-                cdl.await(10, TimeUnit.SECONDS);
-            }
-            signalInterruptionProcessingComplete();
-        }
-    }
-	
-	protected void transportInterruptionProcessingComplete() {
-	    CountDownLatch cdl = this.transportInterruptionProcessingComplete;
-	    if (cdl != null) {
-	        cdl.countDown();
-	        try {
-	            signalInterruptionProcessingComplete();
-	        } catch (InterruptedException ignored) {}
-	    }
-	}
-
-    private void signalInterruptionProcessingComplete() throws InterruptedException {
-        CountDownLatch cdl = this.transportInterruptionProcessingComplete;
-        if (cdl.getCount()==0) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("transportInterruptionProcessingComplete for: " + this.getConnectionInfo().getConnectionId());
-            }
-            this.transportInterruptionProcessingComplete = null;
-
-            FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class);
-            if (failoverTransport != null) {
-                failoverTransport.connectionInterruptProcessingComplete(this.getConnectionInfo().getConnectionId());
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("notified failover transport (" + failoverTransport
-                            + ") of interruption completion for: " + this.getConnectionInfo().getConnectionId());
-                }
-            }
-
-        }
-    }
-
-    private void signalInterruptionProcessingNeeded() {
-        FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class);
-        if (failoverTransport != null) {
-            failoverTransport.getStateTracker().transportInterrupted(this.getConnectionInfo().getConnectionId());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("notified failover transport (" + failoverTransport
-                        + ") of pending interruption processing for: " + this.getConnectionInfo().getConnectionId());
-            }
-        }
-    }
-
-    /*
-     * specify the amount of time in milliseconds that a consumer with a transaction pending recovery
-     * will wait to receive re dispatched messages.
-     * default value is 0 so there is no wait by default.
-     */
-    public void setConsumerFailoverRedeliveryWaitPeriod(long consumerFailoverRedeliveryWaitPeriod) {
-        this.consumerFailoverRedeliveryWaitPeriod = consumerFailoverRedeliveryWaitPeriod;
-    }
-    
-    public long getConsumerFailoverRedeliveryWaitPeriod() {
-        return consumerFailoverRedeliveryWaitPeriod;
-    }
-    
-    protected Scheduler getScheduler() {
-        return this.scheduler;
-    }
-    
-    protected ThreadPoolExecutor getExecutor() {
-        return this.executor;
-    }
-
-    /**
-     * @return the checkForDuplicates
-     */
-    public boolean isCheckForDuplicates() {
-        return this.checkForDuplicates;
-    }
-
-    /**
-     * @param checkForDuplicates the checkForDuplicates to set
-     */
-    public void setCheckForDuplicates(boolean checkForDuplicates) {
-        this.checkForDuplicates = checkForDuplicates;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java
deleted file mode 100755
index d3305d1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.jms.ConnectionConsumer;
-import javax.jms.IllegalStateException;
-import javax.jms.JMSException;
-import javax.jms.ServerSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageDispatch;
-
-/**
- * For application servers, <CODE>Connection</CODE> objects provide a special
- * facility for creating a <CODE>ConnectionConsumer</CODE> (optional). The
- * messages it is to consume are specified by a <CODE>Destination</CODE> and a
- * message selector. In addition, a <CODE>ConnectionConsumer</CODE> must be
- * given a <CODE>ServerSessionPool</CODE> to use for processing its messages.
- * <p/>
- * <P>
- * Normally, when traffic is light, a <CODE>ConnectionConsumer</CODE> gets a
- * <CODE>ServerSession</CODE> from its pool, loads it with a single message,
- * and starts it. As traffic picks up, messages can back up. If this happens, a
- * <CODE>ConnectionConsumer</CODE> can load each <CODE>ServerSession</CODE>
- * with more than one message. This reduces the thread context switches and
- * minimizes resource use at the expense of some serialization of message
- * processing.
- * 
- * @see javax.jms.Connection#createConnectionConsumer
- * @see javax.jms.Connection#createDurableConnectionConsumer
- * @see javax.jms.QueueConnection#createConnectionConsumer
- * @see javax.jms.TopicConnection#createConnectionConsumer
- * @see javax.jms.TopicConnection#createDurableConnectionConsumer
- */
-
-public class ActiveMQConnectionConsumer implements ConnectionConsumer, ActiveMQDispatcher {
-
-    private ActiveMQConnection connection;
-    private ServerSessionPool sessionPool;
-    private ConsumerInfo consumerInfo;
-    private boolean closed;
-
-    /**
-     * Create a ConnectionConsumer
-     * 
-     * @param theConnection
-     * @param theSessionPool
-     * @param theConsumerInfo
-     * @throws JMSException
-     */
-    protected ActiveMQConnectionConsumer(ActiveMQConnection theConnection, ServerSessionPool theSessionPool, ConsumerInfo theConsumerInfo) throws JMSException {
-        this.connection = theConnection;
-        this.sessionPool = theSessionPool;
-        this.consumerInfo = theConsumerInfo;
-
-        this.connection.addConnectionConsumer(this);
-        this.connection.addDispatcher(consumerInfo.getConsumerId(), this);
-        this.connection.asyncSendPacket(this.consumerInfo);
-    }
-
-    /**
-     * Gets the server session pool associated with this connection consumer.
-     * 
-     * @return the server session pool used by this connection consumer
-     * @throws JMSException if the JMS provider fails to get the server session
-     *                 pool associated with this consumer due to some internal
-     *                 error.
-     */
-
-    public ServerSessionPool getServerSessionPool() throws JMSException {
-        if (closed) {
-            throw new IllegalStateException("The Connection Consumer is closed");
-        }
-        return this.sessionPool;
-    }
-
-    /**
-     * Closes the connection consumer. <p/>
-     * <P>
-     * Since a provider may allocate some resources on behalf of a connection
-     * consumer outside the Java virtual machine, clients should close these
-     * resources when they are not needed. Relying on garbage collection to
-     * eventually reclaim these resources may not be timely enough.
-     * 
-     * @throws JMSException
-     */
-
-    public void close() throws JMSException {
-        if (!closed) {
-            dispose();
-            this.connection.asyncSendPacket(this.consumerInfo.createRemoveCommand());
-        }
-
-    }
-
-    public void dispose() {
-        if (!closed) {
-            this.connection.removeDispatcher(consumerInfo.getConsumerId());
-            this.connection.removeConnectionConsumer(this);
-            closed = true;
-        }
-    }
-
-    public void dispatch(MessageDispatch messageDispatch) {
-        try {
-            messageDispatch.setConsumer(this);
-
-            ServerSession serverSession = sessionPool.getServerSession();
-            Session s = serverSession.getSession();
-            ActiveMQSession session = null;
-
-            if (s instanceof ActiveMQSession) {
-                session = (ActiveMQSession)s;
-            } else if (s instanceof ActiveMQTopicSession) {
-                ActiveMQTopicSession topicSession = (ActiveMQTopicSession)s;
-                session = (ActiveMQSession)topicSession.getNext();
-            } else if (s instanceof ActiveMQQueueSession) {
-                ActiveMQQueueSession queueSession = (ActiveMQQueueSession)s;
-                session = (ActiveMQSession)queueSession.getNext();
-            } else {
-                connection.onClientInternalException(new JMSException("Session pool provided an invalid session type: " + s.getClass()));
-                return;
-            }
-
-            session.dispatch(messageDispatch);
-            serverSession.start();
-        } catch (JMSException e) {
-            connection.onAsyncException(e);
-        }
-    }
-
-    public String toString() {
-        return "ActiveMQConnectionConsumer { value=" + consumerInfo.getConsumerId() + " }";
-    }
-
-    public void clearMessagesInProgress() {
-        // future: may want to deal with rollback of in progress messages to track re deliveries
-        // before indicating that all is complete.        
-        // Till there is a need, lets immediately allow dispatch
-        this.connection.transportInterruptionProcessingComplete();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
deleted file mode 100755
index 1d8140a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
+++ /dev/null
@@ -1,983 +0,0 @@
-/**
- * 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;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.naming.Context;
-import org.apache.activemq.blob.BlobTransferPolicy;
-import org.apache.activemq.jndi.JNDIBaseStorable;
-import org.apache.activemq.management.JMSStatsImpl;
-import org.apache.activemq.management.StatsCapable;
-import org.apache.activemq.management.StatsImpl;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-/**
- * A ConnectionFactory is an an Administered object, and is used for creating
- * Connections. <p/> This class also implements QueueConnectionFactory and
- * TopicConnectionFactory. You can use this connection to create both
- * QueueConnections and TopicConnections.
- * 
- * 
- * @see javax.jms.ConnectionFactory
- */
-public class ActiveMQConnectionFactory extends JNDIBaseStorable implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory, StatsCapable, Cloneable {
-
-    public static final String DEFAULT_BROKER_BIND_URL = "tcp://localhost:61616";
-    public static final String DEFAULT_BROKER_URL = "failover://"+DEFAULT_BROKER_BIND_URL;
-    public static final String DEFAULT_USER = null;
-    public static final String DEFAULT_PASSWORD = null;
-    public static final int DEFAULT_PRODUCER_WINDOW_SIZE = 0;
-
-    protected static final Executor DEFAULT_CONNECTION_EXECUTOR = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
-        public Thread newThread(Runnable run) {
-            Thread thread = new Thread(run);
-            thread.setPriority(ThreadPriorities.INBOUND_CLIENT_CONNECTION);
-            return thread;
-        }
-    });
-
-    protected URI brokerURL;
-    protected String userName;
-    protected String password;
-    protected String clientID;
-    protected boolean dispatchAsync=true;
-    protected boolean alwaysSessionAsync=true;
-
-    JMSStatsImpl factoryStats = new JMSStatsImpl();
-
-    private IdGenerator clientIdGenerator;
-    private String clientIDPrefix;
-
-    // client policies
-    private ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-    private RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
-    private BlobTransferPolicy blobTransferPolicy = new BlobTransferPolicy();
-    private MessageTransformer transformer;
-
-    private boolean disableTimeStampsByDefault;
-    private boolean optimizedMessageDispatch = true;
-    private boolean copyMessageOnSend = true;
-    private boolean useCompression;
-    private boolean objectMessageSerializationDefered;
-    private boolean useAsyncSend;
-    private boolean optimizeAcknowledge;
-    private int closeTimeout = 15000;
-    private boolean useRetroactiveConsumer;
-    private boolean exclusiveConsumer;
-    private boolean nestedMapAndListEnabled = true;
-    private boolean alwaysSyncSend;
-    private boolean watchTopicAdvisories = true;
-    private int producerWindowSize = DEFAULT_PRODUCER_WINDOW_SIZE;
-    private long warnAboutUnstartedConnectionTimeout = 500L;
-    private int sendTimeout = 0;
-    private boolean sendAcksAsync=true;
-    private TransportListener transportListener;
-    private ExceptionListener exceptionListener;
-    private int auditDepth = ActiveMQMessageAudit.DEFAULT_WINDOW_SIZE;
-    private int auditMaximumProducerNumber = ActiveMQMessageAudit.MAXIMUM_PRODUCER_COUNT;
-    private boolean useDedicatedTaskRunner;
-    private long consumerFailoverRedeliveryWaitPeriod = 0;
-    private boolean checkForDuplicates = true;
-    private ClientInternalExceptionListener clientInternalExceptionListener;
-    private boolean messagePrioritySupported = true;
-
-    // /////////////////////////////////////////////
-    //
-    // ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory Methods
-    //
-    // /////////////////////////////////////////////
-
-    public ActiveMQConnectionFactory() {
-        this(DEFAULT_BROKER_URL);
-    }
-
-    public ActiveMQConnectionFactory(String brokerURL) {
-        this(createURI(brokerURL));
-    }
-
-    public ActiveMQConnectionFactory(URI brokerURL) {
-        setBrokerURL(brokerURL.toString());
-    }
-
-    public ActiveMQConnectionFactory(String userName, String password, URI brokerURL) {
-        setUserName(userName);
-        setPassword(password);
-        setBrokerURL(brokerURL.toString());
-    }
-
-    public ActiveMQConnectionFactory(String userName, String password, String brokerURL) {
-        setUserName(userName);
-        setPassword(password);
-        setBrokerURL(brokerURL);
-    }
-
-    /**
-     * Returns a copy of the given connection factory
-     */
-    public ActiveMQConnectionFactory copy() {
-        try {
-            return (ActiveMQConnectionFactory)super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new RuntimeException("This should never happen: " + e, e);
-        }
-    }
-
-    /**
-     * @param brokerURL
-     * @return
-     * @throws URISyntaxException
-     */
-    private static URI createURI(String brokerURL) {
-        try {
-            return new URI(brokerURL);
-        } catch (URISyntaxException e) {
-            throw (IllegalArgumentException)new IllegalArgumentException("Invalid broker URI: " + brokerURL).initCause(e);
-        }
-    }
-
-    /**
-     * @return Returns the Connection.
-     */
-    public Connection createConnection() throws JMSException {
-        return createActiveMQConnection();
-    }
-
-    /**
-     * @return Returns the Connection.
-     */
-    public Connection createConnection(String userName, String password) throws JMSException {
-        return createActiveMQConnection(userName, password);
-    }
-
-    /**
-     * @return Returns the QueueConnection.
-     * @throws JMSException
-     */
-    public QueueConnection createQueueConnection() throws JMSException {
-        return createActiveMQConnection();
-    }
-
-    /**
-     * @return Returns the QueueConnection.
-     */
-    public QueueConnection createQueueConnection(String userName, String password) throws JMSException {
-        return createActiveMQConnection(userName, password);
-    }
-
-    /**
-     * @return Returns the TopicConnection.
-     * @throws JMSException
-     */
-    public TopicConnection createTopicConnection() throws JMSException {
-        return createActiveMQConnection();
-    }
-
-    /**
-     * @return Returns the TopicConnection.
-     */
-    public TopicConnection createTopicConnection(String userName, String password) throws JMSException {
-        return createActiveMQConnection(userName, password);
-    }
-
-    public StatsImpl getStats() {
-        // TODO
-        return null;
-    }
-
-    // /////////////////////////////////////////////
-    //
-    // Implementation methods.
-    //
-    // /////////////////////////////////////////////
-
-    protected ActiveMQConnection createActiveMQConnection() throws JMSException {
-        return createActiveMQConnection(userName, password);
-    }
-
-    /**
-     * Creates a Transport based on this object's connection settings. Separated
-     * from createActiveMQConnection to allow for subclasses to override.
-     * 
-     * @return The newly created Transport.
-     * @throws JMSException If unable to create trasnport.
-     * @author sepandm@gmail.com
-     */
-    protected Transport createTransport() throws JMSException {
-        try {
-            return TransportFactory.connect(brokerURL, DEFAULT_CONNECTION_EXECUTOR);
-        } catch (Exception e) {
-            throw JMSExceptionSupport.create("Could not create Transport. Reason: " + e, e);
-        }
-    }
-
-    /**
-     * @return Returns the Connection.
-     */
-    protected ActiveMQConnection createActiveMQConnection(String userName, String password) throws JMSException {
-        if (brokerURL == null) {
-            throw new ConfigurationException("brokerURL not set.");
-        }
-        ActiveMQConnection connection = null;
-        try {
-            Transport transport = createTransport();
-            connection = createActiveMQConnection(transport, factoryStats);
-
-            connection.setUserName(userName);
-            connection.setPassword(password);
-
-            configureConnection(connection);
-
-            transport.start();
-
-            if (clientID != null) {
-                connection.setDefaultClientID(clientID);
-            }
-
-            return connection;
-        } catch (JMSException e) {
-            // Clean up!
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-            throw e;
-        } catch (Exception e) {
-            // Clean up!
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-            throw JMSExceptionSupport.create("Could not connect to broker URL: " + brokerURL + ". Reason: " + e, e);
-        }
-    }
-
-    protected ActiveMQConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception {
-        ActiveMQConnection connection = new ActiveMQConnection(transport, getClientIdGenerator(), stats);
-        return connection;
-    }
-
-    protected void configureConnection(ActiveMQConnection connection) throws JMSException {
-        connection.setPrefetchPolicy(getPrefetchPolicy());
-        connection.setDisableTimeStampsByDefault(isDisableTimeStampsByDefault());
-        connection.setOptimizedMessageDispatch(isOptimizedMessageDispatch());
-        connection.setCopyMessageOnSend(isCopyMessageOnSend());
-        connection.setUseCompression(isUseCompression());
-        connection.setObjectMessageSerializationDefered(isObjectMessageSerializationDefered());
-        connection.setDispatchAsync(isDispatchAsync());
-        connection.setUseAsyncSend(isUseAsyncSend());
-        connection.setAlwaysSyncSend(isAlwaysSyncSend());
-        connection.setAlwaysSessionAsync(isAlwaysSessionAsync());
-        connection.setOptimizeAcknowledge(isOptimizeAcknowledge());
-        connection.setUseRetroactiveConsumer(isUseRetroactiveConsumer());
-        connection.setExclusiveConsumer(isExclusiveConsumer());
-        connection.setRedeliveryPolicy(getRedeliveryPolicy());
-        connection.setTransformer(getTransformer());
-        connection.setBlobTransferPolicy(getBlobTransferPolicy().copy());
-        connection.setWatchTopicAdvisories(isWatchTopicAdvisories());
-        connection.setProducerWindowSize(getProducerWindowSize());
-        connection.setWarnAboutUnstartedConnectionTimeout(getWarnAboutUnstartedConnectionTimeout());
-        connection.setSendTimeout(getSendTimeout());
-        connection.setCloseTimeout(getCloseTimeout());
-        connection.setSendAcksAsync(isSendAcksAsync());
-        connection.setAuditDepth(getAuditDepth());
-        connection.setAuditMaximumProducerNumber(getAuditMaximumProducerNumber());
-        connection.setUseDedicatedTaskRunner(isUseDedicatedTaskRunner());
-        connection.setConsumerFailoverRedeliveryWaitPeriod(getConsumerFailoverRedeliveryWaitPeriod());
-        connection.setCheckForDuplicates(isCheckForDuplicates());
-        connection.setMessagePrioritySupported(isMessagePrioritySupported());
-        if (transportListener != null) {
-            connection.addTransportListener(transportListener);
-        }
-        if (exceptionListener != null) {
-        	connection.setExceptionListener(exceptionListener);
-        }
-        if (clientInternalExceptionListener != null) {
-            connection.setClientInternalExceptionListener(clientInternalExceptionListener);
-        }
-    }
-
-    // /////////////////////////////////////////////
-    //
-    // Property Accessors
-    //
-    // /////////////////////////////////////////////
-
-    public String getBrokerURL() {
-        return brokerURL == null ? null : brokerURL.toString();
-    }
-
-    /**
-     * Sets the <a
-     * href="http://activemq.apache.org/configuring-transports.html">connection
-     * URL</a> used to connect to the ActiveMQ broker.
-     */
-    public void setBrokerURL(String brokerURL) {
-        this.brokerURL = createURI(brokerURL);
-
-        // Use all the properties prefixed with 'jms.' to set the connection
-        // factory
-        // options.
-        if (this.brokerURL.getQuery() != null) {
-            // It might be a standard URI or...
-            try {
-
-                Map map = URISupport.parseQuery(this.brokerURL.getQuery());
-                if (buildFromMap(IntrospectionSupport.extractProperties(map, "jms."))) {
-                    this.brokerURL = URISupport.createRemainingURI(this.brokerURL, map);
-                }
-
-            } catch (URISyntaxException e) {
-            }
-
-        } else {
-
-            // It might be a composite URI.
-            try {
-                CompositeData data = URISupport.parseComposite(this.brokerURL);
-                if (buildFromMap(IntrospectionSupport.extractProperties(data.getParameters(), "jms."))) {
-                    this.brokerURL = data.toURI();
-                }
-            } catch (URISyntaxException e) {
-            }
-        }
-    }
-
-    public String getClientID() {
-        return clientID;
-    }
-
-    /**
-     * Sets the JMS clientID to use for the created connection. Note that this
-     * can only be used by one connection at once so generally its a better idea
-     * to set the clientID on a Connection
-     */
-    public void setClientID(String clientID) {
-        this.clientID = clientID;
-    }
-
-    public boolean isCopyMessageOnSend() {
-        return copyMessageOnSend;
-    }
-
-    /**
-     * Should a JMS message be copied to a new JMS Message object as part of the
-     * send() method in JMS. This is enabled by default to be compliant with the
-     * JMS specification. You can disable it if you do not mutate JMS messages
-     * after they are sent for a performance boost
-     */
-    public void setCopyMessageOnSend(boolean copyMessageOnSend) {
-        this.copyMessageOnSend = copyMessageOnSend;
-    }
-
-    public boolean isDisableTimeStampsByDefault() {
-        return disableTimeStampsByDefault;
-    }
-
-    /**
-     * Sets whether or not timestamps on messages should be disabled or not. If
-     * you disable them it adds a small performance boost.
-     */
-    public void setDisableTimeStampsByDefault(boolean disableTimeStampsByDefault) {
-        this.disableTimeStampsByDefault = disableTimeStampsByDefault;
-    }
-
-    public boolean isOptimizedMessageDispatch() {
-        return optimizedMessageDispatch;
-    }
-
-    /**
-     * If this flag is set then an larger prefetch limit is used - only
-     * applicable for durable topic subscribers.
-     */
-    public void setOptimizedMessageDispatch(boolean optimizedMessageDispatch) {
-        this.optimizedMessageDispatch = optimizedMessageDispatch;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    /**
-     * Sets the JMS password used for connections created from this factory
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public ActiveMQPrefetchPolicy getPrefetchPolicy() {
-        return prefetchPolicy;
-    }
-
-    /**
-     * Sets the <a
-     * href="http://activemq.apache.org/what-is-the-prefetch-limit-for.html">prefetch
-     * policy</a> for consumers created by this connection.
-     */
-    public void setPrefetchPolicy(ActiveMQPrefetchPolicy prefetchPolicy) {
-        this.prefetchPolicy = prefetchPolicy;
-    }
-
-    public boolean isUseAsyncSend() {
-        return useAsyncSend;
-    }
-
-    public BlobTransferPolicy getBlobTransferPolicy() {
-        return blobTransferPolicy;
-    }
-
-    /**
-     * Sets the policy used to describe how out-of-band BLOBs (Binary Large
-     * OBjects) are transferred from producers to brokers to consumers
-     */
-    public void setBlobTransferPolicy(BlobTransferPolicy blobTransferPolicy) {
-        this.blobTransferPolicy = blobTransferPolicy;
-    }
-
-    /**
-     * Forces the use of <a
-     * href="http://activemq.apache.org/async-sends.html">Async Sends</a> which
-     * adds a massive performance boost; but means that the send() method will
-     * return immediately whether the message has been sent or not which could
-     * lead to message loss.
-     */
-    public void setUseAsyncSend(boolean useAsyncSend) {
-        this.useAsyncSend = useAsyncSend;
-    }
-
-    public synchronized boolean isWatchTopicAdvisories() {
-        return watchTopicAdvisories;
-    }
-
-    public synchronized void setWatchTopicAdvisories(boolean watchTopicAdvisories) {
-        this.watchTopicAdvisories = watchTopicAdvisories;
-    }
-
-    /**
-     * @return true if always sync send messages
-     */
-    public boolean isAlwaysSyncSend() {
-        return this.alwaysSyncSend;
-    }
-
-    /**
-     * Set true if always require messages to be sync sent
-     * 
-     * @param alwaysSyncSend
-     */
-    public void setAlwaysSyncSend(boolean alwaysSyncSend) {
-        this.alwaysSyncSend = alwaysSyncSend;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    /**
-     * Sets the JMS userName used by connections created by this factory
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public boolean isUseRetroactiveConsumer() {
-        return useRetroactiveConsumer;
-    }
-
-    /**
-     * Sets whether or not retroactive consumers are enabled. Retroactive
-     * consumers allow non-durable topic subscribers to receive old messages
-     * that were published before the non-durable subscriber started.
-     */
-    public void setUseRetroactiveConsumer(boolean useRetroactiveConsumer) {
-        this.useRetroactiveConsumer = useRetroactiveConsumer;
-    }
-
-    public boolean isExclusiveConsumer() {
-        return exclusiveConsumer;
-    }
-
-    /**
-     * Enables or disables whether or not queue consumers should be exclusive or
-     * not for example to preserve ordering when not using <a
-     * href="http://activemq.apache.org/message-groups.html">Message Groups</a>
-     * 
-     * @param exclusiveConsumer
-     */
-    public void setExclusiveConsumer(boolean exclusiveConsumer) {
-        this.exclusiveConsumer = exclusiveConsumer;
-    }
-
-    public RedeliveryPolicy getRedeliveryPolicy() {
-        return redeliveryPolicy;
-    }
-
-    /**
-     * Sets the global redelivery policy to be used when a message is delivered
-     * but the session is rolled back
-     */
-    public void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy) {
-        this.redeliveryPolicy = redeliveryPolicy;
-    }
-
-    public MessageTransformer getTransformer() {
-        return transformer;
-    }
-    
-    /**
-     * @return the sendTimeout
-     */
-    public int getSendTimeout() {
-        return sendTimeout;
-    }
-
-    /**
-     * @param sendTimeout the sendTimeout to set
-     */
-    public void setSendTimeout(int sendTimeout) {
-        this.sendTimeout = sendTimeout;
-    }
-    
-    /**
-     * @return the sendAcksAsync
-     */
-    public boolean isSendAcksAsync() {
-        return sendAcksAsync;
-    }
-
-    /**
-     * @param sendAcksAsync the sendAcksAsync to set
-     */
-    public void setSendAcksAsync(boolean sendAcksAsync) {
-        this.sendAcksAsync = sendAcksAsync;
-    }
-    
-    /**
-     * @return the messagePrioritySupported
-     */
-    public boolean isMessagePrioritySupported() {
-        return this.messagePrioritySupported;
-    }
-
-    /**
-     * @param messagePrioritySupported the messagePrioritySupported to set
-     */
-    public void setMessagePrioritySupported(boolean messagePrioritySupported) {
-        this.messagePrioritySupported = messagePrioritySupported;
-    }
-
-
-    /**
-     * Sets the transformer used to transform messages before they are sent on
-     * to the JMS bus or when they are received from the bus but before they are
-     * delivered to the JMS client
-     */
-    public void setTransformer(MessageTransformer transformer) {
-        this.transformer = transformer;
-    }
-
-    @Override
-    public void buildFromProperties(Properties properties) {
-
-        if (properties == null) {
-            properties = new Properties();
-        }
-
-        String temp = properties.getProperty(Context.PROVIDER_URL);
-        if (temp == null || temp.length() == 0) {
-            temp = properties.getProperty("brokerURL");
-        }
-        if (temp != null && temp.length() > 0) {
-            setBrokerURL(temp);
-        }
-
-        Map<String, Object> p = new HashMap(properties);
-        buildFromMap(p);
-    }
-
-    public boolean buildFromMap(Map<String, Object> properties) {
-        boolean rc = false;
-
-        ActiveMQPrefetchPolicy p = new ActiveMQPrefetchPolicy();
-        if (IntrospectionSupport.setProperties(p, properties, "prefetchPolicy.")) {
-            setPrefetchPolicy(p);
-            rc = true;
-        }
-
-        RedeliveryPolicy rp = new RedeliveryPolicy();
-        if (IntrospectionSupport.setProperties(rp, properties, "redeliveryPolicy.")) {
-            setRedeliveryPolicy(rp);
-            rc = true;
-        }
-
-        BlobTransferPolicy blobTransferPolicy = new BlobTransferPolicy();
-        if (IntrospectionSupport.setProperties(blobTransferPolicy, properties, "blobTransferPolicy.")) {
-            setBlobTransferPolicy(blobTransferPolicy);
-            rc = true;
-        }
-
-        rc |= IntrospectionSupport.setProperties(this, properties);
-
-        return rc;
-    }
-
-    @Override
-    public void populateProperties(Properties props) {
-        props.setProperty("dispatchAsync", Boolean.toString(isDispatchAsync()));
-
-        if (getBrokerURL() != null) {
-            props.setProperty(Context.PROVIDER_URL, getBrokerURL());
-            props.setProperty("brokerURL", getBrokerURL());
-        }
-
-        if (getClientID() != null) {
-            props.setProperty("clientID", getClientID());
-        }
-
-        IntrospectionSupport.getProperties(getPrefetchPolicy(), props, "prefetchPolicy.");
-        IntrospectionSupport.getProperties(getRedeliveryPolicy(), props, "redeliveryPolicy.");
-        IntrospectionSupport.getProperties(getBlobTransferPolicy(), props, "blobTransferPolicy.");
-
-        props.setProperty("copyMessageOnSend", Boolean.toString(isCopyMessageOnSend()));
-        props.setProperty("disableTimeStampsByDefault", Boolean.toString(isDisableTimeStampsByDefault()));
-        props.setProperty("objectMessageSerializationDefered", Boolean.toString(isObjectMessageSerializationDefered()));
-        props.setProperty("optimizedMessageDispatch", Boolean.toString(isOptimizedMessageDispatch()));
-
-        if (getPassword() != null) {
-            props.setProperty("password", getPassword());
-        }
-
-        props.setProperty("useAsyncSend", Boolean.toString(isUseAsyncSend()));
-        props.setProperty("useCompression", Boolean.toString(isUseCompression()));
-        props.setProperty("useRetroactiveConsumer", Boolean.toString(isUseRetroactiveConsumer()));
-        props.setProperty("watchTopicAdvisories", Boolean.toString(isWatchTopicAdvisories()));
-
-        if (getUserName() != null) {
-            props.setProperty("userName", getUserName());
-        }
-
-        props.setProperty("closeTimeout", Integer.toString(getCloseTimeout()));
-        props.setProperty("alwaysSessionAsync", Boolean.toString(isAlwaysSessionAsync()));
-        props.setProperty("optimizeAcknowledge", Boolean.toString(isOptimizeAcknowledge()));
-        props.setProperty("statsEnabled", Boolean.toString(isStatsEnabled()));
-        props.setProperty("alwaysSyncSend", Boolean.toString(isAlwaysSyncSend()));
-        props.setProperty("producerWindowSize", Integer.toString(getProducerWindowSize()));
-        props.setProperty("sendTimeout", Integer.toString(getSendTimeout()));
-        props.setProperty("sendAcksAsync",Boolean.toString(isSendAcksAsync()));
-        props.setProperty("auditDepth", Integer.toString(getAuditDepth()));
-        props.setProperty("auditMaximumProducerNumber", Integer.toString(getAuditMaximumProducerNumber()));
-        props.setProperty("checkForDuplicates", Boolean.toString(isCheckForDuplicates()));
-        props.setProperty("messagePrioritySupported", Boolean.toString(isMessagePrioritySupported()));
-    }
-
-    public boolean isUseCompression() {
-        return useCompression;
-    }
-
-    /**
-     * Enables the use of compression of the message bodies
-     */
-    public void setUseCompression(boolean useCompression) {
-        this.useCompression = useCompression;
-    }
-
-    public boolean isObjectMessageSerializationDefered() {
-        return objectMessageSerializationDefered;
-    }
-
-    /**
-     * When an object is set on an ObjectMessage, the JMS spec requires the
-     * object to be serialized by that set method. Enabling this flag causes the
-     * object to not get serialized. The object may subsequently get serialized
-     * if the message needs to be sent over a socket or stored to disk.
-     */
-    public void setObjectMessageSerializationDefered(boolean objectMessageSerializationDefered) {
-        this.objectMessageSerializationDefered = objectMessageSerializationDefered;
-    }
-
-    public boolean isDispatchAsync() {
-        return dispatchAsync;
-    }
-
-    /**
-     * Enables or disables the default setting of whether or not consumers have
-     * their messages <a
-     * href="http://activemq.apache.org/consumer-dispatch-async.html">dispatched
-     * synchronously or asynchronously by the broker</a>. For non-durable
-     * topics for example we typically dispatch synchronously by default to
-     * minimize context switches which boost performance. However sometimes its
-     * better to go slower to ensure that a single blocked consumer socket does
-     * not block delivery to other consumers.
-     * 
-     * @param asyncDispatch If true then consumers created on this connection
-     *                will default to having their messages dispatched
-     *                asynchronously. The default value is false.
-     */
-    public void setDispatchAsync(boolean asyncDispatch) {
-        this.dispatchAsync = asyncDispatch;
-    }
-
-    /**
-     * @return Returns the closeTimeout.
-     */
-    public int getCloseTimeout() {
-        return closeTimeout;
-    }
-
-    /**
-     * Sets the timeout before a close is considered complete. Normally a
-     * close() on a connection waits for confirmation from the broker; this
-     * allows that operation to timeout to save the client hanging if there is
-     * no broker
-     */
-    public void setCloseTimeout(int closeTimeout) {
-        this.closeTimeout = closeTimeout;
-    }
-
-    /**
-     * @return Returns the alwaysSessionAsync.
-     */
-    public boolean isAlwaysSessionAsync() {
-        return alwaysSessionAsync;
-    }
-
-    /**
-     * If this flag is set then a separate thread is not used for dispatching
-     * messages for each Session in the Connection. However, a separate thread
-     * is always used if there is more than one session, or the session isn't in
-     * auto acknowledge or duplicates ok mode
-     */
-    public void setAlwaysSessionAsync(boolean alwaysSessionAsync) {
-        this.alwaysSessionAsync = alwaysSessionAsync;
-    }
-
-    /**
-     * @return Returns the optimizeAcknowledge.
-     */
-    public boolean isOptimizeAcknowledge() {
-        return optimizeAcknowledge;
-    }
-
-    /**
-     * @param optimizeAcknowledge The optimizeAcknowledge to set.
-     */
-    public void setOptimizeAcknowledge(boolean optimizeAcknowledge) {
-        this.optimizeAcknowledge = optimizeAcknowledge;
-    }
-
-    public boolean isNestedMapAndListEnabled() {
-        return nestedMapAndListEnabled;
-    }
-
-    /**
-     * Enables/disables whether or not Message properties and MapMessage entries
-     * support <a
-     * href="http://activemq.apache.org/structured-message-properties-and-mapmessages.html">Nested
-     * Structures</a> of Map and List objects
-     */
-    public void setNestedMapAndListEnabled(boolean structuredMapsEnabled) {
-        this.nestedMapAndListEnabled = structuredMapsEnabled;
-    }
-
-    public String getClientIDPrefix() {
-        return clientIDPrefix;
-    }
-
-    /**
-     * Sets the prefix used by autogenerated JMS Client ID values which are used
-     * if the JMS client does not explicitly specify on.
-     * 
-     * @param clientIDPrefix
-     */
-    public void setClientIDPrefix(String clientIDPrefix) {
-        this.clientIDPrefix = clientIDPrefix;
-    }
-
-    protected synchronized IdGenerator getClientIdGenerator() {
-        if (clientIdGenerator == null) {
-            if (clientIDPrefix != null) {
-                clientIdGenerator = new IdGenerator(clientIDPrefix);
-            } else {
-                clientIdGenerator = new IdGenerator();
-            }
-        }
-        return clientIdGenerator;
-    }
-
-    protected void setClientIdGenerator(IdGenerator clientIdGenerator) {
-        this.clientIdGenerator = clientIdGenerator;
-    }
-
-    /**
-     * @return the statsEnabled
-     */
-    public boolean isStatsEnabled() {
-        return this.factoryStats.isEnabled();
-    }
-
-    /**
-     * @param statsEnabled the statsEnabled to set
-     */
-    public void setStatsEnabled(boolean statsEnabled) {
-        this.factoryStats.setEnabled(statsEnabled);
-    }
-
-    public synchronized int getProducerWindowSize() {
-        return producerWindowSize;
-    }
-
-    public synchronized void setProducerWindowSize(int producerWindowSize) {
-        this.producerWindowSize = producerWindowSize;
-    }
-
-    public long getWarnAboutUnstartedConnectionTimeout() {
-        return warnAboutUnstartedConnectionTimeout;
-    }
-
-    /**
-     * Enables the timeout from a connection creation to when a warning is
-     * generated if the connection is not properly started via
-     * {@link Connection#start()} and a message is received by a consumer. It is
-     * a very common gotcha to forget to <a
-     * href="http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html">start
-     * the connection</a> so this option makes the default case to create a
-     * warning if the user forgets. To disable the warning just set the value to <
-     * 0 (say -1).
-     */
-    public void setWarnAboutUnstartedConnectionTimeout(long warnAboutUnstartedConnectionTimeout) {
-        this.warnAboutUnstartedConnectionTimeout = warnAboutUnstartedConnectionTimeout;
-    }
-
-    public TransportListener getTransportListener() {
-        return transportListener;
-    }
-
-    /**
-     * Allows a listener to be configured on the ConnectionFactory so that when this factory is used
-     * with frameworks which don't expose the Connection such as Spring JmsTemplate, you can still register
-     * a transport listener.
-     *
-     * @param transportListener sets the listener to be registered on all connections
-     * created by this factory
-     */
-    public void setTransportListener(TransportListener transportListener) {
-        this.transportListener = transportListener;
-    }
-    
-    
-    public ExceptionListener getExceptionListener() {
-        return exceptionListener;
-    }
-    
-    /**
-     * Allows an {@link ExceptionListener} to be configured on the ConnectionFactory so that when this factory
-     * is used by frameworks which don't expose the Connection such as Spring JmsTemplate, you can register
-     * an exception listener.
-     * <p> Note: access to this exceptionLinstener will <b>not</b> be serialized if it is associated with more than
-     * on connection (as it will be if more than one connection is subsequently created by this connection factory)
-     * @param exceptionListener sets the exception listener to be registered on all connections
-     * created by this factory
-     */
-    public void setExceptionListener(ExceptionListener exceptionListener) {
-    	this.exceptionListener = exceptionListener;
-    }
-
-	public int getAuditDepth() {
-		return auditDepth;
-	}
-
-	public void setAuditDepth(int auditDepth) {
-		this.auditDepth = auditDepth;
-	}
-
-	public int getAuditMaximumProducerNumber() {
-		return auditMaximumProducerNumber;
-	}
-
-	public void setAuditMaximumProducerNumber(int auditMaximumProducerNumber) {
-		this.auditMaximumProducerNumber = auditMaximumProducerNumber;
-	}
-
-    public void setUseDedicatedTaskRunner(boolean useDedicatedTaskRunner) {
-        this.useDedicatedTaskRunner = useDedicatedTaskRunner;
-    }
-    
-    public boolean isUseDedicatedTaskRunner() {
-        return useDedicatedTaskRunner;
-    }
-    
-    public void setConsumerFailoverRedeliveryWaitPeriod(long consumerFailoverRedeliveryWaitPeriod) {
-        this.consumerFailoverRedeliveryWaitPeriod = consumerFailoverRedeliveryWaitPeriod;
-    }
-    
-    public long getConsumerFailoverRedeliveryWaitPeriod() {
-        return consumerFailoverRedeliveryWaitPeriod;
-    }
-
-    public ClientInternalExceptionListener getClientInternalExceptionListener() {
-        return clientInternalExceptionListener;
-    }
-    
-    /**
-     * Allows an {@link ClientInternalExceptionListener} to be configured on the ConnectionFactory so that when this factory
-     * is used by frameworks which don't expose the Connection such as Spring JmsTemplate, you can register
-     * an exception listener.
-     * <p> Note: access to this clientInternalExceptionListener will <b>not</b> be serialized if it is associated with more than
-     * on connection (as it will be if more than one connection is subsequently created by this connection factory)
-     * @param clientInternalExceptionListener sets the exception listener to be registered on all connections
-     * created by this factory
-     */
-    public void setClientInternalExceptionListener(
-            ClientInternalExceptionListener clientInternalExceptionListener) {
-        this.clientInternalExceptionListener = clientInternalExceptionListener;
-    }
-
-    /**
-     * @return the checkForDuplicates
-     */
-    public boolean isCheckForDuplicates() {
-        return this.checkForDuplicates;
-    }
-
-    /**
-     * @param checkForDuplicates the checkForDuplicates to set
-     */
-    public void setCheckForDuplicates(boolean checkForDuplicates) {
-        this.checkForDuplicates = checkForDuplicates;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java
deleted file mode 100755
index b6a8522..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionMetaData.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * 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;
-
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.jms.ConnectionMetaData;
-
-/**
- * A <CODE>ConnectionMetaData</CODE> object provides information describing
- * the <CODE>Connection</CODE> object.
- */
-
-public final class ActiveMQConnectionMetaData implements ConnectionMetaData {
-
-    public static final String PROVIDER_VERSION;
-    public static final int PROVIDER_MAJOR_VERSION;
-    public static final int PROVIDER_MINOR_VERSION;
-
-    public static final ActiveMQConnectionMetaData INSTANCE = new ActiveMQConnectionMetaData();
-
-    static {
-        String version = null;
-        int major = 0;
-        int minor = 0;
-        try {
-            Package p = Package.getPackage("org.apache.activemq");
-            if (p != null) {
-                version = p.getImplementationVersion();
-                Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+).*");
-                Matcher m = pattern.matcher(version);
-                if (m.matches()) {
-                    major = Integer.parseInt(m.group(1));
-                    minor = Integer.parseInt(m.group(2));
-                }
-            }
-        } catch (Throwable e) {
-        }
-        PROVIDER_VERSION = version;
-        PROVIDER_MAJOR_VERSION = major;
-        PROVIDER_MINOR_VERSION = minor;
-    }
-
-    private ActiveMQConnectionMetaData() {
-    }
-
-    /**
-     * Gets the JMS API version.
-     * 
-     * @return the JMS API version
-     */
-
-    public String getJMSVersion() {
-        return "1.1";
-    }
-
-    /**
-     * Gets the JMS major version number.
-     * 
-     * @return the JMS API major version number
-     */
-
-    public int getJMSMajorVersion() {
-        return 1;
-    }
-
-    /**
-     * Gets the JMS minor version number.
-     * 
-     * @return the JMS API minor version number
-     */
-
-    public int getJMSMinorVersion() {
-        return 1;
-    }
-
-    /**
-     * Gets the JMS provider name.
-     * 
-     * @return the JMS provider name
-     */
-
-    public String getJMSProviderName() {
-        return "ActiveMQ";
-    }
-
-    /**
-     * Gets the JMS provider version.
-     * 
-     * @return the JMS provider version
-     */
-
-    public String getProviderVersion() {
-        return PROVIDER_VERSION;
-    }
-
-    /**
-     * Gets the JMS provider major version number.
-     * 
-     * @return the JMS provider major version number
-     */
-
-    public int getProviderMajorVersion() {
-        return PROVIDER_MAJOR_VERSION;
-    }
-
-    /**
-     * Gets the JMS provider minor version number.
-     * 
-     * @return the JMS provider minor version number
-     */
-
-    public int getProviderMinorVersion() {
-        return PROVIDER_MINOR_VERSION;
-    }
-
-    /**
-     * Gets an enumeration of the JMSX property names.
-     * 
-     * @return an Enumeration of JMSX property names
-     */
-
-    public Enumeration<String> getJMSXPropertyNames() {
-        Vector<String> jmxProperties = new Vector<String>();
-        jmxProperties.add("JMSXGroupID");
-        jmxProperties.add("JMSXGroupSeq");
-        jmxProperties.add("JMSXDeliveryCount");
-        jmxProperties.add("JMSXProducerTXID");
-        return jmxProperties.elements();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQDispatcher.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQDispatcher.java
deleted file mode 100755
index 69bdf1c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQDispatcher.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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;
-
-import org.apache.activemq.command.MessageDispatch;
-
-public interface ActiveMQDispatcher {
-    void dispatch(MessageDispatch messageDispatch);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java
deleted file mode 100644
index 22ee6f7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.JMSExceptionSupport;
-
-/**
- * 
- */
-public class ActiveMQInputStream extends InputStream implements ActiveMQDispatcher {
-
-    private final ActiveMQConnection connection;
-    private final ConsumerInfo info;
-    // These are the messages waiting to be delivered to the client
-    private final MessageDispatchChannel unconsumedMessages = new FifoMessageDispatchChannel();
-
-    private int deliveredCounter;
-    private MessageDispatch lastDelivered;
-    private boolean eosReached;
-    private byte buffer[];
-    private int pos;
-    private Map<String, Object> jmsProperties;
-
-    private ProducerId producerId;
-    private long nextSequenceId;
-    private long timeout;
-    private boolean firstReceived;
-
-    public ActiveMQInputStream(ActiveMQConnection connection, ConsumerId consumerId, ActiveMQDestination dest, String selector, boolean noLocal, String name, int prefetch,  long timeout)
-        throws JMSException {
-        this.connection = connection;
-
-        if (dest == null) {
-            throw new InvalidDestinationException("Don't understand null destinations");
-        } else if (dest.isTemporary()) {
-            String physicalName = dest.getPhysicalName();
-
-            if (physicalName == null) {
-                throw new IllegalArgumentException("Physical name of Destination should be valid: " + dest);
-            }
-
-            String connectionID = connection.getConnectionInfo().getConnectionId().getValue();
-
-            if (physicalName.indexOf(connectionID) < 0) {
-                throw new InvalidDestinationException("Cannot use a Temporary destination from another Connection");
-            }
-
-            if (connection.isDeleted(dest)) {
-                throw new InvalidDestinationException("Cannot use a Temporary destination that has been deleted");
-            }
-        }
-
-        if (timeout < -1) throw new IllegalArgumentException("Timeout must be >= -1");
-        this.timeout = timeout;
-        
-        this.info = new ConsumerInfo(consumerId);
-        this.info.setSubscriptionName(name);
-
-        if (selector != null && selector.trim().length() != 0) {
-            selector = "JMSType='org.apache.activemq.Stream' AND ( " + selector + " ) ";
-        } else {
-            selector = "JMSType='org.apache.activemq.Stream'";
-        }
-
-        SelectorParser.parse(selector);
-        this.info.setSelector(selector);
-
-        this.info.setPrefetchSize(prefetch);
-        this.info.setNoLocal(noLocal);
-        this.info.setBrowser(false);
-        this.info.setDispatchAsync(false);
-
-        // Allows the options on the destination to configure the consumerInfo
-        if (dest.getOptions() != null) {
-            Map<String, String> options = new HashMap<String, String>(dest.getOptions());
-            IntrospectionSupport.setProperties(this.info, options, "consumer.");
-        }
-
-        this.info.setDestination(dest);
-
-        this.connection.addInputStream(this);
-        this.connection.addDispatcher(info.getConsumerId(), this);
-        this.connection.syncSendPacket(info);
-        unconsumedMessages.start();
-    }
-
-    @Override
-    public void close() throws IOException {
-        if (!unconsumedMessages.isClosed()) {
-            try {
-                if (lastDelivered != null) {
-                    MessageAck ack = new MessageAck(lastDelivered, MessageAck.STANDARD_ACK_TYPE, deliveredCounter);
-                    connection.asyncSendPacket(ack);
-                }
-                dispose();
-                this.connection.syncSendPacket(info.createRemoveCommand());
-            } catch (JMSException e) {
-                throw IOExceptionSupport.create(e);
-            }
-        }
-    }
-
-    public void dispose() {
-        if (!unconsumedMessages.isClosed()) {
-            unconsumedMessages.close();
-            this.connection.removeDispatcher(info.getConsumerId());
-            this.connection.removeInputStream(this);
-        }
-    }
-
-    /**
-     * Return the JMS Properties which where used to send the InputStream
-     *
-     * @return jmsProperties
-     * @throws IOException
-     */
-    public Map<String, Object> getJMSProperties() throws IOException {
-        if (jmsProperties == null) {
-            fillBuffer();
-        }
-        return jmsProperties;
-    }
-
-    public ActiveMQMessage receive() throws JMSException, ReadTimeoutException {
-        checkClosed();
-        MessageDispatch md;
-        try {
-            if (firstReceived || timeout == -1) {
-                md = unconsumedMessages.dequeue(-1);
-                firstReceived = true;
-            } else {
-                md = unconsumedMessages.dequeue(timeout);
-                if (md == null) throw new ReadTimeoutException();
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            throw JMSExceptionSupport.create(e);
-        }
-
-        if (md == null || unconsumedMessages.isClosed() || md.getMessage().isExpired()) {
-            return null;
-        }
-
-        deliveredCounter++;
-        if ((0.75 * info.getPrefetchSize()) <= deliveredCounter) {
-            MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, deliveredCounter);
-            connection.asyncSendPacket(ack);
-            deliveredCounter = 0;
-            lastDelivered = null;
-        } else {
-            lastDelivered = md;
-        }
-
-        return (ActiveMQMessage)md.getMessage();
-    }
-
-    /**
-     * @throws IllegalStateException
-     */
-    protected void checkClosed() throws IllegalStateException {
-        if (unconsumedMessages.isClosed()) {
-            throw new IllegalStateException("The Consumer is closed");
-        }
-    }
-
-    /**
-     * 
-     * @see InputStream#read()
-     * @throws ReadTimeoutException if a timeout was given and the first chunk of the message could not read within the timeout
-     */
-    @Override
-    public int read() throws IOException {
-        fillBuffer();
-        if (eosReached || buffer.length == 0) {
-            return -1;
-        }
-
-        return buffer[pos++] & 0xff;
-    }
-    
-    /**
-     * 
-     * @see InputStream#read(byte[], int, int)
-     * @throws ReadTimeoutException if a timeout was given and the first chunk of the message could not read within the timeout
-     */
-    @Override
-    public int read(byte[] b, int off, int len) throws IOException {
-        fillBuffer();
-        if (eosReached || buffer.length == 0) {
-            return -1;
-        }
-
-        int max = Math.min(len, buffer.length - pos);
-        System.arraycopy(buffer, pos, b, off, max);
-
-        pos += max;
-        return max;
-    }
-
-    private void fillBuffer() throws IOException {
-        if (eosReached || (buffer != null && buffer.length > pos)) {
-            return;
-        }
-        try {
-            while (true) {
-                ActiveMQMessage m = receive();
-                if (m != null && m.getDataStructureType() == CommandTypes.ACTIVEMQ_BYTES_MESSAGE) {
-                    // First message.
-                    long producerSequenceId = m.getMessageId().getProducerSequenceId();
-                    if (producerId == null) {
-                        // We have to start a stream at sequence id = 0
-                        if (producerSequenceId != 0) {
-                            continue;
-                        }
-                        nextSequenceId++;
-                        producerId = m.getMessageId().getProducerId();
-                    } else {
-                        // Verify it's the next message of the sequence.
-                        if (!m.getMessageId().getProducerId().equals(producerId)) {
-                            throw new IOException("Received an unexpected message: invalid producer: " + m);
-                        }
-                        if (producerSequenceId != nextSequenceId++) {
-                            throw new IOException("Received an unexpected message: expected ID: " + (nextSequenceId - 1) + " but was: " + producerSequenceId + " for message: " + m);
-                        }
-                    }
-
-                    // Read the buffer in.
-                    ActiveMQBytesMessage bm = (ActiveMQBytesMessage)m;
-                    buffer = new byte[(int)bm.getBodyLength()];
-                    bm.readBytes(buffer);
-                    pos = 0;
-                    if (jmsProperties == null) {
-                        jmsProperties = Collections.unmodifiableMap(new HashMap<String, Object>(bm.getProperties()));
-                    }
-                } else {
-                    eosReached = true;
-                    if (jmsProperties == null) {
-                        // no properties found
-                        jmsProperties = Collections.emptyMap();
-                    }
-                }
-                return;
-            }
-        } catch (JMSException e) {
-            eosReached = true;
-            if (jmsProperties == null) {
-                // no properties found
-                jmsProperties = Collections.emptyMap();
-            }
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    public void dispatch(MessageDispatch md) {
-        unconsumedMessages.enqueue(md);
-    }
-
-    @Override
-    public String toString() {
-        return "ActiveMQInputStream { value=" + info.getConsumerId() + ", producerId=" + producerId + " }";
-    }
-
-
-    /**
-     * Exception which should get thrown if the first chunk of the stream could not read within the configured timeout
-     *
-     */
-    public class ReadTimeoutException extends IOException {
-        public ReadTimeoutException() {
-            super();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
deleted file mode 100755
index 0d6a587..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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;
-
-import org.apache.activemq.command.MessageId;
-
-/**
- * Provides basic audit functions for Messages
- * 
- * 
- */
-public class ActiveMQMessageAudit extends ActiveMQMessageAuditNoSync {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * Default Constructor windowSize = 2048, maximumNumberOfProducersToTrack =
-     * 64
-     */
-    public ActiveMQMessageAudit() {
-        super();
-    }
-
-    /**
-     * Construct a MessageAudit
-     * 
-     * @param auditDepth range of ids to track
-     * @param maximumNumberOfProducersToTrack number of producers expected in
-     *                the system
-     */
-    public ActiveMQMessageAudit(int auditDepth, final int maximumNumberOfProducersToTrack) {
-        super(auditDepth, maximumNumberOfProducersToTrack);
-    }
-    
-    @Override
-    public boolean isDuplicate(String id) {
-        synchronized (this) {
-            return super.isDuplicate(id);
-        }
-    }
-
-    @Override
-    public boolean isDuplicate(final MessageId id) {
-        synchronized (this) {
-            return super.isDuplicate(id);
-        }
-    }
-
-    @Override
-    public void rollback(final  MessageId id) {
-        synchronized (this) {
-            super.rollback(id);
-        }
-    }
-    
-    @Override
-    public boolean isInOrder(final String id) {
-        synchronized (this) {
-            return super.isInOrder(id);
-        }
-    }
-    
-    @Override
-    public boolean isInOrder(final MessageId id) {
-        synchronized (this) {
-            return isInOrder(id);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java
deleted file mode 100755
index 3fb95f5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAuditNoSync.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/**
- * 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;
-
-import java.io.Serializable;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.util.BitArrayBin;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.LRUCache;
-
-/**
- * Provides basic audit functions for Messages without sync
- * 
- * 
- */
-public class ActiveMQMessageAuditNoSync implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    public static final int DEFAULT_WINDOW_SIZE = 2048;
-    public static final int MAXIMUM_PRODUCER_COUNT = 64;
-    private int auditDepth;
-    private int maximumNumberOfProducersToTrack;
-    private LRUCache<Object, BitArrayBin> map;
-
-    /**
-     * Default Constructor windowSize = 2048, maximumNumberOfProducersToTrack =
-     * 64
-     */
-    public ActiveMQMessageAuditNoSync() {
-        this(DEFAULT_WINDOW_SIZE, MAXIMUM_PRODUCER_COUNT);
-    }
-
-    /**
-     * Construct a MessageAudit
-     * 
-     * @param auditDepth range of ids to track
-     * @param maximumNumberOfProducersToTrack number of producers expected in
-     *                the system
-     */
-    public ActiveMQMessageAuditNoSync(int auditDepth, final int maximumNumberOfProducersToTrack) {
-        this.auditDepth = auditDepth;
-        this.maximumNumberOfProducersToTrack=maximumNumberOfProducersToTrack;
-        this.map = new LRUCache<Object, BitArrayBin>(0, maximumNumberOfProducersToTrack, 0.75f, true);
-    }
-    
-    /**
-     * @return the auditDepth
-     */
-    public int getAuditDepth() {
-        return auditDepth;
-    }
-
-    /**
-     * @param auditDepth the auditDepth to set
-     */
-    public void setAuditDepth(int auditDepth) {
-        this.auditDepth = auditDepth;
-    }
-
-    /**
-     * @return the maximumNumberOfProducersToTrack
-     */
-    public int getMaximumNumberOfProducersToTrack() {
-        return maximumNumberOfProducersToTrack;
-    }
-
-    /**
-     * @param maximumNumberOfProducersToTrack the maximumNumberOfProducersToTrack to set
-     */
-    public void setMaximumNumberOfProducersToTrack(
-            int maximumNumberOfProducersToTrack) {
-        this.maximumNumberOfProducersToTrack = maximumNumberOfProducersToTrack;
-        this.map.setMaxCacheSize(maximumNumberOfProducersToTrack);
-    }
-
-    /**
-     * Checks if this message has been seen before
-     * 
-     * @param message
-     * @return true if the message is a duplicate
-     * @throws JMSException
-     */
-    public boolean isDuplicate(Message message) throws JMSException {
-        return isDuplicate(message.getJMSMessageID());
-    }
-
-    /**
-     * checks whether this messageId has been seen before and adds this
-     * messageId to the list
-     * 
-     * @param id
-     * @return true if the message is a duplicate
-     */
-    public boolean isDuplicate(String id) {
-        boolean answer = false;
-        String seed = IdGenerator.getSeedFromId(id);
-        if (seed != null) {
-            BitArrayBin bab = map.get(seed);
-            if (bab == null) {
-                bab = new BitArrayBin(auditDepth);
-                map.put(seed, bab);
-            }
-            long index = IdGenerator.getSequenceFromId(id);
-            if (index >= 0) {
-                answer = bab.setBit(index, true);
-            }
-        }
-        return answer;
-    }
-
-    /**
-     * Checks if this message has been seen before
-     * 
-     * @param message
-     * @return true if the message is a duplicate
-     */
-    public boolean isDuplicate(final MessageReference message) {
-        MessageId id = message.getMessageId();
-        return isDuplicate(id);
-    }
-    
-    /**
-     * Checks if this messageId has been seen before
-     * 
-     * @param id
-     * @return true if the message is a duplicate
-     */
-    public boolean isDuplicate(final MessageId id) {
-        boolean answer = false;
-        
-        if (id != null) {
-            ProducerId pid = id.getProducerId();
-            if (pid != null) {
-                BitArrayBin bab = map.get(pid);
-                if (bab == null) {
-                    bab = new BitArrayBin(auditDepth);
-                    map.put(pid, bab);
-                }
-                answer = bab.setBit(id.getProducerSequenceId(), true);
-            }
-        }
-        return answer;
-    }
-
-    /**
-     * mark this message as being received
-     * 
-     * @param message
-     */
-    public void rollback(final MessageReference message) {
-        MessageId id = message.getMessageId();
-        rollback(id);
-    }
-    
-    /**
-     * mark this message as being received
-     * 
-     * @param id
-     */
-    public void rollback(final  MessageId id) {
-        if (id != null) {
-            ProducerId pid = id.getProducerId();
-            if (pid != null) {
-                BitArrayBin bab = map.get(pid);
-                if (bab != null) {
-                    bab.setBit(id.getProducerSequenceId(), false);
-                }
-            }
-        }
-    }
-    
-    /**
-     * Check the message is in order
-     * @param msg
-     * @return
-     * @throws JMSException
-     */
-    public boolean isInOrder(Message msg) throws JMSException {
-        return isInOrder(msg.getJMSMessageID());
-    }
-    
-    /**
-     * Check the message id is in order
-     * @param id
-     * @return
-     */
-    public boolean isInOrder(final String id) {
-        boolean answer = true;
-        
-        if (id != null) {
-            String seed = IdGenerator.getSeedFromId(id);
-            if (seed != null) {
-                BitArrayBin bab = map.get(seed);
-                if (bab != null) {
-                    long index = IdGenerator.getSequenceFromId(id);
-                    answer = bab.isInOrder(index);
-                }
-               
-            }
-        }
-        return answer;
-    }
-    
-    /**
-     * Check the MessageId is in order
-     * @param message 
-     * @return
-     */
-    public boolean isInOrder(final MessageReference message) {
-        return isInOrder(message.getMessageId());
-    }
-    
-    /**
-     * Check the MessageId is in order
-     * @param id
-     * @return
-     */
-    public boolean isInOrder(final MessageId id) {
-        boolean answer = false;
-
-        if (id != null) {
-            ProducerId pid = id.getProducerId();
-            if (pid != null) {
-                BitArrayBin bab = map.get(pid);
-                if (bab == null) {
-                    bab = new BitArrayBin(auditDepth);
-                    map.put(pid, bab);
-                }
-                answer = bab.isInOrder(id.getProducerSequenceId());
-
-            }
-        }
-        return answer;
-    }
-
-    public long getLastSeqId(ProducerId id) {
-        long result = -1;
-        BitArrayBin bab = map.get(id.toString() + ":");
-        if (bab != null) {
-            result = bab.getLastSetIndex();
-        }
-        return result;
-    }
-
-    public void clear() {
-        map.clear();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
deleted file mode 100755
index 1a1b0c9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
+++ /dev/null
@@ -1,1386 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.TransactionRolledBackException;
-import org.apache.activemq.blob.BlobDownloader;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.management.JMSConsumerStatsImpl;
-import org.apache.activemq.management.StatsCapable;
-import org.apache.activemq.management.StatsImpl;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A client uses a <CODE>MessageConsumer</CODE> object to receive messages
- * from a destination. A <CODE> MessageConsumer</CODE> object is created by
- * passing a <CODE>Destination</CODE> object to a message-consumer creation
- * method supplied by a session.
- * <P>
- * <CODE>MessageConsumer</CODE> is the parent interface for all message
- * consumers.
- * <P>
- * A message consumer can be created with a message selector. A message selector
- * allows the client to restrict the messages delivered to the message consumer
- * to those that match the selector.
- * <P>
- * A client may either synchronously receive a message consumer's messages or
- * have the consumer asynchronously deliver them as they arrive.
- * <P>
- * For synchronous receipt, a client can request the next message from a message
- * consumer using one of its <CODE> receive</CODE> methods. There are several
- * variations of <CODE>receive</CODE> that allow a client to poll or wait for
- * the next message.
- * <P>
- * For asynchronous delivery, a client can register a
- * <CODE>MessageListener</CODE> object with a message consumer. As messages
- * arrive at the message consumer, it delivers them by calling the
- * <CODE>MessageListener</CODE>'s<CODE>
- * onMessage</CODE> method.
- * <P>
- * It is a client programming error for a <CODE>MessageListener</CODE> to
- * throw an exception.
- * 
- * 
- * @see javax.jms.MessageConsumer
- * @see javax.jms.QueueReceiver
- * @see javax.jms.TopicSubscriber
- * @see javax.jms.Session
- */
-public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsCapable, ActiveMQDispatcher {
-
-    @SuppressWarnings("serial")
-    class PreviouslyDeliveredMap<K, V> extends HashMap<K, V> {
-        final TransactionId transactionId;
-        public PreviouslyDeliveredMap(TransactionId transactionId) {
-            this.transactionId = transactionId;
-        }
-    }
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQMessageConsumer.class);
-    protected final Scheduler scheduler;
-    protected final ActiveMQSession session;
-    protected final ConsumerInfo info;
-
-    // These are the messages waiting to be delivered to the client
-    protected final MessageDispatchChannel unconsumedMessages;
-
-    // The are the messages that were delivered to the consumer but that have
-    // not been acknowledged. It's kept in reverse order since we
-    // Always walk list in reverse order.
-    private final LinkedList<MessageDispatch> deliveredMessages = new LinkedList<MessageDispatch>();
-    // track duplicate deliveries in a transaction such that the tx integrity can be validated
-    private PreviouslyDeliveredMap<MessageId, Boolean> previouslyDeliveredMessages;
-    private int deliveredCounter;
-    private int additionalWindowSize;
-    private long redeliveryDelay;
-    private int ackCounter;
-    private int dispatchedCount;
-    private final AtomicReference<MessageListener> messageListener = new AtomicReference<MessageListener>();
-    private final JMSConsumerStatsImpl stats;
-
-    private final String selector;
-    private boolean synchronizationRegistered;
-    private final AtomicBoolean started = new AtomicBoolean(false);
-
-    private MessageAvailableListener availableListener;
-
-    private RedeliveryPolicy redeliveryPolicy;
-    private boolean optimizeAcknowledge;
-    private final AtomicBoolean deliveryingAcknowledgements = new AtomicBoolean();
-    private ExecutorService executorService;
-    private MessageTransformer transformer;
-    private boolean clearDispatchList;
-    boolean inProgressClearRequiredFlag;
-
-    private MessageAck pendingAck;
-    private long lastDeliveredSequenceId;
-
-    private IOException failureError;
-    
-    private long optimizeAckTimestamp = System.currentTimeMillis();
-    private final long optimizeAckTimeout = 300;
-    private long failoverRedeliveryWaitPeriod = 0;
-
-    /**
-     * Create a MessageConsumer
-     * 
-     * @param session
-     * @param dest
-     * @param name
-     * @param selector
-     * @param prefetch
-     * @param maximumPendingMessageCount
-     * @param noLocal
-     * @param browser
-     * @param dispatchAsync
-     * @param messageListener
-     * @throws JMSException
-     */
-    public ActiveMQMessageConsumer(ActiveMQSession session, ConsumerId consumerId, ActiveMQDestination dest,
-            String name, String selector, int prefetch,
-            int maximumPendingMessageCount, boolean noLocal, boolean browser,
-            boolean dispatchAsync, MessageListener messageListener) throws JMSException {
-        if (dest == null) {
-            throw new InvalidDestinationException("Don't understand null destinations");
-        } else if (dest.getPhysicalName() == null) {
-            throw new InvalidDestinationException("The destination object was not given a physical name.");
-        } else if (dest.isTemporary()) {
-            String physicalName = dest.getPhysicalName();
-
-            if (physicalName == null) {
-                throw new IllegalArgumentException("Physical name of Destination should be valid: " + dest);
-            }
-
-            String connectionID = session.connection.getConnectionInfo().getConnectionId().getValue();
-
-            if (physicalName.indexOf(connectionID) < 0) {
-                throw new InvalidDestinationException(
-                                                      "Cannot use a Temporary destination from another Connection");
-            }
-
-            if (session.connection.isDeleted(dest)) {
-                throw new InvalidDestinationException(
-                                                      "Cannot use a Temporary destination that has been deleted");
-            }
-            if (prefetch < 0) {
-                throw new JMSException("Cannot have a prefetch size less than zero");
-            }
-        }
-        if (session.connection.isMessagePrioritySupported()) {
-            this.unconsumedMessages = new SimplePriorityMessageDispatchChannel();
-        }else {
-            this.unconsumedMessages = new FifoMessageDispatchChannel();
-        }
-
-        this.session = session;
-        this.scheduler = session.getScheduler();
-        this.redeliveryPolicy = session.connection.getRedeliveryPolicy();
-        setTransformer(session.getTransformer());
-
-        this.info = new ConsumerInfo(consumerId);
-        this.info.setExclusive(this.session.connection.isExclusiveConsumer());
-        this.info.setSubscriptionName(name);
-        this.info.setPrefetchSize(prefetch);
-        this.info.setCurrentPrefetchSize(prefetch);
-        this.info.setMaximumPendingMessageLimit(maximumPendingMessageCount);
-        this.info.setNoLocal(noLocal);
-        this.info.setDispatchAsync(dispatchAsync);
-        this.info.setRetroactive(this.session.connection.isUseRetroactiveConsumer());
-        this.info.setSelector(null);
-
-        // Allows the options on the destination to configure the consumerInfo
-        if (dest.getOptions() != null) {
-            Map<String, String> options = new HashMap<String, String>(dest.getOptions());
-            IntrospectionSupport.setProperties(this.info, options, "consumer.");
-        }
-
-        this.info.setDestination(dest);
-        this.info.setBrowser(browser);
-        if (selector != null && selector.trim().length() != 0) {
-            // Validate the selector
-            SelectorParser.parse(selector);
-            this.info.setSelector(selector);
-            this.selector = selector;
-        } else if (info.getSelector() != null) {
-            // Validate the selector
-            SelectorParser.parse(this.info.getSelector());
-            this.selector = this.info.getSelector();
-        } else {
-            this.selector = null;
-        }
-
-        this.stats = new JMSConsumerStatsImpl(session.getSessionStats(), dest);
-        this.optimizeAcknowledge = session.connection.isOptimizeAcknowledge() && session.isAutoAcknowledge()
-                                   && !info.isBrowser();
-        this.info.setOptimizedAcknowledge(this.optimizeAcknowledge);
-        this.failoverRedeliveryWaitPeriod = session.connection.getConsumerFailoverRedeliveryWaitPeriod();
-        if (messageListener != null) {
-            setMessageListener(messageListener);
-        }
-        try {
-            this.session.addConsumer(this);
-            this.session.syncSendPacket(info);
-        } catch (JMSException e) {
-            this.session.removeConsumer(this);
-            throw e;
-        }
-
-        if (session.connection.isStarted()) {
-            start();
-        }
-    }
-
-    private boolean isAutoAcknowledgeEach() {
-        return session.isAutoAcknowledge() || ( session.isDupsOkAcknowledge() && getDestination().isQueue() );
-    }
-
-    private boolean isAutoAcknowledgeBatch() {
-        return session.isDupsOkAcknowledge() && !getDestination().isQueue() ;
-    }
-
-    public StatsImpl getStats() {
-        return stats;
-    }
-
-    public JMSConsumerStatsImpl getConsumerStats() {
-        return stats;
-    }
-
-    public RedeliveryPolicy getRedeliveryPolicy() {
-        return redeliveryPolicy;
-    }
-
-    /**
-     * Sets the redelivery policy used when messages are redelivered
-     */
-    public void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy) {
-        this.redeliveryPolicy = redeliveryPolicy;
-    }
-
-    public MessageTransformer getTransformer() {
-        return transformer;
-    }
-
-    /**
-     * Sets the transformer used to transform messages before they are sent on
-     * to the JMS bus
-     */
-    public void setTransformer(MessageTransformer transformer) {
-        this.transformer = transformer;
-    }
-
-    /**
-     * @return Returns the value.
-     */
-    public ConsumerId getConsumerId() {
-        return info.getConsumerId();
-    }
-
-    /**
-     * @return the consumer name - used for durable consumers
-     */
-    public String getConsumerName() {
-        return this.info.getSubscriptionName();
-    }
-
-    /**
-     * @return true if this consumer does not accept locally produced messages
-     */
-    protected boolean isNoLocal() {
-        return info.isNoLocal();
-    }
-
-    /**
-     * Retrieve is a browser
-     * 
-     * @return true if a browser
-     */
-    protected boolean isBrowser() {
-        return info.isBrowser();
-    }
-
-    /**
-     * @return ActiveMQDestination
-     */
-    protected ActiveMQDestination getDestination() {
-        return info.getDestination();
-    }
-
-    /**
-     * @return Returns the prefetchNumber.
-     */
-    public int getPrefetchNumber() {
-        return info.getPrefetchSize();
-    }
-
-    /**
-     * @return true if this is a durable topic subscriber
-     */
-    public boolean isDurableSubscriber() {
-        return info.getSubscriptionName() != null && info.getDestination().isTopic();
-    }
-
-    /**
-     * Gets this message consumer's message selector expression.
-     * 
-     * @return this message consumer's message selector, or null if no message
-     *         selector exists for the message consumer (that is, if the message
-     *         selector was not set or was set to null or the empty string)
-     * @throws JMSException if the JMS provider fails to receive the next
-     *                 message due to some internal error.
-     */
-    public String getMessageSelector() throws JMSException {
-        checkClosed();
-        return selector;
-    }
-
-    /**
-     * Gets the message consumer's <CODE>MessageListener</CODE>.
-     * 
-     * @return the listener for the message consumer, or null if no listener is
-     *         set
-     * @throws JMSException if the JMS provider fails to get the message
-     *                 listener due to some internal error.
-     * @see javax.jms.MessageConsumer#setMessageListener(javax.jms.MessageListener)
-     */
-    public MessageListener getMessageListener() throws JMSException {
-        checkClosed();
-        return this.messageListener.get();
-    }
-
-    /**
-     * Sets the message consumer's <CODE>MessageListener</CODE>.
-     * <P>
-     * Setting the message listener to null is the equivalent of unsetting the
-     * message listener for the message consumer.
-     * <P>
-     * The effect of calling <CODE>MessageConsumer.setMessageListener</CODE>
-     * while messages are being consumed by an existing listener or the consumer
-     * is being used to consume messages synchronously is undefined.
-     * 
-     * @param listener the listener to which the messages are to be delivered
-     * @throws JMSException if the JMS provider fails to receive the next
-     *                 message due to some internal error.
-     * @see javax.jms.MessageConsumer#getMessageListener
-     */
-    public void setMessageListener(MessageListener listener) throws JMSException {
-        checkClosed();
-        if (info.getPrefetchSize() == 0) {
-            throw new JMSException(
-                                   "Illegal prefetch size of zero. This setting is not supported for asynchronous consumers please set a value of at least 1");
-        }
-        if (listener != null) {
-            boolean wasRunning = session.isRunning();
-            if (wasRunning) {
-                session.stop();
-            }
-
-            this.messageListener.set(listener);
-            session.redispatch(this, unconsumedMessages);
-
-            if (wasRunning) {
-                session.start();
-            }
-        } else {
-            this.messageListener.set(null);
-        }
-    }
-
-    public MessageAvailableListener getAvailableListener() {
-        return availableListener;
-    }
-
-    /**
-     * Sets the listener used to notify synchronous consumers that there is a
-     * message available so that the {@link MessageConsumer#receiveNoWait()} can
-     * be called.
-     */
-    public void setAvailableListener(MessageAvailableListener availableListener) {
-        this.availableListener = availableListener;
-    }
-
-    /**
-     * Used to get an enqueued message from the unconsumedMessages list. The
-     * amount of time this method blocks is based on the timeout value. - if
-     * timeout==-1 then it blocks until a message is received. - if timeout==0
-     * then it it tries to not block at all, it returns a message if it is
-     * available - if timeout>0 then it blocks up to timeout amount of time.
-     * Expired messages will consumed by this method.
-     * 
-     * @throws JMSException
-     * @return null if we timeout or if the consumer is closed.
-     */
-    private MessageDispatch dequeue(long timeout) throws JMSException {
-        try {
-            long deadline = 0;
-            if (timeout > 0) {
-                deadline = System.currentTimeMillis() + timeout;
-            }
-            while (true) {
-                MessageDispatch md = unconsumedMessages.dequeue(timeout);
-                if (md == null) {
-                    if (timeout > 0 && !unconsumedMessages.isClosed()) {
-                        timeout = Math.max(deadline - System.currentTimeMillis(), 0);
-                    } else {
-                    	if (failureError != null) {
-                    		throw JMSExceptionSupport.create(failureError);
-                    	} else {
-                    		return null;
-                    	}
-                    }
-                } else if (md.getMessage() == null) {
-                    return null;
-                } else if (md.getMessage().isExpired()) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(getConsumerId() + " received expired message: " + md);
-                    }
-                    beforeMessageIsConsumed(md);
-                    afterMessageIsConsumed(md, true);
-                    if (timeout > 0) {
-                        timeout = Math.max(deadline - System.currentTimeMillis(), 0);
-                    }
-                } else {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace(getConsumerId() + " received message: " + md);
-                    }
-                    return md;
-                }
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    /**
-     * Receives the next message produced for this message consumer.
-     * <P>
-     * This call blocks indefinitely until a message is produced or until this
-     * message consumer is closed.
-     * <P>
-     * If this <CODE>receive</CODE> is done within a transaction, the consumer
-     * retains the message until the transaction commits.
-     * 
-     * @return the next message produced for this message consumer, or null if
-     *         this message consumer is concurrently closed
-     */
-    public Message receive() throws JMSException {
-        checkClosed();
-        checkMessageListener();
-
-        sendPullCommand(0);
-        MessageDispatch md = dequeue(-1);
-        if (md == null) {
-            return null;
-        }
-
-        beforeMessageIsConsumed(md);
-        afterMessageIsConsumed(md, false);
-
-        return createActiveMQMessage(md);
-    }
-
-    /**
-     * @param md
-     * @return
-     */
-    private ActiveMQMessage createActiveMQMessage(final MessageDispatch md) throws JMSException {
-        ActiveMQMessage m = (ActiveMQMessage)md.getMessage().copy();
-        if (m.getDataStructureType()==CommandTypes.ACTIVEMQ_BLOB_MESSAGE) {
-        	((ActiveMQBlobMessage)m).setBlobDownloader(new BlobDownloader(session.getBlobTransferPolicy()));
-        }
-        if (transformer != null) {
-            Message transformedMessage = transformer.consumerTransform(session, this, m);
-            if (transformedMessage != null) {
-                m = ActiveMQMessageTransformation.transformMessage(transformedMessage, session.connection);
-            }
-        }
-        if (session.isClientAcknowledge()) {
-            m.setAcknowledgeCallback(new Callback() {
-                public void execute() throws Exception {
-                    session.checkClosed();
-                    session.acknowledge();
-                }
-            });
-        }else if (session.isIndividualAcknowledge()) {
-            m.setAcknowledgeCallback(new Callback() {
-                public void execute() throws Exception {
-                    session.checkClosed();
-                    acknowledge(md);
-                }
-            });
-        }
-        return m;
-    }
-
-    /**
-     * Receives the next message that arrives within the specified timeout
-     * interval.
-     * <P>
-     * This call blocks until a message arrives, the timeout expires, or this
-     * message consumer is closed. A <CODE>timeout</CODE> of zero never
-     * expires, and the call blocks indefinitely.
-     * 
-     * @param timeout the timeout value (in milliseconds), a time out of zero
-     *                never expires.
-     * @return the next message produced for this message consumer, or null if
-     *         the timeout expires or this message consumer is concurrently
-     *         closed
-     */
-    public Message receive(long timeout) throws JMSException {
-        checkClosed();
-        checkMessageListener();
-        if (timeout == 0) {
-            return this.receive();
-
-        }
-
-        sendPullCommand(timeout);
-        while (timeout > 0) {
-
-            MessageDispatch md;
-            if (info.getPrefetchSize() == 0) {
-                md = dequeue(-1); // We let the broker let us know when we timeout.
-            } else {
-                md = dequeue(timeout);
-            }
-
-            if (md == null) {
-                return null;
-            }
-
-            beforeMessageIsConsumed(md);
-            afterMessageIsConsumed(md, false);
-            return createActiveMQMessage(md);
-        }
-        return null;
-    }
-
-    /**
-     * Receives the next message if one is immediately available.
-     * 
-     * @return the next message produced for this message consumer, or null if
-     *         one is not available
-     * @throws JMSException if the JMS provider fails to receive the next
-     *                 message due to some internal error.
-     */
-    public Message receiveNoWait() throws JMSException {
-        checkClosed();
-        checkMessageListener();
-        sendPullCommand(-1);
-
-        MessageDispatch md;
-        if (info.getPrefetchSize() == 0) {
-            md = dequeue(-1); // We let the broker let us know when we
-            // timeout.
-        } else {
-            md = dequeue(0);
-        }
-
-        if (md == null) {
-            return null;
-        }
-
-        beforeMessageIsConsumed(md);
-        afterMessageIsConsumed(md, false);
-        return createActiveMQMessage(md);
-    }
-
-    /**
-     * Closes the message consumer.
-     * <P>
-     * Since a provider may allocate some resources on behalf of a <CODE>
-     * MessageConsumer</CODE>
-     * outside the Java virtual machine, clients should close them when they are
-     * not needed. Relying on garbage collection to eventually reclaim these
-     * resources may not be timely enough.
-     * <P>
-     * This call blocks until a <CODE>receive</CODE> or message listener in
-     * progress has completed. A blocked message consumer <CODE>receive </CODE>
-     * call returns null when this message consumer is closed.
-     * 
-     * @throws JMSException if the JMS provider fails to close the consumer due
-     *                 to some internal error.
-     */
-    public void close() throws JMSException {
-        if (!unconsumedMessages.isClosed()) {
-            if (session.getTransactionContext().isInTransaction()) {
-                session.getTransactionContext().addSynchronization(new Synchronization() {
-                    @Override
-                    public void afterCommit() throws Exception {
-                        doClose();
-                    }
-
-                    @Override
-                    public void afterRollback() throws Exception {
-                        doClose();
-                    }
-                });
-            } else {
-                doClose();
-            } 
-        }
-    }
-
-    void doClose() throws JMSException {
-        dispose();
-        RemoveInfo removeCommand = info.createRemoveCommand();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("remove: " + this.getConsumerId() + ", lastDeliveredSequenceId:" + lastDeliveredSequenceId);
-        }
-        removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId);
-        this.session.asyncSendPacket(removeCommand);
-    }
-    
-    void inProgressClearRequired() {
-        inProgressClearRequiredFlag = true;
-        // deal with delivered messages async to avoid lock contention with in progress acks
-        clearDispatchList = true;
-    }
-    
-    void clearMessagesInProgress() {
-        if (inProgressClearRequiredFlag) {
-            synchronized (unconsumedMessages.getMutex()) {
-                if (inProgressClearRequiredFlag) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(getConsumerId() + " clearing dispatched list (" + unconsumedMessages.size() + ") on transport interrupt");
-                    }
-                    // ensure unconsumed are rolledback up front as they may get redelivered to another consumer
-                    List<MessageDispatch> list = unconsumedMessages.removeAll();
-                    if (!this.info.isBrowser()) {
-                        for (MessageDispatch old : list) {
-                            session.connection.rollbackDuplicate(this, old.getMessage());
-                        }
-                    }
-                    // allow dispatch on this connection to resume
-                    session.connection.transportInterruptionProcessingComplete();
-                    inProgressClearRequiredFlag = false;
-                }
-            }
-        }
-    }
-
-    void deliverAcks() {
-        MessageAck ack = null;
-        if (deliveryingAcknowledgements.compareAndSet(false, true)) {
-            if (isAutoAcknowledgeEach()) {
-                synchronized(deliveredMessages) {
-                    ack = makeAckForAllDeliveredMessages(MessageAck.STANDARD_ACK_TYPE);
-                    if (ack != null) {
-                        deliveredMessages.clear();
-                        ackCounter = 0;
-            		} else {
-            		    ack = pendingAck;
-            		    pendingAck = null;
-            		}
-            	}
-            } else if (pendingAck != null && pendingAck.isStandardAck()) {
-                ack = pendingAck;
-                pendingAck = null;
-            }
-            if (ack != null) {
-                final MessageAck ackToSend = ack;
-                
-                if (executorService == null) {
-                    executorService = Executors.newSingleThreadExecutor();
-                }
-                executorService.submit(new Runnable() {
-                    public void run() {
-                        try {
-                            session.sendAck(ackToSend,true);
-                        } catch (JMSException e) {
-                            LOG.error(getConsumerId() + " failed to delivered acknowledgements", e);
-                        } finally {
-                            deliveryingAcknowledgements.set(false);
-                        }
-                    }
-                });
-            } else {
-                deliveryingAcknowledgements.set(false);
-            }
-        }
-    }
-
-    public void dispose() throws JMSException {
-        if (!unconsumedMessages.isClosed()) {
-            
-            // Do we have any acks we need to send out before closing?
-            // Ack any delivered messages now.
-            if (!session.getTransacted()) { 
-                deliverAcks();
-                if (isAutoAcknowledgeBatch()) {
-                    acknowledge();
-                }
-            }
-            if (executorService != null) {
-                executorService.shutdown();
-                try {
-                    executorService.awaitTermination(60, TimeUnit.SECONDS);
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            }
-            
-            if (session.isClientAcknowledge()) {
-                if (!this.info.isBrowser()) {
-                    // rollback duplicates that aren't acknowledged
-                    List<MessageDispatch> tmp = null;
-                    synchronized (this.deliveredMessages) {
-                        tmp = new ArrayList<MessageDispatch>(this.deliveredMessages);
-                    }
-                    for (MessageDispatch old : tmp) {
-                        this.session.connection.rollbackDuplicate(this, old.getMessage());
-                    }
-                    tmp.clear();
-                }
-            }
-            if (!session.isTransacted()) {
-                synchronized(deliveredMessages) {
-                    deliveredMessages.clear();
-                }
-            }
-            unconsumedMessages.close();
-            this.session.removeConsumer(this);
-            List<MessageDispatch> list = unconsumedMessages.removeAll();
-            if (!this.info.isBrowser()) {
-                for (MessageDispatch old : list) {
-                    // ensure we don't filter this as a duplicate
-                    session.connection.rollbackDuplicate(this, old.getMessage());
-                }
-            }
-        }
-    }
-
-    /**
-     * @throws IllegalStateException
-     */
-    protected void checkClosed() throws IllegalStateException {
-        if (unconsumedMessages.isClosed()) {
-            throw new IllegalStateException("The Consumer is closed");
-        }
-    }
-
-    /**
-     * If we have a zero prefetch specified then send a pull command to the
-     * broker to pull a message we are about to receive
-     */
-    protected void sendPullCommand(long timeout) throws JMSException {
-        clearDispatchList();
-        if (info.getPrefetchSize() == 0 && unconsumedMessages.isEmpty()) {
-            MessagePull messagePull = new MessagePull();
-            messagePull.configure(info);
-            messagePull.setTimeout(timeout);
-            session.asyncSendPacket(messagePull);
-        }
-    }
-
-    protected void checkMessageListener() throws JMSException {
-        session.checkMessageListener();
-    }
-
-    protected void setOptimizeAcknowledge(boolean value) {
-        if (optimizeAcknowledge && !value) {
-            deliverAcks();
-        }
-        optimizeAcknowledge = value;
-    }
-
-    protected void setPrefetchSize(int prefetch) {
-        deliverAcks();
-        this.info.setCurrentPrefetchSize(prefetch);
-    }
-
-    private void beforeMessageIsConsumed(MessageDispatch md) throws JMSException {
-        md.setDeliverySequenceId(session.getNextDeliveryId());
-        lastDeliveredSequenceId = md.getMessage().getMessageId().getBrokerSequenceId();
-        if (!isAutoAcknowledgeBatch()) {
-            synchronized(deliveredMessages) {
-                deliveredMessages.addFirst(md);
-            }
-            if (session.getTransacted()) {
-                ackLater(md, MessageAck.DELIVERED_ACK_TYPE);
-            }
-        }
-    }
-    
-    private void afterMessageIsConsumed(MessageDispatch md, boolean messageExpired) throws JMSException {
-        if (unconsumedMessages.isClosed()) {
-            return;
-        }
-        if (messageExpired) {
-            synchronized (deliveredMessages) {
-                deliveredMessages.remove(md);
-            }
-            stats.getExpiredMessageCount().increment();
-            ackLater(md, MessageAck.DELIVERED_ACK_TYPE);
-        } else {
-            stats.onMessage();
-            if (session.getTransacted()) {
-                // Do nothing.
-            } else if (isAutoAcknowledgeEach()) {
-                if (deliveryingAcknowledgements.compareAndSet(false, true)) {
-                    synchronized (deliveredMessages) {
-                        if (!deliveredMessages.isEmpty()) {
-                            if (optimizeAcknowledge) {
-                                ackCounter++;
-                                if (ackCounter >= (info.getPrefetchSize() * .65) || System.currentTimeMillis() >= (optimizeAckTimestamp + optimizeAckTimeout)) {
-                                	MessageAck ack = makeAckForAllDeliveredMessages(MessageAck.STANDARD_ACK_TYPE);
-                                	if (ack != null) {
-                            		    deliveredMessages.clear();
-                            		    ackCounter = 0;
-                            		    session.sendAck(ack);
-                            		    optimizeAckTimestamp = System.currentTimeMillis();
-                                	}
-                                }
-                            } else {
-                                MessageAck ack = makeAckForAllDeliveredMessages(MessageAck.STANDARD_ACK_TYPE);
-                                if (ack!=null) {
-                                    deliveredMessages.clear();
-                                    session.sendAck(ack);
-                                }
-                            }
-                        }
-                    }
-                    deliveryingAcknowledgements.set(false);
-                }
-            } else if (isAutoAcknowledgeBatch()) {
-                ackLater(md, MessageAck.STANDARD_ACK_TYPE);
-            } else if (session.isClientAcknowledge()||session.isIndividualAcknowledge()) {
-                boolean messageUnackedByConsumer = false;
-                synchronized (deliveredMessages) {
-                    messageUnackedByConsumer = deliveredMessages.contains(md);
-                }
-                if (messageUnackedByConsumer) {
-                    ackLater(md, MessageAck.DELIVERED_ACK_TYPE);
-                }
-            } 
-            else {
-                throw new IllegalStateException("Invalid session state.");
-            }
-        }
-    }
-
-    /**
-     * Creates a MessageAck for all messages contained in deliveredMessages.
-     * Caller should hold the lock for deliveredMessages.
-     * 
-     * @param type Ack-Type (i.e. MessageAck.STANDARD_ACK_TYPE) 
-     * @return <code>null</code> if nothing to ack.
-     */
-	private MessageAck makeAckForAllDeliveredMessages(byte type) {
-		synchronized (deliveredMessages) {
-			if (deliveredMessages.isEmpty())
-				return null;
-			    
-			MessageDispatch md = deliveredMessages.getFirst();
-		    MessageAck ack = new MessageAck(md, type, deliveredMessages.size());
-		    ack.setFirstMessageId(deliveredMessages.getLast().getMessage().getMessageId());
-		    return ack;
-		}
-	}
-
-    private void ackLater(MessageDispatch md, byte ackType) throws JMSException {
-
-        // Don't acknowledge now, but we may need to let the broker know the
-        // consumer got the message to expand the pre-fetch window
-        if (session.getTransacted()) {
-            session.doStartTransaction();
-            if (!synchronizationRegistered) {
-                synchronizationRegistered = true;
-                session.getTransactionContext().addSynchronization(new Synchronization() {
-                    @Override
-                    public void beforeEnd() throws Exception {
-                        acknowledge();
-                        synchronizationRegistered = false;
-                    }
-
-                    @Override
-                    public void afterCommit() throws Exception {
-                        commit();
-                        synchronizationRegistered = false;
-                    }
-
-                    @Override
-                    public void afterRollback() throws Exception {
-                        rollback();
-                        synchronizationRegistered = false;
-                    }
-                });
-            }
-        }
-
-        deliveredCounter++;
-        
-        MessageAck oldPendingAck = pendingAck;
-        pendingAck = new MessageAck(md, ackType, deliveredCounter);
-        pendingAck.setTransactionId(session.getTransactionContext().getTransactionId());
-        if( oldPendingAck==null ) {
-            pendingAck.setFirstMessageId(pendingAck.getLastMessageId());
-        } else if ( oldPendingAck.getAckType() == pendingAck.getAckType() ) {
-            pendingAck.setFirstMessageId(oldPendingAck.getFirstMessageId());
-        } else {
-            // old pending ack being superseded by ack of another type, if is is not a delivered
-            // ack and hence important, send it now so it is not lost.
-            if ( !oldPendingAck.isDeliveredAck()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Sending old pending ack " + oldPendingAck + ", new pending: " + pendingAck);
-                }
-                session.sendAck(oldPendingAck);
-            } else {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("dropping old pending ack " + oldPendingAck + ", new pending: " + pendingAck);
-                }
-            }
-        }
-        
-        if ((0.5 * info.getPrefetchSize()) <= (deliveredCounter - additionalWindowSize)) {
-            session.sendAck(pendingAck);
-            pendingAck=null;
-            deliveredCounter = 0;
-            additionalWindowSize = 0;
-        }
-    }
-
-    /**
-     * Acknowledge all the messages that have been delivered to the client up to
-     * this point.
-     * 
-     * @throws JMSException
-     */
-    public void acknowledge() throws JMSException {
-        clearDispatchList();
-        waitForRedeliveries();
-        synchronized(deliveredMessages) {
-            // Acknowledge all messages so far.
-            MessageAck ack = makeAckForAllDeliveredMessages(MessageAck.STANDARD_ACK_TYPE);
-            if (ack == null)
-            	return; // no msgs
-            
-            if (session.getTransacted()) {
-                rollbackOnFailedRecoveryRedelivery();
-                session.doStartTransaction();
-                ack.setTransactionId(session.getTransactionContext().getTransactionId());
-            }
-            session.sendAck(ack);
-            pendingAck = null;
-            
-            // Adjust the counters
-            deliveredCounter = Math.max(0, deliveredCounter - deliveredMessages.size());
-            additionalWindowSize = Math.max(0, additionalWindowSize - deliveredMessages.size());
-            
-            if (!session.getTransacted()) {  
-                deliveredMessages.clear();
-            } 
-        }
-    }
-    
-    private void waitForRedeliveries() {
-        if (failoverRedeliveryWaitPeriod > 0 && previouslyDeliveredMessages != null) {
-            long expiry = System.currentTimeMillis() + failoverRedeliveryWaitPeriod;
-            int numberNotReplayed;
-            do {
-                numberNotReplayed = 0;
-                synchronized(deliveredMessages) {
-                    if (previouslyDeliveredMessages != null) { 
-                        for (Entry<MessageId, Boolean> entry: previouslyDeliveredMessages.entrySet()) {
-                            if (!entry.getValue()) {
-                                numberNotReplayed++;
-                            }
-                        }
-                    }
-                }
-                if (numberNotReplayed > 0) {
-                    LOG.info("waiting for redelivery of " + numberNotReplayed + " in transaction: "
-                            + previouslyDeliveredMessages.transactionId +  ", to consumer :" + this.getConsumerId());
-                    try {
-                        Thread.sleep(Math.max(500, failoverRedeliveryWaitPeriod/4));
-                    } catch (InterruptedException outOfhere) {
-                        break;
-                    }
-                }
-            } while (numberNotReplayed > 0 && expiry < System.currentTimeMillis());
-        }
-    }
-
-    /*
-     * called with deliveredMessages locked
-     */
-    private void rollbackOnFailedRecoveryRedelivery() throws JMSException {
-        if (previouslyDeliveredMessages != null) {
-            // if any previously delivered messages was not re-delivered, transaction is invalid and must rollback
-            // as messages have been dispatched else where.
-            int numberNotReplayed = 0;
-            for (Entry<MessageId, Boolean> entry: previouslyDeliveredMessages.entrySet()) {
-                if (!entry.getValue()) {
-                    numberNotReplayed++;
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("previously delivered message has not been replayed in transaction: "
-                                + previouslyDeliveredMessages.transactionId 
-                                + " , messageId: " + entry.getKey());
-                    }
-                }
-            }
-            if (numberNotReplayed > 0) {
-                String message = "rolling back transaction (" 
-                    + previouslyDeliveredMessages.transactionId + ") post failover recovery. " + numberNotReplayed
-                    + " previously delivered message(s) not replayed to consumer: " + this.getConsumerId();
-                LOG.warn(message);
-                throw new TransactionRolledBackException(message);   
-            }
-        }
-    }
-
-    void acknowledge(MessageDispatch md) throws JMSException {
-        MessageAck ack = new MessageAck(md,MessageAck.INDIVIDUAL_ACK_TYPE,1);
-        session.sendAck(ack);
-        synchronized(deliveredMessages){
-            deliveredMessages.remove(md);
-        }
-    }
-
-    public void commit() throws JMSException {
-        synchronized (deliveredMessages) {
-            deliveredMessages.clear();
-            clearPreviouslyDelivered();
-        }
-        redeliveryDelay = 0;
-    }
-
-    public void rollback() throws JMSException {
-        synchronized (unconsumedMessages.getMutex()) {
-            if (optimizeAcknowledge) {
-                // remove messages read but not acked at the broker yet through
-                // optimizeAcknowledge
-                if (!this.info.isBrowser()) {
-                    synchronized(deliveredMessages) {
-                        for (int i = 0; (i < deliveredMessages.size()) && (i < ackCounter); i++) {
-                            // ensure we don't filter this as a duplicate
-                            MessageDispatch md = deliveredMessages.removeLast();
-                            session.connection.rollbackDuplicate(this, md.getMessage());
-                        }
-                    }
-                }
-            }
-            synchronized(deliveredMessages) {
-                rollbackPreviouslyDeliveredAndNotRedelivered();
-                if (deliveredMessages.isEmpty()) {
-                    return;
-                }
-    
-                // use initial delay for first redelivery
-                MessageDispatch lastMd = deliveredMessages.getFirst();
-                final int currentRedeliveryCount = lastMd.getMessage().getRedeliveryCounter();
-                if (currentRedeliveryCount > 0) {
-                    redeliveryDelay = redeliveryPolicy.getNextRedeliveryDelay(redeliveryDelay);
-                } else {
-                    redeliveryDelay = redeliveryPolicy.getInitialRedeliveryDelay();
-                }
-                MessageId firstMsgId = deliveredMessages.getLast().getMessage().getMessageId();
-    
-                for (Iterator<MessageDispatch> iter = deliveredMessages.iterator(); iter.hasNext();) {
-                    MessageDispatch md = iter.next();
-                    md.getMessage().onMessageRolledBack();
-                    // ensure we don't filter this as a duplicate
-                    session.connection.rollbackDuplicate(this, md.getMessage());
-                }
-    
-                if (redeliveryPolicy.getMaximumRedeliveries() != RedeliveryPolicy.NO_MAXIMUM_REDELIVERIES
-                    && lastMd.getMessage().getRedeliveryCounter() > redeliveryPolicy.getMaximumRedeliveries()) {
-                    // We need to NACK the messages so that they get sent to the
-                    // DLQ.
-                    // Acknowledge the last message.
-                    
-                    MessageAck ack = new MessageAck(lastMd, MessageAck.POSION_ACK_TYPE, deliveredMessages.size());
-                    ack.setPoisonCause(lastMd.getRollbackCause());
-					ack.setFirstMessageId(firstMsgId);
-                    session.sendAck(ack,true);
-                    // Adjust the window size.
-                    additionalWindowSize = Math.max(0, additionalWindowSize - deliveredMessages.size());
-                    redeliveryDelay = 0;
-                } else {
-                    
-                    // only redelivery_ack after first delivery
-                    if (currentRedeliveryCount > 0) {
-                        MessageAck ack = new MessageAck(lastMd, MessageAck.REDELIVERED_ACK_TYPE, deliveredMessages.size());
-                        ack.setFirstMessageId(firstMsgId);
-                        session.sendAck(ack,true);
-                    }
-    
-                    // stop the delivery of messages.
-                    unconsumedMessages.stop();
-    
-                    for (Iterator<MessageDispatch> iter = deliveredMessages.iterator(); iter.hasNext();) {
-                        MessageDispatch md = iter.next();
-                        unconsumedMessages.enqueueFirst(md);
-                    }
-    
-                    if (redeliveryDelay > 0 && !unconsumedMessages.isClosed()) {
-                        // Start up the delivery again a little later.
-                        scheduler.executeAfterDelay(new Runnable() {
-                            public void run() {
-                                try {
-                                    if (started.get()) {
-                                        start();
-                                    }
-                                } catch (JMSException e) {
-                                    session.connection.onAsyncException(e);
-                                }
-                            }
-                        }, redeliveryDelay);
-                    } else {
-                        start();
-                    }
-    
-                }
-                deliveredCounter -= deliveredMessages.size();
-                deliveredMessages.clear();
-            }
-        }
-        if (messageListener.get() != null) {
-            session.redispatch(this, unconsumedMessages);
-        }
-    }
-
-    /*
-     * called with unconsumedMessages && deliveredMessages locked
-     * remove any message not re-delivered as they can't be replayed to this 
-     * consumer on rollback
-     */
-    private void rollbackPreviouslyDeliveredAndNotRedelivered() {
-        if (previouslyDeliveredMessages != null) {
-            for (Entry<MessageId, Boolean> entry: previouslyDeliveredMessages.entrySet()) {
-                if (!entry.getValue()) {              
-                    removeFromDeliveredMessages(entry.getKey());
-                }
-            }
-            clearPreviouslyDelivered();
-        }
-    }
-
-    /*
-     * called with deliveredMessages locked
-     */
-    private void removeFromDeliveredMessages(MessageId key) {
-        Iterator<MessageDispatch> iterator = deliveredMessages.iterator();
-        while (iterator.hasNext()) {
-            MessageDispatch candidate = iterator.next();
-            if (key.equals(candidate.getMessage().getMessageId())) {
-                session.connection.rollbackDuplicate(this, candidate.getMessage());
-                iterator.remove();
-                break;
-            }
-        }
-    }
-    /*
-     * called with deliveredMessages locked
-     */
-    private void clearPreviouslyDelivered() {
-        if (previouslyDeliveredMessages != null) {
-            previouslyDeliveredMessages.clear();
-            previouslyDeliveredMessages = null;
-        }
-    }
-
-    public void dispatch(MessageDispatch md) {
-        MessageListener listener = this.messageListener.get();
-        try {
-            clearMessagesInProgress();
-            clearDispatchList();
-            synchronized (unconsumedMessages.getMutex()) {
-                if (!unconsumedMessages.isClosed()) {
-                    if (this.info.isBrowser() || !session.connection.isDuplicate(this, md.getMessage())) {
-                        if (listener != null && unconsumedMessages.isRunning()) {
-                            ActiveMQMessage message = createActiveMQMessage(md);
-                            beforeMessageIsConsumed(md);
-                            try {
-                                boolean expired = message.isExpired();
-                                if (!expired) {
-                                    listener.onMessage(message);
-                                }
-                                afterMessageIsConsumed(md, expired);
-                            } catch (RuntimeException e) {
-                                LOG.error(getConsumerId() + " Exception while processing message: " + md.getMessage().getMessageId(), e);
-                                if (isAutoAcknowledgeBatch() || isAutoAcknowledgeEach() || session.isIndividualAcknowledge()) {
-                                    // schedual redelivery and possible dlq processing
-                                    md.setRollbackCause(e);
-                                    rollback();
-                                } else {
-                                    // Transacted or Client ack: Deliver the
-                                    // next message.
-                                    afterMessageIsConsumed(md, false);
-                                }
-                            }
-                        } else {
-                            if (!unconsumedMessages.isRunning()) {
-                                // delayed redelivery, ensure it can be re delivered
-                                session.connection.rollbackDuplicate(this, md.getMessage());
-                            }
-                            unconsumedMessages.enqueue(md);
-                            if (availableListener != null) {
-                                availableListener.onMessageAvailable(this);
-                            }
-                        }
-                    } else {
-                        if (!session.isTransacted()) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(getConsumerId() + " ignoring (auto acking) duplicate: " + md.getMessage());
-                            }
-                            MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1);
-                            session.sendAck(ack);
-                        } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(getConsumerId() + " tracking transacted redelivery of duplicate: " + md.getMessage());
-                            }
-                            boolean needsPoisonAck = false;
-                            synchronized (deliveredMessages) {
-                                if (previouslyDeliveredMessages != null) {
-                                    previouslyDeliveredMessages.put(md.getMessage().getMessageId(), true);
-                                } else {
-                                    // delivery while pending redelivery to another consumer on the same connection
-                                    // not waiting for redelivery will help here
-                                    needsPoisonAck = true;
-                                }
-                            }
-                            if (needsPoisonAck) {
-                                LOG.warn("acking duplicate delivery as poison, redelivery must be pending to another"
-                                        + " consumer on this connection, failoverRedeliveryWaitPeriod=" 
-                                        + failoverRedeliveryWaitPeriod + ". Message: " + md);
-                                MessageAck poisonAck = new MessageAck(md, MessageAck.POSION_ACK_TYPE, 1);
-                                poisonAck.setFirstMessageId(md.getMessage().getMessageId());
-                                session.sendAck(poisonAck);
-                            } else {
-                                ackLater(md, MessageAck.DELIVERED_ACK_TYPE);
-                            }
-                        }
-                    }
-                }
-            }
-            if (++dispatchedCount % 1000 == 0) {
-                dispatchedCount = 0;
-                Thread.yield();
-            }
-        } catch (Exception e) {
-            session.connection.onClientInternalException(e);
-        }
-    }
-
-    // async (on next call) clear or track delivered as they may be flagged as duplicates if they arrive again
-    private void clearDispatchList() {
-        if (clearDispatchList) {
-            synchronized (deliveredMessages) {  
-                if (clearDispatchList) {
-                    if (!deliveredMessages.isEmpty()) {
-                        if (session.isTransacted()) {    
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(getConsumerId() + " tracking existing transacted delivered list (" + deliveredMessages.size() + ") on transport interrupt");
-                            }
-                            if (previouslyDeliveredMessages == null) {
-                                previouslyDeliveredMessages = new PreviouslyDeliveredMap<MessageId, Boolean>(session.getTransactionContext().getTransactionId());
-                            }
-                            for (MessageDispatch delivered : deliveredMessages) {
-                                previouslyDeliveredMessages.put(delivered.getMessage().getMessageId(), false);
-                            }
-                        } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(getConsumerId() + " clearing delivered list (" + deliveredMessages.size() + ") on transport interrupt");
-                            }
-                            deliveredMessages.clear();
-                            pendingAck = null;
-                        }
-                    }
-                    clearDispatchList = false;
-                }
-            }
-        }
-    }
-
-    public int getMessageSize() {
-        return unconsumedMessages.size();
-    }
-
-    public void start() throws JMSException {
-        if (unconsumedMessages.isClosed()) {
-            return;
-        }
-        started.set(true);
-        unconsumedMessages.start();
-        session.executor.wakeup();
-    }
-
-    public void stop() {
-        started.set(false);
-        unconsumedMessages.stop();
-    }
-
-    @Override
-    public String toString() {
-        return "ActiveMQMessageConsumer { value=" + info.getConsumerId() + ", started=" + started.get()
-               + " }";
-    }
-
-    /**
-     * Delivers a message to the message listener.
-     * 
-     * @return
-     * @throws JMSException
-     */
-    public boolean iterate() {
-        MessageListener listener = this.messageListener.get();
-        if (listener != null) {
-            MessageDispatch md = unconsumedMessages.dequeueNoWait();
-            if (md != null) {
-                dispatch(md);
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public boolean isInUse(ActiveMQTempDestination destination) {
-        return info.getDestination().equals(destination);
-    }
-
-    public long getLastDeliveredSequenceId() {
-        return lastDeliveredSequenceId;
-    }
-
-	public IOException getFailureError() {
-		return failureError;
-	}
-
-	public void setFailureError(IOException failureError) {
-		this.failureError = failureError;
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
deleted file mode 100755
index f956848..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/**
- * 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;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicLong;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.management.JMSProducerStatsImpl;
-import org.apache.activemq.management.StatsCapable;
-import org.apache.activemq.management.StatsImpl;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * A client uses a <CODE>MessageProducer</CODE> object to send messages to a
- * destination. A <CODE>MessageProducer</CODE> object is created by passing a
- * <CODE>Destination</CODE> object to a message-producer creation method
- * supplied by a session.
- * <P>
- * <CODE>MessageProducer</CODE> is the parent interface for all message
- * producers.
- * <P>
- * A client also has the option of creating a message producer without supplying
- * a destination. In this case, a destination must be provided with every send
- * operation. A typical use for this kind of message producer is to send replies
- * to requests using the request's <CODE>JMSReplyTo</CODE> destination.
- * <P>
- * A client can specify a default delivery mode, priority, and time to live for
- * messages sent by a message producer. It can also specify the delivery mode,
- * priority, and time to live for an individual message.
- * <P>
- * A client can specify a time-to-live value in milliseconds for each message it
- * sends. This value defines a message expiration time that is the sum of the
- * message's time-to-live and the GMT when it is sent (for transacted sends,
- * this is the time the client sends the message, not the time the transaction
- * is committed).
- * <P>
- * A JMS provider should do its best to expire messages accurately; however, the
- * JMS API does not define the accuracy provided.
- * 
- * 
- * @see javax.jms.TopicPublisher
- * @see javax.jms.QueueSender
- * @see javax.jms.Session#createProducer
- */
-public class ActiveMQMessageProducer extends ActiveMQMessageProducerSupport implements StatsCapable, Disposable {
-
-    protected ProducerInfo info;
-    protected boolean closed;
-
-    private final JMSProducerStatsImpl stats;
-    private AtomicLong messageSequence;
-    private final long startTime;
-    private MessageTransformer transformer;
-    private MemoryUsage producerWindow;
-
-    protected ActiveMQMessageProducer(ActiveMQSession session, ProducerId producerId, ActiveMQDestination destination, int sendTimeout) throws JMSException {
-        super(session);
-        this.info = new ProducerInfo(producerId);
-        this.info.setWindowSize(session.connection.getProducerWindowSize());
-        if (destination != null && destination.getOptions() != null) {
-            Map<String, String> options = new HashMap<String, String>(destination.getOptions());
-            IntrospectionSupport.setProperties(this.info, options, "producer.");
-        }
-        this.info.setDestination(destination);
-
-        // Enable producer window flow control if protocol > 3 and the window
-        // size > 0
-        if (session.connection.getProtocolVersion() >= 3 && this.info.getWindowSize() > 0) {
-            producerWindow = new MemoryUsage("Producer Window: " + producerId);
-            producerWindow.setExecutor(session.getConnectionExecutor());
-            producerWindow.setLimit(this.info.getWindowSize());
-            producerWindow.start();
-        }
-
-        this.defaultDeliveryMode = Message.DEFAULT_DELIVERY_MODE;
-        this.defaultPriority = Message.DEFAULT_PRIORITY;
-        this.defaultTimeToLive = Message.DEFAULT_TIME_TO_LIVE;
-        this.startTime = System.currentTimeMillis();
-        this.messageSequence = new AtomicLong(0);
-        this.stats = new JMSProducerStatsImpl(session.getSessionStats(), destination);
-        this.session.addProducer(this);
-        this.session.asyncSendPacket(info);
-        this.setSendTimeout(sendTimeout);
-        setTransformer(session.getTransformer());
-    }
-
-    public StatsImpl getStats() {
-        return stats;
-    }
-
-    public JMSProducerStatsImpl getProducerStats() {
-        return stats;
-    }
-
-    /**
-     * Gets the destination associated with this <CODE>MessageProducer</CODE>.
-     * 
-     * @return this producer's <CODE>Destination/ <CODE>
-     * @throws JMSException if the JMS provider fails to close the producer due to
-     *                      some internal error.
-     * @since 1.1
-     */
-    public Destination getDestination() throws JMSException {
-        checkClosed();
-        return this.info.getDestination();
-    }
-
-    /**
-     * Closes the message producer.
-     * <P>
-     * Since a provider may allocate some resources on behalf of a <CODE>
-     * MessageProducer</CODE>
-     * outside the Java virtual machine, clients should close them when they are
-     * not needed. Relying on garbage collection to eventually reclaim these
-     * resources may not be timely enough.
-     * 
-     * @throws JMSException if the JMS provider fails to close the producer due
-     *                 to some internal error.
-     */
-    public void close() throws JMSException {
-        if (!closed) {
-            dispose();
-            this.session.asyncSendPacket(info.createRemoveCommand());
-        }
-    }
-
-    public void dispose() {
-        if (!closed) {
-            this.session.removeProducer(this);
-            if (producerWindow != null) {
-                producerWindow.stop();
-            }
-            closed = true;
-        }
-    }
-
-    /**
-     * Check if the instance of this producer has been closed.
-     * 
-     * @throws IllegalStateException
-     */
-    @Override
-    protected void checkClosed() throws IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The producer is closed");
-        }
-    }
-
-    /**
-     * Sends a message to a destination for an unidentified message producer,
-     * specifying delivery mode, priority and time to live.
-     * <P>
-     * Typically, a message producer is assigned a destination at creation time;
-     * however, the JMS API also supports unidentified message producers, which
-     * require that the destination be supplied every time a message is sent.
-     * 
-     * @param destination the destination 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.
-     * @throws UnsupportedOperationException if an invalid destination is
-     *                 specified.
-     * @throws InvalidDestinationException if a client uses this method with an
-     *                 invalid destination.
-     * @see javax.jms.Session#createProducer
-     * @since 1.1
-     */
-    public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
-        checkClosed();
-        if (destination == null) {
-            if (info.getDestination() == null) {
-                throw new UnsupportedOperationException("A destination must be specified.");
-            }
-            throw new InvalidDestinationException("Don't understand null destinations");
-        }
-
-        ActiveMQDestination dest;
-        if (destination == info.getDestination()) {
-            dest = (ActiveMQDestination)destination;
-        } else if (info.getDestination() == null) {
-            dest = ActiveMQDestination.transform(destination);
-        } else {
-            throw new UnsupportedOperationException("This producer can only send messages to: " + this.info.getDestination().getPhysicalName());
-        }
-        if (dest == null) {
-            throw new JMSException("No destination specified");
-        }
-
-        if (transformer != null) {
-            Message transformedMessage = transformer.producerTransform(session, this, message);
-            if (transformedMessage != null) {
-                message = transformedMessage;
-            }
-        }
-
-        if (producerWindow != null) {
-            try {
-                producerWindow.waitForSpace();
-            } catch (InterruptedException e) {
-                throw new JMSException("Send aborted due to thread interrupt.");
-            }
-        }
-
-        this.session.send(this, dest, message, deliveryMode, priority, timeToLive, producerWindow,sendTimeout);
-
-        stats.onMessage();
-    }
-
-    public MessageTransformer getTransformer() {
-        return transformer;
-    }
-
-    /**
-     * Sets the transformer used to transform messages before they are sent on
-     * to the JMS bus
-     */
-    public void setTransformer(MessageTransformer transformer) {
-        this.transformer = transformer;
-    }
-
-    /**
-     * @return the time in milli second when this object was created.
-     */
-    protected long getStartTime() {
-        return this.startTime;
-    }
-
-    /**
-     * @return Returns the messageSequence.
-     */
-    protected long getMessageSequence() {
-        return messageSequence.incrementAndGet();
-    }
-
-    /**
-     * @param messageSequence The messageSequence to set.
-     */
-    protected void setMessageSequence(AtomicLong messageSequence) {
-        this.messageSequence = messageSequence;
-    }
-
-    /**
-     * @return Returns the info.
-     */
-    protected ProducerInfo getProducerInfo() {
-        return this.info != null ? this.info : null;
-    }
-
-    /**
-     * @param info The info to set
-     */
-    protected void setProducerInfo(ProducerInfo info) {
-        this.info = info;
-    }
-
-    @Override
-    public String toString() {
-        return "ActiveMQMessageProducer { value=" + info.getProducerId() + " }";
-    }
-
-    public void onProducerAck(ProducerAck pa) {
-        if (this.producerWindow != null) {
-            this.producerWindow.decreaseUsage(pa.getSize());
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducerSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducerSupport.java
deleted file mode 100644
index 1f8ce41..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducerSupport.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-
-/**
- * A useful base class for implementing a {@link MessageProducer}
- *
- *
- */
-public abstract class ActiveMQMessageProducerSupport implements MessageProducer, Closeable {
-    protected ActiveMQSession session;
-    protected boolean disableMessageID;
-    protected boolean disableMessageTimestamp;
-    protected int defaultDeliveryMode;
-    protected int defaultPriority;
-    protected long defaultTimeToLive;
-    protected int sendTimeout=0;
-
-    public ActiveMQMessageProducerSupport(ActiveMQSession session) {
-        this.session = session;
-        disableMessageTimestamp = session.connection.isDisableTimeStampsByDefault();
-    }
-
-    /**
-     * Sets whether message IDs are disabled.
-     * <P>
-     * Since message IDs take some effort to create and increase a message's
-     * size, some JMS providers may be able to optimize message overhead if
-     * they are given a hint that the message ID is not used by an application.
-     * By calling the <CODE>setDisableMessageID</CODE> method on this message
-     * producer, a JMS client enables this potential optimization for all
-     * messages sent by this message producer. If the JMS provider accepts this
-     * hint, these messages must have the message ID set to null; if the
-     * provider ignores the hint, the message ID must be set to its normal
-     * unique value.
-     * <P>
-     * Message IDs are enabled by default.
-     *
-     * @param value indicates if message IDs are disabled
-     * @throws javax.jms.JMSException if the JMS provider fails to close the producer due to
-     *                      some internal error.
-     */
-    public void setDisableMessageID(boolean value) throws JMSException {
-        checkClosed();
-        this.disableMessageID = value;
-    }
-
-    /**
-     * Gets an indication of whether message IDs are disabled.
-     *
-     * @return an indication of whether message IDs are disabled
-     * @throws javax.jms.JMSException if the JMS provider fails to determine if message IDs are
-     *                      disabled due to some internal error.
-     */
-    public boolean getDisableMessageID() throws JMSException {
-        checkClosed();
-        return this.disableMessageID;
-    }
-
-    /**
-     * Sets whether message timestamps are disabled.
-     * <P>
-     * Since timestamps take some effort to create and increase a message's
-     * size, some JMS providers may be able to optimize message overhead if
-     * they are given a hint that the timestamp is not used by an application.
-     * By calling the <CODE>setDisableMessageTimestamp</CODE> method on this
-     * message producer, a JMS client enables this potential optimization for
-     * all messages sent by this message producer. If the JMS provider accepts
-     * this hint, these messages must have the timestamp set to zero; if the
-     * provider ignores the hint, the timestamp must be set to its normal
-     * value.
-     * <P>
-     * Message timestamps are enabled by default.
-     *
-     * @param value indicates if message timestamps are disabled
-     * @throws javax.jms.JMSException if the JMS provider fails to close the producer due to
-     *                      some internal error.
-     */
-    public void setDisableMessageTimestamp(boolean value) throws JMSException {
-        checkClosed();
-        this.disableMessageTimestamp = value;
-    }
-
-    /**
-     * Gets an indication of whether message timestamps are disabled.
-     *
-     * @return an indication of whether message timestamps are disabled
-     * @throws javax.jms.JMSException if the JMS provider fails to close the producer due to
-     *                      some internal error.
-     */
-    public boolean getDisableMessageTimestamp() throws JMSException {
-        checkClosed();
-        return this.disableMessageTimestamp;
-    }
-
-    /**
-     * Sets the producer's default delivery mode.
-     * <P>
-     * Delivery mode is set to <CODE>PERSISTENT</CODE> by default.
-     *
-     * @param newDeliveryMode the message delivery mode for this message producer; legal
-     *                        values are <code>DeliveryMode.NON_PERSISTENT</code> and
-     *                        <code>DeliveryMode.PERSISTENT</code>
-     * @throws javax.jms.JMSException if the JMS provider fails to set the delivery mode due to
-     *                      some internal error.
-     * @see javax.jms.MessageProducer#getDeliveryMode
-     * @see javax.jms.DeliveryMode#NON_PERSISTENT
-     * @see javax.jms.DeliveryMode#PERSISTENT
-     * @see javax.jms.Message#DEFAULT_DELIVERY_MODE
-     */
-    public void setDeliveryMode(int newDeliveryMode) throws JMSException {
-        if (newDeliveryMode != DeliveryMode.PERSISTENT && newDeliveryMode != DeliveryMode.NON_PERSISTENT) {
-            throw new javax.jms.IllegalStateException("unknown delivery mode: " + newDeliveryMode);
-        }
-        checkClosed();
-        this.defaultDeliveryMode = newDeliveryMode;
-    }
-
-    /**
-     * Gets the producer's default delivery mode.
-     *
-     * @return the message delivery mode for this message producer
-     * @throws javax.jms.JMSException if the JMS provider fails to close the producer due to
-     *                      some internal error.
-     */
-    public int getDeliveryMode() throws JMSException {
-        checkClosed();
-        return this.defaultDeliveryMode;
-    }
-
-    /**
-     * Sets the producer's default priority.
-     * <P>
-     * The JMS API defines ten levels of priority value, with 0 as the lowest
-     * priority and 9 as the highest. Clients should consider priorities 0-4 as
-     * gradations of normal priority and priorities 5-9 as gradations of
-     * expedited priority. Priority is set to 4 by default.
-     *
-     * @param newDefaultPriority the message priority for this message producer; must be a
-     *                           value between 0 and 9
-     * @throws javax.jms.JMSException if the JMS provider fails to set the delivery mode due to
-     *                      some internal error.
-     * @see javax.jms.MessageProducer#getPriority
-     * @see javax.jms.Message#DEFAULT_PRIORITY
-     */
-    public void setPriority(int newDefaultPriority) throws JMSException {
-        if (newDefaultPriority < 0 || newDefaultPriority > 9) {
-            throw new IllegalStateException("default priority must be a value between 0 and 9");
-        }
-        checkClosed();
-        this.defaultPriority = newDefaultPriority;
-    }
-
-    /**
-     * Gets the producer's default priority.
-     *
-     * @return the message priority for this message producer
-     * @throws javax.jms.JMSException if the JMS provider fails to close the producer due to
-     *                      some internal error.
-     * @see javax.jms.MessageProducer#setPriority
-     */
-    public int getPriority() throws JMSException {
-        checkClosed();
-        return this.defaultPriority;
-    }
-
-    /**
-     * Sets the default length of time in milliseconds from its dispatch time
-     * that a produced message should be retained by the message system.
-     * <P>
-     * Time to live is set to zero by default.
-     *
-     * @param timeToLive the message time to live in milliseconds; zero is unlimited
-     * @throws javax.jms.JMSException if the JMS provider fails to set the time to live due to
-     *                      some internal error.
-     * @see javax.jms.MessageProducer#getTimeToLive
-     * @see javax.jms.Message#DEFAULT_TIME_TO_LIVE
-     */
-    public void setTimeToLive(long timeToLive) throws JMSException {
-        if (timeToLive < 0L) {
-            throw new IllegalStateException("cannot set a negative timeToLive");
-        }
-        checkClosed();
-        this.defaultTimeToLive = timeToLive;
-    }
-
-    /**
-     * Gets the default length of time in milliseconds from its dispatch time
-     * that a produced message should be retained by the message system.
-     *
-     * @return the message time to live in milliseconds; zero is unlimited
-     * @throws javax.jms.JMSException if the JMS provider fails to get the time to live due to
-     *                      some internal error.
-     * @see javax.jms.MessageProducer#setTimeToLive
-     */
-    public long getTimeToLive() throws JMSException {
-        checkClosed();
-        return this.defaultTimeToLive;
-    }
-
-    /**
-     * Sends a message using the <CODE>MessageProducer</CODE>'s default
-     * delivery mode, priority, and time to live.
-     *
-     * @param message the message to send
-     * @throws javax.jms.JMSException                if the JMS provider fails to send 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 <CODE>
-     *                                     MessageProducer</CODE> with an invalid destination.
-     * @throws UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>
-     *                                     MessageProducer</CODE> that did not specify a
-     *                                     destination at creation time.
-     * @see javax.jms.Session#createProducer
-     * @see javax.jms.MessageProducer
-     * @since 1.1
-     */
-    public void send(Message message) throws JMSException {
-        this.send(this.getDestination(),
-                  message,
-                  this.defaultDeliveryMode,
-                  this.defaultPriority,
-                  this.defaultTimeToLive);
-    }
-
-    /**
-     * Sends a message to the destination, specifying delivery mode, priority,
-     * and time to live.
-     *
-     * @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 javax.jms.JMSException                if the JMS provider fails to send 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 <CODE>
-     *                                     MessageProducer</CODE> with an invalid destination.
-     * @throws UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>
-     *                                     MessageProducer</CODE> that did not specify a
-     *                                     destination at creation time.
-     * @see javax.jms.Session#createProducer
-     * @since 1.1
-     */
-    public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
-        this.send(this.getDestination(),
-                  message,
-                  deliveryMode,
-                  priority,
-                  timeToLive);
-    }
-
-    /**
-     * Sends a message to a destination for an unidentified message producer.
-     * Uses the <CODE>MessageProducer</CODE>'s default delivery mode,
-     * priority, and time to live.
-     * <P>
-     * Typically, a message producer is assigned a destination at creation
-     * time; however, the JMS API also supports unidentified message producers,
-     * which require that the destination be supplied every time a message is
-     * sent.
-     *
-     * @param destination the destination to send this message to
-     * @param message     the message to send
-     * @throws javax.jms.JMSException                if the JMS provider fails to send 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 destination.
-     * @throws UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>
-     *                                     MessageProducer</CODE> that specified a destination at
-     *                                     creation time.
-     * @see javax.jms.Session#createProducer
-     * @see javax.jms.MessageProducer
-     */
-    public void send(Destination destination, Message message) throws JMSException {
-        this.send(destination,
-                  message,
-                  this.defaultDeliveryMode,
-                  this.defaultPriority,
-                  this.defaultTimeToLive);
-    }
-
-
-    protected abstract void checkClosed() throws IllegalStateException;
-
-    /**
-     * @return the sendTimeout
-     */
-    public int getSendTimeout() {
-        return sendTimeout;
-    }
-
-    /**
-     * @param sendTimeout the sendTimeout to set
-     */
-    public void setSendTimeout(int sendTimeout) {
-        this.sendTimeout = sendTimeout;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java
deleted file mode 100755
index 983f828..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- * 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;
-
-import java.net.MalformedURLException;
-import java.util.Enumeration;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageEOFException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.blob.BlobDownloader;
-import org.apache.activemq.blob.BlobUploader;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * A helper class for converting normal JMS interfaces into ActiveMQ specific
- * ones.
- * 
- * 
- */
-public final class ActiveMQMessageTransformation {
-
-    private ActiveMQMessageTransformation() {    
-    }
-    
-    /**
-     * Creates a an available JMS message from another provider.
-     * 
-     * @param destination - Destination to be converted into ActiveMQ's
-     *                implementation.
-     * @return ActiveMQDestination - ActiveMQ's implementation of the
-     *         destination.
-     * @throws JMSException if an error occurs
-     */
-    public static ActiveMQDestination transformDestination(Destination destination) throws JMSException {
-        ActiveMQDestination activeMQDestination = null;
-
-        if (destination != null) {
-            if (destination instanceof ActiveMQDestination) {
-                return (ActiveMQDestination)destination;
-
-            } else {
-                if (destination instanceof TemporaryQueue) {
-                    activeMQDestination = new ActiveMQTempQueue(((Queue)destination).getQueueName());
-                } else if (destination instanceof TemporaryTopic) {
-                    activeMQDestination = new ActiveMQTempTopic(((Topic)destination).getTopicName());
-                } else if (destination instanceof Queue) {
-                    activeMQDestination = new ActiveMQQueue(((Queue)destination).getQueueName());
-                } else if (destination instanceof Topic) {
-                    activeMQDestination = new ActiveMQTopic(((Topic)destination).getTopicName());
-                }
-            }
-        }
-
-        return activeMQDestination;
-    }
-
-    /**
-     * Creates a fast shallow copy of the current ActiveMQMessage or creates a
-     * whole new message instance from an available JMS message from another
-     * provider.
-     * 
-     * @param message - Message to be converted into ActiveMQ's implementation.
-     * @param connection
-     * @return ActiveMQMessage - ActiveMQ's implementation object of the
-     *         message.
-     * @throws JMSException if an error occurs
-     */
-    public static ActiveMQMessage transformMessage(Message message, ActiveMQConnection connection)
-        throws JMSException {
-        if (message instanceof ActiveMQMessage) {
-            return (ActiveMQMessage)message;
-
-        } else {
-            ActiveMQMessage activeMessage = null;
-
-            if (message instanceof BytesMessage) {
-                BytesMessage bytesMsg = (BytesMessage)message;
-                bytesMsg.reset();
-                ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-                msg.setConnection(connection);
-                try {
-                    for (;;) {
-                        // Reads a byte from the message stream until the stream
-                        // is empty
-                        msg.writeByte(bytesMsg.readByte());
-                    }
-                } catch (MessageEOFException e) {
-                    // if an end of message stream as expected
-                } catch (JMSException e) {
-                }
-
-                activeMessage = msg;
-            } else if (message instanceof MapMessage) {
-                MapMessage mapMsg = (MapMessage)message;
-                ActiveMQMapMessage msg = new ActiveMQMapMessage();
-                msg.setConnection(connection);
-                Enumeration iter = mapMsg.getMapNames();
-
-                while (iter.hasMoreElements()) {
-                    String name = iter.nextElement().toString();
-                    msg.setObject(name, mapMsg.getObject(name));
-                }
-
-                activeMessage = msg;
-            } else if (message instanceof ObjectMessage) {
-                ObjectMessage objMsg = (ObjectMessage)message;
-                ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
-                msg.setConnection(connection);
-                msg.setObject(objMsg.getObject());
-                msg.storeContent();
-                activeMessage = msg;
-            } else if (message instanceof StreamMessage) {
-                StreamMessage streamMessage = (StreamMessage)message;
-                streamMessage.reset();
-                ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-                msg.setConnection(connection);
-                Object obj = null;
-
-                try {
-                    while ((obj = streamMessage.readObject()) != null) {
-                        msg.writeObject(obj);
-                    }
-                } catch (MessageEOFException e) {
-                    // if an end of message stream as expected
-                } catch (JMSException e) {
-                }
-
-                activeMessage = msg;
-            } else if (message instanceof TextMessage) {
-                TextMessage textMsg = (TextMessage)message;
-                ActiveMQTextMessage msg = new ActiveMQTextMessage();
-                msg.setConnection(connection);
-                msg.setText(textMsg.getText());
-                activeMessage = msg;
-            } else if (message instanceof BlobMessage) {
-            	BlobMessage blobMessage = (BlobMessage)message;
-            	ActiveMQBlobMessage msg = new ActiveMQBlobMessage();
-            	msg.setConnection(connection);
-            	msg.setBlobDownloader(new BlobDownloader(connection.getBlobTransferPolicy()));
-            	try {
-					msg.setURL(blobMessage.getURL());
-				} catch (MalformedURLException e) {
-					
-				}
-            	activeMessage = msg;
-            } else {
-                activeMessage = new ActiveMQMessage();
-                activeMessage.setConnection(connection);
-            }
-
-            copyProperties(message, activeMessage);
-
-            return activeMessage;
-        }
-    }
-
-    /**
-     * Copies the standard JMS and user defined properties from the givem
-     * message to the specified message
-     * 
-     * @param fromMessage the message to take the properties from
-     * @param toMessage the message to add the properties to
-     * @throws JMSException
-     */
-    public static void copyProperties(Message fromMessage, Message toMessage) throws JMSException {
-        toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
-        toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
-        toMessage.setJMSReplyTo(transformDestination(fromMessage.getJMSReplyTo()));
-        toMessage.setJMSDestination(transformDestination(fromMessage.getJMSDestination()));
-        toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
-        toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
-        toMessage.setJMSType(fromMessage.getJMSType());
-        toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
-        toMessage.setJMSPriority(fromMessage.getJMSPriority());
-        toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());
-
-        Enumeration propertyNames = fromMessage.getPropertyNames();
-
-        while (propertyNames.hasMoreElements()) {
-            String name = propertyNames.nextElement().toString();
-            Object obj = fromMessage.getObjectProperty(name);
-            toMessage.setObjectProperty(name, obj);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java
deleted file mode 100644
index d9d809e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.util.IOExceptionSupport;
-
-/**
- * 
- */
-public class ActiveMQOutputStream extends OutputStream implements Disposable {
-
-    protected int count;
-
-    final byte buffer[];
-
-    private final ActiveMQConnection connection;
-    private final Map<String, Object> properties;
-    private final ProducerInfo info;
-
-    private long messageSequence;
-    private boolean closed;
-    private final int deliveryMode;
-    private final int priority;
-    private final long timeToLive;
-
-    /**
-     * JMS Property which is used to specify the size (in kb) which is used as chunk size when splitting the stream. Default is 64kb
-     */
-    public final static String AMQ_STREAM_CHUNK_SIZE = "AMQ_STREAM_CHUNK_SIZE";
-
-    public ActiveMQOutputStream(ActiveMQConnection connection, ProducerId producerId, ActiveMQDestination destination, Map<String, Object> properties, int deliveryMode, int priority,
-                                long timeToLive) throws JMSException {
-        this.connection = connection;
-        this.deliveryMode = deliveryMode;
-        this.priority = priority;
-        this.timeToLive = timeToLive;
-        this.properties = properties == null ? null : new HashMap<String, Object>(properties);
-
-        Integer chunkSize = this.properties == null ? null : (Integer) this.properties.get(AMQ_STREAM_CHUNK_SIZE);
-        if (chunkSize == null) {
-            chunkSize = 64 * 1024;
-        } else {
-            if (chunkSize < 1) {
-                throw new IllegalArgumentException("Chunk size must be greater then 0");
-            } else {
-                chunkSize *= 1024;
-            }
-        }
-
-        buffer = new byte[chunkSize];
-
-        if (destination == null) {
-            throw new InvalidDestinationException("Don't understand null destinations");
-        }
-
-        this.info = new ProducerInfo(producerId);
-        this.info.setDestination(destination);
-
-        this.connection.addOutputStream(this);
-        this.connection.asyncSendPacket(info);
-    }
-
-    public void close() throws IOException {
-        if (!closed) {
-            flushBuffer();
-            try {
-                // Send an EOS style empty message to signal EOS.
-                send(new ActiveMQMessage(), true);
-                dispose();
-                this.connection.asyncSendPacket(info.createRemoveCommand());
-            } catch (JMSException e) {
-                IOExceptionSupport.create(e);
-            }
-        }
-    }
-
-    public void dispose() {
-        if (!closed) {
-            this.connection.removeOutputStream(this);
-            closed = true;
-        }
-    }
-
-    public synchronized void write(int b) throws IOException {
-        buffer[count++] = (byte) b;
-        if (count == buffer.length) {
-            flushBuffer();
-        }
-    }
-
-    public synchronized void write(byte b[], int off, int len) throws IOException {
-        while (len > 0) {
-            int max = Math.min(len, buffer.length - count);
-            System.arraycopy(b, off, buffer, count, max);
-
-            len -= max;
-            count += max;
-            off += max;
-
-            if (count == buffer.length) {
-                flushBuffer();
-            }
-        }
-    }
-
-    public synchronized void flush() throws IOException {
-        flushBuffer();
-    }
-
-    private void flushBuffer() throws IOException {
-        if (count != 0) {
-            try {
-                ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-                msg.writeBytes(buffer, 0, count);
-                send(msg, false);
-            } catch (JMSException e) {
-                throw IOExceptionSupport.create(e);
-            }
-            count = 0;
-        }
-    }
-
-    /**
-     * @param msg
-     * @throws JMSException
-     */
-    private void send(ActiveMQMessage msg, boolean eosMessage) throws JMSException {
-        if (properties != null) {
-            for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) {
-                String key = (String) iter.next();
-                Object value = properties.get(key);
-                msg.setObjectProperty(key, value);
-            }
-        }
-        msg.setType("org.apache.activemq.Stream");
-        msg.setGroupID(info.getProducerId().toString());
-        if (eosMessage) {
-            msg.setGroupSequence(-1);
-        } else {
-            msg.setGroupSequence((int) messageSequence);
-        }
-        MessageId id = new MessageId(info.getProducerId(), messageSequence++);
-        connection.send(info.getDestination(), msg, id, deliveryMode, priority, timeToLive, !eosMessage);
-    }
-
-    public String toString() {
-        return "ActiveMQOutputStream { producerId=" + info.getProducerId() + " }";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java
deleted file mode 100755
index a8aa821..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * 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;
-
-import java.io.Serializable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Defines the prefetch message policies for different types of consumers
- * 
- * @org.apache.xbean.XBean element="prefetchPolicy"
- * 
- */
-public class ActiveMQPrefetchPolicy extends Object implements Serializable {
-    public static final int MAX_PREFETCH_SIZE = Short.MAX_VALUE - 1;
-    public static final int DEFAULT_QUEUE_PREFETCH = 1000;
-    public static final int DEFAULT_QUEUE_BROWSER_PREFETCH = 500;
-    public static final int DEFAULT_DURABLE_TOPIC_PREFETCH = 100;
-    public static final int DEFAULT_OPTIMIZE_DURABLE_TOPIC_PREFETCH=1000;
-    public static final int DEFAULT_INPUT_STREAM_PREFETCH=100;
-    public static final int DEFAULT_TOPIC_PREFETCH = MAX_PREFETCH_SIZE;
-    
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQPrefetchPolicy.class);
-    
-    private int queuePrefetch;
-    private int queueBrowserPrefetch;
-    private int topicPrefetch;
-    private int durableTopicPrefetch;
-    private int optimizeDurableTopicPrefetch;
-    private int inputStreamPrefetch;
-    private int maximumPendingMessageLimit;
-
-    /**
-     * Initialize default prefetch policies
-     */
-    public ActiveMQPrefetchPolicy() {
-        this.queuePrefetch = DEFAULT_QUEUE_PREFETCH;
-        this.queueBrowserPrefetch = DEFAULT_QUEUE_BROWSER_PREFETCH;
-        this.topicPrefetch = DEFAULT_TOPIC_PREFETCH;
-        this.durableTopicPrefetch = DEFAULT_DURABLE_TOPIC_PREFETCH;
-        this.optimizeDurableTopicPrefetch = DEFAULT_OPTIMIZE_DURABLE_TOPIC_PREFETCH;
-        this.inputStreamPrefetch = DEFAULT_INPUT_STREAM_PREFETCH;
-    }
-
-    /**
-     * @return Returns the durableTopicPrefetch.
-     */
-    public int getDurableTopicPrefetch() {
-        return durableTopicPrefetch;
-    }
-
-    /**
-     * @param durableTopicPrefetch The durableTopicPrefetch to set.
-     */
-    public void setDurableTopicPrefetch(int durableTopicPrefetch) {
-        this.durableTopicPrefetch = getMaxPrefetchLimit(durableTopicPrefetch);
-    }
-
-    /**
-     * @return Returns the queuePrefetch.
-     */
-    public int getQueuePrefetch() {
-        return queuePrefetch;
-    }
-
-    /**
-     * @param queuePrefetch The queuePrefetch to set.
-     */
-    public void setQueuePrefetch(int queuePrefetch) {
-        this.queuePrefetch = getMaxPrefetchLimit(queuePrefetch);
-    }
-
-    /**
-     * @return Returns the queueBrowserPrefetch.
-     */
-    public int getQueueBrowserPrefetch() {
-        return queueBrowserPrefetch;
-    }
-
-    /**
-     * @param queueBrowserPrefetch The queueBrowserPrefetch to set.
-     */
-    public void setQueueBrowserPrefetch(int queueBrowserPrefetch) {
-        this.queueBrowserPrefetch = getMaxPrefetchLimit(queueBrowserPrefetch);
-    }
-
-    /**
-     * @return Returns the topicPrefetch.
-     */
-    public int getTopicPrefetch() {
-        return topicPrefetch;
-    }
-
-    /**
-     * @param topicPrefetch The topicPrefetch to set.
-     */
-    public void setTopicPrefetch(int topicPrefetch) {
-        this.topicPrefetch = getMaxPrefetchLimit(topicPrefetch);
-    }
-
-    /**
-     * @return Returns the optimizeDurableTopicPrefetch.
-     */
-    public int getOptimizeDurableTopicPrefetch() {
-        return optimizeDurableTopicPrefetch;
-    }
-
-    /**
-     * @param optimizeAcknowledgePrefetch The optimizeDurableTopicPrefetch to
-     *                set.
-     */
-    public void setOptimizeDurableTopicPrefetch(int optimizeAcknowledgePrefetch) {
-        this.optimizeDurableTopicPrefetch = optimizeAcknowledgePrefetch;
-    }
-
-    public int getMaximumPendingMessageLimit() {
-        return maximumPendingMessageLimit;
-    }
-
-    /**
-     * Sets how many messages a broker will keep around, above the prefetch
-     * limit, for non-durable topics before starting to discard older messages.
-     */
-    public void setMaximumPendingMessageLimit(int maximumPendingMessageLimit) {
-        this.maximumPendingMessageLimit = maximumPendingMessageLimit;
-    }
-
-    private int getMaxPrefetchLimit(int value) {
-        int result = Math.min(value, MAX_PREFETCH_SIZE);
-        if (result < value) {
-            LOG.warn("maximum prefetch limit has been reset from " + value + " to " + MAX_PREFETCH_SIZE);
-        }
-        return result;
-    }
-
-    public void setAll(int i) {
-        this.durableTopicPrefetch = i;
-        this.queueBrowserPrefetch = i;
-        this.queuePrefetch = i;
-        this.topicPrefetch = i;
-        this.inputStreamPrefetch = 1;
-        this.optimizeDurableTopicPrefetch = i;
-    }
-
-    public int getInputStreamPrefetch() {
-        return inputStreamPrefetch;
-    }
-
-    public void setInputStreamPrefetch(int inputStreamPrefetch) {
-        this.inputStreamPrefetch = getMaxPrefetchLimit(inputStreamPrefetch);
-    }
-    
-    public boolean equals(Object object){
-        if (object instanceof ActiveMQPrefetchPolicy){
-            ActiveMQPrefetchPolicy other = (ActiveMQPrefetchPolicy) object;
-            return this.queuePrefetch == other.queuePrefetch &&
-            this.queueBrowserPrefetch == other.queueBrowserPrefetch &&
-            this.topicPrefetch == other.topicPrefetch &&
-            this.durableTopicPrefetch == other.durableTopicPrefetch &&
-            this.optimizeDurableTopicPrefetch == other.optimizeDurableTopicPrefetch &&
-            this.inputStreamPrefetch == other.inputStreamPrefetch;
-        }
-        return false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java
deleted file mode 100755
index 50aa67a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * 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;
-
-import java.util.Enumeration;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.IllegalStateException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.MessageDispatch;
-
-/**
- * A client uses a <CODE>QueueBrowser</CODE> object to look at messages on a
- * queue without removing them. <p/>
- * <P>
- * The <CODE>getEnumeration</CODE> method returns a <CODE>
- * java.util.Enumeration</CODE>
- * that is used to scan the queue's messages. It may be an enumeration of the
- * entire content of a queue, or it may contain only the messages matching a
- * message selector. <p/>
- * <P>
- * Messages may be arriving and expiring while the scan is done. The JMS API
- * does not require the content of an enumeration to be a static snapshot of
- * queue content. Whether these changes are visible or not depends on the JMS
- * provider. <p/>
- * <P>
- * A <CODE>QueueBrowser</CODE> can be created from either a <CODE>Session
- * </CODE>
- * or a <CODE>QueueSession</CODE>.
- *
- * @see javax.jms.Session#createBrowser
- * @see javax.jms.QueueSession#createBrowser
- * @see javax.jms.QueueBrowser
- * @see javax.jms.QueueReceiver
- */
-
-public class ActiveMQQueueBrowser implements QueueBrowser, Enumeration {
-
-    private final ActiveMQSession session;
-    private final ActiveMQDestination destination;
-    private final String selector;
-
-    private ActiveMQMessageConsumer consumer;
-    private boolean closed;
-    private final ConsumerId consumerId;
-    private final AtomicBoolean browseDone = new AtomicBoolean(true);
-    private final boolean dispatchAsync;
-    private Object semaphore = new Object();
-
-    /**
-     * Constructor for an ActiveMQQueueBrowser - used internally
-     *
-     * @param theSession
-     * @param dest
-     * @param selector
-     * @throws JMSException
-     */
-    protected ActiveMQQueueBrowser(ActiveMQSession session, ConsumerId consumerId, ActiveMQDestination destination, String selector, boolean dispatchAsync) throws JMSException {
-        this.session = session;
-        this.consumerId = consumerId;
-        this.destination = destination;
-        this.selector = selector;
-        this.dispatchAsync = dispatchAsync;
-        this.consumer = createConsumer();
-    }
-
-    /**
-     * @param session
-     * @param originalDestination
-     * @param selectorExpression
-     * @param cnum
-     * @return
-     * @throws JMSException
-     */
-    private ActiveMQMessageConsumer createConsumer() throws JMSException {
-        browseDone.set(false);
-        ActiveMQPrefetchPolicy prefetchPolicy = session.connection.getPrefetchPolicy();
-
-        return new ActiveMQMessageConsumer(session, consumerId, destination, null, selector, prefetchPolicy.getQueueBrowserPrefetch(), prefetchPolicy
-            .getMaximumPendingMessageLimit(), false, true, dispatchAsync, null) {
-            public void dispatch(MessageDispatch md) {
-                if (md.getMessage() == null) {
-                    browseDone.set(true);
-                } else {
-                    super.dispatch(md);
-                }
-                notifyMessageAvailable();
-            }
-        };
-    }
-
-    private void destroyConsumer() {
-        if (consumer == null) {
-            return;
-        }
-        try {
-            if (session.getTransacted() && session.getTransactionContext().isInLocalTransaction()) {
-                session.commit();
-            }
-            consumer.close();
-            consumer = null;
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * Gets an enumeration for browsing the current queue messages in the order
-     * they would be received.
-     *
-     * @return an enumeration for browsing the messages
-     * @throws JMSException if the JMS provider fails to get the enumeration for
-     *                 this browser due to some internal error.
-     */
-
-    public Enumeration getEnumeration() throws JMSException {
-        checkClosed();
-        if (consumer == null) {
-            consumer = createConsumer();
-        }
-        return this;
-    }
-
-    private void checkClosed() throws IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The Consumer is closed");
-        }
-    }
-
-    /**
-     * @return true if more messages to process
-     */
-    public boolean hasMoreElements() {
-        while (true) {
-
-            synchronized (this) {
-                if (consumer == null) {
-                    return false;
-                }
-            }
-
-            if (consumer.getMessageSize() > 0) {
-                return true;
-            }
-
-            if (browseDone.get() || !session.isRunning()) {
-                destroyConsumer();
-                return false;
-            }
-
-            waitForMessage();
-        }
-    }
-
-    /**
-     * @return the next message
-     */
-    public Object nextElement() {
-        while (true) {
-
-            synchronized (this) {
-                if (consumer == null) {
-                    return null;
-                }
-            }
-
-            try {
-                Message answer = consumer.receiveNoWait();
-                if (answer != null) {
-                    return answer;
-                }
-            } catch (JMSException e) {
-                this.session.connection.onClientInternalException(e);
-                return null;
-            }
-
-            if (browseDone.get() || !session.isRunning()) {
-                destroyConsumer();
-                return null;
-            }
-
-            waitForMessage();
-        }
-    }
-
-    public synchronized void close() throws JMSException {
-        destroyConsumer();
-        closed = true;
-    }
-
-    /**
-     * Gets the queue associated with this queue browser.
-     *
-     * @return the queue
-     * @throws JMSException if the JMS provider fails to get the queue
-     *                 associated with this browser due to some internal error.
-     */
-
-    public Queue getQueue() throws JMSException {
-        return (Queue)destination;
-    }
-
-    public String getMessageSelector() throws JMSException {
-        return selector;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    /**
-     * Wait on a semaphore for a fixed amount of time for a message to come in.
-     * @throws JMSException
-     */
-    protected void waitForMessage() {
-        try {
-            consumer.sendPullCommand(-1);
-            synchronized (semaphore) {
-                semaphore.wait(2000);
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-        } catch (JMSException e) {
-        }
-
-    }
-
-    protected void notifyMessageAvailable() {
-        synchronized (semaphore) {
-            semaphore.notifyAll();
-        }
-    }
-
-    public String toString() {
-        return "ActiveMQQueueBrowser { value=" + consumerId + " }";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
deleted file mode 100755
index bf6b950..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueReceiver;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-
-/**
- * A client uses a <CODE>QueueReceiver</CODE> object to receive messages that
- * have been delivered to a queue. <p/>
- * <P>
- * Although it is possible to have multiple <CODE>QueueReceiver</CODE> s for
- * the same queue, the JMS API does not define how messages are distributed
- * between the <CODE>QueueReceiver</CODE>s. <p/>
- * <P>
- * If a <CODE>QueueReceiver</CODE> specifies a message selector, the messages
- * that are not selected remain on the queue. By definition, a message selector
- * allows a <CODE>QueueReceiver</CODE> to skip messages. This means that when
- * the skipped messages are eventually read, the total ordering of the reads
- * does not retain the partial order defined by each message producer. Only
- * <CODE>QueueReceiver</CODE> s without a message selector will read messages
- * in message producer order. <p/>
- * <P>
- * Creating a <CODE>MessageConsumer</CODE> provides the same features as
- * creating a <CODE>QueueReceiver</CODE>. A <CODE>MessageConsumer</CODE>
- * object is recommended for creating new code. The <CODE>QueueReceiver
- * </CODE>
- * is provided to support existing code.
- * 
- * @see javax.jms.Session#createConsumer(javax.jms.Destination, String)
- * @see javax.jms.Session#createConsumer(javax.jms.Destination)
- * @see javax.jms.QueueSession#createReceiver(Queue, String)
- * @see javax.jms.QueueSession#createReceiver(Queue)
- * @see javax.jms.MessageConsumer
- */
-
-public class ActiveMQQueueReceiver extends ActiveMQMessageConsumer implements QueueReceiver {
-
-    /**
-     * @param theSession
-     * @param value
-     * @param destination
-     * @param messageSelector
-     * @param prefetch
-     * @param asyncDispatch
-     * @throws JMSException
-     */
-    protected ActiveMQQueueReceiver(ActiveMQSession theSession, ConsumerId consumerId,
-                                    ActiveMQDestination destination, String selector, int prefetch,
-                                    int maximumPendingMessageCount, boolean asyncDispatch)
-        throws JMSException {
-        super(theSession, consumerId, destination, null, selector, prefetch, maximumPendingMessageCount,
-              false, false, asyncDispatch, null);
-    }
-
-    /**
-     * Gets the <CODE>Queue</CODE> associated with this queue receiver.
-     * 
-     * @return this receiver's <CODE>Queue</CODE>
-     * @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();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSender.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSender.java
deleted file mode 100755
index 6451ab7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSender.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueSender;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * A client uses a <CODE>QueueSender</CODE> object to send messages to a
- * queue. <p/>
- * <P>
- * Normally, the <CODE>Queue</CODE> is specified when a <CODE>QueueSender
- * </CODE>
- * is created. In this case, an attempt to use the <CODE>send</CODE> methods
- * for an unidentified <CODE>QueueSender</CODE> will throw a <CODE>
- * java.lang.UnsupportedOperationException</CODE>.
- * <p/>
- * <P>
- * If the <CODE>QueueSender</CODE> is created with an unidentified <CODE>
- * Queue</CODE>,
- * an attempt to use the <CODE>send</CODE> methods that assume that the
- * <CODE>Queue</CODE> has been identified will throw a <CODE>
- * java.lang.UnsupportedOperationException</CODE>.
- * <p/>
- * <P>
- * During the execution of its <CODE>send</CODE> method, a message must not be
- * changed by other threads within the client. If the message is modified, the
- * result of the <CODE>send</CODE> is undefined. <p/>
- * <P>
- * After sending a message, a client may retain and modify it without affecting
- * the message that has been sent. The same message object may be sent multiple
- * times. <p/>
- * <P>
- * The following message headers are set as part of sending a message:
- * <code>JMSDestination</code>, <code>JMSDeliveryMode</code>,<code>JMSExpiration</code>,<code>JMSPriority</code>,
- * <code>JMSMessageID</code> and <code>JMSTimeStamp</code>. When the
- * message is sent, the values of these headers are ignored. After the
- * completion of the <CODE>send</CODE>, the headers hold the values specified
- * by the method sending the message. It is possible for the <code>send</code>
- * method not to set <code>JMSMessageID</code> and <code>JMSTimeStamp</code>
- * if the setting of these headers is explicitly disabled by the
- * <code>MessageProducer.setDisableMessageID</code> or
- * <code>MessageProducer.setDisableMessageTimestamp</code> method. <p/>
- * <P>
- * Creating a <CODE>MessageProducer</CODE> provides the same features as
- * creating a <CODE>QueueSender</CODE>. A <CODE>MessageProducer</CODE>
- * object is recommended when creating new code. The <CODE>QueueSender</CODE>
- * is provided to support existing code.
- * 
- * @see javax.jms.MessageProducer
- * @see javax.jms.QueueSession#createSender(Queue)
- */
-
-public class ActiveMQQueueSender extends ActiveMQMessageProducer implements QueueSender {
-
-    protected ActiveMQQueueSender(ActiveMQSession session, ActiveMQDestination destination,int sendTimeout)
-        throws JMSException {
-        super(session, session.getNextProducerId(), destination,sendTimeout);
-    }
-
-    /**
-     * Gets the queue associated with this <CODE>QueueSender</CODE>.
-     * 
-     * @return this sender's queue
-     * @throws JMSException if the JMS provider fails to get the queue for this
-     *                 <CODE>QueueSender</CODE> 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
-     * <CODE>QueueSender</CODE>'s default delivery mode, priority, and time
-     * to live. <p/>
-     * <P>
-     * 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. <p/>
-     * <P>
-     * 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);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
deleted file mode 100755
index 272d4cd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueSession.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/**
- * 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;
-
-import java.io.Serializable;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-/**
- * A QueueSession implementation that throws IllegalStateExceptions when Topic
- * operations are attempted but which delegates to another QueueSession for all
- * other operations. The ActiveMQSessions implement both Topic and Queue
- * Sessions methods but the spec states that Queue session should throw
- * Exceptions if topic operations are attempted on it.
- *
- *
- */
-public class ActiveMQQueueSession implements QueueSession {
-
-    private final QueueSession next;
-
-    public ActiveMQQueueSession(QueueSession next) {
-        this.next = next;
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void close() throws JMSException {
-        next.close();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void commit() throws JMSException {
-        next.commit();
-    }
-
-    /**
-     * @param queue
-     * @return
-     * @throws JMSException
-     */
-    public QueueBrowser createBrowser(Queue queue) throws JMSException {
-        return next.createBrowser(queue);
-    }
-
-    /**
-     * @param queue
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException {
-        return next.createBrowser(queue, messageSelector);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public BytesMessage createBytesMessage() throws JMSException {
-        return next.createBytesMessage();
-    }
-
-    /**
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination) throws JMSException {
-        if (destination instanceof Topic) {
-            throw new InvalidDestinationException("Topics are not supported by a QueueSession");
-        }
-        return next.createConsumer(destination);
-    }
-
-    /**
-     * @param destination
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException {
-        if (destination instanceof Topic) {
-            throw new InvalidDestinationException("Topics are not supported by a QueueSession");
-        }
-        return next.createConsumer(destination, messageSelector);
-    }
-
-    /**
-     * @param destination
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException {
-        if (destination instanceof Topic) {
-            throw new InvalidDestinationException("Topics are not supported by a QueueSession");
-        }
-        return next.createConsumer(destination, messageSelector, noLocal);
-    }
-
-    /**
-     * @param topic
-     * @param name
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException {
-        throw new IllegalStateException("Operation not supported by a QueueSession");
-    }
-
-    /**
-     * @param topic
-     * @param name
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
-        throw new IllegalStateException("Operation not supported by a QueueSession");
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public MapMessage createMapMessage() throws JMSException {
-        return next.createMapMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public Message createMessage() throws JMSException {
-        return next.createMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public ObjectMessage createObjectMessage() throws JMSException {
-        return next.createObjectMessage();
-    }
-
-    /**
-     * @param object
-     * @return
-     * @throws JMSException
-     */
-    public ObjectMessage createObjectMessage(Serializable object) throws JMSException {
-        return next.createObjectMessage(object);
-    }
-
-    /**
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public MessageProducer createProducer(Destination destination) throws JMSException {
-        if (destination instanceof Topic) {
-            throw new InvalidDestinationException("Topics are not supported by a QueueSession");
-        }
-        return next.createProducer(destination);
-    }
-
-    /**
-     * @param queueName
-     * @return
-     * @throws JMSException
-     */
-    public Queue createQueue(String queueName) throws JMSException {
-        return next.createQueue(queueName);
-    }
-
-    /**
-     * @param queue
-     * @return
-     * @throws JMSException
-     */
-    public QueueReceiver createReceiver(Queue queue) throws JMSException {
-        return next.createReceiver(queue);
-    }
-
-    /**
-     * @param queue
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException {
-        return next.createReceiver(queue, messageSelector);
-    }
-
-    /**
-     * @param queue
-     * @return
-     * @throws JMSException
-     */
-    public QueueSender createSender(Queue queue) throws JMSException {
-        return next.createSender(queue);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public StreamMessage createStreamMessage() throws JMSException {
-        return next.createStreamMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TemporaryQueue createTemporaryQueue() throws JMSException {
-        return next.createTemporaryQueue();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TemporaryTopic createTemporaryTopic() throws JMSException {
-        throw new IllegalStateException("Operation not supported by a QueueSession");
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TextMessage createTextMessage() throws JMSException {
-        return next.createTextMessage();
-    }
-
-    /**
-     * @param text
-     * @return
-     * @throws JMSException
-     */
-    public TextMessage createTextMessage(String text) throws JMSException {
-        return next.createTextMessage(text);
-    }
-
-    /**
-     * @param topicName
-     * @return
-     * @throws JMSException
-     */
-    public Topic createTopic(String topicName) throws JMSException {
-        throw new IllegalStateException("Operation not supported by a QueueSession");
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object arg0) {
-        if(this != arg0) {
-            return next.equals(arg0);
-        }
-
-        return true;
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public int getAcknowledgeMode() throws JMSException {
-        return next.getAcknowledgeMode();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public MessageListener getMessageListener() throws JMSException {
-        return next.getMessageListener();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public boolean getTransacted() throws JMSException {
-        return next.getTransacted();
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return next.hashCode();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void recover() throws JMSException {
-        next.recover();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void rollback() throws JMSException {
-        next.rollback();
-    }
-
-    /**
-     *
-     */
-    public void run() {
-        next.run();
-    }
-
-    /**
-     * @param listener
-     * @throws JMSException
-     */
-    public void setMessageListener(MessageListener listener) throws JMSException {
-        next.setMessageListener(listener);
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return next.toString();
-    }
-
-    /**
-     * @param name
-     * @throws JMSException
-     */
-    public void unsubscribe(String name) throws JMSException {
-        throw new IllegalStateException("Operation not supported by a QueueSession");
-    }
-
-    public QueueSession getNext() {
-        return next;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
deleted file mode 100755
index 809c239..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
+++ /dev/null
@@ -1,2042 +0,0 @@
-/**
- * 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;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.net.URL;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import javax.jms.TransactionRolledBackException;
-import org.apache.activemq.blob.BlobDownloader;
-import org.apache.activemq.blob.BlobTransferPolicy;
-import org.apache.activemq.blob.BlobUploader;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.management.JMSSessionStatsImpl;
-import org.apache.activemq.management.StatsCapable;
-import org.apache.activemq.management.StatsImpl;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <P>
- * A <CODE>Session</CODE> object is a single-threaded context for producing
- * and consuming messages. Although it may allocate provider resources outside
- * the Java virtual machine (JVM), it is considered a lightweight JMS object.
- * <P>
- * A session serves several purposes:
- * <UL>
- * <LI>It is a factory for its message producers and consumers.
- * <LI>It supplies provider-optimized message factories.
- * <LI>It is a factory for <CODE>TemporaryTopics</CODE> and
- * <CODE>TemporaryQueues</CODE>.
- * <LI>It provides a way to create <CODE>Queue</CODE> or <CODE>Topic</CODE>
- * objects for those clients that need to dynamically manipulate
- * provider-specific destination names.
- * <LI>It supports a single series of transactions that combine work spanning
- * its producers and consumers into atomic units.
- * <LI>It defines a serial order for the messages it consumes and the messages
- * it produces.
- * <LI>It retains messages it consumes until they have been acknowledged.
- * <LI>It serializes execution of message listeners registered with its message
- * consumers.
- * <LI>It is a factory for <CODE>QueueBrowsers</CODE>.
- * </UL>
- * <P>
- * A session can create and service multiple message producers and consumers.
- * <P>
- * One typical use is to have a thread block on a synchronous
- * <CODE>MessageConsumer</CODE> until a message arrives. The thread may then
- * use one or more of the <CODE>Session</CODE>'s<CODE>MessageProducer</CODE>s.
- * <P>
- * If a client desires to have one thread produce messages while others consume
- * them, the client should use a separate session for its producing thread.
- * <P>
- * Once a connection has been started, any session with one or more registered
- * message listeners is dedicated to the thread of control that delivers
- * messages to it. It is erroneous for client code to use this session or any of
- * its constituent objects from another thread of control. The only exception to
- * this rule is the use of the session or connection <CODE>close</CODE>
- * method.
- * <P>
- * It should be easy for most clients to partition their work naturally into
- * sessions. This model allows clients to start simply and incrementally add
- * message processing complexity as their need for concurrency grows.
- * <P>
- * The <CODE>close</CODE> method is the only session method that can be called
- * while some other session method is being executed in another thread.
- * <P>
- * A session may be specified as transacted. Each transacted session supports a
- * single series of transactions. Each transaction groups a set of message sends
- * and a set of message receives into an atomic unit of work. In effect,
- * transactions organize a session's input message stream and output message
- * stream into series of atomic units. When a transaction commits, its atomic
- * unit of input is acknowledged and its associated atomic unit of output is
- * sent. If a transaction rollback is done, the transaction's sent messages are
- * destroyed and the session's input is automatically recovered.
- * <P>
- * The content of a transaction's input and output units is simply those
- * messages that have been produced and consumed within the session's current
- * transaction.
- * <P>
- * A transaction is completed using either its session's <CODE>commit</CODE>
- * method or its session's <CODE>rollback </CODE> method. The completion of a
- * session's current transaction automatically begins the next. The result is
- * that a transacted session always has a current transaction within which its
- * work is done.
- * <P>
- * The Java Transaction Service (JTS) or some other transaction monitor may be
- * used to combine a session's transaction with transactions on other resources
- * (databases, other JMS sessions, etc.). Since Java distributed transactions
- * are controlled via the Java Transaction API (JTA), use of the session's
- * <CODE>commit</CODE> and <CODE>rollback</CODE> methods in this context is
- * prohibited.
- * <P>
- * The JMS API does not require support for JTA; however, it does define how a
- * provider supplies this support.
- * <P>
- * Although it is also possible for a JMS client to handle distributed
- * transactions directly, it is unlikely that many JMS clients will do this.
- * Support for JTA in the JMS API is targeted at systems vendors who will be
- * integrating the JMS API into their application server products.
- * 
- * 
- * @see javax.jms.Session
- * @see javax.jms.QueueSession
- * @see javax.jms.TopicSession
- * @see javax.jms.XASession
- */
-public class ActiveMQSession implements Session, QueueSession, TopicSession, StatsCapable, ActiveMQDispatcher {
-	
-	/**
-	 * Only acknowledge an individual message - using message.acknowledge()
-	 * as opposed to CLIENT_ACKNOWLEDGE which 
-	 * acknowledges all messages consumed by a session at when acknowledge()
-	 * is called
-	 */
-    public static final int INDIVIDUAL_ACKNOWLEDGE = 4;
-    public static final int MAX_ACK_CONSTANT = INDIVIDUAL_ACKNOWLEDGE;
-
-    public static interface DeliveryListener {
-        void beforeDelivery(ActiveMQSession session, Message msg);
-
-        void afterDelivery(ActiveMQSession session, Message msg);
-    }
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQSession.class);
-    private final Scheduler scheduler;
-    private final ThreadPoolExecutor connectionExecutor;
-
-    protected int acknowledgementMode;
-    protected final ActiveMQConnection connection;
-    protected final SessionInfo info;
-    protected final LongSequenceGenerator consumerIdGenerator = new LongSequenceGenerator();
-    protected final LongSequenceGenerator producerIdGenerator = new LongSequenceGenerator();
-    protected final LongSequenceGenerator deliveryIdGenerator = new LongSequenceGenerator();
-    protected final ActiveMQSessionExecutor executor;
-    protected final AtomicBoolean started = new AtomicBoolean(false);
-
-    protected final CopyOnWriteArrayList<ActiveMQMessageConsumer> consumers = new CopyOnWriteArrayList<ActiveMQMessageConsumer>();
-    protected final CopyOnWriteArrayList<ActiveMQMessageProducer> producers = new CopyOnWriteArrayList<ActiveMQMessageProducer>();
-
-    protected boolean closed;
-    private volatile boolean synchronizationRegistered;
-    protected boolean asyncDispatch;
-    protected boolean sessionAsyncDispatch;
-    protected final boolean debug;
-    protected Object sendMutex = new Object();
-
-    private MessageListener messageListener;
-    private final JMSSessionStatsImpl stats;
-    private TransactionContext transactionContext;
-    private DeliveryListener deliveryListener;
-    private MessageTransformer transformer;
-    private BlobTransferPolicy blobTransferPolicy;
-    private long lastDeliveredSequenceId;
-
-    /**
-     * Construct the Session
-     * 
-     * @param connection
-     * @param sessionId
-     * @param acknowledgeMode n.b if transacted - the acknowledgeMode ==
-     *                Session.SESSION_TRANSACTED
-     * @param asyncDispatch
-     * @param sessionAsyncDispatch
-     * @throws JMSException on internal error
-     */
-    protected ActiveMQSession(ActiveMQConnection connection, SessionId sessionId, int acknowledgeMode, boolean asyncDispatch, boolean sessionAsyncDispatch) throws JMSException {
-        this.debug = LOG.isDebugEnabled();
-        this.connection = connection;
-        this.acknowledgementMode = acknowledgeMode;
-        this.asyncDispatch = asyncDispatch;
-        this.sessionAsyncDispatch = sessionAsyncDispatch;
-        this.info = new SessionInfo(connection.getConnectionInfo(), sessionId.getValue());
-        setTransactionContext(new TransactionContext(connection));
-        stats = new JMSSessionStatsImpl(producers, consumers);
-        this.connection.asyncSendPacket(info);
-        setTransformer(connection.getTransformer());
-        setBlobTransferPolicy(connection.getBlobTransferPolicy());
-        this.scheduler=connection.getScheduler();
-        this.connectionExecutor=connection.getExecutor();
-        this.executor = new ActiveMQSessionExecutor(this);
-        connection.addSession(this);        
-        if (connection.isStarted()) {
-            start();
-        }
-
-    }
-
-    protected ActiveMQSession(ActiveMQConnection connection, SessionId sessionId, int acknowledgeMode, boolean asyncDispatch) throws JMSException {
-        this(connection, sessionId, acknowledgeMode, asyncDispatch, true);
-    }
-
-    /**
-     * Sets the transaction context of the session.
-     * 
-     * @param transactionContext - provides the means to control a JMS
-     *                transaction.
-     */
-    public void setTransactionContext(TransactionContext transactionContext) {
-        this.transactionContext = transactionContext;
-    }
-
-    /**
-     * Returns the transaction context of the session.
-     * 
-     * @return transactionContext - session's transaction context.
-     */
-    public TransactionContext getTransactionContext() {
-        return transactionContext;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.management.StatsCapable#getStats()
-     */
-    public StatsImpl getStats() {
-        return stats;
-    }
-
-    /**
-     * Returns the session's statistics.
-     * 
-     * @return stats - session's statistics.
-     */
-    public JMSSessionStatsImpl getSessionStats() {
-        return stats;
-    }
-
-    /**
-     * Creates a <CODE>BytesMessage</CODE> object. A <CODE>BytesMessage</CODE>
-     * object is used to send a message containing a stream of uninterpreted
-     * bytes.
-     * 
-     * @return the an ActiveMQBytesMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public BytesMessage createBytesMessage() throws JMSException {
-        ActiveMQBytesMessage message = new ActiveMQBytesMessage();
-        configureMessage(message);
-        return message;
-    }
-
-    /**
-     * Creates a <CODE>MapMessage</CODE> object. A <CODE>MapMessage</CODE>
-     * object is used to send a self-defining set of name-value pairs, where
-     * names are <CODE>String</CODE> objects and values are primitive values
-     * in the Java programming language.
-     * 
-     * @return an ActiveMQMapMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public MapMessage createMapMessage() throws JMSException {
-        ActiveMQMapMessage message = new ActiveMQMapMessage();
-        configureMessage(message);
-        return message;
-    }
-
-    /**
-     * Creates a <CODE>Message</CODE> object. The <CODE>Message</CODE>
-     * interface is the root interface of all JMS messages. A
-     * <CODE>Message</CODE> object holds all the standard message header
-     * information. It can be sent when a message containing only header
-     * information is sufficient.
-     * 
-     * @return an ActiveMQMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public Message createMessage() throws JMSException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        configureMessage(message);
-        return message;
-    }
-
-    /**
-     * Creates an <CODE>ObjectMessage</CODE> object. An
-     * <CODE>ObjectMessage</CODE> object is used to send a message that
-     * contains a serializable Java object.
-     * 
-     * @return an ActiveMQObjectMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public ObjectMessage createObjectMessage() throws JMSException {
-        ActiveMQObjectMessage message = new ActiveMQObjectMessage();
-        configureMessage(message);
-        return message;
-    }
-
-    /**
-     * Creates an initialized <CODE>ObjectMessage</CODE> object. An
-     * <CODE>ObjectMessage</CODE> object is used to send a message that
-     * contains a serializable Java object.
-     * 
-     * @param object the object to use to initialize this message
-     * @return an ActiveMQObjectMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public ObjectMessage createObjectMessage(Serializable object) throws JMSException {
-        ActiveMQObjectMessage message = new ActiveMQObjectMessage();
-        configureMessage(message);
-        message.setObject(object);
-        return message;
-    }
-
-    /**
-     * Creates a <CODE>StreamMessage</CODE> object. A
-     * <CODE>StreamMessage</CODE> object is used to send a self-defining
-     * stream of primitive values in the Java programming language.
-     * 
-     * @return an ActiveMQStreamMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public StreamMessage createStreamMessage() throws JMSException {
-        ActiveMQStreamMessage message = new ActiveMQStreamMessage();
-        configureMessage(message);
-        return message;
-    }
-
-    /**
-     * Creates a <CODE>TextMessage</CODE> object. A <CODE>TextMessage</CODE>
-     * object is used to send a message containing a <CODE>String</CODE>
-     * object.
-     * 
-     * @return an ActiveMQTextMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public TextMessage createTextMessage() throws JMSException {
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-        configureMessage(message);
-        return message;
-    }
-
-    /**
-     * Creates an initialized <CODE>TextMessage</CODE> object. A
-     * <CODE>TextMessage</CODE> object is used to send a message containing a
-     * <CODE>String</CODE>.
-     * 
-     * @param text the string used to initialize this message
-     * @return an ActiveMQTextMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public TextMessage createTextMessage(String text) throws JMSException {
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-        message.setText(text);
-        configureMessage(message);
-        return message;
-    }
-
-    /**
-     * Creates an initialized <CODE>BlobMessage</CODE> object. A
-     * <CODE>BlobMessage</CODE> object is used to send a message containing a
-     * <CODE>URL</CODE> which points to some network addressible BLOB.
-     * 
-     * @param url the network addressable URL used to pass directly to the
-     *                consumer
-     * @return a BlobMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public BlobMessage createBlobMessage(URL url) throws JMSException {
-        return createBlobMessage(url, false);
-    }
-
-    /**
-     * Creates an initialized <CODE>BlobMessage</CODE> object. A
-     * <CODE>BlobMessage</CODE> object is used to send a message containing a
-     * <CODE>URL</CODE> which points to some network addressible BLOB.
-     * 
-     * @param url the network addressable URL used to pass directly to the
-     *                consumer
-     * @param deletedByBroker indicates whether or not the resource is deleted
-     *                by the broker when the message is acknowledged
-     * @return a BlobMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public BlobMessage createBlobMessage(URL url, boolean deletedByBroker) throws JMSException {
-        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
-        configureMessage(message);
-        message.setURL(url);
-        message.setDeletedByBroker(deletedByBroker);
-        message.setBlobDownloader(new BlobDownloader(getBlobTransferPolicy()));
-        return message;
-    }
-
-    /**
-     * Creates an initialized <CODE>BlobMessage</CODE> object. A
-     * <CODE>BlobMessage</CODE> object is used to send a message containing
-     * the <CODE>File</CODE> content. Before the message is sent the file
-     * conent will be uploaded to the broker or some other remote repository
-     * depending on the {@link #getBlobTransferPolicy()}.
-     * 
-     * @param file the file to be uploaded to some remote repo (or the broker)
-     *                depending on the strategy
-     * @return a BlobMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public BlobMessage createBlobMessage(File file) throws JMSException {
-        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
-        configureMessage(message);
-        message.setBlobUploader(new BlobUploader(getBlobTransferPolicy(), file));
-        message.setBlobDownloader(new BlobDownloader((getBlobTransferPolicy())));
-        message.setDeletedByBroker(true);
-        message.setName(file.getName());
-        return message;
-    }
-
-    /**
-     * Creates an initialized <CODE>BlobMessage</CODE> object. A
-     * <CODE>BlobMessage</CODE> object is used to send a message containing
-     * the <CODE>File</CODE> content. Before the message is sent the file
-     * conent will be uploaded to the broker or some other remote repository
-     * depending on the {@link #getBlobTransferPolicy()}.
-     * 
-     * @param in the stream to be uploaded to some remote repo (or the broker)
-     *                depending on the strategy
-     * @return a BlobMessage
-     * @throws JMSException if the JMS provider fails to create this message due
-     *                 to some internal error.
-     */
-    public BlobMessage createBlobMessage(InputStream in) throws JMSException {
-        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
-        configureMessage(message);
-        message.setBlobUploader(new BlobUploader(getBlobTransferPolicy(), in));
-        message.setBlobDownloader(new BlobDownloader(getBlobTransferPolicy()));
-        message.setDeletedByBroker(true);
-        return message;
-    }
-
-    /**
-     * Indicates whether the session is in transacted mode.
-     * 
-     * @return true if the session is in transacted mode
-     * @throws JMSException if there is some internal error.
-     */
-    public boolean getTransacted() throws JMSException {
-        checkClosed();
-        return isTransacted();
-    }
-
-    /**
-     * Returns the acknowledgement mode of the session. The acknowledgement mode
-     * is set at the time that the session is created. If the session is
-     * transacted, the acknowledgement mode is ignored.
-     * 
-     * @return If the session is not transacted, returns the current
-     *         acknowledgement mode for the session. If the session is
-     *         transacted, returns SESSION_TRANSACTED.
-     * @throws JMSException
-     * @see javax.jms.Connection#createSession(boolean,int)
-     * @since 1.1 exception JMSException if there is some internal error.
-     */
-    public int getAcknowledgeMode() throws JMSException {
-        checkClosed();
-        return this.acknowledgementMode;
-    }
-
-    /**
-     * Commits all messages done in this transaction and releases any locks
-     * currently held.
-     * 
-     * @throws JMSException if the JMS provider fails to commit the transaction
-     *                 due to some internal error.
-     * @throws TransactionRolledBackException if the transaction is rolled back
-     *                 due to some internal error during commit.
-     * @throws javax.jms.IllegalStateException if the method is not called by a
-     *                 transacted session.
-     */
-    public void commit() throws JMSException {
-        checkClosed();
-        if (!getTransacted()) {
-            throw new javax.jms.IllegalStateException("Not a transacted session");
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(getSessionId() + " Transaction Commit :" + transactionContext.getTransactionId());
-        }
-        transactionContext.commit();
-    }
-
-    /**
-     * Rolls back any messages done in this transaction and releases any locks
-     * currently held.
-     * 
-     * @throws JMSException if the JMS provider fails to roll back the
-     *                 transaction due to some internal error.
-     * @throws javax.jms.IllegalStateException if the method is not called by a
-     *                 transacted session.
-     */
-    public void rollback() throws JMSException {
-        checkClosed();
-        if (!getTransacted()) {
-            throw new javax.jms.IllegalStateException("Not a transacted session");
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(getSessionId() + " Transaction Rollback");
-        }
-        transactionContext.rollback();
-    }
-
-    /**
-     * Closes the session.
-     * <P>
-     * Since a provider may allocate some resources on behalf of a session
-     * outside the JVM, clients should close the resources when they are not
-     * needed. Relying on garbage collection to eventually reclaim these
-     * resources may not be timely enough.
-     * <P>
-     * There is no need to close the producers and consumers of a closed
-     * session.
-     * <P>
-     * This call will block until a <CODE>receive</CODE> call or message
-     * listener in progress has completed. A blocked message consumer
-     * <CODE>receive</CODE> call returns <CODE>null</CODE> when this session
-     * is closed.
-     * <P>
-     * Closing a transacted session must roll back the transaction in progress.
-     * <P>
-     * This method is the only <CODE>Session</CODE> method that can be called
-     * concurrently.
-     * <P>
-     * Invoking any other <CODE>Session</CODE> method on a closed session must
-     * throw a <CODE> JMSException.IllegalStateException</CODE>. Closing a
-     * closed session must <I>not </I> throw an exception.
-     * 
-     * @throws JMSException if the JMS provider fails to close the session due
-     *                 to some internal error.
-     */
-    public void close() throws JMSException {
-        if (!closed) {
-            if (getTransactionContext().isInXATransaction()) {
-                if (!synchronizationRegistered) {
-                    synchronizationRegistered = true;
-                    getTransactionContext().addSynchronization(new Synchronization() {
-
-                                        @Override
-                                        public void afterCommit() throws Exception {
-                                            doClose();
-                                            synchronizationRegistered = false;
-                                        }
-
-                                        @Override
-                                        public void afterRollback() throws Exception {
-                                            doClose();
-                                            synchronizationRegistered = false;
-                                        }
-                                    });
-                }
-
-            } else {
-                doClose();
-            }
-        }
-    }
-
-    private void doClose() throws JMSException {
-        dispose();
-        RemoveInfo removeCommand = info.createRemoveCommand();
-        removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId);
-        connection.asyncSendPacket(removeCommand);
-    }
-
-    void clearMessagesInProgress() {
-        executor.clearMessagesInProgress();        
-        // we are called from inside the transport reconnection logic
-        // which involves us clearing all the connections' consumers
-        // dispatch and delivered lists. So rather than trying to 
-        // grab a mutex (which could be already owned by the message 
-        // listener calling the send or an ack) we allow it to complete in 
-        // a separate thread via the scheduler and notify us via 
-        // connection.transportInterruptionProcessingComplete()
-        //
-        for (final ActiveMQMessageConsumer consumer : consumers) {
-            consumer.inProgressClearRequired();
-            scheduler.executeAfterDelay(new Runnable() {
-                public void run() {
-                    consumer.clearMessagesInProgress();
-                }}, 0l);
-        }
-    }
-
-    void deliverAcks() {
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer consumer = iter.next();
-            consumer.deliverAcks();
-        }
-    }
-
-    public synchronized void dispose() throws JMSException {
-        if (!closed) {
-
-            try {
-                executor.stop();
-
-                for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-                    ActiveMQMessageConsumer consumer = iter.next();
-                    consumer.setFailureError(connection.getFirstFailureError());
-                    consumer.dispose();
-                    lastDeliveredSequenceId = Math.max(lastDeliveredSequenceId, consumer.getLastDeliveredSequenceId());
-                }
-                consumers.clear();
-
-                for (Iterator<ActiveMQMessageProducer> iter = producers.iterator(); iter.hasNext();) {
-                    ActiveMQMessageProducer producer = iter.next();
-                    producer.dispose();
-                }
-                producers.clear();
-
-                try {
-                    if (getTransactionContext().isInLocalTransaction()) {
-                        rollback();
-                    }
-                } catch (JMSException e) {
-                }
-
-            } finally {
-                connection.removeSession(this);
-                this.transactionContext = null;
-                closed = true;
-            }
-        }
-    }
-
-    /**
-     * Checks that the session is not closed then configures the message
-     */
-    protected void configureMessage(ActiveMQMessage message) throws IllegalStateException {
-        checkClosed();
-        message.setConnection(connection);
-    }
-
-    /**
-     * Check if the session is closed. It is used for ensuring that the session
-     * is open before performing various operations.
-     * 
-     * @throws IllegalStateException if the Session is closed
-     */
-    protected void checkClosed() throws IllegalStateException {
-        if (closed) {
-            throw new IllegalStateException("The Session is closed");
-        }
-    }
-
-    /**
-     * Stops message delivery in this session, and restarts message delivery
-     * with the oldest unacknowledged message.
-     * <P>
-     * All consumers deliver messages in a serial order. Acknowledging a
-     * received message automatically acknowledges all messages that have been
-     * delivered to the client.
-     * <P>
-     * Restarting a session causes it to take the following actions:
-     * <UL>
-     * <LI>Stop message delivery
-     * <LI>Mark all messages that might have been delivered but not
-     * acknowledged as "redelivered"
-     * <LI>Restart the delivery sequence including all unacknowledged messages
-     * that had been previously delivered. Redelivered messages do not have to
-     * be delivered in exactly their original delivery order.
-     * </UL>
-     * 
-     * @throws JMSException if the JMS provider fails to stop and restart
-     *                 message delivery due to some internal error.
-     * @throws IllegalStateException if the method is called by a transacted
-     *                 session.
-     */
-    public void recover() throws JMSException {
-
-        checkClosed();
-        if (getTransacted()) {
-            throw new IllegalStateException("This session is transacted");
-        }
-
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            c.rollback();
-        }
-
-    }
-
-    /**
-     * Returns the session's distinguished message listener (optional).
-     * 
-     * @return the message listener associated with this session
-     * @throws JMSException if the JMS provider fails to get the message
-     *                 listener due to an internal error.
-     * @see javax.jms.Session#setMessageListener(javax.jms.MessageListener)
-     * @see javax.jms.ServerSessionPool
-     * @see javax.jms.ServerSession
-     */
-    public MessageListener getMessageListener() throws JMSException {
-        checkClosed();
-        return this.messageListener;
-    }
-
-    /**
-     * Sets the session's distinguished message listener (optional).
-     * <P>
-     * When the distinguished message listener is set, no other form of message
-     * receipt in the session can be used; however, all forms of sending
-     * messages are still supported.
-     * <P>
-     * This is an expert facility not used by regular JMS clients.
-     * 
-     * @param listener the message listener to associate with this session
-     * @throws JMSException if the JMS provider fails to set the message
-     *                 listener due to an internal error.
-     * @see javax.jms.Session#getMessageListener()
-     * @see javax.jms.ServerSessionPool
-     * @see javax.jms.ServerSession
-     */
-    public void setMessageListener(MessageListener listener) throws JMSException {
-        checkClosed();
-        this.messageListener = listener;
-
-        if (listener != null) {
-            executor.setDispatchedBySessionPool(true);
-        }
-    }
-
-    /**
-     * Optional operation, intended to be used only by Application Servers, not
-     * by ordinary JMS clients.
-     * 
-     * @see javax.jms.ServerSession
-     */
-    public void run() {
-        MessageDispatch messageDispatch;
-        while ((messageDispatch = executor.dequeueNoWait()) != null) {
-            final MessageDispatch md = messageDispatch;
-            ActiveMQMessage message = (ActiveMQMessage)md.getMessage();
-            if (message.isExpired() || connection.isDuplicate(ActiveMQSession.this, message)) {
-                // TODO: Ack it without delivery to client
-                continue;
-            }
-
-            if (isClientAcknowledge()||isIndividualAcknowledge()) {
-                message.setAcknowledgeCallback(new Callback() {
-                    public void execute() throws Exception {
-                    }
-                });
-            }
-
-            if (deliveryListener != null) {
-                deliveryListener.beforeDelivery(this, message);
-            }
-
-            md.setDeliverySequenceId(getNextDeliveryId());
-
-            try {
-                messageListener.onMessage(message);
-            } catch (RuntimeException e) {
-                LOG.error("error dispatching message: ", e);
-                // A problem while invoking the MessageListener does not
-                // in general indicate a problem with the connection to the broker, i.e.
-                // it will usually be sufficient to let the afterDelivery() method either
-                // commit or roll back in order to deal with the exception.
-                // However, we notify any registered client internal exception listener
-                // of the problem.
-                connection.onClientInternalException(e);
-            }
-
-            try {
-                MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1);
-                ack.setFirstMessageId(md.getMessage().getMessageId());
-                doStartTransaction();
-                ack.setTransactionId(getTransactionContext().getTransactionId());
-                if (ack.getTransactionId() != null) {
-                    getTransactionContext().addSynchronization(new Synchronization() {
-
-                        @Override
-                        public void afterRollback() throws Exception {
-                            md.getMessage().onMessageRolledBack();
-                            // ensure we don't filter this as a duplicate
-                            connection.rollbackDuplicate(ActiveMQSession.this, md.getMessage());
-                            RedeliveryPolicy redeliveryPolicy = connection.getRedeliveryPolicy();
-                            int redeliveryCounter = md.getMessage().getRedeliveryCounter();
-                            if (redeliveryPolicy.getMaximumRedeliveries() != RedeliveryPolicy.NO_MAXIMUM_REDELIVERIES
-                                && redeliveryCounter > redeliveryPolicy.getMaximumRedeliveries()) {
-                                // We need to NACK the messages so that they get
-                                // sent to the
-                                // DLQ.
-                                // Acknowledge the last message.
-                                MessageAck ack = new MessageAck(md, MessageAck.POSION_ACK_TYPE, 1);
-                                ack.setFirstMessageId(md.getMessage().getMessageId());
-                                asyncSendPacket(ack);
-                            } else {
-                                
-                                MessageAck ack = new MessageAck(md, MessageAck.REDELIVERED_ACK_TYPE, 1);
-                                ack.setFirstMessageId(md.getMessage().getMessageId());
-                                asyncSendPacket(ack);
-
-                                // Figure out how long we should wait to resend
-                                // this message.
-                                long redeliveryDelay = redeliveryPolicy.getInitialRedeliveryDelay();
-                                for (int i = 0; i < redeliveryCounter; i++) {
-                                    redeliveryDelay = redeliveryPolicy.getNextRedeliveryDelay(redeliveryDelay);
-                                }
-                                scheduler.executeAfterDelay(new Runnable() {
-
-                                    public void run() {
-                                        ((ActiveMQDispatcher)md.getConsumer()).dispatch(md);
-                                    }
-                                }, redeliveryDelay);
-                            }
-                        }
-                    });
-                }
-                asyncSendPacket(ack);
-            } catch (Throwable e) {
-                connection.onClientInternalException(e);
-            }
-
-            if (deliveryListener != null) {
-                deliveryListener.afterDelivery(this, message);
-            }
-        }
-    }
-
-    /**
-     * Creates a <CODE>MessageProducer</CODE> to send messages to the
-     * specified destination.
-     * <P>
-     * A client uses a <CODE>MessageProducer</CODE> object to send messages to
-     * a destination. Since <CODE>Queue </CODE> and <CODE>Topic</CODE> both
-     * inherit from <CODE>Destination</CODE>, they can be used in the
-     * destination parameter to create a <CODE>MessageProducer</CODE> object.
-     * 
-     * @param destination the <CODE>Destination</CODE> to send to, or null if
-     *                this is a producer which does not have a specified
-     *                destination.
-     * @return the MessageProducer
-     * @throws JMSException if the session fails to create a MessageProducer due
-     *                 to some internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified.
-     * @since 1.1
-     */
-    public MessageProducer createProducer(Destination destination) throws JMSException {
-        checkClosed();
-        if (destination instanceof CustomDestination) {
-            CustomDestination customDestination = (CustomDestination)destination;
-            return customDestination.createProducer(this);
-        }
-        int timeSendOut = connection.getSendTimeout();
-        return new ActiveMQMessageProducer(this, getNextProducerId(), ActiveMQMessageTransformation.transformDestination(destination),timeSendOut);
-    }
-
-    /**
-     * Creates a <CODE>MessageConsumer</CODE> for the specified destination.
-     * Since <CODE>Queue</CODE> and <CODE> Topic</CODE> both inherit from
-     * <CODE>Destination</CODE>, they can be used in the destination
-     * parameter to create a <CODE>MessageConsumer</CODE>.
-     * 
-     * @param destination the <CODE>Destination</CODE> to access.
-     * @return the MessageConsumer
-     * @throws JMSException if the session fails to create a consumer due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified.
-     * @since 1.1
-     */
-    public MessageConsumer createConsumer(Destination destination) throws JMSException {
-        return createConsumer(destination, (String) null);
-    }
-
-    /**
-     * Creates a <CODE>MessageConsumer</CODE> for the specified destination,
-     * using a message selector. Since <CODE> Queue</CODE> and
-     * <CODE>Topic</CODE> both inherit from <CODE>Destination</CODE>, they
-     * can be used in the destination parameter to create a
-     * <CODE>MessageConsumer</CODE>.
-     * <P>
-     * A client uses a <CODE>MessageConsumer</CODE> object to receive messages
-     * that have been sent to a destination.
-     * 
-     * @param destination the <CODE>Destination</CODE> to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @return the MessageConsumer
-     * @throws JMSException if the session fails to create a MessageConsumer due
-     *                 to some internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified.
-     * @throws InvalidSelectorException if the message selector is invalid.
-     * @since 1.1
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException {
-        return createConsumer(destination, messageSelector, false);
-    }
-
-    /**
-     * Creates a <CODE>MessageConsumer</CODE> for the specified destination.
-     * Since <CODE>Queue</CODE> and <CODE> Topic</CODE> both inherit from
-     * <CODE>Destination</CODE>, they can be used in the destination
-     * parameter to create a <CODE>MessageConsumer</CODE>.
-     *
-     * @param destination the <CODE>Destination</CODE> to access.
-     * @param messageListener the listener to use for async consumption of messages
-     * @return the MessageConsumer
-     * @throws JMSException if the session fails to create a consumer due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified.
-     * @since 1.1
-     */
-    public MessageConsumer createConsumer(Destination destination, MessageListener messageListener) throws JMSException {
-        return createConsumer(destination, null, messageListener);
-    }
-
-    /**
-     * Creates a <CODE>MessageConsumer</CODE> for the specified destination,
-     * using a message selector. Since <CODE> Queue</CODE> and
-     * <CODE>Topic</CODE> both inherit from <CODE>Destination</CODE>, they
-     * can be used in the destination parameter to create a
-     * <CODE>MessageConsumer</CODE>.
-     * <P>
-     * A client uses a <CODE>MessageConsumer</CODE> object to receive messages
-     * that have been sent to a destination.
-     *
-     * @param destination the <CODE>Destination</CODE> to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param messageListener the listener to use for async consumption of messages
-     * @return the MessageConsumer
-     * @throws JMSException if the session fails to create a MessageConsumer due
-     *                 to some internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified.
-     * @throws InvalidSelectorException if the message selector is invalid.
-     * @since 1.1
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector, MessageListener messageListener) throws JMSException {
-        return createConsumer(destination, messageSelector, false, messageListener);
-    }
-
-    /**
-     * Creates <CODE>MessageConsumer</CODE> for the specified destination,
-     * using a message selector. This method can specify whether messages
-     * published by its own connection should be delivered to it, if the
-     * destination is a topic.
-     * <P>
-     * Since <CODE>Queue</CODE> and <CODE>Topic</CODE> both inherit from
-     * <CODE>Destination</CODE>, they can be used in the destination
-     * parameter to create a <CODE>MessageConsumer</CODE>.
-     * <P>
-     * A client uses a <CODE>MessageConsumer</CODE> object to receive messages
-     * that have been published to a destination.
-     * <P>
-     * In some cases, a connection may both publish and subscribe to a topic.
-     * The consumer <CODE>NoLocal</CODE> attribute allows a consumer to
-     * inhibit the delivery of messages published by its own connection. The
-     * default value for this attribute is False. The <CODE>noLocal</CODE>
-     * value must be supported by destinations that are topics.
-     * 
-     * @param destination the <CODE>Destination</CODE> to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param noLocal - if true, and the destination is a topic, inhibits the
-     *                delivery of messages published by its own connection. The
-     *                behavior for <CODE>NoLocal</CODE> is not specified if
-     *                the destination is a queue.
-     * @return the MessageConsumer
-     * @throws JMSException if the session fails to create a MessageConsumer due
-     *                 to some internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified.
-     * @throws InvalidSelectorException if the message selector is invalid.
-     * @since 1.1
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException {
-        return createConsumer(destination, messageSelector, noLocal, null);
-    }
-
-    /**
-     * Creates <CODE>MessageConsumer</CODE> for the specified destination,
-     * using a message selector. This method can specify whether messages
-     * published by its own connection should be delivered to it, if the
-     * destination is a topic.
-     * <P>
-     * Since <CODE>Queue</CODE> and <CODE>Topic</CODE> both inherit from
-     * <CODE>Destination</CODE>, they can be used in the destination
-     * parameter to create a <CODE>MessageConsumer</CODE>.
-     * <P>
-     * A client uses a <CODE>MessageConsumer</CODE> object to receive messages
-     * that have been published to a destination.
-     * <P>
-     * In some cases, a connection may both publish and subscribe to a topic.
-     * The consumer <CODE>NoLocal</CODE> attribute allows a consumer to
-     * inhibit the delivery of messages published by its own connection. The
-     * default value for this attribute is False. The <CODE>noLocal</CODE>
-     * value must be supported by destinations that are topics.
-     *
-     * @param destination the <CODE>Destination</CODE> to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param noLocal - if true, and the destination is a topic, inhibits the
-     *                delivery of messages published by its own connection. The
-     *                behavior for <CODE>NoLocal</CODE> is not specified if
-     *                the destination is a queue.
-     * @param messageListener the listener to use for async consumption of messages
-     * @return the MessageConsumer
-     * @throws JMSException if the session fails to create a MessageConsumer due
-     *                 to some internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified.
-     * @throws InvalidSelectorException if the message selector is invalid.
-     * @since 1.1
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal, MessageListener messageListener) throws JMSException {
-        checkClosed();
-
-        if (destination instanceof CustomDestination) {
-            CustomDestination customDestination = (CustomDestination)destination;
-            return customDestination.createConsumer(this, messageSelector, noLocal);
-        }
-
-        ActiveMQPrefetchPolicy prefetchPolicy = connection.getPrefetchPolicy();
-        int prefetch = 0;
-        if (destination instanceof Topic) {
-            prefetch = prefetchPolicy.getTopicPrefetch();
-        } else {
-            prefetch = prefetchPolicy.getQueuePrefetch();
-        }
-        ActiveMQDestination activemqDestination = ActiveMQMessageTransformation.transformDestination(destination);
-        return new ActiveMQMessageConsumer(this, getNextConsumerId(), activemqDestination, null, messageSelector,
-                prefetch, prefetchPolicy.getMaximumPendingMessageLimit(), noLocal, false, isAsyncDispatch(), messageListener);
-    }
-
-    /**
-     * Creates a queue identity given a <CODE>Queue</CODE> name.
-     * <P>
-     * This facility is provided for the rare cases where clients need to
-     * dynamically manipulate queue identity. It allows the creation of a queue
-     * identity with a provider-specific name. Clients that depend on this
-     * ability are not portable.
-     * <P>
-     * Note that this method is not for creating the physical queue. The
-     * physical creation of queues is an administrative task and is not to be
-     * initiated by the JMS API. The one exception is the creation of temporary
-     * queues, which is accomplished with the <CODE>createTemporaryQueue</CODE>
-     * method.
-     * 
-     * @param queueName the name of this <CODE>Queue</CODE>
-     * @return a <CODE>Queue</CODE> with the given name
-     * @throws JMSException if the session fails to create a queue due to some
-     *                 internal error.
-     * @since 1.1
-     */
-    public Queue createQueue(String queueName) throws JMSException {
-        checkClosed();
-        if (queueName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) {
-            return new ActiveMQTempQueue(queueName);
-        }
-        return new ActiveMQQueue(queueName);
-    }
-
-    /**
-     * Creates a topic identity given a <CODE>Topic</CODE> name.
-     * <P>
-     * This facility is provided for the rare cases where clients need to
-     * dynamically manipulate topic identity. This allows the creation of a
-     * topic identity with a provider-specific name. Clients that depend on this
-     * ability are not portable.
-     * <P>
-     * Note that this method is not for creating the physical topic. The
-     * physical creation of topics is an administrative task and is not to be
-     * initiated by the JMS API. The one exception is the creation of temporary
-     * topics, which is accomplished with the <CODE>createTemporaryTopic</CODE>
-     * method.
-     * 
-     * @param topicName the name of this <CODE>Topic</CODE>
-     * @return a <CODE>Topic</CODE> with the given name
-     * @throws JMSException if the session fails to create a topic due to some
-     *                 internal error.
-     * @since 1.1
-     */
-    public Topic createTopic(String topicName) throws JMSException {
-        checkClosed();
-        if (topicName.startsWith(ActiveMQDestination.TEMP_DESTINATION_NAME_PREFIX)) {
-            return new ActiveMQTempTopic(topicName);
-        }
-        return new ActiveMQTopic(topicName);
-    }
-
-    /**
-     * Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on
-     * the specified queue.
-     * 
-     * @param queue the <CODE>queue</CODE> to access
-     * @exception InvalidDestinationException if an invalid destination is
-     *                    specified
-     * @since 1.1
-     */
-    /**
-     * Creates a durable subscriber to the specified topic.
-     * <P>
-     * If a client needs to receive all the messages published on a topic,
-     * including the ones published while the subscriber is inactive, it uses a
-     * durable <CODE>TopicSubscriber</CODE>. The JMS provider retains a
-     * record of this durable subscription and insures that all messages from
-     * the topic's publishers are retained until they are acknowledged by this
-     * durable subscriber or they have expired.
-     * <P>
-     * Sessions with durable subscribers must always provide the same client
-     * identifier. In addition, each client must specify a name that uniquely
-     * identifies (within client identifier) each durable subscription it
-     * creates. Only one session at a time can have a
-     * <CODE>TopicSubscriber</CODE> for a particular durable subscription.
-     * <P>
-     * A client can change an existing durable subscription by creating a
-     * durable <CODE>TopicSubscriber</CODE> with the same name and a new topic
-     * and/or message selector. Changing a durable subscriber is equivalent to
-     * unsubscribing (deleting) the old one and creating a new one.
-     * <P>
-     * In some cases, a connection may both publish and subscribe to a topic.
-     * The subscriber <CODE>NoLocal</CODE> attribute allows a subscriber to
-     * inhibit the delivery of messages published by its own connection. The
-     * default value for this attribute is false.
-     * 
-     * @param topic the non-temporary <CODE>Topic</CODE> to subscribe to
-     * @param name the name used to identify this subscription
-     * @return the TopicSubscriber
-     * @throws JMSException if the session fails to create a subscriber due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid topic is specified.
-     * @since 1.1
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException {
-        checkClosed();
-        return createDurableSubscriber(topic, name, null, false);
-    }
-
-    /**
-     * Creates a durable subscriber to the specified topic, using a message
-     * selector and specifying whether messages published by its own connection
-     * should be delivered to it.
-     * <P>
-     * If a client needs to receive all the messages published on a topic,
-     * including the ones published while the subscriber is inactive, it uses a
-     * durable <CODE>TopicSubscriber</CODE>. The JMS provider retains a
-     * record of this durable subscription and insures that all messages from
-     * the topic's publishers are retained until they are acknowledged by this
-     * durable subscriber or they have expired.
-     * <P>
-     * Sessions with durable subscribers must always provide the same client
-     * identifier. In addition, each client must specify a name which uniquely
-     * identifies (within client identifier) each durable subscription it
-     * creates. Only one session at a time can have a
-     * <CODE>TopicSubscriber</CODE> for a particular durable subscription. An
-     * inactive durable subscriber is one that exists but does not currently
-     * have a message consumer associated with it.
-     * <P>
-     * A client can change an existing durable subscription by creating a
-     * durable <CODE>TopicSubscriber</CODE> with the same name and a new topic
-     * and/or message selector. Changing a durable subscriber is equivalent to
-     * unsubscribing (deleting) the old one and creating a new one.
-     * 
-     * @param topic the non-temporary <CODE>Topic</CODE> to subscribe to
-     * @param name the name used to identify this subscription
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param noLocal if set, inhibits the delivery of messages published by its
-     *                own connection
-     * @return the Queue Browser
-     * @throws JMSException if the session fails to create a subscriber due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid topic is specified.
-     * @throws InvalidSelectorException if the message selector is invalid.
-     * @since 1.1
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
-        checkClosed();
-
-        if (topic instanceof CustomDestination) {
-            CustomDestination customDestination = (CustomDestination)topic;
-            return customDestination.createDurableSubscriber(this, name, messageSelector, noLocal);
-        }
-
-        connection.checkClientIDWasManuallySpecified();
-        ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy();
-        int prefetch = isAutoAcknowledge() && connection.isOptimizedMessageDispatch() ? prefetchPolicy.getOptimizeDurableTopicPrefetch() : prefetchPolicy.getDurableTopicPrefetch();
-        int maxPrendingLimit = prefetchPolicy.getMaximumPendingMessageLimit();
-        return new ActiveMQTopicSubscriber(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(topic), name, messageSelector, prefetch, maxPrendingLimit,
-                                           noLocal, false, asyncDispatch);
-    }
-
-    /**
-     * Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on
-     * the specified queue.
-     * 
-     * @param queue the <CODE>queue</CODE> to access
-     * @return the Queue Browser
-     * @throws JMSException if the session fails to create a browser due to some
-     *                 internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified
-     * @since 1.1
-     */
-    public QueueBrowser createBrowser(Queue queue) throws JMSException {
-        checkClosed();
-        return createBrowser(queue, null);
-    }
-
-    /**
-     * Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on
-     * the specified queue using a message selector.
-     * 
-     * @param queue the <CODE>queue</CODE> to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @return the Queue Browser
-     * @throws JMSException if the session fails to create a browser due to some
-     *                 internal error.
-     * @throws InvalidDestinationException if an invalid destination is
-     *                 specified
-     * @throws InvalidSelectorException if the message selector is invalid.
-     * @since 1.1
-     */
-    public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException {
-        checkClosed();
-        return new ActiveMQQueueBrowser(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(queue), messageSelector, asyncDispatch);
-    }
-
-    /**
-     * Creates a <CODE>TemporaryQueue</CODE> object. Its lifetime will be that
-     * of the <CODE>Connection</CODE> unless it is deleted earlier.
-     * 
-     * @return a temporary queue identity
-     * @throws JMSException if the session fails to create a temporary queue due
-     *                 to some internal error.
-     * @since 1.1
-     */
-    public TemporaryQueue createTemporaryQueue() throws JMSException {
-        checkClosed();
-        return (TemporaryQueue)connection.createTempDestination(false);
-    }
-
-    /**
-     * Creates a <CODE>TemporaryTopic</CODE> object. Its lifetime will be that
-     * of the <CODE>Connection</CODE> unless it is deleted earlier.
-     * 
-     * @return a temporary topic identity
-     * @throws JMSException if the session fails to create a temporary topic due
-     *                 to some internal error.
-     * @since 1.1
-     */
-    public TemporaryTopic createTemporaryTopic() throws JMSException {
-        checkClosed();
-        return (TemporaryTopic)connection.createTempDestination(true);
-    }
-
-    /**
-     * Creates a <CODE>QueueReceiver</CODE> object to receive messages from
-     * the specified queue.
-     * 
-     * @param queue the <CODE>Queue</CODE> to access
-     * @return
-     * @throws JMSException if the session fails to create a receiver due to
-     *                 some internal error.
-     * @throws JMSException
-     * @throws InvalidDestinationException if an invalid queue is specified.
-     */
-    public QueueReceiver createReceiver(Queue queue) throws JMSException {
-        checkClosed();
-        return createReceiver(queue, null);
-    }
-
-    /**
-     * Creates a <CODE>QueueReceiver</CODE> object to receive messages from
-     * the specified queue using a message selector.
-     * 
-     * @param queue the <CODE>Queue</CODE> to access
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @return QueueReceiver
-     * @throws JMSException if the session fails to create a receiver due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid queue is specified.
-     * @throws InvalidSelectorException if the message selector is invalid.
-     */
-    public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException {
-        checkClosed();
-
-        if (queue instanceof CustomDestination) {
-            CustomDestination customDestination = (CustomDestination)queue;
-            return customDestination.createReceiver(this, messageSelector);
-        }
-
-        ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy();
-        return new ActiveMQQueueReceiver(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(queue), messageSelector, prefetchPolicy.getQueuePrefetch(),
-                                         prefetchPolicy.getMaximumPendingMessageLimit(), asyncDispatch);
-    }
-
-    /**
-     * Creates a <CODE>QueueSender</CODE> object to send messages to the
-     * specified queue.
-     * 
-     * @param queue the <CODE>Queue</CODE> to access, or null if this is an
-     *                unidentified producer
-     * @return QueueSender
-     * @throws JMSException if the session fails to create a sender due to some
-     *                 internal error.
-     * @throws InvalidDestinationException if an invalid queue is specified.
-     */
-    public QueueSender createSender(Queue queue) throws JMSException {
-        checkClosed();
-        if (queue instanceof CustomDestination) {
-            CustomDestination customDestination = (CustomDestination)queue;
-            return customDestination.createSender(this);
-        }
-        int timeSendOut = connection.getSendTimeout();
-        return new ActiveMQQueueSender(this, ActiveMQMessageTransformation.transformDestination(queue),timeSendOut);
-    }
-
-    /**
-     * Creates a nondurable subscriber to the specified topic. <p/>
-     * <P>
-     * A client uses a <CODE>TopicSubscriber</CODE> object to receive messages
-     * that have been published to a topic. <p/>
-     * <P>
-     * Regular <CODE>TopicSubscriber</CODE> objects are not durable. They
-     * receive only messages that are published while they are active. <p/>
-     * <P>
-     * In some cases, a connection may both publish and subscribe to a topic.
-     * The subscriber <CODE>NoLocal</CODE> attribute allows a subscriber to
-     * inhibit the delivery of messages published by its own connection. The
-     * default value for this attribute is false.
-     * 
-     * @param topic the <CODE>Topic</CODE> to subscribe to
-     * @return TopicSubscriber
-     * @throws JMSException if the session fails to create a subscriber due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid topic is specified.
-     */
-    public TopicSubscriber createSubscriber(Topic topic) throws JMSException {
-        checkClosed();
-        return createSubscriber(topic, null, false);
-    }
-
-    /**
-     * Creates a nondurable subscriber to the specified topic, using a message
-     * selector or specifying whether messages published by its own connection
-     * should be delivered to it. <p/>
-     * <P>
-     * A client uses a <CODE>TopicSubscriber</CODE> object to receive messages
-     * that have been published to a topic. <p/>
-     * <P>
-     * Regular <CODE>TopicSubscriber</CODE> objects are not durable. They
-     * receive only messages that are published while they are active. <p/>
-     * <P>
-     * Messages filtered out by a subscriber's message selector will never be
-     * delivered to the subscriber. From the subscriber's perspective, they do
-     * not exist. <p/>
-     * <P>
-     * In some cases, a connection may both publish and subscribe to a topic.
-     * The subscriber <CODE>NoLocal</CODE> attribute allows a subscriber to
-     * inhibit the delivery of messages published by its own connection. The
-     * default value for this attribute is false.
-     * 
-     * @param topic the <CODE>Topic</CODE> to subscribe to
-     * @param messageSelector only messages with properties matching the message
-     *                selector expression are delivered. A value of null or an
-     *                empty string indicates that there is no message selector
-     *                for the message consumer.
-     * @param noLocal if set, inhibits the delivery of messages published by its
-     *                own connection
-     * @return TopicSubscriber
-     * @throws JMSException if the session fails to create a subscriber due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid topic is specified.
-     * @throws InvalidSelectorException if the message selector is invalid.
-     */
-    public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException {
-        checkClosed();
-
-        if (topic instanceof CustomDestination) {
-            CustomDestination customDestination = (CustomDestination)topic;
-            return customDestination.createSubscriber(this, messageSelector, noLocal);
-        }
-
-        ActiveMQPrefetchPolicy prefetchPolicy = this.connection.getPrefetchPolicy();
-        return new ActiveMQTopicSubscriber(this, getNextConsumerId(), ActiveMQMessageTransformation.transformDestination(topic), null, messageSelector, prefetchPolicy
-            .getTopicPrefetch(), prefetchPolicy.getMaximumPendingMessageLimit(), noLocal, false, asyncDispatch);
-    }
-
-    /**
-     * Creates a publisher for the specified topic. <p/>
-     * <P>
-     * A client uses a <CODE>TopicPublisher</CODE> object to publish messages
-     * on a topic. Each time a client creates a <CODE>TopicPublisher</CODE> on
-     * a topic, it defines a new sequence of messages that have no ordering
-     * relationship with the messages it has previously sent.
-     * 
-     * @param topic the <CODE>Topic</CODE> to publish to, or null if this is
-     *                an unidentified producer
-     * @return TopicPublisher
-     * @throws JMSException if the session fails to create a publisher due to
-     *                 some internal error.
-     * @throws InvalidDestinationException if an invalid topic is specified.
-     */
-    public TopicPublisher createPublisher(Topic topic) throws JMSException {
-        checkClosed();
-
-        if (topic instanceof CustomDestination) {
-            CustomDestination customDestination = (CustomDestination)topic;
-            return customDestination.createPublisher(this);
-        }
-        int timeSendOut = connection.getSendTimeout();
-        return new ActiveMQTopicPublisher(this, ActiveMQMessageTransformation.transformDestination(topic),timeSendOut);
-    }
-
-    /**
-     * Unsubscribes a durable subscription that has been created by a client.
-     * <P>
-     * This method deletes the state being maintained on behalf of the
-     * subscriber by its provider.
-     * <P>
-     * It is erroneous for a client to delete a durable subscription while there
-     * is an active <CODE>MessageConsumer </CODE> or
-     * <CODE>TopicSubscriber</CODE> for the subscription, or while a consumed
-     * message is part of a pending transaction or has not been acknowledged in
-     * the session.
-     * 
-     * @param name the name used to identify this subscription
-     * @throws JMSException if the session fails to unsubscribe to the durable
-     *                 subscription due to some internal error.
-     * @throws InvalidDestinationException if an invalid subscription name is
-     *                 specified.
-     * @since 1.1
-     */
-    public void unsubscribe(String name) throws JMSException {
-        checkClosed();
-        connection.unsubscribe(name);
-    }
-
-    public void dispatch(MessageDispatch messageDispatch) {
-        try {
-            executor.execute(messageDispatch);
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            connection.onClientInternalException(e);
-        }
-    }
-
-    /**
-     * Acknowledges all consumed messages of the session of this consumed
-     * message.
-     * <P>
-     * All consumed JMS messages support the <CODE>acknowledge</CODE> method
-     * for use when a client has specified that its JMS session's consumed
-     * messages are to be explicitly acknowledged. By invoking
-     * <CODE>acknowledge</CODE> on a consumed message, a client acknowledges
-     * all messages consumed by the session that the message was delivered to.
-     * <P>
-     * Calls to <CODE>acknowledge</CODE> are ignored for both transacted
-     * sessions and sessions specified to use implicit acknowledgement modes.
-     * <P>
-     * A client may individually acknowledge each message as it is consumed, or
-     * it may choose to acknowledge messages as an application-defined group
-     * (which is done by calling acknowledge on the last received message of the
-     * group, thereby acknowledging all messages consumed by the session.)
-     * <P>
-     * Messages that have been received but not acknowledged may be redelivered.
-     * 
-     * @throws JMSException if the JMS provider fails to acknowledge the
-     *                 messages due to some internal error.
-     * @throws javax.jms.IllegalStateException if this method is called on a
-     *                 closed session.
-     * @see javax.jms.Session#CLIENT_ACKNOWLEDGE
-     */
-    public void acknowledge() throws JMSException {
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            c.acknowledge();
-        }
-    }
-
-    /**
-     * Add a message consumer.
-     * 
-     * @param consumer - message consumer.
-     * @throws JMSException
-     */
-    protected void addConsumer(ActiveMQMessageConsumer consumer) throws JMSException {
-        this.consumers.add(consumer);
-        if (consumer.isDurableSubscriber()) {
-            stats.onCreateDurableSubscriber();
-        }
-        this.connection.addDispatcher(consumer.getConsumerId(), this);
-    }
-
-    /**
-     * Remove the message consumer.
-     * 
-     * @param consumer - consumer to be removed.
-     * @throws JMSException
-     */
-    protected void removeConsumer(ActiveMQMessageConsumer consumer) {
-        this.connection.removeDispatcher(consumer.getConsumerId());
-        if (consumer.isDurableSubscriber()) {
-            stats.onRemoveDurableSubscriber();
-        }
-        this.consumers.remove(consumer);
-        this.connection.removeDispatcher(consumer);
-    }
-
-    /**
-     * Adds a message producer.
-     * 
-     * @param producer - message producer to be added.
-     * @throws JMSException
-     */
-    protected void addProducer(ActiveMQMessageProducer producer) throws JMSException {
-        this.producers.add(producer);
-        this.connection.addProducer(producer.getProducerInfo().getProducerId(), producer);
-    }
-
-    /**
-     * Removes a message producer.
-     * 
-     * @param producer - message producer to be removed.
-     * @throws JMSException
-     */
-    protected void removeProducer(ActiveMQMessageProducer producer) {
-        this.connection.removeProducer(producer.getProducerInfo().getProducerId());
-        this.producers.remove(producer);
-    }
-
-    /**
-     * Start this Session.
-     * 
-     * @throws JMSException
-     */
-    protected void start() throws JMSException {
-        started.set(true);
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            c.start();
-        }
-        executor.start();
-    }
-
-    /**
-     * Stops this session.
-     * 
-     * @throws JMSException
-     */
-    protected void stop() throws JMSException {
-
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            c.stop();
-        }
-
-        started.set(false);
-        executor.stop();
-    }
-
-    /**
-     * Returns the session id.
-     * 
-     * @return value - session id.
-     */
-    protected SessionId getSessionId() {
-        return info.getSessionId();
-    }
-
-    /**
-     * @return
-     */
-    protected ConsumerId getNextConsumerId() {
-        return new ConsumerId(info.getSessionId(), consumerIdGenerator.getNextSequenceId());
-    }
-
-    /**
-     * @return
-     */
-    protected ProducerId getNextProducerId() {
-        return new ProducerId(info.getSessionId(), producerIdGenerator.getNextSequenceId());
-    }
-
-    /**
-     * Sends the message for dispatch by the broker.
-     * 
-     * @param producer - message producer.
-     * @param destination - message destination.
-     * @param message - message to be sent.
-     * @param deliveryMode - JMS messsage delivery mode.
-     * @param priority - message priority.
-     * @param timeToLive - message expiration.
-     * @param producerWindow
-     * @throws JMSException
-     */
-    protected void send(ActiveMQMessageProducer producer, ActiveMQDestination destination, Message message, int deliveryMode, int priority, long timeToLive,
-                        MemoryUsage producerWindow, int sendTimeout) throws JMSException {
-
-        checkClosed();
-        if (destination.isTemporary() && connection.isDeleted(destination)) {
-            throw new InvalidDestinationException("Cannot publish to a deleted Destination: " + destination);
-        }
-        synchronized (sendMutex) {
-            // tell the Broker we are about to start a new transaction
-            doStartTransaction();
-            TransactionId txid = transactionContext.getTransactionId();
-            long sequenceNumber = producer.getMessageSequence();
-
-            //Set the "JMS" header fields on the original message, see 1.1 spec section 3.4.11
-            message.setJMSDeliveryMode(deliveryMode);
-            long expiration = 0L;
-            if (!producer.getDisableMessageTimestamp()) {
-                long timeStamp = System.currentTimeMillis();
-                message.setJMSTimestamp(timeStamp);
-                if (timeToLive > 0) {
-                    expiration = timeToLive + timeStamp;
-                }
-            }
-            message.setJMSExpiration(expiration);
-            message.setJMSPriority(priority);
-            message.setJMSRedelivered(false);
-
-            // transform to our own message format here
-            ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message, connection);
-
-            // Set the message id.
-            if (msg == message) {
-                msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber));
-            } else {
-                msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber));
-                message.setJMSMessageID(msg.getMessageId().toString());
-            }
-            //clear the brokerPath in case we are re-sending this message
-            msg.setBrokerPath(null);
-            // destination format is provider specific so only set on transformed message
-            msg.setJMSDestination(destination);
-
-            msg.setTransactionId(txid);
-            if (connection.isCopyMessageOnSend()) {
-                msg = (ActiveMQMessage)msg.copy();
-            }
-            msg.setConnection(connection);
-            msg.onSend();
-            msg.setProducerId(msg.getMessageId().getProducerId());
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(getSessionId() + " sending message: " + msg);
-            }
-            if (sendTimeout <= 0 && !msg.isResponseRequired() && !connection.isAlwaysSyncSend() && (!msg.isPersistent() || connection.isUseAsyncSend() || txid != null)) {
-                this.connection.asyncSendPacket(msg);
-                if (producerWindow != null) {
-                    // Since we defer lots of the marshaling till we hit the
-                    // wire, this might not
-                    // provide and accurate size. We may change over to doing
-                    // more aggressive marshaling,
-                    // to get more accurate sizes.. this is more important once
-                    // users start using producer window
-                    // flow control.
-                    int size = msg.getSize();
-                    producerWindow.increaseUsage(size);
-                }
-            } else {
-                if (sendTimeout > 0) {
-                    this.connection.syncSendPacket(msg,sendTimeout);
-                }else {
-                    this.connection.syncSendPacket(msg);
-                }
-            }
-
-        }
-    }
-
-    /**
-     * Send TransactionInfo to indicate transaction has started
-     * 
-     * @throws JMSException if some internal error occurs
-     */
-    protected void doStartTransaction() throws JMSException {
-        if (getTransacted() && !transactionContext.isInXATransaction()) {
-            transactionContext.begin();
-        }
-    }
-
-    /**
-     * Checks whether the session has unconsumed messages.
-     * 
-     * @return true - if there are unconsumed messages.
-     */
-    public boolean hasUncomsumedMessages() {
-        return executor.hasUncomsumedMessages();
-    }
-
-    /**
-     * Checks whether the session uses transactions.
-     * 
-     * @return true - if the session uses transactions.
-     */
-    public boolean isTransacted() {
-        return this.acknowledgementMode == Session.SESSION_TRANSACTED || (transactionContext.isInXATransaction());
-    }
-
-    /**
-     * Checks whether the session used client acknowledgment.
-     * 
-     * @return true - if the session uses client acknowledgment.
-     */
-    protected boolean isClientAcknowledge() {
-        return this.acknowledgementMode == Session.CLIENT_ACKNOWLEDGE;
-    }
-
-    /**
-     * Checks whether the session used auto acknowledgment.
-     * 
-     * @return true - if the session uses client acknowledgment.
-     */
-    public boolean isAutoAcknowledge() {
-        return acknowledgementMode == Session.AUTO_ACKNOWLEDGE;
-    }
-
-    /**
-     * Checks whether the session used dup ok acknowledgment.
-     * 
-     * @return true - if the session uses client acknowledgment.
-     */
-    public boolean isDupsOkAcknowledge() {
-        return acknowledgementMode == Session.DUPS_OK_ACKNOWLEDGE;
-    }
-    
-    public boolean isIndividualAcknowledge(){
-    	return acknowledgementMode == ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE;
-    }
-
-    /**
-     * Returns the message delivery listener.
-     * 
-     * @return deliveryListener - message delivery listener.
-     */
-    public DeliveryListener getDeliveryListener() {
-        return deliveryListener;
-    }
-
-    /**
-     * Sets the message delivery listener.
-     * 
-     * @param deliveryListener - message delivery listener.
-     */
-    public void setDeliveryListener(DeliveryListener deliveryListener) {
-        this.deliveryListener = deliveryListener;
-    }
-
-    /**
-     * Returns the SessionInfo bean.
-     * 
-     * @return info - SessionInfo bean.
-     * @throws JMSException
-     */
-    protected SessionInfo getSessionInfo() throws JMSException {
-        SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getValue());
-        return info;
-    }
-
-    /**
-     * Send the asynchronus command.
-     * 
-     * @param command - command to be executed.
-     * @throws JMSException
-     */
-    public void asyncSendPacket(Command command) throws JMSException {
-        connection.asyncSendPacket(command);
-    }
-
-    /**
-     * Send the synchronus command.
-     * 
-     * @param command - command to be executed.
-     * @return Response
-     * @throws JMSException
-     */
-    public Response syncSendPacket(Command command) throws JMSException {
-        return connection.syncSendPacket(command);
-    }
-
-    public long getNextDeliveryId() {
-        return deliveryIdGenerator.getNextSequenceId();
-    }
-
-    public void redispatch(ActiveMQDispatcher dispatcher, MessageDispatchChannel unconsumedMessages) throws JMSException {
-
-        List<MessageDispatch> c = unconsumedMessages.removeAll();
-        for (MessageDispatch md : c) {
-            this.connection.rollbackDuplicate(dispatcher, md.getMessage());
-        }
-        Collections.reverse(c);
-
-        for (Iterator<MessageDispatch> iter = c.iterator(); iter.hasNext();) {
-            MessageDispatch md = iter.next();
-            executor.executeFirst(md);
-        }
-
-    }
-
-    public boolean isRunning() {
-        return started.get();
-    }
-
-    public boolean isAsyncDispatch() {
-        return asyncDispatch;
-    }
-
-    public void setAsyncDispatch(boolean asyncDispatch) {
-        this.asyncDispatch = asyncDispatch;
-    }
-
-    /**
-     * @return Returns the sessionAsyncDispatch.
-     */
-    public boolean isSessionAsyncDispatch() {
-        return sessionAsyncDispatch;
-    }
-
-    /**
-     * @param sessionAsyncDispatch The sessionAsyncDispatch to set.
-     */
-    public void setSessionAsyncDispatch(boolean sessionAsyncDispatch) {
-        this.sessionAsyncDispatch = sessionAsyncDispatch;
-    }
-
-    public MessageTransformer getTransformer() {
-        return transformer;
-    }
-
-    public ActiveMQConnection getConnection() {
-        return connection;
-    }
-
-    /**
-     * Sets the transformer used to transform messages before they are sent on
-     * to the JMS bus or when they are received from the bus but before they are
-     * delivered to the JMS client
-     */
-    public void setTransformer(MessageTransformer transformer) {
-        this.transformer = transformer;
-    }
-
-    public BlobTransferPolicy getBlobTransferPolicy() {
-        return blobTransferPolicy;
-    }
-
-    /**
-     * Sets the policy used to describe how out-of-band BLOBs (Binary Large
-     * OBjects) are transferred from producers to brokers to consumers
-     */
-    public void setBlobTransferPolicy(BlobTransferPolicy blobTransferPolicy) {
-        this.blobTransferPolicy = blobTransferPolicy;
-    }
-
-    public List getUnconsumedMessages() {
-        return executor.getUnconsumedMessages();
-    }
-
-    @Override
-    public String toString() {
-        return "ActiveMQSession {id=" + info.getSessionId() + ",started=" + started.get() + "}";
-    }
-
-    public void checkMessageListener() throws JMSException {
-        if (messageListener != null) {
-            throw new IllegalStateException("Cannot synchronously receive a message when a MessageListener is set");
-        }
-        for (Iterator<ActiveMQMessageConsumer> i = consumers.iterator(); i.hasNext();) {
-            ActiveMQMessageConsumer consumer = i.next();
-            if (consumer.getMessageListener() != null) {
-                throw new IllegalStateException("Cannot synchronously receive a message when a MessageListener is set");
-            }
-        }
-    }
-
-    protected void setOptimizeAcknowledge(boolean value) {
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            c.setOptimizeAcknowledge(value);
-        }
-    }
-
-    protected void setPrefetchSize(ConsumerId id, int prefetch) {
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            if (c.getConsumerId().equals(id)) {
-                c.setPrefetchSize(prefetch);
-                break;
-            }
-        }
-    }
-
-    protected void close(ConsumerId id) {
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            if (c.getConsumerId().equals(id)) {
-                try {
-                    c.close();
-                } catch (JMSException e) {
-                    LOG.warn("Exception closing consumer", e);
-                }
-                LOG.warn("Closed consumer on Command");
-                break;
-            }
-        }
-    }
-
-    public boolean isInUse(ActiveMQTempDestination destination) {
-        for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-            ActiveMQMessageConsumer c = iter.next();
-            if (c.isInUse(destination)) {
-                return true;
-            }
-        }
-        return false;
-    }
-    
-    /**
-     * highest sequence id of the last message delivered by this session.
-     * Passed to the broker in the close command, maintained by dispose()
-     * @return lastDeliveredSequenceId
-     */
-    public long getLastDeliveredSequenceId() {
-        return lastDeliveredSequenceId;
-    }
-    
-    protected void sendAck(MessageAck ack) throws JMSException {
-        sendAck(ack,false);
-    }
-    
-    protected void sendAck(MessageAck ack, boolean lazy) throws JMSException {
-        if (lazy || connection.isSendAcksAsync() || getTransacted()) {
-            asyncSendPacket(ack);
-        } else {
-            syncSendPacket(ack);
-        }
-    }
-    
-    protected Scheduler getScheduler() {
-        return this.scheduler;
-    }
-    
-    protected ThreadPoolExecutor getConnectionExecutor() {
-        return this.connectionExecutor;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java
deleted file mode 100755
index 17b2bae..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * 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;
-
-import java.util.List;
-import javax.jms.JMSException;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A utility class used by the Session for dispatching messages asynchronously
- * to consumers
- * 
- * 
- * @see javax.jms.Session
- */
-public class ActiveMQSessionExecutor implements Task {
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQSessionExecutor.class);
-
-    private final ActiveMQSession session;
-    private final MessageDispatchChannel messageQueue;
-    private boolean dispatchedBySessionPool;
-    private volatile TaskRunner taskRunner;
-    private boolean startedOrWarnedThatNotStarted;
-
-    ActiveMQSessionExecutor(ActiveMQSession session) {
-        this.session = session;
-        if (this.session.connection != null && this.session.connection.isMessagePrioritySupported()) {
-           this.messageQueue = new SimplePriorityMessageDispatchChannel();
-        }else {
-            this.messageQueue = new FifoMessageDispatchChannel();
-        }
-    }
-
-    void setDispatchedBySessionPool(boolean value) {
-        dispatchedBySessionPool = value;
-        wakeup();
-    }
-
-    void execute(MessageDispatch message) throws InterruptedException {
-
-        if (!startedOrWarnedThatNotStarted) {
-
-            ActiveMQConnection connection = session.connection;
-            long aboutUnstartedConnectionTimeout = connection.getWarnAboutUnstartedConnectionTimeout();
-            if (connection.isStarted() || aboutUnstartedConnectionTimeout < 0L) {
-                startedOrWarnedThatNotStarted = true;
-            } else {
-                long elapsedTime = System.currentTimeMillis() - connection.getTimeCreated();
-
-                // lets only warn when a significant amount of time has passed
-                // just in case its normal operation
-                if (elapsedTime > aboutUnstartedConnectionTimeout) {
-                    LOG.warn("Received a message on a connection which is not yet started. Have you forgotten to call Connection.start()? Connection: " + connection
-                             + " Received: " + message);
-                    startedOrWarnedThatNotStarted = true;
-                }
-            }
-        }
-
-        if (!session.isSessionAsyncDispatch() && !dispatchedBySessionPool) {
-            dispatch(message);
-        } else {
-            messageQueue.enqueue(message);
-            wakeup();
-        }
-    }
-
-    public void wakeup() {
-        if (!dispatchedBySessionPool) {
-            if (session.isSessionAsyncDispatch()) {
-                try {
-                    TaskRunner taskRunner = this.taskRunner;
-                    if (taskRunner == null) {
-                        synchronized (this) {
-                            if (this.taskRunner == null) {
-                                if (!isRunning()) {
-                                    // stop has been called
-                                    return;
-                                }
-                                this.taskRunner = session.connection.getSessionTaskRunner().createTaskRunner(this,
-                                        "ActiveMQ Session: " + session.getSessionId());
-                            }
-                            taskRunner = this.taskRunner;
-                        }
-                    }
-                    taskRunner.wakeup();
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            } else {
-                while (iterate()) {
-                }
-            }
-        }
-    }
-
-    void executeFirst(MessageDispatch message) {
-        messageQueue.enqueueFirst(message);
-        wakeup();
-    }
-
-    public boolean hasUncomsumedMessages() {
-        return !messageQueue.isClosed() && messageQueue.isRunning() && !messageQueue.isEmpty();
-    }
-
-    void dispatch(MessageDispatch message) {
-
-        // TODO - we should use a Map for this indexed by consumerId
-
-        for (ActiveMQMessageConsumer consumer : this.session.consumers) {
-            ConsumerId consumerId = message.getConsumerId();
-            if (consumerId.equals(consumer.getConsumerId())) {
-                consumer.dispatch(message);
-                break;
-            }
-        }
-    }
-
-    synchronized void start() {
-        if (!messageQueue.isRunning()) {
-            messageQueue.start();
-            if (hasUncomsumedMessages()) {
-                wakeup();
-            }
-        }
-    }
-
-    void stop() throws JMSException {
-        try {
-            if (messageQueue.isRunning()) {
-                synchronized(this) {
-                    messageQueue.stop();
-                    if (this.taskRunner != null) {
-                        this.taskRunner.shutdown();
-                        this.taskRunner = null;
-                    }
-                }
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    boolean isRunning() {
-        return messageQueue.isRunning();
-    }
-
-    void close() {
-        messageQueue.close();
-    }
-
-    void clear() {
-        messageQueue.clear();
-    }
-
-    MessageDispatch dequeueNoWait() {
-        return messageQueue.dequeueNoWait();
-    }
-
-    protected void clearMessagesInProgress() {
-        messageQueue.clear();
-    }
-
-    public boolean isEmpty() {
-        return messageQueue.isEmpty();
-    }
-
-    public boolean iterate() {
-
-        // Deliver any messages queued on the consumer to their listeners.
-        for (ActiveMQMessageConsumer consumer : this.session.consumers) {
-            if (consumer.iterate()) {
-                return true;
-            }
-        }
-
-        // No messages left queued on the listeners.. so now dispatch messages
-        // queued on the session
-        MessageDispatch message = messageQueue.dequeueNoWait();
-        if (message == null) {
-            return false;
-        } else {
-            dispatch(message);
-            return !messageQueue.isEmpty();
-        }
-    }
-
-    List getUnconsumedMessages() {
-        return messageQueue.removeAll();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSslConnectionFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSslConnectionFactory.java
deleted file mode 100644
index 2bd67d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSslConnectionFactory.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/**
- * 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;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.KeyStore;
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.security.SecureRandom;
-import javax.jms.JMSException;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.SslContext;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.SslTransportFactory;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * An ActiveMQConnectionFactory that allows access to the key and trust managers
- * used for SslConnections. There is no reason to use this class unless SSL is
- * being used AND the key and trust managers need to be specified from within
- * code. In fact, if the URI passed to this class does not have an "ssl" scheme,
- * this class will pass all work on to its superclass.
- * 
- * There are two alternative approaches you can use to provide X.509 certificates
- * for the SSL connections:
- * 
- * Call <code>setTrustStore</code>, <code>setTrustStorePassword</code>, <code>setKeyStore</code>,
- * and <code>setKeyStorePassword</code>.
- * 
- * Call <code>setKeyAndTrustManagers</code>.
- * 
- * @author sepandm@gmail.com
- */
-public class ActiveMQSslConnectionFactory extends ActiveMQConnectionFactory {
-    private static final Log LOG = LogFactory.getLog(ActiveMQSslConnectionFactory.class);
-    // The key and trust managers used to initialize the used SSLContext.
-    protected KeyManager[] keyManager;
-    protected TrustManager[] trustManager;
-    protected SecureRandom secureRandom;
-    protected String trustStore;
-    protected String trustStorePassword;
-    protected String keyStore;
-    protected String keyStorePassword;
-
-    public ActiveMQSslConnectionFactory() {
-        super();
-    }
-
-    public ActiveMQSslConnectionFactory(String brokerURL) {
-        super(brokerURL);
-    }
-
-    public ActiveMQSslConnectionFactory(URI brokerURL) {
-        super(brokerURL);
-    }
-
-    /**
-     * Sets the key and trust managers used when creating SSL connections.
-     * 
-     * @param km The KeyManagers used.
-     * @param tm The TrustManagers used.
-     * @param random The SecureRandom number used.
-     */
-    public void setKeyAndTrustManagers(final KeyManager[] km, final TrustManager[] tm, final SecureRandom random) {
-        keyManager = km;
-        trustManager = tm;
-        secureRandom = random;
-    }
-
-    /**
-     * Overriding to make special considerations for SSL connections. If we are
-     * not using SSL, the superclass's method is called. If we are using SSL, an
-     * SslConnectionFactory is used and it is given the needed key and trust
-     * managers.
-     * 
-     * @author sepandm@gmail.com
-     */
-    protected Transport createTransport() throws JMSException {
-        // If the given URI is non-ssl, let superclass handle it.
-        if (!brokerURL.getScheme().equals("ssl")) {
-            return super.createTransport();
-        }
-
-        try {
-            if (keyManager == null || trustManager == null) {
-                trustManager = createTrustManager();
-                keyManager = createKeyManager();
-                // secureRandom can be left as null
-            }
-            SslTransportFactory sslFactory = new SslTransportFactory();
-            SslContext ctx = new SslContext(keyManager, trustManager, secureRandom);
-            SslContext.setCurrentSslContext(ctx);
-            return sslFactory.doConnect(brokerURL);
-        } catch (Exception e) {
-            throw JMSExceptionSupport.create("Could not create Transport. Reason: " + e, e);
-        }
-    }
-
-    protected TrustManager[] createTrustManager() throws Exception {
-        TrustManager[] trustStoreManagers = null;
-        KeyStore trustedCertStore = KeyStore.getInstance("jks");
-        
-        InputStream tsStream = getUrlOrResourceAsStream(trustStore);
-        
-        trustedCertStore.load(tsStream, trustStorePassword.toCharArray());
-        TrustManagerFactory tmf  = 
-            TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
-  
-        tmf.init(trustedCertStore);
-        trustStoreManagers = tmf.getTrustManagers();
-        return trustStoreManagers; 
-    }
-
-    protected KeyManager[] createKeyManager() throws Exception {
-        KeyManagerFactory kmf = 
-            KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());  
-        KeyStore ks = KeyStore.getInstance("jks");
-        KeyManager[] keystoreManagers = null;
-        
-        byte[] sslCert = loadClientCredential(keyStore);
-        
-       
-        if (sslCert != null && sslCert.length > 0) {
-            ByteArrayInputStream bin = new ByteArrayInputStream(sslCert);
-            ks.load(bin, keyStorePassword.toCharArray());
-            kmf.init(ks, keyStorePassword.toCharArray());
-            keystoreManagers = kmf.getKeyManagers();
-        }
-        return keystoreManagers;          
-    }
-
-    protected byte[] loadClientCredential(String fileName) throws IOException {
-        if (fileName == null) {
-            return null;
-        }
-        InputStream in = getUrlOrResourceAsStream(fileName);
-        //FileInputStream in = new FileInputStream(fileName);
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        byte[] buf = new byte[512];
-        int i = in.read(buf);
-        while (i  > 0) {
-            out.write(buf, 0, i);
-            i = in.read(buf);
-        }
-        in.close();
-        return out.toByteArray();
-    }
-    
-    protected InputStream getUrlOrResourceAsStream(String urlOrResource) throws IOException {
-    	InputStream ins = null;
-    	try {
-    		URL url = new URL(urlOrResource);
-    		ins = url.openStream();
-    	}
-    	catch (MalformedURLException ignore) {
-    		ins = null;
-    	}
-    	
-    	// Alternatively, treat as classpath resource
-    	if (ins == null) {
-        	ins = getClass().getClassLoader().getResourceAsStream(urlOrResource);
-    	}
-    	
-    	if (ins == null) {
-            throw new java.io.IOException("Could not load resource: " + urlOrResource);
-    	}
-    	
-    	return ins;
-    }
-    
-    public String getTrustStore() {
-        return trustStore;
-    }
-    
-    /**
-     * The location of a keystore file (in <code>jks</code> format) containing one or more
-     * trusted certificates.
-     * 
-     * @param trustStore If specified with a scheme, treat as a URL, otherwise treat as a classpath resource.
-     */
-    public void setTrustStore(String trustStore) {
-        this.trustStore = trustStore;
-        trustManager = null;
-    }
-    
-    public String getTrustStorePassword() {
-        return trustStorePassword;
-    }
-    
-    /**
-     * The password to match the trust store specified by {@link setTrustStore}.
-     * 
-     * @param trustStorePassword The password used to unlock the keystore file.
-     */
-    public void setTrustStorePassword(String trustStorePassword) {
-        this.trustStorePassword = trustStorePassword;
-    }
-    
-    public String getKeyStore() {
-        return keyStore;
-    }
-    
-    /**
-     * The location of a keystore file (in <code>jks</code> format) containing a certificate
-     * and its private key.
-     * 
-     * @param keyStore If specified with a scheme, treat as a URL, otherwise treat as a classpath resource.
-     */
-    public void setKeyStore(String keyStore) {
-        this.keyStore = keyStore;
-        keyManager = null;
-    }
-    
-    public String getKeyStorePassword() {
-        return keyStorePassword;
-    }
-    
-    /**
-     * The password to match the key store specified by {@link setKeyStore}.
-     * 
-     * @param keyStorePassword The password, which is used both to unlock the keystore file
-     * and as the pass phrase for the private key stored in the keystore.
-     */
-    public void setKeyStorePassword(String keyStorePassword) {
-        this.keyStorePassword = keyStorePassword;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicPublisher.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicPublisher.java
deleted file mode 100755
index 3932909..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicPublisher.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * A client uses a <CODE>TopicPublisher</CODE> object to publish messages on
- * a topic. A <CODE>TopicPublisher</CODE> object is the publish-subscribe
- * form of a message producer.
- * <p/>
- * <P>
- * Normally, the <CODE>Topic</CODE> is specified when a <CODE>TopicPublisher
- * </CODE> is created. In this case, an attempt to use the <CODE>publish
- * </CODE> methods for an unidentified <CODE>TopicPublisher</CODE> will throw
- * a <CODE>java.lang.UnsupportedOperationException</CODE>.
- * <p/>
- * <P>
- * If the <CODE>TopicPublisher</CODE> is created with an unidentified <CODE>
- * Topic</CODE>, an attempt to use the <CODE>publish</CODE> methods that
- * assume that the <CODE>Topic</CODE> has been identified will throw a <CODE>
- * java.lang.UnsupportedOperationException</CODE>.
- * <p/>
- * <P>
- * During the execution of its <CODE>publish</CODE> method, a message must
- * not be changed by other threads within the client. If the message is
- * modified, the result of the <CODE>publish</CODE> is undefined.
- * <p/>
- * <P>
- * After publishing a message, a client may retain and modify it without
- * affecting the message that has been published. The same message object may
- * be published multiple times.
- * <p/>
- * <P>
- * The following message headers are set as part of publishing a message:
- * <code>JMSDestination</code>,<code>JMSDeliveryMode</code>,<code>JMSExpiration</code>,
- * <code>JMSPriority</code>,<code>JMSMessageID</code> and <code>JMSTimeStamp</code>.
- * When the message is published, the values of these headers are ignored.
- * After completion of the <CODE>publish</CODE>, the headers hold the values
- * specified by the method publishing the message. It is possible for the
- * <CODE>publish</CODE> method not to set <code>JMSMessageID</code> and
- * <code>JMSTimeStamp</code> if the setting of these headers is explicitly
- * disabled by the <code>MessageProducer.setDisableMessageID</code> or <code>MessageProducer.setDisableMessageTimestamp</code>
- * method.
- * <p/>
- * <P>
- * Creating a <CODE>MessageProducer</CODE> provides the same features as
- * creating a <CODE>TopicPublisher</CODE>. A <CODE>MessageProducer</CODE>
- * object is recommended when creating new code. The <CODE>TopicPublisher
- * </CODE> is provided to support existing code.
- * <p/>
- * <p/>
- * <P>
- * Because <CODE>TopicPublisher</CODE> inherits from <CODE>MessageProducer
- * </CODE>, it inherits the <CODE>send</CODE> methods that are a part of the
- * <CODE>MessageProducer</CODE> interface. Using the <CODE>send</CODE>
- * methods will have the same effect as using the <CODE>publish</CODE>
- * methods: they are functionally the same.
- *
- * @see Session#createProducer(Destination)
- * @see TopicSession#createPublisher(Topic)
- */
-
-public class ActiveMQTopicPublisher extends ActiveMQMessageProducer implements
-        TopicPublisher {
-
-    protected ActiveMQTopicPublisher(ActiveMQSession session,
-                                     ActiveMQDestination destination, int sendTimeout) throws JMSException {
-        super(session, session.getNextProducerId(), destination,sendTimeout);
-    }
-
-    /**
-     * Gets the topic associated with this <CODE>TopicPublisher</CODE>.
-     *
-     * @return this publisher's topic
-     * @throws JMSException if the JMS provider fails to get the topic for this
-     *                      <CODE>TopicPublisher</CODE> due to some internal error.
-     */
-
-    public Topic getTopic() throws JMSException {
-        return (Topic) super.getDestination();
-    }
-
-    /**
-     * Publishes a message to the topic. Uses the <CODE>TopicPublisher</CODE>'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 MessageFormatException      if an invalid message is specified.
-     * @throws InvalidDestinationException if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> with an invalid topic.
-     * @throws java.lang.UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> 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 MessageFormatException      if an invalid message is specified.
-     * @throws InvalidDestinationException if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> with an invalid topic.
-     * @throws java.lang.UnsupportedOperationException
-     *                                     if a client uses this method with a <CODE>TopicPublisher
-     *                                     </CODE> 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 <CODE>TopicPublisher</CODE>'s default delivery mode,
-     * priority, and time to live.
-     * <p/>
-     * <P>
-     * 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 MessageFormatException      if an invalid message is specified.
-     * @throws 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.
-     * <p/>
-     * <P>
-     * 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 MessageFormatException      if an invalid message is specified.
-     * @throws 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);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSession.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSession.java
deleted file mode 100755
index ea92a71..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSession.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/**
- * 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;
-
-import java.io.Serializable;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-
-/**
- * A TopicSession implementation that throws IllegalStateExceptions when Queue
- * operations are attempted but which delegates to another TopicSession for all
- * other operations. The ActiveMQSessions implement both Topic and Queue
- * Sessions methods but the spec states that TopicSession should throw
- * Exceptions if queue operations are attempted on it.
- *
- *
- */
-public class ActiveMQTopicSession implements TopicSession {
-
-    private final TopicSession next;
-
-    public ActiveMQTopicSession(TopicSession next) {
-        this.next = next;
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void close() throws JMSException {
-        next.close();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void commit() throws JMSException {
-        next.commit();
-    }
-
-    /**
-     * @param queue
-     * @return
-     * @throws JMSException
-     */
-    public QueueBrowser createBrowser(Queue queue) throws JMSException {
-        throw new IllegalStateException("Operation not supported by a TopicSession");
-    }
-
-    /**
-     * @param queue
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException {
-        throw new IllegalStateException("Operation not supported by a TopicSession");
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public BytesMessage createBytesMessage() throws JMSException {
-        return next.createBytesMessage();
-    }
-
-    /**
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination) throws JMSException {
-        if (destination instanceof Queue) {
-            throw new InvalidDestinationException("Queues are not supported by a TopicSession");
-        }
-        return next.createConsumer(destination);
-    }
-
-    /**
-     * @param destination
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException {
-        if (destination instanceof Queue) {
-            throw new InvalidDestinationException("Queues are not supported by a TopicSession");
-        }
-        return next.createConsumer(destination, messageSelector);
-    }
-
-    /**
-     * @param destination
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException {
-        if (destination instanceof Queue) {
-            throw new InvalidDestinationException("Queues are not supported by a TopicSession");
-        }
-        return next.createConsumer(destination, messageSelector, noLocal);
-    }
-
-    /**
-     * @param topic
-     * @param name
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException {
-        return next.createDurableSubscriber(topic, name);
-    }
-
-    /**
-     * @param topic
-     * @param name
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
-        return next.createDurableSubscriber(topic, name, messageSelector, noLocal);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public MapMessage createMapMessage() throws JMSException {
-        return next.createMapMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public Message createMessage() throws JMSException {
-        return next.createMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public ObjectMessage createObjectMessage() throws JMSException {
-        return next.createObjectMessage();
-    }
-
-    /**
-     * @param object
-     * @return
-     * @throws JMSException
-     */
-    public ObjectMessage createObjectMessage(Serializable object) throws JMSException {
-        return next.createObjectMessage(object);
-    }
-
-    /**
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public MessageProducer createProducer(Destination destination) throws JMSException {
-        if (destination instanceof Queue) {
-            throw new InvalidDestinationException("Queues are not supported by a TopicSession");
-        }
-        return next.createProducer(destination);
-    }
-
-    /**
-     * @param topic
-     * @return
-     * @throws JMSException
-     */
-    public TopicPublisher createPublisher(Topic topic) throws JMSException {
-        return next.createPublisher(topic);
-    }
-
-    /**
-     * @param queueName
-     * @return
-     * @throws JMSException
-     */
-    public Queue createQueue(String queueName) throws JMSException {
-        throw new IllegalStateException("Operation not supported by a TopicSession");
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public StreamMessage createStreamMessage() throws JMSException {
-        return next.createStreamMessage();
-    }
-
-    /**
-     * @param topic
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createSubscriber(Topic topic) throws JMSException {
-        return next.createSubscriber(topic);
-    }
-
-    /**
-     * @param topic
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException {
-        return next.createSubscriber(topic, messageSelector, noLocal);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TemporaryQueue createTemporaryQueue() throws JMSException {
-        throw new IllegalStateException("Operation not supported by a TopicSession");
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TemporaryTopic createTemporaryTopic() throws JMSException {
-        return next.createTemporaryTopic();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TextMessage createTextMessage() throws JMSException {
-        return next.createTextMessage();
-    }
-
-    /**
-     * @param text
-     * @return
-     * @throws JMSException
-     */
-    public TextMessage createTextMessage(String text) throws JMSException {
-        return next.createTextMessage(text);
-    }
-
-    /**
-     * @param topicName
-     * @return
-     * @throws JMSException
-     */
-    public Topic createTopic(String topicName) throws JMSException {
-        return next.createTopic(topicName);
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object arg0) {
-        if(this != arg0) {
-            return next.equals(arg0);
-        }
-
-        return true;
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public int getAcknowledgeMode() throws JMSException {
-        return next.getAcknowledgeMode();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public MessageListener getMessageListener() throws JMSException {
-        return next.getMessageListener();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public boolean getTransacted() throws JMSException {
-        return next.getTransacted();
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return next.hashCode();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void recover() throws JMSException {
-        next.recover();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void rollback() throws JMSException {
-        next.rollback();
-    }
-
-    /**
-     *
-     */
-    public void run() {
-        next.run();
-    }
-
-    /**
-     * @param listener
-     * @throws JMSException
-     */
-    public void setMessageListener(MessageListener listener) throws JMSException {
-        next.setMessageListener(listener);
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return next.toString();
-    }
-
-    /**
-     * @param name
-     * @throws JMSException
-     */
-    public void unsubscribe(String name) throws JMSException {
-        next.unsubscribe(name);
-    }
-
-    public TopicSession getNext() {
-        return next;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java
deleted file mode 100755
index 7963071..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-
-/**
- * A client uses a <CODE>TopicSubscriber</CODE> object to receive messages
- * that have been published to a topic. A <CODE>TopicSubscriber</CODE> object
- * is the publish/subscribe form of a message consumer. A <CODE>
- * MessageConsumer</CODE> can be created by using <CODE>
- * Session.createConsumer</CODE>.
- * <p/>
- * <P>
- * A <CODE>TopicSession</CODE> allows the creation of multiple <CODE>
- * TopicSubscriber</CODE> objects per topic. It will deliver each message for
- * a topic to each subscriber eligible to receive it. Each copy of the message
- * is treated as a completely separate message. Work done on one copy has no
- * effect on the others; acknowledging one does not acknowledge the others; one
- * message may be delivered immediately, while another waits for its subscriber
- * to process messages ahead of it.
- * <p/>
- * <P>
- * Regular <CODE>TopicSubscriber</CODE> objects are not durable. They receive
- * only messages that are published while they are active.
- * <p/>
- * <P>
- * Messages filtered out by a subscriber's message selector will never be
- * delivered to the subscriber. From the subscriber's perspective, they do not
- * exist.
- * <p/>
- * <P>
- * In some cases, a connection may both publish and subscribe to a topic. The
- * subscriber <CODE>NoLocal</CODE> attribute allows a subscriber to inhibit
- * the delivery of messages published by its own connection.
- * <p/>
- * <P>
- * If a client needs to receive all the messages published on a topic,
- * including the ones published while the subscriber is inactive, it uses a
- * durable <CODE>TopicSubscriber</CODE>. The JMS provider retains a record
- * of this durable subscription and insures that all messages from the topic's
- * publishers are retained until they are acknowledged by this durable
- * subscriber or they have expired.
- * <p/>
- * <P>
- * Sessions with durable subscribers must always provide the same client
- * identifier. In addition, each client must specify a name that uniquely
- * identifies (within client identifier) each durable subscription it creates.
- * Only one session at a time can have a <CODE>TopicSubscriber</CODE> for a
- * particular durable subscription.
- * <p/>
- * <P>
- * A client can change an existing durable subscription by creating a durable
- * <CODE>TopicSubscriber</CODE> with the same name and a new topic and/or
- * message selector. Changing a durable subscription is equivalent to
- * unsubscribing (deleting) the old one and creating a new one.
- * <p/>
- * <P>
- * The <CODE>unsubscribe</CODE> method is used to delete a durable
- * subscription. The <CODE>unsubscribe</CODE> method can be used at the
- * <CODE>Session</CODE> or <CODE>TopicSession</CODE> level. This method
- * deletes the state being maintained on behalf of the subscriber by its
- * provider.
- * <p/>
- * <P>
- * Creating a <CODE>MessageConsumer</CODE> provides the same features as
- * creating a <CODE>TopicSubscriber</CODE>. To create a durable subscriber,
- * use of <CODE>Session.CreateDurableSubscriber</CODE> is recommended. The
- * <CODE>TopicSubscriber</CODE> is provided to support existing code.
- *
- * @see javax.jms.Session#createConsumer
- * @see javax.jms.Session#createDurableSubscriber
- * @see javax.jms.TopicSession
- * @see javax.jms.TopicSession#createSubscriber
- * @see javax.jms.TopicSubscriber
- * @see javax.jms.MessageConsumer
- */
-
-public class ActiveMQTopicSubscriber extends ActiveMQMessageConsumer implements
-        TopicSubscriber {
-
-    /**
-     * @param theSession
-     * @param value 
-     * @param dest
-     * @param name
-     * @param selector
-     * @param cnum
-     * @param noLocalValue
-     * @param browserValue
-     * @param asyncDispatch 
-     * @throws JMSException
-     */
-    protected ActiveMQTopicSubscriber(ActiveMQSession theSession,
-                                      ConsumerId consumerId, ActiveMQDestination dest, String name, String selector, int prefetch, int maximumPendingMessageCount,
-                                      boolean noLocalValue, boolean browserValue, boolean asyncDispatch) throws JMSException {
-        super(theSession, consumerId, dest, name, selector, prefetch, maximumPendingMessageCount, noLocalValue, browserValue, asyncDispatch, null);
-    }
-
-    /**
-     * Gets the <CODE>Topic</CODE> associated with this subscriber.
-     *
-     * @return this subscriber's <CODE>Topic</CODE>
-     * @throws 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 <CODE>NoLocal</CODE> 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 <CODE>NoLocal
-     *                      </CODE> attribute for this topic subscriber due to some
-     *                      internal error.
-     */
-
-    public boolean getNoLocal() throws JMSException {
-        checkClosed();
-        return super.isNoLocal();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnection.java
deleted file mode 100755
index e994aa8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnection.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.jms.XAConnection;
-import javax.jms.XAQueueConnection;
-import javax.jms.XAQueueSession;
-import javax.jms.XASession;
-import javax.jms.XATopicConnection;
-import javax.jms.XATopicSession;
-
-import org.apache.activemq.management.JMSStatsImpl;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.IdGenerator;
-
-/**
- * The XAConnection interface extends the capability of Connection by providing
- * an XASession (optional).
- * <p/>
- * The XAConnection interface is optional. JMS providers are not required to
- * support this interface. This interface is for use by JMS providers to
- * support transactional environments. Client programs are strongly encouraged
- * to use the transactional support  available in their environment, rather
- * than use these XA  interfaces directly.
- *
- * 
- * @see javax.jms.Connection
- * @see javax.jms.ConnectionFactory
- * @see javax.jms.QueueConnection
- * @see javax.jms.TopicConnection
- * @see javax.jms.TopicConnectionFactory
- * @see javax.jms.QueueConnection
- * @see javax.jms.QueueConnectionFactory
- */
-public class ActiveMQXAConnection extends ActiveMQConnection implements XATopicConnection, XAQueueConnection, XAConnection {
-
-    protected ActiveMQXAConnection(Transport transport, IdGenerator clientIdGenerator, JMSStatsImpl factoryStats) throws Exception {
-        super(transport, clientIdGenerator, factoryStats);
-    }
-
-    public XASession createXASession() throws JMSException {
-        return (XASession) createSession(true, Session.SESSION_TRANSACTED);
-    }
-
-    public XATopicSession createXATopicSession() throws JMSException {
-        return (XATopicSession) createSession(true, Session.SESSION_TRANSACTED);
-    }
-
-    public XAQueueSession createXAQueueSession() throws JMSException {
-        return (XAQueueSession) createSession(true, Session.SESSION_TRANSACTED);
-    }
-
-    public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException {
-        checkClosedOrFailed();
-        ensureConnectionInfoSent();
-        return new ActiveMQXASession(this, getNextSessionId(), Session.SESSION_TRANSACTED, isDispatchAsync());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnectionFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnectionFactory.java
deleted file mode 100644
index abec2e8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnectionFactory.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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;
-
-import java.net.URI;
-
-import javax.jms.JMSException;
-import javax.jms.XAConnection;
-import javax.jms.XAConnectionFactory;
-import javax.jms.XAQueueConnection;
-import javax.jms.XAQueueConnectionFactory;
-import javax.jms.XATopicConnection;
-import javax.jms.XATopicConnectionFactory;
-
-import org.apache.activemq.management.JMSStatsImpl;
-import org.apache.activemq.transport.Transport;
-
-/**
- * A factory of {@link XAConnection} instances
- * 
- * 
- */
-public class ActiveMQXAConnectionFactory extends ActiveMQConnectionFactory implements XAConnectionFactory, XAQueueConnectionFactory, XATopicConnectionFactory {
-
-    public ActiveMQXAConnectionFactory() {
-    }
-
-    public ActiveMQXAConnectionFactory(String userName, String password, String brokerURL) {
-        super(userName, password, brokerURL);
-    }
-
-    public ActiveMQXAConnectionFactory(String userName, String password, URI brokerURL) {
-        super(userName, password, brokerURL);
-    }
-
-    public ActiveMQXAConnectionFactory(String brokerURL) {
-        super(brokerURL);
-    }
-
-    public ActiveMQXAConnectionFactory(URI brokerURL) {
-        super(brokerURL);
-    }
-
-    public XAConnection createXAConnection() throws JMSException {
-        return (XAConnection) createActiveMQConnection();
-    }
-
-    public XAConnection createXAConnection(String userName, String password) throws JMSException {
-        return (XAConnection) createActiveMQConnection(userName, password);
-    }
-
-    public XAQueueConnection createXAQueueConnection() throws JMSException {
-        return (XAQueueConnection) createActiveMQConnection();
-    }
-
-    public XAQueueConnection createXAQueueConnection(String userName, String password) throws JMSException {
-        return (XAQueueConnection) createActiveMQConnection(userName, password);
-    }
-
-    public XATopicConnection createXATopicConnection() throws JMSException {
-        return (XATopicConnection) createActiveMQConnection();
-    }
-
-    public XATopicConnection createXATopicConnection(String userName, String password) throws JMSException {
-        return (XATopicConnection) createActiveMQConnection(userName, password);
-    }
-
-    protected ActiveMQConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception {
-        ActiveMQXAConnection connection = new ActiveMQXAConnection(transport, getClientIdGenerator(), stats);
-        return connection;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXASession.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXASession.java
deleted file mode 100755
index 3e2ffdf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXASession.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TopicSession;
-import javax.jms.TransactionInProgressException;
-import javax.jms.XAQueueSession;
-import javax.jms.XATopicSession;
-import javax.transaction.xa.XAResource;
-
-import org.apache.activemq.command.SessionId;
-
-/**
- * The XASession interface extends the capability of Session by adding access
- * to a JMS provider's support for the  Java Transaction API (JTA) (optional).
- * This support takes the form of a javax.transaction.xa.XAResource object.
- * The functionality of this object closely resembles that defined by the
- * standard X/Open XA Resource interface.
- * <p/>
- * An application server controls the transactional assignment of an XASession
- * by obtaining its XAResource. It uses the XAResource to assign the session
- * to a transaction, prepare and commit work on the transaction, and so on.
- * <p/>
- * An XAResource provides some fairly sophisticated facilities for
- * interleaving work on multiple transactions, recovering a list of
- * transactions in progress, and so on. A JTA aware JMS provider must fully
- * implement this functionality. This could be done by using the services of a
- * database that supports XA, or a JMS provider may choose to implement this
- * functionality from scratch.
- * <p/>
- * A client of the application server is given what it thinks is a regular
- * JMS Session. Behind the scenes, the application server controls the
- * transaction management of the underlying XASession.
- * <p/>
- * The XASession interface is optional. JMS providers are not required to
- * support this interface. This interface is for use by JMS providers to
- * support transactional environments. Client programs are strongly encouraged
- * to use the transactional support  available in their environment, rather
- * than use these XA  interfaces directly.
- *
- * 
- * @see javax.jms.Session
- * @see javax.jms.QueueSession
- * @see javax.jms.TopicSession
- * @see javax.jms.XASession
- */
-public class ActiveMQXASession extends ActiveMQSession implements QueueSession, TopicSession, XAQueueSession, XATopicSession {
-
-    public ActiveMQXASession(ActiveMQXAConnection connection, SessionId sessionId, int theAcknowlegeMode, boolean dispatchAsync) throws JMSException {
-        super(connection, sessionId, theAcknowlegeMode, dispatchAsync);
-    }
-
-    public boolean getTransacted() throws JMSException {
-        return getTransactionContext().isInXATransaction();
-    }
-
-    public void rollback() throws JMSException {
-        throw new TransactionInProgressException("Cannot rollback() inside an XASession");
-    }
-
-    public void commit() throws JMSException {
-        throw new TransactionInProgressException("Cannot commit() inside an XASession");
-    }
-
-    public Session getSession() throws JMSException {
-        return this;
-    }
-
-    public XAResource getXAResource() {
-        return getTransactionContext();
-    }
-
-    public QueueSession getQueueSession() throws JMSException {
-        return new ActiveMQQueueSession(this);
-    }
-
-    public TopicSession getTopicSession() throws JMSException {
-        return new ActiveMQTopicSession(this);
-    }
-
-    /*
-     * when there is no XA transaction it is auto ack
-     */
-    public boolean isAutoAcknowledge() {
-      return true;
-    }
-    
-    protected void doStartTransaction() throws JMSException {
-        // allow non transactional auto ack work on an XASession
-        // Seems ok by the spec that an XAConnection can be used without an XA tx
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java
deleted file mode 100755
index 0a61c8a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AdvisoryConsumer implements ActiveMQDispatcher {
-    private static final transient Logger LOG = LoggerFactory.getLogger(AdvisoryConsumer.class);
-
-    int deliveredCounter;
-
-    private final ActiveMQConnection connection;
-    private ConsumerInfo info;
-    private boolean closed;
-
-    public AdvisoryConsumer(ActiveMQConnection connection, ConsumerId consumerId) throws JMSException {
-        this.connection = connection;
-        info = new ConsumerInfo(consumerId);
-        info.setDestination(AdvisorySupport.TEMP_DESTINATION_COMPOSITE_ADVISORY_TOPIC);
-        info.setPrefetchSize(1000);
-        info.setNoLocal(true);
-
-        this.connection.addDispatcher(info.getConsumerId(), this);
-        this.connection.syncSendPacket(this.info);
-    }
-
-    public synchronized void dispose() {
-        if (!closed) {
-            try {
-                this.connection.asyncSendPacket(info.createRemoveCommand());
-            } catch (JMSException e) {
-                LOG.debug("Failed to send remove command: " + e, e);
-            }
-            this.connection.removeDispatcher(info.getConsumerId());
-            closed = true;
-        }
-    }
-
-    public void dispatch(MessageDispatch md) {
-
-        // Auto ack messages when we reach 75% of the prefetch
-        deliveredCounter++;
-        if (deliveredCounter > (0.75 * info.getPrefetchSize())) {
-            try {
-                MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, deliveredCounter);
-                connection.asyncSendPacket(ack);
-                deliveredCounter = 0;
-            } catch (JMSException e) {
-                connection.onClientInternalException(e);
-            }
-        }
-
-        DataStructure o = md.getMessage().getDataStructure();
-        if (o != null && o.getClass() == DestinationInfo.class) {
-            processDestinationInfo((DestinationInfo)o);
-        } else {
-            //This can happen across networks
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Unexpected message was dispatched to the AdvisoryConsumer: "+md);
-            }
-        }
-
-    }
-
-    private void processDestinationInfo(DestinationInfo dinfo) {
-        ActiveMQDestination dest = dinfo.getDestination();
-        if (!dest.isTemporary()) {
-            return;
-        }
-
-        ActiveMQTempDestination tempDest = (ActiveMQTempDestination)dest;
-        if (dinfo.getOperationType() == DestinationInfo.ADD_OPERATION_TYPE) {
-            connection.activeTempDestinations.put(tempDest, tempDest);
-        } else if (dinfo.getOperationType() == DestinationInfo.REMOVE_OPERATION_TYPE) {
-            connection.activeTempDestinations.remove(tempDest);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/AlreadyClosedException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/AlreadyClosedException.java
deleted file mode 100755
index 98a9605..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/AlreadyClosedException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-
-/**
- * An exception which is closed if you try to access a resource which has already
- * been closed
- *
- * 
- */
-public class AlreadyClosedException extends JMSException {
-
-    private static final long serialVersionUID = -3203104889571618702L;
-
-    public AlreadyClosedException() {
-        super("this connection");
-    }
-
-    public AlreadyClosedException(String description) {
-        super("Cannot use " + description + " as it has already been closed", "AMQ-1001");
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java
deleted file mode 100644
index 127453d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-/**
- * Represents a message which has a typically out of band Binary Large Object
- * (BLOB)
- * 
- * 
- */
-public interface BlobMessage extends Message {
-
-    /**
-     * Return the input stream to process the BLOB
-     */
-    InputStream getInputStream() throws IOException, JMSException;
-
-    /**
-     * Returns the URL for the blob if its available as an external URL (such as file, http, ftp etc)
-     * or null if there is no URL available
-     */
-    URL getURL() throws MalformedURLException, JMSException;
-
-
-    /**
-     * The MIME type of the BLOB which can be used to apply different content types to messages.
-     */
-    String getMimeType();
-
-    /**
-     * Sets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework
-     * DataHandler
-     */
-    void setMimeType(String mimeType);
-
-
-    String getName();
-
-    /**
-     * The name of the attachment which can be useful information if transmitting files over ActiveMQ
-     */
-    void setName(String name);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ClientInternalExceptionListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ClientInternalExceptionListener.java
deleted file mode 100644
index 3acb0ac..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ClientInternalExceptionListener.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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;
-
-/**
- * An exception listener similar to the standard <code>javax.jms.ExceptionListener</code>
- * which can be used by client code to be notified of exceptions thrown by container components 
- * (e.g. an EJB container in case of Message Driven Beans) during asynchronous processing of a message.
- * <p>
- * The <code>org.apache.activemq.ActiveMQConnection</code> that the listener has been registered with does
- * this by calling the listener's <code>onException()</code> method passing it a <code>Throwable</code> describing
- * the problem.
- * </p>
- * 
- * @author Kai Hudalla
- * @see ActiveMQConnection#setClientInternalExceptionListener(org.apache.activemq.ClientInternalExceptionListener)
- */
-public interface ClientInternalExceptionListener
-{
-    /**
-     * Notifies a client of an exception while asynchronously processing a message.
-     * 
-     * @param exception the exception describing the problem
-     */
-    void onException(Throwable exception);
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/Closeable.java b/trunk/activemq-core/src/main/java/org/apache/activemq/Closeable.java
deleted file mode 100755
index 79215d0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/Closeable.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-
-/**
- * Provides a uniform interface that can be used to close all the JMS obejcts
- * that provide a close() method. Useful for when you want to collect a
- * heterogeous set of JMS object in a collection to be closed at a later time.
- * 
- * 
- */
-public interface Closeable {
-
-    /**
-     * Closes a JMS object.
-     * <P>
-     * Many JMS objects are closeable such as Connections, Sessions, Consumers
-     * and Producers.
-     * 
-     * @throws JMSException if the JMS provider fails to close the object due to
-     *                 some internal error.
-     */
-    void close() throws JMSException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ConfigurationException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ConfigurationException.java
deleted file mode 100755
index 194e8a4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ConfigurationException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-
-/**
- * An exception thrown when a service is not correctly configured
- *
- * 
- */
-public class ConfigurationException extends JMSException {
-    private static final long serialVersionUID = 5639082552451065258L;
-
-    public ConfigurationException(String description) {
-        super(description, "AMQ-1002");
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionAudit.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionAudit.java
deleted file mode 100644
index d07b92b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionAudit.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 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;
-
-import java.util.LinkedHashMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.LRUCache;
-
-/**
- * An auditor class for a Connection that looks for duplicates
- */
-class ConnectionAudit {
-
-    private boolean checkForDuplicates;
-    private LinkedHashMap<ActiveMQDestination, ActiveMQMessageAudit> destinations = new LRUCache<ActiveMQDestination, ActiveMQMessageAudit>(1000);
-    private LinkedHashMap<ActiveMQDispatcher, ActiveMQMessageAudit> dispatchers = new LRUCache<ActiveMQDispatcher, ActiveMQMessageAudit>(1000);
-
-    
-	private int auditDepth = ActiveMQMessageAudit.DEFAULT_WINDOW_SIZE;
-	private int auditMaximumProducerNumber = ActiveMQMessageAudit.MAXIMUM_PRODUCER_COUNT;
-	
-	
-    synchronized void removeDispatcher(ActiveMQDispatcher dispatcher) {
-        dispatchers.remove(dispatcher);
-    }
-
-    synchronized boolean isDuplicate(ActiveMQDispatcher dispatcher, Message message) {
-        if (checkForDuplicates && message != null) {
-            ActiveMQDestination destination = message.getDestination();
-            if (destination != null) {
-                if (destination.isQueue()) {
-                    ActiveMQMessageAudit audit = destinations.get(destination);
-                    if (audit == null) {
-                        audit = new ActiveMQMessageAudit(auditDepth, auditMaximumProducerNumber);
-                        destinations.put(destination, audit);
-                    }
-                    boolean result = audit.isDuplicate(message);
-                    return result;
-                }
-                ActiveMQMessageAudit audit = dispatchers.get(dispatcher);
-                if (audit == null) {
-                    audit = new ActiveMQMessageAudit(auditDepth, auditMaximumProducerNumber);
-                    dispatchers.put(dispatcher, audit);
-                }
-                boolean result = audit.isDuplicate(message);
-                return result;
-            }
-        }
-        return false;
-    }
-
-    protected synchronized void rollbackDuplicate(ActiveMQDispatcher dispatcher, Message message) {
-        if (checkForDuplicates && message != null) {
-            ActiveMQDestination destination = message.getDestination();
-            if (destination != null) {
-                if (destination.isQueue()) {
-                    ActiveMQMessageAudit audit = destinations.get(destination);
-                    if (audit != null) {
-                        audit.rollback(message);
-                    }
-                } else {
-                    ActiveMQMessageAudit audit = dispatchers.get(dispatcher);
-                    if (audit != null) {
-                        audit.rollback(message);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * @return the checkForDuplicates
-     */
-    boolean isCheckForDuplicates() {
-        return this.checkForDuplicates;
-    }
-
-    /**
-     * @param checkForDuplicates the checkForDuplicates to set
-     */
-    void setCheckForDuplicates(boolean checkForDuplicates) {
-        this.checkForDuplicates = checkForDuplicates;
-    }
-
-	public int getAuditDepth() {
-		return auditDepth;
-	}
-
-	public void setAuditDepth(int auditDepth) {
-		this.auditDepth = auditDepth;
-	}
-
-	public int getAuditMaximumProducerNumber() {
-		return auditMaximumProducerNumber;
-	}
-
-	public void setAuditMaximumProducerNumber(int auditMaximumProducerNumber) {
-		this.auditMaximumProducerNumber = auditMaximumProducerNumber;
-	}
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionClosedException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionClosedException.java
deleted file mode 100755
index bfac15b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionClosedException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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;
-
-import javax.jms.IllegalStateException;
-
-/**
- * An exception thrown when attempt is made to use a connection when the connection has been closed.
- *
- * 
- */
-public class ConnectionClosedException extends IllegalStateException {
-    private static final long serialVersionUID = -7681404582227153308L;
-
-    public ConnectionClosedException() {
-        super("The connection is already closed", "AlreadyClosed");
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java
deleted file mode 100755
index 94e8873..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ConnectionFailedException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-
-import javax.jms.JMSException;
-
-/**
- * An exception thrown when the a connection failure is detected (peer might
- * close the connection, or a keep alive times out, etc.)
- * 
- * 
- */
-public class ConnectionFailedException extends JMSException {
-
-    private static final long serialVersionUID = 2288453203492073973L;
-
-    public ConnectionFailedException(IOException cause) {
-        super("The JMS connection has failed: " + extractMessage(cause));
-        initCause(cause);
-        setLinkedException(cause);
-    }
-
-    public ConnectionFailedException() {
-        super("The JMS connection has failed due to a Transport problem");
-    }
-
-    private static String extractMessage(IOException cause) {
-        String m = cause.getMessage();
-        if (m == null || m.length() == 0) {
-            m = cause.toString();
-        }
-        return m;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/CustomDestination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/CustomDestination.java
deleted file mode 100644
index 8a3b291..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/CustomDestination.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Destination;
-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;
-
-/**
- * Represents a hook to allow the support of custom destinations
- * such as to support <a href="http://activemq.apache.org/camel/">Apache Camel</a>
- * to create and manage endpoints
- *
- * 
- */
-public interface CustomDestination extends Destination {
-
-    // Consumers
-    //-----------------------------------------------------------------------
-    MessageConsumer createConsumer(ActiveMQSession session, String messageSelector);
-    MessageConsumer createConsumer(ActiveMQSession session, String messageSelector, boolean noLocal);
-
-    TopicSubscriber createSubscriber(ActiveMQSession session, String messageSelector, boolean noLocal);
-    TopicSubscriber createDurableSubscriber(ActiveMQSession session, String name, String messageSelector, boolean noLocal);
-
-    QueueReceiver createReceiver(ActiveMQSession session, String messageSelector);
-
-    // Producers
-    //-----------------------------------------------------------------------
-    MessageProducer createProducer(ActiveMQSession session) throws JMSException;
-
-    TopicPublisher createPublisher(ActiveMQSession session) throws JMSException;
-
-    QueueSender createSender(ActiveMQSession session) throws JMSException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/Disposable.java b/trunk/activemq-core/src/main/java/org/apache/activemq/Disposable.java
deleted file mode 100644
index 8dc7bb0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/Disposable.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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;
-
-
-/**
- * 
- */
-public interface Disposable {
-    
-    /**
-     */
-    void dispose();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/EnhancedConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/EnhancedConnection.java
deleted file mode 100644
index d7a8a34..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/EnhancedConnection.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- *
- * 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;
-
-import javax.jms.TopicConnection;
-import javax.jms.QueueConnection;
-import javax.jms.JMSException;
-
-import org.apache.activemq.advisory.DestinationSource;
-
-/**
- * A set of enhanced APIs for a JMS provider
- *
- * 
- */
-public interface EnhancedConnection extends TopicConnection, QueueConnection, Closeable {
-    
-    /**
-     * Returns the {@link DestinationSource} object which can be used to listen to destinations
-     * being created or destroyed or to enquire about the current destinations available on the broker
-     *
-     * @return a lazily created destination source
-     * @throws JMSException
-     */
-    DestinationSource getDestinationSource() throws JMSException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/FifoMessageDispatchChannel.java b/trunk/activemq-core/src/main/java/org/apache/activemq/FifoMessageDispatchChannel.java
deleted file mode 100644
index 40fc5ab..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/FifoMessageDispatchChannel.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.activemq.command.MessageDispatch;
-
-public class FifoMessageDispatchChannel implements MessageDispatchChannel {
-
-    private final Object mutex = new Object();
-    private final LinkedList<MessageDispatch> list;
-    private boolean closed;
-    private boolean running;
-
-    public FifoMessageDispatchChannel() {
-        this.list = new LinkedList<MessageDispatch>();
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#enqueue(org.apache.activemq.command.MessageDispatch)
-     */
-    public void enqueue(MessageDispatch message) {
-        synchronized (mutex) {
-            list.addLast(message);
-            mutex.notify();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#enqueueFirst(org.apache.activemq.command.MessageDispatch)
-     */
-    public void enqueueFirst(MessageDispatch message) {
-        synchronized (mutex) {
-            list.addFirst(message);
-            mutex.notify();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#isEmpty()
-     */
-    public boolean isEmpty() {
-        synchronized (mutex) {
-            return list.isEmpty();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#dequeue(long)
-     */
-    public MessageDispatch dequeue(long timeout) throws InterruptedException {
-        synchronized (mutex) {
-            // Wait until the consumer is ready to deliver messages.
-            while (timeout != 0 && !closed && (list.isEmpty() || !running)) {
-                if (timeout == -1) {
-                    mutex.wait();
-                } else {
-                    mutex.wait(timeout);
-                    break;
-                }
-            }
-            if (closed || !running || list.isEmpty()) {
-                return null;
-            }
-            return list.removeFirst();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#dequeueNoWait()
-     */
-    public MessageDispatch dequeueNoWait() {
-        synchronized (mutex) {
-            if (closed || !running || list.isEmpty()) {
-                return null;
-            }
-            return list.removeFirst();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#peek()
-     */
-    public MessageDispatch peek() {
-        synchronized (mutex) {
-            if (closed || !running || list.isEmpty()) {
-                return null;
-            }
-            return list.getFirst();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#start()
-     */
-    public void start() {
-        synchronized (mutex) {
-            running = true;
-            mutex.notifyAll();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#stop()
-     */
-    public void stop() {
-        synchronized (mutex) {
-            running = false;
-            mutex.notifyAll();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#close()
-     */
-    public void close() {
-        synchronized (mutex) {
-            if (!closed) {
-                running = false;
-                closed = true;
-            }
-            mutex.notifyAll();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#clear()
-     */
-    public void clear() {
-        synchronized (mutex) {
-            list.clear();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#isClosed()
-     */
-    public boolean isClosed() {
-        return closed;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#size()
-     */
-    public int size() {
-        synchronized (mutex) {
-            return list.size();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#getMutex()
-     */
-    public Object getMutex() {
-        return mutex;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#isRunning()
-     */
-    public boolean isRunning() {
-        return running;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#removeAll()
-     */
-    public List<MessageDispatch> removeAll() {
-        synchronized (mutex) {
-            ArrayList<MessageDispatch> rc = new ArrayList<MessageDispatch>(list);
-            list.clear();
-            return rc;
-        }
-    }
-
-    @Override
-    public String toString() {
-        synchronized (mutex) {
-            return list.toString();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/LocalTransactionEventListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/LocalTransactionEventListener.java
deleted file mode 100755
index c4c69f2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/LocalTransactionEventListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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;
-
-
-/**
- * 
- */
-public interface LocalTransactionEventListener {
-    void beginEvent();
-
-    void commitEvent();
-
-    void rollbackEvent();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/Message.java b/trunk/activemq-core/src/main/java/org/apache/activemq/Message.java
deleted file mode 100644
index e9d2358..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/Message.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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;
-
-/**
- * Represents the JMS extension methods in Apache ActiveMQ
- *
- * 
- */
-public interface Message extends javax.jms.Message {
-
-    /**
-     * Returns the MIME type of this mesage. This can be used in selectors to filter on
-     * the MIME types of the different JMS messages, or in the case of {@link org.apache.activemq.BlobMessage}
-     * it allows you to create a selector on the MIME type of the BLOB body
-     */
-    String getJMSXMimeType();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageAvailableConsumer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/MessageAvailableConsumer.java
deleted file mode 100644
index 4e76b71..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageAvailableConsumer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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;
-
-import javax.jms.MessageConsumer;
-
-/**
- * An extended JMS interface that adds the ability to be notified when a 
- * message is available for consumption using the receive*() methods
- * which is useful in Ajax style subscription models.
- * 
- * 
- */
-public interface MessageAvailableConsumer extends MessageConsumer {
-
-    /**
-     * Sets the listener used to notify synchronous consumers that there is a message
-     * available so that the {@link MessageConsumer#receiveNoWait()} can be called.
-     */
-    void setAvailableListener(MessageAvailableListener availableListener);
-
-    /**
-     * Gets the listener used to notify synchronous consumers that there is a message
-     * available so that the {@link MessageConsumer#receiveNoWait()} can be called.
-     */
-    MessageAvailableListener getAvailableListener();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageAvailableListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/MessageAvailableListener.java
deleted file mode 100644
index 7bf9ee2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageAvailableListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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;
-
-import javax.jms.MessageConsumer;
-
-/**
- * A listener which is notified if a message is available for processing via the
- * receive methods. Typically on receiving this notification you can call 
- * {@link MessageConsumer#receiveNoWait()} to get the new message immediately.
- * 
- * Note that this notification just indicates a message is available for synchronous consumption,
- * it does not actually consume the message.
- * 
- * 
- */
-public interface MessageAvailableListener {
-
-    void onMessageAvailable(MessageConsumer consumer);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageDispatchChannel.java b/trunk/activemq-core/src/main/java/org/apache/activemq/MessageDispatchChannel.java
deleted file mode 100755
index d0354f3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageDispatchChannel.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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;
-
-import java.util.List;
-import javax.jms.JMSException;
-import org.apache.activemq.command.MessageDispatch;
-
-public interface MessageDispatchChannel {
-
-    public abstract void enqueue(MessageDispatch message);
-
-    public abstract void enqueueFirst(MessageDispatch message);
-
-    public abstract boolean isEmpty();
-
-    /**
-     * Used to get an enqueued message. The amount of time this method blocks is
-     * based on the timeout value. - if timeout==-1 then it blocks until a
-     * message is received. - if timeout==0 then it it tries to not block at
-     * all, it returns a message if it is available - if timeout>0 then it
-     * blocks up to timeout amount of time. Expired messages will consumed by
-     * this method.
-     * 
-     * @throws JMSException
-     * @return null if we timeout or if the consumer is closed.
-     * @throws InterruptedException
-     */
-    public abstract MessageDispatch dequeue(long timeout) throws InterruptedException;
-
-    public abstract MessageDispatch dequeueNoWait();
-
-    public abstract MessageDispatch peek();
-
-    public abstract void start();
-
-    public abstract void stop();
-
-    public abstract void close();
-
-    public abstract void clear();
-
-    public abstract boolean isClosed();
-
-    public abstract int size();
-
-    public abstract Object getMutex();
-
-    public abstract boolean isRunning();
-
-    public abstract List<MessageDispatch> removeAll();
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformer.java
deleted file mode 100644
index cf7e024..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformer.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-/**
- * A plugin strategy for transforming a message before it is sent by the JMS client or before it is
- * dispatched to the JMS consumer
- *
- * 
- */
-public interface MessageTransformer {
-
-    /**
-     * Transforms the given message inside the producer before it is sent to the JMS bus.
-     */
-    Message producerTransform(Session session, MessageProducer producer, Message message) throws JMSException;
-
-    /**
-     * Transforms the given message inside the consumer before being dispatched to the client code
-     */
-    Message consumerTransform(Session session, MessageConsumer consumer, Message message)throws JMSException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformerSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformerSupport.java
deleted file mode 100644
index f1f998d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformerSupport.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-/**
- * A useful base class for message transformers.
- *
- * 
- */
-public abstract class MessageTransformerSupport implements MessageTransformer {
-
-    /**
-     * Copies the standard JMS and user defined properties from the givem message to the specified message
-     *
-     * @param fromMessage the message to take the properties from
-     * @param toMesage the message to add the properties to
-     * @throws JMSException
-     */
-    protected void copyProperties(Message fromMessage, Message toMesage) throws JMSException {
-        ActiveMQMessageTransformation.copyProperties(fromMessage, toMesage);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/NotStartedException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/NotStartedException.java
deleted file mode 100755
index 0d0a493..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/NotStartedException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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;
-
-import javax.jms.IllegalStateException;
-
-/**
- * An exception thrown when an operation is invoked on a service
- * which has not yet been started.
- *
- * 
- */
-public class NotStartedException extends IllegalStateException {
-
-    private static final long serialVersionUID = -4907909323529887659L;
-
-    public NotStartedException() {
-        super("IllegalState: This service has not yet been started", "AMQ-1003");
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
deleted file mode 100644
index e5e1135..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/RedeliveryPolicy.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * 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;
-
-import java.io.Serializable;
-import java.util.Random;
-
-/**
- * Configuration options used to control how messages are re-delivered when they
- * are rolled back.
- *
- * @org.apache.xbean.XBean element="redeliveryPolicy"
- *
- */
-public class RedeliveryPolicy implements Cloneable, Serializable {
-
-    public static final int NO_MAXIMUM_REDELIVERIES = -1;
-    private static Random randomNumberGenerator;
-
-    // +/-15% for a 30% spread -cgs
-    private double collisionAvoidanceFactor = 0.15d;
-    private int maximumRedeliveries = 6;
-    private long maximumRedeliveryDelay = -1;
-    private long initialRedeliveryDelay = 1000L;
-    private boolean useCollisionAvoidance;
-    private boolean useExponentialBackOff;
-    private double backOffMultiplier = 5.0;
-    private long redeliveryDelay = initialRedeliveryDelay;
-
-    public RedeliveryPolicy() {
-    }
-
-    public RedeliveryPolicy copy() {
-        try {
-            return (RedeliveryPolicy)clone();
-        } catch (CloneNotSupportedException e) {
-            throw new RuntimeException("Could not clone: " + e, e);
-        }
-    }
-
-    public double getBackOffMultiplier() {
-        return backOffMultiplier;
-    }
-
-    public void setBackOffMultiplier(double backOffMultiplier) {
-        this.backOffMultiplier = backOffMultiplier;
-    }
-
-    public short getCollisionAvoidancePercent() {
-        return (short)Math.round(collisionAvoidanceFactor * 100);
-    }
-
-    public void setCollisionAvoidancePercent(short collisionAvoidancePercent) {
-        this.collisionAvoidanceFactor = collisionAvoidancePercent * 0.01d;
-    }
-
-    public long getInitialRedeliveryDelay() {
-        return initialRedeliveryDelay;
-    }
-
-    public void setInitialRedeliveryDelay(long initialRedeliveryDelay) {
-        this.initialRedeliveryDelay = initialRedeliveryDelay;
-    }
-
-    public long getMaximumRedeliveryDelay() {
-        return maximumRedeliveryDelay;
-    }
-
-    public void setMaximumRedeliveryDelay(long maximumRedeliveryDelay) {
-        this.maximumRedeliveryDelay = maximumRedeliveryDelay;
-    }
-
-    public int getMaximumRedeliveries() {
-        return maximumRedeliveries;
-    }
-
-    public void setMaximumRedeliveries(int maximumRedeliveries) {
-        this.maximumRedeliveries = maximumRedeliveries;
-    }
-
-    public long getNextRedeliveryDelay(long previousDelay) {
-        long nextDelay;
-
-        if (previousDelay == 0) {
-            nextDelay = redeliveryDelay;
-        } else if (useExponentialBackOff && backOffMultiplier > 1) {
-            nextDelay = (long) (previousDelay * backOffMultiplier);
-            if(maximumRedeliveryDelay != -1 && nextDelay > maximumRedeliveryDelay) {
-                // in case the user made max redelivery delay less than redelivery delay for some reason.
-                nextDelay = Math.max(maximumRedeliveryDelay, redeliveryDelay);
-            }
-        } else {
-            nextDelay = previousDelay;
-        }
-
-        if (useCollisionAvoidance) {
-            /*
-             * First random determines +/-, second random determines how far to
-             * go in that direction. -cgs
-             */
-            Random random = getRandomNumberGenerator();
-            double variance = (random.nextBoolean() ? collisionAvoidanceFactor : -collisionAvoidanceFactor) * random.nextDouble();
-            nextDelay += nextDelay * variance;
-        }
-
-        return nextDelay;
-    }
-
-    public boolean isUseCollisionAvoidance() {
-        return useCollisionAvoidance;
-    }
-
-    public void setUseCollisionAvoidance(boolean useCollisionAvoidance) {
-        this.useCollisionAvoidance = useCollisionAvoidance;
-    }
-
-    public boolean isUseExponentialBackOff() {
-        return useExponentialBackOff;
-    }
-
-    public void setUseExponentialBackOff(boolean useExponentialBackOff) {
-        this.useExponentialBackOff = useExponentialBackOff;
-    }
-
-    protected static synchronized Random getRandomNumberGenerator() {
-        if (randomNumberGenerator == null) {
-            randomNumberGenerator = new Random();
-        }
-        return randomNumberGenerator;
-    }
-
-    public void setRedeliveryDelay(long redeliveryDelay) {
-        this.redeliveryDelay = redeliveryDelay;
-    }
-
-    public long getRedeliveryDelay() {
-        return redeliveryDelay;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ScheduledMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ScheduledMessage.java
deleted file mode 100644
index fb63d87..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ScheduledMessage.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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;
-
-public interface ScheduledMessage {
-    /**
-     * The time in milliseconds that a message will wait before being scheduled to be
-     * delivered by the broker
-     */
-    public static final String AMQ_SCHEDULED_DELAY = "AMQ_SCHEDULED_DELAY";
-    /**
-     * The time in milliseconds to wait after the start time to wait before scheduling the message again
-     */
-    public static final String AMQ_SCHEDULED_PERIOD = "AMQ_SCHEDULED_PERIOD";
-    /**
-     * The number of times to repeat scheduling a message for delivery
-     */
-    public static final String AMQ_SCHEDULED_REPEAT = "AMQ_SCHEDULED_REPEAT";
-    /**
-     * Use a Cron tab entry to set the schedule
-     */
-    public static final String AMQ_SCHEDULED_CRON = "AMQ_SCHEDULED_CRON";
-    /**
-     * An Id that is assigned to a Scheduled Message, this value is only available once the
-     * Message is scheduled, Messages sent to the Browse Destination or delivered to the
-     * assigned Destination will have this value set.
-     */
-    public static final String AMQ_SCHEDULED_ID = "scheduledJobId";
-
-    /**
-     * Special destination to send Message's to with an assigned "action" that the Scheduler
-     * should perform such as removing a message.
-     */
-    public static final String AMQ_SCHEDULER_MANAGEMENT_DESTINATION = "ActiveMQ.Scheduler.Management";
-    /**
-     * Used to specify that a some operation should be performed on the Scheduled Message,
-     * the Message must have an assigned Id for this action to be taken.
-     */
-    public static final String AMQ_SCHEDULER_ACTION = "AMQ_SCHEDULER_ACTION";
-
-    /**
-     * Indicates that a browse of the Scheduled Messages is being requested.
-     */
-    public static final String AMQ_SCHEDULER_ACTION_BROWSE = "BROWSE";
-    /**
-     * Indicates that a Scheduled Message is to be remove from the Scheduler, the Id of
-     * the scheduled message must be set as a property in order for this action to have
-     * any effect.
-     */
-    public static final String AMQ_SCHEDULER_ACTION_REMOVE = "REMOVE";
-    /**
-     * Indicates that all scheduled Messages should be removed.
-     */
-    public static final String AMQ_SCHEDULER_ACTION_REMOVEALL = "REMOVEALL";
-
-    /**
-     * A property that holds the beginning of the time interval that the specified action should
-     * be applied within.  Maps to a long value that specified time in milliseconds since UTC.
-     */
-    public static final String AMQ_SCHEDULER_ACTION_START_TIME = "ACTION_START_TIME";
-    /**
-     * A property that holds the end of the time interval that the specified action should be
-     * applied within.  Maps to a long value that specified time in milliseconds since UTC.
-     */
-    public static final String AMQ_SCHEDULER_ACTION_END_TIME = "ACTION_END_TIME";
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/Service.java b/trunk/activemq-core/src/main/java/org/apache/activemq/Service.java
deleted file mode 100644
index 0d76a2d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/Service.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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;
-
-
-/**
- * The core lifecyle interface for ActiveMQ components.
- *  
- * If there was a standard way to do so, it'd be good to register this 
- * interface with Spring so it treats the start/stop methods as those of
- * {@link org.springframework.beans.factory.InitializingBean} 
- * and {@link org.springframework.beans.factory.DisposableBean}
- * 
- * 
- */
-public interface Service {
-
-    void start() throws Exception;
-    
-    void stop() throws Exception;
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/SimplePriorityMessageDispatchChannel.java b/trunk/activemq-core/src/main/java/org/apache/activemq/SimplePriorityMessageDispatchChannel.java
deleted file mode 100644
index 2c603b0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/SimplePriorityMessageDispatchChannel.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.activemq.command.MessageDispatch;
-
-public class SimplePriorityMessageDispatchChannel implements MessageDispatchChannel {
-    private static final Integer MAX_PRIORITY = 10;
-    private final Object mutex = new Object();
-    private final LinkedList<MessageDispatch>[] lists;
-    private boolean closed;
-    private boolean running;
-    private int size = 0;
-
-    public SimplePriorityMessageDispatchChannel() {
-        this.lists = new LinkedList[MAX_PRIORITY];
-        for (int i = 0; i < MAX_PRIORITY; i++) {
-            lists[i] = new LinkedList<MessageDispatch>();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see
-     * org.apache.activemq.MessageDispatchChannelI#enqueue(org.apache.activemq
-     * .command.MessageDispatch)
-     */
-    public void enqueue(MessageDispatch message) {
-        synchronized (mutex) {
-            getList(message).addLast(message);
-
-            this.size++;
-            mutex.notify();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see
-     * org.apache.activemq.MessageDispatchChannelI#enqueueFirst(org.apache.activemq
-     * .command.MessageDispatch)
-     */
-    public void enqueueFirst(MessageDispatch message) {
-        synchronized (mutex) {
-            getList(message).addFirst(message);
-            this.size++;
-            mutex.notify();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#isEmpty()
-     */
-    public boolean isEmpty() {
-        // synchronized (mutex) {
-        return this.size == 0;
-        // }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#dequeue(long)
-     */
-    public MessageDispatch dequeue(long timeout) throws InterruptedException {
-        synchronized (mutex) {
-            // Wait until the consumer is ready to deliver messages.
-            while (timeout != 0 && !closed && (isEmpty() || !running)) {
-                if (timeout == -1) {
-                    mutex.wait();
-                } else {
-                    mutex.wait(timeout);
-                    break;
-                }
-            }
-            if (closed || !running || isEmpty()) {
-                return null;
-            }
-            return removeFirst();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#dequeueNoWait()
-     */
-    public MessageDispatch dequeueNoWait() {
-        synchronized (mutex) {
-            if (closed || !running || isEmpty()) {
-                return null;
-            }
-            return removeFirst();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#peek()
-     */
-    public MessageDispatch peek() {
-        synchronized (mutex) {
-            if (closed || !running || isEmpty()) {
-                return null;
-            }
-            return getFirst();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#start()
-     */
-    public void start() {
-        synchronized (mutex) {
-            running = true;
-            mutex.notifyAll();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#stop()
-     */
-    public void stop() {
-        synchronized (mutex) {
-            running = false;
-            mutex.notifyAll();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#close()
-     */
-    public void close() {
-        synchronized (mutex) {
-            if (!closed) {
-                running = false;
-                closed = true;
-            }
-            mutex.notifyAll();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#clear()
-     */
-    public void clear() {
-        synchronized (mutex) {
-            for (int i = 0; i < MAX_PRIORITY; i++) {
-                lists[i].clear();
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#isClosed()
-     */
-    public boolean isClosed() {
-        return closed;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#size()
-     */
-    public int size() {
-        synchronized (mutex) {
-            return this.size;
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#getMutex()
-     */
-    public Object getMutex() {
-        return mutex;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#isRunning()
-     */
-    public boolean isRunning() {
-        return running;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.MessageDispatchChannelI#removeAll()
-     */
-    public List<MessageDispatch> removeAll() {
-
-        synchronized (mutex) {
-            ArrayList<MessageDispatch> result = new ArrayList<MessageDispatch>(size());
-            for (int i = MAX_PRIORITY - 1; i >= 0; i--) {
-                List<MessageDispatch> list = lists[i];
-                result.addAll(list);
-                size -= list.size();
-                list.clear();
-            }
-            return result;
-        }
-    }
-
-    @Override
-    public String toString() {
-
-        String result = "";
-        for (int i = MAX_PRIORITY - 1; i >= 0; i--) {
-            result += i + ":{" + lists[i].toString() + "}";
-        }
-        return result;
-
-    }
-
-    protected int getPriority(MessageDispatch message) {
-        int priority = javax.jms.Message.DEFAULT_PRIORITY;
-        if (message.getMessage() != null) {
-	        priority = Math.max(message.getMessage().getPriority(), 0);
-	        priority = Math.min(priority, 9);
-        }
-        return priority;
-    }
-
-    protected LinkedList<MessageDispatch> getList(MessageDispatch md) {
-        return lists[getPriority(md)];
-    }
-
-    private final MessageDispatch removeFirst() {
-        if (this.size > 0) {
-            for (int i = MAX_PRIORITY - 1; i >= 0; i--) {
-                LinkedList<MessageDispatch> list = lists[i];
-                if (!list.isEmpty()) {
-                    this.size--;
-                    return list.removeFirst();
-                }
-            }
-        }
-        return null;
-    }
-
-    private final MessageDispatch getFirst() {
-        if (this.size > 0) {
-            for (int i = MAX_PRIORITY - 1; i >= 0; i--) {
-                LinkedList<MessageDispatch> list = lists[i];
-                if (!list.isEmpty()) {
-                    return list.getFirst();
-                }
-            }
-        }
-        return null;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/StreamConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/StreamConnection.java
deleted file mode 100644
index 3684719..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/StreamConnection.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import javax.jms.Topic;
-
-/**
- * The StreamConnection interface allows you to send and receive data from a
- * Destination in using standard java InputStream and OutputStream objects. It's
- * best use case is to send and receive large amounts of data that would be to
- * large to hold in a single JMS message.
- * 
- * 
- */
-public interface StreamConnection extends Connection {
-
-    InputStream createInputStream(Destination dest) throws JMSException;
-
-    InputStream createInputStream(Destination dest, String messageSelector) throws JMSException;
-
-    InputStream createInputStream(Destination dest, String messageSelector, boolean noLocal) throws JMSException;
-
-    InputStream createInputStream(Destination dest, String messageSelector, boolean noLocal, long timeout) throws JMSException;
-
-    InputStream createDurableInputStream(Topic dest, String name) throws JMSException;
-
-    InputStream createDurableInputStream(Topic dest, String name, String messageSelector) throws JMSException;
-
-    InputStream createDurableInputStream(Topic dest, String name, String messageSelector, boolean noLocal) throws JMSException;
-    
-    InputStream createDurableInputStream(Topic dest, String name, String messageSelector, boolean noLocal, long timeout) throws JMSException;
-
-    OutputStream createOutputStream(Destination dest) throws JMSException;
-
-    OutputStream createOutputStream(Destination dest, Map<String, Object> streamProperties, int deliveryMode, int priority, long timeToLive) throws JMSException;
-
-    /**
-     * Unsubscribes a durable subscription that has been created by a client.
-     * <P>
-     * This method deletes the state being maintained on behalf of the
-     * subscriber by its provider.
-     * <P>
-     * It is erroneous for a client to delete a durable subscription while there
-     * is an active <CODE>MessageConsumer </CODE> or
-     * <CODE>TopicSubscriber</CODE> for the subscription, or while a consumed
-     * message is part of a pending transaction or has not been acknowledged in
-     * the session.
-     * 
-     * @param name the name used to identify this subscription
-     * @throws JMSException if the session fails to unsubscribe to the durable
-     *                 subscription due to some internal error.
-     * @throws InvalidDestinationException if an invalid subscription name is
-     *                 specified.
-     * @since 1.1
-     */
-    void unsubscribe(String name) throws JMSException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/ThreadPriorities.java b/trunk/activemq-core/src/main/java/org/apache/activemq/ThreadPriorities.java
deleted file mode 100755
index d15fff5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/ThreadPriorities.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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;
-
-
-/**
-* A holder for different thread priorites used in ActiveMQ
-* 
-* 
-*/
-
-public interface ThreadPriorities {
-    int INBOUND_BROKER_CONNECTION = 6;
-    int OUT_BOUND_BROKER_DISPATCH = 6;
-    int INBOUND_CLIENT_CONNECTION = 7;
-    int INBOUND_CLIENT_SESSION = 7;
-    int BROKER_MANAGEMENT = 9;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
deleted file mode 100755
index 61bf063..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
+++ /dev/null
@@ -1,759 +0,0 @@
-/**
- * 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;
-
-import java.io.InterruptedIOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.jms.JMSException;
-import javax.jms.TransactionInProgressException;
-import javax.jms.TransactionRolledBackException;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.IntegerResponse;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A TransactionContext provides the means to control a JMS transaction. It
- * provides a local transaction interface and also an XAResource interface. <p/>
- * An application server controls the transactional assignment of an XASession
- * by obtaining its XAResource. It uses the XAResource to assign the session to
- * a transaction, prepare and commit work on the transaction, and so on. <p/> An
- * XAResource provides some fairly sophisticated facilities for interleaving
- * work on multiple transactions, recovering a list of transactions in progress,
- * and so on. A JTA aware JMS provider must fully implement this functionality.
- * This could be done by using the services of a database that supports XA, or a
- * JMS provider may choose to implement this functionality from scratch. <p/>
- * 
- * 
- * @see javax.jms.Session
- * @see javax.jms.QueueSession
- * @see javax.jms.TopicSession
- * @see javax.jms.XASession
- */
-public class TransactionContext implements XAResource {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TransactionContext.class);
-
-    // XATransactionId -> ArrayList of TransactionContext objects
-    private final static ConcurrentHashMap<TransactionId, List<TransactionContext>> ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap<TransactionId, List<TransactionContext>>();
-
-    private final ActiveMQConnection connection;
-    private final LongSequenceGenerator localTransactionIdGenerator;
-    private final ConnectionId connectionId;
-    private List<Synchronization> synchronizations;
-
-    // To track XA transactions.
-    private Xid associatedXid;
-    private TransactionId transactionId;
-    private LocalTransactionEventListener localTransactionEventListener;
-    private int beforeEndIndex;
-
-    public TransactionContext(ActiveMQConnection connection) {
-        this.connection = connection;
-        this.localTransactionIdGenerator = connection.getLocalTransactionIdGenerator();
-        this.connectionId = connection.getConnectionInfo().getConnectionId();
-    }
-
-    public boolean isInXATransaction() {
-        return (transactionId != null && transactionId.isXATransaction()) || !ENDED_XA_TRANSACTION_CONTEXTS.isEmpty();
-    }
-
-    public boolean isInLocalTransaction() {
-        return transactionId != null && transactionId.isLocalTransaction();
-    }
-
-    public boolean isInTransaction() {
-        return transactionId != null;
-    }
-    
-    /**
-     * @return Returns the localTransactionEventListener.
-     */
-    public LocalTransactionEventListener getLocalTransactionEventListener() {
-        return localTransactionEventListener;
-    }
-
-    /**
-     * Used by the resource adapter to listen to transaction events.
-     * 
-     * @param localTransactionEventListener The localTransactionEventListener to
-     *                set.
-     */
-    public void setLocalTransactionEventListener(LocalTransactionEventListener localTransactionEventListener) {
-        this.localTransactionEventListener = localTransactionEventListener;
-    }
-
-    // ///////////////////////////////////////////////////////////
-    //
-    // Methods that work with the Synchronization objects registered with
-    // the transaction.
-    //
-    // ///////////////////////////////////////////////////////////
-
-    public void addSynchronization(Synchronization s) {
-        if (synchronizations == null) {
-            synchronizations = new ArrayList<Synchronization>(10);
-        }
-        synchronizations.add(s);
-    }
-
-    private void afterRollback() throws JMSException {
-        if (synchronizations == null) {
-            return;
-        }
-
-        int size = synchronizations.size();
-        try {
-            for (int i = 0; i < size; i++) {
-                synchronizations.get(i).afterRollback();
-            }
-        } catch (JMSException e) {
-            throw e;
-        } catch (Throwable e) {
-            throw JMSExceptionSupport.create(e);
-        } finally {
-            synchronizations = null;
-        }
-    }
-
-    private void afterCommit() throws JMSException {
-        if (synchronizations == null) {
-            return;
-        }
-
-        int size = synchronizations.size();
-        try {
-            for (int i = 0; i < size; i++) {
-                synchronizations.get(i).afterCommit();
-            }
-        } catch (JMSException e) {
-            throw e;
-        } catch (Throwable e) {
-            throw JMSExceptionSupport.create(e);
-        } finally {
-            synchronizations = null;
-        }
-    }
-
-    private void beforeEnd() throws JMSException {
-        if (synchronizations == null) {
-            return;
-        }
-
-        int size = synchronizations.size();
-        try {
-            for (;beforeEndIndex < size;) {
-                synchronizations.get(beforeEndIndex++).beforeEnd();
-            }
-        } catch (JMSException e) {
-            throw e;
-        } catch (Throwable e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    public TransactionId getTransactionId() {
-        return transactionId;
-    }
-
-    // ///////////////////////////////////////////////////////////
-    //
-    // Local transaction interface.
-    //
-    // ///////////////////////////////////////////////////////////
-
-    /**
-     * Start a local transaction.
-     * @throws javax.jms.JMSException on internal error
-     */
-    public void begin() throws JMSException {
-
-        if (isInXATransaction()) {
-            throw new TransactionInProgressException("Cannot start local transaction.  XA transaction is already in progress.");
-        }
-        
-        if (transactionId == null) {
-            synchronizations = null;
-            beforeEndIndex = 0;
-            this.transactionId = new LocalTransactionId(connectionId, localTransactionIdGenerator.getNextSequenceId());
-            TransactionInfo info = new TransactionInfo(getConnectionId(), transactionId, TransactionInfo.BEGIN);
-            this.connection.ensureConnectionInfoSent();
-            this.connection.asyncSendPacket(info);
-
-            // Notify the listener that the tx was started.
-            if (localTransactionEventListener != null) {
-                localTransactionEventListener.beginEvent();
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Begin:" + transactionId);
-            }
-        }
-        
-    }
-
-    /**
-     * Rolls back any work done in this transaction and releases any locks
-     * currently held.
-     * 
-     * @throws JMSException if the JMS provider fails to roll back the
-     *                 transaction due to some internal error.
-     * @throws javax.jms.IllegalStateException if the method is not called by a
-     *                 transacted session.
-     */
-    public void rollback() throws JMSException {
-        if (isInXATransaction()) {
-            throw new TransactionInProgressException("Cannot rollback() if an XA transaction is already in progress ");
-        }
-        
-        try {
-            beforeEnd();
-        } catch (TransactionRolledBackException canOcurrOnFailover) {
-            LOG.warn("rollback processing error", canOcurrOnFailover);
-        }
-        if (transactionId != null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Rollback: "  + transactionId
-                + " syncCount: " 
-                + (synchronizations != null ? synchronizations.size() : 0));
-            }
-
-            TransactionInfo info = new TransactionInfo(getConnectionId(), transactionId, TransactionInfo.ROLLBACK);
-            this.transactionId = null;
-            //make this synchronous - see https://issues.apache.org/activemq/browse/AMQ-2364
-            this.connection.syncSendPacket(info);
-            // Notify the listener that the tx was rolled back
-            if (localTransactionEventListener != null) {
-                localTransactionEventListener.rollbackEvent();
-            }
-        }
-
-        afterRollback();
-    }
-
-    /**
-     * Commits all work done in this transaction and releases any locks
-     * currently held.
-     * 
-     * @throws JMSException if the JMS provider fails to commit the transaction
-     *                 due to some internal error.
-     * @throws javax.jms.IllegalStateException if the method is not called by a
-     *                 transacted session.
-     */
-    public void commit() throws JMSException {
-        if (isInXATransaction()) {
-            throw new TransactionInProgressException("Cannot commit() if an XA transaction is already in progress ");
-        }
-        
-        try {
-            beforeEnd();
-        } catch (JMSException e) {
-            rollback();
-            throw e;
-        }
-
-        // Only send commit if the transaction was started.
-        if (transactionId != null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Commit: "  + transactionId
-                        + " syncCount: " 
-                        + (synchronizations != null ? synchronizations.size() : 0));
-            }
-
-            TransactionInfo info = new TransactionInfo(getConnectionId(), transactionId, TransactionInfo.COMMIT_ONE_PHASE);
-            this.transactionId = null;
-            // Notify the listener that the tx was committed back
-            try {
-                syncSendPacketWithInterruptionHandling(info);
-                if (localTransactionEventListener != null) {
-                    localTransactionEventListener.commitEvent();
-                }
-                afterCommit();
-            } catch (JMSException cause) {
-                LOG.info("commit failed for transaction " + info.getTransactionId(), cause);
-                if (localTransactionEventListener != null) {
-                    localTransactionEventListener.rollbackEvent();
-                }
-                afterRollback();
-                throw cause;
-            }
-            
-        }
-    }
-
-    // ///////////////////////////////////////////////////////////
-    //
-    // XAResource Implementation
-    //
-    // ///////////////////////////////////////////////////////////
-    /**
-     * Associates a transaction with the resource.
-     */
-    public void start(Xid xid, int flags) throws XAException {
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Start: " + xid);
-        }
-        if (isInLocalTransaction()) {
-            throw new XAException(XAException.XAER_PROTO);
-        }
-        // Are we already associated?
-        if (associatedXid != null) {
-            throw new XAException(XAException.XAER_PROTO);
-        }
-
-        // if ((flags & TMJOIN) == TMJOIN) {
-        // TODO: verify that the server has seen the xid
-        // // }
-        // if ((flags & TMJOIN) == TMRESUME) {
-        // // TODO: verify that the xid was suspended.
-        // }
-
-        // associate
-        synchronizations = null;
-        beforeEndIndex = 0;
-        setXid(xid);
-    }
-
-    /**
-     * @return connectionId for connection
-     */
-    private ConnectionId getConnectionId() {
-        return connection.getConnectionInfo().getConnectionId();
-    }
-
-    public void end(Xid xid, int flags) throws XAException {
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("End: " + xid);
-        }
-        
-        if (isInLocalTransaction()) {
-            throw new XAException(XAException.XAER_PROTO);
-        }
-        
-        if ((flags & (TMSUSPEND | TMFAIL)) != 0) {
-            // You can only suspend the associated xid.
-            if (!equals(associatedXid, xid)) {
-                throw new XAException(XAException.XAER_PROTO);
-            }
-
-            // TODO: we may want to put the xid in a suspended list.
-            try {
-                beforeEnd();
-            } catch (JMSException e) {
-                throw toXAException(e);
-            }
-            setXid(null);
-        } else if ((flags & TMSUCCESS) == TMSUCCESS) {
-            // set to null if this is the current xid.
-            // otherwise this could be an asynchronous success call
-            if (equals(associatedXid, xid)) {
-                try {
-                    beforeEnd();
-                } catch (JMSException e) {
-                    throw toXAException(e);
-                }
-                setXid(null);
-            }
-        } else {
-            throw new XAException(XAException.XAER_INVAL);
-        }
-    }
-
-    private boolean equals(Xid xid1, Xid xid2) {
-        if (xid1 == xid2) {
-            return true;
-        }
-        if (xid1 == null ^ xid2 == null) {
-            return false;
-        }
-        return xid1.getFormatId() == xid2.getFormatId() && Arrays.equals(xid1.getBranchQualifier(), xid2.getBranchQualifier())
-               && Arrays.equals(xid1.getGlobalTransactionId(), xid2.getGlobalTransactionId());
-    }
-
-    public int prepare(Xid xid) throws XAException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Prepare: " + xid);
-        }
-        
-        // We allow interleaving multiple transactions, so
-        // we don't limit prepare to the associated xid.
-        XATransactionId x;
-        // THIS SHOULD NEVER HAPPEN because end(xid, TMSUCCESS) should have been
-        // called first
-        if (xid == null || (equals(associatedXid, xid))) {
-            throw new XAException(XAException.XAER_PROTO);
-        } else {
-            // TODO: cache the known xids so we don't keep recreating this one??
-            x = new XATransactionId(xid);
-        }
-
-        try {
-            TransactionInfo info = new TransactionInfo(getConnectionId(), x, TransactionInfo.PREPARE);
-
-            // Find out if the server wants to commit or rollback.
-            IntegerResponse response = (IntegerResponse)syncSendPacketWithInterruptionHandling(info);
-            if (XAResource.XA_RDONLY == response.getResult()) {
-                // transaction stops now, may be syncs that need a callback
-                List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
-                if (l != null && !l.isEmpty()) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("firing afterCommit callbacks on XA_RDONLY from prepare: " + xid);
-                    }
-                    for (TransactionContext ctx : l) {
-                        ctx.afterCommit();
-                    }
-                }
-            }
-            return response.getResult();
-
-        } catch (JMSException e) {
-            LOG.warn("prepare of: " + x + " failed with: " + e, e);
-            List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
-            if (l != null && !l.isEmpty()) {
-                for (TransactionContext ctx : l) {
-                    try {
-                        ctx.afterRollback();
-                    } catch (Throwable ignored) {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("failed to firing afterRollback callbacks on prepare failure, txid: " + x + ", context: " + ctx, ignored);
-                        }
-                    }
-                }
-            }
-            throw toXAException(e);
-        }
-    }
-
-    public void rollback(Xid xid) throws XAException {
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Rollback: " + xid);
-        }
-        
-        // We allow interleaving multiple transactions, so
-        // we don't limit rollback to the associated xid.
-        XATransactionId x;
-        if (xid == null) {
-            throw new XAException(XAException.XAER_PROTO);
-        }
-        if (equals(associatedXid, xid)) {
-            // I think this can happen even without an end(xid) call. Need to
-            // check spec.
-            x = (XATransactionId)transactionId;
-        } else {
-            x = new XATransactionId(xid);
-        }
-
-        try {
-            this.connection.checkClosedOrFailed();
-            this.connection.ensureConnectionInfoSent();
-
-            // Let the server know that the tx is rollback.
-            TransactionInfo info = new TransactionInfo(getConnectionId(), x, TransactionInfo.ROLLBACK);
-            syncSendPacketWithInterruptionHandling(info);
-
-            List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
-            if (l != null && !l.isEmpty()) {
-                for (TransactionContext ctx : l) {
-                    ctx.afterRollback();
-                }
-            }
-
-        } catch (JMSException e) {
-            throw toXAException(e);
-        }
-    }
-
-    // XAResource interface
-    public void commit(Xid xid, boolean onePhase) throws XAException {
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Commit: " + xid + ", onePhase=" + onePhase);
-        }
-        
-        // We allow interleaving multiple transactions, so
-        // we don't limit commit to the associated xid.
-        XATransactionId x;
-        if (xid == null || (equals(associatedXid, xid))) {
-            // should never happen, end(xid,TMSUCCESS) must have been previously
-            // called
-            throw new XAException(XAException.XAER_PROTO);
-        } else {
-            x = new XATransactionId(xid);
-        }
-
-        try {
-            this.connection.checkClosedOrFailed();
-            this.connection.ensureConnectionInfoSent();
-
-            // Notify the server that the tx was committed back
-            TransactionInfo info = new TransactionInfo(getConnectionId(), x, onePhase ? TransactionInfo.COMMIT_ONE_PHASE : TransactionInfo.COMMIT_TWO_PHASE);
-
-            syncSendPacketWithInterruptionHandling(info);
-
-            List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
-            if (l != null && !l.isEmpty()) {
-                for (TransactionContext ctx : l) {
-                    ctx.afterCommit();
-                }
-            }
-
-        } catch (JMSException e) {
-            LOG.warn("commit of: " + x + " failed with: " + e, e);
-            if (onePhase) {
-                List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
-                if (l != null && !l.isEmpty()) {
-                    for (TransactionContext ctx : l) {
-                        try {
-                            ctx.afterRollback();
-                        } catch (Throwable ignored) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("failed to firing afterRollback callbacks commit failure, txid: " + x + ", context: " + ctx, ignored);
-                            }
-                        }
-                    }
-                }
-            }
-            throw toXAException(e);
-        }
-
-    }
-
-    public void forget(Xid xid) throws XAException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Forget: " + xid);
-        }
-        
-        // We allow interleaving multiple transactions, so
-        // we don't limit forget to the associated xid.
-        XATransactionId x;
-        if (xid == null) {
-            throw new XAException(XAException.XAER_PROTO);
-        }
-        if (equals(associatedXid, xid)) {
-            // TODO determine if this can happen... I think not.
-            x = (XATransactionId)transactionId;
-        } else {
-            x = new XATransactionId(xid);
-        }
-
-        TransactionInfo info = new TransactionInfo(getConnectionId(), x, TransactionInfo.FORGET);
-
-        try {
-            // Tell the server to forget the transaction.
-            syncSendPacketWithInterruptionHandling(info);
-        } catch (JMSException e) {
-            throw toXAException(e);
-        }
-        ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
-    }
-
-    public boolean isSameRM(XAResource xaResource) throws XAException {
-        if (xaResource == null) {
-            return false;
-        }
-        if (!(xaResource instanceof TransactionContext)) {
-            return false;
-        }
-        TransactionContext xar = (TransactionContext)xaResource;
-        try {
-            return getResourceManagerId().equals(xar.getResourceManagerId());
-        } catch (Throwable e) {
-            throw (XAException)new XAException("Could not get resource manager id.").initCause(e);
-        }
-    }
-
-    public Xid[] recover(int flag) throws XAException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Recover: " + flag);
-        }
-        
-        TransactionInfo info = new TransactionInfo(getConnectionId(), null, TransactionInfo.RECOVER);
-        try {
-            this.connection.checkClosedOrFailed();
-            this.connection.ensureConnectionInfoSent();
-
-            DataArrayResponse receipt = (DataArrayResponse)this.connection.syncSendPacket(info);
-            DataStructure[] data = receipt.getData();
-            XATransactionId[] answer;
-            if (data instanceof XATransactionId[]) {
-                answer = (XATransactionId[])data;
-            } else {
-                answer = new XATransactionId[data.length];
-                System.arraycopy(data, 0, answer, 0, data.length);
-            }
-            return answer;
-        } catch (JMSException e) {
-            throw toXAException(e);
-        }
-    }
-
-    public int getTransactionTimeout() throws XAException {
-        return 0;
-    }
-
-    public boolean setTransactionTimeout(int seconds) throws XAException {
-        return false;
-    }
-
-    // ///////////////////////////////////////////////////////////
-    //
-    // Helper methods.
-    //
-    // ///////////////////////////////////////////////////////////
-    private String getResourceManagerId() throws JMSException {
-        return this.connection.getResourceManagerId();
-    }
-
-    private void setXid(Xid xid) throws XAException {
-
-        try {
-            this.connection.checkClosedOrFailed();
-            this.connection.ensureConnectionInfoSent();
-        } catch (JMSException e) {
-            throw toXAException(e);
-        }
-
-        if (xid != null) {
-            // associate
-            associatedXid = xid;
-            transactionId = new XATransactionId(xid);
-
-            TransactionInfo info = new TransactionInfo(connectionId, transactionId, TransactionInfo.BEGIN);
-            try {
-                this.connection.asyncSendPacket(info);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Started XA transaction: " + transactionId);
-                }
-            } catch (JMSException e) {
-                throw toXAException(e);
-            }
-
-        } else {
-
-            if (transactionId != null) {
-                TransactionInfo info = new TransactionInfo(connectionId, transactionId, TransactionInfo.END);
-                try {
-                    syncSendPacketWithInterruptionHandling(info);
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Ended XA transaction: " + transactionId);
-                    }
-                } catch (JMSException e) {
-                    throw toXAException(e);
-                }
-
-                // Add our self to the list of contexts that are interested in
-                // post commit/rollback events.
-                List<TransactionContext> l = ENDED_XA_TRANSACTION_CONTEXTS.get(transactionId);
-                if (l == null) {
-                    l = new ArrayList<TransactionContext>(3);
-                    ENDED_XA_TRANSACTION_CONTEXTS.put(transactionId, l);
-                    l.add(this);
-                } else if (!l.contains(this)) {
-                    l.add(this);
-                }
-            }
-
-            // dis-associate
-            associatedXid = null;
-            transactionId = null;
-        }
-    }
-
-    /**
-     * Sends the given command. Also sends the command in case of interruption,
-     * so that important commands like rollback and commit are never interrupted.
-     * If interruption occurred, set the interruption state of the current 
-     * after performing the action again. 
-     * 
-     * @return the response
-     */
-    private Response syncSendPacketWithInterruptionHandling(Command command) throws JMSException {
-        try {
-            return this.connection.syncSendPacket(command);
-        } catch (JMSException e) {
-            if (e.getLinkedException() instanceof InterruptedIOException) {
-                try {
-                    Thread.interrupted();
-                    return this.connection.syncSendPacket(command);
-                } finally {
-                    Thread.currentThread().interrupt();
-                }               
-            }
-            
-            throw e;
-        }
-    }
-
-    /**
-     * Converts a JMSException from the server to an XAException. if the
-     * JMSException contained a linked XAException that is returned instead.
-     * 
-     * @param e JMSException to convert
-     * @return XAException wrapping original exception or its message
-     */
-    private XAException toXAException(JMSException e) {
-        if (e.getCause() != null && e.getCause() instanceof XAException) {
-            XAException original = (XAException)e.getCause();
-            XAException xae = new XAException(original.getMessage());
-            xae.errorCode = original.errorCode;
-            xae.initCause(original);
-            return xae;
-        }
-
-        XAException xae = new XAException(e.getMessage());
-        xae.errorCode = XAException.XAER_RMFAIL;
-        xae.initCause(e);
-        return xae;
-    }
-
-    public ActiveMQConnection getConnection() {
-        return connection;
-    }
-
-    public void cleanup() {
-        associatedXid = null;
-        transactionId = null;
-    }
-
-    @Override
-    public String toString() {
-        return "TransactionContext{" +
-                "transactionId=" + transactionId +
-                '}';
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
deleted file mode 100755
index 0b861d4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.TopicSubscription;
-import org.apache.activemq.command.*;
-import org.apache.activemq.security.SecurityContext;
-import org.apache.activemq.state.ProducerState;
-import org.apache.activemq.usage.Usage;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This broker filter handles tracking the state of the broker for purposes of
- * publishing advisory messages to advisory consumers.
- * 
- * 
- */
-public class AdvisoryBroker extends BrokerFilter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AdvisoryBroker.class);
-    private static final IdGenerator ID_GENERATOR = new IdGenerator();
-
-    protected final ConcurrentHashMap<ConnectionId, ConnectionInfo> connections = new ConcurrentHashMap<ConnectionId, ConnectionInfo>();
-    protected final ConcurrentHashMap<ConsumerId, ConsumerInfo> consumers = new ConcurrentHashMap<ConsumerId, ConsumerInfo>();
-    protected final ConcurrentHashMap<ProducerId, ProducerInfo> producers = new ConcurrentHashMap<ProducerId, ProducerInfo>();
-    protected final ConcurrentHashMap<ActiveMQDestination, DestinationInfo> destinations = new ConcurrentHashMap<ActiveMQDestination, DestinationInfo>();
-    protected final ProducerId advisoryProducerId = new ProducerId();
-    
-    private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator();
-    
-    public AdvisoryBroker(Broker next) {
-        super(next);
-        advisoryProducerId.setConnectionId(ID_GENERATOR.generateId());
-    }
-
-    @Override
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        super.addConnection(context, info);
-
-        ActiveMQTopic topic = AdvisorySupport.getConnectionAdvisoryTopic();
-        //do not distribute usernames or passwords in advisory
-        ConnectionInfo copy = info.copy();
-        copy.setUserName("");
-        copy.setPassword("");
-        fireAdvisory(context, topic, copy);
-        connections.put(copy.getConnectionId(), copy);
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        Subscription answer = super.addConsumer(context, info);
-        
-        // Don't advise advisory topics.
-        if (!AdvisorySupport.isAdvisoryTopic(info.getDestination())) {
-            ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination());
-            consumers.put(info.getConsumerId(), info);
-            fireConsumerAdvisory(context, info.getDestination(), topic, info);
-        } else {
-            // We need to replay all the previously collected state objects
-            // for this newly added consumer.
-            if (AdvisorySupport.isConnectionAdvisoryTopic(info.getDestination())) {
-                // Replay the connections.
-                for (Iterator<ConnectionInfo> iter = connections.values().iterator(); iter.hasNext();) {
-                    ConnectionInfo value = iter.next();
-                    ActiveMQTopic topic = AdvisorySupport.getConnectionAdvisoryTopic();
-                    fireAdvisory(context, topic, value, info.getConsumerId());
-                }
-            }
-
-            // We need to replay all the previously collected destination
-            // objects
-            // for this newly added consumer.
-            if (AdvisorySupport.isDestinationAdvisoryTopic(info.getDestination())) {
-                // Replay the destinations.
-                for (Iterator<DestinationInfo> iter = destinations.values().iterator(); iter.hasNext();) {
-                    DestinationInfo value = iter.next();
-                    ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(value.getDestination());
-                    fireAdvisory(context, topic, value, info.getConsumerId());
-                }
-            }
-
-            // Replay the producers.
-            if (AdvisorySupport.isProducerAdvisoryTopic(info.getDestination())) {
-                for (Iterator<ProducerInfo> iter = producers.values().iterator(); iter.hasNext();) {
-                    ProducerInfo value = iter.next();
-                    ActiveMQTopic topic = AdvisorySupport.getProducerAdvisoryTopic(value.getDestination());
-                    fireProducerAdvisory(context, value.getDestination(),topic, value, info.getConsumerId());
-                }
-            }
-
-            // Replay the consumers.
-            if (AdvisorySupport.isConsumerAdvisoryTopic(info.getDestination())) {
-                for (Iterator<ConsumerInfo> iter = consumers.values().iterator(); iter.hasNext();) {
-                    ConsumerInfo value = iter.next();
-                    ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(value.getDestination());
-                    fireConsumerAdvisory(context,value.getDestination(), topic, value, info.getConsumerId());
-                }
-            }
-        }
-        return answer;
-    }
-
-    @Override
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        super.addProducer(context, info);
-
-        // Don't advise advisory topics.
-        if (info.getDestination() != null && !AdvisorySupport.isAdvisoryTopic(info.getDestination())) {
-            ActiveMQTopic topic = AdvisorySupport.getProducerAdvisoryTopic(info.getDestination());
-            fireProducerAdvisory(context, info.getDestination(), topic, info);
-            producers.put(info.getProducerId(), info);
-        }
-    }
-
-    @Override
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean create) throws Exception {
-        Destination answer = super.addDestination(context, destination,create);
-        if (!AdvisorySupport.isAdvisoryTopic(destination)) {
-            DestinationInfo info = new DestinationInfo(context.getConnectionId(), DestinationInfo.ADD_OPERATION_TYPE, destination);
-            DestinationInfo previous = destinations.putIfAbsent(destination, info);
-            if( previous==null ) {
-                ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(destination);
-                fireAdvisory(context, topic, info);
-            }
-        }
-        return answer;
-    }
-
-    @Override
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        ActiveMQDestination destination = info.getDestination();
-        next.addDestinationInfo(context, info);
-
-        if (!AdvisorySupport.isAdvisoryTopic(destination)) {
-            DestinationInfo previous = destinations.putIfAbsent(destination, info);
-            if( previous==null ) {
-                ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(destination);
-                fireAdvisory(context, topic, info);
-            }
-        }
-    }
-
-    @Override
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, destination, timeout);
-        DestinationInfo info = destinations.remove(destination);
-        if (info != null) {
-            info.setDestination(destination);
-            info.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE);
-            ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(destination);
-            fireAdvisory(context, topic, info);
-            try {
-                next.removeDestination(context, AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination()), -1);
-            } catch (Exception expectedIfDestinationDidNotExistYet) {                
-            }
-            try {
-                next.removeDestination(context, AdvisorySupport.getProducerAdvisoryTopic(info.getDestination()), -1);
-            } catch (Exception expectedIfDestinationDidNotExistYet) {
-            }
-        }
-
-    }
-
-    @Override
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo destInfo) throws Exception {
-        super.removeDestinationInfo(context, destInfo);   
-        DestinationInfo info = destinations.remove(destInfo.getDestination());
-        if (info != null) {
-            info.setDestination(destInfo.getDestination());
-            info.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE);
-            ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(destInfo.getDestination());
-            fireAdvisory(context, topic, info);
-            try {
-                next.removeDestination(context, AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination()), -1);
-            } catch (Exception expectedIfDestinationDidNotExistYet) {
-            }
-            try {
-                next.removeDestination(context, AdvisorySupport.getProducerAdvisoryTopic(info.getDestination()), -1);
-            
-            } catch (Exception expectedIfDestinationDidNotExistYet) {
-            }
-        }
-
-    }
-
-    @Override
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        super.removeConnection(context, info, error);
-
-        ActiveMQTopic topic = AdvisorySupport.getConnectionAdvisoryTopic();
-        fireAdvisory(context, topic, info.createRemoveCommand());
-        connections.remove(info.getConnectionId());
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        super.removeConsumer(context, info);
-
-        // Don't advise advisory topics.
-        ActiveMQDestination dest = info.getDestination();
-        if (!AdvisorySupport.isAdvisoryTopic(dest)) {
-            ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(dest);
-            consumers.remove(info.getConsumerId());
-            if (!dest.isTemporary() || destinations.containsKey(dest)) {
-            	fireConsumerAdvisory(context,dest, topic, info.createRemoveCommand());
-            }
-        }
-    }
-
-    @Override
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        super.removeProducer(context, info);
-
-        // Don't advise advisory topics.
-        ActiveMQDestination dest = info.getDestination();
-        if (info.getDestination() != null && !AdvisorySupport.isAdvisoryTopic(dest)) {
-            ActiveMQTopic topic = AdvisorySupport.getProducerAdvisoryTopic(dest);
-            producers.remove(info.getProducerId());
-            if (!dest.isTemporary() || destinations.contains(dest)) {
-                fireProducerAdvisory(context, dest,topic, info.createRemoveCommand());
-            }
-        }
-    }
-
-    @Override
-    public void messageExpired(ConnectionContext context, MessageReference messageReference, Subscription subscription) {
-        super.messageExpired(context, messageReference, subscription);
-        try {
-            if(!messageReference.isAdvisory()) {
-                ActiveMQTopic topic = AdvisorySupport.getExpiredMessageTopic(messageReference.getMessage().getDestination());
-                Message payload = messageReference.getMessage().copy();
-                payload.clearBody();
-                ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-                advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_MESSAGE_ID, payload.getMessageId().toString());
-                fireAdvisory(context, topic, payload, null, advisoryMessage);
-            }
-        } catch (Exception e) {
-            handleFireFailure("expired", e);
-        }
-    }
-    
-    @Override
-    public void messageConsumed(ConnectionContext context, MessageReference messageReference) {
-        super.messageConsumed(context, messageReference);
-        try {
-            if(!messageReference.isAdvisory()) {
-                ActiveMQTopic topic = AdvisorySupport.getMessageConsumedAdvisoryTopic(messageReference.getMessage().getDestination());
-                Message payload = messageReference.getMessage().copy();
-                payload.clearBody();
-                fireAdvisory(context, topic,payload);
-            }
-        } catch (Exception e) {
-            handleFireFailure("consumed", e);
-        }
-    }
-    
-    @Override
-    public void messageDelivered(ConnectionContext context, MessageReference messageReference) {
-        super.messageDelivered(context, messageReference);
-        try {
-            if (!messageReference.isAdvisory()) {
-                ActiveMQTopic topic = AdvisorySupport.getMessageDeliveredAdvisoryTopic(messageReference.getMessage().getDestination());
-                Message payload = messageReference.getMessage().copy();
-                payload.clearBody();
-                fireAdvisory(context, topic,payload);
-            }
-        } catch (Exception e) {
-            handleFireFailure("delivered", e);
-        }
-    }
-    
-    @Override
-    public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference) {
-        super.messageDiscarded(context, sub, messageReference);
-        try {
-            if (!messageReference.isAdvisory()) {
-                ActiveMQTopic topic = AdvisorySupport.getMessageDiscardedAdvisoryTopic(messageReference.getMessage().getDestination());
-                Message payload = messageReference.getMessage().copy();
-                payload.clearBody();
-                ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-                if (sub instanceof TopicSubscription) {
-                    advisoryMessage.setIntProperty(AdvisorySupport.MSG_PROPERTY_DISCARDED_COUNT, ((TopicSubscription)sub).discarded());
-                }
-                advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_CONSUMER_ID, sub.getConsumerInfo().getConsumerId().toString());
-                fireAdvisory(context, topic, payload, null, advisoryMessage);
-            }
-        } catch (Exception e) {
-            handleFireFailure("discarded", e);
-        }
-    }
-    
-    @Override
-    public void slowConsumer(ConnectionContext context, Destination destination,Subscription subs) {
-        super.slowConsumer(context, destination,subs);
-        try {
-            ActiveMQTopic topic = AdvisorySupport.getSlowConsumerAdvisoryTopic(destination.getActiveMQDestination());
-            ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-            advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_CONSUMER_ID, subs.getConsumerInfo().getConsumerId().toString());
-            fireAdvisory(context, topic, subs.getConsumerInfo(), null, advisoryMessage);
-        } catch (Exception e) {
-            handleFireFailure("slow consumer", e);
-        }
-    }
-    
-    @Override
-    public void fastProducer(ConnectionContext context,ProducerInfo producerInfo) {
-        super.fastProducer(context, producerInfo);
-        try {
-            ActiveMQTopic topic = AdvisorySupport.getFastProducerAdvisoryTopic(producerInfo.getDestination());
-            ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-            advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_PRODUCER_ID, producerInfo.getProducerId().toString());
-            fireAdvisory(context, topic, producerInfo, null, advisoryMessage);
-        } catch (Exception e) {
-            handleFireFailure("fast producer", e);
-        }
-    }
-    
-    @Override
-    public void isFull(ConnectionContext context, Destination destination, Usage usage) {
-        super.isFull(context, destination, usage);
-        if (AdvisorySupport.isAdvisoryTopic(destination.getActiveMQDestination()) == false) {
-            try {
-
-                ActiveMQTopic topic = AdvisorySupport.getFullAdvisoryTopic(destination.getActiveMQDestination());
-                ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-                advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_USAGE_NAME, usage.getName());
-                fireAdvisory(context, topic, null, null, advisoryMessage);
-
-            } catch (Exception e) {
-                handleFireFailure("is full", e);
-            }
-        }
-    }
-    
-    @Override
-    public void nowMasterBroker() {   
-        super.nowMasterBroker();
-        try {
-            ActiveMQTopic topic = AdvisorySupport.getMasterBrokerAdvisoryTopic();
-            ActiveMQMessage advisoryMessage = new ActiveMQMessage();                       
-            ConnectionContext context = new ConnectionContext();
-            context.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
-            context.setBroker(getBrokerService().getBroker());
-            fireAdvisory(context, topic,null,null,advisoryMessage);
-        } catch (Exception e) {
-            handleFireFailure("now master broker", e);
-        }
-    }
-    
-    @Override
-    public void sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
-                                      Subscription subscription){
-        super.sendToDeadLetterQueue(context, messageReference, subscription);
-        try {
-            if(!messageReference.isAdvisory()) {
-                ActiveMQTopic topic = AdvisorySupport.getMessageDLQdAdvisoryTopic(messageReference.getMessage().getDestination());
-                Message payload = messageReference.getMessage().copy();
-                payload.clearBody();
-                fireAdvisory(context, topic,payload);
-            }
-        } catch (Exception e) {
-            handleFireFailure("add to DLQ", e);
-        } 
-    }
-
-    @Override
-    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
-        try {
-         if (brokerInfo != null) {
-             ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-             advisoryMessage.setBooleanProperty("started", true);
-             advisoryMessage.setBooleanProperty("createdByDuplex", createdByDuplex);
-
-             ActiveMQTopic topic = AdvisorySupport.getNetworkBridgeAdvisoryTopic();
-
-             ConnectionContext context = new ConnectionContext();
-             context.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
-             context.setBroker(getBrokerService().getBroker());
-             fireAdvisory(context, topic, brokerInfo, null, advisoryMessage);
-         }
-        } catch (Exception e) {
-            handleFireFailure("network bridge started", e);
-        }
-    }
-
-    @Override
-    public void networkBridgeStopped(BrokerInfo brokerInfo) {
-        try {
-         if (brokerInfo != null) {
-             ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-             advisoryMessage.setBooleanProperty("started", false);
-
-             ActiveMQTopic topic = AdvisorySupport.getNetworkBridgeAdvisoryTopic();
-
-             ConnectionContext context = new ConnectionContext();
-             context.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
-             context.setBroker(getBrokerService().getBroker());
-             fireAdvisory(context, topic, brokerInfo, null, advisoryMessage);
-         }
-        } catch (Exception e) {
-            handleFireFailure("network bridge stopped", e);
-        }
-    }
-
-    private void handleFireFailure(String message, Throwable cause) {
-        LOG.warn("Failed to fire "  + message + " advisory, reason: " + cause);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(message + " detail", cause);
-        }
-    }
-
-    protected void fireAdvisory(ConnectionContext context, ActiveMQTopic topic, Command command) throws Exception {
-        fireAdvisory(context, topic, command, null);
-    }
-
-    protected void fireAdvisory(ConnectionContext context, ActiveMQTopic topic, Command command, ConsumerId targetConsumerId) throws Exception {
-        ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-        fireAdvisory(context, topic, command, targetConsumerId, advisoryMessage);
-    }
-
-    protected void fireConsumerAdvisory(ConnectionContext context, ActiveMQDestination consumerDestination,ActiveMQTopic topic, Command command) throws Exception {
-        fireConsumerAdvisory(context, consumerDestination,topic, command, null);
-    }
-
-    protected void fireConsumerAdvisory(ConnectionContext context, ActiveMQDestination consumerDestination,ActiveMQTopic topic, Command command, ConsumerId targetConsumerId) throws Exception {
-        ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-        int count = 0;
-        Set<Destination>set = getDestinations(consumerDestination);
-        if (set != null) {
-            for (Destination dest:set) {
-                count += dest.getDestinationStatistics().getConsumers().getCount();
-            }
-        }
-        advisoryMessage.setIntProperty(AdvisorySupport.MSG_PROPERTY_CONSUMER_COUNT, count);
-        
-        fireAdvisory(context, topic, command, targetConsumerId, advisoryMessage);
-    }
-
-    protected void fireProducerAdvisory(ConnectionContext context,ActiveMQDestination producerDestination, ActiveMQTopic topic, Command command) throws Exception {
-        fireProducerAdvisory(context,producerDestination, topic, command, null);
-    }
-
-    protected void fireProducerAdvisory(ConnectionContext context, ActiveMQDestination producerDestination,ActiveMQTopic topic, Command command, ConsumerId targetConsumerId) throws Exception {
-        ActiveMQMessage advisoryMessage = new ActiveMQMessage();
-        int count = 0;
-        if (producerDestination != null) {
-            Set<Destination> set = getDestinations(producerDestination);
-            if (set != null) {
-                for (Destination dest : set) {
-                    count += dest.getDestinationStatistics().getProducers().getCount();
-                }
-            }
-        }
-        advisoryMessage.setIntProperty("producerCount", count);
-        fireAdvisory(context, topic, command, targetConsumerId, advisoryMessage);
-    }
-
-    protected void fireAdvisory(ConnectionContext context, ActiveMQTopic topic, Command command, ConsumerId targetConsumerId, ActiveMQMessage advisoryMessage) throws Exception {
-        if (getBrokerService().isStarted()) {
-            //set properties
-            advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_ORIGIN_BROKER_NAME, getBrokerName());
-            String id = getBrokerId() != null ? getBrokerId().getValue() : "NOT_SET";
-            advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_ORIGIN_BROKER_ID, id);
-            
-            String url = getBrokerService().getVmConnectorURI().toString();
-            if (getBrokerService().getDefaultSocketURIString() != null) {
-                url = getBrokerService().getDefaultSocketURIString();
-            }
-            advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_ORIGIN_BROKER_URL, url);
-            
-            //set the data structure
-            advisoryMessage.setDataStructure(command);
-            advisoryMessage.setPersistent(false);
-            advisoryMessage.setType(AdvisorySupport.ADIVSORY_MESSAGE_TYPE);
-            advisoryMessage.setMessageId(new MessageId(advisoryProducerId, messageIdGenerator.getNextSequenceId()));
-            advisoryMessage.setTargetConsumerId(targetConsumerId);
-            advisoryMessage.setDestination(topic);
-            advisoryMessage.setResponseRequired(false);
-            advisoryMessage.setProducerId(advisoryProducerId);
-            boolean originalFlowControl = context.isProducerFlowControl();
-            final ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-            producerExchange.setConnectionContext(context);
-            producerExchange.setMutable(true);
-            producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
-            try {
-                context.setProducerFlowControl(false);
-                next.send(producerExchange, advisoryMessage);
-            } finally {
-                context.setProducerFlowControl(originalFlowControl);
-            }
-        }
-    }
-
-    public Map<ConnectionId, ConnectionInfo> getAdvisoryConnections() {
-        return connections;
-    }
-
-    public Map<ConsumerId, ConsumerInfo> getAdvisoryConsumers() {
-        return consumers;
-    }
-
-    public Map<ProducerId, ProducerInfo> getAdvisoryProducers() {
-        return producers;
-    }
-
-    public Map<ActiveMQDestination, DestinationInfo> getAdvisoryDestinations() {
-        return destinations;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java
deleted file mode 100755
index 7f1a56b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/**
- * 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.advisory;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQMessageTransformation;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-public final class AdvisorySupport {
-    public static final String ADVISORY_TOPIC_PREFIX = "ActiveMQ.Advisory.";
-    public static final ActiveMQTopic CONNECTION_ADVISORY_TOPIC = new ActiveMQTopic(ADVISORY_TOPIC_PREFIX
-            + "Connection");
-    public static final ActiveMQTopic QUEUE_ADVISORY_TOPIC = new ActiveMQTopic(ADVISORY_TOPIC_PREFIX + "Queue");
-    public static final ActiveMQTopic TOPIC_ADVISORY_TOPIC = new ActiveMQTopic(ADVISORY_TOPIC_PREFIX + "Topic");
-    public static final ActiveMQTopic TEMP_QUEUE_ADVISORY_TOPIC = new ActiveMQTopic(ADVISORY_TOPIC_PREFIX + "TempQueue");
-    public static final ActiveMQTopic TEMP_TOPIC_ADVISORY_TOPIC = new ActiveMQTopic(ADVISORY_TOPIC_PREFIX + "TempTopic");
-    public static final String PRODUCER_ADVISORY_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "Producer.";
-    public static final String QUEUE_PRODUCER_ADVISORY_TOPIC_PREFIX = PRODUCER_ADVISORY_TOPIC_PREFIX + "Queue.";
-    public static final String TOPIC_PRODUCER_ADVISORY_TOPIC_PREFIX = PRODUCER_ADVISORY_TOPIC_PREFIX + "Topic.";
-    public static final String CONSUMER_ADVISORY_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "Consumer.";
-    public static final String QUEUE_CONSUMER_ADVISORY_TOPIC_PREFIX = CONSUMER_ADVISORY_TOPIC_PREFIX + "Queue.";
-    public static final String TOPIC_CONSUMER_ADVISORY_TOPIC_PREFIX = CONSUMER_ADVISORY_TOPIC_PREFIX + "Topic.";
-    public static final String EXPIRED_TOPIC_MESSAGES_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "Expired.Topic.";
-    public static final String EXPIRED_QUEUE_MESSAGES_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "Expired.Queue.";
-    public static final String NO_TOPIC_CONSUMERS_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "NoConsumer.Topic.";
-    public static final String NO_QUEUE_CONSUMERS_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "NoConsumer.Queue.";
-    public static final String SLOW_CONSUMER_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "SlowConsumer.";
-    public static final String FAST_PRODUCER_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "FastProducer.";
-    public static final String MESSAGE_DISCAREDED_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "MessageDiscarded.";
-    public static final String FULL_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "FULL.";
-    public static final String MESSAGE_DELIVERED_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "MessageDelivered.";
-    public static final String MESSAGE_CONSUMED_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "MessageConsumed.";
-    public static final String MESSAGE_DLQ_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "MessageDLQd.";
-    public static final String MASTER_BROKER_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "MasterBroker";
-    public static final String NETWORK_BRIDGE_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX + "NetworkBridge";
-    public static final String AGENT_TOPIC = "ActiveMQ.Agent";
-    public static final String ADIVSORY_MESSAGE_TYPE = "Advisory";
-    public static final String MSG_PROPERTY_ORIGIN_BROKER_ID = "originBrokerId";
-    public static final String MSG_PROPERTY_ORIGIN_BROKER_NAME = "originBrokerName";
-    public static final String MSG_PROPERTY_ORIGIN_BROKER_URL = "originBrokerURL";
-    public static final String MSG_PROPERTY_USAGE_NAME = "usageName";
-    public static final String MSG_PROPERTY_CONSUMER_ID = "consumerId";
-    public static final String MSG_PROPERTY_PRODUCER_ID = "producerId";
-    public static final String MSG_PROPERTY_MESSAGE_ID = "orignalMessageId";
-    public static final String MSG_PROPERTY_CONSUMER_COUNT = "consumerCount";
-    public static final String MSG_PROPERTY_DISCARDED_COUNT = "discardedCount";
-    
-    public static final ActiveMQTopic TEMP_DESTINATION_COMPOSITE_ADVISORY_TOPIC = new ActiveMQTopic(
-            TEMP_QUEUE_ADVISORY_TOPIC.getPhysicalName() + "," + TEMP_TOPIC_ADVISORY_TOPIC.getPhysicalName());
-    private static final ActiveMQTopic AGENT_TOPIC_DESTINATION = new ActiveMQTopic(AGENT_TOPIC);
-
-    private AdvisorySupport() {
-    }
-
-    public static ActiveMQTopic getConnectionAdvisoryTopic() {
-        return CONNECTION_ADVISORY_TOPIC;
-    }
-
-    public static ActiveMQTopic getConsumerAdvisoryTopic(Destination destination) throws JMSException {
-        return getConsumerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getConsumerAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isQueue()) {
-            return new ActiveMQTopic(QUEUE_CONSUMER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
-        } else {
-            return new ActiveMQTopic(TOPIC_CONSUMER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
-        }
-    }
-
-    public static ActiveMQTopic getProducerAdvisoryTopic(Destination destination) throws JMSException {
-        return getProducerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getProducerAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isQueue()) {
-            return new ActiveMQTopic(QUEUE_PRODUCER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
-        } else {
-            return new ActiveMQTopic(TOPIC_PRODUCER_ADVISORY_TOPIC_PREFIX + destination.getPhysicalName());
-        }
-    }
-
-    public static ActiveMQTopic getExpiredMessageTopic(Destination destination) throws JMSException {
-        return getExpiredMessageTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getExpiredMessageTopic(ActiveMQDestination destination) {
-        if (destination.isQueue()) {
-            return getExpiredQueueMessageAdvisoryTopic(destination);
-        }
-        return getExpiredTopicMessageAdvisoryTopic(destination);
-    }
-
-    public static ActiveMQTopic getExpiredTopicMessageAdvisoryTopic(ActiveMQDestination destination) {
-        String name = EXPIRED_TOPIC_MESSAGES_TOPIC_PREFIX + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getExpiredQueueMessageAdvisoryTopic(Destination destination) throws JMSException {
-        return getExpiredQueueMessageAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getExpiredQueueMessageAdvisoryTopic(ActiveMQDestination destination) {
-        String name = EXPIRED_QUEUE_MESSAGES_TOPIC_PREFIX + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getNoTopicConsumersAdvisoryTopic(Destination destination) throws JMSException {
-        return getNoTopicConsumersAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getNoTopicConsumersAdvisoryTopic(ActiveMQDestination destination) {
-        String name = NO_TOPIC_CONSUMERS_TOPIC_PREFIX + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getNoQueueConsumersAdvisoryTopic(Destination destination) throws JMSException {
-        return getNoQueueConsumersAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getNoQueueConsumersAdvisoryTopic(ActiveMQDestination destination) {
-        String name = NO_QUEUE_CONSUMERS_TOPIC_PREFIX + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getSlowConsumerAdvisoryTopic(Destination destination) throws JMSException {
-        return getSlowConsumerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getSlowConsumerAdvisoryTopic(ActiveMQDestination destination) {
-        String name = SLOW_CONSUMER_TOPIC_PREFIX + destination.getDestinationTypeAsString() + "."
-                + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getFastProducerAdvisoryTopic(Destination destination) throws JMSException {
-        return getFastProducerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getFastProducerAdvisoryTopic(ActiveMQDestination destination) {
-        String name = FAST_PRODUCER_TOPIC_PREFIX + destination.getDestinationTypeAsString() + "."
-                + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getMessageDiscardedAdvisoryTopic(Destination destination) throws JMSException {
-        return getMessageDiscardedAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getMessageDiscardedAdvisoryTopic(ActiveMQDestination destination) {
-        String name = MESSAGE_DISCAREDED_TOPIC_PREFIX + destination.getDestinationTypeAsString() + "."
-                + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getMessageDeliveredAdvisoryTopic(Destination destination) throws JMSException {
-        return getMessageDeliveredAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getMessageDeliveredAdvisoryTopic(ActiveMQDestination destination) {
-        String name = MESSAGE_DELIVERED_TOPIC_PREFIX + destination.getDestinationTypeAsString() + "."
-                + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getMessageConsumedAdvisoryTopic(Destination destination) throws JMSException {
-        return getMessageConsumedAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getMessageConsumedAdvisoryTopic(ActiveMQDestination destination) {
-        String name = MESSAGE_CONSUMED_TOPIC_PREFIX + destination.getDestinationTypeAsString() + "."
-                + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-    
-    public static ActiveMQTopic getMessageDLQdAdvisoryTopic(ActiveMQDestination destination) {
-        String name = MESSAGE_DLQ_TOPIC_PREFIX + destination.getDestinationTypeAsString() + "."
-                + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getMasterBrokerAdvisoryTopic(Destination destination) throws JMSException {
-        return getMasterBrokerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getMasterBrokerAdvisoryTopic() {
-        return new ActiveMQTopic(MASTER_BROKER_TOPIC_PREFIX);
-    }
-
-    public static ActiveMQTopic getNetworkBridgeAdvisoryTopic() {
-        return new ActiveMQTopic(NETWORK_BRIDGE_TOPIC_PREFIX);
-    }
-
-    public static ActiveMQTopic getFullAdvisoryTopic(Destination destination) throws JMSException {
-        return getFullAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getFullAdvisoryTopic(ActiveMQDestination destination) {
-        String name = FULL_TOPIC_PREFIX + destination.getDestinationTypeAsString() + "."
-                + destination.getPhysicalName();
-        return new ActiveMQTopic(name);
-    }
-
-    public static ActiveMQTopic getDestinationAdvisoryTopic(Destination destination) throws JMSException {
-        return getDestinationAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static ActiveMQTopic getDestinationAdvisoryTopic(ActiveMQDestination destination) {
-        switch (destination.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            return QUEUE_ADVISORY_TOPIC;
-        case ActiveMQDestination.TOPIC_TYPE:
-            return TOPIC_ADVISORY_TOPIC;
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            return TEMP_QUEUE_ADVISORY_TOPIC;
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            return TEMP_TOPIC_ADVISORY_TOPIC;
-        default:
-            throw new RuntimeException("Unknown destination type: " + destination.getDestinationType());
-        }
-    }
-
-    public static boolean isDestinationAdvisoryTopic(Destination destination) throws JMSException {
-        return isDestinationAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isDestinationAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isDestinationAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.equals(TEMP_QUEUE_ADVISORY_TOPIC) || destination.equals(TEMP_TOPIC_ADVISORY_TOPIC)
-                    || destination.equals(QUEUE_ADVISORY_TOPIC) || destination.equals(TOPIC_ADVISORY_TOPIC);
-        }
-    }
-
-    public static boolean isAdvisoryTopic(Destination destination) throws JMSException {
-        return isAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(ADVISORY_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isConnectionAdvisoryTopic(Destination destination) throws JMSException {
-        return isConnectionAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isConnectionAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isConnectionAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.equals(CONNECTION_ADVISORY_TOPIC);
-        }
-    }
-
-    public static boolean isProducerAdvisoryTopic(Destination destination) throws JMSException {
-        return isProducerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isProducerAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isProducerAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(PRODUCER_ADVISORY_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isConsumerAdvisoryTopic(Destination destination) throws JMSException {
-        return isConsumerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isConsumerAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isConsumerAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(CONSUMER_ADVISORY_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isSlowConsumerAdvisoryTopic(Destination destination) throws JMSException {
-        return isSlowConsumerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isSlowConsumerAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isSlowConsumerAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(SLOW_CONSUMER_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isFastProducerAdvisoryTopic(Destination destination) throws JMSException {
-        return isFastProducerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isFastProducerAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isFastProducerAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(FAST_PRODUCER_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isMessageConsumedAdvisoryTopic(Destination destination) throws JMSException {
-        return isMessageConsumedAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isMessageConsumedAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isMessageConsumedAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(MESSAGE_CONSUMED_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isMasterBrokerAdvisoryTopic(Destination destination) throws JMSException {
-        return isMasterBrokerAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isMasterBrokerAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isMasterBrokerAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(MASTER_BROKER_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isMessageDeliveredAdvisoryTopic(Destination destination) throws JMSException {
-        return isMessageDeliveredAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isMessageDeliveredAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isMessageDeliveredAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(MESSAGE_DELIVERED_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isMessageDiscardedAdvisoryTopic(Destination destination) throws JMSException {
-        return isMessageDiscardedAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isMessageDiscardedAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isMessageDiscardedAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(MESSAGE_DISCAREDED_TOPIC_PREFIX);
-        }
-    }
-
-    public static boolean isFullAdvisoryTopic(Destination destination) throws JMSException {
-        return isFullAdvisoryTopic(ActiveMQMessageTransformation.transformDestination(destination));
-    }
-
-    public static boolean isFullAdvisoryTopic(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations();
-            for (int i = 0; i < compositeDestinations.length; i++) {
-                if (isFullAdvisoryTopic(compositeDestinations[i])) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            return destination.isTopic() && destination.getPhysicalName().startsWith(FULL_TOPIC_PREFIX);
-        }
-    }
-
-    /**
-     * Returns the agent topic which is used to send commands to the broker
-     */
-    public static Destination getAgentDestination() {
-        return AGENT_TOPIC_DESTINATION;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEvent.java
deleted file mode 100644
index dcf6ddf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEvent.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.EventObject;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.command.ConsumerId;
-
-/**
- * An event when the number of consumers on a given destination changes.
- * 
- * 
- */
-public abstract class ConsumerEvent extends EventObject {
-    private static final long serialVersionUID = 2442156576867593780L;
-    private final Destination destination;
-    private final ConsumerId consumerId;
-    private final int consumerCount;
-
-    public ConsumerEvent(ConsumerEventSource source, Destination destination, ConsumerId consumerId, int consumerCount) {
-        super(source);
-        this.destination = destination;
-        this.consumerId = consumerId;
-        this.consumerCount = consumerCount;
-    }
-
-    public ConsumerEventSource getAdvisor() {
-        return (ConsumerEventSource) getSource();
-    }
-
-    public Destination getDestination() {
-        return destination;
-    }
-
-    /**
-     * Returns the current number of consumers active at the time this advisory was sent.
-     * 
-     * Note that this is not the number of consumers active when the consumer started consuming.
-     * It is usually more vital to know how many consumers there are now - rather than historically
-     * how many there were when a consumer started. So if you create a {@link ConsumerListener}
-     * after many consumers have started, you will receive a ConsumerEvent for each consumer. However the
-     * {@link #getConsumerCount()} method will always return the current active consumer count on each event.
-     */
-    public int getConsumerCount() {
-        return consumerCount;
-    }
-
-    public ConsumerId getConsumerId() {
-        return consumerId;
-    }
-
-    public abstract boolean isStarted();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java
deleted file mode 100644
index 40831bc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQMessageConsumer;
-import org.apache.activemq.Service;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.RemoveInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An object which can be used to listen to the number of active consumers
- * available on a given destination.
- * 
- * 
- */
-public class ConsumerEventSource implements Service, MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumerEventSource.class);
-
-    private final Connection connection;
-    private final ActiveMQDestination destination;
-    private ConsumerListener listener;
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private AtomicInteger consumerCount = new AtomicInteger();
-    private Session session;
-    private ActiveMQMessageConsumer consumer;
-
-    public ConsumerEventSource(Connection connection, Destination destination) throws JMSException {
-        this.connection = connection;
-        this.destination = ActiveMQDestination.transform(destination);
-    }
-
-    public void setConsumerListener(ConsumerListener listener) {
-        this.listener = listener;
-    }
-    
-    public String getConsumerId() {
-        return consumer != null ? consumer.getConsumerId().toString() : "NOT_SET";
-    }
-
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            ActiveMQTopic advisoryTopic = AdvisorySupport.getConsumerAdvisoryTopic(destination);
-            consumer = (ActiveMQMessageConsumer) session.createConsumer(advisoryTopic);
-            consumer.setMessageListener(this);
-        }
-    }
-
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            if (session != null) {
-                session.close();
-            }
-        }
-    }
-
-    public void onMessage(Message message) {
-        if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage activeMessage = (ActiveMQMessage)message;
-            Object command = activeMessage.getDataStructure();
-            int count = 0;
-            if (command instanceof ConsumerInfo) {
-                count = consumerCount.incrementAndGet();
-                count = extractConsumerCountFromMessage(message, count);
-                fireConsumerEvent(new ConsumerStartedEvent(this, destination, (ConsumerInfo)command, count));
-            } else if (command instanceof RemoveInfo) {
-                RemoveInfo removeInfo = (RemoveInfo)command;
-                if (removeInfo.isConsumerRemove()) {
-                    count = consumerCount.decrementAndGet();
-                    count = extractConsumerCountFromMessage(message, count);
-                    fireConsumerEvent(new ConsumerStoppedEvent(this, destination, (ConsumerId)removeInfo.getObjectId(), count));
-                }
-            } else {
-                LOG.warn("Unknown command: " + command);
-            }
-        } else {
-            LOG.warn("Unknown message type: " + message + ". Message ignored");
-        }
-    }
-
-    /**
-     * Lets rely by default on the broker telling us what the consumer count is
-     * as it can ensure that we are up to date at all times and have not
-     * received messages out of order etc.
-     */
-    protected int extractConsumerCountFromMessage(Message message, int count) {
-        try {
-            Object value = message.getObjectProperty("consumerCount");
-            if (value instanceof Number) {
-                Number n = (Number)value;
-                return n.intValue();
-            }
-            LOG.warn("No consumerCount header available on the message: " + message);
-        } catch (Exception e) {
-            LOG.warn("Failed to extract consumerCount from message: " + message + ".Reason: " + e, e);
-        }
-        return count;
-    }
-
-    protected void fireConsumerEvent(ConsumerEvent event) {
-        if (listener != null) {
-            listener.onConsumerEvent(event);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerListener.java
deleted file mode 100644
index d1f1989..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.advisory;
-
-/**
- * Listen to the changes in the number of active consumers available for a given destination.
- * 
- * 
- */
-public interface ConsumerListener {
-
-    void onConsumerEvent(ConsumerEvent event);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerStartedEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerStartedEvent.java
deleted file mode 100644
index d228564..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerStartedEvent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.advisory;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-
-/**
- * An event when a new consumer has started.
- * 
- * 
- */
-public class ConsumerStartedEvent extends ConsumerEvent {
-
-    private static final long serialVersionUID = 5088138839609391074L;
-
-    private final  transient ConsumerInfo consumerInfo;
-
-    public ConsumerStartedEvent(ConsumerEventSource source, ActiveMQDestination destination, ConsumerInfo consumerInfo, int count) {
-        super(source, destination, consumerInfo.getConsumerId(), count);
-        this.consumerInfo = consumerInfo;
-    }
-
-    public boolean isStarted() {
-        return true;
-    }
-
-    /**
-     * @return details of the subscription
-     */
-    public ConsumerInfo getConsumerInfo() {
-        return consumerInfo;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerStoppedEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerStoppedEvent.java
deleted file mode 100644
index 5e1983e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerStoppedEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.advisory;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-
-/**
- * An event generated when a consumer stops.
- * 
- * 
- */
-public class ConsumerStoppedEvent extends ConsumerEvent {
-
-    private static final long serialVersionUID = 5378835541037193206L;
-
-    public ConsumerStoppedEvent(ConsumerEventSource source, ActiveMQDestination destination, ConsumerId consumerId, int count) {
-        super(source, destination, consumerId, count);
-    }
-
-    public boolean isStarted() {
-        return false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationEvent.java
deleted file mode 100644
index e46350e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationEvent.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.EventObject;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * An event caused when a destination is created or deleted
- *
- * 
- */
-public class DestinationEvent extends EventObject {
-    private static final long serialVersionUID = 2442156576867593780L;
-    private DestinationInfo destinationInfo;
-
-    public DestinationEvent(DestinationSource source, DestinationInfo destinationInfo) {
-        super(source);
-        this.destinationInfo = destinationInfo;
-    }
-
-    public ActiveMQDestination getDestination() {
-        return getDestinationInfo().getDestination();
-    }
-
-    public boolean isAddOperation() {
-        return getDestinationInfo().isAddOperation();
-    }
-
-    public long getTimeout() {
-        return getDestinationInfo().getTimeout();
-    }
-
-    public boolean isRemoveOperation() {
-        return getDestinationInfo().isRemoveOperation();
-    }
-
-    public DestinationInfo getDestinationInfo() {
-        return destinationInfo;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationListener.java
deleted file mode 100644
index 0ac88e3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.advisory;
-
-/**
- * Listen to the changes in destinations being created or destroyed
- *
- * 
- */
-public interface DestinationListener {
-    void onDestinationEvent(DestinationEvent event);
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationSource.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationSource.java
deleted file mode 100644
index 41fece5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/DestinationSource.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.DestinationInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A helper class which keeps track of the Destinations available in a broker and allows you to listen to them
- * being created or deleted.
- *
- * 
- */
-public class DestinationSource implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumerEventSource.class);
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private final Connection connection;
-    private Session session;
-    private MessageConsumer queueConsumer;
-    private MessageConsumer topicConsumer;
-    private MessageConsumer tempTopicConsumer;
-    private MessageConsumer tempQueueConsumer;
-    private Set<ActiveMQQueue> queues = new CopyOnWriteArraySet<ActiveMQQueue>();
-    private Set<ActiveMQTopic> topics = new CopyOnWriteArraySet<ActiveMQTopic>();
-    private Set<ActiveMQTempQueue> temporaryQueues = new CopyOnWriteArraySet<ActiveMQTempQueue>();
-    private Set<ActiveMQTempTopic> temporaryTopics = new CopyOnWriteArraySet<ActiveMQTempTopic>();
-    private DestinationListener listener;
-
-    public DestinationSource(Connection connection) throws JMSException {
-        this.connection = connection;
-    }
-
-    public DestinationListener getListener() {
-        return listener;
-    }
-
-    public void setDestinationListener(DestinationListener listener) {
-        this.listener = listener;
-    }
-
-    /**
-     * Returns the current queues available on the broker
-     */
-    public Set<ActiveMQQueue> getQueues() {
-        return queues;
-    }
-
-    /**
-     * Returns the current topics on the broker
-     */
-    public Set<ActiveMQTopic> getTopics() {
-        return topics;
-    }
-
-    /**
-     * Returns the current temporary topics available on the broker
-     */
-    public Set<ActiveMQTempQueue> getTemporaryQueues() {
-        return temporaryQueues;
-    }
-
-    /**
-     * Returns the current temporary queues available on the broker
-     */
-    public Set<ActiveMQTempTopic> getTemporaryTopics() {
-        return temporaryTopics;
-    }
-
-    public void start() throws JMSException {
-        if (started.compareAndSet(false, true)) {
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            queueConsumer = session.createConsumer(AdvisorySupport.QUEUE_ADVISORY_TOPIC);
-            queueConsumer.setMessageListener(this);
-
-            topicConsumer = session.createConsumer(AdvisorySupport.TOPIC_ADVISORY_TOPIC);
-            topicConsumer.setMessageListener(this);
-
-            tempQueueConsumer = session.createConsumer(AdvisorySupport.TEMP_QUEUE_ADVISORY_TOPIC);
-            tempQueueConsumer.setMessageListener(this);
-
-            tempTopicConsumer = session.createConsumer(AdvisorySupport.TEMP_TOPIC_ADVISORY_TOPIC);
-            tempTopicConsumer.setMessageListener(this);
-        }
-    }
-
-    public void stop() throws JMSException {
-        if (started.compareAndSet(true, false)) {
-            if (session != null) {
-                session.close();
-            }
-        }
-    }
-
-    public void onMessage(Message message) {
-        if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage activeMessage = (ActiveMQMessage) message;
-            Object command = activeMessage.getDataStructure();
-            if (command instanceof DestinationInfo) {
-                DestinationInfo destinationInfo = (DestinationInfo) command;
-                DestinationEvent event = new DestinationEvent(this, destinationInfo);
-                fireDestinationEvent(event);
-            }
-            else {
-                LOG.warn("Unknown dataStructure: " + command);
-            }
-        }
-        else {
-            LOG.warn("Unknown message type: " + message + ". Message ignored");
-        }
-    }
-
-    protected void fireDestinationEvent(DestinationEvent event) {
-        // now lets update the data structures
-        ActiveMQDestination destination = event.getDestination();
-        boolean add = event.isAddOperation();
-        if (destination instanceof ActiveMQQueue) {
-            ActiveMQQueue queue = (ActiveMQQueue) destination;
-            if (add) {
-                queues.add(queue);
-            }
-            else {
-                queues.remove(queue);
-            }
-        }
-        else if (destination instanceof ActiveMQTopic) {
-            ActiveMQTopic topic = (ActiveMQTopic) destination;
-            if (add) {
-                topics.add(topic);
-            }
-            else {
-                topics.remove(topic);
-            }
-        }
-        else if (destination instanceof ActiveMQTempQueue) {
-            ActiveMQTempQueue queue = (ActiveMQTempQueue) destination;
-            if (add) {
-                temporaryQueues.add(queue);
-            }
-            else {
-                temporaryQueues.remove(queue);
-            }
-        }
-        else if (destination instanceof ActiveMQTempTopic) {
-            ActiveMQTempTopic topic = (ActiveMQTempTopic) destination;
-            if (add) {
-                temporaryTopics.add(topic);
-            }
-            else {
-                temporaryTopics.remove(topic);
-            }
-        }
-        else {
-            LOG.warn("Unknown destination type: " + destination);
-        }
-        if (listener != null) {
-            listener.onDestinationEvent(event);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEvent.java
deleted file mode 100644
index 29c41a7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.EventObject;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.command.ProducerId;
-
-/**
- * An event when the number of producers on a given destination changes.
- * 
- * 
- */
-public abstract class ProducerEvent extends EventObject {
-    private static final long serialVersionUID = 2442156576867593780L;
-    private final Destination destination;
-    private final ProducerId producerId;
-    private final int producerCount;
-
-    public ProducerEvent(ProducerEventSource source, Destination destination, ProducerId producerId, int producerCount) {
-        super(source);
-        this.destination = destination;
-        this.producerId = producerId;
-        this.producerCount = producerCount;
-    }
-
-    public ProducerEventSource getAdvisor() {
-        return (ProducerEventSource) getSource();
-    }
-
-    public Destination getDestination() {
-        return destination;
-    }
-
-    /**
-     * Returns the current number of producers active at the time this advisory was sent.
-     * 
-     */
-    public int getProducerCount() {
-        return producerCount;
-    }
-
-    public ProducerId getProducerId() {
-        return producerId;
-    }
-
-    public abstract boolean isStarted();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java
deleted file mode 100644
index 0a9a2f0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An object which can be used to listen to the number of active consumers
- * available on a given destination.
- * 
- * 
- */
-public class ProducerEventSource implements Service, MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(ProducerEventSource.class);
-
-    private final Connection connection;
-    private final ActiveMQDestination destination;
-    private ProducerListener listener;
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private AtomicInteger producerCount = new AtomicInteger();
-    private Session session;
-    private MessageConsumer consumer;
-
-    public ProducerEventSource(Connection connection, Destination destination) throws JMSException {
-        this.connection = connection;
-        this.destination = ActiveMQDestination.transform(destination);
-    }
-
-    public void setProducerListener(ProducerListener listener) {
-        this.listener = listener;
-    }
-
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            ActiveMQTopic advisoryTopic = AdvisorySupport.getProducerAdvisoryTopic(destination);
-            consumer = session.createConsumer(advisoryTopic);
-            consumer.setMessageListener(this);
-        }
-    }
-
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            if (session != null) {
-                session.close();
-            }
-        }
-    }
-
-    public void onMessage(Message message) {
-        if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage activeMessage = (ActiveMQMessage)message;
-            Object command = activeMessage.getDataStructure();
-            int count = 0;
-            if (command instanceof ProducerInfo) {
-                count = producerCount.incrementAndGet();
-                count = extractProducerCountFromMessage(message, count);
-                fireProducerEvent(new ProducerStartedEvent(this, destination, (ProducerInfo)command, count));
-            } else if (command instanceof RemoveInfo) {
-                RemoveInfo removeInfo = (RemoveInfo)command;
-                if (removeInfo.isProducerRemove()) {
-                    count = producerCount.decrementAndGet();
-                    count = extractProducerCountFromMessage(message, count);
-                    fireProducerEvent(new ProducerStoppedEvent(this, destination, (ProducerId)removeInfo.getObjectId(), count));
-                }
-            } else {
-                LOG.warn("Unknown command: " + command);
-            }
-        } else {
-            LOG.warn("Unknown message type: " + message + ". Message ignored");
-        }
-    }
-
-    protected int extractProducerCountFromMessage(Message message, int count) {
-        try {
-            Object value = message.getObjectProperty("producerCount");
-            if (value instanceof Number) {
-                Number n = (Number)value;
-                return n.intValue();
-            }
-            LOG.warn("No producerCount header available on the message: " + message);
-        } catch (Exception e) {
-            LOG.warn("Failed to extract producerCount from message: " + message + ".Reason: " + e, e);
-        }
-        return count;
-    }
-
-    protected void fireProducerEvent(ProducerEvent event) {
-        if (listener != null) {
-            listener.onProducerEvent(event);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerListener.java
deleted file mode 100644
index d31c521..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.advisory;
-
-/**
- * Listen to the changes in the number of active consumers available for a given destination.
- * 
- * 
- */
-public interface ProducerListener {
-
-    void onProducerEvent(ProducerEvent event);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerStartedEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerStartedEvent.java
deleted file mode 100644
index 7917c60..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerStartedEvent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.advisory;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ProducerInfo;
-
-/**
- * An event when a new consumer has started.
- * 
- * 
- */
-public class ProducerStartedEvent extends ProducerEvent {
-
-    private static final long serialVersionUID = 5088138839609391074L;
-
-    private final  transient ProducerInfo consumerInfo;
-
-    public ProducerStartedEvent(ProducerEventSource source, ActiveMQDestination destination, ProducerInfo consumerInfo, int count) {
-        super(source, destination, consumerInfo.getProducerId(), count);
-        this.consumerInfo = consumerInfo;
-    }
-
-    public boolean isStarted() {
-        return true;
-    }
-
-    /**
-     * @return details of the subscription
-     */
-    public ProducerInfo getProducerInfo() {
-        return consumerInfo;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerStoppedEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerStoppedEvent.java
deleted file mode 100644
index 5868a3a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerStoppedEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.advisory;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ProducerId;
-
-/**
- * An event generated when a consumer stops.
- * 
- * 
- */
-public class ProducerStoppedEvent extends ProducerEvent {
-
-    private static final long serialVersionUID = 5378835541037193206L;
-
-    public ProducerStoppedEvent(ProducerEventSource source, ActiveMQDestination destination, ProducerId consumerId, int count) {
-        super(source, destination, consumerId, count);
-    }
-
-    public boolean isStarted() {
-        return false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/package.html
deleted file mode 100755
index 9573368..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Support for JMS Advisory messages as well as some helper listeners to listen to the clients, producers and consumers available.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobDownloadStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobDownloadStrategy.java
deleted file mode 100644
index b33e9a8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobDownloadStrategy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.IOException;
-import java.io.InputStream;
-import javax.jms.JMSException;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-/**
- * Represents a strategy of downloading a file/stream from some remote
- */
-public interface BlobDownloadStrategy {
-    
-    InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, JMSException;
-    
-    void deleteFile(ActiveMQBlobMessage message) throws IOException, JMSException;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobDownloader.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobDownloader.java
deleted file mode 100644
index 366c7af..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobDownloader.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.IOException;
-import java.io.InputStream;
-import javax.jms.JMSException;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-
-/**
- * Mediator for Blob Download
- */
-public class BlobDownloader {
-
-    private BlobTransferPolicy blobTransferPolicy;
-    
-    public BlobDownloader(BlobTransferPolicy transferPolicy) {
-        this.blobTransferPolicy = transferPolicy;
-    }
-    
-    public InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, JMSException {
-        return getStrategy().getInputStream(message);
-    }
-    
-    public void deleteFile(ActiveMQBlobMessage message) throws IOException, JMSException {
-        getStrategy().deleteFile(message);
-    }
-    
-    public BlobTransferPolicy getBlobTransferPolicy() {
-        return blobTransferPolicy;
-    }
-    
-    public BlobDownloadStrategy getStrategy() {
-        return getBlobTransferPolicy().getDownloadStrategy();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobTransferPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobTransferPolicy.java
deleted file mode 100644
index 7f03f59..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobTransferPolicy.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * 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.blob;
-
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-/**
- * The policy for configuring how BLOBs (Binary Large OBjects) are transferred
- * out of band between producers, brokers and consumers.
- *
- * 
- */
-public class BlobTransferPolicy {
-    private String defaultUploadUrl = "http://localhost:8080/uploads/";
-    private String brokerUploadUrl;
-    private String uploadUrl;
-    private int bufferSize = 128 * 1024;
-    private BlobUploadStrategy uploadStrategy;
-    private BlobDownloadStrategy downloadStrategy;
-
-    /**
-     * Returns a copy of this policy object
-     */
-    public BlobTransferPolicy copy() {
-        BlobTransferPolicy that = new BlobTransferPolicy();
-        that.defaultUploadUrl = this.defaultUploadUrl;
-        that.brokerUploadUrl = this.brokerUploadUrl;
-        that.uploadUrl = this.uploadUrl;
-        that.uploadStrategy = this.uploadStrategy;
-        return that;
-    }
-
-    public String getUploadUrl() {
-        if (uploadUrl == null) {
-            uploadUrl = getBrokerUploadUrl();
-            if (uploadUrl == null) {
-                uploadUrl = getDefaultUploadUrl();
-            }
-        }
-        return uploadUrl;
-    }
-
-    /**
-     * Sets the upload URL to use explicitly on the client which will
-     * overload the default or the broker's URL. This allows the client to decide
-     * where to upload files to irrespective of the brokers configuration.
-     */
-    public void setUploadUrl(String uploadUrl) {
-        this.uploadUrl = uploadUrl;
-    }
-
-    public String getBrokerUploadUrl() {
-        return brokerUploadUrl;
-    }
-
-    /**
-     * Called by the JMS client when a broker advertises its upload URL
-     */
-    public void setBrokerUploadUrl(String brokerUploadUrl) {
-        this.brokerUploadUrl = brokerUploadUrl;
-    }
-
-    public String getDefaultUploadUrl() {
-        return defaultUploadUrl;
-    }
-
-    /**
-     * Sets the default upload URL to use if the broker does not
-     * have a configured upload URL
-     */
-    public void setDefaultUploadUrl(String defaultUploadUrl) {
-        this.defaultUploadUrl = defaultUploadUrl;
-    }
-
-    public BlobUploadStrategy getUploadStrategy() {
-        if (uploadStrategy == null) {
-            uploadStrategy = createUploadStrategy();
-        }
-        return uploadStrategy;
-    }
-
-    public BlobDownloadStrategy getDownloadStrategy() {
-        if(downloadStrategy == null) {
-            downloadStrategy = createDownloadStrategy();
-        }
-        return downloadStrategy;
-    }
-
-    /**
-     * Sets the upload strategy to use for uploading BLOBs to some URL
-     */
-    public void setUploadStrategy(BlobUploadStrategy uploadStrategy) {
-        this.uploadStrategy = uploadStrategy;
-    }
-
-    public int getBufferSize() {
-        return bufferSize;
-    }
-
-    /**
-     * Sets the default buffer size used when uploading or downloading files
-     */
-    public void setBufferSize(int bufferSize) {
-        this.bufferSize = bufferSize;
-    }
-
-    /**
-     * Returns the upload strategy depending on the information from the
-     * uploadURL. Currently supportet HTTP and FTP
-     * 
-     * @return
-     */
-    protected BlobUploadStrategy createUploadStrategy() {
-    	BlobUploadStrategy strategy;
-    	try {
-            URL url = new URL(getUploadUrl());
-
-            if(url.getProtocol().equalsIgnoreCase("FTP")) {
-                strategy = new FTPBlobUploadStrategy(this);
-            } else if (url.getProtocol().equalsIgnoreCase("FILE")) {
-                strategy = new FileSystemBlobStrategy(this);
-            } else {
-                strategy = new DefaultBlobUploadStrategy(this);
-            }
-        } catch (MalformedURLException e) {
-            strategy = new DefaultBlobUploadStrategy(this);
-        } catch (URISyntaxException e) {
-            strategy = new DefaultBlobUploadStrategy(this);
-        }
-        return strategy;
-    }
-    
-    /**
-     * Returns the download strategy depending on the information from the
-     * uploadURL. Currently supportet HTTP and FTP
-     * 
-     * @return
-     */
-    protected BlobDownloadStrategy createDownloadStrategy() {
-        BlobDownloadStrategy strategy;
-        try {
-            URL url = new URL(getUploadUrl());
-            
-            if(url.getProtocol().equalsIgnoreCase("FTP")) {
-                strategy = new FTPBlobDownloadStrategy(this);
-            } else if (url.getProtocol().equalsIgnoreCase("FILE")) {
-                strategy = new FileSystemBlobStrategy(this);
-            } else {
-                strategy = new DefaultBlobDownloadStrategy(this);
-            }
-        } catch (MalformedURLException e) {
-            strategy = new DefaultBlobDownloadStrategy(this);
-        } catch (URISyntaxException e) {
-            strategy = new DefaultBlobDownloadStrategy(this);
-        }
-        return strategy;
-    }
-
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java
deleted file mode 100644
index dbf1ffc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-/**
- * Represents a strategy of uploading a file/stream to some remote
- *
- * 
- */
-public interface BlobUploadStrategy {
-
-    URL uploadFile(ActiveMQBlobMessage message, File file) throws JMSException, IOException;
-
-    URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws JMSException, IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java
deleted file mode 100644
index 2738b17..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-/**
- * A helper class to represent a required upload of a BLOB to some remote URL
- * 
- * 
- */
-public class BlobUploader {
-
-    private BlobTransferPolicy blobTransferPolicy;
-    private File file;
-    private InputStream in;
-
-    public BlobUploader(BlobTransferPolicy blobTransferPolicy, InputStream in) {
-        this.blobTransferPolicy = blobTransferPolicy;
-        this.in = in;
-    }
-
-    public BlobUploader(BlobTransferPolicy blobTransferPolicy, File file) {
-        this.blobTransferPolicy = blobTransferPolicy;
-        this.file = file;
-    }
-
-    public URL upload(ActiveMQBlobMessage message) throws JMSException, IOException {
-        if (file != null) {
-            return getStrategy().uploadFile(message, file);
-        } else {
-            return getStrategy().uploadStream(message, in);
-        }
-    }
-
-    public BlobTransferPolicy getBlobTransferPolicy() {
-        return blobTransferPolicy;
-    }
-
-    public BlobUploadStrategy getStrategy() {
-        return getBlobTransferPolicy().getUploadStrategy();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultBlobDownloadStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultBlobDownloadStrategy.java
deleted file mode 100644
index 56695c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultBlobDownloadStrategy.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import javax.jms.JMSException;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-/**
- * A default implementation of {@link BlobDownloadStrategy} which uses the URL
- * class to download files or streams from a remote URL
- */
-public class DefaultBlobDownloadStrategy extends DefaultStrategy implements BlobDownloadStrategy {
-
-    public DefaultBlobDownloadStrategy(BlobTransferPolicy transferPolicy) {
-        super(transferPolicy);
-    }
-
-    public InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, JMSException {
-        URL value = message.getURL();
-        if (value == null) {
-            return null;
-        }
-        return value.openStream();
-    }
-
-    public void deleteFile(ActiveMQBlobMessage message) throws IOException, JMSException {
-        URL url = createMessageURL(message);
-
-        HttpURLConnection connection = (HttpURLConnection)url.openConnection();
-        connection.setRequestMethod("DELETE");
-        connection.connect();
-        connection.disconnect();
-
-        if (!isSuccessfulCode(connection.getResponseCode())) {
-            throw new IOException("DELETE was not successful: " + connection.getResponseCode() + " "
-                                  + connection.getResponseMessage());
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultBlobUploadStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultBlobUploadStrategy.java
deleted file mode 100644
index 12c98a3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultBlobUploadStrategy.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-/**
- * A default implementation of {@link BlobUploadStrategy} which uses the URL
- * class to upload files or streams to a remote URL
- */
-public class DefaultBlobUploadStrategy extends DefaultStrategy implements BlobUploadStrategy {
-
-    public DefaultBlobUploadStrategy(BlobTransferPolicy transferPolicy) {
-        super(transferPolicy);
-    }
-
-    public URL uploadFile(ActiveMQBlobMessage message, File file) throws JMSException, IOException {
-        return uploadStream(message, new FileInputStream(file));
-    }
-
-    public URL uploadStream(ActiveMQBlobMessage message, InputStream fis) throws JMSException, IOException {
-        URL url = createMessageURL(message);
-
-        HttpURLConnection connection = (HttpURLConnection)url.openConnection();
-        connection.setRequestMethod("PUT");
-        connection.setDoOutput(true);
-
-        // use chunked mode or otherwise URLConnection loads everything into
-        // memory
-        // (chunked mode not supported before JRE 1.5)
-        connection.setChunkedStreamingMode(transferPolicy.getBufferSize());
-
-        OutputStream os = connection.getOutputStream();
-
-        byte[] buf = new byte[transferPolicy.getBufferSize()];
-        for (int c = fis.read(buf); c != -1; c = fis.read(buf)) {
-            os.write(buf, 0, c);
-            os.flush();
-        }
-        os.close();
-        fis.close();
-
-        if (!isSuccessfulCode(connection.getResponseCode())) {
-            throw new IOException("PUT was not successful: " + connection.getResponseCode() + " "
-                                  + connection.getResponseMessage());
-        }
-
-        return url;
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultStrategy.java
deleted file mode 100644
index bb8fb0e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/DefaultStrategy.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.blob;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-public class DefaultStrategy {
-    
-    protected BlobTransferPolicy transferPolicy;
-
-    public DefaultStrategy(BlobTransferPolicy transferPolicy) {
-        this.transferPolicy = transferPolicy;
-    }
-
-    protected boolean isSuccessfulCode(int responseCode) {
-        return responseCode >= 200 && responseCode < 300; // 2xx => successful
-    }
-
-    protected URL createMessageURL(ActiveMQBlobMessage message) throws JMSException, MalformedURLException {
-        return new URL(transferPolicy.getUploadUrl() + message.getMessageId().toString());
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPBlobDownloadStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPBlobDownloadStrategy.java
deleted file mode 100644
index 4962e4e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPBlobDownloadStrategy.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.commons.net.ftp.FTPClient;
-
-/**
- * A FTP implementation for {@link BlobDownloadStrategy}.
- */
-public class FTPBlobDownloadStrategy extends FTPStrategy implements BlobDownloadStrategy {
-
-    public FTPBlobDownloadStrategy(BlobTransferPolicy transferPolicy) throws MalformedURLException {
-        super(transferPolicy);
-    }
-
-    public InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, JMSException {
-        url = message.getURL();
-        final FTPClient ftp = createFTP();
-        String path = url.getPath();
-        String workingDir = path.substring(0, path.lastIndexOf("/"));
-        String file = path.substring(path.lastIndexOf("/") + 1);
-        ftp.changeWorkingDirectory(workingDir);
-        ftp.setFileType(FTPClient.BINARY_FILE_TYPE);
-
-        InputStream input = new FilterInputStream(ftp.retrieveFileStream(file)) {
-
-            public void close() throws IOException {
-                in.close();
-                ftp.quit();
-                ftp.disconnect();
-            }
-        };
-
-        return input;
-    }
-
-    public void deleteFile(ActiveMQBlobMessage message) throws IOException, JMSException {
-        url = message.getURL();
-        final FTPClient ftp = createFTP();
-
-        String path = url.getPath();
-        try {
-            if (!ftp.deleteFile(path)) {
-                throw new JMSException("Delete file failed: " + ftp.getReplyString());
-            }
-        } finally {
-            ftp.quit();
-            ftp.disconnect();
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPBlobUploadStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPBlobUploadStrategy.java
deleted file mode 100644
index 9ce52bd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPBlobUploadStrategy.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.commons.net.ftp.FTPClient;
-
-/**
- * A FTP implementation of {@link BlobUploadStrategy}.
- */
-public class FTPBlobUploadStrategy extends FTPStrategy implements BlobUploadStrategy {
-	
-	public FTPBlobUploadStrategy(BlobTransferPolicy transferPolicy) throws MalformedURLException {
-		super(transferPolicy);
-	}
-
-	public URL uploadFile(ActiveMQBlobMessage message, File file) throws JMSException, IOException {
-		return uploadStream(message, new FileInputStream(file));
-	}
-
-	public URL uploadStream(ActiveMQBlobMessage message, InputStream in)
-			throws JMSException, IOException {
-
-	    FTPClient ftp = createFTP();
-	    try {
-    		String path = url.getPath();
-            String workingDir = path.substring(0, path.lastIndexOf("/"));
-    		String filename = message.getMessageId().toString().replaceAll(":", "_");
-            ftp.setFileType(FTPClient.BINARY_FILE_TYPE);
-            
-            String url;
-            if(!ftp.changeWorkingDirectory(workingDir)) {
-            	url = this.url.toString().replaceFirst(this.url.getPath(), "")+"/";
-            } else {
-            	url = this.url.toString();
-            }
-            
-    		if (!ftp.storeFile(filename, in)) {
-    		    throw new JMSException("FTP store failed: " + ftp.getReplyString());
-    		}
-    		return new URL(url + filename);
-	    } finally {
-    		ftp.quit();
-    		ftp.disconnect();
-	    }
-		
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPStrategy.java
deleted file mode 100644
index 5983c28..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FTPStrategy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.IOException;
-import java.net.ConnectException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.commons.net.ftp.FTPClient;
-
-public class FTPStrategy {
-
-    protected BlobTransferPolicy transferPolicy;
-    protected URL url;
-    protected String ftpUser = "";
-    protected String ftpPass = "";
-
-    public FTPStrategy(BlobTransferPolicy transferPolicy) throws MalformedURLException {
-        this.transferPolicy = transferPolicy;
-        this.url = new URL(this.transferPolicy.getUploadUrl());
-    }
-    
-    protected void setUserInformation(String userInfo) {
-        if(userInfo != null) {
-            String[] userPass = userInfo.split(":");
-            if(userPass.length > 0) this.ftpUser = userPass[0];
-            if(userPass.length > 1) this.ftpPass = userPass[1];
-        } else {
-            this.ftpUser = "anonymous";
-            this.ftpPass = "anonymous";
-        }
-    }
-    
-    protected FTPClient createFTP() throws IOException, JMSException {
-        String connectUrl = url.getHost();
-        setUserInformation(url.getUserInfo());
-        int port = url.getPort() < 1 ? 21 : url.getPort();
-        
-        FTPClient ftp = new FTPClient();
-        try {
-            ftp.connect(connectUrl, port);
-        } catch(ConnectException e) {
-            throw new JMSException("Problem connecting the FTP-server");
-        }
-        if(!ftp.login(ftpUser, ftpPass)) {
-            ftp.quit();
-            ftp.disconnect();
-            throw new JMSException("Cant Authentificate to FTP-Server");
-        }
-        return ftp;
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FileSystemBlobStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FileSystemBlobStrategy.java
deleted file mode 100644
index 022aec1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/FileSystemBlobStrategy.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-/**
- * {@link BlobUploadStrategy} and {@link BlobDownloadStrategy} implementation which use the local filesystem for storing
- * the payload
- *
- */
-public class FileSystemBlobStrategy implements BlobUploadStrategy, BlobDownloadStrategy{
-
-   
-    private final BlobTransferPolicy policy;
-    private File rootFile;
-    
-    public FileSystemBlobStrategy(final BlobTransferPolicy policy) throws MalformedURLException, URISyntaxException  {
-        this.policy = policy;
-        
-        createRootFolder();
-    }
-    
-    /**
-     * Create the root folder if not exist 
-     * 
-     * @throws MalformedURLException
-     * @throws URISyntaxException
-     */
-    protected void createRootFolder() throws MalformedURLException, URISyntaxException {
-        rootFile = new File(new URL(policy.getUploadUrl()).toURI());
-        if (rootFile.exists() == false) {
-            rootFile.mkdirs();
-        } else if (rootFile.isDirectory() == false) {
-            throw new IllegalArgumentException("Given url is not a directory " + rootFile );
-        }
-    }
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.blob.BlobUploadStrategy#uploadFile(org.apache.activemq.command.ActiveMQBlobMessage, java.io.File)
-     */
-    public URL uploadFile(ActiveMQBlobMessage message, File file) throws JMSException, IOException {
-        return uploadStream(message, new FileInputStream(file));
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.blob.BlobUploadStrategy#uploadStream(org.apache.activemq.command.ActiveMQBlobMessage, java.io.InputStream)
-     */
-    public URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws JMSException, IOException {
-        File f = getFile(message);
-        FileOutputStream out = new FileOutputStream(f);
-        byte[] buffer = new byte[policy.getBufferSize()];
-        for (int c = in.read(buffer); c != -1; c = in.read(buffer)) {
-            out.write(buffer, 0, c);
-            out.flush();
-        }
-        out.flush();
-        out.close();
-        // File.toURL() is deprecated
-        return f.toURI().toURL();
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.blob.BlobDownloadStrategy#deleteFile(org.apache.activemq.command.ActiveMQBlobMessage)
-     */
-    public void deleteFile(ActiveMQBlobMessage message) throws IOException, JMSException {
-        File f = getFile(message);
-        if (f.exists()) {
-            if (f.delete() == false) throw new IOException("Unable to delete file " + f);
-        }
-    }
-
-    /**
-     * Returns a {@link FileInputStream} for the give {@link ActiveMQBlobMessage}
-     */
-    public InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, JMSException {
-        return new FileInputStream(getFile(message));
-    }
-
-    
-    /**
-     * Return the {@link File} for the {@link ActiveMQBlobMessage}. 
-     * 
-     * @param message
-     * @return file
-     * @throws JMSException
-     * @throws IOException 
-     */
-    protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException {
-    	if (message.getURL() != null) {
-    		try {
-				return new File(message.getURL().toURI());
-			} catch (URISyntaxException e) {
-                                IOException ioe = new IOException("Unable to open file for message " + message);
-                                ioe.initCause(e);
-			}
-    	}
-        //replace all : with _ to make windows more happy
-        String fileName = message.getJMSMessageID().replaceAll(":", "_"); 
-        return new File(rootFile, fileName);        
-        
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html
deleted file mode 100644
index 2964e78..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Helper classes for dealing with out-of-band BLOB objects
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
deleted file mode 100755
index 40a7b73..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Broker.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.Set;
-import java.util.concurrent.ThreadPoolExecutor;
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Region;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.network.NetworkBridge;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.usage.Usage;
-
-/**
- * The Message Broker which routes messages, maintains subscriptions and
- * connections, acknowledges messages and handles transactions.
- * 
- * 
- */
-public interface Broker extends Region, Service {
-
-    /**
-     * Get a Broker from the Broker Stack that is a particular class
-     * 
-     * @param type
-     * @return
-     */
-    Broker getAdaptor(Class type);
-
-    /**
-     * Get the id of the broker
-     */
-    BrokerId getBrokerId();
-
-    /**
-     * Get the name of the broker
-     */
-    String getBrokerName();
-
-    /**
-     * A remote Broker connects
-     */
-    void addBroker(Connection connection, BrokerInfo info);
-
-    /**
-     * Remove a BrokerInfo
-     * 
-     * @param connection
-     * @param info
-     */
-    void removeBroker(Connection connection, BrokerInfo info);
-
-    /**
-     * A client is establishing a connection with the broker.
-     * 
-     * @throws Exception TODO
-     */
-    void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception;
-
-    /**
-     * A client is disconnecting from the broker.
-     * 
-     * @param context the environment the operation is being executed under.
-     * @param info
-     * @param error null if the client requested the disconnect or the error
-     *                that caused the client to disconnect.
-     * @throws Exception TODO
-     */
-    void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception;
-
-    /**
-     * Adds a session.
-     * 
-     * @param context
-     * @param info
-     * @throws Exception TODO
-     */
-    void addSession(ConnectionContext context, SessionInfo info) throws Exception;
-
-    /**
-     * Removes a session.
-     * 
-     * @param context
-     * @param info
-     * @throws Exception TODO
-     */
-    void removeSession(ConnectionContext context, SessionInfo info) throws Exception;
-
-    /**
-     * Adds a producer.
-     * 
-     * @param context the enviorment the operation is being executed under.
-     * @throws Exception TODO
-     */
-    void addProducer(ConnectionContext context, ProducerInfo info) throws Exception;
-
-    /**
-     * Removes a producer.
-     * 
-     * @param context the enviorment the operation is being executed under.
-     * @throws Exception TODO
-     */
-    void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception;
-
-    /**
-     * @return all clients added to the Broker.
-     * @throws Exception TODO
-     */
-    Connection[] getClients() throws Exception;
-
-    /**
-     * @return all destinations added to the Broker.
-     * @throws Exception TODO
-     */
-    ActiveMQDestination[] getDestinations() throws Exception;
-
-    /**
-     * Gets a list of all the prepared xa transactions.
-     * 
-     * @param context transaction ids
-     * @return
-     * @throws Exception TODO
-     */
-    TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception;
-
-    /**
-     * Starts a transaction.
-     * 
-     * @param context
-     * @param xid
-     * @throws Exception TODO
-     */
-    void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception;
-
-    /**
-     * Prepares a transaction. Only valid for xa transactions.
-     * 
-     * @param context
-     * @param xid
-     * @return id
-     * @throws Exception TODO
-     */
-    int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception;
-
-    /**
-     * Rollsback a transaction.
-     * 
-     * @param context
-     * @param xid
-     * @throws Exception TODO
-     */
-
-    void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception;
-
-    /**
-     * Commits a transaction.
-     * 
-     * @param context
-     * @param xid
-     * @param onePhase
-     * @throws Exception TODO
-     */
-    void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception;
-
-    /**
-     * Forgets a transaction.
-     * 
-     * @param context
-     * @param transactionId
-     * @throws Exception
-     */
-    void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception;
-
-    /**
-     * Get the BrokerInfo's of any connected Brokers
-     * 
-     * @return array of peer BrokerInfos
-     */
-    BrokerInfo[] getPeerBrokerInfos();
-
-    /**
-     * Notify the Broker that a dispatch is going to happen
-     * 
-     * @param messageDispatch
-     */
-    void preProcessDispatch(MessageDispatch messageDispatch);
-
-    /**
-     * Notify the Broker that a dispatch has happened
-     * 
-     * @param messageDispatch
-     */
-    void postProcessDispatch(MessageDispatch messageDispatch);
-
-    /**
-     * @return true if the broker has stopped
-     */
-    boolean isStopped();
-
-    /**
-     * @return a Set of all durable destinations
-     */
-    Set<ActiveMQDestination> getDurableDestinations();
-
-    /**
-     * Add and process a DestinationInfo object
-     * 
-     * @param context
-     * @param info
-     * @throws Exception
-     */
-    void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception;
-
-    /**
-     * Remove and process a DestinationInfo object
-     * 
-     * @param context
-     * @param info
-     * @throws Exception
-     */
-    void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception;
-
-    /**
-     * @return true if fault tolerant
-     */
-    boolean isFaultTolerantConfiguration();
-
-    /**
-     * @return the connection context used to make administration operations on
-     *         startup or via JMX MBeans
-     */
-    ConnectionContext getAdminConnectionContext();
-
-    /**
-     * Sets the default administration connection context used when configuring
-     * the broker on startup or via JMX
-     * 
-     * @param adminConnectionContext
-     */
-    void setAdminConnectionContext(ConnectionContext adminConnectionContext);
-
-    /**
-     * @return the temp data store
-     */
-    PListStore getTempDataStore();
-
-    /**
-     * @return the URI that can be used to connect to the local Broker
-     */
-    URI getVmConnectorURI();
-
-    /**
-     * called when the brokerService starts
-     */
-    void brokerServiceStarted();
-
-    /**
-     * @return the BrokerService
-     */
-    BrokerService getBrokerService();
-
-    /**
-     * Ensure we get the Broker at the top of the Stack
-     * 
-     * @return the broker at the top of the Stack
-     */
-    Broker getRoot();
-
-    /**
-     * Determine if a message has expired -allows default behaviour to be
-     * overriden - as the timestamp set by the producer can be out of sync with
-     * the broker
-     * 
-     * @param messageReference
-     * @return true if the message is expired
-     */
-    boolean isExpired(MessageReference messageReference);
-
-    /**
-     * A Message has Expired
-     *
-     * @param context
-     * @param messageReference
-     * @param subscription, may be null
-     */
-    void messageExpired(ConnectionContext context, MessageReference messageReference, Subscription subscription);
-
-    /**
-     * A message needs to go the a DLQ
-     * 
-     * @param context
-     * @param messageReference
-     * @param subscription, may be null
-     */
-    void sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference, Subscription subscription);
-    
-    /**
-     * @return the broker sequence id
-     */
-    long getBrokerSequenceId();
-    
-    /**
-     * called when message is consumed
-     * @param context
-     * @param messageReference
-     */
-    void messageConsumed(ConnectionContext context, MessageReference messageReference);
-    
-    /**
-     * Called when message is delivered to the broker
-     * @param context
-     * @param messageReference
-     */
-    void messageDelivered(ConnectionContext context, MessageReference messageReference);
-    
-    /**
-     * Called when a message is discarded - e.g. running low on memory
-     * This will happen only if the policy is enabled - e.g. non durable topics
-     * @param context
-     * @param sub 
-     * @param messageReference
-     */
-    void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference);
-    
-    /**
-     * Called when there is a slow consumer
-     * @param context
-     * @param destination 
-     * @param subs
-     */
-    void slowConsumer(ConnectionContext context,Destination destination, Subscription subs);
-    
-    /**
-     * Called to notify a producer is too fast
-     * @param context
-     * @param producerInfo
-     */
-    void fastProducer(ConnectionContext context,ProducerInfo producerInfo);
-    
-    /**
-     * Called when a Usage reaches a limit
-     * @param context
-     * @param destination 
-     * @param usage
-     */
-    void isFull(ConnectionContext context,Destination destination,Usage usage);
-    
-    /**
-     *  called when the broker becomes the master in a master/slave
-     *  configuration
-     */
-    void nowMasterBroker();
-    
-    Scheduler getScheduler();
-    
-    ThreadPoolExecutor getExecutor();
-
-    void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex);
-
-    void networkBridgeStopped(BrokerInfo brokerInfo);
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerBroadcaster.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerBroadcaster.java
deleted file mode 100755
index 84fa230..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerBroadcaster.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-
-/**
- * Used to add listeners for Broker actions
- * 
- * 
- */
-public class BrokerBroadcaster extends BrokerFilter {
-    protected volatile Broker[] listeners = new Broker[0];
-
-    public BrokerBroadcaster(Broker next) {
-        super(next);
-    }
-
-    @Override
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        next.acknowledge(consumerExchange, ack);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].acknowledge(consumerExchange, ack);
-        }
-    }
-
-    @Override
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        next.addConnection(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].addConnection(context, info);
-        }
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        Subscription answer = next.addConsumer(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].addConsumer(context, info);
-        }
-        return answer;
-    }
-
-    @Override
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        next.addProducer(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].addProducer(context, info);
-        }
-    }
-
-    @Override
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        next.commitTransaction(context, xid, onePhase);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].commitTransaction(context, xid, onePhase);
-        }
-    }
-
-    @Override
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        next.removeSubscription(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].removeSubscription(context, info);
-        }
-    }
-
-    @Override
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        int result = next.prepareTransaction(context, xid);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            // TODO decide what to do with return values
-            brokers[i].prepareTransaction(context, xid);
-        }
-        return result;
-    }
-
-    @Override
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        next.removeConnection(context, info, error);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].removeConnection(context, info, error);
-        }
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        next.removeConsumer(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].removeConsumer(context, info);
-        }
-    }
-
-    @Override
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        next.removeProducer(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].removeProducer(context, info);
-        }
-    }
-
-    @Override
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        next.rollbackTransaction(context, xid);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].rollbackTransaction(context, xid);
-        }
-    }
-
-    @Override
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        next.send(producerExchange, messageSend);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].send(producerExchange, messageSend);
-        }
-    }
-
-    @Override
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        next.beginTransaction(context, xid);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].beginTransaction(context, xid);
-        }
-    }
-
-    @Override
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
-        next.forgetTransaction(context, transactionId);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].forgetTransaction(context, transactionId);
-        }
-    }
-
-    @Override
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean createIfTemporary) throws Exception {
-        Destination result = next.addDestination(context, destination,createIfTemporary);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].addDestination(context, destination,createIfTemporary);
-        }
-        return result;
-    }
-
-    @Override
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        next.removeDestination(context, destination, timeout);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].removeDestination(context, destination, timeout);
-        }
-    }
-
-    @Override
-    public void start() throws Exception {
-        next.start();
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].start();
-        }
-    }
-
-    @Override
-    public void stop() throws Exception {
-        next.stop();
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].stop();
-        }
-    }
-
-    @Override
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-        next.addSession(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].addSession(context, info);
-        }
-    }
-
-    @Override
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-        next.removeSession(context, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].removeSession(context, info);
-        }
-    }
-
-    @Override
-    public void gc() {
-        next.gc();
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].gc();
-        }
-    }
-
-    @Override
-    public void addBroker(Connection connection, BrokerInfo info) {
-        next.addBroker(connection, info);
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            brokers[i].addBroker(connection, info);
-        }
-    }
-
-    protected Broker[] getListeners() {
-        return listeners;
-    }
-
-    public synchronized void addListener(Broker broker) {
-        List<Broker> tmp = getListenersAsList();
-        tmp.add(broker);
-        listeners = tmp.toArray(new Broker[tmp.size()]);
-    }
-
-    public synchronized void removeListener(Broker broker) {
-        List<Broker> tmp = getListenersAsList();
-        tmp.remove(broker);
-        listeners = tmp.toArray(new Broker[tmp.size()]);
-    }
-
-    protected List<Broker> getListenersAsList() {
-        List<Broker> tmp = new ArrayList<Broker>();
-        Broker brokers[] = getListeners();
-        for (int i = 0; i < brokers.length; i++) {
-            tmp.add(brokers[i]);
-        }
-        return tmp;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java
deleted file mode 100644
index 3c92801..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.Map;
-
-/**
- * 
- * Provide context object for broker classes
- *
- */
-public interface BrokerContext {
-
-    Object getBean(String name);
-    
-    public Map getBeansOfType(Class type);
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java
deleted file mode 100644
index 4923d68..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.broker;
-
-/**
- * 
- * Interface to be implemented by any object that wishes to have instance of @see BrokerContext
- *
- */
-public interface BrokerContextAware {
-
-    void setBrokerContext(BrokerContext brokerContext);    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFactory.java
deleted file mode 100755
index 34ae16b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.apache.activemq.util.FactoryFinder;
-import org.apache.activemq.util.IOExceptionSupport;
-
-/**
- * A helper class to create a fully configured broker service using a URI. The
- * list of currently supported URI syntaxes is described <a
- * href="http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html">here</a>
- * 
- * 
- */
-public final class BrokerFactory {
-
-    private static final FactoryFinder BROKER_FACTORY_HANDLER_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");
-
-    private BrokerFactory() {        
-    }
-    
-    public static BrokerFactoryHandler createBrokerFactoryHandler(String type) throws IOException {
-        try {
-            return (BrokerFactoryHandler)BROKER_FACTORY_HANDLER_FINDER.newInstance(type);
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Could not load " + type + " factory:" + e, e);
-        }
-    }
-
-    /**
-     * Creates a broker from a URI configuration
-     * 
-     * @param brokerURI the URI scheme to configure the broker
-     * @throws Exception
-     */
-    public static BrokerService createBroker(URI brokerURI) throws Exception {
-        return createBroker(brokerURI, false);
-    }
-
-    /**
-     * Creates a broker from a URI configuration
-     * 
-     * @param brokerURI the URI scheme to configure the broker
-     * @param startBroker whether or not the broker should have its
-     *                {@link BrokerService#start()} method called after
-     *                construction
-     * @throws Exception
-     */
-    public static BrokerService createBroker(URI brokerURI, boolean startBroker) throws Exception {
-        if (brokerURI.getScheme() == null) {
-            throw new IllegalArgumentException("Invalid broker URI, no scheme specified: " + brokerURI);
-        }
-        BrokerFactoryHandler handler = createBrokerFactoryHandler(brokerURI.getScheme());
-        BrokerService broker = handler.createBroker(brokerURI);
-        if (startBroker) {
-            broker.start();
-        }
-        return broker;
-    }
-
-    /**
-     * Creates a broker from a URI configuration
-     * 
-     * @param brokerURI the URI scheme to configure the broker
-     * @throws Exception
-     */
-    public static BrokerService createBroker(String brokerURI) throws Exception {
-        return createBroker(new URI(brokerURI));
-    }
-
-    /**
-     * Creates a broker from a URI configuration
-     * 
-     * @param brokerURI the URI scheme to configure the broker
-     * @param startBroker whether or not the broker should have its
-     *                {@link BrokerService#start()} method called after
-     *                construction
-     * @throws Exception
-     */
-    public static BrokerService createBroker(String brokerURI, boolean startBroker) throws Exception {
-        return createBroker(new URI(brokerURI), startBroker);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFactoryHandler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFactoryHandler.java
deleted file mode 100644
index c319b0a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFactoryHandler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-
-/**
- * Represents the interface used to create a broker from a URI scheme.
- *
- * 
-*/
-public interface BrokerFactoryHandler {
-    BrokerService createBroker(URI brokerURI) throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
deleted file mode 100755
index dd65390..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerFilter.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ThreadPoolExecutor;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.usage.Usage;
-
-/**
- * Allows you to intercept broker operation so that features such as security
- * can be implemented as a pluggable filter.
- * 
- * 
- */
-public class BrokerFilter implements Broker {
-
-    protected final Broker next;
-
-    public BrokerFilter(Broker next) {
-        this.next = next;
-    }
-
-    public Broker getAdaptor(Class type) {
-        if (type.isInstance(this)) {
-            return this;
-        }
-        return next.getAdaptor(type);
-    }
-
-    public Map<ActiveMQDestination, Destination> getDestinationMap() {
-        return next.getDestinationMap();
-    }
-
-    public Set <Destination>getDestinations(ActiveMQDestination destination) {
-        return next.getDestinations(destination);
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        next.acknowledge(consumerExchange, ack);
-    }
-
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
-        return next.messagePull(context, pull);
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        next.addConnection(context, info);
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        return next.addConsumer(context, info);
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        next.addProducer(context, info);
-    }
-
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        next.commitTransaction(context, xid, onePhase);
-    }
-
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        next.removeSubscription(context, info);
-    }
-
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-        return next.getPreparedTransactions(context);
-    }
-
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        return next.prepareTransaction(context, xid);
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        next.removeConnection(context, info, error);
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        next.removeConsumer(context, info);
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        next.removeProducer(context, info);
-    }
-
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        next.rollbackTransaction(context, xid);
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        next.send(producerExchange, messageSend);
-    }
-
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        next.beginTransaction(context, xid);
-    }
-
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
-        next.forgetTransaction(context, transactionId);
-    }
-
-    public Connection[] getClients() throws Exception {
-        return next.getClients();
-    }
-
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean createIfTemporary) throws Exception {
-        return next.addDestination(context, destination,createIfTemporary);
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        next.removeDestination(context, destination, timeout);
-    }
-
-    public ActiveMQDestination[] getDestinations() throws Exception {
-        return next.getDestinations();
-    }
-
-    public void start() throws Exception {
-        next.start();
-    }
-
-    public void stop() throws Exception {
-        next.stop();
-    }
-
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-        next.addSession(context, info);
-    }
-
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-        next.removeSession(context, info);
-    }
-
-    public BrokerId getBrokerId() {
-        return next.getBrokerId();
-    }
-
-    public String getBrokerName() {
-        return next.getBrokerName();
-    }
-
-    public void gc() {
-        next.gc();
-    }
-
-    public void addBroker(Connection connection, BrokerInfo info) {
-        next.addBroker(connection, info);
-    }
-
-    public void removeBroker(Connection connection, BrokerInfo info) {
-        next.removeBroker(connection, info);
-    }
-
-    public BrokerInfo[] getPeerBrokerInfos() {
-        return next.getPeerBrokerInfos();
-    }
-
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-        next.preProcessDispatch(messageDispatch);
-    }
-
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-        next.postProcessDispatch(messageDispatch);
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        next.processDispatchNotification(messageDispatchNotification);
-    }
-
-    public boolean isStopped() {
-        return next.isStopped();
-    }
-
-    public Set<ActiveMQDestination> getDurableDestinations() {
-        return next.getDurableDestinations();
-    }
-
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        next.addDestinationInfo(context, info);
-    }
-
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        next.removeDestinationInfo(context, info);
-    }
-
-    public boolean isFaultTolerantConfiguration() {
-        return next.isFaultTolerantConfiguration();
-    }
-
-    public ConnectionContext getAdminConnectionContext() {
-        return next.getAdminConnectionContext();
-    }
-
-    public void setAdminConnectionContext(ConnectionContext adminConnectionContext) {
-        next.setAdminConnectionContext(adminConnectionContext);
-    }
-
-    public PListStore getTempDataStore() {
-        return next.getTempDataStore();
-    }
-
-    public URI getVmConnectorURI() {
-        return next.getVmConnectorURI();
-    }
-
-    public void brokerServiceStarted() {
-        next.brokerServiceStarted();
-    }
-
-    public BrokerService getBrokerService() {
-        return next.getBrokerService();
-    }
-
-    public boolean isExpired(MessageReference messageReference) {
-        return next.isExpired(messageReference);
-    }
-
-    public void messageExpired(ConnectionContext context, MessageReference message, Subscription subscription) {
-        next.messageExpired(context, message, subscription);
-    }
-
-    public void sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
-                                      Subscription subscription) {
-        next.sendToDeadLetterQueue(context, messageReference, subscription);
-    }
-
-    public Broker getRoot() {
-        return next.getRoot();
-    }
-
-    public long getBrokerSequenceId() {
-        return next.getBrokerSequenceId();
-    }
-
-   
-    public void fastProducer(ConnectionContext context,ProducerInfo producerInfo) {
-        next.fastProducer(context, producerInfo);
-    }
-
-    public void isFull(ConnectionContext context,Destination destination, Usage usage) {
-        next.isFull(context,destination, usage);
-    }
-
-    public void messageConsumed(ConnectionContext context,MessageReference messageReference) {
-        next.messageConsumed(context, messageReference);
-    }
-
-    public void messageDelivered(ConnectionContext context,MessageReference messageReference) {
-        next.messageDelivered(context, messageReference);
-    }
-
-    public void messageDiscarded(ConnectionContext context,Subscription sub, MessageReference messageReference) {
-        next.messageDiscarded(context, sub, messageReference);
-    }
-
-    public void slowConsumer(ConnectionContext context, Destination destination,Subscription subs) {
-        next.slowConsumer(context, destination,subs);
-    }
-    
-    public void nowMasterBroker() {   
-        next.nowMasterBroker();
-    }
-
-    public void processConsumerControl(ConsumerBrokerExchange consumerExchange,
-            ConsumerControl control) {
-        next.processConsumerControl(consumerExchange, control);
-    }
-
-    public Scheduler getScheduler() {
-       return next.getScheduler();
-    }
-
-    public ThreadPoolExecutor getExecutor() {
-       return next.getExecutor();
-    }
-
-    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
-        next.networkBridgeStarted(brokerInfo, createdByDuplex);
-    }
-
-    public void networkBridgeStopped(BrokerInfo brokerInfo) {
-        next.networkBridgeStopped(brokerInfo);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPlugin.java
deleted file mode 100644
index eb6e073..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPlugin.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.broker;
-
-/**
- * Represents a plugin into a Broker
- * 
- * 
- */
-public interface BrokerPlugin {
-
-    /**
-     * Installs the plugin into the interceptor chain of the broker, returning the new
-     * intercepted broker to use.
-     */
-    Broker installPlugin(Broker broker) throws Exception;
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java
deleted file mode 100644
index a9f9850..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerPluginSupport.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.broker;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A useful base class for implementing broker plugins.
- * 
- * 
- */
-public abstract class BrokerPluginSupport extends MutableBrokerFilter implements BrokerPlugin {
-    private static final Logger LOG = LoggerFactory.getLogger(BrokerPluginSupport.class);
-    public BrokerPluginSupport() {
-        super(null);
-    }
-
-    public Broker installPlugin(Broker broker) throws Exception {
-        setNext(broker);
-        return this;
-    }
-    
-    @Override
-    public void start() throws Exception {
-        super.start();
-        LOG.info("Broker Plugin " + getClass().getName() + " started");
-    }
-    
-    @Override
-    public void stop() throws Exception {
-        super.stop();
-        LOG.info("Broker Plugin " + getClass().getName() + " stopped");
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
deleted file mode 100755
index 2fe3eda..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerRegistry.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class BrokerRegistry {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BrokerRegistry.class);
-    private static final BrokerRegistry INSTANCE = new BrokerRegistry();
-
-    private final Object mutex = new Object();
-    private final Map<String, BrokerService> brokers = new HashMap<String, BrokerService>();
-
-    public static BrokerRegistry getInstance() {
-        return INSTANCE;
-    }
-
-    /**
-     * @param brokerName
-     * @return the BrokerService
-     */
-    public BrokerService lookup(String brokerName) {
-        BrokerService result = null;
-        synchronized (mutex) {
-            result = brokers.get(brokerName);
-            if (result == null && brokerName != null && brokerName.equals(BrokerService.DEFAULT_BROKER_NAME)) {
-                result = findFirst();
-                if (result != null) {
-                    LOG.warn("Broker localhost not started so using " + result.getBrokerName() + " instead");
-                }
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Returns the first registered broker found
-     * 
-     * @return the first BrokerService
-     */
-    public BrokerService findFirst() {
-        synchronized (mutex) {
-            Iterator<BrokerService> iter = brokers.values().iterator();
-            while (iter.hasNext()) {
-                return iter.next();
-            }
-            return null;
-        }
-    }
-
-    /**
-     * @param brokerName
-     * @param broker
-     */
-    public void bind(String brokerName, BrokerService broker) {
-        synchronized (mutex) {
-            brokers.put(brokerName, broker);
-            mutex.notifyAll();
-        }
-    }
-
-    /**
-     * @param brokerName
-     */
-    public void unbind(String brokerName) {
-        synchronized (mutex) {
-            brokers.remove(brokerName);
-        }
-    }
-
-    /**
-     * @return the mutex used
-     */
-    public Object getRegistryMutext() {
-        return mutex;
-    }
-    
-    public Map<String, BrokerService> getBrokers() {
-        return Collections.unmodifiableMap(this.brokers);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
deleted file mode 100644
index 2af5956..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
+++ /dev/null
@@ -1,2419 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.activemq.ActiveMQConnectionMetaData;
-import org.apache.activemq.ConfigurationException;
-import org.apache.activemq.Service;
-import org.apache.activemq.advisory.AdvisoryBroker;
-import org.apache.activemq.broker.cluster.ConnectionSplitBroker;
-import org.apache.activemq.broker.ft.MasterConnector;
-import org.apache.activemq.broker.jmx.AnnotatedMBean;
-import org.apache.activemq.broker.jmx.BrokerView;
-import org.apache.activemq.broker.jmx.ConnectorView;
-import org.apache.activemq.broker.jmx.ConnectorViewMBean;
-import org.apache.activemq.broker.jmx.FTConnectorView;
-import org.apache.activemq.broker.jmx.JmsConnectorView;
-import org.apache.activemq.broker.jmx.JobSchedulerView;
-import org.apache.activemq.broker.jmx.JobSchedulerViewMBean;
-import org.apache.activemq.broker.jmx.ManagedRegionBroker;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.broker.jmx.NetworkConnectorView;
-import org.apache.activemq.broker.jmx.NetworkConnectorViewMBean;
-import org.apache.activemq.broker.jmx.ProxyConnectorView;
-import org.apache.activemq.broker.region.CompositeDestinationInterceptor;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFactory;
-import org.apache.activemq.broker.region.DestinationFactoryImpl;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.virtual.MirroredQueue;
-import org.apache.activemq.broker.region.virtual.VirtualDestination;
-import org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualTopic;
-import org.apache.activemq.broker.scheduler.SchedulerBroker;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.network.ConnectionFilter;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.network.jms.JmsConnector;
-import org.apache.activemq.proxy.ProxyConnector;
-import org.apache.activemq.security.MessageAuthorizationPolicy;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.PersistenceAdapterFactory;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.vm.VMTransportFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-/**
- * Manages the lifecycle of an ActiveMQ Broker. A BrokerService consists of a
- * number of transport connectors, network connectors and a bunch of properties
- * which can be used to configure the broker as its lazily created.
- * 
- * 
- * @org.apache.xbean.XBean
- */
-public class BrokerService implements Service {
-    protected CountDownLatch slaveStartSignal = new CountDownLatch(1);
-    public static final String DEFAULT_PORT = "61616";
-    public static final String LOCAL_HOST_NAME;
-    public static final String DEFAULT_BROKER_NAME = "localhost";
-    private static final Logger LOG = LoggerFactory.getLogger(BrokerService.class);
-    private static final long serialVersionUID = 7353129142305630237L;
-    private boolean useJmx = true;
-    private boolean enableStatistics = true;
-    private boolean persistent = true;
-    private boolean populateJMSXUserID;
-    private boolean useAuthenticatedPrincipalForJMSXUserID;
-
-    private boolean useShutdownHook = true;
-    private boolean useLoggingForShutdownErrors;
-    private boolean shutdownOnMasterFailure;
-    private boolean shutdownOnSlaveFailure;
-    private boolean waitForSlave;
-    private long waitForSlaveTimeout = 600000L;
-    private boolean passiveSlave;
-    private String brokerName = DEFAULT_BROKER_NAME;
-    private File dataDirectoryFile;
-    private File tmpDataDirectory;
-    private Broker broker;
-    private BrokerView adminView;
-    private ManagementContext managementContext;
-    private ObjectName brokerObjectName;
-    private TaskRunnerFactory taskRunnerFactory;
-    private TaskRunnerFactory persistenceTaskRunnerFactory;
-    private SystemUsage systemUsage;
-    private SystemUsage producerSystemUsage;
-    private SystemUsage consumerSystemUsaage;
-    private PersistenceAdapter persistenceAdapter;
-    private PersistenceAdapterFactory persistenceFactory;
-    protected DestinationFactory destinationFactory;
-    private MessageAuthorizationPolicy messageAuthorizationPolicy;
-    private final List<TransportConnector> transportConnectors = new CopyOnWriteArrayList<TransportConnector>();
-    private final List<NetworkConnector> networkConnectors = new CopyOnWriteArrayList<NetworkConnector>();
-    private final List<ProxyConnector> proxyConnectors = new CopyOnWriteArrayList<ProxyConnector>();
-    private final List<JmsConnector> jmsConnectors = new CopyOnWriteArrayList<JmsConnector>();
-    private final List<Service> services = new ArrayList<Service>();
-    private MasterConnector masterConnector;
-    private String masterConnectorURI;
-    private transient Thread shutdownHook;
-    private String[] transportConnectorURIs;
-    private String[] networkConnectorURIs;
-    private JmsConnector[] jmsBridgeConnectors; // these are Jms to Jms bridges
-    // to other jms messaging
-    // systems
-    private boolean deleteAllMessagesOnStartup;
-    private boolean advisorySupport = true;
-    private URI vmConnectorURI;
-    private String defaultSocketURIString;
-    private PolicyMap destinationPolicy;
-    private final AtomicBoolean started = new AtomicBoolean(false);
-    private final AtomicBoolean stopped = new AtomicBoolean(false);
-    private BrokerPlugin[] plugins;
-    private boolean keepDurableSubsActive = true;
-    private boolean useVirtualTopics = true;
-    private boolean useMirroredQueues = false;
-    private boolean useTempMirroredQueues = true;
-    private BrokerId brokerId;
-    private DestinationInterceptor[] destinationInterceptors;
-    private ActiveMQDestination[] destinations;
-    private PListStore tempDataStore;
-    private int persistenceThreadPriority = Thread.MAX_PRIORITY;
-    private boolean useLocalHostBrokerName;
-    private final CountDownLatch stoppedLatch = new CountDownLatch(1);
-    private final CountDownLatch startedLatch = new CountDownLatch(1);
-    private boolean supportFailOver;
-    private Broker regionBroker;
-    private int producerSystemUsagePortion = 60;
-    private int consumerSystemUsagePortion = 40;
-    private boolean splitSystemUsageForProducersConsumers;
-    private boolean monitorConnectionSplits = false;
-    private int taskRunnerPriority = Thread.NORM_PRIORITY;
-    private boolean dedicatedTaskRunner;
-    private boolean cacheTempDestinations = false;// useful for failover
-    private int timeBeforePurgeTempDestinations = 5000;
-    private final List<Runnable> shutdownHooks = new ArrayList<Runnable>();
-    private boolean systemExitOnShutdown;
-    private int systemExitOnShutdownExitCode;
-    private SslContext sslContext;
-    private boolean forceStart = false;
-    private IOExceptionHandler ioExceptionHandler;
-    private boolean schedulerSupport = false;
-    private File schedulerDirectoryFile;
-    private Scheduler scheduler;
-    private ThreadPoolExecutor executor;
-    private boolean slave = true;
-    private int schedulePeriodForDestinationPurge=5000;
-    private BrokerContext brokerContext;
-    private boolean networkConnectorStartAsync = false;
-
-	static {
-        String localHostName = "localhost";
-        try {
-            localHostName =  InetAddressUtil.getLocalHostName();
-        } catch (UnknownHostException e) {
-            LOG.error("Failed to resolve localhost");
-        }
-        LOCAL_HOST_NAME = localHostName;
-    }
-
-    @Override
-    public String toString() {
-        return "BrokerService[" + getBrokerName() + "]";
-    }
-
-    /**
-     * Adds a new transport connector for the given bind address
-     * 
-     * @return the newly created and added transport connector
-     * @throws Exception
-     */
-    public TransportConnector addConnector(String bindAddress) throws Exception {
-        return addConnector(new URI(bindAddress));
-    }
-
-    /**
-     * Adds a new transport connector for the given bind address
-     * 
-     * @return the newly created and added transport connector
-     * @throws Exception
-     */
-    public TransportConnector addConnector(URI bindAddress) throws Exception {
-        return addConnector(createTransportConnector(bindAddress));
-    }
-
-    /**
-     * Adds a new transport connector for the given TransportServer transport
-     * 
-     * @return the newly created and added transport connector
-     * @throws Exception
-     */
-    public TransportConnector addConnector(TransportServer transport) throws Exception {
-        return addConnector(new TransportConnector(transport));
-    }
-
-    /**
-     * Adds a new transport connector
-     * 
-     * @return the transport connector
-     * @throws Exception
-     */
-    public TransportConnector addConnector(TransportConnector connector) throws Exception {
-        transportConnectors.add(connector);
-        return connector;
-    }
-
-    /**
-     * Stops and removes a transport connector from the broker.
-     * 
-     * @param connector
-     * @return true if the connector has been previously added to the broker
-     * @throws Exception
-     */
-    public boolean removeConnector(TransportConnector connector) throws Exception {
-        boolean rc = transportConnectors.remove(connector);
-        if (rc) {
-            unregisterConnectorMBean(connector);
-        }
-        return rc;
-    }
-
-    /**
-     * Adds a new network connector using the given discovery address
-     * 
-     * @return the newly created and added network connector
-     * @throws Exception
-     */
-    public NetworkConnector addNetworkConnector(String discoveryAddress) throws Exception {
-        return addNetworkConnector(new URI(discoveryAddress));
-    }
-
-    /**
-     * Adds a new proxy connector using the given bind address
-     * 
-     * @return the newly created and added network connector
-     * @throws Exception
-     */
-    public ProxyConnector addProxyConnector(String bindAddress) throws Exception {
-        return addProxyConnector(new URI(bindAddress));
-    }
-
-    /**
-     * Adds a new network connector using the given discovery address
-     * 
-     * @return the newly created and added network connector
-     * @throws Exception
-     */
-    public NetworkConnector addNetworkConnector(URI discoveryAddress) throws Exception {
-        if (!isAdvisorySupport()) {
-            throw new javax.jms.IllegalStateException(
-                    "Networks require advisory messages to function - advisories are currently disabled");
-        }
-        NetworkConnector connector = new DiscoveryNetworkConnector(discoveryAddress);
-        return addNetworkConnector(connector);
-    }
-
-    /**
-     * Adds a new proxy connector using the given bind address
-     * 
-     * @return the newly created and added network connector
-     * @throws Exception
-     */
-    public ProxyConnector addProxyConnector(URI bindAddress) throws Exception {
-        ProxyConnector connector = new ProxyConnector();
-        connector.setBind(bindAddress);
-        connector.setRemote(new URI("fanout:multicast://default"));
-        return addProxyConnector(connector);
-    }
-
-    /**
-     * Adds a new network connector to connect this broker to a federated
-     * network
-     */
-    public NetworkConnector addNetworkConnector(NetworkConnector connector) throws Exception {
-        connector.setBrokerService(this);
-        URI uri = getVmConnectorURI();
-        Map<String, String> map = new HashMap<String, String>(URISupport.parseParameters(uri));
-        map.put("network", "true");
-        uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
-        connector.setLocalUri(uri);
-        // Set a connection filter so that the connector does not establish loop
-        // back connections.
-        connector.setConnectionFilter(new ConnectionFilter() {
-            public boolean connectTo(URI location) {
-                List<TransportConnector> transportConnectors = getTransportConnectors();
-                for (Iterator<TransportConnector> iter = transportConnectors.iterator(); iter.hasNext();) {
-                    try {
-                        TransportConnector tc = iter.next();
-                        if (location.equals(tc.getConnectUri())) {
-                            return false;
-                        }
-                    } catch (Throwable e) {
-                    }
-                }
-                return true;
-            }
-        });
-        networkConnectors.add(connector);
-        if (isUseJmx()) {
-            registerNetworkConnectorMBean(connector);
-        }
-        return connector;
-    }
-
-    /**
-     * Removes the given network connector without stopping it. The caller
-     * should call {@link NetworkConnector#stop()} to close the connector
-     */
-    public boolean removeNetworkConnector(NetworkConnector connector) {
-        boolean answer = networkConnectors.remove(connector);
-        if (answer) {
-            unregisterNetworkConnectorMBean(connector);
-        }
-        return answer;
-    }
-
-    public ProxyConnector addProxyConnector(ProxyConnector connector) throws Exception {
-        URI uri = getVmConnectorURI();
-        connector.setLocalUri(uri);
-        proxyConnectors.add(connector);
-        if (isUseJmx()) {
-            registerProxyConnectorMBean(connector);
-        }
-        return connector;
-    }
-
-    public JmsConnector addJmsConnector(JmsConnector connector) throws Exception {
-        connector.setBrokerService(this);
-        jmsConnectors.add(connector);
-        if (isUseJmx()) {
-            registerJmsConnectorMBean(connector);
-        }
-        return connector;
-    }
-
-    public JmsConnector removeJmsConnector(JmsConnector connector) {
-        if (jmsConnectors.remove(connector)) {
-            return connector;
-        }
-        return null;
-    }
-
-    /**
-     * @return Returns the masterConnectorURI.
-     */
-    public String getMasterConnectorURI() {
-        return masterConnectorURI;
-    }
-
-    /**
-     * @param masterConnectorURI
-     *            The masterConnectorURI to set.
-     */
-    public void setMasterConnectorURI(String masterConnectorURI) {
-        this.masterConnectorURI = masterConnectorURI;
-    }
-
-    /**
-     * @return true if this Broker is a slave to a Master
-     */
-    public boolean isSlave() {
-        return (masterConnector != null && masterConnector.isSlave()) ||
-            (masterConnector != null && masterConnector.isStoppedBeforeStart()) ||
-            (masterConnector == null && slave);
-    }
-
-    public void masterFailed() {
-        if (shutdownOnMasterFailure) {
-            LOG.error("The Master has failed ... shutting down");
-            try {
-                stop();
-            } catch (Exception e) {
-                LOG.error("Failed to stop for master failure", e);
-            }
-        } else {
-            LOG.warn("Master Failed - starting all connectors");
-            try {
-                startAllConnectors();
-                broker.nowMasterBroker();
-            } catch (Exception e) {
-                LOG.error("Failed to startAllConnectors", e);
-            }
-        }
-    }
-
-    public boolean isStarted() {
-        return started.get();
-    }
-
-    public void start(boolean force) throws Exception {
-        forceStart = force;
-        stopped.set(false);
-        started.set(false);
-        start();
-    }
-
-    // Service interface
-    // -------------------------------------------------------------------------
-
-    protected boolean shouldAutostart() {
-        return true;
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org. apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void autoStart() throws Exception {
-        if(shouldAutostart()) {
-            start();
-        }
-    }
-
-    public void start() throws Exception {
-        if (stopped.get() || !started.compareAndSet(false, true)) {
-            // lets just ignore redundant start() calls
-            // as its way too easy to not be completely sure if start() has been
-            // called or not with the gazillion of different configuration
-            // mechanisms
-            // throw new IllegalStateException("Allready started.");
-            return;
-        }
-
-        MDC.put("activemq.broker", brokerName);
-
-        try {
-        	if (systemExitOnShutdown && useShutdownHook) {
-        		throw new ConfigurationException("'useShutdownHook' property cannot be be used with 'systemExitOnShutdown', please turn it off (useShutdownHook=false)");
-        	}
-            processHelperProperties();
-            if (isUseJmx()) {
-            	startManagementContext();
-            }
-            getPersistenceAdapter().setUsageManager(getProducerSystemUsage());
-            getPersistenceAdapter().setBrokerName(getBrokerName());
-            LOG.info("Using Persistence Adapter: " + getPersistenceAdapter());
-            if (deleteAllMessagesOnStartup) {
-                deleteAllMessages();
-            }
-            getPersistenceAdapter().start();
-            slave = false;
-            startDestinations();
-            addShutdownHook();
-            getBroker().start();
-            if (isUseJmx()) {
-            	if (getManagementContext().isCreateConnector() && !getManagementContext().isConnectorStarted()) {
-            		// try to restart management context
-            		// typical for slaves that use the same ports as master
-            		managementContext.stop();
-            		startManagementContext();
-            	}
-                ManagedRegionBroker managedBroker = (ManagedRegionBroker) regionBroker;
-                managedBroker.setContextBroker(broker);
-            	adminView.setBroker(managedBroker);
-            }
-            BrokerRegistry.getInstance().bind(getBrokerName(), this);
-            // see if there is a MasterBroker service and if so, configure
-            // it and start it.
-            for (Service service : services) {
-                if (service instanceof MasterConnector) {
-                    configureService(service);
-                    service.start();
-                }
-            }
-            if (!isSlave() && (this.masterConnector == null || isShutdownOnMasterFailure() == false)) {
-                startAllConnectors();
-            }
-            if (!stopped.get()) {
-                if (isUseJmx() && masterConnector != null) {
-                    registerFTConnectorMBean(masterConnector);
-                }
-            }
-            if (brokerId == null) {
-                brokerId = broker.getBrokerId();
-            }
-            if (ioExceptionHandler == null) {
-            	setIoExceptionHandler(new DefaultIOExceptionHandler());
-            }
-            LOG.info("ActiveMQ JMS Message Broker (" + getBrokerName() + ", " + brokerId + ") started");
-            getBroker().brokerServiceStarted();
-            startedLatch.countDown();
-        } catch (Exception e) {
-            LOG.error("Failed to start ActiveMQ JMS Message Broker. Reason: " + e, e);
-            try {
-                if (!stopped.get()) {
-                    stop();
-                }
-            } catch (Exception ex) {
-                LOG.warn("Failed to stop broker after failure in start ", ex);
-            }
-            throw e;
-        } finally {
-            MDC.remove("activemq.broker");
-        }
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache .xbean.DestroyMethod
-     */
-    @PreDestroy
-    public void stop() throws Exception {
-        if (!started.get()) {
-            return;
-        }
-
-        MDC.put("activemq.broker", brokerName);
-
-        if (systemExitOnShutdown) {
-        	new Thread() {
-        		@Override
-                public void run() {
-        			System.exit(systemExitOnShutdownExitCode);
-        		}
-        	}.start();
-        }
-
-        LOG.info("ActiveMQ Message Broker (" + getBrokerName() + ", " + brokerId + ") is shutting down");
-        removeShutdownHook();
-        ServiceStopper stopper = new ServiceStopper();
-        if (services != null) {
-            for (Service service : services) {
-                stopper.stop(service);
-            }
-        }
-        stopAllConnectors(stopper);
-        // remove any VMTransports connected
-        // this has to be done after services are stopped,
-        // to avoid timimg issue with discovery (spinning up a new instance)
-        BrokerRegistry.getInstance().unbind(getBrokerName());
-        VMTransportFactory.stopped(getBrokerName());
-        if (broker != null) {
-            stopper.stop(broker);
-            broker = null;
-        }
-
-        if (tempDataStore != null) {
-            tempDataStore.stop();
-            tempDataStore = null;
-        }
-        stopper.stop(persistenceAdapter);
-        persistenceAdapter = null;
-        slave = true;
-        if (isUseJmx()) {
-            stopper.stop(getManagementContext());
-            managementContext = null;
-        }
-        // Clear SelectorParser cache to free memory
-        SelectorParser.clearCache();
-        stopped.set(true);
-        stoppedLatch.countDown();
-        if (masterConnectorURI == null) {
-            // master start has not finished yet
-            if (slaveStartSignal.getCount() == 1) {
-                started.set(false);
-                slaveStartSignal.countDown();
-            }
-        } else {
-            for (Service service : services) {
-                if (service instanceof MasterConnector) {
-                    MasterConnector mConnector = (MasterConnector) service;
-                    if (!mConnector.isSlave()) {
-                        // means should be slave but not connected to master yet
-                        started.set(false);
-                        mConnector.stopBeforeConnected();
-                    }
-                }
-            }
-        }
-        if (this.taskRunnerFactory != null) {
-            this.taskRunnerFactory.shutdown();
-            this.taskRunnerFactory = null;
-        }
-        if (this.scheduler != null) {
-            this.scheduler.stop();
-            this.scheduler = null;
-        }
-        if (this.executor != null) {
-            this.executor.shutdownNow();
-            this.executor = null;
-        }
-
-        this.destinationInterceptors = null;
-        this.destinationFactory = null;
-
-        LOG.info("ActiveMQ JMS Message Broker (" + getBrokerName() + ", " + brokerId + ") stopped");
-        synchronized (shutdownHooks) {
-            for (Runnable hook : shutdownHooks) {
-                try {
-                    hook.run();
-                } catch (Throwable e) {
-                    stopper.onException(hook, e);
-                }
-            }
-        }
-
-        MDC.remove("activemq.broker");
-
-        stopper.throwFirstException();
-    }
-    
-    public boolean checkQueueSize(String queueName) {
-        long count = 0;
-        long queueSize = 0;
-        Map<ActiveMQDestination, Destination> destinationMap = regionBroker.getDestinationMap();
-        for (Map.Entry<ActiveMQDestination, Destination> entry : destinationMap.entrySet()) {
-            if (entry.getKey().isQueue()) {
-                if (entry.getValue().getName().matches(queueName)) {
-                    queueSize = entry.getValue().getDestinationStatistics().getMessages().getCount();
-                    count += queueSize;
-                    if (queueSize > 0) {
-                        LOG.info("Queue has pending message:" + entry.getValue().getName() + " queueSize is:"
-                                + queueSize);
-                    }
-                }
-            }
-        }
-        return count == 0;
-    }
-
-    /**
-     * This method (both connectorName and queueName are using regex to match)
-     * 1. stop the connector (supposed the user input the connector which the
-     * clients connect to) 2. to check whether there is any pending message on
-     * the queues defined by queueName 3. supposedly, after stop the connector,
-     * client should failover to other broker and pending messages should be
-     * forwarded. if no pending messages, the method finally call stop to stop
-     * the broker.
-     * 
-     * @param connectorName
-     * @param queueName
-     * @param timeout
-     * @param pollInterval
-     * @throws Exception
-     */
-    public void stopGracefully(String connectorName, String queueName, long timeout, long pollInterval)
-            throws Exception {
-        if (isUseJmx()) {
-            if (connectorName == null || queueName == null || timeout <= 0) {
-                throw new Exception(
-                        "connectorName and queueName cannot be null and timeout should be >0 for stopGracefully.");
-            }
-            if (pollInterval <= 0) {
-                pollInterval = 30;
-            }
-            LOG.info("Stop gracefully with connectorName:" + connectorName + " queueName:" + queueName + " timeout:"
-                    + timeout + " pollInterval:" + pollInterval);
-            TransportConnector connector;
-            for (int i = 0; i < transportConnectors.size(); i++) {
-                connector = transportConnectors.get(i);
-                if (connector != null && connector.getName() != null && connector.getName().matches(connectorName)) {
-                    connector.stop();
-                }
-            }
-            long start = System.currentTimeMillis();
-            while (System.currentTimeMillis() - start < timeout * 1000) {
-                // check quesize until it gets zero
-                if (checkQueueSize(queueName)) {
-                    stop();
-                    break;
-                } else {
-                    Thread.sleep(pollInterval * 1000);
-                }
-            }
-            if (stopped.get()) {
-                LOG.info("Successfully stop the broker.");
-            } else {
-                LOG.info("There is still pending message on the queue. Please check and stop the broker manually.");
-            }
-        }
-    }
-
-    /**
-     * A helper method to block the caller thread until the broker has been
-     * stopped
-     */
-    public void waitUntilStopped() {
-        while (isStarted() && !stopped.get()) {
-            try {
-                stoppedLatch.await();
-            } catch (InterruptedException e) {
-                // ignore
-            }
-        }
-    }
-
-    /**
-     * A helper method to block the caller thread until the broker has fully started
-     * @return boolean true if wait succeeded false if broker was not started or was stopped
-     */
-    public boolean waitUntilStarted() {
-        boolean waitSucceeded = false;
-        while (isStarted() && !stopped.get() && !waitSucceeded) {
-            try {
-                waitSucceeded = startedLatch.await(100L, TimeUnit.MILLISECONDS);
-            } catch (InterruptedException ignore) {
-            }
-        }
-        return waitSucceeded;
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    /**
-     * Returns the message broker
-     */
-    public Broker getBroker() throws Exception {
-        if (broker == null) {
-            LOG.info("ActiveMQ " + ActiveMQConnectionMetaData.PROVIDER_VERSION + " JMS Message Broker ("
-                    + getBrokerName() + ") is starting");
-            LOG.info("For help or more information please see: http://activemq.apache.org/");
-            broker = createBroker();
-        }
-        return broker;
-    }
-
-    /**
-     * Returns the administration view of the broker; used to create and destroy
-     * resources such as queues and topics. Note this method returns null if JMX
-     * is disabled.
-     */
-    public BrokerView getAdminView() throws Exception {
-        if (adminView == null) {
-            // force lazy creation
-            getBroker();
-        }
-        return adminView;
-    }
-
-    public void setAdminView(BrokerView adminView) {
-        this.adminView = adminView;
-    }
-
-    public String getBrokerName() {
-        return brokerName;
-    }
-
-    /**
-     * Sets the name of this broker; which must be unique in the network
-     * 
-     * @param brokerName
-     */
-    public void setBrokerName(String brokerName) {
-        if (brokerName == null) {
-            throw new NullPointerException("The broker name cannot be null");
-        }
-        String str = brokerName.replaceAll("[^a-zA-Z0-9\\.\\_\\-\\:]", "_");
-        if (!str.equals(brokerName)) {
-            LOG.error("Broker Name: " + brokerName + " contained illegal characters - replaced with " + str);
-        }
-        this.brokerName = str.trim();
-    }
-
-    public PersistenceAdapterFactory getPersistenceFactory() {
-        return persistenceFactory;
-    }
-
-    public File getDataDirectoryFile() {
-        if (dataDirectoryFile == null) {
-            dataDirectoryFile = new File(IOHelper.getDefaultDataDirectory());
-        }
-        return dataDirectoryFile;
-    }
-
-    public File getBrokerDataDirectory() {
-        String brokerDir = getBrokerName();
-        return new File(getDataDirectoryFile(), brokerDir);
-    }
-
-    /**
-     * Sets the directory in which the data files will be stored by default for
-     * the JDBC and Journal persistence adaptors.
-     * 
-     * @param dataDirectory
-     *            the directory to store data files
-     */
-    public void setDataDirectory(String dataDirectory) {
-        setDataDirectoryFile(new File(dataDirectory));
-    }
-
-    /**
-     * Sets the directory in which the data files will be stored by default for
-     * the JDBC and Journal persistence adaptors.
-     * 
-     * @param dataDirectoryFile
-     *            the directory to store data files
-     */
-    public void setDataDirectoryFile(File dataDirectoryFile) {
-        this.dataDirectoryFile = dataDirectoryFile;
-    }
-
-    /**
-     * @return the tmpDataDirectory
-     */
-    public File getTmpDataDirectory() {
-        if (tmpDataDirectory == null) {
-            tmpDataDirectory = new File(getBrokerDataDirectory(), "tmp_storage");
-        }
-        return tmpDataDirectory;
-    }
-
-    /**
-     * @param tmpDataDirectory
-     *            the tmpDataDirectory to set
-     */
-    public void setTmpDataDirectory(File tmpDataDirectory) {
-        this.tmpDataDirectory = tmpDataDirectory;
-    }
-
-    public void setPersistenceFactory(PersistenceAdapterFactory persistenceFactory) {
-        this.persistenceFactory = persistenceFactory;
-    }
-
-    public void setDestinationFactory(DestinationFactory destinationFactory) {
-        this.destinationFactory = destinationFactory;
-    }
-
-    public boolean isPersistent() {
-        return persistent;
-    }
-
-    /**
-     * Sets whether or not persistence is enabled or disabled.
-     */
-    public void setPersistent(boolean persistent) {
-        this.persistent = persistent;
-    }
-
-    public boolean isPopulateJMSXUserID() {
-        return populateJMSXUserID;
-    }
-
-    /**
-     * Sets whether or not the broker should populate the JMSXUserID header.
-     */
-    public void setPopulateJMSXUserID(boolean populateJMSXUserID) {
-        this.populateJMSXUserID = populateJMSXUserID;
-    }
-
-    public SystemUsage getSystemUsage() {
-        try {
-            if (systemUsage == null) {
-                systemUsage = new SystemUsage("Main", getPersistenceAdapter(), getTempDataStore());
-                systemUsage.setExecutor(getExecutor());
-                systemUsage.getMemoryUsage().setLimit(1024 * 1024 * 64); // Default
-                                                                         // 64
-                                                                         // Meg
-                systemUsage.getTempUsage().setLimit(1024L * 1024 * 1024 * 100); // 10
-                                                                                // Gb
-                systemUsage.getStoreUsage().setLimit(1024L * 1024 * 1024 * 100); // 100
-                                                                                 // GB
-                addService(this.systemUsage);
-            }
-            return systemUsage;
-        } catch (IOException e) {
-            LOG.error("Cannot create SystemUsage", e);
-            throw new RuntimeException("Fatally failed to create SystemUsage" + e.getMessage());
-        }
-    }
-
-    public void setSystemUsage(SystemUsage memoryManager) {
-        if (this.systemUsage != null) {
-            removeService(this.systemUsage);
-        }
-        this.systemUsage = memoryManager;
-        if (this.systemUsage.getExecutor()==null) {
-            this.systemUsage.setExecutor(getExecutor());
-        }
-        addService(this.systemUsage);
-    }
-
-    /**
-     * @return the consumerUsageManager
-     * @throws IOException
-     */
-    public SystemUsage getConsumerSystemUsage() throws IOException {
-        if (this.consumerSystemUsaage == null) {
-            if (splitSystemUsageForProducersConsumers) {
-                this.consumerSystemUsaage = new SystemUsage(getSystemUsage(), "Consumer");
-                float portion = consumerSystemUsagePortion / 100f;
-                this.consumerSystemUsaage.getMemoryUsage().setUsagePortion(portion);
-                addService(this.consumerSystemUsaage);
-            } else {
-                consumerSystemUsaage = getSystemUsage();
-            }
-        }
-        return this.consumerSystemUsaage;
-    }
-
-    /**
-     * @param consumerSystemUsaage
-     *            the storeSystemUsage to set
-     */
-    public void setConsumerSystemUsage(SystemUsage consumerSystemUsaage) {
-        if (this.consumerSystemUsaage != null) {
-            removeService(this.consumerSystemUsaage);
-        }
-        this.consumerSystemUsaage = consumerSystemUsaage;
-        addService(this.consumerSystemUsaage);
-    }
-
-    /**
-     * @return the producerUsageManager
-     * @throws IOException
-     */
-    public SystemUsage getProducerSystemUsage() throws IOException {
-        if (producerSystemUsage == null) {
-            if (splitSystemUsageForProducersConsumers) {
-                producerSystemUsage = new SystemUsage(getSystemUsage(), "Producer");
-                float portion = producerSystemUsagePortion / 100f;
-                producerSystemUsage.getMemoryUsage().setUsagePortion(portion);
-                addService(producerSystemUsage);
-            } else {
-                producerSystemUsage = getSystemUsage();
-            }
-        }
-        return producerSystemUsage;
-    }
-
-    /**
-     * @param producerUsageManager
-     *            the producerUsageManager to set
-     */
-    public void setProducerSystemUsage(SystemUsage producerUsageManager) {
-        if (this.producerSystemUsage != null) {
-            removeService(this.producerSystemUsage);
-        }
-        this.producerSystemUsage = producerUsageManager;
-        addService(this.producerSystemUsage);
-    }
-
-    public PersistenceAdapter getPersistenceAdapter() throws IOException {
-        if (persistenceAdapter == null) {
-            persistenceAdapter = createPersistenceAdapter();
-            configureService(persistenceAdapter);
-            this.persistenceAdapter = registerPersistenceAdapterMBean(persistenceAdapter);
-        }
-        return persistenceAdapter;
-    }
-
-    /**
-     * Sets the persistence adaptor implementation to use for this broker
-     * 
-     * @throws IOException
-     */
-    public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter) throws IOException {
-        this.persistenceAdapter = persistenceAdapter;
-        configureService(this.persistenceAdapter);
-        this.persistenceAdapter = registerPersistenceAdapterMBean(persistenceAdapter);
-    }
-
-    public TaskRunnerFactory getTaskRunnerFactory() {
-        if (this.taskRunnerFactory == null) {
-            this.taskRunnerFactory = new TaskRunnerFactory("BrokerService["+getBrokerName()+"] Task", getTaskRunnerPriority(), true, 1000,
-                    isDedicatedTaskRunner());
-        }
-        return this.taskRunnerFactory;
-    }
-
-    public void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory) {
-        this.taskRunnerFactory = taskRunnerFactory;
-    }
-
-    public TaskRunnerFactory getPersistenceTaskRunnerFactory() {
-        if (taskRunnerFactory == null) {
-            persistenceTaskRunnerFactory = new TaskRunnerFactory("Persistence Adaptor Task", persistenceThreadPriority,
-                    true, 1000, isDedicatedTaskRunner());
-        }
-        return persistenceTaskRunnerFactory;
-    }
-
-    public void setPersistenceTaskRunnerFactory(TaskRunnerFactory persistenceTaskRunnerFactory) {
-        this.persistenceTaskRunnerFactory = persistenceTaskRunnerFactory;
-    }
-
-    public boolean isUseJmx() {
-        return useJmx;
-    }
-
-    public boolean isEnableStatistics() {
-        return enableStatistics;
-    }
-
-    /**
-     * Sets whether or not the Broker's services enable statistics or not.
-     */
-    public void setEnableStatistics(boolean enableStatistics) {
-        this.enableStatistics = enableStatistics;
-    }
-
-    /**
-     * Sets whether or not the Broker's services should be exposed into JMX or
-     * not.
-     */
-    public void setUseJmx(boolean useJmx) {
-        this.useJmx = useJmx;
-    }
-
-    public ObjectName getBrokerObjectName() throws IOException {
-        if (brokerObjectName == null) {
-            brokerObjectName = createBrokerObjectName();
-        }
-        return brokerObjectName;
-    }
-
-    /**
-     * Sets the JMX ObjectName for this broker
-     */
-    public void setBrokerObjectName(ObjectName brokerObjectName) {
-        this.brokerObjectName = brokerObjectName;
-    }
-
-    public ManagementContext getManagementContext() {
-        if (managementContext == null) {
-            managementContext = new ManagementContext();
-        }
-        return managementContext;
-    }
-
-    public void setManagementContext(ManagementContext managementContext) {
-        this.managementContext = managementContext;
-    }
-
-    public NetworkConnector getNetworkConnectorByName(String connectorName) {
-        for (NetworkConnector connector : networkConnectors) {
-            if (connector.getName().equals(connectorName)) {
-                return connector;
-            }
-        }
-        return null;
-    }
-
-    public String[] getNetworkConnectorURIs() {
-        return networkConnectorURIs;
-    }
-
-    public void setNetworkConnectorURIs(String[] networkConnectorURIs) {
-        this.networkConnectorURIs = networkConnectorURIs;
-    }
-
-    public TransportConnector getConnectorByName(String connectorName) {
-        for (TransportConnector connector : transportConnectors) {
-            if (connector.getName().equals(connectorName)) {
-                return connector;
-            }
-        }
-        return null;
-    }
-    
-    public Map<String, String> getTransportConnectorURIsAsMap() {
-        Map<String, String> answer = new HashMap<String, String>();
-        for (TransportConnector connector : transportConnectors) {
-            try {
-                URI uri = connector.getConnectUri();
-                String scheme = uri.getScheme();
-                if (scheme != null) {
-                    answer.put(scheme.toLowerCase(), uri.toString());
-                }
-            } catch (Exception e) {
-                LOG.debug("Failed to read URI to build transportURIsAsMap", e);
-            }
-        }
-        return answer;
-    }
-
-    public String[] getTransportConnectorURIs() {
-        return transportConnectorURIs;
-    }
-
-    public void setTransportConnectorURIs(String[] transportConnectorURIs) {
-        this.transportConnectorURIs = transportConnectorURIs;
-    }
-
-    /**
-     * @return Returns the jmsBridgeConnectors.
-     */
-    public JmsConnector[] getJmsBridgeConnectors() {
-        return jmsBridgeConnectors;
-    }
-
-    /**
-     * @param jmsConnectors
-     *            The jmsBridgeConnectors to set.
-     */
-    public void setJmsBridgeConnectors(JmsConnector[] jmsConnectors) {
-        this.jmsBridgeConnectors = jmsConnectors;
-    }
-
-    public Service[] getServices() {
-        return services.toArray(new Service[0]);
-    }
-
-    /**
-     * Sets the services associated with this broker such as a
-     * {@link MasterConnector}
-     */
-    public void setServices(Service[] services) {
-        this.services.clear();
-        if (services != null) {
-            for (int i = 0; i < services.length; i++) {
-                this.services.add(services[i]);
-            }
-        }
-    }
-
-    /**
-     * Adds a new service so that it will be started as part of the broker
-     * lifecycle
-     */
-    public void addService(Service service) {
-        services.add(service);
-    }
-
-    public void removeService(Service service) {
-        services.remove(service);
-    }
-
-    public boolean isUseLoggingForShutdownErrors() {
-        return useLoggingForShutdownErrors;
-    }
-
-    /**
-     * Sets whether or not we should use commons-logging when reporting errors
-     * when shutting down the broker
-     */
-    public void setUseLoggingForShutdownErrors(boolean useLoggingForShutdownErrors) {
-        this.useLoggingForShutdownErrors = useLoggingForShutdownErrors;
-    }
-
-    public boolean isUseShutdownHook() {
-        return useShutdownHook;
-    }
-
-    /**
-     * Sets whether or not we should use a shutdown handler to close down the
-     * broker cleanly if the JVM is terminated. It is recommended you leave this
-     * enabled.
-     */
-    public void setUseShutdownHook(boolean useShutdownHook) {
-        this.useShutdownHook = useShutdownHook;
-    }
-
-    public boolean isAdvisorySupport() {
-        return advisorySupport;
-    }
-
-    /**
-     * Allows the support of advisory messages to be disabled for performance
-     * reasons.
-     */
-    public void setAdvisorySupport(boolean advisorySupport) {
-        this.advisorySupport = advisorySupport;
-    }
-
-    public List<TransportConnector> getTransportConnectors() {
-        return new ArrayList<TransportConnector>(transportConnectors);
-    }
-
-    /**
-     * Sets the transport connectors which this broker will listen on for new
-     * clients
-     * 
-     * @org.apache.xbean.Property 
-     *                            nestedType="org.apache.activemq.broker.TransportConnector"
-     */
-    public void setTransportConnectors(List<TransportConnector> transportConnectors) throws Exception {
-        for (Iterator<TransportConnector> iter = transportConnectors.iterator(); iter.hasNext();) {
-            TransportConnector connector = iter.next();
-            addConnector(connector);
-        }
-    }
-
-    public List<NetworkConnector> getNetworkConnectors() {
-        return new ArrayList<NetworkConnector>(networkConnectors);
-    }
-
-    public List<ProxyConnector> getProxyConnectors() {
-        return new ArrayList<ProxyConnector>(proxyConnectors);
-    }
-
-    /**
-     * Sets the network connectors which this broker will use to connect to
-     * other brokers in a federated network
-     * 
-     * @org.apache.xbean.Property 
-     *                            nestedType="org.apache.activemq.network.NetworkConnector"
-     */
-    public void setNetworkConnectors(List networkConnectors) throws Exception {
-        for (Iterator iter = networkConnectors.iterator(); iter.hasNext();) {
-            NetworkConnector connector = (NetworkConnector) iter.next();
-            addNetworkConnector(connector);
-        }
-    }
-
-    /**
-     * Sets the network connectors which this broker will use to connect to
-     * other brokers in a federated network
-     */
-    public void setProxyConnectors(List proxyConnectors) throws Exception {
-        for (Iterator iter = proxyConnectors.iterator(); iter.hasNext();) {
-            ProxyConnector connector = (ProxyConnector) iter.next();
-            addProxyConnector(connector);
-        }
-    }
-
-    public PolicyMap getDestinationPolicy() {
-        return destinationPolicy;
-    }
-
-    /**
-     * Sets the destination specific policies available either for exact
-     * destinations or for wildcard areas of destinations.
-     */
-    public void setDestinationPolicy(PolicyMap policyMap) {
-        this.destinationPolicy = policyMap;
-    }
-
-    public BrokerPlugin[] getPlugins() {
-        return plugins;
-    }
-
-    /**
-     * Sets a number of broker plugins to install such as for security
-     * authentication or authorization
-     */
-    public void setPlugins(BrokerPlugin[] plugins) {
-        this.plugins = plugins;
-    }
-
-    public MessageAuthorizationPolicy getMessageAuthorizationPolicy() {
-        return messageAuthorizationPolicy;
-    }
-
-    /**
-     * Sets the policy used to decide if the current connection is authorized to
-     * consume a given message
-     */
-    public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy) {
-        this.messageAuthorizationPolicy = messageAuthorizationPolicy;
-    }
-
-    /**
-     * Delete all messages from the persistent store
-     * 
-     * @throws IOException
-     */
-    public void deleteAllMessages() throws IOException {
-        getPersistenceAdapter().deleteAllMessages();
-    }
-
-    public boolean isDeleteAllMessagesOnStartup() {
-        return deleteAllMessagesOnStartup;
-    }
-
-    /**
-     * Sets whether or not all messages are deleted on startup - mostly only
-     * useful for testing.
-     */
-    public void setDeleteAllMessagesOnStartup(boolean deletePersistentMessagesOnStartup) {
-        this.deleteAllMessagesOnStartup = deletePersistentMessagesOnStartup;
-    }
-
-    public URI getVmConnectorURI() {
-        if (vmConnectorURI == null) {
-            try {
-                vmConnectorURI = new URI("vm://" + getBrokerName().replaceAll("[^a-zA-Z0-9\\.\\_\\-]", "_"));
-            } catch (URISyntaxException e) {
-                LOG.error("Badly formed URI from " + getBrokerName(), e);
-            }
-        }
-        return vmConnectorURI;
-    }
-
-    public void setVmConnectorURI(URI vmConnectorURI) {
-        this.vmConnectorURI = vmConnectorURI;
-    }
-    
-    public String getDefaultSocketURIString() {
-       
-            if (started.get()) {
-                if (this.defaultSocketURIString ==null) {
-                    for (TransportConnector tc:this.transportConnectors) {
-                        String result = null;
-                        try {
-                            result = tc.getPublishableConnectString();
-                        } catch (Exception e) {
-                          LOG.warn("Failed to get the ConnectURI for "+tc,e);
-                        }
-                        if (result != null) {
-                            this.defaultSocketURIString =result;
-                            break;
-                        }
-                    }
-                }
-                return this.defaultSocketURIString;
-            }
-       return null;
-    }
-
-    /**
-     * @return Returns the shutdownOnMasterFailure.
-     */
-    public boolean isShutdownOnMasterFailure() {
-        return shutdownOnMasterFailure;
-    }
-
-    /**
-     * @param shutdownOnMasterFailure
-     *            The shutdownOnMasterFailure to set.
-     */
-    public void setShutdownOnMasterFailure(boolean shutdownOnMasterFailure) {
-        this.shutdownOnMasterFailure = shutdownOnMasterFailure;
-    }
-
-    public boolean isKeepDurableSubsActive() {
-        return keepDurableSubsActive;
-    }
-
-    public void setKeepDurableSubsActive(boolean keepDurableSubsActive) {
-        this.keepDurableSubsActive = keepDurableSubsActive;
-    }
-
-    public boolean isUseVirtualTopics() {
-        return useVirtualTopics;
-    }
-
-    /**
-     * Sets whether or not <a
-     * href="http://activemq.apache.org/virtual-destinations.html">Virtual
-     * Topics</a> should be supported by default if they have not been
-     * explicitly configured.
-     */
-    public void setUseVirtualTopics(boolean useVirtualTopics) {
-        this.useVirtualTopics = useVirtualTopics;
-    }
-
-    public DestinationInterceptor[] getDestinationInterceptors() {
-        return destinationInterceptors;
-    }
-
-    public boolean isUseMirroredQueues() {
-        return useMirroredQueues;
-    }
-
-    /**
-     * Sets whether or not <a
-     * href="http://activemq.apache.org/mirrored-queues.html">Mirrored
-     * Queues</a> should be supported by default if they have not been
-     * explicitly configured.
-     */
-    public void setUseMirroredQueues(boolean useMirroredQueues) {
-        this.useMirroredQueues = useMirroredQueues;
-    }
-
-    /**
-     * Sets the destination interceptors to use
-     */
-    public void setDestinationInterceptors(DestinationInterceptor[] destinationInterceptors) {
-        this.destinationInterceptors = destinationInterceptors;
-    }
-
-    public ActiveMQDestination[] getDestinations() {
-        return destinations;
-    }
-
-    /**
-     * Sets the destinations which should be loaded/created on startup
-     */
-    public void setDestinations(ActiveMQDestination[] destinations) {
-        this.destinations = destinations;
-    }
-
-    /**
-     * @return the tempDataStore
-     */
-    public synchronized PListStore getTempDataStore() {
-        if (tempDataStore == null) {
-            if (!isPersistent()) {
-                return null;
-            }
-            boolean result = true;
-            boolean empty = true;
-            try {
-                File directory = getTmpDataDirectory();
-                if (directory.exists() && directory.isDirectory()) {
-                    File[] files = directory.listFiles();
-                    if (files != null && files.length > 0) {
-                        empty = false;
-                        for (int i = 0; i < files.length; i++) {
-                            File file = files[i];
-                            if (!file.isDirectory()) {
-                                result &= file.delete();
-                            }
-                        }
-                    }
-                }
-                if (!empty) {
-                    String str = result ? "Successfully deleted" : "Failed to delete";
-                    LOG.info(str + " temporary storage");
-                }
-                this.tempDataStore = new PListStore();
-                this.tempDataStore.setDirectory(getTmpDataDirectory());
-                this.tempDataStore.start();
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return tempDataStore;
-    }
-
-    /**
-     * @param tempDataStore
-     *            the tempDataStore to set
-     */
-    public void setTempDataStore(PListStore tempDataStore) {
-        this.tempDataStore = tempDataStore;
-    }
-
-    public int getPersistenceThreadPriority() {
-        return persistenceThreadPriority;
-    }
-
-    public void setPersistenceThreadPriority(int persistenceThreadPriority) {
-        this.persistenceThreadPriority = persistenceThreadPriority;
-    }
-
-    /**
-     * @return the useLocalHostBrokerName
-     */
-    public boolean isUseLocalHostBrokerName() {
-        return this.useLocalHostBrokerName;
-    }
-
-    /**
-     * @param useLocalHostBrokerName
-     *            the useLocalHostBrokerName to set
-     */
-    public void setUseLocalHostBrokerName(boolean useLocalHostBrokerName) {
-        this.useLocalHostBrokerName = useLocalHostBrokerName;
-        if (useLocalHostBrokerName && !started.get() && brokerName == null || brokerName == DEFAULT_BROKER_NAME) {
-            brokerName = LOCAL_HOST_NAME;
-        }
-    }
-
-    /**
-     * @return the supportFailOver
-     */
-    public boolean isSupportFailOver() {
-        return this.supportFailOver;
-    }
-
-    /**
-     * @param supportFailOver
-     *            the supportFailOver to set
-     */
-    public void setSupportFailOver(boolean supportFailOver) {
-        this.supportFailOver = supportFailOver;
-    }
-
-    /**
-     * Looks up and lazily creates if necessary the destination for the given
-     * JMS name
-     */
-    public Destination getDestination(ActiveMQDestination destination) throws Exception {
-        return getBroker().addDestination(getAdminConnectionContext(), destination,false);
-    }
-
-    public void removeDestination(ActiveMQDestination destination) throws Exception {
-        getBroker().removeDestination(getAdminConnectionContext(), destination, 0);
-    }
-
-    public int getProducerSystemUsagePortion() {
-        return producerSystemUsagePortion;
-    }
-
-    public void setProducerSystemUsagePortion(int producerSystemUsagePortion) {
-        this.producerSystemUsagePortion = producerSystemUsagePortion;
-    }
-
-    public int getConsumerSystemUsagePortion() {
-        return consumerSystemUsagePortion;
-    }
-
-    public void setConsumerSystemUsagePortion(int consumerSystemUsagePortion) {
-        this.consumerSystemUsagePortion = consumerSystemUsagePortion;
-    }
-
-    public boolean isSplitSystemUsageForProducersConsumers() {
-        return splitSystemUsageForProducersConsumers;
-    }
-
-    public void setSplitSystemUsageForProducersConsumers(boolean splitSystemUsageForProducersConsumers) {
-        this.splitSystemUsageForProducersConsumers = splitSystemUsageForProducersConsumers;
-    }
-
-    public boolean isMonitorConnectionSplits() {
-        return monitorConnectionSplits;
-    }
-
-    public void setMonitorConnectionSplits(boolean monitorConnectionSplits) {
-        this.monitorConnectionSplits = monitorConnectionSplits;
-    }
-
-    public int getTaskRunnerPriority() {
-        return taskRunnerPriority;
-    }
-
-    public void setTaskRunnerPriority(int taskRunnerPriority) {
-        this.taskRunnerPriority = taskRunnerPriority;
-    }
-
-    public boolean isDedicatedTaskRunner() {
-        return dedicatedTaskRunner;
-    }
-
-    public void setDedicatedTaskRunner(boolean dedicatedTaskRunner) {
-        this.dedicatedTaskRunner = dedicatedTaskRunner;
-    }
-
-    public boolean isCacheTempDestinations() {
-        return cacheTempDestinations;
-    }
-
-    public void setCacheTempDestinations(boolean cacheTempDestinations) {
-        this.cacheTempDestinations = cacheTempDestinations;
-    }
-
-    public int getTimeBeforePurgeTempDestinations() {
-        return timeBeforePurgeTempDestinations;
-    }
-
-    public void setTimeBeforePurgeTempDestinations(int timeBeforePurgeTempDestinations) {
-        this.timeBeforePurgeTempDestinations = timeBeforePurgeTempDestinations;
-    }
-
-    public boolean isUseTempMirroredQueues() {
-        return useTempMirroredQueues;
-    }
-
-    public void setUseTempMirroredQueues(boolean useTempMirroredQueues) {
-        this.useTempMirroredQueues = useTempMirroredQueues;
-    }
-
-    //
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    /**
-     * Handles any lazy-creation helper properties which are added to make
-     * things easier to configure inside environments such as Spring
-     * 
-     * @throws Exception
-     */
-    protected void processHelperProperties() throws Exception {
-        boolean masterServiceExists = false;
-        if (transportConnectorURIs != null) {
-            for (int i = 0; i < transportConnectorURIs.length; i++) {
-                String uri = transportConnectorURIs[i];
-                addConnector(uri);
-            }
-        }
-        if (networkConnectorURIs != null) {
-            for (int i = 0; i < networkConnectorURIs.length; i++) {
-                String uri = networkConnectorURIs[i];
-                addNetworkConnector(uri);
-            }
-        }
-        if (jmsBridgeConnectors != null) {
-            for (int i = 0; i < jmsBridgeConnectors.length; i++) {
-                addJmsConnector(jmsBridgeConnectors[i]);
-            }
-        }
-        for (Service service : services) {
-            if (service instanceof MasterConnector) {
-                masterServiceExists = true;
-                break;
-            }
-        }
-        if (masterConnectorURI != null) {
-            if (masterServiceExists) {
-                throw new IllegalStateException(
-                        "Cannot specify masterConnectorURI when a masterConnector is already registered via the services property");
-            } else {
-                addService(new MasterConnector(masterConnectorURI));
-            }
-        }
-    }
-
-    public void stopAllConnectors(ServiceStopper stopper) {
-        for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
-            NetworkConnector connector = iter.next();
-            unregisterNetworkConnectorMBean(connector);
-            stopper.stop(connector);
-        }
-        for (Iterator<ProxyConnector> iter = getProxyConnectors().iterator(); iter.hasNext();) {
-            ProxyConnector connector = iter.next();
-            stopper.stop(connector);
-        }
-        for (Iterator<JmsConnector> iter = jmsConnectors.iterator(); iter.hasNext();) {
-            JmsConnector connector = iter.next();
-            stopper.stop(connector);
-        }
-        for (Iterator<TransportConnector> iter = getTransportConnectors().iterator(); iter.hasNext();) {
-            TransportConnector connector = iter.next();
-            stopper.stop(connector);
-        }
-    }
-
-    protected TransportConnector registerConnectorMBean(TransportConnector connector) throws IOException {
-        try {
-            ObjectName objectName = createConnectorObjectName(connector);
-            connector = connector.asManagedConnector(getManagementContext(), objectName);
-            ConnectorViewMBean view = new ConnectorView(connector);
-            AnnotatedMBean.registerMBean(getManagementContext(), view, objectName);
-            return connector;
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Transport Connector could not be registered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-    protected void unregisterConnectorMBean(TransportConnector connector) throws IOException {
-        if (isUseJmx()) {
-            try {
-                ObjectName objectName = createConnectorObjectName(connector);
-                getManagementContext().unregisterMBean(objectName);
-            } catch (Throwable e) {
-                throw IOExceptionSupport.create(
-                        "Transport Connector could not be unregistered in JMX: " + e.getMessage(), e);
-            }
-        }
-    }
-
-    protected PersistenceAdapter registerPersistenceAdapterMBean(PersistenceAdapter adaptor) throws IOException {
-        return adaptor;
-    }
-
-    protected void unregisterPersistenceAdapterMBean(PersistenceAdapter adaptor) throws IOException {
-        if (isUseJmx()) {
-        }
-    }
-
-    private ObjectName createConnectorObjectName(TransportConnector connector) throws MalformedObjectNameException {
-        return new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName="
-                + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=Connector," + "ConnectorName="
-                + JMXSupport.encodeObjectNamePart(connector.getName()));
-    }
-
-    protected void registerNetworkConnectorMBean(NetworkConnector connector) throws IOException {
-        NetworkConnectorViewMBean view = new NetworkConnectorView(connector);
-        try {
-            ObjectName objectName = createNetworkConnectorObjectName(connector);
-            connector.setObjectName(objectName);
-            AnnotatedMBean.registerMBean(getManagementContext(), view, objectName);
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Network Connector could not be registered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-    protected ObjectName createNetworkConnectorObjectName(NetworkConnector connector)
-            throws MalformedObjectNameException {
-        return new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName="
-                + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=NetworkConnector,"
-                + "NetworkConnectorName=" + JMXSupport.encodeObjectNamePart(connector.getName()));
-    }
-
-
-    public ObjectName createDuplexNetworkConnectorObjectName(String transport)
-            throws MalformedObjectNameException {
-        return new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName="
-                + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=NetworkConnector,"
-                + "NetworkConnectorName=duplex" + JMXSupport.encodeObjectNamePart(transport));
-    }
-
-    protected void unregisterNetworkConnectorMBean(NetworkConnector connector) {
-        if (isUseJmx()) {
-            try {
-                ObjectName objectName = createNetworkConnectorObjectName(connector);
-                getManagementContext().unregisterMBean(objectName);
-            } catch (Exception e) {
-                LOG.error("Network Connector could not be unregistered from JMX: " + e, e);
-            }
-        }
-    }
-
-    protected void registerProxyConnectorMBean(ProxyConnector connector) throws IOException {
-        ProxyConnectorView view = new ProxyConnectorView(connector);
-        try {
-            ObjectName objectName = new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName="
-                    + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=ProxyConnector,"
-                    + "ProxyConnectorName=" + JMXSupport.encodeObjectNamePart(connector.getName()));
-            AnnotatedMBean.registerMBean(getManagementContext(), view, objectName);
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-    protected void registerFTConnectorMBean(MasterConnector connector) throws IOException {
-        FTConnectorView view = new FTConnectorView(connector);
-        try {
-            ObjectName objectName = new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName="
-                    + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=MasterConnector");
-            AnnotatedMBean.registerMBean(getManagementContext(), view, objectName);
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-    protected void registerJmsConnectorMBean(JmsConnector connector) throws IOException {
-        JmsConnectorView view = new JmsConnectorView(connector);
-        try {
-            ObjectName objectName = new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName="
-                    + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=JmsConnector,"
-                    + "JmsConnectorName=" + JMXSupport.encodeObjectNamePart(connector.getName()));
-            AnnotatedMBean.registerMBean(getManagementContext(), view, objectName);
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Broker could not be registered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-    /**
-     * Factory method to create a new broker
-     * 
-     * @throws Exception
-     * @throws
-     * @throws
-     */
-    protected Broker createBroker() throws Exception {
-        regionBroker = createRegionBroker();
-        Broker broker = addInterceptors(regionBroker);
-        // Add a filter that will stop access to the broker once stopped
-        broker = new MutableBrokerFilter(broker) {
-            Broker old;
-
-            @Override
-            public void stop() throws Exception {
-                old = this.next.getAndSet(new ErrorBroker("Broker has been stopped: " + this) {
-                    // Just ignore additional stop actions.
-                    @Override
-                    public void stop() throws Exception {
-                    }
-                });
-                old.stop();
-            }
-
-            @Override
-            public void start() throws Exception {
-                if (forceStart && old != null) {
-                    this.next.set(old);
-                }
-                getNext().start();
-            }
-        };
-        return broker;
-    }
-
-    /**
-     * Factory method to create the core region broker onto which interceptors
-     * are added
-     * 
-     * @throws Exception
-     */
-    protected Broker createRegionBroker() throws Exception {
-        if (destinationInterceptors == null) {
-            destinationInterceptors = createDefaultDestinationInterceptor();
-        }
-        configureServices(destinationInterceptors);
-        DestinationInterceptor destinationInterceptor = new CompositeDestinationInterceptor(destinationInterceptors);
-        if (destinationFactory == null) {
-            destinationFactory = new DestinationFactoryImpl(this, getTaskRunnerFactory(), getPersistenceAdapter());
-        }
-        return createRegionBroker(destinationInterceptor);
-    }
-
-    protected Broker createRegionBroker(DestinationInterceptor destinationInterceptor) throws IOException {
-        RegionBroker regionBroker;
-        if (isUseJmx()) {
-            regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(),
-                    getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor());
-        } else {
-            regionBroker = new RegionBroker(this, getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory,
-                    destinationInterceptor,getScheduler(),getExecutor());
-        }
-        destinationFactory.setRegionBroker(regionBroker);
-        regionBroker.setKeepDurableSubsActive(keepDurableSubsActive);
-        regionBroker.setBrokerName(getBrokerName());
-        regionBroker.getDestinationStatistics().setEnabled(enableStatistics);
-        if (brokerId != null) {
-            regionBroker.setBrokerId(brokerId);
-        }
-        return regionBroker;
-    }
-
-    /**
-     * Create the default destination interceptor
-     */
-    protected DestinationInterceptor[] createDefaultDestinationInterceptor() {
-        List<DestinationInterceptor> answer = new ArrayList<DestinationInterceptor>();
-        if (isUseVirtualTopics()) {
-            VirtualDestinationInterceptor interceptor = new VirtualDestinationInterceptor();
-            VirtualTopic virtualTopic = new VirtualTopic();
-            virtualTopic.setName("VirtualTopic.>");
-            VirtualDestination[] virtualDestinations = { virtualTopic };
-            interceptor.setVirtualDestinations(virtualDestinations);
-            answer.add(interceptor);
-        }
-        if (isUseMirroredQueues()) {
-            MirroredQueue interceptor = new MirroredQueue();
-            answer.add(interceptor);
-        }
-        DestinationInterceptor[] array = new DestinationInterceptor[answer.size()];
-        answer.toArray(array);
-        return array;
-    }
-
-    /**
-     * Strategy method to add interceptors to the broker
-     * 
-     * @throws IOException
-     */
-    protected Broker addInterceptors(Broker broker) throws Exception {
-        if (isSchedulerSupport()) {
-            SchedulerBroker sb = new SchedulerBroker(broker, getSchedulerDirectoryFile());
-            if (isUseJmx()) {
-                JobSchedulerViewMBean view = new JobSchedulerView(sb.getJobScheduler());
-                try {
-                    ObjectName objectName = new ObjectName(getManagementContext().getJmxDomainName() + ":"
-                            + "BrokerName=" + JMXSupport.encodeObjectNamePart(getBrokerName()) + ","
-                            + "Type=jobScheduler," + "jobSchedulerName=JMS");
-
-                    AnnotatedMBean.registerMBean(getManagementContext(), view, objectName);
-                    this.adminView.setJMSJobScheduler(objectName);
-                } catch (Throwable e) {
-                    throw IOExceptionSupport.create("JobScheduler could not be registered in JMX: "
-                            + e.getMessage(), e);
-                }
-
-            }
-            broker = sb;
-        }
-        if (isAdvisorySupport()) {
-            broker = new AdvisoryBroker(broker);
-        }
-        broker = new CompositeDestinationBroker(broker);
-        broker = new TransactionBroker(broker, getPersistenceAdapter().createTransactionStore());
-        if (isPopulateJMSXUserID()) {
-            UserIDBroker userIDBroker = new UserIDBroker(broker);
-            userIDBroker.setUseAuthenticatePrincipal(isUseAuthenticatedPrincipalForJMSXUserID());
-            broker = userIDBroker;
-        }
-        if (isMonitorConnectionSplits()) {
-            broker = new ConnectionSplitBroker(broker);
-        }
-        if (plugins != null) {
-            for (int i = 0; i < plugins.length; i++) {
-                BrokerPlugin plugin = plugins[i];
-                broker = plugin.installPlugin(broker);
-            }
-        }
-        return broker;
-    }
-
-    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
-        if (isPersistent()) {
-            PersistenceAdapterFactory fac = getPersistenceFactory();
-            if (fac != null) {
-                return fac.createPersistenceAdapter();
-            }else {
-                KahaDBPersistenceAdapter adaptor = new KahaDBPersistenceAdapter();
-                File dir = new File(getBrokerDataDirectory(),"KahaDB");
-                adaptor.setDirectory(dir);
-                return adaptor;
-            }
-        } else {
-            return new MemoryPersistenceAdapter();
-        }
-    }
-
-    protected ObjectName createBrokerObjectName() throws IOException {
-        try {
-            return new ObjectName(getManagementContext().getJmxDomainName() + ":" + "BrokerName="
-                    + JMXSupport.encodeObjectNamePart(getBrokerName()) + "," + "Type=Broker");
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Invalid JMX broker name: " + brokerName, e);
-        }
-    }
-
-    protected TransportConnector createTransportConnector(URI brokerURI) throws Exception {
-        TransportServer transport = TransportFactory.bind(this, brokerURI);
-        return new TransportConnector(transport);
-    }
-
-    /**
-     * Extracts the port from the options
-     */
-    protected Object getPort(Map options) {
-        Object port = options.get("port");
-        if (port == null) {
-            port = DEFAULT_PORT;
-            LOG.warn("No port specified so defaulting to: " + port);
-        }
-        return port;
-    }
-
-    protected void addShutdownHook() {
-        if (useShutdownHook) {
-            shutdownHook = new Thread("ActiveMQ ShutdownHook") {
-                @Override
-                public void run() {
-                    containerShutdown();
-                }
-            };
-            Runtime.getRuntime().addShutdownHook(shutdownHook);
-        }
-    }
-
-    protected void removeShutdownHook() {
-        if (shutdownHook != null) {
-            try {
-                Runtime.getRuntime().removeShutdownHook(shutdownHook);
-            } catch (Exception e) {
-                LOG.debug("Caught exception, must be shutting down: " + e);
-            }
-        }
-    }
-
-    /**
-     * Sets hooks to be executed when broker shut down
-     * 
-     * @org.apache.xbean.Property
-     */
-    public void setShutdownHooks(List<Runnable> hooks) throws Exception {
-        for (Runnable hook : hooks) {
-            addShutdownHook(hook);
-        }
-    }
-    
-    /**
-     * Causes a clean shutdown of the container when the VM is being shut down
-     */
-    protected void containerShutdown() {
-        try {
-            stop();
-        } catch (IOException e) {
-            Throwable linkedException = e.getCause();
-            if (linkedException != null) {
-                logError("Failed to shut down: " + e + ". Reason: " + linkedException, linkedException);
-            } else {
-                logError("Failed to shut down: " + e, e);
-            }
-            if (!useLoggingForShutdownErrors) {
-                e.printStackTrace(System.err);
-            }
-        } catch (Exception e) {
-            logError("Failed to shut down: " + e, e);
-        }
-    }
-
-    protected void logError(String message, Throwable e) {
-        if (useLoggingForShutdownErrors) {
-            LOG.error("Failed to shut down: " + e);
-        } else {
-            System.err.println("Failed to shut down: " + e);
-        }
-    }
-
-    /**
-     * Starts any configured destinations on startup
-     */
-    protected void startDestinations() throws Exception {
-        if (destinations != null) {
-            ConnectionContext adminConnectionContext = getAdminConnectionContext();
-            for (int i = 0; i < destinations.length; i++) {
-                ActiveMQDestination destination = destinations[i];
-                getBroker().addDestination(adminConnectionContext, destination,true);
-            }
-        }
-    }
-
-    /**
-     * Returns the broker's administration connection context used for
-     * configuring the broker at startup
-     */
-    public ConnectionContext getAdminConnectionContext() throws Exception {
-        return BrokerSupport.getConnectionContext(getBroker());
-    }
-
-    protected void waitForSlave() {
-        try {
-            if (!slaveStartSignal.await(waitForSlaveTimeout, TimeUnit.MILLISECONDS)) {
-            	throw new IllegalStateException("Gave up waiting for slave to start after " + waitForSlaveTimeout + " milliseconds."); 
-            }
-        } catch (InterruptedException e) {
-            LOG.error("Exception waiting for slave:" + e);
-        }
-    }
-
-    protected void slaveConnectionEstablished() {
-        slaveStartSignal.countDown();
-    }
-    
-    protected void startManagementContext() throws Exception {
-        getManagementContext().start();
-        adminView = new BrokerView(this, null);
-        ObjectName objectName = getBrokerObjectName();
-        AnnotatedMBean.registerMBean(getManagementContext(), adminView, objectName);
-    }
-
-    /**
-     * Start all transport and network connections, proxies and bridges
-     * 
-     * @throws Exception
-     */
-    public void startAllConnectors() throws Exception {
-        if (!isSlave()) {
-            Set<ActiveMQDestination> durableDestinations = getBroker().getDurableDestinations();
-            List<TransportConnector> al = new ArrayList<TransportConnector>();
-            for (Iterator<TransportConnector> iter = getTransportConnectors().iterator(); iter.hasNext();) {
-                TransportConnector connector = iter.next();
-                connector.setBrokerService(this);
-                al.add(startTransportConnector(connector));
-            }
-            if (al.size() > 0) {
-                // let's clear the transportConnectors list and replace it with
-                // the started transportConnector instances
-                this.transportConnectors.clear();
-                setTransportConnectors(al);
-            }
-            URI uri = getVmConnectorURI();
-            Map<String, String> map = new HashMap<String, String>(URISupport.parseParameters(uri));
-            map.put("network", "true");
-            map.put("async", "false");
-            uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
-            if (isWaitForSlave()) {
-                waitForSlave();
-            }
-            if (!stopped.get()) {
-                ThreadPoolExecutor networkConnectorStartExecutor = null;
-                if (isNetworkConnectorStartAsync()) {
-                    // spin up as many threads as needed
-                    networkConnectorStartExecutor = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
-                            10, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
-                            new ThreadFactory() {
-                                int count=0;
-                                public Thread newThread(Runnable runnable) {
-                                    Thread thread = new Thread(runnable, "NetworkConnector Start Thread-" +(count++));
-                                    thread.setDaemon(true);
-                                    return thread;
-                                }
-                            });
-                }
-
-                for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
-                    final NetworkConnector connector = iter.next();
-                    connector.setLocalUri(uri);
-                    connector.setBrokerName(getBrokerName());
-                    connector.setDurableDestinations(durableDestinations);
-                    if (getDefaultSocketURIString() != null) {
-                        connector.setBrokerURL(getDefaultSocketURIString());
-                    }
-                    if (networkConnectorStartExecutor != null) {
-                        final Map context = MDCHelper.getCopyOfContextMap();
-                        networkConnectorStartExecutor.execute(new Runnable() {
-                            public void run() {
-                                try {
-                                    MDCHelper.setContextMap(context);
-                                    LOG.info("Async start of " + connector);
-                                    connector.start();
-                                } catch(Exception e) {
-                                    LOG.error("Async start of network connector: " + connector + " failed", e);
-                                }
-                            }
-                        });
-                    } else {
-                        connector.start();
-                    }
-                }
-                if (networkConnectorStartExecutor != null) {
-                    // executor done when enqueued tasks are complete
-                    networkConnectorStartExecutor.shutdown();
-                    networkConnectorStartExecutor = null;
-                }
-
-                for (Iterator<ProxyConnector> iter = getProxyConnectors().iterator(); iter.hasNext();) {
-                    ProxyConnector connector = iter.next();
-                    connector.start();
-                }
-                for (Iterator<JmsConnector> iter = jmsConnectors.iterator(); iter.hasNext();) {
-                    JmsConnector connector = iter.next();
-                    connector.start();
-                }
-                for (Service service : services) {
-                    configureService(service);
-                    service.start();
-                }
-            }
-        }
-    }
-
-    protected TransportConnector startTransportConnector(TransportConnector connector) throws Exception {
-        connector.setTaskRunnerFactory(getTaskRunnerFactory());
-        MessageAuthorizationPolicy policy = getMessageAuthorizationPolicy();
-        if (policy != null) {
-            connector.setMessageAuthorizationPolicy(policy);
-        }
-        if (isUseJmx()) {
-            connector = registerConnectorMBean(connector);
-        }
-        connector.getStatistics().setEnabled(enableStatistics);
-        connector.start();
-        return connector;
-    }
-
-    /**
-     * Perform any custom dependency injection
-     */
-    protected void configureServices(Object[] services) {
-        for (Object service : services) {
-            configureService(service);
-        }
-    }
-
-    /**
-     * Perform any custom dependency injection
-     */
-    protected void configureService(Object service) {
-        if (service instanceof BrokerServiceAware) {
-            BrokerServiceAware serviceAware = (BrokerServiceAware) service;
-            serviceAware.setBrokerService(this);
-        }
-        if (masterConnector == null) {
-            if (service instanceof MasterConnector) {
-                masterConnector = (MasterConnector) service;
-                supportFailOver = true;
-            }
-        }
-    }
-    
-    public void handleIOException(IOException exception) {
-        if (ioExceptionHandler != null) {
-            ioExceptionHandler.handle(exception);
-         } else {
-            LOG.info("Ignoring IO exception, " + exception, exception);
-         }
-    }
-
-    /**
-     * Starts all destiantions in persistence store. This includes all inactive
-     * destinations
-     */
-    protected void startDestinationsInPersistenceStore(Broker broker) throws Exception {
-        Set destinations = destinationFactory.getDestinations();
-        if (destinations != null) {
-            Iterator iter = destinations.iterator();
-            ConnectionContext adminConnectionContext = broker.getAdminConnectionContext();
-            if (adminConnectionContext == null) {
-                ConnectionContext context = new ConnectionContext();
-                context.setBroker(broker);
-                adminConnectionContext = context;
-                broker.setAdminConnectionContext(adminConnectionContext);
-            }
-            while (iter.hasNext()) {
-                ActiveMQDestination destination = (ActiveMQDestination) iter.next();
-                broker.addDestination(adminConnectionContext, destination,false);
-            }
-        }
-    }
-    
-    protected synchronized ThreadPoolExecutor getExecutor() {
-        if (this.executor == null) {
-        this.executor = new ThreadPoolExecutor(1, 10, 30, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
-            public Thread newThread(Runnable runnable) {
-                Thread thread = new Thread(runnable, "Usage Async Task");
-                thread.setDaemon(true);
-                return thread;
-            }
-        });
-        }
-        return this.executor;
-    }
-    
-    public synchronized Scheduler getScheduler() {
-        if (this.scheduler==null) {
-            this.scheduler = new Scheduler("ActiveMQ Broker["+getBrokerName()+"] Scheduler");
-            try {
-                this.scheduler.start();
-            } catch (Exception e) {
-               LOG.error("Failed to start Scheduler ",e);
-            }
-        }
-        return this.scheduler;
-    }
-
-    public Broker getRegionBroker() {
-        return regionBroker;
-    }
-
-    public void setRegionBroker(Broker regionBroker) {
-        this.regionBroker = regionBroker;
-    }
-
-    public void addShutdownHook(Runnable hook) {
-        synchronized (shutdownHooks) {
-            shutdownHooks.add(hook);
-        }
-    }
-
-    public void removeShutdownHook(Runnable hook) {
-        synchronized (shutdownHooks) {
-            shutdownHooks.remove(hook);
-        }
-    }
-
-    public boolean isSystemExitOnShutdown() {
-        return systemExitOnShutdown;
-    }
-
-    public void setSystemExitOnShutdown(boolean systemExitOnShutdown) {
-        this.systemExitOnShutdown = systemExitOnShutdown;
-    }
-
-    public int getSystemExitOnShutdownExitCode() {
-        return systemExitOnShutdownExitCode;
-    }
-
-    public void setSystemExitOnShutdownExitCode(int systemExitOnShutdownExitCode) {
-        this.systemExitOnShutdownExitCode = systemExitOnShutdownExitCode;
-    }
-
-    public SslContext getSslContext() {
-        return sslContext;
-    }
-
-    public void setSslContext(SslContext sslContext) {
-        this.sslContext = sslContext;
-    }
-
-    public boolean isShutdownOnSlaveFailure() {
-        return shutdownOnSlaveFailure;
-    }
-
-    public void setShutdownOnSlaveFailure(boolean shutdownOnSlaveFailure) {
-        this.shutdownOnSlaveFailure = shutdownOnSlaveFailure;
-    }
-
-    public boolean isWaitForSlave() {
-        return waitForSlave;
-    }
-
-    public void setWaitForSlave(boolean waitForSlave) {
-        this.waitForSlave = waitForSlave;
-    }
-  
-    public long getWaitForSlaveTimeout() {
-        return this.waitForSlaveTimeout;
-    }
-    
-    public void setWaitForSlaveTimeout(long waitForSlaveTimeout) {
-        this.waitForSlaveTimeout = waitForSlaveTimeout;
-    }
-    
-    public CountDownLatch getSlaveStartSignal() {
-        return slaveStartSignal;
-    }
-
-    /**
-     * Get the passiveSlave
-     * @return the passiveSlave
-     */
-    public boolean isPassiveSlave() {
-        return this.passiveSlave;
-    }
-
-    /**
-     * Set the passiveSlave
-     * @param passiveSlave the passiveSlave to set
-     */
-    public void setPassiveSlave(boolean passiveSlave) {
-        this.passiveSlave = passiveSlave;
-    }
-
-    /**
-     * override the Default IOException handler, called when persistence adapter
-     * has experiences File or JDBC I/O Exceptions
-     *
-     * @param ioExceptionHandler
-     */
-    public void setIoExceptionHandler(IOExceptionHandler ioExceptionHandler) {
-        configureService(ioExceptionHandler);
-        this.ioExceptionHandler = ioExceptionHandler;
-    }
-
-    public IOExceptionHandler getIoExceptionHandler() {
-        return ioExceptionHandler;
-    }
-
-    /**
-     * @return the schedulerSupport
-     */
-    public boolean isSchedulerSupport() {
-        return this.schedulerSupport;
-    }
-
-    /**
-     * @param schedulerSupport the schedulerSupport to set
-     */
-    public void setSchedulerSupport(boolean schedulerSupport) {
-        this.schedulerSupport = schedulerSupport;
-    }
-
-    /**
-     * @return the schedulerDirectory
-     */
-    public File getSchedulerDirectoryFile() {
-        if (this.schedulerDirectoryFile == null) {
-            this.schedulerDirectoryFile = new File(getBrokerDataDirectory(), "scheduler");
-        }
-        return schedulerDirectoryFile;
-    }
-
-    /**
-     * @param schedulerDirectory the schedulerDirectory to set
-     */
-    public void setSchedulerDirectoryFile(File schedulerDirectory) {
-        this.schedulerDirectoryFile = schedulerDirectory;
-    }
-    
-    public void setSchedulerDirectory(String schedulerDirectory) {
-        setSchedulerDirectoryFile(new File(schedulerDirectory));
-    }
-
-    public int getSchedulePeriodForDestinationPurge() {
-        return this.schedulePeriodForDestinationPurge;
-    }
-
-    public void setSchedulePeriodForDestinationPurge(int schedulePeriodForDestinationPurge) {
-        this.schedulePeriodForDestinationPurge = schedulePeriodForDestinationPurge;
-    }
-
-    public BrokerContext getBrokerContext() {
-        return brokerContext;
-    }
-
-    public void setBrokerContext(BrokerContext brokerContext) {
-        this.brokerContext = brokerContext;
-    }
-
-    public void setBrokerId(String brokerId) {
-        this.brokerId = new BrokerId(brokerId);
-    }
-
-    public boolean isUseAuthenticatedPrincipalForJMSXUserID() {
-        return useAuthenticatedPrincipalForJMSXUserID;
-    }
-
-    public void setUseAuthenticatedPrincipalForJMSXUserID(boolean useAuthenticatedPrincipalForJMSXUserID) {
-        this.useAuthenticatedPrincipalForJMSXUserID = useAuthenticatedPrincipalForJMSXUserID;
-    }
-
-    public boolean isNetworkConnectorStartAsync() {
-        return networkConnectorStartAsync;
-    }
-
-    public void setNetworkConnectorStartAsync(boolean networkConnectorStartAsync) {
-        this.networkConnectorStartAsync = networkConnectorStartAsync;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerServiceAware.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerServiceAware.java
deleted file mode 100644
index 375925a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerServiceAware.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.broker;
-
-/**
- * An interface used to represent a component that wants the {@link BrokerService} 
- * to be injected
- * 
- * 
- */
-public interface BrokerServiceAware {
-
-    void setBrokerService(BrokerService brokerService);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java
deleted file mode 100644
index 974017f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerStoppedException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.broker;
-
-/**
- * This exception is thrown by the broker when you try to use it after it has
- * been stopped.
- * 
- * @author chirino
- */
-public class BrokerStoppedException extends IllegalStateException {
-
-    private static final long serialVersionUID = -3435230276850902220L;
-
-    public BrokerStoppedException() {
-        super();
-    }
-
-    public BrokerStoppedException(String message, Throwable cause) {
-        super(message);
-        initCause(cause);
-    }
-
-    public BrokerStoppedException(String s) {
-        super(s);
-    }
-
-    public BrokerStoppedException(Throwable cause) {
-        initCause(cause);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/CompositeDestinationBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/CompositeDestinationBroker.java
deleted file mode 100755
index 3a1a66d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/CompositeDestinationBroker.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.broker;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-
-/**
- * This broker filter handles composite destinations. If a broker operation is
- * invoked using a composite destination, this filter repeats the operation
- * using each destination of the composite. HRC: I think this filter is
- * dangerous to use to with the consumer operations. Multiple Subscription
- * objects will be associated with a single JMS consumer each having a different
- * idea of what the current pre-fetch dispatch size is. If this is used, then
- * the client has to expect many more messages to be dispatched than the
- * pre-fetch setting allows.
- * 
- * 
- */
-public class CompositeDestinationBroker extends BrokerFilter {
-
-    public CompositeDestinationBroker(Broker next) {
-        super(next);
-    }
-
-    /**
-     * A producer may register to send to multiple destinations via a composite
-     * destination.
-     */
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        // The destination may be null.
-        ActiveMQDestination destination = info.getDestination();
-        if (destination != null && destination.isComposite()) {
-            ActiveMQDestination[] destinations = destination.getCompositeDestinations();
-            for (int i = 0; i < destinations.length; i++) {
-                ProducerInfo copy = info.copy();
-                copy.setDestination(destinations[i]);
-                next.addProducer(context, copy);
-            }
-        } else {
-            next.addProducer(context, info);
-        }
-    }
-
-    /**
-     * A producer may de-register from sending to multiple destinations via a
-     * composite destination.
-     */
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        // The destination may be null.
-        ActiveMQDestination destination = info.getDestination();
-        if (destination != null && destination.isComposite()) {
-            ActiveMQDestination[] destinations = destination.getCompositeDestinations();
-            for (int i = 0; i < destinations.length; i++) {
-                ProducerInfo copy = info.copy();
-                copy.setDestination(destinations[i]);
-                next.removeProducer(context, copy);
-            }
-        } else {
-            next.removeProducer(context, info);
-        }
-    }
-
-    /**
-     * 
-     */
-    public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception {
-        ActiveMQDestination destination = message.getDestination();
-        if (destination.isComposite()) {
-            ActiveMQDestination[] destinations = destination.getCompositeDestinations();
-            for (int i = 0; i < destinations.length; i++) {
-                if (i != 0) {
-                    message = message.copy();
-                    message.setMemoryUsage(null);
-                }
-                message.setOriginalDestination(destination);
-                message.setDestination(destinations[i]);
-                next.send(producerExchange, message);
-            }
-        } else {
-            next.send(producerExchange, message);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Connection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Connection.java
deleted file mode 100755
index f13b283..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Connection.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.region.ConnectionStatistics;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.Response;
-
-/**
- * 
- */
-public interface Connection extends Service {
-
-    /**
-     * @return the connector that created this connection.
-     */
-    Connector getConnector();
-
-    /**
-     * Sends a message to the client.
-     * 
-     * @param message the message to send to the client.
-     */
-    void dispatchSync(Command message);
-
-    /**
-     * Sends a message to the client.
-     * 
-     * @param command
-     */
-    void dispatchAsync(Command command);
-
-    /**
-     * Services a client command and submits it to the broker.
-     * 
-     * @param command
-     * @return Response
-     */
-    Response service(Command command);
-
-    /**
-     * Handles an unexpected error associated with a connection.
-     * 
-     * @param error
-     */
-    void serviceException(Throwable error);
-
-    /**
-     * @return true if the Connection is slow
-     */
-    boolean isSlow();
-
-    /**
-     * @return if after being marked, the Connection is still writing
-     */
-    boolean isBlocked();
-
-    /**
-     * @return true if the Connection is connected
-     */
-    boolean isConnected();
-
-    /**
-     * @return true if the Connection is active
-     */
-    boolean isActive();
-
-    /**
-     * Returns the number of messages to be dispatched to this connection
-     */
-    int getDispatchQueueSize();
-
-    /**
-     * Returns the statistics for this connection
-     */
-    ConnectionStatistics getStatistics();
-
-    /**
-     * @return true if the Connection will process control commands
-     */
-    boolean isManageable();
-
-    /**
-     * @return the source address for this connection
-     */
-    String getRemoteAddress();
-
-    void serviceExceptionAsync(IOException e);
-
-    String getConnectionId();
-    
-    /**
-     * return true if a network connection
-     * @return
-     */
-    boolean isNetworkConnection();
-    
-    /**
-     * @return true if a fault tolerant connection
-     */
-    boolean isFaultTolerantConnection();
-    
-    void updateClient(ConnectionControl control);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java
deleted file mode 100755
index b29fdbb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.security.MessageAuthorizationPolicy;
-import org.apache.activemq.security.SecurityContext;
-import org.apache.activemq.transaction.Transaction;
-
-/**
- * Used to hold context information needed to process requests sent to a broker.
- * 
- * 
- */
-public class ConnectionContext {
-
-    private Connection connection;
-    private Connector connector;
-    private Broker broker;
-    private boolean inRecoveryMode;
-    private Transaction transaction;
-    private ConcurrentHashMap<TransactionId, Transaction> transactions;
-    private SecurityContext securityContext;
-    private ConnectionId connectionId;
-    private String clientId;
-    private String userName;
-    private boolean reconnect;
-    private WireFormatInfo wireFormatInfo;
-    private Object longTermStoreContext;
-    private boolean producerFlowControl = true;
-    private MessageAuthorizationPolicy messageAuthorizationPolicy;
-    private boolean networkConnection;
-    private boolean faultTolerant;
-    private final AtomicBoolean stopping = new AtomicBoolean();
-    private final MessageEvaluationContext messageEvaluationContext;
-    private boolean dontSendReponse;
-    private boolean clientMaster = true;
-
-    public ConnectionContext() {
-    	this.messageEvaluationContext = new MessageEvaluationContext();
-    }
-    
-    public ConnectionContext(MessageEvaluationContext messageEvaluationContext) {
-    	this.messageEvaluationContext=messageEvaluationContext;
-    }
-    
-    public ConnectionContext(ConnectionInfo info) {
-    	this();
-        setClientId(info.getClientId());
-        setUserName(info.getUserName());
-        setConnectionId(info.getConnectionId());
-    }
-    
-    public ConnectionContext copy() {
-        ConnectionContext rc = new ConnectionContext(this.messageEvaluationContext);
-        rc.connection = this.connection;
-        rc.connector = this.connector;
-        rc.broker = this.broker;
-        rc.inRecoveryMode = this.inRecoveryMode;
-        rc.transaction = this.transaction;
-        rc.transactions = this.transactions;
-        rc.securityContext = this.securityContext;
-        rc.connectionId = this.connectionId;
-        rc.clientId = this.clientId;
-        rc.userName = this.userName;
-        rc.reconnect = this.reconnect;
-        rc.wireFormatInfo = this.wireFormatInfo;
-        rc.longTermStoreContext = this.longTermStoreContext;
-        rc.producerFlowControl = this.producerFlowControl;
-        rc.messageAuthorizationPolicy = this.messageAuthorizationPolicy;
-        rc.networkConnection = this.networkConnection;
-        rc.faultTolerant = this.faultTolerant;
-        rc.stopping.set(this.stopping.get());
-        rc.dontSendReponse = this.dontSendReponse;
-        rc.clientMaster = this.clientMaster;
-        return rc;
-    }
-
-
-    public SecurityContext getSecurityContext() {
-        return securityContext;
-    }
-
-    public void setSecurityContext(SecurityContext subject) {
-        this.securityContext = subject;
-        if (subject != null) {
-            setUserName(subject.getUserName());
-        } else {
-            setUserName(null);
-        }
-    }
-
-    /**
-     * @return the broker being used.
-     */
-    public Broker getBroker() {
-        return broker;
-    }
-
-    /**
-     * @param broker being used
-     */
-    public void setBroker(Broker broker) {
-        this.broker = broker;
-    }
-
-    /**
-     * @return the connection being used
-     */
-    public Connection getConnection() {
-        return connection;
-    }
-
-    /**
-     * @param connection being used
-     */
-    public void setConnection(Connection connection) {
-        this.connection = connection;
-    }
-
-    /**
-     * @return the transaction being used.
-     */
-    public Transaction getTransaction() {
-        return transaction;
-    }
-
-    /**
-     * @param transaction being used.
-     */
-    public void setTransaction(Transaction transaction) {
-        this.transaction = transaction;
-    }
-
-    /**
-     * @return the connector being used.
-     */
-    public Connector getConnector() {
-        return connector;
-    }
-
-    /**
-     * @param connector being used.
-     */
-    public void setConnector(Connector connector) {
-        this.connector = connector;
-    }
-
-    public MessageAuthorizationPolicy getMessageAuthorizationPolicy() {
-        return messageAuthorizationPolicy;
-    }
-
-    /**
-     * Sets the policy used to decide if the current connection is authorized to
-     * consume a given message
-     */
-    public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy) {
-        this.messageAuthorizationPolicy = messageAuthorizationPolicy;
-    }
-
-    /**
-     * @return
-     */
-    public boolean isInRecoveryMode() {
-        return inRecoveryMode;
-    }
-
-    public void setInRecoveryMode(boolean inRecoveryMode) {
-        this.inRecoveryMode = inRecoveryMode;
-    }
-
-    public ConcurrentHashMap<TransactionId, Transaction> getTransactions() {
-        return transactions;
-    }
-
-    public void setTransactions(ConcurrentHashMap<TransactionId, Transaction> transactions) {
-        this.transactions = transactions;
-    }
-
-    public boolean isInTransaction() {
-        return transaction != null;
-    }
-
-    public String getClientId() {
-        return clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public boolean isReconnect() {
-        return reconnect;
-    }
-
-    public void setReconnect(boolean reconnect) {
-        this.reconnect = reconnect;
-    }
-
-    public WireFormatInfo getWireFormatInfo() {
-        return wireFormatInfo;
-    }
-
-    public void setWireFormatInfo(WireFormatInfo wireFormatInfo) {
-        this.wireFormatInfo = wireFormatInfo;
-    }
-
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    protected void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public MessageEvaluationContext getMessageEvaluationContext() {
-        return messageEvaluationContext;
-    }
-
-    public Object getLongTermStoreContext() {
-        return longTermStoreContext;
-    }
-
-    public void setLongTermStoreContext(Object longTermStoreContext) {
-        this.longTermStoreContext = longTermStoreContext;
-    }
-
-    public boolean isProducerFlowControl() {
-        return producerFlowControl;
-    }
-
-    public void setProducerFlowControl(boolean disableProducerFlowControl) {
-        this.producerFlowControl = disableProducerFlowControl;
-    }
-
-    public boolean isAllowedToConsume(MessageReference n) throws IOException {
-        if (messageAuthorizationPolicy != null) {
-            return messageAuthorizationPolicy.isAllowedToConsume(this, n.getMessage());
-        }
-        return true;
-    }
-
-    public synchronized boolean isNetworkConnection() {
-        return networkConnection;
-    }
-
-    public synchronized void setNetworkConnection(boolean networkConnection) {
-        this.networkConnection = networkConnection;
-    }
-
-    public AtomicBoolean getStopping() {
-        return stopping;
-    }
-
-    public void setDontSendReponse(boolean b) {
-        this.dontSendReponse = b;
-    }
-
-    public boolean isDontSendReponse() {
-        return dontSendReponse;
-    }
-
-    /**
-     * @return the slave
-     */
-    public boolean isSlave() {
-        return (this.broker != null && this.broker.getBrokerService().isSlave()) || !this.clientMaster;
-    }
-
-    /**
-     * @return the clientMaster
-     */
-    public boolean isClientMaster() {
-        return this.clientMaster;
-    }
-
-    /**
-     * @param clientMaster the clientMaster to set
-     */
-    public void setClientMaster(boolean clientMaster) {
-        this.clientMaster = clientMaster;
-    }
-
-    public boolean isFaultTolerant() {
-        return faultTolerant;
-    }
-
-    public void setFaultTolerant(boolean faultTolerant) {
-        this.faultTolerant = faultTolerant;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Connector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Connector.java
deleted file mode 100755
index 7a7cf98..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Connector.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.broker;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.region.ConnectorStatistics;
-import org.apache.activemq.command.BrokerInfo;
-
-/**
- * A connector creates and manages client connections that talk to the Broker.
- * 
- * 
- */
-public interface Connector extends Service {
-
-    /**
-     * @return brokerInfo
-     */
-    BrokerInfo getBrokerInfo();
-
-    /**
-     * @return the statistics for this connector
-     */
-    ConnectorStatistics getStatistics();
-    
-    /**
-     * @return true if update client connections when brokers leave/join a cluster
-     */
-    public boolean isUpdateClusterClients();
-
-    /**
-     * @return true if clients should be re-balanced across the cluster
-     */
-    public boolean isRebalanceClusterClients();
-    
-    /**
-     * Update all the connections with information
-     * about the connected brokers in the cluster
-     */
-    public void updateClientClusterInfo();
-    
-    /**
-     * @return true if clients should be updated when
-     * a broker is removed from a broker
-     */
-    public boolean  isUpdateClusterClientsOnRemove();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConsumerBrokerExchange.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConsumerBrokerExchange.java
deleted file mode 100755
index c9251c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConsumerBrokerExchange.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.broker;
-
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Region;
-import org.apache.activemq.broker.region.Subscription;
-
-/**
- * Holds internal state in the broker for a essageConsumer
- * 
- * 
- */
-public class ConsumerBrokerExchange {
-
-    private ConnectionContext connectionContext;
-    private Destination regionDestination;
-    private Region region;
-    private Subscription subscription;
-    private boolean wildcard;
-
-    /**
-     * @return the connectionContext
-     */
-    public ConnectionContext getConnectionContext() {
-        return this.connectionContext;
-    }
-
-    /**
-     * @param connectionContext the connectionContext to set
-     */
-    public void setConnectionContext(ConnectionContext connectionContext) {
-        this.connectionContext = connectionContext;
-    }
-
-    /**
-     * @return the region
-     */
-    public Region getRegion() {
-        return this.region;
-    }
-
-    /**
-     * @param region the region to set
-     */
-    public void setRegion(Region region) {
-        this.region = region;
-    }
-
-    /**
-     * @return the regionDestination
-     */
-    public Destination getRegionDestination() {
-        return this.regionDestination;
-    }
-
-    /**
-     * @param regionDestination the regionDestination to set
-     */
-    public void setRegionDestination(Destination regionDestination) {
-        this.regionDestination = regionDestination;
-    }
-
-    /**
-     * @return the subscription
-     */
-    public Subscription getSubscription() {
-        return this.subscription;
-    }
-
-    /**
-     * @param subscription the subscription to set
-     */
-    public void setSubscription(Subscription subscription) {
-        this.subscription = subscription;
-    }
-
-    /**
-     * @return the wildcard
-     */
-    public boolean isWildcard() {
-        return this.wildcard;
-    }
-
-    /**
-     * @param wildcard the wildcard to set
-     */
-    public void setWildcard(boolean wildcard) {
-        this.wildcard = wildcard;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java
deleted file mode 100644
index 656577f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DefaultBrokerFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-/**
- * Simple BrokerFactorySPI which using the brokerURI to extract the
- * configuration parameters for the broker service. This directly configures the
- * pojo model so there is no dependency on spring for configuration.
- * 
- * 
- */
-public class DefaultBrokerFactory implements BrokerFactoryHandler {
-
-    public BrokerService createBroker(URI brokerURI) throws Exception {
-
-        CompositeData compositeData = URISupport.parseComposite(brokerURI);
-        Map<String, String> params = new HashMap<String, String>(compositeData.getParameters());
-
-        BrokerService brokerService = new BrokerService();
-        IntrospectionSupport.setProperties(brokerService, params);
-        if (compositeData.getPath() != null) {
-            brokerService.setBrokerName(compositeData.getPath());
-        }
-
-        URI[] components = compositeData.getComponents();
-        for (int i = 0; i < components.length; i++) {
-            if ("network".equals(components[i].getScheme())) {
-                brokerService.addNetworkConnector(components[i].getSchemeSpecificPart());
-            } else if ("proxy".equals(components[i].getScheme())) {
-                brokerService.addProxyConnector(components[i].getSchemeSpecificPart());
-            } else {
-                brokerService.addConnector(components[i]);
-            }
-        }
-        return brokerService;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DestinationAlreadyExistsException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DestinationAlreadyExistsException.java
deleted file mode 100644
index 5a37cf5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DestinationAlreadyExistsException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.broker;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * An exception thrown if a destination is attempted to be created when it already exists.
- * 
- * 
- */
-public class DestinationAlreadyExistsException extends JMSException {
-    private final ActiveMQDestination destination;
-
-    public DestinationAlreadyExistsException(ActiveMQDestination destination) {
-        super("Destination already exists: " + destination);
-        this.destination = destination;
-    }
-
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
deleted file mode 100644
index a6d693d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/EmptyBroker.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ThreadPoolExecutor;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.usage.Usage;
-
-/**
- * Dumb implementation - used to be overriden by listeners
- * 
- * 
- */
-public class EmptyBroker implements Broker {
-
-    public BrokerId getBrokerId() {
-        return null;
-    }
-
-    public String getBrokerName() {
-        return null;
-    }
-
-    public Broker getAdaptor(Class type) {
-        if (type.isInstance(this)) {
-            return this;
-        }
-        return null;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Map<ActiveMQDestination, Destination> getDestinationMap() {
-        return Collections.EMPTY_MAP;
-    }
-
-    public Set getDestinations(ActiveMQDestination destination) {
-        return Collections.EMPTY_SET;
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-
-    }
-
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-
-    }
-
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-
-    }
-
-    public Connection[] getClients() throws Exception {
-
-        return null;
-    }
-
-    public ActiveMQDestination[] getDestinations() throws Exception {
-
-        return null;
-    }
-
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-
-        return null;
-    }
-
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-
-    }
-
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-
-        return 0;
-    }
-
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-
-    }
-
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-
-    }
-
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
-
-    }
-
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean flag) throws Exception {
-
-        return null;
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        return null;
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-
-    }
-
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception {
-
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-
-    }
-
-    public void gc() {
-
-    }
-
-    public void start() throws Exception {
-
-    }
-
-    public void stop() throws Exception {
-
-    }
-
-    public void addBroker(Connection connection, BrokerInfo info) {
-
-    }
-
-    public void removeBroker(Connection connection, BrokerInfo info) {
-
-    }
-
-    public BrokerInfo[] getPeerBrokerInfos() {
-        return null;
-    }
-
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-    }
-
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-
-    }
-
-    public boolean isStopped() {
-        return false;
-    }
-
-    public Set<ActiveMQDestination> getDurableDestinations() {
-        return null;
-    }
-
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-    }
-
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-    }
-
-    public boolean isFaultTolerantConfiguration() {
-        return false;
-    }
-
-    public ConnectionContext getAdminConnectionContext() {
-        return null;
-    }
-
-    public void setAdminConnectionContext(ConnectionContext adminConnectionContext) {
-    }
-
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
-        return null;
-    }
-
-    public PListStore getTempDataStore() {
-        return null;
-    }
-
-    public URI getVmConnectorURI() {
-        return null;
-    }
-
-    public void brokerServiceStarted() {
-    }
-
-    public BrokerService getBrokerService() {
-        return null;
-    }
-
-    public boolean isExpired(MessageReference messageReference) {
-        return false;
-    }
-
-    public void messageExpired(ConnectionContext context, MessageReference message, Subscription subscription) {
-    }
-
-    public void sendToDeadLetterQueue(ConnectionContext context,
-                                      MessageReference messageReference,
-                                      Subscription subscription) {
-    }
-
-    public Broker getRoot() {
-        return null;
-    }
-    
-    public long getBrokerSequenceId() {
-        return -1l;
-    }
-    
-    public void fastProducer(ConnectionContext context,ProducerInfo producerInfo) {
-    }
-
-    public void isFull(ConnectionContext context, Destination destination,Usage usage) {
-    }
-
-    public void messageConsumed(ConnectionContext context,MessageReference messageReference) {
-    }
-
-    public void messageDelivered(ConnectionContext context,MessageReference messageReference) {
-    }
-
-    public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference) {
-    }
-
-    public void slowConsumer(ConnectionContext context,Destination destination, Subscription subs) {
-    }
-
-    public void nowMasterBroker() {        
-    }
-
-    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
-    }
-
-    public void networkBridgeStopped(BrokerInfo brokerInfo) {
-    }
-
-    public void processConsumerControl(ConsumerBrokerExchange consumerExchange,
-            ConsumerControl control) {     
-    }
-
-    public Scheduler getScheduler() {
-        return null;
-    }
-
-    public ThreadPoolExecutor getExecutor() {
-        return null;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
deleted file mode 100644
index e81c88d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ErrorBroker.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ThreadPoolExecutor;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.usage.Usage;
-
-/**
- * Implementation of the broker where all it's methods throw an
- * BrokerStoppedException.
- * 
- * 
- */
-public class ErrorBroker implements Broker {
-
-    private final String message;
-
-    public ErrorBroker(String message) {
-        this.message = message;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Map<ActiveMQDestination, Destination> getDestinationMap() {
-        return Collections.EMPTY_MAP;
-    }
-
-    public Set getDestinations(ActiveMQDestination destination) {
-        return Collections.EMPTY_SET;
-    }
-
-    public Broker getAdaptor(Class type) {
-        if (type.isInstance(this)) {
-            return this;
-        }
-        return null;
-    }
-
-    public BrokerId getBrokerId() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public String getBrokerName() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public Connection[] getClients() throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public ActiveMQDestination[] getDestinations() throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean flag) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void gc() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void start() throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void stop() throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void addBroker(Connection connection, BrokerInfo info) {
-        throw new BrokerStoppedException(this.message);
-
-    }
-
-    public void removeBroker(Connection connection, BrokerInfo info) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public BrokerInfo[] getPeerBrokerInfos() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public boolean isStopped() {
-        return true;
-    }
-
-    public Set<ActiveMQDestination> getDurableDestinations() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public boolean isFaultTolerantConfiguration() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public ConnectionContext getAdminConnectionContext() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void setAdminConnectionContext(ConnectionContext adminConnectionContext) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public Response messagePull(ConnectionContext context, MessagePull pull) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public PListStore getTempDataStore() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public URI getVmConnectorURI() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void brokerServiceStarted() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public BrokerService getBrokerService() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public boolean isExpired(MessageReference messageReference) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void messageExpired(ConnectionContext context, MessageReference message, Subscription subscription) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
-                                      Subscription subscription) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public Broker getRoot() {
-        throw new BrokerStoppedException(this.message);
-    }
-    
-    public long getBrokerSequenceId() {
-        throw new BrokerStoppedException(this.message);
-    }
-    
-    public void fastProducer(ConnectionContext context,ProducerInfo producerInfo) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void isFull(ConnectionContext context,Destination destination, Usage usage) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void messageConsumed(ConnectionContext context,MessageReference messageReference) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void messageDelivered(ConnectionContext context,MessageReference messageReference) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void slowConsumer(ConnectionContext context, Destination destination,Subscription subs) {
-        throw new BrokerStoppedException(this.message);
-    }
-    
-    public void nowMasterBroker() {   
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void processConsumerControl(ConsumerBrokerExchange consumerExchange,
-            ConsumerControl control) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public Scheduler getScheduler() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public ThreadPoolExecutor getExecutor() {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
-        throw new BrokerStoppedException(this.message);
-    }
-
-    public void networkBridgeStopped(BrokerInfo brokerInfo) {
-        throw new BrokerStoppedException(this.message);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/InsertableMutableBrokerFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/InsertableMutableBrokerFilter.java
deleted file mode 100644
index 9e1923c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/InsertableMutableBrokerFilter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.broker;
-
-/**
- * Inserts itself into the BrokerStack
- * 
- * 
- */
-public class InsertableMutableBrokerFilter extends MutableBrokerFilter {
-
-    MutableBrokerFilter parent;
-
-    public InsertableMutableBrokerFilter(MutableBrokerFilter parent) {
-        super(parent.getNext());
-        this.parent = parent;
-        parent.setNext(this);
-
-    }
-
-    /**
-     * Remove 'self' from the BrokerStack
-     */
-    public void remove() {
-        parent.setNext(getNext());
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MapTransportConnectionStateRegister.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MapTransportConnectionStateRegister.java
deleted file mode 100755
index 566b62e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MapTransportConnectionStateRegister.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SessionId;
-
-/**
- * 
- */
-
-public class MapTransportConnectionStateRegister  implements TransportConnectionStateRegister{
-
-    private  Map <ConnectionId,TransportConnectionState>connectionStates = new ConcurrentHashMap<ConnectionId,TransportConnectionState>();
-
-    public TransportConnectionState registerConnectionState(ConnectionId connectionId,
-                                                               TransportConnectionState state) {
-        TransportConnectionState rc = connectionStates.put(connectionId, state);
-        return rc;
-    }
-
-    public TransportConnectionState unregisterConnectionState(ConnectionId connectionId) {
-        TransportConnectionState rc = connectionStates.remove(connectionId);
-        if (rc.getReferenceCounter().get() > 1) {
-            rc.decrementReference();
-            connectionStates.put(connectionId, rc);
-        }
-        return rc;
-    }
-
-    public List<TransportConnectionState> listConnectionStates() {
-    	
-        List<TransportConnectionState> rc = new ArrayList<TransportConnectionState>();
-        rc.addAll(connectionStates.values());
-        return rc;
-    }
-
-    public TransportConnectionState lookupConnectionState(String connectionId) {
-        return connectionStates.get(new ConnectionId(connectionId));
-    }
-
-    public TransportConnectionState lookupConnectionState(ConsumerId id) {
-        TransportConnectionState cs = lookupConnectionState(id.getConnectionId());
-        if (cs == null) {
-            throw new IllegalStateException(
-                                            "Cannot lookup a consumer from a connection that had not been registered: "
-                                                + id.getParentId().getParentId());
-        }
-        return cs;
-    }
-
-    public TransportConnectionState lookupConnectionState(ProducerId id) {
-    	 TransportConnectionState cs = lookupConnectionState(id.getConnectionId());
-        if (cs == null) {
-            throw new IllegalStateException(
-                                            "Cannot lookup a producer from a connection that had not been registered: "
-                                                + id.getParentId().getParentId());
-        }
-        return cs;
-    }
-
-    public TransportConnectionState lookupConnectionState(SessionId id) {
-    	 TransportConnectionState cs = lookupConnectionState(id.getConnectionId());
-        if (cs == null) {
-            throw new IllegalStateException(
-                                            "Cannot lookup a session from a connection that had not been registered: "
-                                                + id.getParentId());
-        }
-        return cs;
-    }
-
-    public TransportConnectionState lookupConnectionState(ConnectionId connectionId) {
-        TransportConnectionState cs = connectionStates.get(connectionId);
-        if (cs == null) {
-            throw new IllegalStateException("Cannot lookup a connection that had not been registered: "
-                                            + connectionId);
-        }
-        return cs;
-    }
-
-	
-
-	public boolean doesHandleMultipleConnectionStates() {
-		return true;
-	}
-
-	public boolean isEmpty() {
-		return connectionStates.isEmpty();
-	}
-
-	public void clear() {
-		connectionStates.clear();
-		
-	}
-
-	public void intialize(TransportConnectionStateRegister other) {
-		connectionStates.clear();
-		connectionStates.putAll(other.mapStates());
-		
-	}
-
-	public Map<ConnectionId, TransportConnectionState> mapStates() {
-		HashMap<ConnectionId, TransportConnectionState> map = new HashMap<ConnectionId, TransportConnectionState>(connectionStates);
-		return map;
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
deleted file mode 100644
index 998f2ac..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/MutableBrokerFilter.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.atomic.AtomicReference;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.usage.Usage;
-
-/**
- * Like a BrokerFilter but it allows you to switch the getNext().broker. This
- * has more overhead than a BrokerFilter since access to the getNext().broker
- * has to synchronized since it is mutable
- * 
- * 
- */
-public class MutableBrokerFilter implements Broker {
-
-    protected AtomicReference<Broker> next = new AtomicReference<Broker>();
-
-    public MutableBrokerFilter(Broker next) {
-        this.next.set(next);
-    }
-
-    public Broker getAdaptor(Class type) {
-        if (type.isInstance(this)) {
-            return this;
-        }
-        return next.get().getAdaptor(type);
-    }
-
-    public Broker getNext() {
-        return next.get();
-    }
-
-    public void setNext(Broker next) {
-    	this.next.set(next);
-    }
-
-    public Map<ActiveMQDestination, Destination> getDestinationMap() {
-        return getNext().getDestinationMap();
-    }
-
-    public Set getDestinations(ActiveMQDestination destination) {
-        return getNext().getDestinations(destination);
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        getNext().acknowledge(consumerExchange, ack);
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        getNext().addConnection(context, info);
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        return getNext().addConsumer(context, info);
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        getNext().addProducer(context, info);
-    }
-
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        getNext().commitTransaction(context, xid, onePhase);
-    }
-
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        getNext().removeSubscription(context, info);
-    }
-
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-        return getNext().getPreparedTransactions(context);
-    }
-
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        return getNext().prepareTransaction(context, xid);
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        getNext().removeConnection(context, info, error);
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        getNext().removeConsumer(context, info);
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        getNext().removeProducer(context, info);
-    }
-
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        getNext().rollbackTransaction(context, xid);
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        getNext().send(producerExchange, messageSend);
-    }
-
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        getNext().beginTransaction(context, xid);
-    }
-
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
-        getNext().forgetTransaction(context, transactionId);
-    }
-
-    public Connection[] getClients() throws Exception {
-        return getNext().getClients();
-    }
-
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean createIfTemporary) throws Exception {
-        return getNext().addDestination(context, destination,createIfTemporary);
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        getNext().removeDestination(context, destination, timeout);
-    }
-
-    public ActiveMQDestination[] getDestinations() throws Exception {
-        return getNext().getDestinations();
-    }
-
-    public void start() throws Exception {
-        getNext().start();
-    }
-
-    public void stop() throws Exception {
-        getNext().stop();
-    }
-
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-        getNext().addSession(context, info);
-    }
-
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-        getNext().removeSession(context, info);
-    }
-
-    public BrokerId getBrokerId() {
-        return getNext().getBrokerId();
-    }
-
-    public String getBrokerName() {
-        return getNext().getBrokerName();
-    }
-
-    public void gc() {
-        getNext().gc();
-    }
-
-    public void addBroker(Connection connection, BrokerInfo info) {
-        getNext().addBroker(connection, info);
-    }
-
-    public void removeBroker(Connection connection, BrokerInfo info) {
-        getNext().removeBroker(connection, info);
-    }
-
-    public BrokerInfo[] getPeerBrokerInfos() {
-        return getNext().getPeerBrokerInfos();
-    }
-
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-        getNext().preProcessDispatch(messageDispatch);
-    }
-
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-        getNext().postProcessDispatch(messageDispatch);
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        getNext().processDispatchNotification(messageDispatchNotification);
-    }
-
-    public boolean isStopped() {
-        return getNext().isStopped();
-    }
-
-    public Set<ActiveMQDestination> getDurableDestinations() {
-        return getNext().getDurableDestinations();
-    }
-
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        getNext().addDestinationInfo(context, info);
-
-    }
-
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        getNext().removeDestinationInfo(context, info);
-
-    }
-
-    public boolean isFaultTolerantConfiguration() {
-        return getNext().isFaultTolerantConfiguration();
-    }
-
-    public ConnectionContext getAdminConnectionContext() {
-        return getNext().getAdminConnectionContext();
-    }
-
-    public void setAdminConnectionContext(ConnectionContext adminConnectionContext) {
-        getNext().setAdminConnectionContext(adminConnectionContext);
-    }
-
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
-        return getNext().messagePull(context, pull);
-    }
-
-    public PListStore getTempDataStore() {
-        return getNext().getTempDataStore();
-    }
-
-    public URI getVmConnectorURI() {
-        return getNext().getVmConnectorURI();
-    }
-
-    public void brokerServiceStarted() {
-        getNext().brokerServiceStarted();
-    }
-
-    public BrokerService getBrokerService() {
-        return getNext().getBrokerService();
-    }
-
-    public boolean isExpired(MessageReference messageReference) {
-        return getNext().isExpired(messageReference);
-    }
-
-    public void messageExpired(ConnectionContext context, MessageReference message, Subscription subscription) {
-        getNext().messageExpired(context, message, subscription);
-    }
-
-    public void sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
-                                      Subscription subscription) {
-        getNext().sendToDeadLetterQueue(context, messageReference, subscription);
-    }
-
-    public Broker getRoot() {
-        return getNext().getRoot();
-    }
-    
-    public long getBrokerSequenceId() {
-        return getNext().getBrokerSequenceId();
-    }
-    
-    public void fastProducer(ConnectionContext context,ProducerInfo producerInfo) {
-        getNext().fastProducer(context, producerInfo);
-    }
-
-    public void isFull(ConnectionContext context,Destination destination, Usage usage) {
-        getNext().isFull(context,destination, usage);
-    }
-
-    public void messageConsumed(ConnectionContext context,MessageReference messageReference) {
-        getNext().messageConsumed(context, messageReference);
-    }
-
-    public void messageDelivered(ConnectionContext context,MessageReference messageReference) {
-        getNext().messageDelivered(context, messageReference);
-    }
-
-    public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference) {
-        getNext().messageDiscarded(context, sub, messageReference);
-    }
-
-    public void slowConsumer(ConnectionContext context, Destination dest, Subscription subs) {
-        getNext().slowConsumer(context, dest,subs);
-    }
-    
-    public void nowMasterBroker() {   
-       getNext().nowMasterBroker();
-    }
-
-    public void processConsumerControl(ConsumerBrokerExchange consumerExchange,
-            ConsumerControl control) {
-        getNext().processConsumerControl(consumerExchange, control);
-    }
-
-    public Scheduler getScheduler() {
-       return getNext().getScheduler();
-    }
-
-    public ThreadPoolExecutor getExecutor() {
-       return getNext().getExecutor();
-    }
-
-    public void networkBridgeStarted(BrokerInfo brokerInfo, boolean createdByDuplex) {
-        getNext().networkBridgeStarted(brokerInfo, createdByDuplex);
-    }
-
-    public void networkBridgeStopped(BrokerInfo brokerInfo) {
-        getNext().networkBridgeStopped(brokerInfo);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java
deleted file mode 100755
index dcd579f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ProducerBrokerExchange.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.broker;
-
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Region;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.state.ProducerState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Holds internal state in the broker for a MessageProducer
- * 
- * 
- */
-public class ProducerBrokerExchange {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ProducerBrokerExchange.class);
-    private ConnectionContext connectionContext;
-    private Destination regionDestination;
-    private Region region;
-    private ProducerState producerState;
-    private boolean mutable = true;
-    private long lastSendSequenceNumber = -1;
-    
-    public ProducerBrokerExchange() {
-    }
-
-    public ProducerBrokerExchange copy() {
-        ProducerBrokerExchange rc = new ProducerBrokerExchange();
-        rc.connectionContext = connectionContext.copy();
-        rc.regionDestination = regionDestination;
-        rc.region = region;
-        rc.producerState = producerState;
-        rc.mutable = mutable;
-        return rc;
-    }
-
-    
-    /**
-     * @return the connectionContext
-     */
-    public ConnectionContext getConnectionContext() {
-        return this.connectionContext;
-    }
-
-    /**
-     * @param connectionContext the connectionContext to set
-     */
-    public void setConnectionContext(ConnectionContext connectionContext) {
-        this.connectionContext = connectionContext;
-    }
-
-    /**
-     * @return the mutable
-     */
-    public boolean isMutable() {
-        return this.mutable;
-    }
-
-    /**
-     * @param mutable the mutable to set
-     */
-    public void setMutable(boolean mutable) {
-        this.mutable = mutable;
-    }
-
-    /**
-     * @return the regionDestination
-     */
-    public Destination getRegionDestination() {
-        return this.regionDestination;
-    }
-
-    /**
-     * @param regionDestination the regionDestination to set
-     */
-    public void setRegionDestination(Destination regionDestination) {
-        this.regionDestination = regionDestination;
-    }
-
-    /**
-     * @return the region
-     */
-    public Region getRegion() {
-        return this.region;
-    }
-
-    /**
-     * @param region the region to set
-     */
-    public void setRegion(Region region) {
-        this.region = region;
-    }
-
-    /**
-     * @return the producerState
-     */
-    public ProducerState getProducerState() {
-        return this.producerState;
-    }
-
-    /**
-     * @param producerState the producerState to set
-     */
-    public void setProducerState(ProducerState producerState) {
-        this.producerState = producerState;
-    }
-
-    /**
-     * Enforce duplicate suppression using info from persistence adapter
-     * @param messageSend
-     * @return false if message should be ignored as a duplicate
-     */
-    public boolean canDispatch(Message messageSend) {
-        boolean canDispatch = true;
-        if (lastSendSequenceNumber > 0) {
-            if (messageSend.getMessageId().getProducerSequenceId() <= lastSendSequenceNumber) {
-                canDispatch = false;
-                LOG.debug("suppressing duplicate message send [" + messageSend.getMessageId() + "] with producerSequenceId [" 
-                        + messageSend.getMessageId().getProducerSequenceId() + "] less than last stored: "  + lastSendSequenceNumber);
-            }
-        }
-        return canDispatch;
-    }
-
-    public void setLastStoredSequenceId(long l) {
-        lastSendSequenceNumber = l;
-        LOG.debug("last stored sequence id set: " + l);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java
deleted file mode 100644
index 698c326..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * A {@link BrokerFactoryHandler} which uses a properties file to configure the
- * broker's various policies.
- * 
- * 
- */
-public class PropertiesBrokerFactory implements BrokerFactoryHandler {
-
-    public BrokerService createBroker(URI brokerURI) throws Exception {
-
-        Map properties = loadProperties(brokerURI);
-        BrokerService brokerService = createBrokerService(brokerURI, properties);
-
-        IntrospectionSupport.setProperties(brokerService, properties);
-        return brokerService;
-    }
-
-    /**
-     * Lets load the properties from some external URL or a relative file
-     */
-    protected Map loadProperties(URI brokerURI) throws IOException {
-        // lets load a URI
-        String remaining = brokerURI.getSchemeSpecificPart();
-        Properties properties = new Properties();
-        File file = new File(remaining);
-
-        InputStream inputStream = null;
-        if (file.exists()) {
-            inputStream = new FileInputStream(file);
-        } else {
-            URL url = null;
-            try {
-                url = new URL(remaining);
-            } catch (MalformedURLException e) {
-                // lets now see if we can find the name on the classpath
-                inputStream = findResourceOnClassPath(remaining);
-                if (inputStream == null) {
-                    throw new IOException("File does not exist: " + remaining + ", could not be found on the classpath and is not a valid URL: " + e);
-                }
-            }
-            if (inputStream == null && url != null) {
-                inputStream = url.openStream();
-            }
-        }
-        if (inputStream != null) {
-            properties.load(inputStream);
-            inputStream.close();
-        }
-
-        // should we append any system properties?
-        try {
-            Properties systemProperties = System.getProperties();
-            properties.putAll(systemProperties);
-        } catch (Exception e) {
-            // ignore security exception
-        }
-        return properties;
-    }
-
-    protected InputStream findResourceOnClassPath(String remaining) {
-        InputStream answer = Thread.currentThread().getContextClassLoader().getResourceAsStream(remaining);
-        if (answer == null) {
-            answer = getClass().getClassLoader().getResourceAsStream(remaining);
-        }
-        return answer;
-    }
-
-    protected BrokerService createBrokerService(URI brokerURI, Map properties) {
-        return new BrokerService();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SingleTransportConnectionStateRegister.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SingleTransportConnectionStateRegister.java
deleted file mode 100755
index 159c6e6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SingleTransportConnectionStateRegister.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SessionId;
-
-/**
- * 
- */
-
-public class SingleTransportConnectionStateRegister  implements TransportConnectionStateRegister{
-
-    private  TransportConnectionState connectionState;
-    private ConnectionId connectionId;
-
-    public TransportConnectionState registerConnectionState(ConnectionId connectionId,
-                                                               TransportConnectionState state) {
-        TransportConnectionState rc = connectionState;
-        connectionState = state;
-        this.connectionId = connectionId;
-        return rc;
-    }
-
-    public synchronized TransportConnectionState unregisterConnectionState(ConnectionId connectionId) {
-        TransportConnectionState rc = null;
-        
-       
-        if (connectionId != null && connectionState != null && this.connectionId!=null){
-        if (this.connectionId.equals(connectionId)){
-			rc = connectionState;
-			connectionState = null;
-			connectionId = null;
-		}
-        }
-        return rc;
-    }
-
-    public synchronized List<TransportConnectionState> listConnectionStates() {
-        List<TransportConnectionState> rc = new ArrayList<TransportConnectionState>();
-        if (connectionState != null) {
-            rc.add(connectionState);
-        }
-        return rc;
-    }
-
-    public synchronized TransportConnectionState lookupConnectionState(String connectionId) {
-        TransportConnectionState cs = connectionState;
-        if (cs == null) {
-            throw new IllegalStateException(
-                                            "Cannot lookup a connectionId for a connection that had not been registered: "
-                                                + connectionId);
-        }
-        return cs;
-    }
-
-    public synchronized TransportConnectionState lookupConnectionState(ConsumerId id) {
-        TransportConnectionState cs = connectionState;
-        if (cs == null) {
-            throw new IllegalStateException(
-                                            "Cannot lookup a consumer from a connection that had not been registered: "
-                                                + id.getParentId().getParentId());
-        }
-        return cs;
-    }
-
-    public synchronized TransportConnectionState lookupConnectionState(ProducerId id) {
-        TransportConnectionState cs = connectionState;
-        if (cs == null) {
-            throw new IllegalStateException(
-                                            "Cannot lookup a producer from a connection that had not been registered: "
-                                                + id.getParentId().getParentId());
-        }
-        return cs;
-    }
-
-    public synchronized TransportConnectionState lookupConnectionState(SessionId id) {
-        TransportConnectionState cs = connectionState;
-        if (cs == null) {
-            throw new IllegalStateException(
-                                            "Cannot lookup a session from a connection that had not been registered: "
-                                                + id.getParentId());
-        }
-        return cs;
-    }
-
-    public synchronized TransportConnectionState lookupConnectionState(ConnectionId connectionId) {
-        TransportConnectionState cs = connectionState;
-        return cs;
-    }
-
-	public synchronized boolean doesHandleMultipleConnectionStates() {
-		return false;
-	}
-
-	public synchronized boolean isEmpty() {
-		return connectionState == null;
-	}
-
-	public void intialize(TransportConnectionStateRegister other) {
-		
-		if (other.isEmpty()){
-			clear();
-		}else{
-			Map map = other.mapStates();
-			Iterator i = map.entrySet().iterator();
-			Map.Entry<ConnectionId, TransportConnectionState> entry = (Entry<ConnectionId, TransportConnectionState>) i.next();
-			connectionId = entry.getKey();
-			connectionState =entry.getValue();
-		}
-		
-	}
-
-	public Map<ConnectionId, TransportConnectionState> mapStates() {
-		Map<ConnectionId, TransportConnectionState> map = new HashMap<ConnectionId, TransportConnectionState>();
-		if (!isEmpty()) {
-			map.put(connectionId, connectionState);
-		}
-		return map;
-	}
-
-	public void clear() {
-		connectionState=null;
-		connectionId=null;
-		
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslBrokerService.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslBrokerService.java
deleted file mode 100644
index 0e7b831..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslBrokerService.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-import java.net.URI;
-import java.security.KeyManagementException;
-import java.security.SecureRandom;
-
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.TrustManager;
-
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.tcp.SslTransportFactory;
-
-/**
- * A BrokerService that allows access to the key and trust managers used by SSL
- * connections. There is no reason to use this class unless SSL is being used
- * AND the key and trust managers need to be specified from within code. In
- * fact, if the URI passed to this class does not have an "ssl" scheme, this
- * class will pass all work on to its superclass.
- * 
- * @author sepandm@gmail.com (Sepand)
- */
-public class SslBrokerService extends BrokerService {
-    /**
-     * Adds a new transport connector for the given bind address. If the
-     * transport created uses SSL, it will also use the key and trust managers
-     * provided. Otherwise, this is the same as calling addConnector.
-     * 
-     * @param bindAddress The address to bind to.
-     * @param km The KeyManager to be used.
-     * @param tm The trustmanager to be used.
-     * @param random The source of randomness for the generator.
-     * @return the newly connected and added transport connector.
-     * @throws Exception
-     */
-
-    public TransportConnector addSslConnector(String bindAddress, KeyManager[] km, TrustManager[] tm, SecureRandom random) throws Exception {
-        return addSslConnector(new URI(bindAddress), km, tm, random);
-    }
-
-    /**
-     * Adds a new transport connector for the given bind address. If the
-     * transport created uses SSL, it will also use the key and trust managers
-     * provided. Otherwise, this is the same as calling addConnector.
-     * 
-     * @param bindAddress The URI to bind to.
-     * @param km The KeyManager to be used.
-     * @param tm The trustmanager to be used.
-     * @param random The source of randomness for the generator.
-     * @return the newly created and added transport connector.
-     * @throws Exception
-     */
-    public TransportConnector addSslConnector(URI bindAddress, KeyManager[] km, TrustManager[] tm, SecureRandom random) throws Exception {
-        return addConnector(createSslTransportServer(bindAddress, km, tm, random));
-    }
-
-    /**
-     * Creates a TransportServer that uses the given key and trust managers. The
-     * last three parameters will be eventually passed to SSLContext.init.
-     * 
-     * @param brokerURI The URI to bind to.
-     * @param km The KeyManager to be used.
-     * @param tm The trustmanager to be used.
-     * @param random The source of randomness for the generator.
-     * @return A new TransportServer that uses the given managers.
-     * @throws IOException If cannot handle URI.
-     * @throws KeyManagementException Passed on from SSL.
-     */
-    protected TransportServer createSslTransportServer(URI brokerURI, KeyManager[] km, TrustManager[] tm, SecureRandom random) throws IOException, KeyManagementException {
-
-        if (brokerURI.getScheme().equals("ssl")) {
-            // If given an SSL URI, use an SSL TransportFactory and configure
-            // it to use the given key and trust managers.
-            SslTransportFactory transportFactory = new SslTransportFactory();
-            
-            SslContext ctx = new SslContext(km, tm, random);
-            SslContext.setCurrentSslContext(ctx);
-            try {
-                return transportFactory.doBind(brokerURI);
-            } finally {
-                SslContext.setCurrentSslContext(null);
-            }
-            
-        } else {
-            // Else, business as usual.
-            return TransportFactory.bind(this, brokerURI);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslContext.java
deleted file mode 100644
index c3843ae..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslContext.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.broker;
-
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.SecureRandom;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-
-/**
- * A holder of SSL configuration.
- */
-public class SslContext {
-    
-    protected String protocol = "TLS";
-    protected String provider = null;
-    protected List<KeyManager> keyManagers = new ArrayList<KeyManager>();
-    protected List<TrustManager> trustManagers = new ArrayList<TrustManager>();
-    protected SecureRandom secureRandom;
-    private SSLContext sslContext;
-    
-    private static final ThreadLocal<SslContext> current = new ThreadLocal<SslContext>();
-    
-    public SslContext() {
-    }
-    
-    public SslContext(KeyManager[] km, TrustManager[] tm, SecureRandom random) {
-        if( km!=null ) {
-            setKeyManagers(Arrays.asList(km));
-        }
-        if( tm!=null ) {
-            setTrustManagers(Arrays.asList(tm));
-        }
-        setSecureRandom(random);        
-    }
-    
-    static public void setCurrentSslContext(SslContext bs) {
-        current.set(bs);
-    }
-    static public SslContext getCurrentSslContext() {
-        return current.get();
-    }
-    
-    public KeyManager[] getKeyManagersAsArray() {
-        KeyManager rc[] = new KeyManager[keyManagers.size()];
-        return keyManagers.toArray(rc);
-    }
-    public TrustManager[] getTrustManagersAsArray() {
-        TrustManager rc[] = new TrustManager[trustManagers.size()];
-        return trustManagers.toArray(rc);
-    }
-    
-    public void addKeyManager(KeyManager km) {
-        keyManagers.add(km);
-    }
-    public boolean removeKeyManager(KeyManager km) {
-        return keyManagers.remove(km);
-    }
-    public void addTrustManager(TrustManager tm) {
-        trustManagers.add(tm);
-    }
-    public boolean removeTrustManager(TrustManager tm) {
-        return trustManagers.remove(tm);
-    }
-    
-    public List<KeyManager> getKeyManagers() {
-        return keyManagers;
-    }
-    public void setKeyManagers(List<KeyManager> keyManagers) {
-        this.keyManagers = keyManagers;
-    }
-    public List<TrustManager> getTrustManagers() {
-        return trustManagers;
-    }
-    public void setTrustManagers(List<TrustManager> trustManagers) {
-        this.trustManagers = trustManagers;
-    }
-    public SecureRandom getSecureRandom() {
-        return secureRandom;
-    }
-    public void setSecureRandom(SecureRandom secureRandom) {
-        this.secureRandom = secureRandom;
-    }
-        
-    public String getProtocol() {
-        return protocol;
-    }
-    public void setProtocol(String protocol) {
-        this.protocol = protocol;
-    }
-    public String getProvider() {
-        return provider;
-    }
-    public void setProvider(String provider) {
-        this.provider = provider;
-    }
-
-    public SSLContext getSSLContext() throws NoSuchProviderException, NoSuchAlgorithmException, KeyManagementException {
-        if( sslContext == null ) {
-            if( provider == null ) {
-                sslContext = SSLContext.getInstance(protocol);
-            } else {
-                sslContext = SSLContext.getInstance(protocol, provider);
-            }
-            sslContext.init(getKeyManagersAsArray(), getTrustManagersAsArray(), getSecureRandom());
-        }
-        return sslContext;
-    }
-    public void setSSLContext(SSLContext sslContext) {
-        this.sslContext = sslContext;
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
deleted file mode 100755
index cfc72f0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/**
- * 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.broker;
-
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.jms.JMSException;
-import javax.transaction.xa.XAException;
-
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.state.ProducerState;
-import org.apache.activemq.store.TransactionRecoveryListener;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.transaction.LocalTransaction;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.transaction.Transaction;
-import org.apache.activemq.transaction.XATransaction;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.WrappedException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This broker filter handles the transaction related operations in the Broker
- * interface.
- * 
- * 
- */
-public class TransactionBroker extends BrokerFilter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TransactionBroker.class);
-
-    // The prepared XA transactions.
-    private TransactionStore transactionStore;
-    private Map<TransactionId, XATransaction> xaTransactions = new LinkedHashMap<TransactionId, XATransaction>();
-    private ActiveMQMessageAudit audit;
-
-    public TransactionBroker(Broker next, TransactionStore transactionStore) {
-        super(next);
-        this.transactionStore = transactionStore;
-    }
-
-    // ////////////////////////////////////////////////////////////////////////////
-    //
-    // Life cycle Methods
-    //
-    // ////////////////////////////////////////////////////////////////////////////
-
-    /**
-     * Recovers any prepared transactions.
-     */
-    public void start() throws Exception {
-        transactionStore.start();
-        try {
-            final ConnectionContext context = new ConnectionContext();
-            context.setBroker(this);
-            context.setInRecoveryMode(true);
-            context.setTransactions(new ConcurrentHashMap<TransactionId, Transaction>());
-            context.setProducerFlowControl(false);
-            final ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-            producerExchange.setMutable(true);
-            producerExchange.setConnectionContext(context);
-            producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
-            final ConsumerBrokerExchange consumerExchange = new ConsumerBrokerExchange();
-            consumerExchange.setConnectionContext(context);
-            transactionStore.recover(new TransactionRecoveryListener() {
-                public void recover(XATransactionId xid, Message[] addedMessages, MessageAck[] aks) {
-                    try {
-                        beginTransaction(context, xid);
-                        for (int i = 0; i < addedMessages.length; i++) {
-                            send(producerExchange, addedMessages[i]);
-                        }
-                        for (int i = 0; i < aks.length; i++) {
-                            acknowledge(consumerExchange, aks[i]);
-                        }
-                        prepareTransaction(context, xid);
-                    } catch (Throwable e) {
-                        throw new WrappedException(e);
-                    }
-                }
-            });
-        } catch (WrappedException e) {
-            Throwable cause = e.getCause();
-            throw IOExceptionSupport.create("Recovery Failed: " + cause.getMessage(), cause);
-        }
-        next.start();
-    }
-
-    public void stop() throws Exception {
-        transactionStore.stop();
-        next.stop();
-    }
-
-    // ////////////////////////////////////////////////////////////////////////////
-    //
-    // BrokerFilter overrides
-    //
-    // ////////////////////////////////////////////////////////////////////////////
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-        List<TransactionId> txs = new ArrayList<TransactionId>();
-        synchronized (xaTransactions) {
-            for (Iterator<XATransaction> iter = xaTransactions.values().iterator(); iter.hasNext();) {
-                Transaction tx = iter.next();
-                if (tx.isPrepared()) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("prepared transaction: " + tx.getTransactionId());
-                    }
-                    txs.add(tx.getTransactionId());
-                }
-            }
-        }
-        XATransactionId rc[] = new XATransactionId[txs.size()];
-        txs.toArray(rc);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("prepared transacton list size: " + rc.length);
-        }
-        return rc;
-    }
-
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        // the transaction may have already been started.
-        if (xid.isXATransaction()) {
-            XATransaction transaction = null;
-            synchronized (xaTransactions) {
-                transaction = xaTransactions.get(xid);
-                if (transaction != null) {
-                    return;
-                }
-                transaction = new XATransaction(transactionStore, (XATransactionId)xid, this, context.getConnectionId());
-                xaTransactions.put(xid, transaction);
-            }
-        } else {
-            Map<TransactionId, Transaction> transactionMap = context.getTransactions();
-            Transaction transaction = transactionMap.get(xid);
-            if (transaction != null) {
-                throw new JMSException("Transaction '" + xid + "' has already been started.");
-            }
-            transaction = new LocalTransaction(transactionStore, (LocalTransactionId)xid, context);
-            transactionMap.put(xid, transaction);
-        }
-    }
-
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        Transaction transaction = getTransaction(context, xid, false);
-        return transaction.prepare();
-    }
-
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        Transaction transaction = getTransaction(context, xid, true);
-        transaction.commit(onePhase);
-    }
-
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        Transaction transaction = getTransaction(context, xid, true);
-        transaction.rollback();
-    }
-
-    public void forgetTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        Transaction transaction = getTransaction(context, xid, true);
-        transaction.rollback();
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        // This method may be invoked recursively.
-        // Track original tx so that it can be restored.
-        final ConnectionContext context = consumerExchange.getConnectionContext();
-        Transaction originalTx = context.getTransaction();
-        Transaction transaction = null;
-        if (ack.isInTransaction()) {
-            transaction = getTransaction(context, ack.getTransactionId(), false);
-        }
-        context.setTransaction(transaction);
-        try {
-            next.acknowledge(consumerExchange, ack);
-        } finally {
-            context.setTransaction(originalTx);
-        }
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, final Message message) throws Exception {
-        // This method may be invoked recursively.
-        // Track original tx so that it can be restored.
-        final ConnectionContext context = producerExchange.getConnectionContext();
-        Transaction originalTx = context.getTransaction();
-        Transaction transaction = null;
-        Synchronization sync = null;
-        if (message.getTransactionId() != null) {
-            transaction = getTransaction(context, message.getTransactionId(), false);
-            if (transaction != null) {
-                sync = new Synchronization() {
-
-                    public void afterRollback() {
-                        if (audit != null) {
-                            audit.rollback(message);
-                        }
-                    }
-                };
-                transaction.addSynchronization(sync);
-            }
-        }
-        if (audit == null || !audit.isDuplicate(message)) {
-            context.setTransaction(transaction);
-            try {
-                next.send(producerExchange, message);
-            } finally {
-                context.setTransaction(originalTx);
-            }
-        } else {
-            if (sync != null && transaction != null) {
-                transaction.removeSynchronization(sync);
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("IGNORING duplicate message " + message);
-            }
-        }
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        for (Iterator<Transaction> iter = context.getTransactions().values().iterator(); iter.hasNext();) {
-            try {
-                Transaction transaction = iter.next();
-                transaction.rollback();
-            } catch (Exception e) {
-                LOG.warn("ERROR Rolling back disconnected client's transactions: ", e);
-            }
-            iter.remove();
-        }
-
-        synchronized (xaTransactions) {
-            // first find all txs that belongs to the connection
-            ArrayList<XATransaction> txs = new ArrayList<XATransaction>();
-            for (XATransaction tx : xaTransactions.values()) {
-                if (tx.getConnectionId().equals(info.getConnectionId()) && !tx.isPrepared()) {
-                    txs.add(tx);
-                }
-            }
-
-            // then remove them
-            // two steps needed to avoid ConcurrentModificationException, from removeTransaction()
-            for (XATransaction tx : txs) {
-                try {
-                    tx.rollback();
-                } catch (Exception e) {
-                    LOG.warn("ERROR Rolling back disconnected client's xa transactions: ", e);
-                }
-            }
-
-        }
-        next.removeConnection(context, info, error);
-    }
-
-    // ////////////////////////////////////////////////////////////////////////////
-    //
-    // Implementation help methods.
-    //
-    // ////////////////////////////////////////////////////////////////////////////
-    public Transaction getTransaction(ConnectionContext context, TransactionId xid, boolean mightBePrepared) throws JMSException, XAException {
-        Map transactionMap = null;
-        synchronized (xaTransactions) {
-            transactionMap = xid.isXATransaction() ? xaTransactions : context.getTransactions();
-        }
-        Transaction transaction = (Transaction)transactionMap.get(xid);
-        if (transaction != null) {
-            return transaction;
-        }
-        if (xid.isXATransaction()) {
-            XAException e = new XAException("Transaction '" + xid + "' has not been started.");
-            e.errorCode = XAException.XAER_NOTA;
-            throw e;
-        } else {
-            throw new JMSException("Transaction '" + xid + "' has not been started.");
-        }
-    }
-
-    public void removeTransaction(XATransactionId xid) {
-        synchronized (xaTransactions) {
-            xaTransactions.remove(xid);
-        }
-    }
-
-    public synchronized void brokerServiceStarted() {
-        super.brokerServiceStarted();
-        if (getBrokerService().isSupportFailOver() && audit == null) {
-            audit = new ActiveMQMessageAudit();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
deleted file mode 100755
index 1301124..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
+++ /dev/null
@@ -1,1449 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import javax.management.ObjectName;
-import javax.transaction.xa.XAResource;
-
-import org.apache.activemq.broker.ft.MasterBroker;
-import org.apache.activemq.broker.region.ConnectionStatistics;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ControlCommand;
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.FlushCommand;
-import org.apache.activemq.command.IntegerResponse;
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.network.*;
-import org.apache.activemq.security.MessageAuthorizationPolicy;
-import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.state.ConnectionState;
-import org.apache.activemq.state.ConsumerState;
-import org.apache.activemq.state.ProducerState;
-import org.apache.activemq.state.SessionState;
-import org.apache.activemq.state.TransactionState;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.transaction.Transaction;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportDisposedIOException;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.util.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-public class TransportConnection implements Connection, Task, CommandVisitor {
-    private static final Logger LOG = LoggerFactory.getLogger(TransportConnection.class);
-    private static final Logger TRANSPORTLOG = LoggerFactory.getLogger(TransportConnection.class.getName() + ".Transport");
-    private static final Logger SERVICELOG = LoggerFactory.getLogger(TransportConnection.class.getName() + ".Service");
-    // Keeps track of the broker and connector that created this connection.
-    protected final Broker broker;
-    protected final TransportConnector connector;
-    // Keeps track of the state of the connections.
-    // protected final ConcurrentHashMap localConnectionStates=new
-    // ConcurrentHashMap();
-    protected final Map<ConnectionId, ConnectionState> brokerConnectionStates;
-    // The broker and wireformat info that was exchanged.
-    protected BrokerInfo brokerInfo;
-    protected final List<Command> dispatchQueue = new LinkedList<Command>();
-    protected TaskRunner taskRunner;
-    protected final AtomicReference<IOException> transportException = new AtomicReference<IOException>();
-    protected AtomicBoolean dispatchStopped = new AtomicBoolean(false);
-    private MasterBroker masterBroker;
-    private final Transport transport;
-    private MessageAuthorizationPolicy messageAuthorizationPolicy;
-    private WireFormatInfo wireFormatInfo;
-    // Used to do async dispatch.. this should perhaps be pushed down into the
-    // transport layer..
-    private boolean inServiceException;
-    private final ConnectionStatistics statistics = new ConnectionStatistics();
-    private boolean manageable;
-    private boolean slow;
-    private boolean markedCandidate;
-    private boolean blockedCandidate;
-    private boolean blocked;
-    private boolean connected;
-    private boolean active;
-    private boolean starting;
-    private boolean pendingStop;
-    private long timeStamp;
-    private final AtomicBoolean stopping = new AtomicBoolean(false);
-    private final CountDownLatch stopped = new CountDownLatch(1);
-    private final AtomicBoolean asyncException = new AtomicBoolean(false);
-    private final Map<ProducerId, ProducerBrokerExchange> producerExchanges = new HashMap<ProducerId, ProducerBrokerExchange>();
-    private final Map<ConsumerId, ConsumerBrokerExchange> consumerExchanges = new HashMap<ConsumerId, ConsumerBrokerExchange>();
-    private final CountDownLatch dispatchStoppedLatch = new CountDownLatch(1);
-    private ConnectionContext context;
-    private boolean networkConnection;
-    private boolean faultTolerantConnection;
-    private final AtomicInteger protocolVersion = new AtomicInteger(CommandTypes.PROTOCOL_VERSION);
-    private DemandForwardingBridge duplexBridge;
-    private final TaskRunnerFactory taskRunnerFactory;
-    private TransportConnectionStateRegister connectionStateRegister = new SingleTransportConnectionStateRegister();
-    private final ReentrantReadWriteLock serviceLock = new ReentrantReadWriteLock();
-    private String duplexNetworkConnectorId;
-
-    /**
-     * @param connector
-     * @param transport
-     * @param broker
-     * @param taskRunnerFactory
-     *            - can be null if you want direct dispatch to the transport
-     *            else commands are sent async.
-     */
-    public TransportConnection(TransportConnector connector, final Transport transport, Broker broker,
-            TaskRunnerFactory taskRunnerFactory) {
-        this.connector = connector;
-        this.broker = broker;
-        this.messageAuthorizationPolicy = connector.getMessageAuthorizationPolicy();
-        RegionBroker rb = (RegionBroker) broker.getAdaptor(RegionBroker.class);
-        brokerConnectionStates = rb.getConnectionStates();
-        if (connector != null) {
-            this.statistics.setParent(connector.getStatistics());
-        }
-        this.taskRunnerFactory = taskRunnerFactory;
-        this.transport = transport;
-        this.transport.setTransportListener(new DefaultTransportListener() {
-            @Override
-            public void onCommand(Object o) {
-                serviceLock.readLock().lock();
-                try {
-                    if (!(o instanceof Command)) {
-                        throw new RuntimeException("Protocol violation - Command corrupted: " + o.toString());
-                    }
-                    Command command = (Command) o;
-                    Response response = service(command);
-                    if (response != null) {
-                        dispatchSync(response);
-                    }
-                } finally {
-                    serviceLock.readLock().unlock();
-                }
-            }
-
-            @Override
-            public void onException(IOException exception) {
-                serviceLock.readLock().lock();
-                try {
-                    serviceTransportException(exception);
-                } finally {
-                    serviceLock.readLock().unlock();
-                }
-            }
-        });
-        connected = true;
-    }
-
-    /**
-     * Returns the number of messages to be dispatched to this connection
-     * 
-     * @return size of dispatch queue
-     */
-    public int getDispatchQueueSize() {
-        synchronized (dispatchQueue) {
-            return dispatchQueue.size();
-        }
-    }
-
-    public void serviceTransportException(IOException e) {
-        BrokerService bService = connector.getBrokerService();
-        if (bService.isShutdownOnSlaveFailure()) {
-            if (brokerInfo != null) {
-                if (brokerInfo.isSlaveBroker()) {
-                    LOG.error("Slave has exception: " + e.getMessage() + " shutting down master now.", e);
-                    try {
-                        doStop();
-                        bService.stop();
-                    } catch (Exception ex) {
-                        LOG.warn("Failed to stop the master", ex);
-                    }
-                }
-            }
-        }
-        if (!stopping.get()) {
-            transportException.set(e);
-            if (TRANSPORTLOG.isDebugEnabled()) {
-                TRANSPORTLOG.debug("Transport failed: " + e, e);
-            } else if (TRANSPORTLOG.isInfoEnabled()) {
-                TRANSPORTLOG.info("Transport failed: " + e);
-            }
-            stopAsync();
-        }
-    }
-
-    /**
-     * Calls the serviceException method in an async thread. Since handling a
-     * service exception closes a socket, we should not tie up broker threads
-     * since client sockets may hang or cause deadlocks.
-     * 
-     * @param e
-     */
-    public void serviceExceptionAsync(final IOException e) {
-        if (asyncException.compareAndSet(false, true)) {
-            new Thread("Async Exception Handler") {
-                @Override
-                public void run() {
-                    serviceException(e);
-                }
-            }.start();
-        }
-    }
-
-    /**
-     * Closes a clients connection due to a detected error. Errors are ignored
-     * if: the client is closing or broker is closing. Otherwise, the connection
-     * error transmitted to the client before stopping it's transport.
-     */
-    public void serviceException(Throwable e) {
-        // are we a transport exception such as not being able to dispatch
-        // synchronously to a transport
-        if (e instanceof IOException) {
-            serviceTransportException((IOException) e);
-        } else if (e.getClass() == BrokerStoppedException.class) {
-            // Handle the case where the broker is stopped
-            // But the client is still connected.
-            if (!stopping.get()) {
-                if (SERVICELOG.isDebugEnabled()) {
-                    SERVICELOG.debug("Broker has been stopped.  Notifying client and closing his connection.");
-                }
-                ConnectionError ce = new ConnectionError();
-                ce.setException(e);
-                dispatchSync(ce);
-                // Wait a little bit to try to get the output buffer to flush
-                // the exption notification to the client.
-                try {
-                    Thread.sleep(500);
-                } catch (InterruptedException ie) {
-                    Thread.currentThread().interrupt();
-                }
-                // Worst case is we just kill the connection before the
-                // notification gets to him.
-                stopAsync();
-            }
-        } else if (!stopping.get() && !inServiceException) {
-            inServiceException = true;
-            try {
-                SERVICELOG.warn("Async error occurred: " + e, e);
-                ConnectionError ce = new ConnectionError();
-                ce.setException(e);
-                dispatchAsync(ce);
-            } finally {
-                inServiceException = false;
-            }
-        }
-    }
-
-    public Response service(Command command) {
-        MDC.put("activemq.connector", connector.getUri().toString());
-        Response response = null;
-        boolean responseRequired = command.isResponseRequired();
-        int commandId = command.getCommandId();
-        try {
-            response = command.visit(this);
-        } catch (Throwable e) {
-            if (SERVICELOG.isDebugEnabled() && e.getClass() != BrokerStoppedException.class) {
-                SERVICELOG.debug("Error occured while processing " + (responseRequired ? "sync" : "async")
-                        + " command: " + command + ", exception: " + e, e);
-            }
-            if (responseRequired) {
-                response = new ExceptionResponse(e);
-            } else {
-                serviceException(e);
-            }
-        }
-        if (responseRequired) {
-            if (response == null) {
-                response = new Response();
-            }
-            response.setCorrelationId(commandId);
-        }
-        // The context may have been flagged so that the response is not
-        // sent.
-        if (context != null) {
-            if (context.isDontSendReponse()) {
-                context.setDontSendReponse(false);
-                response = null;
-            }
-            context = null;
-        }
-        MDC.remove("activemq.connector");
-        return response;
-    }
-
-    public Response processKeepAlive(KeepAliveInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processRemoveSubscription(RemoveSubscriptionInfo info) throws Exception {
-        broker.removeSubscription(lookupConnectionState(info.getConnectionId()).getContext(), info);
-        return null;
-    }
-
-    public Response processWireFormat(WireFormatInfo info) throws Exception {
-        wireFormatInfo = info;
-        protocolVersion.set(info.getVersion());
-        return null;
-    }
-
-    public Response processShutdown(ShutdownInfo info) throws Exception {
-        stopAsync();
-        return null;
-    }
-
-    public Response processFlush(FlushCommand command) throws Exception {
-        return null;
-    }
-
-    public Response processBeginTransaction(TransactionInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        context = null;
-        if (cs != null) {
-            context = cs.getContext();
-        }
-        if (cs == null) {
-            throw new NullPointerException("Context is null");
-        }
-        // Avoid replaying dup commands
-        if (cs.getTransactionState(info.getTransactionId()) == null) {
-            cs.addTransactionState(info.getTransactionId());
-            broker.beginTransaction(context, info.getTransactionId());
-        }
-        return null;
-    }
-
-    public Response processEndTransaction(TransactionInfo info) throws Exception {
-        // No need to do anything. This packet is just sent by the client
-        // make sure he is synced with the server as commit command could
-        // come from a different connection.
-        return null;
-    }
-
-    public Response processPrepareTransaction(TransactionInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        context = null;
-        if (cs != null) {
-            context = cs.getContext();
-        }
-        if (cs == null) {
-            throw new NullPointerException("Context is null");
-        }
-        TransactionState transactionState = cs.getTransactionState(info.getTransactionId());
-        if (transactionState == null) {
-            throw new IllegalStateException("Cannot prepare a transaction that had not been started or previously returned XA_RDONLY: "
-                    + info.getTransactionId());
-        }
-        // Avoid dups.
-        if (!transactionState.isPrepared()) {
-            transactionState.setPrepared(true);
-            int result = broker.prepareTransaction(context, info.getTransactionId());
-            transactionState.setPreparedResult(result);
-            if (result == XAResource.XA_RDONLY) {
-                // we are done, no further rollback or commit from TM
-                cs.removeTransactionState(info.getTransactionId());
-            }
-            IntegerResponse response = new IntegerResponse(result);
-            return response;
-        } else {
-            IntegerResponse response = new IntegerResponse(transactionState.getPreparedResult());
-            return response;
-        }
-    }
-
-    public Response processCommitTransactionOnePhase(TransactionInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        context = cs.getContext();
-        cs.removeTransactionState(info.getTransactionId());
-        broker.commitTransaction(context, info.getTransactionId(), true);
-        return null;
-    }
-
-    public Response processCommitTransactionTwoPhase(TransactionInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        context = cs.getContext();
-        cs.removeTransactionState(info.getTransactionId());
-        broker.commitTransaction(context, info.getTransactionId(), false);
-        return null;
-    }
-
-    public Response processRollbackTransaction(TransactionInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        context = cs.getContext();
-        cs.removeTransactionState(info.getTransactionId());
-        broker.rollbackTransaction(context, info.getTransactionId());
-        return null;
-    }
-
-    public Response processForgetTransaction(TransactionInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        context = cs.getContext();
-        broker.forgetTransaction(context, info.getTransactionId());
-        return null;
-    }
-
-    public Response processRecoverTransactions(TransactionInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        context = cs.getContext();
-        TransactionId[] preparedTransactions = broker.getPreparedTransactions(context);
-        return new DataArrayResponse(preparedTransactions);
-    }
-
-    public Response processMessage(Message messageSend) throws Exception {
-        ProducerId producerId = messageSend.getProducerId();
-        ProducerBrokerExchange producerExchange = getProducerBrokerExchange(producerId);
-        if (producerExchange.canDispatch(messageSend)) {
-            broker.send(producerExchange, messageSend);
-        }
-        return null;
-    }
-
-    public Response processMessageAck(MessageAck ack) throws Exception {
-        ConsumerBrokerExchange consumerExchange = getConsumerBrokerExchange(ack.getConsumerId());
-        broker.acknowledge(consumerExchange, ack);
-        return null;
-    }
-
-    public Response processMessagePull(MessagePull pull) throws Exception {
-        return broker.messagePull(lookupConnectionState(pull.getConsumerId()).getContext(), pull);
-    }
-
-    public Response processMessageDispatchNotification(MessageDispatchNotification notification) throws Exception {
-        broker.processDispatchNotification(notification);
-        return null;
-    }
-
-    public Response processAddDestination(DestinationInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        broker.addDestinationInfo(cs.getContext(), info);
-        if (info.getDestination().isTemporary()) {
-            cs.addTempDestination(info);
-        }
-        return null;
-    }
-
-    public Response processRemoveDestination(DestinationInfo info) throws Exception {
-        TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
-        broker.removeDestinationInfo(cs.getContext(), info);
-        if (info.getDestination().isTemporary()) {
-            cs.removeTempDestination(info.getDestination());
-        }
-        return null;
-    }
-
-    public Response processAddProducer(ProducerInfo info) throws Exception {
-        SessionId sessionId = info.getProducerId().getParentId();
-        ConnectionId connectionId = sessionId.getParentId();
-        TransportConnectionState cs = lookupConnectionState(connectionId);
-        SessionState ss = cs.getSessionState(sessionId);
-        if (ss == null) {
-            throw new IllegalStateException("Cannot add a producer to a session that had not been registered: "
-                    + sessionId);
-        }
-        // Avoid replaying dup commands
-        if (!ss.getProducerIds().contains(info.getProducerId())) {
-            broker.addProducer(cs.getContext(), info);
-            try {
-                ss.addProducer(info);
-            } catch (IllegalStateException e) {
-                broker.removeProducer(cs.getContext(), info);
-            }
-        }
-        return null;
-    }
-
-    public Response processRemoveProducer(ProducerId id) throws Exception {
-        SessionId sessionId = id.getParentId();
-        ConnectionId connectionId = sessionId.getParentId();
-        TransportConnectionState cs = lookupConnectionState(connectionId);
-        SessionState ss = cs.getSessionState(sessionId);
-        if (ss == null) {
-            throw new IllegalStateException("Cannot remove a producer from a session that had not been registered: "
-                    + sessionId);
-        }
-        ProducerState ps = ss.removeProducer(id);
-        if (ps == null) {
-            throw new IllegalStateException("Cannot remove a producer that had not been registered: " + id);
-        }
-        removeProducerBrokerExchange(id);
-        broker.removeProducer(cs.getContext(), ps.getInfo());
-        return null;
-    }
-
-    public Response processAddConsumer(ConsumerInfo info) throws Exception {
-        SessionId sessionId = info.getConsumerId().getParentId();
-        ConnectionId connectionId = sessionId.getParentId();
-        TransportConnectionState cs = lookupConnectionState(connectionId);
-        SessionState ss = cs.getSessionState(sessionId);
-        if (ss == null) {
-            throw new IllegalStateException(broker.getBrokerName()
-                    + " Cannot add a consumer to a session that had not been registered: " + sessionId);
-        }
-        // Avoid replaying dup commands
-        if (!ss.getConsumerIds().contains(info.getConsumerId())) {
-            broker.addConsumer(cs.getContext(), info);
-            try {
-                ss.addConsumer(info);
-            } catch (IllegalStateException e) {
-                broker.removeConsumer(cs.getContext(), info);
-            }
-        }
-        return null;
-    }
-
-    public Response processRemoveConsumer(ConsumerId id, long lastDeliveredSequenceId) throws Exception {
-        SessionId sessionId = id.getParentId();
-        ConnectionId connectionId = sessionId.getParentId();
-        TransportConnectionState cs = lookupConnectionState(connectionId);
-        if (cs == null) {
-            throw new IllegalStateException("Cannot remove a consumer from a connection that had not been registered: "
-                    + connectionId);
-        }
-        SessionState ss = cs.getSessionState(sessionId);
-        if (ss == null) {
-            throw new IllegalStateException("Cannot remove a consumer from a session that had not been registered: "
-                    + sessionId);
-        }
-        ConsumerState consumerState = ss.removeConsumer(id);
-        if (consumerState == null) {
-            throw new IllegalStateException("Cannot remove a consumer that had not been registered: " + id);
-        }
-        ConsumerInfo info = consumerState.getInfo();
-        info.setLastDeliveredSequenceId(lastDeliveredSequenceId);
-        broker.removeConsumer(cs.getContext(), consumerState.getInfo());
-        removeConsumerBrokerExchange(id);
-        return null;
-    }
-
-    public Response processAddSession(SessionInfo info) throws Exception {
-        ConnectionId connectionId = info.getSessionId().getParentId();
-        TransportConnectionState cs = lookupConnectionState(connectionId);
-        // Avoid replaying dup commands
-        if (cs != null && !cs.getSessionIds().contains(info.getSessionId())) {
-            broker.addSession(cs.getContext(), info);
-            try {
-                cs.addSession(info);
-            } catch (IllegalStateException e) {
-                e.printStackTrace();
-                broker.removeSession(cs.getContext(), info);
-            }
-        }
-        return null;
-    }
-
-    public Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) throws Exception {
-        ConnectionId connectionId = id.getParentId();
-        TransportConnectionState cs = lookupConnectionState(connectionId);
-        if (cs == null) {
-            throw new IllegalStateException("Cannot remove session from connection that had not been registered: " + connectionId);
-        }
-        SessionState session = cs.getSessionState(id);
-        if (session == null) {
-            throw new IllegalStateException("Cannot remove session that had not been registered: " + id);
-        }
-        // Don't let new consumers or producers get added while we are closing
-        // this down.
-        session.shutdown();
-        // Cascade the connection stop to the consumers and producers.
-        for (Iterator iter = session.getConsumerIds().iterator(); iter.hasNext();) {
-            ConsumerId consumerId = (ConsumerId) iter.next();
-            try {
-                processRemoveConsumer(consumerId, lastDeliveredSequenceId);
-            } catch (Throwable e) {
-                LOG.warn("Failed to remove consumer: " + consumerId + ". Reason: " + e, e);
-            }
-        }
-        for (Iterator iter = session.getProducerIds().iterator(); iter.hasNext();) {
-            ProducerId producerId = (ProducerId) iter.next();
-            try {
-                processRemoveProducer(producerId);
-            } catch (Throwable e) {
-                LOG.warn("Failed to remove producer: " + producerId + ". Reason: " + e, e);
-            }
-        }
-        cs.removeSession(id);
-        broker.removeSession(cs.getContext(), session.getInfo());
-        return null;
-    }
-
-    public Response processAddConnection(ConnectionInfo info) throws Exception {
-        // if the broker service has slave attached, wait for the slave to be
-        // attached to allow client connection. slave connection is fine
-        if (!info.isBrokerMasterConnector() && connector.getBrokerService().isWaitForSlave()
-                && connector.getBrokerService().getSlaveStartSignal().getCount() == 1) {
-            ServiceSupport.dispose(transport);
-            return new ExceptionResponse(new Exception("Master's slave not attached yet."));
-        }
-        // Older clients should have been defaulting this field to true.. but
-        // they were not.
-        if (wireFormatInfo != null && wireFormatInfo.getVersion() <= 2) {
-            info.setClientMaster(true);
-        }
-        TransportConnectionState state;
-        // Make sure 2 concurrent connections by the same ID only generate 1
-        // TransportConnectionState object.
-        synchronized (brokerConnectionStates) {
-            state = (TransportConnectionState) brokerConnectionStates.get(info.getConnectionId());
-            if (state == null) {
-                state = new TransportConnectionState(info, this);
-                brokerConnectionStates.put(info.getConnectionId(), state);
-            }
-            state.incrementReference();
-        }
-        // If there are 2 concurrent connections for the same connection id,
-        // then last one in wins, we need to sync here
-        // to figure out the winner.
-        synchronized (state.getConnectionMutex()) {
-            if (state.getConnection() != this) {
-                LOG.debug("Killing previous stale connection: " + state.getConnection().getRemoteAddress());
-                state.getConnection().stop();
-                LOG.debug("Connection " + getRemoteAddress() + " taking over previous connection: "
-                        + state.getConnection().getRemoteAddress());
-                state.setConnection(this);
-                state.reset(info);
-            }
-        }
-        registerConnectionState(info.getConnectionId(), state);
-        LOG.debug("Setting up new connection id: " + info.getConnectionId() + ", address: " + getRemoteAddress());
-        this.faultTolerantConnection=info.isFaultTolerant();
-        // Setup the context.
-        String clientId = info.getClientId();
-        context = new ConnectionContext();
-        context.setBroker(broker);
-        context.setClientId(clientId);
-        context.setClientMaster(info.isClientMaster());
-        context.setConnection(this);
-        context.setConnectionId(info.getConnectionId());
-        context.setConnector(connector);
-        context.setMessageAuthorizationPolicy(getMessageAuthorizationPolicy());
-        context.setNetworkConnection(networkConnection);
-        context.setFaultTolerant(faultTolerantConnection);
-        context.setTransactions(new ConcurrentHashMap<TransactionId, Transaction>());
-        context.setUserName(info.getUserName());
-        context.setWireFormatInfo(wireFormatInfo);
-        context.setReconnect(info.isFailoverReconnect());
-        this.manageable = info.isManageable();
-        state.setContext(context);
-        state.setConnection(this);
-       
-        try {
-            broker.addConnection(context, info);
-        } catch (Exception e) {
-            synchronized (brokerConnectionStates) {
-                brokerConnectionStates.remove(info.getConnectionId());
-            }
-            unregisterConnectionState(info.getConnectionId());
-            LOG.warn("Failed to add Connection " + info.getConnectionId() + ", reason: " +  e.toString());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Exception detail:", e);
-            }
-            throw e;
-        }
-        if (info.isManageable()) {
-            // send ConnectionCommand
-            ConnectionControl command = this.connector.getConnectionControl();
-            command.setFaultTolerant(broker.isFaultTolerantConfiguration());
-            dispatchAsync(command);
-        }
-        return null;
-    }
-
-    public synchronized Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId)
-            throws InterruptedException {
-        LOG.debug("remove connection id: " + id);
-        TransportConnectionState cs = lookupConnectionState(id);
-        if (cs != null) {
-            // Don't allow things to be added to the connection state while we
-            // are
-            // shutting down.
-            cs.shutdown();
-            // Cascade the connection stop to the sessions.
-            for (Iterator iter = cs.getSessionIds().iterator(); iter.hasNext();) {
-                SessionId sessionId = (SessionId) iter.next();
-                try {
-                    processRemoveSession(sessionId, lastDeliveredSequenceId);
-                } catch (Throwable e) {
-                    SERVICELOG.warn("Failed to remove session " + sessionId, e);
-                }
-            }
-            // Cascade the connection stop to temp destinations.
-            for (Iterator iter = cs.getTempDestinations().iterator(); iter.hasNext();) {
-                DestinationInfo di = (DestinationInfo) iter.next();
-                try {
-                    broker.removeDestination(cs.getContext(), di.getDestination(), 0);
-                } catch (Throwable e) {
-                    SERVICELOG.warn("Failed to remove tmp destination " + di.getDestination(), e);
-                }
-                iter.remove();
-            }
-            try {
-                broker.removeConnection(cs.getContext(), cs.getInfo(), null);
-            } catch (Throwable e) {
-                SERVICELOG.warn("Failed to remove connection " + cs.getInfo() + ", reason: " + e.toString());
-                if (LOG.isDebugEnabled()) {
-                    SERVICELOG.debug("Exception detail:", e);
-                }
-            }
-            TransportConnectionState state = unregisterConnectionState(id);
-            if (state != null) {
-                synchronized (brokerConnectionStates) {
-                    // If we are the last reference, we should remove the state
-                    // from the broker.
-                    if (state.decrementReference() == 0) {
-                        brokerConnectionStates.remove(id);
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    public Response processProducerAck(ProducerAck ack) throws Exception {
-        // A broker should not get ProducerAck messages.
-        return null;
-    }
-
-    public Connector getConnector() {
-        return connector;
-    }
-
-    public void dispatchSync(Command message) {
-        // getStatistics().getEnqueues().increment();
-        try {
-            processDispatch(message);
-        } catch (IOException e) {
-            serviceExceptionAsync(e);
-        }
-    }
-
-    public void dispatchAsync(Command message) {
-        if (!stopping.get()) {
-            // getStatistics().getEnqueues().increment();
-            if (taskRunner == null) {
-                dispatchSync(message);
-            } else {
-                synchronized (dispatchQueue) {
-                    dispatchQueue.add(message);
-                }
-                try {
-                    taskRunner.wakeup();
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            }
-        } else {
-            if (message.isMessageDispatch()) {
-                MessageDispatch md = (MessageDispatch) message;
-                Runnable sub = md.getTransmitCallback();
-                broker.postProcessDispatch(md);
-                if (sub != null) {
-                    sub.run();
-                }
-            }
-        }
-    }
-
-    protected void processDispatch(Command command) throws IOException {
-        final MessageDispatch messageDispatch = (MessageDispatch) (command.isMessageDispatch() ? command : null);
-        try {
-            if (!stopping.get()) {
-                if (messageDispatch != null) {
-                    broker.preProcessDispatch(messageDispatch);
-                }
-                dispatch(command);
-            }
-        } finally {
-            if (messageDispatch != null) {
-                Runnable sub = messageDispatch.getTransmitCallback();
-                broker.postProcessDispatch(messageDispatch);
-                if (sub != null) {
-                    sub.run();
-                }
-            }
-            // getStatistics().getDequeues().increment();
-        }
-    }
-
-    public boolean iterate() {
-        try {
-            if (stopping.get()) {
-                if (dispatchStopped.compareAndSet(false, true)) {
-                    if (transportException.get() == null) {
-                        try {
-                            dispatch(new ShutdownInfo());
-                        } catch (Throwable ignore) {
-                        }
-                    }
-                    dispatchStoppedLatch.countDown();
-                }
-                return false;
-            }
-            if (!dispatchStopped.get()) {
-                Command command = null;
-                synchronized (dispatchQueue) {
-                    if (dispatchQueue.isEmpty()) {
-                        return false;
-                    }
-                    command = dispatchQueue.remove(0);
-                }
-                processDispatch(command);
-                return true;
-            }
-            return false;
-        } catch (IOException e) {
-            if (dispatchStopped.compareAndSet(false, true)) {
-                dispatchStoppedLatch.countDown();
-            }
-            serviceExceptionAsync(e);
-            return false;
-        }
-    }
-
-    /**
-     * Returns the statistics for this connection
-     */
-    public ConnectionStatistics getStatistics() {
-        return statistics;
-    }
-
-    public MessageAuthorizationPolicy getMessageAuthorizationPolicy() {
-        return messageAuthorizationPolicy;
-    }
-
-    public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy) {
-        this.messageAuthorizationPolicy = messageAuthorizationPolicy;
-    }
-
-    public boolean isManageable() {
-        return manageable;
-    }
-
-    public void start() throws Exception {
-        starting = true;
-        try {
-            synchronized (this) {
-                if (taskRunnerFactory != null) {
-                    taskRunner = taskRunnerFactory.createTaskRunner(this, "ActiveMQ Connection Dispatcher: "
-                            + getRemoteAddress());
-                } else {
-                    taskRunner = null;
-                }
-                transport.start();
-                active = true;
-                BrokerInfo info = connector.getBrokerInfo().copy();
-                if (connector.isUpdateClusterClients()) {
-                    info.setPeerBrokerInfos(this.broker.getPeerBrokerInfos());
-                } else {
-                    info.setPeerBrokerInfos(null);
-                }
-                dispatchAsync(info);
-                
-                connector.onStarted(this);
-            }
-        } catch (Exception e) {
-            // Force clean up on an error starting up.
-            stop();
-            throw e;
-        } finally {
-            // stop() can be called from within the above block,
-            // but we want to be sure start() completes before
-            // stop() runs, so queue the stop until right now:
-            starting = false;
-            if (pendingStop) {
-                LOG.debug("Calling the delayed stop()");
-                stop();
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        synchronized (this) {
-            pendingStop = true;
-            if (starting) {
-                LOG.debug("stop() called in the middle of start(). Delaying...");
-                return;
-            }
-        }
-        stopAsync();
-        while (!stopped.await(5, TimeUnit.SECONDS)) {
-            LOG.info("The connection to '" + transport.getRemoteAddress() + "' is taking a long time to shutdown.");
-        }
-    }
-
-    public void stopAsync() {
-        // If we're in the middle of starting
-        // then go no further... for now.
-        if (stopping.compareAndSet(false, true)) {
-            // Let all the connection contexts know we are shutting down
-            // so that in progress operations can notice and unblock.
-            List<TransportConnectionState> connectionStates = listConnectionStates();
-            for (TransportConnectionState cs : connectionStates) {
-                cs.getContext().getStopping().set(true);
-            }
-            try {
-                final Map context = MDCHelper.getCopyOfContextMap();
-                DefaultThreadPools.getDefaultTaskRunnerFactory().execute(new Runnable(){
-                    public void run() {
-                        serviceLock.writeLock().lock();
-                        try {
-                            MDCHelper.setContextMap(context);
-                            doStop();
-                        } catch (Throwable e) {
-                            LOG.debug("Error occured while shutting down a connection to '" + transport.getRemoteAddress()
-                                    + "': ", e);
-                        } finally {
-                            stopped.countDown();
-                            serviceLock.writeLock().unlock();
-                        }
-                    }
-                }, "StopAsync:" + transport.getRemoteAddress());
-            } catch (Throwable t) {
-                LOG.warn("cannot create async transport stopper thread.. not waiting for stop to complete, reason:", t);
-                stopped.countDown();
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "Transport Connection to: " + transport.getRemoteAddress();
-    }
-
-    protected void doStop() throws Exception, InterruptedException {
-        LOG.debug("Stopping connection: " + transport.getRemoteAddress());
-        connector.onStopped(this);
-        try {
-            synchronized (this) {
-                if (masterBroker != null) {
-                    masterBroker.stop();
-                }
-                if (duplexBridge != null) {
-                    duplexBridge.stop();
-                }
-            }
-        } catch (Exception ignore) {
-            LOG.trace("Exception caught stopping", ignore);
-        }
-        try {
-            transport.stop();
-            LOG.debug("Stopped transport: " + transport.getRemoteAddress());
-        } catch (Exception e) {
-            LOG.debug("Could not stop transport: " + e, e);
-        }
-        if (taskRunner != null) {
-            taskRunner.shutdown(1);
-        }
-        active = false;
-        // Run the MessageDispatch callbacks so that message references get
-        // cleaned up.
-        synchronized (dispatchQueue) {
-            for (Iterator<Command> iter = dispatchQueue.iterator(); iter.hasNext();) {
-                Command command = iter.next();
-                if (command.isMessageDispatch()) {
-                    MessageDispatch md = (MessageDispatch) command;
-                    Runnable sub = md.getTransmitCallback();
-                    broker.postProcessDispatch(md);
-                    if (sub != null) {
-                        sub.run();
-                    }
-                }
-            }
-            dispatchQueue.clear();
-        }
-        //
-        // Remove all logical connection associated with this connection
-        // from the broker.
-        if (!broker.isStopped()) {
-            List<TransportConnectionState> connectionStates = listConnectionStates();
-            connectionStates = listConnectionStates();
-            for (TransportConnectionState cs : connectionStates) {
-                cs.getContext().getStopping().set(true);
-                try {
-                    LOG.debug("Cleaning up connection resources: " + getRemoteAddress());
-                    processRemoveConnection(cs.getInfo().getConnectionId(), 0l);
-                } catch (Throwable ignore) {
-                    ignore.printStackTrace();
-                }
-            }
-        }
-        LOG.debug("Connection Stopped: " + getRemoteAddress());
-    }
-
-    /**
-     * @return Returns the blockedCandidate.
-     */
-    public boolean isBlockedCandidate() {
-        return blockedCandidate;
-    }
-
-    /**
-     * @param blockedCandidate
-     *            The blockedCandidate to set.
-     */
-    public void setBlockedCandidate(boolean blockedCandidate) {
-        this.blockedCandidate = blockedCandidate;
-    }
-
-    /**
-     * @return Returns the markedCandidate.
-     */
-    public boolean isMarkedCandidate() {
-        return markedCandidate;
-    }
-
-    /**
-     * @param markedCandidate
-     *            The markedCandidate to set.
-     */
-    public void setMarkedCandidate(boolean markedCandidate) {
-        this.markedCandidate = markedCandidate;
-        if (!markedCandidate) {
-            timeStamp = 0;
-            blockedCandidate = false;
-        }
-    }
-
-    /**
-     * @param slow
-     *            The slow to set.
-     */
-    public void setSlow(boolean slow) {
-        this.slow = slow;
-    }
-
-    /**
-     * @return true if the Connection is slow
-     */
-    public boolean isSlow() {
-        return slow;
-    }
-
-    /**
-     * @return true if the Connection is potentially blocked
-     */
-    public boolean isMarkedBlockedCandidate() {
-        return markedCandidate;
-    }
-
-    /**
-     * Mark the Connection, so we can deem if it's collectable on the next sweep
-     */
-    public void doMark() {
-        if (timeStamp == 0) {
-            timeStamp = System.currentTimeMillis();
-        }
-    }
-
-    /**
-     * @return if after being marked, the Connection is still writing
-     */
-    public boolean isBlocked() {
-        return blocked;
-    }
-
-    /**
-     * @return true if the Connection is connected
-     */
-    public boolean isConnected() {
-        return connected;
-    }
-
-    /**
-     * @param blocked
-     *            The blocked to set.
-     */
-    public void setBlocked(boolean blocked) {
-        this.blocked = blocked;
-    }
-
-    /**
-     * @param connected
-     *            The connected to set.
-     */
-    public void setConnected(boolean connected) {
-        this.connected = connected;
-    }
-
-    /**
-     * @return true if the Connection is active
-     */
-    public boolean isActive() {
-        return active;
-    }
-
-    /**
-     * @param active
-     *            The active to set.
-     */
-    public void setActive(boolean active) {
-        this.active = active;
-    }
-
-    /**
-     * @return true if the Connection is starting
-     */
-    public synchronized boolean isStarting() {
-        return starting;
-    }
-
-    public synchronized boolean isNetworkConnection() {
-        return networkConnection;
-    }
-    
-    public boolean isFaultTolerantConnection() {
-       return this.faultTolerantConnection;
-    }
-
-    protected synchronized void setStarting(boolean starting) {
-        this.starting = starting;
-    }
-
-    /**
-     * @return true if the Connection needs to stop
-     */
-    public synchronized boolean isPendingStop() {
-        return pendingStop;
-    }
-
-    protected synchronized void setPendingStop(boolean pendingStop) {
-        this.pendingStop = pendingStop;
-    }
-
-    public Response processBrokerInfo(BrokerInfo info) {
-        if (info.isSlaveBroker()) {
-            BrokerService bService = connector.getBrokerService();
-            // Do we only support passive slaves - or does the slave want to be
-            // passive ?
-            boolean passive = bService.isPassiveSlave() || info.isPassiveSlave();
-            if (passive == false) {
-                
-                // stream messages from this broker (the master) to
-                // the slave
-                MutableBrokerFilter parent = (MutableBrokerFilter) broker.getAdaptor(MutableBrokerFilter.class);
-                masterBroker = new MasterBroker(parent, transport);
-                masterBroker.startProcessing();
-            }
-            LOG.info((passive?"Passive":"Active")+" Slave Broker " + info.getBrokerName() + " is attached");
-            bService.slaveConnectionEstablished();
-        } else if (info.isNetworkConnection() && info.isDuplexConnection()) {
-            // so this TransportConnection is the rear end of a network bridge
-            // We have been requested to create a two way pipe ...
-            try {
-                Properties properties = MarshallingSupport.stringToProperties(info.getNetworkProperties());
-                Map<String, String> props = createMap(properties);
-                NetworkBridgeConfiguration config = new NetworkBridgeConfiguration();
-                IntrospectionSupport.setProperties(config, props, "");
-                config.setBrokerName(broker.getBrokerName());
-
-                // check for existing duplex connection hanging about
-
-                // We first look if existing network connection already exists for the same broker Id and network connector name
-                // It's possible in case of brief network fault to have this transport connector side of the connection always active
-                // and the duplex network connector side wanting to open a new one
-                // In this case, the old connection must be broken
-                String duplexNetworkConnectorId = config.getName() + "@" + info.getBrokerId(); 
-                CopyOnWriteArrayList<TransportConnection> connections = this.connector.getConnections();
-                synchronized (connections) {
-                    for (Iterator<TransportConnection> iter = connections.iterator(); iter.hasNext();) {
-                        TransportConnection c = iter.next();
-                        if ((c != this) && (duplexNetworkConnectorId.equals(c.getDuplexNetworkConnectorId()))) {
-                            LOG.warn("Stopping an existing active duplex connection [" + c + "] for network connector (" + duplexNetworkConnectorId + ").");
-                            c.stopAsync();
-                            // better to wait for a bit rather than get connection id already in use and failure to start new bridge
-                            c.getStopped().await(1, TimeUnit.SECONDS);
-                        }
-                    }
-                    setDuplexNetworkConnectorId(duplexNetworkConnectorId);
-                }
-                URI uri = broker.getVmConnectorURI();
-                HashMap<String, String> map = new HashMap<String, String>(URISupport.parseParameters(uri));
-                map.put("network", "true");
-                map.put("async", "false");
-                uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
-                Transport localTransport = TransportFactory.connect(uri);
-                Transport remoteBridgeTransport = new ResponseCorrelator(transport);
-                String duplexName = localTransport.toString();
-                if (duplexName.contains("#")) {
-                    duplexName = duplexName.substring(duplexName.lastIndexOf("#"));
-                }
-                MBeanNetworkListener listener = new MBeanNetworkListener(broker.getBrokerService(), broker.getBrokerService().createDuplexNetworkConnectorObjectName(duplexName));
-                listener.setCreatedByDuplex(true);
-                duplexBridge = NetworkBridgeFactory.createBridge(config, localTransport, remoteBridgeTransport, listener);
-                duplexBridge.setBrokerService(broker.getBrokerService());
-                // now turn duplex off this side
-                info.setDuplexConnection(false);
-                duplexBridge.setCreatedByDuplex(true);
-                duplexBridge.duplexStart(this, brokerInfo, info);
-                LOG.info("Started responder end of duplex bridge " + duplexNetworkConnectorId);
-                return null;
-            } catch (TransportDisposedIOException e) {
-                LOG.warn("Duplex bridge " + duplexNetworkConnectorId + " was stopped before it was correctly started.");
-                return null;
-            } catch (Exception e) {
-                LOG.error("Failed to create responder end of duplex network bridge " + duplexNetworkConnectorId , e);
-                return null;
-            }
-        }
-        // We only expect to get one broker info command per connection
-        if (this.brokerInfo != null) {
-            LOG.warn("Unexpected extra broker info command received: " + info);
-        }
-        this.brokerInfo = info;
-        networkConnection = true;
-        List<TransportConnectionState> connectionStates = listConnectionStates();
-        for (TransportConnectionState cs : connectionStates) {
-            cs.getContext().setNetworkConnection(true);
-        }
-        return null;
-    }
-
-    @SuppressWarnings("unchecked")
-    private HashMap<String, String> createMap(Properties properties) {
-        return new HashMap(properties);
-    }
-
-    protected void dispatch(Command command) throws IOException {
-        try {
-            setMarkedCandidate(true);
-            transport.oneway(command);
-        } finally {
-            setMarkedCandidate(false);
-        }
-    }
-
-    public String getRemoteAddress() {
-        return transport.getRemoteAddress();
-    }
-
-    public String getConnectionId() {
-        List<TransportConnectionState> connectionStates = listConnectionStates();
-        for (TransportConnectionState cs : connectionStates) {
-            if (cs.getInfo().getClientId() != null) {
-                return cs.getInfo().getClientId();
-            }
-            return cs.getInfo().getConnectionId().toString();
-        }
-        return null;
-    }
-        
-    public void updateClient(ConnectionControl control) {
-        if (isActive() && isBlocked() == false && isFaultTolerantConnection() && this.wireFormatInfo != null
-                && this.wireFormatInfo.getVersion() >= 6) {
-            dispatchAsync(control);
-        }
-    }
-
-    private ProducerBrokerExchange getProducerBrokerExchange(ProducerId id) throws IOException {
-        ProducerBrokerExchange result = producerExchanges.get(id);
-        if (result == null) {
-            synchronized (producerExchanges) {
-                result = new ProducerBrokerExchange();
-                TransportConnectionState state = lookupConnectionState(id);              
-                context = state.getContext();
-                if (context.isReconnect()) {
-                    result.setLastStoredSequenceId(broker.getBrokerService().getPersistenceAdapter().getLastProducerSequenceId(id));
-                }
-                result.setConnectionContext(context);
-                SessionState ss = state.getSessionState(id.getParentId());
-                if (ss != null) {
-                    result.setProducerState(ss.getProducerState(id));
-                    ProducerState producerState = ss.getProducerState(id);
-                    if (producerState != null && producerState.getInfo() != null) {
-                        ProducerInfo info = producerState.getInfo();
-                        result.setMutable(info.getDestination() == null || info.getDestination().isComposite());
-                    }
-                }
-                producerExchanges.put(id, result);
-            }
-        } else {
-            context = result.getConnectionContext();
-        }
-        return result;
-    }
-
-    private void removeProducerBrokerExchange(ProducerId id) {
-        synchronized (producerExchanges) {
-            producerExchanges.remove(id);
-        }
-    }
-
-    private ConsumerBrokerExchange getConsumerBrokerExchange(ConsumerId id) {
-        ConsumerBrokerExchange result = consumerExchanges.get(id);
-        if (result == null) {
-            synchronized (consumerExchanges) {
-                result = new ConsumerBrokerExchange();
-                TransportConnectionState state = lookupConnectionState(id);
-                context = state.getContext();
-                result.setConnectionContext(context);
-                SessionState ss = state.getSessionState(id.getParentId());
-                if (ss != null) {
-                    ConsumerState cs = ss.getConsumerState(id);
-                    if (cs != null) {
-                        ConsumerInfo info = cs.getInfo();
-                        if (info != null) {
-                            if (info.getDestination() != null && info.getDestination().isPattern()) {
-                                result.setWildcard(true);
-                            }
-                        }
-                    }
-                }
-                consumerExchanges.put(id, result);
-            }
-        }
-        return result;
-    }
-
-    private void removeConsumerBrokerExchange(ConsumerId id) {
-        synchronized (consumerExchanges) {
-            consumerExchanges.remove(id);
-        }
-    }
-
-    public int getProtocolVersion() {
-        return protocolVersion.get();
-    }
-
-    public Response processControlCommand(ControlCommand command) throws Exception {
-        String control = command.getCommand();
-        if (control != null && control.equals("shutdown")) {
-            System.exit(0);
-        }
-        return null;
-    }
-
-    public Response processMessageDispatch(MessageDispatch dispatch) throws Exception {
-        return null;
-    }
-
-    public Response processConnectionControl(ConnectionControl control) throws Exception {
-        if (control != null) {
-            faultTolerantConnection = control.isFaultTolerant();
-        }
-        return null;
-    }
-
-    public Response processConnectionError(ConnectionError error) throws Exception {
-        return null;
-    }
-
-    public Response processConsumerControl(ConsumerControl control) throws Exception {
-        ConsumerBrokerExchange consumerExchange = getConsumerBrokerExchange(control.getConsumerId());
-        broker.processConsumerControl(consumerExchange, control);
-        return null;
-    }
-
-    protected synchronized TransportConnectionState registerConnectionState(ConnectionId connectionId,
-            TransportConnectionState state) {
-        TransportConnectionState cs = null;
-        if (!connectionStateRegister.isEmpty() && !connectionStateRegister.doesHandleMultipleConnectionStates()) {
-            // swap implementations
-            TransportConnectionStateRegister newRegister = new MapTransportConnectionStateRegister();
-            newRegister.intialize(connectionStateRegister);
-            connectionStateRegister = newRegister;
-        }
-        cs = connectionStateRegister.registerConnectionState(connectionId, state);
-        return cs;
-    }
-
-    protected synchronized TransportConnectionState unregisterConnectionState(ConnectionId connectionId) {
-        return connectionStateRegister.unregisterConnectionState(connectionId);
-    }
-
-    protected synchronized List<TransportConnectionState> listConnectionStates() {
-        return connectionStateRegister.listConnectionStates();
-    }
-
-    protected synchronized TransportConnectionState lookupConnectionState(String connectionId) {
-        return connectionStateRegister.lookupConnectionState(connectionId);
-    }
-
-    protected synchronized TransportConnectionState lookupConnectionState(ConsumerId id) {
-        return connectionStateRegister.lookupConnectionState(id);
-    }
-
-    protected synchronized TransportConnectionState lookupConnectionState(ProducerId id) {
-        return connectionStateRegister.lookupConnectionState(id);
-    }
-
-    protected synchronized TransportConnectionState lookupConnectionState(SessionId id) {
-        return connectionStateRegister.lookupConnectionState(id);
-    }
-
-    protected synchronized TransportConnectionState lookupConnectionState(ConnectionId connectionId) {
-        return connectionStateRegister.lookupConnectionState(connectionId);
-    }
-
-    protected synchronized void setDuplexNetworkConnectorId(String duplexNetworkConnectorId) {
-        this.duplexNetworkConnectorId = duplexNetworkConnectorId;
-    }
-
-    protected synchronized String getDuplexNetworkConnectorId() {
-        return this.duplexNetworkConnectorId;
-    }
-    
-    protected CountDownLatch getStopped() {
-        return stopped;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnectionState.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnectionState.java
deleted file mode 100755
index e71e2b2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnectionState.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.activemq.command.ConnectionInfo;
-
-/**
- * 
- */
-
-public class TransportConnectionState extends org.apache.activemq.state.ConnectionState {
-
-    private ConnectionContext context;
-    private TransportConnection connection;
-    private AtomicInteger referenceCounter = new AtomicInteger();
-    private final Object connectionMutex = new Object();
-
-    public TransportConnectionState(ConnectionInfo info, TransportConnection transportConnection) {
-        super(info);
-        connection = transportConnection;
-    }
-
-    public ConnectionContext getContext() {
-        return context;
-    }
-
-    public TransportConnection getConnection() {
-        return connection;
-    }
-
-    public void setContext(ConnectionContext context) {
-        this.context = context;
-    }
-
-    public void setConnection(TransportConnection connection) {
-        this.connection = connection;
-    }
-
-    public int incrementReference() {
-        return referenceCounter.incrementAndGet();
-    }
-
-    public int decrementReference() {
-        return referenceCounter.decrementAndGet();
-    }
-
-	public AtomicInteger getReferenceCounter() {
-		return referenceCounter;
-	}
-
-	public void setReferenceCounter(AtomicInteger referenceCounter) {
-		this.referenceCounter = referenceCounter;
-	}
-
-	public Object getConnectionMutex() {
-		return connectionMutex;
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnectionStateRegister.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnectionStateRegister.java
deleted file mode 100755
index 3c8e6f8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnectionStateRegister.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SessionId;
-
-/**
- * 
- */
-
-public interface TransportConnectionStateRegister{
-
-    TransportConnectionState registerConnectionState(ConnectionId connectionId,
-                                                               TransportConnectionState state);
-    
-    TransportConnectionState unregisterConnectionState(ConnectionId connectionId);
-
-    List<TransportConnectionState> listConnectionStates();
-    
-    Map<ConnectionId,TransportConnectionState>mapStates();
-    
-    TransportConnectionState lookupConnectionState(String connectionId);
-    
-    TransportConnectionState lookupConnectionState(ConsumerId id);
-    
-    TransportConnectionState lookupConnectionState(ProducerId id);
-    
-    TransportConnectionState lookupConnectionState(SessionId id);
-
-    TransportConnectionState lookupConnectionState(ConnectionId connectionId);
-        
-    boolean isEmpty();
-    
-    boolean doesHandleMultipleConnectionStates();
-    
-    void intialize(TransportConnectionStateRegister other);
-    
-    void clear();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
deleted file mode 100755
index 5828bb4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
+++ /dev/null
@@ -1,555 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.regex.Pattern;
-import javax.management.ObjectName;
-import org.apache.activemq.broker.jmx.ManagedTransportConnector;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.broker.region.ConnectorStatistics;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.security.MessageAuthorizationPolicy;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
-import org.apache.activemq.util.MDCHelper;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @org.apache.xbean.XBean
- * 
- */
-public class TransportConnector implements Connector, BrokerServiceAware {
-
-    final Logger LOG = LoggerFactory.getLogger(TransportConnector.class);
-
-    protected CopyOnWriteArrayList<TransportConnection> connections = new CopyOnWriteArrayList<TransportConnection>();
-    protected TransportStatusDetector statusDector;
-    private BrokerService brokerService;
-    private TransportServer server;
-    private URI uri;
-    private BrokerInfo brokerInfo = new BrokerInfo();
-    private TaskRunnerFactory taskRunnerFactory;
-    private MessageAuthorizationPolicy messageAuthorizationPolicy;
-    private DiscoveryAgent discoveryAgent;
-    private final ConnectorStatistics statistics = new ConnectorStatistics();
-    private URI discoveryUri;
-    private URI connectUri;
-    private String name;
-    private boolean disableAsyncDispatch;
-    private boolean enableStatusMonitor = false;
-    private Broker broker;
-    private boolean updateClusterClients = false;
-    private boolean rebalanceClusterClients;
-    private boolean updateClusterClientsOnRemove = false;
-    private String updateClusterFilter;
-
-    public TransportConnector() {
-    }
-
-    public TransportConnector(TransportServer server) {
-        this();
-        setServer(server);
-        if (server != null && server.getConnectURI() != null) {
-            URI uri = server.getConnectURI();
-            if (uri != null && uri.getScheme().equals("vm")) {
-                setEnableStatusMonitor(false);
-            }
-        }
-
-    }
-
-    /**
-     * @return Returns the connections.
-     */
-    public CopyOnWriteArrayList<TransportConnection> getConnections() {
-        return connections;
-    }
-
-    /**
-     * Factory method to create a JMX managed version of this transport
-     * connector
-     */
-    public ManagedTransportConnector asManagedConnector(ManagementContext context, ObjectName connectorName)
-            throws IOException, URISyntaxException {
-        ManagedTransportConnector rc = new ManagedTransportConnector(context, connectorName, getServer());
-        rc.setBrokerInfo(getBrokerInfo());
-        rc.setConnectUri(getConnectUri());
-        rc.setDisableAsyncDispatch(isDisableAsyncDispatch());
-        rc.setDiscoveryAgent(getDiscoveryAgent());
-        rc.setDiscoveryUri(getDiscoveryUri());
-        rc.setEnableStatusMonitor(isEnableStatusMonitor());
-        rc.setMessageAuthorizationPolicy(getMessageAuthorizationPolicy());
-        rc.setName(getName());
-        rc.setTaskRunnerFactory(getTaskRunnerFactory());
-        rc.setUri(getUri());
-        rc.setBrokerService(brokerService);
-        rc.setUpdateClusterClients(isUpdateClusterClients());
-        rc.setRebalanceClusterClients(isRebalanceClusterClients());
-        rc.setUpdateClusterFilter(getUpdateClusterFilter());
-        rc.setUpdateClusterClientsOnRemove(isUpdateClusterClientsOnRemove());
-        return rc;
-    }
-
-    public BrokerInfo getBrokerInfo() {
-        return brokerInfo;
-    }
-
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-        this.brokerInfo = brokerInfo;
-    }
-
-    /**
-     * 
-     * @deprecated use the {@link #setBrokerService(BrokerService)} method
-     *             instead.
-     */
-    @Deprecated
-    public void setBrokerName(String name) {
-        if (this.brokerInfo == null) {
-            this.brokerInfo = new BrokerInfo();
-        }
-        this.brokerInfo.setBrokerName(name);
-    }
-
-    public TransportServer getServer() throws IOException, URISyntaxException {
-        if (server == null) {
-            setServer(createTransportServer());
-        }
-        return server;
-    }
-
-    public void setServer(TransportServer server) {
-        this.server = server;
-    }
-
-    public URI getUri() {
-        if (uri == null) {
-            try {
-                uri = getConnectUri();
-            } catch (Throwable e) {
-            }
-        }
-        return uri;
-    }
-
-    /**
-     * Sets the server transport URI to use if there is not a
-     * {@link TransportServer} configured via the
-     * {@link #setServer(TransportServer)} method. This value is used to lazy
-     * create a {@link TransportServer} instance
-     * 
-     * @param uri
-     */
-    public void setUri(URI uri) {
-        this.uri = uri;
-    }
-
-    public TaskRunnerFactory getTaskRunnerFactory() {
-        return taskRunnerFactory;
-    }
-
-    public void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory) {
-        this.taskRunnerFactory = taskRunnerFactory;
-    }
-
-    /**
-     * @return the statistics for this connector
-     */
-    public ConnectorStatistics getStatistics() {
-        return statistics;
-    }
-
-    public MessageAuthorizationPolicy getMessageAuthorizationPolicy() {
-        return messageAuthorizationPolicy;
-    }
-
-    /**
-     * Sets the policy used to decide if the current connection is authorized to
-     * consume a given message
-     */
-    public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy) {
-        this.messageAuthorizationPolicy = messageAuthorizationPolicy;
-    }
-
-    public void start() throws Exception {
-        broker = brokerService.getBroker();
-        brokerInfo.setBrokerName(broker.getBrokerName());
-        brokerInfo.setBrokerId(broker.getBrokerId());
-        brokerInfo.setPeerBrokerInfos(broker.getPeerBrokerInfos());
-        brokerInfo.setFaultTolerantConfiguration(broker.isFaultTolerantConfiguration());
-        brokerInfo.setBrokerURL(getServer().getConnectURI().toString());
-        final Map context = MDCHelper.getCopyOfContextMap();
-        getServer().setAcceptListener(new TransportAcceptListener() {
-            public void onAccept(final Transport transport) {
-                try {
-                    DefaultThreadPools.getDefaultTaskRunnerFactory().execute(new Runnable() {
-                        public void run() {
-                            MDCHelper.setContextMap(context);
-                            try {
-                                Connection connection = createConnection(transport);
-                                connection.start();
-                            } catch (Exception e) {
-                                ServiceSupport.dispose(transport);
-                                onAcceptError(e);
-                            }
-                        }
-                    });
-                } catch (Exception e) {
-                    String remoteHost = transport.getRemoteAddress();
-                    ServiceSupport.dispose(transport);
-                    onAcceptError(e, remoteHost);
-                }
-            }
-
-            public void onAcceptError(Exception error) {
-                onAcceptError(error, null);
-            }
-
-            private void onAcceptError(Exception error, String remoteHost) {
-                LOG.error("Could not accept connection " + (remoteHost == null ? "" : "from " + remoteHost) + ": "
-                        + error);
-                LOG.debug("Reason: " + error, error);
-            }
-        });
-        getServer().setBrokerInfo(brokerInfo);
-        getServer().start();
-
-        DiscoveryAgent da = getDiscoveryAgent();
-        if (da != null) {
-            da.registerService(getPublishableConnectString());
-            da.start();
-        }
-        if (enableStatusMonitor) {
-            this.statusDector = new TransportStatusDetector(this);
-            this.statusDector.start();
-        }
-
-        LOG.info("Connector " + getName() + " Started");
-    }
-
-    public String getPublishableConnectString() throws Exception {
-        String publishableConnectString = null;
-        URI theConnectURI = getConnectUri();
-        if (theConnectURI != null) {
-            publishableConnectString = theConnectURI.toString();
-            // strip off server side query parameters which may not be compatible to
-            // clients
-            if (theConnectURI.getRawQuery() != null) {
-                publishableConnectString = publishableConnectString.substring(0, publishableConnectString
-                        .indexOf(theConnectURI.getRawQuery()) - 1);
-            }
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Publishing: " + publishableConnectString + " for broker transport URI: " + theConnectURI);
-        }
-        return publishableConnectString;
-    }
-
-    public void stop() throws Exception {
-        ServiceStopper ss = new ServiceStopper();
-        if (discoveryAgent != null) {
-            ss.stop(discoveryAgent);
-        }
-        if (server != null) {
-            ss.stop(server);
-            server = null;
-        }
-        if (this.statusDector != null) {
-            this.statusDector.stop();
-        }
-
-        for (Iterator<TransportConnection> iter = connections.iterator(); iter.hasNext();) {
-            TransportConnection c = iter.next();
-            ss.stop(c);
-        }
-        ss.throwFirstException();
-        LOG.info("Connector " + getName() + " Stopped");
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected Connection createConnection(Transport transport) throws IOException {
-        TransportConnection answer = new TransportConnection(this, transport, broker, disableAsyncDispatch ? null
-                : taskRunnerFactory);
-        boolean statEnabled = this.getStatistics().isEnabled();
-        answer.getStatistics().setEnabled(statEnabled);
-        answer.setMessageAuthorizationPolicy(messageAuthorizationPolicy);
-        return answer;
-    }
-
-    protected TransportServer createTransportServer() throws IOException, URISyntaxException {
-        if (uri == null) {
-            throw new IllegalArgumentException("You must specify either a server or uri property");
-        }
-        if (brokerService == null) {
-            throw new IllegalArgumentException(
-                    "You must specify the brokerService property. Maybe this connector should be added to a broker?");
-        }
-        return TransportFactory.bind(brokerService, uri);
-    }
-
-    public DiscoveryAgent getDiscoveryAgent() throws IOException {
-        if (discoveryAgent == null) {
-            discoveryAgent = createDiscoveryAgent();
-        }
-        return discoveryAgent;
-    }
-
-    protected DiscoveryAgent createDiscoveryAgent() throws IOException {
-        if (discoveryUri != null) {
-            return DiscoveryAgentFactory.createDiscoveryAgent(discoveryUri);
-        }
-        return null;
-    }
-
-    public void setDiscoveryAgent(DiscoveryAgent discoveryAgent) {
-        this.discoveryAgent = discoveryAgent;
-    }
-
-    public URI getDiscoveryUri() {
-        return discoveryUri;
-    }
-
-    public void setDiscoveryUri(URI discoveryUri) {
-        this.discoveryUri = discoveryUri;
-    }
-
-    public URI getConnectUri() throws IOException, URISyntaxException {
-        if (connectUri == null) {
-            if (server != null) {
-                connectUri = server.getConnectURI();
-            }
-        }
-        return connectUri;
-    }
-
-    public void setConnectUri(URI transportUri) {
-        this.connectUri = transportUri;
-    }
-
-    public void onStarted(TransportConnection connection) {
-        connections.add(connection);
-    }
-
-    public void onStopped(TransportConnection connection) {
-        connections.remove(connection);
-    }
-
-    public String getName() {
-        if (name == null) {
-            uri = getUri();
-            if (uri != null) {
-                name = uri.toString();
-            }
-        }
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String toString() {
-        String rc = getName();
-        if (rc == null) {
-            rc = super.toString();
-        }
-        return rc;
-    }
-
-    protected ConnectionControl getConnectionControl() {
-        boolean rebalance = isRebalanceClusterClients();
-        String connectedBrokers = "";
-        String self = "";
-
-        if (isUpdateClusterClients()) {
-            if (brokerService.getDefaultSocketURIString() != null) {
-                self += brokerService.getDefaultSocketURIString();
-                self += ",";
-            }
-            if (rebalance == false) {
-                connectedBrokers += self;
-            }
-            if (this.broker.getPeerBrokerInfos() != null) {
-                for (BrokerInfo info : this.broker.getPeerBrokerInfos()) {
-                    if (isMatchesClusterFilter(info.getBrokerName())) {
-                        connectedBrokers += info.getBrokerURL();
-                        connectedBrokers += ",";
-                    }
-                }
-            }
-            if (rebalance) {
-                connectedBrokers += self;
-            }
-        }
-
-        ConnectionControl control = new ConnectionControl();
-        control.setConnectedBrokers(connectedBrokers);
-        control.setRebalanceConnection(rebalance);
-        return control;
-
-    }
-
-    public void updateClientClusterInfo() {
-        if (isRebalanceClusterClients() || isUpdateClusterClients()) {
-            ConnectionControl control = getConnectionControl();
-            for (Connection c : this.connections) {
-                c.updateClient(control);
-            }
-        }
-    }
-
-    private boolean isMatchesClusterFilter(String brokerName) {
-        boolean result = true;
-        String filter = getUpdateClusterFilter();
-        if (filter != null) {
-            filter = filter.trim();
-            if (filter.length() > 0) {
-                StringTokenizer tokenizer = new StringTokenizer(filter, ",");
-                while (result && tokenizer.hasMoreTokens()) {
-                    String token = tokenizer.nextToken();
-                    result = isMatchesClusterFilter(brokerName, token);
-                }
-            }
-        }
-        return result;
-    }
-
-    private boolean isMatchesClusterFilter(String brokerName, String match) {
-        boolean result = true;
-        if (brokerName != null && match != null && brokerName.length() > 0 && match.length() > 0) {
-            result = Pattern.matches(match, brokerName);
-        }
-        return result;
-    }
-
-    public boolean isDisableAsyncDispatch() {
-        return disableAsyncDispatch;
-    }
-
-    public void setDisableAsyncDispatch(boolean disableAsyncDispatch) {
-        this.disableAsyncDispatch = disableAsyncDispatch;
-    }
-
-    /**
-     * @return the enableStatusMonitor
-     */
-    public boolean isEnableStatusMonitor() {
-        return enableStatusMonitor;
-    }
-
-    /**
-     * @param enableStatusMonitor
-     *            the enableStatusMonitor to set
-     */
-    public void setEnableStatusMonitor(boolean enableStatusMonitor) {
-        this.enableStatusMonitor = enableStatusMonitor;
-    }
-
-    /**
-     * This is called by the BrokerService right before it starts the transport.
-     */
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerService = brokerService;
-    }
-
-    public Broker getBroker() {
-        return broker;
-    }
-
-    public BrokerService getBrokerService() {
-        return brokerService;
-    }
-
-    /**
-     * @return the updateClusterClients
-     */
-    public boolean isUpdateClusterClients() {
-        return this.updateClusterClients;
-    }
-
-    /**
-     * @param updateClusterClients
-     *            the updateClusterClients to set
-     */
-    public void setUpdateClusterClients(boolean updateClusterClients) {
-        this.updateClusterClients = updateClusterClients;
-    }
-
-    /**
-     * @return the rebalanceClusterClients
-     */
-    public boolean isRebalanceClusterClients() {
-        return this.rebalanceClusterClients;
-    }
-
-    /**
-     * @param rebalanceClusterClients
-     *            the rebalanceClusterClients to set
-     */
-    public void setRebalanceClusterClients(boolean rebalanceClusterClients) {
-        this.rebalanceClusterClients = rebalanceClusterClients;
-    }
- 
-    /**
-     * @return the updateClusterClientsOnRemove
-     */
-    public boolean isUpdateClusterClientsOnRemove() {
-        return this.updateClusterClientsOnRemove;
-    }
-
-    /**
-     * @param updateClusterClientsOnRemove the updateClusterClientsOnRemove to set
-     */
-    public void setUpdateClusterClientsOnRemove(boolean updateClusterClientsOnRemove) {
-        this.updateClusterClientsOnRemove = updateClusterClientsOnRemove;
-    }
-    
-    /**
-     * @return the updateClusterFilter
-     */
-    public String getUpdateClusterFilter() {
-        return this.updateClusterFilter;
-    }
-
-    /**
-     * @param updateClusterFilter
-     *            the updateClusterFilter to set
-     */
-    public void setUpdateClusterFilter(String updateClusterFilter) {
-        this.updateClusterFilter = updateClusterFilter;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java
deleted file mode 100755
index 0e0db7e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.ThreadPriorities;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Used to provide information on the status of the Connection
- * 
- * 
- */
-public class TransportStatusDetector implements Service, Runnable {
-    private static final Logger LOG = LoggerFactory.getLogger(TransportStatusDetector.class);
-    private TransportConnector connector;
-    private Set<TransportConnection> collectionCandidates = new CopyOnWriteArraySet<TransportConnection>();
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private Thread runner;
-    private int sweepInterval = 5000;
-
-    TransportStatusDetector(TransportConnector connector) {
-        this.connector = connector;
-    }
-
-    /**
-     * @return Returns the sweepInterval.
-     */
-    public int getSweepInterval() {
-        return sweepInterval;
-    }
-
-    /**
-     * The sweepInterval to set.
-     * 
-     * @param sweepInterval
-     */
-    public void setSweepInterval(int sweepInterval) {
-        this.sweepInterval = sweepInterval;
-    }
-
-    protected void doCollection() {
-        for (Iterator<TransportConnection> i = collectionCandidates.iterator(); i.hasNext();) {
-            TransportConnection tc = i.next();
-            if (tc.isMarkedCandidate()) {
-                if (tc.isBlockedCandidate()) {
-                    collectionCandidates.remove(tc);
-                    doCollection(tc);
-                } else {
-                    tc.doMark();
-                }
-            } else {
-                collectionCandidates.remove(tc);
-            }
-        }
-    }
-
-    protected void doSweep() {
-        for (Iterator i = connector.getConnections().iterator(); i.hasNext();) {
-            TransportConnection connection = (TransportConnection)i.next();
-            if (connection.isMarkedCandidate()) {
-                connection.doMark();
-                collectionCandidates.add(connection);
-            }
-        }
-    }
-
-    protected void doCollection(TransportConnection tc) {
-        LOG.warn("found a blocked client - stopping: " + tc);
-        try {
-            tc.stop();
-        } catch (Exception e) {
-            LOG.error("Error stopping " + tc, e);
-        }
-    }
-
-    public void run() {
-        while (started.get()) {
-            try {
-                doCollection();
-                doSweep();
-                Thread.sleep(sweepInterval);
-            } catch (Throwable e) {
-                LOG.error("failed to complete a sweep for blocked clients", e);
-            }
-        }
-    }
-
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-            runner = new Thread(this, "ActiveMQ Transport Status Monitor: " + connector);
-            runner.setDaemon(true);
-            runner.setPriority(ThreadPriorities.BROKER_MANAGEMENT);
-            runner.start();
-        }
-    }
-
-    public void stop() throws Exception {
-        started.set(false);
-        if (runner != null) {
-            runner.join(getSweepInterval() * 5);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/UserIDBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/UserIDBroker.java
deleted file mode 100644
index 2d5dea5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/UserIDBroker.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.Set;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.jaas.UserPrincipal;
-import org.apache.activemq.security.SecurityContext;
-
-/**
- * This broker filter will append the producer's user ID into the JMSXUserID header
- * to allow folks to know reliably who the user was who produced a message.
- * Note that you cannot trust the client, especially if working over the internet
- * as they can spoof headers to be anything they like.
- * 
- * 
- */
-public class UserIDBroker extends BrokerFilter {
-    boolean useAuthenticatePrincipal = false;
-    public UserIDBroker(Broker next) {
-        super(next);
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        final ConnectionContext context = producerExchange.getConnectionContext();
-        String userID = context.getUserName();
-        if (isUseAuthenticatePrincipal()) {
-            SecurityContext securityContext = context.getSecurityContext();
-            if (securityContext != null) {
-                Set<?> principals = securityContext.getPrincipals();
-                if (principals != null) {
-                    for (Object candidate : principals) {
-                        if (candidate instanceof UserPrincipal) {
-                            userID = ((UserPrincipal)candidate).getName();
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-        messageSend.setUserID(userID);
-        super.send(producerExchange, messageSend);
-    }
-
-
-    public boolean isUseAuthenticatePrincipal() {
-        return useAuthenticatePrincipal;
-    }
-
-    public void setUseAuthenticatePrincipal(boolean useAuthenticatePrincipal) {
-        this.useAuthenticatePrincipal = useAuthenticatePrincipal;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
deleted file mode 100644
index fc206d5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/cluster/ConnectionSplitBroker.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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.broker.cluster;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Monitors for client connections that may fail to another broker - but this
- * broker isn't aware they've gone. Can occur with network glitches or client
- * error
- * 
- * 
- */
-public class ConnectionSplitBroker extends BrokerFilter{
-    private static final Logger LOG = LoggerFactory.getLogger(ConnectionSplitBroker.class);
-    private List<ConsumerInfo>networkConsumerList = new ArrayList<ConsumerInfo>();
-    public ConnectionSplitBroker(Broker next) {
-        super(next);
-    }
-
-        
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info)
-            throws Exception {
-        ActiveMQDestination dest = info.getDestination();
-
-        synchronized (networkConsumerList) {
-            if (info.isNetworkSubscription()) {
-                networkConsumerList.add(info);
-            } else {
-                if (!networkConsumerList.isEmpty()) {
-                    List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>();
-                    for (ConsumerInfo nc : networkConsumerList) {
-                        if (!nc.isNetworkConsumersEmpty()) {
-                            
-                            for (ConsumerId id : nc.getNetworkConsumerIds()) {
-                                
-                                if (id.equals(info.getConsumerId())) {
-                                    nc.removeNetworkConsumerId(id);
-                                    if (nc.isNetworkConsumersEmpty()) {
-                                        gcList.add(nc);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    for (ConsumerInfo nc : gcList) {
-                        networkConsumerList.remove(nc);
-                        super.removeConsumer(context, nc);
-                        LOG.warn("Removed stale network consumer " + nc);
-                    }
-                }
-            }
-        }
-
-        return super.addConsumer(context, info);
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        if (info.isNetworkSubscription()) {
-
-            synchronized (networkConsumerList) {
-                networkConsumerList.remove(info);
-            }
-        }
-        super.removeConsumer(context, info);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java
deleted file mode 100755
index 1738857..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/**
- * 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.broker.ft;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.broker.Connection;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.InsertableMutableBrokerFilter;
-import org.apache.activemq.broker.MutableBrokerFilter;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.transport.MutexTransport;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.Transport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The Message Broker which passes messages to a slave
- * 
- * 
- */
-public class MasterBroker extends InsertableMutableBrokerFilter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MasterBroker.class);
-    private Transport slave;
-    private AtomicBoolean started = new AtomicBoolean(false);
-
-    private Map<ConsumerId, ConsumerId> consumers = new ConcurrentHashMap<ConsumerId, ConsumerId>();
-    
-    /**
-     * Constructor
-     * 
-     * @param parent
-     * @param transport
-     */
-    public MasterBroker(MutableBrokerFilter parent, Transport transport) {
-        super(parent);
-        this.slave = transport;
-        this.slave = new MutexTransport(slave);
-        this.slave = new ResponseCorrelator(slave);
-        this.slave.setTransportListener(transport.getTransportListener());
-    }
-
-    /**
-     * start processing this broker
-     */
-    public void startProcessing() {
-        started.set(true);
-        try {
-            Connection[] connections = getClients();
-            ConnectionControl command = new ConnectionControl();
-            command.setFaultTolerant(true);
-            if (connections != null) {
-                for (int i = 0; i < connections.length; i++) {
-                    if (connections[i].isActive() && connections[i].isManageable()) {
-                        connections[i].dispatchAsync(command);
-                    }
-                }
-            }
-        } catch (Exception e) {
-            LOG.error("Failed to get Connections", e);
-        }
-    }
-
-    /**
-     * stop the broker
-     * 
-     * @throws Exception
-     */
-    public void stop() throws Exception {
-        stopProcessing();
-    }
-
-    /**
-     * stop processing this broker
-     */
-    public void stopProcessing() {
-        if (started.compareAndSet(true, false)) {
-            remove();
-        }
-    }
-
-    /**
-     * A client is establishing a connection with the broker.
-     * 
-     * @param context
-     * @param info
-     * @throws Exception
-     */
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        super.addConnection(context, info);
-        sendAsyncToSlave(info);
-    }
-
-    /**
-     * A client is disconnecting from the broker.
-     * 
-     * @param context the environment the operation is being executed under.
-     * @param info
-     * @param error null if the client requested the disconnect or the error
-     *                that caused the client to disconnect.
-     * @throws Exception
-     */
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        super.removeConnection(context, info, error);
-        sendAsyncToSlave(new RemoveInfo(info.getConnectionId()));
-    }
-
-    /**
-     * Adds a session.
-     * 
-     * @param context
-     * @param info
-     * @throws Exception
-     */
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-        super.addSession(context, info);
-        sendAsyncToSlave(info);
-    }
-
-    /**
-     * Removes a session.
-     * 
-     * @param context
-     * @param info
-     * @throws Exception
-     */
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-        super.removeSession(context, info);
-        sendAsyncToSlave(new RemoveInfo(info.getSessionId()));
-    }
-
-    /**
-     * Adds a producer.
-     * 
-     * @param context the enviorment the operation is being executed under.
-     * @param info
-     * @throws Exception
-     */
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        super.addProducer(context, info);
-        sendAsyncToSlave(info);
-    }
-
-    /**
-     * Removes a producer.
-     * 
-     * @param context the environment the operation is being executed under.
-     * @param info
-     * @throws Exception
-     */
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        super.removeProducer(context, info);
-        sendAsyncToSlave(new RemoveInfo(info.getProducerId()));
-    }
-
-    /**
-     * add a consumer
-     * 
-     * @param context
-     * @param info
-     * @return the associated subscription
-     * @throws Exception
-     */
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        sendSyncToSlave(info);
-        consumers.put(info.getConsumerId(), info.getConsumerId());
-        return super.addConsumer(context, info);
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info)
-            throws Exception {
-        super.removeConsumer(context, info);
-        consumers.remove(info.getConsumerId());
-        sendSyncToSlave(new RemoveInfo(info.getConsumerId()));
-   }
-
-    /**
-     * remove a subscription
-     * 
-     * @param context
-     * @param info
-     * @throws Exception
-     */
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        super.removeSubscription(context, info);
-        sendAsyncToSlave(info);
-    }
-    
-    @Override
-    public void addDestinationInfo(ConnectionContext context,
-            DestinationInfo info) throws Exception {
-        super.addDestinationInfo(context, info);
-        if (info.getDestination().isTemporary()) {
-            sendAsyncToSlave(info);
-        }
-    }
-
-    @Override
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        super.removeDestinationInfo(context, info);
-        if (info.getDestination().isTemporary()) {
-            sendAsyncToSlave(info);
-        }
-    }
-    
-    /**
-     * begin a transaction
-     * 
-     * @param context
-     * @param xid
-     * @throws Exception
-     */
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        TransactionInfo info = new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.BEGIN);
-        sendAsyncToSlave(info);
-        super.beginTransaction(context, xid);
-    }
-
-    /**
-     * Prepares a transaction. Only valid for xa transactions.
-     * 
-     * @param context
-     * @param xid
-     * @return the state
-     * @throws Exception
-     */
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        TransactionInfo info = new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.PREPARE);
-        sendSyncToSlave(info);
-        int result = super.prepareTransaction(context, xid);
-        return result;
-    }
-
-    /**
-     * Rollsback a transaction.
-     * 
-     * @param context
-     * @param xid
-     * @throws Exception
-     */
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        TransactionInfo info = new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.ROLLBACK);
-        sendAsyncToSlave(info);
-        super.rollbackTransaction(context, xid);
-    }
-
-    /**
-     * Commits a transaction.
-     * 
-     * @param context
-     * @param xid
-     * @param onePhase
-     * @throws Exception
-     */
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        TransactionInfo info = new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.COMMIT_ONE_PHASE);
-        sendSyncToSlave(info);
-        super.commitTransaction(context, xid, onePhase);
-    }
-
-    /**
-     * Forgets a transaction.
-     * 
-     * @param context
-     * @param xid
-     * @throws Exception
-     */
-    public void forgetTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        TransactionInfo info = new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.FORGET);
-        sendAsyncToSlave(info);
-        super.forgetTransaction(context, xid);
-    }
-
-    /**
-     * Notifiy the Broker that a dispatch will happen
-     * Do in 'pre' so that slave will avoid getting ack before dispatch
-     * similar logic to send() below.
-     * @param messageDispatch
-     */
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-        super.preProcessDispatch(messageDispatch);
-        MessageDispatchNotification mdn = new MessageDispatchNotification();
-        mdn.setConsumerId(messageDispatch.getConsumerId());
-        mdn.setDeliverySequenceId(messageDispatch.getDeliverySequenceId());
-        mdn.setDestination(messageDispatch.getDestination());
-        if (messageDispatch.getMessage() != null) {
-            Message msg = messageDispatch.getMessage();
-            mdn.setMessageId(msg.getMessageId());
-            if (consumers.containsKey(messageDispatch.getConsumerId())) {
-                sendSyncToSlave(mdn);
-            }
-        }
-    }
-
-    /**
-     * @param context
-     * @param message
-     * @throws Exception
-     */
-    public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception {
-        /**
-         * A message can be dispatched before the super.send() method returns so -
-         * here the order is switched to avoid problems on the slave with
-         * receiving acks for messages not received yet
-         * copy ensures we don't mess with the correlator and command ids
-         */
-        sendSyncToSlave(message.copy());
-        super.send(producerExchange, message);
-    }
-
-    /**
-     * @param context
-     * @param ack
-     * @throws Exception
-     */
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        sendToSlave(ack);
-        super.acknowledge(consumerExchange, ack);
-    }
-
-    public boolean isFaultTolerantConfiguration() {
-        return true;
-    }
-
-    protected void sendToSlave(Message message) {
-        if (message.isResponseRequired()) {
-            sendSyncToSlave(message);
-        } else {
-            sendAsyncToSlave(message);
-        }
-    }
-
-    protected void sendToSlave(MessageAck ack) {
-        if (ack.isResponseRequired()) {
-            sendAsyncToSlave(ack);
-        } else {
-            sendSyncToSlave(ack);
-        }
-    }
-
-    protected void sendAsyncToSlave(Command command) {
-        try {
-            slave.oneway(command);
-        } catch (Throwable e) {
-            LOG.error("Slave Failed", e);
-            stopProcessing();
-        }
-    }
-
-    protected void sendSyncToSlave(Command command) {
-        try {
-            Response response = (Response)slave.request(command);
-            if (response.isException()) {
-                ExceptionResponse er = (ExceptionResponse)response;
-                LOG.error("Slave Failed", er.getException());
-            }
-        } catch (Throwable e) {
-            LOG.error("Slave Failed", e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
deleted file mode 100644
index f0e7e3a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/**
- * 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.broker.ft;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportDisposedIOException;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Connects a Slave Broker to a Master when using <a
- * href="http://activemq.apache.org/masterslave.html">Master Slave</a> for High
- * Availability of messages.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class MasterConnector implements Service, BrokerServiceAware {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MasterConnector.class);
-    private BrokerService broker;
-    private URI remoteURI;
-    private URI localURI;
-    private Transport localBroker;
-    private Transport remoteBroker;
-    private TransportConnector connector;
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private AtomicBoolean stoppedBeforeStart = new AtomicBoolean(false);
-    private final IdGenerator idGenerator = new IdGenerator();
-    private String userName;
-    private String password;
-    private ConnectionInfo connectionInfo;
-    private SessionInfo sessionInfo;
-    private ProducerInfo producerInfo;
-    private final AtomicBoolean masterActive = new AtomicBoolean();
-    private BrokerInfo brokerInfo;
-    private boolean firstConnection=true;
-    private boolean failedToStart;
-
-    public MasterConnector() {
-    }
-
-    public MasterConnector(String remoteUri) throws URISyntaxException {
-        remoteURI = new URI(remoteUri);
-    }
-
-    public void setBrokerService(BrokerService broker) {
-        this.broker = broker;
-        if (localURI == null) {
-            localURI = broker.getVmConnectorURI();
-        }
-        if (connector == null) {
-            List transportConnectors = broker.getTransportConnectors();
-            if (!transportConnectors.isEmpty()) {
-                connector = (TransportConnector)transportConnectors.get(0);
-            }
-        }
-    }
-
-    public boolean isSlave() {
-        return masterActive.get();
-    }
-
-    protected void restartBridge() throws Exception {
-        localBroker.oneway(connectionInfo);
-        remoteBroker.oneway(connectionInfo);
-        localBroker.oneway(sessionInfo);
-        remoteBroker.oneway(sessionInfo);
-        remoteBroker.oneway(producerInfo);
-        remoteBroker.oneway(brokerInfo);
-    }
-    
-    public void start() throws Exception {
-        if (!started.compareAndSet(false, true)) {
-            return;
-        }
-        if (remoteURI == null) {
-            throw new IllegalArgumentException("You must specify a remoteURI");
-        }
-        localBroker = TransportFactory.connect(localURI);
-        remoteBroker = TransportFactory.connect(remoteURI);
-        LOG.info("Starting a slave connection between " + localBroker + " and " + remoteBroker);
-        localBroker.setTransportListener(new DefaultTransportListener() {
-
-            public void onCommand(Object command) {
-            }
-
-            public void onException(IOException error) {
-                if (started.get()) {
-                    serviceLocalException(error);
-                }
-            }
-        });
-        remoteBroker.setTransportListener(new DefaultTransportListener() {
-
-            public void onCommand(Object o) {
-                Command command = (Command)o;
-                if (started.get()) {
-                    serviceRemoteCommand(command);
-                }
-            }
-
-            public void onException(IOException error) {
-                if (started.get()) {
-                    serviceRemoteException(error);
-                }
-            }
-            
-            public void transportResumed() {
-            	try{
-            		if(!firstConnection){
-	            		localBroker = TransportFactory.connect(localURI);
-	            		localBroker.setTransportListener(new DefaultTransportListener() {
-	
-	                        public void onCommand(Object command) {
-	                        }
-	
-	                        public void onException(IOException error) {
-	                            if (started.get()) {
-	                                serviceLocalException(error);
-	                            }
-	                        }
-	                    });
-	            		localBroker.start();
-	            		restartBridge();
-	            		LOG.info("Slave connection between " + localBroker + " and " + remoteBroker + " has been reestablished.");
-            		}else{
-            			firstConnection=false;
-            		}
-            	}catch(IOException e){
-            		LOG.error("MasterConnector failed to send BrokerInfo in transportResumed:", e);
-            	}catch(Exception e){
-            		LOG.error("MasterConnector failed to restart localBroker in transportResumed:", e);
-            	}
-            	
-            }
-        });
-        try {
-            localBroker.start();
-            remoteBroker.start();
-            startBridge();
-            masterActive.set(true);
-        } catch (Exception e) {
-            masterActive.set(false);
-            if(!stoppedBeforeStart.get()){
-            	LOG.error("Failed to start network bridge: " + e, e);
-            }else{
-            	LOG.info("Slave stopped before connected to the master.");
-            }
-            setFailedToStart(true);
-        }    
-    }
-
-    protected void startBridge() throws Exception {
-        connectionInfo = new ConnectionInfo();
-        connectionInfo.setConnectionId(new ConnectionId(idGenerator.generateId()));
-        connectionInfo.setClientId(idGenerator.generateId());
-        connectionInfo.setUserName(userName);
-        connectionInfo.setPassword(password);
-        connectionInfo.setBrokerMasterConnector(true);
-        sessionInfo = new SessionInfo(connectionInfo, 1);
-        producerInfo = new ProducerInfo(sessionInfo, 1);
-        producerInfo.setResponseRequired(false);
-        if (connector != null) {
-            brokerInfo = connector.getBrokerInfo();
-        } else {
-            brokerInfo = new BrokerInfo();
-        }
-        brokerInfo.setBrokerName(broker.getBrokerName());
-        brokerInfo.setPeerBrokerInfos(broker.getBroker().getPeerBrokerInfos());
-        brokerInfo.setSlaveBroker(true);
-        brokerInfo.setPassiveSlave(broker.isPassiveSlave());
-        restartBridge();
-        LOG.info("Slave connection between " + localBroker + " and " + remoteBroker + " has been established.");
-    }
-
-    public void stop() throws Exception {
-        if (!started.compareAndSet(true, false)||!masterActive.get()) {
-            return;
-        }
-        masterActive.set(false);
-        try {
-            // if (connectionInfo!=null){
-            // localBroker.request(connectionInfo.createRemoveCommand());
-            // }
-            // localBroker.setTransportListener(null);
-            // remoteBroker.setTransportListener(null);
-            remoteBroker.oneway(new ShutdownInfo());
-            localBroker.oneway(new ShutdownInfo());
-        } catch (IOException e) {
-            LOG.debug("Caught exception stopping", e);
-        } finally {
-            ServiceStopper ss = new ServiceStopper();
-            ss.stop(localBroker);
-            ss.stop(remoteBroker);
-            ss.throwFirstException();
-        }
-    }
-    
-    public void stopBeforeConnected()throws Exception{
-        masterActive.set(false);
-        started.set(false);
-        stoppedBeforeStart.set(true);
-        ServiceStopper ss = new ServiceStopper();
-        ss.stop(localBroker);
-        ss.stop(remoteBroker);
-    }
-
-    protected void serviceRemoteException(IOException error) {
-        LOG.error("Network connection between " + localBroker + " and " + remoteBroker + " shutdown: " + error.getMessage(), error);
-        shutDown();
-    }
-
-    protected void serviceRemoteCommand(Command command) {
-        try {
-            if (command.isMessageDispatch()) {
-                MessageDispatch md = (MessageDispatch)command;
-                command = md.getMessage();
-            }
-            if (command.getDataStructureType() == CommandTypes.SHUTDOWN_INFO) {
-                LOG.warn("The Master has shutdown");
-                shutDown();
-            } else {
-                boolean responseRequired = command.isResponseRequired();
-                int commandId = command.getCommandId();
-                if (responseRequired) {
-                    Response response = (Response)localBroker.request(command);
-                    response.setCorrelationId(commandId);
-                    remoteBroker.oneway(response);
-                } else {
-                    localBroker.oneway(command);
-                }
-            }
-        } catch (IOException e) {
-            serviceRemoteException(e);
-        }
-    }
-
-    protected void serviceLocalException(Throwable error) {
-    	if (!(error instanceof TransportDisposedIOException) || localBroker.isDisposed()){
-	        LOG.info("Network connection between " + localBroker + " and " + remoteBroker + " shutdown: " + error.getMessage(), error);
-	        ServiceSupport.dispose(this);
-    	}else{
-    		LOG.info(error.getMessage());
-    	}
-    }
-
-    /**
-     * @return Returns the localURI.
-     */
-    public URI getLocalURI() {
-        return localURI;
-    }
-
-    /**
-     * @param localURI The localURI to set.
-     */
-    public void setLocalURI(URI localURI) {
-        this.localURI = localURI;
-    }
-
-    /**
-     * @return Returns the remoteURI.
-     */
-    public URI getRemoteURI() {
-        return remoteURI;
-    }
-
-    /**
-     * @param remoteURI The remoteURI to set.
-     */
-    public void setRemoteURI(URI remoteURI) {
-        this.remoteURI = remoteURI;
-    }
-
-    /**
-     * @return Returns the password.
-     */
-    public String getPassword() {
-        return password;
-    }
-
-    /**
-     * @param password The password to set.
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    /**
-     * @return Returns the userName.
-     */
-    public String getUserName() {
-        return userName;
-    }
-
-    /**
-     * @param userName The userName to set.
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    private void shutDown() {
-        masterActive.set(false);
-        broker.masterFailed();
-        ServiceSupport.dispose(this);
-    }
-
-	public boolean isStoppedBeforeStart() {
-		return stoppedBeforeStart.get();
-	}
-
-    /**
-     * Get the failedToStart
-     * @return the failedToStart
-     */
-    public boolean isFailedToStart() {
-        return this.failedToStart;
-    }
-
-    /**
-     * Set the failedToStart
-     * @param failedToStart the failedToStart to set
-     */
-    public void setFailedToStart(boolean failedToStart) {
-        this.failedToStart = failedToStart;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/package.html
deleted file mode 100755
index 4934a49..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Helper classes for implementing fault tolerance
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java
deleted file mode 100644
index aa268d1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyView.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy;
-import org.apache.activemq.broker.region.policy.SlowConsumerEntry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-import javax.management.openmbean.TabularDataSupport;
-import javax.management.openmbean.TabularType;
-import java.util.Map;
-
-public class AbortSlowConsumerStrategyView implements AbortSlowConsumerStrategyViewMBean {
-    private static final Logger LOG = LoggerFactory.getLogger(AbortSlowConsumerStrategyView.class);
-    private ManagedRegionBroker broker;
-    private AbortSlowConsumerStrategy strategy;
-
-
-    public AbortSlowConsumerStrategyView(ManagedRegionBroker managedRegionBroker, AbortSlowConsumerStrategy slowConsumerStrategy) {
-        this.broker = managedRegionBroker;
-        this.strategy = slowConsumerStrategy;
-    }
-
-    public long getMaxSlowCount() {
-        return strategy.getMaxSlowCount();
-    }
-
-    public void setMaxSlowCount(long maxSlowCount) {
-        strategy.setMaxSlowCount(maxSlowCount);
-    }
-
-    public long getMaxSlowDuration() {
-        return strategy.getMaxSlowDuration();
-    }
-
-    public void setMaxSlowDuration(long maxSlowDuration) {
-       strategy.setMaxSlowDuration(maxSlowDuration);
-    }
-
-    public long getCheckPeriod() {
-        return strategy.getCheckPeriod();
-    }
-
-    public TabularData getSlowConsumers() throws OpenDataException {
-
-        OpenTypeSupport.OpenTypeFactory factory = OpenTypeSupport.getFactory(SlowConsumerEntry.class);
-        CompositeType ct = factory.getCompositeType();
-        TabularType tt = new TabularType("SlowConsumers", "Table of current slow Consumers", ct, new String[] {"subscription" });
-        TabularDataSupport rc = new TabularDataSupport(tt);
-        
-        int index = 0;
-        Map<Subscription, SlowConsumerEntry> slowConsumers = strategy.getSlowConsumers();
-        for (Map.Entry<Subscription, SlowConsumerEntry> entry : slowConsumers.entrySet()) {
-            entry.getValue().setSubscription(broker.getSubscriberObjectName(entry.getKey()));
-            rc.put(OpenTypeSupport.convert(entry.getValue()));
-        }
-        return rc;
-    }
-
-    public void abortConsumer(ObjectName consumerToAbort) {
-        Subscription sub = broker.getSubscriber(consumerToAbort);
-        if (sub != null) {
-            LOG.info("aborting consumer via jmx: " + sub.getConsumerInfo().getConsumerId());           
-            strategy.abortConsumer(sub, false);
-        } else {
-            LOG.warn("cannot resolve subscription matching name: " + consumerToAbort);
-        }
-
-    }
-
-    public void abortConnection(ObjectName consumerToAbort) {
-        Subscription sub = broker.getSubscriber(consumerToAbort);
-        if (sub != null) {
-            LOG.info("aborting consumer connection via jmx: " + sub.getConsumerInfo().getConsumerId().getConnectionId());
-            strategy.abortConsumer(sub, true);
-        } else {
-            LOG.warn("cannot resolve subscription matching name: " + consumerToAbort);
-        }
-    }
-
-    public void abortConsumer(String objectNameOfConsumerToAbort) {
-        abortConsumer(toObjectName(objectNameOfConsumerToAbort));
-    }
-
-    public void abortConnection(String objectNameOfConsumerToAbort) {
-        abortConnection(toObjectName(objectNameOfConsumerToAbort));
-    }
-
-    private ObjectName toObjectName(String objectName) {
-        ObjectName result = null;
-        try {
-            result = new ObjectName(objectName);
-        } catch (Exception e) {
-            LOG.warn("cannot create subscription ObjectName to abort, from string: " + objectName);
-        }
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyViewMBean.java
deleted file mode 100644
index 00d9571..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AbortSlowConsumerStrategyViewMBean.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.ObjectName;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
-public interface AbortSlowConsumerStrategyViewMBean {
-    
-    @MBeanInfo("returns the current max slow count, -1 disables")
-    long getMaxSlowCount();
-
-    @MBeanInfo("sets the count after which a slow consumer will be aborted, -1 disables")
-    void setMaxSlowCount(long maxSlowCount);
-    
-    @MBeanInfo("returns the current max slow (milliseconds) duration")
-    long getMaxSlowDuration();
-
-    @MBeanInfo("sets the duration (milliseconds) after which a continually slow consumer will be aborted")
-    void setMaxSlowDuration(long maxSlowDuration);
-
-    @MBeanInfo("returns the check period at which a sweep of consumers is done to determine continued slowness")
-    public long getCheckPeriod();
-    
-    @MBeanInfo("returns the current list of slow consumers, Not HTML friendly")
-    TabularData getSlowConsumers() throws OpenDataException;
-    
-    @MBeanInfo("aborts the slow consumer gracefully by sending a shutdown control message to just that consumer")
-    void abortConsumer(ObjectName consumerToAbort);
-    
-    @MBeanInfo("aborts the slow consumer forcefully by shutting down it's connection, note: all other users of the connection will be affected")
-    void abortConnection(ObjectName consumerToAbort);
-
-    @MBeanInfo("aborts the slow consumer gracefully by sending a shutdown control message to just that consumer")
-    void abortConsumer(String objectNameOfConsumerToAbort);
-    
-    @MBeanInfo("aborts the slow consumer forcefully by shutting down it's connection, note: all other users of the connection will be affected")
-    void abortConnection(String objectNameOfConsumerToAbort);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AnnotatedMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AnnotatedMBean.java
deleted file mode 100644
index 454c5bf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/AnnotatedMBean.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.util.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.Principal;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.management.*;
-import javax.security.auth.Subject;
-
-/**
- * MBean that looks for method/parameter descriptions in the Info annotation.
- */
-public class AnnotatedMBean extends StandardMBean {
-
-  private static final Map<String, Class<?>> primitives = new HashMap<String, Class<?>>();
-
-  private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit");
-
-  private static boolean audit;
-  private static AuditLogService auditLog;
-
-  static {
-    Class<?>[] p = { byte.class, short.class, int.class, long.class, float.class, double.class, char.class, boolean.class, };
-    for (Class<?> c : p) {
-      primitives.put(c.getName(), c);
-    }
-    audit = "true".equalsIgnoreCase(System.getProperty("org.apache.activemq.audit"));
-    if (audit) {
-        auditLog = AuditLogService.getAuditLog();
-    }
-  }
-  
-  @SuppressWarnings("unchecked")
-  public static void registerMBean(ManagementContext context, Object object, ObjectName objectName) 
-    throws Exception {
-
-    String mbeanName = object.getClass().getName() + "MBean";
-    
-    for (Class c : object.getClass().getInterfaces()) {
-      if (mbeanName.equals(c.getName())) {
-        context.registerMBean(new AnnotatedMBean(object, c), objectName);
-        return;
-      }
-    }
-
-    context.registerMBean(object, objectName);
-  }
-  
-  /** Instance where the MBean interface is implemented by another object. */
-  public <T> AnnotatedMBean(T impl, Class<T> mbeanInterface) throws NotCompliantMBeanException {
-    super(impl, mbeanInterface);
-  }
-
-  /** Instance where the MBean interface is implemented by this object. */
-  protected AnnotatedMBean(Class<?> mbeanInterface) throws NotCompliantMBeanException {
-    super(mbeanInterface);
-  }
-
-  /** {@inheritDoc} */
-  @Override
-  protected String getDescription(MBeanAttributeInfo info) {
-
-    String descr = info.getDescription();
-    Method m = getMethod(getMBeanInterface(), "get"+info.getName().substring(0, 1).toUpperCase()+info.getName().substring(1));
-    if (m == null)
-      m = getMethod(getMBeanInterface(), "is"+info.getName().substring(0, 1).toUpperCase()+info.getName().substring(1));
-    if (m == null)
-      m = getMethod(getMBeanInterface(), "does"+info.getName().substring(0, 1).toUpperCase()+info.getName().substring(1));
-      
-    if (m != null) {
-      MBeanInfo d = m.getAnnotation(MBeanInfo.class);
-      if (d != null)
-        descr = d.value();
-    }
-    return descr;
-  }
-  
-  /** {@inheritDoc} */
-  @Override
-  protected String getDescription(MBeanOperationInfo op) {
-
-    String descr = op.getDescription();
-    Method m = getMethod(op);
-    if (m != null) {
-      MBeanInfo d = m.getAnnotation(MBeanInfo.class);
-      if (d != null)
-        descr = d.value();
-    }
-    return descr;
-  }
-
-  /** {@inheritDoc} */
-  @Override
-  protected String getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int paramNo) {
-    String name = param.getName();
-    Method m = getMethod(op);
-    if (m != null) {
-      for (Annotation a : m.getParameterAnnotations()[paramNo]) {
-        if (MBeanInfo.class.isInstance(a))
-          name = MBeanInfo.class.cast(a).value();
-      }
-    }
-    return name;
-  }
-
-  /**
-   * Extracts the Method from the MBeanOperationInfo
-   * @param op
-   * @return
-   */
-  private Method getMethod(MBeanOperationInfo op) {
-    final MBeanParameterInfo[] params = op.getSignature();
-    final String[] paramTypes = new String[params.length];
-    for (int i = 0; i < params.length; i++)
-      paramTypes[i] = params[i].getType();
-
-    return getMethod(getMBeanInterface(), op.getName(), paramTypes);
-  }
-
-  /**
-   * Returns the Method with the specified name and parameter types for the given class,
-   * null if it doesn't exist.
-   * @param mbean
-   * @param method
-   * @param params
-   * @return
-   */
-  private static Method getMethod(Class<?> mbean, String method, String... params) {
-    try {
-      final ClassLoader loader = mbean.getClassLoader();
-      final Class<?>[] paramClasses = new Class<?>[params.length];
-      for (int i = 0; i < params.length; i++) {
-        paramClasses[i] = primitives.get(params[i]);
-        if (paramClasses[i] == null)
-          paramClasses[i] = Class.forName(params[i], false, loader);
-      }
-      return mbean.getMethod(method, paramClasses);
-    } catch (RuntimeException e) {
-      throw e;
-    } catch (Exception e) {
-      return null;
-    }
-  }
-
-    @Override
-    public Object invoke(String s, Object[] objects, String[] strings) throws MBeanException, ReflectionException {
-        if (audit) {
-            Subject subject = Subject.getSubject(AccessController.getContext());
-            String caller = "anonymous";
-            if (subject != null) {
-                caller = "";
-                for (Principal principal : subject.getPrincipals()) {
-                    caller += principal.getName() + " ";
-                }
-            }
-
-            AuditLogEntry entry = new JMXAuditLogEntry();
-            entry.setUser(caller);
-            entry.setTimestamp(System.currentTimeMillis());
-            entry.setOperation(this.getMBeanInfo().getClassName() + "." + s);
-            entry.getParameters().put("arguments", objects);
-
-            auditLog.log(entry);
-        }
-        return super.invoke(s, objects, strings);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
deleted file mode 100755
index 0643e81..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URL;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.management.ObjectName;
-
-import org.apache.activemq.ActiveMQConnectionMetaData;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.BrokerSupport;
-
-/**
- * 
- */
-public class BrokerView implements BrokerViewMBean {
-
-    ManagedRegionBroker broker;
-    private final BrokerService brokerService;
-    private final AtomicInteger sessionIdCounter = new AtomicInteger(0);
-    private ObjectName jmsJobScheduler;
-
-    public BrokerView(BrokerService brokerService, ManagedRegionBroker managedBroker) throws Exception {
-        this.brokerService = brokerService;
-        this.broker = managedBroker;
-    }
-
-    public ManagedRegionBroker getBroker() {
-        return broker;
-    }
-
-    public void setBroker(ManagedRegionBroker broker) {
-        this.broker = broker;
-    }
-    
-    public String getBrokerId() {
-        return broker.getBrokerId().toString();
-    }
-    
-    public String getBrokerName() {
-        return broker.getBrokerName();
-    }    
-    
-    public String getBrokerVersion() {
-    	return ActiveMQConnectionMetaData.PROVIDER_VERSION;
-    }
-
-    public void gc() throws Exception {
-        brokerService.getBroker().gc();
-    }
-
-    public void start() throws Exception {
-        brokerService.start();
-    }
-
-    public void stop() throws Exception {
-        brokerService.stop();
-    }
-    
-    public void stopGracefully(String connectorName, String queueName, long timeout, long pollInterval)
-            throws Exception {
-        brokerService.stopGracefully(connectorName, queueName, timeout, pollInterval);
-    }
-
-    
-    public long getTotalEnqueueCount() {
-        return broker.getDestinationStatistics().getEnqueues().getCount();
-    }
-
-    public long getTotalDequeueCount() {
-        return broker.getDestinationStatistics().getDequeues().getCount();
-    }
-
-    public long getTotalConsumerCount() {
-        return broker.getDestinationStatistics().getConsumers().getCount();
-    }
-
-    public long getTotalMessageCount() {
-        return broker.getDestinationStatistics().getMessages().getCount();
-    }
-
-    public long getTotalMessagesCached() {
-        return broker.getDestinationStatistics().getMessagesCached().getCount();
-    }
-
-    public int getMemoryPercentUsage() {
-        return brokerService.getSystemUsage().getMemoryUsage().getPercentUsage();
-    }
-
-    public long getMemoryLimit() {
-        return brokerService.getSystemUsage().getMemoryUsage().getLimit();
-    }
-
-    public void setMemoryLimit(long limit) {
-        brokerService.getSystemUsage().getMemoryUsage().setLimit(limit);
-    }
-    
-    public long getStoreLimit() {
-        return brokerService.getSystemUsage().getStoreUsage().getLimit();
-    }
-
-    public int getStorePercentUsage() {
-        return brokerService.getSystemUsage().getStoreUsage().getPercentUsage();
-    }
-
- 
-    public long getTempLimit() {
-       return brokerService.getSystemUsage().getTempUsage().getLimit();
-    }
-
-    public int getTempPercentUsage() {
-       return brokerService.getSystemUsage().getTempUsage().getPercentUsage();
-    }
-
-    public void setStoreLimit(long limit) {
-        brokerService.getSystemUsage().getStoreUsage().setLimit(limit);
-    }
-
-    public void setTempLimit(long limit) {
-        brokerService.getSystemUsage().getTempUsage().setLimit(limit);
-    }
-    
-
-    public void resetStatistics() {
-        broker.getDestinationStatistics().reset();
-    }
-
-    public void enableStatistics() {
-        broker.getDestinationStatistics().setEnabled(true);
-    }
-
-    public void disableStatistics() {
-        broker.getDestinationStatistics().setEnabled(false);
-    }
-
-    public boolean isStatisticsEnabled() {
-        return broker.getDestinationStatistics().isEnabled();
-    }
-    
-    public boolean isPersistent() {
-        return brokerService.isPersistent();
-    }
-    
-    public boolean isSlave() {
-        return brokerService.isSlave();
-    }
-
-    public void terminateJVM(int exitCode) {
-        System.exit(exitCode);
-    }
-
-    public ObjectName[] getTopics() {
-        return broker.getTopics();
-    }
-
-    public ObjectName[] getQueues() {
-        return broker.getQueues();
-    }
-
-    public ObjectName[] getTemporaryTopics() {
-        return broker.getTemporaryTopics();
-    }
-
-    public ObjectName[] getTemporaryQueues() {
-        return broker.getTemporaryQueues();
-    }
-
-    public ObjectName[] getTopicSubscribers() {
-        return broker.getTopicSubscribers();
-    }
-
-    public ObjectName[] getDurableTopicSubscribers() {
-        return broker.getDurableTopicSubscribers();
-    }
-
-    public ObjectName[] getQueueSubscribers() {
-        return broker.getQueueSubscribers();
-    }
-
-    public ObjectName[] getTemporaryTopicSubscribers() {
-        return broker.getTemporaryTopicSubscribers();
-    }
-
-    public ObjectName[] getTemporaryQueueSubscribers() {
-        return broker.getTemporaryQueueSubscribers();
-    }
-
-    public ObjectName[] getInactiveDurableTopicSubscribers() {
-        return broker.getInactiveDurableTopicSubscribers();
-    }
-
-    public String addConnector(String discoveryAddress) throws Exception {
-        TransportConnector connector = brokerService.addConnector(discoveryAddress);
-        connector.start();
-        return connector.getName();
-    }
-
-    public String addNetworkConnector(String discoveryAddress) throws Exception {
-        NetworkConnector connector = brokerService.addNetworkConnector(discoveryAddress);
-        connector.start();
-        return connector.getName();
-    }
-
-    public boolean removeConnector(String connectorName) throws Exception {
-        TransportConnector connector = brokerService.getConnectorByName(connectorName);
-        connector.stop();
-        return brokerService.removeConnector(connector);
-    }
-
-    public boolean removeNetworkConnector(String connectorName) throws Exception {
-        NetworkConnector connector = brokerService.getNetworkConnectorByName(connectorName);
-        connector.stop();
-        return brokerService.removeNetworkConnector(connector);
-    }
-
-    public void addTopic(String name) throws Exception {
-        broker.getContextBroker().addDestination(BrokerSupport.getConnectionContext(broker.getContextBroker()), new ActiveMQTopic(name),true);
-    }
-
-    public void addQueue(String name) throws Exception {
-        broker.getContextBroker().addDestination(BrokerSupport.getConnectionContext(broker.getContextBroker()), new ActiveMQQueue(name),true);
-    }
-
-    public void removeTopic(String name) throws Exception {
-        broker.getContextBroker().removeDestination(BrokerSupport.getConnectionContext(broker.getContextBroker()), new ActiveMQTopic(name),
-                                 1000);
-    }
-
-    public void removeQueue(String name) throws Exception {
-        broker.getContextBroker().removeDestination(BrokerSupport.getConnectionContext(broker.getContextBroker()), new ActiveMQQueue(name),
-                                 1000);
-    }
-
-    public ObjectName createDurableSubscriber(String clientId, String subscriberName, String topicName,
-                                              String selector) throws Exception {
-        ConnectionContext context = new ConnectionContext();
-        context.setBroker(broker);
-        context.setClientId(clientId);
-        ConsumerInfo info = new ConsumerInfo();
-        ConsumerId consumerId = new ConsumerId();
-        consumerId.setConnectionId(clientId);
-        consumerId.setSessionId(sessionIdCounter.incrementAndGet());
-        consumerId.setValue(0);
-        info.setConsumerId(consumerId);
-        info.setDestination(new ActiveMQTopic(topicName));
-        info.setSubscriptionName(subscriberName);
-        info.setSelector(selector);
-        Subscription subscription = broker.addConsumer(context, info);
-        broker.removeConsumer(context, info);
-        if (subscription != null) {
-            return subscription.getObjectName();
-        }
-        return null;
-    }
-
-    public void destroyDurableSubscriber(String clientId, String subscriberName) throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        info.setClientId(clientId);
-        info.setSubscriptionName(subscriberName);
-        ConnectionContext context = new ConnectionContext();
-        context.setBroker(broker);
-        context.setClientId(clientId);
-        broker.removeSubscription(context, info);
-    }
-
-    //  doc comment inherited from BrokerViewMBean
-    public void reloadLog4jProperties() throws Throwable {
-
-        // Avoid a direct dependency on log4j.. use reflection.
-        try {
-            ClassLoader cl = getClass().getClassLoader();
-            Class logManagerClass = cl.loadClass("org.apache.log4j.LogManager");
-            
-            Method resetConfiguration = logManagerClass.getMethod("resetConfiguration", new Class[]{});
-            resetConfiguration.invoke(null, new Object[]{});
-            
-            URL log4jprops = cl.getResource("log4j.properties");
-            if (log4jprops != null) {
-                Class propertyConfiguratorClass = cl.loadClass("org.apache.log4j.PropertyConfigurator");
-                Method configure = propertyConfiguratorClass.getMethod("configure", new Class[]{URL.class});
-                configure.invoke(null, new Object[]{log4jprops});
-            }
-        } catch (InvocationTargetException e) {
-            throw e.getTargetException();
-        }
-    }
-    
-
-    public String getOpenWireURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("tcp");
-        return answer != null ? answer : "";
-    }
-
-    public String getStompURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("stomp");
-        return answer != null ? answer : "";
-    }
-
-    public String getSslURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("ssl");
-        return answer != null ? answer : "";
-    }
-
-    public String getStompSslURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("stomp+ssl");
-        return answer != null ? answer : "";
-    }
-
-    public String getVMURL() {
-        URI answer = brokerService.getVmConnectorURI();
-        return answer != null ? answer.toString() : "";
-    }
-    
-    public String getDataDirectory() {
-        File file = brokerService.getDataDirectoryFile();
-        try {
-            return file != null ? file.getCanonicalPath():"";
-        } catch (IOException e) {
-            return "";
-        }
-    }
-
-    public ObjectName getJMSJobScheduler() {
-        return this.jmsJobScheduler;
-    }
-    
-    public void setJMSJobScheduler(ObjectName name) {
-        this.jmsJobScheduler=name;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
deleted file mode 100755
index 7a9dcf5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.ObjectName;
-import org.apache.activemq.Service;
-
-
-/**
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (for the reloadLog4jProperties method)
- * 
- */
-public interface BrokerViewMBean extends Service {
-
-    /**
-     * @return The unique id of the broker.
-     */
-    @MBeanInfo("The unique id of the broker.")
-    String getBrokerId();
-    
-    /**
-     * @return The name of the broker.
-     */
-    @MBeanInfo("The name of the broker.")
-    String getBrokerName();    
-
-    /**
-     * @return The name of the broker.
-     */
-    @MBeanInfo("The version of the broker.")
-    String getBrokerVersion();        
-    
-    /**
-     * The Broker will fush it's caches so that the garbage collector can
-     * recalaim more memory.
-     * 
-     * @throws Exception
-     */
-    @MBeanInfo("Runs the Garbage Collector.")
-    void gc() throws Exception;
-
-    @MBeanInfo("Reset all broker statistics.")
-    void resetStatistics();
-
-    @MBeanInfo("Enable broker statistics.")
-    void enableStatistics();
-
-    @MBeanInfo("Disable broker statistics.")
-    void disableStatistics();
-
-    @MBeanInfo("Broker statistics enabled.")
-    boolean isStatisticsEnabled();
-
-    @MBeanInfo("Number of messages that have been sent to the broker.")
-    long getTotalEnqueueCount();
-
-    @MBeanInfo("Number of messages that have been acknowledged on the broker.")
-    long getTotalDequeueCount();
-
-    @MBeanInfo("Number of message consumers subscribed to destinations on the broker.")
-    long getTotalConsumerCount();
-
-    @MBeanInfo("Number of unacknowledged messages on the broker.")
-    long getTotalMessageCount();
-
-    @MBeanInfo("Percent of memory limit used.")
-    int getMemoryPercentUsage();
-
-    @MBeanInfo("Memory limit, in bytes, used for holding undelivered messages before paging to temporary storage.")
-    long getMemoryLimit();
-
-    void setMemoryLimit(@MBeanInfo("bytes") long limit);
-
-    @MBeanInfo("Percent of store limit used.")
-    int getStorePercentUsage();
-
-    @MBeanInfo("Disk limit, in bytes, used for persistent messages before producers are blocked.")
-    long getStoreLimit();
-
-    void setStoreLimit(@MBeanInfo("bytes") long limit);
-
-    @MBeanInfo("Percent of temp limit used.")
-    int getTempPercentUsage();
-
-    @MBeanInfo("Disk limit, in bytes, used for non-persistent messages and temporary date before producers are blocked.")
-    long getTempLimit();
-
-    void setTempLimit(@MBeanInfo("bytes") long limit);
-    
-    @MBeanInfo("Messages are synchronized to disk.")
-    boolean isPersistent();
-
-    @MBeanInfo("Slave broker.")
-    boolean isSlave();
-
-    /**
-     * Shuts down the JVM.
-     * 
-     * @param exitCode the exit code that will be reported by the JVM process
-     *                when it exits.
-     */
-    @MBeanInfo("Shuts down the JVM.")
-    void terminateJVM(@MBeanInfo("exitCode") int exitCode);
-
-    /**
-     * Stop the broker and all it's components.
-     */
-    @MBeanInfo("Stop the broker and all its components.")
-    void stop() throws Exception;
-    @MBeanInfo("Poll for queues matching queueName are empty before stopping")
-    void stopGracefully(String connectorName, String queueName, long timeout, long pollInterval) throws Exception;
-
-    @MBeanInfo("Topics (broadcasted 'queues'); generally system information.")
-    ObjectName[] getTopics();
-
-    @MBeanInfo("Standard Queues containing AIE messages.")
-    ObjectName[] getQueues();
-
-    @MBeanInfo("Temporary Topics; generally unused.")
-    ObjectName[] getTemporaryTopics();
-
-    @MBeanInfo("Temporary Queues; generally temporary message response holders.")
-    ObjectName[] getTemporaryQueues();
-
-    @MBeanInfo("Topic Subscribers")
-    ObjectName[] getTopicSubscribers();
-
-    @MBeanInfo("Durable (persistent) topic subscribers")
-    ObjectName[] getDurableTopicSubscribers();
-
-    @MBeanInfo("Inactive (disconnected persistent) topic subscribers")
-    ObjectName[] getInactiveDurableTopicSubscribers();
-
-    @MBeanInfo("Queue Subscribers.")
-    ObjectName[] getQueueSubscribers();
-
-    @MBeanInfo("Temporary Topic Subscribers.")
-    ObjectName[] getTemporaryTopicSubscribers();
-
-    @MBeanInfo("Temporary Queue Subscribers.")
-    ObjectName[] getTemporaryQueueSubscribers();
-
-    @MBeanInfo("Adds a Connector to the broker.")
-    String addConnector(@MBeanInfo("discoveryAddress") String discoveryAddress) throws Exception;
-
-    @MBeanInfo("Adds a Network Connector to the broker.")
-    String addNetworkConnector(@MBeanInfo("discoveryAddress") String discoveryAddress) throws Exception;
-
-    @MBeanInfo("Removes a Connector from the broker.")
-    boolean removeConnector(@MBeanInfo("connectorName") String connectorName) throws Exception;
-
-    @MBeanInfo("Removes a Network Connector from the broker.")
-    boolean removeNetworkConnector(@MBeanInfo("connectorName") String connectorName) throws Exception;
-
-    /**
-     * Adds a Topic destination to the broker.
-     * 
-     * @param name The name of the Topic
-     * @throws Exception
-     */
-    @MBeanInfo("Adds a Topic destination to the broker.")
-    void addTopic(@MBeanInfo("name") String name) throws Exception;
-
-    /**
-     * Adds a Queue destination to the broker.
-     * 
-     * @param name The name of the Queue
-     * @throws Exception
-     */
-    @MBeanInfo("Adds a Queue destination to the broker.")
-    void addQueue(@MBeanInfo("name") String name) throws Exception;
-
-    /**
-     * Removes a Topic destination from the broker.
-     * 
-     * @param name The name of the Topic
-     * @throws Exception
-     */
-    @MBeanInfo("Removes a Topic destination from the broker.")
-    void removeTopic(@MBeanInfo("name") String name) throws Exception;
-
-    /**
-     * Removes a Queue destination from the broker.
-     * 
-     * @param name The name of the Queue
-     * @throws Exception
-     */
-    @MBeanInfo("Removes a Queue destination from the broker.")
-    void removeQueue(@MBeanInfo("name") String name) throws Exception;
-
-    /**
-     * Creates a new durable topic subscriber
-     * 
-     * @param clientId the JMS client ID
-     * @param subscriberName the durable subscriber name
-     * @param topicName the name of the topic to subscribe to
-     * @param selector a selector or null
-     * @return the object name of the MBean registered in JMX
-     */
-    @MBeanInfo(value="Creates a new durable topic subscriber.")
-    ObjectName createDurableSubscriber(@MBeanInfo("clientId") String clientId, @MBeanInfo("subscriberName") String subscriberName, @MBeanInfo("topicName") String topicName, @MBeanInfo("selector") String selector) throws Exception;
-
-    /**
-     * Destroys a durable subscriber
-     * 
-     * @param clientId the JMS client ID
-     * @param subscriberName the durable subscriber name
-     */
-    @MBeanInfo(value="Destroys a durable subscriber.")
-    void destroyDurableSubscriber(@MBeanInfo("clientId") String clientId, @MBeanInfo("subscriberName") String subscriberName) throws Exception;
-
-    /**
-     * Reloads log4j.properties from the classpath.
-     * This methods calls org.apache.activemq.transport.TransportLoggerControl.reloadLog4jProperties
-     * @throws Throwable 
-     */
-    @MBeanInfo(value="Reloads log4j.properties from the classpath.")
-    public void reloadLog4jProperties() throws Throwable;
-    
-    @MBeanInfo("The url of the openwire connector")
-    String getOpenWireURL();
-    
-    @MBeanInfo("The url of the stomp connector")
-    String getStompURL();
-    
-    @MBeanInfo("The url of the SSL connector")
-    String getSslURL();
-    
-    @MBeanInfo("The url of the Stomp SSL connector")
-    String getStompSslURL();
-    
-    @MBeanInfo("The url of the VM connector")
-    String getVMURL();
-    
-    @MBeanInfo("The location of the data directory")
-    public String getDataDirectory();
-    
-    @MBeanInfo("JMSJobScheduler")
-    ObjectName getJMSJobScheduler();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/CompositeDataConstants.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/CompositeDataConstants.java
deleted file mode 100644
index 1a3c91f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/CompositeDataConstants.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- *
- * 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.broker.jmx;
-
-/**
- * 
- */
-public interface CompositeDataConstants {
-    String PROPERTIES = "PropertiesText";
-    String JMSXGROUP_SEQ = "JMSXGroupSeq";
-    String JMSXGROUP_ID = "JMSXGroupID";
-    String BODY_LENGTH = "BodyLength";
-    String BODY_PREVIEW = "BodyPreview";
-    String CONTENT_MAP = "ContentMap";
-    String MESSAGE_TEXT = "Text";
-    String MESSAGE_URL = "Url";
-
-    String ORIGINAL_DESTINATION = "OriginalDestination";
-
-    // User properties
-    String STRING_PROPERTIES = "StringProperties";
-    String BOOLEAN_PROPERTIES = "BooleanProperties";
-    String BYTE_PROPERTIES = "ByteProperties";
-    String SHORT_PROPERTIES = "ShortProperties";
-    String INT_PROPERTIES = "IntProperties";
-    String LONG_PROPERTIES = "LongProperties";
-    String FLOAT_PROPERTIES = "FloatProperties";
-    String DOUBLE_PROPERTIES = "DoubleProperties";
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/CompositeDataHelper.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/CompositeDataHelper.java
deleted file mode 100644
index 73a7917..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/CompositeDataHelper.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- *
- * 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.broker.jmx;
-
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.TabularData;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 
- */
-public class CompositeDataHelper {
-
-    /**
-     * Extracts the named TabularData field from the CompositeData and converts it to a Map
-     * which is the method used to get the typesafe user properties.
-     */
-    public static Map getTabularMap(CompositeData cdata, String fieldName) {
-        Map map = new HashMap();
-        appendTabularMap(map, cdata, fieldName);
-        return map;
-    }
-
-    public static void appendTabularMap(Map map, CompositeData cdata, String fieldName) {
-        Object tabularObject = cdata.get(fieldName);
-        if (tabularObject instanceof TabularData) {
-            TabularData tabularData = (TabularData) tabularObject;
-            Collection<CompositeData> values = (Collection<CompositeData>) tabularData.values();
-            for (CompositeData compositeData : values) {
-                Object key = compositeData.get("key");
-                Object value = compositeData.get("value");
-                map.put(key, value);
-            }
-        }
-    }
-
-    /**
-     * Returns a map of all the user properties in the given message {@link javax.management.openmbean.CompositeData}
-     * object
-     *
-     * @param cdata
-     * @return
-     */
-    public static Map getMessageUserProperties(CompositeData cdata) {
-        Map map = new HashMap();
-        appendTabularMap(map, cdata, CompositeDataConstants.STRING_PROPERTIES);
-        appendTabularMap(map, cdata, CompositeDataConstants.BOOLEAN_PROPERTIES);
-        appendTabularMap(map, cdata, CompositeDataConstants.BYTE_PROPERTIES);
-        appendTabularMap(map, cdata, CompositeDataConstants.SHORT_PROPERTIES);
-        appendTabularMap(map, cdata, CompositeDataConstants.INT_PROPERTIES);
-        appendTabularMap(map, cdata, CompositeDataConstants.LONG_PROPERTIES);
-        appendTabularMap(map, cdata, CompositeDataConstants.FLOAT_PROPERTIES);
-        appendTabularMap(map, cdata, CompositeDataConstants.DOUBLE_PROPERTIES);
-        return map;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java
deleted file mode 100755
index 4b2978d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionView.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.Connection;
-
-public class ConnectionView implements ConnectionViewMBean {
-
-    private final Connection connection;
-
-    public ConnectionView(Connection connection) {
-        this.connection = connection;
-    }
-
-    public void start() throws Exception {
-        connection.start();
-    }
-
-    public void stop() throws Exception {
-        connection.stop();
-    }
-
-    /**
-     * @return true if the Connection is slow
-     */
-    public boolean isSlow() {
-        return connection.isSlow();
-    }
-
-    /**
-     * @return if after being marked, the Connection is still writing
-     */
-    public boolean isBlocked() {
-        return connection.isBlocked();
-    }
-
-    /**
-     * @return true if the Connection is connected
-     */
-    public boolean isConnected() {
-        return connection.isConnected();
-    }
-
-    /**
-     * @return true if the Connection is active
-     */
-    public boolean isActive() {
-        return connection.isActive();
-    }
-
-    /**
-     * Resets the statistics
-     */
-    public void resetStatistics() {
-        connection.getStatistics().reset();
-    }
-
-    public String getRemoteAddress() {
-        return connection.getRemoteAddress();
-    }
-
-    public String getConnectionId() {
-        return connection.getConnectionId();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java
deleted file mode 100755
index af1027e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectionViewMBean.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-
-public interface ConnectionViewMBean extends Service {
-    /**
-     * @return true if the Connection is slow
-     */
-    @MBeanInfo("Connection is slow.")
-    boolean isSlow();
-
-    /**
-     * @return if after being marked, the Connection is still writing
-     */
-    @MBeanInfo("Connection is blocked.")
-    boolean isBlocked();
-
-    /**
-     * @return true if the Connection is connected
-     */
-    @MBeanInfo("Connection is connected to the broker.")
-    boolean isConnected();
-
-    /**
-     * @return true if the Connection is active
-     */
-    @MBeanInfo("Connection is active (both connected and receiving messages).")
-    boolean isActive();
-    
-    /**
-     * Resets the statistics
-     */
-    @MBeanInfo("Resets the statistics")
-    void resetStatistics();
-    
-    /**
-     * Returns the source address for this connection
-     * 
-     * @return the souce address for this connection
-     */
-    @MBeanInfo("Source address for this connection")
-    String getRemoteAddress();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectorView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectorView.java
deleted file mode 100755
index 2c391e6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectorView.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.Connector;
-import org.apache.activemq.command.BrokerInfo;
-
-public class ConnectorView implements ConnectorViewMBean {
-
-    private final Connector connector;
-
-    public ConnectorView(Connector connector) {
-        this.connector = connector;
-    }
-
-    public void start() throws Exception {
-        connector.start();
-    }
-
-    public String getBrokerName() {
-        return getBrokerInfo().getBrokerName();
-    }
-
-    public void stop() throws Exception {
-        connector.stop();
-    }
-
-    public String getBrokerURL() {
-        return getBrokerInfo().getBrokerURL();
-    }
-
-    public BrokerInfo getBrokerInfo() {
-        return connector.getBrokerInfo();
-    }
-
-    /**
-     * Resets the statistics
-     */
-    public void resetStatistics() {
-        connector.getStatistics().reset();
-    }
-
-    /**
-     * enable statistics gathering
-     */
-    public void enableStatistics() {
-        connector.getStatistics().setEnabled(true);
-    }
-
-    /**
-     * disable statistics gathering
-     */
-    public void disableStatistics() {
-        connector.getStatistics().setEnabled(false);
-    }
-
-    /**
-     * Returns true if statistics is enabled
-     * 
-     * @return true if statistics is enabled
-     */
-    public boolean isStatisticsEnabled() {
-        return connector.getStatistics().isEnabled();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectorViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectorViewMBean.java
deleted file mode 100755
index 17499cd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ConnectorViewMBean.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-
-public interface ConnectorViewMBean extends Service {
-    
-    /**
-     * Resets the statistics
-     */
-    @MBeanInfo("Resets the statistics")
-    void resetStatistics();
-    
-    /**
-     * enable statistics gathering
-     */
-    @MBeanInfo("Enables statistics gathering")
-    void enableStatistics();
-
-    /**
-     * disable statistics gathering
-     */  
-    @MBeanInfo("Disables statistics gathering")
-    void disableStatistics();
-    
-    /**
-     * Returns true if statistics is enabled
-     * 
-     * @return true if statistics is enabled
-     */  
-    @MBeanInfo("Statistics gathering enabled")
-    boolean isStatisticsEnabled();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java
deleted file mode 100644
index 830f0dd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import javax.jms.Connection;
-import javax.jms.InvalidSelectorException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.CompositeDataSupport;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-import javax.management.openmbean.TabularDataSupport;
-import javax.management.openmbean.TabularType;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.jmx.OpenTypeSupport.OpenTypeFactory;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy;
-import org.apache.activemq.broker.region.policy.SlowConsumerStrategy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.selector.SelectorParser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DestinationView implements DestinationViewMBean {
-    private static final Logger LOG = LoggerFactory.getLogger(DestinationViewMBean.class);
-    protected final Destination destination;
-    protected final ManagedRegionBroker broker;
-
-    public DestinationView(ManagedRegionBroker broker, Destination destination) {
-        this.broker = broker;
-        this.destination = destination;
-    }
-
-    public void gc() {
-        destination.gc();
-    }
-
-    public String getName() {
-        return destination.getName();
-    }
-
-    public void resetStatistics() {
-        destination.getDestinationStatistics().reset();
-    }
-
-    public long getEnqueueCount() {
-        return destination.getDestinationStatistics().getEnqueues().getCount();
-    }
-
-    public long getDequeueCount() {
-        return destination.getDestinationStatistics().getDequeues().getCount();
-    }
-
-    public long getDispatchCount() {
-        return destination.getDestinationStatistics().getDispatched().getCount();
-    }
-
-    public long getInFlightCount() {
-        return destination.getDestinationStatistics().getInflight().getCount();
-    }
-
-    public long getExpiredCount() {
-        return destination.getDestinationStatistics().getExpired().getCount();
-    }
-
-    public long getConsumerCount() {
-        return destination.getDestinationStatistics().getConsumers().getCount();
-    }
-
-    public long getQueueSize() {
-        return destination.getDestinationStatistics().getMessages().getCount();
-    }
-
-    public long getMessagesCached() {
-        return destination.getDestinationStatistics().getMessagesCached().getCount();
-    }
-
-    public int getMemoryPercentUsage() {
-        return destination.getMemoryUsage().getPercentUsage();
-    }
-
-    public long getMemoryLimit() {
-        return destination.getMemoryUsage().getLimit();
-    }
-
-    public void setMemoryLimit(long limit) {
-        destination.getMemoryUsage().setLimit(limit);
-    }
-
-    public double getAverageEnqueueTime() {
-        return destination.getDestinationStatistics().getProcessTime().getAverageTime();
-    }
-
-    public long getMaxEnqueueTime() {
-        return destination.getDestinationStatistics().getProcessTime().getMaxTime();
-    }
-
-    public long getMinEnqueueTime() {
-        return destination.getDestinationStatistics().getProcessTime().getMinTime();
-    }
-    
-    public boolean isPrioritizedMessages() {
-        return destination.isPrioritizedMessages();
-    }
-
-    public CompositeData[] browse() throws OpenDataException {
-        try {
-            return browse(null);
-        } catch (InvalidSelectorException e) {
-            // should not happen.
-            throw new RuntimeException(e);
-        }
-    }
-
-    public CompositeData[] browse(String selector) throws OpenDataException, InvalidSelectorException {
-        Message[] messages = destination.browse();
-        ArrayList<CompositeData> c = new ArrayList<CompositeData>();
-
-        MessageEvaluationContext ctx = new MessageEvaluationContext();
-        ctx.setDestination(destination.getActiveMQDestination());
-        BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector);
-
-        for (int i = 0; i < messages.length; i++) {
-            try {
-
-                if (selectorExpression == null) {
-                    c.add(OpenTypeSupport.convert(messages[i]));
-                } else {
-                    ctx.setMessageReference(messages[i]);
-                    if (selectorExpression.matches(ctx)) {
-                        c.add(OpenTypeSupport.convert(messages[i]));
-                    }
-                }
-
-            } catch (Throwable e) {
-                // TODO DELETE ME
-                System.out.println(e);
-                e.printStackTrace();
-                // TODO DELETE ME
-                LOG.warn("exception browsing destination", e);
-            }
-        }
-
-        CompositeData rc[] = new CompositeData[c.size()];
-        c.toArray(rc);
-        return rc;
-    }
-
-    /**
-     * Browses the current destination returning a list of messages
-     */
-    public List<Object> browseMessages() throws InvalidSelectorException {
-        return browseMessages(null);
-    }
-
-    /**
-     * Browses the current destination with the given selector returning a list
-     * of messages
-     */
-    public List<Object> browseMessages(String selector) throws InvalidSelectorException {
-        Message[] messages = destination.browse();
-        ArrayList<Object> answer = new ArrayList<Object>();
-
-        MessageEvaluationContext ctx = new MessageEvaluationContext();
-        ctx.setDestination(destination.getActiveMQDestination());
-        BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector);
-
-        for (int i = 0; i < messages.length; i++) {
-            try {
-                Message message = messages[i];
-                if (selectorExpression == null) {
-                    answer.add(OpenTypeSupport.convert(message));
-                } else {
-                    ctx.setMessageReference(message);
-                    if (selectorExpression.matches(ctx)) {
-                        answer.add(message);
-                    }
-                }
-
-            } catch (Throwable e) {
-                LOG.warn("exception browsing destination", e);
-            }
-        }
-        return answer;
-    }
-
-    public TabularData browseAsTable() throws OpenDataException {
-        try {
-            return browseAsTable(null);
-        } catch (InvalidSelectorException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public TabularData browseAsTable(String selector) throws OpenDataException, InvalidSelectorException {
-        OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class);
-        Message[] messages = destination.browse();
-        CompositeType ct = factory.getCompositeType();
-        TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] { "JMSMessageID" });
-        TabularDataSupport rc = new TabularDataSupport(tt);
-
-        MessageEvaluationContext ctx = new MessageEvaluationContext();
-        ctx.setDestination(destination.getActiveMQDestination());
-        BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector);
-
-        for (int i = 0; i < messages.length; i++) {
-            try {
-                if (selectorExpression == null) {
-                    rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i])));
-                } else {
-                    ctx.setMessageReference(messages[i]);
-                    if (selectorExpression.matches(ctx)) {
-                        rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i])));
-                    }
-                }
-            } catch (Throwable e) {
-                LOG.warn("exception browsing destination", e);
-            }
-        }
-
-        return rc;
-    }
-
-    public String sendTextMessage(String body) throws Exception {
-        return sendTextMessage(Collections.EMPTY_MAP, body);
-    }
-
-    public String sendTextMessage(Map headers, String body) throws Exception {
-        return sendTextMessage(headers, body, null, null);
-    }
-
-    public String sendTextMessage(String body, String user, String password) throws Exception {
-        return sendTextMessage(Collections.EMPTY_MAP, body, user, password);
-    }
-
-    public String sendTextMessage(Map headers, String body, String userName, String password) throws Exception {
-
-        String brokerUrl = "vm://" + broker.getBrokerName();
-        ActiveMQDestination dest = destination.getActiveMQDestination();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(brokerUrl);
-        Connection connection = null;
-        try {
-
-            connection = cf.createConnection(userName, password);
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(dest);
-            ActiveMQTextMessage msg = (ActiveMQTextMessage) session.createTextMessage(body);
-
-            for (Iterator iter = headers.entrySet().iterator(); iter.hasNext();) {
-                Map.Entry entry = (Map.Entry) iter.next();
-                msg.setObjectProperty((String) entry.getKey(), entry.getValue());
-            }
-
-            producer.setDeliveryMode(msg.getJMSDeliveryMode());
-            producer.setPriority(msg.getPriority());
-            long ttl = msg.getExpiration() - System.currentTimeMillis();
-            producer.setTimeToLive(ttl > 0 ? ttl : 0);
-            producer.send(msg);
-
-            return msg.getJMSMessageID();
-
-        } finally {
-            connection.close();
-        }
-
-    }
-
-    public int getMaxAuditDepth() {
-        return destination.getMaxAuditDepth();
-    }
-
-    public int getMaxProducersToAudit() {
-        return destination.getMaxProducersToAudit();
-    }
-
-    public boolean isEnableAudit() {
-        return destination.isEnableAudit();
-    }
-
-    public void setEnableAudit(boolean enableAudit) {
-        destination.setEnableAudit(enableAudit);
-    }
-
-    public void setMaxAuditDepth(int maxAuditDepth) {
-        destination.setMaxAuditDepth(maxAuditDepth);
-    }
-
-    public void setMaxProducersToAudit(int maxProducersToAudit) {
-        destination.setMaxProducersToAudit(maxProducersToAudit);
-    }
-
-    public float getMemoryUsagePortion() {
-        return destination.getMemoryUsage().getUsagePortion();
-    }
-
-    public long getProducerCount() {
-        return destination.getDestinationStatistics().getProducers().getCount();
-    }
-
-    public boolean isProducerFlowControl() {
-        return destination.isProducerFlowControl();
-    }
-
-    public void setMemoryUsagePortion(float value) {
-        destination.getMemoryUsage().setUsagePortion(value);
-    }
-
-    public void setProducerFlowControl(boolean producerFlowControl) {
-        destination.setProducerFlowControl(producerFlowControl);
-    }
-
-    /**
-     * Set's the interval at which warnings about producers being blocked by
-     * resource usage will be triggered. Values of 0 or less will disable
-     * warnings
-     * 
-     * @param blockedProducerWarningInterval the interval at which warning about
-     *            blocked producers will be triggered.
-     */
-    public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval) {
-        destination.setBlockedProducerWarningInterval(blockedProducerWarningInterval);
-    }
-
-    /**
-     * 
-     * @return the interval at which warning about blocked producers will be
-     *         triggered.
-     */
-    public long getBlockedProducerWarningInterval() {
-        return destination.getBlockedProducerWarningInterval();
-    }
-
-    public int getMaxPageSize() {
-        return destination.getMaxPageSize();
-    }
-
-    public void setMaxPageSize(int pageSize) {
-        destination.setMaxPageSize(pageSize);
-    }
-
-    public boolean isUseCache() {
-        return destination.isUseCache();
-    }
-
-    public void setUseCache(boolean value) {
-        destination.setUseCache(value);
-    }
-
-    public ObjectName[] getSubscriptions() throws IOException, MalformedObjectNameException {
-        List<Subscription> subscriptions = destination.getConsumers();
-        ObjectName[] answer = new ObjectName[subscriptions.size()];
-        ObjectName objectName = broker.getBrokerService().getBrokerObjectName();
-        int index = 0;
-        for (Subscription subscription : subscriptions) {
-            String connectionClientId = subscription.getContext().getClientId();
-            String objectNameStr = ManagedRegionBroker.getSubscriptionObjectName(subscription, connectionClientId, objectName);
-            answer[index++] = new ObjectName(objectNameStr);
-        }
-        return answer;
-    }
-
-    public ObjectName getSlowConsumerStrategy() throws IOException, MalformedObjectNameException {
-        ObjectName result = null;
-        SlowConsumerStrategy strategy = destination.getSlowConsumerStrategy();
-        if (strategy != null && strategy instanceof AbortSlowConsumerStrategy) {
-            result = broker.registerSlowConsumerStrategy((AbortSlowConsumerStrategy)strategy);
-        }
-        return result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java
deleted file mode 100644
index ad842cb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import javax.jms.InvalidSelectorException;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
-public interface DestinationViewMBean {
-
-    /**
-     * Returns the name of this destination
-     */
-    @MBeanInfo("Name of this destination.")
-    String getName();
-
-    /**
-     * Resets the managment counters.
-     */
-    @MBeanInfo("Resets statistics.")
-    void resetStatistics();
-
-    /**
-     * Returns the number of messages that have been sent to the destination.
-     * 
-     * @return The number of messages that have been sent to the destination.
-     */
-    @MBeanInfo("Number of messages that have been sent to the destination.")
-    long getEnqueueCount();
-
-    /**
-     * Returns the number of messages that have been delivered (potentially not
-     * acknowledged) to consumers.
-     * 
-     * @return The number of messages that have been delivered (potentially not
-     *         acknowledged) to consumers.
-     */
-    @MBeanInfo("Number of messages that have been delivered (but potentially not acknowledged) to consumers.")
-    long getDispatchCount();
-
-    /**
-     * Returns the number of messages that have been acknowledged from the
-     * destination.
-     * 
-     * @return The number of messages that have been acknowledged from the
-     *         destination.
-     */
-    @MBeanInfo("Number of messages that have been acknowledged (and removed from) from the destination.")
-    long getDequeueCount();
-    
-    /**
-     * Returns the number of messages that have been dispatched but not
-     * acknowledged
-     * 
-     * @return The number of messages that have been dispatched but not
-     * acknowledged
-     */
-    @MBeanInfo("Number of messages that have been dispatched to, but not acknowledged by, consumers.")
-    long getInFlightCount();
-
-    /**
-     * Returns the number of messages that have expired
-     * 
-     * @return The number of messages that have expired
-     */
-    @MBeanInfo("Number of messages that have been expired.")
-    long getExpiredCount();
-    
-    /**
-     * Returns the number of consumers subscribed this destination.
-     * 
-     * @return The number of consumers subscribed this destination.
-     */
-    @MBeanInfo("Number of consumers subscribed to this destination.")
-    long getConsumerCount();
-    
-    /**
-     * @return the number of producers publishing to the destination
-     */
-    @MBeanInfo("Number of producers publishing to this destination")
-    long getProducerCount();
-
-    /**
-     * Returns the number of messages in this destination which are yet to be
-     * consumed
-     * 
-     * @return Returns the number of messages in this destination which are yet
-     *         to be consumed
-     */
-    @MBeanInfo("Number of messages in the destination which are yet to be consumed.  Potentially dispatched but unacknowledged.")
-    long getQueueSize();
-
-    /**
-     * @return An array of all the messages in the destination's queue.
-     */
-    @MBeanInfo("An array of all messages in the destination. Not HTML friendly.")
-    CompositeData[] browse() throws OpenDataException;
-
-    /**
-     * @return A list of all the messages in the destination's queue.
-     */
-    @MBeanInfo("A list of all messages in the destination. Not HTML friendly.")
-    TabularData browseAsTable() throws OpenDataException;
-
-    /**
-     * @return An array of all the messages in the destination's queue.
-     * @throws InvalidSelectorException
-     */
-    @MBeanInfo("An array of all messages in the destination based on an SQL-92 selection on the message headers or XPATH on the body. Not HTML friendly.")
-    CompositeData[] browse(@MBeanInfo("selector") String selector) throws OpenDataException, InvalidSelectorException;
-
-    /**
-     * @return A list of all the messages in the destination's queue.
-     * @throws InvalidSelectorException
-     */
-    @MBeanInfo("A list of all messages in the destination based on an SQL-92 selection on the message headers or XPATH on the body. Not HTML friendly.")
-    TabularData browseAsTable(@MBeanInfo("selector") String selector) throws OpenDataException, InvalidSelectorException;
-
-    /**
-     * Sends a TextMesage to the destination.
-     * 
-     * @param body the text to send
-     * @return the message id of the message sent.
-     * @throws Exception
-     */
-    @MBeanInfo("Sends a TextMessage to the destination.")
-    String sendTextMessage(@MBeanInfo("body") String body) throws Exception;
-
-    /**
-     * Sends a TextMesage to the destination.
-     * 
-     * @param headers the message headers and properties to set. Can only
-     *                container Strings maped to primitive types.
-     * @param body the text to send
-     * @return the message id of the message sent.
-     * @throws Exception
-     */
-    @MBeanInfo("Sends a TextMessage to the destination.")
-    String sendTextMessage(@MBeanInfo("headers") Map<?,?> headers, @MBeanInfo("body") String body) throws Exception;
-
-    /**
-     * Sends a TextMesage to the destination.
-     * @param body the text to send
-     * @param user
-     * @param password
-     * @return
-     * @throws Exception
-     */
-    @MBeanInfo("Sends a TextMessage to a password-protected destination.")
-    String sendTextMessage(@MBeanInfo("body") String body, @MBeanInfo("user") String user, @MBeanInfo("password") String password) throws Exception;
-    
-    /**
-     * 
-     * @param headers the message headers and properties to set. Can only
-     *                container Strings maped to primitive types.
-     * @param body the text to send
-     * @param user
-     * @param password
-     * @return
-     * @throws Exception
-     */
-    @MBeanInfo("Sends a TextMessage to a password-protected destination.")
-    String sendTextMessage(@MBeanInfo("headers") Map<?,?> headers, @MBeanInfo("body") String body, @MBeanInfo("user") String user, @MBeanInfo("password") String password) throws Exception;
-    /**
-     * @return the percentage of amount of memory used
-     */
-    @MBeanInfo("The percentage of the memory limit used")
-    int getMemoryPercentUsage();
-
-    /**
-     * @return the amount of memory allocated to this destination
-     */
-    @MBeanInfo("Memory limit, in bytes, used for holding undelivered messages before paging to temporary storage.")
-    long getMemoryLimit();
-
-    /**
-     * set the amount of memory allocated to this destination
-     * @param limit
-     */
-    void setMemoryLimit(long limit);
-    
-    /**
-     * @return the portion of memory from the broker memory limit for this destination
-     */
-    @MBeanInfo("Portion of memory from the broker memory limit for this destination")
-    float getMemoryUsagePortion();
-    
-    /**
-     * set the portion of memory from the broker memory limit for this destination
-     * @param value
-     */
-    void setMemoryUsagePortion(@MBeanInfo("bytes") float value);
-
-    /**
-     * Browses the current destination returning a list of messages
-     */
-    @MBeanInfo("A list of all messages in the destination. Not HTML friendly.")
-    List<?> browseMessages() throws InvalidSelectorException;
-
-    /**
-     * Browses the current destination with the given selector returning a list
-     * of messages
-     */
-    @MBeanInfo("A list of all messages in the destination based on an SQL-92 selection on the message headers or XPATH on the body. Not HTML friendly.")
-    List<?> browseMessages(String selector) throws InvalidSelectorException;
-
-    /**
-     * @return longest time a message is held by a destination
-     */
-    @MBeanInfo("The longest time a message has been held this destination.")
-    long getMaxEnqueueTime();
-
-    /**
-     * @return shortest time a message is held by a destination
-     */
-    @MBeanInfo("The shortest time a message has been held this destination.")
-    long getMinEnqueueTime();
-
-    /**
-     * @return average time a message is held by a destination
-     */
-    @MBeanInfo("Average time a message has been held this destination.")
-    double getAverageEnqueueTime();
-    
-    /**
-     * @return the producerFlowControl
-     */
-    @MBeanInfo("Producers are flow controlled")
-    boolean isProducerFlowControl();
-    
-    /**
-     * @param producerFlowControl the producerFlowControl to set
-     */
-    public void setProducerFlowControl(@MBeanInfo("producerFlowControl") boolean producerFlowControl);
-    
-    /**
-     * Set's the interval at which warnings about producers being blocked by
-     * resource usage will be triggered. Values of 0 or less will disable
-     * warnings
-     * 
-     * @param blockedProducerWarningInterval the interval at which warning about
-     *            blocked producers will be triggered.
-     */
-    public void setBlockedProducerWarningInterval(@MBeanInfo("blockedProducerWarningInterval")  long blockedProducerWarningInterval);
-
-    /**
-     * 
-     * @return the interval at which warning about blocked producers will be
-     *         triggered.
-     */
-    @MBeanInfo("Blocked Producer Warning Interval")
-    public long getBlockedProducerWarningInterval();
-    
-    /**
-     * @return the maxProducersToAudit
-     */
-    @MBeanInfo("Maximum number of producers to audit") 
-    public int getMaxProducersToAudit();
-    
-    /**
-     * @param maxProducersToAudit the maxProducersToAudit to set
-     */
-    public void setMaxProducersToAudit(@MBeanInfo("maxProducersToAudit") int maxProducersToAudit);
-    
-    /**
-     * @return the maxAuditDepth
-     */
-    @MBeanInfo("Max audit depth")
-    public int getMaxAuditDepth();
-    
-    /**
-     * @param maxAuditDepth the maxAuditDepth to set
-     */
-    public void setMaxAuditDepth(@MBeanInfo("maxAuditDepth") int maxAuditDepth);
-    
-    /**
-     * @return the maximum number of message to be paged into the 
-     * destination
-     */
-    @MBeanInfo("Maximum number of messages to be paged in")
-    public int getMaxPageSize();
-    
-    /**
-     * @param pageSize
-     * Set the maximum number of messages to page into the destination
-     */
-    public void setMaxPageSize(@MBeanInfo("pageSize") int pageSize);
-    
-    /**
-     * @return true if caching is allowed of for the destination
-     */
-    @MBeanInfo("Caching is allowed")
-    public boolean isUseCache();
-    
-    /**
-     * @return true if prioritized messages are enabled for the destination
-     */
-    @MBeanInfo("Prioritized messages is enabled")
-    public boolean isPrioritizedMessages();
-    
-    /**
-     * @param value
-     * enable/disable caching on the destination
-     */
-    public void setUseCache(@MBeanInfo("cache") boolean value);
-
-    /**
-     * Returns all the current subscription MBeans matching this destination
-     * 
-     * @return the names of the subscriptions for this destination
-     */
-    @MBeanInfo("returns all the current subscription MBeans matching this destination")
-    ObjectName[] getSubscriptions() throws IOException, MalformedObjectNameException;
-
-
-    /**
-     * Returns the slow consumer strategy MBean for this destination
-     *
-     * @return the name of the slow consumer handler MBean for this destination
-     */
-    @MBeanInfo("returns the optional slowConsumer handler MBeans for this destination")
-    ObjectName getSlowConsumerStrategy() throws IOException, MalformedObjectNameException;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionView.java
deleted file mode 100755
index 78d05d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionView.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-
-/**
- * 
- */
-public class DurableSubscriptionView extends SubscriptionView implements DurableSubscriptionViewMBean {
-
-    protected ManagedRegionBroker broker;
-    protected String subscriptionName;
-    protected DurableTopicSubscription durableSub;
-
-    /**
-     * Constructor
-     * 
-     * @param clientId
-     * @param sub
-     */
-    public DurableSubscriptionView(ManagedRegionBroker broker, String clientId, Subscription sub) {
-        super(clientId, sub);
-        this.broker = broker;
-        this.durableSub=(DurableTopicSubscription) sub;
-        if (sub != null) {
-            this.subscriptionName = sub.getConsumerInfo().getSubscriptionName();
-        }
-    }
-
-    /**
-     * @return name of the durable consumer
-     */
-    public String getSubscriptionName() {
-        return subscriptionName;
-    }
-
-    /**
-     * Browse messages for this durable subscriber
-     * 
-     * @return messages
-     * @throws OpenDataException
-     */
-    public CompositeData[] browse() throws OpenDataException {
-        return broker.browse(this);
-    }
-
-    /**
-     * Browse messages for this durable subscriber
-     * 
-     * @return messages
-     * @throws OpenDataException
-     */
-    public TabularData browseAsTable() throws OpenDataException {
-        return broker.browseAsTable(this);
-    }
-
-    /**
-     * Destroys the durable subscription so that messages will no longer be
-     * stored for this subscription
-     */
-    public void destroy() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        info.setClientId(clientId);
-        info.setSubscriptionName(subscriptionName);
-        ConnectionContext context = new ConnectionContext();
-        context.setBroker(broker);
-        context.setClientId(clientId);
-        broker.removeSubscription(context, info);
-    }
-
-    public String toString() {
-        return "ActiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName();
-    }
-
-    
-    public int cursorSize() {
-        if (durableSub != null && durableSub.getPending() != null) {
-            return durableSub.getPending().size();
-        }
-        return 0;
-    }
-
-   
-    public boolean doesCursorHaveMessagesBuffered() {
-        if (durableSub != null && durableSub.getPending() != null) {
-            return durableSub.getPending().hasMessagesBufferedToDeliver();
-        }
-        return false;
-    }
-
-   
-    public boolean doesCursorHaveSpace() {
-        if (durableSub != null && durableSub.getPending() != null) {
-            return durableSub.getPending().hasSpace();
-        }
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.broker.jmx.DurableSubscriptionViewMBean#getCursorMemoryUsage()
-     */
-    public long getCursorMemoryUsage() {
-        if (durableSub != null && durableSub.getPending() != null && durableSub.getPending().getSystemUsage()!=null) {
-            return durableSub.getPending().getSystemUsage().getMemoryUsage().getUsage();
-        }
-        return 0;
-    }
-
-    
-    public int getCursorPercentUsage() {
-        if (durableSub != null && durableSub.getPending() != null && durableSub.getPending().getSystemUsage()!=null) {
-            return durableSub.getPending().getSystemUsage().getMemoryUsage().getPercentUsage();
-        }
-        return 0;
-    }
-
-    public boolean isCursorFull() {
-        if (durableSub != null && durableSub.getPending() != null) {
-            return durableSub.getPending().isFull();
-        }
-        return false;
-    }
-
-    @Override
-    public boolean isActive() {
-        return durableSub.isActive();
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionViewMBean.java
deleted file mode 100755
index df0841b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionViewMBean.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
-/**
- * 
- */
-public interface DurableSubscriptionViewMBean extends SubscriptionViewMBean {
-    /**
-     * @return name of the durable subscription name
-     */
-    String getSubscriptionName();
-
-    /**
-     * Browse messages for this durable subscriber
-     * 
-     * @return messages
-     * @throws OpenDataException
-     */
-    CompositeData[] browse() throws OpenDataException;
-
-    /**
-     * Browse messages for this durable subscriber
-     * 
-     * @return messages
-     * @throws OpenDataException
-     */
-    TabularData browseAsTable() throws OpenDataException;
-
-    /**
-     * Destroys the durable subscription so that messages will no longer be
-     * stored for this subscription
-     */
-    void destroy() throws Exception;
-    
-    /**
-     * @return true if the message cursor has memory space available
-     * to page in more messages
-     */
-    public boolean doesCursorHaveSpace();
-    
-    /**
-     * @return true if the cursor has reached its memory limit for
-     * paged in messages
-     */
-    public boolean isCursorFull();
-    
-    /**
-     * @return true if the cursor has messages buffered to deliver
-     */
-    public boolean doesCursorHaveMessagesBuffered();
-    
-    /**
-     * @return the cursor memory usage in bytes
-     */
-    public long getCursorMemoryUsage();
-    
-    /**
-     * @return the cursor memory usage as a percentage
-     */
-    public int getCursorPercentUsage();
-    
-    /**
-     * @return the number of messages available to be paged in 
-     * by the cursor
-     */
-    public int cursorSize();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/FTConnectorView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/FTConnectorView.java
deleted file mode 100644
index 3553e1e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/FTConnectorView.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.ft.MasterConnector;
-
-public class FTConnectorView implements FTConnectorViewMBean {
-
-    private final MasterConnector connector;
-
-    public FTConnectorView(MasterConnector connector) {
-        this.connector = connector;
-    }
-    
-    public void start() throws Exception {
-        connector.start();
-    }
-
-    public void stop() throws Exception {
-        connector.stop();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/FTConnectorViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/FTConnectorViewMBean.java
deleted file mode 100644
index a70ca41..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/FTConnectorViewMBean.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-
-public interface FTConnectorViewMBean extends Service {
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/InactiveDurableSubscriptionView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/InactiveDurableSubscriptionView.java
deleted file mode 100755
index 0fb2179..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/InactiveDurableSubscriptionView.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.SubscriptionInfo;
-
-/**
- * 
- * 
- */
-public class InactiveDurableSubscriptionView extends DurableSubscriptionView implements DurableSubscriptionViewMBean {
-    protected SubscriptionInfo subscriptionInfo;
-
-    /**
-     * Constructor
-     * 
-     * @param broker
-     * @param clientId
-     * @param sub
-     */
-    public InactiveDurableSubscriptionView(ManagedRegionBroker broker, String clientId, SubscriptionInfo sub) {
-        super(broker,clientId, null);
-        this.broker = broker;
-        this.subscriptionInfo = sub;
-    }
-
-    /**
-     * @return the id of the Subscription
-     */
-    public long getSubcriptionId() {
-        return -1;
-    }
-
-    /**
-     * @return the destination name
-     */
-    public String getDestinationName() {
-        return subscriptionInfo.getDestination().getPhysicalName();
-
-    }
-
-    /**
-     * @return true if the destination is a Queue
-     */
-    public boolean isDestinationQueue() {
-        return false;
-    }
-
-    /**
-     * @return true of the destination is a Topic
-     */
-    public boolean isDestinationTopic() {
-        return true;
-    }
-
-    /**
-     * @return true if the destination is temporary
-     */
-    public boolean isDestinationTemporary() {
-        return false;
-    }
-
-    /**
-     * @return name of the durable consumer
-     */
-    public String getSubscriptionName() {
-        return subscriptionInfo.getSubscriptionName();
-    }
-
-    /**
-     * @return true if the subscriber is active
-     */
-    public boolean isActive() {
-        return false;
-    }
-
-    /**
-     * Browse messages for this durable subscriber
-     * 
-     * @return messages
-     * @throws OpenDataException
-     */
-    public CompositeData[] browse() throws OpenDataException {
-        return broker.browse(this);
-    }
-
-    /**
-     * Browse messages for this durable subscriber
-     * 
-     * @return messages
-     * @throws OpenDataException
-     */
-    public TabularData browseAsTable() throws OpenDataException {
-        return broker.browseAsTable(this);
-    }
-
-    /**
-     * Destroys the durable subscription so that messages will no longer be
-     * stored for this subscription
-     */
-    public void destroy() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        info.setClientId(clientId);
-        info.setSubscriptionName(subscriptionInfo.getSubscriptionName());
-        ConnectionContext context = new ConnectionContext();
-        context.setBroker(broker);
-        context.setClientId(clientId);
-        broker.removeSubscription(context, info);
-    }
-
-    public String toString() {
-        return "InactiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JmsConnectorView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JmsConnectorView.java
deleted file mode 100644
index b4a57df..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JmsConnectorView.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.network.jms.JmsConnector;
-
-public class JmsConnectorView implements JmsConnectorViewMBean {
-
-    private final JmsConnector connector;
-
-    public JmsConnectorView(JmsConnector connector) {
-        this.connector = connector;
-    }
-    
-    public void start() throws Exception {
-        connector.start();
-    }
-
-    public void stop() throws Exception {
-        connector.stop();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JmsConnectorViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JmsConnectorViewMBean.java
deleted file mode 100644
index 21113b2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JmsConnectorViewMBean.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-
-public interface JmsConnectorViewMBean extends Service {
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerView.java
deleted file mode 100644
index bb31ad8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerView.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import java.io.IOException;
-import java.util.List;
-import javax.management.openmbean.CompositeDataSupport;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.TabularData;
-import javax.management.openmbean.TabularDataSupport;
-import javax.management.openmbean.TabularType;
-import org.apache.activemq.broker.jmx.OpenTypeSupport.OpenTypeFactory;
-import org.apache.activemq.broker.scheduler.Job;
-import org.apache.activemq.broker.scheduler.JobImpl;
-import org.apache.activemq.broker.scheduler.JobScheduler;
-
-public class JobSchedulerView implements JobSchedulerViewMBean {
-
-    private final JobScheduler jobScheduler;
-
-    public JobSchedulerView(JobScheduler jobScheduler) {
-        this.jobScheduler = jobScheduler;
-    }
-
-    public TabularData getAllJobs() throws Exception {
-        OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class);
-        CompositeType ct = factory.getCompositeType();
-        TabularType tt = new TabularType("Scheduled Jobs", "Scheduled Jobs", ct, new String[] { "jobId" });
-        TabularDataSupport rc = new TabularDataSupport(tt);
-        List<Job> jobs = this.jobScheduler.getAllJobs();
-        for (Job job : jobs) {
-            rc.put(new CompositeDataSupport(ct, factory.getFields(job)));
-        }
-        return rc;
-    }
-
-    public TabularData getAllJobs(String startTime, String finishTime) throws Exception {
-        OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class);
-        CompositeType ct = factory.getCompositeType();
-        TabularType tt = new TabularType("Scheduled Jobs", "Scheduled Jobs", ct, new String[] { "jobId" });
-        TabularDataSupport rc = new TabularDataSupport(tt);
-        long start = JobImpl.getDataTime(startTime);
-        long finish = JobImpl.getDataTime(finishTime);
-        List<Job> jobs = this.jobScheduler.getAllJobs(start, finish);
-        for (Job job : jobs) {
-            rc.put(new CompositeDataSupport(ct, factory.getFields(job)));
-        }
-        return rc;
-    }
-
-    public TabularData getNextScheduleJobs() throws Exception {
-        OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class);
-        CompositeType ct = factory.getCompositeType();
-        TabularType tt = new TabularType("Scheduled Jobs", "Scheduled Jobs", ct, new String[] { "jobId" });
-        TabularDataSupport rc = new TabularDataSupport(tt);
-        List<Job> jobs = this.jobScheduler.getNextScheduleJobs();
-        for (Job job : jobs) {
-            rc.put(new CompositeDataSupport(ct, factory.getFields(job)));
-        }
-        return rc;
-    }
-
-    public String getNextScheduleTime() throws Exception {
-        long time = this.jobScheduler.getNextScheduleTime();
-        return JobImpl.getDateTime(time);
-    }
-
-    public void removeAllJobs() throws Exception {
-        this.jobScheduler.removeAllJobs();
-
-    }
-
-    public void removeAllJobs(String startTime, String finishTime) throws Exception {
-        long start = JobImpl.getDataTime(startTime);
-        long finish = JobImpl.getDataTime(finishTime);
-        this.jobScheduler.removeAllJobs(start, finish);
-
-    }
-
-    public void removeJob(String jobId) throws Exception {
-        this.jobScheduler.remove(jobId);
-
-    }
-
-    public void removeJobAtScheduledTime(String time) throws IOException {
-        // TODO Auto-generated method stub
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerViewMBean.java
deleted file mode 100644
index f5745ea..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerViewMBean.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.openmbean.TabularData;
-
-
-
-public interface JobSchedulerViewMBean {
-    /**
-     * remove all jobs scheduled to run at this time
-     * @param time
-     * @throws Exception
-     */
-    @MBeanInfo("remove jobs with matching execution time")
-    public abstract void removeJobAtScheduledTime(@MBeanInfo("time: yyyy-MM-dd hh:mm:ss")String time) throws Exception;
-
-    /**
-     * remove a job with the matching jobId
-     * @param jobId
-     * @throws Exception
-     */
-    @MBeanInfo("remove jobs with matching jobId")
-    public abstract void removeJob(@MBeanInfo("jobId")String jobId) throws Exception;
-    
-    /**
-     * remove all the Jobs from the scheduler
-     * @throws Exception
-     */
-    @MBeanInfo("remove all scheduled jobs")
-    public abstract void removeAllJobs() throws Exception;
-    
-    /**
-     * remove all the Jobs from the scheduler that are due between the start and finish times
-     * @param start time 
-     * @param finish time
-     * @throws Exception
-     */
-    @MBeanInfo("remove all scheduled jobs between time ranges ")
-    public abstract void removeAllJobs(@MBeanInfo("start: yyyy-MM-dd hh:mm:ss")String start,@MBeanInfo("finish: yyyy-MM-dd hh:mm:ss")String finish) throws Exception;
-    
-
-    
-    /**
-     * Get the next time jobs will be fired
-     * @return the time in milliseconds
-     * @throws Exception 
-     */
-    @MBeanInfo("get the next time a job is due to be scheduled ")
-    public abstract String getNextScheduleTime() throws Exception;
-    
-    /**
-     * Get all the jobs scheduled to run next
-     * @return a list of jobs that will be scheduled next
-     * @throws Exception
-     */
-    @MBeanInfo("get the next job(s) to be scheduled. Not HTML friendly ")
-    public abstract TabularData getNextScheduleJobs() throws Exception;
-    
-    /**
-     * Get all the outstanding Jobs
-     * @return a  table of all jobs
-     * @throws Exception
-
-     */
-    @MBeanInfo("get the scheduled Jobs in the Store. Not HTML friendly ")
-    public abstract TabularData getAllJobs() throws Exception;
-    
-    /**
-     * Get all outstanding jobs due to run between start and finish
-     * @param start
-     * @param finish
-     * @return a table of jobs in the range
-     * @throws Exception
-
-     */
-    @MBeanInfo("get the scheduled Jobs in the Store within the time range. Not HTML friendly ")
-    public abstract TabularData getAllJobs(@MBeanInfo("start: yyyy-MM-dd hh:mm:ss")String start,@MBeanInfo("finish: yyyy-MM-dd hh:mm:ss")String finish)throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/MBeanInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/MBeanInfo.java
deleted file mode 100644
index 907ff15..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/MBeanInfo.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import static java.lang.annotation.ElementType.*;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({CONSTRUCTOR, METHOD, PARAMETER, TYPE, FIELD})
-public @interface MBeanInfo {
-    String value();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedQueueRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedQueueRegion.java
deleted file mode 100755
index 7e3bf55..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedQueueRegion.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.jms.JMSException;
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFactory;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.QueueRegion;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-
-public class ManagedQueueRegion extends QueueRegion {
-
-    private final ManagedRegionBroker regionBroker;
-
-    public ManagedQueueRegion(ManagedRegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                              DestinationFactory destinationFactory) {
-        super(broker, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-        regionBroker = broker;
-    }
-
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws JMSException {
-        Subscription sub = super.createSubscription(context, info);
-        ObjectName name = regionBroker.registerSubscription(context, sub);
-        sub.setObjectName(name);
-        return sub;
-    }
-
-    protected void destroySubscription(Subscription sub) {
-        regionBroker.unregisterSubscription(sub);
-        super.destroySubscription(sub);
-    }
-
-    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
-        Destination rc = super.createDestination(context, destination);
-        regionBroker.register(destination, rc);
-        return rc;
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, destination, timeout);
-        regionBroker.unregister(destination);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
deleted file mode 100755
index 6df655e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
+++ /dev/null
@@ -1,627 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.ThreadPoolExecutor;
-import javax.management.InstanceNotFoundException;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.CompositeDataSupport;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-import javax.management.openmbean.TabularDataSupport;
-import javax.management.openmbean.TabularType;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.jmx.OpenTypeSupport.OpenTypeFactory;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFactory;
-import org.apache.activemq.broker.region.DestinationFactoryImpl;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.Region;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.broker.region.TopicRegion;
-import org.apache.activemq.broker.region.TopicSubscription;
-import org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy;
-import org.apache.activemq.broker.region.policy.SlowConsumerStrategy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.JMXSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.SubscriptionKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ManagedRegionBroker extends RegionBroker {
-    private static final Logger LOG = LoggerFactory.getLogger(ManagedRegionBroker.class);
-    private final ManagementContext managementContext;
-    private final ObjectName brokerObjectName;
-    private final Map<ObjectName, DestinationView> topics = new ConcurrentHashMap<ObjectName, DestinationView>();
-    private final Map<ObjectName, DestinationView> queues = new ConcurrentHashMap<ObjectName, DestinationView>();
-    private final Map<ObjectName, DestinationView> temporaryQueues = new ConcurrentHashMap<ObjectName, DestinationView>();
-    private final Map<ObjectName, DestinationView> temporaryTopics = new ConcurrentHashMap<ObjectName, DestinationView>();
-    private final Map<ObjectName, SubscriptionView> queueSubscribers = new ConcurrentHashMap<ObjectName, SubscriptionView>();
-    private final Map<ObjectName, SubscriptionView> topicSubscribers = new ConcurrentHashMap<ObjectName, SubscriptionView>();
-    private final Map<ObjectName, SubscriptionView> durableTopicSubscribers = new ConcurrentHashMap<ObjectName, SubscriptionView>();
-    private final Map<ObjectName, SubscriptionView> inactiveDurableTopicSubscribers = new ConcurrentHashMap<ObjectName, SubscriptionView>();
-    private final Map<ObjectName, SubscriptionView> temporaryQueueSubscribers = new ConcurrentHashMap<ObjectName, SubscriptionView>();
-    private final Map<ObjectName, SubscriptionView> temporaryTopicSubscribers = new ConcurrentHashMap<ObjectName, SubscriptionView>();
-    private final Map<SubscriptionKey, ObjectName> subscriptionKeys = new ConcurrentHashMap<SubscriptionKey, ObjectName>();
-    private final Map<Subscription, ObjectName> subscriptionMap = new ConcurrentHashMap<Subscription, ObjectName>();
-    private final Set<ObjectName> registeredMBeans = new CopyOnWriteArraySet<ObjectName>();
-    /* This is the first broker in the broker interceptor chain. */
-    private Broker contextBroker;
-
-    public ManagedRegionBroker(BrokerService brokerService, ManagementContext context, ObjectName brokerObjectName, TaskRunnerFactory taskRunnerFactory, SystemUsage memoryManager,
-                               DestinationFactory destinationFactory, DestinationInterceptor destinationInterceptor,Scheduler scheduler,ThreadPoolExecutor executor) throws IOException {
-        super(brokerService, taskRunnerFactory, memoryManager, destinationFactory, destinationInterceptor,scheduler,executor);
-        this.managementContext = context;
-        this.brokerObjectName = brokerObjectName;
-    }
-
-    @Override
-    public void start() throws Exception {
-        super.start();
-        // build all existing durable subscriptions
-        buildExistingSubscriptions();
-    }
-
-    @Override
-    protected void doStop(ServiceStopper stopper) {
-        super.doStop(stopper);
-        // lets remove any mbeans not yet removed
-        for (Iterator<ObjectName> iter = registeredMBeans.iterator(); iter.hasNext();) {
-            ObjectName name = iter.next();
-            try {
-                managementContext.unregisterMBean(name);
-            } catch (InstanceNotFoundException e) {
-                LOG.warn("The MBean: " + name + " is no longer registered with JMX");
-            } catch (Exception e) {
-                stopper.onException(this, e);
-            }
-        }
-        registeredMBeans.clear();
-    }
-
-    @Override
-    protected Region createQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new ManagedQueueRegion(this, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    @Override
-    protected Region createTempQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new ManagedTempQueueRegion(this, brokerService, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    @Override
-    protected Region createTempTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new ManagedTempTopicRegion(this, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    @Override
-    protected Region createTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new ManagedTopicRegion(this, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    public void register(ActiveMQDestination destName, Destination destination) {
-        // TODO refactor to allow views for custom destinations
-        try {
-            ObjectName objectName = createObjectName(destName);
-            DestinationView view;
-            if (destination instanceof Queue) {
-                view = new QueueView(this, (Queue)destination);
-            } else if (destination instanceof Topic) {
-                view = new TopicView(this, (Topic)destination);
-            } else {
-                view = null;
-                LOG.warn("JMX View is not supported for custom destination: " + destination);
-            }
-            if (view != null) {
-                registerDestination(objectName, destName, view);
-            }
-        } catch (Exception e) {
-            LOG.error("Failed to register destination " + destName, e);
-        }
-    }
-
-    public void unregister(ActiveMQDestination destName) {
-        try {
-            ObjectName objectName = createObjectName(destName);
-            unregisterDestination(objectName);
-        } catch (Exception e) {
-            LOG.error("Failed to unregister " + destName, e);
-        }
-    }
-
-    public ObjectName registerSubscription(ConnectionContext context, Subscription sub) {
-        String connectionClientId = context.getClientId();
-        ObjectName brokerJmxObjectName = brokerObjectName;
-        String objectNameStr = getSubscriptionObjectName(sub, connectionClientId, brokerJmxObjectName);
-        SubscriptionKey key = new SubscriptionKey(context.getClientId(), sub.getConsumerInfo().getSubscriptionName());
-        try {
-            ObjectName objectName = new ObjectName(objectNameStr);
-            SubscriptionView view;
-            if (sub.getConsumerInfo().getConsumerId().getConnectionId().equals("OFFLINE")) {
-                // add offline subscribers to inactive list
-                SubscriptionInfo info = new SubscriptionInfo();
-                info.setClientId(context.getClientId());
-                info.setSubscriptionName(sub.getConsumerInfo().getSubscriptionName());
-                info.setDestination(sub.getConsumerInfo().getDestination());
-                addInactiveSubscription(key, info);
-            } else {
-                if (sub.getConsumerInfo().isDurable()) {
-                    view = new DurableSubscriptionView(this, context.getClientId(), sub);
-                } else {
-                    if (sub instanceof TopicSubscription) {
-                        view = new TopicSubscriptionView(context.getClientId(), (TopicSubscription) sub);
-                    } else {
-                        view = new SubscriptionView(context.getClientId(), sub);
-                    }
-                }
-                registerSubscription(objectName, sub.getConsumerInfo(), key, view);
-            }
-            subscriptionMap.put(sub, objectName);
-            return objectName;
-        } catch (Exception e) {
-            LOG.error("Failed to register subscription " + sub, e);
-            return null;
-        }
-    }
-
-    public static String getSubscriptionObjectName(Subscription sub, String connectionClientId, ObjectName brokerJmxObjectName) {
-        Hashtable map = brokerJmxObjectName.getKeyPropertyList();
-        String brokerDomain = brokerJmxObjectName.getDomain();
-        String objectNameStr = brokerDomain + ":" + "BrokerName=" + map.get("BrokerName") + ",Type=Subscription,";
-        String destinationType = "destinationType=" + sub.getConsumerInfo().getDestination().getDestinationTypeAsString();
-        String destinationName = "destinationName=" + JMXSupport.encodeObjectNamePart(sub.getConsumerInfo().getDestination().getPhysicalName());
-        String clientId = "clientId=" + JMXSupport.encodeObjectNamePart(connectionClientId);
-        String persistentMode = "persistentMode=";
-        String consumerId = "";
-        if (sub.getConsumerInfo().isDurable()) {
-            persistentMode += "Durable,subscriptionID=" + JMXSupport.encodeObjectNamePart(sub.getConsumerInfo().getSubscriptionName());
-        } else {
-            persistentMode += "Non-Durable";
-            if (sub.getConsumerInfo() != null && sub.getConsumerInfo().getConsumerId() != null) {
-                consumerId = ",consumerId=" + JMXSupport.encodeObjectNamePart(sub.getConsumerInfo().getConsumerId().toString());
-            }
-        }
-        objectNameStr += persistentMode + ",";
-        objectNameStr += destinationType + ",";
-        objectNameStr += destinationName + ",";
-        objectNameStr += clientId;
-        objectNameStr += consumerId;
-        return objectNameStr;
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        Subscription sub = super.addConsumer(context, info);
-        SubscriptionKey subscriptionKey = new SubscriptionKey(sub.getContext().getClientId(), sub.getConsumerInfo().getSubscriptionName());
-        ObjectName inactiveName = subscriptionKeys.get(subscriptionKey);
-        if (inactiveName != null) {
-            // if it was inactive, register it
-            registerSubscription(context, sub);
-        }
-        return sub;
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        for (Subscription sub : subscriptionMap.keySet()) {
-            if (sub.getConsumerInfo().equals(info)) {
-               // unregister all consumer subs
-               unregisterSubscription(subscriptionMap.get(sub), true);
-            }
-        }
-        super.removeConsumer(context, info);
-    }
-
-    public void unregisterSubscription(Subscription sub) {
-        ObjectName name = subscriptionMap.remove(sub);
-        if (name != null) {
-            try {
-                SubscriptionKey subscriptionKey = new SubscriptionKey(sub.getContext().getClientId(), sub.getConsumerInfo().getSubscriptionName());
-                ObjectName inactiveName = subscriptionKeys.get(subscriptionKey);
-                if (inactiveName != null) {
-                    inactiveDurableTopicSubscribers.remove(inactiveName);
-                    managementContext.unregisterMBean(inactiveName);
-                }
-            } catch (Exception e) {
-                LOG.error("Failed to unregister subscription " + sub, e);
-            }
-        }
-    }
-
-    protected void registerDestination(ObjectName key, ActiveMQDestination dest, DestinationView view) throws Exception {
-        if (dest.isQueue()) {
-            if (dest.isTemporary()) {
-                temporaryQueues.put(key, view);
-            } else {
-                queues.put(key, view);
-            }
-        } else {
-            if (dest.isTemporary()) {
-                temporaryTopics.put(key, view);
-            } else {
-                topics.put(key, view);
-            }
-        }
-        try {
-            AnnotatedMBean.registerMBean(managementContext, view, key);
-            registeredMBeans.add(key);
-        } catch (Throwable e) {
-            LOG.warn("Failed to register MBean: " + key);
-            LOG.debug("Failure reason: " + e, e);
-        }
-    }
-
-    protected void unregisterDestination(ObjectName key) throws Exception {
-
-        DestinationView view = null;
-        removeAndRemember(topics, key, view);
-        removeAndRemember(queues, key, view);
-        removeAndRemember(temporaryQueues, key, view);
-        removeAndRemember(temporaryTopics, key, view);
-        if (registeredMBeans.remove(key)) {
-            try {
-                managementContext.unregisterMBean(key);
-            } catch (Throwable e) {
-                LOG.warn("Failed to unregister MBean: " + key);
-                LOG.debug("Failure reason: " + e, e);
-            }
-        }
-        if (view != null) {
-            key = view.getSlowConsumerStrategy();
-            if (key!= null && registeredMBeans.remove(key)) {
-                try {
-                    managementContext.unregisterMBean(key);
-                } catch (Throwable e) {
-                    LOG.warn("Failed to unregister slow consumer strategy MBean: " + key);
-                    LOG.debug("Failure reason: " + e, e);
-                }
-            }
-        }
-    }
-
-    private void removeAndRemember(Map<ObjectName, DestinationView> map, ObjectName key, DestinationView view) {
-        DestinationView candidate = map.remove(key);
-        if (candidate != null && view == null) {
-            view = candidate;
-        }
-    }
-
-    protected void registerSubscription(ObjectName key, ConsumerInfo info, SubscriptionKey subscriptionKey, SubscriptionView view) throws Exception {
-        ActiveMQDestination dest = info.getDestination();
-        if (dest.isQueue()) {
-            if (dest.isTemporary()) {
-                temporaryQueueSubscribers.put(key, view);
-            } else {
-                queueSubscribers.put(key, view);
-            }
-        } else {
-            if (dest.isTemporary()) {
-                temporaryTopicSubscribers.put(key, view);
-            } else {
-                if (info.isDurable()) {
-                    durableTopicSubscribers.put(key, view);
-                    // unregister any inactive durable subs
-                    try {
-                        ObjectName inactiveName = subscriptionKeys.get(subscriptionKey);
-                        if (inactiveName != null) {
-                            inactiveDurableTopicSubscribers.remove(inactiveName);
-                            registeredMBeans.remove(inactiveName);
-                            managementContext.unregisterMBean(inactiveName);
-                        }
-                    } catch (Throwable e) {
-                        LOG.error("Unable to unregister inactive durable subscriber: " + subscriptionKey, e);
-                    }
-                } else {
-                    topicSubscribers.put(key, view);
-                }
-            }
-        }
-
-        try {
-            AnnotatedMBean.registerMBean(managementContext, view, key);
-            registeredMBeans.add(key);
-        } catch (Throwable e) {
-            LOG.warn("Failed to register MBean: " + key);
-            LOG.debug("Failure reason: " + e, e);
-        }
-
-    }
-
-    protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception {
-        queueSubscribers.remove(key);
-        topicSubscribers.remove(key);
-        temporaryQueueSubscribers.remove(key);
-        temporaryTopicSubscribers.remove(key);
-        if (registeredMBeans.remove(key)) {
-            try {
-                managementContext.unregisterMBean(key);
-            } catch (Throwable e) {
-                LOG.warn("Failed to unregister MBean: " + key);
-                LOG.debug("Failure reason: " + e, e);
-            }
-        }
-        DurableSubscriptionView view = (DurableSubscriptionView)durableTopicSubscribers.remove(key);
-        if (view != null) {
-            // need to put this back in the inactive list
-            SubscriptionKey subscriptionKey = new SubscriptionKey(view.getClientId(), view.getSubscriptionName());
-            if (addToInactive) {
-                SubscriptionInfo info = new SubscriptionInfo();
-                info.setClientId(subscriptionKey.getClientId());
-                info.setSubscriptionName(subscriptionKey.getSubscriptionName());
-                info.setDestination(new ActiveMQTopic(view.getDestinationName()));
-                addInactiveSubscription(subscriptionKey, info);
-            }
-        }
-    }
-
-    protected void buildExistingSubscriptions() throws Exception {
-        Map<SubscriptionKey, SubscriptionInfo> subscriptions = new HashMap<SubscriptionKey, SubscriptionInfo>();
-        Set destinations = destinationFactory.getDestinations();
-        if (destinations != null) {
-            for (Iterator iter = destinations.iterator(); iter.hasNext();) {
-                ActiveMQDestination dest = (ActiveMQDestination)iter.next();
-                if (dest.isTopic()) {                
-                    SubscriptionInfo[] infos = destinationFactory.getAllDurableSubscriptions((ActiveMQTopic)dest);
-                    if (infos != null) {
-                        for (int i = 0; i < infos.length; i++) {
-                            SubscriptionInfo info = infos[i];
-                            SubscriptionKey key = new SubscriptionKey(info);
-                            if (!alreadyKnown(key)) {
-                                LOG.debug("Restoring durable subscription mbean: " + info);
-                                subscriptions.put(key, info);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        for (Iterator i = subscriptions.entrySet().iterator(); i.hasNext();) {
-            Map.Entry entry = (Entry)i.next();
-            SubscriptionKey key = (SubscriptionKey)entry.getKey();
-            SubscriptionInfo info = (SubscriptionInfo)entry.getValue();
-            addInactiveSubscription(key, info);
-        }
-    }
-
-    private boolean alreadyKnown(SubscriptionKey key) {
-        boolean known = false;
-        known = ((TopicRegion) getTopicRegion()).durableSubscriptionExists(key);
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Sub with key: " + key + ", " + (known ? "": "not") +  " already registered");
-        }
-        return known;
-    }
-
-    protected void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info) {
-        Hashtable map = brokerObjectName.getKeyPropertyList();
-        try {
-            ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName=" + map.get("BrokerName") + "," + "Type=Subscription," + "active=false,"
-                                                   + "name=" + JMXSupport.encodeObjectNamePart(key.toString()) + "");
-            SubscriptionView view = new InactiveDurableSubscriptionView(this, key.getClientId(), info);
-
-            try {
-                AnnotatedMBean.registerMBean(managementContext, view, objectName);
-                registeredMBeans.add(objectName);
-            } catch (Throwable e) {
-                LOG.warn("Failed to register MBean: " + key);
-                LOG.debug("Failure reason: " + e, e);
-            }
-
-            inactiveDurableTopicSubscribers.put(objectName, view);
-            subscriptionKeys.put(key, objectName);
-        } catch (Exception e) {
-            LOG.error("Failed to register subscription " + info, e);
-        }
-    }
-
-    public CompositeData[] browse(SubscriptionView view) throws OpenDataException {
-        List<Message> messages = getSubscriberMessages(view);
-        CompositeData c[] = new CompositeData[messages.size()];
-        for (int i = 0; i < c.length; i++) {
-            try {
-                c[i] = OpenTypeSupport.convert(messages.get(i));
-            } catch (Throwable e) {
-                LOG.error("failed to browse : " + view, e);
-            }
-        }
-        return c;
-    }
-
-    public TabularData browseAsTable(SubscriptionView view) throws OpenDataException {
-        OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class);
-        List<Message> messages = getSubscriberMessages(view);
-        CompositeType ct = factory.getCompositeType();
-        TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] {"JMSMessageID"});
-        TabularDataSupport rc = new TabularDataSupport(tt);
-        for (int i = 0; i < messages.size(); i++) {
-            rc.put(new CompositeDataSupport(ct, factory.getFields(messages.get(i))));
-        }
-        return rc;
-    }
-
-    protected List<Message> getSubscriberMessages(SubscriptionView view) {
-        // TODO It is very dangerous operation for big backlogs
-        if (!(destinationFactory instanceof DestinationFactoryImpl)) {
-            throw new RuntimeException("unsupported by " + destinationFactory);
-        }
-        PersistenceAdapter adapter = ((DestinationFactoryImpl)destinationFactory).getPersistenceAdapter();
-        final List<Message> result = new ArrayList<Message>();
-        try {
-            ActiveMQTopic topic = new ActiveMQTopic(view.getDestinationName());
-            TopicMessageStore store = adapter.createTopicMessageStore(topic);
-            store.recover(new MessageRecoveryListener() {
-                public boolean recoverMessage(Message message) throws Exception {
-                    result.add(message);
-                    return true;
-                }
-
-                public boolean recoverMessageReference(MessageId messageReference) throws Exception {
-                    throw new RuntimeException("Should not be called.");
-                }
-
-                public boolean hasSpace() {
-                    return true;
-                }
-                
-                public boolean isDuplicate(MessageId id) {
-                    return false;
-                }
-            });
-        } catch (Throwable e) {
-            LOG.error("Failed to browse messages for Subscription " + view, e);
-        }
-        return result;
-
-    }
-
-    protected ObjectName[] getTopics() {
-        Set<ObjectName> set = topics.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getQueues() {
-        Set<ObjectName> set = queues.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getTemporaryTopics() {
-        Set<ObjectName> set = temporaryTopics.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getTemporaryQueues() {
-        Set<ObjectName> set = temporaryQueues.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getTopicSubscribers() {
-        Set<ObjectName> set = topicSubscribers.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getDurableTopicSubscribers() {
-        Set<ObjectName> set = durableTopicSubscribers.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getQueueSubscribers() {
-        Set<ObjectName> set = queueSubscribers.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getTemporaryTopicSubscribers() {
-        Set<ObjectName> set = temporaryTopicSubscribers.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getTemporaryQueueSubscribers() {
-        Set<ObjectName> set = temporaryQueueSubscribers.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    protected ObjectName[] getInactiveDurableTopicSubscribers() {
-        Set<ObjectName> set = inactiveDurableTopicSubscribers.keySet();
-        return set.toArray(new ObjectName[set.size()]);
-    }
-
-    public Broker getContextBroker() {
-        return contextBroker;
-    }
-
-    public void setContextBroker(Broker contextBroker) {
-        this.contextBroker = contextBroker;
-    }
-
-    protected ObjectName createObjectName(ActiveMQDestination destName) throws MalformedObjectNameException {
-        // Build the object name for the destination
-        Hashtable map = brokerObjectName.getKeyPropertyList();
-        ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName=" + map.get("BrokerName") + "," + "Type="
-                                               + JMXSupport.encodeObjectNamePart(destName.getDestinationTypeAsString()) + "," + "Destination="
-                                               + JMXSupport.encodeObjectNamePart(destName.getPhysicalName()));
-        return objectName;
-    }
-
-    public ObjectName registerSlowConsumerStrategy(AbortSlowConsumerStrategy strategy) throws MalformedObjectNameException {
-        ObjectName objectName = null;
-        try {
-            objectName = createObjectName(strategy);
-            if (!registeredMBeans.contains(objectName))  {
-                AbortSlowConsumerStrategyView view = new AbortSlowConsumerStrategyView(this, strategy);
-                AnnotatedMBean.registerMBean(managementContext, view, objectName);
-                registeredMBeans.add(objectName);
-            }
-        } catch (Exception e) {
-            LOG.warn("Failed to register MBean: " + strategy);
-            LOG.debug("Failure reason: " + e, e);
-        }
-        return objectName;
-    }
-
-    private ObjectName createObjectName(AbortSlowConsumerStrategy strategy) throws MalformedObjectNameException{
-        Hashtable map = brokerObjectName.getKeyPropertyList();
-        ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName=" + map.get("BrokerName") + ","
-                            + "Type=SlowConsumerStrategy," + "InstanceName=" + JMXSupport.encodeObjectNamePart(strategy.getName()));
-        return objectName;            
-    }
-
-    public ObjectName getSubscriberObjectName(Subscription key) {
-        return subscriptionMap.get(key);
-    }
-
-    public Subscription getSubscriber(ObjectName key) {
-        Subscription sub = null;
-        for (Entry<Subscription, ObjectName> entry: subscriptionMap.entrySet()) {
-            if (entry.getValue().equals(key)) {
-                sub = entry.getKey();
-                break;
-            }
-        }
-        return sub;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTempQueueRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTempQueueRegion.java
deleted file mode 100755
index 98316cb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTempQueueRegion.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.jms.JMSException;
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFactory;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.TempQueueRegion;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-
-public class ManagedTempQueueRegion extends TempQueueRegion {
-
-    private final ManagedRegionBroker regionBroker;
-
-    public ManagedTempQueueRegion(ManagedRegionBroker broker, BrokerService brokerService, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                                  DestinationFactory destinationFactory) {
-        super(broker, brokerService, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-        this.regionBroker = broker;
-    }
-
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws JMSException {
-        Subscription sub = super.createSubscription(context, info);
-        ObjectName name = regionBroker.registerSubscription(context, sub);
-        sub.setObjectName(name);
-        return sub;
-    }
-
-    protected void destroySubscription(Subscription sub) {
-        regionBroker.unregisterSubscription(sub);
-        super.destroySubscription(sub);
-    }
-
-    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
-        Destination rc = super.createDestination(context, destination);
-        regionBroker.register(destination, rc);
-        return rc;
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, destination, timeout);
-        regionBroker.unregister(destination);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTempTopicRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTempTopicRegion.java
deleted file mode 100755
index ebc8720..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTempTopicRegion.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.jms.JMSException;
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFactory;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.TempTopicRegion;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-
-public class ManagedTempTopicRegion extends TempTopicRegion {
-
-    private final ManagedRegionBroker regionBroker;
-
-    public ManagedTempTopicRegion(ManagedRegionBroker regionBroker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                                  DestinationFactory destinationFactory) {
-        super(regionBroker, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-        this.regionBroker = regionBroker;
-    }
-
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws JMSException {
-        Subscription sub = super.createSubscription(context, info);
-        ObjectName name = regionBroker.registerSubscription(context, sub);
-        sub.setObjectName(name);
-        return sub;
-    }
-
-    protected void destroySubscription(Subscription sub) {
-        regionBroker.unregisterSubscription(sub);
-        super.destroySubscription(sub);
-    }
-
-    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
-        Destination rc = super.createDestination(context, destination);
-        regionBroker.register(destination, rc);
-        return rc;
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, destination, timeout);
-        regionBroker.unregister(destination);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTopicRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTopicRegion.java
deleted file mode 100755
index 50fb998..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTopicRegion.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.jms.JMSException;
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFactory;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.TopicRegion;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-
-public class ManagedTopicRegion extends TopicRegion {
-
-    private final ManagedRegionBroker regionBroker;
-
-    public ManagedTopicRegion(ManagedRegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                              DestinationFactory destinationFactory) {
-        super(broker, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-        regionBroker = broker;
-    }
-
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws JMSException {
-        Subscription sub = super.createSubscription(context, info);
-        ObjectName name = regionBroker.registerSubscription(context, sub);
-        sub.setObjectName(name);
-        return sub;
-    }
-
-    protected void destroySubscription(Subscription sub) {
-        regionBroker.unregisterSubscription(sub);
-        super.destroySubscription(sub);
-    }
-
-    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
-        Destination rc = super.createDestination(context, destination);
-        regionBroker.register(destination, rc);
-        return rc;
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, destination, timeout);
-        regionBroker.unregister(destination);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java
deleted file mode 100644
index 57a8647..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.TransportConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.JMXSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.IOException;
-import java.util.Hashtable;
-import javax.management.ObjectName;
-
-/**
- * A managed transport connection
- * 
- * 
- */
-public class ManagedTransportConnection extends TransportConnection {
-    private static final Logger LOG = LoggerFactory.getLogger(ManagedTransportConnection.class);
-
-    private final ManagementContext managementContext;
-    private final ObjectName connectorName;
-    private ConnectionViewMBean mbean;
-
-    private ObjectName byClientIdName;
-    private ObjectName byAddressName;
-
-    public ManagedTransportConnection(TransportConnector connector, Transport transport, Broker broker,
-                                      TaskRunnerFactory factory, ManagementContext context, ObjectName connectorName)
-        throws IOException {
-        super(connector, transport, broker, factory);
-        this.managementContext = context;
-        this.connectorName = connectorName;
-        this.mbean = new ConnectionView(this);
-        byAddressName = createByAddressObjectName("address", transport.getRemoteAddress());
-        registerMBean(byAddressName);
-    }
-
-    public void doStop() throws Exception {
-        if (isStarting()) {
-            setPendingStop(true);
-            return;
-        }
-        synchronized (this) {
-            unregisterMBean(byClientIdName);
-            unregisterMBean(byAddressName);
-            byClientIdName = null;
-            byAddressName = null;
-        }
-        super.doStop();
-    }
-
-    /**
-     * Sets the connection ID of this connection. On startup this connection ID
-     * is set to an incrementing counter; once the client registers it is set to
-     * the clientID of the JMS client.
-     */
-    public void setConnectionId(String connectionId) throws IOException {
-    }
-
-    public Response processAddConnection(ConnectionInfo info) throws Exception {
-        Response answer = super.processAddConnection(info);
-        String clientId = info.getClientId();
-        if (clientId != null) {
-            if (byClientIdName == null) {
-                byClientIdName = createByClientIdObjectName(clientId);
-                registerMBean(byClientIdName);
-            }
-        }
-        return answer;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected void registerMBean(ObjectName name) {
-        if (name != null) {
-            try {
-                AnnotatedMBean.registerMBean(managementContext, mbean, name);
-            } catch (Throwable e) {
-                LOG.warn("Failed to register MBean: " + name);
-                LOG.debug("Failure reason: " + e, e);
-            }
-        }
-    }
-
-    protected void unregisterMBean(ObjectName name) {
-        if (name != null) {
-            try {
-                managementContext.unregisterMBean(name);
-            } catch (Throwable e) {
-                LOG.warn("Failed to unregister mbean: " + name);
-                LOG.debug("Failure reason: " + e, e);
-            }
-        }
-    }
-
-    protected ObjectName createByAddressObjectName(String type, String value) throws IOException {
-        // Build the object name for the destination
-        Hashtable map = connectorName.getKeyPropertyList();
-        try {
-            return new ObjectName(connectorName.getDomain() + ":" + "BrokerName="
-                                  + JMXSupport.encodeObjectNamePart((String)map.get("BrokerName")) + ","
-                                  + "Type=Connection," + "ConnectorName="
-                                  + JMXSupport.encodeObjectNamePart((String)map.get("ConnectorName")) + ","
-                                  + "ViewType=" + JMXSupport.encodeObjectNamePart(type) + "," + "Name="
-                                  + JMXSupport.encodeObjectNamePart(value));
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    protected ObjectName createByClientIdObjectName(String value) throws IOException {
-        // Build the object name for the destination
-        Hashtable map = connectorName.getKeyPropertyList();
-        try {
-            return new ObjectName(connectorName.getDomain() + ":" + "BrokerName="
-                                  + JMXSupport.encodeObjectNamePart((String)map.get("BrokerName")) + ","
-                                  + "Type=Connection," + "ConnectorName="
-                                  + JMXSupport.encodeObjectNamePart((String)map.get("ConnectorName")) + ","
-                                  + "Connection=" + JMXSupport.encodeObjectNamePart(value));
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnector.java
deleted file mode 100755
index eb074cb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnector.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.Connection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportServer;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-/**
- * A managed transport connector which can create multiple managed connections
- * as clients connect.
- * 
- * 
- */
-public class ManagedTransportConnector extends TransportConnector {
-
-    static long nextConnectionId = 1;
-    
-    private final ManagementContext managementContext;
-    private final ObjectName connectorName;
-
-    public ManagedTransportConnector(ManagementContext context, ObjectName connectorName, TransportServer server) {
-        super(server);
-        this.managementContext = context;
-        this.connectorName = connectorName;
-    }
-
-    public ManagedTransportConnector asManagedConnector(MBeanServer mbeanServer, ObjectName connectorName) throws IOException, URISyntaxException {
-        return this;
-    }
-
-    protected Connection createConnection(Transport transport) throws IOException {
-        return new ManagedTransportConnection(this, transport, getBroker(), isDisableAsyncDispatch() ? null : getTaskRunnerFactory(), managementContext, connectorName);
-    }
-
-    protected static synchronized long getNextConnectionId() {
-        return nextConnectionId++;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
deleted file mode 100644
index b8a9bee..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.management.*;
-import javax.management.remote.JMXConnectorServer;
-import javax.management.remote.JMXConnectorServerFactory;
-import javax.management.remote.JMXServiceURL;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.ServerSocket;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.rmi.server.RMIServerSocketFactory;
-import java.util.*;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/**
- * An abstraction over JMX mbean registration
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class ManagementContext implements Service {
-    /**
-     * Default activemq domain
-     */
-    public static final String DEFAULT_DOMAIN = "org.apache.activemq";
-    private static final Logger LOG = LoggerFactory.getLogger(ManagementContext.class);
-    private MBeanServer beanServer;
-    private String jmxDomainName = DEFAULT_DOMAIN;
-    private boolean useMBeanServer = true;
-    private boolean createMBeanServer = true;
-    private boolean locallyCreateMBeanServer;
-    private boolean createConnector = true;
-    private boolean findTigerMbeanServer = true;
-    private String connectorHost = "localhost";
-    private int connectorPort = 1099;
-    private Map environment;
-    private int rmiServerPort;
-    private String connectorPath = "/jmxrmi";
-    private final AtomicBoolean started = new AtomicBoolean(false);
-    private final AtomicBoolean connectorStarting = new AtomicBoolean(false);
-    private JMXConnectorServer connectorServer;
-    private ObjectName namingServiceObjectName;
-    private Registry registry;
-    private final List<ObjectName> registeredMBeanNames = new CopyOnWriteArrayList<ObjectName>();
-
-    public ManagementContext() {
-        this(null);
-    }
-
-    public ManagementContext(MBeanServer server) {
-        this.beanServer = server;
-    }
-
-    public void start() throws IOException {
-        // lets force the MBeanServer to be created if needed
-        if (started.compareAndSet(false, true)) {
-            getMBeanServer();
-            if (connectorServer != null) {
-                try {
-                    getMBeanServer().invoke(namingServiceObjectName, "start", null, null);
-                } catch (Throwable ignore) {
-                }
-                Thread t = new Thread("JMX connector") {
-                    @Override
-                    public void run() {
-                        try {
-                            JMXConnectorServer server = connectorServer;
-                            if (started.get() && server != null) {
-                                LOG.debug("Starting JMXConnectorServer...");
-                                connectorStarting.set(true);
-                                try {
-                                	server.start();
-                                } finally {
-                                	connectorStarting.set(false);
-                                }
-                                LOG.info("JMX consoles can connect to " + server.getAddress());
-                            }
-                        } catch (IOException e) {
-                            LOG.warn("Failed to start jmx connector: " + e.getMessage());
-                            LOG.debug("Reason for failed jms connector start", e);
-                        }
-                    }
-                };
-                t.setDaemon(true);
-                t.start();
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            MBeanServer mbeanServer = getMBeanServer();
-            if (mbeanServer != null) {
-                for (Iterator<ObjectName> iter = registeredMBeanNames.iterator(); iter.hasNext();) {
-                    ObjectName name = iter.next();
-                    
-                        mbeanServer.unregisterMBean(name);
-                    
-                }
-            }
-            registeredMBeanNames.clear();
-            JMXConnectorServer server = connectorServer;
-            connectorServer = null;
-            if (server != null) {
-                try {
-                	if (!connectorStarting.get()) {
-                		server.stop();
-                	}
-                } catch (IOException e) {
-                    LOG.warn("Failed to stop jmx connector: " + e.getMessage());
-                }
-                try {
-                    getMBeanServer().invoke(namingServiceObjectName, "stop", null, null);
-                } catch (Throwable ignore) {
-                }
-            }
-            if (locallyCreateMBeanServer && beanServer != null) {
-                // check to see if the factory knows about this server
-                List list = MBeanServerFactory.findMBeanServer(null);
-                if (list != null && !list.isEmpty() && list.contains(beanServer)) {
-                    MBeanServerFactory.releaseMBeanServer(beanServer);
-                }
-            }
-            beanServer = null;
-        }
-    }
-
-    /**
-     * @return Returns the jmxDomainName.
-     */
-    public String getJmxDomainName() {
-        return jmxDomainName;
-    }
-
-    /**
-     * @param jmxDomainName The jmxDomainName to set.
-     */
-    public void setJmxDomainName(String jmxDomainName) {
-        this.jmxDomainName = jmxDomainName;
-    }
-
-    /**
-     * Get the MBeanServer
-     * 
-     * @return the MBeanServer
-     */
-    protected MBeanServer getMBeanServer() {
-        if (this.beanServer == null) {
-            this.beanServer = findMBeanServer();
-        }
-        return beanServer;
-    }
-
-    /**
-     * Set the MBeanServer
-     * 
-     * @param beanServer
-     */
-    public void setMBeanServer(MBeanServer beanServer) {
-        this.beanServer = beanServer;
-    }
-
-    /**
-     * @return Returns the useMBeanServer.
-     */
-    public boolean isUseMBeanServer() {
-        return useMBeanServer;
-    }
-
-    /**
-     * @param useMBeanServer The useMBeanServer to set.
-     */
-    public void setUseMBeanServer(boolean useMBeanServer) {
-        this.useMBeanServer = useMBeanServer;
-    }
-
-    /**
-     * @return Returns the createMBeanServer flag.
-     */
-    public boolean isCreateMBeanServer() {
-        return createMBeanServer;
-    }
-
-    /**
-     * @param enableJMX Set createMBeanServer.
-     */
-    public void setCreateMBeanServer(boolean enableJMX) {
-        this.createMBeanServer = enableJMX;
-    }
-
-    public boolean isFindTigerMbeanServer() {
-        return findTigerMbeanServer;
-    }
-
-    public boolean isConnectorStarted() {
-		return connectorStarting.get() || (connectorServer != null && connectorServer.isActive());
-	}
-
-	/**
-     * Enables/disables the searching for the Java 5 platform MBeanServer
-     */
-    public void setFindTigerMbeanServer(boolean findTigerMbeanServer) {
-        this.findTigerMbeanServer = findTigerMbeanServer;
-    }
-
-    /**
-     * Formulate and return the MBean ObjectName of a custom control MBean
-     * 
-     * @param type
-     * @param name
-     * @return the JMX ObjectName of the MBean, or <code>null</code> if
-     *         <code>customName</code> is invalid.
-     */
-    public ObjectName createCustomComponentMBeanName(String type, String name) {
-        ObjectName result = null;
-        String tmp = jmxDomainName + ":" + "type=" + sanitizeString(type) + ",name=" + sanitizeString(name);
-        try {
-            result = new ObjectName(tmp);
-        } catch (MalformedObjectNameException e) {
-            LOG.error("Couldn't create ObjectName from: " + type + " , " + name);
-        }
-        return result;
-    }
-
-    /**
-     * The ':' and '/' characters are reserved in ObjectNames
-     * 
-     * @param in
-     * @return sanitized String
-     */
-    private static String sanitizeString(String in) {
-        String result = null;
-        if (in != null) {
-            result = in.replace(':', '_');
-            result = result.replace('/', '_');
-            result = result.replace('\\', '_');
-        }
-        return result;
-    }
-
-    /**
-     * Retrive an System ObjectName
-     * 
-     * @param domainName
-     * @param containerName
-     * @param theClass
-     * @return the ObjectName
-     * @throws MalformedObjectNameException
-     */
-    public static ObjectName getSystemObjectName(String domainName, String containerName, Class theClass) throws MalformedObjectNameException, NullPointerException {
-        String tmp = domainName + ":" + "type=" + theClass.getName() + ",name=" + getRelativeName(containerName, theClass);
-        return new ObjectName(tmp);
-    }
-
-    private static String getRelativeName(String containerName, Class theClass) {
-        String name = theClass.getName();
-        int index = name.lastIndexOf(".");
-        if (index >= 0 && (index + 1) < name.length()) {
-            name = name.substring(index + 1);
-        }
-        return containerName + "." + name;
-    }
-    
-    public Object newProxyInstance( ObjectName objectName,
-                      Class interfaceClass,
-                      boolean notificationBroadcaster){
-        return MBeanServerInvocationHandler.newProxyInstance(getMBeanServer(), objectName, interfaceClass, notificationBroadcaster);
-        
-    }
-    
-    public Object getAttribute(ObjectName name, String attribute) throws Exception{
-        return getMBeanServer().getAttribute(name, attribute);
-    }
-    
-    public ObjectInstance registerMBean(Object bean, ObjectName name) throws Exception{
-        ObjectInstance result = getMBeanServer().registerMBean(bean, name);
-        this.registeredMBeanNames.add(name);
-        return result;
-    }
-    
-    public Set queryNames(ObjectName name, QueryExp query) throws Exception{
-        return getMBeanServer().queryNames(name, query);
-    }
-    
-    public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException {
-        return getMBeanServer().getObjectInstance(name);
-    }
-    
-    /**
-     * Unregister an MBean
-     * 
-     * @param name
-     * @throws JMException
-     */
-    public void unregisterMBean(ObjectName name) throws JMException {
-        if (beanServer != null && beanServer.isRegistered(name) && this.registeredMBeanNames.remove(name)) {
-            beanServer.unregisterMBean(name);
-        }
-    }
-
-    protected synchronized MBeanServer findMBeanServer() {
-        MBeanServer result = null;
-        // create the mbean server
-        try {
-            if (useMBeanServer) {
-                if (findTigerMbeanServer) {
-                    result = findTigerMBeanServer();
-                }
-                if (result == null) {
-                    // lets piggy back on another MBeanServer -
-                    // we could be in an appserver!
-                    List list = MBeanServerFactory.findMBeanServer(null);
-                    if (list != null && list.size() > 0) {
-                        result = (MBeanServer)list.get(0);
-                    }
-                }
-            }
-            if (result == null && createMBeanServer) {
-                result = createMBeanServer();
-            }
-        } catch (NoClassDefFoundError e) {
-            LOG.error("Could not load MBeanServer", e);
-        } catch (Throwable e) {
-            // probably don't have access to system properties
-            LOG.error("Failed to initialize MBeanServer", e);
-        }
-        return result;
-    }
-
-    public MBeanServer findTigerMBeanServer() {
-        String name = "java.lang.management.ManagementFactory";
-        Class type = loadClass(name, ManagementContext.class.getClassLoader());
-        if (type != null) {
-            try {
-                Method method = type.getMethod("getPlatformMBeanServer", new Class[0]);
-                if (method != null) {
-                    Object answer = method.invoke(null, new Object[0]);
-                    if (answer instanceof MBeanServer) {
-                    	if (createConnector) {
-                    		createConnector((MBeanServer)answer);
-                    	}
-                        return (MBeanServer)answer;
-                    } else {
-                        LOG.warn("Could not cast: " + answer + " into an MBeanServer. There must be some classloader strangeness in town");
-                    }
-                } else {
-                    LOG.warn("Method getPlatformMBeanServer() does not appear visible on type: " + type.getName());
-                }
-            } catch (Exception e) {
-                LOG.warn("Failed to call getPlatformMBeanServer() due to: " + e, e);
-            }
-        } else {
-            LOG.trace("Class not found: " + name + " so probably running on Java 1.4");
-        }
-        return null;
-    }
-
-    private static Class loadClass(String name, ClassLoader loader) {
-        try {
-            return loader.loadClass(name);
-        } catch (ClassNotFoundException e) {
-            try {
-                return Thread.currentThread().getContextClassLoader().loadClass(name);
-            } catch (ClassNotFoundException e1) {
-                return null;
-            }
-        }
-    }
-
-    /**
-     * @return
-     * @throws NullPointerException
-     * @throws MalformedObjectNameException
-     * @throws IOException
-     */
-    protected MBeanServer createMBeanServer() throws MalformedObjectNameException, IOException {
-        MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer(jmxDomainName);
-        locallyCreateMBeanServer = true;
-        if (createConnector) {
-            createConnector(mbeanServer);
-        }
-        return mbeanServer;
-    }
-
-    /**
-     * @param mbeanServer
-     * @throws MalformedObjectNameException
-     * @throws MalformedURLException
-     * @throws IOException
-     */
-    private void createConnector(MBeanServer mbeanServer) throws MalformedObjectNameException, MalformedURLException, IOException {
-        // Create the NamingService, needed by JSR 160
-        try {
-            if (registry == null) {
-                registry = LocateRegistry.createRegistry(connectorPort, null, new RMIServerSocketFactory() {
-                    public ServerSocket createServerSocket(int port)
-                            throws IOException {
-                        ServerSocket result = new ServerSocket(port);
-                        result.setReuseAddress(true);
-                        return result;
-                    }});
-            }
-            namingServiceObjectName = ObjectName.getInstance("naming:type=rmiregistry");
-            // Do not use the createMBean as the mx4j jar may not be in the
-            // same class loader than the server
-            Class cl = Class.forName("mx4j.tools.naming.NamingService");
-            mbeanServer.registerMBean(cl.newInstance(), namingServiceObjectName);
-            // mbeanServer.createMBean("mx4j.tools.naming.NamingService",
-            // namingServiceObjectName, null);
-            // set the naming port
-            Attribute attr = new Attribute("Port", Integer.valueOf(connectorPort));
-            mbeanServer.setAttribute(namingServiceObjectName, attr);
-        } catch(ClassNotFoundException e) {
-            LOG.debug("Probably not using JRE 1.4: " + e.getLocalizedMessage());
-        }
-        catch (Throwable e) {
-            LOG.debug("Failed to create local registry", e);
-        }
-        // Create the JMXConnectorServer
-        String rmiServer = "";
-        if (rmiServerPort != 0) {
-            // This is handy to use if you have a firewall and need to
-            // force JMX to use fixed ports.
-            rmiServer = ""+getConnectorHost()+":" + rmiServerPort;
-        }
-        String serviceURL = "service:jmx:rmi://" + rmiServer + "/jndi/rmi://" +getConnectorHost()+":" + connectorPort + connectorPath;
-        JMXServiceURL url = new JMXServiceURL(serviceURL);
-        connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, environment, mbeanServer);
-        
-    }
-
-    public String getConnectorPath() {
-        return connectorPath;
-    }
-
-    public void setConnectorPath(String connectorPath) {
-        this.connectorPath = connectorPath;
-    }
-
-    public int getConnectorPort() {
-        return connectorPort;
-    }
-
-    /**
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
-     */
-    public void setConnectorPort(int connectorPort) {
-        this.connectorPort = connectorPort;
-    }
-
-    public int getRmiServerPort() {
-        return rmiServerPort;
-    }
-
-    /**
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
-     */
-    public void setRmiServerPort(int rmiServerPort) {
-        this.rmiServerPort = rmiServerPort;
-    }
-
-    public boolean isCreateConnector() {
-        return createConnector;
-    }
-
-    public void setCreateConnector(boolean createConnector) {
-        this.createConnector = createConnector;
-    }
-
-    /**
-     * Get the connectorHost
-     * @return the connectorHost
-     */
-    public String getConnectorHost() {
-        return this.connectorHost;
-    }
-
-    /**
-     * Set the connectorHost
-     * @param connectorHost the connectorHost to set
-     */
-    public void setConnectorHost(String connectorHost) {
-        this.connectorHost = connectorHost;
-    }
-
-    public Map getEnvironment() {
-        return environment;
-    }
-
-    public void setEnvironment(Map environment) {
-        this.environment = environment;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkBridgeView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkBridgeView.java
deleted file mode 100644
index 2201b30..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkBridgeView.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.network.NetworkBridge;
-
-public class NetworkBridgeView implements NetworkBridgeViewMBean {
-
-    private final NetworkBridge bridge;
-    private boolean createByDuplex = false;
-
-    public NetworkBridgeView(NetworkBridge bridge) {
-        this.bridge = bridge;
-    }
-
-    public void start() throws Exception {
-        bridge.start();
-    }
-
-    public void stop() throws Exception {
-        bridge.stop();
-    }
-
-    public String getLocalAddress() {
-        return bridge.getLocalAddress();
-    }
-
-    public String getRemoteAddress() {
-        return bridge.getRemoteAddress();
-    }
-
-    public String getRemoteBrokerName() {
-        return bridge.getRemoteBrokerName();
-    }
-
-    public String getLocalBrokerName() {
-        return bridge.getLocalBrokerName();
-    }
-
-    public long getEnqueueCounter() {
-        return bridge.getEnqueueCounter();
-    }
-
-    public long getDequeueCounter() {
-        return bridge.getDequeueCounter();
-    }
-
-    public boolean isCreatedByDuplex() {
-        return createByDuplex;
-    }
-
-    public void setCreateByDuplex(boolean createByDuplex) {
-        this.createByDuplex = createByDuplex;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkBridgeViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkBridgeViewMBean.java
deleted file mode 100644
index ec7598c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkBridgeViewMBean.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-
-public interface NetworkBridgeViewMBean extends Service {
-
-    String getLocalAddress();
-
-    String getRemoteAddress();
-
-    String getRemoteBrokerName();
-
-    String getLocalBrokerName();
-
-    long getEnqueueCounter();
-
-    long getDequeueCounter();
-
-    boolean isCreatedByDuplex();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkConnectorView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkConnectorView.java
deleted file mode 100644
index a65bc00..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkConnectorView.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.network.NetworkConnector;
-
-public class NetworkConnectorView implements NetworkConnectorViewMBean {
-
-    private final NetworkConnector connector;
-
-    public NetworkConnectorView(NetworkConnector connector) {
-        this.connector = connector;
-    }
-
-    public void start() throws Exception {
-        connector.start();
-    }
-
-    public void stop() throws Exception {
-        connector.stop();
-    }
-
-    public String getName() {
-        return connector.getName();
-    }
-
-    public int getNetworkTTL() {
-        return connector.getNetworkTTL();
-    }
-
-    public int getPrefetchSize() {
-        return connector.getPrefetchSize();
-    }
-
-    public String getUserName() {
-        return connector.getUserName();
-    }
-
-    public boolean isBridgeTempDestinations() {
-        return connector.isBridgeTempDestinations();
-    }
-
-    public boolean isConduitSubscriptions() {
-        return connector.isConduitSubscriptions();
-    }
-
-    public boolean isDecreaseNetworkConsumerPriority() {
-        return connector.isDecreaseNetworkConsumerPriority();
-    }
-
-    public boolean isDispatchAsync() {
-        return connector.isDispatchAsync();
-    }
-
-    public boolean isDynamicOnly() {
-        return connector.isDynamicOnly();
-    }
-    
-    public boolean isDuplex() {
-        return connector.isDuplex();
-    }
-
-    public void setBridgeTempDestinations(boolean bridgeTempDestinations) {
-        connector.setBridgeTempDestinations(bridgeTempDestinations);
-    }
-
-    public void setConduitSubscriptions(boolean conduitSubscriptions) {
-        connector.setConduitSubscriptions(conduitSubscriptions);
-    }
-
-    public void setDispatchAsync(boolean dispatchAsync) {
-        connector.setDispatchAsync(dispatchAsync);
-    }
-
-    public void setDynamicOnly(boolean dynamicOnly) {
-        connector.setDynamicOnly(dynamicOnly);
-    }
-
-    public void setNetworkTTL(int networkTTL) {
-        connector.setNetworkTTL(networkTTL);
-    }
-
-    public void setPassword(String password) {
-        connector.setPassword(password);
-    }
-
-    public void setPrefetchSize(int prefetchSize) {
-        connector.setPrefetchSize(prefetchSize);
-    }
-
-    public void setUserName(String userName) {
-        connector.setUserName(userName);
-    }
-
-    public String getPassword() {
-        String pw = connector.getPassword();
-        // Hide the password for security reasons.
-        if (pw != null) {
-            pw = pw.replaceAll(".", "*");
-        }
-        return pw;
-    }
-
-    public void setDecreaseNetworkConsumerPriority(boolean decreaseNetworkConsumerPriority) {
-        connector.setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkConnectorViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkConnectorViewMBean.java
deleted file mode 100644
index 924b1c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/NetworkConnectorViewMBean.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-
-public interface NetworkConnectorViewMBean extends Service {
-
-    String getName();
-
-    int getNetworkTTL();
-
-    int getPrefetchSize();
-
-    String getUserName();
-
-    boolean isBridgeTempDestinations();
-
-    boolean isConduitSubscriptions();
-
-    boolean isDecreaseNetworkConsumerPriority();
-
-    boolean isDispatchAsync();
-
-    boolean isDynamicOnly();
-    
-    boolean isDuplex();
-
-    void setBridgeTempDestinations(boolean bridgeTempDestinations);
-
-    void setConduitSubscriptions(boolean conduitSubscriptions);
-
-    void setDispatchAsync(boolean dispatchAsync);
-
-    void setDynamicOnly(boolean dynamicOnly);
-
-    void setNetworkTTL(int networkTTL);
-
-    void setPassword(String password);
-
-    void setPrefetchSize(int prefetchSize);
-
-    void setUserName(String userName);
-
-    String getPassword();
-
-    void setDecreaseNetworkConsumerPriority(boolean decreaseNetworkConsumerPriority);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
deleted file mode 100644
index d3f382f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/OpenTypeSupport.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.CompositeDataSupport;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.SimpleType;
-import javax.management.openmbean.TabularDataSupport;
-import javax.management.openmbean.TabularType;
-
-import org.apache.activemq.broker.region.policy.SlowConsumerEntry;
-import org.apache.activemq.broker.scheduler.Job;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-
-public final class OpenTypeSupport {
-
-    interface OpenTypeFactory {
-        CompositeType getCompositeType() throws OpenDataException;
-
-        Map<String, Object> getFields(Object o) throws OpenDataException;
-    }
-
-    private static final Map<Class, AbstractOpenTypeFactory> OPEN_TYPE_FACTORIES = new HashMap<Class, AbstractOpenTypeFactory>();
-
-    abstract static class AbstractOpenTypeFactory implements OpenTypeFactory {
-
-        private CompositeType compositeType;
-        private final List<String> itemNamesList = new ArrayList<String>();
-        private final List<String> itemDescriptionsList = new ArrayList<String>();
-        private final List<OpenType> itemTypesList = new ArrayList<OpenType>();
-
-        public CompositeType getCompositeType() throws OpenDataException {
-            if (compositeType == null) {
-                init();
-                compositeType = createCompositeType();
-            }
-            return compositeType;
-        }
-
-        protected void init() throws OpenDataException {
-        }
-
-        protected CompositeType createCompositeType() throws OpenDataException {
-            String[] itemNames = itemNamesList.toArray(new String[itemNamesList.size()]);
-            String[] itemDescriptions = itemDescriptionsList.toArray(new String[itemDescriptionsList.size()]);
-            OpenType[] itemTypes = itemTypesList.toArray(new OpenType[itemTypesList.size()]);
-            return new CompositeType(getTypeName(), getDescription(), itemNames, itemDescriptions, itemTypes);
-        }
-
-        protected abstract String getTypeName();
-
-        protected void addItem(String name, String description, OpenType type) {
-            itemNamesList.add(name);
-            itemDescriptionsList.add(description);
-            itemTypesList.add(type);
-        }
-
-        protected String getDescription() {
-            return getTypeName();
-        }
-
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            Map<String, Object> rc = new HashMap<String, Object>();
-            return rc;
-        }
-    }
-
-    static class MessageOpenTypeFactory extends AbstractOpenTypeFactory {
-        protected TabularType stringPropertyTabularType;
-        protected TabularType booleanPropertyTabularType;
-        protected TabularType bytePropertyTabularType;
-        protected TabularType shortPropertyTabularType;
-        protected TabularType intPropertyTabularType;
-        protected TabularType longPropertyTabularType;
-        protected TabularType floatPropertyTabularType;
-        protected TabularType doublePropertyTabularType;
-
-        @Override
-        protected String getTypeName() {
-            return ActiveMQMessage.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-            addItem("JMSCorrelationID", "JMSCorrelationID", SimpleType.STRING);
-            addItem("JMSDestination", "JMSDestination", SimpleType.STRING);
-            addItem("JMSMessageID", "JMSMessageID", SimpleType.STRING);
-            addItem("JMSReplyTo", "JMSReplyTo", SimpleType.STRING);
-            addItem("JMSType", "JMSType", SimpleType.STRING);
-            addItem("JMSDeliveryMode", "JMSDeliveryMode", SimpleType.STRING);
-            addItem("JMSExpiration", "JMSExpiration", SimpleType.LONG);
-            addItem("JMSPriority", "JMSPriority", SimpleType.INTEGER);
-            addItem("JMSRedelivered", "JMSRedelivered", SimpleType.BOOLEAN);
-            addItem("JMSTimestamp", "JMSTimestamp", SimpleType.DATE);
-            addItem(CompositeDataConstants.JMSXGROUP_ID, "Message Group ID", SimpleType.STRING);
-            addItem(CompositeDataConstants.JMSXGROUP_SEQ, "Message Group Sequence Number", SimpleType.INTEGER);
-            addItem(CompositeDataConstants.ORIGINAL_DESTINATION, "Original Destination Before Senting To DLQ", SimpleType.STRING);
-            addItem(CompositeDataConstants.PROPERTIES, "User Properties Text", SimpleType.STRING);
-
-            // now lets expose the type safe properties
-            stringPropertyTabularType = createTabularType(String.class, SimpleType.STRING);
-            booleanPropertyTabularType = createTabularType(Boolean.class, SimpleType.BOOLEAN);
-            bytePropertyTabularType = createTabularType(Byte.class, SimpleType.BYTE);
-            shortPropertyTabularType = createTabularType(Short.class, SimpleType.SHORT);
-            intPropertyTabularType = createTabularType(Integer.class, SimpleType.INTEGER);
-            longPropertyTabularType = createTabularType(Long.class, SimpleType.LONG);
-            floatPropertyTabularType = createTabularType(Float.class, SimpleType.FLOAT);
-            doublePropertyTabularType = createTabularType(Double.class, SimpleType.DOUBLE);
-
-            addItem(CompositeDataConstants.STRING_PROPERTIES, "User String Properties", stringPropertyTabularType);
-            addItem(CompositeDataConstants.BOOLEAN_PROPERTIES, "User Boolean Properties", booleanPropertyTabularType);
-            addItem(CompositeDataConstants.BYTE_PROPERTIES, "User Byte Properties", bytePropertyTabularType);
-            addItem(CompositeDataConstants.SHORT_PROPERTIES, "User Short Properties", shortPropertyTabularType);
-            addItem(CompositeDataConstants.INT_PROPERTIES, "User Integer Properties", intPropertyTabularType);
-            addItem(CompositeDataConstants.LONG_PROPERTIES, "User Long Properties", longPropertyTabularType);
-            addItem(CompositeDataConstants.FLOAT_PROPERTIES, "User Float Properties", floatPropertyTabularType);
-            addItem(CompositeDataConstants.DOUBLE_PROPERTIES, "User Double Properties", doublePropertyTabularType);
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            ActiveMQMessage m = (ActiveMQMessage)o;
-            Map<String, Object> rc = super.getFields(o);
-            rc.put("JMSCorrelationID", m.getJMSCorrelationID());
-            rc.put("JMSDestination", "" + m.getJMSDestination());
-            rc.put("JMSMessageID", m.getJMSMessageID());
-            rc.put("JMSReplyTo",toString(m.getJMSReplyTo()));
-            rc.put("JMSType", m.getJMSType());
-            rc.put("JMSDeliveryMode", m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON-PERSISTENT");
-            rc.put("JMSExpiration", Long.valueOf(m.getJMSExpiration()));
-            rc.put("JMSPriority", Integer.valueOf(m.getJMSPriority()));
-            rc.put("JMSRedelivered", Boolean.valueOf(m.getJMSRedelivered()));
-            rc.put("JMSTimestamp", new Date(m.getJMSTimestamp()));
-            rc.put(CompositeDataConstants.JMSXGROUP_ID, m.getGroupID());
-            rc.put(CompositeDataConstants.JMSXGROUP_SEQ, m.getGroupSequence());
-            rc.put(CompositeDataConstants.ORIGINAL_DESTINATION, toString(m.getOriginalDestination()));
-            try {
-                rc.put(CompositeDataConstants.PROPERTIES, "" + m.getProperties());
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.PROPERTIES, "");
-            }
-
-            try {
-                rc.put(CompositeDataConstants.STRING_PROPERTIES, createTabularData(m, stringPropertyTabularType, String.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.STRING_PROPERTIES, new TabularDataSupport(stringPropertyTabularType));
-            }
-            try {
-                rc.put(CompositeDataConstants.BOOLEAN_PROPERTIES, createTabularData(m, booleanPropertyTabularType, Boolean.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.BOOLEAN_PROPERTIES, new TabularDataSupport(booleanPropertyTabularType));
-            }
-            try {
-                rc.put(CompositeDataConstants.BYTE_PROPERTIES, createTabularData(m, bytePropertyTabularType, Byte.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.BYTE_PROPERTIES, new TabularDataSupport(bytePropertyTabularType));
-            }
-            try {
-                rc.put(CompositeDataConstants.SHORT_PROPERTIES, createTabularData(m, shortPropertyTabularType, Short.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.SHORT_PROPERTIES, new TabularDataSupport(shortPropertyTabularType));
-            }
-            try {
-                rc.put(CompositeDataConstants.INT_PROPERTIES, createTabularData(m, intPropertyTabularType, Integer.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.INT_PROPERTIES, new TabularDataSupport(intPropertyTabularType));
-            }
-            try {
-                rc.put(CompositeDataConstants.LONG_PROPERTIES, createTabularData(m, longPropertyTabularType, Long.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.LONG_PROPERTIES, new TabularDataSupport(longPropertyTabularType));
-            }
-            try {
-                rc.put(CompositeDataConstants.FLOAT_PROPERTIES, createTabularData(m, floatPropertyTabularType, Float.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.FLOAT_PROPERTIES, new TabularDataSupport(floatPropertyTabularType));
-            }
-            try {
-                rc.put(CompositeDataConstants.DOUBLE_PROPERTIES, createTabularData(m, doublePropertyTabularType, Double.class));
-            } catch (IOException e) {
-                rc.put(CompositeDataConstants.DOUBLE_PROPERTIES, new TabularDataSupport(doublePropertyTabularType));
-            }
-            return rc;
-        }
-
-        protected String toString(Object value) {
-            if (value == null) {
-                return null;
-            }
-            return value.toString();
-        }
-
-
-        protected <T> TabularType createTabularType(Class<T> type, OpenType openType) throws OpenDataException {
-            String typeName = "java.util.Map<java.lang.String, " + type.getName() + ">";
-            String[] keyValue = new String[]{"key", "value"};
-            OpenType[] openTypes = new OpenType[]{SimpleType.STRING, openType};
-            CompositeType rowType = new CompositeType(typeName, typeName, keyValue, keyValue, openTypes);
-            return new TabularType(typeName, typeName, rowType, new String[]{"key"});
-        }
-
-        protected TabularDataSupport createTabularData(ActiveMQMessage m, TabularType type, Class valueType) throws IOException, OpenDataException {
-            TabularDataSupport answer = new TabularDataSupport(type);
-            Set<Map.Entry<String,Object>> entries = m.getProperties().entrySet();
-            for (Map.Entry<String, Object> entry : entries) {
-                Object value = entry.getValue();
-                if (valueType.isInstance(value)) {
-                    CompositeDataSupport compositeData = createTabularRowValue(type, entry.getKey(), value);
-                    answer.put(compositeData);
-                }
-            }
-            return answer;
-        }
-
-        protected CompositeDataSupport createTabularRowValue(TabularType type, String key, Object value) throws OpenDataException {
-            Map<String,Object> fields = new HashMap<String, Object>();
-            fields.put("key", key);
-            fields.put("value", value);
-            return new CompositeDataSupport(type.getRowType(), fields);
-        }
-    }
-
-    static class ByteMessageOpenTypeFactory extends MessageOpenTypeFactory {
-
-
-        @Override
-        protected String getTypeName() {
-            return ActiveMQBytesMessage.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-            addItem(CompositeDataConstants.BODY_LENGTH, "Body length", SimpleType.LONG);
-            addItem(CompositeDataConstants.BODY_PREVIEW, "Body preview", new ArrayType(1, SimpleType.BYTE));
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            ActiveMQBytesMessage m = (ActiveMQBytesMessage)o;
-            m.setReadOnlyBody(true);
-            Map<String, Object> rc = super.getFields(o);
-            long length = 0;
-            try {
-                length = m.getBodyLength();
-                rc.put(CompositeDataConstants.BODY_LENGTH, Long.valueOf(length));
-            } catch (JMSException e) {
-                rc.put(CompositeDataConstants.BODY_LENGTH, Long.valueOf(0));
-            }
-            try {
-                byte preview[] = new byte[(int)Math.min(length, 255)];
-                m.readBytes(preview);
-
-                // This is whack! Java 1.5 JMX spec does not support primitive
-                // arrays!
-                // In 1.6 it seems it is supported.. but until then...
-                Byte data[] = new Byte[preview.length];
-                for (int i = 0; i < data.length; i++) {
-                    data[i] = new Byte(preview[i]);
-                }
-
-                rc.put(CompositeDataConstants.BODY_PREVIEW, data);
-            } catch (JMSException e) {
-                rc.put(CompositeDataConstants.BODY_PREVIEW, new Byte[] {});
-            }
-            return rc;
-        }
-
-    }
-
-    static class MapMessageOpenTypeFactory extends MessageOpenTypeFactory {
-
-        @Override
-        protected String getTypeName() {
-            return ActiveMQMapMessage.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-            addItem(CompositeDataConstants.CONTENT_MAP, "Content map", SimpleType.STRING);
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            ActiveMQMapMessage m = (ActiveMQMapMessage)o;
-            Map<String, Object> rc = super.getFields(o);
-            try {
-                rc.put(CompositeDataConstants.CONTENT_MAP, "" + m.getContentMap());
-            } catch (JMSException e) {
-                rc.put(CompositeDataConstants.CONTENT_MAP, "");
-            }
-            return rc;
-        }
-    }
-
-    static class ObjectMessageOpenTypeFactory extends MessageOpenTypeFactory {
-        @Override
-        protected String getTypeName() {
-            return ActiveMQObjectMessage.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            Map<String, Object> rc = super.getFields(o);
-            return rc;
-        }
-    }
-
-    static class StreamMessageOpenTypeFactory extends MessageOpenTypeFactory {
-        @Override
-        protected String getTypeName() {
-            return ActiveMQStreamMessage.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            Map<String, Object> rc = super.getFields(o);
-            return rc;
-        }
-    }
-
-    static class TextMessageOpenTypeFactory extends MessageOpenTypeFactory {
-
-        @Override
-        protected String getTypeName() {
-            return ActiveMQTextMessage.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-            addItem(CompositeDataConstants.MESSAGE_TEXT, CompositeDataConstants.MESSAGE_TEXT, SimpleType.STRING);
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            ActiveMQTextMessage m = (ActiveMQTextMessage)o;
-            Map<String, Object> rc = super.getFields(o);
-            try {
-                rc.put(CompositeDataConstants.MESSAGE_TEXT, "" + m.getText());
-            } catch (JMSException e) {
-                rc.put(CompositeDataConstants.MESSAGE_TEXT, "");
-            }
-            return rc;
-        }
-    }
-    
-
-    static class JobOpenTypeFactory extends AbstractOpenTypeFactory {
-
-        @Override
-        protected String getTypeName() {
-            return Job.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-            addItem("jobId", "jobId", SimpleType.STRING);
-            addItem("cronEntry", "Cron entry", SimpleType.STRING);
-            addItem("start", "start time", SimpleType.STRING);
-            addItem("delay", "initial delay", SimpleType.LONG);
-            addItem("next", "next time", SimpleType.STRING);
-            addItem("period", "period between jobs", SimpleType.LONG);
-            addItem("repeat", "number of times to repeat", SimpleType.INTEGER);
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            Job job = (Job) o;
-            Map<String, Object> rc = super.getFields(o);
-            rc.put("jobId", job.getJobId());
-            rc.put("cronEntry", "" + job.getCronEntry());
-            rc.put("start", job.getStartTime());
-            rc.put("delay", job.getDelay());
-            rc.put("next", job.getNextExecutionTime());
-            rc.put("period", job.getPeriod());
-            rc.put("repeat", job.getRepeat());
-            return rc;
-        }
-    }
-
-    static class ActiveMQBlobMessageOpenTypeFactory extends MessageOpenTypeFactory {
-
-        @Override
-        protected String getTypeName() {
-            return ActiveMQBlobMessage.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-            addItem(CompositeDataConstants.MESSAGE_URL, "Body Url", SimpleType.STRING);
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            ActiveMQBlobMessage m = (ActiveMQBlobMessage)o;
-            Map<String, Object> rc = super.getFields(o);
-            try {
-                rc.put(CompositeDataConstants.MESSAGE_URL, "" + m.getURL().toString());
-            } catch (JMSException e) {
-                rc.put(CompositeDataConstants.MESSAGE_URL, "");
-            }
-            return rc;
-        }
-    }
-
-    static class SlowConsumerEntryOpenTypeFactory extends AbstractOpenTypeFactory {
-       @Override
-        protected String getTypeName() {
-            return SlowConsumerEntry.class.getName();
-        }
-
-        @Override
-        protected void init() throws OpenDataException {
-            super.init();
-            addItem("subscription", "the subscription view", SimpleType.OBJECTNAME);
-            addItem("slowCount", "number of times deemed slow", SimpleType.INTEGER);
-            addItem("markCount", "number of periods remaining slow", SimpleType.INTEGER);
-        }
-
-        @Override
-        public Map<String, Object> getFields(Object o) throws OpenDataException {
-            SlowConsumerEntry entry = (SlowConsumerEntry) o;
-            Map<String, Object> rc = super.getFields(o);
-            rc.put("subscription", entry.getSubscription());
-            rc.put("slowCount", Integer.valueOf(entry.getSlowCount()));
-            rc.put("markCount", Integer.valueOf(entry.getMarkCount()));
-            return rc;
-        }
-    }
-
-    static {
-        OPEN_TYPE_FACTORIES.put(ActiveMQMessage.class, new MessageOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(ActiveMQBytesMessage.class, new ByteMessageOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(ActiveMQMapMessage.class, new MapMessageOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(ActiveMQObjectMessage.class, new ObjectMessageOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(ActiveMQStreamMessage.class, new StreamMessageOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(ActiveMQTextMessage.class, new TextMessageOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(Job.class, new JobOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(SlowConsumerEntry.class, new SlowConsumerEntryOpenTypeFactory());
-        OPEN_TYPE_FACTORIES.put(ActiveMQBlobMessage.class, new ActiveMQBlobMessageOpenTypeFactory());
-    }
-
-    private OpenTypeSupport() {
-    }
-    
-    public static OpenTypeFactory getFactory(Class<?> clazz) throws OpenDataException {
-        return OPEN_TYPE_FACTORIES.get(clazz);
-    }
-
-    public static CompositeData convert(Object message) throws OpenDataException {
-        OpenTypeFactory f = getFactory(message.getClass());
-        if (f == null) {
-            throw new OpenDataException("Cannot create a CompositeData for type: " + message.getClass().getName());
-        }
-        CompositeType ct = f.getCompositeType();
-        Map<String, Object> fields = f.getFields(message);
-        return new CompositeDataSupport(ct, fields);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProxyConnectorView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProxyConnectorView.java
deleted file mode 100644
index a24be50..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProxyConnectorView.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.proxy.ProxyConnector;
-
-public class ProxyConnectorView implements ProxyConnectorViewMBean {
-
-    private final ProxyConnector connector;
-
-    public ProxyConnectorView(ProxyConnector connector) {
-        this.connector = connector;
-    }
-    
-    public void start() throws Exception {
-        connector.start();
-    }
-
-    public void stop() throws Exception {
-        connector.stop();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProxyConnectorViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProxyConnectorViewMBean.java
deleted file mode 100644
index f4579ec..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ProxyConnectorViewMBean.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.Service;
-
-public interface ProxyConnectorViewMBean extends Service {
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/QueueView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/QueueView.java
deleted file mode 100644
index 2d409b1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/QueueView.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.OpenDataException;
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.QueueMessageReference;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.BrokerSupport;
-
-/**
- * Provides a JMX Management view of a Queue.
- */
-public class QueueView extends DestinationView implements QueueViewMBean {
-    public QueueView(ManagedRegionBroker broker, Queue destination) {
-        super(broker, destination);
-    }
-
-    public CompositeData getMessage(String messageId) throws OpenDataException {
-        QueueMessageReference ref = ((Queue)destination).getMessage(messageId);
-        Message rc = ref.getMessage();
-        if (rc == null) {
-            return null;
-        }
-        return OpenTypeSupport.convert(rc);
-    }
-
-    public void purge() throws Exception {
-        ((Queue)destination).purge();
-    }
-
-    public boolean removeMessage(String messageId) throws Exception {
-        return ((Queue)destination).removeMessage(messageId);
-    }
-
-    public int removeMatchingMessages(String selector) throws Exception {
-        return ((Queue)destination).removeMatchingMessages(selector);
-    }
-
-    public int removeMatchingMessages(String selector, int maximumMessages) throws Exception {
-        return ((Queue)destination).removeMatchingMessages(selector, maximumMessages);
-    }
-
-    public boolean copyMessageTo(String messageId, String destinationName) throws Exception {
-        ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
-        ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
-        return ((Queue)destination).copyMessageTo(context, messageId, toDestination);
-    }
-
-    public int copyMatchingMessagesTo(String selector, String destinationName) throws Exception {
-        ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
-        ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
-        return ((Queue)destination).copyMatchingMessagesTo(context, selector, toDestination);
-    }
-
-    public int copyMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception {
-        ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
-        ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
-        return ((Queue)destination).copyMatchingMessagesTo(context, selector, toDestination, maximumMessages);
-    }
-
-    public boolean moveMessageTo(String messageId, String destinationName) throws Exception {
-        ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
-        ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
-        return ((Queue)destination).moveMessageTo(context, messageId, toDestination);
-    }
-
-    public int moveMatchingMessagesTo(String selector, String destinationName) throws Exception {
-        ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
-        ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
-        return ((Queue)destination).moveMatchingMessagesTo(context, selector, toDestination);
-    }
-
-    public int moveMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception {
-        ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
-        ActiveMQDestination toDestination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE);
-        return ((Queue)destination).moveMatchingMessagesTo(context, selector, toDestination, maximumMessages);
-    }
-
-    /**
-     * Moves a message back to its original destination
-     */
-    public boolean retryMessage(String messageId) throws Exception {
-        Queue queue = (Queue) destination;
-        QueueMessageReference ref = queue.getMessage(messageId);
-        Message rc = ref.getMessage();
-        if (rc != null) {
-            ActiveMQDestination originalDestination = rc.getOriginalDestination();
-            if (originalDestination != null) {
-                ConnectionContext context = BrokerSupport.getConnectionContext(broker.getContextBroker());
-                return queue.moveMessageTo(context, ref, originalDestination);
-            }
-            else {
-                throw new JMSException("No original destination for message: "+ messageId);
-            }
-        }
-        else {
-            throw new JMSException("Could not find message: "+ messageId);
-        }
-    }
-    
-    public int cursorSize() {
-        Queue queue = (Queue) destination;
-        if (queue.getMessages() != null){
-            return queue.getMessages().size();
-        }
-        return 0;
-    }
-
-   
-    public boolean doesCursorHaveMessagesBuffered() {
-       Queue queue = (Queue) destination;
-       if (queue.getMessages() != null){
-           return queue.getMessages().hasMessagesBufferedToDeliver();
-       }
-       return false;
-
-    }
-
-    
-    public boolean doesCursorHaveSpace() {
-        Queue queue = (Queue) destination;
-        if (queue.getMessages() != null){
-            return queue.getMessages().hasSpace();
-        }
-        return false;
-    }
-
-    
-    public long getCursorMemoryUsage() {
-        Queue queue = (Queue) destination;
-        if (queue.getMessages() != null &&  queue.getMessages().getSystemUsage() != null){
-            return queue.getMessages().getSystemUsage().getMemoryUsage().getUsage();
-        }
-        return 0;
-    }
-
-    public int getCursorPercentUsage() {
-        Queue queue = (Queue) destination;
-        if (queue.getMessages() != null &&  queue.getMessages().getSystemUsage() != null){
-            return queue.getMessages().getSystemUsage().getMemoryUsage().getPercentUsage();
-        }
-        return 0;
-    }
-
-    public boolean isCursorFull() {
-        Queue queue = (Queue) destination;
-        if (queue.getMessages() != null){
-            return queue.getMessages().isFull();
-        }
-        return false;
-    }
-
-    public boolean isCacheEnabled() {
-        Queue queue = (Queue) destination;
-        if (queue.getMessages() != null){
-            return queue.getMessages().isCacheEnabled();
-        }
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/QueueViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/QueueViewMBean.java
deleted file mode 100644
index a7649b7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/QueueViewMBean.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.OpenDataException;
-
-public interface QueueViewMBean extends DestinationViewMBean {
-
-    /**
-     * Retrieve a message from the destination's queue.
-     * 
-     * @param messageId the message id of the message to retrieve
-     * @return A CompositeData object which is a JMX version of the messages
-     * @throws OpenDataException
-     */
-    @MBeanInfo("View a message from the destination by JMS message ID.")
-    CompositeData getMessage(@MBeanInfo("messageId") String messageId) throws OpenDataException;
-
-    /**
-     * Removes a message from the queue. If the message has already been
-     * dispatched to another consumer, the message cannot be deleted and this
-     * method will return false.
-     * 
-     * @param messageId
-     * @return true if the message was found and could be successfully deleted.
-     * @throws Exception
-     */
-    @MBeanInfo("Remove a message from the destination by JMS message ID.  If the message has been dispatched, it cannot be deleted and false is returned.")
-    boolean removeMessage(@MBeanInfo("messageId") String messageId) throws Exception;
-
-    /**
-     * Removes the messages matching the given selector
-     * 
-     * @return the number of messages removed
-     */
-    @MBeanInfo("Removes messages from the destination based on an SQL-92 selection on the message headers or XPATH on the body.")
-    int removeMatchingMessages(@MBeanInfo("selector") String selector) throws Exception;
-
-    /**
-     * Removes the messages matching the given selector up to the maximum number
-     * of matched messages
-     * 
-     * @return the number of messages removed
-     */
-    @MBeanInfo("Removes up to a specified number of messages from the destination based on an SQL-92 selection on the message headers or XPATH on the body.")
-    int removeMatchingMessages(@MBeanInfo("selector") String selector, @MBeanInfo("maximumMessages") int maximumMessages) throws Exception;
-
-    /**
-     * Removes all of the messages in the queue.
-     * 
-     * @throws Exception
-     */
-    @MBeanInfo("Removes all of the messages in the queue.")
-    void purge() throws Exception;
-
-    /**
-     * Copies a given message to another destination.
-     * 
-     * @param messageId
-     * @param destinationName
-     * @return true if the message was found and was successfully copied to the
-     *         other destination.
-     * @throws Exception
-     */
-    @MBeanInfo("Copies a message with the given JMS message ID into the specified destination.")
-    boolean copyMessageTo(@MBeanInfo("messageId") String messageId, @MBeanInfo("destinationName") String destinationName) throws Exception;
-
-    /**
-     * Copies the messages matching the given selector
-     * 
-     * @return the number of messages copied
-     */
-    @MBeanInfo("Copies messages based on an SQL-92 selecton on the message headers or XPATH on the body into the specified destination.")
-    int copyMatchingMessagesTo(@MBeanInfo("selector") String selector, @MBeanInfo("destinationName") String destinationName) throws Exception;
-
-    /**
-     * Copies the messages matching the given selector up to the maximum number
-     * of matched messages
-     * 
-     * @return the number of messages copied
-     */
-    @MBeanInfo("Copies up to a specified number of messages based on an SQL-92 selecton on the message headers or XPATH on the body into the specified destination.")
-    int copyMatchingMessagesTo(@MBeanInfo("selector") String selector, @MBeanInfo("destinationName") String destinationName, @MBeanInfo("maximumMessages") int maximumMessages) throws Exception;
-
-    /**
-     * Moves the message to another destination.
-     * 
-     * @param messageId
-     * @param destinationName
-     * @return true if the message was found and was successfully copied to the
-     *         other destination.
-     * @throws Exception
-     */
-    @MBeanInfo("Moves a message with the given JMS message ID into the specified destination.")
-    boolean moveMessageTo(@MBeanInfo("messageId") String messageId, @MBeanInfo("destinationName") String destinationName) throws Exception;
-
-    /**
-     * Moves a message back to its original destination
-     */
-    @MBeanInfo("Moves a message with the given JMS message back to its original destination")
-    boolean retryMessage(@MBeanInfo("messageId") String messageId) throws Exception;
-    
-    /**
-     * Moves the messages matching the given selector
-     * 
-     * @return the number of messages removed
-     */
-    @MBeanInfo("Moves messages based on an SQL-92 selecton on the message headers or XPATH on the body into the specified destination.")
-    int moveMatchingMessagesTo(@MBeanInfo("selector") String selector, @MBeanInfo("destinationName") String destinationName) throws Exception;
-
-    /**
-     * Moves the messages matching the given selector up to the maximum number
-     * of matched messages
-     */
-    @MBeanInfo("Moves up to a specified number of messages based on an SQL-92 selecton on the message headers or XPATH on the body into the specified destination.")
-    int moveMatchingMessagesTo(@MBeanInfo("selector") String selector, @MBeanInfo("destinationName") String destinationName, @MBeanInfo("maximumMessages") int maximumMessages) throws Exception;
-    
-    /**
-     * @return true if the message cursor has memory space available
-     * to page in more messages
-     */
-    @MBeanInfo("Message cursor has memory space available")
-    public boolean doesCursorHaveSpace();
-    
-    /**
-     * @return true if the cursor has reached its memory limit for
-     * paged in messages
-     */
-    @MBeanInfo("Message cusor has reached its memory limit for paged in messages")
-    public boolean isCursorFull();
-    
-    /**
-     * @return true if the cursor has messages buffered to deliver
-     */
-    @MBeanInfo("Message cursor has buffered messages to deliver")
-    public boolean doesCursorHaveMessagesBuffered();
-    
-    /**
-     * @return the cursor memory usage in bytes
-     */
-    @MBeanInfo("Message cursor memory usage, in bytes.")
-    public long getCursorMemoryUsage();
-    
-    /**
-     * @return the cursor memory usage as a percentage
-     */
-    @MBeanInfo("Percentage of memory limit used")
-    public int getCursorPercentUsage();
-    
-    /**
-     * @return the number of messages available to be paged in 
-     * by the cursor
-     */
-    @MBeanInfo("Number of messages available to be paged in by the cursor.")
-    public int cursorSize();
-
-    /**
-     * @return true if caching is currently enabled of for the destination
-     */
-    @MBeanInfo("Caching is enabled")
-    boolean isCacheEnabled();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java
deleted file mode 100755
index 74004be..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.jms.InvalidSelectorException;
-
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.filter.DestinationFilter;
-
-/**
- * 
- */
-public class SubscriptionView implements SubscriptionViewMBean {
-
-    protected final Subscription subscription;
-    protected final String clientId;
-
-    /**
-     * Constructor
-     * 
-     * @param subs
-     */
-    public SubscriptionView(String clientId, Subscription subs) {
-        this.clientId = clientId;
-        this.subscription = subs;
-    }
-
-    /**
-     * @return the clientId
-     */
-    public String getClientId() {
-        return clientId;
-    }
-
-    /**
-     * @return the id of the Connection the Subscription is on
-     */
-    public String getConnectionId() {
-        ConsumerInfo info = getConsumerInfo();
-        if (info != null) {
-            return info.getConsumerId().getConnectionId();
-        }
-        return "NOTSET";
-    }
-
-    /**
-     * @return the id of the Session the subscription is on
-     */
-    public long getSessionId() {
-        ConsumerInfo info = getConsumerInfo();
-        if (info != null) {
-            return info.getConsumerId().getSessionId();
-        }
-        return 0;
-    }
-
-    /**
-     * @return the id of the Subscription
-     */
-    public long getSubcriptionId() {
-        ConsumerInfo info = getConsumerInfo();
-        if (info != null) {
-            return info.getConsumerId().getValue();
-        }
-        return 0;
-    }
-
-    /**
-     * @return the destination name
-     */
-    public String getDestinationName() {
-        ConsumerInfo info = getConsumerInfo();
-        if (info != null) {
-            ActiveMQDestination dest = info.getDestination();
-            return dest.getPhysicalName();
-        }
-        return "NOTSET";
-    }
-
-    public String getSelector() {
-        if (subscription != null) {
-            return subscription.getSelector();
-        }
-        return null;
-    }
-
-    public void setSelector(String selector) throws InvalidSelectorException, UnsupportedOperationException {
-        if (subscription != null) {
-            subscription.setSelector(selector);
-        } else {
-            throw new UnsupportedOperationException("No subscription object");
-        }
-    }
-
-    /**
-     * @return true if the destination is a Queue
-     */
-    public boolean isDestinationQueue() {
-        ConsumerInfo info = getConsumerInfo();
-        if (info != null) {
-            ActiveMQDestination dest = info.getDestination();
-            return dest.isQueue();
-        }
-        return false;
-    }
-
-    /**
-     * @return true of the destination is a Topic
-     */
-    public boolean isDestinationTopic() {
-        ConsumerInfo info = getConsumerInfo();
-        if (info != null) {
-            ActiveMQDestination dest = info.getDestination();
-            return dest.isTopic();
-        }
-        return false;
-    }
-
-    /**
-     * @return true if the destination is temporary
-     */
-    public boolean isDestinationTemporary() {
-        ConsumerInfo info = getConsumerInfo();
-        if (info != null) {
-            ActiveMQDestination dest = info.getDestination();
-            return dest.isTemporary();
-        }
-        return false;
-    }
-
-    /**
-     * @return true if the subscriber is active
-     */
-    public boolean isActive() {
-        return true;
-    }
-
-    /**
-     * The subscription should release as may references as it can to help the
-     * garbage collector reclaim memory.
-     */
-    public void gc() {
-        if (subscription != null) {
-            subscription.gc();
-        }
-    }
-
-    /**
-     * @return whether or not the subscriber is retroactive or not
-     */
-    public boolean isRetroactive() {
-        ConsumerInfo info = getConsumerInfo();
-        return info != null ? info.isRetroactive() : false;
-    }
-
-    /**
-     * @return whether or not the subscriber is an exclusive consumer
-     */
-    public boolean isExclusive() {
-        ConsumerInfo info = getConsumerInfo();
-        return info != null ? info.isExclusive() : false;
-    }
-
-    /**
-     * @return whether or not the subscriber is durable (persistent)
-     */
-    public boolean isDurable() {
-        ConsumerInfo info = getConsumerInfo();
-        return info != null ? info.isDurable() : false;
-    }
-
-    /**
-     * @return whether or not the subscriber ignores local messages
-     */
-    public boolean isNoLocal() {
-        ConsumerInfo info = getConsumerInfo();
-        return info != null ? info.isNoLocal() : false;
-    }
-
-    /**
-     * @return the maximum number of pending messages allowed in addition to the
-     *         prefetch size. If enabled to a non-zero value then this will
-     *         perform eviction of messages for slow consumers on non-durable
-     *         topics.
-     */
-    public int getMaximumPendingMessageLimit() {
-        ConsumerInfo info = getConsumerInfo();
-        return info != null ? info.getMaximumPendingMessageLimit() : 0;
-    }
-
-    /**
-     * @return the consumer priority
-     */
-    public byte getPriority() {
-        ConsumerInfo info = getConsumerInfo();
-        return info != null ? info.getPriority() : 0;
-    }
-
-    /**
-     * @return the name of the consumer which is only used for durable
-     *         consumers.
-     */
-    public String getSubcriptionName() {
-        ConsumerInfo info = getConsumerInfo();
-        return info != null ? info.getSubscriptionName() : null;
-    }
-
-    /**
-     * @return number of messages pending delivery
-     */
-    public int getPendingQueueSize() {
-        return subscription != null ? subscription.getPendingQueueSize() : 0;
-    }
-
-    /**
-     * @return number of messages dispatched
-     */
-    public int getDispatchedQueueSize() {
-        return subscription != null ? subscription.getDispatchedQueueSize() : 0;
-    }
-    
-    public int getMessageCountAwaitingAcknowledge() {
-        return getDispatchedQueueSize();
-    }
-
-    /**
-     * @return number of messages that matched the subscription
-     */
-    public long getDispatchedCounter() {
-        return subscription != null ? subscription.getDispatchedCounter() : 0;
-    }
-
-    /**
-     * @return number of messages that matched the subscription
-     */
-    public long getEnqueueCounter() {
-        return subscription != null ? subscription.getEnqueueCounter() : 0;
-    }
-
-    /**
-     * @return number of messages queued by the client
-     */
-    public long getDequeueCounter() {
-        return subscription != null ? subscription.getDequeueCounter() : 0;
-    }
-
-    protected ConsumerInfo getConsumerInfo() {
-        return subscription != null ? subscription.getConsumerInfo() : null;
-    }
-
-    /**
-     * @return pretty print
-     */
-    public String toString() {
-        return "SubscriptionView: " + getClientId() + ":" + getConnectionId();
-    }
-
-    /**
-     */
-    public int getPrefetchSize() {
-        return subscription != null ? subscription.getPrefetchSize() : 0;
-    }
-
-    public boolean isMatchingQueue(String queueName) {
-        if (isDestinationQueue()) {
-            return matchesDestination(new ActiveMQQueue(queueName));
-        }
-        return false;
-    }
-
-    public boolean isMatchingTopic(String topicName) {
-        if (isDestinationTopic()) {
-            return matchesDestination(new ActiveMQTopic(topicName));
-        }
-        return false;
-    }
-
-    /**
-     * Return true if this subscription matches the given destination
-     *
-     * @param destination the destination to compare against
-     * @return true if this subscription matches the given destination
-     */
-    public boolean matchesDestination(ActiveMQDestination destination) {
-        ActiveMQDestination subscriptionDestination = subscription.getActiveMQDestination();
-        DestinationFilter filter = DestinationFilter.parseFilter(subscriptionDestination);
-        return filter.matches(destination);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java
deleted file mode 100755
index 134f809..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.jms.InvalidSelectorException;
-
-/**
- * 
- */
-public interface SubscriptionViewMBean {
-
-    /**
-     * @return the clientId of the Connection the Subscription is on
-     */
-    @MBeanInfo("JMS Client id of the Connection the Subscription is on.")
-    String getClientId();
-
-    /**
-     * @return the id of the Connection the Subscription is on
-     */
-    @MBeanInfo("ID of the Connection the Subscription is on.")
-    String getConnectionId();
-
-    /**
-     * @return the id of the Session the subscription is on
-     */
-    @MBeanInfo("ID of the Session the Subscription is on.")
-    long getSessionId();
-
-    /**
-     * @return the id of the Subscription
-     */
-    @MBeanInfo("ID of the Subscription.")
-    long getSubcriptionId();
-
-    /**
-     * @return the destination name
-     */
-    @MBeanInfo("The name of the destionation the subscription is on.")
-    String getDestinationName();
-
-    /**
-     * @return the JMS selector on the current subscription
-     */
-    @MBeanInfo("The SQL-92 message header selector or XPATH body selector of the subscription.")
-    String getSelector();
-
-    /**
-     * Attempts to change the current active selector on the subscription. This
-     * operation is not supported for persistent topics.
-     */
-    void setSelector(@MBeanInfo("selector") String selector) throws InvalidSelectorException, UnsupportedOperationException;
-
-    /**
-     * @return true if the destination is a Queue
-     */
-    @MBeanInfo("Subscription is on a Queue")
-    boolean isDestinationQueue();
-
-    /**
-     * @return true of the destination is a Topic
-     */
-    @MBeanInfo("Subscription is on a Topic")
-    boolean isDestinationTopic();
-
-    /**
-     * @return true if the destination is temporary
-     */
-    @MBeanInfo("Subscription is on a temporary Queue/Topic")
-    boolean isDestinationTemporary();
-
-    /**
-     * @return true if the subscriber is active
-     */
-    @MBeanInfo("Subscription is active (connected and receiving messages).")
-    boolean isActive();
-
-    /**
-     * @return number of messages pending delivery
-     */
-    @MBeanInfo("Number of messages pending delivery.")
-    int getPendingQueueSize();
-
-    /**
-     * @return number of messages dispatched
-     */
-    @MBeanInfo("Number of messages dispatched awaiting acknowledgement.")
-    int getDispatchedQueueSize();
-    
-    /**
-     * The same as the number of messages dispatched - 
-     * making it explicit
-     * @return
-     */
-    @MBeanInfo("Number of messages dispatched awaiting acknowledgement.")
-    int getMessageCountAwaitingAcknowledge();
-
-    /**
-     * @return number of messages that matched the subscription
-     */
-    @MBeanInfo("Number of messages that sent to the client.")
-    long getDispatchedCounter();
-
-    /**
-     * @return number of messages that matched the subscription
-     */
-    @MBeanInfo("Number of messages that matched the subscription.")
-    long getEnqueueCounter();
-
-    /**
-     * @return number of messages queued by the client
-     */
-    @MBeanInfo("Number of messages were sent to and acknowledge by the client.")
-    long getDequeueCounter();
-
-    /**
-     * @return the prefetch that has been configured for this subscriber
-     */
-    @MBeanInfo("Number of messages to pre-fetch and dispatch to the client.")
-    int getPrefetchSize();
-
-    /**
-     * @return whether or not the subscriber is retroactive or not
-     */
-    @MBeanInfo("The subscriber is retroactive (tries to receive broadcasted topic messages sent prior to connecting)")
-    boolean isRetroactive();
-
-    /**
-     * @return whether or not the subscriber is an exclusive consumer
-     */
-    @MBeanInfo("The subscriber is exclusive (no other subscribers may receive messages from the destination as long as this one is)")
-    boolean isExclusive();
-
-    /**
-     * @return whether or not the subscriber is durable (persistent)
-     */
-    @MBeanInfo("The subsription is persistent.")
-    boolean isDurable();
-
-    /**
-     * @return whether or not the subscriber ignores local messages
-     */
-    @MBeanInfo("The subsription ignores local messages.")
-    boolean isNoLocal();
-
-    /**
-     * @return the maximum number of pending messages allowed in addition to the
-     *         prefetch size. If enabled to a non-zero value then this will
-     *         perform eviction of messages for slow consumers on non-durable
-     *         topics.
-     */
-    @MBeanInfo("The maximum number of pending messages allowed (in addition to the prefetch size).")
-    int getMaximumPendingMessageLimit();
-
-    /**
-     * @return the consumer priority
-     */
-    @MBeanInfo("The subscription priority")
-    byte getPriority();
-
-    /**
-     * @return the name of the consumer which is only used for durable
-     *         consumers.
-     */
-    @MBeanInfo("The name of the subscription (durable subscriptions only).")
-    String getSubcriptionName();
-
-    /**
-     * Returns true if this subscription (which may be using wildcards) matches the given queue name
-     *
-     * @param queueName the JMS queue name to match against
-     * @return true if this subscription matches the given queue or false if not
-     */
-    @MBeanInfo("Returns true if the subscription (which may be using wildcards) matches the given queue name")
-    boolean isMatchingQueue(String queueName);
-
-    /**
-     * Returns true if this subscription (which may be using wildcards) matches the given topic name
-     *
-     * @param topicName the JMS topic name to match against
-     * @return true if this subscription matches the given topic or false if not
-     */
-    @MBeanInfo("Returns true if the subscription (which may be using wildcards) matches the given topic name")
-    boolean isMatchingTopic(String topicName);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicSubscriptionView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicSubscriptionView.java
deleted file mode 100644
index 68ae41f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicSubscriptionView.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.TopicSubscription;
-
-/**
- * 
- * 
- */
-public class TopicSubscriptionView extends SubscriptionView implements TopicSubscriptionViewMBean {
-
-    public TopicSubscriptionView(String clientId, TopicSubscription subs) {
-        super(clientId, subs);
-    }
-
-    protected TopicSubscription getTopicSubscription() {
-        return (TopicSubscription)subscription;
-    }
-
-    /**
-     * @return the number of messages discarded due to being a slow consumer
-     */
-    public int getDiscardedCount() {
-        TopicSubscription topicSubscription = getTopicSubscription();
-        return topicSubscription != null ? topicSubscription.discarded() : 0;
-    }
-
-    /**
-     * @return the maximun number of messages that can be pending.
-     */
-    public int getMaximumPendingQueueSize() {
-        TopicSubscription topicSubscription = getTopicSubscription();
-        return topicSubscription != null ? topicSubscription.getMaximumPendingMessages() : 0;
-    }
-
-    /**
-     * 
-     */
-    public void setMaximumPendingQueueSize(int max) {
-        TopicSubscription topicSubscription = getTopicSubscription();
-        if (topicSubscription != null) {
-            topicSubscription.setMaximumPendingMessages(max);
-        }
-    }
-
-    @Override
-    public boolean isActive() {
-        if (subscription instanceof DurableTopicSubscription) {
-            return ((DurableTopicSubscription)subscription).isActive();
-        } else {
-            return super.isActive();
-        }
-    }
-
-    
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicSubscriptionViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicSubscriptionViewMBean.java
deleted file mode 100644
index 1deddd7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicSubscriptionViewMBean.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.broker.jmx;
-
-/**
- *
- * 
- */
-public interface TopicSubscriptionViewMBean extends SubscriptionViewMBean {
-
-    /**
-     * @return the number of messages discarded due to being a slow consumer
-     */
-    @MBeanInfo("Number of messages discared due to being a slow consumer")
-    int getDiscardedCount();
-
-    /**
-     * @return the maximun number of messages that can be pending.
-     */
-    @MBeanInfo("Maximum number of messages that can be pending")
-    int getMaximumPendingQueueSize();
-    
-    void setMaximumPendingQueueSize(int max);
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java
deleted file mode 100755
index b0c6e9a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import org.apache.activemq.broker.region.Topic;
-
-public class TopicView extends DestinationView implements TopicViewMBean {
-
-    public TopicView(ManagedRegionBroker broker, Topic destination) {
-        super(broker, destination);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicViewMBean.java
deleted file mode 100755
index 104f383..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicViewMBean.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * 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.broker.jmx;
-
-public interface TopicViewMBean extends DestinationViewMBean {
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/package.html
deleted file mode 100755
index 16777ee..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-JMX MBeans for the broker and its core connectors.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/package.html
deleted file mode 100755
index 9ca2fcc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-The core classes for the ActiveMQ Message Broker and its connectors.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
deleted file mode 100755
index c75b70c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.jms.JMSException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.DestinationAlreadyExistsException;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.filter.DestinationFilter;
-import org.apache.activemq.filter.DestinationMap;
-import org.apache.activemq.security.SecurityContext;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public abstract class AbstractRegion implements Region {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractRegion.class);
-
-    protected final Map<ActiveMQDestination, Destination> destinations = new ConcurrentHashMap<ActiveMQDestination, Destination>();
-    protected final DestinationMap destinationMap = new DestinationMap();
-    protected final Map<ConsumerId, Subscription> subscriptions = new ConcurrentHashMap<ConsumerId, Subscription>();
-    protected final SystemUsage usageManager;
-    protected final DestinationFactory destinationFactory;
-    protected final DestinationStatistics destinationStatistics;
-    protected final RegionBroker broker;
-    protected boolean autoCreateDestinations = true;
-    protected final TaskRunnerFactory taskRunnerFactory;
-    protected final Object destinationsMutex = new Object();
-    protected final Map<ConsumerId, Object> consumerChangeMutexMap = new HashMap<ConsumerId, Object>();
-    protected boolean started;
-
-    public AbstractRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager,
-            TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        if (broker == null) {
-            throw new IllegalArgumentException("null broker");
-        }
-        this.broker = broker;
-        this.destinationStatistics = destinationStatistics;
-        this.usageManager = memoryManager;
-        this.taskRunnerFactory = taskRunnerFactory;
-        if (broker == null) {
-            throw new IllegalArgumentException("null destinationFactory");
-        }
-        this.destinationFactory = destinationFactory;
-    }
-
-    public final void start() throws Exception {
-        started = true;
-
-        Set<ActiveMQDestination> inactiveDests = getInactiveDestinations();
-        for (Iterator<ActiveMQDestination> iter = inactiveDests.iterator(); iter.hasNext();) {
-            ActiveMQDestination dest = iter.next();
-
-            ConnectionContext context = new ConnectionContext();
-            context.setBroker(broker.getBrokerService().getBroker());
-            context.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
-            context.getBroker().addDestination(context, dest, false);
-        }
-        synchronized (destinationsMutex) {
-            for (Iterator<Destination> i = destinations.values().iterator(); i.hasNext();) {
-                Destination dest = i.next();
-                dest.start();
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        started = false;
-        synchronized (destinationsMutex) {
-            for (Iterator<Destination> i = destinations.values().iterator(); i.hasNext();) {
-                Destination dest = i.next();
-                dest.stop();
-            }
-        }
-        destinations.clear();
-    }
-
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,
-            boolean createIfTemporary) throws Exception {
-        LOG.debug(broker.getBrokerName() + " adding destination: " + destination);
-        synchronized (destinationsMutex) {
-            Destination dest = destinations.get(destination);
-            if (dest == null) {
-                if (destination.isTemporary() == false || createIfTemporary) {
-                    dest = createDestination(context, destination);
-                    // intercept if there is a valid interceptor defined
-                    DestinationInterceptor destinationInterceptor = broker.getDestinationInterceptor();
-                    if (destinationInterceptor != null) {
-                        dest = destinationInterceptor.intercept(dest);
-                    }
-                    dest.start();
-                    destinations.put(destination, dest);
-                    destinationMap.put(destination, dest);
-                    addSubscriptionsForDestination(context, dest);
-                }
-                if (dest == null) {
-                    throw new JMSException("The destination " + destination + " does not exist.");
-                }
-            }
-            return dest;
-        }
-    }
-
-    public Map<ConsumerId, Subscription> getSubscriptions() {
-        return subscriptions;
-    }
-
-    protected List<Subscription> addSubscriptionsForDestination(ConnectionContext context, Destination dest)
-            throws Exception {
-
-        List<Subscription> rc = new ArrayList<Subscription>();
-        // Add all consumers that are interested in the destination.
-        for (Iterator<Subscription> iter = subscriptions.values().iterator(); iter.hasNext();) {
-            Subscription sub = iter.next();
-            if (sub.matches(dest.getActiveMQDestination())) {
-                dest.addSubscription(context, sub);
-                rc.add(sub);
-            }
-        }
-        return rc;
-
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout)
-            throws Exception {
-
-        // No timeout.. then try to shut down right way, fails if there are
-        // current subscribers.
-        if (timeout == 0) {
-            for (Iterator<Subscription> iter = subscriptions.values().iterator(); iter.hasNext();) {
-                Subscription sub = iter.next();
-                if (sub.matches(destination)) {
-                    throw new JMSException("Destination still has an active subscription: " + destination);
-                }
-            }
-        }
-
-        if (timeout > 0) {
-            // TODO: implement a way to notify the subscribers that we want to
-            // take the down
-            // the destination and that they should un-subscribe.. Then wait up
-            // to timeout time before
-            // dropping the subscription.
-        }
-
-        LOG.debug("Removing destination: " + destination);
-
-        synchronized (destinationsMutex) {
-            Destination dest = destinations.remove(destination);
-            if (dest != null) {
-                // timeout<0 or we timed out, we now force any remaining
-                // subscriptions to un-subscribe.
-                for (Iterator<Subscription> iter = subscriptions.values().iterator(); iter.hasNext();) {
-                    Subscription sub = iter.next();
-                    if (sub.matches(destination)) {
-                        dest.removeSubscription(context, sub, 0l);
-                    }
-                }
-                destinationMap.removeAll(destination);
-                dispose(context, dest);
-                DestinationInterceptor destinationInterceptor = broker.getDestinationInterceptor();
-                if (destinationInterceptor != null) {
-                    destinationInterceptor.remove(dest);
-                }
-
-            } else {
-                LOG.debug("Destination doesn't exist: " + dest);
-            }
-        }
-    }
-
-    /**
-     * Provide an exact or wildcard lookup of destinations in the region
-     * 
-     * @return a set of matching destination objects.
-     */
-    public Set<Destination> getDestinations(ActiveMQDestination destination) {
-        synchronized (destinationsMutex) {
-            return destinationMap.get(destination);
-        }
-    }
-
-    public Map<ActiveMQDestination, Destination> getDestinationMap() {
-        synchronized (destinationsMutex) {
-            return new HashMap<ActiveMQDestination, Destination>(destinations);
-        }
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        LOG.debug(broker.getBrokerName() + " adding consumer: " + info.getConsumerId() + " for destination: "
-                + info.getDestination());
-        ActiveMQDestination destination = info.getDestination();
-        if (destination != null && !destination.isPattern() && !destination.isComposite()) {
-            // lets auto-create the destination
-            lookup(context, destination,true);
-        }
-
-        Object addGuard;
-        synchronized (consumerChangeMutexMap) {
-            addGuard = consumerChangeMutexMap.get(info.getConsumerId());
-            if (addGuard == null) {
-                addGuard = new Object();
-                consumerChangeMutexMap.put(info.getConsumerId(), addGuard);
-            }
-        }
-        synchronized (addGuard) {
-            Subscription o = subscriptions.get(info.getConsumerId());
-            if (o != null) {
-                LOG
-                        .warn("A duplicate subscription was detected. Clients may be misbehaving. Later warnings you may see about subscription removal are a consequence of this.");
-                return o;
-            }
-
-            // We may need to add some destinations that are in persistent store
-            // but not active
-            // in the broker.
-            //
-            // TODO: think about this a little more. This is good cause
-            // destinations are not loaded into
-            // memory until a client needs to use the queue, but a management
-            // agent viewing the
-            // broker will not see a destination that exists in persistent
-            // store. We may want to
-            // eagerly load all destinations into the broker but have an
-            // inactive state for the
-            // destination which has reduced memory usage.
-            //
-            DestinationFilter.parseFilter(info.getDestination());
-
-            Subscription sub = createSubscription(context, info);
-
-            subscriptions.put(info.getConsumerId(), sub);
-
-            // At this point we're done directly manipulating subscriptions,
-            // but we need to retain the synchronized block here. Consider
-            // otherwise what would happen if at this point a second
-            // thread added, then removed, as would be allowed with
-            // no mutex held. Remove is only essentially run once
-            // so everything after this point would be leaked.
-
-            // Add the subscription to all the matching queues.
-            // But copy the matches first - to prevent deadlocks
-            List<Destination> addList = new ArrayList<Destination>();
-            synchronized (destinationsMutex) {
-                for (Iterator iter = destinationMap.get(info.getDestination()).iterator(); iter.hasNext();) {
-                    Destination dest = (Destination) iter.next();
-                    addList.add(dest);
-                }
-            }
-
-            for (Destination dest : addList) {
-                dest.addSubscription(context, sub);
-            }
-
-            if (info.isBrowser()) {
-                ((QueueBrowserSubscription) sub).destinationsAdded();
-            }
-
-            return sub;
-        }
-    }
-
-    /**
-     * Get all the Destinations that are in storage
-     * 
-     * @return Set of all stored destinations
-     */
-    public Set getDurableDestinations() {
-        return destinationFactory.getDestinations();
-    }
-
-    /**
-     * @return all Destinations that don't have active consumers
-     */
-    protected Set<ActiveMQDestination> getInactiveDestinations() {
-        Set<ActiveMQDestination> inactiveDests = destinationFactory.getDestinations();
-        synchronized (destinationsMutex) {
-            inactiveDests.removeAll(destinations.keySet());
-        }
-        return inactiveDests;
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        LOG.debug(broker.getBrokerName() + " removing consumer: " + info.getConsumerId() + " for destination: "
-                + info.getDestination());
-
-        Subscription sub = subscriptions.remove(info.getConsumerId());
-        // The sub could be removed elsewhere - see ConnectionSplitBroker
-        if (sub != null) {
-
-            // remove the subscription from all the matching queues.
-            List<Destination> removeList = new ArrayList<Destination>();
-            synchronized (destinationsMutex) {
-                for (Iterator iter = destinationMap.get(info.getDestination()).iterator(); iter.hasNext();) {
-                    Destination dest = (Destination) iter.next();
-                    removeList.add(dest);
-
-                }
-            }
-            for (Destination dest : removeList) {
-                dest.removeSubscription(context, sub, info.getLastDeliveredSequenceId());
-            }
-
-            destroySubscription(sub);
-        }
-        synchronized (consumerChangeMutexMap) {
-            consumerChangeMutexMap.remove(info.getConsumerId());
-        }
-    }
-
-    protected void destroySubscription(Subscription sub) {
-        sub.destroy();
-    }
-
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        throw new JMSException("Invalid operation.");
-    }
-
-    public void send(final ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        final ConnectionContext context = producerExchange.getConnectionContext();
-
-        if (producerExchange.isMutable() || producerExchange.getRegionDestination() == null) {
-            final Destination regionDestination = lookup(context, messageSend.getDestination(),false);
-            producerExchange.setRegionDestination(regionDestination);
-        }
-
-        producerExchange.getRegionDestination().send(producerExchange, messageSend);
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        Subscription sub = consumerExchange.getSubscription();
-        if (sub == null) {
-            sub = subscriptions.get(ack.getConsumerId());
-            if (sub == null) {
-                if (!consumerExchange.getConnectionContext().isInRecoveryMode()) {
-                    LOG.warn("Ack for non existent subscription, ack:" + ack);
-                    throw new IllegalArgumentException("The subscription does not exist: " + ack.getConsumerId());
-                } else {
-                    LOG.debug("Ack for non existent subscription in recovery, ack:" + ack);
-                    return;
-                }
-            }
-            consumerExchange.setSubscription(sub);
-        }
-        sub.acknowledge(consumerExchange.getConnectionContext(), ack);
-    }
-
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
-        Subscription sub = subscriptions.get(pull.getConsumerId());
-        if (sub == null) {
-            throw new IllegalArgumentException("The subscription does not exist: " + pull.getConsumerId());
-        }
-        return sub.pullMessage(context, pull);
-    }
-
-    protected Destination lookup(ConnectionContext context, ActiveMQDestination destination,boolean createTemporary) throws Exception {
-        Destination dest = null;
-        synchronized (destinationsMutex) {
-            dest = destinations.get(destination);
-        }
-        if (dest == null) {
-            if (isAutoCreateDestinations()) {
-                // Try to auto create the destination... re-invoke broker
-                // from the
-                // top so that the proper security checks are performed.
-                try {
-                    context.getBroker().addDestination(context, destination, createTemporary);
-                    dest = addDestination(context, destination, false);
-                } catch (DestinationAlreadyExistsException e) {
-                    // if the destination already exists then lets ignore
-                    // this error
-                }
-                // We should now have the dest created.
-                synchronized (destinationsMutex) {
-                    dest = destinations.get(destination);
-                }
-            }
-            if (dest == null) {
-                throw new JMSException("The destination " + destination + " does not exist.");
-            }
-        }
-        return dest;
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        Subscription sub = subscriptions.get(messageDispatchNotification.getConsumerId());
-        if (sub != null) {
-            sub.processMessageDispatchNotification(messageDispatchNotification);
-        } else {
-            throw new JMSException("Slave broker out of sync with master - Subscription: "
-                    + messageDispatchNotification.getConsumerId() + " on "
-                    + messageDispatchNotification.getDestination() + " does not exist for dispatch of message: "
-                    + messageDispatchNotification.getMessageId());
-        }
-    }
-
-    /*
-     * For a Queue/TempQueue, dispatch order is imperative to match acks, so the
-     * dispatch is deferred till the notification to ensure that the
-     * subscription chosen by the master is used. AMQ-2102
-     */
-    protected void processDispatchNotificationViaDestination(MessageDispatchNotification messageDispatchNotification)
-            throws Exception {
-        Destination dest = null;
-        synchronized (destinationsMutex) {
-            dest = destinations.get(messageDispatchNotification.getDestination());
-        }
-        if (dest != null) {
-            dest.processDispatchNotification(messageDispatchNotification);
-        } else {
-            throw new JMSException("Slave broker out of sync with master - Destination: "
-                    + messageDispatchNotification.getDestination() + " does not exist for consumer "
-                    + messageDispatchNotification.getConsumerId() + " with message: "
-                    + messageDispatchNotification.getMessageId());
-        }
-    }
-
-    public void gc() {
-        for (Iterator<Subscription> iter = subscriptions.values().iterator(); iter.hasNext();) {
-            Subscription sub = iter.next();
-            sub.gc();
-        }
-        synchronized (destinationsMutex) {
-            for (Iterator<Destination> iter = destinations.values().iterator(); iter.hasNext();) {
-                Destination dest = iter.next();
-                dest.gc();
-            }
-        }
-    }
-
-    protected abstract Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws Exception;
-
-    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination)
-            throws Exception {
-        return destinationFactory.createDestination(context, destination, destinationStatistics);
-    }
-
-    public boolean isAutoCreateDestinations() {
-        return autoCreateDestinations;
-    }
-
-    public void setAutoCreateDestinations(boolean autoCreateDestinations) {
-        this.autoCreateDestinations = autoCreateDestinations;
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        synchronized (destinationsMutex) {
-            for (Iterator iter = destinationMap.get(info.getDestination()).iterator(); iter.hasNext();) {
-                Destination dest = (Destination) iter.next();
-                dest.addProducer(context, info);
-            }
-        }
-    }
-
-    /**
-     * Removes a Producer.
-     * 
-     * @param context
-     *            the environment the operation is being executed under.
-     * @throws Exception
-     *             TODO
-     */
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        synchronized (destinationsMutex) {
-            for (Iterator iter = destinationMap.get(info.getDestination()).iterator(); iter.hasNext();) {
-                Destination dest = (Destination) iter.next();
-                dest.removeProducer(context, info);
-            }
-        }
-    }
-
-    protected void dispose(ConnectionContext context, Destination dest) throws Exception {
-        dest.dispose(context);
-        dest.stop();
-        destinationFactory.removeDestination(dest);
-    }
-
-    public void processConsumerControl(ConsumerBrokerExchange consumerExchange, ConsumerControl control) {
-        Subscription sub = subscriptions.get(control.getConsumerId());
-        if (sub != null && sub instanceof AbstractSubscription) {
-            ((AbstractSubscription) sub).setPrefetchSize(control.getPrefetch());
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("setting prefetch: " + control.getPrefetch() + ", on subscription: "
-                        + control.getConsumerId());
-            }
-            try {
-                lookup(consumerExchange.getConnectionContext(), control.getDestination(),false).wakeup();
-            } catch (Exception e) {
-                LOG.warn("failed to deliver consumerControl to destination: " + control.getDestination(), e);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java
deleted file mode 100755
index 581784e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import javax.management.ObjectName;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.DestinationFilter;
-import org.apache.activemq.filter.LogicExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.filter.NoLocalExpression;
-import org.apache.activemq.selector.SelectorParser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class AbstractSubscription implements Subscription {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractSubscription.class);
-    protected Broker broker;
-    protected ConnectionContext context;
-    protected ConsumerInfo info;
-    protected final DestinationFilter destinationFilter;
-    protected final CopyOnWriteArrayList<Destination> destinations = new CopyOnWriteArrayList<Destination>();
-    private BooleanExpression selectorExpression;
-    private ObjectName objectName;
-    private int cursorMemoryHighWaterMark = 70;
-    private boolean slowConsumer;
-
-
-    public AbstractSubscription(Broker broker,ConnectionContext context, ConsumerInfo info) throws InvalidSelectorException {
-        this.broker = broker;
-        this.context = context;
-        this.info = info;
-        this.destinationFilter = DestinationFilter.parseFilter(info.getDestination());
-        this.selectorExpression = parseSelector(info);
-    }
-
-    private static BooleanExpression parseSelector(ConsumerInfo info) throws InvalidSelectorException {
-        BooleanExpression rc = null;
-        if (info.getSelector() != null) {
-            rc = SelectorParser.parse(info.getSelector());
-        }
-        if (info.isNoLocal()) {
-            if (rc == null) {
-                rc = new NoLocalExpression(info.getConsumerId().getConnectionId());
-            } else {
-                rc = LogicExpression.createAND(new NoLocalExpression(info.getConsumerId().getConnectionId()), rc);
-            }
-        }
-        if (info.getAdditionalPredicate() != null) {
-            if (rc == null) {
-                rc = info.getAdditionalPredicate();
-            } else {
-                rc = LogicExpression.createAND(info.getAdditionalPredicate(), rc);
-            }
-        }
-        return rc;
-    }
-
-    public boolean matches(MessageReference node, MessageEvaluationContext context) throws IOException {
-        ConsumerId targetConsumerId = node.getTargetConsumerId();
-        if (targetConsumerId != null) {
-            if (!targetConsumerId.equals(info.getConsumerId())) {
-                return false;
-            }
-        }
-        try {
-            return (selectorExpression == null || selectorExpression.matches(context)) && this.context.isAllowedToConsume(node);
-        } catch (JMSException e) {
-            LOG.info("Selector failed to evaluate: " + e.getMessage(), e);
-            return false;
-        }
-    }
-
-    public boolean matches(ActiveMQDestination destination) {
-        return destinationFilter.matches(destination);
-    }
-
-    public void add(ConnectionContext context, Destination destination) throws Exception {
-        destinations.add(destination);
-    }
-
-    public List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception {
-        destinations.remove(destination);
-        return Collections.EMPTY_LIST;
-    }
-
-    public ConsumerInfo getConsumerInfo() {
-        return info;
-    }
-
-    public void gc() {
-    }
-
-    public boolean isSlave() {
-        return broker.getBrokerService().isSlave();
-    }
-
-    public ConnectionContext getContext() {
-        return context;
-    }
-
-    public ConsumerInfo getInfo() {
-        return info;
-    }
-
-    public BooleanExpression getSelectorExpression() {
-        return selectorExpression;
-    }
-
-    public String getSelector() {
-        return info.getSelector();
-    }
-
-    public void setSelector(String selector) throws InvalidSelectorException {
-        ConsumerInfo copy = info.copy();
-        copy.setSelector(selector);
-        BooleanExpression newSelector = parseSelector(copy);
-        // its valid so lets actually update it now
-        info.setSelector(selector);
-        this.selectorExpression = newSelector;
-    }
-
-    public ObjectName getObjectName() {
-        return objectName;
-    }
-
-    public void setObjectName(ObjectName objectName) {
-        this.objectName = objectName;
-    }
-
-    public int getPrefetchSize() {
-        return info.getPrefetchSize();
-    }
-    public void setPrefetchSize(int newSize) {
-        info.setPrefetchSize(newSize);
-    }
-
-    public boolean isRecoveryRequired() {
-        return true;
-    }
-    
-    public boolean isSlowConsumer() {
-        return slowConsumer;
-    }
-    
-    public void setSlowConsumer(boolean val) {
-        slowConsumer = val;
-    }
-
-    public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception {
-        boolean result = false;
-        MessageEvaluationContext msgContext = context.getMessageEvaluationContext();
-        try {
-            msgContext.setDestination(message.getRegionDestination().getActiveMQDestination());
-            msgContext.setMessageReference(message);
-            result = matches(message, msgContext);
-            if (result) {
-                doAddRecoveredMessage(message);
-            }
-
-        } finally {
-            msgContext.clear();
-        }
-        return result;
-    }
-
-    public ActiveMQDestination getActiveMQDestination() {
-        return info != null ? info.getDestination() : null;
-    }
-    
-    public boolean isBrowser() {
-        return info != null && info.isBrowser();
-    }
-    
-    public int getInFlightUsage() {
-        if (info.getPrefetchSize() > 0) {
-        return (getInFlightSize() * 100)/info.getPrefetchSize();
-        }
-        return Integer.MAX_VALUE;
-    }
-    
-    /**
-     * Add a destination
-     * @param destination
-     */
-    public void addDestination(Destination destination) {
-        
-    }
-       
-    
-    /**
-     * Remove a destination
-     * @param destination
-     */
-    public void removeDestination(Destination destination) {
-        
-    }
-    
-    public int getCursorMemoryHighWaterMark(){
-    	return this.cursorMemoryHighWaterMark;
-    }
-
-	public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark){
-		this.cursorMemoryHighWaterMark=cursorMemoryHighWaterMark;
-	}
-    
-    public int countBeforeFull() {
-        return getDispatchedQueueSize() - info.getPrefetchSize();
-    }
-
-    public void unmatched(MessageReference node) throws IOException {
-        // only durable topic subs have something to do here
-    }
-
-    protected void doAddRecoveredMessage(MessageReference message) throws Exception {
-        add(message);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractTempRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractTempRegion.java
deleted file mode 100644
index 7469c90..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractTempRegion.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public abstract class AbstractTempRegion extends AbstractRegion {
-    private static final Logger LOG = LoggerFactory.getLogger(TempQueueRegion.class);
-
-    private Map<CachedDestination, Destination> cachedDestinations = new HashMap<CachedDestination, Destination>();
-    private final boolean doCacheTempDestinations;
-    private final int purgeTime;
-    private Timer purgeTimer;
-    private TimerTask purgeTask;
-   
-
-    /**
-     * @param broker
-     * @param destinationStatistics
-     * @param memoryManager
-     * @param taskRunnerFactory
-     * @param destinationFactory
-     */
-    public AbstractTempRegion(RegionBroker broker,
-            DestinationStatistics destinationStatistics,
-            SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-            DestinationFactory destinationFactory) {
-        super(broker, destinationStatistics, memoryManager, taskRunnerFactory,
-                destinationFactory);
-        this.doCacheTempDestinations=broker.getBrokerService().isCacheTempDestinations();
-        this.purgeTime = broker.getBrokerService().getTimeBeforePurgeTempDestinations();
-        if (this.doCacheTempDestinations) {
-            this.purgeTimer = new Timer("ActiveMQ Temp destination purge timer", true);
-            this.purgeTask = new TimerTask() {
-                public void run() {
-                    doPurge();
-                }
-    
-            };
-            this.purgeTimer.schedule(purgeTask, purgeTime, purgeTime);
-        }
-       
-    }
-
-    public void stop() throws Exception {
-        super.stop();
-        if (purgeTimer != null) {
-            purgeTimer.cancel();
-        }
-    }
-
-    protected abstract Destination doCreateDestination(
-            ConnectionContext context, ActiveMQDestination destination)
-            throws Exception;
-
-    protected synchronized Destination createDestination(
-            ConnectionContext context, ActiveMQDestination destination)
-            throws Exception {
-        Destination result = cachedDestinations.remove(new CachedDestination(
-                destination));
-        if (result == null) {
-            result = doCreateDestination(context, destination);
-        }
-        return result;
-    }
-
-    protected final synchronized void dispose(ConnectionContext context,
-            Destination dest) throws Exception {
-        // add to cache
-        if (this.doCacheTempDestinations) {
-            cachedDestinations.put(new CachedDestination(dest
-                    .getActiveMQDestination()), dest);
-        }else {
-            try {
-                dest.dispose(context);
-                dest.stop();
-            } catch (Exception e) {
-                LOG.warn("Failed to dispose of " + dest, e);
-            }
-        }
-    }
-
-    private void doDispose(Destination dest) {
-        ConnectionContext context = new ConnectionContext();
-        try {
-            dest.dispose(context);
-            dest.stop();
-        } catch (Exception e) {
-            LOG.warn("Failed to dispose of " + dest, e);
-        }
-
-    }
-
-    private synchronized void doPurge() {
-        long currentTime = System.currentTimeMillis();
-        if (cachedDestinations.size() > 0) {
-            Set<CachedDestination> tmp = new HashSet<CachedDestination>(
-                    cachedDestinations.keySet());
-            for (CachedDestination key : tmp) {
-                if ((key.timeStamp + purgeTime) < currentTime) {
-                    Destination dest = cachedDestinations.remove(key);
-                    if (dest != null) {
-                        doDispose(dest);
-                    }
-                }
-            }
-        }
-    }
-
-    static class CachedDestination {
-        long timeStamp;
-
-        ActiveMQDestination destination;
-
-        CachedDestination(ActiveMQDestination destination) {
-            this.destination = destination;
-            this.timeStamp = System.currentTimeMillis();
-        }
-
-        public int hashCode() {
-            return destination.hashCode();
-        }
-
-        public boolean equals(Object o) {
-            if (o instanceof CachedDestination) {
-                CachedDestination other = (CachedDestination) o;
-                return other.destination.equals(this.destination);
-            }
-            return false;
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/BaseDestination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/BaseDestination.java
deleted file mode 100755
index 4c528f0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/BaseDestination.java
+++ /dev/null
@@ -1,677 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import javax.jms.ResourceAllocationException;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.SlowConsumerStrategy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.state.ProducerState;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.usage.Usage;
-import org.slf4j.Logger;
-
-/**
- * 
- */
-public abstract class BaseDestination implements Destination {
-    /**
-     * The maximum number of messages to page in to the destination from
-     * persistent storage
-     */
-    public static final int MAX_PAGE_SIZE = 200;
-    public static final int MAX_BROWSE_PAGE_SIZE = MAX_PAGE_SIZE * 2;
-    public static final long EXPIRE_MESSAGE_PERIOD = 30 * 1000;
-    public static final long DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC = 60 * 1000;
-    public static final int MAX_PRODUCERS_TO_AUDIT = 64;
-    public static final int MAX_AUDIT_DEPTH = 2048;
-
-    protected final ActiveMQDestination destination;
-    protected final Broker broker;
-    protected final MessageStore store;
-    protected SystemUsage systemUsage;
-    protected MemoryUsage memoryUsage;
-    private boolean producerFlowControl = true;
-    protected boolean warnOnProducerFlowControl = true;
-    protected long blockedProducerWarningInterval = DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL;
-
-    private int maxProducersToAudit = 1024;
-    private int maxAuditDepth = 2048;
-    private boolean enableAudit = true;
-    private int maxPageSize = MAX_PAGE_SIZE;
-    private int maxBrowsePageSize = MAX_BROWSE_PAGE_SIZE;
-    private boolean useCache = true;
-    private int minimumMessageSize = 1024;
-    private boolean lazyDispatch = false;
-    private boolean advisoryForSlowConsumers;
-    private boolean advisdoryForFastProducers;
-    private boolean advisoryForDiscardingMessages;
-    private boolean advisoryWhenFull;
-    private boolean advisoryForDelivery;
-    private boolean advisoryForConsumed;
-    private boolean sendAdvisoryIfNoConsumers;
-    protected final DestinationStatistics destinationStatistics = new DestinationStatistics();
-    protected final BrokerService brokerService;
-    protected final Broker regionBroker;
-    protected DeadLetterStrategy deadLetterStrategy = DEFAULT_DEAD_LETTER_STRATEGY;
-    protected long expireMessagesPeriod = EXPIRE_MESSAGE_PERIOD;
-    private int maxExpirePageSize = MAX_BROWSE_PAGE_SIZE;
-    protected int cursorMemoryHighWaterMark = 70;
-    protected int storeUsageHighWaterMark = 100;
-    private SlowConsumerStrategy slowConsumerStrategy;
-    private boolean prioritizedMessages;
-    private long inactiveTimoutBeforeGC = DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC;
-    private boolean gcIfInactive;
-    private long lastActiveTime=0l;
-    private boolean reduceMemoryFootprint = false;
-
-    /**
-     * @param broker
-     * @param store
-     * @param destination
-     * @param parentStats
-     * @throws Exception
-     */
-    public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception {
-        this.brokerService = brokerService;
-        this.broker = brokerService.getBroker();
-        this.store = store;
-        this.destination = destination;
-        // let's copy the enabled property from the parent DestinationStatistics
-        this.destinationStatistics.setEnabled(parentStats.isEnabled());
-        this.destinationStatistics.setParent(parentStats);
-        this.systemUsage = new SystemUsage(brokerService.getProducerSystemUsage(), destination.toString());
-        this.memoryUsage = this.systemUsage.getMemoryUsage();
-        this.memoryUsage.setUsagePortion(1.0f);
-        this.regionBroker = brokerService.getRegionBroker();
-    }
-
-    /**
-     * initialize the destination
-     * 
-     * @throws Exception
-     */
-    public void initialize() throws Exception {
-        // Let the store know what usage manager we are using so that he can
-        // flush messages to disk when usage gets high.
-        if (store != null) {
-            store.setMemoryUsage(this.memoryUsage);
-        }
-    }
-
-    /**
-     * @return the producerFlowControl
-     */
-    public boolean isProducerFlowControl() {
-        return producerFlowControl;
-    }
-
-    /**
-     * @param producerFlowControl the producerFlowControl to set
-     */
-    public void setProducerFlowControl(boolean producerFlowControl) {
-        this.producerFlowControl = producerFlowControl;
-    }
-
-    /**
-     * Set's the interval at which warnings about producers being blocked by
-     * resource usage will be triggered. Values of 0 or less will disable
-     * warnings
-     * 
-     * @param blockedProducerWarningInterval the interval at which warning about
-     *            blocked producers will be triggered.
-     */
-    public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval) {
-        this.blockedProducerWarningInterval = blockedProducerWarningInterval;
-    }
-
-    /**
-     * 
-     * @return the interval at which warning about blocked producers will be
-     *         triggered.
-     */
-    public long getBlockedProducerWarningInterval() {
-        return blockedProducerWarningInterval;
-    }
-
-    /**
-     * @return the maxProducersToAudit
-     */
-    public int getMaxProducersToAudit() {
-        return maxProducersToAudit;
-    }
-
-    /**
-     * @param maxProducersToAudit the maxProducersToAudit to set
-     */
-    public void setMaxProducersToAudit(int maxProducersToAudit) {
-        this.maxProducersToAudit = maxProducersToAudit;
-    }
-
-    /**
-     * @return the maxAuditDepth
-     */
-    public int getMaxAuditDepth() {
-        return maxAuditDepth;
-    }
-
-    /**
-     * @param maxAuditDepth the maxAuditDepth to set
-     */
-    public void setMaxAuditDepth(int maxAuditDepth) {
-        this.maxAuditDepth = maxAuditDepth;
-    }
-
-    /**
-     * @return the enableAudit
-     */
-    public boolean isEnableAudit() {
-        return enableAudit;
-    }
-
-    /**
-     * @param enableAudit the enableAudit to set
-     */
-    public void setEnableAudit(boolean enableAudit) {
-        this.enableAudit = enableAudit;
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        destinationStatistics.getProducers().increment();
-        this.lastActiveTime=0l;
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        destinationStatistics.getProducers().decrement();
-    }
-    
-    public void addSubscription(ConnectionContext context, Subscription sub) throws Exception{
-        destinationStatistics.getConsumers().increment();
-        this.lastActiveTime=0l;
-    }
-
-    public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception{
-        destinationStatistics.getConsumers().decrement();
-    }
-
-
-    public final MemoryUsage getMemoryUsage() {
-        return memoryUsage;
-    }
-
-    public DestinationStatistics getDestinationStatistics() {
-        return destinationStatistics;
-    }
-
-    public ActiveMQDestination getActiveMQDestination() {
-        return destination;
-    }
-
-    public final String getName() {
-        return getActiveMQDestination().getPhysicalName();
-    }
-
-    public final MessageStore getMessageStore() {
-        return store;
-    }
-
-    public final boolean isActive() {
-        return destinationStatistics.getConsumers().getCount() != 0 || destinationStatistics.getProducers().getCount() != 0;
-    }
-
-    public int getMaxPageSize() {
-        return maxPageSize;
-    }
-
-    public void setMaxPageSize(int maxPageSize) {
-        this.maxPageSize = maxPageSize;
-    }
-
-    public int getMaxBrowsePageSize() {
-        return this.maxBrowsePageSize;
-    }
-
-    public void setMaxBrowsePageSize(int maxPageSize) {
-        this.maxBrowsePageSize = maxPageSize;
-    }
-
-    public int getMaxExpirePageSize() {
-        return this.maxExpirePageSize;
-    }
-
-    public void setMaxExpirePageSize(int maxPageSize) {
-        this.maxExpirePageSize = maxPageSize;
-    }
-
-    public void setExpireMessagesPeriod(long expireMessagesPeriod) {
-        this.expireMessagesPeriod = expireMessagesPeriod;
-    }
-
-    public long getExpireMessagesPeriod() {
-        return expireMessagesPeriod;
-    }
-
-    public boolean isUseCache() {
-        return useCache;
-    }
-
-    public void setUseCache(boolean useCache) {
-        this.useCache = useCache;
-    }
-
-    public int getMinimumMessageSize() {
-        return minimumMessageSize;
-    }
-
-    public void setMinimumMessageSize(int minimumMessageSize) {
-        this.minimumMessageSize = minimumMessageSize;
-    }
-
-    public boolean isLazyDispatch() {
-        return lazyDispatch;
-    }
-
-    public void setLazyDispatch(boolean lazyDispatch) {
-        this.lazyDispatch = lazyDispatch;
-    }
-
-    protected long getDestinationSequenceId() {
-        return regionBroker.getBrokerSequenceId();
-    }
-
-    /**
-     * @return the advisoryForSlowConsumers
-     */
-    public boolean isAdvisoryForSlowConsumers() {
-        return advisoryForSlowConsumers;
-    }
-
-    /**
-     * @param advisoryForSlowConsumers the advisoryForSlowConsumers to set
-     */
-    public void setAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers) {
-        this.advisoryForSlowConsumers = advisoryForSlowConsumers;
-    }
-
-    /**
-     * @return the advisoryForDiscardingMessages
-     */
-    public boolean isAdvisoryForDiscardingMessages() {
-        return advisoryForDiscardingMessages;
-    }
-
-    /**
-     * @param advisoryForDiscardingMessages the advisoryForDiscardingMessages to
-     *            set
-     */
-    public void setAdvisoryForDiscardingMessages(boolean advisoryForDiscardingMessages) {
-        this.advisoryForDiscardingMessages = advisoryForDiscardingMessages;
-    }
-
-    /**
-     * @return the advisoryWhenFull
-     */
-    public boolean isAdvisoryWhenFull() {
-        return advisoryWhenFull;
-    }
-
-    /**
-     * @param advisoryWhenFull the advisoryWhenFull to set
-     */
-    public void setAdvisoryWhenFull(boolean advisoryWhenFull) {
-        this.advisoryWhenFull = advisoryWhenFull;
-    }
-
-    /**
-     * @return the advisoryForDelivery
-     */
-    public boolean isAdvisoryForDelivery() {
-        return advisoryForDelivery;
-    }
-
-    /**
-     * @param advisoryForDelivery the advisoryForDelivery to set
-     */
-    public void setAdvisoryForDelivery(boolean advisoryForDelivery) {
-        this.advisoryForDelivery = advisoryForDelivery;
-    }
-
-    /**
-     * @return the advisoryForConsumed
-     */
-    public boolean isAdvisoryForConsumed() {
-        return advisoryForConsumed;
-    }
-
-    /**
-     * @param advisoryForConsumed the advisoryForConsumed to set
-     */
-    public void setAdvisoryForConsumed(boolean advisoryForConsumed) {
-        this.advisoryForConsumed = advisoryForConsumed;
-    }
-
-    /**
-     * @return the advisdoryForFastProducers
-     */
-    public boolean isAdvisdoryForFastProducers() {
-        return advisdoryForFastProducers;
-    }
-
-    /**
-     * @param advisdoryForFastProducers the advisdoryForFastProducers to set
-     */
-    public void setAdvisdoryForFastProducers(boolean advisdoryForFastProducers) {
-        this.advisdoryForFastProducers = advisdoryForFastProducers;
-    }
-
-    public boolean isSendAdvisoryIfNoConsumers() {
-        return sendAdvisoryIfNoConsumers;
-    }
-
-    public void setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers) {
-        this.sendAdvisoryIfNoConsumers = sendAdvisoryIfNoConsumers;
-    }
-
-    /**
-     * @return the dead letter strategy
-     */
-    public DeadLetterStrategy getDeadLetterStrategy() {
-        return deadLetterStrategy;
-    }
-
-    /**
-     * set the dead letter strategy
-     * 
-     * @param deadLetterStrategy
-     */
-    public void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy) {
-        this.deadLetterStrategy = deadLetterStrategy;
-    }
-
-    public int getCursorMemoryHighWaterMark() {
-        return this.cursorMemoryHighWaterMark;
-    }
-
-    public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) {
-        this.cursorMemoryHighWaterMark = cursorMemoryHighWaterMark;
-    }
-
-    /**
-     * called when message is consumed
-     * 
-     * @param context
-     * @param messageReference
-     */
-    public void messageConsumed(ConnectionContext context, MessageReference messageReference) {
-        if (advisoryForConsumed) {
-            broker.messageConsumed(context, messageReference);
-        }
-    }
-
-    /**
-     * Called when message is delivered to the broker
-     * 
-     * @param context
-     * @param messageReference
-     */
-    public void messageDelivered(ConnectionContext context, MessageReference messageReference) {
-        if (advisoryForDelivery) {
-            broker.messageDelivered(context, messageReference);
-        }
-    }
-
-    /**
-     * Called when a message is discarded - e.g. running low on memory This will
-     * happen only if the policy is enabled - e.g. non durable topics
-     * 
-     * @param context
-     * @param messageReference
-     */
-    public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference) {
-        if (advisoryForDiscardingMessages) {
-            broker.messageDiscarded(context, sub, messageReference);
-        }
-    }
-
-    /**
-     * Called when there is a slow consumer
-     * 
-     * @param context
-     * @param subs
-     */
-    public void slowConsumer(ConnectionContext context, Subscription subs) {
-        if (advisoryForSlowConsumers) {
-            broker.slowConsumer(context, this, subs);
-        }
-        if (slowConsumerStrategy != null) {
-            slowConsumerStrategy.slowConsumer(context, subs);
-        }
-    }
-
-    /**
-     * Called to notify a producer is too fast
-     * 
-     * @param context
-     * @param producerInfo
-     */
-    public void fastProducer(ConnectionContext context, ProducerInfo producerInfo) {
-        if (advisdoryForFastProducers) {
-            broker.fastProducer(context, producerInfo);
-        }
-    }
-
-    /**
-     * Called when a Usage reaches a limit
-     * 
-     * @param context
-     * @param usage
-     */
-    public void isFull(ConnectionContext context, Usage usage) {
-        if (advisoryWhenFull) {
-            broker.isFull(context, this, usage);
-        }
-    }
-
-    public void dispose(ConnectionContext context) throws IOException {
-        if (this.store != null) {
-            this.store.removeAllMessages(context);
-            this.store.dispose(context);
-        }
-        this.destinationStatistics.setParent(null);
-        this.memoryUsage.stop();
-    }
-
-    /**
-     * Provides a hook to allow messages with no consumer to be processed in
-     * some way - such as to send to a dead letter queue or something..
-     */
-    protected void onMessageWithNoConsumers(ConnectionContext context, Message msg) throws Exception {
-        if (!msg.isPersistent()) {
-            if (isSendAdvisoryIfNoConsumers()) {
-                // allow messages with no consumers to be dispatched to a dead
-                // letter queue
-                if (destination.isQueue() || !AdvisorySupport.isAdvisoryTopic(destination)) {
-
-                    Message message = msg.copy();
-                    // The original destination and transaction id do not get
-                    // filled when the message is first sent,
-                    // it is only populated if the message is routed to another
-                    // destination like the DLQ
-                    if (message.getOriginalDestination() != null) {
-                        message.setOriginalDestination(message.getDestination());
-                    }
-                    if (message.getOriginalTransactionId() != null) {
-                        message.setOriginalTransactionId(message.getTransactionId());
-                    }
-
-                    ActiveMQTopic advisoryTopic;
-                    if (destination.isQueue()) {
-                        advisoryTopic = AdvisorySupport.getNoQueueConsumersAdvisoryTopic(destination);
-                    } else {
-                        advisoryTopic = AdvisorySupport.getNoTopicConsumersAdvisoryTopic(destination);
-                    }
-                    message.setDestination(advisoryTopic);
-                    message.setTransactionId(null);
-
-                    // Disable flow control for this since since we don't want
-                    // to block.
-                    boolean originalFlowControl = context.isProducerFlowControl();
-                    try {
-                        context.setProducerFlowControl(false);
-                        ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-                        producerExchange.setMutable(false);
-                        producerExchange.setConnectionContext(context);
-                        producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
-                        context.getBroker().send(producerExchange, message);
-                    } finally {
-                        context.setProducerFlowControl(originalFlowControl);
-                    }
-
-                }
-            }
-        }
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-    }
-
-    public final int getStoreUsageHighWaterMark() {
-        return this.storeUsageHighWaterMark;
-    }
-
-    public void setStoreUsageHighWaterMark(int storeUsageHighWaterMark) {
-        this.storeUsageHighWaterMark = storeUsageHighWaterMark;
-    }
-
-    protected final void waitForSpace(ConnectionContext context, Usage<?> usage, String warning) throws IOException, InterruptedException, ResourceAllocationException {
-        waitForSpace(context, usage, 100, warning);
-    }
-    
-    protected final void waitForSpace(ConnectionContext context, Usage<?> usage, int highWaterMark, String warning) throws IOException, InterruptedException, ResourceAllocationException {
-        if (systemUsage.isSendFailIfNoSpace()) {
-            getLog().debug("sendFailIfNoSpace, forcing exception on send: " + warning);
-            throw new ResourceAllocationException(warning);
-        }
-        if (systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) {
-            if (!usage.waitForSpace(systemUsage.getSendFailIfNoSpaceAfterTimeout(), highWaterMark)) {
-                getLog().debug("sendFailIfNoSpaceAfterTimeout expired, forcing exception on send: " + warning);
-                throw new ResourceAllocationException(warning);
-            }
-        } else {
-            long start = System.currentTimeMillis();
-            long nextWarn = start;
-            while (!usage.waitForSpace(1000, highWaterMark)) {
-                if (context.getStopping().get()) {
-                    throw new IOException("Connection closed, send aborted.");
-                }
-    
-                long now = System.currentTimeMillis();
-                if (now >= nextWarn) {
-                    getLog().info(warning + " (blocking for: " + (now - start) / 1000 + "s)");
-                    nextWarn = now + blockedProducerWarningInterval;
-                }
-            }
-        }
-    }
-
-    protected abstract Logger getLog();
-
-    public void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy) {
-        this.slowConsumerStrategy = slowConsumerStrategy;
-    }
-
-    public SlowConsumerStrategy getSlowConsumerStrategy() {
-        return this.slowConsumerStrategy;
-    }
-
-   
-    public boolean isPrioritizedMessages() {
-        return this.prioritizedMessages;
-    }
-
-    public void setPrioritizedMessages(boolean prioritizedMessages) {
-        this.prioritizedMessages = prioritizedMessages;
-        if (store != null) {
-            store.setPrioritizedMessages(prioritizedMessages);
-        }
-    }
-
-    /**
-     * @return the inactiveTimoutBeforeGC
-     */
-    public long getInactiveTimoutBeforeGC() {
-        return this.inactiveTimoutBeforeGC;
-    }
-
-    /**
-     * @param inactiveTimoutBeforeGC the inactiveTimoutBeforeGC to set
-     */
-    public void setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC) {
-        this.inactiveTimoutBeforeGC = inactiveTimoutBeforeGC;
-    }
-
-    /**
-     * @return the gcIfInactive
-     */
-    public boolean isGcIfInactive() {
-        return this.gcIfInactive;
-    }
-
-    /**
-     * @param gcIfInactive the gcIfInactive to set
-     */
-    public void setGcIfInactive(boolean gcIfInactive) {
-        this.gcIfInactive = gcIfInactive;
-    }
-    
-    public void markForGC(long timeStamp) {
-        if (isGcIfInactive() && this.lastActiveTime == 0 && isActive() == false
-                && destinationStatistics.messages.getCount() == 0 && getInactiveTimoutBeforeGC() > 0l) {
-            this.lastActiveTime = timeStamp;
-        }
-    }
-
-    public boolean canGC() {
-        boolean result = false;
-        if (isGcIfInactive()&& this.lastActiveTime != 0l) {
-            if ((System.currentTimeMillis() - this.lastActiveTime) >= getInactiveTimoutBeforeGC()) {
-                result = true;
-            }
-        }
-        return result;
-    }
-
-    public void setReduceMemoryFootprint(boolean reduceMemoryFootprint) {
-        this.reduceMemoryFootprint = reduceMemoryFootprint;
-    }
-
-    protected boolean isReduceMemoryFootprint() {
-        return this.reduceMemoryFootprint;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/CompositeDestinationInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/CompositeDestinationInterceptor.java
deleted file mode 100644
index c99605e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/CompositeDestinationInterceptor.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * Represents a Composite Pattern of a {@link DestinationInterceptor}
- * 
- * 
- */
-public class CompositeDestinationInterceptor implements DestinationInterceptor {
-
-    private final DestinationInterceptor[] interceptors;
-
-    public CompositeDestinationInterceptor(final DestinationInterceptor[] interceptors) {
-        this.interceptors = interceptors;
-    }
-
-    public Destination intercept(Destination destination) {
-        for (int i = 0; i < interceptors.length; i++) {
-            destination = interceptors[i].intercept(destination);
-        }
-        return destination;
-    }
-
-   
-    public void remove(Destination destination) {
-        for (int i = 0; i < interceptors.length; i++) {
-            interceptors[i].remove(destination);
-        } 
-    }
-
-    public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception {
-        for (int i = 0; i < interceptors.length; i++) {
-            interceptors[i].create(broker, context, destination);
-        }
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectionStatistics.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectionStatistics.java
deleted file mode 100644
index 38eddb9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectionStatistics.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.management.CountStatisticImpl;
-import org.apache.activemq.management.StatsImpl;
-
-/**
- * The J2EE Statistics for the Connection.
- * 
- * 
- */
-public class ConnectionStatistics extends StatsImpl {
-
-    private CountStatisticImpl enqueues;
-    private CountStatisticImpl dequeues;
-
-    public ConnectionStatistics() {
-
-        enqueues = new CountStatisticImpl("enqueues", "The number of messages that have been sent to the connection");
-        dequeues = new CountStatisticImpl("dequeues", "The number of messages that have been dispatched from the connection");
-
-        addStatistic("enqueues", enqueues);
-        addStatistic("dequeues", dequeues);
-    }
-
-    public CountStatisticImpl getEnqueues() {
-        return enqueues;
-    }
-
-    public CountStatisticImpl getDequeues() {
-        return dequeues;
-    }
-
-    public void reset() {
-        super.reset();
-        enqueues.reset();
-        dequeues.reset();
-    }
-
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        enqueues.setEnabled(enabled);
-        dequeues.setEnabled(enabled);
-    }
-
-    public void setParent(ConnectorStatistics parent) {
-        if (parent != null) {
-            enqueues.setParent(parent.getEnqueues());
-            dequeues.setParent(parent.getDequeues());
-        } else {
-            enqueues.setParent(null);
-            dequeues.setParent(null);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectorStatistics.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectorStatistics.java
deleted file mode 100644
index 11a1535..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectorStatistics.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.management.CountStatisticImpl;
-import org.apache.activemq.management.PollCountStatisticImpl;
-import org.apache.activemq.management.StatsImpl;
-
-/**
- * The J2EE Statistics for the a Destination.
- * 
- * 
- */
-public class ConnectorStatistics extends StatsImpl {
-
-    protected CountStatisticImpl enqueues;
-    protected CountStatisticImpl dequeues;
-    protected CountStatisticImpl consumers;
-    protected CountStatisticImpl messages;
-    protected PollCountStatisticImpl messagesCached;
-
-    public ConnectorStatistics() {
-
-        enqueues = new CountStatisticImpl("enqueues", "The number of messages that have been sent to the destination");
-        dequeues = new CountStatisticImpl("dequeues", "The number of messages that have been dispatched from the destination");
-        consumers = new CountStatisticImpl("consumers", "The number of consumers that that are subscribing to messages from the destination");
-        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
-        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
-
-        addStatistic("enqueues", enqueues);
-        addStatistic("dequeues", dequeues);
-        addStatistic("consumers", consumers);
-        addStatistic("messages", messages);
-        addStatistic("messagesCached", messagesCached);
-    }
-
-    public CountStatisticImpl getEnqueues() {
-        return enqueues;
-    }
-
-    public CountStatisticImpl getDequeues() {
-        return dequeues;
-    }
-
-    public CountStatisticImpl getConsumers() {
-        return consumers;
-    }
-
-    public PollCountStatisticImpl getMessagesCached() {
-        return messagesCached;
-    }
-
-    public CountStatisticImpl getMessages() {
-        return messages;
-    }
-
-    public void reset() {
-        super.reset();
-        enqueues.reset();
-        dequeues.reset();
-    }
-
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        enqueues.setEnabled(enabled);
-        dequeues.setEnabled(enabled);
-        consumers.setEnabled(enabled);
-        messages.setEnabled(enabled);
-        messagesCached.setEnabled(enabled);
-    }
-
-    public void setParent(ConnectorStatistics parent) {
-        if (parent != null) {
-            enqueues.setParent(parent.enqueues);
-            dequeues.setParent(parent.dequeues);
-            consumers.setParent(parent.consumers);
-            messagesCached.setParent(parent.messagesCached);
-            messages.setParent(parent.messages);
-        } else {
-            enqueues.setParent(null);
-            dequeues.setParent(null);
-            consumers.setParent(null);
-            messagesCached.setParent(null);
-            messages.setParent(null);
-        }
-    }
-
-    public void setMessagesCached(PollCountStatisticImpl messagesCached) {
-        this.messagesCached = messagesCached;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Destination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Destination.java
deleted file mode 100755
index 3dc4806..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Destination.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.List;
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.SharedDeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.SlowConsumerStrategy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.Usage;
-
-/**
- * 
- */
-public interface Destination extends Service, Task {
-
-    public static final DeadLetterStrategy DEFAULT_DEAD_LETTER_STRATEGY = new SharedDeadLetterStrategy();
-    public static final long DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL = 30000;
-
-    void addSubscription(ConnectionContext context, Subscription sub) throws Exception;
-
-    void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception;
-
-    void addProducer(ConnectionContext context, ProducerInfo info) throws Exception;
-
-    void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception;
-
-    void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception;
-
-    void acknowledge(ConnectionContext context, Subscription sub, final MessageAck ack, final MessageReference node) throws IOException;
-
-    void gc();
-
-    ActiveMQDestination getActiveMQDestination();
-
-    MemoryUsage getMemoryUsage();
-
-    void dispose(ConnectionContext context) throws IOException;
-
-    DestinationStatistics getDestinationStatistics();
-
-    DeadLetterStrategy getDeadLetterStrategy();
-
-    Message[] browse();
-
-    String getName();
-
-    MessageStore getMessageStore();
-
-    boolean isProducerFlowControl();
-
-    void setProducerFlowControl(boolean value);
-
-    /**
-     * Set's the interval at which warnings about producers being blocked by
-     * resource usage will be triggered. Values of 0 or less will disable
-     * warnings
-     * 
-     * @param blockedProducerWarningInterval the interval at which warning about
-     *            blocked producers will be triggered.
-     */
-    public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval);
-
-    /**
-     * 
-     * @return the interval at which warning about blocked producers will be
-     *         triggered.
-     */
-    public long getBlockedProducerWarningInterval();
-
-    int getMaxProducersToAudit();
-
-    void setMaxProducersToAudit(int maxProducersToAudit);
-
-    int getMaxAuditDepth();
-
-    void setMaxAuditDepth(int maxAuditDepth);
-
-    boolean isEnableAudit();
-
-    void setEnableAudit(boolean enableAudit);
-
-    boolean isActive();
-
-    int getMaxPageSize();
-
-    public void setMaxPageSize(int maxPageSize);
-
-    public int getMaxBrowsePageSize();
-
-    public void setMaxBrowsePageSize(int maxPageSize);
-
-    public boolean isUseCache();
-
-    public void setUseCache(boolean useCache);
-
-    public int getMinimumMessageSize();
-
-    public void setMinimumMessageSize(int minimumMessageSize);
-
-    public int getCursorMemoryHighWaterMark();
-
-    public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark);
-
-    /**
-     * optionally called by a Subscriber - to inform the Destination its ready
-     * for more messages
-     */
-    public void wakeup();
-
-    /**
-     * @return true if lazyDispatch is enabled
-     */
-    public boolean isLazyDispatch();
-
-    /**
-     * set the lazy dispatch - default is false
-     * 
-     * @param value
-     */
-    public void setLazyDispatch(boolean value);
-
-    /**
-     * Inform the Destination a message has expired
-     * 
-     * @param context
-     * @param subs
-     * @param node
-     */
-    void messageExpired(ConnectionContext context, Subscription subs, MessageReference node);
-
-    /**
-     * called when message is consumed
-     * 
-     * @param context
-     * @param messageReference
-     */
-    void messageConsumed(ConnectionContext context, MessageReference messageReference);
-
-    /**
-     * Called when message is delivered to the broker
-     * 
-     * @param context
-     * @param messageReference
-     */
-    void messageDelivered(ConnectionContext context, MessageReference messageReference);
-
-    /**
-     * Called when a message is discarded - e.g. running low on memory This will
-     * happen only if the policy is enabled - e.g. non durable topics
-     * 
-     * @param context
-     * @param messageReference
-     * @param sub 
-     */
-    void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference);
-
-    /**
-     * Called when there is a slow consumer
-     * 
-     * @param context
-     * @param subs
-     */
-    void slowConsumer(ConnectionContext context, Subscription subs);
-
-    /**
-     * Called to notify a producer is too fast
-     * 
-     * @param context
-     * @param producerInfo
-     */
-    void fastProducer(ConnectionContext context, ProducerInfo producerInfo);
-
-    /**
-     * Called when a Usage reaches a limit
-     * 
-     * @param context
-     * @param usage
-     */
-    void isFull(ConnectionContext context, Usage usage);
-
-    List<Subscription> getConsumers();
-
-    /**
-     * called on Queues in slave mode to allow dispatch to follow subscription
-     * choice of master
-     * 
-     * @param messageDispatchNotification
-     * @throws Exception
-     */
-    void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception;
-    
-    boolean isPrioritizedMessages();
-
-    SlowConsumerStrategy getSlowConsumerStrategy();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFactory.java
deleted file mode 100644
index e6fdf08..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.Set;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.SubscriptionInfo;
-
-/**
- * Used to create Destinations. One instance of DestinationFactory is used per BrokerService. 
- * 
- * @author fateev@amazon.com
- * 
- */
-public abstract class DestinationFactory {
-    
-    /**
-     * Create destination implementation.
-     */
-    public abstract Destination createDestination(ConnectionContext context, ActiveMQDestination destination, DestinationStatistics destinationStatistics) throws Exception;
-
-    public abstract void removeDestination(Destination dest);
-
-    /**
-     * Returns a set of all the {@link org.apache.activemq.command.ActiveMQDestination}
-     * objects that the persistence store is aware exist.
-     */
-    public abstract Set<ActiveMQDestination> getDestinations();
-
-    /**
-     * Lists all the durable subscirptions for a given destination.
-     */
-    public abstract SubscriptionInfo[] getAllDurableSubscriptions(ActiveMQTopic topic) throws IOException;
-
-    
-    public abstract long getLastMessageBrokerSequenceId() throws IOException;
-
-    public abstract void setRegionBroker(RegionBroker regionBroker);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFactoryImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFactoryImpl.java
deleted file mode 100644
index c8af517..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFactoryImpl.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.Set;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.thread.TaskRunnerFactory;
-
-/**
- * Creates standard ActiveMQ implementations of
- * {@link org.apache.activemq.broker.region.Destination}.
- * 
- * @author fateev@amazon.com
- * 
- */
-public class DestinationFactoryImpl extends DestinationFactory {
-
-    protected final TaskRunnerFactory taskRunnerFactory;
-    protected final PersistenceAdapter persistenceAdapter;
-    protected RegionBroker broker;
-    private final BrokerService brokerService;
-
-    public DestinationFactoryImpl(BrokerService brokerService, TaskRunnerFactory taskRunnerFactory, PersistenceAdapter persistenceAdapter) {
-        this.brokerService = brokerService;
-        this.taskRunnerFactory = taskRunnerFactory;
-        if (persistenceAdapter == null) {
-            throw new IllegalArgumentException("null persistenceAdapter");
-        }
-        this.persistenceAdapter = persistenceAdapter;
-    }
-
-    @Override
-    public void setRegionBroker(RegionBroker broker) {
-        if (broker == null) {
-            throw new IllegalArgumentException("null broker");
-        }
-        this.broker = broker;
-    }
-
-    @Override
-    public Set<ActiveMQDestination> getDestinations() {
-        return persistenceAdapter.getDestinations();
-    }
-
-    /**
-     * @return instance of {@link Queue} or {@link Topic}
-     */
-    @Override
-    public Destination createDestination(ConnectionContext context, ActiveMQDestination destination, DestinationStatistics destinationStatistics) throws Exception {
-        if (destination.isQueue()) {
-            if (destination.isTemporary()) {
-                final ActiveMQTempDestination tempDest = (ActiveMQTempDestination)destination;
-                Queue queue = new TempQueue(brokerService, destination, null, destinationStatistics, taskRunnerFactory);
-                queue.initialize();
-                return queue;
-            } else {
-                MessageStore store = persistenceAdapter.createQueueMessageStore((ActiveMQQueue)destination);
-                Queue queue = new Queue(brokerService, destination, store, destinationStatistics, taskRunnerFactory);
-                configureQueue(queue, destination);
-                queue.initialize();
-                return queue;
-            }
-        } else if (destination.isTemporary()) {
-            
-            Topic topic = new Topic(brokerService, destination, null, destinationStatistics, taskRunnerFactory);
-            topic.initialize();
-            return topic;
-        } else {
-            TopicMessageStore store = null;
-            if (!AdvisorySupport.isAdvisoryTopic(destination)) {
-                store = persistenceAdapter.createTopicMessageStore((ActiveMQTopic)destination);
-            }
-            Topic topic = new Topic(brokerService, destination, store, destinationStatistics, taskRunnerFactory);
-            configureTopic(topic, destination);
-            topic.initialize();
-            return topic;
-        }
-    }
-
-    @Override
-    public void removeDestination(Destination dest) {
-        ActiveMQDestination destination = dest.getActiveMQDestination();
-        if (!destination.isTemporary()) {
-            if (destination.isQueue()) {
-                persistenceAdapter.removeQueueMessageStore((ActiveMQQueue) destination);
-            }
-            else if (!AdvisorySupport.isAdvisoryTopic(destination)) {
-                persistenceAdapter.removeTopicMessageStore((ActiveMQTopic) destination);
-            }
-        }
-    }
-
-    protected void configureQueue(Queue queue, ActiveMQDestination destination) {
-        if (broker == null) {
-            throw new IllegalStateException("broker property is not set");
-        }
-        if (broker.getDestinationPolicy() != null) {
-            PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-            if (entry != null) {
-                entry.configure(broker,queue);
-            }
-        }
-    }
-
-    protected void configureTopic(Topic topic, ActiveMQDestination destination) {
-        if (broker == null) {
-            throw new IllegalStateException("broker property is not set");
-        }
-        if (broker.getDestinationPolicy() != null) {
-            PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-            if (entry != null) {
-                entry.configure(broker,topic);
-            }
-        }
-    }
-
-    @Override
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return persistenceAdapter.getLastMessageBrokerSequenceId();
-    }
-
-    public PersistenceAdapter getPersistenceAdapter() {
-        return persistenceAdapter;
-    }
-
-    @Override
-    public SubscriptionInfo[] getAllDurableSubscriptions(ActiveMQTopic topic) throws IOException {
-        return persistenceAdapter.createTopicMessageStore(topic).getAllSubscriptions();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
deleted file mode 100644
index 36c2d8d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Set;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.SlowConsumerStrategy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.Usage;
-
-/**
- * 
- * 
- */
-public class DestinationFilter implements Destination {
-
-    private final Destination next;
-
-    public DestinationFilter(Destination next) {
-        this.next = next;
-    }
-
-    public void acknowledge(ConnectionContext context, Subscription sub, MessageAck ack, MessageReference node) throws IOException {
-        next.acknowledge(context, sub, ack, node);
-    }
-
-    public void addSubscription(ConnectionContext context, Subscription sub) throws Exception {
-        next.addSubscription(context, sub);
-    }
-
-    public Message[] browse() {
-        return next.browse();
-    }
-
-    public void dispose(ConnectionContext context) throws IOException {
-        next.dispose(context);
-    }
-
-    public void gc() {
-        next.gc();
-    }
-
-    public ActiveMQDestination getActiveMQDestination() {
-        return next.getActiveMQDestination();
-    }
-
-    public DeadLetterStrategy getDeadLetterStrategy() {
-        return next.getDeadLetterStrategy();
-    }
-
-    public DestinationStatistics getDestinationStatistics() {
-        return next.getDestinationStatistics();
-    }
-
-    public String getName() {
-        return next.getName();
-    }
-
-    public MemoryUsage getMemoryUsage() {
-        return next.getMemoryUsage();
-    }
-
-    public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception {
-        next.removeSubscription(context, sub, lastDeliveredSequenceId);
-    }
-
-    public void send(ProducerBrokerExchange context, Message messageSend) throws Exception {
-        next.send(context, messageSend);
-    }
-
-    public void start() throws Exception {
-        next.start();
-    }
-
-    public void stop() throws Exception {
-        next.stop();
-    }
-
-    public List<Subscription> getConsumers() {
-        return next.getConsumers();
-    }
-
-    /**
-     * Sends a message to the given destination which may be a wildcard
-     * 
-     * @param context broker context
-     * @param message message to send
-     * @param destination possibly wildcard destination to send the message to
-     * @throws Exception on error
-     */
-    protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception {
-        Broker broker = context.getConnectionContext().getBroker();
-        Set<Destination> destinations = broker.getDestinations(destination);
-
-        for (Destination dest : destinations) {
-            dest.send(context, message.copy());
-        }
-    }
-
-    public MessageStore getMessageStore() {
-        return next.getMessageStore();
-    }
-
-    public boolean isProducerFlowControl() {
-        return next.isProducerFlowControl();
-    }
-
-    public void setProducerFlowControl(boolean value) {
-        next.setProducerFlowControl(value);
-    }
-
-    public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval) {
-        next.setBlockedProducerWarningInterval(blockedProducerWarningInterval);
-    }
-    
-    public long getBlockedProducerWarningInterval() {
-        return next.getBlockedProducerWarningInterval();
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        next.addProducer(context, info);
-
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        next.removeProducer(context, info);
-    }
-
-    public int getMaxAuditDepth() {
-        return next.getMaxAuditDepth();
-    }
-
-    public int getMaxProducersToAudit() {
-        return next.getMaxProducersToAudit();
-    }
-
-    public boolean isEnableAudit() {
-        return next.isEnableAudit();
-    }
-
-    public void setEnableAudit(boolean enableAudit) {
-        next.setEnableAudit(enableAudit);
-    }
-
-    public void setMaxAuditDepth(int maxAuditDepth) {
-        next.setMaxAuditDepth(maxAuditDepth);
-    }
-
-    public void setMaxProducersToAudit(int maxProducersToAudit) {
-        next.setMaxProducersToAudit(maxProducersToAudit);
-    }
-
-    public boolean isActive() {
-        return next.isActive();
-    }
-
-    public int getMaxPageSize() {
-        return next.getMaxPageSize();
-    }
-
-    public void setMaxPageSize(int maxPageSize) {
-        next.setMaxPageSize(maxPageSize);
-    }
-
-    public boolean isUseCache() {
-        return next.isUseCache();
-    }
-
-    public void setUseCache(boolean useCache) {
-        next.setUseCache(useCache);
-    }
-
-    public int getMinimumMessageSize() {
-        return next.getMinimumMessageSize();
-    }
-
-    public void setMinimumMessageSize(int minimumMessageSize) {
-        next.setMinimumMessageSize(minimumMessageSize);
-    }
-
-    public void wakeup() {
-        next.wakeup();
-    }
-
-    public boolean isLazyDispatch() {
-        return next.isLazyDispatch();
-    }
-
-    public void setLazyDispatch(boolean value) {
-        next.setLazyDispatch(value);
-    }
-
-    public void messageExpired(ConnectionContext context, PrefetchSubscription prefetchSubscription, MessageReference node) {
-        next.messageExpired(context, prefetchSubscription, node);
-    }
-
-    public boolean iterate() {
-        return next.iterate();
-    }
-
-    public void fastProducer(ConnectionContext context, ProducerInfo producerInfo) {
-        next.fastProducer(context, producerInfo);
-    }
-
-    public void isFull(ConnectionContext context, Usage usage) {
-        next.isFull(context, usage);
-    }
-
-    public void messageConsumed(ConnectionContext context, MessageReference messageReference) {
-        next.messageConsumed(context, messageReference);
-    }
-
-    public void messageDelivered(ConnectionContext context, MessageReference messageReference) {
-        next.messageDelivered(context, messageReference);
-    }
-
-    public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference) {
-        next.messageDiscarded(context, sub, messageReference);
-    }
-
-    public void slowConsumer(ConnectionContext context, Subscription subs) {
-        next.slowConsumer(context, subs);
-    }
-
-    public void messageExpired(ConnectionContext context, Subscription subs, MessageReference node) {
-        next.messageExpired(context, subs, node);
-    }
-
-    public int getMaxBrowsePageSize() {
-        return next.getMaxBrowsePageSize();
-    }
-
-    public void setMaxBrowsePageSize(int maxPageSize) {
-        next.setMaxBrowsePageSize(maxPageSize);
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        next.processDispatchNotification(messageDispatchNotification);
-    }
-
-    public int getCursorMemoryHighWaterMark() {
-        return next.getCursorMemoryHighWaterMark();
-    }
-
-    public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) {
-        next.setCursorMemoryHighWaterMark(cursorMemoryHighWaterMark);
-    }
-
-    public boolean isPrioritizedMessages() {
-        return next.isPrioritizedMessages();
-    }
-
-    public SlowConsumerStrategy getSlowConsumerStrategy() {
-        return next.getSlowConsumerStrategy();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationInterceptor.java
deleted file mode 100644
index 8687589..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationInterceptor.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.broker.region;
-
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * Represents an interceptor on destination instances.
- * 
- * 
- */
-public interface DestinationInterceptor {
-
-    Destination intercept(Destination destination);
-    
-    void remove(Destination destination);
-
-    void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationStatistics.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationStatistics.java
deleted file mode 100755
index d2a8c4a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationStatistics.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.management.CountStatisticImpl;
-import org.apache.activemq.management.PollCountStatisticImpl;
-import org.apache.activemq.management.StatsImpl;
-import org.apache.activemq.management.TimeStatisticImpl;
-
-/**
- * The J2EE Statistics for the a Destination.
- * 
- * 
- */
-public class DestinationStatistics extends StatsImpl {
-
-    protected CountStatisticImpl enqueues;
-    protected CountStatisticImpl dequeues;
-    protected CountStatisticImpl consumers;
-    protected CountStatisticImpl producers;
-    protected CountStatisticImpl messages;
-    protected PollCountStatisticImpl messagesCached;
-    protected CountStatisticImpl dispatched;
-    protected CountStatisticImpl inflight;
-    protected CountStatisticImpl expired;
-    protected TimeStatisticImpl processTime;
-
-    public DestinationStatistics() {
-
-        enqueues = new CountStatisticImpl("enqueues", "The number of messages that have been sent to the destination");
-        dispatched = new CountStatisticImpl("dispatched", "The number of messages that have been dispatched from the destination");
-        dequeues = new CountStatisticImpl("dequeues", "The number of messages that have been acknowledged from the destination");
-        inflight = new CountStatisticImpl("inflight", "The number of messages dispatched but awaiting acknowledgement");
-        expired = new CountStatisticImpl("expired", "The number of messages that have expired");
-        
-        consumers = new CountStatisticImpl("consumers", "The number of consumers that that are subscribing to messages from the destination");
-        consumers.setDoReset(false);
-        producers = new CountStatisticImpl("producers", "The number of producers that that are publishing messages to the destination");
-        producers.setDoReset(false);
-        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
-        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
-        processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination");
-        addStatistic("enqueues", enqueues);
-        addStatistic("dispatched", dispatched);
-        addStatistic("dequeues", dequeues);
-        addStatistic("inflight", inflight);
-        addStatistic("expired", expired);  
-        addStatistic("consumers", consumers);
-        addStatistic("producers", producers);
-        addStatistic("messages", messages);
-        addStatistic("messagesCached", messagesCached);
-        addStatistic("processTime", processTime);
-    }
-
-    public CountStatisticImpl getEnqueues() {
-        return enqueues;
-    }
-
-    public CountStatisticImpl getDequeues() {
-        return dequeues;
-    }
-    
-    public CountStatisticImpl getInflight() {
-        return inflight;
-    }
-
-    public CountStatisticImpl getExpired() {
-        return expired;
-    }
-
-    public CountStatisticImpl getConsumers() {
-        return consumers;
-    }
-    
-    public CountStatisticImpl getProducers() {
-        return producers;
-    }
-
-    public PollCountStatisticImpl getMessagesCached() {
-        return messagesCached;
-    }
-
-    public CountStatisticImpl getMessages() {
-        return messages;
-    }
-
-    public void setMessagesCached(PollCountStatisticImpl messagesCached) {
-        this.messagesCached = messagesCached;
-    }
-
-    public CountStatisticImpl getDispatched() {
-        return dispatched;
-    }
-
-    public TimeStatisticImpl getProcessTime() {
-        return this.processTime;
-    }
-
-    public void reset() {
-        if (this.isDoReset()) {
-            super.reset();
-            enqueues.reset();
-            dequeues.reset();
-            dispatched.reset();
-            inflight.reset();
-            expired.reset();
-        }
-    }
-
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        enqueues.setEnabled(enabled);
-        dispatched.setEnabled(enabled);
-        dequeues.setEnabled(enabled);
-        inflight.setEnabled(enabled);
-        expired.setEnabled(true);
-        consumers.setEnabled(enabled);
-        producers.setEnabled(enabled);
-        messages.setEnabled(enabled);
-        messagesCached.setEnabled(enabled);
-        processTime.setEnabled(enabled);
-
-    }
-
-    public void setParent(DestinationStatistics parent) {
-        if (parent != null) {
-            enqueues.setParent(parent.enqueues);
-            dispatched.setParent(parent.dispatched);
-            dequeues.setParent(parent.dequeues);
-            inflight.setParent(parent.inflight);
-            expired.setParent(parent.expired);
-            consumers.setParent(parent.consumers);
-            producers.setParent(parent.producers);
-            messagesCached.setParent(parent.messagesCached);
-            messages.setParent(parent.messages);
-            processTime.setParent(parent.processTime);
-        } else {
-            enqueues.setParent(null);
-            dispatched.setParent(null);
-            dequeues.setParent(null);
-            inflight.setParent(null);
-            expired.setParent(null);
-            consumers.setParent(null);
-            producers.setParent(null);
-            messagesCached.setParent(null);
-            messages.setParent(null);
-            processTime.setParent(null);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java
deleted file mode 100755
index 59ee277..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.usage.Usage;
-import org.apache.activemq.usage.UsageListener;
-import org.apache.activemq.util.SubscriptionKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DurableTopicSubscription extends PrefetchSubscription implements UsageListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DurableTopicSubscription.class);
-    private final ConcurrentHashMap<MessageId, Integer> redeliveredMessages = new ConcurrentHashMap<MessageId, Integer>();
-    private final ConcurrentHashMap<ActiveMQDestination, Destination> destinations = new ConcurrentHashMap<ActiveMQDestination, Destination>();
-    private final SubscriptionKey subscriptionKey;
-    private final boolean keepDurableSubsActive;
-    private AtomicBoolean active = new AtomicBoolean();
-
-    public DurableTopicSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info, boolean keepDurableSubsActive)
-        throws JMSException {
-        super(broker,usageManager, context, info);
-        this.pending = new StoreDurableSubscriberCursor(broker,context.getClientId(), info.getSubscriptionName(), info.getPrefetchSize(), this);
-        this.pending.setSystemUsage(usageManager);
-        this.pending.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
-        this.keepDurableSubsActive = keepDurableSubsActive;
-        subscriptionKey = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
-        
-    }
-
-    public final boolean isActive() {
-        return active.get();
-    }
-
-    public boolean isFull() {
-        return !active.get() || super.isFull();
-    }
-
-    public void gc() {
-    }
-
-    /**
-     * store will have a pending ack for all durables, irrespective of the selector
-     * so we need to ack if node is un-matched
-     */
-    public void unmatched(MessageReference node) throws IOException {
-        MessageAck ack = new MessageAck();
-        ack.setAckType(MessageAck.UNMATCHED_ACK_TYPE);
-        ack.setMessageID(node.getMessageId());
-        node.getRegionDestination().acknowledge(this.getContext(), this, ack, node);
-    }
-
-    @Override
-    protected void setPendingBatchSize(PendingMessageCursor pending, int numberToDispatch) {
-        // statically configured via maxPageSize
-    }
-
-    public void add(ConnectionContext context, Destination destination) throws Exception {
-        super.add(context, destination);
-        // do it just once per destination
-        if (destinations.containsKey(destination.getActiveMQDestination())) {
-            return;
-        }
-        destinations.put(destination.getActiveMQDestination(), destination);
-
-        if (active.get() || keepDurableSubsActive) {
-            Topic topic = (Topic)destination;
-            topic.activate(context, this);
-            if (pending.isEmpty(topic)) {
-                topic.recoverRetroactiveMessages(context, this);
-            }
-            this.enqueueCounter+=pending.size();
-        } else if (destination.getMessageStore() != null) {
-            TopicMessageStore store = (TopicMessageStore)destination.getMessageStore();
-            try {
-                this.enqueueCounter+=store.getMessageCount(subscriptionKey.getClientId(),subscriptionKey.getSubscriptionName());
-            } catch (IOException e) {
-                JMSException jmsEx = new JMSException("Failed to retrieve eunqueueCount from store "+ e);
-                jmsEx.setLinkedException(e);
-                throw jmsEx;
-            }
-        }
-        dispatchPending();
-    }
-
-    public void activate(SystemUsage memoryManager, ConnectionContext context,
-            ConsumerInfo info) throws Exception {
-        if (!active.get()) {
-            this.context = context;
-            this.info = info;
-            LOG.debug("Activating " + this);
-            if (!keepDurableSubsActive) {
-                for (Iterator<Destination> iter = destinations.values()
-                        .iterator(); iter.hasNext();) {
-                    Topic topic = (Topic) iter.next();
-                    add(context, topic);
-                    topic.activate(context, this);
-                }
-            }
-            synchronized (pendingLock) {
-                pending.setSystemUsage(memoryManager);
-                pending.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
-                pending.setMaxAuditDepth(getMaxAuditDepth());
-                pending.setMaxProducersToAudit(getMaxProducersToAudit());
-                pending.start();
-                // If nothing was in the persistent store, then try to use the
-                // recovery policy.
-                if (pending.isEmpty()) {
-                    for (Iterator<Destination> iter = destinations.values()
-                            .iterator(); iter.hasNext();) {
-                        Topic topic = (Topic) iter.next();
-                        topic.recoverRetroactiveMessages(context, this);
-                    }
-                }
-            }
-            this.active.set(true);
-            dispatchPending();
-            this.usageManager.getMemoryUsage().addUsageListener(this);
-        }
-    }
-
-    public void deactivate(boolean keepDurableSubsActive) throws Exception {
-        LOG.debug("Deactivating " + this);
-        active.set(false);
-        this.usageManager.getMemoryUsage().removeUsageListener(this);
-        synchronized (pending) {
-            pending.stop();
-        }
-        if (!keepDurableSubsActive) {
-            for (Iterator<Destination> iter = destinations.values().iterator(); iter.hasNext();) {
-                Topic topic = (Topic)iter.next();
-                topic.deactivate(context, this);
-            }
-        }
-        
-        for (final MessageReference node : dispatched) {
-            // Mark the dispatched messages as redelivered for next time.
-            Integer count = redeliveredMessages.get(node.getMessageId());
-            if (count != null) {
-                redeliveredMessages.put(node.getMessageId(), Integer.valueOf(count.intValue() + 1));
-            } else {
-                redeliveredMessages.put(node.getMessageId(), Integer.valueOf(1));
-            }
-            if (keepDurableSubsActive&& pending.isTransient()) {
-                synchronized (pending) {
-                    pending.addMessageFirst(node);
-                }
-            } else {
-                node.decrementReferenceCount();
-            }
-        }
-        synchronized(dispatched) {
-            dispatched.clear();
-        }
-        if (!keepDurableSubsActive && pending.isTransient()) {
-            synchronized (pending) {
-                try {
-                    pending.reset();
-                    while (pending.hasNext()) {
-                        MessageReference node = pending.next();
-                        node.decrementReferenceCount();
-                        pending.remove();
-                    }
-                } finally {
-                    pending.release();
-                }
-            }
-        }
-        prefetchExtension = 0;
-    }
-
-    
-    protected MessageDispatch createMessageDispatch(MessageReference node, Message message) {
-        MessageDispatch md = super.createMessageDispatch(node, message);
-        Integer count = redeliveredMessages.get(node.getMessageId());
-        if (count != null) {
-            md.setRedeliveryCounter(count.intValue());
-        }
-        return md;
-    }
-
-    public void add(MessageReference node) throws Exception {
-        if (!active.get() && !keepDurableSubsActive) {
-            return;
-        }
-        super.add(node);
-    }
-
-    protected void dispatchPending() throws IOException {
-        if (isActive()) {
-            super.dispatchPending();
-        }
-    }
-    
-    protected void doAddRecoveredMessage(MessageReference message) throws Exception {
-        synchronized(pending) {
-            pending.addRecoveredMessage(message);
-        }
-    }
-
-    public int getPendingQueueSize() {
-        if (active.get() || keepDurableSubsActive) {
-            return super.getPendingQueueSize();
-        }
-        // TODO: need to get from store
-        return 0;
-    }
-
-    public void setSelector(String selector) throws InvalidSelectorException {
-        throw new UnsupportedOperationException("You cannot dynamically change the selector for durable topic subscriptions");
-    }
-
-    protected boolean canDispatch(MessageReference node) {
-        return isActive();
-    }
-
-    protected void acknowledge(ConnectionContext context, MessageAck ack, MessageReference node) throws IOException {
-        node.getRegionDestination().acknowledge(context, this, ack, node);
-        redeliveredMessages.remove(node.getMessageId());
-        node.decrementReferenceCount();
-    }
-
-    
-    public synchronized String toString() {
-        return "DurableTopicSubscription-" + getSubscriptionKey() + ", id=" + info.getConsumerId() + ", destinations=" + destinations.size() + ", total=" + enqueueCounter + ", pending="
-               + getPendingQueueSize() + ", dispatched=" + dispatchCounter + ", inflight=" + dispatched.size() + ", prefetchExtension=" + this.prefetchExtension;
-    }
-
-    public SubscriptionKey getSubscriptionKey() {
-        return subscriptionKey;
-    }
-
-    /**
-     * Release any references that we are holding.
-     */
-    public void destroy() {
-        synchronized (pending) {
-            try {
-
-                pending.reset();
-                while (pending.hasNext()) {
-                    MessageReference node = pending.next();
-                    node.decrementReferenceCount();
-                }
-
-            } finally {
-                pending.release();
-                pending.clear();
-            }
-        }
-        synchronized(dispatched) {
-            for (Iterator iter = dispatched.iterator(); iter.hasNext();) {
-                MessageReference node = (MessageReference) iter.next();
-                node.decrementReferenceCount();
-            }
-            dispatched.clear();
-        }
-        setSlowConsumer(false);
-    }
-
-    public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
-        if (oldPercentUsage > newPercentUsage && oldPercentUsage >= 90) {
-            try {
-                dispatchPending();
-            } catch (IOException e) {
-                LOG.warn("problem calling dispatchMatched", e);
-            }
-        }
-    }
-    
-    protected boolean isDropped(MessageReference node) {
-       return false;
-    }
-
-    public boolean isKeepDurableSubsActive() {
-        return keepDurableSubsActive;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
deleted file mode 100644
index 131974c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-
-/**
- * Keeps track of a message that is flowing through the Broker. This object may
- * hold a hard reference to the message or only hold the id of the message if
- * the message has been persisted on in a MessageStore.
- * 
- * 
- */
-public class IndirectMessageReference implements QueueMessageReference {
-
-    /** The subscription that has locked the message */
-    private LockOwner lockOwner;
-    /** Has the message been dropped? */
-    private boolean dropped;
-    /** Has the message been acked? */
-    private boolean acked;
-    /** Direct reference to the message */
-    private final Message message;
-    
-    /**
-     * @param message
-     */
-    public IndirectMessageReference(final Message message) {
-        this.message = message;
-        message.getMessageId();
-        message.getGroupID();
-        message.getGroupSequence();
-    }
-
-    public Message getMessageHardRef() {
-        return message;
-    }
-
-    public int getReferenceCount() {
-        return message.getReferenceCount();
-    }
-
-    public int incrementReferenceCount() {
-        return message.incrementReferenceCount();
-    }
-
-    public int decrementReferenceCount() {
-        return message.decrementReferenceCount();
-    }
-
-    public Message getMessage() {
-        return message;
-    }
-
-    public String toString() {
-        return "Message " + message.getMessageId() + " dropped=" + dropped + " acked=" + acked + " locked=" + (lockOwner != null);
-    }
-
-    public void incrementRedeliveryCounter() {
-        message.incrementRedeliveryCounter();
-    }
-
-    public synchronized boolean isDropped() {
-        return dropped;
-    }
-
-    public synchronized void drop() {
-        dropped = true;
-        lockOwner = null;
-        message.decrementReferenceCount();
-    }
-
-    public boolean lock(LockOwner subscription) {
-        synchronized (this) {
-            if (dropped || lockOwner != null) {
-                return false;
-            }
-            lockOwner = subscription;
-            return true;
-        }
-    }
-
-    public synchronized boolean unlock() {
-        boolean result = lockOwner != null;
-        lockOwner = null;
-        return result;
-    }
-
-    public synchronized LockOwner getLockOwner() {
-        return lockOwner;
-    }
-
-    public int getRedeliveryCounter() {
-        return message.getRedeliveryCounter();
-    }
-
-    public MessageId getMessageId() {
-        return message.getMessageId();
-    }
-
-    public Destination getRegionDestination() {
-        return message.getRegionDestination();
-    }
-
-    public boolean isPersistent() {
-        return message.isPersistent();
-    }
-
-    public synchronized boolean isLocked() {
-        return lockOwner != null;
-    }
-
-    public synchronized boolean isAcked() {
-        return acked;
-    }
-
-    public synchronized void setAcked(boolean b) {
-        acked = b;
-    }
-
-    public String getGroupID() {
-        return message.getGroupID();
-    }
-
-    public int getGroupSequence() {
-        return message.getGroupSequence();
-    }
-
-    public ConsumerId getTargetConsumerId() {
-        return message.getTargetConsumerId();
-    }
-
-    public long getExpiration() {
-        return message.getExpiration();
-    }
-
-    public boolean isExpired() {
-        return message.isExpired();
-    }
-
-    public synchronized int getSize() {
-       return message.getSize();
-    }
-
-    public boolean isAdvisory() {
-       return message.isAdvisory();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/LockOwner.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/LockOwner.java
deleted file mode 100644
index 86982a0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/LockOwner.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.broker.region;
-
-public interface LockOwner {
-
-    LockOwner HIGH_PRIORITY_LOCK_OWNER = new LockOwner() {
-        public int getLockPriority() {
-            return Integer.MAX_VALUE;
-        }
-        public boolean isLockExclusive() {
-            return false;
-        }
-    };
-
-    int getLockPriority();
-    boolean isLockExclusive();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReference.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReference.java
deleted file mode 100755
index 76dfbe6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReference.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-
-/**
- * Keeps track of a message that is flowing through the Broker.  This 
- * object may hold a hard reference to the message or only hold the
- * id of the message if the message has been persisted on in a MessageStore.
- * 
- * 
- */
-public interface MessageReference {
-    
-    MessageId getMessageId();
-    Message getMessageHardRef();
-    Message getMessage();
-    boolean isPersistent();
-    
-    Destination getRegionDestination();
-    
-    int getRedeliveryCounter();
-    void incrementRedeliveryCounter();
-    
-    int getReferenceCount();
-    
-    int incrementReferenceCount();
-    int decrementReferenceCount();
-    ConsumerId getTargetConsumerId();
-    int getSize();
-    long getExpiration();
-    String getGroupID();
-    int getGroupSequence();
-    
-    /**
-     * Returns true if this message is expired
-     */
-    boolean isExpired();
-
-    /**
-     * Returns true if this message is dropped.
-     */
-    boolean isDropped();
-    
-    /**
-     * @return true if the message is an advisory
-     */
-    boolean isAdvisory();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReferenceFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReferenceFilter.java
deleted file mode 100644
index e64a503..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReferenceFilter.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.broker.region;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.ConnectionContext;
-
-/**
- * Represents a filter on message references
- * 
- * 
- */
-public interface MessageReferenceFilter {
-
-    boolean evaluate(ConnectionContext context, MessageReference messageReference) throws JMSException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/NullMessageReference.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/NullMessageReference.java
deleted file mode 100644
index f754ed8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/NullMessageReference.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-
-/**
- * Only used by the {@link QueueMessageReference#NULL_MESSAGE}
- */
-final class NullMessageReference implements QueueMessageReference {
-
-    private final ActiveMQMessage message = new ActiveMQMessage();
-    private volatile int references;
-
-    public void drop() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public LockOwner getLockOwner() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public boolean isAcked() {
-        return false;
-    }
-
-    public boolean isDropped() {
-        return false;
-    }
-
-    public boolean lock(LockOwner subscription) {
-        return true;
-    }
-
-    public void setAcked(boolean b) {
-        throw new RuntimeException("not implemented");
-    }
-
-    public boolean unlock() {
-        return true;
-    }
-
-    public int decrementReferenceCount() {
-        return --references;
-    }
-
-    public long getExpiration() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public String getGroupID() {
-        return null;
-    }
-
-    public int getGroupSequence() {
-        return 0;
-    }
-
-    public Message getMessage()  {
-        return message;
-    }
-
-    public Message getMessageHardRef() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public MessageId getMessageId() {
-        return message.getMessageId();
-    }
-
-    public int getRedeliveryCounter() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public int getReferenceCount() {
-        return references;
-    }
-
-    public Destination getRegionDestination() {
-        return null;
-    }
-
-    public int getSize() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public ConsumerId getTargetConsumerId() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public void incrementRedeliveryCounter() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public int incrementReferenceCount() {
-        return ++references;
-    }
-
-    public boolean isExpired() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public boolean isPersistent() {
-        throw new RuntimeException("not implemented");
-    }
-
-    public boolean isAdvisory() {
-        return false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
deleted file mode 100755
index 69a1567..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
+++ /dev/null
@@ -1,765 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A subscription that honors the pre-fetch option of the ConsumerInfo.
- * 
- * 
- */
-public abstract class PrefetchSubscription extends AbstractSubscription {
-
-    private static final Logger LOG = LoggerFactory.getLogger(PrefetchSubscription.class);
-    protected final Scheduler scheduler;
-    
-    protected PendingMessageCursor pending;
-    protected final List<MessageReference> dispatched = new CopyOnWriteArrayList<MessageReference>();
-    protected int prefetchExtension;
-    protected boolean usePrefetchExtension = true;
-    protected long enqueueCounter;
-    protected long dispatchCounter;
-    protected long dequeueCounter;
-    private int maxProducersToAudit=32;
-    private int maxAuditDepth=2048;
-    protected final SystemUsage usageManager;
-    protected final Object pendingLock = new Object();
-    private final Object dispatchLock = new Object();
-    private final CountDownLatch okForAckAsDispatchDone = new CountDownLatch(1);
-    
-    public PrefetchSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info, PendingMessageCursor cursor) throws InvalidSelectorException {
-        super(broker,context, info);
-        this.usageManager=usageManager;
-        pending = cursor;
-        this.scheduler = broker.getScheduler();
-    }
-
-    public PrefetchSubscription(Broker broker,SystemUsage usageManager, ConnectionContext context, ConsumerInfo info) throws InvalidSelectorException {
-        this(broker,usageManager,context, info, new VMPendingMessageCursor(false));
-    }
-
-    /**
-     * Allows a message to be pulled on demand by a client
-     */
-    public Response pullMessage(ConnectionContext context, MessagePull pull) throws Exception {
-        // The slave should not deliver pull messages. TODO: when the slave
-        // becomes a master,
-        // He should send a NULL message to all the consumers to 'wake them up'
-        // in case
-        // they were waiting for a message.
-        if (getPrefetchSize() == 0 && !isSlave()) {
-            final long dispatchCounterBeforePull;
-        	synchronized(this) {
-        		prefetchExtension++;
-        		dispatchCounterBeforePull = dispatchCounter;
-        	}
-            
-        	// Have the destination push us some messages.
-        	for (Destination dest : destinations) {
-				dest.iterate();
-			}
-        	dispatchPending();
-            
-            synchronized(this) {
-	            // If there was nothing dispatched.. we may need to setup a timeout.
-	            if (dispatchCounterBeforePull == dispatchCounter) {
-	                // immediate timeout used by receiveNoWait()
-	                if (pull.getTimeout() == -1) {
-	                    // Send a NULL message.
-	                    add(QueueMessageReference.NULL_MESSAGE);
-	                    dispatchPending();
-	                }
-	                if (pull.getTimeout() > 0) {
-	                    scheduler.executeAfterDelay(new Runnable() {
-	
-	                        public void run() {
-	                            pullTimeout(dispatchCounterBeforePull);
-	                        }
-	                    }, pull.getTimeout());
-	                }
-	            }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Occurs when a pull times out. If nothing has been dispatched since the
-     * timeout was setup, then send the NULL message.
-     */
-    final void pullTimeout(long dispatchCounterBeforePull) {
-    	synchronized (pendingLock) {
-    		if (dispatchCounterBeforePull == dispatchCounter) {
-                try {
-                    add(QueueMessageReference.NULL_MESSAGE);
-                    dispatchPending();
-                } catch (Exception e) {
-                    context.getConnection().serviceException(e);
-                }
-            }
-        }
-    }
-
-    public void add(MessageReference node) throws Exception {
-        synchronized (pendingLock) {
-            // The destination may have just been removed...  
-            if( !destinations.contains(node.getRegionDestination()) && node!=QueueMessageReference.NULL_MESSAGE) {
-                // perhaps we should inform the caller that we are no longer valid to dispatch to?
-                return;
-            }
-            enqueueCounter++;
-            pending.addMessageLast(node);    
-        }
-        dispatchPending();
-    }
-
-    public void processMessageDispatchNotification(MessageDispatchNotification mdn) throws Exception {
-        synchronized(pendingLock) {
-            try {
-                pending.reset();
-                while (pending.hasNext()) {
-                    MessageReference node = pending.next();
-                    node.decrementReferenceCount();
-                    if (node.getMessageId().equals(mdn.getMessageId())) {
-                        // Synchronize between dispatched list and removal of messages from pending list
-                        // related to remove subscription action
-                        synchronized(dispatchLock) {
-                            pending.remove();
-                            createMessageDispatch(node, node.getMessage());
-                            dispatched.add(node);
-                            onDispatch(node, node.getMessage());
-                        }
-                        return;
-                    }
-                }
-            } finally {
-                pending.release();
-            }
-        }
-        throw new JMSException(
-                "Slave broker out of sync with master: Dispatched message ("
-                        + mdn.getMessageId() + ") was not in the pending list for "
-                        + mdn.getConsumerId() + " on " + mdn.getDestination().getPhysicalName());
-    }
-
-    public final void acknowledge(final ConnectionContext context,final MessageAck ack) throws Exception {
-        // Handle the standard acknowledgment case.
-        boolean callDispatchMatched = false;
-        Destination destination = null;
-        
-        if (!isSlave()) {
-            if (!okForAckAsDispatchDone.await(0l, TimeUnit.MILLISECONDS)) {
-                // suppress unexpected ack exception in this expected case
-                LOG.warn("Ignoring ack received before dispatch; result of failover with an outstanding ack. Acked messages will be replayed if present on this broker. Ignored ack: " + ack);
-                return;
-            }
-        }
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("ack:" + ack);
-        }
-        synchronized(dispatchLock) {
-            if (ack.isStandardAck()) {
-            	// First check if the ack matches the dispatched. When using failover this might
-            	// not be the case. We don't ever want to ack the wrong messages.
-            	assertAckMatchesDispatched(ack);
-            	
-                // Acknowledge all dispatched messages up till the message id of
-                // the acknowledgment.
-                int index = 0;
-                boolean inAckRange = false;
-                List<MessageReference> removeList = new ArrayList<MessageReference>();
-                for (final MessageReference node : dispatched) {
-                    MessageId messageId = node.getMessageId();
-                    if (ack.getFirstMessageId() == null
-                            || ack.getFirstMessageId().equals(messageId)) {
-                        inAckRange = true;
-                    }
-                    if (inAckRange) {
-                        // Don't remove the nodes until we are committed.  
-                        if (!context.isInTransaction()) {
-                            dequeueCounter++;
-                            node.getRegionDestination().getDestinationStatistics().getInflight().decrement();
-                            removeList.add(node);
-                        } else {
-                            // setup a Synchronization to remove nodes from the
-                            // dispatched list.
-                            context.getTransaction().addSynchronization(
-                                    new Synchronization() {
-
-                                        @Override
-                                        public void afterCommit()
-                                                throws Exception {
-                                            synchronized(dispatchLock) {
-                                                dequeueCounter++;
-                                                dispatched.remove(node);
-                                                node.getRegionDestination().getDestinationStatistics().getInflight().decrement();
-                                            }
-                                        }
-
-                                        @Override
-                                        public void afterRollback() throws Exception {
-                                            synchronized(dispatchLock) {
-                                                if (isSlave()) {
-                                                    node.getRegionDestination().getDestinationStatistics().getInflight().decrement();
-                                                } else {
-                                                    // poisionAck will decrement - otherwise still inflight on client
-                                                }
-                                            }
-                                        }
-                                    });
-                        }
-                        index++;
-                        acknowledge(context, ack, node);
-                        if (ack.getLastMessageId().equals(messageId)) {                  
-                            // contract prefetch if dispatch required a pull
-                            if (getPrefetchSize() == 0) {
-                                prefetchExtension = Math.max(0, prefetchExtension - index);
-                            } else if (usePrefetchExtension && context.isInTransaction()) {
-                                // extend prefetch window only if not a pulling consumer
-                                prefetchExtension = Math.max(prefetchExtension, index);
-                            }
-                            destination = node.getRegionDestination();
-                            callDispatchMatched = true;
-                            break;
-                        }
-                    }
-                }
-                for (final MessageReference node : removeList) {
-                    dispatched.remove(node);
-                }
-                // this only happens after a reconnect - get an ack which is not
-                // valid
-                if (!callDispatchMatched) {
-                    LOG.warn("Could not correlate acknowledgment with dispatched message: "
-                                  + ack);
-                }
-            } else if (ack.isIndividualAck()) {
-                // Message was delivered and acknowledge - but only delete the
-                // individual message
-                for (final MessageReference node : dispatched) {
-                    MessageId messageId = node.getMessageId();
-                    if (ack.getLastMessageId().equals(messageId)) {
-                        // this should never be within a transaction
-                        dequeueCounter++;
-                        node.getRegionDestination().getDestinationStatistics().getInflight().decrement();
-                        destination = node.getRegionDestination();
-                        acknowledge(context, ack, node);
-                        dispatched.remove(node);
-                        prefetchExtension = Math.max(0, prefetchExtension - 1);
-                        callDispatchMatched = true;
-                        break;
-                    }
-                }
-            }else if (ack.isDeliveredAck()) {
-                // Message was delivered but not acknowledged: update pre-fetch
-                // counters.
-                int index = 0;
-                for (Iterator<MessageReference> iter = dispatched.iterator(); iter.hasNext(); index++) {
-                    final MessageReference node = iter.next();
-                    if (node.isExpired()) {
-                        if (broker.isExpired(node)) {
-                            node.getRegionDestination().messageExpired(context, this, node);
-                        }
-                        dispatched.remove(node);
-                        node.getRegionDestination().getDestinationStatistics().getInflight().decrement();
-                    }
-                    if (ack.getLastMessageId().equals(node.getMessageId())) {
-                        if (usePrefetchExtension) {
-                            prefetchExtension = Math.max(prefetchExtension, index + 1);
-                        }
-                        destination = node.getRegionDestination();
-                        callDispatchMatched = true;
-                        break;
-                    }
-                }
-                if (!callDispatchMatched) {
-                    throw new JMSException(
-                            "Could not correlate acknowledgment with dispatched message: "
-                                    + ack);
-                }
-            } else if (ack.isRedeliveredAck()) {
-                // Message was re-delivered but it was not yet considered to be
-                // a DLQ message.
-                boolean inAckRange = false;
-                for (final MessageReference node : dispatched) {
-                    MessageId messageId = node.getMessageId();
-                    if (ack.getFirstMessageId() == null
-                            || ack.getFirstMessageId().equals(messageId)) {
-                        inAckRange = true;
-                    }
-                    if (inAckRange) {
-                        if (ack.getLastMessageId().equals(messageId)) {
-                            destination = node.getRegionDestination();
-                            callDispatchMatched = true;
-                            break;
-                        }
-                    }
-                }
-                if (!callDispatchMatched) {
-                    throw new JMSException(
-                            "Could not correlate acknowledgment with dispatched message: "
-                                    + ack);
-                }
-            } else if (ack.isPoisonAck()) {
-                // TODO: what if the message is already in a DLQ???
-                // Handle the poison ACK case: we need to send the message to a
-                // DLQ
-                if (ack.isInTransaction()) {
-                    throw new JMSException("Poison ack cannot be transacted: "
-                            + ack);
-                }
-                int index = 0;
-                boolean inAckRange = false;
-                List<MessageReference> removeList = new ArrayList<MessageReference>();
-                for (final MessageReference node : dispatched) {
-                    MessageId messageId = node.getMessageId();
-                    if (ack.getFirstMessageId() == null
-                            || ack.getFirstMessageId().equals(messageId)) {
-                        inAckRange = true;
-                    }
-                    if (inAckRange) {
-                        if (ack.getPoisonCause() != null) {
-                            node.getMessage().setProperty(ActiveMQMessage.DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY,
-                                    ack.getPoisonCause().toString());
-                        }
-                        sendToDLQ(context, node);
-                        node.getRegionDestination().getDestinationStatistics()
-                                .getInflight().decrement();
-                        removeList.add(node);
-                        dequeueCounter++;
-                        index++;
-                        acknowledge(context, ack, node);
-                        if (ack.getLastMessageId().equals(messageId)) {
-                            prefetchExtension = Math.max(0, prefetchExtension
-                                    - (index + 1));
-                            destination = node.getRegionDestination();
-                            callDispatchMatched = true;
-                            break;
-                        }
-                    }
-                }
-                for (final MessageReference node : removeList) {
-                    dispatched.remove(node);
-                }
-                if (!callDispatchMatched) {
-                    throw new JMSException(
-                            "Could not correlate acknowledgment with dispatched message: "
-                                    + ack);
-                }
-            }
-        }
-        if (callDispatchMatched && destination != null) {    
-            destination.wakeup();
-            dispatchPending();
-        } else {
-            if (isSlave()) {
-                throw new JMSException(
-                        "Slave broker out of sync with master: Acknowledgment ("
-                                + ack + ") was not in the dispatch list: "
-                                + dispatched);
-            } else {
-                LOG.debug("Acknowledgment out of sync (Normally occurs when failover connection reconnects): "
-                        + ack);
-            }
-        }
-    }
-
-    /**
-     * Checks an ack versus the contents of the dispatched list.
-     * 
-     * @param ack
-     * @throws JMSException if it does not match
-     */
-	protected void assertAckMatchesDispatched(MessageAck ack) throws JMSException {
-        MessageId firstAckedMsg = ack.getFirstMessageId();
-        MessageId lastAckedMsg = ack.getLastMessageId();
-        int checkCount = 0;
-        boolean checkFoundStart = false;
-        boolean checkFoundEnd = false;
-        for (MessageReference node : dispatched) {
-
-            if (firstAckedMsg == null) {
-                checkFoundStart = true;
-            } else if (!checkFoundStart && firstAckedMsg.equals(node.getMessageId())) {
-                checkFoundStart = true;
-            }
-
-            if (checkFoundStart) {
-                checkCount++;
-            }
-
-            if (lastAckedMsg != null && lastAckedMsg.equals(node.getMessageId())) {
-                checkFoundEnd = true;
-                break;
-            }
-        }
-        if (!checkFoundStart && firstAckedMsg != null)
-            throw new JMSException("Unmatched acknowledge: " + ack
-                    + "; Could not find Message-ID " + firstAckedMsg
-                    + " in dispatched-list (start of ack)");
-        if (!checkFoundEnd && lastAckedMsg != null)
-            throw new JMSException("Unmatched acknowledge: " + ack
-                    + "; Could not find Message-ID " + lastAckedMsg
-                    + " in dispatched-list (end of ack)");
-        if (ack.getMessageCount() != checkCount && !ack.isInTransaction()) {
-            throw new JMSException("Unmatched acknowledge: " + ack
-                    + "; Expected message count (" + ack.getMessageCount()
-                    + ") differs from count in dispatched-list (" + checkCount
-                    + ")");
-        }
-    }
-
-    /**
-     * @param context
-     * @param node
-     * @throws IOException
-     * @throws Exception
-     */
-    protected void sendToDLQ(final ConnectionContext context, final MessageReference node) throws IOException, Exception {
-        broker.getRoot().sendToDeadLetterQueue(context, node, this);
-    }
-    
-    public int getInFlightSize() {
-        return dispatched.size();
-    }
-    
-    /**
-     * Used to determine if the broker can dispatch to the consumer.
-     * 
-     * @return
-     */
-    public boolean isFull() {
-        return dispatched.size() - prefetchExtension >= info.getPrefetchSize();
-    }
-
-    /**
-     * @return true when 60% or more room is left for dispatching messages
-     */
-    public boolean isLowWaterMark() {
-        return (dispatched.size() - prefetchExtension) <= (info.getPrefetchSize() * .4);
-    }
-
-    /**
-     * @return true when 10% or less room is left for dispatching messages
-     */
-    public boolean isHighWaterMark() {
-        return (dispatched.size() - prefetchExtension) >= (info.getPrefetchSize() * .9);
-    }
-
-    @Override
-    public int countBeforeFull() {
-        return info.getPrefetchSize() + prefetchExtension - dispatched.size();
-    }
-
-    public int getPendingQueueSize() {
-        return pending.size();
-    }
-
-    public int getDispatchedQueueSize() {
-        return dispatched.size();
-    }
-
-    public long getDequeueCounter() {
-        return dequeueCounter;
-    }
-
-    public long getDispatchedCounter() {
-        return dispatchCounter;
-    }
-
-    public long getEnqueueCounter() {
-        return enqueueCounter;
-    }
-
-    @Override
-    public boolean isRecoveryRequired() {
-        return pending.isRecoveryRequired();
-    }
-
-    public PendingMessageCursor getPending() {
-        return this.pending;
-    }
-
-    public void setPending(PendingMessageCursor pending) {
-        this.pending = pending;
-        if (this.pending!=null) {
-            this.pending.setSystemUsage(usageManager);
-            this.pending.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
-        }
-    }
-
-   @Override
-    public void add(ConnectionContext context, Destination destination) throws Exception {
-        synchronized(pendingLock) {
-            super.add(context, destination);
-            pending.add(context, destination);
-        }
-    }
-
-    @Override
-    public List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception {
-        List<MessageReference> rc = new ArrayList<MessageReference>();
-        synchronized(pendingLock) {
-            super.remove(context, destination);
-            // Here is a potential problem concerning Inflight stat:
-            // Messages not already committed or rolled back may not be removed from dispatched list at the moment
-            // Except if each commit or rollback callback action comes before remove of subscriber.
-            rc.addAll(pending.remove(context, destination));
-
-            // Synchronized to DispatchLock
-            synchronized(dispatchLock) {
-                ArrayList<MessageReference> references = new ArrayList<MessageReference>();
-	            for (MessageReference r : dispatched) {
-	                if( r.getRegionDestination() == destination) {
-                        references.add(r);
-	                }
-	            }
-                rc.addAll(references);
-                destination.getDestinationStatistics().getDispatched().subtract(references.size());
-                destination.getDestinationStatistics().getInflight().subtract(references.size());
-                dispatched.removeAll(references);
-            }            
-        }
-        return rc;
-    }
-
-    protected void dispatchPending() throws IOException {
-        if (!isSlave()) {
-           synchronized(pendingLock) {
-                try {
-                    int numberToDispatch = countBeforeFull();
-                    if (numberToDispatch > 0) {
-                        setSlowConsumer(false);
-                        setPendingBatchSize(pending, numberToDispatch);
-                        int count = 0;
-                        pending.reset();
-                        while (pending.hasNext() && !isFull()
-                                && count < numberToDispatch) {
-                            MessageReference node = pending.next();
-                            if (node == null) {
-                                break;
-                            }
-                            
-                            // Synchronize between dispatched list and remove of message from pending list
-                            // related to remove subscription action
-                            synchronized(dispatchLock) {
-                                pending.remove();
-                                node.decrementReferenceCount();
-                                if( !isDropped(node) && canDispatch(node)) {
-
-                                    // Message may have been sitting in the pending
-                                    // list a while waiting for the consumer to ak the message.
-                                    if (node!=QueueMessageReference.NULL_MESSAGE && node.isExpired()) {
-                                        //increment number to dispatch
-                                        numberToDispatch++;
-                                        if (broker.isExpired(node)) {
-                                            node.getRegionDestination().messageExpired(context, this, node);
-                                        }
-                                        continue;
-                                    }
-                                    dispatch(node);
-                                    count++;
-                                }
-                            }
-                        }
-                    } else if (!isSlowConsumer()) {
-                        setSlowConsumer(true);
-                        for (Destination dest :destinations) {
-                            dest.slowConsumer(context, this);
-                        }
-                    }
-                } finally {
-                    pending.release();
-                }
-            }
-        }
-    }
-
-    protected void setPendingBatchSize(PendingMessageCursor pending, int numberToDispatch) {
-        pending.setMaxBatchSize(numberToDispatch);
-    }
-
-    protected boolean dispatch(final MessageReference node) throws IOException {
-        final Message message = node.getMessage();
-        if (message == null) {
-            return false;
-        }
-        
-        okForAckAsDispatchDone.countDown();
-        
-        // No reentrant lock - Patch needed to IndirectMessageReference on method lock
-        if (!isSlave()) {
-
-            MessageDispatch md = createMessageDispatch(node, message);
-            // NULL messages don't count... they don't get Acked.
-            if (node != QueueMessageReference.NULL_MESSAGE) {
-                dispatchCounter++;
-                dispatched.add(node);
-            } else {
-                prefetchExtension = Math.max(0, prefetchExtension - 1);
-            }
-            if (info.isDispatchAsync()) {
-                md.setTransmitCallback(new Runnable() {
-
-                    public void run() {
-                        // Since the message gets queued up in async dispatch,
-                        // we don't want to
-                        // decrease the reference count until it gets put on the
-                        // wire.
-                        onDispatch(node, message);
-                    }
-                });
-                context.getConnection().dispatchAsync(md);
-            } else {
-                context.getConnection().dispatchSync(md);
-                onDispatch(node, message);
-            }
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    protected void onDispatch(final MessageReference node, final Message message) {
-        if (node.getRegionDestination() != null) {
-            if (node != QueueMessageReference.NULL_MESSAGE) {
-                node.getRegionDestination().getDestinationStatistics().getDispatched().increment();
-                node.getRegionDestination().getDestinationStatistics().getInflight().increment();   
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace(info.getConsumerId() + " dispatched: " + message.getMessageId() + " - "
-                            + message.getDestination()  + ", dispatched: " + dispatchCounter + ", inflight: " + dispatched.size());
-                }
-            }
-        }
-        
-        if (info.isDispatchAsync()) {
-            try {
-                dispatchPending();
-            } catch (IOException e) {
-                context.getConnection().serviceExceptionAsync(e);
-            }
-        }
-    }
-
-    /**
-     * inform the MessageConsumer on the client to change it's prefetch
-     * 
-     * @param newPrefetch
-     */
-    public void updateConsumerPrefetch(int newPrefetch) {
-        if (context != null && context.getConnection() != null && context.getConnection().isManageable()) {
-            ConsumerControl cc = new ConsumerControl();
-            cc.setConsumerId(info.getConsumerId());
-            cc.setPrefetch(newPrefetch);
-            context.getConnection().dispatchAsync(cc);
-        }
-    }
-
-    /**
-     * @param node
-     * @param message
-     * @return MessageDispatch
-     */
-    protected MessageDispatch createMessageDispatch(MessageReference node, Message message) {
-        if (node == QueueMessageReference.NULL_MESSAGE) {
-            MessageDispatch md = new MessageDispatch();
-            md.setMessage(null);
-            md.setConsumerId(info.getConsumerId());
-            md.setDestination(null);
-            return md;
-        } else {
-            MessageDispatch md = new MessageDispatch();
-            md.setConsumerId(info.getConsumerId());
-            md.setDestination(node.getRegionDestination().getActiveMQDestination());
-            md.setMessage(message);
-            md.setRedeliveryCounter(node.getRedeliveryCounter());
-            return md;
-        }
-    }
-
-    /**
-     * Use when a matched message is about to be dispatched to the client.
-     * 
-     * @param node
-     * @return false if the message should not be dispatched to the client
-     *         (another sub may have already dispatched it for example).
-     * @throws IOException
-     */
-    protected abstract boolean canDispatch(MessageReference node) throws IOException;
-    
-    protected abstract boolean isDropped(MessageReference node);
-
-    /**
-     * Used during acknowledgment to remove the message.
-     * 
-     * @throws IOException
-     */
-    protected abstract void acknowledge(ConnectionContext context, final MessageAck ack, final MessageReference node) throws IOException;
-
-    
-    public int getMaxProducersToAudit() {
-        return maxProducersToAudit;
-    }
-
-    public void setMaxProducersToAudit(int maxProducersToAudit) {
-        this.maxProducersToAudit = maxProducersToAudit;
-    }
-
-    public int getMaxAuditDepth() {
-        return maxAuditDepth;
-    }
-
-    public void setMaxAuditDepth(int maxAuditDepth) {
-        this.maxAuditDepth = maxAuditDepth;
-    }
-    
-    public boolean isUsePrefetchExtension() {
-        return usePrefetchExtension;
-    }
-
-    public void setUsePrefetchExtension(boolean usePrefetchExtension) {
-        this.usePrefetchExtension = usePrefetchExtension;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
deleted file mode 100755
index f3a3904..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
+++ /dev/null
@@ -1,2087 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.AbstractList;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.DelayQueue;
-import java.util.concurrent.Delayed;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import javax.jms.ResourceAllocationException;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.StoreQueueCursor;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-import org.apache.activemq.broker.region.group.MessageGroupHashBucketFactory;
-import org.apache.activemq.broker.region.group.MessageGroupMap;
-import org.apache.activemq.broker.region.group.MessageGroupMapFactory;
-import org.apache.activemq.broker.region.policy.DispatchPolicy;
-import org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy;
-import org.apache.activemq.command.*;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.security.SecurityContext;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.usage.Usage;
-import org.apache.activemq.usage.UsageListener;
-import org.apache.activemq.util.BrokerSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-/**
- * The Queue is a List of MessageEntry objects that are dispatched to matching
- * subscriptions.
- * 
- * 
- */
-public class Queue extends BaseDestination implements Task, UsageListener {
-    protected static final Logger LOG = LoggerFactory.getLogger(Queue.class);
-    protected final TaskRunnerFactory taskFactory;
-    protected TaskRunner taskRunner;
-    private final ReentrantReadWriteLock consumersLock = new ReentrantReadWriteLock();
-    protected final List<Subscription> consumers = new ArrayList<Subscription>(50);
-    private final ReentrantReadWriteLock messagesLock = new ReentrantReadWriteLock();
-    protected PendingMessageCursor messages;
-    private final ReentrantReadWriteLock pagedInMessagesLock = new ReentrantReadWriteLock();
-    private final LinkedHashMap<MessageId, QueueMessageReference> pagedInMessages = new LinkedHashMap<MessageId, QueueMessageReference>();
-    // Messages that are paged in but have not yet been targeted at a
-    // subscription
-    private final ReentrantReadWriteLock pagedInPendingDispatchLock = new ReentrantReadWriteLock();
-    private List<QueueMessageReference> pagedInPendingDispatch = new ArrayList<QueueMessageReference>(100);
-    private List<QueueMessageReference> redeliveredWaitingDispatch = new ArrayList<QueueMessageReference>();
-    private MessageGroupMap messageGroupOwners;
-    private DispatchPolicy dispatchPolicy = new RoundRobinDispatchPolicy();
-    private MessageGroupMapFactory messageGroupMapFactory = new MessageGroupHashBucketFactory();
-    final Lock sendLock = new ReentrantLock();
-    private ExecutorService executor;
-    protected final Map<MessageId, Runnable> messagesWaitingForSpace = Collections
-            .synchronizedMap(new LinkedHashMap<MessageId, Runnable>());
-    private boolean useConsumerPriority = true;
-    private boolean strictOrderDispatch = false;
-    private final QueueDispatchSelector dispatchSelector;
-    private boolean optimizedDispatch = false;
-    private boolean firstConsumer = false;
-    private int timeBeforeDispatchStarts = 0;
-    private int consumersBeforeDispatchStarts = 0;
-    private CountDownLatch consumersBeforeStartsLatch;
-    private final AtomicLong pendingWakeups = new AtomicLong();
-    private boolean allConsumersExclusiveByDefault = false;
-    
-    private final Runnable sendMessagesWaitingForSpaceTask = new Runnable() {
-        public void run() {
-            asyncWakeup();
-        }
-    };
-    private final Runnable expireMessagesTask = new Runnable() {
-        public void run() {
-            expireMessages();
-        }
-    };
-
-    private final Object iteratingMutex = new Object() {
-    };
-    private final Scheduler scheduler;
-
-    class TimeoutMessage implements Delayed {
-
-        Message message;
-        ConnectionContext context;
-        long trigger;
-
-        public TimeoutMessage(Message message, ConnectionContext context, long delay) {
-            this.message = message;
-            this.context = context;
-            this.trigger = System.currentTimeMillis() + delay;
-        }
-
-        public long getDelay(TimeUnit unit) {
-            long n = trigger - System.currentTimeMillis();
-            return unit.convert(n, TimeUnit.MILLISECONDS);
-        }
-
-        public int compareTo(Delayed delayed) {
-            long other = ((TimeoutMessage) delayed).trigger;
-            int returnValue;
-            if (this.trigger < other) {
-                returnValue = -1;
-            } else if (this.trigger > other) {
-                returnValue = 1;
-            } else {
-                returnValue = 0;
-            }
-            return returnValue;
-        }
-
-    }
-
-    DelayQueue<TimeoutMessage> flowControlTimeoutMessages = new DelayQueue<TimeoutMessage>();
-
-    class FlowControlTimeoutTask extends Thread {
-
-        @Override
-        public void run() {
-            TimeoutMessage timeout;
-            try {
-                while (true) {
-                    timeout = flowControlTimeoutMessages.take();
-                    if (timeout != null) {
-                        synchronized (messagesWaitingForSpace) {
-                            if (messagesWaitingForSpace.remove(timeout.message.getMessageId()) != null) {
-                                ExceptionResponse response = new ExceptionResponse(
-                                        new ResourceAllocationException(
-                                                "Usage Manager Memory Limit reached. Stopping producer ("
-                                                        + timeout.message.getProducerId()
-                                                        + ") to prevent flooding "
-                                                        + getActiveMQDestination().getQualifiedName()
-                                                        + "."
-                                                        + " See http://activemq.apache.org/producer-flow-control.html for more info"));
-                                response.setCorrelationId(timeout.message.getCommandId());
-                                timeout.context.getConnection().dispatchAsync(response);
-                            }
-                        }
-                    }
-                }
-            } catch (InterruptedException e) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(getName() + "Producer Flow Control Timeout Task is stopping");
-                }
-            }
-        }
-    };
-
-    private final FlowControlTimeoutTask flowControlTimeoutTask = new FlowControlTimeoutTask();
-
-    private static final Comparator<Subscription> orderedCompare = new Comparator<Subscription>() {
-
-        public int compare(Subscription s1, Subscription s2) {
-            // We want the list sorted in descending order
-            return s2.getConsumerInfo().getPriority() - s1.getConsumerInfo().getPriority();
-        }
-    };
-
-    public Queue(BrokerService brokerService, final ActiveMQDestination destination, MessageStore store,
-            DestinationStatistics parentStats, TaskRunnerFactory taskFactory) throws Exception {
-        super(brokerService, store, destination, parentStats);
-        this.taskFactory = taskFactory;
-        this.dispatchSelector = new QueueDispatchSelector(destination);
-        this.scheduler = brokerService.getBroker().getScheduler();
-    }
-
-    public List<Subscription> getConsumers() {
-        consumersLock.readLock().lock();
-        try {
-            return new ArrayList<Subscription>(consumers);
-        }finally {
-            consumersLock.readLock().unlock();
-        }
-    }
-
-    // make the queue easily visible in the debugger from its task runner
-    // threads
-    final class QueueThread extends Thread {
-        final Queue queue;
-
-        public QueueThread(Runnable runnable, String name, Queue queue) {
-            super(runnable, name);
-            this.queue = queue;
-        }
-    }
-
-    @Override
-    public void initialize() throws Exception {
-        if (this.messages == null) {
-            if (destination.isTemporary() || broker == null || store == null) {
-                this.messages = new VMPendingMessageCursor(isPrioritizedMessages());
-            } else {
-                this.messages = new StoreQueueCursor(broker, this);
-            }
-        }
-        // If a VMPendingMessageCursor don't use the default Producer System
-        // Usage
-        // since it turns into a shared blocking queue which can lead to a
-        // network deadlock.
-        // If we are cursoring to disk..it's not and issue because it does not
-        // block due
-        // to large disk sizes.
-        if (messages instanceof VMPendingMessageCursor) {
-            this.systemUsage = brokerService.getSystemUsage();
-            memoryUsage.setParent(systemUsage.getMemoryUsage());
-        }
-
-        this.taskRunner = taskFactory.createTaskRunner(this, "Queue:" + destination.getPhysicalName());
-
-        super.initialize();
-        if (store != null) {
-            // Restore the persistent messages.
-            messages.setSystemUsage(systemUsage);
-            messages.setEnableAudit(isEnableAudit());
-            messages.setMaxAuditDepth(getMaxAuditDepth());
-            messages.setMaxProducersToAudit(getMaxProducersToAudit());
-            messages.setUseCache(isUseCache());
-            messages.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
-            if (messages.isRecoveryRequired()) {
-                store.recover(new MessageRecoveryListener() {
-                    double totalMessageCount = store.getMessageCount();
-                    int recoveredMessageCount = 0;
-
-                    public boolean recoverMessage(Message message) {
-                        // Message could have expired while it was being
-                        // loaded..
-                        if ((++recoveredMessageCount % 50000) == 0) {
-                            LOG.info("cursor for " + getActiveMQDestination().getQualifiedName() + " has recovered "
-                                    + recoveredMessageCount + " messages. " +
-                                    (int)(recoveredMessageCount*100/totalMessageCount) + "% complete");
-                        }
-                        if (message.isExpired()) {
-                            if (broker.isExpired(message)) {
-                                messageExpired(createConnectionContext(), createMessageReference(message));
-                                // drop message will decrement so counter
-                                // balance here
-                                destinationStatistics.getMessages().increment();
-                            }
-                            return true;
-                        }
-                        if (hasSpace()) {
-                            message.setRegionDestination(Queue.this);
-                            messagesLock.writeLock().lock();
-                            try{
-                                try {
-                                    messages.addMessageLast(message);
-                                } catch (Exception e) {
-                                    LOG.error("Failed to add message to cursor", e);
-                                }
-                            }finally {
-                                messagesLock.writeLock().unlock();
-                            }
-                            destinationStatistics.getMessages().increment();
-                            return true;
-                        }
-                        return false;
-                    }
-
-                    public boolean recoverMessageReference(MessageId messageReference) throws Exception {
-                        throw new RuntimeException("Should not be called.");
-                    }
-
-                    public boolean hasSpace() {
-                        return true;
-                    }
-
-                    public boolean isDuplicate(MessageId id) {
-                        return false;
-                    }
-                });
-            } else {
-                int messageCount = store.getMessageCount();
-                destinationStatistics.getMessages().setCount(messageCount);
-            }
-        }
-    }
-
-    /*
-     * Holder for subscription that needs attention on next iterate browser
-     * needs access to existing messages in the queue that have already been
-     * dispatched
-     */
-    class BrowserDispatch {
-        QueueBrowserSubscription browser;
-
-        public BrowserDispatch(QueueBrowserSubscription browserSubscription) {
-            browser = browserSubscription;
-            browser.incrementQueueRef();
-        }
-
-        void done() {
-            try {
-                browser.decrementQueueRef();
-            } catch (Exception e) {
-                LOG.warn("decrement ref on browser: " + browser, e);
-            }
-        }
-
-        public QueueBrowserSubscription getBrowser() {
-            return browser;
-        }
-    }
-
-    LinkedList<BrowserDispatch> browserDispatches = new LinkedList<BrowserDispatch>();
-
-    public void addSubscription(ConnectionContext context, Subscription sub) throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(getActiveMQDestination().getQualifiedName() + " add sub: " + sub + ", dequeues: "
-                    + getDestinationStatistics().getDequeues().getCount() + ", dispatched: "
-                    + getDestinationStatistics().getDispatched().getCount() + ", inflight: "
-                    + getDestinationStatistics().getInflight().getCount());
-        }
-
-        super.addSubscription(context, sub);
-        // synchronize with dispatch method so that no new messages are sent
-        // while setting up a subscription. avoid out of order messages,
-        // duplicates, etc.
-        pagedInPendingDispatchLock.writeLock().lock();
-        try {
-
-            sub.add(context, this);
-           
-            // needs to be synchronized - so no contention with dispatching
-           // consumersLock.
-            consumersLock.writeLock().lock();
-            try {
-
-                // set a flag if this is a first consumer
-                if (consumers.size() == 0) {
-                    firstConsumer = true;
-                    if (consumersBeforeDispatchStarts != 0) {
-                        consumersBeforeStartsLatch = new CountDownLatch(consumersBeforeDispatchStarts - 1);
-                    }
-                } else {
-                    if (consumersBeforeStartsLatch != null) {
-                        consumersBeforeStartsLatch.countDown();
-                    }
-                }
-
-                addToConsumerList(sub);
-                if (sub.getConsumerInfo().isExclusive() || isAllConsumersExclusiveByDefault()) {
-                    Subscription exclusiveConsumer = dispatchSelector.getExclusiveConsumer();
-                    if (exclusiveConsumer == null) {
-                        exclusiveConsumer = sub;
-                    } else if (sub.getConsumerInfo().getPriority() == Byte.MAX_VALUE ||
-                        sub.getConsumerInfo().getPriority() > exclusiveConsumer.getConsumerInfo().getPriority()) {
-                        exclusiveConsumer = sub;
-                    }
-                    dispatchSelector.setExclusiveConsumer(exclusiveConsumer);
-                }
-            }finally {
-                consumersLock.writeLock().unlock();
-            }
-
-            if (sub instanceof QueueBrowserSubscription) {
-                // tee up for dispatch in next iterate
-                QueueBrowserSubscription browserSubscription = (QueueBrowserSubscription) sub;
-                pagedInMessagesLock.readLock().lock();
-                try{
-                    BrowserDispatch browserDispatch = new BrowserDispatch(browserSubscription);
-                    browserDispatches.addLast(browserDispatch);
-                }finally {
-                    pagedInMessagesLock.readLock().unlock();
-                }
-            }
-
-            if (!(this.optimizedDispatch || isSlave())) {
-                wakeup();
-            }
-        }finally {
-            pagedInPendingDispatchLock.writeLock().unlock();
-        }
-        if (this.optimizedDispatch || isSlave()) {
-            // Outside of dispatchLock() to maintain the lock hierarchy of
-            // iteratingMutex -> dispatchLock. - see
-            // https://issues.apache.org/activemq/browse/AMQ-1878
-            wakeup();
-        }
-    }
-
-    public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeiveredSequenceId)
-            throws Exception {
-        super.removeSubscription(context, sub, lastDeiveredSequenceId);
-        // synchronize with dispatch method so that no new messages are sent
-        // while removing up a subscription.
-        pagedInPendingDispatchLock.writeLock().lock();
-        try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(getActiveMQDestination().getQualifiedName() + " remove sub: " + sub + ", lastDeliveredSeqId: " + lastDeiveredSequenceId + ", dequeues: "
-                        + getDestinationStatistics().getDequeues().getCount() + ", dispatched: "
-                        + getDestinationStatistics().getDispatched().getCount() + ", inflight: "
-                        + getDestinationStatistics().getInflight().getCount());
-            }
-            consumersLock.writeLock().lock();
-            try {
-                removeFromConsumerList(sub);
-                if (sub.getConsumerInfo().isExclusive()) {
-                    Subscription exclusiveConsumer = dispatchSelector.getExclusiveConsumer();
-                    if (exclusiveConsumer == sub) {
-                        exclusiveConsumer = null;
-                        for (Subscription s : consumers) {
-                            if (s.getConsumerInfo().isExclusive()
-                                    && (exclusiveConsumer == null || s.getConsumerInfo().getPriority() > exclusiveConsumer
-                                            .getConsumerInfo().getPriority())) {
-                                exclusiveConsumer = s;
-
-                            }
-                        }
-                        dispatchSelector.setExclusiveConsumer(exclusiveConsumer);
-                    }
-                } else if (isAllConsumersExclusiveByDefault()) {
-                    Subscription exclusiveConsumer = null;
-                    for (Subscription s : consumers) {
-                        if (exclusiveConsumer == null 
-                                || s.getConsumerInfo().getPriority() > exclusiveConsumer
-                                .getConsumerInfo().getPriority()) {
-                            exclusiveConsumer = s;
-                                }
-                    }
-                    dispatchSelector.setExclusiveConsumer(exclusiveConsumer);
-                }
-                ConsumerId consumerId = sub.getConsumerInfo().getConsumerId();
-                getMessageGroupOwners().removeConsumer(consumerId);
-
-                // redeliver inflight messages
-
-                boolean markAsRedelivered = false;
-                MessageReference lastDeliveredRef = null;
-                List<MessageReference> unAckedMessages = sub.remove(context, this);
-
-                // locate last redelivered in unconsumed list (list in delivery rather than seq order)
-                if (lastDeiveredSequenceId != 0) {
-                    for (MessageReference ref : unAckedMessages) {
-                        if (ref.getMessageId().getBrokerSequenceId() == lastDeiveredSequenceId) {
-                            lastDeliveredRef = ref;
-                            markAsRedelivered = true;
-                            LOG.debug("found lastDeliveredSeqID: " + lastDeiveredSequenceId + ", message reference: " + ref.getMessageId());
-                            break;
-                        }
-                    }
-                }
-                for (MessageReference ref : unAckedMessages) {
-                    QueueMessageReference qmr = (QueueMessageReference) ref;
-                    if (qmr.getLockOwner() == sub) {
-                        qmr.unlock();
-
-                        // have no delivery information
-                        if (lastDeiveredSequenceId == 0) {
-                            qmr.incrementRedeliveryCounter();
-                        } else {
-                            if (markAsRedelivered) {
-                                qmr.incrementRedeliveryCounter();
-                            }
-                            if (ref == lastDeliveredRef) {
-                                // all that follow were not redelivered
-                                markAsRedelivered = false;
-                            }
-                        }
-                    }
-                    redeliveredWaitingDispatch.add(qmr);
-                }
-                if (!redeliveredWaitingDispatch.isEmpty()) {
-                    doDispatch(new ArrayList<QueueMessageReference>());
-                }
-            }finally {
-                consumersLock.writeLock().unlock();
-            }
-            if (!(this.optimizedDispatch || isSlave())) {
-                wakeup();
-            }
-        }finally {
-            pagedInPendingDispatchLock.writeLock().unlock();
-        }
-        if (this.optimizedDispatch || isSlave()) {
-            // Outside of dispatchLock() to maintain the lock hierarchy of
-            // iteratingMutex -> dispatchLock. - see
-            // https://issues.apache.org/activemq/browse/AMQ-1878
-            wakeup();
-        }
-    }
-
-    public void send(final ProducerBrokerExchange producerExchange, final Message message) throws Exception {
-        final ConnectionContext context = producerExchange.getConnectionContext();
-        // There is delay between the client sending it and it arriving at the
-        // destination.. it may have expired.
-        message.setRegionDestination(this);
-        final ProducerInfo producerInfo = producerExchange.getProducerState().getInfo();
-        final boolean sendProducerAck = !message.isResponseRequired() && producerInfo.getWindowSize() > 0
-                && !context.isInRecoveryMode();
-        if (message.isExpired()) {
-            // message not stored - or added to stats yet - so chuck here
-            broker.getRoot().messageExpired(context, message, null);
-            if (sendProducerAck) {
-                ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message.getSize());
-                context.getConnection().dispatchAsync(ack);
-            }
-            return;
-        }
-        if (memoryUsage.isFull()) {
-            isFull(context, memoryUsage);
-            fastProducer(context, producerInfo);
-            if (isProducerFlowControl() && context.isProducerFlowControl()) {
-                if (warnOnProducerFlowControl) {
-                    warnOnProducerFlowControl = false;
-                    LOG
-                            .info("Usage Manager Memory Limit ("
-                                    + memoryUsage.getLimit()
-                                    + ") reached on "
-                                    + getActiveMQDestination().getQualifiedName()
-                                    + ". Producers will be throttled to the rate at which messages are removed from this destination to prevent flooding it."
-                                    + " See http://activemq.apache.org/producer-flow-control.html for more info");
-                }
-
-                if (systemUsage.isSendFailIfNoSpace()) {
-                    throw new ResourceAllocationException("Usage Manager Memory Limit reached. Stopping producer ("
-                            + message.getProducerId() + ") to prevent flooding "
-                            + getActiveMQDestination().getQualifiedName() + "."
-                            + " See http://activemq.apache.org/producer-flow-control.html for more info");
-                }
-
-                // We can avoid blocking due to low usage if the producer is
-                // sending
-                // a sync message or if it is using a producer window
-                if (producerInfo.getWindowSize() > 0 || message.isResponseRequired()) {
-                    // copy the exchange state since the context will be
-                    // modified while we are waiting
-                    // for space.
-                    final ProducerBrokerExchange producerExchangeCopy = producerExchange.copy();
-                    synchronized (messagesWaitingForSpace) {
-                     // Start flow control timeout task
-                        // Prevent trying to start it multiple times
-                        if (!flowControlTimeoutTask.isAlive()) {
-                            flowControlTimeoutTask.setName(getName()+" Producer Flow Control Timeout Task");
-                            flowControlTimeoutTask.start();
-                        }
-                        messagesWaitingForSpace.put(message.getMessageId(), new Runnable() {
-                            public void run() {
-
-                                try {
-                                    // While waiting for space to free up... the
-                                    // message may have expired.
-                                    if (message.isExpired()) {
-                                        LOG.error("expired waiting for space..");
-                                        broker.messageExpired(context, message, null);
-                                        destinationStatistics.getExpired().increment();
-                                    } else {
-                                        doMessageSend(producerExchangeCopy, message);
-                                    }
-
-                                    if (sendProducerAck) {
-                                        ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message
-                                                .getSize());
-                                        context.getConnection().dispatchAsync(ack);
-                                    } else {
-                                        Response response = new Response();
-                                        response.setCorrelationId(message.getCommandId());
-                                        context.getConnection().dispatchAsync(response);
-                                    }
-
-                                } catch (Exception e) {
-                                    if (!sendProducerAck && !context.isInRecoveryMode()) {
-                                        ExceptionResponse response = new ExceptionResponse(e);
-                                        response.setCorrelationId(message.getCommandId());
-                                        context.getConnection().dispatchAsync(response);
-                                    } else {
-                                        LOG.debug("unexpected exception on deferred send of :" + message, e);
-                                    }
-                                }
-                            }
-                        });
-
-                        if (systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) {
-                            flowControlTimeoutMessages.add(new TimeoutMessage(message, context, systemUsage
-                                    .getSendFailIfNoSpaceAfterTimeout()));
-                        }
-
-                        registerCallbackForNotFullNotification();
-                        context.setDontSendReponse(true);
-                        return;
-                    }
-
-                } else {
-
-                    if (memoryUsage.isFull()) {
-                        waitForSpace(context, memoryUsage, "Usage Manager Memory Limit is full. Producer ("
-                                + message.getProducerId() + ") stopped to prevent flooding "
-                                + getActiveMQDestination().getQualifiedName() + "."
-                                + " See http://activemq.apache.org/producer-flow-control.html for more info");
-                    }
-
-                    // The usage manager could have delayed us by the time
-                    // we unblock the message could have expired..
-                    if (message.isExpired()) {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Expired message: " + message);
-                        }
-                        broker.getRoot().messageExpired(context, message, null);
-                        return;
-                    }
-                }
-            }
-        }
-        doMessageSend(producerExchange, message);
-        if (sendProducerAck) {
-            ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message.getSize());
-            context.getConnection().dispatchAsync(ack);
-        }
-    }
-
-    private void registerCallbackForNotFullNotification() {
-        // If the usage manager is not full, then the task will not
-        // get called..
-        if (!memoryUsage.notifyCallbackWhenNotFull(sendMessagesWaitingForSpaceTask)) {
-            // so call it directly here.
-            sendMessagesWaitingForSpaceTask.run();
-        }
-    }
-
-    void doMessageSend(final ProducerBrokerExchange producerExchange, final Message message) throws IOException,
-            Exception {
-        final ConnectionContext context = producerExchange.getConnectionContext();
-        Future<Object> result = null;
-        
-        checkUsage(context, message);
-        sendLock.lockInterruptibly();
-        try {
-            if (store != null && message.isPersistent()) {        
-                message.getMessageId().setBrokerSequenceId(getDestinationSequenceId());
-                if (messages.isCacheEnabled()) {
-                    result = store.asyncAddQueueMessage(context, message);
-                } else {
-                    store.addMessage(context, message);
-                }
-                if (isReduceMemoryFootprint()) {
-                    message.clearMarshalledState();
-                }
-            }
-            if (context.isInTransaction()) {
-                // If this is a transacted message.. increase the usage now so that
-                // a big TX does not blow up
-                // our memory. This increment is decremented once the tx finishes..
-                message.incrementReferenceCount();
-            
-                context.getTransaction().addSynchronization(new Synchronization() {
-                    @Override
-                    public void afterCommit() throws Exception {
-                        sendLock.lockInterruptibly();
-                        try {
-                            // It could take while before we receive the commit
-                            // op, by that time the message could have expired..
-                            if (broker.isExpired(message)) {
-                                broker.messageExpired(context, message, null);
-                                destinationStatistics.getExpired().increment();
-                                return;
-                            }
-                            sendMessage(message);
-                        } finally {
-                            sendLock.unlock();
-                            message.decrementReferenceCount();
-                        }
-                        messageSent(context, message);
-                    }
-                    @Override
-                    public void afterRollback() throws Exception {
-                        message.decrementReferenceCount();
-                    }
-                });
-            } else {
-                // Add to the pending list, this takes care of incrementing the
-                // usage manager.
-                sendMessage(message);
-            }
-        } finally {
-            sendLock.unlock();
-        }
-        if (!context.isInTransaction()) {
-            messageSent(context, message);
-        }
-        if (result != null && !result.isCancelled()) {
-            try {
-                result.get();
-            } catch (CancellationException e) {
-                // ignore - the task has been cancelled if the message
-                // has already been deleted
-            }
-        }
-    }
-
-    private void checkUsage(ConnectionContext context, Message message) throws ResourceAllocationException, IOException, InterruptedException {
-        if (message.isPersistent()) {
-            if (store != null && systemUsage.getStoreUsage().isFull(getStoreUsageHighWaterMark())) {
-                final String logMessage = "Usage Manager Store is Full, " + getStoreUsageHighWaterMark() + "% of "
-                    + systemUsage.getStoreUsage().getLimit() + ". Stopping producer ("
-                    + message.getProducerId() + ") to prevent flooding "
-                    + getActiveMQDestination().getQualifiedName() + "."
-                    + " See http://activemq.apache.org/producer-flow-control.html for more info";
-
-                waitForSpace(context, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);
-            }
-        } else if (messages.getSystemUsage() != null && systemUsage.getTempUsage().isFull()) {
-            final String logMessage = "Usage Manager Temp Store is Full ("
-                    + systemUsage.getTempUsage().getPercentUsage() + "% of " + systemUsage.getTempUsage().getLimit() 
-                    +"). Stopping producer (" + message.getProducerId()
-                + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
-                + " See http://activemq.apache.org/producer-flow-control.html for more info";
-            
-            waitForSpace(context, messages.getSystemUsage().getTempUsage(), logMessage);
-        }
-    }
-
-    private void expireMessages() {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(getActiveMQDestination().getQualifiedName() + " expiring messages ..");
-        }
-
-        // just track the insertion count
-        List<Message> browsedMessages = new AbstractList<Message>() {
-            int size = 0;
-
-            @Override
-            public void add(int index, Message element) {
-                size++;
-            }
-
-            @Override
-            public int size() {
-                return size;
-            }
-
-            @Override
-            public Message get(int index) {
-                return null;
-            }
-        };
-        doBrowse(browsedMessages, this.getMaxExpirePageSize());
-        asyncWakeup();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(getActiveMQDestination().getQualifiedName() + " expiring messages done.");
-        }
-    }
-
-    public void gc() {
-    }
-
-    public void acknowledge(ConnectionContext context, Subscription sub, MessageAck ack, MessageReference node)
-            throws IOException {
-        messageConsumed(context, node);
-        if (store != null && node.isPersistent()) {
-            // the original ack may be a ranged ack, but we are trying to delete
-            // a specific
-            // message store here so we need to convert to a non ranged ack.
-            if (ack.getMessageCount() > 0) {
-                // Dup the ack
-                MessageAck a = new MessageAck();
-                ack.copy(a);
-                ack = a;
-                // Convert to non-ranged.
-                ack.setFirstMessageId(node.getMessageId());
-                ack.setLastMessageId(node.getMessageId());
-                ack.setMessageCount(1);
-            }
-
-            store.removeAsyncMessage(context, ack);
-        }
-    }
-
-    Message loadMessage(MessageId messageId) throws IOException {
-        Message msg = null;
-        if (store != null) { // can be null for a temp q
-            msg = store.getMessage(messageId);
-            if (msg != null) {
-                msg.setRegionDestination(this);
-            }
-        }
-        return msg;
-    }
-
-    @Override
-    public String toString() {
-        int size = 0;
-        messagesLock.readLock().lock();
-        try{
-            size = messages.size();
-        }finally {
-            messagesLock.readLock().unlock();
-        }
-        return "Queue: destination=" + destination.getPhysicalName() + ", subscriptions=" + consumers.size()
-                + ", memory=" + memoryUsage.getPercentUsage() + "%, size=" + size + ", in flight groups="
-                + messageGroupOwners;
-    }
-
-    public void start() throws Exception {
-        if (memoryUsage != null) {
-            memoryUsage.start();
-        }
-        if (systemUsage.getStoreUsage() != null) {
-            systemUsage.getStoreUsage().start();
-        }
-        systemUsage.getMemoryUsage().addUsageListener(this);
-        messages.start();
-        if (getExpireMessagesPeriod() > 0) {
-            scheduler.schedualPeriodically(expireMessagesTask, getExpireMessagesPeriod());
-        }
-        doPageIn(false);
-    }
-
-    public void stop() throws Exception {
-        if (taskRunner != null) {
-            taskRunner.shutdown();
-        }
-        if (this.executor != null) {
-            this.executor.shutdownNow();
-        }
-
-        scheduler.cancel(expireMessagesTask);
-
-        if (flowControlTimeoutTask.isAlive()) {
-            flowControlTimeoutTask.interrupt();
-        }
-
-        if (messages != null) {
-            messages.stop();
-        }
-
-        systemUsage.getMemoryUsage().removeUsageListener(this);
-        if (memoryUsage != null) {
-            memoryUsage.stop();
-        }
-        if (store != null) {
-            store.stop();
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    @Override
-    public ActiveMQDestination getActiveMQDestination() {
-        return destination;
-    }
-
-    public MessageGroupMap getMessageGroupOwners() {
-        if (messageGroupOwners == null) {
-            messageGroupOwners = getMessageGroupMapFactory().createMessageGroupMap();
-        }
-        return messageGroupOwners;
-    }
-
-    public DispatchPolicy getDispatchPolicy() {
-        return dispatchPolicy;
-    }
-
-    public void setDispatchPolicy(DispatchPolicy dispatchPolicy) {
-        this.dispatchPolicy = dispatchPolicy;
-    }
-
-    public MessageGroupMapFactory getMessageGroupMapFactory() {
-        return messageGroupMapFactory;
-    }
-
-    public void setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory) {
-        this.messageGroupMapFactory = messageGroupMapFactory;
-    }
-
-    public PendingMessageCursor getMessages() {
-        return this.messages;
-    }
-
-    public void setMessages(PendingMessageCursor messages) {
-        this.messages = messages;
-    }
-
-    public boolean isUseConsumerPriority() {
-        return useConsumerPriority;
-    }
-
-    public void setUseConsumerPriority(boolean useConsumerPriority) {
-        this.useConsumerPriority = useConsumerPriority;
-    }
-
-    public boolean isStrictOrderDispatch() {
-        return strictOrderDispatch;
-    }
-
-    public void setStrictOrderDispatch(boolean strictOrderDispatch) {
-        this.strictOrderDispatch = strictOrderDispatch;
-    }
-
-    public boolean isOptimizedDispatch() {
-        return optimizedDispatch;
-    }
-
-    public void setOptimizedDispatch(boolean optimizedDispatch) {
-        this.optimizedDispatch = optimizedDispatch;
-    }
-
-    public int getTimeBeforeDispatchStarts() {
-        return timeBeforeDispatchStarts;
-    }
-
-    public void setTimeBeforeDispatchStarts(int timeBeforeDispatchStarts) {
-        this.timeBeforeDispatchStarts = timeBeforeDispatchStarts;
-    }
-
-    public int getConsumersBeforeDispatchStarts() {
-        return consumersBeforeDispatchStarts;
-    }
-
-    public void setConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts) {
-        this.consumersBeforeDispatchStarts = consumersBeforeDispatchStarts;
-    }
-
-    public void setAllConsumersExclusiveByDefault(boolean allConsumersExclusiveByDefault) {
-        this.allConsumersExclusiveByDefault = allConsumersExclusiveByDefault;
-    }
-
-    public boolean isAllConsumersExclusiveByDefault() {
-        return allConsumersExclusiveByDefault;
-    }
-
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    private QueueMessageReference createMessageReference(Message message) {
-        QueueMessageReference result = new IndirectMessageReference(message);
-        return result;
-    }
-
-    public Message[] browse() {
-        List<Message> browseList = new ArrayList<Message>();
-        doBrowse(browseList, getMaxBrowsePageSize());
-        return browseList.toArray(new Message[browseList.size()]);
-    }
-
-    public void doBrowse(List<Message> browseList, int max) {
-        final ConnectionContext connectionContext = createConnectionContext();
-        try {
-            pageInMessages(false);
-            List<MessageReference> toExpire = new ArrayList<MessageReference>();
-
-            pagedInPendingDispatchLock.writeLock().lock();
-            try {
-                addAll(pagedInPendingDispatch, browseList, max, toExpire);
-                for (MessageReference ref : toExpire) {
-                    pagedInPendingDispatch.remove(ref);
-                    if (broker.isExpired(ref)) {
-                        LOG.debug("expiring from pagedInPending: " + ref);
-                        messageExpired(connectionContext, ref);
-                    }
-                }
-            } finally {
-                pagedInPendingDispatchLock.writeLock().unlock();
-            }
-            toExpire.clear();
-            pagedInMessagesLock.readLock().lock();
-            try {
-                addAll(pagedInMessages.values(), browseList, max, toExpire);
-            } finally {
-                pagedInMessagesLock.readLock().unlock();
-            }
-            for (MessageReference ref : toExpire) {
-                if (broker.isExpired(ref)) {
-                    LOG.debug("expiring from pagedInMessages: " + ref);
-                    messageExpired(connectionContext, ref);
-                } else {
-                    pagedInMessagesLock.writeLock().lock();
-                    try {
-                        pagedInMessages.remove(ref.getMessageId());
-                    } finally {
-                        pagedInMessagesLock.writeLock().unlock();
-                    }
-                }
-            }
-
-            if (browseList.size() < getMaxBrowsePageSize()) {
-                messagesLock.writeLock().lock();
-                try {
-                    try {
-                        messages.reset();
-                        while (messages.hasNext() && browseList.size() < max) {
-                            MessageReference node = messages.next();
-                            if (node.isExpired()) {
-                                if (broker.isExpired(node)) {
-                                    LOG.debug("expiring from messages: " + node);
-                                    messageExpired(connectionContext, createMessageReference(node.getMessage()));
-                                }
-                                messages.remove();
-                            } else {
-                                messages.rollback(node.getMessageId());
-                                if (browseList.contains(node.getMessage()) == false) {
-                                    browseList.add(node.getMessage());
-                                }
-                            }
-                            node.decrementReferenceCount();
-                        }
-                    } finally {
-                        messages.release();
-                    }
-                } finally {
-                    messagesLock.writeLock().unlock();
-                }
-            }
-
-        } catch (Exception e) {
-            LOG.error("Problem retrieving message for browse", e);
-        }
-    }
-
-    private void addAll(Collection<QueueMessageReference> refs, List<Message> l, int maxBrowsePageSize,
-            List<MessageReference> toExpire) throws Exception {
-        for (Iterator<QueueMessageReference> i = refs.iterator(); i.hasNext() && l.size() < getMaxBrowsePageSize();) {
-            QueueMessageReference ref = i.next();
-            if (ref.isExpired()) {
-                toExpire.add(ref);
-            } else if (l.contains(ref.getMessage()) == false) {
-                l.add(ref.getMessage());
-            }
-        }
-    }
-
-    public QueueMessageReference getMessage(String id) {
-        MessageId msgId = new MessageId(id);
-        pagedInMessagesLock.readLock().lock();
-        try{
-            QueueMessageReference ref = this.pagedInMessages.get(msgId);
-            if (ref != null) {
-                return ref;
-            }
-        }finally {
-            pagedInMessagesLock.readLock().unlock();
-        }
-        messagesLock.readLock().lock();
-        try{
-            try {
-                messages.reset();
-                while (messages.hasNext()) {
-                    MessageReference mr = messages.next();
-                    QueueMessageReference qmr = createMessageReference(mr.getMessage());
-                    qmr.decrementReferenceCount();
-                    messages.rollback(qmr.getMessageId());
-                    if (msgId.equals(qmr.getMessageId())) {
-                        return qmr;
-                    }
-                }
-            } finally {
-                messages.release();
-            }
-        }finally {
-            messagesLock.readLock().unlock();
-        }
-        return null;
-    }
-
-    public void purge() throws Exception {
-        ConnectionContext c = createConnectionContext();
-        List<MessageReference> list = null;
-        do {
-            doPageIn(true);
-            pagedInMessagesLock.readLock().lock();
-            try {
-                list = new ArrayList<MessageReference>(pagedInMessages.values());
-            }finally {
-                pagedInMessagesLock.readLock().unlock();
-            }
-
-            for (MessageReference ref : list) {
-                try {
-                    QueueMessageReference r = (QueueMessageReference) ref;
-                    removeMessage(c, r);
-                } catch (IOException e) {
-                }
-            }
-            // don't spin/hang if stats are out and there is nothing left in the
-            // store
-        } while (!list.isEmpty() && this.destinationStatistics.getMessages().getCount() > 0);
-        if (this.destinationStatistics.getMessages().getCount() > 0) {
-            LOG.warn(getActiveMQDestination().getQualifiedName()
-                    + " after purge complete, message count stats report: "
-                    + this.destinationStatistics.getMessages().getCount());
-        }
-        gc();
-        this.destinationStatistics.getMessages().setCount(0);
-        getMessages().clear();
-    }
-
-    /**
-     * Removes the message matching the given messageId
-     */
-    public boolean removeMessage(String messageId) throws Exception {
-        return removeMatchingMessages(createMessageIdFilter(messageId), 1) > 0;
-    }
-
-    /**
-     * Removes the messages matching the given selector
-     * 
-     * @return the number of messages removed
-     */
-    public int removeMatchingMessages(String selector) throws Exception {
-        return removeMatchingMessages(selector, -1);
-    }
-
-    /**
-     * Removes the messages matching the given selector up to the maximum number
-     * of matched messages
-     * 
-     * @return the number of messages removed
-     */
-    public int removeMatchingMessages(String selector, int maximumMessages) throws Exception {
-        return removeMatchingMessages(createSelectorFilter(selector), maximumMessages);
-    }
-
-    /**
-     * Removes the messages matching the given filter up to the maximum number
-     * of matched messages
-     * 
-     * @return the number of messages removed
-     */
-    public int removeMatchingMessages(MessageReferenceFilter filter, int maximumMessages) throws Exception {
-        int movedCounter = 0;
-        Set<MessageReference> set = new CopyOnWriteArraySet<MessageReference>();
-        ConnectionContext context = createConnectionContext();
-        do {
-            doPageIn(true);
-            pagedInMessagesLock.readLock().lock();
-            try{
-                set.addAll(pagedInMessages.values());
-            }finally {
-                pagedInMessagesLock.readLock().unlock();
-            }
-            List<MessageReference> list = new ArrayList<MessageReference>(set);
-            for (MessageReference ref : list) {
-                IndirectMessageReference r = (IndirectMessageReference) ref;
-                if (filter.evaluate(context, r)) {
-
-                    removeMessage(context, r);
-                    set.remove(r);
-                    if (++movedCounter >= maximumMessages && maximumMessages > 0) {
-                        return movedCounter;
-                    }
-                }
-            }
-        } while (set.size() < this.destinationStatistics.getMessages().getCount());
-        return movedCounter;
-    }
-
-    /**
-     * Copies the message matching the given messageId
-     */
-    public boolean copyMessageTo(ConnectionContext context, String messageId, ActiveMQDestination dest)
-            throws Exception {
-        return copyMatchingMessages(context, createMessageIdFilter(messageId), dest, 1) > 0;
-    }
-
-    /**
-     * Copies the messages matching the given selector
-     * 
-     * @return the number of messages copied
-     */
-    public int copyMatchingMessagesTo(ConnectionContext context, String selector, ActiveMQDestination dest)
-            throws Exception {
-        return copyMatchingMessagesTo(context, selector, dest, -1);
-    }
-
-    /**
-     * Copies the messages matching the given selector up to the maximum number
-     * of matched messages
-     * 
-     * @return the number of messages copied
-     */
-    public int copyMatchingMessagesTo(ConnectionContext context, String selector, ActiveMQDestination dest,
-            int maximumMessages) throws Exception {
-        return copyMatchingMessages(context, createSelectorFilter(selector), dest, maximumMessages);
-    }
-
-    /**
-     * Copies the messages matching the given filter up to the maximum number of
-     * matched messages
-     * 
-     * @return the number of messages copied
-     */
-    public int copyMatchingMessages(ConnectionContext context, MessageReferenceFilter filter, ActiveMQDestination dest,
-            int maximumMessages) throws Exception {
-        int movedCounter = 0;
-        int count = 0;
-        Set<MessageReference> set = new CopyOnWriteArraySet<MessageReference>();
-        do {
-            int oldMaxSize = getMaxPageSize();
-            setMaxPageSize((int) this.destinationStatistics.getMessages().getCount());
-            doPageIn(true);
-            setMaxPageSize(oldMaxSize);
-            pagedInMessagesLock.readLock().lock();
-            try {
-                set.addAll(pagedInMessages.values());
-            }finally {
-                pagedInMessagesLock.readLock().unlock();
-            }
-            List<MessageReference> list = new ArrayList<MessageReference>(set);
-            for (MessageReference ref : list) {
-                IndirectMessageReference r = (IndirectMessageReference) ref;
-                if (filter.evaluate(context, r)) {
-
-                    r.incrementReferenceCount();
-                    try {
-                        Message m = r.getMessage();
-                        BrokerSupport.resend(context, m, dest);
-                        if (++movedCounter >= maximumMessages && maximumMessages > 0) {
-                            return movedCounter;
-                        }
-                    } finally {
-                        r.decrementReferenceCount();
-                    }
-                }
-                count++;
-            }
-        } while (count < this.destinationStatistics.getMessages().getCount());
-        return movedCounter;
-    }
-
-    /**
-     * Move a message
-     *
-     * @param context
-     *            connection context
-     * @param m
-     *            QueueMessageReference
-     * @param dest
-     *            ActiveMQDestination
-     * @throws Exception
-     */
-    public boolean moveMessageTo(ConnectionContext context, QueueMessageReference m, ActiveMQDestination dest) throws Exception {
-        BrokerSupport.resend(context, m.getMessage(), dest);
-        removeMessage(context, m);
-        messagesLock.writeLock().lock();
-        try{
-            messages.rollback(m.getMessageId());
-        }finally {
-            messagesLock.writeLock().unlock();
-        }
-        return true;
-    }
-
-    /**
-     * Moves the message matching the given messageId
-     */
-    public boolean moveMessageTo(ConnectionContext context, String messageId, ActiveMQDestination dest)
-            throws Exception {
-        return moveMatchingMessagesTo(context, createMessageIdFilter(messageId), dest, 1) > 0;
-    }
-
-    /**
-     * Moves the messages matching the given selector
-     * 
-     * @return the number of messages removed
-     */
-    public int moveMatchingMessagesTo(ConnectionContext context, String selector, ActiveMQDestination dest)
-            throws Exception {
-        return moveMatchingMessagesTo(context, selector, dest, Integer.MAX_VALUE);
-    }
-
-    /**
-     * Moves the messages matching the given selector up to the maximum number
-     * of matched messages
-     */
-    public int moveMatchingMessagesTo(ConnectionContext context, String selector, ActiveMQDestination dest,
-            int maximumMessages) throws Exception {
-        return moveMatchingMessagesTo(context, createSelectorFilter(selector), dest, maximumMessages);
-    }
-
-    /**
-     * Moves the messages matching the given filter up to the maximum number of
-     * matched messages
-     */
-    public int moveMatchingMessagesTo(ConnectionContext context, MessageReferenceFilter filter,
-            ActiveMQDestination dest, int maximumMessages) throws Exception {
-        int movedCounter = 0;
-        Set<QueueMessageReference> set = new CopyOnWriteArraySet<QueueMessageReference>();
-        do {
-            doPageIn(true);
-            pagedInMessagesLock.readLock().lock();
-            try{
-                set.addAll(pagedInMessages.values());
-            }finally {
-                pagedInMessagesLock.readLock().unlock();
-            }
-            List<QueueMessageReference> list = new ArrayList<QueueMessageReference>(set);
-            for (QueueMessageReference ref : list) {
-                if (filter.evaluate(context, ref)) {
-                    // We should only move messages that can be locked.
-                    moveMessageTo(context, ref, dest);
-                    set.remove(ref);
-                    if (++movedCounter >= maximumMessages && maximumMessages > 0) {
-                        return movedCounter;
-                    }
-                }
-            }
-        } while (set.size() < this.destinationStatistics.getMessages().getCount() && set.size() < maximumMessages);
-        return movedCounter;
-    }
-
-    BrowserDispatch getNextBrowserDispatch() {
-        pagedInMessagesLock.readLock().lock();
-        try{
-            if (browserDispatches.isEmpty()) {
-                return null;
-            }
-            return browserDispatches.removeFirst();
-        }finally {
-            pagedInMessagesLock.readLock().unlock();
-        }
-
-    }
-
-    /**
-     * @return true if we would like to iterate again
-     * @see org.apache.activemq.thread.Task#iterate()
-     */
-    public boolean iterate() {
-        MDC.put("activemq.destination", getName());
-        boolean pageInMoreMessages = false;
-        synchronized (iteratingMutex) {
-
-            // do early to allow dispatch of these waiting messages
-            synchronized (messagesWaitingForSpace) {
-                Iterator<Runnable> it = messagesWaitingForSpace.values().iterator();
-                while (it.hasNext()) {
-                    if (!memoryUsage.isFull()) {
-                        Runnable op = it.next();
-                        it.remove();
-                        op.run();
-                    } else {
-                        registerCallbackForNotFullNotification();
-                        break;
-                    }
-                }
-            }
-
-            if (firstConsumer) {
-                firstConsumer = false;
-                try {
-                    if (consumersBeforeDispatchStarts > 0) {
-                        int timeout = 1000; // wait one second by default if
-                                            // consumer count isn't reached
-                        if (timeBeforeDispatchStarts > 0) {
-                            timeout = timeBeforeDispatchStarts;
-                        }
-                        if (consumersBeforeStartsLatch.await(timeout, TimeUnit.MILLISECONDS)) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(consumers.size() + " consumers subscribed. Starting dispatch.");
-                            }
-                        } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(timeout + " ms elapsed and " + consumers.size()
-                                        + " consumers subscribed. Starting dispatch.");
-                            }
-                        }
-                    }
-                    if (timeBeforeDispatchStarts > 0 && consumersBeforeDispatchStarts <= 0) {
-                        iteratingMutex.wait(timeBeforeDispatchStarts);
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug(timeBeforeDispatchStarts + " ms elapsed. Starting dispatch.");
-                        }
-                    }
-                } catch (Exception e) {
-                    LOG.error(e.toString());
-                }
-            }
-
-            BrowserDispatch pendingBrowserDispatch = getNextBrowserDispatch();
-
-            messagesLock.readLock().lock();
-            try{
-                pageInMoreMessages |= !messages.isEmpty();
-            }finally {
-                messagesLock.readLock().unlock();
-            }
-
-            pagedInPendingDispatchLock.readLock().lock();
-            try {
-                pageInMoreMessages |= !pagedInPendingDispatch.isEmpty();
-            }finally {
-                pagedInPendingDispatchLock.readLock().unlock();
-            }
-
-            // Perhaps we should page always into the pagedInPendingDispatch
-            // list if
-            // !messages.isEmpty(), and then if
-            // !pagedInPendingDispatch.isEmpty()
-            // then we do a dispatch.
-            if (pageInMoreMessages || pendingBrowserDispatch != null || !redeliveredWaitingDispatch.isEmpty()) {
-                try {
-                    pageInMessages(pendingBrowserDispatch != null);
-
-                } catch (Throwable e) {
-                    LOG.error("Failed to page in more queue messages ", e);
-                }
-            }
-
-            if (pendingBrowserDispatch != null) {
-                ArrayList<QueueMessageReference> alreadyDispatchedMessages = null;
-                pagedInMessagesLock.readLock().lock();
-                try{
-                    alreadyDispatchedMessages = new ArrayList<QueueMessageReference>(pagedInMessages.values());
-                }finally {
-                    pagedInMessagesLock.readLock().unlock();
-                }
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("dispatch to browser: " + pendingBrowserDispatch.getBrowser()
-                            + ", already dispatched/paged count: " + alreadyDispatchedMessages.size());
-                }
-                do {
-                    try {
-                        MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext();
-                        msgContext.setDestination(destination);
-
-                        QueueBrowserSubscription browser = pendingBrowserDispatch.getBrowser();
-                        for (QueueMessageReference node : alreadyDispatchedMessages) {
-                            if (!node.isAcked()) {
-                                msgContext.setMessageReference(node);
-                                if (browser.matches(node, msgContext)) {
-                                    browser.add(node);
-                                }
-                            }
-                        }
-                        pendingBrowserDispatch.done();
-                    } catch (Exception e) {
-                        LOG.warn("exception on dispatch to browser: " + pendingBrowserDispatch.getBrowser(), e);
-                    }
-
-                } while ((pendingBrowserDispatch = getNextBrowserDispatch()) != null);
-            }
-
-            if (pendingWakeups.get() > 0) {
-                pendingWakeups.decrementAndGet();
-            }
-            MDC.remove("activemq.destination");
-            return pendingWakeups.get() > 0;
-        }
-    }
-
-    protected MessageReferenceFilter createMessageIdFilter(final String messageId) {
-        return new MessageReferenceFilter() {
-            public boolean evaluate(ConnectionContext context, MessageReference r) {
-                return messageId.equals(r.getMessageId().toString());
-            }
-
-            @Override
-            public String toString() {
-                return "MessageIdFilter: " + messageId;
-            }
-        };
-    }
-
-    protected MessageReferenceFilter createSelectorFilter(String selector) throws InvalidSelectorException {
-        final BooleanExpression selectorExpression = SelectorParser.parse(selector);
-
-        return new MessageReferenceFilter() {
-            public boolean evaluate(ConnectionContext context, MessageReference r) throws JMSException {
-                MessageEvaluationContext messageEvaluationContext = context.getMessageEvaluationContext();
-
-                messageEvaluationContext.setMessageReference(r);
-                if (messageEvaluationContext.getDestination() == null) {
-                    messageEvaluationContext.setDestination(getActiveMQDestination());
-                }
-
-                return selectorExpression.matches(messageEvaluationContext);
-            }
-        };
-    }
-
-    protected void removeMessage(ConnectionContext c, QueueMessageReference r) throws IOException {
-        removeMessage(c, null, r);
-        pagedInPendingDispatchLock.writeLock().lock();
-        try {
-            pagedInPendingDispatch.remove(r);
-        } finally {
-            pagedInPendingDispatchLock.writeLock().unlock();
-        }
-
-    }
-
-    protected void removeMessage(ConnectionContext c, Subscription subs, QueueMessageReference r) throws IOException {
-        MessageAck ack = new MessageAck();
-        ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
-        ack.setDestination(destination);
-        ack.setMessageID(r.getMessageId());
-        removeMessage(c, subs, r, ack);
-    }
-
-    protected void removeMessage(ConnectionContext context, Subscription sub, final QueueMessageReference reference,
-            MessageAck ack) throws IOException {
-        reference.setAcked(true);
-        // This sends the ack the the journal..
-        if (!ack.isInTransaction()) {
-            acknowledge(context, sub, ack, reference);
-            getDestinationStatistics().getDequeues().increment();
-            dropMessage(reference);
-        } else {
-            try {
-                acknowledge(context, sub, ack, reference);
-            } finally {
-                context.getTransaction().addSynchronization(new Synchronization() {
-
-                    @Override
-                    public void afterCommit() throws Exception {
-                        getDestinationStatistics().getDequeues().increment();
-                        dropMessage(reference);
-                        wakeup();
-                    }
-
-                    @Override
-                    public void afterRollback() throws Exception {
-                        reference.setAcked(false);
-                    }
-                });
-            }
-        }
-        if (ack.isPoisonAck()) {
-            // message gone to DLQ, is ok to allow redelivery
-            messagesLock.writeLock().lock();
-            try{
-                messages.rollback(reference.getMessageId());
-            }finally {
-                messagesLock.writeLock().unlock();
-            }
-        }
-
-    }
-
-    private void dropMessage(QueueMessageReference reference) {
-        reference.drop();
-        destinationStatistics.getMessages().decrement();
-        pagedInMessagesLock.writeLock().lock();
-        try{
-            pagedInMessages.remove(reference.getMessageId());
-        }finally {
-            pagedInMessagesLock.writeLock().unlock();
-        }
-    }
-
-    public void messageExpired(ConnectionContext context, MessageReference reference) {
-        messageExpired(context, null, reference);
-    }
-
-    public void messageExpired(ConnectionContext context, Subscription subs, MessageReference reference) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("message expired: " + reference);
-        }
-        broker.messageExpired(context, reference, subs);
-        destinationStatistics.getExpired().increment();
-        try {
-            removeMessage(context, subs, (QueueMessageReference) reference);
-        } catch (IOException e) {
-            LOG.error("Failed to remove expired Message from the store ", e);
-        }
-    }
-
-    protected ConnectionContext createConnectionContext() {
-        ConnectionContext answer = new ConnectionContext(new NonCachedMessageEvaluationContext());
-        answer.setBroker(this.broker);
-        answer.getMessageEvaluationContext().setDestination(getActiveMQDestination());
-        answer.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
-        return answer;
-    }
-
-    final void sendMessage(final Message msg) throws Exception {
-        messagesLock.writeLock().lock();
-        try{
-            messages.addMessageLast(msg);
-        }finally {
-            messagesLock.writeLock().unlock();
-        }
-    }
-    
-    final void messageSent(final ConnectionContext context, final Message msg) throws Exception {     
-        destinationStatistics.getEnqueues().increment();
-        destinationStatistics.getMessages().increment();
-        messageDelivered(context, msg);
-        consumersLock.readLock().lock();
-        try {
-            if (consumers.isEmpty()) {
-                onMessageWithNoConsumers(context, msg);
-            }
-        }finally {
-            consumersLock.readLock().unlock();
-        }
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Message " + msg.getMessageId() + " sent to " + this.destination);
-        }
-        wakeup();
-    }
-
-    public void wakeup() {
-        if (optimizedDispatch || isSlave()) {
-            iterate();
-            pendingWakeups.incrementAndGet();
-        } else {
-            asyncWakeup();
-        }
-    }
-
-    private void asyncWakeup() {
-        try {
-            pendingWakeups.incrementAndGet();
-            this.taskRunner.wakeup();
-        } catch (InterruptedException e) {
-            LOG.warn("Async task tunner failed to wakeup ", e);
-        }
-    }
-
-    private boolean isSlave() {
-        return broker.getBrokerService().isSlave();
-    }
-
-    private void doPageIn(boolean force) throws Exception {
-        List<QueueMessageReference> newlyPaged = doPageInForDispatch(force);
-        pagedInPendingDispatchLock.writeLock().lock();
-        try {
-            if (pagedInPendingDispatch.isEmpty()) {
-                pagedInPendingDispatch.addAll(newlyPaged);
-            } else {
-                for (QueueMessageReference qmr : newlyPaged) {
-                    if (!pagedInPendingDispatch.contains(qmr)) {
-                        pagedInPendingDispatch.add(qmr);
-                    }
-                }
-            }
-        } finally {
-            pagedInPendingDispatchLock.writeLock().unlock();
-        }
-    }
-
-    private List<QueueMessageReference> doPageInForDispatch(boolean force) throws Exception {
-        List<QueueMessageReference> result = null;
-        List<QueueMessageReference> resultList = null;
-
-        int toPageIn = Math.min(getMaxPageSize(), messages.size());
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(destination.getPhysicalName() + " toPageIn: " + toPageIn + ", Inflight: "
-                    + destinationStatistics.getInflight().getCount() + ", pagedInMessages.size "
-                    + pagedInMessages.size() + ", enqueueCount: " + destinationStatistics.getEnqueues().getCount()
-                    + ", dequeueCount: " + destinationStatistics.getDequeues().getCount());
-        }
-
-        if (isLazyDispatch() && !force) {
-            // Only page in the minimum number of messages which can be
-            // dispatched immediately.
-            toPageIn = Math.min(getConsumerMessageCountBeforeFull(), toPageIn);
-        }
-        int pagedInPendingSize = 0;
-        pagedInPendingDispatchLock.readLock().lock();
-        try {
-            pagedInPendingSize = pagedInPendingDispatch.size();
-        } finally {
-            pagedInPendingDispatchLock.readLock().unlock();
-        }
-        if (toPageIn > 0 && (force || (!consumers.isEmpty() && pagedInPendingSize < getMaxPageSize()))) {
-            int count = 0;
-            result = new ArrayList<QueueMessageReference>(toPageIn);
-            messagesLock.writeLock().lock();
-            try {
-                try {
-                    messages.setMaxBatchSize(toPageIn);
-                    messages.reset();
-                    while (messages.hasNext() && count < toPageIn) {
-                        MessageReference node = messages.next();
-                        messages.remove();
-
-                        QueueMessageReference ref = createMessageReference(node.getMessage());
-                        if (ref.isExpired()) {
-                            if (broker.isExpired(ref)) {
-                                messageExpired(createConnectionContext(), ref);
-                            } else {
-                                ref.decrementReferenceCount();
-                            }
-                        } else {
-                            result.add(ref);
-                            count++;
-                        }
-                    }
-                } finally {
-                    messages.release();
-                }
-            } finally {
-                messagesLock.writeLock().unlock();
-            }
-            // Only add new messages, not already pagedIn to avoid multiple
-            // dispatch attempts
-            pagedInMessagesLock.writeLock().lock();
-            try {
-                resultList = new ArrayList<QueueMessageReference>(result.size());
-                for (QueueMessageReference ref : result) {
-                    if (!pagedInMessages.containsKey(ref.getMessageId())) {            
-                        pagedInMessages.put(ref.getMessageId(), ref);
-                        resultList.add(ref);
-                    } else {
-                        ref.decrementReferenceCount();
-                    }
-                }
-            } finally {
-                pagedInMessagesLock.writeLock().unlock();
-            }
-        } else {
-            // Avoid return null list, if condition is not validated
-            resultList = new ArrayList<QueueMessageReference>();
-        }
-
-        return resultList;
-    }
-
-    private void doDispatch(List<QueueMessageReference> list) throws Exception {
-        boolean doWakeUp = false;
-
-        pagedInPendingDispatchLock.writeLock().lock();
-        try {
-            if (!redeliveredWaitingDispatch.isEmpty()) {
-                // Try first to dispatch redelivered messages to keep an
-                // proper order
-                redeliveredWaitingDispatch = doActualDispatch(redeliveredWaitingDispatch);
-            }
-            if (!pagedInPendingDispatch.isEmpty()) {
-                // Next dispatch anything that had not been
-                // dispatched before.
-                pagedInPendingDispatch = doActualDispatch(pagedInPendingDispatch);
-            }
-            // and now see if we can dispatch the new stuff.. and append to
-            // the pending
-            // list anything that does not actually get dispatched.
-            if (list != null && !list.isEmpty()) {
-                if (pagedInPendingDispatch.isEmpty()) {
-                    pagedInPendingDispatch.addAll(doActualDispatch(list));
-                } else {
-                    for (QueueMessageReference qmr : list) {
-                        if (!pagedInPendingDispatch.contains(qmr)) {
-                            pagedInPendingDispatch.add(qmr);
-                        }
-                    }
-                    doWakeUp = true;
-                }
-            }
-        } finally {
-            pagedInPendingDispatchLock.writeLock().unlock();
-        }
-
-        if (doWakeUp) {
-            // avoid lock order contention
-            asyncWakeup();
-        }
-    }
-
-    /**
-     * @return list of messages that could get dispatched to consumers if they
-     *         were not full.
-     */
-    private List<QueueMessageReference> doActualDispatch(List<QueueMessageReference> list) throws Exception {
-        List<Subscription> consumers;
-        consumersLock.writeLock().lock();
-        try {
-            if (this.consumers.isEmpty() || isSlave()) {
-                // slave dispatch happens in processDispatchNotification
-                return list;
-            }
-            consumers = new ArrayList<Subscription>(this.consumers);
-        }finally {
-            consumersLock.writeLock().unlock();
-        }
-
-        List<QueueMessageReference> rc = new ArrayList<QueueMessageReference>(list.size());
-        Set<Subscription> fullConsumers = new HashSet<Subscription>(this.consumers.size());
-
-        for (MessageReference node : list) {
-            Subscription target = null;
-            int interestCount = 0;
-            for (Subscription s : consumers) {
-                if (s instanceof QueueBrowserSubscription) {
-                    interestCount++;
-                    continue;
-                }
-                if (dispatchSelector.canSelect(s, node)) {
-                    if (!fullConsumers.contains(s)) {
-                        if (!s.isFull()) {
-                            if (assignMessageGroup(s, (QueueMessageReference)node)) {
-                                // Dispatch it.
-                                s.add(node);
-                                target = s;
-                                break;
-                            }
-                        } else {
-                            // no further dispatch of list to a full consumer to
-                            // avoid out of order message receipt
-                            fullConsumers.add(s);
-                        }
-                    }
-                    interestCount++;
-                } else {
-                    // makes sure it gets dispatched again
-                    if (!node.isDropped() && !((QueueMessageReference) node).isAcked()
-                            && (!node.isDropped() || s.getConsumerInfo().isBrowser())) {
-                        interestCount++;
-                    }
-                }
-            }
-
-            if ((target == null && interestCount > 0) || consumers.size() == 0) {
-                // This means all subs were full or that there are no
-                // consumers...
-                rc.add((QueueMessageReference) node);
-            }
-
-            // If it got dispatched, rotate the consumer list to get round robin
-            // distribution.
-            if (target != null && !strictOrderDispatch && consumers.size() > 1
-                    && !dispatchSelector.isExclusiveConsumer(target)) {
-                consumersLock.writeLock().lock();
-                try {
-                    if (removeFromConsumerList(target)) {
-                        addToConsumerList(target);
-                        consumers = new ArrayList<Subscription>(this.consumers);
-                    }
-                }finally {
-                    consumersLock.writeLock().unlock();
-                }
-            }
-        }
-
-        return rc;
-    }
-
-    protected boolean assignMessageGroup(Subscription subscription, QueueMessageReference node) throws Exception {
-        //QueueMessageReference node = (QueueMessageReference) m;
-        boolean result = true;
-        // Keep message groups together.
-        String groupId = node.getGroupID();
-        int sequence = node.getGroupSequence();
-        if (groupId != null) {
-            //MessageGroupMap messageGroupOwners = ((Queue) node
-            //        .getRegionDestination()).getMessageGroupOwners();
-
-            MessageGroupMap messageGroupOwners = getMessageGroupOwners();
-            // If we can own the first, then no-one else should own the
-            // rest.
-            if (sequence == 1) {
-                assignGroup(subscription, messageGroupOwners, node, groupId);
-            } else {
-
-                // Make sure that the previous owner is still valid, we may
-                // need to become the new owner.
-                ConsumerId groupOwner;
-
-                groupOwner = messageGroupOwners.get(groupId);
-                if (groupOwner == null) {
-                    assignGroup(subscription, messageGroupOwners, node, groupId);
-                } else {
-                    if (groupOwner.equals(subscription.getConsumerInfo().getConsumerId())) {
-                        // A group sequence < 1 is an end of group signal.
-                        if (sequence < 0) {
-                            messageGroupOwners.removeGroup(groupId);
-                        }
-                    } else {
-                        result = false;
-                    }
-                }
-            }
-        }
-
-        return result;
-
-    }
-
-    protected void assignGroup(Subscription subs, MessageGroupMap messageGroupOwners, MessageReference n, String groupId) throws IOException {
-        messageGroupOwners.put(groupId, subs.getConsumerInfo().getConsumerId());
-        Message message = n.getMessage();
-        if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage activeMessage = (ActiveMQMessage) message;
-            try {
-                activeMessage.setBooleanProperty("JMSXGroupFirstForConsumer", true, false);
-            } catch (JMSException e) {
-                LOG.warn("Failed to set boolean header: " + e, e);
-            }
-        }
-    }
-
-    protected void pageInMessages(boolean force) throws Exception {
-        doDispatch(doPageInForDispatch(force));
-    }
-
-    private void addToConsumerList(Subscription sub) {
-        if (useConsumerPriority) {
-            consumers.add(sub);
-            Collections.sort(consumers, orderedCompare);
-        } else {
-            consumers.add(sub);
-        }
-    }
-
-    private boolean removeFromConsumerList(Subscription sub) {
-        return consumers.remove(sub);
-    }
-
-    private int getConsumerMessageCountBeforeFull() throws Exception {
-        int total = 0;
-        boolean zeroPrefetch = false;
-        consumersLock.readLock().lock();
-        try{
-            for (Subscription s : consumers) {
-                zeroPrefetch |= s.getPrefetchSize() == 0;
-                int countBeforeFull = s.countBeforeFull();
-                total += countBeforeFull;
-            }
-        }finally {
-            consumersLock.readLock().unlock();
-        }
-        if (total == 0 && zeroPrefetch) {
-            total = 1;
-        }
-        return total;
-    }
-
-    /*
-     * In slave mode, dispatch is ignored till we get this notification as the
-     * dispatch process is non deterministic between master and slave. On a
-     * notification, the actual dispatch to the subscription (as chosen by the
-     * master) is completed. (non-Javadoc)
-     * @see
-     * org.apache.activemq.broker.region.BaseDestination#processDispatchNotification
-     * (org.apache.activemq.command.MessageDispatchNotification)
-     */
-    @Override
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        // do dispatch
-        Subscription sub = getMatchingSubscription(messageDispatchNotification);
-        if (sub != null) {
-            MessageReference message = getMatchingMessage(messageDispatchNotification);
-            sub.add(message);
-            sub.processMessageDispatchNotification(messageDispatchNotification);
-        }
-    }
-
-    private QueueMessageReference getMatchingMessage(MessageDispatchNotification messageDispatchNotification)
-            throws Exception {
-        QueueMessageReference message = null;
-        MessageId messageId = messageDispatchNotification.getMessageId();
-
-        pagedInPendingDispatchLock.writeLock().lock();
-        try {
-            for (QueueMessageReference ref : pagedInPendingDispatch) {
-                if (messageId.equals(ref.getMessageId())) {
-                    message = ref;
-                    pagedInPendingDispatch.remove(ref);
-                    break;
-                }
-            }
-        } finally {
-            pagedInPendingDispatchLock.writeLock().unlock();
-        }
-
-        if (message == null) {
-            pagedInMessagesLock.readLock().lock();
-            try {
-                message = pagedInMessages.get(messageId);
-            } finally {
-                pagedInMessagesLock.readLock().unlock();
-            }
-        }
-
-        if (message == null) {
-            messagesLock.writeLock().lock();
-            try {
-                try {
-                    messages.setMaxBatchSize(getMaxPageSize());
-                    messages.reset();
-                    while (messages.hasNext()) {
-                        MessageReference node = messages.next();
-                        messages.remove();
-                        if (messageId.equals(node.getMessageId())) {
-                            message = this.createMessageReference(node.getMessage());
-                            break;
-                        }
-                    }
-                } finally {
-                    messages.release();
-                }
-            } finally {
-                messagesLock.writeLock().unlock();
-            }
-        }
-
-        if (message == null) {
-            Message msg = loadMessage(messageId);
-            if (msg != null) {
-                message = this.createMessageReference(msg);
-            }
-        }
-
-        if (message == null) {
-            throw new JMSException("Slave broker out of sync with master - Message: "
-                    + messageDispatchNotification.getMessageId() + " on "
-                    + messageDispatchNotification.getDestination() + " does not exist among pending("
-                    + pagedInPendingDispatch.size() + ") for subscription: "
-                    + messageDispatchNotification.getConsumerId());
-        }
-        return message;
-    }
-
-    /**
-     * Find a consumer that matches the id in the message dispatch notification
-     * 
-     * @param messageDispatchNotification
-     * @return sub or null if the subscription has been removed before dispatch
-     * @throws JMSException
-     */
-    private Subscription getMatchingSubscription(MessageDispatchNotification messageDispatchNotification)
-            throws JMSException {
-        Subscription sub = null;
-        consumersLock.readLock().lock();
-        try {
-            for (Subscription s : consumers) {
-                if (messageDispatchNotification.getConsumerId().equals(s.getConsumerInfo().getConsumerId())) {
-                    sub = s;
-                    break;
-                }
-            }
-        }finally {
-            consumersLock.readLock().unlock();
-        }
-        return sub;
-    }
-
-    public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
-        if (oldPercentUsage > newPercentUsage) {
-            asyncWakeup();
-        }
-    }
-
-    @Override
-    protected Logger getLog() {
-        return LOG;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java
deleted file mode 100755
index 2115b6b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import javax.jms.InvalidSelectorException;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.usage.SystemUsage;
-
-public class QueueBrowserSubscription extends QueueSubscription {
-
-    int queueRefs;
-    boolean browseDone;
-    boolean destinationsAdded;
-
-    public QueueBrowserSubscription(Broker broker,SystemUsage usageManager, ConnectionContext context, ConsumerInfo info)
-        throws InvalidSelectorException {
-        super(broker,usageManager, context, info);
-    }
-
-    protected boolean canDispatch(MessageReference node) {
-        return !((QueueMessageReference)node).isAcked();
-    }
-
-    public synchronized String toString() {
-        return "QueueBrowserSubscription:" + " consumer=" + info.getConsumerId() + ", destinations="
-               + destinations.size() + ", dispatched=" + dispatched.size() + ", delivered="
-               + this.prefetchExtension + ", pending=" + getPendingQueueSize();
-    }
-
-    synchronized public void destinationsAdded() throws Exception {
-        destinationsAdded = true;
-        checkDone();
-    }
-
-    private void checkDone() throws Exception {
-        if( !browseDone && queueRefs == 0 && destinationsAdded) {
-            browseDone=true;
-            add(QueueMessageReference.NULL_MESSAGE);
-        }
-    }
-
-    public boolean matches(MessageReference node, MessageEvaluationContext context) throws IOException {
-        return !browseDone && super.matches(node, context);
-    }
-
-    /**
-     * Since we are a browser we don't really remove the message from the queue.
-     */
-    protected void acknowledge(ConnectionContext context, final MessageAck ack, final MessageReference n)
-        throws IOException {
-    	if (info.isNetworkSubscription()) {
-    		super.acknowledge(context, ack, n);
-    	}
-    }
-
-    synchronized public void incrementQueueRef() {
-        queueRefs++;        
-    }
-
-    synchronized public void decrementQueueRef() throws Exception {
-        queueRefs--;
-        checkDone();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueDispatchSelector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueDispatchSelector.java
deleted file mode 100644
index 4b9d030..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueDispatchSelector.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.region.group.MessageGroupMap;
-import org.apache.activemq.broker.region.policy.SimpleDispatchSelector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Queue dispatch policy that determines if a message can be sent to a subscription
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class QueueDispatchSelector extends SimpleDispatchSelector {
-    private static final Logger LOG = LoggerFactory.getLogger(QueueDispatchSelector.class);
-    private Subscription exclusiveConsumer;
-   
-   
-    /**
-     * @param destination
-     */
-    public QueueDispatchSelector(ActiveMQDestination destination) {
-        super(destination);
-    }
-    
-    public Subscription getExclusiveConsumer() {
-        return exclusiveConsumer;
-    }
-    public void setExclusiveConsumer(Subscription exclusiveConsumer) {
-        this.exclusiveConsumer = exclusiveConsumer;
-    }
-    
-    public boolean isExclusiveConsumer(Subscription s) {
-        return s == this.exclusiveConsumer;
-    }
-    
-       
-    public boolean canSelect(Subscription subscription,
-            MessageReference m) throws Exception {
-       
-        boolean result =  super.canDispatch(subscription, m);
-        if (result && !subscription.isBrowser()) {
-            result = exclusiveConsumer == null || exclusiveConsumer == subscription;
-        }
-        return result;
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueMessageReference.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueMessageReference.java
deleted file mode 100644
index 21d43e4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueMessageReference.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.broker.region;
-
-/**
- * Queue specific MessageReference.
- * 
- * @author fateev@amazon.com
- * 
- */
-public interface QueueMessageReference extends MessageReference {
-
-    QueueMessageReference NULL_MESSAGE = new NullMessageReference();
-
-    boolean isAcked();
-    
-    void setAcked(boolean b);
-    
-    void drop();
- 
-    boolean isDropped();
-        
-    boolean lock(LockOwner subscription);
-    
-    boolean unlock();
-    
-    LockOwner getLockOwner();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java
deleted file mode 100755
index 05aa633..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * 
- * 
- */
-public class QueueRegion extends AbstractRegion {
-
-    public QueueRegion(RegionBroker broker, DestinationStatistics destinationStatistics,
-                       SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                       DestinationFactory destinationFactory) {
-        super(broker, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    public String toString() {
-        return "QueueRegion: destinations=" + destinations.size() + ", subscriptions=" + subscriptions.size()
-               + ", memory=" + usageManager.getMemoryUsage().getPercentUsage() + "%";
-    }
-
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info)
-        throws JMSException {
-        ActiveMQDestination destination = info.getDestination();
-        PolicyEntry entry = null;
-        if (destination != null && broker.getDestinationPolicy() != null) {
-            entry = broker.getDestinationPolicy().getEntryFor(destination);
-            
-        }
-        if (info.isBrowser()) {
-            QueueBrowserSubscription sub = new QueueBrowserSubscription(broker,usageManager, context, info);
-            if (entry != null) {
-                entry.configure(broker, usageManager, sub);
-            }
-            return sub;
-        } else {
-            QueueSubscription sub =   new QueueSubscription(broker, usageManager,context, info);
-            if (entry != null) {
-                entry.configure(broker, usageManager, sub);
-            }
-            return sub;
-        }
-    }
-
-    protected Set<ActiveMQDestination> getInactiveDestinations() {
-        Set<ActiveMQDestination> inactiveDestinations = super.getInactiveDestinations();
-        for (Iterator<ActiveMQDestination> iter = inactiveDestinations.iterator(); iter.hasNext();) {
-            ActiveMQDestination dest = iter.next();
-            if (!dest.isQueue()) {
-                iter.remove();
-            }
-        }
-        return inactiveDestinations;
-    }
-    
-    /*
-     * For a Queue, dispatch order is imperative to match acks, so the dispatch is deferred till 
-     * the notification to ensure that the subscription chosen by the master is used.
-     * 
-     * (non-Javadoc)
-     * @see org.apache.activemq.broker.region.AbstractRegion#processDispatchNotification(org.apache.activemq.command.MessageDispatchNotification)
-     */
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        processDispatchNotificationViaDestination(messageDispatchNotification);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
deleted file mode 100755
index 40a4f70..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.group.MessageGroupMap;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class QueueSubscription extends PrefetchSubscription implements LockOwner {
-
-    private static final Logger LOG = LoggerFactory.getLogger(QueueSubscription.class);
-
-    public QueueSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info) throws InvalidSelectorException {
-        super(broker,usageManager, context, info);
-    }
-
-    /**
-     * In the queue case, mark the node as dropped and then a gc cycle will
-     * remove it from the queue.
-     * 
-     * @throws IOException
-     */
-    protected void acknowledge(final ConnectionContext context, final MessageAck ack, final MessageReference n) throws IOException {
-        final Destination q = n.getRegionDestination();
-        final QueueMessageReference node = (QueueMessageReference)n;
-        final Queue queue = (Queue)q;
-        
-        if (n.isExpired()) {
-            // sync with message expiry processing
-            if (!broker.isExpired(n)) {
-                LOG.warn("ignoring ack " + ack + ", for already expired message: " + n);
-                return;
-            }
-        }
-        queue.removeMessage(context, this, node, ack);
-    }
-
-    protected boolean canDispatch(MessageReference n) throws IOException {
-        boolean result = true;
-        QueueMessageReference node = (QueueMessageReference)n;
-        if (node.isAcked() || node.isDropped()) {
-            result = false;
-        }
-        result = result && (isBrowser() || node.lock(this));
-        return result;
-    }
-
-    /**
-     * Assigns the message group to this subscription and set the flag on the
-     * message that it is the first message to be dispatched.
-     */
-    protected void assignGroupToMe(MessageGroupMap messageGroupOwners, MessageReference n, String groupId) throws IOException {
-        messageGroupOwners.put(groupId, info.getConsumerId());
-        Message message = n.getMessage();
-        if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage activeMessage = (ActiveMQMessage)message;
-            try {
-                activeMessage.setBooleanProperty("JMSXGroupFirstForConsumer", true, false);
-            } catch (JMSException e) {
-                LOG.warn("Failed to set boolean header: " + e, e);
-            }
-        }
-    }
-
-    public synchronized String toString() {
-        return "QueueSubscription:" + " consumer=" + info.getConsumerId() + ", destinations=" + destinations.size() + ", dispatched=" + dispatched.size() + ", delivered="
-               + this.prefetchExtension + ", pending=" + getPendingQueueSize();
-    }
-
-    public int getLockPriority() {
-        return info.getPriority();
-    }
-
-    public boolean isLockExclusive() {
-        return info.isExclusive();
-    }
-
-    /**
-     */
-    public void destroy() {
-        setSlowConsumer(false);
-    }
-
-   
-    protected boolean isDropped(MessageReference node) {
-       boolean result = false;
-       if(node instanceof IndirectMessageReference) {
-           QueueMessageReference qmr = (QueueMessageReference) node;
-           result = qmr.isDropped();
-       }
-       return result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java
deleted file mode 100755
index 4333632..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.util.Map;
-import java.util.Set;
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-
-/**
- * A Region is used to implement the different QOS options available to 
- * a broker.  A Broker is composed of multiple message processing Regions that
- * provide different QOS options.
- * 
- * 
- */
-public interface Region extends Service {
-
-    /**
-     * Used to create a destination.  Usually, this method is invoked as a side-effect of sending
-     * a message to a destination that does not exist yet.
-     * 
-     * @param context
-     * @param destination the destination to create.
-     * @param createIfTemporary 
-     * @return TODO
-     * @throws Exception TODO
-     */
-    Destination addDestination(ConnectionContext context, ActiveMQDestination destination, boolean createIfTemporary) throws Exception;
-    
-    /**
-     * Used to destroy a destination.  
-     * This should try to quiesce use of the destination up to the timeout allotted time before removing the destination.
-     * This will remove all persistent messages associated with the destination.
-     * 
-     * @param context the environment the operation is being executed under.
-     * @param destination what is being removed from the broker.
-     * @param timeout the max amount of time to wait for the destination to quiesce
-     * @throws Exception TODO
-     */
-    void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception;
-
-    /**
-     * Returns a copy of the current destinations available in the region
-     * 
-     * @return a copy of the regions currently active at the time of the call with the key the destination and the value the Destination.
-     */
-    Map<ActiveMQDestination, Destination> getDestinationMap();
-    
-
-    /**
-     * Adds a consumer.
-     * @param context the environment the operation is being executed under.
-     * @return TODO
-     * @throws Exception TODO
-     */
-    Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception;
-
-    /**
-     * Removes a consumer.
-     * @param context the environment the operation is being executed under.
-     * @throws Exception TODO
-     */
-    void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception;
-    
-    /**
-     * Adds a Producer.
-     * @param context the environment the operation is being executed under.
-     * @throws Exception TODO
-     */
-    void addProducer(ConnectionContext context, ProducerInfo info) throws Exception;
-
-    /**
-     * Removes a Producer.
-     * @param context the environment the operation is being executed under.
-     * @throws Exception TODO
-     */
-    void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception;
-
-
-    /**
-     * Deletes a durable subscription.
-     * @param context the environment the operation is being executed under.
-     * @param info TODO
-     * @throws Exception TODO
-     */
-    void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception;
-    
-    /**
-     * Send a message to the broker to using the specified destination.  The destination specified
-     * in the message does not need to match the destination the message is sent to.  This is 
-     * handy in case the message is being sent to a dead letter destination.
-     * @param producerExchange the environment the operation is being executed under.
-     * @param message 
-     * @throws Exception TODO
-     */
-    void send(ProducerBrokerExchange producerExchange, Message message) throws Exception;
-    
-    /**
-     * Used to acknowledge the receipt of a message by a client.
-     * @param consumerExchange the environment the operation is being executed under.
-     * @throws Exception TODO
-     */
-    void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception;
-    
-    /**
-     * Allows a consumer to pull a message from a queue
-     */
-    Response messagePull(ConnectionContext context, MessagePull pull) throws Exception;
-
-    /**
-     * Process a notification of a dispatch - used by a Slave Broker
-     * @param messageDispatchNotification
-     * @throws Exception TODO
-     */
-    void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception;
-
-    void gc();
-
-    /**
-     * Provide an exact or wildcard lookup of destinations in the region
-     * 
-     * @return a set of matching destination objects.
-     */
-    Set <Destination>getDestinations(ActiveMQDestination destination);
-    
-    void processConsumerControl(ConsumerBrokerExchange consumerExchange, ConsumerControl control);
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
deleted file mode 100755
index 0b7e62a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
+++ /dev/null
@@ -1,967 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ThreadPoolExecutor;
-import javax.jms.InvalidClientIDException;
-import javax.jms.JMSException;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.Connection;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.EmptyBroker;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.state.ConnectionState;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.BrokerSupport;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.InetAddressUtil;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Routes Broker operations to the correct messaging regions for processing.
- * 
- * 
- */
-public class RegionBroker extends EmptyBroker {
-    public static final String ORIGINAL_EXPIRATION = "originalExpiration";
-    private static final Logger LOG = LoggerFactory.getLogger(RegionBroker.class);
-    private static final IdGenerator BROKER_ID_GENERATOR = new IdGenerator();
-
-    protected final DestinationStatistics destinationStatistics = new DestinationStatistics();
-    protected DestinationFactory destinationFactory;
-    protected final Map<ConnectionId, ConnectionState> connectionStates = Collections.synchronizedMap(new HashMap<ConnectionId, ConnectionState>());
-
-    private final Region queueRegion;
-    private final Region topicRegion;
-    private final Region tempQueueRegion;
-    private final Region tempTopicRegion;
-    protected final BrokerService brokerService;
-    private boolean started;
-    private boolean keepDurableSubsActive;
-
-    private final CopyOnWriteArrayList<Connection> connections = new CopyOnWriteArrayList<Connection>();
-    private final Map<ActiveMQDestination, Destination> destinations = new ConcurrentHashMap<ActiveMQDestination, Destination>();
-    private final Map<BrokerId, BrokerInfo> brokerInfos = new HashMap<BrokerId, BrokerInfo>();
-
-    private final LongSequenceGenerator sequenceGenerator = new LongSequenceGenerator();
-    private BrokerId brokerId;
-    private String brokerName;
-    private final Map<String, ConnectionContext> clientIdSet = new HashMap<String, ConnectionContext>();
-    private final DestinationInterceptor destinationInterceptor;
-    private ConnectionContext adminConnectionContext;
-    private final Scheduler scheduler;
-    private final ThreadPoolExecutor executor;
-    
-    private final Runnable purgeInactiveDestinationsTask = new Runnable() {
-        public void run() {
-            purgeInactiveDestinations();
-        }
-    };
-
-    public RegionBroker(BrokerService brokerService, TaskRunnerFactory taskRunnerFactory, SystemUsage memoryManager, DestinationFactory destinationFactory,
-                        DestinationInterceptor destinationInterceptor,Scheduler scheduler,ThreadPoolExecutor executor) throws IOException {
-        this.brokerService = brokerService;
-        this.executor=executor;
-        this.scheduler = scheduler;
-        if (destinationFactory == null) {
-            throw new IllegalArgumentException("null destinationFactory");
-        }
-        this.sequenceGenerator.setLastSequenceId(destinationFactory.getLastMessageBrokerSequenceId());
-        this.destinationFactory = destinationFactory;
-        queueRegion = createQueueRegion(memoryManager, taskRunnerFactory, destinationFactory);
-        topicRegion = createTopicRegion(memoryManager, taskRunnerFactory, destinationFactory);
-        this.destinationInterceptor = destinationInterceptor;
-        tempQueueRegion = createTempQueueRegion(memoryManager, taskRunnerFactory, destinationFactory);
-        tempTopicRegion = createTempTopicRegion(memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    @Override
-    public Map<ActiveMQDestination, Destination> getDestinationMap() {
-        Map<ActiveMQDestination, Destination> answer = getQueueRegion().getDestinationMap();
-        answer.putAll(getTopicRegion().getDestinationMap());
-        return answer;
-    }
-
-    @Override
-    public Set <Destination> getDestinations(ActiveMQDestination destination) {
-        switch (destination.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            return queueRegion.getDestinations(destination);
-        case ActiveMQDestination.TOPIC_TYPE:
-            return topicRegion.getDestinations(destination);
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            return tempQueueRegion.getDestinations(destination);
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            return tempTopicRegion.getDestinations(destination);
-        default:
-            return Collections.emptySet();
-        }
-    }
-
-    @Override
-    public Broker getAdaptor(Class type) {
-        if (type.isInstance(this)) {
-            return this;
-        }
-        return null;
-    }
-
-    public Region getQueueRegion() {
-        return queueRegion;
-    }
-
-    public Region getTempQueueRegion() {
-        return tempQueueRegion;
-    }
-
-    public Region getTempTopicRegion() {
-        return tempTopicRegion;
-    }
-
-    public Region getTopicRegion() {
-        return topicRegion;
-    }
-
-    protected Region createTempTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new TempTopicRegion(this, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    protected Region createTempQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new TempQueueRegion(this, brokerService, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    protected Region createTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new TopicRegion(this, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    protected Region createQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) {
-        return new QueueRegion(this, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-    }
-
-    @Override
-    public void start() throws Exception {
-        ((TopicRegion)topicRegion).setKeepDurableSubsActive(keepDurableSubsActive);
-        started = true;
-        queueRegion.start();
-        topicRegion.start();
-        tempQueueRegion.start();
-        tempTopicRegion.start();
-        int period = this.brokerService.getSchedulePeriodForDestinationPurge();
-        if (period > 0) {
-            this.scheduler.executePeriodically(purgeInactiveDestinationsTask, period);
-        }
-    }
-
-    @Override
-    public void stop() throws Exception {
-        started = false;
-        this.scheduler.cancel(purgeInactiveDestinationsTask);
-        ServiceStopper ss = new ServiceStopper();
-        doStop(ss);
-        ss.throwFirstException();
-        // clear the state
-        clientIdSet.clear();
-        connections.clear();
-        destinations.clear();
-        brokerInfos.clear();
-    }
-
-    public PolicyMap getDestinationPolicy() {
-        return brokerService != null ? brokerService.getDestinationPolicy() : null;
-    }
-
-    @Override
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        String clientId = info.getClientId();
-        if (clientId == null) {
-            throw new InvalidClientIDException("No clientID specified for connection request");
-        }
-        synchronized (clientIdSet) {
-            ConnectionContext oldContext = clientIdSet.get(clientId);
-            if (oldContext != null) {
-            	if (context.isFaultTolerant() || context.isNetworkConnection()){
-            		//remove the old connection
-            		try{
-            			removeConnection(oldContext, info, new Exception("remove stale client"));
-            		}catch(Exception e){
-            			LOG.warn("Failed to remove stale connection ",e);
-            		}
-            	}else{
-                throw new InvalidClientIDException("Broker: " + getBrokerName() + " - Client: " + clientId + " already connected from "
-                                                   + oldContext.getConnection().getRemoteAddress());
-            	}
-            } else {
-                clientIdSet.put(clientId, context);
-            }
-        }
-
-        connections.add(context.getConnection());
-    }
-
-    @Override
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        String clientId = info.getClientId();
-        if (clientId == null) {
-            throw new InvalidClientIDException("No clientID specified for connection disconnect request");
-        }
-        synchronized (clientIdSet) {
-            ConnectionContext oldValue = clientIdSet.get(clientId);
-            // we may be removing the duplicate connection, not the first
-            // connection to be created
-            // so lets check that their connection IDs are the same
-            if (oldValue == context) {
-                if (isEqual(oldValue.getConnectionId(), info.getConnectionId())) {
-                    clientIdSet.remove(clientId);
-                }
-            }
-        }
-        connections.remove(context.getConnection());
-    }
-
-    protected boolean isEqual(ConnectionId connectionId, ConnectionId connectionId2) {
-        return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2));
-    }
-
-    @Override
-    public Connection[] getClients() throws Exception {
-        ArrayList<Connection> l = new ArrayList<Connection>(connections);
-        Connection rc[] = new Connection[l.size()];
-        l.toArray(rc);
-        return rc;
-    }
-
-    @Override
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean create) throws Exception {
-
-        Destination answer;
-
-        answer = destinations.get(destination);
-        if (answer != null) {
-            return answer;
-        }
-
-        switch (destination.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            answer = queueRegion.addDestination(context, destination,true);
-            break;
-        case ActiveMQDestination.TOPIC_TYPE:
-            answer = topicRegion.addDestination(context, destination,true);
-            break;
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            answer = tempQueueRegion.addDestination(context, destination,create);
-            break;
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            answer = tempTopicRegion.addDestination(context, destination,create);
-            break;
-        default:
-            throw createUnknownDestinationTypeException(destination);
-        }
-
-        destinations.put(destination, answer);
-        return answer;
-
-    }
-
-    @Override
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-
-        if (destinations.containsKey(destination)) {
-            switch (destination.getDestinationType()) {
-            case ActiveMQDestination.QUEUE_TYPE:
-                queueRegion.removeDestination(context, destination, timeout);
-                removeAdvisoryTopics("Queue.", context, destination, timeout);
-                break;
-            case ActiveMQDestination.TOPIC_TYPE:
-                topicRegion.removeDestination(context, destination, timeout);
-                removeAdvisoryTopics("Topic.", context, destination, timeout);
-                break;
-            case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                tempQueueRegion.removeDestination(context, destination, timeout);
-                break;
-            case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                tempTopicRegion.removeDestination(context, destination, timeout);
-                break;
-            default:
-                throw createUnknownDestinationTypeException(destination);
-            }
-            destinations.remove(destination);
-
-        }
-
-    }
-
-    public void removeAdvisoryTopics(String destinationType, ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        if (this.brokerService.isAdvisorySupport()) {
-            String producerAdvisoryTopic = AdvisorySupport.PRODUCER_ADVISORY_TOPIC_PREFIX + destinationType + destination.getPhysicalName();
-            String consumerAdvisoryTopic = AdvisorySupport.CONSUMER_ADVISORY_TOPIC_PREFIX + destinationType + destination.getPhysicalName();
-
-            ActiveMQDestination dests[] = getDestinations();
-            for (ActiveMQDestination dest: dests) {
-                String name = dest.getPhysicalName();
-                if ( name.equals(producerAdvisoryTopic) || name.equals(consumerAdvisoryTopic) ) {
-                    try {
-                        removeDestination(context, dest, timeout);
-                    } catch (JMSException ignore) {
-                        // at least ignore the Unknown Destination Type JMSException
-                    }
-                }
-            }
-        }
-    }
-
-    @Override
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        addDestination(context, info.getDestination(),true);
-
-    }
-
-    @Override
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        removeDestination(context, info.getDestination(), info.getTimeout());
-
-    }
-
-    @Override
-    public ActiveMQDestination[] getDestinations() throws Exception {
-        ArrayList<ActiveMQDestination> l;
-
-        l = new ArrayList<ActiveMQDestination>(getDestinationMap().keySet());
-
-        ActiveMQDestination rc[] = new ActiveMQDestination[l.size()];
-        l.toArray(rc);
-        return rc;
-    }
-
-    @Override
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        ActiveMQDestination destination = info.getDestination();
-        synchronized (purgeInactiveDestinationsTask) {
-            if (destination != null) {
-
-                // This seems to cause the destination to be added but without
-                // advisories firing...
-                context.getBroker().addDestination(context, destination, false);
-                switch (destination.getDestinationType()) {
-                case ActiveMQDestination.QUEUE_TYPE:
-                    queueRegion.addProducer(context, info);
-                    break;
-                case ActiveMQDestination.TOPIC_TYPE:
-                    topicRegion.addProducer(context, info);
-                    break;
-                case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                    tempQueueRegion.addProducer(context, info);
-                    break;
-                case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                    tempTopicRegion.addProducer(context, info);
-                    break;
-                }
-            }
-        }
-    }
-
-    @Override
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        ActiveMQDestination destination = info.getDestination();
-        synchronized (purgeInactiveDestinationsTask) {
-            if (destination != null) {
-                switch (destination.getDestinationType()) {
-                case ActiveMQDestination.QUEUE_TYPE:
-                    queueRegion.removeProducer(context, info);
-                    break;
-                case ActiveMQDestination.TOPIC_TYPE:
-                    topicRegion.removeProducer(context, info);
-                    break;
-                case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                    tempQueueRegion.removeProducer(context, info);
-                    break;
-                case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                    tempTopicRegion.removeProducer(context, info);
-                    break;
-                }
-            }
-        }
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        ActiveMQDestination destination = info.getDestination();
-        if (destinationInterceptor != null) {
-            destinationInterceptor.create(this, context, destination);
-        }
-        synchronized (purgeInactiveDestinationsTask) {
-            switch (destination.getDestinationType()) {
-            case ActiveMQDestination.QUEUE_TYPE:
-                return queueRegion.addConsumer(context, info);
-
-            case ActiveMQDestination.TOPIC_TYPE:
-                return topicRegion.addConsumer(context, info);
-
-            case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                return tempQueueRegion.addConsumer(context, info);
-
-            case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                return tempTopicRegion.addConsumer(context, info);
-
-            default:
-                throw createUnknownDestinationTypeException(destination);
-            }
-        }
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        ActiveMQDestination destination = info.getDestination();
-        synchronized (purgeInactiveDestinationsTask) {
-            switch (destination.getDestinationType()) {
-
-            case ActiveMQDestination.QUEUE_TYPE:
-                queueRegion.removeConsumer(context, info);
-                break;
-            case ActiveMQDestination.TOPIC_TYPE:
-                topicRegion.removeConsumer(context, info);
-                break;
-            case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                tempQueueRegion.removeConsumer(context, info);
-                break;
-            case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                tempTopicRegion.removeConsumer(context, info);
-                break;
-            default:
-                throw createUnknownDestinationTypeException(destination);
-            }
-        }
-    }
-
-    @Override
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        synchronized (purgeInactiveDestinationsTask) {
-            topicRegion.removeSubscription(context, info);
-        }
-    }
-
-    @Override
-    public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception {
-        message.setBrokerInTime(System.currentTimeMillis());
-        if (producerExchange.isMutable() || producerExchange.getRegion() == null
-                || (producerExchange.getRegion() != null && producerExchange.getRegion().getDestinationMap().get(message.getDestination()) == null)) {
-            ActiveMQDestination destination = message.getDestination();
-            // ensure the destination is registered with the RegionBroker
-            producerExchange.getConnectionContext().getBroker().addDestination(producerExchange.getConnectionContext(), destination,false);
-            Region region;
-            switch (destination.getDestinationType()) {
-            case ActiveMQDestination.QUEUE_TYPE:
-                region = queueRegion;
-                break;
-            case ActiveMQDestination.TOPIC_TYPE:
-                region = topicRegion;
-                break;
-            case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                region = tempQueueRegion;
-                break;
-            case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                region = tempTopicRegion;
-                break;
-            default:
-                throw createUnknownDestinationTypeException(destination);
-            }
-            producerExchange.setRegion(region);
-            producerExchange.setRegionDestination(null);
-        }
-        producerExchange.getRegion().send(producerExchange, message);
-    }
-
-    @Override
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        if (consumerExchange.isWildcard() || consumerExchange.getRegion() == null) {
-            ActiveMQDestination destination = ack.getDestination();
-            Region region;
-            switch (destination.getDestinationType()) {
-            case ActiveMQDestination.QUEUE_TYPE:
-                region = queueRegion;
-                break;
-            case ActiveMQDestination.TOPIC_TYPE:
-                region = topicRegion;
-                break;
-            case ActiveMQDestination.TEMP_QUEUE_TYPE:
-                region = tempQueueRegion;
-                break;
-            case ActiveMQDestination.TEMP_TOPIC_TYPE:
-                region = tempTopicRegion;
-                break;
-            default:
-                throw createUnknownDestinationTypeException(destination);
-            }
-            consumerExchange.setRegion(region);
-        }
-        consumerExchange.getRegion().acknowledge(consumerExchange, ack);
-    }
-
-    @Override
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
-        ActiveMQDestination destination = pull.getDestination();
-        switch (destination.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            return queueRegion.messagePull(context, pull);
-
-        case ActiveMQDestination.TOPIC_TYPE:
-            return topicRegion.messagePull(context, pull);
-
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            return tempQueueRegion.messagePull(context, pull);
-
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            return tempTopicRegion.messagePull(context, pull);
-        default:
-            throw createUnknownDestinationTypeException(destination);
-        }
-    }
-
-    @Override
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-        throw new IllegalAccessException("Transaction operation not implemented by this broker.");
-    }
-
-    @Override
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        throw new IllegalAccessException("Transaction operation not implemented by this broker.");
-    }
-
-    @Override
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        throw new IllegalAccessException("Transaction operation not implemented by this broker.");
-    }
-
-    @Override
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        throw new IllegalAccessException("Transaction operation not implemented by this broker.");
-    }
-
-    @Override
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        throw new IllegalAccessException("Transaction operation not implemented by this broker.");
-    }
-
-    @Override
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
-        throw new IllegalAccessException("Transaction operation not implemented by this broker.");
-    }
-
-    @Override
-    public void gc() {
-        queueRegion.gc();
-        topicRegion.gc();
-    }
-
-    @Override
-    public BrokerId getBrokerId() {
-        if (brokerId == null) {
-            brokerId = new BrokerId(BROKER_ID_GENERATOR.generateId());
-        }
-        return brokerId;
-    }
-
-    public void setBrokerId(BrokerId brokerId) {
-        this.brokerId = brokerId;
-    }
-
-    @Override
-    public String getBrokerName() {
-        if (brokerName == null) {
-            try {
-                brokerName = InetAddressUtil.getLocalHostName().toLowerCase();
-            } catch (Exception e) {
-                brokerName = "localhost";
-            }
-        }
-        return brokerName;
-    }
-
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-    }
-
-    public DestinationStatistics getDestinationStatistics() {
-        return destinationStatistics;
-    }
-
-    protected JMSException createUnknownDestinationTypeException(ActiveMQDestination destination) {
-        return new JMSException("Unknown destination type: " + destination.getDestinationType());
-    }
-
-    @Override
-    public synchronized void addBroker(Connection connection, BrokerInfo info) {
-        BrokerInfo existing = brokerInfos.get(info.getBrokerId());
-        if (existing == null) {
-            existing = info.copy();
-            existing.setPeerBrokerInfos(null);
-            brokerInfos.put(info.getBrokerId(), existing);
-        }
-        existing.incrementRefCount();
-        LOG.debug(getBrokerName() + " addBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
-        addBrokerInClusterUpdate();
-    }
-
-    @Override
-    public synchronized void removeBroker(Connection connection, BrokerInfo info) {
-        if (info != null) {
-            BrokerInfo existing = brokerInfos.get(info.getBrokerId());
-            if (existing != null && existing.decrementRefCount() == 0) {
-               brokerInfos.remove(info.getBrokerId());
-            }
-            LOG.debug(getBrokerName() + " removeBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
-            removeBrokerInClusterUpdate();
-        }
-    }
-
-    @Override
-    public synchronized BrokerInfo[] getPeerBrokerInfos() {
-        BrokerInfo[] result = new BrokerInfo[brokerInfos.size()];
-        result = brokerInfos.values().toArray(result);
-        return result;
-    }
-
-    @Override
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-        Message message = messageDispatch.getMessage();
-        if (message != null) {
-            long endTime = System.currentTimeMillis();
-            message.setBrokerOutTime(endTime);
-            if (getBrokerService().isEnableStatistics()) {
-                long totalTime = endTime - message.getBrokerInTime();
-                message.getRegionDestination().getDestinationStatistics().getProcessTime().addTime(totalTime);
-            }
-        }
-    }
-
-    @Override
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-    }
-
-    @Override
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        ActiveMQDestination destination = messageDispatchNotification.getDestination();
-        switch (destination.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            queueRegion.processDispatchNotification(messageDispatchNotification);
-            break;
-        case ActiveMQDestination.TOPIC_TYPE:
-            topicRegion.processDispatchNotification(messageDispatchNotification);
-            break;
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            tempQueueRegion.processDispatchNotification(messageDispatchNotification);
-            break;
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            tempTopicRegion.processDispatchNotification(messageDispatchNotification);
-            break;
-        default:
-            throw createUnknownDestinationTypeException(destination);
-        }
-    }
-
-    public boolean isSlaveBroker() {
-        return brokerService.isSlave();
-    }
-
-    @Override
-    public boolean isStopped() {
-        return !started;
-    }
-
-    @Override
-    public Set<ActiveMQDestination> getDurableDestinations() {
-        return destinationFactory.getDestinations();
-    }
-
-    protected void doStop(ServiceStopper ss) {
-        ss.stop(queueRegion);
-        ss.stop(topicRegion);
-        ss.stop(tempQueueRegion);
-        ss.stop(tempTopicRegion);
-    }
-
-    public boolean isKeepDurableSubsActive() {
-        return keepDurableSubsActive;
-    }
-
-    public void setKeepDurableSubsActive(boolean keepDurableSubsActive) {
-        this.keepDurableSubsActive = keepDurableSubsActive;
-    }
-
-    public DestinationInterceptor getDestinationInterceptor() {
-        return destinationInterceptor;
-    }
-
-    @Override
-    public ConnectionContext getAdminConnectionContext() {
-        return adminConnectionContext;
-    }
-
-    @Override
-    public void setAdminConnectionContext(ConnectionContext adminConnectionContext) {
-        this.adminConnectionContext = adminConnectionContext;
-    }
-
-    public Map<ConnectionId, ConnectionState> getConnectionStates() {
-        return connectionStates;
-    }
-
-    @Override
-    public PListStore getTempDataStore() {
-        return brokerService.getTempDataStore();
-    }
-
-    @Override
-    public URI getVmConnectorURI() {
-        return brokerService.getVmConnectorURI();
-    }
-
-    @Override
-    public void brokerServiceStarted() {
-    }
-
-    @Override
-    public BrokerService getBrokerService() {
-        return brokerService;
-    }
-
-    @Override
-    public boolean isExpired(MessageReference messageReference) {
-        boolean expired = false;
-        if (messageReference.isExpired()) {
-            try {
-                // prevent duplicate expiry processing
-                Message message = messageReference.getMessage();
-                synchronized (message) {
-                    expired = stampAsExpired(message);
-                }
-            } catch (IOException e) {
-                LOG.warn("unexpected exception on message expiry determination for: " + messageReference, e);
-            }
-        }
-        return expired;
-    }
-   
-    private boolean stampAsExpired(Message message) throws IOException {
-        boolean stamped=false;
-        if (message.getProperty(ORIGINAL_EXPIRATION) == null) {
-            long expiration=message.getExpiration();     
-            message.setProperty(ORIGINAL_EXPIRATION,new Long(expiration));
-            stamped = true;
-        }
-        return stamped;
-    }
-
-    
-    @Override
-    public void messageExpired(ConnectionContext context, MessageReference node, Subscription subscription) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Message expired " + node);
-        }
-        getRoot().sendToDeadLetterQueue(context, node, subscription);
-    }
-    
-    @Override
-    public void sendToDeadLetterQueue(ConnectionContext context,
-	        MessageReference node, Subscription subscription){
-		try{
-			if(node!=null){
-				Message message=node.getMessage();
-				if(message!=null && node.getRegionDestination()!=null){
-					DeadLetterStrategy deadLetterStrategy=node
-					        .getRegionDestination().getDeadLetterStrategy();
-					if(deadLetterStrategy!=null){
-						if(deadLetterStrategy.isSendToDeadLetterQueue(message)){
-						    // message may be inflight to other subscriptions so do not modify
-						    message = message.copy();
-						    stampAsExpired(message);
-						    message.setExpiration(0);
-						    if(!message.isPersistent()){
-							    message.setPersistent(true);
-							    message.setProperty("originalDeliveryMode",
-								        "NON_PERSISTENT");
-							}
-							// The original destination and transaction id do
-							// not get filled when the message is first sent,
-							// it is only populated if the message is routed to
-							// another destination like the DLQ
-							ActiveMQDestination deadLetterDestination=deadLetterStrategy
-							        .getDeadLetterQueueFor(message, subscription);
-							if (context.getBroker()==null) {
-								context.setBroker(getRoot());
-							}
-							BrokerSupport.resendNoCopy(context,message,
-							        deadLetterDestination);
-						}
-					} else {
-					    if (LOG.isDebugEnabled()) {
-					        LOG.debug("Dead Letter message with no DLQ strategy in place, message id: "
-                                    + message.getMessageId() + ", destination: " + message.getDestination());
-					    }
-					}
-				}
-			}
-		}catch(Exception e){
-			LOG.warn("Caught an exception sending to DLQ: "+node,e);
-		}
-	}
-
-    @Override
-    public Broker getRoot() {
-        try {
-            return getBrokerService().getBroker();
-        } catch (Exception e) {
-            LOG.error("Trying to get Root Broker " + e);
-            throw new RuntimeException("The broker from the BrokerService should not throw an exception");
-        }
-    }
-    
-    /**
-     * @return the broker sequence id
-     */
-    @Override
-    public long getBrokerSequenceId() {
-        synchronized(sequenceGenerator) {
-            return sequenceGenerator.getNextSequenceId();
-        }
-    }
-    
-    
-    @Override
-    public Scheduler getScheduler() {
-        return this.scheduler;
-    }
-    
-    public ThreadPoolExecutor getExecutor() {
-        return this.executor;
-    }
-    
-    @Override
-    public void processConsumerControl(ConsumerBrokerExchange consumerExchange, ConsumerControl control) {
-        ActiveMQDestination destination = control.getDestination();
-        switch (destination.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            queueRegion.processConsumerControl(consumerExchange, control);
-            break;
-
-        case ActiveMQDestination.TOPIC_TYPE:
-            topicRegion.processConsumerControl(consumerExchange, control);
-            break;
-            
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            tempQueueRegion.processConsumerControl(consumerExchange, control);
-            break;
-            
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            tempTopicRegion.processConsumerControl(consumerExchange, control);
-            break;
-            
-        default:
-            LOG.warn("unmatched destination: " + destination + ", in consumerControl: "  + control);
-        }
-    }
-    
-    protected void addBrokerInClusterUpdate() {
-        List<TransportConnector> connectors = this.brokerService.getTransportConnectors();
-        for (TransportConnector connector : connectors) {
-            if (connector.isUpdateClusterClients()) {
-                connector.updateClientClusterInfo();
-            }
-        }
-    }
-
-    protected void removeBrokerInClusterUpdate() {
-        List<TransportConnector> connectors = this.brokerService.getTransportConnectors();
-        for (TransportConnector connector : connectors) {
-            if (connector.isUpdateClusterClients() && connector.isUpdateClusterClientsOnRemove()) {
-                connector.updateClientClusterInfo();
-            }
-        }
-    }
-    
-    protected void purgeInactiveDestinations() {
-        synchronized (purgeInactiveDestinationsTask) {
-            List<BaseDestination> list = new ArrayList<BaseDestination>();
-            Map<ActiveMQDestination, Destination> map = getDestinationMap();
-            long timeStamp = System.currentTimeMillis();
-            for (Destination d : map.values()) {
-                if (d instanceof BaseDestination) {
-                    BaseDestination bd = (BaseDestination) d;
-                    bd.markForGC(timeStamp);
-                    if (bd.canGC()) {
-                        list.add(bd);
-                    }
-                }
-            }
-
-            if (list.isEmpty() == false) {
-
-                ConnectionContext context = BrokerSupport.getConnectionContext(this);
-                context.setBroker(this);
-
-                for (BaseDestination dest : list) {
-                    dest.getLog().info(
-                            dest.getName() + " Inactive for longer than " + dest.getInactiveTimoutBeforeGC()
-                                    + " ms - removing ...");
-                    try {
-                        getRoot().removeDestination(context, dest.getActiveMQDestination(), 0);
-                    } catch (Exception e) {
-                        LOG.error("Failed to remove inactive destination " + dest, e);
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Subscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Subscription.java
deleted file mode 100755
index 7db682d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Subscription.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.jms.InvalidSelectorException;
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.filter.MessageEvaluationContext;
-
-/**
- * 
- */
-public interface Subscription extends SubscriptionRecovery {
-
-    /**
-     * Used to add messages that match the subscription.
-     * @param node
-     * @throws Exception 
-     * @throws InterruptedException 
-     * @throws IOException 
-     */
-    void add(MessageReference node) throws Exception;
-    
-    /**
-     * Used when client acknowledge receipt of dispatched message. 
-     * @param node
-     * @throws IOException 
-     * @throws Exception 
-     */
-    void acknowledge(ConnectionContext context, final MessageAck ack) throws Exception;
-    
-
-    /**
-     * Allows a consumer to pull a message on demand
-     */
-    Response pullMessage(ConnectionContext context, MessagePull pull) throws Exception;
-
-    /**
-     * Is the subscription interested in the message?
-     * @param node 
-     * @param context
-     * @return
-     * @throws IOException 
-     */
-    boolean matches(MessageReference node, MessageEvaluationContext context) throws IOException;
-    
-    /**
-     * Is the subscription interested in messages in the destination?
-     * @param context
-     * @return
-     */
-    boolean matches(ActiveMQDestination destination);
-    
-    /**
-     * The subscription will be receiving messages from the destination.
-     * @param context 
-     * @param destination
-     * @throws Exception 
-     */
-    void add(ConnectionContext context, Destination destination) throws Exception;
-    
-    /**
-     * The subscription will be no longer be receiving messages from the destination.
-     * @param context 
-     * @param destination
-     * @return a list of un-acked messages that were added to the subscription.
-     */
-    List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception;
-    
-    /**
-     * The ConsumerInfo object that created the subscription.
-     * @param destination
-     */
-    ConsumerInfo getConsumerInfo();
-
-    /**
-     * The subscription should release as may references as it can to help the garbage collector
-     * reclaim memory.
-     */
-    void gc();
-    
-    /**
-     * Used by a Slave Broker to update dispatch infomation
-     * @param mdn
-     * @throws Exception 
-     */
-    void processMessageDispatchNotification(MessageDispatchNotification  mdn) throws Exception;
-    
-    /**
-     * @return true if the broker is currently in slave mode
-     */
-    boolean isSlave();
-    
-    /**
-     * @return number of messages pending delivery
-     */
-    int getPendingQueueSize();
-    
-    /**
-     * @return number of messages dispatched to the client
-     */
-    int getDispatchedQueueSize();
-        
-    /**
-     * @return number of messages dispatched to the client
-     */
-    long getDispatchedCounter();
-    
-    /**
-     * @return number of messages that matched the subscription
-     */
-    long getEnqueueCounter();
-
-    /**
-     * @return number of messages queued by the client
-     */
-    long getDequeueCounter();
-
-    /**
-     * @return the JMS selector on the current subscription
-     */
-    String getSelector();
-    
-    /**
-     * Attempts to change the current active selector on the subscription.
-     * This operation is not supported for persistent topics.
-     */
-    void setSelector(String selector) throws InvalidSelectorException, UnsupportedOperationException;
-
-    /**
-     * @return the JMX object name that this subscription was registered as if applicable
-     */
-    ObjectName getObjectName();
-
-    /**
-     * Set when the subscription is registered in JMX
-     */
-    void setObjectName(ObjectName objectName);
-    
-    /**
-     * @return true when 60% or more room is left for dispatching messages
-     */
-    boolean isLowWaterMark();
-    
-    /**
-     * @return true when 10% or less room is left for dispatching messages
-     */
-    boolean isHighWaterMark();
-    
-    /**
-     * @return true if there is no space to dispatch messages
-     */
-    boolean isFull();
-    
-    /**
-     * inform the MessageConsumer on the client to change it's prefetch
-     * @param newPrefetch
-     */
-    void updateConsumerPrefetch(int newPrefetch);
-    
-        
-    /**
-     * Called when the subscription is destroyed.
-     */
-    void destroy();
-
-    /**
-     * @return the prefetch size that is configured for the subscription
-     */
-    int getPrefetchSize();
-    
-    /**
-     * @return the number of messages awaiting acknowledgement
-     */
-    int getInFlightSize();
-    
-    /**
-     * @return the in flight messages as a percentage of the prefetch size
-     */
-    int getInFlightUsage();
-    
-    /**
-     * Informs the Broker if the subscription needs to intervention to recover it's state
-     * e.g. DurableTopicSubscriber may do
-     * @see org.apache.activemq.region.cursors.PendingMessageCursor
-     * @return true if recovery required
-     */
-    boolean isRecoveryRequired();
-    
-    
-    /**
-     * @return true if a browser
-     */
-    boolean isBrowser();
-    
-    /**
-     * @return the number of messages this subscription can accept before its full
-     */
-    int countBeforeFull();
-
-    ConnectionContext getContext();
-    
-    public int getCursorMemoryHighWaterMark();
-
-	public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark);
-
-    boolean isSlowConsumer();
-
-    void unmatched(MessageReference node) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/SubscriptionRecovery.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/SubscriptionRecovery.java
deleted file mode 100644
index 7d801b2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/SubscriptionRecovery.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * An interface for recoverying transient messages held by the broker for
- * retractive recovery for subscribers
- * 
- * 
- */
-public interface SubscriptionRecovery {
-
-    /**
-     * Add a message to the SubscriptionRecovery
-     * 
-     * @param context
-     * @param message
-     * @return true if the message is accepted
-     * @throws Exception
-     */
-    boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception;
-
-    /**
-     * @return the Destination associated with this Subscription
-     */
-    ActiveMQDestination getActiveMQDestination();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java
deleted file mode 100755
index dfbdf86..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueue.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The Queue is a List of MessageEntry objects that are dispatched to matching
- * subscriptions.
- * 
- * 
- */
-public class TempQueue extends Queue{
-    private static final Logger LOG = LoggerFactory.getLogger(TempQueue.class);
-    private final ActiveMQTempDestination tempDest;
-   
-    
-    /**
-     * @param brokerService
-     * @param destination
-     * @param store
-     * @param parentStats
-     * @param taskFactory
-     * @throws Exception
-     */
-    public TempQueue(BrokerService brokerService,
-            ActiveMQDestination destination, MessageStore store,
-            DestinationStatistics parentStats, TaskRunnerFactory taskFactory)
-            throws Exception {
-        super(brokerService, destination, store, parentStats, taskFactory);
-        this.tempDest = (ActiveMQTempDestination) destination;
-    }
-    
-    @Override
-    public void initialize() throws Exception {
-        this.messages=new VMPendingMessageCursor(false);
-        this.messages.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
-        this.systemUsage = brokerService.getSystemUsage();
-        memoryUsage.setParent(systemUsage.getMemoryUsage());           
-        this.taskRunner = taskFactory.createTaskRunner(this, "TempQueue:  " + destination.getPhysicalName());
-    }
-    
-    @Override
-    public void addSubscription(ConnectionContext context, Subscription sub) throws Exception {
-        // Only consumers on the same connection can consume from
-        // the temporary destination
-        // However, we could have failed over - and we do this
-        // check client side anyways ....
-        if (!context.isFaultTolerant()
-                && (!context.isNetworkConnection() && !tempDest
-                        .getConnectionId().equals(
-                                sub.getConsumerInfo().getConsumerId()
-                                        .getConnectionId()))) {
-
-            tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId());
-            LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
-        }
-        super.addSubscription(context, sub);
-    }
-    
-    @Override
-    public void dispose(ConnectionContext context) throws IOException {
-        try {
-           purge();
-        } catch (Exception e) {
-          LOG.warn("Caught an exception purging Queue: " + destination);
-        }
-        super.dispose(context);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java
deleted file mode 100755
index fce069a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.broker.region;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TempQueueRegion extends AbstractTempRegion {
-    private static final Logger LOG = LoggerFactory.getLogger(TempQueueRegion.class);
-    private final BrokerService brokerService;
-    
-    public TempQueueRegion(RegionBroker broker, BrokerService brokerService, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                           DestinationFactory destinationFactory) {
-        super(broker, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-        // We should allow the following to be configurable via a Destination
-        // Policy
-        // setAutoCreateDestinations(false);
-        this.brokerService = brokerService;
-    }
-
-    protected Destination doCreateDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {  
-        TempQueue result = new TempQueue(brokerService, destination, null, destinationStatistics, taskRunnerFactory);
-        brokerService.getDestinationPolicy();
-        configureQueue(result, destination);
-        result.initialize();
-        return result;
-    }
-
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws JMSException {
-        if (info.isBrowser()) {
-            return new QueueBrowserSubscription(broker,usageManager,context, info);
-        } else {
-            return new QueueSubscription(broker,usageManager,context, info);
-        }
-    }
-
-    public String toString() {
-        return "TempQueueRegion: destinations=" + destinations.size() + ", subscriptions=" + subscriptions.size() + ", memory=" + usageManager.getMemoryUsage().getPercentUsage() + "%";
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-
-        // Force a timeout value so that we don't get an error that
-        // there is still an active sub. Temp destination may be removed
-        // while a network sub is still active which is valid.
-        if (timeout == 0) {
-            timeout = 1;
-        }
-
-        super.removeDestination(context, destination, timeout);
-    }
-    
-    /*
-     * For a Queue, dispatch order is imperative to match acks, so the dispatch is deferred till 
-     * the notification to ensure that the subscription chosen by the master is used.
-     * 
-     * (non-Javadoc)
-     * @see org.apache.activemq.broker.region.AbstractRegion#processDispatchNotification(org.apache.activemq.command.MessageDispatchNotification)
-     */
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        processDispatchNotificationViaDestination(messageDispatchNotification);
-    }
-
-    protected void configureQueue(Queue queue, ActiveMQDestination destination) {
-        if (broker == null) {
-            throw new IllegalStateException("broker property is not set");
-        }
-        if (broker.getDestinationPolicy() != null) {
-            PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-            if (entry != null) {
-                entry.configure(broker,queue);
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java
deleted file mode 100755
index 6fa1f53..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopic.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunnerFactory;
-
-/**
- * The Topic is a destination that sends a copy of a message to every active
- * Subscription registered.
- * 
- * 
- */
-public class TempTopic  extends Topic  implements Task{
-    private final ActiveMQTempDestination tempDest;
-    /**
-     * @param brokerService
-     * @param destination
-     * @param store
-     * @param parentStats
-     * @param taskFactory
-     * @throws Exception
-     */
-    public TempTopic(BrokerService brokerService,
-            ActiveMQDestination destination, TopicMessageStore store,
-            DestinationStatistics parentStats, TaskRunnerFactory taskFactory)
-            throws Exception {
-        super(brokerService, destination, store, parentStats, taskFactory);
-        this.tempDest = (ActiveMQTempDestination) destination;
-
-    }
-    
-    public void addSubscription(ConnectionContext context, Subscription sub) throws Exception {
-        // Only consumers on the same connection can consume from
-        // the temporary destination
-        // However, we could have failed over - and we do this
-        // check client side anyways ....
-        if (!context.isFaultTolerant()
-                && (!context.isNetworkConnection() && !tempDest
-                        .getConnectionId().equals(
-                                sub.getConsumerInfo().getConsumerId()
-                                        .getConnectionId()))) {
-
-            tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId());
-            LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
-        }
-        super.addSubscription(context, sub);
-    } 
-    
-    public void initialize() {
-    }
-   
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java
deleted file mode 100755
index 644c142..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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.broker.region;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TempTopicRegion extends AbstractTempRegion {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TempTopicRegion.class);
-
-    public TempTopicRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                           DestinationFactory destinationFactory) {
-        super(broker, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-        // We should allow the following to be configurable via a Destination
-        // Policy
-        // setAutoCreateDestinations(false);
-    }
-
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws JMSException {
-        if (info.isDurable()) {
-            throw new JMSException("A durable subscription cannot be created for a temporary topic.");
-        }
-        try {
-            TopicSubscription answer = new TopicSubscription(broker, context, info, usageManager);
-            // lets configure the subscription depending on the destination
-            ActiveMQDestination destination = info.getDestination();
-            if (destination != null && broker.getDestinationPolicy() != null) {
-                PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-                if (entry != null) {
-                    entry.configure(broker, usageManager, answer);
-                }
-            }
-            answer.init();
-            return answer;
-        } catch (Exception e) {
-            LOG.error("Failed to create TopicSubscription ", e);
-            JMSException jmsEx = new JMSException("Couldn't create TopicSubscription");
-            jmsEx.setLinkedException(e);
-            throw jmsEx;
-        }
-    }
-
-    public String toString() {
-        return "TempTopicRegion: destinations=" + destinations.size() + ", subscriptions=" + subscriptions.size() + ", memory=" + usageManager.getMemoryUsage().getPercentUsage() + "%";
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-
-        // Force a timeout value so that we don't get an error that
-        // there is still an active sub. Temp destination may be removed
-        // while a network sub is still active which is valid.
-        if (timeout == 0) {
-            timeout = 1;
-        }
-
-        super.removeDestination(context, destination, timeout);
-    }
-
-    
-    protected Destination doCreateDestination(ConnectionContext context,
-            ActiveMQDestination destination) throws Exception {
-        return destinationFactory.createDestination(context, destination, destinationStatistics);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
deleted file mode 100755
index aa09c59..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
+++ /dev/null
@@ -1,669 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.Future;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.policy.DispatchPolicy;
-import org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.SimpleDispatchPolicy;
-import org.apache.activemq.broker.region.policy.SubscriptionRecoveryPolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.thread.Valve;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.util.SubscriptionKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The Topic is a destination that sends a copy of a message to every active
- * Subscription registered.
- * 
- * 
- */
-public class Topic extends BaseDestination implements Task {
-    protected static final Logger LOG = LoggerFactory.getLogger(Topic.class);
-    private final TopicMessageStore topicStore;
-    protected final CopyOnWriteArrayList<Subscription> consumers = new CopyOnWriteArrayList<Subscription>();
-    protected final Valve dispatchValve = new Valve(true);
-    private DispatchPolicy dispatchPolicy = new SimpleDispatchPolicy();
-    private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy;
-    private final ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription> durableSubcribers = new ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription>();
-    private final TaskRunner taskRunner;
-    private final LinkedList<Runnable> messagesWaitingForSpace = new LinkedList<Runnable>();
-    private final Runnable sendMessagesWaitingForSpaceTask = new Runnable() {
-        public void run() {
-            try {
-                Topic.this.taskRunner.wakeup();
-            } catch (InterruptedException e) {
-            }
-        };
-    };
-
-    public Topic(BrokerService brokerService, ActiveMQDestination destination, TopicMessageStore store,
-            DestinationStatistics parentStats, TaskRunnerFactory taskFactory) throws Exception {
-        super(brokerService, store, destination, parentStats);
-        this.topicStore = store;
-        // set default subscription recovery policy
-        subscriptionRecoveryPolicy = new NoSubscriptionRecoveryPolicy();
-        this.taskRunner = taskFactory.createTaskRunner(this, "Topic  " + destination.getPhysicalName());
-    }
-
-    @Override
-    public void initialize() throws Exception {
-        super.initialize();
-        if (store != null) {
-            // AMQ-2586: Better to leave this stat at zero than to give the user
-            // misleading metrics.
-            // int messageCount = store.getMessageCount();
-            // destinationStatistics.getMessages().setCount(messageCount);
-        }
-    }
-
-    public List<Subscription> getConsumers() {
-        synchronized (consumers) {
-            return new ArrayList<Subscription>(consumers);
-        }
-    }
-
-    public boolean lock(MessageReference node, LockOwner sub) {
-        return true;
-    }
-
-    public void addSubscription(ConnectionContext context, final Subscription sub) throws Exception {
-
-       super.addSubscription(context, sub);
-
-        if (!sub.getConsumerInfo().isDurable()) {
-
-            // Do a retroactive recovery if needed.
-            if (sub.getConsumerInfo().isRetroactive()) {
-
-                // synchronize with dispatch method so that no new messages are
-                // sent
-                // while we are recovering a subscription to avoid out of order
-                // messages.
-                dispatchValve.turnOff();
-                try {
-
-                    synchronized (consumers) {
-                        sub.add(context, this);
-                        consumers.add(sub);
-                    }
-                    subscriptionRecoveryPolicy.recover(context, this, sub);
-
-                } finally {
-                    dispatchValve.turnOn();
-                }
-
-            } else {
-                synchronized (consumers) {
-                    sub.add(context, this);
-                    consumers.add(sub);
-                }
-            }
-        } else {
-            sub.add(context, this);
-            DurableTopicSubscription dsub = (DurableTopicSubscription) sub;
-            durableSubcribers.put(dsub.getSubscriptionKey(), dsub);
-        }
-    }
-
-    public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId)
-            throws Exception {
-        if (!sub.getConsumerInfo().isDurable()) {
-            super.removeSubscription(context, sub, lastDeliveredSequenceId);
-            synchronized (consumers) {
-                consumers.remove(sub);
-            }
-        }
-        sub.remove(context, this);
-    }
-
-    public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception {
-        if (topicStore != null) {
-            topicStore.deleteSubscription(key.clientId, key.subscriptionName);
-            DurableTopicSubscription removed = durableSubcribers.remove(key);
-            if (removed != null) {
-                destinationStatistics.getConsumers().decrement();
-                // deactivate and remove
-                removed.deactivate(false);
-                consumers.remove(removed);
-            }
-        }
-    }
-
-    public void activate(ConnectionContext context, final DurableTopicSubscription subscription) throws Exception {
-        // synchronize with dispatch method so that no new messages are sent
-        // while
-        // we are recovering a subscription to avoid out of order messages.
-        dispatchValve.turnOff();
-        try {
-
-            if (topicStore == null) {
-                return;
-            }
-
-            // Recover the durable subscription.
-            String clientId = subscription.getSubscriptionKey().getClientId();
-            String subscriptionName = subscription.getSubscriptionKey().getSubscriptionName();
-            String selector = subscription.getConsumerInfo().getSelector();
-            SubscriptionInfo info = topicStore.lookupSubscription(clientId, subscriptionName);
-            if (info != null) {
-                // Check to see if selector changed.
-                String s1 = info.getSelector();
-                if (s1 == null ^ selector == null || (s1 != null && !s1.equals(selector))) {
-                    // Need to delete the subscription
-                    topicStore.deleteSubscription(clientId, subscriptionName);
-                    info = null;
-                } else {
-                    synchronized (consumers) {
-                        consumers.add(subscription);
-                    }
-                }
-            }
-            // Do we need to create the subscription?
-            if (info == null) {
-                info = new SubscriptionInfo();
-                info.setClientId(clientId);
-                info.setSelector(selector);
-                info.setSubscriptionName(subscriptionName);
-                info.setDestination(getActiveMQDestination());
-                // This destination is an actual destination id.
-                info.setSubscribedDestination(subscription.getConsumerInfo().getDestination());
-                // This destination might be a pattern
-                synchronized (consumers) {
-                    consumers.add(subscription);
-                    topicStore.addSubsciption(info, subscription.getConsumerInfo().isRetroactive());
-                }
-            }
-
-            final MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext();
-            msgContext.setDestination(destination);
-            if (subscription.isRecoveryRequired()) {
-                topicStore.recoverSubscription(clientId, subscriptionName, new MessageRecoveryListener() {
-                    public boolean recoverMessage(Message message) throws Exception {
-                        message.setRegionDestination(Topic.this);
-                        try {
-                            msgContext.setMessageReference(message);
-                            if (subscription.matches(message, msgContext)) {
-                                subscription.add(message);
-                            }
-                        } catch (IOException e) {
-                            LOG.error("Failed to recover this message " + message);
-                        }
-                        return true;
-                    }
-
-                    public boolean recoverMessageReference(MessageId messageReference) throws Exception {
-                        throw new RuntimeException("Should not be called.");
-                    }
-
-                    public boolean hasSpace() {
-                        return true;
-                    }
-
-                    public boolean isDuplicate(MessageId id) {
-                        return false;
-                    }
-                });
-            }
-        } finally {
-            dispatchValve.turnOn();
-        }
-    }
-
-    public void deactivate(ConnectionContext context, DurableTopicSubscription sub) throws Exception {
-        synchronized (consumers) {
-            consumers.remove(sub);
-        }
-        sub.remove(context, this);
-    }
-
-    protected void recoverRetroactiveMessages(ConnectionContext context, Subscription subscription) throws Exception {
-        if (subscription.getConsumerInfo().isRetroactive()) {
-            subscriptionRecoveryPolicy.recover(context, this, subscription);
-        }
-    }
-
-    public void send(final ProducerBrokerExchange producerExchange, final Message message) throws Exception {
-        final ConnectionContext context = producerExchange.getConnectionContext();
-
-        final ProducerInfo producerInfo = producerExchange.getProducerState().getInfo();
-        final boolean sendProducerAck = !message.isResponseRequired() && producerInfo.getWindowSize() > 0
-                && !context.isInRecoveryMode();
-
-        // There is delay between the client sending it and it arriving at the
-        // destination.. it may have expired.
-        if (message.isExpired()) {
-            broker.messageExpired(context, message, null);
-            getDestinationStatistics().getExpired().increment();
-            if (sendProducerAck) {
-                ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message.getSize());
-                context.getConnection().dispatchAsync(ack);
-            }
-            return;
-        }
-
-        if (memoryUsage.isFull()) {
-            isFull(context, memoryUsage);
-            fastProducer(context, producerInfo);
-
-            if (isProducerFlowControl() && context.isProducerFlowControl()) {
-
-                if (warnOnProducerFlowControl) {
-                    warnOnProducerFlowControl = false;
-                    LOG
-                            .info("Usage Manager memory limit ("
-                                    + memoryUsage.getLimit()
-                                    + ") reached for "
-                                    + getActiveMQDestination().getQualifiedName()
-                                    + ". Producers will be throttled to the rate at which messages are removed from this destination to prevent flooding it."
-                                    + " See http://activemq.apache.org/producer-flow-control.html for more info");
-                }
-
-                if (systemUsage.isSendFailIfNoSpace()) {
-                    throw new javax.jms.ResourceAllocationException("Usage Manager memory limit ("
-                            + memoryUsage.getLimit() + ") reached. Stopping producer (" + message.getProducerId()
-                            + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
-                            + " See http://activemq.apache.org/producer-flow-control.html for more info");
-                }
-
-                // We can avoid blocking due to low usage if the producer is
-                // sending
-                // a sync message or
-                // if it is using a producer window
-                if (producerInfo.getWindowSize() > 0 || message.isResponseRequired()) {
-                    synchronized (messagesWaitingForSpace) {
-                        messagesWaitingForSpace.add(new Runnable() {
-                            public void run() {
-                                try {
-
-                                    // While waiting for space to free up... the
-                                    // message may have expired.
-                                    if (message.isExpired()) {
-                                        broker.messageExpired(context, message, null);
-                                        getDestinationStatistics().getExpired().increment();
-                                    } else {
-                                        doMessageSend(producerExchange, message);
-                                    }
-
-                                    if (sendProducerAck) {
-                                        ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message
-                                                .getSize());
-                                        context.getConnection().dispatchAsync(ack);
-                                    } else {
-                                        Response response = new Response();
-                                        response.setCorrelationId(message.getCommandId());
-                                        context.getConnection().dispatchAsync(response);
-                                    }
-
-                                } catch (Exception e) {
-                                    if (!sendProducerAck && !context.isInRecoveryMode()) {
-                                        ExceptionResponse response = new ExceptionResponse(e);
-                                        response.setCorrelationId(message.getCommandId());
-                                        context.getConnection().dispatchAsync(response);
-                                    }
-                                }
-
-                            }
-                        });
-
-                        registerCallbackForNotFullNotification();
-                        context.setDontSendReponse(true);
-                        return;
-                    }
-
-                } else {
-                    // Producer flow control cannot be used, so we have do the
-                    // flow
-                    // control at the broker
-                    // by blocking this thread until there is space available.
-
-                    if (memoryUsage.isFull()) {
-                        if (context.isInTransaction()) {
-
-                            int count = 0;
-                            while (!memoryUsage.waitForSpace(1000)) {
-                                if (context.getStopping().get()) {
-                                    throw new IOException("Connection closed, send aborted.");
-                                }
-                                if (count > 2 && context.isInTransaction()) {
-                                    count = 0;
-                                    int size = context.getTransaction().size();
-                                    LOG.warn("Waiting for space to send  transacted message - transaction elements = "
-                                            + size + " need more space to commit. Message = " + message);
-                                }
-                            }
-                        } else {
-                            waitForSpace(
-                                    context,
-                                    memoryUsage,
-                                    "Usage Manager memory limit reached. Stopping producer ("
-                                            + message.getProducerId()
-                                            + ") to prevent flooding "
-                                            + getActiveMQDestination().getQualifiedName()
-                                            + "."
-                                            + " See http://activemq.apache.org/producer-flow-control.html for more info");
-                        }
-                    }
-
-                    // The usage manager could have delayed us by the time
-                    // we unblock the message could have expired..
-                    if (message.isExpired()) {
-                        getDestinationStatistics().getExpired().increment();
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Expired message: " + message);
-                        }
-                        return;
-                    }
-                }
-            }
-        }
-
-        doMessageSend(producerExchange, message);
-        messageDelivered(context, message);
-        if (sendProducerAck) {
-            ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), message.getSize());
-            context.getConnection().dispatchAsync(ack);
-        }
-    }
-
-    /**
-     * do send the message - this needs to be synchronized to ensure messages
-     * are stored AND dispatched in the right order
-     * 
-     * @param producerExchange
-     * @param message
-     * @throws IOException
-     * @throws Exception
-     */
-    synchronized void doMessageSend(final ProducerBrokerExchange producerExchange, final Message message)
-            throws IOException, Exception {
-        final ConnectionContext context = producerExchange.getConnectionContext();
-        message.setRegionDestination(this);
-        message.getMessageId().setBrokerSequenceId(getDestinationSequenceId());
-        Future<Object> result = null;
-
-        if (topicStore != null && message.isPersistent() && !canOptimizeOutPersistence()) {
-            if (systemUsage.getStoreUsage().isFull(getStoreUsageHighWaterMark())) {
-                final String logMessage = "Usage Manager Store is Full, " + getStoreUsageHighWaterMark() + "% of "
-                        + systemUsage.getStoreUsage().getLimit() + ". Stopping producer (" + message.getProducerId()
-                        + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
-                        + " See http://activemq.apache.org/producer-flow-control.html for more info";
-                if (systemUsage.isSendFailIfNoSpace()) {
-                    throw new javax.jms.ResourceAllocationException(logMessage);
-                }
-
-                waitForSpace(context, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);
-            }
-            result = topicStore.asyncAddTopicMessage(context, message);
-        }
-
-        message.incrementReferenceCount();
-
-        if (context.isInTransaction()) {
-            context.getTransaction().addSynchronization(new Synchronization() {
-                @Override
-                public void afterCommit() throws Exception {
-                    // It could take while before we receive the commit
-                    // operration.. by that time the message could have
-                    // expired..
-                    if (broker.isExpired(message)) {
-                        getDestinationStatistics().getExpired().increment();
-                        broker.messageExpired(context, message, null);
-                        message.decrementReferenceCount();
-                        return;
-                    }
-                    try {
-                        dispatch(context, message);
-                    } finally {
-                        message.decrementReferenceCount();
-                    }
-                }
-            });
-
-        } else {
-            try {
-                dispatch(context, message);
-            } finally {
-                message.decrementReferenceCount();
-            }
-        }
-        if (result != null && !result.isCancelled()) {
-            try {
-                result.get();
-            } catch (CancellationException e) {
-                // ignore - the task has been cancelled if the message
-                // has already been deleted
-            }
-        }
-
-    }
-
-    private boolean canOptimizeOutPersistence() {
-        return durableSubcribers.size() == 0;
-    }
-
-    @Override
-    public String toString() {
-        return "Topic: destination=" + destination.getPhysicalName() + ", subscriptions=" + consumers.size();
-    }
-
-    public void acknowledge(ConnectionContext context, Subscription sub, final MessageAck ack,
-            final MessageReference node) throws IOException {
-        if (topicStore != null && node.isPersistent()) {
-            DurableTopicSubscription dsub = (DurableTopicSubscription) sub;
-            SubscriptionKey key = dsub.getSubscriptionKey();
-            topicStore.acknowledge(context, key.getClientId(), key.getSubscriptionName(), node.getMessageId(), ack);
-        }
-        messageConsumed(context, node);
-    }
-
-    public void gc() {
-    }
-
-    public Message loadMessage(MessageId messageId) throws IOException {
-        return topicStore != null ? topicStore.getMessage(messageId) : null;
-    }
-
-    public void start() throws Exception {
-        this.subscriptionRecoveryPolicy.start();
-        if (memoryUsage != null) {
-            memoryUsage.start();
-        }
-
-    }
-
-    public void stop() throws Exception {
-        if (taskRunner != null) {
-            taskRunner.shutdown();
-        }
-        this.subscriptionRecoveryPolicy.stop();
-        if (memoryUsage != null) {
-            memoryUsage.stop();
-        }
-        if (this.topicStore != null) {
-            this.topicStore.stop();
-        }
-    }
-
-    public Message[] browse() {
-        final Set<Message> result = new CopyOnWriteArraySet<Message>();
-        try {
-            if (topicStore != null) {
-                topicStore.recover(new MessageRecoveryListener() {
-                    public boolean recoverMessage(Message message) throws Exception {
-                        result.add(message);
-                        return true;
-                    }
-
-                    public boolean recoverMessageReference(MessageId messageReference) throws Exception {
-                        return true;
-                    }
-
-                    public boolean hasSpace() {
-                        return true;
-                    }
-
-                    public boolean isDuplicate(MessageId id) {
-                        return false;
-                    }
-                });
-                Message[] msgs = subscriptionRecoveryPolicy.browse(getActiveMQDestination());
-                if (msgs != null) {
-                    for (int i = 0; i < msgs.length; i++) {
-                        result.add(msgs[i]);
-                    }
-                }
-            }
-        } catch (Throwable e) {
-            LOG.warn("Failed to browse Topic: " + getActiveMQDestination().getPhysicalName(), e);
-        }
-        return result.toArray(new Message[result.size()]);
-    }
-
-    public boolean iterate() {
-        synchronized (messagesWaitingForSpace) {
-            while (!memoryUsage.isFull() && !messagesWaitingForSpace.isEmpty()) {
-                Runnable op = messagesWaitingForSpace.removeFirst();
-                op.run();
-            }
-
-            if (!messagesWaitingForSpace.isEmpty()) {
-                registerCallbackForNotFullNotification();
-            }
-        }
-        return false;
-    }
-
-    private void registerCallbackForNotFullNotification() {
-        // If the usage manager is not full, then the task will not
-        // get called..
-        if (!memoryUsage.notifyCallbackWhenNotFull(sendMessagesWaitingForSpaceTask)) {
-            // so call it directly here.
-            sendMessagesWaitingForSpaceTask.run();
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public DispatchPolicy getDispatchPolicy() {
-        return dispatchPolicy;
-    }
-
-    public void setDispatchPolicy(DispatchPolicy dispatchPolicy) {
-        this.dispatchPolicy = dispatchPolicy;
-    }
-
-    public SubscriptionRecoveryPolicy getSubscriptionRecoveryPolicy() {
-        return subscriptionRecoveryPolicy;
-    }
-
-    public void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy subscriptionRecoveryPolicy) {
-        this.subscriptionRecoveryPolicy = subscriptionRecoveryPolicy;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    public final void wakeup() {
-    }
-
-    protected void dispatch(final ConnectionContext context, Message message) throws Exception {
-        // AMQ-2586: Better to leave this stat at zero than to give the user
-        // misleading metrics.
-        // destinationStatistics.getMessages().increment();
-        destinationStatistics.getEnqueues().increment();
-        dispatchValve.increment();
-        MessageEvaluationContext msgContext = null;
-        try {
-            if (!subscriptionRecoveryPolicy.add(context, message)) {
-                return;
-            }
-            synchronized (consumers) {
-                if (consumers.isEmpty()) {
-                    onMessageWithNoConsumers(context, message);
-                    return;
-                }
-            }
-            msgContext = context.getMessageEvaluationContext();
-            msgContext.setDestination(destination);
-            msgContext.setMessageReference(message);
-            if (!dispatchPolicy.dispatch(message, msgContext, consumers)) {
-                onMessageWithNoConsumers(context, message);
-            }
-
-        } finally {
-            dispatchValve.decrement();
-            if (msgContext != null) {
-                msgContext.clear();
-            }
-        }
-    }
-
-    public void messageExpired(ConnectionContext context, Subscription subs, MessageReference reference) {
-        broker.messageExpired(context, reference, subs);
-        // AMQ-2586: Better to leave this stat at zero than to give the user
-        // misleading metrics.
-        // destinationStatistics.getMessages().decrement();
-        destinationStatistics.getEnqueues().decrement();
-        destinationStatistics.getExpired().increment();
-        MessageAck ack = new MessageAck();
-        ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
-        ack.setDestination(destination);
-        ack.setMessageID(reference.getMessageId());
-        try {
-            acknowledge(context, subs, ack, reference);
-        } catch (IOException e) {
-            LOG.error("Failed to remove expired Message from the store ", e);
-        }
-    }
-
-    @Override
-    protected Logger getLog() {
-        return LOG;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java
deleted file mode 100755
index c25be56..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicRegion.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.apache.activemq.util.SubscriptionKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TopicRegion extends AbstractRegion {
-    private static final Logger LOG = LoggerFactory.getLogger(TopicRegion.class);
-    protected final ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription> durableSubscriptions = new ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription>();
-    private final LongSequenceGenerator recoveredDurableSubIdGenerator = new LongSequenceGenerator();
-    private final SessionId recoveredDurableSubSessionId = new SessionId(new ConnectionId("OFFLINE"), recoveredDurableSubIdGenerator.getNextSequenceId());
-    private boolean keepDurableSubsActive;
-
-    public TopicRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
-                       DestinationFactory destinationFactory) {
-        super(broker, destinationStatistics, memoryManager, taskRunnerFactory, destinationFactory);
-
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        if (info.isDurable()) {
-            ActiveMQDestination destination = info.getDestination();
-            if (!destination.isPattern()) {
-                // Make sure the destination is created.
-                lookup(context, destination,true);
-            }
-            String clientId = context.getClientId();
-            String subscriptionName = info.getSubscriptionName();
-            SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName);
-            DurableTopicSubscription sub = durableSubscriptions.get(key);
-            if (sub != null) {
-                if (sub.isActive()) {
-                    throw new JMSException("Durable consumer is in use for client: " + clientId + " and subscriptionName: " + subscriptionName);
-                }
-                // Has the selector changed??
-                if (hasDurableSubChanged(info, sub.getConsumerInfo())) {
-                    // Remove the consumer first then add it.
-                    durableSubscriptions.remove(key);
-                    synchronized (destinationsMutex) {
-                        for (Iterator<Destination> iter = destinations.values().iterator(); iter.hasNext();) {
-                            Destination dest = iter.next();
-                            //Account for virtual destinations
-                            if (dest instanceof Topic){
-                                Topic topic = (Topic)dest;
-                                topic.deleteSubscription(context, key);
-                            }
-                        }
-                    }
-                    super.removeConsumer(context, sub.getConsumerInfo());
-                    super.addConsumer(context, info);
-                    sub = durableSubscriptions.get(key);
-                } else {
-                    // Change the consumer id key of the durable sub.
-                    if (sub.getConsumerInfo().getConsumerId() != null) {
-                        subscriptions.remove(sub.getConsumerInfo().getConsumerId());
-                    }
-                    subscriptions.put(info.getConsumerId(), sub);
-                }
-            } else {
-                super.addConsumer(context, info);
-                sub = durableSubscriptions.get(key);
-                if (sub == null) {
-                    throw new JMSException("Cannot use the same consumerId: " + info.getConsumerId() + " for two different durable subscriptions clientID: " + key.getClientId()
-                                           + " subscriberName: " + key.getSubscriptionName());
-                }
-            }
-            sub.activate(usageManager, context, info);
-            return sub;
-        } else {
-            return super.addConsumer(context, info);
-        }
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        if (info.isDurable()) {
-
-            SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
-            DurableTopicSubscription sub = durableSubscriptions.get(key);
-            if (sub != null) {
-                sub.deactivate(keepDurableSubsActive);
-            }
-
-        } else {
-            super.removeConsumer(context, info);
-        }
-    }
-
-    @Override
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        SubscriptionKey key = new SubscriptionKey(info.getClientId(), info.getSubscriptionName());
-        DurableTopicSubscription sub = durableSubscriptions.remove(key);
-        if (sub == null) {
-            throw new InvalidDestinationException("No durable subscription exists for: " + info.getSubscriptionName());
-        }
-        if (sub.isActive()) {
-            throw new JMSException("Durable consumer is in use");
-        }
-
-        synchronized (destinationsMutex) {
-            for (Iterator<Destination> iter = destinations.values().iterator(); iter.hasNext();) {
-            	Destination dest = iter.next();
-            	//Account for virtual destinations
-            	if (dest instanceof Topic){
-            	    Topic topic = (Topic)dest;
-            	    topic.deleteSubscription(context, key);
-            	}
-            }
-        }
-        if (subscriptions.get(sub.getConsumerInfo()) != null) {
-            super.removeConsumer(context, sub.getConsumerInfo());
-        } else {
-            // try destroying inactive subscriptions
-            destroySubscription(sub);
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "TopicRegion: destinations=" + destinations.size() + ", subscriptions=" + subscriptions.size() + ", memory=" + usageManager.getMemoryUsage().getPercentUsage() + "%";
-    }
-
-    @Override
-    protected List<Subscription> addSubscriptionsForDestination(ConnectionContext context, Destination dest) throws Exception {
-        List<Subscription> rc = super.addSubscriptionsForDestination(context, dest);
-        Set<Subscription> dupChecker = new HashSet<Subscription>(rc);
-
-        TopicMessageStore store = (TopicMessageStore)dest.getMessageStore();
-        // Eagerly recover the durable subscriptions
-        if (store != null) {
-            SubscriptionInfo[] infos = store.getAllSubscriptions();
-            for (int i = 0; i < infos.length; i++) {
-
-                SubscriptionInfo info = infos[i];
-                LOG.debug("Restoring durable subscription: " + info);
-                SubscriptionKey key = new SubscriptionKey(info);
-
-                // A single durable sub may be subscribing to multiple topics.
-                // so it might exist already.
-                DurableTopicSubscription sub = durableSubscriptions.get(key);
-                ConsumerInfo consumerInfo = createInactiveConsumerInfo(info);
-                if (sub == null) {
-                    ConnectionContext c = new ConnectionContext();
-                    c.setBroker(context.getBroker());
-                    c.setClientId(key.getClientId());
-                    c.setConnectionId(consumerInfo.getConsumerId().getParentId().getParentId());
-                    sub = (DurableTopicSubscription)createSubscription(c, consumerInfo);
-                }
-
-                if (dupChecker.contains(sub)) {
-                    continue;
-                }
-
-                dupChecker.add(sub);
-                rc.add(sub);
-                dest.addSubscription(context, sub);
-            }
-
-            // Now perhaps there other durable subscriptions (via wild card)
-            // that would match this destination..
-            durableSubscriptions.values();
-            for (Iterator<DurableTopicSubscription> iterator = durableSubscriptions.values().iterator(); iterator.hasNext();) {
-                DurableTopicSubscription sub = iterator.next();
-                // Skip over subscriptions that we allready added..
-                if (dupChecker.contains(sub)) {
-                    continue;
-                }
-
-                if (sub.matches(dest.getActiveMQDestination())) {
-                    rc.add(sub);
-                    dest.addSubscription(context, sub);
-                }
-            }
-        }
-        return rc;
-    }
-
-    private ConsumerInfo createInactiveConsumerInfo(SubscriptionInfo info) {
-        ConsumerInfo rc = new ConsumerInfo();
-        rc.setSelector(info.getSelector());
-        rc.setSubscriptionName(info.getSubscriptionName());
-        rc.setDestination(info.getSubscribedDestination());
-        rc.setConsumerId(createConsumerId());
-        return rc;
-    }
-
-    private ConsumerId createConsumerId() {
-        return new ConsumerId(recoveredDurableSubSessionId, recoveredDurableSubIdGenerator.getNextSequenceId());
-    }
-
-    protected void configureTopic(Topic topic, ActiveMQDestination destination) {
-        if (broker.getDestinationPolicy() != null) {
-            PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-            if (entry != null) {
-                entry.configure(broker,topic);
-            }
-        }
-    }
-
-    @Override
-    protected Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws JMSException {
-        ActiveMQDestination destination = info.getDestination();
-        
-        if (info.isDurable()) {
-            if (AdvisorySupport.isAdvisoryTopic(info.getDestination())) {
-                throw new JMSException("Cannot create a durable subscription for an advisory Topic");
-            }
-            SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
-            DurableTopicSubscription sub = durableSubscriptions.get(key);
-            
-            if (sub == null) {
-                
-                sub = new DurableTopicSubscription(broker, usageManager, context, info, keepDurableSubsActive);
-
-                if (destination != null && broker.getDestinationPolicy() != null) {
-                    PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-                    if (entry != null) {
-                        entry.configure(broker, usageManager, sub);
-                    }
-                }
-                durableSubscriptions.put(key, sub);
-            } else {
-                throw new JMSException("That durable subscription is already active.");
-            }
-            return sub;
-        }
-        try {
-            TopicSubscription answer = new TopicSubscription(broker, context, info, usageManager);
-            // lets configure the subscription depending on the destination
-            if (destination != null && broker.getDestinationPolicy() != null) {
-                PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-                if (entry != null) {
-                    entry.configure(broker, usageManager, answer);
-                }
-            }
-            answer.init();
-            return answer;
-        } catch (Exception e) {
-            LOG.error("Failed to create TopicSubscription ", e);
-            JMSException jmsEx = new JMSException("Couldn't create TopicSubscription");
-            jmsEx.setLinkedException(e);
-            throw jmsEx;
-        }
-    }
-
-    /**
-     */
-    private boolean hasDurableSubChanged(ConsumerInfo info1, ConsumerInfo info2) {
-        if (info1.getSelector() != null ^ info2.getSelector() != null) {
-            return true;
-        }
-        if (info1.getSelector() != null && !info1.getSelector().equals(info2.getSelector())) {
-            return true;
-        }
-        return !info1.getDestination().equals(info2.getDestination());
-    }
-
-    @Override
-    protected Set<ActiveMQDestination> getInactiveDestinations() {
-        Set<ActiveMQDestination> inactiveDestinations = super.getInactiveDestinations();
-        for (Iterator<ActiveMQDestination> iter = inactiveDestinations.iterator(); iter.hasNext();) {
-            ActiveMQDestination dest = iter.next();
-            if (!dest.isTopic()) {
-                iter.remove();
-            }
-        }
-        return inactiveDestinations;
-    }
-
-    public boolean isKeepDurableSubsActive() {
-        return keepDurableSubsActive;
-    }
-
-    public void setKeepDurableSubsActive(boolean keepDurableSubsActive) {
-        this.keepDurableSubsActive = keepDurableSubsActive;
-    }
-
-    public boolean durableSubscriptionExists(SubscriptionKey key) {
-        return this.durableSubscriptions.containsKey(key);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
deleted file mode 100755
index ca26cae..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.concurrent.atomic.AtomicLong;
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.cursors.FilePendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-import org.apache.activemq.broker.region.policy.MessageEvictionStrategy;
-import org.apache.activemq.broker.region.policy.OldestMessageEvictionStrategy;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TopicSubscription extends AbstractSubscription {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TopicSubscription.class);
-    private static final AtomicLong CURSOR_NAME_COUNTER = new AtomicLong(0);
-    
-    protected PendingMessageCursor matched;
-    protected final SystemUsage usageManager;
-    protected AtomicLong dispatchedCounter = new AtomicLong();
-       
-    boolean singleDestination = true;
-    Destination destination;
-
-    private int maximumPendingMessages = -1;
-    private MessageEvictionStrategy messageEvictionStrategy = new OldestMessageEvictionStrategy();
-    private int discarded;
-    private final Object matchedListMutex = new Object();
-    private final AtomicLong enqueueCounter = new AtomicLong(0);
-    private final AtomicLong dequeueCounter = new AtomicLong(0);
-    private int memoryUsageHighWaterMark = 95;
-    // allow duplicate suppression in a ring network of brokers
-    protected int maxProducersToAudit = 1024;
-    protected int maxAuditDepth = 1000;
-    protected boolean enableAudit = false;
-    protected ActiveMQMessageAudit audit;
-    protected boolean active = false;
-
-    public TopicSubscription(Broker broker,ConnectionContext context, ConsumerInfo info, SystemUsage usageManager) throws Exception {
-        super(broker, context, info);
-        this.usageManager = usageManager;
-        String matchedName = "TopicSubscription:" + CURSOR_NAME_COUNTER.getAndIncrement() + "[" + info.getConsumerId().toString() + "]";
-        if (info.getDestination().isTemporary() || broker == null || broker.getTempDataStore()==null ) {
-            this.matched = new VMPendingMessageCursor(false);
-        } else {
-            this.matched = new FilePendingMessageCursor(broker,matchedName,false);
-        }
-    }
-
-    public void init() throws Exception {
-        this.matched.setSystemUsage(usageManager);
-        this.matched.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
-        this.matched.start();
-        if (enableAudit) {
-            audit= new ActiveMQMessageAudit(maxAuditDepth, maxProducersToAudit);
-        }
-        this.active=true;
-    }
-
-    public void add(MessageReference node) throws Exception {
-        if (isDuplicate(node)) {
-            return;
-        }
-        enqueueCounter.incrementAndGet();
-        if (!isFull() && matched.isEmpty()  && !isSlave()) {
-            // if maximumPendingMessages is set we will only discard messages which
-            // have not been dispatched (i.e. we allow the prefetch buffer to be filled)
-            dispatch(node);
-            setSlowConsumer(false);
-        } else {
-            //we are slow
-            if(!isSlowConsumer()) {
-                setSlowConsumer(true);
-                for (Destination dest: destinations) {
-                    dest.slowConsumer(getContext(), this);
-                }
-            }
-            if (maximumPendingMessages != 0) {
-                boolean warnedAboutWait = false;
-                while (active) {
-                    synchronized (matchedListMutex) {
-                        while (matched.isFull()) {
-                            if (getContext().getStopping().get()) {
-                                LOG.warn(toString() + ": stopped waiting for space in pendingMessage cursor for: "
-                                        + node.getMessageId());
-                                enqueueCounter.decrementAndGet();
-                                return;
-                            }
-                            if (!warnedAboutWait) {
-                                LOG.info(toString() + ": Pending message cursor [" + matched
-                                        + "] is full, temp usage ("
-                                        + +matched.getSystemUsage().getTempUsage().getPercentUsage()
-                                        + "%) or memory usage ("
-                                        + matched.getSystemUsage().getMemoryUsage().getPercentUsage()
-                                        + "%) limit reached, blocking message add() pending the release of resources.");
-                                warnedAboutWait = true;
-                            }
-                            matchedListMutex.wait(20);
-                        }
-                        //Temporary storage could be full - so just try to add the message
-                        //see https://issues.apache.org/activemq/browse/AMQ-2475
-                        if (matched.tryAddMessageLast(node, 10)) {
-                            break;
-                        }
-                    }
-                }
-                synchronized (matchedListMutex) {
-                    
-                    // NOTE - be careful about the slaveBroker!
-                    if (maximumPendingMessages > 0) {
-                        // calculate the high water mark from which point we
-                        // will eagerly evict expired messages
-                        int max = messageEvictionStrategy.getEvictExpiredMessagesHighWatermark();
-                        if (maximumPendingMessages > 0 && maximumPendingMessages < max) {
-                            max = maximumPendingMessages;
-                        }
-                        if (!matched.isEmpty() && matched.size() > max) {
-                            removeExpiredMessages();
-                        }
-                        // lets discard old messages as we are a slow consumer
-                        while (!matched.isEmpty() && matched.size() > maximumPendingMessages) {
-                            int pageInSize = matched.size() - maximumPendingMessages;
-                            // only page in a 1000 at a time - else we could
-                            // blow da memory
-                            pageInSize = Math.max(1000, pageInSize);
-                            LinkedList<MessageReference> list = null;
-                            MessageReference[] oldMessages=null;
-                            synchronized(matched){
-                                list = matched.pageInList(pageInSize);
-                            	oldMessages = messageEvictionStrategy.evictMessages(list);
-                            	for (MessageReference ref : list) {
-                            	    ref.decrementReferenceCount();
-                            	}
-                            }
-                            int messagesToEvict = 0;
-                            if (oldMessages != null){
-	                            messagesToEvict = oldMessages.length;
-	                            for (int i = 0; i < messagesToEvict; i++) {
-	                                MessageReference oldMessage = oldMessages[i];
-	                                discard(oldMessage);
-	                            }
-                            }
-                            // lets avoid an infinite loop if we are given a bad
-                            // eviction strategy
-                            // for a bad strategy lets just not evict
-                            if (messagesToEvict == 0) {
-                                LOG.warn("No messages to evict returned from eviction strategy: " + messageEvictionStrategy);
-                                break;
-                            }
-                        }
-                    }
-                }
-                dispatchMatched();
-            }
-        }
-    }
-
-    private boolean isDuplicate(MessageReference node) {
-        boolean duplicate = false;
-        if (enableAudit && audit != null) {
-            duplicate = audit.isDuplicate(node);
-            if (LOG.isDebugEnabled()) {
-                if (duplicate) {
-                    LOG.debug("ignoring duplicate add: " + node.getMessageId());
-                }
-            }
-        }
-        return duplicate;
-    }
-
-    /**
-     * Discard any expired messages from the matched list. Called from a
-     * synchronized block.
-     * 
-     * @throws IOException
-     */
-    protected void removeExpiredMessages() throws IOException {
-        try {
-            matched.reset();
-            while (matched.hasNext()) {
-                MessageReference node = matched.next();
-                node.decrementReferenceCount();
-                if (broker.isExpired(node)) {
-                    matched.remove();
-                    dispatchedCounter.incrementAndGet();
-                    node.decrementReferenceCount();
-                    node.getRegionDestination().getDestinationStatistics().getExpired().increment();
-                    broker.messageExpired(getContext(), node, this);
-                    break;
-                }
-            }
-        } finally {
-            matched.release();
-        }
-    }
-
-    public void processMessageDispatchNotification(MessageDispatchNotification mdn) {
-        synchronized (matchedListMutex) {
-            try {
-                matched.reset();
-                while (matched.hasNext()) {
-                    MessageReference node = matched.next();
-                    node.decrementReferenceCount();
-                    if (node.getMessageId().equals(mdn.getMessageId())) {
-                        matched.remove();
-                        dispatchedCounter.incrementAndGet();
-                        node.decrementReferenceCount();
-                        break;
-                    }
-                }
-            } finally {
-                matched.release();
-            }
-        }
-    }
-
-    public synchronized void acknowledge(final ConnectionContext context, final MessageAck ack) throws Exception {
-        // Handle the standard acknowledgment case.
-        if (ack.isStandardAck() || ack.isPoisonAck() || ack.isIndividualAck()) {
-            if (context.isInTransaction()) {
-                context.getTransaction().addSynchronization(new Synchronization() {
-
-                    @Override
-                    public void afterCommit() throws Exception {
-                       synchronized (TopicSubscription.this) {
-                            if (singleDestination && destination != null) {
-                                destination.getDestinationStatistics().getDequeues().add(ack.getMessageCount());
-                            }
-                        }
-                        dequeueCounter.addAndGet(ack.getMessageCount());
-                        dispatchMatched();
-                    }
-                });
-            } else {
-                if (singleDestination && destination != null) {
-                    destination.getDestinationStatistics().getDequeues().add(ack.getMessageCount());
-                    destination.getDestinationStatistics().getInflight().subtract(ack.getMessageCount());
-                }
-                dequeueCounter.addAndGet(ack.getMessageCount());
-            }
-            dispatchMatched();
-            return;
-        } else if (ack.isDeliveredAck()) {
-            // Message was delivered but not acknowledged: update pre-fetch
-            // counters.
-            // also. get these for a consumer expired message.
-            if (destination != null && !ack.isInTransaction()) {
-                destination.getDestinationStatistics().getDequeues().add(ack.getMessageCount());
-                destination.getDestinationStatistics().getInflight().subtract(ack.getMessageCount());   
-            }
-            dequeueCounter.addAndGet(ack.getMessageCount());
-            dispatchMatched();
-            return;
-        } else if (ack.isRedeliveredAck()) {
-            // nothing to do atm
-            return;
-        }
-        throw new JMSException("Invalid acknowledgment: " + ack);
-    }
-
-    public Response pullMessage(ConnectionContext context, MessagePull pull) throws Exception {
-        // not supported for topics
-        return null;
-    }
-
-    public int getPendingQueueSize() {
-        return matched();
-    }
-
-    public int getDispatchedQueueSize() {
-        return (int)(dispatchedCounter.get() - dequeueCounter.get());
-    }
-
-    public int getMaximumPendingMessages() {
-        return maximumPendingMessages;
-    }
-
-    public long getDispatchedCounter() {
-        return dispatchedCounter.get();
-    }
-
-    public long getEnqueueCounter() {
-        return enqueueCounter.get();
-    }
-
-    public long getDequeueCounter() {
-        return dequeueCounter.get();
-    }
-
-    /**
-     * @return the number of messages discarded due to being a slow consumer
-     */
-    public int discarded() {
-        synchronized (matchedListMutex) {
-            return discarded;
-        }
-    }
-
-    /**
-     * @return the number of matched messages (messages targeted for the
-     *         subscription but not yet able to be dispatched due to the
-     *         prefetch buffer being full).
-     */
-    public int matched() {
-        synchronized (matchedListMutex) {
-            return matched.size();
-        }
-    }
-
-    /**
-     * Sets the maximum number of pending messages that can be matched against
-     * this consumer before old messages are discarded.
-     */
-    public void setMaximumPendingMessages(int maximumPendingMessages) {
-        this.maximumPendingMessages = maximumPendingMessages;
-    }
-
-    public MessageEvictionStrategy getMessageEvictionStrategy() {
-        return messageEvictionStrategy;
-    }
-
-    /**
-     * Sets the eviction strategy used to decide which message to evict when the
-     * slow consumer needs to discard messages
-     */
-    public void setMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy) {
-        this.messageEvictionStrategy = messageEvictionStrategy;
-    }
-
-    public int getMaxProducersToAudit() {
-        return maxProducersToAudit;
-    }
-
-    public synchronized void setMaxProducersToAudit(int maxProducersToAudit) {
-        this.maxProducersToAudit = maxProducersToAudit;
-        if (audit != null) {
-            audit.setMaximumNumberOfProducersToTrack(maxProducersToAudit);
-        }
-    }
-
-    public int getMaxAuditDepth() {
-        return maxAuditDepth;
-    }
-    
-    public synchronized void setMaxAuditDepth(int maxAuditDepth) {
-        this.maxAuditDepth = maxAuditDepth;
-        if (audit != null) {
-            audit.setAuditDepth(maxAuditDepth);
-        }
-    }
-    
-    public boolean isEnableAudit() {
-        return enableAudit;
-    }
-
-    public synchronized void setEnableAudit(boolean enableAudit) {
-        this.enableAudit = enableAudit;
-        if (enableAudit && audit==null) {
-            audit = new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
-        }
-    }
-    
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    public boolean isFull() {
-        return getDispatchedQueueSize()  >= info.getPrefetchSize();
-    }
-    
-    public int getInFlightSize() {
-        return getDispatchedQueueSize();
-    }
-    
-    
-    /**
-     * @return true when 60% or more room is left for dispatching messages
-     */
-    public boolean isLowWaterMark() {
-        return getDispatchedQueueSize() <= (info.getPrefetchSize() * .4);
-    }
-
-    /**
-     * @return true when 10% or less room is left for dispatching messages
-     */
-    public boolean isHighWaterMark() {
-        return getDispatchedQueueSize() >= (info.getPrefetchSize() * .9);
-    }
-
-    /**
-     * @param memoryUsageHighWaterMark the memoryUsageHighWaterMark to set
-     */
-    public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark) {
-        this.memoryUsageHighWaterMark = memoryUsageHighWaterMark;
-    }
-
-    /**
-     * @return the memoryUsageHighWaterMark
-     */
-    public int getMemoryUsageHighWaterMark() {
-        return this.memoryUsageHighWaterMark;
-    }
-
-    /**
-     * @return the usageManager
-     */
-    public SystemUsage getUsageManager() {
-        return this.usageManager;
-    }
-
-    /**
-     * @return the matched
-     */
-    public PendingMessageCursor getMatched() {
-        return this.matched;
-    }
-
-    /**
-     * @param matched the matched to set
-     */
-    public void setMatched(PendingMessageCursor matched) {
-        this.matched = matched;
-    }
-
-    /**
-     * inform the MessageConsumer on the client to change it's prefetch
-     * 
-     * @param newPrefetch
-     */
-    public void updateConsumerPrefetch(int newPrefetch) {
-        if (context != null && context.getConnection() != null && context.getConnection().isManageable()) {
-            ConsumerControl cc = new ConsumerControl();
-            cc.setConsumerId(info.getConsumerId());
-            cc.setPrefetch(newPrefetch);
-            context.getConnection().dispatchAsync(cc);
-        }
-    }
-
-    private void dispatchMatched() throws IOException {       
-        synchronized (matchedListMutex) {
-            if (!matched.isEmpty() && !isFull()) {
-                try {
-                    matched.reset();
-                   
-                    while (matched.hasNext() && !isFull()) {
-                        MessageReference message = matched.next();
-                        message.decrementReferenceCount();
-                        matched.remove();
-                        // Message may have been sitting in the matched list a
-                        // while
-                        // waiting for the consumer to ak the message.
-                        if (message.isExpired()) {
-                            discard(message);
-                            continue; // just drop it.
-                        }
-                        dispatch(message);
-                    }
-                } finally {
-                    matched.release();
-                }
-            }
-        }
-    }
-
-    private void dispatch(final MessageReference node) throws IOException {
-        Message message = (Message)node;
-        node.incrementReferenceCount();
-        // Make sure we can dispatch a message.
-        MessageDispatch md = new MessageDispatch();
-        md.setMessage(message);
-        md.setConsumerId(info.getConsumerId());
-        md.setDestination(node.getRegionDestination().getActiveMQDestination());
-        dispatchedCounter.incrementAndGet();
-        // Keep track if this subscription is receiving messages from a single
-        // destination.
-        if (singleDestination) {
-            if (destination == null) {
-                destination = node.getRegionDestination();
-            } else {
-                if (destination != node.getRegionDestination()) {
-                    singleDestination = false;
-                }
-            }
-        }
-        if (info.isDispatchAsync()) {
-            md.setTransmitCallback(new Runnable() {
-
-                public void run() {
-                    node.getRegionDestination().getDestinationStatistics().getDispatched().increment();
-                    node.getRegionDestination().getDestinationStatistics().getInflight().increment();
-                    node.decrementReferenceCount();
-                }
-            });
-            context.getConnection().dispatchAsync(md);
-        } else {
-            context.getConnection().dispatchSync(md);
-            node.getRegionDestination().getDestinationStatistics().getDispatched().increment();
-            node.getRegionDestination().getDestinationStatistics().getInflight().increment();
-            node.decrementReferenceCount();
-        }
-    }
-
-    private void discard(MessageReference message) {
-        message.decrementReferenceCount();
-        matched.remove(message);
-        discarded++;
-        if(destination != null) {
-            destination.getDestinationStatistics().getDequeues().increment();
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Discarding message " + message);
-        }
-        Destination dest = message.getRegionDestination();
-        if (dest != null) {
-            dest.messageDiscarded(getContext(), this, message);
-        }
-        broker.getRoot().sendToDeadLetterQueue(getContext(), message, this);
-    }
-
-    @Override
-    public String toString() {
-        return "TopicSubscription:" + " consumer=" + info.getConsumerId() + ", destinations=" + destinations.size() + ", dispatched=" + getDispatchedQueueSize() + ", delivered="
-               + getDequeueCounter() + ", matched=" + matched() + ", discarded=" + discarded();
-    }
-
-    public void destroy() {
-        this.active=false;
-        synchronized (matchedListMutex) {
-            try {
-                matched.destroy();
-            } catch (Exception e) {
-                LOG.warn("Failed to destroy cursor", e);
-            }
-        }
-        setSlowConsumer(false);
-    }
-
-    @Override
-    public int getPrefetchSize() {
-        return info.getPrefetchSize();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java
deleted file mode 100755
index caa2d5e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.BaseDestination;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * Abstract method holder for pending message (messages awaiting disptach to a
- * consumer) cursor
- * 
- * 
- */
-public abstract class AbstractPendingMessageCursor implements PendingMessageCursor {
-    protected int memoryUsageHighWaterMark = 70;
-    protected int maxBatchSize = BaseDestination.MAX_PAGE_SIZE;
-    protected SystemUsage systemUsage;
-    protected int maxProducersToAudit = BaseDestination.MAX_PRODUCERS_TO_AUDIT;
-    protected int maxAuditDepth = BaseDestination.MAX_AUDIT_DEPTH;
-    protected boolean enableAudit=true;
-    protected ActiveMQMessageAudit audit;
-    protected boolean useCache=true;
-    private boolean cacheEnabled=true;
-    private boolean started=false;
-    protected MessageReference last = null;
-    protected final boolean prioritizedMessages;
-    
-    public AbstractPendingMessageCursor(boolean prioritizedMessages) {
-        this.prioritizedMessages=prioritizedMessages;
-    }
-  
-
-    public synchronized void start() throws Exception  {
-        if (!started && enableAudit && audit==null) {
-            audit= new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
-        }
-        started=true;
-    }
-
-    public synchronized void stop() throws Exception  {
-        started=false;
-        audit=null;
-        gc();
-    }
-
-    public void add(ConnectionContext context, Destination destination) throws Exception {
-    }
-
-    @SuppressWarnings("unchecked")
-    public List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception {
-        return Collections.EMPTY_LIST;
-    }
-
-    public boolean isRecoveryRequired() {
-        return true;
-    }
-
-    public void addMessageFirst(MessageReference node) throws Exception {
-    }
-
-    public void addMessageLast(MessageReference node) throws Exception {
-    }
-    
-    public boolean tryAddMessageLast(MessageReference node, long maxWaitTime) throws Exception {
-        addMessageLast(node);
-        return true;
-    }
-
-    public void addRecoveredMessage(MessageReference node) throws Exception {
-        addMessageLast(node);
-    }
-
-    public void clear() {
-    }
-
-    public boolean hasNext() {
-        return false;
-    }
-
-    public boolean isEmpty() {
-        return false;
-    }
-
-    public boolean isEmpty(Destination destination) {
-        return isEmpty();
-    }
-
-    public MessageReference next() {
-        return null;
-    }
-
-    public void remove() {
-    }
-
-    public void reset() {
-    }
-
-    public int size() {
-        return 0;
-    }
-
-    public int getMaxBatchSize() {
-        return maxBatchSize;
-    }
-
-    public void setMaxBatchSize(int maxBatchSize) {
-        this.maxBatchSize = maxBatchSize;
-    }
-
-    protected void fillBatch() throws Exception {
-    }
-
-    public void resetForGC() {
-        reset();
-    }
-
-    public void remove(MessageReference node) {
-    }
-
-    public void gc() {
-    }
-
-    public void setSystemUsage(SystemUsage usageManager) {
-        this.systemUsage = usageManager;
-    }
-
-    public boolean hasSpace() {
-        return systemUsage != null ? (systemUsage.getMemoryUsage().getPercentUsage() < memoryUsageHighWaterMark) : true;
-    }
-
-    public boolean isFull() {
-        return systemUsage != null ? systemUsage.getMemoryUsage().isFull() : false;
-    }
-
-    public void release() {
-    }
-
-    public boolean hasMessagesBufferedToDeliver() {
-        return false;
-    }
-
-    /**
-     * @return the memoryUsageHighWaterMark
-     */
-    public int getMemoryUsageHighWaterMark() {
-        return memoryUsageHighWaterMark;
-    }
-
-    /**
-     * @param memoryUsageHighWaterMark the memoryUsageHighWaterMark to set
-     */
-    public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark) {
-        this.memoryUsageHighWaterMark = memoryUsageHighWaterMark;
-    }
-
-    /**
-     * @return the usageManager
-     */
-    public SystemUsage getSystemUsage() {
-        return this.systemUsage;
-    }
-
-    /**
-     * destroy the cursor
-     * 
-     * @throws Exception
-     */
-    public void destroy() throws Exception {
-        stop();
-    }
-
-    /**
-     * Page in a restricted number of messages
-     * 
-     * @param maxItems maximum number of messages to return
-     * @return a list of paged in messages
-     */
-    public LinkedList<MessageReference> pageInList(int maxItems) {
-        throw new RuntimeException("Not supported");
-    }
-
-    /**
-     * @return the maxProducersToAudit
-     */
-    public int getMaxProducersToAudit() {
-        return maxProducersToAudit;
-    }
-
-    /**
-     * @param maxProducersToAudit the maxProducersToAudit to set
-     */
-    public synchronized void setMaxProducersToAudit(int maxProducersToAudit) {
-        this.maxProducersToAudit = maxProducersToAudit;
-        if (audit != null) {
-            audit.setMaximumNumberOfProducersToTrack(maxProducersToAudit);
-        }
-    }
-
-    /**
-     * @return the maxAuditDepth
-     */
-    public int getMaxAuditDepth() {
-        return maxAuditDepth;
-    }
-    
-
-    /**
-     * @param maxAuditDepth the maxAuditDepth to set
-     */
-    public synchronized void setMaxAuditDepth(int maxAuditDepth) {
-        this.maxAuditDepth = maxAuditDepth;
-        if (audit != null) {
-            audit.setAuditDepth(maxAuditDepth);
-        }
-    }
-    
-    
-    /**
-     * @return the enableAudit
-     */
-    public boolean isEnableAudit() {
-        return enableAudit;
-    }
-
-    /**
-     * @param enableAudit the enableAudit to set
-     */
-    public synchronized void setEnableAudit(boolean enableAudit) {
-        this.enableAudit = enableAudit;
-        if (enableAudit && started && audit==null) {
-            audit= new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
-        }
-    }
-    
-    public boolean isTransient() {
-        return false;
-    }
-    
-       
-    /**
-     * set the audit
-     * @param audit new audit component
-     */
-    public void setMessageAudit(ActiveMQMessageAudit audit) {
-    	this.audit=audit;
-    }
-    
-    
-    /**
-     * @return the audit
-     */
-    public ActiveMQMessageAudit getMessageAudit() {
-    	return audit;
-    }
-    
-    public boolean isUseCache() {
-        return useCache;
-    }
-
-    public void setUseCache(boolean useCache) {
-        this.useCache = useCache;
-    }
-
-    public synchronized boolean isDuplicate(MessageId messageId) {
-        boolean unique = recordUniqueId(messageId);
-        rollback(messageId);
-        return !unique;
-    }
-    
-    /**
-     * records a message id and checks if it is a duplicate
-     * @param messageId
-     * @return true if id is unique, false otherwise.
-     */
-    public synchronized boolean recordUniqueId(MessageId messageId) {
-        if (!enableAudit || audit==null) {
-            return true;
-        }
-        return !audit.isDuplicate(messageId);
-    }
-    
-    public synchronized void rollback(MessageId id) {
-        if (audit != null) {
-            audit.rollback(id);
-        }
-    }
-    
-    protected synchronized boolean isStarted() {
-        return started;
-    }
-    
-    public static boolean isPrioritizedMessageSubscriber(Broker broker,Subscription sub) {
-        boolean result = false;
-        Set<Destination> destinations = broker.getDestinations(sub.getActiveMQDestination());
-        if (destinations != null) {
-            for (Destination dest:destinations) {
-                if (dest.isPrioritizedMessages()) {
-                    result = true;
-                    break;
-                }
-            }
-        }
-        return result;
-
-    }
-
-    public synchronized boolean isCacheEnabled() {
-        return cacheEnabled;
-    }
-
-    public synchronized void setCacheEnabled(boolean val) {
-        cacheEnabled = val;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java
deleted file mode 100644
index 3fba275..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.util.Iterator;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *  Store based cursor
- *
- */
-public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor implements MessageRecoveryListener {
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractStoreCursor.class);
-    protected final Destination regionDestination;
-    private final PendingList batchList;
-    private Iterator<MessageReference> iterator = null;
-    protected boolean batchResetNeeded = true;
-    private boolean storeHasMessages = false;
-    protected int size;
-    private MessageId lastCachedId;
-    private boolean hadSpace = false;
-
-    protected AbstractStoreCursor(Destination destination) {
-        super((destination != null ? destination.isPrioritizedMessages():false));
-        this.regionDestination=destination;
-        if (this.prioritizedMessages) {
-            this.batchList= new PrioritizedPendingList();
-        } else {
-            this.batchList = new OrderedPendingList();
-        }
-    }
-    
-    
-    public final synchronized void start() throws Exception{
-        if (!isStarted()) {
-            clear();
-            super.start();      
-            resetBatch();
-            this.size = getStoreSize();
-            this.storeHasMessages=this.size > 0;
-            setCacheEnabled(!this.storeHasMessages&&useCache);
-        } 
-    }
-    
-    
-    public final synchronized void stop() throws Exception {
-        resetBatch();
-        super.stop();
-        gc();
-    }
-
-    
-    public final boolean recoverMessage(Message message) throws Exception {
-        return recoverMessage(message,false);
-    }
-    
-    public synchronized boolean recoverMessage(Message message, boolean cached) throws Exception {
-        boolean recovered = false;
-        if (recordUniqueId(message.getMessageId())) {
-            if (!cached) {
-                message.setRegionDestination(regionDestination);
-                if( message.getMemoryUsage()==null ) {
-                    message.setMemoryUsage(this.getSystemUsage().getMemoryUsage());
-                }
-            }
-            message.incrementReferenceCount();
-            batchList.addMessageLast(message);
-            clearIterator(true);
-            recovered = true;
-            storeHasMessages = true;
-        } else {
-            /*
-             * we should expect to get these - as the message is recorded as it before it goes into
-             * the cache. If subsequently, we pull out that message from the store (before its deleted)
-             * it will be a duplicate - but should be ignored
-             */
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(this + " - cursor got duplicate: " + message.getMessageId() + ", " + message.getPriority());
-            }
-        }
-        return recovered;
-    }
-    
-    
-    public final void reset() {
-        if (batchList.isEmpty()) {
-            try {
-                fillBatch();
-            } catch (Exception e) {
-                LOG.error(this + " - Failed to fill batch", e);
-                throw new RuntimeException(e);
-            }
-        }
-        clearIterator(true);
-        size();
-    }
-    
-    
-    public synchronized void release() {
-        clearIterator(false);
-    }
-    
-    private synchronized void clearIterator(boolean ensureIterator) {
-        boolean haveIterator = this.iterator != null;
-        this.iterator=null;
-        if(haveIterator&&ensureIterator) {
-            ensureIterator();
-        }
-    }
-    
-    private synchronized void ensureIterator() {
-        if(this.iterator==null) {
-            this.iterator=this.batchList.iterator();
-        }
-    }
-
-
-    public final void finished() {
-    }
-        
-    
-    public final synchronized boolean hasNext() {
-        if (batchList.isEmpty()) {
-            try {
-                fillBatch();
-            } catch (Exception e) {
-                LOG.error(this + " - Failed to fill batch", e);
-                throw new RuntimeException(e);
-            }
-        }
-        ensureIterator();
-        return this.iterator.hasNext();
-    }
-    
-    
-    public final synchronized MessageReference next() {
-        MessageReference result = null;
-        if (!this.batchList.isEmpty()&&this.iterator.hasNext()) {
-            result = this.iterator.next();
-        }
-        last = result;
-        if (result != null) {
-            result.incrementReferenceCount();
-        }
-        return result;
-    }
-    
-    
-    public final synchronized void addMessageLast(MessageReference node) throws Exception {
-        if (hasSpace()) {
-            if (!isCacheEnabled() && size==0 && isStarted() && useCache) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace(this + " - enabling cache for empty store " + node.getMessageId());
-                }
-                setCacheEnabled(true);
-            }
-            if (isCacheEnabled()) {
-                recoverMessage(node.getMessage(),true);
-                lastCachedId = node.getMessageId();
-            }
-        } else if (isCacheEnabled()) {
-            setCacheEnabled(false);
-            // sync with store on disabling the cache
-            if (lastCachedId != null) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace(this + " - disabling cache"
-                            + ", lastCachedId: " + lastCachedId
-                            + " current node Id: " + node.getMessageId());
-                }
-                setBatch(lastCachedId);
-                lastCachedId = null;
-            }
-        }
-        this.storeHasMessages = true;
-        size++;
-    }
-
-    protected void setBatch(MessageId messageId) throws Exception {
-    }
-
-    
-    public final synchronized void addMessageFirst(MessageReference node) throws Exception {
-        setCacheEnabled(false);
-        size++;
-    }
-
-    
-    public final synchronized void remove() {
-        size--;
-        if (iterator!=null) {
-            iterator.remove();
-        }
-        if (last != null) {
-            last.decrementReferenceCount();
-        }
-    }
-
-    
-    public final synchronized void remove(MessageReference node) {
-        size--;
-        setCacheEnabled(false);
-        batchList.remove(node);
-    }
-    
-    
-    public final synchronized void clear() {
-        gc();
-    }
-    
-    
-    public synchronized void gc() {
-        for (Iterator<MessageReference>i = batchList.iterator();i.hasNext();) {
-            MessageReference msg = i.next();
-            rollback(msg.getMessageId());
-            msg.decrementReferenceCount();
-        }
-        batchList.clear();
-        clearIterator(false);
-        batchResetNeeded = true;
-        setCacheEnabled(false);
-    }
-
-    @Override
-    public boolean hasSpace() {
-        hadSpace = super.hasSpace();
-        return hadSpace;
-    }
-
-    protected final synchronized void fillBatch() {
-        if (LOG.isTraceEnabled()) {
-            LOG.trace(this + " - fillBatch");
-        }
-        if (batchResetNeeded) {
-            resetBatch();
-            this.batchResetNeeded = false;
-        }
-        if (this.batchList.isEmpty() && this.storeHasMessages && this.size >0) {
-            this.storeHasMessages = false;
-            try {
-                doFillBatch();
-            } catch (Exception e) {
-                LOG.error(this + " - Failed to fill batch", e);
-                throw new RuntimeException(e);
-            }
-            if (!this.batchList.isEmpty() || !hadSpace) {
-                this.storeHasMessages=true;
-            }
-        }
-    }
-    
-    
-    public final synchronized boolean isEmpty() {
-        // negative means more messages added to store through queue.send since last reset
-        return size == 0;
-    }
-
-    
-    public final synchronized boolean hasMessagesBufferedToDeliver() {
-        return !batchList.isEmpty();
-    }
-
-    
-    public final synchronized int size() {
-        if (size < 0) {
-            this.size = getStoreSize();
-        }
-        return size;
-    }
-
-    public String toString() {
-        return regionDestination.getActiveMQDestination().getPhysicalName() + ",batchResetNeeded=" + batchResetNeeded
-                    + ",storeHasMessages=" + this.storeHasMessages + ",size=" + this.size + ",cacheEnabled=" + isCacheEnabled();
-    }
-    
-    protected abstract void doFillBatch() throws Exception;
-    
-    protected abstract void resetBatch();
-    
-    protected abstract int getStoreSize();
-    
-    protected abstract boolean isStoreEmpty();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
deleted file mode 100755
index dbccb25..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
+++ /dev/null
@@ -1,524 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.QueueMessageReference;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.store.kahadb.plist.PList;
-import org.apache.activemq.store.kahadb.plist.PListEntry;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.usage.Usage;
-import org.apache.activemq.usage.UsageListener;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.util.ByteSequence;
-
-/**
- * persist pending messages pending message (messages awaiting dispatch to a
- * consumer) cursor
- * 
- * 
- */
-public class FilePendingMessageCursor extends AbstractPendingMessageCursor implements UsageListener {
-    static final Logger LOG = LoggerFactory.getLogger(FilePendingMessageCursor.class);
-    private static final AtomicLong NAME_COUNT = new AtomicLong();
-    protected Broker broker;
-    private final PListStore store;
-    private final String name;
-    private LinkedList<MessageReference> memoryList = new LinkedList<MessageReference>();
-    private PList diskList;
-    private Iterator<MessageReference> iter;
-    private Destination regionDestination;
-    private boolean iterating;
-    private boolean flushRequired;
-    private final AtomicBoolean started = new AtomicBoolean();
-    private final WireFormat wireFormat = new OpenWireFormat();
-    /**
-     * @param broker
-     * @param name
-     * @param prioritizedMessages
-     */
-    public FilePendingMessageCursor(Broker broker, String name, boolean prioritizedMessages) {
-        super(prioritizedMessages);
-        this.broker = broker;
-        // the store can be null if the BrokerService has persistence
-        // turned off
-        this.store = broker.getTempDataStore();
-        this.name = NAME_COUNT.incrementAndGet() + "_" + name;
-    }
-
-    @Override
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-            super.start();
-            if (systemUsage != null) {
-                systemUsage.getMemoryUsage().addUsageListener(this);
-            }
-        }
-    }
-
-    @Override
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            super.stop();
-            if (systemUsage != null) {
-                systemUsage.getMemoryUsage().removeUsageListener(this);
-            }
-        }
-    }
-
-    /**
-     * @return true if there are no pending messages
-     */
-    @Override
-    public synchronized boolean isEmpty() {
-        if (memoryList.isEmpty() && isDiskListEmpty()) {
-            return true;
-        }
-        for (Iterator<MessageReference> iterator = memoryList.iterator(); iterator.hasNext();) {
-            MessageReference node = iterator.next();
-            if (node == QueueMessageReference.NULL_MESSAGE) {
-                continue;
-            }
-            if (!node.isDropped()) {
-                return false;
-            }
-            // We can remove dropped references.
-            iterator.remove();
-        }
-        return isDiskListEmpty();
-    }
-
-    /**
-     * reset the cursor
-     */
-    @Override
-    public synchronized void reset() {
-        iterating = true;
-        last = null;
-        if (isDiskListEmpty()) {
-            this.iter = this.memoryList.iterator();
-        } else {
-            this.iter = new DiskIterator();
-        }
-    }
-
-    @Override
-    public synchronized void release() {
-        iterating = false;
-        if (flushRequired) {
-            flushRequired = false;
-            flushToDisk();
-        }
-    }
-
-    @Override
-    public synchronized void destroy() throws Exception {
-        stop();
-        for (Iterator<MessageReference> i = memoryList.iterator(); i.hasNext();) {
-            Message node = (Message) i.next();
-            node.decrementReferenceCount();
-        }
-        memoryList.clear();
-        destroyDiskList();
-    }
-
-    private void destroyDiskList() throws Exception {
-        if (!isDiskListEmpty()) {
-            store.removePList(name);
-        }
-    }
-
-    @Override
-    public synchronized LinkedList<MessageReference> pageInList(int maxItems) {
-        LinkedList<MessageReference> result = new LinkedList<MessageReference>();
-        int count = 0;
-        for (Iterator<MessageReference> i = memoryList.iterator(); i.hasNext() && count < maxItems;) {
-            MessageReference ref = i.next();
-            ref.incrementReferenceCount();
-            result.add(ref);
-            count++;
-        }
-        if (count < maxItems && !isDiskListEmpty()) {
-            for (Iterator<MessageReference> i = new DiskIterator(); i.hasNext() && count < maxItems;) {
-                Message message = (Message) i.next();
-                message.setRegionDestination(regionDestination);
-                message.setMemoryUsage(this.getSystemUsage().getMemoryUsage());
-                message.incrementReferenceCount();
-                result.add(message);
-                count++;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * add message to await dispatch
-     * 
-     * @param node
-     * @throws Exception 
-     */
-    @Override
-    public synchronized void addMessageLast(MessageReference node) throws Exception {
-        tryAddMessageLast(node, 0);
-    }
-    
-    @Override
-    public synchronized boolean tryAddMessageLast(MessageReference node, long maxWaitTime) throws Exception {
-        if (!node.isExpired()) {
-            try {
-                regionDestination = node.getMessage().getRegionDestination();
-                if (isDiskListEmpty()) {
-                    if (hasSpace() || this.store == null) {
-                        memoryList.add(node);
-                        node.incrementReferenceCount();
-                        setCacheEnabled(true);
-                        return true;
-                    }
-                }
-                if (!hasSpace()) {
-                    if (isDiskListEmpty()) {
-                        expireOldMessages();
-                        if (hasSpace()) {
-                            memoryList.add(node);
-                            node.incrementReferenceCount();
-                            return true;
-                        } else {
-                            flushToDisk();
-                        }
-                    }
-                }
-                if (systemUsage.getTempUsage().waitForSpace(maxWaitTime)) {
-                    ByteSequence bs = getByteSequence(node.getMessage());
-                    getDiskList().addLast(node.getMessageId().toString(), bs);
-                    return true;
-                }
-                return false;
-
-            } catch (Exception e) {
-                LOG.error("Caught an Exception adding a message: " + node + " first to FilePendingMessageCursor ", e);
-                throw new RuntimeException(e);
-            }
-        } else {
-            discard(node);
-        }
-        //message expired
-        return true;
-    }
-
-    /**
-     * add message to await dispatch
-     * 
-     * @param node
-     */
-    @Override
-    public synchronized void addMessageFirst(MessageReference node) {
-        if (!node.isExpired()) {
-            try {
-                regionDestination = node.getMessage().getRegionDestination();
-                if (isDiskListEmpty()) {
-                    if (hasSpace()) {
-                        memoryList.addFirst(node);
-                        node.incrementReferenceCount();
-                        setCacheEnabled(true);
-                        return;
-                    }
-                }
-                if (!hasSpace()) {
-                    if (isDiskListEmpty()) {
-                        expireOldMessages();
-                        if (hasSpace()) {
-                            memoryList.addFirst(node);
-                            node.incrementReferenceCount();
-                            return;
-                        } else {
-                            flushToDisk();
-                        }
-                    }
-                }
-                systemUsage.getTempUsage().waitForSpace();
-                node.decrementReferenceCount();
-                ByteSequence bs = getByteSequence(node.getMessage());
-                getDiskList().addFirst(node.getMessageId().toString(), bs);
-
-            } catch (Exception e) {
-                LOG.error("Caught an Exception adding a message: " + node + " first to FilePendingMessageCursor ", e);
-                throw new RuntimeException(e);
-            }
-        } else {
-            discard(node);
-        }
-    }
-
-    /**
-     * @return true if there pending messages to dispatch
-     */
-    @Override
-    public synchronized boolean hasNext() {
-        return iter.hasNext();
-    }
-
-    /**
-     * @return the next pending message
-     */
-    @Override
-    public synchronized MessageReference next() {
-        Message message = (Message) iter.next();
-        last = message;
-        if (!isDiskListEmpty()) {
-            // got from disk
-            message.setRegionDestination(regionDestination);
-            message.setMemoryUsage(this.getSystemUsage().getMemoryUsage());
-        }
-        message.incrementReferenceCount();
-        return message;
-    }
-
-    /**
-     * remove the message at the cursor position
-     */
-    @Override
-    public synchronized void remove() {
-        iter.remove();
-        if (last != null) {
-            last.decrementReferenceCount();
-        }
-    }
-
-    /**
-     * @param node
-     * @see org.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor#remove(org.apache.activemq.broker.region.MessageReference)
-     */
-    @Override
-    public synchronized void remove(MessageReference node) {
-        if (memoryList.remove(node)) {
-            node.decrementReferenceCount();
-        }
-        if (!isDiskListEmpty()) {
-            try {
-                getDiskList().remove(node.getMessageId().toString());
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
-    /**
-     * @return the number of pending messages
-     */
-    @Override
-    public synchronized int size() {
-        return memoryList.size() + (isDiskListEmpty() ? 0 : getDiskList().size());
-    }
-
-    /**
-     * clear all pending messages
-     */
-    @Override
-    public synchronized void clear() {
-        memoryList.clear();
-        if (!isDiskListEmpty()) {
-            try {
-                getDiskList().destroy();
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-        }
-        last = null;
-    }
-
-    @Override
-    public synchronized boolean isFull() {
-
-        return super.isFull() || (systemUsage != null && systemUsage.getTempUsage().isFull());
-
-    }
-
-    @Override
-    public boolean hasMessagesBufferedToDeliver() {
-        return !isEmpty();
-    }
-
-    @Override
-    public void setSystemUsage(SystemUsage usageManager) {
-        super.setSystemUsage(usageManager);
-    }
-
-    public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
-        if (newPercentUsage >= getMemoryUsageHighWaterMark()) {
-            synchronized (this) {
-                flushRequired = true;
-                if (!iterating) {
-                    expireOldMessages();
-                    if (!hasSpace()) {
-                        flushToDisk();
-                        flushRequired = false;
-                    }
-                }
-            }
-        }
-    }
-
-    @Override
-    public boolean isTransient() {
-        return true;
-    }
-
-    protected boolean isSpaceInMemoryList() {
-        return hasSpace() && isDiskListEmpty();
-    }
-
-    protected synchronized void expireOldMessages() {
-        if (!memoryList.isEmpty()) {
-            LinkedList<MessageReference> tmpList = new LinkedList<MessageReference>(this.memoryList);
-            this.memoryList = new LinkedList<MessageReference>();
-            while (!tmpList.isEmpty()) {
-                MessageReference node = tmpList.removeFirst();
-                if (node.isExpired()) {
-                    discard(node);
-                } else {
-                    memoryList.add(node);
-                }
-            }
-        }
-
-    }
-
-    protected synchronized void flushToDisk() {
-
-        if (!memoryList.isEmpty()) {
-            while (!memoryList.isEmpty()) {
-                MessageReference node = memoryList.removeFirst();
-                node.decrementReferenceCount();
-                ByteSequence bs;
-                try {
-                    bs = getByteSequence(node.getMessage());
-                    getDiskList().addLast(node.getMessageId().toString(), bs);
-                } catch (IOException e) {
-                    LOG.error("Failed to write to disk list", e);
-                    throw new RuntimeException(e);
-                }
-
-            }
-            memoryList.clear();
-            setCacheEnabled(false);
-        }
-    }
-
-    protected boolean isDiskListEmpty() {
-        return diskList == null || diskList.isEmpty();
-    }
-
-    protected PList getDiskList() {
-        if (diskList == null) {
-            try {
-                diskList = store.getPList(name);
-            } catch (Exception e) {
-                LOG.error("Caught an IO Exception getting the DiskList " + name, e);
-                throw new RuntimeException(e);
-            }
-        }
-        return diskList;
-    }
-
-    protected void discard(MessageReference message) {
-        message.decrementReferenceCount();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Discarding message " + message);
-        }
-        ConnectionContext ctx = new ConnectionContext(new NonCachedMessageEvaluationContext());
-        ctx.setBroker(broker);
-        broker.getRoot().sendToDeadLetterQueue(ctx, message, null);
-    }
-
-    protected ByteSequence getByteSequence(Message message) throws IOException {
-        org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(message);
-        return new ByteSequence(packet.data, packet.offset, packet.length);
-    }
-
-    protected Message getMessage(ByteSequence bs) throws IOException {
-        org.apache.activemq.util.ByteSequence packet = new org.apache.activemq.util.ByteSequence(bs.getData(), bs
-                .getOffset(), bs.getLength());
-        return (Message) this.wireFormat.unmarshal(packet);
-
-    }
-
-    final class DiskIterator implements Iterator<MessageReference> {
-        private PListEntry next = null;
-        private PListEntry current = null;
-        PList list;
-
-        DiskIterator() {
-            try {
-                this.list = getDiskList();
-                synchronized (this.list) {
-                    this.current = this.list.getFirst();
-                    this.next = this.current;
-                }
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        public boolean hasNext() {
-            return this.next != null;
-        }
-
-        public MessageReference next() {
-            this.current = next;
-            try {
-                ByteSequence bs = this.current.getByteSequence();
-                synchronized (this.list) {
-                    this.current = this.list.refresh(this.current);
-                    this.next = this.list.getNext(this.current);
-                }
-                return getMessage(bs);
-            } catch (IOException e) {
-                LOG.error("I/O error", e);
-                throw new RuntimeException(e);
-            }
-        }
-
-        public void remove() {
-            try {
-                synchronized (this.list) {
-                    this.current = this.list.refresh(this.current);
-                    this.list.remove(this.current);
-                }
-
-            } catch (IOException e) {
-                LOG.error("I/O error", e);
-                throw new RuntimeException(e);
-            }
-
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/OrderedPendingList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/OrderedPendingList.java
deleted file mode 100644
index 4a9c6e4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/OrderedPendingList.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.MessageId;
-
-public class OrderedPendingList implements PendingList {
-    PendingNode root = null;
-    PendingNode tail = null;
-    final Map<MessageId, PendingNode> map = new HashMap<MessageId, PendingNode>();
-
-    public PendingNode addMessageFirst(MessageReference message) {
-        PendingNode node = new PendingNode(this, message);
-        if (root == null) {
-            root = node;
-            tail = node;
-        } else {
-            root.linkBefore(node);
-        }
-        this.map.put(message.getMessageId(), node);
-        return node;
-    }
-
-    public PendingNode addMessageLast(MessageReference message) {
-        PendingNode node = new PendingNode(this, message);
-        if (root == null) {
-            root = node;
-        } else {
-            tail.linkAfter(node);
-        }
-        tail = node;
-        this.map.put(message.getMessageId(), node);
-        return node;
-    }
-
-    public void clear() {
-        this.root = null;
-        this.tail = null;
-        this.map.clear();
-    }
-
-    public boolean isEmpty() {
-        return this.map.isEmpty();
-    }
-
-    public Iterator<MessageReference> iterator() {
-        return new Iterator<MessageReference>() {
-            private PendingNode current = null;
-            private PendingNode next = root;
-
-            public boolean hasNext() {
-                return next != null;
-            }
-
-            public MessageReference next() {
-                MessageReference result = null;
-                this.current = this.next;
-                result = this.current.getMessage();
-                this.next = (PendingNode) this.next.getNext();
-                return result;
-            }
-
-            public void remove() {
-                if (this.current != null && this.current.getMessage() != null) {
-                    map.remove(this.current.getMessage().getMessageId());
-                }
-                removeNode(this.current);
-            }
-        };
-    }
-
-    public void remove(MessageReference message) {
-        if (message != null) {
-            PendingNode node = this.map.remove(message.getMessageId());
-            removeNode(node);
-        }
-    }
-
-    public int size() {
-        return this.map.size();
-    }
-
-    void removeNode(PendingNode node) {
-        if (node != null) {
-            map.remove(node.getMessage().getMessageId());
-            if (root == node) {
-                root = (PendingNode) node.getNext();
-            }
-            if (tail == node) {
-                tail = (PendingNode) node.getPrevious();
-            }
-            node.unlink();
-        }
-    }
-
-    List<PendingNode> getAsList() {
-        List<PendingNode> result = new ArrayList<PendingNode>(size());
-        PendingNode node = root;
-        while (node != null) {
-            result.add(node);
-            node = (PendingNode) node.getNext();
-        }
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        return "OrderedPendingList(" + System.identityHashCode(this) + ")";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingList.java
deleted file mode 100644
index 7b9844c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingList.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.util.Iterator;
-import org.apache.activemq.broker.region.MessageReference;
-
-public interface PendingList {
-    
-    public boolean isEmpty();
-    public void clear();
-    public PendingNode addMessageFirst(MessageReference message);
-    public PendingNode addMessageLast(MessageReference message);
-    public void remove(MessageReference message);
-    public int size();
-    public Iterator<MessageReference> iterator();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java
deleted file mode 100755
index 52e5174..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * Interface to pending message (messages awaiting disptach to a consumer)
- * cursor
- * 
- * 
- */
-public interface PendingMessageCursor extends Service {
-
-    /**
-     * Add a destination
-     * 
-     * @param context
-     * @param destination
-     * @throws Exception
-     */
-    void add(ConnectionContext context, Destination destination) throws Exception;
-
-    /**
-     * remove a destination
-     * 
-     * @param context
-     * @param destination
-     * @throws Exception
-     */
-    List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception;
-
-    /**
-     * @return true if there are no pending messages
-     */
-    boolean isEmpty();
-
-    /**
-     * check if a Destination is Empty for this cursor
-     * 
-     * @param destination
-     * @return true id the Destination is empty
-     */
-    boolean isEmpty(Destination destination);
-
-    /**
-     * reset the cursor
-     */
-    void reset();
-
-    /**
-     * hint to the cursor to release any locks it might have grabbed after a
-     * reset
-     */
-    void release();
-
-    /**
-     * add message to await dispatch
-     * 
-     * @param node
-     * @throws IOException
-     * @throws Exception
-     */
-    void addMessageLast(MessageReference node) throws Exception;
-    /**
-     * add message to await dispatch - if it can
-     * 
-     * @param node
-     * @param maxWaitTime 
-     * @return true if successful
-     * @throws IOException
-     * @throws Exception
-     */
-    boolean tryAddMessageLast(MessageReference node, long maxWaitTime) throws Exception;
-
-    /**
-     * add message to await dispatch
-     * 
-     * @param node
-     * @throws Exception
-     */
-    void addMessageFirst(MessageReference node) throws Exception;
-
-    /**
-     * Add a message recovered from a retroactive policy
-     * 
-     * @param node
-     * @throws Exception
-     */
-    void addRecoveredMessage(MessageReference node) throws Exception;
-
-    /**
-     * @return true if there pending messages to dispatch
-     */
-    boolean hasNext();
-
-    /**
-     * @return the next pending message with its reference count increment
-     */
-    MessageReference next();
-
-    /**
-     * remove the message at the cursor position
-     */
-    void remove();
-
-    /**
-     * @return the number of pending messages
-     */
-    int size();
-
-    /**
-     * clear all pending messages
-     */
-    void clear();
-
-    /**
-     * Informs the Broker if the subscription needs to intervention to recover
-     * it's state e.g. DurableTopicSubscriber may do
-     * 
-     * @return true if recovery required
-     */
-    boolean isRecoveryRequired();
-
-    /**
-     * @return the maximum batch size
-     */
-    int getMaxBatchSize();
-
-    /**
-     * Set the max batch size
-     * 
-     * @param maxBatchSize
-     */
-    void setMaxBatchSize(int maxBatchSize);
-
-    /**
-     * Give the cursor a hint that we are about to remove messages from memory
-     * only
-     */
-    void resetForGC();
-
-    /**
-     * remove a node
-     * 
-     * @param node
-     */
-    void remove(MessageReference node);
-
-    /**
-     * free up any internal buffers
-     */
-    void gc();
-
-    /**
-     * Set the UsageManager
-     * 
-     * @param systemUsage
-     * @see org.apache.activemq.usage.SystemUsage
-     */
-    void setSystemUsage(SystemUsage systemUsage);
-
-    /**
-     * @return the usageManager
-     */
-    SystemUsage getSystemUsage();
-
-    /**
-     * @return the memoryUsageHighWaterMark
-     */
-    int getMemoryUsageHighWaterMark();
-
-    /**
-     * @param memoryUsageHighWaterMark the memoryUsageHighWaterMark to set
-     */
-    void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark);
-
-    /**
-     * @return true if the cursor is full
-     */
-    boolean isFull();
-    
-    /**
-     * @return true if the cursor has space to page messages into
-     */
-    public boolean hasSpace();
-
-    /**
-     * @return true if the cursor has buffered messages ready to deliver
-     */
-    boolean hasMessagesBufferedToDeliver();
-
-    /**
-     * destroy the cursor
-     * 
-     * @throws Exception
-     */
-    void destroy() throws Exception;
-
-    /**
-     * Page in a restricted number of messages and increment the reference count
-     * 
-     * @param maxItems
-     * @return a list of paged in messages
-     */
-    LinkedList<MessageReference> pageInList(int maxItems);
-    
-    /**
-     * set the maximum number of producers to track at one time
-     * @param value
-     */
-    void setMaxProducersToAudit(int value);
-    
-    /**
-     * @return the maximum number of producers to audit
-     */
-    int getMaxProducersToAudit();
-    
-    /**
-     * Set the maximum depth of message ids to track
-     * @param depth 
-     */
-    void setMaxAuditDepth(int depth);
-    
-    /**
-     * @return the audit depth
-     */
-    int getMaxAuditDepth();
-    
-    /**
-     * @return the enableAudit
-     */
-    public boolean isEnableAudit();
-    /**
-     * @param enableAudit the enableAudit to set
-     */
-    public void setEnableAudit(boolean enableAudit);
-    
-    /**
-     * @return true if the underlying state of this cursor 
-     * disappears when the broker shuts down
-     */
-    public boolean isTransient();
-    
-    
-    /**
-     * set the audit
-     * @param audit
-     */
-    public void setMessageAudit(ActiveMQMessageAudit audit);
-    
-    
-    /**
-     * @return the audit - could be null
-     */
-    public ActiveMQMessageAudit getMessageAudit();
-    
-    /**
-     * use a cache to improve performance
-     * @param useCache
-     */
-    public void setUseCache(boolean useCache);
-    
-    /**
-     * @return true if a cache may be used
-     */
-    public boolean isUseCache();
-    
-    /**
-     * remove from auditing the message id
-     * @param id
-     */
-    public void rollback(MessageId id);
-
-    /**
-     * @return true if cache is being used
-     */
-    public boolean isCacheEnabled();
-   
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingNode.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingNode.java
deleted file mode 100644
index 21cdcd0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingNode.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.util.LinkedNode;
-
-public class PendingNode extends LinkedNode {
-    private final MessageReference message;
-    private final OrderedPendingList list;
-    public PendingNode(OrderedPendingList list,MessageReference message) {
-        this.list = list;
-        this.message = message;
-    }
-
-    MessageReference getMessage() {
-        return this.message;
-    }
-    
-    OrderedPendingList getList() {
-        return this.list;
-    }
-    
-    @Override
-    public String toString() {
-        PendingNode n = (PendingNode) getNext();
-        String str = "PendingNode(";
-        str += System.identityHashCode(this) + "),root="+isHeadNode()+",next="+(n != null ?System.identityHashCode(n):"NULL");
-        return str;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PrioritizedPendingList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PrioritizedPendingList.java
deleted file mode 100644
index 4d3c331..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PrioritizedPendingList.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.MessageId;
-
-public class PrioritizedPendingList implements PendingList {
-    static final Integer MAX_PRIORITY = 10;
-    private final OrderedPendingList[] lists = new OrderedPendingList[MAX_PRIORITY];
-    final Map<MessageId, PendingNode> map = new HashMap<MessageId, PendingNode>();
-
-    public PrioritizedPendingList() {
-        for (int i = 0; i < MAX_PRIORITY; i++) {
-            this.lists[i] = new OrderedPendingList();
-        }
-    }
-    public PendingNode addMessageFirst(MessageReference message) {
-        PendingNode node = getList(message).addMessageFirst(message);
-        this.map.put(message.getMessageId(), node);
-        return node;
-    }
-
-    public PendingNode addMessageLast(MessageReference message) {
-        PendingNode node = getList(message).addMessageLast(message);
-        this.map.put(message.getMessageId(), node);
-        return node;
-    }
-
-    public void clear() {
-        for (int i = 0; i < MAX_PRIORITY; i++) {
-            this.lists[i].clear();
-        }
-        this.map.clear();
-    }
-
-    public boolean isEmpty() {
-        return this.map.isEmpty();
-    }
-
-    public Iterator<MessageReference> iterator() {
-        return new PrioritizedPendingListIterator();
-    }
-
-    public void remove(MessageReference message) {
-        if (message != null) {
-            PendingNode node = this.map.remove(message.getMessageId());
-            if (node != null) {
-                node.getList().removeNode(node);
-            }
-        }
-    }
-
-    public int size() {
-        return this.map.size();
-    }
-
-    @Override
-    public String toString() {
-        return "PrioritizedPendingList(" + System.identityHashCode(this) + ")";
-    }
-
-    protected int getPriority(MessageReference message) {
-        int priority = javax.jms.Message.DEFAULT_PRIORITY;
-        if (message.getMessageId() != null) {
-            priority = Math.max(message.getMessage().getPriority(), 0);
-            priority = Math.min(priority, 9);
-        }
-        return priority;
-    }
-
-    protected OrderedPendingList getList(MessageReference msg) {
-        return lists[getPriority(msg)];
-    }
-
-    private class PrioritizedPendingListIterator implements Iterator<MessageReference> {
-        private int index = 0;
-        private int currentIndex = 0;
-        List<PendingNode> list = new ArrayList<PendingNode>(size());
-
-        PrioritizedPendingListIterator() {
-            for (int i = MAX_PRIORITY - 1; i >= 0; i--) {
-                OrderedPendingList orderedPendingList = lists[i];
-                if (!orderedPendingList.isEmpty()) {
-                    list.addAll(orderedPendingList.getAsList());
-                }
-            }
-        }
-        public boolean hasNext() {
-            return list.size() > index;
-        }
-
-        public MessageReference next() {
-            PendingNode node = list.get(this.index);
-            this.currentIndex = this.index;
-            this.index++;
-            return node.getMessage();
-        }
-
-        public void remove() {
-            PendingNode node = list.get(this.currentIndex);
-            if (node != null) {
-                map.remove(node.getMessage().getMessageId());
-                node.getList().removeNode(node);
-            }
-
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java
deleted file mode 100755
index 8180952..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.io.IOException;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.MessageStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * persist pending messages pending message (messages awaiting dispatch to a
- * consumer) cursor
- * 
- * 
- */
-class QueueStorePrefetch extends AbstractStoreCursor {
-    private static final Logger LOG = LoggerFactory.getLogger(QueueStorePrefetch.class);
-    private final MessageStore store;
-   
-    /**
-     * Construct it
-     * @param queue
-     */
-    public QueueStorePrefetch(Queue queue) {
-        super(queue);
-        this.store = queue.getMessageStore();
-
-    }
-
-    public boolean recoverMessageReference(MessageId messageReference) throws Exception {
-        Message msg = this.store.getMessage(messageReference);
-        if (msg != null) {
-            return recoverMessage(msg);
-        } else {
-            String err = "Failed to retrieve message for id: " + messageReference;
-            LOG.error(err);
-            throw new IOException(err);
-        }
-    }
-
-   
-        
-    @Override
-    protected synchronized int getStoreSize() {
-        try {
-            int result = this.store.getMessageCount();
-            return result;
-            
-        } catch (IOException e) {
-            LOG.error("Failed to get message count", e);
-            throw new RuntimeException(e);
-        }
-    }
-    
-    @Override
-    protected synchronized boolean isStoreEmpty() {
-        try {
-            return this.store.isEmpty();
-            
-        } catch (Exception e) {
-            LOG.error("Failed to get message count", e);
-            throw new RuntimeException(e);
-        }
-    }
-    
-    @Override
-    protected void resetBatch() {
-        this.store.resetBatching();
-    }
-    
-    @Override
-    protected void setBatch(MessageId messageId) throws Exception {
-        store.setBatch(messageId);
-        batchResetNeeded = false;
-    }
-
-    
-    @Override
-    protected void doFillBatch() throws Exception {
-        this.store.recoverNextMessages(this.maxBatchSize, this);
-    }
-
-    @Override
-    public String toString() {
-        return "QueueStorePrefetch" + System.identityHashCode(this);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
deleted file mode 100755
index 2fc7246..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
+++ /dev/null
@@ -1,415 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * persist pending messages pending message (messages awaiting dispatch to a
- * consumer) cursor
- * 
- * 
- */
-public class StoreDurableSubscriberCursor extends AbstractPendingMessageCursor {
-
-    private static final Logger LOG = LoggerFactory.getLogger(StoreDurableSubscriberCursor.class);
-    private static final int UNKNOWN = -1;
-    private final String clientId;
-    private final String subscriberName;
-    private final Map<Destination, TopicStorePrefetch> topics = new HashMap<Destination, TopicStorePrefetch>();
-    private final List<PendingMessageCursor> storePrefetches = new CopyOnWriteArrayList<PendingMessageCursor>();
-    private final PendingMessageCursor nonPersistent;
-    private PendingMessageCursor currentCursor;
-    private final DurableTopicSubscription subscription;
-    private int cacheCurrentLowestPriority = UNKNOWN;
-    private boolean immediatePriorityDispatch = true;
-    /**
-     * @param broker Broker for this cursor
-     * @param clientId clientId for this cursor
-     * @param subscriberName subscriber name for this cursor
-     * @param maxBatchSize currently ignored
-     * @param subscription  subscription for this cursor
-     */
-    public StoreDurableSubscriberCursor(Broker broker,String clientId, String subscriberName,int maxBatchSize, DurableTopicSubscription subscription) {
-        super(AbstractPendingMessageCursor.isPrioritizedMessageSubscriber(broker,subscription));
-        this.subscription=subscription;
-        this.clientId = clientId;
-        this.subscriberName = subscriberName;
-        if (broker.getBrokerService().isPersistent()) {
-            this.nonPersistent = new FilePendingMessageCursor(broker,clientId + subscriberName,this.prioritizedMessages);
-        } else {
-            this.nonPersistent = new VMPendingMessageCursor(this.prioritizedMessages);
-        }
-        
-        this.nonPersistent.setMaxBatchSize(maxBatchSize);
-        this.nonPersistent.setSystemUsage(systemUsage);
-        this.storePrefetches.add(this.nonPersistent);
-
-        if (prioritizedMessages) {
-            setMaxAuditDepth(10*getMaxAuditDepth());
-        }
-    }
-
-    @Override
-    public synchronized void start() throws Exception {
-        if (!isStarted()) {
-            super.start();
-            for (PendingMessageCursor tsp : storePrefetches) {
-            	tsp.setMessageAudit(getMessageAudit());
-                tsp.start();
-            }
-        }
-    }
-
-    @Override
-    public synchronized void stop() throws Exception {
-        if (isStarted()) {
-            if (subscription.isKeepDurableSubsActive()) {
-                super.gc();
-                super.getMessageAudit().clear();
-                for (PendingMessageCursor tsp : storePrefetches) {
-                    tsp.gc();
-                    tsp.getMessageAudit().clear();
-                }
-            } else {
-                super.stop();
-                for (PendingMessageCursor tsp : storePrefetches) {
-                    tsp.stop();
-                }
-            }
-        }
-    }
-
-    /**
-     * Add a destination
-     * 
-     * @param context
-     * @param destination
-     * @throws Exception
-     */
-    @Override
-    public synchronized void add(ConnectionContext context, Destination destination) throws Exception {
-        if (destination != null && !AdvisorySupport.isAdvisoryTopic(destination.getActiveMQDestination())) {
-            TopicStorePrefetch tsp = new TopicStorePrefetch(this.subscription,(Topic)destination, clientId, subscriberName);
-            tsp.setMaxBatchSize(destination.getMaxPageSize());
-            tsp.setSystemUsage(systemUsage);
-            tsp.setMessageAudit(getMessageAudit());
-            tsp.setEnableAudit(isEnableAudit());
-            tsp.setMemoryUsageHighWaterMark(getMemoryUsageHighWaterMark());
-            topics.put(destination, tsp);
-            storePrefetches.add(tsp);
-            if (isStarted()) {
-                tsp.start();
-            }
-        }
-    }
-
-    /**
-     * remove a destination
-     * 
-     * @param context
-     * @param destination
-     * @throws Exception
-     */
-    @Override
-    public synchronized List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception {
-        PendingMessageCursor tsp = topics.remove(destination);
-        if (tsp != null) {
-            storePrefetches.remove(tsp);
-        }
-        return Collections.EMPTY_LIST;
-    }
-
-    /**
-     * @return true if there are no pending messages
-     */
-    @Override
-    public synchronized boolean isEmpty() {
-        for (PendingMessageCursor tsp : storePrefetches) {
-            if( !tsp.isEmpty() )
-                return false;
-        }
-        return true;
-    }
-
-    @Override
-    public synchronized boolean isEmpty(Destination destination) {
-        boolean result = true;
-        TopicStorePrefetch tsp = topics.get(destination);
-        if (tsp != null) {
-            result = tsp.isEmpty();
-        }
-        return result;
-    }
-
-    /**
-     * Informs the Broker if the subscription needs to intervention to recover
-     * it's state e.g. DurableTopicSubscriber may do
-     * 
-     * @see org.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor
-     * @return true if recovery required
-     */
-    @Override
-    public boolean isRecoveryRequired() {
-        return false;
-    }
-
-    @Override
-    public synchronized void addMessageLast(MessageReference node) throws Exception {
-        if (node != null) {
-            Message msg = node.getMessage();
-            if (isStarted()) {
-                if (!msg.isPersistent()) {
-                    nonPersistent.addMessageLast(node);
-                }
-            }
-            if (msg.isPersistent()) {
-                Destination dest = msg.getRegionDestination();
-                TopicStorePrefetch tsp = topics.get(dest);
-                if (tsp != null) {
-                    // cache can become high priority cache for immediate dispatch
-                    final int priority = msg.getPriority();
-                    if (isStarted() && this.prioritizedMessages && immediatePriorityDispatch && !tsp.isCacheEnabled()) {
-                        if (priority > tsp.getCurrentLowestPriority()) {
-                            if (LOG.isTraceEnabled()) {
-                                LOG.trace("enabling cache for cursor on high priority message " + priority
-                                        + ", current lowest: " + tsp.getCurrentLowestPriority());
-                            }
-                            tsp.setCacheEnabled(true);
-                            cacheCurrentLowestPriority = tsp.getCurrentLowestPriority();
-                        }
-                    } else if (cacheCurrentLowestPriority != UNKNOWN && priority <= cacheCurrentLowestPriority) {
-                        // go to the store to get next priority message as lower priority messages may be recovered
-                        // already and need to acked sequence order
-                        if (LOG.isTraceEnabled()) {
-                            LOG.trace("disabling/clearing cache for cursor on lower priority message "
-                                    + priority + ", tsp current lowest: " + tsp.getCurrentLowestPriority()
-                                    + " cache lowest: " + cacheCurrentLowestPriority);
-                        }
-                        tsp.setCacheEnabled(false);
-                        cacheCurrentLowestPriority = UNKNOWN;
-                    }
-                    tsp.addMessageLast(node);
-                }
-            }
-
-        }
-    }
-
-    @Override
-    public boolean isTransient() {
-        return subscription.isKeepDurableSubsActive();
-    }
-
-    @Override
-    public void addMessageFirst(MessageReference node) throws Exception {
-        // for keep durable subs active, need to deal with redispatch
-        if (node != null) {
-            Message msg = node.getMessage();
-            if (!msg.isPersistent()) {
-                nonPersistent.addMessageFirst(node);
-            } else {
-                Destination dest = msg.getRegionDestination();
-                TopicStorePrefetch tsp = topics.get(dest);
-                if (tsp != null) {
-                    tsp.addMessageFirst(node);
-                }
-            }
-        }
-    }
-
-    @Override
-    public synchronized void addRecoveredMessage(MessageReference node) throws Exception {
-        nonPersistent.addMessageLast(node);
-    }
-
-    @Override
-    public synchronized void clear() {
-        for (PendingMessageCursor tsp : storePrefetches) {
-            tsp.clear();
-        }
-    }
-
-    @Override
-    public synchronized boolean hasNext() {
-        boolean result = true;
-        if (result) {
-            try {
-                currentCursor = getNextCursor();
-            } catch (Exception e) {
-                LOG.error("Failed to get current cursor ", e);
-                throw new RuntimeException(e);
-            }
-            result = currentCursor != null ? currentCursor.hasNext() : false;
-        }
-        return result;
-    }
-
-    @Override
-    public synchronized MessageReference next() {
-        MessageReference result = currentCursor != null ? currentCursor.next() : null;
-        return result;
-    }
-
-    @Override
-    public synchronized void remove() {
-        if (currentCursor != null) {
-            currentCursor.remove();
-        }
-    }
-
-    @Override
-    public synchronized void remove(MessageReference node) {
-        if (currentCursor != null) {
-            currentCursor.remove(node);
-        }
-    }
-
-    @Override
-    public synchronized void reset() {
-        for (PendingMessageCursor storePrefetch : storePrefetches) {
-            storePrefetch.reset();
-        }
-    }
-
-    @Override
-    public synchronized void release() {
-        for (PendingMessageCursor storePrefetch : storePrefetches) {
-            storePrefetch.release();
-        }
-    }
-
-    @Override
-    public synchronized int size() {
-        int pendingCount=0;
-        for (PendingMessageCursor tsp : storePrefetches) {
-            pendingCount += tsp.size();
-        }
-        return pendingCount;
-    }
-
-    @Override
-    public void setMaxBatchSize(int newMaxBatchSize) {
-        for (PendingMessageCursor storePrefetch : storePrefetches) {
-            storePrefetch.setMaxBatchSize(newMaxBatchSize);
-        }
-        super.setMaxBatchSize(newMaxBatchSize);
-    }
-
-    @Override
-    public synchronized void gc() {
-        for (PendingMessageCursor tsp : storePrefetches) {
-            tsp.gc();
-        }
-        cacheCurrentLowestPriority = UNKNOWN;
-    }
-
-    @Override
-    public void setSystemUsage(SystemUsage usageManager) {
-        super.setSystemUsage(usageManager);
-        for (PendingMessageCursor tsp : storePrefetches) {
-            tsp.setSystemUsage(usageManager);
-        }
-    }
-    
-    @Override
-    public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark) {
-        super.setMemoryUsageHighWaterMark(memoryUsageHighWaterMark);
-        for (PendingMessageCursor cursor : storePrefetches) {
-            cursor.setMemoryUsageHighWaterMark(memoryUsageHighWaterMark);
-        }
-    }
-    
-    @Override
-    public void setMaxProducersToAudit(int maxProducersToAudit) {
-        super.setMaxProducersToAudit(maxProducersToAudit);
-        for (PendingMessageCursor cursor : storePrefetches) {
-            cursor.setMaxAuditDepth(maxAuditDepth);
-        }
-    }
-
-    @Override
-    public void setMaxAuditDepth(int maxAuditDepth) {
-        super.setMaxAuditDepth(maxAuditDepth);
-        for (PendingMessageCursor cursor : storePrefetches) {
-            cursor.setMaxAuditDepth(maxAuditDepth);
-        }
-    }
-    
-    @Override
-    public void setEnableAudit(boolean enableAudit) {
-        super.setEnableAudit(enableAudit);
-        for (PendingMessageCursor cursor : storePrefetches) {
-            cursor.setEnableAudit(enableAudit);
-        }
-    }
-    
-    @Override
-    public  void setUseCache(boolean useCache) {
-        super.setUseCache(useCache);
-        for (PendingMessageCursor cursor : storePrefetches) {
-            cursor.setUseCache(useCache);
-        }
-    }
-    
-    protected synchronized PendingMessageCursor getNextCursor() throws Exception {
-        if (currentCursor == null || currentCursor.isEmpty()) {
-            currentCursor = null;
-            for (PendingMessageCursor tsp : storePrefetches) {
-                if (tsp.hasNext()) {
-                    currentCursor = tsp;
-                    break;
-                }
-            }
-            // round-robin
-            if (storePrefetches.size()>1) {
-                PendingMessageCursor first = storePrefetches.remove(0);
-                storePrefetches.add(first);
-            }
-        }
-        return currentCursor;
-    }
-    
-    @Override
-    public String toString() {
-        return "StoreDurableSubscriber(" + clientId + ":" + subscriberName + ")";
-    }
-
-    public boolean isImmediatePriorityDispatch() {
-        return immediatePriorityDispatch;
-    }
-
-    public void setImmediatePriorityDispatch(boolean immediatePriorityDispatch) {
-        this.immediatePriorityDispatch = immediatePriorityDispatch;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java
deleted file mode 100755
index 0864886..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Store based Cursor for Queues
- * 
- * 
- */
-public class StoreQueueCursor extends AbstractPendingMessageCursor {
-
-    private static final Logger LOG = LoggerFactory.getLogger(StoreQueueCursor.class);
-    private final Broker broker;
-    private int pendingCount;
-    private final Queue queue;
-    private PendingMessageCursor nonPersistent;
-    private final QueueStorePrefetch persistent;
-    private boolean started;
-    private PendingMessageCursor currentCursor;
-
-    /**
-     * Construct
-     * @param broker 
-     * @param queue
-     */
-    public StoreQueueCursor(Broker broker,Queue queue) {
-        super((queue != null ? queue.isPrioritizedMessages():false));
-        this.broker=broker;
-        this.queue = queue;
-        this.persistent = new QueueStorePrefetch(queue);
-        currentCursor = persistent;
-    }
-
-    public synchronized void start() throws Exception {
-        started = true;
-        super.start();
-        if (nonPersistent == null) {
-            if (broker.getBrokerService().isPersistent()) {
-                nonPersistent = new FilePendingMessageCursor(broker,queue.getName(),this.prioritizedMessages);
-            }else {
-                nonPersistent = new VMPendingMessageCursor(this.prioritizedMessages);
-            }
-            nonPersistent.setMaxBatchSize(getMaxBatchSize());
-            nonPersistent.setSystemUsage(systemUsage);
-            nonPersistent.setEnableAudit(isEnableAudit());
-            nonPersistent.setMaxAuditDepth(getMaxAuditDepth());
-            nonPersistent.setMaxProducersToAudit(getMaxProducersToAudit());
-        }
-        nonPersistent.setMessageAudit(getMessageAudit());
-        nonPersistent.start();
-        persistent.setMessageAudit(getMessageAudit());
-        persistent.start();
-        pendingCount = persistent.size() + nonPersistent.size();
-    }
-
-    public synchronized void stop() throws Exception {
-        started = false;
-        if (nonPersistent != null) {
-            nonPersistent.stop();
-            nonPersistent.gc();
-        }
-        persistent.stop();
-        persistent.gc();
-        super.stop();
-        pendingCount = 0;
-    }
-
-    public synchronized void addMessageLast(MessageReference node) throws Exception {
-        if (node != null) {
-            Message msg = node.getMessage();
-            if (started) {
-                pendingCount++;
-                if (!msg.isPersistent()) {
-                    nonPersistent.addMessageLast(node);
-                }
-            }
-            if (msg.isPersistent()) {
-                persistent.addMessageLast(node);
-            }
-        }
-    }
-    
-    public synchronized void addMessageFirst(MessageReference node) throws Exception {
-        if (node != null) {
-            Message msg = node.getMessage();
-            if (started) {
-                pendingCount++;
-                if (!msg.isPersistent()) {
-                    nonPersistent.addMessageFirst(node);
-                }
-            }
-            if (msg.isPersistent()) {
-                persistent.addMessageFirst(node);
-            }
-        }
-    }
-
-    public synchronized void clear() {
-        pendingCount = 0;
-    }
-
-    public synchronized boolean hasNext() {
-        try {
-            getNextCursor();
-        } catch (Exception e) {
-            LOG.error("Failed to get current cursor ", e);
-            throw new RuntimeException(e);
-       }
-       return currentCursor != null ? currentCursor.hasNext() : false;
-    }
-
-    public synchronized MessageReference next() {
-        MessageReference result = currentCursor != null ? currentCursor.next() : null;
-        return result;
-    }
-
-    public synchronized void remove() {
-        if (currentCursor != null) {
-            currentCursor.remove();
-        }
-        pendingCount--;
-    }
-
-    public synchronized void remove(MessageReference node) {
-        if (!node.isPersistent()) {
-            nonPersistent.remove(node);
-        } else {
-            persistent.remove(node);
-        }
-        pendingCount--;
-    }
-
-    public synchronized void reset() {
-        nonPersistent.reset();
-        persistent.reset();
-        pendingCount = persistent.size() + nonPersistent.size();        
-    }
-    
-    public void release() {
-        nonPersistent.release();
-        persistent.release();
-    }
-
-
-    public synchronized int size() {
-        if (pendingCount < 0) {
-            pendingCount = persistent.size() + nonPersistent.size();
-        }
-        return pendingCount;
-    }
-
-    public synchronized boolean isEmpty() {
-        // if negative, more messages arrived in store since last reset so non empty
-        return pendingCount == 0;
-    }
-
-    /**
-     * Informs the Broker if the subscription needs to intervention to recover
-     * it's state e.g. DurableTopicSubscriber may do
-     * 
-     * @see org.apache.activemq.broker.region.cursors.PendingMessageCursor
-     * @return true if recovery required
-     */
-    public boolean isRecoveryRequired() {
-        return false;
-    }
-
-    /**
-     * @return the nonPersistent Cursor
-     */
-    public PendingMessageCursor getNonPersistent() {
-        return this.nonPersistent;
-    }
-
-    /**
-     * @param nonPersistent cursor to set
-     */
-    public void setNonPersistent(PendingMessageCursor nonPersistent) {
-        this.nonPersistent = nonPersistent;
-    }
-
-    public void setMaxBatchSize(int maxBatchSize) {
-        persistent.setMaxBatchSize(maxBatchSize);
-        if (nonPersistent != null) {
-            nonPersistent.setMaxBatchSize(maxBatchSize);
-        }
-        super.setMaxBatchSize(maxBatchSize);
-    }
-    
-    
-    public void setMaxProducersToAudit(int maxProducersToAudit) {
-        super.setMaxProducersToAudit(maxProducersToAudit);
-        if (persistent != null) {
-            persistent.setMaxProducersToAudit(maxProducersToAudit);
-        }
-        if (nonPersistent != null) {
-            nonPersistent.setMaxProducersToAudit(maxProducersToAudit);
-        }
-    }
-
-    public void setMaxAuditDepth(int maxAuditDepth) {
-        super.setMaxAuditDepth(maxAuditDepth);
-        if (persistent != null) {
-            persistent.setMaxAuditDepth(maxAuditDepth);
-        }
-        if (nonPersistent != null) {
-            nonPersistent.setMaxAuditDepth(maxAuditDepth);
-        }
-    }
-    
-    public void setEnableAudit(boolean enableAudit) {
-        super.setEnableAudit(enableAudit);
-        if (persistent != null) {
-            persistent.setEnableAudit(enableAudit);
-        }
-        if (nonPersistent != null) {
-            nonPersistent.setEnableAudit(enableAudit);
-        }
-    }
-    
-    @Override
-    public void setUseCache(boolean useCache) {
-        super.setUseCache(useCache);
-        if (persistent != null) {
-            persistent.setUseCache(useCache);
-        }
-        if (nonPersistent != null) {
-            nonPersistent.setUseCache(useCache);
-        }
-    }
-    
-    @Override
-    public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark) {
-        super.setMemoryUsageHighWaterMark(memoryUsageHighWaterMark);
-        if (persistent != null) {
-            persistent.setMemoryUsageHighWaterMark(memoryUsageHighWaterMark);
-        }
-        if (nonPersistent != null) {
-            nonPersistent.setMemoryUsageHighWaterMark(memoryUsageHighWaterMark);
-        }
-    }
-
-
-
-    public synchronized void gc() {
-        if (persistent != null) {
-            persistent.gc();
-        }
-        if (nonPersistent != null) {
-            nonPersistent.gc();
-        }
-        pendingCount = persistent.size() + nonPersistent.size();
-    }
-
-    public void setSystemUsage(SystemUsage usageManager) {
-        super.setSystemUsage(usageManager);
-        if (persistent != null) {
-            persistent.setSystemUsage(usageManager);
-        }
-        if (nonPersistent != null) {
-            nonPersistent.setSystemUsage(usageManager);
-        }
-    }
-
-    protected synchronized PendingMessageCursor getNextCursor() throws Exception {
-        if (currentCursor == null || !currentCursor.hasMessagesBufferedToDeliver()) {
-            currentCursor = currentCursor == persistent ? nonPersistent : persistent;
-            // sanity check
-            if (currentCursor.isEmpty()) {
-                currentCursor = currentCursor == persistent ? nonPersistent : persistent;
-            }
-        }
-        return currentCursor;
-    }
-
-    @Override
-    public boolean isCacheEnabled() {
-        boolean cacheEnabled = isUseCache();
-        if (cacheEnabled) {
-            if (persistent != null) {
-                cacheEnabled &= persistent.isCacheEnabled();
-            }
-            if (nonPersistent != null) {
-                cacheEnabled &= nonPersistent.isCacheEnabled();
-            }
-            setCacheEnabled(cacheEnabled);
-        }
-        return cacheEnabled;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
deleted file mode 100755
index 7725b3b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/TopicStorePrefetch.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.store.TopicMessageStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * persist pendingCount messages pendingCount message (messages awaiting disptach
- * to a consumer) cursor
- * 
- * 
- */
-class TopicStorePrefetch extends AbstractStoreCursor {
-    private static final Logger LOG = LoggerFactory.getLogger(TopicStorePrefetch.class);
-    private final TopicMessageStore store;
-    private final String clientId;
-    private final String subscriberName;
-    private final Subscription subscription;
-    private int currentLowestPriority;
-    
-    /**
-     * @param topic
-     * @param clientId
-     * @param subscriberName
-     */
-    public TopicStorePrefetch(Subscription subscription,Topic topic, String clientId, String subscriberName) {
-        super(topic);
-        this.subscription=subscription;
-        this.store = (TopicMessageStore)topic.getMessageStore();
-        this.clientId = clientId;
-        this.subscriberName = subscriberName;
-        this.maxProducersToAudit=32;
-        this.maxAuditDepth=10000;
-        resetCurrentLowestPriority();
-    }
-
-    private void resetCurrentLowestPriority() {
-        currentLowestPriority = 9;
-    }
-
-    public synchronized int getCurrentLowestPriority() {
-        return currentLowestPriority;
-    }
-
-    public boolean recoverMessageReference(MessageId messageReference) throws Exception {
-        // shouldn't get called
-        throw new RuntimeException("Not supported");
-    }
-    
-        
-    @Override
-    public synchronized boolean recoverMessage(Message message, boolean cached) throws Exception {
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("recover: " + message.getMessageId() + ", priority: " + message.getPriority());
-        }
-        boolean recovered = false;
-        MessageEvaluationContext messageEvaluationContext = new NonCachedMessageEvaluationContext();
-        messageEvaluationContext.setMessageReference(message);
-        if (this.subscription.matches(message, messageEvaluationContext)) {
-            recovered = super.recoverMessage(message, cached);
-            if (recovered) {
-                currentLowestPriority = Math.min(currentLowestPriority, message.getPriority());                
-            }
-        }
-        return recovered;      
-    }
-    
-    @Override
-    protected synchronized int getStoreSize() {
-        try {
-            return store.getMessageCount(clientId, subscriberName);
-        } catch (Exception e) {
-            LOG.error(this + " Failed to get the outstanding message count from the store", e);
-            throw new RuntimeException(e);
-        }
-    }
-    
-    @Override
-    protected synchronized boolean isStoreEmpty() {
-        try {
-            boolean empty = this.store.isEmpty();
-            if (empty) {
-                resetCurrentLowestPriority();
-            }
-            return empty;
-            
-        } catch (Exception e) {
-            LOG.error("Failed to get message count", e);
-            throw new RuntimeException(e);
-        }
-    }
-
-            
-    @Override
-    protected void resetBatch() {
-        this.store.resetBatching(clientId, subscriberName);
-    }
-
-    @Override
-    public synchronized void gc() {
-        super.gc();
-        resetCurrentLowestPriority();
-    }
-    
-    @Override
-    protected void doFillBatch() throws Exception {
-        this.store.recoverNextMessages(clientId, subscriberName,
-                maxBatchSize, this);
-    }
-
-    @Override
-    public String toString() {
-        return "TopicStorePrefetch(" + clientId + "," + subscriberName + ")" + super.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
deleted file mode 100755
index 9518981..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.QueueMessageReference;
-
-/**
- * hold pending messages in a linked list (messages awaiting disptach to a
- * consumer) cursor
- * 
- * 
- */
-public class VMPendingMessageCursor extends AbstractPendingMessageCursor {
-    private final PendingList list;
-    private Iterator<MessageReference> iter;
-    
-    public VMPendingMessageCursor(boolean prioritizedMessages) {
-        super(prioritizedMessages);
-        if (this.prioritizedMessages) {
-            this.list= new PrioritizedPendingList();
-        }else {
-            this.list = new OrderedPendingList();
-        }
-    }
-
-    
-    public synchronized List<MessageReference> remove(ConnectionContext context, Destination destination)
-            throws Exception {
-        List<MessageReference> rc = new ArrayList<MessageReference>();
-        for (Iterator<MessageReference> iterator = list.iterator(); iterator.hasNext();) {
-            MessageReference r = iterator.next();
-            if (r.getRegionDestination() == destination) {
-                r.decrementReferenceCount();
-                rc.add(r);
-                iterator.remove();
-            }
-        }
-        return rc;
-    }
-
-    /**
-     * @return true if there are no pending messages
-     */
-    
-    public synchronized boolean isEmpty() {
-        if (list.isEmpty()) {
-            return true;
-        } else {
-            for (Iterator<MessageReference> iterator = list.iterator(); iterator.hasNext();) {
-                MessageReference node = iterator.next();
-                if (node == QueueMessageReference.NULL_MESSAGE) {
-                    continue;
-                }
-                if (!node.isDropped()) {
-                    return false;
-                }
-                // We can remove dropped references.
-                iterator.remove();
-            }
-            return true;
-        }
-    }
-
-    /**
-     * reset the cursor
-     */
-    
-    public synchronized void reset() {
-        iter = list.iterator();
-        last = null;
-    }
-
-    /**
-     * add message to await dispatch
-     * 
-     * @param node
-     */
-    
-    public synchronized void addMessageLast(MessageReference node) {
-        node.incrementReferenceCount();
-        list.addMessageLast(node);
-    }
-
-    /**
-     * add message to await dispatch
-     * 
-     * @param position
-     * @param node
-     */
-    
-    public synchronized void addMessageFirst(MessageReference node) {
-        node.incrementReferenceCount();
-        list.addMessageFirst(node);
-    }
-
-    /**
-     * @return true if there pending messages to dispatch
-     */
-    
-    public synchronized boolean hasNext() {
-        return iter.hasNext();
-    }
-
-    /**
-     * @return the next pending message
-     */
-    
-    public synchronized MessageReference next() {
-        last = iter.next();
-        if (last != null) {
-            last.incrementReferenceCount();
-        }
-        return last;
-    }
-
-    /**
-     * remove the message at the cursor position
-     */
-    
-    public synchronized void remove() {
-        if (last != null) {
-            last.decrementReferenceCount();
-        }
-        iter.remove();
-    }
-
-    /**
-     * @return the number of pending messages
-     */
-    
-    public synchronized int size() {
-        return list.size();
-    }
-
-    /**
-     * clear all pending messages
-     */
-    
-    public synchronized void clear() {
-        for (Iterator<MessageReference> i = list.iterator(); i.hasNext();) {
-            MessageReference ref = i.next();
-            ref.decrementReferenceCount();
-        }
-        list.clear();
-    }
-
-    
-    public synchronized void remove(MessageReference node) {
-        list.remove(node);
-        node.decrementReferenceCount();
-    }
-
-    /**
-     * Page in a restricted number of messages
-     * 
-     * @param maxItems
-     * @return a list of paged in messages
-     */
-    
-    public LinkedList<MessageReference> pageInList(int maxItems) {
-        LinkedList<MessageReference> result = new LinkedList<MessageReference>();
-        for (Iterator<MessageReference>i = list.iterator();i.hasNext();) {
-            MessageReference ref = i.next();
-            ref.incrementReferenceCount();
-            result.add(ref);
-            if (result.size() >= maxItems) {
-                break;
-            }
-        }
-        return result;
-    }
-
-    
-    public boolean isTransient() {
-        return true;
-    }
-
-    
-    public void destroy() throws Exception {
-        super.destroy();
-        clear();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/package.html
deleted file mode 100755
index f9c2474..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Cursors used to page persistent messages into the broker from the store
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/EmptyMessageGroupSet.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/EmptyMessageGroupSet.java
deleted file mode 100644
index 9ded71f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/EmptyMessageGroupSet.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.broker.region.group;
-
-/**
- * Represents an empty {@link MessageGroupSet}
- * 
- * 
- */
-public class EmptyMessageGroupSet implements MessageGroupSet {
-
-    public static final MessageGroupSet INSTANCE = new EmptyMessageGroupSet();
-    
-    public boolean contains(String groupID) {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java
deleted file mode 100644
index 523d350..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.broker.region.group;
-
-import org.apache.activemq.command.ConsumerId;
-
-/**
- * Uses hash-code buckets to associate consumers with sets of message group IDs.
- * 
- * 
- */
-public class MessageGroupHashBucket implements MessageGroupMap {
-
-    private final int bucketCount;
-    private final ConsumerId[] consumers;
-
-    public MessageGroupHashBucket(int bucketCount) {
-        this.bucketCount = bucketCount;
-        this.consumers = new ConsumerId[bucketCount];
-    }
-
-    public void put(String groupId, ConsumerId consumerId) {
-        int bucket = getBucketNumber(groupId);
-        consumers[bucket] = consumerId;
-    }
-
-    public ConsumerId get(String groupId) {
-        int bucket = getBucketNumber(groupId);
-        return consumers[bucket];
-    }
-
-    public ConsumerId removeGroup(String groupId) {
-        int bucket = getBucketNumber(groupId);
-        ConsumerId answer = consumers[bucket];
-        consumers[bucket] = null;
-        return answer;
-    }
-
-    public MessageGroupSet removeConsumer(ConsumerId consumerId) {
-        MessageGroupSet answer = null;
-        for (int i = 0; i < consumers.length; i++) {
-            ConsumerId owner = consumers[i];
-            if (owner != null && owner.equals(consumerId)) {
-                answer = createMessageGroupSet(i, answer);
-                consumers[i] = null;
-            }
-        }
-        if (answer == null) {
-            // make an empty set
-            answer = EmptyMessageGroupSet.INSTANCE;
-        }
-        return answer;
-    }
-
-    public String toString() {
-        int count = 0;
-        for (int i = 0; i < consumers.length; i++) {
-            if (consumers[i] != null) {
-                count++;
-            }
-        }
-        return "active message group buckets: " + count;
-    }
-
-    protected MessageGroupSet createMessageGroupSet(int bucketNumber, final MessageGroupSet parent) {
-        final MessageGroupSet answer = createMessageGroupSet(bucketNumber);
-        if (parent == null) {
-            return answer;
-        } else {
-            // union the two sets together
-            return new MessageGroupSet() {
-                public boolean contains(String groupID) {
-                    return parent.contains(groupID) || answer.contains(groupID);
-                }
-            };
-        }
-    }
-
-    protected MessageGroupSet createMessageGroupSet(final int bucketNumber) {
-        return new MessageGroupSet() {
-            public boolean contains(String groupID) {
-                int bucket = getBucketNumber(groupID);
-                return bucket == bucketNumber;
-            }
-        };
-    }
-
-    protected int getBucketNumber(String groupId) {
-        int bucket = groupId.hashCode() % bucketCount;
-        // bucket could be negative
-        if (bucket < 0) {
-            bucket *= -1;
-        }
-        return bucket;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketFactory.java
deleted file mode 100644
index 177284b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.broker.region.group;
-
-/**
- * A factory to create instances of {@link SimpleMessageGroupMap} when
- * implementing the <a
- * href="http://activemq.apache.org/message-groups.html">Message
- * Groups</a> functionality.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class MessageGroupHashBucketFactory implements MessageGroupMapFactory {
-
-    private int bucketCount = 1024;
-
-    public MessageGroupMap createMessageGroupMap() {
-        return new MessageGroupHashBucket(bucketCount);
-    }
-
-    public int getBucketCount() {
-        return bucketCount;
-    }
-
-    /**
-     * Sets the number of hash buckets to use for the message group
-     * functionality. This is only applicable to using message groups to
-     * parallelize processing of a queue while preserving order across an
-     * individual JMSXGroupID header value. This value sets the number of hash
-     * buckets that will be used (i.e. the maximum possible concurrency).
-     */
-    public void setBucketCount(int bucketCount) {
-        this.bucketCount = bucketCount;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupMap.java
deleted file mode 100644
index 9d37542..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupMap.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.broker.region.group;
-
-import org.apache.activemq.command.ConsumerId;
-
-/**
- * Represents a map of JMSXGroupID values to consumer IDs
- * 
- * 
- */
-public interface MessageGroupMap {
-
-    void put(String groupId, ConsumerId consumerId);
-
-    ConsumerId get(String groupId);
-
-    ConsumerId removeGroup(String groupId);
-
-    MessageGroupSet removeConsumer(ConsumerId consumerId);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupMapFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupMapFactory.java
deleted file mode 100644
index 7493972..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupMapFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.broker.region.group;
-
-/**
- * Represents a factory used to create new instances of {@link MessageGroupMap}
- * for a destination.
- * 
- * 
- */
-public interface MessageGroupMapFactory {
-    
-    MessageGroupMap createMessageGroupMap();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupSet.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupSet.java
deleted file mode 100644
index 3017c2b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupSet.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.broker.region.group;
-
-/**
- * Represents a set of Message Group IDs
- * 
- * 
- */
-public interface MessageGroupSet {
-
-    boolean contains(String groupID);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMap.java
deleted file mode 100644
index 737ce3a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMap.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.broker.region.group;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.command.ConsumerId;
-
-/**
- * A simple implementation which tracks every individual GroupID value but
- * which can become a memory leak if clients die before they complete a message
- * group.
- * 
- * 
- */
-public class SimpleMessageGroupMap implements MessageGroupMap {
-    private Map<String, ConsumerId> map = new ConcurrentHashMap<String, ConsumerId>();
-    
-    public void put(String groupId, ConsumerId consumerId) {
-        map.put(groupId, consumerId);
-    }
-
-    public ConsumerId get(String groupId) {
-        return map.get(groupId);
-    }
-
-    public ConsumerId removeGroup(String groupId) {
-        return map.remove(groupId);
-    }
-
-    public MessageGroupSet removeConsumer(ConsumerId consumerId) {
-        SimpleMessageGroupSet ownedGroups = new SimpleMessageGroupSet();
-        for (Iterator<String> iter = map.keySet().iterator(); iter.hasNext();) {
-            String group = iter.next();
-            ConsumerId owner = map.get(group);
-            if (owner.equals(consumerId)) {
-                ownedGroups.add(group);
-                iter.remove();
-            }
-        }
-        return ownedGroups;
-    }
-
-    public String toString() {
-        return "message groups: " + map.size();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMapFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMapFactory.java
deleted file mode 100644
index 266cf61..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMapFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.broker.region.group;
-
-/**
- * A factory to create instances of {@link SimpleMessageGroupMap} when implementing the 
- * <a href="http://activemq.apache.org/message-groups.html">Message Groups</a> functionality.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class SimpleMessageGroupMapFactory implements MessageGroupMapFactory {
-
-    public MessageGroupMap createMessageGroupMap() {
-        return new SimpleMessageGroupMap();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupSet.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupSet.java
deleted file mode 100644
index 7b29c14..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupSet.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.broker.region.group;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * A simple implementation which just uses a {@link Set}
- * 
- * 
- */
-public class SimpleMessageGroupSet implements MessageGroupSet {
-
-    private Set<String> set = new HashSet<String>();
-
-    public boolean contains(String groupID) {
-        return set.contains(groupID);
-    }
-
-    public void add(String group) {
-        set.add(group);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/package.html
deleted file mode 100755
index 4271db8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Classes to implement the <a href="http://activemq.apache.org/message-groups.html">Message Groups</a> feature.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/package.html
deleted file mode 100755
index b3d759d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Region abstraction and implementations in the Broker.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java
deleted file mode 100644
index 05bd573..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.Connection;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.transport.InactivityIOException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Abort slow consumers when they reach the configured threshold of slowness, default is slow for 30 seconds
- * 
- * @org.apache.xbean.XBean
- */
-public class AbortSlowConsumerStrategy implements SlowConsumerStrategy, Runnable {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(AbortSlowConsumerStrategy.class);
-
-    private String name = "AbortSlowConsumerStrategy@" + hashCode();
-    private Scheduler scheduler;
-    private Broker broker;
-    private final AtomicBoolean taskStarted = new AtomicBoolean(false);
-    private final Map<Subscription, SlowConsumerEntry> slowConsumers = new ConcurrentHashMap<Subscription, SlowConsumerEntry>();
-
-    private long maxSlowCount = -1;
-    private long maxSlowDuration = 30*1000;
-    private long checkPeriod = 30*1000;
-    private boolean abortConnection = false;
-
-    public void setBrokerService(Broker broker) {
-       this.scheduler = broker.getScheduler();
-       this.broker = broker;
-    }
-
-    public void slowConsumer(ConnectionContext context, Subscription subs) {
-        if (maxSlowCount < 0 && maxSlowDuration < 0) {
-            // nothing to do
-            LOG.info("no limits set, slowConsumer strategy has nothing to do");
-            return;
-        }
-        
-        if (taskStarted.compareAndSet(false, true)) {
-            scheduler.executePeriodically(this, checkPeriod);
-        }
-            
-        if (!slowConsumers.containsKey(subs)) {
-            slowConsumers.put(subs, new SlowConsumerEntry(context));
-        } else if (maxSlowCount > 0) {
-            slowConsumers.get(subs).slow();
-        }
-    }
-
-    public void run() {
-        if (maxSlowDuration > 0) {
-            // mark
-            for (SlowConsumerEntry entry : slowConsumers.values()) {
-                entry.mark();
-            }
-        }
-        
-        HashMap<Subscription, SlowConsumerEntry> toAbort = new HashMap<Subscription, SlowConsumerEntry>();
-        for (Entry<Subscription, SlowConsumerEntry> entry : slowConsumers.entrySet()) {
-            if (entry.getKey().isSlowConsumer()) {
-                if (maxSlowDuration > 0 && (entry.getValue().markCount * checkPeriod > maxSlowDuration)
-                        || maxSlowCount > 0 && entry.getValue().slowCount > maxSlowCount) { 
-                    toAbort.put(entry.getKey(), entry.getValue());
-                    slowConsumers.remove(entry.getKey());
-                }
-            } else {
-                LOG.info("sub: " + entry.getKey().getConsumerInfo().getConsumerId() + " is no longer slow");
-                slowConsumers.remove(entry.getKey());
-            }
-        }
-
-        abortSubscription(toAbort, abortConnection);
-    }
-
-    private void abortSubscription(Map<Subscription, SlowConsumerEntry> toAbort, boolean abortSubscriberConnection) {
-        for (final Entry<Subscription, SlowConsumerEntry> entry : toAbort.entrySet()) {
-            ConnectionContext connectionContext = entry.getValue().context;
-            if (connectionContext!= null) {
-                try {
-                    LOG.info("aborting "
-                            + (abortSubscriberConnection ? "connection" : "consumer") 
-                            + ", slow consumer: " + entry.getKey().getConsumerInfo().getConsumerId());
-
-                    final Connection connection = connectionContext.getConnection();
-                    if (connection != null) {
-                        if (abortSubscriberConnection) {
-                            scheduler.executeAfterDelay(new Runnable() {
-                                public void run() {
-                                    connection.serviceException(new InactivityIOException("Consumer was slow too often (>"
-                                            + maxSlowCount +  ") or too long (>"
-                                            + maxSlowDuration + "): " + entry.getKey().getConsumerInfo().getConsumerId()));
-                                }}, 0l);
-                        } else {
-                            // just abort the consumer by telling it to stop
-                            ConsumerControl stopConsumer = new ConsumerControl();
-                            stopConsumer.setConsumerId(entry.getKey().getConsumerInfo().getConsumerId());
-                            stopConsumer.setClose(true);
-                            connection.dispatchAsync(stopConsumer);
-                        }
-                    } else {
-                        LOG.debug("slowConsumer abort ignored, no connection in context:"  + connectionContext);
-                    }
-                } catch (Exception e) {
-                    LOG.info("exception on stopping "
-                            + (abortSubscriberConnection ? "connection" : "consumer")
-                            + " to abort slow consumer: " + entry.getKey(), e);
-                }
-            }
-        }
-    }
-
-
-    public void abortConsumer(Subscription sub, boolean abortSubscriberConnection) {
-        if (sub != null) {
-            SlowConsumerEntry entry = slowConsumers.remove(sub);
-            if (entry != null) {
-                Map toAbort = new HashMap<Subscription, SlowConsumerEntry>();
-                toAbort.put(sub, entry);
-                abortSubscription(toAbort, abortSubscriberConnection);
-            } else {
-                LOG.warn("cannot abort subscription as it no longer exists in the map of slow consumers: " + sub);
-            }
-        }
-    }
-
-
-    public long getMaxSlowCount() {
-        return maxSlowCount;
-    }
-
-    /**
-     * number of times a subscription can be deemed slow before triggering abort
-     * effect depends on dispatch rate as slow determination is done on dispatch
-     */
-    public void setMaxSlowCount(long maxSlowCount) {
-        this.maxSlowCount = maxSlowCount;
-    }
-
-    public long getMaxSlowDuration() {
-        return maxSlowDuration;
-    }
-
-    /**
-     * time in milliseconds that a sub can remain slow before triggering
-     * an abort.
-     * @param maxSlowDuration
-     */
-    public void setMaxSlowDuration(long maxSlowDuration) {
-        this.maxSlowDuration = maxSlowDuration;
-    }
-
-    public long getCheckPeriod() {
-        return checkPeriod;
-    }
-
-    /**
-     * time in milliseconds between checks for slow subscriptions
-     * @param checkPeriod
-     */
-    public void setCheckPeriod(long checkPeriod) {
-        this.checkPeriod = checkPeriod;
-    }
-
-    public boolean isAbortConnection() {
-        return abortConnection;
-    }
-
-    /**
-     * abort the consumers connection rather than sending a stop command to the remote consumer
-     * @param abortConnection
-     */
-    public void setAbortConnection(boolean abortConnection) {
-        this.abortConnection = abortConnection;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-    
-    public String getName() {
-        return name;
-    }
-
-    public Map<Subscription, SlowConsumerEntry> getSlowConsumers() {
-        return slowConsumers;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
deleted file mode 100644
index 7589efc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A strategy for choosing which destination is used for dead letter queue
- * messages.
- * 
- * 
- */
-public abstract class AbstractDeadLetterStrategy implements DeadLetterStrategy {
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractDeadLetterStrategy.class);
-    private boolean processNonPersistent = false;
-    private boolean processExpired = true;
-    private ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
-
-    public boolean isSendToDeadLetterQueue(Message message) {
-        boolean result = false;
-        if (message != null) {
-            result = true;
-            if (audit.isDuplicate(message)) {
-                result = false;
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Not adding duplicate to DLQ: " + message.getMessageId() + ", dest: " + message.getDestination());
-                }
-            }
-            if (!message.isPersistent() && !processNonPersistent) {
-                result = false;
-            }
-            if (message.isExpired() && !processExpired) {
-                result = false;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * @return the processExpired
-     */
-    public boolean isProcessExpired() {
-        return this.processExpired;
-    }
-
-    /**
-     * @param processExpired the processExpired to set
-     */
-    public void setProcessExpired(boolean processExpired) {
-        this.processExpired = processExpired;
-    }
-
-    /**
-     * @return the processNonPersistent
-     */
-    public boolean isProcessNonPersistent() {
-        return this.processNonPersistent;
-    }
-
-    /**
-     * @param processNonPersistent the processNonPersistent to set
-     */
-    public void setProcessNonPersistent(boolean processNonPersistent) {
-        this.processNonPersistent = processNonPersistent;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/ConstantPendingMessageLimitStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/ConstantPendingMessageLimitStrategy.java
deleted file mode 100644
index ae227cc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/ConstantPendingMessageLimitStrategy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.TopicSubscription;
-
-/**
- * This PendingMessageLimitStrategy is configured to a constant value for all subscriptions.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class ConstantPendingMessageLimitStrategy implements PendingMessageLimitStrategy {
-
-    private int limit = -1;
-
-    public int getMaximumPendingMessageLimit(TopicSubscription subscription) {
-        return limit;
-    }
-
-    public int getLimit() {
-        return limit;
-    }
-
-    public void setLimit(int limit) {
-        this.limit = limit;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DeadLetterStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DeadLetterStrategy.java
deleted file mode 100644
index 806aaae..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DeadLetterStrategy.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-
-/**
- * A strategy for choosing which destination is used for dead letter queue messages.
- * 
- * 
- */
-public interface DeadLetterStrategy {
-    
-    /**
-     * Allow pluggable strategy for deciding if message should be sent to a dead letter queue
-     * for example, you might not want to ignore expired or non-persistent messages
-     * @param message
-     * @return true if message should be sent to a dead letter queue
-     */
-    boolean isSendToDeadLetterQueue(Message message);
-
-    /**
-     * Returns the dead letter queue for the given message and subscription.
-     */
-    ActiveMQDestination getDeadLetterQueueFor(Message message, Subscription subscription);
-
-    /**
-     * @return true if processes expired messages
-     */
-    public boolean isProcessExpired() ;
-
-    /**
-     * @param processExpired the processExpired to set
-     */
-    public void setProcessExpired(boolean processExpired);
-
-    /**
-     * @return the processNonPersistent
-     */
-    public boolean isProcessNonPersistent();
-
-    /**
-     * @param processNonPersistent the processNonPersistent to set
-     */
-    public void setProcessNonPersistent(boolean processNonPersistent);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java
deleted file mode 100755
index 20a4411..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.List;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.filter.MessageEvaluationContext;
-
-/**
- * Abstraction to allow different dispatching policies to be plugged
- * into the region implementations.  This is used by a queue to deliver
- * messages to the matching subscriptions.
- * 
- * 
- */
-public interface DispatchPolicy {
-    
-    /**
-     * Decides how to dispatch a selected message to a collection of consumers.  A safe
-     * approach is to dispatch to every subscription that matches.  Queue Subscriptions that 
-     * have not exceeded their pre-fetch limit will attempt to lock the message before 
-     * dispatching to the client.  First subscription to lock the message wins.  
-     * 
-     * Order of dispatching to the subscriptions matters since a subscription with a 
-     * large pre-fetch may take all the messages if he is always dispatched to first.  
-     * Once a message has been locked, it does not need to be dispatched to any 
-     * further subscriptions.
-     * 
-     * The list will be safe to iterate over when this method is called
-     * 
-     * @return true if at least one consumer was dispatched or false if there are no active subscriptions that could be dispatched
-     */
-    boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List<Subscription> consumers) throws Exception;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchSelector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchSelector.java
deleted file mode 100644
index 2279978..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchSelector.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-
-/**
- * Determines if a subscription can dispatch a message reference
- *
- */
-public interface DispatchSelector {
-   
-   
-    /**
-     * return true if a subscription can dispatch a message reference
-     * @param subscription
-     * @param node
-     * @return true if can dispatch
-     * @throws Exception 
-     */
-    
-    boolean canDispatch(Subscription subscription, MessageReference node) throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingDurableSubscriberMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingDurableSubscriberMessageStoragePolicy.java
deleted file mode 100755
index 0f714eb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingDurableSubscriberMessageStoragePolicy.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.FilePendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-
-/**
- * Creates a PendIngMessageCursor for Durable subscribers *
- * 
- * @org.apache.xbean.XBean element="fileDurableSubscriberCursor"
- *                         description="Pending messages for durable subscribers
- *                         held in temporary files"
- * 
- */
-public class FilePendingDurableSubscriberMessageStoragePolicy implements PendingDurableSubscriberMessageStoragePolicy {
-
-    /**
-     * Retrieve the configured pending message storage cursor;
-     * @param broker 
-     * 
-     * @param clientId
-     * @param name
-     * @param maxBatchSize
-     * @param sub 
-     * @return the Pending Message cursor
-     */
-    public PendingMessageCursor getSubscriberPendingMessageCursor(Broker broker,String clientId, String name, int maxBatchSize, DurableTopicSubscription sub) {
-        return new FilePendingMessageCursor(broker,name,AbstractPendingMessageCursor.isPrioritizedMessageSubscriber(broker, sub));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingQueueMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingQueueMessageStoragePolicy.java
deleted file mode 100755
index 27feef0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingQueueMessageStoragePolicy.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.cursors.FilePendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-
-/**
- * Creates a FilePendingMessageCursor *
- * 
- * @org.apache.xbean.XBean element="fileQueueCursor" description="Pending
- *                         messages paged in from file"
- * 
- * 
- */
-public class FilePendingQueueMessageStoragePolicy implements PendingQueueMessageStoragePolicy {
-
-    /**
-     * @param broker 
-     * @param queue
-     * @return the cursor
-     * @see org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy#getQueuePendingMessageCursor(org.apache.openjpa.lib.util.concurrent.Queue,
-     *      org.apache.activemq.kaha.Store)
-     */
-    public PendingMessageCursor getQueuePendingMessageCursor(Broker broker,Queue queue) {
-        return new FilePendingMessageCursor(broker,"PendingCursor:" + queue.getName(),queue.isPrioritizedMessages());
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingSubscriberMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingSubscriberMessageStoragePolicy.java
deleted file mode 100644
index 2a42d0e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FilePendingSubscriberMessageStoragePolicy.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.FilePendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-
-/**
- * Creates a PendIngMessageCursor for Durable subscribers *
- * 
- * @org.apache.xbean.XBean element="fileCursor" description="Pending messages
- *                         for durable subscribers held in temporary files"
- * 
- * 
- */
-public class FilePendingSubscriberMessageStoragePolicy implements PendingSubscriberMessageStoragePolicy {
-
-    /**
-     * @param broker
-     * @param name
-     * @param maxBatchSize
-     * @return a Cursor
-     * @see org.apache.activemq.broker.region.policy.PendingSubscriberMessageStoragePolicy#getSubscriberPendingMessageCursor(java.lang.String,
-     *      org.apache.activemq.kaha.Store, int)
-     */
-    public PendingMessageCursor getSubscriberPendingMessageCursor(Broker broker, String name, int maxBatchSize,
-            Subscription subs) {
-        return new FilePendingMessageCursor(broker, "PendingCursor:" + name, AbstractPendingMessageCursor
-                .isPrioritizedMessageSubscriber(broker, subs));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java
deleted file mode 100644
index 84b6450..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.SubscriptionRecovery;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.DestinationFilter;
-
-/**
- * This implementation of {@link SubscriptionRecoveryPolicy} will keep a fixed
- * count of last messages.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class FixedCountSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
-    private volatile MessageReference messages[];
-    private int maximumSize = 100;
-    private int tail;
-
-    public SubscriptionRecoveryPolicy copy() {
-        FixedCountSubscriptionRecoveryPolicy rc = new FixedCountSubscriptionRecoveryPolicy();
-        rc.setMaximumSize(maximumSize);
-        return rc;
-    }
-
-    public synchronized boolean add(ConnectionContext context, MessageReference node) throws Exception {
-        messages[tail++] = node;
-        if (tail >= messages.length) {
-            tail = 0;
-        }
-        return true;
-    }
-
-    public synchronized void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception {
-        // Re-dispatch the last message seen.
-        int t = tail;
-        // The buffer may not have rolled over yet..., start from the front
-        if (messages[t] == null) {
-            t = 0;
-        }
-        // Well the buffer is really empty then.
-        if (messages[t] == null) {
-            return;
-        }
-        // Keep dispatching until t hit's tail again.
-        do {
-            MessageReference node = messages[t];
-            sub.addRecoveredMessage(context, node);
-            t++;
-            if (t >= messages.length) {
-                t = 0;
-            }
-        } while (t != tail);
-    }
-
-    public void start() throws Exception {
-        messages = new MessageReference[maximumSize];
-    }
-
-    public void stop() throws Exception {
-        messages = null;
-    }
-
-    public int getMaximumSize() {
-        return maximumSize;
-    }
-
-    /**
-     * Sets the maximum number of messages that this destination will hold
-     * around in RAM
-     */
-    public void setMaximumSize(int maximumSize) {
-        this.maximumSize = maximumSize;
-    }
-
-    public synchronized Message[] browse(ActiveMQDestination destination) throws Exception {
-        List<Message> result = new ArrayList<Message>();
-        DestinationFilter filter = DestinationFilter.parseFilter(destination);
-        int t = tail;
-        if (messages[t] == null) {
-            t = 0;
-        }
-        if (messages[t] != null) {
-            do {
-                MessageReference ref = messages[t];
-                Message message = ref.getMessage();
-                if (filter.matches(message.getDestination())) {
-                    result.add(message);
-                }
-                t++;
-                if (t >= messages.length) {
-                    t = 0;
-                }
-            } while (t != tail);
-        }
-        return result.toArray(new Message[result.size()]);
-    }
-
-    public void setBroker(Broker broker) {        
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedSizedSubscriptionRecoveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedSizedSubscriptionRecoveryPolicy.java
deleted file mode 100644
index 8c58e4c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedSizedSubscriptionRecoveryPolicy.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.Iterator;
-import java.util.List;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.SubscriptionRecovery;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.memory.list.DestinationBasedMessageList;
-import org.apache.activemq.memory.list.MessageList;
-import org.apache.activemq.memory.list.SimpleMessageList;
-
-/**
- * This implementation of {@link SubscriptionRecoveryPolicy} will keep a fixed
- * amount of memory available in RAM for message history which is evicted in
- * time order.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class FixedSizedSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
-
-    private MessageList buffer;
-    private int maximumSize =  64 * 1024;
-    private boolean useSharedBuffer = true;
-
-    public FixedSizedSubscriptionRecoveryPolicy() {
-        
-    }
-    
-    public SubscriptionRecoveryPolicy copy() {
-        FixedSizedSubscriptionRecoveryPolicy rc = new FixedSizedSubscriptionRecoveryPolicy();
-        rc.setMaximumSize(maximumSize);
-        rc.setUseSharedBuffer(useSharedBuffer);
-        return rc;
-    }
-
-    public boolean add(ConnectionContext context, MessageReference message) throws Exception {
-        buffer.add(message);
-        return true;
-    }
-
-    public void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception {
-        // Re-dispatch the messages from the buffer.
-        List copy = buffer.getMessages(sub.getActiveMQDestination());
-        if (!copy.isEmpty()) {
-            for (Iterator iter = copy.iterator(); iter.hasNext();) {
-                MessageReference node = (MessageReference)iter.next();
-                sub.addRecoveredMessage(context, node);
-            }
-        }
-    }
-
-    public void start() throws Exception {
-        buffer = createMessageList();
-    }
-
-    public void stop() throws Exception {
-        buffer.clear();
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public MessageList getBuffer() {
-        return buffer;
-    }
-
-    public void setBuffer(MessageList buffer) {
-        this.buffer = buffer;
-    }
-
-    public int getMaximumSize() {
-        return maximumSize;
-    }
-
-    /**
-     * Sets the maximum amount of RAM in bytes that this buffer can hold in RAM
-     */
-    public void setMaximumSize(int maximumSize) {
-        this.maximumSize = maximumSize;
-    }
-
-    public boolean isUseSharedBuffer() {
-        return useSharedBuffer;
-    }
-
-    public void setUseSharedBuffer(boolean useSharedBuffer) {
-        this.useSharedBuffer = useSharedBuffer;
-    }
-
-    public Message[] browse(ActiveMQDestination destination) throws Exception {
-        return buffer.browse(destination);
-    }
-    
-    public void setBroker(Broker broker) {        
-    }
-
-    // Implementation methods
-
-    // -------------------------------------------------------------------------
-    protected MessageList createMessageList() {
-        if (useSharedBuffer) {
-            return new SimpleMessageList(maximumSize);
-        } else {
-            return new DestinationBasedMessageList(maximumSize);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/IndividualDeadLetterStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/IndividualDeadLetterStrategy.java
deleted file mode 100644
index a8719b1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/IndividualDeadLetterStrategy.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Message;
-
-/**
- * A {@link DeadLetterStrategy} where each destination has its own individual
- * DLQ using the subject naming hierarchy.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class IndividualDeadLetterStrategy extends AbstractDeadLetterStrategy {
-
-    private String topicPrefix = "ActiveMQ.DLQ.Topic.";
-    private String queuePrefix = "ActiveMQ.DLQ.Queue.";
-    private boolean useQueueForQueueMessages = true;
-    private boolean useQueueForTopicMessages = true;
-    private boolean destinationPerDurableSubscriber;
-
-    public ActiveMQDestination getDeadLetterQueueFor(Message message,
-                                                     Subscription subscription) {
-        if (message.getDestination().isQueue()) {
-            return createDestination(message, queuePrefix, useQueueForQueueMessages, subscription);
-        } else {
-            return createDestination(message, topicPrefix, useQueueForTopicMessages, subscription);
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public String getQueuePrefix() {
-        return queuePrefix;
-    }
-
-    /**
-     * Sets the prefix to use for all dead letter queues for queue messages
-     */
-    public void setQueuePrefix(String queuePrefix) {
-        this.queuePrefix = queuePrefix;
-    }
-
-    public String getTopicPrefix() {
-        return topicPrefix;
-    }
-
-    /**
-     * Sets the prefix to use for all dead letter queues for topic messages
-     */
-    public void setTopicPrefix(String topicPrefix) {
-        this.topicPrefix = topicPrefix;
-    }
-
-    public boolean isUseQueueForQueueMessages() {
-        return useQueueForQueueMessages;
-    }
-
-    /**
-     * Sets whether a queue or topic should be used for queue messages sent to a
-     * DLQ. The default is to use a Queue
-     */
-    public void setUseQueueForQueueMessages(boolean useQueueForQueueMessages) {
-        this.useQueueForQueueMessages = useQueueForQueueMessages;
-    }
-
-    public boolean isUseQueueForTopicMessages() {
-        return useQueueForTopicMessages;
-    }
-
-    /**
-     * Sets whether a queue or topic should be used for topic messages sent to a
-     * DLQ. The default is to use a Queue
-     */
-    public void setUseQueueForTopicMessages(boolean useQueueForTopicMessages) {
-        this.useQueueForTopicMessages = useQueueForTopicMessages;
-    }
-
-    public boolean isDestinationPerDurableSubscriber() {
-        return destinationPerDurableSubscriber;
-    }
-
-    /**
-     * sets whether durable topic subscriptions are to get individual dead letter destinations.
-     * When true, the DLQ is of the form 'topicPrefix.clientId:subscriptionName'
-     * The default is false.
-     * @param destinationPerDurableSubscriber
-     */
-    public void setDestinationPerDurableSubscriber(boolean destinationPerDurableSubscriber) {
-        this.destinationPerDurableSubscriber = destinationPerDurableSubscriber;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected ActiveMQDestination createDestination(Message message,
-                                                    String prefix,
-                                                    boolean useQueue,
-                                                    Subscription subscription ) {
-        String name = prefix + message.getDestination().getPhysicalName();
-        if (destinationPerDurableSubscriber && subscription instanceof DurableTopicSubscription) {
-            name += "." + ((DurableTopicSubscription)subscription).getSubscriptionKey();
-        }
-        if (useQueue) {
-            return new ActiveMQQueue(name);
-        } else {
-            return new ActiveMQTopic(name);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/LastImageSubscriptionRecoveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/LastImageSubscriptionRecoveryPolicy.java
deleted file mode 100644
index 611891d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/LastImageSubscriptionRecoveryPolicy.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.SubscriptionRecovery;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.DestinationFilter;
-
-/**
- * This implementation of {@link SubscriptionRecoveryPolicy} will only keep the
- * last message.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class LastImageSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
-
-    private volatile MessageReference lastImage;
-
-    public boolean add(ConnectionContext context, MessageReference node) throws Exception {
-        lastImage = node;
-        return true;
-    }
-
-    public void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception {
-        // Re-dispatch the last message seen.
-        MessageReference node = lastImage;
-        if (node != null) {
-            sub.addRecoveredMessage(context, node);
-        }
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public Message[] browse(ActiveMQDestination destination) throws Exception {
-        List<Message> result = new ArrayList<Message>();
-        DestinationFilter filter = DestinationFilter.parseFilter(destination);
-        if (filter.matches(lastImage.getMessage().getDestination())) {
-            result.add(lastImage.getMessage());
-        }
-        return result.toArray(new Message[result.size()]);
-    }
-
-    public SubscriptionRecoveryPolicy copy() {
-        return new LastImageSubscriptionRecoveryPolicy();
-    }
-    
-    public void setBroker(Broker broker) {        
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java
deleted file mode 100644
index 334cb37..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.io.IOException;
-import java.util.LinkedList;
-
-import org.apache.activemq.broker.region.MessageReference;
-
-/**
- * A strategy for evicting messages from slow consumers.
- * 
- * 
- */
-public interface MessageEvictionStrategy {
-
-    /**
-     * Find the message reference in the given list with oldest messages at the front and newer messages at the end
-     * 
-     * @return the message that has been evicted.
-     * @throws IOException if an exception occurs such as reading a message content (but should not ever happen
-     * as usually all the messages will be in RAM when this method is called).
-     */
-    MessageReference[] evictMessages(LinkedList messages) throws IOException;
-
-    /**
-     * REturns the high water mark on which we will eagerly evict expired messages from RAM
-     */
-    int getEvictExpiredMessagesHighWatermark();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategySupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategySupport.java
deleted file mode 100644
index 32f0c6f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategySupport.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-/**
- * A useful base class for implementation inheritence.
- * 
- * 
- */
-public abstract class MessageEvictionStrategySupport implements MessageEvictionStrategy {
-
-    private int evictExpiredMessagesHighWatermark = 1000;
-
-    public int getEvictExpiredMessagesHighWatermark() {
-        return evictExpiredMessagesHighWatermark;
-    }
-
-    /**
-     * Sets the high water mark on which we will eagerly evict expired messages from RAM
-     */
-    public void setEvictExpiredMessagesHighWatermark(int evictExpiredMessagesHighWaterMark) {
-        this.evictExpiredMessagesHighWatermark = evictExpiredMessagesHighWaterMark;
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageQuery.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageQuery.java
deleted file mode 100644
index ae462a7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageQuery.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import javax.jms.MessageListener;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-
-/**
- * Represents some kind of query which will load initial messages from some source for a new topic subscriber.
- * 
- * 
- */
-public interface MessageQuery {
-    
-    /**
-     * Executes the query for messages; each message is passed into the listener
-     * 
-     * @param destination the destination on which the query is to be performed
-     * @param listener is the listener to notify as each message is created or loaded
-     */
-    void execute(ActiveMQDestination destination, MessageListener listener) throws Exception;
-
-    /**
-     * Returns true if the given update is valid and does not overlap with the initial message query.
-     * When performing an initial load from some source, there is a chance that an update may occur which is logically before
-     * the message sent on the initial load - so this method provides a hook where the query instance can keep track of the version IDs
-     * of the messages sent so that if an older version is sent as an update it can be excluded to avoid going backwards in time.
-     * 
-     * e.g. if the execute() method creates version 2 of an object and then an update message is sent for version 1, this method should return false to 
-     * hide the old update message.
-     * 
-     * @param message the update message which may have been sent before the query actually completed
-     * @return true if the update message is valid otherwise false in which case the update message will be discarded.
-     */
-    boolean validateUpdate(Message message);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/NoSubscriptionRecoveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/NoSubscriptionRecoveryPolicy.java
deleted file mode 100644
index 69745a2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/NoSubscriptionRecoveryPolicy.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.SubscriptionRecovery;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-
-/**
- * This SubscriptionRecoveryPolicy disable recovery of messages.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class NoSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
-
-    public SubscriptionRecoveryPolicy copy() {
-        // This object is immutable
-        return this;
-    }
-
-    public boolean add(ConnectionContext context, MessageReference node) throws Exception {
-        return true;
-    }
-
-    public void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception {
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public Message[] browse(ActiveMQDestination dest) throws Exception {
-        return new Message[0];
-    }
-    
-    public void setBroker(Broker broker) {        
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageEvictionStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageEvictionStrategy.java
deleted file mode 100644
index 90bf3cb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageEvictionStrategy.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.LinkedList;
-
-import org.apache.activemq.broker.region.MessageReference;
-
-/**
- * An eviction strategy which evicts the oldest message first (which is the
- * default).
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class OldestMessageEvictionStrategy extends MessageEvictionStrategySupport  {
-
-    public MessageReference[] evictMessages(LinkedList messages) {
-        return new MessageReference[] {(MessageReference) messages.removeFirst()};
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageWithLowestPriorityEvictionStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageWithLowestPriorityEvictionStrategy.java
deleted file mode 100644
index 38ccbda..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageWithLowestPriorityEvictionStrategy.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import org.apache.activemq.broker.region.MessageReference;
-
-/**
- * An eviction strategy which evicts the oldest message with the lowest priority first.
- * 
- * @org.apache.xbean.XBean
- * 
- * messageEvictionStrategy
- */
-public class OldestMessageWithLowestPriorityEvictionStrategy extends MessageEvictionStrategySupport {
-
-    public MessageReference[] evictMessages(LinkedList messages) throws IOException {
-        byte lowestPriority = Byte.MAX_VALUE;
-        int pivot = 0;
-        Iterator iter = messages.iterator();
-        for (int i = 0; iter.hasNext(); i++) {
-            MessageReference reference = (MessageReference) iter.next();
-            byte priority = reference.getMessage().getPriority();
-            if (priority < lowestPriority) {
-                lowestPriority = priority;
-                pivot = i;
-            }
-        }
-        return new MessageReference[] {(MessageReference) messages.remove(pivot)};
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingDurableSubscriberMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingDurableSubscriberMessageStoragePolicy.java
deleted file mode 100755
index 9a7b613..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingDurableSubscriberMessageStoragePolicy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-
-/**
- * Abstraction to allow different policies for holding messages awaiting
- * dispatch to active clients
- * 
- * 
- */
-public interface PendingDurableSubscriberMessageStoragePolicy {
-
-    /**
-     * Retrieve the configured pending message storage cursor;
-     * @param broker 
-     * 
-     * @param clientId
-     * @param name
-     * @param maxBatchSize
-     * @param sub 
-     * @return the Pending Message cursor
-     */
-    PendingMessageCursor getSubscriberPendingMessageCursor(Broker broker,String clientId, String name, int maxBatchSize, DurableTopicSubscription sub);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingMessageLimitStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingMessageLimitStrategy.java
deleted file mode 100644
index 9015fa0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingMessageLimitStrategy.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.TopicSubscription;
-
-/**
- * A pluggable strategy to calculate the maximum number of messages that are allowed to be pending on 
- * consumers (in addition to their prefetch sizes).
- * 
- * Once the limit is reached, non-durable topics can then start discarding old messages.
- * This allows us to keep dispatching messages to slow consumers while not blocking fast consumers
- * and discarding the messages oldest first.
- *  
- * 
- */
-public interface PendingMessageLimitStrategy {
-
-    /**
-     * Calculate the maximum number of pending messages (in excess of the prefetch size)
-     * for the given subscription
-     * 
-     * @return the maximum or -1 if there is no maximum
-     */
-    int getMaximumPendingMessageLimit(TopicSubscription subscription);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingQueueMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingQueueMessageStoragePolicy.java
deleted file mode 100755
index d2f5802..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingQueueMessageStoragePolicy.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-
-/**
- * Abstraction to allow different policies for holding messages awaiting
- * dispatch on a Queue
- * 
- * 
- */
-public interface PendingQueueMessageStoragePolicy {
-
-    /**
-     * Retrieve the configured pending message storage cursor;
-     * @param broker 
-     * 
-     * @param queue
-     * @return the cursor
-     */
-    PendingMessageCursor getQueuePendingMessageCursor(Broker broker,Queue queue);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingSubscriberMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingSubscriberMessageStoragePolicy.java
deleted file mode 100644
index 36430ae..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingSubscriberMessageStoragePolicy.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-
-/**
- * Abstraction to allow different policies for holding messages awaiting
- * dispatch to active clients
- * 
- * 
- */
-public interface PendingSubscriberMessageStoragePolicy {
-
-    /**
-     * Retrieve the configured pending message storage cursor;
-     * @param broker 
-     * 
-     * @param name
-     * @param maxBatchSize
-     * @return the Pending Message cursor
-     */
-    PendingMessageCursor getSubscriberPendingMessageCursor(Broker broker,String name,int maxBatchSize,Subscription subs);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
deleted file mode 100644
index adace80..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
+++ /dev/null
@@ -1,798 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.BaseDestination;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.QueueBrowserSubscription;
-import org.apache.activemq.broker.region.QueueSubscription;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.broker.region.TopicSubscription;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.group.MessageGroupHashBucketFactory;
-import org.apache.activemq.broker.region.group.MessageGroupMapFactory;
-import org.apache.activemq.filter.DestinationMapEntry;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents an entry in a {@link PolicyMap} for assigning policies to a
- * specific destination or a hierarchical wildcard area of destinations.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class PolicyEntry extends DestinationMapEntry {
-
-    private static final Logger LOG = LoggerFactory.getLogger(PolicyEntry.class);
-    private DispatchPolicy dispatchPolicy;
-    private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy;
-    private boolean sendAdvisoryIfNoConsumers;
-    private DeadLetterStrategy deadLetterStrategy = Destination.DEFAULT_DEAD_LETTER_STRATEGY;
-    private PendingMessageLimitStrategy pendingMessageLimitStrategy;
-    private MessageEvictionStrategy messageEvictionStrategy;
-    private long memoryLimit;
-    private MessageGroupMapFactory messageGroupMapFactory;
-    private PendingQueueMessageStoragePolicy pendingQueuePolicy;
-    private PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy;
-    private PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy;
-    private int maxProducersToAudit=BaseDestination.MAX_PRODUCERS_TO_AUDIT;
-    private int maxAuditDepth=BaseDestination.MAX_AUDIT_DEPTH;
-    private int maxQueueAuditDepth=BaseDestination.MAX_AUDIT_DEPTH;
-    private boolean enableAudit=true;
-    private boolean producerFlowControl = true;
-    private long blockedProducerWarningInterval = Destination.DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL;
-    private boolean optimizedDispatch=false;
-    private int maxPageSize=BaseDestination.MAX_PAGE_SIZE;
-    private int maxBrowsePageSize=BaseDestination.MAX_BROWSE_PAGE_SIZE;
-    private boolean useCache=true;
-    private long minimumMessageSize=1024;
-    private boolean useConsumerPriority=true;
-    private boolean strictOrderDispatch=false;
-    private boolean lazyDispatch=false;
-    private int timeBeforeDispatchStarts = 0;
-    private int consumersBeforeDispatchStarts = 0;
-    private boolean advisoryForSlowConsumers;
-    private boolean advisdoryForFastProducers;
-    private boolean advisoryForDiscardingMessages;
-    private boolean advisoryWhenFull;
-    private boolean advisoryForDelivery;
-    private boolean advisoryForConsumed;
-    private long expireMessagesPeriod = BaseDestination.EXPIRE_MESSAGE_PERIOD;
-    private int maxExpirePageSize = BaseDestination.MAX_BROWSE_PAGE_SIZE;
-    private int queuePrefetch=ActiveMQPrefetchPolicy.DEFAULT_QUEUE_PREFETCH;
-    private int queueBrowserPrefetch=ActiveMQPrefetchPolicy.DEFAULT_QUEUE_BROWSER_PREFETCH;
-    private int topicPrefetch=ActiveMQPrefetchPolicy.DEFAULT_TOPIC_PREFETCH;
-    private int durableTopicPrefetch=ActiveMQPrefetchPolicy.DEFAULT_DURABLE_TOPIC_PREFETCH;
-    private boolean usePrefetchExtension = true;
-    private int cursorMemoryHighWaterMark = 70;
-    private int storeUsageHighWaterMark = 100;
-    private SlowConsumerStrategy slowConsumerStrategy;
-    private boolean prioritizedMessages;
-    private boolean allConsumersExclusiveByDefault;
-    private boolean gcInactiveDestinations;
-    private long inactiveTimoutBeforeGC = BaseDestination.DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC;
-    private boolean reduceMemoryFootprint;
-    
-   
-    public void configure(Broker broker,Queue queue) {
-        baseConfiguration(broker,queue);
-        if (dispatchPolicy != null) {
-            queue.setDispatchPolicy(dispatchPolicy);
-        }
-        queue.setDeadLetterStrategy(getDeadLetterStrategy());
-        queue.setMessageGroupMapFactory(getMessageGroupMapFactory());
-        if (memoryLimit > 0) {
-            queue.getMemoryUsage().setLimit(memoryLimit);
-        }
-        if (pendingQueuePolicy != null) {
-            PendingMessageCursor messages = pendingQueuePolicy.getQueuePendingMessageCursor(broker,queue);
-            queue.setMessages(messages);
-        }
-        
-        queue.setUseConsumerPriority(isUseConsumerPriority());
-        queue.setStrictOrderDispatch(isStrictOrderDispatch());
-        queue.setOptimizedDispatch(isOptimizedDispatch());
-        queue.setLazyDispatch(isLazyDispatch());
-        queue.setTimeBeforeDispatchStarts(getTimeBeforeDispatchStarts());
-        queue.setConsumersBeforeDispatchStarts(getConsumersBeforeDispatchStarts());
-        queue.setAllConsumersExclusiveByDefault(isAllConsumersExclusiveByDefault());
-    }
-
-    public void configure(Broker broker,Topic topic) {
-        baseConfiguration(broker,topic);
-        if (dispatchPolicy != null) {
-            topic.setDispatchPolicy(dispatchPolicy);
-        }
-        topic.setDeadLetterStrategy(getDeadLetterStrategy());
-        if (subscriptionRecoveryPolicy != null) {
-            SubscriptionRecoveryPolicy srp = subscriptionRecoveryPolicy.copy();
-            srp.setBroker(broker);
-            topic.setSubscriptionRecoveryPolicy(srp);
-        }
-        if (memoryLimit > 0) {
-            topic.getMemoryUsage().setLimit(memoryLimit);
-        }
-        topic.setLazyDispatch(isLazyDispatch());
-    }
-    
-    public void baseConfiguration(Broker broker,BaseDestination destination) {
-        destination.setProducerFlowControl(isProducerFlowControl());
-        destination.setBlockedProducerWarningInterval(getBlockedProducerWarningInterval());
-        destination.setEnableAudit(isEnableAudit());
-        destination.setMaxAuditDepth(getMaxQueueAuditDepth());
-        destination.setMaxProducersToAudit(getMaxProducersToAudit());
-        destination.setMaxPageSize(getMaxPageSize());
-        destination.setMaxBrowsePageSize(getMaxBrowsePageSize());
-        destination.setUseCache(isUseCache());
-        destination.setMinimumMessageSize((int) getMinimumMessageSize());
-        destination.setAdvisoryForConsumed(isAdvisoryForConsumed());
-        destination.setAdvisoryForDelivery(isAdvisoryForDelivery());
-        destination.setAdvisoryForDiscardingMessages(isAdvisoryForDiscardingMessages());
-        destination.setAdvisoryForSlowConsumers(isAdvisoryForSlowConsumers());
-        destination.setAdvisdoryForFastProducers(isAdvisdoryForFastProducers());
-        destination.setAdvisoryWhenFull(isAdvisoryWhenFull());
-        destination.setSendAdvisoryIfNoConsumers(sendAdvisoryIfNoConsumers);
-        destination.setExpireMessagesPeriod(getExpireMessagesPeriod());
-        destination.setMaxExpirePageSize(getMaxExpirePageSize());
-        destination.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
-        destination.setStoreUsageHighWaterMark(getStoreUsageHighWaterMark());
-        SlowConsumerStrategy scs = getSlowConsumerStrategy();
-        if (scs != null) {
-            scs.setBrokerService(broker);
-        }
-        destination.setSlowConsumerStrategy(scs);
-        destination.setPrioritizedMessages(isPrioritizedMessages());
-        destination.setGcIfInactive(isGcInactiveDestinations());
-        destination.setInactiveTimoutBeforeGC(getInactiveTimoutBeforeGC());
-        destination.setReduceMemoryFootprint(isReduceMemoryFootprint());
-    }
-
-    public void configure(Broker broker, SystemUsage memoryManager, TopicSubscription subscription) {
-        //override prefetch size if not set by the Consumer
-        int prefetch=subscription.getConsumerInfo().getPrefetchSize();
-        if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_TOPIC_PREFETCH){
-            subscription.getConsumerInfo().setPrefetchSize(getTopicPrefetch());
-        }
-        if (pendingMessageLimitStrategy != null) {
-            int value = pendingMessageLimitStrategy.getMaximumPendingMessageLimit(subscription);
-            int consumerLimit = subscription.getInfo().getMaximumPendingMessageLimit();
-            if (consumerLimit > 0) {
-                if (value < 0 || consumerLimit < value) {
-                    value = consumerLimit;
-                }
-            }
-            if (value >= 0) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Setting the maximumPendingMessages size to: " + value + " for consumer: " + subscription.getInfo().getConsumerId());
-                }
-                subscription.setMaximumPendingMessages(value);
-            }
-        }
-        if (messageEvictionStrategy != null) {
-            subscription.setMessageEvictionStrategy(messageEvictionStrategy);
-        }
-        if (pendingSubscriberPolicy != null) {
-            String name = subscription.getContext().getClientId() + "_" + subscription.getConsumerInfo().getConsumerId();
-            int maxBatchSize = subscription.getConsumerInfo().getPrefetchSize();
-            subscription.setMatched(pendingSubscriberPolicy.getSubscriberPendingMessageCursor(broker,name, maxBatchSize,subscription));
-        }
-        if (enableAudit) {
-            subscription.setEnableAudit(enableAudit);
-            subscription.setMaxProducersToAudit(maxProducersToAudit);
-            subscription.setMaxAuditDepth(maxAuditDepth);
-        }
-    }
-
-    public void configure(Broker broker, SystemUsage memoryManager, DurableTopicSubscription sub) {
-        String clientId = sub.getSubscriptionKey().getClientId();
-        String subName = sub.getSubscriptionKey().getSubscriptionName();
-        int prefetch = sub.getPrefetchSize();
-        sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
-        //override prefetch size if not set by the Consumer
-        if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_DURABLE_TOPIC_PREFETCH || prefetch == ActiveMQPrefetchPolicy.DEFAULT_OPTIMIZE_DURABLE_TOPIC_PREFETCH){
-            sub.setPrefetchSize(getDurableTopicPrefetch());
-        }
-        if (pendingDurableSubscriberPolicy != null) {
-            PendingMessageCursor cursor = pendingDurableSubscriberPolicy.getSubscriberPendingMessageCursor(broker,clientId, subName,sub.getPrefetchSize(),sub);
-            cursor.setSystemUsage(memoryManager);
-            sub.setPending(cursor);
-        }
-        int auditDepth = getMaxAuditDepth();
-        if (auditDepth == BaseDestination.MAX_AUDIT_DEPTH && this.isPrioritizedMessages()) {
-            sub.setMaxAuditDepth(auditDepth * 10);
-        } else {
-            sub.setMaxAuditDepth(auditDepth);
-        }
-        sub.setMaxProducersToAudit(getMaxProducersToAudit());
-        sub.setUsePrefetchExtension(isUsePrefetchExtension());        
-    }
-    
-    public void configure(Broker broker, SystemUsage memoryManager, QueueBrowserSubscription sub) {
-       
-        int prefetch = sub.getPrefetchSize();
-        //override prefetch size if not set by the Consumer
-        
-        if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_QUEUE_BROWSER_PREFETCH){
-            sub.setPrefetchSize(getQueueBrowserPrefetch());
-        }
-        sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
-        sub.setUsePrefetchExtension(isUsePrefetchExtension());
-    }
-    
-    public void configure(Broker broker, SystemUsage memoryManager, QueueSubscription sub) {
-        
-        int prefetch = sub.getPrefetchSize();
-        //override prefetch size if not set by the Consumer
-        
-        if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_QUEUE_PREFETCH){
-            sub.setPrefetchSize(getQueuePrefetch());
-        }
-        sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
-        sub.setUsePrefetchExtension(isUsePrefetchExtension());
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public DispatchPolicy getDispatchPolicy() {
-        return dispatchPolicy;
-    }
-
-    public void setDispatchPolicy(DispatchPolicy policy) {
-        this.dispatchPolicy = policy;
-    }
-
-    public SubscriptionRecoveryPolicy getSubscriptionRecoveryPolicy() {
-        return subscriptionRecoveryPolicy;
-    }
-
-    public void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy subscriptionRecoveryPolicy) {
-        this.subscriptionRecoveryPolicy = subscriptionRecoveryPolicy;
-    }
-
-    public boolean isSendAdvisoryIfNoConsumers() {
-        return sendAdvisoryIfNoConsumers;
-    }
-
-    /**
-     * Sends an advisory message if a non-persistent message is sent and there
-     * are no active consumers
-     */
-    public void setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers) {
-        this.sendAdvisoryIfNoConsumers = sendAdvisoryIfNoConsumers;
-    }
-
-    public DeadLetterStrategy getDeadLetterStrategy() {
-        return deadLetterStrategy;
-    }
-
-    /**
-     * Sets the policy used to determine which dead letter queue destination
-     * should be used
-     */
-    public void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy) {
-        this.deadLetterStrategy = deadLetterStrategy;
-    }
-
-    public PendingMessageLimitStrategy getPendingMessageLimitStrategy() {
-        return pendingMessageLimitStrategy;
-    }
-
-    /**
-     * Sets the strategy to calculate the maximum number of messages that are
-     * allowed to be pending on consumers (in addition to their prefetch sizes).
-     * Once the limit is reached, non-durable topics can then start discarding
-     * old messages. This allows us to keep dispatching messages to slow
-     * consumers while not blocking fast consumers and discarding the messages
-     * oldest first.
-     */
-    public void setPendingMessageLimitStrategy(PendingMessageLimitStrategy pendingMessageLimitStrategy) {
-        this.pendingMessageLimitStrategy = pendingMessageLimitStrategy;
-    }
-
-    public MessageEvictionStrategy getMessageEvictionStrategy() {
-        return messageEvictionStrategy;
-    }
-
-    /**
-     * Sets the eviction strategy used to decide which message to evict when the
-     * slow consumer needs to discard messages
-     */
-    public void setMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy) {
-        this.messageEvictionStrategy = messageEvictionStrategy;
-    }
-
-    public long getMemoryLimit() {
-        return memoryLimit;
-    }
-
-    /**
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     */
-    public void setMemoryLimit(long memoryLimit) {
-        this.memoryLimit = memoryLimit;
-    }
-
-    public MessageGroupMapFactory getMessageGroupMapFactory() {
-        if (messageGroupMapFactory == null) {
-            messageGroupMapFactory = new MessageGroupHashBucketFactory();
-        }
-        return messageGroupMapFactory;
-    }
-
-    /**
-     * Sets the factory used to create new instances of {MessageGroupMap} used
-     * to implement the <a
-     * href="http://activemq.apache.org/message-groups.html">Message Groups</a>
-     * functionality.
-     */
-    public void setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory) {
-        this.messageGroupMapFactory = messageGroupMapFactory;
-    }
-
-    /**
-     * @return the pendingDurableSubscriberPolicy
-     */
-    public PendingDurableSubscriberMessageStoragePolicy getPendingDurableSubscriberPolicy() {
-        return this.pendingDurableSubscriberPolicy;
-    }
-
-    /**
-     * @param pendingDurableSubscriberPolicy the pendingDurableSubscriberPolicy
-     *                to set
-     */
-    public void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy) {
-        this.pendingDurableSubscriberPolicy = pendingDurableSubscriberPolicy;
-    }
-
-    /**
-     * @return the pendingQueuePolicy
-     */
-    public PendingQueueMessageStoragePolicy getPendingQueuePolicy() {
-        return this.pendingQueuePolicy;
-    }
-
-    /**
-     * @param pendingQueuePolicy the pendingQueuePolicy to set
-     */
-    public void setPendingQueuePolicy(PendingQueueMessageStoragePolicy pendingQueuePolicy) {
-        this.pendingQueuePolicy = pendingQueuePolicy;
-    }
-
-    /**
-     * @return the pendingSubscriberPolicy
-     */
-    public PendingSubscriberMessageStoragePolicy getPendingSubscriberPolicy() {
-        return this.pendingSubscriberPolicy;
-    }
-
-    /**
-     * @param pendingSubscriberPolicy the pendingSubscriberPolicy to set
-     */
-    public void setPendingSubscriberPolicy(PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy) {
-        this.pendingSubscriberPolicy = pendingSubscriberPolicy;
-    }
-
-    /**
-     * @return true if producer flow control enabled
-     */
-    public boolean isProducerFlowControl() {
-        return producerFlowControl;
-    }
-
-    /**
-     * @param producerFlowControl
-     */
-    public void setProducerFlowControl(boolean producerFlowControl) {
-        this.producerFlowControl = producerFlowControl;
-    }
-
-    /**
-     * Set's the interval at which warnings about producers being blocked by
-     * resource usage will be triggered. Values of 0 or less will disable
-     * warnings
-     * 
-     * @param blockedProducerWarningInterval the interval at which warning about
-     *            blocked producers will be triggered.
-     */
-    public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval) {
-        this.blockedProducerWarningInterval = blockedProducerWarningInterval;
-    }
-
-    /**
-     * 
-     * @return the interval at which warning about blocked producers will be
-     *         triggered.
-     */
-    public long getBlockedProducerWarningInterval() {
-        return blockedProducerWarningInterval;
-    }
-    
-    /**
-     * @return the maxProducersToAudit
-     */
-    public int getMaxProducersToAudit() {
-        return maxProducersToAudit;
-    }
-
-    /**
-     * @param maxProducersToAudit the maxProducersToAudit to set
-     */
-    public void setMaxProducersToAudit(int maxProducersToAudit) {
-        this.maxProducersToAudit = maxProducersToAudit;
-    }
-
-    /**
-     * @return the maxAuditDepth
-     */
-    public int getMaxAuditDepth() {
-        return maxAuditDepth;
-    }
-
-    /**
-     * @param maxAuditDepth the maxAuditDepth to set
-     */
-    public void setMaxAuditDepth(int maxAuditDepth) {
-        this.maxAuditDepth = maxAuditDepth;
-    }
-
-    /**
-     * @return the enableAudit
-     */
-    public boolean isEnableAudit() {
-        return enableAudit;
-    }
-
-    /**
-     * @param enableAudit the enableAudit to set
-     */
-    public void setEnableAudit(boolean enableAudit) {
-        this.enableAudit = enableAudit;
-    }
-
-    public int getMaxQueueAuditDepth() {
-        return maxQueueAuditDepth;
-    }
-
-    public void setMaxQueueAuditDepth(int maxQueueAuditDepth) {
-        this.maxQueueAuditDepth = maxQueueAuditDepth;
-    }
-
-    public boolean isOptimizedDispatch() {
-        return optimizedDispatch;
-    }
-
-    public void setOptimizedDispatch(boolean optimizedDispatch) {
-        this.optimizedDispatch = optimizedDispatch;
-    }
-    
-    public int getMaxPageSize() {
-        return maxPageSize;
-    }
-
-    public void setMaxPageSize(int maxPageSize) {
-        this.maxPageSize = maxPageSize;
-    } 
-    
-    public int getMaxBrowsePageSize() {
-        return maxBrowsePageSize;
-    }
-
-    public void setMaxBrowsePageSize(int maxPageSize) {
-        this.maxBrowsePageSize = maxPageSize;
-    } 
-    
-    public boolean isUseCache() {
-        return useCache;
-    }
-
-    public void setUseCache(boolean useCache) {
-        this.useCache = useCache;
-    }
-
-    public long getMinimumMessageSize() {
-        return minimumMessageSize;
-    }
-
-    public void setMinimumMessageSize(long minimumMessageSize) {
-        this.minimumMessageSize = minimumMessageSize;
-    }   
-    
-    public boolean isUseConsumerPriority() {
-        return useConsumerPriority;
-    }
-
-    public void setUseConsumerPriority(boolean useConsumerPriority) {
-        this.useConsumerPriority = useConsumerPriority;
-    }
-
-    public boolean isStrictOrderDispatch() {
-        return strictOrderDispatch;
-    }
-
-    public void setStrictOrderDispatch(boolean strictOrderDispatch) {
-        this.strictOrderDispatch = strictOrderDispatch;
-    }
-
-    public boolean isLazyDispatch() {
-        return lazyDispatch;
-    }
-
-    public void setLazyDispatch(boolean lazyDispatch) {
-        this.lazyDispatch = lazyDispatch;
-    }
-
-    public int getTimeBeforeDispatchStarts() {
-        return timeBeforeDispatchStarts;
-    }
-
-    public void setTimeBeforeDispatchStarts(int timeBeforeDispatchStarts) {
-        this.timeBeforeDispatchStarts = timeBeforeDispatchStarts;
-    }
-
-    public int getConsumersBeforeDispatchStarts() {
-        return consumersBeforeDispatchStarts;
-    }
-
-    public void setConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts) {
-        this.consumersBeforeDispatchStarts = consumersBeforeDispatchStarts;
-    }
-
-    /**
-     * @return the advisoryForSlowConsumers
-     */
-    public boolean isAdvisoryForSlowConsumers() {
-        return advisoryForSlowConsumers;
-    }
-
-    /**
-     * @param advisoryForSlowConsumers the advisoryForSlowConsumers to set
-     */
-    public void setAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers) {
-        this.advisoryForSlowConsumers = advisoryForSlowConsumers;
-    }
-
-    /**
-     * @return the advisoryForDiscardingMessages
-     */
-    public boolean isAdvisoryForDiscardingMessages() {
-        return advisoryForDiscardingMessages;
-    }
-
-    /**
-     * @param advisoryForDiscardingMessages the advisoryForDiscardingMessages to set
-     */
-    public void setAdvisoryForDiscardingMessages(
-            boolean advisoryForDiscardingMessages) {
-        this.advisoryForDiscardingMessages = advisoryForDiscardingMessages;
-    }
-
-    /**
-     * @return the advisoryWhenFull
-     */
-    public boolean isAdvisoryWhenFull() {
-        return advisoryWhenFull;
-    }
-
-    /**
-     * @param advisoryWhenFull the advisoryWhenFull to set
-     */
-    public void setAdvisoryWhenFull(boolean advisoryWhenFull) {
-        this.advisoryWhenFull = advisoryWhenFull;
-    }
-
-    /**
-     * @return the advisoryForDelivery
-     */
-    public boolean isAdvisoryForDelivery() {
-        return advisoryForDelivery;
-    }
-
-    /**
-     * @param advisoryForDelivery the advisoryForDelivery to set
-     */
-    public void setAdvisoryForDelivery(boolean advisoryForDelivery) {
-        this.advisoryForDelivery = advisoryForDelivery;
-    }
-
-    /**
-     * @return the advisoryForConsumed
-     */
-    public boolean isAdvisoryForConsumed() {
-        return advisoryForConsumed;
-    }
-
-    /**
-     * @param advisoryForConsumed the advisoryForConsumed to set
-     */
-    public void setAdvisoryForConsumed(boolean advisoryForConsumed) {
-        this.advisoryForConsumed = advisoryForConsumed;
-    }
-    
-    /**
-     * @return the advisdoryForFastProducers
-     */
-    public boolean isAdvisdoryForFastProducers() {
-        return advisdoryForFastProducers;
-    }
-
-    /**
-     * @param advisdoryForFastProducers the advisdoryForFastProducers to set
-     */
-    public void setAdvisdoryForFastProducers(boolean advisdoryForFastProducers) {
-        this.advisdoryForFastProducers = advisdoryForFastProducers;
-    }
-
-    public void setMaxExpirePageSize(int maxExpirePageSize) {
-        this.maxExpirePageSize = maxExpirePageSize;
-    }
-    
-    public int getMaxExpirePageSize() {
-        return maxExpirePageSize;
-    }
-    
-    public void setExpireMessagesPeriod(long expireMessagesPeriod) {
-        this.expireMessagesPeriod = expireMessagesPeriod;
-    }
-    
-    public long getExpireMessagesPeriod() {
-        return expireMessagesPeriod;
-    }
-
-    /**
-     * Get the queuePrefetch
-     * @return the queuePrefetch
-     */
-    public int getQueuePrefetch() {
-        return this.queuePrefetch;
-    }
-
-    /**
-     * Set the queuePrefetch
-     * @param queuePrefetch the queuePrefetch to set
-     */
-    public void setQueuePrefetch(int queuePrefetch) {
-        this.queuePrefetch = queuePrefetch;
-    }
-
-    /**
-     * Get the queueBrowserPrefetch
-     * @return the queueBrowserPrefetch
-     */
-    public int getQueueBrowserPrefetch() {
-        return this.queueBrowserPrefetch;
-    }
-
-    /**
-     * Set the queueBrowserPrefetch
-     * @param queueBrowserPrefetch the queueBrowserPrefetch to set
-     */
-    public void setQueueBrowserPrefetch(int queueBrowserPrefetch) {
-        this.queueBrowserPrefetch = queueBrowserPrefetch;
-    }
-
-    /**
-     * Get the topicPrefetch
-     * @return the topicPrefetch
-     */
-    public int getTopicPrefetch() {
-        return this.topicPrefetch;
-    }
-
-    /**
-     * Set the topicPrefetch
-     * @param topicPrefetch the topicPrefetch to set
-     */
-    public void setTopicPrefetch(int topicPrefetch) {
-        this.topicPrefetch = topicPrefetch;
-    }
-
-    /**
-     * Get the durableTopicPrefetch
-     * @return the durableTopicPrefetch
-     */
-    public int getDurableTopicPrefetch() {
-        return this.durableTopicPrefetch;
-    }
-
-    /**
-     * Set the durableTopicPrefetch
-     * @param durableTopicPrefetch the durableTopicPrefetch to set
-     */
-    public void setDurableTopicPrefetch(int durableTopicPrefetch) {
-        this.durableTopicPrefetch = durableTopicPrefetch;
-    }
-    
-    public boolean isUsePrefetchExtension() {
-        return this.usePrefetchExtension;
-    }
-
-    public void setUsePrefetchExtension(boolean usePrefetchExtension) {
-        this.usePrefetchExtension = usePrefetchExtension;
-    }
-    
-    public int getCursorMemoryHighWaterMark() {
-        return this.cursorMemoryHighWaterMark;
-    }
-
-    public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) {
-        this.cursorMemoryHighWaterMark = cursorMemoryHighWaterMark;
-	}
-
-    public void setStoreUsageHighWaterMark(int storeUsageHighWaterMark) {
-        this.storeUsageHighWaterMark = storeUsageHighWaterMark;   
-    }
-
-    public int getStoreUsageHighWaterMark() {
-        return storeUsageHighWaterMark;
-    }
-
-    public void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy) {
-        this.slowConsumerStrategy = slowConsumerStrategy;
-    }
-    
-    public SlowConsumerStrategy getSlowConsumerStrategy() {
-        return this.slowConsumerStrategy;
-    }
-    
-    
-    public boolean isPrioritizedMessages() {
-        return this.prioritizedMessages;
-    }
-
-    public void setPrioritizedMessages(boolean prioritizedMessages) {
-        this.prioritizedMessages = prioritizedMessages;
-    }
-
-    public void setAllConsumersExclusiveByDefault(boolean allConsumersExclusiveByDefault) {
-        this.allConsumersExclusiveByDefault = allConsumersExclusiveByDefault;
-    }
-
-    public boolean isAllConsumersExclusiveByDefault() {
-        return allConsumersExclusiveByDefault;
-    }
-
-    public boolean isGcInactiveDestinations() {
-        return this.gcInactiveDestinations;
-    }
-
-    public void setGcInactiveDestinations(boolean gcInactiveDestinations) {
-        this.gcInactiveDestinations = gcInactiveDestinations;
-    }
-
-    public long getInactiveTimoutBeforeGC() {
-        return this.inactiveTimoutBeforeGC;
-    }
-
-    public void setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC) {
-        this.inactiveTimoutBeforeGC = inactiveTimoutBeforeGC;
-    }
-    
-    public boolean isReduceMemoryFootprint() {
-        return reduceMemoryFootprint;
-    }
-
-    public void setReduceMemoryFootprint(boolean reduceMemoryFootprint) {
-        this.reduceMemoryFootprint = reduceMemoryFootprint;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java
deleted file mode 100644
index 8fb7264..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.List;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.filter.DestinationMap;
-
-/**
- * Represents a destination based configuration of policies so that individual
- * destinations or wildcard hierarchies of destinations can be configured using
- * different policies.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class PolicyMap extends DestinationMap {
-
-    private PolicyEntry defaultEntry;
-
-    public PolicyEntry getEntryFor(ActiveMQDestination destination) {
-        PolicyEntry answer = (PolicyEntry) chooseValue(destination);
-        if (answer == null) {
-            answer = getDefaultEntry();
-        }
-        return answer;
-    }
-
-    /**
-     * Sets the individual entries on the policy map
-     * 
-     * @org.apache.xbean.ElementType class="org.apache.activemq.broker.region.policy.PolicyEntry"
-     */
-    public void setPolicyEntries(List entries) {
-        super.setEntries(entries);
-    }
-
-    public PolicyEntry getDefaultEntry() {
-        return defaultEntry;
-    }
-
-    public void setDefaultEntry(PolicyEntry defaultEntry) {
-        this.defaultEntry = defaultEntry;
-    }
-
-    protected Class getEntryClass() {
-        return PolicyEntry.class;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PrefetchRatePendingMessageLimitStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PrefetchRatePendingMessageLimitStrategy.java
deleted file mode 100644
index 22e3295..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PrefetchRatePendingMessageLimitStrategy.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.TopicSubscription;
-
-/**
- * This PendingMessageLimitStrategy sets the maximum pending message limit value to be
- * a multiplier of the prefetch limit of the subscription.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class PrefetchRatePendingMessageLimitStrategy implements PendingMessageLimitStrategy {
-
-    private double multiplier = 0.5;
-
-    public int getMaximumPendingMessageLimit(TopicSubscription subscription) {
-        int prefetchSize = subscription.getConsumerInfo().getPrefetchSize();
-        return (int) (prefetchSize * multiplier);
-    }
-
-    public double getMultiplier() {
-        return multiplier;
-    }
-
-    /**
-     * Sets the multiplier of the prefetch size which will be used to define the maximum number of pending
-     * messages for non-durable topics before messages are discarded.
-     */
-    public void setMultiplier(double rate) {
-        this.multiplier = rate;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java
deleted file mode 100644
index 79b6195..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PriorityNetworkDispatchPolicy.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * dispatch policy that ignores lower priority duplicate network consumers,
- * used in conjunction with network bridge suppresDuplicateTopicSubscriptions
- * 
- * @org.apache.xbean.XBean
- */
-public class PriorityNetworkDispatchPolicy extends SimpleDispatchPolicy {
-
-    private static final Logger LOG = LoggerFactory.getLogger(PriorityNetworkDispatchPolicy.class);
-    @Override
-    public boolean dispatch(MessageReference node,
-            MessageEvaluationContext msgContext,
-            List<Subscription> consumers) throws Exception {
-        
-        List<Subscription> duplicateFreeSubs = new ArrayList<Subscription>();
-        synchronized (consumers) {
-            for (Subscription sub: consumers) {
-                ConsumerInfo info = sub.getConsumerInfo();
-                if (info.isNetworkSubscription()) {    
-                    boolean highestPrioritySub = true;
-                    for (Iterator<Subscription> it =  duplicateFreeSubs.iterator(); it.hasNext(); ) {
-                        Subscription candidate = it.next();
-                        if (matches(candidate, info)) {
-                            if (hasLowerPriority(candidate, info)) {
-                                it.remove();
-                            } else {
-                                // higher priority matching sub exists
-                                highestPrioritySub = false;
-                                if (LOG.isDebugEnabled()) {
-                                LOG.debug("ignoring lower priority: " + candidate 
-                                        + "[" +candidate.getConsumerInfo().getNetworkConsumerIds() +", "
-                                        + candidate.getConsumerInfo().getNetworkConsumerIds() +"] in favour of: " 
-                                        + sub
-                                        + "[" +sub.getConsumerInfo().getNetworkConsumerIds() +", "
-                                        + sub.getConsumerInfo().getNetworkConsumerIds() +"]");
-                                }
-                            }
-                        }
-                    }
-                    if (highestPrioritySub) {
-                        duplicateFreeSubs.add(sub);
-                    } 
-                } else {
-                    duplicateFreeSubs.add(sub);
-                }
-            }
-        }
-        
-        return super.dispatch(node, msgContext, duplicateFreeSubs);
-    }
-
-    private boolean hasLowerPriority(Subscription candidate,
-            ConsumerInfo info) {
-       return candidate.getConsumerInfo().getPriority() < info.getPriority();
-    }
-
-    private boolean matches(Subscription candidate, ConsumerInfo info) {
-        boolean matched = false;
-        for (ConsumerId candidateId: candidate.getConsumerInfo().getNetworkConsumerIds()) {
-            for (ConsumerId subId: info.getNetworkConsumerIds()) {
-                if (candidateId.equals(subId)) {
-                    matched = true;
-                    break;
-                }
-            }
-        }
-        return matched;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
deleted file mode 100644
index 3a0e27c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.concurrent.atomic.AtomicLong;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import org.apache.activemq.ActiveMQMessageTransformation;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.SubscriptionRecovery;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.util.IdGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This implementation of {@link SubscriptionRecoveryPolicy} will perform a user
- * specific query mechanism to load any messages they may have missed.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class QueryBasedSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
-
-    private static final Logger LOG = LoggerFactory.getLogger(QueryBasedSubscriptionRecoveryPolicy.class);
-
-    private MessageQuery query;
-    private final AtomicLong messageSequence = new AtomicLong(0);
-    private final IdGenerator idGenerator = new IdGenerator();
-    private final ProducerId producerId = createProducerId();
-
-    public SubscriptionRecoveryPolicy copy() {
-        QueryBasedSubscriptionRecoveryPolicy rc = new QueryBasedSubscriptionRecoveryPolicy();
-        rc.setQuery(query);
-        return rc;
-    }
-
-    public boolean add(ConnectionContext context, MessageReference message) throws Exception {
-        return query.validateUpdate(message.getMessage());
-    }
-
-    public void recover(final ConnectionContext context, final Topic topic, final SubscriptionRecovery sub) throws Exception {
-        if (query != null) {
-            ActiveMQDestination destination = sub.getActiveMQDestination();
-            query.execute(destination, new MessageListener() {
-
-                public void onMessage(Message message) {
-                    dispatchInitialMessage(message, topic, context, sub);
-                }
-            });
-        }
-    }
-
-    public void start() throws Exception {
-        if (query == null) {
-            throw new IllegalArgumentException("No query property configured");
-        }
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public MessageQuery getQuery() {
-        return query;
-    }
-
-    /**
-     * Sets the query strategy to load initial messages
-     */
-    public void setQuery(MessageQuery query) {
-        this.query = query;
-    }
-
-    public org.apache.activemq.command.Message[] browse(ActiveMQDestination dest) throws Exception {
-        return new org.apache.activemq.command.Message[0];
-    }
-    
-    public void setBroker(Broker broker) {        
-    }
-
-    protected void dispatchInitialMessage(Message message, Destination regionDestination, ConnectionContext context, SubscriptionRecovery sub) {
-        try {
-            ActiveMQMessage activeMessage = ActiveMQMessageTransformation.transformMessage(message, null);
-            ActiveMQDestination destination = activeMessage.getDestination();
-            if (destination == null) {
-                destination = sub.getActiveMQDestination();
-                activeMessage.setDestination(destination);
-            }
-            activeMessage.setRegionDestination(regionDestination);
-            configure(activeMessage);
-            sub.addRecoveredMessage(context, activeMessage);
-        } catch (Throwable e) {
-            LOG.warn("Failed to dispatch initial message: " + message + " into subscription. Reason: " + e, e);
-        }
-    }
-
-    protected void configure(ActiveMQMessage msg) throws JMSException {
-        long sequenceNumber = messageSequence.incrementAndGet();
-        msg.setMessageId(new MessageId(producerId, sequenceNumber));
-        msg.onSend();
-        msg.setProducerId(producerId);
-    }
-
-    protected ProducerId createProducerId() {
-        String id = idGenerator.generateId();
-        ConnectionId connectionId = new ConnectionId(id);
-        SessionId sessionId = new SessionId(connectionId, 1);
-        return new ProducerId(sessionId, 1);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
deleted file mode 100755
index efdc827..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/RoundRobinDispatchPolicy.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.Iterator;
-import java.util.List;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Simple dispatch policy that sends a message to every subscription that
- * matches the message.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class RoundRobinDispatchPolicy implements DispatchPolicy {
-    static final Logger LOG = LoggerFactory.getLogger(RoundRobinDispatchPolicy.class);
-
-    /**
-     * @param node
-     * @param msgContext
-     * @param consumers
-     * @return true if dispatched
-     * @throws Exception
-     * @see org.apache.activemq.broker.region.policy.DispatchPolicy#dispatch(org.apache.activemq.broker.region.MessageReference,
-     *      org.apache.activemq.filter.MessageEvaluationContext, java.util.List)
-     */
-    public boolean dispatch(MessageReference node,
-            MessageEvaluationContext msgContext, List<Subscription> consumers)
-            throws Exception {
-        int count = 0;
-
-        Subscription firstMatchingConsumer = null;
-        synchronized (consumers) {
-            for (Iterator<Subscription> iter = consumers.iterator(); iter
-                    .hasNext();) {
-                Subscription sub = iter.next();
-
-                // Only dispatch to interested subscriptions
-                if (!sub.matches(node, msgContext)) {
-                    sub.unmatched(node);
-                    continue;
-                }
-
-                if (firstMatchingConsumer == null) {
-                    firstMatchingConsumer = sub;
-                }
-
-                sub.add(node);
-                count++;
-            }
-
-            if (firstMatchingConsumer != null) {
-                // Rotate the consumer list.
-                try {
-                    consumers.remove(firstMatchingConsumer);
-                    consumers.add(firstMatchingConsumer);
-                } catch (Throwable bestEffort) {
-                }
-            }
-        }
-        return count > 0;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SharedDeadLetterStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SharedDeadLetterStrategy.java
deleted file mode 100644
index 41f1f10..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SharedDeadLetterStrategy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.Message;
-
-/**
- * A default implementation of {@link DeadLetterStrategy} which uses
- * a constant destination.
- * 
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class SharedDeadLetterStrategy extends AbstractDeadLetterStrategy {
-
-    public static final String DEFAULT_DEAD_LETTER_QUEUE_NAME = "ActiveMQ.DLQ";
-
-    private ActiveMQDestination deadLetterQueue = new ActiveMQQueue(DEFAULT_DEAD_LETTER_QUEUE_NAME);
-
-    public ActiveMQDestination getDeadLetterQueueFor(Message message, Subscription subscription) {
-        return deadLetterQueue;
-    }
-
-    public ActiveMQDestination getDeadLetterQueue() {
-        return deadLetterQueue;
-    }
-
-    public void setDeadLetterQueue(ActiveMQDestination deadLetterQueue) {
-        this.deadLetterQueue = deadLetterQueue;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SimpleDispatchPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SimpleDispatchPolicy.java
deleted file mode 100755
index 7d8e2f0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SimpleDispatchPolicy.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.List;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.filter.MessageEvaluationContext;
-
-/**
- * Simple dispatch policy that sends a message to every subscription that
- * matches the message.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class SimpleDispatchPolicy implements DispatchPolicy {
-
-    public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List<Subscription> consumers)
-            throws Exception {
-
-        int count = 0;
-        for (Subscription sub : consumers) {
-            // Don't deliver to browsers
-            if (sub.getConsumerInfo().isBrowser()) {
-                continue;
-            }
-            // Only dispatch to interested subscriptions
-            if (!sub.matches(node, msgContext)) {
-                sub.unmatched(node);
-                continue;
-            }
-
-            sub.add(node);
-            count++;
-        }
-
-        return count > 0;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SimpleDispatchSelector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SimpleDispatchSelector.java
deleted file mode 100644
index 4a488c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SimpleDispatchSelector.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-
-/**
- * Simple dispatch policy that determines if a message can be sent to a subscription
- *
- * @org.apache.xbean.XBean
- * 
- */
-public class SimpleDispatchSelector implements DispatchSelector {
-
-    private final ActiveMQDestination destination;
-
-    /**
-     * @param destination
-     */
-    public SimpleDispatchSelector(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    public boolean canDispatch(Subscription subscription, MessageReference node) throws Exception {
-        MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext();
-        msgContext.setDestination(this.destination);
-        msgContext.setMessageReference(node);
-        return subscription.matches(node, msgContext);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SlowConsumerEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SlowConsumerEntry.java
deleted file mode 100644
index 9d25509..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SlowConsumerEntry.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.ConnectionContext;
-
-public class SlowConsumerEntry {
-
-    final ConnectionContext context;
-    Object subscription;
-    int slowCount = 1;
-    int markCount = 0;
-
-    SlowConsumerEntry(ConnectionContext context) {
-        this.context = context;
-    }
-
-    public void slow() {
-        slowCount++;
-    }
-
-    public void mark() {
-        markCount++;
-    }
-
-    public void setSubscription(Object subscriptionObjectName) {
-        this.subscription = subscriptionObjectName;
-    }
-    
-    public Object getSubscription() {
-        return subscription;
-    }
-
-    public int getSlowCount() {
-        return slowCount;
-    }
-
-    public int getMarkCount() {
-        return markCount;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SlowConsumerStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SlowConsumerStrategy.java
deleted file mode 100644
index d74fe91..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SlowConsumerStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Subscription;
-
-/*
- * a strategy for dealing with slow consumers
- */
-public interface SlowConsumerStrategy {
-
-    void slowConsumer(ConnectionContext context, Subscription subs);
-    void setBrokerService(Broker broker);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StorePendingDurableSubscriberMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StorePendingDurableSubscriberMessageStoragePolicy.java
deleted file mode 100755
index 07db3c9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StorePendingDurableSubscriberMessageStoragePolicy.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor;
-import org.apache.activemq.kaha.Store;
-
-/**
- * Creates a PendingMessageCursor that access the persistent store to retrieve
- * messages
- * 
- * @org.apache.xbean.XBean element="storeDurableSubscriberCursor"
- *                         description="Pending messages for a durable
- *                         subscriber are referenced from the Store"
- * 
- */
-public class StorePendingDurableSubscriberMessageStoragePolicy implements PendingDurableSubscriberMessageStoragePolicy {
-    boolean immediatePriorityDispatch = true;
-
-    public boolean isImmediatePriorityDispatch() {
-        return immediatePriorityDispatch;
-    }
-
-    /**
-     * Ensure that new higher priority messages will get an immediate dispatch
-     * rather than wait for the end of the current cursor batch.
-     *
-     * @param immediatePriorityDispatch
-     */
-    public void setImmediatePriorityDispatch(boolean immediatePriorityDispatch) {
-        this.immediatePriorityDispatch = immediatePriorityDispatch;
-    }
-
-    /**
-     * Retrieve the configured pending message storage cursor;
-     * @param broker 
-     * 
-     * @param clientId
-     * @param name
-     * @param maxBatchSize
-     * @param sub 
-     * @return the Pending Message cursor
-     */
-    public PendingMessageCursor getSubscriberPendingMessageCursor(Broker broker,String clientId, String name, int maxBatchSize, DurableTopicSubscription sub) {
-        StoreDurableSubscriberCursor cursor = new StoreDurableSubscriberCursor(broker,clientId, name, maxBatchSize, sub);
-        cursor.setImmediatePriorityDispatch(isImmediatePriorityDispatch());
-        return cursor;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StorePendingQueueMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StorePendingQueueMessageStoragePolicy.java
deleted file mode 100755
index 0570ae1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StorePendingQueueMessageStoragePolicy.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.StoreQueueCursor;
-
-/**
- * Creates a StoreQueueCursor *
- * 
- * @org.apache.xbean.XBean element="storeCursor" description="Pending messages
- *                         paged in from the Store"
- * 
- * 
- */
-public class StorePendingQueueMessageStoragePolicy implements PendingQueueMessageStoragePolicy {
-
-    /**
-     * @param broker 
-     * @param queue
-     * @return the cursor
-     * @see org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy#getQueuePendingMessageCursor(org.apache.openjpa.lib.util.concurrent.Queue,
-     *      org.apache.activemq.kaha.Store)
-     */
-    public PendingMessageCursor getQueuePendingMessageCursor(Broker broker,Queue queue) {
-        return new StoreQueueCursor(broker,queue);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StrictOrderDispatchPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StrictOrderDispatchPolicy.java
deleted file mode 100755
index f974ce1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/StrictOrderDispatchPolicy.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.Iterator;
-import java.util.List;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.filter.MessageEvaluationContext;
-
-/**
- * Dispatch policy that causes every subscription to see messages in the same
- * order.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class StrictOrderDispatchPolicy implements DispatchPolicy {
-
-    /**
-     * @param node
-     * @param msgContext
-     * @param consumers
-     * @return true if dispatched
-     * @throws Exception
-     * @see org.apache.activemq.broker.region.policy.DispatchPolicy#dispatch(org.apache.activemq.broker.region.MessageReference,
-     *      org.apache.activemq.filter.MessageEvaluationContext, java.util.List)
-     */
-    public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List consumers) throws Exception {
-        // Big synch here so that only 1 message gets dispatched at a time.
-        // Ensures
-        // Everyone sees the same order.
-        synchronized (consumers) {
-            int count = 0;
-            for (Iterator iter = consumers.iterator(); iter.hasNext();) {
-                Subscription sub = (Subscription)iter.next();
-
-                // Only dispatch to interested subscriptions
-                if (!sub.matches(node, msgContext)) {
-                    sub.unmatched(node);
-                    continue;
-                }
-
-                sub.add(node);
-                count++;
-            }
-            return count > 0;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java
deleted file mode 100644
index 08e0adc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.SubscriptionRecovery;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-
-/**
- * Abstraction to allow different recovery policies to be plugged
- * into the region implementations.  This is used by a topic to retroactively recover
- * messages that the subscription missed.
- * 
- * 
- */
-public interface SubscriptionRecoveryPolicy extends Service {
-    
-    /**
-     * A message was sent to the destination.
-     * 
-     * @param context
-     * @param message 
-     * @param node
-     * @return true if successful
-     * @throws Exception
-     */
-    boolean add(ConnectionContext context, MessageReference message) throws Exception;
-    
-    /**
-     * Let a subscription recover message held by the policy.
-     * 
-     * @param context
-     * @param topic
-     * @param sub 
-     * @param node
-     * @throws Exception
-     */
-    void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception;
-    
-    
-    /**
-     * @param dest 
-     * @return messages
-     * @throws Exception 
-     */
-    Message[] browse(ActiveMQDestination dest) throws Exception;
-
-    /**
-     * Used to copy the policy object.
-     * @return the copy
-     */
-    SubscriptionRecoveryPolicy copy();
-    
-    void setBroker(Broker broker);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/TimedSubscriptionRecoveryPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/TimedSubscriptionRecoveryPolicy.java
deleted file mode 100644
index 5985cc5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/TimedSubscriptionRecoveryPolicy.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.SubscriptionRecovery;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.DestinationFilter;
-import org.apache.activemq.thread.Scheduler;
-
-/**
- * This implementation of {@link SubscriptionRecoveryPolicy} will keep a timed
- * buffer of messages around in memory and use that to recover new
- * subscriptions.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class TimedSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
-
-    private static final int GC_INTERVAL = 1000;
-    private Scheduler scheduler;
-    
-    // TODO: need to get a better synchronized linked list that has little
-    // contention between enqueuing and dequeuing
-    private final List<TimestampWrapper> buffer = Collections.synchronizedList(new LinkedList<TimestampWrapper>());
-    private volatile long lastGCRun = System.currentTimeMillis();
-
-    private long recoverDuration = 60 * 1000; // Buffer for 1 min.
-
-    static class TimestampWrapper {
-        public MessageReference message;
-        public long timestamp;
-
-        public TimestampWrapper(MessageReference message, long timestamp) {
-            this.message = message;
-            this.timestamp = timestamp;
-        }
-    }
-
-    private final Runnable gcTask = new Runnable() {
-        public void run() {
-            gc();
-        }
-    };
-
-    public SubscriptionRecoveryPolicy copy() {
-        TimedSubscriptionRecoveryPolicy rc = new TimedSubscriptionRecoveryPolicy();
-        rc.setRecoverDuration(recoverDuration);
-        return rc;
-    }
-
-    public boolean add(ConnectionContext context, MessageReference message) throws Exception {
-        buffer.add(new TimestampWrapper(message, lastGCRun));
-        return true;
-    }
-
-    public void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception {
-        // Re-dispatch the messages from the buffer.
-        ArrayList<TimestampWrapper> copy = new ArrayList<TimestampWrapper>(buffer);
-        if (!copy.isEmpty()) {
-            for (Iterator<TimestampWrapper> iter = copy.iterator(); iter.hasNext();) {
-                TimestampWrapper timestampWrapper = iter.next();
-                MessageReference message = timestampWrapper.message;
-                sub.addRecoveredMessage(context, message);
-            }
-        }
-    }
-    
-    public void setBroker(Broker broker) {  
-        this.scheduler = broker.getScheduler();
-    }
-
-    public void start() throws Exception {
-        scheduler.executePeriodically(gcTask, GC_INTERVAL);
-    }
-
-    public void stop() throws Exception {
-        scheduler.cancel(gcTask);
-    }
-    
-
-    public void gc() {
-        lastGCRun = System.currentTimeMillis();
-        while (buffer.size() > 0) {
-            TimestampWrapper timestampWrapper = buffer.get(0);
-            if (lastGCRun > timestampWrapper.timestamp + recoverDuration) {
-                // GC it.
-                buffer.remove(0);
-            } else {
-                break;
-            }
-        }
-    }
-
-    public long getRecoverDuration() {
-        return recoverDuration;
-    }
-
-    public void setRecoverDuration(long recoverDuration) {
-        this.recoverDuration = recoverDuration;
-    }
-
-    public Message[] browse(ActiveMQDestination destination) throws Exception {
-        List<Message> result = new ArrayList<Message>();
-        ArrayList<TimestampWrapper> copy = new ArrayList<TimestampWrapper>(buffer);
-        DestinationFilter filter = DestinationFilter.parseFilter(destination);
-        for (Iterator<TimestampWrapper> iter = copy.iterator(); iter.hasNext();) {
-            TimestampWrapper timestampWrapper = iter.next();
-            MessageReference ref = timestampWrapper.message;
-            Message message = ref.getMessage();
-            if (filter.matches(message.getDestination())) {
-                result.add(message);
-            }
-        }
-        return result.toArray(new Message[result.size()]);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java
deleted file mode 100755
index cee1f3c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingDurableSubscriberMessageStoragePolicy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-
-/**
- * Creates a VMPendingMessageCursor *
- * 
- * @org.apache.xbean.XBean element="vmDurableCursor" description="Pending
- *                         messages held in the JVM"
- * 
- */
-public class VMPendingDurableSubscriberMessageStoragePolicy implements PendingDurableSubscriberMessageStoragePolicy {
-
-    /**
-     * Retrieve the configured pending message storage cursor;
-     * @param broker 
-     * @param clientId
-     * @param name
-     * @param maxBatchSize
-     * @param sub 
-     * @return the Pending Message cursor
-     */
-    public PendingMessageCursor getSubscriberPendingMessageCursor(Broker broker,String clientId, String name,int maxBatchSize, DurableTopicSubscription sub) {
-        return new VMPendingMessageCursor(AbstractPendingMessageCursor.isPrioritizedMessageSubscriber(broker, sub));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingQueueMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingQueueMessageStoragePolicy.java
deleted file mode 100755
index 9e2d661..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingQueueMessageStoragePolicy.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-
-/**
- * Creates a VMPendingMessageCursor *
- * 
- * @org.apache.xbean.XBean element="vmQueueCursor" description="Pending messages
- *                         held in the JVM"
- * 
- * 
- */
-public class VMPendingQueueMessageStoragePolicy implements PendingQueueMessageStoragePolicy {
-
-    /**
-     * @param broker 
-     * @param queue
-     * @return the cursor
-     */
-    public PendingMessageCursor getQueuePendingMessageCursor(Broker broker,Queue queue) {
-        return new VMPendingMessageCursor(queue.isPrioritizedMessages());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingSubscriberMessageStoragePolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingSubscriberMessageStoragePolicy.java
deleted file mode 100644
index 65d1813..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/VMPendingSubscriberMessageStoragePolicy.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.broker.region.policy;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.cursors.AbstractPendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-
-/**
- * Creates a VMPendingMessageCursor *
- * 
- * @org.apache.xbean.XBean element="vmCursor" description="Pending messages held
- *                         in the JVM"
- * 
- * 
- */
-public class VMPendingSubscriberMessageStoragePolicy implements PendingSubscriberMessageStoragePolicy {
-
-    /**
-     * @param broker
-     * @param name
-     * @param maxBatchSize
-     * @return a Cursor
-     * @see org.apache.activemq.broker.region.policy.PendingSubscriberMessageStoragePolicy#getSubscriberPendingMessageCursor(java.lang.String,
-     *      org.apache.activemq.kaha.Store, int)
-     */
-    public PendingMessageCursor getSubscriberPendingMessageCursor(Broker broker,String name,int maxBatchSize,Subscription subs) {
-        return new VMPendingMessageCursor(AbstractPendingMessageCursor.isPrioritizedMessageSubscriber(broker, subs));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/package.html
deleted file mode 100755
index c77c4ed..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-The policies which can be associated with a particular destination or wildcard.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestination.java
deleted file mode 100644
index e3416f3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestination.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import java.util.Collection;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * 
- * 
- */
-public abstract class CompositeDestination implements VirtualDestination {
-
-    private String name;
-    private Collection forwardTo;
-    private boolean forwardOnly = true;
-    private boolean copyMessage = true;
-
-    public Destination intercept(Destination destination) {
-        return new CompositeDestinationFilter(destination, getForwardTo(), isForwardOnly(), isCopyMessage());
-    }
-    
-    public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) {
-    }
-
-    public void remove(Destination destination) {        
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the name of this composite destination
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Collection getForwardTo() {
-        return forwardTo;
-    }
-
-    /**
-     * Sets the list of destinations to forward to
-     */
-    public void setForwardTo(Collection forwardDestinations) {
-        this.forwardTo = forwardDestinations;
-    }
-
-    public boolean isForwardOnly() {
-        return forwardOnly;
-    }
-
-    /**
-     * Sets if the virtual destination is forward only (and so there is no
-     * physical queue to match the virtual queue) or if there is also a physical
-     * queue with the same name).
-     */
-    public void setForwardOnly(boolean forwardOnly) {
-        this.forwardOnly = forwardOnly;
-    }
-
-    public boolean isCopyMessage() {
-        return copyMessage;
-    }
-
-    /**
-     * Sets whether a copy of the message will be sent to each destination.
-     * Defaults to true so that the forward destination is set as the
-     * destination of the message
-     */
-    public void setCopyMessage(boolean copyMessage) {
-        this.copyMessage = copyMessage;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestinationFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestinationFilter.java
deleted file mode 100644
index 2521ce1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestinationFilter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFilter;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-
-/**
- * Represents a composite {@link Destination} where send()s are replicated to
- * each Destination instance.
- * 
- * 
- */
-public class CompositeDestinationFilter extends DestinationFilter {
-
-    private Collection forwardDestinations;
-    private boolean forwardOnly;
-    private boolean copyMessage;
-
-    public CompositeDestinationFilter(Destination next, Collection forwardDestinations, boolean forwardOnly, boolean copyMessage) {
-        super(next);
-        this.forwardDestinations = forwardDestinations;
-        this.forwardOnly = forwardOnly;
-        this.copyMessage = copyMessage;
-    }
-
-    public void send(ProducerBrokerExchange context, Message message) throws Exception {
-        MessageEvaluationContext messageContext = null;
-
-        for (Iterator iter = forwardDestinations.iterator(); iter.hasNext();) {
-            ActiveMQDestination destination = null;
-            Object value = iter.next();
-
-            if (value instanceof FilteredDestination) {
-                FilteredDestination filteredDestination = (FilteredDestination)value;
-                if (messageContext == null) {
-                    messageContext = new NonCachedMessageEvaluationContext();
-                    messageContext.setMessageReference(message);
-                }
-                messageContext.setDestination(filteredDestination.getDestination());
-                if (filteredDestination.matches(messageContext)) {
-                    destination = filteredDestination.getDestination();
-                }
-            } else if (value instanceof ActiveMQDestination) {
-                destination = (ActiveMQDestination)value;
-            }
-            if (destination == null) {
-                continue;
-            }
-
-            Message forwarded_message;
-            if (copyMessage) {
-                forwarded_message = message.copy();
-                forwarded_message.setDestination(destination);
-            }
-            else {
-                forwarded_message = message;
-            }
-
-            send(context, forwarded_message, destination);
-        }
-        if (!forwardOnly) {
-            super.send(context, message);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeQueue.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeQueue.java
deleted file mode 100644
index a425efd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeQueue.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * Represents a virtual queue which forwards to a number of other destinations.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class CompositeQueue extends CompositeDestination {
-
-    public ActiveMQDestination getVirtualDestination() {
-        return new ActiveMQQueue(getName());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeTopic.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeTopic.java
deleted file mode 100644
index c3087a8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeTopic.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * Represents a virtual topic which forwards to a number of other destinations.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class CompositeTopic extends CompositeDestination {
-
-    public ActiveMQDestination getVirtualDestination() {
-        return new ActiveMQTopic(getName());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/FilteredDestination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/FilteredDestination.java
deleted file mode 100644
index dc81a0e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/FilteredDestination.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.selector.SelectorParser;
-
-/**
- * Represents a destination which is filtered using some predicate such as a selector
- * so that messages are only dispatched to the destination if they match the filter.
- *
- * @org.apache.xbean.XBean
- *
- * 
- */
-public class FilteredDestination {
-    
-    private ActiveMQDestination destination;
-    private String selector;
-    private BooleanExpression filter;
-
-    public boolean matches(MessageEvaluationContext context) throws JMSException {
-        BooleanExpression booleanExpression = getFilter();
-        if (booleanExpression == null) {
-            return false;
-        }
-        return booleanExpression.matches(context);
-    }
-
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    /**
-     * The destination to send messages to if they match the filter
-     */
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    public String getSelector() {
-        return selector;
-    }
-
-    /**
-     * Sets the JMS selector used to filter messages before forwarding them to this destination
-     */
-    public void setSelector(String selector) throws InvalidSelectorException {
-        this.selector = selector;
-        setFilter(SelectorParser.parse(selector));
-    }
-
-    public BooleanExpression getFilter() {
-        return filter;
-    }
-
-    public void setFilter(BooleanExpression filter) {
-        this.filter = filter;
-    }
-
-
-    /**
-     * Sets the destination property to the given queue name
-     */
-    public void setQueue(String queue) {
-        setDestination(ActiveMQDestination.createDestination(queue, ActiveMQDestination.QUEUE_TYPE));
-    }
-
-    /**
-     * Sets the destination property to the given topic name
-     */
-    public void setTopic(String topic) {
-        setDestination(ActiveMQDestination.createDestination(topic, ActiveMQDestination.TOPIC_TYPE));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java
deleted file mode 100644
index ea5af02..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/MirroredQueue.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import org.apache.activemq.broker.*;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFilter;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Creates <a href="http://activemq.org/site/mirrored-queues.html">Mirrored
- * Queue</a> using a prefix and postfix to define the topic name on which to mirror the queue to.
- *
- * 
- * @org.apache.xbean.XBean
- */
-public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware {
-    private static final transient Logger LOG = LoggerFactory.getLogger(MirroredQueue.class);
-    private String prefix = "VirtualTopic.Mirror.";
-    private String postfix = "";
-    private boolean copyMessage = true;
-    private BrokerService brokerService;
-
-    public Destination intercept(final Destination destination) {
-        if (destination.getActiveMQDestination().isQueue()) {
-            if (!destination.getActiveMQDestination().isTemporary() || brokerService.isUseTempMirroredQueues()) {
-                try {
-                    final Destination mirrorDestination = getMirrorDestination(destination);
-                    if (mirrorDestination != null) {
-                        return new DestinationFilter(destination) {
-                            public void send(ProducerBrokerExchange context, Message message) throws Exception {
-                                message.setDestination(mirrorDestination.getActiveMQDestination());
-                                mirrorDestination.send(context, message);
-    
-                                if (isCopyMessage()) {
-                                    message = message.copy();
-                                }
-                                message.setDestination(destination.getActiveMQDestination());
-                                super.send(context, message);
-                            }
-                        };
-                    }
-                }
-                catch (Exception e) {
-                    LOG.error("Failed to lookup the mirror destination for: " + destination + ". Reason: " + e, e);
-                }
-            }
-        }
-        return destination;
-    }
-    
-
-    public void remove(Destination destination) {
-        if (brokerService == null) {
-            throw new IllegalArgumentException("No brokerService injected!");
-        }
-        ActiveMQDestination topic = getMirrorTopic(destination.getActiveMQDestination());
-        if (topic != null) {
-            try {
-                brokerService.removeDestination(topic);
-            } catch (Exception e) {
-                LOG.error("Failed to remove mirror destination for " + destination + ". Reason: " + e,e);
-            }
-        }
-        
-    }
-
-    public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) {}
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public String getPostfix() {
-        return postfix;
-    }
-
-    /**
-     * Sets any postix used to identify the queue consumers
-     */
-    public void setPostfix(String postfix) {
-        this.postfix = postfix;
-    }
-
-    public String getPrefix() {
-        return prefix;
-    }
-
-    /**
-     * Sets the prefix wildcard used to identify the queue consumers for a given
-     * topic
-     */
-    public void setPrefix(String prefix) {
-        this.prefix = prefix;
-    }
-
-    public boolean isCopyMessage() {
-        return copyMessage;
-    }
-
-    /**
-     * Sets whether a copy of the message will be sent to each destination.
-     * Defaults to true so that the forward destination is set as the
-     * destination of the message
-     */
-    public void setCopyMessage(boolean copyMessage) {
-        this.copyMessage = copyMessage;
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerService = brokerService;
-    }
-
-    // Implementation methods
-    //-------------------------------------------------------------------------
-    protected Destination getMirrorDestination(Destination destination) throws Exception {
-        if (brokerService == null) {
-            throw new IllegalArgumentException("No brokerService injected!");
-        }
-        ActiveMQDestination topic = getMirrorTopic(destination.getActiveMQDestination());
-        return brokerService.getDestination(topic);
-    }
-
-    protected ActiveMQDestination getMirrorTopic(ActiveMQDestination original) {
-        return new ActiveMQTopic(prefix + original.getPhysicalName() + postfix);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/SelectorAwareVirtualTopicInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/SelectorAwareVirtualTopicInterceptor.java
deleted file mode 100644
index d7bdef7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/SelectorAwareVirtualTopicInterceptor.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-
-public class SelectorAwareVirtualTopicInterceptor extends VirtualTopicInterceptor {
-
-    public SelectorAwareVirtualTopicInterceptor(Destination next, String prefix, String postfix) {
-        super(next, prefix, postfix);
-    }
-
-    /**
-     * Respect the selectors of the subscriptions to ensure only matched messages are dispatched to
-     * the virtual queues, hence there is no build up of unmatched messages on these destinations
-     */
-    @Override
-    protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception {
-        Broker broker = context.getConnectionContext().getBroker();
-        Set<Destination> destinations = broker.getDestinations(destination);
-
-        for (Destination dest : destinations) {
-            if (matchesSomeConsumer(message, dest)) {
-                dest.send(context, message.copy());
-            }
-        }
-    }
-    
-    private boolean matchesSomeConsumer(Message message, Destination dest) throws IOException {
-        boolean matches = false;
-        MessageEvaluationContext msgContext = new NonCachedMessageEvaluationContext();
-        msgContext.setDestination(dest.getActiveMQDestination());
-        msgContext.setMessageReference(message);
-        List<Subscription> subs = dest.getConsumers();
-        for (Subscription sub: subs) {
-            if (sub.matches(message, msgContext)) {
-                matches = true;
-                break;
-            }
-        }
-        return matches;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java
deleted file mode 100644
index 21a383d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestination.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * Represents some kind of virtual destination.
- * 
- * 
- */
-public interface VirtualDestination extends DestinationInterceptor {
-
-    /**
-     * Returns the virtual destination
-     */
-    ActiveMQDestination getVirtualDestination();
-
-    /**
-     * Creates a virtual destination from the physical destination
-     */
-    Destination intercept(Destination destination);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
deleted file mode 100644
index 85e605a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFilter;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.DestinationMap;
-
-/**
- * Implements <a
- * href="http://activemq.apache.org/virtual-destinations.html">Virtual Topics</a>.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class VirtualDestinationInterceptor implements DestinationInterceptor {
-
-    private DestinationMap destinationMap = new DestinationMap();
-    private VirtualDestination[] virtualDestinations;
-
-    public synchronized Destination intercept(Destination destination) {
-        Set virtualDestinations = destinationMap.get(destination.getActiveMQDestination());
-        List<Destination> destinations = new ArrayList<Destination>();
-        for (Iterator iter = virtualDestinations.iterator(); iter.hasNext();) {
-            VirtualDestination virtualDestination = (VirtualDestination)iter.next();
-            Destination newDestination = virtualDestination.intercept(destination);
-            destinations.add(newDestination);
-        }
-        if (!destinations.isEmpty()) {
-            if (destinations.size() == 1) {
-                return destinations.get(0);
-            } else {
-                // should rarely be used but here just in case
-                return createCompositeDestination(destination, destinations);
-            }
-        }
-        return destination;
-    }
-    
-
-    public synchronized void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception {
-        for (VirtualDestination virt: virtualDestinations) {
-            virt.create(broker, context, destination);
-        }
-    }
-
-    public synchronized void remove(Destination destination) {     
-    }
-
-    public VirtualDestination[] getVirtualDestinations() {
-        return virtualDestinations;
-    }
-
-    public void setVirtualDestinations(VirtualDestination[] virtualDestinations) {
-        destinationMap = new DestinationMap();
-        this.virtualDestinations = virtualDestinations;
-        for (int i = 0; i < virtualDestinations.length; i++) {
-            VirtualDestination virtualDestination = virtualDestinations[i];
-            destinationMap.put(virtualDestination.getVirtualDestination(), virtualDestination);
-        }
-    }
-
-    protected Destination createCompositeDestination(Destination destination, final List<Destination> destinations) {
-        return new DestinationFilter(destination) {
-            public void send(ProducerBrokerExchange context, Message messageSend) throws Exception {
-                for (Iterator<Destination> iter = destinations.iterator(); iter.hasNext();) {
-                    Destination destination = iter.next();
-                    destination.send(context, messageSend);
-                }
-            }
-        };
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualTopic.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualTopic.java
deleted file mode 100644
index 3721459..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualTopic.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.filter.DestinationFilter;
-
-/**
- * Creates <a href="http://activemq.org/site/virtual-destinations.html">Virtual
- * Topics</a> using a prefix and postfix. The virtual destination creates a
- * wildcard that is then used to look up all active queue subscriptions which
- * match.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class VirtualTopic implements VirtualDestination {
-
-    private String prefix = "Consumer.*.";
-    private String postfix = "";
-    private String name = ">";
-    private boolean selectorAware = false;
-
-
-    public ActiveMQDestination getVirtualDestination() {
-        return new ActiveMQTopic(getName());
-    }
-
-    public Destination intercept(Destination destination) {
-        return selectorAware ? new SelectorAwareVirtualTopicInterceptor(destination, getPrefix(), getPostfix()) : 
-            new VirtualTopicInterceptor(destination, getPrefix(), getPostfix());
-    }
-    
-
-    public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception {
-        if (destination.isQueue() && destination.isPattern() && broker.getDestinations(destination).isEmpty()) {
-            DestinationFilter filter = DestinationFilter.parseFilter(new ActiveMQQueue(prefix + DestinationFilter.ANY_DESCENDENT));
-            if (filter.matches(destination)) {
-                broker.addDestination(context, destination, false);
-            }
-        }
-    }
-
-    public void remove(Destination destination) {        
-    }
-    
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public String getPostfix() {
-        return postfix;
-    }
-
-    /**
-     * Sets any postix used to identify the queue consumers
-     */
-    public void setPostfix(String postfix) {
-        this.postfix = postfix;
-    }
-
-    public String getPrefix() {
-        return prefix;
-    }
-
-    /**
-     * Sets the prefix wildcard used to identify the queue consumers for a given
-     * topic
-     */
-    public void setPrefix(String prefix) {
-        this.prefix = prefix;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-    
-    /**
-     * Indicates whether the selectors of consumers are used to determine dispatch
-     * to a virtual destination, when true only messages matching an existing 
-     * consumer will be dispatched.
-     * @param selectorAware when true take consumer selectors into consideration
-     */
-    public void setSelectorAware(boolean selectorAware) {
-        this.selectorAware = selectorAware;
-    }
-    
-    public boolean isSelectorAware() {
-        return selectorAware;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualTopicInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualTopicInterceptor.java
deleted file mode 100644
index eefedd9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualTopicInterceptor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.broker.region.virtual;
-
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationFilter;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.Message;
-
-/**
- * A Destination which implements <a
- * href="http://activemq.org/site/virtual-destinations.html">Virtual Topic</a>
- * 
- * 
- */
-public class VirtualTopicInterceptor extends DestinationFilter {
-
-    private String prefix;
-    private String postfix;
-
-    public VirtualTopicInterceptor(Destination next, String prefix, String postfix) {
-        super(next);
-        this.prefix = prefix;
-        this.postfix = postfix;
-    }
-
-    public void send(ProducerBrokerExchange context, Message message) throws Exception {
-        if (!message.isAdvisory()) {
-            ActiveMQDestination queueConsumers = getQueueConsumersWildcard(message.getDestination());
-            send(context, message, queueConsumers);
-        }
-        super.send(context, message);
-    }
-
-    protected ActiveMQDestination getQueueConsumersWildcard(ActiveMQDestination original) {
-        return new ActiveMQQueue(prefix + original.getPhysicalName() + postfix);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/package.html
deleted file mode 100755
index 6a66e9f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Implementation classes for <a href="http://activemq.org/site/virtual-destinations.html">Virtual Destinations</a>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java
deleted file mode 100644
index 3326a5c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/CronParser.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.List;
-import java.util.StringTokenizer;
-import javax.jms.MessageFormatException;
-
-public class CronParser {
-
-    private static final int NUMBER_TOKENS = 5;
-    private static final int MINUTES = 0;
-    private static final int HOURS = 1;
-    private static final int DAY_OF_MONTH = 2;
-    private static final int MONTH = 3;
-    private static final int DAY_OF_WEEK = 4;
-
-    public static long getNextScheduledTime(final String cronEntry, long currentTime) throws MessageFormatException {
-
-        long result = 0;
-
-        if (cronEntry == null || cronEntry.length() == 0) {
-            return result;
-        }
-
-        // Handle the once per minute case "* * * * *"
-        // starting the next event at the top of the minute.
-        if (cronEntry.startsWith("* * * * *")) {
-            result = currentTime + 60 * 1000;
-            result = result / 1000 * 1000;
-            return result;
-        }
-
-        List<String> list = tokenize(cronEntry);
-        List<CronEntry> entries = buildCronEntries(list);
-        Calendar working = Calendar.getInstance();
-        working.setTimeInMillis(currentTime);
-        working.set(Calendar.SECOND, 0);
-
-        CronEntry minutes = entries.get(MINUTES);
-        CronEntry hours = entries.get(HOURS);
-        CronEntry dayOfMonth = entries.get(DAY_OF_MONTH);
-        CronEntry month = entries.get(MONTH);
-        CronEntry dayOfWeek = entries.get(DAY_OF_WEEK);
-
-        // Start at the top of the next minute, cron is only guaranteed to be
-        // run on the minute.
-        int timeToNextMinute = 60 - working.get(Calendar.SECOND);
-        working.add(Calendar.SECOND, timeToNextMinute);
-
-        // If its already to late in the day this will roll us over to tomorrow
-        // so we'll need to check again when done updating month and day.
-        int currentMinutes = working.get(Calendar.MINUTE);
-        if (!isCurrent(minutes, currentMinutes)) {
-            int nextMinutes = getNext(minutes, currentMinutes);
-            working.add(Calendar.MINUTE, nextMinutes);
-        }
-
-        int currentHours = working.get(Calendar.HOUR_OF_DAY);
-        if (!isCurrent(hours, currentHours)) {
-            int nextHour = getNext(hours, currentHours);
-            working.add(Calendar.HOUR_OF_DAY, nextHour);
-        }
-
-        // We can roll into the next month here which might violate the cron setting
-        // rules so we check once then recheck again after applying the month settings.
-        doUpdateCurrentDay(working, dayOfMonth, dayOfWeek);
-
-        // Start by checking if we are in the right month, if not then calculations
-        // need to start from the beginning of the month to ensure that we don't end
-        // up on the wrong day.  (Can happen when DAY_OF_WEEK is set and current time
-        // is ahead of the day of the week to execute on).
-        doUpdateCurrentMonth(working, month);
-
-        // Now Check day of week and day of month together since they can be specified
-        // together in one entry, if both "day of month" and "day of week" are restricted
-        // (not "*"), then either the "day of month" field (3) or the "day of week" field
-        // (5) must match the current day or the Calenday must be advanced.
-        doUpdateCurrentDay(working, dayOfMonth, dayOfWeek);
-
-        // Now we can chose the correct hour and minute of the day in question.
-
-        currentHours = working.get(Calendar.HOUR_OF_DAY);
-        if (!isCurrent(hours, currentHours)) {
-            int nextHour = getNext(hours, currentHours);
-            working.add(Calendar.HOUR_OF_DAY, nextHour);
-        }
-
-        currentMinutes = working.get(Calendar.MINUTE);
-        if (!isCurrent(minutes, currentMinutes)) {
-            int nextMinutes = getNext(minutes, currentMinutes);
-            working.add(Calendar.MINUTE, nextMinutes);
-        }
-
-        result = working.getTimeInMillis();
-
-        if (result <= currentTime) {
-            throw new ArithmeticException("Unable to compute next scheduled exection time.");
-        }
-
-        return result;
-    }
-
-    protected static long doUpdateCurrentMonth(Calendar working, CronEntry month) throws MessageFormatException {
-
-        int currentMonth = working.get(Calendar.MONTH) + 1;
-        if (!isCurrent(month, currentMonth)) {
-            int nextMonth = getNext(month, currentMonth);
-            working.add(Calendar.MONTH, nextMonth);
-
-            // Reset to start of month.
-            resetToStartOfDay(working, 1);
-
-            return working.getTimeInMillis();
-        }
-
-        return 0L;
-    }
-
-    protected static long doUpdateCurrentDay(Calendar working, CronEntry dayOfMonth, CronEntry dayOfWeek) throws MessageFormatException {
-
-        int currentDayOfWeek = working.get(Calendar.DAY_OF_WEEK) - 1;
-        int currentDayOfMonth = working.get(Calendar.DAY_OF_MONTH);
-
-        // Simplest case, both are unrestricted or both match today otherwise
-        // result must be the closer of the two if both are set, or the next
-        // match to the one that is.
-        if (!isCurrent(dayOfWeek, currentDayOfWeek) ||
-            !isCurrent(dayOfMonth, currentDayOfMonth) ) {
-
-            int nextWeekDay = Integer.MAX_VALUE;
-            int nextCalendarDay = Integer.MAX_VALUE;
-
-            if (!isCurrent(dayOfWeek, currentDayOfWeek)) {
-                nextWeekDay = getNext(dayOfWeek, currentDayOfWeek);
-            }
-
-            if (!isCurrent(dayOfMonth, currentDayOfMonth)) {
-                nextCalendarDay = getNext(dayOfMonth, currentDayOfMonth);
-            }
-
-            if( nextWeekDay < nextCalendarDay ) {
-                working.add(Calendar.DAY_OF_WEEK, nextWeekDay);
-            } else {
-                working.add(Calendar.DAY_OF_MONTH, nextCalendarDay);
-            }
-
-            // Since the day changed, we restart the clock at the start of the day
-            // so that the next time will either be at 12am + value of hours and
-            // minutes pattern.
-            resetToStartOfDay(working, working.get(Calendar.DAY_OF_MONTH));
-
-            return working.getTimeInMillis();
-        }
-
-        return 0L;
-    }
-
-    public static void validate(final String cronEntry) throws MessageFormatException {
-        List<String> list = tokenize(cronEntry);
-        List<CronEntry> entries = buildCronEntries(list);
-        for (CronEntry e : entries) {
-            validate(e);
-        }
-    }
-
-    static void validate(final CronEntry entry) throws MessageFormatException {
-
-        List<Integer> list = entry.currentWhen;
-        if (list.isEmpty() || list.get(0).intValue() < entry.start || list.get(list.size() - 1).intValue() > entry.end) {
-            throw new MessageFormatException("Invalid token: " + entry);
-        }
-    }
-
-    static int getNext(final CronEntry entry, final int current) throws MessageFormatException {
-        int result = 0;
-
-        if (entry.currentWhen == null) {
-            entry.currentWhen = calculateValues(entry);
-        }
-
-        List<Integer> list = entry.currentWhen;
-        int next = -1;
-        for (Integer i : list) {
-            if (i.intValue() > current) {
-                next = i.intValue();
-                break;
-            }
-        }
-        if (next != -1) {
-            result = next - current;
-        } else {
-            int first = list.get(0).intValue();
-            result = entry.end + first - entry.start - current;
-
-            // Account for difference of one vs zero based indices.
-            if (entry.name.equals("DayOfWeek") || entry.name.equals("Month")) {
-                result++;
-            }
-        }
-
-        return result;
-    }
-
-    static boolean isCurrent(final CronEntry entry, final int current) throws MessageFormatException {
-        boolean result = entry.currentWhen.contains(new Integer(current));
-        return result;
-    }
-
-    protected static void resetToStartOfDay(Calendar target, int day) {
-        target.set(Calendar.DAY_OF_MONTH, day);
-        target.set(Calendar.HOUR_OF_DAY, 0);
-        target.set(Calendar.MINUTE, 0);
-        target.set(Calendar.SECOND, 0);
-    }
-
-    static List<String> tokenize(String cron) throws IllegalArgumentException {
-        StringTokenizer tokenize = new StringTokenizer(cron);
-        List<String> result = new ArrayList<String>();
-        while (tokenize.hasMoreTokens()) {
-            result.add(tokenize.nextToken());
-        }
-        if (result.size() != NUMBER_TOKENS) {
-            throw new IllegalArgumentException("Not a valid cron entry - wrong number of tokens(" + result.size()
-                    + "): " + cron);
-        }
-        return result;
-    }
-
-    protected static List<Integer> calculateValues(final CronEntry entry) {
-        List<Integer> result = new ArrayList<Integer>();
-        if (isAll(entry.token)) {
-            for (int i = entry.start; i <= entry.end; i++) {
-                result.add(i);
-            }
-        } else if (isAStep(entry.token)) {
-            int denominator = getDenominator(entry.token);
-            String numerator = getNumerator(entry.token);
-            CronEntry ce = new CronEntry(entry.name, numerator, entry.start, entry.end);
-            List<Integer> list = calculateValues(ce);
-            for (Integer i : list) {
-                if (i.intValue() % denominator == 0) {
-                    result.add(i);
-                }
-            }
-        } else if (isAList(entry.token)) {
-            StringTokenizer tokenizer = new StringTokenizer(entry.token, ",");
-            while (tokenizer.hasMoreTokens()) {
-                String str = tokenizer.nextToken();
-                CronEntry ce = new CronEntry(entry.name, str, entry.start, entry.end);
-                List<Integer> list = calculateValues(ce);
-                result.addAll(list);
-            }
-        } else if (isARange(entry.token)) {
-            int index = entry.token.indexOf('-');
-            int first = Integer.parseInt(entry.token.substring(0, index));
-            int last = Integer.parseInt(entry.token.substring(index + 1));
-            for (int i = first; i <= last; i++) {
-                result.add(i);
-            }
-        } else {
-            int value = Integer.parseInt(entry.token);
-            result.add(value);
-        }
-        Collections.sort(result);
-        return result;
-    }
-
-    protected static boolean isARange(String token) {
-        return token != null && token.indexOf('-') >= 0;
-    }
-
-    protected static boolean isAStep(String token) {
-        return token != null && token.indexOf('/') >= 0;
-    }
-
-    protected static boolean isAList(String token) {
-        return token != null && token.indexOf(',') >= 0;
-    }
-
-    protected static boolean isAll(String token) {
-        return token != null && token.length() == 1 && token.charAt(0) == '*';
-    }
-
-    protected static int getDenominator(final String token) {
-        int result = 0;
-        int index = token.indexOf('/');
-        String str = token.substring(index + 1);
-        result = Integer.parseInt(str);
-        return result;
-    }
-
-    protected static String getNumerator(final String token) {
-        int index = token.indexOf('/');
-        String str = token.substring(0, index);
-        return str;
-    }
-
-    static List<CronEntry> buildCronEntries(List<String> tokens) {
-
-        List<CronEntry> result = new ArrayList<CronEntry>();
-
-        CronEntry minutes = new CronEntry("Minutes", tokens.get(MINUTES), 0, 60);
-        minutes.currentWhen = calculateValues(minutes);
-        result.add(minutes);
-        CronEntry hours = new CronEntry("Hours", tokens.get(HOURS), 0, 24);
-        hours.currentWhen = calculateValues(hours);
-        result.add(hours);
-        CronEntry dayOfMonth = new CronEntry("DayOfMonth", tokens.get(DAY_OF_MONTH), 1, 31);
-        dayOfMonth.currentWhen = calculateValues(dayOfMonth);
-        result.add(dayOfMonth);
-        CronEntry month = new CronEntry("Month", tokens.get(MONTH), 1, 12);
-        month.currentWhen = calculateValues(month);
-        result.add(month);
-        CronEntry dayOfWeek = new CronEntry("DayOfWeek", tokens.get(DAY_OF_WEEK), 0, 6);
-        dayOfWeek.currentWhen = calculateValues(dayOfWeek);
-        result.add(dayOfWeek);
-
-        return result;
-    }
-
-    static class CronEntry {
-
-        final String name;
-        final String token;
-        final int start;
-        final int end;
-
-        List<Integer> currentWhen;
-
-        CronEntry(String name, String token, int start, int end) {
-            this.name = name;
-            this.token = token;
-            this.start = start;
-            this.end = end;
-        }
-
-        @Override
-        public String toString() {
-            return this.name + ":" + token;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/Job.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/Job.java
deleted file mode 100644
index 7b28a5b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/Job.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-
-public interface Job {
-
-    /**
-     * @return the jobId
-     */
-    public abstract String getJobId();
-
-    /**
-     * @return the repeat
-     */
-    public abstract int getRepeat();
-
-    /**
-     * @return the start
-     */
-    public abstract long getStart();
-
-    /**
-     * @return the Delay
-     */
-    public abstract long getDelay();
-    /**
-     * @return the period
-     */
-    public abstract long getPeriod();
-    
-    /**
-     * @return the cron entry
-     */
-    public abstract String getCronEntry();
-
-    /**
-     * @return the payload
-     */
-    public abstract byte[] getPayload();
-    
-    /**
-     * Get the start time as a Date time string
-     * @return the date time
-     */
-    public String getStartTime();
-    
-    /**
-     * Get the time the job is next due to execute 
-     * @return the date time
-     */
-    public String getNextExecutionTime();
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobImpl.java
deleted file mode 100644
index 9b0ee64..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import org.apache.kahadb.util.ByteSequence;
-
-
-public class JobImpl implements Job {
-    private final JobLocation jobLocation;
-    private final byte[] payload;
-    
-    protected JobImpl(JobLocation location,ByteSequence bs) {
-        this.jobLocation=location;
-        this.payload = new byte[bs.getLength()];
-        System.arraycopy(bs.getData(), bs.getOffset(), this.payload, 0, bs.getLength());
-    }
-
-    public String getJobId() {
-        return this.jobLocation.getJobId();
-    }
-
-    public byte[] getPayload() {
-       return this.payload;
-    }
-
-    public long getPeriod() {
-       return this.jobLocation.getPeriod();
-    }
-
-    public int getRepeat() {
-       return this.jobLocation.getRepeat();
-    }
-
-    public long getStart() {
-       return this.jobLocation.getStartTime();
-    }
-    
-    public long getDelay() {
-        return this.jobLocation.getDelay();
-    }
-
-    public String getCronEntry() {
-        return this.jobLocation.getCronEntry();
-    }
-    
-    
-
-    public String getNextExecutionTime() {
-        return JobImpl.getDateTime(this.jobLocation.getNextTime());
-    }
-
-    public String getStartTime() {
-        return JobImpl.getDateTime(getStart());
-    }
-    
-   public static long getDataTime(String value) throws Exception {
-        DateFormat dfm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-     
-        Date date = dfm.parse(value);
-        return date.getTime();
-    }
-    
-    public static String getDateTime(long value) {
-        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Date date = new Date(value);
-        return dateFormat.format(date);
-    }
-
-    
-    
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobListener.java
deleted file mode 100644
index 9a59981..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobListener.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import org.apache.kahadb.util.ByteSequence;
-
-public interface JobListener {
-    
-    /**
-     * A Job that has been scheduled is now ready 
-     * @param id
-     * @param job
-     */
-    public void scheduledJob(String id,ByteSequence job);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobLocation.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobLocation.java
deleted file mode 100644
index d887f52..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobLocation.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.util.VariableMarshaller;
-
-class JobLocation {
-   
-    private String jobId;
-    private int repeat;
-    private long startTime;
-    private long delay;
-    private long nextTime;
-    private long period;
-    private String cronEntry;
-    private final Location location;
-
-    public JobLocation(Location location) {
-        this.location = location;
-
-    }
-
-    public JobLocation() {
-        this(new Location());
-    }
-   
-    public void readExternal(DataInput in) throws IOException {
-        this.jobId = in.readUTF();
-        this.repeat = in.readInt();
-        this.startTime = in.readLong();
-        this.delay = in.readLong();
-        this.nextTime = in.readLong();
-        this.period = in.readLong();
-        this.cronEntry=in.readUTF();
-        this.location.readExternal(in);
-    }
-
-    public void writeExternal(DataOutput out) throws IOException {
-        out.writeUTF(this.jobId);
-        out.writeInt(this.repeat);
-        out.writeLong(this.startTime);
-        out.writeLong(this.delay);
-        out.writeLong(this.nextTime);
-        out.writeLong(this.period);
-        if (this.cronEntry==null) {
-            this.cronEntry="";
-        }
-        out.writeUTF(this.cronEntry);
-        this.location.writeExternal(out);
-    }
-
-    /**
-     * @return the jobId
-     */
-    public String getJobId() {
-        return this.jobId;
-    }
-
-    /**
-     * @param jobId
-     *            the jobId to set
-     */
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-    
-
-    /**
-     * @return the repeat
-     */
-    public int getRepeat() {
-        return this.repeat;
-    }
-
-    /**
-     * @param repeat
-     *            the repeat to set
-     */
-    public void setRepeat(int repeat) {
-        this.repeat = repeat;
-    }
-
-    /**
-     * @return the start
-     */
-    public long getStartTime() {
-        return this.startTime;
-    }
-
-    /**
-     * @param start
-     *            the start to set
-     */
-    public void setStartTime(long start) {
-        this.startTime = start;
-    }
-    
-    /**
-     * @return the nextTime
-     */
-    public synchronized long getNextTime() {
-        return this.nextTime;
-    }
-
-    /**
-     * @param nextTime the nextTime to set
-     */
-    public synchronized void setNextTime(long nextTime) {
-        this.nextTime = nextTime;
-    }
-
-    /**
-     * @return the period
-     */
-    public long getPeriod() {
-        return this.period;
-    }
-
-    /**
-     * @param period
-     *            the period to set
-     */
-    public void setPeriod(long period) {
-        this.period = period;
-    }
-    
-    /**
-     * @return the cronEntry
-     */
-    public synchronized String getCronEntry() {
-        return this.cronEntry;
-    }
-
-    /**
-     * @param cronEntry the cronEntry to set
-     */
-    public synchronized void setCronEntry(String cronEntry) {
-        this.cronEntry = cronEntry;
-    }
-    
-    public boolean isCron() {
-        return getCronEntry() != null && getCronEntry().length() > 0;
-    }
-    
-    /**
-     * @return the delay
-     */
-    public long getDelay() {
-        return this.delay;
-    }
-
-    /**
-     * @param delay the delay to set
-     */
-    public void setDelay(long delay) {
-        this.delay = delay;
-    }
-
-    /**
-     * @return the location
-     */
-    public Location getLocation() {
-        return this.location;
-    }
-    
-    public String toString() {
-        return "Job [id=" + jobId + ", startTime=" + new Date(startTime)
-                + ", delay=" + delay + ", period=" + period + ", repeat="
-                + repeat + ", nextTime=" + new Date(nextTime) + "]"; 
-    }
-
-    static class JobLocationMarshaller extends VariableMarshaller<List<JobLocation>> {
-        static final JobLocationMarshaller INSTANCE = new JobLocationMarshaller();
-        public List<JobLocation> readPayload(DataInput dataIn) throws IOException {
-            List<JobLocation> result = new ArrayList<JobLocation>();
-            int size = dataIn.readInt();
-            for (int i = 0; i < size; i++) {
-                JobLocation jobLocation = new JobLocation();
-                jobLocation.readExternal(dataIn);
-                result.add(jobLocation);
-            }
-            return result;
-        }
-
-        public void writePayload(List<JobLocation> value, DataOutput dataOut) throws IOException {
-            dataOut.writeInt(value.size());
-            for (JobLocation jobLocation : value) {
-                jobLocation.writeExternal(dataOut);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobScheduler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobScheduler.java
deleted file mode 100644
index 05708d1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobScheduler.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.util.List;
-import org.apache.kahadb.util.ByteSequence;
-
-public interface JobScheduler {
-
-    /**
-     * @return the name of the scheduler
-     * @throws Exception 
-     */
-    public abstract String getName() throws Exception;
-/**
- * Add a Job listener
- * @param l
- * @throws Exception 
- */
-    public abstract void addListener(JobListener l) throws Exception;
-/**
- * remove a JobListener
- * @param l
- * @throws Exception 
- */
-    public abstract void removeListener(JobListener l) throws Exception;
-
-    /**
-     * Add a job to be scheduled
-     * @param jobId a unique identifier for the job
-     * @param payload the message to be sent when the job is scheduled
-     * @param delay the time in milliseconds before the job will be run
-     * @throws Exception
-     */
-    public abstract void schedule(String jobId, ByteSequence payload,long delay) throws Exception;
-
-    /**
-     * Add a job to be scheduled
-     * @param jobId a unique identifier for the job
-     * @param payload the message to be sent when the job is scheduled
-     * @param cronEntry - cron entry
-     * @throws Exception
-     */
-    public abstract void schedule(String jobId, ByteSequence payload,String cronEntry) throws Exception;
-
-    
-    /**
-     * Add a job to be scheduled
-     * @param jobId a unique identifier for the job
-     * @param payload the message to be sent when the job is scheduled
-     * @param cronEntry - cron entry
-     * @param delay time in ms to wait before scheduling
-     * @param period the time in milliseconds between successive executions of the Job
-     * @param repeat the number of times to execute the job - less than 0 will be repeated forever
-     * @throws Exception
-     */
-    public abstract void schedule(String jobId, ByteSequence payload,String cronEntry,long delay, long period, int repeat) throws Exception;
-
-    /**
-     * remove all jobs scheduled to run at this time
-     * @param time
-     * @throws Exception 
-     */
-    public abstract void remove(long time) throws  Exception;
-
-    /**
-     * remove a job with the matching jobId
-     * @param jobId
-     * @throws Exception 
-     */
-    public abstract void remove(String jobId) throws  Exception;
-    
-    /**
-     * remove all the Jobs from the scheduler
-     * @throws Exception
-     */
-    public abstract void removeAllJobs() throws Exception;
-    
-    /**
-     * remove all the Jobs from the scheduler that are due between the start and finish times
-     * @param start time in milliseconds
-     * @param finish time in milliseconds
-     * @throws Exception
-     */
-    public abstract void removeAllJobs(long start,long finish) throws Exception;
-    
-
-    
-    /**
-     * Get the next time jobs will be fired
-     * @return the time in milliseconds
-     * @throws Exception 
-     */
-    public abstract long getNextScheduleTime() throws Exception;
-    
-    /**
-     * Get all the jobs scheduled to run next
-     * @return a list of jobs that will be scheduled next
-     * @throws Exception
-     */
-    public abstract List<Job> getNextScheduleJobs() throws Exception;
-    
-    /**
-     * Get all the outstanding Jobs
-     * @return a  list of all jobs
-     * @throws Exception 
-     */
-    public abstract List<Job> getAllJobs() throws Exception;
-    
-    /**
-     * Get all outstanding jobs due to run between start and finish
-     * @param start
-     * @param finish
-     * @return a list of jobs
-     * @throws Exception
-     */
-    public abstract List<Job> getAllJobs(long start,long finish)throws Exception;
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerFacade.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerFacade.java
deleted file mode 100644
index 8d0c83d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerFacade.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.util.Collections;
-import java.util.List;
-import org.apache.kahadb.util.ByteSequence;
-
-public class JobSchedulerFacade implements JobScheduler {
-
-    private final SchedulerBroker broker;
-    
-    JobSchedulerFacade(SchedulerBroker broker){
-        this.broker=broker;
-    }
-    public void addListener(JobListener l) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.addListener(l);
-        }
-    }
-
-    public List<Job> getAllJobs() throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            return js.getAllJobs();
-        }
-        return Collections.emptyList();
-    }
-
-    public List<Job> getAllJobs(long start, long finish) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            return js.getAllJobs(start,finish);
-        }
-        return Collections.emptyList();
-    }
-
-    public String getName() throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            return js.getName();
-        }
-        return "";
-    }
-
-    public List<Job> getNextScheduleJobs() throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            return js.getNextScheduleJobs();
-        }
-        return Collections.emptyList();
-    }
-
-    public long getNextScheduleTime() throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            return js.getNextScheduleTime();
-        }
-        return 0;
-    }
-
-    public void remove(long time) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.remove(time);
-        }
-    }
-
-    public void remove(String jobId) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.remove(jobId);
-        }
-
-    }
-
-    public void removeAllJobs() throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.removeAllJobs();
-        }
-    }
-
-    public void removeAllJobs(long start, long finish) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.removeAllJobs(start,finish);
-        }
-
-    }
-
-    public void removeListener(JobListener l) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.removeListener(l);
-        }
-
-    }
-
-    public void schedule(String jobId, ByteSequence payload, long delay) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.schedule(jobId, payload, delay);
-        }
-    }
-
-    public void schedule(String jobId, ByteSequence payload,String cronEntry, long start, long period, int repeat) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.schedule(jobId, payload, cronEntry,start,period,repeat);
-        }
-    }
-    public void schedule(String jobId, ByteSequence payload, String cronEntry) throws Exception {
-        JobScheduler js = this.broker.getInternalScheduler();
-        if (js !=null) {
-            js.schedule(jobId, payload, cronEntry);
-        }
-        
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerImpl.java
deleted file mode 100644
index cce75f7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerImpl.java
+++ /dev/null
@@ -1,675 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.MessageFormatException;
-
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.index.BTreeIndex;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.LongMarshaller;
-import org.apache.kahadb.util.VariableMarshaller;
-
-class JobSchedulerImpl extends ServiceSupport implements Runnable, JobScheduler {
-    private static final Logger LOG = LoggerFactory.getLogger(JobSchedulerImpl.class);
-    final JobSchedulerStore store;
-    private final AtomicBoolean running = new AtomicBoolean();
-    private String name;
-    BTreeIndex<Long, List<JobLocation>> index;
-    private Thread thread;
-    private final List<JobListener> jobListeners = new CopyOnWriteArrayList<JobListener>();
-    private static final IdGenerator ID_GENERATOR = new IdGenerator();
-    private final ScheduleTime scheduleTime = new ScheduleTime();
-
-    JobSchedulerImpl(JobSchedulerStore store) {
-
-        this.store = store;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.beanstalk.JobScheduler#getName()
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see
-     * org.apache.activemq.beanstalk.JobScheduler#addListener(org.apache.activemq
-     * .beanstalk.JobListener)
-     */
-    public void addListener(JobListener l) {
-        this.jobListeners.add(l);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see
-     * org.apache.activemq.beanstalk.JobScheduler#removeListener(org.apache.
-     * activemq.beanstalk.JobListener)
-     */
-    public void removeListener(JobListener l) {
-        this.jobListeners.remove(l);
-    }
-
-    public synchronized void schedule(final String jobId, final ByteSequence payload, final long delay) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                schedule(tx, jobId, payload, "", 0, delay, 0);
-            }
-        });
-    }
-
-    public synchronized void schedule(final String jobId, final ByteSequence payload, final String cronEntry) throws Exception {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                schedule(tx, jobId, payload, cronEntry, 0, 0, 0);
-            }
-        });
-
-    }
-
-    public synchronized void schedule(final String jobId, final ByteSequence payload, final String cronEntry, final long delay,
-            final long period, final int repeat) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                schedule(tx, jobId, payload, cronEntry, delay, period, repeat);
-            }
-        });
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.beanstalk.JobScheduler#remove(long)
-     */
-    public synchronized void remove(final long time) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                remove(tx, time);
-            }
-        });
-    }
-
-    synchronized void removeFromIndex(final long time, final String jobId) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                removeFromIndex(tx, time, jobId);
-            }
-        });
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.beanstalk.JobScheduler#remove(long,
-     * java.lang.String)
-     */
-    public synchronized void remove(final long time, final String jobId) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                remove(tx, time, jobId);
-            }
-        });
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.beanstalk.JobScheduler#remove(java.lang.String)
-     */
-    public synchronized void remove(final String jobId) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                remove(tx, jobId);
-            }
-        });
-    }
-
-    public synchronized long getNextScheduleTime() throws IOException {
-        Map.Entry<Long, List<JobLocation>> first = this.index.getFirst(this.store.getPageFile().tx());
-        return first != null ? first.getKey() : -1l;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.beanstalk.JobScheduler#getNextScheduleJobs()
-     */
-    public synchronized List<Job> getNextScheduleJobs() throws IOException {
-        final List<Job> result = new ArrayList<Job>();
-
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                Map.Entry<Long, List<JobLocation>> first = index.getFirst(store.getPageFile().tx());
-                if (first != null) {
-                    for (JobLocation jl : first.getValue()) {
-                        ByteSequence bs = getPayload(jl.getLocation());
-                        Job job = new JobImpl(jl, bs);
-                        result.add(job);
-                    }
-                }
-            }
-        });
-        return result;
-    }
-
-    public synchronized List<Job> getAllJobs() throws IOException {
-        final List<Job> result = new ArrayList<Job>();
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                Iterator<Map.Entry<Long, List<JobLocation>>> iter = index.iterator(store.getPageFile().tx());
-                while (iter.hasNext()) {
-                    Map.Entry<Long, List<JobLocation>> next = iter.next();
-                    if (next != null) {
-                        for (JobLocation jl : next.getValue()) {
-                            ByteSequence bs = getPayload(jl.getLocation());
-                            Job job = new JobImpl(jl, bs);
-                            result.add(job);
-                        }
-                    } else {
-                        break;
-                    }
-                }
-
-            }
-        });
-        return result;
-    }
-
-    public synchronized List<Job> getAllJobs(final long start, final long finish) throws IOException {
-        final List<Job> result = new ArrayList<Job>();
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                Iterator<Map.Entry<Long, List<JobLocation>>> iter = index.iterator(store.getPageFile().tx(), start);
-                while (iter.hasNext()) {
-                    Map.Entry<Long, List<JobLocation>> next = iter.next();
-                    if (next != null && next.getKey().longValue() <= finish) {
-                        for (JobLocation jl : next.getValue()) {
-                            ByteSequence bs = getPayload(jl.getLocation());
-                            Job job = new JobImpl(jl, bs);
-                            result.add(job);
-                        }
-                    } else {
-                        break;
-                    }
-                }
-
-            }
-        });
-        return result;
-    }
-
-    public synchronized void removeAllJobs() throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                destroy(tx);
-            }
-        });
-    }
-
-    public synchronized void removeAllJobs(final long start, final long finish) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                destroy(tx, start, finish);
-            }
-        });
-
-    }
-
-    ByteSequence getPayload(Location location) throws IllegalStateException, IOException {
-        return this.store.getPayload(location);
-    }
-
-    void schedule(Transaction tx, String jobId, ByteSequence payload, String cronEntry, long delay, long period,
-            int repeat) throws IOException {
-        long startTime = System.currentTimeMillis();
-        // round startTime - so we can schedule more jobs
-        // at the same time
-        startTime = (startTime / 1000) * 1000;
-        long time = 0;
-        if (cronEntry != null && cronEntry.length() > 0) {
-            try {
-                time = CronParser.getNextScheduledTime(cronEntry, startTime);
-            } catch (MessageFormatException e) {
-                throw new IOException(e.getMessage());
-            }
-        }
-
-        if (time == 0) {
-            // start time not set by CRON - so it it to the current time
-            time = startTime;
-        }
-        if (delay > 0) {
-            time += delay;
-        } else {
-            time += period;
-        }
-
-        Location location = this.store.write(payload, false);
-        JobLocation jobLocation = new JobLocation(location);
-        this.store.incrementJournalCount(tx, location);
-        jobLocation.setJobId(jobId);
-        jobLocation.setStartTime(startTime);
-        jobLocation.setCronEntry(cronEntry);
-        jobLocation.setDelay(delay);
-        jobLocation.setPeriod(period);
-        jobLocation.setRepeat(repeat);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Scheduling " + jobLocation);
-        }
-        storeJob(tx, jobLocation, time);
-        this.scheduleTime.newJob();
-    }
-
-    synchronized void storeJob(final JobLocation jobLocation, final long nextExecutionTime) throws IOException {
-        this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                storeJob(tx, jobLocation, nextExecutionTime);
-            }
-        });
-    }
-
-    void storeJob(final Transaction tx, final JobLocation jobLocation, final long nextExecutionTime) throws IOException {
-        List<JobLocation> values = null;
-        jobLocation.setNextTime(nextExecutionTime);
-        if (this.index.containsKey(tx, nextExecutionTime)) {
-            values = this.index.remove(tx, nextExecutionTime);
-        }
-        if (values == null) {
-            values = new ArrayList<JobLocation>();
-        }
-        values.add(jobLocation);
-        this.index.put(tx, nextExecutionTime, values);
-
-    }
-
-    void remove(Transaction tx, long time, String jobId) throws IOException {
-        JobLocation result = removeFromIndex(tx, time, jobId);
-        if (result != null) {
-            this.store.decrementJournalCount(tx, result.getLocation());
-        }
-    }
-
-    JobLocation removeFromIndex(Transaction tx, long time, String jobId) throws IOException {
-        JobLocation result = null;
-        List<JobLocation> values = this.index.remove(tx, time);
-        if (values != null) {
-            for (int i = 0; i < values.size(); i++) {
-                JobLocation jl = values.get(i);
-                if (jl.getJobId().equals(jobId)) {
-                    values.remove(i);
-                    if (!values.isEmpty()) {
-                        this.index.put(tx, time, values);
-                    }
-                    result = jl;
-                    break;
-                }
-            }
-        }
-        return result;
-    }
-
-    void remove(Transaction tx, long time) throws IOException {
-        List<JobLocation> values = this.index.remove(tx, time);
-        if (values != null) {
-            for (JobLocation jl : values) {
-                this.store.decrementJournalCount(tx, jl.getLocation());
-            }
-        }
-    }
-
-    void remove(Transaction tx, String id) throws IOException {
-        for (Iterator<Map.Entry<Long, List<JobLocation>>> i = this.index.iterator(tx); i.hasNext();) {
-            Map.Entry<Long, List<JobLocation>> entry = i.next();
-            List<JobLocation> values = entry.getValue();
-            if (values != null) {
-                for (JobLocation jl : values) {
-                    if (jl.getJobId().equals(id)) {
-                        remove(tx, entry.getKey(), id);
-                        return;
-                    }
-                }
-            }
-        }
-    }
-
-    synchronized void destroy(Transaction tx) throws IOException {
-        List<Long> keys = new ArrayList<Long>();
-        for (Iterator<Map.Entry<Long, List<JobLocation>>> i = this.index.iterator(tx); i.hasNext();) {
-            Map.Entry<Long, List<JobLocation>> entry = i.next();
-            keys.add(entry.getKey());
-            List<JobLocation> values = entry.getValue();
-            if (values != null) {
-                for (JobLocation jl : values) {
-                    this.store.decrementJournalCount(tx, jl.getLocation());
-                }
-            }
-        }
-        for (Long l : keys) {
-            this.index.remove(tx, l);
-        }
-    }
-
-    synchronized void destroy(Transaction tx, long start, long finish) throws IOException {
-        List<Long> keys = new ArrayList<Long>();
-        for (Iterator<Map.Entry<Long, List<JobLocation>>> i = this.index.iterator(tx, start); i.hasNext();) {
-            Map.Entry<Long, List<JobLocation>> entry = i.next();
-            if (entry.getKey().longValue() <= finish) {
-                keys.add(entry.getKey());
-                List<JobLocation> values = entry.getValue();
-                if (values != null) {
-                    for (JobLocation jl : values) {
-                        this.store.decrementJournalCount(tx, jl.getLocation());
-                    }
-                }
-            } else {
-                break;
-            }
-        }
-        for (Long l : keys) {
-            this.index.remove(tx, l);
-        }
-    }
-
-    private synchronized Map.Entry<Long, List<JobLocation>> getNextToSchedule() throws IOException {
-        if (!this.store.isStopped() && !this.store.isStopping()) {
-            Map.Entry<Long, List<JobLocation>> first = this.index.getFirst(this.store.getPageFile().tx());
-            return first;
-        }
-        return null;
-
-    }
-
-    void fireJob(JobLocation job) throws IllegalStateException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Firing " + job);
-        }
-        ByteSequence bs = this.store.getPayload(job.getLocation());
-        for (JobListener l : jobListeners) {
-            l.scheduledJob(job.getJobId(), bs);
-        }
-    }
-
-    public void run() {
-        try {
-            mainLoop();
-        } catch (Throwable e) {
-            if (this.running.get() && isStarted()) {
-                LOG.error(this + " Caught exception in mainloop", e);
-            }
-        } finally {
-            if (running.get()) {
-                try {
-                    stop();
-                } catch (Exception e) {
-                    LOG.error("Failed to stop " + this);
-                }
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "JobScheduler:" + this.name;
-    }
-
-    protected void mainLoop() {
-        while (this.running.get()) {
-            this.scheduleTime.clearNewJob();
-            try {
-                // peek the next job
-                long currentTime = System.currentTimeMillis();
-
-                // Reads the list of the next entries and removes them from the store in one atomic step.
-                // Prevents race conditions on short delays, when storeJob() tries to append new items to the
-                // existing list during this read operation (see AMQ-3141).
-                synchronized (this) {
-                    Map.Entry<Long, List<JobLocation>> first = getNextToSchedule();
-                    if (first != null) {
-                        List<JobLocation> list = new ArrayList<JobLocation>(first.getValue());
-                        final long executionTime = first.getKey();
-                        long nextExecutionTime = 0;
-                        if (executionTime <= currentTime) {
-                            for (final JobLocation job : list) {
-                                int repeat = job.getRepeat();
-                                nextExecutionTime = calculateNextExecutionTime(job, currentTime, repeat);
-                                long waitTime = nextExecutionTime - currentTime;
-                                this.scheduleTime.setWaitTime(waitTime);
-                                if (job.isCron() == false) {
-                                    fireJob(job);
-                                    if (repeat != 0) {
-                                        repeat--;
-                                        job.setRepeat(repeat);
-                                        // remove this job from the index - so it
-                                        // doesn't get destroyed
-                                        removeFromIndex(executionTime, job.getJobId());
-                                        // and re-store it
-                                        storeJob(job, nextExecutionTime);
-                                    }
-                                } else {
-                                    // cron job
-                                    if (repeat == 0) {
-                                        // we haven't got a separate scheduler to
-                                        // execute at
-                                        // this time - just a cron job - so fire it
-                                        fireJob(job);
-                                        //this.scheduleTime.setWaitTime(this.scheduleTime.DEFAULT_WAIT);
-                                    }
-                                    if (nextExecutionTime > currentTime) {
-                                        // we will run again ...
-                                        // remove this job from the index - so it
-                                        // doesn't get destroyed
-                                        removeFromIndex(executionTime, job.getJobId());
-                                        // and re-store it
-                                        storeJob(job, nextExecutionTime);
-                                        if (repeat != 0) {
-                                            // we have a separate schedule to run at
-                                            // this time
-                                            // so the cron job is used to set of a
-                                            // seperate scheule
-                                            // hence we won't fire the original cron
-                                            // job to the listeners
-                                            // but we do need to start a separate
-                                            // schedule
-                                            String jobId = ID_GENERATOR.generateId();
-                                            ByteSequence payload = getPayload(job.getLocation());
-                                            schedule(jobId, payload, "", job.getDelay(), job.getPeriod(), job.getRepeat());
-                                            waitTime = job.getDelay() != 0 ? job.getDelay() : job.getPeriod();
-                                            this.scheduleTime.setWaitTime(waitTime);
-                                        }
-                                    }
-                                }
-                            }
-                            // now remove all jobs that have not been
-                            // rescheduled from this execution time
-                            remove(executionTime);
-
-                            // If there is a job that should fire before the currently set wait time
-                            // we need to reset wait time otherwise we'll miss it.
-                            Map.Entry<Long, List<JobLocation>> nextUp = getNextToSchedule();
-                            if (nextUp != null) {
-	                            final long timeUntilNextScheduled = nextUp.getKey() - currentTime;
-	                            if (timeUntilNextScheduled < this.scheduleTime.getWaitTime()) {
-	                            	this.scheduleTime.setWaitTime(timeUntilNextScheduled);
-	                            }
-                            }
-
-                        } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Not yet time to execute the job, waiting " + (executionTime - currentTime) + " ms");
-                            }
-                            this.scheduleTime.setWaitTime(executionTime - currentTime);
-                        }
-                    }
-                }
-                this.scheduleTime.pause();
-
-            } catch (Exception ioe) {
-                LOG.error(this.name + " Failed to schedule job", ioe);
-                try {
-                    this.store.stop();
-                } catch (Exception e) {
-                    LOG.error(this.name + " Failed to shutdown JobSchedulerStore", e);
-                }
-            }
-        }
-    }
-
-    @Override
-    protected void doStart() throws Exception {
-        this.running.set(true);
-        this.thread = new Thread(this, "JobScheduler:" + this.name);
-        this.thread.setDaemon(true);
-        this.thread.start();
-
-    }
-
-    @Override
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        this.running.set(false);
-        this.scheduleTime.wakeup();
-        Thread t = this.thread;
-        if (t != null) {
-            t.join(1000);
-        }
-
-    }
-
-    long calculateNextExecutionTime(final JobLocation job, long currentTime, int repeat) throws MessageFormatException {
-        long result = currentTime;
-        String cron = job.getCronEntry();
-        if (cron != null && cron.length() > 0) {
-            result = CronParser.getNextScheduledTime(cron, result);
-        } else if (job.getRepeat() != 0) {
-            result += job.getPeriod();
-        }
-        return result;
-    }
-
-    void createIndexes(Transaction tx) throws IOException {
-        this.index = new BTreeIndex<Long, List<JobLocation>>(this.store.getPageFile(), tx.allocate().getPageId());
-    }
-
-    void load(Transaction tx) throws IOException {
-        this.index.setKeyMarshaller(LongMarshaller.INSTANCE);
-        this.index.setValueMarshaller(ValueMarshaller.INSTANCE);
-        this.index.load(tx);
-    }
-
-    void read(DataInput in) throws IOException {
-        this.name = in.readUTF();
-        this.index = new BTreeIndex<Long, List<JobLocation>>(this.store.getPageFile(), in.readLong());
-        this.index.setKeyMarshaller(LongMarshaller.INSTANCE);
-        this.index.setValueMarshaller(ValueMarshaller.INSTANCE);
-    }
-
-    public void write(DataOutput out) throws IOException {
-        out.writeUTF(name);
-        out.writeLong(this.index.getPageId());
-    }
-
-    static class ValueMarshaller extends VariableMarshaller<List<JobLocation>> {
-        static ValueMarshaller INSTANCE = new ValueMarshaller();
-        public List<JobLocation> readPayload(DataInput dataIn) throws IOException {
-            List<JobLocation> result = new ArrayList<JobLocation>();
-            int size = dataIn.readInt();
-            for (int i = 0; i < size; i++) {
-                JobLocation jobLocation = new JobLocation();
-                jobLocation.readExternal(dataIn);
-                result.add(jobLocation);
-            }
-            return result;
-        }
-
-        public void writePayload(List<JobLocation> value, DataOutput dataOut) throws IOException {
-            dataOut.writeInt(value.size());
-            for (JobLocation jobLocation : value) {
-                jobLocation.writeExternal(dataOut);
-            }
-        }
-    }
-
-    static class ScheduleTime {
-        private final int DEFAULT_WAIT = 500;
-        private final int DEFAULT_NEW_JOB_WAIT = 100;
-        private boolean newJob;
-        private long waitTime = DEFAULT_WAIT;
-        private final Object mutex = new Object();
-
-        /**
-         * @return the waitTime
-         */
-        long getWaitTime() {
-            return this.waitTime;
-        }
-        /**
-         * @param waitTime
-         *            the waitTime to set
-         */
-        void setWaitTime(long waitTime) {
-            if (!this.newJob) {
-                this.waitTime = waitTime > 0 ? waitTime : DEFAULT_WAIT;
-            }
-        }
-
-        void pause() {
-            synchronized (mutex) {
-                try {
-                    mutex.wait(this.waitTime);
-                } catch (InterruptedException e) {
-                }
-            }
-        }
-
-        void newJob() {
-            this.newJob = true;
-            this.waitTime = DEFAULT_NEW_JOB_WAIT;
-            wakeup();
-        }
-
-        void clearNewJob() {
-            this.newJob = false;
-        }
-
-        void wakeup() {
-            synchronized (this.mutex) {
-                mutex.notifyAll();
-            }
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java
deleted file mode 100644
index 9b71835..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/JobSchedulerStore.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.index.BTreeIndex;
-import org.apache.kahadb.journal.Journal;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.IntegerMarshaller;
-import org.apache.kahadb.util.LockFile;
-import org.apache.kahadb.util.StringMarshaller;
-import org.apache.kahadb.util.VariableMarshaller;
-
-public class JobSchedulerStore extends ServiceSupport {
-    static final Logger LOG = LoggerFactory.getLogger(JobSchedulerStore.class);
-    private static final int DATABASE_LOCKED_WAIT_DELAY = 10 * 1000;
-
-    public static final int CLOSED_STATE = 1;
-    public static final int OPEN_STATE = 2;
-
-    private File directory;
-    PageFile pageFile;
-    private Journal journal;
-    private LockFile lockFile;
-    private boolean failIfDatabaseIsLocked;
-    private int journalMaxFileLength = Journal.DEFAULT_MAX_FILE_LENGTH;
-    private int journalMaxWriteBatchSize = Journal.DEFAULT_MAX_WRITE_BATCH_SIZE;
-    private boolean enableIndexWriteAsync = false;
-    // private int indexWriteBatchSize = PageFile.DEFAULT_WRITE_BATCH_SIZE;
-    MetaData metaData = new MetaData(this);
-    final MetaDataMarshaller metaDataMarshaller = new MetaDataMarshaller(this);
-    Map<String, JobSchedulerImpl> schedulers = new HashMap<String, JobSchedulerImpl>();
-
-    protected class MetaData {
-        protected MetaData(JobSchedulerStore store) {
-            this.store = store;
-        }
-        private final JobSchedulerStore store;
-        Page<MetaData> page;
-        BTreeIndex<Integer, Integer> journalRC;
-        BTreeIndex<String, JobSchedulerImpl> storedSchedulers;
-
-        void createIndexes(Transaction tx) throws IOException {
-            this.storedSchedulers = new BTreeIndex<String, JobSchedulerImpl>(pageFile, tx.allocate().getPageId());
-            this.journalRC = new BTreeIndex<Integer, Integer>(pageFile, tx.allocate().getPageId());
-        }
-
-        void load(Transaction tx) throws IOException {
-            this.storedSchedulers.setKeyMarshaller(StringMarshaller.INSTANCE);
-            this.storedSchedulers.setValueMarshaller(new JobSchedulerMarshaller(this.store));
-            this.storedSchedulers.load(tx);
-            this.journalRC.setKeyMarshaller(IntegerMarshaller.INSTANCE);
-            this.journalRC.setValueMarshaller(IntegerMarshaller.INSTANCE);
-            this.journalRC.load(tx);
-        }
-
-        void loadScheduler(Transaction tx, Map<String, JobSchedulerImpl> schedulers) throws IOException {
-            for (Iterator<Entry<String, JobSchedulerImpl>> i = this.storedSchedulers.iterator(tx); i.hasNext();) {
-                Entry<String, JobSchedulerImpl> entry = i.next();
-                entry.getValue().load(tx);
-                schedulers.put(entry.getKey(), entry.getValue());
-            }
-        }
-
-        public void read(DataInput is) throws IOException {
-            this.storedSchedulers = new BTreeIndex<String, JobSchedulerImpl>(pageFile, is.readLong());
-            this.storedSchedulers.setKeyMarshaller(StringMarshaller.INSTANCE);
-            this.storedSchedulers.setValueMarshaller(new JobSchedulerMarshaller(this.store));
-            this.journalRC = new BTreeIndex<Integer, Integer>(pageFile, is.readLong());
-            this.journalRC.setKeyMarshaller(IntegerMarshaller.INSTANCE);
-            this.journalRC.setValueMarshaller(IntegerMarshaller.INSTANCE);
-        }
-
-        public void write(DataOutput os) throws IOException {
-            os.writeLong(this.storedSchedulers.getPageId());
-            os.writeLong(this.journalRC.getPageId());
-
-        }
-    }
-
-    class MetaDataMarshaller extends VariableMarshaller<MetaData> {
-        private final JobSchedulerStore store;
-
-        MetaDataMarshaller(JobSchedulerStore store) {
-            this.store = store;
-        }
-        public MetaData readPayload(DataInput dataIn) throws IOException {
-            MetaData rc = new MetaData(this.store);
-            rc.read(dataIn);
-            return rc;
-        }
-
-        public void writePayload(MetaData object, DataOutput dataOut) throws IOException {
-            object.write(dataOut);
-        }
-    }
-
-    class ValueMarshaller extends VariableMarshaller<List<JobLocation>> {
-        public List<JobLocation> readPayload(DataInput dataIn) throws IOException {
-            List<JobLocation> result = new ArrayList<JobLocation>();
-            int size = dataIn.readInt();
-            for (int i = 0; i < size; i++) {
-                JobLocation jobLocation = new JobLocation();
-                jobLocation.readExternal(dataIn);
-                result.add(jobLocation);
-            }
-            return result;
-        }
-
-        public void writePayload(List<JobLocation> value, DataOutput dataOut) throws IOException {
-            dataOut.writeInt(value.size());
-            for (JobLocation jobLocation : value) {
-                jobLocation.writeExternal(dataOut);
-            }
-        }
-    }
-
-    class JobSchedulerMarshaller extends VariableMarshaller<JobSchedulerImpl> {
-        private final JobSchedulerStore store;
-        JobSchedulerMarshaller(JobSchedulerStore store) {
-            this.store = store;
-        }
-        public JobSchedulerImpl readPayload(DataInput dataIn) throws IOException {
-            JobSchedulerImpl result = new JobSchedulerImpl(this.store);
-            result.read(dataIn);
-            return result;
-        }
-
-        public void writePayload(JobSchedulerImpl js, DataOutput dataOut) throws IOException {
-            js.write(dataOut);
-        }
-    }
-
-    public File getDirectory() {
-        return directory;
-    }
-
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-    
-    public long size() {
-        if ( !isStarted() ) {
-            return 0;
-        }
-        try {
-            return journal.getDiskSize() + pageFile.getDiskSize();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public JobScheduler getJobScheduler(final String name) throws Exception {
-        JobSchedulerImpl result = this.schedulers.get(name);
-        if (result == null) {
-            final JobSchedulerImpl js = new JobSchedulerImpl(this);
-            js.setName(name);
-            getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    js.createIndexes(tx);
-                    js.load(tx);
-                    metaData.storedSchedulers.put(tx, name, js);
-                }
-            });
-            result = js;
-            this.schedulers.put(name, js);
-            if (isStarted()) {
-                result.start();
-            }
-            this.pageFile.flush();
-        }
-        return result;
-    }
-
-    synchronized public boolean removeJobScheduler(final String name) throws Exception {
-        boolean result = false;
-        final JobSchedulerImpl js = this.schedulers.remove(name);
-        result = js != null;
-        if (result) {
-            js.stop();
-            getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    metaData.storedSchedulers.remove(tx, name);
-                    js.destroy(tx);
-                }
-            });
-        }
-        return result;
-    }
-
-    @Override
-    protected synchronized void doStart() throws Exception {
-        if (this.directory == null) {
-            this.directory = new File(IOHelper.getDefaultDataDirectory() + File.pathSeparator + "delayedDB");
-        }
-        IOHelper.mkdirs(this.directory);
-        lock();
-        this.journal = new Journal();
-        this.journal.setDirectory(directory);
-        this.journal.setMaxFileLength(getJournalMaxFileLength());
-        this.journal.setWriteBatchSize(getJournalMaxWriteBatchSize());
-        this.journal.start();
-        this.pageFile = new PageFile(directory, "scheduleDB");
-        this.pageFile.load();
-
-        this.pageFile.tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                if (pageFile.getPageCount() == 0) {
-                    Page<MetaData> page = tx.allocate();
-                    assert page.getPageId() == 0;
-                    page.set(metaData);
-                    metaData.page = page;
-                    metaData.createIndexes(tx);
-                    tx.store(metaData.page, metaDataMarshaller, true);
-
-                } else {
-                    Page<MetaData> page = tx.load(0, metaDataMarshaller);
-                    metaData = page.get();
-                    metaData.page = page;
-                }
-                metaData.load(tx);
-                metaData.loadScheduler(tx, schedulers);
-                for (JobSchedulerImpl js :schedulers.values()) {
-                    try {
-                        js.start();
-                    } catch (Exception e) {
-                        JobSchedulerStore.LOG.error("Failed to load " + js.getName(),e);
-                    }
-               }
-            }
-        });
-
-        this.pageFile.flush();
-        LOG.info(this + " started");
-    }
-    
-    @Override
-    protected synchronized void doStop(ServiceStopper stopper) throws Exception {
-        for (JobSchedulerImpl js : this.schedulers.values()) {
-            js.stop();
-        }
-        if (this.pageFile != null) {
-            this.pageFile.unload();
-        }
-        if (this.journal != null) {
-            journal.close();
-        }
-        if (this.lockFile != null) {
-            this.lockFile.unlock();
-        }
-        this.lockFile = null;
-        LOG.info(this + " stopped");
-
-    }
-
-    synchronized void incrementJournalCount(Transaction tx, Location location) throws IOException {
-        int logId = location.getDataFileId();
-        Integer val = this.metaData.journalRC.get(tx, logId);
-        int refCount = val != null ? val.intValue() + 1 : 1;
-        this.metaData.journalRC.put(tx, logId, refCount);
-
-    }
-
-    synchronized void decrementJournalCount(Transaction tx, Location location) throws IOException {
-        int logId = location.getDataFileId();
-        int refCount = this.metaData.journalRC.get(tx, logId);
-        refCount--;
-        if (refCount <= 0) {
-            this.metaData.journalRC.remove(tx, logId);
-            Set<Integer> set = new HashSet<Integer>();
-            set.add(logId);
-            this.journal.removeDataFiles(set);
-        } else {
-            this.metaData.journalRC.put(tx, logId, refCount);
-        }
-
-    }
-
-    synchronized ByteSequence getPayload(Location location) throws IllegalStateException, IOException {
-        ByteSequence result = null;
-        result = this.journal.read(location);
-        return result;
-    }
-
-    synchronized Location write(ByteSequence payload, boolean sync) throws IllegalStateException, IOException {
-        return this.journal.write(payload, sync);
-    }
-
-    private void lock() throws IOException {
-        if (lockFile == null) {
-            File lockFileName = new File(directory, "lock");
-            lockFile = new LockFile(lockFileName, true);
-            if (failIfDatabaseIsLocked) {
-                lockFile.lock();
-            } else {
-                while (true) {
-                    try {
-                        lockFile.lock();
-                        break;
-                    } catch (IOException e) {
-                        LOG.info("Database " + lockFileName + " is locked... waiting "
-                                + (DATABASE_LOCKED_WAIT_DELAY / 1000)
-                                + " seconds for the database to be unlocked. Reason: " + e);
-                        try {
-                            Thread.sleep(DATABASE_LOCKED_WAIT_DELAY);
-                        } catch (InterruptedException e1) {
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    PageFile getPageFile() {
-        this.pageFile.isLoaded();
-        return this.pageFile;
-    }
-
-    public boolean isFailIfDatabaseIsLocked() {
-        return failIfDatabaseIsLocked;
-    }
-
-    public void setFailIfDatabaseIsLocked(boolean failIfDatabaseIsLocked) {
-        this.failIfDatabaseIsLocked = failIfDatabaseIsLocked;
-    }
-
-    public int getJournalMaxFileLength() {
-        return journalMaxFileLength;
-    }
-
-    public void setJournalMaxFileLength(int journalMaxFileLength) {
-        this.journalMaxFileLength = journalMaxFileLength;
-    }
-
-    public int getJournalMaxWriteBatchSize() {
-        return journalMaxWriteBatchSize;
-    }
-
-    public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize) {
-        this.journalMaxWriteBatchSize = journalMaxWriteBatchSize;
-    }
-
-    public boolean isEnableIndexWriteAsync() {
-        return enableIndexWriteAsync;
-    }
-
-    public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync) {
-        this.enableIndexWriteAsync = enableIndexWriteAsync;
-    }
-
-    @Override
-    public String toString() {
-        return "JobSchedulerStore:" + this.directory;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java
deleted file mode 100644
index 6fa08cd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/scheduler/SchedulerBroker.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.File;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.ScheduledMessage;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.security.SecurityContext;
-import org.apache.activemq.state.ProducerState;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.apache.activemq.util.TypeConversionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.util.ByteSequence;
-
-public class SchedulerBroker extends BrokerFilter implements JobListener {
-    private static final Logger LOG = LoggerFactory.getLogger(SchedulerBroker.class);
-    private static final IdGenerator ID_GENERATOR = new IdGenerator();
-    private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator();
-    private final AtomicBoolean started = new AtomicBoolean();
-    private final WireFormat wireFormat = new OpenWireFormat();
-    private final ConnectionContext context = new ConnectionContext();
-    private final ProducerId producerId = new ProducerId();
-    private File directory;
-
-    private JobSchedulerStore store;
-    private JobScheduler scheduler;
-
-    public SchedulerBroker(Broker next, File directory) throws Exception {
-        super(next);
-        this.directory = directory;
-        this.producerId.setConnectionId(ID_GENERATOR.generateId());
-        this.context.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
-        context.setBroker(next);
-        LOG.info("Scheduler using directory: " + directory);
-
-    }
-
-    public synchronized JobScheduler getJobScheduler() throws Exception {
-        return new JobSchedulerFacade(this);
-    }
-
-    /**
-     * @return the directory
-     */
-    public File getDirectory() {
-        return this.directory;
-    }
-    /**
-     * @param directory
-     *            the directory to set
-     */
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-
-    @Override
-    public void start() throws Exception {
-        this.started.set(true);
-        getInternalScheduler();
-        super.start();
-    }
-
-    @Override
-    public void stop() throws Exception {
-        if (this.started.compareAndSet(true, false)) {
-
-            if (this.store != null) {
-                this.store.stop();
-            }
-            if (this.scheduler != null) {
-                this.scheduler.removeListener(this);
-                this.scheduler = null;
-            }
-        }
-        super.stop();
-    }
-
-    @Override
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        long delay = 0;
-        long period = 0;
-        int repeat = 0;
-        String cronEntry = "";
-        String jobId = (String) messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULED_ID);
-        Object cronValue = messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULED_CRON);
-        Object periodValue = messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD);
-        Object delayValue = messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY);
-
-        String physicalName = messageSend.getDestination().getPhysicalName();
-        boolean schedularManage = physicalName.regionMatches(true, 0,
-        		ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION, 0,
-        		ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION.length());
-
-        if (schedularManage == true) {
-
-        	JobScheduler scheduler = getInternalScheduler();
-	        ActiveMQDestination replyTo = messageSend.getReplyTo();
-
-	        String action = (String) messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION);
-
-	        if (action != null ) {
-
-	        	Object startTime = messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION_START_TIME);
-	        	Object endTime = messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION_END_TIME);
-
-		        if (replyTo != null && action.equals(ScheduledMessage.AMQ_SCHEDULER_ACTION_BROWSE)) {
-
-		        	if( startTime != null && endTime != null ) {
-
-		                long start = (Long) TypeConversionSupport.convert(startTime, Long.class);
-		                long finish = (Long) TypeConversionSupport.convert(endTime, Long.class);
-
-			        	for (Job job : scheduler.getAllJobs(start, finish)) {
-			        		sendScheduledJob(producerExchange.getConnectionContext(), job, replyTo);
-			        	}
-		        	} else {
-			        	for (Job job : scheduler.getAllJobs()) {
-			        		sendScheduledJob(producerExchange.getConnectionContext(), job, replyTo);
-			        	}
-		        	}
-		        }
-		        if (jobId != null && action.equals(ScheduledMessage.AMQ_SCHEDULER_ACTION_REMOVE)) {
-		        	scheduler.remove(jobId);
-		        } else if (action.equals(ScheduledMessage.AMQ_SCHEDULER_ACTION_REMOVEALL)) {
-
-		        	if( startTime != null && endTime != null ) {
-
-		                long start = (Long) TypeConversionSupport.convert(startTime, Long.class);
-		                long finish = (Long) TypeConversionSupport.convert(endTime, Long.class);
-
-		                scheduler.removeAllJobs(start, finish);
-		        	} else {
-			        	scheduler.removeAllJobs();
-		        	}
-		        }
-	        }
-
-        } else if ((cronValue != null || periodValue != null || delayValue != null) && jobId == null) {
-            //clear transaction context
-            Message msg = messageSend.copy();
-            msg.setTransactionId(null);
-            org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(msg);
-            if (cronValue != null) {
-                cronEntry = cronValue.toString();
-            }
-            if (periodValue != null) {
-              period = (Long) TypeConversionSupport.convert(periodValue, Long.class);
-            }
-            if (delayValue != null) {
-                delay = (Long) TypeConversionSupport.convert(delayValue, Long.class);
-            }
-            Object repeatValue = msg.getProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT);
-            if (repeatValue != null) {
-                repeat = (Integer) TypeConversionSupport.convert(repeatValue, Integer.class);
-            }
-            getInternalScheduler().schedule(msg.getMessageId().toString(),
-                    new ByteSequence(packet.data, packet.offset, packet.length),cronEntry, delay, period, repeat);
-
-        } else {
-            super.send(producerExchange, messageSend);
-        }
-    }
-
-    public void scheduledJob(String id, ByteSequence job) {
-        org.apache.activemq.util.ByteSequence packet = new org.apache.activemq.util.ByteSequence(job.getData(), job
-                .getOffset(), job.getLength());
-        try {
-            Message messageSend = (Message) this.wireFormat.unmarshal(packet);
-            messageSend.setOriginalTransactionId(null);
-            Object repeatValue = messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT);
-            Object cronValue = messageSend.getProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT);
-            String cronStr = cronValue != null ? cronValue.toString() : null;
-            int repeat = 0;
-            if (repeatValue != null) {
-                repeat = (Integer) TypeConversionSupport.convert(repeatValue, Integer.class);
-            }
-
-            if (repeat != 0 || cronStr != null && cronStr.length() > 0) {
-                // create a unique id - the original message could be sent
-                // lots of times
-                messageSend.setMessageId(
-                		new MessageId(this.producerId, this.messageIdGenerator.getNextSequenceId()));
-            }
-
-            // Add the jobId as a property
-            messageSend.setProperty("scheduledJobId", id);
-
-            // if this goes across a network - we don't want it rescheduled
-            messageSend.removeProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD);
-            messageSend.removeProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY);
-            messageSend.removeProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT);
-            messageSend.removeProperty(ScheduledMessage.AMQ_SCHEDULED_CRON);
-
-            final ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-            producerExchange.setConnectionContext(context);
-            producerExchange.setMutable(true);
-            producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
-            super.send(producerExchange, messageSend);
-        } catch (Exception e) {
-            LOG.error("Failed to send scheduled message " + id, e);
-        }
-    }
-
-    protected synchronized JobScheduler getInternalScheduler() throws Exception {
-        if (this.started.get()) {
-            if (this.scheduler == null) {
-                this.scheduler = getStore().getJobScheduler("JMS");
-                this.scheduler.addListener(this);
-            }
-            return this.scheduler;
-        }
-        return null;
-    }
-
-    private JobSchedulerStore getStore() throws Exception {
-        if (started.get()) {
-            if (this.store == null) {
-                this.store = new JobSchedulerStore();
-                this.store.setDirectory(directory);
-                this.store.start();
-            }
-            return this.store;
-        }
-        return null;
-    }
-
-	protected void sendScheduledJob(ConnectionContext context, Job job, ActiveMQDestination replyTo)
-			throws Exception {
-
-        org.apache.activemq.util.ByteSequence packet = new org.apache.activemq.util.ByteSequence(job.getPayload());
-        try {
-            Message msg = (Message) this.wireFormat.unmarshal(packet);
-            msg.setOriginalTransactionId(null);
-    		msg.setPersistent(false);
-    		msg.setType(AdvisorySupport.ADIVSORY_MESSAGE_TYPE);
-    		msg.setMessageId(new MessageId(this.producerId, this.messageIdGenerator.getNextSequenceId()));
-    		msg.setDestination(replyTo);
-    		msg.setResponseRequired(false);
-    		msg.setProducerId(this.producerId);
-
-            // Add the jobId as a property
-    		msg.setProperty("scheduledJobId", job.getJobId());
-
-    		final boolean originalFlowControl = context.isProducerFlowControl();
-    		final ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-    		producerExchange.setConnectionContext(context);
-    		producerExchange.setMutable(true);
-    		producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
-    		try {
-    			context.setProducerFlowControl(false);
-    			this.next.send(producerExchange, msg);
-    		} finally {
-    			context.setProducerFlowControl(originalFlowControl);
-    		}
-        } catch (Exception e) {
-            LOG.error("Failed to send scheduled message " + job.getJobId(), e);
-        }
-
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLog.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLog.java
deleted file mode 100644
index 7dfae57..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLog.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.broker.util;
-
-public interface AuditLog {
-
-    public void log(AuditLogEntry entry);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogEntry.java
deleted file mode 100644
index 6644310..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogEntry.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-public class AuditLogEntry {
-
-    protected String user = "anonymous";
-    protected long timestamp;
-    protected String operation;
-    protected String remoteAddr;
-
-    SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss,SSS");
-
-    protected Map<String, Object> parameters = new HashMap<String, Object>();
-
-    public String getUser() {
-        return user;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-    public void setTimestamp(long timestamp) {
-        this.timestamp = timestamp;
-    }
-
-    public String getFormattedTime() {
-        return formatter.format(new Date(timestamp));
-    }
-
-    public String getOperation() {
-        return operation;
-    }
-
-    public void setOperation(String operation) {
-        this.operation = operation;
-    }
-
-    public String getRemoteAddr() {
-        return remoteAddr;
-    }
-
-    public void setRemoteAddr(String remoteAddr) {
-        this.remoteAddr = remoteAddr;
-    }
-
-    public Map<String, Object> getParameters() {
-        return parameters;
-    }
-
-    public void setParameters(Map<String, Object> parameters) {
-        this.parameters = parameters;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogFactory.java
deleted file mode 100644
index 5f68f7b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogFactory.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.util.List;
-
-public interface AuditLogFactory {
-
-    public List<AuditLog> getAuditLogs();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogService.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogService.java
deleted file mode 100644
index 2052fea..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/AuditLogService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.broker.util;
-
-public class AuditLogService {
-
-    private AuditLogFactory factory;
-
-    private static AuditLogService auditLog;
-
-    public static AuditLogService getAuditLog() {
-        if (auditLog == null) {
-            auditLog = new AuditLogService();
-        }
-        return auditLog;
-    }
-
-    private AuditLogService() {
-        factory = new DefaultAuditLogFactory();
-    }
-
-    public void log(AuditLogEntry entry) {
-        for (AuditLog log : factory.getAuditLogs()) {
-            log.log(entry);
-        }
-    }
-
-    public void setFactory(AuditLogFactory factory) {
-        this.factory = factory;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java
deleted file mode 100644
index ff65a7c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * 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.broker.util;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.Service;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An agent which listens to commands on a JMS destination
- * 
- * 
- * @org.apache.xbean.XBean
- */
-public class CommandAgent implements Service, ExceptionListener {
-    private static final Logger LOG = LoggerFactory.getLogger(CommandAgent.class);
-
-    private String brokerUrl = "vm://localhost";
-    private String username;
-    private String password;
-    private ConnectionFactory connectionFactory;
-    private Connection connection;
-    private Destination commandDestination;
-    private CommandMessageListener listener;
-    private Session session;
-    private MessageConsumer consumer;
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void start() throws Exception {
-        session = getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
-        listener = new CommandMessageListener(session);
-        Destination destination = getCommandDestination();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Agent subscribing to control destination: " + destination);
-        }
-        consumer = session.createConsumer(destination);
-        consumer.setMessageListener(listener);
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.DestroyMethod
-     */
-    @PreDestroy
-    public void stop() throws Exception {
-        ServiceStopper stopper = new ServiceStopper();
-        if (consumer != null) {
-            try {
-                consumer.close();
-                consumer = null;
-            } catch (JMSException e) {
-                stopper.onException(this, e);
-            }
-        }
-        if (session != null) {
-            try {
-                session.close();
-                session = null;
-            } catch (JMSException e) {
-                stopper.onException(this, e);
-            }
-        }
-        if (connection != null) {
-            try {
-                connection.close();
-                connection = null;
-            } catch (JMSException e) {
-                stopper.onException(this, e);
-            }
-        }
-        stopper.throwFirstException();
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public String getBrokerUrl() {
-        return brokerUrl;
-    }
-
-    public void setBrokerUrl(String brokerUrl) {
-        this.brokerUrl = brokerUrl;
-    }    
-
-    public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getPassword() {
-		return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	public ConnectionFactory getConnectionFactory() {
-        if (connectionFactory == null) {
-            connectionFactory = new ActiveMQConnectionFactory(brokerUrl);
-        }
-        return connectionFactory;
-    }
-
-    public void setConnectionFactory(ConnectionFactory connectionFactory) {
-        this.connectionFactory = connectionFactory;
-    }
-
-    public Connection getConnection() throws JMSException {
-        if (connection == null) {
-            connection = createConnection();
-            connection.setExceptionListener(this);
-            connection.start();
-        }
-        return connection;
-    }
-
-    public void setConnection(Connection connection) {
-        this.connection = connection;
-    }
-
-    public Destination getCommandDestination() {
-        if (commandDestination == null) {
-            commandDestination = createCommandDestination();
-        }
-        return commandDestination;
-    }
-
-    public void setCommandDestination(Destination commandDestination) {
-        this.commandDestination = commandDestination;
-    }
-
-    protected Connection createConnection() throws JMSException {
-        return getConnectionFactory().createConnection(username, password);
-    }
-
-    protected Destination createCommandDestination() {
-        return AdvisorySupport.getAgentDestination();
-    }
-
-    public void onException(JMSException exception) {
-        try {
-            stop();
-        } catch (Exception e) {
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandHandler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandHandler.java
deleted file mode 100644
index 2f23667..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandHandler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.broker.util;
-
-import javax.jms.TextMessage;
-
-/**
- * Represents a processor of text based commands
- *
- * 
- */
-public interface CommandHandler {
-    void processCommand(TextMessage request, TextMessage response) throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java
deleted file mode 100644
index 5711886..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandMessageListener.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.io.IOException;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.util.FactoryFinder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class CommandMessageListener implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(CommandMessageListener.class);
-
-    private Session session;
-    private MessageProducer producer;
-    private CommandHandler handler;
-
-    public CommandMessageListener(Session session) {
-        this.session = session;
-    }
-
-    public void onMessage(Message message) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Received command: " + message);
-        }
-        if (message instanceof TextMessage) {
-            TextMessage request = (TextMessage)message;
-            try {
-                Destination replyTo = message.getJMSReplyTo();
-                if (replyTo == null) {
-                    LOG.warn("Ignored message as no JMSReplyTo set: " + message);
-                    return;
-                }
-                Message response = processCommand(request);
-                addReplyHeaders(request, response);
-                getProducer().send(replyTo, response);
-            } catch (Exception e) {
-                LOG.error("Failed to process message due to: " + e + ". Message: " + message, e);
-            }
-        } else {
-            LOG.warn("Ignoring invalid message: " + message);
-        }
-    }
-
-    protected void addReplyHeaders(TextMessage request, Message response) throws JMSException {
-        String correlationID = request.getJMSCorrelationID();
-        if (correlationID != null) {
-            response.setJMSCorrelationID(correlationID);
-        }
-    }
-
-    /**
-     * Processes an incoming JMS message returning the response message
-     */
-    public Message processCommand(TextMessage request) throws Exception {
-        TextMessage response = session.createTextMessage();
-        getHandler().processCommand(request, response);
-        return response;
-    }
-
-    /**
-     * Processes an incoming command from a console and returning the text to
-     * output
-     */
-    public String processCommandText(String line) throws Exception {
-        TextMessage request = new ActiveMQTextMessage();
-        request.setText(line);
-        TextMessage response = new ActiveMQTextMessage();
-        getHandler().processCommand(request, response);
-        return response.getText();
-    }
-
-    public Session getSession() {
-        return session;
-    }
-
-    public MessageProducer getProducer() throws JMSException {
-        if (producer == null) {
-            producer = getSession().createProducer(null);
-        }
-        return producer;
-    }
-
-    public CommandHandler getHandler() throws IllegalAccessException, IOException, InstantiationException, ClassNotFoundException {
-        if (handler == null) {
-            handler = createHandler();
-        }
-        return handler;
-    }
-
-    private CommandHandler createHandler() throws IllegalAccessException, IOException, ClassNotFoundException, InstantiationException {
-        FactoryFinder factoryFinder = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");
-        return (CommandHandler)factoryFinder.newInstance("agent");
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLog.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLog.java
deleted file mode 100644
index d047fc0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLog.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.broker.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DefaultAuditLog implements AuditLog {
-
-    private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit");
-
-    public void log(AuditLogEntry entry) {
-         LOG.info(entry.toString());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLogFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLogFactory.java
deleted file mode 100644
index 19cd150..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DefaultAuditLogFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.ServiceLoader;
-
-public class DefaultAuditLogFactory implements AuditLogFactory {
-
-    private ArrayList<AuditLog> auditLogs = new ArrayList<AuditLog>();
-
-    public DefaultAuditLogFactory() {
-        ServiceLoader<AuditLog> logs = ServiceLoader.load(AuditLog.class);
-
-        for (AuditLog log : logs) {
-            auditLogs.add(log);
-        }
-
-        // add default audit log if non was found
-        if (auditLogs.size() == 0) {
-            auditLogs.add(new DefaultAuditLog());
-        }
-    }
-
-    @Override
-    public List<AuditLog> getAuditLogs() {
-       return auditLogs;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DestinationPathSeparatorBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DestinationPathSeparatorBroker.java
deleted file mode 100644
index 3f35c85..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/DestinationPathSeparatorBroker.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.broker.util;
-
-import org.apache.activemq.broker.BrokerPluginSupport;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.*;
-import org.apache.activemq.filter.DestinationPath;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-/*
- * @org.apache.xbean.XBean element="destinationPathSeparatorPlugin"
- */
-
-public class DestinationPathSeparatorBroker extends BrokerPluginSupport {
-
-    String pathSeparator = "/";
-
-    protected ActiveMQDestination convertDestination(ActiveMQDestination destination) {
-        if (destination != null && destination.getPhysicalName().contains(pathSeparator)) {
-            List<String> l = new ArrayList<String>();
-            StringTokenizer iter = new StringTokenizer(destination.getPhysicalName(), pathSeparator);
-            while (iter.hasMoreTokens()) {
-                String name = iter.nextToken().trim();
-                if (name.length() == 0) {
-                    continue;
-                }
-                l.add(name);
-            }
-
-            String newName = DestinationPath.toString(l.toArray(new String[l.size()]));
-            return ActiveMQDestination.createDestination(newName, destination.getDestinationType());
-        } else {
-            return destination;
-        }
-    }
-
-
-    @Override
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        ack.setDestination(convertDestination(ack.getDestination()));
-        super.acknowledge(consumerExchange, ack);    
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        info.setDestination(convertDestination(info.getDestination()));
-        return super.addConsumer(context, info);    
-    }
-
-    @Override
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        info.setDestination(convertDestination(info.getDestination()));
-        super.addProducer(context, info);    
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        info.setDestination(convertDestination(info.getDestination()));
-        super.removeConsumer(context, info);    
-    }
-
-    @Override
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        info.setDestination(convertDestination(info.getDestination()));
-        super.removeProducer(context, info);    
-    }
-
-    @Override
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        messageSend.setDestination(convertDestination(messageSend.getDestination()));
-        super.send(producerExchange, messageSend);    
-    }
-
-    @Override
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination, boolean createIfTemporary) throws Exception {
-        return super.addDestination(context, convertDestination(destination), createIfTemporary);
-    }
-
-    @Override
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, convertDestination(destination), timeout);
-    }
-
-    @Override
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        info.setDestination(convertDestination(info.getDestination()));
-        super.addDestinationInfo(context, info);    
-    }
-
-    @Override
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        info.setDestination(convertDestination(info.getDestination()));
-        super.removeDestinationInfo(context, info);    
-    }
-
-    public void setPathSeparator(String pathSeparator) {
-        this.pathSeparator = pathSeparator;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/JMXAuditLogEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/JMXAuditLogEntry.java
deleted file mode 100644
index 4251756..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/JMXAuditLogEntry.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.util.Arrays;
-
-public class JMXAuditLogEntry extends AuditLogEntry {
-
-    @Override
-    public String toString() {
-        return user.trim() + " called " + operation + Arrays.toString((Object[])parameters.get("arguments")) + " at " + getFormattedTime();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
deleted file mode 100644
index 1291e9e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
+++ /dev/null
@@ -1,596 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.util.Set;
-import javax.annotation.PostConstruct;
-import org.apache.activemq.broker.BrokerPluginSupport;
-import org.apache.activemq.broker.Connection;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.usage.Usage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple Broker intercepter which allows you to enable/disable logging.
- * 
- * @org.apache.xbean.XBean
- */
-
-public class LoggingBrokerPlugin extends BrokerPluginSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(LoggingBrokerPlugin.class);
-
-    private boolean logAll = false;
-    private boolean logMessageEvents = false;
-    private boolean logConnectionEvents = true;
-    private boolean logTransactionEvents = false;
-    private boolean logConsumerEvents = false;
-    private boolean logProducerEvents = false;
-    private boolean logInternalEvents = false;
-
-    /**
-     * 
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void afterPropertiesSet() throws Exception {
-        LOG.info("Created LoggingBrokerPlugin: " + this.toString());
-    }
-
-    public boolean isLogAll() {
-        return logAll;
-    }
-
-    /**
-     * Logger all Events that go through the Plugin
-     */
-    public void setLogAll(boolean logAll) {
-        this.logAll = logAll;
-    }
-
-    public boolean isLogMessageEvents() {
-        return logMessageEvents;
-    }
-
-    /**
-     * Logger Events that are related to message processing
-     */
-    public void setLogMessageEvents(boolean logMessageEvents) {
-        this.logMessageEvents = logMessageEvents;
-    }
-
-    public boolean isLogConnectionEvents() {
-        return logConnectionEvents;
-    }
-
-    /**
-     * Logger Events that are related to connections and sessions
-     */
-    public void setLogConnectionEvents(boolean logConnectionEvents) {
-        this.logConnectionEvents = logConnectionEvents;
-    }
-
-    public boolean isLogTransactionEvents() {
-        return logTransactionEvents;
-    }
-
-    /**
-     * Logger Events that are related to transaction processing
-     */
-    public void setLogTransactionEvents(boolean logTransactionEvents) {
-        this.logTransactionEvents = logTransactionEvents;
-    }
-
-    public boolean isLogConsumerEvents() {
-        return logConsumerEvents;
-    }
-
-    /**
-     * Logger Events that are related to Consumers
-     */
-    public void setLogConsumerEvents(boolean logConsumerEvents) {
-        this.logConsumerEvents = logConsumerEvents;
-    }
-
-    public boolean isLogProducerEvents() {
-        return logProducerEvents;
-    }
-
-    /**
-     * Logger Events that are related to Producers
-     */
-    public void setLogProducerEvents(boolean logProducerEvents) {
-        this.logProducerEvents = logProducerEvents;
-    }
-
-    public boolean isLogInternalEvents() {
-        return logInternalEvents;
-    }
-
-    /**
-     * Logger Events that are normally internal to the broker
-     */
-    public void setLogInternalEvents(boolean logInternalEvents) {
-        this.logInternalEvents = logInternalEvents;
-    }
-
-    @Override
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Acknowledging message for client ID : " + consumerExchange.getConnectionContext().getClientId()
-                    + (ack.getMessageCount() == 1 ? ", " + ack.getLastMessageId() : ""));
-            if (LOG.isTraceEnabled() && ack.getMessageCount() > 1) {
-                LOG.trace("Message count: " + ack.getMessageCount() + ", First Message Id: " + ack.getFirstMessageId()
-                        + ", Last Message Id: " + ack.getLastMessageId());
-            }
-        }
-        super.acknowledge(consumerExchange, ack);
-    }
-
-    @Override
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
-        if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Message Pull from : " + context.getClientId() + " on " + pull.getDestination().getPhysicalName());
-        }
-        return super.messagePull(context, pull);
-    }
-
-    @Override
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        if (isLogAll() || isLogConnectionEvents()) {
-            LOG.info("Adding Connection : " + info);
-        }
-        super.addConnection(context, info);
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Adding Consumer : " + info);
-        }
-        return super.addConsumer(context, info);
-    }
-
-    @Override
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        if (isLogAll() || isLogProducerEvents()) {
-            LOG.info("Adding Producer :" + info);
-        }
-        super.addProducer(context, info);
-    }
-
-    @Override
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Commiting transaction : " + xid.getTransactionKey());
-        }
-        super.commitTransaction(context, xid, onePhase);
-    }
-
-    @Override
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Removing subscription : " + info);
-        }
-        super.removeSubscription(context, info);
-    }
-
-    @Override
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception {
-
-        TransactionId[] result = super.getPreparedTransactions(context);
-        if ((isLogAll() || isLogTransactionEvents()) && result != null) {
-            StringBuffer tids = new StringBuffer();
-            for (TransactionId tid : result) {
-                if (tids.length() > 0) {
-                    tids.append(", ");
-                }
-                tids.append(tid.getTransactionKey());
-            }
-            LOG.info("Prepared transactions : " + tids);
-        }
-        return result;
-    }
-
-    @Override
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Preparing transaction : " + xid.getTransactionKey());
-        }
-        return super.prepareTransaction(context, xid);
-    }
-
-    @Override
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        if (isLogAll() || isLogConnectionEvents()) {
-            LOG.info("Removing Connection : " + info);
-        }
-        super.removeConnection(context, info, error);
-    }
-
-    @Override
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        if (isLogAll() || isLogConsumerEvents()) {
-            LOG.info("Removing Consumer : " + info);
-        }
-        super.removeConsumer(context, info);
-    }
-
-    @Override
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        if (isLogAll() || isLogProducerEvents()) {
-            LOG.info("Removing Producer : " + info);
-        }
-        super.removeProducer(context, info);
-    }
-
-    @Override
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Rolling back Transaction : " + xid.getTransactionKey());
-        }
-        super.rollbackTransaction(context, xid);
-    }
-
-    @Override
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        if (isLogAll() || isLogProducerEvents()) {
-            LOG.info("Sending message : " + messageSend.copy());
-        }
-        super.send(producerExchange, messageSend);
-    }
-
-    @Override
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Beginning transaction : " + xid.getTransactionKey());
-        }
-        super.beginTransaction(context, xid);
-    }
-
-    @Override
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception {
-        if (isLogAll() || isLogTransactionEvents()) {
-            LOG.info("Forgetting transaction : " + transactionId.getTransactionKey());
-        }
-        super.forgetTransaction(context, transactionId);
-    }
-
-    @Override
-    public Connection[] getClients() throws Exception {
-        Connection[] result = super.getClients();
-
-        if (isLogAll() || isLogInternalEvents()) {
-            if (result == null) {
-                LOG.info("Get Clients returned empty list.");
-            } else {
-                StringBuffer cids = new StringBuffer();
-                for (Connection c : result) {
-                    cids.append(cids.length() > 0 ? ", " : "");
-                    cids.append(c.getConnectionId());
-                }
-                LOG.info("Connected clients : " + cids);
-            }
-        }
-        return super.getClients();
-    }
-
-    @Override
-    public org.apache.activemq.broker.region.Destination addDestination(ConnectionContext context,
-            ActiveMQDestination destination, boolean create) throws Exception {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Adding destination : " + destination.getDestinationTypeAsString() + ":"
-                    + destination.getPhysicalName());
-        }
-        return super.addDestination(context, destination, create);
-    }
-
-    @Override
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout)
-            throws Exception {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Removing destination : " + destination.getDestinationTypeAsString() + ":"
-                    + destination.getPhysicalName());
-        }
-        super.removeDestination(context, destination, timeout);
-    }
-
-    @Override
-    public ActiveMQDestination[] getDestinations() throws Exception {
-        ActiveMQDestination[] result = super.getDestinations();
-        if (isLogAll() || isLogInternalEvents()) {
-            if (result == null) {
-                LOG.info("Get Destinations returned empty list.");
-            } else {
-                StringBuffer destinations = new StringBuffer();
-                for (ActiveMQDestination dest : result) {
-                    destinations.append(destinations.length() > 0 ? ", " : "");
-                    destinations.append(dest.getPhysicalName());
-                }
-                LOG.info("Get Destinations : " + destinations);
-            }
-        }
-        return result;
-    }
-
-    @Override
-    public void start() throws Exception {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Starting " + getBrokerName());
-        }
-        super.start();
-    }
-
-    @Override
-    public void stop() throws Exception {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Stopping " + getBrokerName());
-        }
-        super.stop();
-    }
-
-    @Override
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-        if (isLogAll() || isLogConnectionEvents()) {
-            LOG.info("Adding Session : " + info);
-        }
-        super.addSession(context, info);
-    }
-
-    @Override
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-        if (isLogAll() || isLogConnectionEvents()) {
-            LOG.info("Removing Session : " + info);
-        }
-        super.removeSession(context, info);
-    }
-
-    @Override
-    public void addBroker(Connection connection, BrokerInfo info) {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Adding Broker " + info.getBrokerName());
-        }
-        super.addBroker(connection, info);
-    }
-
-    @Override
-    public void removeBroker(Connection connection, BrokerInfo info) {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Removing Broker " + info.getBrokerName());
-        }
-        super.removeBroker(connection, info);
-    }
-
-    @Override
-    public BrokerInfo[] getPeerBrokerInfos() {
-        BrokerInfo[] result = super.getPeerBrokerInfos();
-        if (isLogAll() || isLogInternalEvents()) {
-            if (result == null) {
-                LOG.info("Get Peer Broker Infos returned empty list.");
-            } else {
-                StringBuffer peers = new StringBuffer();
-                for (BrokerInfo bi : result) {
-                    peers.append(peers.length() > 0 ? ", " : "");
-                    peers.append(bi.getBrokerName());
-                }
-                LOG.info("Get Peer Broker Infos : " + peers);
-            }
-        }
-        return result;
-    }
-
-    @Override
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-        if (isLogAll() || isLogInternalEvents() || isLogConsumerEvents()) {
-            LOG.info("preProcessDispatch :" + messageDispatch);
-        }
-        super.preProcessDispatch(messageDispatch);
-    }
-
-    @Override
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-        if (isLogAll() || isLogInternalEvents() || isLogConsumerEvents()) {
-            LOG.info("postProcessDispatch :" + messageDispatch);
-        }
-        super.postProcessDispatch(messageDispatch);
-    }
-
-    @Override
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        if (isLogAll() || isLogInternalEvents() || isLogConsumerEvents()) {
-            LOG.info("ProcessDispatchNotification :" + messageDispatchNotification);
-        }
-        super.processDispatchNotification(messageDispatchNotification);
-    }
-
-    @Override
-    public Set<ActiveMQDestination> getDurableDestinations() {
-        Set<ActiveMQDestination> result = super.getDurableDestinations();
-        if (isLogAll() || isLogInternalEvents()) {
-            if (result == null) {
-                LOG.info("Get Durable Destinations returned empty list.");
-            } else {
-                StringBuffer destinations = new StringBuffer();
-                for (ActiveMQDestination dest : result) {
-                    destinations.append(destinations.length() > 0 ? ", " : "");
-                    destinations.append(dest.getPhysicalName());
-                }
-                LOG.info("Get Durable Destinations : " + destinations);
-            }
-        }
-        return result;
-    }
-
-    @Override
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Adding destination info : " + info);
-        }
-        super.addDestinationInfo(context, info);
-    }
-
-    @Override
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Removing destination info : " + info);
-        }
-        super.removeDestinationInfo(context, info);
-    }
-
-    @Override
-    public void messageExpired(ConnectionContext context, MessageReference message, Subscription subscription) {
-        if (isLogAll() || isLogInternalEvents()) {
-            String msg = "Unable to display message.";
-
-            msg = message.getMessage().toString();
-
-            LOG.info("Message has expired : " + msg);
-        }
-        super.messageExpired(context, message, subscription);
-    }
-
-    @Override
-    public void sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference,
-                                      Subscription subscription) {
-        if (isLogAll() || isLogInternalEvents()) {
-            String msg = "Unable to display message.";
-
-            msg = messageReference.getMessage().toString();
-
-            LOG.info("Sending to DLQ : " + msg);
-        }
-        super.sendToDeadLetterQueue(context, messageReference, subscription);
-    }
-
-    @Override
-    public void fastProducer(ConnectionContext context, ProducerInfo producerInfo) {
-        if (isLogAll() || isLogProducerEvents() || isLogInternalEvents()) {
-            LOG.info("Fast Producer : " + producerInfo);
-        }
-        super.fastProducer(context, producerInfo);
-    }
-
-    @Override
-    public void isFull(ConnectionContext context, Destination destination, Usage usage) {
-        if (isLogAll() || isLogProducerEvents() || isLogInternalEvents()) {
-            LOG.info("Destination is full : " + destination.getName());
-        }
-        super.isFull(context, destination, usage);
-    }
-
-    @Override
-    public void messageConsumed(ConnectionContext context, MessageReference messageReference) {
-        if (isLogAll() || isLogConsumerEvents() || isLogInternalEvents()) {
-            String msg = "Unable to display message.";
-
-            msg = messageReference.getMessage().toString();
-
-            LOG.info("Message consumed : " + msg);
-        }
-        super.messageConsumed(context, messageReference);
-    }
-
-    @Override
-    public void messageDelivered(ConnectionContext context, MessageReference messageReference) {
-        if (isLogAll() || isLogConsumerEvents() || isLogInternalEvents()) {
-            String msg = "Unable to display message.";
-
-            msg = messageReference.getMessage().toString();
-
-            LOG.info("Message delivered : " + msg);
-        }
-        super.messageDelivered(context, messageReference);
-    }
-
-    @Override
-    public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference) {
-        if (isLogAll() || isLogInternalEvents()) {
-            String msg = "Unable to display message.";
-
-            msg = messageReference.getMessage().toString();
-
-            LOG.info("Message discarded : " + msg);
-        }
-        super.messageDiscarded(context, sub, messageReference);
-    }
-
-    @Override
-    public void slowConsumer(ConnectionContext context, Destination destination, Subscription subs) {
-        if (isLogAll() || isLogConsumerEvents() || isLogInternalEvents()) {
-            LOG.info("Detected slow consumer on " + destination.getName());
-            StringBuffer buf = new StringBuffer("Connection(");
-            buf.append(subs.getConsumerInfo().getConsumerId().getConnectionId());
-            buf.append(") Session(");
-            buf.append(subs.getConsumerInfo().getConsumerId().getSessionId());
-            buf.append(")");
-            LOG.info(buf.toString());
-        }
-        super.slowConsumer(context, destination, subs);
-    }
-
-    @Override
-    public void nowMasterBroker() {
-        if (isLogAll() || isLogInternalEvents()) {
-            LOG.info("Is now the master broker : " + getBrokerName());
-        }
-        super.nowMasterBroker();
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append("LoggingBrokerPlugin(");
-        buf.append("logAll=");
-        buf.append(isLogAll());
-        buf.append(", logConnectionEvents=");
-        buf.append(isLogConnectionEvents());
-        buf.append(", logConsumerEvents=");
-        buf.append(isLogConsumerEvents());
-        buf.append(", logProducerEvents=");
-        buf.append(isLogProducerEvents());
-        buf.append(", logMessageEvents=");
-        buf.append(isLogMessageEvents());
-        buf.append(", logTransactionEvents=");
-        buf.append(isLogTransactionEvents());
-        buf.append(", logInternalEvents=");
-        buf.append(isLogInternalEvents());
-        buf.append(")");
-        return buf.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/MulticastTraceBrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/MulticastTraceBrokerPlugin.java
deleted file mode 100644
index 07152a3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/MulticastTraceBrokerPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.io.IOException;
-import java.net.DatagramSocket;
-import java.net.MulticastSocket;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- * A Broker interceptor which allows you to trace all operations to a Multicast
- * socket.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class MulticastTraceBrokerPlugin extends UDPTraceBrokerPlugin {
-
-    private int timeToLive = 1;
-
-    public MulticastTraceBrokerPlugin() {
-        try {
-            destination = new URI("multicast://224.1.2.3:61616");
-        } catch (URISyntaxException wontHappen) {
-        }
-    }
-
-    protected DatagramSocket createSocket() throws IOException {
-        MulticastSocket s = new MulticastSocket();
-        s.setSendBufferSize(maxTraceDatagramSize);
-        s.setBroadcast(broadcast);
-        s.setLoopbackMode(true);
-        s.setTimeToLive(timeToLive);
-        return s;
-    }
-
-    public int getTimeToLive() {
-        return timeToLive;
-    }
-
-    public void setTimeToLive(int timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java
deleted file mode 100644
index 48d5c87..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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.broker.util;
-
-import org.apache.activemq.broker.BrokerPluginSupport;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.command.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Broker interceptor which updates a JMS Client's timestamp on the message
- * with a broker timestamp. Useful when the clocks on client machines are known
- * to not be correct and you can only trust the time set on the broker machines.
- * 
- * Enabling this plugin will break JMS compliance since the timestamp that the
- * producer sees on the messages after as send() will be different from the
- * timestamp the consumer will observe when he receives the message. This plugin
- * is not enabled in the default ActiveMQ configuration.
- * 
- * 2 new attributes have been added which will allow the administrator some override control
- * over the expiration time for incoming messages:
- *
- * Attribute 'zeroExpirationOverride' can be used to apply an expiration
- * time to incoming messages with no expiration defined (messages that would never expire)
- *
- * Attribute 'ttlCeiling' can be used to apply a limit to the expiration time
- *
- * @org.apache.xbean.XBean element="timeStampingBrokerPlugin"
- * 
- * 
- */
-public class TimeStampingBrokerPlugin extends BrokerPluginSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(TimeStampingBrokerPlugin.class);
-    /** 
-    * variable which (when non-zero) is used to override
-    * the expiration date for messages that arrive with
-    * no expiration date set (in Milliseconds).
-    */
-    long zeroExpirationOverride = 0;
-
-    /** 
-    * variable which (when non-zero) is used to limit
-    * the expiration date (in Milliseconds).  
-    */
-    long ttlCeiling = 0;
-    
-    /**
-     * If true, the plugin will not update timestamp to past values
-     * False by default
-     */
-    boolean futureOnly = false;
-    
-    
-    /**
-     * if true, update timestamp even if message has passed through a network
-     * default false
-     */
-    boolean processNetworkMessages = false;
-
-    /** 
-    * setter method for zeroExpirationOverride
-    */
-    public void setZeroExpirationOverride(long ttl)
-    {
-        this.zeroExpirationOverride = ttl;
-    }
-
-    /** 
-    * setter method for ttlCeiling
-    */
-    public void setTtlCeiling(long ttlCeiling)
-    {
-        this.ttlCeiling = ttlCeiling;
-    }
-
-	public void setFutureOnly(boolean futureOnly) {
-		this.futureOnly = futureOnly;
-	}
-	
-	public void setProcessNetworkMessages(Boolean processNetworkMessages) {
-	    this.processNetworkMessages = processNetworkMessages;
-	}
-
-	@Override
-    public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception {
-        if (message.getTimestamp() > 0
-            && (processNetworkMessages || (message.getBrokerPath() == null || message.getBrokerPath().length == 0))) {
-            // timestamp not been disabled and has not passed through a network or processNetworkMessages=true
-            long oldExpiration = message.getExpiration();
-            long newTimeStamp = System.currentTimeMillis();
-            long timeToLive = zeroExpirationOverride;
-            long oldTimestamp = message.getTimestamp();
-            if (oldExpiration > 0) {
-                timeToLive = oldExpiration - oldTimestamp;
-            }
-            if (timeToLive > 0 && ttlCeiling > 0 && timeToLive > ttlCeiling) {
-                timeToLive = ttlCeiling;
-            }
-            long expiration = timeToLive + newTimeStamp;
-			//In the scenario that the Broker is behind the clients we never want to set the Timestamp and Expiration in the past 
-			if(!futureOnly || (expiration > oldExpiration)) {
-				if (timeToLive > 0 && expiration > 0) {
-					message.setExpiration(expiration);
-				}
-				message.setTimestamp(newTimeStamp);
-				if (LOG.isDebugEnabled()) {
-				    LOG.debug("Set message " + message.getMessageId() + " timestamp from " + oldTimestamp + " to " + newTimeStamp);
-				}
-			}
-        }
-        super.send(producerExchange, message);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java
deleted file mode 100644
index 64864cc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/TraceBrokerPathPlugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.activemq.broker.BrokerPluginSupport;
-import org.apache.activemq.command.MessageDispatch;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The TraceBrokerPathPlugin can be used in a network of Brokers. Each Broker 
- * that has the plugin configured, will add it's brokerName to the content 
- * of a JMS Property. If all Brokers have this property enabled, the path the 
- * message actually took through the network can be seen in the defined property.
- * 
- * @org.apache.xbean.XBean element="traceBrokerPathPlugin"
- * 
- * 
- */
-
-public class TraceBrokerPathPlugin extends BrokerPluginSupport {
-
-	private String stampProperty = "BrokerPath";
-    private static final Logger LOG = LoggerFactory.getLogger(TraceBrokerPathPlugin.class);
-	
-	public String getStampProperty() {
-		return stampProperty;
-	}
-
-	public void setStampProperty(String stampProperty) {
-		this.stampProperty = stampProperty;
-	}
-
-	public void preProcessDispatch(MessageDispatch messageDispatch) {
-		try {
-    		String brokerStamp = (String)messageDispatch.getMessage().getProperty(getStampProperty());
-    		if (brokerStamp == null) {
-    			brokerStamp = getBrokerName();
-    		} else {
-    			brokerStamp += "," + getBrokerName();
-    		}
-    		messageDispatch.getMessage().setProperty(getStampProperty(), brokerStamp);
-		} catch (IOException ioe) {
-			LOG.warn("Setting broker property failed " + ioe, ioe);
-		}
-		super.preProcessDispatch(messageDispatch);
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java
deleted file mode 100644
index dd35ab6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/UDPTraceBrokerPlugin.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-
-import org.apache.activemq.broker.BrokerPluginSupport;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.openwire.OpenWireFormatFactory;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.wireformat.WireFormatFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Broker interceptor which allows you to trace all operations to a UDP
- * socket.
- * 
- * @org.apache.xbean.XBean element="udpTraceBrokerPlugin"
- * 
- */
-public class UDPTraceBrokerPlugin extends BrokerPluginSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(UDPTraceBrokerPlugin.class);
-    protected WireFormat wireFormat;
-    protected WireFormatFactory wireFormatFactory;
-    protected int maxTraceDatagramSize = 1024 * 4;
-    protected URI destination;
-    protected DatagramSocket socket;
-
-    protected BrokerId brokerId;
-    protected SocketAddress address;
-    protected boolean broadcast;
-
-    public UDPTraceBrokerPlugin() {
-        try {
-            destination = new URI("udp://127.0.0.1:61616");
-        } catch (URISyntaxException wontHappen) {
-        }
-    }
-
-    public void start() throws Exception {
-        super.start();
-        if (getWireFormat() == null) {
-            throw new IllegalArgumentException("Wireformat must be specifed.");
-        }
-        if (address == null) {
-            address = createSocketAddress(destination);
-        }
-        socket = createSocket();
-
-        brokerId = super.getBrokerId();
-        trace(new JournalTrace("START"));
-    }
-
-    protected DatagramSocket createSocket() throws IOException {
-        DatagramSocket s = new DatagramSocket();
-        s.setSendBufferSize(maxTraceDatagramSize);
-        s.setBroadcast(broadcast);
-        return s;
-    }
-
-    public void stop() throws Exception {
-        trace(new JournalTrace("STOP"));
-        socket.close();
-        super.stop();
-    }
-
-    private void trace(DataStructure command) {
-        try {
-
-            ByteArrayOutputStream baos = new ByteArrayOutputStream(maxTraceDatagramSize);
-            DataOutputStream out = new DataOutputStream(baos);
-            wireFormat.marshal(brokerId, out);
-            wireFormat.marshal(command, out);
-            out.close();
-            ByteSequence sequence = baos.toByteSequence();
-            DatagramPacket datagram = new DatagramPacket(sequence.getData(), sequence.getOffset(), sequence.getLength(), address);
-            socket.send(datagram);
-
-        } catch (Throwable e) {
-            LOG.debug("Failed to trace: " + command, e);
-        }
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        trace(messageSend);
-        super.send(producerExchange, messageSend);
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
-        trace(ack);
-        super.acknowledge(consumerExchange, ack);
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        trace(info);
-        super.addConnection(context, info);
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        trace(info);
-        return super.addConsumer(context, info);
-    }
-
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        trace(info);
-        super.addDestinationInfo(context, info);
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        trace(info);
-        super.addProducer(context, info);
-    }
-
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
-        trace(info);
-        super.addSession(context, info);
-    }
-
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        trace(new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.BEGIN));
-        super.beginTransaction(context, xid);
-    }
-
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
-        trace(new TransactionInfo(context.getConnectionId(), xid, onePhase ? TransactionInfo.COMMIT_ONE_PHASE : TransactionInfo.COMMIT_TWO_PHASE));
-        super.commitTransaction(context, xid, onePhase);
-    }
-
-    public void forgetTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        trace(new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.FORGET));
-        super.forgetTransaction(context, xid);
-    }
-
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception {
-        trace(pull);
-        return super.messagePull(context, pull);
-    }
-
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        trace(new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.PREPARE));
-        return super.prepareTransaction(context, xid);
-    }
-
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-        trace(messageDispatch);
-        super.postProcessDispatch(messageDispatch);
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
-        trace(messageDispatchNotification);
-        super.processDispatchNotification(messageDispatchNotification);
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        trace(info.createRemoveCommand());
-        super.removeConnection(context, info, error);
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        trace(info.createRemoveCommand());
-        super.removeConsumer(context, info);
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, destination, timeout);
-    }
-
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        trace(info);
-        super.removeDestinationInfo(context, info);
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        trace(info.createRemoveCommand());
-        super.removeProducer(context, info);
-    }
-
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
-        trace(info.createRemoveCommand());
-        super.removeSession(context, info);
-    }
-
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
-        trace(info);
-        super.removeSubscription(context, info);
-    }
-
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
-        trace(new TransactionInfo(context.getConnectionId(), xid, TransactionInfo.ROLLBACK));
-        super.rollbackTransaction(context, xid);
-    }
-
-    public WireFormat getWireFormat() {
-        if (wireFormat == null) {
-            wireFormat = createWireFormat();
-        }
-        return wireFormat;
-    }
-
-    protected WireFormat createWireFormat() {
-        return getWireFormatFactory().createWireFormat();
-    }
-
-    public void setWireFormat(WireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-    }
-
-    public WireFormatFactory getWireFormatFactory() {
-        if (wireFormatFactory == null) {
-            wireFormatFactory = createWireFormatFactory();
-        }
-        return wireFormatFactory;
-    }
-
-    protected OpenWireFormatFactory createWireFormatFactory() {
-        OpenWireFormatFactory wf = new OpenWireFormatFactory();
-        wf.setCacheEnabled(false);
-        wf.setVersion(1);
-        wf.setTightEncodingEnabled(true);
-        wf.setSizePrefixDisabled(true);
-        return wf;
-    }
-
-    public void setWireFormatFactory(WireFormatFactory wireFormatFactory) {
-        this.wireFormatFactory = wireFormatFactory;
-    }
-
-    protected SocketAddress createSocketAddress(URI location) throws UnknownHostException {
-        InetAddress a = InetAddress.getByName(location.getHost());
-        int port = location.getPort();
-        return new InetSocketAddress(a, port);
-    }
-
-    public URI getDestination() {
-        return destination;
-    }
-
-    public void setDestination(URI destination) {
-        this.destination = destination;
-    }
-
-    public int getMaxTraceDatagramSize() {
-        return maxTraceDatagramSize;
-    }
-
-    public void setMaxTraceDatagramSize(int maxTraceDatagramSize) {
-        this.maxTraceDatagramSize = maxTraceDatagramSize;
-    }
-
-    public boolean isBroadcast() {
-        return broadcast;
-    }
-
-    public void setBroadcast(boolean broadcast) {
-        this.broadcast = broadcast;
-    }
-
-    public SocketAddress getAddress() {
-        return address;
-    }
-
-    public void setAddress(SocketAddress address) {
-        this.address = address;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/package.html
deleted file mode 100755
index 72c5da2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Some utility Broker Plugins
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java
deleted file mode 100644
index 75f1c1e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/**
- * 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.broker.view;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.filter.DestinationMapNode;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import javax.management.ObjectName;
-
-/**
- * 
- */
-public class ConnectionDotFileInterceptor extends DotFileInterceptorSupport {
-
-    protected static final String ID_SEPARATOR = "_";
-
-    private final boolean redrawOnRemove;
-    private boolean clearProducerCacheAfterRender;
-    private String domain = "org.apache.activemq";
-    private BrokerViewMBean brokerView;
-
-    // until we have some MBeans for producers, lets do it all ourselves
-    private Map<ProducerId, ProducerInfo> producers = new HashMap<ProducerId, ProducerInfo>();
-    private Map<ProducerId, Set<ActiveMQDestination>> producerDestinations = new HashMap<ProducerId, Set<ActiveMQDestination>>();
-    private Object lock = new Object();
-
-    public ConnectionDotFileInterceptor(Broker next, String file, boolean redrawOnRemove) throws IOException {
-        super(next, file);
-        this.redrawOnRemove = redrawOnRemove;
-        
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        Subscription answer = super.addConsumer(context, info);
-        generateFile();
-        return answer;
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        super.addProducer(context, info);
-        ProducerId producerId = info.getProducerId();
-        synchronized (lock) {
-            producers.put(producerId, info);
-        }
-        generateFile();
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-        super.removeConsumer(context, info);
-        if (redrawOnRemove) {
-            generateFile();
-        }
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-        super.removeProducer(context, info);
-        ProducerId producerId = info.getProducerId();
-        if (redrawOnRemove) {
-            synchronized (lock) {
-                producerDestinations.remove(producerId);
-                producers.remove(producerId);
-            }
-            generateFile();
-        }
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        super.send(producerExchange, messageSend);
-        ProducerId producerId = messageSend.getProducerId();
-        ActiveMQDestination destination = messageSend.getDestination();
-        synchronized (lock) {
-            Set<ActiveMQDestination> destinations = producerDestinations.get(producerId);
-            if (destinations == null) {
-                destinations = new HashSet<ActiveMQDestination>();
-            }
-            producerDestinations.put(producerId, destinations);
-            destinations.add(destination);
-        }
-    }
-
-    protected void generateFile(PrintWriter writer) throws Exception {
-
-        writer.println("digraph \"ActiveMQ Connections\" {");
-        writer.println();
-        writer.println("label=\"ActiveMQ Broker: " + getBrokerView().getBrokerId() + "\"];");
-        writer.println();
-        writer.println("node [style = \"rounded,filled\", fillcolor = yellow, fontname=\"Helvetica-Oblique\"];");
-        writer.println();
-
-        Map<String, String> clients = new HashMap<String, String>();
-        Map<String, String> queues = new HashMap<String, String>();
-        Map<String, String> topics = new HashMap<String, String>();
-
-        printSubscribers(writer, clients, queues, "queue_", getBrokerView().getQueueSubscribers());
-        writer.println();
-
-        printSubscribers(writer, clients, topics, "topic_", getBrokerView().getTopicSubscribers());
-        writer.println();
-
-        printProducers(writer, clients, queues, topics);
-        writer.println();
-
-        writeLabels(writer, "green", "Client: ", clients);
-        writer.println();
-
-        writeLabels(writer, "red", "Queue: ", queues);
-        writeLabels(writer, "blue", "Topic: ", topics);
-        writer.println("}");
-
-        if (clearProducerCacheAfterRender) {
-            producerDestinations.clear();
-        }
-    }
-
-    protected void printProducers(PrintWriter writer, Map<String, String> clients, Map<String, String> queues, Map<String, String> topics) {
-        synchronized (lock) {
-            for (Iterator iter = producerDestinations.entrySet().iterator(); iter.hasNext();) {
-                Map.Entry entry = (Map.Entry)iter.next();
-                ProducerId producerId = (ProducerId)entry.getKey();
-                Set destinationSet = (Set)entry.getValue();
-                printProducers(writer, clients, queues, topics, producerId, destinationSet);
-            }
-        }
-    }
-
-    protected void printProducers(PrintWriter writer, Map<String, String> clients, Map<String, String> queues, Map<String, String> topics, ProducerId producerId, Set destinationSet) {
-        for (Iterator iter = destinationSet.iterator(); iter.hasNext();) {
-            ActiveMQDestination destination = (ActiveMQDestination)iter.next();
-
-            // TODO use clientId one day
-            String clientId = producerId.getConnectionId();
-            String safeClientId = asID(clientId);
-            clients.put(safeClientId, clientId);
-
-            String physicalName = destination.getPhysicalName();
-            String safeDestinationId = asID(physicalName);
-            if (destination.isTopic()) {
-                safeDestinationId = "topic_" + safeDestinationId;
-                topics.put(safeDestinationId, physicalName);
-            } else {
-                safeDestinationId = "queue_" + safeDestinationId;
-                queues.put(safeDestinationId, physicalName);
-            }
-
-            String safeProducerId = asID(producerId.toString());
-
-            // lets write out the links
-
-            writer.print(safeClientId);
-            writer.print(" -> ");
-            writer.print(safeProducerId);
-            writer.println(";");
-
-            writer.print(safeProducerId);
-            writer.print(" -> ");
-            writer.print(safeDestinationId);
-            writer.println(";");
-
-            // now lets write out the label
-            writer.print(safeProducerId);
-            writer.print(" [label = \"");
-            String label = "Producer: " + producerId.getSessionId() + "-" + producerId.getValue();
-            writer.print(label);
-            writer.println("\"];");
-
-        }
-    }
-
-    protected void printSubscribers(PrintWriter writer, Map<String, String> clients, Map<String, String> destinations, String type, ObjectName[] subscribers) {
-        for (int i = 0; i < subscribers.length; i++) {
-            ObjectName name = subscribers[i];
-            SubscriptionViewMBean subscriber = (SubscriptionViewMBean)getBrokerService().getManagementContext().newProxyInstance(name, SubscriptionViewMBean.class, true);
-
-            String clientId = subscriber.getClientId();
-            String safeClientId = asID(clientId);
-            clients.put(safeClientId, clientId);
-
-            String destination = subscriber.getDestinationName();
-            String safeDestinationId = type + asID(destination);
-            destinations.put(safeDestinationId, destination);
-
-            String selector = subscriber.getSelector();
-
-            // lets write out the links
-            String subscriberId = safeClientId + "_" + subscriber.getSessionId() + "_" + subscriber.getSubcriptionId();
-
-            writer.print(subscriberId);
-            writer.print(" -> ");
-            writer.print(safeClientId);
-            writer.println(";");
-
-            writer.print(safeDestinationId);
-            writer.print(" -> ");
-            writer.print(subscriberId);
-            writer.println(";");
-
-            // now lets write out the label
-            writer.print(subscriberId);
-            writer.print(" [label = \"");
-            String label = "Subscription: " + subscriber.getSessionId() + "-" + subscriber.getSubcriptionId();
-            if (selector != null && selector.length() > 0) {
-                label = label + "\\nSelector: " + selector;
-            }
-            writer.print(label);
-            writer.println("\"];");
-        }
-    }
-
-    protected void writeLabels(PrintWriter writer, String color, String prefix, Map<String, String> map) {
-        for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            String id = (String)entry.getKey();
-            String label = (String)entry.getValue();
-
-            writer.print(id);
-            writer.print(" [ fillcolor = ");
-            writer.print(color);
-            writer.print(", label = \"");
-            writer.print(prefix);
-            writer.print(label);
-            writer.println("\"];");
-        }
-    }
-
-    /**
-     * Lets strip out any non supported characters
-     */
-    protected String asID(String name) {
-        StringBuffer buffer = new StringBuffer();
-        int size = name.length();
-        for (int i = 0; i < size; i++) {
-            char ch = name.charAt(i);
-            if (Character.isLetterOrDigit(ch) || ch == '_') {
-                buffer.append(ch);
-            } else {
-                buffer.append('_');
-            }
-        }
-        return buffer.toString();
-    }
-
-    protected void printNodes(PrintWriter writer, DestinationMapNode node, String prefix) {
-        String path = getPath(node);
-        writer.print("  ");
-        writer.print(prefix);
-        writer.print(ID_SEPARATOR);
-        writer.print(path);
-        String label = path;
-        if (prefix.equals("topic")) {
-            label = "Topics";
-        } else if (prefix.equals("queue")) {
-            label = "Queues";
-        }
-        writer.print("[ label = \"");
-        writer.print(label);
-        writer.println("\" ];");
-
-        Collection children = node.getChildren();
-        for (Iterator iter = children.iterator(); iter.hasNext();) {
-            DestinationMapNode child = (DestinationMapNode)iter.next();
-            printNodes(writer, child, prefix + ID_SEPARATOR + path);
-        }
-    }
-
-    protected void printNodeLinks(PrintWriter writer, DestinationMapNode node, String prefix) {
-        String path = getPath(node);
-        Collection children = node.getChildren();
-        for (Iterator iter = children.iterator(); iter.hasNext();) {
-            DestinationMapNode child = (DestinationMapNode)iter.next();
-
-            writer.print("  ");
-            writer.print(prefix);
-            writer.print(ID_SEPARATOR);
-            writer.print(path);
-            writer.print(" -> ");
-            writer.print(prefix);
-            writer.print(ID_SEPARATOR);
-            writer.print(path);
-            writer.print(ID_SEPARATOR);
-            writer.print(getPath(child));
-            writer.println(";");
-
-            printNodeLinks(writer, child, prefix + ID_SEPARATOR + path);
-        }
-    }
-
-    protected String getPath(DestinationMapNode node) {
-        String path = node.getPath();
-        if (path.equals("*")) {
-            return "root";
-        }
-        return path;
-    }
-    
-    BrokerViewMBean getBrokerView() throws Exception {
-        if (this.brokerView == null) {
-            ObjectName brokerName = getBrokerService().getBrokerObjectName();
-            this.brokerView = (BrokerViewMBean) getBrokerService().getManagementContext().newProxyInstance(brokerName,
-                    BrokerViewMBean.class, true);
-        }
-        return this.brokerView;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFilePlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFilePlugin.java
deleted file mode 100644
index 5693c00..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFilePlugin.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.broker.view;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-
-/**
- * A <a href="http://www.graphviz.org/">DOT</a> file creator plugin which
- * creates a DOT file showing the current connections
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class ConnectionDotFilePlugin implements BrokerPlugin {
-    private String file = "ActiveMQConnections.dot";
-    private boolean redrawOnRemove;
-
-    public Broker installPlugin(Broker broker) throws Exception {
-        return new ConnectionDotFileInterceptor(broker, file, redrawOnRemove);
-    }
-
-    public String getFile() {
-        return file;
-    }
-
-    /**
-     * Sets the destination file name to create the destination diagram
-     */
-    public void setFile(String file) {
-        this.file = file;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java
deleted file mode 100644
index edf3c2c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.broker.view;
-
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Iterator;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.filter.DestinationMap;
-import org.apache.activemq.filter.DestinationMapNode;
-
-/**
- * 
- */
-public class DestinationDotFileInterceptor extends DotFileInterceptorSupport {
-
-    protected static final String ID_SEPARATOR = "_";
-
-    public DestinationDotFileInterceptor(Broker next, String file) {
-        super(next, file);
-    }
-
-    @Override
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean create) throws Exception {
-        Destination answer = super.addDestination(context, destination,create);
-        generateFile();
-        return answer;
-    }
-
-    @Override
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-        super.removeDestination(context, destination, timeout);
-        generateFile();
-    }
-
-    @Override
-    protected void generateFile(PrintWriter writer) throws Exception {
-        ActiveMQDestination[] destinations = getDestinations();
-
-        // lets split into a tree
-        DestinationMap map = new DestinationMap();
-
-        for (int i = 0; i < destinations.length; i++) {
-            ActiveMQDestination destination = destinations[i];
-            map.put(destination, destination);
-        }
-
-        // now lets navigate the tree
-        writer.println("digraph \"ActiveMQ Destinations\" {");
-        writer.println();
-        writer.println("node [style = \"rounded,filled\", fontname=\"Helvetica-Oblique\"];");
-        writer.println();
-        writer.println("topic_root [fillcolor = deepskyblue, label = \"Topics\" ];");
-        writer.println("queue_root [fillcolor = deepskyblue, label = \"Queues\" ];");
-        writer.println();
-
-        writer.println("subgraph queues {");
-        writer.println("  node [fillcolor=red];     ");
-        writer.println("  label = \"Queues\"");
-        writer.println();
-        printNodeLinks(writer, map.getQueueRootNode(), "queue");
-        writer.println("}");
-        writer.println();
-
-        writer.println("subgraph temp queues {");
-        writer.println("  node [fillcolor=red];     ");
-        writer.println("  label = \"TempQueues\"");
-        writer.println();
-        printNodeLinks(writer, map.getTempQueueRootNode(), "tempqueue");
-        writer.println("}");
-        writer.println();
-
-        writer.println("subgraph topics {");
-        writer.println("  node [fillcolor=green];     ");
-        writer.println("  label = \"Topics\"");
-        writer.println();
-        printNodeLinks(writer, map.getTopicRootNode(), "topic");
-        writer.println("}");
-        writer.println();
-
-        writer.println("subgraph temp topics {");
-        writer.println("  node [fillcolor=green];     ");
-        writer.println("  label = \"TempTopics\"");
-        writer.println();
-        printNodeLinks(writer, map.getTempTopicRootNode(), "temptopic");
-        writer.println("}");
-        writer.println();
-
-        printNodes(writer, map.getQueueRootNode(), "queue");
-        writer.println();
-
-        printNodes(writer, map.getTempQueueRootNode(), "tempqueue");
-        writer.println();
-
-        printNodes(writer, map.getTopicRootNode(), "topic");
-        writer.println();
-
-        printNodes(writer, map.getTempTopicRootNode(), "temptopic");
-        writer.println();
-
-        writer.println("}");
-    }
-
-    protected void printNodes(PrintWriter writer, DestinationMapNode node, String prefix) {
-        String path = getPath(node);
-        writer.print("  ");
-        writer.print(prefix);
-        writer.print(ID_SEPARATOR);
-        writer.print(path);
-        String label = path;
-        if (prefix.equals("topic")) {
-            label = "Topics";
-        } else if (prefix.equals("queue")) {
-            label = "Queues";
-        }
-        writer.print("[ label = \"");
-        writer.print(label);
-        writer.println("\" ];");
-
-        Collection children = node.getChildren();
-        for (Iterator iter = children.iterator(); iter.hasNext();) {
-            DestinationMapNode child = (DestinationMapNode)iter.next();
-            printNodes(writer, child, prefix + ID_SEPARATOR + path);
-        }
-    }
-
-    protected void printNodeLinks(PrintWriter writer, DestinationMapNode node, String prefix) {
-        String path = getPath(node);
-        Collection children = node.getChildren();
-        for (Iterator iter = children.iterator(); iter.hasNext();) {
-            DestinationMapNode child = (DestinationMapNode)iter.next();
-
-            writer.print("  ");
-            writer.print(prefix);
-            writer.print(ID_SEPARATOR);
-            writer.print(path);
-            writer.print(" -> ");
-            writer.print(prefix);
-            writer.print(ID_SEPARATOR);
-            writer.print(path);
-            writer.print(ID_SEPARATOR);
-            writer.print(getPath(child));
-            writer.println(";");
-
-            printNodeLinks(writer, child, prefix + ID_SEPARATOR + path);
-        }
-    }
-
-    protected String getPath(DestinationMapNode node) {
-        String path = node.getPath();
-        if (path.equals("*")) {
-            return "root";
-        }
-        return path;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFilePlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFilePlugin.java
deleted file mode 100644
index c37ea5b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFilePlugin.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.broker.view;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-
-/**
- * A <a href="http://www.graphviz.org/">DOT</a> 
- * file creator plugin which creates a DOT file showing the current topic & queue hierarchies.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class DestinationDotFilePlugin implements BrokerPlugin {
-    private String file = "ActiveMQDestinations.dot";
-
-    public Broker installPlugin(Broker broker) {
-        return new DestinationDotFileInterceptor(broker, file);
-    }
-
-    public String getFile() {
-        return file;
-    }
-
-    /**
-     * Sets the destination file name to create the destination diagram
-     */
-    public void setFile(String file) {
-        this.file = file;
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java
deleted file mode 100644
index 152fd78..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.broker.view;
-
-import java.io.FileWriter;
-import java.io.PrintWriter;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Useful base class
- * 
- * 
- */
-public abstract class DotFileInterceptorSupport extends BrokerFilter {
-    private final Logger log = LoggerFactory.getLogger(DotFileInterceptorSupport.class);
-
-    private String file;
-
-    public DotFileInterceptorSupport(Broker next, String file) {
-        super(next);
-        this.file = file;
-    }
-
-    protected void generateFile() throws Exception {
-        if (log.isDebugEnabled()) {
-            log.debug("Creating DOT file at: " + file);
-        }
-        PrintWriter writer = new PrintWriter(new FileWriter(file));
-        try {
-            generateFile(writer);
-        } finally {
-            writer.close();
-        }
-    }
-
-    protected abstract void generateFile(PrintWriter writer) throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/package.html
deleted file mode 100755
index 161212c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Broker Plugins for visualising the current system
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
deleted file mode 100644
index bc7a2ec..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.BlobMessage;
-import org.apache.activemq.blob.BlobDownloader;
-import org.apache.activemq.blob.BlobUploader;
-import org.apache.activemq.util.JMSExceptionSupport;
-
-/**
- * An implementation of {@link BlobMessage} for out of band BLOB transfer
- * 
- * 
- * @openwire:marshaller code="29"
- */
-public class ActiveMQBlobMessage extends ActiveMQMessage implements BlobMessage {
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_BLOB_MESSAGE;
-
-    public static final String BINARY_MIME_TYPE = "application/octet-stream";
-
-    private String remoteBlobUrl;
-    private String mimeType;
-    private String name;
-    private boolean deletedByBroker;
-
-    private transient BlobUploader blobUploader;
-    private transient BlobDownloader blobDownloader;
-    private transient URL url;
-
-    public Message copy() {
-        ActiveMQBlobMessage copy = new ActiveMQBlobMessage();
-        copy(copy);
-        return copy;
-    }
-
-    private void copy(ActiveMQBlobMessage copy) {
-        super.copy(copy);
-        copy.setRemoteBlobUrl(getRemoteBlobUrl());
-        copy.setMimeType(getMimeType());
-        copy.setDeletedByBroker(isDeletedByBroker());
-        copy.setBlobUploader(getBlobUploader());
-        copy.setName(getName());
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=3 cache=false
-     */
-    public String getRemoteBlobUrl() {
-        return remoteBlobUrl;
-    }
-
-    public void setRemoteBlobUrl(String remoteBlobUrl) {
-        this.remoteBlobUrl = remoteBlobUrl;
-        url = null;
-    }
-
-    /**
-     * The MIME type of the BLOB which can be used to apply different content
-     * types to messages.
-     * 
-     * @openwire:property version=3 cache=true
-     */
-    public String getMimeType() {
-        if (mimeType == null) {
-            return BINARY_MIME_TYPE;
-        }
-        return mimeType;
-    }
-
-    public void setMimeType(String mimeType) {
-        this.mimeType = mimeType;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * The name of the attachment which can be useful information if
-     * transmitting files over ActiveMQ
-     * 
-     * @openwire:property version=3 cache=false
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * @openwire:property version=3 cache=false
-     */
-    public boolean isDeletedByBroker() {
-        return deletedByBroker;
-    }
-
-    public void setDeletedByBroker(boolean deletedByBroker) {
-        this.deletedByBroker = deletedByBroker;
-    }
-
-    public String getJMSXMimeType() {
-        return getMimeType();
-    }
-
-    public InputStream getInputStream() throws IOException, JMSException {
-        if(blobDownloader == null) {
-            return null;
-        }
-        return blobDownloader.getInputStream(this);
-    }
-
-    public URL getURL() throws JMSException {
-        if (url == null && remoteBlobUrl != null) {
-            try {
-                url = new URL(remoteBlobUrl);
-            } catch (MalformedURLException e) {
-                throw JMSExceptionSupport.create(e);
-            }
-        }
-        return url;
-    }
-
-    public void setURL(URL url) {
-        this.url = url;
-        remoteBlobUrl = url != null ? url.toExternalForm() : null;
-    }
-
-    public BlobUploader getBlobUploader() {
-        return blobUploader;
-    }
-
-    public void setBlobUploader(BlobUploader blobUploader) {
-        this.blobUploader = blobUploader;
-    }
-
-    public BlobDownloader getBlobDownloader() {
-        return blobDownloader;
-    }
-
-    public void setBlobDownloader(BlobDownloader blobDownloader) {
-        this.blobDownloader = blobDownloader;
-    }
-
-    public void onSend() throws JMSException {
-        super.onSend();
-
-        // lets ensure we upload the BLOB first out of band before we send the
-        // message
-        if (blobUploader != null) {
-            try {
-                URL value = blobUploader.upload(this);
-                setURL(value);
-            } catch (IOException e) {
-                throw JMSExceptionSupport.create(e);
-            }
-        }
-    }
-    
-    public void deleteFile() throws IOException, JMSException {
-        blobDownloader.deleteFile(this);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java
deleted file mode 100755
index a2b7a76..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java
+++ /dev/null
@@ -1,856 +0,0 @@
-/**
- * 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.command;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.Deflater;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.InflaterInputStream;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotReadableException;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ByteSequenceData;
-import org.apache.activemq.util.JMSExceptionSupport;
-
-/**
- * A <CODE>BytesMessage</CODE> object is used to send a message containing a
- * stream of uninterpreted bytes. It inherits from the <CODE>Message</CODE>
- * interface and adds a bytes message body. The receiver of the message supplies
- * the interpretation of the bytes.
- * <P>
- * The <CODE>BytesMessage</CODE> methods are based largely on those found in
- * <CODE>java.io.DataInputStream</CODE> and
- * <CODE>java.io.DataOutputStream</CODE>.
- * <P>
- * This message type is for client encoding of existing message formats. If
- * possible, one of the other self-defining message types should be used
- * instead.
- * <P>
- * Although the JMS API allows the use of message properties with byte messages,
- * they are typically not used, since the inclusion of properties may affect the
- * format.
- * <P>
- * The primitive types can be written explicitly using methods for each type.
- * They may also be written generically as objects. For instance, a call to
- * <CODE>BytesMessage.writeInt(6)</CODE> is equivalent to
- * <CODE> BytesMessage.writeObject(new Integer(6))</CODE>. Both forms are
- * provided, because the explicit form is convenient for static programming, and
- * the object form is needed when types are not known at compile time.
- * <P>
- * When the message is first created, and when <CODE>clearBody</CODE> is
- * called, the body of the message is in write-only mode. After the first call
- * to <CODE>reset</CODE> has been made, the message body is in read-only mode.
- * After a message has been sent, the client that sent it can retain and modify
- * it without affecting the message that has been sent. The same message object
- * can be sent multiple times. When a message has been received, the provider
- * has called <CODE>reset</CODE> so that the message body is in read-only mode
- * for the client.
- * <P>
- * If <CODE>clearBody</CODE> is called on a message in read-only mode, the
- * message body is cleared and the message is in write-only mode.
- * <P>
- * If a client attempts to read a message in write-only mode, a
- * <CODE>MessageNotReadableException</CODE> is thrown.
- * <P>
- * If a client attempts to write a message in read-only mode, a
- * <CODE>MessageNotWriteableException</CODE> is thrown.
- *
- * @openwire:marshaller code=24
- * @see javax.jms.Session#createBytesMessage()
- * @see javax.jms.MapMessage
- * @see javax.jms.Message
- * @see javax.jms.ObjectMessage
- * @see javax.jms.StreamMessage
- * @see javax.jms.TextMessage
- */
-public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessage {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_BYTES_MESSAGE;
-
-    protected transient DataOutputStream dataOut;
-    protected transient ByteArrayOutputStream bytesOut;
-    protected transient DataInputStream dataIn;
-    protected transient int length;
-
-    public Message copy() {
-        ActiveMQBytesMessage copy = new ActiveMQBytesMessage();
-        copy(copy);
-        return copy;
-    }
-
-    private void copy(ActiveMQBytesMessage copy) {
-        storeContent();
-        super.copy(copy);
-        copy.dataOut = null;
-        copy.bytesOut = null;
-        copy.dataIn = null;
-    }
-
-    public void onSend() throws JMSException {
-        super.onSend();
-        storeContent();
-    }
-
-    private void storeContent() {
-        try {
-            if (dataOut != null) {
-                dataOut.close();
-                ByteSequence bs = bytesOut.toByteSequence();
-                if (compressed) {
-                    int pos = bs.offset;
-                    ByteSequenceData.writeIntBig(bs, length);
-                    bs.offset = pos;
-                }
-                setContent(bs);
-                bytesOut = null;
-                dataOut = null;
-            }
-        } catch (IOException ioe) {
-            throw new RuntimeException(ioe.getMessage(), ioe); // TODO verify
-                                                                // RuntimeException
-        }
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String getJMSXMimeType() {
-        return "jms/bytes-message";
-    }
-
-    /**
-     * Clears out the message body. Clearing a message's body does not clear its
-     * header values or property entries.
-     * <P>
-     * If this message body was read-only, calling this method leaves the
-     * message body in the same state as an empty body in a newly created
-     * message.
-     *
-     * @throws JMSException if the JMS provider fails to clear the message body
-     *                 due to some internal error.
-     */
-    public void clearBody() throws JMSException {
-        super.clearBody();
-        this.dataOut = null;
-        this.dataIn = null;
-        this.bytesOut = null;
-    }
-
-    /**
-     * Gets the number of bytes of the message body when the message is in
-     * read-only mode. The value returned can be used to allocate a byte array.
-     * The value returned is the entire length of the message body, regardless
-     * of where the pointer for reading the message is currently located.
-     *
-     * @return number of bytes in the message
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     * @since 1.1
-     */
-
-    public long getBodyLength() throws JMSException {
-        initializeReading();
-        return length;
-    }
-
-    /**
-     * Reads a <code>boolean</code> from the bytes message stream.
-     *
-     * @return the <code>boolean</code> value read
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public boolean readBoolean() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readBoolean();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a signed 8-bit value from the bytes message stream.
-     *
-     * @return the next byte from the bytes message stream as a signed 8-bit
-     *         <code>byte</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public byte readByte() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readByte();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads an unsigned 8-bit number from the bytes message stream.
-     *
-     * @return the next byte from the bytes message stream, interpreted as an
-     *         unsigned 8-bit number
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public int readUnsignedByte() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readUnsignedByte();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a signed 16-bit number from the bytes message stream.
-     *
-     * @return the next two bytes from the bytes message stream, interpreted as
-     *         a signed 16-bit number
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public short readShort() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readShort();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads an unsigned 16-bit number from the bytes message stream.
-     *
-     * @return the next two bytes from the bytes message stream, interpreted as
-     *         an unsigned 16-bit integer
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public int readUnsignedShort() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readUnsignedShort();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a Unicode character value from the bytes message stream.
-     *
-     * @return the next two bytes from the bytes message stream as a Unicode
-     *         character
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public char readChar() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readChar();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a signed 32-bit integer from the bytes message stream.
-     *
-     * @return the next four bytes from the bytes message stream, interpreted as
-     *         an <code>int</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public int readInt() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readInt();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a signed 64-bit integer from the bytes message stream.
-     *
-     * @return the next eight bytes from the bytes message stream, interpreted
-     *         as a <code>long</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public long readLong() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readLong();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a <code>float</code> from the bytes message stream.
-     *
-     * @return the next four bytes from the bytes message stream, interpreted as
-     *         a <code>float</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public float readFloat() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readFloat();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a <code>double</code> from the bytes message stream.
-     *
-     * @return the next eight bytes from the bytes message stream, interpreted
-     *         as a <code>double</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public double readDouble() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readDouble();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a string that has been encoded using a modified UTF-8 format from
-     * the bytes message stream.
-     * <P>
-     * For more information on the UTF-8 format, see "File System Safe UCS
-     * Transformation Format (FSS_UTF)", X/Open Preliminary Specification,
-     * X/Open Company Ltd., Document Number: P316. This information also appears
-     * in ISO/IEC 10646, Annex P.
-     *
-     * @return a Unicode string from the bytes message stream
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of bytes stream has been
-     *                 reached.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public String readUTF() throws JMSException {
-        initializeReading();
-        try {
-            return this.dataIn.readUTF();
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a byte array from the bytes message stream.
-     * <P>
-     * If the length of array <code>value</code> is less than the number of
-     * bytes remaining to be read from the stream, the array should be filled. A
-     * subsequent call reads the next increment, and so on.
-     * <P>
-     * If the number of bytes remaining in the stream is less than the length of
-     * array <code>value</code>, the bytes should be read into the array. The
-     * return value of the total number of bytes read will be less than the
-     * length of the array, indicating that there are no more bytes left to be
-     * read from the stream. The next read of the stream returns -1.
-     *
-     * @param value the buffer into which the data is read
-     * @return the total number of bytes read into the buffer, or -1 if there is
-     *         no more data because the end of the stream has been reached
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public int readBytes(byte[] value) throws JMSException {
-        return readBytes(value, value.length);
-    }
-
-    /**
-     * Reads a portion of the bytes message stream.
-     * <P>
-     * If the length of array <code>value</code> is less than the number of
-     * bytes remaining to be read from the stream, the array should be filled. A
-     * subsequent call reads the next increment, and so on.
-     * <P>
-     * If the number of bytes remaining in the stream is less than the length of
-     * array <code>value</code>, the bytes should be read into the array. The
-     * return value of the total number of bytes read will be less than the
-     * length of the array, indicating that there are no more bytes left to be
-     * read from the stream. The next read of the stream returns -1. <p/> If
-     * <code>length</code> is negative, or <code>length</code> is greater
-     * than the length of the array <code>value</code>, then an
-     * <code>IndexOutOfBoundsException</code> is thrown. No bytes will be read
-     * from the stream for this exception case.
-     *
-     * @param value the buffer into which the data is read
-     * @param length the number of bytes to read; must be less than or equal to
-     *                <code>value.length</code>
-     * @return the total number of bytes read into the buffer, or -1 if there is
-     *         no more data because the end of the stream has been reached
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-    public int readBytes(byte[] value, int length) throws JMSException {
-        initializeReading();
-        try {
-            int n = 0;
-            while (n < length) {
-                int count = this.dataIn.read(value, n, length - n);
-                if (count < 0) {
-                    break;
-                }
-                n += count;
-            }
-            if (n == 0 && length > 0) {
-                n = -1;
-            }
-            return n;
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Writes a <code>boolean</code> to the bytes message stream as a 1-byte
-     * value. The value <code>true</code> is written as the value
-     * <code>(byte)1</code>; the value <code>false</code> is written as the
-     * value <code>(byte)0</code>.
-     *
-     * @param value the <code>boolean</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeBoolean(boolean value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeBoolean(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>byte</code> to the bytes message stream as a 1-byte
-     * value.
-     *
-     * @param value the <code>byte</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeByte(byte value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeByte(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>short</code> to the bytes message stream as two bytes,
-     * high byte first.
-     *
-     * @param value the <code>short</code> to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeShort(short value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeShort(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>char</code> to the bytes message stream as a 2-byte
-     * value, high byte first.
-     *
-     * @param value the <code>char</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeChar(char value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeChar(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes an <code>int</code> to the bytes message stream as four bytes,
-     * high byte first.
-     *
-     * @param value the <code>int</code> to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeInt(int value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeInt(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>long</code> to the bytes message stream as eight bytes,
-     * high byte first.
-     *
-     * @param value the <code>long</code> to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeLong(long value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeLong(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Converts the <code>float</code> argument to an <code>int</code> using
-     * the <code>floatToIntBits</code> method in class <code>Float</code>,
-     * and then writes that <code>int</code> value to the bytes message stream
-     * as a 4-byte quantity, high byte first.
-     *
-     * @param value the <code>float</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeFloat(float value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeFloat(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Converts the <code>double</code> argument to a <code>long</code>
-     * using the <code>doubleToLongBits</code> method in class
-     * <code>Double</code>, and then writes that <code>long</code> value to
-     * the bytes message stream as an 8-byte quantity, high byte first.
-     *
-     * @param value the <code>double</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeDouble(double value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeDouble(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a string to the bytes message stream using UTF-8 encoding in a
-     * machine-independent manner.
-     * <P>
-     * For more information on the UTF-8 format, see "File System Safe UCS
-     * Transformation Format (FSS_UTF)", X/Open Preliminary Specification,
-     * X/Open Company Ltd., Document Number: P316. This information also appears
-     * in ISO/IEC 10646, Annex P.
-     *
-     * @param value the <code>String</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeUTF(String value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.writeUTF(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a byte array to the bytes message stream.
-     *
-     * @param value the byte array to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeBytes(byte[] value) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.write(value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a portion of a byte array to the bytes message stream.
-     *
-     * @param value the byte array value to be written
-     * @param offset the initial offset within the byte array
-     * @param length the number of bytes to use
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void writeBytes(byte[] value, int offset, int length) throws JMSException {
-        initializeWriting();
-        try {
-            this.dataOut.write(value, offset, length);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes an object to the bytes message stream.
-     * <P>
-     * This method works only for the objectified primitive object types (<code>Integer</code>,<code>Double</code>,
-     * <code>Long</code> &nbsp;...), <code>String</code> objects, and byte
-     * arrays.
-     *
-     * @param value the object in the Java programming language ("Java object")
-     *                to be written; it must not be null
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageFormatException if the object is of an invalid type.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     * @throws java.lang.NullPointerException if the parameter
-     *                 <code>value</code> is null.
-     */
-    public void writeObject(Object value) throws JMSException {
-        if (value == null) {
-            throw new NullPointerException();
-        }
-        initializeWriting();
-        if (value instanceof Boolean) {
-            writeBoolean(((Boolean)value).booleanValue());
-        } else if (value instanceof Character) {
-            writeChar(((Character)value).charValue());
-        } else if (value instanceof Byte) {
-            writeByte(((Byte)value).byteValue());
-        } else if (value instanceof Short) {
-            writeShort(((Short)value).shortValue());
-        } else if (value instanceof Integer) {
-            writeInt(((Integer)value).intValue());
-        } else if (value instanceof Long) {
-            writeLong(((Long)value).longValue());
-        } else if (value instanceof Float) {
-            writeFloat(((Float)value).floatValue());
-        } else if (value instanceof Double) {
-            writeDouble(((Double)value).doubleValue());
-        } else if (value instanceof String) {
-            writeUTF(value.toString());
-        } else if (value instanceof byte[]) {
-            writeBytes((byte[])value);
-        } else {
-            throw new MessageFormatException("Cannot write non-primitive type:" + value.getClass());
-        }
-    }
-
-    /**
-     * Puts the message body in read-only mode and repositions the stream of
-     * bytes to the beginning.
-     *
-     * @throws JMSException if an internal error occurs
-     */
-    public void reset() throws JMSException {
-        storeContent();
-        this.bytesOut = null;
-        this.dataIn = null;
-        this.dataOut = null;
-        setReadOnlyBody(true);
-    }
-
-    private void initializeWriting() throws JMSException {
-        checkReadOnlyBody();
-        if (this.dataOut == null) {
-            this.bytesOut = new ByteArrayOutputStream();
-            OutputStream os = bytesOut;
-            ActiveMQConnection connection = getConnection();
-            if (connection != null && connection.isUseCompression()) {
-                // keep track of the real length of the content if
-                // we are compressed.
-                try {
-                    os.write(new byte[4]);
-                } catch (IOException e) {
-                    throw JMSExceptionSupport.create(e);
-                }
-                length = 0;
-                compressed = true;
-                final Deflater deflater = new Deflater(Deflater.BEST_SPEED);
-                os = new FilterOutputStream(new DeflaterOutputStream(os, deflater)) {
-                    public void write(byte[] arg0) throws IOException {
-                        length += arg0.length;
-                        out.write(arg0);
-                    }
-
-                    public void write(byte[] arg0, int arg1, int arg2) throws IOException {
-                        length += arg2;
-                        out.write(arg0, arg1, arg2);
-                    }
-
-                    public void write(int arg0) throws IOException {
-                        length++;
-                        out.write(arg0);
-                    }
-
-                    @Override
-                    public void close() throws IOException {
-                        super.close();
-                        deflater.end();
-                    }
-                };
-            }
-            this.dataOut = new DataOutputStream(os);
-        }
-    }
-
-    protected void checkWriteOnlyBody() throws MessageNotReadableException {
-        if (!readOnlyBody) {
-            throw new MessageNotReadableException("Message body is write-only");
-        }
-    }
-
-    private void initializeReading() throws JMSException {
-        checkWriteOnlyBody();
-        if (dataIn == null) {
-            ByteSequence data = getContent();
-            if (data == null) {
-                data = new ByteSequence(new byte[] {}, 0, 0);
-            }
-            InputStream is = new ByteArrayInputStream(data);
-            if (isCompressed()) {
-                // keep track of the real length of the content if
-                // we are compressed.
-                try {
-                    DataInputStream dis = new DataInputStream(is);
-                    length = dis.readInt();
-                    dis.close();
-                } catch (IOException e) {
-                    throw JMSExceptionSupport.create(e);
-                }
-                is = new InflaterInputStream(is);
-            } else {
-                length = data.getLength();
-            }
-            dataIn = new DataInputStream(is);
-        }
-    }
-
-    public void setObjectProperty(String name, Object value) throws JMSException {
-        initializeWriting();
-        super.setObjectProperty(name, value);
-    }
-
-    public String toString() {
-        return super.toString() + " ActiveMQBytesMessage{ " + "bytesOut = " + bytesOut + ", dataOut = " + dataOut + ", dataIn = " + dataIn + " }";
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
deleted file mode 100755
index a3dafc6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/**
- * 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.command;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.Topic;
-
-import org.apache.activemq.jndi.JNDIBaseStorable;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-
-/**
- * @openwire:marshaller
- * 
- */
-public abstract class ActiveMQDestination extends JNDIBaseStorable implements DataStructure, Destination, Externalizable, Comparable {
-
-    public static final String PATH_SEPERATOR = ".";
-    public static final char COMPOSITE_SEPERATOR = ',';
-
-    public static final byte QUEUE_TYPE = 0x01;
-    public static final byte TOPIC_TYPE = 0x02;
-    public static final byte TEMP_MASK = 0x04;
-    public static final byte TEMP_TOPIC_TYPE = TOPIC_TYPE | TEMP_MASK;
-    public static final byte TEMP_QUEUE_TYPE = QUEUE_TYPE | TEMP_MASK;
-
-    public static final String QUEUE_QUALIFIED_PREFIX = "queue://";
-    public static final String TOPIC_QUALIFIED_PREFIX = "topic://";
-    public static final String TEMP_QUEUE_QUALIFED_PREFIX = "temp-queue://";
-    public static final String TEMP_TOPIC_QUALIFED_PREFIX = "temp-topic://";
-
-    public static final String TEMP_DESTINATION_NAME_PREFIX = "ID:";
-
-    private static final long serialVersionUID = -3885260014960795889L;
-
-    protected String physicalName;
-
-    protected transient ActiveMQDestination[] compositeDestinations;
-    protected transient String[] destinationPaths;
-    protected transient boolean isPattern;
-    protected transient int hashValue;
-    protected Map<String, String> options;
-    
-    public ActiveMQDestination() {
-    }
-
-    protected ActiveMQDestination(String name) {
-        setPhysicalName(name);
-    }
-
-    public ActiveMQDestination(ActiveMQDestination composites[]) {
-        setCompositeDestinations(composites);
-    }
-
-
-    // static helper methods for working with destinations
-    // -------------------------------------------------------------------------
-    public static ActiveMQDestination createDestination(String name, byte defaultType) {
-
-        if (name.startsWith(QUEUE_QUALIFIED_PREFIX)) {
-            return new ActiveMQQueue(name.substring(QUEUE_QUALIFIED_PREFIX.length()));
-        } else if (name.startsWith(TOPIC_QUALIFIED_PREFIX)) {
-            return new ActiveMQTopic(name.substring(TOPIC_QUALIFIED_PREFIX.length()));
-        } else if (name.startsWith(TEMP_QUEUE_QUALIFED_PREFIX)) {
-            return new ActiveMQTempQueue(name.substring(TEMP_QUEUE_QUALIFED_PREFIX.length()));
-        } else if (name.startsWith(TEMP_TOPIC_QUALIFED_PREFIX)) {
-            return new ActiveMQTempTopic(name.substring(TEMP_TOPIC_QUALIFED_PREFIX.length()));
-        }
-
-        switch (defaultType) {
-        case QUEUE_TYPE:
-            return new ActiveMQQueue(name);
-        case TOPIC_TYPE:
-            return new ActiveMQTopic(name);
-        case TEMP_QUEUE_TYPE:
-            return new ActiveMQTempQueue(name);
-        case TEMP_TOPIC_TYPE:
-            return new ActiveMQTempTopic(name);
-        default:
-            throw new IllegalArgumentException("Invalid default destination type: " + defaultType);
-        }
-    }
-
-    public static ActiveMQDestination transform(Destination dest) throws JMSException {
-        if (dest == null) {
-            return null;
-        }
-        if (dest instanceof ActiveMQDestination) {
-            return (ActiveMQDestination)dest;
-        }
-        
-        if (dest instanceof Queue && dest instanceof Topic) {
-            String queueName = ((Queue) dest).getQueueName();
-            String topicName = ((Topic) dest).getTopicName();
-            if (queueName != null && topicName == null) {
-                return new ActiveMQQueue(queueName);
-            } else if (queueName == null && topicName != null) {
-                return new ActiveMQTopic(topicName);
-            }
-            throw new JMSException("Could no disambiguate on queue|Topic-name totransform pollymorphic destination into a ActiveMQ destination: " + dest);
-        }
-        if (dest instanceof TemporaryQueue) {
-            return new ActiveMQTempQueue(((TemporaryQueue)dest).getQueueName());
-        }
-        if (dest instanceof TemporaryTopic) {
-            return new ActiveMQTempTopic(((TemporaryTopic)dest).getTopicName());
-        }
-        if (dest instanceof Queue) {
-            return new ActiveMQQueue(((Queue)dest).getQueueName());
-        }
-        if (dest instanceof Topic) {
-            return new ActiveMQTopic(((Topic)dest).getTopicName());
-        }
-        throw new JMSException("Could not transform the destination into a ActiveMQ destination: " + dest);
-    }
-
-    public static int compare(ActiveMQDestination destination, ActiveMQDestination destination2) {
-        if (destination == destination2) {
-            return 0;
-        }
-        if (destination == null) {
-            return -1;
-        } else if (destination2 == null) {
-            return 1;
-        } else {
-            if (destination.isQueue() == destination2.isQueue()) {
-                return destination.getPhysicalName().compareTo(destination2.getPhysicalName());
-            } else {
-                return destination.isQueue() ? -1 : 1;
-            }
-        }
-    }
-
-    public int compareTo(Object that) {
-        if (that instanceof ActiveMQDestination) {
-            return compare(this, (ActiveMQDestination)that);
-        }
-        if (that == null) {
-            return 1;
-        } else {
-            return getClass().getName().compareTo(that.getClass().getName());
-        }
-    }
-
-    public boolean isComposite() {
-        return compositeDestinations != null;
-    }
-
-    public ActiveMQDestination[] getCompositeDestinations() {
-        return compositeDestinations;
-    }
-
-    public void setCompositeDestinations(ActiveMQDestination[] destinations) {
-        this.compositeDestinations = destinations;
-        this.destinationPaths = null;
-        this.hashValue = 0;
-        this.isPattern = false;
-
-        StringBuffer sb = new StringBuffer();
-        for (int i = 0; i < destinations.length; i++) {
-            if (i != 0) {
-                sb.append(COMPOSITE_SEPERATOR);
-            }
-            if (getDestinationType() == destinations[i].getDestinationType()) {
-                sb.append(destinations[i].getPhysicalName());
-            } else {
-                sb.append(destinations[i].getQualifiedName());
-            }
-        }
-        physicalName = sb.toString();
-    }
-
-    public String getQualifiedName() {
-        if (isComposite()) {
-            return physicalName;
-        }
-        return getQualifiedPrefix() + physicalName;
-    }
-
-    protected abstract String getQualifiedPrefix();
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getPhysicalName() {
-        return physicalName;
-    }
-
-    public void setPhysicalName(String physicalName) {
-        final int len = physicalName.length();
-        // options offset
-        int p = -1;
-        boolean composite = false;
-        for (int i = 0; i < len; i++) {
-            char c = physicalName.charAt(i);
-            if (c == '?') {
-                p = i;
-                break;
-            }
-            if (c == COMPOSITE_SEPERATOR) {
-                // won't be wild card
-                isPattern = false;
-                composite = true;
-            } else if (!composite && (c == '*' || c == '>')) {
-                isPattern = true;
-            }
-        }
-        // Strip off any options
-        if (p >= 0) {
-            String optstring = physicalName.substring(p + 1);
-            physicalName = physicalName.substring(0, p);
-            try {
-                options = URISupport.parseQuery(optstring);
-            } catch (URISyntaxException e) {
-                throw new IllegalArgumentException("Invalid destination name: " + physicalName + ", it's options are not encoded properly: " + e);
-            }
-        }
-        this.physicalName = physicalName;
-        this.destinationPaths = null;
-        this.hashValue = 0;
-        if (composite) {
-            // Check to see if it is a composite.
-            Set<String> l = new HashSet<String>();
-            StringTokenizer iter = new StringTokenizer(physicalName, "" + COMPOSITE_SEPERATOR);
-            while (iter.hasMoreTokens()) {
-                String name = iter.nextToken().trim();
-                if (name.length() == 0) {
-                    continue;
-                }
-                l.add(name);
-            }
-            compositeDestinations = new ActiveMQDestination[l.size()];
-            int counter = 0;
-            for (String dest : l) {
-                compositeDestinations[counter++] = createDestination(dest);
-            }
-        }
-    }
-
-    public ActiveMQDestination createDestination(String name) {
-        return createDestination(name, getDestinationType());
-    }
-
-    public String[] getDestinationPaths() {
-
-        if (destinationPaths != null) {
-            return destinationPaths;
-        }
-
-        List<String> l = new ArrayList<String>();
-        StringTokenizer iter = new StringTokenizer(physicalName, PATH_SEPERATOR);
-        while (iter.hasMoreTokens()) {
-            String name = iter.nextToken().trim();
-            if (name.length() == 0) {
-                continue;
-            }
-            l.add(name);
-        }
-
-        destinationPaths = new String[l.size()];
-        l.toArray(destinationPaths);
-        return destinationPaths;
-    }
-
-    public abstract byte getDestinationType();
-
-    public boolean isQueue() {
-        return false;
-    }
-
-    public boolean isTopic() {
-        return false;
-    }
-
-    public boolean isTemporary() {
-        return false;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        ActiveMQDestination d = (ActiveMQDestination)o;
-        return physicalName.equals(d.physicalName);
-    }
-
-    public int hashCode() {
-        if (hashValue == 0) {
-            hashValue = physicalName.hashCode();
-        }
-        return hashValue;
-    }
-
-    public String toString() {
-        return getQualifiedName();
-    }
-
-    public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeUTF(this.getPhysicalName());
-        out.writeObject(options);
-    }
-
-    @SuppressWarnings("unchecked")
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        this.setPhysicalName(in.readUTF());
-        this.options = (Map<String, String>)in.readObject();
-    }
-
-    public String getDestinationTypeAsString() {
-        switch (getDestinationType()) {
-        case QUEUE_TYPE:
-            return "Queue";
-        case TOPIC_TYPE:
-            return "Topic";
-        case TEMP_QUEUE_TYPE:
-            return "TempQueue";
-        case TEMP_TOPIC_TYPE:
-            return "TempTopic";
-        default:
-            throw new IllegalArgumentException("Invalid destination type: " + getDestinationType());
-        }
-    }
-
-    public Map<String, String> getOptions() {
-        return options;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public void buildFromProperties(Properties properties) {
-        if (properties == null) {
-            properties = new Properties();
-        }
-
-        IntrospectionSupport.setProperties(this, properties);
-    }
-
-    public void populateProperties(Properties props) {
-        props.setProperty("physicalName", getPhysicalName());
-    }
-
-    public boolean isPattern() {
-        return isPattern;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java
deleted file mode 100755
index 770d4fc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java
+++ /dev/null
@@ -1,752 +0,0 @@
-/**
- * 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.command;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectStreamException;
-import java.io.OutputStream;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.InflaterInputStream;
-
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotWriteableException;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.MarshallingSupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * A <CODE>MapMessage</CODE> object is used to send a set of name-value pairs.
- * The names are <CODE>String</CODE> objects, and the values are primitive
- * data types in the Java programming language. The names must have a value that
- * is not null, and not an empty string. The entries can be accessed
- * sequentially or randomly by name. The order of the entries is undefined.
- * <CODE>MapMessage</CODE> inherits from the <CODE>Message</CODE> interface
- * and adds a message body that contains a Map.
- * <P>
- * The primitive types can be read or written explicitly using methods for each
- * type. They may also be read or written generically as objects. For instance,
- * a call to <CODE>MapMessage.setInt("foo", 6)</CODE> is equivalent to
- * <CODE> MapMessage.setObject("foo", new Integer(6))</CODE>. Both forms are
- * provided, because the explicit form is convenient for static programming, and
- * the object form is needed when types are not known at compile time.
- * <P>
- * When a client receives a <CODE>MapMessage</CODE>, it is in read-only mode.
- * If a client attempts to write to the message at this point, a
- * <CODE>MessageNotWriteableException</CODE> is thrown. If
- * <CODE>clearBody</CODE> is called, the message can now be both read from and
- * written to.
- * <P>
- * <CODE>MapMessage</CODE> objects support the following conversion table. The
- * marked cases must be supported. The unmarked cases must throw a
- * <CODE>JMSException</CODE>. The <CODE>String</CODE> -to-primitive
- * conversions may throw a runtime exception if the primitive's
- * <CODE>valueOf()</CODE> method does not accept it as a valid
- * <CODE> String</CODE> representation of the primitive.
- * <P>
- * A value written as the row type can be read as the column type. <p/>
- *
- * <PRE>
- * | | boolean byte short char int long float double String byte[] |----------------------------------------------------------------------
- * |boolean | X X |byte | X X X X X |short | X X X X |char | X X |int | X X X |long | X X |float | X X X |double | X X
- * |String | X X X X X X X X |byte[] | X |----------------------------------------------------------------------
- * &lt;p/&gt;
- * </PRE>
- *
- * <p/>
- * <P>
- * Attempting to read a null value as a primitive type must be treated as
- * calling the primitive's corresponding <code>valueOf(String)</code>
- * conversion method with a null value. Since <code>char</code> does not
- * support a <code>String</code> conversion, attempting to read a null value
- * as a <code>char</code> must throw a <code>NullPointerException</code>.
- *
- * @openwire:marshaller code="25"
- * @see javax.jms.Session#createMapMessage()
- * @see javax.jms.BytesMessage
- * @see javax.jms.Message
- * @see javax.jms.ObjectMessage
- * @see javax.jms.StreamMessage
- * @see javax.jms.TextMessage
- */
-public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_MAP_MESSAGE;
-
-    protected transient Map<String, Object> map = new HashMap<String, Object>();
-
-    private Object readResolve() throws ObjectStreamException {
-        if(this.map == null) {
-            this.map = new HashMap<String, Object>();
-        }
-        return this;
-    }
-
-    public Message copy() {
-        ActiveMQMapMessage copy = new ActiveMQMapMessage();
-        copy(copy);
-        return copy;
-    }
-
-    private void copy(ActiveMQMapMessage copy) {
-        storeContent();
-        super.copy(copy);
-    }
-
-    // We only need to marshal the content if we are hitting the wire.
-    public void beforeMarshall(WireFormat wireFormat) throws IOException {
-        super.beforeMarshall(wireFormat);
-        storeContent();
-    }
-
-    public void clearMarshalledState() throws JMSException {
-        super.clearMarshalledState();
-        map.clear();
-    }
-
-    private void storeContent() {
-        try {
-            if (getContent() == null && !map.isEmpty()) {
-                ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-                OutputStream os = bytesOut;
-                ActiveMQConnection connection = getConnection();
-                if (connection != null && connection.isUseCompression()) {
-                    compressed = true;
-                    os = new DeflaterOutputStream(os);
-                }
-                DataOutputStream dataOut = new DataOutputStream(os);
-                MarshallingSupport.marshalPrimitiveMap(map, dataOut);
-                dataOut.close();
-                setContent(bytesOut.toByteSequence());
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Builds the message body from data
-     *
-     * @throws JMSException
-     * @throws IOException
-     */
-    private void loadContent() throws JMSException {
-        try {
-            if (getContent() != null && map.isEmpty()) {
-                ByteSequence content = getContent();
-                InputStream is = new ByteArrayInputStream(content);
-                if (isCompressed()) {
-                    is = new InflaterInputStream(is);
-                }
-                DataInputStream dataIn = new DataInputStream(is);
-                map = MarshallingSupport.unmarshalPrimitiveMap(dataIn);
-                dataIn.close();
-            }
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String getJMSXMimeType() {
-        return "jms/map-message";
-    }
-
-    /**
-     * Clears out the message body. Clearing a message's body does not clear its
-     * header values or property entries.
-     * <P>
-     * If this message body was read-only, calling this method leaves the
-     * message body in the same state as an empty body in a newly created
-     * message.
-     */
-    public void clearBody() throws JMSException {
-        super.clearBody();
-        map.clear();
-    }
-
-    /**
-     * Returns the <CODE>boolean</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>boolean</CODE>
-     * @return the <CODE>boolean</CODE> value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public boolean getBoolean(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return false;
-        }
-        if (value instanceof Boolean) {
-            return ((Boolean)value).booleanValue();
-        }
-        if (value instanceof String) {
-            return Boolean.valueOf(value.toString()).booleanValue();
-        } else {
-            throw new MessageFormatException(" cannot read a boolean from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the <CODE>byte</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>byte</CODE>
-     * @return the <CODE>byte</CODE> value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public byte getByte(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return 0;
-        }
-        if (value instanceof Byte) {
-            return ((Byte)value).byteValue();
-        }
-        if (value instanceof String) {
-            return Byte.valueOf(value.toString()).byteValue();
-        } else {
-            throw new MessageFormatException(" cannot read a byte from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the <CODE>short</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>short</CODE>
-     * @return the <CODE>short</CODE> value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public short getShort(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return 0;
-        }
-        if (value instanceof Short) {
-            return ((Short)value).shortValue();
-        }
-        if (value instanceof Byte) {
-            return ((Byte)value).shortValue();
-        }
-        if (value instanceof String) {
-            return Short.valueOf(value.toString()).shortValue();
-        } else {
-            throw new MessageFormatException(" cannot read a short from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the Unicode character value with the specified name.
-     *
-     * @param name the name of the Unicode character
-     * @return the Unicode character value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public char getChar(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            throw new NullPointerException();
-        }
-        if (value instanceof Character) {
-            return ((Character)value).charValue();
-        } else {
-            throw new MessageFormatException(" cannot read a short from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the <CODE>int</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>int</CODE>
-     * @return the <CODE>int</CODE> value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public int getInt(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return 0;
-        }
-        if (value instanceof Integer) {
-            return ((Integer)value).intValue();
-        }
-        if (value instanceof Short) {
-            return ((Short)value).intValue();
-        }
-        if (value instanceof Byte) {
-            return ((Byte)value).intValue();
-        }
-        if (value instanceof String) {
-            return Integer.valueOf(value.toString()).intValue();
-        } else {
-            throw new MessageFormatException(" cannot read an int from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the <CODE>long</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>long</CODE>
-     * @return the <CODE>long</CODE> value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public long getLong(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return 0;
-        }
-        if (value instanceof Long) {
-            return ((Long)value).longValue();
-        }
-        if (value instanceof Integer) {
-            return ((Integer)value).longValue();
-        }
-        if (value instanceof Short) {
-            return ((Short)value).longValue();
-        }
-        if (value instanceof Byte) {
-            return ((Byte)value).longValue();
-        }
-        if (value instanceof String) {
-            return Long.valueOf(value.toString()).longValue();
-        } else {
-            throw new MessageFormatException(" cannot read a long from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the <CODE>float</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>float</CODE>
-     * @return the <CODE>float</CODE> value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public float getFloat(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return 0;
-        }
-        if (value instanceof Float) {
-            return ((Float)value).floatValue();
-        }
-        if (value instanceof String) {
-            return Float.valueOf(value.toString()).floatValue();
-        } else {
-            throw new MessageFormatException(" cannot read a float from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the <CODE>double</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>double</CODE>
-     * @return the <CODE>double</CODE> value with the specified name
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public double getDouble(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return 0;
-        }
-        if (value instanceof Double) {
-            return ((Double)value).doubleValue();
-        }
-        if (value instanceof Float) {
-            return ((Float)value).floatValue();
-        }
-        if (value instanceof String) {
-            return Float.valueOf(value.toString()).floatValue();
-        } else {
-            throw new MessageFormatException(" cannot read a double from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the <CODE>String</CODE> value with the specified name.
-     *
-     * @param name the name of the <CODE>String</CODE>
-     * @return the <CODE>String</CODE> value with the specified name; if there
-     *         is no item by this name, a null value is returned
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public String getString(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value == null) {
-            return null;
-        }
-        if (value instanceof byte[]) {
-            throw new MessageFormatException("Use getBytes to read a byte array");
-        } else {
-            return value.toString();
-        }
-    }
-
-    /**
-     * Returns the byte array value with the specified name.
-     *
-     * @param name the name of the byte array
-     * @return a copy of the byte array value with the specified name; if there
-     *         is no item by this name, a null value is returned.
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageFormatException if this type conversion is invalid.
-     */
-    public byte[] getBytes(String name) throws JMSException {
-        initializeReading();
-        Object value = map.get(name);
-        if (value instanceof byte[]) {
-            return (byte[])value;
-        } else {
-            throw new MessageFormatException(" cannot read a byte[] from " + value.getClass().getName());
-        }
-    }
-
-    /**
-     * Returns the value of the object with the specified name.
-     * <P>
-     * This method can be used to return, in objectified format, an object in
-     * the Java programming language ("Java object") that had been stored in the
-     * Map with the equivalent <CODE>setObject</CODE> method call, or its
-     * equivalent primitive <CODE>set <I>type </I></CODE> method.
-     * <P>
-     * Note that byte values are returned as <CODE>byte[]</CODE>, not
-     * <CODE>Byte[]</CODE>.
-     *
-     * @param name the name of the Java object
-     * @return a copy of the Java object value with the specified name, in
-     *         objectified format (for example, if the object was set as an
-     *         <CODE>int</CODE>, an <CODE>Integer</CODE> is returned); if
-     *         there is no item by this name, a null value is returned
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     */
-    public Object getObject(String name) throws JMSException {
-        initializeReading();
-        return map.get(name);
-    }
-
-    /**
-     * Returns an <CODE>Enumeration</CODE> of all the names in the
-     * <CODE>MapMessage</CODE> object.
-     *
-     * @return an enumeration of all the names in this <CODE>MapMessage</CODE>
-     * @throws JMSException
-     */
-    public Enumeration<String> getMapNames() throws JMSException {
-        initializeReading();
-        return Collections.enumeration(map.keySet());
-    }
-
-    protected void put(String name, Object value) throws JMSException {
-        if (name == null) {
-            throw new IllegalArgumentException("The name of the property cannot be null.");
-        }
-        if (name.length() == 0) {
-            throw new IllegalArgumentException("The name of the property cannot be an emprty string.");
-        }
-        map.put(name, value);
-    }
-
-    /**
-     * Sets a <CODE>boolean</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>boolean</CODE>
-     * @param value the <CODE>boolean</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setBoolean(String name, boolean value) throws JMSException {
-        initializeWriting();
-        put(name, value ? Boolean.TRUE : Boolean.FALSE);
-    }
-
-    /**
-     * Sets a <CODE>byte</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>byte</CODE>
-     * @param value the <CODE>byte</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setByte(String name, byte value) throws JMSException {
-        initializeWriting();
-        put(name, Byte.valueOf(value));
-    }
-
-    /**
-     * Sets a <CODE>short</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>short</CODE>
-     * @param value the <CODE>short</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setShort(String name, short value) throws JMSException {
-        initializeWriting();
-        put(name, Short.valueOf(value));
-    }
-
-    /**
-     * Sets a Unicode character value with the specified name into the Map.
-     *
-     * @param name the name of the Unicode character
-     * @param value the Unicode character value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setChar(String name, char value) throws JMSException {
-        initializeWriting();
-        put(name, Character.valueOf(value));
-    }
-
-    /**
-     * Sets an <CODE>int</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>int</CODE>
-     * @param value the <CODE>int</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setInt(String name, int value) throws JMSException {
-        initializeWriting();
-        put(name, Integer.valueOf(value));
-    }
-
-    /**
-     * Sets a <CODE>long</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>long</CODE>
-     * @param value the <CODE>long</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setLong(String name, long value) throws JMSException {
-        initializeWriting();
-        put(name, Long.valueOf(value));
-    }
-
-    /**
-     * Sets a <CODE>float</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>float</CODE>
-     * @param value the <CODE>float</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setFloat(String name, float value) throws JMSException {
-        initializeWriting();
-        put(name, new Float(value));
-    }
-
-    /**
-     * Sets a <CODE>double</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>double</CODE>
-     * @param value the <CODE>double</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setDouble(String name, double value) throws JMSException {
-        initializeWriting();
-        put(name, new Double(value));
-    }
-
-    /**
-     * Sets a <CODE>String</CODE> value with the specified name into the Map.
-     *
-     * @param name the name of the <CODE>String</CODE>
-     * @param value the <CODE>String</CODE> value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setString(String name, String value) throws JMSException {
-        initializeWriting();
-        put(name, value);
-    }
-
-    /**
-     * Sets a byte array value with the specified name into the Map.
-     *
-     * @param name the name of the byte array
-     * @param value the byte array value to set in the Map; the array is copied
-     *                so that the value for <CODE>name </CODE> will not be
-     *                altered by future modifications
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws NullPointerException if the name is null, or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setBytes(String name, byte[] value) throws JMSException {
-        initializeWriting();
-        if (value != null) {
-            put(name, value);
-        } else {
-            map.remove(name);
-        }
-    }
-
-    /**
-     * Sets a portion of the byte array value with the specified name into the
-     * Map.
-     *
-     * @param name the name of the byte array
-     * @param value the byte array value to set in the Map
-     * @param offset the initial offset within the byte array
-     * @param length the number of bytes to use
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setBytes(String name, byte[] value, int offset, int length) throws JMSException {
-        initializeWriting();
-        byte[] data = new byte[length];
-        System.arraycopy(value, offset, data, 0, length);
-        put(name, data);
-    }
-
-    /**
-     * Sets an object value with the specified name into the Map.
-     * <P>
-     * This method works only for the objectified primitive object types (<code>Integer</code>,<code>Double</code>,
-     * <code>Long</code> &nbsp;...), <code>String</code> objects, and byte
-     * arrays.
-     *
-     * @param name the name of the Java object
-     * @param value the Java object value to set in the Map
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws IllegalArgumentException if the name is null or if the name is an
-     *                 empty string.
-     * @throws MessageFormatException if the object is invalid.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-    public void setObject(String name, Object value) throws JMSException {
-        initializeWriting();
-        if (value != null) {
-            // byte[] not allowed on properties
-            if (!(value instanceof byte[])) {
-                checkValidObject(value);
-            }
-            put(name, value);
-        } else {
-            put(name, null);
-        }
-    }
-
-    /**
-     * Indicates whether an item exists in this <CODE>MapMessage</CODE>
-     * object.
-     *
-     * @param name the name of the item to test
-     * @return true if the item exists
-     * @throws JMSException if the JMS provider fails to determine if the item
-     *                 exists due to some internal error.
-     */
-    public boolean itemExists(String name) throws JMSException {
-        initializeReading();
-        return map.containsKey(name);
-    }
-
-    private void initializeReading() throws JMSException {
-        loadContent();
-    }
-
-    private void initializeWriting() throws MessageNotWriteableException {
-        checkReadOnlyBody();
-        setContent(null);
-    }
-
-    public String toString() {
-        return super.toString() + " ActiveMQMapMessage{ " + "theTable = " + map + " }";
-    }
-
-    public Map<String, Object> getContentMap() throws JMSException {
-        initializeReading();
-        return map;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
deleted file mode 100755
index 3f855ea..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
+++ /dev/null
@@ -1,683 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotWriteableException;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ScheduledMessage;
-import org.apache.activemq.broker.scheduler.CronParser;
-import org.apache.activemq.filter.PropertyExpression;
-import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.TypeConversionSupport;
-
-/**
- * 
- * @openwire:marshaller code="23"
- */
-public class ActiveMQMessage extends Message implements org.apache.activemq.Message, ScheduledMessage {
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_MESSAGE;
-    public static final String DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY = "dlqDeliveryFailureCause";
-    private static final Map<String, PropertySetter> JMS_PROPERTY_SETERS = new HashMap<String, PropertySetter>();
-
-    protected transient Callback acknowledgeCallback;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-
-    @Override
-    public Message copy() {
-        ActiveMQMessage copy = new ActiveMQMessage();
-        copy(copy);
-        return copy;
-    }
-
-    protected void copy(ActiveMQMessage copy) {
-        super.copy(copy);
-        copy.acknowledgeCallback = acknowledgeCallback;
-    }
-
-    @Override
-    public int hashCode() {
-        MessageId id = getMessageId();
-        if (id != null) {
-            return id.hashCode();
-        } else {
-            return super.hashCode();
-        }
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != getClass()) {
-            return false;
-        }
-
-        ActiveMQMessage msg = (ActiveMQMessage) o;
-        MessageId oMsg = msg.getMessageId();
-        MessageId thisMsg = this.getMessageId();
-        return thisMsg != null && oMsg != null && oMsg.equals(thisMsg);
-    }
-
-    public void acknowledge() throws JMSException {
-        if (acknowledgeCallback != null) {
-            try {
-                acknowledgeCallback.execute();
-            } catch (JMSException e) {
-                throw e;
-            } catch (Throwable e) {
-                throw JMSExceptionSupport.create(e);
-            }
-        }
-    }
-
-    @Override
-    public void clearBody() throws JMSException {
-        setContent(null);
-        readOnlyBody = false;
-    }
-
-    public String getJMSMessageID() {
-        MessageId messageId = this.getMessageId();
-        if (messageId == null) {
-            return null;
-        }
-        return messageId.toString();
-    }
-
-    /**
-     * Seems to be invalid because the parameter doesn't initialize MessageId
-     * instance variables ProducerId and ProducerSequenceId
-     *
-     * @param value
-     * @throws JMSException
-     */
-    public void setJMSMessageID(String value) throws JMSException {
-        if (value != null) {
-            try {
-                MessageId id = new MessageId(value);
-                this.setMessageId(id);
-            } catch (NumberFormatException e) {
-                // we must be some foreign JMS provider or strange user-supplied
-                // String
-                // so lets set the IDs to be 1
-                MessageId id = new MessageId();
-                id.setTextView(value);
-                this.setMessageId(messageId);
-            }
-        } else {
-            this.setMessageId(null);
-        }
-    }
-
-    /**
-     * This will create an object of MessageId. For it to be valid, the instance
-     * variable ProducerId and producerSequenceId must be initialized.
-     *
-     * @param producerId
-     * @param producerSequenceId
-     * @throws JMSException
-     */
-    public void setJMSMessageID(ProducerId producerId, long producerSequenceId) throws JMSException {
-        MessageId id = null;
-        try {
-            id = new MessageId(producerId, producerSequenceId);
-            this.setMessageId(id);
-        } catch (Throwable e) {
-            throw JMSExceptionSupport.create("Invalid message id '" + id + "', reason: " + e.getMessage(), e);
-        }
-    }
-
-    public long getJMSTimestamp() {
-        return this.getTimestamp();
-    }
-
-    public void setJMSTimestamp(long timestamp) {
-        this.setTimestamp(timestamp);
-    }
-
-    public String getJMSCorrelationID() {
-        return this.getCorrelationId();
-    }
-
-    public void setJMSCorrelationID(String correlationId) {
-        this.setCorrelationId(correlationId);
-    }
-
-    public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
-        return encodeString(this.getCorrelationId());
-    }
-
-    public void setJMSCorrelationIDAsBytes(byte[] correlationId) throws JMSException {
-        this.setCorrelationId(decodeString(correlationId));
-    }
-
-    public String getJMSXMimeType() {
-        return "jms/message";
-    }
-
-    protected static String decodeString(byte[] data) throws JMSException {
-        try {
-            if (data == null) {
-                return null;
-            }
-            return new String(data, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new JMSException("Invalid UTF-8 encoding: " + e.getMessage());
-        }
-    }
-
-    protected static byte[] encodeString(String data) throws JMSException {
-        try {
-            if (data == null) {
-                return null;
-            }
-            return data.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new JMSException("Invalid UTF-8 encoding: " + e.getMessage());
-        }
-    }
-
-    public Destination getJMSReplyTo() {
-        return this.getReplyTo();
-    }
-
-    public void setJMSReplyTo(Destination destination) throws JMSException {
-        this.setReplyTo(ActiveMQDestination.transform(destination));
-    }
-
-    public Destination getJMSDestination() {
-        return this.getDestination();
-    }
-
-    public void setJMSDestination(Destination destination) throws JMSException {
-        this.setDestination(ActiveMQDestination.transform(destination));
-    }
-
-    public int getJMSDeliveryMode() {
-        return this.isPersistent() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT;
-    }
-
-    public void setJMSDeliveryMode(int mode) {
-        this.setPersistent(mode == DeliveryMode.PERSISTENT);
-    }
-
-    public boolean getJMSRedelivered() {
-        return this.isRedelivered();
-    }
-
-    public void setJMSRedelivered(boolean redelivered) {
-        this.setRedelivered(redelivered);
-    }
-
-    public String getJMSType() {
-        return this.getType();
-    }
-
-    public void setJMSType(String type) {
-        this.setType(type);
-    }
-
-    public long getJMSExpiration() {
-        return this.getExpiration();
-    }
-
-    public void setJMSExpiration(long expiration) {
-        this.setExpiration(expiration);
-    }
-
-    public int getJMSPriority() {
-        return this.getPriority();
-    }
-
-    public void setJMSPriority(int priority) {
-        this.setPriority((byte) priority);
-    }
-
-    @Override
-    public void clearProperties() {
-        super.clearProperties();
-        readOnlyProperties = false;
-    }
-
-    public boolean propertyExists(String name) throws JMSException {
-        try {
-            return (this.getProperties().containsKey(name) || getObjectProperty(name)!= null);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    public Enumeration getPropertyNames() throws JMSException {
-        try {
-            Vector<String> result = new Vector<String>(this.getProperties().keySet());
-            return result.elements();
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    /**
-     * return all property names, including standard JMS properties and JMSX properties
-     * @return  Enumeration of all property names on this message
-     * @throws JMSException
-     */
-    public Enumeration getAllPropertyNames() throws JMSException {
-        try {
-            Vector<String> result = new Vector<String>(this.getProperties().keySet());
-            result.addAll(JMS_PROPERTY_SETERS.keySet());
-            return result.elements();
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    interface PropertySetter {
-
-        void set(Message message, Object value) throws MessageFormatException;
-    }
-
-    static {
-        JMS_PROPERTY_SETERS.put("JMSXDeliveryCount", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                Integer rc = (Integer) TypeConversionSupport.convert(value, Integer.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSXDeliveryCount cannot be set from a " + value.getClass().getName() + ".");
-                }
-                message.setRedeliveryCounter(rc.intValue() - 1);
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSXGroupID", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                String rc = (String) TypeConversionSupport.convert(value, String.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSXGroupID cannot be set from a " + value.getClass().getName() + ".");
-                }
-                message.setGroupID(rc);
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSXGroupSeq", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                Integer rc = (Integer) TypeConversionSupport.convert(value, Integer.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSXGroupSeq cannot be set from a " + value.getClass().getName() + ".");
-                }
-                message.setGroupSequence(rc.intValue());
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSCorrelationID", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                String rc = (String) TypeConversionSupport.convert(value, String.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSCorrelationID cannot be set from a " + value.getClass().getName() + ".");
-                }
-                ((ActiveMQMessage) message).setJMSCorrelationID(rc);
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSDeliveryMode", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                Integer rc = (Integer) TypeConversionSupport.convert(value, Integer.class);
-                if (rc == null) {
-                    Boolean bool = (Boolean) TypeConversionSupport.convert(value, Boolean.class);
-                    if (bool == null) {
-                        throw new MessageFormatException("Property JMSDeliveryMode cannot be set from a " + value.getClass().getName() + ".");
-                    }
-                    else {
-                        rc = bool.booleanValue() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT;
-                    }
-                }
-                ((ActiveMQMessage) message).setJMSDeliveryMode(rc);
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSExpiration", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                Long rc = (Long) TypeConversionSupport.convert(value, Long.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSExpiration cannot be set from a " + value.getClass().getName() + ".");
-                }
-                ((ActiveMQMessage) message).setJMSExpiration(rc.longValue());
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSPriority", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                Integer rc = (Integer) TypeConversionSupport.convert(value, Integer.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSPriority cannot be set from a " + value.getClass().getName() + ".");
-                }
-                ((ActiveMQMessage) message).setJMSPriority(rc.intValue());
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSRedelivered", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                Boolean rc = (Boolean) TypeConversionSupport.convert(value, Boolean.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSRedelivered cannot be set from a " + value.getClass().getName() + ".");
-                }
-                ((ActiveMQMessage) message).setJMSRedelivered(rc.booleanValue());
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSReplyTo", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                ActiveMQDestination rc = (ActiveMQDestination) TypeConversionSupport.convert(value, ActiveMQDestination.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSReplyTo cannot be set from a " + value.getClass().getName() + ".");
-                }
-                ((ActiveMQMessage) message).setReplyTo(rc);
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSTimestamp", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                Long rc = (Long) TypeConversionSupport.convert(value, Long.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSTimestamp cannot be set from a " + value.getClass().getName() + ".");
-                }
-                ((ActiveMQMessage) message).setJMSTimestamp(rc.longValue());
-            }
-        });
-        JMS_PROPERTY_SETERS.put("JMSType", new PropertySetter() {
-            public void set(Message message, Object value) throws MessageFormatException {
-                String rc = (String) TypeConversionSupport.convert(value, String.class);
-                if (rc == null) {
-                    throw new MessageFormatException("Property JMSType cannot be set from a " + value.getClass().getName() + ".");
-                }
-                ((ActiveMQMessage) message).setJMSType(rc);
-            }
-        });
-    }
-
-    public void setObjectProperty(String name, Object value) throws JMSException {
-        setObjectProperty(name, value, true);
-    }
-
-    public void setObjectProperty(String name, Object value, boolean checkReadOnly) throws JMSException {
-
-        if (checkReadOnly) {
-            checkReadOnlyProperties();
-        }
-        if (name == null || name.equals("")) {
-            throw new IllegalArgumentException("Property name cannot be empty or null");
-        }
-
-        checkValidObject(value);
-        value = convertScheduled(name, value);
-        PropertySetter setter = JMS_PROPERTY_SETERS.get(name);
-
-        if (setter != null && value != null) {
-            setter.set(this, value);
-        } else {
-            try {
-                this.setProperty(name, value);
-            } catch (IOException e) {
-                throw JMSExceptionSupport.create(e);
-            }
-        }
-    }
-
-    public void setProperties(Map properties) throws JMSException {
-        for (Iterator iter = properties.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry) iter.next();
-
-            // Lets use the object property method as we may contain standard
-            // extension headers like JMSXGroupID
-            setObjectProperty((String) entry.getKey(), entry.getValue());
-        }
-    }
-
-    protected void checkValidObject(Object value) throws MessageFormatException {
-
-        boolean valid = value instanceof Boolean || value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long;
-        valid = valid || value instanceof Float || value instanceof Double || value instanceof Character || value instanceof String || value == null;
-
-        if (!valid) {
-
-            ActiveMQConnection conn = getConnection();
-            // conn is null if we are in the broker rather than a JMS client
-            if (conn == null || conn.isNestedMapAndListEnabled()) {
-                if (!(value instanceof Map || value instanceof List)) {
-                    throw new MessageFormatException("Only objectified primitive objects, String, Map and List types are allowed but was: " + value + " type: " + value.getClass());
-                }
-            } else {
-                throw new MessageFormatException("Only objectified primitive objects and String types are allowed but was: " + value + " type: " + value.getClass());
-            }
-        }
-    }
-    
-    protected void  checkValidScheduled(String name, Object value) throws MessageFormatException {
-        if (AMQ_SCHEDULED_DELAY.equals(name) || AMQ_SCHEDULED_PERIOD.equals(name) || AMQ_SCHEDULED_REPEAT.equals(name)) {
-            if (value instanceof Long == false && value instanceof Integer == false) {
-                throw new MessageFormatException(name + " should be long or int value");
-            }
-        }
-        if (AMQ_SCHEDULED_CRON.equals(name)) {
-            CronParser.validate(value.toString());
-        }
-    }
-    
-    protected Object  convertScheduled(String name, Object value) throws MessageFormatException {
-        Object result = value;
-        if (AMQ_SCHEDULED_DELAY.equals(name)){
-            result = TypeConversionSupport.convert(value, Long.class);
-        }
-        else if (AMQ_SCHEDULED_PERIOD.equals(name)){
-            result = TypeConversionSupport.convert(value, Long.class);
-        }
-        else if (AMQ_SCHEDULED_REPEAT.equals(name)){
-            result = TypeConversionSupport.convert(value, Integer.class);
-        }
-        return result;
-    }
-
-    public Object getObjectProperty(String name) throws JMSException {
-        if (name == null) {
-            throw new NullPointerException("Property name cannot be null");
-        }
-
-        // PropertyExpression handles converting message headers to properties.
-        PropertyExpression expression = new PropertyExpression(name);
-        return expression.evaluate(this);
-    }
-
-    public boolean getBooleanProperty(String name) throws JMSException {
-        Object value = getObjectProperty(name);
-        if (value == null) {
-            return false;
-        }
-        Boolean rc = (Boolean) TypeConversionSupport.convert(value, Boolean.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a boolean");
-        }
-        return rc.booleanValue();
-    }
-
-    public byte getByteProperty(String name) throws JMSException {
-        Object value = getObjectProperty(name);
-        if (value == null) {
-            throw new NumberFormatException("property " + name + " was null");
-        }
-        Byte rc = (Byte) TypeConversionSupport.convert(value, Byte.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a byte");
-        }
-        return rc.byteValue();
-    }
-
-    public short getShortProperty(String name) throws JMSException {
-        Object value = getObjectProperty(name);
-        if (value == null) {
-            throw new NumberFormatException("property " + name + " was null");
-        }
-        Short rc = (Short) TypeConversionSupport.convert(value, Short.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a short");
-        }
-        return rc.shortValue();
-    }
-
-    public int getIntProperty(String name) throws JMSException {
-        Object value = getObjectProperty(name);
-        if (value == null) {
-            throw new NumberFormatException("property " + name + " was null");
-        }
-        Integer rc = (Integer) TypeConversionSupport.convert(value, Integer.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as an integer");
-        }
-        return rc.intValue();
-    }
-
-    public long getLongProperty(String name) throws JMSException {
-        Object value = getObjectProperty(name);
-        if (value == null) {
-            throw new NumberFormatException("property " + name + " was null");
-        }
-        Long rc = (Long) TypeConversionSupport.convert(value, Long.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a long");
-        }
-        return rc.longValue();
-    }
-
-    public float getFloatProperty(String name) throws JMSException {
-        Object value = getObjectProperty(name);
-        if (value == null) {
-            throw new NullPointerException("property " + name + " was null");
-        }
-        Float rc = (Float) TypeConversionSupport.convert(value, Float.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a float");
-        }
-        return rc.floatValue();
-    }
-
-    public double getDoubleProperty(String name) throws JMSException {
-        Object value = getObjectProperty(name);
-        if (value == null) {
-            throw new NullPointerException("property " + name + " was null");
-        }
-        Double rc = (Double) TypeConversionSupport.convert(value, Double.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a double");
-        }
-        return rc.doubleValue();
-    }
-
-    public String getStringProperty(String name) throws JMSException {
-        Object value = null;
-        if (name.equals("JMSXUserID")) {
-            value = getUserID();
-            if (value == null) {
-                value = getObjectProperty(name);
-            }
-        } else {
-            value = getObjectProperty(name);
-        }
-        if (value == null) {
-            return null;
-        }
-        String rc = (String) TypeConversionSupport.convert(value, String.class);
-        if (rc == null) {
-            throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a String");
-        }
-        return rc;
-    }
-
-    public void setBooleanProperty(String name, boolean value) throws JMSException {
-        setBooleanProperty(name, value, true);
-    }
-
-    public void setBooleanProperty(String name, boolean value, boolean checkReadOnly) throws JMSException {
-        setObjectProperty(name, Boolean.valueOf(value), checkReadOnly);
-    }
-
-    public void setByteProperty(String name, byte value) throws JMSException {
-        setObjectProperty(name, Byte.valueOf(value));
-    }
-
-    public void setShortProperty(String name, short value) throws JMSException {
-        setObjectProperty(name, Short.valueOf(value));
-    }
-
-    public void setIntProperty(String name, int value) throws JMSException {
-        setObjectProperty(name, Integer.valueOf(value));
-    }
-
-    public void setLongProperty(String name, long value) throws JMSException {
-        setObjectProperty(name, Long.valueOf(value));
-    }
-
-    public void setFloatProperty(String name, float value) throws JMSException {
-        setObjectProperty(name, new Float(value));
-    }
-
-    public void setDoubleProperty(String name, double value) throws JMSException {
-        setObjectProperty(name, new Double(value));
-    }
-
-    public void setStringProperty(String name, String value) throws JMSException {
-        setObjectProperty(name, value);
-    }
-
-    private void checkReadOnlyProperties() throws MessageNotWriteableException {
-        if (readOnlyProperties) {
-            throw new MessageNotWriteableException("Message properties are read-only");
-        }
-    }
-
-    protected void checkReadOnlyBody() throws MessageNotWriteableException {
-        if (readOnlyBody) {
-            throw new MessageNotWriteableException("Message body is read-only");
-        }
-    }
-
-    public Callback getAcknowledgeCallback() {
-        return acknowledgeCallback;
-    }
-
-    public void setAcknowledgeCallback(Callback acknowledgeCallback) {
-        this.acknowledgeCallback = acknowledgeCallback;
-    }
-
-    /**
-     * Send operation event listener. Used to get the message ready to be sent.
-     */
-    public void onSend() throws JMSException {
-        setReadOnlyBody(true);
-        setReadOnlyProperties(true);
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processMessage(this);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
deleted file mode 100755
index 35d6b03..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.command;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.InflaterInputStream;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ClassLoadingAwareObjectInputStream;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * An <CODE>ObjectMessage</CODE> object is used to send a message that
- * contains a serializable object in the Java programming language ("Java
- * object"). It inherits from the <CODE>Message</CODE> interface and adds a
- * body containing a single reference to an object. Only
- * <CODE>Serializable</CODE> Java objects can be used. <p/>
- * <P>
- * If a collection of Java objects must be sent, one of the
- * <CODE>Collection</CODE> classes provided since JDK 1.2 can be used. <p/>
- * <P>
- * When a client receives an <CODE>ObjectMessage</CODE>, it is in read-only
- * mode. If a client attempts to write to the message at this point, a
- * <CODE>MessageNotWriteableException</CODE> is thrown. If
- * <CODE>clearBody</CODE> is called, the message can now be both read from and
- * written to.
- * 
- * @openwire:marshaller code="26"
- * @see javax.jms.Session#createObjectMessage()
- * @see javax.jms.Session#createObjectMessage(Serializable)
- * @see javax.jms.BytesMessage
- * @see javax.jms.MapMessage
- * @see javax.jms.Message
- * @see javax.jms.StreamMessage
- * @see javax.jms.TextMessage
- */
-public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMessage {
-    
-    // TODO: verify classloader
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_OBJECT_MESSAGE;
-    static final ClassLoader ACTIVEMQ_CLASSLOADER = ActiveMQObjectMessage.class.getClassLoader(); 
-
-    protected transient Serializable object;
-
-    public Message copy() {
-        ActiveMQObjectMessage copy = new ActiveMQObjectMessage();
-        copy(copy);
-        return copy;
-    }
-
-    private void copy(ActiveMQObjectMessage copy) {
-        ActiveMQConnection connection = getConnection();
-        if (connection == null || !connection.isObjectMessageSerializationDefered()) {
-            storeContent();
-            copy.object = null;
-        } else {
-            copy.object = object;
-        }
-        super.copy(copy);
-        
-    }
-
-    public void storeContent() {
-        ByteSequence bodyAsBytes = getContent();
-        if (bodyAsBytes == null && object != null) {
-            try {
-                ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-                OutputStream os = bytesOut;
-                ActiveMQConnection connection = getConnection();
-                if (connection != null && connection.isUseCompression()) {
-                    compressed = true;
-                    os = new DeflaterOutputStream(os);
-                }
-                DataOutputStream dataOut = new DataOutputStream(os);
-                ObjectOutputStream objOut = new ObjectOutputStream(dataOut);
-                objOut.writeObject(object);
-                objOut.flush();
-                objOut.reset();
-                objOut.close();
-                setContent(bytesOut.toByteSequence());
-            } catch (IOException ioe) {
-                throw new RuntimeException(ioe.getMessage(), ioe);
-            }
-        }
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String getJMSXMimeType() {
-        return "jms/object-message";
-    }
-
-    /**
-     * Clears out the message body. Clearing a message's body does not clear its
-     * header values or property entries. <p/>
-     * <P>
-     * If this message body was read-only, calling this method leaves the
-     * message body in the same state as an empty body in a newly created
-     * message.
-     * 
-     * @throws JMSException if the JMS provider fails to clear the message body
-     *                 due to some internal error.
-     */
-
-    public void clearBody() throws JMSException {
-        super.clearBody();
-        this.object = null;
-    }
-
-    /**
-     * Sets the serializable object containing this message's data. It is
-     * important to note that an <CODE>ObjectMessage</CODE> contains a
-     * snapshot of the object at the time <CODE>setObject()</CODE> is called;
-     * subsequent modifications of the object will have no effect on the
-     * <CODE>ObjectMessage</CODE> body.
-     * 
-     * @param newObject the message's data
-     * @throws JMSException if the JMS provider fails to set the object due to
-     *                 some internal error.
-     * @throws javax.jms.MessageFormatException if object serialization fails.
-     * @throws javax.jms.MessageNotWriteableException if the message is in
-     *                 read-only mode.
-     */
-
-    public void setObject(Serializable newObject) throws JMSException {
-        checkReadOnlyBody();
-        this.object = newObject;
-        setContent(null);
-        ActiveMQConnection connection = getConnection();
-        if (connection == null || !connection.isObjectMessageSerializationDefered()) {
-            storeContent();
-        }
-    }
-
-    /**
-     * Gets the serializable object containing this message's data. The default
-     * value is null.
-     * 
-     * @return the serializable object containing this message's data
-     * @throws JMSException
-     */
-    public Serializable getObject() throws JMSException {
-        if (object == null && getContent() != null) {
-            try {
-                ByteSequence content = getContent();
-                InputStream is = new ByteArrayInputStream(content);
-                if (isCompressed()) {
-                    is = new InflaterInputStream(is);
-                }
-                DataInputStream dataIn = new DataInputStream(is);
-                ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn);
-                try {
-                    object = (Serializable)objIn.readObject();
-                } catch (ClassNotFoundException ce) {
-                    throw JMSExceptionSupport.create("Failed to build body from content. Serializable class not available to broker. Reason: " + ce, ce);
-                } finally {
-                    dataIn.close();
-                }
-            } catch (IOException e) {
-                throw JMSExceptionSupport.create("Failed to build body from bytes. Reason: " + e, e);
-            }
-        }
-        return this.object;
-    }
-
-    @Override
-    public void beforeMarshall(WireFormat wireFormat) throws IOException {
-        super.beforeMarshall(wireFormat);
-        // may have initiated on vm transport with deferred marshalling
-        storeContent();
-    }
-
-    public void clearMarshalledState() throws JMSException {
-        super.clearMarshalledState();
-        this.object = null;
-    }
-
-    public void onMessageRolledBack() {
-        super.onMessageRolledBack();
-
-        // lets force the object to be deserialized again - as we could have
-        // changed the object
-        object = null;
-    }
-
-    public String toString() {
-        try {
-            getObject();
-        } catch (JMSException e) {
-        }
-        return super.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java
deleted file mode 100755
index 3314501..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.command;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-
-/**
- * 
- * @org.apache.xbean.XBean element="queue" description="An ActiveMQ Queue
- *                         Destination"
- * 
- * @openwire:marshaller code="100"
- * 
- */
-public class ActiveMQQueue extends ActiveMQDestination implements Queue {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_QUEUE;
-    private static final long serialVersionUID = -3885260014960795889L;
-
-    public ActiveMQQueue() {
-    }
-
-    public ActiveMQQueue(String name) {
-        super(name);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isQueue() {
-        return true;
-    }
-
-    public String getQueueName() throws JMSException {
-        return getPhysicalName();
-    }
-
-    public byte getDestinationType() {
-        return QUEUE_TYPE;
-    }
-
-    protected String getQualifiedPrefix() {
-        return QUEUE_QUALIFIED_PREFIX;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
deleted file mode 100755
index 8fe2358..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
+++ /dev/null
@@ -1,1152 +0,0 @@
-/**
- * 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.command;
-
-import java.io.BufferedInputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.InflaterInputStream;
-
-import javax.jms.JMSException;
-import javax.jms.MessageEOFException;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotReadableException;
-import javax.jms.MessageNotWriteableException;
-import javax.jms.StreamMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.MarshallingSupport;
-
-/**
- * A <CODE>StreamMessage</CODE> object is used to send a stream of primitive
- * types in the Java programming language. It is filled and read sequentially.
- * It inherits from the <CODE>Message</CODE> interface and adds a stream
- * message body. Its methods are based largely on those found in
- * <CODE>java.io.DataInputStream</CODE> and
- * <CODE>java.io.DataOutputStream</CODE>. <p/>
- * <P>
- * The primitive types can be read or written explicitly using methods for each
- * type. They may also be read or written generically as objects. For instance,
- * a call to <CODE>StreamMessage.writeInt(6)</CODE> is equivalent to
- * <CODE>StreamMessage.writeObject(new
- * Integer(6))</CODE>. Both forms are
- * provided, because the explicit form is convenient for static programming, and
- * the object form is needed when types are not known at compile time. <p/>
- * <P>
- * When the message is first created, and when <CODE>clearBody</CODE> is
- * called, the body of the message is in write-only mode. After the first call
- * to <CODE>reset</CODE> has been made, the message body is in read-only mode.
- * After a message has been sent, the client that sent it can retain and modify
- * it without affecting the message that has been sent. The same message object
- * can be sent multiple times. When a message has been received, the provider
- * has called <CODE>reset</CODE> so that the message body is in read-only mode
- * for the client. <p/>
- * <P>
- * If <CODE>clearBody</CODE> is called on a message in read-only mode, the
- * message body is cleared and the message body is in write-only mode. <p/>
- * <P>
- * If a client attempts to read a message in write-only mode, a
- * <CODE>MessageNotReadableException</CODE> is thrown. <p/>
- * <P>
- * If a client attempts to write a message in read-only mode, a
- * <CODE>MessageNotWriteableException</CODE> is thrown. <p/>
- * <P>
- * <CODE>StreamMessage</CODE> objects support the following conversion table.
- * The marked cases must be supported. The unmarked cases must throw a
- * <CODE>JMSException</CODE>. The <CODE>String</CODE>-to-primitive
- * conversions may throw a runtime exception if the primitive's
- * <CODE>valueOf()</CODE> method does not accept it as a valid
- * <CODE>String</CODE> representation of the primitive. <p/>
- * <P>
- * A value written as the row type can be read as the column type. <p/>
- * 
- * <PRE>
- *  | | boolean byte short char int long float double String byte[]
- * |----------------------------------------------------------------------
- * |boolean | X X |byte | X X X X X |short | X X X X |char | X X |int | X X X
- * |long | X X |float | X X X |double | X X |String | X X X X X X X X |byte[] |
- * X |----------------------------------------------------------------------
- * 
- * </PRE>
- * 
- * <p/>
- * <P>
- * Attempting to read a null value as a primitive type must be treated as
- * calling the primitive's corresponding <code>valueOf(String)</code>
- * conversion method with a null value. Since <code>char</code> does not
- * support a <code>String</code> conversion, attempting to read a null value
- * as a <code>char</code> must throw a <code>NullPointerException</code>.
- * 
- * @openwire:marshaller code="27"
- * @see javax.jms.Session#createStreamMessage()
- * @see javax.jms.BytesMessage
- * @see javax.jms.MapMessage
- * @see javax.jms.Message
- * @see javax.jms.ObjectMessage
- * @see javax.jms.TextMessage
- */
-public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMessage {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_STREAM_MESSAGE;
-
-    protected transient DataOutputStream dataOut;
-    protected transient ByteArrayOutputStream bytesOut;
-    protected transient DataInputStream dataIn;
-    protected transient int remainingBytes = -1;
-
-    public Message copy() {
-        ActiveMQStreamMessage copy = new ActiveMQStreamMessage();
-        copy(copy);
-        return copy;
-    }
-
-    private void copy(ActiveMQStreamMessage copy) {
-        storeContent();
-        super.copy(copy);
-        copy.dataOut = null;
-        copy.bytesOut = null;
-        copy.dataIn = null;
-    }
-
-    public void onSend() throws JMSException {
-        super.onSend();
-        storeContent();
-    }
-
-    private void storeContent() {
-        if (dataOut != null) {
-            try {
-                dataOut.close();
-                setContent(bytesOut.toByteSequence());
-                bytesOut = null;
-                dataOut = null;
-            } catch (IOException ioe) {
-                throw new RuntimeException(ioe);
-            }
-        }
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String getJMSXMimeType() {
-        return "jms/stream-message";
-    }
-
-    /**
-     * Clears out the message body. Clearing a message's body does not clear its
-     * header values or property entries. <p/>
-     * <P>
-     * If this message body was read-only, calling this method leaves the
-     * message body in the same state as an empty body in a newly created
-     * message.
-     * 
-     * @throws JMSException if the JMS provider fails to clear the message body
-     *                 due to some internal error.
-     */
-
-    public void clearBody() throws JMSException {
-        super.clearBody();
-        this.dataOut = null;
-        this.dataIn = null;
-        this.bytesOut = null;
-        this.remainingBytes = -1;
-    }
-
-    /**
-     * Reads a <code>boolean</code> from the stream message.
-     * 
-     * @return the <code>boolean</code> value read
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public boolean readBoolean() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(10);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.BOOLEAN_TYPE) {
-                return this.dataIn.readBoolean();
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return Boolean.valueOf(this.dataIn.readUTF()).booleanValue();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to boolean.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a boolean type");
-            }
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a <code>byte</code> value from the stream message.
-     * 
-     * @return the next byte from the stream message as a 8-bit
-     *         <code>byte</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public byte readByte() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(10);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.BYTE_TYPE) {
-                return this.dataIn.readByte();
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return Byte.valueOf(this.dataIn.readUTF()).byteValue();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to byte.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a byte type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a 16-bit integer from the stream message.
-     * 
-     * @return a 16-bit integer from the stream message
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public short readShort() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(17);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.SHORT_TYPE) {
-                return this.dataIn.readShort();
-            }
-            if (type == MarshallingSupport.BYTE_TYPE) {
-                return this.dataIn.readByte();
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return Short.valueOf(this.dataIn.readUTF()).shortValue();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to short.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a short type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-
-    }
-
-    /**
-     * Reads a Unicode character value from the stream message.
-     * 
-     * @return a Unicode character from the stream message
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public char readChar() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(17);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.CHAR_TYPE) {
-                return this.dataIn.readChar();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to char.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a char type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a 32-bit integer from the stream message.
-     * 
-     * @return a 32-bit integer value from the stream message, interpreted as an
-     *         <code>int</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public int readInt() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(33);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.INTEGER_TYPE) {
-                return this.dataIn.readInt();
-            }
-            if (type == MarshallingSupport.SHORT_TYPE) {
-                return this.dataIn.readShort();
-            }
-            if (type == MarshallingSupport.BYTE_TYPE) {
-                return this.dataIn.readByte();
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return Integer.valueOf(this.dataIn.readUTF()).intValue();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to int.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not an int type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a 64-bit integer from the stream message.
-     * 
-     * @return a 64-bit integer value from the stream message, interpreted as a
-     *         <code>long</code>
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public long readLong() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(65);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.LONG_TYPE) {
-                return this.dataIn.readLong();
-            }
-            if (type == MarshallingSupport.INTEGER_TYPE) {
-                return this.dataIn.readInt();
-            }
-            if (type == MarshallingSupport.SHORT_TYPE) {
-                return this.dataIn.readShort();
-            }
-            if (type == MarshallingSupport.BYTE_TYPE) {
-                return this.dataIn.readByte();
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return Long.valueOf(this.dataIn.readUTF()).longValue();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to long.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a long type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a <code>float</code> from the stream message.
-     * 
-     * @return a <code>float</code> value from the stream message
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public float readFloat() throws JMSException {
-        initializeReading();
-        try {
-            this.dataIn.mark(33);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.FLOAT_TYPE) {
-                return this.dataIn.readFloat();
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return Float.valueOf(this.dataIn.readUTF()).floatValue();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to float.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a float type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a <code>double</code> from the stream message.
-     * 
-     * @return a <code>double</code> value from the stream message
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public double readDouble() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(65);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.DOUBLE_TYPE) {
-                return this.dataIn.readDouble();
-            }
-            if (type == MarshallingSupport.FLOAT_TYPE) {
-                return this.dataIn.readFloat();
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return Double.valueOf(this.dataIn.readUTF()).doubleValue();
-            }
-            if (type == MarshallingSupport.NULL) {
-                this.dataIn.reset();
-                throw new NullPointerException("Cannot convert NULL value to double.");
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a double type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a <CODE>String</CODE> from the stream message.
-     * 
-     * @return a Unicode string from the stream message
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     */
-
-    public String readString() throws JMSException {
-        initializeReading();
-        try {
-
-            this.dataIn.mark(65);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.NULL) {
-                return null;
-            }
-            if (type == MarshallingSupport.BIG_STRING_TYPE) {
-                return MarshallingSupport.readUTF8(dataIn);
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return this.dataIn.readUTF();
-            }
-            if (type == MarshallingSupport.LONG_TYPE) {
-                return new Long(this.dataIn.readLong()).toString();
-            }
-            if (type == MarshallingSupport.INTEGER_TYPE) {
-                return new Integer(this.dataIn.readInt()).toString();
-            }
-            if (type == MarshallingSupport.SHORT_TYPE) {
-                return new Short(this.dataIn.readShort()).toString();
-            }
-            if (type == MarshallingSupport.BYTE_TYPE) {
-                return new Byte(this.dataIn.readByte()).toString();
-            }
-            if (type == MarshallingSupport.FLOAT_TYPE) {
-                return new Float(this.dataIn.readFloat()).toString();
-            }
-            if (type == MarshallingSupport.DOUBLE_TYPE) {
-                return new Double(this.dataIn.readDouble()).toString();
-            }
-            if (type == MarshallingSupport.BOOLEAN_TYPE) {
-                return (this.dataIn.readBoolean() ? Boolean.TRUE : Boolean.FALSE).toString();
-            }
-            if (type == MarshallingSupport.CHAR_TYPE) {
-                return new Character(this.dataIn.readChar()).toString();
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException(" not a String type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            throw JMSExceptionSupport.createMessageEOFException(e);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.createMessageFormatException(e);
-        }
-    }
-
-    /**
-     * Reads a byte array field from the stream message into the specified
-     * <CODE>byte[]</CODE> object (the read buffer). <p/>
-     * <P>
-     * To read the field value, <CODE>readBytes</CODE> should be successively
-     * called until it returns a value less than the length of the read buffer.
-     * The value of the bytes in the buffer following the last byte read is
-     * undefined. <p/>
-     * <P>
-     * If <CODE>readBytes</CODE> returns a value equal to the length of the
-     * buffer, a subsequent <CODE>readBytes</CODE> call must be made. If there
-     * are no more bytes to be read, this call returns -1. <p/>
-     * <P>
-     * If the byte array field value is null, <CODE>readBytes</CODE> returns
-     * -1. <p/>
-     * <P>
-     * If the byte array field value is empty, <CODE>readBytes</CODE> returns
-     * 0. <p/>
-     * <P>
-     * Once the first <CODE>readBytes</CODE> call on a <CODE>byte[]</CODE>
-     * field value has been made, the full value of the field must be read
-     * before it is valid to read the next field. An attempt to read the next
-     * field before that has been done will throw a
-     * <CODE>MessageFormatException</CODE>. <p/>
-     * <P>
-     * To read the byte field value into a new <CODE>byte[]</CODE> object, use
-     * the <CODE>readObject</CODE> method.
-     * 
-     * @param value the buffer into which the data is read
-     * @return the total number of bytes read into the buffer, or -1 if there is
-     *         no more data because the end of the byte field has been reached
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     * @see #readObject()
-     */
-
-    public int readBytes(byte[] value) throws JMSException {
-
-        initializeReading();
-        try {
-            if (value == null) {
-                throw new NullPointerException();
-            }
-
-            if (remainingBytes == -1) {
-                this.dataIn.mark(value.length + 1);
-                int type = this.dataIn.read();
-                if (type == -1) {
-                    throw new MessageEOFException("reached end of data");
-                }
-                if (type != MarshallingSupport.BYTE_ARRAY_TYPE) {
-                    throw new MessageFormatException("Not a byte array");
-                }
-                remainingBytes = this.dataIn.readInt();
-            } else if (remainingBytes == 0) {
-                remainingBytes = -1;
-                return -1;
-            }
-
-            if (value.length <= remainingBytes) {
-                // small buffer
-                remainingBytes -= value.length;
-                this.dataIn.readFully(value);
-                return value.length;
-            } else {
-                // big buffer
-                int rc = this.dataIn.read(value, 0, remainingBytes);
-                remainingBytes = 0;
-                return rc;
-            }
-
-        } catch (EOFException e) {
-            JMSException jmsEx = new MessageEOFException(e.getMessage());
-            jmsEx.setLinkedException(e);
-            throw jmsEx;
-        } catch (IOException e) {
-            JMSException jmsEx = new MessageFormatException(e.getMessage());
-            jmsEx.setLinkedException(e);
-            throw jmsEx;
-        }
-    }
-
-    /**
-     * Reads an object from the stream message. <p/>
-     * <P>
-     * This method can be used to return, in objectified format, an object in
-     * the Java programming language ("Java object") that has been written to
-     * the stream with the equivalent <CODE>writeObject</CODE> method call, or
-     * its equivalent primitive <CODE>write<I>type</I></CODE> method. <p/>
-     * <P>
-     * Note that byte values are returned as <CODE>byte[]</CODE>, not
-     * <CODE>Byte[]</CODE>. <p/>
-     * <P>
-     * An attempt to call <CODE>readObject</CODE> to read a byte field value
-     * into a new <CODE>byte[]</CODE> object before the full value of the byte
-     * field has been read will throw a <CODE>MessageFormatException</CODE>.
-     * 
-     * @return a Java object from the stream message, in objectified format (for
-     *         example, if the object was written as an <CODE>int</CODE>, an
-     *         <CODE>Integer</CODE> is returned)
-     * @throws JMSException if the JMS provider fails to read the message due to
-     *                 some internal error.
-     * @throws MessageEOFException if unexpected end of message stream has been
-     *                 reached.
-     * @throws MessageFormatException if this type conversion is invalid.
-     * @throws MessageNotReadableException if the message is in write-only mode.
-     * @see #readBytes(byte[] value)
-     */
-
-    public Object readObject() throws JMSException {
-        initializeReading();
-        try {
-            this.dataIn.mark(65);
-            int type = this.dataIn.read();
-            if (type == -1) {
-                throw new MessageEOFException("reached end of data");
-            }
-            if (type == MarshallingSupport.NULL) {
-                return null;
-            }
-            if (type == MarshallingSupport.BIG_STRING_TYPE) {
-                return MarshallingSupport.readUTF8(dataIn);
-            }
-            if (type == MarshallingSupport.STRING_TYPE) {
-                return this.dataIn.readUTF();
-            }
-            if (type == MarshallingSupport.LONG_TYPE) {
-                return Long.valueOf(this.dataIn.readLong());
-            }
-            if (type == MarshallingSupport.INTEGER_TYPE) {
-                return Integer.valueOf(this.dataIn.readInt());
-            }
-            if (type == MarshallingSupport.SHORT_TYPE) {
-                return Short.valueOf(this.dataIn.readShort());
-            }
-            if (type == MarshallingSupport.BYTE_TYPE) {
-                return Byte.valueOf(this.dataIn.readByte());
-            }
-            if (type == MarshallingSupport.FLOAT_TYPE) {
-                return new Float(this.dataIn.readFloat());
-            }
-            if (type == MarshallingSupport.DOUBLE_TYPE) {
-                return new Double(this.dataIn.readDouble());
-            }
-            if (type == MarshallingSupport.BOOLEAN_TYPE) {
-                return this.dataIn.readBoolean() ? Boolean.TRUE : Boolean.FALSE;
-            }
-            if (type == MarshallingSupport.CHAR_TYPE) {
-                return Character.valueOf(this.dataIn.readChar());
-            }
-            if (type == MarshallingSupport.BYTE_ARRAY_TYPE) {
-                int len = this.dataIn.readInt();
-                byte[] value = new byte[len];
-                this.dataIn.readFully(value);
-                return value;
-            } else {
-                this.dataIn.reset();
-                throw new MessageFormatException("unknown type");
-            }
-        } catch (NumberFormatException mfe) {
-            try {
-                this.dataIn.reset();
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-            throw mfe;
-
-        } catch (EOFException e) {
-            JMSException jmsEx = new MessageEOFException(e.getMessage());
-            jmsEx.setLinkedException(e);
-            throw jmsEx;
-        } catch (IOException e) {
-            JMSException jmsEx = new MessageFormatException(e.getMessage());
-            jmsEx.setLinkedException(e);
-            throw jmsEx;
-        }
-    }
-
-    /**
-     * Writes a <code>boolean</code> to the stream message. The value
-     * <code>true</code> is written as the value <code>(byte)1</code>; the
-     * value <code>false</code> is written as the value <code>(byte)0</code>.
-     * 
-     * @param value the <code>boolean</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeBoolean(boolean value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalBoolean(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>byte</code> to the stream message.
-     * 
-     * @param value the <code>byte</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeByte(byte value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalByte(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>short</code> to the stream message.
-     * 
-     * @param value the <code>short</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeShort(short value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalShort(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>char</code> to the stream message.
-     * 
-     * @param value the <code>char</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeChar(char value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalChar(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes an <code>int</code> to the stream message.
-     * 
-     * @param value the <code>int</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeInt(int value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalInt(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>long</code> to the stream message.
-     * 
-     * @param value the <code>long</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeLong(long value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalLong(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>float</code> to the stream message.
-     * 
-     * @param value the <code>float</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeFloat(float value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalFloat(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>double</code> to the stream message.
-     * 
-     * @param value the <code>double</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeDouble(double value) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalDouble(dataOut, value);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a <code>String</code> to the stream message.
-     * 
-     * @param value the <code>String</code> value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeString(String value) throws JMSException {
-        initializeWriting();
-        try {
-            if (value == null) {
-                MarshallingSupport.marshalNull(dataOut);
-            } else {
-                MarshallingSupport.marshalString(dataOut, value);
-            }
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes a byte array field to the stream message. <p/>
-     * <P>
-     * The byte array <code>value</code> is written to the message as a byte
-     * array field. Consecutively written byte array fields are treated as two
-     * distinct fields when the fields are read.
-     * 
-     * @param value the byte array value to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeBytes(byte[] value) throws JMSException {
-        writeBytes(value, 0, value.length);
-    }
-
-    /**
-     * Writes a portion of a byte array as a byte array field to the stream
-     * message. <p/>
-     * <P>
-     * The a portion of the byte array <code>value</code> is written to the
-     * message as a byte array field. Consecutively written byte array fields
-     * are treated as two distinct fields when the fields are read.
-     * 
-     * @param value the byte array value to be written
-     * @param offset the initial offset within the byte array
-     * @param length the number of bytes to use
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeBytes(byte[] value, int offset, int length) throws JMSException {
-        initializeWriting();
-        try {
-            MarshallingSupport.marshalByteArray(dataOut, value, offset, length);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    /**
-     * Writes an object to the stream message. <p/>
-     * <P>
-     * This method works only for the objectified primitive object types (<code>Integer</code>,
-     * <code>Double</code>, <code>Long</code>&nbsp;...),
-     * <code>String</code> objects, and byte arrays.
-     * 
-     * @param value the Java object to be written
-     * @throws JMSException if the JMS provider fails to write the message due
-     *                 to some internal error.
-     * @throws MessageFormatException if the object is invalid.
-     * @throws MessageNotWriteableException if the message is in read-only mode.
-     */
-
-    public void writeObject(Object value) throws JMSException {
-        initializeWriting();
-        if (value == null) {
-            try {
-                MarshallingSupport.marshalNull(dataOut);
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            }
-        } else if (value instanceof String) {
-            writeString(value.toString());
-        } else if (value instanceof Character) {
-            writeChar(((Character)value).charValue());
-        } else if (value instanceof Boolean) {
-            writeBoolean(((Boolean)value).booleanValue());
-        } else if (value instanceof Byte) {
-            writeByte(((Byte)value).byteValue());
-        } else if (value instanceof Short) {
-            writeShort(((Short)value).shortValue());
-        } else if (value instanceof Integer) {
-            writeInt(((Integer)value).intValue());
-        } else if (value instanceof Float) {
-            writeFloat(((Float)value).floatValue());
-        } else if (value instanceof Double) {
-            writeDouble(((Double)value).doubleValue());
-        } else if (value instanceof byte[]) {
-            writeBytes((byte[])value);
-        }else if (value instanceof Long) {
-            writeLong(((Long)value).longValue());
-        }else {
-            throw new MessageFormatException("Unsupported Object type: " + value.getClass());
-        }
-    }
-
-    /**
-     * Puts the message body in read-only mode and repositions the stream of
-     * bytes to the beginning.
-     * 
-     * @throws JMSException if an internal error occurs
-     */
-
-    public void reset() throws JMSException {
-        storeContent();
-        this.bytesOut = null;
-        this.dataIn = null;
-        this.dataOut = null;
-        this.remainingBytes = -1;
-        setReadOnlyBody(true);
-    }
-
-    private void initializeWriting() throws MessageNotWriteableException {
-        checkReadOnlyBody();
-        if (this.dataOut == null) {
-            this.bytesOut = new ByteArrayOutputStream();
-            OutputStream os = bytesOut;
-            ActiveMQConnection connection = getConnection();
-            if (connection != null && connection.isUseCompression()) {
-                compressed = true;
-                os = new DeflaterOutputStream(os);
-            }
-            this.dataOut = new DataOutputStream(os);
-        }
-    }
-
-    protected void checkWriteOnlyBody() throws MessageNotReadableException {
-        if (!readOnlyBody) {
-            throw new MessageNotReadableException("Message body is write-only");
-        }
-    }
-
-    private void initializeReading() throws MessageNotReadableException {
-        checkWriteOnlyBody();
-        if (this.dataIn == null) {
-            ByteSequence data = getContent();
-            if (data == null) {
-                data = new ByteSequence(new byte[] {}, 0, 0);
-            }
-            InputStream is = new ByteArrayInputStream(data);
-            if (isCompressed()) {
-                is = new InflaterInputStream(is);
-                is = new BufferedInputStream(is);
-            }
-            this.dataIn = new DataInputStream(is);
-        }
-    }
-
-    public String toString() {
-        return super.toString() + " ActiveMQStreamMessage{ " + "bytesOut = " + bytesOut + ", dataOut = " + dataOut + ", dataIn = " + dataIn + " }";
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempDestination.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempDestination.java
deleted file mode 100755
index 85fb951..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempDestination.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.command;
-
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQConnection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @openwire:marshaller
- * 
- */
-public abstract class ActiveMQTempDestination extends ActiveMQDestination {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQTempDestination.class);
-    protected transient ActiveMQConnection connection;
-    protected transient String connectionId;
-    protected transient int sequenceId;
-
-    public ActiveMQTempDestination() {
-    }
-
-    public ActiveMQTempDestination(String name) {
-        super(name);
-    }
-
-    public ActiveMQTempDestination(String connectionId, long sequenceId) {
-        super(connectionId + ":" + sequenceId);
-    }
-
-    public boolean isTemporary() {
-        return true;
-    }
-
-    public void delete() throws JMSException {
-        if (connection != null) {
-            connection.deleteTempDestination(this);
-        }
-    }
-
-    public ActiveMQConnection getConnection() {
-        return connection;
-    }
-
-    public void setConnection(ActiveMQConnection connection) {
-        this.connection = connection;
-    }
-
-    public void setPhysicalName(String physicalName) {
-        super.setPhysicalName(physicalName);
-        if (!isComposite()) {
-            // Parse off the sequenceId off the end.
-            // this can fail if the temp destination is
-            // generated by another JMS system via the JMS<->JMS Bridge
-            int p = this.physicalName.lastIndexOf(":");
-            if (p >= 0) {
-                String seqStr = this.physicalName.substring(p + 1).trim();
-                if (seqStr != null && seqStr.length() > 0) {
-                    try {
-                        sequenceId = Integer.parseInt(seqStr);
-                    } catch (NumberFormatException e) {
-                        LOG.debug("Did not parse sequence Id from " + physicalName);
-                    }
-                    // The rest should be the connection id.
-                    connectionId = this.physicalName.substring(0, p);
-                }
-            }
-        }
-    }
-
-    public String getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(String connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    public int getSequenceId() {
-        return sequenceId;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java
deleted file mode 100755
index 9708e86..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.command;
-
-import javax.jms.JMSException;
-import javax.jms.TemporaryQueue;
-
-/**
- * @openwire:marshaller code="102"
- * 
- */
-public class ActiveMQTempQueue extends ActiveMQTempDestination implements TemporaryQueue {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_TEMP_QUEUE;
-    private static final long serialVersionUID = 6683049467527633867L;
-
-    public ActiveMQTempQueue() {
-    }
-
-    public ActiveMQTempQueue(String name) {
-        super(name);
-    }
-
-    public ActiveMQTempQueue(ConnectionId connectionId, long sequenceId) {
-        super(connectionId.getValue(), sequenceId);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isQueue() {
-        return true;
-    }
-
-    public String getQueueName() throws JMSException {
-        return getPhysicalName();
-    }
-
-    public byte getDestinationType() {
-        return TEMP_QUEUE_TYPE;
-    }
-
-    protected String getQualifiedPrefix() {
-        return TEMP_QUEUE_QUALIFED_PREFIX;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java
deleted file mode 100755
index 6a1dd80..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.command;
-
-import javax.jms.JMSException;
-import javax.jms.TemporaryTopic;
-
-/**
- * @openwire:marshaller code="103"
- * 
- */
-public class ActiveMQTempTopic extends ActiveMQTempDestination implements TemporaryTopic {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_TEMP_TOPIC;
-    private static final long serialVersionUID = -4325596784597300253L;
-
-    public ActiveMQTempTopic() {
-    }
-
-    public ActiveMQTempTopic(String name) {
-        super(name);
-    }
-
-    public ActiveMQTempTopic(ConnectionId connectionId, long sequenceId) {
-        super(connectionId.getValue(), sequenceId);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isTopic() {
-        return true;
-    }
-
-    public String getTopicName() throws JMSException {
-        return getPhysicalName();
-    }
-
-    public byte getDestinationType() {
-        return TEMP_TOPIC_TYPE;
-    }
-
-    protected String getQualifiedPrefix() {
-        return TEMP_TOPIC_QUALIFED_PREFIX;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java
deleted file mode 100755
index ca37ebc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * 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.command;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.InflaterInputStream;
-
-import javax.jms.JMSException;
-import javax.jms.MessageNotWriteableException;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.MarshallingSupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * @openwire:marshaller code="28"
- *
- */
-public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_TEXT_MESSAGE;
-
-    protected String text;
-
-    public Message copy() {
-        ActiveMQTextMessage copy = new ActiveMQTextMessage();
-        copy(copy);
-        return copy;
-    }
-
-    private void copy(ActiveMQTextMessage copy) {
-        super.copy(copy);
-        copy.text = text;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String getJMSXMimeType() {
-        return "jms/text-message";
-    }
-
-    public void setText(String text) throws MessageNotWriteableException {
-        checkReadOnlyBody();
-        this.text = text;
-        setContent(null);
-    }
-
-    public String getText() throws JMSException {
-        if (text == null && getContent() != null) {
-            InputStream is = null;
-            try {
-                ByteSequence bodyAsBytes = getContent();
-                if (bodyAsBytes != null) {
-                    is = new ByteArrayInputStream(bodyAsBytes);
-                    if (isCompressed()) {
-                        is = new InflaterInputStream(is);
-                    }
-                    DataInputStream dataIn = new DataInputStream(is);
-                    text = MarshallingSupport.readUTF8(dataIn);
-                    dataIn.close();
-                    setContent(null);
-                    setCompressed(false);
-                }
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create(ioe);
-            } finally {
-                if (is != null) {
-                    try {
-                        is.close();
-                    } catch (IOException e) {
-                        // ignore
-                    }
-                }
-            }
-        }
-        return text;
-    }
-
-    public void beforeMarshall(WireFormat wireFormat) throws IOException {
-        super.beforeMarshall(wireFormat);
-
-        ByteSequence content = getContent();
-        if (content == null && text != null) {
-            ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-            OutputStream os = bytesOut;
-            ActiveMQConnection connection = getConnection();
-            if (connection != null && connection.isUseCompression()) {
-                compressed = true;
-                os = new DeflaterOutputStream(os);
-            }
-            DataOutputStream dataOut = new DataOutputStream(os);
-            MarshallingSupport.writeUTF8(dataOut, this.text);
-            dataOut.close();
-            setContent(bytesOut.toByteSequence());
-        }
-    }
-
-    // see https://issues.apache.org/activemq/browse/AMQ-2103
-    // and https://issues.apache.org/activemq/browse/AMQ-2966
-    public void clearMarshalledState() throws JMSException {
-        super.clearMarshalledState();
-        this.text = null;
-    }
-
-    /**
-     * Clears out the message body. Clearing a message's body does not clear its
-     * header values or property entries. <p/>
-     * <P>
-     * If this message body was read-only, calling this method leaves the
-     * message body in the same state as an empty body in a newly created
-     * message.
-     *
-     * @throws JMSException if the JMS provider fails to clear the message body
-     *                 due to some internal error.
-     */
-    public void clearBody() throws JMSException {
-        super.clearBody();
-        this.text = null;
-    }
-
-    public int getSize() {
-        if (size == 0 && content == null && text != null) {
-            size = getMinimumMessageSize();
-            if (marshalledProperties != null) {
-                size += marshalledProperties.getLength();
-            }
-            size += text.length() * 2;
-        }
-        return super.getSize();
-    }
-
-    public String toString() {
-        try {
-            String text = getText();
-            if (text != null) {
-                text = MarshallingSupport.truncate64(text);
-                HashMap<String, Object> overrideFields = new HashMap<String, Object>();
-                overrideFields.put("text", text);
-                return super.toString(overrideFields);
-            }
-        } catch (JMSException e) {
-        }
-        return super.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTopic.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTopic.java
deleted file mode 100755
index 8ba5164..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTopic.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.command;
-
-import javax.jms.JMSException;
-import javax.jms.Topic;
-
-/**
- * @org.apache.xbean.XBean element="topic" description="An ActiveMQ Topic
- *                         Destination"
- * @openwire:marshaller code="101"
- * 
- */
-public class ActiveMQTopic extends ActiveMQDestination implements Topic {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_TOPIC;
-    private static final long serialVersionUID = 7300307405896488588L;
-
-    public ActiveMQTopic() {
-    }
-
-    public ActiveMQTopic(String name) {
-        super(name);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isTopic() {
-        return true;
-    }
-
-    public String getTopicName() throws JMSException {
-        return getPhysicalName();
-    }
-
-    public byte getDestinationType() {
-        return TOPIC_TYPE;
-    }
-
-    protected String getQualifiedPrefix() {
-        return TOPIC_QUALIFIED_PREFIX;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BaseCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/BaseCommand.java
deleted file mode 100755
index 66243fa..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BaseCommand.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.command;
-
-import java.util.Map;
-import org.apache.activemq.util.IntrospectionSupport;
-
-
-/**
- * 
- * @openwire:marshaller
- * 
- */
-public abstract class BaseCommand implements Command {
-
-    protected int commandId;
-    protected boolean responseRequired;
-    
-    private transient Endpoint from;
-    private transient Endpoint to;
-    
-    public void copy(BaseCommand copy) {
-        copy.commandId = commandId;
-        copy.responseRequired = responseRequired;
-    }    
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getCommandId() {
-        return commandId;
-    }
-
-    public void setCommandId(int commandId) {
-        this.commandId = commandId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean isResponseRequired() {
-        return responseRequired;
-    }
-
-    public void setResponseRequired(boolean responseRequired) {
-        this.responseRequired = responseRequired;
-    }
-
-    @Override
-    public String toString() {
-        return toString(null);
-    }
-    
-    public String toString(Map<String, Object>overrideFields) {
-    	return IntrospectionSupport.toString(this, BaseCommand.class, overrideFields);
-    }
-    
-    public boolean isWireFormatInfo() {
-        return false;
-    }
-
-    public boolean isBrokerInfo() {
-        return false;
-    }
-
-    public boolean isResponse() {
-        return false;
-    }
-
-    public boolean isMessageDispatch() {
-        return false;
-    }
-
-    public boolean isMessage() {
-        return false;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public boolean isMessageAck() {
-        return false;
-    }
-
-    public boolean isMessageDispatchNotification() {
-        return false;
-    }
-
-    public boolean isShutdownInfo() {
-        return false;
-    }
-    
-    public boolean isConnectionControl() {
-        return false;
-    }
-
-    /**
-     * The endpoint within the transport where this message came from.
-     */
-    public Endpoint getFrom() {
-        return from;
-    }
-
-    public void setFrom(Endpoint from) {
-        this.from = from;
-    }
-
-    /**
-     * The endpoint within the transport where this message is going to - null means all endpoints.
-     */
-    public Endpoint getTo() {
-        return to;
-    }
-
-    public void setTo(Endpoint to) {
-        this.to = to;
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BaseEndpoint.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/BaseEndpoint.java
deleted file mode 100644
index fdc86d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BaseEndpoint.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.command;
-
-/**
- * A default endpoint.
- * 
- * 
- */
-public class BaseEndpoint implements Endpoint {
-
-    private String name;
-    private BrokerInfo brokerInfo;
-
-    public BaseEndpoint(String name) {
-        this.name = name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String toString() {
-        String brokerText = "";
-        BrokerId brokerId = getBrokerId();
-        if (brokerId != null) {
-            brokerText = " broker: " + brokerId;
-        }
-        return "Endpoint[name:" + name + brokerText + "]";
-    }
-
-    /**
-     * Returns the broker ID for this endpoint, if the endpoint is a broker or
-     * null
-     */
-    public BrokerId getBrokerId() {
-        if (brokerInfo != null) {
-            return brokerInfo.getBrokerId();
-        }
-        return null;
-    }
-
-    /**
-     * Returns the broker information for this endpoint, if the endpoint is a
-     * broker or null
-     */
-    public BrokerInfo getBrokerInfo() {
-        return brokerInfo;
-    }
-
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-        this.brokerInfo = brokerInfo;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java
deleted file mode 100755
index 7c3c8c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="124"
- * 
- */
-public class BrokerId implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.BROKER_ID;
-    protected String value;
-
-    public BrokerId() {
-    }
-
-    public BrokerId(String brokerId) {
-        this.value = brokerId;
-    }
-
-    public int hashCode() {
-        return value.hashCode();
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != BrokerId.class) {
-            return false;
-        }
-        BrokerId id = (BrokerId)o;
-        return value.equals(id.value);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String toString() {
-        return value;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String brokerId) {
-        this.value = brokerId;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerInfo.java
deleted file mode 100755
index b542e61..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerInfo.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.util.Properties;
-import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.util.MarshallingSupport;
-
-/**
- * When a client connects to a broker, the broker send the client a BrokerInfo
- * so that the client knows which broker node he's talking to and also any peers
- * that the node has in his cluster. This is the broker helping the client out
- * in discovering other nodes in the cluster.
- * 
- * @openwire:marshaller code="2"
- * 
- */
-public class BrokerInfo extends BaseCommand {
-    private static final String PASSIVE_SLAVE_KEY = "passiveSlave";
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.BROKER_INFO;
-    BrokerId brokerId;
-    String brokerURL;
-    boolean slaveBroker;
-    boolean masterBroker;
-    boolean faultTolerantConfiguration;
-    boolean networkConnection;
-    boolean duplexConnection;
-    BrokerInfo peerBrokerInfos[];
-    String brokerName;
-    long connectionId;
-    String brokerUploadUrl;
-    String networkProperties;
-    transient int refCount = 0;
-    
-    public BrokerInfo copy() {
-        BrokerInfo copy = new BrokerInfo();
-        copy(copy);
-        return copy;
-    }
-    
-    private void copy(BrokerInfo copy) {
-        super.copy(copy);
-        copy.brokerId = this.brokerId;
-        copy.brokerURL = this.brokerURL;
-        copy.slaveBroker = this.slaveBroker;
-        copy.masterBroker = this.masterBroker;
-        copy.faultTolerantConfiguration = this.faultTolerantConfiguration;
-        copy.networkConnection = this.networkConnection;
-        copy.duplexConnection = this.duplexConnection;
-        copy.peerBrokerInfos = this.peerBrokerInfos;
-        copy.brokerName = this.brokerName;
-        copy.connectionId = this.connectionId;
-        copy.brokerUploadUrl = this.brokerUploadUrl;
-        copy.networkProperties = this.networkProperties;
-    } 
-
-    @Override
-    public boolean isBrokerInfo() {
-        return true;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public BrokerId getBrokerId() {
-        return brokerId;
-    }
-
-    public void setBrokerId(BrokerId brokerId) {
-        this.brokerId = brokerId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getBrokerURL() {
-        return brokerURL;
-    }
-
-    public void setBrokerURL(String brokerURL) {
-        this.brokerURL = brokerURL;
-    }
-
-    /**
-     * @openwire:property version=1 testSize=0
-     */
-    public BrokerInfo[] getPeerBrokerInfos() {
-        return peerBrokerInfos;
-    }
-
-    public void setPeerBrokerInfos(BrokerInfo[] peerBrokerInfos) {
-        this.peerBrokerInfos = peerBrokerInfos;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getBrokerName() {
-        return brokerName;
-    }
-
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processBrokerInfo(this);
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean isSlaveBroker() {
-        return slaveBroker;
-    }
-
-    public void setSlaveBroker(boolean slaveBroker) {
-        this.slaveBroker = slaveBroker;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean isMasterBroker() {
-        return masterBroker;
-    }
-
-    /**
-     * @param masterBroker The masterBroker to set.
-     */
-    public void setMasterBroker(boolean masterBroker) {
-        this.masterBroker = masterBroker;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the faultTolerantConfiguration.
-     */
-    public boolean isFaultTolerantConfiguration() {
-        return faultTolerantConfiguration;
-    }
-
-    /**
-     * @param faultTolerantConfiguration The faultTolerantConfiguration to set.
-     */
-    public void setFaultTolerantConfiguration(boolean faultTolerantConfiguration) {
-        this.faultTolerantConfiguration = faultTolerantConfiguration;
-    }
-
-    /**
-     * @openwire:property version=2
-     * @return the duplexConnection
-     */
-    public boolean isDuplexConnection() {
-        return this.duplexConnection;
-    }
-
-    /**
-     * @param duplexConnection the duplexConnection to set
-     */
-    public void setDuplexConnection(boolean duplexConnection) {
-        this.duplexConnection = duplexConnection;
-    }
-
-    /**
-     * @openwire:property version=2
-     * @return the networkConnection
-     */
-    public boolean isNetworkConnection() {
-        return this.networkConnection;
-    }
-
-    /**
-     * @param networkConnection the networkConnection to set
-     */
-    public void setNetworkConnection(boolean networkConnection) {
-        this.networkConnection = networkConnection;
-    }
-
-    /**
-     * The broker assigns a each connection it accepts a connection id.
-     * 
-     * @openwire:property version=2
-     */
-    public long getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(long connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * The URL to use when uploading BLOBs to the broker or some other external
-     * file/http server
-     * 
-     * @openwire:property version=3
-     */
-    public String getBrokerUploadUrl() {
-        return brokerUploadUrl;
-    }
-
-    public void setBrokerUploadUrl(String brokerUploadUrl) {
-        this.brokerUploadUrl = brokerUploadUrl;
-    }
-
-    /**
-     * @openwire:property version=3 cache=false
-     * @return the networkProperties
-     */
-    public String getNetworkProperties() {
-        return this.networkProperties;
-    }
-
-    /**
-     * @param networkProperties the networkProperties to set
-     */
-    public void setNetworkProperties(String networkProperties) {
-        this.networkProperties = networkProperties;
-    }
-    
-    public boolean isPassiveSlave() {
-        boolean result = false;
-        Properties props = getProperties();
-        if (props != null) {
-            result = Boolean.parseBoolean(props.getProperty(PASSIVE_SLAVE_KEY, "false"));
-        }
-        return result;
-    }
-    
-    public void setPassiveSlave(boolean value) {
-        Properties props = new Properties();
-        props.put(PASSIVE_SLAVE_KEY, Boolean.toString(value));
-        try {
-            this.networkProperties=MarshallingSupport.propertiesToString(props);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-    
-    public Properties getProperties() {
-        Properties result = null;
-        try {
-            result = MarshallingSupport.stringToProperties(getNetworkProperties());
-        } catch (IOException e) {
-           e.printStackTrace();
-        }
-        return result;
-    }
-
-    public int getRefCount() {
-        return refCount;
-    }
-
-    public void incrementRefCount() {
-        refCount++;
-    }
-    public int decrementRefCount() {
-        return --refCount;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Command.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/Command.java
deleted file mode 100755
index 125f4ac..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Command.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * The Command Pattern so that we can send and receive commands on the different
- * transports
- * 
- * 
- */
-public interface Command extends DataStructure {
-
-    void setCommandId(int value);
-
-    /**
-     * @return the unique ID of this request used to map responses to requests
-     */
-    int getCommandId();
-
-    void setResponseRequired(boolean responseRequired);
-
-    boolean isResponseRequired();
-
-    boolean isResponse();
-
-    boolean isMessageDispatch();
-
-    boolean isBrokerInfo();
-
-    boolean isWireFormatInfo();
-
-    boolean isMessage();
-
-    boolean isMessageAck();
-
-    boolean isMessageDispatchNotification();
-
-    boolean isShutdownInfo();
-    
-    boolean isConnectionControl();
-
-    Response visit(CommandVisitor visitor) throws Exception;
-
-    /**
-     * The endpoint within the transport where this message came from which
-     * could be null if the transport only supports a single endpoint.
-     */
-    Endpoint getFrom();
-
-    void setFrom(Endpoint from);
-
-    /**
-     * The endpoint within the transport where this message is going to - null
-     * means all endpoints.
-     */
-    Endpoint getTo();
-
-    void setTo(Endpoint to);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java
deleted file mode 100755
index bc2f5ce..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.command;
-
-/**
- * Holds the command id constants used by the command objects.
- * 
- * 
- */
-public interface CommandTypes {
-
-    // What is the latest version of the openwire protocol
-    byte PROTOCOL_VERSION = 7;
-
-    // What is the latest version of the openwire protocol used in the stores
-    byte PROTOCOL_STORE_VERSION = 6;
-
-
-    // A marshaling layer can use this type to specify a null object.
-    byte NULL = 0;
-
-    // /////////////////////////////////////////////////
-    //
-    // Info objects sent back and forth client/server when
-    // setting up a client connection.
-    //
-    // /////////////////////////////////////////////////
-    byte WIREFORMAT_INFO = 1;
-    byte BROKER_INFO = 2;
-    byte CONNECTION_INFO = 3;
-    byte SESSION_INFO = 4;
-    byte CONSUMER_INFO = 5;
-    byte PRODUCER_INFO = 6;
-    byte TRANSACTION_INFO = 7;
-    byte DESTINATION_INFO = 8;
-    byte REMOVE_SUBSCRIPTION_INFO = 9;
-    byte KEEP_ALIVE_INFO = 10;
-    byte SHUTDOWN_INFO = 11;
-    byte REMOVE_INFO = 12;
-    byte CONTROL_COMMAND = 14;
-    byte FLUSH_COMMAND = 15;
-    byte CONNECTION_ERROR = 16;
-    byte CONSUMER_CONTROL = 17;
-    byte CONNECTION_CONTROL = 18;
-
-    // /////////////////////////////////////////////////
-    //
-    // Messages that go back and forth between the client
-    // and the server.
-    //
-    // /////////////////////////////////////////////////
-    byte PRODUCER_ACK = 19;
-    byte MESSAGE_PULL = 20;
-    byte MESSAGE_DISPATCH = 21;
-    byte MESSAGE_ACK = 22;
-
-    byte ACTIVEMQ_MESSAGE = 23;
-    byte ACTIVEMQ_BYTES_MESSAGE = 24;
-    byte ACTIVEMQ_MAP_MESSAGE = 25;
-    byte ACTIVEMQ_OBJECT_MESSAGE = 26;
-    byte ACTIVEMQ_STREAM_MESSAGE = 27;
-    byte ACTIVEMQ_TEXT_MESSAGE = 28;
-    byte ACTIVEMQ_BLOB_MESSAGE = 29;
-
-    // /////////////////////////////////////////////////
-    //
-    // Command Response messages
-    //
-    // /////////////////////////////////////////////////
-    byte RESPONSE = 30;
-    byte EXCEPTION_RESPONSE = 31;
-    byte DATA_RESPONSE = 32;
-    byte DATA_ARRAY_RESPONSE = 33;
-    byte INTEGER_RESPONSE = 34;
-
-    // /////////////////////////////////////////////////
-    //
-    // Used by discovery
-    //
-    // /////////////////////////////////////////////////
-    byte DISCOVERY_EVENT = 40;
-
-    // /////////////////////////////////////////////////
-    //
-    // Command object used by the Journal
-    //
-    // /////////////////////////////////////////////////
-    byte JOURNAL_ACK = 50;
-    byte JOURNAL_REMOVE = 52;
-    byte JOURNAL_TRACE = 53;
-    byte JOURNAL_TRANSACTION = 54;
-    byte DURABLE_SUBSCRIPTION_INFO = 55;
-
-    // /////////////////////////////////////////////////
-    //
-    // Reliability and fragmentation
-    //
-    // /////////////////////////////////////////////////
-    byte PARTIAL_COMMAND = 60;
-    byte PARTIAL_LAST_COMMAND = 61;
-
-    byte REPLAY = 65;
-
-    // /////////////////////////////////////////////////
-    //
-    // Types used represent basic Java types.
-    //
-    // /////////////////////////////////////////////////
-    byte BYTE_TYPE = 70;
-    byte CHAR_TYPE = 71;
-    byte SHORT_TYPE = 72;
-    byte INTEGER_TYPE = 73;
-    byte LONG_TYPE = 74;
-    byte DOUBLE_TYPE = 75;
-    byte FLOAT_TYPE = 76;
-    byte STRING_TYPE = 77;
-    byte BOOLEAN_TYPE = 78;
-    byte BYTE_ARRAY_TYPE = 79;
-
-    // /////////////////////////////////////////////////
-    //
-    // Broker to Broker command objects
-    //
-    // /////////////////////////////////////////////////
-
-    byte MESSAGE_DISPATCH_NOTIFICATION = 90;
-    byte NETWORK_BRIDGE_FILTER = 91;
-
-    // /////////////////////////////////////////////////
-    //
-    // Data structures contained in the command objects.
-    //
-    // /////////////////////////////////////////////////
-    byte ACTIVEMQ_QUEUE = 100;
-    byte ACTIVEMQ_TOPIC = 101;
-    byte ACTIVEMQ_TEMP_QUEUE = 102;
-    byte ACTIVEMQ_TEMP_TOPIC = 103;
-
-    byte MESSAGE_ID = 110;
-    byte ACTIVEMQ_LOCAL_TRANSACTION_ID = 111;
-    byte ACTIVEMQ_XA_TRANSACTION_ID = 112;
-
-    byte CONNECTION_ID = 120;
-    byte SESSION_ID = 121;
-    byte CONSUMER_ID = 122;
-    byte PRODUCER_ID = 123;
-    byte BROKER_ID = 124;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionControl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionControl.java
deleted file mode 100644
index 65d0150..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionControl.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Used to start and stop transports as well as terminating clients.
- * 
- * @openwire:marshaller code="18"
- * 
- */
-public class ConnectionControl extends BaseCommand {
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_CONTROL;
-    protected boolean suspend;
-    protected boolean resume;
-    protected boolean close;
-    protected boolean exit;
-    protected boolean faultTolerant;
-    protected String connectedBrokers="";
-    protected String reconnectTo = "";
-    protected boolean rebalanceConnection;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processConnectionControl(this);
-    }
-    @Override
-    public boolean isConnectionControl() {
-        return true;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the close.
-     */
-    public boolean isClose() {
-        return close;
-    }
-
-    /**
-     * @param close The close to set.
-     */
-    public void setClose(boolean close) {
-        this.close = close;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the exit.
-     */
-    public boolean isExit() {
-        return exit;
-    }
-
-    /**
-     * @param exit The exit to set.
-     */
-    public void setExit(boolean exit) {
-        this.exit = exit;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the faultTolerant.
-     */
-    public boolean isFaultTolerant() {
-        return faultTolerant;
-    }
-
-    /**
-     * @param faultTolerant The faultTolerant to set.
-     */
-    public void setFaultTolerant(boolean faultTolerant) {
-        this.faultTolerant = faultTolerant;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the resume.
-     */
-    public boolean isResume() {
-        return resume;
-    }
-
-    /**
-     * @param resume The resume to set.
-     */
-    public void setResume(boolean resume) {
-        this.resume = resume;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the suspend.
-     */
-    public boolean isSuspend() {
-        return suspend;
-    }
-
-    /**
-     * @param suspend The suspend to set.
-     */
-    public void setSuspend(boolean suspend) {
-        this.suspend = suspend;
-    }
-
-    /**
-     * @openwire:property version=6 cache=false
-     * @return connected brokers.
-     */
-    public String getConnectedBrokers() {
-        return this.connectedBrokers;
-    }
-
-    /**
-     * @param connectedBrokers the connectedBrokers to set
-     */
-    public void setConnectedBrokers(String connectedBrokers) {
-        this.connectedBrokers = connectedBrokers;
-    }
-
-    /**
-     *  @openwire:property version=6 cache=false
-     * @return the reconnectTo
-     */
-    public String getReconnectTo() {
-        return this.reconnectTo;
-    }
-
-    /**
-     * @param reconnectTo the reconnectTo to set
-     */
-    public void setReconnectTo(String reconnectTo) {
-        this.reconnectTo = reconnectTo;
-    }
-
-    /**
-     * @return the rebalanceConnection
-     *  @openwire:property version=6 cache=false
-     */
-    public boolean isRebalanceConnection() {
-        return this.rebalanceConnection;
-    }
-
-    /**
-     * @param rebalanceConnection the rebalanceConnection to set
-     */
-    public void setRebalanceConnection(boolean rebalanceConnection) {
-        this.rebalanceConnection = rebalanceConnection;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java
deleted file mode 100644
index 97bb607..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * 
- * @openwire:marshaller code="16"
- * 
- */
-public class ConnectionError extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_ERROR;
-
-    private ConnectionId connectionId;
-    private Throwable exception;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processConnectionError(this);
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public Throwable getException() {
-        return exception;
-    }
-
-    public void setException(Throwable exception) {
-        this.exception = exception;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java
deleted file mode 100755
index eb1d797..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="120"
- * 
- */
-public class ConnectionId implements DataStructure, Comparable<ConnectionId> {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_ID;
-
-    protected String value;
-
-    public ConnectionId() {
-    }
-
-    public ConnectionId(String connectionId) {
-        this.value = connectionId;
-    }
-
-    public ConnectionId(ConnectionId id) {
-        this.value = id.getValue();
-    }
-
-    public ConnectionId(SessionId id) {
-        this.value = id.getConnectionId();
-    }
-
-    public ConnectionId(ProducerId id) {
-        this.value = id.getConnectionId();
-    }
-
-    public ConnectionId(ConsumerId id) {
-        this.value = id.getConnectionId();
-    }
-
-    public int hashCode() {
-        return value.hashCode();
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != ConnectionId.class) {
-            return false;
-        }
-        ConnectionId id = (ConnectionId)o;
-        return value.equals(id.value);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String toString() {
-        return value;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String connectionId) {
-        this.value = connectionId;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public int compareTo(ConnectionId o) {
-        return value.compareTo(o.value);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionInfo.java
deleted file mode 100755
index fdd1428..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionInfo.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * 
- * @openwire:marshaller code="3"
- * 
- */
-public class ConnectionInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_INFO;
-
-    protected ConnectionId connectionId;
-    protected String clientId;
-    protected String userName;
-    protected String password;
-    protected BrokerId[] brokerPath;
-    protected boolean brokerMasterConnector;
-    protected boolean manageable;
-    protected boolean clientMaster = true;
-    protected boolean faultTolerant = false;
-    protected transient Object transportContext;
-    private boolean failoverReconnect;
-
-    public ConnectionInfo() {
-    }
-
-    public ConnectionInfo(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public ConnectionInfo copy() {
-        ConnectionInfo copy = new ConnectionInfo();
-        copy(copy);
-        return copy;
-    }
-
-    private void copy(ConnectionInfo copy) {
-        super.copy(copy);
-        copy.connectionId = connectionId;
-        copy.clientId = clientId;
-        copy.userName = userName;
-        copy.password = password;
-        copy.brokerPath = brokerPath;
-        copy.brokerMasterConnector = brokerMasterConnector;
-        copy.manageable = manageable;
-        copy.clientMaster = clientMaster;
-        copy.transportContext = transportContext;
-        copy.faultTolerant= faultTolerant;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getClientId() {
-        return clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public RemoveInfo createRemoveCommand() {
-        RemoveInfo command = new RemoveInfo(getConnectionId());
-        command.setResponseRequired(isResponseRequired());
-        return command;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    /**
-     * The route of brokers the command has moved through.
-     * 
-     * @openwire:property version=1 cache=true
-     */
-    public BrokerId[] getBrokerPath() {
-        return brokerPath;
-    }
-
-    public void setBrokerPath(BrokerId[] brokerPath) {
-        this.brokerPath = brokerPath;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processAddConnection(this);
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean isBrokerMasterConnector() {
-        return brokerMasterConnector;
-    }
-
-    /**
-     * @param slaveBroker The brokerMasterConnector to set.
-     */
-    public void setBrokerMasterConnector(boolean slaveBroker) {
-        this.brokerMasterConnector = slaveBroker;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean isManageable() {
-        return manageable;
-    }
-
-    /**
-     * @param manageable The manageable to set.
-     */
-    public void setManageable(boolean manageable) {
-        this.manageable = manageable;
-    }
-
-    /**
-     * Transports may wish to associate additional data with the connection. For
-     * example, an SSL transport may use this field to attach the client
-     * certificates used when the conection was established.
-     * 
-     * @return the transport context.
-     */
-    public Object getTransportContext() {
-        return transportContext;
-    }
-
-    /**
-     * Transports may wish to associate additional data with the connection. For
-     * example, an SSL transport may use this field to attach the client
-     * certificates used when the conection was established.
-     * 
-     * @param transportContext value used to set the transport context
-     */
-    public void setTransportContext(Object transportContext) {
-        this.transportContext = transportContext;
-    }
-
-    /**
-     * @openwire:property version=2
-     * @return the clientMaster
-     */
-    public boolean isClientMaster() {
-        return this.clientMaster;
-    }
-
-    /**
-     * @param clientMaster the clientMaster to set
-     */
-    public void setClientMaster(boolean clientMaster) {
-        this.clientMaster = clientMaster;
-    }
-
-    /**
-     * @openwire:property version=6 cache=false
-     * @return the faultTolerant
-     */
-    public boolean isFaultTolerant() {
-        return this.faultTolerant;
-    }
-
-    /**
-     * @param faultTolerant the faultTolerant to set
-     */
-    public void setFaultTolerant(boolean faultTolerant) {
-        this.faultTolerant = faultTolerant;
-    }
-
-    /**
-     * @openwire:property version=6 cache=false
-     * @return failoverReconnect true if this is a reconnect
-     */
-    public boolean isFailoverReconnect() {
-        return this.failoverReconnect;
-    }
-
-    public void setFailoverReconnect(boolean failoverReconnect) {
-        this.failoverReconnect = failoverReconnect;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerControl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerControl.java
deleted file mode 100644
index 6e7bc17..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerControl.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Used to start and stop transports as well as terminating clients.
- * 
- * @openwire:marshaller code="17"
- * 
- */
-public class ConsumerControl extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_CONTROL;
-
-    protected ConsumerId consumerId;
-    protected boolean close;
-    protected boolean stop;
-    protected boolean start;
-    protected boolean flush;
-    protected int prefetch;
-    protected ActiveMQDestination destination;
-
-    /**
-     * @openwire:property version=6
-     * @return Returns the destination.
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processConsumerControl(this);
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the close.
-     */
-    public boolean isClose() {
-        return close;
-    }
-
-    /**
-     * @param close The close to set.
-     */
-    public void setClose(boolean close) {
-        this.close = close;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the consumerId.
-     */
-    public ConsumerId getConsumerId() {
-        return consumerId;
-    }
-
-    /**
-     * @param consumerId The consumerId to set.
-     */
-    public void setConsumerId(ConsumerId consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the prefetch.
-     */
-    public int getPrefetch() {
-        return prefetch;
-    }
-
-    /**
-     * @param prefetch The prefetch to set.
-     */
-    public void setPrefetch(int prefetch) {
-        this.prefetch = prefetch;
-    }
-
-    /**
-     * @openwire:property version=2
-     * @return the flush
-     */
-    public boolean isFlush() {
-        return this.flush;
-    }
-
-    /**
-     * @param flush the flush to set
-     */
-    public void setFlush(boolean flush) {
-        this.flush = flush;
-    }
-
-    /**
-     * @openwire:property version=2
-     * @return the start
-     */
-    public boolean isStart() {
-        return this.start;
-    }
-
-    /**
-     * @param start the start to set
-     */
-    public void setStart(boolean start) {
-        this.start = start;
-    }
-
-    /**
-     * @openwire:property version=2
-     * @return the stop
-     */
-    public boolean isStop() {
-        return this.stop;
-    }
-
-    /**
-     * @param stop the stop to set
-     */
-    public void setStop(boolean stop) {
-        this.stop = stop;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java
deleted file mode 100755
index e955763..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="122"
- * 
- */
-public class ConsumerId implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_ID;
-
-    protected String connectionId;
-    protected long sessionId;
-    protected long value;
-
-    protected transient int hashCode;
-    protected transient String key;
-    protected transient SessionId parentId;
-
-    public ConsumerId() {
-    }
-
-    public ConsumerId(SessionId sessionId, long consumerId) {
-        this.connectionId = sessionId.getConnectionId();
-        this.sessionId = sessionId.getValue();
-        this.value = consumerId;
-    }
-
-    public ConsumerId(ConsumerId id) {
-        this.connectionId = id.getConnectionId();
-        this.sessionId = id.getSessionId();
-        this.value = id.getValue();
-    }
-
-    public SessionId getParentId() {
-        if (parentId == null) {
-            parentId = new SessionId(this);
-        }
-        return parentId;
-    }
-
-    public int hashCode() {
-        if (hashCode == 0) {
-            hashCode = connectionId.hashCode() ^ (int)sessionId ^ (int)value;
-        }
-        return hashCode;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != ConsumerId.class) {
-            return false;
-        }
-        ConsumerId id = (ConsumerId)o;
-        return sessionId == id.sessionId && value == id.value && connectionId.equals(id.connectionId);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String toString() {
-        if (key == null) {
-            key = connectionId + ":" + sessionId + ":" + value;
-        }
-        return key;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(String connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getSessionId() {
-        return sessionId;
-    }
-
-    public void setSessionId(long sessionId) {
-        this.sessionId = sessionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getValue() {
-        return value;
-    }
-
-    public void setValue(long consumerId) {
-        this.value = consumerId;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
deleted file mode 100755
index b5bdde9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/**
- * 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.command;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * @openwire:marshaller code="5"
- * 
- */
-public class ConsumerInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_INFO;
-
-    public static final byte HIGH_PRIORITY = 10;
-    public static final byte NORMAL_PRIORITY = 0;
-    public static final byte NETWORK_CONSUMER_PRIORITY = -5;
-    public static final byte LOW_PRIORITY = -10;
-
-    protected ConsumerId consumerId;
-    protected ActiveMQDestination destination;
-    protected int prefetchSize;
-    protected int maximumPendingMessageLimit;
-    protected boolean browser;
-    protected boolean dispatchAsync;
-    protected String selector;
-    protected String subscriptionName;
-    protected boolean noLocal;
-    protected boolean exclusive;
-    protected boolean retroactive;
-    protected byte priority;
-    protected BrokerId[] brokerPath;
-    protected boolean optimizedAcknowledge;
-    // used by the broker
-    protected transient int currentPrefetchSize;
-    // if true, the consumer will not send range
-    protected boolean noRangeAcks;
-    // acks.
-
-    protected BooleanExpression additionalPredicate;
-    protected transient boolean networkSubscription; // this subscription
-    protected transient List<ConsumerId> networkConsumerIds; // the original consumerId
-
-    // not marshalled, populated from RemoveInfo, the last message delivered, used
-    // to suppress redelivery on prefetched messages after close
-    private transient long lastDeliveredSequenceId;
-
-    // originated from a
-    // network connection
-
-    public ConsumerInfo() {
-    }
-
-    public ConsumerInfo(ConsumerId consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    public ConsumerInfo(SessionInfo sessionInfo, long consumerId) {
-        this.consumerId = new ConsumerId(sessionInfo.getSessionId(), consumerId);
-    }
-
-    public ConsumerInfo copy() {
-        ConsumerInfo info = new ConsumerInfo();
-        copy(info);
-        return info;
-    }
-
-    public void copy(ConsumerInfo info) {
-        super.copy(info);
-        info.consumerId = consumerId;
-        info.destination = destination;
-        info.prefetchSize = prefetchSize;
-        info.maximumPendingMessageLimit = maximumPendingMessageLimit;
-        info.browser = browser;
-        info.dispatchAsync = dispatchAsync;
-        info.selector = selector;
-        info.subscriptionName = subscriptionName;
-        info.noLocal = noLocal;
-        info.exclusive = exclusive;
-        info.retroactive = retroactive;
-        info.priority = priority;
-        info.brokerPath = brokerPath;
-        info.networkSubscription = networkSubscription;
-        if (networkConsumerIds != null) {
-            if (info.networkConsumerIds==null){
-                info.networkConsumerIds=new ArrayList<ConsumerId>();
-            }
-            info.networkConsumerIds.addAll(networkConsumerIds);
-        }
-    }
-
-    public boolean isDurable() {
-        return subscriptionName != null;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * Is used to uniquely identify the consumer to the broker.
-     * 
-     * @openwire:property version=1 cache=true
-     */
-    public ConsumerId getConsumerId() {
-        return consumerId;
-    }
-
-    public void setConsumerId(ConsumerId consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    /**
-     * Is this consumer a queue browser?
-     * 
-     * @openwire:property version=1
-     */
-    public boolean isBrowser() {
-        return browser;
-    }
-
-    public void setBrowser(boolean browser) {
-        this.browser = browser;
-    }
-
-    /**
-     * The destination that the consumer is interested in receiving messages
-     * from. This destination could be a composite destination.
-     * 
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * How many messages a broker will send to the client without receiving an
-     * ack before he stops dispatching messages to the client.
-     * 
-     * @openwire:property version=1
-     */
-    public int getPrefetchSize() {
-        return prefetchSize;
-    }
-
-    public void setPrefetchSize(int prefetchSize) {
-        this.prefetchSize = prefetchSize;
-        this.currentPrefetchSize = prefetchSize;
-    }
-
-    /**
-     * How many messages a broker will keep around, above the prefetch limit,
-     * for non-durable topics before starting to discard older messages.
-     * 
-     * @openwire:property version=1
-     */
-    public int getMaximumPendingMessageLimit() {
-        return maximumPendingMessageLimit;
-    }
-
-    public void setMaximumPendingMessageLimit(int maximumPendingMessageLimit) {
-        this.maximumPendingMessageLimit = maximumPendingMessageLimit;
-    }
-
-    /**
-     * Should the broker dispatch a message to the consumer async? If he does it
-     * async, then he uses a more SEDA style of processing while if it is not
-     * done async, then he broker use a STP style of processing. STP is more
-     * appropriate in high bandwidth situations or when being used by and in vm
-     * transport.
-     * 
-     * @openwire:property version=1
-     */
-    public boolean isDispatchAsync() {
-        return dispatchAsync;
-    }
-
-    public void setDispatchAsync(boolean dispatchAsync) {
-        this.dispatchAsync = dispatchAsync;
-    }
-
-    /**
-     * The JMS selector used to filter out messages that this consumer is
-     * interested in.
-     * 
-     * @openwire:property version=1
-     */
-    public String getSelector() {
-        return selector;
-    }
-
-    public void setSelector(String selector) {
-        this.selector = selector;
-    }
-
-    /**
-     * Used to identify the name of a durable subscription.
-     * 
-     * @openwire:property version=1
-     */
-    public String getSubscriptionName() {
-        return subscriptionName;
-    }
-
-    public void setSubscriptionName(String durableSubscriptionId) {
-        this.subscriptionName = durableSubscriptionId;
-    }
-
-    /**
-     * @deprecated
-     * @return
-     * @see getSubscriptionName
-     */
-    public String getSubcriptionName() {
-        return subscriptionName;
-    }
-
-    /**
-     * @deprecated
-     * @see setSubscriptionName
-     * @param durableSubscriptionId
-     */
-    public void setSubcriptionName(String durableSubscriptionId) {
-        this.subscriptionName = durableSubscriptionId;
-    }
-
-    /**
-     * Set noLocal to true to avoid receiving messages that were published
-     * locally on the same connection.
-     * 
-     * @openwire:property version=1
-     */
-    public boolean isNoLocal() {
-        return noLocal;
-    }
-
-    public void setNoLocal(boolean noLocal) {
-        this.noLocal = noLocal;
-    }
-
-    /**
-     * An exclusive consumer locks out other consumers from being able to
-     * receive messages from the destination. If there are multiple exclusive
-     * consumers for a destination, the first one created will be the exclusive
-     * consumer of the destination.
-     * 
-     * @openwire:property version=1
-     */
-    public boolean isExclusive() {
-        return exclusive;
-    }
-
-    public void setExclusive(boolean exclusive) {
-        this.exclusive = exclusive;
-    }
-
-    /**
-     * A retroactive consumer only has meaning for Topics. It allows a consumer
-     * to retroactively see messages sent prior to the consumer being created.
-     * If the consumer is not durable, it will be delivered the last message
-     * published to the topic. If the consumer is durable then it will receive
-     * all persistent messages that are still stored in persistent storage for
-     * that topic.
-     * 
-     * @openwire:property version=1
-     */
-    public boolean isRetroactive() {
-        return retroactive;
-    }
-
-    public void setRetroactive(boolean retroactive) {
-        this.retroactive = retroactive;
-    }
-
-    public RemoveInfo createRemoveCommand() {
-        RemoveInfo command = new RemoveInfo(getConsumerId());
-        command.setResponseRequired(isResponseRequired());
-        return command;
-    }
-
-    /**
-     * The broker will avoid dispatching to a lower priority consumer if there
-     * are other higher priority consumers available to dispatch to. This allows
-     * letting the broker to have an affinity to higher priority consumers.
-     * Default priority is 0.
-     * 
-     * @openwire:property version=1
-     */
-    public byte getPriority() {
-        return priority;
-    }
-
-    public void setPriority(byte priority) {
-        this.priority = priority;
-    }
-
-    /**
-     * The route of brokers the command has moved through.
-     * 
-     * @openwire:property version=1 cache=true
-     */
-    public BrokerId[] getBrokerPath() {
-        return brokerPath;
-    }
-
-    public void setBrokerPath(BrokerId[] brokerPath) {
-        this.brokerPath = brokerPath;
-    }
-
-    /**
-     * A transient additional predicate that can be used it inject additional
-     * predicates into the selector on the fly. Handy if if say a Security
-     * Broker interceptor wants to filter out messages based on security level
-     * of the consumer.
-     * 
-     * @openwire:property version=1
-     */
-    public BooleanExpression getAdditionalPredicate() {
-        return additionalPredicate;
-    }
-
-    public void setAdditionalPredicate(BooleanExpression additionalPredicate) {
-        this.additionalPredicate = additionalPredicate;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processAddConsumer(this);
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the networkSubscription.
-     */
-    public boolean isNetworkSubscription() {
-        return networkSubscription;
-    }
-
-    /**
-     * @param networkSubscription The networkSubscription to set.
-     */
-    public void setNetworkSubscription(boolean networkSubscription) {
-        this.networkSubscription = networkSubscription;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the optimizedAcknowledge.
-     */
-    public boolean isOptimizedAcknowledge() {
-        return optimizedAcknowledge;
-    }
-
-    /**
-     * @param optimizedAcknowledge The optimizedAcknowledge to set.
-     */
-    public void setOptimizedAcknowledge(boolean optimizedAcknowledge) {
-        this.optimizedAcknowledge = optimizedAcknowledge;
-    }
-
-    /**
-     * @return Returns the currentPrefetchSize.
-     */
-    public int getCurrentPrefetchSize() {
-        return currentPrefetchSize;
-    }
-
-    /**
-     * @param currentPrefetchSize The currentPrefetchSize to set.
-     */
-    public void setCurrentPrefetchSize(int currentPrefetchSize) {
-        this.currentPrefetchSize = currentPrefetchSize;
-    }
-
-    /**
-     * The broker may be able to optimize it's processing or provides better QOS
-     * if it knows the consumer will not be sending ranged acks.
-     * 
-     * @return true if the consumer will not send range acks.
-     * @openwire:property version=1
-     */
-    public boolean isNoRangeAcks() {
-        return noRangeAcks;
-    }
-
-    public void setNoRangeAcks(boolean noRangeAcks) {
-        this.noRangeAcks = noRangeAcks;
-    }
-
-    public synchronized void addNetworkConsumerId(ConsumerId networkConsumerId) {
-        if (networkConsumerIds == null) {
-            networkConsumerIds = new ArrayList<ConsumerId>();
-        }
-        networkConsumerIds.add(networkConsumerId);
-    }
-
-    public synchronized void removeNetworkConsumerId(ConsumerId networkConsumerId) {
-        if (networkConsumerIds != null) {
-            networkConsumerIds.remove(networkConsumerId);
-            if (networkConsumerIds.isEmpty()) {
-                networkConsumerIds=null;
-            }
-        }
-    }
-    
-    public synchronized boolean isNetworkConsumersEmpty() {
-        return networkConsumerIds == null || networkConsumerIds.isEmpty();
-    }
-    
-    public synchronized List<ConsumerId> getNetworkConsumerIds(){
-        List<ConsumerId> result = new ArrayList<ConsumerId>();
-        if (networkConsumerIds != null) {
-            result.addAll(networkConsumerIds);
-        }
-        return result;
-    }
-
-    /**
-     * Tracks the original subscription id that causes a subscription to 
-     * percolate through a network when networkTTL > 1. Tracking the original
-     * subscription allows duplicate suppression.
-     * 
-     * @return array of the current subscription path
-     * @openwire:property version=4
-     */
-    public ConsumerId[] getNetworkConsumerPath() {
-        ConsumerId[] result = null;
-        if (networkConsumerIds != null) {
-            result = networkConsumerIds.toArray(new ConsumerId[0]);
-        }
-        return result;
-    }
-    
-    public void setNetworkConsumerPath(ConsumerId[] consumerPath) {
-        if (consumerPath != null) {
-            for (int i=0; i<consumerPath.length; i++) {
-                addNetworkConsumerId(consumerPath[i]);
-            }
-        }
-    }
-
-    public void setLastDeliveredSequenceId(long lastDeliveredSequenceId) {
-        this.lastDeliveredSequenceId  = lastDeliveredSequenceId;
-    }
-    
-    public long getLastDeliveredSequenceId() {
-        return lastDeliveredSequenceId;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ControlCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ControlCommand.java
deleted file mode 100644
index 43e5750..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ControlCommand.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Used to start and stop transports as well as terminating clients.
- * 
- * @openwire:marshaller code="14"
- * 
- * 
- */
-public class ControlCommand extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONTROL_COMMAND;
-
-    private String command;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getCommand() {
-        return command;
-    }
-
-    public void setCommand(String command) {
-        this.command = command;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processControlCommand(this);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataArrayResponse.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataArrayResponse.java
deleted file mode 100755
index 1aff3bb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataArrayResponse.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="33"
- * 
- */
-public class DataArrayResponse extends Response {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_ARRAY_RESPONSE;
-
-    DataStructure data[];
-
-
-    public DataArrayResponse() {
-    }
-
-    public DataArrayResponse(DataStructure data[]) {
-        this.data = data;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public DataStructure[] getData() {
-        return data;
-    }
-
-    public void setData(DataStructure[] data) {
-        this.data = data;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java
deleted file mode 100755
index 40487aa..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.command;
-
-/**
- * 
- * @openwire:marshaller code="32"
- * 
- */
-public class DataResponse extends Response {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_RESPONSE;
-
-    DataStructure data;
-
-    public DataResponse() {
-    }
-
-    public DataResponse(DataStructure data) {
-        this.data = data;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public DataStructure getData() {
-        return data;
-    }
-
-    public void setData(DataStructure data) {
-        this.data = data;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataStructure.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataStructure.java
deleted file mode 100755
index f0c268f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataStructure.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.command;
-
-/**
- * 
- */
-public interface DataStructure {
-    
-    /**
-     * @return The type of the data structure
-     */
-    byte getDataStructureType();
-    boolean isMarshallAware();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DestinationInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/DestinationInfo.java
deleted file mode 100755
index 9060838..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DestinationInfo.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Used to create and destroy destinations on the broker.
- * 
- * @openwire:marshaller code="8"
- * 
- */
-public class DestinationInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DESTINATION_INFO;
-
-    public static final byte ADD_OPERATION_TYPE = 0;
-    public static final byte REMOVE_OPERATION_TYPE = 1;
-
-    protected ConnectionId connectionId;
-    protected ActiveMQDestination destination;
-    protected byte operationType;
-    protected long timeout;
-    protected BrokerId[] brokerPath;
-
-    public DestinationInfo() {
-    }
-
-    public DestinationInfo(ConnectionId connectionId, byte operationType, ActiveMQDestination destination) {
-        this.connectionId = connectionId;
-        this.operationType = operationType;
-        this.destination = destination;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isAddOperation() {
-        return operationType == ADD_OPERATION_TYPE;
-    }
-
-    public boolean isRemoveOperation() {
-        return operationType == REMOVE_OPERATION_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public byte getOperationType() {
-        return operationType;
-    }
-
-    public void setOperationType(byte operationType) {
-        this.operationType = operationType;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getTimeout() {
-        return timeout;
-    }
-
-    public void setTimeout(long timeout) {
-        this.timeout = timeout;
-    }
-
-    /**
-     * The route of brokers the command has moved through.
-     * 
-     * @openwire:property version=1 cache=true
-     */
-    public BrokerId[] getBrokerPath() {
-        return brokerPath;
-    }
-
-    public void setBrokerPath(BrokerId[] brokerPath) {
-        this.brokerPath = brokerPath;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        if (isAddOperation()) {
-            return visitor.processAddDestination(this);
-        } else if (isRemoveOperation()) {
-            return visitor.processRemoveDestination(this);
-        }
-        throw new IOException("Unknown operation type: " + getOperationType());
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java
deleted file mode 100755
index cc76ab6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.command;
-
-/**
- * Represents a discovery event containing the details of the service
- * 
- * @openwire:marshaller code="40"
- * 
- */
-public class DiscoveryEvent implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DISCOVERY_EVENT;
-
-    protected String serviceName;
-    protected String brokerName;
-
-    public DiscoveryEvent() {
-    }
-
-    public DiscoveryEvent(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getBrokerName() {
-        return brokerName;
-    }
-
-    public void setBrokerName(String name) {
-        this.brokerName = name;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Endpoint.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/Endpoint.java
deleted file mode 100644
index ad5daaf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Endpoint.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.command;
-
-/**
- * Represents the logical endpoint where commands come from or are sent to.
- * 
- * For connection based transports like TCP / VM then there is a single endpoint
- * for all commands. For transports like multicast there could be different
- * endpoints being used on the same transport.
- * 
- * 
- */
-public interface Endpoint {
-    
-    /**
-     * Returns the name of the endpoint.
-     */
-    String getName();
-
-    /**
-     * Returns the broker ID for this endpoint, if the endpoint is a broker or
-     * null
-     */
-    BrokerId getBrokerId();
-
-    /**
-     * Returns the broker information for this endpoint, if the endpoint is a
-     * broker or null
-     */
-    BrokerInfo getBrokerInfo();
-
-    void setBrokerInfo(BrokerInfo brokerInfo);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ExceptionResponse.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ExceptionResponse.java
deleted file mode 100755
index 8bcaaf3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ExceptionResponse.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="31"
- * 
- */
-public class ExceptionResponse extends Response {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.EXCEPTION_RESPONSE;
-
-    Throwable exception;
-
-    public ExceptionResponse() {
-    }
-
-    public ExceptionResponse(Throwable e) {
-        setException(e);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public Throwable getException() {
-        return exception;
-    }
-
-    public void setException(Throwable exception) {
-        this.exception = exception;
-    }
-
-    public boolean isException() {
-        return true;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/FlushCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/FlushCommand.java
deleted file mode 100644
index f560384..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/FlushCommand.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * An indication to the transport layer that a flush is required.
- * 
- * @openwire:marshaller code="15"
- * 
- */
-public class FlushCommand extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.FLUSH_COMMAND;
-    public static final Command COMMAND = new FlushCommand();
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processFlush(this);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/IntegerResponse.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/IntegerResponse.java
deleted file mode 100755
index 1c589da..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/IntegerResponse.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="34"
- * 
- */
-public class IntegerResponse extends Response {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.INTEGER_RESPONSE;
-
-    int result;
-
-    public IntegerResponse() {
-    }
-
-    public IntegerResponse(int result) {
-        this.result = result;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getResult() {
-        return result;
-    }
-
-    public void setResult(int result) {
-        this.result = result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalQueueAck.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalQueueAck.java
deleted file mode 100755
index 40c4ad4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalQueueAck.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * @openwire:marshaller code="52"
- * 
- */
-public class JournalQueueAck implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_REMOVE;
-
-    ActiveMQDestination destination;
-    MessageAck messageAck;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public MessageAck getMessageAck() {
-        return messageAck;
-    }
-
-    public void setMessageAck(MessageAck messageAck) {
-        this.messageAck = messageAck;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public String toString() {
-        return IntrospectionSupport.toString(this, JournalQueueAck.class);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTopicAck.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTopicAck.java
deleted file mode 100755
index bca9f54..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTopicAck.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * @openwire:marshaller code="50"
- * 
- */
-public class JournalTopicAck implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_ACK;
-
-    ActiveMQDestination destination;
-    String clientId;
-    String subscritionName;
-    MessageId messageId;
-    long messageSequenceId;
-    TransactionId transactionId;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public MessageId getMessageId() {
-        return messageId;
-    }
-
-    public void setMessageId(MessageId messageId) {
-        this.messageId = messageId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getMessageSequenceId() {
-        return messageSequenceId;
-    }
-
-    public void setMessageSequenceId(long messageSequenceId) {
-        this.messageSequenceId = messageSequenceId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getSubscritionName() {
-        return subscritionName;
-    }
-
-    public void setSubscritionName(String subscritionName) {
-        this.subscritionName = subscritionName;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getClientId() {
-        return clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public TransactionId getTransactionId() {
-        return transactionId;
-    }
-
-    public void setTransactionId(TransactionId transaction) {
-        this.transactionId = transaction;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public String toString() {
-        return IntrospectionSupport.toString(this, JournalTopicAck.class);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTrace.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTrace.java
deleted file mode 100755
index d928af7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTrace.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * @openwire:marshaller code="53"
- * 
- */
-public class JournalTrace implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRACE;
-
-    private String message;
-
-    public JournalTrace() {
-
-    }
-
-    public JournalTrace(String message) {
-        this.message = message;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getMessage() {
-        return message;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public String toString() {
-        return IntrospectionSupport.toString(this, JournalTrace.class);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTransaction.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTransaction.java
deleted file mode 100755
index 58192d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/JournalTransaction.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * @openwire:marshaller code="54"
- */
-public class JournalTransaction implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRANSACTION;
-
-    public static final byte XA_PREPARE = 1;
-    public static final byte XA_COMMIT = 2;
-    public static final byte XA_ROLLBACK = 3;
-    public static final byte LOCAL_COMMIT = 4;
-    public static final byte LOCAL_ROLLBACK = 5;
-
-    public byte type;
-    public boolean wasPrepared;
-    public TransactionId transactionId;
-
-    public JournalTransaction(byte type, TransactionId transactionId, boolean wasPrepared) {
-        this.type = type;
-        this.transactionId = transactionId;
-        this.wasPrepared = wasPrepared;
-    }
-
-    public JournalTransaction() {
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public TransactionId getTransactionId() {
-        return transactionId;
-    }
-
-    public void setTransactionId(TransactionId transactionId) {
-        this.transactionId = transactionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public byte getType() {
-        return type;
-    }
-
-    public void setType(byte type) {
-        this.type = type;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean getWasPrepared() {
-        return wasPrepared;
-    }
-
-    public void setWasPrepared(boolean wasPrepared) {
-        this.wasPrepared = wasPrepared;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public String toString() {
-        return IntrospectionSupport.toString(this, JournalTransaction.class);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/KeepAliveInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/KeepAliveInfo.java
deleted file mode 100755
index 85d62df..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/KeepAliveInfo.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * @openwire:marshaller code="10"
- * 
- */
-public class KeepAliveInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.KEEP_ALIVE_INFO;
-
-    private transient Endpoint from;
-    private transient Endpoint to;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isResponse() {
-        return false;
-    }
-
-    public boolean isMessageDispatch() {
-        return false;
-    }
-
-    public boolean isMessage() {
-        return false;
-    }
-
-    public boolean isMessageAck() {
-        return false;
-    }
-
-    public boolean isBrokerInfo() {
-        return false;
-    }
-
-    public boolean isWireFormatInfo() {
-        return false;
-    }
-
-    /**
-     * The endpoint within the transport where this message came from.
-     */
-    public Endpoint getFrom() {
-        return from;
-    }
-
-    public void setFrom(Endpoint from) {
-        this.from = from;
-    }
-
-    /**
-     * The endpoint within the transport where this message is going to - null
-     * means all endpoints.
-     */
-    public Endpoint getTo() {
-        return to;
-    }
-
-    public void setTo(Endpoint to) {
-        this.to = to;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processKeepAlive(this);
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public boolean isMessageDispatchNotification() {
-        return false;
-    }
-
-    public boolean isShutdownInfo() {
-        return false;
-    }
-
-    public String toString() {
-        return IntrospectionSupport.toString(this, KeepAliveInfo.class);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/LastPartialCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/LastPartialCommand.java
deleted file mode 100644
index e86250a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/LastPartialCommand.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Represents the end marker of a stream of {@link PartialCommand} instances.
- * 
- * @openwire:marshaller code="61"
- * 
- */
-public class LastPartialCommand extends PartialCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PARTIAL_LAST_COMMAND;
-
-    public LastPartialCommand() {
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        throw new IllegalStateException("The transport layer should filter out LastPartialCommand instances but received: " + this);
-    }
-
-    /**
-     * Lets copy across any transient fields from this command 
-     * to the complete command when it is unmarshalled on the other end
-     *
-     * @param completeCommand the newly unmarshalled complete command
-     */
-    public void configure(Command completeCommand) {
-        // copy across the transient properties added by the low level transport
-        completeCommand.setFrom(getFrom());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java
deleted file mode 100755
index c073888..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="111"
- * 
- */
-public class LocalTransactionId extends TransactionId implements Comparable<LocalTransactionId> {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_LOCAL_TRANSACTION_ID;
-
-    protected ConnectionId connectionId;
-    protected long value;
-
-    private transient String transactionKey;
-    private transient int hashCode;
-
-    public LocalTransactionId() {
-    }
-
-    public LocalTransactionId(ConnectionId connectionId, long transactionId) {
-        this.connectionId = connectionId;
-        this.value = transactionId;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isXATransaction() {
-        return false;
-    }
-
-    public boolean isLocalTransaction() {
-        return true;
-    }
-
-    public String getTransactionKey() {
-        if (transactionKey == null) {
-            transactionKey = "TX:" + connectionId + ":" + value;
-        }
-        return transactionKey;
-    }
-
-    public String toString() {
-        return getTransactionKey();
-    }
-
-    public int hashCode() {
-        if (hashCode == 0) {
-            hashCode = connectionId.hashCode() ^ (int)value;
-        }
-        return hashCode;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != LocalTransactionId.class) {
-            return false;
-        }
-        LocalTransactionId tx = (LocalTransactionId)o;
-        return value == tx.value && connectionId.equals(tx.connectionId);
-    }
-
-    /**
-     * @param o
-     * @return
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
-     */
-    public int compareTo(LocalTransactionId o) {
-        int result = connectionId.compareTo(o.connectionId);
-        if (result == 0) {
-            result = (int)(value - o.value);
-        }
-        return result;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getValue() {
-        return value;
-    }
-
-    public void setValue(long transactionId) {
-        this.value = transactionId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MarshallAware.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/MarshallAware.java
deleted file mode 100755
index 154a11d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MarshallAware.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-
-import org.apache.activemq.wireformat.WireFormat;
-
-public interface MarshallAware {
-
-    void beforeMarshall(WireFormat wireFormat) throws IOException;
-
-    void afterMarshall(WireFormat wireFormat) throws IOException;
-
-    void beforeUnmarshall(WireFormat wireFormat) throws IOException;
-
-    void afterUnmarshall(WireFormat wireFormat) throws IOException;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java
deleted file mode 100755
index 774c36d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java
+++ /dev/null
@@ -1,759 +0,0 @@
-/**
- * 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.command;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.MarshallingSupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Represents an ActiveMQ message
- *
- * @openwire:marshaller
- *
- */
-public abstract class Message extends BaseCommand implements MarshallAware, MessageReference {
-
-    /**
-     * The default minimum amount of memory a message is assumed to use
-     */
-    public static final int DEFAULT_MINIMUM_MESSAGE_SIZE = 1024;
-
-    protected MessageId messageId;
-    protected ActiveMQDestination originalDestination;
-    protected TransactionId originalTransactionId;
-
-    protected ProducerId producerId;
-    protected ActiveMQDestination destination;
-    protected TransactionId transactionId;
-
-    protected long expiration;
-    protected long timestamp;
-    protected long arrival;
-    protected long brokerInTime;
-    protected long brokerOutTime;
-    protected String correlationId;
-    protected ActiveMQDestination replyTo;
-    protected boolean persistent;
-    protected String type;
-    protected byte priority;
-    protected String groupID;
-    protected int groupSequence;
-    protected ConsumerId targetConsumerId;
-    protected boolean compressed;
-    protected String userID;
-
-    protected ByteSequence content;
-    protected ByteSequence marshalledProperties;
-    protected DataStructure dataStructure;
-    protected int redeliveryCounter;
-
-    protected int size;
-    protected Map<String, Object> properties;
-    protected boolean readOnlyProperties;
-    protected boolean readOnlyBody;
-    protected transient boolean recievedByDFBridge;
-    protected boolean droppable;
-
-    private transient short referenceCount;
-    private transient ActiveMQConnection connection;
-    private transient org.apache.activemq.broker.region.Destination regionDestination;
-    private transient MemoryUsage memoryUsage;
-
-    private BrokerId[] brokerPath;
-    private BrokerId[] cluster;
-
-    public abstract Message copy();
-    public abstract void clearBody() throws JMSException;
-
-    // useful to reduce the memory footprint of a persisted message
-    public void clearMarshalledState() throws JMSException {
-        properties = null;
-    }
-
-    protected void copy(Message copy) {
-        super.copy(copy);
-        copy.producerId = producerId;
-        copy.transactionId = transactionId;
-        copy.destination = destination;
-        copy.messageId = messageId != null ? messageId.copy() : null;
-        copy.originalDestination = originalDestination;
-        copy.originalTransactionId = originalTransactionId;
-        copy.expiration = expiration;
-        copy.timestamp = timestamp;
-        copy.correlationId = correlationId;
-        copy.replyTo = replyTo;
-        copy.persistent = persistent;
-        copy.redeliveryCounter = redeliveryCounter;
-        copy.type = type;
-        copy.priority = priority;
-        copy.size = size;
-        copy.groupID = groupID;
-        copy.userID = userID;
-        copy.groupSequence = groupSequence;
-
-        if (properties != null) {
-            copy.properties = new HashMap<String, Object>(properties);
-
-            // The new message hasn't expired, so remove this feild.
-            copy.properties.remove(RegionBroker.ORIGINAL_EXPIRATION);
-        } else {
-            copy.properties = properties;
-        }
-
-        copy.content = content;
-        copy.marshalledProperties = marshalledProperties;
-        copy.dataStructure = dataStructure;
-        copy.readOnlyProperties = readOnlyProperties;
-        copy.readOnlyBody = readOnlyBody;
-        copy.compressed = compressed;
-        copy.recievedByDFBridge = recievedByDFBridge;
-
-        copy.arrival = arrival;
-        copy.connection = connection;
-        copy.regionDestination = regionDestination;
-        copy.brokerInTime = brokerInTime;
-        copy.brokerOutTime = brokerOutTime;
-        copy.memoryUsage=this.memoryUsage;
-        copy.brokerPath = brokerPath;
-
-        // lets not copy the following fields
-        // copy.targetConsumerId = targetConsumerId;
-        // copy.referenceCount = referenceCount;
-    }
-
-    public Object getProperty(String name) throws IOException {
-        if (properties == null) {
-            if (marshalledProperties == null) {
-                return null;
-            }
-            properties = unmarsallProperties(marshalledProperties);
-        }
-        return properties.get(name);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Map<String, Object> getProperties() throws IOException {
-        if (properties == null) {
-            if (marshalledProperties == null) {
-                return Collections.EMPTY_MAP;
-            }
-            properties = unmarsallProperties(marshalledProperties);
-        }
-        return Collections.unmodifiableMap(properties);
-    }
-
-    public void clearProperties() {
-        marshalledProperties = null;
-        properties = null;
-    }
-
-    public void setProperty(String name, Object value) throws IOException {
-        lazyCreateProperties();
-        properties.put(name, value);
-    }
-
-    public void removeProperty(String name) throws IOException {
-        lazyCreateProperties();
-        properties.remove(name);
-    }
-
-    protected void lazyCreateProperties() throws IOException {
-        if (properties == null) {
-            if (marshalledProperties == null) {
-                properties = new HashMap<String, Object>();
-            } else {
-                properties = unmarsallProperties(marshalledProperties);
-                marshalledProperties = null;
-            }
-        }
-    }
-
-    private Map<String, Object> unmarsallProperties(ByteSequence marshalledProperties) throws IOException {
-        return MarshallingSupport.unmarshalPrimitiveMap(new DataInputStream(new ByteArrayInputStream(marshalledProperties)));
-    }
-
-    public void beforeMarshall(WireFormat wireFormat) throws IOException {
-        // Need to marshal the properties.
-        if (marshalledProperties == null && properties != null) {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream os = new DataOutputStream(baos);
-            MarshallingSupport.marshalPrimitiveMap(properties, os);
-            os.close();
-            marshalledProperties = baos.toByteSequence();
-        }
-    }
-
-    public void afterMarshall(WireFormat wireFormat) throws IOException {
-    }
-
-    public void beforeUnmarshall(WireFormat wireFormat) throws IOException {
-    }
-
-    public void afterUnmarshall(WireFormat wireFormat) throws IOException {
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    //
-    // Simple Field accessors
-    //
-    // /////////////////////////////////////////////////////////////////
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ProducerId getProducerId() {
-        return producerId;
-    }
-
-    public void setProducerId(ProducerId producerId) {
-        this.producerId = producerId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public TransactionId getTransactionId() {
-        return transactionId;
-    }
-
-    public void setTransactionId(TransactionId transactionId) {
-        this.transactionId = transactionId;
-    }
-
-    public boolean isInTransaction() {
-        return transactionId != null;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getOriginalDestination() {
-        return originalDestination;
-    }
-
-    public void setOriginalDestination(ActiveMQDestination destination) {
-        this.originalDestination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public MessageId getMessageId() {
-        return messageId;
-    }
-
-    public void setMessageId(MessageId messageId) {
-        this.messageId = messageId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public TransactionId getOriginalTransactionId() {
-        return originalTransactionId;
-    }
-
-    public void setOriginalTransactionId(TransactionId transactionId) {
-        this.originalTransactionId = transactionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getGroupID() {
-        return groupID;
-    }
-
-    public void setGroupID(String groupID) {
-        this.groupID = groupID;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getGroupSequence() {
-        return groupSequence;
-    }
-
-    public void setGroupSequence(int groupSequence) {
-        this.groupSequence = groupSequence;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getCorrelationId() {
-        return correlationId;
-    }
-
-    public void setCorrelationId(String correlationId) {
-        this.correlationId = correlationId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean isPersistent() {
-        return persistent;
-    }
-
-    public void setPersistent(boolean deliveryMode) {
-        this.persistent = deliveryMode;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getExpiration() {
-        return expiration;
-    }
-
-    public void setExpiration(long expiration) {
-        this.expiration = expiration;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public byte getPriority() {
-        return priority;
-    }
-
-    public void setPriority(byte priority) {
-        if (priority < 0) {
-            this.priority = 0;
-        } else if (priority > 9) {
-            this.priority = 9;
-        } else {
-            this.priority = priority;
-        }
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public ActiveMQDestination getReplyTo() {
-        return replyTo;
-    }
-
-    public void setReplyTo(ActiveMQDestination replyTo) {
-        this.replyTo = replyTo;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-    public void setTimestamp(long timestamp) {
-        this.timestamp = timestamp;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public ByteSequence getContent() {
-        return content;
-    }
-
-    public void setContent(ByteSequence content) {
-        this.content = content;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public ByteSequence getMarshalledProperties() {
-        return marshalledProperties;
-    }
-
-    public void setMarshalledProperties(ByteSequence marshalledProperties) {
-        this.marshalledProperties = marshalledProperties;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public DataStructure getDataStructure() {
-        return dataStructure;
-    }
-
-    public void setDataStructure(DataStructure data) {
-        this.dataStructure = data;
-    }
-
-    /**
-     * Can be used to route the message to a specific consumer. Should be null
-     * to allow the broker use normal JMS routing semantics. If the target
-     * consumer id is an active consumer on the broker, the message is dropped.
-     * Used by the AdvisoryBroker to replay advisory messages to a specific
-     * consumer.
-     *
-     * @openwire:property version=1 cache=true
-     */
-    public ConsumerId getTargetConsumerId() {
-        return targetConsumerId;
-    }
-
-    public void setTargetConsumerId(ConsumerId targetConsumerId) {
-        this.targetConsumerId = targetConsumerId;
-    }
-
-    public boolean isExpired() {
-        long expireTime = getExpiration();
-        return expireTime > 0 && System.currentTimeMillis() > expireTime;
-    }
-
-    public boolean isAdvisory() {
-        return type != null && type.equals(AdvisorySupport.ADIVSORY_MESSAGE_TYPE);
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public boolean isCompressed() {
-        return compressed;
-    }
-
-    public void setCompressed(boolean compressed) {
-        this.compressed = compressed;
-    }
-
-    public boolean isRedelivered() {
-        return redeliveryCounter > 0;
-    }
-
-    public void setRedelivered(boolean redelivered) {
-        if (redelivered) {
-            if (!isRedelivered()) {
-                setRedeliveryCounter(1);
-            }
-        } else {
-            if (isRedelivered()) {
-                setRedeliveryCounter(0);
-            }
-        }
-    }
-
-    public void incrementRedeliveryCounter() {
-        redeliveryCounter++;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getRedeliveryCounter() {
-        return redeliveryCounter;
-    }
-
-    public void setRedeliveryCounter(int deliveryCounter) {
-        this.redeliveryCounter = deliveryCounter;
-    }
-
-    /**
-     * The route of brokers the command has moved through.
-     *
-     * @openwire:property version=1 cache=true
-     */
-    public BrokerId[] getBrokerPath() {
-        return brokerPath;
-    }
-
-    public void setBrokerPath(BrokerId[] brokerPath) {
-        this.brokerPath = brokerPath;
-    }
-
-    public boolean isReadOnlyProperties() {
-        return readOnlyProperties;
-    }
-
-    public void setReadOnlyProperties(boolean readOnlyProperties) {
-        this.readOnlyProperties = readOnlyProperties;
-    }
-
-    public boolean isReadOnlyBody() {
-        return readOnlyBody;
-    }
-
-    public void setReadOnlyBody(boolean readOnlyBody) {
-        this.readOnlyBody = readOnlyBody;
-    }
-
-    public ActiveMQConnection getConnection() {
-        return this.connection;
-    }
-
-    public void setConnection(ActiveMQConnection connection) {
-        this.connection = connection;
-    }
-
-    /**
-     * Used to schedule the arrival time of a message to a broker. The broker
-     * will not dispatch a message to a consumer until it's arrival time has
-     * elapsed.
-     *
-     * @openwire:property version=1
-     */
-    public long getArrival() {
-        return arrival;
-    }
-
-    public void setArrival(long arrival) {
-        this.arrival = arrival;
-    }
-
-    /**
-     * Only set by the broker and defines the userID of the producer connection
-     * who sent this message. This is an optional field, it needs to be enabled
-     * on the broker to have this field populated.
-     *
-     * @openwire:property version=1
-     */
-    public String getUserID() {
-        return userID;
-    }
-
-    public void setUserID(String jmsxUserID) {
-        this.userID = jmsxUserID;
-    }
-
-    public int getReferenceCount() {
-        return referenceCount;
-    }
-
-    public Message getMessageHardRef() {
-        return this;
-    }
-
-    public Message getMessage() {
-        return this;
-    }
-
-    public org.apache.activemq.broker.region.Destination getRegionDestination() {
-        return regionDestination;
-    }
-
-    public void setRegionDestination(org.apache.activemq.broker.region.Destination destination) {
-        this.regionDestination = destination;
-        if(this.memoryUsage==null) {
-            this.memoryUsage=regionDestination.getMemoryUsage();
-        }
-    }
-
-    public MemoryUsage getMemoryUsage() {
-        return this.memoryUsage;
-    }
-
-    public void setMemoryUsage(MemoryUsage usage) {
-        this.memoryUsage=usage;
-    }
-
-    @Override
-    public boolean isMarshallAware() {
-        return true;
-    }
-
-    public int incrementReferenceCount() {
-        int rc;
-        int size;
-        synchronized (this) {
-            rc = ++referenceCount;
-            size = getSize();
-        }
-
-        if (rc == 1 && getMemoryUsage() != null) {
-            getMemoryUsage().increaseUsage(size);
-            //System.err.println("INCREASE USAGE " + System.identityHashCode(getMemoryUsage()) + " PERCENT = " + getMemoryUsage().getPercentUsage());
-
-        }
-
-        //System.out.println(" + "+getMemoryUsage().getName()+" :::: "+getMessageId()+"rc="+rc);
-        return rc;
-    }
-
-    public int decrementReferenceCount() {
-        int rc;
-        int size;
-        synchronized (this) {
-            rc = --referenceCount;
-            size = getSize();
-        }
-
-        if (rc == 0 && getMemoryUsage() != null) {
-            getMemoryUsage().decreaseUsage(size);
-            //Thread.dumpStack();
-            //System.err.println("DECREADED USAGE " + System.identityHashCode(getMemoryUsage()) + " PERCENT = " + getMemoryUsage().getPercentUsage());
-        }
-
-        //System.out.println(" - "+getMemoryUsage().getName()+" :::: "+getMessageId()+"rc="+rc);
-
-        return rc;
-    }
-
-    public int getSize() {
-        int minimumMessageSize = getMinimumMessageSize();
-        if (size < minimumMessageSize || size == 0) {
-            size = minimumMessageSize;
-            if (marshalledProperties != null) {
-                size += marshalledProperties.getLength();
-            }
-            if (content != null) {
-                size += content.getLength();
-            }
-        }
-        return size;
-    }
-
-    protected int getMinimumMessageSize() {
-        int result = DEFAULT_MINIMUM_MESSAGE_SIZE;
-        //let destination override
-        Destination dest = regionDestination;
-        if (dest != null) {
-            result=dest.getMinimumMessageSize();
-        }
-        return result;
-    }
-
-    /**
-     * @openwire:property version=1
-     * @return Returns the recievedByDFBridge.
-     */
-    public boolean isRecievedByDFBridge() {
-        return recievedByDFBridge;
-    }
-
-    /**
-     * @param recievedByDFBridge The recievedByDFBridge to set.
-     */
-    public void setRecievedByDFBridge(boolean recievedByDFBridge) {
-        this.recievedByDFBridge = recievedByDFBridge;
-    }
-
-    public void onMessageRolledBack() {
-        incrementRedeliveryCounter();
-    }
-
-    /**
-     * @openwire:property version=2 cache=true
-     */
-    public boolean isDroppable() {
-        return droppable;
-    }
-
-    public void setDroppable(boolean droppable) {
-        this.droppable = droppable;
-    }
-
-    /**
-     * If a message is stored in multiple nodes on a cluster, all the cluster
-     * members will be listed here. Otherwise, it will be null.
-     *
-     * @openwire:property version=3 cache=true
-     */
-    public BrokerId[] getCluster() {
-        return cluster;
-    }
-
-    public void setCluster(BrokerId[] cluster) {
-        this.cluster = cluster;
-    }
-
-    @Override
-    public boolean isMessage() {
-        return true;
-    }
-
-    /**
-     * @openwire:property version=3
-     */
-    public long getBrokerInTime() {
-        return this.brokerInTime;
-    }
-
-    public void setBrokerInTime(long brokerInTime) {
-        this.brokerInTime = brokerInTime;
-    }
-
-    /**
-     * @openwire:property version=3
-     */
-    public long getBrokerOutTime() {
-        return this.brokerOutTime;
-    }
-
-    public void setBrokerOutTime(long brokerOutTime) {
-        this.brokerOutTime = brokerOutTime;
-    }
-
-    public boolean isDropped() {
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        return toString(null);
-    }
-
-    @Override
-    public String toString(Map<String, Object>overrideFields) {
-        try {
-            getProperties();
-        } catch (IOException e) {
-        }
-        return super.toString(overrideFields);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageAck.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageAck.java
deleted file mode 100755
index 2482d9c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageAck.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * @openwire:marshaller code="22"
- * 
- */
-public class MessageAck extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_ACK;
-
-    /**
-     * Used to let the broker know that the message has been delivered to the
-     * client. Message will still be retained until an standard ack is received.
-     * This is used get the broker to send more messages past prefetch limits
-     * when an standard ack has not been sent.
-     */
-    public static final byte DELIVERED_ACK_TYPE = 0;
-
-    /**
-     * The standard ack case where a client wants the message to be discarded.
-     */
-    public static final byte STANDARD_ACK_TYPE = 2;
-
-    /**
-     * In case the client want's to explicitly let the broker know that a
-     * message was not processed and the message was considered a poison
-     * message.
-     */
-    public static final byte POSION_ACK_TYPE = 1;
-
-    /**
-     * In case the client want's to explicitly let the broker know that a
-     * message was not processed and it was re-delivered to the consumer
-     * but it was not yet considered to be a poison message.  The messageCount 
-     * field will hold the number of times the message was re-delivered. 
-     */
-    public static final byte REDELIVERED_ACK_TYPE = 3;
-    
-    /**
-     * The  ack case where a client wants only an individual message to be discarded.
-     */
-    public static final byte INDIVIDUAL_ACK_TYPE = 4;
-
-/**
-     * The ack case where a durable topic subscription does not match a selector.
-     */
-    public static final byte UNMATCHED_ACK_TYPE = 5;
-
-    protected byte ackType;
-    protected ConsumerId consumerId;
-    protected MessageId firstMessageId;
-    protected MessageId lastMessageId;
-    protected ActiveMQDestination destination;
-    protected TransactionId transactionId;
-    protected int messageCount;
-    protected Throwable poisonCause;
-
-    protected transient String consumerKey;
-
-    public MessageAck() {
-    }
-
-    public MessageAck(MessageDispatch md, byte ackType, int messageCount) {
-        this.ackType = ackType;
-        this.consumerId = md.getConsumerId();
-        this.destination = md.getDestination();
-        this.lastMessageId = md.getMessage().getMessageId();
-        this.messageCount = messageCount;
-    }
-
-    public void copy(MessageAck copy) {
-        super.copy(copy);
-        copy.firstMessageId = firstMessageId;
-        copy.lastMessageId = lastMessageId;
-        copy.destination = destination;
-        copy.transactionId = transactionId;
-        copy.ackType = ackType;
-        copy.consumerId = consumerId;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isMessageAck() {
-        return true;
-    }
-
-    public boolean isPoisonAck() {
-        return ackType == POSION_ACK_TYPE;
-    }
-
-    public boolean isStandardAck() {
-        return ackType == STANDARD_ACK_TYPE;
-    }
-
-    public boolean isDeliveredAck() {
-        return ackType == DELIVERED_ACK_TYPE;
-    }
-    
-    public boolean isRedeliveredAck() {
-        return ackType == REDELIVERED_ACK_TYPE;
-    }
-    
-    public boolean isIndividualAck() {
-        return ackType == INDIVIDUAL_ACK_TYPE;
-    }
-
-    public boolean isUnmatchedAck() {
-        return ackType == UNMATCHED_ACK_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public TransactionId getTransactionId() {
-        return transactionId;
-    }
-
-    public void setTransactionId(TransactionId transactionId) {
-        this.transactionId = transactionId;
-    }
-
-    public boolean isInTransaction() {
-        return transactionId != null;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConsumerId getConsumerId() {
-        return consumerId;
-    }
-
-    public void setConsumerId(ConsumerId consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public byte getAckType() {
-        return ackType;
-    }
-
-    public void setAckType(byte ackType) {
-        this.ackType = ackType;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public MessageId getFirstMessageId() {
-        return firstMessageId;
-    }
-
-    public void setFirstMessageId(MessageId firstMessageId) {
-        this.firstMessageId = firstMessageId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public MessageId getLastMessageId() {
-        return lastMessageId;
-    }
-
-    public void setLastMessageId(MessageId lastMessageId) {
-        this.lastMessageId = lastMessageId;
-    }
-
-    /**
-     * The number of messages being acknowledged in the range.
-     * 
-     * @openwire:property version=1
-     */
-    public int getMessageCount() {
-        return messageCount;
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    /**
-     * The cause of a poison ack, if a message listener
-     * throws an exception it will be recorded here
-     *
-     * @openwire:property version=7
-     */
-    public Throwable getPoisonCause() {
-        return poisonCause;
-    }
-
-    public void setPoisonCause(Throwable poisonCause) {
-        this.poisonCause = poisonCause;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processMessageAck(this);
-    }
-
-    /**
-     * A helper method to allow a single message ID to be acknowledged
-     */
-    public void setMessageID(MessageId messageID) {
-        setFirstMessageId(messageID);
-        setLastMessageId(messageID);
-        setMessageCount(1);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatch.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatch.java
deleted file mode 100755
index fe9b11a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatch.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * 
- * @openwire:marshaller code="21"
- * 
- */
-public class MessageDispatch extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_DISPATCH;
-
-    protected ConsumerId consumerId;
-    protected ActiveMQDestination destination;
-    protected Message message;
-    protected int redeliveryCounter;
-
-    protected transient long deliverySequenceId;
-    protected transient Object consumer;
-    protected transient Runnable transmitCallback;
-    protected transient Throwable rollbackCause;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isMessageDispatch() {
-        return true;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConsumerId getConsumerId() {
-        return consumerId;
-    }
-
-    public void setConsumerId(ConsumerId consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public Message getMessage() {
-        return message;
-    }
-
-    public void setMessage(Message message) {
-        this.message = message;
-    }
-
-    public long getDeliverySequenceId() {
-        return deliverySequenceId;
-    }
-
-    public void setDeliverySequenceId(long deliverySequenceId) {
-        this.deliverySequenceId = deliverySequenceId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getRedeliveryCounter() {
-        return redeliveryCounter;
-    }
-
-    public void setRedeliveryCounter(int deliveryCounter) {
-        this.redeliveryCounter = deliveryCounter;
-    }
-
-    public Object getConsumer() {
-        return consumer;
-    }
-
-    public void setConsumer(Object consumer) {
-        this.consumer = consumer;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processMessageDispatch(this);
-    }
-
-    public Runnable getTransmitCallback() {
-        return transmitCallback;
-    }
-
-    public void setTransmitCallback(Runnable transmitCallback) {
-        this.transmitCallback = transmitCallback;
-    }
-
-    public Throwable getRollbackCause() {
-        return rollbackCause;
-    }
-
-    public void setRollbackCause(Throwable rollbackCause) {
-        this.rollbackCause = rollbackCause;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatchNotification.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatchNotification.java
deleted file mode 100755
index b618f3d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatchNotification.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * @openwire:marshaller code="90"
- * 
- */
-public class MessageDispatchNotification extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_DISPATCH_NOTIFICATION;
-
-    protected ConsumerId consumerId;
-    protected ActiveMQDestination destination;
-    protected MessageId messageId;
-    protected long deliverySequenceId;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isMessageDispatchNotification() {
-        return true;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConsumerId getConsumerId() {
-        return consumerId;
-    }
-
-    public void setConsumerId(ConsumerId consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-
-    public long getDeliverySequenceId() {
-        return deliverySequenceId;
-    }
-
-    public void setDeliverySequenceId(long deliverySequenceId) {
-        this.deliverySequenceId = deliverySequenceId;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processMessageDispatchNotification(this);
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public MessageId getMessageId() {
-        return messageId;
-    }
-
-    public void setMessageId(MessageId messageId) {
-        this.messageId = messageId;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java
deleted file mode 100755
index b0d388e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="110"
- * 
- */
-public class MessageId implements DataStructure, Comparable<MessageId> {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_ID;
-
-    protected ProducerId producerId;
-    protected long producerSequenceId;
-    protected long brokerSequenceId;
-
-    private transient String key;
-    private transient int hashCode;
-
-    public MessageId() {
-        this.producerId = new ProducerId();
-    }
-
-    public MessageId(ProducerInfo producerInfo, long producerSequenceId) {
-        this.producerId = producerInfo.getProducerId();
-        this.producerSequenceId = producerSequenceId;
-    }
-
-    public MessageId(String messageKey) {
-        setValue(messageKey);
-    }
-
-    public MessageId(String producerId, long producerSequenceId) {
-        this(new ProducerId(producerId), producerSequenceId);
-    }
-
-    public MessageId(ProducerId producerId, long producerSequenceId) {
-        this.producerId = producerId;
-        this.producerSequenceId = producerSequenceId;
-    }
-
-    /**
-     * Sets the value as a String
-     */
-    public void setValue(String messageKey) {
-        key = messageKey;
-        // Parse off the sequenceId
-        int p = messageKey.lastIndexOf(":");
-        if (p >= 0) {
-            producerSequenceId = Long.parseLong(messageKey.substring(p + 1));
-            messageKey = messageKey.substring(0, p);
-        }
-        producerId = new ProducerId(messageKey);
-    }
-
-    /**
-     * Sets the transient text view of the message which will be ignored if the
-     * message is marshaled on a transport; so is only for in-JVM changes to
-     * accommodate foreign JMS message IDs
-     */
-    public void setTextView(String key) {
-        this.key = key;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != getClass()) {
-            return false;
-        }
-
-        MessageId id = (MessageId)o;
-        return producerSequenceId == id.producerSequenceId && producerId.equals(id.producerId);
-    }
-
-    public int hashCode() {
-        if (hashCode == 0) {
-            hashCode = producerId.hashCode() ^ (int)producerSequenceId;
-        }
-        return hashCode;
-    }
-
-    public String toString() {
-        if (key == null) {
-            key = producerId.toString() + ":" + producerSequenceId;
-        }
-        return key;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ProducerId getProducerId() {
-        return producerId;
-    }
-
-    public void setProducerId(ProducerId producerId) {
-        this.producerId = producerId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getProducerSequenceId() {
-        return producerSequenceId;
-    }
-
-    public void setProducerSequenceId(long producerSequenceId) {
-        this.producerSequenceId = producerSequenceId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getBrokerSequenceId() {
-        return brokerSequenceId;
-    }
-
-    public void setBrokerSequenceId(long brokerSequenceId) {
-        this.brokerSequenceId = brokerSequenceId;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public MessageId copy() {
-        MessageId copy = new MessageId(producerId, producerSequenceId);
-        copy.key = key;
-        copy.brokerSequenceId = brokerSequenceId;
-        return copy;
-    }
-
-    /**
-     * @param o
-     * @return
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
-     */
-    public int compareTo(MessageId other) {
-        int result = -1;
-        if (other != null) {
-            result = this.toString().compareTo(other.toString());
-        }
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessagePull.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessagePull.java
deleted file mode 100644
index 0ae58c4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessagePull.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Used to pull messages on demand.
- * 
- * @openwire:marshaller code="20"
- * 
- * 
- */
-public class MessagePull extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_PULL;
-
-    protected ConsumerId consumerId;
-    protected ActiveMQDestination destination;
-    protected long timeout;
-    private MessageId messageId;
-    private String correlationId;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processMessagePull(this);
-    }
-
-    /**
-     * Configures a message pull from the consumer information
-     */
-    public void configure(ConsumerInfo info) {
-        setConsumerId(info.getConsumerId());
-        setDestination(info.getDestination());
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConsumerId getConsumerId() {
-        return consumerId;
-    }
-
-    public void setConsumerId(ConsumerId consumerId) {
-        this.consumerId = consumerId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getTimeout() {
-        return timeout;
-    }
-
-    public void setTimeout(long timeout) {
-        this.timeout = timeout;
-    }
-
-    /**
-     * An optional correlation ID which could be used by a broker to decide which messages are pulled
-     * on demand from a queue for a consumer
-     *
-     * @openwire:property version=3
-     */
-    public String getCorrelationId() {
-        return correlationId;
-    }
-
-    public void setCorrelationId(String correlationId) {
-        this.correlationId = correlationId;
-    }
-
-
-    /**
-     * An optional message ID which could be used by a broker to decide which messages are pulled
-     * on demand from a queue for a consumer
-     *
-     * @openwire:property version=3
-     */
-    public MessageId getMessageId() {
-        return messageId;
-    }
-
-    public void setMessageId(MessageId messageId) {
-        this.messageId = messageId;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
deleted file mode 100644
index eed93ef..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.util.Arrays;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @openwire:marshaller code="91"
- * 
- */
-public class NetworkBridgeFilter implements DataStructure, BooleanExpression {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.NETWORK_BRIDGE_FILTER;
-    static final Logger LOG = LoggerFactory.getLogger(NetworkBridgeFilter.class);
-
-    private BrokerId networkBrokerId;
-    private int networkTTL;
-
-    public NetworkBridgeFilter() {
-    }
-
-    public NetworkBridgeFilter(BrokerId remoteBrokerPath, int networkTTL) {
-        this.networkBrokerId = remoteBrokerPath;
-        this.networkTTL = networkTTL;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public boolean matches(MessageEvaluationContext mec) throws JMSException {
-        try {
-            // for Queues - the message can be acknowledged and dropped whilst
-            // still
-            // in the dispatch loop
-            // so need to get the reference to it
-            Message message = mec.getMessage();
-            return message != null && matchesForwardingFilter(message);
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        return matches(message) ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    protected boolean matchesForwardingFilter(Message message) {
-
-        if (contains(message.getBrokerPath(), networkBrokerId)) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Message all ready routed once through this broker ("
-                        + networkBrokerId + "), path: "
-                        + Arrays.toString(message.getBrokerPath()) + " - ignoring: " + message);
-            }
-            return false;
-        }
-
-        int hops = message.getBrokerPath() == null ? 0 : message.getBrokerPath().length;
-
-        if (hops >= networkTTL) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Message restricted to " + networkTTL + " network hops ignoring: " + message);
-            }
-            return false;
-        }
-
-        // Don't propagate advisory messages about network subscriptions
-        if (message.isAdvisory() && message.getDataStructure() != null && message.getDataStructure().getDataStructureType() == CommandTypes.CONSUMER_INFO) {
-            ConsumerInfo info = (ConsumerInfo)message.getDataStructure();
-            hops = info.getBrokerPath() == null ? 0 : info.getBrokerPath().length;
-            if (hops >= networkTTL) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("ConsumerInfo advisory restricted to " + networkTTL + " network hops ignoring: " + message);
-                }
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public static boolean contains(BrokerId[] brokerPath, BrokerId brokerId) {
-        if (brokerPath != null && brokerId != null) {
-            for (int i = 0; i < brokerPath.length; i++) {
-                if (brokerId.equals(brokerPath[i])) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getNetworkTTL() {
-        return networkTTL;
-    }
-
-    public void setNetworkTTL(int networkTTL) {
-        this.networkTTL = networkTTL;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public BrokerId getNetworkBrokerId() {
-        return networkBrokerId;
-    }
-
-    public void setNetworkBrokerId(BrokerId remoteBrokerPath) {
-        this.networkBrokerId = remoteBrokerPath;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java
deleted file mode 100644
index 4069197..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Represents a partial command; a large command that has been split up into
- * pieces.
- * 
- * @openwire:marshaller code="60"
- * 
- */
-public class PartialCommand implements Command {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PARTIAL_COMMAND;
-
-    private int commandId;
-    private byte[] data;
-
-    private transient Endpoint from;
-    private transient Endpoint to;
-
-    public PartialCommand() {
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getCommandId() {
-        return commandId;
-    }
-
-    public void setCommandId(int commandId) {
-        this.commandId = commandId;
-    }
-
-    /**
-     * The data for this part of the command
-     * 
-     * @openwire:property version=1 mandatory=true
-     */
-    public byte[] getData() {
-        return data;
-    }
-
-    public void setData(byte[] data) {
-        this.data = data;
-    }
-
-    public Endpoint getFrom() {
-        return from;
-    }
-
-    public void setFrom(Endpoint from) {
-        this.from = from;
-    }
-
-    public Endpoint getTo() {
-        return to;
-    }
-
-    public void setTo(Endpoint to) {
-        this.to = to;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        throw new IllegalStateException("The transport layer should filter out PartialCommand instances but received: " + this);
-    }
-
-    public boolean isResponseRequired() {
-        return false;
-    }
-
-    public boolean isResponse() {
-        return false;
-    }
-
-    public boolean isBrokerInfo() {
-        return false;
-    }
-
-    public boolean isMessageDispatch() {
-        return false;
-    }
-
-    public boolean isMessage() {
-        return false;
-    }
-
-    public boolean isMessageAck() {
-        return false;
-    }
-
-    public boolean isMessageDispatchNotification() {
-        return false;
-    }
-
-    public boolean isShutdownInfo() {
-        return false;
-    }
-    
-    public boolean isConnectionControl() {
-        return false;
-    }
-
-    public void setResponseRequired(boolean responseRequired) {
-    }
-
-    public boolean isWireFormatInfo() {
-        return false;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public String toString() {
-        int size = 0;
-        if (data != null) {
-            size = data.length;
-        }
-        return "PartialCommand[id: " + commandId + " data: " + size + " byte(s)]";
-    }   
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerAck.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerAck.java
deleted file mode 100644
index 0c4e7ad..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerAck.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * A ProducerAck command is sent by a broker to a producer to let it know it has
- * received and processed messages that it has produced. The producer will be
- * flow controlled if it does not receive ProducerAck commands back from the
- * broker.
- * 
- * @openwire:marshaller code="19" version="3"
- * 
- */
-public class ProducerAck extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PRODUCER_ACK;
-
-    protected ProducerId producerId;
-    protected int size;
-
-    public ProducerAck() {
-    }
-
-    public ProducerAck(ProducerId producerId, int size) {
-        this.producerId = producerId;
-        this.size = size;
-    }
-
-    public void copy(ProducerAck copy) {
-        super.copy(copy);
-        copy.producerId = producerId;
-        copy.size = size;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processProducerAck(this);
-    }
-
-    /**
-     * The producer id that this ack message is destined for.
-     * 
-     * @openwire:property version=3
-     */
-    public ProducerId getProducerId() {
-        return producerId;
-    }
-
-    public void setProducerId(ProducerId producerId) {
-        this.producerId = producerId;
-    }
-
-    /**
-     * The number of bytes that are being acked.
-     * 
-     * @openwire:property version=3
-     */
-    public int getSize() {
-        return size;
-    }
-
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java
deleted file mode 100755
index 1375e1a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller code="123"
- * 
- */
-public class ProducerId implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PRODUCER_ID;
-
-    protected String connectionId;
-    protected long sessionId;
-    protected long value;
-
-    protected transient int hashCode;
-    protected transient String key;
-    protected transient SessionId parentId;
-
-    public ProducerId() {
-    }
-
-    public ProducerId(SessionId sessionId, long producerId) {
-        this.connectionId = sessionId.getConnectionId();
-        this.sessionId = sessionId.getValue();
-        this.value = producerId;
-    }
-
-    public ProducerId(ProducerId id) {
-        this.connectionId = id.getConnectionId();
-        this.sessionId = id.getSessionId();
-        this.value = id.getValue();
-    }
-
-    public ProducerId(String producerKey) {
-        // Parse off the producerId
-        int p = producerKey.lastIndexOf(":");
-        if (p >= 0) {
-            value = Long.parseLong(producerKey.substring(p + 1));
-            producerKey = producerKey.substring(0, p);
-        }
-        setProducerSessionKey(producerKey);
-    }
-
-    public SessionId getParentId() {
-        if (parentId == null) {
-            parentId = new SessionId(this);
-        }
-        return parentId;
-    }
-
-    public int hashCode() {
-        if (hashCode == 0) {
-            hashCode = connectionId.hashCode() ^ (int)sessionId ^ (int)value;
-        }
-        return hashCode;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != ProducerId.class) {
-            return false;
-        }
-        ProducerId id = (ProducerId)o;
-        return sessionId == id.sessionId && value == id.value && connectionId.equals(id.connectionId);
-    }
-
-    /**
-     * @param sessionKey
-     */
-    private void setProducerSessionKey(String sessionKey) {
-        // Parse off the value
-        int p = sessionKey.lastIndexOf(":");
-        if (p >= 0) {
-            sessionId = Long.parseLong(sessionKey.substring(p + 1));
-            sessionKey = sessionKey.substring(0, p);
-        }
-        // The rest is the value
-        connectionId = sessionKey;
-    }
-
-    public String toString() {
-        if (key == null) {
-            key = connectionId + ":" + sessionId + ":" + value;
-        }
-        return key;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public String getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(String connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getValue() {
-        return value;
-    }
-
-    public void setValue(long producerId) {
-        this.value = producerId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getSessionId() {
-        return sessionId;
-    }
-
-    public void setSessionId(long sessionId) {
-        this.sessionId = sessionId;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerInfo.java
deleted file mode 100755
index 9854c5e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerInfo.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * 
- * @openwire:marshaller code="6"
- * 
- */
-public class ProducerInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PRODUCER_INFO;
-
-    protected ProducerId producerId;
-    protected ActiveMQDestination destination;
-    protected BrokerId[] brokerPath;
-    protected boolean dispatchAsync;
-    protected int windowSize;
-
-    public ProducerInfo() {
-    }
-
-    public ProducerInfo(ProducerId producerId) {
-        this.producerId = producerId;
-    }
-
-    public ProducerInfo(SessionInfo sessionInfo, long producerId) {
-        this.producerId = new ProducerId(sessionInfo.getSessionId(), producerId);
-    }
-
-    public ProducerInfo copy() {
-        ProducerInfo info = new ProducerInfo();
-        copy(info);
-        return info;
-    }
-
-    public void copy(ProducerInfo info) {
-        super.copy(info);
-        info.producerId = producerId;
-        info.destination = destination;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ProducerId getProducerId() {
-        return producerId;
-    }
-
-    public void setProducerId(ProducerId producerId) {
-        this.producerId = producerId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    public RemoveInfo createRemoveCommand() {
-        RemoveInfo command = new RemoveInfo(getProducerId());
-        command.setResponseRequired(isResponseRequired());
-        return command;
-    }
-
-    /**
-     * The route of brokers the command has moved through.
-     * 
-     * @openwire:property version=1 cache=true
-     */
-    public BrokerId[] getBrokerPath() {
-        return brokerPath;
-    }
-
-    public void setBrokerPath(BrokerId[] brokerPath) {
-        this.brokerPath = brokerPath;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processAddProducer(this);
-    }
-
-    /**
-     * If the broker should dispatch messages from this producer async. Since
-     * sync dispatch could potentally block the producer thread, this could be
-     * an important setting for the producer.
-     * 
-     * @openwire:property version=2
-     */
-    public boolean isDispatchAsync() {
-        return dispatchAsync;
-    }
-
-    public void setDispatchAsync(boolean dispatchAsync) {
-        this.dispatchAsync = dispatchAsync;
-    }
-
-    /**
-     * Used to configure the producer window size. A producer will send up to
-     * the configured window size worth of payload data to the broker before
-     * waiting for an Ack that allows him to send more.
-     * 
-     * @openwire:property version=3
-     */
-    public int getWindowSize() {
-        return windowSize;
-    }
-
-    public void setWindowSize(int windowSize) {
-        this.windowSize = windowSize;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveInfo.java
deleted file mode 100755
index 3452104..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveInfo.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * Removes a consumer, producer, session or connection.
- * 
- * @openwire:marshaller code="12"
- * 
- */
-public class RemoveInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REMOVE_INFO;
-
-    protected DataStructure objectId;
-    protected long lastDeliveredSequenceId;
-
-    public RemoveInfo() {
-    }
-
-    public RemoveInfo(DataStructure objectId) {
-        this.objectId = objectId;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public DataStructure getObjectId() {
-        return objectId;
-    }
-
-    public void setObjectId(DataStructure objectId) {
-        this.objectId = objectId;
-    }
-
-    /**
-     * @openwire:property version=5 cache=false
-     */
-    public long getLastDeliveredSequenceId() {
-        return lastDeliveredSequenceId;
-    }
-
-    public void setLastDeliveredSequenceId(long lastDeliveredSequenceId) {
-        this.lastDeliveredSequenceId = lastDeliveredSequenceId;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        switch (objectId.getDataStructureType()) {
-        case ConnectionId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveConnection((ConnectionId)objectId, lastDeliveredSequenceId);
-        case SessionId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveSession((SessionId)objectId, lastDeliveredSequenceId);
-        case ConsumerId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveConsumer((ConsumerId)objectId, lastDeliveredSequenceId);
-        case ProducerId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveProducer((ProducerId)objectId);
-        default:
-            throw new IOException("Unknown remove command type: " + objectId.getDataStructureType());
-        }
-    }
-
-    /**
-     * Returns true if this event is for a removed connection
-     */
-    public boolean isConnectionRemove() {
-        return objectId.getDataStructureType() == ConnectionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * Returns true if this event is for a removed session
-     */
-    public boolean isSessionRemove() {
-        return objectId.getDataStructureType() == SessionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * Returns true if this event is for a removed consumer
-     */
-    public boolean isConsumerRemove() {
-        return objectId.getDataStructureType() == ConsumerId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * Returns true if this event is for a removed producer
-     */
-    public boolean isProducerRemove() {
-        return objectId.getDataStructureType() == ProducerId.DATA_STRUCTURE_TYPE;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveSubscriptionInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveSubscriptionInfo.java
deleted file mode 100755
index d805b78..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveSubscriptionInfo.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * @openwire:marshaller code="9"
- * 
- */
-public class RemoveSubscriptionInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REMOVE_SUBSCRIPTION_INFO;
-
-    protected ConnectionId connectionId;
-    protected String clientId;
-    protected String subscriptionName;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getSubcriptionName() {
-        return subscriptionName;
-    }
-
-    /**
-     */
-    public void setSubcriptionName(String subscriptionName) {
-        this.subscriptionName = subscriptionName;
-    }
-
-    public String getSubscriptionName() {
-        return subscriptionName;
-    }
-
-    public void setSubscriptionName(String subscriptionName) {
-        this.subscriptionName = subscriptionName;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getClientId() {
-        return clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processRemoveSubscription(this);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ReplayCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ReplayCommand.java
deleted file mode 100644
index c5da7bb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ReplayCommand.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * A general purpose replay command for some kind of producer where ranges of
- * messages are asked to be replayed. This command is typically used over a
- * non-reliable transport such as UDP or multicast but could also be used on
- * TCP/IP if a socket has been re-established.
- * 
- * @openwire:marshaller code="65"
- * 
- */
-public class ReplayCommand extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REPLAY;
-
-    private String producerId;
-    private int firstAckNumber;
-    private int lastAckNumber;
-    private int firstNakNumber;
-    private int lastNakNumber;
-
-    public ReplayCommand() {
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public String getProducerId() {
-        return producerId;
-    }
-
-    /**
-     * Is used to uniquely identify the producer of the sequence
-     * 
-     * @openwire:property version=1 cache=false
-     */
-    public void setProducerId(String producerId) {
-        this.producerId = producerId;
-    }
-
-    public int getFirstAckNumber() {
-        return firstAckNumber;
-    }
-
-    /**
-     * Is used to specify the first sequence number being acknowledged as delivered on the transport
-     * so that it can be removed from cache
-     * 
-     * @openwire:property version=1
-     */
-    public void setFirstAckNumber(int firstSequenceNumber) {
-        this.firstAckNumber = firstSequenceNumber;
-    }
-
-    public int getLastAckNumber() {
-        return lastAckNumber;
-    }
-
-    /**
-     * Is used to specify the last sequence number being acknowledged as delivered on the transport
-     * so that it can be removed from cache
-     * 
-     * @openwire:property version=1
-     */
-    public void setLastAckNumber(int lastSequenceNumber) {
-        this.lastAckNumber = lastSequenceNumber;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return null;
-    }
-
-    /**
-     * Is used to specify the first sequence number to be replayed
-     * 
-     * @openwire:property version=1
-     */
-    public int getFirstNakNumber() {
-        return firstNakNumber;
-    }
-
-    public void setFirstNakNumber(int firstNakNumber) {
-        this.firstNakNumber = firstNakNumber;
-    }
-
-    /**
-     * Is used to specify the last sequence number to be replayed
-     * 
-     * @openwire:property version=1
-     */
-    public int getLastNakNumber() {
-        return lastNakNumber;
-    }
-
-    public void setLastNakNumber(int lastNakNumber) {
-        this.lastNakNumber = lastNakNumber;
-    }
-
-    public String toString() {
-        return "ReplayCommand {commandId = " + getCommandId() + ", firstNakNumber = " + getFirstNakNumber() + ", lastNakNumber = " + getLastNakNumber() + "}";
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Response.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/Response.java
deleted file mode 100755
index d1ae37e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/Response.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * @openwire:marshaller code="30"
- * 
- */
-public class Response extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.RESPONSE;
-    int correlationId;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getCorrelationId() {
-        return correlationId;
-    }
-
-    public void setCorrelationId(int responseId) {
-        this.correlationId = responseId;
-    }
-
-    public boolean isResponse() {
-        return true;
-    }
-
-    public boolean isException() {
-        return false;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return null;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java
deleted file mode 100755
index afcf0db..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.command;
-
-/**
- * 
- * @openwire:marshaller code="121"
- * 
- */
-public class SessionId implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SESSION_ID;
-
-    protected String connectionId;
-    protected long value;
-
-    protected transient int hashCode;
-    protected transient String key;
-    protected transient ConnectionId parentId;
-
-    public SessionId() {
-    }
-
-    public SessionId(ConnectionId connectionId, long sessionId) {
-        this.connectionId = connectionId.getValue();
-        this.value = sessionId;
-    }
-
-    public SessionId(SessionId id) {
-        this.connectionId = id.getConnectionId();
-        this.value = id.getValue();
-    }
-
-    public SessionId(ProducerId id) {
-        this.connectionId = id.getConnectionId();
-        this.value = id.getSessionId();
-    }
-
-    public SessionId(ConsumerId id) {
-        this.connectionId = id.getConnectionId();
-        this.value = id.getSessionId();
-    }
-
-    public ConnectionId getParentId() {
-        if (parentId == null) {
-            parentId = new ConnectionId(this);
-        }
-        return parentId;
-    }
-
-    public int hashCode() {
-        if (hashCode == 0) {
-            hashCode = connectionId.hashCode() ^ (int)value;
-        }
-        return hashCode;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || o.getClass() != SessionId.class) {
-            return false;
-        }
-        SessionId id = (SessionId)o;
-        return value == id.value && connectionId.equals(id.connectionId);
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public String getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(String connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public long getValue() {
-        return value;
-    }
-
-    public void setValue(long sessionId) {
-        this.value = sessionId;
-    }
-
-    public String toString() {
-        if (key == null) {
-            key = connectionId + ":" + value;
-        }
-        return key;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionInfo.java
deleted file mode 100755
index 2c34f87..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionInfo.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * 
- * @openwire:marshaller code="4"
- * 
- */
-public class SessionInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SESSION_INFO;
-
-    protected SessionId sessionId;
-
-    public SessionInfo() {
-        sessionId = new SessionId();
-    }
-
-    public SessionInfo(ConnectionInfo connectionInfo, long sessionId) {
-        this.sessionId = new SessionId(connectionInfo.getConnectionId(), sessionId);
-    }
-
-    public SessionInfo(SessionId sessionId) {
-        this.sessionId = sessionId;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public SessionId getSessionId() {
-        return sessionId;
-    }
-
-    public void setSessionId(SessionId sessionId) {
-        this.sessionId = sessionId;
-    }
-
-    public RemoveInfo createRemoveCommand() {
-        RemoveInfo command = new RemoveInfo(getSessionId());
-        command.setResponseRequired(isResponseRequired());
-        return command;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processAddSession(this);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ShutdownInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/ShutdownInfo.java
deleted file mode 100755
index 1a74317..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/ShutdownInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * 
- * @openwire:marshaller code="11"
- * 
- */
-public class ShutdownInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SHUTDOWN_INFO;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processShutdown(this);
-    }
-
-    public boolean isShutdownInfo() {
-        return true;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/SubscriptionInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/SubscriptionInfo.java
deleted file mode 100755
index 66bdda9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/SubscriptionInfo.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * 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.command;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * Used to represent a durable subscription.
- * 
- * @openwire:marshaller code="55"
- * 
- */
-public class SubscriptionInfo implements DataStructure {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DURABLE_SUBSCRIPTION_INFO;
-
-    protected ActiveMQDestination subscribedDestination;
-    protected ActiveMQDestination destination;
-    protected String clientId;
-    protected String subscriptionName;
-    protected String selector;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getClientId() {
-        return clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    /**
-     * This is the a resolved destination that the subscription is receiving
-     * messages from. This will never be a pattern or a composite destination.
-     * 
-     * @openwire:property version=1 cache=true
-     */
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getSelector() {
-        return selector;
-    }
-
-    public void setSelector(String selector) {
-        this.selector = selector;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public String getSubcriptionName() {
-        return subscriptionName;
-    }
-
-    /**
-     * @param subscriptionName *
-     */
-    public void setSubcriptionName(String subscriptionName) {
-        this.subscriptionName = subscriptionName;
-    }
-
-    public String getSubscriptionName() {
-        return subscriptionName;
-    }
-
-    public void setSubscriptionName(String subscriptionName) {
-        this.subscriptionName = subscriptionName;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        return IntrospectionSupport.toString(this);
-    }
-
-    @Override
-    public int hashCode() {
-        int h1 = clientId != null ? clientId.hashCode() : -1;
-        int h2 = subscriptionName != null ? subscriptionName.hashCode() : -1;
-        return h1 ^ h2;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        boolean result = false;
-        if (obj instanceof SubscriptionInfo) {
-            SubscriptionInfo other = (SubscriptionInfo)obj;
-            result = (clientId == null && other.clientId == null || clientId != null
-                                                                    && other.clientId != null
-                                                                    && clientId.equals(other.clientId))
-                     && (subscriptionName == null && other.subscriptionName == null || subscriptionName != null
-                                                                                       && other.subscriptionName != null
-                                                                                       && subscriptionName
-                                                                                           .equals(other.subscriptionName));
-        }
-        return result;
-    }
-
-    /**
-     * The destination the client originally subscribed to.. This may not match
-     * the {@see getDestination} method if the subscribed destination uses
-     * patterns or composites.
-     * 
-     * If the subscribed destinationis not set, this just ruturns the
-     * desitination.
-     * 
-     * @openwire:property version=3
-     */
-    public ActiveMQDestination getSubscribedDestination() {
-        if (subscribedDestination == null) {
-            return getDestination();
-        }
-        return subscribedDestination;
-    }
-
-    public void setSubscribedDestination(ActiveMQDestination subscribedDestination) {
-        this.subscribedDestination = subscribedDestination;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/TransactionId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/TransactionId.java
deleted file mode 100755
index b9ecc53..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/TransactionId.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.command;
-
-/**
- * @openwire:marshaller
- * 
- */
-public abstract class TransactionId implements DataStructure {
-
-    public abstract boolean isXATransaction();
-    public abstract boolean isLocalTransaction();
-    public abstract String getTransactionKey();
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/TransactionInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/TransactionInfo.java
deleted file mode 100755
index f5b31c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/TransactionInfo.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-
-import org.apache.activemq.state.CommandVisitor;
-
-/**
- * 
- * @openwire:marshaller code="7"
- * 
- */
-public class TransactionInfo extends BaseCommand {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.TRANSACTION_INFO;
-
-    public static final byte BEGIN = 0;
-    public static final byte PREPARE = 1;
-    public static final byte COMMIT_ONE_PHASE = 2;
-    public static final byte COMMIT_TWO_PHASE = 3;
-    public static final byte ROLLBACK = 4;
-    public static final byte RECOVER = 5;
-    public static final byte FORGET = 6;
-    public static final byte END = 7;
-
-    protected byte type;
-    protected ConnectionId connectionId;
-    protected TransactionId transactionId;
-
-    public TransactionInfo() {
-    }
-
-    public TransactionInfo(ConnectionId connectionId, TransactionId transactionId, byte type) {
-        this.connectionId = connectionId;
-        this.transactionId = transactionId;
-        this.type = type;
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    public void setConnectionId(ConnectionId connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    /**
-     * @openwire:property version=1 cache=true
-     */
-    public TransactionId getTransactionId() {
-        return transactionId;
-    }
-
-    public void setTransactionId(TransactionId transactionId) {
-        this.transactionId = transactionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public byte getType() {
-        return type;
-    }
-
-    public void setType(byte type) {
-        this.type = type;
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        switch (type) {
-        case TransactionInfo.BEGIN:
-            return visitor.processBeginTransaction(this);
-        case TransactionInfo.END:
-            return visitor.processEndTransaction(this);
-        case TransactionInfo.PREPARE:
-            return visitor.processPrepareTransaction(this);
-        case TransactionInfo.COMMIT_ONE_PHASE:
-            return visitor.processCommitTransactionOnePhase(this);
-        case TransactionInfo.COMMIT_TWO_PHASE:
-            return visitor.processCommitTransactionTwoPhase(this);
-        case TransactionInfo.ROLLBACK:
-            return visitor.processRollbackTransaction(this);
-        case TransactionInfo.RECOVER:
-            return visitor.processRecoverTransactions(this);
-        case TransactionInfo.FORGET:
-            return visitor.processForgetTransaction(this);
-        default:
-            throw new IOException("Transaction info type unknown: " + type);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/WireFormatInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/WireFormatInfo.java
deleted file mode 100755
index 2e5649d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/WireFormatInfo.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/**
- * 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.command;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.MarshallingSupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * @openwire:marshaller code="1"
- * 
- */
-public class WireFormatInfo implements Command, MarshallAware {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.WIREFORMAT_INFO;
-    private static final int MAX_PROPERTY_SIZE = 1024 * 4;
-    private static final byte MAGIC[] = new byte[] {'A', 'c', 't', 'i', 'v', 'e', 'M', 'Q'};
-
-    protected byte magic[] = MAGIC;
-    protected int version;
-    protected ByteSequence marshalledProperties;
-
-    protected transient Map<String, Object> properties;
-    private transient Endpoint from;
-    private transient Endpoint to;
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public boolean isWireFormatInfo() {
-        return true;
-    }
-
-    public boolean isMarshallAware() {
-        return true;
-    }
-
-    /**
-     * @openwire:property version=1 size=8 testSize=-1
-     */
-    public byte[] getMagic() {
-        return magic;
-    }
-
-    public void setMagic(byte[] magic) {
-        this.magic = magic;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public ByteSequence getMarshalledProperties() {
-        return marshalledProperties;
-    }
-
-    public void setMarshalledProperties(ByteSequence marshalledProperties) {
-        this.marshalledProperties = marshalledProperties;
-    }
-
-    /**
-     * The endpoint within the transport where this message came from.
-     */
-    public Endpoint getFrom() {
-        return from;
-    }
-
-    public void setFrom(Endpoint from) {
-        this.from = from;
-    }
-
-    /**
-     * The endpoint within the transport where this message is going to - null
-     * means all endpoints.
-     */
-    public Endpoint getTo() {
-        return to;
-    }
-
-    public void setTo(Endpoint to) {
-        this.to = to;
-    }
-
-    // ////////////////////
-    // 
-    // Implementation Methods.
-    //
-    // ////////////////////
-
-    public Object getProperty(String name) throws IOException {
-        if (properties == null) {
-            if (marshalledProperties == null) {
-                return null;
-            }
-            properties = unmarsallProperties(marshalledProperties);
-        }
-        return properties.get(name);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Map<String, Object> getProperties() throws IOException {
-        if (properties == null) {
-            if (marshalledProperties == null) {
-                return Collections.EMPTY_MAP;
-            }
-            properties = unmarsallProperties(marshalledProperties);
-        }
-        return Collections.unmodifiableMap(properties);
-    }
-
-    public void clearProperties() {
-        marshalledProperties = null;
-        properties = null;
-    }
-
-    public void setProperty(String name, Object value) throws IOException {
-        lazyCreateProperties();
-        properties.put(name, value);
-    }
-
-    protected void lazyCreateProperties() throws IOException {
-        if (properties == null) {
-            if (marshalledProperties == null) {
-                properties = new HashMap<String, Object>();
-            } else {
-                properties = unmarsallProperties(marshalledProperties);
-                marshalledProperties = null;
-            }
-        }
-    }
-
-    private Map<String, Object> unmarsallProperties(ByteSequence marshalledProperties) throws IOException {
-        return MarshallingSupport.unmarshalPrimitiveMap(new DataInputStream(new ByteArrayInputStream(marshalledProperties)), MAX_PROPERTY_SIZE);
-    }
-
-    public void beforeMarshall(WireFormat wireFormat) throws IOException {
-        // Need to marshal the properties.
-        if (marshalledProperties == null && properties != null) {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream os = new DataOutputStream(baos);
-            MarshallingSupport.marshalPrimitiveMap(properties, os);
-            os.close();
-            marshalledProperties = baos.toByteSequence();
-        }
-    }
-
-    public void afterMarshall(WireFormat wireFormat) throws IOException {
-    }
-
-    public void beforeUnmarshall(WireFormat wireFormat) throws IOException {
-    }
-
-    public void afterUnmarshall(WireFormat wireFormat) throws IOException {
-    }
-
-    public boolean isValid() {
-        return magic != null && Arrays.equals(magic, MAGIC);
-    }
-
-    public void setResponseRequired(boolean responseRequired) {
-    }
-
-    /**
-     * @throws IOException
-     */
-    public boolean isCacheEnabled() throws IOException {
-        return Boolean.TRUE == getProperty("CacheEnabled");
-    }
-
-    public void setCacheEnabled(boolean cacheEnabled) throws IOException {
-        setProperty("CacheEnabled", cacheEnabled ? Boolean.TRUE : Boolean.FALSE);
-    }
-
-    /**
-     * @throws IOException
-     */
-    public boolean isStackTraceEnabled() throws IOException {
-        return Boolean.TRUE == getProperty("StackTraceEnabled");
-    }
-
-    public void setStackTraceEnabled(boolean stackTraceEnabled) throws IOException {
-        setProperty("StackTraceEnabled", stackTraceEnabled ? Boolean.TRUE : Boolean.FALSE);
-    }
-
-    /**
-     * @throws IOException
-     */
-    public boolean isTcpNoDelayEnabled() throws IOException {
-        return Boolean.TRUE == getProperty("TcpNoDelayEnabled");
-    }
-
-    public void setTcpNoDelayEnabled(boolean tcpNoDelayEnabled) throws IOException {
-        setProperty("TcpNoDelayEnabled", tcpNoDelayEnabled ? Boolean.TRUE : Boolean.FALSE);
-    }
-
-    /**
-     * @throws IOException
-     */
-    public boolean isSizePrefixDisabled() throws IOException {
-        return Boolean.TRUE == getProperty("SizePrefixDisabled");
-    }
-
-    public void setSizePrefixDisabled(boolean prefixPacketSize) throws IOException {
-        setProperty("SizePrefixDisabled", prefixPacketSize ? Boolean.TRUE : Boolean.FALSE);
-    }
-
-    /**
-     * @throws IOException
-     */
-    public boolean isTightEncodingEnabled() throws IOException {
-        return Boolean.TRUE == getProperty("TightEncodingEnabled");
-    }
-
-    public void setTightEncodingEnabled(boolean tightEncodingEnabled) throws IOException {
-        setProperty("TightEncodingEnabled", tightEncodingEnabled ? Boolean.TRUE : Boolean.FALSE);
-    }
-
-    /**
-     * @throws IOException
-     */
-    public long getMaxInactivityDuration() throws IOException {
-        Long l = (Long)getProperty("MaxInactivityDuration");
-        return l == null ? 0 : l.longValue();
-    }
-
-    public void setMaxInactivityDuration(long maxInactivityDuration) throws IOException {
-        setProperty("MaxInactivityDuration", new Long(maxInactivityDuration));
-    }
-    
-    public long getMaxInactivityDurationInitalDelay() throws IOException {
-        Long l = (Long)getProperty("MaxInactivityDurationInitalDelay");
-        return l == null ? 0 : l.longValue();
-    }
-
-    public void setMaxInactivityDurationInitalDelay(long maxInactivityDurationInitalDelay) throws IOException {
-        setProperty("MaxInactivityDurationInitalDelay", new Long(maxInactivityDurationInitalDelay));
-    }
-    
-   
-
-    /**
-     * @throws IOException
-     */
-    public int getCacheSize() throws IOException {
-        Integer i = (Integer)getProperty("CacheSize");
-        return i == null ? 0 : i.intValue();
-    }
-
-    public void setCacheSize(int cacheSize) throws IOException {
-        setProperty("CacheSize", new Integer(cacheSize));
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processWireFormat(this);
-    }
-
-    @Override
-    public String toString() {
-        Map<String, Object> p = null;
-        try {
-            p = getProperties();
-        } catch (IOException ignore) {
-        }
-        return "WireFormatInfo { version=" + version + ", properties=" + p + ", magic=" + toString(magic) + "}";
-    }
-
-    private String toString(byte[] data) {
-        StringBuffer sb = new StringBuffer();
-        sb.append('[');
-        for (int i = 0; i < data.length; i++) {
-            if (i != 0) {
-                sb.append(',');
-            }
-            sb.append((char)data[i]);
-        }
-        sb.append(']');
-        return sb.toString();
-    }
-
-    // /////////////////////////////////////////////////////////////
-    //
-    // This are not implemented.
-    //
-    // /////////////////////////////////////////////////////////////
-
-    public void setCommandId(int value) {
-    }
-
-    public int getCommandId() {
-        return 0;
-    }
-
-    public boolean isResponseRequired() {
-        return false;
-    }
-
-    public boolean isResponse() {
-        return false;
-    }
-
-    public boolean isBrokerInfo() {
-        return false;
-    }
-
-    public boolean isMessageDispatch() {
-        return false;
-    }
-
-    public boolean isMessage() {
-        return false;
-    }
-
-    public boolean isMessageAck() {
-        return false;
-    }
-
-    public boolean isMessageDispatchNotification() {
-        return false;
-    }
-
-    public boolean isShutdownInfo() {
-        return false;
-    }
-    
-    public boolean isConnectionControl() {
-        return false;
-    }
-
-    public void setCachedMarshalledForm(WireFormat wireFormat, ByteSequence data) {
-    }
-
-    public ByteSequence getCachedMarshalledForm(WireFormat wireFormat) {
-        return null;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/XATransactionId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/command/XATransactionId.java
deleted file mode 100755
index b4f1d64..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/XATransactionId.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.command;
-
-import java.util.Arrays;
-import javax.transaction.xa.Xid;
-import org.apache.activemq.util.HexSupport;
-
-/**
- * @openwire:marshaller code="112"
- * 
- */
-public class XATransactionId extends TransactionId implements Xid, Comparable {
-
-    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_XA_TRANSACTION_ID;
-
-    private int formatId;
-    private byte[] branchQualifier;
-    private byte[] globalTransactionId;
-
-    private transient int hash;
-    private transient String transactionKey;
-
-    public XATransactionId() {
-    }
-
-    public XATransactionId(Xid xid) {
-        this.formatId = xid.getFormatId();
-        this.globalTransactionId = xid.getGlobalTransactionId();
-        this.branchQualifier = xid.getBranchQualifier();
-    }
-
-    public byte getDataStructureType() {
-        return DATA_STRUCTURE_TYPE;
-    }
-
-    public synchronized String getTransactionKey() {
-        if (transactionKey == null) {
-            transactionKey = "XID:" + formatId + ":" + HexSupport.toHexFromBytes(globalTransactionId) + ":"
-                             + HexSupport.toHexFromBytes(branchQualifier);
-        }
-        return transactionKey;
-    }
-
-    public String toString() {
-        return getTransactionKey();
-    }
-
-    public boolean isXATransaction() {
-        return true;
-    }
-
-    public boolean isLocalTransaction() {
-        return false;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public int getFormatId() {
-        return formatId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public byte[] getGlobalTransactionId() {
-        return globalTransactionId;
-    }
-
-    /**
-     * @openwire:property version=1
-     */
-    public byte[] getBranchQualifier() {
-        return branchQualifier;
-    }
-
-    public void setBranchQualifier(byte[] branchQualifier) {
-        this.branchQualifier = branchQualifier;
-        this.hash = 0;
-    }
-
-    public void setFormatId(int formatId) {
-        this.formatId = formatId;
-        this.hash = 0;
-    }
-
-    public void setGlobalTransactionId(byte[] globalTransactionId) {
-        this.globalTransactionId = globalTransactionId;
-        this.hash = 0;
-    }
-
-    public int hashCode() {
-        if (hash == 0) {
-            hash = formatId;
-            hash = hash(globalTransactionId, hash);
-            hash = hash(branchQualifier, hash);
-            if (hash == 0) {
-                hash = 0xaceace;
-            }
-        }
-        return hash;
-    }
-
-    private static int hash(byte[] bytes, int hash) {
-        int size = bytes.length;
-        for (int i = 0; i < size; i++) {
-            hash ^= bytes[i] << ((i % 4) * 8);
-        }
-        return hash;
-    }
-
-    public boolean equals(Object o) {
-        if (o == null || o.getClass() != XATransactionId.class) {
-            return false;
-        }
-        XATransactionId xid = (XATransactionId)o;
-        return xid.formatId == formatId && Arrays.equals(xid.globalTransactionId, globalTransactionId)
-               && Arrays.equals(xid.branchQualifier, branchQualifier);
-    }
-
-    public int compareTo(Object o) {
-        if (o == null || o.getClass() != XATransactionId.class) {
-            return -1;
-        }
-        XATransactionId xid = (XATransactionId)o;
-        return getTransactionKey().compareTo(xid.getTransactionKey());
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/command/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/command/package.html
deleted file mode 100755
index 3b806fc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/command/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-Command objects used via the Command Pattern to communicate among nodes
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/AnyChildDestinationNode.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/AnyChildDestinationNode.java
deleted file mode 100644
index cf35ac8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/AnyChildDestinationNode.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * An implementation of {@link DestinationNode} which navigates all the children of the given node
- * ignoring the name of the current path (so for navigating using * in a wildcard).
- *
- * 
- */
-public class AnyChildDestinationNode implements DestinationNode {
-    private DestinationNode node;
-
-    public AnyChildDestinationNode(DestinationNode node) {
-        this.node = node;
-    }
-
-    public void appendMatchingValues(Set answer, String[] paths, int startIndex) {
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            child.appendMatchingValues(answer, paths, startIndex);
-        }
-    }
-
-
-    public void appendMatchingWildcards(Set answer, String[] paths, int startIndex) {
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            child.appendMatchingWildcards(answer, paths, startIndex);
-        }
-    }
-
-
-    public void appendDescendantValues(Set answer) {
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            child.appendDescendantValues(answer);
-        }
-    }
-
-    public DestinationNode getChild(String path) {
-        final Collection list = new ArrayList();
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            DestinationNode answer = child.getChild(path);
-            if (answer != null) {
-                list.add(answer);
-            }
-        }
-        if (!list.isEmpty()) {
-            return new AnyChildDestinationNode(this) {
-                protected Collection getChildNodes() {
-                    return list;
-                }
-            };
-        }
-        return null;
-    }
-
-    public Collection getDesendentValues() {
-        Collection answer = new ArrayList();
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            answer.addAll(child.getDesendentValues());
-        }
-        return answer;
-    }
-
-    public Collection getValues() {
-        Collection answer = new ArrayList();
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            answer.addAll(child.getValues());
-        }
-        return answer;
-    }
-
-
-    public Collection getChildren() {
-        Collection answer = new ArrayList();
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            answer.addAll(child.getChildren());
-        }
-        return answer;
-    }
-
-    public Collection removeDesendentValues() {
-        Collection answer = new ArrayList();
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            answer.addAll(child.removeDesendentValues());
-        }
-        return answer;
-    }
-
-    public Collection removeValues() {
-        Collection answer = new ArrayList();
-        Iterator iter = getChildNodes().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode) iter.next();
-            answer.addAll(child.removeValues());
-        }
-        return answer;
-    }
-
-    protected Collection getChildNodes() {
-        return node.getChildren();
-    }
-}
-
-
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ArithmeticExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ArithmeticExpression.java
deleted file mode 100755
index 918ebbb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ArithmeticExpression.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * 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.filter;
-
-import javax.jms.JMSException;
-
-/**
- * An expression which performs an operation on two expression values
- * 
- * 
- */
-public abstract class ArithmeticExpression extends BinaryExpression {
-
-    protected static final int INTEGER = 1;
-    protected static final int LONG = 2;
-    protected static final int DOUBLE = 3;
-
-    /**
-     * @param left
-     * @param right
-     */
-    public ArithmeticExpression(Expression left, Expression right) {
-        super(left, right);
-    }
-
-    public static Expression createPlus(Expression left, Expression right) {
-        return new ArithmeticExpression(left, right) {
-            protected Object evaluate(Object lvalue, Object rvalue) {
-                if (lvalue instanceof String) {
-                    String text = (String)lvalue;
-                    String answer = text + rvalue;
-                    return answer;
-                } else if (lvalue instanceof Number) {
-                    return plus((Number)lvalue, asNumber(rvalue));
-                }
-                throw new RuntimeException("Cannot call plus operation on: " + lvalue + " and: " + rvalue);
-            }
-
-            public String getExpressionSymbol() {
-                return "+";
-            }
-        };
-    }
-
-    public static Expression createMinus(Expression left, Expression right) {
-        return new ArithmeticExpression(left, right) {
-            protected Object evaluate(Object lvalue, Object rvalue) {
-                if (lvalue instanceof Number) {
-                    return minus((Number)lvalue, asNumber(rvalue));
-                }
-                throw new RuntimeException("Cannot call minus operation on: " + lvalue + " and: " + rvalue);
-            }
-
-            public String getExpressionSymbol() {
-                return "-";
-            }
-        };
-    }
-
-    public static Expression createMultiply(Expression left, Expression right) {
-        return new ArithmeticExpression(left, right) {
-
-            protected Object evaluate(Object lvalue, Object rvalue) {
-                if (lvalue instanceof Number) {
-                    return multiply((Number)lvalue, asNumber(rvalue));
-                }
-                throw new RuntimeException("Cannot call multiply operation on: " + lvalue + " and: " + rvalue);
-            }
-
-            public String getExpressionSymbol() {
-                return "*";
-            }
-        };
-    }
-
-    public static Expression createDivide(Expression left, Expression right) {
-        return new ArithmeticExpression(left, right) {
-
-            protected Object evaluate(Object lvalue, Object rvalue) {
-                if (lvalue instanceof Number) {
-                    return divide((Number)lvalue, asNumber(rvalue));
-                }
-                throw new RuntimeException("Cannot call divide operation on: " + lvalue + " and: " + rvalue);
-            }
-
-            public String getExpressionSymbol() {
-                return "/";
-            }
-        };
-    }
-
-    public static Expression createMod(Expression left, Expression right) {
-        return new ArithmeticExpression(left, right) {
-
-            protected Object evaluate(Object lvalue, Object rvalue) {
-                if (lvalue instanceof Number) {
-                    return mod((Number)lvalue, asNumber(rvalue));
-                }
-                throw new RuntimeException("Cannot call mod operation on: " + lvalue + " and: " + rvalue);
-            }
-
-            public String getExpressionSymbol() {
-                return "%";
-            }
-        };
-    }
-
-    protected Number plus(Number left, Number right) {
-        switch (numberType(left, right)) {
-        case INTEGER:
-            return new Integer(left.intValue() + right.intValue());
-        case LONG:
-            return new Long(left.longValue() + right.longValue());
-        default:
-            return new Double(left.doubleValue() + right.doubleValue());
-        }
-    }
-
-    protected Number minus(Number left, Number right) {
-        switch (numberType(left, right)) {
-        case INTEGER:
-            return new Integer(left.intValue() - right.intValue());
-        case LONG:
-            return new Long(left.longValue() - right.longValue());
-        default:
-            return new Double(left.doubleValue() - right.doubleValue());
-        }
-    }
-
-    protected Number multiply(Number left, Number right) {
-        switch (numberType(left, right)) {
-        case INTEGER:
-            return new Integer(left.intValue() * right.intValue());
-        case LONG:
-            return new Long(left.longValue() * right.longValue());
-        default:
-            return new Double(left.doubleValue() * right.doubleValue());
-        }
-    }
-
-    protected Number divide(Number left, Number right) {
-        return new Double(left.doubleValue() / right.doubleValue());
-    }
-
-    protected Number mod(Number left, Number right) {
-        return new Double(left.doubleValue() % right.doubleValue());
-    }
-
-    private int numberType(Number left, Number right) {
-        if (isDouble(left) || isDouble(right)) {
-            return DOUBLE;
-        } else if (left instanceof Long || right instanceof Long) {
-            return LONG;
-        } else {
-            return INTEGER;
-        }
-    }
-
-    private boolean isDouble(Number n) {
-        return n instanceof Float || n instanceof Double;
-    }
-
-    protected Number asNumber(Object value) {
-        if (value instanceof Number) {
-            return (Number)value;
-        } else {
-            throw new RuntimeException("Cannot convert value: " + value + " into a number");
-        }
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        Object lvalue = left.evaluate(message);
-        if (lvalue == null) {
-            return null;
-        }
-        Object rvalue = right.evaluate(message);
-        if (rvalue == null) {
-            return null;
-        }
-        return evaluate(lvalue, rvalue);
-    }
-
-    /**
-     * @param lvalue
-     * @param rvalue
-     * @return
-     */
-    protected abstract Object evaluate(Object lvalue, Object rvalue);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/BinaryExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/BinaryExpression.java
deleted file mode 100755
index 99cc446..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/BinaryExpression.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * 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.filter;
-
-
-
-/**
- * An expression which performs an operation on two expression values.
- * 
- * 
- */
-public abstract class BinaryExpression implements Expression {
-    protected Expression left;
-    protected Expression right;
-
-    public BinaryExpression(Expression left, Expression right) {
-        this.left = left;
-        this.right = right;
-    }
-
-    public Expression getLeft() {
-        return left;
-    }
-
-    public Expression getRight() {
-        return right;
-    }
-
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return "(" + left.toString() + " " + getExpressionSymbol() + " " + right.toString() + ")";
-    }
-
-    /**
-     * TODO: more efficient hashCode()
-     *
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return toString().hashCode();
-    }
-
-    /**
-     * TODO: more efficient hashCode()
-     *
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object o) {
-
-        if (o == null || !this.getClass().equals(o.getClass())) {
-            return false;
-        }
-        return toString().equals(o.toString());
-
-    }
-
-    /**
-     * Returns the symbol that represents this binary expression.  For example, addition is
-     * represented by "+"
-     *
-     * @return
-     */
-    public abstract String getExpressionSymbol();
-
-    /**
-     * @param expression
-     */
-    public void setRight(Expression expression) {
-        right = expression;
-    }
-
-    /**
-     * @param expression
-     */
-    public void setLeft(Expression expression) {
-        left = expression;
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/BooleanExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/BooleanExpression.java
deleted file mode 100755
index 42ca8ce..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/BooleanExpression.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.filter;
-
-import javax.jms.JMSException;
-
-
-/**
- * A BooleanExpression is an expression that always
- * produces a Boolean result.
- *
- * 
- */
-public interface BooleanExpression extends Expression {
-    
-    /**
-     * @param message
-     * @return true if the expression evaluates to Boolean.TRUE.
-     * @throws JMSException
-     */
-    boolean matches(MessageEvaluationContext message) throws JMSException;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java
deleted file mode 100755
index 1003a1b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import javax.jms.JMSException;
-
-/**
- * A filter performing a comparison of two objects
- * 
- * 
- */
-public abstract class ComparisonExpression extends BinaryExpression implements BooleanExpression {
-
-    private static final Set<Character> REGEXP_CONTROL_CHARS = new HashSet<Character>();
-
-    /**
-     * @param left
-     * @param right
-     */
-    public ComparisonExpression(Expression left, Expression right) {
-        super(left, right);
-    }
-
-    public static BooleanExpression createBetween(Expression value, Expression left, Expression right) {
-        return LogicExpression.createAND(createGreaterThanEqual(value, left), createLessThanEqual(value, right));
-    }
-
-    public static BooleanExpression createNotBetween(Expression value, Expression left, Expression right) {
-        return LogicExpression.createOR(createLessThan(value, left), createGreaterThan(value, right));
-    }
-
-    static {
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('.'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('\\'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('['));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf(']'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('^'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('$'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('?'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('*'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('+'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('{'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('}'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('|'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('('));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf(')'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf(':'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('&'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('<'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('>'));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('='));
-        REGEXP_CONTROL_CHARS.add(Character.valueOf('!'));
-    }
-
-    static class LikeExpression extends UnaryExpression implements BooleanExpression {
-
-        Pattern likePattern;
-
-        /**
-         * @param left
-         */
-        public LikeExpression(Expression right, String like, int escape) {
-            super(right);
-
-            StringBuffer regexp = new StringBuffer(like.length() * 2);
-            regexp.append("\\A"); // The beginning of the input
-            for (int i = 0; i < like.length(); i++) {
-                char c = like.charAt(i);
-                if (escape == (0xFFFF & c)) {
-                    i++;
-                    if (i >= like.length()) {
-                        // nothing left to escape...
-                        break;
-                    }
-
-                    char t = like.charAt(i);
-                    regexp.append("\\x");
-                    regexp.append(Integer.toHexString(0xFFFF & t));
-                } else if (c == '%') {
-                    regexp.append(".*?"); // Do a non-greedy match
-                } else if (c == '_') {
-                    regexp.append("."); // match one
-                } else if (REGEXP_CONTROL_CHARS.contains(new Character(c))) {
-                    regexp.append("\\x");
-                    regexp.append(Integer.toHexString(0xFFFF & c));
-                } else {
-                    regexp.append(c);
-                }
-            }
-            regexp.append("\\z"); // The end of the input
-
-            likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL);
-        }
-
-        /**
-         * @see org.apache.activemq.filter.UnaryExpression#getExpressionSymbol()
-         */
-        public String getExpressionSymbol() {
-            return "LIKE";
-        }
-
-        /**
-         * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext)
-         */
-        public Object evaluate(MessageEvaluationContext message) throws JMSException {
-
-            Object rv = this.getRight().evaluate(message);
-
-            if (rv == null) {
-                return null;
-            }
-
-            if (!(rv instanceof String)) {
-                return Boolean.FALSE;
-                // throw new RuntimeException("LIKE can only operate on String
-                // identifiers. LIKE attemped on: '" + rv.getClass());
-            }
-
-            return likePattern.matcher((String)rv).matches() ? Boolean.TRUE : Boolean.FALSE;
-        }
-
-        public boolean matches(MessageEvaluationContext message) throws JMSException {
-            Object object = evaluate(message);
-            return object != null && object == Boolean.TRUE;
-        }
-    }
-
-    public static BooleanExpression createLike(Expression left, String right, String escape) {
-        if (escape != null && escape.length() != 1) {
-            throw new RuntimeException("The ESCAPE string litteral is invalid.  It can only be one character.  Litteral used: " + escape);
-        }
-        int c = -1;
-        if (escape != null) {
-            c = 0xFFFF & escape.charAt(0);
-        }
-
-        return new LikeExpression(left, right, c);
-    }
-
-    public static BooleanExpression createNotLike(Expression left, String right, String escape) {
-        return UnaryExpression.createNOT(createLike(left, right, escape));
-    }
-
-    public static BooleanExpression createInFilter(Expression left, List elements) {
-
-        if (!(left instanceof PropertyExpression)) {
-            throw new RuntimeException("Expected a property for In expression, got: " + left);
-        }
-        return UnaryExpression.createInExpression((PropertyExpression)left, elements, false);
-
-    }
-
-    public static BooleanExpression createNotInFilter(Expression left, List elements) {
-
-        if (!(left instanceof PropertyExpression)) {
-            throw new RuntimeException("Expected a property for In expression, got: " + left);
-        }
-        return UnaryExpression.createInExpression((PropertyExpression)left, elements, true);
-
-    }
-
-    public static BooleanExpression createIsNull(Expression left) {
-        return doCreateEqual(left, ConstantExpression.NULL);
-    }
-
-    public static BooleanExpression createIsNotNull(Expression left) {
-        return UnaryExpression.createNOT(doCreateEqual(left, ConstantExpression.NULL));
-    }
-
-    public static BooleanExpression createNotEqual(Expression left, Expression right) {
-        return UnaryExpression.createNOT(createEqual(left, right));
-    }
-
-    public static BooleanExpression createEqual(Expression left, Expression right) {
-        checkEqualOperand(left);
-        checkEqualOperand(right);
-        checkEqualOperandCompatability(left, right);
-        return doCreateEqual(left, right);
-    }
-
-    private static BooleanExpression doCreateEqual(Expression left, Expression right) {
-        return new ComparisonExpression(left, right) {
-
-            public Object evaluate(MessageEvaluationContext message) throws JMSException {
-                Object lv = left.evaluate(message);
-                Object rv = right.evaluate(message);
-
-                // Iff one of the values is null
-                if (lv == null ^ rv == null) {
-                    return Boolean.FALSE;
-                }
-                if (lv == rv || lv.equals(rv)) {
-                    return Boolean.TRUE;
-                }
-                if (lv instanceof Comparable && rv instanceof Comparable) {
-                    return compare((Comparable)lv, (Comparable)rv);
-                }
-                return Boolean.FALSE;
-            }
-
-            protected boolean asBoolean(int answer) {
-                return answer == 0;
-            }
-
-            public String getExpressionSymbol() {
-                return "=";
-            }
-        };
-    }
-
-    public static BooleanExpression createGreaterThan(final Expression left, final Expression right) {
-        checkLessThanOperand(left);
-        checkLessThanOperand(right);
-        return new ComparisonExpression(left, right) {
-            protected boolean asBoolean(int answer) {
-                return answer > 0;
-            }
-
-            public String getExpressionSymbol() {
-                return ">";
-            }
-        };
-    }
-
-    public static BooleanExpression createGreaterThanEqual(final Expression left, final Expression right) {
-        checkLessThanOperand(left);
-        checkLessThanOperand(right);
-        return new ComparisonExpression(left, right) {
-            protected boolean asBoolean(int answer) {
-                return answer >= 0;
-            }
-
-            public String getExpressionSymbol() {
-                return ">=";
-            }
-        };
-    }
-
-    public static BooleanExpression createLessThan(final Expression left, final Expression right) {
-        checkLessThanOperand(left);
-        checkLessThanOperand(right);
-        return new ComparisonExpression(left, right) {
-
-            protected boolean asBoolean(int answer) {
-                return answer < 0;
-            }
-
-            public String getExpressionSymbol() {
-                return "<";
-            }
-
-        };
-    }
-
-    public static BooleanExpression createLessThanEqual(final Expression left, final Expression right) {
-        checkLessThanOperand(left);
-        checkLessThanOperand(right);
-        return new ComparisonExpression(left, right) {
-
-            protected boolean asBoolean(int answer) {
-                return answer <= 0;
-            }
-
-            public String getExpressionSymbol() {
-                return "<=";
-            }
-        };
-    }
-
-    /**
-     * Only Numeric expressions can be used in >, >=, < or <= expressions.s
-     * 
-     * @param expr
-     */
-    public static void checkLessThanOperand(Expression expr) {
-        if (expr instanceof ConstantExpression) {
-            Object value = ((ConstantExpression)expr).getValue();
-            if (value instanceof Number) {
-                return;
-            }
-
-            // Else it's boolean or a String..
-            throw new RuntimeException("Value '" + expr + "' cannot be compared.");
-        }
-        if (expr instanceof BooleanExpression) {
-            throw new RuntimeException("Value '" + expr + "' cannot be compared.");
-        }
-    }
-
-    /**
-     * Validates that the expression can be used in == or <> expression. Cannot
-     * not be NULL TRUE or FALSE litterals.
-     * 
-     * @param expr
-     */
-    public static void checkEqualOperand(Expression expr) {
-        if (expr instanceof ConstantExpression) {
-            Object value = ((ConstantExpression)expr).getValue();
-            if (value == null) {
-                throw new RuntimeException("'" + expr + "' cannot be compared.");
-            }
-        }
-    }
-
-    /**
-     * @param left
-     * @param right
-     */
-    private static void checkEqualOperandCompatability(Expression left, Expression right) {
-        if (left instanceof ConstantExpression && right instanceof ConstantExpression) {
-            if (left instanceof BooleanExpression && !(right instanceof BooleanExpression)) {
-                throw new RuntimeException("'" + left + "' cannot be compared with '" + right + "'");
-            }
-        }
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        Comparable<Comparable> lv = (Comparable)left.evaluate(message);
-        if (lv == null) {
-            return null;
-        }
-        Comparable rv = (Comparable)right.evaluate(message);
-        if (rv == null) {
-            return null;
-        }
-        return compare(lv, rv);
-    }
-
-    protected Boolean compare(Comparable lv, Comparable rv) {
-        Class<? extends Comparable> lc = lv.getClass();
-        Class<? extends Comparable> rc = rv.getClass();
-        // If the the objects are not of the same type,
-        // try to convert up to allow the comparison.
-        if (lc != rc) {
-            if (lc == Byte.class) {
-                if (rc == Short.class) {
-                    lv = Short.valueOf(((Number)lv).shortValue());
-                } else if (rc == Integer.class) {
-                    lv = Integer.valueOf(((Number)lv).intValue());
-                } else if (rc == Long.class) {
-                    lv = Long.valueOf(((Number)lv).longValue());
-                } else if (rc == Float.class) {
-                    lv = new Float(((Number)lv).floatValue());
-                } else if (rc == Double.class) {
-                    lv = new Double(((Number)lv).doubleValue());
-                } else {
-                    return Boolean.FALSE;
-                }
-            } else if (lc == Short.class) {
-                if (rc == Integer.class) {
-                    lv = Integer.valueOf(((Number)lv).intValue());
-                } else if (rc == Long.class) {
-                    lv = Long.valueOf(((Number)lv).longValue());
-                } else if (rc == Float.class) {
-                    lv = new Float(((Number)lv).floatValue());
-                } else if (rc == Double.class) {
-                    lv = new Double(((Number)lv).doubleValue());
-                } else {
-                    return Boolean.FALSE;
-                }
-            } else if (lc == Integer.class) {
-                if (rc == Long.class) {
-                    lv = Long.valueOf(((Number)lv).longValue());
-                } else if (rc == Float.class) {
-                    lv = new Float(((Number)lv).floatValue());
-                } else if (rc == Double.class) {
-                    lv = new Double(((Number)lv).doubleValue());
-                } else {
-                    return Boolean.FALSE;
-                }
-            } else if (lc == Long.class) {
-                if (rc == Integer.class) {
-                    rv = Long.valueOf(((Number)rv).longValue());
-                } else if (rc == Float.class) {
-                    lv = new Float(((Number)lv).floatValue());
-                } else if (rc == Double.class) {
-                    lv = new Double(((Number)lv).doubleValue());
-                } else {
-                    return Boolean.FALSE;
-                }
-            } else if (lc == Float.class) {
-                if (rc == Integer.class) {
-                    rv = new Float(((Number)rv).floatValue());
-                } else if (rc == Long.class) {
-                    rv = new Float(((Number)rv).floatValue());
-                } else if (rc == Double.class) {
-                    lv = new Double(((Number)lv).doubleValue());
-                } else {
-                    return Boolean.FALSE;
-                }
-            } else if (lc == Double.class) {
-                if (rc == Integer.class) {
-                    rv = new Double(((Number)rv).doubleValue());
-                } else if (rc == Long.class) {
-                    rv = new Double(((Number)rv).doubleValue());
-                } else if (rc == Float.class) {
-                    rv = new Float(((Number)rv).doubleValue());
-                } else {
-                    return Boolean.FALSE;
-                }
-            } else {
-                return Boolean.FALSE;
-            }
-        }
-        return asBoolean(lv.compareTo(rv)) ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    protected abstract boolean asBoolean(int answer);
-
-    public boolean matches(MessageEvaluationContext message) throws JMSException {
-        Object object = evaluate(message);
-        return object != null && object == Boolean.TRUE;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/CompositeDestinationFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/CompositeDestinationFilter.java
deleted file mode 100755
index 43ba696..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/CompositeDestinationFilter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.filter;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * A {@link DestinationFilter} used for composite destinations
- * 
- * 
- */
-public class CompositeDestinationFilter extends DestinationFilter {
-
-    private DestinationFilter filters[];
-
-    public CompositeDestinationFilter(ActiveMQDestination destination) {
-        ActiveMQDestination[] destinations = destination.getCompositeDestinations();
-        filters = new DestinationFilter[destinations.length];
-        for (int i = 0; i < destinations.length; i++) {
-            ActiveMQDestination childDestination = destinations[i];
-            filters[i] = DestinationFilter.parseFilter(childDestination);
-        }
-    }
-
-    public boolean matches(ActiveMQDestination destination) {
-        for (int i = 0; i < filters.length; i++) {
-            if (filters[i].matches(destination)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public boolean isWildcard() {
-        return true;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ConstantExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ConstantExpression.java
deleted file mode 100755
index 53e4a13..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ConstantExpression.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * 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.filter;
-
-import java.math.BigDecimal;
-
-import javax.jms.JMSException;
-
-/**
- * Represents a constant expression
- * 
- * 
- */
-public class ConstantExpression implements Expression {
-
-    static class BooleanConstantExpression extends ConstantExpression implements BooleanExpression {
-        public BooleanConstantExpression(Object value) {
-            super(value);
-        }
-
-        public boolean matches(MessageEvaluationContext message) throws JMSException {
-            Object object = evaluate(message);
-            return object != null && object == Boolean.TRUE;
-        }
-    }
-
-    public static final BooleanConstantExpression NULL = new BooleanConstantExpression(null);
-    public static final BooleanConstantExpression TRUE = new BooleanConstantExpression(Boolean.TRUE);
-    public static final BooleanConstantExpression FALSE = new BooleanConstantExpression(Boolean.FALSE);
-
-    private Object value;
-
-    public ConstantExpression(Object value) {
-        this.value = value;
-    }
-
-    public static ConstantExpression createFromDecimal(String text) {
-
-        // Strip off the 'l' or 'L' if needed.
-        if (text.endsWith("l") || text.endsWith("L")) {
-            text = text.substring(0, text.length() - 1);
-        }
-
-        Number value;
-        try {
-            value = new Long(text);
-        } catch (NumberFormatException e) {
-            // The number may be too big to fit in a long.
-            value = new BigDecimal(text);
-        }
-
-        long l = value.longValue();
-        if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
-            value = Integer.valueOf(value.intValue());
-        }
-        return new ConstantExpression(value);
-    }
-
-    public static ConstantExpression createFromHex(String text) {
-        Number value = Long.valueOf(Long.parseLong(text.substring(2), 16));
-        long l = value.longValue();
-        if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
-            value = Integer.valueOf(value.intValue());
-        }
-        return new ConstantExpression(value);
-    }
-
-    public static ConstantExpression createFromOctal(String text) {
-        Number value = Long.valueOf(Long.parseLong(text, 8));
-        long l = value.longValue();
-        if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
-            value = Integer.valueOf(value.intValue());
-        }
-        return new ConstantExpression(value);
-    }
-
-    public static ConstantExpression createFloat(String text) {
-        Number value = new Double(text);
-        return new ConstantExpression(value);
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        return value;
-    }
-
-    public Object getValue() {
-        return value;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        if (value == null) {
-            return "NULL";
-        }
-        if (value instanceof Boolean) {
-            return ((Boolean)value).booleanValue() ? "TRUE" : "FALSE";
-        }
-        if (value instanceof String) {
-            return encodeString((String)value);
-        }
-        return value.toString();
-    }
-
-    /**
-     * TODO: more efficient hashCode()
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return toString().hashCode();
-    }
-
-    /**
-     * TODO: more efficient hashCode()
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object o) {
-
-        if (o == null || !this.getClass().equals(o.getClass())) {
-            return false;
-        }
-        return toString().equals(o.toString());
-
-    }
-
-    /**
-     * Encodes the value of string so that it looks like it would look like when
-     * it was provided in a selector.
-     * 
-     * @param string
-     * @return
-     */
-    public static String encodeString(String s) {
-        StringBuffer b = new StringBuffer();
-        b.append('\'');
-        for (int i = 0; i < s.length(); i++) {
-            char c = s.charAt(i);
-            if (c == '\'') {
-                b.append(c);
-            }
-            b.append(c);
-        }
-        b.append('\'');
-        return b.toString();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DefaultDestinationMapEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DefaultDestinationMapEntry.java
deleted file mode 100644
index 284849e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DefaultDestinationMapEntry.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.filter;
-
-/**
- * A default entry in a DestinationMap which holds a single value.
- * 
- * @org.apache.xbean.XBean element="destinationEntry"
- * 
- * 
- */
-public class DefaultDestinationMapEntry extends DestinationMapEntry {
-    private Object value;
-
-    public Object getValue() {
-        return value;
-    }
-
-    public void setValue(Object value) {
-        this.value = value;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationFilter.java
deleted file mode 100755
index bb16fe6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationFilter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.filter;
-
-import java.io.IOException;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.util.JMSExceptionSupport;
-
-/**
- * Represents a filter which only operates on Destinations
- * 
- * 
- */
-public abstract class DestinationFilter implements BooleanExpression {
-
-    public static final String ANY_DESCENDENT = ">";
-    public static final String ANY_CHILD = "*";
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        return matches(message) ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    public boolean matches(MessageEvaluationContext message) throws JMSException {
-        try {
-            if (message.isDropped()) {
-                return false;
-            }
-            return matches(message.getMessage().getDestination());
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    public abstract boolean matches(ActiveMQDestination destination);
-
-    public static DestinationFilter parseFilter(ActiveMQDestination destination) {
-        if (destination.isComposite()) {
-            return new CompositeDestinationFilter(destination);
-        }
-        String[] paths = DestinationPath.getDestinationPaths(destination);
-        int idx = paths.length - 1;
-        if (idx >= 0) {
-            String lastPath = paths[idx];
-            if (lastPath.equals(ANY_DESCENDENT)) {
-                return new PrefixDestinationFilter(paths, destination.getDestinationType());
-            } else {
-                while (idx >= 0) {
-                    lastPath = paths[idx--];
-                    if (lastPath.equals(ANY_CHILD)) {
-                        return new WildcardDestinationFilter(paths, destination.getDestinationType());
-                    }
-                }
-            }
-        }
-
-        // if none of the paths contain a wildcard then use equality
-        return new SimpleDestinationFilter(destination);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMap.java
deleted file mode 100755
index dc31137..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMap.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * A Map-like data structure allowing values to be indexed by
- * {@link ActiveMQDestination} and retrieved by destination - supporting both *
- * and &gt; style of wildcard as well as composite destinations. <br>
- * This class assumes that the index changes rarely but that fast lookup into
- * the index is required. So this class maintains a pre-calculated index for
- * destination steps. So looking up the values for "TEST.*" or "*.TEST" will be
- * pretty fast. <br>
- * Looking up of a value could return a single value or a List of matching
- * values if a wildcard or composite destination is used.
- * 
- * 
- */
-public class DestinationMap {
-    protected static final String ANY_DESCENDENT = DestinationFilter.ANY_DESCENDENT;
-    protected static final String ANY_CHILD = DestinationFilter.ANY_CHILD;
-
-    private DestinationMapNode queueRootNode = new DestinationMapNode(null);
-    private DestinationMapNode tempQueueRootNode = new DestinationMapNode(null);
-    private DestinationMapNode topicRootNode = new DestinationMapNode(null);
-    private DestinationMapNode tempTopicRootNode = new DestinationMapNode(null);
-
-    /**
-     * Looks up the value(s) matching the given Destination key. For simple
-     * destinations this is typically a List of one single value, for wildcards
-     * or composite destinations this will typically be a List of matching
-     * values.
-     * 
-     * @param key the destination to lookup
-     * @return a List of matching values or an empty list if there are no
-     *         matching values.
-     */
-    public synchronized Set get(ActiveMQDestination key) {
-        if (key.isComposite()) {
-            ActiveMQDestination[] destinations = key.getCompositeDestinations();
-            Set answer = new HashSet(destinations.length);
-            for (int i = 0; i < destinations.length; i++) {
-                ActiveMQDestination childDestination = destinations[i];
-                Object value = get(childDestination);
-                if (value instanceof Set) {
-                    answer.addAll((Set)value);
-                } else if (value != null) {
-                    answer.add(value);
-                }
-            }
-            return answer;
-        }
-        return findWildcardMatches(key);
-    }
-
-    public synchronized void put(ActiveMQDestination key, Object value) {
-        if (key.isComposite()) {
-            ActiveMQDestination[] destinations = key.getCompositeDestinations();
-            for (int i = 0; i < destinations.length; i++) {
-                ActiveMQDestination childDestination = destinations[i];
-                put(childDestination, value);
-            }
-            return;
-        }
-        String[] paths = key.getDestinationPaths();
-        getRootNode(key).add(paths, 0, value);
-    }
-
-    /**
-     * Removes the value from the associated destination
-     */
-    public synchronized void remove(ActiveMQDestination key, Object value) {
-        if (key.isComposite()) {
-            ActiveMQDestination[] destinations = key.getCompositeDestinations();
-            for (int i = 0; i < destinations.length; i++) {
-                ActiveMQDestination childDestination = destinations[i];
-                remove(childDestination, value);
-            }
-            return;
-        }
-        String[] paths = key.getDestinationPaths();
-        getRootNode(key).remove(paths, 0, value);
-
-    }
-
-    public int getTopicRootChildCount() {
-        return topicRootNode.getChildCount();
-    }
-
-    public int getQueueRootChildCount() {
-        return queueRootNode.getChildCount();
-    }
-
-    public DestinationMapNode getQueueRootNode() {
-        return queueRootNode;
-    }
-
-    public DestinationMapNode getTopicRootNode() {
-        return topicRootNode;
-    }
-
-    public DestinationMapNode getTempQueueRootNode() {
-        return tempQueueRootNode;
-    }
-
-    public DestinationMapNode getTempTopicRootNode() {
-        return tempTopicRootNode;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    /**
-     * A helper method to allow the destination map to be populated from a
-     * dependency injection framework such as Spring
-     */
-    protected void setEntries(List entries) {
-        for (Iterator iter = entries.iterator(); iter.hasNext();) {
-            Object element = (Object)iter.next();
-            Class type = getEntryClass();
-            if (type.isInstance(element)) {
-                DestinationMapEntry entry = (DestinationMapEntry)element;
-                put(entry.getDestination(), entry.getValue());
-            } else {
-                throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element);
-            }
-        }
-    }
-
-    /**
-     * Returns the type of the allowed entries which can be set via the
-     * {@link #setEntries(List)} method. This allows derived classes to further
-     * restrict the type of allowed entries to make a type safe destination map
-     * for custom policies.
-     */
-    protected Class getEntryClass() {
-        return DestinationMapEntry.class;
-    }
-
-    protected Set findWildcardMatches(ActiveMQDestination key) {
-        String[] paths = key.getDestinationPaths();
-        Set answer = new HashSet();
-        getRootNode(key).appendMatchingValues(answer, paths, 0);
-        return answer;
-    }
-
-    /**
-     * @param key
-     * @return
-     */
-    public Set removeAll(ActiveMQDestination key) {
-        Set rc = new HashSet();
-        if (key.isComposite()) {
-            ActiveMQDestination[] destinations = key.getCompositeDestinations();
-            for (int i = 0; i < destinations.length; i++) {
-                rc.add(removeAll(destinations[i]));
-            }
-            return rc;
-        }
-        String[] paths = key.getDestinationPaths();
-        getRootNode(key).removeAll(rc, paths, 0);
-        return rc;
-    }
-
-    /**
-     * Returns the value which matches the given destination or null if there is
-     * no matching value. If there are multiple values, the results are sorted
-     * and the last item (the biggest) is returned.
-     * 
-     * @param destination the destination to find the value for
-     * @return the largest matching value or null if no value matches
-     */
-    public Object chooseValue(ActiveMQDestination destination) {
-        Set set = get(destination);
-        if (set == null || set.isEmpty()) {
-            return null;
-        }
-        SortedSet sortedSet = new TreeSet(set);
-        return sortedSet.last();
-    }
-
-    /**
-     * Returns the root node for the given destination type
-     */
-    protected DestinationMapNode getRootNode(ActiveMQDestination key) {
-        if (key.isTemporary()){
-            if (key.isQueue()) {
-                return tempQueueRootNode;
-            } else {
-                return tempTopicRootNode;
-            }
-        } else {
-            if (key.isQueue()) {
-                return queueRootNode;
-            } else {
-                return topicRootNode;
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java
deleted file mode 100644
index 45dd074..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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.filter;
-
-import javax.annotation.PostConstruct;
-
-import org.apache.activemq.command.*;
-
-/**
- * A base class for entry objects used to construct a destination based policy
- * map.
- * 
- * 
- * @org.apache.xbean.XBean
- */
-public abstract class DestinationMapEntry implements Comparable {
-
-    private ActiveMQDestination destination;
-
-    public int compareTo(Object that) {
-        if (that instanceof DestinationMapEntry) {
-            DestinationMapEntry thatEntry = (DestinationMapEntry)that;
-            return ActiveMQDestination.compare(destination, thatEntry.destination);
-        } else if (that == null) {
-            return 1;
-        } else {
-            return getClass().getName().compareTo(that.getClass().getName());
-        }
-    }
-
-    /**
-     * A helper method to set the destination from a configuration file
-     */
-    public void setQueue(String name) {
-        setDestination(new ActiveMQQueue(name));
-    }
-
-    /**
-     * A helper method to set the destination from a configuration file
-     */
-    public void setTopic(String name) {
-        setDestination(new ActiveMQTopic(name));
-    }
-
-    public void setTempTopic(boolean flag){
-        setDestination(new ActiveMQTempTopic(">"));
-    }
-    
-    public void setTempQueue(boolean flag){
-        setDestination(new ActiveMQTempQueue(">"));
-    }
-
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void afterPropertiesSet() throws Exception {
-        if (destination == null) {
-            throw new IllegalArgumentException("You must specify the 'destination' property");
-        }
-    }
-
-    public Object getValue() {
-        return this;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapNode.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapNode.java
deleted file mode 100755
index 515ea85..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapNode.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * An implementation class used to implement {@link DestinationMap}
- * 
- * 
- */
-public class DestinationMapNode implements DestinationNode {
-    protected static final String ANY_CHILD = DestinationMap.ANY_CHILD;
-    protected static final String ANY_DESCENDENT = DestinationMap.ANY_DESCENDENT;
-
-    // we synchornize at the DestinationMap level
-    private DestinationMapNode parent;
-    private List values = new ArrayList();
-    private Map childNodes = new HashMap();
-    private String path = "Root";
-    // private DestinationMapNode anyChild;
-    private int pathLength;
-
-    public DestinationMapNode(DestinationMapNode parent) {
-        this.parent = parent;
-        if (parent == null) {
-            pathLength = 0;
-        } else {
-            pathLength = parent.pathLength + 1;
-        }
-    }
-
-    /**
-     * Returns the child node for the given named path or null if it does not
-     * exist
-     */
-    public DestinationMapNode getChild(String path) {
-        return (DestinationMapNode)childNodes.get(path);
-    }
-
-    /**
-     * Returns the child nodes
-     */
-    public Collection getChildren() {
-        return childNodes.values();
-    }
-
-    public int getChildCount() {
-        return childNodes.size();
-    }
-
-    /**
-     * Returns the child node for the given named path, lazily creating one if
-     * it does not yet exist
-     */
-    public DestinationMapNode getChildOrCreate(String path) {
-        DestinationMapNode answer = (DestinationMapNode)childNodes.get(path);
-        if (answer == null) {
-            answer = createChildNode();
-            answer.path = path;
-            childNodes.put(path, answer);
-        }
-        return answer;
-    }
-
-    /**
-     * Returns the node which represents all children (i.e. the * node)
-     */
-    // public DestinationMapNode getAnyChildNode() {
-    // if (anyChild == null) {
-    // anyChild = createChildNode();
-    // }
-    // return anyChild;
-    // }
-    /**
-     * Returns a mutable List of the values available at this node in the tree
-     */
-    public List getValues() {
-        return values;
-    }
-
-    /**
-     * Returns a mutable List of the values available at this node in the tree
-     */
-    public List removeValues() {
-        ArrayList v = new ArrayList(values);
-        // parent.getAnyChildNode().getValues().removeAll(v);
-        values.clear();
-        pruneIfEmpty();
-        return v;
-    }
-
-    public Set removeDesendentValues() {
-        Set answer = new HashSet();
-        removeDesendentValues(answer);
-        return answer;
-    }
-
-    protected void removeDesendentValues(Set answer) {
-        // if (anyChild != null) {
-        // anyChild.removeDesendentValues(answer);
-        // }
-        answer.addAll(removeValues());
-    }
-
-    /**
-     * Returns a list of all the values from this node down the tree
-     */
-    public Set getDesendentValues() {
-        Set answer = new HashSet();
-        appendDescendantValues(answer);
-        return answer;
-    }
-
-    public void add(String[] paths, int idx, Object value) {
-        if (idx >= paths.length) {
-            values.add(value);
-        } else {
-            // if (idx == paths.length - 1) {
-            // getAnyChildNode().getValues().add(value);
-            // }
-            // else {
-            // getAnyChildNode().add(paths, idx + 1, value);
-            // }
-            getChildOrCreate(paths[idx]).add(paths, idx + 1, value);
-        }
-    }
-
-    public void remove(String[] paths, int idx, Object value) {
-        if (idx >= paths.length) {
-            values.remove(value);
-            pruneIfEmpty();
-        } else {
-            // if (idx == paths.length - 1) {
-            // getAnyChildNode().getValues().remove(value);
-            // }
-            // else {
-            // getAnyChildNode().remove(paths, idx + 1, value);
-            // }
-            getChildOrCreate(paths[idx]).remove(paths, ++idx, value);
-        }
-    }
-
-    public void removeAll(Set answer, String[] paths, int startIndex) {
-        DestinationNode node = this;
-        int size = paths.length;
-        for (int i = startIndex; i < size && node != null; i++) {
-
-            String path = paths[i];
-            if (path.equals(ANY_DESCENDENT)) {
-                answer.addAll(node.removeDesendentValues());
-                break;
-            }
-
-            node.appendMatchingWildcards(answer, paths, i);
-            if (path.equals(ANY_CHILD)) {
-                // node = node.getAnyChildNode();
-                node = new AnyChildDestinationNode(node);
-            } else {
-                node = node.getChild(path);
-            }
-        }
-
-        if (node != null) {
-            answer.addAll(node.removeValues());
-        }
-
-    }
-
-    public void appendDescendantValues(Set answer) {
-        answer.addAll(values);
-
-        // lets add all the children too
-        Iterator iter = childNodes.values().iterator();
-        while (iter.hasNext()) {
-            DestinationNode child = (DestinationNode)iter.next();
-            child.appendDescendantValues(answer);
-        }
-
-        // TODO???
-        // if (anyChild != null) {
-        // anyChild.appendDescendantValues(answer);
-        // }
-    }
-
-    /**
-     * Factory method to create a child node
-     */
-    protected DestinationMapNode createChildNode() {
-        return new DestinationMapNode(this);
-    }
-
-    /**
-     * Matches any entries in the map containing wildcards
-     */
-    public void appendMatchingWildcards(Set answer, String[] paths, int idx) {
-        if (idx - 1 > pathLength) {
-            return;
-        }
-        DestinationMapNode wildCardNode = getChild(ANY_CHILD);
-        if (wildCardNode != null) {
-            wildCardNode.appendMatchingValues(answer, paths, idx + 1);
-        }
-        wildCardNode = getChild(ANY_DESCENDENT);
-        if (wildCardNode != null) {
-            answer.addAll(wildCardNode.getDesendentValues());
-        }
-    }
-
-    public void appendMatchingValues(Set answer, String[] paths, int startIndex) {
-        DestinationNode node = this;
-        boolean couldMatchAny = true;
-        int size = paths.length;
-        for (int i = startIndex; i < size && node != null; i++) {
-            String path = paths[i];
-            if (path.equals(ANY_DESCENDENT)) {
-                answer.addAll(node.getDesendentValues());
-                couldMatchAny = false;
-                break;
-            }
-
-            node.appendMatchingWildcards(answer, paths, i);
-
-            if (path.equals(ANY_CHILD)) {
-                node = new AnyChildDestinationNode(node);
-            } else {
-                node = node.getChild(path);
-            }
-        }
-        if (node != null) {
-            answer.addAll(node.getValues());
-            if (couldMatchAny) {
-                // lets allow FOO.BAR to match the FOO.BAR.> entry in the map
-                DestinationNode child = node.getChild(ANY_DESCENDENT);
-                if (child != null) {
-                    answer.addAll(child.getValues());
-                }
-            }
-        }
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    protected void pruneIfEmpty() {
-        if (parent != null && childNodes.isEmpty() && values.isEmpty()) {
-            parent.removeChild(this);
-        }
-    }
-
-    protected void removeChild(DestinationMapNode node) {
-        childNodes.remove(node.getPath());
-        pruneIfEmpty();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationNode.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationNode.java
deleted file mode 100644
index 807aa13..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationNode.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.Collection;
-import java.util.Set;
-
-/**
- * Represents a node in the {@link DestinationMap} tree
- *
- * 
- */
-public interface DestinationNode {
-    void appendMatchingValues(Set answer, String[] paths, int startIndex);
-
-    void appendMatchingWildcards(Set answer, String[] paths, int startIndex);
-
-    void appendDescendantValues(Set answer);
-
-    Collection getDesendentValues();
-
-    DestinationNode getChild(String path);
-
-    Collection getValues();
-
-    Collection getChildren();
-
-    Collection removeDesendentValues();
-
-    Collection removeValues();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java
deleted file mode 100755
index 82a1e4d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-
-/**
- * Helper class for decomposing a Destination into a number of paths
- * 
- * 
- */
-public final class DestinationPath {
-    protected static final char SEPARATOR = '.';
-
-    private DestinationPath() {    
-    }
-    
-    public static String[] getDestinationPaths(String subject) {
-        List<String> list = new ArrayList<String>();
-        int previous = 0;
-        int lastIndex = subject.length() - 1;
-        while (true) {
-            int idx = subject.indexOf(SEPARATOR, previous);
-            if (idx < 0) {
-                list.add(subject.substring(previous, lastIndex + 1));
-                break;
-            }
-            list.add(subject.substring(previous, idx));
-            previous = idx + 1;
-        }
-        String[] answer = new String[list.size()];
-        list.toArray(answer);
-        return answer;
-    }
-
-    public static String[] getDestinationPaths(Message message) throws JMSException {
-        return getDestinationPaths(message.getDestination());
-    }
-
-    public static String[] getDestinationPaths(ActiveMQDestination destination) {
-        return getDestinationPaths(destination.getPhysicalName());
-    }
-
-    /**
-     * Converts the paths to a single String seperated by dots.
-     * 
-     * @param paths
-     * @return
-     */
-    public static String toString(String[] paths) {
-        StringBuffer buffer = new StringBuffer();
-        for (int i = 0; i < paths.length; i++) {
-            if (i > 0) {
-                buffer.append(SEPARATOR);
-            }
-            String path = paths[i];
-            if (path == null) {
-                buffer.append("*");
-            } else {
-                buffer.append(path);
-            }
-        }
-        return buffer.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/Expression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/Expression.java
deleted file mode 100755
index b4afe39..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/Expression.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.filter;
-
-import javax.jms.JMSException;
-
-
-/**
- * Represents an expression
- * 
- * 
- */
-public interface Expression {
-
-    /**
-     * @return the value of this expression
-     */
-    Object evaluate(MessageEvaluationContext message) throws JMSException;
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java
deleted file mode 100755
index bddd3d7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.filter;
-
-import javax.jms.JMSException;
-
-/**
- * A filter performing a comparison of two objects
- * 
- * 
- */
-public abstract class LogicExpression extends BinaryExpression implements BooleanExpression {
-
-    /**
-     * @param left
-     * @param right
-     */
-    public LogicExpression(BooleanExpression left, BooleanExpression right) {
-        super(left, right);
-    }
-
-    public static BooleanExpression createOR(BooleanExpression lvalue, BooleanExpression rvalue) {
-        return new LogicExpression(lvalue, rvalue) {
-
-            public Object evaluate(MessageEvaluationContext message) throws JMSException {
-
-                Boolean lv = (Boolean)left.evaluate(message);
-                // Can we do an OR shortcut??
-                if (lv != null && lv.booleanValue()) {
-                    return Boolean.TRUE;
-                }
-
-                Boolean rv = (Boolean)right.evaluate(message);
-                return rv == null ? null : rv;
-            }
-
-            public String getExpressionSymbol() {
-                return "OR";
-            }
-        };
-    }
-
-    public static BooleanExpression createAND(BooleanExpression lvalue, BooleanExpression rvalue) {
-        return new LogicExpression(lvalue, rvalue) {
-
-            public Object evaluate(MessageEvaluationContext message) throws JMSException {
-
-                Boolean lv = (Boolean)left.evaluate(message);
-
-                // Can we do an AND shortcut??
-                if (lv == null) {
-                    return null;
-                }
-                if (!lv.booleanValue()) {
-                    return Boolean.FALSE;
-                }
-
-                Boolean rv = (Boolean)right.evaluate(message);
-                return rv == null ? null : rv;
-            }
-
-            public String getExpressionSymbol() {
-                return "AND";
-            }
-        };
-    }
-
-    public abstract Object evaluate(MessageEvaluationContext message) throws JMSException;
-
-    public boolean matches(MessageEvaluationContext message) throws JMSException {
-        Object object = evaluate(message);
-        return object != null && object == Boolean.TRUE;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/MessageEvaluationContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/MessageEvaluationContext.java
deleted file mode 100755
index a4c39bf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/MessageEvaluationContext.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.filter;
-
-import java.io.IOException;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-
-/**
- * MessageEvaluationContext is used to cache selection results. A message
- * usually has multiple selectors applied against it. Some selector have a high
- * cost of evaluating against the message. Those selectors may whish to cache
- * evaluation results associated with the message in the
- * MessageEvaluationContext.
- * 
- * 
- */
-public class MessageEvaluationContext {
-
-	protected MessageReference messageReference;
-    protected boolean loaded;
-    protected boolean dropped;
-    protected Message message;
-    protected ActiveMQDestination destination;
-
-    public MessageEvaluationContext() {
-    }
-
-    public boolean isDropped() throws IOException {
-        getMessage();
-        return dropped;
-    }
-
-    public Message getMessage() throws IOException {
-        if (!dropped && !loaded) {
-            loaded = true;
-            messageReference.incrementReferenceCount();
-            message = messageReference.getMessage();
-            if (message == null) {
-                messageReference.decrementReferenceCount();
-                dropped = true;
-                loaded = false;
-            }
-        }
-        return message;
-    }
-
-    public void setMessageReference(MessageReference messageReference) {
-        if (this.messageReference != messageReference) {
-            clearMessageCache();
-        }
-        this.messageReference = messageReference;
-    }
-
-    public void clear() {
-        clearMessageCache();
-        destination = null;
-    }
-
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    /**
-     * A strategy hook to allow per-message caches to be cleared
-     */
-    protected void clearMessageCache() {
-        if (loaded) {
-            messageReference.decrementReferenceCount();
-        }
-        message = null;
-        dropped = false;
-        loaded = false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/MultiExpressionEvaluator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/MultiExpressionEvaluator.java
deleted file mode 100755
index 1bc041b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/MultiExpressionEvaluator.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.JMSException;
-
-/**
- * A MultiExpressionEvaluator is used to evaluate multiple expressions in single
- * method call. <p/> Multiple Expression/ExpressionListener pairs can be added
- * to a MultiExpressionEvaluator object. When the MultiExpressionEvaluator
- * object is evaluated, all the registed Expressions are evaluated and then the
- * associated ExpressionListener is invoked to inform it of the evaluation
- * result. <p/> By evaluating multiple expressions at one time, some
- * optimizations can be made to reduce the number of computations normally
- * required to evaluate all the expressions. <p/> When this class adds an
- * Expression it wrapps each node in the Expression's AST with a CacheExpression
- * object. Then each CacheExpression object (one for each node) is placed in the
- * cachedExpressions map. The cachedExpressions map allows us to find the sub
- * expressions that are common across two different expressions. When adding an
- * Expression in, if a sub Expression of the Expression is allready in the
- * cachedExpressions map, then instead of wrapping the sub expression in a new
- * CacheExpression object, we reuse the CacheExpression allready int the map.
- * <p/> To help illustrate what going on, lets try to give an exmample: If we
- * denote the AST of a Expression as follows:
- * [AST-Node-Type,Left-Node,Right-Node], then A expression like: "3*5+6" would
- * result in "[*,3,[+,5,6]]" <p/> If the [*,3,[+,5,6]] expression is added to
- * the MultiExpressionEvaluator, it would really be converted to:
- * [c0,[*,3,[c1,[+,5,6]]]] where c0 and c1 represent the CacheExpression
- * expression objects that cache the results of the * and the + operation.
- * Constants and Property nodes are not cached. <p/> If later on we add the
- * following expression [=,11,[+,5,6]] ("11=5+6") to the
- * MultiExpressionEvaluator it would be converted to: [c2,[=,11,[c1,[+,5,6]]]],
- * where c2 is a new CacheExpression object but c1 is the same CacheExpression
- * used in the previous expression. <p/> When the expressions are evaluated, the
- * c1 CacheExpression object will only evaluate the [+,5,6] expression once and
- * cache the resulting value. Hence evauating the second expression costs less
- * because that [+,5,6] is not done 2 times. <p/> Problems: - cacheing the
- * values introduces overhead. It may be possible to be smarter about WHICH
- * nodes in the AST are cached and which are not. - Current implementation is
- * not thread safe. This is because you need a way to invalidate all the cached
- * values so that the next evaluation re-evaluates the nodes. By going single
- * threaded, chache invalidation is done quickly by incrementing a 'view'
- * counter. When a CacheExpressionnotices it's last cached value was generated
- * in an old 'view', it invalidates its cached value.
- * 
- *  $Date: 2005/08/27 03:52:36 $
- */
-public class MultiExpressionEvaluator {
-
-    Map<String, ExpressionListenerSet> rootExpressions = new HashMap<String, ExpressionListenerSet>();
-    Map<Expression, CacheExpression> cachedExpressions = new HashMap<Expression, CacheExpression>();
-
-    int view;
-
-    /**
-     * A UnaryExpression that caches the result of the nested expression. The
-     * cached value is valid if the
-     * CacheExpression.cview==MultiExpressionEvaluator.view
-     */
-    public class CacheExpression extends UnaryExpression {
-        short refCount;
-        int cview = view - 1;
-        Object cachedValue;
-        int cachedHashCode;
-
-        public CacheExpression(Expression realExpression) {
-            super(realExpression);
-            cachedHashCode = realExpression.hashCode();
-        }
-
-        /**
-         * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext)
-         */
-        public Object evaluate(MessageEvaluationContext message) throws JMSException {
-            if (view == cview) {
-                return cachedValue;
-            }
-            cachedValue = right.evaluate(message);
-            cview = view;
-            return cachedValue;
-        }
-
-        public int hashCode() {
-            return cachedHashCode;
-        }
-
-        public boolean equals(Object o) {
-            if (o == null) {
-                return false;
-            }
-            return ((CacheExpression)o).right.equals(right);
-        }
-
-        public String getExpressionSymbol() {
-            return null;
-        }
-
-        public String toString() {
-            return right.toString();
-        }
-
-    }
-
-    /**
-     * Multiple listeners my be interested in the results of a single
-     * expression.
-     */
-    static class ExpressionListenerSet {
-        Expression expression;
-        List<ExpressionListener> listeners = new ArrayList<ExpressionListener>();
-    }
-
-    /**
-     * Objects that are interested in the results of an expression should
-     * implement this interface.
-     */
-    static interface ExpressionListener {
-        void evaluateResultEvent(Expression selector, MessageEvaluationContext message, Object result);
-    }
-
-    /**
-     * Adds an ExpressionListener to a given expression. When evaluate is
-     * called, the ExpressionListener will be provided the results of the
-     * Expression applied to the evaluated message.
-     */
-    public void addExpressionListner(Expression selector, ExpressionListener c) {
-        ExpressionListenerSet data = rootExpressions.get(selector.toString());
-        if (data == null) {
-            data = new ExpressionListenerSet();
-            data.expression = addToCache(selector);
-            rootExpressions.put(selector.toString(), data);
-        }
-        data.listeners.add(c);
-    }
-
-    /**
-     * Removes an ExpressionListener from receiving the results of a given
-     * evaluation.
-     */
-    public boolean removeEventListner(String selector, ExpressionListener c) {
-        String expKey = selector;
-        ExpressionListenerSet d = rootExpressions.get(expKey);
-        // that selector had not been added.
-        if (d == null) {
-            return false;
-        }
-        // that selector did not have that listeners..
-        if (!d.listeners.remove(c)) {
-            return false;
-        }
-
-        // If there are no more listeners for this expression....
-        if (d.listeners.size() == 0) {
-            // Un-cache it...
-            removeFromCache((CacheExpression)d.expression);
-            rootExpressions.remove(expKey);
-        }
-        return true;
-    }
-
-    /**
-     * Finds the CacheExpression that has been associated with an expression. If
-     * it is the first time the Expression is being added to the Cache, a new
-     * CacheExpression is created and associated with the expression. <p/> This
-     * method updates the reference counters on the CacheExpression to know when
-     * it is no longer needed.
-     */
-    private CacheExpression addToCache(Expression expr) {
-
-        CacheExpression n = cachedExpressions.get(expr);
-        if (n == null) {
-            n = new CacheExpression(expr);
-            cachedExpressions.put(expr, n);
-            if (expr instanceof UnaryExpression) {
-
-                // Cache the sub expressions too
-                UnaryExpression un = (UnaryExpression)expr;
-                un.setRight(addToCache(un.getRight()));
-
-            } else if (expr instanceof BinaryExpression) {
-
-                // Cache the sub expressions too.
-                BinaryExpression bn = (BinaryExpression)expr;
-                bn.setRight(addToCache(bn.getRight()));
-                bn.setLeft(addToCache(bn.getLeft()));
-
-            }
-        }
-        n.refCount++;
-        return n;
-    }
-
-    /**
-     * Removes an expression from the cache. Updates the reference counters on
-     * the CacheExpression object. When the refernce counter goes to zero, the
-     * entry int the Expression to CacheExpression map is removed.
-     * 
-     * @param cn
-     */
-    private void removeFromCache(CacheExpression cn) {
-        cn.refCount--;
-        Expression realExpr = cn.getRight();
-        if (cn.refCount == 0) {
-            cachedExpressions.remove(realExpr);
-        }
-        if (realExpr instanceof UnaryExpression) {
-            UnaryExpression un = (UnaryExpression)realExpr;
-            removeFromCache((CacheExpression)un.getRight());
-        }
-        if (realExpr instanceof BinaryExpression) {
-            BinaryExpression bn = (BinaryExpression)realExpr;
-            removeFromCache((CacheExpression)bn.getRight());
-        }
-    }
-
-    /**
-     * Evaluates the message against all the Expressions added to this object.
-     * The added ExpressionListeners are notified of the result of the
-     * evaluation.
-     * 
-     * @param message
-     */
-    public void evaluate(MessageEvaluationContext message) {
-        Collection<ExpressionListenerSet> expressionListeners = rootExpressions.values();
-        for (Iterator<ExpressionListenerSet> iter = expressionListeners.iterator(); iter.hasNext();) {
-            ExpressionListenerSet els = iter.next();
-            try {
-                Object result = els.expression.evaluate(message);
-                for (Iterator<ExpressionListener> iterator = els.listeners.iterator(); iterator.hasNext();) {
-                    ExpressionListener l = iterator.next();
-                    l.evaluateResultEvent(els.expression, message, result);
-                }
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/NoLocalExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/NoLocalExpression.java
deleted file mode 100755
index cc1c961..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/NoLocalExpression.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.filter;
-
-import java.io.IOException;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.util.JMSExceptionSupport;
-
-public class NoLocalExpression implements BooleanExpression {
-
-    private final String connectionId;
-
-    public NoLocalExpression(String connectionId) {
-        this.connectionId = connectionId;
-    }
-
-    public boolean matches(MessageEvaluationContext message) throws JMSException {
-        try {
-            if (message.isDropped()) {
-                return false;
-            }
-            return !connectionId.equals(message.getMessage().getMessageId().getProducerId().getConnectionId());
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        return matches(message) ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/NonCachedMessageEvaluationContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/NonCachedMessageEvaluationContext.java
deleted file mode 100644
index 46427b0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/NonCachedMessageEvaluationContext.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.apache.activemq.filter;
-/**
- * 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.
- */
-import java.io.IOException;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.Message;
-
-/**
- * NonCached version of the MessageEvaluationContext
- * 
- * 
- */
-public class NonCachedMessageEvaluationContext extends MessageEvaluationContext {
-
-	
-	public Message getMessage() throws IOException {
-        return messageReference != null ? messageReference.getMessage():null;
-    }
-
-    public void setMessageReference(MessageReference messageReference) {
-        this.messageReference = messageReference;
-    }
-
-    
-    protected void clearMessageCache() {
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PrefixDestinationFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PrefixDestinationFilter.java
deleted file mode 100755
index abe7530..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PrefixDestinationFilter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.filter;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-
-/**
- * Matches messages which match a prefix like "A.B.>"
- *
- * 
- */
-public class PrefixDestinationFilter extends DestinationFilter {
-
-    private String[] prefixes;
-    private byte destinationType;
-
-    /**
-     * An array of paths, the last path is '>'
-     *
-     * @param prefixes
-     */
-    public PrefixDestinationFilter(String[] prefixes, byte destinationType) {
-        this.prefixes = prefixes;
-        this.destinationType = destinationType;
-    }
-
-    public boolean matches(ActiveMQDestination destination) {
-    	if (destination.getDestinationType() != destinationType) return false;
-        String[] path = DestinationPath.getDestinationPaths(destination.getPhysicalName());
-        int length = prefixes.length;
-        if (path.length >= length) {
-            int size = length - 1;
-            for (int i = 0; i < size; i++) {
-                if (!path[i].equals(ANY_CHILD) && !prefixes[i].equals(ANY_CHILD) && !prefixes[i].equals(path[i])) {
-                    return false;
-                }
-            }
-            return true;
-        }
-        return false;
-    }
-
-    public String getText() {
-        return DestinationPath.toString(prefixes);
-    }
-
-    public String toString() {
-        return super.toString() + "[destination: " + getText() + "]";
-    }
-
-    public boolean isWildcard() {
-        return true;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java
deleted file mode 100755
index 867ade8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * 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.filter;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.util.JMSExceptionSupport;
-
-/**
- * Represents a property expression
- * 
- * 
- */
-public class PropertyExpression implements Expression {
-
-    private static final Map<String, SubExpression> JMS_PROPERTY_EXPRESSIONS = new HashMap<String, SubExpression>();
-
-    interface SubExpression {
-        Object evaluate(Message message);
-    }
-
-    static {
-        JMS_PROPERTY_EXPRESSIONS.put("JMSDestination", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                ActiveMQDestination dest = message.getOriginalDestination();
-                if (dest == null) {
-                    dest = message.getDestination();
-                }
-                if (dest == null) {
-                    return null;
-                }
-                return dest.toString();
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSReplyTo", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                if (message.getReplyTo() == null) {
-                    return null;
-                }
-                return message.getReplyTo().toString();
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSType", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return message.getType();
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSDeliveryMode", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Integer.valueOf(message.isPersistent() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT);
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSPriority", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Integer.valueOf(message.getPriority());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                if (message.getMessageId() == null) {
-                    return null;
-                }
-                return message.getMessageId().toString();
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Long.valueOf(message.getTimestamp());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSCorrelationID", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return message.getCorrelationId();
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSExpiration", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Long.valueOf(message.getExpiration());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSRedelivered", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Boolean.valueOf(message.isRedelivered());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXDeliveryCount", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Integer.valueOf(message.getRedeliveryCounter() + 1);
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupID", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return message.getGroupID();
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupSeq", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return new Integer(message.getGroupSequence());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXProducerTXID", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                TransactionId txId = message.getOriginalTransactionId();
-                if (txId == null) {
-                    txId = message.getTransactionId();
-                }
-                if (txId == null) {
-                    return null;
-                }
-                return new Integer(txId.toString());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerInTime", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Long.valueOf(message.getBrokerInTime());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerOutTime", new SubExpression() {
-
-            public Object evaluate(Message message) {
-                return Long.valueOf(message.getBrokerOutTime());
-            }
-        });
-    }
-
-    private final String name;
-    private final SubExpression jmsPropertyExpression;
-
-    public PropertyExpression(String name) {
-        this.name = name;
-        jmsPropertyExpression = JMS_PROPERTY_EXPRESSIONS.get(name);
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        try {
-            if (message.isDropped()) {
-                return null;
-            }
-
-            if (jmsPropertyExpression != null) {
-                return jmsPropertyExpression.evaluate(message.getMessage());
-            }
-            try {
-                return message.getMessage().getProperty(name);
-            } catch (IOException ioe) {
-                throw JMSExceptionSupport.create("Could not get property: " + name + " reason: " + ioe.getMessage(), ioe);
-            }
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-
-    }
-
-    public Object evaluate(Message message) throws JMSException {
-        if (jmsPropertyExpression != null) {
-            return jmsPropertyExpression.evaluate(message);
-        }
-        try {
-            return message.getProperty(name);
-        } catch (IOException ioe) {
-            throw JMSExceptionSupport.create(ioe);
-        }
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return name;
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return name.hashCode();
-    }
-
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object o) {
-
-        if (o == null || !this.getClass().equals(o.getClass())) {
-            return false;
-        }
-        return name.equals(((PropertyExpression)o).name);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/SimpleDestinationFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/SimpleDestinationFilter.java
deleted file mode 100755
index 3195f4c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/SimpleDestinationFilter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.filter;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-
-/**
- * Matches messages sent to an exact destination
- *
- * 
- */
-public class SimpleDestinationFilter extends DestinationFilter {
-
-    private ActiveMQDestination destination;
-
-    public SimpleDestinationFilter(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    public boolean matches(ActiveMQDestination destination) {
-        return this.destination.equals(destination);
-    }
-
-    public boolean isWildcard() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/UnaryExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/UnaryExpression.java
deleted file mode 100755
index 9002a2c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/UnaryExpression.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * 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.filter;
-
-import java.math.BigDecimal;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.JMSException;
-
-/**
- * An expression which performs an operation on two expression values
- * 
- * 
- */
-public abstract class UnaryExpression implements Expression {
-
-    private static final BigDecimal BD_LONG_MIN_VALUE = BigDecimal.valueOf(Long.MIN_VALUE);
-    protected Expression right;
-
-    public UnaryExpression(Expression left) {
-        this.right = left;
-    }
-
-    public static Expression createNegate(Expression left) {
-        return new UnaryExpression(left) {
-            public Object evaluate(MessageEvaluationContext message) throws JMSException {
-                Object rvalue = right.evaluate(message);
-                if (rvalue == null) {
-                    return null;
-                }
-                if (rvalue instanceof Number) {
-                    return negate((Number)rvalue);
-                }
-                return null;
-            }
-
-            public String getExpressionSymbol() {
-                return "-";
-            }
-        };
-    }
-
-    public static BooleanExpression createInExpression(PropertyExpression right, List<Object> elements, final boolean not) {
-
-        // Use a HashSet if there are many elements.
-        Collection<Object> t;
-        if (elements.size() == 0) {
-            t = null;
-        } else if (elements.size() < 5) {
-            t = elements;
-        } else {
-            t = new HashSet<Object>(elements);
-        }
-        final Collection inList = t;
-
-        return new BooleanUnaryExpression(right) {
-            public Object evaluate(MessageEvaluationContext message) throws JMSException {
-
-                Object rvalue = right.evaluate(message);
-                if (rvalue == null) {
-                    return null;
-                }
-                if (rvalue.getClass() != String.class) {
-                    return null;
-                }
-
-                if ((inList != null && inList.contains(rvalue)) ^ not) {
-                    return Boolean.TRUE;
-                } else {
-                    return Boolean.FALSE;
-                }
-
-            }
-
-            public String toString() {
-                StringBuffer answer = new StringBuffer();
-                answer.append(right);
-                answer.append(" ");
-                answer.append(getExpressionSymbol());
-                answer.append(" ( ");
-
-                int count = 0;
-                for (Iterator i = inList.iterator(); i.hasNext();) {
-                    Object o = (Object)i.next();
-                    if (count != 0) {
-                        answer.append(", ");
-                    }
-                    answer.append(o);
-                    count++;
-                }
-
-                answer.append(" )");
-                return answer.toString();
-            }
-
-            public String getExpressionSymbol() {
-                if (not) {
-                    return "NOT IN";
-                } else {
-                    return "IN";
-                }
-            }
-        };
-    }
-
-    abstract static class BooleanUnaryExpression extends UnaryExpression implements BooleanExpression {
-        public BooleanUnaryExpression(Expression left) {
-            super(left);
-        }
-
-        public boolean matches(MessageEvaluationContext message) throws JMSException {
-            Object object = evaluate(message);
-            return object != null && object == Boolean.TRUE;
-        }
-    };
-
-    public static BooleanExpression createNOT(BooleanExpression left) {
-        return new BooleanUnaryExpression(left) {
-            public Object evaluate(MessageEvaluationContext message) throws JMSException {
-                Boolean lvalue = (Boolean)right.evaluate(message);
-                if (lvalue == null) {
-                    return null;
-                }
-                return lvalue.booleanValue() ? Boolean.FALSE : Boolean.TRUE;
-            }
-
-            public String getExpressionSymbol() {
-                return "NOT";
-            }
-        };
-    }
-
-    public static BooleanExpression createXPath(final String xpath) {
-        return new XPathExpression(xpath);
-    }
-
-    public static BooleanExpression createXQuery(final String xpath) {
-        return new XQueryExpression(xpath);
-    }
-
-    public static BooleanExpression createBooleanCast(Expression left) {
-        return new BooleanUnaryExpression(left) {
-            public Object evaluate(MessageEvaluationContext message) throws JMSException {
-                Object rvalue = right.evaluate(message);
-                if (rvalue == null) {
-                    return null;
-                }
-                if (!rvalue.getClass().equals(Boolean.class)) {
-                    return Boolean.FALSE;
-                }
-                return ((Boolean)rvalue).booleanValue() ? Boolean.TRUE : Boolean.FALSE;
-            }
-
-            public String toString() {
-                return right.toString();
-            }
-
-            public String getExpressionSymbol() {
-                return "";
-            }
-        };
-    }
-
-    private static Number negate(Number left) {
-        Class clazz = left.getClass();
-        if (clazz == Integer.class) {
-            return new Integer(-left.intValue());
-        } else if (clazz == Long.class) {
-            return new Long(-left.longValue());
-        } else if (clazz == Float.class) {
-            return new Float(-left.floatValue());
-        } else if (clazz == Double.class) {
-            return new Double(-left.doubleValue());
-        } else if (clazz == BigDecimal.class) {
-            // We ussually get a big deciamal when we have Long.MIN_VALUE
-            // constant in the
-            // Selector. Long.MIN_VALUE is too big to store in a Long as a
-            // positive so we store it
-            // as a Big decimal. But it gets Negated right away.. to here we try
-            // to covert it back
-            // to a Long.
-            BigDecimal bd = (BigDecimal)left;
-            bd = bd.negate();
-
-            if (BD_LONG_MIN_VALUE.compareTo(bd) == 0) {
-                return Long.valueOf(Long.MIN_VALUE);
-            }
-            return bd;
-        } else {
-            throw new RuntimeException("Don't know how to negate: " + left);
-        }
-    }
-
-    public Expression getRight() {
-        return right;
-    }
-
-    public void setRight(Expression expression) {
-        right = expression;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return "(" + getExpressionSymbol() + " " + right.toString() + ")";
-    }
-
-    /**
-     * TODO: more efficient hashCode()
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return toString().hashCode();
-    }
-
-    /**
-     * TODO: more efficient hashCode()
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object o) {
-
-        if (o == null || !this.getClass().equals(o.getClass())) {
-            return false;
-        }
-        return toString().equals(o.toString());
-
-    }
-
-    /**
-     * Returns the symbol that represents this binary expression. For example,
-     * addition is represented by "+"
-     * 
-     * @return
-     */
-    public abstract String getExpressionSymbol();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/WildcardDestinationFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/WildcardDestinationFilter.java
deleted file mode 100755
index f0439af..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/WildcardDestinationFilter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.filter;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-
-/**
- * Matches messages which contain wildcards like "A.B.*.*"
- *
- * 
- */
-public class WildcardDestinationFilter extends DestinationFilter {
-
-    private String[] prefixes;
-    private byte destinationType;
-
-    /**
-     * An array of paths containing * characters
-     *
-     * @param prefixes
-     */
-    public WildcardDestinationFilter(String[] prefixes, byte destinationType) {
-        this.prefixes = new String[prefixes.length];
-        for (int i = 0; i < prefixes.length; i++) {
-            String prefix = prefixes[i];
-            if (!prefix.equals("*")) {
-                this.prefixes[i] = prefix;
-            }
-        }
-        this.destinationType = destinationType;
-    }
-
-    public boolean matches(ActiveMQDestination destination) {
-    	if (destination.getDestinationType() != destinationType) return false;
-        String[] path = DestinationPath.getDestinationPaths(destination);
-        int length = prefixes.length;
-        if (path.length == length) {
-            for (int i = 0; i < length; i++) {
-                String prefix = prefixes[i];
-                if (prefix != null && !prefix.equals(path[i])) {
-                    return false;
-                }
-            }
-            return true;
-        }
-        return false;
-    }
-
-
-    public String getText() {
-        return DestinationPath.toString(prefixes);
-    }
-
-    public String toString() {
-        return super.toString() + "[destination: " + getText() + "]";
-    }
-
-    public boolean isWildcard() {
-        return true;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java
deleted file mode 100755
index ac723d6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XPathExpression.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.filter;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Used to evaluate an XPath Expression in a JMS selector.
- */
-public final class XPathExpression implements BooleanExpression {
-
-    private static final Logger LOG = LoggerFactory.getLogger(XPathExpression.class);
-    private static final String EVALUATOR_SYSTEM_PROPERTY = "org.apache.activemq.XPathEvaluatorClassName";
-    private static final String DEFAULT_EVALUATOR_CLASS_NAME = XalanXPathEvaluator.class.getName();
-
-    private static final Constructor EVALUATOR_CONSTRUCTOR;
-
-    static {
-        String cn = System.getProperty(EVALUATOR_SYSTEM_PROPERTY, DEFAULT_EVALUATOR_CLASS_NAME);
-        Constructor m = null;
-        try {
-            try {
-                m = getXPathEvaluatorConstructor(cn);
-            } catch (Throwable e) {
-                LOG.warn("Invalid " + XPathEvaluator.class.getName() + " implementation: " + cn + ", reason: " + e, e);
-                cn = DEFAULT_EVALUATOR_CLASS_NAME;
-                try {
-                    m = getXPathEvaluatorConstructor(cn);
-                } catch (Throwable e2) {
-                    LOG.error("Default XPath evaluator could not be loaded", e);
-                }
-            }
-        } finally {
-            EVALUATOR_CONSTRUCTOR = m;
-        }
-    }
-
-    private final String xpath;
-    private final XPathEvaluator evaluator;
-
-    public static interface XPathEvaluator {
-        boolean evaluate(Message message) throws JMSException;
-    }
-
-    XPathExpression(String xpath) {
-        this.xpath = xpath;
-        this.evaluator = createEvaluator(xpath);
-    }
-
-    private static Constructor getXPathEvaluatorConstructor(String cn) throws ClassNotFoundException, SecurityException, NoSuchMethodException {
-        Class c = XPathExpression.class.getClassLoader().loadClass(cn);
-        if (!XPathEvaluator.class.isAssignableFrom(c)) {
-            throw new ClassCastException("" + c + " is not an instance of " + XPathEvaluator.class);
-        }
-        return c.getConstructor(new Class[] {String.class});
-    }
-
-    private XPathEvaluator createEvaluator(String xpath2) {
-        try {
-            return (XPathEvaluator)EVALUATOR_CONSTRUCTOR.newInstance(new Object[] {xpath});
-        } catch (InvocationTargetException e) {
-            Throwable cause = e.getCause();
-            if (cause instanceof RuntimeException) {
-                throw (RuntimeException)cause;
-            }
-            throw new RuntimeException("Invalid XPath Expression: " + xpath + " reason: " + e.getMessage(), e);
-        } catch (Throwable e) {
-            throw new RuntimeException("Invalid XPath Expression: " + xpath + " reason: " + e.getMessage(), e);
-        }
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        try {
-            if (message.isDropped()) {
-                return null;
-            }
-            return evaluator.evaluate(message.getMessage()) ? Boolean.TRUE : Boolean.FALSE;
-        } catch (IOException e) {
-            throw JMSExceptionSupport.create(e);
-        }
-
-    }
-
-    public String toString() {
-        return "XPATH " + ConstantExpression.encodeString(xpath);
-    }
-
-    /**
-     * @param message
-     * @return true if the expression evaluates to Boolean.TRUE.
-     * @throws JMSException
-     */
-    public boolean matches(MessageEvaluationContext message) throws JMSException {
-        Object object = evaluate(message);
-        return object != null && object == Boolean.TRUE;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XQueryExpression.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XQueryExpression.java
deleted file mode 100755
index 5f18cbf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XQueryExpression.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.filter;
-
-import javax.jms.JMSException;
-
-/**
- * Used to evaluate an XQuery Expression in a JMS selector.
- */
-public final class XQueryExpression implements BooleanExpression {
-    private final String xpath;
-
-    XQueryExpression(String xpath) {
-        super();
-        this.xpath = xpath;
-    }
-
-    public Object evaluate(MessageEvaluationContext message) throws JMSException {
-        return Boolean.FALSE;
-    }
-
-    public String toString() {
-        return "XQUERY " + ConstantExpression.encodeString(xpath);
-    }
-
-    /**
-     * @param message
-     * @return true if the expression evaluates to Boolean.TRUE.
-     * @throws JMSException
-     */
-    public boolean matches(MessageEvaluationContext message) throws JMSException {
-        Object object = evaluate(message);
-        return object != null && object == Boolean.TRUE;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java
deleted file mode 100755
index 421ad56..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.filter;
-
-import java.io.StringReader;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.TextMessage;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.xpath.XPath;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.traversal.NodeIterator;
-import org.xml.sax.InputSource;
-
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.xpath.CachedXPathAPI;
-import org.apache.xpath.objects.XObject;
-
-
-public class XalanXPathEvaluator implements XPathExpression.XPathEvaluator {
-
-    private final String xpath;
-
-    public XalanXPathEvaluator(String xpath) {
-        this.xpath = xpath;
-    }
-
-    public boolean evaluate(Message m) throws JMSException {
-        if (m instanceof TextMessage) {
-            String text = ((TextMessage)m).getText();
-            return evaluate(text);
-        } else if (m instanceof BytesMessage) {
-            BytesMessage bm = (BytesMessage)m;
-            byte data[] = new byte[(int)bm.getBodyLength()];
-            bm.readBytes(data);
-            return evaluate(data);
-        }
-        return false;
-    }
-
-    private boolean evaluate(byte[] data) {
-        try {
-
-            InputSource inputSource = new InputSource(new ByteArrayInputStream(data));
-
-            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-            factory.setNamespaceAware(true);
-            DocumentBuilder dbuilder = factory.newDocumentBuilder();
-            Document doc = dbuilder.parse(inputSource);
-            
-            CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
-            XObject result = cachedXPathAPI.eval(doc, xpath);
-            if (result.bool())
-            	return true;
-            else {
-            	NodeIterator iterator = cachedXPathAPI.selectNodeIterator(doc, xpath);
-            	return (iterator.nextNode() != null);
-            }  
-
-        } catch (Throwable e) {
-            return false;
-        }
-    }
-
-    private boolean evaluate(String text) {
-        try {
-            InputSource inputSource = new InputSource(new StringReader(text));
-
-            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-            factory.setNamespaceAware(true);
-            DocumentBuilder dbuilder = factory.newDocumentBuilder();
-            Document doc = dbuilder.parse(inputSource);
-
-            //An XPath expression could return a true or false value instead of a node.
-            //eval() is a better way to determine the boolean value of the exp.
-            //For compliance with legacy behavior where selecting an empty node returns true,
-            //selectNodeIterator is attempted in case of a failure.
-            
-            CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
-            XObject result = cachedXPathAPI.eval(doc, xpath);
-            if (result.bool())
-            	return true;
-            else {
-            	NodeIterator iterator = cachedXPathAPI.selectNodeIterator(doc, xpath);
-            	return (iterator.nextNode() != null);
-            }    	
-            
-        } catch (Throwable e) {
-            return false;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/filter/package.html
deleted file mode 100755
index 836ddd9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/filter/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	Filter implementations for wildcards & JMS selectors
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
deleted file mode 100755
index 896e429..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.jndi;
-
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.jms.Queue;
-import javax.jms.Topic;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.spi.InitialContextFactory;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQXAConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * A factory of the ActiveMQ InitialContext which contains
- * {@link ConnectionFactory} instances as well as a child context called
- * <i>destinations</i> which contain all of the current active destinations, in
- * child context depending on the QoS such as transient or durable and queue or
- * topic.
- * 
- * 
- */
-public class ActiveMQInitialContextFactory implements InitialContextFactory {
-
-    private static final String[] DEFAULT_CONNECTION_FACTORY_NAMES = {"ConnectionFactory", "QueueConnectionFactory", "TopicConnectionFactory"};
-
-    private String connectionPrefix = "connection.";
-    private String queuePrefix = "queue.";
-    private String topicPrefix = "topic.";
-
-    public Context getInitialContext(Hashtable environment) throws NamingException {
-        // lets create a factory
-        Map<String, Object> data = new ConcurrentHashMap<String, Object>();
-        String[] names = getConnectionFactoryNames(environment);
-        for (int i = 0; i < names.length; i++) {
-            ActiveMQConnectionFactory factory = null;
-            String name = names[i];
-
-            try {
-                factory = createConnectionFactory(name, environment);
-            } catch (Exception e) {
-                throw new NamingException("Invalid broker URL");
-
-            }
-            /*
-             * if( broker==null ) { try { broker = factory.getEmbeddedBroker(); }
-             * catch (JMSException e) { log.warn("Failed to get embedded
-             * broker", e); } }
-             */
-            data.put(name, factory);
-        }
-
-        createQueues(data, environment);
-        createTopics(data, environment);
-        /*
-         * if (broker != null) { data.put("destinations",
-         * broker.getDestinationContext(environment)); }
-         */
-        data.put("dynamicQueues", new LazyCreateContext() {
-            private static final long serialVersionUID = 6503881346214855588L;
-
-            protected Object createEntry(String name) {
-                return new ActiveMQQueue(name);
-            }
-        });
-        data.put("dynamicTopics", new LazyCreateContext() {
-            private static final long serialVersionUID = 2019166796234979615L;
-
-            protected Object createEntry(String name) {
-                return new ActiveMQTopic(name);
-            }
-        });
-
-        return createContext(environment, data);
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public String getTopicPrefix() {
-        return topicPrefix;
-    }
-
-    public void setTopicPrefix(String topicPrefix) {
-        this.topicPrefix = topicPrefix;
-    }
-
-    public String getQueuePrefix() {
-        return queuePrefix;
-    }
-
-    public void setQueuePrefix(String queuePrefix) {
-        this.queuePrefix = queuePrefix;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    protected ReadOnlyContext createContext(Hashtable environment, Map<String, Object> data) {
-        return new ReadOnlyContext(environment, data);
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory(String name, Hashtable environment) throws URISyntaxException {
-        Hashtable temp = new Hashtable(environment);
-        String prefix = connectionPrefix + name + ".";
-        for (Iterator iter = environment.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            String key = (String)entry.getKey();
-            if (key.startsWith(prefix)) {
-                // Rename the key...
-                temp.remove(key);
-                key = key.substring(prefix.length());
-                temp.put(key, entry.getValue());
-            }
-        }
-        return createConnectionFactory(temp);
-    }
-
-    protected String[] getConnectionFactoryNames(Map environment) {
-        String factoryNames = (String)environment.get("connectionFactoryNames");
-        if (factoryNames != null) {
-            List<String> list = new ArrayList<String>();
-            for (StringTokenizer enumeration = new StringTokenizer(factoryNames, ","); enumeration.hasMoreTokens();) {
-                list.add(enumeration.nextToken().trim());
-            }
-            int size = list.size();
-            if (size > 0) {
-                String[] answer = new String[size];
-                list.toArray(answer);
-                return answer;
-            }
-        }
-        return DEFAULT_CONNECTION_FACTORY_NAMES;
-    }
-
-    protected void createQueues(Map<String, Object> data, Hashtable environment) {
-        for (Iterator iter = environment.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            String key = entry.getKey().toString();
-            if (key.startsWith(queuePrefix)) {
-                String jndiName = key.substring(queuePrefix.length());
-                data.put(jndiName, createQueue(entry.getValue().toString()));
-            }
-        }
-    }
-
-    protected void createTopics(Map<String, Object> data, Hashtable environment) {
-        for (Iterator iter = environment.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            String key = entry.getKey().toString();
-            if (key.startsWith(topicPrefix)) {
-                String jndiName = key.substring(topicPrefix.length());
-                data.put(jndiName, createTopic(entry.getValue().toString()));
-            }
-        }
-    }
-
-    /**
-     * Factory method to create new Queue instances
-     */
-    protected Queue createQueue(String name) {
-        return new ActiveMQQueue(name);
-    }
-
-    /**
-     * Factory method to create new Topic instances
-     */
-    protected Topic createTopic(String name) {
-        return new ActiveMQTopic(name);
-    }
-
-    /**
-     * Factory method to create a new connection factory from the given
-     * environment
-     */
-    protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException {
-        ActiveMQConnectionFactory answer = needsXA(environment) ? new ActiveMQXAConnectionFactory() : new ActiveMQConnectionFactory();
-        Properties properties = new Properties();
-        properties.putAll(environment);
-        answer.setProperties(properties);
-        return answer;
-    }
-
-    private boolean needsXA(Hashtable environment) {
-        boolean isXA = Boolean.parseBoolean((String) environment.get("xa"));
-        // property not applicable to connectionfactory so remove
-        environment.remove("xa");
-        return isXA;
-    }
-
-    public String getConnectionPrefix() {
-        return connectionPrefix;
-    }
-
-    public void setConnectionPrefix(String connectionPrefix) {
-        this.connectionPrefix = connectionPrefix;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactory.java
deleted file mode 100644
index b145ab3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactory.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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.jndi;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-/**
- * This implementation of <CODE>InitialContextFactory</CODE> should be used
- * when ActiveMQ is used as WebSphere Generic JMS Provider. It is proved that it
- * works on WebSphere 5.1. The reason for using this class is that custom
- * property defined for Generic JMS Provider are passed to InitialContextFactory
- * only if it begins with java.naming or javax.naming prefix. Additionaly
- * provider url for the JMS provider can not contain ',' character that is
- * necessary when the list of nodes is provided. So the role of this class is to
- * transform properties before passing it to
- * <CODE>ActiveMQInitialContextFactory</CODE>.
- * 
- * @author Pawel Tucholski
- */
-public class ActiveMQWASInitialContextFactory extends ActiveMQInitialContextFactory {
-
-    /**
-     * @see javax.naming.spi.InitialContextFactory#getInitialContext(java.util.Hashtable)
-     */
-    public Context getInitialContext(Hashtable environment) throws NamingException {
-
-        return super.getInitialContext(transformEnvironment(environment));
-    }
-
-    /**
-     * Performs following transformation of properties:
-     * <ul>
-     * <li>(java.naming.queue.xxx.yyy,value)=>(queue.xxx/yyy,value)
-     * <li>(java.naming.topic.xxx.yyy,value)=>(topic.xxx/yyy,value)
-     * <li>(java.naming.connectionFactoryNames,value)=>(connectionFactoryNames,value)
-     * <li>(java.naming.provider.url,url1;url2)=>java.naming.provider.url,url1,url1)
-     * <ul>
-     * 
-     * @param environment properties for transformation
-     * @return environment after transformation
-     */
-    protected Hashtable transformEnvironment(Hashtable environment) {
-
-        Hashtable environment1 = new Hashtable();
-
-        Iterator it = environment.entrySet().iterator();
-
-        while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry)it.next();
-            String key = (String)entry.getKey();
-            String value = (String)entry.getValue();
-
-            if (key.startsWith("java.naming.queue")) {
-                String key1 = key.substring("java.naming.queue.".length());
-                key1 = key1.replace('.', '/');
-                environment1.put("queue." + key1, value);
-            } else if (key.startsWith("java.naming.topic")) {
-                String key1 = key.substring("java.naming.topic.".length());
-                key1 = key1.replace('.', '/');
-                environment1.put("topic." + key1, value);
-            } else if (key.startsWith("java.naming.connectionFactoryNames")) {
-                String key1 = key.substring("java.naming.".length());
-                environment1.put(key1, value);
-            } else if (key.startsWith("java.naming.connection")) {
-                String key1 = key.substring("java.naming.".length());
-                environment1.put(key1, value);
-            } else if (key.startsWith(Context.PROVIDER_URL)) {
-                // websphere administration console does not exept , character
-                // in provider url, so ; must be used
-                // all ; to ,
-                value = value.replace(';', ',');
-                environment1.put(Context.PROVIDER_URL, value);
-            } else {
-                environment1.put(key, value);
-            }
-        }
-
-        return environment1;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIBaseStorable.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIBaseStorable.java
deleted file mode 100644
index 483e6ab..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIBaseStorable.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.jndi;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Properties;
-
-import javax.naming.NamingException;
-import javax.naming.Reference;
-
-/**
- * Facilitates objects to be stored in JNDI as properties
- */
-
-public abstract class JNDIBaseStorable implements JNDIStorableInterface, Externalizable {
-
-    private Properties properties;
-
-    /**
-     * Set the properties that will represent the instance in JNDI
-     * 
-     * @param props
-     */
-    protected abstract void buildFromProperties(Properties props);
-
-    /**
-     * Initialize the instance from properties stored in JNDI
-     * 
-     * @param props
-     */
-
-    protected abstract void populateProperties(Properties props);
-
-    /**
-     * set the properties for this instance as retrieved from JNDI
-     * 
-     * @param props
-     */
-
-    public synchronized void setProperties(Properties props) {
-        this.properties = props;
-        buildFromProperties(props);
-    }
-
-    /**
-     * Get the properties from this instance for storing in JNDI
-     * 
-     * @return the properties
-     */
-
-    public synchronized Properties getProperties() {
-        if (this.properties == null) {
-            this.properties = new Properties();
-        }
-        populateProperties(this.properties);
-        return this.properties;
-    }
-
-    /**
-     * Retrive a Reference for this instance to store in JNDI
-     * 
-     * @return the built Reference
-     * @throws NamingException if error on building Reference
-     */
-    public Reference getReference() throws NamingException {
-        return JNDIReferenceFactory.createReference(this.getClass().getName(), this);
-    }
-
-    /**
-     * @param in
-     * @throws IOException
-     * @throws ClassNotFoundException
-     * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
-     */
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        Properties props = (Properties)in.readObject();
-        if (props != null) {
-            setProperties(props);
-        }
-
-    }
-
-    /**
-     * @param out
-     * @throws IOException
-     * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
-     */
-    public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeObject(getProperties());
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java
deleted file mode 100644
index 9d7c11e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.jndi;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.StringRefAddr;
-import javax.naming.spi.ObjectFactory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Converts objects implementing JNDIStorable into a property fields so they can
- * be stored and regenerated from JNDI
- */
-public class JNDIReferenceFactory implements ObjectFactory {
-
-    static Logger log = LoggerFactory.getLogger(JNDIReferenceFactory.class);
-
-    /**
-     * This will be called by a JNDIprovider when a Reference is retrieved from
-     * a JNDI store - and generates the orignal instance
-     * 
-     * @param object the Reference object
-     * @param name the JNDI name
-     * @param nameCtx the context
-     * @param environment the environment settings used by JNDI
-     * @return the instance built from the Reference object
-     * @throws Exception if building the instance from Reference fails (usually
-     *                 class not found)
-     */
-    public Object getObjectInstance(Object object, Name name, Context nameCtx, Hashtable environment) throws Exception {
-        Object result = null;
-        if (object instanceof Reference) {
-            Reference reference = (Reference)object;
-
-            if (log.isTraceEnabled()) {
-                log.trace("Getting instance of " + reference.getClassName());
-            }
-
-            Class theClass = loadClass(this, reference.getClassName());
-            if (JNDIStorableInterface.class.isAssignableFrom(theClass)) {
-
-                JNDIStorableInterface store = (JNDIStorableInterface)theClass.newInstance();
-                Properties properties = new Properties();
-                for (Enumeration iter = reference.getAll(); iter.hasMoreElements();) {
-
-                    StringRefAddr addr = (StringRefAddr)iter.nextElement();
-                    properties.put(addr.getType(), (addr.getContent() == null) ? "" : addr.getContent());
-
-                }
-                store.setProperties(properties);
-                result = store;
-            }
-        } else {
-            log.error("Object " + object + " is not a reference - cannot load");
-            throw new RuntimeException("Object " + object + " is not a reference");
-        }
-        return result;
-    }
-
-    /**
-     * Create a Reference instance from a JNDIStorable object
-     * 
-     * @param instanceClassName
-     * @param po
-     * @return
-     * @throws NamingException
-     */
-
-    public static Reference createReference(String instanceClassName, JNDIStorableInterface po) throws NamingException {
-        if (log.isTraceEnabled()) {
-            log.trace("Creating reference: " + instanceClassName + "," + po);
-        }
-        Reference result = new Reference(instanceClassName, JNDIReferenceFactory.class.getName(), null);
-        try {
-            Properties props = po.getProperties();
-            for (Enumeration iter = props.propertyNames(); iter.hasMoreElements();) {
-                String key = (String)iter.nextElement();
-                String value = props.getProperty(key);
-                javax.naming.StringRefAddr addr = new javax.naming.StringRefAddr(key, value);
-                result.add(addr);
-            }
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-            throw new NamingException(e.getMessage());
-        }
-        return result;
-    }
-
-    /**
-     * Retrieve the class loader for a named class
-     * 
-     * @param thisObj
-     * @param className
-     * @return
-     * @throws ClassNotFoundException
-     */
-
-    public static Class loadClass(Object thisObj, String className) throws ClassNotFoundException {
-        // tryu local ClassLoader first.
-        ClassLoader loader = thisObj.getClass().getClassLoader();
-        Class theClass;
-        if (loader != null) {
-            theClass = loader.loadClass(className);
-        } else {
-            // Will be null in jdk1.1.8
-            // use default classLoader
-            theClass = Class.forName(className);
-        }
-        return theClass;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java
deleted file mode 100644
index e8643ab..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.jndi;
-
-import java.util.Properties;
-
-import javax.naming.Referenceable;
-
-/**
- * Faciliates objects to be stored in JNDI as properties
- */
-
-public interface JNDIStorableInterface extends Referenceable {
-
-    /**
-     * set the properties for this instance as retrieved from JNDI
-     *
-     * @param properties
-     */
-
-    void setProperties(Properties properties);
-
-    /**
-     * Get the properties from this instance for storing in JNDI
-     *
-     * @return
-     */
-
-    Properties getProperties();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java
deleted file mode 100755
index 05bc4fd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.jndi;
-
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-/**
- * Allows users to dynamically create items
- * 
- * 
- */
-public abstract class LazyCreateContext extends ReadOnlyContext {
-    public Object lookup(String name) throws NamingException {
-        try {
-            return super.lookup(name);
-        } catch (NameNotFoundException e) {
-            Object answer = createEntry(name);
-            if (answer == null) {
-                throw e;
-            }
-            internalBind(name, answer);
-            return answer;
-        }
-    }
-
-    protected abstract Object createEntry(String name);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/NameParserImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/NameParserImpl.java
deleted file mode 100755
index 4144aed..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/NameParserImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.jndi;
-
-import javax.naming.CompositeName;
-import javax.naming.Name;
-import javax.naming.NameParser;
-import javax.naming.NamingException;
-
-/**
- * A default implementation of {@link NameParser}
- *
- * 
- */
-public class NameParserImpl implements NameParser {
-    public Name parse(String name) throws NamingException {
-        return new CompositeName(name);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java
deleted file mode 100755
index 2443bb6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java
+++ /dev/null
@@ -1,431 +0,0 @@
-/**
- * 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.jndi;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import javax.naming.Binding;
-import javax.naming.CompositeName;
-import javax.naming.Context;
-import javax.naming.LinkRef;
-import javax.naming.Name;
-import javax.naming.NameClassPair;
-import javax.naming.NameNotFoundException;
-import javax.naming.NameParser;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.NotContextException;
-import javax.naming.OperationNotSupportedException;
-import javax.naming.Reference;
-import javax.naming.spi.NamingManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A read-only Context <p/> This version assumes it and all its subcontext are
- * read-only and any attempt to modify (e.g. through bind) will result in an
- * OperationNotSupportedException. Each Context in the tree builds a cache of
- * the entries in all sub-contexts to optimise the performance of lookup.
- * </p>
- * <p>
- * This implementation is intended to optimise the performance of lookup(String)
- * to about the level of a HashMap get. It has been observed that the scheme
- * resolution phase performed by the JVM takes considerably longer, so for
- * optimum performance lookups should be coded like:
- * </p>
- * <code>
- * Context componentContext = (Context)new InitialContext().lookup("java:comp");
- * String envEntry = (String) componentContext.lookup("env/myEntry");
- * String envEntry2 = (String) componentContext.lookup("env/myEntry2");
- * </code>
- * 
- *  $Date: 2005/08/27 03:52:39 $
- */
-@SuppressWarnings("unchecked")
-public class ReadOnlyContext implements Context, Serializable {
-    private static final Logger LOG = LoggerFactory.getLogger(ReadOnlyContext.class);
-    public static final String SEPARATOR = "/";
-    protected static final NameParser NAME_PARSER = new NameParserImpl();
-    private static final long serialVersionUID = -5754338187296859149L;
-
-    protected final Hashtable<String, Object> environment; // environment for this context
-    protected final Map<String, Object> bindings; // bindings at my level
-    protected final Map<String, Object> treeBindings; // all bindings under me
-
-    private boolean frozen;
-    private String nameInNamespace = "";
-
-    public ReadOnlyContext() {
-        environment = new Hashtable<String, Object>();
-        bindings = new HashMap<String, Object>();
-        treeBindings = new HashMap<String, Object>();
-    }
-
-    public ReadOnlyContext(Hashtable env) {
-        if (env == null) {
-            this.environment = new Hashtable<String, Object>();
-        } else {
-            this.environment = new Hashtable<String, Object>(env);
-        }
-        this.bindings = Collections.EMPTY_MAP;
-        this.treeBindings = Collections.EMPTY_MAP;
-    }
-
-    public ReadOnlyContext(Hashtable environment, Map<String, Object> bindings) {
-        if (environment == null) {
-            this.environment = new Hashtable<String, Object>();
-        } else {
-            this.environment = new Hashtable<String, Object>(environment);
-        }
-        this.bindings = new HashMap<String, Object>();
-        treeBindings = new HashMap<String, Object>();
-        if (bindings != null) {
-            for (Map.Entry<String, Object> binding : bindings.entrySet()) {
-                try {
-                    internalBind(binding.getKey(), binding.getValue());
-                } catch (Throwable e) {
-                    LOG.error("Failed to bind " + binding.getKey() + "=" + binding.getValue(), e);
-                }
-            }
-        }
-        frozen = true;
-    }
-
-    public ReadOnlyContext(Hashtable environment, Map bindings, String nameInNamespace) {
-        this(environment, bindings);
-        this.nameInNamespace = nameInNamespace;
-    }
-
-    protected ReadOnlyContext(ReadOnlyContext clone, Hashtable env) {
-        this.bindings = clone.bindings;
-        this.treeBindings = clone.treeBindings;
-        this.environment = new Hashtable<String, Object>(env);
-    }
-
-    protected ReadOnlyContext(ReadOnlyContext clone, Hashtable<String, Object> env, String nameInNamespace) {
-        this(clone, env);
-        this.nameInNamespace = nameInNamespace;
-    }
-
-    public void freeze() {
-        frozen = true;
-    }
-
-    boolean isFrozen() {
-        return frozen;
-    }
-
-    /**
-     * internalBind is intended for use only during setup or possibly by
-     * suitably synchronized superclasses. It binds every possible lookup into a
-     * map in each context. To do this, each context strips off one name segment
-     * and if necessary creates a new context for it. Then it asks that context
-     * to bind the remaining name. It returns a map containing all the bindings
-     * from the next context, plus the context it just created (if it in fact
-     * created it). (the names are suitably extended by the segment originally
-     * lopped off).
-     * 
-     * @param name
-     * @param value
-     * @return
-     * @throws javax.naming.NamingException
-     */
-    protected Map<String, Object> internalBind(String name, Object value) throws NamingException {
-        assert name != null && name.length() > 0;
-        assert !frozen;
-
-        Map<String, Object> newBindings = new HashMap<String, Object>();
-        int pos = name.indexOf('/');
-        if (pos == -1) {
-            if (treeBindings.put(name, value) != null) {
-                throw new NamingException("Something already bound at " + name);
-            }
-            bindings.put(name, value);
-            newBindings.put(name, value);
-        } else {
-            String segment = name.substring(0, pos);
-            assert segment != null;
-            assert !segment.equals("");
-            Object o = treeBindings.get(segment);
-            if (o == null) {
-                o = newContext();
-                treeBindings.put(segment, o);
-                bindings.put(segment, o);
-                newBindings.put(segment, o);
-            } else if (!(o instanceof ReadOnlyContext)) {
-                throw new NamingException("Something already bound where a subcontext should go");
-            }
-            ReadOnlyContext readOnlyContext = (ReadOnlyContext)o;
-            String remainder = name.substring(pos + 1);
-            Map<String, Object> subBindings = readOnlyContext.internalBind(remainder, value);
-            for (Iterator iterator = subBindings.entrySet().iterator(); iterator.hasNext();) {
-                Map.Entry entry = (Map.Entry)iterator.next();
-                String subName = segment + "/" + (String)entry.getKey();
-                Object bound = entry.getValue();
-                treeBindings.put(subName, bound);
-                newBindings.put(subName, bound);
-            }
-        }
-        return newBindings;
-    }
-
-    protected ReadOnlyContext newContext() {
-        return new ReadOnlyContext();
-    }
-
-    public Object addToEnvironment(String propName, Object propVal) throws NamingException {
-        return environment.put(propName, propVal);
-    }
-
-    public Hashtable<String, Object> getEnvironment() throws NamingException {
-        return (Hashtable<String, Object>)environment.clone();
-    }
-
-    public Object removeFromEnvironment(String propName) throws NamingException {
-        return environment.remove(propName);
-    }
-
-    public Object lookup(String name) throws NamingException {
-        if (name.length() == 0) {
-            return this;
-        }
-        Object result = treeBindings.get(name);
-        if (result == null) {
-            result = bindings.get(name);
-        }
-        if (result == null) {
-            int pos = name.indexOf(':');
-            if (pos > 0) {
-                String scheme = name.substring(0, pos);
-                Context ctx = NamingManager.getURLContext(scheme, environment);
-                if (ctx == null) {
-                    throw new NamingException("scheme " + scheme + " not recognized");
-                }
-                return ctx.lookup(name);
-            } else {
-                // Split out the first name of the path
-                // and look for it in the bindings map.
-                CompositeName path = new CompositeName(name);
-
-                if (path.size() == 0) {
-                    return this;
-                } else {
-                    String first = path.get(0);
-                    Object obj = bindings.get(first);
-                    if (obj == null) {
-                        throw new NameNotFoundException(name);
-                    } else if (obj instanceof Context && path.size() > 1) {
-                        Context subContext = (Context)obj;
-                        obj = subContext.lookup(path.getSuffix(1));
-                    }
-                    return obj;
-                }
-            }
-        }
-        if (result instanceof LinkRef) {
-            LinkRef ref = (LinkRef)result;
-            result = lookup(ref.getLinkName());
-        }
-        if (result instanceof Reference) {
-            try {
-                result = NamingManager.getObjectInstance(result, null, null, this.environment);
-            } catch (NamingException e) {
-                throw e;
-            } catch (Exception e) {
-                throw (NamingException)new NamingException("could not look up : " + name).initCause(e);
-            }
-        }
-        if (result instanceof ReadOnlyContext) {
-            String prefix = getNameInNamespace();
-            if (prefix.length() > 0) {
-                prefix = prefix + SEPARATOR;
-            }
-            result = new ReadOnlyContext((ReadOnlyContext)result, environment, prefix + name);
-        }
-        return result;
-    }
-
-    public Object lookup(Name name) throws NamingException {
-        return lookup(name.toString());
-    }
-
-    public Object lookupLink(String name) throws NamingException {
-        return lookup(name);
-    }
-
-    public Name composeName(Name name, Name prefix) throws NamingException {
-        Name result = (Name)prefix.clone();
-        result.addAll(name);
-        return result;
-    }
-
-    public String composeName(String name, String prefix) throws NamingException {
-        CompositeName result = new CompositeName(prefix);
-        result.addAll(new CompositeName(name));
-        return result.toString();
-    }
-
-    public NamingEnumeration list(String name) throws NamingException {
-        Object o = lookup(name);
-        if (o == this) {
-            return new ListEnumeration();
-        } else if (o instanceof Context) {
-            return ((Context)o).list("");
-        } else {
-            throw new NotContextException();
-        }
-    }
-
-    public NamingEnumeration listBindings(String name) throws NamingException {
-        Object o = lookup(name);
-        if (o == this) {
-            return new ListBindingEnumeration();
-        } else if (o instanceof Context) {
-            return ((Context)o).listBindings("");
-        } else {
-            throw new NotContextException();
-        }
-    }
-
-    public Object lookupLink(Name name) throws NamingException {
-        return lookupLink(name.toString());
-    }
-
-    public NamingEnumeration list(Name name) throws NamingException {
-        return list(name.toString());
-    }
-
-    public NamingEnumeration listBindings(Name name) throws NamingException {
-        return listBindings(name.toString());
-    }
-
-    public void bind(Name name, Object obj) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void bind(String name, Object obj) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void close() throws NamingException {
-        // ignore
-    }
-
-    public Context createSubcontext(Name name) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public Context createSubcontext(String name) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void destroySubcontext(Name name) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void destroySubcontext(String name) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public String getNameInNamespace() throws NamingException {
-        return nameInNamespace;
-    }
-
-    public NameParser getNameParser(Name name) throws NamingException {
-        return NAME_PARSER;
-    }
-
-    public NameParser getNameParser(String name) throws NamingException {
-        return NAME_PARSER;
-    }
-
-    public void rebind(Name name, Object obj) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void rebind(String name, Object obj) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void rename(Name oldName, Name newName) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void rename(String oldName, String newName) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void unbind(Name name) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    public void unbind(String name) throws NamingException {
-        throw new OperationNotSupportedException();
-    }
-
-    private abstract class LocalNamingEnumeration implements NamingEnumeration {
-        private final Iterator i = bindings.entrySet().iterator();
-
-        public boolean hasMore() throws NamingException {
-            return i.hasNext();
-        }
-
-        public boolean hasMoreElements() {
-            return i.hasNext();
-        }
-
-        protected Map.Entry getNext() {
-            return (Map.Entry)i.next();
-        }
-
-        public void close() throws NamingException {
-        }
-    }
-
-    private class ListEnumeration extends LocalNamingEnumeration {
-        ListEnumeration() {
-        }
-
-        public Object next() throws NamingException {
-            return nextElement();
-        }
-
-        public Object nextElement() {
-            Map.Entry entry = getNext();
-            return new NameClassPair((String)entry.getKey(), entry.getValue().getClass().getName());
-        }
-    }
-
-    private class ListBindingEnumeration extends LocalNamingEnumeration {
-        ListBindingEnumeration() {
-        }
-
-        public Object next() throws NamingException {
-            return nextElement();
-        }
-
-        public Object nextElement() {
-            Map.Entry entry = getNext();
-            return new Binding((String)entry.getKey(), entry.getValue());
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/package.html
deleted file mode 100755
index 18be33c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-JNDI support classes
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/BytesMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/BytesMarshaller.java
deleted file mode 100644
index 63af7a9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/BytesMarshaller.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * Implementation of a Marshaller for byte arrays
- * 
- * 
- */
-public class BytesMarshaller implements Marshaller {
-    /**
-     * Write the payload of this entry to the RawContainer
-     * 
-     * @param object
-     * @param dataOut
-     * @throws IOException
-     */
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        byte[] data = (byte[])object;
-        dataOut.writeInt(data.length);
-        dataOut.write(data);
-    }
-
-    /**
-     * Read the entry from the RawContainer
-     * 
-     * @param dataIn
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    public Object readPayload(DataInput dataIn) throws IOException {
-        int size = dataIn.readInt();
-        byte[] data = new byte[size];
-        dataIn.readFully(data);
-        return data;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/CommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/CommandMarshaller.java
deleted file mode 100644
index 304075d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/CommandMarshaller.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Marshall a Message or a MessageReference
- * 
- * 
- */
-public class CommandMarshaller implements Marshaller<Object> {
-
-    private WireFormat wireFormat;
-
-    public CommandMarshaller(WireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-
-    }
-
-    public CommandMarshaller() {
-        this(new OpenWireFormat());
-    }
-
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        ByteSequence packet = wireFormat.marshal(object);
-        dataOut.writeInt(packet.length);
-        dataOut.write(packet.data, packet.offset, packet.length);
-    }
-
-    public Object readPayload(DataInput dataIn) throws IOException {
-        int size = dataIn.readInt();
-        byte[] data = new byte[size];
-        dataIn.readFully(data);
-        return wireFormat.unmarshal(new ByteSequence(data));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ContainerId.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ContainerId.java
deleted file mode 100644
index 20b397b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ContainerId.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-import org.apache.activemq.util.IOHelper;
-
-/**
- * Used by RootContainers
- * 
- * 
- */
-public class ContainerId implements Externalizable {
-    private static final long serialVersionUID = -8883779541021821943L;
-    private Object key;
-    private String dataContainerName;
-
-    public ContainerId() {
-    }
-
-    public ContainerId(Object key, String dataContainerName) {
-        this.key = key;
-        this.dataContainerName = dataContainerName;
-    }
-
-    /**
-     * @return Returns the dataContainerPrefix.
-     */
-    public String getDataContainerName() {
-        return dataContainerName;
-    }
-
-    /**
-     * @return Returns the key.
-     */
-    public Object getKey() {
-        return key;
-    }
-
-    public int hashCode() {
-        return key.hashCode() ^ dataContainerName.hashCode();
-    }
-
-    public boolean equals(Object obj) {
-        if (obj == null || obj.getClass() != ContainerId.class) {
-            return false;
-        }
-        ContainerId other = (ContainerId)obj;
-        return other.key.equals(this.key) && other.dataContainerName.equals(this.dataContainerName);
-    }
-
-    public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeUTF(getDataContainerName());
-        out.writeObject(key);
-    }
-
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        dataContainerName = in.readUTF();
-        key = in.readObject();
-    }
-
-    public String toString() {
-        return "CID{" + dataContainerName + ":" + key + "}";
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/IndexMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/IndexMBean.java
deleted file mode 100644
index 20cb735..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/IndexMBean.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.kaha;
-
-/**
- * Index MBean
- *
- */
-public interface IndexMBean {
-    int getSize();
-    boolean isTransient();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ListContainer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ListContainer.java
deleted file mode 100644
index e32e2c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ListContainer.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.kaha;
-
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * Represents a container of persistent objects in the store Acts as a map, but
- * values can be retrieved in insertion order
- * 
- * 
- */
-public interface ListContainer<V> extends List<V> {
-
-    /**
-     * The container is created or retrieved in an unloaded state. load
-     * populates the container will all the indexes used etc and should be
-     * called before any operations on the container
-     */
-    void load();
-
-    /**
-     * unload indexes from the container
-     * 
-     */
-    void unload();
-
-    /**
-     * @return true if the indexes are loaded
-     */
-    boolean isLoaded();
-
-    /**
-     * For homogenous containers can set a custom marshaller for loading values
-     * The default uses Object serialization
-     * 
-     * @param marshaller
-     */
-    void setMarshaller(Marshaller marshaller);
-
-    /**
-     * @return the id the MapContainer was create with
-     */
-    Object getId();
-
-    /**
-     * @return the number of values in the container
-     */
-    int size();
-
-    /**
-     * Inserts the given element at the beginning of this list.
-     * 
-     * @param o the element to be inserted at the beginning of this list.
-     */
-    void addFirst(V o);
-
-    /**
-     * Appends the given element to the end of this list. (Identical in function
-     * to the <tt>add</tt> method; included only for consistency.)
-     * 
-     * @param o the element to be inserted at the end of this list.
-     */
-    void addLast(V o);
-
-    /**
-     * Removes and returns the first element from this list.
-     * 
-     * @return the first element from this list.
-     * @throws NoSuchElementException if this list is empty.
-     */
-    V removeFirst();
-
-    /**
-     * Removes and returns the last element from this list.
-     * 
-     * @return the last element from this list.
-     * @throws NoSuchElementException if this list is empty.
-     */
-    V removeLast();
-
-    /**
-     * remove an objecr from the list without retrieving the old value from the
-     * store
-     * 
-     * @param position
-     * @return true if successful
-     */
-    boolean doRemove(int position);
-
-    /**
-     * add an Object to the list but get a StoreEntry of its position
-     * 
-     * @param object
-     * @return the entry in the Store
-     */
-    StoreEntry placeLast(V object);
-
-    /**
-     * insert an Object in first position int the list but get a StoreEntry of
-     * its position
-     * 
-     * @param object
-     * @return the location in the Store
-     */
-    StoreEntry placeFirst(V object);
-
-    /**
-     * Advanced feature = must ensure the object written doesn't overwrite other
-     * objects in the container
-     * 
-     * @param entry
-     * @param object
-     */
-    void update(StoreEntry entry, V object);
-
-    /**
-     * Retrieve an Object from the Store by its location
-     * 
-     * @param entry
-     * @return the Object at that entry
-     */
-    V get(StoreEntry entry);
-
-    /**
-     * Get the StoreEntry for the first item of the list
-     * 
-     * @return the first StoreEntry or null if the list is empty
-     */
-    StoreEntry getFirst();
-
-    /**
-     * Get the StoreEntry for the last item of the list
-     * 
-     * @return the last StoreEntry or null if the list is empty
-     */
-    StoreEntry getLast();
-
-    /**
-     * Get the next StoreEntry from the list
-     * 
-     * @param entry
-     * @return the next StoreEntry or null
-     */
-    StoreEntry getNext(StoreEntry entry);
-
-    /**
-     * Get the previous StoreEntry from the list
-     * 
-     * @param entry
-     * @return the previous store entry or null
-     */
-    StoreEntry getPrevious(StoreEntry entry);
-
-    /**
-     * remove the Object at the StoreEntry
-     * 
-     * @param entry
-     * @return true if successful
-     */
-    boolean remove(StoreEntry entry);
-
-    /**
-     * It's possible that a StoreEntry could be come stale this will return an
-     * upto date entry for the StoreEntry position
-     * 
-     * @param entry old entry
-     * @return a refreshed StoreEntry
-     */
-    StoreEntry refresh(StoreEntry entry);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MapContainer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MapContainer.java
deleted file mode 100644
index be6493e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MapContainer.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/**
- * 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.kaha;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Represents a container of persistent objects in the store Acts as a map, but
- * values can be retrieved in insertion order
- * 
- * 
- */
-public interface MapContainer<K, V> extends Map<K, V> {
-
-    /**
-     * The container is created or retrieved in an unloaded state. load
-     * populates the container will all the indexes used etc and should be
-     * called before any operations on the container
-     */
-    void load();
-
-    /**
-     * unload indexes from the container
-     * 
-     */
-    void unload();
-
-    /**
-     * @return true if the indexes are loaded
-     */
-    boolean isLoaded();
-
-    /**
-     * For homogenous containers can set a custom marshaller for loading keys
-     * The default uses Object serialization
-     * 
-     * @param keyMarshaller
-     */
-    void setKeyMarshaller(Marshaller<K> keyMarshaller);
-
-    /**
-     * For homogenous containers can set a custom marshaller for loading values
-     * The default uses Object serialization
-     * 
-     * @param valueMarshaller
-     * 
-     */
-    void setValueMarshaller(Marshaller<V> valueMarshaller);
-
-    /**
-     * @return the id the MapContainer was create with
-     */
-    Object getId();
-
-    /**
-     * @return the number of values in the container
-     */
-    int size();
-
-    /**
-     * @return true if there are no values stored in the container
-     */
-    boolean isEmpty();
-
-    /**
-     * @param key
-     * @return true if the container contains the key
-     */
-    boolean containsKey(K key);
-
-    /**
-     * Get the value associated with the key
-     * 
-     * @param key
-     * @return the value associated with the key from the store
-     */
-    V get(K key);
-
-    /**
-     * @param o
-     * @return true if the MapContainer contains the value o
-     */
-    boolean containsValue(K o);
-
-    /**
-     * Add add entries in the supplied Map
-     * 
-     * @param map
-     */
-    void putAll(Map<K, V> map);
-
-    /**
-     * @return a Set of all the keys
-     */
-    Set<K> keySet();
-
-    /**
-     * @return a collection of all the values - the values will be lazily pulled
-     *         out of the store if iterated etc.
-     */
-    Collection<V> values();
-
-    /**
-     * @return a Set of all the Map.Entry instances - the values will be lazily
-     *         pulled out of the store if iterated etc.
-     */
-    Set<Map.Entry<K, V>> entrySet();
-
-    /**
-     * Add an entry
-     * 
-     * @param key
-     * @param value
-     * @return the old value for the key
-     */
-    V put(K key, V value);
-
-    /**
-     * remove an entry associated with the key
-     * 
-     * @param key
-     * @return the old value assocaited with the key or null
-     */
-    V remove(K key);
-
-    /**
-     * empty the container
-     */
-    void clear();
-
-    /**
-     * Add an entry to the Store Map
-     * 
-     * @param key
-     * @param Value
-     * @return the StoreEntry associated with the entry
-     */
-    StoreEntry place(K key, V value);
-
-    /**
-     * Remove an Entry from ther Map
-     * 
-     * @param entry
-     */
-    void remove(StoreEntry entry);
-
-    /**
-     * Get the Key object from it's location
-     * 
-     * @param keyLocation
-     * @return the key for the entry
-     */
-    K getKey(StoreEntry keyLocation);
-
-    /**
-     * Get the value from it's location
-     * 
-     * @param Valuelocation
-     * @return the Object
-     */
-    V getValue(StoreEntry valueLocation);
-
-    /**
-     * Get the StoreEntry for the first value in the Map
-     * 
-     * @return the first StoreEntry or null if the map is empty
-     */
-    StoreEntry getFirst();
-
-    /**
-     * Get the StoreEntry for the last value item of the Map
-     * 
-     * @return the last StoreEntry or null if the list is empty
-     */
-    StoreEntry getLast();
-
-    /**
-     * Get the next StoreEntry value from the map
-     * 
-     * @param entry
-     * @return the next StoreEntry or null
-     */
-    StoreEntry getNext(StoreEntry entry);
-
-    /**
-     * Get the previous StoreEntry from the map
-     * 
-     * @param entry
-     * @return the previous store entry or null
-     */
-    StoreEntry getPrevious(StoreEntry entry);
-
-    /**
-     * It's possible that a StoreEntry could be come stale this will return an
-     * upto date entry for the StoreEntry position
-     * 
-     * @param entry old entry
-     * @return a refreshed StoreEntry
-     */
-    StoreEntry refresh(StoreEntry entry);
-
-    /**
-     * Get the StoreEntry associated with the key
-     * 
-     * @param key
-     * @return the StoreEntry
-     */
-    StoreEntry getEntry(K key);
-    
-    /**
-     * Set the index bin size
-     * @param size
-     */
-    void setIndexBinSize(int size);
-    
-    /**
-     * @return index bin size
-     */
-    int getIndexBinSize();
-    
-    
-    /**
-     * Add the index key size
-     * @param size
-     */
-    void setIndexKeySize(int size);
-    
-    
-    /**
-     * @return the index key size
-     */
-    int getIndexKeySize();
-    
-   
-    /**
-     * Set the index page size
-     * @param size
-     */
-    void setIndexPageSize(int size);
-    
-    /**
-     * @return the index page size
-     */
-    int getIndexPageSize();
-    
-    /**
-     * set the meximum bin size
-     */
-    void setIndexMaxBinSize(int size);
-    
-    /**
-     * @return the maximum bin size
-     * @return
-     */
-    int getIndexMaxBinSize();
-    
-    /**
-     * @return the loadFactor
-     */
-    public int getIndexLoadFactor();
-    /**
-     * @param loadFactor the loadFactor to set
-     */
-    public void setIndexLoadFactor(int loadFactor);
-    
-    /**
-     * @return the Index MBean
-     */
-    IndexMBean getIndexMBean();
-
-    /**
-     * Clean up all state associated with this container.
-     */
-    void delete();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/Marshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/Marshaller.java
deleted file mode 100644
index d688270..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/Marshaller.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- *Marshaller for marshalling in/out objects to a RawContainer
- * 
- * 
- */
-public interface Marshaller<T> {
-    
-       
-    /**
-     * Write the payload of this entry to the RawContainer
-     * @param object 
-     * @param dataOut
-     * @throws IOException
-     */
-    void writePayload(T object, DataOutput dataOut) throws IOException;
-    
-    
-    /**
-     * Read the entry from the RawContainer
-     * @param dataIn 
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    T readPayload(DataInput dataIn) throws IOException;
-
-   
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageAckWithLocation.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageAckWithLocation.java
deleted file mode 100644
index 5d8d73b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageAckWithLocation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.kaha;
-
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.kaha.impl.async.Location;
-
-public final class MessageAckWithLocation extends MessageAck {
-    public final Location location;
-
-    public MessageAckWithLocation(MessageAck ack, Location location) {
-        ack.copy(this);
-        this.location = location;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageIdMarshaller.java
deleted file mode 100644
index a7ae5ba..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageIdMarshaller.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.command.MessageId;
-
-/**
- * Implementation of a Marshaller for MessageIds
- * 
- * 
- */
-public class MessageIdMarshaller implements Marshaller<MessageId> {
-    /**
-     * Write the payload of this entry to the RawContainer
-     * 
-     * @param object
-     * @param dataOut
-     * @throws IOException
-     */
-    public void writePayload(MessageId object, DataOutput dataOut) throws IOException {
-        dataOut.writeUTF(object.toString());
-    }
-
-    /**
-     * Read the entry from the RawContainer
-     * 
-     * @param dataIn
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    public MessageId readPayload(DataInput dataIn) throws IOException {
-        return new MessageId(dataIn.readUTF());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageMarshaller.java
deleted file mode 100644
index 37d54ca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageMarshaller.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Implementation of a Marshaller for MessageIds
- * 
- * 
- */
-public class MessageMarshaller implements Marshaller<Message> {
-
-    private WireFormat wireFormat;
-
-    /**
-     * Constructor
-     * 
-     * @param wireFormat
-     */
-    public MessageMarshaller(WireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-    }
-
-    /**
-     * Write the payload of this entry to the RawContainer
-     * 
-     * @param message
-     * @param dataOut
-     * @throws IOException
-     */
-    public void writePayload(Message message, DataOutput dataOut) throws IOException {
-        ByteSequence packet = wireFormat.marshal(message);
-        dataOut.writeInt(packet.length);
-        dataOut.write(packet.data, packet.offset, packet.length);
-    }
-
-    /**
-     * Read the entry from the RawContainer
-     * 
-     * @param dataIn
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    public Message readPayload(DataInput dataIn) throws IOException {
-        int size = dataIn.readInt();
-        byte[] data = new byte[size];
-        dataIn.readFully(data);
-        return (Message)wireFormat.unmarshal(new ByteSequence(data));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java
deleted file mode 100644
index 1ce90d6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-/**
- * Implementation of a Marshaller for Objects
- * 
- * 
- */
-public class ObjectMarshaller implements Marshaller {
-
-    /**
-     * Write the payload of this entry to the RawContainer
-     * 
-     * @param object
-     * @param dataOut
-     * @throws IOException
-     */
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-        ObjectOutputStream objectOut = new ObjectOutputStream(bytesOut);
-        objectOut.writeObject(object);
-        objectOut.close();
-        byte[] data = bytesOut.toByteArray();
-        dataOut.writeInt(data.length);
-        dataOut.write(data);
-    }
-
-    /**
-     * Read the entry from the RawContainer
-     * 
-     * @param dataIn
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    public Object readPayload(DataInput dataIn) throws IOException {
-        int size = dataIn.readInt();
-        byte[] data = new byte[size];
-        dataIn.readFully(data);
-        ByteArrayInputStream bytesIn = new ByteArrayInputStream(data);
-        ObjectInputStream objectIn = new ObjectInputStream(bytesIn);
-        try {
-            return objectIn.readObject();
-        } catch (ClassNotFoundException e) {
-            throw new IOException(e.getMessage());
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/RuntimeStoreException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/RuntimeStoreException.java
deleted file mode 100644
index 3c4644f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/RuntimeStoreException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.kaha;
-
-/**
- * Runtime exception for the Store
- * 
- * 
- */
-
-public class RuntimeStoreException extends RuntimeException {
-
-    private static final long serialVersionUID = 8807084681372365173L;
-
-    /**
-     * Constructor
-     */
-    public RuntimeStoreException() {
-        super();
-    }
-
-    /**
-     * Constructor
-     * 
-     * @param message
-     */
-    public RuntimeStoreException(String message) {
-        super(message);
-    }
-
-    /**
-     * Constructor
-     * 
-     * @param message
-     * @param cause
-     */
-    public RuntimeStoreException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Constructor
-     * 
-     * @param cause
-     */
-    public RuntimeStoreException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/Store.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/Store.java
deleted file mode 100644
index 7d2cd34..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/Store.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.IOException;
-import java.util.Set;
-
-/**
- * A Store is holds persistent containers
- * 
- * 
- */
-public interface Store {
-    /**
-     * Defauly container name
-     */
-    String DEFAULT_CONTAINER_NAME = "kaha";
-
-    /**
-     * Byte Marshaller
-     */
-    Marshaller BYTES_MARSHALLER = new BytesMarshaller();
-
-    /**
-     * Object Marshaller
-     */
-    Marshaller OBJECT_MARSHALLER = new ObjectMarshaller();
-
-    /**
-     * String Marshaller
-     */
-    Marshaller STRING_MARSHALLER = new StringMarshaller();
-
-    /**
-     * Command Marshaller
-     */
-    Marshaller COMMAND_MARSHALLER = new CommandMarshaller();
-    
-    /**
-     * MessageId marshaller
-     */
-    Marshaller MESSAGEID_MARSHALLER = new MessageIdMarshaller();
-
-    /**
-     * close the store
-     * 
-     * @throws IOException
-     */
-    void close() throws IOException;
-
-    /**
-     * Force all writes to disk
-     * 
-     * @throws IOException
-     */
-    void force() throws IOException;
-
-    /**
-     * empty all the contents of the store
-     * 
-     * @throws IOException
-     */
-    void clear() throws IOException;
-
-    /**
-     * delete the store
-     * 
-     * @return true if the delete was successful
-     * @throws IOException
-     */
-    boolean delete() throws IOException;
-
-    /**
-     * Checks if a MapContainer exists in the default container
-     * 
-     * @param id
-     * @return new MapContainer
-     * @throws IOException
-     */
-    boolean doesMapContainerExist(Object id) throws IOException;
-
-    /**
-     * Checks if a MapContainer exists in the named container
-     * 
-     * @param id
-     * @param containerName
-     * @return new MapContainer
-     * @throws IOException
-     */
-    boolean doesMapContainerExist(Object id, String containerName) throws IOException;
-
-    /**
-     * Get a MapContainer with the given id - the MapContainer is created if
-     * needed
-     * 
-     * @param id
-     * @return container for the associated id or null if it doesn't exist
-     * @throws IOException
-     */
-    MapContainer getMapContainer(Object id) throws IOException;
-
-    /**
-     * Get a MapContainer with the given id - the MapContainer is created if
-     * needed
-     * 
-     * @param id
-     * @param containerName
-     * @return container for the associated id or null if it doesn't exist
-     * @throws IOException
-     */
-    MapContainer getMapContainer(Object id, String containerName) throws IOException;
-
-    /**
-     * Get a MapContainer with the given id - the MapContainer is created if
-     * needed
-     * 
-     * @param id
-     * @param containerName
-     * @param persistentIndex
-     * @return container for the associated id or null if it doesn't exist
-     * @throws IOException
-     */
-    MapContainer getMapContainer(Object id, String containerName, boolean persistentIndex) throws IOException;
-
-    /**
-     * delete a container from the default container
-     * 
-     * @param id
-     * @throws IOException
-     */
-    void deleteMapContainer(Object id) throws IOException;
-
-    /**
-     * delete a MapContainer from the name container
-     * 
-     * @param id
-     * @param containerName
-     * @throws IOException
-     */
-    void deleteMapContainer(Object id, String containerName) throws IOException;
-
-    /**
-     * Delete Map container
-     * 
-     * @param id
-     * @throws IOException
-     */
-    void deleteMapContainer(ContainerId id) throws IOException;
-
-    /**
-     * Get a Set of call MapContainer Ids
-     * 
-     * @return the set of ids
-     * @throws IOException
-     */
-    Set<ContainerId> getMapContainerIds() throws IOException;
-
-    /**
-     * Checks if a ListContainer exists in the default container
-     * 
-     * @param id
-     * @return new MapContainer
-     * @throws IOException
-     */
-    boolean doesListContainerExist(Object id) throws IOException;
-
-    /**
-     * Checks if a ListContainer exists in the named container
-     * 
-     * @param id
-     * @param containerName
-     * @return new MapContainer
-     * @throws IOException
-     */
-    boolean doesListContainerExist(Object id, String containerName) throws IOException;
-
-    /**
-     * Get a ListContainer with the given id and creates it if it doesn't exist
-     * 
-     * @param id
-     * @return container for the associated id or null if it doesn't exist
-     * @throws IOException
-     */
-    ListContainer getListContainer(Object id) throws IOException;
-
-    /**
-     * Get a ListContainer with the given id and creates it if it doesn't exist
-     * 
-     * @param id
-     * @param containerName
-     * @return container for the associated id or null if it doesn't exist
-     * @throws IOException
-     */
-    ListContainer getListContainer(Object id, String containerName) throws IOException;
-
-    /**
-     * Get a ListContainer with the given id and creates it if it doesn't exist
-     * 
-     * @param id
-     * @param containerName
-     * @param persistentIndex
-     * @return container for the associated id or null if it doesn't exist
-     * @throws IOException
-     */
-    ListContainer getListContainer(Object id, String containerName, boolean persistentIndex) throws IOException;
-
-    /**
-     * delete a ListContainer from the default container
-     * 
-     * @param id
-     * @throws IOException
-     */
-    void deleteListContainer(Object id) throws IOException;
-
-    /**
-     * delete a ListContainer from the named container
-     * 
-     * @param id
-     * @param containerName
-     * @throws IOException
-     */
-    void deleteListContainer(Object id, String containerName) throws IOException;
-
-    /**
-     * delete a list container
-     * 
-     * @param id
-     * @throws IOException
-     */
-    void deleteListContainer(ContainerId id) throws IOException;
-
-    /**
-     * Get a Set of call ListContainer Ids
-     * 
-     * @return the set of ids
-     * @throws IOException
-     */
-    Set<ContainerId> getListContainerIds() throws IOException;
-
-    /**
-     * @return the maxDataFileLength
-     */
-    long getMaxDataFileLength();
-
-    /**
-     * @param maxDataFileLength the maxDataFileLength to set
-     */
-    void setMaxDataFileLength(long maxDataFileLength);
-
-
-    /**
-     * @return true if the store has been initialized
-     */
-    boolean isInitialized();
-    
-    /**
-     * @return the amount of disk space the store is occupying
-     */
-    long size();
-    
-    /**
-     * @return true if persistent indexes are used by default
-     */
-    public boolean isPersistentIndex();
-    
-	/**
-	 * Set a persistent index as the default if the parameter is true
-	 * @param persistentIndex
-	 */
-	public void setPersistentIndex(boolean persistentIndex);
-	
-	/**
-	 * @return the default container name
-	 */
-	public String getDefaultContainerName();
-
-	/**
-	 * set the default container name
-	 * @param defaultContainerName
-	 */
-    public void setDefaultContainerName(String defaultContainerName);
-
-	
-	/**
-	 * An explict call to initialize - this will also be called
-	 * implicitly for any other operation on the store.
-	 * @throws IOException
-	 */
-	public void initialize() throws IOException;
-	
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreEntry.java
deleted file mode 100644
index 65203b3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreEntry.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.kaha;
-
-/**
- * Entry for Store data
- * 
- * 
- */
-public interface StoreEntry {
-
-    StoreLocation getKeyDataItem();
-
-    StoreLocation getValueDataItem();
-
-    /**
-     * @return next item
-     */
-    long getNextItem();
-
-    /**
-     * @return Returns the keyFile.
-     */
-    int getKeyFile();
-
-    /**
-     * @return Returns the valueFile.
-     */
-    int getValueFile();
-
-    /**
-     * @return Returns the valueOffset.
-     */
-    long getValueOffset();
-
-    /**
-     * @return Returns the offset.
-     */
-    long getOffset();
-
-    int getKeySize();
-
-    int getValueSize();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreFactory.java
deleted file mode 100755
index 9fb7422..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreFactory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.kaha.impl.KahaStore;
-
-/**
- * Factory for creating stores
- * 
- * 
- */
-public final class StoreFactory {
-
-    private StoreFactory() {
-    }
-
-    /**
-     * open or create a Store
-     * 
-     * @param name
-     * @param mode
-     * @return the opened/created store
-     * @throws IOException
-     */
-    public static Store open(String name, String mode) throws IOException {
-        return new KahaStore(name, mode,new AtomicLong());
-    }
-    
-    /**
-     * Open or create a Store
-     * 
-     * @param directory
-     * @param mode
-     * @return
-     * @throws IOException
-     */
-    public static Store open(File directory, String mode) throws IOException {
-        return new KahaStore(directory, mode, new AtomicLong());
-    }
-    
-    /**
-     * open or create a Store
-     * @param name
-     * @param mode
-     * @param size
-     * @return the opened/created store
-     * @throws IOException
-     */
-    public static Store open(String name, String mode, AtomicLong size) throws IOException {
-        return new KahaStore(name, mode,size);
-    }
-    
-
-    /**
-     * Open or create a Store
-     * 
-     * @param directory
-     * @param mode
-     * @param size
-     * @return
-     * @throws IOException
-     */
-    public static Store open(File directory, String mode, AtomicLong size) throws IOException {
-        return new KahaStore(directory, mode, size);
-    }
-    
-
-    /**
-     * Delete a database
-     * 
-     * @param name of the database
-     * @return true if successful
-     * @throws IOException
-     */
-    public static boolean delete(String name) throws IOException {
-        KahaStore store = new KahaStore(name, "rw");
-        return store.delete();
-    }
-    
-    /**
-     * Delete a database
-     * 
-     * @param directory
-     * @return true if successful
-     * @throws IOException
-     */
-    public static boolean delete(File directory) throws IOException {
-        KahaStore store = new KahaStore(directory, "rw");
-        return store.delete();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreLocation.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreLocation.java
deleted file mode 100644
index 4c4de6c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreLocation.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.kaha;
-
-/**
- * Location of a data in the Store
- * 
- * 
- */
-public interface StoreLocation {
-
-    /**
-     * @return Returns the size.
-     */
-    int getSize();
-
-    /**
-     * @return Returns the offset.
-     */
-    long getOffset();
-
-    /**
-     * @return Returns the file.
-     */
-    int getFile();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StringMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StringMarshaller.java
deleted file mode 100644
index 5ca88b5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StringMarshaller.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * Implementation of a Marshaller for Strings
- * 
- * 
- */
-public class StringMarshaller implements Marshaller<String> {
-    /**
-     * Write the payload of this entry to the RawContainer
-     * 
-     * @param object
-     * @param dataOut
-     * @throws IOException
-     */
-    public void writePayload(String object, DataOutput dataOut) throws IOException {
-        dataOut.writeUTF(object);
-    }
-
-    /**
-     * Read the entry from the RawContainer
-     * 
-     * @param dataIn
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    public String readPayload(DataInput dataIn) throws IOException {
-        return dataIn.readUTF();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/DataManager.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/DataManager.java
deleted file mode 100644
index 9bab299..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/DataManager.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.kaha.impl;
-
-import java.io.IOException;
-
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.data.RedoListener;
-
-public interface DataManager {
-
-    String getName();
-
-    Object readItem(Marshaller marshaller, StoreLocation item) throws IOException;
-
-    StoreLocation storeDataItem(Marshaller marshaller, Object payload) throws IOException;
-
-    StoreLocation storeRedoItem(Object payload) throws IOException;
-
-    void updateItem(StoreLocation location, Marshaller marshaller, Object payload) throws IOException;
-
-    void recoverRedoItems(RedoListener listener) throws IOException;
-
-    void close() throws IOException;
-
-    void force() throws IOException;
-
-    boolean delete() throws IOException;
-
-    void addInterestInFile(int file) throws IOException;
-
-    void removeInterestInFile(int file) throws IOException;
-
-    void consolidateDataFiles() throws IOException;
-
-    Marshaller getRedoMarshaller();
-
-    void setRedoMarshaller(Marshaller redoMarshaller);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java
deleted file mode 100755
index a732055..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.kaha.impl;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.kaha.ContainerId;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.data.Item;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A container of roots for other Containers
- * 
- * 
- */
-
-class IndexRootContainer {
-    
-    protected static final Marshaller ROOT_MARSHALLER = Store.OBJECT_MARSHALLER;
-    private static final Logger LOG = LoggerFactory.getLogger(IndexRootContainer.class);
-
-    protected IndexItem root;
-    protected IndexManager indexManager;
-    protected DataManager dataManager;
-    protected Map<Object, StoreEntry> map = new ConcurrentHashMap<Object, StoreEntry>();
-    protected LinkedList<StoreEntry> list = new LinkedList<StoreEntry>();
-
-    IndexRootContainer(IndexItem root, IndexManager im, DataManager dfm) throws IOException {
-        this.root = root;
-        this.indexManager = im;
-        this.dataManager = dfm;
-        long nextItem = root.getNextItem();
-        while (nextItem != Item.POSITION_NOT_SET) {
-            StoreEntry item = indexManager.getIndex(nextItem);
-            StoreLocation data = item.getKeyDataItem();
-            Object key = dataManager.readItem(ROOT_MARSHALLER, data);
-            map.put(key, item);
-            list.add(item);
-            nextItem = item.getNextItem();
-            dataManager.addInterestInFile(item.getKeyFile());
-        }
-    }
-
-    Set<Object> getKeys() {
-        return map.keySet();
-    }
-
-    IndexItem addRoot(IndexManager containerIndexManager, ContainerId key) throws IOException {
-        if (map.containsKey(key)) {
-            removeRoot(containerIndexManager, key);
-        }
-
-        StoreLocation data = dataManager.storeDataItem(ROOT_MARSHALLER, key);
-        IndexItem newRoot = indexManager.createNewIndex();
-        newRoot.setKeyData(data);
-        IndexItem containerRoot = containerIndexManager.createNewIndex();
-        containerIndexManager.storeIndex(containerRoot);
-        newRoot.setValueOffset(containerRoot.getOffset());
-
-        IndexItem last = list.isEmpty() ? null : (IndexItem)list.getLast();
-        last = last == null ? root : last;
-        long prev = last.getOffset();
-        newRoot.setPreviousItem(prev);
-        indexManager.storeIndex(newRoot);
-        last.setNextItem(newRoot.getOffset());
-        indexManager.storeIndex(last);
-        map.put(key, newRoot);
-        list.add(newRoot);
-        return containerRoot;
-    }
-
-    void removeRoot(IndexManager containerIndexManager, ContainerId key) throws IOException {
-        StoreEntry oldRoot = map.remove(key);
-        if (oldRoot != null) {
-            dataManager.removeInterestInFile(oldRoot.getKeyFile());
-            // get the container root
-            IndexItem containerRoot = containerIndexManager.getIndex(oldRoot.getValueOffset());
-            if (containerRoot != null) {
-                containerIndexManager.freeIndex(containerRoot);
-            }
-            int index = list.indexOf(oldRoot);
-            IndexItem prev = index > 0 ? (IndexItem)list.get(index - 1) : root;
-            prev = prev == null ? root : prev;
-            IndexItem next = index < (list.size() - 1) ? (IndexItem)list.get(index + 1) : null;
-            if (next != null) {
-                prev.setNextItem(next.getOffset());
-                next.setPreviousItem(prev.getOffset());
-                indexManager.updateIndexes(next);
-            } else {
-                prev.setNextItem(Item.POSITION_NOT_SET);
-            }
-            indexManager.updateIndexes(prev);
-            list.remove(oldRoot);
-            indexManager.freeIndex((IndexItem)oldRoot);
-        }
-    }
-
-    IndexItem getRoot(IndexManager containerIndexManager, ContainerId key) throws IOException {
-        StoreEntry index = map.get(key);
-        if (index != null) {
-            return containerIndexManager.getIndex(index.getValueOffset());
-        }
-        return null;
-    }
-
-    boolean doesRootExist(Object key) {
-        return map.containsKey(key);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
deleted file mode 100644
index 243cd89..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
+++ /dev/null
@@ -1,576 +0,0 @@
-/**
- * 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.kaha.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileLock;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.kaha.ContainerId;
-import org.apache.activemq.kaha.ListContainer;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.async.AsyncDataManager;
-import org.apache.activemq.kaha.impl.async.DataManagerFacade;
-import org.apache.activemq.kaha.impl.container.ListContainerImpl;
-import org.apache.activemq.kaha.impl.container.MapContainerImpl;
-import org.apache.activemq.kaha.impl.data.DataManagerImpl;
-import org.apache.activemq.kaha.impl.data.Item;
-import org.apache.activemq.kaha.impl.data.RedoListener;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Store Implementation
- * 
- * 
- */
-public class KahaStore implements Store {
-
-    private static final String PROPERTY_PREFIX = "org.apache.activemq.kaha.Store";
-    private static final boolean BROKEN_FILE_LOCK = "true".equals(System.getProperty(PROPERTY_PREFIX
-                                                                                     + ".FileLockBroken",
-                                                                                     "false"));
-    private static final boolean DISABLE_LOCKING = "true".equals(System.getProperty(PROPERTY_PREFIX
-                                                                                    + ".DisableLocking",
-                                                                                    "false"));
-    //according to the String javadoc, all constant strings are interned so this will be the same object throughout the vm
-    //and we can use it as a monitor for the lockset.
-    private final static String LOCKSET_MONITOR = PROPERTY_PREFIX + ".Lock.Monitor";
-    private static final Logger LOG = LoggerFactory.getLogger(KahaStore.class);
-
-    private final File directory;
-    private final String mode;
-    private IndexRootContainer mapsContainer;
-    private IndexRootContainer listsContainer;
-    private final Map<ContainerId, ListContainerImpl> lists = new ConcurrentHashMap<ContainerId, ListContainerImpl>();
-    private final Map<ContainerId, MapContainerImpl> maps = new ConcurrentHashMap<ContainerId, MapContainerImpl>();
-    private final Map<String, DataManager> dataManagers = new ConcurrentHashMap<String, DataManager>();
-    private final Map<String, IndexManager> indexManagers = new ConcurrentHashMap<String, IndexManager>();
-    private boolean closed;
-    private boolean initialized;
-    private boolean logIndexChanges;
-    private boolean useAsyncDataManager;
-    private long maxDataFileLength = 1024 * 1024 * 32;
-    private FileLock lock;
-    private boolean persistentIndex = true;
-    private RandomAccessFile lockFile;
-    private final AtomicLong storeSize;
-    private String defaultContainerName = DEFAULT_CONTAINER_NAME;
-
-    
-    public KahaStore(String name, String mode) throws IOException {
-    	this(new File(IOHelper.toFileSystemDirectorySafeName(name)), mode, new AtomicLong());
-    }
-
-    public KahaStore(File directory, String mode) throws IOException {
-    	this(directory, mode, new AtomicLong());
-    }
-
-    public KahaStore(String name, String mode,AtomicLong storeSize) throws IOException {
-    	this(new File(IOHelper.toFileSystemDirectorySafeName(name)), mode, storeSize);
-    }
-    
-    public KahaStore(File directory, String mode, AtomicLong storeSize) throws IOException {
-        this.mode = mode;
-        this.storeSize = storeSize;
-        this.directory = directory;
-        IOHelper.mkdirs(this.directory);
-    }
-
-    public synchronized void close() throws IOException {
-        if (!closed) {
-            closed = true;
-            if (initialized) {
-                unlock();
-                for (ListContainerImpl container : lists.values()) {
-                    container.close();
-                }
-                lists.clear();
-                for (MapContainerImpl container : maps.values()) {
-                    container.close();
-                }
-                maps.clear();
-                for (Iterator<IndexManager> iter = indexManagers.values().iterator(); iter.hasNext();) {
-                    IndexManager im = iter.next();
-                    im.close();
-                    iter.remove();
-                }
-                for (Iterator<DataManager> iter = dataManagers.values().iterator(); iter.hasNext();) {
-                    DataManager dm = iter.next();
-                    dm.close();
-                    iter.remove();
-                }
-            }
-            if (lockFile!=null) {
-                lockFile.close();
-                lockFile=null;
-            }
-        }
-    }
-
-    public synchronized void force() throws IOException {
-        if (initialized) {
-            for (Iterator<IndexManager> iter = indexManagers.values().iterator(); iter.hasNext();) {
-                IndexManager im = iter.next();
-                im.force();
-            }
-            for (Iterator<DataManager> iter = dataManagers.values().iterator(); iter.hasNext();) {
-                DataManager dm = iter.next();
-                dm.force();
-            }
-        }
-    }
-
-    public synchronized void clear() throws IOException {
-        initialize();
-        for (Iterator i = mapsContainer.getKeys().iterator(); i.hasNext();) {
-            ContainerId id = (ContainerId)i.next();
-            MapContainer container = getMapContainer(id.getKey(), id.getDataContainerName());
-            container.clear();
-        }
-        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
-            ContainerId id = (ContainerId)i.next();
-            ListContainer container = getListContainer(id.getKey(), id.getDataContainerName());
-            container.clear();
-        }
-
-    }
-
-    public synchronized boolean delete() throws IOException {
-        boolean result = true;
-        if (initialized) {
-            clear();
-            for (Iterator<IndexManager> iter = indexManagers.values().iterator(); iter.hasNext();) {
-                IndexManager im = iter.next();
-                result &= im.delete();
-                iter.remove();
-            }
-            for (Iterator<DataManager> iter = dataManagers.values().iterator(); iter.hasNext();) {
-                DataManager dm = iter.next();
-                result &= dm.delete();
-                iter.remove();
-            }
-        }
-        if (directory != null && directory.isDirectory()) {
-            result =IOHelper.deleteChildren(directory);
-            String str = result ? "successfully deleted" : "failed to delete";
-            LOG.info("Kaha Store " + str + " data directory " + directory);
-        }
-        return result;
-    }
-
-    public synchronized boolean isInitialized() {
-        return initialized;
-    }
-
-    public boolean doesMapContainerExist(Object id) throws IOException {
-        return doesMapContainerExist(id, defaultContainerName);
-    }
-
-    public synchronized boolean doesMapContainerExist(Object id, String containerName) throws IOException {
-        initialize();
-        ContainerId containerId = new ContainerId(id, containerName);
-        return maps.containsKey(containerId) || mapsContainer.doesRootExist(containerId);
-    }
-
-    public MapContainer getMapContainer(Object id) throws IOException {
-        return getMapContainer(id, defaultContainerName);
-    }
-
-    public MapContainer getMapContainer(Object id, String containerName) throws IOException {
-        return getMapContainer(id, containerName, persistentIndex);
-    }
-
-    public synchronized MapContainer getMapContainer(Object id, String containerName, boolean persistentIndex)
-        throws IOException {
-        initialize();
-        ContainerId containerId = new ContainerId(id, containerName);
-        MapContainerImpl result = maps.get(containerId);
-        if (result == null) {
-            DataManager dm = getDataManager(containerName);
-            IndexManager im = getIndexManager(dm, containerName);
-
-            IndexItem root = mapsContainer.getRoot(im, containerId);
-            if (root == null) {
-                root = mapsContainer.addRoot(im, containerId);
-            }
-            result = new MapContainerImpl(directory, containerId, root, im, dm, persistentIndex);
-            maps.put(containerId, result);
-        }
-        return result;
-    }
-
-    public void deleteMapContainer(Object id) throws IOException {
-        deleteMapContainer(id, defaultContainerName);
-    }
-
-    public void deleteMapContainer(Object id, String containerName) throws IOException {
-        ContainerId containerId = new ContainerId(id, containerName);
-        deleteMapContainer(containerId);
-    }
-
-    public synchronized void deleteMapContainer(ContainerId containerId) throws IOException {
-        initialize();
-        MapContainerImpl container = maps.remove(containerId);
-        if (container != null) {
-            container.clear();
-            mapsContainer.removeRoot(container.getIndexManager(), containerId);
-            container.close();
-        }
-    }
-
-    public synchronized Set<ContainerId> getMapContainerIds() throws IOException {
-        initialize();
-        Set<ContainerId> set = new HashSet<ContainerId>();
-        for (Iterator i = mapsContainer.getKeys().iterator(); i.hasNext();) {
-            ContainerId id = (ContainerId)i.next();
-            set.add(id);
-        }
-        return set;
-    }
-
-    public boolean doesListContainerExist(Object id) throws IOException {
-        return doesListContainerExist(id, defaultContainerName);
-    }
-
-    public synchronized boolean doesListContainerExist(Object id, String containerName) throws IOException {
-        initialize();
-        ContainerId containerId = new ContainerId(id, containerName);
-        return lists.containsKey(containerId) || listsContainer.doesRootExist(containerId);
-    }
-
-    public ListContainer getListContainer(Object id) throws IOException {
-        return getListContainer(id, defaultContainerName);
-    }
-
-    public ListContainer getListContainer(Object id, String containerName) throws IOException {
-        return getListContainer(id, containerName, persistentIndex);
-    }
-
-    public synchronized ListContainer getListContainer(Object id, String containerName,
-                                                       boolean persistentIndex) throws IOException {
-        initialize();
-        ContainerId containerId = new ContainerId(id, containerName);
-        ListContainerImpl result = lists.get(containerId);
-        if (result == null) {
-            DataManager dm = getDataManager(containerName);
-            IndexManager im = getIndexManager(dm, containerName);
-
-            IndexItem root = listsContainer.getRoot(im, containerId);
-            if (root == null) {
-                root = listsContainer.addRoot(im, containerId);
-            }
-            result = new ListContainerImpl(containerId, root, im, dm, persistentIndex);
-            lists.put(containerId, result);
-        }
-        return result;
-    }
-
-    public void deleteListContainer(Object id) throws IOException {
-        deleteListContainer(id, defaultContainerName);
-    }
-
-    public synchronized void deleteListContainer(Object id, String containerName) throws IOException {
-        ContainerId containerId = new ContainerId(id, containerName);
-        deleteListContainer(containerId);
-    }
-
-    public synchronized void deleteListContainer(ContainerId containerId) throws IOException {
-        initialize();
-        ListContainerImpl container = lists.remove(containerId);
-        if (container != null) {
-            listsContainer.removeRoot(container.getIndexManager(), containerId);
-            container.clear();
-            container.close();
-        }
-    }
-
-    public synchronized Set<ContainerId> getListContainerIds() throws IOException {
-        initialize();
-        Set<ContainerId> set = new HashSet<ContainerId>();
-        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
-            ContainerId id = (ContainerId)i.next();
-            set.add(id);
-        }
-        return set;
-    }
-
-    /**
-     * @return the listsContainer
-     */
-    public IndexRootContainer getListsContainer() {
-        return this.listsContainer;
-    }
-
-    /**
-     * @return the mapsContainer
-     */
-    public IndexRootContainer getMapsContainer() {
-        return this.mapsContainer;
-    }
-
-    public synchronized DataManager getDataManager(String name) throws IOException {
-        DataManager dm = dataManagers.get(name);
-        if (dm == null) {
-            if (isUseAsyncDataManager()) {
-                AsyncDataManager t = new AsyncDataManager(storeSize);
-                t.setDirectory(directory);
-                t.setFilePrefix("async-data-" + name + "-");
-                t.setMaxFileLength((int)maxDataFileLength);
-                t.start();
-                dm = new DataManagerFacade(t, name);
-            } else {
-                DataManagerImpl t = new DataManagerImpl(directory, name,storeSize);
-                t.setMaxFileLength(maxDataFileLength);
-                dm = t;
-            }
-            if (logIndexChanges) {
-                recover(dm);
-            }
-            dataManagers.put(name, dm);
-        }
-        return dm;
-    }
-
-    public synchronized IndexManager getIndexManager(DataManager dm, String name) throws IOException {
-        IndexManager im = indexManagers.get(name);
-        if (im == null) {
-            im = new IndexManager(directory, name, mode, logIndexChanges ? dm : null,storeSize);
-            indexManagers.put(name, im);
-        }
-        return im;
-    }
-
-    private void recover(final DataManager dm) throws IOException {
-        dm.recoverRedoItems(new RedoListener() {
-            public void onRedoItem(StoreLocation item, Object o) throws Exception {
-                RedoStoreIndexItem redo = (RedoStoreIndexItem)o;
-                // IndexManager im = getIndexManager(dm, redo.getIndexName());
-                IndexManager im = getIndexManager(dm, dm.getName());
-                im.redo(redo);
-            }
-        });
-    }
-
-    public synchronized boolean isLogIndexChanges() {
-        return logIndexChanges;
-    }
-
-    public synchronized void setLogIndexChanges(boolean logIndexChanges) {
-        this.logIndexChanges = logIndexChanges;
-    }
-
-    /**
-     * @return the maxDataFileLength
-     */
-    public synchronized long getMaxDataFileLength() {
-        return maxDataFileLength;
-    }
-
-    /**
-     * @param maxDataFileLength the maxDataFileLength to set
-     */
-    public synchronized void setMaxDataFileLength(long maxDataFileLength) {
-        this.maxDataFileLength = maxDataFileLength;
-    }
-
-    /**
-     * @return the default index type
-     */
-    public synchronized String getIndexTypeAsString() {
-        return persistentIndex ? "PERSISTENT" : "VM";
-    }
-
-    /**
-     * Set the default index type
-     * 
-     * @param type "PERSISTENT" or "VM"
-     */
-    public synchronized void setIndexTypeAsString(String type) {
-        if (type.equalsIgnoreCase("VM")) {
-            persistentIndex = false;
-        } else {
-            persistentIndex = true;
-        }
-    }
-    
-    public boolean isPersistentIndex() {
-		return persistentIndex;
-	}
-
-	public void setPersistentIndex(boolean persistentIndex) {
-		this.persistentIndex = persistentIndex;
-	}
-	
-
-    public synchronized boolean isUseAsyncDataManager() {
-        return useAsyncDataManager;
-    }
-
-    public synchronized void setUseAsyncDataManager(boolean useAsyncWriter) {
-        this.useAsyncDataManager = useAsyncWriter;
-    }
-
-    /**
-     * @return size of store
-     * @see org.apache.activemq.kaha.Store#size()
-     */
-    public long size(){
-        return storeSize.get();
-    }
-
-    public String getDefaultContainerName() {
-        return defaultContainerName;
-    }
-
-    public void setDefaultContainerName(String defaultContainerName) {
-        this.defaultContainerName = defaultContainerName;
-    }
-
-    public synchronized void initialize() throws IOException {
-        if (closed) {
-            throw new IOException("Store has been closed.");
-        }
-        if (!initialized) {       
-            LOG.info("Kaha Store using data directory " + directory);
-            lockFile = new RandomAccessFile(new File(directory, "lock"), "rw");
-            lock();
-            DataManager defaultDM = getDataManager(defaultContainerName);
-            IndexManager rootIndexManager = getIndexManager(defaultDM, defaultContainerName);
-            IndexItem mapRoot = new IndexItem();
-            IndexItem listRoot = new IndexItem();
-            if (rootIndexManager.isEmpty()) {
-                mapRoot.setOffset(0);
-                rootIndexManager.storeIndex(mapRoot);
-                listRoot.setOffset(IndexItem.INDEX_SIZE);
-                rootIndexManager.storeIndex(listRoot);
-                rootIndexManager.setLength(IndexItem.INDEX_SIZE * 2);
-            } else {
-                mapRoot = rootIndexManager.getIndex(0);
-                listRoot = rootIndexManager.getIndex(IndexItem.INDEX_SIZE);
-            }
-            initialized = true;
-            mapsContainer = new IndexRootContainer(mapRoot, rootIndexManager, defaultDM);
-            listsContainer = new IndexRootContainer(listRoot, rootIndexManager, defaultDM);
-            /**
-             * Add interest in data files - then consolidate them
-             */
-            generateInterestInMapDataFiles();
-            generateInterestInListDataFiles();
-            for (Iterator<DataManager> i = dataManagers.values().iterator(); i.hasNext();) {
-                DataManager dm = i.next();
-                dm.consolidateDataFiles();
-            }
-        }
-    }
-
-    private void lock() throws IOException {
-        synchronized (LOCKSET_MONITOR) {
-            if (!DISABLE_LOCKING && directory != null && lock == null) {
-                String key = getPropertyKey();
-                String property = System.getProperty(key);
-                if (null == property) {
-                    if (!BROKEN_FILE_LOCK) {
-                        lock = lockFile.getChannel().tryLock(0, lockFile.getChannel().size(), false);
-                        if (lock == null) {
-                            throw new StoreLockedExcpetion("Kaha Store " + directory.getName() + "  is already opened by another application");
-                        } else
-                            System.setProperty(key, new Date().toString());
-                    }
-                } else { //already locked
-                    throw new StoreLockedExcpetion("Kaha Store " + directory.getName() + " is already opened by this application.");
-                }
-            }
-        }
-    }
-
-    private void unlock() throws IOException {
-        synchronized (LOCKSET_MONITOR) {
-            if (!DISABLE_LOCKING && (null != directory) && (null != lock)) {
-                System.getProperties().remove(getPropertyKey());
-                if (lock.isValid()) {
-                    lock.release();
-                }
-                lock = null;
-            }
-        }
-    }
-
-
-    private String getPropertyKey() throws IOException {
-        return getClass().getName() + ".lock." + directory.getCanonicalPath();
-    }
-
-    /**
-     * scans the directory and builds up the IndexManager and DataManager
-     * 
-     * @throws IOException if there is a problem accessing an index or data file
-     */
-    private void generateInterestInListDataFiles() throws IOException {
-        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
-            ContainerId id = (ContainerId)i.next();
-            DataManager dm = getDataManager(id.getDataContainerName());
-            IndexManager im = getIndexManager(dm, id.getDataContainerName());
-            IndexItem theRoot = listsContainer.getRoot(im, id);
-            long nextItem = theRoot.getNextItem();
-            while (nextItem != Item.POSITION_NOT_SET) {
-                IndexItem item = im.getIndex(nextItem);
-                item.setOffset(nextItem);
-                dm.addInterestInFile(item.getKeyFile());
-                dm.addInterestInFile(item.getValueFile());
-                nextItem = item.getNextItem();
-            }
-        }
-    }
-
-    /**
-     * scans the directory and builds up the IndexManager and DataManager
-     * 
-     * @throws IOException if there is a problem accessing an index or data file
-     */
-    private void generateInterestInMapDataFiles() throws IOException {
-        for (Iterator i = mapsContainer.getKeys().iterator(); i.hasNext();) {
-            ContainerId id = (ContainerId)i.next();
-            DataManager dm = getDataManager(id.getDataContainerName());
-            IndexManager im = getIndexManager(dm, id.getDataContainerName());
-            IndexItem theRoot = mapsContainer.getRoot(im, id);
-            long nextItem = theRoot.getNextItem();
-            while (nextItem != Item.POSITION_NOT_SET) {
-                IndexItem item = im.getIndex(nextItem);
-                item.setOffset(nextItem);
-                dm.addInterestInFile(item.getKeyFile());
-                dm.addInterestInFile(item.getValueFile());
-                nextItem = item.getNextItem();
-            }
-
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/StoreLockedExcpetion.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/StoreLockedExcpetion.java
deleted file mode 100644
index 7462920..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/StoreLockedExcpetion.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.kaha.impl;
-
-import java.io.IOException;
-
-/**
- * Exception thrown if the store is in use by another application
- * 
- * 
- */
-public class StoreLockedExcpetion extends IOException {
-
-    private static final long serialVersionUID = 3857646689671366926L;
-
-    /**
-     * Default Constructor
-     */
-    public StoreLockedExcpetion() {
-    }
-
-    /**
-     * @param s
-     */
-    public StoreLockedExcpetion(String s) {
-        super(s);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
deleted file mode 100644
index 568172a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
+++ /dev/null
@@ -1,774 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-import org.apache.activemq.kaha.impl.async.DataFileAppender.WriteCommand;
-import org.apache.activemq.kaha.impl.async.DataFileAppender.WriteKey;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-
-/**
- * Manages DataFiles
- * 
- * 
- */
-public class AsyncDataManager {
-
-    public static final int CONTROL_RECORD_MAX_LENGTH = 1024;
-    public static final int ITEM_HEAD_RESERVED_SPACE = 21;
-    // ITEM_HEAD_SPACE = length + type+ reserved space + SOR
-    public static final int ITEM_HEAD_SPACE = 4 + 1 + ITEM_HEAD_RESERVED_SPACE + 3;
-    public static final int ITEM_HEAD_OFFSET_TO_SOR = ITEM_HEAD_SPACE - 3;
-    public static final int ITEM_FOOT_SPACE = 3; // EOR
-
-    public static final int ITEM_HEAD_FOOT_SPACE = ITEM_HEAD_SPACE + ITEM_FOOT_SPACE;
-
-    public static final byte[] ITEM_HEAD_SOR = new byte[] {'S', 'O', 'R'}; // 
-    public static final byte[] ITEM_HEAD_EOR = new byte[] {'E', 'O', 'R'}; // 
-
-    public static final byte DATA_ITEM_TYPE = 1;
-    public static final byte REDO_ITEM_TYPE = 2;
-    public static final String DEFAULT_DIRECTORY = "data";
-    public static final String DEFAULT_ARCHIVE_DIRECTORY = "data-archive";
-    public static final String DEFAULT_FILE_PREFIX = "data-";
-    public static final int DEFAULT_MAX_FILE_LENGTH = 1024 * 1024 * 32;
-    public static final int DEFAULT_CLEANUP_INTERVAL = 1000 * 30;
-    public static final int PREFERED_DIFF = 1024 * 512;
-
-    private static final Logger LOG = LoggerFactory.getLogger(AsyncDataManager.class);
-    protected Scheduler scheduler;
-
-    protected final Map<WriteKey, WriteCommand> inflightWrites = new ConcurrentHashMap<WriteKey, WriteCommand>();
-
-    protected File directory = new File(DEFAULT_DIRECTORY);
-    protected File directoryArchive = new File (DEFAULT_ARCHIVE_DIRECTORY);
-    protected String filePrefix = DEFAULT_FILE_PREFIX;
-    protected ControlFile controlFile;
-    protected boolean started;
-    protected boolean useNio = true;
-
-    protected int maxFileLength = DEFAULT_MAX_FILE_LENGTH;
-    protected int preferedFileLength = DEFAULT_MAX_FILE_LENGTH - PREFERED_DIFF;
-
-    protected DataFileAppender appender;
-    protected DataFileAccessorPool accessorPool;
-
-    protected Map<Integer, DataFile> fileMap = new HashMap<Integer, DataFile>();
-    protected Map<File, DataFile> fileByFileMap = new LinkedHashMap<File, DataFile>();
-    protected DataFile currentWriteFile;
-
-    protected Location mark;
-    protected final AtomicReference<Location> lastAppendLocation = new AtomicReference<Location>();
-    protected Runnable cleanupTask;
-    protected final AtomicLong storeSize;
-    protected boolean archiveDataLogs;
-    
-    public AsyncDataManager(AtomicLong storeSize) {
-        this.storeSize=storeSize;
-    }
-    
-    public AsyncDataManager() {
-        this(new AtomicLong());
-    }
-
-    @SuppressWarnings("unchecked")
-    public synchronized void start() throws IOException {
-        if (started) {
-            return;
-        }
-
-        started = true;
-        preferedFileLength=Math.max(PREFERED_DIFF, getMaxFileLength()-PREFERED_DIFF);
-        lock();
-
-        accessorPool = new DataFileAccessorPool(this);
-        ByteSequence sequence = controlFile.load();
-        if (sequence != null && sequence.getLength() > 0) {
-            unmarshallState(sequence);
-        }
-        if (useNio) {
-            appender = new NIODataFileAppender(this);
-        } else {
-            appender = new DataFileAppender(this);
-        }
-
-        File[] files = directory.listFiles(new FilenameFilter() {
-            public boolean accept(File dir, String n) {
-                return dir.equals(directory) && n.startsWith(filePrefix);
-            }
-        });
-       
-        if (files != null) {
-            for (int i = 0; i < files.length; i++) {
-                try {
-                    File file = files[i];
-                    String n = file.getName();
-                    String numStr = n.substring(filePrefix.length(), n.length());
-                    int num = Integer.parseInt(numStr);
-                    DataFile dataFile = new DataFile(file, num, preferedFileLength);
-                    fileMap.put(dataFile.getDataFileId(), dataFile);
-                    storeSize.addAndGet(dataFile.getLength());
-                } catch (NumberFormatException e) {
-                    // Ignore file that do not match the pattern.
-                }
-            }
-
-            // Sort the list so that we can link the DataFiles together in the
-            // right order.
-            List<DataFile> l = new ArrayList<DataFile>(fileMap.values());
-            Collections.sort(l);
-            currentWriteFile = null;
-            for (DataFile df : l) {
-                if (currentWriteFile != null) {
-                    currentWriteFile.linkAfter(df);
-                }
-                currentWriteFile = df;
-                fileByFileMap.put(df.getFile(), df);
-            }
-        }
-
-        // Need to check the current Write File to see if there was a partial
-        // write to it.
-        if (currentWriteFile != null) {
-
-            // See if the lastSyncedLocation is valid..
-            Location l = lastAppendLocation.get();
-            if (l != null && l.getDataFileId() != currentWriteFile.getDataFileId().intValue()) {
-                l = null;
-            }
-
-            // If we know the last location that was ok.. then we can skip lots
-            // of checking
-            try{
-            l = recoveryCheck(currentWriteFile, l);
-            lastAppendLocation.set(l);
-            }catch(IOException e){
-            	LOG.warn("recovery check failed", e);
-            }
-        }
-
-        storeState(false);
-
-        cleanupTask = new Runnable() {
-            public void run() {
-                cleanup();
-            }
-        };
-        this.scheduler = new Scheduler("AsyncDataManager Scheduler");
-        try {
-            this.scheduler.start();
-        } catch (Exception e) {
-            IOException ioe =  new IOException("scheduler start: " + e);
-            ioe.initCause(e);
-            throw ioe;
-        }
-        this.scheduler.executePeriodically(cleanupTask, DEFAULT_CLEANUP_INTERVAL);
-    }
-
-    public void lock() throws IOException {
-        synchronized (this) {
-            if (controlFile == null || controlFile.isDisposed()) {
-                IOHelper.mkdirs(directory);
-                controlFile = new ControlFile(new File(directory, filePrefix + "control"), CONTROL_RECORD_MAX_LENGTH);
-            }
-            controlFile.lock();
-        }
-    }
-
-    protected Location recoveryCheck(DataFile dataFile, Location location) throws IOException {
-        if (location == null) {
-            location = new Location();
-            location.setDataFileId(dataFile.getDataFileId());
-            location.setOffset(0);
-        }
-        DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-        try {
-            reader.readLocationDetails(location);
-            while (reader.readLocationDetailsAndValidate(location)) {
-                location.setOffset(location.getOffset() + location.getSize());
-            }
-        } finally {
-            accessorPool.closeDataFileAccessor(reader);
-        }
-        dataFile.setLength(location.getOffset());
-        return location;
-    }
-
-    protected void unmarshallState(ByteSequence sequence) throws IOException {
-        ByteArrayInputStream bais = new ByteArrayInputStream(sequence.getData(), sequence.getOffset(), sequence.getLength());
-        DataInputStream dis = new DataInputStream(bais);
-        if (dis.readBoolean()) {
-            mark = new Location();
-            mark.readExternal(dis);
-        } else {
-            mark = null;
-        }
-        if (dis.readBoolean()) {
-            Location l = new Location();
-            l.readExternal(dis);
-            lastAppendLocation.set(l);
-        } else {
-            lastAppendLocation.set(null);
-        }
-    }
-
-    private synchronized ByteSequence marshallState() throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream dos = new DataOutputStream(baos);
-
-        if (mark != null) {
-            dos.writeBoolean(true);
-            mark.writeExternal(dos);
-        } else {
-            dos.writeBoolean(false);
-        }
-        Location l = lastAppendLocation.get();
-        if (l != null) {
-            dos.writeBoolean(true);
-            l.writeExternal(dos);
-        } else {
-            dos.writeBoolean(false);
-        }
-
-        byte[] bs = baos.toByteArray();
-        return new ByteSequence(bs, 0, bs.length);
-    }
-
-    synchronized DataFile allocateLocation(Location location) throws IOException {
-        if (currentWriteFile == null || ((currentWriteFile.getLength() + location.getSize()) > maxFileLength)) {
-            int nextNum = currentWriteFile != null ? currentWriteFile.getDataFileId().intValue() + 1 : 1;
-
-            String fileName = filePrefix + nextNum;
-            File file = new File(directory, fileName);
-            DataFile nextWriteFile = new DataFile(file, nextNum, preferedFileLength);
-            //actually allocate the disk space
-            nextWriteFile.closeRandomAccessFile(nextWriteFile.openRandomAccessFile(true));
-            fileMap.put(nextWriteFile.getDataFileId(), nextWriteFile);
-            fileByFileMap.put(file, nextWriteFile);
-            if (currentWriteFile != null) {
-                currentWriteFile.linkAfter(nextWriteFile);
-                if (currentWriteFile.isUnused()) {
-                    removeDataFile(currentWriteFile);
-                }
-            }
-            currentWriteFile = nextWriteFile;
-
-        }
-        location.setOffset(currentWriteFile.getLength());
-        location.setDataFileId(currentWriteFile.getDataFileId().intValue());
-        int size = location.getSize();
-        currentWriteFile.incrementLength(size);
-        currentWriteFile.increment();
-        storeSize.addAndGet(size);
-        return currentWriteFile;
-    }
-    
-    public synchronized void removeLocation(Location location) throws IOException{
-       
-        DataFile dataFile = getDataFile(location);
-        dataFile.decrement();
-    }
-
-    synchronized DataFile getDataFile(Location item) throws IOException {
-        Integer key = Integer.valueOf(item.getDataFileId());
-        DataFile dataFile = fileMap.get(key);
-        if (dataFile == null) {
-            LOG.error("Looking for key " + key + " but not found in fileMap: " + fileMap);
-            throw new IOException("Could not locate data file " + filePrefix + item.getDataFileId());
-        }
-        return dataFile;
-    }
-    
-    synchronized File getFile(Location item) throws IOException {
-        Integer key = Integer.valueOf(item.getDataFileId());
-        DataFile dataFile = fileMap.get(key);
-        if (dataFile == null) {
-            LOG.error("Looking for key " + key + " but not found in fileMap: " + fileMap);
-            throw new IOException("Could not locate data file " + filePrefix  + item.getDataFileId());
-        }
-        return dataFile.getFile();
-    }
-
-    private DataFile getNextDataFile(DataFile dataFile) {
-        return (DataFile)dataFile.getNext();
-    }
-
-    public synchronized void close() throws IOException {
-        if (!started) {
-            return;
-        }
-        this.scheduler.cancel(cleanupTask);
-        try {
-            this.scheduler.stop();
-        } catch (Exception e) {
-            IOException ioe = new IOException("scheduler stop: " + e);
-            ioe.initCause(e);
-            throw ioe;
-        }
-        accessorPool.close();
-        storeState(false);
-        appender.close();
-        fileMap.clear();
-        fileByFileMap.clear();
-        controlFile.unlock();
-        controlFile.dispose();
-        started = false;
-    }
-
-    synchronized void cleanup() {
-        if (accessorPool != null) {
-            accessorPool.disposeUnused();
-        }
-    }
-
-    public synchronized boolean delete() throws IOException {
-
-        // Close all open file handles...
-        appender.close();
-        accessorPool.close();
-
-        boolean result = true;
-        for (Iterator i = fileMap.values().iterator(); i.hasNext();) {
-            DataFile dataFile = (DataFile)i.next();
-            storeSize.addAndGet(-dataFile.getLength());
-            result &= dataFile.delete();
-        }
-        fileMap.clear();
-        fileByFileMap.clear();
-        lastAppendLocation.set(null);
-        mark = null;
-        currentWriteFile = null;
-
-        // reopen open file handles...
-        accessorPool = new DataFileAccessorPool(this);
-        if (useNio) {
-            appender = new NIODataFileAppender(this);
-        } else {
-            appender = new DataFileAppender(this);
-        }
-        return result;
-    }
-
-    public synchronized void addInterestInFile(int file) throws IOException {
-        if (file >= 0) {
-            Integer key = Integer.valueOf(file);
-            DataFile dataFile = fileMap.get(key);
-            if (dataFile == null) {
-                throw new IOException("That data file does not exist");
-            }
-            addInterestInFile(dataFile);
-        }
-    }
-
-    synchronized void addInterestInFile(DataFile dataFile) {
-        if (dataFile != null) {
-            dataFile.increment();
-        }
-    }
-
-    public synchronized void removeInterestInFile(int file) throws IOException {
-        if (file >= 0) {
-            Integer key = Integer.valueOf(file);
-            DataFile dataFile = fileMap.get(key);
-            removeInterestInFile(dataFile);
-        }
-       
-    }
-
-    synchronized void removeInterestInFile(DataFile dataFile) throws IOException {
-        if (dataFile != null) {
-            if (dataFile.decrement() <= 0) {
-                removeDataFile(dataFile);
-            }
-        }
-    }
-
-    public synchronized void consolidateDataFilesNotIn(Set<Integer> inUse, Set<Integer>inProgress) throws IOException {
-        Set<Integer> unUsed = new HashSet<Integer>(fileMap.keySet());
-        unUsed.removeAll(inUse);
-        unUsed.removeAll(inProgress);
-                
-        List<DataFile> purgeList = new ArrayList<DataFile>();
-        for (Integer key : unUsed) {
-            DataFile dataFile = fileMap.get(key);
-            purgeList.add(dataFile);
-        }
-        for (DataFile dataFile : purgeList) {
-            if (dataFile.getDataFileId() != currentWriteFile.getDataFileId()) {
-                forceRemoveDataFile(dataFile);
-            }
-        }
-    }
-
-    public synchronized void consolidateDataFilesNotIn(Set<Integer> inUse, Integer lastFile) throws IOException {
-        Set<Integer> unUsed = new HashSet<Integer>(fileMap.keySet());
-        unUsed.removeAll(inUse);
-                
-        List<DataFile> purgeList = new ArrayList<DataFile>();
-        for (Integer key : unUsed) {
-        	// Only add files less than the lastFile..
-        	if( key.intValue() < lastFile.intValue() ) {
-                DataFile dataFile = fileMap.get(key);
-                purgeList.add(dataFile);
-        	}
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("lastFileId=" + lastFile + ", purgeList: (" + purgeList.size() + ") " + purgeList);
-        }
-        for (DataFile dataFile : purgeList) {
-            forceRemoveDataFile(dataFile);
-        }
-	}
-
-    public synchronized void consolidateDataFiles() throws IOException {
-        List<DataFile> purgeList = new ArrayList<DataFile>();
-        for (DataFile dataFile : fileMap.values()) {
-            if (dataFile.isUnused()) {
-                purgeList.add(dataFile);
-            }
-        }
-        for (DataFile dataFile : purgeList) {
-            removeDataFile(dataFile);
-        }
-    }
-
-    private synchronized void removeDataFile(DataFile dataFile) throws IOException {
-
-        // Make sure we don't delete too much data.
-        if (dataFile == currentWriteFile || mark == null || dataFile.getDataFileId() >= mark.getDataFileId()) {
-            LOG.debug("Won't remove DataFile" + dataFile);
-        	return;
-        }
-        forceRemoveDataFile(dataFile);
-    }
-    
-    private synchronized void forceRemoveDataFile(DataFile dataFile)
-            throws IOException {
-        accessorPool.disposeDataFileAccessors(dataFile);
-        fileByFileMap.remove(dataFile.getFile());
-        fileMap.remove(dataFile.getDataFileId());
-        storeSize.addAndGet(-dataFile.getLength());
-        dataFile.unlink();
-        if (archiveDataLogs) {
-            dataFile.move(getDirectoryArchive());
-            LOG.debug("moved data file " + dataFile + " to "
-                    + getDirectoryArchive());
-        } else {
-            boolean result = dataFile.delete();
-            if (!result) {
-                LOG.info("Failed to discard data file " + dataFile);
-            }
-        }
-    }
-
-    /**
-     * @return the maxFileLength
-     */
-    public int getMaxFileLength() {
-        return maxFileLength;
-    }
-
-    /**
-     * @param maxFileLength the maxFileLength to set
-     */
-    public void setMaxFileLength(int maxFileLength) {
-        this.maxFileLength = maxFileLength;
-    }
-
-    @Override
-    public String toString() {
-        return "DataManager:(" + filePrefix + ")";
-    }
-
-    public synchronized Location getMark() throws IllegalStateException {
-        return mark;
-    }
-
-    public synchronized Location getNextLocation(Location location) throws IOException, IllegalStateException {
-
-        Location cur = null;
-        while (true) {
-            if (cur == null) {
-                if (location == null) {
-                    DataFile head = (DataFile)currentWriteFile.getHeadNode();
-                    cur = new Location();
-                    cur.setDataFileId(head.getDataFileId());
-                    cur.setOffset(0);
-                } else {
-                    // Set to the next offset..
-                	if( location.getSize() == -1 ) {
-                		cur = new Location(location);
-                	}  else {
-	            		cur = new Location(location);
-	            		cur.setOffset(location.getOffset()+location.getSize());
-                	}
-                }
-            } else {
-                cur.setOffset(cur.getOffset() + cur.getSize());
-            }
-
-            DataFile dataFile = getDataFile(cur);
-
-            // Did it go into the next file??
-            if (dataFile.getLength() <= cur.getOffset()) {
-                dataFile = getNextDataFile(dataFile);
-                if (dataFile == null) {
-                    return null;
-                } else {
-                    cur.setDataFileId(dataFile.getDataFileId().intValue());
-                    cur.setOffset(0);
-                }
-            }
-
-            // Load in location size and type.
-            DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-            try {
-                reader.readLocationDetails(cur);
-            } finally {
-                accessorPool.closeDataFileAccessor(reader);
-            }
-
-            if (cur.getType() == 0) {
-                return null;
-            } else if (cur.getType() > 0) {
-                // Only return user records.
-                return cur;
-            }
-        }
-    }
-    
-    public synchronized Location getNextLocation(File file, Location lastLocation,boolean thisFileOnly) throws IllegalStateException, IOException{
-        DataFile df = fileByFileMap.get(file);
-        return getNextLocation(df, lastLocation,thisFileOnly);
-    }
-    
-    public synchronized Location getNextLocation(DataFile dataFile,
-            Location lastLocation,boolean thisFileOnly) throws IOException, IllegalStateException {
-
-        Location cur = null;
-        while (true) {
-            if (cur == null) {
-                if (lastLocation == null) {
-                    DataFile head = (DataFile)dataFile.getHeadNode();
-                    cur = new Location();
-                    cur.setDataFileId(head.getDataFileId());
-                    cur.setOffset(0);
-                } else {
-                    // Set to the next offset..
-                    cur = new Location(lastLocation);
-                    cur.setOffset(cur.getOffset() + cur.getSize());
-                }
-            } else {
-                cur.setOffset(cur.getOffset() + cur.getSize());
-            }
-
-            
-            // Did it go into the next file??
-            if (dataFile.getLength() <= cur.getOffset()) {
-                if (thisFileOnly) {
-                    return null;
-                }else {
-                dataFile = getNextDataFile(dataFile);
-                if (dataFile == null) {
-                    return null;
-                } else {
-                    cur.setDataFileId(dataFile.getDataFileId().intValue());
-                    cur.setOffset(0);
-                }
-                }
-            }
-
-            // Load in location size and type.
-            DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-            try {
-                reader.readLocationDetails(cur);
-            } finally {
-                accessorPool.closeDataFileAccessor(reader);
-            }
-
-            if (cur.getType() == 0) {
-                return null;
-            } else if (cur.getType() > 0) {
-                // Only return user records.
-                return cur;
-            }
-        }
-    }
-
-    public synchronized ByteSequence read(Location location) throws IOException, IllegalStateException {
-        DataFile dataFile = getDataFile(location);
-        DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-        ByteSequence rc = null;
-        try {
-            rc = reader.readRecord(location);
-        } finally {
-            accessorPool.closeDataFileAccessor(reader);
-        }
-        return rc;
-    }
-
-    public void setMark(Location location, boolean sync) throws IOException, IllegalStateException {
-        synchronized (this) {
-            mark = location;
-        }
-        storeState(sync);
-    }
-
-    protected synchronized void storeState(boolean sync) throws IOException {
-        ByteSequence state = marshallState();
-        appender.storeItem(state, Location.MARK_TYPE, sync);
-        controlFile.store(state, sync);
-    }
-
-    public synchronized Location write(ByteSequence data, boolean sync) throws IOException, IllegalStateException {
-        Location loc = appender.storeItem(data, Location.USER_TYPE, sync);
-        return loc;
-    }
-    
-    public synchronized Location write(ByteSequence data, Runnable onComplete) throws IOException, IllegalStateException {
-        Location loc = appender.storeItem(data, Location.USER_TYPE, onComplete);
-        return loc;
-    }
-
-    public synchronized Location write(ByteSequence data, byte type, boolean sync) throws IOException, IllegalStateException {
-        return appender.storeItem(data, type, sync);
-    }
-
-    public void update(Location location, ByteSequence data, boolean sync) throws IOException {
-        DataFile dataFile = getDataFile(location);
-        DataFileAccessor updater = accessorPool.openDataFileAccessor(dataFile);
-        try {
-            updater.updateRecord(location, data, sync);
-        } finally {
-            accessorPool.closeDataFileAccessor(updater);
-        }
-    }
-
-    public File getDirectory() {
-        return directory;
-    }
-
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-
-    public String getFilePrefix() {
-        return filePrefix;
-    }
-
-    public void setFilePrefix(String filePrefix) {
-        this.filePrefix = IOHelper.toFileSystemSafeName(filePrefix);
-    }
-
-    public Map<WriteKey, WriteCommand> getInflightWrites() {
-        return inflightWrites;
-    }
-
-    public Location getLastAppendLocation() {
-        return lastAppendLocation.get();
-    }
-
-    public void setLastAppendLocation(Location lastSyncedLocation) {
-        this.lastAppendLocation.set(lastSyncedLocation);
-    }
-
-	public boolean isUseNio() {
-		return useNio;
-	}
-
-	public void setUseNio(boolean useNio) {
-		this.useNio = useNio;
-	}
-	
-	public File getDirectoryArchive() {
-        return directoryArchive;
-    }
-
-    public void setDirectoryArchive(File directoryArchive) {
-        this.directoryArchive = directoryArchive;
-    }
-    
-    public boolean isArchiveDataLogs() {
-        return archiveDataLogs;
-    }
-
-    public void setArchiveDataLogs(boolean archiveDataLogs) {
-        this.archiveDataLogs = archiveDataLogs;
-    }
-
-    synchronized public Integer getCurrentDataFileId() {
-        if( currentWriteFile==null )
-            return null;
-        return currentWriteFile.getDataFileId();
-    }
-    
-    /**
-     * Get a set of files - only valid after start()
-     * @return files currently being used
-     */
-    public Set<File> getFiles(){
-        return fileByFileMap.keySet();
-    }
-
-	synchronized public long getDiskSize() {
-		long rc=0;
-        DataFile cur = (DataFile)currentWriteFile.getHeadNode();
-        while( cur !=null ) {
-        	rc += cur.getLength();
-        	cur = (DataFile) cur.getNext();
-        }
-		return rc;
-	}
-
-	synchronized public long getDiskSizeUntil(Location startPosition) {
-		long rc=0;
-        DataFile cur = (DataFile)currentWriteFile.getHeadNode();
-        while( cur !=null ) {
-        	if( cur.getDataFileId().intValue() >= startPosition.getDataFileId() ) {
-        		return rc + startPosition.getOffset();
-        	}
-        	rc += cur.getLength();
-        	cur = (DataFile) cur.getNext();
-        }
-		return rc;
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ControlFile.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ControlFile.java
deleted file mode 100644
index f86b0cc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ControlFile.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileLock;
-import java.nio.channels.OverlappingFileLockException;
-
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.IOExceptionSupport;
-
-/**
- * Use to reliably store fixed sized state data. It stores the state in record
- * that is versioned and repeated twice in the file so that a failure in the
- * middle of the write of the first or second record do not not result in an
- * unknown state.
- * 
- * 
- */
-public final class ControlFile {
-
-    private static final boolean DISABLE_FILE_LOCK = "true".equals(System.getProperty("java.nio.channels.FileLock.broken", "false"));
-    private final File file;
-
-    /** The File that holds the control data. */
-    private final RandomAccessFile randomAccessFile;
-    private final int maxRecordSize;
-    private final int firstRecordStart;
-    private final int secondRecordStart;
-    private final int firstRecordEnd;
-    private final int secondRecordEnd;
-
-    private long version;
-    private FileLock lock;
-    private boolean disposed;
-
-    public ControlFile(File file, int recordSize) throws IOException {
-        this.file = file;
-        this.maxRecordSize = recordSize + 4;
-        
-        // Calculate where the records start and end.
-        this.firstRecordStart = 8;
-        this.secondRecordStart = 8 + maxRecordSize + 8 + 8;
-        this.firstRecordEnd = firstRecordStart+maxRecordSize;
-        this.secondRecordEnd = secondRecordStart+maxRecordSize;
-
-        randomAccessFile = new RandomAccessFile(file, "rw");
-    }
-
-    /**
-     * Locks the control file.
-     * 
-     * @throws IOException
-     */
-    public void lock() throws IOException {
-        if (DISABLE_FILE_LOCK) {
-            return;
-        }
-
-        if (lock == null) {
-            try {
-                lock = randomAccessFile.getChannel().tryLock(0, randomAccessFile.getChannel().size(), false);
-            } catch (OverlappingFileLockException e) {
-                throw IOExceptionSupport.create("Control file '" + file + "' could not be locked.",e);
-            }
-            if (lock == null) {
-                throw new IOException("Control file '" + file + "' could not be locked.");
-            }
-        }
-    }
-
-    /**
-     * Un locks the control file.
-     * 
-     * @throws IOException
-     */
-    public void unlock() throws IOException {
-        if (DISABLE_FILE_LOCK) {
-            return;
-        }
-
-        if (lock != null) {
-            lock.release();
-            lock = null;
-        }
-    }
-
-    public void dispose() {
-        if (disposed) {
-            return;
-        }
-        disposed = true;
-        try {
-            unlock();
-        } catch (IOException ignore) {
-        }
-        try {
-            randomAccessFile.close();
-        } catch (IOException ignore) {
-        }
-    }
-
-    public synchronized ByteSequence load() throws IOException {
-        long l = randomAccessFile.length();
-        if (l < maxRecordSize) {
-            return null;
-        }
-
-        randomAccessFile.seek(firstRecordStart-8);
-        long v1 = randomAccessFile.readLong();
-        randomAccessFile.seek(firstRecordEnd);
-        long v1check = randomAccessFile.readLong();
-
-        randomAccessFile.seek(secondRecordStart - 8);
-        long v2 = randomAccessFile.readLong();
-        randomAccessFile.seek(secondRecordEnd);
-        long v2check = randomAccessFile.readLong();
-
-        byte[] data = null;
-        if (v2 == v2check) {
-            version = v2;
-            randomAccessFile.seek(secondRecordStart);
-            int size = randomAccessFile.readInt();
-            data = new byte[size];
-            randomAccessFile.readFully(data);
-        } else if (v1 == v1check) {
-            version = v1;
-            randomAccessFile.seek(firstRecordStart);
-            int size = randomAccessFile.readInt();
-            data = new byte[size];
-            randomAccessFile.readFully(data);
-        } else {
-            // Bummer.. Both checks are screwed. we don't know
-            // if any of the two buffer are ok. This should
-            // only happen is data got corrupted.
-            throw new IOException("Control data corrupted.");
-        }
-        return new ByteSequence(data, 0, data.length);
-    }
-
-    public void store(ByteSequence data, boolean sync) throws IOException {
-
-        version++;
-        randomAccessFile.setLength((maxRecordSize * 2) + 32);
-        randomAccessFile.seek(0);
-
-        // Write the first copy of the control data.
-        randomAccessFile.writeLong(version);
-        randomAccessFile.writeInt(data.getLength());
-        randomAccessFile.write(data.getData());
-        randomAccessFile.seek(firstRecordEnd);
-        randomAccessFile.writeLong(version);
-
-        // Write the second copy of the control data.
-        randomAccessFile.writeLong(version);
-        randomAccessFile.writeInt(data.getLength());
-        randomAccessFile.write(data.getData());
-        randomAccessFile.seek(secondRecordEnd);
-        randomAccessFile.writeLong(version);
-
-        if (sync) {
-            randomAccessFile.getFD().sync();
-        }
-    }
-
-	public boolean isDisposed() {
-		return disposed;
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
deleted file mode 100644
index ab3f732..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.LinkedNode;
-
-/**
- * DataFile
- * 
- * 
- */
-public class DataFile extends LinkedNode implements Comparable<DataFile> {
-
-    protected final File file;
-    protected final Integer dataFileId;
-    protected final int preferedSize;
-
-    protected int length;
-    protected int referenceCount;
-
-    DataFile(File file, int number, int preferedSize) {
-        this.file = file;
-        this.preferedSize = preferedSize;
-        this.dataFileId = Integer.valueOf(number);
-        length = (int)(file.exists() ? file.length() : 0);
-    }
-    
-    File getFile() {
-        return file;
-    }
-
-    public Integer getDataFileId() {
-        return dataFileId;
-    }
-
-    public synchronized int getLength() {
-        return length;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-
-    public synchronized void incrementLength(int size) {
-        length += size;
-    }
-
-    public synchronized int increment() {
-        return ++referenceCount;
-    }
-
-    public synchronized int decrement() {
-        return --referenceCount;
-    }
-    
-    public synchronized int getReferenceCount(){
-    	return referenceCount;
-    }
-
-    public synchronized boolean isUnused() {
-        return referenceCount <= 0;
-    }
-
-    public synchronized String toString() {
-        String result = file.getName() + " number = " + dataFileId + " , length = " + length + " refCount = " + referenceCount;
-        return result;
-    }
-
-    public synchronized RandomAccessFile openRandomAccessFile(boolean appender) throws IOException {
-        RandomAccessFile rc = new RandomAccessFile(file, "rw");
-        // When we start to write files size them up so that the OS has a chance
-        // to allocate the file contiguously.
-        if (appender) {
-            if (length < preferedSize) {
-                try {
-                    // this can throw if we run out of disk space
-                    rc.setLength(preferedSize);
-                } catch (IOException ioe) {            
-                    try {
-                        rc.close();
-                    } catch(Exception ignored) {
-                    }
-                    throw ioe;
-                }
-            }
-        }
-        return rc;
-    }
-
-    public synchronized void closeRandomAccessFile(RandomAccessFile file) throws IOException {
-        // On close set the file size to the real size.
-        if (length != file.length()) {
-            file.setLength(getLength());
-        }
-        file.close();
-    }
-
-    public synchronized boolean delete() throws IOException {
-        return file.delete();
-    }
-    
-    public synchronized void move(File targetDirectory) throws IOException{
-        IOHelper.moveFile(file,targetDirectory);
-    }
-
-    public int compareTo(DataFile df) {
-        return dataFileId - df.dataFileId;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        boolean result = false;
-        if (o instanceof DataFile) {
-            result = compareTo((DataFile)o) == 0;
-        }
-        return result;
-    }
-
-    @Override
-    public int hashCode() {
-        return dataFileId;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessor.java
deleted file mode 100644
index 1f400f5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessor.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.Map;
-
-import org.apache.activemq.kaha.impl.async.DataFileAppender.WriteCommand;
-import org.apache.activemq.kaha.impl.async.DataFileAppender.WriteKey;
-import org.apache.activemq.util.ByteSequence;
-
-/**
- * Optimized Store reader and updater. Single threaded and synchronous. Use in
- * conjunction with the DataFileAccessorPool of concurrent use.
- * 
- * 
- */
-final class DataFileAccessor {
-
-    private final DataFile dataFile;
-    private final Map<WriteKey, WriteCommand> inflightWrites;
-    private final RandomAccessFile file;
-    private boolean disposed;
-
-    /**
-     * Construct a Store reader
-     * 
-     * @param fileId
-     * @throws IOException
-     */
-    public DataFileAccessor(AsyncDataManager dataManager, DataFile dataFile) throws IOException {
-        this.dataFile = dataFile;
-        this.inflightWrites = dataManager.getInflightWrites();
-        this.file = dataFile.openRandomAccessFile(false);
-    }
-
-    public DataFile getDataFile() {
-        return dataFile;
-    }
-
-    public void dispose() {
-        if (disposed) {
-            return;
-        }
-        disposed = true;
-        try {
-            dataFile.closeRandomAccessFile(file);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public ByteSequence readRecord(Location location) throws IOException {
-
-        if (!location.isValid()) {
-            throw new IOException("Invalid location: " + location);
-        }
-
-        WriteCommand asyncWrite = (WriteCommand)inflightWrites.get(new WriteKey(location));
-        if (asyncWrite != null) {
-            return asyncWrite.data;
-        }
-
-        try {
-
-            if (location.getSize() == Location.NOT_SET) {
-                file.seek(location.getOffset());
-                location.setSize(file.readInt());
-                file.seek(location.getOffset() + AsyncDataManager.ITEM_HEAD_SPACE);
-            } else {
-                file.seek(location.getOffset() + AsyncDataManager.ITEM_HEAD_SPACE);
-            }
-
-            byte[] data = new byte[location.getSize() - AsyncDataManager.ITEM_HEAD_FOOT_SPACE];
-            file.readFully(data);
-            return new ByteSequence(data, 0, data.length);
-
-        } catch (RuntimeException e) {
-            throw new IOException("Invalid location: " + location + ", : " + e);
-        }
-    }
-
-    public void readLocationDetails(Location location) throws IOException {
-        WriteCommand asyncWrite = (WriteCommand)inflightWrites.get(new WriteKey(location));
-        if (asyncWrite != null) {
-            location.setSize(asyncWrite.location.getSize());
-            location.setType(asyncWrite.location.getType());
-        } else {
-            file.seek(location.getOffset());
-            location.setSize(file.readInt());
-            location.setType(file.readByte());
-        }
-    }
-
-    public boolean readLocationDetailsAndValidate(Location location) {
-        try {
-            WriteCommand asyncWrite = (WriteCommand)inflightWrites.get(new WriteKey(location));
-            if (asyncWrite != null) {
-                location.setSize(asyncWrite.location.getSize());
-                location.setType(asyncWrite.location.getType());
-            } else {
-                file.seek(location.getOffset());
-                location.setSize(file.readInt());
-                location.setType(file.readByte());
-
-                byte data[] = new byte[3];
-                file.seek(location.getOffset() + AsyncDataManager.ITEM_HEAD_OFFSET_TO_SOR);
-                file.readFully(data);
-                if (data[0] != AsyncDataManager.ITEM_HEAD_SOR[0]
-                    || data[1] != AsyncDataManager.ITEM_HEAD_SOR[1]
-                    || data[2] != AsyncDataManager.ITEM_HEAD_SOR[2]) {
-                    return false;
-                }
-                file.seek(location.getOffset() + location.getSize() - AsyncDataManager.ITEM_FOOT_SPACE);
-                file.readFully(data);
-                if (data[0] != AsyncDataManager.ITEM_HEAD_EOR[0]
-                    || data[1] != AsyncDataManager.ITEM_HEAD_EOR[1]
-                    || data[2] != AsyncDataManager.ITEM_HEAD_EOR[2]) {
-                    return false;
-                }
-            }
-        } catch (IOException e) {
-            return false;
-        }
-        return true;
-    }
-
-    public void updateRecord(Location location, ByteSequence data, boolean sync) throws IOException {
-
-        file.seek(location.getOffset() + AsyncDataManager.ITEM_HEAD_SPACE);
-        int size = Math.min(data.getLength(), location.getSize());
-        file.write(data.getData(), data.getOffset(), size);
-        if (sync) {
-            file.getFD().sync();
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessorPool.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessorPool.java
deleted file mode 100644
index b93bc27..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAccessorPool.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Used to pool DataFileAccessors.
- * 
- * @author chirino
- */
-public class DataFileAccessorPool {
-
-    private final AsyncDataManager dataManager;
-    private final Map<Integer, Pool> pools = new HashMap<Integer, Pool>();
-    private boolean closed;
-    private int maxOpenReadersPerFile = 5;
-
-    class Pool {
-
-        private final DataFile file;
-        private final List<DataFileAccessor> pool = new ArrayList<DataFileAccessor>();
-        private boolean used;
-        private int openCounter;
-        private boolean disposed;
-
-        public Pool(DataFile file) {
-            this.file = file;
-        }
-
-        public DataFileAccessor openDataFileReader() throws IOException {
-            DataFileAccessor rc = null;
-            if (pool.isEmpty()) {
-                rc = new DataFileAccessor(dataManager, file);
-            } else {
-                rc = (DataFileAccessor)pool.remove(pool.size() - 1);
-            }
-            used = true;
-            openCounter++;
-            return rc;
-        }
-
-        public synchronized void closeDataFileReader(DataFileAccessor reader) {
-            openCounter--;
-            if (pool.size() >= maxOpenReadersPerFile || disposed) {
-                reader.dispose();
-            } else {
-                pool.add(reader);
-            }
-        }
-
-        public synchronized void clearUsedMark() {
-            used = false;
-        }
-
-        public synchronized boolean isUsed() {
-            return used;
-        }
-
-        public synchronized void dispose() {
-            for (DataFileAccessor reader : pool) {
-                reader.dispose();
-            }
-            pool.clear();
-            disposed = true;
-        }
-
-        public synchronized int getOpenCounter() {
-            return openCounter;
-        }
-
-    }
-
-    public DataFileAccessorPool(AsyncDataManager dataManager) {
-        this.dataManager = dataManager;
-    }
-
-    synchronized void clearUsedMark() {
-        for (Iterator iter = pools.values().iterator(); iter.hasNext();) {
-            Pool pool = (Pool)iter.next();
-            pool.clearUsedMark();
-        }
-    }
-
-    synchronized void disposeUnused() {
-        for (Iterator<Pool> iter = pools.values().iterator(); iter.hasNext();) {
-            Pool pool = iter.next();
-            if (!pool.isUsed()) {
-                pool.dispose();
-                iter.remove();
-            }
-        }
-    }
-
-    synchronized void disposeDataFileAccessors(DataFile dataFile) {
-        if (closed) {
-            throw new IllegalStateException("Closed.");
-        }
-        Pool pool = pools.get(dataFile.getDataFileId());
-        if (pool != null) {
-            if (pool.getOpenCounter() == 0) {
-                pool.dispose();
-                pools.remove(dataFile.getDataFileId());
-            } else {
-                throw new IllegalStateException("The data file is still in use: " + dataFile + ", use count: " + pool.getOpenCounter());
-            }
-        }
-    }
-
-    synchronized DataFileAccessor openDataFileAccessor(DataFile dataFile) throws IOException {
-        if (closed) {
-            throw new IOException("Closed.");
-        }
-
-        Pool pool = pools.get(dataFile.getDataFileId());
-        if (pool == null) {
-            pool = new Pool(dataFile);
-            pools.put(dataFile.getDataFileId(), pool);
-        }
-        return pool.openDataFileReader();
-    }
-
-    synchronized void closeDataFileAccessor(DataFileAccessor reader) {
-        Pool pool = pools.get(reader.getDataFile().getDataFileId());
-        if (pool == null || closed) {
-            reader.dispose();
-        } else {
-            pool.closeDataFileReader(reader);
-        }
-    }
-
-    public synchronized void close() {
-        if (closed) {
-            return;
-        }
-        closed = true;
-        for (Iterator<Pool> iter = pools.values().iterator(); iter.hasNext();) {
-            Pool pool = iter.next();
-            pool.dispose();
-        }
-        pools.clear();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java
deleted file mode 100644
index 5c049c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java
+++ /dev/null
@@ -1,440 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.RandomAccessFile;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-import org.apache.activemq.util.LinkedNode;
-
-/**
- * An optimized writer to do batch appends to a data file. This object is thread
- * safe and gains throughput as you increase the number of concurrent writes it
- * does.
- * 
- * 
- */
-class DataFileAppender {
-
-    protected static final byte[] RESERVED_SPACE = new byte[AsyncDataManager.ITEM_HEAD_RESERVED_SPACE];
-    protected static final int DEFAULT_MAX_BATCH_SIZE = 1024 * 1024 * 4;
-
-    protected final AsyncDataManager dataManager;
-    protected final Map<WriteKey, WriteCommand> inflightWrites;
-    protected final Object enqueueMutex = new Object(){};
-    protected WriteBatch nextWriteBatch;
-
-    protected boolean shutdown;
-    protected IOException firstAsyncException;
-    protected final CountDownLatch shutdownDone = new CountDownLatch(1);
-    protected int maxWriteBatchSize = DEFAULT_MAX_BATCH_SIZE;
-
-    protected boolean running;
-    private Thread thread;
-
-    public static class WriteKey {
-        private final int file;
-        private final long offset;
-        private final int hash;
-
-        public WriteKey(Location item) {
-            file = item.getDataFileId();
-            offset = item.getOffset();
-            // TODO: see if we can build a better hash
-            hash = (int)(file ^ offset);
-        }
-
-        public int hashCode() {
-            return hash;
-        }
-
-        public boolean equals(Object obj) {
-            if (obj instanceof WriteKey) {
-                WriteKey di = (WriteKey)obj;
-                return di.file == file && di.offset == offset;
-            }
-            return false;
-        }
-    }
-
-    public class WriteBatch {
-
-        public final DataFile dataFile;
-        public final WriteCommand first;
-        public final CountDownLatch latch = new CountDownLatch(1);
-        public int size;
-        public AtomicReference<IOException> exception = new AtomicReference<IOException>();
-
-        public WriteBatch(DataFile dataFile, WriteCommand write) throws IOException {
-            this.dataFile = dataFile;
-            this.first = write;
-            size += write.location.getSize();
-        }
-
-        public boolean canAppend(DataFile dataFile, WriteCommand write) {
-            if (dataFile != this.dataFile) {
-                return false;
-            }
-            if (size + write.location.getSize() >= maxWriteBatchSize) {
-                return false;
-            }
-            return true;
-        }
-
-        public void append(WriteCommand write) throws IOException {
-            this.first.getTailNode().linkAfter(write);
-            size += write.location.getSize();
-        }
-    }
-
-    public static class WriteCommand extends LinkedNode {
-        public final Location location;
-        public final ByteSequence data;
-        final boolean sync;
-        public final Runnable onComplete;
-
-        public WriteCommand(Location location, ByteSequence data, boolean sync) {
-            this.location = location;
-            this.data = data;
-            this.sync = sync;
-            this.onComplete=null;
-        }
-
-        public WriteCommand(Location location, ByteSequence data, Runnable onComplete) {
-            this.location = location;
-            this.data = data;
-			this.onComplete = onComplete;
-            this.sync = false;
-		}
-    }
-
-
-    /**
-     * Construct a Store writer
-     * 
-     * @param fileId
-     */
-    public DataFileAppender(AsyncDataManager dataManager) {
-        this.dataManager = dataManager;
-        this.inflightWrites = this.dataManager.getInflightWrites();
-    }
-
-    /**
-     * @param type
-     * @param marshaller
-     * @param payload
-     * @param type
-     * @param sync
-     * @return
-     * @throws IOException
-     * @throws
-     * @throws
-     */
-    public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException {
-
-        // Write the packet our internal buffer.
-        int size = data.getLength() + AsyncDataManager.ITEM_HEAD_FOOT_SPACE;
-
-        final Location location = new Location();
-        location.setSize(size);
-        location.setType(type);
-
-        WriteBatch batch;
-        WriteCommand write = new WriteCommand(location, data, sync);
-
-        // Locate datafile and enqueue into the executor in sychronized block so
-        // that writes get equeued onto the executor in order that they were assigned
-        // by the data manager (which is basically just appending)
-
-        synchronized (this) {
-            // Find the position where this item will land at.
-            DataFile dataFile = dataManager.allocateLocation(location);
-            if( !sync ) {
-                inflightWrites.put(new WriteKey(location), write);
-            }
-            batch = enqueue(dataFile, write);
-        }
-        location.setLatch(batch.latch);
-        if (sync) {
-            try {
-                batch.latch.await();
-            } catch (InterruptedException e) {
-                throw new InterruptedIOException();
-            }
-            IOException exception = batch.exception.get(); 
-            if (exception != null) {
-                throw exception;
-            }
-        }
-
-        return location;
-    }
-    
-	public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException {
-        // Write the packet our internal buffer.
-        int size = data.getLength() + AsyncDataManager.ITEM_HEAD_FOOT_SPACE;
-
-        final Location location = new Location();
-        location.setSize(size);
-        location.setType(type);
-
-        WriteBatch batch;
-        WriteCommand write = new WriteCommand(location, data, onComplete);
-
-        // Locate datafile and enqueue into the executor in sychronized block so
-        // that writes get equeued onto the executor in order that they were assigned
-        // by the data manager (which is basically just appending)
-
-        synchronized (this) {
-            // Find the position where this item will land at.
-            DataFile dataFile = dataManager.allocateLocation(location);
-            inflightWrites.put(new WriteKey(location), write);
-            batch = enqueue(dataFile, write);
-        }
-        location.setLatch(batch.latch);
-
-        return location;
-	}
-
-    private WriteBatch enqueue(DataFile dataFile, WriteCommand write) throws IOException {
-        synchronized (enqueueMutex) {
-            WriteBatch rc = null;
-            if (shutdown) {
-                throw new IOException("Async Writter Thread Shutdown");
-            }
-            
-            if (!running) {
-                running = true;
-                thread = new Thread() {
-                    public void run() {
-                        processQueue();
-                    }
-                };
-                thread.setPriority(Thread.MAX_PRIORITY);
-                thread.setDaemon(true);
-                thread.setName("ActiveMQ Data File Writer");
-                thread.start();
-                firstAsyncException = null;
-            }
-            
-            if (firstAsyncException != null) {
-                throw firstAsyncException;
-            }
-
-            if (nextWriteBatch == null) {
-                nextWriteBatch = new WriteBatch(dataFile, write);
-                rc = nextWriteBatch;
-                enqueueMutex.notify();
-            } else {
-                // Append to current batch if possible..
-                if (nextWriteBatch.canAppend(dataFile, write)) {
-                    nextWriteBatch.append(write);
-                    rc = nextWriteBatch;
-                } else {
-                    // Otherwise wait for the queuedCommand to be null
-                    try {
-                        while (nextWriteBatch != null) {
-                            enqueueMutex.wait();
-                        }
-                    } catch (InterruptedException e) {
-                        throw new InterruptedIOException();
-                    }
-                    if (shutdown) {
-                        throw new IOException("Async Writter Thread Shutdown");
-                    }
-
-                    // Start a new batch.
-                    nextWriteBatch = new WriteBatch(dataFile, write);
-                    rc = nextWriteBatch;
-                    enqueueMutex.notify();
-                }
-            }
-            return rc;
-        }
-    }
-
-    public void close() throws IOException {
-        synchronized (enqueueMutex) {
-            if (!shutdown) {
-                shutdown = true;
-                if (running) {
-                    enqueueMutex.notifyAll();
-                } else {
-                    shutdownDone.countDown();
-                }
-            }
-        }
-
-        try {
-            shutdownDone.await();
-        } catch (InterruptedException e) {
-            throw new InterruptedIOException();
-        }
-
-    }
-
-    /**
-     * The async processing loop that writes to the data files and does the
-     * force calls.
-     * 
-     * Since the file sync() call is the slowest of all the operations, this
-     * algorithm tries to 'batch' or group together several file sync() requests
-     * into a single file sync() call. The batching is accomplished attaching
-     * the same CountDownLatch instance to every force request in a group.
-     * 
-     */
-    protected void processQueue() {
-        DataFile dataFile = null;
-        RandomAccessFile file = null;
-        WriteBatch wb = null;
-        try {
-
-            DataByteArrayOutputStream buff = new DataByteArrayOutputStream(maxWriteBatchSize);
-            while (true) {
-
-                Object o = null;
-
-                // Block till we get a command.
-                synchronized (enqueueMutex) {
-                    while (true) {
-                        if (nextWriteBatch != null) {
-                            o = nextWriteBatch;
-                            nextWriteBatch = null;
-                            break;
-                        }
-                        if (shutdown) {
-                            return;
-                        }
-                        enqueueMutex.wait();
-                    }
-                    enqueueMutex.notify();
-                }
-
-                wb = (WriteBatch)o;
-                if (dataFile != wb.dataFile) {
-                    if (file != null) {
-                        dataFile.closeRandomAccessFile(file);
-                    }
-                    dataFile = wb.dataFile;
-                    file = dataFile.openRandomAccessFile(true);
-                }
-
-                WriteCommand write = wb.first;
-
-                // Write all the data.
-                // Only need to seek to first location.. all others
-                // are in sequence.
-                file.seek(write.location.getOffset());
-
-                
-                boolean forceToDisk=false;
-                
-                // 
-                // is it just 1 big write?
-                if (wb.size == write.location.getSize()) {
-                    forceToDisk = write.sync | write.onComplete!=null;
-                    
-                    // Just write it directly..
-                    file.writeInt(write.location.getSize());
-                    file.writeByte(write.location.getType());
-                    file.write(RESERVED_SPACE);
-                    file.write(AsyncDataManager.ITEM_HEAD_SOR);
-                    file.write(write.data.getData(), write.data.getOffset(), write.data.getLength());
-                    file.write(AsyncDataManager.ITEM_HEAD_EOR);
-
-                } else {
-
-                    // Combine the smaller writes into 1 big buffer
-                    while (write != null) {
-                        forceToDisk |= write.sync | write.onComplete!=null;
-
-                        buff.writeInt(write.location.getSize());
-                        buff.writeByte(write.location.getType());
-                        buff.write(RESERVED_SPACE);
-                        buff.write(AsyncDataManager.ITEM_HEAD_SOR);
-                        buff.write(write.data.getData(), write.data.getOffset(), write.data.getLength());
-                        buff.write(AsyncDataManager.ITEM_HEAD_EOR);
-
-                        write = (WriteCommand)write.getNext();
-                    }
-
-                    // Now do the 1 big write.
-                    ByteSequence sequence = buff.toByteSequence();
-                    file.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
-                    buff.reset();
-                }
-
-                if( forceToDisk ) {
-                    file.getFD().sync();
-                }
-                
-                WriteCommand lastWrite = (WriteCommand)wb.first.getTailNode();
-                dataManager.setLastAppendLocation(lastWrite.location);
-
-                // Now that the data is on disk, remove the writes from the in
-                // flight
-                // cache.
-                write = wb.first;
-                while (write != null) {
-                    if (!write.sync) {
-                        inflightWrites.remove(new WriteKey(write.location));
-                    }
-                    if( write.onComplete !=null ) {
-                    	 try {
-							write.onComplete.run();
-						} catch (Throwable e) {
-							e.printStackTrace();
-						}
-                    }
-                    write = (WriteCommand)write.getNext();
-                }
-                
-                // Signal any waiting threads that the write is on disk.
-                wb.latch.countDown();
-            }
-        } catch (IOException e) {
-            synchronized (enqueueMutex) {
-                firstAsyncException = e;
-                if (wb != null) {
-                    wb.latch.countDown();
-                    wb.exception.set(e);
-                }
-                if (nextWriteBatch != null) {
-                    nextWriteBatch.latch.countDown();
-                    nextWriteBatch.exception.set(e);
-                }
-            }
-        } catch (InterruptedException e) {
-        } finally {
-            try {
-                if (file != null) {
-                    dataFile.closeRandomAccessFile(file);
-                }
-            } catch (Throwable ignore) {
-            }
-            shutdownDone.countDown();
-        }
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataManagerFacade.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataManagerFacade.java
deleted file mode 100644
index 6dc52d8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataManagerFacade.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.IOException;
-
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.data.RedoListener;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-
-/**
- * Provides a Kaha DataManager Facade to the DataManager.
- * 
- * 
- */
-public final class DataManagerFacade implements org.apache.activemq.kaha.impl.DataManager {
-
-    private static final ByteSequence FORCE_COMMAND = new ByteSequence(new byte[] {'F', 'O', 'R', 'C', 'E'});
-
-    private AsyncDataManager dataManager;
-    private final String name;
-    private Marshaller redoMarshaller;
-
-    private static class StoreLocationFacade implements StoreLocation {
-        private final Location location;
-
-        public StoreLocationFacade(Location location) {
-            this.location = location;
-        }
-
-        public int getFile() {
-            return location.getDataFileId();
-        }
-
-        public long getOffset() {
-            return location.getOffset();
-        }
-
-        public int getSize() {
-            return location.getSize();
-        }
-
-        public Location getLocation() {
-            return location;
-        }
-    }
-
-    public DataManagerFacade(AsyncDataManager dataManager, String name) {
-        this.dataManager = dataManager;
-        this.name = name;
-    }
-
-    private static StoreLocation convertToStoreLocation(Location location) {
-        if (location == null) {
-            return null;
-        }
-        return new StoreLocationFacade(location);
-    }
-
-    private static Location convertFromStoreLocation(StoreLocation location) {
-
-        if (location == null) {
-            return null;
-        }
-
-        if (location.getClass() == StoreLocationFacade.class) {
-            return ((StoreLocationFacade)location).getLocation();
-        }
-
-        Location l = new Location();
-        l.setOffset((int)location.getOffset());
-        l.setSize(location.getSize());
-        l.setDataFileId(location.getFile());
-        return l;
-    }
-
-
-    public Object readItem(Marshaller marshaller, StoreLocation location) throws IOException {
-        ByteSequence sequence = dataManager.read(convertFromStoreLocation(location));
-        DataByteArrayInputStream dataIn = new DataByteArrayInputStream(sequence);
-        return marshaller.readPayload(dataIn);
-    }
-
-    public StoreLocation storeDataItem(Marshaller marshaller, Object payload) throws IOException {
-        final DataByteArrayOutputStream buffer = new DataByteArrayOutputStream();
-        marshaller.writePayload(payload, buffer);
-        ByteSequence data = buffer.toByteSequence();
-        return convertToStoreLocation(dataManager.write(data, (byte)1, false));
-    }
-
-    public void force() throws IOException {
-        dataManager.write(FORCE_COMMAND, (byte)2, true);
-    }
-
-    public void updateItem(StoreLocation location, Marshaller marshaller, Object payload) throws IOException {
-        final DataByteArrayOutputStream buffer = new DataByteArrayOutputStream();
-        marshaller.writePayload(payload, buffer);
-        ByteSequence data = buffer.toByteSequence();
-        dataManager.update(convertFromStoreLocation(location), data, false);
-    }
-
-    public void close() throws IOException {
-        dataManager.close();
-    }
-
-    public void consolidateDataFiles() throws IOException {
-        dataManager.consolidateDataFiles();
-    }
-
-    public boolean delete() throws IOException {
-        return dataManager.delete();
-    }
-
-    public void addInterestInFile(int file) throws IOException {
-        dataManager.addInterestInFile(file);
-    }
-
-    public void removeInterestInFile(int file) throws IOException {
-        dataManager.removeInterestInFile(file);
-    }
-
-    public void recoverRedoItems(RedoListener listener) throws IOException {
-        throw new RuntimeException("Not Implemented..");
-    }
-
-    public StoreLocation storeRedoItem(Object payload) throws IOException {
-        throw new RuntimeException("Not Implemented..");
-    }
-
-    public Marshaller getRedoMarshaller() {
-        return redoMarshaller;
-    }
-
-    public void setRedoMarshaller(Marshaller redoMarshaller) {
-        this.redoMarshaller = redoMarshaller;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/JournalFacade.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/JournalFacade.java
deleted file mode 100644
index c9cd7e3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/JournalFacade.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.IOException;
-
-import org.apache.activeio.journal.InvalidRecordLocationException;
-import org.apache.activeio.journal.Journal;
-import org.apache.activeio.journal.JournalEventListener;
-import org.apache.activeio.journal.RecordLocation;
-import org.apache.activeio.packet.ByteArrayPacket;
-import org.apache.activeio.packet.Packet;
-import org.apache.activemq.util.ByteSequence;
-
-/**
- * Provides a Journal Facade to the DataManager.
- * 
- * 
- */
-public final class JournalFacade implements Journal {
-
-    private final AsyncDataManager dataManager;
-
-    public static class RecordLocationFacade implements RecordLocation {
-        private final Location location;
-
-        public RecordLocationFacade(Location location) {
-            this.location = location;
-        }
-
-        public Location getLocation() {
-            return location;
-        }
-
-        public int compareTo(Object o) {
-            RecordLocationFacade rlf = (RecordLocationFacade)o;
-            int rc = location.compareTo(rlf.location);
-            return rc;
-        }
-    }
-
-    public JournalFacade(AsyncDataManager dataManager) {
-        this.dataManager = dataManager;
-    }
-
-    private static RecordLocation convertToRecordLocation(Location location) {
-        if (location == null) {
-            return null;
-        }
-        return new RecordLocationFacade(location);
-    }
-
-    private static Location convertFromRecordLocation(RecordLocation location) {
-
-        if (location == null) {
-            return null;
-        }
-
-        return ((RecordLocationFacade)location).getLocation();
-    }
-
-    public void close() throws IOException {
-        dataManager.close();
-    }
-
-    public RecordLocation getMark() throws IllegalStateException {
-        return convertToRecordLocation(dataManager.getMark());
-    }
-
-    public RecordLocation getNextRecordLocation(RecordLocation location) throws InvalidRecordLocationException, IOException, IllegalStateException {
-        return convertToRecordLocation(dataManager.getNextLocation(convertFromRecordLocation(location)));
-    }
-
-    public Packet read(RecordLocation location) throws InvalidRecordLocationException, IOException, IllegalStateException {
-        ByteSequence rc = dataManager.read(convertFromRecordLocation(location));
-        if (rc == null) {
-            return null;
-        }
-        return new ByteArrayPacket(rc.getData(), rc.getOffset(), rc.getLength());
-    }
-
-    public void setJournalEventListener(JournalEventListener listener) throws IllegalStateException {
-    }
-
-    public void setMark(RecordLocation location, boolean sync) throws InvalidRecordLocationException, IOException, IllegalStateException {
-        dataManager.setMark(convertFromRecordLocation(location), sync);
-    }
-
-    public RecordLocation write(Packet packet, boolean sync) throws IOException, IllegalStateException {
-        org.apache.activeio.packet.ByteSequence data = packet.asByteSequence();
-        ByteSequence sequence = new ByteSequence(data.getData(), data.getOffset(), data.getLength());
-        return convertToRecordLocation(dataManager.write(sequence, sync));
-    }
-    
-    public RecordLocation write(Packet packet, Runnable onComplete) throws IOException, IllegalStateException {
-        org.apache.activeio.packet.ByteSequence data = packet.asByteSequence();
-        ByteSequence sequence = new ByteSequence(data.getData(), data.getOffset(), data.getLength());
-        return convertToRecordLocation(dataManager.write(sequence, onComplete));
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/Location.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/Location.java
deleted file mode 100755
index 2c3669b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/Location.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * Used as a location in the data store.
- * 
- * 
- */
-public final class Location implements Comparable<Location> {
-
-    public static final byte MARK_TYPE = -1;
-    public static final byte USER_TYPE = 1;
-    public static final byte NOT_SET_TYPE = 0;
-    public static final int NOT_SET = -1;
-
-    private int dataFileId = NOT_SET;
-    private int offset = NOT_SET;
-    private int size = NOT_SET;
-    private byte type = NOT_SET_TYPE;
-    private CountDownLatch latch;
-
-    public Location() {
-    }
-
-    Location(Location item) {
-        this.dataFileId = item.dataFileId;
-        this.offset = item.offset;
-        this.size = item.size;
-        this.type = item.type;
-    }
-
-    boolean isValid() {
-        return dataFileId != NOT_SET;
-    }
-
-    /**
-     * @return the size of the data record including the header.
-     */
-    public int getSize() {
-        return size;
-    }
-
-    /**
-     * @param size the size of the data record including the header.
-     */
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-    /**
-     * @return the size of the payload of the record.
-     */
-    public int getPaylodSize() {
-        return size - AsyncDataManager.ITEM_HEAD_FOOT_SPACE;
-    }
-
-    public int getOffset() {
-        return offset;
-    }
-
-    public void setOffset(int offset) {
-        this.offset = offset;
-    }
-
-    public int getDataFileId() {
-        return dataFileId;
-    }
-
-    public void setDataFileId(int file) {
-        this.dataFileId = file;
-    }
-
-    public byte getType() {
-        return type;
-    }
-
-    public void setType(byte type) {
-        this.type = type;
-    }
-
-    public String toString() {
-        String result = "offset = " + offset + ", file = " + dataFileId + ", size = " + size + ", type = "
-                        + type;
-        return result;
-    }
-
-    public void writeExternal(DataOutput dos) throws IOException {
-        dos.writeInt(dataFileId);
-        dos.writeInt(offset);
-        dos.writeInt(size);
-        dos.writeByte(type);
-    }
-
-    public void readExternal(DataInput dis) throws IOException {
-        dataFileId = dis.readInt();
-        offset = dis.readInt();
-        size = dis.readInt();
-        type = dis.readByte();
-    }
-
-    public CountDownLatch getLatch() {
-        return latch;
-    }
-
-    public void setLatch(CountDownLatch latch) {
-        this.latch = latch;
-    }
-
-    public int compareTo(Location o) {
-        Location l = (Location)o;
-        if (dataFileId == l.dataFileId) {
-            int rc = offset - l.offset;
-            return rc;
-        }
-        return dataFileId - l.dataFileId;
-    }
-
-    public boolean equals(Object o) {
-        boolean result = false;
-        if (o instanceof Location) {
-            result = compareTo((Location)o) == 0;
-        }
-        return result;
-    }
-
-    public int hashCode() {
-        return dataFileId ^ offset;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/NIODataFileAppender.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/NIODataFileAppender.java
deleted file mode 100644
index 091c899..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/NIODataFileAppender.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-
-/**
- * An AsyncDataFileAppender that uses NIO ByteBuffers and File chanels to more
- * efficently copy data to files.
- * 
- * 
- */
-class NIODataFileAppender extends DataFileAppender {
-
-    public NIODataFileAppender(AsyncDataManager fileManager) {
-        super(fileManager);
-    }
-
-    /**
-     * The async processing loop that writes to the data files and does the
-     * force calls.
-     * 
-     * Since the file sync() call is the slowest of all the operations, this
-     * algorithm tries to 'batch' or group together several file sync() requests
-     * into a single file sync() call. The batching is accomplished attaching
-     * the same CountDownLatch instance to every force request in a group.
-     * 
-     */
-    protected void processQueue() {
-        DataFile dataFile = null;
-        RandomAccessFile file = null;
-        FileChannel channel = null;
-        WriteBatch wb = null;
-
-        try {
-
-            ByteBuffer header = ByteBuffer.allocateDirect(AsyncDataManager.ITEM_HEAD_SPACE);
-            ByteBuffer footer = ByteBuffer.allocateDirect(AsyncDataManager.ITEM_FOOT_SPACE);
-            ByteBuffer buffer = ByteBuffer.allocateDirect(maxWriteBatchSize);
-
-            // Populate the static parts of the headers and footers..
-            header.putInt(0); // size
-            header.put((byte)0); // type
-            header.put(RESERVED_SPACE); // reserved
-            header.put(AsyncDataManager.ITEM_HEAD_SOR);
-            footer.put(AsyncDataManager.ITEM_HEAD_EOR);
-
-            while (true) {
-
-                Object o = null;
-
-                // Block till we get a command.
-                synchronized (enqueueMutex) {
-                    while (true) {
-                        if (nextWriteBatch != null) {
-                            o = nextWriteBatch;
-                            nextWriteBatch = null;
-                            break;
-                        }
-                        if (shutdown) {
-                            return;
-                        }
-                        enqueueMutex.wait();
-                    }
-                    enqueueMutex.notify();
-                }
-
-                wb = (WriteBatch)o;
-                if (dataFile != wb.dataFile) {
-                    if (file != null) {
-                        dataFile.closeRandomAccessFile(file);
-                    }
-                    dataFile = wb.dataFile;
-                    file = dataFile.openRandomAccessFile(true);
-                    channel = file.getChannel();
-                }
-
-                WriteCommand write = wb.first;
-
-                // Write all the data.
-                // Only need to seek to first location.. all others
-                // are in sequence.
-                file.seek(write.location.getOffset());
-
-                
-                boolean forceToDisk=false;
-                
-                // 
-                // is it just 1 big write?
-                if (wb.size == write.location.getSize()) {
-                    forceToDisk = write.sync | write.onComplete!=null;
-                    
-                    header.clear();
-                    header.putInt(write.location.getSize());
-                    header.put(write.location.getType());
-                    header.clear();
-                    transfer(header, channel);
-                    ByteBuffer source = ByteBuffer.wrap(write.data.getData(), write.data.getOffset(),
-                                                        write.data.getLength());
-                    transfer(source, channel);
-                    footer.clear();
-                    transfer(footer, channel);
-
-                } else {
-
-                    // Combine the smaller writes into 1 big buffer
-                    while (write != null) {
-                        forceToDisk |= write.sync | write.onComplete!=null;
-                        
-                        header.clear();
-                        header.putInt(write.location.getSize());
-                        header.put(write.location.getType());
-                        header.clear();
-                        copy(header, buffer);
-                        assert !header.hasRemaining();
-
-                        ByteBuffer source = ByteBuffer.wrap(write.data.getData(), write.data.getOffset(),
-                                                            write.data.getLength());
-                        copy(source, buffer);
-                        assert !source.hasRemaining();
-
-                        footer.clear();
-                        copy(footer, buffer);
-                        assert !footer.hasRemaining();
-
-                        write = (WriteCommand)write.getNext();
-                    }
-
-                    // Fully write out the buffer..
-                    buffer.flip();
-                    transfer(buffer, channel);
-                    buffer.clear();
-                }
-
-                if( forceToDisk ) {
-                    file.getChannel().force(false);
-                }
-
-                WriteCommand lastWrite = (WriteCommand)wb.first.getTailNode();
-                dataManager.setLastAppendLocation(lastWrite.location);
-
-                // Now that the data is on disk, remove the writes from the in
-                // flight
-                // cache.
-                write = wb.first;
-                while (write != null) {
-                    if (!write.sync) {
-                        inflightWrites.remove(new WriteKey(write.location));
-                    }
-                    if (write.onComplete != null) {
-						try {
-							write.onComplete.run();
-						} catch (Throwable e) {
-							e.printStackTrace();
-						}
-					}
-                    write = (WriteCommand)write.getNext();
-                }
-                
-                // Signal any waiting threads that the write is on disk.
-                wb.latch.countDown();
-            }
-
-        } catch (IOException e) {
-            synchronized (enqueueMutex) {
-                firstAsyncException = e;
-                if (wb != null) {
-                    wb.latch.countDown();
-                    wb.exception.set(e);
-                }
-                if (nextWriteBatch != null) {
-                    nextWriteBatch.latch.countDown();
-                    nextWriteBatch.exception.set(e);
-                }
-            }
-        } catch (InterruptedException e) {
-        } finally {
-            try {
-                if (file != null) {
-                    dataFile.closeRandomAccessFile(file);
-                    dataFile = null;
-                    file.close();
-                    file = null;
-                }
-                if (channel != null) {
-                    channel.close();
-                    channel = null;
-                }
-            } catch (IOException e) {
-            }
-            shutdownDone.countDown();
-            running = false;
-        }
-    }
-
-    /**
-     * Copy the bytes in header to the channel.
-     * 
-     * @param header - source of data
-     * @param channel - destination where the data will be written.
-     * @throws IOException
-     */
-    private void transfer(ByteBuffer header, FileChannel channel) throws IOException {
-        while (header.hasRemaining()) {
-            channel.write(header);
-        }
-    }
-
-    private int copy(ByteBuffer src, ByteBuffer dest) {
-        int rc = Math.min(dest.remaining(), src.remaining());
-        if (rc > 0) {
-            // Adjust our limit so that we don't overflow the dest buffer.
-            int limit = src.limit();
-            src.limit(src.position() + rc);
-            dest.put(src);
-            // restore the limit.
-            src.limit(limit);
-        }
-        return rc;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyAsyncDataManager.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyAsyncDataManager.java
deleted file mode 100644
index cbc1674..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyAsyncDataManager.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.util.ByteSequence;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An AsyncDataManager that works in read only mode against multiple data directories.
- * Useful for reading back archived data files.
- */
-public class ReadOnlyAsyncDataManager extends AsyncDataManager {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(ReadOnlyAsyncDataManager.class);
-    private final ArrayList<File> dirs;
-
-    public ReadOnlyAsyncDataManager(final ArrayList<File> dirs) {
-        this.dirs = dirs;
-    }
-
-    @SuppressWarnings("unchecked")
-    public synchronized void start() throws IOException {
-        if (started) {
-            return;
-        }
-
-        started = true;
-
-        accessorPool = new DataFileAccessorPool(this);
-                
-        ArrayList<File> files = new ArrayList<File>();
-        for (File directory : dirs) {
-            final File d = directory;
-            File[] f = d.listFiles(new FilenameFilter() {
-                public boolean accept(File dir, String n) {
-                    return dir.equals(d) && n.startsWith(filePrefix);
-                }
-            });
-            for (int i = 0; i < f.length; i++) {
-                files.add(f[i]);
-            }
-        }
-       
-        for (File file : files) {
-            try {
-                String n = file.getName();
-                String numStr = n.substring(filePrefix.length(), n.length());
-                int num = Integer.parseInt(numStr);
-                DataFile dataFile = new ReadOnlyDataFile(file, num, preferedFileLength);
-                fileMap.put(dataFile.getDataFileId(), dataFile);
-                storeSize.addAndGet(dataFile.getLength());
-            } catch (NumberFormatException e) {
-                // Ignore file that do not match the pattern.
-            }
-        }
-
-        // Sort the list so that we can link the DataFiles together in the
-        // right order.
-        List<DataFile> dataFiles = new ArrayList<DataFile>(fileMap.values());
-        Collections.sort(dataFiles);
-        currentWriteFile = null;
-        for (DataFile df : dataFiles) {
-            if (currentWriteFile != null) {
-                currentWriteFile.linkAfter(df);
-            }
-            currentWriteFile = df;
-            fileByFileMap.put(df.getFile(), df);
-        }
-        
-        // Need to check the current Write File to see if there was a partial
-        // write to it.
-        if (currentWriteFile != null) {
-
-            // See if the lastSyncedLocation is valid..
-            Location l = lastAppendLocation.get();
-            if (l != null && l.getDataFileId() != currentWriteFile.getDataFileId().intValue()) {
-                l = null;
-            }
-        }
-    }
-    
-    public synchronized void close() throws IOException {
-        if (!started) {
-            return;
-        }
-        accessorPool.close();
-        fileMap.clear();
-        fileByFileMap.clear();
-        started = false;
-    }
-
-    
-    public Location getFirstLocation() throws IllegalStateException, IOException {
-        if( currentWriteFile == null ) {
-            return null;
-        }
-        
-        DataFile first = (DataFile)currentWriteFile.getHeadNode();
-        Location cur = new Location();
-        cur.setDataFileId(first.getDataFileId());
-        cur.setOffset(0);
-        cur.setSize(0);
-        return getNextLocation(cur);
-    }
-    
-    @Override
-    public synchronized boolean delete() throws IOException {
-        throw new RuntimeException("Cannot delete a ReadOnlyAsyncDataManager");
-    }    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyDataFile.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyDataFile.java
deleted file mode 100644
index 9eac7c1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/ReadOnlyDataFile.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-import org.apache.activemq.util.IOHelper;
-
-/**
- * Allows you to open a data file in read only mode.  Useful when working with 
- * archived data files.
- */
-public class ReadOnlyDataFile extends DataFile {
-
-    ReadOnlyDataFile(File file, int number, int preferedSize) {
-        super(file, number, preferedSize);
-    }
-    
-    
-    public RandomAccessFile openRandomAccessFile(boolean appender) throws IOException {
-        RandomAccessFile rc = new RandomAccessFile(file, "r");
-        // When we start to write files size them up so that the OS has a chance
-        // to allocate the file contigously.
-        if (appender) {
-            if (length < preferedSize) {
-                rc.setLength(preferedSize);
-            }
-        }
-        return rc;
-    }
-
-    public void closeRandomAccessFile(RandomAccessFile file) throws IOException {
-        file.close();
-    }
-
-    public synchronized boolean delete() throws IOException {
-        throw new RuntimeException("Not valid on a read only file.");
-    }
-    
-    public synchronized void move(File targetDirectory) throws IOException{
-        throw new RuntimeException("Not valid on a read only file.");
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/package.html
deleted file mode 100755
index 6f6779b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- journal based data storage - scalable and fast
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java
deleted file mode 100644
index 3fcdf30..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.kaha.ContainerId;
-import org.apache.activemq.kaha.RuntimeStoreException;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.impl.DataManager;
-import org.apache.activemq.kaha.impl.data.Item;
-import org.apache.activemq.kaha.impl.index.DiskIndexLinkedList;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexLinkedList;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.apache.activemq.kaha.impl.index.VMIndexLinkedList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Implementation of a ListContainer
- * 
- * 
- */
-public abstract class BaseContainerImpl {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BaseContainerImpl.class);
-    protected IndexItem root;
-    protected IndexLinkedList indexList;
-    protected IndexManager indexManager;
-    protected DataManager dataManager;
-    protected ContainerId containerId;
-    protected boolean loaded;
-    protected boolean closed;
-    protected boolean initialized;
-    protected boolean persistentIndex;
-
-    protected BaseContainerImpl(ContainerId id, IndexItem root, IndexManager indexManager, DataManager dataManager, boolean persistentIndex) {
-        this.containerId = id;
-        this.root = root;
-        this.indexManager = indexManager;
-        this.dataManager = dataManager;
-        this.persistentIndex = persistentIndex;
-    }
-
-    public ContainerId getContainerId() {
-        return containerId;
-    }
-
-    public synchronized void init() {
-        if (!initialized) {
-            if (!initialized) {
-                initialized = true;
-                if (this.indexList == null) {
-                    if (persistentIndex) {
-                        this.indexList = new DiskIndexLinkedList(indexManager, root);
-                    } else {
-                        this.indexList = new VMIndexLinkedList(root);
-                    }
-                }
-            }
-        }
-    }
-
-    public synchronized void clear() {
-        if (indexList != null) {
-            indexList.clear();
-        }
-    }
-
-    /**
-     * @return the indexList
-     */
-    public IndexLinkedList getList() {
-        return indexList;
-    }
-
-    /**
-     * @param indexList the indexList to set
-     */
-    public void setList(IndexLinkedList indexList) {
-        this.indexList = indexList;
-    }
-
-    public abstract void unload();
-
-    public abstract void load();
-
-    public abstract int size();
-
-    protected abstract Object getValue(StoreEntry currentItem);
-
-    protected abstract void remove(IndexItem currentItem);
-
-    protected final synchronized IndexLinkedList getInternalList() {
-        return indexList;
-    }
-
-    public final synchronized void close() {
-        unload();
-        closed = true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#isLoaded()
-     */
-    public final synchronized boolean isLoaded() {
-        checkClosed();
-        return loaded;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#getId()
-     */
-    public final Object getId() {
-        checkClosed();
-        return containerId.getKey();
-    }
-
-    public DataManager getDataManager() {
-        return dataManager;
-    }
-
-    public IndexManager getIndexManager() {
-        return indexManager;
-    }
-
-    public final synchronized void expressDataInterest() throws IOException {
-        long nextItem = root.getNextItem();
-        while (nextItem != Item.POSITION_NOT_SET) {
-            IndexItem item = indexManager.getIndex(nextItem);
-            item.setOffset(nextItem);
-            dataManager.addInterestInFile(item.getKeyFile());
-            dataManager.addInterestInFile(item.getValueFile());
-            nextItem = item.getNextItem();
-        }
-    }
-
-    protected final void doClear() {
-        checkClosed();
-        loaded = true;
-        List<IndexItem> indexList = new ArrayList<IndexItem>();
-        try {
-            init();
-            long nextItem = root.getNextItem();
-            while (nextItem != Item.POSITION_NOT_SET) {
-                IndexItem item = new IndexItem();
-                item.setOffset(nextItem);
-                indexList.add(item);
-                nextItem = item.getNextItem();
-            }
-            root.setNextItem(Item.POSITION_NOT_SET);
-            storeIndex(root);
-            for (int i = 0; i < indexList.size(); i++) {
-                IndexItem item = indexList.get(i);
-                dataManager.removeInterestInFile(item.getKeyFile());
-                dataManager.removeInterestInFile(item.getValueFile());
-                indexManager.freeIndex(item);
-            }
-            indexList.clear();
-        } catch (IOException e) {
-            LOG.error("Failed to clear Container " + getId(), e);
-            throw new RuntimeStoreException(e);
-        }
-    }
-
-    protected final void delete(final IndexItem keyItem, final IndexItem prevItem, final IndexItem nextItem) {
-        if (keyItem != null) {
-            try {
-                root = indexList.getRoot();
-                IndexItem prev = prevItem == null ? root : prevItem;
-                IndexItem next = (nextItem == null || !nextItem.equals(root)) ? nextItem : null;
-                dataManager.removeInterestInFile(keyItem.getKeyFile());
-                dataManager.removeInterestInFile(keyItem.getValueFile());
-                if (next != null) {
-                    prev.setNextItem(next.getOffset());
-                    next.setPreviousItem(prev.getOffset());
-                    updateIndexes(next);
-                } else {
-                    prev.setNextItem(Item.POSITION_NOT_SET);
-                }
-                updateIndexes(prev);
-                indexManager.freeIndex(keyItem);
-            } catch (IOException e) {
-                LOG.error("Failed to delete " + keyItem, e);
-                throw new RuntimeStoreException(e);
-            }
-        }
-    }
-
-    protected final void checkClosed() {
-        if (closed) {
-            throw new RuntimeStoreException("The store is closed");
-        }
-    }
-
-    protected void storeIndex(IndexItem item) throws IOException {
-        indexManager.storeIndex(item);
-    }
-
-    protected void updateIndexes(IndexItem item) throws IOException {
-        indexManager.updateIndexes(item);
-    }
-
-    protected final boolean isRoot(StoreEntry item) {
-        return item != null && root != null && (root == item || root.getOffset() == item.getOffset());
-        // return item != null && indexRoot != null && indexRoot == item;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerCollectionSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerCollectionSupport.java
deleted file mode 100644
index dd170b8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerCollectionSupport.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-/**
- * Base class for container collections
- * 
- * 
- */
-class ContainerCollectionSupport {
-
-    protected MapContainerImpl container;
-
-    protected ContainerCollectionSupport(MapContainerImpl container) {
-        this.container = container;
-    }
-
-    public int size() {
-        return container.size();
-    }
-
-    public boolean isEmpty() {
-        return container.isEmpty();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerEntrySet.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerEntrySet.java
deleted file mode 100644
index 78f5114..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerEntrySet.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Set of Map.Entry objects for a container
- * 
- * 
- */
-public class ContainerEntrySet extends ContainerCollectionSupport implements Set {
-    ContainerEntrySet(MapContainerImpl container) {
-        super(container);
-    }
-
-    public boolean contains(Object o) {
-        return container.entrySet().contains(o);
-    }
-
-    public Iterator iterator() {
-        return new ContainerEntrySetIterator(container, buildEntrySet().iterator());
-    }
-
-    public Object[] toArray() {
-        return buildEntrySet().toArray();
-    }
-
-    public Object[] toArray(Object[] a) {
-        return buildEntrySet().toArray(a);
-    }
-
-    public boolean add(Object o) {
-        throw new UnsupportedOperationException("Cannot add here");
-    }
-
-    public boolean remove(Object o) {
-        boolean result = false;
-        if (buildEntrySet().remove(o)) {
-            ContainerMapEntry entry = (ContainerMapEntry)o;
-            container.remove(entry.getKey());
-        }
-        return result;
-    }
-
-    public boolean containsAll(Collection c) {
-        return buildEntrySet().containsAll(c);
-    }
-
-    public boolean addAll(Collection c) {
-        throw new UnsupportedOperationException("Cannot add here");
-    }
-
-    public boolean retainAll(Collection c) {
-        List<Object> tmpList = new ArrayList<Object>();
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            Object o = i.next();
-            if (!contains(o)) {
-                tmpList.add(o);
-            }
-        }
-        boolean result = false;
-        for (Iterator<Object> i = tmpList.iterator(); i.hasNext();) {
-            result |= remove(i.next());
-        }
-        return result;
-    }
-
-    public boolean removeAll(Collection c) {
-        boolean result = true;
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            if (!remove(i.next())) {
-                result = false;
-            }
-        }
-        return result;
-    }
-
-    public void clear() {
-        container.clear();
-    }
-
-    protected Set<ContainerMapEntry> buildEntrySet() {
-        Set<ContainerMapEntry> set = new HashSet<ContainerMapEntry>();
-        for (Iterator i = container.keySet().iterator(); i.hasNext();) {
-            ContainerMapEntry entry = new ContainerMapEntry(container, i.next());
-            set.add(entry);
-        }
-        return set;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerEntrySetIterator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerEntrySetIterator.java
deleted file mode 100644
index fce8ab8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerEntrySetIterator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.Iterator;
-
-/**
- * An Iterator for a container entry Set
- * 
- * 
- */
-public class ContainerEntrySetIterator implements Iterator {
-    private MapContainerImpl container;
-    private Iterator iter;
-    private ContainerMapEntry currentEntry;
-
-    ContainerEntrySetIterator(MapContainerImpl container, Iterator iter) {
-        this.container = container;
-        this.iter = iter;
-    }
-
-    public boolean hasNext() {
-        return iter.hasNext();
-    }
-
-    public Object next() {
-        currentEntry = (ContainerMapEntry)iter.next();
-        return currentEntry;
-    }
-
-    public void remove() {
-        if (currentEntry != null) {
-            container.remove(currentEntry.getKey());
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java
deleted file mode 100644
index 6241bfe..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.activemq.kaha.impl.index.IndexItem;
-
-/**
- * A Set of keys for the container
- * 
- * 
- */
-public class ContainerKeySet extends ContainerCollectionSupport implements Set {
-
-    ContainerKeySet(MapContainerImpl container) {
-        super(container);
-    }
-
-    public boolean contains(Object o) {
-        return container.containsKey(o);
-    }
-
-    public Iterator iterator() {
-        return new ContainerKeySetIterator(container);
-    }
-
-    public Object[] toArray() {
-        List<Object> list = new ArrayList<Object>();
-        IndexItem item = container.getInternalList().getRoot();
-        while ((item = container.getInternalList().getNextEntry(item)) != null) {
-            list.add(container.getKey(item));
-        }
-        return list.toArray();
-    }
-
-    public Object[] toArray(Object[] a) {
-        List<Object> list = new ArrayList<Object>();
-        IndexItem item = container.getInternalList().getRoot();
-        while ((item = container.getInternalList().getNextEntry(item)) != null) {
-            list.add(container.getKey(item));
-        }
-        return list.toArray(a);
-    }
-
-    public boolean add(Object o) {
-        throw new UnsupportedOperationException("Cannot add here");
-    }
-
-    public boolean remove(Object o) {
-        return container.remove(o) != null;
-    }
-
-    public boolean containsAll(Collection c) {
-        for (Object key : c) {
-            if (!container.containsKey(key)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public boolean addAll(Collection c) {
-        throw new UnsupportedOperationException("Cannot add here");
-    }
-
-    public boolean retainAll(Collection c) {
-        List<Object> tmpList = new ArrayList<Object>();
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            Object o = i.next();
-            if (!contains(o)) {
-                tmpList.add(o);
-            }
-        }
-        for (Iterator<Object> i = tmpList.iterator(); i.hasNext();) {
-            remove(i.next());
-        }
-        return !tmpList.isEmpty();
-    }
-
-    public boolean removeAll(Collection c) {
-        boolean result = true;
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            if (!remove(i.next())) {
-                result = false;
-            }
-        }
-        return result;
-    }
-
-    public void clear() {
-        container.clear();
-    }
-
-    public String toString() {
-        StringBuffer result = new StringBuffer(32);
-        result.append("ContainerKeySet[");
-        IndexItem item = container.getInternalList().getRoot();
-        while ((item = container.getInternalList().getNextEntry(item)) != null) {
-            result.append(container.getKey(item));
-            result.append(",");
-        }
-        result.append("]");
-        return result.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySetIterator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySetIterator.java
deleted file mode 100644
index 2089395..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySetIterator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.Iterator;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexLinkedList;
-
-/**
- * Iterator for the set of keys for a container
- * 
- * 
- */
-public class ContainerKeySetIterator implements Iterator {
-    
-    protected IndexItem nextItem;
-    protected IndexItem currentItem;
-
-    private MapContainerImpl container;
-    private IndexLinkedList list;
-
-    ContainerKeySetIterator(MapContainerImpl container) {
-        this.container = container;
-        this.list = container.getInternalList();
-        this.currentItem = list.getRoot();
-        this.nextItem = list.getNextEntry(currentItem);
-    }
-
-    public boolean hasNext() {
-        return nextItem != null;
-    }
-
-    public Object next() {
-        currentItem = nextItem;
-        Object result = container.getKey(nextItem);
-        nextItem = list.getNextEntry(nextItem);
-        return result;
-    }
-
-    public void remove() {
-        if (currentItem != null) {
-            container.remove(currentItem);
-            if (nextItem != null) {
-                list.refreshEntry(nextItem);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerListIterator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerListIterator.java
deleted file mode 100644
index 5e2fb66..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerListIterator.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.ListIterator;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexLinkedList;
-
-/**
- * 
- */
-public class ContainerListIterator extends ContainerValueCollectionIterator implements ListIterator {
-
-    protected ContainerListIterator(ListContainerImpl container, IndexLinkedList list, IndexItem start) {
-        super(container, list, start);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.ListIterator#hasPrevious()
-     */
-    public boolean hasPrevious() {
-        synchronized (container) {
-            nextItem = (IndexItem)list.refreshEntry(nextItem);
-            return list.getPrevEntry(nextItem) != null;
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.ListIterator#previous()
-     */
-    public Object previous() {
-        synchronized (container) {
-            nextItem = (IndexItem)list.refreshEntry(nextItem);
-            nextItem = list.getPrevEntry(nextItem);
-            return nextItem != null ? container.getValue(nextItem) : null;
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.ListIterator#nextIndex()
-     */
-    public int nextIndex() {
-        int result = -1;
-        if (nextItem != null) {
-            synchronized (container) {
-                nextItem = (IndexItem)list.refreshEntry(nextItem);
-                StoreEntry next = list.getNextEntry(nextItem);
-                if (next != null) {
-                    result = container.getInternalList().indexOf(next);
-                }
-            }
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.ListIterator#previousIndex()
-     */
-    public int previousIndex() {
-        int result = -1;
-        if (nextItem != null) {
-            synchronized (container) {
-                nextItem = (IndexItem)list.refreshEntry(nextItem);
-                StoreEntry prev = list.getPrevEntry(nextItem);
-                if (prev != null) {
-                    result = container.getInternalList().indexOf(prev);
-                }
-            }
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.ListIterator#set(E)
-     */
-    public void set(Object o) {
-        IndexItem item = ((ListContainerImpl)container).internalSet(previousIndex() + 1, o);
-        nextItem = item;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.ListIterator#add(E)
-     */
-    public void add(Object o) {
-        IndexItem item = ((ListContainerImpl)container).internalAdd(previousIndex() + 1, o);
-        nextItem = item;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerMapEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerMapEntry.java
deleted file mode 100755
index 101bc33..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerMapEntry.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.Map;
-import org.apache.activemq.kaha.MapContainer;
-
-/**
- * Map.Entry implementation for a container
- * 
- * 
- */
-class ContainerMapEntry implements Map.Entry {
-
-    private MapContainer container;
-    private Object key;
-
-    ContainerMapEntry(MapContainer container, Object key) {
-        this.container = container;
-        this.key = key;
-
-    }
-
-    public Object getKey() {
-        return key;
-    }
-
-    public Object getValue() {
-        return container.get(key);
-    }
-
-    public Object setValue(Object value) {
-        return container.put(key, value);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollection.java
deleted file mode 100644
index bbdac92..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollection.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexLinkedList;
-
-/**
- * Values collection for the MapContainer
- * 
- * 
- */
-class ContainerValueCollection extends ContainerCollectionSupport implements Collection {
-
-    ContainerValueCollection(MapContainerImpl container) {
-        super(container);
-    }
-
-    public boolean contains(Object o) {
-        return container.containsValue(o);
-    }
-
-    public Iterator iterator() {
-        IndexLinkedList list = container.getItemList();
-        return new ContainerValueCollectionIterator(container, list, list.getRoot());
-    }
-
-    public Object[] toArray() {
-        Object[] result = null;
-        IndexLinkedList list = container.getItemList();
-        synchronized (list) {
-            result = new Object[list.size()];
-            IndexItem item = list.getFirst();
-            int count = 0;
-            while (item != null) {
-                Object value = container.getValue(item);
-                result[count++] = value;
-
-                item = list.getNextEntry(item);
-            }
-
-        }
-        return result;
-    }
-
-    public Object[] toArray(Object[] result) {
-        IndexLinkedList list = container.getItemList();
-        synchronized (list) {
-            if (result.length <= list.size()) {
-                IndexItem item = list.getFirst();
-                int count = 0;
-                while (item != null) {
-                    Object value = container.getValue(item);
-                    result[count++] = value;
-
-                    item = list.getNextEntry(item);
-                }
-            }
-        }
-        return result;
-    }
-
-    public boolean add(Object o) {
-        throw new UnsupportedOperationException("Can't add an object here");
-    }
-
-    public boolean remove(Object o) {
-        return container.removeValue(o);
-    }
-
-    public boolean containsAll(Collection c) {
-        boolean result = !c.isEmpty();
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            if (!contains(i.next())) {
-                result = false;
-                break;
-            }
-        }
-        return result;
-    }
-
-    public boolean addAll(Collection c) {
-        throw new UnsupportedOperationException("Can't add everything here!");
-    }
-
-    public boolean removeAll(Collection c) {
-        boolean result = true;
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            Object obj = i.next();
-            result &= remove(obj);
-        }
-        return result;
-    }
-
-    public boolean retainAll(Collection c) {
-        List<Object> tmpList = new ArrayList<Object>();
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            Object o = i.next();
-            if (!contains(o)) {
-                tmpList.add(o);
-            }
-        }
-        for (Iterator<Object> i = tmpList.iterator(); i.hasNext();) {
-            remove(i.next());
-        }
-        return !tmpList.isEmpty();
-    }
-
-    public void clear() {
-        container.clear();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollectionIterator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollectionIterator.java
deleted file mode 100644
index 115babc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollectionIterator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.util.Iterator;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexLinkedList;
-
-/**
- * Values collection iterator for the MapContainer
- * 
- * 
- */
-public class ContainerValueCollectionIterator implements Iterator {
-
-    protected BaseContainerImpl container;
-    protected IndexLinkedList list;
-    protected IndexItem nextItem;
-    protected IndexItem currentItem;
-
-    ContainerValueCollectionIterator(BaseContainerImpl container, IndexLinkedList list, IndexItem start) {
-        this.container = container;
-        this.list = list;
-        this.currentItem = start;
-        this.nextItem = list.getNextEntry((IndexItem)list.refreshEntry(start));
-    }
-
-    public boolean hasNext() {
-        return nextItem != null;
-    }
-
-    public Object next() {
-        synchronized (container) {
-            nextItem = (IndexItem)list.refreshEntry(nextItem);
-            currentItem = nextItem;
-            Object result = container.getValue(nextItem);
-            nextItem = list.getNextEntry(nextItem);
-            return result;
-        }
-    }
-
-    public void remove() {
-        synchronized (container) {
-            if (currentItem != null) {
-                currentItem = (IndexItem)list.refreshEntry(currentItem);
-                container.remove(currentItem);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
deleted file mode 100644
index 87b6791..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
+++ /dev/null
@@ -1,892 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.apache.activemq.kaha.ContainerId;
-import org.apache.activemq.kaha.ListContainer;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.RuntimeStoreException;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.DataManager;
-import org.apache.activemq.kaha.impl.data.Item;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Implementation of a ListContainer
- * 
- * 
- */
-public class ListContainerImpl extends BaseContainerImpl implements ListContainer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ListContainerImpl.class);
-    protected Marshaller marshaller = Store.OBJECT_MARSHALLER;
-
-    public ListContainerImpl(ContainerId id, IndexItem root, IndexManager indexManager,
-                             DataManager dataManager, boolean persistentIndex) throws IOException {
-        super(id, root, indexManager, dataManager, persistentIndex);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#load()
-     */
-    public synchronized void load() {
-        checkClosed();
-        if (!loaded) {
-            if (!loaded) {
-                loaded = true;
-                try {
-                    init();
-                    long nextItem = root.getNextItem();
-                    while (nextItem != Item.POSITION_NOT_SET) {
-                        IndexItem item = indexManager.getIndex(nextItem);
-                        indexList.add(item);
-                        itemAdded(item, indexList.size() - 1, getValue(item));
-                        nextItem = item.getNextItem();
-                    }
-                } catch (IOException e) {
-                    LOG.error("Failed to load container " + getId(), e);
-                    throw new RuntimeStoreException(e);
-                }
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#unload()
-     */
-    public synchronized void unload() {
-        checkClosed();
-        if (loaded) {
-            loaded = false;
-            indexList.clear();
-
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#setKeyMarshaller(org.apache.activemq.kaha.Marshaller)
-     */
-    public synchronized void setMarshaller(Marshaller marshaller) {
-        checkClosed();
-        this.marshaller = marshaller;
-    }
-
-    public synchronized boolean equals(Object obj) {
-        load();
-        boolean result = false;
-        if (obj != null && obj instanceof List) {
-            List other = (List)obj;
-            result = other.size() == size();
-            if (result) {
-                for (int i = 0; i < indexList.size(); i++) {
-                    Object o1 = other.get(i);
-                    Object o2 = get(i);
-                    result = o1 == o2 || (o1 != null && o2 != null && o1.equals(o2));
-                    if (!result) {
-                        break;
-                    }
-                }
-            }
-        }
-        return result;
-    }
-
-    public int hashCode() {
-        return super.hashCode();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#size()
-     */
-    public synchronized int size() {
-        load();
-        return indexList.size();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#addFirst(java.lang.Object)
-     */
-    public synchronized void addFirst(Object o) {
-        internalAddFirst(o);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#addLast(java.lang.Object)
-     */
-    public synchronized void addLast(Object o) {
-        internalAddLast(o);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#removeFirst()
-     */
-    public synchronized Object removeFirst() {
-        load();
-        Object result = null;
-        IndexItem item = indexList.getFirst();
-        if (item != null) {
-            itemRemoved(0);
-            result = getValue(item);
-            IndexItem prev = root;
-            IndexItem next = indexList.size() > 1 ? (IndexItem)indexList.get(1) : null;
-            indexList.removeFirst();
-
-            delete(item, prev, next);
-            item = null;
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#removeLast()
-     */
-    public synchronized Object removeLast() {
-        load();
-        Object result = null;
-        IndexItem last = indexList.getLast();
-        if (last != null) {
-            itemRemoved(indexList.size() - 1);
-            result = getValue(last);
-            IndexItem prev = indexList.getPrevEntry(last);
-            IndexItem next = null;
-            indexList.removeLast();
-            delete(last, prev, next);
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#isEmpty()
-     */
-    public synchronized boolean isEmpty() {
-        load();
-        return indexList.isEmpty();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#contains(java.lang.Object)
-     */
-    public synchronized boolean contains(Object o) {
-        load();
-        boolean result = false;
-        if (o != null) {
-            IndexItem next = indexList.getFirst();
-            while (next != null) {
-                Object value = getValue(next);
-                if (value != null && value.equals(o)) {
-                    result = true;
-                    break;
-                }
-                next = indexList.getNextEntry(next);
-            }
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#iterator()
-     */
-    public synchronized Iterator iterator() {
-        load();
-        return listIterator();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#toArray()
-     */
-    public synchronized Object[] toArray() {
-        load();
-        List<Object> tmp = new ArrayList<Object>(indexList.size());
-        IndexItem next = indexList.getFirst();
-        while (next != null) {
-            Object value = getValue(next);
-            tmp.add(value);
-            next = indexList.getNextEntry(next);
-        }
-        return tmp.toArray();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#toArray(T[])
-     */
-    public synchronized Object[] toArray(Object[] a) {
-        load();
-        List<Object> tmp = new ArrayList<Object>(indexList.size());
-        IndexItem next = indexList.getFirst();
-        while (next != null) {
-            Object value = getValue(next);
-            tmp.add(value);
-            next = indexList.getNextEntry(next);
-        }
-        return tmp.toArray(a);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#add(E)
-     */
-    public synchronized boolean add(Object o) {
-        load();
-        addLast(o);
-        return true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#remove(java.lang.Object)
-     */
-    public synchronized boolean remove(Object o) {
-        load();
-        boolean result = false;
-        int pos = 0;
-        IndexItem next = indexList.getFirst();
-        while (next != null) {
-            Object value = getValue(next);
-            if (value != null && value.equals(o)) {
-                remove(next);
-                itemRemoved(pos);
-                result = true;
-                break;
-            }
-            next = indexList.getNextEntry(next);
-            pos++;
-        }
-        return result;
-    }
-
-    protected synchronized void remove(IndexItem item) {
-        IndexItem prev = indexList.getPrevEntry(item);
-        IndexItem next = indexList.getNextEntry(item);
-        indexList.remove(item);
-
-        delete(item, prev, next);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#containsAll(java.util.Collection)
-     */
-    public synchronized boolean containsAll(Collection c) {
-        load();
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            Object obj = i.next();
-            if (!contains(obj)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#addAll(java.util.Collection)
-     */
-    public synchronized boolean addAll(Collection c) {
-        load();
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            add(i.next());
-        }
-        return true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#addAll(int, java.util.Collection)
-     */
-    public synchronized boolean addAll(int index, Collection c) {
-        load();
-        boolean result = false;
-        ListIterator e1 = listIterator(index);
-        Iterator e2 = c.iterator();
-        while (e2.hasNext()) {
-            e1.add(e2.next());
-            result = true;
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#removeAll(java.util.Collection)
-     */
-    public synchronized boolean removeAll(Collection c) {
-        load();
-        boolean result = true;
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            Object obj = i.next();
-            result &= remove(obj);
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#retainAll(java.util.Collection)
-     */
-    public synchronized boolean retainAll(Collection c) {
-        load();
-        List<Object> tmpList = new ArrayList<Object>();
-        IndexItem next = indexList.getFirst();
-        while (next != null) {
-            Object o = getValue(next);
-            if (!c.contains(o)) {
-                tmpList.add(o);
-            }
-            next = indexList.getNextEntry(next);
-        }
-        for (Iterator<Object> i = tmpList.iterator(); i.hasNext();) {
-            remove(i.next());
-        }
-        return !tmpList.isEmpty();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#clear()
-     */
-    public synchronized void clear() {
-        checkClosed();
-        super.clear();
-        doClear();
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#get(int)
-     */
-    public synchronized Object get(int index) {
-        load();
-        Object result = null;
-        IndexItem item = indexList.get(index);
-        if (item != null) {
-            result = getValue(item);
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#set(int, E)
-     */
-    public synchronized Object set(int index, Object element) {
-        load();
-        Object result = null;
-        IndexItem replace = indexList.isEmpty() ? null : (IndexItem)indexList.get(index);
-        IndexItem prev = (indexList.isEmpty() || (index - 1) < 0) ? null : (IndexItem)indexList
-            .get(index - 1);
-        IndexItem next = (indexList.isEmpty() || (index + 1) >= size()) ? null : (IndexItem)indexList
-            .get(index + 1);
-        result = getValue(replace);
-        indexList.remove(index);
-        delete(replace, prev, next);
-        itemRemoved(index);
-        add(index, element);
-        return result;
-    }
-
-    protected synchronized IndexItem internalSet(int index, Object element) {
-        IndexItem replace = indexList.isEmpty() ? null : (IndexItem)indexList.get(index);
-        IndexItem prev = (indexList.isEmpty() || (index - 1) < 0) ? null : (IndexItem)indexList
-            .get(index - 1);
-        IndexItem next = (indexList.isEmpty() || (index + 1) >= size()) ? null : (IndexItem)indexList
-            .get(index + 1);
-        indexList.remove(index);
-        delete(replace, prev, next);
-        itemRemoved(index);
-        return internalAdd(index, element);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#add(int, E)
-     */
-    public synchronized void add(int index, Object element) {
-        load();
-        IndexItem item = insert(index, element);
-        indexList.add(index, item);
-        itemAdded(item, index, element);
-    }
-
-    protected synchronized StoreEntry internalAddLast(Object o) {
-        load();
-        IndexItem item = writeLast(o);
-        indexList.addLast(item);
-        itemAdded(item, indexList.size() - 1, o);
-        return item;
-    }
-
-    protected synchronized StoreEntry internalAddFirst(Object o) {
-        load();
-        IndexItem item = writeFirst(o);
-        indexList.addFirst(item);
-        itemAdded(item, 0, o);
-        return item;
-    }
-
-    protected synchronized IndexItem internalAdd(int index, Object element) {
-        load();
-        IndexItem item = insert(index, element);
-        indexList.add(index, item);
-        itemAdded(item, index, element);
-        return item;
-    }
-
-    protected synchronized StoreEntry internalGet(int index) {
-        load();
-        if (index >= 0 && index < indexList.size()) {
-            return indexList.get(index);
-        }
-        return null;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.ListContainer#doRemove(int)
-     */
-    public synchronized boolean doRemove(int index) {
-        load();
-        boolean result = false;
-        IndexItem item = indexList.get(index);
-        if (item != null) {
-            result = true;
-            IndexItem prev = indexList.getPrevEntry(item);
-            prev = prev != null ? prev : root;
-            IndexItem next = indexList.getNextEntry(prev);
-            indexList.remove(index);
-            itemRemoved(index);
-            delete(item, prev, next);
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#remove(int)
-     */
-    public synchronized Object remove(int index) {
-        load();
-        Object result = null;
-        IndexItem item = indexList.get(index);
-        if (item != null) {
-            itemRemoved(index);
-            result = getValue(item);
-            IndexItem prev = indexList.getPrevEntry(item);
-            prev = prev != null ? prev : root;
-            IndexItem next = indexList.getNextEntry(item);
-            indexList.remove(index);
-            delete(item, prev, next);
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#indexOf(java.lang.Object)
-     */
-    public synchronized int indexOf(Object o) {
-        load();
-        int result = -1;
-        if (o != null) {
-            int count = 0;
-            IndexItem next = indexList.getFirst();
-            while (next != null) {
-                Object value = getValue(next);
-                if (value != null && value.equals(o)) {
-                    result = count;
-                    break;
-                }
-                count++;
-                next = indexList.getNextEntry(next);
-            }
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#lastIndexOf(java.lang.Object)
-     */
-    public synchronized int lastIndexOf(Object o) {
-        load();
-        int result = -1;
-        if (o != null) {
-            int count = indexList.size() - 1;
-            IndexItem next = indexList.getLast();
-            while (next != null) {
-                Object value = getValue(next);
-                if (value != null && value.equals(o)) {
-                    result = count;
-                    break;
-                }
-                count--;
-                next = indexList.getPrevEntry(next);
-            }
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#listIterator()
-     */
-    public synchronized ListIterator listIterator() {
-        load();
-        return new ContainerListIterator(this, indexList, indexList.getRoot());
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#listIterator(int)
-     */
-    public synchronized ListIterator listIterator(int index) {
-        load();
-        IndexItem start = (index - 1) > 0 ? indexList.get(index - 1) : indexList.getRoot();
-        return new ContainerListIterator(this, indexList, start);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.util.List#subList(int, int)
-     */
-    public synchronized List<Object> subList(int fromIndex, int toIndex) {
-        load();
-        List<Object> result = new ArrayList<Object>();
-        int count = fromIndex;
-        IndexItem next = indexList.get(fromIndex);
-        while (next != null && count++ < toIndex) {
-            result.add(getValue(next));
-            next = indexList.getNextEntry(next);
-        }
-        return result;
-    }
-
-    /**
-     * add an Object to the list but get a StoreEntry of its position
-     * 
-     * @param object
-     * @return the entry in the Store
-     */
-    public synchronized StoreEntry placeLast(Object object) {
-        StoreEntry item = internalAddLast(object);
-        return item;
-    }
-
-    /**
-     * insert an Object in first position int the list but get a StoreEntry of
-     * its position
-     * 
-     * @param object
-     * @return the location in the Store
-     */
-    public synchronized StoreEntry placeFirst(Object object) {
-        StoreEntry item = internalAddFirst(object);
-        return item;
-    }
-
-    /**
-     * @param entry
-     * @param object
-     * @see org.apache.activemq.kaha.ListContainer#update(org.apache.activemq.kaha.StoreEntry,
-     *      java.lang.Object)
-     */
-    public synchronized void update(StoreEntry entry, Object object) {
-        try {
-            dataManager.updateItem(entry.getValueDataItem(), marshaller, object);
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Retrieve an Object from the Store by its location
-     * 
-     * @param entry
-     * @return the Object at that entry
-     */
-    public synchronized Object get(final StoreEntry entry) {
-        load();
-        StoreEntry entryToUse = refresh(entry);
-        return getValue(entryToUse);
-    }
-
-    /**
-     * remove the Object at the StoreEntry
-     * 
-     * @param entry
-     * @return true if successful
-     */
-    public synchronized boolean remove(StoreEntry entry) {
-        IndexItem item = (IndexItem)entry;
-        load();
-        boolean result = false;
-        if (item != null) {
-
-            remove(item);
-            result = true;
-        }
-        return result;
-    }
-
-    /**
-     * Get the StoreEntry for the first item of the list
-     * 
-     * @return the first StoreEntry or null if the list is empty
-     */
-    public synchronized StoreEntry getFirst() {
-        load();
-        return indexList.getFirst();
-    }
-
-    /**
-     * Get the StoreEntry for the last item of the list
-     * 
-     * @return the last StoreEntry or null if the list is empty
-     */
-    public synchronized StoreEntry getLast() {
-        load();
-        return indexList.getLast();
-    }
-
-    /**
-     * Get the next StoreEntry from the list
-     * 
-     * @param entry
-     * @return the next StoreEntry or null
-     */
-    public synchronized StoreEntry getNext(StoreEntry entry) {
-        load();
-        IndexItem item = (IndexItem)entry;
-        return indexList.getNextEntry(item);
-    }
-
-    /**
-     * Get the previous StoreEntry from the list
-     * 
-     * @param entry
-     * @return the previous store entry or null
-     */
-    public synchronized StoreEntry getPrevious(StoreEntry entry) {
-        load();
-        IndexItem item = (IndexItem)entry;
-        return indexList.getPrevEntry(item);
-    }
-
-    /**
-     * It's possible that a StoreEntry could be come stale this will return an
-     * upto date entry for the StoreEntry position
-     * 
-     * @param entry old entry
-     * @return a refreshed StoreEntry
-     */
-    public synchronized StoreEntry refresh(StoreEntry entry) {
-        load();
-        return indexList.getEntry(entry);
-    }
-
-    protected synchronized IndexItem writeLast(Object value) {
-        IndexItem index = null;
-        try {
-            if (value != null) {
-                StoreLocation data = dataManager.storeDataItem(marshaller, value);
-                index = indexManager.createNewIndex();
-                index.setValueData(data);
-                IndexItem prev = indexList.getLast();
-                prev = prev != null ? prev : root;
-                IndexItem next = indexList.getNextEntry(prev);
-                prev.setNextItem(index.getOffset());
-                index.setPreviousItem(prev.getOffset());
-                updateIndexes(prev);
-                if (next != null) {
-                    next.setPreviousItem(index.getOffset());
-                    index.setNextItem(next.getOffset());
-                    updateIndexes(next);
-                }
-                storeIndex(index);
-            }
-        } catch (IOException e) {
-            LOG.error("Failed to write " + value, e);
-            throw new RuntimeStoreException(e);
-        }
-        return index;
-    }
-
-    protected synchronized IndexItem writeFirst(Object value) {
-        IndexItem index = null;
-        try {
-            if (value != null) {
-                StoreLocation data = dataManager.storeDataItem(marshaller, value);
-                index = indexManager.createNewIndex();
-                index.setValueData(data);
-                IndexItem prev = root;
-                IndexItem next = indexList.getNextEntry(prev);
-                prev.setNextItem(index.getOffset());
-                index.setPreviousItem(prev.getOffset());
-                updateIndexes(prev);
-                if (next != null) {
-                    next.setPreviousItem(index.getOffset());
-                    index.setNextItem(next.getOffset());
-                    updateIndexes(next);
-                }
-                storeIndex(index);
-            }
-        } catch (IOException e) {
-            LOG.error("Failed to write " + value, e);
-            throw new RuntimeStoreException(e);
-        }
-        return index;
-    }
-
-    protected synchronized IndexItem insert(int insertPos, Object value) {
-        IndexItem index = null;
-        try {
-            if (value != null) {
-                StoreLocation data = dataManager.storeDataItem(marshaller, value);
-                index = indexManager.createNewIndex();
-                index.setValueData(data);
-                IndexItem prev = null;
-                IndexItem next = null;
-                if (insertPos <= 0) {
-                    prev = root;
-                    next = indexList.getNextEntry(root);
-                } else if (insertPos >= indexList.size()) {
-                    prev = indexList.getLast();
-                    if (prev==null) {
-                        prev=root;
-                    }
-                    next = null;
-                } else {
-                    prev = indexList.get(insertPos);
-                    prev = prev != null ? prev : root;
-                    next = indexList.getNextEntry(prev);
-                }
-                prev.setNextItem(index.getOffset());
-                index.setPreviousItem(prev.getOffset());
-                updateIndexes(prev);
-                if (next != null) {
-                    next.setPreviousItem(index.getOffset());
-                    index.setNextItem(next.getOffset());
-                    updateIndexes(next);
-                }
-                storeIndex(index);
-                indexList.setRoot(root);
-            }
-        } catch (IOException e) {
-            LOG.error("Failed to insert " + value, e);
-            throw new RuntimeStoreException(e);
-        }
-        return index;
-    }
-
-    protected synchronized Object getValue(StoreEntry item) {
-        Object result = null;
-        if (item != null) {
-            try {
-                StoreLocation data = item.getValueDataItem();
-                result = dataManager.readItem(marshaller, data);
-            } catch (IOException e) {
-                LOG.error("Failed to get value for " + item, e);
-                throw new RuntimeStoreException(e);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * @return a string representation of this collection.
-     */
-    public synchronized String toString() {
-        StringBuffer result = new StringBuffer();
-        result.append("[");
-        Iterator i = iterator();
-        boolean hasNext = i.hasNext();
-        while (hasNext) {
-            Object o = i.next();
-            result.append(String.valueOf(o));
-            hasNext = i.hasNext();
-            if (hasNext) {
-                result.append(", ");
-            }
-        }
-        result.append("]");
-        return result.toString();
-    }
-
-    protected synchronized void itemAdded(IndexItem item, int pos, Object value) {
-
-    }
-
-    protected synchronized void itemRemoved(int pos) {
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/MapContainerImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/MapContainerImpl.java
deleted file mode 100755
index 7544baf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/MapContainerImpl.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/**
- * 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.kaha.impl.container;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.activemq.kaha.ContainerId;
-import org.apache.activemq.kaha.IndexMBean;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.RuntimeStoreException;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.DataManager;
-import org.apache.activemq.kaha.impl.data.Item;
-import org.apache.activemq.kaha.impl.index.Index;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexLinkedList;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.apache.activemq.kaha.impl.index.VMIndex;
-import org.apache.activemq.kaha.impl.index.hash.HashIndex;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Implementation of a MapContainer
- * 
- * 
- */
-public final class MapContainerImpl extends BaseContainerImpl implements MapContainer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MapContainerImpl.class);
-    protected Index index;
-    protected Marshaller keyMarshaller = Store.OBJECT_MARSHALLER;
-    protected Marshaller valueMarshaller = Store.OBJECT_MARSHALLER;
-    protected File directory;
-    private int indexBinSize = HashIndex.DEFAULT_BIN_SIZE;
-    private int indexKeySize = HashIndex.DEFAULT_KEY_SIZE;
-    private int indexPageSize = HashIndex.DEFAULT_PAGE_SIZE;
-    private int indexMaxBinSize = HashIndex.MAXIMUM_CAPACITY;
-    private int indexLoadFactor = HashIndex.DEFAULT_LOAD_FACTOR;
-
-    public MapContainerImpl(File directory, ContainerId id, IndexItem root, IndexManager indexManager,
-                            DataManager dataManager, boolean persistentIndex) {
-        super(id, root, indexManager, dataManager, persistentIndex);
-        this.directory = directory;
-    }
-
-    public synchronized void init() {
-        super.init();
-        if (index == null) {
-            if (persistentIndex) {
-                String name = containerId.getDataContainerName() + "_" + containerId.getKey();
-                try {
-                    HashIndex hashIndex = new HashIndex(directory, name, indexManager);
-                    hashIndex.setNumberOfBins(getIndexBinSize());
-                    hashIndex.setKeySize(getIndexKeySize());
-                    hashIndex.setPageSize(getIndexPageSize());
-                    hashIndex.setMaximumCapacity(getIndexMaxBinSize());
-                    hashIndex.setLoadFactor(getIndexLoadFactor());
-                    this.index = hashIndex;
-                } catch (IOException e) {
-                    LOG.error("Failed to create HashIndex", e);
-                    throw new RuntimeException(e);
-                }
-            } else {
-                this.index = new VMIndex(indexManager);
-            }
-        }
-        index.setKeyMarshaller(keyMarshaller);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#load()
-     */
-    public synchronized void load() {
-        checkClosed();
-        if (!loaded) {
-            if (!loaded) {
-                loaded = true;
-                try {
-                    init();
-                    index.load();
-                    long nextItem = root.getNextItem();
-                    while (nextItem != Item.POSITION_NOT_SET) {
-                        IndexItem item = indexManager.getIndex(nextItem);
-                        StoreLocation data = item.getKeyDataItem();
-                        Object key = dataManager.readItem(keyMarshaller, data);
-                        if (index.isTransient()) {
-                            index.store(key, item);
-                        }
-                        indexList.add(item);
-                        nextItem = item.getNextItem();
-                    }
-                } catch (IOException e) {
-                    LOG.error("Failed to load container " + getId(), e);
-                    throw new RuntimeStoreException(e);
-                }
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#unload()
-     */
-    public synchronized void unload() {
-        checkClosed();
-        if (loaded) {
-            loaded = false;
-            try {
-                index.unload();
-            } catch (IOException e) {
-                LOG.warn("Failed to unload the index", e);
-            }
-            indexList.clear();
-        }
-    }
-
-    public synchronized void delete() {
-        unload();
-        try {
-            index.delete();
-        } catch (IOException e) {
-            LOG.warn("Failed to unload the index", e);
-        }
-    }
-
-
-    public synchronized void setKeyMarshaller(Marshaller keyMarshaller) {
-        checkClosed();
-        this.keyMarshaller = keyMarshaller;
-        if (index != null) {
-            index.setKeyMarshaller(keyMarshaller);
-        }
-    }
-
-    public synchronized void setValueMarshaller(Marshaller valueMarshaller) {
-        checkClosed();
-        this.valueMarshaller = valueMarshaller;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#size()
-     */
-    public synchronized int size() {
-        load();
-        return indexList.size();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#isEmpty()
-     */
-    public synchronized boolean isEmpty() {
-        load();
-        return indexList.isEmpty();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#containsKey(java.lang.Object)
-     */
-    public synchronized boolean containsKey(Object key) {
-        load();
-        try {
-            return index.containsKey(key);
-        } catch (IOException e) {
-            LOG.error("Failed trying to find key: " + key, e);
-            throw new RuntimeException(e);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#get(java.lang.Object)
-     */
-    public synchronized Object get(Object key) {
-        load();
-        Object result = null;
-        StoreEntry item = null;
-        try {
-            item = index.get(key);
-        } catch (IOException e) {
-            LOG.error("Failed trying to get key: " + key, e);
-            throw new RuntimeException(e);
-        }
-        if (item != null) {
-            result = getValue(item);
-        }
-        return result;
-    }
-
-    /**
-     * Get the StoreEntry associated with the key
-     * 
-     * @param key
-     * @return the StoreEntry
-     */
-    public synchronized StoreEntry getEntry(Object key) {
-        load();
-        StoreEntry item = null;
-        try {
-            item = index.get(key);
-        } catch (IOException e) {
-            LOG.error("Failed trying to get key: " + key, e);
-            throw new RuntimeException(e);
-        }
-        return item;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#containsValue(java.lang.Object)
-     */
-    public synchronized boolean containsValue(Object o) {
-        load();
-        boolean result = false;
-        if (o != null) {
-            IndexItem item = indexList.getFirst();
-            while (item != null) {
-                Object value = getValue(item);
-                if (value != null && value.equals(o)) {
-                    result = true;
-                    break;
-                }
-                item = indexList.getNextEntry(item);
-            }
-        }
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#putAll(java.util.Map)
-     */
-    public synchronized void putAll(Map t) {
-        load();
-        if (t != null) {
-            for (Iterator i = t.entrySet().iterator(); i.hasNext();) {
-                Map.Entry entry = (Map.Entry)i.next();
-                put(entry.getKey(), entry.getValue());
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#keySet()
-     */
-    public synchronized Set keySet() {
-        load();
-        return new ContainerKeySet(this);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#values()
-     */
-    public synchronized Collection values() {
-        load();
-        return new ContainerValueCollection(this);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#entrySet()
-     */
-    public synchronized Set entrySet() {
-        load();
-        return new ContainerEntrySet(this);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#put(java.lang.Object,
-     *      java.lang.Object)
-     */
-    public synchronized Object put(Object key, Object value) {
-        load();
-        Object result = remove(key);
-        IndexItem item = write(key, value);
-        try {
-            index.store(key, item);
-        } catch (IOException e) {
-            LOG.error("Failed trying to insert key: " + key, e);
-            throw new RuntimeException(e);
-        }
-        indexList.add(item);
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#remove(java.lang.Object)
-     */
-    public synchronized Object remove(Object key) {
-        load();
-        try {
-            Object result = null;
-            IndexItem item = (IndexItem)index.remove(key);
-            if (item != null) {
-                // refresh the index
-                item = (IndexItem)indexList.refreshEntry(item);
-                result = getValue(item);
-                IndexItem prev = indexList.getPrevEntry(item);
-                IndexItem next = indexList.getNextEntry(item);
-                indexList.remove(item);
-                delete(item, prev, next);
-            }
-            return result;
-        } catch (IOException e) {
-            LOG.error("Failed trying to remove key: " + key, e);
-            throw new RuntimeException(e);
-        }
-    }
-
-    public synchronized boolean removeValue(Object o) {
-        load();
-        boolean result = false;
-        if (o != null) {
-            IndexItem item = indexList.getFirst();
-            while (item != null) {
-                Object value = getValue(item);
-                if (value != null && value.equals(o)) {
-                    result = true;
-                    // find the key
-                    Object key = getKey(item);
-                    if (key != null) {
-                        remove(key);
-                    }
-                    break;
-                }
-                item = indexList.getNextEntry(item);
-            }
-        }
-        return result;
-    }
-
-    protected synchronized void remove(IndexItem item) {
-        Object key = getKey(item);
-        if (key != null) {
-            remove(key);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.MapContainer#clear()
-     */
-    public synchronized void clear() {
-        checkClosed();
-        loaded = true;
-        init();
-        if (index != null) {
-            try {
-                index.clear();
-            } catch (IOException e) {
-                LOG.error("Failed trying clear index", e);
-                throw new RuntimeException(e);
-            }
-        }
-        super.clear();
-        doClear();
-    }
-
-    /**
-     * Add an entry to the Store Map
-     * 
-     * @param key
-     * @param value
-     * @return the StoreEntry associated with the entry
-     */
-    public synchronized StoreEntry place(Object key, Object value) {
-        load();
-        try {
-            remove(key);
-            IndexItem item = write(key, value);
-            index.store(key, item);
-            indexList.add(item);
-            return item;
-        } catch (IOException e) {
-            LOG.error("Failed trying to place key: " + key, e);
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Remove an Entry from ther Map
-     * 
-     * @param entry
-     * @throws IOException
-     */
-    public synchronized void remove(StoreEntry entry) {
-        load();
-        IndexItem item = (IndexItem)entry;
-        if (item != null) {
-            Object key = getKey(item);
-            try {
-                index.remove(key);
-            } catch (IOException e) {
-                LOG.error("Failed trying to remove entry: " + entry, e);
-                throw new RuntimeException(e);
-            }
-            IndexItem prev = indexList.getPrevEntry(item);
-            IndexItem next = indexList.getNextEntry(item);
-            indexList.remove(item);
-            delete(item, prev, next);
-        }
-    }
-
-    public synchronized StoreEntry getFirst() {
-        load();
-        return indexList.getFirst();
-    }
-
-    public synchronized StoreEntry getLast() {
-        load();
-        return indexList.getLast();
-    }
-
-    public synchronized StoreEntry getNext(StoreEntry entry) {
-        load();
-        IndexItem item = (IndexItem)entry;
-        return indexList.getNextEntry(item);
-    }
-
-    public synchronized StoreEntry getPrevious(StoreEntry entry) {
-        load();
-        IndexItem item = (IndexItem)entry;
-        return indexList.getPrevEntry(item);
-    }
-
-    public synchronized StoreEntry refresh(StoreEntry entry) {
-        load();
-        return indexList.getEntry(entry);
-    }
-
-    /**
-     * Get the value from it's location
-     * 
-     * @param item
-     * @return the value associated with the store entry
-     */
-    public synchronized Object getValue(StoreEntry item) {
-        load();
-        Object result = null;
-        if (item != null) {
-            try {
-                // ensure this value is up to date
-                // item=indexList.getEntry(item);
-                StoreLocation data = item.getValueDataItem();
-                result = dataManager.readItem(valueMarshaller, data);
-            } catch (IOException e) {
-                LOG.error("Failed to get value for " + item, e);
-                throw new RuntimeStoreException(e);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Get the Key object from it's location
-     * 
-     * @param item
-     * @return the Key Object associated with the StoreEntry
-     */
-    public synchronized Object getKey(StoreEntry item) {
-        load();
-        Object result = null;
-        if (item != null) {
-            try {
-                StoreLocation data = item.getKeyDataItem();
-                result = dataManager.readItem(keyMarshaller, data);
-            } catch (IOException e) {
-                LOG.error("Failed to get key for " + item, e);
-                throw new RuntimeStoreException(e);
-            }
-        }
-        return result;
-    }
-
-    protected IndexLinkedList getItemList() {
-        return indexList;
-    }
-
-    protected synchronized IndexItem write(Object key, Object value) {
-        IndexItem index = null;
-        try {
-            index = indexManager.createNewIndex();
-            StoreLocation data = dataManager.storeDataItem(keyMarshaller, key);
-            index.setKeyData(data);
-
-            if (value != null) {
-                data = dataManager.storeDataItem(valueMarshaller, value);
-                index.setValueData(data);
-            }
-            IndexItem prev = indexList.getLast();
-            prev = prev != null ? prev : indexList.getRoot();
-            IndexItem next = indexList.getNextEntry(prev);
-            prev.setNextItem(index.getOffset());
-            index.setPreviousItem(prev.getOffset());
-            updateIndexes(prev);
-            if (next != null) {
-                next.setPreviousItem(index.getOffset());
-                index.setNextItem(next.getOffset());
-                updateIndexes(next);
-            }
-            storeIndex(index);
-        } catch (IOException e) {
-            LOG.error("Failed to write " + key + " , " + value, e);
-            throw new RuntimeStoreException(e);
-        }
-        return index;
-    }
-
-    public int getIndexBinSize() {
-        return indexBinSize;
-    }
-
-    public void setIndexBinSize(int indexBinSize) {
-        this.indexBinSize = indexBinSize;
-    }
-
-    public int getIndexKeySize() {
-        return indexKeySize;
-    }
-
-    public void setIndexKeySize(int indexKeySize) {
-        this.indexKeySize = indexKeySize;
-    }
-
-    public int getIndexPageSize() {
-        return indexPageSize;
-    }
-
-    public void setIndexPageSize(int indexPageSize) {
-        this.indexPageSize = indexPageSize;
-    }
-    
-    public int getIndexLoadFactor() {
-        return indexLoadFactor;
-    }
-
-    public void setIndexLoadFactor(int loadFactor) {
-        this.indexLoadFactor = loadFactor;
-    }
-
-  
-    public IndexMBean getIndexMBean() {
-      return (IndexMBean) index;
-    }
-    public int getIndexMaxBinSize() {
-        return indexMaxBinSize;
-    }
-
-    public void setIndexMaxBinSize(int maxBinSize) {
-        this.indexMaxBinSize = maxBinSize;
-    }
-   
-
-   
-    public String toString() {
-        load();
-        StringBuffer buf = new StringBuffer();
-        buf.append("{");
-        Iterator i = entrySet().iterator();
-        boolean hasNext = i.hasNext();
-        while (hasNext) {
-            Map.Entry e = (Entry) i.next();
-            Object key = e.getKey();
-            Object value = e.getValue();
-            buf.append(key);
-            buf.append("=");
-
-            buf.append(value);
-            hasNext = i.hasNext();
-            if (hasNext)
-                buf.append(", ");
-        }
-        buf.append("}");
-        return buf.toString();
-    }    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/package.html
deleted file mode 100755
index 5ce9b78..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Map and List container implementations for Kaha
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataFile.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataFile.java
deleted file mode 100644
index 62caaf7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataFile.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.kaha.impl.data;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-/**
- * DataFile
- * 
- * 
- */
-class DataFile {
-
-    private final File file;
-    private final Integer number;
-    private int referenceCount;
-    private RandomAccessFile randomAcessFile;
-    private Object writerData;
-    private long length;
-    private boolean dirty;
-
-    DataFile(File file, int number) {
-        this.file = file;
-        this.number = Integer.valueOf(number);
-        length = file.exists() ? file.length() : 0;
-    }
-
-    Integer getNumber() {
-        return number;
-    }
-
-    synchronized RandomAccessFile getRandomAccessFile() throws FileNotFoundException {
-        if (randomAcessFile == null) {
-            randomAcessFile = new RandomAccessFile(file, "rw");
-        }
-        return randomAcessFile;
-    }
-
-    synchronized long getLength() {
-        return length;
-    }
-
-    synchronized void incrementLength(int size) {
-        length += size;
-    }
-
-    synchronized void purge() throws IOException {
-        if (randomAcessFile != null) {
-            randomAcessFile.close();
-            randomAcessFile = null;
-        }
-    }
-
-    synchronized boolean delete() throws IOException {
-        purge();
-        return file.delete();
-    }
-
-    synchronized void close() throws IOException {
-        if (randomAcessFile != null) {
-            randomAcessFile.close();
-        }
-    }
-
-    synchronized int increment() {
-        return ++referenceCount;
-    }
-
-    synchronized int decrement() {
-        return --referenceCount;
-    }
-
-    synchronized boolean isUnused() {
-        return referenceCount <= 0;
-    }
-
-    public String toString() {
-        String result = file.getName() + " number = " + number + " , length = " + length + " refCount = " + referenceCount;
-        return result;
-    }
-
-    /**
-     * @return Opaque data that a DataFileWriter may want to associate with the
-     *         DataFile.
-     */
-    public synchronized Object getWriterData() {
-        return writerData;
-    }
-
-    /**
-     * @param writerData - Opaque data that a DataFileWriter may want to
-     *                associate with the DataFile.
-     */
-    public synchronized void setWriterData(Object writerData) {
-        this.writerData = writerData;
-        dirty = true;
-    }
-
-    public synchronized boolean isDirty() {
-        return dirty;
-    }
-
-    public synchronized void setDirty(boolean value) {
-        this.dirty = value;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataItem.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataItem.java
deleted file mode 100755
index 0970da9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataItem.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.kaha.impl.data;
-
-import org.apache.activemq.kaha.StoreLocation;
-
-/**
- * A a wrapper for a data in the store
- * 
- * 
- */
-public final class DataItem implements Item, StoreLocation {
-
-    private int file = (int)POSITION_NOT_SET;
-    private long offset = POSITION_NOT_SET;
-    private int size;
-
-    public DataItem() {
-    }
-
-    DataItem(DataItem item) {
-        this.file = item.file;
-        this.offset = item.offset;
-        this.size = item.size;
-    }
-
-    boolean isValid() {
-        return file != POSITION_NOT_SET;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreLocation#getSize()
-     */
-    public int getSize() {
-        return size;
-    }
-
-    /**
-     * @param size The size to set.
-     */
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreLocation#getOffset()
-     */
-    public long getOffset() {
-        return offset;
-    }
-
-    /**
-     * @param offset The offset to set.
-     */
-    public void setOffset(long offset) {
-        this.offset = offset;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreLocation#getFile()
-     */
-    public int getFile() {
-        return file;
-    }
-
-    /**
-     * @param file The file to set.
-     */
-    public void setFile(int file) {
-        this.file = file;
-    }
-
-    /**
-     * @return a pretty print
-     */
-    public String toString() {
-        String result = "offset = " + offset + ", file = " + file + ", size = " + size;
-        return result;
-    }
-
-    public DataItem copy() {
-        return new DataItem(this);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java
deleted file mode 100644
index 848b39f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManagerImpl.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/**
- * 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.kaha.impl.data;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.DataManager;
-import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Manages DataFiles
- * 
- * 
- */
-public final class DataManagerImpl implements DataManager {
-
-    public static final int ITEM_HEAD_SIZE = 5; // type + length
-    public static final byte DATA_ITEM_TYPE = 1;
-    public static final byte REDO_ITEM_TYPE = 2;
-    public static final long MAX_FILE_LENGTH = 1024 * 1024 * 32;
-    
-    private static final Logger LOG = LoggerFactory.getLogger(DataManagerImpl.class);
-    private static final String NAME_PREFIX = "data-";
-    
-    private final File directory;
-    private final String name;
-    private SyncDataFileReader reader;
-    private SyncDataFileWriter writer;
-    private DataFile currentWriteFile;
-    private long maxFileLength = MAX_FILE_LENGTH;
-    private Map<Integer, DataFile> fileMap = new HashMap<Integer, DataFile>();
-    private Marshaller redoMarshaller = RedoStoreIndexItem.MARSHALLER;
-    private String dataFilePrefix;
-    private final AtomicLong storeSize;
-
-    public DataManagerImpl(File dir, final String name,AtomicLong storeSize) {
-        this.directory = dir;
-        this.name = name;
-        this.storeSize=storeSize;
-
-        dataFilePrefix = IOHelper.toFileSystemSafeName(NAME_PREFIX + name + "-");
-        // build up list of current dataFiles
-        File[] files = dir.listFiles(new FilenameFilter() {
-            public boolean accept(File dir, String n) {
-                return dir.equals(directory) && n.startsWith(dataFilePrefix);
-            }
-        });
-        if (files != null) {
-            for (int i = 0; i < files.length; i++) {
-                File file = files[i];
-                String n = file.getName();
-                String numStr = n.substring(dataFilePrefix.length(), n.length());
-                int num = Integer.parseInt(numStr);
-                DataFile dataFile = new DataFile(file, num);
-                storeSize.addAndGet(dataFile.getLength());
-                fileMap.put(dataFile.getNumber(), dataFile);
-                if (currentWriteFile == null || currentWriteFile.getNumber().intValue() < num) {
-                    currentWriteFile = dataFile;
-                }
-            }
-        }
-    }
-
-    private DataFile createAndAddDataFile(int num) {
-        String fileName = dataFilePrefix + num;
-        File file = new File(directory, fileName);
-        DataFile result = new DataFile(file, num);
-        fileMap.put(result.getNumber(), result);
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#getName()
-     */
-    public String getName() {
-        return name;
-    }
-
-    synchronized DataFile findSpaceForData(DataItem item) throws IOException {
-        if (currentWriteFile == null || ((currentWriteFile.getLength() + item.getSize()) > maxFileLength)) {
-            int nextNum = currentWriteFile != null ? currentWriteFile.getNumber().intValue() + 1 : 1;
-            if (currentWriteFile != null && currentWriteFile.isUnused()) {
-                removeDataFile(currentWriteFile);
-            }
-            currentWriteFile = createAndAddDataFile(nextNum);
-        }
-        item.setOffset(currentWriteFile.getLength());
-        item.setFile(currentWriteFile.getNumber().intValue());
-        int len = item.getSize() + ITEM_HEAD_SIZE;
-        currentWriteFile.incrementLength(len);
-        storeSize.addAndGet(len);
-        return currentWriteFile;
-    }
-
-    DataFile getDataFile(StoreLocation item) throws IOException {
-        Integer key = Integer.valueOf(item.getFile());
-        DataFile dataFile = fileMap.get(key);
-        if (dataFile == null) {
-            LOG.error("Looking for key " + key + " but not found in fileMap: " + fileMap);
-            throw new IOException("Could not locate data file " + NAME_PREFIX + name + "-" + item.getFile());
-        }
-        return dataFile;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#readItem(org.apache.activemq.kaha.Marshaller,
-     *      org.apache.activemq.kaha.StoreLocation)
-     */
-    public synchronized Object readItem(Marshaller marshaller, StoreLocation item) throws IOException {
-        return getReader().readItem(marshaller, item);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#storeDataItem(org.apache.activemq.kaha.Marshaller,
-     *      java.lang.Object)
-     */
-    public synchronized StoreLocation storeDataItem(Marshaller marshaller, Object payload) throws IOException {
-        return getWriter().storeItem(marshaller, payload, DATA_ITEM_TYPE);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#storeRedoItem(java.lang.Object)
-     */
-    public synchronized StoreLocation storeRedoItem(Object payload) throws IOException {
-        return getWriter().storeItem(redoMarshaller, payload, REDO_ITEM_TYPE);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#updateItem(org.apache.activemq.kaha.StoreLocation,
-     *      org.apache.activemq.kaha.Marshaller, java.lang.Object)
-     */
-    public synchronized void updateItem(StoreLocation location, Marshaller marshaller, Object payload)
-        throws IOException {
-        getWriter().updateItem((DataItem)location, marshaller, payload, DATA_ITEM_TYPE);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#recoverRedoItems(org.apache.activemq.kaha.impl.data.RedoListener)
-     */
-    public synchronized void recoverRedoItems(RedoListener listener) throws IOException {
-
-        // Nothing to recover if there is no current file.
-        if (currentWriteFile == null) {
-            return;
-        }
-
-        DataItem item = new DataItem();
-        item.setFile(currentWriteFile.getNumber().intValue());
-        item.setOffset(0);
-        while (true) {
-            byte type;
-            try {
-                type = getReader().readDataItemSize(item);
-            } catch (IOException ignore) {
-                LOG.trace("End of data file reached at (header was invalid): " + item);
-                return;
-            }
-            if (type == REDO_ITEM_TYPE) {
-                // Un-marshal the redo item
-                Object object;
-                try {
-                    object = readItem(redoMarshaller, item);
-                } catch (IOException e1) {
-                    LOG.trace("End of data file reached at (payload was invalid): " + item);
-                    return;
-                }
-                try {
-
-                    listener.onRedoItem(item, object);
-                    // in case the listener is holding on to item references,
-                    // copy it
-                    // so we don't change it behind the listener's back.
-                    item = item.copy();
-
-                } catch (Exception e) {
-                    throw IOExceptionSupport.create("Recovery handler failed: " + e, e);
-                }
-            }
-            // Move to the next item.
-            item.setOffset(item.getOffset() + ITEM_HEAD_SIZE + item.getSize());
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#close()
-     */
-    public synchronized void close() throws IOException {
-        getWriter().close();
-        for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) {
-            DataFile dataFile = i.next();
-            getWriter().force(dataFile);
-            dataFile.close();
-        }
-        fileMap.clear();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#force()
-     */
-    public synchronized void force() throws IOException {
-        for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) {
-            DataFile dataFile = i.next();
-            getWriter().force(dataFile);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#delete()
-     */
-    public synchronized boolean delete() throws IOException {
-        boolean result = true;
-        for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) {
-            DataFile dataFile = i.next();
-            storeSize.addAndGet(-dataFile.getLength());
-            result &= dataFile.delete();
-        }
-        fileMap.clear();
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#addInterestInFile(int)
-     */
-    public synchronized void addInterestInFile(int file) throws IOException {
-        if (file >= 0) {
-            Integer key = Integer.valueOf(file);
-            DataFile dataFile = fileMap.get(key);
-            if (dataFile == null) {
-                dataFile = createAndAddDataFile(file);
-            }
-            addInterestInFile(dataFile);
-        }
-    }
-
-    synchronized void addInterestInFile(DataFile dataFile) {
-        if (dataFile != null) {
-            dataFile.increment();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#removeInterestInFile(int)
-     */
-    public synchronized void removeInterestInFile(int file) throws IOException {
-        if (file >= 0) {
-            Integer key = Integer.valueOf(file);
-            DataFile dataFile = fileMap.get(key);
-            removeInterestInFile(dataFile);
-        }
-    }
-
-    synchronized void removeInterestInFile(DataFile dataFile) throws IOException {
-        if (dataFile != null) {
-           
-            if (dataFile.decrement() <= 0) {
-                if (dataFile != currentWriteFile) {
-                    removeDataFile(dataFile);
-                }
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#consolidateDataFiles()
-     */
-    public synchronized void consolidateDataFiles() throws IOException {
-        List<DataFile> purgeList = new ArrayList<DataFile>();
-        for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) {
-            DataFile dataFile = i.next();
-            if (dataFile.isUnused() && dataFile != currentWriteFile) {
-                purgeList.add(dataFile);
-            }
-        }
-        for (int i = 0; i < purgeList.size(); i++) {
-            DataFile dataFile = purgeList.get(i);
-            removeDataFile(dataFile);
-        }
-    }
-
-    private void removeDataFile(DataFile dataFile) throws IOException {
-        fileMap.remove(dataFile.getNumber());
-        if (writer != null) {
-            writer.force(dataFile);
-        }
-        storeSize.addAndGet(-dataFile.getLength());
-        boolean result = dataFile.delete();
-        LOG.debug("discarding data file " + dataFile + (result ? "successful " : "failed"));
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#getRedoMarshaller()
-     */
-    public Marshaller getRedoMarshaller() {
-        return redoMarshaller;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.IDataManager#setRedoMarshaller(org.apache.activemq.kaha.Marshaller)
-     */
-    public void setRedoMarshaller(Marshaller redoMarshaller) {
-        this.redoMarshaller = redoMarshaller;
-    }
-
-    /**
-     * @return the maxFileLength
-     */
-    public long getMaxFileLength() {
-        return maxFileLength;
-    }
-
-    /**
-     * @param maxFileLength the maxFileLength to set
-     */
-    public void setMaxFileLength(long maxFileLength) {
-        this.maxFileLength = maxFileLength;
-    }
-
-    public String toString() {
-        return "DataManager:(" + NAME_PREFIX + name + ")";
-    }
-
-    public synchronized SyncDataFileReader getReader() {
-        if (reader == null) {
-            reader = createReader();
-        }
-        return reader;
-    }
-
-    protected synchronized SyncDataFileReader createReader() {
-        return new SyncDataFileReader(this);
-    }
-
-    public synchronized void setReader(SyncDataFileReader reader) {
-        this.reader = reader;
-    }
-
-    public synchronized SyncDataFileWriter getWriter() {
-        if (writer == null) {
-            writer = createWriter();
-        }
-        return writer;
-    }
-
-    private SyncDataFileWriter createWriter() {
-        return new SyncDataFileWriter(this);
-    }
-
-    public synchronized void setWriter(SyncDataFileWriter writer) {
-        this.writer = writer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/Item.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/Item.java
deleted file mode 100755
index ab668e4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/Item.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.kaha.impl.data;
-
-/**
- * A a wrapper for a data in the store
- * 
- * 
- */
-public interface Item {
-    long POSITION_NOT_SET = -1;
-    short MAGIC = 31317;
-    int ACTIVE = 22;
-    int FREE = 33;
-    int LOCATION_SIZE = 24;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/RedoListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/RedoListener.java
deleted file mode 100644
index 970fbd5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/RedoListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.kaha.impl.data;
-
-import org.apache.activemq.kaha.StoreLocation;
-
-
-public interface RedoListener {
-
-    void onRedoItem(StoreLocation item, Object object) throws Exception;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/SyncDataFileReader.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/SyncDataFileReader.java
deleted file mode 100644
index 8371a8d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/SyncDataFileReader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.kaha.impl.data;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.util.DataByteArrayInputStream;
-
-/**
- * Optimized Store reader
- * 
- * 
- */
-public final class SyncDataFileReader {
-
-    private DataManagerImpl dataManager;
-    private DataByteArrayInputStream dataIn;
-
-    /**
-     * Construct a Store reader
-     * 
-     * @param fileId
-     */
-    SyncDataFileReader(DataManagerImpl fileManager) {
-        this.dataManager = fileManager;
-        this.dataIn = new DataByteArrayInputStream();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.DataFileReader#readDataItemSize(org.apache.activemq.kaha.impl.data.DataItem)
-     */
-    public synchronized byte readDataItemSize(DataItem item) throws IOException {
-        RandomAccessFile file = dataManager.getDataFile(item).getRandomAccessFile();
-        file.seek(item.getOffset()); // jump to the size field
-        byte rc = file.readByte();
-        item.setSize(file.readInt());
-        return rc;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.DataFileReader#readItem(org.apache.activemq.kaha.Marshaller,
-     *      org.apache.activemq.kaha.StoreLocation)
-     */
-    public synchronized Object readItem(Marshaller marshaller, StoreLocation item) throws IOException {
-        RandomAccessFile file = dataManager.getDataFile(item).getRandomAccessFile();
-
-        // TODO: we could reuse the buffer in dataIn if it's big enough to avoid
-        // allocating byte[] arrays on every readItem.
-        byte[] data = new byte[item.getSize()];
-        file.seek(item.getOffset() + DataManagerImpl.ITEM_HEAD_SIZE);
-        file.readFully(data);
-        dataIn.restart(data);
-        return marshaller.readPayload(dataIn);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/SyncDataFileWriter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/SyncDataFileWriter.java
deleted file mode 100644
index ca39ea5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/SyncDataFileWriter.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.kaha.impl.data;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-
-/**
- * Optimized Store writer. Synchronously marshalls and writes to the data file.
- * Simple but may introduce a bit of contention when put under load.
- * 
- * 
- */
-public final class SyncDataFileWriter {
-
-    private DataByteArrayOutputStream buffer;
-    private DataManagerImpl dataManager;
-
-    /**
-     * Construct a Store writer
-     * 
-     * @param fileId
-     */
-    SyncDataFileWriter(DataManagerImpl fileManager) {
-        this.dataManager = fileManager;
-        this.buffer = new DataByteArrayOutputStream();
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.DataFileWriter#storeItem(org.apache.activemq.kaha.Marshaller,
-     *      java.lang.Object, byte)
-     */
-    public synchronized DataItem storeItem(Marshaller marshaller, Object payload, byte type)
-        throws IOException {
-
-        // Write the packet our internal buffer.
-        buffer.reset();
-        buffer.position(DataManagerImpl.ITEM_HEAD_SIZE);
-        marshaller.writePayload(payload, buffer);
-        int size = buffer.size();
-        int payloadSize = size - DataManagerImpl.ITEM_HEAD_SIZE;
-        buffer.reset();
-        buffer.writeByte(type);
-        buffer.writeInt(payloadSize);
-
-        // Find the position where this item will land at.
-        DataItem item = new DataItem();
-        item.setSize(payloadSize);
-        DataFile dataFile = dataManager.findSpaceForData(item);
-
-        // Now splat the buffer to the file.
-        dataFile.getRandomAccessFile().seek(item.getOffset());
-        dataFile.getRandomAccessFile().write(buffer.getData(), 0, size);
-        dataFile.setWriterData(Boolean.TRUE); // Use as dirty marker..
-
-        dataManager.addInterestInFile(dataFile);
-        return item;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.data.DataFileWriter#updateItem(org.apache.activemq.kaha.StoreLocation,
-     *      org.apache.activemq.kaha.Marshaller, java.lang.Object, byte)
-     */
-    public synchronized void updateItem(DataItem item, Marshaller marshaller, Object payload, byte type)
-        throws IOException {
-        // Write the packet our internal buffer.
-        buffer.reset();
-        buffer.position(DataManagerImpl.ITEM_HEAD_SIZE);
-        marshaller.writePayload(payload, buffer);
-        int size = buffer.size();
-        int payloadSize = size - DataManagerImpl.ITEM_HEAD_SIZE;
-        buffer.reset();
-        buffer.writeByte(type);
-        buffer.writeInt(payloadSize);
-        item.setSize(payloadSize);
-        DataFile dataFile = dataManager.getDataFile(item);
-        RandomAccessFile file = dataFile.getRandomAccessFile();
-        file.seek(item.getOffset());
-        file.write(buffer.getData(), 0, size);
-        dataFile.setWriterData(Boolean.TRUE); // Use as dirty marker..
-    }
-
-    public synchronized void force(DataFile dataFile) throws IOException {
-        // If our dirty marker was set.. then we need to sync
-        if (dataFile.getWriterData() != null && dataFile.isDirty()) {
-            dataFile.getRandomAccessFile().getFD().sync();
-            dataFile.setWriterData(null);
-            dataFile.setDirty(false);
-        }
-    }
-
-    public void close() throws IOException {
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/package.html
deleted file mode 100755
index 0f7342d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Data containers for Kaha. These are rolling data files that are discarded when no longer required
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/BadMagicException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/BadMagicException.java
deleted file mode 100644
index 6a715a5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/BadMagicException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.IOException;
-
-/**
- * Occurs when bad magic occurs in reading a file
- * 
- * 
- */
-public class BadMagicException extends IOException {
-    /**
-     * 
-     */
-    private static final long serialVersionUID = -570930196733067056L;
-
-    /**
-     * Default Constructor
-     * 
-     */
-    public BadMagicException() {
-        super();
-    }
-
-    /**
-     * Construct an Exception with a reason
-     * 
-     * @param s
-     */
-    public BadMagicException(String s) {
-        super(s);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.java
deleted file mode 100755
index e3ae484..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.IOException;
-import org.apache.activemq.kaha.StoreEntry;
-
-/**
- * A linked list used by IndexItems
- * 
- * 
- */
-public class DiskIndexLinkedList implements IndexLinkedList {
-    protected IndexManager indexManager;
-    protected transient IndexItem root;
-    protected transient IndexItem last;
-    protected transient int size;
-
-    /**
-     * Constructs an empty list.
-     */
-    public DiskIndexLinkedList(IndexManager im, IndexItem header) {
-        this.indexManager = im;
-        this.root = header;
-    }
-
-    public synchronized IndexItem getRoot() {
-        return root;
-    }
-
-    public void setRoot(IndexItem e) {
-        this.root = e;
-    }
-
-    /**
-     * Returns the first element in this list.
-     * 
-     * @return the first element in this list.
-     */
-    public synchronized IndexItem getFirst() {
-        if (size == 0) {
-            return null;
-        }
-        return getNextEntry(root);
-    }
-
-    /**
-     * Returns the last element in this list.
-     * 
-     * @return the last element in this list.
-     */
-    public synchronized IndexItem getLast() {
-        if (size == 0) {
-            return null;
-        }
-        if (last != null) {
-            last.next = null;
-            last.setNextItem(IndexItem.POSITION_NOT_SET);
-        }
-        return last;
-    }
-
-    /**
-     * Removes and returns the first element from this list.
-     * 
-     * @return the first element from this list.
-     */
-    public synchronized StoreEntry removeFirst() {
-        if (size == 0) {
-            return null;
-        }
-        IndexItem result = getNextEntry(root);
-        remove(result);
-        return result;
-    }
-
-    /**
-     * Removes and returns the last element from this list.
-     * 
-     * @return the last element from this list.
-     */
-    public synchronized Object removeLast() {
-        if (size == 0) {
-            return null;
-        }
-        StoreEntry result = last;
-        remove(last);
-        return result;
-    }
-
-    /**
-     * Inserts the given element at the beginning of this list.
-     * 
-     * @param o the element to be inserted at the beginning of this list.
-     */
-    public synchronized void addFirst(IndexItem item) {
-        if (size == 0) {
-            last = item;
-        }
-        size++;
-    }
-
-    /**
-     * Appends the given element to the end of this list. (Identical in function
-     * to the <tt>add</tt> method; included only for consistency.)
-     * 
-     * @param o the element to be inserted at the end of this list.
-     */
-    public synchronized void addLast(IndexItem item) {
-        size++;
-        last = item;
-    }
-
-    /**
-     * Returns the number of elements in this list.
-     * 
-     * @return the number of elements in this list.
-     */
-    public synchronized int size() {
-        return size;
-    }
-
-    /**
-     * is the list empty?
-     * 
-     * @return true if there are no elements in the list
-     */
-    public synchronized boolean isEmpty() {
-        return size == 0;
-    }
-
-    /**
-     * Appends the specified element to the end of this list.
-     * 
-     * @param o element to be appended to this list.
-     * @return <tt>true</tt> (as per the general contract of
-     *         <tt>Collection.add</tt>).
-     */
-    public synchronized boolean add(IndexItem item) {
-        addLast(item);
-        return true;
-    }
-
-    /**
-     * Removes all of the elements from this list.
-     */
-    public synchronized void clear() {
-        last = null;
-        size = 0;
-    }
-
-    // Positional Access Operations
-    /**
-     * Returns the element at the specified position in this list.
-     * 
-     * @param index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws IndexOutOfBoundsException if the specified index is is out of
-     *                 range (<tt>index &lt; 0 || index &gt;= size()</tt>).
-     */
-    public synchronized IndexItem get(int index) {
-        return entry(index);
-    }
-
-    /**
-     * Inserts the specified element at the specified position in this list.
-     * Shifts the element currently at that position (if any) and any subsequent
-     * elements to the right (adds one to their indices).
-     * 
-     * @param index index at which the specified element is to be inserted.
-     * @param element element to be inserted.
-     * @throws IndexOutOfBoundsException if the specified index is out of range (<tt>index &lt; 0 || index &gt; size()</tt>).
-     */
-    public synchronized void add(int index, IndexItem element) {
-        if (index == size) {
-            last = element;
-        }
-        size++;
-    }
-
-    /**
-     * Removes the element at the specified position in this list. Shifts any
-     * subsequent elements to the left (subtracts one from their indices).
-     * Returns the element that was removed from the list.
-     * 
-     * @param index the index of the element to removed.
-     * @return the element previously at the specified position.
-     * @throws IndexOutOfBoundsException if the specified index is out of range (<tt>index &lt; 0 || index &gt;= size()</tt>).
-     */
-    public synchronized Object remove(int index) {
-        IndexItem e = entry(index);
-        remove(e);
-        return e;
-    }
-
-    /**
-     * Return the indexed entry.
-     */
-    private IndexItem entry(int index) {
-        if (index < 0 || index >= size) {
-            throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
-        }
-        IndexItem e = root;
-
-        for (int i = 0; i <= index; i++) {
-            e = getNextEntry(e);
-        }
-        if (e != null && last != null && last.equals(e)) {
-            last = e;
-        }
-        return e;
-    }
-
-    // Search Operations
-    /**
-     * Returns the index in this list of the first occurrence of the specified
-     * element, or -1 if the List does not contain this element. More formally,
-     * returns the lowest index i such that
-     * <tt>(o==null ? get(i)==null : o.equals(get(i)))</tt>, or -1 if there
-     * is no such index.
-     * 
-     * @param o element to search for.
-     * @return the index in this list of the first occurrence of the specified
-     *         element, or -1 if the list does not contain this element.
-     */
-    public synchronized int indexOf(StoreEntry o) {
-        int index = 0;
-        if (size > 0) {
-            for (IndexItem e = getNextEntry(root); e != null; e = getNextEntry(e)) {
-                if (o.equals(e)) {
-                    return index;
-                }
-                index++;
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Retrieve the next entry after this entry
-     * 
-     * @param entry
-     * @return next entry
-     */
-    public synchronized IndexItem getNextEntry(IndexItem current) {
-		IndexItem result = null;
-		if (current != null) {
-			current = (IndexItem) refreshEntry(current);
-			if (current.getNextItem() >= 0) {
-				try {
-					result = indexManager.getIndex(current.getNextItem());
-				} catch (IOException e) {
-					throw new RuntimeException("Failed to get next index from "
-							+ indexManager + " for " + current, e);
-				}
-			}
-		}
-		// essential last get's updated consistently
-		if (result != null && last != null && last.equals(result)) {
-			last=result;
-		}
-		return result;
-	}
-
-    /**
-	 * Retrive the prev entry after this entry
-	 * 
-	 * @param entry
-	 * @return prev entry
-	 */
-    public synchronized IndexItem getPrevEntry(IndexItem current) {
-		IndexItem result = null;
-		if (current != null) {
-			if (current.getPreviousItem() >= 0) {
-				current = (IndexItem) refreshEntry(current);
-				try {
-					result = indexManager.getIndex(current.getPreviousItem());
-				} catch (IOException e) {
-					throw new RuntimeException(
-							"Failed to  get current index for " + current, e);
-				}
-			}
-		}
-		// essential root get's updated consistently
-		if (result != null && root != null && root.equals(result)) {
-			return null;
-		}
-		return result;
-	}
-
-    public synchronized StoreEntry getEntry(StoreEntry current) {
-        StoreEntry result = null;
-        if (current != null && current.getOffset() >= 0) {
-            try {
-                result = indexManager.getIndex(current.getOffset());
-            } catch (IOException e) {
-                throw new RuntimeException("Failed to index", e);
-            }
-        }
-        // essential root get's updated consistently
-        if (result != null && root != null && root.equals(result)) {
-            return root;
-        }
-        return result;
-    }
-
-    /**
-     * Update the indexes of a StoreEntry
-     * 
-     * @param current
-     */
-    public synchronized StoreEntry refreshEntry(StoreEntry current) {
-        StoreEntry result = null;
-        if (current != null && current.getOffset() >= 0) {
-            try {
-                result = indexManager.refreshIndex((IndexItem)current);
-            } catch (IOException e) {
-                throw new RuntimeException("Failed to index", e);
-            }
-        }
-        // essential root get's updated consistently
-        if (result != null && root != null && root.equals(result)) {
-            return root;
-        }
-        return result;
-    }
-
-    public synchronized void remove(IndexItem e) {
-        if (e==null || e == root || e.equals(root)) {
-            return;
-        }
-        if (e == last || e.equals(last)) {
-            if (size > 1) {
-                last = (IndexItem)refreshEntry(last);
-                last = getPrevEntry(last);
-            } else {
-                last = null;
-            }
-        }
-        size--;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/Index.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/Index.java
deleted file mode 100644
index 44ff98b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/Index.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.IOException;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreEntry;
-
-/**
- * Simplier than a Map
- * 
- * 
- */
-public interface Index {
-
-    /**
-     * clear the index
-     * 
-     * @throws IOException
-     * 
-     */
-    void clear() throws IOException;
-
-    /**
-     * @param key
-     * @return true if it contains the key
-     * @throws IOException
-     */
-    boolean containsKey(Object key) throws IOException;
-
-    /**
-     * remove the index key
-     * 
-     * @param key
-     * @return StoreEntry removed
-     * @throws IOException
-     */
-    StoreEntry remove(Object key) throws IOException;
-
-    /**
-     * store the key, item
-     * 
-     * @param key
-     * @param entry
-     * @throws IOException
-     */
-    void store(Object key, StoreEntry entry) throws IOException;
-
-    /**
-     * @param key
-     * @return the entry
-     * @throws IOException
-     */
-    StoreEntry get(Object key) throws IOException;
-
-    /**
-     * @return true if the index is transient
-     */
-    boolean isTransient();
-
-    /**
-     * load indexes
-     */
-    void load();
-
-    /**
-     * unload indexes
-     * 
-     * @throws IOException
-     */
-    void unload() throws IOException;
-
-    /**
-     * Set the marshaller for key objects
-     * 
-     * @param marshaller
-     */
-    void setKeyMarshaller(Marshaller marshaller);
-    
-    /**
-     * return the size of the index
-     * @return
-     */
-    int getSize();
-
-    /**
-     * delete all state associated with the index
-     *
-     * @throws IOException
-     */
-    void delete() throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexItem.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexItem.java
deleted file mode 100755
index d21d87a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexItem.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.StoreLocation;
-import org.apache.activemq.kaha.impl.data.DataItem;
-import org.apache.activemq.kaha.impl.data.Item;
-
-/**
- * A an Item with a relative position and location to other Items in the Store
- * 
- * 
- */
-public class IndexItem implements Item, StoreEntry {
-
-    public static final int INDEX_SIZE = 51;
-    public static final int INDEXES_ONLY_SIZE = 19;
-
-    protected long offset = POSITION_NOT_SET;
-
-    // used by linked list
-    IndexItem next;
-    IndexItem prev;
-
-    private long previousItem = POSITION_NOT_SET;
-    private long nextItem = POSITION_NOT_SET;
-    private boolean active = true;
-
-    // TODO: consider just using a DataItem for the following fields.
-    private long keyOffset = POSITION_NOT_SET;
-    private int keyFile = (int)POSITION_NOT_SET;
-    private int keySize;
-
-    private long valueOffset = POSITION_NOT_SET;
-    private int valueFile = (int)POSITION_NOT_SET;
-    private int valueSize;
-
-    /**
-     * Default Constructor
-     */
-    public IndexItem() {
-    }
-
-    void reset() {
-        previousItem = POSITION_NOT_SET;
-        nextItem = POSITION_NOT_SET;
-        keyOffset = POSITION_NOT_SET;
-        keyFile = (int)POSITION_NOT_SET;
-        keySize = 0;
-        valueOffset = POSITION_NOT_SET;
-        valueFile = (int)POSITION_NOT_SET;
-        valueSize = 0;
-        active = true;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getKeyDataItem()
-     */
-    public StoreLocation getKeyDataItem() {
-        DataItem result = new DataItem();
-        result.setOffset(keyOffset);
-        result.setFile(keyFile);
-        result.setSize(keySize);
-        return result;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getValueDataItem()
-     */
-    public StoreLocation getValueDataItem() {
-        DataItem result = new DataItem();
-        result.setOffset(valueOffset);
-        result.setFile(valueFile);
-        result.setSize(valueSize);
-        return result;
-    }
-
-    public void setValueData(StoreLocation item) {
-        valueOffset = item.getOffset();
-        valueFile = item.getFile();
-        valueSize = item.getSize();
-    }
-
-    public void setKeyData(StoreLocation item) {
-        keyOffset = item.getOffset();
-        keyFile = item.getFile();
-        keySize = item.getSize();
-    }
-
-    /**
-     * @param dataOut
-     * @throws IOException
-     */
-    public void write(DataOutput dataOut) throws IOException {
-        dataOut.writeShort(MAGIC);
-        dataOut.writeBoolean(active);
-        dataOut.writeLong(previousItem);
-        dataOut.writeLong(nextItem);
-        dataOut.writeInt(keyFile);
-        dataOut.writeLong(keyOffset);
-        dataOut.writeInt(keySize);
-        dataOut.writeInt(valueFile);
-        dataOut.writeLong(valueOffset);
-        dataOut.writeInt(valueSize);
-    }
-
-    void updateIndexes(DataOutput dataOut) throws IOException {
-        dataOut.writeShort(MAGIC);
-        dataOut.writeBoolean(active);
-        dataOut.writeLong(previousItem);
-        dataOut.writeLong(nextItem);
-    }
-
-    /**
-     * @param dataIn
-     * @throws IOException
-     */
-    public void read(DataInput dataIn) throws IOException {
-        if (dataIn.readShort() != MAGIC) {
-            throw new BadMagicException();
-        }
-        active = dataIn.readBoolean();
-        previousItem = dataIn.readLong();
-        nextItem = dataIn.readLong();
-        keyFile = dataIn.readInt();
-        keyOffset = dataIn.readLong();
-        keySize = dataIn.readInt();
-        valueFile = dataIn.readInt();
-        valueOffset = dataIn.readLong();
-        valueSize = dataIn.readInt();
-    }
-
-    void readIndexes(DataInput dataIn) throws IOException {
-        if (dataIn.readShort() != MAGIC) {
-            throw new BadMagicException();
-        }
-        active = dataIn.readBoolean();
-        previousItem = dataIn.readLong();
-        nextItem = dataIn.readLong();
-    }
-
-    /**
-     * @param newPrevEntry
-     */
-    public void setPreviousItem(long newPrevEntry) {
-        previousItem = newPrevEntry;
-    }
-
-    /**
-     * @return prev item
-     */
-    long getPreviousItem() {
-        return previousItem;
-    }
-
-    /**
-     * @param newNextEntry
-     */
-    public void setNextItem(long newNextEntry) {
-        nextItem = newNextEntry;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getNextItem()
-     */
-    public long getNextItem() {
-        return nextItem;
-    }
-
-    /**
-     * @param newObjectOffset
-     */
-    void setKeyOffset(long newObjectOffset) {
-        keyOffset = newObjectOffset;
-    }
-
-    /**
-     * @return key offset
-     */
-    long getKeyOffset() {
-        return keyOffset;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getKeyFile()
-     */
-    public int getKeyFile() {
-        return keyFile;
-    }
-
-    /**
-     * @param keyFile The keyFile to set.
-     */
-    void setKeyFile(int keyFile) {
-        this.keyFile = keyFile;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getValueFile()
-     */
-    public int getValueFile() {
-        return valueFile;
-    }
-
-    /**
-     * @param valueFile The valueFile to set.
-     */
-    void setValueFile(int valueFile) {
-        this.valueFile = valueFile;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getValueOffset()
-     */
-    public long getValueOffset() {
-        return valueOffset;
-    }
-
-    /**
-     * @param valueOffset The valueOffset to set.
-     */
-    public void setValueOffset(long valueOffset) {
-        this.valueOffset = valueOffset;
-    }
-
-    /**
-     * @return Returns the active.
-     */
-    boolean isActive() {
-        return active;
-    }
-
-    /**
-     * @param active The active to set.
-     */
-    void setActive(boolean active) {
-        this.active = active;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getOffset()
-     */
-    public long getOffset() {
-        return offset;
-    }
-
-    /**
-     * @param offset The offset to set.
-     */
-    public void setOffset(long offset) {
-        this.offset = offset;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getKeySize()
-     */
-    public int getKeySize() {
-        return keySize;
-    }
-
-    public void setKeySize(int keySize) {
-        this.keySize = keySize;
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.kaha.StoreEntry#getValueSize()
-     */
-    public int getValueSize() {
-        return valueSize;
-    }
-
-    public void setValueSize(int valueSize) {
-        this.valueSize = valueSize;
-    }
-    
-    void copyIndex(IndexItem other) {
-        this.offset=other.offset;
-        this.active=other.active;
-        this.previousItem=other.previousItem;
-        this.nextItem=other.nextItem;
-    }
-
-    /**
-     * @return print of 'this'
-     */
-    public String toString() {
-        String result = "offset=" + offset + ", key=(" + keyFile + ", " + keyOffset + ", " + keySize + ")" + ", value=(" + valueFile + ", " + valueOffset + ", " + valueSize + ")"
-                        + ", previousItem=" + previousItem + ", nextItem=" + nextItem;
-        return result;
-    }
-
-    public boolean equals(Object obj) {
-        boolean result = obj == this;
-        if (!result && obj != null && obj instanceof IndexItem) {
-            IndexItem other = (IndexItem)obj;
-            result = other.offset == this.offset;
-        }
-        return result;
-    }
-
-    public int hashCode() {
-        return (int)offset;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexLinkedList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexLinkedList.java
deleted file mode 100644
index 34d75b2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexLinkedList.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import org.apache.activemq.kaha.StoreEntry;
-
-/**
- * Inteface to LinkedList of Indexes
- * 
- * 
- */
-public interface IndexLinkedList {
-    
-    /**
-     * Set the new Root
-     * @param newRoot
-     */
-    void setRoot(IndexItem newRoot);
-
-    /**
-     * @return the root used by the List
-     */
-    IndexItem getRoot();
-
-    /**
-     * Returns the first element in this list.
-     * 
-     * @return the first element in this list.
-     */
-    IndexItem getFirst();
-
-    /**
-     * Returns the last element in this list.
-     * 
-     * @return the last element in this list.
-     */
-    IndexItem getLast();
-
-    /**
-     * Removes and returns the first element from this list.
-     * 
-     * @return the first element from this list.
-     */
-    StoreEntry removeFirst();
-
-    /**
-     * Removes and returns the last element from this list.
-     * 
-     * @return the last element from this list.
-     */
-    Object removeLast();
-
-    /**
-     * Inserts the given element at the beginning of this list.
-     * 
-     * @param item
-     */
-    void addFirst(IndexItem item);
-
-    /**
-     * Appends the given element to the end of this list. (Identical in function
-     * to the <tt>add</tt> method; included only for consistency.)
-     * 
-     * @param item
-     */
-    void addLast(IndexItem item);
-
-    /**
-     * Returns the number of elements in this list.
-     * 
-     * @return the number of elements in this list.
-     */
-    int size();
-
-    /**
-     * is the list empty?
-     * 
-     * @return true if there are no elements in the list
-     */
-    boolean isEmpty();
-
-    /**
-     * Appends the specified element to the end of this list.
-     * 
-     * @param item
-     * 
-     * @return <tt>true</tt> (as per the general contract of
-     *         <tt>Collection.add</tt>).
-     */
-    boolean add(IndexItem item);
-
-    /**
-     * Removes all of the elements from this list.
-     */
-    void clear();
-
-    // Positional Access Operations
-    /**
-     * Returns the element at the specified position in this list.
-     * 
-     * @param index index of element to return.
-     * @return the element at the specified position in this list.
-     * 
-     * @throws IndexOutOfBoundsException if the specified index is is out of
-     *                 range (<tt>index &lt; 0 || index &gt;= size()</tt>).
-     */
-    IndexItem get(int index);
-
-    /**
-     * Inserts the specified element at the specified position in this list.
-     * Shifts the element currently at that position (if any) and any subsequent
-     * elements to the right (adds one to their indices).
-     * 
-     * @param index index at which the specified element is to be inserted.
-     * @param element element to be inserted.
-     * 
-     * @throws IndexOutOfBoundsException if the specified index is out of range (<tt>index &lt; 0 || index &gt; size()</tt>).
-     */
-    void add(int index, IndexItem element);
-
-    /**
-     * Removes the element at the specified position in this list. Shifts any
-     * subsequent elements to the left (subtracts one from their indices).
-     * Returns the element that was removed from the list.
-     * 
-     * @param index the index of the element to removed.
-     * @return the element previously at the specified position.
-     * 
-     * @throws IndexOutOfBoundsException if the specified index is out of range (<tt>index &lt; 0 || index &gt;= size()</tt>).
-     */
-    Object remove(int index);
-
-    // Search Operations
-    /**
-     * Returns the index in this list of the first occurrence of the specified
-     * element, or -1 if the List does not contain this element. More formally,
-     * returns the lowest index i such that
-     * <tt>(o==null ? get(i)==null : o.equals(get(i)))</tt>, or -1 if there
-     * is no such index.
-     * 
-     * @param o element to search for.
-     * @return the index in this list of the first occurrence of the specified
-     *         element, or -1 if the list does not contain this element.
-     */
-    int indexOf(StoreEntry o);
-
-    /**
-     * Retrieve the next entry after this entry
-     * 
-     * @param entry
-     * @return next entry
-     */
-    IndexItem getNextEntry(IndexItem entry);
-
-    /**
-     * Retrive the prev entry after this entry
-     * 
-     * @param entry
-     * @return prev entry
-     */
-    IndexItem getPrevEntry(IndexItem entry);
-
-    /**
-     * remove an entry
-     * 
-     * @param e
-     */
-    void remove(IndexItem e);
-
-    /**
-     * Ensure we have the up to date entry
-     * 
-     * @param entry
-     * @return the entry
-     */
-    StoreEntry getEntry(StoreEntry entry);
-
-    /**
-     * Update the indexes of a StoreEntry
-     * 
-     * @param current
-     * @return update StoreEntry
-     */
-    StoreEntry refreshEntry(StoreEntry current);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
deleted file mode 100644
index da50014..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileLock;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.kaha.impl.DataManager;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Optimized Store reader
- * 
- * 
- */
-public final class IndexManager {
-
-    public static final String NAME_PREFIX = "index-";
-    private static final Logger LOG = LoggerFactory.getLogger(IndexManager.class);
-    private final String name;
-    private File directory;
-    private File file;
-    private RandomAccessFile indexFile;
-    private StoreIndexReader reader;
-    private StoreIndexWriter writer;
-    private DataManager redoLog;
-    private String mode;
-    private long length;
-    private IndexItem firstFree;
-    private IndexItem lastFree;
-    private boolean dirty;
-    private final AtomicLong storeSize;
-    private int freeSize = 0;
-
-    public IndexManager(File directory, String name, String mode, DataManager redoLog, AtomicLong storeSize) throws IOException {
-        this.directory = directory;
-        this.name = name;
-        this.mode = mode;
-        this.redoLog = redoLog;
-        this.storeSize=storeSize;
-        initialize();
-    }
-
-    public synchronized boolean isEmpty() {
-        return lastFree == null && length == 0;
-    }
-
-    public synchronized IndexItem getIndex(long offset) throws IOException {
-        IndexItem result = null;
-        if (offset >= 0) {
-            result = reader.readItem(offset);
-        }
-        return result;
-    }
-
-    public synchronized IndexItem refreshIndex(IndexItem item) throws IOException {
-        reader.updateIndexes(item);
-        return item;
-    }
-
-    public synchronized void freeIndex(IndexItem item) throws IOException {
-        item.reset();
-        item.setActive(false);
-        if (lastFree == null) {
-            firstFree = item;
-            lastFree = item;
-        } else {
-            lastFree.setNextItem(item.getOffset());
-            if (lastFree.equals(firstFree)) {
-                firstFree=new IndexItem();
-                firstFree.copyIndex(lastFree);
-                writer.updateIndexes(firstFree);
-            }
-            writer.updateIndexes(lastFree);
-            lastFree=item;
-        }
-        writer.updateIndexes(item);
-        freeSize++;
-        dirty = true;
-    }
-
-    public synchronized void storeIndex(IndexItem index) throws IOException {
-        writer.storeItem(index);
-        dirty = true;
-    }
-
-    public synchronized void updateIndexes(IndexItem index) throws IOException {
-        try {
-            writer.updateIndexes(index);
-        } catch (Throwable e) {
-            LOG.error(name + " error updating indexes ", e);
-        }
-        dirty = true;
-    }
-
-    public synchronized void redo(final RedoStoreIndexItem redo) throws IOException {
-        writer.redoStoreItem(redo);
-        dirty = true;
-    }
-
-    public synchronized IndexItem createNewIndex() throws IOException {
-        IndexItem result = getNextFreeIndex();
-        if (result == null) {
-            // allocate one
-            result = new IndexItem();
-            result.setOffset(length);
-            length += IndexItem.INDEX_SIZE;
-            storeSize.addAndGet(IndexItem.INDEX_SIZE);
-        }
-        return result;
-    }
-
-    public synchronized void close() throws IOException {
-        if (indexFile != null) {
-            indexFile.close();
-            indexFile = null;
-        }
-    }
-
-    public synchronized void force() throws IOException {
-        if (indexFile != null && dirty) {
-            indexFile.getFD().sync();
-            dirty = false;
-        }
-    }
-
-    public synchronized boolean delete() throws IOException {
-        firstFree = null;
-        lastFree = null;
-        if (indexFile != null) {
-            indexFile.close();
-            indexFile = null;
-        }
-        return file.delete();
-    }
-
-    private synchronized IndexItem getNextFreeIndex() throws IOException {
-        IndexItem result = null;
-        if (firstFree != null) {
-            if (firstFree.equals(lastFree)) {
-                result = firstFree;
-                firstFree = null;
-                lastFree = null;
-            } else {
-                result = firstFree;
-                firstFree = getIndex(firstFree.getNextItem());
-                if (firstFree == null) {
-                    lastFree = null;
-                }
-            }
-            result.reset();
-            writer.updateIndexes(result);
-            freeSize--;
-        }
-        return result;
-    }
-
-    synchronized long getLength() {
-        return length;
-    }
-    
-    public final long size() {
-        return length;
-    }
-
-    public synchronized void setLength(long value) {
-        this.length = value;
-        storeSize.addAndGet(length);
-    }
-    
-    public synchronized FileLock getLock() throws IOException {
-        return indexFile.getChannel().tryLock(0, indexFile.getChannel().size(), false);
-    }
-
-
-    public String toString() {
-        return "IndexManager:(" + NAME_PREFIX + name + ")";
-    }
-
-    protected void initialize() throws IOException {
-        file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name) );
-        IOHelper.mkdirs(file.getParentFile());        
-        indexFile = new RandomAccessFile(file, mode);
-        reader = new StoreIndexReader(indexFile);
-        writer = new StoreIndexWriter(indexFile, name, redoLog);
-        long offset = 0;
-        while ((offset + IndexItem.INDEX_SIZE) <= indexFile.length()) {
-            IndexItem index = reader.readItem(offset);
-            if (!index.isActive()) {
-                index.reset();
-                if (lastFree != null) {
-                    lastFree.setNextItem(index.getOffset());
-                    updateIndexes(lastFree);
-                    lastFree = index;
-                } else {
-                    lastFree = index;
-                    firstFree = index;
-                }
-               freeSize++;
-            }
-            offset += IndexItem.INDEX_SIZE;
-        }
-        length = offset;
-        storeSize.addAndGet(length);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/RedoStoreIndexItem.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/RedoStoreIndexItem.java
deleted file mode 100644
index c1762fc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/RedoStoreIndexItem.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-import org.apache.activemq.kaha.Marshaller;
-
-public class RedoStoreIndexItem implements Externalizable {
-
-    public static final Marshaller MARSHALLER = new Marshaller() {
-        public Object readPayload(DataInput in) throws IOException {
-            RedoStoreIndexItem item = new RedoStoreIndexItem();
-            item.readExternal(in);
-            return item;
-        }
-
-        public void writePayload(Object object, DataOutput out) throws IOException {
-            RedoStoreIndexItem item = (RedoStoreIndexItem)object;
-            item.writeExternal(out);
-        }
-    };
-
-    private static final long serialVersionUID = -4865508871719676655L;
-    private String indexName;
-    private IndexItem indexItem;
-    private long offset;
-
-    public RedoStoreIndexItem() {
-    }
-
-    public RedoStoreIndexItem(String indexName, long offset, IndexItem item) {
-        this.indexName = indexName;
-        this.offset = offset;
-        this.indexItem = item;
-    }
-
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        readExternal((DataInput)in);
-    }
-
-    public void readExternal(DataInput in) throws IOException {
-        // indexName = in.readUTF();
-        offset = in.readLong();
-        indexItem = new IndexItem();
-        indexItem.read(in);
-    }
-
-    public void writeExternal(ObjectOutput out) throws IOException {
-        writeExternal((DataOutput)out);
-    }
-
-    public void writeExternal(DataOutput out) throws IOException {
-        // out.writeUTF(indexName);
-        out.writeLong(offset);
-        indexItem.write(out);
-    }
-
-    public String getIndexName() {
-        return indexName;
-    }
-
-    public void setIndexName(String indexName) {
-        this.indexName = indexName;
-    }
-
-    public IndexItem getIndexItem() {
-        return indexItem;
-    }
-
-    public void setIndexItem(IndexItem item) {
-        this.indexItem = item;
-    }
-
-    public long getOffset() {
-        return offset;
-    }
-
-    public void setOffset(long offset) {
-        this.offset = offset;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/StoreIndexReader.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/StoreIndexReader.java
deleted file mode 100644
index 07c4d7d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/StoreIndexReader.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-import org.apache.activemq.util.DataByteArrayInputStream;
-
-/**
- * Optimized Store reader
- * 
- * 
- */
-class StoreIndexReader {
-    protected RandomAccessFile file;
-    protected DataByteArrayInputStream dataIn;
-    protected byte[] buffer = new byte[IndexItem.INDEX_SIZE];
-
-    /**
-     * Construct a Store reader
-     * 
-     * @param file
-     */
-    StoreIndexReader(RandomAccessFile file) {
-        this.file = file;
-        this.dataIn = new DataByteArrayInputStream();
-    }
-
-    protected IndexItem readItem(long offset) throws IOException {
-        file.seek(offset);
-        file.readFully(buffer);
-        dataIn.restart(buffer);
-        IndexItem result = new IndexItem();
-        result.setOffset(offset);
-        result.read(dataIn);
-        return result;
-    }
-
-    void updateIndexes(IndexItem indexItem) throws IOException {
-        if (indexItem != null) {
-            file.seek(indexItem.getOffset());
-            file.readFully(buffer, 0, IndexItem.INDEXES_ONLY_SIZE);
-            dataIn.restart(buffer);
-            indexItem.readIndexes(dataIn);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/StoreIndexWriter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/StoreIndexWriter.java
deleted file mode 100644
index 29a783b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/StoreIndexWriter.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-import org.apache.activemq.kaha.impl.DataManager;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-
-/**
- * Optimized Store writer
- * 
- * 
- */
-class StoreIndexWriter {
-
-    protected final DataByteArrayOutputStream dataOut = new DataByteArrayOutputStream();
-    protected final RandomAccessFile file;
-    protected final String name;
-    protected final DataManager redoLog;
-
-    /**
-     * Construct a Store index writer
-     * 
-     * @param file
-     */
-    StoreIndexWriter(RandomAccessFile file) {
-        this(file, null, null);
-    }
-
-    public StoreIndexWriter(RandomAccessFile file, String indexName, DataManager redoLog) {
-        this.file = file;
-        this.name = indexName;
-        this.redoLog = redoLog;
-    }
-
-    void storeItem(IndexItem indexItem) throws IOException {
-
-        if (redoLog != null) {
-            RedoStoreIndexItem redo = new RedoStoreIndexItem(name, indexItem.getOffset(), indexItem);
-            redoLog.storeRedoItem(redo);
-        }
-
-        dataOut.reset();
-        indexItem.write(dataOut);
-        file.seek(indexItem.getOffset());
-        file.write(dataOut.getData(), 0, IndexItem.INDEX_SIZE);
-    }
-
-    void updateIndexes(IndexItem indexItem) throws IOException {
-        if (redoLog != null) {
-            RedoStoreIndexItem redo = new RedoStoreIndexItem(name, indexItem.getOffset(), indexItem);
-            redoLog.storeRedoItem(redo);
-        }
-
-        dataOut.reset();
-        indexItem.updateIndexes(dataOut);
-        file.seek(indexItem.getOffset());
-        file.write(dataOut.getData(), 0, IndexItem.INDEXES_ONLY_SIZE);
-    }
-
-    public void redoStoreItem(RedoStoreIndexItem redo) throws IOException {
-        dataOut.reset();
-        redo.getIndexItem().write(dataOut);
-        file.seek(redo.getOffset());
-        file.write(dataOut.getData(), 0, IndexItem.INDEX_SIZE);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndex.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndex.java
deleted file mode 100644
index 709e9b9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndex.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.kaha.IndexMBean;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreEntry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Index implementation using a HashMap
- *
- * 
- */
-public class VMIndex implements Index, IndexMBean {
-    private static final Logger LOG = LoggerFactory.getLogger(VMIndex.class);
-    private IndexManager indexManager;
-    private Map<Object, StoreEntry> map = new HashMap<Object, StoreEntry>();
-
-    public VMIndex(IndexManager manager) {
-        this.indexManager = manager;
-    }
-
-    /**
-     *
-     * @see org.apache.activemq.kaha.impl.index.Index#clear()
-     */
-    public void clear() {
-        map.clear();
-    }
-
-    /**
-     * @param key
-     * @return true if the index contains the key
-     * @see org.apache.activemq.kaha.impl.index.Index#containsKey(java.lang.Object)
-     */
-    public boolean containsKey(Object key) {
-        return map.containsKey(key);
-    }
-
-    /**
-     * @param key
-     * @return store entry
-     * @see org.apache.activemq.kaha.impl.index.Index#removeKey(java.lang.Object)
-     */
-    public StoreEntry remove(Object key) {
-        StoreEntry result = map.remove(key);
-        if (result != null) {
-            try {
-                result = indexManager.refreshIndex((IndexItem)result);
-            } catch (IOException e) {
-                LOG.error("Failed to refresh entry", e);
-                throw new RuntimeException("Failed to refresh entry");
-            }
-        }
-        return result;
-    }
-
-    /**
-     * @param key
-     * @param entry
-     * @see org.apache.activemq.kaha.impl.index.Index#store(java.lang.Object,
-     *      org.apache.activemq.kaha.impl.index.IndexItem)
-     */
-    public void store(Object key, StoreEntry entry) {
-        map.put(key, entry);
-    }
-
-    /**
-     * @param key
-     * @return the entry
-     */
-    public StoreEntry get(Object key) {
-        StoreEntry result = map.get(key);
-        if (result != null) {
-            try {
-                result = indexManager.refreshIndex((IndexItem)result);
-            } catch (IOException e) {
-                LOG.error("Failed to refresh entry", e);
-                throw new RuntimeException("Failed to refresh entry");
-            }
-        }
-        return result;
-    }
-
-    /**
-     * @return true if the index is transient
-     */
-    public boolean isTransient() {
-        return true;
-    }
-
-    /**
-     * load indexes
-     */
-    public void load() {
-    }
-
-    /**
-     * unload indexes
-     */
-    public void unload() {
-        map.clear();
-    }
-
-    public void delete() throws IOException {
-        unload();
-    }
-
-    public void setKeyMarshaller(Marshaller marshaller) {
-    }
-
-    public int getSize() {
-        return map.size();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java
deleted file mode 100755
index d6e6e08..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import org.apache.activemq.kaha.StoreEntry;
-
-/**
- * A linked list used by IndexItems
- * 
- * 
- */
-public final class VMIndexLinkedList implements Cloneable, IndexLinkedList {
-    private transient IndexItem root;
-    private transient int size;
-
-    /**
-     * Constructs an empty list.
-     * @param header 
-     */
-    public VMIndexLinkedList(IndexItem header) {
-        this.root = header;
-        this.root.next=this.root.prev=this.root;
-    }
-    
-    public  void setRoot(IndexItem newRoot) {
-        this.root=newRoot;
-    }
-
-    public synchronized IndexItem getRoot() {
-        return root;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#getFirst()
-     */
-    public synchronized IndexItem getFirst() {
-        if (size == 0) {
-            return null;
-        }
-        return root.next;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#getLast()
-     */
-    public synchronized IndexItem getLast() {
-        if (size == 0) {
-            return null;
-        }
-        return root.prev;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#removeFirst()
-     */
-    public synchronized StoreEntry removeFirst() {
-        if (size == 0) {
-            return null;
-        }
-        StoreEntry result = root.next;
-        remove(root.next);
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#removeLast()
-     */
-    public synchronized Object removeLast() {
-        if (size == 0) {
-            return null;
-        }
-        StoreEntry result = root.prev;
-        remove(root.prev);
-        return result;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#addFirst(org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized void addFirst(IndexItem item) {
-        addBefore(item, root.next);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#addLast(org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized void addLast(IndexItem item) {
-        addBefore(item, root);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#size()
-     */
-    public synchronized int size() {
-        return size;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#isEmpty()
-     */
-    public synchronized boolean isEmpty() {
-        return size == 0;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#add(org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized boolean add(IndexItem item) {
-        addBefore(item, root);
-        return true;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#clear()
-     */
-    public synchronized void clear() {
-        root.next=root.prev=root;
-        size = 0;
-    }
-
-    // Positional Access Operations
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#get(int)
-     */
-    public synchronized IndexItem get(int index) {
-        return entry(index);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#add(int,
-     *      org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized void add(int index, IndexItem element) {
-        addBefore(element, index == size ? root : entry(index));
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#remove(int)
-     */
-    public synchronized Object remove(int index) {
-        IndexItem e = entry(index);
-        remove(e);
-        return e;
-    }
-
-    /**
-     * Return the indexed entry.
-     */
-    private IndexItem entry(int index) {
-        if (index < 0 || index >= size) {
-            throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
-        }
-        IndexItem e = root;
-        if (index < size / 2) {
-            for (int i = 0; i <= index; i++) {
-                e = e.next;
-            }
-        } else {
-            for (int i = size; i > index; i--) {
-                e = e.prev;
-            }
-        }
-        return e;
-    }
-
-    // Search Operations
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#indexOf(org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized int indexOf(StoreEntry o) {
-        int index = 0;
-        for (IndexItem e = root.next; e != root; e = e.next) {
-            if (o == e) {
-                return index;
-            }
-            index++;
-        }
-        return -1;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#getNextEntry(org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized IndexItem getNextEntry(IndexItem entry) {
-        return entry.next != root ? entry.next : null;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#getPrevEntry(org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized IndexItem getPrevEntry(IndexItem entry) {
-        return entry.prev != root ? entry.prev : null;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#addBefore(org.apache.activemq.kaha.impl.IndexItem,
-     *      org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized void addBefore(IndexItem insert, IndexItem e) {
-        insert.next = e;
-        insert.prev = e.prev;
-        insert.prev.next = insert;
-        insert.next.prev = insert;
-        size++;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.kaha.impl.IndexLinkedList#remove(org.apache.activemq.kaha.impl.IndexItem)
-     */
-    public synchronized void remove(IndexItem e) {
-        if (e == root || e.equals(root)) {
-            return;
-        }
-        
-        e.prev.next = e.next;
-        e.next.prev = e.prev;
-        size--;
-    }
-
-    /**
-     * @return clone
-     */
-    public synchronized Object clone() {
-        IndexLinkedList clone = new VMIndexLinkedList(this.root);
-        for (IndexItem e = root.next; e != root; e = e.next) {
-            clone.add(e);
-        }
-        return clone;
-    }
-
-    public synchronized StoreEntry getEntry(StoreEntry current) {
-        return current;
-    }
-
-    /**
-     * Update the indexes of a StoreEntry
-     * 
-     * @param current
-     */
-    public synchronized StoreEntry refreshEntry(StoreEntry current) {
-        return current;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashBin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashBin.java
deleted file mode 100644
index 97d4538..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashBin.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import java.io.IOException;
-
-/**
- * Bin in a HashIndex
- * 
- * 
- */
-class HashBin {
-    private HashIndex hashIndex;
-    private int id;
-    private int maximumEntries;
-    private int size;
-    private int numberOfPages =0;
-    private HashPageInfo root = null;
-    private HashPageInfo tail = null;
-
-    /**
-     * Constructor
-     * 
-     * @param hashIndex
-     * @param id
-     * @param maximumEntries
-     */
-    HashBin(HashIndex hashIndex, int id, int maximumEntries) {
-        this.hashIndex = hashIndex;
-        this.id = id;
-        this.maximumEntries = maximumEntries;
-    }
-
-    public String toString() {
-        return "HashBin[" + getId() + "]";
-    }
-
-    public boolean equals(Object o) {
-        boolean result = false;
-        if (o instanceof HashBin) {
-            HashBin other = (HashBin)o;
-            result = other.id == id;
-        }
-        return result;
-    }
-
-    public int hashCode() {
-        return (int)getId();
-    }
-
-     int  getId() {
-        return id;
-    }
-
-     void setId(int id) {
-        this.id = id;
-    }
-
-     boolean isEmpty() {
-        return true;
-    }
-
-     int getMaximumEntries() {
-        return this.maximumEntries;
-    }
-
-     void setMaximumEntries(int maximumEntries) {
-        this.maximumEntries = maximumEntries;
-    }
-
-     int size() {
-        return size;
-    }
-
-     HashPageInfo addHashPageInfo(long id, int size) throws IOException {
-        HashPageInfo info = new HashPageInfo(hashIndex);
-        info.setId(id);
-        info.setSize(size);
-        if (root == null) {
-            root=info;
-        }else {
-            tail.linkAfter(info);
-        }
-        tail=info;
-        this.numberOfPages++;
-        this.size += size;
-        return info;
-    }
-
-     public HashEntry find(HashEntry key) throws IOException {
-        HashEntry result = null;
-        try {
-            int low = 0;
-            int high = size()-1;
-            while (low <= high) {
-                int mid = (low + high) >> 1;
-                HashEntry te = getHashEntry(mid);
-                int cmp = te.compareTo(key);
-                if (cmp == 0) {
-                    result = te;
-                    break;
-                } else if (cmp < 0) {
-                    low = mid + 1;
-                } else {
-                    high = mid - 1;
-                }
-            }
-        } finally {
-            end();
-        }
-        return result;
-    }
-
-     boolean put(HashEntry newEntry) throws IOException {
-        boolean replace = false;
-        try {
-            int low = 0;
-            int high = size()-1;
-            while (low <= high) {
-                int mid = (low + high) >> 1;
-                HashEntry midVal = getHashEntry(mid);
-                int cmp = midVal.compareTo(newEntry);
-                if (cmp < 0) {
-                    low = mid + 1;
-                } else if (cmp > 0) {
-                    high = mid - 1;
-                } else {
-                    replace = true;
-                    midVal.setIndexOffset(newEntry.getIndexOffset());
-                    break;
-                }
-            }
-            if (!replace) {
-                addHashEntry(low, newEntry);
-                size++;
-            }
-        } finally {
-            end();
-        }
-        return replace;
-    }
-
-     HashEntry remove(HashEntry entry) throws IOException {
-        HashEntry result = null;
-        try {
-            int low = 0;
-            int high = size() - 1;
-            while (low <= high) {
-                int mid = (low + high) >> 1;
-                HashEntry te = getHashEntry(mid);
-                int cmp = te.compareTo(entry);
-                if (cmp == 0) {
-                    result = te;
-                    removeHashEntry(mid);
-                    size--;
-                    break;
-                } else if (cmp < 0) {
-                    low = mid + 1;
-                } else {
-                    high = mid - 1;
-                }
-            }
-        } finally {
-            end();
-        }
-        return result;
-    }
-
-    private void addHashEntry(int index, HashEntry entry) throws IOException {
-        HashPageInfo pageToUse = null;
-        int offset = 0;
-        if (index >= getMaximumBinSize()) {
-            while(index >= getMaximumBinSize()) {
-                HashPage hp = hashIndex.createPage(id);
-                pageToUse = addHashPageInfo(hp.getId(), 0);
-                pageToUse.setPage(hp);
-            }
-            offset = 0;
-        } else {
-            int count = 0;
-            int countSoFar=0;
-            int pageNo = 0;
-            HashPageInfo page = root;
-            while (page != null) {
-                count += page.size();
-                pageToUse=page;
-                if (index < count ) {
-                    offset = index - countSoFar;
-                    break;
-                }
-                if (index == count && page.size()+1 <= maximumEntries) {
-                    offset = page.size();
-                    break;
-                }
-                countSoFar += page.size();
-                pageNo++;
-                page = (HashPageInfo) page.getNext();
-            }
-            while(pageNo >= this.numberOfPages) {
-                HashPage hp  = hashIndex.createPage(id);
-                pageToUse = addHashPageInfo(hp.getId(), 0);               
-            }            
-        }
-        pageToUse.begin();  
-        pageToUse.addHashEntry(offset, entry);
-        doOverFlow(index);
-    }
-
-    private HashEntry removeHashEntry(int index) throws IOException {
-        HashPageInfo page = getRetrievePage(index);
-        int offset = getRetrieveOffset(index);
-        HashEntry result = page.removeHashEntry(offset);
-        
-        if (page.isEmpty()) {
-            if (root.equals(page)) {
-                root=(HashPageInfo) root.getNext();
-            }
-            if (tail.equals(page)) {
-                tail=(HashPageInfo) page.getPrevious();
-            }
-            page.unlink();
-            this.numberOfPages--;
-            hashIndex.releasePage(page.getPage());
-        }
-        doUnderFlow(index);
-        return result;
-    }
-
-    private HashEntry getHashEntry(int index) throws IOException {
-        HashPageInfo page = getRetrievePage(index);
-        page.begin();
-        int offset = getRetrieveOffset(index);
-        HashEntry result = page.getHashEntry(offset);
-        return result;
-    }
-    
-
-    private int getMaximumBinSize() {
-        return maximumEntries * this.numberOfPages;
-    }
-
-    private HashPageInfo getRetrievePage(int index) throws IOException {
-        HashPageInfo result = null;
-        int count = 0;
-        HashPageInfo page = root;
-        while (page != null) {
-            count += page.size();
-            result = page;
-            if (index < count) {
-                break;
-            }
-            page = (HashPageInfo) page.getNext();
-        }
-        
-        result.begin();
-        return result;
-    }
-
-    private int getRetrieveOffset(int index) throws IOException {
-        int result = 0;
-        int count = 0;
-        HashPageInfo page = root;
-        while (page != null) {
-            if ((index + 1) <= (count + page.size())) {
-                result = index - count;
-                break;
-            }
-            count += page.size();
-            page = (HashPageInfo) page.getNext();
-        }
-        return result;
-    }
-
-    private void doOverFlow(int index) throws IOException {
-        HashPageInfo info = getRetrievePage(index);
-        if (info.size() > maximumEntries) {
-            // overflowed
-            info.begin();
-            HashEntry entry = info.removeHashEntry(info.size() - 1);
-            doOverFlow(getNextPage(info), entry);
-        }
-    }
-
-    private void doOverFlow(HashPageInfo next, HashEntry entry) throws IOException {
-        HashPageInfo info = null;
-        if (next == null) {
-            HashPage page = hashIndex.createPage(id);
-            info = addHashPageInfo(page.getId(), 0);
-            info.setPage(page);
-        } else {
-            info = next;
-        }
-        info.begin();
-        info.addHashEntry(0, entry);
-        if (info.size() > maximumEntries) {
-            // overflowed
-            HashEntry overflowed = info.removeHashEntry(info.size() - 1);
-            doOverFlow(getNextPage(info), overflowed);
-        }
-    }
-    
-    private HashPageInfo getNextPage(HashPageInfo start) {
-        return (HashPageInfo) start.getNext();
-    }
-
-    private void doUnderFlow(int index) {
-    }
-
-    String dump() throws IOException {
-        String str = "[" + this.numberOfPages+"]";
-        HashPageInfo page = root;
-        while (page != null) {
-            page.begin();
-            str +=page.dump();
-            page.end();
-            page = (HashPageInfo) page.getNext();
-        }
-        return str;
-    }
-    private void end() throws IOException {
-        HashPageInfo page = root;
-        while (page != null) {
-            page.end();
-            page = (HashPageInfo) page.getNext();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashEntry.java
deleted file mode 100644
index ff41bcb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashEntry.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.kaha.Marshaller;
-
-/**
- * Key and index for DiskBased Hash Index
- * 
- * 
- */
-class HashEntry implements Comparable {
-
-    static final int NOT_SET = -1;
-    private Comparable key;
-    private long indexOffset;
-
-    public int compareTo(Object o) {
-        if (o instanceof HashEntry) {
-            HashEntry other = (HashEntry)o;
-            return key.compareTo(other.key);
-        } else {
-            return key.compareTo(o);
-        }
-    }
-
-    public boolean equals(Object o) {
-        return compareTo(o) == 0;
-    }
-
-    public int hashCode() {
-        return key.hashCode();
-    }
-
-    public String toString() {
-        return "HashEntry(" + key + "," + indexOffset + ")";
-    }
-
-    HashEntry copy() {
-        HashEntry copy = new HashEntry();
-        copy.key = this.key;
-        copy.indexOffset = this.indexOffset;
-        return copy;
-    }
-
-    /**
-     * @return the key
-     */
-    Comparable getKey() {
-        return this.key;
-    }
-
-    /**
-     * @param key the key to set
-     */
-    void setKey(Comparable key) {
-        this.key = key;
-    }
-
-    /**
-     * @return the indexOffset
-     */
-    long getIndexOffset() {
-        return this.indexOffset;
-    }
-
-    /**
-     * @param indexOffset the indexOffset to set
-     */
-    void setIndexOffset(long indexOffset) {
-        this.indexOffset = indexOffset;
-    }
-
-    void write(Marshaller keyMarshaller, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(indexOffset);
-        keyMarshaller.writePayload(key, dataOut);
-    }
-
-    void read(Marshaller keyMarshaller, DataInput dataIn) throws IOException {
-        indexOffset = dataIn.readLong();
-        key = (Comparable)keyMarshaller.readPayload(dataIn);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java
deleted file mode 100644
index fb2ef27..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java
+++ /dev/null
@@ -1,617 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.LinkedList;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.impl.index.Index;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.LRUCache;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * BTree implementation
- * 
- * 
- */
-public class HashIndex implements Index, HashIndexMBean {
-    public static final int DEFAULT_PAGE_SIZE;
-    public static final int DEFAULT_KEY_SIZE;
-    public static final int DEFAULT_BIN_SIZE;
-    public static final int MAXIMUM_CAPACITY;
-    public static final int DEFAULT_LOAD_FACTOR;
-    private static final int LOW_WATER_MARK=1024*16;
-    private static final String NAME_PREFIX = "hash-index-";
-    private static final Logger LOG = LoggerFactory.getLogger(HashIndex.class);
-    private final String name;
-    private File directory;
-    private File file;
-    private RandomAccessFile indexFile;
-    private IndexManager indexManager;
-    private int pageSize = DEFAULT_PAGE_SIZE;
-    private int keySize = DEFAULT_KEY_SIZE;
-    private int numberOfBins = DEFAULT_BIN_SIZE;
-    private int keysPerPage = this.pageSize /this.keySize;
-    private DataByteArrayInputStream dataIn;
-    private DataByteArrayOutputStream dataOut;
-    private byte[] readBuffer;
-    private HashBin[] bins;
-    private Marshaller keyMarshaller;
-    private long length;
-    private LinkedList<HashPage> freeList = new LinkedList<HashPage>();
-    private AtomicBoolean loaded = new AtomicBoolean();
-    private LRUCache<Long, HashPage> pageCache;
-    private boolean enablePageCaching=false;//this is off by default - see AMQ-1667
-    private int pageCacheSize = 10;
-    private int size;
-    private int highestSize=0;
-    private int activeBins;
-    private int threshold;
-    private int maximumCapacity=MAXIMUM_CAPACITY;
-    private int loadFactor=DEFAULT_LOAD_FACTOR;
-    
-    
-    /**
-     * Constructor
-     * 
-     * @param directory
-     * @param name
-     * @param indexManager
-     * @throws IOException
-     */
-    public HashIndex(File directory, String name, IndexManager indexManager) throws IOException {
-        this.directory = directory;
-        this.name = name;
-        this.indexManager = indexManager;
-        openIndexFile();
-        pageCache = new LRUCache<Long, HashPage>(pageCacheSize, pageCacheSize, 0.75f, true);
-    }
-
-    /**
-     * Set the marshaller for key objects
-     * 
-     * @param marshaller
-     */
-    public synchronized void setKeyMarshaller(Marshaller marshaller) {
-        this.keyMarshaller = marshaller;
-    }
-
-    /**
-     * @return the keySize
-     */
-    public synchronized int getKeySize() {
-        return this.keySize;
-    }
-
-    /**
-     * @param keySize the keySize to set
-     */
-    public synchronized void setKeySize(int keySize) {
-        this.keySize = keySize;
-        if (loaded.get()) {
-            throw new RuntimeException("Pages already loaded - can't reset key size");
-        }
-    }
-
-    /**
-     * @return the pageSize
-     */
-    public synchronized int getPageSize() {
-        return this.pageSize;
-    }
-
-    /**
-     * @param pageSize the pageSize to set
-     */
-    public synchronized void setPageSize(int pageSize) {
-        if (loaded.get() && pageSize != this.pageSize) {
-            throw new RuntimeException("Pages already loaded - can't reset page size");
-        }
-        this.pageSize = pageSize;
-    }
-    
-    /**
-     * @return number of bins
-     */
-    public int getNumberOfBins() {
-        return this.numberOfBins;
-    }
-
-    /**
-     * @param numberOfBins
-     */
-    public void setNumberOfBins(int numberOfBins) {
-        if (loaded.get() && numberOfBins != this.numberOfBins) {
-            throw new RuntimeException("Pages already loaded - can't reset bin size");
-        }
-        this.numberOfBins = numberOfBins;
-    }
-
-    /**
-     * @return the enablePageCaching
-     */
-    public synchronized boolean isEnablePageCaching() {
-        return this.enablePageCaching;
-    }
-
-    /**
-     * @param enablePageCaching the enablePageCaching to set
-     */
-    public synchronized void setEnablePageCaching(boolean enablePageCaching) {
-        this.enablePageCaching = enablePageCaching;
-    }
-
-    /**
-     * @return the pageCacheSize
-     */
-    public synchronized int getPageCacheSize() {
-        return this.pageCacheSize;
-    }
-
-    /**
-     * @param pageCacheSize the pageCacheSize to set
-     */
-    public synchronized void setPageCacheSize(int pageCacheSize) {
-        this.pageCacheSize = pageCacheSize;
-        pageCache.setMaxCacheSize(pageCacheSize);
-    }
-
-    public synchronized boolean isTransient() {
-        return false;
-    }
-    
-    /**
-     * @return the threshold
-     */
-    public int getThreshold() {
-        return threshold;
-    }
-
-    /**
-     * @param threshold the threshold to set
-     */
-    public void setThreshold(int threshold) {
-        this.threshold = threshold;
-    }
-
-    /**
-     * @return the loadFactor
-     */
-    public int getLoadFactor() {
-        return loadFactor;
-    }
-
-    /**
-     * @param loadFactor the loadFactor to set
-     */
-    public void setLoadFactor(int loadFactor) {
-        this.loadFactor = loadFactor;
-    }
-    
-    /**
-     * @return the maximumCapacity
-     */
-    public int getMaximumCapacity() {
-        return maximumCapacity;
-    }
-
-    /**
-     * @param maximumCapacity the maximumCapacity to set
-     */
-    public void setMaximumCapacity(int maximumCapacity) {
-        this.maximumCapacity = maximumCapacity;
-    }
-    
-    public synchronized int getSize() {
-        return size;
-    }
-    
-    public synchronized int getActiveBins(){
-        return activeBins;
-    }
-
-    public synchronized void load() {
-        if (loaded.compareAndSet(false, true)) {
-            int capacity = 1;
-            while (capacity < numberOfBins) {
-                capacity <<= 1;
-            }
-            this.bins = new HashBin[capacity];
-            this.numberOfBins=capacity;
-            threshold = calculateThreashold();
-            keysPerPage = pageSize / keySize;
-            dataIn = new DataByteArrayInputStream();
-            dataOut = new DataByteArrayOutputStream(pageSize);
-            readBuffer = new byte[pageSize];
-            try {
-                openIndexFile();
-                if (indexFile.length() > 0) {
-                    doCompress();
-                }
-            } catch (IOException e) {
-                LOG.error("Failed to load index ", e);
-                throw new RuntimeException(e);
-            }
-        }
-    }    
-
-    public synchronized void unload() throws IOException {
-        if (loaded.compareAndSet(true, false)) {
-            if (indexFile != null) {
-                indexFile.close();
-                indexFile = null;
-                freeList.clear();
-                pageCache.clear();
-                bins = new HashBin[bins.length];
-            }
-        }
-    }
-
-    public synchronized void store(Object key, StoreEntry value) throws IOException {
-        load();
-        HashEntry entry = new HashEntry();
-        entry.setKey((Comparable)key);
-        entry.setIndexOffset(value.getOffset());
-        if (!getBin(key).put(entry)) {
-            this.size++;
-        }
-        if (this.size >= this.threshold) {
-            resize(2*bins.length);
-        }
-        if(this.size > this.highestSize) {
-            this.highestSize=this.size;
-        }
-    }
-
-    public synchronized StoreEntry get(Object key) throws IOException {
-        load();
-        HashEntry entry = new HashEntry();
-        entry.setKey((Comparable)key);
-        HashEntry result = getBin(key).find(entry);
-        return result != null ? indexManager.getIndex(result.getIndexOffset()) : null;
-    }
-
-    public synchronized StoreEntry remove(Object key) throws IOException {
-        load();
-        StoreEntry result = null;
-        HashEntry entry = new HashEntry();
-        entry.setKey((Comparable)key);
-        HashEntry he = getBin(key).remove(entry);
-        if (he != null) {
-            this.size--;
-            result = this.indexManager.getIndex(he.getIndexOffset());
-        }
-        if (this.highestSize > LOW_WATER_MARK &&  this.highestSize > (this.size *2)) {
-            int newSize = this.size/this.keysPerPage;
-            newSize = Math.max(128, newSize);
-            this.highestSize=0;
-            resize(newSize);
-            
-        }
-        return result;
-    }
-
-    public synchronized boolean containsKey(Object key) throws IOException {
-        return get(key) != null;
-    }
-
-    public synchronized void clear() throws IOException {
-        unload();
-        delete();
-        openIndexFile();
-        load();
-    }
-
-    public synchronized void delete() throws IOException {
-        unload();
-        if (file.exists()) {
-            file.delete();
-        }
-        length = 0;
-    }
-
-    HashPage lookupPage(long pageId) throws IOException {
-        HashPage result = null;
-        if (pageId >= 0) {
-            result = getFromCache(pageId);
-            if (result == null) {
-                result = getFullPage(pageId);
-                if (result != null) {
-                    if (result.isActive()) {
-                        addToCache(result);
-                    } else {
-                        throw new IllegalStateException("Trying to access an inactive page: " + pageId);
-                    }
-                }
-            }
-        }
-        return result;
-    }
-
-    HashPage createPage(int binId) throws IOException {
-        HashPage result = getNextFreePage();
-        if (result == null) {  
-            // allocate one
-            result = new HashPage(keysPerPage);
-            result.setId(length);
-            result.setBinId(binId);
-            writePageHeader(result);
-            length += pageSize;
-            indexFile.seek(length);
-            indexFile.write(HashEntry.NOT_SET);
-        }
-        addToCache(result);
-        return result;
-    }
-
-    void releasePage(HashPage page) throws IOException {
-        removeFromCache(page);
-        page.reset();
-        page.setActive(false);
-        writePageHeader(page);
-        freeList.add(page);
-    }
-
-    private HashPage getNextFreePage() throws IOException {
-        HashPage result = null;
-        if(!freeList.isEmpty()) {
-            result = freeList.removeFirst();
-            result.setActive(true);
-            result.reset();
-            writePageHeader(result);
-        }
-        return result;
-    }
-
-    void writeFullPage(HashPage page) throws IOException {
-        dataOut.reset();
-        page.write(keyMarshaller, dataOut);
-        if (dataOut.size() > pageSize) {
-            throw new IOException("Page Size overflow: pageSize is " + pageSize + " trying to write " + dataOut.size());
-        }
-        indexFile.seek(page.getId());
-        indexFile.write(dataOut.getData(), 0, dataOut.size());
-    }
-
-    void writePageHeader(HashPage page) throws IOException {
-        dataOut.reset();
-        page.writeHeader(dataOut);
-        indexFile.seek(page.getId());
-        indexFile.write(dataOut.getData(), 0, HashPage.PAGE_HEADER_SIZE);
-    }
-
-    HashPage getFullPage(long id) throws IOException {
-        indexFile.seek(id);
-        indexFile.readFully(readBuffer, 0, pageSize);
-        dataIn.restart(readBuffer);
-        HashPage page = new HashPage(keysPerPage);
-        page.setId(id);
-        page.read(keyMarshaller, dataIn);
-        return page;
-    }
-
-    HashPage getPageHeader(long id) throws IOException {
-        indexFile.seek(id);
-        indexFile.readFully(readBuffer, 0, HashPage.PAGE_HEADER_SIZE);
-        dataIn.restart(readBuffer);
-        HashPage page = new HashPage(keysPerPage);
-        page.setId(id);
-        page.readHeader(dataIn);
-        return page;
-    }
-
-    void addToBin(HashPage page) throws IOException {
-        int index = page.getBinId();
-        if (index >= this.bins.length) {
-            resize(index+1);
-        }
-        HashBin bin = getBin(index);
-        bin.addHashPageInfo(page.getId(), page.getPersistedSize());
-    }
-
-    private HashBin getBin(int index) {
-        
-        HashBin result = bins[index];
-        if (result == null) {
-            result = new HashBin(this, index, pageSize / keySize);
-            bins[index] = result;
-            activeBins++;
-        }
-        return result;
-    }
-
-    private void openIndexFile() throws IOException {
-        if (indexFile == null) {
-            file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name));
-            IOHelper.mkdirs(file.getParentFile());
-            indexFile = new RandomAccessFile(file, "rw");
-        }
-    }
-    
-    private HashBin getBin(Object key) {
-        int hash = hash(key);
-        int i = indexFor(hash, bins.length);
-        return getBin(i);
-    }
-
-    private HashPage getFromCache(long pageId) {
-        HashPage result = null;
-        if (enablePageCaching) {
-            result = pageCache.get(pageId);
-        }
-        return result;
-    }
-
-    private void addToCache(HashPage page) {
-        if (enablePageCaching) {
-            pageCache.put(page.getId(), page);
-        }
-    }
-
-    private void removeFromCache(HashPage page) {
-        if (enablePageCaching) {
-            pageCache.remove(page.getId());
-        }
-    }
-    
-    private void doLoad() throws IOException {
-        long offset = 0;
-        if (loaded.compareAndSet(false, true)) {
-            while ((offset + pageSize) <= indexFile.length()) {
-                indexFile.seek(offset);
-                indexFile.readFully(readBuffer, 0, HashPage.PAGE_HEADER_SIZE);
-                dataIn.restart(readBuffer);
-                HashPage page = new HashPage(keysPerPage);
-                page.setId(offset);
-                page.readHeader(dataIn);
-                if (!page.isActive()) {
-                    page.reset();
-                    freeList.add(page);
-                } else {
-                    addToBin(page);
-                    size+=page.size();
-                }
-                offset += pageSize;
-            }
-            length=offset;
-        }
-    }
-    
-    private void doCompress() throws IOException {
-        String backFileName = name + "-COMPRESS";
-        HashIndex backIndex = new HashIndex(directory,backFileName,indexManager);
-        backIndex.setKeyMarshaller(keyMarshaller);
-        backIndex.setKeySize(getKeySize());
-        backIndex.setNumberOfBins(getNumberOfBins());
-        backIndex.setPageSize(getPageSize());
-        backIndex.load();
-        File backFile = backIndex.file;
-        long offset = 0;
-        while ((offset + pageSize) <= indexFile.length()) {
-            indexFile.seek(offset);
-            HashPage page = getFullPage(offset);
-            if (page.isActive()) {
-                for (HashEntry entry : page.getEntries()) {
-                    backIndex.getBin(entry.getKey()).put(entry);
-                    backIndex.size++;
-                }
-            }
-            page=null;
-            offset += pageSize;
-        }
-        backIndex.unload();
-      
-        unload();
-        IOHelper.deleteFile(file);
-        IOHelper.copyFile(backFile, file);
-        IOHelper.deleteFile(backFile);
-        openIndexFile();
-        doLoad();
-    }
-    
-    private void resize(int newCapacity) throws IOException {
-        if (bins.length < getMaximumCapacity()) {
-            if (newCapacity != numberOfBins) {
-                int capacity = 1;
-                while (capacity < newCapacity) {
-                    capacity <<= 1;
-                }
-                newCapacity=capacity;
-                if (newCapacity != numberOfBins) {
-                    LOG.info("Resize hash bins " + this.name + " from " + numberOfBins + " to " + newCapacity);
-                    String backFileName = name + "-REISZE";
-                    HashIndex backIndex = new HashIndex(directory,backFileName,indexManager);
-                    backIndex.setKeyMarshaller(keyMarshaller);
-                    backIndex.setKeySize(getKeySize());
-                    backIndex.setNumberOfBins(newCapacity);
-                    backIndex.setPageSize(getPageSize());
-                    backIndex.load();
-                    File backFile = backIndex.file;
-                    long offset = 0;
-                    while ((offset + pageSize) <= indexFile.length()) {
-                        indexFile.seek(offset);
-                        HashPage page = getFullPage(offset);
-                        if (page.isActive()) {
-                            for (HashEntry entry : page.getEntries()) {
-                                backIndex.getBin(entry.getKey()).put(entry);
-                                backIndex.size++;
-                            }
-                        }
-                        page=null;
-                        offset += pageSize;
-                    }
-                    backIndex.unload();
-                  
-                    unload();
-                    IOHelper.deleteFile(file);
-                    IOHelper.copyFile(backFile, file);
-                    IOHelper.deleteFile(backFile);
-                    setNumberOfBins(newCapacity);
-                    bins = new HashBin[newCapacity];
-                    threshold = calculateThreashold();
-                    openIndexFile();
-                    doLoad();
-                }
-            }
-        }else {
-            threshold = Integer.MAX_VALUE;
-            return;
-        }
-    }
-    
-    private int calculateThreashold() {
-        return (int)(bins.length * loadFactor);
-    }
-    
-    
-    public String toString() {
-        String str = "HashIndex"+System.identityHashCode(this)+": "+file.getName();
-        return str;
-    }
-      
-
-    static int hash(Object x) {
-        int h = x.hashCode();
-        h += ~(h << 9);
-        h ^= h >>> 14;
-        h += h << 4;
-        h ^= h >>> 10;
-        return h;
-    }
-
-    static int indexFor(int h, int length) {
-        return h & (length - 1);
-    }
-
-    static {
-        DEFAULT_PAGE_SIZE = Integer.parseInt(System.getProperty("defaultPageSize", "1024"));
-        DEFAULT_KEY_SIZE = Integer.parseInt(System.getProperty("defaultKeySize", "96"));
-        DEFAULT_BIN_SIZE= Integer.parseInt(System.getProperty("defaultBinSize", "1024"));
-        MAXIMUM_CAPACITY = Integer.parseInt(System.getProperty("maximumCapacity", "16384"));
-        DEFAULT_LOAD_FACTOR=Integer.parseInt(System.getProperty("defaultLoadFactor","50"));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndexMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndexMBean.java
deleted file mode 100644
index 1499d86..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndexMBean.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import org.apache.activemq.kaha.IndexMBean;
-
-/**
- * MBean for HashIndex
- *
- */
-public interface HashIndexMBean extends IndexMBean{
-   
-    /**
-     * @return the keySize
-     */
-    public int getKeySize();
-
-    /**
-     * @param keySize the keySize to set
-     */
-    public void setKeySize(int keySize);
-
-    
-    /**
-     * @return the page size
-     */
-    public int getPageSize();
-
-        
-    /**
-     * @return number of bins
-     */
-    public int getNumberOfBins();
-
-
-    /**
-     * @return the enablePageCaching
-     */
-    public boolean isEnablePageCaching();
-
-    
-    /**
-     * @return the pageCacheSize
-     */
-    public int getPageCacheSize();
-
-    /**
-     * @return size
-     */
-    public int getSize();
-    
-    /**
-     * @return the number of active bins
-     */
-    public int getActiveBins();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java
deleted file mode 100644
index 428af51..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.kaha.Marshaller;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Page within a HashPage
- * 
- * 
- */
-class HashPage {
-    static final int PAGE_HEADER_SIZE = 17;
-    private static final transient Logger LOG = LoggerFactory.getLogger(HashPage.class);
-
-    private int maximumEntries;
-    private long id;
-    private int binId;
-    private List<HashEntry> hashIndexEntries;
-    private int persistedSize;
-    /*
-     * for persistence only
-     */
-    private long nextFreePageId = HashEntry.NOT_SET;
-    private boolean active = true;
-
-    
-    /**
-     * Constructor
-     * 
-     * @param maximumEntries
-     */
-    public HashPage(int maximumEntries) {
-        this.maximumEntries = maximumEntries;
-        this.hashIndexEntries = new ArrayList<HashEntry>(maximumEntries);
-    }
-
-    public String toString() {
-        return "HashPage[" + getId() + ":" + binId + ":" + id+"] size = " + persistedSize;
-    }
-
-    public boolean equals(Object o) {
-        boolean result = false;
-        if (o instanceof HashPage) {
-            HashPage other = (HashPage)o;
-            result = other.id == id;
-        }
-        return result;
-    }
-
-    public int hashCode() {
-        return (int)id;
-    }
-
-    boolean isActive() {
-        return this.active;
-    }
-
-    void setActive(boolean active) {
-        this.active = active;
-    }
-
-    
-    long getId() {
-        return id;
-    }
-
-    void setId(long id) {
-        this.id = id;
-    }
-
-    int getPersistedSize() {
-        return persistedSize;
-    }
-
-    void write(Marshaller keyMarshaller, DataOutput dataOut) throws IOException {
-        persistedSize=hashIndexEntries.size();
-        writeHeader(dataOut);
-        dataOut.writeInt(persistedSize);
-        for (HashEntry entry : hashIndexEntries) {
-            entry.write(keyMarshaller, dataOut);
-        }
-    }
-
-    void read(Marshaller keyMarshaller, DataInput dataIn) throws IOException {
-        readHeader(dataIn);
-        dataIn.readInt();
-        int size = persistedSize;
-        hashIndexEntries.clear();
-        for (int i = 0; i < size; i++) {
-            HashEntry entry = new HashEntry();
-            entry.read(keyMarshaller, dataIn);
-            hashIndexEntries.add(entry);
-        }
-    }
-
-    void readHeader(DataInput dataIn) throws IOException {
-        active = dataIn.readBoolean();
-        nextFreePageId = dataIn.readLong();
-        binId = dataIn.readInt();
-        persistedSize = dataIn.readInt();
-    }
-
-    void writeHeader(DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(isActive());
-        dataOut.writeLong(nextFreePageId);
-        dataOut.writeInt(binId);
-        persistedSize=hashIndexEntries.size();
-        dataOut.writeInt(persistedSize);
-    }
-    
-
-    boolean isEmpty() {
-        return hashIndexEntries.isEmpty();
-    }
-
-    boolean isFull() {
-        return hashIndexEntries.size() >= maximumEntries;
-    }
-
-    boolean isUnderflowed() {
-        return hashIndexEntries.size() < (maximumEntries / 2);
-    }
-
-    boolean isOverflowed() {
-        return hashIndexEntries.size() > maximumEntries;
-    }
-
-    List<HashEntry> getEntries() {
-        return hashIndexEntries;
-    }
-
-    void setEntries(List<HashEntry> newEntries) {
-        this.hashIndexEntries = newEntries;
-    }
-
-    int getMaximumEntries() {
-        return this.maximumEntries;
-    }
-
-    void setMaximumEntries(int maximumEntries) {
-        this.maximumEntries = maximumEntries;
-    }
-
-    int size() {
-        return hashIndexEntries.size();
-    }
-
-    void reset() throws IOException {
-        hashIndexEntries.clear();
-        persistedSize=0;
-    }
-
-    void addHashEntry(int index, HashEntry entry) throws IOException {
-        hashIndexEntries.add(index, entry);
-    }
-
-    HashEntry getHashEntry(int index) {
-        HashEntry result = hashIndexEntries.get(index);
-        return result;
-    }
-
-    HashEntry removeHashEntry(int index) throws IOException {
-        HashEntry result = hashIndexEntries.remove(index);
-        return result;
-    }
-
-    void removeAllTreeEntries(List<HashEntry> c) {
-        hashIndexEntries.removeAll(c);
-    }
-
-    List<HashEntry> getSubList(int from, int to) {
-        return new ArrayList<HashEntry>(hashIndexEntries.subList(from, to));
-    }
-
-    /**
-     * @return the binId
-     */
-    int getBinId() {
-        return this.binId;
-    }
-
-    /**
-     * @param binId the binId to set
-     */
-    void setBinId(int binId) {
-        this.binId = binId;
-    }
-
-    String dump() {
-
-        StringBuffer str = new StringBuffer(32);
-        str.append(toString());
-        str.append(": ");
-        for (HashEntry entry : hashIndexEntries) {
-            str.append(entry);
-            str.append(",");
-        }
-        return str.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPageInfo.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPageInfo.java
deleted file mode 100644
index 68ffd86..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPageInfo.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import java.io.IOException;
-import org.apache.activemq.util.LinkedNode;
-
-/**
- * A Page within a HashPageInfo
- * 
- * 
- */
-class HashPageInfo extends LinkedNode{
-
-    private HashIndex hashIndex;
-    private long id;
-    private int size;
-    private HashPage page;
-    private boolean dirty;
-
-    HashPageInfo(HashIndex index) {
-        this.hashIndex = index;
-    }
-
-    /**
-     * @return the id
-     */
-    long getId() {
-        return this.id;
-    }
-
-    /**
-     * @param id the id to set
-     */
-    void setId(long id) {
-        this.id = id;
-    }
-
-    /**
-     * @return the size
-     */
-    int size() {
-        return this.size;
-    }
-    
-    boolean isEmpty() {
-        return size <= 0;
-    }
-
-    /**
-     * @param size the size to set
-     */
-    void setSize(int size) {
-        this.size = size;
-    }
-
-    void addHashEntry(int index, HashEntry entry) throws IOException {
-        page.addHashEntry(index, entry);
-        size=page.size();
-        dirty = true;
-    }
-
-    HashEntry getHashEntry(int index) throws IOException {
-        return page.getHashEntry(index);
-    }
-
-    HashEntry removeHashEntry(int index) throws IOException {
-        HashEntry result = page.removeHashEntry(index);
-        if (result != null) {
-            size=page.size();
-            dirty = true;
-        }
-        return result;
-    }
-
-    String dump() {
-        return page.dump();
-    }
-
-    void begin() throws IOException {
-        if (page == null) {
-            page = hashIndex.lookupPage(id);
-        }
-    }
-
-    void end() throws IOException {
-        if (page != null) {
-            if (dirty) {
-                hashIndex.writeFullPage(page);
-            }
-        }
-        page = null;
-        dirty = false;
-    }
-
-    HashPage getPage() {
-        return page;
-    }
-
-    void setPage(HashPage page) {
-        this.page = page;
-    }
-    
-    public String toString() {
-        return "Page["+id+"] size=" + size;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/package.html
deleted file mode 100755
index ad6b501..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-disk based Hash implementation of an index for a Map
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/package.html
deleted file mode 100755
index 1396367..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Kaha index - type classes for the Map Container - including VM  implementation
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeEntry.java
deleted file mode 100644
index 5a873ce..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeEntry.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.kaha.impl.index.tree;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.kaha.Marshaller;
-
-/**
- * Key and index for a BTree
- * 
- * 
- */
-class TreeEntry implements Comparable {
-
-    static final int NOT_SET = -1;
-    private Comparable key;
-    private long indexOffset;
-    private long prevPageId = NOT_SET;
-    private long nextPageId = NOT_SET;
-
-    public int compareTo(Object o) {
-        if (o instanceof TreeEntry) {
-            TreeEntry other = (TreeEntry)o;
-            return key.compareTo(other.key);
-        } else {
-            return key.compareTo(o);
-        }
-    }
-
-    public boolean equals(Object o) {
-        return compareTo(o) == 0;
-    }
-
-    public int hashCode() {
-        return key.hashCode();
-    }
-
-    public String toString() {
-        return "TreeEntry(" + key + "," + indexOffset + ")prev=" + prevPageId + ",next=" + nextPageId;
-    }
-
-    void reset() {
-        prevPageId = NOT_SET;
-        nextPageId = NOT_SET;
-    }
-
-    TreeEntry copy() {
-        TreeEntry copy = new TreeEntry();
-        copy.key = this.key;
-        copy.indexOffset = this.indexOffset;
-        copy.prevPageId = this.prevPageId;
-        copy.nextPageId = this.nextPageId;
-        return copy;
-    }
-
-    /**
-     * @return the key
-     */
-    Comparable getKey() {
-        return this.key;
-    }
-
-    /**
-     * @param key the key to set
-     */
-    void setKey(Comparable key) {
-        this.key = key;
-    }
-
-    /**
-     * @return the nextPageId
-     */
-    long getNextPageId() {
-        return this.nextPageId;
-    }
-
-    /**
-     * @param nextPageId the nextPageId to set
-     */
-    void setNextPageId(long nextPageId) {
-        this.nextPageId = nextPageId;
-    }
-
-    /**
-     * @return the prevPageId
-     */
-    long getPrevPageId() {
-        return this.prevPageId;
-    }
-
-    /**
-     * @param prevPageId the prevPageId to set
-     */
-    void setPrevPageId(long prevPageId) {
-        this.prevPageId = prevPageId;
-    }
-
-    /**
-     * @return the indexOffset
-     */
-    long getIndexOffset() {
-        return this.indexOffset;
-    }
-
-    /**
-     * @param indexOffset the indexOffset to set
-     */
-    void setIndexOffset(long indexOffset) {
-        this.indexOffset = indexOffset;
-    }
-
-    boolean hasChildPagesReferences() {
-        return prevPageId != NOT_SET || nextPageId != NOT_SET;
-    }
-
-    void write(Marshaller keyMarshaller, DataOutput dataOut) throws IOException {
-        keyMarshaller.writePayload(key, dataOut);
-        dataOut.writeLong(indexOffset);
-        dataOut.writeLong(nextPageId);
-        dataOut.writeLong(prevPageId);
-    }
-
-    void read(Marshaller keyMarshaller, DataInput dataIn) throws IOException {
-        key = (Comparable)keyMarshaller.readPayload(dataIn);
-        indexOffset = dataIn.readLong();
-        nextPageId = dataIn.readLong();
-        prevPageId = dataIn.readLong();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java
deleted file mode 100644
index 46a9a14..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/**
- * 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.kaha.impl.index.tree;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.impl.index.Index;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.LRUCache;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * BTree implementation
- * 
- * 
- */
-public class TreeIndex implements Index {
-
-    private static final String NAME_PREFIX = "tree-index-";
-    private static final int DEFAULT_PAGE_SIZE;
-    private static final int DEFAULT_KEY_SIZE;
-    private static final Logger LOG = LoggerFactory.getLogger(TreeIndex.class);
-    private final String name;
-    private File directory;
-    private File file;
-    private RandomAccessFile indexFile;
-    private IndexManager indexManager;
-    private int pageSize = DEFAULT_PAGE_SIZE;
-    private int keySize = DEFAULT_KEY_SIZE;
-    private int keysPerPage = pageSize / keySize;
-    private TreePage root;
-    private LRUCache<Long, TreePage> pageCache;
-    private DataByteArrayInputStream dataIn;
-    private DataByteArrayOutputStream dataOut;
-    private byte[] readBuffer;
-    private Marshaller keyMarshaller;
-    private long length;
-    private TreePage firstFree;
-    private TreePage lastFree;
-    private AtomicBoolean loaded = new AtomicBoolean();
-    private boolean enablePageCaching = true;
-    private int pageCacheSize = 10;
-
-    /**
-     * Constructor
-     * 
-     * @param directory
-     * @param name
-     * @param indexManager
-     * @throws IOException
-     */
-    public TreeIndex(File directory, String name, IndexManager indexManager) throws IOException {
-        this.directory = directory;
-        this.name = name;
-        this.indexManager = indexManager;
-        pageCache = new LRUCache<Long, TreePage>(pageCacheSize, pageCacheSize, 0.75f, true);
-        openIndexFile();
-    }
-
-    /**
-     * Set the marshaller for key objects
-     * 
-     * @param marshaller
-     */
-    public void setKeyMarshaller(Marshaller marshaller) {
-        this.keyMarshaller = marshaller;
-    }
-
-    /**
-     * @return the keySize
-     */
-    public int getKeySize() {
-        return this.keySize;
-    }
-
-    /**
-     * @param keySize the keySize to set
-     */
-    public void setKeySize(int keySize) {
-        this.keySize = keySize;
-        if (loaded.get()) {
-            throw new RuntimeException("Pages already loaded - can't reset key size");
-        }
-    }
-
-    /**
-     * @return the pageSize
-     */
-    public int getPageSize() {
-        return this.pageSize;
-    }
-
-    /**
-     * @param pageSize the pageSize to set
-     */
-    public void setPageSize(int pageSize) {
-        if (loaded.get() && pageSize != this.pageSize) {
-            throw new RuntimeException("Pages already loaded - can't reset page size");
-        }
-        this.pageSize = pageSize;
-    }
-
-    public boolean isTransient() {
-        return false;
-    }
-
-    /**
-     * @return the enablePageCaching
-     */
-    public boolean isEnablePageCaching() {
-        return this.enablePageCaching;
-    }
-
-    /**
-     * @param enablePageCaching the enablePageCaching to set
-     */
-    public void setEnablePageCaching(boolean enablePageCaching) {
-        this.enablePageCaching = enablePageCaching;
-    }
-
-    /**
-     * @return the pageCacheSize
-     */
-    public int getPageCacheSize() {
-        return this.pageCacheSize;
-    }
-
-    /**
-     * @param pageCacheSize the pageCacheSize to set
-     */
-    public void setPageCacheSize(int pageCacheSize) {
-        this.pageCacheSize = pageCacheSize;
-        pageCache.setMaxCacheSize(pageCacheSize);
-    }
-
-    public void load() {
-        if (loaded.compareAndSet(false, true)) {
-            keysPerPage = pageSize / keySize;
-            dataIn = new DataByteArrayInputStream();
-            dataOut = new DataByteArrayOutputStream(pageSize);
-            readBuffer = new byte[pageSize];
-            try {
-                openIndexFile();
-                long offset = 0;
-                while ((offset + pageSize) <= indexFile.length()) {
-                    indexFile.seek(offset);
-                    indexFile.readFully(readBuffer, 0, TreePage.PAGE_HEADER_SIZE);
-                    dataIn.restart(readBuffer);
-                    TreePage page = new TreePage(keysPerPage);
-                    page.setTree(this);
-                    page.setId(offset);
-                    page.readHeader(dataIn);
-                    if (!page.isActive()) {
-                        if (lastFree != null) {
-                            lastFree.setNextFreePageId(offset);
-                            indexFile.seek(lastFree.getId());
-                            dataOut.reset();
-                            lastFree.writeHeader(dataOut);
-                            indexFile.write(dataOut.getData(), 0, TreePage.PAGE_HEADER_SIZE);
-                            lastFree = page;
-                        } else {
-                            lastFree = page;
-                            firstFree = page;
-                        }
-                    } else if (root == null && page.isRoot()) {
-                        root = getFullPage(offset);
-                    }
-                    offset += pageSize;
-                }
-                length = offset;
-                if (root == null) {
-                    root = createRoot();
-                }
-            } catch (IOException e) {
-                LOG.error("Failed to load index ", e);
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
-    public void unload() throws IOException {
-        if (loaded.compareAndSet(true, false)) {
-            if (indexFile != null) {
-                indexFile.close();
-                indexFile = null;
-                pageCache.clear();
-                root = null;
-                firstFree = null;
-                lastFree = null;
-            }
-        }
-    }
-
-    public void store(Object key, StoreEntry value) throws IOException {
-        TreeEntry entry = new TreeEntry();
-        entry.setKey((Comparable)key);
-        entry.setIndexOffset(value.getOffset());
-        root.put(entry);
-    }
-
-    public StoreEntry get(Object key) throws IOException {
-        TreeEntry entry = new TreeEntry();
-        entry.setKey((Comparable)key);
-        TreeEntry result = root.find(entry);
-        return result != null ? indexManager.getIndex(result.getIndexOffset()) : null;
-    }
-
-    public StoreEntry remove(Object key) throws IOException {
-        TreeEntry entry = new TreeEntry();
-        entry.setKey((Comparable)key);
-        TreeEntry result = root.remove(entry);
-        return result != null ? indexManager.getIndex(result.getIndexOffset()) : null;
-    }
-
-    public boolean containsKey(Object key) throws IOException {
-        TreeEntry entry = new TreeEntry();
-        entry.setKey((Comparable)key);
-        return root.find(entry) != null;
-    }
-
-    public void clear() throws IOException {
-        unload();
-        delete();
-        openIndexFile();
-        load();
-    }
-
-    public void delete() throws IOException {
-        unload();
-        if (file.exists()) {
-            boolean result = file.delete();
-        }
-        length = 0;
-    }
-
-    /**
-     * @return the root
-     */
-    TreePage getRoot() {
-        return this.root;
-    }
-
-    TreePage lookupPage(long pageId) throws IOException {
-        TreePage result = null;
-        if (pageId >= 0) {
-            if (root != null && root.getId() == pageId) {
-                result = root;
-            } else {
-                result = getFromCache(pageId);
-            }
-            if (result == null) {
-                result = getFullPage(pageId);
-                if (result != null) {
-                    if (result.isActive()) {
-                        addToCache(result);
-                    } else {
-                        throw new IllegalStateException("Trying to access an inactive page: " + pageId + " root is " + root);
-                    }
-                }
-            }
-        }
-        return result;
-    }
-
-    TreePage createRoot() throws IOException {
-        TreePage result = createPage(-1);
-        root = result;
-        return result;
-    }
-
-    TreePage createPage(long parentId) throws IOException {
-        TreePage result = getNextFreePage();
-        if (result == null) {
-            // allocate one
-            result = new TreePage(keysPerPage);
-            result.setId(length);
-            result.setTree(this);
-            result.setParentId(parentId);
-            writePage(result);
-            length += pageSize;
-            indexFile.seek(length);
-            indexFile.write(TreeEntry.NOT_SET);
-        }
-        addToCache(result);
-        return result;
-    }
-
-    void releasePage(TreePage page) throws IOException {
-        removeFromCache(page);
-        page.reset();
-        page.setActive(false);
-        if (lastFree == null) {
-            firstFree = page;
-            lastFree = page;
-        } else {
-            lastFree.setNextFreePageId(page.getId());
-            writePage(lastFree);
-        }
-        writePage(page);
-    }
-
-    private TreePage getNextFreePage() throws IOException {
-        TreePage result = null;
-        if (firstFree != null) {
-            if (firstFree.equals(lastFree)) {
-                result = firstFree;
-                firstFree = null;
-                lastFree = null;
-            } else {
-                result = firstFree;
-                firstFree = getPage(firstFree.getNextFreePageId());
-                if (firstFree == null) {
-                    lastFree = null;
-                }
-            }
-            result.setActive(true);
-            result.reset();
-            result.saveHeader();
-        }
-        return result;
-    }
-
-    void writeFullPage(TreePage page) throws IOException {
-        dataOut.reset();
-        page.write(keyMarshaller, dataOut);
-        if (dataOut.size() > pageSize) {
-            throw new IOException("Page Size overflow: pageSize is " + pageSize + " trying to write " + dataOut.size());
-        }
-        indexFile.seek(page.getId());
-        indexFile.write(dataOut.getData(), 0, dataOut.size());
-    }
-
-    void writePage(TreePage page) throws IOException {
-        dataOut.reset();
-        page.writeHeader(dataOut);
-        indexFile.seek(page.getId());
-        indexFile.write(dataOut.getData(), 0, TreePage.PAGE_HEADER_SIZE);
-    }
-
-    TreePage getFullPage(long id) throws IOException {
-        indexFile.seek(id);
-        indexFile.readFully(readBuffer, 0, pageSize);
-        dataIn.restart(readBuffer);
-        TreePage page = new TreePage(keysPerPage);
-        page.setId(id);
-        page.setTree(this);
-        page.read(keyMarshaller, dataIn);
-        return page;
-    }
-
-    TreePage getPage(long id) throws IOException {
-        indexFile.seek(id);
-        indexFile.readFully(readBuffer, 0, TreePage.PAGE_HEADER_SIZE);
-        dataIn.restart(readBuffer);
-        TreePage page = new TreePage(keysPerPage);
-        page.setId(id);
-        page.setTree(this);
-        page.readHeader(dataIn);
-        return page;
-    }
-
-    private TreePage getFromCache(long pageId) {
-        TreePage result = null;
-        if (enablePageCaching) {
-            result = pageCache.get(pageId);
-        }
-        return result;
-    }
-
-    private void addToCache(TreePage page) {
-        if (enablePageCaching) {
-            pageCache.put(page.getId(), page);
-        }
-    }
-
-    private void removeFromCache(TreePage page) {
-        if (enablePageCaching) {
-            pageCache.remove(page.getId());
-        }
-    }
-
-    protected void openIndexFile() throws IOException {
-        if (indexFile == null) {
-            file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name));
-            IOHelper.mkdirs(file.getParentFile());
-            indexFile = new RandomAccessFile(file, "rw");
-        }
-    }
-
-    static {
-        DEFAULT_PAGE_SIZE = Integer.parseInt(System.getProperty("defaultPageSize", "16384"));
-        DEFAULT_KEY_SIZE = Integer.parseInt(System.getProperty("defaultKeySize", "96"));
-    }
-
-    public int getSize() {
-        return 0;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java
deleted file mode 100644
index c4a2bff..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java
+++ /dev/null
@@ -1,762 +0,0 @@
-/**
- * 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.kaha.impl.index.tree;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.activemq.kaha.Marshaller;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Page in a BTree
- * 
- * 
- */
-class TreePage {
-
-    static final int PAGE_HEADER_SIZE = 18;
-    private static final transient Logger LOG = LoggerFactory.getLogger(TreePage.class);
-
-    static enum Flavour {
-        LESS, MORE
-    }
-
-    private TreeIndex tree;
-    private int maximumEntries;
-    private long id;
-    private long parentId = TreeEntry.NOT_SET;
-    private boolean leaf = true;
-    private List<TreeEntry> treeEntries;
-    /*
-     * for persistence only
-     */
-    private long nextFreePageId = TreeEntry.NOT_SET;
-    private boolean active = true;
-
-    /**
-     * Constructor
-     * 
-     * @param tree
-     * @param id
-     * @param parentId
-     * @param maximumEntries
-     */
-    TreePage(TreeIndex tree, long id, long parentId, int maximumEntries) {
-        this(maximumEntries);
-        this.tree = tree;
-        this.id = id;
-        this.parentId = parentId;
-    }
-
-    /**
-     * Constructor
-     * 
-     * @param maximumEntries
-     */
-    public TreePage(int maximumEntries) {
-        this.maximumEntries = maximumEntries;
-        this.treeEntries = new ArrayList<TreeEntry>(maximumEntries);
-    }
-
-    public String toString() {
-        return "TreePage[" + getId() + "]parent=" + getParentId();
-    }
-
-    public boolean equals(Object o) {
-        boolean result = false;
-        if (o instanceof TreePage) {
-            TreePage other = (TreePage)o;
-            result = other.id == id;
-        }
-        return result;
-    }
-
-    public int hashCode() {
-        return (int)id;
-    }
-
-    boolean isActive() {
-        return this.active;
-    }
-
-    void setActive(boolean active) {
-        this.active = active;
-    }
-
-    long getNextFreePageId() {
-        return this.nextFreePageId;
-    }
-
-    void setNextFreePageId(long nextPageId) {
-        this.nextFreePageId = nextPageId;
-    }
-
-    long getId() {
-        return id;
-    }
-
-    void setId(long id) {
-        this.id = id;
-    }
-
-    void write(Marshaller keyMarshaller, DataOutput dataOut) throws IOException {
-        writeHeader(dataOut);
-        dataOut.writeInt(treeEntries.size());
-        for (TreeEntry entry : treeEntries) {
-            entry.write(keyMarshaller, dataOut);
-        }
-    }
-
-    void read(Marshaller keyMarshaller, DataInput dataIn) throws IOException {
-        readHeader(dataIn);
-        int size = dataIn.readInt();
-        treeEntries.clear();
-        for (int i = 0; i < size; i++) {
-            TreeEntry entry = new TreeEntry();
-            entry.read(keyMarshaller, dataIn);
-            treeEntries.add(entry);
-        }
-    }
-
-    void readHeader(DataInput dataIn) throws IOException {
-        active = dataIn.readBoolean();
-        leaf = dataIn.readBoolean();
-        setParentId(dataIn.readLong());
-        nextFreePageId = dataIn.readLong();
-    }
-
-    void writeHeader(DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(isActive());
-        dataOut.writeBoolean(isLeaf());
-        dataOut.writeLong(getParentId());
-        dataOut.writeLong(nextFreePageId);
-    }
-
-    boolean isEmpty() {
-        return treeEntries.isEmpty();
-    }
-
-    boolean isFull() {
-        return treeEntries.size() >= maximumEntries;
-    }
-
-    boolean isRoot() {
-        return getParentId() < 0;
-    }
-
-    boolean isLeaf() {
-        if (treeEntries.isEmpty()) {
-            leaf = true;
-        }
-        return leaf;
-    }
-
-    boolean isUnderflowed() {
-        return treeEntries.size() < (maximumEntries / 2);
-    }
-
-    boolean isOverflowed() {
-        return treeEntries.size() > maximumEntries;
-    }
-
-    void setLeaf(boolean newValue) {
-        this.leaf = newValue;
-    }
-
-    TreePage getParent() throws IOException {
-        return tree.lookupPage(parentId);
-    }
-
-    long getParentId() {
-        return parentId;
-    }
-
-    void setParentId(long newId) throws IOException {
-        if (newId == this.id) {
-            throw new IllegalStateException("Cannot set page as a child of itself " + this
-                                            + " trying to set parentId = " + newId);
-        }
-        this.parentId = newId;
-        tree.writePage(this);
-    }
-
-    List<TreeEntry> getEntries() {
-        return treeEntries;
-    }
-
-    void setEntries(List<TreeEntry> newEntries) {
-        this.treeEntries = newEntries;
-    }
-
-    int getMaximumEntries() {
-        return this.maximumEntries;
-    }
-
-    void setMaximumEntries(int maximumEntries) {
-        this.maximumEntries = maximumEntries;
-    }
-
-    int size() {
-        return treeEntries.size();
-    }
-
-    TreeIndex getTree() {
-        return this.tree;
-    }
-
-    void setTree(TreeIndex tree) {
-        this.tree = tree;
-    }
-
-    void reset() throws IOException {
-        treeEntries.clear();
-        setParentId(TreeEntry.NOT_SET);
-        setNextFreePageId(TreeEntry.NOT_SET);
-        setLeaf(true);
-    }
-
-    public TreeEntry find(TreeEntry key) throws IOException {
-        int low = 0;
-        int high = size() - 1;
-        long pageId = -1;
-        while (low <= high) {
-            int mid = (low + high) >> 1;
-            TreeEntry te = getTreeEntry(mid);
-            int cmp = te.compareTo(key);
-            if (cmp == 0) {
-                return te;
-            } else if (cmp < 0) {
-                low = mid + 1;
-                pageId = te.getNextPageId();
-            } else {
-                high = mid - 1;
-                pageId = te.getPrevPageId();
-            }
-        }
-        TreePage page = tree.lookupPage(pageId);
-        if (page != null) {
-            return page.find(key);
-        }
-        return null;
-    }
-
-    TreeEntry put(TreeEntry newEntry) throws IOException {
-        TreeEntry result = null;
-        if (isRoot()) {
-            if (isEmpty()) {
-                insertTreeEntry(0, newEntry);
-            } else {
-                result = doInsert(null, newEntry);
-            }
-        } else {
-            throw new IllegalStateException("insert() should not be called on non root page - " + this);
-        }
-        return result;
-    }
-
-    TreeEntry remove(TreeEntry entry) throws IOException {
-        TreeEntry result = null;
-        if (isRoot()) {
-            if (!isEmpty()) {
-                result = doRemove(entry);
-            }
-        } else {
-            throw new IllegalStateException("remove() should not be called on non root page");
-        }
-        return result;
-    }
-
-    private TreeEntry doInsert(Flavour flavour, TreeEntry newEntry) throws IOException {
-        TreeEntry result = null;
-        TreePageEntry closest = findClosestEntry(newEntry);
-        if (closest != null) {
-            TreeEntry closestEntry = closest.getTreeEntry();
-            TreePage closestPage = closest.getTreePage();
-            int cmp = closestEntry.compareTo(newEntry);
-            if (cmp == 0) {
-                // we actually just need to pass back the value
-                long oldValue = closestEntry.getIndexOffset();
-                closestEntry.setIndexOffset(newEntry.getIndexOffset());
-                newEntry.setIndexOffset(oldValue);
-                result = newEntry;
-                save();
-            } else if (closestPage != null) {
-                result = closestPage.doInsert(closest.getFlavour(), newEntry);
-            } else {
-                if (!isFull()) {
-                    insertTreeEntry(closest.getIndex(), newEntry);
-                    save();
-                } else {
-                    doOverflow(flavour, newEntry);
-                }
-            }
-        } else {
-            if (!isFull()) {
-                doInsertEntry(newEntry);
-                save();
-            } else {
-                // need to insert the new entry and propogate up the hightest
-                // value
-                doOverflow(flavour, newEntry);
-            }
-        }
-        return result;
-    }
-
-    private TreePage doOverflow(Flavour flavour, TreeEntry newEntry) throws IOException {
-        TreePage result = this;
-        TreeEntry theEntry = newEntry;
-        if (!isFull()) {
-            doInsertEntry(newEntry);
-            save();
-        } else {
-            if (!isRoot() && flavour != null) {
-                // we aren't the root, but to ensure the correct distribution we
-                // need to
-                // insert the new entry and take a node of the end of the page
-                // and pass that up the tree to find a home
-                doInsertEntry(newEntry);
-                if (flavour == Flavour.LESS) {
-                    theEntry = removeTreeEntry(0);
-                    theEntry.reset();
-                    theEntry.setNextPageId(getId());
-                } else {
-                    theEntry = removeTreeEntry(size() - 1);
-                    theEntry.reset();
-                    theEntry.setPrevPageId(getId());
-                }
-                save();
-
-                result = getParent().doOverflow(flavour, theEntry);
-                if (!theEntry.equals(newEntry)) {
-                    // the newEntry stayed here
-                    result = this;
-                }
-            } else {
-                // so we are the root and need to split
-                doInsertEntry(newEntry);
-                int midIndex = size() / 2;
-                TreeEntry midEntry = removeTreeEntry(midIndex);
-                List<TreeEntry> subList = getSubList(midIndex, size());
-                removeAllTreeEntries(subList);
-                TreePage newRoot = tree.createRoot();
-                newRoot.setLeaf(false);
-                this.setParentId(newRoot.getId());
-                save(); // we are no longer root - need to save - we maybe
-                // looked up v. soon!
-                TreePage rightPage = tree.createPage(newRoot.getId());
-                rightPage.setEntries(subList);
-                rightPage.checkLeaf();
-                resetParentId(rightPage.getId(), rightPage.getEntries());
-                midEntry.setNextPageId(rightPage.getId());
-                midEntry.setPrevPageId(this.getId());
-                newRoot.insertTreeEntry(0, midEntry);
-                resetParentId(newRoot.getId(), newRoot.getEntries());
-                save();
-                rightPage.save();
-                newRoot.save();
-            }
-        }
-        return result;
-    }
-
-    private TreeEntry doRemove(TreeEntry entry) throws IOException {
-        TreeEntry result = null;
-        TreePageEntry closest = findClosestEntry(entry);
-        if (closest != null) {
-            TreeEntry closestEntry = closest.getTreeEntry();
-            if (closestEntry != null) {
-                TreePage closestPage = closest.getTreePage();
-                int cmp = closestEntry.compareTo(entry);
-                if (cmp == 0) {
-                    result = closest.getTreeEntry();
-                    int index = closest.getIndex();
-                    removeTreeEntry(index);
-                    save();
-                    // ensure we don't loose children
-                    doUnderflow(result, index);
-                } else if (closestPage != null) {
-                    closestPage.doRemove(entry);
-                }
-            }
-        }
-        return result;
-    }
-
-    /**
-     * @return true if the page is removed
-     * @throws IOException
-     */
-    private boolean doUnderflow() throws IOException {
-        boolean result = false;
-        boolean working = true;
-        while (working && isUnderflowed() && !isEmpty() && !isLeaf()) {
-            int lastIndex = size() - 1;
-            TreeEntry entry = getTreeEntry(lastIndex);
-            working = doUnderflow(entry, lastIndex);
-        }
-        if (isUnderflowed() && isLeaf()) {
-            result = doUnderflowLeaf();
-        }
-        return result;
-    }
-
-    private boolean doUnderflow(TreeEntry entry, int index) throws IOException {
-        boolean result = false;
-        // pull an entry up from a leaf to fill the empty space
-        if (entry.getNextPageId() != TreeEntry.NOT_SET) {
-            TreePage page = tree.lookupPage(entry.getNextPageId());
-            if (page != null && !page.isEmpty()) {
-                TreeEntry replacement = page.removeTreeEntry(0);
-                TreeEntry copy = replacement.copy();
-                checkParentIdForRemovedPageEntry(copy, page.getId(), getId());
-                if (!page.isEmpty()) {
-                    copy.setNextPageId(page.getId());
-                    page.setParentId(this.id);
-                } else {
-                    page.setLeaf(true);
-                }
-                int replacementIndex = doInsertEntry(copy);
-                if (page.doUnderflow()) {
-                    // page removed so update our replacement
-                    resetPageReference(replacementIndex, copy.getNextPageId());
-                    copy.setNextPageId(TreeEntry.NOT_SET);
-                } else {
-                    page.save();
-                }
-                save();
-                result = true;
-            }
-        }
-        // ensure we don't loose previous bit of the tree
-        if (entry.getPrevPageId() != TreeEntry.NOT_SET) {
-            TreeEntry prevEntry = (index > 0) ? getTreeEntry(index - 1) : null;
-            if (prevEntry == null || prevEntry.getNextPageId() != entry.getPrevPageId()) {
-                TreePage page = tree.lookupPage(entry.getPrevPageId());
-                if (page != null && !page.isEmpty()) {
-                    TreeEntry replacement = page.removeTreeEntry(page.getEntries().size() - 1);
-                    TreeEntry copy = replacement.copy();
-                    // check children pages of the replacement point to the
-                    // correct place
-                    checkParentIdForRemovedPageEntry(copy, page.getId(), getId());
-                    if (!page.isEmpty()) {
-                        copy.setPrevPageId(page.getId());
-                    } else {
-                        page.setLeaf(true);
-                    }
-                    insertTreeEntry(index, copy);
-                    // if we overflow - the page the replacement ends up on
-                    TreePage landed = null;
-                    TreeEntry removed = null;
-                    if (isOverflowed()) {
-                        TreePage parent = getParent();
-                        if (parent != null) {
-                            removed = getTreeEntry(0);
-                            Flavour flavour = getFlavour(parent, removed);
-                            if (flavour == Flavour.LESS) {
-                                removed = removeTreeEntry(0);
-                                landed = parent.doOverflow(flavour, removed);
-                            } else {
-                                removed = removeTreeEntry(size() - 1);
-                                landed = parent.doOverflow(Flavour.MORE, removed);
-                            }
-                        }
-                    }
-                    if (page.doUnderflow()) {
-                        if (landed == null || landed.equals(this)) {
-                            landed = this;
-                        }
-
-                        resetPageReference(copy.getNextPageId());
-                        landed.resetPageReference(copy.getNextPageId());
-                        copy.setPrevPageId(TreeEntry.NOT_SET);
-                        landed.save();
-                    } else {
-                        page.save();
-                    }
-                    save();
-                    result = true;
-                }
-                // now we need to check we haven't overflowed this page
-            }
-        }
-        if (!result) {
-            save();
-        }
-        // now see if we need to save this page
-        result |= doUnderflowLeaf();
-        save();
-        return result;
-    }
-
-    private boolean doUnderflowLeaf() throws IOException {
-        boolean result = false;
-        // if we have unerflowed - and we are a leaf - push entries further up
-        // the tree
-        // and delete ourselves
-        if (isUnderflowed() && isLeaf()) {
-            List<TreeEntry> list = new ArrayList<TreeEntry>(treeEntries);
-            treeEntries.clear();
-            for (TreeEntry entry : list) {
-                // need to check for each iteration - we might get promoted to
-                // root
-                TreePage parent = getParent();
-                if (parent != null) {
-                    Flavour flavour = getFlavour(parent, entry);
-                    TreePage landedOn = parent.doOverflow(flavour, entry);
-                    checkParentIdForRemovedPageEntry(entry, getId(), landedOn.getId());
-                }
-            }
-            TreePage parent = getParent();
-            if (parent != null) {
-                parent.checkLeaf();
-                parent.removePageId(getId());
-                parent.doUnderflow();
-                parent.save();
-                tree.releasePage(this);
-                result = true;
-            }
-        }
-        return result;
-    }
-
-    private Flavour getFlavour(TreePage page, TreeEntry entry) {
-        Flavour result = null;
-        if (page != null && !page.getEntries().isEmpty()) {
-            TreeEntry last = page.getEntries().get(page.getEntries().size() - 1);
-            if (last.compareTo(entry) > 0) {
-                result = Flavour.MORE;
-            } else {
-                result = Flavour.LESS;
-            }
-        }
-        return result;
-    }
-
-    private void checkLeaf() {
-        boolean result = false;
-        for (TreeEntry entry : treeEntries) {
-            if (entry.hasChildPagesReferences()) {
-                result = true;
-                break;
-            }
-        }
-        setLeaf(!result);
-    }
-
-    private void checkParentIdForRemovedPageEntry(TreeEntry entry, long oldPageId, long newPageId)
-        throws IOException {
-        TreePage page = tree.lookupPage(entry.getPrevPageId());
-        if (page != null && page.getParentId() == oldPageId) {
-            page.setParentId(newPageId);
-            page.save();
-        }
-        page = tree.lookupPage(entry.getNextPageId());
-        if (page != null && page.getParentId() == oldPageId) {
-            page.setParentId(newPageId);
-            page.save();
-        }
-    }
-
-    private void removePageId(long pageId) {
-        for (TreeEntry entry : treeEntries) {
-            if (entry.getNextPageId() == pageId) {
-                entry.setNextPageId(TreeEntry.NOT_SET);
-            }
-            if (entry.getPrevPageId() == pageId) {
-                entry.setPrevPageId(TreeEntry.NOT_SET);
-            }
-        }
-    }
-
-    private TreePageEntry findClosestEntry(TreeEntry key) throws IOException {
-        TreePageEntry result = null;
-        TreeEntry treeEntry = null;
-        Flavour flavour = null;
-        long pageId = -1;
-        int low = 0;
-        int high = size() - 1;
-        int mid = low;
-        while (low <= high) {
-            mid = (low + high) >> 1;
-            treeEntry = getTreeEntry(mid);
-            int cmp = treeEntry.compareTo(key);
-            if (cmp < 0) {
-                low = mid + 1;
-                pageId = treeEntry.getNextPageId();
-                flavour = Flavour.LESS;
-            } else if (cmp > 0) {
-                high = mid - 1;
-                pageId = treeEntry.getPrevPageId();
-                flavour = Flavour.MORE;
-            } else {
-                // got exact match
-                low = mid;
-                break;
-            }
-        }
-        if (treeEntry != null) {
-            TreePage treePage = tree.lookupPage(pageId);
-            result = new TreePageEntry(treeEntry, treePage, flavour, low);
-        }
-        return result;
-    }
-
-    private int doInsertEntry(TreeEntry newEntry) throws IOException {
-        int low = 0;
-        int high = size() - 1;
-        while (low <= high) {
-            int mid = (low + high) >> 1;
-            TreeEntry midVal = getTreeEntry(mid);
-            int cmp = midVal.compareTo(newEntry);
-            if (cmp < 0) {
-                low = mid + 1;
-            } else if (cmp > 0) {
-                high = mid - 1;
-            }
-        }
-        insertTreeEntry(low, newEntry);
-        return low;
-    }
-
-    private void insertTreeEntry(int index, TreeEntry entry) throws IOException {
-        int p = index - 1;
-        int n = index;
-        TreeEntry prevEntry = (p >= 0 && p < treeEntries.size()) ? treeEntries.get(p) : null;
-        TreeEntry nextEntry = (n >= 0 && n < treeEntries.size()) ? treeEntries.get(n) : null;
-        if (prevEntry != null) {
-            if (prevEntry.getNextPageId() == entry.getNextPageId()) {
-                prevEntry.setNextPageId(TreeEntry.NOT_SET);
-            }
-            if (entry.getPrevPageId() == TreeEntry.NOT_SET) {
-                entry.setPrevPageId(prevEntry.getNextPageId());
-            }
-        }
-        if (nextEntry != null) {
-            if (nextEntry.getPrevPageId() == entry.getPrevPageId()) {
-                nextEntry.setPrevPageId(TreeEntry.NOT_SET);
-            }
-            if (entry.getNextPageId() == TreeEntry.NOT_SET) {
-                entry.setNextPageId(nextEntry.getPrevPageId());
-            }
-        }
-        addTreeEntry(index, entry);
-    }
-
-    private void resetPageReference(int index, long pageId) {
-        int p = index - 1;
-        int n = index;
-        TreeEntry prevEntry = (p >= 0 && p < treeEntries.size()) ? treeEntries.get(p) : null;
-        TreeEntry nextEntry = (n >= 0 && n < treeEntries.size()) ? treeEntries.get(n) : null;
-        if (prevEntry != null) {
-            if (prevEntry.getNextPageId() == pageId) {
-                prevEntry.setNextPageId(TreeEntry.NOT_SET);
-            }
-        }
-        if (nextEntry != null) {
-            if (nextEntry.getPrevPageId() == pageId) {
-                nextEntry.setPrevPageId(TreeEntry.NOT_SET);
-            }
-        }
-    }
-
-    private boolean resetPageReference(long pageId) {
-        boolean updated = false;
-        for (TreeEntry entry : treeEntries) {
-            if (entry.getPrevPageId() == pageId) {
-                entry.setPrevPageId(TreeEntry.NOT_SET);
-                updated = true;
-            }
-            if (entry.getNextPageId() == pageId) {
-                entry.setNextPageId(TreeEntry.NOT_SET);
-                updated = true;
-            }
-        }
-        return updated;
-    }
-
-    private void resetParentId(long newParentId, List<TreeEntry> entries) throws IOException {
-        Set<Long> set = new HashSet<Long>();
-        for (TreeEntry entry : entries) {
-            if (entry != null) {
-                set.add(entry.getPrevPageId());
-                set.add(entry.getNextPageId());
-            }
-        }
-        for (Long pageId : set) {
-            TreePage page = tree.lookupPage(pageId);
-            if (page != null) {
-                page.setParentId(newParentId);
-            }
-        }
-    }
-
-    private void addTreeEntry(int index, TreeEntry entry) throws IOException {
-        treeEntries.add(index, entry);
-    }
-
-    private TreeEntry removeTreeEntry(int index) throws IOException {
-        TreeEntry result = treeEntries.remove(index);
-        return result;
-    }
-
-    private void removeAllTreeEntries(List<TreeEntry> c) {
-        treeEntries.removeAll(c);
-    }
-
-    private List<TreeEntry> getSubList(int from, int to) {
-        return new ArrayList<TreeEntry>(treeEntries.subList(from, to));
-    }
-
-    private TreeEntry getTreeEntry(int index) {
-        TreeEntry result = treeEntries.get(index);
-        return result;
-    }
-
-    void saveHeader() throws IOException {
-        tree.writePage(this);
-    }
-
-    void save() throws IOException {
-        tree.writeFullPage(this);
-    }
-
-    protected void dump() throws IOException {
-        LOG.info(this.toString());
-        Set<Long> set = new HashSet<Long>();
-        for (TreeEntry entry : treeEntries) {
-            if (entry != null) {
-                LOG.info(entry.toString());
-                set.add(entry.getPrevPageId());
-                set.add(entry.getNextPageId());
-            }
-        }
-        for (Long pageId : set) {
-            TreePage page = tree.lookupPage(pageId);
-            if (page != null) {
-                page.dump();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePageEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePageEntry.java
deleted file mode 100644
index fe5816f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePageEntry.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.kaha.impl.index.tree;
-
-/**
- * A conglomarate used for return results from a tree lookup
- * 
- * 
- */
-class TreePageEntry {
-
-    private TreeEntry treeEntry;
-    private TreePage treePage;
-    private TreePage.Flavour flavour;
-    private int index = -1;
-
-    TreePageEntry(TreeEntry treeEntry, TreePage treePage, TreePage.Flavour flavour, int index) {
-        this.treeEntry = treeEntry;
-        this.treePage = treePage;
-        this.flavour = flavour;
-        this.index = index;
-    }
-
-    /**
-     * @return the flavour
-     */
-    TreePage.Flavour getFlavour() {
-        return this.flavour;
-    }
-
-    /**
-     * @param flavour the flavour to set
-     */
-    void setFlavour(TreePage.Flavour flavour) {
-        this.flavour = flavour;
-    }
-
-    /**
-     * @return the treePage
-     */
-    TreePage getTreePage() {
-        return this.treePage;
-    }
-
-    /**
-     * @param treePage the treePage to set
-     */
-    void setTreePage(TreePage treePage) {
-        this.treePage = treePage;
-    }
-
-    /**
-     * @return the index
-     */
-    public int getIndex() {
-        return this.index;
-    }
-
-    /**
-     * @param index the index to set
-     */
-    public void setIndex(int index) {
-        this.index = index;
-    }
-
-    /**
-     * @return the treeEntry
-     */
-    public TreeEntry getTreeEntry() {
-        return this.treeEntry;
-    }
-
-    /**
-     * @param treeEntry the treeEntry to set
-     */
-    public void setTreeEntry(TreeEntry treeEntry) {
-        this.treeEntry = treeEntry;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/package.html
deleted file mode 100755
index 2ab5661..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-BTree implementation of an index for a Map
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/package.html
deleted file mode 100755
index 2ec1d4b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Kaha implementation classes
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/package.html
deleted file mode 100755
index ea1503a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	fast message persistence implementation
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/BoundaryStatisticImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/BoundaryStatisticImpl.java
deleted file mode 100755
index ef77350..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/BoundaryStatisticImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.management;
-
-
-/**
- * A boundary statistic implementation
- *
- * 
- */
-public class BoundaryStatisticImpl extends StatisticImpl {
-    private long lowerBound;
-    private long upperBound;
-
-    public BoundaryStatisticImpl(String name, String unit, String description, long lowerBound, long upperBound) {
-        super(name, unit, description);
-        this.lowerBound = lowerBound;
-        this.upperBound = upperBound;
-    }
-
-    public long getLowerBound() {
-        return lowerBound;
-    }
-
-    public long getUpperBound() {
-        return upperBound;
-    }
-
-    protected void appendFieldDescription(StringBuffer buffer) {
-        buffer.append(" lowerBound: ");
-        buffer.append(Long.toString(lowerBound));
-        buffer.append(" upperBound: ");
-        buffer.append(Long.toString(upperBound));
-        super.appendFieldDescription(buffer);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/BoundedRangeStatisticImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/BoundedRangeStatisticImpl.java
deleted file mode 100755
index 35d31d3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/BoundedRangeStatisticImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.management;
-
-
-/**
- * A bounded range statistic implementation
- *
- * 
- */
-public class BoundedRangeStatisticImpl extends RangeStatisticImpl {
-    private long lowerBound;
-    private long upperBound;
-
-    public BoundedRangeStatisticImpl(String name, String unit, String description, long lowerBound, long upperBound) {
-        super(name, unit, description);
-        this.lowerBound = lowerBound;
-        this.upperBound = upperBound;
-    }
-
-    public long getLowerBound() {
-        return lowerBound;
-    }
-
-    public long getUpperBound() {
-        return upperBound;
-    }
-
-    protected void appendFieldDescription(StringBuffer buffer) {
-        buffer.append(" lowerBound: ");
-        buffer.append(Long.toString(lowerBound));
-        buffer.append(" upperBound: ");
-        buffer.append(Long.toString(upperBound));
-        super.appendFieldDescription(buffer);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
deleted file mode 100755
index b88ba1c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.management;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.management.j2ee.statistics.CountStatistic;
-
-/**
- * A count statistic implementation
- * 
- * 
- */
-public class CountStatisticImpl extends StatisticImpl implements CountStatistic {
-
-    private final AtomicLong counter = new AtomicLong(0);
-    private CountStatisticImpl parent;
-
-    public CountStatisticImpl(CountStatisticImpl parent, String name, String description) {
-        this(name, description);
-        this.parent = parent;
-    }
-
-    public CountStatisticImpl(String name, String description) {
-        this(name, "count", description);
-    }
-
-    public CountStatisticImpl(String name, String unit, String description) {
-        super(name, unit, description);
-    }
-
-    public void reset() {
-        if (isDoReset()) {
-            super.reset();
-            counter.set(0);
-        }
-    }
-
-    public long getCount() {
-        return counter.get();
-    }
-
-    public void setCount(long count) {
-        if (isEnabled()) {
-            counter.set(count);
-        }
-    }
-
-    public void add(long amount) {
-        if (isEnabled()) {
-            counter.addAndGet(amount);
-            updateSampleTime();
-            if (parent != null) {
-                parent.add(amount);
-            }
-        }
-    }
-
-    public void increment() {
-        if (isEnabled()) {
-            counter.incrementAndGet();
-            updateSampleTime();
-            if (parent != null) {
-                parent.increment();
-            }
-        }
-    }
-
-    public void subtract(long amount) {
-        if (isEnabled()) {
-            counter.addAndGet(-amount);
-            updateSampleTime();
-            if (parent != null) {
-                parent.subtract(amount);
-            }
-        }
-    }
-
-    public void decrement() {
-        if (isEnabled()) {
-            counter.decrementAndGet();
-            updateSampleTime();
-            if (parent != null) {
-                parent.decrement();
-            }
-        }
-    }
-
-    public CountStatisticImpl getParent() {
-        return parent;
-    }
-
-    public void setParent(CountStatisticImpl parent) {
-        this.parent = parent;
-    }
-
-    protected void appendFieldDescription(StringBuffer buffer) {
-        buffer.append(" count: ");
-        buffer.append(Long.toString(counter.get()));
-        super.appendFieldDescription(buffer);
-    }
-
-    /**
-     * @return the average time period that elapses between counter increments
-     *         since the last reset.
-     */
-    public double getPeriod() {
-        double count = counter.get();
-        if (count == 0) {
-            return 0;
-        }
-        double time = System.currentTimeMillis() - getStartTime();
-        return time / (count * 1000.0);
-    }
-
-    /**
-     * @return the number of times per second that the counter is incrementing
-     *         since the last reset.
-     */
-    public double getFrequency() {
-        double count = counter.get();
-        double time = System.currentTimeMillis() - getStartTime();
-        return count * 1000.0 / time;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAConnectionPoolStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAConnectionPoolStatsImpl.java
deleted file mode 100755
index 4f77310..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAConnectionPoolStatsImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.management;
-
-/**
- * Statistics for a JCA connection pool
- * 
- * 
- */
-public class JCAConnectionPoolStatsImpl extends JCAConnectionStatsImpl {
-    private CountStatisticImpl closeCount;
-    private CountStatisticImpl createCount;
-    private BoundedRangeStatisticImpl freePoolSize;
-    private BoundedRangeStatisticImpl poolSize;
-    private RangeStatisticImpl waitingThreadCount;
-
-    public JCAConnectionPoolStatsImpl(String connectionFactory, String managedConnectionFactory, TimeStatisticImpl waitTime, TimeStatisticImpl useTime,
-                                      CountStatisticImpl closeCount, CountStatisticImpl createCount, BoundedRangeStatisticImpl freePoolSize, BoundedRangeStatisticImpl poolSize,
-                                      RangeStatisticImpl waitingThreadCount) {
-        super(connectionFactory, managedConnectionFactory, waitTime, useTime);
-        this.closeCount = closeCount;
-        this.createCount = createCount;
-        this.freePoolSize = freePoolSize;
-        this.poolSize = poolSize;
-        this.waitingThreadCount = waitingThreadCount;
-
-        // lets add named stats
-        addStatistic("freePoolSize", freePoolSize);
-        addStatistic("poolSize", poolSize);
-        addStatistic("waitingThreadCount", waitingThreadCount);
-    }
-
-    public CountStatisticImpl getCloseCount() {
-        return closeCount;
-    }
-
-    public CountStatisticImpl getCreateCount() {
-        return createCount;
-    }
-
-    public BoundedRangeStatisticImpl getFreePoolSize() {
-        return freePoolSize;
-    }
-
-    public BoundedRangeStatisticImpl getPoolSize() {
-        return poolSize;
-    }
-
-    public RangeStatisticImpl getWaitingThreadCount() {
-        return waitingThreadCount;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAConnectionStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAConnectionStatsImpl.java
deleted file mode 100755
index 1ffd7e6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAConnectionStatsImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.management;
-
-
-/**
- * Statistics for a JCA connection
- *
- * 
- */
-public class JCAConnectionStatsImpl extends StatsImpl {
-    private String connectionFactory;
-    private String managedConnectionFactory;
-    private TimeStatisticImpl waitTime;
-    private TimeStatisticImpl useTime;
-
-    public JCAConnectionStatsImpl(String connectionFactory, String managedConnectionFactory, TimeStatisticImpl waitTime, TimeStatisticImpl useTime) {
-        this.connectionFactory = connectionFactory;
-        this.managedConnectionFactory = managedConnectionFactory;
-        this.waitTime = waitTime;
-        this.useTime = useTime;
-
-        // lets add named stats
-        addStatistic("waitTime", waitTime);
-        addStatistic("useTime", useTime);
-    }
-
-    public String getConnectionFactory() {
-        return connectionFactory;
-    }
-
-    public String getManagedConnectionFactory() {
-        return managedConnectionFactory;
-    }
-
-    public TimeStatisticImpl getWaitTime() {
-        return waitTime;
-    }
-
-    public TimeStatisticImpl getUseTime() {
-        return useTime;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAStatsImpl.java
deleted file mode 100755
index fe4f0f1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JCAStatsImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.management;
-
-
-/**
- * Statistics for a number of JCA connections and connection pools
- *
- * 
- */
-public class JCAStatsImpl extends StatsImpl {
-    private JCAConnectionStatsImpl[] connectionStats;
-    private JCAConnectionPoolStatsImpl[] connectionPoolStats;
-
-    public JCAStatsImpl(JCAConnectionStatsImpl[] connectionStats, JCAConnectionPoolStatsImpl[] connectionPoolStats) {
-        this.connectionStats = connectionStats;
-        this.connectionPoolStats = connectionPoolStats;
-    }
-
-    public JCAConnectionStatsImpl[] getConnections() {
-        return connectionStats;
-    }
-
-    public JCAConnectionPoolStatsImpl[] getConnectionPools() {
-        return connectionPoolStats;
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConnectionStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConnectionStatsImpl.java
deleted file mode 100755
index 6be5c2d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConnectionStatsImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.management;
-
-import java.util.List;
-
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * Statistics for a JMS connection
- * 
- * 
- */
-public class JMSConnectionStatsImpl extends StatsImpl {
-    private List sessions;
-    private boolean transactional;
-
-    public JMSConnectionStatsImpl(List sessions, boolean transactional) {
-        this.sessions = sessions;
-        this.transactional = transactional;
-    }
-
-    public JMSSessionStatsImpl[] getSessions() {
-        // lets make a snapshot before we process them
-        Object[] sessionArray = sessions.toArray();
-        int size = sessionArray.length;
-        JMSSessionStatsImpl[] answer = new JMSSessionStatsImpl[size];
-        for (int i = 0; i < size; i++) {
-            ActiveMQSession session = (ActiveMQSession)sessionArray[i];
-            answer[i] = session.getSessionStats();
-        }
-        return answer;
-    }
-
-    public void reset() {
-        super.reset();
-        JMSSessionStatsImpl[] stats = getSessions();
-        int size = stats.length;
-        for (int i = 0; i < size; i++) {
-            stats[i].reset();
-        }
-    }
-
-    /**
-     * @param enabled the enabled to set
-     */
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        JMSSessionStatsImpl[] stats = getSessions();
-        int size = stats.length;
-        for (int i = 0; i < size; i++) {
-            stats[i].setEnabled(enabled);
-        }
-
-    }
-
-    public boolean isTransactional() {
-        return transactional;
-    }
-
-    public String toString() {
-        StringBuffer buffer = new StringBuffer("connection{ ");
-        JMSSessionStatsImpl[] array = getSessions();
-        for (int i = 0; i < array.length; i++) {
-            if (i > 0) {
-                buffer.append(", ");
-            }
-            buffer.append(Integer.toString(i));
-            buffer.append(" = ");
-            buffer.append(array[i]);
-        }
-        buffer.append(" }");
-        return buffer.toString();
-    }
-
-    public void dump(IndentPrinter out) {
-        out.printIndent();
-        out.println("connection {");
-        out.incrementIndent();
-        JMSSessionStatsImpl[] array = getSessions();
-        for (int i = 0; i < array.length; i++) {
-            JMSSessionStatsImpl sessionStat = (JMSSessionStatsImpl)array[i];
-            out.printIndent();
-            out.println("session {");
-            out.incrementIndent();
-            sessionStat.dump(out);
-            out.decrementIndent();
-            out.printIndent();
-            out.println("}");
-        }
-        out.decrementIndent();
-        out.printIndent();
-        out.println("}");
-        out.flush();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConsumerStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConsumerStatsImpl.java
deleted file mode 100755
index a428462..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConsumerStatsImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.management;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * Statistics for a JMS consumer
- * 
- * 
- */
-public class JMSConsumerStatsImpl extends JMSEndpointStatsImpl {
-    private String origin;
-
-    public JMSConsumerStatsImpl(JMSSessionStatsImpl sessionStats, Destination destination) {
-        super(sessionStats);
-        if (destination != null) {
-            this.origin = destination.toString();
-        }
-    }
-
-    public JMSConsumerStatsImpl(CountStatisticImpl messageCount, CountStatisticImpl pendingMessageCount, CountStatisticImpl expiredMessageCount, TimeStatisticImpl messageWaitTime,
-                                TimeStatisticImpl messageRateTime, String origin) {
-        super(messageCount, pendingMessageCount, expiredMessageCount, messageWaitTime, messageRateTime);
-        this.origin = origin;
-    }
-
-    public String getOrigin() {
-        return origin;
-    }
-
-    public String toString() {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append("consumer ");
-        buffer.append(origin);
-        buffer.append(" { ");
-        buffer.append(super.toString());
-        buffer.append(" }");
-        return buffer.toString();
-    }
-
-    public void dump(IndentPrinter out) {
-        out.printIndent();
-        out.print("consumer ");
-        out.print(origin);
-        out.println(" {");
-        out.incrementIndent();
-
-        super.dump(out);
-
-        out.decrementIndent();
-        out.printIndent();
-        out.println("}");
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSEndpointStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSEndpointStatsImpl.java
deleted file mode 100755
index e0aa0c8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSEndpointStatsImpl.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * 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.management;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.util.IndentPrinter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Statistics for a JMS endpoint, typically a MessageProducer or MessageConsumer
- * but this class can also be used to represent statistics on a
- * {@link Destination} as well.
- * 
- * 
- */
-public class JMSEndpointStatsImpl extends StatsImpl {
-    private static final Logger LOG = LoggerFactory.getLogger(JMSEndpointStatsImpl.class);
-
-    protected CountStatisticImpl messageCount;
-    protected CountStatisticImpl pendingMessageCount;
-    protected CountStatisticImpl expiredMessageCount;
-    protected TimeStatisticImpl messageWaitTime;
-    protected TimeStatisticImpl messageRateTime;
-
-    /**
-     * This constructor is used to create statistics for a
-     * {@link MessageProducer} or {@link MessageConsumer} as it passes in a
-     * {@link Session} parent statistic.
-     * 
-     * @param sessionStats
-     */
-    public JMSEndpointStatsImpl(JMSSessionStatsImpl sessionStats) {
-        this();
-        setParent(messageCount, sessionStats.getMessageCount());
-        setParent(pendingMessageCount, sessionStats.getPendingMessageCount());
-        setParent(expiredMessageCount, sessionStats.getExpiredMessageCount());
-        setParent(messageWaitTime, sessionStats.getMessageWaitTime());
-        setParent(messageRateTime, sessionStats.getMessageRateTime());
-    }
-
-    /**
-     * This constructor is typically used to create a statistics object for a
-     * {@link Destination}
-     */
-    public JMSEndpointStatsImpl() {
-        this(new CountStatisticImpl("messageCount", "Number of messages processed"), new CountStatisticImpl("pendingMessageCount", "Number of pending messages"),
-             new CountStatisticImpl("expiredMessageCount", "Number of expired messages"),
-             new TimeStatisticImpl("messageWaitTime", "Time spent by a message before being delivered"), new TimeStatisticImpl("messageRateTime",
-                                                                                                                               "Time taken to process a message (thoughtput rate)"));
-    }
-
-    public JMSEndpointStatsImpl(CountStatisticImpl messageCount, CountStatisticImpl pendingMessageCount, CountStatisticImpl expiredMessageCount, TimeStatisticImpl messageWaitTime,
-                                TimeStatisticImpl messageRateTime) {
-        this.messageCount = messageCount;
-        this.pendingMessageCount = pendingMessageCount;
-        this.expiredMessageCount = expiredMessageCount;
-        this.messageWaitTime = messageWaitTime;
-        this.messageRateTime = messageRateTime;
-
-        // lets add named stats
-        addStatistic("messageCount", messageCount);
-        addStatistic("pendingMessageCount", pendingMessageCount);
-        addStatistic("expiredMessageCount", expiredMessageCount);
-        addStatistic("messageWaitTime", messageWaitTime);
-        addStatistic("messageRateTime", messageRateTime);
-    }
-
-    public synchronized void reset() {
-        super.reset();
-        messageCount.reset();
-        messageRateTime.reset();
-        pendingMessageCount.reset();
-        expiredMessageCount.reset();
-        messageWaitTime.reset();
-    }
-
-    public CountStatisticImpl getMessageCount() {
-        return messageCount;
-    }
-
-    public CountStatisticImpl getPendingMessageCount() {
-        return pendingMessageCount;
-    }
-
-    public CountStatisticImpl getExpiredMessageCount() {
-        return expiredMessageCount;
-    }
-
-    public TimeStatisticImpl getMessageRateTime() {
-        return messageRateTime;
-    }
-
-    public TimeStatisticImpl getMessageWaitTime() {
-        return messageWaitTime;
-    }
-
-    public String toString() {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append(messageCount);
-        buffer.append(" ");
-        buffer.append(messageRateTime);
-        buffer.append(" ");
-        buffer.append(pendingMessageCount);
-        buffer.append(" ");
-        buffer.append(expiredMessageCount);
-        buffer.append(" ");
-        buffer.append(messageWaitTime);
-        return buffer.toString();
-    }
-
-    public void onMessage() {
-        if (enabled) {
-            long start = messageCount.getLastSampleTime();
-            messageCount.increment();
-            long end = messageCount.getLastSampleTime();
-            messageRateTime.addTime(end - start);
-        }
-    }
-
-    @Override
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        messageCount.setEnabled(enabled);
-        messageRateTime.setEnabled(enabled);
-        pendingMessageCount.setEnabled(enabled);
-        expiredMessageCount.setEnabled(enabled);
-        messageWaitTime.setEnabled(enabled);
-    }
-
-    public void dump(IndentPrinter out) {
-        out.printIndent();
-        out.println(messageCount);
-        out.printIndent();
-        out.println(messageRateTime);
-        out.printIndent();
-        out.println(pendingMessageCount);
-        out.printIndent();
-        out.println(messageRateTime);
-        out.printIndent();
-        out.println(expiredMessageCount);
-        out.printIndent();
-        out.println(messageWaitTime);
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected void setParent(CountStatisticImpl child, CountStatisticImpl parent) {
-        if (child instanceof CountStatisticImpl && parent instanceof CountStatisticImpl) {
-            CountStatisticImpl c = (CountStatisticImpl)child;
-            c.setParent((CountStatisticImpl)parent);
-        } else {
-            LOG.warn("Cannot associate endpoint counters with session level counters as they are not both CountStatisticImpl clases. Endpoint: " + child + " session: " + parent);
-        }
-    }
-
-    protected void setParent(TimeStatisticImpl child, TimeStatisticImpl parent) {
-        if (child instanceof TimeStatisticImpl && parent instanceof TimeStatisticImpl) {
-            TimeStatisticImpl c = (TimeStatisticImpl)child;
-            c.setParent((TimeStatisticImpl)parent);
-        } else {
-            LOG.warn("Cannot associate endpoint counters with session level counters as they are not both TimeStatisticImpl clases. Endpoint: " + child + " session: " + parent);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSProducerStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSProducerStatsImpl.java
deleted file mode 100755
index 497940f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSProducerStatsImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.management;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * Statistics for a JMS producer
- * 
- * 
- */
-public class JMSProducerStatsImpl extends JMSEndpointStatsImpl {
-    private String destination;
-
-    public JMSProducerStatsImpl(JMSSessionStatsImpl sessionStats, Destination destination) {
-        super(sessionStats);
-        if (destination != null) {
-            this.destination = destination.toString();
-        }
-    }
-
-    public JMSProducerStatsImpl(CountStatisticImpl messageCount, CountStatisticImpl pendingMessageCount, CountStatisticImpl expiredMessageCount, TimeStatisticImpl messageWaitTime,
-                                TimeStatisticImpl messageRateTime, String destination) {
-        super(messageCount, pendingMessageCount, expiredMessageCount, messageWaitTime, messageRateTime);
-        this.destination = destination;
-    }
-
-    public String getDestination() {
-        return destination;
-    }
-
-    public String toString() {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append("producer ");
-        buffer.append(destination);
-        buffer.append(" { ");
-        buffer.append(super.toString());
-        buffer.append(" }");
-        return buffer.toString();
-    }
-
-    public void dump(IndentPrinter out) {
-        out.printIndent();
-        out.print("producer ");
-        out.print(destination);
-        out.println(" {");
-        out.incrementIndent();
-
-        super.dump(out);
-
-        out.decrementIndent();
-        out.printIndent();
-        out.println("}");
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSSessionStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSSessionStatsImpl.java
deleted file mode 100755
index ec8be9a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSSessionStatsImpl.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * 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.management;
-
-import java.util.List;
-
-import org.apache.activemq.ActiveMQMessageConsumer;
-import org.apache.activemq.ActiveMQMessageProducer;
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * Statistics for a JMS session
- * 
- * 
- */
-public class JMSSessionStatsImpl extends StatsImpl {
-    private List producers;
-    private List consumers;
-    private CountStatisticImpl messageCount;
-    private CountStatisticImpl pendingMessageCount;
-    private CountStatisticImpl expiredMessageCount;
-    private TimeStatisticImpl messageWaitTime;
-    private CountStatisticImpl durableSubscriptionCount;
-
-    private TimeStatisticImpl messageRateTime;
-
-    public JMSSessionStatsImpl(List producers, List consumers) {
-        this.producers = producers;
-        this.consumers = consumers;
-        this.messageCount = new CountStatisticImpl("messageCount", "Number of messages exchanged");
-        this.pendingMessageCount = new CountStatisticImpl("pendingMessageCount", "Number of pending messages");
-        this.expiredMessageCount = new CountStatisticImpl("expiredMessageCount", "Number of expired messages");
-        this.messageWaitTime = new TimeStatisticImpl("messageWaitTime",
-                                                     "Time spent by a message before being delivered");
-        this.durableSubscriptionCount = new CountStatisticImpl("durableSubscriptionCount",
-                                                               "The number of durable subscriptions");
-        this.messageWaitTime = new TimeStatisticImpl("messageWaitTime",
-                                                     "Time spent by a message before being delivered");
-        this.messageRateTime = new TimeStatisticImpl("messageRateTime",
-                                                     "Time taken to process a message (thoughtput rate)");
-
-        // lets add named stats
-        addStatistic("messageCount", messageCount);
-        addStatistic("pendingMessageCount", pendingMessageCount);
-        addStatistic("expiredMessageCount", expiredMessageCount);
-        addStatistic("messageWaitTime", messageWaitTime);
-        addStatistic("durableSubscriptionCount", durableSubscriptionCount);
-        addStatistic("messageRateTime", messageRateTime);
-    }
-
-    public JMSProducerStatsImpl[] getProducers() {
-        // lets make a snapshot before we process them
-        Object[] producerArray = producers.toArray();
-        int size = producerArray.length;
-        JMSProducerStatsImpl[] answer = new JMSProducerStatsImpl[size];
-        for (int i = 0; i < size; i++) {
-            ActiveMQMessageProducer producer = (ActiveMQMessageProducer)producerArray[i];
-            answer[i] = producer.getProducerStats();
-        }
-        return answer;
-    }
-
-    public JMSConsumerStatsImpl[] getConsumers() {
-        // lets make a snapshot before we process them
-        Object[] consumerArray = consumers.toArray();
-        int size = consumerArray.length;
-        JMSConsumerStatsImpl[] answer = new JMSConsumerStatsImpl[size];
-        for (int i = 0; i < size; i++) {
-            ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)consumerArray[i];
-            answer[i] = consumer.getConsumerStats();
-        }
-        return answer;
-    }
-
-    public void reset() {
-        super.reset();
-        JMSConsumerStatsImpl[] cstats = getConsumers();
-        int size = cstats.length;
-        for (int i = 0; i < size; i++) {
-            cstats[i].reset();
-        }
-        JMSProducerStatsImpl[] pstats = getProducers();
-        size = pstats.length;
-        for (int i = 0; i < size; i++) {
-            pstats[i].reset();
-        }
-    }
-
-    /**
-     * @param enabled the enabled to set
-     */
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        JMSConsumerStatsImpl[] cstats = getConsumers();
-        int size = cstats.length;
-        for (int i = 0; i < size; i++) {
-            cstats[i].setEnabled(enabled);
-        }
-        JMSProducerStatsImpl[] pstats = getProducers();
-        size = pstats.length;
-        for (int i = 0; i < size; i++) {
-            pstats[i].setEnabled(enabled);
-        }
-
-    }
-
-    public CountStatisticImpl getMessageCount() {
-        return messageCount;
-    }
-
-    public CountStatisticImpl getPendingMessageCount() {
-        return pendingMessageCount;
-    }
-
-    public CountStatisticImpl getExpiredMessageCount() {
-        return expiredMessageCount;
-    }
-
-    public TimeStatisticImpl getMessageWaitTime() {
-        return messageWaitTime;
-    }
-
-    public CountStatisticImpl getDurableSubscriptionCount() {
-        return durableSubscriptionCount;
-    }
-
-    public TimeStatisticImpl getMessageRateTime() {
-        return messageRateTime;
-    }
-
-    public String toString() {
-        StringBuffer buffer = new StringBuffer(" ");
-        buffer.append(messageCount);
-        buffer.append(" ");
-        buffer.append(messageRateTime);
-        buffer.append(" ");
-        buffer.append(pendingMessageCount);
-        buffer.append(" ");
-        buffer.append(expiredMessageCount);
-        buffer.append(" ");
-        buffer.append(messageWaitTime);
-        buffer.append(" ");
-        buffer.append(durableSubscriptionCount);
-
-        buffer.append(" producers{ ");
-        JMSProducerStatsImpl[] producerArray = getProducers();
-        for (int i = 0; i < producerArray.length; i++) {
-            if (i > 0) {
-                buffer.append(", ");
-            }
-            buffer.append(Integer.toString(i));
-            buffer.append(" = ");
-            buffer.append(producerArray[i]);
-        }
-        buffer.append(" } consumers{ ");
-        JMSConsumerStatsImpl[] consumerArray = getConsumers();
-        for (int i = 0; i < consumerArray.length; i++) {
-            if (i > 0) {
-                buffer.append(", ");
-            }
-            buffer.append(Integer.toString(i));
-            buffer.append(" = ");
-            buffer.append(consumerArray[i]);
-        }
-        buffer.append(" }");
-        return buffer.toString();
-    }
-
-    public void dump(IndentPrinter out) {
-        out.printIndent();
-        out.println(messageCount);
-        out.printIndent();
-        out.println(messageRateTime);
-        out.printIndent();
-        out.println(pendingMessageCount);
-        out.printIndent();
-        out.println(expiredMessageCount);
-        out.printIndent();
-        out.println(messageWaitTime);
-        out.printIndent();
-        out.println(durableSubscriptionCount);
-        out.println();
-
-        out.printIndent();
-        out.println("producers {");
-        out.incrementIndent();
-        JMSProducerStatsImpl[] producerArray = getProducers();
-        for (int i = 0; i < producerArray.length; i++) {
-            JMSProducerStatsImpl producer = (JMSProducerStatsImpl)producerArray[i];
-            producer.dump(out);
-        }
-        out.decrementIndent();
-        out.printIndent();
-        out.println("}");
-
-        out.printIndent();
-        out.println("consumers {");
-        out.incrementIndent();
-        JMSConsumerStatsImpl[] consumerArray = getConsumers();
-        for (int i = 0; i < consumerArray.length; i++) {
-            JMSConsumerStatsImpl consumer = (JMSConsumerStatsImpl)consumerArray[i];
-            consumer.dump(out);
-        }
-        out.decrementIndent();
-        out.printIndent();
-        out.println("}");
-    }
-
-    public void onCreateDurableSubscriber() {
-        durableSubscriptionCount.increment();
-    }
-
-    public void onRemoveDurableSubscriber() {
-        durableSubscriptionCount.decrement();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSStatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSStatsImpl.java
deleted file mode 100755
index 8beaaff..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSStatsImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.management;
-
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * Statistics for a number of JMS connections
- * 
- * 
- */
-public class JMSStatsImpl extends StatsImpl {
-    private List<ActiveMQConnection> connections = new CopyOnWriteArrayList<ActiveMQConnection>();
-
-    public JMSStatsImpl() {
-    }
-
-    public JMSConnectionStatsImpl[] getConnections() {
-        Object[] connectionArray = connections.toArray();
-        int size = connectionArray.length;
-        JMSConnectionStatsImpl[] answer = new JMSConnectionStatsImpl[size];
-        for (int i = 0; i < size; i++) {
-            ActiveMQConnection connection = (ActiveMQConnection)connectionArray[i];
-            answer[i] = connection.getConnectionStats();
-        }
-        return answer;
-    }
-
-    public void addConnection(ActiveMQConnection connection) {
-        connections.add(connection);
-    }
-
-    public void removeConnection(ActiveMQConnection connection) {
-        connections.remove(connection);
-    }
-
-    public void dump(IndentPrinter out) {
-        out.printIndent();
-        out.println("factory {");
-        out.incrementIndent();
-        JMSConnectionStatsImpl[] array = getConnections();
-        for (int i = 0; i < array.length; i++) {
-            JMSConnectionStatsImpl connectionStat = (JMSConnectionStatsImpl)array[i];
-            connectionStat.dump(out);
-        }
-        out.decrementIndent();
-        out.printIndent();
-        out.println("}");
-        out.flush();
-    }
-
-    /**
-     * @param enabled the enabled to set
-     */
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        JMSConnectionStatsImpl[] stats = getConnections();
-        int size = stats.length;
-        for (int i = 0; i < size; i++) {
-            stats[i].setEnabled(enabled);
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java
deleted file mode 100755
index 6b234b8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 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.management;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.management.j2ee.statistics.CountStatistic;
-
-/**
- * A count statistic implementation
- * 
- * 
- */
-public class PollCountStatisticImpl extends StatisticImpl implements CountStatistic {
-
-    private PollCountStatisticImpl parent;
-    private List<PollCountStatisticImpl> children;
-
-    public PollCountStatisticImpl(PollCountStatisticImpl parent, String name, String description) {
-        this(name, description);
-        setParent(parent);
-    }
-
-    public PollCountStatisticImpl(String name, String description) {
-        this(name, "count", description);
-    }
-
-    public PollCountStatisticImpl(String name, String unit, String description) {
-        super(name, unit, description);
-    }
-
-    public PollCountStatisticImpl getParent() {
-        return parent;
-    }
-
-    public void setParent(PollCountStatisticImpl parent) {
-        if (this.parent != null) {
-            this.parent.removeChild(this);
-        }
-        this.parent = parent;
-        if (this.parent != null) {
-            this.parent.addChild(this);
-        }
-    }
-
-    private synchronized void removeChild(PollCountStatisticImpl child) {
-        if (children != null) {
-            children.remove(child);
-        }
-    }
-
-    private synchronized void addChild(PollCountStatisticImpl child) {
-        if (children == null) {
-            children = new ArrayList<PollCountStatisticImpl>();
-        }
-        children.add(child);
-    }
-
-    public synchronized long getCount() {
-        if (children == null) {
-            return 0;
-        }
-        long count = 0;
-        for (Iterator<PollCountStatisticImpl> iter = children.iterator(); iter.hasNext();) {
-            PollCountStatisticImpl child = iter.next();
-            count += child.getCount();
-        }
-        return count;
-    }
-
-    protected void appendFieldDescription(StringBuffer buffer) {
-        buffer.append(" count: ");
-        buffer.append(Long.toString(getCount()));
-        super.appendFieldDescription(buffer);
-    }
-
-    /**
-     * @return the average time period that elapses between counter increments
-     *         since the last reset.
-     */
-    public double getPeriod() {
-        double count = getCount();
-        if (count == 0) {
-            return 0;
-        }
-        double time = System.currentTimeMillis() - getStartTime();
-        return time / (count * 1000.0);
-    }
-
-    /**
-     * @return the number of times per second that the counter is incrementing
-     *         since the last reset.
-     */
-    public double getFrequency() {
-        double count = getCount();
-        double time = System.currentTimeMillis() - getStartTime();
-        return count * 1000.0 / time;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/RangeStatisticImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/RangeStatisticImpl.java
deleted file mode 100755
index 7eaa72e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/RangeStatisticImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.management;
-
-
-/**
- * A range statistic implementation
- *
- * 
- */
-public class RangeStatisticImpl extends StatisticImpl {
-    private long highWaterMark;
-    private long lowWaterMark;
-    private long current;
-
-    public RangeStatisticImpl(String name, String unit, String description) {
-        super(name, unit, description);
-    }
-
-    public void reset() {
-        if (isDoReset()) {
-            super.reset();
-            current = 0;
-            lowWaterMark = 0;
-            highWaterMark = 0;
-        }
-    }
-
-    public long getHighWaterMark() {
-        return highWaterMark;
-    }
-
-    public long getLowWaterMark() {
-        return lowWaterMark;
-    }
-
-    public long getCurrent() {
-        return current;
-    }
-
-    public void setCurrent(long current) {
-        this.current = current;
-        if (current > highWaterMark) {
-            highWaterMark = current;
-        }
-        if (current < lowWaterMark || lowWaterMark == 0) {
-            lowWaterMark = current;
-        }
-        updateSampleTime();
-    }
-
-    protected void appendFieldDescription(StringBuffer buffer) {
-        buffer.append(" current: ");
-        buffer.append(Long.toString(current));
-        buffer.append(" lowWaterMark: ");
-        buffer.append(Long.toString(lowWaterMark));
-        buffer.append(" highWaterMark: ");
-        buffer.append(Long.toString(highWaterMark));
-        super.appendFieldDescription(buffer);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/Resettable.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/Resettable.java
deleted file mode 100755
index 518e8da..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/Resettable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.management;
-
-/**
- * Represents some statistic that is capable of being reset
- *
- * 
- */
-public interface Resettable {
-
-    /**
-     * Reset the statistic
-     */
-    void reset();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatisticImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatisticImpl.java
deleted file mode 100755
index 2cae2f9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatisticImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * 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.management;
-
-import javax.management.j2ee.statistics.Statistic;
-
-/**
- * Base class for a Statistic implementation
- * 
- * 
- */
-public class StatisticImpl implements Statistic, Resettable {
-
-    protected boolean enabled;
-
-    private String name;
-    private String unit;
-    private String description;
-    private long startTime;
-    private long lastSampleTime;
-    private boolean doReset = true;
-
-    public StatisticImpl(String name, String unit, String description) {
-        this.name = name;
-        this.unit = unit;
-        this.description = description;
-        this.startTime = System.currentTimeMillis();
-        this.lastSampleTime = this.startTime;
-    }
-
-    public synchronized void reset() {
-        if(isDoReset()) {
-            this.startTime = System.currentTimeMillis();
-            this.lastSampleTime = this.startTime;
-        }
-    }
-
-    protected synchronized void updateSampleTime() {
-        this.lastSampleTime = System.currentTimeMillis();
-    }
-
-    public synchronized String toString() {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append(name);
-        buffer.append("{");
-        appendFieldDescription(buffer);
-        buffer.append(" }");
-        return buffer.toString();
-    }
-
-    public String getName() {
-        return this.name;
-    }
-
-    public String getUnit() {
-        return this.unit;
-    }
-
-    public String getDescription() {
-        return this.description;
-    }
-
-    public synchronized long getStartTime() {
-        return this.startTime;
-    }
-
-    public synchronized long getLastSampleTime() {
-        return this.lastSampleTime;
-    }
-
-    /**
-     * @return the enabled
-     */
-    public boolean isEnabled() {
-        return this.enabled;
-    }
-
-    /**
-     * @param enabled the enabled to set
-     */
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-    
-    /**
-     * @return the doReset
-     */
-    public boolean isDoReset() {
-        return this.doReset;
-    }
-
-    /**
-     * @param doReset the doReset to set
-     */
-    public void setDoReset(boolean doReset) {
-        this.doReset = doReset;
-    }
-
-
-    protected synchronized void appendFieldDescription(StringBuffer buffer) {
-        buffer.append(" unit: ");
-        buffer.append(this.unit);
-        buffer.append(" startTime: ");
-        // buffer.append(new Date(startTime));
-        buffer.append(this.startTime);
-        buffer.append(" lastSampleTime: ");
-        // buffer.append(new Date(lastSampleTime));
-        buffer.append(this.lastSampleTime);
-        buffer.append(" description: ");
-        buffer.append(this.description);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsCapable.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsCapable.java
deleted file mode 100755
index 6ab0418..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsCapable.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.management;
-
-
-/**
- * Represents an object which is capable of providing some stats
- *
- * 
- */
-public interface StatsCapable {
-
-    /**
-     * @return the Stats for this object
-     */
-    StatsImpl getStats();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java
deleted file mode 100755
index 4e9e6b0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.management;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import javax.management.j2ee.statistics.Statistic;
-import javax.management.j2ee.statistics.Stats;
-/**
- * Base class for a Stats implementation
- * 
- * 
- */
-public class StatsImpl extends StatisticImpl implements Stats, Resettable {
-    //use a Set instead of a Map - to conserve Space
-    private Set<StatisticImpl> set;
-
-    public StatsImpl() {
-        this(new CopyOnWriteArraySet<StatisticImpl>());
-    }
-
-    public StatsImpl(Set<StatisticImpl> set) {
-        super("stats", "many", "Used only as container, not Statistic");
-        this.set = set;
-    }
-
-    public void reset() {
-        Statistic[] stats = getStatistics();
-        int size = stats.length;
-        for (int i = 0; i < size; i++) {
-            Statistic stat = stats[i];
-            if (stat instanceof Resettable) {
-                Resettable r = (Resettable) stat;
-                r.reset();
-            }
-        }
-    }
-
-    public Statistic getStatistic(String name) {
-        for (StatisticImpl stat : this.set) {
-            if (stat.getName() != null && stat.getName().equals(name)) {
-                return stat;
-            }
-        }
-        return null;
-    }
-
-    public String[] getStatisticNames() {
-        List<String> names = new ArrayList<String>();
-        for (StatisticImpl stat : this.set) {
-            names.add(stat.getName());
-        }
-        String[] answer = new String[names.size()];
-        names.toArray(answer);
-        return answer;
-    }
-
-    public Statistic[] getStatistics() {
-        Statistic[] answer = new Statistic[this.set.size()];
-        set.toArray(answer);
-        return answer;
-    }
-
-    protected void addStatistic(String name, StatisticImpl statistic) {
-        this.set.add(statistic);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/TimeStatisticImpl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/management/TimeStatisticImpl.java
deleted file mode 100755
index 6e0211e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/TimeStatisticImpl.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * 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.management;
-
-
-/**
- * A time statistic implementation
- *
- * 
- */
-public class TimeStatisticImpl extends StatisticImpl {
-    private long count;
-    private long maxTime;
-    private long minTime;
-    private long totalTime;
-    private TimeStatisticImpl parent;
-
-    public TimeStatisticImpl(String name, String description) {
-        this(name, "millis", description);
-    }
-
-    public TimeStatisticImpl(TimeStatisticImpl parent, String name, String description) {
-        this(name, description);
-        this.parent = parent;
-    }
-
-    public TimeStatisticImpl(String name, String unit, String description) {
-        super(name, unit, description);
-    }
-
-    public synchronized void reset() {
-        if(isDoReset()) {
-            super.reset();
-            count = 0;
-            maxTime = 0;
-            minTime = 0;
-            totalTime = 0;
-        }
-    }
-
-    public synchronized long getCount() {
-        return count;
-    }
-
-    public synchronized void addTime(long time) {
-        count++;
-        totalTime += time;
-        if (time > maxTime) {
-            maxTime = time;
-        }
-        if (time < minTime || minTime == 0) {
-            minTime = time;
-        }
-        updateSampleTime();
-        if (parent != null) {
-            parent.addTime(time);
-        }
-    }
-
-    /**
-     * @return the maximum time of any step
-     */
-    public long getMaxTime() {
-        return maxTime;
-    }
-
-    /**
-     * @return the minimum time of any step
-     */
-    public synchronized long getMinTime() {
-        return minTime;
-    }
-
-    /**
-     * @return the total time of all the steps added together
-     */
-    public synchronized long getTotalTime() {
-        return totalTime;
-    }
-
-    /**
-     * @return the average time calculated by dividing the
-     *         total time by the number of counts
-     */
-    public synchronized double getAverageTime() {
-        if (count == 0) {
-            return 0;
-        }
-        double d = totalTime;
-        return d / count;
-    }
-
-
-    /**
-     * @return the average time calculated by dividing the
-     *         total time by the number of counts but excluding the
-     *         minimum and maximum times.
-     */
-    public synchronized double getAverageTimeExcludingMinMax() {
-        if (count <= 2) {
-            return 0;
-        }
-        double d = totalTime - minTime - maxTime;
-        return d / (count - 2);
-    }
-
-
-    /**
-     * @return the average number of steps per second
-     */
-    public double getAveragePerSecond() {
-        double d = 1000;
-        double averageTime = getAverageTime();
-        if (averageTime == 0) {
-            return 0;
-        }
-        return d / averageTime;
-    }
-
-    /**
-     * @return the average number of steps per second excluding the min & max values
-     */
-    public double getAveragePerSecondExcludingMinMax() {
-        double d = 1000;
-        double average = getAverageTimeExcludingMinMax();
-        if (average == 0) {
-            return 0;
-        }
-        return d / average;
-    }
-
-    public TimeStatisticImpl getParent() {
-        return parent;
-    }
-
-    public void setParent(TimeStatisticImpl parent) {
-        this.parent = parent;
-    }
-
-    protected synchronized void appendFieldDescription(StringBuffer buffer) {
-        buffer.append(" count: ");
-        buffer.append(Long.toString(count));
-        buffer.append(" maxTime: ");
-        buffer.append(Long.toString(maxTime));
-        buffer.append(" minTime: ");
-        buffer.append(Long.toString(minTime));
-        buffer.append(" totalTime: ");
-        buffer.append(Long.toString(totalTime));
-        buffer.append(" averageTime: ");
-        buffer.append(Double.toString(getAverageTime()));
-        buffer.append(" averageTimeExMinMax: ");
-        buffer.append(Double.toString(getAverageTimeExcludingMinMax()));
-        buffer.append(" averagePerSecond: ");
-        buffer.append(Double.toString(getAveragePerSecond()));
-        buffer.append(" averagePerSecondExMinMax: ");
-        buffer.append(Double.toString(getAveragePerSecondExcludingMinMax()));
-        super.appendFieldDescription(buffer);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/management/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/management/package.html
deleted file mode 100755
index 0adf102..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/management/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	An implementation of the J2EE Management API
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/Cache.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/Cache.java
deleted file mode 100755
index fcd713d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/Cache.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.memory;
-
-/**
- * Defines the interface used to cache messages.
- * 
- * 
- */
-public interface Cache {
-
-    /**
-     * Gets an object that was previously <code>put</code> into this object.
-     * 
-     * @param msgid
-     * @return null if the object was not previously put or if the object has
-     *         expired out of the cache.
-     */
-    Object get(Object key);
-
-    /**
-     * Puts an object into the cache.
-     * 
-     * @param messageID
-     * @param message
-     */
-    Object put(Object key, Object value);
-
-    /**
-     * Removes an object from the cache.
-     * 
-     * @param messageID
-     * @return the object associated with the key if it was still in the cache.
-     */
-    Object remove(Object key);
-
-    /**
-     * Lets a cache know it will not be used any further and that it can release
-     * acquired resources
-     */
-    void close();
-
-    /**
-     * How big is the cache right now?
-     * 
-     * @return
-     */
-    int size();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntry.java
deleted file mode 100755
index 8f256cf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntry.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.memory;
-
-public class CacheEntry {
-
-    public final Object key;
-    public final Object value;
-
-    public CacheEntry next;
-    public CacheEntry previous;
-    public CacheEntryList owner;
-
-    public CacheEntry(Object key, Object value) {
-        this.key = key;
-        this.value = value;
-    }
-
-    /**
-     * 
-     * @param entry
-     * @return false if you are trying to remove the tail pointer.
-     */
-    public boolean remove() {
-
-        // Cannot remove if this is a tail pointer.
-        // Or not linked.
-        if (owner == null || this.key == null || this.next == null) {
-            return false;
-        }
-
-        synchronized (owner.tail) {
-            this.next.previous = this.previous;
-            this.previous.next = this.next;
-            this.owner = null;
-            this.next = null;
-            this.previous = null;
-        }
-
-        return true;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntryList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntryList.java
deleted file mode 100755
index 4b2bf21..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEntryList.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.memory;
-
-/**
- * Maintains a simple linked list of CacheEntry objects. It is thread safe.
- * 
- * 
- */
-public class CacheEntryList {
-
-    // Points at the tail of the CacheEntry list
-    public final CacheEntry tail = new CacheEntry(null, null);
-
-    public CacheEntryList() {
-        tail.next = tail;
-        tail.previous = tail;
-    }
-
-    public void add(CacheEntry ce) {
-        addEntryBefore(tail, ce);
-    }
-
-    private void addEntryBefore(CacheEntry position, CacheEntry ce) {
-        assert ce.key != null && ce.next == null && ce.owner == null;
-
-        synchronized (tail) {
-            ce.owner = this;
-            ce.next = position;
-            ce.previous = position.previous;
-            ce.previous.next = ce;
-            ce.next.previous = ce;
-        }
-    }
-
-    public void clear() {
-        synchronized (tail) {
-            tail.next = tail;
-            tail.previous = tail;
-        }
-    }
-
-    public CacheEvictor createFIFOCacheEvictor() {
-        return new CacheEvictor() {
-            public CacheEntry evictCacheEntry() {
-                CacheEntry rc;
-                synchronized (tail) {
-                    rc = tail.next;
-                }
-                return rc.remove() ? rc : null;
-            }
-        };
-    }
-
-    public CacheEvictor createLIFOCacheEvictor() {
-        return new CacheEvictor() {
-            public CacheEntry evictCacheEntry() {
-                CacheEntry rc;
-                synchronized (tail) {
-                    rc = tail.previous;
-                }
-                return rc.remove() ? rc : null;
-            }
-        };
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
deleted file mode 100755
index 53a3316..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.memory;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.Usage;
-import org.apache.activemq.usage.UsageListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class CacheEvictionUsageListener implements UsageListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CacheEvictionUsageListener.class);
-
-    private final List<CacheEvictor> evictors = new CopyOnWriteArrayList<CacheEvictor>();
-    private final int usageHighMark;
-    private final int usageLowMark;
-
-    private final TaskRunner evictionTask;
-    private final Usage usage;
-
-    public CacheEvictionUsageListener(Usage usage, int usageHighMark, int usageLowMark, TaskRunnerFactory taskRunnerFactory) {
-        this.usage = usage;
-        this.usageHighMark = usageHighMark;
-        this.usageLowMark = usageLowMark;
-        evictionTask = taskRunnerFactory.createTaskRunner(new Task() {
-            public boolean iterate() {
-                return evictMessages();
-            }
-        }, "Cache Evictor: " + System.identityHashCode(this));
-    }
-
-    boolean evictMessages() {
-        // Try to take the memory usage down below the low mark.
-        LOG.debug("Evicting cache memory usage: " + usage.getPercentUsage());
-
-        List<CacheEvictor> list = new LinkedList<CacheEvictor>(evictors);
-        while (list.size() > 0 && usage.getPercentUsage() > usageLowMark) {
-
-            // Evenly evict messages from all evictors
-            for (Iterator<CacheEvictor> iter = list.iterator(); iter.hasNext();) {
-                CacheEvictor evictor = iter.next();
-                if (evictor.evictCacheEntry() == null) {
-                    iter.remove();
-                }
-            }
-        }
-        return false;
-    }
-
-    public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
-        // Do we need to start evicting cache entries? Usage > than the
-        // high mark
-        if (oldPercentUsage < newPercentUsage && usage.getPercentUsage() >= usageHighMark) {
-            try {
-                evictionTask.wakeup();
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-            }
-        }
-    }
-
-    public void add(CacheEvictor evictor) {
-        evictors.add(evictor);
-    }
-
-    public void remove(CacheEvictor evictor) {
-        evictors.remove(evictor);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictor.java
deleted file mode 100755
index b591025..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictor.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.memory;
-
-public interface CacheEvictor {
-    
-    CacheEntry evictCacheEntry();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheFilter.java
deleted file mode 100755
index 073eac0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheFilter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.memory;
-
-
-/**
- * Filters another Cache implementation.
- * 
- * 
- */
-public class CacheFilter implements Cache {
-    
-    protected final Cache next;
-    
-    public CacheFilter(Cache next) {
-        this.next = next;
-    }
-
-    public Object put(Object key, Object value) {
-        return next.put(key, value);
-    }
-
-    public Object get(Object key) {
-        return next.get(key);
-    }
-
-    public Object remove(Object key) {
-        return next.remove(key);
-    }
-    
-    public void close() {
-        next.close();
-    }
-
-    public int size() {
-        return next.size();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/LRUMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/LRUMap.java
deleted file mode 100755
index d0b4e44..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/LRUMap.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.memory;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * A simple least-recently-used cache of a fixed size.
- * 
- * 
- */
-public class LRUMap<K,V> extends LinkedHashMap<K,V>{
-
-    protected static final float DEFAULT_LOAD_FACTOR = (float) 0.75;
-    protected static final int DEFAULT_INITIAL_CAPACITY = 5000;
-    private static final long serialVersionUID = -9179676638408888162L;
-
-    private int maximumSize;
-
-    public LRUMap(int maximumSize) {
-        this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, true, maximumSize);
-    }
-
-    public LRUMap(int maximumSize, boolean accessOrder) {
-        this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, accessOrder, maximumSize);
-    }
-
-    public LRUMap(int initialCapacity, float loadFactor, boolean accessOrder, int maximumSize) {
-        super(initialCapacity, loadFactor, accessOrder);
-        this.maximumSize = maximumSize;
-    }
-
-    protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
-        return size() > maximumSize;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/MapCache.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/MapCache.java
deleted file mode 100755
index 17c0815..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/MapCache.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.memory;
-
-import java.util.Map;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Use any Map to implement the Cache.  No cache eviction going on here.  Just gives
- * a Map a Cache interface.
- * 
- * 
- */
-public class MapCache implements Cache {
-    
-    protected final Map<Object, Object> map;
-    
-    public MapCache() {
-        this(new ConcurrentHashMap<Object, Object>());
-    }
-    
-    public MapCache(Map<Object, Object> map) {
-        this.map = map;
-    }
-
-    public Object put(Object key, Object value) {
-        return map.put(key, value);
-    }
-
-    public Object get(Object key) {
-        return map.get(key);
-    }
-
-    public Object remove(Object key) {
-        return map.remove(key);
-    }
-    
-    public void close() {
-        map.clear();
-    }
-
-    public int size() {
-        return map.size();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManagerCacheFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManagerCacheFilter.java
deleted file mode 100755
index ee9fbb5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManagerCacheFilter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.memory;
-
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.activemq.usage.MemoryUsage;
-
-/**
- * Simple CacheFilter that increases/decreases usage on a UsageManager as
- * objects are added/removed from the Cache.
- * 
- * 
- */
-public class UsageManagerCacheFilter extends CacheFilter {
-
-    private final AtomicLong totalUsage = new AtomicLong(0);
-    private final MemoryUsage usage;
-
-    public UsageManagerCacheFilter(Cache next, MemoryUsage um) {
-        super(next);
-        this.usage = um;
-    }
-
-    public Object put(Object key, Object value) {
-        long usageValue = getUsageOfAddedObject(value);
-        Object rc = super.put(key, value);
-        if (rc != null) {
-            usageValue -= getUsageOfRemovedObject(rc);
-        }
-        totalUsage.addAndGet(usageValue);
-        usage.increaseUsage(usageValue);
-        return rc;
-    }
-
-    public Object remove(Object key) {
-        Object rc = super.remove(key);
-        if (rc != null) {
-            long usageValue = getUsageOfRemovedObject(rc);
-            totalUsage.addAndGet(-usageValue);
-            usage.decreaseUsage(usageValue);
-        }
-        return rc;
-    }
-
-    protected long getUsageOfAddedObject(Object value) {
-        return 1;
-    }
-
-    protected long getUsageOfRemovedObject(Object value) {
-        return 1;
-    }
-
-    public void close() {
-        usage.decreaseUsage(totalUsage.get());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageBuffer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageBuffer.java
deleted file mode 100644
index c34a0d8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageBuffer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.memory.buffer;
-
-/**
- * Represents a collection of MessageQueue instances which are all bound by the
- * same memory buffer to fix the amount of RAM used to some uppper bound.
- * 
- * 
- */
-public interface MessageBuffer {
-
-    int getSize();
-
-    /**
-     * Creates a new message queue instance
-     */
-    MessageQueue createMessageQueue();
-
-    /**
-     * After a message queue has changed we may need to perform some evictions
-     * 
-     * @param delta
-     * @param queueSize
-     */
-    void onSizeChanged(MessageQueue queue, int delta, int queueSize);
-
-    void clear();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageQueue.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageQueue.java
deleted file mode 100644
index c4ab3f6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageQueue.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.memory.buffer;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.Message;
-
-/**
- * Allows messages to be added to the end of the buffer such that they are kept
- * around and evicted in a FIFO manner.
- * 
- * 
- */
-public class MessageQueue {
-
-    private MessageBuffer buffer;
-    private LinkedList<MessageReference> list = new LinkedList<MessageReference>();
-    private int size;
-    private Object lock = new Object();
-    private int position;
-
-    public MessageQueue(MessageBuffer buffer) {
-        this.buffer = buffer;
-    }
-
-    public void add(MessageReference messageRef) {
-        Message message = messageRef.getMessageHardRef();
-        int delta = message.getSize();
-        int newSize = 0;
-        synchronized (lock) {
-            list.add(messageRef);
-            size += delta;
-            newSize = size;
-        }
-        buffer.onSizeChanged(this, delta, newSize);
-    }
-    
-    public void add(ActiveMQMessage message) {
-        int delta = message.getSize();
-        int newSize = 0;
-        synchronized (lock) {
-            list.add(message);
-            size += delta;
-            newSize = size;
-        }
-        buffer.onSizeChanged(this, delta, newSize);
-    }
-
-    public int evictMessage() {
-        synchronized (lock) {
-            if (!list.isEmpty()) {
-                ActiveMQMessage message = (ActiveMQMessage) list.removeFirst();
-                int messageSize = message.getSize();
-                size -= messageSize;
-                return messageSize;
-            }
-        }
-        return 0;
-    }
-
-    /**
-     * Returns a copy of the list
-     */
-    public List<MessageReference> getList() {
-        synchronized (lock) {
-            return new ArrayList<MessageReference>(list);
-        }
-    }
-
-    public void appendMessages(List<MessageReference> answer) {
-        synchronized (lock) {
-            for (Iterator<MessageReference> iter = list.iterator(); iter.hasNext();) {
-                answer.add(iter.next());
-            }
-        }
-    }
-
-    public int getSize() {
-        synchronized (lock) {
-            return size;
-        }
-    }
-
-    public int getPosition() {
-        return position;
-    }
-
-    public void setPosition(int position) {
-        this.position = position;
-    }
-
-    public void clear() {
-        synchronized (lock) {
-            list.clear();
-            size = 0;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/OrderBasedMessageBuffer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/OrderBasedMessageBuffer.java
deleted file mode 100644
index 45b7781..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/OrderBasedMessageBuffer.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.memory.buffer;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-
-/**
- * A {@link MessageBuffer} which evicts messages in arrival order so the oldest
- * messages are removed first.
- * 
- * 
- */
-public class OrderBasedMessageBuffer implements MessageBuffer {
-
-    private int limit = 100 * 64 * 1024;
-    private LinkedList<MessageQueue> list = new LinkedList<MessageQueue>();
-    private int size;
-    private Object lock = new Object();
-
-    public OrderBasedMessageBuffer() {
-    }
-
-    public OrderBasedMessageBuffer(int limit) {
-        this.limit = limit;
-    }
-
-    public int getSize() {
-        synchronized (lock) {
-            return size;
-        }
-    }
-
-    /**
-     * Creates a new message queue instance
-     */
-    public MessageQueue createMessageQueue() {
-        return new MessageQueue(this);
-    }
-
-    /**
-     * After a message queue has changed we may need to perform some evictions
-     * 
-     * @param delta
-     * @param queueSize
-     */
-    public void onSizeChanged(MessageQueue queue, int delta, int queueSize) {
-        synchronized (lock) {
-            list.addLast(queue);
-            size += delta;
-            while (size > limit) {
-                MessageQueue biggest = list.removeFirst();
-                size -= biggest.evictMessage();
-            }
-        }
-    }
-
-    public void clear() {
-        synchronized (lock) {
-            for (Iterator<MessageQueue> iter = list.iterator(); iter.hasNext();) {
-                MessageQueue queue = iter.next();
-                queue.clear();
-            }
-            size = 0;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/SizeBasedMessageBuffer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/SizeBasedMessageBuffer.java
deleted file mode 100644
index 51cb0b3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/SizeBasedMessageBuffer.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.memory.buffer;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * A {@link MessageBuffer} which evicts from the largest buffers first.
- * 
- * 
- */
-public class SizeBasedMessageBuffer implements MessageBuffer {
-
-    private int limit = 100 * 64 * 1024;
-    private List<MessageQueue> bubbleList = new ArrayList<MessageQueue>();
-    private int size;
-    private Object lock = new Object();
-
-    public SizeBasedMessageBuffer() {
-    }
-
-    public SizeBasedMessageBuffer(int limit) {
-        this.limit = limit;
-    }
-
-    public int getSize() {
-        synchronized (lock) {
-            return size;
-        }
-    }
-
-    /**
-     * Creates a new message queue instance
-     */
-    public MessageQueue createMessageQueue() {
-        MessageQueue queue = new MessageQueue(this);
-        synchronized (lock) {
-            queue.setPosition(bubbleList.size());
-            bubbleList.add(queue);
-        }
-        return queue;
-    }
-
-    /**
-     * After a message queue has changed we may need to perform some evictions
-     * 
-     * @param delta
-     * @param queueSize
-     */
-    public void onSizeChanged(MessageQueue queue, int delta, int queueSize) {
-        synchronized (lock) {
-            bubbleUp(queue, queueSize);
-
-            size += delta;
-            while (size > limit) {
-                MessageQueue biggest = bubbleList.get(0);
-                size -= biggest.evictMessage();
-
-                bubbleDown(biggest, 0);
-            }
-        }
-    }
-
-    public void clear() {
-        synchronized (lock) {
-            for (Iterator<MessageQueue> iter = bubbleList.iterator(); iter.hasNext();) {
-                MessageQueue queue = iter.next();
-                queue.clear();
-            }
-            size = 0;
-        }
-    }
-
-    protected void bubbleUp(MessageQueue queue, int queueSize) {
-        // lets bubble up to head of queueif we need to
-        int position = queue.getPosition();
-        while (--position >= 0) {
-            MessageQueue pivot = bubbleList.get(position);
-            if (pivot.getSize() < queueSize) {
-                swap(position, pivot, position + 1, queue);
-            } else {
-                break;
-            }
-        }
-    }
-
-    protected void bubbleDown(MessageQueue biggest, int position) {
-        int queueSize = biggest.getSize();
-        int end = bubbleList.size();
-        for (int second = position + 1; second < end; second++) {
-            MessageQueue pivot = bubbleList.get(second);
-            if (pivot.getSize() > queueSize) {
-                swap(position, biggest, second, pivot);
-            } else {
-                break;
-            }
-            position = second;
-        }
-    }
-
-    protected void swap(int firstPosition, MessageQueue first, int secondPosition, MessageQueue second) {
-        bubbleList.set(firstPosition, second);
-        bubbleList.set(secondPosition, first);
-        first.setPosition(secondPosition);
-        second.setPosition(firstPosition);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/DestinationBasedMessageList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/DestinationBasedMessageList.java
deleted file mode 100644
index e856f74..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/DestinationBasedMessageList.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.memory.list;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.DestinationMap;
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.MessageQueue;
-import org.apache.activemq.memory.buffer.OrderBasedMessageBuffer;
-
-/**
- * An implementation of {@link MessageList} which maintains a separate message
- * list for each destination to reduce contention on the list and to speed up
- * recovery times by only recovering the interested topics.
- * 
- * 
- */
-public class DestinationBasedMessageList implements MessageList {
-
-    private MessageBuffer messageBuffer;
-    private Map<ActiveMQDestination, MessageQueue> queueIndex = new HashMap<ActiveMQDestination, MessageQueue>();
-    private DestinationMap subscriptionIndex = new DestinationMap();
-    private Object lock = new Object();
-
-    public DestinationBasedMessageList(int maximumSize) {
-        this(new OrderBasedMessageBuffer(maximumSize));
-    }
-    
-    public DestinationBasedMessageList(MessageBuffer buffer) {
-        messageBuffer = buffer;
-    }
-
-    public void add(MessageReference node) {
-        ActiveMQMessage message = (ActiveMQMessage) node.getMessageHardRef();
-        ActiveMQDestination destination = message.getDestination();
-        MessageQueue queue = null;
-        synchronized (lock) {
-            queue = queueIndex.get(destination);
-            if (queue == null) {
-                queue = messageBuffer.createMessageQueue();
-                queueIndex.put(destination, queue);
-                subscriptionIndex.put(destination, queue);
-            }
-        }
-        queue.add(node);
-    }
-
-    public List<MessageReference> getMessages(Subscription sub) {
-        return getMessages(sub.getConsumerInfo().getDestination());
-    }
-    
-    public  List<MessageReference> getMessages(ActiveMQDestination destination) {
-        Set set = null;
-        synchronized (lock) {
-            set = subscriptionIndex.get(destination);
-        }
-        List<MessageReference> answer = new ArrayList<MessageReference>();
-        for (Iterator iter = set.iterator(); iter.hasNext();) {
-            MessageQueue queue = (MessageQueue) iter.next();
-            queue.appendMessages(answer);
-        }
-        return answer;
-    }
-    
-    public Message[] browse(ActiveMQDestination destination) {
-        List<MessageReference> result = getMessages(destination);
-        return result.toArray(new Message[result.size()]);
-    }
-
-
-    public void clear() {
-        messageBuffer.clear();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/MessageList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/MessageList.java
deleted file mode 100644
index 67ba15a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/MessageList.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.memory.list;
-
-import java.util.List;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-
-/**
- * A container of messages which is used to store messages and then 
- * replay them later for a given subscription.
- * 
- * 
- */
-public interface MessageList {
-
-    void add(MessageReference node);
-
-    /**
-     * Returns the current list of MessageReference objects for the given subscription
-     */
-    List getMessages(ActiveMQDestination destination);
-    
-    /**
-     * @param destination
-     * @return an array of Messages that match the destination
-     */
-    Message[] browse(ActiveMQDestination destination);
-
-    void clear();
-    
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java
deleted file mode 100644
index ad34eca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/memory/list/SimpleMessageList.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.memory.list;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.filter.DestinationFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple fixed size {@link MessageList} where there is a single, fixed size
- * list that all messages are added to for simplicity. Though this will lead to
- * possibly slow recovery times as many more messages than is necessary will
- * have to be iterated through for each subscription.
- * 
- * 
- */
-public class SimpleMessageList implements MessageList {
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleMessageList.class);
-    private final LinkedList<MessageReference> list = new LinkedList<MessageReference>();
-    private int maximumSize = 100 * 64 * 1024;
-    private int size;
-    private final Object lock = new Object();
-
-    public SimpleMessageList() {
-    }
-
-    public SimpleMessageList(int maximumSize) {
-        this.maximumSize = maximumSize;
-    }
-
-    public void add(MessageReference node) {
-        int delta = node.getMessageHardRef().getSize();
-        synchronized (lock) {
-            list.add(node);
-            size += delta;
-            while (size > maximumSize) {
-                MessageReference evicted = list.removeFirst();
-                size -= evicted.getMessageHardRef().getSize();
-            }
-        }
-    }
-
-    public List<MessageReference> getMessages(ActiveMQDestination destination) {
-        return getList();
-    }
-
-    public Message[] browse(ActiveMQDestination destination) {
-        List<Message> result = new ArrayList<Message>();
-        DestinationFilter filter = DestinationFilter.parseFilter(destination);
-        synchronized (lock) {
-            for (Iterator<MessageReference> i = list.iterator(); i.hasNext();) {
-                MessageReference ref = i.next();
-                Message msg;
-                msg = ref.getMessage();
-                if (filter.matches(msg.getDestination())) {
-                    result.add(msg);
-                }
-
-            }
-        }
-        return result.toArray(new Message[result.size()]);
-    }
-
-    /**
-     * Returns a copy of the list
-     */
-    public List<MessageReference> getList() {
-        synchronized (lock) {
-            return new ArrayList<MessageReference>(list);
-        }
-    }
-
-    public int getSize() {
-        synchronized (lock) {
-            return size;
-        }
-    }
-
-    public void clear() {
-        synchronized (lock) {
-            list.clear();
-            size = 0;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
deleted file mode 100644
index b6dcd06..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Endpoint;
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A demand forwarding bridge which works with multicast style transports where
- * a single Transport could be communicating with multiple remote brokers
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class CompositeDemandForwardingBridge extends DemandForwardingBridgeSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(CompositeDemandForwardingBridge.class);
-
-    protected final BrokerId remoteBrokerPath[] = new BrokerId[] {null};
-    protected Object brokerInfoMutex = new Object();
-
-    public CompositeDemandForwardingBridge(NetworkBridgeConfiguration configuration, Transport localBroker,
-                                           Transport remoteBroker) {
-        super(configuration, localBroker, remoteBroker);
-        remoteBrokerName = remoteBroker.toString();
-        remoteBrokerNameKnownLatch.countDown();
-    }
-
-    protected void serviceRemoteBrokerInfo(Command command) throws IOException {
-        synchronized (brokerInfoMutex) {
-            BrokerInfo remoteBrokerInfo = (BrokerInfo)command;
-            BrokerId remoteBrokerId = remoteBrokerInfo.getBrokerId();
-
-            // lets associate the incoming endpoint with a broker ID so we can
-            // refer to it later
-            Endpoint from = command.getFrom();
-            if (from == null) {
-                LOG.warn("Incoming command does not have a from endpoint: " + command);
-            } else {
-                from.setBrokerInfo(remoteBrokerInfo);
-            }
-            if (localBrokerId != null) {
-                if (localBrokerId.equals(remoteBrokerId)) {
-                    LOG.info("Disconnecting loop back connection.");
-                    // waitStarted();
-                    ServiceSupport.dispose(this);
-                }
-            }
-            if (!disposed.get()) {
-                triggerLocalStartBridge();
-            }
-        }
-    }
-
-    protected void addRemoteBrokerToBrokerPath(ConsumerInfo info) throws IOException {
-        info.setBrokerPath(appendToBrokerPath(info.getBrokerPath(), getFromBrokerId(info)));
-    }
-
-    /**
-     * Returns the broker ID that the command came from
-     */
-    protected BrokerId getFromBrokerId(Command command) throws IOException {
-        BrokerId answer = null;
-        Endpoint from = command.getFrom();
-        if (from == null) {
-            LOG.warn("Incoming command does not have a from endpoint: " + command);
-        } else {
-            answer = from.getBrokerId();
-        }
-        if (answer != null) {
-            return answer;
-        } else {
-            throw new IOException("No broker ID is available for endpoint: " + from + " from command: "
-                                  + command);
-        }
-    }
-
-    protected void serviceLocalBrokerInfo(Command command) throws InterruptedException {
-        // TODO is there much we can do here?
-    }
-
-    protected NetworkBridgeFilter createNetworkBridgeFilter(ConsumerInfo info) throws IOException {
-        return new NetworkBridgeFilter(getFromBrokerId(info), configuration.getNetworkTTL());
-    }
-
-    protected BrokerId[] getRemoteBrokerPath() {
-        return remoteBrokerPath;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
deleted file mode 100644
index c66cc71..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.filter.DestinationFilter;
-import org.apache.activemq.transport.Transport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Consolidates subscriptions
- * 
- * 
- */
-public class ConduitBridge extends DemandForwardingBridge {
-    private static final Logger LOG = LoggerFactory.getLogger(ConduitBridge.class);
-
-    /**
-     * Constructor
-     * 
-     * @param localBroker
-     * @param remoteBroker
-     */
-    public ConduitBridge(NetworkBridgeConfiguration configuration, Transport localBroker, Transport remoteBroker) {
-        super(configuration, localBroker, remoteBroker);
-    }
-
-    @Override
-    protected DemandSubscription createDemandSubscription(ConsumerInfo info) throws IOException {
-        if (addToAlreadyInterestedConsumers(info)) {
-            return null; // don't want this subscription added
-        }
-        //add our original id to ourselves
-        info.addNetworkConsumerId(info.getConsumerId());
-        info.setSelector(null);
-        return doCreateDemandSubscription(info);
-    }
-    
-    protected boolean checkPaths(BrokerId[] first, BrokerId[] second) {
-    	if (first == null || second == null)
-			return true;
-		if (Arrays.equals(first, second))
-			return true;
-		if (first[0].equals(second[0])
-				&& first[first.length - 1].equals(second[second.length - 1]))
-			return false;
-		else
-			return true;
-    }
-
-    protected boolean addToAlreadyInterestedConsumers(ConsumerInfo info) {
-        // search through existing subscriptions and see if we have a match
-        boolean matched = false;
-        for (Iterator i = subscriptionMapByLocalId.values().iterator(); i.hasNext();) {
-            DemandSubscription ds = (DemandSubscription)i.next();
-            DestinationFilter filter = DestinationFilter.parseFilter(ds.getLocalInfo().getDestination());
-            if (filter.matches(info.getDestination())) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " matched (add interest) to exsting sub for: " + ds.getRemoteInfo()
-                            + " with sub: " + info.getConsumerId());
-                }
-                // add the interest in the subscription
-                // ds.add(ds.getRemoteInfo().getConsumerId());
-                if (checkPaths(info.getBrokerPath(), ds.getRemoteInfo().getBrokerPath())) {
-                	ds.add(info.getConsumerId());
-                }
-                matched = true;
-                // continue - we want interest to any existing
-                // DemandSubscriptions
-            }
-        }
-        return matched;
-    }
-
-    @Override
-    protected void removeDemandSubscription(ConsumerId id) throws IOException {
-        List<DemandSubscription> tmpList = new ArrayList<DemandSubscription>();
-
-        for (Iterator i = subscriptionMapByLocalId.values().iterator(); i.hasNext();) {
-            DemandSubscription ds = (DemandSubscription)i.next();
-            if (ds.remove(id)) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " removing interest in sub on " + localBroker + " from " + remoteBrokerName + " : sub: " + id  + " existing matched sub: " + ds.getRemoteInfo());
-                }
-            }
-            if (ds.isEmpty()) {
-                tmpList.add(ds);
-            }
-        }
-        for (Iterator<DemandSubscription> i = tmpList.iterator(); i.hasNext();) {
-            DemandSubscription ds = i.next();
-            removeSubscription(ds);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(configuration.getBrokerName() + " removing sub on " + localBroker + " from " + remoteBrokerName + " :  " + ds.getRemoteInfo());
-            }
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConnectionFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConnectionFilter.java
deleted file mode 100644
index 39c147e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConnectionFilter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-
-/**
- * Abstraction that allows you to control which brokers a NetworkConnector connects bridges to.
- * 
- * 
- */
-public interface ConnectionFilter {
-    /**
-     * @param location
-     * @return true if the network connector should establish a connection to the specified location.
-     */
-    boolean connectTo(URI location);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
deleted file mode 100755
index a0df2c5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Forwards messages from the local broker to the remote broker based on demand.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class DemandForwardingBridge extends DemandForwardingBridgeSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(DemandForwardingBridge.class);
-
-    protected final BrokerId remoteBrokerPath[] = new BrokerId[] {null};
-    protected Object brokerInfoMutex = new Object();
-    protected BrokerId remoteBrokerId;
-
-    public DemandForwardingBridge(NetworkBridgeConfiguration configuration, Transport localBroker,
-                                  Transport remoteBroker) {
-        super(configuration, localBroker, remoteBroker);
-    }
-
-    protected void serviceRemoteBrokerInfo(Command command) throws IOException {
-        synchronized (brokerInfoMutex) {
-            BrokerInfo remoteBrokerInfo = (BrokerInfo)command;
-            remoteBrokerId = remoteBrokerInfo.getBrokerId();
-            remoteBrokerPath[0] = remoteBrokerId;
-            remoteBrokerName = remoteBrokerInfo.getBrokerName();
-            if (localBrokerId != null) {
-                if (localBrokerId.equals(remoteBrokerId)) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace(configuration.getBrokerName() + " disconnecting remote loop back connection: " + remoteBrokerName);
-                    }
-                    ServiceSupport.dispose(this);
-                }
-            }
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("counting down remoteBrokerNameKnownLatch with: " + command);
-            }
-            remoteBrokerNameKnownLatch.countDown();
-        }
-    }
-
-    protected void addRemoteBrokerToBrokerPath(ConsumerInfo info) {
-        info.setBrokerPath(appendToBrokerPath(info.getBrokerPath(), getRemoteBrokerPath()));
-    }
-
-    protected void serviceLocalBrokerInfo(Command command) throws InterruptedException {
-        synchronized (brokerInfoMutex) {
-            localBrokerId = ((BrokerInfo)command).getBrokerId();
-            localBrokerPath[0] = localBrokerId;
-            localBrokerIdKnownLatch.countDown();
-            if (remoteBrokerId != null) {
-                if (remoteBrokerId.equals(localBrokerId)) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace(configuration.getBrokerName() + " disconnecting local loop back connection.");
-                    }
-                    waitStarted();
-                    ServiceSupport.dispose(this);
-                }
-            }
-        }
-    }
-
-    protected NetworkBridgeFilter createNetworkBridgeFilter(ConsumerInfo info) throws IOException {
-        return new NetworkBridgeFilter(remoteBrokerPath[0], configuration.getNetworkTTL());
-    }
-
-    protected BrokerId[] getRemoteBrokerPath() {
-        return remoteBrokerPath;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
deleted file mode 100644
index adc5aa0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
+++ /dev/null
@@ -1,1275 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.security.cert.X509Certificate;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.TransportConnection;
-import org.apache.activemq.broker.region.AbstractRegion;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTempDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.filter.DestinationFilter;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.ResponseCallback;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportDisposedIOException;
-import org.apache.activemq.transport.TransportFilter;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.tcp.SslTransport;
-import org.apache.activemq.util.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-/**
- * A useful base class for implementing demand forwarding bridges.
- * 
- * 
- */
-public abstract class DemandForwardingBridgeSupport implements NetworkBridge, BrokerServiceAware {
-    private static final Logger LOG = LoggerFactory.getLogger(DemandForwardingBridgeSupport.class);
-    private final TaskRunnerFactory asyncTaskRunner = DefaultThreadPools.getDefaultTaskRunnerFactory();
-    protected static final String DURABLE_SUB_PREFIX = "NC-DS_";
-    protected final Transport localBroker;
-    protected final Transport remoteBroker;
-    protected final IdGenerator idGenerator = new IdGenerator();
-    protected final LongSequenceGenerator consumerIdGenerator = new LongSequenceGenerator();
-    protected ConnectionInfo localConnectionInfo;
-    protected ConnectionInfo remoteConnectionInfo;
-    protected SessionInfo localSessionInfo;
-    protected ProducerInfo producerInfo;
-    protected String remoteBrokerName = "Unknown";
-    protected String localClientId;
-    protected ConsumerInfo demandConsumerInfo;
-    protected int demandConsumerDispatched;
-    protected final AtomicBoolean localBridgeStarted = new AtomicBoolean(false);
-    protected final AtomicBoolean remoteBridgeStarted = new AtomicBoolean(false);
-    protected AtomicBoolean disposed = new AtomicBoolean();
-    protected BrokerId localBrokerId;
-    protected ActiveMQDestination[] excludedDestinations;
-    protected ActiveMQDestination[] dynamicallyIncludedDestinations;
-    protected ActiveMQDestination[] staticallyIncludedDestinations;
-    protected ActiveMQDestination[] durableDestinations;
-    protected final ConcurrentHashMap<ConsumerId, DemandSubscription> subscriptionMapByLocalId = new ConcurrentHashMap<ConsumerId, DemandSubscription>();
-    protected final ConcurrentHashMap<ConsumerId, DemandSubscription> subscriptionMapByRemoteId = new ConcurrentHashMap<ConsumerId, DemandSubscription>();
-    protected final BrokerId localBrokerPath[] = new BrokerId[] { null };
-    protected CountDownLatch startedLatch = new CountDownLatch(2);
-    protected CountDownLatch localStartedLatch = new CountDownLatch(1);
-    protected CountDownLatch remoteBrokerNameKnownLatch = new CountDownLatch(1);
-    protected CountDownLatch localBrokerIdKnownLatch = new CountDownLatch(1);
-    protected final AtomicBoolean remoteInterupted = new AtomicBoolean(false);
-    protected final AtomicBoolean lastConnectSucceeded = new AtomicBoolean(false);
-    protected NetworkBridgeConfiguration configuration;
-
-    final AtomicLong enqueueCounter = new AtomicLong();
-    final AtomicLong dequeueCounter = new AtomicLong();
-
-    private NetworkBridgeListener networkBridgeListener;
-    private boolean createdByDuplex;
-    private BrokerInfo localBrokerInfo;
-    private BrokerInfo remoteBrokerInfo;
-
-    private final AtomicBoolean started = new AtomicBoolean();
-    private TransportConnection duplexInitiatingConnection;
-    private BrokerService brokerService = null;
-
-    public DemandForwardingBridgeSupport(NetworkBridgeConfiguration configuration, Transport localBroker, Transport remoteBroker) {
-        this.configuration = configuration;
-        this.localBroker = localBroker;
-        this.remoteBroker = remoteBroker;
-    }
-
-    public void duplexStart(TransportConnection connection, BrokerInfo localBrokerInfo, BrokerInfo remoteBrokerInfo) throws Exception {
-        this.localBrokerInfo = localBrokerInfo;
-        this.remoteBrokerInfo = remoteBrokerInfo;
-        this.duplexInitiatingConnection = connection;
-        start();
-        serviceRemoteCommand(remoteBrokerInfo);
-    }
-
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-            localBroker.setTransportListener(new DefaultTransportListener() {
-
-                @Override
-                public void onCommand(Object o) {
-                    Command command = (Command) o;
-                    serviceLocalCommand(command);
-                }
-
-                @Override
-                public void onException(IOException error) {
-                    serviceLocalException(error);
-                }
-            });
-            remoteBroker.setTransportListener(new TransportListener() {
-
-                public void onCommand(Object o) {
-                    Command command = (Command) o;
-                    serviceRemoteCommand(command);
-                }
-
-                public void onException(IOException error) {
-                    serviceRemoteException(error);
-                }
-
-                public void transportInterupted() {
-                    // clear any subscriptions - to try and prevent the bridge
-                    // from stalling the broker
-                    if (remoteInterupted.compareAndSet(false, true)) {
-                        LOG.info("Outbound transport to " + remoteBrokerName + " interrupted.");
-                        if (localBridgeStarted.get()) {
-                            clearDownSubscriptions();
-                            synchronized (DemandForwardingBridgeSupport.this) {
-                                try {
-                                    localBroker.oneway(localConnectionInfo.createRemoveCommand());
-                                } catch (TransportDisposedIOException td) {
-                                    LOG.debug("local broker is now disposed", td);
-                                } catch (IOException e) {
-                                    LOG.warn("Caught exception from local start", e);
-                                }
-                            }
-                        }
-                        localBridgeStarted.set(false);
-                        remoteBridgeStarted.set(false);
-                        startedLatch = new CountDownLatch(2);
-                        localStartedLatch = new CountDownLatch(1);
-                    }
-                }
-
-                public void transportResumed() {
-                    if (remoteInterupted.compareAndSet(true, false)) {
-                        // We want to slow down false connects so that we don't
-                        // get in a busy loop.
-                        // False connects can occurr if you using SSH tunnels.
-                        if (!lastConnectSucceeded.get()) {
-                            try {
-                                LOG.debug("Previous connection was never fully established. Sleeping for second to avoid busy loop.");
-                                Thread.sleep(1000);
-                            } catch (InterruptedException e) {
-                                Thread.currentThread().interrupt();
-                            }
-                        }
-                        lastConnectSucceeded.set(false);
-                        try {
-                            startLocalBridge();
-                            remoteBridgeStarted.set(true);
-                            startedLatch.countDown();
-                            LOG.info("Outbound transport to " + remoteBrokerName + " resumed");
-                        } catch (Throwable e) {
-                            LOG.error("Caught exception  from local start in resume transport", e);
-                            serviceLocalException(e);
-                        }
-                    }
-                }
-            });
-
-            localBroker.start();
-            remoteBroker.start();
-            if (!disposed.get()) {
-                try {
-                    triggerRemoteStartBridge();
-                } catch (IOException e) {
-                    LOG.warn("Caught exception from remote start", e);
-                }
-    	    } else {
-                LOG.warn ("Bridge was disposed before the start() method was fully executed.");
-                throw new TransportDisposedIOException();
-            }
-        }
-    }
-
-    protected void triggerLocalStartBridge() throws IOException {
-        final Map context = MDCHelper.getCopyOfContextMap();
-        asyncTaskRunner.execute(new Runnable() {
-            public void run() {
-                MDCHelper.setContextMap(context);
-                final String originalName = Thread.currentThread().getName();
-                Thread.currentThread().setName("StartLocalBridge: localBroker=" + localBroker);
-                try {
-                    startLocalBridge();
-                } catch (Throwable e) {
-                    serviceLocalException(e);
-                } finally {
-                    Thread.currentThread().setName(originalName);
-                }
-            }
-        });
-    }
-
-    protected void triggerRemoteStartBridge() throws IOException {
-        final Map context = MDCHelper.getCopyOfContextMap();
-        asyncTaskRunner.execute(new Runnable() {
-            public void run() {
-                MDCHelper.setContextMap(context);
-                final String originalName = Thread.currentThread().getName();
-                Thread.currentThread().setName("StartRemotelBridge: localBroker=" + localBroker);
-                try {
-                    startRemoteBridge();
-                } catch (Exception e) {
-                    serviceRemoteException(e);
-                } finally {
-                    Thread.currentThread().setName(originalName);
-                }
-            }
-        });
-    }
-
-    protected void startLocalBridge() throws Throwable {
-        if (localBridgeStarted.compareAndSet(false, true)) {
-            synchronized (this) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace(configuration.getBrokerName() + " starting local Bridge, localBroker=" + localBroker);
-                }
-                remoteBrokerNameKnownLatch.await();
-
-                if (!disposed.get()) {
-                    localConnectionInfo = new ConnectionInfo();
-                    localConnectionInfo.setConnectionId(new ConnectionId(idGenerator.generateId()));
-                    localClientId = configuration.getName() + "_" + remoteBrokerName + "_inbound_" + configuration.getBrokerName();
-                    localConnectionInfo.setClientId(localClientId);
-                    localConnectionInfo.setUserName(configuration.getUserName());
-                    localConnectionInfo.setPassword(configuration.getPassword());
-                    Transport originalTransport = remoteBroker;
-                    while (originalTransport instanceof TransportFilter) {
-                        originalTransport = ((TransportFilter) originalTransport).getNext();
-                    }
-                    if (originalTransport instanceof SslTransport) {
-                        X509Certificate[] peerCerts = ((SslTransport) originalTransport).getPeerCertificates();
-                        localConnectionInfo.setTransportContext(peerCerts);
-                    }
-                    // sync requests that may fail
-                    Object resp = localBroker.request(localConnectionInfo);
-                    if (resp instanceof ExceptionResponse) {
-                        throw ((ExceptionResponse)resp).getException();
-                    }
-                    localSessionInfo = new SessionInfo(localConnectionInfo, 1);
-                    localBroker.oneway(localSessionInfo);
-
-                    brokerService.getBroker().networkBridgeStarted(remoteBrokerInfo, this.createdByDuplex);
-                    NetworkBridgeListener l = this.networkBridgeListener;
-                    if (l != null) {
-                        l.onStart(this);
-                    }
-                    LOG.info("Network connection between " + localBroker + " and " + remoteBroker + "(" + remoteBrokerName + ") has been established.");
-
-                } else {
-                    LOG.warn ("Bridge was disposed before the startLocalBridge() method was fully executed.");
-                }
-                startedLatch.countDown();
-                localStartedLatch.countDown();
-                if (!disposed.get()) {
-                    setupStaticDestinations();
-                } else {
-                    LOG.warn("Network connection between " + localBroker + " and " + remoteBroker + "(" + remoteBrokerName + ") was interrupted during establishment.");
-                }
-            }
-        }
-    }
-
-    protected void startRemoteBridge() throws Exception {
-        if (remoteBridgeStarted.compareAndSet(false, true)) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(configuration.getBrokerName() + " starting remote Bridge, localBroker=" + localBroker);
-            }
-            synchronized (this) {
-                if (!isCreatedByDuplex()) {
-                    BrokerInfo brokerInfo = new BrokerInfo();
-                    brokerInfo.setBrokerName(configuration.getBrokerName());
-                    brokerInfo.setBrokerURL(configuration.getBrokerURL());
-                    brokerInfo.setNetworkConnection(true);
-                    brokerInfo.setDuplexConnection(configuration.isDuplex());
-                    // set our properties
-                    Properties props = new Properties();
-                    IntrospectionSupport.getProperties(configuration, props, null);
-                    String str = MarshallingSupport.propertiesToString(props);
-                    brokerInfo.setNetworkProperties(str);
-                    brokerInfo.setBrokerId(this.localBrokerId);
-                    remoteBroker.oneway(brokerInfo);
-                }
-                if (remoteConnectionInfo != null) {
-                    remoteBroker.oneway(remoteConnectionInfo.createRemoveCommand());
-                }
-                remoteConnectionInfo = new ConnectionInfo();
-                remoteConnectionInfo.setConnectionId(new ConnectionId(idGenerator.generateId()));
-                remoteConnectionInfo.setClientId(configuration.getName() + "_" + configuration.getBrokerName() + "_outbound");
-                remoteConnectionInfo.setUserName(configuration.getUserName());
-                remoteConnectionInfo.setPassword(configuration.getPassword());
-                remoteBroker.oneway(remoteConnectionInfo);
-
-                SessionInfo remoteSessionInfo = new SessionInfo(remoteConnectionInfo, 1);
-                remoteBroker.oneway(remoteSessionInfo);
-                producerInfo = new ProducerInfo(remoteSessionInfo, 1);
-                producerInfo.setResponseRequired(false);
-                remoteBroker.oneway(producerInfo);
-                // Listen to consumer advisory messages on the remote broker to
-                // determine demand.
-                demandConsumerInfo = new ConsumerInfo(remoteSessionInfo, 1);
-                demandConsumerInfo.setDispatchAsync(configuration.isDispatchAsync());
-                String advisoryTopic = AdvisorySupport.CONSUMER_ADVISORY_TOPIC_PREFIX + configuration.getDestinationFilter();
-                if (configuration.isBridgeTempDestinations()) {
-                    advisoryTopic += "," + AdvisorySupport.TEMP_DESTINATION_COMPOSITE_ADVISORY_TOPIC;
-                }
-                demandConsumerInfo.setDestination(new ActiveMQTopic(advisoryTopic));
-                demandConsumerInfo.setPrefetchSize(configuration.getPrefetchSize());
-                remoteBroker.oneway(demandConsumerInfo);
-                startedLatch.countDown();
-                if (!disposed.get()) {
-                    triggerLocalStartBridge();
-                }
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            if (disposed.compareAndSet(false, true)) {
-                LOG.debug(" stopping " + configuration.getBrokerName() + " bridge to " + remoteBrokerName);
-                NetworkBridgeListener l = this.networkBridgeListener;
-                if (l != null) {
-                    l.onStop(this);
-                }
-                try {
-                    remoteBridgeStarted.set(false);
-                    final CountDownLatch sendShutdown = new CountDownLatch(1);
-                    final Map map = MDCHelper.getCopyOfContextMap();
-                    asyncTaskRunner.execute(new Runnable() {
-                        public void run() {
-                            try {
-                                MDCHelper.setContextMap(map);
-                                localBroker.oneway(new ShutdownInfo());
-                                sendShutdown.countDown();
-                                remoteBroker.oneway(new ShutdownInfo());
-                            } catch (Throwable e) {
-                                LOG.debug("Caught exception sending shutdown", e);
-                            } finally {
-                                sendShutdown.countDown();
-                            }
-
-                        }
-                    });
-                    if (!sendShutdown.await(10, TimeUnit.SECONDS)) {
-                        LOG.info("Network Could not shutdown in a timely manner");
-                    }
-                } finally {
-                    ServiceStopper ss = new ServiceStopper();
-                    ss.stop(remoteBroker);
-                    ss.stop(localBroker);
-                    // Release the started Latch since another thread could be
-                    // stuck waiting for it to start up.
-                    startedLatch.countDown();
-                    startedLatch.countDown();
-                    localStartedLatch.countDown();
-                    ss.throwFirstException();
-                }
-            }
-            brokerService.getBroker().removeBroker(null, remoteBrokerInfo);
-            brokerService.getBroker().networkBridgeStopped(remoteBrokerInfo);
-            LOG.info(configuration.getBrokerName() + " bridge to " + remoteBrokerName + " stopped");
-            remoteBrokerNameKnownLatch.countDown();
-        }
-    }
-
-    public void serviceRemoteException(Throwable error) {
-        if (!disposed.get()) {
-            if (error instanceof SecurityException || error instanceof GeneralSecurityException) {
-                LOG.error("Network connection between " + localBroker + " and " + remoteBroker + " shutdown due to a remote error: " + error);
-            } else {
-                LOG.warn("Network connection between " + localBroker + " and " + remoteBroker + " shutdown due to a remote error: " + error);
-            }
-            LOG.debug("The remote Exception was: " + error, error);
-            final Map map = MDCHelper.getCopyOfContextMap();
-            asyncTaskRunner.execute(new Runnable() {
-                public void run() {
-                    MDCHelper.setContextMap(map);
-                    ServiceSupport.dispose(getControllingService());
-                }
-            });
-            fireBridgeFailed();
-        }
-    }
-
-    protected void serviceRemoteCommand(Command command) {
-        if (!disposed.get()) {
-            try {
-                if (command.isMessageDispatch()) {
-                    waitStarted();
-                    MessageDispatch md = (MessageDispatch) command;
-                    serviceRemoteConsumerAdvisory(md.getMessage().getDataStructure());
-                    demandConsumerDispatched++;
-                    if (demandConsumerDispatched > (demandConsumerInfo.getPrefetchSize() * .75)) {
-                        remoteBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, demandConsumerDispatched));
-                        demandConsumerDispatched = 0;
-                    }
-                } else if (command.isBrokerInfo()) {
-                    lastConnectSucceeded.set(true);
-                    remoteBrokerInfo = (BrokerInfo) command;
-                    Properties props = MarshallingSupport.stringToProperties(remoteBrokerInfo.getNetworkProperties());
-                    try {
-                        IntrospectionSupport.getProperties(configuration, props, null);
-                        if (configuration.getExcludedDestinations() != null) {
-                            excludedDestinations = configuration.getExcludedDestinations().toArray(
-                                    new ActiveMQDestination[configuration.getExcludedDestinations().size()]);
-                        }
-                        if (configuration.getStaticallyIncludedDestinations() != null) {
-                            staticallyIncludedDestinations = configuration.getStaticallyIncludedDestinations().toArray(
-                                    new ActiveMQDestination[configuration.getStaticallyIncludedDestinations().size()]);
-                        }
-                        if (configuration.getDynamicallyIncludedDestinations() != null) {
-                            dynamicallyIncludedDestinations = configuration.getDynamicallyIncludedDestinations()
-                                    .toArray(
-                                            new ActiveMQDestination[configuration.getDynamicallyIncludedDestinations()
-                                                    .size()]);
-                        }
-                    } catch (Throwable t) {
-                        LOG.error("Error mapping remote destinations", t);
-                    }
-                    serviceRemoteBrokerInfo(command);
-                    // Let the local broker know the remote broker's ID.
-                    localBroker.oneway(command);
-                    // new peer broker (a consumer can work with remote broker also)
-                    brokerService.getBroker().addBroker(null, remoteBrokerInfo);
-                } else if (command.getClass() == ConnectionError.class) {
-                    ConnectionError ce = (ConnectionError) command;
-                    serviceRemoteException(ce.getException());
-                } else {
-                    if (isDuplex()) {
-                        if (command.isMessage()) {
-                            ActiveMQMessage message = (ActiveMQMessage) command;
-                            if (AdvisorySupport.isConsumerAdvisoryTopic(message.getDestination()) 
-                                || AdvisorySupport.isDestinationAdvisoryTopic(message.getDestination())) {
-                                serviceRemoteConsumerAdvisory(message.getDataStructure());
-                            } else {
-                                if (!isPermissableDestination(message.getDestination(), true)) {
-                                    return;
-                                }
-                                if (message.isResponseRequired()) {
-                                    Response reply = new Response();
-                                    reply.setCorrelationId(message.getCommandId());
-                                    localBroker.oneway(message);
-                                    remoteBroker.oneway(reply);
-                                } else {
-                                    localBroker.oneway(message);
-                                }
-                            }
-                        } else {
-                            switch (command.getDataStructureType()) {
-                            case ConnectionInfo.DATA_STRUCTURE_TYPE:
-                            case SessionInfo.DATA_STRUCTURE_TYPE:
-                            case ProducerInfo.DATA_STRUCTURE_TYPE:
-                                localBroker.oneway(command);
-                                break;
-                            case ConsumerInfo.DATA_STRUCTURE_TYPE:
-                                localStartedLatch.await();
-                                if (started.get()) {
-                                    if (!addConsumerInfo((ConsumerInfo) command)) {
-                                        if (LOG.isDebugEnabled()) {
-                                            LOG.debug("Ignoring ConsumerInfo: " + command);
-                                        }
-                                    } else {
-                                        if (LOG.isTraceEnabled()) {
-                                            LOG.trace("Adding ConsumerInfo: " + command);
-                                        }
-                                    }
-                                } else {
-                                    // received a subscription whilst stopping
-                                    LOG.warn("Stopping - ignoring ConsumerInfo: " + command);
-                                }
-                                break;
-                            case ShutdownInfo.DATA_STRUCTURE_TYPE:
-                                // initiator is shutting down, controlled case
-                                // abortive close dealt with by inactivity monitor
-                                LOG.info("Stopping network bridge on shutdown of remote broker");
-                                serviceRemoteException(new IOException(command.toString()));
-                                break;
-                            default:
-                                if (LOG.isDebugEnabled()) {
-                                    LOG.debug("Ignoring remote command: " + command);
-                                }
-                            }
-                        }
-                    } else {
-                        switch (command.getDataStructureType()) {
-                        case KeepAliveInfo.DATA_STRUCTURE_TYPE:
-                        case WireFormatInfo.DATA_STRUCTURE_TYPE:
-                        case ShutdownInfo.DATA_STRUCTURE_TYPE:
-                            break;
-                        default:
-                            LOG.warn("Unexpected remote command: " + command);
-                        }
-                    }
-                }
-            } catch (Throwable e) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Exception processing remote command: " + command, e);
-                }
-                serviceRemoteException(e);
-            }
-        }
-    }
-
-    private void serviceRemoteConsumerAdvisory(DataStructure data) throws IOException {
-        final int networkTTL = configuration.getNetworkTTL();
-        if (data.getClass() == ConsumerInfo.class) {
-            // Create a new local subscription
-            ConsumerInfo info = (ConsumerInfo) data;
-            BrokerId[] path = info.getBrokerPath();
-
-            if (info.isBrowser()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.info(configuration.getBrokerName() + " Ignoring sub from " + remoteBrokerName + ", browsers explicitly suppressed");
-                }
-                return;
-            }
-
-            if (path != null && path.length >= networkTTL) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " Ignoring sub from " + remoteBrokerName + ", restricted to " + networkTTL + " network hops only : " + info);
-                }
-                return;
-            }
-            if (contains(path, localBrokerPath[0])) {
-                // Ignore this consumer as it's a consumer we locally sent to the broker.
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " Ignoring sub from " + remoteBrokerName + ", already routed through this broker once : " + info);
-                }
-                return;
-            }
-            if (!isPermissableDestination(info.getDestination())) {
-                // ignore if not in the permitted or in the excluded list
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " Ignoring sub from " + remoteBrokerName + ", destination " + info.getDestination() + " is not permiited :" + info);
-                }
-                return;
-            }
-
-            // in a cyclic network there can be multiple bridges per broker that can propagate
-            // a network subscription so there is a need to synchronise on a shared entity
-            synchronized (brokerService.getVmConnectorURI()) {
-                if (addConsumerInfo(info)) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(configuration.getBrokerName() + " bridging sub on " + localBroker + " from " + remoteBrokerName + " : " + info);
-                    }
-                } else {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(configuration.getBrokerName() + " Ignoring sub from " + remoteBrokerName + " as already subscribed to matching destination : " + info);
-                    }
-                }
-            }
-        } else if (data.getClass() == DestinationInfo.class) {
-            // It's a destination info - we want to pass up
-            // information about temporary destinations
-            DestinationInfo destInfo = (DestinationInfo) data;
-            BrokerId[] path = destInfo.getBrokerPath();
-            if (path != null && path.length >= networkTTL) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " Ignoring destination " + destInfo + " restricted to " + networkTTL + " network hops only");
-                }
-                return;
-            }
-            if (contains(destInfo.getBrokerPath(), localBrokerPath[0])) {
-                // Ignore this consumer as it's a consumer we locally sent to
-                // the broker.
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " Ignoring destination " + destInfo + " already routed through this broker once");
-                }
-                return;
-            }
-            destInfo.setConnectionId(localConnectionInfo.getConnectionId());
-            if (destInfo.getDestination() instanceof ActiveMQTempDestination) {
-                // re-set connection id so comes from here
-                ActiveMQTempDestination tempDest = (ActiveMQTempDestination) destInfo.getDestination();
-                tempDest.setConnectionId(localSessionInfo.getSessionId().getConnectionId());
-            }
-            destInfo.setBrokerPath(appendToBrokerPath(destInfo.getBrokerPath(), getRemoteBrokerPath()));
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("bridging destination control command: " + destInfo);
-            }
-            localBroker.oneway(destInfo);
-        } else if (data.getClass() == RemoveInfo.class) {
-            ConsumerId id = (ConsumerId) ((RemoveInfo) data).getObjectId();
-            removeDemandSubscription(id);
-        }
-    }
-
-    public void serviceLocalException(Throwable error) {
-        if (!disposed.get()) {
-            LOG.info("Network connection between " + localBroker + " and " + remoteBroker + " shutdown due to a local error: " + error);
-            LOG.debug("The local Exception was:" + error, error);
-            final Map map = MDCHelper.getCopyOfContextMap();
-            asyncTaskRunner.execute(new Runnable() {
-                public void run() {
-                    MDCHelper.setContextMap(map);
-                    ServiceSupport.dispose(getControllingService());
-                }
-            });
-            fireBridgeFailed();
-        }
-    }
-
-    protected Service getControllingService() {
-        return duplexInitiatingConnection != null ? duplexInitiatingConnection : DemandForwardingBridgeSupport.this;
-    }
-
-    protected void addSubscription(DemandSubscription sub) throws IOException {
-        if (sub != null) {
-            localBroker.oneway(sub.getLocalInfo());
-        }
-    }
-
-    protected void removeSubscription(final DemandSubscription sub) throws IOException {
-        if (sub != null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(configuration.getBrokerName() + " remove local subscription for remote " + sub.getRemoteInfo().getConsumerId());
-            }
-            subscriptionMapByLocalId.remove(sub.getLocalInfo().getConsumerId());
-
-            // continue removal in separate thread to free up this thread for outstanding responses
-            final Map map = MDCHelper.getCopyOfContextMap();
-            asyncTaskRunner.execute(new Runnable() {
-                public void run() {
-                    MDCHelper.setContextMap(map);
-                    sub.waitForCompletion();
-                    try {
-                        localBroker.oneway(sub.getLocalInfo().createRemoveCommand());
-                    } catch (IOException e) {
-                        LOG.warn("failed to deliver remove command for local subscription, for remote " + sub.getRemoteInfo().getConsumerId(), e);
-                    }
-                }
-            });
-        }
-    }
-
-    protected Message configureMessage(MessageDispatch md) {
-        Message message = md.getMessage().copy();
-        // Update the packet to show where it came from.
-        message.setBrokerPath(appendToBrokerPath(message.getBrokerPath(), localBrokerPath));
-        message.setProducerId(producerInfo.getProducerId());
-        message.setDestination(md.getDestination());
-        if (message.getOriginalTransactionId() == null) {
-            message.setOriginalTransactionId(message.getTransactionId());
-        }
-        message.setTransactionId(null);
-        return message;
-    }
-
-    protected void serviceLocalCommand(Command command) {
-        if (!disposed.get()) {
-            try {
-                if (command.isMessageDispatch()) {
-                    enqueueCounter.incrementAndGet();
-                    final MessageDispatch md = (MessageDispatch) command;
-                    final DemandSubscription sub = subscriptionMapByLocalId.get(md.getConsumerId());
-                    if (sub != null && md.getMessage() != null && sub.incrementOutstandingResponses()) {
-                        
-                        if (suppressMessageDispatch(md, sub)) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(configuration.getBrokerName() + " message not forwarded to " + remoteBrokerName + " because message came from there or fails networkTTL, brokerPath: " + Arrays.toString(md.getMessage().getBrokerPath()) + ", message: " + md.getMessage());
-                            }
-                            // still ack as it may be durable
-                            try {
-                                localBroker.oneway(new MessageAck(md, MessageAck.INDIVIDUAL_ACK_TYPE, 1));
-                            } finally {
-                                sub.decrementOutstandingResponses();
-                            }
-                            return;
-                        }
-                        
-                        Message message = configureMessage(md);
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("bridging (" + configuration.getBrokerName() + " -> " + remoteBrokerName + ", consumer: " + md.getConsumerId() + ", destination " + message.getDestination() + ", brokerPath: " + Arrays.toString(message.getBrokerPath()) + ", message: " + message);
-                        }
-                        
-                        if (!message.isResponseRequired()) {
-                            
-                            // If the message was originally sent using async
-                            // send, we will preserve that QOS
-                            // by bridging it using an async send (small chance
-                            // of message loss).
-                            try {
-                                remoteBroker.oneway(message);
-                                localBroker.oneway(new MessageAck(md, MessageAck.INDIVIDUAL_ACK_TYPE, 1));
-                                dequeueCounter.incrementAndGet();
-                            } finally {
-                                sub.decrementOutstandingResponses();
-                            }
-                            
-                        } else {
-                            
-                            // The message was not sent using async send, so we
-                            // should only ack the local
-                            // broker when we get confirmation that the remote
-                            // broker has received the message.
-                            ResponseCallback callback = new ResponseCallback() {
-                                public void onCompletion(FutureResponse future) {
-                                    try {
-                                        Response response = future.getResult();
-                                        if (response.isException()) {
-                                            ExceptionResponse er = (ExceptionResponse) response;
-                                            serviceLocalException(er.getException());
-                                        } else {
-                                            localBroker.oneway(new MessageAck(md, MessageAck.INDIVIDUAL_ACK_TYPE, 1));
-                                            dequeueCounter.incrementAndGet();
-                                        }   
-                                    } catch (IOException e) {
-                                        serviceLocalException(e);
-                                    } finally {
-                                        sub.decrementOutstandingResponses();
-                                    }
-                                }
-                            };
-                            
-                            remoteBroker.asyncRequest(message, callback);
-                            
-                        }
-                    } else {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("No subscription registered with this network bridge for consumerId " + md.getConsumerId() + " for message: " + md.getMessage());
-                        }
-                    }
-                } else if (command.isBrokerInfo()) {
-                    localBrokerInfo = (BrokerInfo) command;
-                    serviceLocalBrokerInfo(command);
-                } else if (command.isShutdownInfo()) {
-                    LOG.info(configuration.getBrokerName() + " Shutting down");
-                    // Don't shut down the whole connector if the remote side
-                    // was interrupted.
-                    // the local transport is just shutting down temporarily
-                    // until the remote side
-                    // is restored.
-                    if (!remoteInterupted.get()) {
-                        stop();
-                    }
-                } else if (command.getClass() == ConnectionError.class) {
-                    ConnectionError ce = (ConnectionError) command;
-                    serviceLocalException(ce.getException());
-                } else {
-                    switch (command.getDataStructureType()) {
-                    case WireFormatInfo.DATA_STRUCTURE_TYPE:
-                        break;
-                    default:
-                        LOG.warn("Unexpected local command: " + command);
-                    }
-                }
-            } catch (Throwable e) {
-                LOG.warn("Caught an exception processing local command", e);
-                serviceLocalException(e);
-            }
-        }
-    }
-
-    private boolean suppressMessageDispatch(MessageDispatch md, DemandSubscription sub) throws Exception {
-        // See if this consumer's brokerPath tells us it came from the broker at the other end
-        // of the bridge. I think we should be making this decision based on the message's
-        // broker bread crumbs and not the consumer's? However, the message's broker bread
-        // crumbs are null, which is another matter.   
-        boolean suppress = false;
-        Object consumerInfo = md.getMessage().getDataStructure();
-        if (consumerInfo != null && (consumerInfo instanceof ConsumerInfo)) {
-            suppress = contains(((ConsumerInfo) consumerInfo).getBrokerPath(), remoteBrokerInfo.getBrokerId());
-        }
-        
-        // for durable subs, suppression via filter leaves dangling acks so we need to 
-        // check here and allow the ack irrespective
-        if (!suppress && sub.getLocalInfo().isDurable()) {
-            MessageEvaluationContext messageEvalContext = new MessageEvaluationContext();
-            messageEvalContext.setMessageReference(md.getMessage());
-            suppress = !createNetworkBridgeFilter(null).matches(messageEvalContext);
-        }  
-        return suppress;
-    }
-
-    /**
-     * @return Returns the dynamicallyIncludedDestinations.
-     */
-    public ActiveMQDestination[] getDynamicallyIncludedDestinations() {
-        return dynamicallyIncludedDestinations;
-    }
-
-    /**
-     * @param dynamicallyIncludedDestinations The
-     *            dynamicallyIncludedDestinations to set.
-     */
-    public void setDynamicallyIncludedDestinations(ActiveMQDestination[] dynamicallyIncludedDestinations) {
-        this.dynamicallyIncludedDestinations = dynamicallyIncludedDestinations;
-    }
-
-    /**
-     * @return Returns the excludedDestinations.
-     */
-    public ActiveMQDestination[] getExcludedDestinations() {
-        return excludedDestinations;
-    }
-
-    /**
-     * @param excludedDestinations The excludedDestinations to set.
-     */
-    public void setExcludedDestinations(ActiveMQDestination[] excludedDestinations) {
-        this.excludedDestinations = excludedDestinations;
-    }
-
-    /**
-     * @return Returns the staticallyIncludedDestinations.
-     */
-    public ActiveMQDestination[] getStaticallyIncludedDestinations() {
-        return staticallyIncludedDestinations;
-    }
-
-    /**
-     * @param staticallyIncludedDestinations The staticallyIncludedDestinations
-     *            to set.
-     */
-    public void setStaticallyIncludedDestinations(ActiveMQDestination[] staticallyIncludedDestinations) {
-        this.staticallyIncludedDestinations = staticallyIncludedDestinations;
-    }
-
-    /**
-     * @return Returns the durableDestinations.
-     */
-    public ActiveMQDestination[] getDurableDestinations() {
-        return durableDestinations;
-    }
-
-    /**
-     * @param durableDestinations The durableDestinations to set.
-     */
-    public void setDurableDestinations(ActiveMQDestination[] durableDestinations) {
-        this.durableDestinations = durableDestinations;
-    }
-
-    /**
-     * @return Returns the localBroker.
-     */
-    public Transport getLocalBroker() {
-        return localBroker;
-    }
-
-    /**
-     * @return Returns the remoteBroker.
-     */
-    public Transport getRemoteBroker() {
-        return remoteBroker;
-    }
-
-    /**
-     * @return the createdByDuplex
-     */
-    public boolean isCreatedByDuplex() {
-        return this.createdByDuplex;
-    }
-
-    /**
-     * @param createdByDuplex the createdByDuplex to set
-     */
-    public void setCreatedByDuplex(boolean createdByDuplex) {
-        this.createdByDuplex = createdByDuplex;
-    }
-
-    public static boolean contains(BrokerId[] brokerPath, BrokerId brokerId) {
-        if (brokerPath != null) {
-            for (int i = 0; i < brokerPath.length; i++) {
-                if (brokerId.equals(brokerPath[i])) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    protected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId[] pathsToAppend) {
-        if (brokerPath == null || brokerPath.length == 0) {
-            return pathsToAppend;
-        }
-        BrokerId rc[] = new BrokerId[brokerPath.length + pathsToAppend.length];
-        System.arraycopy(brokerPath, 0, rc, 0, brokerPath.length);
-        System.arraycopy(pathsToAppend, 0, rc, brokerPath.length, pathsToAppend.length);
-        return rc;
-    }
-
-    protected BrokerId[] appendToBrokerPath(BrokerId[] brokerPath, BrokerId idToAppend) {
-        if (brokerPath == null || brokerPath.length == 0) {
-            return new BrokerId[] { idToAppend };
-        }
-        BrokerId rc[] = new BrokerId[brokerPath.length + 1];
-        System.arraycopy(brokerPath, 0, rc, 0, brokerPath.length);
-        rc[brokerPath.length] = idToAppend;
-        return rc;
-    }
-
-    protected boolean isPermissableDestination(ActiveMQDestination destination) {
-        return isPermissableDestination(destination, false);
-    }
-
-    protected boolean isPermissableDestination(ActiveMQDestination destination, boolean allowTemporary) {
-        // Are we not bridging temp destinations?
-        if (destination.isTemporary()) {
-            if (allowTemporary) {
-                return true;
-            } else {
-                return configuration.isBridgeTempDestinations();
-            }
-        }
-
-        ActiveMQDestination[] dests = excludedDestinations;
-        if (dests != null && dests.length > 0) {
-            for (int i = 0; i < dests.length; i++) {
-                ActiveMQDestination match = dests[i];
-                DestinationFilter exclusionFilter = DestinationFilter.parseFilter(match);
-                if (match != null && exclusionFilter.matches(destination) && dests[i].getDestinationType() == destination.getDestinationType()) {
-                    return false;
-                }
-            }
-        }
-
-        dests = dynamicallyIncludedDestinations;
-        if (dests != null && dests.length > 0) {
-            for (int i = 0; i < dests.length; i++) {
-                ActiveMQDestination match = dests[i];
-                DestinationFilter inclusionFilter = DestinationFilter.parseFilter(match);
-                if (match != null && inclusionFilter.matches(destination) && dests[i].getDestinationType() == destination.getDestinationType()) {
-                    return true;
-                }
-            }
-
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Subscriptions for these destinations are always created
-     */
-    protected void setupStaticDestinations() {
-        ActiveMQDestination[] dests = staticallyIncludedDestinations;
-        if (dests != null) {
-            for (int i = 0; i < dests.length; i++) {
-                ActiveMQDestination dest = dests[i];
-                DemandSubscription sub = createDemandSubscription(dest);
-                try {
-                    addSubscription(sub);
-                } catch (IOException e) {
-                    LOG.error("Failed to add static destination " + dest, e);
-                }
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("bridging messages for static destination: " + dest);
-                }
-            }
-        }
-    }
-
-    protected boolean addConsumerInfo(final ConsumerInfo consumerInfo) throws IOException {
-        boolean consumerAdded = false;
-        ConsumerInfo info = consumerInfo.copy();
-        addRemoteBrokerToBrokerPath(info);
-        DemandSubscription sub = createDemandSubscription(info);
-        if (sub != null) {
-            if (duplicateSuppressionIsRequired(sub)) {
-                undoMapRegistration(sub);
-            } else {
-                addSubscription(sub);
-                consumerAdded = true;
-            }
-        }
-        return consumerAdded;
-    }
-
-    private void undoMapRegistration(DemandSubscription sub) {
-        subscriptionMapByLocalId.remove(sub.getLocalInfo().getConsumerId());
-        subscriptionMapByRemoteId.remove(sub.getRemoteInfo().getConsumerId());
-    }
-
-    /*
-     * check our existing subs networkConsumerIds against the list of network ids in this subscription
-     * A match means a duplicate which we suppress for topics and maybe for queues
-     */
-    private boolean duplicateSuppressionIsRequired(DemandSubscription candidate) {
-        final ConsumerInfo consumerInfo = candidate.getRemoteInfo();
-        boolean suppress = false;
-
-        if (consumerInfo.getDestination().isQueue() && !configuration.isSuppressDuplicateQueueSubscriptions() ||
-                consumerInfo.getDestination().isTopic() && !configuration.isSuppressDuplicateTopicSubscriptions()) {
-            return suppress;
-        }
-
-        List<ConsumerId> candidateConsumers = consumerInfo.getNetworkConsumerIds();
-        Collection<Subscription> currentSubs = 
-            getRegionSubscriptions(consumerInfo.getDestination().isTopic());
-        for (Subscription sub : currentSubs) {
-            List<ConsumerId> networkConsumers = sub.getConsumerInfo().getNetworkConsumerIds();
-            if (!networkConsumers.isEmpty()) {
-                if (matchFound(candidateConsumers, networkConsumers)) {
-                    suppress = hasLowerPriority(sub, candidate.getLocalInfo());
-                    break;
-                }
-            }
-        }
-        return suppress;
-    }
-
-    private boolean hasLowerPriority(Subscription existingSub, ConsumerInfo candidateInfo) {
-        boolean suppress = false;
-
-        if (existingSub.getConsumerInfo().getPriority() >= candidateInfo.getPriority()) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(configuration.getBrokerName() + " Ignoring duplicate subscription from " + remoteBrokerName
-                        + ", sub: " + candidateInfo + " is duplicated by network subscription with equal or higher network priority: " 
-                        + existingSub.getConsumerInfo()  + ", networkComsumerIds: " + existingSub.getConsumerInfo().getNetworkConsumerIds());
-            }
-            suppress = true;
-        } else {
-            // remove the existing lower priority duplicate and allow this candidate
-            try {
-                removeDuplicateSubscription(existingSub);
-
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(configuration.getBrokerName() + " Replacing duplicate subscription " + existingSub.getConsumerInfo()
-                            + " with sub from " + remoteBrokerName
-                            + ", which has a higher priority, new sub: " + candidateInfo + ", networkComsumerIds: " 
-                            + candidateInfo.getNetworkConsumerIds());
-                }
-            } catch (IOException e) {
-                LOG.error("Failed to remove duplicated sub as a result of sub with higher priority, sub: " + existingSub, e);
-            }
-        }
-        return suppress;
-    }
-
-    private void removeDuplicateSubscription(Subscription existingSub) throws IOException {
-        for (NetworkConnector connector : brokerService.getNetworkConnectors()) {
-            if (connector.removeDemandSubscription(existingSub.getConsumerInfo().getConsumerId())) {
-                break;
-            }
-        }
-    }
-
-    private boolean matchFound(List<ConsumerId> candidateConsumers, List<ConsumerId> networkConsumers) {
-        boolean found = false;
-        for (ConsumerId aliasConsumer : networkConsumers) {
-            if (candidateConsumers.contains(aliasConsumer)) {
-                found = true;
-                break;
-            }
-        }
-        return found;
-    }
-
-    private final Collection<Subscription> getRegionSubscriptions(boolean isTopic) {
-        RegionBroker region = (RegionBroker) brokerService.getRegionBroker();
-        AbstractRegion abstractRegion = (AbstractRegion) 
-            (isTopic ? region.getTopicRegion() : region.getQueueRegion());
-        return abstractRegion.getSubscriptions().values();
-    }
-
-    protected DemandSubscription createDemandSubscription(ConsumerInfo info) throws IOException {
-        //add our original id to ourselves
-        info.addNetworkConsumerId(info.getConsumerId());
-        return doCreateDemandSubscription(info);
-    }
-
-    protected DemandSubscription doCreateDemandSubscription(ConsumerInfo info) throws IOException {
-        DemandSubscription result = new DemandSubscription(info);
-        result.getLocalInfo().setConsumerId(new ConsumerId(localSessionInfo.getSessionId(), consumerIdGenerator.getNextSequenceId()));
-        if (info.getDestination().isTemporary()) {
-            // reset the local connection Id
-
-            ActiveMQTempDestination dest = (ActiveMQTempDestination) result.getLocalInfo().getDestination();
-            dest.setConnectionId(localConnectionInfo.getConnectionId().toString());
-        }
-
-        if (configuration.isDecreaseNetworkConsumerPriority()) {
-            byte priority = ConsumerInfo.NETWORK_CONSUMER_PRIORITY;
-            if (info.getBrokerPath() != null && info.getBrokerPath().length > 1) {
-                // The longer the path to the consumer, the less it's consumer priority.
-                priority -= info.getBrokerPath().length + 1;
-            }
-            result.getLocalInfo().setPriority(priority);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(configuration.getBrokerName() + " using priority :" + priority + " for subscription: " + info);
-            }
-        }
-        configureDemandSubscription(info, result);
-        return result;
-    }
-
-    final protected DemandSubscription createDemandSubscription(ActiveMQDestination destination) {
-        ConsumerInfo info = new ConsumerInfo();
-        info.setDestination(destination);
-        // the remote info held by the DemandSubscription holds the original
-        // consumerId,
-        // the local info get's overwritten
-
-        info.setConsumerId(new ConsumerId(localSessionInfo.getSessionId(), consumerIdGenerator.getNextSequenceId()));
-        DemandSubscription result = null;
-        try {
-            result = createDemandSubscription(info);
-        } catch (IOException e) {
-            LOG.error("Failed to create DemandSubscription ", e);
-        }
-        if (result != null) {
-            result.getLocalInfo().setPriority(ConsumerInfo.NETWORK_CONSUMER_PRIORITY);
-        }
-        return result;
-    }
-
-    protected void configureDemandSubscription(ConsumerInfo info, DemandSubscription sub) throws IOException {
-        sub.getLocalInfo().setDispatchAsync(configuration.isDispatchAsync());
-        sub.getLocalInfo().setPrefetchSize(configuration.getPrefetchSize());
-        subscriptionMapByLocalId.put(sub.getLocalInfo().getConsumerId(), sub);
-        subscriptionMapByRemoteId.put(sub.getRemoteInfo().getConsumerId(), sub);
-
-        if (!info.isDurable()) {
-            // This works for now since we use a VM connection to the local broker.
-            // may need to change if we ever subscribe to a remote broker.
-            sub.getLocalInfo().setAdditionalPredicate(createNetworkBridgeFilter(info));
-        } else  {
-            // need to ack this message if it is ignored as it is durable so
-            // we check before we send. see: suppressMessageDispatch()
-        }
-    }
-
-    protected void removeDemandSubscription(ConsumerId id) throws IOException {
-        DemandSubscription sub = subscriptionMapByRemoteId.remove(id);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug(configuration.getBrokerName() + " remove request on " + localBroker + " from " + remoteBrokerName + " , consumer id: " + id + ", matching sub: " + sub);
-        }
-        if (sub != null) {
-            removeSubscription(sub);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(configuration.getBrokerName() + " removed sub on " + localBroker + " from " + remoteBrokerName + " :  " + sub.getRemoteInfo());
-            }
-        }
-    }
-
-    protected boolean removeDemandSubscriptionByLocalId(ConsumerId consumerId) {
-        boolean removeDone = false;
-        DemandSubscription sub = subscriptionMapByLocalId.get(consumerId);
-        if (sub != null) {
-            try {
-                removeDemandSubscription(sub.getRemoteInfo().getConsumerId());
-                removeDone = true;
-            } catch (IOException e) {
-                LOG.debug("removeDemandSubscriptionByLocalId failed for localId: " + consumerId, e);
-            }
-        }
-        return removeDone;
-    }
-
-    protected void waitStarted() throws InterruptedException {
-        startedLatch.await();
-        localBrokerIdKnownLatch.await();
-    }
-
-    protected void clearDownSubscriptions() {
-        subscriptionMapByLocalId.clear();
-        subscriptionMapByRemoteId.clear();
-    }
-
-    protected abstract NetworkBridgeFilter createNetworkBridgeFilter(ConsumerInfo info) throws IOException;
-
-    protected abstract void serviceLocalBrokerInfo(Command command) throws InterruptedException;
-
-    protected abstract void addRemoteBrokerToBrokerPath(ConsumerInfo info) throws IOException;
-
-    protected abstract void serviceRemoteBrokerInfo(Command command) throws IOException;
-
-    protected abstract BrokerId[] getRemoteBrokerPath();
-
-    public void setNetworkBridgeListener(NetworkBridgeListener listener) {
-        this.networkBridgeListener = listener;
-    }
-
-    private void fireBridgeFailed() {
-        NetworkBridgeListener l = this.networkBridgeListener;
-        if (l != null) {
-            l.bridgeFailed();
-        }
-    }
-
-    public String getRemoteAddress() {
-        return remoteBroker.getRemoteAddress();
-    }
-
-    public String getLocalAddress() {
-        return localBroker.getRemoteAddress();
-    }
-
-    public String getRemoteBrokerName() {
-        return remoteBrokerInfo == null ? null : remoteBrokerInfo.getBrokerName();
-    }
-
-    public String getLocalBrokerName() {
-        return localBrokerInfo == null ? null : localBrokerInfo.getBrokerName();
-    }
-
-    public long getDequeueCounter() {
-        return dequeueCounter.get();
-    }
-
-    public long getEnqueueCounter() {
-        return enqueueCounter.get();
-    }
-
-    protected boolean isDuplex() {
-        return configuration.isDuplex() || createdByDuplex;
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerService = brokerService;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java
deleted file mode 100644
index 8d88f11..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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.network;
-
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents a network bridge interface
- * 
- * 
- */
-public class DemandSubscription {
-    private static final Logger LOG = LoggerFactory.getLogger(DemandSubscription.class);
-
-    private final ConsumerInfo remoteInfo;
-    private final ConsumerInfo localInfo;
-    private Set<ConsumerId> remoteSubsIds = new CopyOnWriteArraySet<ConsumerId>();
-
-    private AtomicInteger dispatched = new AtomicInteger(0);
-    private AtomicBoolean activeWaiter = new AtomicBoolean();
-
-    DemandSubscription(ConsumerInfo info) {
-        remoteInfo = info;
-        localInfo = info.copy();
-        localInfo.setNetworkSubscription(true);
-        remoteSubsIds.add(info.getConsumerId());
-    }
-
-    /**
-     * Increment the consumers associated with this subscription
-     * 
-     * @param id
-     * @return true if added
-     */
-    public boolean add(ConsumerId id) {
-        return remoteSubsIds.add(id);
-    }
-
-    /**
-     * Increment the consumers associated with this subscription
-     * 
-     * @param id
-     * @return true if removed
-     */
-    public boolean remove(ConsumerId id) {
-        return remoteSubsIds.remove(id);
-    }
-
-    /**
-     * @return true if there are no interested consumers
-     */
-    public boolean isEmpty() {
-        return remoteSubsIds.isEmpty();
-    }
-
-    /**
-     * @return Returns the localInfo.
-     */
-    public ConsumerInfo getLocalInfo() {
-        return localInfo;
-    }
-
-    /**
-     * @return Returns the remoteInfo.
-     */
-    public ConsumerInfo getRemoteInfo() {
-        return remoteInfo;
-    }
-
-    public void waitForCompletion() {
-        if (dispatched.get() > 0) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Waiting for completion for sub: " + localInfo.getConsumerId() + ", dispatched: " + this.dispatched.get());
-            }
-            activeWaiter.set(true);
-            if (dispatched.get() > 0) {
-                synchronized (activeWaiter) {
-                    try {
-                        activeWaiter.wait();
-                    } catch (InterruptedException ignored) {
-                    }
-                }
-                if (this.dispatched.get() > 0) {
-                    LOG.warn("demand sub interrupted or timedout while waiting for outstanding responses, expect potentially " + this.dispatched.get() + " duplicate deliveried");
-                }
-            }
-        }
-    }
-
-    public void decrementOutstandingResponses() {
-        if (dispatched.decrementAndGet() == 0 && activeWaiter.get()) {
-            synchronized (activeWaiter) {
-                activeWaiter.notifyAll();
-            }
-        }
-    }
-
-    public boolean incrementOutstandingResponses() {
-        dispatched.incrementAndGet();
-        if (activeWaiter.get()) {
-            decrementOutstandingResponses();
-            return false;
-        }
-        return true;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java
deleted file mode 100644
index 3c17545..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.SslContext;
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportDisposedIOException;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
-import org.apache.activemq.transport.discovery.DiscoveryListener;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.management.ObjectName;
-
-/**
- * A network connector which uses a discovery agent to detect the remote brokers
- * available and setup a connection to each available remote broker
- * 
- * @org.apache.xbean.XBean element="networkConnector"
- * 
- */
-public class DiscoveryNetworkConnector extends NetworkConnector implements DiscoveryListener {
-    private static final Logger LOG = LoggerFactory.getLogger(DiscoveryNetworkConnector.class);
-
-    private DiscoveryAgent discoveryAgent;
-    
-    private Map<String, String> parameters;
-    
-    public DiscoveryNetworkConnector() {
-    }
-
-    public DiscoveryNetworkConnector(URI discoveryURI) throws IOException {
-        setUri(discoveryURI);
-    }
-
-    public void setUri(URI discoveryURI) throws IOException {
-        setDiscoveryAgent(DiscoveryAgentFactory.createDiscoveryAgent(discoveryURI));
-        try {
-            parameters = URISupport.parseParameters(discoveryURI);
-            // allow discovery agent to grab it's parameters
-            IntrospectionSupport.setProperties(getDiscoveryAgent(), parameters);
-        } catch (URISyntaxException e) {
-            LOG.warn("failed to parse query parameters from discoveryURI: " + discoveryURI, e);
-        }  
-        
-    }
-
-    public void onServiceAdd(DiscoveryEvent event) {
-        // Ignore events once we start stopping.
-        if (serviceSupport.isStopped() || serviceSupport.isStopping()) {
-            return;
-        }
-        String url = event.getServiceName();
-        if (url != null) {
-            URI uri;
-            try {
-                uri = new URI(url);
-            } catch (URISyntaxException e) {
-                LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
-                return;
-            }
-            // Should we try to connect to that URI?
-            if( bridges.containsKey(uri) ) {
-                LOG.debug("Discovery agent generated a duplicate onServiceAdd event for: "+uri );
-                return;
-            }
-            if ( localURI.equals(uri) || (connectionFilter != null && !connectionFilter.connectTo(uri))) {
-                LOG.debug("not connecting loopback: " + uri);
-                return;
-            }
-            URI connectUri = uri;
-            try {
-                connectUri = URISupport.applyParameters(connectUri, parameters, DISCOVERED_OPTION_PREFIX);
-            } catch (URISyntaxException e) {
-                LOG.warn("could not apply query parameters: " + parameters + " to: " + connectUri, e);
-            }
-            LOG.info("Establishing network connection from " + localURI + " to " + connectUri);
-
-            Transport remoteTransport;
-            Transport localTransport;
-            try {
-                // Allows the transport to access the broker's ssl configuration.
-                SslContext.setCurrentSslContext(getBrokerService().getSslContext());
-                try {
-                    remoteTransport = TransportFactory.connect(connectUri);
-                } catch (Exception e) {
-                    LOG.warn("Could not connect to remote URI: " + connectUri + ": " + e.getMessage());
-                    LOG.debug("Connection failure exception: " + e, e);
-                    return;
-                }
-                try {
-                    localTransport = createLocalTransport();
-                } catch (Exception e) {
-                    ServiceSupport.dispose(remoteTransport);
-                    LOG.warn("Could not connect to local URI: " + localURI + ": " + e.getMessage());
-                    LOG.debug("Connection failure exception: " + e, e);
-                    return;
-                }
-            } finally {
-                SslContext.setCurrentSslContext(null);
-            }
-            NetworkBridge bridge = createBridge(localTransport, remoteTransport, event);
-            try {
-                bridge.start();
-                bridges.put(uri, bridge);
-    	    } catch (TransportDisposedIOException e) {
-                LOG.warn("Network bridge between: " + localURI + " and: " + uri + " was correctly stopped before it was correctly started.");
-            } catch (Exception e) {
-                ServiceSupport.dispose(localTransport);
-                ServiceSupport.dispose(remoteTransport);
-                LOG.warn("Could not start network bridge between: " + localURI + " and: " + uri + " due to: " + e);
-                LOG.debug("Start failure exception: " + e, e);
-                try {
-                    discoveryAgent.serviceFailed(event);
-                } catch (IOException e1) {
-                    LOG.debug("Discovery agent failure while handling failure event: " + e1.getMessage(), e1);
-                }
-                return;
-            }
-        }
-    }
-
-    public void onServiceRemove(DiscoveryEvent event) {
-        String url = event.getServiceName();
-        if (url != null) {
-            URI uri;
-            try {
-                uri = new URI(url);
-            } catch (URISyntaxException e) {
-                LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
-                return;
-            }
-
-            NetworkBridge bridge = bridges.remove(uri);
-            if (bridge == null) {
-                return;
-            }
-
-            ServiceSupport.dispose(bridge);
-        }
-    }
-
-    public DiscoveryAgent getDiscoveryAgent() {
-        return discoveryAgent;
-    }
-
-    public void setDiscoveryAgent(DiscoveryAgent discoveryAgent) {
-        this.discoveryAgent = discoveryAgent;
-        if (discoveryAgent != null) {
-            this.discoveryAgent.setDiscoveryListener(this);
-        }
-    }
-
-    protected void handleStart() throws Exception {
-        if (discoveryAgent == null) {
-            throw new IllegalStateException("You must configure the 'discoveryAgent' property");
-        }
-        this.discoveryAgent.start();
-        super.handleStart();
-    }
-
-    protected void handleStop(ServiceStopper stopper) throws Exception {
-        for (Iterator<NetworkBridge> i = bridges.values().iterator(); i.hasNext();) {
-            NetworkBridge bridge = i.next();
-            try {
-                bridge.stop();
-            } catch (Exception e) {
-                stopper.onException(this, e);
-            }
-        }
-        try {
-            this.discoveryAgent.stop();
-        } catch (Exception e) {
-            stopper.onException(this, e);
-        }
-
-        super.handleStop(stopper);
-    }
-
-    protected NetworkBridge createBridge(Transport localTransport, Transport remoteTransport, final DiscoveryEvent event) {
-        class DiscoverNetworkBridgeListener extends MBeanNetworkListener {
-
-            public DiscoverNetworkBridgeListener(BrokerService brokerService, ObjectName connectorName) {
-                super(brokerService, connectorName);
-            }
-
-            public void bridgeFailed() {
-                if (!serviceSupport.isStopped()) {
-                    try {
-                        discoveryAgent.serviceFailed(event);
-                    } catch (IOException e) {
-                    }
-                }
-
-            }
-        }
-        NetworkBridgeListener listener = new DiscoverNetworkBridgeListener(getBrokerService(), getObjectName());
-
-        DemandForwardingBridge result = NetworkBridgeFactory.createBridge(this, localTransport, remoteTransport, listener);
-        result.setBrokerService(getBrokerService());
-        return configureBridge(result);
-    }
-
-    @Override
-    public String toString() {
-        return "DiscoveryNetworkConnector:" + getName() + ":" + getBrokerService();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
deleted file mode 100644
index 54d8ebd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.filter.DestinationFilter;
-import org.apache.activemq.transport.Transport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Consolidates subscriptions
- * 
- * 
- */
-public class DurableConduitBridge extends ConduitBridge {
-    private static final Logger LOG = LoggerFactory.getLogger(DurableConduitBridge.class);
-
-    /**
-     * Constructor
-     * 
-     * @param configuration
-     * 
-     * @param localBroker
-     * @param remoteBroker
-     */
-    public DurableConduitBridge(NetworkBridgeConfiguration configuration, Transport localBroker,
-                                Transport remoteBroker) {
-        super(configuration, localBroker, remoteBroker);
-    }
-
-    /**
-     * Subscriptions for these destinations are always created
-     * 
-     */
-    protected void setupStaticDestinations() {
-        super.setupStaticDestinations();
-        ActiveMQDestination[] dests = configuration.isDynamicOnly() ? null : durableDestinations;
-        if (dests != null) {
-            for (int i = 0; i < dests.length; i++) {
-                ActiveMQDestination dest = dests[i];
-                if (isPermissableDestination(dest) && !doesConsumerExist(dest)) {
-                    DemandSubscription sub = createDemandSubscription(dest);
-                    if (dest.isTopic()) {
-                        sub.getLocalInfo().setSubscriptionName(getSubscriberName(dest));
-                    }
-                    try {
-                        addSubscription(sub);
-                    } catch (IOException e) {
-                        LOG.error("Failed to add static destination " + dest, e);
-                    }
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Forwarding messages for durable destination: " + dest);
-                    }
-                }
-            }
-        }
-    }
-
-    protected DemandSubscription createDemandSubscription(ConsumerInfo info) throws IOException {
-        if (addToAlreadyInterestedConsumers(info)) {
-            return null; // don't want this subscription added
-        }
-        //add our original id to ourselves
-        info.addNetworkConsumerId(info.getConsumerId());
-
-        if (info.isDurable()) {
-            // set the subscriber name to something reproducible
-            info.setSubscriptionName(getSubscriberName(info.getDestination()));
-            // and override the consumerId with something unique so that it won't
-            // be removed if the durable subscriber (at the other end) goes away
-            info.setConsumerId(new ConsumerId(localSessionInfo.getSessionId(), consumerIdGenerator
-                    .getNextSequenceId()));
-        }
-        info.setSelector(null);
-        return doCreateDemandSubscription(info);
-    }
-
-    protected String getSubscriberName(ActiveMQDestination dest) {
-        String subscriberName = DURABLE_SUB_PREFIX + configuration.getBrokerName() + "_" + dest.getPhysicalName();
-        return subscriberName;
-    }
-
-    protected boolean doesConsumerExist(ActiveMQDestination dest) {
-        DestinationFilter filter = DestinationFilter.parseFilter(dest);
-        for (Iterator i = subscriptionMapByLocalId.values().iterator(); i.hasNext();) {
-            DemandSubscription ds = (DemandSubscription)i.next();
-            if (filter.matches(ds.getLocalInfo().getDestination())) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java
deleted file mode 100755
index 54c7c0b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.ResponseCallback;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Forwards all messages from the local broker to the remote broker.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class ForwardingBridge implements Service {
-
-    private static final IdGenerator ID_GENERATOR = new IdGenerator();
-    private static final Logger LOG = LoggerFactory.getLogger(ForwardingBridge.class);
-
-    final AtomicLong enqueueCounter = new AtomicLong();
-    final AtomicLong dequeueCounter = new AtomicLong();
-    ConnectionInfo connectionInfo;
-    SessionInfo sessionInfo;
-    ProducerInfo producerInfo;
-    ConsumerInfo queueConsumerInfo;
-    ConsumerInfo topicConsumerInfo;
-    BrokerId localBrokerId;
-    BrokerId remoteBrokerId;
-    BrokerInfo localBrokerInfo;
-    BrokerInfo remoteBrokerInfo;
-
-    private final Transport localBroker;
-    private final Transport remoteBroker;
-    private String clientId;
-    private int prefetchSize = 1000;
-    private boolean dispatchAsync;
-    private String destinationFilter = ">";
-    private NetworkBridgeListener bridgeFailedListener;
-
-    public ForwardingBridge(Transport localBroker, Transport remoteBroker) {
-        this.localBroker = localBroker;
-        this.remoteBroker = remoteBroker;
-    }
-
-    public void start() throws Exception {
-        LOG.info("Starting a network connection between " + localBroker + " and " + remoteBroker
-                 + " has been established.");
-
-        localBroker.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Object o) {
-                Command command = (Command)o;
-                serviceLocalCommand(command);
-            }
-
-            public void onException(IOException error) {
-                serviceLocalException(error);
-            }
-        });
-
-        remoteBroker.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Object o) {
-                Command command = (Command)o;
-                serviceRemoteCommand(command);
-            }
-
-            public void onException(IOException error) {
-                serviceRemoteException(error);
-            }
-        });
-
-        localBroker.start();
-        remoteBroker.start();
-    }
-
-    protected void triggerStartBridge() throws IOException {
-        Thread thead = new Thread() {
-            public void run() {
-                try {
-                    startBridge();
-                } catch (IOException e) {
-                    LOG.error("Failed to start network bridge: " + e, e);
-                }
-            }
-        };
-        thead.start();
-    }
-
-    /**
-     * @throws IOException
-     */
-    final void startBridge() throws IOException {
-        connectionInfo = new ConnectionInfo();
-        connectionInfo.setConnectionId(new ConnectionId(ID_GENERATOR.generateId()));
-        connectionInfo.setClientId(clientId);
-        localBroker.oneway(connectionInfo);
-        remoteBroker.oneway(connectionInfo);
-
-        sessionInfo = new SessionInfo(connectionInfo, 1);
-        localBroker.oneway(sessionInfo);
-        remoteBroker.oneway(sessionInfo);
-
-        queueConsumerInfo = new ConsumerInfo(sessionInfo, 1);
-        queueConsumerInfo.setDispatchAsync(dispatchAsync);
-        queueConsumerInfo.setDestination(new ActiveMQQueue(destinationFilter));
-        queueConsumerInfo.setPrefetchSize(prefetchSize);
-        queueConsumerInfo.setPriority(ConsumerInfo.NETWORK_CONSUMER_PRIORITY);
-        localBroker.oneway(queueConsumerInfo);
-
-        producerInfo = new ProducerInfo(sessionInfo, 1);
-        producerInfo.setResponseRequired(false);
-        remoteBroker.oneway(producerInfo);
-
-        if (connectionInfo.getClientId() != null) {
-            topicConsumerInfo = new ConsumerInfo(sessionInfo, 2);
-            topicConsumerInfo.setDispatchAsync(dispatchAsync);
-            topicConsumerInfo.setSubscriptionName("topic-bridge");
-            topicConsumerInfo.setRetroactive(true);
-            topicConsumerInfo.setDestination(new ActiveMQTopic(destinationFilter));
-            topicConsumerInfo.setPrefetchSize(prefetchSize);
-            topicConsumerInfo.setPriority(ConsumerInfo.NETWORK_CONSUMER_PRIORITY);
-            localBroker.oneway(topicConsumerInfo);
-        }
-        LOG.info("Network connection between " + localBroker + " and " + remoteBroker
-                 + " has been established.");
-    }
-
-    public void stop() throws Exception {
-        try {
-            if (connectionInfo != null) {
-                localBroker.request(connectionInfo.createRemoveCommand());
-                remoteBroker.request(connectionInfo.createRemoveCommand());
-            }
-            localBroker.setTransportListener(null);
-            remoteBroker.setTransportListener(null);
-            localBroker.oneway(new ShutdownInfo());
-            remoteBroker.oneway(new ShutdownInfo());
-        } finally {
-            ServiceStopper ss = new ServiceStopper();
-            ss.stop(localBroker);
-            ss.stop(remoteBroker);
-            ss.throwFirstException();
-        }
-    }
-
-    public void serviceRemoteException(Throwable error) {
-        LOG.info("Unexpected remote exception: " + error);
-        LOG.debug("Exception trace: ", error);
-    }
-
-    protected void serviceRemoteCommand(Command command) {
-        try {
-            if (command.isBrokerInfo()) {
-                synchronized (this) {
-                    remoteBrokerInfo = (BrokerInfo)command;
-                    remoteBrokerId = remoteBrokerInfo.getBrokerId();
-                    if (localBrokerId != null) {
-                        if (localBrokerId.equals(remoteBrokerId)) {
-                            LOG.info("Disconnecting loop back connection.");
-                            ServiceSupport.dispose(this);
-                        } else {
-                            triggerStartBridge();
-                        }
-                    }
-                }
-            } else {
-                LOG.warn("Unexpected remote command: " + command);
-            }
-        } catch (IOException e) {
-            serviceLocalException(e);
-        }
-    }
-
-    public void serviceLocalException(Throwable error) {
-        LOG.info("Unexpected local exception: " + error);
-        LOG.debug("Exception trace: ", error);
-        fireBridgeFailed();
-    }
-
-    protected void serviceLocalCommand(Command command) {
-        try {
-            if (command.isMessageDispatch()) {
-
-                enqueueCounter.incrementAndGet();
-
-                final MessageDispatch md = (MessageDispatch)command;
-                Message message = md.getMessage();
-                message.setProducerId(producerInfo.getProducerId());
-
-                if (message.getOriginalTransactionId() == null) {
-                    message.setOriginalTransactionId(message.getTransactionId());
-                }
-                message.setTransactionId(null);
-
-                if (!message.isResponseRequired()) {
-                    // If the message was originally sent using async send, we
-                    // will preserve that QOS
-                    // by bridging it using an async send (small chance of
-                    // message loss).
-                    remoteBroker.oneway(message);
-                    dequeueCounter.incrementAndGet();
-                    localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1));
-
-                } else {
-
-                    // The message was not sent using async send, so we should
-                    // only ack the local
-                    // broker when we get confirmation that the remote broker
-                    // has received the message.
-                    ResponseCallback callback = new ResponseCallback() {
-                        public void onCompletion(FutureResponse future) {
-                            try {
-                                Response response = future.getResult();
-                                if (response.isException()) {
-                                    ExceptionResponse er = (ExceptionResponse)response;
-                                    serviceLocalException(er.getException());
-                                } else {
-                                    dequeueCounter.incrementAndGet();
-                                    localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1));
-                                }
-                            } catch (IOException e) {
-                                serviceLocalException(e);
-                            }
-                        }
-                    };
-
-                    remoteBroker.asyncRequest(message, callback);
-                }
-
-                // Ack on every message since we don't know if the broker is
-                // blocked due to memory
-                // usage and is waiting for an Ack to un-block him.
-
-                // Acking a range is more efficient, but also more prone to
-                // locking up a server
-                // Perhaps doing something like the following should be policy
-                // based.
-                // if(
-                // md.getConsumerId().equals(queueConsumerInfo.getConsumerId())
-                // ) {
-                // queueDispatched++;
-                // if( queueDispatched > (queueConsumerInfo.getPrefetchSize()/2)
-                // ) {
-                // localBroker.oneway(new MessageAck(md,
-                // MessageAck.STANDARD_ACK_TYPE, queueDispatched));
-                // queueDispatched=0;
-                // }
-                // } else {
-                // topicDispatched++;
-                // if( topicDispatched > (topicConsumerInfo.getPrefetchSize()/2)
-                // ) {
-                // localBroker.oneway(new MessageAck(md,
-                // MessageAck.STANDARD_ACK_TYPE, topicDispatched));
-                // topicDispatched=0;
-                // }
-                // }
-            } else if (command.isBrokerInfo()) {
-                synchronized (this) {
-                    localBrokerInfo = (BrokerInfo)command;
-                    localBrokerId = localBrokerInfo.getBrokerId();
-                    if (remoteBrokerId != null) {
-                        if (remoteBrokerId.equals(localBrokerId)) {
-                            LOG.info("Disconnecting loop back connection.");
-                            ServiceSupport.dispose(this);
-                        } else {
-                            triggerStartBridge();
-                        }
-                    }
-                }
-            } else {
-                LOG.debug("Unexpected local command: " + command);
-            }
-        } catch (IOException e) {
-            serviceLocalException(e);
-        }
-    }
-
-    public String getClientId() {
-        return clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public int getPrefetchSize() {
-        return prefetchSize;
-    }
-
-    public void setPrefetchSize(int prefetchSize) {
-        this.prefetchSize = prefetchSize;
-    }
-
-    public boolean isDispatchAsync() {
-        return dispatchAsync;
-    }
-
-    public void setDispatchAsync(boolean dispatchAsync) {
-        this.dispatchAsync = dispatchAsync;
-    }
-
-    public String getDestinationFilter() {
-        return destinationFilter;
-    }
-
-    public void setDestinationFilter(String destinationFilter) {
-        this.destinationFilter = destinationFilter;
-    }
-
-    public void setNetworkBridgeFailedListener(NetworkBridgeListener listener) {
-        this.bridgeFailedListener = listener;
-    }
-
-    private void fireBridgeFailed() {
-        NetworkBridgeListener l = this.bridgeFailedListener;
-        if (l != null) {
-            l.bridgeFailed();
-        }
-    }
-
-    public String getRemoteAddress() {
-        return remoteBroker.getRemoteAddress();
-    }
-
-    public String getLocalAddress() {
-        return localBroker.getRemoteAddress();
-    }
-
-    public String getLocalBrokerName() {
-        return localBrokerInfo == null ? null : localBrokerInfo.getBrokerName();
-    }
-
-    public String getRemoteBrokerName() {
-        return remoteBrokerInfo == null ? null : remoteBrokerInfo.getBrokerName();
-    }
-
-    public long getDequeueCounter() {
-        return dequeueCounter.get();
-    }
-
-    public long getEnqueueCounter() {
-        return enqueueCounter.get();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java
deleted file mode 100644
index cce0110..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.naming.CommunicationException;
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.event.EventDirContext;
-import javax.naming.event.NamespaceChangeListener;
-import javax.naming.event.NamingEvent;
-import javax.naming.event.NamingExceptionEvent;
-import javax.naming.event.ObjectChangeListener;
-
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * class to create dynamic network connectors listed in an directory
- * server using the LDAP v3 protocol as defined in RFC 2251, the
- * entries listed in the directory server must implement the ipHost
- * and ipService objectClasses as defined in RFC 2307.
- * 
- * @author Trevor Pounds
- * @see <a href="http://www.faqs.org/rfcs/rfc2251.html">RFC 2251</a>
- * @see <a href="http://www.faqs.org/rfcs/rfc2307.html">RFC 2307</a>
- *
- * @org.apache.xbean.XBean element="ldapNetworkConnector"
- */
-public class      LdapNetworkConnector
-       extends    NetworkConnector
-       implements NamespaceChangeListener,
-                  ObjectChangeListener
-{
-   private static final Logger LOG = LoggerFactory.getLogger(LdapNetworkConnector.class);
-
-   // force returned entries to implement the ipHost and ipService object classes (RFC 2307)
-   private static final String REQUIRED_OBJECT_CLASS_FILTER  = "(&(objectClass=ipHost)(objectClass=ipService))";
-
-   // connection
-   private URI[]   availableURIs      = null;
-   private int     availableURIsIndex = 0;
-   private String  base               = null;
-   private boolean failover           = false;
-   private long    curReconnectDelay  = 1000;  /* 1 sec */
-   private long    maxReconnectDelay  = 30000; /* 30 sec */
-
-   // authentication
-   private String  user                    = null;
-   private String  password                = null;
-   private boolean anonymousAuthentication = false;
-
-   // search
-   private SearchControls searchControls      = new SearchControls(/* ONELEVEL_SCOPE */);
-   private String         searchFilter        = REQUIRED_OBJECT_CLASS_FILTER;
-   private boolean        searchEventListener = false;
-
-   // connector management
-   private Map<URI, NetworkConnector> connectorMap = new ConcurrentHashMap();
-   private Map<URI, Integer>          referenceMap = new ConcurrentHashMap();
-   private Map<String, URI>           uuidMap      = new ConcurrentHashMap();
-
-   // local context
-   private DirContext context = null;
-   //currently in use URI
-   private URI ldapURI = null;
-
-   /**
-    * returns the next URI from the configured list
-    *
-    * @return random URI from the configured list
-    */
-   public URI getUri()
-      { return availableURIs[++availableURIsIndex % availableURIs.length]; }
-
-   /**
-    * sets the LDAP server URI
-    *
-    * @param _uri LDAP server URI
-    */
-   public void setUri(URI _uri)
-      throws Exception
-   {
-      CompositeData data = URISupport.parseComposite(_uri);
-      if(data.getScheme().equals("failover"))
-      {
-         availableURIs = data.getComponents();
-         failover = true;
-      }
-      else
-         { availableURIs = new URI[]{ _uri }; }
-   }
-
-   /**
-    * sets the base LDAP dn used for lookup operations
-    *
-    * @param _base LDAP base dn
-    */
-   public void setBase(String _base)
-      { base = _base; }
-
-   /**
-    * sets the LDAP user for access credentials
-    *
-    * @param _user LDAP dn of user
-    */
-   public void setUser(String _user)
-      { user = _user; }
-
-   /**
-    * sets the LDAP password for access credentials
-    *
-    * @param _password user password
-    */
-   public void setPassword(String _password)
-      { password = _password; }
-
-   /**
-    * sets LDAP anonymous authentication access credentials
-    *
-    * @param _anonymousAuthentication set to true to use anonymous authentication
-    */
-   public void setAnonymousAuthentication(boolean _anonymousAuthentication)
-      { anonymousAuthentication = _anonymousAuthentication; }
-
-   /**
-    * sets the LDAP search scope
-    *
-    * @param _searchScope LDAP JNDI search scope
-    */
-   public void setSearchScope(String _searchScope)
-      throws Exception
-   {
-      int scope;
-      if(_searchScope.equals("OBJECT_SCOPE"))
-         { scope = SearchControls.OBJECT_SCOPE; }
-      else if(_searchScope.equals("ONELEVEL_SCOPE"))
-         { scope = SearchControls.ONELEVEL_SCOPE; }
-      else if(_searchScope.equals("SUBTREE_SCOPE"))
-         { scope = SearchControls.SUBTREE_SCOPE; }
-      else
-         { throw new Exception("ERR: unknown LDAP search scope specified: " + _searchScope); }
-      searchControls.setSearchScope(scope);
-   }
-
-   /**
-    * sets the LDAP search filter as defined in RFC 2254
-    *
-    * @param _searchFilter LDAP search filter
-    * @see <a href="http://www.faqs.org/rfcs/rfc2254.html">RFC 2254</a>
-    */
-   public void setSearchFilter(String _searchFilter)
-      { searchFilter = "(&" + REQUIRED_OBJECT_CLASS_FILTER + "(" + _searchFilter + "))"; }
-
-   /**
-    * enables/disable a persistent search to the LDAP server as defined
-    * in draft-ietf-ldapext-psearch-03.txt (2.16.840.1.113730.3.4.3)
-    *
-    * @param _searchEventListener enable = true, disable = false (default)
-    * @see <a href="http://www.ietf.org/proceedings/01mar/I-D/draft-ietf-ldapext-psearch-03.txt">draft-ietf-ldapext-psearch-03.txt</a>
-    */
-   public void setSearchEventListener(boolean _searchEventListener)
-      { searchEventListener = _searchEventListener; }
-
-   /**
-    * start the connector
-    */
-   public void start()
-      throws Exception
-   {
-      LOG.info("connecting...");
-      Hashtable<String, String> env = new Hashtable();
-      env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
-      this.ldapURI = getUri();
-      LOG.debug("    URI [" + this.ldapURI + "]");
-      env.put(Context.PROVIDER_URL, this.ldapURI.toString());
-      if(anonymousAuthentication)
-      {
-         LOG.debug("    login credentials [anonymous]");
-         env.put(Context.SECURITY_AUTHENTICATION, "none");
-      }
-      else
-      {
-         LOG.debug("    login credentials [" + user + ":******]");
-         env.put(Context.SECURITY_PRINCIPAL,   user);
-         env.put(Context.SECURITY_CREDENTIALS, password);
-      }
-      boolean isConnected = false;
-      while(!isConnected)
-      {
-         try
-         {
-            context = new InitialDirContext(env);
-            isConnected = true;
-         }
-         catch(CommunicationException err)
-         {
-            if(failover)
-            {
-                this.ldapURI = getUri();
-               LOG.error("connection error [" + env.get(Context.PROVIDER_URL) + "], failover connection to [" + this.ldapURI.toString() + "]");
-               env.put(Context.PROVIDER_URL, this.ldapURI.toString());
-               Thread.sleep(curReconnectDelay);
-               curReconnectDelay = Math.min(curReconnectDelay * 2, maxReconnectDelay);
-            }
-            else
-               { throw err; }
-         }
-      }
-
-      // add connectors from search results
-      LOG.info("searching for network connectors...");
-      LOG.debug("    base   [" + base + "]");
-      LOG.debug("    filter [" + searchFilter + "]");
-      LOG.debug("    scope  [" + searchControls.getSearchScope() + "]");
-      NamingEnumeration<SearchResult> results = context.search(base, searchFilter, searchControls);
-      while(results.hasMore())
-         { addConnector(results.next()); }
-
-      // register persistent search event listener
-      if(searchEventListener)
-      {
-         LOG.info("registering persistent search listener...");
-         EventDirContext eventContext = (EventDirContext)context.lookup("");
-         eventContext.addNamingListener(base, searchFilter, searchControls, this);
-      }
-      else // otherwise close context (i.e. connection as it is no longer needed)
-         { context.close(); }
-   }
-
-   /**
-    * stop the connector
-    */
-   public void stop()
-      throws Exception
-   {
-      LOG.info("stopping context...");
-      for(NetworkConnector connector : connectorMap.values())
-         { connector.stop(); }
-      connectorMap.clear();
-      referenceMap.clear();
-      uuidMap.clear();
-      context.close();
-   }
-
-   public String toString() {
-       return this.getClass().getName() + getName()  + "[" + ldapURI.toString() + "]";
-   }
-
-   /**
-     * add connector of the given URI
-     * 
-     * @param result
-     *            search result of connector to add
-     */
-   protected synchronized void addConnector(SearchResult result)
-      throws Exception
-   {
-      String uuid = toUUID(result);
-      if(uuidMap.containsKey(uuid))
-      {
-         LOG.warn("connector already regsitered for UUID [" + uuid + "]");
-         return;
-      }
-
-      URI connectorURI = toURI(result);
-      if(connectorMap.containsKey(connectorURI))
-      {
-         int referenceCount = referenceMap.get(connectorURI) + 1;
-         LOG.warn("connector reference added for URI [" + connectorURI + "], UUID [" + uuid + "], total reference(s) [" + referenceCount + "]");
-         referenceMap.put(connectorURI, referenceCount);
-         uuidMap.put(uuid, connectorURI);
-         return;
-      }
-
-      // FIXME: disable JMX listing of LDAP managed connectors, we will
-      //       want to map/manage these differently in the future
-//      boolean useJMX = getBrokerService().isUseJmx();
-//      getBrokerService().setUseJmx(false);
-      NetworkConnector connector = getBrokerService().addNetworkConnector(connectorURI);
-//      getBrokerService().setUseJmx(useJMX);
-
-      // propogate std connector properties that may have been set via XML
-      connector.setDynamicOnly(isDynamicOnly());
-      connector.setDecreaseNetworkConsumerPriority(isDecreaseNetworkConsumerPriority());
-      connector.setNetworkTTL(getNetworkTTL());
-      connector.setConduitSubscriptions(isConduitSubscriptions());
-      connector.setExcludedDestinations(getExcludedDestinations());
-      connector.setDynamicallyIncludedDestinations(getDynamicallyIncludedDestinations());
-      connector.setDuplex(isDuplex());
-
-      // XXX: set in the BrokerService.startAllConnectors method and is 
-      //      required to prevent remote broker exceptions upon connection
-      connector.setLocalUri(getBrokerService().getVmConnectorURI());
-      connector.setBrokerName(getBrokerService().getBrokerName());
-      connector.setDurableDestinations(getBrokerService().getBroker().getDurableDestinations());
-
-      // start network connector
-      connectorMap.put(connectorURI, connector);
-      referenceMap.put(connectorURI, 1);
-      uuidMap.put(uuid, connectorURI);
-      connector.start();
-      LOG.info("connector added with URI [" + connectorURI + "]");
-   }
-
-   /**
-    * remove connector of the given URI
-    *
-    * @param result search result of connector to remove
-    */
-   protected synchronized void removeConnector(SearchResult result)
-      throws Exception
-   {
-      String uuid = toUUID(result);
-      if(!uuidMap.containsKey(uuid))
-      {
-         LOG.warn("connector not regsitered for UUID [" + uuid + "]");
-         return;
-      }
-
-      URI connectorURI = uuidMap.get(uuid);
-      if(!connectorMap.containsKey(connectorURI))
-      {
-         LOG.warn("connector not regisitered for URI [" + connectorURI + "]");
-         return;
-      }
-
-      int referenceCount = referenceMap.get(connectorURI) - 1;
-      referenceMap.put(connectorURI, referenceCount);
-      uuidMap.remove(uuid);
-      LOG.debug("connector referenced removed for URI [" + connectorURI + "], UUID [" + uuid + "], remaining reference(s) [" + referenceCount + "]");
-
-      if(referenceCount > 0)
-         { return; }
-
-      NetworkConnector connector = connectorMap.remove(connectorURI);
-      connector.stop();
-      LOG.info("connector removed with URI [" + connectorURI + "]");
-   }
-
-   /**
-    * convert search result into URI
-    *
-    * @param result search result to convert to URI
-    */
-   protected URI toURI(SearchResult result)
-      throws Exception
-   {
-      Attributes attributes = result.getAttributes();
-      String address  = (String)attributes.get("iphostnumber").get();
-      String port     = (String)attributes.get("ipserviceport").get();
-      String protocol = (String)attributes.get("ipserviceprotocol").get();
-      URI connectorURI = new URI("static:(" + protocol + "://" + address + ":" + port + ")");
-      LOG.debug("retrieved URI from SearchResult [" + connectorURI + "]");
-      return connectorURI;
-   }
-
-   /**
-    * convert search result into URI
-    *
-    * @param result search result to convert to URI
-    */
-   protected String toUUID(SearchResult result)
-   {
-      String uuid = result.getNameInNamespace();
-      LOG.debug("retrieved UUID from SearchResult [" + uuid + "]");
-      return uuid;
-   }
-
-   /**
-    * invoked when an entry has been added during a persistent search
-    */
-   public void objectAdded(NamingEvent event)
-   {
-      LOG.debug("entry added");
-      try
-         { addConnector((SearchResult)event.getNewBinding()); }
-      catch(Exception err)
-         { LOG.error("ERR: caught unexpected exception", err); }
-   }
-
-   /**
-    * invoked when an entry has been removed during a persistent search
-    */
-   public void objectRemoved(NamingEvent event)
-   {
-      LOG.debug("entry removed");
-      try
-         { removeConnector((SearchResult)event.getOldBinding()); }
-      catch(Exception err)
-         { LOG.error("ERR: caught unexpected exception", err); }
-   }
-
-   /**
-    * invoked when an entry has been renamed during a persistent search
-    */
-   public void objectRenamed(NamingEvent event)
-   {
-      LOG.debug("entry renamed");
-      // XXX: getNameInNamespace method does not seem to work properly,
-      //      but getName seems to provide the result we want
-      String uuidOld = event.getOldBinding().getName();
-      String uuidNew = event.getNewBinding().getName();
-      URI connectorURI = uuidMap.remove(uuidOld);
-      uuidMap.put(uuidNew, connectorURI);
-      LOG.debug("connector reference renamed for URI [" + connectorURI + "], Old UUID [" + uuidOld + "], New UUID [" + uuidNew + "]");
-   }
-
-   /**
-    * invoked when an entry has been changed during a persistent search
-    */
-   public void objectChanged(NamingEvent event)
-   {
-      LOG.debug("entry changed");
-      try
-      {
-         SearchResult result = (SearchResult)event.getNewBinding();
-         removeConnector(result);
-         addConnector(result);
-      }
-      catch(Exception err)
-         { LOG.error("ERR: caught unexpected exception", err); }
-   }
-
-   /**
-    * invoked when an exception has occurred during a persistent search
-    */
-   public void namingExceptionThrown(NamingExceptionEvent event)
-      { LOG.error("ERR: caught unexpected exception", event.getException()); }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/MBeanNetworkListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/MBeanNetworkListener.java
deleted file mode 100644
index 59f650f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/MBeanNetworkListener.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.network;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.AnnotatedMBean;
-import org.apache.activemq.broker.jmx.NetworkBridgeView;
-import org.apache.activemq.broker.jmx.NetworkBridgeViewMBean;
-import org.apache.activemq.util.JMXSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import java.util.HashMap;
-import java.util.Map;
-
-public class MBeanNetworkListener implements NetworkBridgeListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MBeanNetworkListener.class);
-
-    BrokerService brokerService;
-    ObjectName connectorName;
-    boolean createdByDuplex = false;
-
-    public MBeanNetworkListener(BrokerService brokerService, ObjectName connectorName) {
-        this.brokerService = brokerService;
-        this.connectorName = connectorName;
-    }
-
-    @Override
-    public void bridgeFailed() {
-
-    }
-
-    @Override
-    public void onStart(NetworkBridge bridge) {
-        if (!brokerService.isUseJmx()) {
-            return;
-        }
-        NetworkBridgeViewMBean view = new NetworkBridgeView(bridge);
-        ((NetworkBridgeView)view).setCreateByDuplex(createdByDuplex);
-        try {
-            ObjectName objectName = createNetworkBridgeObjectName(bridge);
-            AnnotatedMBean.registerMBean(brokerService.getManagementContext(), view, objectName);
-        } catch (Throwable e) {
-            LOG.debug("Network bridge could not be registered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-    @Override
-    public void onStop(NetworkBridge bridge) {
-        if (!brokerService.isUseJmx()) {
-            return;
-        }
-        try {
-            ObjectName objectName = createNetworkBridgeObjectName(bridge);
-            brokerService.getManagementContext().unregisterMBean(objectName);
-        } catch (Throwable e) {
-            LOG.debug("Network bridge could not be unregistered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-
-    protected ObjectName createNetworkBridgeObjectName(NetworkBridge bridge) throws MalformedObjectNameException {
-        Map<String, String> map = new HashMap<String, String>(connectorName.getKeyPropertyList());
-        return new ObjectName(connectorName.getDomain() + ":" + "BrokerName=" + JMXSupport.encodeObjectNamePart((String) map.get("BrokerName")) + "," + "Type=NetworkBridge,"
-                              + "NetworkConnectorName=" + JMXSupport.encodeObjectNamePart((String)map.get("NetworkConnectorName")) + "," + "Name="
-                              + JMXSupport.encodeObjectNamePart(JMXSupport.encodeObjectNamePart(bridge.getRemoteAddress())));
-    }
-
-    public void setCreatedByDuplex(boolean createdByDuplex) {
-        this.createdByDuplex = createdByDuplex;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/MulticastNetworkConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/MulticastNetworkConnector.java
deleted file mode 100644
index 1498e2c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/MulticastNetworkConnector.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.util.ServiceStopper;
-
-/**
- * A network connector which uses some kind of multicast-like transport that
- * communicates with potentially many remote brokers over a single logical
- * {@link Transport} instance such as when using multicast.
- * 
- * This implementation does not depend on multicast at all; any other group
- * based transport could be used.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class MulticastNetworkConnector extends NetworkConnector {
-
-    private Transport localTransport;
-    private Transport remoteTransport;
-    private URI remoteURI;
-    private DemandForwardingBridgeSupport bridge;
-
-    public MulticastNetworkConnector() {
-    }
-
-    public MulticastNetworkConnector(URI remoteURI) {
-        this.remoteURI = remoteURI;
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public DemandForwardingBridgeSupport getBridge() {
-        return bridge;
-    }
-
-    public void setBridge(DemandForwardingBridgeSupport bridge) {
-        this.bridge = bridge;
-    }
-
-    public Transport getLocalTransport() {
-        return localTransport;
-    }
-
-    public void setLocalTransport(Transport localTransport) {
-        this.localTransport = localTransport;
-    }
-
-    public Transport getRemoteTransport() {
-        return remoteTransport;
-    }
-
-    /**
-     * Sets the remote transport implementation
-     */
-    public void setRemoteTransport(Transport remoteTransport) {
-        this.remoteTransport = remoteTransport;
-    }
-
-    public URI getRemoteURI() {
-        return remoteURI;
-    }
-
-    /**
-     * Sets the remote transport URI to some group transport like
-     * <code>multicast://address:port</code>
-     */
-    public void setRemoteURI(URI remoteURI) {
-        this.remoteURI = remoteURI;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    protected void handleStart() throws Exception {
-        if (remoteTransport == null) {
-            if (remoteURI == null) {
-                throw new IllegalArgumentException("You must specify the remoteURI property");
-            }
-            remoteTransport = TransportFactory.connect(remoteURI);
-        }
-
-        if (localTransport == null) {
-            localTransport = createLocalTransport();
-        }
-
-        bridge = createBridge(localTransport, remoteTransport);
-        configureBridge(bridge);
-        bridge.start();
-
-        // we need to start the transports after we've created the bridge
-        remoteTransport.start();
-        localTransport.start();
-
-        super.handleStart();
-    }
-
-    protected void handleStop(ServiceStopper stopper) throws Exception {
-        super.handleStop(stopper);
-        if (bridge != null) {
-            try {
-                bridge.stop();
-            } catch (Exception e) {
-                stopper.onException(this, e);
-            }
-        }
-        if (remoteTransport != null) {
-            try {
-                remoteTransport.stop();
-            } catch (Exception e) {
-                stopper.onException(this, e);
-            }
-        }
-        if (localTransport != null) {
-            try {
-                localTransport.stop();
-            } catch (Exception e) {
-                stopper.onException(this, e);
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return getClass().getName() + ":" + getName() + "["  + remoteTransport.toString() + "]";
-    }
-
-    protected DemandForwardingBridgeSupport createBridge(Transport local, Transport remote) {
-        CompositeDemandForwardingBridge bridge = new CompositeDemandForwardingBridge(this, local, remote);
-        bridge.setBrokerService(getBrokerService());
-        return bridge;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridge.java
deleted file mode 100644
index 1361f6e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridge.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.network;
-
-import org.apache.activemq.Service;
-
-
-/**
- * Represents a network bridge interface
- * 
- * 
- */
-public interface NetworkBridge extends Service {
-    
-    /**
-     * Service an exception
-     * @param error
-     */
-    void serviceRemoteException(Throwable error);
-    
-    /**
-     * servicee an exception
-     * @param error
-     */
-    void serviceLocalException(Throwable error);
-    
-    /**
-     * Set the NetworkBridgeFailedListener
-     * @param listener
-     */
-    void setNetworkBridgeListener(NetworkBridgeListener listener);
-    
-    
-    String getRemoteAddress();
-
-    String getRemoteBrokerName();
-
-    String getLocalAddress();
-
-    String getLocalBrokerName();
-
-    long getEnqueueCounter();
-
-    long getDequeueCounter();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeConfiguration.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeConfiguration.java
deleted file mode 100644
index c692246..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeConfiguration.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/**
- * 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.network;
-
-import java.util.List;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * Configuration for a NetworkBridge
- * 
- * 
- */
-public class NetworkBridgeConfiguration {
-
-    private boolean conduitSubscriptions = true;
-    private boolean dynamicOnly;
-    private boolean dispatchAsync = true;
-    private boolean decreaseNetworkConsumerPriority;
-    private boolean duplex;
-    private boolean bridgeTempDestinations = true;
-    private int prefetchSize = 1000;
-    private int networkTTL = 1;
-    private String brokerName = "localhost";
-    private String brokerURL = "";
-    private String userName;
-    private String password;
-    private String destinationFilter = ">";
-    private String name = "NC";
-    
-    private List<ActiveMQDestination> excludedDestinations;
-    private List<ActiveMQDestination> dynamicallyIncludedDestinations;
-    private List<ActiveMQDestination> staticallyIncludedDestinations;
-
-    private boolean suppressDuplicateQueueSubscriptions = false;
-    private boolean suppressDuplicateTopicSubscriptions = true;
-
-
-    /**
-     * @return the conduitSubscriptions
-     */
-    public boolean isConduitSubscriptions() {
-        return this.conduitSubscriptions;
-    }
-
-    /**
-     * @param conduitSubscriptions the conduitSubscriptions to set
-     */
-    public void setConduitSubscriptions(boolean conduitSubscriptions) {
-        this.conduitSubscriptions = conduitSubscriptions;
-    }
-
-    /**
-     * @return the dynamicOnly
-     */
-    public boolean isDynamicOnly() {
-        return this.dynamicOnly;
-    }
-
-    /**
-     * @param dynamicOnly the dynamicOnly to set
-     */
-    public void setDynamicOnly(boolean dynamicOnly) {
-        this.dynamicOnly = dynamicOnly;
-    }
-
-    /**
-     * @return the bridgeTempDestinations
-     */
-    public boolean isBridgeTempDestinations() {
-        return this.bridgeTempDestinations;
-    }
-
-    /**
-     * @param bridgeTempDestinations the bridgeTempDestinations to set
-     */
-    public void setBridgeTempDestinations(boolean bridgeTempDestinations) {
-        this.bridgeTempDestinations = bridgeTempDestinations;
-    }
-
-    /**
-     * @return the decreaseNetworkConsumerPriority
-     */
-    public boolean isDecreaseNetworkConsumerPriority() {
-        return this.decreaseNetworkConsumerPriority;
-    }
-
-    /**
-     * @param decreaseNetworkConsumerPriority the
-     *                decreaseNetworkConsumerPriority to set
-     */
-    public void setDecreaseNetworkConsumerPriority(boolean decreaseNetworkConsumerPriority) {
-        this.decreaseNetworkConsumerPriority = decreaseNetworkConsumerPriority;
-    }
-
-    /**
-     * @return the dispatchAsync
-     */
-    public boolean isDispatchAsync() {
-        return this.dispatchAsync;
-    }
-
-    /**
-     * @param dispatchAsync the dispatchAsync to set
-     */
-    public void setDispatchAsync(boolean dispatchAsync) {
-        this.dispatchAsync = dispatchAsync;
-    }
-
-    /**
-     * @return the duplex
-     */
-    public boolean isDuplex() {
-        return this.duplex;
-    }
-
-    /**
-     * @param duplex the duplex to set
-     */
-    public void setDuplex(boolean duplex) {
-        this.duplex = duplex;
-    }
-
-    /**
-     * @return the brokerName
-     */
-    public String getBrokerName() {
-        return this.brokerName;
-    }
-
-    /**
-     * @param brokerName the localBrokerName to set
-     */
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-    }
-
-    /**
-     * @return the networkTTL
-     */
-    public int getNetworkTTL() {
-        return this.networkTTL;
-    }
-
-    /**
-     * @param networkTTL the networkTTL to set
-     */
-    public void setNetworkTTL(int networkTTL) {
-        this.networkTTL = networkTTL;
-    }
-
-    /**
-     * @return the password
-     */
-    public String getPassword() {
-        return this.password;
-    }
-
-    /**
-     * @param password the password to set
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    /**
-     * @return the prefetchSize
-     */
-    public int getPrefetchSize() {
-        return this.prefetchSize;
-    }
-
-    /**
-     * @param prefetchSize the prefetchSize to set
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
-     */
-    public void setPrefetchSize(int prefetchSize) {
-        this.prefetchSize = prefetchSize;
-    }
-
-    /**
-     * @return the userName
-     */
-    public String getUserName() {
-        return this.userName;
-    }
-
-    /**
-     * @param userName the userName to set
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    /**
-     * @return the destinationFilter
-     */
-    public String getDestinationFilter() {
-        return this.destinationFilter;
-    }
-
-    /**
-     * @param destinationFilter the destinationFilter to set
-     */
-    public void setDestinationFilter(String destinationFilter) {
-        this.destinationFilter = destinationFilter;
-    }
-
-    /**
-     * @return the name
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * @param name the name to set
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-	public List<ActiveMQDestination> getExcludedDestinations() {
-		return excludedDestinations;
-	}
-
-	public void setExcludedDestinations(
-			List<ActiveMQDestination> excludedDestinations) {
-		this.excludedDestinations = excludedDestinations;
-	}
-
-	public List<ActiveMQDestination> getDynamicallyIncludedDestinations() {
-		return dynamicallyIncludedDestinations;
-	}
-
-	public void setDynamicallyIncludedDestinations(
-			List<ActiveMQDestination> dynamicallyIncludedDestinations) {
-		this.dynamicallyIncludedDestinations = dynamicallyIncludedDestinations;
-	}
-
-	public List<ActiveMQDestination> getStaticallyIncludedDestinations() {
-		return staticallyIncludedDestinations;
-	}
-
-	public void setStaticallyIncludedDestinations(
-			List<ActiveMQDestination> staticallyIncludedDestinations) {
-		this.staticallyIncludedDestinations = staticallyIncludedDestinations;
-	}
-	
-    
-
-    public boolean isSuppressDuplicateQueueSubscriptions() {
-        return suppressDuplicateQueueSubscriptions;
-    }
-    
-    /**
-     * 
-     * @param val if true, duplicate network queue subscriptions (in a cyclic network) will be suppressed
-     */
-    public void setSuppressDuplicateQueueSubscriptions(boolean val) {
-        suppressDuplicateQueueSubscriptions = val;
-    }
-
-    public boolean isSuppressDuplicateTopicSubscriptions() {
-        return suppressDuplicateTopicSubscriptions;
-    }
-
-    /**
-     * 
-     * @param val if true, duplicate network topic subscriptions (in a cyclic network) will be suppressed
-     */
-    public void setSuppressDuplicateTopicSubscriptions(boolean val) {
-        suppressDuplicateTopicSubscriptions  = val;
-    }
-    
-    /**
-     * @return the brokerURL
-     */
-    public String getBrokerURL() {
-        return this.brokerURL;
-    }
-
-    /**
-     * @param brokerURL the brokerURL to set
-     */
-    public void setBrokerURL(String brokerURL) {
-        this.brokerURL = brokerURL;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeFactory.java
deleted file mode 100644
index 48744c9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.network;
-
-import org.apache.activemq.transport.Transport;
-
-/**
- * Factory for network bridges
- * 
- * 
- */
-public final class NetworkBridgeFactory {
-
-    private NetworkBridgeFactory() {
-    }
-    
-    /**
-     * Create a network bridge
-     * 
-     * @param config
-     * @param localTransport
-     * @param remoteTransport
-     * @return the NetworkBridge
-     */
-    public static DemandForwardingBridge createBridge(NetworkBridgeConfiguration config,
-                                                      Transport localTransport, Transport remoteTransport) {
-        return createBridge(config, localTransport, remoteTransport, null);
-    }
-
-    /**
-     * create a network bridge
-     * 
-     * @param configuration
-     * @param localTransport
-     * @param remoteTransport
-     * @param listener
-     * @return the NetworkBridge
-     */
-    public static DemandForwardingBridge createBridge(NetworkBridgeConfiguration configuration,
-                                                      Transport localTransport, Transport remoteTransport,
-                                                      final NetworkBridgeListener listener) {
-        DemandForwardingBridge result = null;
-        if (configuration.isConduitSubscriptions()) {
-            // dynamicOnly determines whether durables are auto bridged
-            result = new DurableConduitBridge(configuration, localTransport, remoteTransport);
-        } else {
-            result = new DemandForwardingBridge(configuration, localTransport, remoteTransport);
-        }
-        if (listener != null) {
-            result.setNetworkBridgeListener(listener);
-        }
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeListener.java
deleted file mode 100644
index 7d49177..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkBridgeListener.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**

- * 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.network;

-

-/**

- * called when a bridge fails

- * 

- * 

- */

-public interface NetworkBridgeListener {

-

-    /**

-     * called when the transport fails

-     */

-    void bridgeFailed();

-

-    /**

-     * called after the bridge is started.

-     */

-    void onStart(NetworkBridge bridge);

-

-    /**

-     * called before the bridge is stopped.

-     */

-    void onStop(NetworkBridge bridge);

-

-}

diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
deleted file mode 100644
index 68ba460..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.AnnotatedMBean;
-import org.apache.activemq.broker.jmx.NetworkBridgeView;
-import org.apache.activemq.broker.jmx.NetworkBridgeViewMBean;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.util.JMXSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public abstract class NetworkConnector extends NetworkBridgeConfiguration implements Service {
-
-    private static final Logger LOG = LoggerFactory.getLogger(NetworkConnector.class);
-    protected URI localURI;
-    protected ConnectionFilter connectionFilter;
-    protected ConcurrentHashMap<URI, NetworkBridge> bridges = new ConcurrentHashMap<URI, NetworkBridge>();
-    
-    protected ServiceSupport serviceSupport = new ServiceSupport() {
-
-        protected void doStart() throws Exception {
-            handleStart();
-        }
-
-        protected void doStop(ServiceStopper stopper) throws Exception {
-            handleStop(stopper);
-        }
-    };
-
-    private Set<ActiveMQDestination> durableDestinations;
-    private List<ActiveMQDestination> excludedDestinations = new CopyOnWriteArrayList<ActiveMQDestination>();
-    private List<ActiveMQDestination> dynamicallyIncludedDestinations = new CopyOnWriteArrayList<ActiveMQDestination>();
-    private List<ActiveMQDestination> staticallyIncludedDestinations = new CopyOnWriteArrayList<ActiveMQDestination>();
-    private BrokerService brokerService;
-    private ObjectName objectName;
-    
-    public NetworkConnector() {
-    }
-
-    public NetworkConnector(URI localURI) {
-        this.localURI = localURI;
-    }
-
-    public URI getLocalUri() throws URISyntaxException {
-        return localURI;
-    }
-
-    public void setLocalUri(URI localURI) {
-        this.localURI = localURI;
-    }
-
-    /**
-     * @return Returns the durableDestinations.
-     */
-    public Set getDurableDestinations() {
-        return durableDestinations;
-    }
-
-    /**
-     * @param durableDestinations The durableDestinations to set.
-     */
-    public void setDurableDestinations(Set<ActiveMQDestination> durableDestinations) {
-        this.durableDestinations = durableDestinations;
-    }
-
-    /**
-     * @return Returns the excludedDestinations.
-     */
-    public List<ActiveMQDestination> getExcludedDestinations() {
-        return excludedDestinations;
-    }
-
-    /**
-     * @param excludedDestinations The excludedDestinations to set.
-     */
-    public void setExcludedDestinations(List<ActiveMQDestination> excludedDestinations) {
-        this.excludedDestinations = excludedDestinations;
-    }
-
-    public void addExcludedDestination(ActiveMQDestination destiantion) {
-        this.excludedDestinations.add(destiantion);
-    }
-
-    /**
-     * @return Returns the staticallyIncludedDestinations.
-     */
-    public List<ActiveMQDestination> getStaticallyIncludedDestinations() {
-        return staticallyIncludedDestinations;
-    }
-
-    /**
-     * @param staticallyIncludedDestinations The staticallyIncludedDestinations
-     *                to set.
-     */
-    public void setStaticallyIncludedDestinations(List<ActiveMQDestination> staticallyIncludedDestinations) {
-        this.staticallyIncludedDestinations = staticallyIncludedDestinations;
-    }
-
-    public void addStaticallyIncludedDestination(ActiveMQDestination destiantion) {
-        this.staticallyIncludedDestinations.add(destiantion);
-    }
-
-    /**
-     * @return Returns the dynamicallyIncludedDestinations.
-     */
-    public List<ActiveMQDestination> getDynamicallyIncludedDestinations() {
-        return dynamicallyIncludedDestinations;
-    }
-
-    /**
-     * @param dynamicallyIncludedDestinations The
-     *                dynamicallyIncludedDestinations to set.
-     */
-    public void setDynamicallyIncludedDestinations(List<ActiveMQDestination> dynamicallyIncludedDestinations) {
-        this.dynamicallyIncludedDestinations = dynamicallyIncludedDestinations;
-    }
-
-    public void addDynamicallyIncludedDestination(ActiveMQDestination destiantion) {
-        this.dynamicallyIncludedDestinations.add(destiantion);
-    }
-
-    public ConnectionFilter getConnectionFilter() {
-        return connectionFilter;
-    }
-
-    public void setConnectionFilter(ConnectionFilter connectionFilter) {
-        this.connectionFilter = connectionFilter;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected NetworkBridge configureBridge(DemandForwardingBridgeSupport result) {
-        List<ActiveMQDestination> destsList = getDynamicallyIncludedDestinations();
-        ActiveMQDestination dests[] = destsList.toArray(new ActiveMQDestination[destsList.size()]);
-        result.setDynamicallyIncludedDestinations(dests);
-        destsList = getExcludedDestinations();
-        dests = destsList.toArray(new ActiveMQDestination[destsList.size()]);
-        result.setExcludedDestinations(dests);
-        destsList = getStaticallyIncludedDestinations();
-        dests = destsList.toArray(new ActiveMQDestination[destsList.size()]);
-        result.setStaticallyIncludedDestinations(dests);
-        if (durableDestinations != null) {
-            
-            HashSet<ActiveMQDestination> topics = new HashSet<ActiveMQDestination>();
-            for (ActiveMQDestination d : durableDestinations) {
-                if( d.isTopic() ) {
-                    topics.add(d);
-                }
-            }
-            
-            ActiveMQDestination[] dest = new ActiveMQDestination[topics.size()];
-            dest = (ActiveMQDestination[])topics.toArray(dest);
-            result.setDurableDestinations(dest);
-        }
-        return result;
-    }
-
-    protected Transport createLocalTransport() throws Exception {
-        return TransportFactory.connect(localURI);
-    }
-
-    public void start() throws Exception {
-        serviceSupport.start();
-    }
-
-    public void stop() throws Exception {
-        serviceSupport.stop();
-    }
-
-    protected void handleStart() throws Exception {
-        if (localURI == null) {
-            throw new IllegalStateException("You must configure the 'localURI' property");
-        }
-        LOG.info("Network Connector " + this + " Started");
-    }
-
-    protected void handleStop(ServiceStopper stopper) throws Exception {
-        LOG.info("Network Connector " + this + " Stopped");
-    }
-
-    public ObjectName getObjectName() {
-        return objectName;
-    }
-
-    public void setObjectName(ObjectName objectName) {
-        this.objectName = objectName;
-    }
-
-    public BrokerService getBrokerService() {
-        return brokerService;
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerService = brokerService;
-    }
-
-    protected void registerNetworkBridgeMBean(NetworkBridge bridge) {
-        if (!getBrokerService().isUseJmx()) {
-            return;
-        }
-        NetworkBridgeViewMBean view = new NetworkBridgeView(bridge);
-        try {
-            ObjectName objectName = createNetworkBridgeObjectName(bridge);
-            AnnotatedMBean.registerMBean(getBrokerService().getManagementContext(), view, objectName);
-        } catch (Throwable e) {
-            LOG.debug("Network bridge could not be registered in JMX: " + e.getMessage(), e);
-        }
-    }
-
-    protected void unregisterNetworkBridgeMBean(NetworkBridge bridge) {
-        if (!getBrokerService().isUseJmx()) {
-            return;
-        }
-        try {
-            ObjectName objectName = createNetworkBridgeObjectName(bridge);
-            getBrokerService().getManagementContext().unregisterMBean(objectName);
-        } catch (Throwable e) {
-            LOG.debug("Network bridge could not be unregistered in JMX: " + e.getMessage(), e);
-        }
-    }
-    
-
-    @SuppressWarnings("unchecked")
-    protected ObjectName createNetworkBridgeObjectName(NetworkBridge bridge) throws MalformedObjectNameException {
-        ObjectName connectorName = getObjectName();
-        Map<String, String> map = new HashMap<String, String>(connectorName.getKeyPropertyList());
-        return new ObjectName(connectorName.getDomain() + ":" + "BrokerName=" + JMXSupport.encodeObjectNamePart((String)map.get("BrokerName")) + "," + "Type=NetworkBridge,"
-                              + "NetworkConnectorName=" + JMXSupport.encodeObjectNamePart((String)map.get("NetworkConnectorName")) + "," + "Name="
-                              + JMXSupport.encodeObjectNamePart(JMXSupport.encodeObjectNamePart(bridge.getRemoteAddress())));
-    }
-
-    // ask all the bridges as we can't know to which this consumer is tied
-    public boolean removeDemandSubscription(ConsumerId consumerId) {
-        boolean removeSucceeded = false;
-        for (NetworkBridge bridge : bridges.values()) {
-            if (bridge instanceof DemandForwardingBridgeSupport) {
-                DemandForwardingBridgeSupport demandBridge = (DemandForwardingBridgeSupport) bridge;
-                if (demandBridge.removeDemandSubscriptionByLocalId(consumerId)) {
-                    removeSucceeded = true;
-                    break;
-                }
-            }
-        }
-        return removeSucceeded;
-    }
-    
-    public Collection<NetworkBridge> activeBridges() {
-        return bridges.values();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
deleted file mode 100755
index 5099259..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.network.jms;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.naming.NamingException;
-import org.apache.activemq.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Destination bridge is used to bridge between to different JMS systems
- * 
- * 
- */
-public abstract class DestinationBridge implements Service, MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(DestinationBridge.class);
-    protected MessageConsumer consumer;
-    protected AtomicBoolean started = new AtomicBoolean(false);
-    protected JmsMesageConvertor jmsMessageConvertor;
-    protected boolean doHandleReplyTo = true;
-    protected JmsConnector jmsConnector;
-    private int maximumRetries = 10;
-
-    /**
-     * @return Returns the consumer.
-     */
-    public MessageConsumer getConsumer() {
-        return consumer;
-    }
-
-    /**
-     * @param consumer The consumer to set.
-     */
-    public void setConsumer(MessageConsumer consumer) {
-        this.consumer = consumer;
-    }
-
-    /**
-     * @param connector
-     */
-    public void setJmsConnector(JmsConnector connector) {
-        this.jmsConnector = connector;
-    }
-
-    /**
-     * @return Returns the inboundMessageConvertor.
-     */
-    public JmsMesageConvertor getJmsMessageConvertor() {
-        return jmsMessageConvertor;
-    }
-
-    /**
-     * @param jmsMessageConvertor
-     */
-    public void setJmsMessageConvertor(JmsMesageConvertor jmsMessageConvertor) {
-        this.jmsMessageConvertor = jmsMessageConvertor;
-    }
-
-    public int getMaximumRetries() {
-        return maximumRetries;
-    }
-
-    /**
-     * Sets the maximum number of retries if a send fails before closing the
-     * bridge
-     */
-    public void setMaximumRetries(int maximumRetries) {
-        this.maximumRetries = maximumRetries;
-    }
-
-    protected Destination processReplyToDestination(Destination destination) {
-        return jmsConnector.createReplyToBridge(destination, getConnnectionForConsumer(), getConnectionForProducer());
-    }
-
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-            MessageConsumer consumer = createConsumer();
-            consumer.setMessageListener(this);
-            createProducer();
-        }
-    }
-
-    public void stop() throws Exception {
-        started.set(false);
-    }
-
-    public void onMessage(Message message) {
-        int attempt = 0;
-        while (started.get() && message != null) {
-           
-            try {
-                if (attempt > 0) {
-                    restartProducer();
-                }
-                Message converted;
-                if (doHandleReplyTo) {
-                    Destination replyTo = message.getJMSReplyTo();
-                    if (replyTo != null) {
-                        converted = jmsMessageConvertor.convert(message, processReplyToDestination(replyTo));
-                    } else {
-                        converted = jmsMessageConvertor.convert(message);
-                    }
-                } else {
-                    message.setJMSReplyTo(null);
-                    converted = jmsMessageConvertor.convert(message);
-                }
-                sendMessage(converted);
-                message.acknowledge();
-                return;
-            } catch (Exception e) {
-                LOG.error("failed to forward message on attempt: " + (++attempt) + " reason: " + e + " message: " + message, e);
-                if (maximumRetries > 0 && attempt >= maximumRetries) {
-                    try {
-                        stop();
-                    } catch (Exception e1) {
-                        LOG.warn("Failed to stop cleanly", e1);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * @return Returns the doHandleReplyTo.
-     */
-    protected boolean isDoHandleReplyTo() {
-        return doHandleReplyTo;
-    }
-
-    /**
-     * @param doHandleReplyTo The doHandleReplyTo to set.
-     */
-    protected void setDoHandleReplyTo(boolean doHandleReplyTo) {
-        this.doHandleReplyTo = doHandleReplyTo;
-    }
-
-    protected abstract MessageConsumer createConsumer() throws JMSException;
-
-    protected abstract MessageProducer createProducer() throws JMSException;
-
-    protected abstract void sendMessage(Message message) throws JMSException;
-
-    protected abstract Connection getConnnectionForConsumer();
-
-    protected abstract Connection getConnectionForProducer();
-
-    protected void restartProducer() throws JMSException, NamingException {
-        try {
-            //don't reconnect immediately
-            Thread.sleep(1000);
-            getConnectionForProducer().close();
-        } catch (Exception e) {
-            LOG.debug("Ignoring failure to close producer connection: " + e, e);
-        }
-        jmsConnector.restartProducerConnection();
-        createProducer();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundQueueBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundQueueBridge.java
deleted file mode 100755
index 5909e5a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundQueueBridge.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.network.jms;
-
-/**
- * Create an Inbound Queue Bridge
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class InboundQueueBridge extends QueueBridge {
-
-    String inboundQueueName;
-    String localQueueName;
-
-    /**
-     * Constructor that takes a foriegn destination as an argument
-     * 
-     * @param inboundQueueName
-     */
-    public InboundQueueBridge(String inboundQueueName) {
-        this.inboundQueueName = inboundQueueName;
-        this.localQueueName = inboundQueueName;
-    }
-
-    /**
-     * Default Contructor
-     */
-    public InboundQueueBridge() {
-    }
-
-    /**
-     * @return Returns the inboundQueueName.
-     */
-    public String getInboundQueueName() {
-        return inboundQueueName;
-    }
-
-    /**
-     * @param inboundQueueName The inboundQueueName to set.
-     */
-    public void setInboundQueueName(String inboundQueueName) {
-        this.inboundQueueName = inboundQueueName;
-        if (this.localQueueName == null) {
-            this.localQueueName = inboundQueueName;
-        }
-    }
-
-    /**
-     * @return the localQueueName
-     */
-    public String getLocalQueueName() {
-        return localQueueName;
-    }
-
-    /**
-     * @param localQueueName the localQueueName to set
-     */
-    public void setLocalQueueName(String localQueueName) {
-        this.localQueueName = localQueueName;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundTopicBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundTopicBridge.java
deleted file mode 100755
index 4b8a63d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/InboundTopicBridge.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.network.jms;
-
-/**
- * Create an Inbound Topic Bridge
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class InboundTopicBridge extends TopicBridge {
-
-    String inboundTopicName;
-    String localTopicName;
-
-    /**
-     * Constructor that takes a foriegn destination as an argument
-     * 
-     * @param inboundTopicName
-     */
-    public InboundTopicBridge(String inboundTopicName) {
-        this.inboundTopicName = inboundTopicName;
-        this.localTopicName = inboundTopicName;
-    }
-
-    /**
-     * Default Contructor
-     */
-    public InboundTopicBridge() {
-    }
-
-    /**
-     * @return Returns the outboundTopicName.
-     */
-    public String getInboundTopicName() {
-        return inboundTopicName;
-    }
-
-    /**
-     * @param inboundTopicName
-     */
-    public void setInboundTopicName(String inboundTopicName) {
-        this.inboundTopicName = inboundTopicName;
-        if (this.localTopicName == null) {
-            this.localTopicName = inboundTopicName;
-        }
-    }
-
-    /**
-     * @return the localTopicName
-     */
-    public String getLocalTopicName() {
-        return localTopicName;
-    }
-
-    /**
-     * @param localTopicName the localTopicName to set
-     */
-    public void setLocalTopicName(String localTopicName) {
-        this.localTopicName = localTopicName;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java
deleted file mode 100755
index 8756282..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * 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.network.jms;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.naming.NamingException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.LRUCache;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jndi.JndiTemplate;
-
-/**
- * This bridge joins the gap between foreign JMS providers and ActiveMQ As some
- * JMS providers are still only 1.0.1 compliant, this bridge itself aimed to be
- * JMS 1.0.2 compliant.
- * 
- * 
- */
-public abstract class JmsConnector implements Service {
-
-    private static int nextId;
-    private static final Logger LOG = LoggerFactory.getLogger(JmsConnector.class);
-    
-    protected JndiTemplate jndiLocalTemplate;
-    protected JndiTemplate jndiOutboundTemplate;
-    protected JmsMesageConvertor inboundMessageConvertor;
-    protected JmsMesageConvertor outboundMessageConvertor;
-    protected AtomicBoolean initialized = new AtomicBoolean(false);
-    protected AtomicBoolean started = new AtomicBoolean(false);
-    protected ActiveMQConnectionFactory embeddedConnectionFactory;
-    protected int replyToDestinationCacheSize = 10000;
-    protected String outboundUsername;
-    protected String outboundPassword;
-    protected String localUsername;
-    protected String localPassword;
-    protected String outboundClientId;
-    protected String localClientId;
-    protected LRUCache replyToBridges = createLRUCache();
-
-    private List<DestinationBridge> inboundBridges = new CopyOnWriteArrayList<DestinationBridge>();
-    private List<DestinationBridge> outboundBridges = new CopyOnWriteArrayList<DestinationBridge>();
-    private String name;
-
-
-    private static LRUCache createLRUCache() {
-        return new LRUCache() {
-            private static final long serialVersionUID = -7446792754185879286L;
-
-            protected boolean removeEldestEntry(Map.Entry enty) {
-                if (size() > maxCacheSize) {
-                    Iterator iter = entrySet().iterator();
-                    Map.Entry lru = (Map.Entry)iter.next();
-                    remove(lru.getKey());
-                    DestinationBridge bridge = (DestinationBridge)lru.getValue();
-                    try {
-                        bridge.stop();
-                        LOG.info("Expired bridge: " + bridge);
-                    } catch (Exception e) {
-                        LOG.warn("stopping expired bridge" + bridge + " caused an exception", e);
-                    }
-                }
-                return false;
-            }
-        };
-    }
-
-    /**
-     */
-    public boolean init() {
-        boolean result = initialized.compareAndSet(false, true);
-        if (result) {
-            if (jndiLocalTemplate == null) {
-                jndiLocalTemplate = new JndiTemplate();
-            }
-            if (jndiOutboundTemplate == null) {
-                jndiOutboundTemplate = new JndiTemplate();
-            }
-            if (inboundMessageConvertor == null) {
-                inboundMessageConvertor = new SimpleJmsMessageConvertor();
-            }
-            if (outboundMessageConvertor == null) {
-                outboundMessageConvertor = new SimpleJmsMessageConvertor();
-            }
-            replyToBridges.setMaxCacheSize(getReplyToDestinationCacheSize());
-        }
-        return result;
-    }
-
-    public void start() throws Exception {
-        init();
-        if (started.compareAndSet(false, true)) {
-            for (int i = 0; i < inboundBridges.size(); i++) {
-                DestinationBridge bridge = inboundBridges.get(i);
-                bridge.start();
-            }
-            for (int i = 0; i < outboundBridges.size(); i++) {
-                DestinationBridge bridge = outboundBridges.get(i);
-                bridge.start();
-            }
-            LOG.info("JMS Connector " + getName() + " Started");
-        }
-    }
-
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            for (int i = 0; i < inboundBridges.size(); i++) {
-                DestinationBridge bridge = inboundBridges.get(i);
-                bridge.stop();
-            }
-            for (int i = 0; i < outboundBridges.size(); i++) {
-                DestinationBridge bridge = outboundBridges.get(i);
-                bridge.stop();
-            }
-            LOG.info("JMS Connector " + getName() + " Stopped");
-        }
-    }
-    
-    public void clearBridges() {
-        inboundBridges.clear();
-        outboundBridges.clear();
-    }
-
-    protected abstract Destination createReplyToBridge(Destination destination, Connection consumerConnection, Connection producerConnection);
-
-    /**
-     * One way to configure the local connection - this is called by The
-     * BrokerService when the Connector is embedded
-     * 
-     * @param service
-     */
-    public void setBrokerService(BrokerService service) {
-        embeddedConnectionFactory = new ActiveMQConnectionFactory(service.getVmConnectorURI());
-    }
-
-    /**
-     * @return Returns the jndiTemplate.
-     */
-    public JndiTemplate getJndiLocalTemplate() {
-        return jndiLocalTemplate;
-    }
-
-    /**
-     * @param jndiTemplate The jndiTemplate to set.
-     */
-    public void setJndiLocalTemplate(JndiTemplate jndiTemplate) {
-        this.jndiLocalTemplate = jndiTemplate;
-    }
-
-    /**
-     * @return Returns the jndiOutboundTemplate.
-     */
-    public JndiTemplate getJndiOutboundTemplate() {
-        return jndiOutboundTemplate;
-    }
-
-    /**
-     * @param jndiOutboundTemplate The jndiOutboundTemplate to set.
-     */
-    public void setJndiOutboundTemplate(JndiTemplate jndiOutboundTemplate) {
-        this.jndiOutboundTemplate = jndiOutboundTemplate;
-    }
-
-    /**
-     * @return Returns the inboundMessageConvertor.
-     */
-    public JmsMesageConvertor getInboundMessageConvertor() {
-        return inboundMessageConvertor;
-    }
-
-    /**
-     * @param inboundMessageConvertor The inboundMessageConvertor to set.
-     */
-    public void setInboundMessageConvertor(JmsMesageConvertor jmsMessageConvertor) {
-        this.inboundMessageConvertor = jmsMessageConvertor;
-    }
-
-    /**
-     * @return Returns the outboundMessageConvertor.
-     */
-    public JmsMesageConvertor getOutboundMessageConvertor() {
-        return outboundMessageConvertor;
-    }
-
-    /**
-     * @param outboundMessageConvertor The outboundMessageConvertor to set.
-     */
-    public void setOutboundMessageConvertor(JmsMesageConvertor outboundMessageConvertor) {
-        this.outboundMessageConvertor = outboundMessageConvertor;
-    }
-
-    /**
-     * @return Returns the replyToDestinationCacheSize.
-     */
-    public int getReplyToDestinationCacheSize() {
-        return replyToDestinationCacheSize;
-    }
-
-    /**
-     * @param replyToDestinationCacheSize The replyToDestinationCacheSize to
-     *                set.
-     */
-    public void setReplyToDestinationCacheSize(int replyToDestinationCacheSize) {
-        this.replyToDestinationCacheSize = replyToDestinationCacheSize;
-    }
-
-    /**
-     * @return Returns the localPassword.
-     */
-    public String getLocalPassword() {
-        return localPassword;
-    }
-
-    /**
-     * @param localPassword The localPassword to set.
-     */
-    public void setLocalPassword(String localPassword) {
-        this.localPassword = localPassword;
-    }
-
-    /**
-     * @return Returns the localUsername.
-     */
-    public String getLocalUsername() {
-        return localUsername;
-    }
-
-    /**
-     * @param localUsername The localUsername to set.
-     */
-    public void setLocalUsername(String localUsername) {
-        this.localUsername = localUsername;
-    }
-
-    /**
-     * @return Returns the outboundPassword.
-     */
-    public String getOutboundPassword() {
-        return outboundPassword;
-    }
-
-    /**
-     * @param outboundPassword The outboundPassword to set.
-     */
-    public void setOutboundPassword(String outboundPassword) {
-        this.outboundPassword = outboundPassword;
-    }
-
-    /**
-     * @return Returns the outboundUsername.
-     */
-    public String getOutboundUsername() {
-        return outboundUsername;
-    }
-
-    /**
-     * @param outboundUsername The outboundUsername to set.
-     */
-    public void setOutboundUsername(String outboundUsername) {
-        this.outboundUsername = outboundUsername;
-    }
-    
-    /**
-     * @return the outboundClientId
-     */
-    public String getOutboundClientId() {
-        return outboundClientId;
-    }
-
-    /**
-     * @param outboundClientId the outboundClientId to set
-     */
-    public void setOutboundClientId(String outboundClientId) {
-        this.outboundClientId = outboundClientId;
-    }
-
-    /**
-     * @return the localClientId
-     */
-    public String getLocalClientId() {
-        return localClientId;
-    }
-
-    /**
-     * @param localClientId the localClientId to set
-     */
-    public void setLocalClientId(String localClientId) {
-        this.localClientId = localClientId;
-    }
-    
-    
-    protected void addInboundBridge(DestinationBridge bridge) {
-        inboundBridges.add(bridge);
-    }
-
-    protected void addOutboundBridge(DestinationBridge bridge) {
-        outboundBridges.add(bridge);
-    }
-
-    protected void removeInboundBridge(DestinationBridge bridge) {
-        inboundBridges.remove(bridge);
-    }
-
-    protected void removeOutboundBridge(DestinationBridge bridge) {
-        outboundBridges.remove(bridge);
-    }
-
-    public String getName() {
-        if (name == null) {
-            name = "Connector:" + getNextId();
-        }
-        return name;
-    }
-
-    private static synchronized int getNextId() {
-        return nextId++;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public abstract void restartProducerConnection() throws NamingException, JMSException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsMesageConvertor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsMesageConvertor.java
deleted file mode 100755
index a8b7c7d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsMesageConvertor.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-/**
- * Converts Message from one JMS to another
- * 
- * 
- */
-public interface JmsMesageConvertor {
-    
-    /**
-     * Convert a foreign JMS Message to a native ActiveMQ Message
-     * @param message
-     * @return the converted message
-     * @throws JMSException
-     */
-    Message convert(Message message) throws JMSException;
-    
-    Message convert(Message message, Destination replyTo) throws JMSException;
-    
-    void setConnection(Connection connection);
-   
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java
deleted file mode 100755
index 9f14767..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Bridge to other JMS Queue providers
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class JmsQueueConnector extends JmsConnector {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsQueueConnector.class);
-    private String outboundQueueConnectionFactoryName;
-    private String localConnectionFactoryName;
-    private QueueConnectionFactory outboundQueueConnectionFactory;
-    private QueueConnectionFactory localQueueConnectionFactory;
-    private QueueConnection outboundQueueConnection;
-    private QueueConnection localQueueConnection;
-    private InboundQueueBridge[] inboundQueueBridges;
-    private OutboundQueueBridge[] outboundQueueBridges;
-
-    public boolean init() {
-        boolean result = super.init();
-        if (result) {
-            try {
-                initializeForeignQueueConnection();
-                initializeLocalQueueConnection();
-                initializeInboundJmsMessageConvertor();
-                initializeOutboundJmsMessageConvertor();
-                initializeInboundQueueBridges();
-                initializeOutboundQueueBridges();
-            } catch (Exception e) {
-                LOG.error("Failed to initialize the JMSConnector", e);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * @return Returns the inboundQueueBridges.
-     */
-    public InboundQueueBridge[] getInboundQueueBridges() {
-        return inboundQueueBridges;
-    }
-
-    /**
-     * @param inboundQueueBridges The inboundQueueBridges to set.
-     */
-    public void setInboundQueueBridges(InboundQueueBridge[] inboundQueueBridges) {
-        this.inboundQueueBridges = inboundQueueBridges;
-    }
-
-    /**
-     * @return Returns the outboundQueueBridges.
-     */
-    public OutboundQueueBridge[] getOutboundQueueBridges() {
-        return outboundQueueBridges;
-    }
-
-    /**
-     * @param outboundQueueBridges The outboundQueueBridges to set.
-     */
-    public void setOutboundQueueBridges(OutboundQueueBridge[] outboundQueueBridges) {
-        this.outboundQueueBridges = outboundQueueBridges;
-    }
-
-    /**
-     * @return Returns the localQueueConnectionFactory.
-     */
-    public QueueConnectionFactory getLocalQueueConnectionFactory() {
-        return localQueueConnectionFactory;
-    }
-
-    /**
-     * @param localQueueConnectionFactory The localQueueConnectionFactory to
-     *                set.
-     */
-    public void setLocalQueueConnectionFactory(QueueConnectionFactory localConnectionFactory) {
-        this.localQueueConnectionFactory = localConnectionFactory;
-    }
-
-    /**
-     * @return Returns the outboundQueueConnectionFactory.
-     */
-    public QueueConnectionFactory getOutboundQueueConnectionFactory() {
-        return outboundQueueConnectionFactory;
-    }
-
-    /**
-     * @return Returns the outboundQueueConnectionFactoryName.
-     */
-    public String getOutboundQueueConnectionFactoryName() {
-        return outboundQueueConnectionFactoryName;
-    }
-
-    /**
-     * @param outboundQueueConnectionFactoryName The
-     *                outboundQueueConnectionFactoryName to set.
-     */
-    public void setOutboundQueueConnectionFactoryName(String foreignQueueConnectionFactoryName) {
-        this.outboundQueueConnectionFactoryName = foreignQueueConnectionFactoryName;
-    }
-
-    /**
-     * @return Returns the localConnectionFactoryName.
-     */
-    public String getLocalConnectionFactoryName() {
-        return localConnectionFactoryName;
-    }
-
-    /**
-     * @param localConnectionFactoryName The localConnectionFactoryName to set.
-     */
-    public void setLocalConnectionFactoryName(String localConnectionFactoryName) {
-        this.localConnectionFactoryName = localConnectionFactoryName;
-    }
-
-    /**
-     * @return Returns the localQueueConnection.
-     */
-    public QueueConnection getLocalQueueConnection() {
-        return localQueueConnection;
-    }
-
-    /**
-     * @param localQueueConnection The localQueueConnection to set.
-     */
-    public void setLocalQueueConnection(QueueConnection localQueueConnection) {
-        this.localQueueConnection = localQueueConnection;
-    }
-
-    /**
-     * @return Returns the outboundQueueConnection.
-     */
-    public QueueConnection getOutboundQueueConnection() {
-        return outboundQueueConnection;
-    }
-
-    /**
-     * @param outboundQueueConnection The outboundQueueConnection to set.
-     */
-    public void setOutboundQueueConnection(QueueConnection foreignQueueConnection) {
-        this.outboundQueueConnection = foreignQueueConnection;
-    }
-
-    /**
-     * @param outboundQueueConnectionFactory The outboundQueueConnectionFactory
-     *                to set.
-     */
-    public void setOutboundQueueConnectionFactory(QueueConnectionFactory foreignQueueConnectionFactory) {
-        this.outboundQueueConnectionFactory = foreignQueueConnectionFactory;
-    }
-
-    public void restartProducerConnection() throws NamingException, JMSException {
-        outboundQueueConnection = null;
-        initializeForeignQueueConnection();
-
-        // the outboundQueueConnection was reestablished - publish the new connection to the bridges
-        if (inboundQueueBridges != null) {
-        	for (int i = 0; i < inboundQueueBridges.length; i++) {
-        		InboundQueueBridge bridge = inboundQueueBridges[i];
-        		bridge.setConsumerConnection(outboundQueueConnection);
-        	}
-        }
-        if (outboundQueueBridges != null) {
-        	for (int i = 0; i < outboundQueueBridges.length; i++) {
-        		OutboundQueueBridge bridge = outboundQueueBridges[i];
-        		bridge.setProducerConnection(outboundQueueConnection);
-        	}
-        }
-    }
-
-    protected void initializeForeignQueueConnection() throws NamingException, JMSException {
-        if (outboundQueueConnection == null) {
-            // get the connection factories
-            if (outboundQueueConnectionFactory == null) {
-                // look it up from JNDI
-                if (outboundQueueConnectionFactoryName != null) {
-                    outboundQueueConnectionFactory = (QueueConnectionFactory)jndiOutboundTemplate
-                        .lookup(outboundQueueConnectionFactoryName, QueueConnectionFactory.class);
-                    if (outboundUsername != null) {
-                        outboundQueueConnection = outboundQueueConnectionFactory
-                            .createQueueConnection(outboundUsername, outboundPassword);
-                    } else {
-                        outboundQueueConnection = outboundQueueConnectionFactory.createQueueConnection();
-                    }
-                } else {
-                    throw new JMSException("Cannot create foreignConnection - no information");
-                }
-            } else {
-                if (outboundUsername != null) {
-                    outboundQueueConnection = outboundQueueConnectionFactory
-                        .createQueueConnection(outboundUsername, outboundPassword);
-                } else {
-                    outboundQueueConnection = outboundQueueConnectionFactory.createQueueConnection();
-                }
-            }
-        }
-        if (localClientId != null && localClientId.length() > 0) {
-            outboundQueueConnection.setClientID(getOutboundClientId());
-        }
-        outboundQueueConnection.start();
-    }
-
-    protected void initializeLocalQueueConnection() throws NamingException, JMSException {
-        if (localQueueConnection == null) {
-            // get the connection factories
-            if (localQueueConnectionFactory == null) {
-                if (embeddedConnectionFactory == null) {
-                    // look it up from JNDI
-                    if (localConnectionFactoryName != null) {
-                        localQueueConnectionFactory = (QueueConnectionFactory)jndiLocalTemplate
-                            .lookup(localConnectionFactoryName, QueueConnectionFactory.class);
-                        if (localUsername != null) {
-                            localQueueConnection = localQueueConnectionFactory
-                                .createQueueConnection(localUsername, localPassword);
-                        } else {
-                            localQueueConnection = localQueueConnectionFactory.createQueueConnection();
-                        }
-                    } else {
-                        throw new JMSException("Cannot create localConnection - no information");
-                    }
-                } else {
-                    localQueueConnection = embeddedConnectionFactory.createQueueConnection();
-                }
-            } else {
-                if (localUsername != null) {
-                    localQueueConnection = localQueueConnectionFactory.createQueueConnection(localUsername,
-                                                                                             localPassword);
-                } else {
-                    localQueueConnection = localQueueConnectionFactory.createQueueConnection();
-                }
-            }
-        }
-        if (localClientId != null && localClientId.length() > 0) {
-            localQueueConnection.setClientID(getLocalClientId());
-        }
-        localQueueConnection.start();
-    }
-
-    protected void initializeInboundJmsMessageConvertor() {
-        inboundMessageConvertor.setConnection(localQueueConnection);
-    }
-
-    protected void initializeOutboundJmsMessageConvertor() {
-        outboundMessageConvertor.setConnection(outboundQueueConnection);
-    }
-
-    protected void initializeInboundQueueBridges() throws JMSException {
-        if (inboundQueueBridges != null) {
-            QueueSession outboundSession = outboundQueueConnection
-                .createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            QueueSession localSession = localQueueConnection.createQueueSession(false,
-                                                                                Session.AUTO_ACKNOWLEDGE);
-            for (int i = 0; i < inboundQueueBridges.length; i++) {
-                InboundQueueBridge bridge = inboundQueueBridges[i];
-                String localQueueName = bridge.getLocalQueueName();
-                Queue activemqQueue = createActiveMQQueue(localSession, localQueueName);
-                String queueName = bridge.getInboundQueueName();
-                Queue foreignQueue = createForeignQueue(outboundSession, queueName);
-                bridge.setConsumerQueue(foreignQueue);
-                bridge.setProducerQueue(activemqQueue);
-                bridge.setProducerConnection(localQueueConnection);
-                bridge.setConsumerConnection(outboundQueueConnection);
-                if (bridge.getJmsMessageConvertor() == null) {
-                    bridge.setJmsMessageConvertor(getInboundMessageConvertor());
-                }
-                bridge.setJmsConnector(this);
-                addInboundBridge(bridge);
-            }
-            outboundSession.close();
-            localSession.close();
-        }
-    }
-
-    protected void initializeOutboundQueueBridges() throws JMSException {
-        if (outboundQueueBridges != null) {
-            QueueSession outboundSession = outboundQueueConnection
-                .createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            QueueSession localSession = localQueueConnection.createQueueSession(false,
-                                                                                Session.AUTO_ACKNOWLEDGE);
-            for (int i = 0; i < outboundQueueBridges.length; i++) {
-                OutboundQueueBridge bridge = outboundQueueBridges[i];
-                String localQueueName = bridge.getLocalQueueName();
-                Queue activemqQueue = createActiveMQQueue(localSession, localQueueName);
-                String queueName = bridge.getOutboundQueueName();
-                Queue foreignQueue = createForeignQueue(outboundSession, queueName);
-                bridge.setConsumerQueue(activemqQueue);
-                bridge.setProducerQueue(foreignQueue);
-                bridge.setProducerConnection(outboundQueueConnection);
-                bridge.setConsumerConnection(localQueueConnection);
-                if (bridge.getJmsMessageConvertor() == null) {
-                    bridge.setJmsMessageConvertor(getOutboundMessageConvertor());
-                }
-                bridge.setJmsConnector(this);
-                addOutboundBridge(bridge);
-            }
-            outboundSession.close();
-            localSession.close();
-        }
-    }
-
-    protected Destination createReplyToBridge(Destination destination, Connection replyToProducerConnection,
-                                              Connection replyToConsumerConnection) {
-        Queue replyToProducerQueue = (Queue)destination;
-        boolean isInbound = replyToProducerConnection.equals(localQueueConnection);
-
-        if (isInbound) {
-            InboundQueueBridge bridge = (InboundQueueBridge)replyToBridges.get(replyToProducerQueue);
-            if (bridge == null) {
-                bridge = new InboundQueueBridge() {
-                    protected Destination processReplyToDestination(Destination destination) {
-                        return null;
-                    }
-                };
-                try {
-                    QueueSession replyToConsumerSession = ((QueueConnection)replyToConsumerConnection)
-                        .createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-                    Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue();
-                    replyToConsumerSession.close();
-                    bridge.setConsumerQueue(replyToConsumerQueue);
-                    bridge.setProducerQueue(replyToProducerQueue);
-                    bridge.setProducerConnection((QueueConnection)replyToProducerConnection);
-                    bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection);
-                    bridge.setDoHandleReplyTo(false);
-                    if (bridge.getJmsMessageConvertor() == null) {
-                        bridge.setJmsMessageConvertor(getInboundMessageConvertor());
-                    }
-                    bridge.setJmsConnector(this);
-                    bridge.start();
-                    LOG.info("Created replyTo bridge for " + replyToProducerQueue);
-                } catch (Exception e) {
-                    LOG.error("Failed to create replyTo bridge for queue: " + replyToProducerQueue, e);
-                    return null;
-                }
-                replyToBridges.put(replyToProducerQueue, bridge);
-            }
-            return bridge.getConsumerQueue();
-        } else {
-            OutboundQueueBridge bridge = (OutboundQueueBridge)replyToBridges.get(replyToProducerQueue);
-            if (bridge == null) {
-                bridge = new OutboundQueueBridge() {
-                    protected Destination processReplyToDestination(Destination destination) {
-                        return null;
-                    }
-                };
-                try {
-                    QueueSession replyToConsumerSession = ((QueueConnection)replyToConsumerConnection)
-                        .createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-                    Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue();
-                    replyToConsumerSession.close();
-                    bridge.setConsumerQueue(replyToConsumerQueue);
-                    bridge.setProducerQueue(replyToProducerQueue);
-                    bridge.setProducerConnection((QueueConnection)replyToProducerConnection);
-                    bridge.setConsumerConnection((QueueConnection)replyToConsumerConnection);
-                    bridge.setDoHandleReplyTo(false);
-                    if (bridge.getJmsMessageConvertor() == null) {
-                        bridge.setJmsMessageConvertor(getOutboundMessageConvertor());
-                    }
-                    bridge.setJmsConnector(this);
-                    bridge.start();
-                    LOG.info("Created replyTo bridge for " + replyToProducerQueue);
-                } catch (Exception e) {
-                    LOG.error("Failed to create replyTo bridge for queue: " + replyToProducerQueue, e);
-                    return null;
-                }
-                replyToBridges.put(replyToProducerQueue, bridge);
-            }
-            return bridge.getConsumerQueue();
-        }
-    }
-
-    protected Queue createActiveMQQueue(QueueSession session, String queueName) throws JMSException {
-        return session.createQueue(queueName);
-    }
-
-    protected Queue createForeignQueue(QueueSession session, String queueName) throws JMSException {
-        Queue result = null;
-        try {
-            result = session.createQueue(queueName);
-        } catch (JMSException e) {
-            // look-up the Queue
-            try {
-                result = (Queue)jndiOutboundTemplate.lookup(queueName, Queue.class);
-            } catch (NamingException e1) {
-                String errStr = "Failed to look-up Queue for name: " + queueName;
-                LOG.error(errStr, e);
-                JMSException jmsEx = new JMSException(errStr);
-                jmsEx.setLinkedException(e1);
-                throw jmsEx;
-            }
-        }
-        return result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsTopicConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsTopicConnector.java
deleted file mode 100755
index 7c87d2a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsTopicConnector.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicSession;
-import javax.naming.NamingException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Bridge to other JMS Topic providers
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class JmsTopicConnector extends JmsConnector {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicConnector.class);
-    private String outboundTopicConnectionFactoryName;
-    private String localConnectionFactoryName;
-    private TopicConnectionFactory outboundTopicConnectionFactory;
-    private TopicConnectionFactory localTopicConnectionFactory;
-    private TopicConnection outboundTopicConnection;
-    private TopicConnection localTopicConnection;
-    private InboundTopicBridge[] inboundTopicBridges;
-    private OutboundTopicBridge[] outboundTopicBridges;
-
-    public boolean init() {
-        boolean result = super.init();
-        if (result) {
-            try {
-                initializeForeignTopicConnection();
-                initializeLocalTopicConnection();
-                initializeInboundJmsMessageConvertor();
-                initializeOutboundJmsMessageConvertor();
-                initializeInboundTopicBridges();
-                initializeOutboundTopicBridges();
-            } catch (Exception e) {
-                LOG.error("Failed to initialize the JMSConnector", e);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * @return Returns the inboundTopicBridges.
-     */
-    public InboundTopicBridge[] getInboundTopicBridges() {
-        return inboundTopicBridges;
-    }
-
-    /**
-     * @param inboundTopicBridges The inboundTopicBridges to set.
-     */
-    public void setInboundTopicBridges(InboundTopicBridge[] inboundTopicBridges) {
-        this.inboundTopicBridges = inboundTopicBridges;
-    }
-
-    /**
-     * @return Returns the outboundTopicBridges.
-     */
-    public OutboundTopicBridge[] getOutboundTopicBridges() {
-        return outboundTopicBridges;
-    }
-
-    /**
-     * @param outboundTopicBridges The outboundTopicBridges to set.
-     */
-    public void setOutboundTopicBridges(OutboundTopicBridge[] outboundTopicBridges) {
-        this.outboundTopicBridges = outboundTopicBridges;
-    }
-
-    /**
-     * @return Returns the localTopicConnectionFactory.
-     */
-    public TopicConnectionFactory getLocalTopicConnectionFactory() {
-        return localTopicConnectionFactory;
-    }
-
-    /**
-     * @param localTopicConnectionFactory The localTopicConnectionFactory to
-     *                set.
-     */
-    public void setLocalTopicConnectionFactory(TopicConnectionFactory localConnectionFactory) {
-        this.localTopicConnectionFactory = localConnectionFactory;
-    }
-
-    /**
-     * @return Returns the outboundTopicConnectionFactory.
-     */
-    public TopicConnectionFactory getOutboundTopicConnectionFactory() {
-        return outboundTopicConnectionFactory;
-    }
-
-    /**
-     * @return Returns the outboundTopicConnectionFactoryName.
-     */
-    public String getOutboundTopicConnectionFactoryName() {
-        return outboundTopicConnectionFactoryName;
-    }
-
-    /**
-     * @param outboundTopicConnectionFactoryName The
-     *                outboundTopicConnectionFactoryName to set.
-     */
-    public void setOutboundTopicConnectionFactoryName(String foreignTopicConnectionFactoryName) {
-        this.outboundTopicConnectionFactoryName = foreignTopicConnectionFactoryName;
-    }
-
-    /**
-     * @return Returns the localConnectionFactoryName.
-     */
-    public String getLocalConnectionFactoryName() {
-        return localConnectionFactoryName;
-    }
-
-    /**
-     * @param localConnectionFactoryName The localConnectionFactoryName to set.
-     */
-    public void setLocalConnectionFactoryName(String localConnectionFactoryName) {
-        this.localConnectionFactoryName = localConnectionFactoryName;
-    }
-
-    /**
-     * @return Returns the localTopicConnection.
-     */
-    public TopicConnection getLocalTopicConnection() {
-        return localTopicConnection;
-    }
-
-    /**
-     * @param localTopicConnection The localTopicConnection to set.
-     */
-    public void setLocalTopicConnection(TopicConnection localTopicConnection) {
-        this.localTopicConnection = localTopicConnection;
-    }
-
-    /**
-     * @return Returns the outboundTopicConnection.
-     */
-    public TopicConnection getOutboundTopicConnection() {
-        return outboundTopicConnection;
-    }
-
-    /**
-     * @param outboundTopicConnection The outboundTopicConnection to set.
-     */
-    public void setOutboundTopicConnection(TopicConnection foreignTopicConnection) {
-        this.outboundTopicConnection = foreignTopicConnection;
-    }
-
-    /**
-     * @param outboundTopicConnectionFactory The outboundTopicConnectionFactory
-     *                to set.
-     */
-    public void setOutboundTopicConnectionFactory(TopicConnectionFactory foreignTopicConnectionFactory) {
-        this.outboundTopicConnectionFactory = foreignTopicConnectionFactory;
-    }
-
-    public void restartProducerConnection() throws NamingException, JMSException {
-        outboundTopicConnection = null;
-        initializeForeignTopicConnection();
-    }
-
-    protected void initializeForeignTopicConnection() throws NamingException, JMSException {
-        if (outboundTopicConnection == null) {
-            // get the connection factories
-            if (outboundTopicConnectionFactory == null) {
-                // look it up from JNDI
-                if (outboundTopicConnectionFactoryName != null) {
-                    outboundTopicConnectionFactory = (TopicConnectionFactory)jndiOutboundTemplate
-                        .lookup(outboundTopicConnectionFactoryName, TopicConnectionFactory.class);
-                    if (outboundUsername != null) {
-                        outboundTopicConnection = outboundTopicConnectionFactory
-                            .createTopicConnection(outboundUsername, outboundPassword);
-                    } else {
-                        outboundTopicConnection = outboundTopicConnectionFactory.createTopicConnection();
-                    }
-                } else {
-                    throw new JMSException("Cannot create localConnection - no information");
-                }
-            } else {
-                if (outboundUsername != null) {
-                    outboundTopicConnection = outboundTopicConnectionFactory
-                        .createTopicConnection(outboundUsername, outboundPassword);
-                } else {
-                    outboundTopicConnection = outboundTopicConnectionFactory.createTopicConnection();
-                }
-            }
-        }
-        if (localClientId != null && localClientId.length() > 0) {
-            outboundTopicConnection.setClientID(getOutboundClientId());
-        }
-        outboundTopicConnection.start();
-    }
-
-    protected void initializeLocalTopicConnection() throws NamingException, JMSException {
-        if (localTopicConnection == null) {
-            // get the connection factories
-            if (localTopicConnectionFactory == null) {
-                if (embeddedConnectionFactory == null) {
-                    // look it up from JNDI
-                    if (localConnectionFactoryName != null) {
-                        localTopicConnectionFactory = (TopicConnectionFactory)jndiLocalTemplate
-                            .lookup(localConnectionFactoryName, TopicConnectionFactory.class);
-                        if (localUsername != null) {
-                            localTopicConnection = localTopicConnectionFactory
-                                .createTopicConnection(localUsername, localPassword);
-                        } else {
-                            localTopicConnection = localTopicConnectionFactory.createTopicConnection();
-                        }
-                    } else {
-                        throw new JMSException("Cannot create localConnection - no information");
-                    }
-                } else {
-                    localTopicConnection = embeddedConnectionFactory.createTopicConnection();
-                }
-            } else {
-                if (localUsername != null) {
-                    localTopicConnection = localTopicConnectionFactory.createTopicConnection(localUsername,
-                                                                                             localPassword);
-                } else {
-                    localTopicConnection = localTopicConnectionFactory.createTopicConnection();
-                }
-            }
-        }
-        if (localClientId != null && localClientId.length() > 0) {
-            localTopicConnection.setClientID(getLocalClientId());
-        }
-        localTopicConnection.start();
-    }
-
-    protected void initializeInboundJmsMessageConvertor() {
-        inboundMessageConvertor.setConnection(localTopicConnection);
-    }
-
-    protected void initializeOutboundJmsMessageConvertor() {
-        outboundMessageConvertor.setConnection(outboundTopicConnection);
-    }
-
-    protected void initializeInboundTopicBridges() throws JMSException {
-        if (inboundTopicBridges != null) {
-            TopicSession outboundSession = outboundTopicConnection
-                .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-            TopicSession localSession = localTopicConnection.createTopicSession(false,
-                                                                                Session.AUTO_ACKNOWLEDGE);
-            for (int i = 0; i < inboundTopicBridges.length; i++) {
-                InboundTopicBridge bridge = inboundTopicBridges[i];
-                String localTopicName = bridge.getLocalTopicName();
-                Topic activemqTopic = createActiveMQTopic(localSession, localTopicName);
-                String topicName = bridge.getInboundTopicName();
-                Topic foreignTopic = createForeignTopic(outboundSession, topicName);
-                bridge.setConsumerTopic(foreignTopic);
-                bridge.setProducerTopic(activemqTopic);
-                bridge.setProducerConnection(localTopicConnection);
-                bridge.setConsumerConnection(outboundTopicConnection);
-                if (bridge.getJmsMessageConvertor() == null) {
-                    bridge.setJmsMessageConvertor(getInboundMessageConvertor());
-                }
-                bridge.setJmsConnector(this);
-                addInboundBridge(bridge);
-            }
-            outboundSession.close();
-            localSession.close();
-        }
-    }
-
-    protected void initializeOutboundTopicBridges() throws JMSException {
-        if (outboundTopicBridges != null) {
-            TopicSession outboundSession = outboundTopicConnection
-                .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-            TopicSession localSession = localTopicConnection.createTopicSession(false,
-                                                                                Session.AUTO_ACKNOWLEDGE);
-            for (int i = 0; i < outboundTopicBridges.length; i++) {
-                OutboundTopicBridge bridge = outboundTopicBridges[i];
-                String localTopicName = bridge.getLocalTopicName();
-                Topic activemqTopic = createActiveMQTopic(localSession, localTopicName);
-                String topicName = bridge.getOutboundTopicName();
-                Topic foreignTopic = createForeignTopic(outboundSession, topicName);
-                bridge.setConsumerTopic(activemqTopic);
-                bridge.setProducerTopic(foreignTopic);
-                bridge.setProducerConnection(outboundTopicConnection);
-                bridge.setConsumerConnection(localTopicConnection);
-                if (bridge.getJmsMessageConvertor() == null) {
-                    bridge.setJmsMessageConvertor(getOutboundMessageConvertor());
-                }
-                bridge.setJmsConnector(this);
-                addOutboundBridge(bridge);
-            }
-            outboundSession.close();
-            localSession.close();
-        }
-    }
-
-    protected Destination createReplyToBridge(Destination destination, Connection replyToProducerConnection,
-                                              Connection replyToConsumerConnection) {
-        Topic replyToProducerTopic = (Topic)destination;
-        boolean isInbound = replyToProducerConnection.equals(localTopicConnection);
-
-        if (isInbound) {
-            InboundTopicBridge bridge = (InboundTopicBridge)replyToBridges.get(replyToProducerTopic);
-            if (bridge == null) {
-                bridge = new InboundTopicBridge() {
-                    protected Destination processReplyToDestination(Destination destination) {
-                        return null;
-                    }
-                };
-                try {
-                    TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection)
-                        .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-                    Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
-                    replyToConsumerSession.close();
-                    bridge.setConsumerTopic(replyToConsumerTopic);
-                    bridge.setProducerTopic(replyToProducerTopic);
-                    bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
-                    bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
-                    bridge.setDoHandleReplyTo(false);
-                    if (bridge.getJmsMessageConvertor() == null) {
-                        bridge.setJmsMessageConvertor(getInboundMessageConvertor());
-                    }
-                    bridge.setJmsConnector(this);
-                    bridge.start();
-                    LOG.info("Created replyTo bridge for " + replyToProducerTopic);
-                } catch (Exception e) {
-                    LOG.error("Failed to create replyTo bridge for topic: " + replyToProducerTopic, e);
-                    return null;
-                }
-                replyToBridges.put(replyToProducerTopic, bridge);
-            }
-            return bridge.getConsumerTopic();
-        } else {
-            OutboundTopicBridge bridge = (OutboundTopicBridge)replyToBridges.get(replyToProducerTopic);
-            if (bridge == null) {
-                bridge = new OutboundTopicBridge() {
-                    protected Destination processReplyToDestination(Destination destination) {
-                        return null;
-                    }
-                };
-                try {
-                    TopicSession replyToConsumerSession = ((TopicConnection)replyToConsumerConnection)
-                        .createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-                    Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic();
-                    replyToConsumerSession.close();
-                    bridge.setConsumerTopic(replyToConsumerTopic);
-                    bridge.setProducerTopic(replyToProducerTopic);
-                    bridge.setProducerConnection((TopicConnection)replyToProducerConnection);
-                    bridge.setConsumerConnection((TopicConnection)replyToConsumerConnection);
-                    bridge.setDoHandleReplyTo(false);
-                    if (bridge.getJmsMessageConvertor() == null) {
-                        bridge.setJmsMessageConvertor(getOutboundMessageConvertor());
-                    }
-                    bridge.setJmsConnector(this);
-                    bridge.start();
-                    LOG.info("Created replyTo bridge for " + replyToProducerTopic);
-                } catch (Exception e) {
-                    LOG.error("Failed to create replyTo bridge for topic: " + replyToProducerTopic, e);
-                    return null;
-                }
-                replyToBridges.put(replyToProducerTopic, bridge);
-            }
-            return bridge.getConsumerTopic();
-        }
-    }
-
-    protected Topic createActiveMQTopic(TopicSession session, String topicName) throws JMSException {
-        return session.createTopic(topicName);
-    }
-
-    protected Topic createForeignTopic(TopicSession session, String topicName) throws JMSException {
-        Topic result = null;
-        try {
-            result = session.createTopic(topicName);
-        } catch (JMSException e) {
-            // look-up the Topic
-            try {
-                result = (Topic)jndiOutboundTemplate.lookup(topicName, Topic.class);
-            } catch (NamingException e1) {
-                String errStr = "Failed to look-up Topic for name: " + topicName;
-                LOG.error(errStr, e);
-                JMSException jmsEx = new JMSException(errStr);
-                jmsEx.setLinkedException(e1);
-                throw jmsEx;
-            }
-        }
-        return result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/OutboundQueueBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/OutboundQueueBridge.java
deleted file mode 100755
index c9eebd1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/OutboundQueueBridge.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.network.jms;
-
-/**
- * Create an Outbound Queue Bridge
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class OutboundQueueBridge extends QueueBridge {
-
-    String outboundQueueName;
-    String localQueueName;
-
-    /**
-     * Constructor that takes a foreign destination as an argument
-     * 
-     * @param outboundQueueName
-     */
-    public OutboundQueueBridge(String outboundQueueName) {
-        this.outboundQueueName = outboundQueueName;
-        this.localQueueName = outboundQueueName;
-    }
-
-    /**
-     * Default Contructor
-     */
-    public OutboundQueueBridge() {
-    }
-
-    /**
-     * @return Returns the outboundQueueName.
-     */
-    public String getOutboundQueueName() {
-        return outboundQueueName;
-    }
-
-    /**
-     * @param outboundQueueName The outboundQueueName to set.
-     */
-    public void setOutboundQueueName(String outboundQueueName) {
-        this.outboundQueueName = outboundQueueName;
-        if (this.localQueueName == null) {
-            this.localQueueName = outboundQueueName;
-        }
-    }
-
-    /**
-     * @return the localQueueName
-     */
-    public String getLocalQueueName() {
-        return localQueueName;
-    }
-
-    /**
-     * @param localQueueName the localQueueName to set
-     */
-    public void setLocalQueueName(String localQueueName) {
-        this.localQueueName = localQueueName;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/OutboundTopicBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/OutboundTopicBridge.java
deleted file mode 100755
index cb7c1c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/OutboundTopicBridge.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.network.jms;
-
-/**
- * Create an Outbound Topic Bridge
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class OutboundTopicBridge extends TopicBridge {
-
-    String outboundTopicName;
-    String localTopicName;
-
-    /**
-     * Constructor that takes a foreign destination as an argument
-     * 
-     * @param outboundTopicName
-     */
-    public OutboundTopicBridge(String outboundTopicName) {
-        this.outboundTopicName = outboundTopicName;
-        this.localTopicName = outboundTopicName;
-    }
-
-    /**
-     * Default Contructor
-     */
-    public OutboundTopicBridge() {
-    }
-
-    /**
-     * @return Returns the outboundTopicName.
-     */
-    public String getOutboundTopicName() {
-        return outboundTopicName;
-    }
-
-    /**
-     * @param outboundTopicName The outboundTopicName to set.
-     */
-    public void setOutboundTopicName(String outboundTopicName) {
-        this.outboundTopicName = outboundTopicName;
-        if (this.localTopicName == null) {
-            this.localTopicName = outboundTopicName;
-        }
-    }
-
-    /**
-     * @return the localTopicName
-     */
-    public String getLocalTopicName() {
-        return localTopicName;
-    }
-
-    /**
-     * @param localTopicName the localTopicName to set
-     */
-    public void setLocalTopicName(String localTopicName) {
-        this.localTopicName = localTopicName;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/QueueBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/QueueBridge.java
deleted file mode 100755
index 34bad1e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/QueueBridge.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-
-/**
- * A Destination bridge is used to bridge between to different JMS systems
- * 
- * 
- */
-class QueueBridge extends DestinationBridge {
-    protected Queue consumerQueue;
-    protected Queue producerQueue;
-    protected QueueSession consumerSession;
-    protected QueueSession producerSession;
-
-    protected String selector;
-    protected QueueSender producer;
-    protected QueueConnection consumerConnection;
-    protected QueueConnection producerConnection;
-
-    public void stop() throws Exception {
-        super.stop();
-        if (consumerSession != null) {
-            consumerSession.close();
-        }
-        if (producerSession != null) {
-            producerSession.close();
-        }
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        // set up the consumer
-        consumerSession = consumerConnection.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = null;
-
-        if (selector != null && selector.length() > 0) {
-            consumer = consumerSession.createReceiver(consumerQueue, selector);
-        } else {
-            consumer = consumerSession.createReceiver(consumerQueue);
-        }
-
-        return consumer;
-    }
-
-    protected synchronized MessageProducer createProducer() throws JMSException {
-        producerSession = producerConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = producerSession.createSender(null);
-        return producer;
-    }
-
-    protected synchronized void sendMessage(Message message) throws JMSException {
-        if (producer == null) {
-            createProducer();
-        }
-        producer.send(producerQueue, message);
-    }
-
-    /**
-     * @return Returns the consumerConnection.
-     */
-    public QueueConnection getConsumerConnection() {
-        return consumerConnection;
-    }
-
-    /**
-     * @param consumerConnection The consumerConnection to set.
-     */
-    public void setConsumerConnection(QueueConnection consumerConnection) {
-        this.consumerConnection = consumerConnection;
-    }
-
-    /**
-     * @return Returns the consumerQueue.
-     */
-    public Queue getConsumerQueue() {
-        return consumerQueue;
-    }
-
-    /**
-     * @param consumerQueue The consumerQueue to set.
-     */
-    public void setConsumerQueue(Queue consumerQueue) {
-        this.consumerQueue = consumerQueue;
-    }
-
-    /**
-     * @return Returns the producerConnection.
-     */
-    public QueueConnection getProducerConnection() {
-        return producerConnection;
-    }
-
-    /**
-     * @param producerConnection The producerConnection to set.
-     */
-    public void setProducerConnection(QueueConnection producerConnection) {
-        this.producerConnection = producerConnection;
-    }
-
-    /**
-     * @return Returns the producerQueue.
-     */
-    public Queue getProducerQueue() {
-        return producerQueue;
-    }
-
-    /**
-     * @param producerQueue The producerQueue to set.
-     */
-    public void setProducerQueue(Queue producerQueue) {
-        this.producerQueue = producerQueue;
-    }
-
-    /**
-     * @return Returns the selector.
-     */
-    public String getSelector() {
-        return selector;
-    }
-
-    /**
-     * @param selector The selector to set.
-     */
-    public void setSelector(String selector) {
-        this.selector = selector;
-    }
-
-    protected Connection getConnnectionForConsumer() {
-        return getConsumerConnection();
-    }
-
-    protected Connection getConnectionForProducer() {
-        return getProducerConnection();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/SimpleJmsMessageConvertor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/SimpleJmsMessageConvertor.java
deleted file mode 100755
index e628b6f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/SimpleJmsMessageConvertor.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-/**
- * Converts Message from one JMS to another
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class SimpleJmsMessageConvertor implements JmsMesageConvertor {
-
-    /**
-     * Convert a foreign JMS Message to a native ActiveMQ Message - Inbound or
-     * visa-versa outbound
-     * 
-     * @param message
-     * @return the converted message
-     * @throws JMSException
-     */
-    public Message convert(Message message) throws JMSException {
-        return message;
-    }
-
-    public Message convert(Message message, Destination replyTo) throws JMSException {
-        Message msg = convert(message);
-        if (replyTo != null) {
-            msg.setJMSReplyTo(replyTo);
-        } else {
-            msg.setJMSReplyTo(null);
-        }
-        return msg;
-    }
-
-    public void setConnection(Connection connection) {
-        // do nothing
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/TopicBridge.java b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/TopicBridge.java
deleted file mode 100755
index 6ca7fa5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/TopicBridge.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-
-/**
- * A Destination bridge is used to bridge between to different JMS systems
- * 
- * 
- */
-class TopicBridge extends DestinationBridge {
-    protected Topic consumerTopic;
-    protected Topic producerTopic;
-    protected TopicSession consumerSession;
-    protected TopicSession producerSession;
-    protected String consumerName;
-    protected String selector;
-    protected TopicPublisher producer;
-    protected TopicConnection consumerConnection;
-    protected TopicConnection producerConnection;
-
-    public void stop() throws Exception {
-        super.stop();
-        if (consumerSession != null) {
-            consumerSession.close();
-        }
-        if (producerSession != null) {
-            producerSession.close();
-        }
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        // set up the consumer
-        consumerSession = consumerConnection.createTopicSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = null;
-        if (consumerName != null && consumerName.length() > 0) {
-            if (selector != null && selector.length() > 0) {
-                consumer = consumerSession.createDurableSubscriber(consumerTopic, consumerName, selector,
-                                                                   false);
-            } else {
-                consumer = consumerSession.createDurableSubscriber(consumerTopic, consumerName);
-            }
-        } else {
-            if (selector != null && selector.length() > 0) {
-                consumer = consumerSession.createSubscriber(consumerTopic, selector, false);
-            } else {
-                consumer = consumerSession.createSubscriber(consumerTopic);
-            }
-        }
-        return consumer;
-    }
-
-    protected synchronized MessageProducer createProducer() throws JMSException {
-        producerSession = producerConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = producerSession.createPublisher(null);
-        return producer;
-    }
-
-    protected synchronized void sendMessage(Message message) throws JMSException {
-        if (producer == null) {
-            createProducer();
-        }
-        producer.publish(producerTopic, message);
-    }
-
-    /**
-     * @return Returns the consumerConnection.
-     */
-    public TopicConnection getConsumerConnection() {
-        return consumerConnection;
-    }
-
-    /**
-     * @param consumerConnection The consumerConnection to set.
-     */
-    public void setConsumerConnection(TopicConnection consumerConnection) {
-        this.consumerConnection = consumerConnection;
-    }
-
-    /**
-     * @return Returns the subscriptionName.
-     */
-    public String getConsumerName() {
-        return consumerName;
-    }
-
-    /**
-     * @param subscriptionName The subscriptionName to set.
-     */
-    public void setConsumerName(String consumerName) {
-        this.consumerName = consumerName;
-    }
-
-    /**
-     * @return Returns the consumerTopic.
-     */
-    public Topic getConsumerTopic() {
-        return consumerTopic;
-    }
-
-    /**
-     * @param consumerTopic The consumerTopic to set.
-     */
-    public void setConsumerTopic(Topic consumerTopic) {
-        this.consumerTopic = consumerTopic;
-    }
-
-    /**
-     * @return Returns the producerConnection.
-     */
-    public TopicConnection getProducerConnection() {
-        return producerConnection;
-    }
-
-    /**
-     * @param producerConnection The producerConnection to set.
-     */
-    public void setProducerConnection(TopicConnection producerConnection) {
-        this.producerConnection = producerConnection;
-    }
-
-    /**
-     * @return Returns the producerTopic.
-     */
-    public Topic getProducerTopic() {
-        return producerTopic;
-    }
-
-    /**
-     * @param producerTopic The producerTopic to set.
-     */
-    public void setProducerTopic(Topic producerTopic) {
-        this.producerTopic = producerTopic;
-    }
-
-    /**
-     * @return Returns the selector.
-     */
-    public String getSelector() {
-        return selector;
-    }
-
-    /**
-     * @param selector The selector to set.
-     */
-    public void setSelector(String selector) {
-        this.selector = selector;
-    }
-
-    protected Connection getConnnectionForConsumer() {
-        return getConsumerConnection();
-    }
-
-    protected Connection getConnectionForProducer() {
-        return getProducerConnection();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/package.html
deleted file mode 100755
index f2c2d6c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Support for a federated network using a foreign JMS provider.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/network/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/network/package.html
deleted file mode 100755
index 6786f10..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/network/package.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Support for federated networks of brokers.
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java
deleted file mode 100755
index dbc418c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.openwire;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-public final class BooleanStream {
-
-    byte data[] = new byte[48];
-    short arrayLimit;
-    short arrayPos;
-    byte bytePos;
-
-    public boolean readBoolean() throws IOException {
-        assert arrayPos <= arrayLimit;
-        byte b = data[arrayPos];
-        boolean rc = ((b >> bytePos) & 0x01) != 0;
-        bytePos++;
-        if (bytePos >= 8) {
-            bytePos = 0;
-            arrayPos++;
-        }
-        return rc;
-    }
-
-    public void writeBoolean(boolean value) throws IOException {
-        if (bytePos == 0) {
-            arrayLimit++;
-            if (arrayLimit >= data.length) {
-                // re-grow the array.
-                byte d[] = new byte[data.length * 2];
-                System.arraycopy(data, 0, d, 0, data.length);
-                data = d;
-            }
-        }
-        if (value) {
-            data[arrayPos] |= 0x01 << bytePos;
-        }
-        bytePos++;
-        if (bytePos >= 8) {
-            bytePos = 0;
-            arrayPos++;
-        }
-    }
-
-    public void marshal(DataOutput dataOut) throws IOException {
-        if (arrayLimit < 64) {
-            dataOut.writeByte(arrayLimit);
-        } else if (arrayLimit < 256) { // max value of unsigned byte
-            dataOut.writeByte(0xC0);
-            dataOut.writeByte(arrayLimit);
-        } else {
-            dataOut.writeByte(0x80);
-            dataOut.writeShort(arrayLimit);
-        }
-
-        dataOut.write(data, 0, arrayLimit);
-        clear();
-    }
-
-    public void marshal(ByteBuffer dataOut) {
-        if (arrayLimit < 64) {
-            dataOut.put((byte)arrayLimit);
-        } else if (arrayLimit < 256) { // max value of unsigned byte
-            dataOut.put((byte)0xC0);
-            dataOut.put((byte)arrayLimit);
-        } else {
-            dataOut.put((byte)0x80);
-            dataOut.putShort(arrayLimit);
-        }
-
-        dataOut.put(data, 0, arrayLimit);
-    }
-
-    public void unmarshal(DataInput dataIn) throws IOException {
-
-        arrayLimit = (short)(dataIn.readByte() & 0xFF);
-        if (arrayLimit == 0xC0) {
-            arrayLimit = (short)(dataIn.readByte() & 0xFF);
-        } else if (arrayLimit == 0x80) {
-            arrayLimit = dataIn.readShort();
-        }
-        if (data.length < arrayLimit) {
-            data = new byte[arrayLimit];
-        }
-        dataIn.readFully(data, 0, arrayLimit);
-        clear();
-    }
-
-    public void clear() {
-        arrayPos = 0;
-        bytePos = 0;
-    }
-
-    public int marshalledSize() {
-        if (arrayLimit < 64) {
-            return 1 + arrayLimit;
-        } else if (arrayLimit < 256) {
-            return 2 + arrayLimit;
-        } else {
-            return 3 + arrayLimit;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/CommandIdComparator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/CommandIdComparator.java
deleted file mode 100644
index b362fc8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/CommandIdComparator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.openwire;
-
-import java.util.Comparator;
-
-import org.apache.activemq.command.Command;
-
-/**
- * A @{link Comparator} of commands using their {@link Command#getCommandId()}
- * 
- * 
- */
-public class CommandIdComparator implements Comparator<Command> {
-
-    public int compare(Command c1, Command c2) {        
-        return c1.getCommandId() - c2.getCommandId();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java
deleted file mode 100755
index 51073cb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.openwire;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-
-public interface DataStreamMarshaller {
-
-    byte getDataStructureType();
-    DataStructure createObject();
-
-    int tightMarshal1(OpenWireFormat format, Object c, BooleanStream bs) throws IOException;
-    void tightMarshal2(OpenWireFormat format, Object c, DataOutput ds, BooleanStream bs) throws IOException;
-    void tightUnmarshal(OpenWireFormat format, Object data, DataInput dis, BooleanStream bs) throws IOException;
-
-    void looseMarshal(OpenWireFormat format, Object c, DataOutput ds) throws IOException;
-    void looseUnmarshal(OpenWireFormat format, Object data, DataInput dis) throws IOException;
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
deleted file mode 100755
index d9375ba..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
+++ /dev/null
@@ -1,649 +0,0 @@
-/**
- * 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.openwire;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ByteSequenceData;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * 
- * 
- */
-public final class OpenWireFormat implements WireFormat {
-
-    public static final int DEFAULT_VERSION = CommandTypes.PROTOCOL_STORE_VERSION;
-
-    static final byte NULL_TYPE = CommandTypes.NULL;
-    private static final int MARSHAL_CACHE_SIZE = Short.MAX_VALUE / 2;
-    private static final int MARSHAL_CACHE_FREE_SPACE = 100;
-
-    private DataStreamMarshaller dataMarshallers[];
-    private int version;
-    private boolean stackTraceEnabled;
-    private boolean tcpNoDelayEnabled;
-    private boolean cacheEnabled;
-    private boolean tightEncodingEnabled;
-    private boolean sizePrefixDisabled;
-
-    // The following fields are used for value caching
-    private short nextMarshallCacheIndex;
-    private short nextMarshallCacheEvictionIndex;
-    private Map<DataStructure, Short> marshallCacheMap = new HashMap<DataStructure, Short>();
-    private DataStructure marshallCache[] = new DataStructure[MARSHAL_CACHE_SIZE];
-    private DataStructure unmarshallCache[] = new DataStructure[MARSHAL_CACHE_SIZE];
-    private DataByteArrayOutputStream bytesOut = new DataByteArrayOutputStream();
-    private DataByteArrayInputStream bytesIn = new DataByteArrayInputStream();
-    private WireFormatInfo preferedWireFormatInfo;
-    
-    public OpenWireFormat() {
-        this(DEFAULT_VERSION);
-    }
-
-    public OpenWireFormat(int i) {
-        setVersion(i);
-    }
-
-    public int hashCode() {
-        return version ^ (cacheEnabled ? 0x10000000 : 0x20000000)
-               ^ (stackTraceEnabled ? 0x01000000 : 0x02000000)
-               ^ (tightEncodingEnabled ? 0x00100000 : 0x00200000)
-               ^ (sizePrefixDisabled ? 0x00010000 : 0x00020000);
-    }
-
-    public OpenWireFormat copy() {
-        OpenWireFormat answer = new OpenWireFormat();
-        answer.version = version;
-        answer.stackTraceEnabled = stackTraceEnabled;
-        answer.tcpNoDelayEnabled = tcpNoDelayEnabled;
-        answer.cacheEnabled = cacheEnabled;
-        answer.tightEncodingEnabled = tightEncodingEnabled;
-        answer.sizePrefixDisabled = sizePrefixDisabled;
-        answer.preferedWireFormatInfo = preferedWireFormatInfo;
-        return answer;
-    }
-
-    public boolean equals(Object object) {
-        if (object == null) {
-            return false;
-        }
-        OpenWireFormat o = (OpenWireFormat)object;
-        return o.stackTraceEnabled == stackTraceEnabled && o.cacheEnabled == cacheEnabled
-               && o.version == version && o.tightEncodingEnabled == tightEncodingEnabled
-               && o.sizePrefixDisabled == sizePrefixDisabled;
-    }
-
-
-    public String toString() {
-        return "OpenWireFormat{version=" + version + ", cacheEnabled=" + cacheEnabled + ", stackTraceEnabled=" + stackTraceEnabled + ", tightEncodingEnabled="
-               + tightEncodingEnabled + ", sizePrefixDisabled=" + sizePrefixDisabled + "}";
-        // return "OpenWireFormat{id="+id+",
-        // tightEncodingEnabled="+tightEncodingEnabled+"}";
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public synchronized ByteSequence marshal(Object command) throws IOException {
-
-        if (cacheEnabled) {
-            runMarshallCacheEvictionSweep();
-        }
-
-//        MarshallAware ma = null;
-//        // If not using value caching, then the marshaled form is always the
-//        // same
-//        if (!cacheEnabled && ((DataStructure)command).isMarshallAware()) {
-//            ma = (MarshallAware)command;
-//        }
-
-        ByteSequence sequence = null;
-        // if( ma!=null ) {
-        // sequence = ma.getCachedMarshalledForm(this);
-        // }
-
-        if (sequence == null) {
-
-            int size = 1;
-            if (command != null) {
-
-                DataStructure c = (DataStructure)command;
-                byte type = c.getDataStructureType();
-                DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[type & 0xFF];
-                if (dsm == null) {
-                    throw new IOException("Unknown data type: " + type);
-                }
-                if (tightEncodingEnabled) {
-
-                    BooleanStream bs = new BooleanStream();
-                    size += dsm.tightMarshal1(this, c, bs);
-                    size += bs.marshalledSize();
-
-                    bytesOut.restart(size);
-                    if (!sizePrefixDisabled) {
-                        bytesOut.writeInt(size);
-                    }
-                    bytesOut.writeByte(type);
-                    bs.marshal(bytesOut);
-                    dsm.tightMarshal2(this, c, bytesOut, bs);
-                    sequence = bytesOut.toByteSequence();
-
-                } else {
-                    bytesOut.restart();
-                    if (!sizePrefixDisabled) {
-                        bytesOut.writeInt(0); // we don't know the final size
-                                                // yet but write this here for
-                                                // now.
-                    }
-                    bytesOut.writeByte(type);
-                    dsm.looseMarshal(this, c, bytesOut);
-                    sequence = bytesOut.toByteSequence();
-
-                    if (!sizePrefixDisabled) {
-                        size = sequence.getLength() - 4;
-                        int pos = sequence.offset;
-                        ByteSequenceData.writeIntBig(sequence, size);
-                        sequence.offset = pos;
-                    }
-                }
-
-            } else {
-                bytesOut.restart(5);
-                bytesOut.writeInt(size);
-                bytesOut.writeByte(NULL_TYPE);
-                sequence = bytesOut.toByteSequence();
-            }
-
-            // if( ma!=null ) {
-            // ma.setCachedMarshalledForm(this, sequence);
-            // }
-        }
-        return sequence;
-    }
-
-    public synchronized Object unmarshal(ByteSequence sequence) throws IOException {
-        bytesIn.restart(sequence);
-        // DataInputStream dis = new DataInputStream(new
-        // ByteArrayInputStream(sequence));
-
-        if (!sizePrefixDisabled) {
-            int size = bytesIn.readInt();
-            if (sequence.getLength() - 4 != size) {
-                // throw new IOException("Packet size does not match marshaled
-                // size");
-            }
-        }
-
-        Object command = doUnmarshal(bytesIn);
-        // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) {
-        // ((MarshallAware) command).setCachedMarshalledForm(this, sequence);
-        // }
-        return command;
-    }
-
-    public synchronized void marshal(Object o, DataOutput dataOut) throws IOException {
-
-        if (cacheEnabled) {
-            runMarshallCacheEvictionSweep();
-        }
-
-        int size = 1;
-        if (o != null) {
-
-            DataStructure c = (DataStructure)o;
-            byte type = c.getDataStructureType();
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[type & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + type);
-            }
-            if (tightEncodingEnabled) {
-                BooleanStream bs = new BooleanStream();
-                size += dsm.tightMarshal1(this, c, bs);
-                size += bs.marshalledSize();
-
-                if (!sizePrefixDisabled) {
-                    dataOut.writeInt(size);
-                }
-
-                dataOut.writeByte(type);
-                bs.marshal(dataOut);
-                dsm.tightMarshal2(this, c, dataOut, bs);
-
-            } else {
-                DataOutput looseOut = dataOut;
-
-                if (!sizePrefixDisabled) {
-                    bytesOut.restart();
-                    looseOut = bytesOut;
-                }
-
-                looseOut.writeByte(type);
-                dsm.looseMarshal(this, c, looseOut);
-
-                if (!sizePrefixDisabled) {
-                    ByteSequence sequence = bytesOut.toByteSequence();
-                    dataOut.writeInt(sequence.getLength());
-                    dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
-                }
-
-            }
-
-        } else {
-            if (!sizePrefixDisabled) {
-            	dataOut.writeInt(size);
-            }
-            dataOut.writeByte(NULL_TYPE);
-        }
-    }
-
-    public Object unmarshal(DataInput dis) throws IOException {
-        DataInput dataIn = dis;
-        if (!sizePrefixDisabled) {
-            dis.readInt();
-            // int size = dis.readInt();
-            // byte[] data = new byte[size];
-            // dis.readFully(data);
-            // bytesIn.restart(data);
-            // dataIn = bytesIn;
-        }
-        return doUnmarshal(dataIn);
-    }
-
-    /**
-     * Used by NIO or AIO transports
-     */
-    public int tightMarshal1(Object o, BooleanStream bs) throws IOException {
-        int size = 1;
-        if (o != null) {
-            DataStructure c = (DataStructure)o;
-            byte type = c.getDataStructureType();
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[type & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + type);
-            }
-
-            size += dsm.tightMarshal1(this, c, bs);
-            size += bs.marshalledSize();
-        }
-        return size;
-    }
-
-    /**
-     * Used by NIO or AIO transports; note that the size is not written as part
-     * of this method.
-     */
-    public void tightMarshal2(Object o, DataOutput ds, BooleanStream bs) throws IOException {
-        if (cacheEnabled) {
-            runMarshallCacheEvictionSweep();
-        }
-
-        if (o != null) {
-            DataStructure c = (DataStructure)o;
-            byte type = c.getDataStructureType();
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[type & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + type);
-            }
-            ds.writeByte(type);
-            bs.marshal(ds);
-            dsm.tightMarshal2(this, c, ds, bs);
-        }
-    }
-
-    /**
-     * Allows you to dynamically switch the version of the openwire protocol
-     * being used.
-     * 
-     * @param version
-     */
-    public void setVersion(int version) {
-        String mfName = "org.apache.activemq.openwire.v" + version + ".MarshallerFactory";
-        Class mfClass;
-        try {
-            mfClass = Class.forName(mfName, false, getClass().getClassLoader());
-        } catch (ClassNotFoundException e) {
-            throw (IllegalArgumentException)new IllegalArgumentException("Invalid version: " + version
-                                                                         + ", could not load " + mfName)
-                .initCause(e);
-        }
-        try {
-            Method method = mfClass.getMethod("createMarshallerMap", new Class[] {OpenWireFormat.class});
-            dataMarshallers = (DataStreamMarshaller[])method.invoke(null, new Object[] {this});
-        } catch (Throwable e) {
-            throw (IllegalArgumentException)new IllegalArgumentException(
-                                                                         "Invalid version: "
-                                                                             + version
-                                                                             + ", "
-                                                                             + mfName
-                                                                             + " does not properly implement the createMarshallerMap method.")
-                .initCause(e);
-        }
-        this.version = version;
-    }
-
-    public Object doUnmarshal(DataInput dis) throws IOException {
-        byte dataType = dis.readByte();
-        if (dataType != NULL_TYPE) {
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[dataType & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + dataType);
-            }
-            Object data = dsm.createObject();
-            if (this.tightEncodingEnabled) {
-                BooleanStream bs = new BooleanStream();
-                bs.unmarshal(dis);
-                dsm.tightUnmarshal(this, data, dis, bs);
-            } else {
-                dsm.looseUnmarshal(this, data, dis);
-            }
-            return data;
-        } else {
-            return null;
-        }
-    }
-
-    // public void debug(String msg) {
-    // String t = (Thread.currentThread().getName()+" ").substring(0, 40);
-    // System.out.println(t+": "+msg);
-    // }
-    public int tightMarshalNestedObject1(DataStructure o, BooleanStream bs) throws IOException {
-        bs.writeBoolean(o != null);
-        if (o == null) {
-            return 0;
-        }
-
-        if (o.isMarshallAware()) {
-            // MarshallAware ma = (MarshallAware)o;
-            ByteSequence sequence = null;
-            // sequence=ma.getCachedMarshalledForm(this);
-            bs.writeBoolean(sequence != null);
-            if (sequence != null) {
-                return 1 + sequence.getLength();
-            }
-        }
-
-        byte type = o.getDataStructureType();
-        DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[type & 0xFF];
-        if (dsm == null) {
-            throw new IOException("Unknown data type: " + type);
-        }
-        return 1 + dsm.tightMarshal1(this, o, bs);
-    }
-
-    public void tightMarshalNestedObject2(DataStructure o, DataOutput ds, BooleanStream bs)
-        throws IOException {
-        if (!bs.readBoolean()) {
-            return;
-        }
-
-        byte type = o.getDataStructureType();
-        ds.writeByte(type);
-
-        if (o.isMarshallAware() && bs.readBoolean()) {
-
-            // We should not be doing any caching
-            throw new IOException("Corrupted stream");
-            // MarshallAware ma = (MarshallAware) o;
-            // ByteSequence sequence=ma.getCachedMarshalledForm(this);
-            // ds.write(sequence.getData(), sequence.getOffset(),
-            // sequence.getLength());
-
-        } else {
-
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[type & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + type);
-            }
-            dsm.tightMarshal2(this, o, ds, bs);
-
-        }
-    }
-
-    public DataStructure tightUnmarshalNestedObject(DataInput dis, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-
-            byte dataType = dis.readByte();
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[dataType & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + dataType);
-            }
-            DataStructure data = dsm.createObject();
-
-            if (data.isMarshallAware() && bs.readBoolean()) {
-
-                dis.readInt();
-                dis.readByte();
-
-                BooleanStream bs2 = new BooleanStream();
-                bs2.unmarshal(dis);
-                dsm.tightUnmarshal(this, data, dis, bs2);
-
-                // TODO: extract the sequence from the dis and associate it.
-                // MarshallAware ma = (MarshallAware)data
-                // ma.setCachedMarshalledForm(this, sequence);
-
-            } else {
-                dsm.tightUnmarshal(this, data, dis, bs);
-            }
-
-            return data;
-        } else {
-            return null;
-        }
-    }
-
-    public DataStructure looseUnmarshalNestedObject(DataInput dis) throws IOException {
-        if (dis.readBoolean()) {
-
-            byte dataType = dis.readByte();
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[dataType & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + dataType);
-            }
-            DataStructure data = dsm.createObject();
-            dsm.looseUnmarshal(this, data, dis);
-            return data;
-
-        } else {
-            return null;
-        }
-    }
-
-    public void looseMarshalNestedObject(DataStructure o, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            byte type = o.getDataStructureType();
-            dataOut.writeByte(type);
-            DataStreamMarshaller dsm = (DataStreamMarshaller)dataMarshallers[type & 0xFF];
-            if (dsm == null) {
-                throw new IOException("Unknown data type: " + type);
-            }
-            dsm.looseMarshal(this, o, dataOut);
-        }
-    }
-
-    public void runMarshallCacheEvictionSweep() {
-        // Do we need to start evicting??
-        while (marshallCacheMap.size() > marshallCache.length - MARSHAL_CACHE_FREE_SPACE) {
-
-            marshallCacheMap.remove(marshallCache[nextMarshallCacheEvictionIndex]);
-            marshallCache[nextMarshallCacheEvictionIndex] = null;
-
-            nextMarshallCacheEvictionIndex++;
-            if (nextMarshallCacheEvictionIndex >= marshallCache.length) {
-                nextMarshallCacheEvictionIndex = 0;
-            }
-
-        }
-    }
-
-    public Short getMarshallCacheIndex(DataStructure o) {
-        return marshallCacheMap.get(o);
-    }
-
-    public Short addToMarshallCache(DataStructure o) {
-        short i = nextMarshallCacheIndex++;
-        if (nextMarshallCacheIndex >= marshallCache.length) {
-            nextMarshallCacheIndex = 0;
-        }
-
-        // We can only cache that item if there is space left.
-        if (marshallCacheMap.size() < marshallCache.length) {
-            marshallCache[i] = o;
-            Short index = new Short(i);
-            marshallCacheMap.put(o, index);
-            return index;
-        } else {
-            // Use -1 to indicate that the value was not cached due to cache
-            // being full.
-            return new Short((short)-1);
-        }
-    }
-
-    public void setInUnmarshallCache(short index, DataStructure o) {
-
-        // There was no space left in the cache, so we can't
-        // put this in the cache.
-        if (index == -1) {
-            return;
-        }
-
-        unmarshallCache[index] = o;
-    }
-
-    public DataStructure getFromUnmarshallCache(short index) {
-        return unmarshallCache[index];
-    }
-
-    public void setStackTraceEnabled(boolean b) {
-        stackTraceEnabled = b;
-    }
-
-    public boolean isStackTraceEnabled() {
-        return stackTraceEnabled;
-    }
-
-    public boolean isTcpNoDelayEnabled() {
-        return tcpNoDelayEnabled;
-    }
-
-    public void setTcpNoDelayEnabled(boolean tcpNoDelayEnabled) {
-        this.tcpNoDelayEnabled = tcpNoDelayEnabled;
-    }
-
-    public boolean isCacheEnabled() {
-        return cacheEnabled;
-    }
-
-    public void setCacheEnabled(boolean cacheEnabled) {
-        this.cacheEnabled = cacheEnabled;
-    }
-
-    public boolean isTightEncodingEnabled() {
-        return tightEncodingEnabled;
-    }
-
-    public void setTightEncodingEnabled(boolean tightEncodingEnabled) {
-        this.tightEncodingEnabled = tightEncodingEnabled;
-    }
-
-    public boolean isSizePrefixDisabled() {
-        return sizePrefixDisabled;
-    }
-
-    public void setSizePrefixDisabled(boolean prefixPacketSize) {
-        this.sizePrefixDisabled = prefixPacketSize;
-    }
-
-    public void setPreferedWireFormatInfo(WireFormatInfo info) {
-        this.preferedWireFormatInfo = info;
-    }
-
-    public WireFormatInfo getPreferedWireFormatInfo() {
-        return preferedWireFormatInfo;
-    }
-
-    public void renegotiateWireFormat(WireFormatInfo info) throws IOException {
-
-        if (preferedWireFormatInfo == null) {
-            throw new IllegalStateException("Wireformat cannot not be renegotiated.");
-        }
-
-        this.setVersion(min(preferedWireFormatInfo.getVersion(), info.getVersion()));
-        info.setVersion(this.getVersion());
-
-        this.stackTraceEnabled = info.isStackTraceEnabled() && preferedWireFormatInfo.isStackTraceEnabled();
-        info.setStackTraceEnabled(this.stackTraceEnabled);
-
-        this.tcpNoDelayEnabled = info.isTcpNoDelayEnabled() && preferedWireFormatInfo.isTcpNoDelayEnabled();
-        info.setTcpNoDelayEnabled(this.tcpNoDelayEnabled);
-
-        this.cacheEnabled = info.isCacheEnabled() && preferedWireFormatInfo.isCacheEnabled();
-        info.setCacheEnabled(this.cacheEnabled);
-
-        this.tightEncodingEnabled = info.isTightEncodingEnabled()
-                                    && preferedWireFormatInfo.isTightEncodingEnabled();
-        info.setTightEncodingEnabled(this.tightEncodingEnabled);
-
-        this.sizePrefixDisabled = info.isSizePrefixDisabled()
-                                  && preferedWireFormatInfo.isSizePrefixDisabled();
-        info.setSizePrefixDisabled(this.sizePrefixDisabled);
-
-        if (cacheEnabled) {
-
-            int size = Math.min(preferedWireFormatInfo.getCacheSize(), info.getCacheSize());
-            info.setCacheSize(size);
-
-            if (size == 0) {
-                size = MARSHAL_CACHE_SIZE;
-            }
-
-            marshallCache = new DataStructure[size];
-            unmarshallCache = new DataStructure[size];
-            nextMarshallCacheIndex = 0;
-            nextMarshallCacheEvictionIndex = 0;
-            marshallCacheMap = new HashMap<DataStructure, Short>();
-        } else {
-            marshallCache = null;
-            unmarshallCache = null;
-            nextMarshallCacheIndex = 0;
-            nextMarshallCacheEvictionIndex = 0;
-            marshallCacheMap = null;
-        }
-
-    }
-
-    protected int min(int version1, int version2) {
-        if (version1 < version2 && version1 > 0 || version2 <= 0) {
-            return version1;
-        }
-        return version2;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java
deleted file mode 100755
index 083c155..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire;
-
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.wireformat.WireFormatFactory;
-
-/**
- * 
- */
-public class OpenWireFormatFactory implements WireFormatFactory {
-
-    //
-    // The default values here are what the wire format changes to after a
-    // default negotiation.
-    //
-
-    private int version = CommandTypes.PROTOCOL_VERSION;
-    private boolean stackTraceEnabled = true;
-    private boolean tcpNoDelayEnabled = true;
-    private boolean cacheEnabled = true;
-    private boolean tightEncodingEnabled = true;
-    private boolean sizePrefixDisabled;
-    private long maxInactivityDuration = 30*1000;
-    private long maxInactivityDurationInitalDelay = 10*1000;
-    private int cacheSize = 1024;
-
-    public WireFormat createWireFormat() {
-        WireFormatInfo info = new WireFormatInfo();
-        info.setVersion(version);
-
-        try {
-            info.setStackTraceEnabled(stackTraceEnabled);
-            info.setCacheEnabled(cacheEnabled);
-            info.setTcpNoDelayEnabled(tcpNoDelayEnabled);
-            info.setTightEncodingEnabled(tightEncodingEnabled);
-            info.setSizePrefixDisabled(sizePrefixDisabled);
-            info.setMaxInactivityDuration(maxInactivityDuration);
-            info.setMaxInactivityDurationInitalDelay(maxInactivityDurationInitalDelay);
-            info.setCacheSize(cacheSize);
-        } catch (Exception e) {
-            IllegalStateException ise = new IllegalStateException("Could not configure WireFormatInfo");
-            ise.initCause(e);
-            throw ise;
-        }
-
-        OpenWireFormat f = new OpenWireFormat(version);
-        f.setPreferedWireFormatInfo(info);
-        return f;
-    }
-
-    public boolean isStackTraceEnabled() {
-        return stackTraceEnabled;
-    }
-
-    public void setStackTraceEnabled(boolean stackTraceEnabled) {
-        this.stackTraceEnabled = stackTraceEnabled;
-    }
-
-    public boolean isTcpNoDelayEnabled() {
-        return tcpNoDelayEnabled;
-    }
-
-    public void setTcpNoDelayEnabled(boolean tcpNoDelayEnabled) {
-        this.tcpNoDelayEnabled = tcpNoDelayEnabled;
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    public boolean isCacheEnabled() {
-        return cacheEnabled;
-    }
-
-    public void setCacheEnabled(boolean cacheEnabled) {
-        this.cacheEnabled = cacheEnabled;
-    }
-
-    public boolean isTightEncodingEnabled() {
-        return tightEncodingEnabled;
-    }
-
-    public void setTightEncodingEnabled(boolean tightEncodingEnabled) {
-        this.tightEncodingEnabled = tightEncodingEnabled;
-    }
-
-    public boolean isSizePrefixDisabled() {
-        return sizePrefixDisabled;
-    }
-
-    public void setSizePrefixDisabled(boolean sizePrefixDisabled) {
-        this.sizePrefixDisabled = sizePrefixDisabled;
-    }
-
-    public long getMaxInactivityDuration() {
-        return maxInactivityDuration;
-    }
-
-    public void setMaxInactivityDuration(long maxInactivityDuration) {
-        this.maxInactivityDuration = maxInactivityDuration;
-    }
-
-    public int getCacheSize() {
-        return cacheSize;
-    }
-
-    public void setCacheSize(int cacheSize) {
-        this.cacheSize = cacheSize;
-    }
-
-    public long getMaxInactivityDurationInitalDelay() {
-        return maxInactivityDurationInitalDelay;
-    }
-
-    public void setMaxInactivityDurationInitalDelay(
-            long maxInactivityDurationInitalDelay) {
-        this.maxInactivityDurationInitalDelay = maxInactivityDurationInitalDelay;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java
deleted file mode 100755
index 9182a40..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBytesMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java
deleted file mode 100755
index 96c0c34..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getPhysicalName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        tightMarshalString2(info.getPhysicalName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getPhysicalName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java
deleted file mode 100755
index bc64ba0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMapMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java
deleted file mode 100755
index 62c0639..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMessageMarshaller extends MessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java
deleted file mode 100755
index 741f3fe..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQObjectMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java
deleted file mode 100755
index ddb761b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java
deleted file mode 100755
index c789e16..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQStreamMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java
deleted file mode 100755
index bf7f3ec..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java
deleted file mode 100755
index b67d513..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java
deleted file mode 100755
index ee79f8f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java
deleted file mode 100755
index bbcb722..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTextMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTextMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java
deleted file mode 100755
index b1a7a83..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java
deleted file mode 100755
index 2035351..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BaseCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isResponseRequired());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        dataOut.writeBoolean(info.isResponseRequired());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
deleted file mode 100755
index 0b07a3b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-
-public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
-
-    public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
-
-    static {
-        Constructor constructor = null;
-        try {
-            constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
-                                                                              String.class, int.class});
-        } catch (Throwable e) {
-        }
-        STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
-    }
-
-    public abstract byte getDataStructureType();
-
-    public abstract DataStructure createObject();
-
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-        return 0;
-    }
-
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-    }
-
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-    }
-
-    public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
-        if (o == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(false);
-            return 0;
-        } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(true);
-            return 2;
-        } else if ((o & 0xFFFFFFFF00000000L) == 0) {
-            bs.writeBoolean(true);
-            bs.writeBoolean(false);
-            return 4;
-        } else {
-            bs.writeBoolean(true);
-            bs.writeBoolean(true);
-            return 8;
-        }
-    }
-
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                dataOut.writeLong(o);
-            } else {
-                dataOut.writeInt((int)o);
-            }
-        } else {
-            if (bs.readBoolean()) {
-                dataOut.writeShort((int)o);
-            }
-        }
-    }
-
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                return dataIn.readLong();
-            } else {
-                return toLong(dataIn.readInt());
-            }
-        } else {
-            if (bs.readBoolean()) {
-                return toLong(dataIn.readShort());
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    protected long toLong(short value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffL;
-    }
-
-    protected long toLong(int value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffffffL;
-    }
-
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-    }
-
-    protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        return wireFormat.tightMarshalNestedObject1(o, bs);
-    }
-
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-    }
-
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (bs.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-        }
-    }
-
-    protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            bs.writeBoolean(index == null);
-            if (index == null) {
-                int rc = wireFormat.tightMarshalNestedObject1(o, bs);
-                wireFormat.addToMarshallCache(o);
-                return 2 + rc;
-            } else {
-                return 2;
-            }
-        } else {
-            return wireFormat.tightMarshalNestedObject1(o, bs);
-        }
-    }
-
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            if (bs.readBoolean()) {
-                dataOut.writeShort(index.shortValue());
-                wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-        }
-    }
-
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            String clazz = tightUnmarshalString(dataIn, bs);
-            String message = tightUnmarshalString(dataIn, bs);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           new Integer(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    private Throwable createThrowable(String className, String message) {
-        try {
-            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
-            Constructor constructor = clazz.getConstructor(new Class[] {String.class});
-            return (Throwable)constructor.newInstance(new Object[] {message});
-        } catch (Throwable e) {
-            return new Throwable(className + ": " + message);
-        }
-    }
-
-    protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
-        throws IOException {
-        if (o == null) {
-            bs.writeBoolean(false);
-            return 0;
-        } else {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += tightMarshalString1(o.getClass().getName(), bs);
-            rc += tightMarshalString1(o.getMessage(), bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                rc += 2;
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    rc += tightMarshalString1(element.getClassName(), bs);
-                    rc += tightMarshalString1(element.getMethodName(), bs);
-                    rc += tightMarshalString1(element.getFileName(), bs);
-                    rc += 4;
-                }
-                rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
-            }
-            return rc;
-        }
-    }
-
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
-                                          BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            tightMarshalString2(o.getClass().getName(), dataOut, bs);
-            tightMarshalString2(o.getMessage(), dataOut, bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    tightMarshalString2(element.getClassName(), dataOut, bs);
-                    tightMarshalString2(element.getMethodName(), dataOut, bs);
-                    tightMarshalString2(element.getFileName(), dataOut, bs);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
-            }
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                int size = dataIn.readShort();
-                byte data[] = new byte[size];
-                dataIn.readFully(data);
-                // Yes deprecated, but we know what we are doing.
-                // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0);
-            } else {
-                return dataIn.readUTF();
-            }
-        } else {
-            return null;
-        }
-    }
-
-    protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
-        bs.writeBoolean(value != null);
-        if (value != null) {
-
-            int strlen = value.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            boolean isOnlyAscii = true;
-
-            value.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                    isOnlyAscii = false;
-                } else {
-                    isOnlyAscii = false;
-                    utflen += 2;
-                }
-            }
-
-            if (utflen >= Short.MAX_VALUE) {
-                throw new IOException("Encountered a String value that is too long to encode.");
-            }
-            bs.writeBoolean(isOnlyAscii);
-            return utflen + 2;
-
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            // If we verified it only holds ascii values
-            if (bs.readBoolean()) {
-                dataOut.writeShort(value.length());
-                dataOut.writeBytes(value);
-            } else {
-                dataOut.writeUTF(value);
-            }
-        }
-    }
-
-    protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           BooleanStream bs) throws IOException {
-        if (objects != null) {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += 2;
-            for (int i = 0; i < objects.length; i++) {
-                rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
-            }
-            return rc;
-        } else {
-            bs.writeBoolean(false);
-            return 0;
-        }
-    }
-
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
-                                            DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
-            }
-        }
-    }
-
-    protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
-        return i;
-    }
-
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
-        throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
-        throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.length + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
-        byte rc[] = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.getLength() + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-
-    //
-    // The loose marshaling logic
-    //
-
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-    }
-
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-    }
-
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(o);
-    }
-
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        return wireFormat.looseUnmarshalNestedObject(dataIn);
-    }
-
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        wireFormat.looseMarshalNestedObject(o, dataOut);
-    }
-
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (dataIn.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.looseUnmarshalNestedObject(dataIn);
-        }
-    }
-
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            dataOut.writeBoolean(index == null);
-            if (index == null) {
-                index = wireFormat.addToMarshallCache(o);
-                dataOut.writeShort(index.shortValue());
-                wireFormat.looseMarshalNestedObject(o, dataOut);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.looseMarshalNestedObject(o, dataOut);
-        }
-    }
-
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (dataIn.readBoolean()) {
-            String clazz = looseUnmarshalString(dataIn);
-            String message = looseUnmarshalString(dataIn);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           new Integer(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            looseMarshalString(o.getClass().getName(), dataOut);
-            looseMarshalString(o.getMessage(), dataOut);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    looseMarshalString(element.getClassName(), dataOut);
-                    looseMarshalString(element.getMethodName(), dataOut);
-                    looseMarshalString(element.getFileName(), dataOut);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
-            }
-        }
-    }
-
-    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
-        if (dataIn.readBoolean()) {
-            return dataIn.readUTF();
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(value != null);
-        if (value != null) {
-            dataOut.writeUTF(value);
-        }
-    }
-
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(objects != null);
-        if (objects != null) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                looseMarshalNestedObject(wireFormat, objects[i], dataOut);
-            }
-        }
-    }
-
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
-                                              int i) throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
-        byte rc[] = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java
deleted file mode 100755
index 2fc0921..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerId info = (BrokerId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java
deleted file mode 100755
index 4e44276..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for BrokerInfoMarshaller NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class BrokerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setBrokerURL(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerInfo)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
-            }
-            info.setPeerBrokerInfos(value);
-        } else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-        info.setSlaveBroker(bs.readBoolean());
-        info.setMasterBroker(bs.readBoolean());
-        info.setFaultTolerantConfiguration(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs);
-        rc += tightMarshalString1(info.getBrokerURL(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-        bs.writeBoolean(info.isSlaveBroker());
-        bs.writeBoolean(info.isMasterBroker());
-        bs.writeBoolean(info.isFaultTolerantConfiguration());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerURL(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrokerURL(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerInfo)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setPeerBrokerInfos(value);
-        } else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(looseUnmarshalString(dataIn));
-        info.setSlaveBroker(dataIn.readBoolean());
-        info.setMasterBroker(dataIn.readBoolean());
-        info.setFaultTolerantConfiguration(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut);
-        looseMarshalString(info.getBrokerURL(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-        dataOut.writeBoolean(info.isSlaveBroker());
-        dataOut.writeBoolean(info.isMasterBroker());
-        dataOut.writeBoolean(info.isFaultTolerantConfiguration());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java
deleted file mode 100644
index a3d17d1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(bs.readBoolean());
-        info.setExit(bs.readBoolean());
-        info.setFaultTolerant(bs.readBoolean());
-        info.setResume(bs.readBoolean());
-        info.setSuspend(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        bs.writeBoolean(info.isExit());
-        bs.writeBoolean(info.isFaultTolerant());
-        bs.writeBoolean(info.isResume());
-        bs.writeBoolean(info.isSuspend());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setExit(dataIn.readBoolean());
-        info.setFaultTolerant(dataIn.readBoolean());
-        info.setResume(dataIn.readBoolean());
-        info.setSuspend(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        dataOut.writeBoolean(info.isExit());
-        dataOut.writeBoolean(info.isFaultTolerant());
-        dataOut.writeBoolean(info.isResume());
-        dataOut.writeBoolean(info.isSuspend());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java
deleted file mode 100644
index f3cb36c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionErrorMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionError.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionError();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java
deleted file mode 100755
index cfbdb19..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java
deleted file mode 100755
index b070c9d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConnectionInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setPassword(tightUnmarshalString(dataIn, bs));
-        info.setUserName(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(bs.readBoolean());
-        info.setManageable(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalString1(info.getPassword(), bs);
-        rc += tightMarshalString1(info.getUserName(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isBrokerMasterConnector());
-        bs.writeBoolean(info.isManageable());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalString2(info.getPassword(), dataOut, bs);
-        tightMarshalString2(info.getUserName(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setPassword(looseUnmarshalString(dataIn));
-        info.setUserName(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(dataIn.readBoolean());
-        info.setManageable(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalString(info.getPassword(), dataOut);
-        looseMarshalString(info.getUserName(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isBrokerMasterConnector());
-        dataOut.writeBoolean(info.isManageable());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java
deleted file mode 100644
index 519b71c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(bs.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setPrefetch(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        bs.readBoolean();
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetch());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setPrefetch(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeInt(info.getPrefetch());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java
deleted file mode 100755
index d88bb95..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConsumerIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
deleted file mode 100755
index 805100e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConsumerInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn, bs));
-        info.setBrowser(bs.readBoolean());
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(bs.readBoolean());
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setNoLocal(bs.readBoolean());
-        info.setExclusive(bs.readBoolean());
-        info.setRetroactive(bs.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info
-            .setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression)tightUnmarsalNestedObject(
-                                                                                                            wireFormat,
-                                                                                                            dataIn,
-                                                                                                            bs));
-        info.setNetworkSubscription(bs.readBoolean());
-        info.setOptimizedAcknowledge(bs.readBoolean());
-        info.setNoRangeAcks(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isBrowser());
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        bs.writeBoolean(info.isNoLocal());
-        bs.writeBoolean(info.isExclusive());
-        bs.writeBoolean(info.isRetroactive());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs);
-        bs.writeBoolean(info.isNetworkSubscription());
-        bs.writeBoolean(info.isOptimizedAcknowledge());
-        bs.writeBoolean(info.isNoRangeAcks());
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        bs.readBoolean();
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        dataOut.writeByte(info.getPriority());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn));
-        info.setBrowser(dataIn.readBoolean());
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setNoLocal(dataIn.readBoolean());
-        info.setExclusive(dataIn.readBoolean());
-        info.setRetroactive(dataIn.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info
-            .setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression)looseUnmarsalNestedObject(
-                                                                                                            wireFormat,
-                                                                                                            dataIn));
-        info.setNetworkSubscription(dataIn.readBoolean());
-        info.setOptimizedAcknowledge(dataIn.readBoolean());
-        info.setNoRangeAcks(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isBrowser());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        dataOut.writeBoolean(info.isDispatchAsync());
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        dataOut.writeBoolean(info.isNoLocal());
-        dataOut.writeBoolean(info.isExclusive());
-        dataOut.writeBoolean(info.isRetroactive());
-        dataOut.writeByte(info.getPriority());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut);
-        dataOut.writeBoolean(info.isNetworkSubscription());
-        dataOut.writeBoolean(info.isOptimizedAcknowledge());
-        dataOut.writeBoolean(info.isNoRangeAcks());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java
deleted file mode 100644
index ba985b9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ControlCommand;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ControlCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ControlCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ControlCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getCommand(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        tightMarshalString2(info.getCommand(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getCommand(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java
deleted file mode 100755
index d7c9523..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for DataArrayResponseMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DataArrayResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataArrayResponse.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataArrayResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.DataStructure)tightUnmarsalNestedObject(wireFormat,
-                                                                                                dataIn, bs);
-            }
-            info.setData(value);
-        } else {
-            info.setData(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-        tightMarshalObjectArray2(wireFormat, info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.DataStructure)looseUnmarsalNestedObject(wireFormat,
-                                                                                                dataIn);
-            }
-            info.setData(value);
-        } else {
-            info.setData(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalObjectArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java
deleted file mode 100755
index d750fd8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataResponse;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataResponse info = (DataResponse)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java
deleted file mode 100644
index f559200..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-/**
- * Marshalling code for Open Wire Format for DataStructureSupportMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class DataStructureSupportMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java
deleted file mode 100755
index 10e41ed..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for DestinationInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DestinationInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DestinationInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DestinationInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn, bs));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeByte(info.getOperationType());
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeByte(info.getOperationType());
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java
deleted file mode 100644
index 0526723..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DiscoveryEventMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DiscoveryEvent.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DiscoveryEvent();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(tightUnmarshalString(dataIn, bs));
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getServiceName(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        tightMarshalString2(info.getServiceName(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(looseUnmarshalString(dataIn));
-        info.setBrokerName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getServiceName(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java
deleted file mode 100755
index ce769fc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ExceptionResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ExceptionResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ExceptionResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java
deleted file mode 100644
index b037c16..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.FlushCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for FlushCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return FlushCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new FlushCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java
deleted file mode 100755
index 69f6415..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.IntegerResponse;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for IntegerResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return IntegerResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new IntegerResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        dataOut.writeInt(info.getResult());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getResult());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java
deleted file mode 100755
index eec69af..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalQueueAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalQueueAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalQueueAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java
deleted file mode 100755
index 917791d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for JournalTopicAckMarshaller NOTE!:
- * This file is auto generated - do not modify! if you need to make a change,
- * please see the modify the groovy scripts in the under src/gram/script and
- * then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTopicAck.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTopicAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSubscritionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
-        rc += tightMarshalString1(info.getSubscritionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
-        tightMarshalString2(info.getSubscritionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSubscritionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
-        looseMarshalString(info.getSubscritionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java
deleted file mode 100755
index 8781113..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTraceMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTrace.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTrace();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getMessage(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        tightMarshalString2(info.getMessage(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getMessage(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java
deleted file mode 100755
index 28a792c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTransactionMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTransaction.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTransaction();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        bs.writeBoolean(info.getWasPrepared());
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-        dataOut.writeBoolean(info.getWasPrepared());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java
deleted file mode 100755
index 3d3e22a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for KeepAliveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return KeepAliveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new KeepAliveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LastPartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LastPartialCommandMarshaller.java
deleted file mode 100644
index ca6f31f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LastPartialCommandMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.LastPartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LastPartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandMarshaller extends PartialCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LastPartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LastPartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java
deleted file mode 100755
index 11ad3d8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for LocalTransactionIdMarshaller NOTE!:
- * This file is auto generated - do not modify! if you need to make a change,
- * please see the modify the groovy scripts in the under src/gram/script and
- * then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class LocalTransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LocalTransactionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LocalTransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java
deleted file mode 100755
index 3a84a46..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * MarshallerFactory for Open Wire Format. NOTE!: This file is auto generated -
- * do not modify! if you need to make a change, please see the modify the groovy
- * scripts in the under src/gram/script and then use maven openwire:generate to
- * regenerate this file.
- * 
- * 
- */
-public final class MarshallerFactory {
-
-    /**
-     * Creates a Map of command type -> Marshallers
-     */
-    private static final DataStreamMarshaller MARSHALLER[] = new DataStreamMarshaller[256];
-    static {
-
-        add(new LocalTransactionIdMarshaller());
-        add(new PartialCommandMarshaller());
-        add(new IntegerResponseMarshaller());
-        add(new ActiveMQQueueMarshaller());
-        add(new ActiveMQObjectMessageMarshaller());
-        add(new ConnectionIdMarshaller());
-        add(new ConnectionInfoMarshaller());
-        add(new ProducerInfoMarshaller());
-        add(new MessageDispatchNotificationMarshaller());
-        add(new SessionInfoMarshaller());
-        add(new TransactionInfoMarshaller());
-        add(new ActiveMQStreamMessageMarshaller());
-        add(new MessageAckMarshaller());
-        add(new ProducerIdMarshaller());
-        add(new MessageIdMarshaller());
-        add(new ActiveMQTempQueueMarshaller());
-        add(new RemoveSubscriptionInfoMarshaller());
-        add(new SessionIdMarshaller());
-        add(new DataArrayResponseMarshaller());
-        add(new JournalQueueAckMarshaller());
-        add(new ResponseMarshaller());
-        add(new ConnectionErrorMarshaller());
-        add(new ConsumerInfoMarshaller());
-        add(new XATransactionIdMarshaller());
-        add(new JournalTraceMarshaller());
-        add(new ConsumerIdMarshaller());
-        add(new ActiveMQTextMessageMarshaller());
-        add(new SubscriptionInfoMarshaller());
-        add(new JournalTransactionMarshaller());
-        add(new ControlCommandMarshaller());
-        add(new LastPartialCommandMarshaller());
-        add(new NetworkBridgeFilterMarshaller());
-        add(new ActiveMQBytesMessageMarshaller());
-        add(new WireFormatInfoMarshaller());
-        add(new ActiveMQTempTopicMarshaller());
-        add(new DiscoveryEventMarshaller());
-        add(new ReplayCommandMarshaller());
-        add(new ActiveMQTopicMarshaller());
-        add(new BrokerInfoMarshaller());
-        add(new DestinationInfoMarshaller());
-        add(new ShutdownInfoMarshaller());
-        add(new DataResponseMarshaller());
-        add(new ConnectionControlMarshaller());
-        add(new KeepAliveInfoMarshaller());
-        add(new FlushCommandMarshaller());
-        add(new ConsumerControlMarshaller());
-        add(new JournalTopicAckMarshaller());
-        add(new BrokerIdMarshaller());
-        add(new MessageDispatchMarshaller());
-        add(new ActiveMQMapMessageMarshaller());
-        add(new ActiveMQMessageMarshaller());
-        add(new RemoveInfoMarshaller());
-        add(new ExceptionResponseMarshaller());
-
-    }
-
-    private MarshallerFactory() {        
-    }
-
-    private static void add(DataStreamMarshaller dsm) {
-        MARSHALLER[dsm.getDataStructureType()] = dsm;
-    }
-
-    public static DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
-        return MARSHALLER;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java
deleted file mode 100755
index 3eb0d50..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs);
-
-        return rc + 5;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageAck info = (MessageAck)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeByte(info.getAckType());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeByte(info.getAckType());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java
deleted file mode 100755
index 6b20633..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatch.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatch();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessage((org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessage((org.apache.activemq.command.Message) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationMarshaller.java
deleted file mode 100644
index 678b135..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for
- * MessageDispatchNotificationMarshaller NOTE!: This file is auto generated - do
- * not modify! if you need to make a change, please see the modify the groovy
- * scripts in the under src/gram/script and then use maven openwire:generate to
- * regenerate this file.
- * 
- * 
- */
-public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatchNotification.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatchNotification();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageIdMarshaller.java
deleted file mode 100755
index aaf2f54..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageIdMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessageIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessageIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn, bs));
-        info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageId info = (MessageId)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn));
-        info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageMarshaller.java
deleted file mode 100755
index dd41daf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageMarshaller.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessageMarshaller NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class MessageMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setGroupID(tightUnmarshalString(dataIn, bs));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setPersistent(bs.readBoolean());
-        info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setType(tightUnmarshalString(dataIn, bs));
-        info.setContent(tightUnmarshalByteSequence(dataIn, bs));
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-        info.setDataStructure((org.apache.activemq.command.DataStructure)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setCompressed(bs.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setUserID(tightUnmarshalString(dataIn, bs));
-        info.setRecievedByDFBridge(bs.readBoolean());
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs);
-        rc += tightMarshalString1(info.getGroupID(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        bs.writeBoolean(info.isPersistent());
-        rc += tightMarshalLong1(wireFormat, info.getExpiration(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
-        rc += tightMarshalString1(info.getType(), bs);
-        rc += tightMarshalByteSequence1(info.getContent(), bs);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs);
-        bs.writeBoolean(info.isCompressed());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getArrival(), bs);
-        rc += tightMarshalString1(info.getUserID(), bs);
-        bs.writeBoolean(info.isRecievedByDFBridge());
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Message info = (Message)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs);
-        tightMarshalString2(info.getGroupID(), dataOut, bs);
-        dataOut.writeInt(info.getGroupSequence());
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
-        dataOut.writeByte(info.getPriority());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
-        tightMarshalString2(info.getType(), dataOut, bs);
-        tightMarshalByteSequence2(info.getContent(), dataOut, bs);
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getRedeliveryCounter());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
-        tightMarshalString2(info.getUserID(), dataOut, bs);
-        bs.readBoolean();
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setGroupID(looseUnmarshalString(dataIn));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setPersistent(dataIn.readBoolean());
-        info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
-        info.setType(looseUnmarshalString(dataIn));
-        info.setContent(looseUnmarshalByteSequence(dataIn));
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-        info.setDataStructure((org.apache.activemq.command.DataStructure)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setCompressed(dataIn.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
-        info.setUserID(looseUnmarshalString(dataIn));
-        info.setRecievedByDFBridge(dataIn.readBoolean());
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut);
-        looseMarshalString(info.getGroupID(), dataOut);
-        dataOut.writeInt(info.getGroupSequence());
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        dataOut.writeBoolean(info.isPersistent());
-        looseMarshalLong(wireFormat, info.getExpiration(), dataOut);
-        dataOut.writeByte(info.getPriority());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimestamp(), dataOut);
-        looseMarshalString(info.getType(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getContent(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isCompressed());
-        dataOut.writeInt(info.getRedeliveryCounter());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalLong(wireFormat, info.getArrival(), dataOut);
-        looseMarshalString(info.getUserID(), dataOut);
-        dataOut.writeBoolean(info.isRecievedByDFBridge());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterMarshaller.java
deleted file mode 100644
index 0b06329..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for NetworkBridgeFilterMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return NetworkBridgeFilter.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new NetworkBridgeFilter();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        dataOut.writeInt(info.getNetworkTTL());
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getNetworkTTL());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/PartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/PartialCommandMarshaller.java
deleted file mode 100644
index 9ead0ed..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/PartialCommandMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for PartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return PartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new PartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getData(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        tightMarshalByteArray2(info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        looseMarshalByteArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerIdMarshaller.java
deleted file mode 100755
index 6f2c19a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ProducerIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerId info = (ProducerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerInfoMarshaller.java
deleted file mode 100755
index 79898ad..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ProducerInfoMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ProducerInfoMarshaller NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveInfoMarshaller.java
deleted file mode 100755
index 3894a1a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveInfoMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoMarshaller.java
deleted file mode 100755
index 35875b3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveSubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ReplayCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ReplayCommandMarshaller.java
deleted file mode 100644
index dd0e445..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ReplayCommandMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ReplayCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ReplayCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ReplayCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ReplayCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 8;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ResponseMarshaller.java
deleted file mode 100755
index 1060884..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return Response.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new Response();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Response info = (Response)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Response info = (Response)o;
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Response info = (Response)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java
deleted file mode 100755
index f0c1623..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for SessionIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class SessionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionId info = (SessionId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionInfoMarshaller.java
deleted file mode 100755
index b93c1cd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionInfoMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ShutdownInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ShutdownInfoMarshaller.java
deleted file mode 100755
index 1ed3523..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ShutdownInfoMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ShutdownInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ShutdownInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ShutdownInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SubscriptionInfoMarshaller.java
deleted file mode 100755
index b7ad34b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionIdMarshaller.java
deleted file mode 100755
index f4e2ba1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionIdMarshaller.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionInfoMarshaller.java
deleted file mode 100755
index b01cfbb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/TransactionInfoMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return TransactionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new TransactionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/WireFormatInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/WireFormatInfoMarshaller.java
deleted file mode 100755
index fa93999..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/WireFormatInfoMarshaller.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for WireFormatInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return WireFormatInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new WireFormatInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-        tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8);
-        dataOut.writeInt(info.getVersion());
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
-        dataOut.writeInt(info.getVersion());
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/XATransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/XATransactionIdMarshaller.java
deleted file mode 100755
index 7ac532c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/XATransactionIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for XATransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return XATransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new XATransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
-        info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs);
-        rc += tightMarshalByteArray1(info.getBranchQualifier(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        dataOut.writeInt(info.getFormatId());
-        tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs);
-        tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
-        info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFormatId());
-        looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut);
-        looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageMarshaller.java
deleted file mode 100644
index fbc42d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBytesMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQDestinationMarshaller.java
deleted file mode 100644
index c50e626..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQDestinationMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getPhysicalName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        tightMarshalString2(info.getPhysicalName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getPhysicalName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageMarshaller.java
deleted file mode 100644
index 3b5d084..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMapMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMessageMarshaller.java
deleted file mode 100644
index 1bf323f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMessageMarshaller extends MessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageMarshaller.java
deleted file mode 100644
index c8aa5b8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQObjectMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQQueueMarshaller.java
deleted file mode 100644
index 560e282..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQQueueMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageMarshaller.java
deleted file mode 100644
index 9d5ec91..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQStreamMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationMarshaller.java
deleted file mode 100644
index 81b2ce3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationMarshaller.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueMarshaller.java
deleted file mode 100644
index 4383c8b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicMarshaller.java
deleted file mode 100644
index 77f9d51..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageMarshaller.java
deleted file mode 100644
index ed91f04..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTextMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTextMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTopicMarshaller.java
deleted file mode 100644
index cf485b9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ActiveMQTopicMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseCommandMarshaller.java
deleted file mode 100644
index 3043503..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseCommandMarshaller.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BaseCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isResponseRequired());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        dataOut.writeBoolean(info.isResponseRequired());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
deleted file mode 100755
index b05a991..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-
-public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
-
-    public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
-
-    static {
-        Constructor constructor = null;
-        try {
-            constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
-                                                                              String.class, int.class});
-        } catch (Throwable e) {
-        }
-        STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
-    }
-
-    public abstract byte getDataStructureType();
-
-    public abstract DataStructure createObject();
-
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-        return 0;
-    }
-
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-    }
-
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-    }
-
-    public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
-        if (o == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(false);
-            return 0;
-        } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(true);
-            return 2;
-        } else if ((o & 0xFFFFFFFF00000000L) == 0) {
-            bs.writeBoolean(true);
-            bs.writeBoolean(false);
-            return 4;
-        } else {
-            bs.writeBoolean(true);
-            bs.writeBoolean(true);
-            return 8;
-        }
-    }
-
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                dataOut.writeLong(o);
-            } else {
-                dataOut.writeInt((int)o);
-            }
-        } else {
-            if (bs.readBoolean()) {
-                dataOut.writeShort((int)o);
-            }
-        }
-    }
-
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                return dataIn.readLong();
-            } else {
-                return toLong(dataIn.readInt());
-            }
-        } else {
-            if (bs.readBoolean()) {
-                return toLong(dataIn.readShort());
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    protected long toLong(short value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffL;
-    }
-
-    protected long toLong(int value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffffffL;
-    }
-
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-    }
-
-    protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        return wireFormat.tightMarshalNestedObject1(o, bs);
-    }
-
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-    }
-
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (bs.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-        }
-    }
-
-    protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            bs.writeBoolean(index == null);
-            if (index == null) {
-                int rc = wireFormat.tightMarshalNestedObject1(o, bs);
-                wireFormat.addToMarshallCache(o);
-                return 2 + rc;
-            } else {
-                return 2;
-            }
-        } else {
-            return wireFormat.tightMarshalNestedObject1(o, bs);
-        }
-    }
-
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            if (bs.readBoolean()) {
-                dataOut.writeShort(index.shortValue());
-                wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-        }
-    }
-
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            String clazz = tightUnmarshalString(dataIn, bs);
-            String message = tightUnmarshalString(dataIn, bs);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    private Throwable createThrowable(String className, String message) {
-        try {
-            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
-            Constructor constructor = clazz.getConstructor(new Class[] {String.class});
-            return (Throwable)constructor.newInstance(new Object[] {message});
-        } catch (Throwable e) {
-            return new Throwable(className + ": " + message);
-        }
-    }
-
-    protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
-        throws IOException {
-        if (o == null) {
-            bs.writeBoolean(false);
-            return 0;
-        } else {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += tightMarshalString1(o.getClass().getName(), bs);
-            rc += tightMarshalString1(o.getMessage(), bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                rc += 2;
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    rc += tightMarshalString1(element.getClassName(), bs);
-                    rc += tightMarshalString1(element.getMethodName(), bs);
-                    rc += tightMarshalString1(element.getFileName(), bs);
-                    rc += 4;
-                }
-                rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
-            }
-            return rc;
-        }
-    }
-
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
-                                          BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            tightMarshalString2(o.getClass().getName(), dataOut, bs);
-            tightMarshalString2(o.getMessage(), dataOut, bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    tightMarshalString2(element.getClassName(), dataOut, bs);
-                    tightMarshalString2(element.getMethodName(), dataOut, bs);
-                    tightMarshalString2(element.getFileName(), dataOut, bs);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
-            }
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                int size = dataIn.readShort();
-                byte data[] = new byte[size];
-                dataIn.readFully(data);
-                // Yes deprecated, but we know what we are doing.
-                // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0);
-            } else {
-                return dataIn.readUTF();
-            }
-        } else {
-            return null;
-        }
-    }
-
-    protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
-        bs.writeBoolean(value != null);
-        if (value != null) {
-
-            int strlen = value.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            boolean isOnlyAscii = true;
-
-            value.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                    isOnlyAscii = false;
-                } else {
-                    isOnlyAscii = false;
-                    utflen += 2;
-                }
-            }
-
-            if (utflen >= Short.MAX_VALUE) {
-                throw new IOException("Encountered a String value that is too long to encode.");
-            }
-            bs.writeBoolean(isOnlyAscii);
-            return utflen + 2;
-
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            // If we verified it only holds ascii values
-            if (bs.readBoolean()) {
-                dataOut.writeShort(value.length());
-                dataOut.writeBytes(value);
-            } else {
-                dataOut.writeUTF(value);
-            }
-        }
-    }
-
-    protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           BooleanStream bs) throws IOException {
-        if (objects != null) {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += 2;
-            for (int i = 0; i < objects.length; i++) {
-                rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
-            }
-            return rc;
-        } else {
-            bs.writeBoolean(false);
-            return 0;
-        }
-    }
-
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
-                                            DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
-            }
-        }
-    }
-
-    protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
-        return i;
-    }
-
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
-        throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
-        throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.length + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
-        byte rc[] = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.getLength() + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-
-    //
-    // The loose marshaling logic
-    //
-
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-    }
-
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-    }
-
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(o);
-    }
-
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        return wireFormat.looseUnmarshalNestedObject(dataIn);
-    }
-
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        wireFormat.looseMarshalNestedObject(o, dataOut);
-    }
-
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (dataIn.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.looseUnmarshalNestedObject(dataIn);
-        }
-    }
-
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            dataOut.writeBoolean(index == null);
-            if (index == null) {
-                index = wireFormat.addToMarshallCache(o);
-                dataOut.writeShort(index.shortValue());
-                wireFormat.looseMarshalNestedObject(o, dataOut);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.looseMarshalNestedObject(o, dataOut);
-        }
-    }
-
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (dataIn.readBoolean()) {
-            String clazz = looseUnmarshalString(dataIn);
-            String message = looseUnmarshalString(dataIn);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            looseMarshalString(o.getClass().getName(), dataOut);
-            looseMarshalString(o.getMessage(), dataOut);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    looseMarshalString(element.getClassName(), dataOut);
-                    looseMarshalString(element.getMethodName(), dataOut);
-                    looseMarshalString(element.getFileName(), dataOut);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
-            }
-        }
-    }
-
-    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
-        if (dataIn.readBoolean()) {
-            return dataIn.readUTF();
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(value != null);
-        if (value != null) {
-            dataOut.writeUTF(value);
-        }
-    }
-
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(objects != null);
-        if (objects != null) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                looseMarshalNestedObject(wireFormat, objects[i], dataOut);
-            }
-        }
-    }
-
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
-                                              int i) throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
-        byte rc[] = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerIdMarshaller.java
deleted file mode 100644
index 2301203..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerIdMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerId info = (BrokerId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerInfoMarshaller.java
deleted file mode 100644
index 81d202d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BrokerInfoMarshaller.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for BrokerInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class BrokerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId)tightUnmarsalCachedObject(wireFormat, dataIn,
-                                                                                         bs));
-        info.setBrokerURL(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerInfo)tightUnmarsalNestedObject(wireFormat,
-                                                                                             dataIn, bs);
-            }
-            info.setPeerBrokerInfos(value);
-        } else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-        info.setSlaveBroker(bs.readBoolean());
-        info.setMasterBroker(bs.readBoolean());
-        info.setFaultTolerantConfiguration(bs.readBoolean());
-        info.setDuplexConnection(bs.readBoolean());
-        info.setNetworkConnection(bs.readBoolean());
-        info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs);
-        rc += tightMarshalString1(info.getBrokerURL(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-        bs.writeBoolean(info.isSlaveBroker());
-        bs.writeBoolean(info.isMasterBroker());
-        bs.writeBoolean(info.isFaultTolerantConfiguration());
-        bs.writeBoolean(info.isDuplexConnection());
-        bs.writeBoolean(info.isNetworkConnection());
-        rc += tightMarshalLong1(wireFormat, info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerURL(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrokerURL(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerInfo)looseUnmarsalNestedObject(wireFormat,
-                                                                                             dataIn);
-            }
-            info.setPeerBrokerInfos(value);
-        } else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(looseUnmarshalString(dataIn));
-        info.setSlaveBroker(dataIn.readBoolean());
-        info.setMasterBroker(dataIn.readBoolean());
-        info.setFaultTolerantConfiguration(dataIn.readBoolean());
-        info.setDuplexConnection(dataIn.readBoolean());
-        info.setNetworkConnection(dataIn.readBoolean());
-        info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut);
-        looseMarshalString(info.getBrokerURL(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-        dataOut.writeBoolean(info.isSlaveBroker());
-        dataOut.writeBoolean(info.isMasterBroker());
-        dataOut.writeBoolean(info.isFaultTolerantConfiguration());
-        dataOut.writeBoolean(info.isDuplexConnection());
-        dataOut.writeBoolean(info.isNetworkConnection());
-        looseMarshalLong(wireFormat, info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionControlMarshaller.java
deleted file mode 100644
index 26e9866..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionControlMarshaller.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(bs.readBoolean());
-        info.setExit(bs.readBoolean());
-        info.setFaultTolerant(bs.readBoolean());
-        info.setResume(bs.readBoolean());
-        info.setSuspend(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        bs.writeBoolean(info.isExit());
-        bs.writeBoolean(info.isFaultTolerant());
-        bs.writeBoolean(info.isResume());
-        bs.writeBoolean(info.isSuspend());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setExit(dataIn.readBoolean());
-        info.setFaultTolerant(dataIn.readBoolean());
-        info.setResume(dataIn.readBoolean());
-        info.setSuspend(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        dataOut.writeBoolean(info.isExit());
-        dataOut.writeBoolean(info.isFaultTolerant());
-        dataOut.writeBoolean(info.isResume());
-        dataOut.writeBoolean(info.isSuspend());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionErrorMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionErrorMarshaller.java
deleted file mode 100644
index 06ee1b7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionErrorMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionErrorMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionError.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionError();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionIdMarshaller.java
deleted file mode 100644
index f00c1f8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionIdMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionInfoMarshaller.java
deleted file mode 100644
index 5a70f20..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConnectionInfoMarshaller.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConnectionInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setPassword(tightUnmarshalString(dataIn, bs));
-        info.setUserName(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(bs.readBoolean());
-        info.setManageable(bs.readBoolean());
-        info.setClientMaster(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalString1(info.getPassword(), bs);
-        rc += tightMarshalString1(info.getUserName(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isBrokerMasterConnector());
-        bs.writeBoolean(info.isManageable());
-        bs.writeBoolean(info.isClientMaster());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalString2(info.getPassword(), dataOut, bs);
-        tightMarshalString2(info.getUserName(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setPassword(looseUnmarshalString(dataIn));
-        info.setUserName(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(dataIn.readBoolean());
-        info.setManageable(dataIn.readBoolean());
-        info.setClientMaster(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalString(info.getPassword(), dataOut);
-        looseMarshalString(info.getUserName(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isBrokerMasterConnector());
-        dataOut.writeBoolean(info.isManageable());
-        dataOut.writeBoolean(info.isClientMaster());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerControlMarshaller.java
deleted file mode 100644
index 9c0d604..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerControlMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(bs.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(bs.readBoolean());
-        info.setStart(bs.readBoolean());
-        info.setStop(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isFlush());
-        bs.writeBoolean(info.isStart());
-        bs.writeBoolean(info.isStop());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        bs.readBoolean();
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetch());
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(dataIn.readBoolean());
-        info.setStart(dataIn.readBoolean());
-        info.setStop(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeInt(info.getPrefetch());
-        dataOut.writeBoolean(info.isFlush());
-        dataOut.writeBoolean(info.isStart());
-        dataOut.writeBoolean(info.isStop());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerIdMarshaller.java
deleted file mode 100644
index f1e913b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConsumerIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerInfoMarshaller.java
deleted file mode 100644
index ab204e0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ConsumerInfoMarshaller.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConsumerInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn, bs));
-        info.setBrowser(bs.readBoolean());
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(bs.readBoolean());
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setNoLocal(bs.readBoolean());
-        info.setExclusive(bs.readBoolean());
-        info.setRetroactive(bs.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info
-            .setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression)tightUnmarsalNestedObject(
-                                                                                                            wireFormat,
-                                                                                                            dataIn,
-                                                                                                            bs));
-        info.setNetworkSubscription(bs.readBoolean());
-        info.setOptimizedAcknowledge(bs.readBoolean());
-        info.setNoRangeAcks(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isBrowser());
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        bs.writeBoolean(info.isNoLocal());
-        bs.writeBoolean(info.isExclusive());
-        bs.writeBoolean(info.isRetroactive());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs);
-        bs.writeBoolean(info.isNetworkSubscription());
-        bs.writeBoolean(info.isOptimizedAcknowledge());
-        bs.writeBoolean(info.isNoRangeAcks());
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        bs.readBoolean();
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        dataOut.writeByte(info.getPriority());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn));
-        info.setBrowser(dataIn.readBoolean());
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setNoLocal(dataIn.readBoolean());
-        info.setExclusive(dataIn.readBoolean());
-        info.setRetroactive(dataIn.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info
-            .setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression)looseUnmarsalNestedObject(
-                                                                                                            wireFormat,
-                                                                                                            dataIn));
-        info.setNetworkSubscription(dataIn.readBoolean());
-        info.setOptimizedAcknowledge(dataIn.readBoolean());
-        info.setNoRangeAcks(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isBrowser());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        dataOut.writeBoolean(info.isDispatchAsync());
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        dataOut.writeBoolean(info.isNoLocal());
-        dataOut.writeBoolean(info.isExclusive());
-        dataOut.writeBoolean(info.isRetroactive());
-        dataOut.writeByte(info.getPriority());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut);
-        dataOut.writeBoolean(info.isNetworkSubscription());
-        dataOut.writeBoolean(info.isOptimizedAcknowledge());
-        dataOut.writeBoolean(info.isNoRangeAcks());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ControlCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ControlCommandMarshaller.java
deleted file mode 100644
index b628a26..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ControlCommandMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ControlCommand;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ControlCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ControlCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ControlCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getCommand(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        tightMarshalString2(info.getCommand(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getCommand(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataArrayResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataArrayResponseMarshaller.java
deleted file mode 100644
index 74ac928..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataArrayResponseMarshaller.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for DataArrayResponseMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DataArrayResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataArrayResponse.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataArrayResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.DataStructure)tightUnmarsalNestedObject(wireFormat,
-                                                                                                dataIn, bs);
-            }
-            info.setData(value);
-        } else {
-            info.setData(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-        tightMarshalObjectArray2(wireFormat, info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.DataStructure)looseUnmarsalNestedObject(wireFormat,
-                                                                                                dataIn);
-            }
-            info.setData(value);
-        } else {
-            info.setData(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalObjectArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataResponseMarshaller.java
deleted file mode 100644
index 1f26dc5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DataResponseMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataResponse;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataResponse info = (DataResponse)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DestinationInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DestinationInfoMarshaller.java
deleted file mode 100644
index 731d131..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DestinationInfoMarshaller.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for DestinationInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DestinationInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DestinationInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DestinationInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn, bs));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeByte(info.getOperationType());
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeByte(info.getOperationType());
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DiscoveryEventMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DiscoveryEventMarshaller.java
deleted file mode 100644
index 142d6c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/DiscoveryEventMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DiscoveryEventMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DiscoveryEvent.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DiscoveryEvent();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(tightUnmarshalString(dataIn, bs));
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getServiceName(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        tightMarshalString2(info.getServiceName(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(looseUnmarshalString(dataIn));
-        info.setBrokerName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getServiceName(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ExceptionResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ExceptionResponseMarshaller.java
deleted file mode 100644
index f2fc478..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ExceptionResponseMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ExceptionResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ExceptionResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ExceptionResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/FlushCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/FlushCommandMarshaller.java
deleted file mode 100644
index 47a7843..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/FlushCommandMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.FlushCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for FlushCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return FlushCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new FlushCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/IntegerResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/IntegerResponseMarshaller.java
deleted file mode 100644
index e49a146..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/IntegerResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.IntegerResponse;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for IntegerResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return IntegerResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new IntegerResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        dataOut.writeInt(info.getResult());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getResult());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalQueueAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalQueueAckMarshaller.java
deleted file mode 100644
index a6e3603..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalQueueAckMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalQueueAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalQueueAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalQueueAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTopicAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTopicAckMarshaller.java
deleted file mode 100644
index 9ff859f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTopicAckMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for JournalTopicAckMarshaller NOTE!:
- * This file is auto generated - do not modify! if you need to make a change,
- * please see the modify the groovy scripts in the under src/gram/script and
- * then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTopicAck.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTopicAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSubscritionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
-        rc += tightMarshalString1(info.getSubscritionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
-        tightMarshalString2(info.getSubscritionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSubscritionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
-        looseMarshalString(info.getSubscritionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTraceMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTraceMarshaller.java
deleted file mode 100644
index 72bf8c1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTraceMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTraceMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTrace.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTrace();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getMessage(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        tightMarshalString2(info.getMessage(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getMessage(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTransactionMarshaller.java
deleted file mode 100644
index 19065c2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/JournalTransactionMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTransactionMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTransaction.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTransaction();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        bs.writeBoolean(info.getWasPrepared());
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-        dataOut.writeBoolean(info.getWasPrepared());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/KeepAliveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/KeepAliveInfoMarshaller.java
deleted file mode 100644
index 0bf1e42..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/KeepAliveInfoMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for KeepAliveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return KeepAliveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new KeepAliveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LastPartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LastPartialCommandMarshaller.java
deleted file mode 100644
index 1d98240..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LastPartialCommandMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.LastPartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LastPartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandMarshaller extends PartialCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LastPartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LastPartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LocalTransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LocalTransactionIdMarshaller.java
deleted file mode 100644
index 6cfec06..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/LocalTransactionIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for LocalTransactionIdMarshaller NOTE!:
- * This file is auto generated - do not modify! if you need to make a change,
- * please see the modify the groovy scripts in the under src/gram/script and
- * then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class LocalTransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LocalTransactionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LocalTransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MarshallerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MarshallerFactory.java
deleted file mode 100644
index b3592d3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MarshallerFactory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * MarshallerFactory for Open Wire Format.
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public final class MarshallerFactory {
-
-    /**
-     * Creates a Map of command type -> Marshallers
-     */
-    private static final DataStreamMarshaller MARSHALLER[] = new DataStreamMarshaller[256];
-    static {
-
-        add(new ActiveMQBytesMessageMarshaller());
-        add(new ActiveMQMapMessageMarshaller());
-        add(new ActiveMQMessageMarshaller());
-        add(new ActiveMQObjectMessageMarshaller());
-        add(new ActiveMQQueueMarshaller());
-        add(new ActiveMQStreamMessageMarshaller());
-        add(new ActiveMQTempQueueMarshaller());
-        add(new ActiveMQTempTopicMarshaller());
-        add(new ActiveMQTextMessageMarshaller());
-        add(new ActiveMQTopicMarshaller());
-        add(new BrokerIdMarshaller());
-        add(new BrokerInfoMarshaller());
-        add(new ConnectionControlMarshaller());
-        add(new ConnectionErrorMarshaller());
-        add(new ConnectionIdMarshaller());
-        add(new ConnectionInfoMarshaller());
-        add(new ConsumerControlMarshaller());
-        add(new ConsumerIdMarshaller());
-        add(new ConsumerInfoMarshaller());
-        add(new ControlCommandMarshaller());
-        add(new DataArrayResponseMarshaller());
-        add(new DataResponseMarshaller());
-        add(new DestinationInfoMarshaller());
-        add(new DiscoveryEventMarshaller());
-        add(new ExceptionResponseMarshaller());
-        add(new FlushCommandMarshaller());
-        add(new IntegerResponseMarshaller());
-        add(new JournalQueueAckMarshaller());
-        add(new JournalTopicAckMarshaller());
-        add(new JournalTraceMarshaller());
-        add(new JournalTransactionMarshaller());
-        add(new KeepAliveInfoMarshaller());
-        add(new LastPartialCommandMarshaller());
-        add(new LocalTransactionIdMarshaller());
-        add(new MessageAckMarshaller());
-        add(new MessageDispatchMarshaller());
-        add(new MessageDispatchNotificationMarshaller());
-        add(new MessageIdMarshaller());
-        add(new MessagePullMarshaller());
-        add(new NetworkBridgeFilterMarshaller());
-        add(new PartialCommandMarshaller());
-        add(new ProducerIdMarshaller());
-        add(new ProducerInfoMarshaller());
-        add(new RemoveInfoMarshaller());
-        add(new RemoveSubscriptionInfoMarshaller());
-        add(new ReplayCommandMarshaller());
-        add(new ResponseMarshaller());
-        add(new SessionIdMarshaller());
-        add(new SessionInfoMarshaller());
-        add(new ShutdownInfoMarshaller());
-        add(new SubscriptionInfoMarshaller());
-        add(new TransactionInfoMarshaller());
-        add(new WireFormatInfoMarshaller());
-        add(new XATransactionIdMarshaller());
-
-    }
-
-    private MarshallerFactory() {        
-    }
-
-    private static void add(DataStreamMarshaller dsm) {
-        MARSHALLER[dsm.getDataStructureType()] = dsm;
-    }
-    
-    public static DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
-        return MARSHALLER;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageAckMarshaller.java
deleted file mode 100644
index 60a3812..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageAckMarshaller.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs);
-
-        return rc + 5;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageAck info = (MessageAck)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeByte(info.getAckType());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeByte(info.getAckType());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchMarshaller.java
deleted file mode 100644
index 357ba3e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchMarshaller.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatch.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatch();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessage((org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessage((org.apache.activemq.command.Message) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationMarshaller.java
deleted file mode 100644
index 25d1ac0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for
- * MessageDispatchNotificationMarshaller NOTE!: This file is auto generated - do
- * not modify! if you need to make a change, please see the modify the groovy
- * scripts in the under src/gram/script and then use maven openwire:generate to
- * regenerate this file.
- * 
- * 
- */
-public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatchNotification.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatchNotification();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageIdMarshaller.java
deleted file mode 100644
index bc5d885..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageIdMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessageIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessageIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn, bs));
-        info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageId info = (MessageId)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn));
-        info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
deleted file mode 100644
index 7ef69bf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessageMarshaller NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class MessageMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setGroupID(tightUnmarshalString(dataIn, bs));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setPersistent(bs.readBoolean());
-        info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setType(tightUnmarshalString(dataIn, bs));
-        info.setContent(tightUnmarshalByteSequence(dataIn, bs));
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-        info.setDataStructure((org.apache.activemq.command.DataStructure)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setCompressed(bs.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setUserID(tightUnmarshalString(dataIn, bs));
-        info.setRecievedByDFBridge(bs.readBoolean());
-        info.setDroppable(bs.readBoolean());
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs);
-        rc += tightMarshalString1(info.getGroupID(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        bs.writeBoolean(info.isPersistent());
-        rc += tightMarshalLong1(wireFormat, info.getExpiration(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
-        rc += tightMarshalString1(info.getType(), bs);
-        rc += tightMarshalByteSequence1(info.getContent(), bs);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs);
-        bs.writeBoolean(info.isCompressed());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getArrival(), bs);
-        rc += tightMarshalString1(info.getUserID(), bs);
-        bs.writeBoolean(info.isRecievedByDFBridge());
-        bs.writeBoolean(info.isDroppable());
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Message info = (Message)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs);
-        tightMarshalString2(info.getGroupID(), dataOut, bs);
-        dataOut.writeInt(info.getGroupSequence());
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
-        dataOut.writeByte(info.getPriority());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
-        tightMarshalString2(info.getType(), dataOut, bs);
-        tightMarshalByteSequence2(info.getContent(), dataOut, bs);
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getRedeliveryCounter());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
-        tightMarshalString2(info.getUserID(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setGroupID(looseUnmarshalString(dataIn));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setPersistent(dataIn.readBoolean());
-        info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
-        info.setType(looseUnmarshalString(dataIn));
-        info.setContent(looseUnmarshalByteSequence(dataIn));
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-        info.setDataStructure((org.apache.activemq.command.DataStructure)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setCompressed(dataIn.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
-        info.setUserID(looseUnmarshalString(dataIn));
-        info.setRecievedByDFBridge(dataIn.readBoolean());
-        info.setDroppable(dataIn.readBoolean());
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut);
-        looseMarshalString(info.getGroupID(), dataOut);
-        dataOut.writeInt(info.getGroupSequence());
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        dataOut.writeBoolean(info.isPersistent());
-        looseMarshalLong(wireFormat, info.getExpiration(), dataOut);
-        dataOut.writeByte(info.getPriority());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimestamp(), dataOut);
-        looseMarshalString(info.getType(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getContent(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isCompressed());
-        dataOut.writeInt(info.getRedeliveryCounter());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalLong(wireFormat, info.getArrival(), dataOut);
-        looseMarshalString(info.getUserID(), dataOut);
-        dataOut.writeBoolean(info.isRecievedByDFBridge());
-        dataOut.writeBoolean(info.isDroppable());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessagePullMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessagePullMarshaller.java
deleted file mode 100644
index 5874671..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessagePullMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessagePullMarshaller NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessagePullMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessagePull.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessagePull();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessagePull info = (MessagePull)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterMarshaller.java
deleted file mode 100644
index f00a11b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for NetworkBridgeFilterMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return NetworkBridgeFilter.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new NetworkBridgeFilter();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        dataOut.writeInt(info.getNetworkTTL());
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getNetworkTTL());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/PartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/PartialCommandMarshaller.java
deleted file mode 100644
index caf762a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/PartialCommandMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for PartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return PartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new PartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getData(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        tightMarshalByteArray2(info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        looseMarshalByteArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerIdMarshaller.java
deleted file mode 100644
index 3cb1060..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ProducerIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerId info = (ProducerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerInfoMarshaller.java
deleted file mode 100644
index 3a7670b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ProducerInfoMarshaller.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ProducerInfoMarshaller NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isDispatchAsync());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveInfoMarshaller.java
deleted file mode 100644
index 64c66bc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveInfoMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoMarshaller.java
deleted file mode 100644
index a05d89d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveSubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ReplayCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ReplayCommandMarshaller.java
deleted file mode 100644
index f7b4791..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ReplayCommandMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ReplayCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ReplayCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ReplayCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ReplayCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 8;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ResponseMarshaller.java
deleted file mode 100644
index b908b14..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return Response.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new Response();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Response info = (Response)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Response info = (Response)o;
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Response info = (Response)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionIdMarshaller.java
deleted file mode 100644
index af90d2b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionIdMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for SessionIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class SessionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionId info = (SessionId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionInfoMarshaller.java
deleted file mode 100644
index 88612a2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SessionInfoMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ShutdownInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ShutdownInfoMarshaller.java
deleted file mode 100644
index 9fb3c82..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/ShutdownInfoMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ShutdownInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ShutdownInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ShutdownInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SubscriptionInfoMarshaller.java
deleted file mode 100644
index 9c5aa03..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/SubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionIdMarshaller.java
deleted file mode 100644
index 3249b6d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionIdMarshaller.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionInfoMarshaller.java
deleted file mode 100644
index bbf6ddf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/TransactionInfoMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return TransactionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new TransactionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/WireFormatInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/WireFormatInfoMarshaller.java
deleted file mode 100644
index 4bde989..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/WireFormatInfoMarshaller.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for WireFormatInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return WireFormatInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new WireFormatInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-        tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8);
-        dataOut.writeInt(info.getVersion());
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
-        dataOut.writeInt(info.getVersion());
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/XATransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/XATransactionIdMarshaller.java
deleted file mode 100644
index 0cbb3d6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/XATransactionIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for XATransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return XATransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new XATransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
-        info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs);
-        rc += tightMarshalByteArray1(info.getBranchQualifier(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        dataOut.writeInt(info.getFormatId());
-        tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs);
-        tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
-        info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFormatId());
-        looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut);
-        looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java
deleted file mode 100644
index d7ce8ab..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBlobMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBlobMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBlobMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBlobMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(tightUnmarshalString(dataIn, bs));
-        info.setMimeType(tightUnmarshalString(dataIn, bs));
-        info.setDeletedByBroker(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getRemoteBlobUrl(), bs);
-        rc += tightMarshalString1(info.getMimeType(), bs);
-        bs.writeBoolean(info.isDeletedByBroker());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        tightMarshalString2(info.getRemoteBlobUrl(), dataOut, bs);
-        tightMarshalString2(info.getMimeType(), dataOut, bs);
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(looseUnmarshalString(dataIn));
-        info.setMimeType(looseUnmarshalString(dataIn));
-        info.setDeletedByBroker(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getRemoteBlobUrl(), dataOut);
-        looseMarshalString(info.getMimeType(), dataOut);
-        dataOut.writeBoolean(info.isDeletedByBroker());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java
deleted file mode 100644
index 96fdd35..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBytesMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java
deleted file mode 100644
index 4cf66e6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getPhysicalName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        tightMarshalString2(info.getPhysicalName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getPhysicalName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java
deleted file mode 100644
index 36a7a07..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMapMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java
deleted file mode 100644
index 1d96695..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMessageMarshaller extends MessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java
deleted file mode 100644
index 2c8aab9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQObjectMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java
deleted file mode 100644
index 6b0e2da..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java
deleted file mode 100644
index 8494698..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQStreamMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java
deleted file mode 100644
index c77de82..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java
deleted file mode 100644
index 3fc5558..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java
deleted file mode 100644
index 5c9355e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java
deleted file mode 100644
index f211485..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTextMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTextMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java
deleted file mode 100644
index 81a1993..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java
deleted file mode 100644
index 930e2c2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BaseCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isResponseRequired());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        dataOut.writeBoolean(info.isResponseRequired());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
deleted file mode 100644
index 872f8ea..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-
-public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
-
-    public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
-
-    static {
-        Constructor constructor = null;
-        try {
-            constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
-                                                                              String.class, int.class});
-        } catch (Throwable e) {
-        }
-        STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
-    }
-
-    public abstract byte getDataStructureType();
-
-    public abstract DataStructure createObject();
-
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-        return 0;
-    }
-
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-    }
-
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-    }
-
-    public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
-        if (o == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(false);
-            return 0;
-        } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(true);
-            return 2;
-        } else if ((o & 0xFFFFFFFF00000000L) == 0) {
-            bs.writeBoolean(true);
-            bs.writeBoolean(false);
-            return 4;
-        } else {
-            bs.writeBoolean(true);
-            bs.writeBoolean(true);
-            return 8;
-        }
-    }
-
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                dataOut.writeLong(o);
-            } else {
-                dataOut.writeInt((int)o);
-            }
-        } else {
-            if (bs.readBoolean()) {
-                dataOut.writeShort((int)o);
-            }
-        }
-    }
-
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                return dataIn.readLong();
-            } else {
-                return toLong(dataIn.readInt());
-            }
-        } else {
-            if (bs.readBoolean()) {
-                return toLong(dataIn.readShort());
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    protected long toLong(short value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffL;
-    }
-
-    protected long toLong(int value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffffffL;
-    }
-
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-    }
-
-    protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        return wireFormat.tightMarshalNestedObject1(o, bs);
-    }
-
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-    }
-
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (bs.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-        }
-    }
-
-    protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            bs.writeBoolean(index == null);
-            if (index == null) {
-                int rc = wireFormat.tightMarshalNestedObject1(o, bs);
-                wireFormat.addToMarshallCache(o);
-                return 2 + rc;
-            } else {
-                return 2;
-            }
-        } else {
-            return wireFormat.tightMarshalNestedObject1(o, bs);
-        }
-    }
-
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            if (bs.readBoolean()) {
-                dataOut.writeShort(index.shortValue());
-                wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-        }
-    }
-
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            String clazz = tightUnmarshalString(dataIn, bs);
-            String message = tightUnmarshalString(dataIn, bs);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    private Throwable createThrowable(String className, String message) {
-        try {
-            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
-            Constructor constructor = clazz.getConstructor(new Class[] {String.class});
-            return (Throwable)constructor.newInstance(new Object[] {message});
-        } catch (Throwable e) {
-            return new Throwable(className + ": " + message);
-        }
-    }
-
-    protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
-        throws IOException {
-        if (o == null) {
-            bs.writeBoolean(false);
-            return 0;
-        } else {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += tightMarshalString1(o.getClass().getName(), bs);
-            rc += tightMarshalString1(o.getMessage(), bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                rc += 2;
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    rc += tightMarshalString1(element.getClassName(), bs);
-                    rc += tightMarshalString1(element.getMethodName(), bs);
-                    rc += tightMarshalString1(element.getFileName(), bs);
-                    rc += 4;
-                }
-                rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
-            }
-            return rc;
-        }
-    }
-
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
-                                          BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            tightMarshalString2(o.getClass().getName(), dataOut, bs);
-            tightMarshalString2(o.getMessage(), dataOut, bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    tightMarshalString2(element.getClassName(), dataOut, bs);
-                    tightMarshalString2(element.getMethodName(), dataOut, bs);
-                    tightMarshalString2(element.getFileName(), dataOut, bs);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
-            }
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                int size = dataIn.readShort();
-                byte data[] = new byte[size];
-                dataIn.readFully(data);
-                // Yes deprecated, but we know what we are doing.
-                // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0);
-            } else {
-                return dataIn.readUTF();
-            }
-        } else {
-            return null;
-        }
-    }
-
-    protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
-        bs.writeBoolean(value != null);
-        if (value != null) {
-
-            int strlen = value.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            boolean isOnlyAscii = true;
-
-            value.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                    isOnlyAscii = false;
-                } else {
-                    isOnlyAscii = false;
-                    utflen += 2;
-                }
-            }
-
-            if (utflen >= Short.MAX_VALUE) {
-                throw new IOException("Encountered a String value that is too long to encode.");
-            }
-            bs.writeBoolean(isOnlyAscii);
-            return utflen + 2;
-
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            // If we verified it only holds ascii values
-            if (bs.readBoolean()) {
-                dataOut.writeShort(value.length());
-                dataOut.writeBytes(value);
-            } else {
-                dataOut.writeUTF(value);
-            }
-        }
-    }
-
-    protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           BooleanStream bs) throws IOException {
-        if (objects != null) {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += 2;
-            for (int i = 0; i < objects.length; i++) {
-                rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
-            }
-            return rc;
-        } else {
-            bs.writeBoolean(false);
-            return 0;
-        }
-    }
-
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
-                                            DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
-            }
-        }
-    }
-
-    protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
-        return i;
-    }
-
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
-        throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
-        throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.length + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
-        byte rc[] = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.getLength() + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-
-    //
-    // The loose marshaling logic
-    //
-
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-    }
-
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-    }
-
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(o);
-    }
-
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        return wireFormat.looseUnmarshalNestedObject(dataIn);
-    }
-
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        wireFormat.looseMarshalNestedObject(o, dataOut);
-    }
-
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (dataIn.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.looseUnmarshalNestedObject(dataIn);
-        }
-    }
-
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            dataOut.writeBoolean(index == null);
-            if (index == null) {
-                index = wireFormat.addToMarshallCache(o);
-                dataOut.writeShort(index.shortValue());
-                wireFormat.looseMarshalNestedObject(o, dataOut);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.looseMarshalNestedObject(o, dataOut);
-        }
-    }
-
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (dataIn.readBoolean()) {
-            String clazz = looseUnmarshalString(dataIn);
-            String message = looseUnmarshalString(dataIn);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            looseMarshalString(o.getClass().getName(), dataOut);
-            looseMarshalString(o.getMessage(), dataOut);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    looseMarshalString(element.getClassName(), dataOut);
-                    looseMarshalString(element.getMethodName(), dataOut);
-                    looseMarshalString(element.getFileName(), dataOut);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
-            }
-        }
-    }
-
-    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
-        if (dataIn.readBoolean()) {
-            return dataIn.readUTF();
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(value != null);
-        if (value != null) {
-            dataOut.writeUTF(value);
-        }
-    }
-
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(objects != null);
-        if (objects != null) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                looseMarshalNestedObject(wireFormat, objects[i], dataOut);
-            }
-        }
-    }
-
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
-                                              int i) throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
-        byte rc[] = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java
deleted file mode 100644
index 10b7294..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerId info = (BrokerId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java
deleted file mode 100644
index 3d066fb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for BrokerInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class BrokerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId)tightUnmarsalCachedObject(wireFormat, dataIn,
-                                                                                         bs));
-        info.setBrokerURL(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerInfo)tightUnmarsalNestedObject(wireFormat,
-                                                                                             dataIn, bs);
-            }
-            info.setPeerBrokerInfos(value);
-        } else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-        info.setSlaveBroker(bs.readBoolean());
-        info.setMasterBroker(bs.readBoolean());
-        info.setFaultTolerantConfiguration(bs.readBoolean());
-        info.setDuplexConnection(bs.readBoolean());
-        info.setNetworkConnection(bs.readBoolean());
-        info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerUploadUrl(tightUnmarshalString(dataIn, bs));
-        info.setNetworkProperties(tightUnmarshalString(dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs);
-        rc += tightMarshalString1(info.getBrokerURL(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-        bs.writeBoolean(info.isSlaveBroker());
-        bs.writeBoolean(info.isMasterBroker());
-        bs.writeBoolean(info.isFaultTolerantConfiguration());
-        bs.writeBoolean(info.isDuplexConnection());
-        bs.writeBoolean(info.isNetworkConnection());
-        rc += tightMarshalLong1(wireFormat, info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getBrokerUploadUrl(), bs);
-        rc += tightMarshalString1(info.getNetworkProperties(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerURL(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerUploadUrl(), dataOut, bs);
-        tightMarshalString2(info.getNetworkProperties(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrokerURL(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerInfo)looseUnmarsalNestedObject(wireFormat,
-                                                                                             dataIn);
-            }
-            info.setPeerBrokerInfos(value);
-        } else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(looseUnmarshalString(dataIn));
-        info.setSlaveBroker(dataIn.readBoolean());
-        info.setMasterBroker(dataIn.readBoolean());
-        info.setFaultTolerantConfiguration(dataIn.readBoolean());
-        info.setDuplexConnection(dataIn.readBoolean());
-        info.setNetworkConnection(dataIn.readBoolean());
-        info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerUploadUrl(looseUnmarshalString(dataIn));
-        info.setNetworkProperties(looseUnmarshalString(dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut);
-        looseMarshalString(info.getBrokerURL(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-        dataOut.writeBoolean(info.isSlaveBroker());
-        dataOut.writeBoolean(info.isMasterBroker());
-        dataOut.writeBoolean(info.isFaultTolerantConfiguration());
-        dataOut.writeBoolean(info.isDuplexConnection());
-        dataOut.writeBoolean(info.isNetworkConnection());
-        looseMarshalLong(wireFormat, info.getConnectionId(), dataOut);
-        looseMarshalString(info.getBrokerUploadUrl(), dataOut);
-        looseMarshalString(info.getNetworkProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java
deleted file mode 100644
index dbdd9ab..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(bs.readBoolean());
-        info.setExit(bs.readBoolean());
-        info.setFaultTolerant(bs.readBoolean());
-        info.setResume(bs.readBoolean());
-        info.setSuspend(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        bs.writeBoolean(info.isExit());
-        bs.writeBoolean(info.isFaultTolerant());
-        bs.writeBoolean(info.isResume());
-        bs.writeBoolean(info.isSuspend());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setExit(dataIn.readBoolean());
-        info.setFaultTolerant(dataIn.readBoolean());
-        info.setResume(dataIn.readBoolean());
-        info.setSuspend(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        dataOut.writeBoolean(info.isExit());
-        dataOut.writeBoolean(info.isFaultTolerant());
-        dataOut.writeBoolean(info.isResume());
-        dataOut.writeBoolean(info.isSuspend());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java
deleted file mode 100644
index 579e6aa..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionErrorMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionError.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionError();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java
deleted file mode 100644
index 38be90a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java
deleted file mode 100644
index df6838a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConnectionInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setPassword(tightUnmarshalString(dataIn, bs));
-        info.setUserName(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(bs.readBoolean());
-        info.setManageable(bs.readBoolean());
-        info.setClientMaster(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalString1(info.getPassword(), bs);
-        rc += tightMarshalString1(info.getUserName(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isBrokerMasterConnector());
-        bs.writeBoolean(info.isManageable());
-        bs.writeBoolean(info.isClientMaster());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalString2(info.getPassword(), dataOut, bs);
-        tightMarshalString2(info.getUserName(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setPassword(looseUnmarshalString(dataIn));
-        info.setUserName(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(dataIn.readBoolean());
-        info.setManageable(dataIn.readBoolean());
-        info.setClientMaster(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalString(info.getPassword(), dataOut);
-        looseMarshalString(info.getUserName(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isBrokerMasterConnector());
-        dataOut.writeBoolean(info.isManageable());
-        dataOut.writeBoolean(info.isClientMaster());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java
deleted file mode 100644
index f1eafab..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(bs.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(bs.readBoolean());
-        info.setStart(bs.readBoolean());
-        info.setStop(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isFlush());
-        bs.writeBoolean(info.isStart());
-        bs.writeBoolean(info.isStop());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        bs.readBoolean();
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetch());
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(dataIn.readBoolean());
-        info.setStart(dataIn.readBoolean());
-        info.setStop(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeInt(info.getPrefetch());
-        dataOut.writeBoolean(info.isFlush());
-        dataOut.writeBoolean(info.isStart());
-        dataOut.writeBoolean(info.isStop());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java
deleted file mode 100644
index 52a0012..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConsumerIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java
deleted file mode 100644
index 7c8521d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ConsumerInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn, bs));
-        info.setBrowser(bs.readBoolean());
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(bs.readBoolean());
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setNoLocal(bs.readBoolean());
-        info.setExclusive(bs.readBoolean());
-        info.setRetroactive(bs.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info
-            .setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression)tightUnmarsalNestedObject(
-                                                                                                            wireFormat,
-                                                                                                            dataIn,
-                                                                                                            bs));
-        info.setNetworkSubscription(bs.readBoolean());
-        info.setOptimizedAcknowledge(bs.readBoolean());
-        info.setNoRangeAcks(bs.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isBrowser());
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        bs.writeBoolean(info.isNoLocal());
-        bs.writeBoolean(info.isExclusive());
-        bs.writeBoolean(info.isRetroactive());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs);
-        bs.writeBoolean(info.isNetworkSubscription());
-        bs.writeBoolean(info.isOptimizedAcknowledge());
-        bs.writeBoolean(info.isNoRangeAcks());
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        bs.readBoolean();
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        dataOut.writeByte(info.getPriority());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn));
-        info.setBrowser(dataIn.readBoolean());
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setNoLocal(dataIn.readBoolean());
-        info.setExclusive(dataIn.readBoolean());
-        info.setRetroactive(dataIn.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info
-            .setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression)looseUnmarsalNestedObject(
-                                                                                                            wireFormat,
-                                                                                                            dataIn));
-        info.setNetworkSubscription(dataIn.readBoolean());
-        info.setOptimizedAcknowledge(dataIn.readBoolean());
-        info.setNoRangeAcks(dataIn.readBoolean());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isBrowser());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        dataOut.writeBoolean(info.isDispatchAsync());
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        dataOut.writeBoolean(info.isNoLocal());
-        dataOut.writeBoolean(info.isExclusive());
-        dataOut.writeBoolean(info.isRetroactive());
-        dataOut.writeByte(info.getPriority());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut);
-        dataOut.writeBoolean(info.isNetworkSubscription());
-        dataOut.writeBoolean(info.isOptimizedAcknowledge());
-        dataOut.writeBoolean(info.isNoRangeAcks());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java
deleted file mode 100644
index 27ce583..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.ControlCommand;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ControlCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ControlCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ControlCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getCommand(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        tightMarshalString2(info.getCommand(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getCommand(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java
deleted file mode 100644
index 3a36501..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for DataArrayResponseMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DataArrayResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataArrayResponse.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataArrayResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.DataStructure)tightUnmarsalNestedObject(wireFormat,
-                                                                                                dataIn, bs);
-            }
-            info.setData(value);
-        } else {
-            info.setData(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-        tightMarshalObjectArray2(wireFormat, info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.DataStructure)looseUnmarsalNestedObject(wireFormat,
-                                                                                                dataIn);
-            }
-            info.setData(value);
-        } else {
-            info.setData(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalObjectArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java
deleted file mode 100644
index 0cbebc7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataResponse;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataResponse info = (DataResponse)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java
deleted file mode 100644
index 92cdc58..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for DestinationInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DestinationInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DestinationInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DestinationInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn, bs));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeByte(info.getOperationType());
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat,
-                                                                                                 dataIn));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeByte(info.getOperationType());
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java
deleted file mode 100644
index 101f3c6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DiscoveryEventMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DiscoveryEvent.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DiscoveryEvent();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(tightUnmarshalString(dataIn, bs));
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getServiceName(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        tightMarshalString2(info.getServiceName(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(looseUnmarshalString(dataIn));
-        info.setBrokerName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getServiceName(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java
deleted file mode 100644
index 56bb554..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ExceptionResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ExceptionResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ExceptionResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java
deleted file mode 100644
index 4d6e0f5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.FlushCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for FlushCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return FlushCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new FlushCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java
deleted file mode 100644
index d7635ac..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.IntegerResponse;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for IntegerResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return IntegerResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new IntegerResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        dataOut.writeInt(info.getResult());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getResult());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java
deleted file mode 100644
index 92fa314..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalQueueAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalQueueAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalQueueAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java
deleted file mode 100644
index 0dc3636..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for JournalTopicAckMarshaller NOTE!:
- * This file is auto generated - do not modify! if you need to make a change,
- * please see the modify the groovy scripts in the under src/gram/script and
- * then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTopicAck.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTopicAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSubscritionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
-        rc += tightMarshalString1(info.getSubscritionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
-        tightMarshalString2(info.getSubscritionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSubscritionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
-        looseMarshalString(info.getSubscritionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java
deleted file mode 100644
index d9d8494..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTraceMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTrace.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTrace();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getMessage(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        tightMarshalString2(info.getMessage(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getMessage(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java
deleted file mode 100644
index 256ee2a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTransactionMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTransaction.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTransaction();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        bs.writeBoolean(info.getWasPrepared());
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-        dataOut.writeBoolean(info.getWasPrepared());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java
deleted file mode 100644
index b9ab727..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for KeepAliveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return KeepAliveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new KeepAliveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java
deleted file mode 100644
index 7e5744b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.LastPartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LastPartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandMarshaller extends PartialCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LastPartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LastPartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java
deleted file mode 100644
index eb981ca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for LocalTransactionIdMarshaller NOTE!:
- * This file is auto generated - do not modify! if you need to make a change,
- * please see the modify the groovy scripts in the under src/gram/script and
- * then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class LocalTransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LocalTransactionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LocalTransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java
deleted file mode 100644
index d6a0d65..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * MarshallerFactory for Open Wire Format.
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public final class MarshallerFactory {
-
-    /**
-     * Creates a Map of command type -> Marshallers
-     */
-    private static final DataStreamMarshaller MARSHALLER[] = new DataStreamMarshaller[256];
-    static {
-
-        add(new ActiveMQBlobMessageMarshaller());
-        add(new ActiveMQBytesMessageMarshaller());
-        add(new ActiveMQMapMessageMarshaller());
-        add(new ActiveMQMessageMarshaller());
-        add(new ActiveMQObjectMessageMarshaller());
-        add(new ActiveMQQueueMarshaller());
-        add(new ActiveMQStreamMessageMarshaller());
-        add(new ActiveMQTempQueueMarshaller());
-        add(new ActiveMQTempTopicMarshaller());
-        add(new ActiveMQTextMessageMarshaller());
-        add(new ActiveMQTopicMarshaller());
-        add(new BrokerIdMarshaller());
-        add(new BrokerInfoMarshaller());
-        add(new ConnectionControlMarshaller());
-        add(new ConnectionErrorMarshaller());
-        add(new ConnectionIdMarshaller());
-        add(new ConnectionInfoMarshaller());
-        add(new ConsumerControlMarshaller());
-        add(new ConsumerIdMarshaller());
-        add(new ConsumerInfoMarshaller());
-        add(new ControlCommandMarshaller());
-        add(new DataArrayResponseMarshaller());
-        add(new DataResponseMarshaller());
-        add(new DestinationInfoMarshaller());
-        add(new DiscoveryEventMarshaller());
-        add(new ExceptionResponseMarshaller());
-        add(new FlushCommandMarshaller());
-        add(new IntegerResponseMarshaller());
-        add(new JournalQueueAckMarshaller());
-        add(new JournalTopicAckMarshaller());
-        add(new JournalTraceMarshaller());
-        add(new JournalTransactionMarshaller());
-        add(new KeepAliveInfoMarshaller());
-        add(new LastPartialCommandMarshaller());
-        add(new LocalTransactionIdMarshaller());
-        add(new MessageAckMarshaller());
-        add(new MessageDispatchMarshaller());
-        add(new MessageDispatchNotificationMarshaller());
-        add(new MessageIdMarshaller());
-        add(new MessagePullMarshaller());
-        add(new NetworkBridgeFilterMarshaller());
-        add(new PartialCommandMarshaller());
-        add(new ProducerAckMarshaller());
-        add(new ProducerIdMarshaller());
-        add(new ProducerInfoMarshaller());
-        add(new RemoveInfoMarshaller());
-        add(new RemoveSubscriptionInfoMarshaller());
-        add(new ReplayCommandMarshaller());
-        add(new ResponseMarshaller());
-        add(new SessionIdMarshaller());
-        add(new SessionInfoMarshaller());
-        add(new ShutdownInfoMarshaller());
-        add(new SubscriptionInfoMarshaller());
-        add(new TransactionInfoMarshaller());
-        add(new WireFormatInfoMarshaller());
-        add(new XATransactionIdMarshaller());
-
-    }
-
-    private MarshallerFactory() {        
-    }
-    
-    private static void add(DataStreamMarshaller dsm) {
-        MARSHALLER[dsm.getDataStructureType()] = dsm;
-    }
-    
-    public static DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
-        return MARSHALLER;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java
deleted file mode 100644
index 98b146b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs);
-
-        return rc + 5;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageAck info = (MessageAck)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeByte(info.getAckType());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeByte(info.getAckType());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java
deleted file mode 100644
index 789628a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatch.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatch();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessage((org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessage((org.apache.activemq.command.Message) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java
deleted file mode 100644
index 7043419..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for
- * MessageDispatchNotificationMarshaller NOTE!: This file is auto generated - do
- * not modify! if you need to make a change, please see the modify the groovy
- * scripts in the under src/gram/script and then use maven openwire:generate to
- * regenerate this file.
- * 
- * 
- */
-public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatchNotification.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatchNotification();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java
deleted file mode 100644
index e155fd5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessageIdMarshaller NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessageIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageId info = (MessageId)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java
deleted file mode 100644
index a8bc167..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessageMarshaller NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class MessageMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setGroupID(tightUnmarshalString(dataIn, bs));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setPersistent(bs.readBoolean());
-        info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setType(tightUnmarshalString(dataIn, bs));
-        info.setContent(tightUnmarshalByteSequence(dataIn, bs));
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-        info.setDataStructure((org.apache.activemq.command.DataStructure)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setCompressed(bs.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setUserID(tightUnmarshalString(dataIn, bs));
-        info.setRecievedByDFBridge(bs.readBoolean());
-        info.setDroppable(bs.readBoolean());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
-            }
-            info.setCluster(value);
-        } else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerOutTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs);
-        rc += tightMarshalString1(info.getGroupID(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        bs.writeBoolean(info.isPersistent());
-        rc += tightMarshalLong1(wireFormat, info.getExpiration(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
-        rc += tightMarshalString1(info.getType(), bs);
-        rc += tightMarshalByteSequence1(info.getContent(), bs);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs);
-        bs.writeBoolean(info.isCompressed());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getArrival(), bs);
-        rc += tightMarshalString1(info.getUserID(), bs);
-        bs.writeBoolean(info.isRecievedByDFBridge());
-        bs.writeBoolean(info.isDroppable());
-        rc += tightMarshalObjectArray1(wireFormat, info.getCluster(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getBrokerInTime(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getBrokerOutTime(), bs);
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Message info = (Message)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs);
-        tightMarshalString2(info.getGroupID(), dataOut, bs);
-        dataOut.writeInt(info.getGroupSequence());
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
-        dataOut.writeByte(info.getPriority());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
-        tightMarshalString2(info.getType(), dataOut, bs);
-        tightMarshalByteSequence2(info.getContent(), dataOut, bs);
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getRedeliveryCounter());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
-        tightMarshalString2(info.getUserID(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalObjectArray2(wireFormat, info.getCluster(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerInTime(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerOutTime(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setGroupID(looseUnmarshalString(dataIn));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setPersistent(dataIn.readBoolean());
-        info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
-        info.setType(looseUnmarshalString(dataIn));
-        info.setContent(looseUnmarshalByteSequence(dataIn));
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-        info.setDataStructure((org.apache.activemq.command.DataStructure)looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setCompressed(dataIn.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
-        info.setUserID(looseUnmarshalString(dataIn));
-        info.setRecievedByDFBridge(dataIn.readBoolean());
-        info.setDroppable(dataIn.readBoolean());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setCluster(value);
-        } else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerOutTime(looseUnmarshalLong(wireFormat, dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut);
-        looseMarshalString(info.getGroupID(), dataOut);
-        dataOut.writeInt(info.getGroupSequence());
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        dataOut.writeBoolean(info.isPersistent());
-        looseMarshalLong(wireFormat, info.getExpiration(), dataOut);
-        dataOut.writeByte(info.getPriority());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimestamp(), dataOut);
-        looseMarshalString(info.getType(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getContent(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isCompressed());
-        dataOut.writeInt(info.getRedeliveryCounter());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalLong(wireFormat, info.getArrival(), dataOut);
-        looseMarshalString(info.getUserID(), dataOut);
-        dataOut.writeBoolean(info.isRecievedByDFBridge());
-        dataOut.writeBoolean(info.isDroppable());
-        looseMarshalObjectArray(wireFormat, info.getCluster(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerInTime(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerOutTime(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java
deleted file mode 100644
index b332a9e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for MessagePullMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessagePullMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessagePull.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessagePull();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)tightUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn, bs));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessagePull info = (MessagePull)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId)looseUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info
-            .setMessageId((org.apache.activemq.command.MessageId)looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java
deleted file mode 100644
index d0766eb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for NetworkBridgeFilterMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return NetworkBridgeFilter.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new NetworkBridgeFilter();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        dataOut.writeInt(info.getNetworkTTL());
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getNetworkTTL());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java
deleted file mode 100644
index dbe353d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for PartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return PartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new PartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getData(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        tightMarshalByteArray2(info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        looseMarshalByteArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerAckMarshaller.java
deleted file mode 100644
index 9f1b239..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerAckMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        dataOut.writeInt(info.getSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        dataOut.writeInt(info.getSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java
deleted file mode 100644
index 8526839..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ProducerIdMarshaller NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerId info = (ProducerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java
deleted file mode 100644
index 45db94b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for ProducerInfoMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerInfo.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)tightUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn, bs));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)tightUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn,
-                                                                                                       bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)tightUnmarsalNestedObject(wireFormat,
-                                                                                           dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(bs.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId)looseUnmarsalCachedObject(wireFormat,
-                                                                                             dataIn));
-        info
-            .setDestination((org.apache.activemq.command.ActiveMQDestination)looseUnmarsalCachedObject(
-                                                                                                       wireFormat,
-                                                                                                       dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for (int i = 0; i < size; i++) {
-                value[i] = (org.apache.activemq.command.BrokerId)looseUnmarsalNestedObject(wireFormat, dataIn);
-            }
-            info.setBrokerPath(value);
-        } else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isDispatchAsync());
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java
deleted file mode 100644
index ffb5466..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java
deleted file mode 100644
index 142537b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveSubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java
deleted file mode 100644
index 5f964da..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ReplayCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ReplayCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ReplayCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ReplayCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 8;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java
deleted file mode 100644
index 658cb74..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return Response.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new Response();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Response info = (Response)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Response info = (Response)o;
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Response info = (Response)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java
deleted file mode 100644
index 8853f59..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * Marshalling code for Open Wire Format for SessionIdMarshaller
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class SessionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * 
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionId.DATA_STRUCTURE_TYPE;
-    }
-
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     * 
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionId info = (SessionId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     * 
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java
deleted file mode 100644
index e10d9df..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java
deleted file mode 100644
index 684c8d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ShutdownInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ShutdownInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ShutdownInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java
deleted file mode 100644
index 838e622..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getSubscribedDestination(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java
deleted file mode 100644
index 3686067..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java
deleted file mode 100644
index fa5c119..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return TransactionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new TransactionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java
deleted file mode 100644
index 88f0134..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for WireFormatInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return WireFormatInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new WireFormatInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-        tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8);
-        dataOut.writeInt(info.getVersion());
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
-        dataOut.writeInt(info.getVersion());
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java
deleted file mode 100644
index 70ffde5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-
-
-/**
- * Marshalling code for Open Wire Format for XATransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return XATransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new XATransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
-        info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs);
-        rc += tightMarshalByteArray1(info.getBranchQualifier(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        dataOut.writeInt(info.getFormatId());
-        tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs);
-        tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
-        info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFormatId());
-        looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut);
-        looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQBlobMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQBlobMessageMarshaller.java
deleted file mode 100644
index cb9d7c0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQBlobMessageMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBlobMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBlobMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBlobMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBlobMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(tightUnmarshalString(dataIn, bs));
-        info.setMimeType(tightUnmarshalString(dataIn, bs));
-        info.setDeletedByBroker(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getRemoteBlobUrl(), bs);
-        rc += tightMarshalString1(info.getMimeType(), bs);
-        bs.writeBoolean(info.isDeletedByBroker());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        tightMarshalString2(info.getRemoteBlobUrl(), dataOut, bs);
-        tightMarshalString2(info.getMimeType(), dataOut, bs);
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(looseUnmarshalString(dataIn));
-        info.setMimeType(looseUnmarshalString(dataIn));
-        info.setDeletedByBroker(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getRemoteBlobUrl(), dataOut);
-        looseMarshalString(info.getMimeType(), dataOut);
-        dataOut.writeBoolean(info.isDeletedByBroker());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQBytesMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQBytesMessageMarshaller.java
deleted file mode 100644
index 9621c0d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQBytesMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBytesMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQDestinationMarshaller.java
deleted file mode 100644
index 5913bf9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQDestinationMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getPhysicalName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        tightMarshalString2(info.getPhysicalName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getPhysicalName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQMapMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQMapMessageMarshaller.java
deleted file mode 100644
index 039f09b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQMapMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMapMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQMessageMarshaller.java
deleted file mode 100644
index 55aa03b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMessageMarshaller extends MessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQObjectMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQObjectMessageMarshaller.java
deleted file mode 100644
index 472708d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQObjectMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQObjectMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQQueueMarshaller.java
deleted file mode 100644
index 8fecc9f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQQueueMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQStreamMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQStreamMessageMarshaller.java
deleted file mode 100644
index 9ee0dc6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQStreamMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQStreamMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempDestinationMarshaller.java
deleted file mode 100644
index dcc8568..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempDestinationMarshaller.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempQueueMarshaller.java
deleted file mode 100644
index 4a32660..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempQueueMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempTopicMarshaller.java
deleted file mode 100644
index 8cbebdf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTempTopicMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTextMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTextMessageMarshaller.java
deleted file mode 100644
index 8312010..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTextMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTextMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTextMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTopicMarshaller.java
deleted file mode 100644
index 2ad96b5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ActiveMQTopicMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BaseCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BaseCommandMarshaller.java
deleted file mode 100644
index 7692f93..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BaseCommandMarshaller.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BaseCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isResponseRequired());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        dataOut.writeBoolean(info.isResponseRequired());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BaseDataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BaseDataStreamMarshaller.java
deleted file mode 100644
index 798b94a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BaseDataStreamMarshaller.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/**
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-
-public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
-
-    public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
-
-    static {
-        Constructor constructor = null;
-        try {
-            constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
-                                                                              String.class, int.class});
-        } catch (Throwable e) {
-        }
-        STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
-    }
-
-    public abstract byte getDataStructureType();
-
-    public abstract DataStructure createObject();
-
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-        return 0;
-    }
-
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-    }
-
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-    }
-
-    public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
-        if (o == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(false);
-            return 0;
-        } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(true);
-            return 2;
-        } else if ((o & 0xFFFFFFFF00000000L) == 0) {
-            bs.writeBoolean(true);
-            bs.writeBoolean(false);
-            return 4;
-        } else {
-            bs.writeBoolean(true);
-            bs.writeBoolean(true);
-            return 8;
-        }
-    }
-
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                dataOut.writeLong(o);
-            } else {
-                dataOut.writeInt((int)o);
-            }
-        } else {
-            if (bs.readBoolean()) {
-                dataOut.writeShort((int)o);
-            }
-        }
-    }
-
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                return dataIn.readLong();
-            } else {
-                return toLong(dataIn.readInt());
-            }
-        } else {
-            if (bs.readBoolean()) {
-                return toLong(dataIn.readShort());
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    protected long toLong(short value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffL;
-    }
-
-    protected long toLong(int value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffffffL;
-    }
-
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-    }
-
-    protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        return wireFormat.tightMarshalNestedObject1(o, bs);
-    }
-
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-    }
-
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (bs.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-        }
-    }
-
-    protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            bs.writeBoolean(index == null);
-            if (index == null) {
-                int rc = wireFormat.tightMarshalNestedObject1(o, bs);
-                wireFormat.addToMarshallCache(o);
-                return 2 + rc;
-            } else {
-                return 2;
-            }
-        } else {
-            return wireFormat.tightMarshalNestedObject1(o, bs);
-        }
-    }
-
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            if (bs.readBoolean()) {
-                dataOut.writeShort(index.shortValue());
-                wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-        }
-    }
-
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            String clazz = tightUnmarshalString(dataIn, bs);
-            String message = tightUnmarshalString(dataIn, bs);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    private Throwable createThrowable(String className, String message) {
-        try {
-            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
-            Constructor constructor = clazz.getConstructor(new Class[] {String.class});
-            return (Throwable)constructor.newInstance(new Object[] {message});
-        } catch (Throwable e) {
-            return new Throwable(className + ": " + message);
-        }
-    }
-
-    protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
-        throws IOException {
-        if (o == null) {
-            bs.writeBoolean(false);
-            return 0;
-        } else {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += tightMarshalString1(o.getClass().getName(), bs);
-            rc += tightMarshalString1(o.getMessage(), bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                rc += 2;
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    rc += tightMarshalString1(element.getClassName(), bs);
-                    rc += tightMarshalString1(element.getMethodName(), bs);
-                    rc += tightMarshalString1(element.getFileName(), bs);
-                    rc += 4;
-                }
-                rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
-            }
-            return rc;
-        }
-    }
-
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
-                                          BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            tightMarshalString2(o.getClass().getName(), dataOut, bs);
-            tightMarshalString2(o.getMessage(), dataOut, bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    tightMarshalString2(element.getClassName(), dataOut, bs);
-                    tightMarshalString2(element.getMethodName(), dataOut, bs);
-                    tightMarshalString2(element.getFileName(), dataOut, bs);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
-            }
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                int size = dataIn.readShort();
-                byte data[] = new byte[size];
-                dataIn.readFully(data);
-                // Yes deprecated, but we know what we are doing.
-                // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0);
-            } else {
-                return dataIn.readUTF();
-            }
-        } else {
-            return null;
-        }
-    }
-
-    protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
-        bs.writeBoolean(value != null);
-        if (value != null) {
-
-            int strlen = value.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            boolean isOnlyAscii = true;
-
-            value.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                    isOnlyAscii = false;
-                } else {
-                    isOnlyAscii = false;
-                    utflen += 2;
-                }
-            }
-
-            if (utflen >= Short.MAX_VALUE) {
-                throw new IOException("Encountered a String value that is too long to encode.");
-            }
-            bs.writeBoolean(isOnlyAscii);
-            return utflen + 2;
-
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            // If we verified it only holds ascii values
-            if (bs.readBoolean()) {
-                dataOut.writeShort(value.length());
-                dataOut.writeBytes(value);
-            } else {
-                dataOut.writeUTF(value);
-            }
-        }
-    }
-
-    protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           BooleanStream bs) throws IOException {
-        if (objects != null) {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += 2;
-            for (int i = 0; i < objects.length; i++) {
-                rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
-            }
-            return rc;
-        } else {
-            bs.writeBoolean(false);
-            return 0;
-        }
-    }
-
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
-                                            DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
-            }
-        }
-    }
-
-    protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
-        return i;
-    }
-
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
-        throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
-        throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.length + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
-        byte rc[] = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.getLength() + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-
-    //
-    // The loose marshaling logic
-    //
-
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-    }
-
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-    }
-
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(o);
-    }
-
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        return wireFormat.looseUnmarshalNestedObject(dataIn);
-    }
-
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        wireFormat.looseMarshalNestedObject(o, dataOut);
-    }
-
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (dataIn.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.looseUnmarshalNestedObject(dataIn);
-        }
-    }
-
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            dataOut.writeBoolean(index == null);
-            if (index == null) {
-                index = wireFormat.addToMarshallCache(o);
-                dataOut.writeShort(index.shortValue());
-                wireFormat.looseMarshalNestedObject(o, dataOut);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.looseMarshalNestedObject(o, dataOut);
-        }
-    }
-
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (dataIn.readBoolean()) {
-            String clazz = looseUnmarshalString(dataIn);
-            String message = looseUnmarshalString(dataIn);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            looseMarshalString(o.getClass().getName(), dataOut);
-            looseMarshalString(o.getMessage(), dataOut);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    looseMarshalString(element.getClassName(), dataOut);
-                    looseMarshalString(element.getMethodName(), dataOut);
-                    looseMarshalString(element.getFileName(), dataOut);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
-            }
-        }
-    }
-
-    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
-        if (dataIn.readBoolean()) {
-            return dataIn.readUTF();
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(value != null);
-        if (value != null) {
-            dataOut.writeUTF(value);
-        }
-    }
-
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(objects != null);
-        if (objects != null) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                looseMarshalNestedObject(wireFormat, objects[i], dataOut);
-            }
-        }
-    }
-
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
-                                              int i) throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
-        byte rc[] = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BrokerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BrokerIdMarshaller.java
deleted file mode 100644
index d230e54..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BrokerIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerId info = (BrokerId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BrokerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BrokerInfoMarshaller.java
deleted file mode 100644
index fa24951..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/BrokerInfoMarshaller.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setBrokerURL(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-        info.setSlaveBroker(bs.readBoolean());
-        info.setMasterBroker(bs.readBoolean());
-        info.setFaultTolerantConfiguration(bs.readBoolean());
-        info.setDuplexConnection(bs.readBoolean());
-        info.setNetworkConnection(bs.readBoolean());
-        info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerUploadUrl(tightUnmarshalString(dataIn, bs));
-        info.setNetworkProperties(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs);
-        rc += tightMarshalString1(info.getBrokerURL(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-        bs.writeBoolean(info.isSlaveBroker());
-        bs.writeBoolean(info.isMasterBroker());
-        bs.writeBoolean(info.isFaultTolerantConfiguration());
-        bs.writeBoolean(info.isDuplexConnection());
-        bs.writeBoolean(info.isNetworkConnection());
-        rc+=tightMarshalLong1(wireFormat, info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getBrokerUploadUrl(), bs);
-        rc += tightMarshalString1(info.getNetworkProperties(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerURL(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerUploadUrl(), dataOut, bs);
-        tightMarshalString2(info.getNetworkProperties(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrokerURL(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(looseUnmarshalString(dataIn));
-        info.setSlaveBroker(dataIn.readBoolean());
-        info.setMasterBroker(dataIn.readBoolean());
-        info.setFaultTolerantConfiguration(dataIn.readBoolean());
-        info.setDuplexConnection(dataIn.readBoolean());
-        info.setNetworkConnection(dataIn.readBoolean());
-        info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerUploadUrl(looseUnmarshalString(dataIn));
-        info.setNetworkProperties(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut);
-        looseMarshalString(info.getBrokerURL(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-        dataOut.writeBoolean(info.isSlaveBroker());
-        dataOut.writeBoolean(info.isMasterBroker());
-        dataOut.writeBoolean(info.isFaultTolerantConfiguration());
-        dataOut.writeBoolean(info.isDuplexConnection());
-        dataOut.writeBoolean(info.isNetworkConnection());
-        looseMarshalLong(wireFormat, info.getConnectionId(), dataOut);
-        looseMarshalString(info.getBrokerUploadUrl(), dataOut);
-        looseMarshalString(info.getNetworkProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionControlMarshaller.java
deleted file mode 100644
index 9ba1c91..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionControlMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(bs.readBoolean());
-        info.setExit(bs.readBoolean());
-        info.setFaultTolerant(bs.readBoolean());
-        info.setResume(bs.readBoolean());
-        info.setSuspend(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        bs.writeBoolean(info.isExit());
-        bs.writeBoolean(info.isFaultTolerant());
-        bs.writeBoolean(info.isResume());
-        bs.writeBoolean(info.isSuspend());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setExit(dataIn.readBoolean());
-        info.setFaultTolerant(dataIn.readBoolean());
-        info.setResume(dataIn.readBoolean());
-        info.setSuspend(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        dataOut.writeBoolean(info.isExit());
-        dataOut.writeBoolean(info.isFaultTolerant());
-        dataOut.writeBoolean(info.isResume());
-        dataOut.writeBoolean(info.isSuspend());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionErrorMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionErrorMarshaller.java
deleted file mode 100644
index 8e31021..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionErrorMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionErrorMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionError.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionError();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionIdMarshaller.java
deleted file mode 100644
index f92dbc3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionInfoMarshaller.java
deleted file mode 100644
index 65a7d06..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConnectionInfoMarshaller.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setPassword(tightUnmarshalString(dataIn, bs));
-        info.setUserName(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(bs.readBoolean());
-        info.setManageable(bs.readBoolean());
-        info.setClientMaster(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalString1(info.getPassword(), bs);
-        rc += tightMarshalString1(info.getUserName(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isBrokerMasterConnector());
-        bs.writeBoolean(info.isManageable());
-        bs.writeBoolean(info.isClientMaster());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalString2(info.getPassword(), dataOut, bs);
-        tightMarshalString2(info.getUserName(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setPassword(looseUnmarshalString(dataIn));
-        info.setUserName(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(dataIn.readBoolean());
-        info.setManageable(dataIn.readBoolean());
-        info.setClientMaster(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalString(info.getPassword(), dataOut);
-        looseMarshalString(info.getUserName(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isBrokerMasterConnector());
-        dataOut.writeBoolean(info.isManageable());
-        dataOut.writeBoolean(info.isClientMaster());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerControlMarshaller.java
deleted file mode 100644
index 906f4bf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerControlMarshaller.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(bs.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(bs.readBoolean());
-        info.setStart(bs.readBoolean());
-        info.setStop(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isFlush());
-        bs.writeBoolean(info.isStart());
-        bs.writeBoolean(info.isStop());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        bs.readBoolean();
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetch());
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(dataIn.readBoolean());
-        info.setStart(dataIn.readBoolean());
-        info.setStop(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeInt(info.getPrefetch());
-        dataOut.writeBoolean(info.isFlush());
-        dataOut.writeBoolean(info.isStart());
-        dataOut.writeBoolean(info.isStop());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerIdMarshaller.java
deleted file mode 100644
index 2b29c00..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerInfoMarshaller.java
deleted file mode 100644
index a131885..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ConsumerInfoMarshaller.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setBrowser(bs.readBoolean());
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(bs.readBoolean());
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setNoLocal(bs.readBoolean());
-        info.setExclusive(bs.readBoolean());
-        info.setRetroactive(bs.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setNetworkSubscription(bs.readBoolean());
-        info.setOptimizedAcknowledge(bs.readBoolean());
-        info.setNoRangeAcks(bs.readBoolean());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setNetworkConsumerPath(value);
-        }
-        else {
-            info.setNetworkConsumerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isBrowser());
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        bs.writeBoolean(info.isNoLocal());
-        bs.writeBoolean(info.isExclusive());
-        bs.writeBoolean(info.isRetroactive());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs);
-        bs.writeBoolean(info.isNetworkSubscription());
-        bs.writeBoolean(info.isOptimizedAcknowledge());
-        bs.writeBoolean(info.isNoRangeAcks());
-        rc += tightMarshalObjectArray1(wireFormat, info.getNetworkConsumerPath(), bs);
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        bs.readBoolean();
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        dataOut.writeByte(info.getPriority());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalObjectArray2(wireFormat, info.getNetworkConsumerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrowser(dataIn.readBoolean());
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setNoLocal(dataIn.readBoolean());
-        info.setExclusive(dataIn.readBoolean());
-        info.setRetroactive(dataIn.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setNetworkSubscription(dataIn.readBoolean());
-        info.setOptimizedAcknowledge(dataIn.readBoolean());
-        info.setNoRangeAcks(dataIn.readBoolean());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setNetworkConsumerPath(value);
-        }
-        else {
-            info.setNetworkConsumerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isBrowser());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        dataOut.writeBoolean(info.isDispatchAsync());
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        dataOut.writeBoolean(info.isNoLocal());
-        dataOut.writeBoolean(info.isExclusive());
-        dataOut.writeBoolean(info.isRetroactive());
-        dataOut.writeByte(info.getPriority());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut);
-        dataOut.writeBoolean(info.isNetworkSubscription());
-        dataOut.writeBoolean(info.isOptimizedAcknowledge());
-        dataOut.writeBoolean(info.isNoRangeAcks());
-        looseMarshalObjectArray(wireFormat, info.getNetworkConsumerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ControlCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ControlCommandMarshaller.java
deleted file mode 100644
index e96b018..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ControlCommandMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ControlCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ControlCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ControlCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getCommand(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        tightMarshalString2(info.getCommand(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getCommand(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DataArrayResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DataArrayResponseMarshaller.java
deleted file mode 100644
index c0e6d7f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DataArrayResponseMarshaller.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataArrayResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataArrayResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataArrayResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataArrayResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setData(value);
-        }
-        else {
-            info.setData(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-        tightMarshalObjectArray2(wireFormat, info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setData(value);
-        }
-        else {
-            info.setData(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalObjectArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DataResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DataResponseMarshaller.java
deleted file mode 100644
index e45b880..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DataResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataResponse info = (DataResponse)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DestinationInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DestinationInfoMarshaller.java
deleted file mode 100644
index 07b6244..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DestinationInfoMarshaller.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DestinationInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DestinationInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DestinationInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DestinationInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeByte(info.getOperationType());
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeByte(info.getOperationType());
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DiscoveryEventMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DiscoveryEventMarshaller.java
deleted file mode 100644
index 77d5909..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/DiscoveryEventMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DiscoveryEventMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DiscoveryEvent.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DiscoveryEvent();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(tightUnmarshalString(dataIn, bs));
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getServiceName(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        tightMarshalString2(info.getServiceName(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(looseUnmarshalString(dataIn));
-        info.setBrokerName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getServiceName(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ExceptionResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ExceptionResponseMarshaller.java
deleted file mode 100644
index 044a3ff..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ExceptionResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ExceptionResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ExceptionResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ExceptionResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/FlushCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/FlushCommandMarshaller.java
deleted file mode 100644
index c543676..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/FlushCommandMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for FlushCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return FlushCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new FlushCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/IntegerResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/IntegerResponseMarshaller.java
deleted file mode 100644
index 5d88f6d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/IntegerResponseMarshaller.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for IntegerResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return IntegerResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new IntegerResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        dataOut.writeInt(info.getResult());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getResult());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalQueueAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalQueueAckMarshaller.java
deleted file mode 100644
index 3809f93..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalQueueAckMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalQueueAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalQueueAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalQueueAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTopicAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTopicAckMarshaller.java
deleted file mode 100644
index 05bad89..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTopicAckMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTopicAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTopicAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTopicAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSubscritionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
-        rc += tightMarshalString1(info.getSubscritionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
-        tightMarshalString2(info.getSubscritionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSubscritionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
-        looseMarshalString(info.getSubscritionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTraceMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTraceMarshaller.java
deleted file mode 100644
index f7c556e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTraceMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTraceMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTrace.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTrace();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getMessage(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        tightMarshalString2(info.getMessage(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getMessage(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTransactionMarshaller.java
deleted file mode 100644
index 807680e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/JournalTransactionMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTransactionMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTransaction.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTransaction();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        bs.writeBoolean(info.getWasPrepared());
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-        dataOut.writeBoolean(info.getWasPrepared());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/KeepAliveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/KeepAliveInfoMarshaller.java
deleted file mode 100644
index 5b431f4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/KeepAliveInfoMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for KeepAliveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return KeepAliveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new KeepAliveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/LastPartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/LastPartialCommandMarshaller.java
deleted file mode 100644
index 628f2e6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/LastPartialCommandMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LastPartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandMarshaller extends PartialCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LastPartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LastPartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/LocalTransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/LocalTransactionIdMarshaller.java
deleted file mode 100644
index 9c305e6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/LocalTransactionIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LocalTransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LocalTransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LocalTransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MarshallerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MarshallerFactory.java
deleted file mode 100644
index 512fc13..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MarshallerFactory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * MarshallerFactory for Open Wire Format.
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MarshallerFactory {
-
-    /**
-     * Creates a Map of command type -> Marshallers
-     */
-    static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];
-    static {
-
-        add(new ActiveMQBlobMessageMarshaller());
-        add(new ActiveMQBytesMessageMarshaller());
-        add(new ActiveMQMapMessageMarshaller());
-        add(new ActiveMQMessageMarshaller());
-        add(new ActiveMQObjectMessageMarshaller());
-        add(new ActiveMQQueueMarshaller());
-        add(new ActiveMQStreamMessageMarshaller());
-        add(new ActiveMQTempQueueMarshaller());
-        add(new ActiveMQTempTopicMarshaller());
-        add(new ActiveMQTextMessageMarshaller());
-        add(new ActiveMQTopicMarshaller());
-        add(new BrokerIdMarshaller());
-        add(new BrokerInfoMarshaller());
-        add(new ConnectionControlMarshaller());
-        add(new ConnectionErrorMarshaller());
-        add(new ConnectionIdMarshaller());
-        add(new ConnectionInfoMarshaller());
-        add(new ConsumerControlMarshaller());
-        add(new ConsumerIdMarshaller());
-        add(new ConsumerInfoMarshaller());
-        add(new ControlCommandMarshaller());
-        add(new DataArrayResponseMarshaller());
-        add(new DataResponseMarshaller());
-        add(new DestinationInfoMarshaller());
-        add(new DiscoveryEventMarshaller());
-        add(new ExceptionResponseMarshaller());
-        add(new FlushCommandMarshaller());
-        add(new IntegerResponseMarshaller());
-        add(new JournalQueueAckMarshaller());
-        add(new JournalTopicAckMarshaller());
-        add(new JournalTraceMarshaller());
-        add(new JournalTransactionMarshaller());
-        add(new KeepAliveInfoMarshaller());
-        add(new LastPartialCommandMarshaller());
-        add(new LocalTransactionIdMarshaller());
-        add(new MessageAckMarshaller());
-        add(new MessageDispatchMarshaller());
-        add(new MessageDispatchNotificationMarshaller());
-        add(new MessageIdMarshaller());
-        add(new MessagePullMarshaller());
-        add(new NetworkBridgeFilterMarshaller());
-        add(new PartialCommandMarshaller());
-        add(new ProducerAckMarshaller());
-        add(new ProducerIdMarshaller());
-        add(new ProducerInfoMarshaller());
-        add(new RemoveInfoMarshaller());
-        add(new RemoveSubscriptionInfoMarshaller());
-        add(new ReplayCommandMarshaller());
-        add(new ResponseMarshaller());
-        add(new SessionIdMarshaller());
-        add(new SessionInfoMarshaller());
-        add(new ShutdownInfoMarshaller());
-        add(new SubscriptionInfoMarshaller());
-        add(new TransactionInfoMarshaller());
-        add(new WireFormatInfoMarshaller());
-        add(new XATransactionIdMarshaller());
-
-    }
-
-    static private void add(DataStreamMarshaller dsm) {
-        marshaller[dsm.getDataStructureType()] = dsm;
-    }
-    
-    static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
-        return marshaller;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageAckMarshaller.java
deleted file mode 100644
index 8764848..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageAckMarshaller.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs);
-
-        return rc + 5;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageAck info = (MessageAck)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeByte(info.getAckType());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeByte(info.getAckType());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageDispatchMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageDispatchMarshaller.java
deleted file mode 100644
index d4b181a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageDispatchMarshaller.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatch.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatch();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessage((org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessage((org.apache.activemq.command.Message) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationMarshaller.java
deleted file mode 100644
index 73750c9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationMarshaller.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchNotificationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatchNotification.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatchNotification();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageIdMarshaller.java
deleted file mode 100644
index ab21d5f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageId info = (MessageId)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageMarshaller.java
deleted file mode 100644
index 8c844da..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessageMarshaller.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class MessageMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setGroupID(tightUnmarshalString(dataIn, bs));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setPersistent(bs.readBoolean());
-        info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setType(tightUnmarshalString(dataIn, bs));
-        info.setContent(tightUnmarshalByteSequence(dataIn, bs));
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-        info.setDataStructure((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setCompressed(bs.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setUserID(tightUnmarshalString(dataIn, bs));
-        info.setRecievedByDFBridge(bs.readBoolean());
-        info.setDroppable(bs.readBoolean());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setCluster(value);
-        }
-        else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerOutTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs);
-        rc += tightMarshalString1(info.getGroupID(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        bs.writeBoolean(info.isPersistent());
-        rc+=tightMarshalLong1(wireFormat, info.getExpiration(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
-        rc += tightMarshalString1(info.getType(), bs);
-        rc += tightMarshalByteSequence1(info.getContent(), bs);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs);
-        bs.writeBoolean(info.isCompressed());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getArrival(), bs);
-        rc += tightMarshalString1(info.getUserID(), bs);
-        bs.writeBoolean(info.isRecievedByDFBridge());
-        bs.writeBoolean(info.isDroppable());
-        rc += tightMarshalObjectArray1(wireFormat, info.getCluster(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerInTime(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerOutTime(), bs);
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Message info = (Message)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs);
-        tightMarshalString2(info.getGroupID(), dataOut, bs);
-        dataOut.writeInt(info.getGroupSequence());
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
-        dataOut.writeByte(info.getPriority());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
-        tightMarshalString2(info.getType(), dataOut, bs);
-        tightMarshalByteSequence2(info.getContent(), dataOut, bs);
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getRedeliveryCounter());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
-        tightMarshalString2(info.getUserID(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalObjectArray2(wireFormat, info.getCluster(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerInTime(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerOutTime(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setGroupID(looseUnmarshalString(dataIn));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setPersistent(dataIn.readBoolean());
-        info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
-        info.setType(looseUnmarshalString(dataIn));
-        info.setContent(looseUnmarshalByteSequence(dataIn));
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-        info.setDataStructure((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setCompressed(dataIn.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
-        info.setUserID(looseUnmarshalString(dataIn));
-        info.setRecievedByDFBridge(dataIn.readBoolean());
-        info.setDroppable(dataIn.readBoolean());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setCluster(value);
-        }
-        else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerOutTime(looseUnmarshalLong(wireFormat, dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut);
-        looseMarshalString(info.getGroupID(), dataOut);
-        dataOut.writeInt(info.getGroupSequence());
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        dataOut.writeBoolean(info.isPersistent());
-        looseMarshalLong(wireFormat, info.getExpiration(), dataOut);
-        dataOut.writeByte(info.getPriority());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimestamp(), dataOut);
-        looseMarshalString(info.getType(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getContent(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isCompressed());
-        dataOut.writeInt(info.getRedeliveryCounter());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalLong(wireFormat, info.getArrival(), dataOut);
-        looseMarshalString(info.getUserID(), dataOut);
-        dataOut.writeBoolean(info.isRecievedByDFBridge());
-        dataOut.writeBoolean(info.isDroppable());
-        looseMarshalObjectArray(wireFormat, info.getCluster(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerInTime(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerOutTime(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessagePullMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessagePullMarshaller.java
deleted file mode 100644
index ab324ca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/MessagePullMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessagePullMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessagePull.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessagePull();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessagePull info = (MessagePull)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterMarshaller.java
deleted file mode 100644
index 5212861..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for NetworkBridgeFilterMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return NetworkBridgeFilter.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new NetworkBridgeFilter();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        dataOut.writeInt(info.getNetworkTTL());
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getNetworkTTL());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/PartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/PartialCommandMarshaller.java
deleted file mode 100644
index 3f539c0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/PartialCommandMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for PartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return PartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new PartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getData(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        tightMarshalByteArray2(info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        looseMarshalByteArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerAckMarshaller.java
deleted file mode 100644
index 0cb6192..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerAckMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        dataOut.writeInt(info.getSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        dataOut.writeInt(info.getSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerIdMarshaller.java
deleted file mode 100644
index 7bdf500..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerId info = (ProducerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerInfoMarshaller.java
deleted file mode 100644
index 698b500..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ProducerInfoMarshaller.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(bs.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isDispatchAsync());
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/RemoveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/RemoveInfoMarshaller.java
deleted file mode 100644
index a5db7eb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/RemoveInfoMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoMarshaller.java
deleted file mode 100644
index 7a011a6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveSubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ReplayCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ReplayCommandMarshaller.java
deleted file mode 100644
index fd0ef8a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ReplayCommandMarshaller.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ReplayCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ReplayCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ReplayCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 8;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ResponseMarshaller.java
deleted file mode 100644
index 2baa0fe..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ResponseMarshaller.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return Response.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new Response();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Response info = (Response)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Response info = (Response)o;
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Response info = (Response)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SessionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SessionIdMarshaller.java
deleted file mode 100644
index 47f4cbe..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SessionIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionId info = (SessionId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SessionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SessionInfoMarshaller.java
deleted file mode 100644
index 9346862..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SessionInfoMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ShutdownInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ShutdownInfoMarshaller.java
deleted file mode 100644
index 30da990..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/ShutdownInfoMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ShutdownInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ShutdownInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ShutdownInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SubscriptionInfoMarshaller.java
deleted file mode 100644
index 7a04db1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/SubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getSubscribedDestination(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/TransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/TransactionIdMarshaller.java
deleted file mode 100644
index e54319e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/TransactionIdMarshaller.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/TransactionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/TransactionInfoMarshaller.java
deleted file mode 100644
index ef96164..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/TransactionInfoMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return TransactionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new TransactionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/WireFormatInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/WireFormatInfoMarshaller.java
deleted file mode 100644
index ec65a8c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/WireFormatInfoMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for WireFormatInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return WireFormatInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new WireFormatInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-        tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8);
-        dataOut.writeInt(info.getVersion());
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
-        dataOut.writeInt(info.getVersion());
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/XATransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/XATransactionIdMarshaller.java
deleted file mode 100644
index 49073d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v4/XATransactionIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for XATransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return XATransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new XATransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
-        info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs);
-        rc += tightMarshalByteArray1(info.getBranchQualifier(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        dataOut.writeInt(info.getFormatId());
-        tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs);
-        tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
-        info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFormatId());
-        looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut);
-        looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQBlobMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQBlobMessageMarshaller.java
deleted file mode 100644
index cacfcf9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQBlobMessageMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBlobMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBlobMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBlobMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBlobMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(tightUnmarshalString(dataIn, bs));
-        info.setMimeType(tightUnmarshalString(dataIn, bs));
-        info.setDeletedByBroker(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getRemoteBlobUrl(), bs);
-        rc += tightMarshalString1(info.getMimeType(), bs);
-        bs.writeBoolean(info.isDeletedByBroker());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        tightMarshalString2(info.getRemoteBlobUrl(), dataOut, bs);
-        tightMarshalString2(info.getMimeType(), dataOut, bs);
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(looseUnmarshalString(dataIn));
-        info.setMimeType(looseUnmarshalString(dataIn));
-        info.setDeletedByBroker(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getRemoteBlobUrl(), dataOut);
-        looseMarshalString(info.getMimeType(), dataOut);
-        dataOut.writeBoolean(info.isDeletedByBroker());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQBytesMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQBytesMessageMarshaller.java
deleted file mode 100644
index 9b092ce..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQBytesMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBytesMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQDestinationMarshaller.java
deleted file mode 100644
index f700e29..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQDestinationMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getPhysicalName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        tightMarshalString2(info.getPhysicalName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getPhysicalName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQMapMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQMapMessageMarshaller.java
deleted file mode 100644
index 8db1d85..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQMapMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMapMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQMessageMarshaller.java
deleted file mode 100644
index 8dde8c1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMessageMarshaller extends MessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQObjectMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQObjectMessageMarshaller.java
deleted file mode 100644
index bfe670c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQObjectMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQObjectMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQQueueMarshaller.java
deleted file mode 100644
index 09f1c35..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQQueueMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQStreamMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQStreamMessageMarshaller.java
deleted file mode 100644
index 5fde28d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQStreamMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQStreamMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempDestinationMarshaller.java
deleted file mode 100644
index e19dca6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempDestinationMarshaller.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempQueueMarshaller.java
deleted file mode 100644
index bb72a04..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempQueueMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempTopicMarshaller.java
deleted file mode 100644
index 44c1f4a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTempTopicMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTextMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTextMessageMarshaller.java
deleted file mode 100644
index d3acef9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTextMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTextMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTextMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTopicMarshaller.java
deleted file mode 100644
index f9ddbb9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ActiveMQTopicMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BaseCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BaseCommandMarshaller.java
deleted file mode 100644
index f75e9a0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BaseCommandMarshaller.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BaseCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isResponseRequired());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        dataOut.writeBoolean(info.isResponseRequired());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BaseDataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BaseDataStreamMarshaller.java
deleted file mode 100644
index 180d9c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BaseDataStreamMarshaller.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/**
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-
-public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
-
-    public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
-
-    static {
-        Constructor constructor = null;
-        try {
-            constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
-                                                                              String.class, int.class});
-        } catch (Throwable e) {
-        }
-        STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
-    }
-
-    public abstract byte getDataStructureType();
-
-    public abstract DataStructure createObject();
-
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-        return 0;
-    }
-
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-    }
-
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-    }
-
-    public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
-        if (o == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(false);
-            return 0;
-        } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(true);
-            return 2;
-        } else if ((o & 0xFFFFFFFF00000000L) == 0) {
-            bs.writeBoolean(true);
-            bs.writeBoolean(false);
-            return 4;
-        } else {
-            bs.writeBoolean(true);
-            bs.writeBoolean(true);
-            return 8;
-        }
-    }
-
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                dataOut.writeLong(o);
-            } else {
-                dataOut.writeInt((int)o);
-            }
-        } else {
-            if (bs.readBoolean()) {
-                dataOut.writeShort((int)o);
-            }
-        }
-    }
-
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                return dataIn.readLong();
-            } else {
-                return toLong(dataIn.readInt());
-            }
-        } else {
-            if (bs.readBoolean()) {
-                return toLong(dataIn.readShort());
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    protected long toLong(short value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffL;
-    }
-
-    protected long toLong(int value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffffffL;
-    }
-
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-    }
-
-    protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        return wireFormat.tightMarshalNestedObject1(o, bs);
-    }
-
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-    }
-
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (bs.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-        }
-    }
-
-    protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            bs.writeBoolean(index == null);
-            if (index == null) {
-                int rc = wireFormat.tightMarshalNestedObject1(o, bs);
-                wireFormat.addToMarshallCache(o);
-                return 2 + rc;
-            } else {
-                return 2;
-            }
-        } else {
-            return wireFormat.tightMarshalNestedObject1(o, bs);
-        }
-    }
-
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            if (bs.readBoolean()) {
-                dataOut.writeShort(index.shortValue());
-                wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-        }
-    }
-
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            String clazz = tightUnmarshalString(dataIn, bs);
-            String message = tightUnmarshalString(dataIn, bs);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    private Throwable createThrowable(String className, String message) {
-        try {
-            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
-            Constructor constructor = clazz.getConstructor(new Class[] {String.class});
-            return (Throwable)constructor.newInstance(new Object[] {message});
-        } catch (Throwable e) {
-            return new Throwable(className + ": " + message);
-        }
-    }
-
-    protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
-        throws IOException {
-        if (o == null) {
-            bs.writeBoolean(false);
-            return 0;
-        } else {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += tightMarshalString1(o.getClass().getName(), bs);
-            rc += tightMarshalString1(o.getMessage(), bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                rc += 2;
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    rc += tightMarshalString1(element.getClassName(), bs);
-                    rc += tightMarshalString1(element.getMethodName(), bs);
-                    rc += tightMarshalString1(element.getFileName(), bs);
-                    rc += 4;
-                }
-                rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
-            }
-            return rc;
-        }
-    }
-
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
-                                          BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            tightMarshalString2(o.getClass().getName(), dataOut, bs);
-            tightMarshalString2(o.getMessage(), dataOut, bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    tightMarshalString2(element.getClassName(), dataOut, bs);
-                    tightMarshalString2(element.getMethodName(), dataOut, bs);
-                    tightMarshalString2(element.getFileName(), dataOut, bs);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
-            }
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                int size = dataIn.readShort();
-                byte data[] = new byte[size];
-                dataIn.readFully(data);
-                // Yes deprecated, but we know what we are doing.
-                // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0);
-            } else {
-                return dataIn.readUTF();
-            }
-        } else {
-            return null;
-        }
-    }
-
-    protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
-        bs.writeBoolean(value != null);
-        if (value != null) {
-
-            int strlen = value.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            boolean isOnlyAscii = true;
-
-            value.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                    isOnlyAscii = false;
-                } else {
-                    isOnlyAscii = false;
-                    utflen += 2;
-                }
-            }
-
-            if (utflen >= Short.MAX_VALUE) {
-                throw new IOException("Encountered a String value that is too long to encode.");
-            }
-            bs.writeBoolean(isOnlyAscii);
-            return utflen + 2;
-
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            // If we verified it only holds ascii values
-            if (bs.readBoolean()) {
-                dataOut.writeShort(value.length());
-                dataOut.writeBytes(value);
-            } else {
-                dataOut.writeUTF(value);
-            }
-        }
-    }
-
-    protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           BooleanStream bs) throws IOException {
-        if (objects != null) {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += 2;
-            for (int i = 0; i < objects.length; i++) {
-                rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
-            }
-            return rc;
-        } else {
-            bs.writeBoolean(false);
-            return 0;
-        }
-    }
-
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
-                                            DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
-            }
-        }
-    }
-
-    protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
-        return i;
-    }
-
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
-        throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
-        throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.length + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
-        byte rc[] = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.getLength() + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-
-    //
-    // The loose marshaling logic
-    //
-
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-    }
-
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-    }
-
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(o);
-    }
-
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        return wireFormat.looseUnmarshalNestedObject(dataIn);
-    }
-
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        wireFormat.looseMarshalNestedObject(o, dataOut);
-    }
-
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (dataIn.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.looseUnmarshalNestedObject(dataIn);
-        }
-    }
-
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            dataOut.writeBoolean(index == null);
-            if (index == null) {
-                index = wireFormat.addToMarshallCache(o);
-                dataOut.writeShort(index.shortValue());
-                wireFormat.looseMarshalNestedObject(o, dataOut);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.looseMarshalNestedObject(o, dataOut);
-        }
-    }
-
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (dataIn.readBoolean()) {
-            String clazz = looseUnmarshalString(dataIn);
-            String message = looseUnmarshalString(dataIn);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            looseMarshalString(o.getClass().getName(), dataOut);
-            looseMarshalString(o.getMessage(), dataOut);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    looseMarshalString(element.getClassName(), dataOut);
-                    looseMarshalString(element.getMethodName(), dataOut);
-                    looseMarshalString(element.getFileName(), dataOut);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
-            }
-        }
-    }
-
-    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
-        if (dataIn.readBoolean()) {
-            return dataIn.readUTF();
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(value != null);
-        if (value != null) {
-            dataOut.writeUTF(value);
-        }
-    }
-
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(objects != null);
-        if (objects != null) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                looseMarshalNestedObject(wireFormat, objects[i], dataOut);
-            }
-        }
-    }
-
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
-                                              int i) throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
-        byte rc[] = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BrokerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BrokerIdMarshaller.java
deleted file mode 100644
index 6a66db7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BrokerIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerId info = (BrokerId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BrokerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BrokerInfoMarshaller.java
deleted file mode 100644
index a5e8278..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/BrokerInfoMarshaller.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setBrokerURL(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-        info.setSlaveBroker(bs.readBoolean());
-        info.setMasterBroker(bs.readBoolean());
-        info.setFaultTolerantConfiguration(bs.readBoolean());
-        info.setDuplexConnection(bs.readBoolean());
-        info.setNetworkConnection(bs.readBoolean());
-        info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerUploadUrl(tightUnmarshalString(dataIn, bs));
-        info.setNetworkProperties(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs);
-        rc += tightMarshalString1(info.getBrokerURL(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-        bs.writeBoolean(info.isSlaveBroker());
-        bs.writeBoolean(info.isMasterBroker());
-        bs.writeBoolean(info.isFaultTolerantConfiguration());
-        bs.writeBoolean(info.isDuplexConnection());
-        bs.writeBoolean(info.isNetworkConnection());
-        rc+=tightMarshalLong1(wireFormat, info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getBrokerUploadUrl(), bs);
-        rc += tightMarshalString1(info.getNetworkProperties(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerURL(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerUploadUrl(), dataOut, bs);
-        tightMarshalString2(info.getNetworkProperties(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrokerURL(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(looseUnmarshalString(dataIn));
-        info.setSlaveBroker(dataIn.readBoolean());
-        info.setMasterBroker(dataIn.readBoolean());
-        info.setFaultTolerantConfiguration(dataIn.readBoolean());
-        info.setDuplexConnection(dataIn.readBoolean());
-        info.setNetworkConnection(dataIn.readBoolean());
-        info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerUploadUrl(looseUnmarshalString(dataIn));
-        info.setNetworkProperties(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut);
-        looseMarshalString(info.getBrokerURL(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-        dataOut.writeBoolean(info.isSlaveBroker());
-        dataOut.writeBoolean(info.isMasterBroker());
-        dataOut.writeBoolean(info.isFaultTolerantConfiguration());
-        dataOut.writeBoolean(info.isDuplexConnection());
-        dataOut.writeBoolean(info.isNetworkConnection());
-        looseMarshalLong(wireFormat, info.getConnectionId(), dataOut);
-        looseMarshalString(info.getBrokerUploadUrl(), dataOut);
-        looseMarshalString(info.getNetworkProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionControlMarshaller.java
deleted file mode 100644
index c61c30c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionControlMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(bs.readBoolean());
-        info.setExit(bs.readBoolean());
-        info.setFaultTolerant(bs.readBoolean());
-        info.setResume(bs.readBoolean());
-        info.setSuspend(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        bs.writeBoolean(info.isExit());
-        bs.writeBoolean(info.isFaultTolerant());
-        bs.writeBoolean(info.isResume());
-        bs.writeBoolean(info.isSuspend());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setExit(dataIn.readBoolean());
-        info.setFaultTolerant(dataIn.readBoolean());
-        info.setResume(dataIn.readBoolean());
-        info.setSuspend(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        dataOut.writeBoolean(info.isExit());
-        dataOut.writeBoolean(info.isFaultTolerant());
-        dataOut.writeBoolean(info.isResume());
-        dataOut.writeBoolean(info.isSuspend());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionErrorMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionErrorMarshaller.java
deleted file mode 100644
index 0bbddf6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionErrorMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionErrorMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionError.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionError();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionIdMarshaller.java
deleted file mode 100644
index fe0e8f0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionInfoMarshaller.java
deleted file mode 100644
index a7d057d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConnectionInfoMarshaller.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setPassword(tightUnmarshalString(dataIn, bs));
-        info.setUserName(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(bs.readBoolean());
-        info.setManageable(bs.readBoolean());
-        info.setClientMaster(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalString1(info.getPassword(), bs);
-        rc += tightMarshalString1(info.getUserName(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isBrokerMasterConnector());
-        bs.writeBoolean(info.isManageable());
-        bs.writeBoolean(info.isClientMaster());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalString2(info.getPassword(), dataOut, bs);
-        tightMarshalString2(info.getUserName(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setPassword(looseUnmarshalString(dataIn));
-        info.setUserName(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(dataIn.readBoolean());
-        info.setManageable(dataIn.readBoolean());
-        info.setClientMaster(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalString(info.getPassword(), dataOut);
-        looseMarshalString(info.getUserName(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isBrokerMasterConnector());
-        dataOut.writeBoolean(info.isManageable());
-        dataOut.writeBoolean(info.isClientMaster());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerControlMarshaller.java
deleted file mode 100644
index 0a439dc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerControlMarshaller.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(bs.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(bs.readBoolean());
-        info.setStart(bs.readBoolean());
-        info.setStop(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isFlush());
-        bs.writeBoolean(info.isStart());
-        bs.writeBoolean(info.isStop());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        bs.readBoolean();
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetch());
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(dataIn.readBoolean());
-        info.setStart(dataIn.readBoolean());
-        info.setStop(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeInt(info.getPrefetch());
-        dataOut.writeBoolean(info.isFlush());
-        dataOut.writeBoolean(info.isStart());
-        dataOut.writeBoolean(info.isStop());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerIdMarshaller.java
deleted file mode 100644
index d7ca47f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerInfoMarshaller.java
deleted file mode 100644
index b4b4250..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ConsumerInfoMarshaller.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setBrowser(bs.readBoolean());
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(bs.readBoolean());
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setNoLocal(bs.readBoolean());
-        info.setExclusive(bs.readBoolean());
-        info.setRetroactive(bs.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setNetworkSubscription(bs.readBoolean());
-        info.setOptimizedAcknowledge(bs.readBoolean());
-        info.setNoRangeAcks(bs.readBoolean());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setNetworkConsumerPath(value);
-        }
-        else {
-            info.setNetworkConsumerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isBrowser());
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        bs.writeBoolean(info.isNoLocal());
-        bs.writeBoolean(info.isExclusive());
-        bs.writeBoolean(info.isRetroactive());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs);
-        bs.writeBoolean(info.isNetworkSubscription());
-        bs.writeBoolean(info.isOptimizedAcknowledge());
-        bs.writeBoolean(info.isNoRangeAcks());
-        rc += tightMarshalObjectArray1(wireFormat, info.getNetworkConsumerPath(), bs);
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        bs.readBoolean();
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        dataOut.writeByte(info.getPriority());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalObjectArray2(wireFormat, info.getNetworkConsumerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrowser(dataIn.readBoolean());
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setNoLocal(dataIn.readBoolean());
-        info.setExclusive(dataIn.readBoolean());
-        info.setRetroactive(dataIn.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setNetworkSubscription(dataIn.readBoolean());
-        info.setOptimizedAcknowledge(dataIn.readBoolean());
-        info.setNoRangeAcks(dataIn.readBoolean());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setNetworkConsumerPath(value);
-        }
-        else {
-            info.setNetworkConsumerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isBrowser());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        dataOut.writeBoolean(info.isDispatchAsync());
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        dataOut.writeBoolean(info.isNoLocal());
-        dataOut.writeBoolean(info.isExclusive());
-        dataOut.writeBoolean(info.isRetroactive());
-        dataOut.writeByte(info.getPriority());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut);
-        dataOut.writeBoolean(info.isNetworkSubscription());
-        dataOut.writeBoolean(info.isOptimizedAcknowledge());
-        dataOut.writeBoolean(info.isNoRangeAcks());
-        looseMarshalObjectArray(wireFormat, info.getNetworkConsumerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ControlCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ControlCommandMarshaller.java
deleted file mode 100644
index 543f193..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ControlCommandMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ControlCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ControlCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ControlCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getCommand(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        tightMarshalString2(info.getCommand(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getCommand(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DataArrayResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DataArrayResponseMarshaller.java
deleted file mode 100644
index 192d769..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DataArrayResponseMarshaller.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataArrayResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataArrayResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataArrayResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataArrayResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setData(value);
-        }
-        else {
-            info.setData(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-        tightMarshalObjectArray2(wireFormat, info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setData(value);
-        }
-        else {
-            info.setData(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalObjectArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DataResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DataResponseMarshaller.java
deleted file mode 100644
index f1df7d9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DataResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataResponse info = (DataResponse)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DestinationInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DestinationInfoMarshaller.java
deleted file mode 100644
index fb4b370..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DestinationInfoMarshaller.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DestinationInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DestinationInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DestinationInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DestinationInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeByte(info.getOperationType());
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeByte(info.getOperationType());
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DiscoveryEventMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DiscoveryEventMarshaller.java
deleted file mode 100644
index e926e63..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/DiscoveryEventMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DiscoveryEventMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DiscoveryEvent.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DiscoveryEvent();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(tightUnmarshalString(dataIn, bs));
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getServiceName(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        tightMarshalString2(info.getServiceName(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(looseUnmarshalString(dataIn));
-        info.setBrokerName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getServiceName(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ExceptionResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ExceptionResponseMarshaller.java
deleted file mode 100644
index d02a1d6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ExceptionResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ExceptionResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ExceptionResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ExceptionResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/FlushCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/FlushCommandMarshaller.java
deleted file mode 100644
index 3dc0419..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/FlushCommandMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for FlushCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return FlushCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new FlushCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/IntegerResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/IntegerResponseMarshaller.java
deleted file mode 100644
index 45d18ed..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/IntegerResponseMarshaller.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for IntegerResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return IntegerResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new IntegerResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        dataOut.writeInt(info.getResult());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getResult());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalQueueAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalQueueAckMarshaller.java
deleted file mode 100644
index 44e0f87..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalQueueAckMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalQueueAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalQueueAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalQueueAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTopicAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTopicAckMarshaller.java
deleted file mode 100644
index 096ed69..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTopicAckMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTopicAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTopicAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTopicAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSubscritionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
-        rc += tightMarshalString1(info.getSubscritionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
-        tightMarshalString2(info.getSubscritionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSubscritionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
-        looseMarshalString(info.getSubscritionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTraceMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTraceMarshaller.java
deleted file mode 100644
index f7022ad..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTraceMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTraceMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTrace.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTrace();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getMessage(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        tightMarshalString2(info.getMessage(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getMessage(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTransactionMarshaller.java
deleted file mode 100644
index fe8531e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/JournalTransactionMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTransactionMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTransaction.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTransaction();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        bs.writeBoolean(info.getWasPrepared());
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-        dataOut.writeBoolean(info.getWasPrepared());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/KeepAliveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/KeepAliveInfoMarshaller.java
deleted file mode 100644
index 78da755..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/KeepAliveInfoMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for KeepAliveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return KeepAliveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new KeepAliveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/LastPartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/LastPartialCommandMarshaller.java
deleted file mode 100644
index 801c8c2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/LastPartialCommandMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LastPartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandMarshaller extends PartialCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LastPartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LastPartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/LocalTransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/LocalTransactionIdMarshaller.java
deleted file mode 100644
index 7f40bdb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/LocalTransactionIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LocalTransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LocalTransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LocalTransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MarshallerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MarshallerFactory.java
deleted file mode 100644
index 8603bdf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MarshallerFactory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * MarshallerFactory for Open Wire Format.
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MarshallerFactory {
-
-    /**
-     * Creates a Map of command type -> Marshallers
-     */
-    static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];
-    static {
-
-        add(new ActiveMQBlobMessageMarshaller());
-        add(new ActiveMQBytesMessageMarshaller());
-        add(new ActiveMQMapMessageMarshaller());
-        add(new ActiveMQMessageMarshaller());
-        add(new ActiveMQObjectMessageMarshaller());
-        add(new ActiveMQQueueMarshaller());
-        add(new ActiveMQStreamMessageMarshaller());
-        add(new ActiveMQTempQueueMarshaller());
-        add(new ActiveMQTempTopicMarshaller());
-        add(new ActiveMQTextMessageMarshaller());
-        add(new ActiveMQTopicMarshaller());
-        add(new BrokerIdMarshaller());
-        add(new BrokerInfoMarshaller());
-        add(new ConnectionControlMarshaller());
-        add(new ConnectionErrorMarshaller());
-        add(new ConnectionIdMarshaller());
-        add(new ConnectionInfoMarshaller());
-        add(new ConsumerControlMarshaller());
-        add(new ConsumerIdMarshaller());
-        add(new ConsumerInfoMarshaller());
-        add(new ControlCommandMarshaller());
-        add(new DataArrayResponseMarshaller());
-        add(new DataResponseMarshaller());
-        add(new DestinationInfoMarshaller());
-        add(new DiscoveryEventMarshaller());
-        add(new ExceptionResponseMarshaller());
-        add(new FlushCommandMarshaller());
-        add(new IntegerResponseMarshaller());
-        add(new JournalQueueAckMarshaller());
-        add(new JournalTopicAckMarshaller());
-        add(new JournalTraceMarshaller());
-        add(new JournalTransactionMarshaller());
-        add(new KeepAliveInfoMarshaller());
-        add(new LastPartialCommandMarshaller());
-        add(new LocalTransactionIdMarshaller());
-        add(new MessageAckMarshaller());
-        add(new MessageDispatchMarshaller());
-        add(new MessageDispatchNotificationMarshaller());
-        add(new MessageIdMarshaller());
-        add(new MessagePullMarshaller());
-        add(new NetworkBridgeFilterMarshaller());
-        add(new PartialCommandMarshaller());
-        add(new ProducerAckMarshaller());
-        add(new ProducerIdMarshaller());
-        add(new ProducerInfoMarshaller());
-        add(new RemoveInfoMarshaller());
-        add(new RemoveSubscriptionInfoMarshaller());
-        add(new ReplayCommandMarshaller());
-        add(new ResponseMarshaller());
-        add(new SessionIdMarshaller());
-        add(new SessionInfoMarshaller());
-        add(new ShutdownInfoMarshaller());
-        add(new SubscriptionInfoMarshaller());
-        add(new TransactionInfoMarshaller());
-        add(new WireFormatInfoMarshaller());
-        add(new XATransactionIdMarshaller());
-
-    }
-
-    static private void add(DataStreamMarshaller dsm) {
-        marshaller[dsm.getDataStructureType()] = dsm;
-    }
-    
-    static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
-        return marshaller;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageAckMarshaller.java
deleted file mode 100644
index 2abd449..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageAckMarshaller.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs);
-
-        return rc + 5;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageAck info = (MessageAck)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeByte(info.getAckType());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeByte(info.getAckType());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageDispatchMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageDispatchMarshaller.java
deleted file mode 100644
index 62fa64f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageDispatchMarshaller.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatch.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatch();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessage((org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessage((org.apache.activemq.command.Message) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationMarshaller.java
deleted file mode 100644
index 8bd3677..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationMarshaller.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchNotificationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatchNotification.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatchNotification();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageIdMarshaller.java
deleted file mode 100644
index c1e990d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageId info = (MessageId)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageMarshaller.java
deleted file mode 100644
index 8314455..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessageMarshaller.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class MessageMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setGroupID(tightUnmarshalString(dataIn, bs));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setPersistent(bs.readBoolean());
-        info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setType(tightUnmarshalString(dataIn, bs));
-        info.setContent(tightUnmarshalByteSequence(dataIn, bs));
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-        info.setDataStructure((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setCompressed(bs.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setUserID(tightUnmarshalString(dataIn, bs));
-        info.setRecievedByDFBridge(bs.readBoolean());
-        info.setDroppable(bs.readBoolean());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setCluster(value);
-        }
-        else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerOutTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs);
-        rc += tightMarshalString1(info.getGroupID(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        bs.writeBoolean(info.isPersistent());
-        rc+=tightMarshalLong1(wireFormat, info.getExpiration(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
-        rc += tightMarshalString1(info.getType(), bs);
-        rc += tightMarshalByteSequence1(info.getContent(), bs);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs);
-        bs.writeBoolean(info.isCompressed());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getArrival(), bs);
-        rc += tightMarshalString1(info.getUserID(), bs);
-        bs.writeBoolean(info.isRecievedByDFBridge());
-        bs.writeBoolean(info.isDroppable());
-        rc += tightMarshalObjectArray1(wireFormat, info.getCluster(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerInTime(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerOutTime(), bs);
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Message info = (Message)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs);
-        tightMarshalString2(info.getGroupID(), dataOut, bs);
-        dataOut.writeInt(info.getGroupSequence());
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
-        dataOut.writeByte(info.getPriority());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
-        tightMarshalString2(info.getType(), dataOut, bs);
-        tightMarshalByteSequence2(info.getContent(), dataOut, bs);
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getRedeliveryCounter());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
-        tightMarshalString2(info.getUserID(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalObjectArray2(wireFormat, info.getCluster(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerInTime(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerOutTime(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setGroupID(looseUnmarshalString(dataIn));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setPersistent(dataIn.readBoolean());
-        info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
-        info.setType(looseUnmarshalString(dataIn));
-        info.setContent(looseUnmarshalByteSequence(dataIn));
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-        info.setDataStructure((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setCompressed(dataIn.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
-        info.setUserID(looseUnmarshalString(dataIn));
-        info.setRecievedByDFBridge(dataIn.readBoolean());
-        info.setDroppable(dataIn.readBoolean());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setCluster(value);
-        }
-        else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerOutTime(looseUnmarshalLong(wireFormat, dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut);
-        looseMarshalString(info.getGroupID(), dataOut);
-        dataOut.writeInt(info.getGroupSequence());
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        dataOut.writeBoolean(info.isPersistent());
-        looseMarshalLong(wireFormat, info.getExpiration(), dataOut);
-        dataOut.writeByte(info.getPriority());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimestamp(), dataOut);
-        looseMarshalString(info.getType(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getContent(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isCompressed());
-        dataOut.writeInt(info.getRedeliveryCounter());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalLong(wireFormat, info.getArrival(), dataOut);
-        looseMarshalString(info.getUserID(), dataOut);
-        dataOut.writeBoolean(info.isRecievedByDFBridge());
-        dataOut.writeBoolean(info.isDroppable());
-        looseMarshalObjectArray(wireFormat, info.getCluster(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerInTime(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerOutTime(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessagePullMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessagePullMarshaller.java
deleted file mode 100644
index e42f0e4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/MessagePullMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessagePullMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessagePull.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessagePull();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessagePull info = (MessagePull)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterMarshaller.java
deleted file mode 100644
index ee9bdcd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for NetworkBridgeFilterMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return NetworkBridgeFilter.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new NetworkBridgeFilter();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        dataOut.writeInt(info.getNetworkTTL());
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getNetworkTTL());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/PartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/PartialCommandMarshaller.java
deleted file mode 100644
index 8537d48..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/PartialCommandMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for PartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return PartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new PartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getData(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        tightMarshalByteArray2(info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        looseMarshalByteArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerAckMarshaller.java
deleted file mode 100644
index 7b86c63..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerAckMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        dataOut.writeInt(info.getSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        dataOut.writeInt(info.getSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerIdMarshaller.java
deleted file mode 100644
index feaa31e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerId info = (ProducerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerInfoMarshaller.java
deleted file mode 100644
index 1cefcc3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ProducerInfoMarshaller.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(bs.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isDispatchAsync());
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/RemoveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/RemoveInfoMarshaller.java
deleted file mode 100644
index c6d8153..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/RemoveInfoMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setLastDeliveredSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getLastDeliveredSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getLastDeliveredSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setLastDeliveredSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut);
-        looseMarshalLong(wireFormat, info.getLastDeliveredSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoMarshaller.java
deleted file mode 100644
index ccb880e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveSubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ReplayCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ReplayCommandMarshaller.java
deleted file mode 100644
index 6de956b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ReplayCommandMarshaller.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ReplayCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ReplayCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ReplayCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 8;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ResponseMarshaller.java
deleted file mode 100644
index 6c81e4f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ResponseMarshaller.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return Response.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new Response();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Response info = (Response)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Response info = (Response)o;
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Response info = (Response)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SessionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SessionIdMarshaller.java
deleted file mode 100644
index 646ca52..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SessionIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionId info = (SessionId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SessionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SessionInfoMarshaller.java
deleted file mode 100644
index ee365c0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SessionInfoMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ShutdownInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ShutdownInfoMarshaller.java
deleted file mode 100644
index 8bb46ef..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/ShutdownInfoMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ShutdownInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ShutdownInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ShutdownInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SubscriptionInfoMarshaller.java
deleted file mode 100644
index cd07b75..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/SubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getSubscribedDestination(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/TransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/TransactionIdMarshaller.java
deleted file mode 100644
index 82ee1d3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/TransactionIdMarshaller.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/TransactionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/TransactionInfoMarshaller.java
deleted file mode 100644
index 4ba0b5d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/TransactionInfoMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return TransactionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new TransactionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/WireFormatInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/WireFormatInfoMarshaller.java
deleted file mode 100644
index b6e8222..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/WireFormatInfoMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for WireFormatInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return WireFormatInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new WireFormatInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-        tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8);
-        dataOut.writeInt(info.getVersion());
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
-        dataOut.writeInt(info.getVersion());
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/XATransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/XATransactionIdMarshaller.java
deleted file mode 100644
index 40d5d57..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v5/XATransactionIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for XATransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return XATransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new XATransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
-        info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs);
-        rc += tightMarshalByteArray1(info.getBranchQualifier(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        dataOut.writeInt(info.getFormatId());
-        tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs);
-        tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
-        info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFormatId());
-        looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut);
-        looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQBlobMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQBlobMessageMarshaller.java
deleted file mode 100644
index d81a37e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQBlobMessageMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBlobMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBlobMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBlobMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBlobMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(tightUnmarshalString(dataIn, bs));
-        info.setMimeType(tightUnmarshalString(dataIn, bs));
-        info.setDeletedByBroker(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getRemoteBlobUrl(), bs);
-        rc += tightMarshalString1(info.getMimeType(), bs);
-        bs.writeBoolean(info.isDeletedByBroker());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        tightMarshalString2(info.getRemoteBlobUrl(), dataOut, bs);
-        tightMarshalString2(info.getMimeType(), dataOut, bs);
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-        info.setRemoteBlobUrl(looseUnmarshalString(dataIn));
-        info.setMimeType(looseUnmarshalString(dataIn));
-        info.setDeletedByBroker(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getRemoteBlobUrl(), dataOut);
-        looseMarshalString(info.getMimeType(), dataOut);
-        dataOut.writeBoolean(info.isDeletedByBroker());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQBytesMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQBytesMessageMarshaller.java
deleted file mode 100644
index bec50c9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQBytesMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQBytesMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQDestinationMarshaller.java
deleted file mode 100644
index a453fdd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQDestinationMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getPhysicalName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        tightMarshalString2(info.getPhysicalName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-        info.setPhysicalName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ActiveMQDestination info = (ActiveMQDestination)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getPhysicalName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQMapMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQMapMessageMarshaller.java
deleted file mode 100644
index 8563c10..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQMapMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMapMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQMessageMarshaller.java
deleted file mode 100644
index 1e28640..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQMessageMarshaller extends MessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQObjectMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQObjectMessageMarshaller.java
deleted file mode 100644
index e9267a9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQObjectMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQObjectMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQQueueMarshaller.java
deleted file mode 100644
index 9fe2606..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQQueueMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQStreamMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQStreamMessageMarshaller.java
deleted file mode 100644
index cf3e2be..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQStreamMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQStreamMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempDestinationMarshaller.java
deleted file mode 100644
index 0df5004..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempDestinationMarshaller.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempQueueMarshaller.java
deleted file mode 100644
index f5ee83e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempQueueMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempQueue.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempQueue();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempTopicMarshaller.java
deleted file mode 100644
index 1bb07d8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTempTopicMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTempTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTempTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTextMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTextMessageMarshaller.java
deleted file mode 100644
index d364ac1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTextMessageMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTextMessage.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTextMessage();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTopicMarshaller.java
deleted file mode 100644
index 8449a5b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ActiveMQTopicMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ActiveMQTopic.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ActiveMQTopic();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BaseCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BaseCommandMarshaller.java
deleted file mode 100644
index 917686b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BaseCommandMarshaller.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BaseCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isResponseRequired());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BaseCommand info = (BaseCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BaseCommand info = (BaseCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setResponseRequired(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BaseCommand info = (BaseCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        dataOut.writeBoolean(info.isResponseRequired());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BaseDataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BaseDataStreamMarshaller.java
deleted file mode 100644
index a0d066a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BaseDataStreamMarshaller.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/**
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-
-public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
-
-    public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
-
-    static {
-        Constructor constructor = null;
-        try {
-            constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
-                                                                              String.class, int.class});
-        } catch (Throwable e) {
-        }
-        STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
-    }
-
-    public abstract byte getDataStructureType();
-
-    public abstract DataStructure createObject();
-
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-        return 0;
-    }
-
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-    }
-
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-    }
-
-    public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
-        if (o == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(false);
-            return 0;
-        } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(true);
-            return 2;
-        } else if ((o & 0xFFFFFFFF00000000L) == 0) {
-            bs.writeBoolean(true);
-            bs.writeBoolean(false);
-            return 4;
-        } else {
-            bs.writeBoolean(true);
-            bs.writeBoolean(true);
-            return 8;
-        }
-    }
-
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                dataOut.writeLong(o);
-            } else {
-                dataOut.writeInt((int)o);
-            }
-        } else {
-            if (bs.readBoolean()) {
-                dataOut.writeShort((int)o);
-            }
-        }
-    }
-
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                return dataIn.readLong();
-            } else {
-                return toLong(dataIn.readInt());
-            }
-        } else {
-            if (bs.readBoolean()) {
-                return toLong(dataIn.readShort());
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    protected long toLong(short value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffL;
-    }
-
-    protected long toLong(int value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffffffL;
-    }
-
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-    }
-
-    protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        return wireFormat.tightMarshalNestedObject1(o, bs);
-    }
-
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-    }
-
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (bs.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-        }
-    }
-
-    protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            bs.writeBoolean(index == null);
-            if (index == null) {
-                int rc = wireFormat.tightMarshalNestedObject1(o, bs);
-                wireFormat.addToMarshallCache(o);
-                return 2 + rc;
-            } else {
-                return 2;
-            }
-        } else {
-            return wireFormat.tightMarshalNestedObject1(o, bs);
-        }
-    }
-
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            if (bs.readBoolean()) {
-                dataOut.writeShort(index.shortValue());
-                wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-        }
-    }
-
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            String clazz = tightUnmarshalString(dataIn, bs);
-            String message = tightUnmarshalString(dataIn, bs);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    private Throwable createThrowable(String className, String message) {
-        try {
-            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
-            Constructor constructor = clazz.getConstructor(new Class[] {String.class});
-            return (Throwable)constructor.newInstance(new Object[] {message});
-        } catch (Throwable e) {
-            return new Throwable(className + ": " + message);
-        }
-    }
-
-    protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
-        throws IOException {
-        if (o == null) {
-            bs.writeBoolean(false);
-            return 0;
-        } else {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += tightMarshalString1(o.getClass().getName(), bs);
-            rc += tightMarshalString1(o.getMessage(), bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                rc += 2;
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    rc += tightMarshalString1(element.getClassName(), bs);
-                    rc += tightMarshalString1(element.getMethodName(), bs);
-                    rc += tightMarshalString1(element.getFileName(), bs);
-                    rc += 4;
-                }
-                rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
-            }
-            return rc;
-        }
-    }
-
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
-                                          BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            tightMarshalString2(o.getClass().getName(), dataOut, bs);
-            tightMarshalString2(o.getMessage(), dataOut, bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    tightMarshalString2(element.getClassName(), dataOut, bs);
-                    tightMarshalString2(element.getMethodName(), dataOut, bs);
-                    tightMarshalString2(element.getFileName(), dataOut, bs);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
-            }
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                int size = dataIn.readShort();
-                byte data[] = new byte[size];
-                dataIn.readFully(data);
-                // Yes deprecated, but we know what we are doing.
-                // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0);
-            } else {
-                return dataIn.readUTF();
-            }
-        } else {
-            return null;
-        }
-    }
-
-    protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
-        bs.writeBoolean(value != null);
-        if (value != null) {
-
-            int strlen = value.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            boolean isOnlyAscii = true;
-
-            value.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                    isOnlyAscii = false;
-                } else {
-                    isOnlyAscii = false;
-                    utflen += 2;
-                }
-            }
-
-            if (utflen >= Short.MAX_VALUE) {
-                throw new IOException("Encountered a String value that is too long to encode.");
-            }
-            bs.writeBoolean(isOnlyAscii);
-            return utflen + 2;
-
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            // If we verified it only holds ascii values
-            if (bs.readBoolean()) {
-                dataOut.writeShort(value.length());
-                dataOut.writeBytes(value);
-            } else {
-                dataOut.writeUTF(value);
-            }
-        }
-    }
-
-    protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           BooleanStream bs) throws IOException {
-        if (objects != null) {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += 2;
-            for (int i = 0; i < objects.length; i++) {
-                rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
-            }
-            return rc;
-        } else {
-            bs.writeBoolean(false);
-            return 0;
-        }
-    }
-
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
-                                            DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
-            }
-        }
-    }
-
-    protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
-        return i;
-    }
-
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
-        throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
-        throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.length + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
-        byte rc[] = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.getLength() + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-
-    //
-    // The loose marshaling logic
-    //
-
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-    }
-
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-    }
-
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(o);
-    }
-
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        return wireFormat.looseUnmarshalNestedObject(dataIn);
-    }
-
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        wireFormat.looseMarshalNestedObject(o, dataOut);
-    }
-
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (dataIn.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.looseUnmarshalNestedObject(dataIn);
-        }
-    }
-
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            dataOut.writeBoolean(index == null);
-            if (index == null) {
-                index = wireFormat.addToMarshallCache(o);
-                dataOut.writeShort(index.shortValue());
-                wireFormat.looseMarshalNestedObject(o, dataOut);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.looseMarshalNestedObject(o, dataOut);
-        }
-    }
-
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (dataIn.readBoolean()) {
-            String clazz = looseUnmarshalString(dataIn);
-            String message = looseUnmarshalString(dataIn);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            looseMarshalString(o.getClass().getName(), dataOut);
-            looseMarshalString(o.getMessage(), dataOut);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    looseMarshalString(element.getClassName(), dataOut);
-                    looseMarshalString(element.getMethodName(), dataOut);
-                    looseMarshalString(element.getFileName(), dataOut);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
-            }
-        }
-    }
-
-    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
-        if (dataIn.readBoolean()) {
-            return dataIn.readUTF();
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(value != null);
-        if (value != null) {
-            dataOut.writeUTF(value);
-        }
-    }
-
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(objects != null);
-        if (objects != null) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                looseMarshalNestedObject(wireFormat, objects[i], dataOut);
-            }
-        }
-    }
-
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
-                                              int i) throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
-        byte rc[] = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BrokerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BrokerIdMarshaller.java
deleted file mode 100644
index 243dffa..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BrokerIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerId info = (BrokerId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerId info = (BrokerId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerId info = (BrokerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BrokerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BrokerInfoMarshaller.java
deleted file mode 100644
index 55c034b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/BrokerInfoMarshaller.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for BrokerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return BrokerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new BrokerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setBrokerURL(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-        info.setSlaveBroker(bs.readBoolean());
-        info.setMasterBroker(bs.readBoolean());
-        info.setFaultTolerantConfiguration(bs.readBoolean());
-        info.setDuplexConnection(bs.readBoolean());
-        info.setNetworkConnection(bs.readBoolean());
-        info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerUploadUrl(tightUnmarshalString(dataIn, bs));
-        info.setNetworkProperties(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs);
-        rc += tightMarshalString1(info.getBrokerURL(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-        bs.writeBoolean(info.isSlaveBroker());
-        bs.writeBoolean(info.isMasterBroker());
-        bs.writeBoolean(info.isFaultTolerantConfiguration());
-        bs.writeBoolean(info.isDuplexConnection());
-        bs.writeBoolean(info.isNetworkConnection());
-        rc+=tightMarshalLong1(wireFormat, info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getBrokerUploadUrl(), bs);
-        rc += tightMarshalString1(info.getNetworkProperties(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        BrokerInfo info = (BrokerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerURL(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getBrokerUploadUrl(), dataOut, bs);
-        tightMarshalString2(info.getNetworkProperties(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        BrokerInfo info = (BrokerInfo)o;
-        info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrokerURL(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        else {
-            info.setPeerBrokerInfos(null);
-        }
-        info.setBrokerName(looseUnmarshalString(dataIn));
-        info.setSlaveBroker(dataIn.readBoolean());
-        info.setMasterBroker(dataIn.readBoolean());
-        info.setFaultTolerantConfiguration(dataIn.readBoolean());
-        info.setDuplexConnection(dataIn.readBoolean());
-        info.setNetworkConnection(dataIn.readBoolean());
-        info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerUploadUrl(looseUnmarshalString(dataIn));
-        info.setNetworkProperties(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        BrokerInfo info = (BrokerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut);
-        looseMarshalString(info.getBrokerURL(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-        dataOut.writeBoolean(info.isSlaveBroker());
-        dataOut.writeBoolean(info.isMasterBroker());
-        dataOut.writeBoolean(info.isFaultTolerantConfiguration());
-        dataOut.writeBoolean(info.isDuplexConnection());
-        dataOut.writeBoolean(info.isNetworkConnection());
-        looseMarshalLong(wireFormat, info.getConnectionId(), dataOut);
-        looseMarshalString(info.getBrokerUploadUrl(), dataOut);
-        looseMarshalString(info.getNetworkProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionControlMarshaller.java
deleted file mode 100644
index f8f2954..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionControlMarshaller.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(bs.readBoolean());
-        info.setExit(bs.readBoolean());
-        info.setFaultTolerant(bs.readBoolean());
-        info.setResume(bs.readBoolean());
-        info.setSuspend(bs.readBoolean());
-        info.setConnectedBrokers(tightUnmarshalString(dataIn, bs));
-        info.setReconnectTo(tightUnmarshalString(dataIn, bs));
-        info.setRebalanceConnection(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        bs.writeBoolean(info.isClose());
-        bs.writeBoolean(info.isExit());
-        bs.writeBoolean(info.isFaultTolerant());
-        bs.writeBoolean(info.isResume());
-        bs.writeBoolean(info.isSuspend());
-        rc += tightMarshalString1(info.getConnectedBrokers(), bs);
-        rc += tightMarshalString1(info.getReconnectTo(), bs);
-        bs.writeBoolean(info.isRebalanceConnection());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionControl info = (ConnectionControl)o;
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalString2(info.getConnectedBrokers(), dataOut, bs);
-        tightMarshalString2(info.getReconnectTo(), dataOut, bs);
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionControl info = (ConnectionControl)o;
-        info.setClose(dataIn.readBoolean());
-        info.setExit(dataIn.readBoolean());
-        info.setFaultTolerant(dataIn.readBoolean());
-        info.setResume(dataIn.readBoolean());
-        info.setSuspend(dataIn.readBoolean());
-        info.setConnectedBrokers(looseUnmarshalString(dataIn));
-        info.setReconnectTo(looseUnmarshalString(dataIn));
-        info.setRebalanceConnection(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionControl info = (ConnectionControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeBoolean(info.isClose());
-        dataOut.writeBoolean(info.isExit());
-        dataOut.writeBoolean(info.isFaultTolerant());
-        dataOut.writeBoolean(info.isResume());
-        dataOut.writeBoolean(info.isSuspend());
-        looseMarshalString(info.getConnectedBrokers(), dataOut);
-        looseMarshalString(info.getReconnectTo(), dataOut);
-        dataOut.writeBoolean(info.isRebalanceConnection());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionErrorMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionErrorMarshaller.java
deleted file mode 100644
index 7ed7557..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionErrorMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionErrorMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionError.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionError();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionError info = (ConnectionError)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionError info = (ConnectionError)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionError info = (ConnectionError)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionIdMarshaller.java
deleted file mode 100644
index c83bb49..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionIdMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionId info = (ConnectionId)o;
-        tightMarshalString2(info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionId info = (ConnectionId)o;
-        info.setValue(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionId info = (ConnectionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionInfoMarshaller.java
deleted file mode 100644
index d179353..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConnectionInfoMarshaller.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConnectionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConnectionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConnectionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setPassword(tightUnmarshalString(dataIn, bs));
-        info.setUserName(tightUnmarshalString(dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(bs.readBoolean());
-        info.setManageable(bs.readBoolean());
-        info.setClientMaster(bs.readBoolean());
-        info.setFaultTolerant(bs.readBoolean());
-        info.setFailoverReconnect(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalString1(info.getPassword(), bs);
-        rc += tightMarshalString1(info.getUserName(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isBrokerMasterConnector());
-        bs.writeBoolean(info.isManageable());
-        bs.writeBoolean(info.isClientMaster());
-        bs.writeBoolean(info.isFaultTolerant());
-        bs.writeBoolean(info.isFailoverReconnect());
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalString2(info.getPassword(), dataOut, bs);
-        tightMarshalString2(info.getUserName(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConnectionInfo info = (ConnectionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setPassword(looseUnmarshalString(dataIn));
-        info.setUserName(looseUnmarshalString(dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setBrokerMasterConnector(dataIn.readBoolean());
-        info.setManageable(dataIn.readBoolean());
-        info.setClientMaster(dataIn.readBoolean());
-        info.setFaultTolerant(dataIn.readBoolean());
-        info.setFailoverReconnect(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConnectionInfo info = (ConnectionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalString(info.getPassword(), dataOut);
-        looseMarshalString(info.getUserName(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isBrokerMasterConnector());
-        dataOut.writeBoolean(info.isManageable());
-        dataOut.writeBoolean(info.isClientMaster());
-        dataOut.writeBoolean(info.isFaultTolerant());
-        dataOut.writeBoolean(info.isFailoverReconnect());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerControlMarshaller.java
deleted file mode 100644
index 575b9a0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerControlMarshaller.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerControlMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerControl.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerControl();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setClose(bs.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(bs.readBoolean());
-        info.setStart(bs.readBoolean());
-        info.setStop(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        bs.writeBoolean(info.isClose());
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isFlush());
-        bs.writeBoolean(info.isStart());
-        bs.writeBoolean(info.isStop());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerControl info = (ConsumerControl)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetch());
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerControl info = (ConsumerControl)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setClose(dataIn.readBoolean());
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setPrefetch(dataIn.readInt());
-        info.setFlush(dataIn.readBoolean());
-        info.setStart(dataIn.readBoolean());
-        info.setStop(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerControl info = (ConsumerControl)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeBoolean(info.isClose());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeInt(info.getPrefetch());
-        dataOut.writeBoolean(info.isFlush());
-        dataOut.writeBoolean(info.isStart());
-        dataOut.writeBoolean(info.isStop());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerIdMarshaller.java
deleted file mode 100644
index e197eaa..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerId info = (ConsumerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerId info = (ConsumerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerId info = (ConsumerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerInfoMarshaller.java
deleted file mode 100644
index e2f7cc5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ConsumerInfoMarshaller.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ConsumerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ConsumerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ConsumerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setBrowser(bs.readBoolean());
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(bs.readBoolean());
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
-        info.setNoLocal(bs.readBoolean());
-        info.setExclusive(bs.readBoolean());
-        info.setRetroactive(bs.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setNetworkSubscription(bs.readBoolean());
-        info.setOptimizedAcknowledge(bs.readBoolean());
-        info.setNoRangeAcks(bs.readBoolean());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setNetworkConsumerPath(value);
-        }
-        else {
-            info.setNetworkConsumerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        bs.writeBoolean(info.isBrowser());
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubscriptionName(), bs);
-        bs.writeBoolean(info.isNoLocal());
-        bs.writeBoolean(info.isExclusive());
-        bs.writeBoolean(info.isRetroactive());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs);
-        bs.writeBoolean(info.isNetworkSubscription());
-        bs.writeBoolean(info.isOptimizedAcknowledge());
-        bs.writeBoolean(info.isNoRangeAcks());
-        rc += tightMarshalObjectArray1(wireFormat, info.getNetworkConsumerPath(), bs);
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        bs.readBoolean();
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        dataOut.writeByte(info.getPriority());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalObjectArray2(wireFormat, info.getNetworkConsumerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ConsumerInfo info = (ConsumerInfo)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setBrowser(dataIn.readBoolean());
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setPrefetchSize(dataIn.readInt());
-        info.setMaximumPendingMessageLimit(dataIn.readInt());
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubscriptionName(looseUnmarshalString(dataIn));
-        info.setNoLocal(dataIn.readBoolean());
-        info.setExclusive(dataIn.readBoolean());
-        info.setRetroactive(dataIn.readBoolean());
-        info.setPriority(dataIn.readByte());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setNetworkSubscription(dataIn.readBoolean());
-        info.setOptimizedAcknowledge(dataIn.readBoolean());
-        info.setNoRangeAcks(dataIn.readBoolean());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setNetworkConsumerPath(value);
-        }
-        else {
-            info.setNetworkConsumerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ConsumerInfo info = (ConsumerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isBrowser());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeInt(info.getPrefetchSize());
-        dataOut.writeInt(info.getMaximumPendingMessageLimit());
-        dataOut.writeBoolean(info.isDispatchAsync());
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubscriptionName(), dataOut);
-        dataOut.writeBoolean(info.isNoLocal());
-        dataOut.writeBoolean(info.isExclusive());
-        dataOut.writeBoolean(info.isRetroactive());
-        dataOut.writeByte(info.getPriority());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut);
-        dataOut.writeBoolean(info.isNetworkSubscription());
-        dataOut.writeBoolean(info.isOptimizedAcknowledge());
-        dataOut.writeBoolean(info.isNoRangeAcks());
-        looseMarshalObjectArray(wireFormat, info.getNetworkConsumerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ControlCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ControlCommandMarshaller.java
deleted file mode 100644
index 0c370c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ControlCommandMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ControlCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ControlCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ControlCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getCommand(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ControlCommand info = (ControlCommand)o;
-        tightMarshalString2(info.getCommand(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ControlCommand info = (ControlCommand)o;
-        info.setCommand(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ControlCommand info = (ControlCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getCommand(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DataArrayResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DataArrayResponseMarshaller.java
deleted file mode 100644
index 055a0a1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DataArrayResponseMarshaller.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataArrayResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataArrayResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataArrayResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataArrayResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setData(value);
-        }
-        else {
-            info.setData(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-        tightMarshalObjectArray2(wireFormat, info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setData(value);
-        }
-        else {
-            info.setData(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataArrayResponse info = (DataArrayResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalObjectArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DataResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DataResponseMarshaller.java
deleted file mode 100644
index 483977b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DataResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DataResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DataResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DataResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DataResponse info = (DataResponse)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DataResponse info = (DataResponse)o;
-        info.setData((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DataResponse info = (DataResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DestinationInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DestinationInfoMarshaller.java
deleted file mode 100644
index e740b9f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DestinationInfoMarshaller.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DestinationInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DestinationInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DestinationInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DestinationInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DestinationInfo info = (DestinationInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        dataOut.writeByte(info.getOperationType());
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DestinationInfo info = (DestinationInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOperationType(dataIn.readByte());
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DestinationInfo info = (DestinationInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        dataOut.writeByte(info.getOperationType());
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DiscoveryEventMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DiscoveryEventMarshaller.java
deleted file mode 100644
index 387759e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/DiscoveryEventMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for DiscoveryEventMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return DiscoveryEvent.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new DiscoveryEvent();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(tightUnmarshalString(dataIn, bs));
-        info.setBrokerName(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getServiceName(), bs);
-        rc += tightMarshalString1(info.getBrokerName(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        tightMarshalString2(info.getServiceName(), dataOut, bs);
-        tightMarshalString2(info.getBrokerName(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-        info.setServiceName(looseUnmarshalString(dataIn));
-        info.setBrokerName(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        DiscoveryEvent info = (DiscoveryEvent)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getServiceName(), dataOut);
-        looseMarshalString(info.getBrokerName(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ExceptionResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ExceptionResponseMarshaller.java
deleted file mode 100644
index 7e26f69..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ExceptionResponseMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ExceptionResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ExceptionResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ExceptionResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ExceptionResponse info = (ExceptionResponse)o;
-        info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ExceptionResponse info = (ExceptionResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalThrowable(wireFormat, info.getException(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/FlushCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/FlushCommandMarshaller.java
deleted file mode 100644
index bbee05a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/FlushCommandMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for FlushCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return FlushCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new FlushCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/IntegerResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/IntegerResponseMarshaller.java
deleted file mode 100644
index dcaa0fb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/IntegerResponseMarshaller.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for IntegerResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseMarshaller extends ResponseMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return IntegerResponse.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new IntegerResponse();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        IntegerResponse info = (IntegerResponse)o;
-        dataOut.writeInt(info.getResult());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        IntegerResponse info = (IntegerResponse)o;
-        info.setResult(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        IntegerResponse info = (IntegerResponse)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getResult());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalQueueAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalQueueAckMarshaller.java
deleted file mode 100644
index 1b3baf3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalQueueAckMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalQueueAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalQueueAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalQueueAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalQueueAck info = (JournalQueueAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageAck((org.apache.activemq.command.MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalQueueAck info = (JournalQueueAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTopicAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTopicAckMarshaller.java
deleted file mode 100644
index 68be673..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTopicAckMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTopicAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTopicAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTopicAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSubscritionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
-        rc += tightMarshalString1(info.getSubscritionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
-        tightMarshalString2(info.getSubscritionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTopicAck info = (JournalTopicAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSubscritionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTopicAck info = (JournalTopicAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
-        looseMarshalString(info.getSubscritionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTraceMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTraceMarshaller.java
deleted file mode 100644
index 925eb68..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTraceMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTraceMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTrace.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTrace();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getMessage(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTrace info = (JournalTrace)o;
-        tightMarshalString2(info.getMessage(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTrace info = (JournalTrace)o;
-        info.setMessage(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTrace info = (JournalTrace)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getMessage(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTransactionMarshaller.java
deleted file mode 100644
index 47f4d77..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/JournalTransactionMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for JournalTransactionMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return JournalTransaction.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new JournalTransaction();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(bs.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        bs.writeBoolean(info.getWasPrepared());
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        JournalTransaction info = (JournalTransaction)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-        bs.readBoolean();
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        JournalTransaction info = (JournalTransaction)o;
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-        info.setWasPrepared(dataIn.readBoolean());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        JournalTransaction info = (JournalTransaction)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-        dataOut.writeBoolean(info.getWasPrepared());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/KeepAliveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/KeepAliveInfoMarshaller.java
deleted file mode 100644
index 327d43b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/KeepAliveInfoMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for KeepAliveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return KeepAliveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new KeepAliveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/LastPartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/LastPartialCommandMarshaller.java
deleted file mode 100644
index e38c331..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/LastPartialCommandMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LastPartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandMarshaller extends PartialCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LastPartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LastPartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/LocalTransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/LocalTransactionIdMarshaller.java
deleted file mode 100644
index c6943c3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/LocalTransactionIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for LocalTransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return LocalTransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new LocalTransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        LocalTransactionId info = (LocalTransactionId)o;
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        LocalTransactionId info = (LocalTransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MarshallerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MarshallerFactory.java
deleted file mode 100644
index e021c1d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MarshallerFactory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * MarshallerFactory for Open Wire Format.
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MarshallerFactory {
-
-    /**
-     * Creates a Map of command type -> Marshallers
-     */
-    static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];
-    static {
-
-        add(new ActiveMQBlobMessageMarshaller());
-        add(new ActiveMQBytesMessageMarshaller());
-        add(new ActiveMQMapMessageMarshaller());
-        add(new ActiveMQMessageMarshaller());
-        add(new ActiveMQObjectMessageMarshaller());
-        add(new ActiveMQQueueMarshaller());
-        add(new ActiveMQStreamMessageMarshaller());
-        add(new ActiveMQTempQueueMarshaller());
-        add(new ActiveMQTempTopicMarshaller());
-        add(new ActiveMQTextMessageMarshaller());
-        add(new ActiveMQTopicMarshaller());
-        add(new BrokerIdMarshaller());
-        add(new BrokerInfoMarshaller());
-        add(new ConnectionControlMarshaller());
-        add(new ConnectionErrorMarshaller());
-        add(new ConnectionIdMarshaller());
-        add(new ConnectionInfoMarshaller());
-        add(new ConsumerControlMarshaller());
-        add(new ConsumerIdMarshaller());
-        add(new ConsumerInfoMarshaller());
-        add(new ControlCommandMarshaller());
-        add(new DataArrayResponseMarshaller());
-        add(new DataResponseMarshaller());
-        add(new DestinationInfoMarshaller());
-        add(new DiscoveryEventMarshaller());
-        add(new ExceptionResponseMarshaller());
-        add(new FlushCommandMarshaller());
-        add(new IntegerResponseMarshaller());
-        add(new JournalQueueAckMarshaller());
-        add(new JournalTopicAckMarshaller());
-        add(new JournalTraceMarshaller());
-        add(new JournalTransactionMarshaller());
-        add(new KeepAliveInfoMarshaller());
-        add(new LastPartialCommandMarshaller());
-        add(new LocalTransactionIdMarshaller());
-        add(new MessageAckMarshaller());
-        add(new MessageDispatchMarshaller());
-        add(new MessageDispatchNotificationMarshaller());
-        add(new MessageIdMarshaller());
-        add(new MessagePullMarshaller());
-        add(new NetworkBridgeFilterMarshaller());
-        add(new PartialCommandMarshaller());
-        add(new ProducerAckMarshaller());
-        add(new ProducerIdMarshaller());
-        add(new ProducerInfoMarshaller());
-        add(new RemoveInfoMarshaller());
-        add(new RemoveSubscriptionInfoMarshaller());
-        add(new ReplayCommandMarshaller());
-        add(new ResponseMarshaller());
-        add(new SessionIdMarshaller());
-        add(new SessionInfoMarshaller());
-        add(new ShutdownInfoMarshaller());
-        add(new SubscriptionInfoMarshaller());
-        add(new TransactionInfoMarshaller());
-        add(new WireFormatInfoMarshaller());
-        add(new XATransactionIdMarshaller());
-
-    }
-
-    static private void add(DataStreamMarshaller dsm) {
-        marshaller[dsm.getDataStructureType()] = dsm;
-    }
-    
-    static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
-        return marshaller;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageAckMarshaller.java
deleted file mode 100644
index 6af6c09..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageAckMarshaller.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs);
-
-        return rc + 5;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageAck info = (MessageAck)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        dataOut.writeByte(info.getAckType());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageAck info = (MessageAck)o;
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setAckType(dataIn.readByte());
-        info.setFirstMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setLastMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setMessageCount(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageAck info = (MessageAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        dataOut.writeByte(info.getAckType());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut);
-        dataOut.writeInt(info.getMessageCount());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageDispatchMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageDispatchMarshaller.java
deleted file mode 100644
index 6a35956..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageDispatchMarshaller.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatch.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatch();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessage((org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatch info = (MessageDispatch)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatch info = (MessageDispatch)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessage((org.apache.activemq.command.Message) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setRedeliveryCounter(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatch info = (MessageDispatch)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut);
-        dataOut.writeInt(info.getRedeliveryCounter());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationMarshaller.java
deleted file mode 100644
index af1ff96..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationMarshaller.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageDispatchNotificationMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageDispatchNotification.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageDispatchNotification();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageDispatchNotification info = (MessageDispatchNotification)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageIdMarshaller.java
deleted file mode 100644
index d02028b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessageId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessageId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessageId info = (MessageId)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessageId info = (MessageId)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessageId info = (MessageId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageMarshaller.java
deleted file mode 100644
index a2c7ad5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessageMarshaller.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessageMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class MessageMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setGroupID(tightUnmarshalString(dataIn, bs));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setPersistent(bs.readBoolean());
-        info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setType(tightUnmarshalString(dataIn, bs));
-        info.setContent(tightUnmarshalByteSequence(dataIn, bs));
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-        info.setDataStructure((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setCompressed(bs.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setUserID(tightUnmarshalString(dataIn, bs));
-        info.setRecievedByDFBridge(bs.readBoolean());
-        info.setDroppable(bs.readBoolean());
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setCluster(value);
-        }
-        else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setBrokerOutTime(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs);
-        rc += tightMarshalString1(info.getGroupID(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        bs.writeBoolean(info.isPersistent());
-        rc+=tightMarshalLong1(wireFormat, info.getExpiration(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
-        rc += tightMarshalString1(info.getType(), bs);
-        rc += tightMarshalByteSequence1(info.getContent(), bs);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs);
-        bs.writeBoolean(info.isCompressed());
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getArrival(), bs);
-        rc += tightMarshalString1(info.getUserID(), bs);
-        bs.writeBoolean(info.isRecievedByDFBridge());
-        bs.writeBoolean(info.isDroppable());
-        rc += tightMarshalObjectArray1(wireFormat, info.getCluster(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerInTime(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getBrokerOutTime(), bs);
-
-        return rc + 9;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Message info = (Message)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs);
-        tightMarshalString2(info.getGroupID(), dataOut, bs);
-        dataOut.writeInt(info.getGroupSequence());
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        bs.readBoolean();
-        tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
-        dataOut.writeByte(info.getPriority());
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
-        tightMarshalString2(info.getType(), dataOut, bs);
-        tightMarshalByteSequence2(info.getContent(), dataOut, bs);
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getRedeliveryCounter());
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
-        tightMarshalString2(info.getUserID(), dataOut, bs);
-        bs.readBoolean();
-        bs.readBoolean();
-        tightMarshalObjectArray2(wireFormat, info.getCluster(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerInTime(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getBrokerOutTime(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Message info = (Message)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setGroupID(looseUnmarshalString(dataIn));
-        info.setGroupSequence(dataIn.readInt());
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setPersistent(dataIn.readBoolean());
-        info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
-        info.setPriority(dataIn.readByte());
-        info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
-        info.setType(looseUnmarshalString(dataIn));
-        info.setContent(looseUnmarshalByteSequence(dataIn));
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-        info.setDataStructure((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setCompressed(dataIn.readBoolean());
-        info.setRedeliveryCounter(dataIn.readInt());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
-        info.setUserID(looseUnmarshalString(dataIn));
-        info.setRecievedByDFBridge(dataIn.readBoolean());
-        info.setDroppable(dataIn.readBoolean());
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setCluster(value);
-        }
-        else {
-            info.setCluster(null);
-        }
-        info.setBrokerInTime(looseUnmarshalLong(wireFormat, dataIn));
-        info.setBrokerOutTime(looseUnmarshalLong(wireFormat, dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Message info = (Message)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut);
-        looseMarshalString(info.getGroupID(), dataOut);
-        dataOut.writeInt(info.getGroupSequence());
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        dataOut.writeBoolean(info.isPersistent());
-        looseMarshalLong(wireFormat, info.getExpiration(), dataOut);
-        dataOut.writeByte(info.getPriority());
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimestamp(), dataOut);
-        looseMarshalString(info.getType(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getContent(), dataOut);
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut);
-        dataOut.writeBoolean(info.isCompressed());
-        dataOut.writeInt(info.getRedeliveryCounter());
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        looseMarshalLong(wireFormat, info.getArrival(), dataOut);
-        looseMarshalString(info.getUserID(), dataOut);
-        dataOut.writeBoolean(info.isRecievedByDFBridge());
-        dataOut.writeBoolean(info.isDroppable());
-        looseMarshalObjectArray(wireFormat, info.getCluster(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerInTime(), dataOut);
-        looseMarshalLong(wireFormat, info.getBrokerOutTime(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessagePullMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessagePullMarshaller.java
deleted file mode 100644
index ba41667..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/MessagePullMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for MessagePullMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return MessagePull.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new MessagePull();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
-        info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs);
-        rc += tightMarshalString1(info.getCorrelationId(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        MessagePull info = (MessagePull)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
-        tightMarshalString2(info.getCorrelationId(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        MessagePull info = (MessagePull)o;
-        info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
-        info.setCorrelationId(looseUnmarshalString(dataIn));
-        info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        MessagePull info = (MessagePull)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
-        looseMarshalString(info.getCorrelationId(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterMarshaller.java
deleted file mode 100644
index 285bb73..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for NetworkBridgeFilterMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return NetworkBridgeFilter.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new NetworkBridgeFilter();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        dataOut.writeInt(info.getNetworkTTL());
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-        info.setNetworkTTL(dataIn.readInt());
-        info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        NetworkBridgeFilter info = (NetworkBridgeFilter)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getNetworkTTL());
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/PartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/PartialCommandMarshaller.java
deleted file mode 100644
index 705169c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/PartialCommandMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for PartialCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return PartialCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new PartialCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getData(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        PartialCommand info = (PartialCommand)o;
-        dataOut.writeInt(info.getCommandId());
-        tightMarshalByteArray2(info.getData(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        PartialCommand info = (PartialCommand)o;
-        info.setCommandId(dataIn.readInt());
-        info.setData(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        PartialCommand info = (PartialCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCommandId());
-        looseMarshalByteArray(wireFormat, info.getData(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerAckMarshaller.java
deleted file mode 100644
index 7012fe7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerAckMarshaller.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerAckMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerAck.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerAck();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerAck info = (ProducerAck)o;
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        dataOut.writeInt(info.getSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerAck info = (ProducerAck)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalNestedObject(wireFormat, dataIn));
-        info.setSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerAck info = (ProducerAck)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        dataOut.writeInt(info.getSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerIdMarshaller.java
deleted file mode 100644
index 3a2069f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerIdMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-        info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerId info = (ProducerId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerId info = (ProducerId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-        info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerId info = (ProducerId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-        looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerInfoMarshaller.java
deleted file mode 100644
index 86d88c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ProducerInfoMarshaller.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ProducerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ProducerInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ProducerInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-        if (bs.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(bs.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
-        bs.writeBoolean(info.isDispatchAsync());
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ProducerInfo info = (ProducerInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
-        bs.readBoolean();
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ProducerInfo info = (ProducerInfo)o;
-        info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-        if (dataIn.readBoolean()) {
-            short size = dataIn.readShort();
-            org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size];
-            for( int i=0; i < size; i++ ) {
-                value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
-            }
-            info.setBrokerPath(value);
-        }
-        else {
-            info.setBrokerPath(null);
-        }
-        info.setDispatchAsync(dataIn.readBoolean());
-        info.setWindowSize(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ProducerInfo info = (ProducerInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
-        dataOut.writeBoolean(info.isDispatchAsync());
-        dataOut.writeInt(info.getWindowSize());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/RemoveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/RemoveInfoMarshaller.java
deleted file mode 100644
index e4fe5d9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/RemoveInfoMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setLastDeliveredSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getLastDeliveredSequenceId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveInfo info = (RemoveInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getLastDeliveredSequenceId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveInfo info = (RemoveInfo)o;
-        info.setObjectId((org.apache.activemq.command.DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setLastDeliveredSequenceId(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveInfo info = (RemoveInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut);
-        looseMarshalLong(wireFormat, info.getLastDeliveredSequenceId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoMarshaller.java
deleted file mode 100644
index 0708937..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new RemoveSubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalString1(info.getSubcriptionName(), bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalString2(info.getSubcriptionName(), dataOut, bs);
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSubcriptionName(looseUnmarshalString(dataIn));
-        info.setClientId(looseUnmarshalString(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalString(info.getSubcriptionName(), dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ReplayCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ReplayCommandMarshaller.java
deleted file mode 100644
index 0537e9f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ReplayCommandMarshaller.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ReplayCommandMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ReplayCommand.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ReplayCommand();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 8;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        ReplayCommand info = (ReplayCommand)o;
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        ReplayCommand info = (ReplayCommand)o;
-        info.setFirstNakNumber(dataIn.readInt());
-        info.setLastNakNumber(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        ReplayCommand info = (ReplayCommand)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFirstNakNumber());
-        dataOut.writeInt(info.getLastNakNumber());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ResponseMarshaller.java
deleted file mode 100644
index fe566b5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ResponseMarshaller.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ResponseMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return Response.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new Response();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        Response info = (Response)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        Response info = (Response)o;
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        Response info = (Response)o;
-        info.setCorrelationId(dataIn.readInt());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        Response info = (Response)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getCorrelationId());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SessionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SessionIdMarshaller.java
deleted file mode 100644
index 4180322..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SessionIdMarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(tightUnmarshalString(dataIn, bs));
-        info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getConnectionId(), bs);
-        rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionId info = (SessionId)o;
-        tightMarshalString2(info.getConnectionId(), dataOut, bs);
-        tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionId info = (SessionId)o;
-        info.setConnectionId(looseUnmarshalString(dataIn));
-        info.setValue(looseUnmarshalLong(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionId info = (SessionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getConnectionId(), dataOut);
-        looseMarshalLong(wireFormat, info.getValue(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SessionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SessionInfoMarshaller.java
deleted file mode 100644
index cd8b7ed..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SessionInfoMarshaller.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SessionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SessionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SessionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SessionInfo info = (SessionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SessionInfo info = (SessionInfo)o;
-        info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SessionInfo info = (SessionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ShutdownInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ShutdownInfoMarshaller.java
deleted file mode 100644
index 497db9e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/ShutdownInfoMarshaller.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for ShutdownInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return ShutdownInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new ShutdownInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SubscriptionInfoMarshaller.java
deleted file mode 100644
index 4fdbca7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/SubscriptionInfoMarshaller.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return SubscriptionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new SubscriptionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(tightUnmarshalString(dataIn, bs));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setSelector(tightUnmarshalString(dataIn, bs));
-        info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalString1(info.getClientId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
-        rc += tightMarshalString1(info.getSelector(), bs);
-        rc += tightMarshalString1(info.getSubcriptionName(), bs);
-        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getSubscribedDestination(), bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        tightMarshalString2(info.getClientId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
-        tightMarshalString2(info.getSelector(), dataOut, bs);
-        tightMarshalString2(info.getSubcriptionName(), dataOut, bs);
-        tightMarshalNestedObject2(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-        info.setClientId(looseUnmarshalString(dataIn));
-        info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setSelector(looseUnmarshalString(dataIn));
-        info.setSubcriptionName(looseUnmarshalString(dataIn));
-        info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        SubscriptionInfo info = (SubscriptionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalString(info.getClientId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
-        looseMarshalString(info.getSelector(), dataOut);
-        looseMarshalString(info.getSubcriptionName(), dataOut);
-        looseMarshalNestedObject(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/TransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/TransactionIdMarshaller.java
deleted file mode 100644
index 23a487e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/TransactionIdMarshaller.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-
-        return rc + 0;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        super.looseMarshal(wireFormat, o, dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/TransactionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/TransactionInfoMarshaller.java
deleted file mode 100644
index b814d09..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/TransactionInfoMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for TransactionInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoMarshaller extends BaseCommandMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return TransactionInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new TransactionInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
-        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
-
-        return rc + 1;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        TransactionInfo info = (TransactionInfo)o;
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
-        tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
-        dataOut.writeByte(info.getType());
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        TransactionInfo info = (TransactionInfo)o;
-        info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
-        info.setType(dataIn.readByte());
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        TransactionInfo info = (TransactionInfo)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
-        looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
-        dataOut.writeByte(info.getType());
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/WireFormatInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/WireFormatInfoMarshaller.java
deleted file mode 100644
index d4bcecc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/WireFormatInfoMarshaller.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for WireFormatInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return WireFormatInfo.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new WireFormatInfo();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
-        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-        tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8);
-        dataOut.writeInt(info.getVersion());
-        tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
-
-        info.afterMarshall(wireFormat);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeUnmarshall(wireFormat);
-        
-        info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
-        info.setVersion(dataIn.readInt());
-        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
-
-        info.afterUnmarshall(wireFormat);
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        WireFormatInfo info = (WireFormatInfo)o;
-
-        info.beforeMarshall(wireFormat);
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
-        dataOut.writeInt(info.getVersion());
-        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/XATransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/XATransactionIdMarshaller.java
deleted file mode 100644
index fc968e3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v6/XATransactionIdMarshaller.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-
-/**
- * Marshalling code for Open Wire Format for XATransactionIdMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdMarshaller extends TransactionIdMarshaller {
-
-    /**
-     * Return the type of Data Structure we marshal
-     * @return short representation of the type data structure
-     */
-    public byte getDataStructureType() {
-        return XATransactionId.DATA_STRUCTURE_TYPE;
-    }
-    
-    /**
-     * @return a new object instance
-     */
-    public DataStructure createObject() {
-        return new XATransactionId();
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
-        super.tightUnmarshal(wireFormat, o, dataIn, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
-        info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        int rc = super.tightMarshal1(wireFormat, o, bs);
-        rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs);
-        rc += tightMarshalByteArray1(info.getBranchQualifier(), bs);
-
-        return rc + 4;
-    }
-
-    /**
-     * Write a object instance to data output stream
-     *
-     * @param o the instance to be marshaled
-     * @param dataOut the output stream
-     * @throws IOException thrown if an error occurs
-     */
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
-        super.tightMarshal2(wireFormat, o, dataOut, bs);
-
-        XATransactionId info = (XATransactionId)o;
-        dataOut.writeInt(info.getFormatId());
-        tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs);
-        tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs);
-
-    }
-
-    /**
-     * Un-marshal an object instance from the data input stream
-     *
-     * @param o the object to un-marshal
-     * @param dataIn the data input stream to build the object from
-     * @throws IOException
-     */
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-        super.looseUnmarshal(wireFormat, o, dataIn);
-
-        XATransactionId info = (XATransactionId)o;
-        info.setFormatId(dataIn.readInt());
-        info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
-        info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
-
-    }
-
-
-    /**
-     * Write the booleans that this object uses to a BooleanStream
-     */
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-
-        XATransactionId info = (XATransactionId)o;
-
-        super.looseMarshal(wireFormat, o, dataOut);
-        dataOut.writeInt(info.getFormatId());
-        looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut);
-        looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut);
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQBlobMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQBlobMessageMarshaller.java
deleted file mode 100644
index fb9a0fe..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQBlobMessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQBytesMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQBytesMessageMarshaller.java
deleted file mode 100644
index e3a0875..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQBytesMessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQDestinationMarshaller.java
deleted file mode 100644
index 5299cf8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQDestinationMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQMapMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQMapMessageMarshaller.java
deleted file mode 100644
index 21eff1f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQMapMessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQMessageMarshaller.java
deleted file mode 100644
index 96d7e3b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQMessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQObjectMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQObjectMessageMarshaller.java
deleted file mode 100644
index cf0204b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQObjectMessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQQueueMarshaller.java
deleted file mode 100644
index 8f2a79b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQQueueMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQStreamMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQStreamMessageMarshaller.java
deleted file mode 100644
index 4fc17da..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQStreamMessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempDestinationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempDestinationMarshaller.java
deleted file mode 100644
index e81a95e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempDestinationMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempQueueMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempQueueMarshaller.java
deleted file mode 100644
index 2b1e6e6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempQueueMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempTopicMarshaller.java
deleted file mode 100644
index 1810e3e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTempTopicMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTextMessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTextMessageMarshaller.java
deleted file mode 100644
index 0f24e24..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTextMessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTopicMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTopicMarshaller.java
deleted file mode 100644
index 4b922c6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ActiveMQTopicMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BaseCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BaseCommandMarshaller.java
deleted file mode 100644
index 966c850..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BaseCommandMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BaseDataStreamMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BaseDataStreamMarshaller.java
deleted file mode 100644
index 99dae64..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BaseDataStreamMarshaller.java
+++ /dev/null
@@ -1,644 +0,0 @@
-/**
- * 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.openwire.v7;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-
-public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
-
-    public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
-
-    static {
-        Constructor constructor = null;
-        try {
-            constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
-                                                                              String.class, int.class});
-        } catch (Throwable e) {
-        }
-        STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
-    }
-
-    public abstract byte getDataStructureType();
-
-    public abstract DataStructure createObject();
-
-    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
-        return 0;
-    }
-
-    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-    }
-
-    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-    }
-
-    public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
-        if (o == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(false);
-            return 0;
-        } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
-            bs.writeBoolean(false);
-            bs.writeBoolean(true);
-            return 2;
-        } else if ((o & 0xFFFFFFFF00000000L) == 0) {
-            bs.writeBoolean(true);
-            bs.writeBoolean(false);
-            return 4;
-        } else {
-            bs.writeBoolean(true);
-            bs.writeBoolean(true);
-            return 8;
-        }
-    }
-
-    public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                dataOut.writeLong(o);
-            } else {
-                dataOut.writeInt((int)o);
-            }
-        } else {
-            if (bs.readBoolean()) {
-                dataOut.writeShort((int)o);
-            }
-        }
-    }
-
-    public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                return dataIn.readLong();
-            } else {
-                return toLong(dataIn.readInt());
-            }
-        } else {
-            if (bs.readBoolean()) {
-                return toLong(dataIn.readShort());
-            } else {
-                return 0;
-            }
-        }
-    }
-
-    protected long toLong(short value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffL;
-    }
-
-    protected long toLong(int value) {
-        // lets handle negative values
-        long answer = value;
-        return answer & 0xffffffffL;
-    }
-
-    protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-    }
-
-    protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        return wireFormat.tightMarshalNestedObject1(o, bs);
-    }
-
-    protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-    }
-
-    protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
-                                                      BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (bs.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
-        }
-    }
-
-    protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            bs.writeBoolean(index == null);
-            if (index == null) {
-                int rc = wireFormat.tightMarshalNestedObject1(o, bs);
-                wireFormat.addToMarshallCache(o);
-                return 2 + rc;
-            } else {
-                return 2;
-            }
-        } else {
-            return wireFormat.tightMarshalNestedObject1(o, bs);
-        }
-    }
-
-    protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
-                                             BooleanStream bs) throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            if (bs.readBoolean()) {
-                dataOut.writeShort(index.shortValue());
-                wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
-        }
-    }
-
-    protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            String clazz = tightUnmarshalString(dataIn, bs);
-            String message = tightUnmarshalString(dataIn, bs);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           tightUnmarshalString(dataIn, bs),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        tightUnmarshalString(dataIn, bs);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    private Throwable createThrowable(String className, String message) {
-        try {
-            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
-            Constructor constructor = clazz.getConstructor(new Class[] {String.class});
-            return (Throwable)constructor.newInstance(new Object[] {message});
-        } catch (Throwable e) {
-            return new Throwable(className + ": " + message);
-        }
-    }
-
-    protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
-        throws IOException {
-        if (o == null) {
-            bs.writeBoolean(false);
-            return 0;
-        } else {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += tightMarshalString1(o.getClass().getName(), bs);
-            rc += tightMarshalString1(o.getMessage(), bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                rc += 2;
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    rc += tightMarshalString1(element.getClassName(), bs);
-                    rc += tightMarshalString1(element.getMethodName(), bs);
-                    rc += tightMarshalString1(element.getFileName(), bs);
-                    rc += 4;
-                }
-                rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
-            }
-            return rc;
-        }
-    }
-
-    protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
-                                          BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            tightMarshalString2(o.getClass().getName(), dataOut, bs);
-            tightMarshalString2(o.getMessage(), dataOut, bs);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    tightMarshalString2(element.getClassName(), dataOut, bs);
-                    tightMarshalString2(element.getMethodName(), dataOut, bs);
-                    tightMarshalString2(element.getFileName(), dataOut, bs);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
-            }
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            if (bs.readBoolean()) {
-                int size = dataIn.readShort();
-                byte data[] = new byte[size];
-                dataIn.readFully(data);
-                // Yes deprecated, but we know what we are doing.
-                // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0);
-            } else {
-                return dataIn.readUTF();
-            }
-        } else {
-            return null;
-        }
-    }
-
-    protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
-        bs.writeBoolean(value != null);
-        if (value != null) {
-
-            int strlen = value.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            boolean isOnlyAscii = true;
-
-            value.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                    isOnlyAscii = false;
-                } else {
-                    isOnlyAscii = false;
-                    utflen += 2;
-                }
-            }
-
-            if (utflen >= Short.MAX_VALUE) {
-                throw new IOException("Encountered a String value that is too long to encode.");
-            }
-            bs.writeBoolean(isOnlyAscii);
-            return utflen + 2;
-
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            // If we verified it only holds ascii values
-            if (bs.readBoolean()) {
-                dataOut.writeShort(value.length());
-                dataOut.writeBytes(value);
-            } else {
-                dataOut.writeUTF(value);
-            }
-        }
-    }
-
-    protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           BooleanStream bs) throws IOException {
-        if (objects != null) {
-            int rc = 0;
-            bs.writeBoolean(true);
-            rc += 2;
-            for (int i = 0; i < objects.length; i++) {
-                rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
-            }
-            return rc;
-        } else {
-            bs.writeBoolean(false);
-            return 0;
-        }
-    }
-
-    protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
-                                            DataOutput dataOut, BooleanStream bs) throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
-            }
-        }
-    }
-
-    protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
-        return i;
-    }
-
-    protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
-        throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
-        throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.length + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
-        byte rc[] = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
-        bs.writeBoolean(data != null);
-        if (data != null) {
-            return data.getLength() + 4;
-        } else {
-            return 0;
-        }
-    }
-
-    protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
-        throws IOException {
-        if (bs.readBoolean()) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
-        ByteSequence rc = null;
-        if (bs.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            return new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-
-    //
-    // The loose marshaling logic
-    //
-
-    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
-    }
-
-    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
-    }
-
-    public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(o);
-    }
-
-    public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        return wireFormat.looseUnmarshalNestedObject(dataIn);
-    }
-
-    protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        wireFormat.looseMarshalNestedObject(o, dataOut);
-    }
-
-    protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            if (dataIn.readBoolean()) {
-                short index = dataIn.readShort();
-                DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
-                wireFormat.setInUnmarshallCache(index, object);
-                return object;
-            } else {
-                short index = dataIn.readShort();
-                return wireFormat.getFromUnmarshallCache(index);
-            }
-        } else {
-            return wireFormat.looseUnmarshalNestedObject(dataIn);
-        }
-    }
-
-    protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
-        throws IOException {
-        if (wireFormat.isCacheEnabled()) {
-            Short index = wireFormat.getMarshallCacheIndex(o);
-            dataOut.writeBoolean(index == null);
-            if (index == null) {
-                index = wireFormat.addToMarshallCache(o);
-                dataOut.writeShort(index.shortValue());
-                wireFormat.looseMarshalNestedObject(o, dataOut);
-            } else {
-                dataOut.writeShort(index.shortValue());
-            }
-        } else {
-            wireFormat.looseMarshalNestedObject(o, dataOut);
-        }
-    }
-
-    protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
-        throws IOException {
-        if (dataIn.readBoolean()) {
-            String clazz = looseUnmarshalString(dataIn);
-            String message = looseUnmarshalString(dataIn);
-            Throwable o = createThrowable(clazz, message);
-            if (wireFormat.isStackTraceEnabled()) {
-                if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
-                    StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
-                    for (int i = 0; i < ss.length; i++) {
-                        try {
-                            ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
-                                .newInstance(new Object[] {looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           looseUnmarshalString(dataIn),
-                                                           Integer.valueOf(dataIn.readInt())});
-                        } catch (IOException e) {
-                            throw e;
-                        } catch (Throwable e) {
-                        }
-                    }
-                    o.setStackTrace(ss);
-                } else {
-                    short size = dataIn.readShort();
-                    for (int i = 0; i < size; i++) {
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        looseUnmarshalString(dataIn);
-                        dataIn.readInt();
-                    }
-                }
-                o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
-
-            }
-            return o;
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(o != null);
-        if (o != null) {
-            looseMarshalString(o.getClass().getName(), dataOut);
-            looseMarshalString(o.getMessage(), dataOut);
-            if (wireFormat.isStackTraceEnabled()) {
-                StackTraceElement[] stackTrace = o.getStackTrace();
-                dataOut.writeShort(stackTrace.length);
-                for (int i = 0; i < stackTrace.length; i++) {
-                    StackTraceElement element = stackTrace[i];
-                    looseMarshalString(element.getClassName(), dataOut);
-                    looseMarshalString(element.getMethodName(), dataOut);
-                    looseMarshalString(element.getFileName(), dataOut);
-                    dataOut.writeInt(element.getLineNumber());
-                }
-                looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
-            }
-        }
-    }
-
-    protected String looseUnmarshalString(DataInput dataIn) throws IOException {
-        if (dataIn.readBoolean()) {
-            return dataIn.readUTF();
-        } else {
-            return null;
-        }
-    }
-
-    protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(value != null);
-        if (value != null) {
-            dataOut.writeUTF(value);
-        }
-    }
-
-    protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
-                                           DataOutput dataOut) throws IOException {
-        dataOut.writeBoolean(objects != null);
-        if (objects != null) {
-            dataOut.writeShort(objects.length);
-            for (int i = 0; i < objects.length; i++) {
-                looseMarshalNestedObject(wireFormat, objects[i], dataOut);
-            }
-        }
-    }
-
-    protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
-                                              int i) throws IOException {
-        dataOut.write(data, 0, i);
-    }
-
-    protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
-        byte data[] = new byte[i];
-        dataIn.readFully(data);
-        return data;
-    }
-
-    protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-    }
-
-    protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
-        byte rc[] = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            rc = new byte[size];
-            dataIn.readFully(rc);
-        }
-        return rc;
-    }
-
-    protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
-        throws IOException {
-        dataOut.writeBoolean(data != null);
-        if (data != null) {
-            dataOut.writeInt(data.getLength());
-            dataOut.write(data.getData(), data.getOffset(), data.getLength());
-        }
-    }
-
-    protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
-        ByteSequence rc = null;
-        if (dataIn.readBoolean()) {
-            int size = dataIn.readInt();
-            byte[] t = new byte[size];
-            dataIn.readFully(t);
-            rc = new ByteSequence(t, 0, size);
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BrokerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BrokerIdMarshaller.java
deleted file mode 100644
index e226145..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BrokerIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BrokerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BrokerInfoMarshaller.java
deleted file mode 100644
index a7ecba1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/BrokerInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionControlMarshaller.java
deleted file mode 100644
index 42372f2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionControlMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionErrorMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionErrorMarshaller.java
deleted file mode 100644
index c0f700b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionErrorMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionIdMarshaller.java
deleted file mode 100644
index d1f5693..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionInfoMarshaller.java
deleted file mode 100644
index da77a33..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConnectionInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerControlMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerControlMarshaller.java
deleted file mode 100644
index d89a3fc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerControlMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerIdMarshaller.java
deleted file mode 100644
index 1a1c5cb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerInfoMarshaller.java
deleted file mode 100644
index 1885161..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ConsumerInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ControlCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ControlCommandMarshaller.java
deleted file mode 100644
index 2b75da1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ControlCommandMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DataArrayResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DataArrayResponseMarshaller.java
deleted file mode 100644
index c21900e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DataArrayResponseMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DataResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DataResponseMarshaller.java
deleted file mode 100644
index 5253a5f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DataResponseMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DestinationInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DestinationInfoMarshaller.java
deleted file mode 100644
index 7bf6d32..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DestinationInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DiscoveryEventMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DiscoveryEventMarshaller.java
deleted file mode 100644
index de2574a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/DiscoveryEventMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ExceptionResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ExceptionResponseMarshaller.java
deleted file mode 100644
index 7d49027..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ExceptionResponseMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/FlushCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/FlushCommandMarshaller.java
deleted file mode 100644
index 9dd136a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/FlushCommandMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/IntegerResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/IntegerResponseMarshaller.java
deleted file mode 100644
index e3a4715..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/IntegerResponseMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalQueueAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalQueueAckMarshaller.java
deleted file mode 100644
index 97e8470..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalQueueAckMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTopicAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTopicAckMarshaller.java
deleted file mode 100644
index 9fe44ce..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTopicAckMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTraceMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTraceMarshaller.java
deleted file mode 100644
index abfd054..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTraceMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTransactionMarshaller.java
deleted file mode 100644
index 7d9f533..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/JournalTransactionMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/KeepAliveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/KeepAliveInfoMarshaller.java
deleted file mode 100644
index f6c89b7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/KeepAliveInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/LastPartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/LastPartialCommandMarshaller.java
deleted file mode 100644
index 4b2693b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/LastPartialCommandMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/LocalTransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/LocalTransactionIdMarshaller.java
deleted file mode 100644
index b36faa5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/LocalTransactionIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MarshallerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MarshallerFactory.java
deleted file mode 100644
index 6db228e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MarshallerFactory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- *
- * 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.openwire.v7;
-
-import org.apache.activemq.openwire.DataStreamMarshaller;
-import org.apache.activemq.openwire.OpenWireFormat;
-
-/**
- * MarshallerFactory for Open Wire Format.
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MarshallerFactory {
-
-    /**
-     * Creates a Map of command type -> Marshallers
-     */
-    static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];
-    static {
-
-        add(new ActiveMQBlobMessageMarshaller());
-        add(new ActiveMQBytesMessageMarshaller());
-        add(new ActiveMQMapMessageMarshaller());
-        add(new ActiveMQMessageMarshaller());
-        add(new ActiveMQObjectMessageMarshaller());
-        add(new ActiveMQQueueMarshaller());
-        add(new ActiveMQStreamMessageMarshaller());
-        add(new ActiveMQTempQueueMarshaller());
-        add(new ActiveMQTempTopicMarshaller());
-        add(new ActiveMQTextMessageMarshaller());
-        add(new ActiveMQTopicMarshaller());
-        add(new BrokerIdMarshaller());
-        add(new BrokerInfoMarshaller());
-        add(new ConnectionControlMarshaller());
-        add(new ConnectionErrorMarshaller());
-        add(new ConnectionIdMarshaller());
-        add(new ConnectionInfoMarshaller());
-        add(new ConsumerControlMarshaller());
-        add(new ConsumerIdMarshaller());
-        add(new ConsumerInfoMarshaller());
-        add(new ControlCommandMarshaller());
-        add(new DataArrayResponseMarshaller());
-        add(new DataResponseMarshaller());
-        add(new DestinationInfoMarshaller());
-        add(new DiscoveryEventMarshaller());
-        add(new ExceptionResponseMarshaller());
-        add(new FlushCommandMarshaller());
-        add(new IntegerResponseMarshaller());
-        add(new JournalQueueAckMarshaller());
-        add(new JournalTopicAckMarshaller());
-        add(new JournalTraceMarshaller());
-        add(new JournalTransactionMarshaller());
-        add(new KeepAliveInfoMarshaller());
-        add(new LastPartialCommandMarshaller());
-        add(new LocalTransactionIdMarshaller());
-        add(new MessageAckMarshaller());
-        add(new MessageDispatchMarshaller());
-        add(new MessageDispatchNotificationMarshaller());
-        add(new MessageIdMarshaller());
-        add(new MessagePullMarshaller());
-        add(new NetworkBridgeFilterMarshaller());
-        add(new PartialCommandMarshaller());
-        add(new ProducerAckMarshaller());
-        add(new ProducerIdMarshaller());
-        add(new ProducerInfoMarshaller());
-        add(new RemoveInfoMarshaller());
-        add(new RemoveSubscriptionInfoMarshaller());
-        add(new ReplayCommandMarshaller());
-        add(new ResponseMarshaller());
-        add(new SessionIdMarshaller());
-        add(new SessionInfoMarshaller());
-        add(new ShutdownInfoMarshaller());
-        add(new SubscriptionInfoMarshaller());
-        add(new TransactionInfoMarshaller());
-        add(new WireFormatInfoMarshaller());
-        add(new XATransactionIdMarshaller());
-
-    }
-
-    static private void add(DataStreamMarshaller dsm) {
-        marshaller[dsm.getDataStructureType()] = dsm;
-    }
-    
-    static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
-        return marshaller;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageAckMarshaller.java
deleted file mode 100644
index 180fffc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageAckMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageDispatchMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageDispatchMarshaller.java
deleted file mode 100644
index daa3a1a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageDispatchMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationMarshaller.java
deleted file mode 100644
index 43d49ac..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageIdMarshaller.java
deleted file mode 100644
index 7570a47..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageMarshaller.java
deleted file mode 100644
index 60658c9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessageMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessagePullMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessagePullMarshaller.java
deleted file mode 100644
index 4c4504d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/MessagePullMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterMarshaller.java
deleted file mode 100644
index b06d30c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/PartialCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/PartialCommandMarshaller.java
deleted file mode 100644
index a613c25..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/PartialCommandMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerAckMarshaller.java
deleted file mode 100644
index d5b1d4e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerAckMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerIdMarshaller.java
deleted file mode 100644
index 339a821..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerInfoMarshaller.java
deleted file mode 100644
index 3e94112..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ProducerInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/RemoveInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/RemoveInfoMarshaller.java
deleted file mode 100644
index c72bec8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/RemoveInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoMarshaller.java
deleted file mode 100644
index b96709c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ReplayCommandMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ReplayCommandMarshaller.java
deleted file mode 100644
index 1e05533..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ReplayCommandMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ResponseMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ResponseMarshaller.java
deleted file mode 100644
index 8c93167..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ResponseMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SessionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SessionIdMarshaller.java
deleted file mode 100644
index 2be6882..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SessionIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SessionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SessionInfoMarshaller.java
deleted file mode 100644
index f4ebc1f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SessionInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ShutdownInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ShutdownInfoMarshaller.java
deleted file mode 100644
index 08a024f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/ShutdownInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SubscriptionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SubscriptionInfoMarshaller.java
deleted file mode 100644
index 33fa962..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/SubscriptionInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/TransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/TransactionIdMarshaller.java
deleted file mode 100644
index 6eebf9f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/TransactionIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/TransactionInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/TransactionInfoMarshaller.java
deleted file mode 100644
index 111d367..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/TransactionInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/WireFormatInfoMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/WireFormatInfoMarshaller.java
deleted file mode 100644
index c880ce9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/WireFormatInfoMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/XATransactionIdMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/XATransactionIdMarshaller.java
deleted file mode 100644
index 1422c45..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v7/XATransactionIdMarshaller.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/package.html
deleted file mode 100755
index 607a04a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-The core JMS client API implementation classes.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java
deleted file mode 100644
index cde3a9a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBroker.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * 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.plugin;
-
-import java.util.regex.Pattern;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author Filip Hanik
- * @version 1.0
- */
-public class DiscardingDLQBroker extends BrokerFilter {
-    public static Logger log = LoggerFactory.getLogger(DiscardingDLQBroker.class);
-    private boolean dropTemporaryTopics = true;
-    private boolean dropTemporaryQueues = true;
-    private boolean dropAll = true;
-    private Pattern[] destFilter;
-    private int reportInterval = 1000;
-    private long dropCount = 0;
-
-    public DiscardingDLQBroker(Broker next) {
-        super(next);
-    }
-
-    @Override
-    public void sendToDeadLetterQueue(ConnectionContext ctx, MessageReference msgRef,
-                                      Subscription subscription) {
-        if (log.isTraceEnabled()) {
-            log.trace("Discarding DLQ BrokerFilter[pass through] - skipping message:" + (msgRef != null ? msgRef.getMessage() : null));
-        }
-        boolean dropped = true;
-        Message msg = null;
-        ActiveMQDestination dest = null;
-        String destName = null;
-        msg = msgRef.getMessage();
-        dest = msg.getDestination();
-        destName = dest.getPhysicalName();
-
-        if (dest == null || destName == null ) {
-            //do nothing, no need to forward it
-            skipMessage("NULL DESTINATION",msgRef);
-        } else if (dropAll) {
-            //do nothing
-            skipMessage("dropAll",msgRef);
-        } else if (dropTemporaryTopics && dest.isTemporary() && dest.isTopic()) {
-            //do nothing
-            skipMessage("dropTemporaryTopics",msgRef);
-        } else if (dropTemporaryQueues && dest.isTemporary() && dest.isQueue()) {
-            //do nothing
-            skipMessage("dropTemporaryQueues",msgRef);
-        } else if (destFilter!=null && matches(destName)) {
-            //do nothing
-            skipMessage("dropOnly",msgRef);
-        } else {
-            dropped = false;
-            next.sendToDeadLetterQueue(ctx, msgRef, subscription);
-        }
-        if (dropped && getReportInterval()>0) {
-            if ((++dropCount)%getReportInterval() == 0 ) {
-                log.info("Total of "+dropCount+" messages were discarded, since their destination was the dead letter queue");
-            }
-        }
-    }
-
-    public boolean matches(String destName) {
-        for (int i=0; destFilter!=null && i<destFilter.length; i++) {
-            if (destFilter[i]!=null && destFilter[i].matcher(destName).matches()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void skipMessage(String prefix, MessageReference msgRef) {
-        if (log.isDebugEnabled()) {
-            String lmsg = "Discarding DLQ BrokerFilter["+prefix+"] - skipping message:" + (msgRef!=null?msgRef.getMessage():null);
-            log.debug(lmsg);
-        }
-    }
-
-    public void setDropTemporaryTopics(boolean dropTemporaryTopics) {
-        this.dropTemporaryTopics = dropTemporaryTopics;
-    }
-
-    public void setDropTemporaryQueues(boolean dropTemporaryQueues) {
-        this.dropTemporaryQueues = dropTemporaryQueues;
-    }
-
-    public void setDropAll(boolean dropAll) {
-        this.dropAll = dropAll;
-    }
-
-    public void setDestFilter(Pattern[] destFilter) {
-        this.destFilter = destFilter;
-    }
-
-    public void setReportInterval(int reportInterval) {
-        this.reportInterval = reportInterval;
-    }
-
-    public boolean isDropTemporaryTopics() {
-        return dropTemporaryTopics;
-    }
-
-    public boolean isDropTemporaryQueues() {
-        return dropTemporaryQueues;
-    }
-
-    public boolean isDropAll() {
-        return dropAll;
-    }
-
-    public Pattern[] getDestFilter() {
-        return destFilter;
-    }
-
-    public int getReportInterval() {
-        return reportInterval;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java
deleted file mode 100644
index ef45788..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 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.plugin;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import java.util.regex.Pattern;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author Filip Hanik
- * @org.apache.xbean.XBean element="discardingDLQBrokerPlugin"
- * @version 1.0
- */
-public class DiscardingDLQBrokerPlugin implements BrokerPlugin {
-    public DiscardingDLQBrokerPlugin() {
-    }
-
-    public static Logger log = LoggerFactory.getLogger(DiscardingDLQBrokerPlugin.class);
-    private boolean dropTemporaryTopics = true;
-    private boolean dropTemporaryQueues = true;
-    private boolean dropAll = true;
-    private String dropOnly;
-    private int reportInterval = 1000;
-
-    /**
-     * Installs the plugin into the interceptor chain of the broker, returning the new intercepted broker to use.
-     * @param broker Broker
-     * @throws Exception
-     * @return Broker
-     * @todo Implement this org.apache.activemq.broker.BrokerPlugin method
-     */
-    public Broker installPlugin(Broker broker) throws Exception {
-        log.info("Installing Discarding Dead Letter Queue broker plugin[dropAll="+isDropAll()+
-                 "; dropTemporaryTopics="+isDropTemporaryTopics()+"; dropTemporaryQueues="+
-                 isDropTemporaryQueues()+"; dropOnly="+getDropOnly()+"; reportInterval="+
-                 getReportInterval()+"]");
-        DiscardingDLQBroker cb = new DiscardingDLQBroker(broker);
-        cb.setDropAll(isDropAll());
-        cb.setDropTemporaryQueues(isDropTemporaryQueues());
-        cb.setDropTemporaryTopics(isDropTemporaryTopics());
-        cb.setDestFilter(getDestFilter());
-        cb.setReportInterval(getReportInterval());
-        return cb;
-    }
-
-    public boolean isDropAll() {
-        return dropAll;
-    }
-
-    public boolean isDropTemporaryQueues() {
-        return dropTemporaryQueues;
-    }
-
-    public boolean isDropTemporaryTopics() {
-        return dropTemporaryTopics;
-    }
-
-    public String getDropOnly() {
-        return dropOnly;
-    }
-
-    public int getReportInterval() {
-        return reportInterval;
-    }
-
-    public void setDropTemporaryTopics(boolean dropTemporaryTopics) {
-        this.dropTemporaryTopics = dropTemporaryTopics;
-    }
-
-    public void setDropTemporaryQueues(boolean dropTemporaryQueues) {
-        this.dropTemporaryQueues = dropTemporaryQueues;
-    }
-
-    public void setDropAll(boolean dropAll) {
-        this.dropAll = dropAll;
-    }
-
-    public void setDropOnly(String dropOnly) {
-        this.dropOnly = dropOnly;
-    }
-
-    public void setReportInterval(int reportInterval) {
-        this.reportInterval = reportInterval;
-    }
-
-    public Pattern[] getDestFilter() {
-        if (getDropOnly()==null) return null;
-        ArrayList<Pattern> list = new ArrayList<Pattern>();
-        StringTokenizer t = new StringTokenizer(getDropOnly()," ");
-        while (t.hasMoreTokens()) {
-            String s = t.nextToken();
-            if (s!=null && s.trim().length()>0) list.add(Pattern.compile(s));
-        }
-        if (list.size()==0) return null;
-        return list.toArray(new Pattern[0]);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java
deleted file mode 100644
index 249ed00..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.plugin;
-
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.command.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * A Plugin which allows to force every incoming message to be PERSISTENT or NON-PERSISTENT. 
- * 
- * Useful, if you have set the broker usage policy to process ONLY persistent or ONLY non-persistent
- * messages. 
- * @org.apache.xbean.XBean element="forcePersistencyModeBroker"
- */
-public class ForcePersistencyModeBroker extends BrokerFilter{
-  public static Logger log = LoggerFactory.getLogger(ForcePersistencyModeBroker.class);
-  private boolean persistence = false;
-  
-  /**
-   * @return the persistenceFlag
-   */
-  public boolean isPersistent() {
-    return persistence;
-  }
-
-  /**
-   * @param persistenceFlag the persistenceFlag to set
-   */
-  public void setPersistenceFlag(boolean mode) {
-    this.persistence = mode;
-  }
-
-  /**
-   * Constructor
-   * @param next
-   */
-  public ForcePersistencyModeBroker(Broker next) {
-    super(next);
-    System.out.println(this.getBrokerSequenceId());
-  }
-  
-  /** Sets the persistence mode
-   * @see org.apache.activemq.broker.BrokerFilter#send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
-   */
-  public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-    messageSend.getMessage().setPersistent(isPersistent());
-    next.send(producerExchange, messageSend);
-  }
-  
-}
-
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBrokerPlugin.java
deleted file mode 100644
index 2393a40..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBrokerPlugin.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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.plugin;
-
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * A Plugin which allows to force every incoming message to be PERSISTENT or NON-PERSISTENT. 
- * 
- * Useful, if you have set the broker usage policy to process ONLY persistent or ONLY non-persistent
- * messages. 
- *  @org.apache.xbean.XBean element="forcePersistencyModeBrokerPlugin"
- */
-public class ForcePersistencyModeBrokerPlugin implements BrokerPlugin {
-  private static Logger LOG = LoggerFactory.getLogger(ForcePersistencyModeBrokerPlugin.class);
-  private boolean persistenceFlag = false;
-  
-  /**
- * Constructor
- */
-public ForcePersistencyModeBrokerPlugin() {
-  }
-
-  /** 
- * @param broker
- * @return the Broker
- * @throws Exception
- * @see org.apache.activemq.broker.BrokerPlugin#installPlugin(org.apache.activemq.broker.Broker)
- */
-
-  public Broker installPlugin(Broker broker) throws Exception{
-    ForcePersistencyModeBroker pB = new ForcePersistencyModeBroker(broker);
-    pB.setPersistenceFlag(isPersistenceForced());
-    LOG.info("Installing ForcePersistencyModeBroker plugin: persistency enforced=" + pB.isPersistent());
-    return pB;
-  }
-
-  /** Sets the persistency mode.
-   *  
-   * @param persistenceFlag
-   */
-  public void setPersistenceFlag(final boolean persistenceFlag) {
-    this.persistenceFlag = persistenceFlag;
-  }
-
-  /**
-   * @return the mode the (activated) plugin will set the message delivery mode 
-   */
-  public final boolean isPersistenceForced() {
-    return persistenceFlag;
-  }
-  
-}
-
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java
deleted file mode 100644
index c5df8d9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
- * 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.plugin;
-
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.state.ProducerState;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.File;
-import java.net.URI;
-import java.util.Set;
-/**
- * A StatisticsBroker You can retrieve a Map Message for a Destination - or
- * Broker containing statistics as key-value pairs The message must contain a
- * replyTo Destination - else its ignored
- * 
- */
-public class StatisticsBroker extends BrokerFilter {
-    private static Logger LOG = LoggerFactory.getLogger(StatisticsBroker.class);
-    static final String STATS_DESTINATION_PREFIX = "ActiveMQ.Statistics.Destination";
-    static final String STATS_BROKER_PREFIX = "ActiveMQ.Statistics.Broker";
-    private static final IdGenerator ID_GENERATOR = new IdGenerator();
-    private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator();
-    protected final ProducerId advisoryProducerId = new ProducerId();
-
-    /**
-     * 
-     * Constructor
-     * 
-     * @param next
-     */
-    public StatisticsBroker(Broker next) {
-        super(next);
-        this.advisoryProducerId.setConnectionId(ID_GENERATOR.generateId());
-    }
-
-    /**
-     * Sets the persistence mode
-     * 
-     * @see org.apache.activemq.broker.BrokerFilter#send(org.apache.activemq.broker.ProducerBrokerExchange,
-     *      org.apache.activemq.command.Message)
-     */
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        ActiveMQDestination msgDest = messageSend.getDestination();
-        ActiveMQDestination replyTo = messageSend.getReplyTo();
-        if (replyTo != null) {
-            String physicalName = msgDest.getPhysicalName();
-            boolean destStats = physicalName.regionMatches(true, 0, STATS_DESTINATION_PREFIX, 0,
-                    STATS_DESTINATION_PREFIX.length());
-            boolean brokerStats = physicalName.regionMatches(true, 0, STATS_BROKER_PREFIX, 0, STATS_BROKER_PREFIX
-                    .length());
-            if (destStats) {
-                String queueryName = physicalName.substring(STATS_DESTINATION_PREFIX.length(), physicalName.length());
-                ActiveMQDestination queryDest = ActiveMQDestination.createDestination(queueryName,msgDest.getDestinationType());
-                Set<Destination> set = getDestinations(queryDest);
-                for (Destination dest : set) {
-                    DestinationStatistics stats = dest.getDestinationStatistics();
-                    if (stats != null) {
-                        ActiveMQMapMessage statsMessage = new ActiveMQMapMessage();
-                        statsMessage.setString("destinationName", dest.getActiveMQDestination().toString());
-                        statsMessage.setLong("size", stats.getMessages().getCount());
-                        statsMessage.setLong("enqueueCount", stats.getEnqueues().getCount());
-                        statsMessage.setLong("dequeueCount", stats.getDequeues().getCount());
-                        statsMessage.setLong("dispatchCount", stats.getDispatched().getCount());
-                        statsMessage.setLong("expiredCount", stats.getExpired().getCount());
-                        statsMessage.setLong("inflightCount", stats.getInflight().getCount());
-                        statsMessage.setLong("messagesCached", stats.getMessagesCached().getCount());
-                        statsMessage.setInt("memoryPercentUsage", dest.getMemoryUsage().getPercentUsage());
-                        statsMessage.setLong("memoryUsage", dest.getMemoryUsage().getUsage());
-                        statsMessage.setLong("memoryLimit", dest.getMemoryUsage().getLimit());
-                        statsMessage.setDouble("averageEnqueueTime", stats.getProcessTime().getAverageTime());
-                        statsMessage.setDouble("maxEnqueueTime", stats.getProcessTime().getMaxTime());
-                        statsMessage.setDouble("minEnqueueTime", stats.getProcessTime().getMinTime());
-                        statsMessage.setLong("consumerCount", stats.getConsumers().getCount());
-                        statsMessage.setLong("producerCount", stats.getProducers().getCount());
-                        statsMessage.setJMSCorrelationID(messageSend.getCorrelationId());
-                        sendStats(producerExchange.getConnectionContext(), statsMessage, replyTo);
-                    }
-                }
-            } else if (brokerStats) {
-                ActiveMQMapMessage statsMessage = new ActiveMQMapMessage();
-                BrokerService brokerService = getBrokerService();
-                RegionBroker regionBroker = (RegionBroker) brokerService.getRegionBroker();
-                SystemUsage systemUsage = brokerService.getSystemUsage();
-                DestinationStatistics stats = regionBroker.getDestinationStatistics();
-                statsMessage.setString("brokerName", regionBroker.getBrokerName());
-                statsMessage.setString("brokerId", regionBroker.getBrokerId().toString());
-                statsMessage.setLong("size", stats.getMessages().getCount());
-                statsMessage.setLong("enqueueCount", stats.getEnqueues().getCount());
-                statsMessage.setLong("dequeueCount", stats.getDequeues().getCount());
-                statsMessage.setLong("dispatchCount", stats.getDispatched().getCount());
-                statsMessage.setLong("expiredCount", stats.getExpired().getCount());
-                statsMessage.setLong("inflightCount", stats.getInflight().getCount());
-                statsMessage.setLong("messagesCached", stats.getMessagesCached().getCount());
-                statsMessage.setInt("memoryPercentUsage", systemUsage.getMemoryUsage().getPercentUsage());
-                statsMessage.setLong("memoryUsage", systemUsage.getMemoryUsage().getUsage());
-                statsMessage.setLong("memoryLimit", systemUsage.getMemoryUsage().getLimit());
-                statsMessage.setInt("storePercentUsage", systemUsage.getStoreUsage().getPercentUsage());
-                statsMessage.setLong("storeUsage", systemUsage.getStoreUsage().getUsage());
-                statsMessage.setLong("storeLimit", systemUsage.getStoreUsage().getLimit());
-                statsMessage.setInt("tempPercentUsage", systemUsage.getTempUsage().getPercentUsage());
-                statsMessage.setLong("tempUsage", systemUsage.getTempUsage().getUsage());
-                statsMessage.setLong("tempLimit", systemUsage.getTempUsage().getLimit());
-                statsMessage.setDouble("averageEnqueueTime", stats.getProcessTime().getAverageTime());
-                statsMessage.setDouble("maxEnqueueTime", stats.getProcessTime().getMaxTime());
-                statsMessage.setDouble("minEnqueueTime", stats.getProcessTime().getMinTime());
-                statsMessage.setLong("consumerCount", stats.getConsumers().getCount());
-                statsMessage.setLong("producerCount", stats.getProducers().getCount());
-                String answer = brokerService.getTransportConnectorURIsAsMap().get("tcp");
-                answer = answer != null ? answer : "";
-                statsMessage.setString("openwire", answer);
-                answer = brokerService.getTransportConnectorURIsAsMap().get("stomp");
-                answer = answer != null ? answer : "";
-                statsMessage.setString("stomp", answer);
-                answer = brokerService.getTransportConnectorURIsAsMap().get("ssl");
-                answer = answer != null ? answer : "";
-                statsMessage.setString("ssl", answer);
-                answer = brokerService.getTransportConnectorURIsAsMap().get("stomp+ssl");
-                answer = answer != null ? answer : "";
-                statsMessage.setString("stomp+ssl", answer);
-                URI uri = brokerService.getVmConnectorURI();
-                answer = uri != null ? uri.toString() : "";
-                statsMessage.setString("vm", answer);
-                File file = brokerService.getDataDirectoryFile();
-                answer = file != null ? file.getCanonicalPath() : "";
-                statsMessage.setString("dataDirectory", answer);
-                statsMessage.setJMSCorrelationID(messageSend.getCorrelationId());
-                sendStats(producerExchange.getConnectionContext(), statsMessage, replyTo);
-            } else {
-                super.send(producerExchange, messageSend);
-            }
-        } else {
-            super.send(producerExchange, messageSend);
-        }
-    }
-
-    public void start() throws Exception {
-        super.start();
-        LOG.info("Starting StatisticsBroker");
-    }
-
-    public void stop() throws Exception {
-        super.stop();
-    }
-
-    protected void sendStats(ConnectionContext context, ActiveMQMapMessage msg, ActiveMQDestination replyTo)
-            throws Exception {
-        msg.setPersistent(false);
-        msg.setType(AdvisorySupport.ADIVSORY_MESSAGE_TYPE);
-        msg.setMessageId(new MessageId(this.advisoryProducerId, this.messageIdGenerator.getNextSequenceId()));
-        msg.setDestination(replyTo);
-        msg.setResponseRequired(false);
-        msg.setProducerId(this.advisoryProducerId);
-        boolean originalFlowControl = context.isProducerFlowControl();
-        final ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-        producerExchange.setConnectionContext(context);
-        producerExchange.setMutable(true);
-        producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
-        try {
-            context.setProducerFlowControl(false);
-            this.next.send(producerExchange, msg);
-        } finally {
-            context.setProducerFlowControl(originalFlowControl);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBrokerPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBrokerPlugin.java
deleted file mode 100644
index a78af20..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBrokerPlugin.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.plugin;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A StatisticsBrokerPlugin
- * You can retrieve a Map Message for a Destination - or
- * Broker containing statistics as key-value pairs The message must contain a
- * replyTo Destination - else its ignored
- * To retrieve stats on the broker send a empty message to ActiveMQ.Statistics.Broker (Queue or Topic)
- * With a replyTo set to the destination you want the stats returned to.
- * To retrieve stats for a destination - e.g. foo - send an empty message to ActiveMQ.Statistics.Destination.foo
- * - this works with wildcards to - you get a message for each wildcard match on the replyTo destination.
- * The stats message is a MapMessage populated with statistics for the target
- * @org.apache.xbean.XBean element="statisticsBrokerPlugin"
- *
- */
-public class StatisticsBrokerPlugin implements BrokerPlugin {
-    private static Logger LOG = LoggerFactory.getLogger(StatisticsBrokerPlugin.class);
-    /** 
-     * @param broker
-     * @return the plug-in
-     * @throws Exception
-     * @see org.apache.activemq.broker.BrokerPlugin#installPlugin(org.apache.activemq.broker.Broker)
-     */
-    public Broker installPlugin(Broker broker) throws Exception {
-        StatisticsBroker answer = new StatisticsBroker(broker);
-        LOG.info("Installing StaticsBroker");
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java
deleted file mode 100644
index c7da81a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.proxy;
-
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-class ProxyConnection implements Service {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ProxyConnection.class);
-
-    private final Transport localTransport;
-    private final Transport remoteTransport;
-    private AtomicBoolean shuttingDown = new AtomicBoolean(false);
-    private AtomicBoolean running = new AtomicBoolean(false);
-
-    public ProxyConnection(Transport localTransport, Transport remoteTransport) {
-        this.localTransport = localTransport;
-        this.remoteTransport = remoteTransport;
-    }
-
-    public void onFailure(IOException e) {
-        if (!shuttingDown.get()) {
-            LOG.debug("Transport error: " + e, e);
-            try {
-                stop();
-            } catch (Exception ignore) {
-            }
-        }
-    }
-
-    public void start() throws Exception {
-        if (!running.compareAndSet(false, true)) {
-            return;
-        }
-
-        this.localTransport.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Object command) {
-                boolean shutdown = false;
-                if (command.getClass() == ShutdownInfo.class) {
-                    shuttingDown.set(true);
-                    shutdown = true;
-                }
-                // skipping WireFormat infos
-                if (command.getClass() == WireFormatInfo.class) {
-                    return;
-                }
-                try {
-                    remoteTransport.oneway(command);
-                    if (shutdown) {
-                        stop();
-                    }
-                } catch (IOException error) {
-                    onFailure(error);
-                } catch (Exception error) {
-                    onFailure(IOExceptionSupport.create(error));
-                }
-            }
-
-            public void onException(IOException error) {
-                onFailure(error);
-            }
-        });
-
-        this.remoteTransport.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Object command) {
-                try {
-                    // skipping WireFormat infos
-                    if (command.getClass() == WireFormatInfo.class) {
-                        return;
-                    }
-                    localTransport.oneway(command);
-                } catch (IOException error) {
-                    onFailure(error);
-                }
-            }
-
-            public void onException(IOException error) {
-                onFailure(error);
-            }
-        });
-
-        localTransport.start();
-        remoteTransport.start();
-    }
-
-    public void stop() throws Exception {
-        if (!running.compareAndSet(true, false)) {
-            return;
-        }
-        shuttingDown.set(true);
-        ServiceStopper ss = new ServiceStopper();
-        ss.stop(localTransport);
-        ss.stop(remoteTransport);
-        ss.throwFirstException();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnector.java b/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnector.java
deleted file mode 100644
index e47877d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnector.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * 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.proxy;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Iterator;
-import java.util.concurrent.CopyOnWriteArrayList;
-import org.apache.activemq.Service;
-import org.apache.activemq.transport.CompositeTransport;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportFilter;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class ProxyConnector implements Service {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ProxyConnector.class);
-    private TransportServer server;
-    private URI bind;
-    private URI remote;
-    private URI localUri;
-    private String name;
-    /**
-     * Should we proxy commands to the local broker using VM transport as well?
-     */
-    private boolean proxyToLocalBroker = true;
-    
-    private final CopyOnWriteArrayList<ProxyConnection> connections = new CopyOnWriteArrayList<ProxyConnection>();
-
-    public void start() throws Exception {
-
-        this.getServer().setAcceptListener(new TransportAcceptListener() {
-            public void onAccept(Transport localTransport) {
-                try {
-                    Transport remoteTransport = createRemoteTransport();
-                    ProxyConnection connection = new ProxyConnection(localTransport, remoteTransport);
-                    connections.add(connection);
-                    connection.start();
-                } catch (Exception e) {
-                    onAcceptError(e);
-                }
-            }
-
-            public void onAcceptError(Exception error) {
-                LOG.error("Could not accept connection: " + error, error);
-            }
-        });
-        getServer().start();
-        LOG.info("Proxy Connector " + getName() + " Started");
-
-    }
-
-    public void stop() throws Exception {
-        ServiceStopper ss = new ServiceStopper();
-        if (this.server != null) {
-            ss.stop(this.server);
-        }
-        for (Iterator<ProxyConnection> iter = connections.iterator(); iter.hasNext();) {
-            LOG.info("Connector stopped: Stopping proxy.");
-            ss.stop(iter.next());
-        }
-        ss.throwFirstException();
-        LOG.info("Proxy Connector " + getName() + " Stopped");
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public URI getLocalUri() {
-        return localUri;
-    }
-
-    public void setLocalUri(URI localURI) {
-        this.localUri = localURI;
-    }
-
-    public URI getBind() {
-        return bind;
-    }
-
-    public void setBind(URI bind) {
-        this.bind = bind;
-    }
-
-    public URI getRemote() {
-        return remote;
-    }
-
-    public void setRemote(URI remote) {
-        this.remote = remote;
-    }
-
-    public TransportServer getServer() throws IOException, URISyntaxException {
-        if (server == null) {
-            server = createServer();
-        }
-        return server;
-    }
-
-    public void setServer(TransportServer server) {
-        this.server = server;
-    }
-
-    protected TransportServer createServer() throws IOException, URISyntaxException {
-        if (bind == null) {
-            throw new IllegalArgumentException("You must specify either a server or the bind property");
-        }
-        return TransportFactory.bind(bind);
-    }
-
-    private Transport createRemoteTransport() throws Exception {
-        Transport transport = TransportFactory.compositeConnect(remote);
-        CompositeTransport ct = transport.narrow(CompositeTransport.class);
-        if (ct != null && localUri != null && proxyToLocalBroker) {
-            ct.add(false,new URI[] {localUri});
-        }
-
-        // Add a transport filter so that we can track the transport life cycle
-        transport = new TransportFilter(transport) {
-            @Override
-            public void stop() throws Exception {
-                LOG.info("Stopping proxy.");
-                super.stop();
-                connections.remove(this);
-            }
-        };
-        return transport;
-    }
-
-    public String getName() {
-        if (name == null) {
-            if (server != null) {
-                name = server.getConnectURI().toString();
-            } else {
-                name = "proxy";
-            }
-        }
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public boolean isProxyToLocalBroker() {
-        return proxyToLocalBroker;
-    }
-
-    public void setProxyToLocalBroker(boolean proxyToLocalBroker) {
-        this.proxyToLocalBroker = proxyToLocalBroker;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthenticationUser.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthenticationUser.java
deleted file mode 100644
index edd0eab..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthenticationUser.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.security;
-
-/**
- * A helper object used to configure simple authentiaction plugin
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class AuthenticationUser {
-
-    String username;
-    String password;
-    String groups;
-
-    public AuthenticationUser(String username, String password, String groups) {
-        this.username = username;
-        this.password = password;
-        this.groups = groups;
-    }
-
-    public String getGroups() {
-        return groups;
-    }
-
-    public void setGroups(String groups) {
-        this.groups = groups;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationBroker.java
deleted file mode 100644
index 47bb01d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationBroker.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/**
- * 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.security;
-
-import java.util.Set;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-
-/**
- * Verifies if a authenticated user can do an operation against the broker using
- * an authorization map.
- * 
- * 
- */
-public class AuthorizationBroker extends BrokerFilter implements SecurityAdminMBean {
-
-    private final AuthorizationMap authorizationMap;
-
-    public AuthorizationBroker(Broker next, AuthorizationMap authorizationMap) {
-        super(next);
-        this.authorizationMap = authorizationMap;
-    }
-           
-    @Override
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception {
-        addDestination(context, info.getDestination(),true);
-        super.addDestinationInfo(context, info);
-    }
-
-    @Override
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,boolean create) throws Exception {
-        final SecurityContext securityContext = context.getSecurityContext();
-        if (securityContext == null) {
-            throw new SecurityException("User is not authenticated.");
-        }
-        
-        Destination existing = this.getDestinationMap().get(destination);
-        if (existing != null) {
-        	return super.addDestination(context, destination,create);
-        }
-        
-        if (!securityContext.isBrokerContext()) {
-            Set<?> allowedACLs = null;
-            if (!destination.isTemporary()) {
-                allowedACLs = authorizationMap.getAdminACLs(destination);
-            } else {
-                allowedACLs = authorizationMap.getTempDestinationAdminACLs();
-            }
-
-            if (allowedACLs != null && !securityContext.isInOneOf(allowedACLs)) {
-                throw new SecurityException("User " + securityContext.getUserName() + " is not authorized to create: " + destination);
-            }
-
-        }
-
-        return super.addDestination(context, destination,create);
-    }
-
-    @Override
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception {
-
-        final SecurityContext securityContext = context.getSecurityContext();
-        if (securityContext == null) {
-            throw new SecurityException("User is not authenticated.");
-        }
-        Set<?> allowedACLs = null;
-        if (!destination.isTemporary()) {
-            allowedACLs = authorizationMap.getAdminACLs(destination);
-        } else {
-            allowedACLs = authorizationMap.getTempDestinationAdminACLs();
-        }
-
-        if (!securityContext.isBrokerContext() && allowedACLs != null && !securityContext.isInOneOf(allowedACLs)) {
-            throw new SecurityException("User " + securityContext.getUserName() + " is not authorized to remove: " + destination);
-        }
-        super.removeDestination(context, destination, timeout);
-    }
-
-    @Override
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
-
-        final SecurityContext subject = context.getSecurityContext();
-        if (subject == null) {
-            throw new SecurityException("User is not authenticated.");
-        }
-        Set<?> allowedACLs = null;
-        if (!info.getDestination().isTemporary()) {
-            allowedACLs = authorizationMap.getReadACLs(info.getDestination());
-        } else {
-            allowedACLs = authorizationMap.getTempDestinationReadACLs();
-        }
-
-        if (!subject.isBrokerContext() && allowedACLs != null && !subject.isInOneOf(allowedACLs)) {
-            throw new SecurityException("User " + subject.getUserName() + " is not authorized to read from: " + info.getDestination());
-        }
-        subject.getAuthorizedReadDests().put(info.getDestination(), info.getDestination());
-
-        /*
-         * Need to think about this a little more. We could do per message
-         * security checking to implement finer grained security checking. For
-         * example a user can only see messages with price>1000 . Perhaps this
-         * should just be another additional broker filter that installs this
-         * type of feature. If we did want to do that, then we would install a
-         * predicate. We should be careful since there may be an existing
-         * predicate already assigned and the consumer info may be sent to a
-         * remote broker, so it also needs to support being marshaled.
-         * info.setAdditionalPredicate(new BooleanExpression() { public boolean
-         * matches(MessageEvaluationContext message) throws JMSException { if(
-         * !subject.getAuthorizedReadDests().contains(message.getDestination()) ) {
-         * Set allowedACLs =
-         * authorizationMap.getReadACLs(message.getDestination());
-         * if(allowedACLs!=null && !subject.isInOneOf(allowedACLs)) return
-         * false; subject.getAuthorizedReadDests().put(message.getDestination(),
-         * message.getDestination()); } return true; } public Object
-         * evaluate(MessageEvaluationContext message) throws JMSException {
-         * return matches(message) ? Boolean.TRUE : Boolean.FALSE; } });
-         */
-
-        return super.addConsumer(context, info);
-    }
-
-    @Override
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
-
-        SecurityContext subject = context.getSecurityContext();
-        if (subject == null) {
-            throw new SecurityException("User is not authenticated.");
-        }
-        if (!subject.isBrokerContext() && info.getDestination() != null) {
-
-            Set<?> allowedACLs = null;
-            if (!info.getDestination().isTemporary()) {
-                allowedACLs = authorizationMap.getWriteACLs(info.getDestination());
-            } else {
-                allowedACLs = authorizationMap.getTempDestinationWriteACLs();
-            }
-            if (allowedACLs != null && !subject.isInOneOf(allowedACLs)) {
-                throw new SecurityException("User " + subject.getUserName() + " is not authorized to write to: " + info.getDestination());
-            }
-            subject.getAuthorizedWriteDests().put(info.getDestination(), info.getDestination());
-        }
-
-        super.addProducer(context, info);
-    }
-
-    @Override
-    public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
-        SecurityContext subject = producerExchange.getConnectionContext().getSecurityContext();
-        if (subject == null) {
-            throw new SecurityException("User is not authenticated.");
-        }
-        if (!subject.isBrokerContext() && !subject.getAuthorizedWriteDests().contains(messageSend.getDestination())) {
-
-            Set<?> allowedACLs = null;
-            if (!messageSend.getDestination().isTemporary()) {
-                allowedACLs = authorizationMap.getWriteACLs(messageSend.getDestination());
-            } else {
-                allowedACLs = authorizationMap.getTempDestinationWriteACLs();
-            }
-
-            if (allowedACLs != null && !subject.isInOneOf(allowedACLs)) {
-                throw new SecurityException("User " + subject.getUserName() + " is not authorized to write to: " + messageSend.getDestination());
-            }
-            subject.getAuthorizedWriteDests().put(messageSend.getDestination(), messageSend.getDestination());
-        }
-
-        super.send(producerExchange, messageSend);
-    }
-
-    // SecurityAdminMBean interface
-    // -------------------------------------------------------------------------
-
-    public void addQueueRole(String queue, String operation, String role) {
-        addDestinationRole(new ActiveMQQueue(queue), operation, role);
-    }
-
-    public void addTopicRole(String topic, String operation, String role) {
-        addDestinationRole(new ActiveMQTopic(topic), operation, role);
-    }
-
-    public void removeQueueRole(String queue, String operation, String role) {
-        removeDestinationRole(new ActiveMQQueue(queue), operation, role);
-    }
-
-    public void removeTopicRole(String topic, String operation, String role) {
-        removeDestinationRole(new ActiveMQTopic(topic), operation, role);
-    }
-
-    public void addDestinationRole(javax.jms.Destination destination, String operation, String role) {
-    }
-
-    public void removeDestinationRole(javax.jms.Destination destination, String operation, String role) {
-    }
-
-    public void addRole(String role) {
-    }
-
-    public void addUserRole(String user, String role) {
-    }
-
-    public void removeRole(String role) {
-    }
-
-    public void removeUserRole(String user, String role) {
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationEntry.java
deleted file mode 100644
index 71c8e28..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationEntry.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * 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.security;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.activemq.filter.DestinationMapEntry;
-
-/**
- * Represents an entry in a {@link DefaultAuthorizationMap} for assigning
- * different operations (read, write, admin) of user roles to a specific
- * destination or a hierarchical wildcard area of destinations.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class AuthorizationEntry extends DestinationMapEntry {
-
-    private Set<Object> readACLs = emptySet();
-    private Set<Object> writeACLs = emptySet();
-    private Set<Object> adminACLs = emptySet();
-
-    private String adminRoles;
-    private String readRoles;
-    private String writeRoles;
-
-    private String groupClass = "org.apache.activemq.jaas.GroupPrincipal";
-
-    public String getGroupClass() {
-        return groupClass;
-    }
-
-    @SuppressWarnings("unchecked")
-    private Set<Object> emptySet() {
-        return Collections.EMPTY_SET;
-    }
-
-    public void setGroupClass(String groupClass) {
-        this.groupClass = groupClass;
-    }
-
-    public Set<Object> getAdminACLs() {
-        return adminACLs;
-    }
-
-    public void setAdminACLs(Set<Object> adminACLs) {
-        this.adminACLs = adminACLs;
-    }
-
-    public Set<Object> getReadACLs() {
-        return readACLs;
-    }
-
-    public void setReadACLs(Set<Object> readACLs) {
-        this.readACLs = readACLs;
-    }
-
-    public Set<Object> getWriteACLs() {
-        return writeACLs;
-    }
-
-    public void setWriteACLs(Set<Object> writeACLs) {
-        this.writeACLs = writeACLs;
-    }
-
-    // helper methods for easier configuration in Spring
-    // ACLs are already set in the afterPropertiesSet method to ensure that
-    // groupClass is set first before
-    // calling parceACLs() on any of the roles. We still need to add the call to
-    // parceACLs inside the helper
-    // methods for instances where we configure security programatically without
-    // using xbean
-    // -------------------------------------------------------------------------
-    public void setAdmin(String roles) throws Exception {
-        adminRoles = roles;
-        setAdminACLs(parseACLs(adminRoles));
-    }
-
-    public void setRead(String roles) throws Exception {
-        readRoles = roles;
-        setReadACLs(parseACLs(readRoles));
-    }
-
-    public void setWrite(String roles) throws Exception {
-        writeRoles = roles;
-        setWriteACLs(parseACLs(writeRoles));
-    }
-
-    protected Set<Object> parseACLs(String roles) throws Exception {
-        Set<Object> answer = new HashSet<Object>();
-        StringTokenizer iter = new StringTokenizer(roles, ",");
-        while (iter.hasMoreTokens()) {
-            String name = iter.nextToken().trim();
-            Class[] paramClass = new Class[1];
-            paramClass[0] = String.class;
-
-            Object[] param = new Object[1];
-            param[0] = name;
-
-            try {
-                Class cls = Class.forName(groupClass);
-
-                Constructor[] constructors = cls.getConstructors();
-                int i;
-                for (i = 0; i < constructors.length; i++) {
-                    Class[] paramTypes = constructors[i].getParameterTypes();
-                    if (paramTypes.length != 0 && paramTypes[0].equals(paramClass[0])) {
-                        break;
-                    }
-                }
-                if (i < constructors.length) {
-                    Object instance = constructors[i].newInstance(param);
-                    answer.add(instance);
-                } else {
-                    Object instance = cls.newInstance();
-                    Method[] methods = cls.getMethods();
-                    i = 0;
-                    for (i = 0; i < methods.length; i++) {
-                        Class[] paramTypes = methods[i].getParameterTypes();
-                        if (paramTypes.length != 0 && methods[i].getName().equals("setName") && paramTypes[0].equals(paramClass[0])) {
-                            break;
-                        }
-                    }
-
-                    if (i < methods.length) {
-                        methods[i].invoke(instance, param);
-                        answer.add(instance);
-                    } else {
-                        throw new NoSuchMethodException();
-                    }
-                }
-            } catch (Exception e) {
-                throw e;
-            }
-        }
-        return answer;
-    }
-
-    public void afterPropertiesSet() throws Exception {
-        super.afterPropertiesSet();
-
-        if (adminRoles != null) {
-            setAdminACLs(parseACLs(adminRoles));
-        }
-
-        if (writeRoles != null) {
-            setWriteACLs(parseACLs(writeRoles));
-        }
-
-        if (readRoles != null) {
-            setReadACLs(parseACLs(readRoles));
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationMap.java
deleted file mode 100644
index 312fdc7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationMap.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.security;
-
-import java.util.Set;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * 
- */
-public interface AuthorizationMap {
-
-    /**
-     * Returns the set of all ACLs capable of administering temp destination
-     */
-    Set<?> getTempDestinationAdminACLs();
-
-    /**
-     * Returns the set of all ACLs capable of reading from temp destination
-     */
-    Set<?> getTempDestinationReadACLs();
-
-    /**
-     * Returns the set of all ACLs capable of writing to temp destination
-     */
-    Set<?> getTempDestinationWriteACLs();
-
-    /**
-     * Returns the set of all ACLs capable of administering the given
-     * destination
-     */
-    Set<?> getAdminACLs(ActiveMQDestination destination);
-
-    /**
-     * Returns the set of all ACLs capable of reading (consuming from) the given
-     * destination
-     */
-    Set<?> getReadACLs(ActiveMQDestination destination);
-
-    /**
-     * Returns the set of all ACLs capable of writing to the given destination
-     */
-    Set<?> getWriteACLs(ActiveMQDestination destination);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationPlugin.java
deleted file mode 100644
index 0d469bf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/AuthorizationPlugin.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.security;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-
-/**
- * An authorization plugin where each operation on a destination is checked
- * against an authorizationMap
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class AuthorizationPlugin implements BrokerPlugin {
-
-    private AuthorizationMap map;
-
-    public AuthorizationPlugin() {
-    }
-
-    public AuthorizationPlugin(AuthorizationMap map) {
-        this.map = map;
-    }
-
-    public Broker installPlugin(Broker broker) {
-        if (map == null) {
-            throw new IllegalArgumentException("You must configure a 'map' property");
-        }
-        return new AuthorizationBroker(broker, map);
-    }
-
-    public AuthorizationMap getMap() {
-        return map;
-    }
-
-    public void setMap(AuthorizationMap map) {
-        this.map = map;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java
deleted file mode 100644
index 04f9083..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.security;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.filter.DestinationMap;
-
-/**
- * Represents a destination based configuration of policies so that individual
- * destinations or wildcard hierarchies of destinations can be configured using
- * different policies. Each entry in the map represents the authorization ACLs
- * for each operation.
- * 
- * @org.apache.xbean.XBean element="authorizationMap"
- * 
- */
-public class DefaultAuthorizationMap extends DestinationMap implements AuthorizationMap {
-
-    private AuthorizationEntry defaultEntry;
-
-    private TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry;
-
-    public DefaultAuthorizationMap() {
-    }
-
-    public DefaultAuthorizationMap(List authorizationEntries) {
-        setAuthorizationEntries(authorizationEntries);
-
-    }
-
-    public void setTempDestinationAuthorizationEntry(TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry) {
-        this.tempDestinationAuthorizationEntry = tempDestinationAuthorizationEntry;
-    }
-
-    public TempDestinationAuthorizationEntry getTempDestinationAuthorizationEntry() {
-        return this.tempDestinationAuthorizationEntry;
-    }
-
-    public Set<Object> getTempDestinationAdminACLs() {
-        if (tempDestinationAuthorizationEntry != null) {
-            return tempDestinationAuthorizationEntry.getAdminACLs();
-        } else {
-            return null;
-        }
-    }
-
-    public Set<Object> getTempDestinationReadACLs() {
-        if (tempDestinationAuthorizationEntry != null) {
-            return tempDestinationAuthorizationEntry.getReadACLs();
-        } else {
-            return null;
-        }
-    }
-
-    public Set<Object> getTempDestinationWriteACLs() {
-        if (tempDestinationAuthorizationEntry != null) {
-            return tempDestinationAuthorizationEntry.getWriteACLs();
-        } else {
-            return null;
-        }
-    }
-
-    public Set<Object> getAdminACLs(ActiveMQDestination destination) {
-        Set<AuthorizationEntry> entries = getAllEntries(destination);
-        Set<Object> answer = new HashSet<Object>();
-        // now lets go through each entry adding individual
-        for (Iterator<AuthorizationEntry> iter = entries.iterator(); iter.hasNext();) {
-            AuthorizationEntry entry = iter.next();
-            answer.addAll(entry.getAdminACLs());
-        }
-        return answer;
-    }
-
-    public Set<Object> getReadACLs(ActiveMQDestination destination) {
-        Set<AuthorizationEntry> entries = getAllEntries(destination);
-        Set<Object> answer = new HashSet<Object>();
-
-        // now lets go through each entry adding individual
-        for (Iterator<AuthorizationEntry> iter = entries.iterator(); iter.hasNext();) {
-            AuthorizationEntry entry = iter.next();
-            answer.addAll(entry.getReadACLs());
-        }
-        return answer;
-    }
-
-    public Set<Object> getWriteACLs(ActiveMQDestination destination) {
-        Set<AuthorizationEntry> entries = getAllEntries(destination);
-        Set<Object> answer = new HashSet<Object>();
-
-        // now lets go through each entry adding individual
-        for (Iterator<AuthorizationEntry> iter = entries.iterator(); iter.hasNext();) {
-            AuthorizationEntry entry = iter.next();
-            answer.addAll(entry.getWriteACLs());
-        }
-        return answer;
-    }
-
-    public AuthorizationEntry getEntryFor(ActiveMQDestination destination) {
-        AuthorizationEntry answer = (AuthorizationEntry)chooseValue(destination);
-        if (answer == null) {
-            answer = getDefaultEntry();
-        }
-        return answer;
-    }
-
-    /**
-     * Sets the individual entries on the authorization map
-     * 
-     * @org.apache.xbean.ElementType class="org.apache.activemq.security.AuthorizationEntry"
-     */
-    public void setAuthorizationEntries(List entries) {
-        super.setEntries(entries);
-    }
-
-    public AuthorizationEntry getDefaultEntry() {
-        return defaultEntry;
-    }
-
-    public void setDefaultEntry(AuthorizationEntry defaultEntry) {
-        this.defaultEntry = defaultEntry;
-    }
-
-    protected Class<AuthorizationEntry> getEntryClass() {
-        return AuthorizationEntry.class;
-    }
-
-    protected Set<AuthorizationEntry> getAllEntries(ActiveMQDestination destination) {
-        Set<AuthorizationEntry> entries = get(destination);
-        if (defaultEntry != null) {
-            entries.add(defaultEntry);
-        }
-        return entries;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationBroker.java
deleted file mode 100644
index 2172ded..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationBroker.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.security;
-
-import java.security.Principal;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import javax.security.auth.Subject;
-import javax.security.auth.login.LoginContext;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.jaas.JassCredentialCallbackHandler;
-
-/**
- * Logs a user in using JAAS.
- * 
- * 
- */
-public class JaasAuthenticationBroker extends BrokerFilter {
-
-    private final String jassConfiguration;
-    private final CopyOnWriteArrayList<SecurityContext> securityContexts = new CopyOnWriteArrayList<SecurityContext>();
-
-    public JaasAuthenticationBroker(Broker next, String jassConfiguration) {
-        super(next);
-        this.jassConfiguration = jassConfiguration;
-    }
-
-    static class JaasSecurityContext extends SecurityContext {
-
-        private final Subject subject;
-
-        public JaasSecurityContext(String userName, Subject subject) {
-            super(userName);
-            this.subject = subject;
-        }
-
-        public Set<Principal> getPrincipals() {
-            return subject.getPrincipals();
-        }
-
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-
-        if (context.getSecurityContext() == null) {
-            // Set the TCCL since it seems JAAS needs it to find the login
-            // module classes.
-            ClassLoader original = Thread.currentThread().getContextClassLoader();
-            Thread.currentThread().setContextClassLoader(JaasAuthenticationBroker.class.getClassLoader());
-            try {
-                // Do the login.
-                try {
-                    JassCredentialCallbackHandler callback = new JassCredentialCallbackHandler(info
-                        .getUserName(), info.getPassword());
-                    LoginContext lc = new LoginContext(jassConfiguration, callback);
-                    lc.login();
-                    Subject subject = lc.getSubject();
-
-                    SecurityContext s = new JaasSecurityContext(info.getUserName(), subject);
-                    context.setSecurityContext(s);
-                    securityContexts.add(s);
-                } catch (Exception e) {
-                    throw (SecurityException)new SecurityException("User name or password is invalid.")
-                        .initCause(e);
-                }
-            } finally {
-                Thread.currentThread().setContextClassLoader(original);
-            }
-        }
-        super.addConnection(context, info);
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error)
-        throws Exception {
-        super.removeConnection(context, info, error);
-        if (securityContexts.remove(context.getSecurityContext())) {
-            context.setSecurityContext(null);
-        }
-    }
-
-    /**
-     * Previously logged in users may no longer have the same access anymore.
-     * Refresh all the logged into users.
-     */
-    public void refresh() {
-        for (Iterator<SecurityContext> iter = securityContexts.iterator(); iter.hasNext();) {
-            SecurityContext sc = iter.next();
-            sc.getAuthorizedReadDests().clear();
-            sc.getAuthorizedWriteDests().clear();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationPlugin.java
deleted file mode 100644
index d0ef4e2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationPlugin.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.security;
-
-import java.net.URL;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-
-/**
- * Adds a JAAS based authentication security plugin
- * 
- * @org.apache.xbean.XBean description="Provides a JAAS based authentication plugin"
- * 
- * 
- */
-public class JaasAuthenticationPlugin implements BrokerPlugin {
-    protected String configuration = "activemq-domain";
-    protected boolean discoverLoginConfig = true;
-
-    public Broker installPlugin(Broker broker) {
-        initialiseJaas();
-        return new JaasAuthenticationBroker(broker, configuration);
-    }
-
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public String getConfiguration() {
-        return configuration;
-    }
-
-    /**
-     * Sets the JAAS configuration domain name used
-     */
-    public void setConfiguration(String jaasConfiguration) {
-        this.configuration = jaasConfiguration;
-    }
-
-
-    public boolean isDiscoverLoginConfig() {
-        return discoverLoginConfig;
-    }
-
-    /**
-     * Enables or disables the auto-discovery of the login.config file for JAAS to initialize itself. 
-     * This flag is enabled by default such that if the <b>java.security.auth.login.config</b> system property
-     * is not defined then it is set to the location of the <b>login.config</b> file on the classpath.
-     */
-    public void setDiscoverLoginConfig(boolean discoverLoginConfig) {
-        this.discoverLoginConfig = discoverLoginConfig;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected void initialiseJaas() {
-        if (discoverLoginConfig) {
-            String path = System.getProperty("java.security.auth.login.config");
-            if (path == null) {
-                //URL resource = Thread.currentThread().getContextClassLoader().getResource("login.config");
-                URL resource = null;
-                if (resource == null) {
-                    resource = getClass().getClassLoader().getResource("login.config");
-                }
-                if (resource != null) {
-                    path = resource.getFile();
-                    System.setProperty("java.security.auth.login.config", path);
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java
deleted file mode 100644
index 9a4e52c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.security;
-
-import java.security.Principal;
-import java.security.cert.X509Certificate;
-import java.util.Iterator;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.LoginContext;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.jaas.JaasCertificateCallbackHandler;
-import org.apache.activemq.jaas.UserPrincipal;
-
-/**
- * A JAAS Authentication Broker that uses SSL Certificates. This class will
- * provide the JAAS framework with a JaasCertificateCallbackHandler that will
- * grant JAAS access to incoming connections' SSL certificate chains. NOTE:
- * There is a chance that the incoming connection does not have a valid
- * certificate (has null).
- * 
- * @author sepandm@gmail.com (Sepand)
- */
-public class JaasCertificateAuthenticationBroker extends BrokerFilter {
-    private final String jaasConfiguration;
-
-    /**
-     * Simple constructor. Leaves everything to superclass.
-     * 
-     * @param next The Broker that does the actual work for this Filter.
-     * @param jassConfiguration The JAAS domain configuration name (refere to
-     *                JAAS documentation).
-     */
-    public JaasCertificateAuthenticationBroker(Broker next, String jaasConfiguration) {
-        super(next);
-
-        this.jaasConfiguration = jaasConfiguration;
-    }
-
-    /**
-     * Overridden to allow for authentication based on client certificates.
-     * Connections being added will be authenticated based on their certificate
-     * chain and the JAAS module specified through the JAAS framework. NOTE: The
-     * security context's username will be set to the first UserPrincipal
-     * created by the login module.
-     * 
-     * @param context The context for the incoming Connection.
-     * @param info The ConnectionInfo Command representing the incoming
-     *                connection.
-     */
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-
-        if (context.getSecurityContext() == null) {
-            if (!(info.getTransportContext() instanceof X509Certificate[])) {
-                throw new SecurityException("Unable to authenticate transport without SSL certificate.");
-            }
-
-            // Set the TCCL since it seems JAAS needs it to find the login
-            // module classes.
-            ClassLoader original = Thread.currentThread().getContextClassLoader();
-            Thread.currentThread().setContextClassLoader(JaasAuthenticationBroker.class.getClassLoader());
-            try {
-                // Do the login.
-                try {
-                    CallbackHandler callback = new JaasCertificateCallbackHandler((X509Certificate[])info.getTransportContext());
-                    LoginContext lc = new LoginContext(jaasConfiguration, callback);
-                    lc.login();
-                    Subject subject = lc.getSubject();
-
-                    String dnName = "";
-
-                    for (Iterator iter = subject.getPrincipals().iterator(); iter.hasNext();) {
-                        Principal nextPrincipal = (Principal)iter.next();
-                        if (nextPrincipal instanceof UserPrincipal) {
-                            dnName = ((UserPrincipal)nextPrincipal).getName();
-                            break;
-                        }
-                    }
-                    SecurityContext s = new JaasCertificateSecurityContext(dnName, subject, (X509Certificate[])info.getTransportContext());
-                    context.setSecurityContext(s);
-                } catch (Exception e) {
-                    throw new SecurityException("User name or password is invalid: " + e.getMessage(), e);
-                }
-            } finally {
-                Thread.currentThread().setContextClassLoader(original);
-            }
-        }
-        super.addConnection(context, info);
-    }
-
-    /**
-     * Overriding removeConnection to make sure the security context is cleaned.
-     */
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        super.removeConnection(context, info, error);
-
-        context.setSecurityContext(null);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationPlugin.java
deleted file mode 100644
index 1b68411..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationPlugin.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.security;
-
-import org.apache.activemq.broker.Broker;
-
-/**
- * A JAAS based SSL certificate authentication plugin.
- * 
- * @org.apache.xbean.XBean description="Provides a JAAS based SSL certificate authentication plugin"
- * 
- * @author sepandm@gmail.com (Sepand)
- *
- */
-public class JaasCertificateAuthenticationPlugin extends JaasAuthenticationPlugin {
-    public Broker installPlugin(Broker broker) {
-        initialiseJaas();
-        return new JaasCertificateAuthenticationBroker(broker, configuration);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateSecurityContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateSecurityContext.java
deleted file mode 100644
index abf246a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateSecurityContext.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.security;
-
-import java.security.Principal;
-import java.security.cert.X509Certificate;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
-/**
- * Extends the SecurityContext to provide a username which is the
- * Distinguished Name from the certificate.
- *
- */
-public class JaasCertificateSecurityContext extends SecurityContext {
-
-    private Subject subject;
-    private X509Certificate[] certs;
-  
-    public JaasCertificateSecurityContext(String userName, Subject subject, X509Certificate[] certs) {
-        super(userName);
-        this.subject = subject;
-        this.certs = certs;
-    }
-
-    public Set<Principal> getPrincipals() {
-        return subject.getPrincipals();
-    }
-  
-    public String getUserName() {
-        if (certs != null && certs.length > 0) {
-            return certs[0].getSubjectDN().getName();
-        }
-        return super.getUserName();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasDualAuthenticationBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasDualAuthenticationBroker.java
deleted file mode 100644
index d9a6f80..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasDualAuthenticationBroker.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.security;
-
-import org.apache.activemq.broker.*;
-import org.apache.activemq.broker.jmx.ManagedTransportConnector;
-import org.apache.activemq.command.ConnectionInfo;
-
-import org.apache.activemq.transport.tcp.SslTransportServer;
-
-/**
- * A JAAS Authentication Broker that uses different JAAS domain configurations
- * depending if the connection is over an SSL enabled Connector or not.
- *
- * This allows you to, for instance, do DN based authentication for SSL connections
- * and use a mixture of username/passwords and simple guest authentication for
- * non-SSL connections.
- * <p>
- * An example <code>login.config</code> to do do this is:
- * <pre>
- * activemq-domain {
- *   org.apache.activemq.jaas.PropertiesLoginModule sufficient
- *       debug=true
- *       org.apache.activemq.jaas.properties.user="users.properties"
- *       org.apache.activemq.jaas.properties.group="groups.properties";
- *   org.apache.activemq.jaas.GuestLoginModule sufficient
- *       debug=true
- *       org.apache.activemq.jaas.guest.user="guest"
- *       org.apache.activemq.jaas.guest.group="guests";
- * };
- *
- * activemq-ssl-domain {
- *   org.apache.activemq.jaas.TextFileCertificateLoginModule required
- *       debug=true
- *       org.apache.activemq.jaas.textfiledn.user="dns.properties"
- *       org.apache.activemq.jaas.textfiledn.group="groups.properties";
- * };
- * </pre>
- */
-public class JaasDualAuthenticationBroker extends BrokerFilter {
-    private final JaasCertificateAuthenticationBroker sslBroker;
-    private final JaasAuthenticationBroker nonSslBroker;
-
-
-    /*** Simple constructor. Leaves everything to superclass.
-     *
-     * @param next The Broker that does the actual work for this Filter.
-     * @param jaasConfiguration The JAAS domain configuration name for
-     *                non-SSL connections (refer to JAAS documentation).
-     * @param jaasSslConfiguration The JAAS domain configuration name for
-     *                SSL connections (refer to JAAS documentation).
-     */
-    public JaasDualAuthenticationBroker(Broker next, String jaasConfiguration, String jaasSslConfiguration) {
-        super(next);
-
-        this.nonSslBroker = new JaasAuthenticationBroker(new EmptyBroker(), jaasConfiguration);
-        this.sslBroker = new JaasCertificateAuthenticationBroker(new EmptyBroker(), jaasSslConfiguration);
-    }
-
-    /**
-     * Overridden to allow for authentication using different Jaas
-     * configurations depending on if the connection is SSL or not.
-     *
-     * @param context The context for the incoming Connection.
-     * @param info The ConnectionInfo Command representing the incoming
-     *                connection.
-     */
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        if (context.getSecurityContext() == null) {
-            boolean isSSL;
-            Connector connector = context.getConnector();
-            if (connector instanceof TransportConnector) {
-                TransportConnector transportConnector = (TransportConnector) connector;
-                isSSL = (transportConnector.getServer() instanceof SslTransportServer);
-            } else {
-                isSSL = false;
-            }
-
-            if (isSSL) {
-                this.sslBroker.addConnection(context, info);
-            } else {
-                this.nonSslBroker.addConnection(context, info);
-            }
-            super.addConnection(context, info);
-        }
-    }
-
-    /**
-     * Overriding removeConnection to make sure the security context is cleaned.
-     */
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        boolean isSSL;
-        Connector connector = context.getConnector();
-        if (connector instanceof ManagedTransportConnector) {
-            ManagedTransportConnector managedTransportConnector = (ManagedTransportConnector) connector;
-            isSSL = (managedTransportConnector.getServer() instanceof SslTransportServer);
-        } else {
-            isSSL = false;
-        }
-        super.removeConnection(context, info, error);
-        if (isSSL) {
-            this.sslBroker.removeConnection(context, info, error);
-        } else {
-            this.nonSslBroker.removeConnection(context, info, error);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasDualAuthenticationPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasDualAuthenticationPlugin.java
deleted file mode 100644
index e350598..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/JaasDualAuthenticationPlugin.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.security;
-
-import org.apache.activemq.broker.Broker;
-
-/**
- * A JAAS based SSL certificate authentication plugin.
- *
- * @org.apache.xbean.XBean description="Provides a JAAS based authentication plugin
- * which uses properties for non-SSL and certificates for SSL"
- * 
- * 
- */
-public class JaasDualAuthenticationPlugin extends JaasAuthenticationPlugin {
-    private String sslConfiguration = "activemq-ssl-domain";
-
-    public Broker installPlugin(Broker broker) {
-        initialiseJaas();
-        return new JaasDualAuthenticationBroker(broker, configuration, sslConfiguration);
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    /**
-     * Set the JAAS SSL configuration domain
-     */
-    public void setSslConfiguration(String sslConfiguration) {
-        this.sslConfiguration = sslConfiguration;
-    }
-
-    public String getSslConfiguration() {
-        return sslConfiguration;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java
deleted file mode 100755
index 74a2265..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/**
- * 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.security;
-
-import java.text.MessageFormat;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.jaas.GroupPrincipal;
-import org.apache.activemq.jaas.LDAPLoginModule;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An {@link AuthorizationMap} which uses LDAP
- * 
- * @org.apache.xbean.XBean
- * @author ngcutura
- */
-public class LDAPAuthorizationMap implements AuthorizationMap {
-
-    public static final String INITIAL_CONTEXT_FACTORY = "initialContextFactory";
-    public static final String CONNECTION_URL = "connectionURL";
-    public static final String CONNECTION_USERNAME = "connectionUsername";
-    public static final String CONNECTION_PASSWORD = "connectionPassword";
-    public static final String CONNECTION_PROTOCOL = "connectionProtocol";
-    public static final String AUTHENTICATION = "authentication";
-
-    public static final String TOPIC_SEARCH_MATCHING = "topicSearchMatching";
-    public static final String TOPIC_SEARCH_SUBTREE = "topicSearchSubtree";
-    public static final String QUEUE_SEARCH_MATCHING = "queueSearchMatching";
-    public static final String QUEUE_SEARCH_SUBTREE = "queueSearchSubtree";
-
-    public static final String ADMIN_BASE = "adminBase";
-    public static final String ADMIN_ATTRIBUTE = "adminAttribute";
-    public static final String READ_BASE = "readBase";
-    public static final String READ_ATTRIBUTE = "readAttribute";
-    public static final String WRITE_BASE = "writeBAse";
-    public static final String WRITE_ATTRIBUTE = "writeAttribute";
-
-    private static final Logger LOG = LoggerFactory.getLogger(LDAPLoginModule.class);
-
-    private String initialContextFactory;
-    private String connectionURL;
-    private String connectionUsername;
-    private String connectionPassword;
-    private String connectionProtocol;
-    private String authentication;
-
-    private DirContext context;
-
-    private MessageFormat topicSearchMatchingFormat;
-    private MessageFormat queueSearchMatchingFormat;
-
-    private boolean topicSearchSubtreeBool = true;
-    private boolean queueSearchSubtreeBool = true;
-
-    private String adminBase;
-    private String adminAttribute;
-    private String readBase;
-    private String readAttribute;
-    private String writeBase;
-    private String writeAttribute;
-
-    public LDAPAuthorizationMap() {
-        // lets setup some sensible defaults
-        initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
-        connectionURL = "ldap://localhost:10389";
-        connectionUsername = "uid=admin,ou=system";
-        connectionPassword = "secret";
-        connectionProtocol = "s";
-        authentication = "simple";
-
-        topicSearchMatchingFormat = new MessageFormat("uid={0},ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com");
-        queueSearchMatchingFormat = new MessageFormat("uid={0},ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com");
-
-        adminBase = "(cn=admin)";
-        adminAttribute = "uniqueMember";
-        readBase = "(cn=read)";
-        readAttribute = "uniqueMember";
-        writeBase = "(cn=write)";
-        writeAttribute = "uniqueMember";
-    }
-
-    public LDAPAuthorizationMap(Map options) {
-        initialContextFactory = (String)options.get(INITIAL_CONTEXT_FACTORY);
-        connectionURL = (String)options.get(CONNECTION_URL);
-        connectionUsername = (String)options.get(CONNECTION_USERNAME);
-        connectionPassword = (String)options.get(CONNECTION_PASSWORD);
-        connectionProtocol = (String)options.get(CONNECTION_PROTOCOL);
-        authentication = (String)options.get(AUTHENTICATION);
-
-        adminBase = (String)options.get(ADMIN_BASE);
-        adminAttribute = (String)options.get(ADMIN_ATTRIBUTE);
-        readBase = (String)options.get(READ_BASE);
-        readAttribute = (String)options.get(READ_ATTRIBUTE);
-        writeBase = (String)options.get(WRITE_BASE);
-        writeAttribute = (String)options.get(WRITE_ATTRIBUTE);
-
-        String topicSearchMatching = (String)options.get(TOPIC_SEARCH_MATCHING);
-        String topicSearchSubtree = (String)options.get(TOPIC_SEARCH_SUBTREE);
-        String queueSearchMatching = (String)options.get(QUEUE_SEARCH_MATCHING);
-        String queueSearchSubtree = (String)options.get(QUEUE_SEARCH_SUBTREE);
-        topicSearchMatchingFormat = new MessageFormat(topicSearchMatching);
-        queueSearchMatchingFormat = new MessageFormat(queueSearchMatching);
-        topicSearchSubtreeBool = Boolean.valueOf(topicSearchSubtree).booleanValue();
-        queueSearchSubtreeBool = Boolean.valueOf(queueSearchSubtree).booleanValue();
-    }
-
-    public Set<GroupPrincipal> getTempDestinationAdminACLs() {
-        // TODO insert implementation
-        return null;
-    }
-
-    public Set<GroupPrincipal> getTempDestinationReadACLs() {
-        // TODO insert implementation
-        return null;
-    }
-
-    public Set<GroupPrincipal> getTempDestinationWriteACLs() {
-        // TODO insert implementation
-        return null;
-    }
-
-    public Set<GroupPrincipal> getAdminACLs(ActiveMQDestination destination) {
-        return getACLs(destination, adminBase, adminAttribute);
-    }
-
-    public Set<GroupPrincipal> getReadACLs(ActiveMQDestination destination) {
-        return getACLs(destination, readBase, readAttribute);
-    }
-
-    public Set<GroupPrincipal> getWriteACLs(ActiveMQDestination destination) {
-        return getACLs(destination, writeBase, writeAttribute);
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public String getAdminAttribute() {
-        return adminAttribute;
-    }
-
-    public void setAdminAttribute(String adminAttribute) {
-        this.adminAttribute = adminAttribute;
-    }
-
-    public String getAdminBase() {
-        return adminBase;
-    }
-
-    public void setAdminBase(String adminBase) {
-        this.adminBase = adminBase;
-    }
-
-    public String getAuthentication() {
-        return authentication;
-    }
-
-    public void setAuthentication(String authentication) {
-        this.authentication = authentication;
-    }
-
-    public String getConnectionPassword() {
-        return connectionPassword;
-    }
-
-    public void setConnectionPassword(String connectionPassword) {
-        this.connectionPassword = connectionPassword;
-    }
-
-    public String getConnectionProtocol() {
-        return connectionProtocol;
-    }
-
-    public void setConnectionProtocol(String connectionProtocol) {
-        this.connectionProtocol = connectionProtocol;
-    }
-
-    public String getConnectionURL() {
-        return connectionURL;
-    }
-
-    public void setConnectionURL(String connectionURL) {
-        this.connectionURL = connectionURL;
-    }
-
-    public String getConnectionUsername() {
-        return connectionUsername;
-    }
-
-    public void setConnectionUsername(String connectionUsername) {
-        this.connectionUsername = connectionUsername;
-    }
-
-    public DirContext getContext() {
-        return context;
-    }
-
-    public void setContext(DirContext context) {
-        this.context = context;
-    }
-
-    public String getInitialContextFactory() {
-        return initialContextFactory;
-    }
-
-    public void setInitialContextFactory(String initialContextFactory) {
-        this.initialContextFactory = initialContextFactory;
-    }
-
-    public MessageFormat getQueueSearchMatchingFormat() {
-        return queueSearchMatchingFormat;
-    }
-
-    public void setQueueSearchMatchingFormat(MessageFormat queueSearchMatchingFormat) {
-        this.queueSearchMatchingFormat = queueSearchMatchingFormat;
-    }
-
-    public boolean isQueueSearchSubtreeBool() {
-        return queueSearchSubtreeBool;
-    }
-
-    public void setQueueSearchSubtreeBool(boolean queueSearchSubtreeBool) {
-        this.queueSearchSubtreeBool = queueSearchSubtreeBool;
-    }
-
-    public String getReadAttribute() {
-        return readAttribute;
-    }
-
-    public void setReadAttribute(String readAttribute) {
-        this.readAttribute = readAttribute;
-    }
-
-    public String getReadBase() {
-        return readBase;
-    }
-
-    public void setReadBase(String readBase) {
-        this.readBase = readBase;
-    }
-
-    public MessageFormat getTopicSearchMatchingFormat() {
-        return topicSearchMatchingFormat;
-    }
-
-    public void setTopicSearchMatchingFormat(MessageFormat topicSearchMatchingFormat) {
-        this.topicSearchMatchingFormat = topicSearchMatchingFormat;
-    }
-
-    public boolean isTopicSearchSubtreeBool() {
-        return topicSearchSubtreeBool;
-    }
-
-    public void setTopicSearchSubtreeBool(boolean topicSearchSubtreeBool) {
-        this.topicSearchSubtreeBool = topicSearchSubtreeBool;
-    }
-
-    public String getWriteAttribute() {
-        return writeAttribute;
-    }
-
-    public void setWriteAttribute(String writeAttribute) {
-        this.writeAttribute = writeAttribute;
-    }
-
-    public String getWriteBase() {
-        return writeBase;
-    }
-
-    public void setWriteBase(String writeBase) {
-        this.writeBase = writeBase;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected Set<GroupPrincipal> getACLs(ActiveMQDestination destination, String roleBase, String roleAttribute) {
-        try {
-            context = open();
-        } catch (NamingException e) {
-            LOG.error(e.toString());
-            return new HashSet<GroupPrincipal>();
-        }
-
-        // if ((destination.getDestinationType() &
-        // (ActiveMQDestination.QUEUE_TYPE | ActiveMQDestination.TOPIC_TYPE)) !=
-        // 0)
-        // return new HashSet();
-
-        String destinationBase = "";
-        SearchControls constraints = new SearchControls();
-
-        if ((destination.getDestinationType() & ActiveMQDestination.QUEUE_TYPE) == ActiveMQDestination.QUEUE_TYPE) {
-            destinationBase = queueSearchMatchingFormat.format(new String[] {destination.getPhysicalName()});
-            if (queueSearchSubtreeBool) {
-                constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-            } else {
-                constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
-            }
-        }
-        if ((destination.getDestinationType() & ActiveMQDestination.TOPIC_TYPE) == ActiveMQDestination.TOPIC_TYPE) {
-            destinationBase = topicSearchMatchingFormat.format(new String[] {destination.getPhysicalName()});
-            if (topicSearchSubtreeBool) {
-                constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-            } else {
-                constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
-            }
-        }
-
-        constraints.setReturningAttributes(new String[] {roleAttribute});
-
-        try {
-            Set<GroupPrincipal> roles = new HashSet<GroupPrincipal>();
-            Set<String> acls = new HashSet<String>();
-            NamingEnumeration results = context.search(destinationBase, roleBase, constraints);
-            while (results.hasMore()) {
-                SearchResult result = (SearchResult)results.next();
-                Attributes attrs = result.getAttributes();
-                if (attrs == null) {
-                    continue;
-                }
-                acls = addAttributeValues(roleAttribute, attrs, acls);
-            }
-            for (Iterator<String> iter = acls.iterator(); iter.hasNext();) {
-                String roleName = iter.next();
-                roles.add(new GroupPrincipal(roleName));
-            }
-            return roles;
-        } catch (NamingException e) {
-            LOG.error(e.toString());
-            return new HashSet<GroupPrincipal>();
-        }
-    }
-
-    protected Set<String> addAttributeValues(String attrId, Attributes attrs, Set<String> values) throws NamingException {
-        if (attrId == null || attrs == null) {
-            return values;
-        }
-        if (values == null) {
-            values = new HashSet<String>();
-        }
-        Attribute attr = attrs.get(attrId);
-        if (attr == null) {
-            return values;
-        }
-        NamingEnumeration e = attr.getAll();
-        while (e.hasMore()) {
-            String value = (String)e.next();
-            values.add(value);
-        }
-        return values;
-    }
-
-    protected DirContext open() throws NamingException {
-        if (context != null) {
-            return context;
-        }
-
-        try {
-            Hashtable<String, String> env = new Hashtable<String, String>();
-            env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
-            if (connectionUsername != null || !"".equals(connectionUsername)) {
-                env.put(Context.SECURITY_PRINCIPAL, connectionUsername);
-            }
-            if (connectionPassword != null || !"".equals(connectionPassword)) {
-                env.put(Context.SECURITY_CREDENTIALS, connectionPassword);
-            }
-            env.put(Context.SECURITY_PROTOCOL, connectionProtocol);
-            env.put(Context.PROVIDER_URL, connectionURL);
-            env.put(Context.SECURITY_AUTHENTICATION, authentication);
-            context = new InitialDirContext(env);
-
-        } catch (NamingException e) {
-            LOG.error(e.toString());
-            throw e;
-        }
-        return context;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/MessageAuthorizationPolicy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/MessageAuthorizationPolicy.java
deleted file mode 100644
index d5540ce..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/MessageAuthorizationPolicy.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.security;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.Message;
-
-/**
- * A plugin to allow custom message-level security checks to be performed before
- * a message is consumed.
- * 
- * 
- */
-public interface MessageAuthorizationPolicy {
-
-    /**
-     * Returns true if the given message is able to be dispatched to the connection
-     * performing any user
-     * 
-     * @return true if the context is allowed to consume the message
-     */
-    boolean isAllowedToConsume(ConnectionContext context, Message message);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityAdminMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityAdminMBean.java
deleted file mode 100644
index c803665..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityAdminMBean.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.security;
-
-/**
- * An MBean for adding and removing users, roles
- * and destinations.
- * 
- * 
- */
-public interface SecurityAdminMBean {
-    
-    String OPERATION_READ = "read";
-    String OPERATION_WRITE = "write";
-    String OPERATION_ADMIN = "admin";
-    
-    void addRole(String role);
-    void removeRole(String role);
-
-    void addUserRole(String user, String role);
-    void removeUserRole(String user, String role);
-
-    void addTopicRole(String topic, String operation, String role);
-    void removeTopicRole(String topic, String operation, String role);
-    
-    void addQueueRole(String queue, String operation, String role);
-    void removeQueueRole(String queue, String operation, String role);
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityContext.java
deleted file mode 100644
index 8f67238..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityContext.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.security;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * Used to cache up authorizations so that subsequent requests are faster.
- * 
- * 
- */
-public abstract class SecurityContext {
-
-    public static final SecurityContext BROKER_SECURITY_CONTEXT = new SecurityContext("ActiveMQBroker") {
-        @Override
-        public boolean isBrokerContext() {
-            return true;
-        }
-
-        @SuppressWarnings("unchecked")
-        public Set<?> getPrincipals() {
-            return Collections.EMPTY_SET;
-        }
-    };
-
-    final String userName;
-
-    final ConcurrentHashMap<ActiveMQDestination, ActiveMQDestination> authorizedReadDests = new ConcurrentHashMap<ActiveMQDestination, ActiveMQDestination>();
-    final ConcurrentHashMap<ActiveMQDestination, ActiveMQDestination> authorizedWriteDests = new ConcurrentHashMap<ActiveMQDestination, ActiveMQDestination>();
-
-    public SecurityContext(String userName) {
-        this.userName = userName;
-    }
-
-    public boolean isInOneOf(Set<?> allowedPrincipals) {
-    	Iterator allowedIter = allowedPrincipals.iterator();
-    	HashSet<?> userPrincipals = new HashSet<Object>(getPrincipals());
-    	while (allowedIter.hasNext()) {
-    		Iterator userIter = userPrincipals.iterator();
-    		Object allowedPrincipal = allowedIter.next(); 
-    		while (userIter.hasNext()) {
-    			if (allowedPrincipal.equals(userIter.next()))
-    				return true;
-    		}
-    	}
-    	return false;
-    }
-
-    public abstract Set<?> getPrincipals();
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public ConcurrentHashMap<ActiveMQDestination, ActiveMQDestination> getAuthorizedReadDests() {
-        return authorizedReadDests;
-    }
-
-    public ConcurrentHashMap<ActiveMQDestination, ActiveMQDestination> getAuthorizedWriteDests() {
-        return authorizedWriteDests;
-    }
-
-    public boolean isBrokerContext() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
deleted file mode 100644
index cfb41d1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.security;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.jaas.GroupPrincipal;
-
-/**
- * Handles authenticating a users against a simple user name/password map.
- * 
- * 
- */
-public class SimpleAuthenticationBroker extends BrokerFilter {
-
-    private boolean anonymousAccessAllowed = false;
-    private String anonymousUser;
-    private String anonymousGroup;
-    private final Map userPasswords;
-    private final Map userGroups;
-    private final CopyOnWriteArrayList<SecurityContext> securityContexts = new CopyOnWriteArrayList<SecurityContext>();
-
-    public SimpleAuthenticationBroker(Broker next, Map userPasswords, Map userGroups) {
-        super(next);
-        this.userPasswords = userPasswords;
-        this.userGroups = userGroups;
-    }
-    
-    public void setAnonymousAccessAllowed(boolean anonymousAccessAllowed) {
-        this.anonymousAccessAllowed = anonymousAccessAllowed;
-    }
-
-    public void setAnonymousUser(String anonymousUser) {
-        this.anonymousUser = anonymousUser;
-    }
-
-    public void setAnonymousGroup(String anonymousGroup) {
-        this.anonymousGroup = anonymousGroup;
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-
-    	SecurityContext s = context.getSecurityContext();
-        if (s == null) {
-            // Check the username and password.
-            if (anonymousAccessAllowed && info.getUserName() == null && info.getPassword() == null) {
-                info.setUserName(anonymousUser);
-                s = new SecurityContext(info.getUserName()) {
-                    public Set getPrincipals() {
-                        Set groups = new HashSet();
-                        groups.add(new GroupPrincipal(anonymousGroup));
-                        return groups;
-                    }
-                };
-            } else {
-                String pw = (String) userPasswords.get(info.getUserName());
-                if (pw == null || !pw.equals(info.getPassword())) {
-                    throw new SecurityException(
-                            "User name or password is invalid.");
-                }
-
-                final Set groups = (Set) userGroups.get(info.getUserName());
-                s = new SecurityContext(info.getUserName()) {
-                    public Set<?> getPrincipals() {
-                        return groups;
-                    }
-                };
-            }
-
-            context.setSecurityContext(s);
-            securityContexts.add(s);
-        }
-        try {
-            super.addConnection(context, info);
-        } catch (Exception e) {
-            securityContexts.remove(s);
-            context.setSecurityContext(null);
-            throw e;
-        }
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error)
-        throws Exception {
-        super.removeConnection(context, info, error);
-        if (securityContexts.remove(context.getSecurityContext())) {
-            context.setSecurityContext(null);
-        }
-    }
-
-    /**
-     * Previously logged in users may no longer have the same access anymore.
-     * Refresh all the logged into users.
-     */
-    public void refresh() {
-        for (Iterator<SecurityContext> iter = securityContexts.iterator(); iter.hasNext();) {
-            SecurityContext sc = iter.next();
-            sc.getAuthorizedReadDests().clear();
-            sc.getAuthorizedWriteDests().clear();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java
deleted file mode 100644
index 634994a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.security;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.jaas.GroupPrincipal;
-
-/**
- * A simple authentication plugin
- * 
- * @org.apache.xbean.XBean element="simpleAuthenticationPlugin"
- *                         description="Provides a simple authentication plugin
- *                         configured with a map of user-passwords and a map of
- *                         user-groups or a list of authentication users"
- * 
- * 
- */
-public class SimpleAuthenticationPlugin implements BrokerPlugin {
-    private Map<String, String> userPasswords;
-    private Map<String, Set<GroupPrincipal>> userGroups;
-    private static final String DEFAULT_ANONYMOUS_USER = "anonymous";
-    private static final String DEFAULT_ANONYMOUS_GROUP = "anonymous";
-    private String anonymousUser = DEFAULT_ANONYMOUS_USER;
-    private String anonymousGroup = DEFAULT_ANONYMOUS_GROUP;
-    private boolean anonymousAccessAllowed = false;
-
-    public SimpleAuthenticationPlugin() {
-    }
-
-    public SimpleAuthenticationPlugin(List users) {
-        setUsers(users);
-    }
-
-    public Broker installPlugin(Broker parent) {
-        SimpleAuthenticationBroker broker = new SimpleAuthenticationBroker(parent, userPasswords, userGroups);
-        broker.setAnonymousAccessAllowed(anonymousAccessAllowed);
-        broker.setAnonymousUser(anonymousUser);
-        broker.setAnonymousGroup(anonymousGroup);
-        return broker;
-    }
-
-    public Map<String, Set<GroupPrincipal>> getUserGroups() {
-        return userGroups;
-    }
-
-    /**
-     * Sets individual users for authentication
-     * 
-     * @org.apache.xbean.ElementType class="org.apache.activemq.security.AuthenticationUser"
-     */
-    public void setUsers(List users) {
-        userPasswords = new HashMap<String, String>();
-        userGroups = new HashMap<String, Set<GroupPrincipal>>();
-        for (Iterator it = users.iterator(); it.hasNext();) {
-            AuthenticationUser user = (AuthenticationUser)it.next();
-            userPasswords.put(user.getUsername(), user.getPassword());
-            Set<GroupPrincipal> groups = new HashSet<GroupPrincipal>();
-            StringTokenizer iter = new StringTokenizer(user.getGroups(), ",");
-            while (iter.hasMoreTokens()) {
-                String name = iter.nextToken().trim();
-                groups.add(new GroupPrincipal(name));
-            }
-            userGroups.put(user.getUsername(), groups);
-        }
-    }
-    
-    
-    public void setAnonymousAccessAllowed(boolean anonymousAccessAllowed) {
-        this.anonymousAccessAllowed = anonymousAccessAllowed;
-    }
-
-    public void setAnonymousUser(String anonymousUser) {
-        this.anonymousUser = anonymousUser;
-    }
-
-    public void setAnonymousGroup(String anonymousGroup) {
-        this.anonymousGroup = anonymousGroup;
-    }
-
-    /**
-     * Sets the groups a user is in. The key is the user name and the value is a
-     * Set of groups
-     */
-    public void setUserGroups(Map<String, Set<GroupPrincipal>> userGroups) {
-        this.userGroups = userGroups;
-    }
-
-    public Map<String, String> getUserPasswords() {
-        return userPasswords;
-    }
-
-    /**
-     * Sets the map indexed by user name with the value the password
-     */
-    public void setUserPasswords(Map<String, String> userPasswords) {
-        this.userPasswords = userPasswords;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationMap.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationMap.java
deleted file mode 100644
index e99b1ca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationMap.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.security;
-
-import java.util.Set;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.filter.DestinationMap;
-
-/**
- * An AuthorizationMap which is configured with individual DestinationMaps for
- * each operation.
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class SimpleAuthorizationMap implements AuthorizationMap {
-
-    private DestinationMap writeACLs;
-    private DestinationMap readACLs;
-    private DestinationMap adminACLs;
-
-    private TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry;
-
-    public SimpleAuthorizationMap() {
-    }
-
-    public SimpleAuthorizationMap(DestinationMap writeACLs, DestinationMap readACLs, DestinationMap adminACLs) {
-        this.writeACLs = writeACLs;
-        this.readACLs = readACLs;
-        this.adminACLs = adminACLs;
-    }
-
-    /*
-     * Need to think how to retrieve the ACLs for temporary destinations since
-     * they are not map to a specific destination. For now we'll just retrieve
-     * it from a TempDestinationAuthorizationEntry same way as the
-     * DefaultAuthorizationMap. The ACLs retrieved here will be map to all temp
-     * destinations
-     */
-
-    public void setTempDestinationAuthorizationEntry(
-                                                     TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry) {
-        this.tempDestinationAuthorizationEntry = tempDestinationAuthorizationEntry;
-    }
-
-    public TempDestinationAuthorizationEntry getTempDestinationAuthorizationEntry() {
-        return this.tempDestinationAuthorizationEntry;
-    }
-
-    public Set<Object> getTempDestinationAdminACLs() {
-        if (tempDestinationAuthorizationEntry != null) {
-            return tempDestinationAuthorizationEntry.getAdminACLs();
-        } else {
-            return null;
-        }
-    }
-
-    public Set<Object> getTempDestinationReadACLs() {
-        if (tempDestinationAuthorizationEntry != null) {
-            return tempDestinationAuthorizationEntry.getReadACLs();
-        } else {
-            return null;
-        }
-    }
-
-    public Set<Object> getTempDestinationWriteACLs() {
-        if (tempDestinationAuthorizationEntry != null) {
-            return tempDestinationAuthorizationEntry.getWriteACLs();
-        } else {
-            return null;
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    public Set<Object> getAdminACLs(ActiveMQDestination destination) {
-        return adminACLs.get(destination);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Set<Object> getReadACLs(ActiveMQDestination destination) {
-        return readACLs.get(destination);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Set<Object> getWriteACLs(ActiveMQDestination destination) {
-        return writeACLs.get(destination);
-    }
-
-    public DestinationMap getAdminACLs() {
-        return adminACLs;
-    }
-
-    public void setAdminACLs(DestinationMap adminACLs) {
-        this.adminACLs = adminACLs;
-    }
-
-    public DestinationMap getReadACLs() {
-        return readACLs;
-    }
-
-    public void setReadACLs(DestinationMap readACLs) {
-        this.readACLs = readACLs;
-    }
-
-    public DestinationMap getWriteACLs() {
-        return writeACLs;
-    }
-
-    public void setWriteACLs(DestinationMap writeACLs) {
-        this.writeACLs = writeACLs;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
deleted file mode 100644
index 8f6a68a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.security;
-
-/**
- * Represents an entry in a {@link DefaultAuthorizationMap} for assigning
- * different operations (read, write, admin) of user roles to a temporary
- * destination
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class TempDestinationAuthorizationEntry extends AuthorizationEntry {
-
-    public void afterPropertiesSet() throws Exception {
-        // we don't need to check if destination is specified since
-        // the TempDestinationAuthorizationEntry should map to all temp
-        // destinations
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/security/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/security/package.html
deleted file mode 100644
index ee163ca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/security/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	Plugable Security Adapter framework along with default implementations such as the JAAS implementation.
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/selector/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/selector/package.html
deleted file mode 100755
index 411618a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/selector/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-JMS Selector implemetnation
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
deleted file mode 100644
index d2aae3c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.spring;
-
-import javax.annotation.PostConstruct;
-import org.springframework.beans.factory.BeanNameAware;
-
-/**
- * A <a href="http://www.springframework.org/">Spring</a> enhanced connection
- * factory which will automatically use the Spring bean name as the clientIDPrefix property
- * so that connections created have client IDs related to your Spring.xml file for
- * easier comprehension from <a href="http://activemq.apache.org/jmx.html">JMX</a>.
- * 
- * @org.apache.xbean.XBean element="connectionFactory"
- * 
- * 
- */
-public class ActiveMQConnectionFactory extends org.apache.activemq.ActiveMQConnectionFactory implements BeanNameAware {
-
-    private String beanName;
-    private boolean useBeanNameAsClientIdPrefix;
-    
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void afterPropertiesSet() throws Exception {
-        if (isUseBeanNameAsClientIdPrefix() && getClientIDPrefix() == null) {
-            setClientIDPrefix(getBeanName());
-        }
-    }
-
-    public String getBeanName() {
-        return beanName;
-    }
-    
-    public void setBeanName(String beanName) {
-        this.beanName = beanName;
-    }
-
-    public boolean isUseBeanNameAsClientIdPrefix() {
-        return useBeanNameAsClientIdPrefix;
-    }
-
-    public void setUseBeanNameAsClientIdPrefix(boolean useBeanNameAsClientIdPrefix) {
-        this.useBeanNameAsClientIdPrefix = useBeanNameAsClientIdPrefix;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBean.java
deleted file mode 100644
index 722f522..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBean.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- *
- * 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.spring;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.FactoryBean;
-
-/**
- * A helper class for creating a failover configured {@link ActiveMQConnectionFactory}
- * which supports one or more TCP based hostname/ports which can all be configured in a
- * consistent way without too much URL hacking.
- *
- * 
- */
-public class ActiveMQConnectionFactoryFactoryBean implements FactoryBean {
-    private List<String> tcpHostAndPorts = new ArrayList<String>();
-
-    // tcp properties
-    private Long maxInactivityDuration;
-    private String tcpProperties;
-
-    // failover properties
-    private Long maxReconnectDelay;
-    private String failoverProperties;
-
-    public Object getObject() throws Exception {
-        ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory();
-        String brokerURL = getBrokerURL();
-        answer.setBrokerURL(brokerURL);
-        return answer;
-    }
-
-    public String getBrokerURL() {
-        StringBuffer buffer = new StringBuffer("failover:(");
-        int counter = 0;
-        for (String tcpHostAndPort : tcpHostAndPorts) {
-            if (counter++ > 0) {
-                buffer.append(",");
-            }
-            buffer.append(createTcpHostAndPortUrl(tcpHostAndPort));
-        }
-        buffer.append(")");
-
-        List<String> parameters = new ArrayList<String>();
-        if (maxReconnectDelay != null) {
-            parameters.add("maxReconnectDelay=" + maxReconnectDelay);
-        }
-        if (notEmpty(failoverProperties)) {
-            parameters.add(failoverProperties);
-        }
-        buffer.append(asQueryString(parameters));
-        return buffer.toString();
-    }
-
-    public Class getObjectType() {
-        return ActiveMQConnectionFactory.class;
-    }
-
-    public boolean isSingleton() {
-        return true;
-    }
-
-    // Properties
-    //-------------------------------------------------------------------------
-
-    public List<String> getTcpHostAndPorts() {
-        return tcpHostAndPorts;
-    }
-
-    public void setTcpHostAndPorts(List<String> tcpHostAndPorts) {
-        this.tcpHostAndPorts = tcpHostAndPorts;
-    }
-
-    public void setTcpHostAndPort(String tcpHostAndPort) {
-        tcpHostAndPorts = new ArrayList<String>();
-        tcpHostAndPorts.add(tcpHostAndPort);
-    }
-
-    public Long getMaxInactivityDuration() {
-        return maxInactivityDuration;
-    }
-
-    public void setMaxInactivityDuration(Long maxInactivityDuration) {
-        this.maxInactivityDuration = maxInactivityDuration;
-    }
-
-    public String getTcpProperties() {
-        return tcpProperties;
-    }
-
-    public void setTcpProperties(String tcpProperties) {
-        this.tcpProperties = tcpProperties;
-    }
-
-    public Long getMaxReconnectDelay() {
-        return maxReconnectDelay;
-    }
-
-    public void setMaxReconnectDelay(Long maxReconnectDelay) {
-        this.maxReconnectDelay = maxReconnectDelay;
-    }
-
-    public String getFailoverProperties() {
-        return failoverProperties;
-    }
-
-    public void setFailoverProperties(String failoverProperties) {
-        this.failoverProperties = failoverProperties;
-    }
-
-    // Implementation methods
-    //-------------------------------------------------------------------------
-
-    /**
-     * Turns a list of query string key=value strings into a query URL string
-     * of the form "?a=x&b=y"
-     */
-    protected String asQueryString(List<String> parameters) {
-        int size = parameters.size();
-        if (size < 1) {
-            return "";
-        }
-        else {
-            StringBuffer buffer = new StringBuffer("?");
-            buffer.append(parameters.get(0));
-            for (int i = 1; i < size; i++) {
-                buffer.append("&");
-                buffer.append(parameters.get(i));
-            }
-            return buffer.toString();
-        }
-    }
-
-    /**
-     * Allows us to add any TCP specific URI configurations
-     */
-    protected String createTcpHostAndPortUrl(String tcpHostAndPort) {
-        List<String> parameters = new ArrayList<String>();
-        if (maxInactivityDuration != null) {
-            parameters.add("wireFormat.maxInactivityDuration=" + maxInactivityDuration);
-        }
-        if (notEmpty(tcpProperties)) {
-            parameters.add(tcpProperties);
-        }
-        return tcpHostAndPort + asQueryString(parameters);
-    }
-
-
-    protected boolean notEmpty(String text) {
-        return text != null && text.length() > 0;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
deleted file mode 100644
index 81305bf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.spring;
-
-import javax.annotation.PostConstruct;
-import org.springframework.beans.factory.BeanNameAware;
-
-/**
- * A <a href="http://www.springframework.org/">Spring</a> enhanced XA connection
- * factory which will automatically use the Spring bean name as the clientIDPrefix property
- * so that connections created have client IDs related to your Spring.xml file for
- * easier comprehension from <a href="http://activemq.apache.org/jmx.html">JMX</a>.
- * 
- * @org.apache.xbean.XBean element="xaConnectionFactory"
- * 
- * 
- */
-public class ActiveMQXAConnectionFactory extends org.apache.activemq.ActiveMQXAConnectionFactory implements BeanNameAware {
-
-    private String beanName;
-    private boolean useBeanNameAsClientIdPrefix;
-    
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void afterPropertiesSet() throws Exception {
-        if (isUseBeanNameAsClientIdPrefix() && getClientIDPrefix() == null) {
-            setClientIDPrefix(getBeanName());
-        }
-    }
-
-    public String getBeanName() {
-        return beanName;
-    }
-    
-    public void setBeanName(String beanName) {
-        this.beanName = beanName;
-    }
-
-    public boolean isUseBeanNameAsClientIdPrefix() {
-        return useBeanNameAsClientIdPrefix;
-    }
-
-    public void setUseBeanNameAsClientIdPrefix(boolean useBeanNameAsClientIdPrefix) {
-        this.useBeanNameAsClientIdPrefix = useBeanNameAsClientIdPrefix;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java
deleted file mode 100644
index ca7c889..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.spring;
-
-import java.util.Map;
-
-import org.apache.activemq.broker.BrokerContext;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-
-public class SpringBrokerContext implements BrokerContext, ApplicationContextAware {
-
-    ApplicationContext applicationContext;
-    
-    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
-        this.applicationContext = applicationContext;
-    }
-
-    public Object getBean(String name) {
-        try {
-            return applicationContext.getBean(name);
-        } catch (BeansException ex) {
-            return null;
-        }
-    }
-
-    public Map getBeansOfType(Class type) {
-        return applicationContext.getBeansOfType(type);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java
deleted file mode 100644
index 50f4a9e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * 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.spring;
-
-import java.io.InputStream;
-import java.security.KeyStore;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-import javax.annotation.PostConstruct;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-import org.apache.activemq.broker.SslContext;
-import org.springframework.core.io.Resource;
-
-/**
- * Extends the SslContext so that it's easier to configure from spring.
- * 
- * @org.apache.xbean.XBean element="sslContext"
- * 
- * 
- */
-public class SpringSslContext extends SslContext {    
-    
-    private String keyStoreType="jks";
-    private String trustStoreType="jks";
-
-    private String secureRandomAlgorithm="SHA1PRNG";    
-    private String keyStoreAlgorithm=KeyManagerFactory.getDefaultAlgorithm();
-    private String trustStoreAlgorithm=TrustManagerFactory.getDefaultAlgorithm();
-
-    private Resource keyStore;
-    private Resource trustStore;
-
-    private String keyStorePassword;
-    private String trustStorePassword;
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void afterPropertiesSet() throws Exception {
-        keyManagers.addAll(createKeyManagers());
-        trustManagers.addAll(createTrustManagers());
-        if( secureRandom == null ) {
-            secureRandom = createSecureRandom();
-        }
-    }
-
-    private SecureRandom createSecureRandom() throws NoSuchAlgorithmException {
-        return SecureRandom.getInstance(secureRandomAlgorithm);
-    }
-
-    private Collection<TrustManager> createTrustManagers() throws Exception {
-        KeyStore ks = createTrustManagerKeyStore(); 
-        if( ks ==null ) {
-            return new ArrayList<TrustManager>(0);
-        }
-        
-        TrustManagerFactory tmf  = TrustManagerFactory.getInstance(trustStoreAlgorithm);
-        tmf.init(ks);
-        return Arrays.asList(tmf.getTrustManagers());
-    }
-
-    private Collection<KeyManager> createKeyManagers() throws Exception {
-        KeyStore ks = createKeyManagerKeyStore(); 
-        if( ks ==null ) {
-            return new ArrayList<KeyManager>(0);
-        }
-        
-        KeyManagerFactory tmf  = KeyManagerFactory.getInstance(keyStoreAlgorithm);
-        tmf.init(ks, keyStorePassword==null? null : keyStorePassword.toCharArray());
-        return Arrays.asList(tmf.getKeyManagers());
-    }
-
-    private KeyStore createTrustManagerKeyStore() throws Exception {
-        if( trustStore ==null ) {
-            return null;
-        }
-        
-        KeyStore ks = KeyStore.getInstance(trustStoreType);
-        InputStream is=trustStore.getInputStream();
-        try {
-            ks.load(is, trustStorePassword==null? null : trustStorePassword.toCharArray());
-        } finally {
-            is.close();
-        }
-        return ks;
-    }
-    
-    private KeyStore createKeyManagerKeyStore() throws Exception {
-        if( keyStore ==null ) {
-            return null;
-        }
-        
-        KeyStore ks = KeyStore.getInstance(keyStoreType);
-        InputStream is=keyStore.getInputStream();
-        try {
-            ks.load(is, keyStorePassword==null? null : keyStorePassword.toCharArray());
-        } finally {
-            is.close();
-        }
-        return ks;
-    }
-
-    public String getTrustStoreType() {
-        return trustStoreType;
-    }
-
-    public String getKeyStoreType() {
-        return keyStoreType;
-    }
-
-    public Resource getKeyStore() {
-        return keyStore;
-    }
-
-    public void setKeyStore(Resource keyResource) {
-        this.keyStore = keyResource;
-    }
-
-    public Resource getTrustStore() {
-        return trustStore;
-    }
-
-    public void setTrustStore(Resource trustResource) {
-        this.trustStore = trustResource;
-    }
-
-    public String getKeyStoreAlgorithm() {
-        return keyStoreAlgorithm;
-    }
-
-    public void setKeyStoreAlgorithm(String keyAlgorithm) {
-        this.keyStoreAlgorithm = keyAlgorithm;
-    }
-
-    public String getTrustStoreAlgorithm() {
-        return trustStoreAlgorithm;
-    }
-
-    public void setTrustStoreAlgorithm(String trustAlgorithm) {
-        this.trustStoreAlgorithm = trustAlgorithm;
-    }
-
-    public String getKeyStorePassword() {
-        return keyStorePassword;
-    }
-
-    public void setKeyStorePassword(String keyPassword) {
-        this.keyStorePassword = keyPassword;
-    }
-
-    public String getTrustStorePassword() {
-        return trustStorePassword;
-    }
-
-    public void setTrustStorePassword(String trustPassword) {
-        this.trustStorePassword = trustPassword;
-    }
-
-    public void setKeyStoreType(String keyType) {
-        this.keyStoreType = keyType;
-    }
-
-    public void setTrustStoreType(String trustType) {
-        this.trustStoreType = trustType;
-    }
-
-    public String getSecureRandomAlgorithm() {
-        return secureRandomAlgorithm;
-    }
-
-    public void setSecureRandomAlgorithm(String secureRandomAlgorithm) {
-        this.secureRandomAlgorithm = secureRandomAlgorithm;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/spring/package.html
deleted file mode 100755
index 8f79527..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/spring/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Helper classes for working with the JMS client and <a href="http://www.springframework.org/">Spring</a>.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/CommandVisitor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/CommandVisitor.java
deleted file mode 100755
index 605801b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/CommandVisitor.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.state;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ControlCommand;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.FlushCommand;
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.command.WireFormatInfo;
-
-public interface CommandVisitor {
-
-    Response processAddConnection(ConnectionInfo info) throws Exception;
-
-    Response processAddSession(SessionInfo info) throws Exception;
-
-    Response processAddProducer(ProducerInfo info) throws Exception;
-
-    Response processAddConsumer(ConsumerInfo info) throws Exception;
-
-    Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws Exception;
-
-    Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) throws Exception;
-
-    Response processRemoveProducer(ProducerId id) throws Exception;
-
-    Response processRemoveConsumer(ConsumerId id, long lastDeliveredSequenceId) throws Exception;
-
-    Response processAddDestination(DestinationInfo info) throws Exception;
-
-    Response processRemoveDestination(DestinationInfo info) throws Exception;
-
-    Response processRemoveSubscription(RemoveSubscriptionInfo info) throws Exception;
-
-    Response processMessage(Message send) throws Exception;
-
-    Response processMessageAck(MessageAck ack) throws Exception;
-
-    Response processMessagePull(MessagePull pull) throws Exception;
-
-    Response processBeginTransaction(TransactionInfo info) throws Exception;
-
-    Response processPrepareTransaction(TransactionInfo info) throws Exception;
-
-    Response processCommitTransactionOnePhase(TransactionInfo info) throws Exception;
-
-    Response processCommitTransactionTwoPhase(TransactionInfo info) throws Exception;
-
-    Response processRollbackTransaction(TransactionInfo info) throws Exception;
-
-    Response processWireFormat(WireFormatInfo info) throws Exception;
-
-    Response processKeepAlive(KeepAliveInfo info) throws Exception;
-
-    Response processShutdown(ShutdownInfo info) throws Exception;
-
-    Response processFlush(FlushCommand command) throws Exception;
-
-    Response processBrokerInfo(BrokerInfo info) throws Exception;
-
-    Response processRecoverTransactions(TransactionInfo info) throws Exception;
-
-    Response processForgetTransaction(TransactionInfo info) throws Exception;
-
-    Response processEndTransaction(TransactionInfo info) throws Exception;
-
-    Response processMessageDispatchNotification(MessageDispatchNotification notification) throws Exception;
-
-    Response processProducerAck(ProducerAck ack) throws Exception;
-
-    Response processMessageDispatch(MessageDispatch dispatch) throws Exception;
-
-    Response processControlCommand(ControlCommand command) throws Exception;
-
-    Response processConnectionError(ConnectionError error) throws Exception;
-
-    Response processConnectionControl(ConnectionControl control) throws Exception;
-
-    Response processConsumerControl(ConsumerControl control) throws Exception;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/CommandVisitorAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/CommandVisitorAdapter.java
deleted file mode 100644
index e53f163..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/CommandVisitorAdapter.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.state;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ControlCommand;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.FlushCommand;
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.command.WireFormatInfo;
-
-public class CommandVisitorAdapter implements CommandVisitor {
-
-    public Response processAddConnection(ConnectionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processAddConsumer(ConsumerInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processAddDestination(DestinationInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processAddProducer(ProducerInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processAddSession(SessionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processBeginTransaction(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processBrokerInfo(BrokerInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processCommitTransactionOnePhase(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processCommitTransactionTwoPhase(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processEndTransaction(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processFlush(FlushCommand command) throws Exception {
-        return null;
-    }
-
-    public Response processForgetTransaction(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processKeepAlive(KeepAliveInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processMessage(Message send) throws Exception {
-        return null;
-    }
-
-    public Response processMessageAck(MessageAck ack) throws Exception {
-        return null;
-    }
-
-    public Response processMessageDispatchNotification(MessageDispatchNotification notification)
-        throws Exception {
-        return null;
-    }
-
-    public Response processMessagePull(MessagePull pull) throws Exception {
-        return null;
-    }
-
-    public Response processPrepareTransaction(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processProducerAck(ProducerAck ack) throws Exception {
-        return null;
-    }
-
-    public Response processRecoverTransactions(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws Exception {
-        return null;
-    }
-
-    public Response processRemoveConsumer(ConsumerId id, long lastDeliveredSequenceId) throws Exception {
-        return null;
-    }
-
-    public Response processRemoveDestination(DestinationInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processRemoveProducer(ProducerId id) throws Exception {
-        return null;
-    }
-
-    public Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) throws Exception {
-        return null;
-    }
-
-    public Response processRemoveSubscription(RemoveSubscriptionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processRollbackTransaction(TransactionInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processShutdown(ShutdownInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processWireFormat(WireFormatInfo info) throws Exception {
-        return null;
-    }
-
-    public Response processMessageDispatch(MessageDispatch dispatch) throws Exception {
-        return null;
-    }
-
-    public Response processControlCommand(ControlCommand command) throws Exception {
-        return null;
-    }
-
-    public Response processConnectionControl(ConnectionControl control) throws Exception {
-        return null;
-    }
-
-    public Response processConnectionError(ConnectionError error) throws Exception {
-        return null;
-    }
-
-    public Response processConsumerControl(ConsumerControl control) throws Exception {
-        return null;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionState.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionState.java
deleted file mode 100755
index ada7614..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionState.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.state;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-
-public class ConnectionState {
-
-    ConnectionInfo info;
-    private final ConcurrentHashMap<TransactionId, TransactionState> transactions = new ConcurrentHashMap<TransactionId, TransactionState>();
-    private final ConcurrentHashMap<SessionId, SessionState> sessions = new ConcurrentHashMap<SessionId, SessionState>();
-    private final List<DestinationInfo> tempDestinations = Collections.synchronizedList(new ArrayList<DestinationInfo>());
-    private final AtomicBoolean shutdown = new AtomicBoolean(false);
-    private boolean connectionInterruptProcessingComplete = true;
-    private HashMap<ConsumerId, ConsumerInfo> recoveringPullConsumers;
-
-    public ConnectionState(ConnectionInfo info) {
-        this.info = info;
-        // Add the default session id.
-        addSession(new SessionInfo(info, -1));
-    }
-
-    public String toString() {
-        return info.toString();
-    }
-
-    public void reset(ConnectionInfo info) {
-        this.info = info;
-        transactions.clear();
-        sessions.clear();
-        tempDestinations.clear();
-        shutdown.set(false);
-        // Add the default session id.
-        addSession(new SessionInfo(info, -1));
-    }
-
-    public void addTempDestination(DestinationInfo info) {
-        checkShutdown();
-        tempDestinations.add(info);
-    }
-
-    public void removeTempDestination(ActiveMQDestination destination) {
-        for (Iterator<DestinationInfo> iter = tempDestinations.iterator(); iter.hasNext();) {
-            DestinationInfo di = iter.next();
-            if (di.getDestination().equals(destination)) {
-                iter.remove();
-            }
-        }
-    }
-
-    public void addTransactionState(TransactionId id) {
-        checkShutdown();
-        transactions.put(id, new TransactionState(id));
-    }
-
-    public TransactionState getTransactionState(TransactionId id) {
-        return transactions.get(id);
-    }
-
-    public Collection<TransactionState> getTransactionStates() {
-        return transactions.values();
-    }
-
-    public TransactionState removeTransactionState(TransactionId id) {
-        return transactions.remove(id);
-    }
-
-    public void addSession(SessionInfo info) {
-        checkShutdown();
-        sessions.put(info.getSessionId(), new SessionState(info));
-    }
-
-    public SessionState removeSession(SessionId id) {
-        return sessions.remove(id);
-    }
-
-    public SessionState getSessionState(SessionId id) {
-        return sessions.get(id);
-    }
-
-    public ConnectionInfo getInfo() {
-        return info;
-    }
-
-    public Set<SessionId> getSessionIds() {
-        return sessions.keySet();
-    }
-
-    public List<DestinationInfo> getTempDestinations() {
-        return tempDestinations;
-    }
-
-    public Collection<SessionState> getSessionStates() {
-        return sessions.values();
-    }
-
-    private void checkShutdown() {
-        if (shutdown.get()) {
-            throw new IllegalStateException("Disposed");
-        }
-    }
-
-    public void shutdown() {
-        if (shutdown.compareAndSet(false, true)) {
-            for (Iterator<SessionState> iter = sessions.values().iterator(); iter.hasNext();) {
-                SessionState ss = iter.next();
-                ss.shutdown();
-            }
-        }
-    }
-
-    public Map<ConsumerId, ConsumerInfo> getRecoveringPullConsumers() {
-        if (recoveringPullConsumers == null) {
-            recoveringPullConsumers = new HashMap<ConsumerId, ConsumerInfo>();
-        }
-        return recoveringPullConsumers;
-    }
-
-    public void setConnectionInterruptProcessingComplete(boolean connectionInterruptProcessingComplete) {
-        this.connectionInterruptProcessingComplete = connectionInterruptProcessingComplete;
-    }
-    
-    public boolean isConnectionInterruptProcessingComplete() {
-        return connectionInterruptProcessingComplete;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
deleted file mode 100755
index 493937a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
+++ /dev/null
@@ -1,683 +0,0 @@
-/**
- * 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.state;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Vector;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.jms.TransactionRolledBackException;
-import javax.transaction.xa.XAResource;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerControl;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.IntegerResponse;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Tracks the state of a connection so a newly established transport can be
- * re-initialized to the state that was tracked.
- * 
- * 
- */
-public class ConnectionStateTracker extends CommandVisitorAdapter {
-    private static final Logger LOG = LoggerFactory.getLogger(ConnectionStateTracker.class);
-
-    private static final Tracked TRACKED_RESPONSE_MARKER = new Tracked(null);
-
-    protected final ConcurrentHashMap<ConnectionId, ConnectionState> connectionStates = new ConcurrentHashMap<ConnectionId, ConnectionState>(); 
-
-    private boolean trackTransactions;
-    private boolean restoreSessions = true;
-    private boolean restoreConsumers = true;
-    private boolean restoreProducers = true;
-    private boolean restoreTransaction = true;
-    private boolean trackMessages = true;
-    private boolean trackTransactionProducers = true;
-    private int maxCacheSize = 128 * 1024;
-    private int currentCacheSize;
-    private Map<Object,Command> messageCache = new LinkedHashMap<Object,Command>(){
-        protected boolean removeEldestEntry(Map.Entry<Object,Command> eldest) {
-            boolean result = currentCacheSize > maxCacheSize;
-            if (result) {
-                if (eldest.getValue() instanceof Message) {
-                    currentCacheSize -= ((Message)eldest.getValue()).getSize();
-                }
-            }
-            return result;
-        }
-    };
-    
-    private class RemoveTransactionAction implements ResponseHandler {
-        private final TransactionInfo info;
-
-        public RemoveTransactionAction(TransactionInfo info) {
-            this.info = info;
-        }
-
-        public void onResponse(Command response) {
-            ConnectionId connectionId = info.getConnectionId();
-            ConnectionState cs = connectionStates.get(connectionId);
-            cs.removeTransactionState(info.getTransactionId());
-        }
-    }
-    
-    private class PrepareReadonlyTransactionAction extends RemoveTransactionAction {
-
-        public PrepareReadonlyTransactionAction(TransactionInfo info) {
-            super(info);
-        }
-
-        public void onResponse(Command command) {
-            IntegerResponse response = (IntegerResponse) command;
-            if (XAResource.XA_RDONLY == response.getResult()) {
-                // all done, no commit or rollback from TM
-                super.onResponse(command);
-            }
-        }
-    }
-
-    /**
-     * 
-     * 
-     * @param command
-     * @return null if the command is not state tracked.
-     * @throws IOException
-     */
-    public Tracked track(Command command) throws IOException {
-        try {
-            return (Tracked)command.visit(this);
-        } catch (IOException e) {
-            throw e;
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-    
-    public void trackBack(Command command) {
-        if (command != null) {
-            if (trackMessages && command.isMessage()) {
-                Message message = (Message) command;
-                if (message.getTransactionId()==null) {
-                    currentCacheSize = currentCacheSize +  message.getSize();
-                }
-            } else if (command instanceof MessagePull) {
-                // just needs to be a rough estimate of size, ~4 identifiers
-                currentCacheSize += 400;
-            }
-        }
-    }
-
-    public void restore(Transport transport) throws IOException {
-        // Restore the connections.
-        for (Iterator<ConnectionState> iter = connectionStates.values().iterator(); iter.hasNext();) {
-            ConnectionState connectionState = iter.next();
-            connectionState.getInfo().setFailoverReconnect(true);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("conn: " + connectionState.getInfo().getConnectionId());
-            }
-            transport.oneway(connectionState.getInfo());
-            restoreTempDestinations(transport, connectionState);
-
-            if (restoreSessions) {
-                restoreSessions(transport, connectionState);
-            }
-
-            if (restoreTransaction) {
-                restoreTransactions(transport, connectionState);
-            }
-        }
-        //now flush messages
-        for (Command msg:messageCache.values()) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("command: " + msg.getCommandId());
-            }
-            transport.oneway(msg);
-        }
-    }
-
-    private void restoreTransactions(Transport transport, ConnectionState connectionState) throws IOException {
-        Vector<TransactionInfo> toRollback = new Vector<TransactionInfo>();
-        for (TransactionState transactionState : connectionState.getTransactionStates()) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("tx: " + transactionState.getId());
-            }
-            
-            // rollback any completed transactions - no way to know if commit got there
-            // or if reply went missing
-            //
-            if (!transactionState.getCommands().isEmpty()) {
-                Command lastCommand = transactionState.getCommands().get(transactionState.getCommands().size() - 1);
-                if (lastCommand instanceof TransactionInfo) {
-                    TransactionInfo transactionInfo = (TransactionInfo) lastCommand;
-                    if (transactionInfo.getType() == TransactionInfo.COMMIT_ONE_PHASE) {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("rolling back potentially completed tx: " + transactionState.getId());
-                        }
-                        toRollback.add(transactionInfo);
-                        continue;
-                    }
-                }
-            }
-            
-            // replay short lived producers that may have been involved in the transaction
-            for (ProducerState producerState : transactionState.getProducerStates().values()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("tx replay producer :" + producerState.getInfo());
-                }
-                transport.oneway(producerState.getInfo());
-            }
-            
-            for (Command command : transactionState.getCommands()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("tx replay: " + command);
-                }
-                transport.oneway(command);
-            }
-            
-            for (ProducerState producerState : transactionState.getProducerStates().values()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("tx remove replayed producer :" + producerState.getInfo());
-                }
-                transport.oneway(producerState.getInfo().createRemoveCommand());
-            }
-        }
-        
-        for (TransactionInfo command: toRollback) {
-            // respond to the outstanding commit
-            ExceptionResponse response = new ExceptionResponse();
-            response.setException(new TransactionRolledBackException("Transaction completion in doubt due to failover. Forcing rollback of " + command.getTransactionId()));
-            response.setCorrelationId(command.getCommandId());
-            transport.getTransportListener().onCommand(response);
-        }
-    }
-
-    /**
-     * @param transport
-     * @param connectionState
-     * @throws IOException
-     */
-    protected void restoreSessions(Transport transport, ConnectionState connectionState) throws IOException {
-        // Restore the connection's sessions
-        for (Iterator iter2 = connectionState.getSessionStates().iterator(); iter2.hasNext();) {
-            SessionState sessionState = (SessionState)iter2.next();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("session: " + sessionState.getInfo().getSessionId());
-            }
-            transport.oneway(sessionState.getInfo());
-
-            if (restoreProducers) {
-                restoreProducers(transport, sessionState);
-            }
-
-            if (restoreConsumers) {
-                restoreConsumers(transport, sessionState);
-            }
-        }
-    }
-
-    /**
-     * @param transport
-     * @param sessionState
-     * @throws IOException
-     */
-    protected void restoreConsumers(Transport transport, SessionState sessionState) throws IOException {
-        // Restore the session's consumers but possibly in pull only (prefetch 0 state) till recovery complete
-        final ConnectionState connectionState = connectionStates.get(sessionState.getInfo().getSessionId().getParentId());
-        final boolean connectionInterruptionProcessingComplete = connectionState.isConnectionInterruptProcessingComplete();
-        for (ConsumerState consumerState : sessionState.getConsumerStates()) {   
-            ConsumerInfo infoToSend = consumerState.getInfo();
-            if (!connectionInterruptionProcessingComplete && infoToSend.getPrefetchSize() > 0) {
-                infoToSend = consumerState.getInfo().copy();
-                connectionState.getRecoveringPullConsumers().put(infoToSend.getConsumerId(), consumerState.getInfo());
-                infoToSend.setPrefetchSize(0);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("restore consumer: " + infoToSend.getConsumerId() + " in pull mode pending recovery, overriding prefetch: " + consumerState.getInfo().getPrefetchSize());
-                }
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("restore consumer: " + infoToSend.getConsumerId());
-            }
-            transport.oneway(infoToSend);
-        }
-    }
-
-    /**
-     * @param transport
-     * @param sessionState
-     * @throws IOException
-     */
-    protected void restoreProducers(Transport transport, SessionState sessionState) throws IOException {
-        // Restore the session's producers
-        for (Iterator iter3 = sessionState.getProducerStates().iterator(); iter3.hasNext();) {
-            ProducerState producerState = (ProducerState)iter3.next();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("producer: " + producerState.getInfo().getProducerId());
-            }
-            transport.oneway(producerState.getInfo());
-        }
-    }
-
-    /**
-     * @param transport
-     * @param connectionState
-     * @throws IOException
-     */
-    protected void restoreTempDestinations(Transport transport, ConnectionState connectionState)
-        throws IOException {
-        // Restore the connection's temp destinations.
-        for (Iterator iter2 = connectionState.getTempDestinations().iterator(); iter2.hasNext();) {
-            transport.oneway((DestinationInfo)iter2.next());
-        }
-    }
-
-    public Response processAddDestination(DestinationInfo info) {
-        if (info != null) {
-            ConnectionState cs = connectionStates.get(info.getConnectionId());
-            if (cs != null && info.getDestination().isTemporary()) {
-                cs.addTempDestination(info);
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processRemoveDestination(DestinationInfo info) {
-        if (info != null) {
-            ConnectionState cs = connectionStates.get(info.getConnectionId());
-            if (cs != null && info.getDestination().isTemporary()) {
-                cs.removeTempDestination(info.getDestination());
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processAddProducer(ProducerInfo info) {
-        if (info != null && info.getProducerId() != null) {
-            SessionId sessionId = info.getProducerId().getParentId();
-            if (sessionId != null) {
-                ConnectionId connectionId = sessionId.getParentId();
-                if (connectionId != null) {
-                    ConnectionState cs = connectionStates.get(connectionId);
-                    if (cs != null) {
-                        SessionState ss = cs.getSessionState(sessionId);
-                        if (ss != null) {
-                            ss.addProducer(info);
-                        }
-                    }
-                }
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processRemoveProducer(ProducerId id) {
-        if (id != null) {
-            SessionId sessionId = id.getParentId();
-            if (sessionId != null) {
-                ConnectionId connectionId = sessionId.getParentId();
-                if (connectionId != null) {
-                    ConnectionState cs = connectionStates.get(connectionId);
-                    if (cs != null) {
-                        SessionState ss = cs.getSessionState(sessionId);
-                        if (ss != null) {
-                            ss.removeProducer(id);
-                        }
-                    }
-                }
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processAddConsumer(ConsumerInfo info) {
-        if (info != null) {
-            SessionId sessionId = info.getConsumerId().getParentId();
-            if (sessionId != null) {
-                ConnectionId connectionId = sessionId.getParentId();
-                if (connectionId != null) {
-                    ConnectionState cs = connectionStates.get(connectionId);
-                    if (cs != null) {
-                        SessionState ss = cs.getSessionState(sessionId);
-                        if (ss != null) {
-                            ss.addConsumer(info);
-                        }
-                    }
-                }
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processRemoveConsumer(ConsumerId id, long lastDeliveredSequenceId) {
-        if (id != null) {
-            SessionId sessionId = id.getParentId();
-            if (sessionId != null) {
-                ConnectionId connectionId = sessionId.getParentId();
-                if (connectionId != null) {
-                    ConnectionState cs = connectionStates.get(connectionId);
-                    if (cs != null) {
-                        SessionState ss = cs.getSessionState(sessionId);
-                        if (ss != null) {
-                            ss.removeConsumer(id);
-                        }
-                    }
-                }
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processAddSession(SessionInfo info) {
-        if (info != null) {
-            ConnectionId connectionId = info.getSessionId().getParentId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    cs.addSession(info);
-                }
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) {
-        if (id != null) {
-            ConnectionId connectionId = id.getParentId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    cs.removeSession(id);
-                }
-            }
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processAddConnection(ConnectionInfo info) {
-        if (info != null) {
-            connectionStates.put(info.getConnectionId(), new ConnectionState(info));
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws Exception {
-        if (id != null) {
-            connectionStates.remove(id);
-        }
-        return TRACKED_RESPONSE_MARKER;
-    }
-
-    public Response processMessage(Message send) throws Exception {
-        if (send != null) {
-            if (trackTransactions && send.getTransactionId() != null) {
-                ProducerId producerId = send.getProducerId();
-                ConnectionId connectionId = producerId.getParentId().getParentId();
-                if (connectionId != null) {
-                    ConnectionState cs = connectionStates.get(connectionId);
-                    if (cs != null) {
-                        TransactionState transactionState = cs.getTransactionState(send.getTransactionId());
-                        if (transactionState != null) {
-                            transactionState.addCommand(send);
-                            
-                            if (trackTransactionProducers) {
-                                // for jmstemplate, track the producer in case it is closed before commit
-                                // and needs to be replayed
-                                SessionState ss = cs.getSessionState(producerId.getParentId());
-                                ProducerState producerState = ss.getProducerState(producerId);
-                                producerState.setTransactionState(transactionState);            
-                            }
-                        }
-                    }
-                }
-                return TRACKED_RESPONSE_MARKER;
-            }else if (trackMessages) {
-                messageCache.put(send.getMessageId(), send.copy());
-            }
-        }
-        return null;
-    }
-
-    public Response processBeginTransaction(TransactionInfo info) {
-        if (trackTransactions && info != null && info.getTransactionId() != null) {
-            ConnectionId connectionId = info.getConnectionId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    cs.addTransactionState(info.getTransactionId());
-                    TransactionState state = cs.getTransactionState(info.getTransactionId());
-                    state.addCommand(info);
-                }
-            }
-            return TRACKED_RESPONSE_MARKER;
-        }
-        return null;
-    }
-
-    public Response processPrepareTransaction(TransactionInfo info) throws Exception {
-        if (trackTransactions && info != null) {
-            ConnectionId connectionId = info.getConnectionId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    TransactionState transactionState = cs.getTransactionState(info.getTransactionId());
-                    if (transactionState != null) {
-                        transactionState.addCommand(info);
-                        return new Tracked(new PrepareReadonlyTransactionAction(info));
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    public Response processCommitTransactionOnePhase(TransactionInfo info) throws Exception {
-        if (trackTransactions && info != null) {
-            ConnectionId connectionId = info.getConnectionId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    TransactionState transactionState = cs.getTransactionState(info.getTransactionId());
-                    if (transactionState != null) {
-                        transactionState.addCommand(info);
-                        return new Tracked(new RemoveTransactionAction(info));
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    public Response processCommitTransactionTwoPhase(TransactionInfo info) throws Exception {
-        if (trackTransactions && info != null) {
-            ConnectionId connectionId = info.getConnectionId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    TransactionState transactionState = cs.getTransactionState(info.getTransactionId());
-                    if (transactionState != null) {
-                        transactionState.addCommand(info);
-                        return new Tracked(new RemoveTransactionAction(info));
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    public Response processRollbackTransaction(TransactionInfo info) throws Exception {
-        if (trackTransactions && info != null) {
-            ConnectionId connectionId = info.getConnectionId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    TransactionState transactionState = cs.getTransactionState(info.getTransactionId());
-                    if (transactionState != null) {
-                        transactionState.addCommand(info);
-                        return new Tracked(new RemoveTransactionAction(info));
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    public Response processEndTransaction(TransactionInfo info) throws Exception {
-        if (trackTransactions && info != null) {
-            ConnectionId connectionId = info.getConnectionId();
-            if (connectionId != null) {
-                ConnectionState cs = connectionStates.get(connectionId);
-                if (cs != null) {
-                    TransactionState transactionState = cs.getTransactionState(info.getTransactionId());
-                    if (transactionState != null) {
-                        transactionState.addCommand(info);
-                    }
-                }
-            }
-            return TRACKED_RESPONSE_MARKER;
-        }
-        return null;
-    }
-
-    @Override
-    public Response processMessagePull(MessagePull pull) throws Exception {
-        if (pull != null) {
-            // leave a single instance in the cache
-            final String id = pull.getDestination() + "::" + pull.getConsumerId();
-            messageCache.put(id.intern(), pull);
-        }
-        return null;
-    }
-
-    public boolean isRestoreConsumers() {
-        return restoreConsumers;
-    }
-
-    public void setRestoreConsumers(boolean restoreConsumers) {
-        this.restoreConsumers = restoreConsumers;
-    }
-
-    public boolean isRestoreProducers() {
-        return restoreProducers;
-    }
-
-    public void setRestoreProducers(boolean restoreProducers) {
-        this.restoreProducers = restoreProducers;
-    }
-
-    public boolean isRestoreSessions() {
-        return restoreSessions;
-    }
-
-    public void setRestoreSessions(boolean restoreSessions) {
-        this.restoreSessions = restoreSessions;
-    }
-
-    public boolean isTrackTransactions() {
-        return trackTransactions;
-    }
-
-    public void setTrackTransactions(boolean trackTransactions) {
-        this.trackTransactions = trackTransactions;
-    }
-    
-    public boolean isTrackTransactionProducers() {
-        return this.trackTransactionProducers;
-    }
-
-    public void setTrackTransactionProducers(boolean trackTransactionProducers) {
-        this.trackTransactionProducers = trackTransactionProducers;
-    }
-    
-    public boolean isRestoreTransaction() {
-        return restoreTransaction;
-    }
-
-    public void setRestoreTransaction(boolean restoreTransaction) {
-        this.restoreTransaction = restoreTransaction;
-    }
-
-    public boolean isTrackMessages() {
-        return trackMessages;
-    }
-
-    public void setTrackMessages(boolean trackMessages) {
-        this.trackMessages = trackMessages;
-    }
-
-    public int getMaxCacheSize() {
-        return maxCacheSize;
-    }
-
-    public void setMaxCacheSize(int maxCacheSize) {
-        this.maxCacheSize = maxCacheSize;
-    }
-
-    public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) {
-        ConnectionState connectionState = connectionStates.get(connectionId);
-        if (connectionState != null) {
-            connectionState.setConnectionInterruptProcessingComplete(true);
-            Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers();
-            for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) {
-                ConsumerControl control = new ConsumerControl();
-                control.setConsumerId(entry.getKey());
-                control.setPrefetch(entry.getValue().getPrefetchSize());
-                control.setDestination(entry.getValue().getDestination());
-                try {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch());
-                    }
-                    transport.oneway(control);  
-                } catch (Exception ex) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Failed to submit control for consumer: " + control.getConsumerId()
-                                + " with: " + control.getPrefetch(), ex);
-                    }
-                }
-            }
-            stalledConsumers.clear();
-        }
-    }
-
-    public void transportInterrupted(ConnectionId connectionId) {
-        ConnectionState connectionState = connectionStates.get(connectionId);
-        if (connectionState != null) {
-            connectionState.setConnectionInterruptProcessingComplete(false);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConsumerState.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConsumerState.java
deleted file mode 100755
index 0fdac94..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConsumerState.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.state;
-
-import org.apache.activemq.command.ConsumerInfo;
-
-public class ConsumerState {        
-    final ConsumerInfo info;
-    
-    public ConsumerState(ConsumerInfo info) {
-        this.info = info;
-    }        
-    public String toString() {
-        return info.toString();
-    }        
-    public ConsumerInfo getInfo() {
-        return info;
-    }        
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ProducerState.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/ProducerState.java
deleted file mode 100755
index a3567be..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ProducerState.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.state;
-
-import org.apache.activemq.command.ProducerInfo;
-
-public class ProducerState {
-    final ProducerInfo info;
-    private TransactionState transactionState;
-
-    public ProducerState(ProducerInfo info) {
-        this.info = info;
-    }
-
-    public String toString() {
-        return info.toString();
-    }
-
-    public ProducerInfo getInfo() {
-        return info;
-    }
-
-    public void setTransactionState(TransactionState transactionState) {
-        this.transactionState = transactionState;
-    }
-
-    public TransactionState getTransactionState() {
-        return transactionState;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ResponseHandler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/ResponseHandler.java
deleted file mode 100644
index d8bf5d8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/ResponseHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.state;
-
-import org.apache.activemq.command.Command;
-
-public interface ResponseHandler {
-    public void onResponse(Command command);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java
deleted file mode 100755
index ac20dc8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.state;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-public class SessionState {
-    final SessionInfo info;
-
-    private final Map<ProducerId, ProducerState> producers = new ConcurrentHashMap<ProducerId, ProducerState>();
-    private final Map<ConsumerId, ConsumerState> consumers = new ConcurrentHashMap<ConsumerId, ConsumerState>();
-    private final AtomicBoolean shutdown = new AtomicBoolean(false);
-
-    public SessionState(SessionInfo info) {
-        this.info = info;
-    }
-
-    public String toString() {
-        return info.toString();
-    }
-
-    public void addProducer(ProducerInfo info) {
-        checkShutdown();
-        producers.put(info.getProducerId(), new ProducerState(info));
-    }
-
-    public ProducerState removeProducer(ProducerId id) {
-        ProducerState producerState = producers.remove(id);
-        if (producerState != null) {
-            if (producerState.getTransactionState() != null) {
-                // allow the transaction to recreate dependent producer on recovery
-                producerState.getTransactionState().addProducerState(producerState);
-            }
-        }
-        return producerState;
-    }
-    
-    public void addConsumer(ConsumerInfo info) {
-        checkShutdown();
-        consumers.put(info.getConsumerId(), new ConsumerState(info));
-    }
-
-    public ConsumerState removeConsumer(ConsumerId id) {
-        return consumers.remove(id);
-    }
-
-    public SessionInfo getInfo() {
-        return info;
-    }
-
-    public Set<ConsumerId> getConsumerIds() {
-        return consumers.keySet();
-    }
-
-    public Set<ProducerId> getProducerIds() {
-        return producers.keySet();
-    }
-
-    public Collection<ProducerState> getProducerStates() {
-        return producers.values();
-    }
-
-    public ProducerState getProducerState(ProducerId producerId) {
-        return producers.get(producerId);
-    }
-
-    public Collection<ConsumerState> getConsumerStates() {
-        return consumers.values();
-    }
-
-    public ConsumerState getConsumerState(ConsumerId consumerId) {
-        return consumers.get(consumerId);
-    }
-
-    private void checkShutdown() {
-        if (shutdown.get()) {
-            throw new IllegalStateException("Disposed");
-        }
-    }
-
-    public void shutdown() {
-        shutdown.set(false);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/Tracked.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/Tracked.java
deleted file mode 100644
index e39bdd6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/Tracked.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.state;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
-
-public class Tracked extends Response {
-
-    private ResponseHandler handler;
-
-    public Tracked(ResponseHandler runnable) {
-        this.handler = runnable;
-    }
-
-    public void onResponses(Command command) {
-        if (handler != null) {
-            handler.onResponse(command);
-            handler = null;
-        }
-    }
-
-    public boolean isWaitingForResponse() {
-        return handler != null;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/state/TransactionState.java b/trunk/activemq-core/src/main/java/org/apache/activemq/state/TransactionState.java
deleted file mode 100644
index 80529d1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/state/TransactionState.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.state;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.TransactionId;
-
-public class TransactionState {
-
-    private final List<Command> commands = new ArrayList<Command>();
-    private final TransactionId id;
-    private final AtomicBoolean shutdown = new AtomicBoolean(false);
-    private boolean prepared;
-    private int preparedResult;
-    private final Map<ProducerId, ProducerState> producers = new ConcurrentHashMap<ProducerId, ProducerState>();
-
-    public TransactionState(TransactionId id) {
-        this.id = id;
-    }
-
-    public String toString() {
-        return id.toString();
-    }
-
-    public void addCommand(Command operation) {
-        checkShutdown();
-        commands.add(operation);
-    }
-
-    public List<Command> getCommands() {
-        return commands;
-    }
-
-    private void checkShutdown() {
-        if (shutdown.get()) {
-            throw new IllegalStateException("Disposed");
-        }
-    }
-
-    public void shutdown() {
-        shutdown.set(false);
-    }
-
-    public TransactionId getId() {
-        return id;
-    }
-
-    public void setPrepared(boolean prepared) {
-        this.prepared = prepared;
-    }
-
-    public boolean isPrepared() {
-        return prepared;
-    }
-
-    public void setPreparedResult(int preparedResult) {
-        this.preparedResult = preparedResult;
-    }
-
-    public int getPreparedResult() {
-        return preparedResult;
-    }
-
-    public void addProducerState(ProducerState producerState) {
-        if (producerState != null) {
-            producers.put(producerState.getInfo().getProducerId(), producerState);
-        }
-    }
-
-    public Map<ProducerId, ProducerState> getProducerStates() {
-        return producers;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/AbstractMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/AbstractMessageStore.java
deleted file mode 100644
index 45b6ffb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/AbstractMessageStore.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.usage.MemoryUsage;
-
-abstract public class AbstractMessageStore implements MessageStore {
-    public static final FutureTask<Object> FUTURE;
-    protected final ActiveMQDestination destination;
-    protected boolean prioritizedMessages;
-
-    public AbstractMessageStore(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-    
-    public void dispose(ConnectionContext context) {
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public void setMemoryUsage(MemoryUsage memoryUsage) {
-    }
-
-    public void setBatch(MessageId messageId) throws IOException, Exception {
-    }
-
-    /**
-     * flag to indicate if the store is empty
-     * 
-     * @return true if the message count is 0
-     * @throws Exception
-     */
-    public boolean isEmpty() throws Exception {
-        return getMessageCount() == 0;
-    }
-    
-    public void setPrioritizedMessages(boolean prioritizedMessages) {
-        this.prioritizedMessages = prioritizedMessages;
-    }    
-
-    public boolean isPrioritizedMessages() {
-        return this.prioritizedMessages;
-    }
-
-    public Future<Object> asyncAddQueueMessage(final ConnectionContext context, final Message message) throws IOException {
-        addMessage(context, message);
-        return FUTURE;
-    }
-
-       
-    public Future<Object> asyncAddTopicMessage(final ConnectionContext context, final Message message) throws IOException {
-        addMessage(context, message);
-        return FUTURE;
-    }
-
-    public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        removeMessage(context, ack);
-    }
-    
-    static class CallableImplementation implements Callable<Object> {
-        public Object call() throws Exception {
-            return null;
-        }
-    }
-
-    static {
-       FUTURE = new FutureTask<Object>(new CallableImplementation());
-       FUTURE.run();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/MessageRecoveryListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/MessageRecoveryListener.java
deleted file mode 100755
index 5cbeac9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/MessageRecoveryListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.store;
-
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-
-/**
- * 
- */
-public interface MessageRecoveryListener {
-    boolean recoverMessage(Message message) throws Exception;
-    boolean recoverMessageReference(MessageId ref) throws Exception;
-    boolean hasSpace();
-    /**
-     * check if ref is a duplicate but do not record the reference
-     * @param ref
-     * @return true if ref is a duplicate
-     */
-    boolean isDuplicate(MessageId ref);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/MessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/MessageStore.java
deleted file mode 100755
index 38ddfeb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/MessageStore.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import java.util.concurrent.Future;
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.usage.MemoryUsage;
-
-/**
- * Represents a message store which is used by the persistent implementations
- * 
- * 
- */
-public interface MessageStore extends Service {
-
-    /**
-     * Adds a message to the message store
-     * 
-     * @param context context
-     * @param message
-     * @throws IOException
-     */
-    void addMessage(ConnectionContext context, Message message) throws IOException;
-    
-    /**
-     * Adds a message to the message store
-     * 
-     * @param context context
-     * @param message
-     * @return a Future to track when this is complete
-     * @throws IOException 
-     * @throws IOException
-     */
-    Future<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException;
-    
-    /**
-     * Adds a message to the message store
-     * 
-     * @param context context
-     * @param message
-     * @return a Future to track when this is complete
-     * @throws IOException 
-     * @throws IOException
-     */
-    Future<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException;
-
-    /**
-     * Looks up a message using either the String messageID or the
-     * messageNumber. Implementations are encouraged to fill in the missing key
-     * if its easy to do so.
-     * 
-     * @param identity which contains either the messageID or the messageNumber
-     * @return the message or null if it does not exist
-     * @throws IOException
-     */
-    Message getMessage(MessageId identity) throws IOException;
-
-    /**
-     * Removes a message from the message store.
-     * 
-     * @param context
-     * @param ack the ack request that cause the message to be removed. It
-     *                conatins the identity which contains the messageID of the
-     *                message that needs to be removed.
-     * @throws IOException
-     */
-    void removeMessage(ConnectionContext context, MessageAck ack) throws IOException;
-    
-    void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException;
-
-    /**
-     * Removes all the messages from the message store.
-     * 
-     * @param context
-     * @throws IOException
-     */
-    void removeAllMessages(ConnectionContext context) throws IOException;
-
-    /**
-     * Recover any messages to be delivered.
-     * 
-     * @param container
-     * @throws Exception
-     */
-    void recover(MessageRecoveryListener container) throws Exception;
-
-    /**
-     * The destination that the message store is holding messages for.
-     * 
-     * @return the destination
-     */
-    ActiveMQDestination getDestination();
-
-    /**
-     * @param memoeyUSage The SystemUsage that is controlling the
-     *                destination's memory usage.
-     */
-    void setMemoryUsage(MemoryUsage memoeyUSage);
-
-    /**
-     * @return the number of messages ready to deliver
-     * @throws IOException
-     * 
-     */
-    int getMessageCount() throws IOException;
-
-    /**
-     * A hint to the Store to reset any batching state for the Destination
-     * 
-     */
-    void resetBatching();
-
-    void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception;
-
-    void dispose(ConnectionContext context);
-
-    /**
-     * allow caching cursors to set the current batch offset when cache is exhausted
-     * @param messageId
-     * @throws Exception 
-     */
-    void setBatch(MessageId messageId) throws Exception;
-    
-    /**
-     * flag to indicate if the store is empty
-     * @return true if the message count is 0
-     * @throws Exception 
-     */
-    boolean isEmpty() throws Exception;
-    
-    /**
-     * A hint to the store to try recover messages according to priority
-     * @param prioritizedMessages
-     */
-    public void setPrioritizedMessages(boolean prioritizedMessages);
-    
-    /**
-     * 
-     * @return true if store is trying to recover messages according to priority
-     */
-    public boolean isPrioritizedMessages();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapter.java
deleted file mode 100755
index aa95a67..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapter.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * 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.store;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Set;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * Adapter to the actual persistence mechanism used with ActiveMQ
- *
- * 
- */
-public interface PersistenceAdapter extends Service {
-
-    /**
-     * Returns a set of all the {@link org.apache.activemq.command.ActiveMQDestination}
-     * objects that the persistence store is aware exist.
-     *
-     * @return active destinations
-     */
-    Set<ActiveMQDestination> getDestinations();
-
-    /**
-     * Factory method to create a new queue message store with the given destination name
-     * @param destination
-     * @return the message store
-     * @throws IOException 
-     */
-    MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException;
-
-    /**
-     * Factory method to create a new topic message store with the given destination name
-     * @param destination 
-     * @return the topic message store
-     * @throws IOException 
-     */
-    TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException;
-
-    /**
-     * Cleanup method to remove any state associated with the given destination.
-     * This method does not stop the message store (it might not be cached).
-     * @param destination Destination to forget
-     */
-    void removeQueueMessageStore(ActiveMQQueue destination);
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     * This method does not stop the message store (it might not be cached).
-     * @param destination Destination to forget
-     */
-    void removeTopicMessageStore(ActiveMQTopic destination);
-
-    /**
-     * Factory method to create a new persistent prepared transaction store for XA recovery
-     * @return transaction store
-     * @throws IOException 
-     */
-    TransactionStore createTransactionStore() throws IOException;
-
-    /**
-     * This method starts a transaction on the persistent storage - which is nothing to
-     * do with JMS or XA transactions - its purely a mechanism to perform multiple writes
-     * to a persistent store in 1 transaction as a performance optimization.
-     * <p/>
-     * Typically one transaction will require one disk synchronization point and so for
-     * real high performance its usually faster to perform many writes within the same
-     * transaction to minimize latency caused by disk synchronization. This is especially
-     * true when using tools like Berkeley Db or embedded JDBC servers.
-     * @param context 
-     * @throws IOException 
-     */
-    void beginTransaction(ConnectionContext context) throws IOException;
-
-
-    /**
-     * Commit a persistence transaction
-     * @param context 
-     * @throws IOException 
-     *
-     * @see PersistenceAdapter#beginTransaction(ConnectionContext context)
-     */
-    void commitTransaction(ConnectionContext context) throws IOException;
-
-    /**
-     * Rollback a persistence transaction
-     * @param context 
-     * @throws IOException 
-     *
-     * @see PersistenceAdapter#beginTransaction(ConnectionContext context)
-     */
-    void rollbackTransaction(ConnectionContext context) throws IOException;
-    
-    /**
-     * 
-     * @return last broker sequence
-     * @throws IOException
-     */
-    long getLastMessageBrokerSequenceId() throws IOException;
-    
-    /**
-     * Delete's all the messages in the persistent store.
-     * 
-     * @throws IOException
-     */
-    void deleteAllMessages() throws IOException;
-        
-    /**
-     * @param usageManager The UsageManager that is controlling the broker's memory usage.
-     */
-    void setUsageManager(SystemUsage usageManager);
-    
-    /**
-     * Set the name of the broker using the adapter
-     * @param brokerName
-     */
-    void setBrokerName(String brokerName);
-    
-    /**
-     * Set the directory where any data files should be created
-     * @param dir
-     */
-    void setDirectory(File dir);
-    
-    /**
-     * checkpoint any
-     * @param sync 
-     * @throws IOException 
-     *
-     */
-    void checkpoint(boolean sync) throws IOException;
-    
-    /**
-     * A hint to return the size of the store on disk
-     * @return disk space used in bytes of 0 if not implemented
-     */
-    long size();
-
-    /**
-     * return the last stored producer sequenceId for this producer Id
-     * used to suppress duplicate sends on failover reconnect at the transport
-     * when a reconnect occurs
-     * @param id the producerId to find a sequenceId for
-     * @return the last stored sequence id or -1 if no suppression needed
-     */
-    long getLastProducerSequenceId(ProducerId id) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactory.java
deleted file mode 100755
index 72ae575..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-
-/**
- * Factory class that can create PersistenceAdapter objects.
- *
- * 
- */
-public interface PersistenceAdapterFactory {
-    
-    /**
-     * Creates a persistence Adapter that can use a given directory to store it's data.
-     * @throws IOException 
-     */
-    PersistenceAdapter createPersistenceAdapter() throws IOException;
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactoryBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactoryBean.java
deleted file mode 100644
index 0964024..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapterFactoryBean.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.store;
-
-import org.apache.activemq.store.journal.JournalPersistenceAdapterFactory;
-import org.springframework.beans.factory.FactoryBean;
-
-/**
- * Creates a default persistence model using the Journal and JDBC
- * 
- * @org.apache.xbean.XBean element="journaledJDBC"
- * 
- * 
- */
-public class PersistenceAdapterFactoryBean extends JournalPersistenceAdapterFactory implements FactoryBean {
-
-    private PersistenceAdapter persistenceAdaptor;
-
-    public Object getObject() throws Exception {
-        if (persistenceAdaptor == null) {
-            persistenceAdaptor = createPersistenceAdapter();
-        }
-        return persistenceAdaptor;
-    }
-
-    public Class getObjectType() {
-        return PersistenceAdapter.class;
-    }
-
-    public boolean isSingleton() {
-        return false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ProxyMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/ProxyMessageStore.java
deleted file mode 100755
index 10d4723..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ProxyMessageStore.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import java.util.concurrent.Future;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.usage.MemoryUsage;
-
-/**
- * A simple proxy that delegates to another MessageStore.
- */
-public class ProxyMessageStore implements MessageStore {
-
-    final MessageStore delegate;
-
-    public ProxyMessageStore(MessageStore delegate) {
-        this.delegate = delegate;
-    }
-
-    public MessageStore getDelegate() {
-        return delegate;
-    }
-
-    public void addMessage(ConnectionContext context, Message message) throws IOException {
-        delegate.addMessage(context, message);
-    }
-
-    public Message getMessage(MessageId identity) throws IOException {
-        return delegate.getMessage(identity);
-    }
-
-    public void recover(MessageRecoveryListener listener) throws Exception {
-        delegate.recover(listener);
-    }
-
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        delegate.removeAllMessages(context);
-    }
-
-    public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        delegate.removeMessage(context, ack);
-    }
-
-    public void start() throws Exception {
-        delegate.start();
-    }
-
-    public void stop() throws Exception {
-        delegate.stop();
-    }
-
-    public void dispose(ConnectionContext context) {
-        delegate.dispose(context);
-    }
-
-    public ActiveMQDestination getDestination() {
-        return delegate.getDestination();
-    }
-
-    public void setMemoryUsage(MemoryUsage memoryUsage) {
-        delegate.setMemoryUsage(memoryUsage);
-    }
-
-    public int getMessageCount() throws IOException {
-        return delegate.getMessageCount();
-    }
-
-    public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception {
-        delegate.recoverNextMessages(maxReturned, listener);
-
-    }
-
-    public void resetBatching() {
-        delegate.resetBatching();
-
-    }
-
-    public void setBatch(MessageId messageId) throws Exception {
-        delegate.setBatch(messageId);
-    }
-
-    public boolean isEmpty() throws Exception {
-       return delegate.isEmpty();
-    }
-
-    public Future<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException {
-       return delegate.asyncAddQueueMessage(context, message);
-    }
-    
-    public Future<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException {
-        return delegate.asyncAddTopicMessage(context, message);
-     }
-    
-    public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        delegate.removeAsyncMessage(context, ack);       
-    }
-
-    public void setPrioritizedMessages(boolean prioritizedMessages) {
-        delegate.setPrioritizedMessages(prioritizedMessages);
-    }
-
-    public boolean isPrioritizedMessages() {
-        return delegate.isPrioritizedMessages();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ProxyTopicMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/ProxyTopicMessageStore.java
deleted file mode 100755
index fa01ec6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ProxyTopicMessageStore.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import java.util.concurrent.Future;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.usage.MemoryUsage;
-
-/**
- * A simple proxy that delegates to another MessageStore.
- */
-public class ProxyTopicMessageStore implements TopicMessageStore {
-
-    final TopicMessageStore delegate;
-
-    public ProxyTopicMessageStore(TopicMessageStore delegate) {
-        this.delegate = delegate;
-    }
-
-    public MessageStore getDelegate() {
-        return delegate;
-    }
-
-    public void addMessage(ConnectionContext context, Message message) throws IOException {
-        delegate.addMessage(context, message);
-    }
-
-    public Message getMessage(MessageId identity) throws IOException {
-        return delegate.getMessage(identity);
-    }
-
-    public void recover(MessageRecoveryListener listener) throws Exception {
-        delegate.recover(listener);
-    }
-
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        delegate.removeAllMessages(context);
-    }
-
-    public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        delegate.removeMessage(context, ack);
-    }
-
-    public void start() throws Exception {
-        delegate.start();
-    }
-
-    public void stop() throws Exception {
-        delegate.stop();
-    }
-
-    public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-        return delegate.lookupSubscription(clientId, subscriptionName);
-    }
-
-    public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                            MessageId messageId, MessageAck ack) throws IOException {
-        delegate.acknowledge(context, clientId, subscriptionName, messageId, ack);
-    }
-
-    public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException {
-        delegate.addSubsciption(subscriptionInfo, retroactive);
-    }
-
-    public void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-        delegate.deleteSubscription(clientId, subscriptionName);
-    }
-
-    public void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener)
-        throws Exception {
-        delegate.recoverSubscription(clientId, subscriptionName, listener);
-    }
-
-    public void recoverNextMessages(String clientId, String subscriptionName, int maxReturned,
-                                    MessageRecoveryListener listener) throws Exception {
-        delegate.recoverNextMessages(clientId, subscriptionName, maxReturned, listener);
-    }
-
-    public void resetBatching(String clientId, String subscriptionName) {
-        delegate.resetBatching(clientId, subscriptionName);
-    }
-
-    public ActiveMQDestination getDestination() {
-        return delegate.getDestination();
-    }
-
-    public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-        return delegate.getAllSubscriptions();
-    }
-
-    public void setMemoryUsage(MemoryUsage memoryUsage) {
-        delegate.setMemoryUsage(memoryUsage);
-    }
-
-    public int getMessageCount(String clientId, String subscriberName) throws IOException {
-        return delegate.getMessageCount(clientId, subscriberName);
-    }
-
-    public int getMessageCount() throws IOException {
-        return delegate.getMessageCount();
-    }
-
-    public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception {
-        delegate.recoverNextMessages(maxReturned, listener);
-
-    }
-
-    public void dispose(ConnectionContext context) {
-        delegate.dispose(context);
-    }
-
-    public void resetBatching() {
-        delegate.resetBatching();
-
-    }
-
-    public void setBatch(MessageId messageId) throws Exception {
-        delegate.setBatch(messageId);
-    }
-    
-    public boolean isEmpty() throws Exception {
-        return delegate.isEmpty();
-     }
-
-    public Future<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException {
-        return delegate.asyncAddTopicMessage(context, message);
-     }
-
-    public Future<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException {
-        return delegate.asyncAddQueueMessage(context, message);
-    }
-
-    public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        delegate.removeAsyncMessage(context, ack);
-    }
-
-    public void setPrioritizedMessages(boolean prioritizedMessages) {
-        delegate.setPrioritizedMessages(prioritizedMessages);
-    }
-    
-    public boolean isPrioritizedMessages() {
-        return delegate.isPrioritizedMessages();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ReferenceStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/ReferenceStore.java
deleted file mode 100644
index bf8ec37..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ReferenceStore.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import java.util.concurrent.locks.Lock;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.MessageId;
-
-/**
- * Represents a message store which is used by the persistent implementations
- * 
- * 
- */
-public interface ReferenceStore extends MessageStore {
-
-    public class ReferenceData {
-        long expiration;
-        int fileId;
-        int offset;
-
-        public long getExpiration() {
-            return expiration;
-        }
-
-        public void setExpiration(long expiration) {
-            this.expiration = expiration;
-        }
-
-        public int getFileId() {
-            return fileId;
-        }
-
-        public void setFileId(int file) {
-            this.fileId = file;
-        }
-
-        public int getOffset() {
-            return offset;
-        }
-
-        public void setOffset(int offset) {
-            this.offset = offset;
-        }
-
-        @Override
-        public String toString() {
-            return "ReferenceData fileId=" + fileId + ", offset=" + offset + ", expiration=" + expiration;
-        }
-    }
-
-    /**
-     * Adds a message reference to the message store
-     * @return true if reference was added, false if it is a duplicate and not added
-     */
-    boolean addMessageReference(ConnectionContext context, MessageId messageId, ReferenceData data) throws IOException;
-
-    /**
-     * Looks up a message using either the String messageID or the
-     * messageNumber. Implementations are encouraged to fill in the missing key
-     * if its easy to do so.
-     */
-    ReferenceData getMessageReference(MessageId identity) throws IOException;
-
-    /**
-     * @return true if it supports external batch control
-     */
-    boolean supportsExternalBatchControl();
-
-    void setBatch(MessageId startAfter);
-    
-    Lock getStoreLock();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ReferenceStoreAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/ReferenceStoreAdapter.java
deleted file mode 100644
index d55c6d9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/ReferenceStoreAdapter.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.amq.AMQTx;
-
-/**
- * Adapter to the actual persistence mechanism used with ActiveMQ
- * 
- * 
- */
-public interface ReferenceStoreAdapter extends PersistenceAdapter {
-
-    /**
-     * Factory method to create a new queue message store with the given
-     * destination name
-     * 
-     * @param destination
-     * @return the QueueReferenceStore
-     * @throws IOException
-     */
-    ReferenceStore createQueueReferenceStore(ActiveMQQueue destination) throws IOException;
-
-    /**
-     * Factory method to create a new topic message store with the given
-     * destination name
-     * 
-     * @param destination
-     * @return the TopicRefererenceStore
-     * @throws IOException
-     */
-    TopicReferenceStore createTopicReferenceStore(ActiveMQTopic destination) throws IOException;
-
-    /**
-     * @return Set of File ids in use
-     * @throws IOException
-     */
-    Set<Integer> getReferenceFileIdsInUse() throws IOException;
-
-    /**
-     * If the store isn't valid, it can be recoverd at start-up
-     * 
-     * @return true if the reference store is in a consistent state
-     */
-    boolean isStoreValid();
-
-    /**
-     * called by recover to clear out message references
-     * 
-     * @throws IOException
-     */
-    void clearMessages() throws IOException;
-
-    /**
-     * recover any state
-     * 
-     * @throws IOException
-     */
-    void recoverState() throws IOException;
-
-    /**
-     * Save prepared transactions
-     * 
-     * @param map
-     * @throws IOException
-     */
-    void savePreparedState(Map<TransactionId, AMQTx> map) throws IOException;
-
-    /**
-     * @return saved prepared transactions
-     * @throws IOException
-     */
-    Map<TransactionId, AMQTx> retrievePreparedState() throws IOException;
-    
-    /**
-     * @return the maxDataFileLength
-     */
-    long getMaxDataFileLength();
-    
-    /**
-     * set the max data length of a reference data log - if used
-     * @param maxDataFileLength
-     */
-    void setMaxDataFileLength(long maxDataFileLength);
-    
-    /**
-     * Recover particular subscription. Used for recovery of durable consumers
-     * @param info
-     * @throws IOException
-     */
-    void recoverSubscription(SubscriptionInfo info) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TopicMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/TopicMessageStore.java
deleted file mode 100755
index e9761f5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TopicMessageStore.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import javax.jms.JMSException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-
-/**
- * A MessageStore for durable topic subscriptions
- * 
- * 
- */
-public interface TopicMessageStore extends MessageStore {
-    /**
-     * Stores the last acknowledged messgeID for the given subscription so that
-     * we can recover and commence dispatching messages from the last checkpoint
-     * 
-     * @param context
-     * @param clientId
-     * @param subscriptionName
-     * @param messageId
-     * @param subscriptionPersistentId
-     * @throws IOException
-     */
-    void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException;
-    
-    /**
-     * @param clientId
-     * @param subscriptionName
-     * @param sub
-     * @throws IOException
-     * @throws JMSException
-     */
-    void deleteSubscription(String clientId, String subscriptionName) throws IOException;
-
-    /**
-     * For the new subscription find the last acknowledged message ID and then
-     * find any new messages since then and dispatch them to the subscription.
-     * <p/> e.g. if we dispatched some messages to a new durable topic
-     * subscriber, then went down before acknowledging any messages, we need to
-     * know the correct point from which to recover from.
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @param listener
-     * @param subscription
-     * @throws Exception
-     */
-    void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception;
-
-    /**
-     * For an active subscription - retrieve messages from the store for the
-     * subscriber after the lastMessageId messageId <p/>
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @param maxReturned
-     * @param listener
-     * @throws Exception
-     */
-    void recoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener) throws Exception;
-
-    /**
-     * A hint to the Store to reset any batching state for a durable subsriber
-     * 
-     * @param clientId
-     * @param subscriptionName
-     */
-    void resetBatching(String clientId, String subscriptionName);
-
-    /**
-     * Get the number of messages ready to deliver from the store to a durable
-     * subscriber
-     * 
-     * @param clientId
-     * @param subscriberName
-     * @return the outstanding message count
-     * @throws IOException
-     */
-    int getMessageCount(String clientId, String subscriberName) throws IOException;
-
-    /**
-     * Finds the subscriber entry for the given consumer info
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @return the SubscriptionInfo
-     * @throws IOException
-     */
-    SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException;
-
-    /**
-     * Lists all the durable subscriptions for a given destination.
-     * 
-     * @return an array SubscriptionInfos
-     * @throws IOException
-     */
-    SubscriptionInfo[] getAllSubscriptions() throws IOException;
-
-    /**
-     * Inserts the subscriber info due to a subscription change <p/> If this is
-     * a new subscription and the retroactive is false, then the last message
-     * sent to the topic should be set as the last message acknowledged by they
-     * new subscription. Otherwise, if retroactive is true, then create the
-     * subscription without it having an acknowledged message so that on
-     * recovery, all message recorded for the topic get replayed.
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @param selector
-     * @param retroactive
-     * @throws IOException
-     */
-    void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TopicReferenceStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/TopicReferenceStore.java
deleted file mode 100644
index 2eb1d77..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TopicReferenceStore.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-
-/**
- * A MessageStore for durable topic subscriptions
- * 
- * 
- */
-public interface TopicReferenceStore extends ReferenceStore, TopicMessageStore {
-    /**
-     * Removes the last acknowledged messgeID for the given subscription so that
-     * we can recover and commence dispatching messages from the last checkpoint
-     * N.B. - all messages previous to this one for a given subscriber
-     * should also be acknowledged
-     * 
-     * @param context
-     * @param clientId
-     * @param subscriptionName
-     * @param messageId
-     * @param subscriptionPersistentId
-     * @return true if there are no more references to the message - or the message is null
-     * @throws IOException
-     */
-    boolean acknowledgeReference(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId) throws IOException;
-
-    /**
-     * @param clientId
-     * @param subscriptionName
-     * @param sub
-     * @throws IOException
-     * @throws JMSException
-     */
-    void deleteSubscription(String clientId, String subscriptionName) throws IOException;
-
-    /**
-     * For the new subscription find the last acknowledged message ID and then
-     * find any new messages since then and dispatch them to the subscription.
-     * <p/> e.g. if we dispatched some messages to a new durable topic
-     * subscriber, then went down before acknowledging any messages, we need to
-     * know the correct point from which to recover from.
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @param listener
-     * @param subscription
-     * @throws Exception
-     */
-    void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception;
-
-    /**
-     * For an active subscription - retrieve messages from the store for the
-     * subscriber after the lastMessageId messageId <p/>
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @param maxReturned
-     * @param listener
-     * @throws Exception
-     */
-    void recoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener) throws Exception;
-
-    /**
-     * A hint to the Store to reset any batching state for a durable subsriber
-     * 
-     * @param clientId
-     * @param subscriptionName
-     */
-    void resetBatching(String clientId, String subscriptionName);
-
-    /**
-     * Get the number of messages ready to deliver from the store to a durable
-     * subscriber
-     * 
-     * @param clientId
-     * @param subscriberName
-     * @return the outstanding message count
-     * @throws IOException
-     */
-    int getMessageCount(String clientId, String subscriberName) throws IOException;
-
-    /**
-     * Finds the subscriber entry for the given consumer info
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @return the SubscriptionInfo
-     * @throws IOException
-     */
-    SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException;
-
-    /**
-     * Lists all the durable subscirptions for a given destination.
-     * 
-     * @return an array SubscriptionInfos
-     * @throws IOException
-     */
-    SubscriptionInfo[] getAllSubscriptions() throws IOException;
-
-    /**
-     * Inserts the subscriber info due to a subscription change <p/> If this is
-     * a new subscription and the retroactive is false, then the last message
-     * sent to the topic should be set as the last message acknowledged by they
-     * new subscription. Otherwise, if retroactive is true, then create the
-     * subscription without it having an acknowledged message so that on
-     * recovery, all message recorded for the topic get replayed.
-     * 
-     * @param clientId
-     * @param subscriptionName
-     * @param selector
-     * @param retroactive
-     * @throws IOException
-     */
-    void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TransactionRecoveryListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/TransactionRecoveryListener.java
deleted file mode 100755
index be84ffb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TransactionRecoveryListener.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.store;
-
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.XATransactionId;
-
-public interface TransactionRecoveryListener {
-    void recover(XATransactionId xid, Message[] addedMessages, MessageAck aks[]);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TransactionStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/TransactionStore.java
deleted file mode 100755
index 2ae4228..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/TransactionStore.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.store;
-
-import java.io.IOException;
-import org.apache.activemq.Service;
-import org.apache.activemq.command.TransactionId;
-
-/**
- * Represents the durable store of the commit/rollback operations taken against
- * the broker.
- * 
- * 
- */
-public interface TransactionStore extends Service {
-
-    void prepare(TransactionId txid) throws IOException;
-
-    void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit,Runnable postCommit) throws IOException;
-
-    void rollback(TransactionId txid) throws IOException;
-
-    void recover(TransactionRecoveryListener listener) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java
deleted file mode 100644
index 2f09cf3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java
+++ /dev/null
@@ -1,584 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Lock;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.kaha.MessageAckWithLocation;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.ReferenceStore;
-import org.apache.activemq.store.ReferenceStore.ReferenceData;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.TransactionTemplate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A MessageStore that uses a Journal to store it's messages.
- * 
- * 
- */
-public class AMQMessageStore extends AbstractMessageStore {
-    private static final Logger LOG = LoggerFactory.getLogger(AMQMessageStore.class);
-    protected final AMQPersistenceAdapter peristenceAdapter;
-    protected final AMQTransactionStore transactionStore;
-    protected final ReferenceStore referenceStore;
-    protected final TransactionTemplate transactionTemplate;
-    protected Location lastLocation;
-    protected Location lastWrittenLocation;
-    protected Set<Location> inFlightTxLocations = new HashSet<Location>();
-    protected final TaskRunner asyncWriteTask;
-    protected CountDownLatch flushLatch;
-    private Map<MessageId, ReferenceData> messages = new LinkedHashMap<MessageId, ReferenceData>();
-    private List<MessageAckWithLocation> messageAcks = new ArrayList<MessageAckWithLocation>();
-    /** A MessageStore that we can use to retrieve messages quickly. */
-    private Map<MessageId, ReferenceData> cpAddedMessageIds;
-    private final boolean debug = LOG.isDebugEnabled();
-    private final AtomicReference<Location> mark = new AtomicReference<Location>();
-    protected final Lock lock;
-
-    public AMQMessageStore(AMQPersistenceAdapter adapter, ReferenceStore referenceStore, ActiveMQDestination destination) {
-        super(destination);
-        this.peristenceAdapter = adapter;
-        this.lock = referenceStore.getStoreLock();
-        this.transactionStore = adapter.getTransactionStore();
-        this.referenceStore = referenceStore;
-        this.transactionTemplate = new TransactionTemplate(adapter, new ConnectionContext(
-                new NonCachedMessageEvaluationContext()));
-        asyncWriteTask = adapter.getTaskRunnerFactory().createTaskRunner(new Task() {
-            public boolean iterate() {
-                asyncWrite();
-                return false;
-            }
-        }, "Checkpoint: " + destination);
-    }
-
-    public void setMemoryUsage(MemoryUsage memoryUsage) {
-        referenceStore.setMemoryUsage(memoryUsage);
-    }
-
-    /**
-     * Not synchronize since the Journal has better throughput if you increase the number of concurrent writes that it
-     * is doing.
-     */
-    public final void addMessage(ConnectionContext context, final Message message) throws IOException {
-        final MessageId id = message.getMessageId();
-        final Location location = peristenceAdapter.writeCommand(message, message.isResponseRequired());
-        if (!context.isInTransaction()) {
-            if (debug) {
-                LOG.debug("Journalled message add for: " + id + ", at: " + location);
-            }
-            this.peristenceAdapter.addInProgressDataFile(this, location.getDataFileId());
-            addMessage(message, location);
-        } else {
-            if (debug) {
-                LOG.debug("Journalled transacted message add for: " + id + ", at: " + location);
-            }
-            lock.lock();
-            try {
-                inFlightTxLocations.add(location);
-            } finally {
-                lock.unlock();
-            }
-            transactionStore.addMessage(this, message, location);
-            context.getTransaction().addSynchronization(new Synchronization() {
-                public void afterCommit() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message add commit for: " + id + ", at: " + location);
-                    }
-                    lock.lock();
-                    try {
-                        inFlightTxLocations.remove(location);
-                    } finally {
-                        lock.unlock();
-                    }
-                    addMessage(message, location);
-                }
-
-                public void afterRollback() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message add rollback for: " + id + ", at: " + location);
-                    }
-                    lock.lock();
-                    try {
-                        inFlightTxLocations.remove(location);
-                    } finally {
-                        lock.unlock();
-                    }
-                }
-            });
-        }
-    }
-
-    final void addMessage(final Message message, final Location location) throws InterruptedIOException {
-        ReferenceData data = new ReferenceData();
-        data.setExpiration(message.getExpiration());
-        data.setFileId(location.getDataFileId());
-        data.setOffset(location.getOffset());
-        lock.lock();
-        try {
-            lastLocation = location;
-            ReferenceData prev = messages.put(message.getMessageId(), data);
-            if (prev != null) {
-                AMQMessageStore.this.peristenceAdapter.removeInProgressDataFile(AMQMessageStore.this, prev.getFileId());
-            }
-        } finally {
-            lock.unlock();
-        }
-        if (messages.size() > this.peristenceAdapter.getMaxCheckpointMessageAddSize()) {
-            flush();
-        } else {
-            try {
-                asyncWriteTask.wakeup();
-            } catch (InterruptedException e) {
-                throw new InterruptedIOException();
-            }
-        }
-    }
-
-    public boolean replayAddMessage(ConnectionContext context, Message message, Location location) {
-        MessageId id = message.getMessageId();
-        try {
-            // Only add the message if it has not already been added.
-            ReferenceData data = referenceStore.getMessageReference(id);
-            if (data == null) {
-                data = new ReferenceData();
-                data.setExpiration(message.getExpiration());
-                data.setFileId(location.getDataFileId());
-                data.setOffset(location.getOffset());
-                referenceStore.addMessageReference(context, id, data);
-                return true;
-            }
-        } catch (Throwable e) {
-            LOG.warn("Could not replay add for message '" + id + "'.  Message may have already been added. reason: "
-                    + e, e);
-        }
-        return false;
-    }
-
-    /**
-     */
-    public void removeMessage(final ConnectionContext context, final MessageAck ack) throws IOException {
-        JournalQueueAck remove = new JournalQueueAck();
-        remove.setDestination(destination);
-        remove.setMessageAck(ack);
-        final Location location = peristenceAdapter.writeCommand(remove, ack.isResponseRequired());
-        if (!context.isInTransaction()) {
-            if (debug) {
-                LOG.debug("Journalled message remove for: " + ack.getLastMessageId() + ", at: " + location);
-            }
-            removeMessage(ack, location);
-        } else {
-            if (debug) {
-                LOG.debug("Journalled transacted message remove for: " + ack.getLastMessageId() + ", at: " + location);
-            }
-            lock.lock();
-            try {
-                inFlightTxLocations.add(location);
-            } finally {
-                lock.unlock();
-            }
-            transactionStore.removeMessage(this, ack, location);
-            context.getTransaction().addSynchronization(new Synchronization() {
-                public void afterCommit() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message remove commit for: " + ack.getLastMessageId() + ", at: "
-                                + location);
-                    }
-                    lock.lock();
-                    try {
-                        inFlightTxLocations.remove(location);
-                    } finally {
-                        lock.unlock();
-                    }
-                    removeMessage(ack, location);
-                }
-
-                public void afterRollback() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message remove rollback for: " + ack.getLastMessageId() + ", at: "
-                                + location);
-                    }
-                    lock.lock();
-                    try {
-                        inFlightTxLocations.remove(location);
-                    } finally {
-                        lock.unlock();
-                    }
-                }
-            });
-        }
-    }
-
-    final void removeMessage(final MessageAck ack, final Location location) throws InterruptedIOException {
-        ReferenceData data;
-        lock.lock();
-        try {
-            lastLocation = location;
-            MessageId id = ack.getLastMessageId();
-            data = messages.remove(id);
-            if (data == null) {
-                messageAcks.add(new MessageAckWithLocation(ack, location));
-            } else {
-                // message never got written so datafileReference will still exist
-                AMQMessageStore.this.peristenceAdapter.removeInProgressDataFile(AMQMessageStore.this, data.getFileId());
-            }
-        } finally {
-            lock.unlock();
-        }
-        if (messageAcks.size() > this.peristenceAdapter.getMaxCheckpointMessageAddSize()) {
-            flush();
-        } else if (data == null) {
-            try {
-                asyncWriteTask.wakeup();
-            } catch (InterruptedException e) {
-                throw new InterruptedIOException();
-            }
-        }
-    }
-
-    public boolean replayRemoveMessage(ConnectionContext context, MessageAck messageAck) {
-        try {
-            // Only remove the message if it has not already been removed.
-            ReferenceData t = referenceStore.getMessageReference(messageAck.getLastMessageId());
-            if (t != null) {
-                referenceStore.removeMessage(context, messageAck);
-                return true;
-            }
-        } catch (Throwable e) {
-            LOG.warn("Could not replay acknowledge for message '" + messageAck.getLastMessageId()
-                    + "'.  Message may have already been acknowledged. reason: " + e);
-        }
-        return false;
-    }
-
-    /**
-     * Waits till the lastest data has landed on the referenceStore
-     * 
-     * @throws InterruptedIOException
-     */
-    public void flush() throws InterruptedIOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("flush starting ...");
-        }
-        CountDownLatch countDown;
-        lock.lock();
-        try {
-            if (lastWrittenLocation == lastLocation) {
-                return;
-            }
-            if (flushLatch == null) {
-                flushLatch = new CountDownLatch(1);
-            }
-            countDown = flushLatch;
-        } finally {
-            lock.unlock();
-        }
-        try {
-            asyncWriteTask.wakeup();
-            countDown.await();
-        } catch (InterruptedException e) {
-            throw new InterruptedIOException();
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("flush finished");
-        }
-    }
-
-    /**
-     * @return
-     * @throws IOException
-     */
-    synchronized void asyncWrite() {
-        try {
-            CountDownLatch countDown;
-            lock.lock();
-            try {
-                countDown = flushLatch;
-                flushLatch = null;
-            } finally {
-                lock.unlock();
-            }
-            mark.set(doAsyncWrite());
-            if (countDown != null) {
-                countDown.countDown();
-            }
-        } catch (IOException e) {
-            LOG.error("Checkpoint failed: " + e, e);
-        }
-    }
-
-    /**
-     * @return
-     * @throws IOException
-     */
-    protected Location doAsyncWrite() throws IOException {
-        final List<MessageAckWithLocation> cpRemovedMessageLocations;
-        final List<Location> cpActiveJournalLocations;
-        final int maxCheckpointMessageAddSize = peristenceAdapter.getMaxCheckpointMessageAddSize();
-        final Location lastLocation;
-        // swap out the message hash maps..
-        lock.lock();
-        try {
-            cpAddedMessageIds = this.messages;
-            cpRemovedMessageLocations = this.messageAcks;
-            cpActiveJournalLocations = new ArrayList<Location>(inFlightTxLocations);
-            this.messages = new LinkedHashMap<MessageId, ReferenceData>();
-            this.messageAcks = new ArrayList<MessageAckWithLocation>();
-            lastLocation = this.lastLocation;
-        } finally {
-            lock.unlock();
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Doing batch update... adding: " + cpAddedMessageIds.size() + " removing: "
-                    + cpRemovedMessageLocations.size() + " ");
-        }
-        transactionTemplate.run(new Callback() {
-            public void execute() throws Exception {
-                int size = 0;
-                PersistenceAdapter persitanceAdapter = transactionTemplate.getPersistenceAdapter();
-                ConnectionContext context = transactionTemplate.getContext();
-                // Checkpoint the added messages.
-                Iterator<Entry<MessageId, ReferenceData>> iterator = cpAddedMessageIds.entrySet().iterator();
-                while (iterator.hasNext()) {
-                    Entry<MessageId, ReferenceData> entry = iterator.next();
-                    try {
-                        if (referenceStore.addMessageReference(context, entry.getKey(), entry.getValue())) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("adding message ref:" + entry.getKey());
-                            }
-                            size++;
-                        } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("not adding duplicate reference: " + entry.getKey() + ", " + entry.getValue());
-                            }
-                        }
-                        AMQMessageStore.this.peristenceAdapter.removeInProgressDataFile(AMQMessageStore.this, entry
-                                .getValue().getFileId());
-                    } catch (Throwable e) {
-                        LOG.warn("Message could not be added to long term store: " + e.getMessage(), e);
-                    }
-                    
-                    // Commit the batch if it's getting too big
-                    if (size >= maxCheckpointMessageAddSize) {
-                        persitanceAdapter.commitTransaction(context);
-                        persitanceAdapter.beginTransaction(context);
-                        size = 0;
-                    }
-                }
-                persitanceAdapter.commitTransaction(context);
-                persitanceAdapter.beginTransaction(context);
-                // Checkpoint the removed messages.
-                for (MessageAckWithLocation ack : cpRemovedMessageLocations) {
-                    try {
-                        referenceStore.removeMessage(transactionTemplate.getContext(), ack);
-                    } catch (Throwable e) {
-                        LOG.warn("Message could not be removed from long term store: " + e.getMessage(), e);
-                    }
-                }
-            }
-        });
-        LOG.debug("Batch update done. lastLocation:" + lastLocation);
-        lock.lock();
-        try {
-            cpAddedMessageIds = null;
-            lastWrittenLocation = lastLocation;
-        } finally {
-            lock.unlock();
-        }
-        if (cpActiveJournalLocations.size() > 0) {
-            Collections.sort(cpActiveJournalLocations);
-            return cpActiveJournalLocations.get(0);
-        } else {
-            return lastLocation;
-        }
-    }
-
-    /**
-     * 
-     */
-    public Message getMessage(MessageId identity) throws IOException {
-        Location location = getLocation(identity);
-        if (location != null) {
-            DataStructure rc = peristenceAdapter.readCommand(location);
-            try {
-                return (Message) rc;
-            } catch (ClassCastException e) {
-                throw new IOException("Could not read message " + identity + " at location " + location
-                        + ", expected a message, but got: " + rc);
-            }
-        }
-        return null;
-    }
-
-    protected Location getLocation(MessageId messageId) throws IOException {
-        ReferenceData data = null;
-        lock.lock();
-        try {
-            // Is it still in flight???
-            data = messages.get(messageId);
-            if (data == null && cpAddedMessageIds != null) {
-                data = cpAddedMessageIds.get(messageId);
-            }
-        } finally {
-            lock.unlock();
-        }
-        if (data == null) {
-            data = referenceStore.getMessageReference(messageId);
-            if (data == null) {
-                return null;
-            }
-        }
-        Location location = new Location();
-        location.setDataFileId(data.getFileId());
-        location.setOffset(data.getOffset());
-        return location;
-    }
-
-    /**
-     * Replays the referenceStore first as those messages are the oldest ones, then messages are replayed from the
-     * transaction log and then the cache is updated.
-     * 
-     * @param listener
-     * @throws Exception
-     */
-    public void recover(final MessageRecoveryListener listener) throws Exception {
-        flush();
-        referenceStore.recover(new RecoveryListenerAdapter(this, listener));
-    }
-
-    public void start() throws Exception {
-        referenceStore.start();
-    }
-
-    public void stop() throws Exception {
-        flush();
-        asyncWriteTask.shutdown();
-        referenceStore.stop();
-    }
-
-    /**
-     * @return Returns the longTermStore.
-     */
-    public ReferenceStore getReferenceStore() {
-        return referenceStore;
-    }
-
-    /**
-     * @see org.apache.activemq.store.MessageStore#removeAllMessages(ConnectionContext)
-     */
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        flush();
-        referenceStore.removeAllMessages(context);
-    }
-
-    public void addMessageReference(ConnectionContext context, MessageId messageId, long expirationTime,
-            String messageRef) throws IOException {
-        throw new IOException("The journal does not support message references.");
-    }
-
-    public String getMessageReference(MessageId identity) throws IOException {
-        throw new IOException("The journal does not support message references.");
-    }
-
-    /**
-     * @return
-     * @throws IOException
-     * @see org.apache.activemq.store.MessageStore#getMessageCount()
-     */
-    public int getMessageCount() throws IOException {
-        flush();
-        return referenceStore.getMessageCount();
-    }
-
-    public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception {
-        RecoveryListenerAdapter recoveryListener = new RecoveryListenerAdapter(this, listener);
-        referenceStore.recoverNextMessages(maxReturned, recoveryListener);
-        if (recoveryListener.size() == 0 && recoveryListener.hasSpace()) {
-            flush();
-            referenceStore.recoverNextMessages(maxReturned, recoveryListener);
-        }
-    }
-
-    Message getMessage(ReferenceData data) throws IOException {
-        Location location = new Location();
-        location.setDataFileId(data.getFileId());
-        location.setOffset(data.getOffset());
-        DataStructure rc = peristenceAdapter.readCommand(location);
-        try {
-            return (Message) rc;
-        } catch (ClassCastException e) {
-            throw new IOException("Could not read message  at location " + location + ", expected a message, but got: "
-                    + rc);
-        }
-    }
-
-    public void resetBatching() {
-        referenceStore.resetBatching();
-    }
-
-    public Location getMark() {
-        return mark.get();
-    }
-
-    public void dispose(ConnectionContext context) {
-        try {
-            flush();
-        } catch (InterruptedIOException e) {
-            Thread.currentThread().interrupt();
-        }
-        referenceStore.dispose(context);
-        super.dispose(context);
-    }
-
-    public void setBatch(MessageId messageId) {
-        try {
-            flush();
-        } catch (InterruptedIOException e) {
-            LOG.debug("flush on setBatch resulted in exception", e);
-        }
-        getReferenceStore().setBatch(messageId);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
deleted file mode 100644
index fbecdb8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
+++ /dev/null
@@ -1,1129 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileLock;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.activeio.journal.Journal;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.kaha.impl.async.AsyncDataManager;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.kaha.impl.index.hash.HashIndex;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.ReferenceStore;
-import org.apache.activemq.store.ReferenceStoreAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TopicReferenceStore;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.usage.Usage;
-import org.apache.activemq.usage.UsageListener;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * An implementation of {@link PersistenceAdapter} designed for use with a
- * {@link Journal} and then check pointing asynchronously on a timeout with some
- * other long term persistent storage.
- * 
- * @org.apache.xbean.XBean element="amqPersistenceAdapter"
- * 
- */
-public class AMQPersistenceAdapter implements PersistenceAdapter, UsageListener, BrokerServiceAware {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQPersistenceAdapter.class);
-    private Scheduler scheduler;
-    private final ConcurrentHashMap<ActiveMQQueue, AMQMessageStore> queues = new ConcurrentHashMap<ActiveMQQueue, AMQMessageStore>();
-    private final ConcurrentHashMap<ActiveMQTopic, AMQTopicMessageStore> topics = new ConcurrentHashMap<ActiveMQTopic, AMQTopicMessageStore>();
-    private static final String PROPERTY_PREFIX = "org.apache.activemq.store.amq";
-    private static final boolean BROKEN_FILE_LOCK;
-    private static final boolean DISABLE_LOCKING;
-    private static final int JOURNAL_LOCKED_WAIT_DELAY = 10 * 1000;
-    private AsyncDataManager asyncDataManager;
-    private ReferenceStoreAdapter referenceStoreAdapter;
-    private TaskRunnerFactory taskRunnerFactory;
-    private WireFormat wireFormat = new OpenWireFormat();
-    private SystemUsage usageManager;
-    private long checkpointInterval = 1000 * 20;
-    private int maxCheckpointMessageAddSize = 1024 * 4;
-    private final AMQTransactionStore transactionStore = new AMQTransactionStore(this);
-    private TaskRunner checkpointTask;
-    private CountDownLatch nextCheckpointCountDownLatch = new CountDownLatch(1);
-    private final AtomicBoolean started = new AtomicBoolean(false);
-    private Runnable periodicCheckpointTask;
-    private Runnable periodicCleanupTask;
-    private boolean deleteAllMessages;
-    private boolean syncOnWrite;
-    private boolean syncOnTransaction=true;
-    private String brokerName = "";
-    private File directory;
-    private File directoryArchive;
-    private BrokerService brokerService;
-    private final AtomicLong storeSize = new AtomicLong();
-    private boolean persistentIndex=true;
-    private boolean useNio = true;
-    private boolean archiveDataLogs=false;
-    private long cleanupInterval = AsyncDataManager.DEFAULT_CLEANUP_INTERVAL;
-    private int maxFileLength = AsyncDataManager.DEFAULT_MAX_FILE_LENGTH;
-    private int indexBinSize = HashIndex.DEFAULT_BIN_SIZE;
-    private int indexKeySize = HashIndex.DEFAULT_KEY_SIZE;
-    private int indexPageSize = HashIndex.DEFAULT_PAGE_SIZE;
-    private int indexMaxBinSize = HashIndex.MAXIMUM_CAPACITY;
-    private int indexLoadFactor = HashIndex.DEFAULT_LOAD_FACTOR;
-    private int maxReferenceFileLength=AMQPersistenceAdapterFactory.DEFAULT_MAX_REFERNCE_FILE_LENGTH;
-    private final Map<AMQMessageStore,Map<Integer, AtomicInteger>> dataFilesInProgress = new ConcurrentHashMap<AMQMessageStore,Map<Integer, AtomicInteger>> ();
-    private RandomAccessFile lockFile;
-    private FileLock lock;
-    private boolean disableLocking = DISABLE_LOCKING;
-	private boolean failIfJournalIsLocked;
-    private boolean lockLogged;
-    private boolean lockAquired;
-    private boolean recoverReferenceStore=true;
-    private boolean forceRecoverReferenceStore=false;
-    private boolean useDedicatedTaskRunner=false;
-    private int journalThreadPriority = Thread.MAX_PRIORITY;
-
-    public String getBrokerName() {
-        return this.brokerName;
-    }
-
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-        if (this.referenceStoreAdapter != null) {
-            this.referenceStoreAdapter.setBrokerName(brokerName);
-        }
-    }
-
-    public BrokerService getBrokerService() {
-        return brokerService;
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerService = brokerService;
-    }
-
-    public synchronized void start() throws Exception {
-        if (!started.compareAndSet(false, true)) {
-            return;
-        }
-        if (this.directory == null) {
-            if (brokerService != null) {
-                this.directory = brokerService.getBrokerDataDirectory();
-               
-            } else {
-                this.directory = new File(IOHelper.getDefaultDataDirectory(), IOHelper.toFileSystemSafeName(brokerName));
-                this.directory = new File(directory, "amqstore");
-                directory.getAbsolutePath();
-            }
-        }
-        if (this.directoryArchive == null) {
-            this.directoryArchive = new File(this.directory,"archive");
-        }
-        if (this.brokerService != null) {
-            this.taskRunnerFactory = this.brokerService.getTaskRunnerFactory();
-            this.scheduler = this.brokerService.getScheduler();
-        } else {
-            this.taskRunnerFactory = new TaskRunnerFactory("AMQPersistenceAdaptor Task", getJournalThreadPriority(),
-                true, 1000, isUseDedicatedTaskRunner());
-            this.scheduler = new Scheduler("AMQPersistenceAdapter Scheduler");
-        }
-
-        IOHelper.mkdirs(this.directory);
-        lockFile = new RandomAccessFile(new File(directory, "lock"), "rw");
-        lock();
-        LOG.info("AMQStore starting using directory: " + directory); 
-        if (archiveDataLogs) {
-            IOHelper.mkdirs(this.directoryArchive);
-        }
-
-        if (this.usageManager != null) {
-            this.usageManager.getMemoryUsage().addUsageListener(this);
-        }
-        if (asyncDataManager == null) {
-            asyncDataManager = createAsyncDataManager();
-        }
-        if (referenceStoreAdapter == null) {
-            referenceStoreAdapter = createReferenceStoreAdapter();
-        }
-        referenceStoreAdapter.setDirectory(new File(directory, "kr-store"));
-        referenceStoreAdapter.setBrokerName(getBrokerName());
-        referenceStoreAdapter.setUsageManager(usageManager);
-        referenceStoreAdapter.setMaxDataFileLength(getMaxReferenceFileLength());
-        
-        if (failIfJournalIsLocked) {
-            asyncDataManager.lock();
-        } else {
-            while (true) {
-                try {
-                    asyncDataManager.lock();
-                    break;
-                } catch (IOException e) {
-                    LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000) + " seconds for the journal to be unlocked.", e);
-                    try {
-                        Thread.sleep(JOURNAL_LOCKED_WAIT_DELAY);
-                    } catch (InterruptedException e1) {
-                    }
-                }
-            }
-        }
-        
-        asyncDataManager.start();
-        if (deleteAllMessages) {
-            asyncDataManager.delete();
-            try {
-                JournalTrace trace = new JournalTrace();
-                trace.setMessage("DELETED " + new Date());
-                Location location = asyncDataManager.write(wireFormat.marshal(trace), false);
-                asyncDataManager.setMark(location, true);
-                LOG.info("Journal deleted: ");
-                deleteAllMessages = false;
-            } catch (IOException e) {
-                throw e;
-            } catch (Throwable e) {
-                throw IOExceptionSupport.create(e);
-            }
-            referenceStoreAdapter.deleteAllMessages();
-        }
-        referenceStoreAdapter.start();
-        Set<Integer> files = referenceStoreAdapter.getReferenceFileIdsInUse();
-        LOG.info("Active data files: " + files);
-        checkpointTask = taskRunnerFactory.createTaskRunner(new Task() {
-
-            public boolean iterate() {
-                doCheckpoint();
-                return false;
-            }
-        }, "ActiveMQ Journal Checkpoint Worker");
-        createTransactionStore();
-
-        //
-        // The following was attempting to reduce startup times by avoiding the
-        // log
-        // file scanning that recovery performs. The problem with it is that XA
-        // transactions
-        // only live in transaction log and are not stored in the reference
-        // store, but they still
-        // need to be recovered when the broker starts up.
-
-        if (isForceRecoverReferenceStore()
-                || (isRecoverReferenceStore() && !referenceStoreAdapter
-                        .isStoreValid())) {
-            LOG.warn("The ReferenceStore is not valid - recovering ...");
-            recover();
-            LOG.info("Finished recovering the ReferenceStore");
-        } else {
-            Location location = writeTraceMessage("RECOVERED " + new Date(),
-                    true);
-            asyncDataManager.setMark(location, true);
-            // recover transactions
-            getTransactionStore().setPreparedTransactions(
-                    referenceStoreAdapter.retrievePreparedState());
-        }
-
-        // Do a checkpoint periodically.
-        periodicCheckpointTask = new Runnable() {
-
-            public void run() {
-                checkpoint(false);
-            }
-        };
-        scheduler.executePeriodically(periodicCheckpointTask, getCheckpointInterval());
-        periodicCleanupTask = new Runnable() {
-
-            public void run() {
-                cleanup();
-            }
-        };
-        scheduler.executePeriodically(periodicCleanupTask, getCleanupInterval());
-        
-        if (lockAquired && lockLogged) {
-            LOG.info("Aquired lock for AMQ Store" + getDirectory());
-            if (brokerService != null) {
-                brokerService.getBroker().nowMasterBroker();
-            }
-        }
-
-    }
-
-    public void stop() throws Exception {
-
-        if (!started.compareAndSet(true, false)) {
-            return;
-        }
-        unlock();
-        if (lockFile != null) {
-            lockFile.close();
-            lockFile = null;
-        }
-        this.usageManager.getMemoryUsage().removeUsageListener(this);
-        synchronized (this) {
-            scheduler.cancel(periodicCheckpointTask);
-            scheduler.cancel(periodicCleanupTask);
-        }
-        Iterator<AMQMessageStore> queueIterator = queues.values().iterator();
-        while (queueIterator.hasNext()) {
-            AMQMessageStore ms = queueIterator.next();
-            ms.stop();
-        }
-        Iterator<AMQTopicMessageStore> topicIterator = topics.values().iterator();
-        while (topicIterator.hasNext()) {
-            final AMQTopicMessageStore ms = topicIterator.next();
-            ms.stop();
-        }
-        // Take one final checkpoint and stop checkpoint processing.
-        checkpoint(true);
-        synchronized (this) {
-            checkpointTask.shutdown();
-        }
-        referenceStoreAdapter.savePreparedState(getTransactionStore().getPreparedTransactions());
-        queues.clear();
-        topics.clear();
-        IOException firstException = null;
-        referenceStoreAdapter.stop();
-        referenceStoreAdapter = null;
-
-        if (this.brokerService == null) {
-            this.taskRunnerFactory.shutdown();
-            this.scheduler.stop();
-        }
-        try {
-            LOG.debug("Journal close");
-            asyncDataManager.close();
-        } catch (Exception e) {
-            firstException = IOExceptionSupport.create("Failed to close journals: " + e, e);
-        }
-        if (firstException != null) {
-            throw firstException;
-        }
-    }
-
-    /**
-     * When we checkpoint we move all the journalled data to long term storage.
-     * 
-     * @param sync
-     */
-    public void checkpoint(boolean sync) {
-        try {
-            if (asyncDataManager == null) {
-                throw new IllegalStateException("Journal is closed.");
-            }
-            CountDownLatch latch = null;
-            synchronized (this) {
-                latch = nextCheckpointCountDownLatch;
-                checkpointTask.wakeup();
-            }
-            if (sync) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Waitng for checkpoint to complete.");
-                }
-                latch.await();
-            }
-            referenceStoreAdapter.checkpoint(sync);
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            LOG.warn("Request to start checkpoint failed: " + e, e);
-        } catch (IOException e) {
-            LOG.error("checkpoint failed: " + e, e);
-        }
-    }
-
-    /**
-     * This does the actual checkpoint.
-     * 
-     * @return true if successful
-     */
-    public boolean doCheckpoint() {
-        CountDownLatch latch = null;
-        synchronized (this) {
-            latch = nextCheckpointCountDownLatch;
-            nextCheckpointCountDownLatch = new CountDownLatch(1);
-        }
-        try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Checkpoint started.");
-            }
-
-            Location currentMark = asyncDataManager.getMark();
-            Location newMark = currentMark;
-            Iterator<AMQMessageStore> queueIterator = queues.values().iterator();
-            while (queueIterator.hasNext()) {
-                final AMQMessageStore ms = queueIterator.next();
-                Location mark = ms.getMark();
-                if (mark != null && (newMark == null || mark.compareTo(newMark) > 0)) {
-                    newMark = mark;
-                }
-            }
-            Iterator<AMQTopicMessageStore> topicIterator = topics.values().iterator();
-            while (topicIterator.hasNext()) {
-                final AMQTopicMessageStore ms = topicIterator.next();
-                Location mark = ms.getMark();
-                if (mark != null && (newMark == null || mark.compareTo(newMark) > 0)) {
-                    newMark = mark;
-                }
-            }
-            try {
-                if (newMark != currentMark) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Marking journal at: " + newMark);
-                    }
-                    asyncDataManager.setMark(newMark, false);
-                    writeTraceMessage("CHECKPOINT " + new Date(), true);
-                }
-            } catch (Exception e) {
-                LOG.error("Failed to mark the Journal: " + e, e);
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Checkpoint done.");
-            }
-        } finally {
-            latch.countDown();
-        }
-        return true;
-    }
-
-    /**
-     * Cleans up the data files
-     * @throws IOException
-     */
-    public void cleanup() {
-        try {
-            Set<Integer>inProgress = new HashSet<Integer>();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("dataFilesInProgress.values: (" + dataFilesInProgress.values().size() + ") " + dataFilesInProgress.values());
-            }      
-            for (Map<Integer, AtomicInteger> set: dataFilesInProgress.values()) {
-                inProgress.addAll(set.keySet());
-            }
-            Integer lastDataFile = asyncDataManager.getCurrentDataFileId();   
-            inProgress.add(lastDataFile);
-            lastDataFile = asyncDataManager.getMark().getDataFileId();
-            inProgress.addAll(referenceStoreAdapter.getReferenceFileIdsInUse());
-            Location lastActiveTx = transactionStore.checkpoint();
-            if (lastActiveTx != null) {
-                lastDataFile = Math.min(lastDataFile, lastActiveTx.getDataFileId());
-            }
-            LOG.debug("lastDataFile: " + lastDataFile);
-            asyncDataManager.consolidateDataFilesNotIn(inProgress, lastDataFile - 1);
-        } catch (IOException e) {
-            LOG.error("Could not cleanup data files: " + e, e);
-        }
-    }
-
-    public Set<ActiveMQDestination> getDestinations() {
-        Set<ActiveMQDestination> destinations = new HashSet<ActiveMQDestination>(referenceStoreAdapter.getDestinations());
-        destinations.addAll(queues.keySet());
-        destinations.addAll(topics.keySet());
-        return destinations;
-    }
-
-    MessageStore createMessageStore(ActiveMQDestination destination) throws IOException {
-        if (destination.isQueue()) {
-            return createQueueMessageStore((ActiveMQQueue)destination);
-        } else {
-            return createTopicMessageStore((ActiveMQTopic)destination);
-        }
-    }
-
-    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        AMQMessageStore store = queues.get(destination);
-        if (store == null) {
-            ReferenceStore checkpointStore = referenceStoreAdapter.createQueueReferenceStore(destination);
-            store = new AMQMessageStore(this, checkpointStore, destination);
-            try {
-                store.start();
-            } catch (Exception e) {
-                throw IOExceptionSupport.create(e);
-            }
-            queues.put(destination, store);
-        }
-        return store;
-    }
-
-    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException {
-        AMQTopicMessageStore store = topics.get(destinationName);
-        if (store == null) {
-            TopicReferenceStore checkpointStore = referenceStoreAdapter.createTopicReferenceStore(destinationName);
-            store = new AMQTopicMessageStore(this,checkpointStore, destinationName);
-            try {
-                store.start();
-            } catch (Exception e) {
-                throw IOExceptionSupport.create(e);
-            }
-            topics.put(destinationName, store);
-        }
-        return store;
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-        AMQMessageStore store= queues.remove(destination);
-        referenceStoreAdapter.removeQueueMessageStore(destination);
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-        topics.remove(destination);
-    }
-
-    public TransactionStore createTransactionStore() throws IOException {
-        return transactionStore;
-    }
-
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return referenceStoreAdapter.getLastMessageBrokerSequenceId();
-    }
-
-    public void beginTransaction(ConnectionContext context) throws IOException {
-        referenceStoreAdapter.beginTransaction(context);
-    }
-
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        referenceStoreAdapter.commitTransaction(context);
-    }
-
-    public void rollbackTransaction(ConnectionContext context) throws IOException {
-        referenceStoreAdapter.rollbackTransaction(context);
-    }
-    
-    public boolean isPersistentIndex() {
-		return persistentIndex;
-	}
-
-	public void setPersistentIndex(boolean persistentIndex) {
-		this.persistentIndex = persistentIndex;
-	}
-
-    /**
-     * @param location
-     * @return
-     * @throws IOException
-     */
-    public DataStructure readCommand(Location location) throws IOException {
-        try {
-            ByteSequence packet = asyncDataManager.read(location);
-            return (DataStructure)wireFormat.unmarshal(packet);
-        } catch (IOException e) {
-            throw createReadException(location, e);
-        }
-    }
-
-    /**
-     * Move all the messages that were in the journal into long term storage. We
-     * just replay and do a checkpoint.
-     * 
-     * @throws IOException
-     * @throws IOException
-     * @throws IllegalStateException
-     */
-    private void recover() throws IllegalStateException, IOException {
-        referenceStoreAdapter.clearMessages();
-        Location pos = null;
-        int redoCounter = 0;
-        LOG.info("Journal Recovery Started from: " + asyncDataManager);
-        long start = System.currentTimeMillis();
-        ConnectionContext context = new ConnectionContext(new NonCachedMessageEvaluationContext());
-        // While we have records in the journal.
-        while ((pos = asyncDataManager.getNextLocation(pos)) != null) {
-            ByteSequence data = asyncDataManager.read(pos);
-            DataStructure c = (DataStructure)wireFormat.unmarshal(data);
-            if (c instanceof Message) {
-                Message message = (Message)c;
-                AMQMessageStore store = (AMQMessageStore)createMessageStore(message.getDestination());
-                if (message.isInTransaction()) {
-                    transactionStore.addMessage(store, message, pos);
-                } else {
-                    if (store.replayAddMessage(context, message, pos)) {
-                        redoCounter++;
-                    }
-                }
-            } else {
-                switch (c.getDataStructureType()) {
-                case SubscriptionInfo.DATA_STRUCTURE_TYPE: {
-                    referenceStoreAdapter.recoverSubscription((SubscriptionInfo)c);
-                }
-                    break;
-                case JournalQueueAck.DATA_STRUCTURE_TYPE: {
-                    JournalQueueAck command = (JournalQueueAck)c;
-                    AMQMessageStore store = (AMQMessageStore)createMessageStore(command.getDestination());
-                    if (command.getMessageAck().isInTransaction()) {
-                        transactionStore.removeMessage(store, command.getMessageAck(), pos);
-                    } else {
-                        if (store.replayRemoveMessage(context, command.getMessageAck())) {
-                            redoCounter++;
-                        }
-                    }
-                }
-                    break;
-                case JournalTopicAck.DATA_STRUCTURE_TYPE: {
-                    JournalTopicAck command = (JournalTopicAck)c;
-                    AMQTopicMessageStore store = (AMQTopicMessageStore)createMessageStore(command.getDestination());
-                    if (command.getTransactionId() != null) {
-                        transactionStore.acknowledge(store, command, pos);
-                    } else {
-                        if (store.replayAcknowledge(context, command.getClientId(), command.getSubscritionName(), command.getMessageId())) {
-                            redoCounter++;
-                        }
-                    }
-                }
-                    break;
-                case JournalTransaction.DATA_STRUCTURE_TYPE: {
-                    JournalTransaction command = (JournalTransaction)c;
-                    try {
-                        // Try to replay the packet.
-                        switch (command.getType()) {
-                        case JournalTransaction.XA_PREPARE:
-                            transactionStore.replayPrepare(command.getTransactionId());
-                            break;
-                        case JournalTransaction.XA_COMMIT:
-                        case JournalTransaction.LOCAL_COMMIT:
-                            AMQTx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
-                            if (tx == null) {
-                                break; // We may be trying to replay a commit
-                            }
-                            // that
-                            // was already committed.
-                            // Replay the committed operations.
-                            tx.getOperations();
-                            for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
-                                AMQTxOperation op = (AMQTxOperation)iter.next();
-                                if (op.replay(this, context)) {
-                                    redoCounter++;
-                                }
-                            }
-                            break;
-                        case JournalTransaction.LOCAL_ROLLBACK:
-                        case JournalTransaction.XA_ROLLBACK:
-                            transactionStore.replayRollback(command.getTransactionId());
-                            break;
-                        default:
-                            throw new IOException("Invalid journal command type: " + command.getType());
-                        }
-                    } catch (IOException e) {
-                        LOG.error("Recovery Failure: Could not replay: " + c + ", reason: " + e, e);
-                    }
-                }
-                    break;
-                case JournalTrace.DATA_STRUCTURE_TYPE:
-                    JournalTrace trace = (JournalTrace)c;
-                    LOG.debug("TRACE Entry: " + trace.getMessage());
-                    break;
-                default:
-                    LOG.error("Unknown type of record in transaction log which will be discarded: " + c);
-                }
-            }
-        }
-        Location location = writeTraceMessage("RECOVERED " + new Date(), true);
-        asyncDataManager.setMark(location, true);
-        long end = System.currentTimeMillis();
-        LOG.info("Recovered " + redoCounter + " operations from redo log in " + ((end - start) / 1000.0f) + " seconds.");
-    }
-
-    private IOException createReadException(Location location, Exception e) {
-        return IOExceptionSupport.create("Failed to read to journal for: " + location + ". Reason: " + e, e);
-    }
-
-    protected IOException createWriteException(DataStructure packet, Exception e) {
-        return IOExceptionSupport.create("Failed to write to journal for: " + packet + ". Reason: " + e, e);
-    }
-
-    protected IOException createWriteException(String command, Exception e) {
-        return IOExceptionSupport.create("Failed to write to journal for command: " + command + ". Reason: " + e, e);
-    }
-
-    protected IOException createRecoveryFailedException(Exception e) {
-        return IOExceptionSupport.create("Failed to recover from journal. Reason: " + e, e);
-    }
-
-    /**
-     * @param command
-     * @param syncHint
-     * @return
-     * @throws IOException
-     */
-    public Location writeCommand(DataStructure command, boolean syncHint) throws IOException {
-        return writeCommand(command, syncHint,false);
-    }
-    
-    public Location writeCommand(DataStructure command, boolean syncHint,boolean forceSync) throws IOException {
-    	try {
-    		return asyncDataManager.write(wireFormat.marshal(command), (forceSync||(syncHint && syncOnWrite)));
-    	} catch (IOException ioe) {
-    		LOG.error("Failed to write command: " + command + ". Reason: " + ioe, ioe);
-        	brokerService.handleIOException(ioe);
-        	throw ioe;
-        }
-    }
-
-    private Location writeTraceMessage(String message, boolean sync) throws IOException {
-        JournalTrace trace = new JournalTrace();
-        trace.setMessage(message);
-        return writeCommand(trace, sync);
-    }
-
-    public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
-        newPercentUsage = (newPercentUsage / 10) * 10;
-        oldPercentUsage = (oldPercentUsage / 10) * 10;
-        if (newPercentUsage >= 70 && oldPercentUsage < newPercentUsage) {
-            checkpoint(false);
-        }
-    }
-
-    public AMQTransactionStore getTransactionStore() {
-        return transactionStore;
-    }
-
-    public synchronized void deleteAllMessages() throws IOException {
-        deleteAllMessages = true;
-    }
-
-    @Override
-    public String toString() {
-        return "AMQPersistenceAdapter(" + directory + ")";
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Subclass overridables
-    // /////////////////////////////////////////////////////////////////
-    protected AsyncDataManager createAsyncDataManager() {
-        AsyncDataManager manager = new AsyncDataManager(storeSize);
-        manager.setDirectory(new File(directory, "journal"));
-        manager.setDirectoryArchive(getDirectoryArchive());
-        manager.setArchiveDataLogs(isArchiveDataLogs());
-        manager.setMaxFileLength(maxFileLength);
-        manager.setUseNio(useNio);    
-        return manager;
-    }
-
-    protected KahaReferenceStoreAdapter createReferenceStoreAdapter() throws IOException {
-        KahaReferenceStoreAdapter adaptor = new KahaReferenceStoreAdapter(storeSize);
-        adaptor.setPersistentIndex(isPersistentIndex());
-        adaptor.setIndexBinSize(getIndexBinSize());
-        adaptor.setIndexKeySize(getIndexKeySize());
-        adaptor.setIndexPageSize(getIndexPageSize());
-        adaptor.setIndexMaxBinSize(getIndexMaxBinSize());
-        adaptor.setIndexLoadFactor(getIndexLoadFactor());
-        return adaptor;
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Property Accessors
-    // /////////////////////////////////////////////////////////////////
-    public AsyncDataManager getAsyncDataManager() {
-        return asyncDataManager;
-    }
-
-    public void setAsyncDataManager(AsyncDataManager asyncDataManager) {
-        this.asyncDataManager = asyncDataManager;
-    }
-
-    public ReferenceStoreAdapter getReferenceStoreAdapter() {
-        return referenceStoreAdapter;
-    }
-
-    public TaskRunnerFactory getTaskRunnerFactory() {
-        return taskRunnerFactory;
-    }
-
-    public void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory) {
-        this.taskRunnerFactory = taskRunnerFactory;
-    }
-
-    /**
-     * @return Returns the wireFormat.
-     */
-    public WireFormat getWireFormat() {
-        return wireFormat;
-    }
-
-    public void setWireFormat(WireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-    }
-
-    public SystemUsage getUsageManager() {
-        return usageManager;
-    }
-
-    public void setUsageManager(SystemUsage usageManager) {
-        this.usageManager = usageManager;
-    }
-
-    public int getMaxCheckpointMessageAddSize() {
-        return maxCheckpointMessageAddSize;
-    }
-
-    /** 
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
-     */
-    public void setMaxCheckpointMessageAddSize(int maxCheckpointMessageAddSize) {
-        this.maxCheckpointMessageAddSize = maxCheckpointMessageAddSize;
-    }
-
-   
-    public synchronized File getDirectory() {
-        return directory;
-    }
-
-    public synchronized void setDirectory(File directory) {
-        this.directory = directory;
-    }
-
-    public boolean isSyncOnWrite() {
-        return this.syncOnWrite;
-    }
-
-    public void setSyncOnWrite(boolean syncOnWrite) {
-        this.syncOnWrite = syncOnWrite;
-    }
-    
-    public boolean isSyncOnTransaction() {
-        return syncOnTransaction;
-    }
-
-    public void setSyncOnTransaction(boolean syncOnTransaction) {
-        this.syncOnTransaction = syncOnTransaction;
-    }
-
-    /**
-     * @param referenceStoreAdapter the referenceStoreAdapter to set
-     */
-    public void setReferenceStoreAdapter(ReferenceStoreAdapter referenceStoreAdapter) {
-        this.referenceStoreAdapter = referenceStoreAdapter;
-    }
-    
-    public long size(){
-        return storeSize.get();
-    }
-
-	public boolean isUseNio() {
-		return useNio;
-	}
-
-	public void setUseNio(boolean useNio) {
-		this.useNio = useNio;
-	}
-
-	public int getMaxFileLength() {
-		return maxFileLength;
-	}
-
-	 /**
-      * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-      */
-	public void setMaxFileLength(int maxFileLength) {
-		this.maxFileLength = maxFileLength;
-	}
-	
-	public long getCleanupInterval() {
-        return cleanupInterval;
-    }
-
-    public void setCleanupInterval(long cleanupInterval) {
-        this.cleanupInterval = cleanupInterval;
-    }
-
-    public long getCheckpointInterval() {
-        return checkpointInterval;
-    }
-
-    public void setCheckpointInterval(long checkpointInterval) {
-        this.checkpointInterval = checkpointInterval;
-    }
-    
-    public int getIndexBinSize() {
-        return indexBinSize;
-    }
-
-    public void setIndexBinSize(int indexBinSize) {
-        this.indexBinSize = indexBinSize;
-    }
-
-    public int getIndexKeySize() {
-        return indexKeySize;
-    }
-
-    public void setIndexKeySize(int indexKeySize) {
-        this.indexKeySize = indexKeySize;
-    }
-
-    public int getIndexPageSize() {
-        return indexPageSize;
-    }
-    
-    public int getIndexMaxBinSize() {
-        return indexMaxBinSize;
-    }
-
-    public void setIndexMaxBinSize(int maxBinSize) {
-        this.indexMaxBinSize = maxBinSize;
-    }
-
-    /**
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     */
-    public void setIndexPageSize(int indexPageSize) {
-        this.indexPageSize = indexPageSize;
-    }
-    
-    public void setIndexLoadFactor(int factor){
-    	this.indexLoadFactor=factor;    
-    }
-    
-    public int getIndexLoadFactor(){
-    	return this.indexLoadFactor;
-    }
-    
-    public int getMaxReferenceFileLength() {
-        return maxReferenceFileLength;
-    }
-
-    /**
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     */
-    public void setMaxReferenceFileLength(int maxReferenceFileLength) {
-        this.maxReferenceFileLength = maxReferenceFileLength;
-    }
-    
-    public File getDirectoryArchive() {
-        return directoryArchive;
-    }
-
-    public void setDirectoryArchive(File directoryArchive) {
-        this.directoryArchive = directoryArchive;
-    }
-
-    public boolean isArchiveDataLogs() {
-        return archiveDataLogs;
-    }
-
-    public void setArchiveDataLogs(boolean archiveDataLogs) {
-        this.archiveDataLogs = archiveDataLogs;
-    }  
-    
-    public boolean isDisableLocking() {
-        return disableLocking;
-    }
-
-    public void setDisableLocking(boolean disableLocking) {
-        this.disableLocking = disableLocking;
-    }
-    
-    /**
-     * @return the recoverReferenceStore
-     */
-    public boolean isRecoverReferenceStore() {
-        return recoverReferenceStore;
-    }
-
-    /**
-     * @param recoverReferenceStore the recoverReferenceStore to set
-     */
-    public void setRecoverReferenceStore(boolean recoverReferenceStore) {
-        this.recoverReferenceStore = recoverReferenceStore;
-    }
-
-    /**
-     * @return the forceRecoverReferenceStore
-     */
-    public boolean isForceRecoverReferenceStore() {
-        return forceRecoverReferenceStore;
-    }
-
-    /**
-     * @param forceRecoverReferenceStore the forceRecoverReferenceStore to set
-     */
-    public void setForceRecoverReferenceStore(boolean forceRecoverReferenceStore) {
-        this.forceRecoverReferenceStore = forceRecoverReferenceStore;
-    }
-    
-    public boolean isUseDedicatedTaskRunner() {
-        return useDedicatedTaskRunner;
-    }
-    
-    public void setUseDedicatedTaskRunner(boolean useDedicatedTaskRunner) {
-        this.useDedicatedTaskRunner = useDedicatedTaskRunner;
-    }
-    
-    /**
-     * @return the journalThreadPriority
-     */
-    public int getJournalThreadPriority() {
-        return this.journalThreadPriority;
-    }
-
-    /**
-     * @param journalThreadPriority the journalThreadPriority to set
-     */
-    public void setJournalThreadPriority(int journalThreadPriority) {
-        this.journalThreadPriority = journalThreadPriority;
-    }
-
-	
-	protected void addInProgressDataFile(AMQMessageStore store,int dataFileId) {
-	    Map<Integer, AtomicInteger> map = dataFilesInProgress.get(store);
-	    if (map == null) {
-	        map = new ConcurrentHashMap<Integer, AtomicInteger>();
-	        dataFilesInProgress.put(store, map);
-	    }
-	    AtomicInteger count = map.get(dataFileId);
-	    if (count == null) {
-	        count = new AtomicInteger(0);
-	        map.put(dataFileId, count);
-	    }
-	    count.incrementAndGet();
-	}
-	
-	protected void removeInProgressDataFile(AMQMessageStore store,int dataFileId) {
-        Map<Integer, AtomicInteger> map = dataFilesInProgress.get(store);
-        if (map != null) {
-            AtomicInteger count = map.get(dataFileId);
-            if (count != null) {
-                int newCount = count.decrementAndGet(); 
-                if (newCount <=0) {
-                    map.remove(dataFileId);
-                }
-            }
-            if (map.isEmpty()) {
-                dataFilesInProgress.remove(store);
-            }
-        }
-    }
-	
-	
-	protected void lock() throws Exception {
-        lockLogged = false;
-        lockAquired = false;
-        do {
-            if (doLock()) {
-                lockAquired = true;
-            } else {
-                if (!lockLogged) {
-                    LOG.warn("Waiting to Lock the Store " + getDirectory());
-                    lockLogged = true;
-                }
-                Thread.sleep(1000);
-            }
-
-        } while (!lockAquired && !disableLocking);
-    }
-	
-	private synchronized void unlock() throws IOException {
-        if (!disableLocking && (null != lock)) {
-            //clear property doesn't work on some platforms
-            System.getProperties().remove(getPropertyKey());
-            System.clearProperty(getPropertyKey());
-            assert(System.getProperty(getPropertyKey())==null);
-            if (lock.isValid()) {
-                lock.release();
-                lock.channel().close();
-                
-            }
-            lock = null;
-        }
-    }
-
-	
-	protected boolean doLock() throws IOException {
-	    boolean result = true;
-	    if (!disableLocking && directory != null && lock == null) {
-            String key = getPropertyKey();
-            String property = System.getProperty(key);
-            if (null == property) {
-                if (!BROKEN_FILE_LOCK) {
-                    lock = lockFile.getChannel().tryLock(0, lockFile.getChannel().size(), false);
-                    if (lock == null) {
-                        result = false;
-                    } else {
-                        System.setProperty(key, new Date().toString());
-                    }
-                }
-            } else { // already locked
-                result = false;
-            }
-        }
-	    return result;
-	}
-	
-	private String getPropertyKey() throws IOException {
-        return getClass().getName() + ".lock." + directory.getCanonicalPath();
-    }
-	
-	static {
-	    BROKEN_FILE_LOCK = "true".equals(System.getProperty(PROPERTY_PREFIX
-	            + ".FileLockBroken",
-	            "false"));
-	    DISABLE_LOCKING = "true".equals(System.getProperty(PROPERTY_PREFIX
-	           + ".DisableLocking",
-	           "false"));
-	}
-
-	
-    public long getLastProducerSequenceId(ProducerId id) {
-        // reference store send has adequate duplicate suppression
-        return -1;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java
deleted file mode 100644
index 53e439d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.File;
-import org.apache.activemq.kaha.impl.async.AsyncDataManager;
-import org.apache.activemq.kaha.impl.index.hash.HashIndex;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.PersistenceAdapterFactory;
-import org.apache.activemq.store.ReferenceStoreAdapter;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.util.IOHelper;
-
-/**
- * An implementation of {@link PersistenceAdapterFactory}
- * 
- * @org.apache.xbean.XBean element="amqPersistenceAdapterFactory"
- * 
- * 
- */
-public class AMQPersistenceAdapterFactory implements PersistenceAdapterFactory {
-    static final int DEFAULT_MAX_REFERNCE_FILE_LENGTH=2*1024*1024;
-    private File dataDirectory;
-    private int journalThreadPriority = Thread.MAX_PRIORITY;
-    private String brokerName = "localhost";
-    private ReferenceStoreAdapter referenceStoreAdapter;
-    private boolean syncOnWrite;
-    private boolean syncOnTransaction=true;
-    private boolean persistentIndex=true;
-    private boolean useNio = true;
-    private int maxFileLength = AsyncDataManager.DEFAULT_MAX_FILE_LENGTH;
-    private long cleanupInterval = AsyncDataManager.DEFAULT_CLEANUP_INTERVAL;
-    private int indexBinSize = HashIndex.DEFAULT_BIN_SIZE;
-    private int indexKeySize = HashIndex.DEFAULT_KEY_SIZE;
-    private int indexPageSize = HashIndex.DEFAULT_PAGE_SIZE;
-    private int indexMaxBinSize = HashIndex.MAXIMUM_CAPACITY;
-    private int indexLoadFactor = HashIndex.DEFAULT_LOAD_FACTOR;
-    private int maxReferenceFileLength=DEFAULT_MAX_REFERNCE_FILE_LENGTH;
-    private boolean recoverReferenceStore=true;
-    private boolean forceRecoverReferenceStore=false;
-    private long checkpointInterval = 1000 * 20;
-    private boolean useDedicatedTaskRunner;
-    private TaskRunnerFactory taskRunnerFactory;
-
-
-    /**
-     * @return a AMQPersistenceAdapter
-     * @see org.apache.activemq.store.PersistenceAdapterFactory#createPersistenceAdapter()
-     */
-    public PersistenceAdapter createPersistenceAdapter() {
-        AMQPersistenceAdapter result = new AMQPersistenceAdapter();
-        result.setDirectory(getDataDirectory());
-        result.setTaskRunnerFactory(getTaskRunnerFactory());
-        result.setBrokerName(getBrokerName());
-        result.setSyncOnWrite(isSyncOnWrite());
-        result.setPersistentIndex(isPersistentIndex());
-        result.setReferenceStoreAdapter(getReferenceStoreAdapter());
-        result.setUseNio(isUseNio());
-        result.setMaxFileLength(getMaxFileLength());
-        result.setCleanupInterval(getCleanupInterval());
-        result.setCheckpointInterval(getCheckpointInterval());
-        result.setIndexBinSize(getIndexBinSize());
-        result.setIndexKeySize(getIndexKeySize());
-        result.setIndexPageSize(getIndexPageSize());
-        result.setIndexMaxBinSize(getIndexMaxBinSize());
-        result.setIndexLoadFactor(getIndexLoadFactor());
-        result.setMaxReferenceFileLength(getMaxReferenceFileLength());
-        result.setForceRecoverReferenceStore(isForceRecoverReferenceStore());
-        result.setRecoverReferenceStore(isRecoverReferenceStore());
-        result.setUseDedicatedTaskRunner(isUseDedicatedTaskRunner());
-        result.setJournalThreadPriority(getJournalThreadPriority());
-        return result;
-    }
-
-    public long getCleanupInterval() {
-        return cleanupInterval;
-    }
-    
-    public void setCleanupInterval(long val) {
-        cleanupInterval = val;
-    }
-
-    /**
-     * @return the dataDirectory
-     */
-    public File getDataDirectory() {
-        if (this.dataDirectory == null) {
-            this.dataDirectory = new File(IOHelper.getDefaultDataDirectory(), IOHelper.toFileSystemSafeName(brokerName));
-        }
-        return this.dataDirectory;
-    }
-
-    /**
-     * @param dataDirectory the dataDirectory to set
-     */
-    public void setDataDirectory(File dataDirectory) {
-        this.dataDirectory = dataDirectory;
-    }
-
-    public boolean isUseDedicatedTaskRunner() {
-        return useDedicatedTaskRunner;
-    }
-    
-    public void setUseDedicatedTaskRunner(boolean useDedicatedTaskRunner) {
-        this.useDedicatedTaskRunner = useDedicatedTaskRunner;
-    }
-    
-    /**
-     * @return the taskRunnerFactory
-     */
-    public TaskRunnerFactory getTaskRunnerFactory() {
-        return taskRunnerFactory;
-    }
-
-    /**
-     * @param taskRunnerFactory the taskRunnerFactory to set
-     */
-    public void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory) {
-        this.taskRunnerFactory = taskRunnerFactory;
-    }
-
-    /**
-     * @return the journalThreadPriority
-     */
-    public int getJournalThreadPriority() {
-        return this.journalThreadPriority;
-    }
-
-    /**
-     * @param journalThreadPriority the journalThreadPriority to set
-     */
-    public void setJournalThreadPriority(int journalThreadPriority) {
-        this.journalThreadPriority = journalThreadPriority;
-    }
-
-    /**
-     * @return the brokerName
-     */
-    public String getBrokerName() {
-        return this.brokerName;
-    }
-
-    /**
-     * @param brokerName the brokerName to set
-     */
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-    }
-
-    /**
-     * @return the referenceStoreAdapter
-     */
-    public ReferenceStoreAdapter getReferenceStoreAdapter() {
-        return this.referenceStoreAdapter;
-    }
-
-    /**
-     * @param referenceStoreAdapter the referenceStoreAdapter to set
-     */
-    public void setReferenceStoreAdapter(ReferenceStoreAdapter referenceStoreAdapter) {
-        this.referenceStoreAdapter = referenceStoreAdapter;
-    }
-    
-    public boolean isPersistentIndex() {
-		return persistentIndex;
-	}
-
-	public void setPersistentIndex(boolean persistentIndex) {
-		this.persistentIndex = persistentIndex;
-	}
-
-	public boolean isSyncOnWrite() {
-		return syncOnWrite;
-	}
-
-	public void setSyncOnWrite(boolean syncOnWrite) {
-		this.syncOnWrite = syncOnWrite;
-	}
-	
-	public boolean isSyncOnTransaction() {
-        return syncOnTransaction;
-    }
-
-    public void setSyncOnTransaction(boolean syncOnTransaction) {
-        this.syncOnTransaction = syncOnTransaction;
-    }
-
-	public boolean isUseNio() {
-		return useNio;
-	}
-
-	public void setUseNio(boolean useNio) {
-		this.useNio = useNio;
-	}
-
-	public int getMaxFileLength() {
-		return maxFileLength;
-	}
-
-	public void setMaxFileLength(int maxFileLength) {
-		this.maxFileLength = maxFileLength;
-	}
-
-    /**
-     * @return the indexBinSize
-     */
-    public int getIndexBinSize() {
-        return indexBinSize;
-    }
-
-    /**
-     * @param indexBinSize the indexBinSize to set
-     */
-    public void setIndexBinSize(int indexBinSize) {
-        this.indexBinSize = indexBinSize;
-    }
-
-    /**
-     * @return the indexKeySize
-     */
-    public int getIndexKeySize() {
-        return indexKeySize;
-    }
-
-    /**
-     * @param indexKeySize the indexKeySize to set
-     */
-    public void setIndexKeySize(int indexKeySize) {
-        this.indexKeySize = indexKeySize;
-    }
-
-    /**
-     * @return the indexPageSize
-     */
-    public int getIndexPageSize() {
-        return indexPageSize;
-    }
-
-    /**
-     * @param indexPageSize the indexPageSize to set
-     */
-    public void setIndexPageSize(int indexPageSize) {
-        this.indexPageSize = indexPageSize;
-    }
-
-    /**
-     * @return the indexMaxBinSize
-     */
-    public int getIndexMaxBinSize() {
-        return indexMaxBinSize;
-    }
-
-    /**
-     * @param indexMaxBinSize the indexMaxBinSize to set
-     */
-    public void setIndexMaxBinSize(int indexMaxBinSize) {
-        this.indexMaxBinSize = indexMaxBinSize;
-    }
-
-    /**
-     * @return the indexLoadFactor
-     */
-    public int getIndexLoadFactor() {
-        return indexLoadFactor;
-    }
-
-    /**
-     * @param indexLoadFactor the indexLoadFactor to set
-     */
-    public void setIndexLoadFactor(int indexLoadFactor) {
-        this.indexLoadFactor = indexLoadFactor;
-    }
-
-    /**
-     * @return the maxReferenceFileLength
-     */
-    public int getMaxReferenceFileLength() {
-        return maxReferenceFileLength;
-    }
-
-    /**
-     * @param maxReferenceFileLength the maxReferenceFileLength to set
-     */
-    public void setMaxReferenceFileLength(int maxReferenceFileLength) {
-        this.maxReferenceFileLength = maxReferenceFileLength;
-    }
-
-    /**
-     * @return the recoverReferenceStore
-     */
-    public boolean isRecoverReferenceStore() {
-        return recoverReferenceStore;
-    }
-
-    /**
-     * @param recoverReferenceStore the recoverReferenceStore to set
-     */
-    public void setRecoverReferenceStore(boolean recoverReferenceStore) {
-        this.recoverReferenceStore = recoverReferenceStore;
-    }
-
-    /**
-     * @return the forceRecoverReferenceStore
-     */
-    public boolean isForceRecoverReferenceStore() {
-        return forceRecoverReferenceStore;
-    }
-
-    /**
-     * @param forceRecoverReferenceStore the forceRecoverReferenceStore to set
-     */
-    public void setForceRecoverReferenceStore(boolean forceRecoverReferenceStore) {
-        this.forceRecoverReferenceStore = forceRecoverReferenceStore;
-    }
-
-    /**
-     * @return the checkpointInterval
-     */
-    public long getCheckpointInterval() {
-        return checkpointInterval;
-    }
-
-    /**
-     * @param checkpointInterval the checkpointInterval to set
-     */
-    public void setCheckpointInterval(long checkpointInterval) {
-        this.checkpointInterval = checkpointInterval;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTopicMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTopicMessageStore.java
deleted file mode 100644
index 6a2d530..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTopicMessageStore.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.IOException;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TopicReferenceStore;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.SubscriptionKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A MessageStore that uses a Journal to store it's messages.
- * 
- * 
- */
-public class AMQTopicMessageStore extends AMQMessageStore implements TopicMessageStore {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQTopicMessageStore.class);
-    private TopicReferenceStore topicReferenceStore;
-    public AMQTopicMessageStore(AMQPersistenceAdapter adapter,TopicReferenceStore topicReferenceStore, ActiveMQTopic destinationName) {
-        super(adapter, topicReferenceStore, destinationName);
-        this.topicReferenceStore = topicReferenceStore;
-    }
-
-    public void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception {
-        flush();
-        topicReferenceStore.recoverSubscription(clientId, subscriptionName, new RecoveryListenerAdapter(this, listener));
-    }
-
-    public void recoverNextMessages(String clientId, String subscriptionName,
-            int maxReturned, final MessageRecoveryListener listener)
-            throws Exception {
-        RecoveryListenerAdapter recoveryListener = new RecoveryListenerAdapter(this, listener);
-            topicReferenceStore.recoverNextMessages(clientId, subscriptionName,maxReturned, recoveryListener);
-            if (recoveryListener.size() == 0) {
-                flush();
-                topicReferenceStore.recoverNextMessages(clientId,subscriptionName, maxReturned, recoveryListener);
-            }
-    }
-
-    public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-        return topicReferenceStore.lookupSubscription(clientId, subscriptionName);
-    }
-
-    public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException {
-        peristenceAdapter.writeCommand(subscriptionInfo, false);
-        topicReferenceStore.addSubsciption(subscriptionInfo, retroactive);
-    }
-
-    /**
-     */
-    public void acknowledge(final ConnectionContext context, final String clientId, final String subscriptionName,
-                            final MessageId messageId, final MessageAck originalAck) throws IOException {
-        final boolean debug = LOG.isDebugEnabled();
-        JournalTopicAck ack = new JournalTopicAck();
-        ack.setDestination(destination);
-        ack.setMessageId(messageId);
-        ack.setMessageSequenceId(messageId.getBrokerSequenceId());
-        ack.setSubscritionName(subscriptionName);
-        ack.setClientId(clientId);
-        ack.setTransactionId(context.getTransaction() != null ? context.getTransaction().getTransactionId() : null);
-        final Location location = peristenceAdapter.writeCommand(ack, false);
-        final SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName);
-        if (!context.isInTransaction()) {
-            if (debug) {
-                LOG.debug("Journalled acknowledge for: " + messageId + ", at: " + location);
-            }
-            acknowledge(context,messageId, location, clientId,subscriptionName);
-        } else {
-            if (debug) {
-                LOG.debug("Journalled transacted acknowledge for: " + messageId + ", at: " + location);
-            }
-            lock.lock();
-            try {
-                inFlightTxLocations.add(location);
-            }finally {
-                lock.unlock();
-            }
-            transactionStore.acknowledge(this, ack, location);
-            context.getTransaction().addSynchronization(new Synchronization() {
-
-                public void afterCommit() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted acknowledge commit for: " + messageId + ", at: " + location);
-                    }
-                    lock.lock();
-                    try {
-                        inFlightTxLocations.remove(location);
-                        acknowledge(context,messageId, location, clientId,subscriptionName);
-                    }finally {
-                        lock.unlock();
-                    }
-                }
-
-                public void afterRollback() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted acknowledge rollback for: " + messageId + ", at: " + location);
-                    }
-                    lock.lock();
-                    try{
-                        inFlightTxLocations.remove(location);
-                    }finally {
-                        lock.unlock();
-                    }
-                }
-            });
-        }
-    }
-
-    public boolean replayAcknowledge(ConnectionContext context, String clientId, String subscritionName, MessageId messageId) {
-        try {
-            SubscriptionInfo sub = topicReferenceStore.lookupSubscription(clientId, subscritionName);
-            if (sub != null) {
-                topicReferenceStore.acknowledge(context, clientId, subscritionName, messageId, null);
-                return true;
-            }
-        } catch (Throwable e) {
-            LOG.debug("Could not replay acknowledge for message '" + messageId + "'.  Message may have already been acknowledged. reason: " + e);
-        }
-        return false;
-    }
-
-    /**
-     * @param messageId
-     * @param location
-     * @param key
-     * @throws IOException 
-     */
-    protected void acknowledge(final ConnectionContext context, MessageId messageId,
-            Location location, String clientId, String subscriptionName)
-            throws IOException {
-        MessageAck ack = null;
-        lock.lock();
-        try {
-            lastLocation = location;
-        }finally {
-            lock.unlock();
-        }
-        
-            if (topicReferenceStore.acknowledgeReference(context, clientId,
-                    subscriptionName, messageId)) {
-                ack = new MessageAck();
-                ack.setLastMessageId(messageId);
-               
-            }
-        
-        if (ack != null) {
-            removeMessage(context, ack);
-        }
-    }
-
-    /**
-     * @return Returns the longTermStore.
-     */
-    public TopicReferenceStore getTopicReferenceStore() {
-        return topicReferenceStore;
-    }
-
-    public void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-        topicReferenceStore.deleteSubscription(clientId, subscriptionName);
-    }
-
-    public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-        return topicReferenceStore.getAllSubscriptions();
-    }
-
-    public int getMessageCount(String clientId, String subscriberName) throws IOException {
-        flush();
-        SubscriptionInfo info = lookupSubscription(clientId, subscriberName);
-        try {
-            MessageCounter counter = new MessageCounter(info, this);
-            topicReferenceStore.recoverSubscription(clientId, subscriberName, counter);
-            return counter.count;
-        } catch (Exception e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-    
-    private class MessageCounter implements MessageRecoveryListener {
-        
-        int count = 0;
-        SubscriptionInfo info;
-        BooleanExpression selectorExpression;
-        TopicMessageStore store;
-        
-        public MessageCounter(SubscriptionInfo info, TopicMessageStore store) throws Exception {
-            this.info = info;
-            if (info != null) {
-                String selector = info.getSelector();
-                if (selector != null) {
-                    this.selectorExpression = SelectorParser.parse(selector);
-                }
-            }
-            this.store = store;
-        }
-
-        public boolean recoverMessageReference(MessageId ref) throws Exception {
-            if (selectorExpression != null) {
-                MessageEvaluationContext ctx = new MessageEvaluationContext();
-                ctx.setMessageReference(store.getMessage(ref));
-                if (selectorExpression.matches(ctx)) {
-                    count++;
-                }
-            } else {
-                count ++;
-            }
-            return true;
-        }
-
-        public boolean recoverMessage(Message message) throws Exception {
-            if (selectorExpression != null) {
-                MessageEvaluationContext ctx = new MessageEvaluationContext();
-                ctx.setMessageReference(store.getMessage(message.getMessageId()));
-                if (selectorExpression.matches(ctx)) {
-                    count++;
-                }
-            } else {
-                count++;
-            }
-            return true;
-        }
-
-        public boolean isDuplicate(MessageId ref) {
-            return false;
-        }
-
-        public boolean hasSpace() {
-            return true;
-        }
-    }
-
-    public void resetBatching(String clientId, String subscriptionName) {
-        topicReferenceStore.resetBatching(clientId, subscriptionName);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java
deleted file mode 100644
index 374928e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import javax.transaction.xa.XAException;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.store.TransactionRecoveryListener;
-import org.apache.activemq.store.TransactionStore;
-
-/**
- */
-public class AMQTransactionStore implements TransactionStore {
-
-    protected Map<TransactionId, AMQTx> inflightTransactions = new LinkedHashMap<TransactionId, AMQTx>();
-    Map<TransactionId, AMQTx> preparedTransactions = new LinkedHashMap<TransactionId, AMQTx>();
-
-    private final AMQPersistenceAdapter peristenceAdapter;
-    private boolean doingRecover;
-
-    public AMQTransactionStore(AMQPersistenceAdapter adapter) {
-        this.peristenceAdapter = adapter;
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId)
-     */
-    public void prepare(TransactionId txid) throws IOException {
-        AMQTx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.remove(txid);
-        }
-        if (tx == null) {
-            return;
-        }
-        peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_PREPARE, txid, false), true);
-        synchronized (preparedTransactions) {
-            preparedTransactions.put(txid, tx);
-        }
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId)
-     */
-    public void replayPrepare(TransactionId txid) throws IOException {
-        AMQTx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.remove(txid);
-        }
-        if (tx == null) {
-            return;
-        }
-        synchronized (preparedTransactions) {
-            preparedTransactions.put(txid, tx);
-        }
-    }
-
-    public AMQTx getTx(TransactionId txid, Location location) {
-        AMQTx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.get(txid);
-            if (tx == null) {
-                tx = new AMQTx(location);
-                inflightTransactions.put(txid, tx);
-            }
-        }
-        return tx;
-    }
-
-    /**
-     * @throws XAException
-     * @see org.apache.activemq.store.TransactionStore#commit(org.apache.activemq.service.Transaction)
-     */
-    public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit,Runnable postCommit) throws IOException {
-        if (preCommit != null) {
-            preCommit.run();
-        }
-        AMQTx tx;
-        if (wasPrepared) {
-            synchronized (preparedTransactions) {
-                tx = preparedTransactions.remove(txid);
-            }
-        } else {
-            synchronized (inflightTransactions) {
-                tx = inflightTransactions.remove(txid);
-            }
-        }
-        if (tx == null) {
-            if (postCommit != null) {
-                postCommit.run();
-            }
-            return;
-        }
-        if (txid.isXATransaction()) {
-            peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_COMMIT, txid, wasPrepared), true,true);
-        } else {
-            peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.LOCAL_COMMIT, txid, wasPrepared), true,true);
-        }
-        if (postCommit != null) {
-            postCommit.run();
-        }
-    }
-
-    /**
-     * @throws XAException
-     * @see org.apache.activemq.store.TransactionStore#commit(org.apache.activemq.service.Transaction)
-     */
-    public AMQTx replayCommit(TransactionId txid, boolean wasPrepared) throws IOException {
-        if (wasPrepared) {
-            synchronized (preparedTransactions) {
-                return preparedTransactions.remove(txid);
-            }
-        } else {
-            synchronized (inflightTransactions) {
-                return inflightTransactions.remove(txid);
-            }
-        }
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId)
-     */
-    public void rollback(TransactionId txid) throws IOException {
-        AMQTx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.remove(txid);
-        }
-        if (tx != null) {
-            synchronized (preparedTransactions) {
-                tx = preparedTransactions.remove(txid);
-            }
-        }
-        if (tx != null) {
-            if (txid.isXATransaction()) {
-                peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_ROLLBACK, txid, false), true,true);
-            } else {
-                peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.LOCAL_ROLLBACK, txid, false), true,true);
-            }
-        }
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId)
-     */
-    public void replayRollback(TransactionId txid) throws IOException {
-        boolean inflight = false;
-        synchronized (inflightTransactions) {
-            inflight = inflightTransactions.remove(txid) != null;
-        }
-        if (inflight) {
-            synchronized (preparedTransactions) {
-                preparedTransactions.remove(txid);
-            }
-        }
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
-        // All the in-flight transactions get rolled back..
-        synchronized (inflightTransactions) {
-            inflightTransactions.clear();
-        }
-        this.doingRecover = true;
-        try {
-            Map<TransactionId, AMQTx> txs = null;
-            synchronized (preparedTransactions) {
-                txs = new LinkedHashMap<TransactionId, AMQTx>(preparedTransactions);
-            }
-            for (Iterator<TransactionId> iter = txs.keySet().iterator(); iter.hasNext();) {
-                Object txid = iter.next();
-                AMQTx tx = txs.get(txid);
-                listener.recover((XATransactionId)txid, tx.getMessages(), tx.getAcks());
-            }
-        } finally {
-            this.doingRecover = false;
-        }
-    }
-
-    /**
-     * @param message
-     * @throws IOException
-     */
-    void addMessage(AMQMessageStore store, Message message, Location location) throws IOException {
-        AMQTx tx = getTx(message.getTransactionId(), location);
-        tx.add(store, message, location);
-    }
-
-    /**
-     * @param ack
-     * @throws IOException
-     */
-    public void removeMessage(AMQMessageStore store, MessageAck ack, Location location) throws IOException {
-        AMQTx tx = getTx(ack.getTransactionId(), location);
-        tx.add(store, ack);
-    }
-
-    public void acknowledge(AMQTopicMessageStore store, JournalTopicAck ack, Location location) {
-        AMQTx tx = getTx(ack.getTransactionId(), location);
-        tx.add(store, ack);
-    }
-
-    public Location checkpoint() throws IOException {
-        // Nothing really to checkpoint.. since, we don't
-        // checkpoint tx operations in to long term store until they are
-        // committed.
-        // But we keep track of the first location of an operation
-        // that was associated with an active tx. The journal can not
-        // roll over active tx records.
-        Location minimumLocationInUse = null;
-        synchronized (inflightTransactions) {
-            for (Iterator<AMQTx> iter = inflightTransactions.values().iterator(); iter.hasNext();) {
-                AMQTx tx = iter.next();
-                Location location = tx.getLocation();
-                if (minimumLocationInUse == null || location.compareTo(minimumLocationInUse) < 0) {
-                    minimumLocationInUse = location;
-                }
-            }
-        }
-        synchronized (preparedTransactions) {
-            for (Iterator<AMQTx> iter = preparedTransactions.values().iterator(); iter.hasNext();) {
-                AMQTx tx = iter.next();
-                Location location = tx.getLocation();
-                if (minimumLocationInUse == null || location.compareTo(minimumLocationInUse) < 0) {
-                    minimumLocationInUse = location;
-                }
-            }
-            return minimumLocationInUse;
-        }
-    }
-
-    public boolean isDoingRecover() {
-        return doingRecover;
-    }
-
-    /**
-     * @return the preparedTransactions
-     */
-    public Map<TransactionId, AMQTx> getPreparedTransactions() {
-        return this.preparedTransactions;
-    }
-
-    /**
-     * @param preparedTransactions the preparedTransactions to set
-     */
-    public void setPreparedTransactions(Map<TransactionId, AMQTx> preparedTransactions) {
-        if (preparedTransactions != null) {
-            this.preparedTransactions.clear();
-            this.preparedTransactions.putAll(preparedTransactions);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTx.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTx.java
deleted file mode 100644
index 6fc47b4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTx.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.kaha.impl.async.Location;
-
-/**
- */
-/**
- * Operations
- * 
- * 
- */
-public class AMQTx {
-
-    private final Location location;
-    private List<AMQTxOperation> operations = new ArrayList<AMQTxOperation>();
-
-    public AMQTx(Location location) {
-        this.location = location;
-    }
-
-    public void add(AMQMessageStore store, Message msg, Location location) {
-        operations.add(new AMQTxOperation(AMQTxOperation.ADD_OPERATION_TYPE, store.getDestination(), msg,
-                                          location));
-    }
-
-    public void add(AMQMessageStore store, MessageAck ack) {
-        operations.add(new AMQTxOperation(AMQTxOperation.REMOVE_OPERATION_TYPE, store.getDestination(), ack,
-                                          null));
-    }
-
-    public void add(AMQTopicMessageStore store, JournalTopicAck ack) {
-        operations.add(new AMQTxOperation(AMQTxOperation.ACK_OPERATION_TYPE, store.getDestination(), ack,
-                                          null));
-    }
-
-    public Message[] getMessages() {
-        List<Object> list = new ArrayList<Object>();
-        for (Iterator<AMQTxOperation> iter = operations.iterator(); iter.hasNext();) {
-            AMQTxOperation op = iter.next();
-            if (op.getOperationType() == AMQTxOperation.ADD_OPERATION_TYPE) {
-                list.add(op.getData());
-            }
-        }
-        Message rc[] = new Message[list.size()];
-        list.toArray(rc);
-        return rc;
-    }
-
-    public MessageAck[] getAcks() {
-        List<Object> list = new ArrayList<Object>();
-        for (Iterator<AMQTxOperation> iter = operations.iterator(); iter.hasNext();) {
-            AMQTxOperation op = iter.next();
-            if (op.getOperationType() == AMQTxOperation.REMOVE_OPERATION_TYPE) {
-                list.add(op.getData());
-            }
-        }
-        MessageAck rc[] = new MessageAck[list.size()];
-        list.toArray(rc);
-        return rc;
-    }
-
-    /**
-     * @return the location
-     */
-    public Location getLocation() {
-        return this.location;
-    }
-
-    public List<AMQTxOperation> getOperations() {
-        return operations;
-    }
-
-    public void setOperations(List<AMQTxOperation> operations) {
-        this.operations = operations;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTxOperation.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTxOperation.java
deleted file mode 100644
index b9f11a5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTxOperation.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- */
-public class AMQTxOperation {
-
-    public static final byte ADD_OPERATION_TYPE = 0;
-    public static final byte REMOVE_OPERATION_TYPE = 1;
-    public static final byte ACK_OPERATION_TYPE = 3;
-    private byte operationType;
-    private ActiveMQDestination destination;
-    private Object data;
-    private Location location;
-
-    public AMQTxOperation() {
-    }
-
-    public AMQTxOperation(byte operationType, ActiveMQDestination destination, Object data, Location location) {
-        this.operationType = operationType;
-        this.destination = destination;
-        this.data = data;
-        this.location = location;
-
-    }
-
-    /**
-     * @return the data
-     */
-    public Object getData() {
-        return this.data;
-    }
-
-    /**
-     * @param data the data to set
-     */
-    public void setData(Object data) {
-        this.data = data;
-    }
-
-    /**
-     * @return the location
-     */
-    public Location getLocation() {
-        return this.location;
-    }
-
-    /**
-     * @param location the location to set
-     */
-    public void setLocation(Location location) {
-        this.location = location;
-    }
-
-    /**
-     * @return the operationType
-     */
-    public byte getOperationType() {
-        return this.operationType;
-    }
-
-    /**
-     * @param operationType the operationType to set
-     */
-    public void setOperationType(byte operationType) {
-        this.operationType = operationType;
-    }
-
-    public boolean replay(AMQPersistenceAdapter adapter, ConnectionContext context) throws IOException {
-        boolean result = false;
-        AMQMessageStore store = (AMQMessageStore)adapter.createMessageStore(destination);
-        if (operationType == ADD_OPERATION_TYPE) {
-            result = store.replayAddMessage(context, (Message)data, location);
-        } else if (operationType == REMOVE_OPERATION_TYPE) {
-            result = store.replayRemoveMessage(context, (MessageAck)data);
-        } else {
-            JournalTopicAck ack = (JournalTopicAck)data;
-            result = ((AMQTopicMessageStore)store).replayAcknowledge(context, ack.getClientId(), ack
-                .getSubscritionName(), ack.getMessageId());
-        }
-        return result;
-    }
-
-    public void writeExternal(WireFormat wireFormat, DataOutput dos) throws IOException {
-        location.writeExternal(dos);
-        ByteSequence packet = wireFormat.marshal(getData());
-        dos.writeInt(packet.length);
-        dos.write(packet.data, packet.offset, packet.length);
-        packet = wireFormat.marshal(destination);
-        dos.writeInt(packet.length);
-        dos.write(packet.data, packet.offset, packet.length);
-    }
-
-    public void readExternal(WireFormat wireFormat, DataInput dis) throws IOException {
-        this.location = new Location();
-        this.location.readExternal(dis);
-        int size = dis.readInt();
-        byte[] data = new byte[size];
-        dis.readFully(data);
-        setData(wireFormat.unmarshal(new ByteSequence(data)));
-        size = dis.readInt();
-        data = new byte[size];
-        dis.readFully(data);
-        this.destination = (ActiveMQDestination)wireFormat.unmarshal(new ByteSequence(data));
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/RecoveryListenerAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/RecoveryListenerAdapter.java
deleted file mode 100644
index 8a41a10..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/RecoveryListenerAdapter.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.store.amq;
-
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.MessageStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-final class RecoveryListenerAdapter implements MessageRecoveryListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(RecoveryListenerAdapter.class);
-    private final MessageStore store;
-    private final MessageRecoveryListener listener;
-    private int count;
-    private MessageId lastRecovered;
-
-    RecoveryListenerAdapter(MessageStore store, MessageRecoveryListener listener) {
-        this.store = store;
-        this.listener = listener;
-    }
-
-    public boolean hasSpace() {
-        return listener.hasSpace();
-    }
-
-    public boolean isDuplicate(MessageId id) {
-        return listener.isDuplicate(id);
-    }
-    
-    public boolean recoverMessage(Message message) throws Exception {
-        if (listener.hasSpace()) {
-            if (listener.recoverMessage(message)) {
-                lastRecovered = message.getMessageId();
-                count++;
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public boolean recoverMessageReference(MessageId ref) throws Exception {
-        Message message = this.store.getMessage(ref);
-        if (message != null) {
-            return recoverMessage(message);
-        } else {
-            throw new IllegalStateException("Message id " + ref + " could not be recovered from the data store for: " + store.getDestination().getQualifiedName() 
-                    + " - already dispatched");
-        }
-    }
-
-    MessageId getLastRecoveredMessageId() {
-        return lastRecovered;
-    }
-
-    int size() {
-        return count;
-    }
-
-    void reset() {
-        count = 0;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/package.html
deleted file mode 100644
index 5205ff9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-The default Store implementation for ActiveMQ
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java
deleted file mode 100644
index c6546f8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.sql.DataSource;
-
-import org.apache.activemq.util.IOHelper;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-/**
- * A helper class which provides a factory method to create a default
- * {@link DataSource) if one is not provided.
- * 
- * 
- */
-public class DataSourceSupport {
-
-    private String dataDirectory = IOHelper.getDefaultDataDirectory();
-    private File dataDirectoryFile;
-    private DataSource dataSource;
-
-    public DataSourceSupport() {
-    }
-
-    public DataSourceSupport(DataSource dataSource) {
-        this.dataSource = dataSource;
-    }
-
-    public File getDataDirectoryFile() {
-        if (dataDirectoryFile == null) {
-            dataDirectoryFile = new File(getDataDirectory());
-        }
-        return dataDirectoryFile;
-    }
-
-    public void setDataDirectoryFile(File dataDirectory) {
-        this.dataDirectoryFile = dataDirectory;
-    }
-
-    public String getDataDirectory() {
-        return dataDirectory;
-    }
-
-    public void setDataDirectory(String dataDirectory) {
-        this.dataDirectory = dataDirectory;
-    }
-
-    public DataSource getDataSource() throws IOException {
-        if (dataSource == null) {
-            dataSource = createDataSource();
-            if (dataSource == null) {
-                throw new IllegalArgumentException("No dataSource property has been configured");
-            }
-        }
-        return dataSource;
-    }
-
-    public void setDataSource(DataSource dataSource) {
-        this.dataSource = dataSource;
-    }
-
-    protected DataSource createDataSource() throws IOException {
-
-        // Setup the Derby datasource.
-        System.setProperty("derby.system.home", getDataDirectoryFile().getCanonicalPath());
-        System.setProperty("derby.storage.fileSyncTransactionLog", "true");
-        System.setProperty("derby.storage.pageCacheSize", "100");
-
-        final EmbeddedDataSource ds = new EmbeddedDataSource();
-        ds.setDatabaseName("derbydb");
-        ds.setCreateDatabase("create");
-        return ds;
-    }
-
-    public String toString() {
-        return "" + dataSource;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DatabaseLocker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DatabaseLocker.java
deleted file mode 100644
index ae23f0f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DatabaseLocker.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-
-import org.apache.activemq.Service;
-
-/**
- * Represents some kind of lock service to ensure that a broker is the only master
- * 
- * 
- */
-public interface DatabaseLocker extends Service {
-
-    /**
-     * allow the injection of a jdbc persistence adapter
-     * @param adapter the persistence adapter to use
-     * @throws IOException 
-     */
-    void setPersistenceAdapter(JDBCPersistenceAdapter adapter) throws IOException;
-    
-    /**
-     * Used by a timer to keep alive the lock.
-     * If the method returns false the broker should be terminated
-     */
-    boolean keepAlive();
-
-    /**
-     * set the delay interval in milliseconds between lock acquire attempts
-     * @param lockAcquireSleepInterval the sleep interval in miliseconds
-     */
-    void setLockAcquireSleepInterval(long lockAcquireSleepInterval);
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
deleted file mode 100644
index 915c512..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import javax.sql.DataSource;
-
-import org.apache.activemq.util.Handler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents an exclusive lock on a database to avoid multiple brokers running
- * against the same logical database.
- * 
- * @org.apache.xbean.XBean element="database-locker"
- * 
- */
-public class DefaultDatabaseLocker implements DatabaseLocker {
-    public static final long DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL = 1000;
-    private static final Logger LOG = LoggerFactory.getLogger(DefaultDatabaseLocker.class);
-    protected DataSource dataSource;
-    protected Statements statements;
-    protected long lockAcquireSleepInterval = DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL;
-
-    protected Connection connection;
-    protected boolean stopping;
-    protected Handler<Exception> exceptionHandler;
-    
-    public DefaultDatabaseLocker() {
-    }
-    
-    public DefaultDatabaseLocker(JDBCPersistenceAdapter persistenceAdapter) throws IOException {
-        setPersistenceAdapter(persistenceAdapter);
-    }
-
-    public void setPersistenceAdapter(JDBCPersistenceAdapter adapter) throws IOException {
-        this.dataSource = adapter.getLockDataSource();
-        this.statements = adapter.getStatements();
-    }
-    
-    public void start() throws Exception {
-        stopping = false;
-
-        LOG.info("Attempting to acquire the exclusive lock to become the Master broker");
-        String sql = statements.getLockCreateStatement();
-        LOG.debug("Locking Query is "+sql);
-        
-        PreparedStatement statement = null;
-        while (true) {
-            try {
-                connection = dataSource.getConnection();
-                connection.setAutoCommit(false);
-                statement = connection.prepareStatement(sql);
-                statement.execute();
-                break;
-            } catch (Exception e) {
-                try {
-                    if (stopping) {
-                        throw new Exception(
-                                "Cannot start broker as being asked to shut down. " 
-                                        + "Interrupted attempt to acquire lock: "
-                                        + e, e);
-                    }
-                    if (exceptionHandler != null) {
-                        try {
-                            exceptionHandler.handle(e);
-                        } catch (Throwable handlerException) {
-                            LOG.error( "The exception handler "
-                                    + exceptionHandler.getClass().getCanonicalName()
-                                    + " threw this exception: "
-                                    + handlerException
-                                    + " while trying to handle this exception: "
-                                    + e, handlerException);
-                        }
-
-                    } else {
-                        LOG.debug("Lock failure: "+ e, e);
-                    }
-                } finally {
-                    // Let's make sure the database connection is properly
-                    // closed when an error occurs so that we're not leaking
-                    // connections 
-                    if (null != connection) {
-                        try {
-                            connection.close();
-                        } catch (SQLException e1) {
-                            LOG.error("Caught exception while closing connection: " + e1, e1);
-                        }
-                        
-                        connection = null;
-                    }
-                }
-            } finally {
-                if (null != statement) {
-                    try {
-                        statement.close();
-                    } catch (SQLException e1) {
-                        LOG.debug("Caught while closing statement: " + e1, e1);
-                    }
-                    statement = null;
-                }
-            }
-
-            LOG.info("Failed to acquire lock.  Sleeping for " + lockAcquireSleepInterval + " milli(s) before trying again...");
-            try {
-                Thread.sleep(lockAcquireSleepInterval);
-            } catch (InterruptedException ie) {
-                LOG.warn("Master lock retry sleep interrupted", ie);
-            }
-        }
-
-        LOG.info("Becoming the master on dataSource: " + dataSource);
-    }
-
-    public void stop() throws Exception {
-        stopping = true;
-        try {
-            if (connection != null && !connection.isClosed()) {
-                try {
-                    connection.rollback();
-                } catch (SQLException sqle) {
-                    LOG.warn("Exception while rollbacking the connection on shutdown", sqle);
-                } finally {
-                    try {
-                        connection.close();
-                    } catch (SQLException ignored) {
-                        LOG.debug("Exception while closing connection on shutdown", ignored);
-                    }
-                }
-            }
-        } catch (SQLException sqle) {
-            LOG.warn("Exception while checking close status of connection on shutdown", sqle);
-        }
-    }
-
-    public boolean keepAlive() {
-        PreparedStatement statement = null;
-        boolean result = false;
-        try {
-            statement = connection.prepareStatement(statements.getLockUpdateStatement());
-            statement.setLong(1, System.currentTimeMillis());
-            int rows = statement.executeUpdate();
-            if (rows == 1) {
-                result=true;
-            }
-        } catch (Exception e) {
-            LOG.error("Failed to update database lock: " + e, e);
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (SQLException e) {
-                    LOG.error("Failed to close statement",e);
-                }
-            }
-        }
-        return result;
-    }
- 
-    public long getLockAcquireSleepInterval() {
-        return lockAcquireSleepInterval;
-    }
-
-    public void setLockAcquireSleepInterval(long lockAcquireSleepInterval) {
-        this.lockAcquireSleepInterval = lockAcquireSleepInterval;
-    }
-    
-    public Handler getExceptionHandler() {
-        return exceptionHandler;
-    }
-
-    public void setExceptionHandler(Handler exceptionHandler) {
-        this.exceptionHandler = exceptionHandler;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCAdapter.java
deleted file mode 100755
index 0c78e0a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCAdapter.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.Set;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SubscriptionInfo;
-
-/**
- * 
- */
-public interface JDBCAdapter {
-
-    void setStatements(Statements statementProvider);
-    
-    void doCreateTables(TransactionContext c) throws SQLException, IOException;
-
-    void doDropTables(TransactionContext c) throws SQLException, IOException;
-
-    void doAddMessage(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, byte[] data, long expiration, byte priority) throws SQLException, IOException;
-
-    void doAddMessageReference(TransactionContext c, long sequence, MessageId messageId, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException;
-
-    byte[] doGetMessage(TransactionContext c, MessageId id) throws SQLException, IOException;
-    
-    byte[] doGetMessageById(TransactionContext c, long storeSequenceId) throws SQLException, IOException;
-
-    String doGetMessageReference(TransactionContext c, long id) throws SQLException, IOException;
-
-    void doRemoveMessage(TransactionContext c, long seq) throws SQLException, IOException;
-
-    void doRecover(TransactionContext c, ActiveMQDestination destination, JDBCMessageRecoveryListener listener) throws Exception;
-
-    void doSetLastAck(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long prio) throws SQLException, IOException;
-
-    void doRecoverSubscription(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, JDBCMessageRecoveryListener listener)
-        throws Exception;
-
-    void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority, int maxReturned,
-                               JDBCMessageRecoveryListener listener) throws Exception;
-
-    void doRecoverNextMessagesWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority, int maxReturned,
-                               JDBCMessageRecoveryListener listener) throws Exception;
-
-    void doSetSubscriberEntry(TransactionContext c, SubscriptionInfo subscriptionInfo, boolean retroactive, boolean isPrioritizeMessages) throws SQLException, IOException;
-
-    SubscriptionInfo doGetSubscriberEntry(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName) throws SQLException, IOException;
-
-    long[] getStoreSequenceId(TransactionContext c, ActiveMQDestination destination, MessageId messageID) throws SQLException, IOException;
-
-    void doRemoveAllMessages(TransactionContext c, ActiveMQDestination destinationName) throws SQLException, IOException;
-
-    void doDeleteSubscription(TransactionContext c, ActiveMQDestination destinationName, String clientId, String subscriptionName) throws SQLException, IOException;
-
-    void doDeleteOldMessages(TransactionContext c, boolean isPrioritizedMessages) throws SQLException, IOException;
-
-    long doGetLastMessageStoreSequenceId(TransactionContext c) throws SQLException, IOException;
-
-    Set<ActiveMQDestination> doGetDestinations(TransactionContext c) throws SQLException, IOException;
-
-    void setUseExternalMessageReferences(boolean useExternalMessageReferences);
-
-    SubscriptionInfo[] doGetAllSubscriptions(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException;
-
-    int doGetDurableSubscriberMessageCount(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, boolean isPrioritizeMessages) throws SQLException, IOException;
-
-    int doGetMessageCount(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException;
-
-    void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, long nextSeq, long priority, int maxReturned, boolean isPrioritizeMessages, JDBCMessageRecoveryListener listener) throws Exception;
-
-    long doGetLastAckedDurableSubscriberMessageId(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriberName) throws SQLException, IOException;
-
-    void doMessageIdScan(TransactionContext c, int limit, JDBCMessageIdScanListener listener) throws SQLException, IOException;
-
-    long doGetLastProducerSequenceId(TransactionContext c, ProducerId id) throws SQLException, IOException;
-
-    void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long re, long re1) throws SQLException, IOException;
-
-    public int getMaxRows();
-
-    public void setMaxRows(int maxRows);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageIdScanListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageIdScanListener.java
deleted file mode 100755
index a1dfd68..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageIdScanListener.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import org.apache.activemq.command.MessageId;
-
-public interface JDBCMessageIdScanListener {
-    void messageId(MessageId id);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageRecoveryListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageRecoveryListener.java
deleted file mode 100755
index 07f4816..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageRecoveryListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.store.jdbc;
-
-
-
-/**
- * 
- */
-public interface JDBCMessageRecoveryListener {
-    boolean recoverMessage(long sequenceId, byte[] message) throws Exception;
-    boolean recoverMessageReference(String reference) throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
deleted file mode 100755
index dfa712c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ByteSequenceData;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JDBCMessageStore extends AbstractMessageStore {
-
-    class Duration {
-        static final int LIMIT = 100;
-        final long start = System.currentTimeMillis();
-        final String name;
-
-        Duration(String name) {
-            this.name = name;
-        }
-        void end() {
-            end(null);
-        }
-        void end(Object o) {
-            long duration = System.currentTimeMillis() - start;
-
-            if (duration > LIMIT) {
-                System.err.println(name + " took a long time: " + duration + "ms " + o);
-            }
-        }
-    }
-    private static final Logger LOG = LoggerFactory.getLogger(JDBCMessageStore.class);
-    protected final WireFormat wireFormat;
-    protected final JDBCAdapter adapter;
-    protected final JDBCPersistenceAdapter persistenceAdapter;
-    protected AtomicLong lastRecoveredSequenceId = new AtomicLong(-1);
-    protected AtomicLong lastRecoveredPriority = new AtomicLong(Byte.MAX_VALUE -1);
-
-    protected ActiveMQMessageAudit audit;
-    
-    public JDBCMessageStore(JDBCPersistenceAdapter persistenceAdapter, JDBCAdapter adapter, WireFormat wireFormat, ActiveMQDestination destination, ActiveMQMessageAudit audit) {
-        super(destination);
-        this.persistenceAdapter = persistenceAdapter;
-        this.adapter = adapter;
-        this.wireFormat = wireFormat;
-        this.audit = audit;
-    }
-    
-    public void addMessage(ConnectionContext context, Message message) throws IOException {
-        MessageId messageId = message.getMessageId();
-        if (audit != null && audit.isDuplicate(message)) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(destination.getPhysicalName()
-                    + " ignoring duplicated (add) message, already stored: "
-                    + messageId);
-            }
-            return;
-        }
-        
-        long sequenceId = persistenceAdapter.getNextSequenceId();
-        
-        // Serialize the Message..
-        byte data[];
-        try {
-            ByteSequence packet = wireFormat.marshal(message);
-            data = ByteSequenceData.toByteArray(packet);
-        } catch (IOException e) {
-            throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e);
-        }
-
-        // Get a connection and insert the message into the DB.
-        TransactionContext c = persistenceAdapter.getTransactionContext(context);
-        try {      
-            adapter.doAddMessage(c,sequenceId, messageId, destination, data, message.getExpiration(), message.getPriority());
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e);
-        } finally {
-            c.close();
-        }
-        onAdd(sequenceId, message.getPriority());
-    }
-
-    protected void onAdd(long sequenceId, byte priority) {
-    }
-
-    public void addMessageReference(ConnectionContext context, MessageId messageId, long expirationTime, String messageRef) throws IOException {
-        // Get a connection and insert the message into the DB.
-        TransactionContext c = persistenceAdapter.getTransactionContext(context);
-        try {
-            adapter.doAddMessageReference(c, persistenceAdapter.getNextSequenceId(), messageId, destination, expirationTime, messageRef);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public Message getMessage(MessageId messageId) throws IOException {
-        // Get a connection and pull the message out of the DB
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            byte data[] = adapter.doGetMessage(c, messageId);
-            if (data == null) {
-                return null;
-            }
-
-            Message answer = (Message)wireFormat.unmarshal(new ByteSequence(data));
-            return answer;
-        } catch (IOException e) {
-            throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public String getMessageReference(MessageId messageId) throws IOException {
-        long id = messageId.getBrokerSequenceId();
-
-        // Get a connection and pull the message out of the DB
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            return adapter.doGetMessageReference(c, id);
-        } catch (IOException e) {
-            throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-    	
-    	long seq = getStoreSequenceIdForMessageId(ack.getLastMessageId())[0];
-
-        // Get a connection and remove the message from the DB
-        TransactionContext c = persistenceAdapter.getTransactionContext(context);
-        try {
-            adapter.doRemoveMessage(c, seq);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to broker message: " + ack.getLastMessageId() + " in container: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public void recover(final MessageRecoveryListener listener) throws Exception {
-
-        // Get all the Message ids out of the database.
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            c = persistenceAdapter.getTransactionContext();
-            adapter.doRecover(c, destination, new JDBCMessageRecoveryListener() {
-                public boolean recoverMessage(long sequenceId, byte[] data) throws Exception {
-                    Message msg = (Message)wireFormat.unmarshal(new ByteSequence(data));
-                    msg.getMessageId().setBrokerSequenceId(sequenceId);
-                    return listener.recoverMessage(msg);
-                }
-
-                public boolean recoverMessageReference(String reference) throws Exception {
-                    return listener.recoverMessageReference(new MessageId(reference));
-                }
-            });
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to recover container. Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.store.MessageStore#removeAllMessages(ConnectionContext)
-     */
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        // Get a connection and remove the message from the DB
-        TransactionContext c = persistenceAdapter.getTransactionContext(context);
-        try {
-            adapter.doRemoveAllMessages(c, destination);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to broker remove all messages: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public int getMessageCount() throws IOException {
-        int result = 0;
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-
-            result = adapter.doGetMessageCount(c, destination);
-
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to get Message Count: " + destination + ". Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-        return result;
-    }
-
-    /**
-     * @param maxReturned
-     * @param listener
-     * @throws Exception
-     * @see org.apache.activemq.store.MessageStore#recoverNextMessages(int,
-     *      org.apache.activemq.store.MessageRecoveryListener)
-     */
-    public void recoverNextMessages(int maxReturned, final MessageRecoveryListener listener) throws Exception {
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            adapter.doRecoverNextMessages(c, destination, lastRecoveredSequenceId.get(), lastRecoveredPriority.get(),
-                    maxReturned, isPrioritizedMessages(), new JDBCMessageRecoveryListener() {
-
-                public boolean recoverMessage(long sequenceId, byte[] data) throws Exception {
-                    if (listener.hasSpace()) {
-                        Message msg = (Message)wireFormat.unmarshal(new ByteSequence(data));
-                        msg.getMessageId().setBrokerSequenceId(sequenceId);
-                        listener.recoverMessage(msg);
-                        lastRecoveredSequenceId.set(sequenceId);
-                        lastRecoveredPriority.set(msg.getPriority());
-                        return true;
-                    }
-                    return false;
-                }
-
-                public boolean recoverMessageReference(String reference) throws Exception {
-                    if (listener.hasSpace()) {
-                        listener.recoverMessageReference(new MessageId(reference));
-                        return true;
-                    }
-                    return false;
-                }
-
-            });
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-        } finally {
-            c.close();
-        }
-
-    }
-
-    /**
-     * @see org.apache.activemq.store.MessageStore#resetBatching()
-     */
-    public void resetBatching() {
-        if (LOG.isTraceEnabled()) {
-            LOG.trace(destination.getPhysicalName() + " resetBatching, existing last recovered seqId: " + lastRecoveredSequenceId.get());
-        }
-        lastRecoveredSequenceId.set(-1);
-        lastRecoveredPriority.set(Byte.MAX_VALUE - 1);
-
-    }
-
-    @Override
-    public void setBatch(MessageId messageId) {
-        try {
-            long[] storedValues = getStoreSequenceIdForMessageId(messageId);
-            lastRecoveredSequenceId.set(storedValues[0]);
-            lastRecoveredPriority.set(storedValues[1]);
-        } catch (IOException ignoredAsAlreadyLogged) {
-            lastRecoveredSequenceId.set(-1);
-            lastRecoveredPriority.set(Byte.MAX_VALUE -1);
-        }
-        if (LOG.isTraceEnabled()) {
-            LOG.trace(destination.getPhysicalName() + " setBatch: new sequenceId: " + lastRecoveredSequenceId.get()
-                    + ", priority: " + lastRecoveredPriority.get());
-        }
-    }
-
-    private long[] getStoreSequenceIdForMessageId(MessageId messageId) throws IOException {
-        long[] result = new long[]{-1, Byte.MAX_VALUE -1};
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            result = adapter.getStoreSequenceId(c, destination, messageId);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to get store sequenceId for messageId: " + messageId +", on: " + destination + ". Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-        return result;
-    }
-    
-    public void setPrioritizedMessages(boolean prioritizedMessages) {
-        super.setPrioritizedMessages(prioritizedMessages);
-    }   
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
deleted file mode 100755
index 0db3cef..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
+++ /dev/null
@@ -1,748 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.File;
-import java.io.IOException;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.Set;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-
-import javax.sql.DataSource;
-
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter;
-import org.apache.activemq.store.memory.MemoryTransactionStore;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.FactoryFinder;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link PersistenceAdapter} implementation using JDBC for persistence
- * storage.
- * 
- * This persistence adapter will correctly remember prepared XA transactions,
- * but it will not keep track of local transaction commits so that operations
- * performed against the Message store are done as a single uow.
- * 
- * @org.apache.xbean.XBean element="jdbcPersistenceAdapter"
- * 
- * 
- */
-public class JDBCPersistenceAdapter extends DataSourceSupport implements PersistenceAdapter,
-    BrokerServiceAware {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JDBCPersistenceAdapter.class);
-    private static FactoryFinder adapterFactoryFinder = new FactoryFinder(
-                                                                   "META-INF/services/org/apache/activemq/store/jdbc/");
-    private static FactoryFinder lockFactoryFinder = new FactoryFinder(
-                                                                    "META-INF/services/org/apache/activemq/store/jdbc/lock/");
-
-    private WireFormat wireFormat = new OpenWireFormat();
-    private BrokerService brokerService;
-    private Statements statements;
-    private JDBCAdapter adapter;
-    private MemoryTransactionStore transactionStore;
-    private ScheduledThreadPoolExecutor clockDaemon;
-    private ScheduledFuture<?> cleanupTicket, keepAliveTicket;
-    private int cleanupPeriod = 1000 * 60 * 5;
-    private boolean useExternalMessageReferences;
-    private boolean useDatabaseLock = true;
-    private long lockKeepAlivePeriod = 1000*30;
-    private long lockAcquireSleepInterval = DefaultDatabaseLocker.DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL;
-    private DatabaseLocker databaseLocker;
-    private boolean createTablesOnStartup = true;
-    private DataSource lockDataSource;
-    private int transactionIsolation;
-    
-    protected int maxProducersToAudit=1024;
-    protected int maxAuditDepth=1000;
-    protected boolean enableAudit=false;
-    protected int auditRecoveryDepth = 1024;
-    protected ActiveMQMessageAudit audit;
-    
-    protected LongSequenceGenerator sequenceGenerator = new LongSequenceGenerator();
-    protected int maxRows = DefaultJDBCAdapter.MAX_ROWS;
-
-    public JDBCPersistenceAdapter() {
-    }
-
-    public JDBCPersistenceAdapter(DataSource ds, WireFormat wireFormat) {
-        super(ds);
-        this.wireFormat = wireFormat;
-    }
-
-    public Set<ActiveMQDestination> getDestinations() {
-        // Get a connection and insert the message into the DB.
-        TransactionContext c = null;
-        try {
-            c = getTransactionContext();
-            return getAdapter().doGetDestinations(c);
-        } catch (IOException e) {
-            return emptyDestinationSet();
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            return emptyDestinationSet();
-        } finally {
-            if (c != null) {
-                try {
-                    c.close();
-                } catch (Throwable e) {
-                }
-            }
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private Set<ActiveMQDestination> emptyDestinationSet() {
-        return Collections.EMPTY_SET;
-    }
-    
-    protected void createMessageAudit() {
-        if (enableAudit && audit == null) {
-            audit = new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
-            TransactionContext c = null;
-            
-            try {
-                c = getTransactionContext();
-                getAdapter().doMessageIdScan(c, auditRecoveryDepth, new JDBCMessageIdScanListener() {
-                    public void messageId(MessageId id) {
-                        audit.isDuplicate(id);
-                    }
-                });
-            } catch (Exception e) {
-                LOG.error("Failed to reload store message audit for JDBC persistence adapter", e);
-            } finally {
-                if (c != null) {
-                    try {
-                        c.close();
-                    } catch (Throwable e) {
-                    }
-                }
-            }
-    	}
-    }
-    
-    public void initSequenceIdGenerator() {
-        TransactionContext c = null;
-        try {
-            c = getTransactionContext();
-            getAdapter().doMessageIdScan(c, auditRecoveryDepth, new JDBCMessageIdScanListener() {
-                public void messageId(MessageId id) {
-                    audit.isDuplicate(id);
-                }
-            });
-        } catch (Exception e) {
-            LOG.error("Failed to reload store message audit for JDBC persistence adapter", e);
-        } finally {
-            if (c != null) {
-                try {
-                    c.close();
-                } catch (Throwable e) {
-                }
-            }
-        }
-        
-    }
-
-    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        MessageStore rc = new JDBCMessageStore(this, getAdapter(), wireFormat, destination, audit);
-        if (transactionStore != null) {
-            rc = transactionStore.proxy(rc);
-        }
-        return rc;
-    }
-
-    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
-        TopicMessageStore rc = new JDBCTopicMessageStore(this, getAdapter(), wireFormat, destination, audit);
-        if (transactionStore != null) {
-            rc = transactionStore.proxy(rc);
-        }
-        return rc;
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     * No state retained.... nothing to do
-     *
-     * @param destination Destination to forget
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     * No state retained.... nothing to do
-     *
-     * @param destination Destination to forget
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-    }
-
-    public TransactionStore createTransactionStore() throws IOException {
-        if (transactionStore == null) {
-            transactionStore = new MemoryTransactionStore(this);
-        }
-        return this.transactionStore;
-    }
-
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        TransactionContext c = getTransactionContext();
-        try {
-            long seq =  getAdapter().doGetLastMessageStoreSequenceId(c);
-            sequenceGenerator.setLastSequenceId(seq);
-            long brokerSeq = 0;
-            if (seq != 0) {
-                byte[] msg = getAdapter().doGetMessageById(c, seq);
-                if (msg != null) {
-                    Message last = (Message)wireFormat.unmarshal(new ByteSequence(msg));
-                    brokerSeq = last.getMessageId().getBrokerSequenceId();
-                } else {
-                   LOG.warn("Broker sequence id wasn't recovered properly, possible duplicates!");
-                }
-            }
-            return brokerSeq;
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to get last broker message id: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-    
-    public long getLastProducerSequenceId(ProducerId id) throws IOException {
-        TransactionContext c = getTransactionContext();
-        try {
-            return getAdapter().doGetLastProducerSequenceId(c, id);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to get last broker message id: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-
-    public void start() throws Exception {
-        getAdapter().setUseExternalMessageReferences(isUseExternalMessageReferences());
-
-        if (isCreateTablesOnStartup()) {
-            TransactionContext transactionContext = getTransactionContext();
-            transactionContext.begin();
-            try {
-                try {
-                    getAdapter().doCreateTables(transactionContext);
-                } catch (SQLException e) {
-                    LOG.warn("Cannot create tables due to: " + e);
-                    JDBCPersistenceAdapter.log("Failure Details: ", e);
-                }
-            } finally {
-                transactionContext.commit();
-            }
-        }
-
-        if (isUseDatabaseLock()) {
-            DatabaseLocker service = getDatabaseLocker();
-            if (service == null) {
-                LOG.warn("No databaseLocker configured for the JDBC Persistence Adapter");
-            } else {
-                service.start();
-                if (lockKeepAlivePeriod > 0) {
-                    keepAliveTicket = getScheduledThreadPoolExecutor().scheduleAtFixedRate(new Runnable() {
-                        public void run() {
-                            databaseLockKeepAlive();
-                        }
-                    }, lockKeepAlivePeriod, lockKeepAlivePeriod, TimeUnit.MILLISECONDS);
-                }
-                if (brokerService != null) {
-                    brokerService.getBroker().nowMasterBroker();
-                }
-            }
-        }
-
-        cleanup();
-
-        // Cleanup the db periodically.
-        if (cleanupPeriod > 0) {
-            cleanupTicket = getScheduledThreadPoolExecutor().scheduleWithFixedDelay(new Runnable() {
-                public void run() {
-                    cleanup();
-                }
-            }, cleanupPeriod, cleanupPeriod, TimeUnit.MILLISECONDS);
-        }
-        
-        createMessageAudit();
-    }
-
-    public synchronized void stop() throws Exception {
-        if (cleanupTicket != null) {
-            cleanupTicket.cancel(true);
-            cleanupTicket = null;
-        }
-        if (keepAliveTicket != null) {
-            keepAliveTicket.cancel(false);
-            keepAliveTicket = null;
-        }
-        
-        // do not shutdown clockDaemon as it may kill the thread initiating shutdown
-        DatabaseLocker service = getDatabaseLocker();
-        if (service != null) {
-            service.stop();
-        }
-    }
-
-    public void cleanup() {
-        TransactionContext c = null;
-        try {
-            LOG.debug("Cleaning up old messages.");
-            c = getTransactionContext();
-            getAdapter().doDeleteOldMessages(c, false);
-            getAdapter().doDeleteOldMessages(c, true);
-        } catch (IOException e) {
-            LOG.warn("Old message cleanup failed due to: " + e, e);
-        } catch (SQLException e) {
-            LOG.warn("Old message cleanup failed due to: " + e);
-            JDBCPersistenceAdapter.log("Failure Details: ", e);
-        } finally {
-            if (c != null) {
-                try {
-                    c.close();
-                } catch (Throwable e) {
-                }
-            }
-            LOG.debug("Cleanup done.");
-        }
-    }
-
-    public void setScheduledThreadPoolExecutor(ScheduledThreadPoolExecutor clockDaemon) {
-        this.clockDaemon = clockDaemon;
-    }
-
-    public ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor() {
-        if (clockDaemon == null) {
-            clockDaemon = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
-                public Thread newThread(Runnable runnable) {
-                    Thread thread = new Thread(runnable, "ActiveMQ Cleanup Timer");
-                    thread.setDaemon(true);
-                    return thread;
-                }
-            });
-        }
-        return clockDaemon;
-    }
-
-    public JDBCAdapter getAdapter() throws IOException {
-        if (adapter == null) {
-            setAdapter(createAdapter());
-        }
-        return adapter;
-    }
-
-    public DatabaseLocker getDatabaseLocker() throws IOException {
-        if (databaseLocker == null && isUseDatabaseLock()) {
-            setDatabaseLocker(loadDataBaseLocker());
-        }
-        return databaseLocker;
-    }
-
-    /**
-     * Sets the database locker strategy to use to lock the database on startup
-     * @throws IOException 
-     */
-    public void setDatabaseLocker(DatabaseLocker locker) throws IOException {
-        databaseLocker = locker;
-        databaseLocker.setPersistenceAdapter(this);
-        databaseLocker.setLockAcquireSleepInterval(getLockAcquireSleepInterval());
-    }
-
-    public DataSource getLockDataSource() throws IOException {
-        if (lockDataSource == null) {
-            lockDataSource = getDataSource();
-            if (lockDataSource == null) {
-                throw new IllegalArgumentException(
-                        "No dataSource property has been configured");
-            }
-        } else {
-            LOG.info("Using a separate dataSource for locking: "
-                    + lockDataSource);
-        }
-        return lockDataSource;
-    }
-    
-    public void setLockDataSource(DataSource dataSource) {
-        this.lockDataSource = dataSource;
-    }
-
-    public BrokerService getBrokerService() {
-        return brokerService;
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerService = brokerService;
-    }
-
-    /**
-     * @throws IOException
-     */
-    protected JDBCAdapter createAdapter() throws IOException {
-       
-        adapter = (JDBCAdapter) loadAdapter(adapterFactoryFinder, "adapter");
-       
-        // Use the default JDBC adapter if the
-        // Database type is not recognized.
-        if (adapter == null) {
-            adapter = new DefaultJDBCAdapter();
-            LOG.debug("Using default JDBC Adapter: " + adapter);
-        }
-        return adapter;
-    }
-
-    private Object loadAdapter(FactoryFinder finder, String kind) throws IOException {
-        Object adapter = null;
-        TransactionContext c = getTransactionContext();
-        try {
-            try {
-                // Make the filename file system safe.
-                String dirverName = c.getConnection().getMetaData().getDriverName();
-                dirverName = dirverName.replaceAll("[^a-zA-Z0-9\\-]", "_").toLowerCase();
-
-                try {
-                    adapter = finder.newInstance(dirverName);
-                    LOG.info("Database " + kind + " driver override recognized for : [" + dirverName + "] - adapter: " + adapter.getClass());
-                } catch (Throwable e) {
-                    LOG.info("Database " + kind + " driver override not found for : [" + dirverName
-                             + "].  Will use default implementation.");
-                }
-            } catch (SQLException e) {
-                LOG.warn("JDBC error occurred while trying to detect database type for overrides. Will use default implementations: "
-                          + e.getMessage());
-                JDBCPersistenceAdapter.log("Failure Details: ", e);
-            }
-        } finally {
-            c.close();
-        }
-        return adapter;
-    }
-
-    public void setAdapter(JDBCAdapter adapter) {
-        this.adapter = adapter;
-        this.adapter.setStatements(getStatements());
-        this.adapter.setMaxRows(getMaxRows());
-    }
-
-    public WireFormat getWireFormat() {
-        return wireFormat;
-    }
-
-    public void setWireFormat(WireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-    }
-
-    public TransactionContext getTransactionContext(ConnectionContext context) throws IOException {
-        if (context == null) {
-            return getTransactionContext();
-        } else {
-            TransactionContext answer = (TransactionContext)context.getLongTermStoreContext();
-            if (answer == null) {
-                answer = getTransactionContext();
-                context.setLongTermStoreContext(answer);
-            }
-            return answer;
-        }
-    }
-
-    public TransactionContext getTransactionContext() throws IOException {
-        TransactionContext answer = new TransactionContext(this);
-        if (transactionIsolation > 0) {
-            answer.setTransactionIsolation(transactionIsolation);
-        }
-        return answer;
-    }
-
-    public void beginTransaction(ConnectionContext context) throws IOException {
-        TransactionContext transactionContext = getTransactionContext(context);
-        transactionContext.begin();
-    }
-
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        TransactionContext transactionContext = getTransactionContext(context);
-        transactionContext.commit();
-    }
-
-    public void rollbackTransaction(ConnectionContext context) throws IOException {
-        TransactionContext transactionContext = getTransactionContext(context);
-        transactionContext.rollback();
-    }
-
-    public int getCleanupPeriod() {
-        return cleanupPeriod;
-    }
-
-    /**
-     * Sets the number of milliseconds until the database is attempted to be
-     * cleaned up for durable topics
-     */
-    public void setCleanupPeriod(int cleanupPeriod) {
-        this.cleanupPeriod = cleanupPeriod;
-    }
-
-    public void deleteAllMessages() throws IOException {
-        TransactionContext c = getTransactionContext();
-        try {
-            getAdapter().doDropTables(c);
-            getAdapter().setUseExternalMessageReferences(isUseExternalMessageReferences());
-            getAdapter().doCreateTables(c);
-            LOG.info("Persistence store purged.");
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create(e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public boolean isUseExternalMessageReferences() {
-        return useExternalMessageReferences;
-    }
-
-    public void setUseExternalMessageReferences(boolean useExternalMessageReferences) {
-        this.useExternalMessageReferences = useExternalMessageReferences;
-    }
-
-    public boolean isCreateTablesOnStartup() {
-        return createTablesOnStartup;
-    }
-
-    /**
-     * Sets whether or not tables are created on startup
-     */
-    public void setCreateTablesOnStartup(boolean createTablesOnStartup) {
-        this.createTablesOnStartup = createTablesOnStartup;
-    }
-
-    public boolean isUseDatabaseLock() {
-        return useDatabaseLock;
-    }
-
-    /**
-     * Sets whether or not an exclusive database lock should be used to enable
-     * JDBC Master/Slave. Enabled by default.
-     */
-    public void setUseDatabaseLock(boolean useDatabaseLock) {
-        this.useDatabaseLock = useDatabaseLock;
-    }
-
-    public static void log(String msg, SQLException e) {
-        String s = msg + e.getMessage();
-        while (e.getNextException() != null) {
-            e = e.getNextException();
-            s += ", due to: " + e.getMessage();
-        }
-        LOG.warn(s, e);
-    }
-
-    public Statements getStatements() {
-        if (statements == null) {
-            statements = new Statements();
-        }
-        return statements;
-    }
-
-    public void setStatements(Statements statements) {
-        this.statements = statements;
-    }
-
-    /**
-     * @param usageManager The UsageManager that is controlling the
-     *                destination's memory usage.
-     */
-    public void setUsageManager(SystemUsage usageManager) {
-    }
-
-    protected void databaseLockKeepAlive() {
-        boolean stop = false;
-        try {
-            DatabaseLocker locker = getDatabaseLocker();
-            if (locker != null) {
-                if (!locker.keepAlive()) {
-                    stop = true;
-                }
-            }
-        } catch (IOException e) {
-            LOG.error("Failed to get database when trying keepalive: " + e, e);
-        }
-        if (stop) {
-            stopBroker();
-        }
-    }
-
-    protected void stopBroker() {
-        // we can no longer keep the lock so lets fail
-        LOG.info("No longer able to keep the exclusive lock so giving up being a master");
-        try {
-            brokerService.stop();
-        } catch (Exception e) {
-            LOG.warn("Failure occurred while stopping broker");
-        }
-    }
-
-    protected DatabaseLocker loadDataBaseLocker() throws IOException {
-        DatabaseLocker locker = (DefaultDatabaseLocker) loadAdapter(lockFactoryFinder, "lock");       
-        if (locker == null) {
-            locker = new DefaultDatabaseLocker();
-            LOG.debug("Using default JDBC Locker: " + locker);
-        }
-        return locker;
-    }
-
-    public void setBrokerName(String brokerName) {
-    }
-
-    public String toString() {
-        return "JDBCPersistenceAdapter(" + super.toString() + ")";
-    }
-
-    public void setDirectory(File dir) {
-    }
-
-    // interesting bit here is proof that DB is ok
-    public void checkpoint(boolean sync) throws IOException {
-        // by pass TransactionContext to avoid IO Exception handler
-        Connection connection = null;
-        try {
-            connection = getDataSource().getConnection();
-        } catch (SQLException e) {
-            LOG.debug("Could not get JDBC connection for checkpoint: " + e);
-            throw IOExceptionSupport.create(e);
-        } finally {
-            if (connection != null) {
-                try {
-                    connection.close();
-                } catch (Throwable ignored) {
-                }
-            }
-        }
-    }
-
-    public long size(){
-        return 0;
-    }
-
-    public long getLockKeepAlivePeriod() {
-        return lockKeepAlivePeriod;
-    }
-
-    public void setLockKeepAlivePeriod(long lockKeepAlivePeriod) {
-        this.lockKeepAlivePeriod = lockKeepAlivePeriod;
-    }
-
-    public long getLockAcquireSleepInterval() {
-        return lockAcquireSleepInterval;
-    }
-
-    /**
-     * millisecond interval between lock acquire attempts, applied to newly created DefaultDatabaseLocker
-     * not applied if DataBaseLocker is injected.
-     */
-    public void setLockAcquireSleepInterval(long lockAcquireSleepInterval) {
-        this.lockAcquireSleepInterval = lockAcquireSleepInterval;
-    }
-    
-    /**
-     * set the Transaction isolation level to something other that TRANSACTION_READ_UNCOMMITTED
-     * This allowable dirty isolation level may not be achievable in clustered DB environments
-     * so a more restrictive and expensive option may be needed like TRANSACTION_REPEATABLE_READ
-     * see isolation level constants in {@link java.sql.Connection}
-     * @param transactionIsolation the isolation level to use
-     */
-    public void setTransactionIsolation(int transactionIsolation) {
-        this.transactionIsolation = transactionIsolation;
-    }
-
-	public int getMaxProducersToAudit() {
-		return maxProducersToAudit;
-	}
-
-	public void setMaxProducersToAudit(int maxProducersToAudit) {
-		this.maxProducersToAudit = maxProducersToAudit;
-	}
-
-	public int getMaxAuditDepth() {
-		return maxAuditDepth;
-	}
-
-	public void setMaxAuditDepth(int maxAuditDepth) {
-		this.maxAuditDepth = maxAuditDepth;
-	}
-
-	public boolean isEnableAudit() {
-		return enableAudit;
-	}
-
-	public void setEnableAudit(boolean enableAudit) {
-		this.enableAudit = enableAudit;
-	}
-
-    public int getAuditRecoveryDepth() {
-        return auditRecoveryDepth;
-    }
-
-    public void setAuditRecoveryDepth(int auditRecoveryDepth) {
-        this.auditRecoveryDepth = auditRecoveryDepth;
-    }
-
-    public long getNextSequenceId() {
-        synchronized(sequenceGenerator) {
-            return sequenceGenerator.getNextSequenceId();
-        }
-    }
-
-    public int getMaxRows() {
-        return maxRows;
-    }
-
-    /*
-     * the max rows return from queries, with sparse selectors this may need to be increased
-     */
-    public void setMaxRows(int maxRows) {
-        this.maxRows = maxRows;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCTopicMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCTopicMessageStore.java
deleted file mode 100755
index 044c213..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCTopicMessageStore.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JDBCTopicMessageStore extends JDBCMessageStore implements TopicMessageStore {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JDBCTopicMessageStore.class);
-    private Map<String, LastRecovered> subscriberLastRecoveredMap = new ConcurrentHashMap<String, LastRecovered>();
-
-    public JDBCTopicMessageStore(JDBCPersistenceAdapter persistenceAdapter, JDBCAdapter adapter, WireFormat wireFormat, ActiveMQTopic topic, ActiveMQMessageAudit audit) {
-        super(persistenceAdapter, adapter, wireFormat, topic, audit);
-    }
-
-    public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException {
-        if (ack != null && ack.isUnmatchedAck()) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("ignoring unmatched selector ack for: " + messageId + ", cleanup will get to this message after subsequent acks.");
-            }
-            return;
-        }
-        TransactionContext c = persistenceAdapter.getTransactionContext(context);
-        try {
-            long[] res = adapter.getStoreSequenceId(c, destination, messageId);
-            if (this.isPrioritizedMessages()) {
-                adapter.doSetLastAckWithPriority(c, destination, clientId, subscriptionName, res[0], res[1]);
-            } else {
-                adapter.doSetLastAck(c, destination, clientId, subscriptionName, res[0], res[1]);
-            }
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(clientId + ":" + subscriptionName + " ack, seq: " + res[0] + ", priority: " + res[1] + " mid:" + messageId);
-            }
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to store acknowledgment for: " + clientId + " on message " + messageId + " in container: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void recoverSubscription(String clientId, String subscriptionName, final MessageRecoveryListener listener) throws Exception {
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            adapter.doRecoverSubscription(c, destination, clientId, subscriptionName, new JDBCMessageRecoveryListener() {
-                public boolean recoverMessage(long sequenceId, byte[] data) throws Exception {
-                    Message msg = (Message)wireFormat.unmarshal(new ByteSequence(data));
-                    msg.getMessageId().setBrokerSequenceId(sequenceId);
-                    return listener.recoverMessage(msg);
-                }
-
-                public boolean recoverMessageReference(String reference) throws Exception {
-                    return listener.recoverMessageReference(new MessageId(reference));
-                }
-
-            });
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to recover subscription: " + clientId + ". Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    private class LastRecovered implements Iterable<LastRecoveredEntry> {
-        LastRecoveredEntry[] perPriority = new LastRecoveredEntry[10];
-        LastRecovered() {
-            for (int i=0; i<perPriority.length; i++) {
-                perPriority[i] = new LastRecoveredEntry(i);
-            }
-        }
-
-        public void updateStored(long sequence, int priority) {
-            perPriority[priority].stored = sequence;
-        }
-
-        public LastRecoveredEntry defaultPriority() {
-            return perPriority[javax.jms.Message.DEFAULT_PRIORITY];
-        }
-
-        public String toString() {
-            return Arrays.deepToString(perPriority);
-        }
-
-        public Iterator<LastRecoveredEntry> iterator() {
-            return new PriorityIterator();
-        }
-
-        class PriorityIterator implements Iterator<LastRecoveredEntry> {
-            int current = 9;
-            public boolean hasNext() {
-                for (int i=current; i>=0; i--) {
-                    if (perPriority[i].hasMessages()) {
-                        current = i;
-                        return true;
-                    }
-                }
-                return false;
-            }
-
-            public LastRecoveredEntry next() {
-                return perPriority[current];
-            }
-
-            public void remove() {
-                throw new RuntimeException("not implemented");
-            }
-        }
-    }
-
-    private class LastRecoveredEntry {
-        final int priority;
-        long recovered = 0;
-        long stored = Integer.MAX_VALUE;
-
-        public LastRecoveredEntry(int priority) {
-            this.priority = priority;
-        }
-
-        public String toString() {
-            return priority + "-" + stored + ":" + recovered;
-        }
-
-        public void exhausted() {
-            stored = recovered;
-        }
-
-        public boolean hasMessages() {
-            return stored > recovered;
-        }
-    }
-
-    class LastRecoveredAwareListener implements JDBCMessageRecoveryListener {
-        final MessageRecoveryListener delegate;
-        final int maxMessages;
-        LastRecoveredEntry lastRecovered;
-        int recoveredCount;
-        int recoveredMarker;
-
-        public LastRecoveredAwareListener(MessageRecoveryListener delegate, int maxMessages) {
-            this.delegate = delegate;
-            this.maxMessages = maxMessages;
-        }
-
-        public boolean recoverMessage(long sequenceId, byte[] data) throws Exception {
-            if (delegate.hasSpace()) {
-                Message msg = (Message) wireFormat.unmarshal(new ByteSequence(data));
-                msg.getMessageId().setBrokerSequenceId(sequenceId);
-                if (delegate.recoverMessage(msg)) {
-                    lastRecovered.recovered = sequenceId;
-                    recoveredCount++;
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        public boolean recoverMessageReference(String reference) throws Exception {
-            return delegate.recoverMessageReference(new MessageId(reference));
-        }
-
-        public void setLastRecovered(LastRecoveredEntry lastRecovered) {
-            this.lastRecovered = lastRecovered;
-            recoveredMarker = recoveredCount;
-        }
-
-        public boolean complete() {
-            return  !delegate.hasSpace() || recoveredCount == maxMessages;
-        }
-
-        public boolean stalled() {
-            return recoveredMarker == recoveredCount;
-        }
-    }
-
-    public synchronized void recoverNextMessages(final String clientId, final String subscriptionName, final int maxReturned, final MessageRecoveryListener listener)
-            throws Exception {
-        //Duration duration = new Duration("recoverNextMessages");
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-
-        String key = getSubscriptionKey(clientId, subscriptionName);
-        if (!subscriberLastRecoveredMap.containsKey(key)) {
-           subscriberLastRecoveredMap.put(key, new LastRecovered());
-        }
-        final LastRecovered lastRecovered = subscriberLastRecoveredMap.get(key);        
-        LastRecoveredAwareListener recoveredAwareListener = new LastRecoveredAwareListener(listener, maxReturned);
-        try {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(key + " existing last recovered: " + lastRecovered);
-            }
-            if (isPrioritizedMessages()) {
-                Iterator<LastRecoveredEntry> it = lastRecovered.iterator();
-                for ( ; it.hasNext() && !recoveredAwareListener.complete(); ) {
-                    LastRecoveredEntry entry = it.next();
-                    recoveredAwareListener.setLastRecovered(entry);
-                    //Duration microDuration = new Duration("recoverNextMessages:loop");
-                    adapter.doRecoverNextMessagesWithPriority(c, destination, clientId, subscriptionName,
-                        entry.recovered, entry.priority, maxReturned, recoveredAwareListener);
-                    //microDuration.end(entry);
-                    if (recoveredAwareListener.stalled()) {
-                        if (recoveredAwareListener.complete()) {
-                            break;
-                        } else {
-                            entry.exhausted();
-                        }
-                    }
-                }
-            } else {
-                LastRecoveredEntry last = lastRecovered.defaultPriority();
-                recoveredAwareListener.setLastRecovered(last);
-                adapter.doRecoverNextMessages(c, destination, clientId, subscriptionName,
-                        last.recovered, 0, maxReturned, recoveredAwareListener);
-            }
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(key + " last recovered: " + lastRecovered);
-            }
-            //duration.end();
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public void resetBatching(String clientId, String subscriptionName) {
-        subscriberLastRecoveredMap.remove(getSubscriptionKey(clientId, subscriptionName));
-    }
-
-    protected void onAdd(long sequenceId, byte priority) {
-        // update last recovered state
-        for (LastRecovered last : subscriberLastRecoveredMap.values()) {
-            last.updateStored(sequenceId, priority);
-        }
-    }
-
-
-    public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException {
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            c = persistenceAdapter.getTransactionContext();
-            adapter.doSetSubscriberEntry(c, subscriptionInfo, retroactive, isPrioritizedMessages());
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to lookup subscription for info: " + subscriptionInfo.getClientId() + ". Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.store.TopicMessageStore#lookupSubscription(String,
-     *      String)
-     */
-    public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            return adapter.doGetSubscriberEntry(c, destination, clientId, subscriptionName);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to lookup subscription for: " + clientId + ". Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            adapter.doDeleteSubscription(c, destination, clientId, subscriptionName);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to remove subscription for: " + clientId + ". Reason: " + e, e);
-        } finally {
-            c.close();
-            resetBatching(clientId, subscriptionName);
-        }
-    }
-
-    public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            return adapter.doGetAllSubscriptions(c, destination);
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to lookup subscriptions. Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-    }
-
-    public int getMessageCount(String clientId, String subscriberName) throws IOException {
-        //Duration duration = new Duration("getMessageCount");
-        int result = 0;
-        TransactionContext c = persistenceAdapter.getTransactionContext();
-        try {
-            result = adapter.doGetDurableSubscriberMessageCount(c, destination, clientId, subscriberName, isPrioritizedMessages());
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("JDBC Failure: ", e);
-            throw IOExceptionSupport.create("Failed to get Message Count: " + clientId + ". Reason: " + e, e);
-        } finally {
-            c.close();
-        }
-        if (LOG.isTraceEnabled()) {
-            LOG.trace(clientId + ":" + subscriberName + ", messageCount: " + result);
-        }
-        //duration.end();
-        return result;
-    }
-
-    protected String getSubscriptionKey(String clientId, String subscriberName) {
-        String result = clientId + ":";
-        result += subscriberName != null ? subscriberName : "NOT_SET";
-        return result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java
deleted file mode 100755
index 616a5c6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java
+++ /dev/null
@@ -1,813 +0,0 @@
-/**
- * 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.store.jdbc;
-
-/**
- * 
- * 
- * @org.apache.xbean.XBean element="statements"
- * 
- */
-public class Statements {
-
-    protected String messageTableName = "ACTIVEMQ_MSGS";
-    protected String durableSubAcksTableName = "ACTIVEMQ_ACKS";
-    protected String lockTableName = "ACTIVEMQ_LOCK";
-    protected String binaryDataType = "BLOB";
-    protected String containerNameDataType = "VARCHAR(250)";
-    protected String msgIdDataType = "VARCHAR(250)";
-    protected String sequenceDataType = "BIGINT";
-    protected String longDataType = "BIGINT";
-    protected String stringIdDataType = "VARCHAR(250)";
-    protected boolean useExternalMessageReferences;
-
-    private String tablePrefix = "";
-    private String addMessageStatement;
-    private String updateMessageStatement;
-    private String removeMessageStatement;
-    private String findMessageSequenceIdStatement;
-    private String findMessageStatement;
-    private String findMessageByIdStatement;
-    private String findAllMessagesStatement;
-    private String findLastSequenceIdInMsgsStatement;
-    private String findLastSequenceIdInAcksStatement;
-    private String createDurableSubStatement;
-    private String findDurableSubStatement;
-    private String findAllDurableSubsStatement;
-    private String updateLastPriorityAckRowOfDurableSubStatement;
-    private String deleteSubscriptionStatement;
-    private String findAllDurableSubMessagesStatement;
-    private String findDurableSubMessagesStatement;
-    private String findDurableSubMessagesByPriorityStatement;
-    private String findAllDestinationsStatement;
-    private String removeAllMessagesStatement;
-    private String removeAllSubscriptionsStatement;
-    private String deleteOldMessagesStatement;
-    private String[] createSchemaStatements;
-    private String[] dropSchemaStatements;
-    private String lockCreateStatement;
-    private String lockUpdateStatement;
-    private String nextDurableSubscriberMessageStatement;
-    private String durableSubscriberMessageCountStatement;
-    private String lastAckedDurableSubscriberMessageStatement;
-    private String destinationMessageCountStatement;
-    private String findNextMessagesStatement;
-    private String findNextMessagesByPriorityStatement;
-    private boolean useLockCreateWhereClause;
-    private String findAllMessageIdsStatement;
-    private String lastProducerSequenceIdStatement;
-    private String selectDurablePriorityAckStatement;
-
-    private String insertDurablePriorityAckStatement;
-    private String updateDurableLastAckStatement;
-    private String deleteOldMessagesStatementWithPriority;
-    private String durableSubscriberMessageCountStatementWithPriority;
-    private String dropAckPKAlterStatementEnd;
-
-    public String[] getCreateSchemaStatements() {
-        if (createSchemaStatements == null) {
-            createSchemaStatements = new String[] {
-                "CREATE TABLE " + getFullMessageTableName() + "(" + "ID " + sequenceDataType + " NOT NULL"
-                    + ", CONTAINER " + containerNameDataType + ", MSGID_PROD " + msgIdDataType + ", MSGID_SEQ "
-                    + sequenceDataType + ", EXPIRATION " + longDataType + ", MSG "
-                    + (useExternalMessageReferences ? stringIdDataType : binaryDataType)
-                    + ", PRIMARY KEY ( ID ) )",
-                "CREATE INDEX " + getFullMessageTableName() + "_MIDX ON " + getFullMessageTableName() + " (MSGID_PROD,MSGID_SEQ)",
-                "CREATE INDEX " + getFullMessageTableName() + "_CIDX ON " + getFullMessageTableName() + " (CONTAINER)",
-                "CREATE INDEX " + getFullMessageTableName() + "_EIDX ON " + getFullMessageTableName() + " (EXPIRATION)",
-                "CREATE TABLE " + getFullAckTableName() + "(" + "CONTAINER " + containerNameDataType + " NOT NULL"
-                    + ", SUB_DEST " + stringIdDataType 
-                    + ", CLIENT_ID " + stringIdDataType + " NOT NULL" + ", SUB_NAME " + stringIdDataType
-                    + " NOT NULL" + ", SELECTOR " + stringIdDataType + ", LAST_ACKED_ID " + sequenceDataType
-                    + ", PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))", 
-                "CREATE TABLE " + getFullLockTableName() 
-                    + "( ID " + longDataType + " NOT NULL, TIME " + longDataType 
-                    + ", BROKER_NAME " + stringIdDataType + ", PRIMARY KEY (ID) )",
-                "INSERT INTO " + getFullLockTableName() + "(ID) VALUES (1)", 
-                "ALTER TABLE " + getFullMessageTableName() + " ADD PRIORITY " + sequenceDataType,
-                "CREATE INDEX " + getFullMessageTableName() + "_PIDX ON " + getFullMessageTableName() + " (PRIORITY)",
-                "ALTER TABLE " + getFullAckTableName() + " ADD PRIORITY " + sequenceDataType  + " DEFAULT 5 NOT NULL",
-                "ALTER TABLE " + getFullAckTableName() + " " + getDropAckPKAlterStatementEnd(),
-                "ALTER TABLE " + getFullAckTableName() + " ADD PRIMARY KEY (CONTAINER, CLIENT_ID, SUB_NAME, PRIORITY)",
-            };
-        }
-        return createSchemaStatements;
-    }
-
-    public String getDropAckPKAlterStatementEnd() {
-        if (dropAckPKAlterStatementEnd == null) {
-            dropAckPKAlterStatementEnd = "DROP PRIMARY KEY";
-        }
-        return dropAckPKAlterStatementEnd;
-    }
-
-    public void setDropAckPKAlterStatementEnd(String dropAckPKAlterStatementEnd) {
-        this.dropAckPKAlterStatementEnd = dropAckPKAlterStatementEnd;
-    }
-
-    public String[] getDropSchemaStatements() {
-        if (dropSchemaStatements == null) {
-            dropSchemaStatements = new String[] {"DROP TABLE " + getFullAckTableName() + "",
-                                                 "DROP TABLE " + getFullMessageTableName() + "",
-                                                 "DROP TABLE " + getFullLockTableName() + ""};
-        }
-        return dropSchemaStatements;
-    }
-
-    public String getAddMessageStatement() {
-        if (addMessageStatement == null) {
-            addMessageStatement = "INSERT INTO "
-                                  + getFullMessageTableName()
-                                  + "(ID, MSGID_PROD, MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG) VALUES (?, ?, ?, ?, ?, ?, ?)";
-        }
-        return addMessageStatement;
-    }
-
-    public String getUpdateMessageStatement() {
-        if (updateMessageStatement == null) {
-            updateMessageStatement = "UPDATE " + getFullMessageTableName() + " SET MSG=? WHERE ID=?";
-        }
-        return updateMessageStatement;
-    }
-
-    public String getRemoveMessageStatement() {
-        if (removeMessageStatement == null) {
-            removeMessageStatement = "DELETE FROM " + getFullMessageTableName() + " WHERE ID=?";
-        }
-        return removeMessageStatement;
-    }
-
-    public String getFindMessageSequenceIdStatement() {
-        if (findMessageSequenceIdStatement == null) {
-            findMessageSequenceIdStatement = "SELECT ID, PRIORITY FROM " + getFullMessageTableName()
-                                             + " WHERE MSGID_PROD=? AND MSGID_SEQ=? AND CONTAINER=?";
-        }
-        return findMessageSequenceIdStatement;
-    }
-
-    public String getFindMessageStatement() {
-        if (findMessageStatement == null) {
-            findMessageStatement = "SELECT MSG FROM " + getFullMessageTableName() + " WHERE MSGID_PROD=? AND MSGID_SEQ=?";
-        }
-        return findMessageStatement;
-    }
-
-    public String getFindMessageByIdStatement() {
-        if (findMessageByIdStatement == null) {
-        	findMessageByIdStatement = "SELECT MSG FROM " + getFullMessageTableName() + " WHERE ID=?";
-        }
-        return findMessageByIdStatement;
-    }
-    
-    public String getFindAllMessagesStatement() {
-        if (findAllMessagesStatement == null) {
-            findAllMessagesStatement = "SELECT ID, MSG FROM " + getFullMessageTableName()
-                                       + " WHERE CONTAINER=? ORDER BY ID";
-        }
-        return findAllMessagesStatement;
-    }
-    
-    public String getFindAllMessageIdsStatement() {
-        //  this needs to be limited maybe need to use getFindLastSequenceIdInMsgsStatement
-        // and work back for X
-        if (findAllMessageIdsStatement == null) {
-            findAllMessageIdsStatement = "SELECT ID, MSGID_PROD, MSGID_SEQ FROM " + getFullMessageTableName()
-                                       + " ORDER BY ID DESC";
-        }
-        return findAllMessageIdsStatement;
-    }
-
-    public String getFindLastSequenceIdInMsgsStatement() {
-        if (findLastSequenceIdInMsgsStatement == null) {
-            findLastSequenceIdInMsgsStatement = "SELECT MAX(ID) FROM " + getFullMessageTableName();
-        }
-        return findLastSequenceIdInMsgsStatement;
-    }
-
-    public String getLastProducerSequenceIdStatement() {
-        if (lastProducerSequenceIdStatement == null) {
-            lastProducerSequenceIdStatement = "SELECT MAX(MSGID_SEQ) FROM " + getFullMessageTableName()
-                                            + " WHERE MSGID_PROD=?";
-        }
-        return lastProducerSequenceIdStatement;
-    }
-
-
-    public String getFindLastSequenceIdInAcksStatement() {
-        if (findLastSequenceIdInAcksStatement == null) {
-            findLastSequenceIdInAcksStatement = "SELECT MAX(LAST_ACKED_ID) FROM " + getFullAckTableName();
-        }
-        return findLastSequenceIdInAcksStatement;
-    }
-
-    public String getCreateDurableSubStatement() {
-        if (createDurableSubStatement == null) {
-            createDurableSubStatement = "INSERT INTO "
-                                        + getFullAckTableName()
-                                        + "(CONTAINER, CLIENT_ID, SUB_NAME, SELECTOR, LAST_ACKED_ID, SUB_DEST, PRIORITY) "
-                                        + "VALUES (?, ?, ?, ?, ?, ?, ?)";
-        }
-        return createDurableSubStatement;
-    }
-
-    public String getFindDurableSubStatement() {
-        if (findDurableSubStatement == null) {
-            findDurableSubStatement = "SELECT SELECTOR, SUB_DEST " + "FROM " + getFullAckTableName()
-                                      + " WHERE CONTAINER=? AND CLIENT_ID=? AND SUB_NAME=?";
-        }
-        return findDurableSubStatement;
-    }
-
-    public String getFindAllDurableSubsStatement() {
-        if (findAllDurableSubsStatement == null) {
-            findAllDurableSubsStatement = "SELECT SELECTOR, SUB_NAME, CLIENT_ID, SUB_DEST" + " FROM "
-                                          + getFullAckTableName() + " WHERE CONTAINER=? AND PRIORITY=0";
-        }
-        return findAllDurableSubsStatement;
-    }
-
-    public String getUpdateLastPriorityAckRowOfDurableSubStatement() {
-        if (updateLastPriorityAckRowOfDurableSubStatement == null) {
-            updateLastPriorityAckRowOfDurableSubStatement = "UPDATE " + getFullAckTableName() + " SET LAST_ACKED_ID=?"
-                                                 + " WHERE CONTAINER=? AND CLIENT_ID=? AND SUB_NAME=? AND PRIORITY=?";
-        }
-        return updateLastPriorityAckRowOfDurableSubStatement;
-    }
-
-    public String getDeleteSubscriptionStatement() {
-        if (deleteSubscriptionStatement == null) {
-            deleteSubscriptionStatement = "DELETE FROM " + getFullAckTableName()
-                                          + " WHERE CONTAINER=? AND CLIENT_ID=? AND SUB_NAME=?";
-        }
-        return deleteSubscriptionStatement;
-    }
-
-    public String getFindAllDurableSubMessagesStatement() {
-        if (findAllDurableSubMessagesStatement == null) {
-            findAllDurableSubMessagesStatement = "SELECT M.ID, M.MSG FROM " + getFullMessageTableName()
-                                                 + " M, " + getFullAckTableName() + " D "
-                                                 + " WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?"
-                                                 + " AND M.CONTAINER=D.CONTAINER AND M.ID > D.LAST_ACKED_ID"
-                                                 + " ORDER BY M.PRIORITY DESC, M.ID";
-        }
-        return findAllDurableSubMessagesStatement;
-    }
-
-    public String getFindDurableSubMessagesStatement() {
-        if (findDurableSubMessagesStatement == null) {
-            findDurableSubMessagesStatement = "SELECT M.ID, M.MSG FROM " + getFullMessageTableName() + " M, "
-                                              + getFullAckTableName() + " D "
-                                              + " WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?"
-                                              + " AND M.CONTAINER=D.CONTAINER AND M.ID > D.LAST_ACKED_ID"
-                                              + " AND M.ID > ?"
-                                              + " ORDER BY M.ID";
-        }
-        return findDurableSubMessagesStatement;
-    }
-    
-    public String getFindDurableSubMessagesByPriorityStatement() {
-        if (findDurableSubMessagesByPriorityStatement == null) {
-            findDurableSubMessagesByPriorityStatement = "SELECT M.ID, M.MSG FROM " + getFullMessageTableName() + " M,"
-                                              + " " + getFullAckTableName() + " D"
-                                              + " WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?"
-                                              + " AND M.CONTAINER=D.CONTAINER"
-                                              + " AND M.PRIORITY=D.PRIORITY AND M.ID > D.LAST_ACKED_ID"
-                                              + " AND M.ID > ? AND M.PRIORITY = ?"
-                                              + " ORDER BY M.ID";
-        }
-        return findDurableSubMessagesByPriorityStatement;
-    }    
-
-    public String findAllDurableSubMessagesStatement() {
-        if (findAllDurableSubMessagesStatement == null) {
-            findAllDurableSubMessagesStatement = "SELECT M.ID, M.MSG FROM " + getFullMessageTableName()
-                                                 + " M, " + getFullAckTableName() + " D "
-                                                 + " WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?"
-                                                 + " AND M.CONTAINER=D.CONTAINER AND M.ID > D.LAST_ACKED_ID"
-                                                 + " ORDER BY M.ID";
-        }
-        return findAllDurableSubMessagesStatement;
-    }
-
-    public String getNextDurableSubscriberMessageStatement() {
-        if (nextDurableSubscriberMessageStatement == null) {
-            nextDurableSubscriberMessageStatement = "SELECT M.ID, M.MSG FROM "
-                                                    + getFullMessageTableName()
-                                                    + " M, "
-                                                    + getFullAckTableName()
-                                                    + " D "
-                                                    + " WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?"
-                                                    + " AND M.CONTAINER=D.CONTAINER AND M.ID > ?"
-                                                    + " ORDER BY M.ID ";
-        }
-        return nextDurableSubscriberMessageStatement;
-    }
-
-    /**
-     * @return the durableSubscriberMessageCountStatement
-     */
-
-    public String getDurableSubscriberMessageCountStatement() {
-        if (durableSubscriberMessageCountStatement == null) {
-            durableSubscriberMessageCountStatement = "SELECT COUNT(*) FROM "
-                                                     + getFullMessageTableName()
-                                                     + " M, "
-                                                     + getFullAckTableName()
-                                                     + " D "
-                                                     + " WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?"
-                                                     + " AND M.CONTAINER=D.CONTAINER "
-                                                     + "     AND M.ID >"
-                                                     + "          ( SELECT LAST_ACKED_ID FROM " + getFullAckTableName()
-                                                     + "           WHERE CONTAINER=D.CONTAINER AND CLIENT_ID=D.CLIENT_ID"
-                                                     + "           AND SUB_NAME=D.SUB_NAME )";
-
-        }
-        return durableSubscriberMessageCountStatement;
-    }
-
-    public String getDurableSubscriberMessageCountStatementWithPriority() {
-        if (durableSubscriberMessageCountStatementWithPriority == null) {
-            durableSubscriberMessageCountStatementWithPriority = "SELECT COUNT(*) FROM "
-                                                     + getFullMessageTableName()
-                                                     + " M, "
-                                                     + getFullAckTableName()
-                                                     + " D "
-                                                     + " WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?"
-                                                     + " AND M.CONTAINER=D.CONTAINER "
-                                                     + " AND M.PRIORITY=D.PRIORITY "
-                                                     + " AND M.ID > D.LAST_ACKED_ID";
-        }
-
-        return durableSubscriberMessageCountStatementWithPriority;
-    }
-
-    public String getFindAllDestinationsStatement() {
-        if (findAllDestinationsStatement == null) {
-            findAllDestinationsStatement = "SELECT DISTINCT CONTAINER FROM " + getFullAckTableName();
-        }
-        return findAllDestinationsStatement;
-    }
-
-    public String getRemoveAllMessagesStatement() {
-        if (removeAllMessagesStatement == null) {
-            removeAllMessagesStatement = "DELETE FROM " + getFullMessageTableName() + " WHERE CONTAINER=?";
-        }
-        return removeAllMessagesStatement;
-    }
-
-    public String getRemoveAllSubscriptionsStatement() {
-        if (removeAllSubscriptionsStatement == null) {
-            removeAllSubscriptionsStatement = "DELETE FROM " + getFullAckTableName() + " WHERE CONTAINER=?";
-        }
-        return removeAllSubscriptionsStatement;
-    }
-
-    public String getDeleteOldMessagesStatementWithPriority() {
-        if (deleteOldMessagesStatementWithPriority == null) {
-            deleteOldMessagesStatementWithPriority = "DELETE FROM " + getFullMessageTableName()
-                                         + " WHERE ( EXPIRATION<>0 AND EXPIRATION<?)"
-                                         + " OR (ID <= "
-                                         + "     ( SELECT min(" + getFullAckTableName() + ".LAST_ACKED_ID)"
-                                         + "       FROM " + getFullAckTableName() + " WHERE "
-                                         +          getFullAckTableName() + ".CONTAINER="
-                                         +          getFullMessageTableName() + ".CONTAINER"
-                                         + "        AND " + getFullAckTableName() + ".PRIORITY=" + getFullMessageTableName() + ".PRIORITY )"
-                                         + "   )";
-        }
-        return deleteOldMessagesStatementWithPriority;
-    }
-
-    public String getDeleteOldMessagesStatement() {
-        if (deleteOldMessagesStatement == null) {
-            deleteOldMessagesStatement = "DELETE FROM " + getFullMessageTableName()
-                                         + " WHERE ( EXPIRATION<>0 AND EXPIRATION<?)"
-                                         + " OR (ID <= "
-                                         + "     ( SELECT min(" + getFullAckTableName() + ".LAST_ACKED_ID)"
-                                         + "       FROM " + getFullAckTableName() + " WHERE "
-                                         +          getFullAckTableName() + ".CONTAINER="
-                                         +          getFullMessageTableName() + ".CONTAINER )"
-                                         + "   )";
-
-        }
-        return deleteOldMessagesStatement;
-    }
-
-
-    public String getLockCreateStatement() {
-        if (lockCreateStatement == null) {
-            lockCreateStatement = "SELECT * FROM " + getFullLockTableName();
-            if (useLockCreateWhereClause) {
-                lockCreateStatement += " WHERE ID = 1";
-            }
-            lockCreateStatement += " FOR UPDATE";
-        }
-        return lockCreateStatement;
-    }
-
-    public String getLockUpdateStatement() {
-        if (lockUpdateStatement == null) {
-            lockUpdateStatement = "UPDATE " + getFullLockTableName() + " SET TIME = ? WHERE ID = 1";
-        }
-        return lockUpdateStatement;
-    }
-
-    /**
-     * @return the destinationMessageCountStatement
-     */
-    public String getDestinationMessageCountStatement() {
-        if (destinationMessageCountStatement == null) {
-            destinationMessageCountStatement = "SELECT COUNT(*) FROM " + getFullMessageTableName()
-                                               + " WHERE CONTAINER=?";
-        }
-        return destinationMessageCountStatement;
-    }
-
-    /**
-     * @return the findNextMessagesStatement
-     */
-    public String getFindNextMessagesStatement() {
-        if (findNextMessagesStatement == null) {
-            findNextMessagesStatement = "SELECT ID, MSG FROM " + getFullMessageTableName()
-                                        + " WHERE CONTAINER=? AND ID > ? ORDER BY ID";
-        }
-        return findNextMessagesStatement;
-    }
-
-    /**
-     * @return the findNextMessagesStatement
-     */
-    public String getFindNextMessagesByPriorityStatement() {
-        if (findNextMessagesByPriorityStatement == null) {
-            findNextMessagesByPriorityStatement = "SELECT ID, MSG FROM " + getFullMessageTableName()
-                                        + " WHERE CONTAINER=?"
-                                        + " AND ((ID > ? AND PRIORITY = ?) OR PRIORITY < ?)"
-                                        + " ORDER BY PRIORITY DESC, ID";
-        }
-        return findNextMessagesByPriorityStatement;
-    }    
-    
-    /**
-     * @return the lastAckedDurableSubscriberMessageStatement
-     */
-    public String getLastAckedDurableSubscriberMessageStatement() {
-        if (lastAckedDurableSubscriberMessageStatement == null) {
-            lastAckedDurableSubscriberMessageStatement = "SELECT MAX(LAST_ACKED_ID) FROM "
-                                                         + getFullAckTableName()
-                                                         + " WHERE CONTAINER=? AND CLIENT_ID=? AND SUB_NAME=?";                                                    
-        }
-        return lastAckedDurableSubscriberMessageStatement;
-    }
-
-    public String getSelectDurablePriorityAckStatement() {
-        if (selectDurablePriorityAckStatement == null) {
-            selectDurablePriorityAckStatement = "SELECT LAST_ACKED_ID FROM " + getFullAckTableName()
-                                                    + " WHERE CONTAINER=? AND CLIENT_ID=? AND SUB_NAME=?"
-                                                    + " AND PRIORITY = ?";
-        }
-        return selectDurablePriorityAckStatement;
-    }
-
-    public String getInsertDurablePriorityAckStatement() {
-        if (insertDurablePriorityAckStatement == null) {
-            insertDurablePriorityAckStatement = "INSERT INTO "
-                                  + getFullAckTableName()
-                                  + "(CONTAINER, CLIENT_ID, SUB_NAME, PRIORITY)"
-                                  + " VALUES (?, ?, ?, ?)";            
-       }
-        return insertDurablePriorityAckStatement;
-    }
-
-
-    public String getUpdateDurableLastAckStatement() {
-        if (updateDurableLastAckStatement == null) {
-            updateDurableLastAckStatement  = "UPDATE " + getFullAckTableName()
-                    + " SET LAST_ACKED_ID = ? WHERE CONTAINER=? AND CLIENT_ID=? AND SUB_NAME=?";
-        }
-        return  updateDurableLastAckStatement;
-    }
-
-    public String getFullMessageTableName() {
-        return getTablePrefix() + getMessageTableName();
-    }
-
-    public String getFullAckTableName() {
-        return getTablePrefix() + getDurableSubAcksTableName();
-    }
-
-    public String getFullLockTableName() {
-        return getTablePrefix() + getLockTableName();
-    }
-
-    /**
-     * @return Returns the containerNameDataType.
-     */
-    public String getContainerNameDataType() {
-        return containerNameDataType;
-    }
-
-    /**
-     * @param containerNameDataType The containerNameDataType to set.
-     */
-    public void setContainerNameDataType(String containerNameDataType) {
-        this.containerNameDataType = containerNameDataType;
-    }
-
-    /**
-     * @return Returns the messageDataType.
-     */
-    public String getBinaryDataType() {
-        return binaryDataType;
-    }
-
-    /**
-     * @param messageDataType The messageDataType to set.
-     */
-    public void setBinaryDataType(String messageDataType) {
-        this.binaryDataType = messageDataType;
-    }
-
-    /**
-     * @return Returns the messageTableName.
-     */
-    public String getMessageTableName() {
-        return messageTableName;
-    }
-
-    /**
-     * @param messageTableName The messageTableName to set.
-     */
-    public void setMessageTableName(String messageTableName) {
-        this.messageTableName = messageTableName;
-    }
-
-    /**
-     * @return Returns the msgIdDataType.
-     */
-    public String getMsgIdDataType() {
-        return msgIdDataType;
-    }
-
-    /**
-     * @param msgIdDataType The msgIdDataType to set.
-     */
-    public void setMsgIdDataType(String msgIdDataType) {
-        this.msgIdDataType = msgIdDataType;
-    }
-
-    /**
-     * @return Returns the sequenceDataType.
-     */
-    public String getSequenceDataType() {
-        return sequenceDataType;
-    }
-
-    /**
-     * @param sequenceDataType The sequenceDataType to set.
-     */
-    public void setSequenceDataType(String sequenceDataType) {
-        this.sequenceDataType = sequenceDataType;
-    }
-
-    /**
-     * @return Returns the tablePrefix.
-     */
-    public String getTablePrefix() {
-        return tablePrefix;
-    }
-
-    /**
-     * @param tablePrefix The tablePrefix to set.
-     */
-    public void setTablePrefix(String tablePrefix) {
-        this.tablePrefix = tablePrefix;
-    }
-
-    /**
-     * @return Returns the durableSubAcksTableName.
-     */
-    public String getDurableSubAcksTableName() {
-        return durableSubAcksTableName;
-    }
-
-    /**
-     * @param durableSubAcksTableName The durableSubAcksTableName to set.
-     */
-    public void setDurableSubAcksTableName(String durableSubAcksTableName) {
-        this.durableSubAcksTableName = durableSubAcksTableName;
-    }
-
-    public String getLockTableName() {
-        return lockTableName;
-    }
-
-    public void setLockTableName(String lockTableName) {
-        this.lockTableName = lockTableName;
-    }
-
-    public String getLongDataType() {
-        return longDataType;
-    }
-
-    public void setLongDataType(String longDataType) {
-        this.longDataType = longDataType;
-    }
-
-    public String getStringIdDataType() {
-        return stringIdDataType;
-    }
-
-    public void setStringIdDataType(String stringIdDataType) {
-        this.stringIdDataType = stringIdDataType;
-    }
-
-    public void setUseExternalMessageReferences(boolean useExternalMessageReferences) {
-        this.useExternalMessageReferences = useExternalMessageReferences;
-    }
-
-    public boolean isUseExternalMessageReferences() {
-        return useExternalMessageReferences;
-    }
-
-    public void setAddMessageStatement(String addMessageStatment) {
-        this.addMessageStatement = addMessageStatment;
-    }
-
-    public void setCreateDurableSubStatement(String createDurableSubStatment) {
-        this.createDurableSubStatement = createDurableSubStatment;
-    }
-
-    public void setCreateSchemaStatements(String[] createSchemaStatments) {
-        this.createSchemaStatements = createSchemaStatments;
-    }
-
-    public void setDeleteOldMessagesStatement(String deleteOldMessagesStatment) {
-        this.deleteOldMessagesStatement = deleteOldMessagesStatment;
-    }
-
-    public void setDeleteOldMessagesStatementWithPriority(String deleteOldMessagesStatmentWithPriority) {
-        this.deleteOldMessagesStatementWithPriority = deleteOldMessagesStatmentWithPriority;
-    }
-
-    public void setDeleteSubscriptionStatement(String deleteSubscriptionStatment) {
-        this.deleteSubscriptionStatement = deleteSubscriptionStatment;
-    }
-
-    public void setDropSchemaStatements(String[] dropSchemaStatments) {
-        this.dropSchemaStatements = dropSchemaStatments;
-    }
-
-    public void setFindAllDestinationsStatement(String findAllDestinationsStatment) {
-        this.findAllDestinationsStatement = findAllDestinationsStatment;
-    }
-
-    public void setFindAllDurableSubMessagesStatement(String findAllDurableSubMessagesStatment) {
-        this.findAllDurableSubMessagesStatement = findAllDurableSubMessagesStatment;
-    }
-
-    public void setFindAllDurableSubsStatement(String findAllDurableSubsStatment) {
-        this.findAllDurableSubsStatement = findAllDurableSubsStatment;
-    }
-
-    public void setFindAllMessagesStatement(String findAllMessagesStatment) {
-        this.findAllMessagesStatement = findAllMessagesStatment;
-    }
-
-    public void setFindDurableSubStatement(String findDurableSubStatment) {
-        this.findDurableSubStatement = findDurableSubStatment;
-    }
-
-    public void setFindLastSequenceIdInAcksStatement(String findLastSequenceIdInAcks) {
-        this.findLastSequenceIdInAcksStatement = findLastSequenceIdInAcks;
-    }
-
-    public void setFindLastSequenceIdInMsgsStatement(String findLastSequenceIdInMsgs) {
-        this.findLastSequenceIdInMsgsStatement = findLastSequenceIdInMsgs;
-    }
-
-    public void setFindMessageSequenceIdStatement(String findMessageSequenceIdStatment) {
-        this.findMessageSequenceIdStatement = findMessageSequenceIdStatment;
-    }
-
-    public void setFindMessageStatement(String findMessageStatment) {
-        this.findMessageStatement = findMessageStatment;
-    }
-    
-    public void setFindMessageByIdStatement(String findMessageByIdStatement) {
-        this.findMessageByIdStatement = findMessageByIdStatement;
-    }
-
-    public void setRemoveAllMessagesStatement(String removeAllMessagesStatment) {
-        this.removeAllMessagesStatement = removeAllMessagesStatment;
-    }
-
-    public void setRemoveAllSubscriptionsStatement(String removeAllSubscriptionsStatment) {
-        this.removeAllSubscriptionsStatement = removeAllSubscriptionsStatment;
-    }
-
-    public void setRemoveMessageStatment(String removeMessageStatement) {
-        this.removeMessageStatement = removeMessageStatement;
-    }
-
-    public void setUpdateLastPriorityAckRowOfDurableSubStatement(String updateLastPriorityAckRowOfDurableSubStatement) {
-        this.updateLastPriorityAckRowOfDurableSubStatement = updateLastPriorityAckRowOfDurableSubStatement;
-    }
-
-    public void setUpdateMessageStatement(String updateMessageStatment) {
-        this.updateMessageStatement = updateMessageStatment;
-    }
-
-    public boolean isUseLockCreateWhereClause() {
-        return useLockCreateWhereClause;
-    }
-
-    public void setUseLockCreateWhereClause(boolean useLockCreateWhereClause) {
-        this.useLockCreateWhereClause = useLockCreateWhereClause;
-    }
-
-    public void setLockCreateStatement(String lockCreateStatement) {
-        this.lockCreateStatement = lockCreateStatement;
-    }
-
-    public void setLockUpdateStatement(String lockUpdateStatement) {
-        this.lockUpdateStatement = lockUpdateStatement;
-    }
-
-    /**
-     * @param findDurableSubMessagesStatement the
-     *                findDurableSubMessagesStatement to set
-     */
-    public void setFindDurableSubMessagesStatement(String findDurableSubMessagesStatement) {
-        this.findDurableSubMessagesStatement = findDurableSubMessagesStatement;
-    }
-
-    /**
-     * @param nextDurableSubscriberMessageStatement the nextDurableSubscriberMessageStatement to set
-     */
-    public void setNextDurableSubscriberMessageStatement(String nextDurableSubscriberMessageStatement) {
-        this.nextDurableSubscriberMessageStatement = nextDurableSubscriberMessageStatement;
-    }
-
-    /**
-     * @param durableSubscriberMessageCountStatement the durableSubscriberMessageCountStatement to set
-     */
-    public void setDurableSubscriberMessageCountStatement(String durableSubscriberMessageCountStatement) {
-        this.durableSubscriberMessageCountStatement = durableSubscriberMessageCountStatement;
-    }
-
-    public void setDurableSubscriberMessageCountStatementWithPriority(String durableSubscriberMessageCountStatementWithPriority) {
-        this.durableSubscriberMessageCountStatementWithPriority = durableSubscriberMessageCountStatementWithPriority;
-    }
-
-    /**
-     * @param findNextMessagesStatement the findNextMessagesStatement to set
-     */
-    public void setFindNextMessagesStatement(String findNextMessagesStatement) {
-        this.findNextMessagesStatement = findNextMessagesStatement;
-    }
-
-    /**
-     * @param destinationMessageCountStatement the destinationMessageCountStatement to set
-     */
-    public void setDestinationMessageCountStatement(String destinationMessageCountStatement) {
-        this.destinationMessageCountStatement = destinationMessageCountStatement;
-    }
-
-    /**
-     * @param lastAckedDurableSubscriberMessageStatement the lastAckedDurableSubscriberMessageStatement to set
-     */
-    public void setLastAckedDurableSubscriberMessageStatement(
-                                                              String lastAckedDurableSubscriberMessageStatement) {
-        this.lastAckedDurableSubscriberMessageStatement = lastAckedDurableSubscriberMessageStatement;
-    }
-
-
-    public void setLastProducerSequenceIdStatement(String lastProducerSequenceIdStatement) {
-        this.lastProducerSequenceIdStatement = lastProducerSequenceIdStatement;
-    }
-
-    public void setSelectDurablePriorityAckStatement(String selectDurablePriorityAckStatement) {
-        this.selectDurablePriorityAckStatement = selectDurablePriorityAckStatement;
-    }
-
-    public void setInsertDurablePriorityAckStatement(String insertDurablePriorityAckStatement) {
-        this.insertDurablePriorityAckStatement = insertDurablePriorityAckStatement;
-    }
-
-    public void setUpdateDurableLastAckStatement(String updateDurableLastAckStatement) {
-        this.updateDurableLastAckStatement = updateDurableLastAckStatement;
-    }    
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java
deleted file mode 100755
index b8fbdf2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/TransactionContext.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import javax.sql.DataSource;
-
-import org.apache.activemq.util.IOExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Helps keep track of the current transaction/JDBC connection.
- * 
- * 
- */
-public class TransactionContext {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TransactionContext.class);
-
-    private final DataSource dataSource;
-    private final JDBCPersistenceAdapter persistenceAdapter;
-    private Connection connection;
-    private boolean inTx;
-    private PreparedStatement addMessageStatement;
-    private PreparedStatement removedMessageStatement;
-    private PreparedStatement updateLastAckStatement;
-    // a cheap dirty level that we can live with    
-    private int transactionIsolation = Connection.TRANSACTION_READ_UNCOMMITTED;
-    
-    public TransactionContext(JDBCPersistenceAdapter persistenceAdapter) throws IOException {
-        this.persistenceAdapter = persistenceAdapter;
-        this.dataSource = persistenceAdapter.getDataSource();
-    }
-
-    public Connection getConnection() throws IOException {
-        if (connection == null) {
-            try {
-                connection = dataSource.getConnection();
-                boolean autoCommit = !inTx;
-                if (connection.getAutoCommit() != autoCommit) {
-                    connection.setAutoCommit(autoCommit);
-                }
-            } catch (SQLException e) {
-                JDBCPersistenceAdapter.log("Could not get JDBC connection: ", e);
-                IOException ioe = IOExceptionSupport.create(e);
-                persistenceAdapter.getBrokerService().handleIOException(ioe);
-                throw ioe;
-
-            }
-
-            try {
-                connection.setTransactionIsolation(transactionIsolation);
-            } catch (Throwable e) {
-            }
-        }
-        return connection;
-    }
-
-    public void executeBatch() throws SQLException {
-        try {
-            executeBatch(addMessageStatement, "Failed add a message");
-        } finally {
-            addMessageStatement = null;
-            try {
-                executeBatch(removedMessageStatement, "Failed to remove a message");
-            } finally {
-                removedMessageStatement = null;
-                try {
-                    executeBatch(updateLastAckStatement, "Failed to ack a message");
-                } finally {
-                    updateLastAckStatement = null;
-                }
-            }
-        }
-    }
-
-    private void executeBatch(PreparedStatement p, String message) throws SQLException {
-        if (p == null) {
-            return;
-        }
-
-        try {
-            int[] rc = p.executeBatch();
-            for (int i = 0; i < rc.length; i++) {
-                int code = rc[i];
-                if (code < 0 && code != Statement.SUCCESS_NO_INFO) {
-                    throw new SQLException(message + ". Response code: " + code);
-                }
-            }
-        } finally {
-            try {
-                p.close();
-            } catch (Throwable e) {
-            }
-        }
-    }
-
-    public void close() throws IOException {
-        if (!inTx) {
-            try {
-
-                /**
-                 * we are not in a transaction so should not be committing ??
-                 * This was previously commented out - but had adverse affects
-                 * on testing - so it's back!
-                 * 
-                 */
-                try {
-                    executeBatch();
-                } finally {
-                    if (connection != null && !connection.getAutoCommit()) {
-                        connection.commit();
-                    }
-                }
-
-            } catch (SQLException e) {
-                JDBCPersistenceAdapter.log("Error while closing connection: ", e);
-                throw IOExceptionSupport.create(e);
-            } finally {
-                try {
-                    if (connection != null) {
-                        connection.close();
-                    }
-                } catch (Throwable e) {
-                    LOG.warn("Close failed: " + e.getMessage(), e);
-                } finally {
-                    connection = null;
-                }
-            }
-        }
-    }
-
-    public void begin() throws IOException {
-        if (inTx) {
-            throw new IOException("Already started.");
-        }
-        inTx = true;
-        connection = getConnection();
-    }
-
-    public void commit() throws IOException {
-        if (!inTx) {
-            throw new IOException("Not started.");
-        }
-        try {
-            executeBatch();
-            if (!connection.getAutoCommit()) {
-                connection.commit();
-            }
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("Commit failed: ", e);
-            
-            this.rollback(); 
-            
-            throw IOExceptionSupport.create(e);
-        } finally {
-            inTx = false;
-            close();
-        }
-    }
-
-    public void rollback() throws IOException {
-        if (!inTx) {
-            throw new IOException("Not started.");
-        }
-        try {
-            if (addMessageStatement != null) {
-                addMessageStatement.close();
-                addMessageStatement = null;
-            }
-            if (removedMessageStatement != null) {
-                removedMessageStatement.close();
-                removedMessageStatement = null;
-            }
-            if (updateLastAckStatement != null) {
-                updateLastAckStatement.close();
-                updateLastAckStatement = null;
-            }
-            connection.rollback();
-
-        } catch (SQLException e) {
-            JDBCPersistenceAdapter.log("Rollback failed: ", e);
-            throw IOExceptionSupport.create(e);
-        } finally {
-            inTx = false;
-            close();
-        }
-    }
-
-    public PreparedStatement getAddMessageStatement() {
-        return addMessageStatement;
-    }
-
-    public void setAddMessageStatement(PreparedStatement addMessageStatement) {
-        this.addMessageStatement = addMessageStatement;
-    }
-
-    public PreparedStatement getUpdateLastAckStatement() {
-        return updateLastAckStatement;
-    }
-
-    public void setUpdateLastAckStatement(PreparedStatement ackMessageStatement) {
-        this.updateLastAckStatement = ackMessageStatement;
-    }
-
-    public PreparedStatement getRemovedMessageStatement() {
-        return removedMessageStatement;
-    }
-
-    public void setRemovedMessageStatement(PreparedStatement removedMessageStatement) {
-        this.removedMessageStatement = removedMessageStatement;
-    }
-    
-    public void setTransactionIsolation(int transactionIsolation) {
-        this.transactionIsolation = transactionIsolation;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java
deleted file mode 100755
index d84e5df..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * Axion specific Adapter.
- * 
- * Axion does not seem to support ALTER statements or sub-selects.  This means:
- * - We cannot auto upgrade the schema was we roll out new versions of ActiveMQ
- * - We cannot delete durable sub messages that have be acknowledged by all consumers.
- * 
- * @org.apache.xbean.XBean element="axionJDBCAdapter"
- * 
- */
-public class AxionJDBCAdapter extends StreamJDBCAdapter {
-
-    public void setStatements(Statements statements) {
-        
-        String[] createStatements = new String[]{
-            "CREATE TABLE " + statements.getFullMessageTableName() + "("
-                + "ID " + statements.getSequenceDataType() + " NOT NULL"
-                + ", CONTAINER " + statements.getContainerNameDataType()
-                + ", MSGID_PROD " + statements.getMsgIdDataType()
-                + ", MSGID_SEQ " + statements.getSequenceDataType()
-                + ", EXPIRATION " + statements.getLongDataType()
-                + ", MSG " + (statements.isUseExternalMessageReferences() ? statements.getStringIdDataType() : statements.getBinaryDataType())
-                + ", PRIMARY KEY ( ID ) )",                          
-            "CREATE INDEX " + statements.getFullMessageTableName() + "_MIDX ON " + statements.getFullMessageTableName() + " (MSGID_PROD,MSGID_SEQ)",
-            "CREATE INDEX " + statements.getFullMessageTableName() + "_CIDX ON " + statements.getFullMessageTableName() + " (CONTAINER)",                                       
-            "CREATE INDEX " + statements.getFullMessageTableName() + "_EIDX ON " + statements.getFullMessageTableName() + " (EXPIRATION)",                 
-            "CREATE TABLE " + statements.getFullAckTableName() + "("
-                + "CONTAINER " + statements.getContainerNameDataType() + " NOT NULL"
-                + ", SUB_DEST " + statements.getContainerNameDataType()
-                + ", CLIENT_ID " + statements.getStringIdDataType() + " NOT NULL"
-                + ", SUB_NAME " + statements.getStringIdDataType() + " NOT NULL"
-                + ", SELECTOR " + statements.getStringIdDataType()
-                + ", LAST_ACKED_ID " + statements.getSequenceDataType()
-                + ", PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))"
-        };
-        statements.setCreateSchemaStatements(createStatements);
-        statements.setDeleteOldMessagesStatement("DELETE FROM " + statements.getFullMessageTableName() + " WHERE ( EXPIRATION<>0 AND EXPIRATION<?)");
-        statements.setLongDataType("LONG");
-        statements.setSequenceDataType("LONG");
-        
-        super.setStatements(statements);
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/BlobJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/BlobJDBCAdapter.java
deleted file mode 100755
index 37c4971..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/BlobJDBCAdapter.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.sql.Blob;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.store.jdbc.TransactionContext;
-import org.apache.activemq.util.ByteArrayOutputStream;
-
-/**
- * This JDBCAdapter inserts and extracts BLOB data using the getBlob()/setBlob()
- * operations. This is a little more involved since to insert a blob you have
- * to:
- * 
- * 1: insert empty blob. 2: select the blob 3: finally update the blob with data
- * value.
- * 
- * The databases/JDBC drivers that use this adapter are:
- * <ul>
- * <li></li>
- * </ul>
- * 
- * @org.apache.xbean.XBean element="blobJDBCAdapter"
- * 
- * 
- */
-public class BlobJDBCAdapter extends DefaultJDBCAdapter {
-
-    public void doAddMessage(Connection c, long seq, String messageID, String destinationName, byte[] data)
-        throws SQLException, JMSException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        try {
-
-            // Add the Blob record.
-            s = c.prepareStatement(statements.getAddMessageStatement());
-            s.setLong(1, seq);
-            s.setString(2, destinationName);
-            s.setString(3, messageID);
-            s.setString(4, " ");
-
-            if (s.executeUpdate() != 1) {
-                throw new JMSException("Failed to broker message: " + messageID + " in container.");
-            }
-            s.close();
-
-            // Select the blob record so that we can update it.
-            s = c.prepareStatement(statements.getFindMessageStatement());
-            s.setLong(1, seq);
-            rs = s.executeQuery();
-            if (!rs.next()) {
-                throw new JMSException("Failed to broker message: " + messageID + " in container.");
-            }
-
-            // Update the blob
-            Blob blob = rs.getBlob(1);
-            OutputStream stream = blob.setBinaryStream(data.length);
-            stream.write(data);
-            stream.close();
-            s.close();
-
-            // Update the row with the updated blob
-            s = c.prepareStatement(statements.getUpdateMessageStatement());
-            s.setBlob(1, blob);
-            s.setLong(2, seq);
-
-        } catch (IOException e) {
-            throw (SQLException)new SQLException("BLOB could not be updated: " + e).initCause(e);
-        } finally {
-            try {
-                rs.close();
-            } catch (Throwable ignore) {
-            }
-            try {
-                s.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    public byte[] doGetMessage(TransactionContext c, long seq) throws SQLException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        try {
-
-            s = c.getConnection().prepareStatement(statements.getFindMessageStatement());
-            s.setLong(1, seq);
-            rs = s.executeQuery();
-
-            if (!rs.next()) {
-                return null;
-            }
-            Blob blob = rs.getBlob(1);
-            InputStream is = blob.getBinaryStream();
-
-            ByteArrayOutputStream os = new ByteArrayOutputStream((int)blob.length());
-            int ch;
-            while ((ch = is.read()) >= 0) {
-                os.write(ch);
-            }
-            is.close();
-            os.close();
-
-            return os.toByteArray();
-
-        } catch (IOException e) {
-            throw (SQLException)new SQLException("BLOB could not be updated: " + e).initCause(e);
-        } finally {
-            try {
-                rs.close();
-            } catch (Throwable ignore) {
-            }
-            try {
-                s.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/BytesJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/BytesJDBCAdapter.java
deleted file mode 100755
index 5ddfc1a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/BytesJDBCAdapter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-/**
- * This JDBCAdapter inserts and extracts BLOB data using the
- * setBytes()/getBytes() operations. The databases/JDBC drivers that use this
- * adapter are:
- * 
- * @org.apache.xbean.XBean element="bytesJDBCAdapter"
- * 
- */
-public class BytesJDBCAdapter extends DefaultJDBCAdapter {
-
-    /**
-     * @see org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#getBinaryData(java.sql.ResultSet,
-     *      int)
-     */
-    protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
-        return rs.getBytes(index);
-    }
-
-    /**
-     * @see org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#setBinaryData(java.sql.PreparedStatement,
-     *      int, byte[])
-     */
-    protected void setBinaryData(PreparedStatement s, int index, byte[] data) throws SQLException {
-        s.setBytes(index, data);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
deleted file mode 100644
index efd3a1b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.sql.Blob;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * 
- * @org.apache.xbean.XBean element="db2JDBCAdapter"
- */
-public class DB2JDBCAdapter extends DefaultJDBCAdapter {
-
-    public void setStatements(Statements statements) {
-        String lockCreateStatement = "LOCK TABLE " + statements.getFullLockTableName() + " IN EXCLUSIVE MODE";
-        statements.setLockCreateStatement(lockCreateStatement);
-
-        super.setStatements(statements);
-    }
-
-    protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
-        // Get as a BLOB
-        Blob aBlob = rs.getBlob(index);
-        return aBlob.getBytes(1, (int) aBlob.length());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java
deleted file mode 100755
index 27e4c9d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java
+++ /dev/null
@@ -1,1031 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.io.IOException;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.store.jdbc.JDBCAdapter;
-import org.apache.activemq.store.jdbc.JDBCMessageIdScanListener;
-import org.apache.activemq.store.jdbc.JDBCMessageRecoveryListener;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.jdbc.Statements;
-import org.apache.activemq.store.jdbc.TransactionContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Implements all the default JDBC operations that are used by the JDBCPersistenceAdapter. <p/> sub-classing is
- * encouraged to override the default implementation of methods to account for differences in JDBC Driver
- * implementations. <p/> The JDBCAdapter inserts and extracts BLOB data using the getBytes()/setBytes() operations. <p/>
- * The databases/JDBC drivers that use this adapter are:
- * <ul>
- * <li></li>
- * </ul>
- * 
- * @org.apache.xbean.XBean element="defaultJDBCAdapter"
- * 
- * 
- */
-public class DefaultJDBCAdapter implements JDBCAdapter {
-    private static final Logger LOG = LoggerFactory.getLogger(DefaultJDBCAdapter.class);
-    public static final int MAX_ROWS = 10000;
-    protected Statements statements;
-    protected boolean batchStatments = true;
-    protected boolean prioritizedMessages;
-    protected ReadWriteLock cleanupExclusiveLock = new ReentrantReadWriteLock();
-    // needs to be min twice the prefetch for a durable sub and large enough for selector range
-    protected int maxRows = MAX_ROWS;
-
-    protected void setBinaryData(PreparedStatement s, int index, byte data[]) throws SQLException {
-        s.setBytes(index, data);
-    }
-
-    protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
-        return rs.getBytes(index);
-    }
-
-    public void doCreateTables(TransactionContext c) throws SQLException, IOException {
-        Statement s = null;
-        cleanupExclusiveLock.writeLock().lock();
-        try {
-            // Check to see if the table already exists. If it does, then don't
-            // log warnings during startup.
-            // Need to run the scripts anyways since they may contain ALTER
-            // statements that upgrade a previous version
-            // of the table
-            boolean alreadyExists = false;
-            ResultSet rs = null;
-            try {
-                rs = c.getConnection().getMetaData().getTables(null, null, this.statements.getFullMessageTableName(),
-                        new String[] { "TABLE" });
-                alreadyExists = rs.next();
-            } catch (Throwable ignore) {
-            } finally {
-                close(rs);
-            }
-            s = c.getConnection().createStatement();
-            String[] createStatments = this.statements.getCreateSchemaStatements();
-            for (int i = 0; i < createStatments.length; i++) {
-                // This will fail usually since the tables will be
-                // created already.
-                try {
-                    LOG.debug("Executing SQL: " + createStatments[i]);
-                    s.execute(createStatments[i]);
-                } catch (SQLException e) {
-                    if (alreadyExists) {
-                        LOG.debug("Could not create JDBC tables; The message table already existed." + " Failure was: "
-                                + createStatments[i] + " Message: " + e.getMessage() + " SQLState: " + e.getSQLState()
-                                + " Vendor code: " + e.getErrorCode());
-                    } else {
-                        LOG.warn("Could not create JDBC tables; they could already exist." + " Failure was: "
-                                + createStatments[i] + " Message: " + e.getMessage() + " SQLState: " + e.getSQLState()
-                                + " Vendor code: " + e.getErrorCode());
-                        JDBCPersistenceAdapter.log("Failure details: ", e);
-                    }
-                }
-            }
-            c.getConnection().commit();
-        } finally {
-            cleanupExclusiveLock.writeLock().unlock();
-            try {
-                s.close();
-            } catch (Throwable e) {
-            }
-        }
-    }
-
-    public void doDropTables(TransactionContext c) throws SQLException, IOException {
-        Statement s = null;
-        cleanupExclusiveLock.writeLock().lock();
-        try {
-            s = c.getConnection().createStatement();
-            String[] dropStatments = this.statements.getDropSchemaStatements();
-            for (int i = 0; i < dropStatments.length; i++) {
-                // This will fail usually since the tables will be
-                // created already.
-                try {
-                    LOG.debug("Executing SQL: " + dropStatments[i]);
-                    s.execute(dropStatments[i]);
-                } catch (SQLException e) {
-                    LOG.warn("Could not drop JDBC tables; they may not exist." + " Failure was: " + dropStatments[i]
-                            + " Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: "
-                            + e.getErrorCode());
-                    JDBCPersistenceAdapter.log("Failure details: ", e);
-                }
-            }
-            c.getConnection().commit();
-        } finally {
-            cleanupExclusiveLock.writeLock().unlock();
-            try {
-                s.close();
-            } catch (Throwable e) {
-            }
-        }
-    }
-
-    public long doGetLastMessageStoreSequenceId(TransactionContext c) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindLastSequenceIdInMsgsStatement());
-            rs = s.executeQuery();
-            long seq1 = 0;
-            if (rs.next()) {
-                seq1 = rs.getLong(1);
-            }
-            rs.close();
-            s.close();
-            s = c.getConnection().prepareStatement(this.statements.getFindLastSequenceIdInAcksStatement());
-            rs = s.executeQuery();
-            long seq2 = 0;
-            if (rs.next()) {
-                seq2 = rs.getLong(1);
-            }
-            long seq = Math.max(seq1, seq2);
-            return seq;
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-    
-    public byte[] doGetMessageById(TransactionContext c, long storeSequenceId) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(
-                    this.statements.getFindMessageByIdStatement());
-            s.setLong(1, storeSequenceId);
-            rs = s.executeQuery();
-            if (!rs.next()) {
-                return null;
-            }
-            return getBinaryData(rs, 1);
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-    
-
-    public void doAddMessage(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, byte[] data,
-            long expiration, byte priority) throws SQLException, IOException {
-        PreparedStatement s = c.getAddMessageStatement();
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            if (s == null) {
-                s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
-                if (this.batchStatments) {
-                    c.setAddMessageStatement(s);
-                }
-            }
-            s.setLong(1, sequence);
-            s.setString(2, messageID.getProducerId().toString());
-            s.setLong(3, messageID.getProducerSequenceId());
-            s.setString(4, destination.getQualifiedName());
-            s.setLong(5, expiration);
-            s.setLong(6, priority);
-            setBinaryData(s, 7, data);
-            if (this.batchStatments) {
-                s.addBatch();
-            } else if (s.executeUpdate() != 1) {
-                throw new SQLException("Failed add a message");
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            if (!this.batchStatments) {
-                if (s != null) {
-                    s.close();
-                }
-            }
-        }
-    }
-
-    public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
-            long expirationTime, String messageRef) throws SQLException, IOException {
-        PreparedStatement s = c.getAddMessageStatement();
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            if (s == null) {
-                s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
-                if (this.batchStatments) {
-                    c.setAddMessageStatement(s);
-                }
-            }
-            s.setLong(1, messageID.getBrokerSequenceId());
-            s.setString(2, messageID.getProducerId().toString());
-            s.setLong(3, messageID.getProducerSequenceId());
-            s.setString(4, destination.getQualifiedName());
-            s.setLong(5, expirationTime);
-            s.setString(6, messageRef);
-            if (this.batchStatments) {
-                s.addBatch();
-            } else if (s.executeUpdate() != 1) {
-                throw new SQLException("Failed add a message");
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            if (!this.batchStatments) {
-                s.close();
-            }
-        }
-    }
-
-    public long[] getStoreSequenceId(TransactionContext c, ActiveMQDestination destination, MessageId messageID) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindMessageSequenceIdStatement());
-            s.setString(1, messageID.getProducerId().toString());
-            s.setLong(2, messageID.getProducerSequenceId());
-            s.setString(3, destination.getQualifiedName());
-            rs = s.executeQuery();
-            if (!rs.next()) {
-                return new long[]{0,0};
-            }
-            return new long[]{rs.getLong(1), rs.getLong(2)};
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public byte[] doGetMessage(TransactionContext c, MessageId id) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindMessageStatement());
-            s.setString(1, id.getProducerId().toString());
-            s.setLong(2, id.getProducerSequenceId());
-            rs = s.executeQuery();
-            if (!rs.next()) {
-                return null;
-            }
-            return getBinaryData(rs, 1);
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public String doGetMessageReference(TransactionContext c, long seq) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindMessageStatement());
-            s.setLong(1, seq);
-            rs = s.executeQuery();
-            if (!rs.next()) {
-                return null;
-            }
-            return rs.getString(1);
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public void doRemoveMessage(TransactionContext c, long seq) throws SQLException, IOException {
-        PreparedStatement s = c.getRemovedMessageStatement();
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            if (s == null) {
-                s = c.getConnection().prepareStatement(this.statements.getRemoveMessageStatement());
-                if (this.batchStatments) {
-                    c.setRemovedMessageStatement(s);
-                }
-            }
-            s.setLong(1, seq);
-            if (this.batchStatments) {
-                s.addBatch();
-            } else if (s.executeUpdate() != 1) {
-                throw new SQLException("Failed to remove message");
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            if (!this.batchStatments && s != null) {
-                s.close();
-            }
-        }
-    }
-
-    public void doRecover(TransactionContext c, ActiveMQDestination destination, JDBCMessageRecoveryListener listener)
-            throws Exception {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindAllMessagesStatement());
-            s.setString(1, destination.getQualifiedName());
-            rs = s.executeQuery();
-            if (this.statements.isUseExternalMessageReferences()) {
-                while (rs.next()) {
-                    if (!listener.recoverMessageReference(rs.getString(2))) {
-                        break;
-                    }
-                }
-            } else {
-                while (rs.next()) {
-                    if (!listener.recoverMessage(rs.getLong(1), getBinaryData(rs, 2))) {
-                        break;
-                    }
-                }
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public void doMessageIdScan(TransactionContext c, int limit, 
-            JDBCMessageIdScanListener listener) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindAllMessageIdsStatement());
-            s.setMaxRows(limit);
-            rs = s.executeQuery();
-            // jdbc scrollable cursor requires jdbc ver > 1.0 and is often implemented locally so avoid
-            LinkedList<MessageId> reverseOrderIds = new LinkedList<MessageId>();
-            while (rs.next()) {
-                reverseOrderIds.addFirst(new MessageId(rs.getString(2), rs.getLong(3)));
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("messageIdScan with limit (" + limit + "), resulted in: " + reverseOrderIds.size() + " ids");
-            }
-            for (MessageId id : reverseOrderIds) {
-                listener.messageId(id);
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-    
-    public void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId,
-            String subscriptionName, long seq, long prio) throws SQLException, IOException {
-        PreparedStatement s = c.getUpdateLastAckStatement();
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            if (s == null) {
-                s = c.getConnection().prepareStatement(this.statements.getUpdateLastPriorityAckRowOfDurableSubStatement());
-                if (this.batchStatments) {
-                    c.setUpdateLastAckStatement(s);
-                }
-            }
-            s.setLong(1, seq);
-            s.setString(2, destination.getQualifiedName());
-            s.setString(3, clientId);
-            s.setString(4, subscriptionName);
-            s.setLong(5, prio);
-            if (this.batchStatments) {
-                s.addBatch();
-            } else if (s.executeUpdate() != 1) {
-                throw new SQLException("Failed update last ack with priority: " + prio + ", for sub: " + subscriptionName);
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            if (!this.batchStatments) {
-                close(s);
-            }
-        }
-    }
-
-
-    public void doSetLastAck(TransactionContext c, ActiveMQDestination destination, String clientId,
-                                        String subscriptionName, long seq, long priority) throws SQLException, IOException {
-        PreparedStatement s = c.getUpdateLastAckStatement();
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            if (s == null) {
-                s = c.getConnection().prepareStatement(this.statements.getUpdateDurableLastAckStatement());
-                if (this.batchStatments) {
-                    c.setUpdateLastAckStatement(s);
-                }
-            }
-            s.setLong(1, seq);
-            s.setString(2, destination.getQualifiedName());
-            s.setString(3, clientId);
-            s.setString(4, subscriptionName);
-
-            if (this.batchStatments) {
-                s.addBatch();
-            } else if (s.executeUpdate() != 1) {
-                throw new IOException("Could not update last ack seq : "
-                            + seq + ", for sub: " + subscriptionName);
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            if (!this.batchStatments) {
-                close(s);
-            }            
-        }
-    }
-
-    public void doRecoverSubscription(TransactionContext c, ActiveMQDestination destination, String clientId,
-            String subscriptionName, JDBCMessageRecoveryListener listener) throws Exception {
-        // dumpTables(c,
-        // destination.getQualifiedName(),clientId,subscriptionName);
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindAllDurableSubMessagesStatement());
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriptionName);
-            rs = s.executeQuery();
-            if (this.statements.isUseExternalMessageReferences()) {
-                while (rs.next()) {
-                    if (!listener.recoverMessageReference(rs.getString(2))) {
-                        break;
-                    }
-                }
-            } else {
-                while (rs.next()) {
-                    if (!listener.recoverMessage(rs.getLong(1), getBinaryData(rs, 2))) {
-                        break;
-                    }
-                }
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, String clientId,
-            String subscriptionName, long seq, long priority, int maxReturned, JDBCMessageRecoveryListener listener) throws Exception {
-        
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindDurableSubMessagesStatement());
-            s.setMaxRows(Math.max(maxReturned * 2, maxRows));
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriptionName);
-            s.setLong(4, seq);
-            rs = s.executeQuery();
-            int count = 0;
-            if (this.statements.isUseExternalMessageReferences()) {
-                while (rs.next() && count < maxReturned) {
-                    if (listener.recoverMessageReference(rs.getString(1))) {
-                        count++;
-                    }
-                }
-            } else {
-                while (rs.next() && count < maxReturned) {
-                    if (listener.recoverMessage(rs.getLong(1), getBinaryData(rs, 2))) {
-                        count++;
-                    }
-                }
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public void doRecoverNextMessagesWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId,
-            String subscriptionName, long seq, long priority, int maxReturned, JDBCMessageRecoveryListener listener) throws Exception {
-
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindDurableSubMessagesByPriorityStatement());
-            s.setMaxRows(maxRows);
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriptionName);
-            s.setLong(4, seq);
-            s.setLong(5, priority);
-            rs = s.executeQuery();
-            int count = 0;
-            if (this.statements.isUseExternalMessageReferences()) {
-                while (rs.next() && count < maxReturned) {
-                    if (listener.recoverMessageReference(rs.getString(1))) {
-                        count++;
-                    }
-                }
-            } else {
-                while (rs.next() && count < maxReturned) {
-                    if (listener.recoverMessage(rs.getLong(1), getBinaryData(rs, 2))) {
-                        count++;
-                    }
-                }
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public int doGetDurableSubscriberMessageCount(TransactionContext c, ActiveMQDestination destination,
-            String clientId, String subscriptionName, boolean isPrioritizedMessages) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        int result = 0;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            if (isPrioritizedMessages) {
-                s = c.getConnection().prepareStatement(this.statements.getDurableSubscriberMessageCountStatementWithPriority());
-            } else {
-                s = c.getConnection().prepareStatement(this.statements.getDurableSubscriberMessageCountStatement());    
-            }
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriptionName);
-            rs = s.executeQuery();
-            if (rs.next()) {
-                result = rs.getInt(1);
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-        return result;
-    }
-
-    /**
-     * @param c 
-     * @param info 
-     * @param retroactive 
-     * @throws SQLException 
-     * @throws IOException 
-     */
-    public void doSetSubscriberEntry(TransactionContext c, SubscriptionInfo info, boolean retroactive, boolean isPrioritizedMessages)
-            throws SQLException, IOException {
-        // dumpTables(c, destination.getQualifiedName(), clientId,
-        // subscriptionName);
-        PreparedStatement s = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            long lastMessageId = -1;
-            if (!retroactive) {
-                s = c.getConnection().prepareStatement(this.statements.getFindLastSequenceIdInMsgsStatement());
-                ResultSet rs = null;
-                try {
-                    rs = s.executeQuery();
-                    if (rs.next()) {
-                        lastMessageId = rs.getLong(1);
-                    }
-                } finally {
-                    close(rs);
-                    close(s);
-                }
-            }
-            s = c.getConnection().prepareStatement(this.statements.getCreateDurableSubStatement());
-            int maxPriority = 1;
-            if (isPrioritizedMessages) {
-                maxPriority = 10;
-            }
-
-            for (int priority = 0; priority < maxPriority; priority++) {
-                s.setString(1, info.getDestination().getQualifiedName());
-                s.setString(2, info.getClientId());
-                s.setString(3, info.getSubscriptionName());
-                s.setString(4, info.getSelector());
-                s.setLong(5, lastMessageId);
-                s.setString(6, info.getSubscribedDestination().getQualifiedName());
-                s.setLong(7, priority);
-
-                if (s.executeUpdate() != 1) {
-                    throw new IOException("Could not create durable subscription for: " + info.getClientId());
-                }
-            }
-
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(s);
-        }
-    }
-
-    public SubscriptionInfo doGetSubscriberEntry(TransactionContext c, ActiveMQDestination destination,
-            String clientId, String subscriptionName) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindDurableSubStatement());
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriptionName);
-            rs = s.executeQuery();
-            if (!rs.next()) {
-                return null;
-            }
-            SubscriptionInfo subscription = new SubscriptionInfo();
-            subscription.setDestination(destination);
-            subscription.setClientId(clientId);
-            subscription.setSubscriptionName(subscriptionName);
-            subscription.setSelector(rs.getString(1));
-            subscription.setSubscribedDestination(ActiveMQDestination.createDestination(rs.getString(2),
-                    ActiveMQDestination.QUEUE_TYPE));
-            return subscription;
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public SubscriptionInfo[] doGetAllSubscriptions(TransactionContext c, ActiveMQDestination destination)
-            throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindAllDurableSubsStatement());
-            s.setString(1, destination.getQualifiedName());
-            rs = s.executeQuery();
-            ArrayList<SubscriptionInfo> rc = new ArrayList<SubscriptionInfo>();
-            while (rs.next()) {
-                SubscriptionInfo subscription = new SubscriptionInfo();
-                subscription.setDestination(destination);
-                subscription.setSelector(rs.getString(1));
-                subscription.setSubscriptionName(rs.getString(2));
-                subscription.setClientId(rs.getString(3));
-                subscription.setSubscribedDestination(ActiveMQDestination.createDestination(rs.getString(4),
-                        ActiveMQDestination.QUEUE_TYPE));
-                rc.add(subscription);
-            }
-            return rc.toArray(new SubscriptionInfo[rc.size()]);
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-    public void doRemoveAllMessages(TransactionContext c, ActiveMQDestination destinationName) throws SQLException,
-            IOException {
-        PreparedStatement s = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getRemoveAllMessagesStatement());
-            s.setString(1, destinationName.getQualifiedName());
-            s.executeUpdate();
-            s.close();
-            s = c.getConnection().prepareStatement(this.statements.getRemoveAllSubscriptionsStatement());
-            s.setString(1, destinationName.getQualifiedName());
-            s.executeUpdate();
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(s);
-        }
-    }
-
-    public void doDeleteSubscription(TransactionContext c, ActiveMQDestination destination, String clientId,
-            String subscriptionName) throws SQLException, IOException {
-        PreparedStatement s = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getDeleteSubscriptionStatement());
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriptionName);
-            s.executeUpdate();
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(s);
-        }
-    }
-
-    public void doDeleteOldMessages(TransactionContext c, boolean isPrioritizedMessages) throws SQLException, IOException {
-        PreparedStatement s = null;
-        cleanupExclusiveLock.writeLock().lock();
-        try {
-            if (isPrioritizedMessages) {
-                LOG.debug("Executing SQL: " + this.statements.getDeleteOldMessagesStatementWithPriority());
-                s = c.getConnection().prepareStatement(this.statements.getDeleteOldMessagesStatementWithPriority());
-            } else {
-                LOG.debug("Executing SQL: " + this.statements.getDeleteOldMessagesStatement());
-                s = c.getConnection().prepareStatement(this.statements.getDeleteOldMessagesStatement());
-            }
-            s.setLong(1, System.currentTimeMillis());
-            int i = s.executeUpdate();
-            LOG.debug("Deleted " + i + " old message(s).");
-        } finally {
-            cleanupExclusiveLock.writeLock().unlock();
-            close(s);
-        }
-    }
-
-    public long doGetLastAckedDurableSubscriberMessageId(TransactionContext c, ActiveMQDestination destination,
-            String clientId, String subscriberName) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        long result = -1;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getLastAckedDurableSubscriberMessageStatement());
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriberName);
-            rs = s.executeQuery();
-            if (rs.next()) {
-                result = rs.getLong(1);
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-        return result;
-    }
-
-    private static void close(PreparedStatement s) {
-        try {
-            s.close();
-        } catch (Throwable e) {
-        }
-    }
-
-    private static void close(ResultSet rs) {
-        try {
-            rs.close();
-        } catch (Throwable e) {
-        }
-    }
-
-    public Set<ActiveMQDestination> doGetDestinations(TransactionContext c) throws SQLException, IOException {
-        HashSet<ActiveMQDestination> rc = new HashSet<ActiveMQDestination>();
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getFindAllDestinationsStatement());
-            rs = s.executeQuery();
-            while (rs.next()) {
-                rc.add(ActiveMQDestination.createDestination(rs.getString(1), ActiveMQDestination.QUEUE_TYPE));
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-        return rc;
-    }
-
-    /**
-     * @return true if batchStements
-     */
-    public boolean isBatchStatments() {
-        return this.batchStatments;
-    }
-
-    /**
-     * @param batchStatments
-     */
-    public void setBatchStatments(boolean batchStatments) {
-        this.batchStatments = batchStatments;
-    }
-
-    public void setUseExternalMessageReferences(boolean useExternalMessageReferences) {
-        this.statements.setUseExternalMessageReferences(useExternalMessageReferences);
-    }
-
-    /**
-     * @return the statements
-     */
-    public Statements getStatements() {
-        return this.statements;
-    }
-
-    public void setStatements(Statements statements) {
-        this.statements = statements;
-    }
-
-    public int getMaxRows() {
-        return maxRows;
-    }
-
-    public void setMaxRows(int maxRows) {
-        this.maxRows = maxRows;
-    }    
-
-    /**
-     * @param c
-     * @param destination
-     * @param clientId
-     * @param subscriberName
-     * @return
-     * @throws SQLException
-     * @throws IOException
-     */
-    public byte[] doGetNextDurableSubscriberMessageStatement(TransactionContext c, ActiveMQDestination destination,
-            String clientId, String subscriberName) throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getNextDurableSubscriberMessageStatement());
-            s.setString(1, destination.getQualifiedName());
-            s.setString(2, clientId);
-            s.setString(3, subscriberName);
-            rs = s.executeQuery();
-            if (!rs.next()) {
-                return null;
-            }
-            return getBinaryData(rs, 1);
-        } finally {
-            close(rs);
-            cleanupExclusiveLock.readLock().unlock();
-            close(s);
-        }
-    }
-
-    public int doGetMessageCount(TransactionContext c, ActiveMQDestination destination) throws SQLException,
-            IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        int result = 0;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getDestinationMessageCountStatement());
-            s.setString(1, destination.getQualifiedName());
-            rs = s.executeQuery();
-            if (rs.next()) {
-                result = rs.getInt(1);
-            }
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-        return result;
-    }
-
-    public void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, long nextSeq,
-            long priority, int maxReturned, boolean isPrioritizedMessages, JDBCMessageRecoveryListener listener) throws Exception {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            if (isPrioritizedMessages) {
-                s = c.getConnection().prepareStatement(this.statements.getFindNextMessagesByPriorityStatement());
-            } else {
-                s = c.getConnection().prepareStatement(this.statements.getFindNextMessagesStatement());
-            }
-            s.setMaxRows(Math.max(maxReturned * 2, maxRows));
-            s.setString(1, destination.getQualifiedName());
-            s.setLong(2, nextSeq);
-            if (isPrioritizedMessages) {
-                s.setLong(3, priority);
-                s.setLong(4, priority);
-            }
-            rs = s.executeQuery();
-            int count = 0;
-            if (this.statements.isUseExternalMessageReferences()) {
-                while (rs.next() && count < maxReturned) {
-                    if (listener.recoverMessageReference(rs.getString(1))) {
-                        count++;
-                    } else {
-                        LOG.debug("Stopped recover next messages");
-                        break;
-                    }
-                }
-            } else {
-                while (rs.next() && count < maxReturned) {
-                    if (listener.recoverMessage(rs.getLong(1), getBinaryData(rs, 2))) {
-                        count++;
-                    } else {
-                        LOG.debug("Stopped recover next messages");
-                        break;
-                    }
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-    
-/*    public void dumpTables(Connection c, String destinationName, String clientId, String
-      subscriptionName) throws SQLException { 
-        printQuery(c, "Select * from ACTIVEMQ_MSGS", System.out); 
-        printQuery(c, "Select * from ACTIVEMQ_ACKS", System.out); 
-        PreparedStatement s = c.prepareStatement("SELECT M.ID, D.LAST_ACKED_ID FROM " 
-                + "ACTIVEMQ_MSGS M, " +"ACTIVEMQ_ACKS D " 
-                + "WHERE D.CONTAINER=? AND D.CLIENT_ID=? AND D.SUB_NAME=?" 
-                + " AND M.CONTAINER=D.CONTAINER AND M.ID > D.LAST_ACKED_ID" 
-                + " ORDER BY M.ID");
-      s.setString(1,destinationName); s.setString(2,clientId); s.setString(3,subscriptionName);
-      printQuery(s,System.out); }
-
-    public void dumpTables(Connection c) throws SQLException {
-        printQuery(c, "Select * from ACTIVEMQ_MSGS", System.out);
-        printQuery(c, "Select * from ACTIVEMQ_ACKS", System.out);
-    }
-
-    private void printQuery(Connection c, String query, PrintStream out)
-            throws SQLException {
-        printQuery(c.prepareStatement(query), out);
-    }
-
-    private void printQuery(PreparedStatement s, PrintStream out)
-            throws SQLException {
-
-        ResultSet set = null;
-        try {
-            set = s.executeQuery();
-            ResultSetMetaData metaData = set.getMetaData();
-            for (int i = 1; i <= metaData.getColumnCount(); i++) {
-                if (i == 1)
-                    out.print("||");
-                out.print(metaData.getColumnName(i) + "||");
-            }
-            out.println();
-            while (set.next()) {
-                for (int i = 1; i <= metaData.getColumnCount(); i++) {
-                    if (i == 1)
-                        out.print("|");
-                    out.print(set.getString(i) + "|");
-                }
-                out.println();
-            }
-        } finally {
-            try {
-                set.close();
-            } catch (Throwable ignore) {
-            }
-            try {
-                s.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }  */  
-
-    public long doGetLastProducerSequenceId(TransactionContext c, ProducerId id)
-            throws SQLException, IOException {
-        PreparedStatement s = null;
-        ResultSet rs = null;
-        cleanupExclusiveLock.readLock().lock();
-        try {
-            s = c.getConnection().prepareStatement(this.statements.getLastProducerSequenceIdStatement());
-            s.setString(1, id.toString());
-            rs = s.executeQuery();
-            long seq = -1;
-            if (rs.next()) {
-                seq = rs.getLong(1);
-            }
-            return seq;
-        } finally {
-            cleanupExclusiveLock.readLock().unlock();
-            close(rs);
-            close(s);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/HsqldbJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/HsqldbJDBCAdapter.java
deleted file mode 100755
index ae8b0c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/HsqldbJDBCAdapter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * 
- * @org.apache.xbean.XBean element="hsqldb-jdbc-adapter"
- */
-public class HsqldbJDBCAdapter extends BytesJDBCAdapter {
-
-    public void setStatements(Statements statements) {
-        statements.setBinaryDataType("OTHER");
-        super.setStatements(statements);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/ImageBasedJDBCAdaptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/ImageBasedJDBCAdaptor.java
deleted file mode 100755
index d9539eb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/ImageBasedJDBCAdaptor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * Provides JDBCAdapter since that uses
- * IMAGE datatype to hold binary data.
- * 
- * The databases/JDBC drivers that use this adapter are:
- * <ul>
- * <li>Sybase</li>
- * <li>MS SQL</li>
- * </ul>
- * 
- * @org.apache.xbean.XBean element="imageBasedJDBCAdaptor"
- */
-public class ImageBasedJDBCAdaptor extends DefaultJDBCAdapter {
-
-    public void setStatements(Statements statements) {
-        statements.setBinaryDataType("IMAGE");
-        super.setStatements(statements);
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/InformixJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/InformixJDBCAdapter.java
deleted file mode 100755
index 21dfbef..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/InformixJDBCAdapter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * JDBC Adapter for Informix database.
- * Because Informix database restricts length of composite primary keys, length of 
- * <i>container name</i> field and <i>subscription id</i> field must be reduced to 150 characters.
- * Therefore be sure not to use longer names for container name and subscription id than 150 characters.
- *  
- * @org.apache.xbean.XBean element="informixJDBCAdapter"
- */
-public class InformixJDBCAdapter extends BlobJDBCAdapter {
-
-    public void setStatements(Statements statements) {
-        statements.setContainerNameDataType("VARCHAR(150)");
-        statements.setStringIdDataType("VARCHAR(150)");
-        statements.setLongDataType("INT8");
-        statements.setSequenceDataType("INT8");
-        statements.setBinaryDataType("BYTE");
-        super.setStatements(statements);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MaxDBJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MaxDBJDBCAdapter.java
deleted file mode 100644
index 044e60d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MaxDBJDBCAdapter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * JDBC Adapter for the MaxDB database.
- * @org.apache.xbean.XBean element="maxdb-jdbc-adapter"
- */
-public class MaxDBJDBCAdapter extends DefaultJDBCAdapter {
-
-    public void setStatements(Statements statements) {
-        statements.setBinaryDataType("LONG BYTE");
-        statements.setStringIdDataType("VARCHAR(250) ASCII");
-        statements.setContainerNameDataType("VARCHAR(250) ASCII");
-        statements.setLongDataType("INTEGER");
-        statements.setSequenceDataType("INTEGER");
-        super.setStatements(statements);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java
deleted file mode 100644
index 3cbdda0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * 
- * @org.apache.xbean.XBean element="mysql-jdbc-adapter"
- * 
- */
-public class MySqlJDBCAdapter extends DefaultJDBCAdapter {
-
-    // The transactional types..
-    public static final String INNODB = "INNODB";
-    public static final String NDBCLUSTER = "NDBCLUSTER";
-    public static final String BDB = "BDB";
-
-    // The non transactional types..
-    public static final String MYISAM = "MYISAM";
-    public static final String ISAM = "ISAM";
-    public static final String MERGE = "MERGE";
-    public static final String HEAP = "HEAP";
-
-    String engineType = INNODB;
-    String typeStatement = "ENGINE";
-
-    public void setStatements(Statements statements) {
-        String type = engineType.toUpperCase();
-        if( !type.equals(INNODB) &&  !type.equals(NDBCLUSTER) ) {
-            // Don't use LOCK TABLE for the INNODB and NDBCLUSTER engine types...
-            statements.setLockCreateStatement("LOCK TABLE " + statements.getFullLockTableName() + " WRITE");
-        }
-
-        statements.setBinaryDataType("LONGBLOB");
-        
-        
-        String typeClause = typeStatement + "=" + type;
-        if( type.equals(NDBCLUSTER) ) {
-            // in the NDBCLUSTER case we will create as INNODB and then alter to NDBCLUSTER
-            typeClause = typeStatement + "=" + INNODB;
-        }
-        
-        // Update the create statements so they use the right type of engine 
-        String[] s = statements.getCreateSchemaStatements();
-        for (int i = 0; i < s.length; i++) {
-            if( s[i].startsWith("CREATE TABLE")) {
-                s[i] = s[i]+ " " + typeClause;
-            }
-        }
-        
-        if( type.equals(NDBCLUSTER) ) {
-            // Add the alter statements.
-            ArrayList<String> l = new ArrayList<String>(Arrays.asList(s));
-            l.add("ALTER TABLE "+statements.getFullMessageTableName()+" ENGINE="+NDBCLUSTER);
-            l.add("ALTER TABLE "+statements.getFullAckTableName()+" ENGINE="+NDBCLUSTER);
-            l.add("ALTER TABLE "+statements.getFullLockTableName()+" ENGINE="+NDBCLUSTER);
-            l.add("FLUSH TABLES");
-            s = l.toArray(new String[l.size()]);
-            statements.setCreateSchemaStatements(s);
-        }        
-        
-        super.setStatements(statements);
-    }
-
-    public String getEngineType() {
-        return engineType;
-    }
-
-    public void setEngineType(String engineType) {
-        this.engineType = engineType;
-    }
-
-    public String getTypeStatement() {
-        return typeStatement;
-    }
-
-    public void setTypeStatement(String typeStatement) {
-        this.typeStatement = typeStatement;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/OracleJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/OracleJDBCAdapter.java
deleted file mode 100755
index 1eb0f08..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/OracleJDBCAdapter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.sql.Blob;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * Implements all the default JDBC operations that are used
- * by the JDBCPersistenceAdapter.
- * <p/>
- * Subclassing is encouraged to override the default
- * implementation of methods to account for differences
- * in JDBC Driver implementations.
- * <p/>
- * The JDBCAdapter inserts and extracts BLOB data using the
- * getBytes()/setBytes() operations.
- * <p/>
- * The databases/JDBC drivers that use this adapter are:
- * <ul>
- * <li></li>
- * </ul>
- *
- * @org.apache.xbean.XBean element="oracleJDBCAdapter"
- *
- * 
- */
-public class OracleJDBCAdapter extends BlobJDBCAdapter {
-
-    public void setStatements(Statements statements) {
-        statements.setLongDataType("NUMBER");
-        statements.setSequenceDataType("NUMBER");
-        super.setStatements(statements);
-    }
-    
-    protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
-        // Get as a BLOB
-        Blob aBlob = rs.getBlob(index);
-        if (aBlob == null) {
-            return null;
-        }
-        return aBlob.getBytes(1, (int) aBlob.length());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/PostgresqlJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/PostgresqlJDBCAdapter.java
deleted file mode 100644
index 23921ee..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/PostgresqlJDBCAdapter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * Implements all the default JDBC operations that are used
- * by the JDBCPersistenceAdapter.
- * <p/>
- * Subclassing is encouraged to override the default
- * implementation of methods to account for differences
- * in JDBC Driver implementations.
- * <p/>
- * The JDBCAdapter inserts and extracts BLOB data using the
- * getBytes()/setBytes() operations.
- * <p/>
- * The databases/JDBC drivers that use this adapter are:
- * <ul>
- * <li></li>
- * </ul>
- *
- * @org.apache.xbean.XBean element="postgresql-jdbc-adapter"
- * 
- */
-public class PostgresqlJDBCAdapter extends BytesJDBCAdapter {
-    public String acksPkName = "activemq_acks_pkey";
-
-    public void setStatements(Statements statements) {
-        statements.setBinaryDataType("BYTEA");
-        statements.setDropAckPKAlterStatementEnd("DROP CONSTRAINT \"" + getAcksPkName() + "\"");
-        super.setStatements(statements);
-    }
-
-    private String getAcksPkName() {
-        return acksPkName;
-    }
-
-    public void setAcksPkName(String acksPkName) {
-        this.acksPkName = acksPkName;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/StreamJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/StreamJDBCAdapter.java
deleted file mode 100755
index bbdeaac..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/StreamJDBCAdapter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import org.apache.activemq.util.ByteArrayInputStream;
-
-/**
- * This JDBCAdapter inserts and extracts BLOB data using the
- * setBinaryStream()/getBinaryStream() operations.
- * 
- * The databases/JDBC drivers that use this adapter are:
- * <ul>
- * <li>Axion</li>
- * </ul>
- * 
- * @org.apache.xbean.XBean element="streamJDBCAdapter"
- * 
- * 
- */
-public class StreamJDBCAdapter extends DefaultJDBCAdapter {
-
-    /**
-     * @see org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#getBinaryData(java.sql.ResultSet,
-     *      int)
-     */
-    protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
-
-        try {
-            InputStream is = rs.getBinaryStream(index);
-            ByteArrayOutputStream os = new ByteArrayOutputStream(1024 * 4);
-
-            int ch;
-            while ((ch = is.read()) >= 0) {
-                os.write(ch);
-            }
-            is.close();
-            os.close();
-
-            return os.toByteArray();
-        } catch (IOException e) {
-            throw (SQLException)new SQLException("Error reading binary parameter: " + index).initCause(e);
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#setBinaryData(java.sql.PreparedStatement,
-     *      int, byte[])
-     */
-    protected void setBinaryData(PreparedStatement s, int index, byte[] data) throws SQLException {
-        s.setBinaryStream(index, new ByteArrayInputStream(data), data.length);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/SybaseJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/SybaseJDBCAdapter.java
deleted file mode 100644
index 085f3e4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/SybaseJDBCAdapter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * A JDBC Adapter for Sybase databases
- *
- * @org.apache.xbean.XBean element="sybase-jdbc-adapter"
- * 
- */
-public class SybaseJDBCAdapter extends ImageBasedJDBCAdaptor {
-    public void setStatements(Statements statements) {
-        statements.setLockCreateStatement("LOCK TABLE " + statements.getFullLockTableName() + " IN EXCLUSIVE MODE");
-
-        statements.setLongDataType("DECIMAL");
-        statements.setSequenceDataType("DECIMAL");
-        super.setStatements(statements);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactDatabaseLocker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactDatabaseLocker.java
deleted file mode 100644
index d8b58da..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactDatabaseLocker.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import java.io.IOException;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import org.apache.activemq.store.jdbc.DefaultDatabaseLocker;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents an exclusive lock on a database to avoid multiple brokers running
- * against the same logical database.
- * 
- * @org.apache.xbean.XBean element="transact-database-locker"
- * 
- */
-public class TransactDatabaseLocker extends DefaultDatabaseLocker {
-    private static final Logger LOG = LoggerFactory.getLogger(TransactDatabaseLocker.class);
-    
-    public TransactDatabaseLocker() {
-    }
-    
-    public TransactDatabaseLocker(JDBCPersistenceAdapter persistenceAdapter) throws IOException {
-        setPersistenceAdapter(persistenceAdapter);
-    }
-    
-    @Override
-    public void start() throws Exception {
-        stopping = false;
-
-        LOG.info("Attempting to acquire the exclusive lock to become the Master broker");
-        PreparedStatement statement = null;
-        while (true) {
-            try {
-                connection = dataSource.getConnection();
-                connection.setAutoCommit(false);
-                String sql = statements.getLockCreateStatement();
-                statement = connection.prepareStatement(sql);
-                if (statement.getMetaData() != null) {
-                    ResultSet rs = statement.executeQuery();
-                    // if not already locked the statement below blocks until lock acquired
-                    rs.next();
-                } else {
-                    statement.execute();
-                }
-                break;
-            } catch (Exception e) {
-                if (stopping) {
-                    throw new Exception("Cannot start broker as being asked to shut down. Interrupted attempt to acquire lock: " + e, e);
-                }
-
-                if (exceptionHandler != null) {
-                    try {
-                        exceptionHandler.handle(e);
-                    } catch (Throwable handlerException) {
-                        LOG.error("The exception handler " + exceptionHandler.getClass().getCanonicalName() + " threw this exception: " + handlerException
-                                + " while trying to handle this excpetion: " + e, handlerException);
-                    }
-
-                } else {
-                    LOG.error("Failed to acquire lock: " + e, e);
-                }
-            } finally {
-
-                if (null != statement) {
-                    try {
-                        statement.close();
-                    } catch (SQLException e1) {
-                        LOG.warn("Caught while closing statement: " + e1, e1);
-                    }
-                    statement = null;
-                }
-            }
-
-            LOG.debug("Sleeping for " + lockAcquireSleepInterval + " milli(s) before trying again to get the lock...");
-            try {
-            	Thread.sleep(lockAcquireSleepInterval);
-            } catch (InterruptedException ie) {
-            	LOG.warn("Master lock retry sleep interrupted", ie);
-            }
-        }
-
-        LOG.info("Becoming the master on dataSource: " + dataSource);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
deleted file mode 100644
index 3b9e6b2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.store.jdbc.adapter;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-/**
- * A JDBC Adapter for Transact-SQL based databases such as SQL Server or Sybase
- *
- * @org.apache.xbean.XBean element="transact-jdbc-adapter"
- * 
- * 
- */
-public class TransactJDBCAdapter extends ImageBasedJDBCAdaptor {
-    public void setStatements(Statements statements) {
-        String lockCreateStatement = "SELECT * FROM " + statements.getFullLockTableName();
-
-        if (statements.isUseLockCreateWhereClause()) {
-            lockCreateStatement += " WHERE ID = 1";
-        }
-        lockCreateStatement += " WITH (UPDLOCK, ROWLOCK)";
-        statements.setLockCreateStatement(lockCreateStatement);
-
-        super.setStatements(statements);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/package.html
deleted file mode 100755
index 8963065..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/package.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	Implements database/driver apapters to compensate for the
-	wide differences in the BLOB handing of JDBC drivers.
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/package.html
deleted file mode 100755
index 1aa29a3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	Message persistence implemented using JDBC
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java
deleted file mode 100755
index d4e7f42..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalMessageStore.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/**
- * 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.store.journal;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.activeio.journal.RecordLocation;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.TransactionTemplate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A MessageStore that uses a Journal to store it's messages.
- * 
- * 
- */
-public class JournalMessageStore extends AbstractMessageStore {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JournalMessageStore.class);
-
-    protected final JournalPersistenceAdapter peristenceAdapter;
-    protected final JournalTransactionStore transactionStore;
-    protected final MessageStore longTermStore;
-    protected final TransactionTemplate transactionTemplate;
-    protected RecordLocation lastLocation;
-    protected Set<RecordLocation> inFlightTxLocations = new HashSet<RecordLocation>();
-
-    private Map<MessageId, Message> messages = new LinkedHashMap<MessageId, Message>();
-    private List<MessageAck> messageAcks = new ArrayList<MessageAck>();
-
-    /** A MessageStore that we can use to retrieve messages quickly. */
-    private Map<MessageId, Message> cpAddedMessageIds;
-
-
-    private MemoryUsage memoryUsage;
-
-    public JournalMessageStore(JournalPersistenceAdapter adapter, MessageStore checkpointStore, ActiveMQDestination destination) {
-        super(destination);
-        this.peristenceAdapter = adapter;
-        this.transactionStore = adapter.getTransactionStore();
-        this.longTermStore = checkpointStore;
-        this.transactionTemplate = new TransactionTemplate(adapter, new ConnectionContext(new NonCachedMessageEvaluationContext()));
-    }
-
-    
-    public void setMemoryUsage(MemoryUsage memoryUsage) {
-        this.memoryUsage=memoryUsage;
-        longTermStore.setMemoryUsage(memoryUsage);
-    }
-
-    /**
-     * Not synchronized since the Journal has better throughput if you increase
-     * the number of concurrent writes that it is doing.
-     */
-    public void addMessage(ConnectionContext context, final Message message) throws IOException {
-
-        final MessageId id = message.getMessageId();
-
-        final boolean debug = LOG.isDebugEnabled();
-        message.incrementReferenceCount();
-
-        final RecordLocation location = peristenceAdapter.writeCommand(message, message.isResponseRequired());
-        if (!context.isInTransaction()) {
-            if (debug) {
-                LOG.debug("Journalled message add for: " + id + ", at: " + location);
-            }
-            addMessage(message, location);
-        } else {
-            if (debug) {
-                LOG.debug("Journalled transacted message add for: " + id + ", at: " + location);
-            }
-            synchronized (this) {
-                inFlightTxLocations.add(location);
-            }
-            transactionStore.addMessage(this, message, location);
-            context.getTransaction().addSynchronization(new Synchronization() {
-                public void afterCommit() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message add commit for: " + id + ", at: " + location);
-                    }
-                    synchronized (JournalMessageStore.this) {
-                        inFlightTxLocations.remove(location);
-                        addMessage(message, location);
-                    }
-                }
-
-                public void afterRollback() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message add rollback for: " + id + ", at: " + location);
-                    }
-                    synchronized (JournalMessageStore.this) {
-                        inFlightTxLocations.remove(location);
-                    }
-                    message.decrementReferenceCount();
-                }
-            });
-        }
-    }
-
-    void addMessage(final Message message, final RecordLocation location) {
-        synchronized (this) {
-            lastLocation = location;
-            MessageId id = message.getMessageId();
-            messages.put(id, message);
-        }
-    }
-
-    public void replayAddMessage(ConnectionContext context, Message message) {
-        try {
-            // Only add the message if it has not already been added.
-            Message t = longTermStore.getMessage(message.getMessageId());
-            if (t == null) {
-                longTermStore.addMessage(context, message);
-            }
-        } catch (Throwable e) {
-            LOG.warn("Could not replay add for message '" + message.getMessageId() + "'.  Message may have already been added. reason: " + e);
-        }
-    }
-
-    /**
-     */
-    public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException {
-        final boolean debug = LOG.isDebugEnabled();
-        JournalQueueAck remove = new JournalQueueAck();
-        remove.setDestination(destination);
-        remove.setMessageAck(ack);
-
-        final RecordLocation location = peristenceAdapter.writeCommand(remove, ack.isResponseRequired());
-        if (!context.isInTransaction()) {
-            if (debug) {
-                LOG.debug("Journalled message remove for: " + ack.getLastMessageId() + ", at: " + location);
-            }
-            removeMessage(ack, location);
-        } else {
-            if (debug) {
-                LOG.debug("Journalled transacted message remove for: " + ack.getLastMessageId() + ", at: " + location);
-            }
-            synchronized (this) {
-                inFlightTxLocations.add(location);
-            }
-            transactionStore.removeMessage(this, ack, location);
-            context.getTransaction().addSynchronization(new Synchronization() {
-                public void afterCommit() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message remove commit for: " + ack.getLastMessageId() + ", at: " + location);
-                    }
-                    synchronized (JournalMessageStore.this) {
-                        inFlightTxLocations.remove(location);
-                        removeMessage(ack, location);
-                    }
-                }
-
-                public void afterRollback() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted message remove rollback for: " + ack.getLastMessageId() + ", at: " + location);
-                    }
-                    synchronized (JournalMessageStore.this) {
-                        inFlightTxLocations.remove(location);
-                    }
-                }
-            });
-
-        }
-    }
-
-    final void removeMessage(final MessageAck ack, final RecordLocation location) {
-        synchronized (this) {
-            lastLocation = location;
-            MessageId id = ack.getLastMessageId();
-            Message message = messages.remove(id);
-            if (message == null) {
-                messageAcks.add(ack);
-            } else {
-                message.decrementReferenceCount();
-            }
-        }
-    }
-
-    public void replayRemoveMessage(ConnectionContext context, MessageAck messageAck) {
-        try {
-            // Only remove the message if it has not already been removed.
-            Message t = longTermStore.getMessage(messageAck.getLastMessageId());
-            if (t != null) {
-                longTermStore.removeMessage(context, messageAck);
-            }
-        } catch (Throwable e) {
-            LOG.warn("Could not replay acknowledge for message '" + messageAck.getLastMessageId() + "'.  Message may have already been acknowledged. reason: " + e);
-        }
-    }
-
-    /**
-     * @return
-     * @throws IOException
-     */
-    public RecordLocation checkpoint() throws IOException {
-        return checkpoint(null);
-    }
-
-    /**
-     * @return
-     * @throws IOException
-     */
-    @SuppressWarnings("unchecked")
-    public RecordLocation checkpoint(final Callback postCheckpointTest) throws IOException {
-
-        final List<MessageAck> cpRemovedMessageLocations;
-        final List<RecordLocation> cpActiveJournalLocations;
-        final int maxCheckpointMessageAddSize = peristenceAdapter.getMaxCheckpointMessageAddSize();
-
-        // swap out the message hash maps..
-        synchronized (this) {
-            cpAddedMessageIds = this.messages;
-            cpRemovedMessageLocations = this.messageAcks;
-
-            cpActiveJournalLocations = new ArrayList<RecordLocation>(inFlightTxLocations);
-
-            this.messages = new LinkedHashMap<MessageId, Message>();
-            this.messageAcks = new ArrayList<MessageAck>();
-        }
-
-        transactionTemplate.run(new Callback() {
-            public void execute() throws Exception {
-
-                int size = 0;
-
-                PersistenceAdapter persitanceAdapter = transactionTemplate.getPersistenceAdapter();
-                ConnectionContext context = transactionTemplate.getContext();
-
-                // Checkpoint the added messages.
-                synchronized (JournalMessageStore.this) {
-                    Iterator<Message> iterator = cpAddedMessageIds.values().iterator();
-                    while (iterator.hasNext()) {
-                        Message message = iterator.next();
-                        try {
-                            longTermStore.addMessage(context, message);
-                        } catch (Throwable e) {
-                            LOG.warn("Message could not be added to long term store: " + e.getMessage(), e);
-                        }
-                        size += message.getSize();
-                        message.decrementReferenceCount();
-                        // Commit the batch if it's getting too big
-                        if (size >= maxCheckpointMessageAddSize) {
-                            persitanceAdapter.commitTransaction(context);
-                            persitanceAdapter.beginTransaction(context);
-                            size = 0;
-                        }
-                    }
-                }
-
-                persitanceAdapter.commitTransaction(context);
-                persitanceAdapter.beginTransaction(context);
-
-                // Checkpoint the removed messages.
-                Iterator<MessageAck> iterator = cpRemovedMessageLocations.iterator();
-                while (iterator.hasNext()) {
-                    try {
-                        MessageAck ack = iterator.next();
-                        longTermStore.removeMessage(transactionTemplate.getContext(), ack);
-                    } catch (Throwable e) {
-                        LOG.debug("Message could not be removed from long term store: " + e.getMessage(), e);
-                    }
-                }
-
-                if (postCheckpointTest != null) {
-                    postCheckpointTest.execute();
-                }
-            }
-
-        });
-
-        synchronized (this) {
-            cpAddedMessageIds = null;
-        }
-
-        if (cpActiveJournalLocations.size() > 0) {
-            Collections.sort(cpActiveJournalLocations);
-            return cpActiveJournalLocations.get(0);
-        }
-        synchronized (this) {
-            return lastLocation;
-        }
-    }
-
-    /**
-     * 
-     */
-    public Message getMessage(MessageId identity) throws IOException {
-        Message answer = null;
-
-        synchronized (this) {
-            // Do we have a still have it in the journal?
-            answer = messages.get(identity);
-            if (answer == null && cpAddedMessageIds != null) {
-                answer = cpAddedMessageIds.get(identity);
-            }
-        }
-
-        if (answer != null) {
-            return answer;
-        }
-
-        // If all else fails try the long term message store.
-        return longTermStore.getMessage(identity);
-    }
-
-    /**
-     * Replays the checkpointStore first as those messages are the oldest ones,
-     * then messages are replayed from the transaction log and then the cache is
-     * updated.
-     * 
-     * @param listener
-     * @throws Exception
-     */
-    public void recover(final MessageRecoveryListener listener) throws Exception {
-        peristenceAdapter.checkpoint(true, true);
-        longTermStore.recover(listener);
-    }
-
-    public void start() throws Exception {
-        if (this.memoryUsage != null) {
-            this.memoryUsage.addUsageListener(peristenceAdapter);
-        }
-        longTermStore.start();
-    }
-
-    public void stop() throws Exception {
-        longTermStore.stop();
-        if (this.memoryUsage != null) {
-            this.memoryUsage.removeUsageListener(peristenceAdapter);
-        }
-    }
-
-    /**
-     * @return Returns the longTermStore.
-     */
-    public MessageStore getLongTermMessageStore() {
-        return longTermStore;
-    }
-
-    /**
-     * @see org.apache.activemq.store.MessageStore#removeAllMessages(ConnectionContext)
-     */
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        peristenceAdapter.checkpoint(true, true);
-        longTermStore.removeAllMessages(context);
-    }
-
-    public void addMessageReference(ConnectionContext context, MessageId messageId, long expirationTime, String messageRef) throws IOException {
-        throw new IOException("The journal does not support message references.");
-    }
-
-    public String getMessageReference(MessageId identity) throws IOException {
-        throw new IOException("The journal does not support message references.");
-    }
-
-    /**
-     * @return
-     * @throws IOException
-     * @see org.apache.activemq.store.MessageStore#getMessageCount()
-     */
-    public int getMessageCount() throws IOException {
-        peristenceAdapter.checkpoint(true, true);
-        return longTermStore.getMessageCount();
-    }
-
-    public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception {
-        peristenceAdapter.checkpoint(true, true);
-        longTermStore.recoverNextMessages(maxReturned, listener);
-
-    }
-
-    public void resetBatching() {
-        longTermStore.resetBatching();
-
-    }
-
-    @Override
-    public void setBatch(MessageId messageId) throws Exception {
-        peristenceAdapter.checkpoint(true, true);
-        longTermStore.setBatch(messageId);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
deleted file mode 100755
index e6579f7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
+++ /dev/null
@@ -1,751 +0,0 @@
-/**
- * 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.store.journal;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.activeio.journal.InvalidRecordLocationException;
-import org.apache.activeio.journal.Journal;
-import org.apache.activeio.journal.JournalEventListener;
-import org.apache.activeio.journal.RecordLocation;
-import org.apache.activeio.packet.ByteArrayPacket;
-import org.apache.activeio.packet.Packet;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.journal.JournalTransactionStore.Tx;
-import org.apache.activemq.store.journal.JournalTransactionStore.TxOperation;
-import org.apache.activemq.thread.Scheduler;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.usage.Usage;
-import org.apache.activemq.usage.UsageListener;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An implementation of {@link PersistenceAdapter} designed for use with a
- * {@link Journal} and then check pointing asynchronously on a timeout with some
- * other long term persistent storage.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEventListener, UsageListener, BrokerServiceAware {
-
-    private BrokerService brokerService;
-	
-    protected Scheduler scheduler;
-    private static final Logger LOG = LoggerFactory.getLogger(JournalPersistenceAdapter.class);
-
-    private Journal journal;
-    private PersistenceAdapter longTermPersistence;
-
-    private final WireFormat wireFormat = new OpenWireFormat();
-
-    private final ConcurrentHashMap<ActiveMQQueue, JournalMessageStore> queues = new ConcurrentHashMap<ActiveMQQueue, JournalMessageStore>();
-    private final ConcurrentHashMap<ActiveMQTopic, JournalTopicMessageStore> topics = new ConcurrentHashMap<ActiveMQTopic, JournalTopicMessageStore>();
-
-    private SystemUsage usageManager;
-    private final long checkpointInterval = 1000 * 60 * 5;
-    private long lastCheckpointRequest = System.currentTimeMillis();
-    private long lastCleanup = System.currentTimeMillis();
-    private int maxCheckpointWorkers = 10;
-    private int maxCheckpointMessageAddSize = 1024 * 1024;
-
-    private final JournalTransactionStore transactionStore = new JournalTransactionStore(this);
-    private ThreadPoolExecutor checkpointExecutor;
-
-    private TaskRunner checkpointTask;
-    private CountDownLatch nextCheckpointCountDownLatch = new CountDownLatch(1);
-    private boolean fullCheckPoint;
-
-    private final AtomicBoolean started = new AtomicBoolean(false);
-
-    private final Runnable periodicCheckpointTask = createPeriodicCheckpointTask();
-
-    private TaskRunnerFactory taskRunnerFactory;
-
-    public JournalPersistenceAdapter() {        
-    }
-    
-    public JournalPersistenceAdapter(Journal journal, PersistenceAdapter longTermPersistence, TaskRunnerFactory taskRunnerFactory) throws IOException {
-        setJournal(journal);
-        setTaskRunnerFactory(taskRunnerFactory);
-        setPersistenceAdapter(longTermPersistence);
-    }
-
-    public void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory) {
-        this.taskRunnerFactory = taskRunnerFactory;
-    }
-
-    public void setJournal(Journal journal) {
-        this.journal = journal;
-        journal.setJournalEventListener(this);
-    }
-    
-    public void setPersistenceAdapter(PersistenceAdapter longTermPersistence) {
-        this.longTermPersistence = longTermPersistence;
-    }
-    
-    final Runnable createPeriodicCheckpointTask() {
-        return new Runnable() {
-            public void run() {
-                long lastTime = 0;
-                synchronized (this) {
-                    lastTime = lastCheckpointRequest;
-                }
-                if (System.currentTimeMillis() > lastTime + checkpointInterval) {
-                    checkpoint(false, true);
-                }
-            }
-        };
-    }
-
-    /**
-     * @param usageManager The UsageManager that is controlling the
-     *                destination's memory usage.
-     */
-    public void setUsageManager(SystemUsage usageManager) {
-        this.usageManager = usageManager;
-        longTermPersistence.setUsageManager(usageManager);
-    }
-
-    public Set<ActiveMQDestination> getDestinations() {
-        Set<ActiveMQDestination> destinations = new HashSet<ActiveMQDestination>(longTermPersistence.getDestinations());
-        destinations.addAll(queues.keySet());
-        destinations.addAll(topics.keySet());
-        return destinations;
-    }
-
-    private MessageStore createMessageStore(ActiveMQDestination destination) throws IOException {
-        if (destination.isQueue()) {
-            return createQueueMessageStore((ActiveMQQueue)destination);
-        } else {
-            return createTopicMessageStore((ActiveMQTopic)destination);
-        }
-    }
-
-    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        JournalMessageStore store = queues.get(destination);
-        if (store == null) {
-            MessageStore checkpointStore = longTermPersistence.createQueueMessageStore(destination);
-            store = new JournalMessageStore(this, checkpointStore, destination);
-            queues.put(destination, store);
-        }
-        return store;
-    }
-
-    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException {
-        JournalTopicMessageStore store = topics.get(destinationName);
-        if (store == null) {
-            TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName);
-            store = new JournalTopicMessageStore(this, checkpointStore, destinationName);
-            topics.put(destinationName, store);
-        }
-        return store;
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination Destination to forget
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-        queues.remove(destination);
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination Destination to forget
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-        topics.remove(destination);
-    }
-
-    public TransactionStore createTransactionStore() throws IOException {
-        return transactionStore;
-    }
-
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return longTermPersistence.getLastMessageBrokerSequenceId();
-    }
-
-    public void beginTransaction(ConnectionContext context) throws IOException {
-        longTermPersistence.beginTransaction(context);
-    }
-
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        longTermPersistence.commitTransaction(context);
-    }
-
-    public void rollbackTransaction(ConnectionContext context) throws IOException {
-        longTermPersistence.rollbackTransaction(context);
-    }
-
-    public synchronized void start() throws Exception {
-        if (!started.compareAndSet(false, true)) {
-            return;
-        }
-
-        checkpointTask = taskRunnerFactory.createTaskRunner(new Task() {
-            public boolean iterate() {
-                return doCheckpoint();
-            }
-        }, "ActiveMQ Journal Checkpoint Worker");
-
-        checkpointExecutor = new ThreadPoolExecutor(maxCheckpointWorkers, maxCheckpointWorkers, 30, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
-            public Thread newThread(Runnable runable) {
-                Thread t = new Thread(runable, "Journal checkpoint worker");
-                t.setPriority(7);
-                return t;
-            }
-        });
-        // checkpointExecutor.allowCoreThreadTimeOut(true);
-
-        this.usageManager.getMemoryUsage().addUsageListener(this);
-
-        if (longTermPersistence instanceof JDBCPersistenceAdapter) {
-            // Disabled periodic clean up as it deadlocks with the checkpoint
-            // operations.
-            ((JDBCPersistenceAdapter)longTermPersistence).setCleanupPeriod(0);
-        }
-
-        longTermPersistence.start();
-        createTransactionStore();
-        recover();
-
-        // Do a checkpoint periodically.
-        this.scheduler = new Scheduler("Journal Scheduler");
-        this.scheduler.start();
-        this.scheduler.executePeriodically(periodicCheckpointTask, checkpointInterval / 10);
-
-    }
-
-    public void stop() throws Exception {
-
-        this.usageManager.getMemoryUsage().removeUsageListener(this);
-        if (!started.compareAndSet(true, false)) {
-            return;
-        }
-
-        this.scheduler.cancel(periodicCheckpointTask);
-        this.scheduler.stop();
-
-        // Take one final checkpoint and stop checkpoint processing.
-        checkpoint(true, true);
-        checkpointTask.shutdown();
-        checkpointExecutor.shutdown();
-
-        queues.clear();
-        topics.clear();
-
-        IOException firstException = null;
-        try {
-            journal.close();
-        } catch (Exception e) {
-            firstException = IOExceptionSupport.create("Failed to close journals: " + e, e);
-        }
-        longTermPersistence.stop();
-
-        if (firstException != null) {
-            throw firstException;
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public PersistenceAdapter getLongTermPersistence() {
-        return longTermPersistence;
-    }
-
-    /**
-     * @return Returns the wireFormat.
-     */
-    public WireFormat getWireFormat() {
-        return wireFormat;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    /**
-     * The Journal give us a call back so that we can move old data out of the
-     * journal. Taking a checkpoint does this for us.
-     * 
-     * @see org.apache.activemq.journal.JournalEventListener#overflowNotification(org.apache.activemq.journal.RecordLocation)
-     */
-    public void overflowNotification(RecordLocation safeLocation) {
-        checkpoint(false, true);
-    }
-
-    /**
-     * When we checkpoint we move all the journalled data to long term storage.
-     * 
-     */
-    public void checkpoint(boolean sync, boolean fullCheckpoint) {
-        try {
-            if (journal == null) {
-                throw new IllegalStateException("Journal is closed.");
-            }
-
-            long now = System.currentTimeMillis();
-            CountDownLatch latch = null;
-            synchronized (this) {
-                latch = nextCheckpointCountDownLatch;
-                lastCheckpointRequest = now;
-                if (fullCheckpoint) {
-                    this.fullCheckPoint = true;
-                }
-            }
-
-            checkpointTask.wakeup();
-
-            if (sync) {
-                LOG.debug("Waking for checkpoint to complete.");
-                latch.await();
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            LOG.warn("Request to start checkpoint failed: " + e, e);
-        }
-    }
-
-    public void checkpoint(boolean sync) {
-        checkpoint(sync, sync);
-    }
-
-    /**
-     * This does the actual checkpoint.
-     * 
-     * @return
-     */
-    public boolean doCheckpoint() {
-        CountDownLatch latch = null;
-        boolean fullCheckpoint;
-        synchronized (this) {
-            latch = nextCheckpointCountDownLatch;
-            nextCheckpointCountDownLatch = new CountDownLatch(1);
-            fullCheckpoint = this.fullCheckPoint;
-            this.fullCheckPoint = false;
-        }
-        try {
-
-            LOG.debug("Checkpoint started.");
-            RecordLocation newMark = null;
-
-            ArrayList<FutureTask<RecordLocation>> futureTasks = new ArrayList<FutureTask<RecordLocation>>(queues.size() + topics.size());
-
-            //
-            // We do many partial checkpoints (fullCheckpoint==false) to move
-            // topic messages
-            // to long term store as soon as possible.
-            // 
-            // We want to avoid doing that for queue messages since removes the
-            // come in the same
-            // checkpoint cycle will nullify the previous message add.
-            // Therefore, we only
-            // checkpoint queues on the fullCheckpoint cycles.
-            //
-            if (fullCheckpoint) {
-                Iterator<JournalMessageStore> iterator = queues.values().iterator();
-                while (iterator.hasNext()) {
-                    try {
-                        final JournalMessageStore ms = iterator.next();
-                        FutureTask<RecordLocation> task = new FutureTask<RecordLocation>(new Callable<RecordLocation>() {
-                            public RecordLocation call() throws Exception {
-                                return ms.checkpoint();
-                            }
-                        });
-                        futureTasks.add(task);
-                        checkpointExecutor.execute(task);
-                    } catch (Exception e) {
-                        LOG.error("Failed to checkpoint a message store: " + e, e);
-                    }
-                }
-            }
-
-            Iterator<JournalTopicMessageStore> iterator = topics.values().iterator();
-            while (iterator.hasNext()) {
-                try {
-                    final JournalTopicMessageStore ms = iterator.next();
-                    FutureTask<RecordLocation> task = new FutureTask<RecordLocation>(new Callable<RecordLocation>() {
-                        public RecordLocation call() throws Exception {
-                            return ms.checkpoint();
-                        }
-                    });
-                    futureTasks.add(task);
-                    checkpointExecutor.execute(task);
-                } catch (Exception e) {
-                    LOG.error("Failed to checkpoint a message store: " + e, e);
-                }
-            }
-
-            try {
-                for (Iterator<FutureTask<RecordLocation>> iter = futureTasks.iterator(); iter.hasNext();) {
-                    FutureTask<RecordLocation> ft = iter.next();
-                    RecordLocation mark = ft.get();
-                    // We only set a newMark on full checkpoints.
-                    if (fullCheckpoint) {
-                        if (mark != null && (newMark == null || newMark.compareTo(mark) < 0)) {
-                            newMark = mark;
-                        }
-                    }
-                }
-            } catch (Throwable e) {
-                LOG.error("Failed to checkpoint a message store: " + e, e);
-            }
-
-            if (fullCheckpoint) {
-                try {
-                    if (newMark != null) {
-                        LOG.debug("Marking journal at: " + newMark);
-                        journal.setMark(newMark, true);
-                    }
-                } catch (Exception e) {
-                    LOG.error("Failed to mark the Journal: " + e, e);
-                }
-
-                if (longTermPersistence instanceof JDBCPersistenceAdapter) {
-                    // We may be check pointing more often than the
-                    // checkpointInterval if under high use
-                    // But we don't want to clean up the db that often.
-                    long now = System.currentTimeMillis();
-                    if (now > lastCleanup + checkpointInterval) {
-                        lastCleanup = now;
-                        ((JDBCPersistenceAdapter)longTermPersistence).cleanup();
-                    }
-                }
-            }
-
-            LOG.debug("Checkpoint done.");
-        } finally {
-            latch.countDown();
-        }
-        synchronized (this) {
-            return this.fullCheckPoint;
-        }
-
-    }
-
-    /**
-     * @param location
-     * @return
-     * @throws IOException
-     */
-    public DataStructure readCommand(RecordLocation location) throws IOException {
-        try {
-            Packet packet = journal.read(location);
-            return (DataStructure)wireFormat.unmarshal(toByteSequence(packet));
-        } catch (InvalidRecordLocationException e) {
-            throw createReadException(location, e);
-        } catch (IOException e) {
-            throw createReadException(location, e);
-        }
-    }
-
-    /**
-     * Move all the messages that were in the journal into long term storage. We
-     * just replay and do a checkpoint.
-     * 
-     * @throws IOException
-     * @throws IOException
-     * @throws InvalidRecordLocationException
-     * @throws IllegalStateException
-     */
-    private void recover() throws IllegalStateException, InvalidRecordLocationException, IOException, IOException {
-
-        RecordLocation pos = null;
-        int transactionCounter = 0;
-
-        LOG.info("Journal Recovery Started from: " + journal);
-        ConnectionContext context = new ConnectionContext(new NonCachedMessageEvaluationContext());
-
-        // While we have records in the journal.
-        while ((pos = journal.getNextRecordLocation(pos)) != null) {
-            Packet data = journal.read(pos);
-            DataStructure c = (DataStructure)wireFormat.unmarshal(toByteSequence(data));
-
-            if (c instanceof Message) {
-                Message message = (Message)c;
-                JournalMessageStore store = (JournalMessageStore)createMessageStore(message.getDestination());
-                if (message.isInTransaction()) {
-                    transactionStore.addMessage(store, message, pos);
-                } else {
-                    store.replayAddMessage(context, message);
-                    transactionCounter++;
-                }
-            } else {
-                switch (c.getDataStructureType()) {
-                case JournalQueueAck.DATA_STRUCTURE_TYPE: {
-                    JournalQueueAck command = (JournalQueueAck)c;
-                    JournalMessageStore store = (JournalMessageStore)createMessageStore(command.getDestination());
-                    if (command.getMessageAck().isInTransaction()) {
-                        transactionStore.removeMessage(store, command.getMessageAck(), pos);
-                    } else {
-                        store.replayRemoveMessage(context, command.getMessageAck());
-                        transactionCounter++;
-                    }
-                }
-                    break;
-                case JournalTopicAck.DATA_STRUCTURE_TYPE: {
-                    JournalTopicAck command = (JournalTopicAck)c;
-                    JournalTopicMessageStore store = (JournalTopicMessageStore)createMessageStore(command.getDestination());
-                    if (command.getTransactionId() != null) {
-                        transactionStore.acknowledge(store, command, pos);
-                    } else {
-                        store.replayAcknowledge(context, command.getClientId(), command.getSubscritionName(), command.getMessageId());
-                        transactionCounter++;
-                    }
-                }
-                    break;
-                case JournalTransaction.DATA_STRUCTURE_TYPE: {
-                    JournalTransaction command = (JournalTransaction)c;
-                    try {
-                        // Try to replay the packet.
-                        switch (command.getType()) {
-                        case JournalTransaction.XA_PREPARE:
-                            transactionStore.replayPrepare(command.getTransactionId());
-                            break;
-                        case JournalTransaction.XA_COMMIT:
-                        case JournalTransaction.LOCAL_COMMIT:
-                            Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
-                            if (tx == null) {
-                                break; // We may be trying to replay a commit
-                            }
-                            // that
-                            // was already committed.
-
-                            // Replay the committed operations.
-                            tx.getOperations();
-                            for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {
-                                TxOperation op = (TxOperation)iter.next();
-                                if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {
-                                    op.store.replayAddMessage(context, (Message)op.data);
-                                }
-                                if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
-                                    op.store.replayRemoveMessage(context, (MessageAck)op.data);
-                                }
-                                if (op.operationType == TxOperation.ACK_OPERATION_TYPE) {
-                                    JournalTopicAck ack = (JournalTopicAck)op.data;
-                                    ((JournalTopicMessageStore)op.store).replayAcknowledge(context, ack.getClientId(), ack.getSubscritionName(), ack.getMessageId());
-                                }
-                            }
-                            transactionCounter++;
-                            break;
-                        case JournalTransaction.LOCAL_ROLLBACK:
-                        case JournalTransaction.XA_ROLLBACK:
-                            transactionStore.replayRollback(command.getTransactionId());
-                            break;
-                        default:
-                            throw new IOException("Invalid journal command type: " + command.getType());
-                        }
-                    } catch (IOException e) {
-                        LOG.error("Recovery Failure: Could not replay: " + c + ", reason: " + e, e);
-                    }
-                }
-                    break;
-                case JournalTrace.DATA_STRUCTURE_TYPE:
-                    JournalTrace trace = (JournalTrace)c;
-                    LOG.debug("TRACE Entry: " + trace.getMessage());
-                    break;
-                default:
-                    LOG.error("Unknown type of record in transaction log which will be discarded: " + c);
-                }
-            }
-        }
-
-        RecordLocation location = writeTraceMessage("RECOVERED", true);
-        journal.setMark(location, true);
-
-        LOG.info("Journal Recovered: " + transactionCounter + " message(s) in transactions recovered.");
-    }
-
-    private IOException createReadException(RecordLocation location, Exception e) {
-        return IOExceptionSupport.create("Failed to read to journal for: " + location + ". Reason: " + e, e);
-    }
-
-    protected IOException createWriteException(DataStructure packet, Exception e) {
-        return IOExceptionSupport.create("Failed to write to journal for: " + packet + ". Reason: " + e, e);
-    }
-
-    protected IOException createWriteException(String command, Exception e) {
-        return IOExceptionSupport.create("Failed to write to journal for command: " + command + ". Reason: " + e, e);
-    }
-
-    protected IOException createRecoveryFailedException(Exception e) {
-        return IOExceptionSupport.create("Failed to recover from journal. Reason: " + e, e);
-    }
-
-    /**
-     * @param command
-     * @param sync
-     * @return
-     * @throws IOException
-     */
-    public RecordLocation writeCommand(DataStructure command, boolean sync) throws IOException {
-        if (started.get()) {
-            try {
-        	    return journal.write(toPacket(wireFormat.marshal(command)), sync);
-            } catch (IOException ioe) {
-        	    LOG.error("Cannot write to the journal", ioe);
-        	    brokerService.handleIOException(ioe);
-        	    throw ioe;
-            }
-        }
-        throw new IOException("closed");
-    }
-
-    private RecordLocation writeTraceMessage(String message, boolean sync) throws IOException {
-        JournalTrace trace = new JournalTrace();
-        trace.setMessage(message);
-        return writeCommand(trace, sync);
-    }
-
-    public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
-        newPercentUsage = (newPercentUsage / 10) * 10;
-        oldPercentUsage = (oldPercentUsage / 10) * 10;
-        if (newPercentUsage >= 70 && oldPercentUsage < newPercentUsage) {
-            boolean sync = newPercentUsage >= 90;
-            checkpoint(sync, true);
-        }
-    }
-
-    public JournalTransactionStore getTransactionStore() {
-        return transactionStore;
-    }
-
-    public void deleteAllMessages() throws IOException {
-        try {
-            JournalTrace trace = new JournalTrace();
-            trace.setMessage("DELETED");
-            RecordLocation location = journal.write(toPacket(wireFormat.marshal(trace)), false);
-            journal.setMark(location, true);
-            LOG.info("Journal deleted: ");
-        } catch (IOException e) {
-            throw e;
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create(e);
-        }
-        longTermPersistence.deleteAllMessages();
-    }
-
-    public SystemUsage getUsageManager() {
-        return usageManager;
-    }
-
-    public int getMaxCheckpointMessageAddSize() {
-        return maxCheckpointMessageAddSize;
-    }
-
-    public void setMaxCheckpointMessageAddSize(int maxCheckpointMessageAddSize) {
-        this.maxCheckpointMessageAddSize = maxCheckpointMessageAddSize;
-    }
-
-    public int getMaxCheckpointWorkers() {
-        return maxCheckpointWorkers;
-    }
-
-    public void setMaxCheckpointWorkers(int maxCheckpointWorkers) {
-        this.maxCheckpointWorkers = maxCheckpointWorkers;
-    }
-
-    public boolean isUseExternalMessageReferences() {
-        return false;
-    }
-
-    public void setUseExternalMessageReferences(boolean enable) {
-        if (enable) {
-            throw new IllegalArgumentException("The journal does not support message references.");
-        }
-    }
-
-    public Packet toPacket(ByteSequence sequence) {
-        return new ByteArrayPacket(new org.apache.activeio.packet.ByteSequence(sequence.data, sequence.offset, sequence.length));
-    }
-
-    public ByteSequence toByteSequence(Packet packet) {
-        org.apache.activeio.packet.ByteSequence sequence = packet.asByteSequence();
-        return new ByteSequence(sequence.getData(), sequence.getOffset(), sequence.getLength());
-    }
-
-    public void setBrokerName(String brokerName) {
-        longTermPersistence.setBrokerName(brokerName);
-    }
-
-    @Override
-    public String toString() {
-        return "JournalPersistenceAdapator(" + longTermPersistence + ")";
-    }
-
-    public void setDirectory(File dir) {
-    }
-    
-    public long size(){
-        return 0;
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerService = brokerService;
-        PersistenceAdapter pa = getLongTermPersistence();
-        if( pa instanceof BrokerServiceAware ) {
-            ((BrokerServiceAware)pa).setBrokerService(brokerService);
-        }
-    }
-
-    public long getLastProducerSequenceId(ProducerId id) {
-        return -1;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
deleted file mode 100755
index 26db854..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * 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.store.journal;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activeio.journal.Journal;
-import org.apache.activeio.journal.active.JournalImpl;
-import org.apache.activeio.journal.active.JournalLockedException;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.PersistenceAdapterFactory;
-import org.apache.activemq.store.jdbc.DataSourceSupport;
-import org.apache.activemq.store.jdbc.JDBCAdapter;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.jdbc.Statements;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Factory class that can create PersistenceAdapter objects.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class JournalPersistenceAdapterFactory extends DataSourceSupport implements PersistenceAdapterFactory {
-
-    private static final int JOURNAL_LOCKED_WAIT_DELAY = 10 * 1000;
-
-    private static final Logger LOG = LoggerFactory.getLogger(JournalPersistenceAdapterFactory.class);
-
-    private int journalLogFileSize = 1024 * 1024 * 20;
-    private int journalLogFiles = 2;
-    private TaskRunnerFactory taskRunnerFactory;
-    private Journal journal;
-    private boolean useJournal = true;
-    private boolean useQuickJournal;
-    private File journalArchiveDirectory;
-    private boolean failIfJournalIsLocked;
-    private int journalThreadPriority = Thread.MAX_PRIORITY;
-    private JDBCPersistenceAdapter jdbcPersistenceAdapter = new JDBCPersistenceAdapter();
-    private boolean useDedicatedTaskRunner;
-
-    public PersistenceAdapter createPersistenceAdapter() throws IOException {
-        jdbcPersistenceAdapter.setDataSource(getDataSource());
-
-        if (!useJournal) {
-            return jdbcPersistenceAdapter;
-        }
-        return new JournalPersistenceAdapter(getJournal(), jdbcPersistenceAdapter, getTaskRunnerFactory());
-
-    }
-
-    public int getJournalLogFiles() {
-        return journalLogFiles;
-    }
-
-    /**
-     * Sets the number of journal log files to use
-     */
-    public void setJournalLogFiles(int journalLogFiles) {
-        this.journalLogFiles = journalLogFiles;
-    }
-
-    public int getJournalLogFileSize() {
-        return journalLogFileSize;
-    }
-
-    /**
-     * Sets the size of the journal log files
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
-     */
-    public void setJournalLogFileSize(int journalLogFileSize) {
-        this.journalLogFileSize = journalLogFileSize;
-    }
-
-    public JDBCPersistenceAdapter getJdbcAdapter() {
-        return jdbcPersistenceAdapter;
-    }
-
-    public void setJdbcAdapter(JDBCPersistenceAdapter jdbcAdapter) {
-        this.jdbcPersistenceAdapter = jdbcAdapter;
-    }
-
-    public boolean isUseJournal() {
-        return useJournal;
-    }
-
-    /**
-     * Enables or disables the use of the journal. The default is to use the
-     * journal
-     * 
-     * @param useJournal
-     */
-    public void setUseJournal(boolean useJournal) {
-        this.useJournal = useJournal;
-    }
-
-    public boolean isUseDedicatedTaskRunner() {
-        return useDedicatedTaskRunner;
-    }
-    
-    public void setUseDedicatedTaskRunner(boolean useDedicatedTaskRunner) {
-        this.useDedicatedTaskRunner = useDedicatedTaskRunner;
-    }
-    
-    public TaskRunnerFactory getTaskRunnerFactory() {
-        if (taskRunnerFactory == null) {
-            taskRunnerFactory = new TaskRunnerFactory("Persistence Adaptor Task", journalThreadPriority,
-                                                      true, 1000, isUseDedicatedTaskRunner());
-        }
-        return taskRunnerFactory;
-    }
-
-    public void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory) {
-        this.taskRunnerFactory = taskRunnerFactory;
-    }
-
-    public Journal getJournal() throws IOException {
-        if (journal == null) {
-            createJournal();
-        }
-        return journal;
-    }
-
-    public void setJournal(Journal journal) {
-        this.journal = journal;
-    }
-
-    public File getJournalArchiveDirectory() {
-        if (journalArchiveDirectory == null && useQuickJournal) {
-            journalArchiveDirectory = new File(getDataDirectoryFile(), "journal");
-        }
-        return journalArchiveDirectory;
-    }
-
-    public void setJournalArchiveDirectory(File journalArchiveDirectory) {
-        this.journalArchiveDirectory = journalArchiveDirectory;
-    }
-
-    public boolean isUseQuickJournal() {
-        return useQuickJournal;
-    }
-
-    /**
-     * Enables or disables the use of quick journal, which keeps messages in the
-     * journal and just stores a reference to the messages in JDBC. Defaults to
-     * false so that messages actually reside long term in the JDBC database.
-     */
-    public void setUseQuickJournal(boolean useQuickJournal) {
-        this.useQuickJournal = useQuickJournal;
-    }
-
-    public JDBCAdapter getAdapter() throws IOException {
-        return jdbcPersistenceAdapter.getAdapter();
-    }
-
-    public void setAdapter(JDBCAdapter adapter) {
-        jdbcPersistenceAdapter.setAdapter(adapter);
-    }
-
-    public Statements getStatements() {
-        return jdbcPersistenceAdapter.getStatements();
-    }
-
-    public void setStatements(Statements statements) {
-        jdbcPersistenceAdapter.setStatements(statements);
-    }
-
-    public boolean isUseDatabaseLock() {
-        return jdbcPersistenceAdapter.isUseDatabaseLock();
-    }
-
-    /**
-     * Sets whether or not an exclusive database lock should be used to enable
-     * JDBC Master/Slave. Enabled by default.
-     */
-    public void setUseDatabaseLock(boolean useDatabaseLock) {
-        jdbcPersistenceAdapter.setUseDatabaseLock(useDatabaseLock);
-    }
-
-    public boolean isCreateTablesOnStartup() {
-        return jdbcPersistenceAdapter.isCreateTablesOnStartup();
-    }
-
-    /**
-     * Sets whether or not tables are created on startup
-     */
-    public void setCreateTablesOnStartup(boolean createTablesOnStartup) {
-        jdbcPersistenceAdapter.setCreateTablesOnStartup(createTablesOnStartup);
-    }
-
-    public int getJournalThreadPriority() {
-        return journalThreadPriority;
-    }
-
-    /**
-     * Sets the thread priority of the journal thread
-     */
-    public void setJournalThreadPriority(int journalThreadPriority) {
-        this.journalThreadPriority = journalThreadPriority;
-    }
-
-    /**
-     * @throws IOException
-     */
-    protected void createJournal() throws IOException {
-        File journalDir = new File(getDataDirectoryFile(), "journal").getCanonicalFile();
-        if (failIfJournalIsLocked) {
-            journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
-                                      getJournalArchiveDirectory());
-        } else {
-            while (true) {
-                try {
-                    journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
-                                              getJournalArchiveDirectory());
-                    break;
-                } catch (JournalLockedException e) {
-                    LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
-                             + " seconds for the journal to be unlocked.");
-                    try {
-                        Thread.sleep(JOURNAL_LOCKED_WAIT_DELAY);
-                    } catch (InterruptedException e1) {
-                    }
-                }
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java
deleted file mode 100755
index 64964fb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * 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.store.journal;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.apache.activeio.journal.RecordLocation;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.SubscriptionKey;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A MessageStore that uses a Journal to store it's messages.
- * 
- * 
- */
-public class JournalTopicMessageStore extends JournalMessageStore implements TopicMessageStore {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JournalTopicMessageStore.class);
-
-    private TopicMessageStore longTermStore;
-    private HashMap<SubscriptionKey, MessageId> ackedLastAckLocations = new HashMap<SubscriptionKey, MessageId>();
-
-    public JournalTopicMessageStore(JournalPersistenceAdapter adapter, TopicMessageStore checkpointStore,
-                                    ActiveMQTopic destinationName) {
-        super(adapter, checkpointStore, destinationName);
-        this.longTermStore = checkpointStore;
-    }
-
-    public void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener)
-        throws Exception {
-        this.peristenceAdapter.checkpoint(true, true);
-        longTermStore.recoverSubscription(clientId, subscriptionName, listener);
-    }
-
-    public void recoverNextMessages(String clientId, String subscriptionName, int maxReturned,
-                                    MessageRecoveryListener listener) throws Exception {
-        this.peristenceAdapter.checkpoint(true, true);
-        longTermStore.recoverNextMessages(clientId, subscriptionName, maxReturned, listener);
-
-    }
-
-    public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-        return longTermStore.lookupSubscription(clientId, subscriptionName);
-    }
-
-    public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException {
-        this.peristenceAdapter.checkpoint(true, true);
-        longTermStore.addSubsciption(subscriptionInfo, retroactive);
-    }
-
-    public void addMessage(ConnectionContext context, Message message) throws IOException {
-        super.addMessage(context, message);
-    }
-
-    /**
-     */
-    public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                            final MessageId messageId, MessageAck originalAck) throws IOException {
-        final boolean debug = LOG.isDebugEnabled();
-
-        JournalTopicAck ack = new JournalTopicAck();
-        ack.setDestination(destination);
-        ack.setMessageId(messageId);
-        ack.setMessageSequenceId(messageId.getBrokerSequenceId());
-        ack.setSubscritionName(subscriptionName);
-        ack.setClientId(clientId);
-        ack.setTransactionId(context.getTransaction() != null
-            ? context.getTransaction().getTransactionId() : null);
-        final RecordLocation location = peristenceAdapter.writeCommand(ack, false);
-
-        final SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName);
-        if (!context.isInTransaction()) {
-            if (debug) {
-                LOG.debug("Journalled acknowledge for: " + messageId + ", at: " + location);
-            }
-            acknowledge(messageId, location, key);
-        } else {
-            if (debug) {
-                LOG.debug("Journalled transacted acknowledge for: " + messageId + ", at: " + location);
-            }
-            synchronized (this) {
-                inFlightTxLocations.add(location);
-            }
-            transactionStore.acknowledge(this, ack, location);
-            context.getTransaction().addSynchronization(new Synchronization() {
-                public void afterCommit() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted acknowledge commit for: " + messageId + ", at: " + location);
-                    }
-                    synchronized (JournalTopicMessageStore.this) {
-                        inFlightTxLocations.remove(location);
-                        acknowledge(messageId, location, key);
-                    }
-                }
-
-                public void afterRollback() throws Exception {
-                    if (debug) {
-                        LOG.debug("Transacted acknowledge rollback for: " + messageId + ", at: " + location);
-                    }
-                    synchronized (JournalTopicMessageStore.this) {
-                        inFlightTxLocations.remove(location);
-                    }
-                }
-            });
-        }
-
-    }
-
-    public void replayAcknowledge(ConnectionContext context, String clientId, String subscritionName,
-                                  MessageId messageId) {
-        try {
-            SubscriptionInfo sub = longTermStore.lookupSubscription(clientId, subscritionName);
-            if (sub != null) {
-                longTermStore.acknowledge(context, clientId, subscritionName, messageId, null);
-            }
-        } catch (Throwable e) {
-            LOG.debug("Could not replay acknowledge for message '" + messageId
-                      + "'.  Message may have already been acknowledged. reason: " + e);
-        }
-    }
-
-    /**
-     * @param messageId
-     * @param location
-     * @param key
-     */
-    protected void acknowledge(MessageId messageId, RecordLocation location, SubscriptionKey key) {
-        synchronized (this) {
-            lastLocation = location;
-            ackedLastAckLocations.put(key, messageId);
-        }
-    }
-
-    public RecordLocation checkpoint() throws IOException {
-
-        final HashMap<SubscriptionKey, MessageId> cpAckedLastAckLocations;
-
-        // swap out the hash maps..
-        synchronized (this) {
-            cpAckedLastAckLocations = this.ackedLastAckLocations;
-            this.ackedLastAckLocations = new HashMap<SubscriptionKey, MessageId>();
-        }
-
-        return super.checkpoint(new Callback() {
-            public void execute() throws Exception {
-
-                // Checkpoint the acknowledged messages.
-                Iterator<SubscriptionKey> iterator = cpAckedLastAckLocations.keySet().iterator();
-                while (iterator.hasNext()) {
-                    SubscriptionKey subscriptionKey = iterator.next();
-                    MessageId identity = cpAckedLastAckLocations.get(subscriptionKey);
-                    longTermStore.acknowledge(transactionTemplate.getContext(), subscriptionKey.clientId,
-                                              subscriptionKey.subscriptionName, identity, null);
-                }
-
-            }
-        });
-
-    }
-
-    /**
-     * @return Returns the longTermStore.
-     */
-    public TopicMessageStore getLongTermTopicMessageStore() {
-        return longTermStore;
-    }
-
-    public void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-        longTermStore.deleteSubscription(clientId, subscriptionName);
-    }
-
-    public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-        return longTermStore.getAllSubscriptions();
-    }
-
-    public int getMessageCount(String clientId, String subscriberName) throws IOException {
-        this.peristenceAdapter.checkpoint(true, true);
-        return longTermStore.getMessageCount(clientId, subscriberName);
-    }
-
-    public void resetBatching(String clientId, String subscriptionName) {
-        longTermStore.resetBatching(clientId, subscriptionName);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java
deleted file mode 100755
index 779bbc4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/**
- * 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.store.journal;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import javax.transaction.xa.XAException;
-import org.apache.activeio.journal.RecordLocation;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.store.TransactionRecoveryListener;
-import org.apache.activemq.store.TransactionStore;
-
-/**
- */
-public class JournalTransactionStore implements TransactionStore {
-
-    private final JournalPersistenceAdapter peristenceAdapter;
-    private final Map<Object, Tx> inflightTransactions = new LinkedHashMap<Object, Tx>();
-    private final Map<TransactionId, Tx> preparedTransactions = new LinkedHashMap<TransactionId, Tx>();
-    private boolean doingRecover;
-
-    public static class TxOperation {
-
-        static final byte ADD_OPERATION_TYPE = 0;
-        static final byte REMOVE_OPERATION_TYPE = 1;
-        static final byte ACK_OPERATION_TYPE = 3;
-
-        public byte operationType;
-        public JournalMessageStore store;
-        public Object data;
-
-        public TxOperation(byte operationType, JournalMessageStore store, Object data) {
-            this.operationType = operationType;
-            this.store = store;
-            this.data = data;
-        }
-
-    }
-
-    /**
-     * Operations
-     * 
-     * 
-     */
-    public static class Tx {
-
-        private final RecordLocation location;
-        private final ArrayList<TxOperation> operations = new ArrayList<TxOperation>();
-
-        public Tx(RecordLocation location) {
-            this.location = location;
-        }
-
-        public void add(JournalMessageStore store, Message msg) {
-            operations.add(new TxOperation(TxOperation.ADD_OPERATION_TYPE, store, msg));
-        }
-
-        public void add(JournalMessageStore store, MessageAck ack) {
-            operations.add(new TxOperation(TxOperation.REMOVE_OPERATION_TYPE, store, ack));
-        }
-
-        public void add(JournalTopicMessageStore store, JournalTopicAck ack) {
-            operations.add(new TxOperation(TxOperation.ACK_OPERATION_TYPE, store, ack));
-        }
-
-        public Message[] getMessages() {
-            ArrayList<Object> list = new ArrayList<Object>();
-            for (Iterator<TxOperation> iter = operations.iterator(); iter.hasNext();) {
-                TxOperation op = iter.next();
-                if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {
-                    list.add(op.data);
-                }
-            }
-            Message rc[] = new Message[list.size()];
-            list.toArray(rc);
-            return rc;
-        }
-
-        public MessageAck[] getAcks() {
-            ArrayList<Object> list = new ArrayList<Object>();
-            for (Iterator<TxOperation> iter = operations.iterator(); iter.hasNext();) {
-                TxOperation op = iter.next();
-                if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {
-                    list.add(op.data);
-                }
-            }
-            MessageAck rc[] = new MessageAck[list.size()];
-            list.toArray(rc);
-            return rc;
-        }
-
-        public ArrayList<TxOperation> getOperations() {
-            return operations;
-        }
-
-    }
-
-    public JournalTransactionStore(JournalPersistenceAdapter adapter) {
-        this.peristenceAdapter = adapter;
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId)
-     */
-    public void prepare(TransactionId txid) throws IOException {
-        Tx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.remove(txid);
-        }
-        if (tx == null) {
-            return;
-        }
-        peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_PREPARE, txid, false),
-                                       true);
-        synchronized (preparedTransactions) {
-            preparedTransactions.put(txid, tx);
-        }
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId)
-     */
-    public void replayPrepare(TransactionId txid) throws IOException {
-        Tx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.remove(txid);
-        }
-        if (tx == null) {
-            return;
-        }
-        synchronized (preparedTransactions) {
-            preparedTransactions.put(txid, tx);
-        }
-    }
-
-    public Tx getTx(Object txid, RecordLocation location) {
-        Tx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.get(txid);
-        }
-        if (tx == null) {
-            tx = new Tx(location);
-            inflightTransactions.put(txid, tx);
-        }
-        return tx;
-    }
-
-    /**
-     * @throws XAException
-     * @see org.apache.activemq.store.TransactionStore#commit(org.apache.activemq.service.Transaction)
-     */
-    public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit,Runnable postCommit) throws IOException {
-        Tx tx;
-        if (preCommit != null) {
-            preCommit.run();
-        }
-        if (wasPrepared) {
-            synchronized (preparedTransactions) {
-                tx = preparedTransactions.remove(txid);
-            }
-        } else {
-            synchronized (inflightTransactions) {
-                tx = inflightTransactions.remove(txid);
-            }
-        }
-        if (tx == null) {
-            if (postCommit != null) {
-                postCommit.run();
-            }
-            return;
-        }
-        if (txid.isXATransaction()) {
-            peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_COMMIT, txid,
-                                                                  wasPrepared), true);
-        } else {
-            peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.LOCAL_COMMIT, txid,
-                                                                  wasPrepared), true);
-        }
-        if (postCommit != null) {
-            postCommit.run();
-        }
-    }
-
-    /**
-     * @throws XAException
-     * @see org.apache.activemq.store.TransactionStore#commit(org.apache.activemq.service.Transaction)
-     */
-    public Tx replayCommit(TransactionId txid, boolean wasPrepared) throws IOException {
-        if (wasPrepared) {
-            synchronized (preparedTransactions) {
-                return preparedTransactions.remove(txid);
-            }
-        } else {
-            synchronized (inflightTransactions) {
-                return inflightTransactions.remove(txid);
-            }
-        }
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId)
-     */
-    public void rollback(TransactionId txid) throws IOException {
-        Tx tx = null;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.remove(txid);
-        }
-        if (tx != null) {
-            synchronized (preparedTransactions) {
-                tx = preparedTransactions.remove(txid);
-            }
-        }
-        if (tx != null) {
-            if (txid.isXATransaction()) {
-                peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_ROLLBACK, txid,
-                                                                      false), true);
-            } else {
-                peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.LOCAL_ROLLBACK,
-                                                                      txid, false), true);
-            }
-        }
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId)
-     */
-    public void replayRollback(TransactionId txid) throws IOException {
-        boolean inflight = false;
-        synchronized (inflightTransactions) {
-            inflight = inflightTransactions.remove(txid) != null;
-        }
-        if (inflight) {
-            synchronized (preparedTransactions) {
-                preparedTransactions.remove(txid);
-            }
-        }
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
-        // All the in-flight transactions get rolled back..
-        synchronized (inflightTransactions) {
-            inflightTransactions.clear();
-        }
-        this.doingRecover = true;
-        try {
-            Map<TransactionId, Tx> txs = null;
-            synchronized (preparedTransactions) {
-                txs = new LinkedHashMap<TransactionId, Tx>(preparedTransactions);
-            }
-            for (Iterator<TransactionId> iter = txs.keySet().iterator(); iter.hasNext();) {
-                Object txid = iter.next();
-                Tx tx = txs.get(txid);
-                listener.recover((XATransactionId)txid, tx.getMessages(), tx.getAcks());
-            }
-        } finally {
-            this.doingRecover = false;
-        }
-    }
-
-    /**
-     * @param message
-     * @throws IOException
-     */
-    void addMessage(JournalMessageStore store, Message message, RecordLocation location) throws IOException {
-        Tx tx = getTx(message.getTransactionId(), location);
-        tx.add(store, message);
-    }
-
-    /**
-     * @param ack
-     * @throws IOException
-     */
-    public void removeMessage(JournalMessageStore store, MessageAck ack, RecordLocation location)
-        throws IOException {
-        Tx tx = getTx(ack.getTransactionId(), location);
-        tx.add(store, ack);
-    }
-
-    public void acknowledge(JournalTopicMessageStore store, JournalTopicAck ack, RecordLocation location) {
-        Tx tx = getTx(ack.getTransactionId(), location);
-        tx.add(store, ack);
-    }
-
-    public RecordLocation checkpoint() throws IOException {
-        // Nothing really to checkpoint.. since, we don't
-        // checkpoint tx operations in to long term store until they are
-        // committed.
-        // But we keep track of the first location of an operation
-        // that was associated with an active tx. The journal can not
-        // roll over active tx records.
-        RecordLocation rc = null;
-        synchronized (inflightTransactions) {
-            for (Iterator<Tx> iter = inflightTransactions.values().iterator(); iter.hasNext();) {
-                Tx tx = iter.next();
-                RecordLocation location = tx.location;
-                if (rc == null || rc.compareTo(location) < 0) {
-                    rc = location;
-                }
-            }
-        }
-        synchronized (preparedTransactions) {
-            for (Iterator<Tx> iter = preparedTransactions.values().iterator(); iter.hasNext();) {
-                Tx tx = iter.next();
-                RecordLocation location = tx.location;
-                if (rc == null || rc.compareTo(location) < 0) {
-                    rc = location;
-                }
-            }
-            return rc;
-        }
-    }
-
-    public boolean isDoingRecover() {
-        return doingRecover;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/package.html
deleted file mode 100755
index 380f9d7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	Message persistence using a high performance transaction log via the Journal interface.
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AMQTxMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AMQTxMarshaller.java
deleted file mode 100644
index 7591794..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AMQTxMarshaller.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.store.amq.AMQTx;
-import org.apache.activemq.store.amq.AMQTxOperation;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Marshall an AMQTx
- * 
- * 
- */
-public class AMQTxMarshaller implements Marshaller<AMQTx> {
-
-    private WireFormat wireFormat;
-
-    public AMQTxMarshaller(WireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-    }
-
-    public AMQTx readPayload(DataInput dataIn) throws IOException {
-        Location location = new Location();
-        location.readExternal(dataIn);
-        AMQTx result = new AMQTx(location);
-        int size = dataIn.readInt();
-        for (int i = 0; i < size; i++) {
-            AMQTxOperation op = new AMQTxOperation();
-            op.readExternal(wireFormat, dataIn);
-            result.getOperations().add(op);
-        }
-        return result;
-    }
-
-    public void writePayload(AMQTx amqtx, DataOutput dataOut) throws IOException {
-        amqtx.getLocation().writeExternal(dataOut);
-        List<AMQTxOperation> list = amqtx.getOperations();
-        List<AMQTxOperation> ops = new ArrayList<AMQTxOperation>();
-        
-        for (AMQTxOperation op : list) {
-            if (op.getOperationType() == op.ADD_OPERATION_TYPE) {
-                ops.add(op);
-            }
-        }
-        dataOut.writeInt(ops.size());
-        for (AMQTxOperation op : ops) {
-            op.writeExternal(wireFormat, dataOut);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AtomicIntegerMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AtomicIntegerMarshaller.java
deleted file mode 100644
index 4639177..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AtomicIntegerMarshaller.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.activemq.kaha.Marshaller;
-
-/**
- * Marshall an AtomicInteger
- * 
- * 
- */
-public class AtomicIntegerMarshaller implements Marshaller<AtomicInteger> {
-
-    public void writePayload(AtomicInteger ai, DataOutput dataOut) throws IOException {
-        dataOut.writeInt(ai.get());
-
-    }
-
-    public AtomicInteger readPayload(DataInput dataIn) throws IOException {
-        int value = dataIn.readInt();
-        return new AtomicInteger(value);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRef.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRef.java
deleted file mode 100644
index 892f63e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRef.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.kaha.StoreEntry;
-
-/**
- * Holds information for location of message
- * 
- * 
- */
-public class ConsumerMessageRef {
-
-    private MessageId messageId;
-    private StoreEntry messageEntry;
-    private StoreEntry ackEntry;
-
-    /**
-     * @return the ackEntry
-     */
-    public StoreEntry getAckEntry() {
-        return this.ackEntry;
-    }
-
-    /**
-     * @param ackEntry the ackEntry to set
-     */
-    public void setAckEntry(StoreEntry ackEntry) {
-        this.ackEntry = ackEntry;
-    }
-
-    /**
-     * @return the messageEntry
-     */
-    public StoreEntry getMessageEntry() {
-        return this.messageEntry;
-    }
-
-    /**
-     * @param messageEntry the messageEntry to set
-     */
-    public void setMessageEntry(StoreEntry messageEntry) {
-        this.messageEntry = messageEntry;
-    }
-
-    /**
-     * @return the messageId
-     */
-    public MessageId getMessageId() {
-        return this.messageId;
-    }
-
-    /**
-     * @param messageId the messageId to set
-     */
-    public void setMessageId(MessageId messageId) {
-        this.messageId = messageId;
-    }
-
-    public String toString() {
-        return "ConsumerMessageRef[" + messageId + "]";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRefMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRefMarshaller.java
deleted file mode 100644
index 1524279..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRefMarshaller.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-
-/**
- * Marshall a TopicSubAck
- * 
- * 
- */
-public class ConsumerMessageRefMarshaller implements Marshaller {
-
-    /**
-     * @param object
-     * @param dataOut
-     * @throws IOException
-     * @see org.apache.activemq.kaha.Marshaller#writePayload(java.lang.Object,
-     *      java.io.DataOutput)
-     */
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        ConsumerMessageRef ref = (ConsumerMessageRef)object;
-        dataOut.writeUTF(ref.getMessageId().toString());
-        IndexItem item = (IndexItem)ref.getMessageEntry();
-        dataOut.writeLong(item.getOffset());
-        item.write(dataOut);
-        item = (IndexItem)ref.getAckEntry();
-        dataOut.writeLong(item.getOffset());
-        item.write(dataOut);
-
-    }
-
-    /**
-     * @param dataIn
-     * @return payload
-     * @throws IOException
-     * @see org.apache.activemq.kaha.Marshaller#readPayload(java.io.DataInput)
-     */
-    public Object readPayload(DataInput dataIn) throws IOException {
-        ConsumerMessageRef ref = new ConsumerMessageRef();
-        ref.setMessageId(new MessageId(dataIn.readUTF()));
-        IndexItem item = new IndexItem();
-        item.setOffset(dataIn.readLong());
-        item.read(dataIn);
-        ref.setMessageEntry(item);
-        item = new IndexItem();
-        item.setOffset(dataIn.readLong());
-        item.read(dataIn);
-        ref.setAckEntry(item);
-        return ref;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/IntegerMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/IntegerMarshaller.java
deleted file mode 100644
index 0a4d16f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/IntegerMarshaller.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.kaha.Marshaller;
-
-/**
- * Marshall an Integer
- * 
- * 
- */
-public class IntegerMarshaller implements Marshaller<Integer> {
-
-    public void writePayload(Integer object, DataOutput dataOut) throws IOException {
-        dataOut.writeInt(object.intValue());
-    }
-
-    public Integer readPayload(DataInput dataIn) throws IOException {
-        return dataIn.readInt();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaMessageStore.java
deleted file mode 100755
index a239721..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaMessageStore.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.IOException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * An implementation of {@link org.apache.activemq.store.MessageStore} which
- * uses a JPS Container
- * 
- * 
- */
-public class KahaMessageStore extends AbstractMessageStore {
-
-    protected final MapContainer<MessageId, Message> messageContainer;
-    protected StoreEntry batchEntry;
-
-    public KahaMessageStore(MapContainer<MessageId, Message> container, ActiveMQDestination destination)
-        throws IOException {
-        super(destination);
-        this.messageContainer = container;
-    }
-
-    protected MessageId getMessageId(Object object) {
-        return ((Message)object).getMessageId();
-    }
-
-    public Object getId() {
-        return messageContainer.getId();
-    }
-
-    public synchronized void addMessage(ConnectionContext context, Message message) throws IOException {
-        messageContainer.put(message.getMessageId(), message);
-        // TODO: we should do the following but it is not need if the message is
-        // being added within a persistence
-        // transaction
-        // but since I can't tell if one is running right now.. I'll leave this
-        // out for now.
-        // if( message.isResponseRequired() ) {
-        // messageContainer.force();
-        // }
-    }
-
-    public synchronized Message getMessage(MessageId identity) throws IOException {
-        Message result = messageContainer.get(identity);
-        return result;
-    }
-
-    protected boolean recoverMessage(MessageRecoveryListener listener, Message msg) throws Exception {
-        listener.recoverMessage(msg);
-        return listener.hasSpace();
-    }
-
-    public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        removeMessage(ack.getLastMessageId());
-    }
-
-    public synchronized void removeMessage(MessageId msgId) throws IOException {
-        StoreEntry entry = messageContainer.getEntry(msgId);
-        if (entry != null) {
-            messageContainer.remove(entry);
-            if (messageContainer.isEmpty() || (batchEntry != null && batchEntry.equals(entry))) {
-                resetBatching();
-            }
-        }
-    }
-
-    public synchronized void recover(MessageRecoveryListener listener) throws Exception {
-        for (StoreEntry entry = messageContainer.getFirst(); entry != null; entry = messageContainer
-            .getNext(entry)) {
-            Message msg = (Message)messageContainer.getValue(entry);
-            if (!recoverMessage(listener, msg)) {
-                break;
-            }
-        }
-    }
-
-    public synchronized void removeAllMessages(ConnectionContext context) throws IOException {
-        messageContainer.clear();
-    }
-
-    public synchronized void delete() {
-        messageContainer.clear();
-    }
-
-    /**
-     * @return the number of messages held by this destination
-     * @see org.apache.activemq.store.MessageStore#getMessageCount()
-     */
-    public int getMessageCount() {
-        return messageContainer.size();
-    }
-
-    /**
-     * @param id
-     * @return null
-     * @throws Exception
-     * @see org.apache.activemq.store.MessageStore#getPreviousMessageIdToDeliver(org.apache.activemq.command.MessageId)
-     */
-    public MessageId getPreviousMessageIdToDeliver(MessageId id) throws Exception {
-        return null;
-    }
-
-    /**
-     * @param lastMessageId
-     * @param maxReturned
-     * @param listener
-     * @throws Exception
-     * @see org.apache.activemq.store.MessageStore#recoverNextMessages(org.apache.activemq.command.MessageId,
-     *      int, org.apache.activemq.store.MessageRecoveryListener)
-     */
-    public synchronized void recoverNextMessages(int maxReturned, MessageRecoveryListener listener)
-        throws Exception {
-        StoreEntry entry = batchEntry;
-        if (entry == null) {
-            entry = messageContainer.getFirst();
-        } else {
-            entry = messageContainer.refresh(entry);
-            entry = messageContainer.getNext(entry);
-            if (entry == null) {
-                batchEntry = null;
-            }
-        }
-        if (entry != null) {
-            int count = 0;
-            do {
-                Message msg = messageContainer.getValue(entry);
-                if (msg != null) {
-                    recoverMessage(listener, msg);
-                    count++;
-                }
-                batchEntry = entry;
-                entry = messageContainer.getNext(entry);
-            } while (entry != null && count < maxReturned && listener.hasSpace());
-        }
-    }
-
-    /**
-     * @param nextToDispatch
-     * @see org.apache.activemq.store.MessageStore#resetBatching(org.apache.activemq.command.MessageId)
-     */
-    public synchronized void resetBatching() {
-        batchEntry = null;
-    }
-
-    /**
-     * @return true if the store supports cursors
-     */
-    public boolean isSupportForCursors() {
-        return true;
-    }
-
-    @Override
-    public void setBatch(MessageId messageId) {
-        batchEntry = messageContainer.getEntry(messageId);
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
deleted file mode 100644
index 7c96f23..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.kaha.CommandMarshaller;
-import org.apache.activemq.kaha.ContainerId;
-import org.apache.activemq.kaha.ListContainer;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.MessageIdMarshaller;
-import org.apache.activemq.kaha.MessageMarshaller;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreFactory;
-import org.apache.activemq.kaha.impl.StoreLockedExcpetion;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @org.apache.xbean.XBean
- * 
- */
-public class KahaPersistenceAdapter implements PersistenceAdapter, BrokerServiceAware {
-
-    private static final int STORE_LOCKED_WAIT_DELAY = 10 * 1000;
-    private static final Logger LOG = LoggerFactory.getLogger(KahaPersistenceAdapter.class);
-    private static final String PREPARED_TRANSACTIONS_NAME = "PreparedTransactions";
-
-    protected OpenWireFormat wireFormat = new OpenWireFormat();
-    protected KahaTransactionStore transactionStore;
-    protected ConcurrentHashMap<ActiveMQTopic, TopicMessageStore> topics = new ConcurrentHashMap<ActiveMQTopic, TopicMessageStore>();
-    protected ConcurrentHashMap<ActiveMQQueue, MessageStore> queues = new ConcurrentHashMap<ActiveMQQueue, MessageStore>();
-    protected ConcurrentHashMap<ActiveMQDestination, MessageStore> messageStores = new ConcurrentHashMap<ActiveMQDestination, MessageStore>();
-
-    private long maxDataFileLength = 32 * 1024 * 1024;
-    private File directory;
-    private String brokerName;
-    private Store theStore;
-    private boolean initialized;
-    private final AtomicLong storeSize;
-    private boolean persistentIndex = true;
-    private BrokerService brokerService;
-
-    
-    public KahaPersistenceAdapter(AtomicLong size) {
-        this.storeSize=size;
-    }
-    
-    public KahaPersistenceAdapter() {
-        this(new AtomicLong());
-    }
-    
-    public Set<ActiveMQDestination> getDestinations() {
-        Set<ActiveMQDestination> rc = new HashSet<ActiveMQDestination>();
-        try {
-            Store store = getStore();
-            for (Iterator i = store.getMapContainerIds().iterator(); i.hasNext();) {
-                ContainerId id = (ContainerId)i.next();
-                Object obj = id.getKey();
-                if (obj instanceof ActiveMQDestination) {
-                    rc.add((ActiveMQDestination)obj);
-                }
-            }
-        } catch (IOException e) {
-            LOG.error("Failed to get destinations ", e);
-        }
-        return rc;
-    }
-
-    public synchronized MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        MessageStore rc = queues.get(destination);
-        if (rc == null) {
-            rc = new KahaMessageStore(getMapContainer(destination, "queue-data"), destination);
-            messageStores.put(destination, rc);
-            if (transactionStore != null) {
-                rc = transactionStore.proxy(rc);
-            }
-            queues.put(destination, rc);
-        }
-        return rc;
-    }
-
-    public synchronized TopicMessageStore createTopicMessageStore(ActiveMQTopic destination)
-        throws IOException {
-        TopicMessageStore rc = topics.get(destination);
-        if (rc == null) {
-            Store store = getStore();
-            MapContainer messageContainer = getMapContainer(destination, "topic-data");
-            MapContainer subsContainer = getSubsMapContainer(destination.toString() + "-Subscriptions",
-                                                             "topic-subs");
-            ListContainer<TopicSubAck> ackContainer = store.getListContainer(destination.toString(),
-                                                                             "topic-acks");
-            ackContainer.setMarshaller(new TopicSubAckMarshaller());
-            rc = new KahaTopicMessageStore(store, messageContainer, ackContainer, subsContainer, destination);
-            messageStores.put(destination, rc);
-            if (transactionStore != null) {
-                rc = transactionStore.proxy(rc);
-            }
-            topics.put(destination, rc);
-        }
-        return rc;
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination Destination to forget
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-        queues.remove(destination);
-        try{
-        	if(theStore!=null){
-        		theStore.deleteMapContainer(destination,"queue-data");
-        	}
-        }catch(IOException e ){
-        	LOG.error("Failed to remove store map container for queue:"+destination, e);
-        }
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination Destination to forget
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-        topics.remove(destination);
-    }
-
-    protected MessageStore retrieveMessageStore(Object id) {
-        MessageStore result = messageStores.get(id);
-        return result;
-    }
-
-    public TransactionStore createTransactionStore() throws IOException {
-        if (transactionStore == null) {
-            while (true) {
-                try {
-                    Store store = getStore();
-                    MapContainer container = store
-                        .getMapContainer(PREPARED_TRANSACTIONS_NAME, "transactions");
-                    container.setKeyMarshaller(new CommandMarshaller(wireFormat));
-                    container.setValueMarshaller(new TransactionMarshaller(wireFormat));
-                    container.load();
-                    transactionStore = new KahaTransactionStore(this, container);
-                    transactionStore.setBrokerService(brokerService);
-                    break;
-                } catch (StoreLockedExcpetion e) {
-                    LOG.info("Store is locked... waiting " + (STORE_LOCKED_WAIT_DELAY / 1000)
-                             + " seconds for the Store to be unlocked.");
-                    try {
-                        Thread.sleep(STORE_LOCKED_WAIT_DELAY);
-                    } catch (InterruptedException e1) {
-                    }
-                }
-            }
-        }
-        return transactionStore;
-    }
-
-    public void beginTransaction(ConnectionContext context) {
-    }
-
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        if (theStore != null) {
-            theStore.force();
-        }
-    }
-
-    public void rollbackTransaction(ConnectionContext context) {
-    }
-
-    public void start() throws Exception {
-        initialize();
-    }
-
-    public void stop() throws Exception {
-        if (theStore != null) {
-            theStore.close();
-        }
-    }
-
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return 0;
-    }
-
-    public void deleteAllMessages() throws IOException {
-        if (theStore != null) {
-            if (theStore.isInitialized()) {
-                theStore.clear();
-            } else {
-                theStore.delete();
-            }
-        } else {
-            StoreFactory.delete(getStoreDirectory());
-        }
-    }
-
-    protected MapContainer<MessageId, Message> getMapContainer(Object id, String containerName)
-        throws IOException {
-        Store store = getStore();
-        MapContainer<MessageId, Message> container = store.getMapContainer(id, containerName);
-        container.setKeyMarshaller(new MessageIdMarshaller());
-        container.setValueMarshaller(new MessageMarshaller(wireFormat));
-        container.load();
-        return container;
-    }
-
-    protected MapContainer getSubsMapContainer(Object id, String containerName)
-        throws IOException {
-        Store store = getStore();
-        MapContainer container = store.getMapContainer(id, containerName);
-        container.setKeyMarshaller(Store.STRING_MARSHALLER);
-        container.setValueMarshaller(createMessageMarshaller());
-        container.load();
-        return container;
-    }
-
-    protected Marshaller<Object> createMessageMarshaller() {
-        return new CommandMarshaller(wireFormat);
-    }
-
-    protected ListContainer<TopicSubAck> getListContainer(Object id, String containerName) throws IOException {
-        Store store = getStore();
-        ListContainer<TopicSubAck> container = store.getListContainer(id, containerName);
-        container.setMarshaller(createMessageMarshaller());
-        container.load();
-        return container;
-    }
-
-    /**
-     * @param usageManager The UsageManager that is controlling the broker's
-     *                memory usage.
-     */
-    public void setUsageManager(SystemUsage usageManager) {
-    }
-
-    /**
-     * @return the maxDataFileLength
-     */
-    public long getMaxDataFileLength() {
-        return maxDataFileLength;
-    }
-    
-    public boolean isPersistentIndex() {
-		return persistentIndex;
-	}
-
-	public void setPersistentIndex(boolean persistentIndex) {
-		this.persistentIndex = persistentIndex;
-	}
-
-    /**
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     */
-    public void setMaxDataFileLength(long maxDataFileLength) {
-        this.maxDataFileLength = maxDataFileLength;
-    }
-
-    protected final synchronized Store getStore() throws IOException {
-        if (theStore == null) {
-            theStore = createStore();
-        }
-        return theStore;
-    }
-    
-    protected final Store createStore() throws IOException {
-        Store result = StoreFactory.open(getStoreDirectory(), "rw",storeSize);
-        result.setMaxDataFileLength(maxDataFileLength);
-        result.setPersistentIndex(isPersistentIndex());
-        result.setDefaultContainerName("container-roots");
-        return result;
-    }
-
-    private String getStoreName() {
-        initialize();
-        return directory.getAbsolutePath();
-    }
-
-    private File getStoreDirectory() {
-        initialize();
-        return directory;
-    }
-
-    public String toString() {
-        return "KahaPersistenceAdapter(" + getStoreName() + ")";
-    }
-
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-    }
-
-    public String getBrokerName() {
-        return brokerName;
-    }
-
-    public File getDirectory() {
-        return this.directory;
-    }
-
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-
-    public void checkpoint(boolean sync) throws IOException {
-        if (sync) {
-            getStore().force();
-        }
-    }
-   
-    public long size(){
-       return storeSize.get();
-    }
-
-    private void initialize() {
-        if (!initialized) {
-            initialized = true;
-            if (this.directory == null) {
-                File file = new File(IOHelper.getDefaultDataDirectory());
-                file = new File(file, IOHelper.toFileSystemSafeName(brokerName) + "-kahastore");
-                setDirectory(file);
-            }
-            try {
-                IOHelper.mkdirs(this.directory);
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-            wireFormat.setCacheEnabled(false);
-            wireFormat.setTightEncodingEnabled(true);
-        }
-    }
-
-	public void setBrokerService(BrokerService brokerService) {
-		this.brokerService = brokerService;
-	}
-
-    public long getLastProducerSequenceId(ProducerId id) {
-        // reference store send has adequate duplicate suppression
-        return -1;
-    }
-  
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java
deleted file mode 100644
index e739203..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.MessageAckWithLocation;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.ReferenceStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author rajdavies
- *
- */
-public class KahaReferenceStore extends AbstractMessageStore implements ReferenceStore {
-
-    private static final Logger LOG = LoggerFactory.getLogger(KahaReferenceStore.class);
-    protected final MapContainer<MessageId, ReferenceRecord> messageContainer;
-    protected KahaReferenceStoreAdapter adapter;
-    // keep track of dispatched messages so that duplicate sends that follow a successful
-    // dispatch can be suppressed.
-    protected ActiveMQMessageAudit dispatchAudit = new ActiveMQMessageAudit();
-    private StoreEntry batchEntry;
-    private String lastBatchId;
-    protected final Lock lock = new ReentrantLock();
-
-    public KahaReferenceStore(KahaReferenceStoreAdapter adapter, MapContainer<MessageId, ReferenceRecord> container,
-                              ActiveMQDestination destination) throws IOException {
-        super(destination);
-        this.adapter = adapter;
-        this.messageContainer = container;
-    }
-    
-    public Lock getStoreLock() {
-        return lock;
-    }
-
-    public void dispose(ConnectionContext context) {
-        super.dispose(context);
-        this.messageContainer.delete();
-        this.adapter.removeReferenceStore(this);
-    }
-
-    protected MessageId getMessageId(Object object) {
-        return new MessageId(((ReferenceRecord)object).getMessageId());
-    }
-
-    public void addMessage(ConnectionContext context, Message message) throws IOException {
-        throw new RuntimeException("Use addMessageReference instead");
-    }
-
-    public Message getMessage(MessageId identity) throws IOException {
-        throw new RuntimeException("Use addMessageReference instead");
-    }
-
-    protected final boolean recoverReference(MessageRecoveryListener listener,
-            ReferenceRecord record) throws Exception {
-        MessageId id = new MessageId(record.getMessageId());
-        if (listener.hasSpace()) {
-            return listener.recoverMessageReference(id);
-        }
-        return false;
-    }
-
-    public void recover(MessageRecoveryListener listener) throws Exception {
-        lock.lock();
-        try {
-            for (StoreEntry entry = messageContainer.getFirst(); entry != null; entry = messageContainer
-                .getNext(entry)) {
-                ReferenceRecord record = messageContainer.getValue(entry);
-                if (!recoverReference(listener, record)) {
-                    break;
-                }
-            }
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener)
-        throws Exception {
-        lock.lock();
-        try {
-            StoreEntry entry = batchEntry;
-            if (entry == null) {
-                entry = messageContainer.getFirst();
-            } else {
-                entry = messageContainer.refresh(entry);
-                if (entry != null) {
-                    entry = messageContainer.getNext(entry);
-                }
-            }
-            if (entry != null) {      
-                int count = 0;
-                do {
-                    ReferenceRecord msg = messageContainer.getValue(entry);
-                    if (msg != null ) {
-                        if (recoverReference(listener, msg)) {
-                            count++;
-                            lastBatchId = msg.getMessageId();
-                        } else if (!listener.isDuplicate(new MessageId(msg.getMessageId()))) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(destination.getQualifiedName() + " did not recover (will retry) message: " + msg.getMessageId());
-                            }
-                            // give usage limits a chance to reclaim
-                            break;
-                        } else {
-                            // skip duplicate and continue
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(destination.getQualifiedName() + " skipping duplicate, " + msg.getMessageId());
-                            }
-                        }                        
-                    } else {
-                        lastBatchId = null;
-                    }
-                    batchEntry = entry;
-                    entry = messageContainer.getNext(entry);
-                } while (entry != null && count < maxReturned && listener.hasSpace());
-            }
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public boolean addMessageReference(ConnectionContext context, MessageId messageId,
-                                                 ReferenceData data) throws IOException {
-        
-        boolean uniqueueReferenceAdded = false;
-        lock.lock();
-        try {
-            if (!isDuplicate(messageId)) {
-                ReferenceRecord record = new ReferenceRecord(messageId.toString(), data);
-                messageContainer.put(messageId, record);
-                uniqueueReferenceAdded = true;
-                addInterest(record);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(destination.getPhysicalName() + " add: " + messageId);
-                }
-            }
-        } finally {
-            lock.unlock();
-        }
-        return uniqueueReferenceAdded;
-    }
-
-    protected boolean isDuplicate(final MessageId messageId) {
-        boolean duplicate = messageContainer.containsKey(messageId);
-        if (!duplicate) {
-            duplicate = dispatchAudit.isDuplicate(messageId);
-            if (duplicate) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(destination.getPhysicalName()
-                        + " ignoring duplicated (add) message reference, already dispatched: "
-                        + messageId);
-                }
-            }
-        } else if (LOG.isDebugEnabled()) {
-            LOG.debug(destination.getPhysicalName()
-                    + " ignoring duplicated (add) message reference, already in store: " + messageId);
-        }
-        return duplicate;
-    }
-    
-    public ReferenceData getMessageReference(MessageId identity) throws IOException {
-        lock.lock();
-        try {
-            ReferenceRecord result = messageContainer.get(identity);
-            if (result == null) {
-                return null;
-            }
-            return result.getData();
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        lock.lock();
-        try {
-            MessageId msgId = ack.getLastMessageId();
-            StoreEntry entry = messageContainer.getEntry(msgId);
-            if (entry != null) {
-                ReferenceRecord rr = messageContainer.remove(msgId);
-                if (rr != null) {
-                    removeInterest(rr);
-                    if (ack instanceof MessageAckWithLocation) {
-                        recordAckFileReferences((MessageAckWithLocation)ack, rr.getData().getFileId());
-                    }
-                    dispatchAudit.isDuplicate(msgId);
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(destination.getPhysicalName() + " remove reference: " + msgId);
-                    }
-                    if (messageContainer.isEmpty()
-                        || (lastBatchId != null && lastBatchId.equals(msgId.toString()))
-                        || (batchEntry != null && batchEntry.equals(entry))) {
-                        resetBatching();
-                    }
-                }
-            }
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    private void recordAckFileReferences(MessageAckWithLocation ack, int messageFileId) {
-        adapter.recordAckFileReferences(ack.location.getDataFileId(), messageFileId);
-    }
-
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        lock.lock();
-        try {
-            Set<MessageId> tmpSet = new HashSet<MessageId>(messageContainer.keySet());
-            MessageAck ack = new MessageAck();
-            for (MessageId id:tmpSet) {
-                ack.setLastMessageId(id);
-                removeMessage(null, ack);
-            }
-            resetBatching();
-            messageContainer.clear();
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public void delete() {
-        lock.lock();
-        try {
-            messageContainer.clear();
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public void resetBatching() {
-        lock.lock();
-        try {
-            batchEntry = null;
-            lastBatchId = null;
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public int getMessageCount() {
-        return messageContainer.size();
-    }
-
-    public boolean isSupportForCursors() {
-        return true;
-    }
-
-    public boolean supportsExternalBatchControl() {
-        return true;
-    }
-
-    void removeInterest(ReferenceRecord rr) {
-        adapter.removeInterestInRecordFile(rr.getData().getFileId());
-    }
-
-    void addInterest(ReferenceRecord rr) {
-        adapter.addInterestInRecordFile(rr.getData().getFileId());
-    }
-
-    /**
-     * @param startAfter
-     * @see org.apache.activemq.store.ReferenceStore#setBatch(org.apache.activemq.command.MessageId)
-     */
-    public void setBatch(MessageId startAfter) {
-        lock.lock();
-        try {
-            batchEntry = messageContainer.getEntry(startAfter);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("setBatch: " + startAfter);
-            }
-        } finally {
-            lock.unlock();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
deleted file mode 100644
index 5c8efe4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.kaha.CommandMarshaller;
-import org.apache.activemq.kaha.ListContainer;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.MessageIdMarshaller;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreFactory;
-import org.apache.activemq.kaha.impl.index.hash.HashIndex;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.ReferenceStore;
-import org.apache.activemq.store.ReferenceStoreAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TopicReferenceStore;
-import org.apache.activemq.store.amq.AMQTx;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class KahaReferenceStoreAdapter extends KahaPersistenceAdapter implements ReferenceStoreAdapter {
-
-    
-
-    private static final Logger LOG = LoggerFactory.getLogger(KahaReferenceStoreAdapter.class);
-    private static final String STORE_STATE = "store-state";
-    private static final String QUEUE_DATA = "queue-data";
-    private static final String INDEX_VERSION_NAME = "INDEX_VERSION";
-    private static final Integer INDEX_VERSION = new Integer(7);
-    private static final String RECORD_REFERENCES = "record-references";
-    private static final String TRANSACTIONS = "transactions-state";
-    private MapContainer stateMap;
-    private MapContainer<TransactionId, AMQTx> preparedTransactions;
-    private Map<Integer, AtomicInteger> recordReferences = new HashMap<Integer, AtomicInteger>();
-    private ListContainer<SubscriptionInfo> durableSubscribers;
-    private boolean storeValid;
-    private Store stateStore;
-    private boolean persistentIndex = true;
-    private int indexBinSize = HashIndex.DEFAULT_BIN_SIZE;
-    private int indexKeySize = HashIndex.DEFAULT_KEY_SIZE;
-    private int indexPageSize = HashIndex.DEFAULT_PAGE_SIZE;
-    private int indexMaxBinSize = HashIndex.MAXIMUM_CAPACITY;
-    private int indexLoadFactor = HashIndex.DEFAULT_LOAD_FACTOR;
-   
-
-    public KahaReferenceStoreAdapter(AtomicLong size){
-        super(size);
-    }
-    
-    public synchronized MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        throw new RuntimeException("Use createQueueReferenceStore instead");
-    }
-
-    public synchronized TopicMessageStore createTopicMessageStore(ActiveMQTopic destination)
-        throws IOException {
-        throw new RuntimeException("Use createTopicReferenceStore instead");
-    }
-
-    @Override
-    public synchronized void start() throws Exception {
-        super.start();
-        Store store = getStateStore();        
-        boolean empty = store.getMapContainerIds().isEmpty();
-        stateMap = store.getMapContainer("state", STORE_STATE);
-        stateMap.load();
-        storeValid=true;
-        if (!empty) {
-            AtomicBoolean status = (AtomicBoolean)stateMap.get(STORE_STATE);
-            if (status != null) {
-                storeValid = status.get();
-            }
-           
-            if (storeValid) {
-                //check what version the indexes are at
-                Integer indexVersion = (Integer) stateMap.get(INDEX_VERSION_NAME);
-                if (indexVersion==null || indexVersion.intValue() < INDEX_VERSION.intValue()) {
-                    storeValid = false;
-                    LOG.warn("Indexes at an older version - need to regenerate");
-                }
-            }
-            if (storeValid) {
-                if (stateMap.containsKey(RECORD_REFERENCES)) {
-                    recordReferences = (Map<Integer, AtomicInteger>)stateMap.get(RECORD_REFERENCES);
-                }
-            }
-        }
-        stateMap.put(STORE_STATE, new AtomicBoolean());
-        stateMap.put(INDEX_VERSION_NAME, INDEX_VERSION);
-        durableSubscribers = store.getListContainer("durableSubscribers");
-        durableSubscribers.setMarshaller(new CommandMarshaller());
-        preparedTransactions = store.getMapContainer("transactions", TRANSACTIONS, false);
-        // need to set the Marshallers here
-        preparedTransactions.setKeyMarshaller(Store.COMMAND_MARSHALLER);
-        preparedTransactions.setValueMarshaller(new AMQTxMarshaller(wireFormat));
-    }
-
-    @Override
-    public synchronized void stop() throws Exception {
-        stateMap.put(RECORD_REFERENCES, recordReferences);
-        stateMap.put(STORE_STATE, new AtomicBoolean(true));
-        stateMap.put(INDEX_VERSION_NAME, INDEX_VERSION);
-        if (this.stateStore != null) {
-            this.stateStore.close();
-            this.stateStore = null;
-            this.stateMap = null;
-        }
-        super.stop();
-    }
-    
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        //we don;t need to force on a commit - as the reference store
-        //is rebuilt on a non clean shutdown
-    }
-
-    public boolean isStoreValid() {
-        return storeValid;
-    }
-
-    public ReferenceStore createQueueReferenceStore(ActiveMQQueue destination) throws IOException {
-        ReferenceStore rc = (ReferenceStore)queues.get(destination);
-        if (rc == null) {
-            rc = new KahaReferenceStore(this, getMapReferenceContainer(destination, QUEUE_DATA),
-                                        destination);
-            messageStores.put(destination, rc);
-            // if(transactionStore!=null){
-            // rc=transactionStore.proxy(rc);
-            // }
-            queues.put(destination, rc);
-        }
-        return rc;
-    }
-
-    public TopicReferenceStore createTopicReferenceStore(ActiveMQTopic destination) throws IOException {
-        TopicReferenceStore rc = (TopicReferenceStore)topics.get(destination);
-        if (rc == null) {
-            Store store = getStore();
-            MapContainer messageContainer = getMapReferenceContainer(destination.getPhysicalName(), "topic-data");
-            MapContainer subsContainer = getSubsMapContainer(destination.getPhysicalName() + "-Subscriptions", "blob");
-            ListContainer<TopicSubAck> ackContainer = store.getListContainer(destination.getPhysicalName(), "topic-acks");
-            ackContainer.setMarshaller(new TopicSubAckMarshaller());
-            rc = new KahaTopicReferenceStore(store, this, messageContainer, ackContainer, subsContainer,
-                                             destination);
-            messageStores.put(destination, rc);
-            // if(transactionStore!=null){
-            // rc=transactionStore.proxy(rc);
-            // }
-            topics.put(destination, rc);
-        }
-        return rc;
-    }
-
-    public void removeReferenceStore(KahaReferenceStore referenceStore) {
-        ActiveMQDestination destination = referenceStore.getDestination();
-        if (destination.isQueue()) {
-            queues.remove(destination);
-            try {
-                getStore().deleteMapContainer(destination, QUEUE_DATA);
-            } catch (IOException e) {
-                LOG.error("Failed to delete " + QUEUE_DATA + " map container for destination: " + destination, e);
-            }
-        } else {
-            topics.remove(destination);
-        }
-        messageStores.remove(destination);
-    }
-/*
-    public void buildReferenceFileIdsInUse() throws IOException {
-        recordReferences = new HashMap<Integer, AtomicInteger>();
-        Set<ActiveMQDestination> destinations = getDestinations();
-        for (ActiveMQDestination destination : destinations) {
-            if (destination.isQueue()) {
-                KahaReferenceStore store = (KahaReferenceStore)createQueueReferenceStore((ActiveMQQueue)destination);
-                store.addReferenceFileIdsInUse();
-            } else {
-                KahaTopicReferenceStore store = (KahaTopicReferenceStore)createTopicReferenceStore((ActiveMQTopic)destination);
-                store.addReferenceFileIdsInUse();
-            }
-        }
-    }
-    */
-
-    protected MapContainer<MessageId, ReferenceRecord> getMapReferenceContainer(Object id,
-                                                                                String containerName)
-        throws IOException {
-        Store store = getStore();
-        MapContainer<MessageId, ReferenceRecord> container = store.getMapContainer(id, containerName,persistentIndex);
-        container.setIndexBinSize(getIndexBinSize());
-        container.setIndexKeySize(getIndexKeySize());
-        container.setIndexPageSize(getIndexPageSize());
-        container.setIndexMaxBinSize(getIndexMaxBinSize());
-        container.setIndexLoadFactor(getIndexLoadFactor());
-        container.setKeyMarshaller(new MessageIdMarshaller());
-        container.setValueMarshaller(new ReferenceRecordMarshaller());
-        container.load();
-        return container;
-    }
-
-    synchronized void addInterestInRecordFile(int recordNumber) {
-        Integer key = Integer.valueOf(recordNumber);
-        AtomicInteger rr = recordReferences.get(key);
-        if (rr == null) {
-            rr = new AtomicInteger();
-            recordReferences.put(key, rr);
-        }
-        rr.incrementAndGet();
-    }
-
-    synchronized void removeInterestInRecordFile(int recordNumber) {
-        Integer key = Integer.valueOf(recordNumber);
-        AtomicInteger rr = recordReferences.get(key);
-        if (rr != null && rr.decrementAndGet() <= 0) {
-            recordReferences.remove(key);
-        }
-    }
-
-    /**
-     * @return
-     * @throws IOException
-     * @see org.apache.activemq.store.ReferenceStoreAdapter#getReferenceFileIdsInUse()
-     */
-    public synchronized Set<Integer> getReferenceFileIdsInUse() throws IOException {
-        Set inUse = new HashSet<Integer>(recordReferences.keySet());
-
-        Iterator<Map.Entry<Integer, Set<Integer>>> ackReferences = ackMessageFileMap.entrySet().iterator();
-        while (ackReferences.hasNext()) {
-            Map.Entry<Integer, Set<Integer>> ackReference = ackReferences.next();
-            if (!inUse.contains(ackReference.getKey())) {
-                // should we keep this data file
-                for (Integer referencedFileId : ackReference.getValue()) {
-                    if (inUse.contains(referencedFileId)) {
-                        // keep this ack file
-                        inUse.add(ackReference.getKey());
-                        LOG.debug("not removing data file: " + ackReference.getKey()
-                                        + " as contained ack(s) refer to referencedFileId file: " + ackReference.getValue());
-                        break;
-                    }
-                }
-            }
-            if (!inUse.contains(ackReference.getKey())) {
-               ackReferences.remove();
-            }
-        }
-
-        return inUse;
-    }
-
-    Map<Integer, Set<Integer>> ackMessageFileMap = new HashMap<Integer, Set<Integer>>();
-    public synchronized void recordAckFileReferences(int ackDataFileId, int messageFileId) {
-        Set<Integer> referenceFileIds = ackMessageFileMap.get(Integer.valueOf(ackDataFileId));
-        if (referenceFileIds == null) {
-            referenceFileIds = new HashSet<Integer>();
-            referenceFileIds.add(Integer.valueOf(messageFileId));
-            ackMessageFileMap.put(Integer.valueOf(ackDataFileId), referenceFileIds);
-        } else {
-            Integer id = Integer.valueOf(messageFileId);
-            if (!referenceFileIds.contains(id)) {
-                referenceFileIds.add(id);
-            }
-        }
-    }
-
-    /**
-     *
-     * @throws IOException
-     * @see org.apache.activemq.store.ReferenceStoreAdapter#clearMessages()
-     */
-    public void clearMessages() throws IOException {
-        //don't delete messages as it will clear state - call base
-        //class method to clear out the data instead
-        super.deleteAllMessages();
-    }
-
-    /**
-     *
-     * @throws IOException
-     * @see org.apache.activemq.store.ReferenceStoreAdapter#recoverState()
-     */
-
-    public void recoverState() throws IOException {
-        Set<SubscriptionInfo> set = new HashSet<SubscriptionInfo>(this.durableSubscribers);
-        for (SubscriptionInfo info:set) {
-            LOG.info("Recovering subscriber state for durable subscriber: " + info);
-            TopicReferenceStore ts = createTopicReferenceStore((ActiveMQTopic)info.getDestination());
-            ts.addSubsciption(info, false);
-        }
-    }
-    
-    public void recoverSubscription(SubscriptionInfo info) throws IOException {
-        TopicReferenceStore ts = createTopicReferenceStore((ActiveMQTopic)info.getDestination());
-        LOG.info("Recovering subscriber state for durable subscriber: " + info);
-        ts.addSubsciption(info, false);
-    }
-    
-
-    public Map<TransactionId, AMQTx> retrievePreparedState() throws IOException {
-        Map<TransactionId, AMQTx> result = new HashMap<TransactionId, AMQTx>();
-        preparedTransactions.load();
-        for (Iterator<TransactionId> i = preparedTransactions.keySet().iterator(); i.hasNext();) {
-            TransactionId key = i.next();
-            AMQTx value = preparedTransactions.get(key);
-            result.put(key, value);
-        }
-        return result;
-    }
-
-    public void savePreparedState(Map<TransactionId, AMQTx> map) throws IOException {
-        preparedTransactions.clear();
-        for (Iterator<Map.Entry<TransactionId, AMQTx>> iter = map.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry<TransactionId, AMQTx> entry = iter.next();
-            preparedTransactions.put(entry.getKey(), entry.getValue());
-        }
-    }
-
-    @Override
-    public synchronized void setDirectory(File directory) {
-        File file = new File(directory, "data");
-        super.setDirectory(file);
-        this.stateStore = createStateStore(directory);
-    }
-
-    protected synchronized Store getStateStore() throws IOException {
-        if (this.stateStore == null) {
-            File stateDirectory = new File(getDirectory(), "kr-state");
-            IOHelper.mkdirs(stateDirectory);
-            this.stateStore = createStateStore(getDirectory());
-        }
-        return this.stateStore;
-    }
-
-    public void deleteAllMessages() throws IOException {
-        super.deleteAllMessages();
-        if (stateStore != null) {
-            if (stateStore.isInitialized()) {
-                stateStore.clear();
-            } else {
-                stateStore.delete();
-            }
-        } else {
-            File stateDirectory = new File(getDirectory(), "kr-state");
-            StoreFactory.delete(stateDirectory);
-        }
-    }
-
-    public boolean isPersistentIndex() {
-		return persistentIndex;
-	}
-
-	public void setPersistentIndex(boolean persistentIndex) {
-		this.persistentIndex = persistentIndex;
-	}
-
-    private Store createStateStore(File directory) {
-        File stateDirectory = new File(directory, "state");
-        try {
-            IOHelper.mkdirs(stateDirectory);
-            return StoreFactory.open(stateDirectory, "rw");
-        } catch (IOException e) {
-            LOG.error("Failed to create the state store", e);
-        }
-        return null;
-    }
-
-    protected void addSubscriberState(SubscriptionInfo info) throws IOException {
-        durableSubscribers.add(info);
-    }
-
-    protected void removeSubscriberState(SubscriptionInfo info) {
-        durableSubscribers.remove(info);
-    }
-
-    public int getIndexBinSize() {
-        return indexBinSize;
-    }
-
-    public void setIndexBinSize(int indexBinSize) {
-        this.indexBinSize = indexBinSize;
-    }
-
-    public int getIndexKeySize() {
-        return indexKeySize;
-    }
-
-    public void setIndexKeySize(int indexKeySize) {
-        this.indexKeySize = indexKeySize;
-    }
-
-    public int getIndexPageSize() {
-        return indexPageSize;
-    }
-
-    public void setIndexPageSize(int indexPageSize) {
-        this.indexPageSize = indexPageSize;
-    }
-
-    public int getIndexMaxBinSize() {
-        return indexMaxBinSize;
-    }
-
-    public void setIndexMaxBinSize(int maxBinSize) {
-        this.indexMaxBinSize = maxBinSize;
-    }
-
-    /**
-     * @return the loadFactor
-     */
-    public int getIndexLoadFactor() {
-        return indexLoadFactor;
-    }
-
-    /**
-     * @param loadFactor the loadFactor to set
-     */
-    public void setIndexLoadFactor(int loadFactor) {
-        this.indexLoadFactor = loadFactor;
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
deleted file mode 100755
index d993611..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.kaha.ListContainer;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.TopicMessageStore;
-
-/**
- * 
- */
-public class KahaTopicMessageStore extends KahaMessageStore implements TopicMessageStore {
-
-    protected ListContainer<TopicSubAck> ackContainer;
-    protected Map<Object, TopicSubContainer> subscriberMessages = new ConcurrentHashMap<Object, TopicSubContainer>();
-    private Map<String, SubscriptionInfo> subscriberContainer;
-    private Store store;
-
-    public KahaTopicMessageStore(Store store, MapContainer<MessageId, Message> messageContainer,
-                                 ListContainer<TopicSubAck> ackContainer, MapContainer<String, SubscriptionInfo> subsContainer,
-                                 ActiveMQDestination destination) throws IOException {
-        super(messageContainer, destination);
-        this.store = store;
-        this.ackContainer = ackContainer;
-        subscriberContainer = subsContainer;
-        // load all the Ack containers
-        for (Iterator<String> i = subscriberContainer.keySet().iterator(); i.hasNext();) {
-            Object key = i.next();
-            addSubscriberMessageContainer(key);
-        }
-    }
-
-    @Override
-    public synchronized void addMessage(ConnectionContext context, Message message) throws IOException {
-        int subscriberCount = subscriberMessages.size();
-        if (subscriberCount > 0) {
-            MessageId id = message.getMessageId();
-            StoreEntry messageEntry = messageContainer.place(id, message);
-            TopicSubAck tsa = new TopicSubAck();
-            tsa.setCount(subscriberCount);
-            tsa.setMessageEntry(messageEntry);
-            StoreEntry ackEntry = ackContainer.placeLast(tsa);
-            for (Iterator<TopicSubContainer> i = subscriberMessages.values().iterator(); i.hasNext();) {
-                TopicSubContainer container = i.next();
-                ConsumerMessageRef ref = new ConsumerMessageRef();
-                ref.setAckEntry(ackEntry);
-                ref.setMessageEntry(messageEntry);
-                ref.setMessageId(id);
-                container.add(ref);
-            }
-        }
-    }
-
-    public synchronized void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                                         MessageId messageId, MessageAck ack) throws IOException {
-        String subcriberId = getSubscriptionKey(clientId, subscriptionName);
-        TopicSubContainer container = subscriberMessages.get(subcriberId);
-        if (container != null) {
-            ConsumerMessageRef ref = container.remove(messageId);
-            if (container.isEmpty()) {
-                container.reset();
-            }
-            if (ref != null) {
-                TopicSubAck tsa = ackContainer.get(ref.getAckEntry());
-                if (tsa != null) {
-                    if (tsa.decrementCount() <= 0) {
-                        StoreEntry entry = ref.getAckEntry();
-                        entry = ackContainer.refresh(entry);
-                        ackContainer.remove(entry);
-                        entry = tsa.getMessageEntry();
-                        entry = messageContainer.refresh(entry);
-                        messageContainer.remove(entry);
-                    } else {
-                        ackContainer.update(ref.getAckEntry(), tsa);
-                    }
-                }
-            }
-        }
-    }
-
-    public synchronized SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-        return subscriberContainer.get(getSubscriptionKey(clientId, subscriptionName));
-    }
-
-    public synchronized void addSubsciption(SubscriptionInfo info, boolean retroactive) throws IOException {
-        String key = getSubscriptionKey(info.getClientId(), info.getSubscriptionName());
-        // if already exists - won't add it again as it causes data files
-        // to hang around
-        if (!subscriberContainer.containsKey(key)) {
-            subscriberContainer.put(key, info);
-        }
-        // add the subscriber
-        addSubscriberMessageContainer(key);
-        /*
-         * if(retroactive){ for(StoreEntry
-         * entry=ackContainer.getFirst();entry!=null;entry=ackContainer.getNext(entry)){
-         * TopicSubAck tsa=(TopicSubAck)ackContainer.get(entry);
-         * ConsumerMessageRef ref=new ConsumerMessageRef();
-         * ref.setAckEntry(entry); ref.setMessageEntry(tsa.getMessageEntry());
-         * container.add(ref); } }
-         */
-    }
-
-    public synchronized void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-        String key = getSubscriptionKey(clientId, subscriptionName);
-        removeSubscriberMessageContainer(key);
-    }
-
-    public synchronized void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener)
-        throws Exception {
-        String key = getSubscriptionKey(clientId, subscriptionName);
-        TopicSubContainer container = subscriberMessages.get(key);
-        if (container != null) {
-            for (Iterator i = container.iterator(); i.hasNext();) {
-                ConsumerMessageRef ref = (ConsumerMessageRef)i.next();
-                Message msg = messageContainer.get(ref.getMessageEntry());
-                if (msg != null) {
-                    if (!recoverMessage(listener, msg)) {
-                        break;
-                    }
-                }
-            }
-        }
-    }
-
-    public synchronized void recoverNextMessages(String clientId, String subscriptionName, int maxReturned,
-                                    MessageRecoveryListener listener) throws Exception {
-        String key = getSubscriptionKey(clientId, subscriptionName);
-        TopicSubContainer container = subscriberMessages.get(key);
-        if (container != null) {
-            int count = 0;
-            StoreEntry entry = container.getBatchEntry();
-            if (entry == null) {
-                entry = container.getEntry();
-            } else {
-                entry = container.refreshEntry(entry);
-                if (entry != null) {
-                    entry = container.getNextEntry(entry);
-                }
-            }
-            if (entry != null) {
-                do {
-                    ConsumerMessageRef consumerRef = container.get(entry);
-                    Message msg = messageContainer.getValue(consumerRef.getMessageEntry());
-                    if (msg != null) {
-                        recoverMessage(listener, msg);
-                        count++;
-                        container.setBatchEntry(msg.getMessageId().toString(), entry);
-                    } else {
-                        container.reset();
-                    }
-
-                    entry = container.getNextEntry(entry);
-                } while (entry != null && count < maxReturned && listener.hasSpace());
-            }
-        }
-    }
-
-    public synchronized void delete() {
-        super.delete();
-        ackContainer.clear();
-        subscriberContainer.clear();
-    }
-
-    public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-        return subscriberContainer.values()
-            .toArray(new SubscriptionInfo[subscriberContainer.size()]);
-    }
-
-    protected String getSubscriptionKey(String clientId, String subscriberName) {
-        String result = clientId + ":";
-        result += subscriberName != null ? subscriberName : "NOT_SET";
-        return result;
-    }
-
-    protected MapContainer addSubscriberMessageContainer(Object key) throws IOException {
-        MapContainer container = store.getMapContainer(key, "topic-subs");
-        container.setKeyMarshaller(Store.MESSAGEID_MARSHALLER);
-        Marshaller marshaller = new ConsumerMessageRefMarshaller();
-        container.setValueMarshaller(marshaller);
-        TopicSubContainer tsc = new TopicSubContainer(container);
-        subscriberMessages.put(key, tsc);
-        return container;
-    }
-
-    protected synchronized void removeSubscriberMessageContainer(Object key)
-            throws IOException {
-        subscriberContainer.remove(key);
-        TopicSubContainer container = subscriberMessages.remove(key);
-        if (container != null) {
-            for (Iterator i = container.iterator(); i.hasNext();) {
-                ConsumerMessageRef ref = (ConsumerMessageRef) i.next();
-                if (ref != null) {
-                    TopicSubAck tsa = ackContainer.get(ref.getAckEntry());
-                    if (tsa != null) {
-                        if (tsa.decrementCount() <= 0) {
-                            ackContainer.remove(ref.getAckEntry());
-                            messageContainer.remove(tsa.getMessageEntry());
-                        } else {
-                            ackContainer.update(ref.getAckEntry(), tsa);
-                        }
-                    }
-                }
-            }
-            container.clear();
-        }
-        store.deleteListContainer(key, "topic-subs");
-
-    }
-
-    public synchronized int getMessageCount(String clientId, String subscriberName) throws IOException {
-        String key = getSubscriptionKey(clientId, subscriberName);
-        TopicSubContainer container = subscriberMessages.get(key);
-        return container != null ? container.size() : 0;
-    }
-
-    /**
-     * @param context
-     * @throws IOException
-     * @see org.apache.activemq.store.MessageStore#removeAllMessages(org.apache.activemq.broker.ConnectionContext)
-     */
-    public synchronized void removeAllMessages(ConnectionContext context) throws IOException {
-        messageContainer.clear();
-        ackContainer.clear();
-        for (Iterator<TopicSubContainer> i = subscriberMessages.values().iterator(); i.hasNext();) {
-            TopicSubContainer container = i.next();
-            container.clear();
-        }
-    }
-
-    public synchronized void resetBatching(String clientId, String subscriptionName) {
-        String key = getSubscriptionKey(clientId, subscriptionName);
-        TopicSubContainer topicSubContainer = subscriberMessages.get(key);
-        if (topicSubContainer != null) {
-            topicSubContainer.reset();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
deleted file mode 100644
index 39a4816..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.kaha.ListContainer;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.TopicReferenceStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class KahaTopicReferenceStore extends KahaReferenceStore implements TopicReferenceStore {
-    private static final Logger LOG = LoggerFactory.getLogger(KahaTopicReferenceStore.class);
-    protected ListContainer<TopicSubAck> ackContainer;
-    protected Map<String, TopicSubContainer> subscriberMessages = new ConcurrentHashMap<String, TopicSubContainer>();
-    private MapContainer<String, SubscriptionInfo> subscriberContainer;
-    private Store store;
-    private static final String TOPIC_SUB_NAME = "tsn";
-
-    public KahaTopicReferenceStore(Store store, KahaReferenceStoreAdapter adapter,
-                                   MapContainer<MessageId, ReferenceRecord> messageContainer, ListContainer<TopicSubAck> ackContainer,
-                                   MapContainer<String, SubscriptionInfo> subsContainer, ActiveMQDestination destination)
-        throws IOException {
-        super(adapter, messageContainer, destination);
-        this.store = store;
-        this.ackContainer = ackContainer;
-        subscriberContainer = subsContainer;
-        // load all the Ack containers
-        for (Iterator<SubscriptionInfo> i = subscriberContainer.values().iterator(); i.hasNext();) {
-            SubscriptionInfo info = i.next();
-            addSubscriberMessageContainer(info.getClientId(), info.getSubscriptionName());
-        }
-    }
-
-    public void dispose(ConnectionContext context) {
-        super.dispose(context);
-        subscriberContainer.delete();
-    }
-
-    protected MessageId getMessageId(Object object) {
-        return new MessageId(((ReferenceRecord)object).getMessageId());
-    }
-
-    public void addMessage(ConnectionContext context, Message message) throws IOException {
-        throw new RuntimeException("Use addMessageReference instead");
-    }
-
-    public Message getMessage(MessageId identity) throws IOException {
-        throw new RuntimeException("Use addMessageReference instead");
-    }
-
-    public boolean addMessageReference(final ConnectionContext context, final MessageId messageId,
-                                    final ReferenceData data) {
-        boolean uniqueReferenceAdded = false;
-        lock.lock();
-        try {
-            final ReferenceRecord record = new ReferenceRecord(messageId.toString(), data);
-            final int subscriberCount = subscriberMessages.size();
-            if (subscriberCount > 0 && !isDuplicate(messageId)) {
-                final StoreEntry messageEntry = messageContainer.place(messageId, record);
-                addInterest(record);
-                uniqueReferenceAdded = true;
-                final TopicSubAck tsa = new TopicSubAck();
-                tsa.setCount(subscriberCount);
-                tsa.setMessageEntry(messageEntry);
-                final StoreEntry ackEntry = ackContainer.placeLast(tsa);
-                for (final Iterator<TopicSubContainer> i = subscriberMessages.values().iterator(); i.hasNext();) {
-                    final TopicSubContainer container = i.next();
-                    final ConsumerMessageRef ref = new ConsumerMessageRef();
-                    ref.setAckEntry(ackEntry);
-                    ref.setMessageEntry(messageEntry);
-                    ref.setMessageId(messageId);
-                    container.add(ref);
-                }
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace(destination.getPhysicalName() + " add reference: " + messageId);
-                }
-            } else {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("no subscribers or duplicate add for: "  + messageId);
-                }
-            }
-        } finally {
-            lock.unlock();
-        }
-        return uniqueReferenceAdded;
-    }
-
-    public ReferenceData getMessageReference(final MessageId identity) throws IOException {
-        final ReferenceRecord result = messageContainer.get(identity);
-        if (result == null) {
-            return null;
-        }
-        return result.getData();
-    }
-
-    public void addReferenceFileIdsInUse() {
-        for (StoreEntry entry = ackContainer.getFirst(); entry != null; entry = ackContainer.getNext(entry)) {
-            TopicSubAck subAck = ackContainer.get(entry);
-            if (subAck.getCount() > 0) {
-                ReferenceRecord rr = messageContainer.getValue(subAck.getMessageEntry());
-                addInterest(rr);
-            }
-        }
-    }
-
-    
-    protected MapContainer addSubscriberMessageContainer(String clientId, String subscriptionName) throws IOException {
-        String containerName = getSubscriptionContainerName(getSubscriptionKey(clientId, subscriptionName));
-        MapContainer container = store.getMapContainer(containerName,containerName);
-        container.setKeyMarshaller(Store.MESSAGEID_MARSHALLER);
-        Marshaller marshaller = new ConsumerMessageRefMarshaller();
-        container.setValueMarshaller(marshaller);
-        TopicSubContainer tsc = new TopicSubContainer(container);
-        subscriberMessages.put(getSubscriptionKey(clientId, subscriptionName), tsc);
-        return container;
-    }
-
-    public boolean acknowledgeReference(ConnectionContext context,
-            String clientId, String subscriptionName, MessageId messageId)
-            throws IOException {
-        boolean removeMessage = false;
-        lock.lock();
-            try {
-            String key = getSubscriptionKey(clientId, subscriptionName);
-    
-            TopicSubContainer container = subscriberMessages.get(key);
-            if (container != null) {
-                ConsumerMessageRef ref = null;
-                if((ref = container.remove(messageId)) != null) {
-                    StoreEntry entry = ref.getAckEntry();
-                    //ensure we get up to-date pointers
-                    entry = ackContainer.refresh(entry);
-                    TopicSubAck tsa = ackContainer.get(entry);
-                    if (tsa != null) {
-                        if (tsa.decrementCount() <= 0) {
-                            ackContainer.remove(entry);
-                            ReferenceRecord rr = messageContainer.get(messageId);
-                            if (rr != null) {
-                                entry = tsa.getMessageEntry();
-                                entry = messageContainer.refresh(entry);
-                                messageContainer.remove(entry);
-                                removeInterest(rr);
-                                removeMessage = true;
-                                dispatchAudit.isDuplicate(messageId);
-                            }
-                        }else {
-                            ackContainer.update(entry,tsa);
-                        }
-                    }
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace(destination.getPhysicalName() + " remove: " + messageId);
-                    }
-                }else{
-                    if (ackContainer.isEmpty() || subscriberMessages.size() == 1 || isUnreferencedBySubscribers(key, subscriberMessages, messageId)) {
-                        // no message reference held        
-                        removeMessage = true;
-                        // ensure we don't later add a reference
-                        dispatchAudit.isDuplicate(messageId);
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug(destination.getPhysicalName() + " remove with no outstanding reference (ack before add): " + messageId);
-                        }
-                    }
-                }
-            }
-        }finally {
-            lock.unlock();
-        }
-        return removeMessage;
-    }
-    
-    // verify that no subscriber has a reference to this message. In the case where the subscribers
-    // references are persisted but more than the persisted consumers get the message, the ack from the non
-    // persisted consumer would remove the message in error
-    //
-    // see: https://issues.apache.org/activemq/browse/AMQ-2123
-    private boolean isUnreferencedBySubscribers(
-            String key, Map<String, TopicSubContainer> subscriberContainers, MessageId messageId) {
-        boolean isUnreferenced = true;
-        for (Entry<String, TopicSubContainer> entry : subscriberContainers.entrySet()) {
-            if (!key.equals(entry.getKey()) && !entry.getValue().isEmpty()) {
-                TopicSubContainer container = entry.getValue();
-                for (Iterator i = container.iterator(); i.hasNext();) {
-                    ConsumerMessageRef ref = (ConsumerMessageRef) i.next();
-                    if (messageId.equals(ref.getMessageId())) {
-                        isUnreferenced = false;
-                        break;
-                    }
-                }
-            }
-        }
-        return isUnreferenced; 
-    }
-
-    public void acknowledge(ConnectionContext context,
-			String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException {
-	    acknowledgeReference(context, clientId, subscriptionName, messageId);
-	}
-
-    public void addSubsciption(SubscriptionInfo info, boolean retroactive) throws IOException {
-        String key = getSubscriptionKey(info.getClientId(), info.getSubscriptionName());
-        lock.lock();
-        try {
-            // if already exists - won't add it again as it causes data files
-            // to hang around
-            if (!subscriberContainer.containsKey(key)) {
-                subscriberContainer.put(key, info);
-                adapter.addSubscriberState(info);
-            }
-            // add the subscriber
-            addSubscriberMessageContainer(info.getClientId(), info.getSubscriptionName());
-            if (retroactive) {
-                /*
-                 * for(StoreEntry
-                 * entry=ackContainer.getFirst();entry!=null;entry=ackContainer.getNext(entry)){
-                 * TopicSubAck tsa=(TopicSubAck)ackContainer.get(entry);
-                 * ConsumerMessageRef ref=new ConsumerMessageRef();
-                 * ref.setAckEntry(entry);
-                 * ref.setMessageEntry(tsa.getMessageEntry()); container.add(ref); }
-                 */
-            }
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-        lock.lock();
-        try {
-            SubscriptionInfo info = lookupSubscription(clientId, subscriptionName);
-            if (info != null) {
-                adapter.removeSubscriberState(info);
-            }
-        removeSubscriberMessageContainer(clientId,subscriptionName);
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-        SubscriptionInfo[] result = subscriberContainer.values()
-            .toArray(new SubscriptionInfo[subscriberContainer.size()]);
-        return result;
-    }
-
-    public int getMessageCount(String clientId, String subscriberName) throws IOException {
-        String key = getSubscriptionKey(clientId, subscriberName);
-        TopicSubContainer container = subscriberMessages.get(key);
-        return container != null ? container.size() : 0;
-    }
-
-    public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-        return subscriberContainer.get(getSubscriptionKey(clientId, subscriptionName));
-    }
-
-    public void recoverNextMessages(String clientId, String subscriptionName, int maxReturned,
-                                                 MessageRecoveryListener listener) throws Exception {
-        String key = getSubscriptionKey(clientId, subscriptionName);
-        lock.lock();
-        try {
-            TopicSubContainer container = subscriberMessages.get(key);
-            if (container != null) {
-                int count = 0;
-                StoreEntry entry = container.getBatchEntry();
-                if (entry == null) {
-                    entry = container.getEntry();
-                } else {
-                    entry = container.refreshEntry(entry);
-                    if (entry != null) {
-                        entry = container.getNextEntry(entry);
-                    }
-                }
-               
-                if (entry != null) {
-                    do {
-                        ConsumerMessageRef consumerRef = container.get(entry);
-                        ReferenceRecord msg = messageContainer.getValue(consumerRef
-                                .getMessageEntry());
-                        if (msg != null) {
-                            if (recoverReference(listener, msg)) {
-                                count++;
-                                container.setBatchEntry(msg.getMessageId(), entry);
-                            }
-                        } else {
-                            container.reset();
-                        }
-    
-                        entry = container.getNextEntry(entry);
-                    } while (entry != null && count < maxReturned && listener.hasSpace());
-                }
-            }
-        }finally {
-            lock.unlock();
-        }
-    }
-
-    public void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener)
-        throws Exception {
-        String key = getSubscriptionKey(clientId, subscriptionName);
-        TopicSubContainer container = subscriberMessages.get(key);
-        if (container != null) {
-            for (Iterator i = container.iterator(); i.hasNext();) {
-                ConsumerMessageRef ref = (ConsumerMessageRef)i.next();
-                ReferenceRecord msg = messageContainer.getValue(ref.getMessageEntry());
-                if (msg != null) {
-                    if (!recoverReference(listener, msg)) {
-                        break;
-                    }
-                }
-            }
-        }
-    }
-
-    public void resetBatching(String clientId, String subscriptionName) {
-        lock.lock();
-        try {
-            String key = getSubscriptionKey(clientId, subscriptionName);
-            TopicSubContainer topicSubContainer = subscriberMessages.get(key);
-            if (topicSubContainer != null) {
-                topicSubContainer.reset();
-            }
-        }finally {
-            lock.unlock();
-        }
-    }
-    
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        lock.lock();
-        try {
-            Set<String> tmpSet = new HashSet<String>(subscriberContainer.keySet());
-            for (String key:tmpSet) {
-                TopicSubContainer container = subscriberMessages.get(key);
-                if (container != null) {
-                    container.clear();
-                }
-            }
-            ackContainer.clear();
-        }finally {
-            lock.unlock();
-        }
-        super.removeAllMessages(context);
-    }
-
-    protected void removeSubscriberMessageContainer(String clientId, String subscriptionName) throws IOException {
-        String subscriberKey = getSubscriptionKey(clientId, subscriptionName);
-        String containerName = getSubscriptionContainerName(subscriberKey);
-        subscriberContainer.remove(subscriberKey);
-        TopicSubContainer container = subscriberMessages.remove(subscriberKey);
-        if (container != null) {
-            for (Iterator i = container.iterator(); i.hasNext();) {
-                ConsumerMessageRef ref = (ConsumerMessageRef)i.next();
-                if (ref != null) {
-                    TopicSubAck tsa = ackContainer.get(ref.getAckEntry());
-                    if (tsa != null) {
-                        if (tsa.decrementCount() <= 0) {
-                            ackContainer.remove(ref.getAckEntry());
-                            messageContainer.remove(tsa.getMessageEntry());
-                        } else {
-                            ackContainer.update(ref.getAckEntry(), tsa);
-                        }
-                    }
-                }
-            }
-        }
-        store.deleteMapContainer(containerName,containerName);
-    }
-
-    protected String getSubscriptionKey(String clientId, String subscriberName) {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append(clientId).append(":");  
-        String name = subscriberName != null ? subscriberName : "NOT_SET";
-        return buffer.append(name).toString();
-    }
-    
-    private String getSubscriptionContainerName(String subscriptionKey) {
-        StringBuffer result = new StringBuffer(TOPIC_SUB_NAME);
-        result.append(destination.getQualifiedName());
-        result.append(subscriptionKey);
-        return result.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java
deleted file mode 100755
index 1c98592..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.TopicMessageStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Stores a messages/acknowledgements for a transaction
- * 
- * 
- */
-class KahaTransaction {
-    protected List<TxCommand> list = new ArrayList<TxCommand>();
-
-    void add(KahaMessageStore store, BaseCommand command) {
-        TxCommand tx = new TxCommand();
-        tx.setCommand(command);
-        tx.setMessageStoreKey(store.getId());
-        list.add(tx);
-    }
-
-    public void add(KahaMessageStore destination, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) {
-        TxCommand tx = new TxCommand();
-        tx.setCommand(ack);
-        tx.setMessageStoreKey(destination.getId());
-        tx.setClientId(clientId);
-        tx.setSubName(subscriptionName);
-        tx.setMessageId(messageId);
-        list.add(tx);
-    }
-
-    Message[] getMessages() {
-        List<BaseCommand> result = new ArrayList<BaseCommand>();
-        for (int i = 0; i < list.size(); i++) {
-            TxCommand command = list.get(i);
-            if (command.isAdd()) {
-                result.add(command.getCommand());
-            }
-        }
-        Message[] messages = new Message[result.size()];
-        return result.toArray(messages);
-    }
-
-    MessageAck[] getAcks() {
-        List<BaseCommand> result = new ArrayList<BaseCommand>();
-        for (int i = 0; i < list.size(); i++) {
-            TxCommand command = list.get(i);
-            if (command.isRemove()) {
-                result.add(command.getCommand());
-            }
-        }
-        MessageAck[] acks = new MessageAck[result.size()];
-        return result.toArray(acks);
-    }
-
-    void prepare() {
-    }
-
-    void rollback() {
-        list.clear();
-    }
-
-    /**
-     * @throws IOException
-     */
-    void commit(KahaTransactionStore transactionStore) throws IOException {
-        for (int i = 0; i < list.size(); i++) {
-            TxCommand command = list.get(i);
-            MessageStore ms = transactionStore.getStoreById(command.getMessageStoreKey());
-            if (command.isAdd()) {
-                ms.addMessage(null, (Message)command.getCommand());
-            }
-        }
-        for (int i = 0; i < list.size(); i++) {
-            TxCommand command = list.get(i);
-            MessageStore ms = transactionStore.getStoreById(command.getMessageStoreKey());
-            if (command.isRemove()) {
-                ms.removeMessage(null, (MessageAck)command.getCommand());
-            } else if (command.isAck()) {
-                ((TopicMessageStore)ms).acknowledge(null, command.getClientId(), command.getSubscriptionName(),
-                        command.getMessageId(), (MessageAck)command.getCommand());
-            }
-        }
-    }
-
-    List<TxCommand> getList() {
-        return new ArrayList<TxCommand>(list);
-    }
-
-    void setList(List<TxCommand> list) {
-        this.list = list;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java
deleted file mode 100755
index 2687a8a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.transaction.xa.XAException;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.kaha.RuntimeStoreException;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.ProxyMessageStore;
-import org.apache.activemq.store.ProxyTopicMessageStore;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionRecoveryListener;
-import org.apache.activemq.store.TransactionStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Provides a TransactionStore implementation that can create transaction aware
- * MessageStore objects from non transaction aware MessageStore objects.
- * 
- * 
- */
-public class KahaTransactionStore implements TransactionStore, BrokerServiceAware {	
-    private static final Logger LOG = LoggerFactory.getLogger(KahaTransactionStore.class);
-	
-    private final Map transactions = new ConcurrentHashMap();
-    private final Map prepared;
-    private final KahaPersistenceAdapter adaptor;
-    
-    private BrokerService brokerService;
-
-    KahaTransactionStore(KahaPersistenceAdapter adaptor, Map preparedMap) {
-        this.adaptor = adaptor;
-        this.prepared = preparedMap;
-    }
-
-    public MessageStore proxy(MessageStore messageStore) {
-        return new ProxyMessageStore(messageStore) {
-            @Override
-            public void addMessage(ConnectionContext context, final Message send) throws IOException {
-                KahaTransactionStore.this.addMessage(getDelegate(), send);
-            }
-
-            @Override
-            public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException {
-                KahaTransactionStore.this.removeMessage(getDelegate(), ack);
-            }
-        };
-    }
-
-    public TopicMessageStore proxy(TopicMessageStore messageStore) {
-        return new ProxyTopicMessageStore(messageStore) {
-            @Override
-            public void addMessage(ConnectionContext context, final Message send) throws IOException {
-                KahaTransactionStore.this.addMessage(getDelegate(), send);
-            }
-
-            @Override
-            public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException {
-                KahaTransactionStore.this.removeMessage(getDelegate(), ack);
-            }
-
-            @Override
-            public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                            MessageId messageId, MessageAck ack) throws IOException {
-                KahaTransactionStore.this.acknowledge((TopicMessageStore)getDelegate(), clientId, subscriptionName, messageId, ack);
-            }
-        };
-    }
-
-    /**
-     * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId)
-     */
-    public void prepare(TransactionId txid) {
-        KahaTransaction tx = getTx(txid);
-        if (tx != null) {
-            tx.prepare();
-            prepared.put(txid, tx);
-        }
-    }
-
-    public void commit(TransactionId txid, boolean wasPrepared, Runnable before,Runnable after) throws IOException {
-        if(before != null) {
-            before.run();
-        }
-        KahaTransaction tx = getTx(txid);
-        if (tx != null) {
-            tx.commit(this);
-            removeTx(txid);
-        }
-        if (after != null) {
-            after.run();
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId)
-     */
-    public void rollback(TransactionId txid) {
-        KahaTransaction tx = getTx(txid);
-        if (tx != null) {
-            tx.rollback();
-            removeTx(txid);
-        }
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
-        for (Iterator i = prepared.entrySet().iterator(); i.hasNext();) {
-            Map.Entry entry = (Entry)i.next();
-            XATransactionId xid = (XATransactionId)entry.getKey();
-            KahaTransaction kt = (KahaTransaction)entry.getValue();
-            listener.recover(xid, kt.getMessages(), kt.getAcks());
-        }
-    }
-
-    /**
-     * @param message
-     * @throws IOException
-     */
-    void addMessage(final MessageStore destination, final Message message) throws IOException {
-    	try {
-    		if (message.isInTransaction()) {
-    			KahaTransaction tx = getOrCreateTx(message.getTransactionId());
-    			tx.add((KahaMessageStore)destination, message);
-    		} else {
-    			destination.addMessage(null, message);
-    		}
-    	} catch (RuntimeStoreException rse) {
-            if (rse.getCause() instanceof IOException) {
-                brokerService.handleIOException((IOException)rse.getCause());
-            }
-            throw rse;
-    	}
-    }
-
-    /**
-     * @param ack
-     * @throws IOException
-     */
-    final void removeMessage(final MessageStore destination, final MessageAck ack) throws IOException {
-    	try {
-    		if (ack.isInTransaction()) {
-    			KahaTransaction tx = getOrCreateTx(ack.getTransactionId());
-    			tx.add((KahaMessageStore)destination, ack);
-    		} else {
-    			destination.removeMessage(null, ack);
-    		}
-    	} catch (RuntimeStoreException rse) {
-            if (rse.getCause() instanceof IOException) {
-                brokerService.handleIOException((IOException)rse.getCause());
-            }
-            throw rse;
-    	}
-    }
-
-    final void acknowledge(final TopicMessageStore destination, String clientId,
-                           String subscriptionName, MessageId messageId, MessageAck ack) throws IOException {
-        try {
-            if (ack.isInTransaction()) {
-                KahaTransaction tx = getOrCreateTx(ack.getTransactionId());
-                tx.add((KahaMessageStore)destination, clientId, subscriptionName, messageId, ack);
-            } else {
-                destination.acknowledge(null, clientId, subscriptionName, messageId, ack);
-            }
-        } catch (RuntimeStoreException rse) {
-            if (rse.getCause() instanceof IOException) {
-                brokerService.handleIOException((IOException)rse.getCause());
-            }
-            throw rse;
-        }
-    }
-
-    protected synchronized KahaTransaction getTx(TransactionId key) {
-        KahaTransaction result = (KahaTransaction)transactions.get(key);
-        if (result == null) {
-            result = (KahaTransaction)prepared.get(key);
-        }
-        return result;
-    }
-
-    protected synchronized KahaTransaction getOrCreateTx(TransactionId key) {
-        KahaTransaction result = (KahaTransaction)transactions.get(key);
-        if (result == null) {
-            result = new KahaTransaction();
-            transactions.put(key, result);
-        }
-        return result;
-    }
-
-    protected synchronized void removeTx(TransactionId key) {
-        transactions.remove(key);
-        prepared.remove(key);
-    }
-
-    public void delete() {
-        transactions.clear();
-        prepared.clear();
-    }
-
-    protected MessageStore getStoreById(Object id) {
-        return adaptor.retrieveMessageStore(id);
-    }
-
-	public void setBrokerService(BrokerService brokerService) {
-		this.brokerService = brokerService;
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecord.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecord.java
deleted file mode 100644
index cbe5e21..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecord.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import org.apache.activemq.store.ReferenceStore.ReferenceData;
-
-public class ReferenceRecord {
-
-    private String messageId;
-    private ReferenceData data;
-
-    public ReferenceRecord() {
-    }
-
-    public ReferenceRecord(String messageId, ReferenceData data) {
-        this.messageId = messageId;
-        this.data = data;
-    }
-
-    /**
-     * @return the data
-     */
-    public ReferenceData getData() {
-        return this.data;
-    }
-
-    /**
-     * @param data the data to set
-     */
-    public void setData(ReferenceData data) {
-        this.data = data;
-    }
-
-    /**
-     * @return the messageId
-     */
-    public String getMessageId() {
-        return this.messageId;
-    }
-
-    /**
-     * @param messageId the messageId to set
-     */
-    public void setMessageId(String messageId) {
-        this.messageId = messageId;
-    }
-
-    public String toString() {
-        return "ReferenceRecord(id=" + messageId + ",data=" + data + ")";
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecordMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecordMarshaller.java
deleted file mode 100644
index 9a2857b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecordMarshaller.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.store.ReferenceStore.ReferenceData;
-
-public class ReferenceRecordMarshaller implements Marshaller<ReferenceRecord> {
-
-    public ReferenceRecord readPayload(DataInput dataIn) throws IOException {
-        ReferenceRecord rr = new ReferenceRecord();
-        rr.setMessageId(dataIn.readUTF());
-        ReferenceData referenceData = new ReferenceData();
-        referenceData.setFileId(dataIn.readInt());
-        referenceData.setOffset(dataIn.readInt());
-        referenceData.setExpiration(dataIn.readLong());
-        rr.setData(referenceData);
-        return rr;
-    }
-
-    /**
-     * @param object
-     * @param dataOut
-     * @throws IOException
-     * @see org.apache.activemq.kaha.Marshaller#writePayload(java.lang.Object,
-     *      java.io.DataOutput)
-     */
-    public void writePayload(ReferenceRecord rr, DataOutput dataOut) throws IOException {
-        dataOut.writeUTF(rr.getMessageId());
-        dataOut.writeInt(rr.getData().getFileId());
-        dataOut.writeInt(rr.getData().getOffset());
-        dataOut.writeLong(rr.getData().getExpiration());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/StoreEntryMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/StoreEntryMarshaller.java
deleted file mode 100644
index 9dba320..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/StoreEntryMarshaller.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-
-/**
- * Marshall a TopicSubAck
- * 
- * 
- */
-public class StoreEntryMarshaller implements Marshaller {
-
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        IndexItem item = (IndexItem)object;
-        dataOut.writeLong(item.getOffset());
-        item.write(dataOut);
-
-    }
-
-    public Object readPayload(DataInput dataIn) throws IOException {
-        IndexItem item = new IndexItem();
-        item.setOffset(dataIn.readLong());
-        item.read(dataIn);
-        return item;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAck.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAck.java
deleted file mode 100644
index 4ec020a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAck.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import org.apache.activemq.kaha.StoreEntry;
-
-/**
- * Holds information for location of message
- * 
- * 
- */
-public class TopicSubAck {
-
-    private int count;
-    private StoreEntry messageEntry;
-
-    /**
-     * @return the count
-     */
-    public int getCount() {
-        return this.count;
-    }
-
-    /**
-     * @param count the count to set
-     */
-    public void setCount(int count) {
-        this.count = count;
-    }
-
-    /**
-     * @return the value of the count after it's decremented
-     */
-    public int decrementCount() {
-        return --count;
-    }
-
-    /**
-     * @return the value of the count after it's incremented
-     */
-    public int incrementCount() {
-        return ++count;
-    }
-
-    /**
-     * @return the messageEntry
-     */
-    public StoreEntry getMessageEntry() {
-        return this.messageEntry;
-    }
-
-    /**
-     * @param messageEntry the messageEntry to set
-     */
-    public void setMessageEntry(StoreEntry storeEntry) {
-        this.messageEntry = storeEntry;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAckMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAckMarshaller.java
deleted file mode 100644
index 38e0b9d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAckMarshaller.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-
-/**
- * Marshall a TopicSubAck
- * 
- * 
- */
-public class TopicSubAckMarshaller implements Marshaller {
-
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        TopicSubAck tsa = (TopicSubAck)object;
-        dataOut.writeInt(tsa.getCount());
-        IndexItem item = (IndexItem)tsa.getMessageEntry();
-        dataOut.writeLong(item.getOffset());
-        item.write(dataOut);
-
-    }
-
-    public Object readPayload(DataInput dataIn) throws IOException {
-        TopicSubAck tsa = new TopicSubAck();
-        int count = dataIn.readInt();
-        tsa.setCount(count);
-        IndexItem item = new IndexItem();
-        item.setOffset(dataIn.readLong());
-        item.read(dataIn);
-        tsa.setMessageEntry(item);
-        return tsa;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java
deleted file mode 100644
index 4c7d715..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.util.Iterator;
-
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.StoreEntry;
-
-/**
- * Holds information for the subscriber
- * 
- * 
- */
-public class TopicSubContainer {
-    private transient MapContainer mapContainer;
-    private transient StoreEntry batchEntry;
-
-    public TopicSubContainer(MapContainer container) {
-        this.mapContainer = container;
-    }
-
-    /**
-     * @return the batchEntry
-     */
-    public StoreEntry getBatchEntry() {
-        return this.batchEntry;
-    }
-
-    /**
-     * @param id
-     * @param batchEntry the batchEntry to set
-     */
-    public void setBatchEntry(String id, StoreEntry batchEntry) {
-        this.batchEntry = batchEntry;
-    }
-
-    public void reset() {
-        batchEntry = null;
-    }
-
-    public boolean isEmpty() {
-        return mapContainer.isEmpty();
-    }
-
-    public StoreEntry add(ConsumerMessageRef ref) {
-        return mapContainer.place(ref.getMessageId(),ref);
-    }
-
-    public ConsumerMessageRef remove(MessageId id) {
-        ConsumerMessageRef result = null;
-        StoreEntry entry = mapContainer.getEntry(id);
-        if (entry != null) {
-            result = (ConsumerMessageRef) mapContainer.getValue(entry);
-            mapContainer.remove(entry);
-            if (batchEntry != null && batchEntry.equals(entry)) {
-                reset();
-            }
-        }
-        if(mapContainer.isEmpty()) {
-            reset();
-        }
-        return result;
-    }
-    
-    
-    public ConsumerMessageRef get(StoreEntry entry) {
-        return (ConsumerMessageRef)mapContainer.getValue(entry);
-    }
-
-    public StoreEntry getEntry() {
-        return mapContainer.getFirst();
-    }
-
-    public StoreEntry refreshEntry(StoreEntry entry) {
-        return mapContainer.refresh(entry);
-    }
-
-    public StoreEntry getNextEntry(StoreEntry entry) {
-        return mapContainer.getNext(entry);
-    }
-
-    public Iterator iterator() {
-        return mapContainer.values().iterator();
-    }
-
-    public int size() {
-        return mapContainer.size();
-    }
-
-    public void clear() {
-        reset();
-        mapContainer.clear();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TransactionMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TransactionMarshaller.java
deleted file mode 100644
index d8df4ee..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TransactionMarshaller.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Marshall a Transaction
- * 
- * 
- */
-public class TransactionMarshaller implements Marshaller {
-
-    private WireFormat wireFormat;
-
-    public TransactionMarshaller(WireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-
-    }
-
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        KahaTransaction kt = (KahaTransaction)object;
-        List list = kt.getList();
-        dataOut.writeInt(list.size());
-        for (int i = 0; i < list.size(); i++) {
-            TxCommand tx = (TxCommand)list.get(i);
-            Object key = tx.getMessageStoreKey();
-            ByteSequence packet = wireFormat.marshal(key);
-            dataOut.writeInt(packet.length);
-            dataOut.write(packet.data, packet.offset, packet.length);
-            Object command = tx.getCommand();
-            packet = wireFormat.marshal(command);
-            dataOut.writeInt(packet.length);
-            dataOut.write(packet.data, packet.offset, packet.length);
-
-        }
-    }
-
-    public Object readPayload(DataInput dataIn) throws IOException {
-        KahaTransaction result = new KahaTransaction();
-        List list = new ArrayList();
-        result.setList(list);
-        int number = dataIn.readInt();
-        for (int i = 0; i < number; i++) {
-            TxCommand command = new TxCommand();
-            int size = dataIn.readInt();
-            byte[] data = new byte[size];
-            dataIn.readFully(data);
-            Object key = wireFormat.unmarshal(new ByteSequence(data));
-            command.setMessageStoreKey(key);
-            size = dataIn.readInt();
-            data = new byte[size];
-            dataIn.readFully(data);
-            BaseCommand bc = (BaseCommand)wireFormat.unmarshal(new ByteSequence(data));
-            command.setCommand(bc);
-            list.add(command);
-        }
-        return result;
-
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TxCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TxCommand.java
deleted file mode 100755
index db746d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TxCommand.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.store.kahadaptor;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.MessageId;
-
-/**
- * Base class for messages/acknowledgements for a transaction
- * 
- * 
- */
-class TxCommand {
-    protected Object messageStoreKey;
-    protected BaseCommand command;
-    private String clientId;
-    private String subscriptionName;
-    private MessageId messageId;
-
-    /**
-     * @return Returns the messageStoreKey.
-     */
-    public Object getMessageStoreKey() {
-        return messageStoreKey;
-    }
-
-    /**
-     * @param messageStoreKey The messageStoreKey to set.
-     */
-    public void setMessageStoreKey(Object messageStoreKey) {
-        this.messageStoreKey = messageStoreKey;
-    }
-
-    /**
-     * @return Returns the command.
-     */
-    public BaseCommand getCommand() {
-        return command;
-    }
-
-    /**
-     * @param command The command to set.
-     */
-    public void setCommand(BaseCommand command) {
-        this.command = command;
-    }
-
-    /**
-     * @return true if a Message command
-     */
-    public boolean isAdd() {
-        return command != null && command.getDataStructureType() != CommandTypes.MESSAGE_ACK;
-    }
-
-    /**
-     * @return true if a MessageAck command
-     */
-    public boolean isRemove() {
-        return command != null && command.getDataStructureType() == CommandTypes.MESSAGE_ACK && subscriptionName == null;
-    }
-
-    public boolean isAck() {
-        return command != null && command.getDataStructureType() == CommandTypes.MESSAGE_ACK && subscriptionName != null;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public void setSubName(String subscriptionName) {
-        this.subscriptionName = subscriptionName;
-    }
-
-    public void setMessageId(MessageId messageId) {
-        this.messageId = messageId;
-    }
-
-    public String getClientId() {
-        return clientId;
-    }
-
-    public String getSubscriptionName() {
-        return subscriptionName;
-    }
-
-    public MessageId getMessageId() {
-        return messageId;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/package.html
deleted file mode 100755
index de062e2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	kaha implementation of message persistence for the broker
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/JournalCommand.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/JournalCommand.java
deleted file mode 100644
index cc69310..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/JournalCommand.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.IOException;
-
-import org.apache.activemq.store.kahadb.data.KahaEntryType;
-
-public interface JournalCommand<T> extends org.apache.activemq.protobuf.Message<T> {
-
-    public void visit(Visitor visitor) throws IOException;
-
-    public KahaEntryType type();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
deleted file mode 100644
index 6db6509..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
+++ /dev/null
@@ -1,507 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Set;
-import org.apache.activeio.journal.Journal;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * An implementation of {@link PersistenceAdapter} designed for use with a
- * {@link Journal} and then check pointing asynchronously on a timeout with some
- * other long term persistent storage.
- * 
- * @org.apache.xbean.XBean element="kahaDB"
- * 
- */
-public class KahaDBPersistenceAdapter implements PersistenceAdapter, BrokerServiceAware {
-    private final KahaDBStore letter = new KahaDBStore();
-
-    /**
-     * @param context
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#beginTransaction(org.apache.activemq.broker.ConnectionContext)
-     */
-    public void beginTransaction(ConnectionContext context) throws IOException {
-        this.letter.beginTransaction(context);
-    }
-
-    /**
-     * @param sync
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#checkpoint(boolean)
-     */
-    public void checkpoint(boolean sync) throws IOException {
-        this.letter.checkpoint(sync);
-    }
-
-    /**
-     * @param context
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#commitTransaction(org.apache.activemq.broker.ConnectionContext)
-     */
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        this.letter.commitTransaction(context);
-    }
-
-    /**
-     * @param destination
-     * @return MessageStore
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)
-     */
-    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        return this.letter.createQueueMessageStore(destination);
-    }
-
-    /**
-     * @param destination
-     * @return TopicMessageStore
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)
-     */
-    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
-        return this.letter.createTopicMessageStore(destination);
-    }
-
-    /**
-     * @return TrandactionStore
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#createTransactionStore()
-     */
-    public TransactionStore createTransactionStore() throws IOException {
-        return this.letter.createTransactionStore();
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#deleteAllMessages()
-     */
-    public void deleteAllMessages() throws IOException {
-        this.letter.deleteAllMessages();
-    }
-
-    /**
-     * @return destinations
-     * @see org.apache.activemq.store.PersistenceAdapter#getDestinations()
-     */
-    public Set<ActiveMQDestination> getDestinations() {
-        return this.letter.getDestinations();
-    }
-
-    /**
-     * @return lastMessageBrokerSequenceId
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#getLastMessageBrokerSequenceId()
-     */
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return this.letter.getLastMessageBrokerSequenceId();
-    }
-
-    public long getLastProducerSequenceId(ProducerId id) throws IOException {
-        return this.letter.getLastProducerSequenceId(id);
-    }
-
-    /**
-     * @param destination
-     * @see org.apache.activemq.store.PersistenceAdapter#removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-        this.letter.removeQueueMessageStore(destination);
-    }
-
-    /**
-     * @param destination
-     * @see org.apache.activemq.store.PersistenceAdapter#removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-        this.letter.removeTopicMessageStore(destination);
-    }
-
-    /**
-     * @param context
-     * @throws IOException
-     * @see org.apache.activemq.store.PersistenceAdapter#rollbackTransaction(org.apache.activemq.broker.ConnectionContext)
-     */
-    public void rollbackTransaction(ConnectionContext context) throws IOException {
-        this.letter.rollbackTransaction(context);
-    }
-
-    /**
-     * @param brokerName
-     * @see org.apache.activemq.store.PersistenceAdapter#setBrokerName(java.lang.String)
-     */
-    public void setBrokerName(String brokerName) {
-        this.letter.setBrokerName(brokerName);
-    }
-
-    /**
-     * @param usageManager
-     * @see org.apache.activemq.store.PersistenceAdapter#setUsageManager(org.apache.activemq.usage.SystemUsage)
-     */
-    public void setUsageManager(SystemUsage usageManager) {
-        this.letter.setUsageManager(usageManager);
-    }
-
-    /**
-     * @return the size of the store
-     * @see org.apache.activemq.store.PersistenceAdapter#size()
-     */
-    public long size() {
-        return this.letter.size();
-    }
-
-    /**
-     * @throws Exception
-     * @see org.apache.activemq.Service#start()
-     */
-    public void start() throws Exception {
-        this.letter.start();
-    }
-
-    /**
-     * @throws Exception
-     * @see org.apache.activemq.Service#stop()
-     */
-    public void stop() throws Exception {
-        this.letter.stop();
-    }
-
-    /**
-     * Get the journalMaxFileLength
-     * 
-     * @return the journalMaxFileLength
-     */
-    public int getJournalMaxFileLength() {
-        return this.letter.getJournalMaxFileLength();
-    }
-
-    /**
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can
-     * be used
-     * 
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
-     */
-    public void setJournalMaxFileLength(int journalMaxFileLength) {
-        this.letter.setJournalMaxFileLength(journalMaxFileLength);
-    }
-
-    /**
-     * Set the max number of producers (LRU cache) to track for duplicate sends
-     */
-    public void setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack) {
-        this.letter.setMaxFailoverProducersToTrack(maxFailoverProducersToTrack);
-    }
-    
-    public int getMaxFailoverProducersToTrack() {
-        return this.letter.getMaxFailoverProducersToTrack();
-    }
-
-    /**
-     * set the audit window depth for duplicate suppression (should exceed the max transaction
-     * batch)
-     */
-    public void setFailoverProducersAuditDepth(int failoverProducersAuditDepth) {
-        this.letter.setFailoverProducersAuditDepth(failoverProducersAuditDepth);
-    }
-    
-    public int getFailoverProducersAuditDepth() {
-        return this.getFailoverProducersAuditDepth();
-    }
-    
-    /**
-     * Get the checkpointInterval
-     * 
-     * @return the checkpointInterval
-     */
-    public long getCheckpointInterval() {
-        return this.letter.getCheckpointInterval();
-    }
-
-    /**
-     * Set the checkpointInterval
-     * 
-     * @param checkpointInterval
-     *            the checkpointInterval to set
-     */
-    public void setCheckpointInterval(long checkpointInterval) {
-        this.letter.setCheckpointInterval(checkpointInterval);
-    }
-
-    /**
-     * Get the cleanupInterval
-     * 
-     * @return the cleanupInterval
-     */
-    public long getCleanupInterval() {
-        return this.letter.getCleanupInterval();
-    }
-
-    /**
-     * Set the cleanupInterval
-     * 
-     * @param cleanupInterval
-     *            the cleanupInterval to set
-     */
-    public void setCleanupInterval(long cleanupInterval) {
-        this.letter.setCleanupInterval(cleanupInterval);
-    }
-
-    /**
-     * Get the indexWriteBatchSize
-     * 
-     * @return the indexWriteBatchSize
-     */
-    public int getIndexWriteBatchSize() {
-        return this.letter.getIndexWriteBatchSize();
-    }
-
-    /**
-     * Set the indexWriteBatchSize
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     * @param indexWriteBatchSize
-     *            the indexWriteBatchSize to set
-     */
-    public void setIndexWriteBatchSize(int indexWriteBatchSize) {
-        this.letter.setIndexWriteBatchSize(indexWriteBatchSize);
-    }
-
-    /**
-     * Get the journalMaxWriteBatchSize
-     * 
-     * @return the journalMaxWriteBatchSize
-     */
-    public int getJournalMaxWriteBatchSize() {
-        return this.letter.getJournalMaxWriteBatchSize();
-    }
-
-    /**
-     * Set the journalMaxWriteBatchSize
-     *  * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     * @param journalMaxWriteBatchSize
-     *            the journalMaxWriteBatchSize to set
-     */
-    public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize) {
-        this.letter.setJournalMaxWriteBatchSize(journalMaxWriteBatchSize);
-    }
-
-    /**
-     * Get the enableIndexWriteAsync
-     * 
-     * @return the enableIndexWriteAsync
-     */
-    public boolean isEnableIndexWriteAsync() {
-        return this.letter.isEnableIndexWriteAsync();
-    }
-
-    /**
-     * Set the enableIndexWriteAsync
-     * 
-     * @param enableIndexWriteAsync
-     *            the enableIndexWriteAsync to set
-     */
-    public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync) {
-        this.letter.setEnableIndexWriteAsync(enableIndexWriteAsync);
-    }
-
-    /**
-     * Get the directory
-     * 
-     * @return the directory
-     */
-    public File getDirectory() {
-        return this.letter.getDirectory();
-    }
-
-    /**
-     * @param dir
-     * @see org.apache.activemq.store.PersistenceAdapter#setDirectory(java.io.File)
-     */
-    public void setDirectory(File dir) {
-        this.letter.setDirectory(dir);
-    }
-
-    /**
-     * Get the enableJournalDiskSyncs
-     * 
-     * @return the enableJournalDiskSyncs
-     */
-    public boolean isEnableJournalDiskSyncs() {
-        return this.letter.isEnableJournalDiskSyncs();
-    }
-
-    /**
-     * Set the enableJournalDiskSyncs
-     * 
-     * @param enableJournalDiskSyncs
-     *            the enableJournalDiskSyncs to set
-     */
-    public void setEnableJournalDiskSyncs(boolean enableJournalDiskSyncs) {
-        this.letter.setEnableJournalDiskSyncs(enableJournalDiskSyncs);
-    }
-
-    /**
-     * Get the indexCacheSize
-     * 
-     * @return the indexCacheSize
-     */
-    public int getIndexCacheSize() {
-        return this.letter.getIndexCacheSize();
-    }
-
-    /**
-     * Set the indexCacheSize
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     * @param indexCacheSize
-     *            the indexCacheSize to set
-     */
-    public void setIndexCacheSize(int indexCacheSize) {
-        this.letter.setIndexCacheSize(indexCacheSize);
-    }
-
-    /**
-     * Get the ignoreMissingJournalfiles
-     * 
-     * @return the ignoreMissingJournalfiles
-     */
-    public boolean isIgnoreMissingJournalfiles() {
-        return this.letter.isIgnoreMissingJournalfiles();
-    }
-
-    /**
-     * Set the ignoreMissingJournalfiles
-     * 
-     * @param ignoreMissingJournalfiles
-     *            the ignoreMissingJournalfiles to set
-     */
-    public void setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles) {
-        this.letter.setIgnoreMissingJournalfiles(ignoreMissingJournalfiles);
-    }
-
-    public boolean isChecksumJournalFiles() {
-        return letter.isChecksumJournalFiles();
-    }
-
-    public boolean isCheckForCorruptJournalFiles() {
-        return letter.isCheckForCorruptJournalFiles();
-    }
-
-    public void setChecksumJournalFiles(boolean checksumJournalFiles) {
-        letter.setChecksumJournalFiles(checksumJournalFiles);
-    }
-
-    public void setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles) {
-        letter.setCheckForCorruptJournalFiles(checkForCorruptJournalFiles);
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        letter.setBrokerService(brokerService);
-    }
-
-    public boolean isArchiveDataLogs() {
-        return letter.isArchiveDataLogs();
-    }
-
-    public void setArchiveDataLogs(boolean archiveDataLogs) {
-        letter.setArchiveDataLogs(archiveDataLogs);
-    }
-
-    public File getDirectoryArchive() {
-        return letter.getDirectoryArchive();
-    }
-
-    public void setDirectoryArchive(File directoryArchive) {
-        letter.setDirectoryArchive(directoryArchive);
-    }
-
-    public boolean isConcurrentStoreAndDispatchQueues() {
-        return letter.isConcurrentStoreAndDispatchQueues();
-    }
-
-    public void setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch) {
-        letter.setConcurrentStoreAndDispatchQueues(concurrentStoreAndDispatch);
-    }
-
-    public boolean isConcurrentStoreAndDispatchTopics() {
-        return letter.isConcurrentStoreAndDispatchTopics();
-    }
-
-    public void setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch) {
-        letter.setConcurrentStoreAndDispatchTopics(concurrentStoreAndDispatch);
-    }
-
-    public int getMaxAsyncJobs() {
-        return letter.getMaxAsyncJobs();
-    }
-    /**
-     * @param maxAsyncJobs
-     *            the maxAsyncJobs to set
-     */
-    public void setMaxAsyncJobs(int maxAsyncJobs) {
-        letter.setMaxAsyncJobs(maxAsyncJobs);
-    }
-    
-    /**
-     * @return the databaseLockedWaitDelay
-     */
-    public int getDatabaseLockedWaitDelay() {
-        return letter.getDatabaseLockedWaitDelay();
-    }
-
-    /**
-     * @param databaseLockedWaitDelay the databaseLockedWaitDelay to set
-     */
-    public void setDatabaseLockedWaitDelay(int databaseLockedWaitDelay) {
-       letter.setDatabaseLockedWaitDelay(databaseLockedWaitDelay);
-    }
-
-    public boolean getForceRecoverIndex() {
-        return letter.getForceRecoverIndex();
-    }
-
-    public void setForceRecoverIndex(boolean forceRecoverIndex) {
-        letter.setForceRecoverIndex(forceRecoverIndex);
-    }
-
-    //  for testing
-    public KahaDBStore getStore() {
-        return letter;
-    }
-
-    @Override
-    public String toString() {
-        String path = getDirectory() != null ? getDirectory().getAbsolutePath() : "DIRECTORY_NOT_SET";
-        return "KahaDBPersistenceAdapter[" + path + "]";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
deleted file mode 100644
index ef2e0d9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
+++ /dev/null
@@ -1,1210 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.protobuf.Buffer;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.store.kahadb.data.KahaAddMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaDestination;
-import org.apache.activemq.store.kahadb.data.KahaLocalTransactionId;
-import org.apache.activemq.store.kahadb.data.KahaLocation;
-import org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand;
-import org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand;
-import org.apache.activemq.store.kahadb.data.KahaTransactionInfo;
-import org.apache.activemq.store.kahadb.data.KahaXATransactionId;
-import org.apache.activemq.store.kahadb.data.KahaDestination.DestinationType;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Transaction;
-
-public class KahaDBStore extends MessageDatabase implements PersistenceAdapter {
-    static final Logger LOG = LoggerFactory.getLogger(KahaDBStore.class);
-    private static final int MAX_ASYNC_JOBS = 10000;
-
-    public static final String PROPERTY_CANCELED_TASK_MOD_METRIC = "org.apache.activemq.store.kahadb.CANCELED_TASK_MOD_METRIC";
-    public static final int cancelledTaskModMetric = Integer.parseInt(System.getProperty(
-            PROPERTY_CANCELED_TASK_MOD_METRIC, "0"), 10);
-    public static final String PROPERTY_ASYNC_EXECUTOR_MAX_THREADS = "org.apache.activemq.store.kahadb.ASYNC_EXECUTOR_MAX_THREADS";
-    private static final int asyncExecutorMaxThreads = Integer.parseInt(System.getProperty(
-            PROPERTY_ASYNC_EXECUTOR_MAX_THREADS, "1"), 10);;
-
-    protected ExecutorService queueExecutor;
-    protected ExecutorService topicExecutor;
-    protected final List<Map<AsyncJobKey, StoreTask>> asyncQueueMaps = new LinkedList<Map<AsyncJobKey, StoreTask>>();
-    protected final List<Map<AsyncJobKey, StoreTask>> asyncTopicMaps = new LinkedList<Map<AsyncJobKey, StoreTask>>();
-    final WireFormat wireFormat = new OpenWireFormat();
-    private SystemUsage usageManager;
-    private LinkedBlockingQueue<Runnable> asyncQueueJobQueue;
-    private LinkedBlockingQueue<Runnable> asyncTopicJobQueue;
-    Semaphore globalQueueSemaphore;
-    Semaphore globalTopicSemaphore;
-    private boolean concurrentStoreAndDispatchQueues = true;
-    // when true, message order may be compromised when cache is exhausted if store is out
-    // or order w.r.t cache
-    private boolean concurrentStoreAndDispatchTopics = false;
-    private boolean concurrentStoreAndDispatchTransactions = false;
-    private int maxAsyncJobs = MAX_ASYNC_JOBS;
-    private final KahaDBTransactionStore transactionStore;
-
-    public KahaDBStore() {
-        this.transactionStore = new KahaDBTransactionStore(this);
-    }
-
-    public void setBrokerName(String brokerName) {
-    }
-
-    public void setUsageManager(SystemUsage usageManager) {
-        this.usageManager = usageManager;
-    }
-
-    public SystemUsage getUsageManager() {
-        return this.usageManager;
-    }
-
-    /**
-     * @return the concurrentStoreAndDispatch
-     */
-    public boolean isConcurrentStoreAndDispatchQueues() {
-        return this.concurrentStoreAndDispatchQueues;
-    }
-
-    /**
-     * @param concurrentStoreAndDispatch
-     *            the concurrentStoreAndDispatch to set
-     */
-    public void setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch) {
-        this.concurrentStoreAndDispatchQueues = concurrentStoreAndDispatch;
-    }
-
-    /**
-     * @return the concurrentStoreAndDispatch
-     */
-    public boolean isConcurrentStoreAndDispatchTopics() {
-        return this.concurrentStoreAndDispatchTopics;
-    }
-
-    /**
-     * @param concurrentStoreAndDispatch
-     *            the concurrentStoreAndDispatch to set
-     */
-    public void setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch) {
-        this.concurrentStoreAndDispatchTopics = concurrentStoreAndDispatch;
-    }
-
-    public boolean isConcurrentStoreAndDispatchTransactions() {
-        return this.concurrentStoreAndDispatchTransactions;
-    }
-    
-    /**
-     * @return the maxAsyncJobs
-     */
-    public int getMaxAsyncJobs() {
-        return this.maxAsyncJobs;
-    }
-    /**
-     * @param maxAsyncJobs
-     *            the maxAsyncJobs to set
-     */
-    public void setMaxAsyncJobs(int maxAsyncJobs) {
-        this.maxAsyncJobs = maxAsyncJobs;
-    }
-
-    @Override
-    public void doStart() throws Exception {
-        super.doStart();
-        this.globalQueueSemaphore = new Semaphore(getMaxAsyncJobs());
-        this.globalTopicSemaphore = new Semaphore(getMaxAsyncJobs());
-        this.asyncQueueJobQueue = new LinkedBlockingQueue<Runnable>(getMaxAsyncJobs());
-        this.asyncTopicJobQueue = new LinkedBlockingQueue<Runnable>(getMaxAsyncJobs());
-        this.queueExecutor = new ThreadPoolExecutor(1, asyncExecutorMaxThreads, 0L, TimeUnit.MILLISECONDS,
-                asyncQueueJobQueue, new ThreadFactory() {
-                    public Thread newThread(Runnable runnable) {
-                        Thread thread = new Thread(runnable, "ConcurrentQueueStoreAndDispatch");
-                        thread.setDaemon(true);
-                        return thread;
-                    }
-                });
-        this.topicExecutor = new ThreadPoolExecutor(1, asyncExecutorMaxThreads, 0L, TimeUnit.MILLISECONDS,
-                asyncTopicJobQueue, new ThreadFactory() {
-                    public Thread newThread(Runnable runnable) {
-                        Thread thread = new Thread(runnable, "ConcurrentTopicStoreAndDispatch");
-                        thread.setDaemon(true);
-                        return thread;
-                    }
-                });
-    }
-
-    @Override
-    public void doStop(ServiceStopper stopper) throws Exception {
-        // drain down async jobs
-        LOG.info("Stopping async queue tasks");
-        if (this.globalQueueSemaphore != null) {
-            this.globalQueueSemaphore.tryAcquire(this.maxAsyncJobs, 60, TimeUnit.SECONDS);
-        }
-        synchronized (this.asyncQueueMaps) {
-            for (Map<AsyncJobKey, StoreTask> m : asyncQueueMaps) {
-                synchronized (m) {
-                    for (StoreTask task : m.values()) {
-                        task.cancel();
-                    }
-                }
-            }
-            this.asyncQueueMaps.clear();
-        }
-        LOG.info("Stopping async topic tasks");
-        if (this.globalTopicSemaphore != null) {
-            this.globalTopicSemaphore.tryAcquire(this.maxAsyncJobs, 60, TimeUnit.SECONDS);
-        }
-        synchronized (this.asyncTopicMaps) {
-            for (Map<AsyncJobKey, StoreTask> m : asyncTopicMaps) {
-                synchronized (m) {
-                    for (StoreTask task : m.values()) {
-                        task.cancel();
-                    }
-                }
-            }
-            this.asyncTopicMaps.clear();
-        }
-        if (this.globalQueueSemaphore != null) {
-            this.globalQueueSemaphore.drainPermits();
-        }
-        if (this.globalTopicSemaphore != null) {
-            this.globalTopicSemaphore.drainPermits();
-        }
-        if (this.queueExecutor != null) {
-            this.queueExecutor.shutdownNow();
-        }
-        if (this.topicExecutor != null) {
-            this.topicExecutor.shutdownNow();
-        }
-        LOG.info("Stopped KahaDB");
-        super.doStop(stopper);
-    }
-
-    protected StoreQueueTask removeQueueTask(KahaDBMessageStore store, MessageId id) {
-        StoreQueueTask task = null;
-        synchronized (store.asyncTaskMap) {
-            task = (StoreQueueTask) store.asyncTaskMap.remove(new AsyncJobKey(id, store.getDestination()));
-        }
-        return task;
-    }
-
-    protected void addQueueTask(KahaDBMessageStore store, StoreQueueTask task) throws IOException {
-        synchronized (store.asyncTaskMap) {
-            store.asyncTaskMap.put(new AsyncJobKey(task.getMessage().getMessageId(), store.getDestination()), task);
-        }
-        this.queueExecutor.execute(task);
-    }
-
-    protected StoreTopicTask removeTopicTask(KahaDBTopicMessageStore store, MessageId id) {
-        StoreTopicTask task = null;
-        synchronized (store.asyncTaskMap) {
-            task = (StoreTopicTask) store.asyncTaskMap.remove(new AsyncJobKey(id, store.getDestination()));
-        }
-        return task;
-    }
-
-    protected void addTopicTask(KahaDBTopicMessageStore store, StoreTopicTask task) throws IOException {
-        synchronized (store.asyncTaskMap) {
-            store.asyncTaskMap.put(new AsyncJobKey(task.getMessage().getMessageId(), store.getDestination()), task);
-        }
-        this.topicExecutor.execute(task);
-    }
-
-    public TransactionStore createTransactionStore() throws IOException {
-        return this.transactionStore;
-    }
-
-    public boolean getForceRecoverIndex() {
-        return this.forceRecoverIndex;
-    }
-
-    public void setForceRecoverIndex(boolean forceRecoverIndex) {
-        this.forceRecoverIndex = forceRecoverIndex;
-    }
-
-    public class KahaDBMessageStore extends AbstractMessageStore {
-        protected final Map<AsyncJobKey, StoreTask> asyncTaskMap = new HashMap<AsyncJobKey, StoreTask>();
-        protected KahaDestination dest;
-        private final int maxAsyncJobs;
-        private final Semaphore localDestinationSemaphore;
-
-        double doneTasks, canceledTasks = 0;
-
-        public KahaDBMessageStore(ActiveMQDestination destination) {
-            super(destination);
-            this.dest = convert(destination);
-            this.maxAsyncJobs = getMaxAsyncJobs();
-            this.localDestinationSemaphore = new Semaphore(this.maxAsyncJobs);
-        }
-
-        @Override
-        public ActiveMQDestination getDestination() {
-            return destination;
-        }
-
-        @Override
-        public Future<Object> asyncAddQueueMessage(final ConnectionContext context, final Message message)
-                throws IOException {
-            if (isConcurrentStoreAndDispatchQueues()) {
-                StoreQueueTask result = new StoreQueueTask(this, context, message);
-                result.aquireLocks();
-                addQueueTask(this, result);
-                return result.getFuture();
-            } else {
-                return super.asyncAddQueueMessage(context, message);
-            }
-        }
-
-        @Override
-        public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-            if (isConcurrentStoreAndDispatchQueues()) {
-                AsyncJobKey key = new AsyncJobKey(ack.getLastMessageId(), getDestination());
-                StoreQueueTask task = null;
-                synchronized (asyncTaskMap) {
-                    task = (StoreQueueTask) asyncTaskMap.get(key);
-                }
-                if (task != null) {
-                    if (!task.cancel()) {
-                        try {
-
-                            task.future.get();
-                        } catch (InterruptedException e) {
-                            throw new InterruptedIOException(e.toString());
-                        } catch (Exception ignored) {
-                            LOG.debug("removeAsync: cannot cancel, waiting for add resulted in ex", ignored);
-                        }
-                        removeMessage(context, ack);
-                    } else {
-                        synchronized (asyncTaskMap) {
-                            asyncTaskMap.remove(key);
-                        }
-                    }
-                } else {
-                    removeMessage(context, ack);
-                }
-            } else {
-                removeMessage(context, ack);
-            }
-        }
-
-        public void addMessage(ConnectionContext context, Message message) throws IOException {
-            KahaAddMessageCommand command = new KahaAddMessageCommand();
-            command.setDestination(dest);
-            command.setMessageId(message.getMessageId().toString());
-            command.setTransactionInfo(createTransactionInfo(message.getTransactionId()));
-            command.setPriority(message.getPriority());
-            command.setPrioritySupported(isPrioritizedMessages());
-            org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(message);
-            command.setMessage(new Buffer(packet.getData(), packet.getOffset(), packet.getLength()));
-            store(command, isEnableJournalDiskSyncs() && message.isResponseRequired(), null, null);
-            
-        }
-
-        public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-            KahaRemoveMessageCommand command = new KahaRemoveMessageCommand();
-            command.setDestination(dest);
-            command.setMessageId(ack.getLastMessageId().toString());
-            command.setTransactionInfo(createTransactionInfo(ack.getTransactionId()));
-
-            org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(ack);
-            command.setAck(new Buffer(packet.getData(), packet.getOffset(), packet.getLength()));
-            store(command, isEnableJournalDiskSyncs() && ack.isResponseRequired(), null, null);
-        }
-
-        public void removeAllMessages(ConnectionContext context) throws IOException {
-            KahaRemoveDestinationCommand command = new KahaRemoveDestinationCommand();
-            command.setDestination(dest);
-            store(command, true, null, null);
-        }
-
-        public Message getMessage(MessageId identity) throws IOException {
-            final String key = identity.toString();
-
-            // Hopefully one day the page file supports concurrent read
-            // operations... but for now we must
-            // externally synchronize...
-            Location location;
-            indexLock.readLock().lock();
-            try {
-                location = pageFile.tx().execute(new Transaction.CallableClosure<Location, IOException>() {
-                    public Location execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        Long sequence = sd.messageIdIndex.get(tx, key);
-                        if (sequence == null) {
-                            return null;
-                        }
-                        return sd.orderIndex.get(tx, sequence).location;
-                    }
-                });
-            }finally {
-                indexLock.readLock().unlock();
-            }
-            if (location == null) {
-                return null;
-            }
-
-            return loadMessage(location);
-        }
-
-        public int getMessageCount() throws IOException {
-            try {
-                lockAsyncJobQueue();
-                indexLock.readLock().lock();
-                try {
-                    return pageFile.tx().execute(new Transaction.CallableClosure<Integer, IOException>() {
-                        public Integer execute(Transaction tx) throws IOException {
-                            // Iterate through all index entries to get a count
-                            // of
-                            // messages in the destination.
-                            StoredDestination sd = getStoredDestination(dest, tx);
-                            int rc = 0;
-                            for (Iterator<Entry<Location, Long>> iterator = sd.locationIndex.iterator(tx); iterator
-                                    .hasNext();) {
-                                iterator.next();
-                                rc++;
-                            }
-                            return rc;
-                        }
-                    });
-                }finally {
-                    indexLock.readLock().unlock();
-                }
-            } finally {
-                unlockAsyncJobQueue();
-            }
-        }
-
-        @Override
-        public boolean isEmpty() throws IOException {
-            indexLock.readLock().lock();
-            try {
-                return pageFile.tx().execute(new Transaction.CallableClosure<Boolean, IOException>() {
-                    public Boolean execute(Transaction tx) throws IOException {
-                        // Iterate through all index entries to get a count of
-                        // messages in the destination.
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        return sd.locationIndex.isEmpty(tx);
-                    }
-                });
-            }finally {
-                indexLock.readLock().unlock();
-            }
-        }
-
-        public void recover(final MessageRecoveryListener listener) throws Exception {
-            indexLock.readLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<Exception>() {
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        sd.orderIndex.resetCursorPosition();
-                        for (Iterator<Entry<Long, MessageKeys>> iterator = sd.orderIndex.iterator(tx); iterator
-                                .hasNext();) {
-                            Entry<Long, MessageKeys> entry = iterator.next();
-                            Message msg = loadMessage(entry.getValue().location);
-                            listener.recoverMessage(msg);
-                        }
-                    }
-                });
-            }finally {
-                indexLock.readLock().unlock();
-            }
-        }
-
-        
-        public void recoverNextMessages(final int maxReturned, final MessageRecoveryListener listener) throws Exception {
-            indexLock.readLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<Exception>() {
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        Entry<Long, MessageKeys> entry = null;
-                        int counter = 0;
-                        for (Iterator<Entry<Long, MessageKeys>> iterator = sd.orderIndex.iterator(tx);
-                             listener.hasSpace() && iterator.hasNext(); ) {
-                            entry = iterator.next();
-                            Message msg = loadMessage(entry.getValue().location);
-                            listener.recoverMessage(msg);
-                            counter++;
-                            if (counter >= maxReturned) {
-                                break;
-                            }
-                        }
-                        sd.orderIndex.stoppedIterating();
-                    }
-                });
-            }finally {
-                indexLock.readLock().unlock();
-            }
-        }
-
-        public void resetBatching() {
-            try {
-                pageFile.tx().execute(new Transaction.Closure<Exception>() {
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getExistingStoredDestination(dest, tx);
-                        if (sd != null) {
-                            sd.orderIndex.resetCursorPosition();}
-                        }
-                    });
-            } catch (Exception e) {
-                LOG.error("Failed to reset batching",e);
-            }
-        }
-
-        @Override
-        public void setBatch(MessageId identity) throws IOException {
-            try {
-                final String key = identity.toString();
-                lockAsyncJobQueue();
-
-                // Hopefully one day the page file supports concurrent read
-                // operations... but for now we must
-                // externally synchronize...
-               
-                indexLock.writeLock().lock();
-                try {
-                        pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                        public void execute(Transaction tx) throws IOException {
-                            StoredDestination sd = getStoredDestination(dest, tx);
-                            Long location = sd.messageIdIndex.get(tx, key);
-                            if (location != null) {
-                                sd.orderIndex.setBatch(tx, location);
-                            }
-                        }
-                    });
-                }finally {
-                    indexLock.writeLock().unlock();
-                }
-                
-            } finally {
-                unlockAsyncJobQueue();
-            }
-
-        }
-
-        @Override
-        public void setMemoryUsage(MemoryUsage memoeyUSage) {
-        }
-        @Override
-        public void start() throws Exception {
-            super.start();
-        }
-        @Override
-        public void stop() throws Exception {
-            super.stop();
-        }
-
-        protected void lockAsyncJobQueue() {
-            try {
-                this.localDestinationSemaphore.tryAcquire(this.maxAsyncJobs, 60, TimeUnit.SECONDS);
-            } catch (Exception e) {
-                LOG.error("Failed to lock async jobs for " + this.destination, e);
-            }
-        }
-
-        protected void unlockAsyncJobQueue() {
-            this.localDestinationSemaphore.release(this.maxAsyncJobs);
-        }
-
-        protected void acquireLocalAsyncLock() {
-            try {
-                this.localDestinationSemaphore.acquire();
-            } catch (InterruptedException e) {
-                LOG.error("Failed to aquire async lock for " + this.destination, e);
-            }
-        }
-
-        protected void releaseLocalAsyncLock() {
-            this.localDestinationSemaphore.release();
-        }
-
-    }
-
-    class KahaDBTopicMessageStore extends KahaDBMessageStore implements TopicMessageStore {
-        private final AtomicInteger subscriptionCount = new AtomicInteger();
-        public KahaDBTopicMessageStore(ActiveMQTopic destination) throws IOException {
-            super(destination);
-            this.subscriptionCount.set(getAllSubscriptions().length);
-            asyncTopicMaps.add(asyncTaskMap);
-        }
-
-        @Override
-        public Future<Object> asyncAddTopicMessage(final ConnectionContext context, final Message message)
-                throws IOException {
-            if (isConcurrentStoreAndDispatchTopics()) {
-                StoreTopicTask result = new StoreTopicTask(this, context, message, subscriptionCount.get());
-                result.aquireLocks();
-                addTopicTask(this, result);
-                return result.getFuture();
-            } else {
-                return super.asyncAddTopicMessage(context, message);
-            }
-        }
-
-        public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                                MessageId messageId, MessageAck ack)
-                throws IOException {
-            String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            if (isConcurrentStoreAndDispatchTopics()) {
-                AsyncJobKey key = new AsyncJobKey(messageId, getDestination());
-                StoreTopicTask task = null;
-                synchronized (asyncTaskMap) {
-                    task = (StoreTopicTask) asyncTaskMap.get(key);
-                }
-                if (task != null) {
-                    if (task.addSubscriptionKey(subscriptionKey)) {
-                        removeTopicTask(this, messageId);
-                        if (task.cancel()) {
-                            synchronized (asyncTaskMap) {
-                                asyncTaskMap.remove(key);
-                            }
-                        }
-                    }
-                } else {
-                    doAcknowledge(context, subscriptionKey, messageId, ack);
-                }
-            } else {
-                doAcknowledge(context, subscriptionKey, messageId, ack);
-            }
-        }
-
-        protected void doAcknowledge(ConnectionContext context, String subscriptionKey, MessageId messageId, MessageAck ack)
-                throws IOException {
-            KahaRemoveMessageCommand command = new KahaRemoveMessageCommand();
-            command.setDestination(dest);
-            command.setSubscriptionKey(subscriptionKey);
-            command.setMessageId(messageId.toString());
-            command.setTransactionInfo(createTransactionInfo(ack.getTransactionId()));
-            if (ack != null && ack.isUnmatchedAck()) {
-                command.setAck(UNMATCHED);
-            }
-            store(command, false, null, null);
-        }
-
-        public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException {
-            String subscriptionKey = subscriptionKey(subscriptionInfo.getClientId(), subscriptionInfo
-                    .getSubscriptionName());
-            KahaSubscriptionCommand command = new KahaSubscriptionCommand();
-            command.setDestination(dest);
-            command.setSubscriptionKey(subscriptionKey);
-            command.setRetroactive(retroactive);
-            org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(subscriptionInfo);
-            command.setSubscriptionInfo(new Buffer(packet.getData(), packet.getOffset(), packet.getLength()));
-            store(command, isEnableJournalDiskSyncs() && true, null, null);
-            this.subscriptionCount.incrementAndGet();
-        }
-
-        public void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-            KahaSubscriptionCommand command = new KahaSubscriptionCommand();
-            command.setDestination(dest);
-            command.setSubscriptionKey(subscriptionKey(clientId, subscriptionName));
-            store(command, isEnableJournalDiskSyncs() && true, null, null);
-            this.subscriptionCount.decrementAndGet();
-        }
-
-        public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-
-            final ArrayList<SubscriptionInfo> subscriptions = new ArrayList<SubscriptionInfo>();
-            indexLock.readLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        for (Iterator<Entry<String, KahaSubscriptionCommand>> iterator = sd.subscriptions.iterator(tx); iterator
-                                .hasNext();) {
-                            Entry<String, KahaSubscriptionCommand> entry = iterator.next();
-                            SubscriptionInfo info = (SubscriptionInfo) wireFormat.unmarshal(new DataInputStream(entry
-                                    .getValue().getSubscriptionInfo().newInput()));
-                            subscriptions.add(info);
-
-                        }
-                    }
-                });
-            }finally {
-                indexLock.readLock().unlock();
-            }
-
-            SubscriptionInfo[] rc = new SubscriptionInfo[subscriptions.size()];
-            subscriptions.toArray(rc);
-            return rc;
-        }
-
-        public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            indexLock.readLock().lock();
-            try {
-                return pageFile.tx().execute(new Transaction.CallableClosure<SubscriptionInfo, IOException>() {
-                    public SubscriptionInfo execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        KahaSubscriptionCommand command = sd.subscriptions.get(tx, subscriptionKey);
-                        if (command == null) {
-                            return null;
-                        }
-                        return (SubscriptionInfo) wireFormat.unmarshal(new DataInputStream(command
-                                .getSubscriptionInfo().newInput()));
-                    }
-                });
-            }finally {
-                indexLock.readLock().unlock();
-            }
-        }
-
-        public int getMessageCount(String clientId, String subscriptionName) throws IOException {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            indexLock.writeLock().lock();
-            try {
-                return pageFile.tx().execute(new Transaction.CallableClosure<Integer, IOException>() {
-                    public Integer execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        LastAck cursorPos = sd.subscriptionAcks.get(tx, subscriptionKey);
-                        if (cursorPos == null) {
-                            // The subscription might not exist.
-                            return 0;
-                        }
-
-                        int counter = 0;
-                        for (Iterator<Entry<Long, HashSet<String>>> iterator =
-                                sd.ackPositions.iterator(tx, cursorPos.lastAckedSequence); iterator.hasNext();) {
-                            Entry<Long, HashSet<String>> entry = iterator.next();
-                            if (entry.getValue().contains(subscriptionKey)) {
-                                counter++;
-                            }
-                        }
-                        return counter;
-                    }
-                });
-            }finally {
-                indexLock.writeLock().unlock();
-            }
-        }
-
-        public void recoverSubscription(String clientId, String subscriptionName, final MessageRecoveryListener listener)
-                throws Exception {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            final SubscriptionInfo info = lookupSubscription(clientId, subscriptionName);
-            indexLock.writeLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<Exception>() {
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        LastAck cursorPos = sd.subscriptionAcks.get(tx, subscriptionKey);
-                        sd.orderIndex.setBatch(tx, cursorPos);
-                        for (Iterator<Entry<Long, MessageKeys>> iterator = sd.orderIndex.iterator(tx); iterator
-                                .hasNext();) {
-                            Entry<Long, MessageKeys> entry = iterator.next();
-                            listener.recoverMessage(loadMessage(entry.getValue().location));
-                        }
-                        sd.orderIndex.resetCursorPosition();
-                    }
-                });
-            }finally {
-                indexLock.writeLock().unlock();
-            }
-        }
-
-        public void recoverNextMessages(String clientId, String subscriptionName, final int maxReturned,
-                final MessageRecoveryListener listener) throws Exception {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            final SubscriptionInfo info = lookupSubscription(clientId, subscriptionName);
-            indexLock.writeLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<Exception>() {
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        sd.orderIndex.resetCursorPosition();
-                        MessageOrderCursor moc = sd.subscriptionCursors.get(subscriptionKey);
-                        if (moc == null) {
-                            LastAck pos = sd.subscriptionAcks.get(tx, subscriptionKey);
-                            if (pos == null) {
-                                // sub deleted
-                                return;
-                            }
-                            sd.orderIndex.setBatch(tx, pos);
-                            moc = sd.orderIndex.cursor;
-                        } else {
-                            sd.orderIndex.cursor.sync(moc);
-                        }
-
-                        Entry<Long, MessageKeys> entry = null;
-                        int counter = 0;
-                        for (Iterator<Entry<Long, MessageKeys>> iterator = sd.orderIndex.iterator(tx, moc); iterator
-                                .hasNext();) {
-                            entry = iterator.next();
-                            if (listener.recoverMessage(loadMessage(entry.getValue().location))) {
-                                counter++;
-                            }
-                            if (counter >= maxReturned || listener.hasSpace() == false) {
-                                break;
-                            }
-                        }
-                        sd.orderIndex.stoppedIterating();
-                        if (entry != null) {
-                            MessageOrderCursor copy = sd.orderIndex.cursor.copy();
-                            sd.subscriptionCursors.put(subscriptionKey, copy);
-                        }
-                    }
-                });
-            }finally {
-                indexLock.writeLock().unlock();
-            }
-        }
-
-        public void resetBatching(String clientId, String subscriptionName) {
-            try {
-                final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-                indexLock.writeLock().lock();
-                try {
-                    pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                        public void execute(Transaction tx) throws IOException {
-                            StoredDestination sd = getStoredDestination(dest, tx);
-                            sd.subscriptionCursors.remove(subscriptionKey);
-                        }
-                    });
-                }finally {
-                    indexLock.writeLock().unlock();
-                }
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
-    String subscriptionKey(String clientId, String subscriptionName) {
-        return clientId + ":" + subscriptionName;
-    }
-
-    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        return this.transactionStore.proxy(new KahaDBMessageStore(destination));
-    }
-
-    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
-        return this.transactionStore.proxy(new KahaDBTopicMessageStore(destination));
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination.
-     * This method does not stop the message store (it might not be cached).
-     * 
-     * @param destination
-     *            Destination to forget
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     * This method does not stop the message store (it might not be cached).
-     * 
-     * @param destination
-     *            Destination to forget
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-    }
-
-    public void deleteAllMessages() throws IOException {
-        deleteAllMessages = true;
-    }
-
-    public Set<ActiveMQDestination> getDestinations() {
-        try {
-            final HashSet<ActiveMQDestination> rc = new HashSet<ActiveMQDestination>();
-            indexLock.readLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        for (Iterator<Entry<String, StoredDestination>> iterator = metadata.destinations.iterator(tx); iterator
-                                .hasNext();) {
-                            Entry<String, StoredDestination> entry = iterator.next();
-                            if (!isEmptyTopic(entry, tx)) {
-                                rc.add(convert(entry.getKey()));
-                            }
-                        }
-                    }
-
-                    private boolean isEmptyTopic(Entry<String, StoredDestination> entry, Transaction tx)
-                            throws IOException {
-                        boolean isEmptyTopic = false;
-                        ActiveMQDestination dest = convert(entry.getKey());
-                        if (dest.isTopic()) {
-                            StoredDestination loadedStore = getStoredDestination(convert(dest), tx);
-                            if (loadedStore.subscriptionAcks.isEmpty(tx)) {
-                                isEmptyTopic = true;
-                            }
-                        }
-                        return isEmptyTopic;
-                    }
-                });
-            }finally {
-                indexLock.readLock().unlock();
-            }
-            return rc;
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return 0;
-    }
-    
-    public long getLastProducerSequenceId(ProducerId id) {
-        indexLock.readLock().lock();
-        try {
-            return metadata.producerSequenceIdTracker.getLastSeqId(id);
-        } finally {
-            indexLock.readLock().unlock();
-        }
-    }
-
-    public long size() {
-        return storeSize.get();
-    }
-
-    public void beginTransaction(ConnectionContext context) throws IOException {
-        throw new IOException("Not yet implemented.");
-    }
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        throw new IOException("Not yet implemented.");
-    }
-    public void rollbackTransaction(ConnectionContext context) throws IOException {
-        throw new IOException("Not yet implemented.");
-    }
-
-    public void checkpoint(boolean sync) throws IOException {
-        super.checkpointCleanup(false);
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Internal helper methods.
-    // /////////////////////////////////////////////////////////////////
-
-    /**
-     * @param location
-     * @return
-     * @throws IOException
-     */
-    Message loadMessage(Location location) throws IOException {
-        KahaAddMessageCommand addMessage = (KahaAddMessageCommand) load(location);
-        Message msg = (Message) wireFormat.unmarshal(new DataInputStream(addMessage.getMessage().newInput()));
-        return msg;
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Internal conversion methods.
-    // /////////////////////////////////////////////////////////////////
-
-    KahaLocation convert(Location location) {
-        KahaLocation rc = new KahaLocation();
-        rc.setLogId(location.getDataFileId());
-        rc.setOffset(location.getOffset());
-        return rc;
-    }
-
-    KahaDestination convert(ActiveMQDestination dest) {
-        KahaDestination rc = new KahaDestination();
-        rc.setName(dest.getPhysicalName());
-        switch (dest.getDestinationType()) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            rc.setType(DestinationType.QUEUE);
-            return rc;
-        case ActiveMQDestination.TOPIC_TYPE:
-            rc.setType(DestinationType.TOPIC);
-            return rc;
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            rc.setType(DestinationType.TEMP_QUEUE);
-            return rc;
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            rc.setType(DestinationType.TEMP_TOPIC);
-            return rc;
-        default:
-            return null;
-        }
-    }
-
-    ActiveMQDestination convert(String dest) {
-        int p = dest.indexOf(":");
-        if (p < 0) {
-            throw new IllegalArgumentException("Not in the valid destination format");
-        }
-        int type = Integer.parseInt(dest.substring(0, p));
-        String name = dest.substring(p + 1);
-
-        switch (KahaDestination.DestinationType.valueOf(type)) {
-        case QUEUE:
-            return new ActiveMQQueue(name);
-        case TOPIC:
-            return new ActiveMQTopic(name);
-        case TEMP_QUEUE:
-            return new ActiveMQTempQueue(name);
-        case TEMP_TOPIC:
-            return new ActiveMQTempTopic(name);
-        default:
-            throw new IllegalArgumentException("Not in the valid destination format");
-        }
-    }
-
-    static class AsyncJobKey {
-        MessageId id;
-        ActiveMQDestination destination;
-
-        AsyncJobKey(MessageId id, ActiveMQDestination destination) {
-            this.id = id;
-            this.destination = destination;
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj == this) {
-                return true;
-            }
-            return obj instanceof AsyncJobKey && id.equals(((AsyncJobKey) obj).id)
-                    && destination.equals(((AsyncJobKey) obj).destination);
-        }
-
-        @Override
-        public int hashCode() {
-            return id.hashCode() + destination.hashCode();
-        }
-
-        @Override
-        public String toString() {
-            return destination.getPhysicalName() + "-" + id;
-        }
-    }
-
-    interface StoreTask {
-        public boolean cancel();
-    }
-
-    class StoreQueueTask implements Runnable, StoreTask {
-        protected final Message message;
-        protected final ConnectionContext context;
-        protected final KahaDBMessageStore store;
-        protected final InnerFutureTask future;
-        protected final AtomicBoolean done = new AtomicBoolean();
-        protected final AtomicBoolean locked = new AtomicBoolean();
-
-        public StoreQueueTask(KahaDBMessageStore store, ConnectionContext context, Message message) {
-            this.store = store;
-            this.context = context;
-            this.message = message;
-            this.future = new InnerFutureTask(this);
-        }
-
-        public Future<Object> getFuture() {
-            return this.future;
-        }
-
-        public boolean cancel() {
-            releaseLocks();
-            if (this.done.compareAndSet(false, true)) {
-                return this.future.cancel(false);
-            }
-            return false;
-        }
-
-        void aquireLocks() {
-            if (this.locked.compareAndSet(false, true)) {
-                try {
-                    globalQueueSemaphore.acquire();
-                    store.acquireLocalAsyncLock();
-                    message.incrementReferenceCount();
-                } catch (InterruptedException e) {
-                    LOG.warn("Failed to aquire lock", e);
-                }
-            }
-
-        }
-
-        void releaseLocks() {
-            if (this.locked.compareAndSet(true, false)) {
-                store.releaseLocalAsyncLock();
-                globalQueueSemaphore.release();
-                message.decrementReferenceCount();
-            }
-        }
-
-        public void run() {
-            this.store.doneTasks++;
-            try {
-                if (this.done.compareAndSet(false, true)) {
-                    this.store.addMessage(context, message);
-                    removeQueueTask(this.store, this.message.getMessageId());
-                    this.future.complete();
-                } else if (cancelledTaskModMetric > 0 && this.store.canceledTasks++ % cancelledTaskModMetric == 0) {
-                    System.err.println(this.store.dest.getName() + " cancelled: "
-                            + (this.store.canceledTasks / this.store.doneTasks) * 100);
-                    this.store.canceledTasks = this.store.doneTasks = 0;
-                }
-            } catch (Exception e) {
-                this.future.setException(e);
-            } finally {
-                releaseLocks();
-            }
-        }
-
-        protected Message getMessage() {
-            return this.message;
-        }
-
-        private class InnerFutureTask extends FutureTask<Object> {
-
-            public InnerFutureTask(Runnable runnable) {
-                super(runnable, null);
-
-            }
-
-            public void setException(final Exception e) {
-                super.setException(e);
-            }
-
-            public void complete() {
-                super.set(null);
-            }
-        }
-    }
-
-    class StoreTopicTask extends StoreQueueTask {
-        private final int subscriptionCount;
-        private final List<String> subscriptionKeys = new ArrayList<String>(1);
-        private final KahaDBTopicMessageStore topicStore;
-        public StoreTopicTask(KahaDBTopicMessageStore store, ConnectionContext context, Message message,
-                int subscriptionCount) {
-            super(store, context, message);
-            this.topicStore = store;
-            this.subscriptionCount = subscriptionCount;
-
-        }
-
-        @Override
-        void aquireLocks() {
-            if (this.locked.compareAndSet(false, true)) {
-                try {
-                    globalTopicSemaphore.acquire();
-                    store.acquireLocalAsyncLock();
-                    message.incrementReferenceCount();
-                } catch (InterruptedException e) {
-                    LOG.warn("Failed to aquire lock", e);
-                }
-            }
-
-        }
-
-        @Override
-        void releaseLocks() {
-            if (this.locked.compareAndSet(true, false)) {
-                message.decrementReferenceCount();
-                store.releaseLocalAsyncLock();
-                globalTopicSemaphore.release();
-            }
-        }
-
-        /**
-         * add a key
-         * 
-         * @param key
-         * @return true if all acknowledgements received
-         */
-        public boolean addSubscriptionKey(String key) {
-            synchronized (this.subscriptionKeys) {
-                this.subscriptionKeys.add(key);
-            }
-            return this.subscriptionKeys.size() >= this.subscriptionCount;
-        }
-
-        @Override
-        public void run() {
-            this.store.doneTasks++;
-            try {
-                if (this.done.compareAndSet(false, true)) {
-                    this.topicStore.addMessage(context, message);
-                    // apply any acks we have
-                    synchronized (this.subscriptionKeys) {
-                        for (String key : this.subscriptionKeys) {
-                            this.topicStore.doAcknowledge(context, key, this.message.getMessageId(), null);
-
-                        }
-                    }
-                    removeTopicTask(this.topicStore, this.message.getMessageId());
-                    this.future.complete();
-                } else if (cancelledTaskModMetric > 0 && this.store.canceledTasks++ % cancelledTaskModMetric == 0) {
-                    System.err.println(this.store.dest.getName() + " cancelled: "
-                            + (this.store.canceledTasks / this.store.doneTasks) * 100);
-                    this.store.canceledTasks = this.store.doneTasks = 0;
-                }
-            } catch (Exception e) {
-                this.future.setException(e);
-            } finally {
-                releaseLocks();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBTransactionStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBTransactionStore.java
deleted file mode 100755
index 1b0cdfa..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBTransactionStore.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import javax.transaction.xa.XAException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.protobuf.Buffer;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.ProxyMessageStore;
-import org.apache.activemq.store.ProxyTopicMessageStore;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionRecoveryListener;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.store.kahadb.MessageDatabase.AddOpperation;
-import org.apache.activemq.store.kahadb.MessageDatabase.Operation;
-import org.apache.activemq.store.kahadb.MessageDatabase.RemoveOpperation;
-import org.apache.activemq.store.kahadb.data.KahaCommitCommand;
-import org.apache.activemq.store.kahadb.data.KahaPrepareCommand;
-import org.apache.activemq.store.kahadb.data.KahaRollbackCommand;
-import org.apache.activemq.store.kahadb.data.KahaTransactionInfo;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Provides a TransactionStore implementation that can create transaction aware
- * MessageStore objects from non transaction aware MessageStore objects.
- * 
- * 
- */
-public class KahaDBTransactionStore implements TransactionStore {
-    static final Logger LOG = LoggerFactory.getLogger(KahaDBTransactionStore.class);
-    ConcurrentHashMap<Object, Tx> inflightTransactions = new ConcurrentHashMap<Object, Tx>();
-    private final WireFormat wireFormat = new OpenWireFormat();
-    private final KahaDBStore theStore;
-
-    public KahaDBTransactionStore(KahaDBStore theStore) {
-        this.theStore = theStore;
-    }
-
-    public class Tx {
-        private final ArrayList<AddMessageCommand> messages = new ArrayList<AddMessageCommand>();
-
-        private final ArrayList<RemoveMessageCommand> acks = new ArrayList<RemoveMessageCommand>();
-
-        public void add(AddMessageCommand msg) {
-            messages.add(msg);
-        }
-
-        public void add(RemoveMessageCommand ack) {
-            acks.add(ack);
-        }
-
-        public Message[] getMessages() {
-            Message rc[] = new Message[messages.size()];
-            int count = 0;
-            for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) {
-                AddMessageCommand cmd = iter.next();
-                rc[count++] = cmd.getMessage();
-            }
-            return rc;
-        }
-
-        public MessageAck[] getAcks() {
-            MessageAck rc[] = new MessageAck[acks.size()];
-            int count = 0;
-            for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) {
-                RemoveMessageCommand cmd = iter.next();
-                rc[count++] = cmd.getMessageAck();
-            }
-            return rc;
-        }
-
-        /**
-         * @return true if something to commit
-         * @throws IOException
-         */
-        public List<Future<Object>> commit() throws IOException {
-            List<Future<Object>> results = new ArrayList<Future<Object>>();
-            // Do all the message adds.
-            for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) {
-                AddMessageCommand cmd = iter.next();
-                results.add(cmd.run());
-
-            }
-            // And removes..
-            for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) {
-                RemoveMessageCommand cmd = iter.next();
-                cmd.run();
-                results.add(cmd.run());
-            }
-            
-            return results;
-        }
-    }
-
-    public abstract class AddMessageCommand {
-        private final ConnectionContext ctx;
-        AddMessageCommand(ConnectionContext ctx) {
-            this.ctx = ctx;
-        }
-        abstract Message getMessage();
-        Future<Object> run() throws IOException {
-            return run(this.ctx);
-        }
-        abstract Future<Object> run(ConnectionContext ctx) throws IOException;
-    }
-
-    public abstract class RemoveMessageCommand {
-
-        private final ConnectionContext ctx;
-        RemoveMessageCommand(ConnectionContext ctx) {
-            this.ctx = ctx;
-        }
-        abstract MessageAck getMessageAck();
-        Future<Object> run() throws IOException {
-            return run(this.ctx);
-        }
-        abstract Future<Object> run(ConnectionContext context) throws IOException;
-    }
-
-    public MessageStore proxy(MessageStore messageStore) {
-        return new ProxyMessageStore(messageStore) {
-            @Override
-            public void addMessage(ConnectionContext context, final Message send) throws IOException {
-                KahaDBTransactionStore.this.addMessage(context, getDelegate(), send);
-            }
-
-            @Override
-            public Future<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException {
-                return KahaDBTransactionStore.this.asyncAddQueueMessage(context, getDelegate(), message);
-            }
-
-            @Override
-            public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException {
-                KahaDBTransactionStore.this.removeMessage(context, getDelegate(), ack);
-            }
-
-            @Override
-            public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-                KahaDBTransactionStore.this.removeAsyncMessage(context, getDelegate(), ack);
-            }
-        };
-    }
-
-    public TopicMessageStore proxy(TopicMessageStore messageStore) {
-        return new ProxyTopicMessageStore(messageStore) {
-            @Override
-            public void addMessage(ConnectionContext context, final Message send) throws IOException {
-                KahaDBTransactionStore.this.addMessage(context, getDelegate(), send);
-            }
-
-            @Override
-            public Future<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException {
-                return KahaDBTransactionStore.this.asyncAddTopicMessage(context, getDelegate(), message);
-            }
-
-            @Override
-            public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException {
-                KahaDBTransactionStore.this.removeMessage(context, getDelegate(), ack);
-            }
-
-            @Override
-            public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-                KahaDBTransactionStore.this.removeAsyncMessage(context, getDelegate(), ack);
-            }
-
-            @Override
-            public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                            MessageId messageId, MessageAck ack) throws IOException {
-                KahaDBTransactionStore.this.acknowledge(context, (TopicMessageStore)getDelegate(), clientId,
-                        subscriptionName, messageId, ack);
-            }
-
-        };
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId)
-     */
-    public void prepare(TransactionId txid) throws IOException {
-        inflightTransactions.remove(txid);
-        KahaTransactionInfo info = getTransactionInfo(txid);
-        theStore.store(new KahaPrepareCommand().setTransactionInfo(info), true, null, null);
-    }
-
-    public Tx getTx(Object txid) {
-        Tx tx = inflightTransactions.get(txid);
-        if (tx == null) {
-            tx = new Tx();
-            inflightTransactions.put(txid, tx);
-        }
-        return tx;
-    }
-
-    public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit, Runnable postCommit)
-            throws IOException {
-        if (txid != null) {
-            if (!txid.isXATransaction() && theStore.isConcurrentStoreAndDispatchTransactions()) {
-                if (preCommit != null) {
-                    preCommit.run();
-                }
-                Tx tx = inflightTransactions.remove(txid);
-                if (tx != null) {
-                    List<Future<Object>> results = tx.commit();
-                    boolean doneSomething = false;
-                    for (Future<Object> result : results) {
-                        try {
-                            result.get();
-                        } catch (InterruptedException e) {
-                            theStore.brokerService.handleIOException(new IOException(e.getMessage()));
-                        } catch (ExecutionException e) {
-                            theStore.brokerService.handleIOException(new IOException(e.getMessage()));
-                        }catch(CancellationException e) {
-                        }
-                        if (!result.isCancelled()) {
-                            doneSomething = true;
-                        }
-                    }
-                    if (postCommit != null) {
-                        postCommit.run();
-                    }
-                    if (doneSomething) {
-                        KahaTransactionInfo info = getTransactionInfo(txid);
-                        theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, null, null);
-                    }
-                }else {
-                    //The Tx will be null for failed over clients - lets run their post commits
-                    if (postCommit != null) {
-                        postCommit.run();
-                    }
-                }
-
-            } else {
-                KahaTransactionInfo info = getTransactionInfo(txid);
-                // ensure message order w.r.t to cursor and store for setBatch()
-                synchronized (this) {
-                    theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, preCommit, postCommit);
-                }
-            }
-        }else {
-           LOG.error("Null transaction passed on commit");
-        }
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId)
-     */
-    public void rollback(TransactionId txid) throws IOException {
-        if (txid.isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions() == false) {
-            KahaTransactionInfo info = getTransactionInfo(txid);
-            theStore.store(new KahaRollbackCommand().setTransactionInfo(info), false, null, null);
-        } else {
-            inflightTransactions.remove(txid);
-        }
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
-        // All the inflight transactions get rolled back..
-        // inflightTransactions.clear();
-        for (Map.Entry<TransactionId, List<Operation>> entry : theStore.preparedTransactions.entrySet()) {
-            XATransactionId xid = (XATransactionId) entry.getKey();
-            ArrayList<Message> messageList = new ArrayList<Message>();
-            ArrayList<MessageAck> ackList = new ArrayList<MessageAck>();
-
-            for (Operation op : entry.getValue()) {
-                if (op.getClass() == AddOpperation.class) {
-                    AddOpperation addOp = (AddOpperation) op;
-                    Message msg = (Message) wireFormat.unmarshal(new DataInputStream(addOp.getCommand().getMessage()
-                            .newInput()));
-                    messageList.add(msg);
-                } else {
-                    RemoveOpperation rmOp = (RemoveOpperation) op;
-                    Buffer ackb = rmOp.getCommand().getAck();
-                    MessageAck ack = (MessageAck) wireFormat.unmarshal(new DataInputStream(ackb.newInput()));
-                    ackList.add(ack);
-                }
-            }
-
-            Message[] addedMessages = new Message[messageList.size()];
-            MessageAck[] acks = new MessageAck[ackList.size()];
-            messageList.toArray(addedMessages);
-            ackList.toArray(acks);
-            listener.recover(xid, addedMessages, acks);
-        }
-    }
-
-    /**
-     * @param message
-     * @throws IOException
-     */
-    void addMessage(ConnectionContext context, final MessageStore destination, final Message message)
-            throws IOException {
-
-        if (message.getTransactionId() != null) {
-            if (message.getTransactionId().isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions() == false) {
-                destination.addMessage(context, message);
-            } else {
-                Tx tx = getTx(message.getTransactionId());
-                tx.add(new AddMessageCommand(context) {
-                    @Override
-                    public Message getMessage() {
-                        return message;
-                    }
-                    @Override
-                    public Future<Object> run(ConnectionContext ctx) throws IOException {
-                        destination.addMessage(ctx, message);
-                        return AbstractMessageStore.FUTURE;
-                    }
-
-                });
-            }
-        } else {
-            destination.addMessage(context, message);
-        }
-    }
-
-    Future<Object> asyncAddQueueMessage(ConnectionContext context, final MessageStore destination, final Message message)
-            throws IOException {
-
-        if (message.getTransactionId() != null) {
-            if (message.getTransactionId().isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions() == false) {
-                destination.addMessage(context, message);
-                return AbstractMessageStore.FUTURE;
-            } else {
-                Tx tx = getTx(message.getTransactionId());
-                tx.add(new AddMessageCommand(context) {
-                    @Override
-                    public Message getMessage() {
-                        return message;
-                    }
-                    @Override
-                    public Future<Object> run(ConnectionContext ctx) throws IOException {
-                        return destination.asyncAddQueueMessage(ctx, message);
-                    }
-
-                });
-                return AbstractMessageStore.FUTURE;
-            }
-        } else {
-            return destination.asyncAddQueueMessage(context, message);
-        }
-    }
-
-    Future<Object> asyncAddTopicMessage(ConnectionContext context, final MessageStore destination, final Message message)
-            throws IOException {
-
-        if (message.getTransactionId() != null) {
-            if (message.getTransactionId().isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions()==false) {
-                destination.addMessage(context, message);
-                return AbstractMessageStore.FUTURE;
-            } else {
-                Tx tx = getTx(message.getTransactionId());
-                tx.add(new AddMessageCommand(context) {
-                    @Override
-                    public Message getMessage() {
-                        return message;
-                    }
-                    @Override
-                    public Future run(ConnectionContext ctx) throws IOException {
-                        return destination.asyncAddTopicMessage(ctx, message);
-                    }
-
-                });
-                return AbstractMessageStore.FUTURE;
-            }
-        } else {
-            return destination.asyncAddTopicMessage(context, message);
-        }
-    }
-
-    /**
-     * @param ack
-     * @throws IOException
-     */
-    final void removeMessage(ConnectionContext context, final MessageStore destination, final MessageAck ack)
-            throws IOException {
-
-        if (ack.isInTransaction()) {
-            if (ack.getTransactionId().isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions()== false) {
-                destination.removeMessage(context, ack);
-            } else {
-                Tx tx = getTx(ack.getTransactionId());
-                tx.add(new RemoveMessageCommand(context) {
-                    @Override
-                    public MessageAck getMessageAck() {
-                        return ack;
-                    }
-
-                    @Override
-                    public Future<Object> run(ConnectionContext ctx) throws IOException {
-                        destination.removeMessage(ctx, ack);
-                        return AbstractMessageStore.FUTURE;
-                    }
-                });
-            }
-        } else {
-            destination.removeMessage(context, ack);
-        }
-    }
-
-    final void removeAsyncMessage(ConnectionContext context, final MessageStore destination, final MessageAck ack)
-            throws IOException {
-
-        if (ack.isInTransaction()) {
-            if (ack.getTransactionId().isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions()==false) {
-                destination.removeAsyncMessage(context, ack);
-            } else {
-                Tx tx = getTx(ack.getTransactionId());
-                tx.add(new RemoveMessageCommand(context) {
-                    @Override
-                    public MessageAck getMessageAck() {
-                        return ack;
-                    }
-
-                    @Override
-                    public Future<Object> run(ConnectionContext ctx) throws IOException {
-                        destination.removeMessage(ctx, ack);
-                        return AbstractMessageStore.FUTURE;
-                    }
-                });
-            }
-        } else {
-            destination.removeAsyncMessage(context, ack);
-        }
-    }
-
-    final void acknowledge(ConnectionContext context, final TopicMessageStore destination, final String clientId, final String subscriptionName,
-                           final MessageId messageId, final MessageAck ack) throws IOException {
-
-        if (ack.isInTransaction()) {
-            if (ack.getTransactionId().isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions()== false) {
-                destination.acknowledge(context, clientId, subscriptionName, messageId, ack);
-            } else {
-                Tx tx = getTx(ack.getTransactionId());
-                tx.add(new RemoveMessageCommand(context) {
-                    public MessageAck getMessageAck() {
-                        return ack;
-                    }
-
-                    public Future<Object> run(ConnectionContext ctx) throws IOException {
-                        destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack);
-                        return AbstractMessageStore.FUTURE;
-                    }
-                });
-            }
-        } else {
-            destination.acknowledge(context, clientId, subscriptionName, messageId, ack);
-        }
-    }
-
-
-    private KahaTransactionInfo getTransactionInfo(TransactionId txid) {
-        return theStore.createTransactionInfo(txid);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
deleted file mode 100644
index 409517b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
+++ /dev/null
@@ -1,2439 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.EOFException;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.activemq.ActiveMQMessageAuditNoSync;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.protobuf.Buffer;
-import org.apache.activemq.store.kahadb.data.KahaAddMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaCommitCommand;
-import org.apache.activemq.store.kahadb.data.KahaDestination;
-import org.apache.activemq.store.kahadb.data.KahaEntryType;
-import org.apache.activemq.store.kahadb.data.KahaLocalTransactionId;
-import org.apache.activemq.store.kahadb.data.KahaPrepareCommand;
-import org.apache.activemq.store.kahadb.data.KahaProducerAuditCommand;
-import org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand;
-import org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaRollbackCommand;
-import org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand;
-import org.apache.activemq.store.kahadb.data.KahaTraceCommand;
-import org.apache.activemq.store.kahadb.data.KahaTransactionInfo;
-import org.apache.activemq.store.kahadb.data.KahaXATransactionId;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.index.BTreeIndex;
-import org.apache.kahadb.index.BTreeVisitor;
-import org.apache.kahadb.journal.DataFile;
-import org.apache.kahadb.journal.Journal;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.DataByteArrayInputStream;
-import org.apache.kahadb.util.DataByteArrayOutputStream;
-import org.apache.kahadb.util.LockFile;
-import org.apache.kahadb.util.LongMarshaller;
-import org.apache.kahadb.util.Marshaller;
-import org.apache.kahadb.util.Sequence;
-import org.apache.kahadb.util.SequenceSet;
-import org.apache.kahadb.util.StringMarshaller;
-import org.apache.kahadb.util.VariableMarshaller;
-
-public class MessageDatabase extends ServiceSupport implements BrokerServiceAware {
-	
-	protected BrokerService brokerService;
-
-    public static final String PROPERTY_LOG_SLOW_ACCESS_TIME = "org.apache.activemq.store.kahadb.LOG_SLOW_ACCESS_TIME";
-    public static final int LOG_SLOW_ACCESS_TIME = Integer.parseInt(System.getProperty(PROPERTY_LOG_SLOW_ACCESS_TIME, "0"));
-
-    protected static final Buffer UNMATCHED;
-    static {
-        UNMATCHED = new Buffer(new byte[]{});
-    }
-    private static final Logger LOG = LoggerFactory.getLogger(MessageDatabase.class);
-    private static final int DEFAULT_DATABASE_LOCKED_WAIT_DELAY = 10 * 1000;
-
-    static final int CLOSED_STATE = 1;
-    static final int OPEN_STATE = 2;
-    static final long NOT_ACKED = -1;
-    static final long UNMATCHED_SEQ = -2;
-
-    static final int VERSION = 3;
-
-
-    protected class Metadata {
-        protected Page<Metadata> page;
-        protected int state;
-        protected BTreeIndex<String, StoredDestination> destinations;
-        protected Location lastUpdate;
-        protected Location firstInProgressTransactionLocation;
-        protected Location producerSequenceIdTrackerLocation = null;
-        protected transient ActiveMQMessageAuditNoSync producerSequenceIdTracker = new ActiveMQMessageAuditNoSync();
-        protected int version = VERSION;
-        public void read(DataInput is) throws IOException {
-            state = is.readInt();
-            destinations = new BTreeIndex<String, StoredDestination>(pageFile, is.readLong());
-            if (is.readBoolean()) {
-                lastUpdate = LocationMarshaller.INSTANCE.readPayload(is);
-            } else {
-                lastUpdate = null;
-            }
-            if (is.readBoolean()) {
-                firstInProgressTransactionLocation = LocationMarshaller.INSTANCE.readPayload(is);
-            } else {
-                firstInProgressTransactionLocation = null;
-            }
-            try {
-                if (is.readBoolean()) {
-                    producerSequenceIdTrackerLocation = LocationMarshaller.INSTANCE.readPayload(is);
-                } else {
-                    producerSequenceIdTrackerLocation = null;
-                }
-            } catch (EOFException expectedOnUpgrade) {
-            }
-            try {
-               version = is.readInt();
-            }catch (EOFException expectedOnUpgrade) {
-                version=1;
-            }
-            LOG.info("KahaDB is version " + version);
-        }
-
-        public void write(DataOutput os) throws IOException {
-            os.writeInt(state);
-            os.writeLong(destinations.getPageId());
-
-            if (lastUpdate != null) {
-                os.writeBoolean(true);
-                LocationMarshaller.INSTANCE.writePayload(lastUpdate, os);
-            } else {
-                os.writeBoolean(false);
-            }
-
-            if (firstInProgressTransactionLocation != null) {
-                os.writeBoolean(true);
-                LocationMarshaller.INSTANCE.writePayload(firstInProgressTransactionLocation, os);
-            } else {
-                os.writeBoolean(false);
-            }
-            
-            if (producerSequenceIdTrackerLocation != null) {
-                os.writeBoolean(true);
-                LocationMarshaller.INSTANCE.writePayload(producerSequenceIdTrackerLocation, os);
-            } else {
-                os.writeBoolean(false);
-            }
-            os.writeInt(VERSION);
-        }
-    }
-
-    class MetadataMarshaller extends VariableMarshaller<Metadata> {
-        public Metadata readPayload(DataInput dataIn) throws IOException {
-            Metadata rc = new Metadata();
-            rc.read(dataIn);
-            return rc;
-        }
-
-        public void writePayload(Metadata object, DataOutput dataOut) throws IOException {
-            object.write(dataOut);
-        }
-    }
-
-    protected PageFile pageFile;
-	protected Journal journal;
-	protected Metadata metadata = new Metadata();
-
-    protected MetadataMarshaller metadataMarshaller = new MetadataMarshaller();
-
-    protected boolean failIfDatabaseIsLocked;
-
-    protected boolean deleteAllMessages;
-    protected File directory = new File("KahaDB");
-    protected Thread checkpointThread;
-    protected boolean enableJournalDiskSyncs=true;
-    protected boolean archiveDataLogs;
-    protected File directoryArchive;
-    protected AtomicLong storeSize = new AtomicLong(0);
-    long checkpointInterval = 5*1000;
-    long cleanupInterval = 30*1000;
-    int journalMaxFileLength = Journal.DEFAULT_MAX_FILE_LENGTH;
-    int journalMaxWriteBatchSize = Journal.DEFAULT_MAX_WRITE_BATCH_SIZE;
-    boolean enableIndexWriteAsync = false;
-    int setIndexWriteBatchSize = PageFile.DEFAULT_WRITE_BATCH_SIZE;
-    
-    
-    protected AtomicBoolean opened = new AtomicBoolean();
-    private LockFile lockFile;
-    private boolean ignoreMissingJournalfiles = false;
-    private int indexCacheSize = 10000;
-    private boolean checkForCorruptJournalFiles = false;
-    private boolean checksumJournalFiles = false;
-    private int databaseLockedWaitDelay = DEFAULT_DATABASE_LOCKED_WAIT_DELAY;
-    protected boolean forceRecoverIndex = false;
-    private final Object checkpointThreadLock = new Object();
-
-    public MessageDatabase() {
-    }
-
-    @Override
-    public void doStart() throws Exception {
-        load();
-    }
-
-    @Override
-    public void doStop(ServiceStopper stopper) throws Exception {
-        unload();
-    }
-
-	private void loadPageFile() throws IOException {
-	    this.indexLock.writeLock().lock();
-	    try {
-		    final PageFile pageFile = getPageFile();
-            pageFile.load();
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    if (pageFile.getPageCount() == 0) {
-                        // First time this is created.. Initialize the metadata
-                        Page<Metadata> page = tx.allocate();
-                        assert page.getPageId() == 0;
-                        page.set(metadata);
-                        metadata.page = page;
-                        metadata.state = CLOSED_STATE;
-                        metadata.destinations = new BTreeIndex<String, StoredDestination>(pageFile, tx.allocate().getPageId());
-
-                        tx.store(metadata.page, metadataMarshaller, true);
-                    } else {
-                        Page<Metadata> page = tx.load(0, metadataMarshaller);
-                        metadata = page.get();
-                        metadata.page = page;
-                    }
-                    metadata.destinations.setKeyMarshaller(StringMarshaller.INSTANCE);
-                    metadata.destinations.setValueMarshaller(new StoredDestinationMarshaller());
-                    metadata.destinations.load(tx);
-                }
-            });
-            // Load up all the destinations since we need to scan all the indexes to figure out which journal files can be deleted.
-            // Perhaps we should just keep an index of file
-            storedDestinations.clear();
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    for (Iterator<Entry<String, StoredDestination>> iterator = metadata.destinations.iterator(tx); iterator.hasNext();) {
-                        Entry<String, StoredDestination> entry = iterator.next();
-                        StoredDestination sd = loadStoredDestination(tx, entry.getKey(), entry.getValue().subscriptions!=null);
-                        storedDestinations.put(entry.getKey(), sd);
-                    }
-                }
-            });
-            pageFile.flush();            
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-	}
-	
-	private void startCheckpoint() {
-        synchronized (checkpointThreadLock) {
-            boolean start = false;
-            if (checkpointThread == null) {
-                start = true;
-            } else if (!checkpointThread.isAlive()) {
-                start = true;
-                LOG.info("KahaDB: Recovering checkpoint thread after death");
-            }
-            if (start) {
-                checkpointThread = new Thread("ActiveMQ Journal Checkpoint Worker") {
-                    @Override
-                    public void run() {
-                        try {
-                            long lastCleanup = System.currentTimeMillis();
-                            long lastCheckpoint = System.currentTimeMillis();
-                            // Sleep for a short time so we can periodically check
-                            // to see if we need to exit this thread.
-                            long sleepTime = Math.min(checkpointInterval, 500);
-                            while (opened.get()) {
-                                Thread.sleep(sleepTime);
-                                long now = System.currentTimeMillis();
-                                if( now - lastCleanup >= cleanupInterval ) {
-                                    checkpointCleanup(true);
-                                    lastCleanup = now;
-                                    lastCheckpoint = now;
-                                } else if( now - lastCheckpoint >= checkpointInterval ) {
-                                    checkpointCleanup(false);
-                                    lastCheckpoint = now;
-                                }
-                            }
-                        } catch (InterruptedException e) {
-                            // Looks like someone really wants us to exit this thread...
-                        } catch (IOException ioe) {
-                            LOG.error("Checkpoint failed", ioe);
-                            brokerService.handleIOException(ioe);
-                        }
-                    }
-                };
-
-                checkpointThread.setDaemon(true);
-                checkpointThread.start();
-            }
-        }
-	}
-
-	public void open() throws IOException {
-		if( opened.compareAndSet(false, true) ) {
-            getJournal().start();
-	        loadPageFile();        
-	        startCheckpoint();
-            recover();
-		}
-	}
-
-    private void lock() throws IOException {
-        if( lockFile == null ) {
-            File lockFileName = new File(directory, "lock");
-            lockFile = new LockFile(lockFileName, true);
-            if (failIfDatabaseIsLocked) {
-                lockFile.lock();
-            } else {
-                while (true) {
-                    try {
-                        lockFile.lock();
-                        break;
-                    } catch (IOException e) {
-                        LOG.info("Database "+lockFileName+" is locked... waiting " + (getDatabaseLockedWaitDelay() / 1000) + " seconds for the database to be unlocked. Reason: " + e);
-                        try {
-                            Thread.sleep(getDatabaseLockedWaitDelay());
-                        } catch (InterruptedException e1) {
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    // for testing
-    public LockFile getLockFile() {
-        return lockFile;
-    }
-
-    public void load() throws IOException {
-    	
-        this.indexLock.writeLock().lock();
-        try {
-            lock();
-            if (deleteAllMessages) {
-                getJournal().start();
-                getJournal().delete();
-                getJournal().close();
-                journal = null;
-                getPageFile().delete();
-                LOG.info("Persistence store purged.");
-                deleteAllMessages = false;
-            }
-
-	    	open();
-	        store(new KahaTraceCommand().setMessage("LOADED " + new Date()));
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-
-    }
-
-    
-	public void close() throws IOException, InterruptedException {
-		if( opened.compareAndSet(true, false)) {
-		    this.indexLock.writeLock().lock();
-	        try {
-	            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-	                public void execute(Transaction tx) throws IOException {
-	                    checkpointUpdate(tx, true);
-	                }
-	            });
-	            pageFile.unload();
-	            metadata = new Metadata();
-	        }finally {
-	            this.indexLock.writeLock().unlock();
-	        }
-	        journal.close();
-            synchronized (checkpointThreadLock) {
-	            checkpointThread.join();
-            }
-	        lockFile.unlock();
-	        lockFile=null;
-		}
-	}
-	
-    public void unload() throws IOException, InterruptedException {
-        this.indexLock.writeLock().lock();
-        try {
-            if( pageFile != null && pageFile.isLoaded() ) {
-                metadata.state = CLOSED_STATE;
-                metadata.firstInProgressTransactionLocation = getFirstInProgressTxLocation();
-    
-                pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        tx.store(metadata.page, metadataMarshaller, true);
-                    }
-                });
-            }
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-        close();
-    }
-
-    // public for testing
-    public Location getFirstInProgressTxLocation() {
-        Location l = null;
-        synchronized (inflightTransactions) {
-            if (!inflightTransactions.isEmpty()) {
-                l = inflightTransactions.values().iterator().next().get(0).getLocation();
-            }
-            if (!preparedTransactions.isEmpty()) {
-                Location t = preparedTransactions.values().iterator().next().get(0).getLocation();
-                if (l==null || t.compareTo(l) <= 0) {
-                    l = t;
-                }
-            }
-        }
-        return l;
-    }
-
-    /**
-     * Move all the messages that were in the journal into long term storage. We
-     * just replay and do a checkpoint.
-     * 
-     * @throws IOException
-     * @throws IOException
-     * @throws IllegalStateException
-     */
-    private void recover() throws IllegalStateException, IOException {
-        this.indexLock.writeLock().lock();
-        try {
-            
-	        long start = System.currentTimeMillis();        
-	        Location producerAuditPosition = recoverProducerAudit();
-	        Location lastIndoubtPosition = getRecoveryPosition();
-	        
-	        Location recoveryPosition = minimum(producerAuditPosition, lastIndoubtPosition);
-	            
-	        if (recoveryPosition != null) {  
-	            int redoCounter = 0;
-	            LOG.info("Recovering from the journal ...");
-	            while (recoveryPosition != null) {
-	                JournalCommand<?> message = load(recoveryPosition);
-	                metadata.lastUpdate = recoveryPosition;
-	                process(message, recoveryPosition, lastIndoubtPosition);
-	                redoCounter++;
-	                recoveryPosition = journal.getNextLocation(recoveryPosition);
-	            }
-	            long end = System.currentTimeMillis();
-	            LOG.info("Recovery replayed " + redoCounter + " operations from the journal in " + ((end - start) / 1000.0f) + " seconds.");
-	        }
-	        
-	        // We may have to undo some index updates.
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    recoverIndex(tx);
-                }
-            });
-
-            // rollback any recovered inflight local transactions
-            Set<TransactionId> toRollback = new HashSet<TransactionId>();
-            synchronized (inflightTransactions) {
-                for (Iterator<TransactionId> it = inflightTransactions.keySet().iterator(); it.hasNext(); ) {
-                    TransactionId id = it.next();
-                    if (id.isLocalTransaction()) {
-                        toRollback.add(id);
-                    }
-                }
-                for (TransactionId tx: toRollback) {
-                    LOG.debug("rolling back recovered indoubt local transaction " + tx);
-                    store(new KahaRollbackCommand().setTransactionInfo(createTransactionInfo(tx)), false, null, null);
-                }
-            }
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-    }
-    
-	private Location minimum(Location producerAuditPosition,
-            Location lastIndoubtPosition) {
-	    Location min = null;
-	    if (producerAuditPosition != null) {
-	        min = producerAuditPosition;
-	        if (lastIndoubtPosition != null && lastIndoubtPosition.compareTo(producerAuditPosition) < 0) {
-	            min = lastIndoubtPosition;
-	        }
-	    } else {
-	        min = lastIndoubtPosition;
-	    }
-	    return min;
-    }
-	
-	private Location recoverProducerAudit() throws IOException {
-	    if (metadata.producerSequenceIdTrackerLocation != null) {
-	        KahaProducerAuditCommand audit = (KahaProducerAuditCommand) load(metadata.producerSequenceIdTrackerLocation);
-	        try {
-	            ObjectInputStream objectIn = new ObjectInputStream(audit.getAudit().newInput());
-	            metadata.producerSequenceIdTracker = (ActiveMQMessageAuditNoSync) objectIn.readObject();
-	        } catch (ClassNotFoundException cfe) {
-	            IOException ioe = new IOException("Failed to read producerAudit: " + cfe);
-	            ioe.initCause(cfe);
-	            throw ioe;
-	        }
-	        return journal.getNextLocation(metadata.producerSequenceIdTrackerLocation);
-	    } else {
-	        // got no audit stored so got to recreate via replay from start of the journal
-	        return journal.getNextLocation(null);
-	    }
-    }
-
-    protected void recoverIndex(Transaction tx) throws IOException {
-        long start = System.currentTimeMillis();
-        // It is possible index updates got applied before the journal updates.. 
-        // in that case we need to removed references to messages that are not in the journal
-        final Location lastAppendLocation = journal.getLastAppendLocation();
-        long undoCounter=0;
-        
-        // Go through all the destinations to see if they have messages past the lastAppendLocation
-        for (StoredDestination sd : storedDestinations.values()) {
-        	
-            final ArrayList<Long> matches = new ArrayList<Long>();
-            // Find all the Locations that are >= than the last Append Location.
-            sd.locationIndex.visit(tx, new BTreeVisitor.GTEVisitor<Location, Long>(lastAppendLocation) {
-				@Override
-				protected void matched(Location key, Long value) {
-					matches.add(value);
-				}
-            });
-            
-            
-            for (Long sequenceId : matches) {
-                MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
-                sd.locationIndex.remove(tx, keys.location);
-                sd.messageIdIndex.remove(tx, keys.messageId);
-                metadata.producerSequenceIdTracker.rollback(new MessageId(keys.messageId));
-                undoCounter++;
-                // TODO: do we need to modify the ack positions for the pub sub case?
-			}
-        }
-
-        long end = System.currentTimeMillis();
-        if( undoCounter > 0 ) {
-        	// The rolledback operations are basically in flight journal writes.  To avoid getting these the end user
-        	// should do sync writes to the journal.
-	        LOG.info("Rolled back " + undoCounter + " messages from the index in " + ((end - start) / 1000.0f) + " seconds.");
-        }
-
-        undoCounter = 0;
-        start = System.currentTimeMillis();
-
-        // Lets be extra paranoid here and verify that all the datafiles being referenced
-        // by the indexes still exists.
-
-        final SequenceSet ss = new SequenceSet();
-        for (StoredDestination sd : storedDestinations.values()) {
-            // Use a visitor to cut down the number of pages that we load
-            sd.locationIndex.visit(tx, new BTreeVisitor<Location, Long>() {
-                int last=-1;
-
-                public boolean isInterestedInKeysBetween(Location first, Location second) {
-                    if( first==null ) {
-                        return !ss.contains(0, second.getDataFileId());
-                    } else if( second==null ) {
-                        return true;
-                    } else {
-                        return !ss.contains(first.getDataFileId(), second.getDataFileId());
-                    }
-                }
-
-                public void visit(List<Location> keys, List<Long> values) {
-                    for (Location l : keys) {
-                        int fileId = l.getDataFileId();
-                        if( last != fileId ) {
-                            ss.add(fileId);
-                            last = fileId;
-                        }
-                    }
-                }
-
-            });
-        }
-        HashSet<Integer> missingJournalFiles = new HashSet<Integer>();
-        while( !ss.isEmpty() ) {
-            missingJournalFiles.add( (int)ss.removeFirst() );
-        }
-        missingJournalFiles.removeAll( journal.getFileMap().keySet() );
-
-        if( !missingJournalFiles.isEmpty() ) {
-            LOG.info("Some journal files are missing: "+missingJournalFiles);
-        }
-
-        ArrayList<BTreeVisitor.Predicate<Location>> missingPredicates = new ArrayList<BTreeVisitor.Predicate<Location>>();
-        for (Integer missing : missingJournalFiles) {
-            missingPredicates.add(new BTreeVisitor.BetweenVisitor<Location, Long>(new Location(missing,0), new Location(missing+1,0)));
-        }
-
-        if ( checkForCorruptJournalFiles ) {
-            Collection<DataFile> dataFiles = journal.getFileMap().values();
-            for (DataFile dataFile : dataFiles) {
-                int id = dataFile.getDataFileId();
-                missingPredicates.add(new BTreeVisitor.BetweenVisitor<Location, Long>(new Location(id,dataFile.getLength()), new Location(id+1,0)));
-                Sequence seq = dataFile.getCorruptedBlocks().getHead();
-                while( seq!=null ) {
-                    missingPredicates.add(new BTreeVisitor.BetweenVisitor<Location, Long>(new Location(id, (int) seq.getFirst()), new Location(id, (int) seq.getLast()+1)));
-                    seq = seq.getNext();
-                }
-            }
-        }
-
-        if( !missingPredicates.isEmpty() ) {
-            for (StoredDestination sd : storedDestinations.values()) {
-
-                final ArrayList<Long> matches = new ArrayList<Long>();
-                sd.locationIndex.visit(tx, new BTreeVisitor.OrVisitor<Location, Long>(missingPredicates) {
-                    @Override
-                    protected void matched(Location key, Long value) {
-                        matches.add(value);
-                    }
-                });
-
-                // If somes message references are affected by the missing data files...
-                if( !matches.isEmpty() ) {
-
-                    // We either 'gracefully' recover dropping the missing messages or
-                    // we error out.
-                    if( ignoreMissingJournalfiles ) {
-                        // Update the index to remove the references to the missing data
-                        for (Long sequenceId : matches) {
-                            MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
-                            sd.locationIndex.remove(tx, keys.location);
-                            sd.messageIdIndex.remove(tx, keys.messageId);
-                            undoCounter++;
-                            // TODO: do we need to modify the ack positions for the pub sub case?
-                        }
-
-                    } else {
-                        throw new IOException("Detected missing/corrupt journal files. "+matches.size()+" messages affected.");
-                    }
-                }
-            }
-        }
-        
-        end = System.currentTimeMillis();
-        if( undoCounter > 0 ) {
-        	// The rolledback operations are basically in flight journal writes.  To avoid getting these the end user
-        	// should do sync writes to the journal.
-	        LOG.info("Detected missing/corrupt journal files.  Dropped " + undoCounter + " messages from the index in " + ((end - start) / 1000.0f) + " seconds.");
-        }
-	}
-
-	private Location nextRecoveryPosition;
-	private Location lastRecoveryPosition;
-
-	public void incrementalRecover() throws IOException {
-	    this.indexLock.writeLock().lock();
-        try {
-	        if( nextRecoveryPosition == null ) {
-	        	if( lastRecoveryPosition==null ) {
-	        		nextRecoveryPosition = getRecoveryPosition();
-	        	} else {
-	                nextRecoveryPosition = journal.getNextLocation(lastRecoveryPosition);
-	        	}        	
-	        }
-	        while (nextRecoveryPosition != null) {
-	        	lastRecoveryPosition = nextRecoveryPosition;
-	            metadata.lastUpdate = lastRecoveryPosition;
-	            JournalCommand<?> message = load(lastRecoveryPosition);
-	            process(message, lastRecoveryPosition);            
-	            nextRecoveryPosition = journal.getNextLocation(lastRecoveryPosition);
-	        }
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-	}
-	
-    public Location getLastUpdatePosition() throws IOException {
-        return metadata.lastUpdate;
-    }
-    
-    private Location getRecoveryPosition() throws IOException {
-
-        if (!this.forceRecoverIndex) {
-
-            // If we need to recover the transactions..
-            if (metadata.firstInProgressTransactionLocation != null) {
-                return metadata.firstInProgressTransactionLocation;
-            }
-        
-            // Perhaps there were no transactions...
-            if( metadata.lastUpdate!=null) {
-                // Start replay at the record after the last one recorded in the index file.
-                return journal.getNextLocation(metadata.lastUpdate);
-            }
-        }
-        // This loads the first position.
-        return journal.getNextLocation(null);
-	}
-
-    protected void checkpointCleanup(final boolean cleanup) throws IOException {
-    	long start;
-    	this.indexLock.writeLock().lock();
-        try {
-            start = System.currentTimeMillis();
-        	if( !opened.get() ) {
-        		return;
-        	}
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    checkpointUpdate(tx, cleanup);
-                }
-            });
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-    	long end = System.currentTimeMillis();
-    	if( LOG_SLOW_ACCESS_TIME>0 && end-start > LOG_SLOW_ACCESS_TIME) {
-    		LOG.info("Slow KahaDB access: cleanup took "+(end-start));
-    	}
-    }
-
-    
-	public void checkpoint(Callback closure) throws Exception {
-	    this.indexLock.writeLock().lock();
-        try {
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    checkpointUpdate(tx, false);
-                }
-            });
-            closure.execute();
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-	}
-
-    // /////////////////////////////////////////////////////////////////
-    // Methods call by the broker to update and query the store.
-    // /////////////////////////////////////////////////////////////////
-    public Location store(JournalCommand<?> data) throws IOException {
-        return store(data, false, null,null);
-    }
-
-    /**
-     * All updated are are funneled through this method. The updates are converted
-     * to a JournalMessage which is logged to the journal and then the data from
-     * the JournalMessage is used to update the index just like it would be done
-     * during a recovery process.
-     */
-    public Location store(JournalCommand<?> data, boolean sync, Runnable before,Runnable after) throws IOException {
-    	if (before != null) {
-    	    before.run();
-    	}
-        try {
-            int size = data.serializedSizeFramed();
-            DataByteArrayOutputStream os = new DataByteArrayOutputStream(size + 1);
-            os.writeByte(data.type().getNumber());
-            data.writeFramed(os);
-    
-            long start = System.currentTimeMillis();
-            Location location = journal.write(os.toByteSequence(), sync);
-            long start2 = System.currentTimeMillis();
-            process(data, location);
-        	long end = System.currentTimeMillis();
-        	if( LOG_SLOW_ACCESS_TIME>0 && end-start > LOG_SLOW_ACCESS_TIME) {
-        		LOG.info("Slow KahaDB access: Journal append took: "+(start2-start)+" ms, Index update took "+(end-start2)+" ms");
-        	}
-    
-        	this.indexLock.writeLock().lock();
-            try {
-            	metadata.lastUpdate = location;
-            }finally {
-                this.indexLock.writeLock().unlock();
-            }
-            if (!checkpointThread.isAlive()) {
-                startCheckpoint();
-            }
-            if (after != null) {
-                after.run();
-            }
-            return location;
-    	} catch (IOException ioe) {
-            LOG.error("KahaDB failed to store to Journal", ioe);
-            brokerService.handleIOException(ioe);
-    	    throw ioe;
-    	}
-    }
-
-    /**
-     * Loads a previously stored JournalMessage
-     * 
-     * @param location
-     * @return
-     * @throws IOException
-     */
-    public JournalCommand<?> load(Location location) throws IOException {
-        ByteSequence data = journal.read(location);
-        DataByteArrayInputStream is = new DataByteArrayInputStream(data);
-        byte readByte = is.readByte();
-        KahaEntryType type = KahaEntryType.valueOf(readByte);
-        if( type == null ) {
-            throw new IOException("Could not load journal record. Invalid location: "+location);
-        }
-        JournalCommand<?> message = (JournalCommand<?>)type.createMessage();
-        message.mergeFramed(is);
-        return message;
-    }
-    
-    /**
-     * do minimal recovery till we reach the last inDoubtLocation
-     * @param data
-     * @param location
-     * @param inDoubtlocation
-     * @throws IOException
-     */
-    void process(JournalCommand<?> data, final Location location, final Location inDoubtlocation) throws IOException {
-        if (inDoubtlocation != null && location.compareTo(inDoubtlocation) >= 0) {
-            process(data, location);
-        } else {
-            // just recover producer audit
-            data.visit(new Visitor() {
-                public void visit(KahaAddMessageCommand command) throws IOException {
-                    metadata.producerSequenceIdTracker.isDuplicate(command.getMessageId());
-                }
-            });
-        }
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Journaled record processing methods. Once the record is journaled,
-    // these methods handle applying the index updates. These may be called
-    // from the recovery method too so they need to be idempotent
-    // /////////////////////////////////////////////////////////////////
-
-    void process(JournalCommand<?> data, final Location location) throws IOException {
-        data.visit(new Visitor() {
-            @Override
-            public void visit(KahaAddMessageCommand command) throws IOException {
-                process(command, location);
-            }
-
-            @Override
-            public void visit(KahaRemoveMessageCommand command) throws IOException {
-                process(command, location);
-            }
-
-            @Override
-            public void visit(KahaPrepareCommand command) throws IOException {
-                process(command, location);
-            }
-
-            @Override
-            public void visit(KahaCommitCommand command) throws IOException {
-                process(command, location);
-            }
-
-            @Override
-            public void visit(KahaRollbackCommand command) throws IOException {
-                process(command, location);
-            }
-
-            @Override
-            public void visit(KahaRemoveDestinationCommand command) throws IOException {
-                process(command, location);
-            }
-
-            @Override
-            public void visit(KahaSubscriptionCommand command) throws IOException {
-                process(command, location);
-            }
-        });
-    }
-
-    protected void process(final KahaAddMessageCommand command, final Location location) throws IOException {
-        if (command.hasTransactionInfo()) {
-            List<Operation> inflightTx = getInflightTx(command.getTransactionInfo(), location);
-            inflightTx.add(new AddOpperation(command, location));
-        } else {
-            this.indexLock.writeLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        upadateIndex(tx, command, location);
-                    }
-                });
-            }finally {
-                this.indexLock.writeLock().unlock();
-            }
-        }
-    }
-
-    protected void process(final KahaRemoveMessageCommand command, final Location location) throws IOException {
-        if (command.hasTransactionInfo()) {
-           List<Operation> inflightTx = getInflightTx(command.getTransactionInfo(), location);
-           inflightTx.add(new RemoveOpperation(command, location));
-        } else {
-            this.indexLock.writeLock().lock();
-            try {
-                pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        updateIndex(tx, command, location);
-                    }
-                });
-            }finally {
-                this.indexLock.writeLock().unlock();
-            }
-        }
-
-    }
-
-    protected void process(final KahaRemoveDestinationCommand command, final Location location) throws IOException {
-        this.indexLock.writeLock().lock();
-        try {
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    updateIndex(tx, command, location);
-                }
-            });
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-    }
-
-    protected void process(final KahaSubscriptionCommand command, final Location location) throws IOException {
-        this.indexLock.writeLock().lock();
-        try {
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    updateIndex(tx, command, location);
-                }
-            });
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-    }
-
-    protected void process(KahaCommitCommand command, Location location) throws IOException {
-        TransactionId key = key(command.getTransactionInfo());
-        List<Operation> inflightTx;
-        synchronized (inflightTransactions) {
-            inflightTx = inflightTransactions.remove(key);
-            if (inflightTx == null) {
-                inflightTx = preparedTransactions.remove(key);
-            }
-        }
-        if (inflightTx == null) {
-            return;
-        }
-
-        final List<Operation> messagingTx = inflightTx;
-        this.indexLock.writeLock().lock();
-        try {
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    for (Operation op : messagingTx) {
-                        op.execute(tx);
-                    }
-                }
-            });
-        }finally {
-            this.indexLock.writeLock().unlock();
-        }
-    }
-
-    protected void process(KahaPrepareCommand command, Location location) {
-        TransactionId key = key(command.getTransactionInfo());
-        synchronized (inflightTransactions) {
-            List<Operation> tx = inflightTransactions.remove(key);
-            if (tx != null) {
-                preparedTransactions.put(key, tx);
-            }
-        }
-    }
-
-    protected void process(KahaRollbackCommand command, Location location) {
-        TransactionId key = key(command.getTransactionInfo());
-        synchronized (inflightTransactions) {
-            List<Operation> tx = inflightTransactions.remove(key);
-            if (tx == null) {
-                preparedTransactions.remove(key);
-            }
-        }
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // These methods do the actual index updates.
-    // /////////////////////////////////////////////////////////////////
-
-    protected final ReentrantReadWriteLock indexLock = new ReentrantReadWriteLock();
-	private final HashSet<Integer> journalFilesBeingReplicated = new HashSet<Integer>();
-
-    void upadateIndex(Transaction tx, KahaAddMessageCommand command, Location location) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-
-        // Skip adding the message to the index if this is a topic and there are
-        // no subscriptions.
-        if (sd.subscriptions != null && sd.subscriptions.isEmpty(tx)) {
-            return;
-        }
-
-        // Add the message.
-        int priority = command.getPrioritySupported() ? command.getPriority() : javax.jms.Message.DEFAULT_PRIORITY;
-        long id = sd.orderIndex.getNextMessageId(priority);
-        Long previous = sd.locationIndex.put(tx, location, id);
-        if (previous == null) {
-            previous = sd.messageIdIndex.put(tx, command.getMessageId(), id);
-            if (previous == null) {
-                sd.orderIndex.put(tx, priority, id, new MessageKeys(command.getMessageId(), location));
-                if (sd.subscriptions != null && !sd.subscriptions.isEmpty(tx)) {
-                    addAckLocationForNewMessage(tx, sd, id);
-                }
-            } else {
-                // If the message ID as indexed, then the broker asked us to
-                // store a DUP
-                // message. Bad BOY! Don't do it, and log a warning.
-                LOG.warn("Duplicate message add attempt rejected. Destination: " + command.getDestination().getName() + ", Message id: " + command.getMessageId());
-                // TODO: consider just rolling back the tx.
-                sd.messageIdIndex.put(tx, command.getMessageId(), previous);
-                sd.locationIndex.remove(tx, location);
-            }
-        } else {
-            // restore the previous value.. Looks like this was a redo of a
-            // previously
-            // added message. We don't want to assign it a new id as the other
-            // indexes would
-            // be wrong..
-            //
-            // TODO: consider just rolling back the tx.
-            sd.locationIndex.put(tx, location, previous);
-        }
-        // record this id in any event, initial send or recovery
-        metadata.producerSequenceIdTracker.isDuplicate(command.getMessageId());
-    }
-
-    void updateIndex(Transaction tx, KahaRemoveMessageCommand command, Location ackLocation) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-        if (!command.hasSubscriptionKey()) {
-            
-            // In the queue case we just remove the message from the index..
-            Long sequenceId = sd.messageIdIndex.remove(tx, command.getMessageId());
-            if (sequenceId != null) {
-                MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
-                if (keys != null) {
-                    sd.locationIndex.remove(tx, keys.location);
-                    recordAckMessageReferenceLocation(ackLocation, keys.location);
-                }                
-            }
-        } else {
-            // In the topic case we need remove the message once it's been acked
-            // by all the subs
-            Long sequence = sd.messageIdIndex.get(tx, command.getMessageId());
-
-            // Make sure it's a valid message id...
-            if (sequence != null) {
-                String subscriptionKey = command.getSubscriptionKey();
-                if (command.getAck() != UNMATCHED) {
-                    sd.orderIndex.get(tx, sequence);
-                    byte priority = sd.orderIndex.lastGetPriority();
-                    sd.subscriptionAcks.put(tx, subscriptionKey, new LastAck(sequence, priority));
-                }
-                // The following method handles deleting un-referenced messages.
-                removeAckLocation(tx, sd, subscriptionKey, sequence);
-            }
-
-        }
-    }
-
-    Map<Integer, Set<Integer>> ackMessageFileMap = new HashMap<Integer, Set<Integer>>();
-    private void recordAckMessageReferenceLocation(Location ackLocation, Location messageLocation) {
-        Set<Integer> referenceFileIds = ackMessageFileMap.get(Integer.valueOf(ackLocation.getDataFileId()));
-        if (referenceFileIds == null) {
-            referenceFileIds = new HashSet<Integer>();
-            referenceFileIds.add(messageLocation.getDataFileId());
-            ackMessageFileMap.put(ackLocation.getDataFileId(), referenceFileIds);
-        } else {
-            Integer id = Integer.valueOf(messageLocation.getDataFileId());
-            if (!referenceFileIds.contains(id)) {
-                referenceFileIds.add(id);
-            }
-        }
-    }
-
-    void updateIndex(Transaction tx, KahaRemoveDestinationCommand command, Location location) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-        sd.orderIndex.remove(tx);
-        
-        sd.locationIndex.clear(tx);
-        sd.locationIndex.unload(tx);
-        tx.free(sd.locationIndex.getPageId());
-
-        sd.messageIdIndex.clear(tx);
-        sd.messageIdIndex.unload(tx);
-        tx.free(sd.messageIdIndex.getPageId());
-
-        if (sd.subscriptions != null) {
-            sd.subscriptions.clear(tx);
-            sd.subscriptions.unload(tx);
-            tx.free(sd.subscriptions.getPageId());
-
-            sd.subscriptionAcks.clear(tx);
-            sd.subscriptionAcks.unload(tx);
-            tx.free(sd.subscriptionAcks.getPageId());
-
-            sd.ackPositions.clear(tx);
-            sd.ackPositions.unload(tx);
-            tx.free(sd.ackPositions.getPageId());
-        }
-
-        String key = key(command.getDestination());
-        storedDestinations.remove(key);
-        metadata.destinations.remove(tx, key);
-    }
-
-    void updateIndex(Transaction tx, KahaSubscriptionCommand command, Location location) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-        final String subscriptionKey = command.getSubscriptionKey();
-
-        // If set then we are creating it.. otherwise we are destroying the sub
-        if (command.hasSubscriptionInfo()) {
-            sd.subscriptions.put(tx, subscriptionKey, command);
-            long ackLocation=NOT_ACKED;
-            if (!command.getRetroactive()) {
-                ackLocation = sd.orderIndex.nextMessageId-1;
-            } else {
-                addAckLocationForRetroactiveSub(tx, sd, ackLocation, subscriptionKey);
-            }
-            sd.subscriptionAcks.put(tx, subscriptionKey, new LastAck(ackLocation));
-        } else {
-            // delete the sub...
-            sd.subscriptions.remove(tx, subscriptionKey);
-            sd.subscriptionAcks.remove(tx, subscriptionKey);
-            removeAckLocationsForSub(tx, sd, subscriptionKey);
-        }
-    }
-    
-    /**
-     * @param tx
-     * @throws IOException
-     */
-    void checkpointUpdate(Transaction tx, boolean cleanup) throws IOException {
-        LOG.debug("Checkpoint started.");
-
-        // reflect last update exclusive of current checkpoint
-        Location firstTxLocation = metadata.lastUpdate;
-
-        metadata.state = OPEN_STATE;
-        metadata.producerSequenceIdTrackerLocation = checkpointProducerAudit();
-        metadata.firstInProgressTransactionLocation = getFirstInProgressTxLocation();
-        tx.store(metadata.page, metadataMarshaller, true);
-        pageFile.flush();
-
-        if( cleanup ) {
-
-            final TreeSet<Integer> completeFileSet = new TreeSet<Integer>(journal.getFileMap().keySet());
-            final TreeSet<Integer> gcCandidateSet = new TreeSet<Integer>(completeFileSet);
-
-            LOG.trace("Last update: " + firstTxLocation + ", full gc candidates set: " + gcCandidateSet);
-
-        	// Don't GC files under replication
-        	if( journalFilesBeingReplicated!=null ) {
-        		gcCandidateSet.removeAll(journalFilesBeingReplicated);
-        	}
-
-            // Don't GC files after the first in progress tx
-            if( metadata.firstInProgressTransactionLocation!=null ) {
-                if (metadata.firstInProgressTransactionLocation.getDataFileId() < firstTxLocation.getDataFileId()) {
-                   firstTxLocation = metadata.firstInProgressTransactionLocation;
-                };
-            }
-            
-            if( firstTxLocation!=null ) {
-            	while( !gcCandidateSet.isEmpty() ) {
-            		Integer last = gcCandidateSet.last();
-            		if( last >= firstTxLocation.getDataFileId() ) {
-            			gcCandidateSet.remove(last);
-            		} else {
-            			break;
-            		}
-            	}
-                LOG.trace("gc candidates after first tx:" + firstTxLocation + ", " + gcCandidateSet);
-            }
-
-            // Go through all the destinations to see if any of them can remove GC candidates.
-            for (Entry<String, StoredDestination> entry : storedDestinations.entrySet()) {
-            	if( gcCandidateSet.isEmpty() ) {
-                	break;
-                }
-
-                // Use a visitor to cut down the number of pages that we load
-                entry.getValue().locationIndex.visit(tx, new BTreeVisitor<Location, Long>() {
-                    int last=-1;
-                    public boolean isInterestedInKeysBetween(Location first, Location second) {
-                    	if( first==null ) {
-                    		SortedSet<Integer> subset = gcCandidateSet.headSet(second.getDataFileId()+1);
-                    		if( !subset.isEmpty() && subset.last() == second.getDataFileId() ) {
-                    			subset.remove(second.getDataFileId());
-                    		}
-							return !subset.isEmpty();
-                    	} else if( second==null ) {
-                    		SortedSet<Integer> subset = gcCandidateSet.tailSet(first.getDataFileId());
-                    		if( !subset.isEmpty() && subset.first() == first.getDataFileId() ) {
-                    			subset.remove(first.getDataFileId());
-                    		}
-							return !subset.isEmpty();
-                    	} else {
-                    		SortedSet<Integer> subset = gcCandidateSet.subSet(first.getDataFileId(), second.getDataFileId()+1);
-                    		if( !subset.isEmpty() && subset.first() == first.getDataFileId() ) {
-                    			subset.remove(first.getDataFileId());
-                    		}
-                    		if( !subset.isEmpty() && subset.last() == second.getDataFileId() ) {
-                    			subset.remove(second.getDataFileId());
-                    		}
-							return !subset.isEmpty();
-                    	}
-                    }
-
-                    public void visit(List<Location> keys, List<Long> values) {
-                    	for (Location l : keys) {
-                            int fileId = l.getDataFileId();
-							if( last != fileId ) {
-                        		gcCandidateSet.remove(fileId);
-                                last = fileId;
-                            }
-                        }
-                    }
-                });
-                LOG.trace("gc candidates after dest:" + entry.getKey() + ", " + gcCandidateSet);
-            }
-
-            // check we are not deleting file with ack for in-use journal files
-            LOG.trace("gc candidates: " + gcCandidateSet);
-            final TreeSet<Integer> gcCandidates = new TreeSet<Integer>(gcCandidateSet);
-            Iterator<Integer> candidates = gcCandidateSet.iterator();
-            while (candidates.hasNext()) {
-                Integer candidate = candidates.next();
-                Set<Integer> referencedFileIds = ackMessageFileMap.get(candidate);
-                if (referencedFileIds != null) {
-                    for (Integer referencedFileId : referencedFileIds) {
-                        if (completeFileSet.contains(referencedFileId) && !gcCandidates.contains(referencedFileId)) {
-                            // active file that is not targeted for deletion is referenced so don't delete
-                            candidates.remove();
-                            break;
-                        }
-                    }
-                    if (gcCandidateSet.contains(candidate)) {
-                        ackMessageFileMap.remove(candidate);
-                    } else {
-                        LOG.trace("not removing data file: " + candidate
-                                + " as contained ack(s) refer to referenced file: " + referencedFileIds);
-                    }
-                }
-            }
-
-            if( !gcCandidateSet.isEmpty() ) {
-	            LOG.debug("Cleanup removing the data files: "+gcCandidateSet);
-	            journal.removeDataFiles(gcCandidateSet);
-            }
-        }
-        
-        LOG.debug("Checkpoint done.");
-    }
-    
-    private Location checkpointProducerAudit() throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream oout = new ObjectOutputStream(baos);
-        oout.writeObject(metadata.producerSequenceIdTracker);
-        oout.flush();
-        oout.close();
-        return store(new KahaProducerAuditCommand().setAudit(new Buffer(baos.toByteArray())), true, null, null);
-    }
-
-    public HashSet<Integer> getJournalFilesBeingReplicated() {
-		return journalFilesBeingReplicated;
-	}
-
-    // /////////////////////////////////////////////////////////////////
-    // StoredDestination related implementation methods.
-    // /////////////////////////////////////////////////////////////////
-
-
-	private final HashMap<String, StoredDestination> storedDestinations = new HashMap<String, StoredDestination>();
-
-    class StoredSubscription {
-        SubscriptionInfo subscriptionInfo;
-        String lastAckId;
-        Location lastAckLocation;
-        Location cursor;
-    }
-    
-    static class MessageKeys {
-        final String messageId;
-        final Location location;
-        
-        public MessageKeys(String messageId, Location location) {
-            this.messageId=messageId;
-            this.location=location;
-        }
-        
-        @Override
-        public String toString() {
-            return "["+messageId+","+location+"]";
-        }
-    }
-    
-    static protected class MessageKeysMarshaller extends VariableMarshaller<MessageKeys> {
-        static final MessageKeysMarshaller INSTANCE = new MessageKeysMarshaller();
-        
-        public MessageKeys readPayload(DataInput dataIn) throws IOException {
-            return new MessageKeys(dataIn.readUTF(), LocationMarshaller.INSTANCE.readPayload(dataIn));
-        }
-
-        public void writePayload(MessageKeys object, DataOutput dataOut) throws IOException {
-            dataOut.writeUTF(object.messageId);
-            LocationMarshaller.INSTANCE.writePayload(object.location, dataOut);
-        }
-    }
-
-    class LastAck {
-        long lastAckedSequence;
-        byte priority;
-
-        public LastAck(LastAck source) {
-            this.lastAckedSequence = source.lastAckedSequence;
-            this.priority = source.priority;
-        }
-
-        public LastAck() {
-            this.priority = MessageOrderIndex.HI;
-        }
-
-        public LastAck(long ackLocation) {
-            this.lastAckedSequence = ackLocation;
-            this.priority = MessageOrderIndex.LO;
-        }
-
-        public LastAck(long ackLocation, byte priority) {
-            this.lastAckedSequence = ackLocation;
-            this.priority = priority;
-        }
-
-        public String toString() {
-            return "[" + lastAckedSequence + ":" + priority + "]";
-        }
-    }
-
-    protected class LastAckMarshaller implements Marshaller<LastAck> {
-        
-        public void writePayload(LastAck object, DataOutput dataOut) throws IOException {
-            dataOut.writeLong(object.lastAckedSequence);
-            dataOut.writeByte(object.priority);
-        }
-
-        public LastAck readPayload(DataInput dataIn) throws IOException {
-            LastAck lastAcked = new LastAck();
-            lastAcked.lastAckedSequence = dataIn.readLong();
-            if (metadata.version >= 3) {
-                lastAcked.priority = dataIn.readByte();
-            }
-            return lastAcked;
-        }
-
-        public int getFixedSize() {
-            return 9;
-        }
-
-        public LastAck deepCopy(LastAck source) {
-            return new LastAck(source);
-        }
-
-        public boolean isDeepCopySupported() {
-            return true;
-        }
-    }
-
-    class StoredDestination {
-        
-        MessageOrderIndex orderIndex = new MessageOrderIndex();
-        BTreeIndex<Location, Long> locationIndex;
-        BTreeIndex<String, Long> messageIdIndex;
-
-        // These bits are only set for Topics
-        BTreeIndex<String, KahaSubscriptionCommand> subscriptions;
-        BTreeIndex<String, LastAck> subscriptionAcks;
-        HashMap<String, MessageOrderCursor> subscriptionCursors;
-        BTreeIndex<Long, HashSet<String>> ackPositions;
-    }
-
-    protected class StoredDestinationMarshaller extends VariableMarshaller<StoredDestination> {
-
-        public StoredDestination readPayload(DataInput dataIn) throws IOException {
-            final StoredDestination value = new StoredDestination();
-            value.orderIndex.defaultPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, dataIn.readLong());
-            value.locationIndex = new BTreeIndex<Location, Long>(pageFile, dataIn.readLong());
-            value.messageIdIndex = new BTreeIndex<String, Long>(pageFile, dataIn.readLong());
-
-            if (dataIn.readBoolean()) {
-                value.subscriptions = new BTreeIndex<String, KahaSubscriptionCommand>(pageFile, dataIn.readLong());
-                value.subscriptionAcks = new BTreeIndex<String, LastAck>(pageFile, dataIn.readLong());
-                if (metadata.version >= 3) {
-                    value.ackPositions = new BTreeIndex<Long, HashSet<String>>(pageFile, dataIn.readLong());
-                } else {
-                    // upgrade
-                    pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                        public void execute(Transaction tx) throws IOException {
-                            value.ackPositions = new BTreeIndex<Long, HashSet<String>>(pageFile, tx.allocate());
-                            value.ackPositions.setKeyMarshaller(LongMarshaller.INSTANCE);
-                            value.ackPositions.setValueMarshaller(HashSetStringMarshaller.INSTANCE);
-                            value.ackPositions.load(tx);
-                        }
-                    });
-                }
-            }
-            if (metadata.version >= 2) {
-                value.orderIndex.lowPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, dataIn.readLong());
-                value.orderIndex.highPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, dataIn.readLong());
-            } else {
-                    // upgrade
-                    pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                        public void execute(Transaction tx) throws IOException {
-                            value.orderIndex.lowPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, tx.allocate());
-                            value.orderIndex.lowPriorityIndex.setKeyMarshaller(LongMarshaller.INSTANCE);
-                            value.orderIndex.lowPriorityIndex.setValueMarshaller(MessageKeysMarshaller.INSTANCE);
-                            value.orderIndex.lowPriorityIndex.load(tx);
-
-                            value.orderIndex.highPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, tx.allocate());
-                            value.orderIndex.highPriorityIndex.setKeyMarshaller(LongMarshaller.INSTANCE);
-                            value.orderIndex.highPriorityIndex.setValueMarshaller(MessageKeysMarshaller.INSTANCE);
-                            value.orderIndex.highPriorityIndex.load(tx);
-                        }
-                    });
-            }
-
-            return value;
-        }
-
-        public void writePayload(StoredDestination value, DataOutput dataOut) throws IOException {
-            dataOut.writeLong(value.orderIndex.defaultPriorityIndex.getPageId());
-            dataOut.writeLong(value.locationIndex.getPageId());
-            dataOut.writeLong(value.messageIdIndex.getPageId());
-            if (value.subscriptions != null) {
-                dataOut.writeBoolean(true);
-                dataOut.writeLong(value.subscriptions.getPageId());
-                dataOut.writeLong(value.subscriptionAcks.getPageId());
-                dataOut.writeLong(value.ackPositions.getPageId());
-            } else {
-                dataOut.writeBoolean(false);
-            }
-            dataOut.writeLong(value.orderIndex.lowPriorityIndex.getPageId());
-            dataOut.writeLong(value.orderIndex.highPriorityIndex.getPageId());
-        }
-    }
-
-    static class LocationMarshaller implements Marshaller<Location> {
-        final static LocationMarshaller INSTANCE = new LocationMarshaller();
-
-        public Location readPayload(DataInput dataIn) throws IOException {
-            Location rc = new Location();
-            rc.setDataFileId(dataIn.readInt());
-            rc.setOffset(dataIn.readInt());
-            return rc;
-        }
-
-        public void writePayload(Location object, DataOutput dataOut) throws IOException {
-            dataOut.writeInt(object.getDataFileId());
-            dataOut.writeInt(object.getOffset());
-        }
-
-        public int getFixedSize() {
-            return 8;
-        }
-
-        public Location deepCopy(Location source) {
-            return new Location(source);
-        }
-
-        public boolean isDeepCopySupported() {
-            return true;
-        }
-    }
-
-    static class KahaSubscriptionCommandMarshaller extends VariableMarshaller<KahaSubscriptionCommand> {
-        final static KahaSubscriptionCommandMarshaller INSTANCE = new KahaSubscriptionCommandMarshaller();
-
-        public KahaSubscriptionCommand readPayload(DataInput dataIn) throws IOException {
-            KahaSubscriptionCommand rc = new KahaSubscriptionCommand();
-            rc.mergeFramed((InputStream)dataIn);
-            return rc;
-        }
-
-        public void writePayload(KahaSubscriptionCommand object, DataOutput dataOut) throws IOException {
-            object.writeFramed((OutputStream)dataOut);
-        }
-    }
-
-    protected StoredDestination getStoredDestination(KahaDestination destination, Transaction tx) throws IOException {
-        String key = key(destination);
-        StoredDestination rc = storedDestinations.get(key);
-        if (rc == null) {
-            boolean topic = destination.getType() == KahaDestination.DestinationType.TOPIC || destination.getType() == KahaDestination.DestinationType.TEMP_TOPIC;
-            rc = loadStoredDestination(tx, key, topic);
-            // Cache it. We may want to remove/unload destinations from the
-            // cache that are not used for a while
-            // to reduce memory usage.
-            storedDestinations.put(key, rc);
-        }
-        return rc;
-    }
-
-
-    protected StoredDestination getExistingStoredDestination(KahaDestination destination, Transaction tx) throws IOException {
-        String key = key(destination);
-        StoredDestination rc = storedDestinations.get(key);
-        if (rc == null && metadata.destinations.containsKey(tx, key)) {
-            rc = getStoredDestination(destination, tx);
-        }
-        return rc;
-    }
-
-    /**
-     * @param tx
-     * @param key
-     * @param topic
-     * @return
-     * @throws IOException
-     */
-    private StoredDestination loadStoredDestination(Transaction tx, String key, boolean topic) throws IOException {
-        // Try to load the existing indexes..
-        StoredDestination rc = metadata.destinations.get(tx, key);
-        if (rc == null) {
-            // Brand new destination.. allocate indexes for it.
-            rc = new StoredDestination();
-            rc.orderIndex.allocate(tx);
-            rc.locationIndex = new BTreeIndex<Location, Long>(pageFile, tx.allocate());
-            rc.messageIdIndex = new BTreeIndex<String, Long>(pageFile, tx.allocate());
-
-            if (topic) {
-                rc.subscriptions = new BTreeIndex<String, KahaSubscriptionCommand>(pageFile, tx.allocate());
-                rc.subscriptionAcks = new BTreeIndex<String, LastAck>(pageFile, tx.allocate());
-                rc.ackPositions = new BTreeIndex<Long, HashSet<String>>(pageFile, tx.allocate());
-            }
-            metadata.destinations.put(tx, key, rc);
-        }
-
-        // Configure the marshalers and load.
-        rc.orderIndex.load(tx);
-
-        // Figure out the next key using the last entry in the destination.
-        rc.orderIndex.configureLast(tx);
-
-        rc.locationIndex.setKeyMarshaller(LocationMarshaller.INSTANCE);
-        rc.locationIndex.setValueMarshaller(LongMarshaller.INSTANCE);
-        rc.locationIndex.load(tx);
-
-        rc.messageIdIndex.setKeyMarshaller(StringMarshaller.INSTANCE);
-        rc.messageIdIndex.setValueMarshaller(LongMarshaller.INSTANCE);
-        rc.messageIdIndex.load(tx);
-        
-        // If it was a topic...
-        if (topic) {
-
-            rc.subscriptions.setKeyMarshaller(StringMarshaller.INSTANCE);
-            rc.subscriptions.setValueMarshaller(KahaSubscriptionCommandMarshaller.INSTANCE);
-            rc.subscriptions.load(tx);
-
-            rc.subscriptionAcks.setKeyMarshaller(StringMarshaller.INSTANCE);
-            rc.subscriptionAcks.setValueMarshaller(new LastAckMarshaller());
-            rc.subscriptionAcks.load(tx);
-
-            rc.ackPositions.setKeyMarshaller(LongMarshaller.INSTANCE);
-            rc.ackPositions.setValueMarshaller(HashSetStringMarshaller.INSTANCE);
-            rc.ackPositions.load(tx);
-
-            rc.subscriptionCursors = new HashMap<String, MessageOrderCursor>();
-
-            if (metadata.version < 3) {
-
-                // on upgrade need to fill ackLocation with available messages past last ack
-                for (Iterator<Entry<String, LastAck>> iterator = rc.subscriptionAcks.iterator(tx); iterator.hasNext(); ) {
-                    Entry<String, LastAck> entry = iterator.next();
-                    for (Iterator<Entry<Long, MessageKeys>> orderIterator =
-                            rc.orderIndex.iterator(tx, new MessageOrderCursor(entry.getValue().lastAckedSequence)); orderIterator.hasNext(); ) {
-                        Long sequence = orderIterator.next().getKey();
-                        addAckLocation(tx, rc, sequence, entry.getKey());
-                    }
-                    // modify so it is upgraded                   
-                    rc.subscriptionAcks.put(tx, entry.getKey(), entry.getValue());
-                }
-            }
-            
-            if (rc.orderIndex.nextMessageId == 0) {
-                // check for existing durable sub all acked out - pull next seq from acks as messages are gone
-                if (!rc.subscriptionAcks.isEmpty(tx)) {
-                    for (Iterator<Entry<String, LastAck>> iterator = rc.subscriptionAcks.iterator(tx); iterator.hasNext();) {
-                        Entry<String, LastAck> entry = iterator.next();
-                        rc.orderIndex.nextMessageId =
-                                Math.max(rc.orderIndex.nextMessageId, entry.getValue().lastAckedSequence +1);
-                    }
-                }
-            } else {
-                // update based on ackPositions for unmatched, last entry is always the next
-                if (!rc.ackPositions.isEmpty(tx)) {
-                    Entry<Long,HashSet<String>> last = rc.ackPositions.getLast(tx);
-                    rc.orderIndex.nextMessageId =
-                        Math.max(rc.orderIndex.nextMessageId, last.getKey());
-                }
-            }
-
-        }
-
-        if (metadata.version < 3) {
-            // store again after upgrade
-            metadata.destinations.put(tx, key, rc);
-        }        
-        return rc;
-    }
-
-    private void addAckLocation(Transaction tx, StoredDestination sd, Long messageSequence, String subscriptionKey) throws IOException {
-        HashSet<String> hs = sd.ackPositions.get(tx, messageSequence);
-        if (hs == null) {
-            hs = new HashSet<String>();
-        }
-        hs.add(subscriptionKey);
-        // every ack location addition needs to be a btree modification to get it stored
-        sd.ackPositions.put(tx, messageSequence, hs);
-    }
-
-    // new sub is interested in potentially all existing messages
-    private void addAckLocationForRetroactiveSub(Transaction tx, StoredDestination sd, Long messageSequence, String subscriptionKey) throws IOException {
-        for (Iterator<Entry<Long, HashSet<String>>> iterator = sd.ackPositions.iterator(tx, messageSequence); iterator.hasNext(); ) {
-            Entry<Long, HashSet<String>> entry = iterator.next();
-            entry.getValue().add(subscriptionKey);
-            sd.ackPositions.put(tx, entry.getKey(), entry.getValue());
-        }
-    }
-
-    final HashSet nextMessageIdMarker = new HashSet<String>();
-    // on a new message add, all existing subs are interested in this message
-    private void addAckLocationForNewMessage(Transaction tx, StoredDestination sd, Long messageSequence) throws IOException {
-        HashSet hs = new HashSet<String>();
-        for (Iterator<Entry<String, LastAck>> iterator = sd.subscriptionAcks.iterator(tx); iterator.hasNext();) {
-            Entry<String, LastAck> entry = iterator.next();
-            hs.add(entry.getKey());
-        }
-        sd.ackPositions.put(tx, messageSequence, hs);
-        // add empty next to keep track of nextMessage
-        sd.ackPositions.put(tx, messageSequence+1, nextMessageIdMarker);
-    }
-
-    private void removeAckLocationsForSub(Transaction tx, StoredDestination sd, String subscriptionKey) throws IOException {
-        if (!sd.ackPositions.isEmpty(tx)) {
-            Long end = sd.ackPositions.getLast(tx).getKey();
-            for (Long sequence = sd.ackPositions.getFirst(tx).getKey(); sequence <= end; sequence++) {
-                removeAckLocation(tx, sd, subscriptionKey, sequence);
-            }
-        }
-    }
-
-    /**
-     * @param tx
-     * @param sd
-     * @param subscriptionKey
-     * @param sequenceId
-     * @throws IOException
-     */
-    private void removeAckLocation(Transaction tx, StoredDestination sd, String subscriptionKey, Long sequenceId) throws IOException {
-        // Remove the sub from the previous location set..
-        if (sequenceId != null) {
-            HashSet<String> hs = sd.ackPositions.get(tx, sequenceId);
-            if (hs != null) {
-                hs.remove(subscriptionKey);
-                if (hs.isEmpty()) {
-                    HashSet<String> firstSet = sd.ackPositions.getFirst(tx).getValue();
-                    sd.ackPositions.remove(tx, sequenceId);
-
-                    // Find all the entries that need to get deleted.
-                    ArrayList<Entry<Long, MessageKeys>> deletes = new ArrayList<Entry<Long, MessageKeys>>();
-                    sd.orderIndex.getDeleteList(tx, deletes, sequenceId);
-
-                    // Do the actual deletes.
-                    for (Entry<Long, MessageKeys> entry : deletes) {
-                        sd.locationIndex.remove(tx, entry.getValue().location);
-                        sd.messageIdIndex.remove(tx, entry.getValue().messageId);
-                        sd.orderIndex.remove(tx, entry.getKey());
-                    }
-                } else {
-                    // update
-                    sd.ackPositions.put(tx, sequenceId, hs);
-                }
-            }
-        }
-    }
-
-    private String key(KahaDestination destination) {
-        return destination.getType().getNumber() + ":" + destination.getName();
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Transaction related implementation methods.
-    // /////////////////////////////////////////////////////////////////
-    protected final LinkedHashMap<TransactionId, List<Operation>> inflightTransactions = new LinkedHashMap<TransactionId, List<Operation>>();
-    protected final LinkedHashMap<TransactionId, List<Operation>> preparedTransactions = new LinkedHashMap<TransactionId, List<Operation>>();
- 
-    private List<Operation> getInflightTx(KahaTransactionInfo info, Location location) {
-        TransactionId key = key(info);
-        List<Operation> tx;
-        synchronized (inflightTransactions) {
-            tx = inflightTransactions.get(key);
-            if (tx == null) {
-                tx = Collections.synchronizedList(new ArrayList<Operation>());
-                inflightTransactions.put(key, tx);
-            }
-        }
-        return tx;
-    }
-
-    private TransactionId key(KahaTransactionInfo transactionInfo) {
-        if (transactionInfo.hasLocalTransacitonId()) {
-            KahaLocalTransactionId tx = transactionInfo.getLocalTransacitonId();
-            LocalTransactionId rc = new LocalTransactionId();
-            rc.setConnectionId(new ConnectionId(tx.getConnectionId()));
-            rc.setValue(tx.getTransacitonId());
-            return rc;
-        } else {
-            KahaXATransactionId tx = transactionInfo.getXaTransacitonId();
-            XATransactionId rc = new XATransactionId();
-            rc.setBranchQualifier(tx.getBranchQualifier().toByteArray());
-            rc.setGlobalTransactionId(tx.getGlobalTransactionId().toByteArray());
-            rc.setFormatId(tx.getFormatId());
-            return rc;
-        }
-    }
-
-    abstract class Operation {
-        final Location location;
-
-        public Operation(Location location) {
-            this.location = location;
-        }
-
-        public Location getLocation() {
-            return location;
-        }
-
-        abstract public void execute(Transaction tx) throws IOException;
-    }
-
-    class AddOpperation extends Operation {
-        final KahaAddMessageCommand command;
-
-        public AddOpperation(KahaAddMessageCommand command, Location location) {
-            super(location);
-            this.command = command;
-        }
-
-        @Override
-        public void execute(Transaction tx) throws IOException {
-            upadateIndex(tx, command, location);
-        }
-
-        public KahaAddMessageCommand getCommand() {
-            return command;
-        }
-    }
-
-    class RemoveOpperation extends Operation {
-        final KahaRemoveMessageCommand command;
-
-        public RemoveOpperation(KahaRemoveMessageCommand command, Location location) {
-            super(location);
-            this.command = command;
-        }
-
-        @Override
-        public void execute(Transaction tx) throws IOException {
-            updateIndex(tx, command, location);
-        }
-
-        public KahaRemoveMessageCommand getCommand() {
-            return command;
-        }
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Initialization related implementation methods.
-    // /////////////////////////////////////////////////////////////////
-
-    private PageFile createPageFile() {
-        PageFile index = new PageFile(directory, "db");
-        index.setEnableWriteThread(isEnableIndexWriteAsync());
-        index.setWriteBatchSize(getIndexWriteBatchSize());
-        index.setPageCacheSize(indexCacheSize);
-        return index;
-    }
-
-    private Journal createJournal() throws IOException {
-        Journal manager = new Journal();
-        manager.setDirectory(directory);
-        manager.setMaxFileLength(getJournalMaxFileLength());
-        manager.setCheckForCorruptionOnStartup(checkForCorruptJournalFiles);
-        manager.setChecksum(checksumJournalFiles || checkForCorruptJournalFiles);
-        manager.setWriteBatchSize(getJournalMaxWriteBatchSize());
-        manager.setArchiveDataLogs(isArchiveDataLogs());
-        manager.setSizeAccumulator(storeSize);
-        if (getDirectoryArchive() != null) {
-            IOHelper.mkdirs(getDirectoryArchive());
-            manager.setDirectoryArchive(getDirectoryArchive());
-        }
-        return manager;
-    }
-
-    public int getJournalMaxWriteBatchSize() {
-        return journalMaxWriteBatchSize;
-    }
-    
-    public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize) {
-        this.journalMaxWriteBatchSize = journalMaxWriteBatchSize;
-    }
-
-    public File getDirectory() {
-        return directory;
-    }
-
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-
-    public boolean isDeleteAllMessages() {
-        return deleteAllMessages;
-    }
-
-    public void setDeleteAllMessages(boolean deleteAllMessages) {
-        this.deleteAllMessages = deleteAllMessages;
-    }
-    
-    public void setIndexWriteBatchSize(int setIndexWriteBatchSize) {
-        this.setIndexWriteBatchSize = setIndexWriteBatchSize;
-    }
-
-    public int getIndexWriteBatchSize() {
-        return setIndexWriteBatchSize;
-    }
-    
-    public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync) {
-        this.enableIndexWriteAsync = enableIndexWriteAsync;
-    }
-    
-    boolean isEnableIndexWriteAsync() {
-        return enableIndexWriteAsync;
-    }
-    
-    public boolean isEnableJournalDiskSyncs() {
-        return enableJournalDiskSyncs;
-    }
-
-    public void setEnableJournalDiskSyncs(boolean syncWrites) {
-        this.enableJournalDiskSyncs = syncWrites;
-    }
-
-    public long getCheckpointInterval() {
-        return checkpointInterval;
-    }
-
-    public void setCheckpointInterval(long checkpointInterval) {
-        this.checkpointInterval = checkpointInterval;
-    }
-
-    public long getCleanupInterval() {
-        return cleanupInterval;
-    }
-
-    public void setCleanupInterval(long cleanupInterval) {
-        this.cleanupInterval = cleanupInterval;
-    }
-
-    public void setJournalMaxFileLength(int journalMaxFileLength) {
-        this.journalMaxFileLength = journalMaxFileLength;
-    }
-    
-    public int getJournalMaxFileLength() {
-        return journalMaxFileLength;
-    }
-    
-    public void setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack) {
-        this.metadata.producerSequenceIdTracker.setMaximumNumberOfProducersToTrack(maxFailoverProducersToTrack);
-    }
-    
-    public int getMaxFailoverProducersToTrack() {
-        return this.metadata.producerSequenceIdTracker.getMaximumNumberOfProducersToTrack();
-    }
-    
-    public void setFailoverProducersAuditDepth(int failoverProducersAuditDepth) {
-        this.metadata.producerSequenceIdTracker.setAuditDepth(failoverProducersAuditDepth);
-    }
-    
-    public int getFailoverProducersAuditDepth() {
-        return this.metadata.producerSequenceIdTracker.getAuditDepth();
-    }
-    
-    public PageFile getPageFile() {
-        if (pageFile == null) {
-            pageFile = createPageFile();
-        }
-		return pageFile;
-	}
-
-	public Journal getJournal() throws IOException {
-        if (journal == null) {
-            journal = createJournal();
-        }
-		return journal;
-	}
-
-    public boolean isFailIfDatabaseIsLocked() {
-        return failIfDatabaseIsLocked;
-    }
-
-    public void setFailIfDatabaseIsLocked(boolean failIfDatabaseIsLocked) {
-        this.failIfDatabaseIsLocked = failIfDatabaseIsLocked;
-    }
-
-    public boolean isIgnoreMissingJournalfiles() {
-        return ignoreMissingJournalfiles;
-    }
-    
-    public void setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles) {
-        this.ignoreMissingJournalfiles = ignoreMissingJournalfiles;
-    }
-
-    public int getIndexCacheSize() {
-        return indexCacheSize;
-    }
-
-    public void setIndexCacheSize(int indexCacheSize) {
-        this.indexCacheSize = indexCacheSize;
-    }
-
-    public boolean isCheckForCorruptJournalFiles() {
-        return checkForCorruptJournalFiles;
-    }
-
-    public void setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles) {
-        this.checkForCorruptJournalFiles = checkForCorruptJournalFiles;
-    }
-
-    public boolean isChecksumJournalFiles() {
-        return checksumJournalFiles;
-    }
-
-    public void setChecksumJournalFiles(boolean checksumJournalFiles) {
-        this.checksumJournalFiles = checksumJournalFiles;
-    }
-
-	public void setBrokerService(BrokerService brokerService) {
-		this.brokerService = brokerService;
-	}
-
-    /**
-     * @return the archiveDataLogs
-     */
-    public boolean isArchiveDataLogs() {
-        return this.archiveDataLogs;
-    }
-
-    /**
-     * @param archiveDataLogs the archiveDataLogs to set
-     */
-    public void setArchiveDataLogs(boolean archiveDataLogs) {
-        this.archiveDataLogs = archiveDataLogs;
-    }
-
-    /**
-     * @return the directoryArchive
-     */
-    public File getDirectoryArchive() {
-        return this.directoryArchive;
-    }
-
-    /**
-     * @param directoryArchive the directoryArchive to set
-     */
-    public void setDirectoryArchive(File directoryArchive) {
-        this.directoryArchive = directoryArchive;
-    }
-
-    /**
-     * @return the databaseLockedWaitDelay
-     */
-    public int getDatabaseLockedWaitDelay() {
-        return this.databaseLockedWaitDelay;
-    }
-
-    /**
-     * @param databaseLockedWaitDelay the databaseLockedWaitDelay to set
-     */
-    public void setDatabaseLockedWaitDelay(int databaseLockedWaitDelay) {
-        this.databaseLockedWaitDelay = databaseLockedWaitDelay;
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Internal conversion methods.
-    // /////////////////////////////////////////////////////////////////
-
-    KahaTransactionInfo createTransactionInfo(TransactionId txid) {
-        if (txid == null) {
-            return null;
-        }
-        KahaTransactionInfo rc = new KahaTransactionInfo();
-
-        if (txid.isLocalTransaction()) {
-            LocalTransactionId t = (LocalTransactionId) txid;
-            KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId();
-            kahaTxId.setConnectionId(t.getConnectionId().getValue());
-            kahaTxId.setTransacitonId(t.getValue());
-            rc.setLocalTransacitonId(kahaTxId);
-        } else {
-            XATransactionId t = (XATransactionId) txid;
-            KahaXATransactionId kahaTxId = new KahaXATransactionId();
-            kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier()));
-            kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId()));
-            kahaTxId.setFormatId(t.getFormatId());
-            rc.setXaTransacitonId(kahaTxId);
-        }
-        return rc;
-    }
-
-    class MessageOrderCursor{
-        long defaultCursorPosition;
-        long lowPriorityCursorPosition;
-        long highPriorityCursorPosition;
-        MessageOrderCursor(){
-        }
-        
-        MessageOrderCursor(long position){
-            this.defaultCursorPosition=position;
-            this.lowPriorityCursorPosition=position;
-            this.highPriorityCursorPosition=position;
-        }
-        
-        MessageOrderCursor(MessageOrderCursor other){
-            this.defaultCursorPosition=other.defaultCursorPosition;
-            this.lowPriorityCursorPosition=other.lowPriorityCursorPosition;
-            this.highPriorityCursorPosition=other.highPriorityCursorPosition;
-        }
-        
-        MessageOrderCursor copy() {
-            return new MessageOrderCursor(this);
-        }
-        
-        void reset() {
-            this.defaultCursorPosition=0;
-            this.highPriorityCursorPosition=0;
-            this.lowPriorityCursorPosition=0;
-        }
-        
-        void increment() {
-            if (defaultCursorPosition!=0) {
-                defaultCursorPosition++;
-            }
-            if (highPriorityCursorPosition!=0) {
-                highPriorityCursorPosition++;
-            }
-            if (lowPriorityCursorPosition!=0) {
-                lowPriorityCursorPosition++;
-            }
-        }
-
-        public String toString() {
-           return "MessageOrderCursor:[def:" + defaultCursorPosition
-                   + ", low:" + lowPriorityCursorPosition
-                   + ", high:" +  highPriorityCursorPosition + "]";
-        }
-
-        public void sync(MessageOrderCursor other) {
-            this.defaultCursorPosition=other.defaultCursorPosition;
-            this.lowPriorityCursorPosition=other.lowPriorityCursorPosition;
-            this.highPriorityCursorPosition=other.highPriorityCursorPosition;
-        }
-    }
-    
-    class MessageOrderIndex {
-        static final byte HI = 9;
-        static final byte LO = 0;
-        static final byte DEF = 4;
-
-        long nextMessageId;
-        BTreeIndex<Long, MessageKeys> defaultPriorityIndex;
-        BTreeIndex<Long, MessageKeys> lowPriorityIndex;
-        BTreeIndex<Long, MessageKeys> highPriorityIndex;
-        MessageOrderCursor cursor = new MessageOrderCursor();
-        Long lastDefaultKey;
-        Long lastHighKey;
-        Long lastLowKey;
-        byte lastGetPriority;
-
-        MessageKeys remove(Transaction tx, Long key) throws IOException {
-            MessageKeys result = defaultPriorityIndex.remove(tx, key);
-            if (result == null && highPriorityIndex!=null) {
-                result = highPriorityIndex.remove(tx, key);
-                if (result ==null && lowPriorityIndex!=null) {
-                    result = lowPriorityIndex.remove(tx, key);
-                }
-            }
-            return result;
-        }
-        
-        void load(Transaction tx) throws IOException {
-            defaultPriorityIndex.setKeyMarshaller(LongMarshaller.INSTANCE);
-            defaultPriorityIndex.setValueMarshaller(MessageKeysMarshaller.INSTANCE);
-            defaultPriorityIndex.load(tx);
-            lowPriorityIndex.setKeyMarshaller(LongMarshaller.INSTANCE);
-            lowPriorityIndex.setValueMarshaller(MessageKeysMarshaller.INSTANCE);
-            lowPriorityIndex.load(tx);
-            highPriorityIndex.setKeyMarshaller(LongMarshaller.INSTANCE);
-            highPriorityIndex.setValueMarshaller(MessageKeysMarshaller.INSTANCE);
-            highPriorityIndex.load(tx);
-        }
-        
-        void allocate(Transaction tx) throws IOException {
-            defaultPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, tx.allocate());
-            if (metadata.version >= 2) {
-                lowPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, tx.allocate());
-                highPriorityIndex = new BTreeIndex<Long, MessageKeys>(pageFile, tx.allocate());
-            }
-        }
-        
-        void configureLast(Transaction tx) throws IOException {
-            // Figure out the next key using the last entry in the destination.
-            if (highPriorityIndex != null) {
-                Entry<Long, MessageKeys> lastEntry = highPriorityIndex.getLast(tx);
-                if (lastEntry != null) {
-                    nextMessageId = lastEntry.getKey() + 1;
-                } else {
-                    lastEntry = defaultPriorityIndex.getLast(tx);
-                    if (lastEntry != null) {
-                        nextMessageId = lastEntry.getKey() + 1;
-                    } else {
-                        lastEntry = lowPriorityIndex.getLast(tx);
-                        if (lastEntry != null) {
-                            nextMessageId = lastEntry.getKey() + 1;
-                        }
-                    }
-                }
-            } else {
-                Entry<Long, MessageKeys> lastEntry = defaultPriorityIndex.getLast(tx);
-                if (lastEntry != null) {
-                    nextMessageId = lastEntry.getKey() + 1;
-                }
-            }
-        }
-        
-               
-        void remove(Transaction tx) throws IOException {
-            defaultPriorityIndex.clear(tx);
-            defaultPriorityIndex.unload(tx);
-            tx.free(defaultPriorityIndex.getPageId());
-            if (lowPriorityIndex != null) {
-                lowPriorityIndex.clear(tx);
-                lowPriorityIndex.unload(tx);
-
-                tx.free(lowPriorityIndex.getPageId());
-            }
-            if (highPriorityIndex != null) {
-                highPriorityIndex.clear(tx);
-                highPriorityIndex.unload(tx);
-                tx.free(highPriorityIndex.getPageId());
-            }
-        }
-        
-        void resetCursorPosition() {
-            this.cursor.reset();
-            lastDefaultKey = null;
-            lastHighKey = null;
-            lastLowKey = null;
-        }
-        
-        void setBatch(Transaction tx, Long sequence) throws IOException {
-            if (sequence != null) {
-                Long nextPosition = new Long(sequence.longValue() + 1);
-                if (defaultPriorityIndex.containsKey(tx, sequence)) {
-                    lastDefaultKey = sequence;
-                    cursor.defaultCursorPosition = nextPosition.longValue();
-                } else if (highPriorityIndex != null) {
-                    if (highPriorityIndex.containsKey(tx, sequence)) {
-                        lastHighKey = sequence;
-                        cursor.highPriorityCursorPosition = nextPosition.longValue();
-                    } else if (lowPriorityIndex.containsKey(tx, sequence)) {
-                        lastLowKey = sequence;
-                        cursor.lowPriorityCursorPosition = nextPosition.longValue();
-                    }
-                } else {
-                    lastDefaultKey = sequence;
-                    cursor.defaultCursorPosition = nextPosition.longValue();
-                }
-            }
-        }
-
-        void setBatch(Transaction tx, LastAck last) throws IOException {
-            setBatch(tx, last.lastAckedSequence);
-            if (cursor.defaultCursorPosition == 0
-                    && cursor.highPriorityCursorPosition == 0
-                    && cursor.lowPriorityCursorPosition == 0) {
-                long next = last.lastAckedSequence + 1;
-                switch (last.priority) {
-                    case DEF:
-                        cursor.defaultCursorPosition = next;
-                        cursor.highPriorityCursorPosition = next;
-                        break;
-                    case HI:
-                        cursor.highPriorityCursorPosition = next;
-                        break;
-                    case LO:
-                        cursor.lowPriorityCursorPosition = next;
-                        cursor.defaultCursorPosition = next;
-                        cursor.highPriorityCursorPosition = next;
-                        break;
-                }
-            }
-        }
-        
-        void stoppedIterating() {
-            if (lastDefaultKey!=null) {
-                cursor.defaultCursorPosition=lastDefaultKey.longValue()+1;
-            }
-            if (lastHighKey!=null) {
-                cursor.highPriorityCursorPosition=lastHighKey.longValue()+1;
-            }
-            if (lastLowKey!=null) {
-                cursor.lowPriorityCursorPosition=lastLowKey.longValue()+1;
-            }
-            lastDefaultKey = null;
-            lastHighKey = null;
-            lastLowKey = null;
-        }
-        
-        void getDeleteList(Transaction tx, ArrayList<Entry<Long, MessageKeys>> deletes, Long sequenceId)
-                throws IOException {
-            if (defaultPriorityIndex.containsKey(tx, sequenceId)) {
-                getDeleteList(tx, deletes, defaultPriorityIndex, sequenceId);
-            } else if (highPriorityIndex != null && highPriorityIndex.containsKey(tx, sequenceId)) {
-                getDeleteList(tx, deletes, highPriorityIndex, sequenceId);
-            } else if (lowPriorityIndex != null && lowPriorityIndex.containsKey(tx, sequenceId)) {
-                getDeleteList(tx, deletes, lowPriorityIndex, sequenceId);
-            }
-        }
-        
-        void getDeleteList(Transaction tx, ArrayList<Entry<Long, MessageKeys>> deletes,
-                BTreeIndex<Long, MessageKeys> index, Long sequenceId) throws IOException {
-
-            Iterator<Entry<Long, MessageKeys>> iterator = index.iterator(tx, sequenceId);
-            deletes.add(iterator.next());
-        }
-        
-        long getNextMessageId(int priority) {
-            return nextMessageId++;
-        }
-        
-        MessageKeys get(Transaction tx, Long key) throws IOException {
-            MessageKeys result = defaultPriorityIndex.get(tx, key);
-            if (result == null) {
-                result = highPriorityIndex.get(tx, key);
-                if (result == null) {
-                    result = lowPriorityIndex.get(tx, key);
-                    lastGetPriority = LO;
-                } else {
-                    lastGetPriority = HI;
-                }
-            } else {
-                lastGetPriority = DEF;
-            }
-            return result;
-        }
-        
-        MessageKeys put(Transaction tx, int priority, Long key, MessageKeys value) throws IOException {
-            if (priority == javax.jms.Message.DEFAULT_PRIORITY) {
-                return defaultPriorityIndex.put(tx, key, value);
-            } else if (priority > javax.jms.Message.DEFAULT_PRIORITY) {
-                return highPriorityIndex.put(tx, key, value);
-            } else {
-                return lowPriorityIndex.put(tx, key, value);
-            }
-        }
-        
-        Iterator<Entry<Long, MessageKeys>> iterator(Transaction tx) throws IOException{
-            return new MessageOrderIterator(tx,cursor);
-        }
-        
-        Iterator<Entry<Long, MessageKeys>> iterator(Transaction tx, MessageOrderCursor m) throws IOException{
-            return new MessageOrderIterator(tx,m);
-        }
-
-        public byte lastGetPriority() {
-            return lastGetPriority;
-        }
-
-        class MessageOrderIterator implements Iterator<Entry<Long, MessageKeys>>{
-            Iterator<Entry<Long, MessageKeys>>currentIterator;
-            final Iterator<Entry<Long, MessageKeys>>highIterator;
-            final Iterator<Entry<Long, MessageKeys>>defaultIterator;
-            final Iterator<Entry<Long, MessageKeys>>lowIterator;
-            
-            
-
-            MessageOrderIterator(Transaction tx, MessageOrderCursor m) throws IOException {
-                this.defaultIterator = defaultPriorityIndex.iterator(tx, m.defaultCursorPosition);
-                if (highPriorityIndex != null) {
-                    this.highIterator = highPriorityIndex.iterator(tx, m.highPriorityCursorPosition);
-                } else {
-                    this.highIterator = null;
-                }
-                if (lowPriorityIndex != null) {
-                    this.lowIterator = lowPriorityIndex.iterator(tx, m.lowPriorityCursorPosition);
-                } else {
-                    this.lowIterator = null;
-                }
-            }
-            
-            public boolean hasNext() {
-                if (currentIterator == null) {
-                    if (highIterator != null) {
-                        if (highIterator.hasNext()) {
-                            currentIterator = highIterator;
-                            return currentIterator.hasNext();
-                        }
-                        if (defaultIterator.hasNext()) {
-                            currentIterator = defaultIterator;
-                            return currentIterator.hasNext();
-                        }
-                        if (lowIterator.hasNext()) {
-                            currentIterator = lowIterator;
-                            return currentIterator.hasNext();
-                        }
-                        return false;
-                    } else {
-                        currentIterator = defaultIterator;
-                        return currentIterator.hasNext();
-                    }
-                }
-                if (highIterator != null) {
-                    if (currentIterator.hasNext()) {
-                        return true;
-                    }
-                    if (currentIterator == highIterator) {
-                        if (defaultIterator.hasNext()) {
-                            currentIterator = defaultIterator;
-                            return currentIterator.hasNext();
-                        }
-                        if (lowIterator.hasNext()) {
-                            currentIterator = lowIterator;
-                            return currentIterator.hasNext();
-                        }
-                        return false;
-                    }
-                    if (currentIterator == defaultIterator) {
-                        if (lowIterator.hasNext()) {
-                            currentIterator = lowIterator;
-                            return currentIterator.hasNext();
-                        }
-                        return false;
-                    }
-                }
-                return currentIterator.hasNext();
-            }
-
-            public Entry<Long, MessageKeys> next() {
-                Entry<Long, MessageKeys> result = currentIterator.next();
-                if (result != null) {
-                    Long key = result.getKey();
-                    if (highIterator != null) {
-                        if (currentIterator == defaultIterator) {
-                            lastDefaultKey = key;
-                        } else if (currentIterator == highIterator) {
-                            lastHighKey = key;
-                        } else {
-                            lastLowKey = key;
-                        }
-                    } else {
-                        lastDefaultKey = key;
-                    }
-                }
-                return result;
-            }
-
-            public void remove() {
-                throw new UnsupportedOperationException();
-            }
-           
-        }
-    }
-    
-    private static class HashSetStringMarshaller extends VariableMarshaller<HashSet<String>> {
-        final static HashSetStringMarshaller INSTANCE = new HashSetStringMarshaller();
-
-        public void writePayload(HashSet<String> object, DataOutput dataOut) throws IOException {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            ObjectOutputStream oout = new ObjectOutputStream(baos);
-            oout.writeObject(object);
-            oout.flush();
-            oout.close();
-            byte[] data = baos.toByteArray();
-            dataOut.writeInt(data.length);
-            dataOut.write(data);
-        }
-
-        public HashSet<String> readPayload(DataInput dataIn) throws IOException {
-            int dataLen = dataIn.readInt();
-            byte[] data = new byte[dataLen];
-            dataIn.readFully(data);
-            ByteArrayInputStream bais = new ByteArrayInputStream(data);
-            ObjectInputStream oin = new ObjectInputStream(bais);
-            try {
-                return (HashSet<String>) oin.readObject();
-            } catch (ClassNotFoundException cfe) {
-	            IOException ioe = new IOException("Failed to read HashSet<String>: " + cfe);
-	            ioe.initCause(cfe);
-	            throw ioe;
-	        }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempKahaDBStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempKahaDBStore.java
deleted file mode 100644
index c97425a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempKahaDBStore.java
+++ /dev/null
@@ -1,579 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.protobuf.Buffer;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionRecoveryListener;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.store.kahadb.data.KahaAddMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaDestination;
-import org.apache.activemq.store.kahadb.data.KahaLocation;
-import org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand;
-import org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand;
-import org.apache.activemq.store.kahadb.data.KahaDestination.DestinationType;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Transaction;
-
-public class TempKahaDBStore extends TempMessageDatabase implements PersistenceAdapter {
-
-    private final WireFormat wireFormat = new OpenWireFormat();
-
-    public void setBrokerName(String brokerName) {
-    }
-    public void setUsageManager(SystemUsage usageManager) {
-    }
-
-    public TransactionStore createTransactionStore() throws IOException {
-        return new TransactionStore(){
-            
-            public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit,Runnable postCommit) throws IOException {
-                if (preCommit != null) {
-                    preCommit.run();
-                }
-                processCommit(txid);
-                if (postCommit != null) {
-                    postCommit.run();
-                }
-            }
-            public void prepare(TransactionId txid) throws IOException {
-            	processPrepare(txid);
-            }
-            public void rollback(TransactionId txid) throws IOException {
-            	processRollback(txid);
-            }
-            public void recover(TransactionRecoveryListener listener) throws IOException {
-                for (Map.Entry<TransactionId, ArrayList<Operation>> entry : preparedTransactions.entrySet()) {
-                    XATransactionId xid = (XATransactionId)entry.getKey();
-                    ArrayList<Message> messageList = new ArrayList<Message>();
-                    ArrayList<MessageAck> ackList = new ArrayList<MessageAck>();
-                    
-                    for (Operation op : entry.getValue()) {
-                        if( op.getClass() == AddOpperation.class ) {
-                            AddOpperation addOp = (AddOpperation)op;
-                            Message msg = (Message)wireFormat.unmarshal( new DataInputStream(addOp.getCommand().getMessage().newInput()) );
-                            messageList.add(msg);
-                        } else {
-                            RemoveOpperation rmOp = (RemoveOpperation)op;
-                            MessageAck ack = (MessageAck)wireFormat.unmarshal( new DataInputStream(rmOp.getCommand().getAck().newInput()) );
-                            ackList.add(ack);
-                        }
-                    }
-                    
-                    Message[] addedMessages = new Message[messageList.size()];
-                    MessageAck[] acks = new MessageAck[ackList.size()];
-                    messageList.toArray(addedMessages);
-                    ackList.toArray(acks);
-                    listener.recover(xid, addedMessages, acks);
-                }
-            }
-            public void start() throws Exception {
-            }
-            public void stop() throws Exception {
-            }
-        };
-    }
-
-    public class KahaDBMessageStore extends AbstractMessageStore {
-        protected KahaDestination dest;
-
-        public KahaDBMessageStore(ActiveMQDestination destination) {
-            super(destination);
-            this.dest = convert( destination );
-        }
-
-        @Override
-        public ActiveMQDestination getDestination() {
-            return destination;
-        }
-
-        public void addMessage(ConnectionContext context, Message message) throws IOException {
-            KahaAddMessageCommand command = new KahaAddMessageCommand();
-            command.setDestination(dest);
-            command.setMessageId(message.getMessageId().toString());
-            processAdd(command, message.getTransactionId(), wireFormat.marshal(message));
-        }
-        
-        public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-            KahaRemoveMessageCommand command = new KahaRemoveMessageCommand();
-            command.setDestination(dest);
-            command.setMessageId(ack.getLastMessageId().toString());
-            processRemove(command, ack.getTransactionId());
-        }
-
-        public void removeAllMessages(ConnectionContext context) throws IOException {
-            KahaRemoveDestinationCommand command = new KahaRemoveDestinationCommand();
-            command.setDestination(dest);
-            process(command);
-        }
-
-        public Message getMessage(MessageId identity) throws IOException {
-            final String key = identity.toString();
-            
-            // Hopefully one day the page file supports concurrent read operations... but for now we must
-            // externally synchronize...
-            ByteSequence data;
-            synchronized(indexMutex) {
-                data = pageFile.tx().execute(new Transaction.CallableClosure<ByteSequence, IOException>(){
-                    public ByteSequence execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        Long sequence = sd.messageIdIndex.get(tx, key);
-                        if( sequence ==null ) {
-                            return null;
-                        }
-                        return sd.orderIndex.get(tx, sequence).data;
-                    }
-                });
-            }
-            if( data == null ) {
-                return null;
-            }
-            
-            Message msg = (Message)wireFormat.unmarshal( data );
-			return msg;
-        }
-        
-        public int getMessageCount() throws IOException {
-            synchronized(indexMutex) {
-                return pageFile.tx().execute(new Transaction.CallableClosure<Integer, IOException>(){
-                    public Integer execute(Transaction tx) throws IOException {
-                        // Iterate through all index entries to get a count of messages in the destination.
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        int rc=0;
-                        for (Iterator<Entry<String, Long>> iterator = sd.messageIdIndex.iterator(tx); iterator.hasNext();) {
-                            iterator.next();
-                            rc++;
-                        }
-                        return rc;
-                    }
-                });
-            }
-        }
-
-        public void recover(final MessageRecoveryListener listener) throws Exception {
-            synchronized(indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<Exception>(){
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        for (Iterator<Entry<Long, MessageRecord>> iterator = sd.orderIndex.iterator(tx); iterator.hasNext();) {
-                            Entry<Long, MessageRecord> entry = iterator.next();
-                            listener.recoverMessage( (Message) wireFormat.unmarshal(entry.getValue().data) );
-                        }
-                    }
-                });
-            }
-        }
-
-        long cursorPos=0;
-        
-        public void recoverNextMessages(final int maxReturned, final MessageRecoveryListener listener) throws Exception {
-            synchronized(indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<Exception>(){
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        Entry<Long, MessageRecord> entry=null;
-                        int counter = 0;
-                        for (Iterator<Entry<Long, MessageRecord>> iterator = sd.orderIndex.iterator(tx, cursorPos); iterator.hasNext();) {
-                            entry = iterator.next();
-                            listener.recoverMessage( (Message) wireFormat.unmarshal(entry.getValue().data ) );
-                            counter++;
-                            if( counter >= maxReturned ) {
-                                break;
-                            }
-                        }
-                        if( entry!=null ) {
-                            cursorPos = entry.getKey()+1;
-                        }
-                    }
-                });
-            }
-        }
-
-        public void resetBatching() {
-            cursorPos=0;
-        }
-
-        
-        @Override
-        public void setBatch(MessageId identity) throws IOException {
-            final String key = identity.toString();
-            
-            // Hopefully one day the page file supports concurrent read operations... but for now we must
-            // externally synchronize...
-            Long location;
-            synchronized(indexMutex) {
-                location = pageFile.tx().execute(new Transaction.CallableClosure<Long, IOException>(){
-                    public Long execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        return sd.messageIdIndex.get(tx, key);
-                    }
-                });
-            }
-            if( location!=null ) {
-                cursorPos=location+1;
-            }
-            
-        }
-
-        @Override
-        public void setMemoryUsage(MemoryUsage memoeyUSage) {
-        }
-        @Override
-        public void start() throws Exception {
-        }
-        @Override
-        public void stop() throws Exception {
-        }
-        
-    }
-        
-    class KahaDBTopicMessageStore extends KahaDBMessageStore implements TopicMessageStore {
-        public KahaDBTopicMessageStore(ActiveMQTopic destination) {
-            super(destination);
-        }
-        
-        public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                                MessageId messageId, MessageAck ack) throws IOException {
-            KahaRemoveMessageCommand command = new KahaRemoveMessageCommand();
-            command.setDestination(dest);
-            command.setSubscriptionKey(subscriptionKey(clientId, subscriptionName));
-            command.setMessageId(messageId.toString());
-            // We are not passed a transaction info.. so we can't participate in a transaction.
-            // Looks like a design issue with the TopicMessageStore interface.  Also we can't recover the original ack
-            // to pass back to the XA recover method.
-            // command.setTransactionInfo();
-            processRemove(command, null);
-        }
-
-        public void addSubsciption(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException {
-            String subscriptionKey = subscriptionKey(subscriptionInfo.getClientId(), subscriptionInfo.getSubscriptionName());
-            KahaSubscriptionCommand command = new KahaSubscriptionCommand();
-            command.setDestination(dest);
-            command.setSubscriptionKey(subscriptionKey);
-            command.setRetroactive(retroactive);
-            org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(subscriptionInfo);
-            command.setSubscriptionInfo(new Buffer(packet.getData(), packet.getOffset(), packet.getLength()));
-            process(command);
-        }
-
-        public void deleteSubscription(String clientId, String subscriptionName) throws IOException {
-            KahaSubscriptionCommand command = new KahaSubscriptionCommand();
-            command.setDestination(dest);
-            command.setSubscriptionKey(subscriptionKey(clientId, subscriptionName));
-            process(command);
-        }
-
-        public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-            
-            final ArrayList<SubscriptionInfo> subscriptions = new ArrayList<SubscriptionInfo>();
-            synchronized(indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<IOException>(){
-                    public void execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        for (Iterator<Entry<String, KahaSubscriptionCommand>> iterator = sd.subscriptions.iterator(tx); iterator.hasNext();) {
-                            Entry<String, KahaSubscriptionCommand> entry = iterator.next();
-                            SubscriptionInfo info = (SubscriptionInfo)wireFormat.unmarshal( new DataInputStream(entry.getValue().getSubscriptionInfo().newInput()) );
-                            subscriptions.add(info);
-
-                        }
-                    }
-                });
-            }
-            
-            SubscriptionInfo[]rc=new SubscriptionInfo[subscriptions.size()];
-            subscriptions.toArray(rc);
-            return rc;
-        }
-
-        public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            synchronized(indexMutex) {
-                return pageFile.tx().execute(new Transaction.CallableClosure<SubscriptionInfo, IOException>(){
-                    public SubscriptionInfo execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        KahaSubscriptionCommand command = sd.subscriptions.get(tx, subscriptionKey);
-                        if( command ==null ) {
-                            return null;
-                        }
-                        return (SubscriptionInfo)wireFormat.unmarshal( new DataInputStream(command.getSubscriptionInfo().newInput()) );
-                    }
-                });
-            }
-        }
-       
-        public int getMessageCount(String clientId, String subscriptionName) throws IOException {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            synchronized(indexMutex) {
-                return pageFile.tx().execute(new Transaction.CallableClosure<Integer, IOException>(){
-                    public Integer execute(Transaction tx) throws IOException {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        Long cursorPos = sd.subscriptionAcks.get(tx, subscriptionKey);
-                        if ( cursorPos==null ) {
-                            // The subscription might not exist.
-                            return 0;
-                        }
-                        cursorPos += 1;
-                        
-                        int counter = 0;
-                        for (Iterator<Entry<Long, MessageRecord>> iterator = sd.orderIndex.iterator(tx, cursorPos); iterator.hasNext();) {
-                            iterator.next();
-                            counter++;
-                        }
-                        return counter;
-                    }
-                });
-            }        
-        }
-
-        public void recoverSubscription(String clientId, String subscriptionName, final MessageRecoveryListener listener) throws Exception {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            synchronized(indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<Exception>(){
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        Long cursorPos = sd.subscriptionAcks.get(tx, subscriptionKey);
-                        cursorPos += 1;
-                        
-                        for (Iterator<Entry<Long, MessageRecord>> iterator = sd.orderIndex.iterator(tx, cursorPos); iterator.hasNext();) {
-                            Entry<Long, MessageRecord> entry = iterator.next();
-                            listener.recoverMessage( (Message) wireFormat.unmarshal(entry.getValue().data ) );
-                        }
-                    }
-                });
-            }
-        }
-
-        public void recoverNextMessages(String clientId, String subscriptionName, final int maxReturned, final MessageRecoveryListener listener) throws Exception {
-            final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-            synchronized(indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<Exception>(){
-                    public void execute(Transaction tx) throws Exception {
-                        StoredDestination sd = getStoredDestination(dest, tx);
-                        Long cursorPos = sd.subscriptionCursors.get(subscriptionKey);
-                        if( cursorPos == null ) {
-                            cursorPos = sd.subscriptionAcks.get(tx, subscriptionKey);
-                            cursorPos += 1;
-                        }
-                        
-                        Entry<Long, MessageRecord> entry=null;
-                        int counter = 0;
-                        for (Iterator<Entry<Long, MessageRecord>> iterator = sd.orderIndex.iterator(tx, cursorPos); iterator.hasNext();) {
-                            entry = iterator.next();
-                            listener.recoverMessage( (Message) wireFormat.unmarshal(entry.getValue().data ) );
-                            counter++;
-                            if( counter >= maxReturned ) {
-                                break;
-                            }
-                        }
-                        if( entry!=null ) {
-                            sd.subscriptionCursors.put(subscriptionKey, entry.getKey() + 1);
-                        }
-                    }
-                });
-            }
-        }
-
-        public void resetBatching(String clientId, String subscriptionName) {
-            try {
-                final String subscriptionKey = subscriptionKey(clientId, subscriptionName);
-                synchronized(indexMutex) {
-                    pageFile.tx().execute(new Transaction.Closure<IOException>(){
-                        public void execute(Transaction tx) throws IOException {
-                            StoredDestination sd = getStoredDestination(dest, tx);
-                            sd.subscriptionCursors.remove(subscriptionKey);
-                        }
-                    });
-                }
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
-    String subscriptionKey(String clientId, String subscriptionName){
-        return clientId+":"+subscriptionName;
-    }
-    
-    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        return new KahaDBMessageStore(destination);
-    }
-
-    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
-        return new KahaDBTopicMessageStore(destination);
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination.
-     * This method does not stop the message store (it might not be cached).
-     *
-     * @param destination Destination to forget
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     * This method does not stop the message store (it might not be cached).
-     *
-     * @param destination Destination to forget
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-    }
-
-    public void deleteAllMessages() throws IOException {
-    }
-    
-    
-    public Set<ActiveMQDestination> getDestinations() {
-        try {
-            final HashSet<ActiveMQDestination> rc = new HashSet<ActiveMQDestination>();
-            synchronized(indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<IOException>(){
-                    public void execute(Transaction tx) throws IOException {
-                        for (Iterator<Entry<String, StoredDestination>> iterator = destinations.iterator(tx); iterator.hasNext();) {
-                            Entry<String, StoredDestination> entry = iterator.next();
-                            rc.add(convert(entry.getKey()));
-                        }
-                    }
-                });
-            }
-            return rc;
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-    
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return 0;
-    }
-    
-    public long size() {
-        if ( !started.get() ) {
-            return 0;
-        }
-        try {
-            return pageFile.getDiskSize();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public void beginTransaction(ConnectionContext context) throws IOException {
-        throw new IOException("Not yet implemented.");
-    }
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        throw new IOException("Not yet implemented.");
-    }
-    public void rollbackTransaction(ConnectionContext context) throws IOException {
-        throw new IOException("Not yet implemented.");
-    }
-    
-    public void checkpoint(boolean sync) throws IOException {
-    }    
-
-    ///////////////////////////////////////////////////////////////////
-    // Internal conversion methods.
-    ///////////////////////////////////////////////////////////////////
-    
-
-    
-    KahaLocation convert(Location location) {
-        KahaLocation rc = new KahaLocation();
-        rc.setLogId(location.getDataFileId());
-        rc.setOffset(location.getOffset());
-        return rc;
-    }
-    
-    KahaDestination convert(ActiveMQDestination dest) {
-        KahaDestination rc = new KahaDestination();
-        rc.setName(dest.getPhysicalName());
-        switch( dest.getDestinationType() ) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            rc.setType(DestinationType.QUEUE);
-            return rc;
-        case ActiveMQDestination.TOPIC_TYPE:
-            rc.setType(DestinationType.TOPIC);
-            return rc;
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            rc.setType(DestinationType.TEMP_QUEUE);
-            return rc;
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            rc.setType(DestinationType.TEMP_TOPIC);
-            return rc;
-        default:
-            return null;
-        }
-    }
-
-    ActiveMQDestination convert(String dest) {
-        int p = dest.indexOf(":");
-        if( p<0 ) {
-            throw new IllegalArgumentException("Not in the valid destination format");
-        }
-        int type = Integer.parseInt(dest.substring(0, p));
-        String name = dest.substring(p+1);
-        
-        switch( KahaDestination.DestinationType.valueOf(type) ) {
-        case QUEUE:
-            return new ActiveMQQueue(name);
-        case TOPIC:
-            return new ActiveMQTopic(name);
-        case TEMP_QUEUE:
-            return new ActiveMQTempQueue(name);
-        case TEMP_TOPIC:
-            return new ActiveMQTempTopic(name);
-        default:    
-            throw new IllegalArgumentException("Not in the valid destination format");
-        }
-    }
-    
-    public long getLastProducerSequenceId(ProducerId id) {
-        return -1;
-    }
-        
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempMessageDatabase.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempMessageDatabase.java
deleted file mode 100644
index 0a2bc7c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/TempMessageDatabase.java
+++ /dev/null
@@ -1,692 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.TreeMap;
-import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.kahadb.data.KahaAddMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaDestination;
-import org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand;
-import org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand;
-import org.apache.activemq.util.ByteSequence;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.index.BTreeIndex;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.LongMarshaller;
-import org.apache.kahadb.util.Marshaller;
-import org.apache.kahadb.util.StringMarshaller;
-import org.apache.kahadb.util.VariableMarshaller;
-
-public class TempMessageDatabase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TempMessageDatabase.class);
-
-    public static final int CLOSED_STATE = 1;
-    public static final int OPEN_STATE = 2;
-
-    protected BTreeIndex<String, StoredDestination> destinations;
-    protected PageFile pageFile;
-
-    protected File directory;
-    
-    boolean enableIndexWriteAsync = true;
-    int setIndexWriteBatchSize = PageFile.DEFAULT_WRITE_BATCH_SIZE; 
-    
-    protected AtomicBoolean started = new AtomicBoolean();
-    protected AtomicBoolean opened = new AtomicBoolean();
-
-    public TempMessageDatabase() {
-    }
-
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-        	load();
-        }
-    }
-
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            unload();
-        }
-    }
-
-	private void loadPageFile() throws IOException {
-		synchronized (indexMutex) {
-		    final PageFile pageFile = getPageFile();
-            pageFile.load();
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    destinations = new BTreeIndex<String, StoredDestination>(pageFile, tx.allocate().getPageId());
-                    destinations.setKeyMarshaller(StringMarshaller.INSTANCE);
-                    destinations.setValueMarshaller(new StoredDestinationMarshaller());
-                    destinations.load(tx);
-                }
-            });
-            pageFile.flush();
-            storedDestinations.clear();
-        }
-	}
-	
-	/**
-	 * @throws IOException
-	 */
-	public void open() throws IOException {
-		if( opened.compareAndSet(false, true) ) {
-	        loadPageFile();
-		}
-	}
-	
-    public void load() throws IOException {
-        synchronized (indexMutex) {
-	    	open();
-            pageFile.unload();
-            pageFile.delete();
-            loadPageFile();
-        }
-    }
-
-    
-	public void close() throws IOException, InterruptedException {
-		if( opened.compareAndSet(true, false)) {
-	        synchronized (indexMutex) {
-	            pageFile.unload();
-	        }
-		}
-	}
-	
-    public void unload() throws IOException, InterruptedException {
-        synchronized (indexMutex) {
-            if( pageFile.isLoaded() ) {
-                close();
-            }
-        }
-    }
-
-    public void processAdd(final KahaAddMessageCommand command, TransactionId txid, final ByteSequence data) throws IOException {
-        if (txid!=null) {
-            synchronized (indexMutex) {
-                ArrayList<Operation> inflightTx = getInflightTx(txid);
-                inflightTx.add(new AddOpperation(command, data));
-            }
-        } else {
-            synchronized (indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        upadateIndex(tx, command, data);
-                    }
-                });
-            }
-        }
-    }
-
-    public void processRemove(final KahaRemoveMessageCommand command, TransactionId txid) throws IOException {
-        if (txid!=null) {
-            synchronized (indexMutex) {
-                ArrayList<Operation> inflightTx = getInflightTx(txid);
-                inflightTx.add(new RemoveOpperation(command));
-            }
-        } else {
-            synchronized (indexMutex) {
-                pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        updateIndex(tx, command);
-                    }
-                });
-            }
-        }
-
-    }
-
-    public void process(final KahaRemoveDestinationCommand command) throws IOException {
-        synchronized (indexMutex) {
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    updateIndex(tx, command);
-                }
-            });
-        }
-    }
-
-    public void process(final KahaSubscriptionCommand command) throws IOException {
-        synchronized (indexMutex) {
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    updateIndex(tx, command);
-                }
-            });
-        }
-    }
-
-    public void processCommit(TransactionId key) throws IOException {
-        synchronized (indexMutex) {
-            ArrayList<Operation> inflightTx = inflightTransactions.remove(key);
-            if (inflightTx == null) {
-                inflightTx = preparedTransactions.remove(key);
-            }
-            if (inflightTx == null) {
-                return;
-            }
-
-            final ArrayList<Operation> messagingTx = inflightTx;
-            pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    for (Operation op : messagingTx) {
-                        op.execute(tx);
-                    }
-                }
-            });
-        }
-    }
-
-    public void processPrepare(TransactionId key) {
-        synchronized (indexMutex) {
-            ArrayList<Operation> tx = inflightTransactions.remove(key);
-            if (tx != null) {
-                preparedTransactions.put(key, tx);
-            }
-        }
-    }
-
-    public void processRollback(TransactionId key) {
-        synchronized (indexMutex) {
-            ArrayList<Operation> tx = inflightTransactions.remove(key);
-            if (tx == null) {
-                preparedTransactions.remove(key);
-            }
-        }
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // These methods do the actual index updates.
-    // /////////////////////////////////////////////////////////////////
-
-    protected final Object indexMutex = new Object();
-	private final HashSet<Integer> journalFilesBeingReplicated = new HashSet<Integer>();
-
-    private void upadateIndex(Transaction tx, KahaAddMessageCommand command, ByteSequence data) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-
-        // Skip adding the message to the index if this is a topic and there are
-        // no subscriptions.
-        if (sd.subscriptions != null && sd.ackPositions.isEmpty()) {
-            return;
-        }
-
-        // Add the message.
-        long id = sd.nextMessageId++;
-        Long previous = sd.messageIdIndex.put(tx, command.getMessageId(), id);
-        if( previous == null ) {
-            sd.orderIndex.put(tx, id, new MessageRecord(command.getMessageId(), data));
-        } else {
-            // restore the previous value.. Looks like this was a redo of a previously
-            // added message.  We don't want to assing it a new id as the other indexes would 
-            // be wrong..
-            sd.messageIdIndex.put(tx, command.getMessageId(), previous);
-        }
-    }
-
-    private void updateIndex(Transaction tx, KahaRemoveMessageCommand command) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-        if (!command.hasSubscriptionKey()) {
-            
-            // In the queue case we just remove the message from the index..
-            Long sequenceId = sd.messageIdIndex.remove(tx, command.getMessageId());
-            if (sequenceId != null) {
-                sd.orderIndex.remove(tx, sequenceId);
-            }
-        } else {
-            // In the topic case we need remove the message once it's been acked
-            // by all the subs
-            Long sequence = sd.messageIdIndex.get(tx, command.getMessageId());
-
-            // Make sure it's a valid message id...
-            if (sequence != null) {
-                String subscriptionKey = command.getSubscriptionKey();
-                Long prev = sd.subscriptionAcks.put(tx, subscriptionKey, sequence);
-
-                // The following method handles deleting un-referenced messages.
-                removeAckByteSequence(tx, sd, subscriptionKey, prev);
-
-                // Add it to the new location set.
-                addAckByteSequence(sd, sequence, subscriptionKey);
-            }
-
-        }
-    }
-
-    private void updateIndex(Transaction tx, KahaRemoveDestinationCommand command) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-        sd.orderIndex.clear(tx);
-        sd.orderIndex.unload(tx);
-        tx.free(sd.orderIndex.getPageId());
-        
-        sd.messageIdIndex.clear(tx);
-        sd.messageIdIndex.unload(tx);
-        tx.free(sd.messageIdIndex.getPageId());
-
-        if (sd.subscriptions != null) {
-            sd.subscriptions.clear(tx);
-            sd.subscriptions.unload(tx);
-            tx.free(sd.subscriptions.getPageId());
-
-            sd.subscriptionAcks.clear(tx);
-            sd.subscriptionAcks.unload(tx);
-            tx.free(sd.subscriptionAcks.getPageId());
-        }
-
-        String key = key(command.getDestination());
-        storedDestinations.remove(key);
-        destinations.remove(tx, key);
-    }
-
-    private void updateIndex(Transaction tx, KahaSubscriptionCommand command) throws IOException {
-        StoredDestination sd = getStoredDestination(command.getDestination(), tx);
-
-        // If set then we are creating it.. otherwise we are destroying the sub
-        if (command.hasSubscriptionInfo()) {
-            String subscriptionKey = command.getSubscriptionKey();
-            sd.subscriptions.put(tx, subscriptionKey, command);
-            long ackByteSequence=-1;
-            if (!command.getRetroactive()) {
-                ackByteSequence = sd.nextMessageId-1;
-            }
-
-            sd.subscriptionAcks.put(tx, subscriptionKey, ackByteSequence);
-            addAckByteSequence(sd, ackByteSequence, subscriptionKey);
-        } else {
-            // delete the sub...
-            String subscriptionKey = command.getSubscriptionKey();
-            sd.subscriptions.remove(tx, subscriptionKey);
-            Long prev = sd.subscriptionAcks.remove(tx, subscriptionKey);
-            if( prev!=null ) {
-                removeAckByteSequence(tx, sd, subscriptionKey, prev);
-            }
-        }
-
-    }
-    
-    public HashSet<Integer> getJournalFilesBeingReplicated() {
-		return journalFilesBeingReplicated;
-	}
-
-    // /////////////////////////////////////////////////////////////////
-    // StoredDestination related implementation methods.
-    // /////////////////////////////////////////////////////////////////
-
-
-	private final HashMap<String, StoredDestination> storedDestinations = new HashMap<String, StoredDestination>();
-
-    class StoredSubscription {
-        SubscriptionInfo subscriptionInfo;
-        String lastAckId;
-        ByteSequence lastAckByteSequence;
-        ByteSequence cursor;
-    }
-    
-    static class MessageRecord {
-        final String messageId;
-        final ByteSequence data;
-        
-        public MessageRecord(String messageId, ByteSequence location) {
-            this.messageId=messageId;
-            this.data=location;
-        }
-        
-        @Override
-        public String toString() {
-            return "["+messageId+","+data+"]";
-        }
-    }
-    
-    static protected class MessageKeysMarshaller extends VariableMarshaller<MessageRecord> {
-        static final MessageKeysMarshaller INSTANCE = new MessageKeysMarshaller();
-        
-        public MessageRecord readPayload(DataInput dataIn) throws IOException {
-            return new MessageRecord(dataIn.readUTF(), ByteSequenceMarshaller.INSTANCE.readPayload(dataIn));
-        }
-
-        public void writePayload(MessageRecord object, DataOutput dataOut) throws IOException {
-            dataOut.writeUTF(object.messageId);
-            ByteSequenceMarshaller.INSTANCE.writePayload(object.data, dataOut);
-        }
-    }
-    
-    static class StoredDestination {
-        long nextMessageId;
-        BTreeIndex<Long, MessageRecord> orderIndex;
-        BTreeIndex<String, Long> messageIdIndex;
-
-        // These bits are only set for Topics
-        BTreeIndex<String, KahaSubscriptionCommand> subscriptions;
-        BTreeIndex<String, Long> subscriptionAcks;
-        HashMap<String, Long> subscriptionCursors;
-        TreeMap<Long, HashSet<String>> ackPositions;
-    }
-
-    protected class StoredDestinationMarshaller extends VariableMarshaller<StoredDestination> {
-        public Class<StoredDestination> getType() {
-            return StoredDestination.class;
-        }
-
-        public StoredDestination readPayload(DataInput dataIn) throws IOException {
-            StoredDestination value = new StoredDestination();
-            value.orderIndex = new BTreeIndex<Long, MessageRecord>(pageFile, dataIn.readLong());
-            value.messageIdIndex = new BTreeIndex<String, Long>(pageFile, dataIn.readLong());
-
-            if (dataIn.readBoolean()) {
-                value.subscriptions = new BTreeIndex<String, KahaSubscriptionCommand>(pageFile, dataIn.readLong());
-                value.subscriptionAcks = new BTreeIndex<String, Long>(pageFile, dataIn.readLong());
-            }
-            return value;
-        }
-
-        public void writePayload(StoredDestination value, DataOutput dataOut) throws IOException {
-            dataOut.writeLong(value.orderIndex.getPageId());
-            dataOut.writeLong(value.messageIdIndex.getPageId());
-            if (value.subscriptions != null) {
-                dataOut.writeBoolean(true);
-                dataOut.writeLong(value.subscriptions.getPageId());
-                dataOut.writeLong(value.subscriptionAcks.getPageId());
-            } else {
-                dataOut.writeBoolean(false);
-            }
-        }
-    }
-
-    static class ByteSequenceMarshaller extends VariableMarshaller<ByteSequence> {
-        final static ByteSequenceMarshaller INSTANCE = new ByteSequenceMarshaller();
-
-        public ByteSequence readPayload(DataInput dataIn) throws IOException {
-        	byte data[] = new byte[dataIn.readInt()];
-        	dataIn.readFully(data);
-            return new ByteSequence(data);
-        }
-
-        public void writePayload(ByteSequence object, DataOutput dataOut) throws IOException {
-            dataOut.writeInt(object.getLength());
-            dataOut.write(object.getData(), object.getOffset(), object.getLength());
-        }
-    }
-
-    static class KahaSubscriptionCommandMarshaller extends VariableMarshaller<KahaSubscriptionCommand> {
-        final static KahaSubscriptionCommandMarshaller INSTANCE = new KahaSubscriptionCommandMarshaller();
-
-        public KahaSubscriptionCommand readPayload(DataInput dataIn) throws IOException {
-            KahaSubscriptionCommand rc = new KahaSubscriptionCommand();
-            rc.mergeFramed((InputStream)dataIn);
-            return rc;
-        }
-
-        public void writePayload(KahaSubscriptionCommand object, DataOutput dataOut) throws IOException {
-            object.writeFramed((OutputStream)dataOut);
-        }
-    }
-
-    protected StoredDestination getStoredDestination(KahaDestination destination, Transaction tx) throws IOException {
-        String key = key(destination);
-        StoredDestination rc = storedDestinations.get(key);
-        if (rc == null) {
-            boolean topic = destination.getType() == KahaDestination.DestinationType.TOPIC || destination.getType() == KahaDestination.DestinationType.TEMP_TOPIC;
-            rc = loadStoredDestination(tx, key, topic);
-            // Cache it. We may want to remove/unload destinations from the
-            // cache that are not used for a while
-            // to reduce memory usage.
-            storedDestinations.put(key, rc);
-        }
-        return rc;
-    }
-
-    /**
-     * @param tx
-     * @param key
-     * @param topic
-     * @return
-     * @throws IOException
-     */
-    private StoredDestination loadStoredDestination(Transaction tx, String key, boolean topic) throws IOException {
-        // Try to load the existing indexes..
-        StoredDestination rc = destinations.get(tx, key);
-        if (rc == null) {
-            // Brand new destination.. allocate indexes for it.
-            rc = new StoredDestination();
-            rc.orderIndex = new BTreeIndex<Long, MessageRecord>(pageFile, tx.allocate());
-            rc.messageIdIndex = new BTreeIndex<String, Long>(pageFile, tx.allocate());
-
-            if (topic) {
-                rc.subscriptions = new BTreeIndex<String, KahaSubscriptionCommand>(pageFile, tx.allocate());
-                rc.subscriptionAcks = new BTreeIndex<String, Long>(pageFile, tx.allocate());
-            }
-            destinations.put(tx, key, rc);
-        }
-
-        // Configure the marshalers and load.
-        rc.orderIndex.setKeyMarshaller(LongMarshaller.INSTANCE);
-        rc.orderIndex.setValueMarshaller(MessageKeysMarshaller.INSTANCE);
-        rc.orderIndex.load(tx);
-
-        // Figure out the next key using the last entry in the destination.
-        Entry<Long, MessageRecord> lastEntry = rc.orderIndex.getLast(tx);
-        if( lastEntry!=null ) {
-            rc.nextMessageId = lastEntry.getKey()+1;
-        }
-
-        rc.messageIdIndex.setKeyMarshaller(StringMarshaller.INSTANCE);
-        rc.messageIdIndex.setValueMarshaller(LongMarshaller.INSTANCE);
-        rc.messageIdIndex.load(tx);
-        
-        // If it was a topic...
-        if (topic) {
-
-            rc.subscriptions.setKeyMarshaller(StringMarshaller.INSTANCE);
-            rc.subscriptions.setValueMarshaller(KahaSubscriptionCommandMarshaller.INSTANCE);
-            rc.subscriptions.load(tx);
-
-            rc.subscriptionAcks.setKeyMarshaller(StringMarshaller.INSTANCE);
-            rc.subscriptionAcks.setValueMarshaller(LongMarshaller.INSTANCE);
-            rc.subscriptionAcks.load(tx);
-
-            rc.ackPositions = new TreeMap<Long, HashSet<String>>();
-            rc.subscriptionCursors = new HashMap<String, Long>();
-
-            for (Iterator<Entry<String, Long>> iterator = rc.subscriptionAcks.iterator(tx); iterator.hasNext();) {
-                Entry<String, Long> entry = iterator.next();
-                addAckByteSequence(rc, entry.getValue(), entry.getKey());
-            }
-
-        }
-        return rc;
-    }
-
-    /**
-     * @param sd
-     * @param messageSequence
-     * @param subscriptionKey
-     */
-    private void addAckByteSequence(StoredDestination sd, Long messageSequence, String subscriptionKey) {
-        HashSet<String> hs = sd.ackPositions.get(messageSequence);
-        if (hs == null) {
-            hs = new HashSet<String>();
-            sd.ackPositions.put(messageSequence, hs);
-        }
-        hs.add(subscriptionKey);
-    }
-
-    /**
-     * @param tx
-     * @param sd
-     * @param subscriptionKey
-     * @param sequenceId
-     * @throws IOException
-     */
-    private void removeAckByteSequence(Transaction tx, StoredDestination sd, String subscriptionKey, Long sequenceId) throws IOException {
-        // Remove the sub from the previous location set..
-        if (sequenceId != null) {
-            HashSet<String> hs = sd.ackPositions.get(sequenceId);
-            if (hs != null) {
-                hs.remove(subscriptionKey);
-                if (hs.isEmpty()) {
-                    HashSet<String> firstSet = sd.ackPositions.values().iterator().next();
-                    sd.ackPositions.remove(sequenceId);
-
-                    // Did we just empty out the first set in the
-                    // ordered list of ack locations? Then it's time to
-                    // delete some messages.
-                    if (hs == firstSet) {
-
-                        // Find all the entries that need to get deleted.
-                        ArrayList<Entry<Long, MessageRecord>> deletes = new ArrayList<Entry<Long, MessageRecord>>();
-                        for (Iterator<Entry<Long, MessageRecord>> iterator = sd.orderIndex.iterator(tx); iterator.hasNext();) {
-                            Entry<Long, MessageRecord> entry = iterator.next();
-                            if (entry.getKey().compareTo(sequenceId) <= 0) {
-                                // We don't do the actually delete while we are
-                                // iterating the BTree since
-                                // iterating would fail.
-                                deletes.add(entry);
-                            }
-                        }
-
-                        // Do the actual deletes.
-                        for (Entry<Long, MessageRecord> entry : deletes) {
-                            sd.messageIdIndex.remove(tx,entry.getValue().messageId);
-                            sd.orderIndex.remove(tx,entry.getKey());
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    private String key(KahaDestination destination) {
-        return destination.getType().getNumber() + ":" + destination.getName();
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Transaction related implementation methods.
-    // /////////////////////////////////////////////////////////////////
-    protected final LinkedHashMap<TransactionId, ArrayList<Operation>> inflightTransactions = new LinkedHashMap<TransactionId, ArrayList<Operation>>();
-    protected final LinkedHashMap<TransactionId, ArrayList<Operation>> preparedTransactions = new LinkedHashMap<TransactionId, ArrayList<Operation>>();
- 
-    private ArrayList<Operation> getInflightTx(TransactionId key) {
-        ArrayList<Operation> tx = inflightTransactions.get(key);
-        if (tx == null) {
-            tx = new ArrayList<Operation>();
-            inflightTransactions.put(key, tx);
-        }
-        return tx;
-    }
-
-    abstract class Operation {
-        abstract public void execute(Transaction tx) throws IOException;
-    }
-
-    class AddOpperation extends Operation {
-        final KahaAddMessageCommand command;
-		private final ByteSequence data;
-
-        public AddOpperation(KahaAddMessageCommand command, ByteSequence location) {
-            this.command = command;
-			this.data = location;
-        }
-
-        public void execute(Transaction tx) throws IOException {
-            upadateIndex(tx, command, data);
-        }
-
-        public KahaAddMessageCommand getCommand() {
-            return command;
-        }
-    }
-
-    class RemoveOpperation extends Operation {
-        final KahaRemoveMessageCommand command;
-
-        public RemoveOpperation(KahaRemoveMessageCommand command) {
-            this.command = command;
-        }
-
-        public void execute(Transaction tx) throws IOException {
-            updateIndex(tx, command);
-        }
-
-        public KahaRemoveMessageCommand getCommand() {
-            return command;
-        }
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Initialization related implementation methods.
-    // /////////////////////////////////////////////////////////////////
-
-    private PageFile createPageFile() {
-        PageFile index = new PageFile(directory, "temp-db");
-        index.setEnableWriteThread(isEnableIndexWriteAsync());
-        index.setWriteBatchSize(getIndexWriteBatchSize());
-        index.setEnableDiskSyncs(false);
-        index.setEnableRecoveryFile(false);
-        return index;
-    }
-
-    public File getDirectory() {
-        return directory;
-    }
-
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-    
-    public void setIndexWriteBatchSize(int setIndexWriteBatchSize) {
-        this.setIndexWriteBatchSize = setIndexWriteBatchSize;
-    }
-
-    public int getIndexWriteBatchSize() {
-        return setIndexWriteBatchSize;
-    }
-    
-    public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync) {
-        this.enableIndexWriteAsync = enableIndexWriteAsync;
-    }
-    
-    boolean isEnableIndexWriteAsync() {
-        return enableIndexWriteAsync;
-    }
-        
-    public PageFile getPageFile() {
-        if (pageFile == null) {
-            pageFile = createPageFile();
-        }
-		return pageFile;
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/Visitor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/Visitor.java
deleted file mode 100644
index 544148a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/Visitor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.IOException;
-
-import org.apache.activemq.store.kahadb.data.KahaAddMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaCommitCommand;
-import org.apache.activemq.store.kahadb.data.KahaPrepareCommand;
-import org.apache.activemq.store.kahadb.data.KahaProducerAuditCommand;
-import org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand;
-import org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand;
-import org.apache.activemq.store.kahadb.data.KahaRollbackCommand;
-import org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand;
-import org.apache.activemq.store.kahadb.data.KahaTraceCommand;
-
-public class Visitor {
-
-    public void visit(KahaTraceCommand command) {
-    }
-
-    public void visit(KahaRollbackCommand command) throws IOException {
-    }
-
-    public void visit(KahaRemoveMessageCommand command) throws IOException {
-    }
-
-    public void visit(KahaPrepareCommand command) throws IOException {
-    }
-
-    public void visit(KahaCommitCommand command) throws IOException {
-    }
-
-    public void visit(KahaAddMessageCommand command) throws IOException {
-    }
-
-    public void visit(KahaRemoveDestinationCommand command) throws IOException {
-    }
-
-    public void visit(KahaSubscriptionCommand kahaUpdateSubscriptionCommand) throws IOException {
-    }
-    
-    public void visit(KahaProducerAuditCommand kahaProducerAuditCommand) throws IOException {
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/EntryLocation.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/EntryLocation.java
deleted file mode 100644
index 1753f6a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/EntryLocation.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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.store.kahadb.plist;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.util.VariableMarshaller;
-
-class EntryLocation {
-    static final long NOT_SET = -1;
-    private String id;
-    private Page<EntryLocation> page;
-    private long next;
-    private long prev;
-    private Location location;
-
-    static class EntryLocationMarshaller extends VariableMarshaller<EntryLocation> {
-        static final EntryLocationMarshaller INSTANCE = new EntryLocationMarshaller();
-        public EntryLocation readPayload(DataInput dataIn) throws IOException {
-            EntryLocation result = new EntryLocation();
-            result.readExternal(dataIn);
-            return result;
-        }
-
-        public void writePayload(EntryLocation value, DataOutput dataOut) throws IOException {
-            value.writeExternal(dataOut);
-        }
-    }
-    EntryLocation(Location location) {
-        this.location = location;
-
-    }
-
-    EntryLocation() {
-    }
-    
-    EntryLocation copy() {
-        EntryLocation result = new EntryLocation();
-        result.id=this.id;
-        result.location=this.location;
-        result.next=this.next;
-        result.prev=this.prev;
-        result.page=this.page;
-        return result;
-    }
-
-    void reset() {
-        this.id = "";
-        this.next = NOT_SET;
-        this.prev = NOT_SET;
-    }
-
-    public void readExternal(DataInput in) throws IOException {
-        this.id = in.readUTF();
-        this.prev = in.readLong();
-        this.next = in.readLong();
-        if (this.location == null) {
-            this.location = new Location();
-        }
-        this.location.readExternal(in);
-    }
-
-    public void writeExternal(DataOutput out) throws IOException {
-        out.writeUTF(this.id);
-        out.writeLong(this.prev);
-        out.writeLong(this.next);
-        if (this.location == null) {
-            this.location = new Location();
-        }
-        this.location.writeExternal(out);
-    }
-
-    /**
-     * @return the jobId
-     */
-    String getId() {
-        return this.id;
-    }
-
-    /**
-     * @param id
-     *            the id to set
-     */
-    void setId(String id) {
-        this.id = id;
-    }
-
-    Location getLocation() {
-        return this.location;
-    }
-
-    /**
-     * @param location
-     *            the location to set
-     */
-    void setLocation(Location location) {
-        this.location = location;
-    }
-
-    /**
-     * @return the next
-     */
-    long getNext() {
-        return this.next;
-    }
-
-    /**
-     * @param next
-     *            the next to set
-     */
-    void setNext(long next) {
-        this.next = next;
-    }
-
-    /**
-     * @return the prev
-     */
-    long getPrev() {
-        return this.prev;
-    }
-
-    /**
-     * @param prev
-     *            the prev to set
-     */
-    void setPrev(long prev) {
-        this.prev = prev;
-    }
-
-    /**
-     * @return the page
-     */
-    Page<EntryLocation> getPage() {
-        return this.page;
-    }
-
-    /**
-     * @param page
-     *            the page to set
-     */
-    void setPage(Page<EntryLocation> page) {
-        this.page = page;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PList.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PList.java
deleted file mode 100644
index 6050cf1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PList.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/**
- * 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.store.kahadb.plist;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import org.apache.activemq.store.kahadb.plist.EntryLocation.EntryLocationMarshaller;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.ByteSequence;
-
-public class PList {
-    final PListStore store;
-    private String name;
-    private long rootId = EntryLocation.NOT_SET;
-    private long lastId = EntryLocation.NOT_SET;
-    private final AtomicBoolean loaded = new AtomicBoolean();
-    private int size = 0;
-    Object indexLock;
-
-    PList(PListStore store) {
-        this.store = store;
-        this.indexLock = store.getIndexLock();
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.activemq.beanstalk.JobScheduler#getName()
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    public synchronized int size() {
-        return this.size;
-    }
-
-    public synchronized boolean isEmpty() {
-        return size == 0;
-    }
-
-    /**
-     * @return the rootId
-     */
-    public long getRootId() {
-        return this.rootId;
-    }
-
-    /**
-     * @param rootId
-     *            the rootId to set
-     */
-    public void setRootId(long rootId) {
-        this.rootId = rootId;
-    }
-
-    /**
-     * @return the lastId
-     */
-    public long getLastId() {
-        return this.lastId;
-    }
-
-    /**
-     * @param lastId
-     *            the lastId to set
-     */
-    public void setLastId(long lastId) {
-        this.lastId = lastId;
-    }
-
-    /**
-     * @return the loaded
-     */
-    public boolean isLoaded() {
-        return this.loaded.get();
-    }
-
-    void read(DataInput in) throws IOException {
-        this.rootId = in.readLong();
-        this.name = in.readUTF();
-    }
-
-    public void write(DataOutput out) throws IOException {
-        out.writeLong(this.rootId);
-        out.writeUTF(name);
-    }
-
-    public synchronized void destroy() throws IOException {
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    destroy(tx);
-                }
-            });
-        }
-    }
-
-    void destroy(Transaction tx) throws IOException {
-        // start from the first
-        EntryLocation entry = getFirst(tx);
-        while (entry != null) {
-            EntryLocation toRemove = entry.copy();
-            entry = getNext(tx, entry.getNext());
-            doRemove(tx, toRemove);
-        }
-    }
-
-    synchronized void load(Transaction tx) throws IOException {
-        if (loaded.compareAndSet(false, true)) {
-            final Page<EntryLocation> p = tx.load(this.rootId, null);
-            if (p.getType() == Page.PAGE_FREE_TYPE) {
-                // Need to initialize it..
-                EntryLocation root = createEntry(p, "root", EntryLocation.NOT_SET, EntryLocation.NOT_SET);
-
-                storeEntry(tx, root);
-                this.lastId = root.getPage().getPageId();
-            } else {
-                // find last id
-                long nextId = this.rootId;
-                while (nextId != EntryLocation.NOT_SET) {
-                    EntryLocation next = getNext(tx, nextId);
-                    if (next != null) {
-                        this.lastId = next.getPage().getPageId();
-                        nextId = next.getNext();
-                        this.size++;
-                    }
-                }
-            }
-        }
-    }
-
-    synchronized public void unload() {
-        if (loaded.compareAndSet(true, false)) {
-            this.rootId = EntryLocation.NOT_SET;
-            this.lastId = EntryLocation.NOT_SET;
-            this.size=0;
-        }
-    }
-
-    synchronized public void addLast(final String id, final ByteSequence bs) throws IOException {
-        final Location location = this.store.write(bs, false);
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    addLast(tx, id, bs, location);
-                }
-            });
-        }
-    }
-
-    private void addLast(Transaction tx, String id, ByteSequence bs, Location location) throws IOException {
-        EntryLocation entry = createEntry(tx, id, this.lastId, EntryLocation.NOT_SET);
-        entry.setLocation(location);
-        storeEntry(tx, entry);
-        this.store.incrementJournalCount(tx, location);
-
-        EntryLocation last = loadEntry(tx, this.lastId);
-        last.setNext(entry.getPage().getPageId());
-        storeEntry(tx, last);
-        this.lastId = entry.getPage().getPageId();
-        this.size++;
-    }
-
-    synchronized public void addFirst(final String id, final ByteSequence bs) throws IOException {
-        final Location location = this.store.write(bs, false);
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    addFirst(tx, id, bs, location);
-                }
-            });
-        }
-    }
-
-    private void addFirst(Transaction tx, String id, ByteSequence bs, Location location) throws IOException {
-        EntryLocation entry = createEntry(tx, id, EntryLocation.NOT_SET, EntryLocation.NOT_SET);
-        entry.setLocation(location);
-        EntryLocation oldFirst = getFirst(tx);
-        if (oldFirst != null) {
-            oldFirst.setPrev(entry.getPage().getPageId());
-            storeEntry(tx, oldFirst);
-            entry.setNext(oldFirst.getPage().getPageId());
-
-        }
-        EntryLocation root = getRoot(tx);
-        root.setNext(entry.getPage().getPageId());
-        storeEntry(tx, root);
-        storeEntry(tx, entry);
-
-        this.store.incrementJournalCount(tx, location);
-        this.size++;
-    }
-
-    synchronized public boolean remove(final String id) throws IOException {
-        final AtomicBoolean result = new AtomicBoolean();
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    result.set(remove(tx, id));
-                }
-            });
-        }
-        return result.get();
-    }
-
-    synchronized public boolean remove(final int position) throws IOException {
-        final AtomicBoolean result = new AtomicBoolean();
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    result.set(remove(tx, position));
-                }
-            });
-        }
-        return result.get();
-    }
-
-    synchronized public boolean remove(final PListEntry entry) throws IOException {
-        final AtomicBoolean result = new AtomicBoolean();
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    result.set(doRemove(tx, entry.getEntry()));
-                }
-            });
-        }
-        return result.get();
-    }
-
-    synchronized public PListEntry get(final int position) throws IOException {
-        PListEntry result = null;
-        final AtomicReference<EntryLocation> ref = new AtomicReference<EntryLocation>();
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    ref.set(get(tx, position));
-                }
-            });
-        }
-        if (ref.get() != null) {
-            ByteSequence bs = this.store.getPayload(ref.get().getLocation());
-            result = new PListEntry(ref.get(), bs);
-        }
-        return result;
-    }
-
-    synchronized public PListEntry getFirst() throws IOException {
-        PListEntry result = null;
-        final AtomicReference<EntryLocation> ref = new AtomicReference<EntryLocation>();
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    ref.set(getFirst(tx));
-                }
-            });
-            if (ref.get() != null) {
-                ByteSequence bs = this.store.getPayload(ref.get().getLocation());
-                result = new PListEntry(ref.get(), bs);
-            }
-        }
-        return result;
-    }
-
-    synchronized public PListEntry getLast() throws IOException {
-        PListEntry result = null;
-        final AtomicReference<EntryLocation> ref = new AtomicReference<EntryLocation>();
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    ref.set(getLast(tx));
-                }
-            });
-            if (ref.get() != null) {
-                ByteSequence bs = this.store.getPayload(ref.get().getLocation());
-                result = new PListEntry(ref.get(), bs);
-            }
-        }
-        return result;
-    }
-
-    synchronized public PListEntry getNext(PListEntry entry) throws IOException {
-        PListEntry result = null;
-        final long nextId = entry != null ? entry.getEntry().getNext() : this.rootId;
-        if (nextId != EntryLocation.NOT_SET) {
-            final AtomicReference<EntryLocation> ref = new AtomicReference<EntryLocation>();
-            synchronized (indexLock) {
-                this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        ref.set(getNext(tx, nextId));
-                    }
-                });
-                if (ref.get() != null) {
-                    ByteSequence bs = this.store.getPayload(ref.get().getLocation());
-                    result = new PListEntry(ref.get(), bs);
-                }
-            }
-        }
-        return result;
-    }
-
-    synchronized public PListEntry refresh(final PListEntry entry) throws IOException {
-        PListEntry result = null;
-        final AtomicReference<EntryLocation> ref = new AtomicReference<EntryLocation>();
-        synchronized (indexLock) {
-            this.store.getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    ref.set(loadEntry(tx, entry.getEntry().getPage().getPageId()));
-                }
-            });
-            if (ref.get() != null) {
-                result = new PListEntry(ref.get(), entry.getByteSequence());
-            }
-        }
-        return result;
-    }
-
-    boolean remove(Transaction tx, String id) throws IOException {
-        boolean result = false;
-        long nextId = this.rootId;
-        while (nextId != EntryLocation.NOT_SET) {
-            EntryLocation entry = getNext(tx, nextId);
-            if (entry != null) {
-                if (entry.getId().equals(id)) {
-                    result = doRemove(tx, entry);
-                    break;
-                }
-                nextId = entry.getNext();
-            } else {
-                // not found
-                break;
-            }
-        }
-        return result;
-    }
-
-    boolean remove(Transaction tx, int position) throws IOException {
-        boolean result = false;
-        long nextId = this.rootId;
-        int count = 0;
-        while (nextId != EntryLocation.NOT_SET) {
-            EntryLocation entry = getNext(tx, nextId);
-            if (entry != null) {
-                if (count == position) {
-                    result = doRemove(tx, entry);
-                    break;
-                }
-                nextId = entry.getNext();
-            } else {
-                // not found
-                break;
-            }
-            count++;
-        }
-        return result;
-    }
-
-    EntryLocation get(Transaction tx, int position) throws IOException {
-        EntryLocation result = null;
-        long nextId = this.rootId;
-        int count = -1;
-        while (nextId != EntryLocation.NOT_SET) {
-            EntryLocation entry = getNext(tx, nextId);
-            if (entry != null) {
-                if (count == position) {
-                    result = entry;
-                    break;
-                }
-                nextId = entry.getNext();
-            } else {
-                break;
-            }
-            count++;
-        }
-        return result;
-    }
-
-    EntryLocation getFirst(Transaction tx) throws IOException {
-        long offset = getRoot(tx).getNext();
-        if (offset != EntryLocation.NOT_SET) {
-            return loadEntry(tx, offset);
-        }
-        return null;
-    }
-
-    EntryLocation getLast(Transaction tx) throws IOException {
-        if (this.lastId != EntryLocation.NOT_SET) {
-            return loadEntry(tx, this.lastId);
-        }
-        return null;
-    }
-
-    private boolean doRemove(Transaction tx, EntryLocation entry) throws IOException {
-        boolean result = false;
-        if (entry != null) {
-
-            EntryLocation prev = getPrevious(tx, entry.getPrev());
-            EntryLocation next = getNext(tx, entry.getNext());
-            long prevId = prev != null ? prev.getPage().getPageId() : this.rootId;
-            long nextId = next != null ? next.getPage().getPageId() : EntryLocation.NOT_SET;
-
-            if (next != null) {
-                next.setPrev(prevId);
-                storeEntry(tx, next);
-            } else {
-                // we are deleting the last one in the list
-                this.lastId = prevId;
-            }
-            if (prev != null) {
-                prev.setNext(nextId);
-                storeEntry(tx, prev);
-            }
-
-            this.store.decrementJournalCount(tx, entry.getLocation());
-            entry.reset();
-            storeEntry(tx, entry);
-            tx.free(entry.getPage().getPageId());
-            result = true;
-            this.size--;
-        }
-        return result;
-    }
-
-    private EntryLocation createEntry(Transaction tx, String id, long previous, long next) throws IOException {
-        Page<EntryLocation> p = tx.allocate();
-        EntryLocation result = new EntryLocation();
-        result.setPage(p);
-        p.set(result);
-        result.setId(id);
-        result.setPrev(previous);
-        result.setNext(next);
-        return result;
-    }
-
-    private EntryLocation createEntry(Page<EntryLocation> p, String id, long previous, long next) throws IOException {
-        EntryLocation result = new EntryLocation();
-        result.setPage(p);
-        p.set(result);
-        result.setId(id);
-        result.setPrev(previous);
-        result.setNext(next);
-        return result;
-    }
-
-    EntryLocation loadEntry(Transaction tx, long pageId) throws IOException {
-        Page<EntryLocation> page = tx.load(pageId, EntryLocationMarshaller.INSTANCE);
-        EntryLocation entry = page.get();
-        if (entry != null) {
-            entry.setPage(page);
-        }
-        return entry;
-    }
-    
-    private void storeEntry(Transaction tx, EntryLocation entry) throws IOException {
-        tx.store(entry.getPage(), EntryLocationMarshaller.INSTANCE, true);
-    }
-
-    EntryLocation getNext(Transaction tx, long next) throws IOException {
-        EntryLocation result = null;
-        if (next != EntryLocation.NOT_SET) {
-            result = loadEntry(tx, next);
-        }
-        return result;
-    }
-
-    private EntryLocation getPrevious(Transaction tx, long previous) throws IOException {
-        EntryLocation result = null;
-        if (previous != EntryLocation.NOT_SET) {
-            result = loadEntry(tx, previous);
-        }
-        return result;
-    }
-
-    private EntryLocation getRoot(Transaction tx) throws IOException {
-        EntryLocation result = loadEntry(tx, this.rootId);
-        return result;
-    }
-
-    ByteSequence getPayload(EntryLocation entry) throws IOException {
-        return this.store.getPayload(entry.getLocation());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListEntry.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListEntry.java
deleted file mode 100644
index 34d66db..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListEntry.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.store.kahadb.plist;
-
-import org.apache.kahadb.util.ByteSequence;
-
-public class PListEntry {
-
-    private final ByteSequence byteSequence;
-    private final EntryLocation entry;
-
-    PListEntry(EntryLocation entry, ByteSequence bs) {
-        this.entry = entry;
-        this.byteSequence = bs;
-    }
-
-    /**
-     * @return the byteSequence
-     */
-    public ByteSequence getByteSequence() {
-        return this.byteSequence;
-    }
-
-    public String getId() {
-        return this.entry.getId();
-    }
-
-    /**
-     * @return the entry
-     */
-    EntryLocation getEntry() {
-        return this.entry;
-    }
-
-    public PListEntry copy() {
-        return new PListEntry(this.entry, this.byteSequence);
-    }
-
-    @Override
-    public String toString() {
-        return this.entry.getId() + "[pageId=" + this.entry.getPage().getPageId() + ",next=" + this.entry.getNext()
-                + "]";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListStore.java
deleted file mode 100644
index e89fae2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/plist/PListStore.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/**
- * 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.store.kahadb.plist;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.index.BTreeIndex;
-import org.apache.kahadb.journal.Journal;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.IntegerMarshaller;
-import org.apache.kahadb.util.LockFile;
-import org.apache.kahadb.util.StringMarshaller;
-import org.apache.kahadb.util.VariableMarshaller;
-
-/**
- * @org.apache.xbean.XBean
- */
-public class PListStore extends ServiceSupport {
-    static final Logger LOG = LoggerFactory.getLogger(PListStore.class);
-    private static final int DATABASE_LOCKED_WAIT_DELAY = 10 * 1000;
-
-    static final int CLOSED_STATE = 1;
-    static final int OPEN_STATE = 2;
-
-    private File directory;
-    PageFile pageFile;
-    private Journal journal;
-    private LockFile lockFile;
-    private boolean failIfDatabaseIsLocked;
-    private int journalMaxFileLength = Journal.DEFAULT_MAX_FILE_LENGTH;
-    private int journalMaxWriteBatchSize = Journal.DEFAULT_MAX_WRITE_BATCH_SIZE;
-    private boolean enableIndexWriteAsync = false;
-    private boolean initialized = false;
-    // private int indexWriteBatchSize = PageFile.DEFAULT_WRITE_BATCH_SIZE;
-    MetaData metaData = new MetaData(this);
-    final MetaDataMarshaller metaDataMarshaller = new MetaDataMarshaller(this);
-    Map<String, PList> persistentLists = new HashMap<String, PList>();
-    final Object indexLock = new Object();
-
-    public Object getIndexLock() {
-        return indexLock;
-    }
-
-    protected class MetaData {
-        protected MetaData(PListStore store) {
-            this.store = store;
-        }
-
-        private final PListStore store;
-        Page<MetaData> page;
-        BTreeIndex<Integer, Integer> journalRC;
-        BTreeIndex<String, PList> storedSchedulers;
-
-        void createIndexes(Transaction tx) throws IOException {
-            this.storedSchedulers = new BTreeIndex<String, PList>(pageFile, tx.allocate().getPageId());
-            this.journalRC = new BTreeIndex<Integer, Integer>(pageFile, tx.allocate().getPageId());
-        }
-
-        void load(Transaction tx) throws IOException {
-            this.storedSchedulers.setKeyMarshaller(StringMarshaller.INSTANCE);
-            this.storedSchedulers.setValueMarshaller(new JobSchedulerMarshaller(this.store));
-            this.storedSchedulers.load(tx);
-            this.journalRC.setKeyMarshaller(IntegerMarshaller.INSTANCE);
-            this.journalRC.setValueMarshaller(IntegerMarshaller.INSTANCE);
-            this.journalRC.load(tx);
-        }
-
-        void loadLists(Transaction tx, Map<String, PList> schedulers) throws IOException {
-            for (Iterator<Entry<String, PList>> i = this.storedSchedulers.iterator(tx); i.hasNext();) {
-                Entry<String, PList> entry = i.next();
-                entry.getValue().load(tx);
-                schedulers.put(entry.getKey(), entry.getValue());
-            }
-        }
-
-        public void read(DataInput is) throws IOException {
-            this.storedSchedulers = new BTreeIndex<String, PList>(pageFile, is.readLong());
-            this.storedSchedulers.setKeyMarshaller(StringMarshaller.INSTANCE);
-            this.storedSchedulers.setValueMarshaller(new JobSchedulerMarshaller(this.store));
-            this.journalRC = new BTreeIndex<Integer, Integer>(pageFile, is.readLong());
-            this.journalRC.setKeyMarshaller(IntegerMarshaller.INSTANCE);
-            this.journalRC.setValueMarshaller(IntegerMarshaller.INSTANCE);
-        }
-
-        public void write(DataOutput os) throws IOException {
-            os.writeLong(this.storedSchedulers.getPageId());
-            os.writeLong(this.journalRC.getPageId());
-
-        }
-    }
-
-    class MetaDataMarshaller extends VariableMarshaller<MetaData> {
-        private final PListStore store;
-
-        MetaDataMarshaller(PListStore store) {
-            this.store = store;
-        }
-        public MetaData readPayload(DataInput dataIn) throws IOException {
-            MetaData rc = new MetaData(this.store);
-            rc.read(dataIn);
-            return rc;
-        }
-
-        public void writePayload(MetaData object, DataOutput dataOut) throws IOException {
-            object.write(dataOut);
-        }
-    }
-
-    class ValueMarshaller extends VariableMarshaller<List<EntryLocation>> {
-        public List<EntryLocation> readPayload(DataInput dataIn) throws IOException {
-            List<EntryLocation> result = new ArrayList<EntryLocation>();
-            int size = dataIn.readInt();
-            for (int i = 0; i < size; i++) {
-                EntryLocation jobLocation = new EntryLocation();
-                jobLocation.readExternal(dataIn);
-                result.add(jobLocation);
-            }
-            return result;
-        }
-
-        public void writePayload(List<EntryLocation> value, DataOutput dataOut) throws IOException {
-            dataOut.writeInt(value.size());
-            for (EntryLocation jobLocation : value) {
-                jobLocation.writeExternal(dataOut);
-            }
-        }
-    }
-
-    class JobSchedulerMarshaller extends VariableMarshaller<PList> {
-        private final PListStore store;
-        JobSchedulerMarshaller(PListStore store) {
-            this.store = store;
-        }
-        public PList readPayload(DataInput dataIn) throws IOException {
-            PList result = new PList(this.store);
-            result.read(dataIn);
-            return result;
-        }
-
-        public void writePayload(PList js, DataOutput dataOut) throws IOException {
-            js.write(dataOut);
-        }
-    }
-
-    public File getDirectory() {
-        return directory;
-    }
-
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-
-    public long size() {
-        synchronized (this) {
-            if (!initialized) {
-                return 0;
-            }
-        }
-        try {
-            return journal.getDiskSize() + pageFile.getDiskSize();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    synchronized public PList getPList(final String name) throws Exception {
-        if (!isStarted()) {
-            throw new IllegalStateException("Not started");
-        }
-        intialize();
-        PList result = this.persistentLists.get(name);
-        if (result == null) {
-            final PList pl = new PList(this);
-            pl.setName(name);
-            getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    pl.setRootId(tx.allocate().getPageId());
-                    pl.load(tx);
-                    metaData.storedSchedulers.put(tx, name, pl);
-                }
-            });
-            result = pl;
-            this.persistentLists.put(name, pl);
-        }
-        final PList load = result;
-        getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-            public void execute(Transaction tx) throws IOException {
-                load.load(tx);
-            }
-        });
-
-        return result;
-    }
-
-    synchronized public boolean removePList(final String name) throws Exception {
-        boolean result = false;
-        final PList pl = this.persistentLists.remove(name);
-        result = pl != null;
-        if (result) {
-            getPageFile().tx().execute(new Transaction.Closure<IOException>() {
-                public void execute(Transaction tx) throws IOException {
-                    metaData.storedSchedulers.remove(tx, name);
-                    pl.destroy(tx);
-                }
-            });
-        }
-        return result;
-    }
-
-    protected synchronized void intialize() throws Exception {
-        if (isStarted()) {
-            if (this.initialized == false) {
-                this.initialized = true;
-                if (this.directory == null) {
-                    this.directory = new File(IOHelper.getDefaultDataDirectory() + File.pathSeparator + "delayedDB");
-                }
-                IOHelper.mkdirs(this.directory);
-                lock();
-                this.journal = new Journal();
-                this.journal.setDirectory(directory);
-                this.journal.setMaxFileLength(getJournalMaxFileLength());
-                this.journal.setWriteBatchSize(getJournalMaxWriteBatchSize());
-                this.journal.start();
-                this.pageFile = new PageFile(directory, "tmpDB");
-                this.pageFile.load();
-
-                this.pageFile.tx().execute(new Transaction.Closure<IOException>() {
-                    public void execute(Transaction tx) throws IOException {
-                        if (pageFile.getPageCount() == 0) {
-                            Page<MetaData> page = tx.allocate();
-                            assert page.getPageId() == 0;
-                            page.set(metaData);
-                            metaData.page = page;
-                            metaData.createIndexes(tx);
-                            tx.store(metaData.page, metaDataMarshaller, true);
-
-                        } else {
-                            Page<MetaData> page = tx.load(0, metaDataMarshaller);
-                            metaData = page.get();
-                            metaData.page = page;
-                        }
-                        metaData.load(tx);
-                        metaData.loadLists(tx, persistentLists);
-                    }
-                });
-
-                this.pageFile.flush();
-                LOG.info(this + " initialized");
-            }
-        }
-    }
-
-    @Override
-    protected synchronized void doStart() throws Exception {
-        LOG.info(this + " started");
-    }
-
-    @Override
-    protected synchronized void doStop(ServiceStopper stopper) throws Exception {
-        for (PList pl : this.persistentLists.values()) {
-            pl.unload();
-        }
-        if (this.pageFile != null) {
-            this.pageFile.unload();
-        }
-        if (this.journal != null) {
-            journal.close();
-        }
-        if (this.lockFile != null) {
-            this.lockFile.unlock();
-        }
-        this.lockFile = null;
-        this.initialized = false;
-        LOG.info(this + " stopped");
-
-    }
-
-    synchronized void incrementJournalCount(Transaction tx, Location location) throws IOException {
-        int logId = location.getDataFileId();
-        Integer val = this.metaData.journalRC.get(tx, logId);
-        int refCount = val != null ? val.intValue() + 1 : 1;
-        this.metaData.journalRC.put(tx, logId, refCount);
-
-    }
-
-    synchronized void decrementJournalCount(Transaction tx, Location location) throws IOException {
-        int logId = location.getDataFileId();
-        if (logId != Location.NOT_SET) {
-            int refCount = this.metaData.journalRC.get(tx, logId);
-            refCount--;
-            if (refCount <= 0) {
-                this.metaData.journalRC.remove(tx, logId);
-                Set<Integer> set = new HashSet<Integer>();
-                set.add(logId);
-                this.journal.removeDataFiles(set);
-            } else {
-                this.metaData.journalRC.put(tx, logId, refCount);
-            }
-        }
-    }
-
-    synchronized ByteSequence getPayload(Location location) throws IllegalStateException, IOException {
-        ByteSequence result = null;
-        result = this.journal.read(location);
-        return result;
-    }
-
-    synchronized Location write(ByteSequence payload, boolean sync) throws IllegalStateException, IOException {
-        return this.journal.write(payload, sync);
-    }
-
-    private void lock() throws IOException {
-        if (lockFile == null) {
-            File lockFileName = new File(directory, "lock");
-            lockFile = new LockFile(lockFileName, true);
-            if (failIfDatabaseIsLocked) {
-                lockFile.lock();
-            } else {
-                while (true) {
-                    try {
-                        lockFile.lock();
-                        break;
-                    } catch (IOException e) {
-                        LOG.info("Database " + lockFileName + " is locked... waiting "
-                                + (DATABASE_LOCKED_WAIT_DELAY / 1000)
-                                + " seconds for the database to be unlocked. Reason: " + e);
-                        try {
-                            Thread.sleep(DATABASE_LOCKED_WAIT_DELAY);
-                        } catch (InterruptedException e1) {
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    PageFile getPageFile() {
-        this.pageFile.isLoaded();
-        return this.pageFile;
-    }
-
-    public boolean isFailIfDatabaseIsLocked() {
-        return failIfDatabaseIsLocked;
-    }
-
-    public void setFailIfDatabaseIsLocked(boolean failIfDatabaseIsLocked) {
-        this.failIfDatabaseIsLocked = failIfDatabaseIsLocked;
-    }
-
-    public int getJournalMaxFileLength() {
-        return journalMaxFileLength;
-    }
-
-    public void setJournalMaxFileLength(int journalMaxFileLength) {
-        this.journalMaxFileLength = journalMaxFileLength;
-    }
-
-    public int getJournalMaxWriteBatchSize() {
-        return journalMaxWriteBatchSize;
-    }
-
-    public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize) {
-        this.journalMaxWriteBatchSize = journalMaxWriteBatchSize;
-    }
-
-    public boolean isEnableIndexWriteAsync() {
-        return enableIndexWriteAsync;
-    }
-
-    public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync) {
-        this.enableIndexWriteAsync = enableIndexWriteAsync;
-    }
-
-    @Override
-    public String toString() {
-        return "PListStore:" + this.directory;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java
deleted file mode 100755
index db6d0dc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.store.memory;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * An implementation of {@link org.apache.activemq.store.MessageStore} which
- * uses a
- * 
- * 
- */
-public class MemoryMessageStore extends AbstractMessageStore {
-
-    protected final Map<MessageId, Message> messageTable;
-    protected MessageId lastBatchId;
-
-    public MemoryMessageStore(ActiveMQDestination destination) {
-        this(destination, new LinkedHashMap<MessageId, Message>());
-    }
-
-    public MemoryMessageStore(ActiveMQDestination destination, Map<MessageId, Message> messageTable) {
-        super(destination);
-        this.messageTable = Collections.synchronizedMap(messageTable);
-    }
-
-    public synchronized void addMessage(ConnectionContext context, Message message) throws IOException {
-        synchronized (messageTable) {
-            messageTable.put(message.getMessageId(), message);
-        }
-        message.incrementReferenceCount();
-    }
-
-    // public void addMessageReference(ConnectionContext context,MessageId
-    // messageId,long expirationTime,String messageRef)
-    // throws IOException{
-    // synchronized(messageTable){
-    // messageTable.put(messageId,messageRef);
-    // }
-    // }
-
-    public Message getMessage(MessageId identity) throws IOException {
-        return messageTable.get(identity);
-    }
-
-    // public String getMessageReference(MessageId identity) throws IOException{
-    // return (String)messageTable.get(identity);
-    // }
-
-    public void removeMessage(ConnectionContext context, MessageAck ack) throws IOException {
-        removeMessage(ack.getLastMessageId());
-    }
-
-    public void removeMessage(MessageId msgId) throws IOException {
-        synchronized (messageTable) {
-            Message removed = messageTable.remove(msgId);
-            if( removed !=null ) {
-                removed.decrementReferenceCount();
-            }
-            if ((lastBatchId != null && lastBatchId.equals(msgId)) || messageTable.isEmpty()) {
-                lastBatchId = null;
-            }
-        }
-    }
-
-    public void recover(MessageRecoveryListener listener) throws Exception {
-        // the message table is a synchronizedMap - so just have to synchronize
-        // here
-        synchronized (messageTable) {
-            for (Iterator<Message> iter = messageTable.values().iterator(); iter.hasNext();) {
-                Object msg = iter.next();
-                if (msg.getClass() == MessageId.class) {
-                    listener.recoverMessageReference((MessageId)msg);
-                } else {
-                    listener.recoverMessage((Message)msg);
-                }
-            }
-        }
-    }
-
-    public void removeAllMessages(ConnectionContext context) throws IOException {
-        synchronized (messageTable) {
-            messageTable.clear();
-        }
-    }
-
-    public void delete() {
-        synchronized (messageTable) {
-            messageTable.clear();
-        }
-    }
-
-    
-    public int getMessageCount() {
-        return messageTable.size();
-    }
-
-    public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception {
-        synchronized (messageTable) {
-            boolean pastLackBatch = lastBatchId == null;
-            int count = 0;
-            for (Iterator iter = messageTable.entrySet().iterator(); iter.hasNext();) {
-                Map.Entry entry = (Entry)iter.next();
-                if (pastLackBatch) {
-                    count++;
-                    Object msg = entry.getValue();
-                    lastBatchId = (MessageId)entry.getKey();
-                    if (msg.getClass() == MessageId.class) {
-                        listener.recoverMessageReference((MessageId)msg);
-                    } else {
-                        listener.recoverMessage((Message)msg);
-                    }
-                } else {
-                    pastLackBatch = entry.getKey().equals(lastBatchId);
-                }
-            }
-        }
-    }
-
-    public void resetBatching() {
-        lastBatchId = null;
-    }
-
-    @Override
-    public void setBatch(MessageId messageId) {
-        lastBatchId = messageId;
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
deleted file mode 100755
index 87e6985..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * 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.store.memory;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.ProxyMessageStore;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionStore;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @org.apache.xbean.XBean
- * 
- */
-public class MemoryPersistenceAdapter implements PersistenceAdapter {
-    private static final Logger LOG = LoggerFactory.getLogger(MemoryPersistenceAdapter.class);
-
-    MemoryTransactionStore transactionStore;
-    ConcurrentHashMap<ActiveMQDestination, TopicMessageStore> topics = new ConcurrentHashMap<ActiveMQDestination, TopicMessageStore>();
-    ConcurrentHashMap<ActiveMQDestination, MessageStore> queues = new ConcurrentHashMap<ActiveMQDestination, MessageStore>();
-    private boolean useExternalMessageReferences;
-
-    public Set<ActiveMQDestination> getDestinations() {
-        Set<ActiveMQDestination> rc = new HashSet<ActiveMQDestination>(queues.size() + topics.size());
-        for (Iterator<ActiveMQDestination> iter = queues.keySet().iterator(); iter.hasNext();) {
-            rc.add(iter.next());
-        }
-        for (Iterator<ActiveMQDestination> iter = topics.keySet().iterator(); iter.hasNext();) {
-            rc.add(iter.next());
-        }
-        return rc;
-    }
-
-    public static MemoryPersistenceAdapter newInstance(File file) {
-        return new MemoryPersistenceAdapter();
-    }
-
-    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
-        MessageStore rc = queues.get(destination);
-        if (rc == null) {
-            rc = new MemoryMessageStore(destination);
-            if (transactionStore != null) {
-                rc = transactionStore.proxy(rc);
-            }
-            queues.put(destination, rc);
-        }
-        return rc;
-    }
-
-    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
-        TopicMessageStore rc = topics.get(destination);
-        if (rc == null) {
-            rc = new MemoryTopicMessageStore(destination);
-            if (transactionStore != null) {
-                rc = transactionStore.proxy(rc);
-            }
-            topics.put(destination, rc);
-        }
-        return rc;
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination Destination to forget
-     */
-    public void removeQueueMessageStore(ActiveMQQueue destination) {
-        queues.remove(destination);
-    }
-
-    /**
-     * Cleanup method to remove any state associated with the given destination
-     *
-     * @param destination Destination to forget
-     */
-    public void removeTopicMessageStore(ActiveMQTopic destination) {
-        topics.remove(destination);
-    }
-
-    public TransactionStore createTransactionStore() throws IOException {
-        if (transactionStore == null) {
-            transactionStore = new MemoryTransactionStore(this);
-        }
-        return transactionStore;
-    }
-
-    public void beginTransaction(ConnectionContext context) {
-    }
-
-    public void commitTransaction(ConnectionContext context) {
-    }
-
-    public void rollbackTransaction(ConnectionContext context) {
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public long getLastMessageBrokerSequenceId() throws IOException {
-        return 0;
-    }
-
-    public void deleteAllMessages() throws IOException {
-        for (Iterator<TopicMessageStore> iter = topics.values().iterator(); iter.hasNext();) {
-            MemoryMessageStore store = asMemoryMessageStore(iter.next());
-            if (store != null) {
-                store.delete();
-            }
-        }
-        for (Iterator<MessageStore> iter = queues.values().iterator(); iter.hasNext();) {
-            MemoryMessageStore store = asMemoryMessageStore(iter.next());
-            if (store != null) {
-                store.delete();
-            }
-        }
-
-        if (transactionStore != null) {
-            transactionStore.delete();
-        }
-    }
-
-    public boolean isUseExternalMessageReferences() {
-        return useExternalMessageReferences;
-    }
-
-    public void setUseExternalMessageReferences(boolean useExternalMessageReferences) {
-        this.useExternalMessageReferences = useExternalMessageReferences;
-    }
-
-    protected MemoryMessageStore asMemoryMessageStore(Object value) {
-        if (value instanceof MemoryMessageStore) {
-            return (MemoryMessageStore)value;
-        }
-        if (value instanceof ProxyMessageStore) {
-            MessageStore delegate = ((ProxyMessageStore)value).getDelegate();
-            if (delegate instanceof MemoryMessageStore) {
-                return (MemoryMessageStore) delegate;
-            }
-        }
-        LOG.warn("Expected an instance of MemoryMessageStore but was: " + value);
-        return null;
-    }
-
-    /**
-     * @param usageManager The UsageManager that is controlling the broker's
-     *                memory usage.
-     */
-    public void setUsageManager(SystemUsage usageManager) {
-    }
-
-    public String toString() {
-        return "MemoryPersistenceAdapter";
-    }
-
-    public void setBrokerName(String brokerName) {
-    }
-
-    public void setDirectory(File dir) {
-    }
-
-    public void checkpoint(boolean sync) throws IOException {
-    }
-    
-    public long size(){
-        return 0;
-    }
-    
-    public void setCreateTransactionStore(boolean create) throws IOException {
-        if (create) {
-            createTransactionStore();
-        }
-    }
-
-    public long getLastProducerSequenceId(ProducerId id) {
-        // memory map does duplicate suppression
-        return -1;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicMessageStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicMessageStore.java
deleted file mode 100755
index 023d9eb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicMessageStore.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * 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.store.memory;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.store.MessageRecoveryListener;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.util.LRUCache;
-import org.apache.activemq.util.SubscriptionKey;
-
-/**
- * 
- */
-public class MemoryTopicMessageStore extends MemoryMessageStore implements TopicMessageStore {
-
-    private Map<SubscriptionKey, SubscriptionInfo> subscriberDatabase;
-    private Map<SubscriptionKey, MemoryTopicSub> topicSubMap;
-
-    public MemoryTopicMessageStore(ActiveMQDestination destination) {
-        this(destination, new LRUCache<MessageId, Message>(100, 100, 0.75f, false), makeSubscriptionInfoMap());
-    }
-
-    public MemoryTopicMessageStore(ActiveMQDestination destination, Map<MessageId, Message> messageTable, Map<SubscriptionKey, SubscriptionInfo> subscriberDatabase) {
-        super(destination, messageTable);
-        this.subscriberDatabase = subscriberDatabase;
-        this.topicSubMap = makeSubMap();
-    }
-
-    protected static Map<SubscriptionKey, SubscriptionInfo> makeSubscriptionInfoMap() {
-        return Collections.synchronizedMap(new HashMap<SubscriptionKey, SubscriptionInfo>());
-    }
-    
-    protected static Map<SubscriptionKey, MemoryTopicSub> makeSubMap() {
-        return Collections.synchronizedMap(new HashMap<SubscriptionKey, MemoryTopicSub>());
-    }
-
-    public synchronized void addMessage(ConnectionContext context, Message message) throws IOException {
-        super.addMessage(context, message);
-        for (Iterator<MemoryTopicSub> i = topicSubMap.values().iterator(); i.hasNext();) {
-            MemoryTopicSub sub = i.next();
-            sub.addMessage(message.getMessageId(), message);
-        }
-    }
-
-    public synchronized void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                                         MessageId messageId, MessageAck ack) throws IOException {
-        SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName);
-        MemoryTopicSub sub = topicSubMap.get(key);
-        if (sub != null) {
-            sub.removeMessage(messageId);
-        }
-    }
-
-    public synchronized SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
-        return subscriberDatabase.get(new SubscriptionKey(clientId, subscriptionName));
-    }
-
-    public synchronized void addSubsciption(SubscriptionInfo info, boolean retroactive) throws IOException {
-        SubscriptionKey key = new SubscriptionKey(info);
-        MemoryTopicSub sub = new MemoryTopicSub();
-        topicSubMap.put(key, sub);
-        if (retroactive) {
-            for (Iterator i = messageTable.entrySet().iterator(); i.hasNext();) {
-                Map.Entry entry = (Entry)i.next();
-                sub.addMessage((MessageId)entry.getKey(), (Message)entry.getValue());
-            }
-        }
-        subscriberDatabase.put(key, info);
-    }
-
-    public synchronized void deleteSubscription(String clientId, String subscriptionName) {
-        org.apache.activemq.util.SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName);
-        subscriberDatabase.remove(key);
-        topicSubMap.remove(key);
-    }
-
-    public synchronized void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception {
-        MemoryTopicSub sub = topicSubMap.get(new SubscriptionKey(clientId, subscriptionName));
-        if (sub != null) {
-            sub.recoverSubscription(listener);
-        }
-    }
-
-    public synchronized void delete() {
-        super.delete();
-        subscriberDatabase.clear();
-        topicSubMap.clear();
-    }
-
-    public SubscriptionInfo[] getAllSubscriptions() throws IOException {
-        return subscriberDatabase.values().toArray(new SubscriptionInfo[subscriberDatabase.size()]);
-    }
-
-    public synchronized int getMessageCount(String clientId, String subscriberName) throws IOException {
-        int result = 0;
-        MemoryTopicSub sub = topicSubMap.get(new SubscriptionKey(clientId, subscriberName));
-        if (sub != null) {
-            result = sub.size();
-        }
-        return result;
-    }
-
-    public synchronized void recoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener) throws Exception {
-        MemoryTopicSub sub = this.topicSubMap.get(new SubscriptionKey(clientId, subscriptionName));
-        if (sub != null) {
-            sub.recoverNextMessages(maxReturned, listener);
-        }
-    }
-
-    public void resetBatching(String clientId, String subscriptionName) {
-        MemoryTopicSub sub = topicSubMap.get(new SubscriptionKey(clientId, subscriptionName));
-        if (sub != null) {
-            sub.resetBatching();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicSub.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicSub.java
deleted file mode 100755
index ec3807e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicSub.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.store.memory;
-
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.MessageRecoveryListener;
-
-/**
- * A holder for a durable subscriber
- * 
- * 
- */
-class MemoryTopicSub {
-
-    private Map<MessageId, Message> map = new LinkedHashMap<MessageId, Message>();
-    private MessageId lastBatch;
-
-    void addMessage(MessageId id, Message message) {
-        synchronized(this) {
-            map.put(id, message);
-        }
-        message.incrementReferenceCount();
-    }
-
-    void removeMessage(MessageId id) {
-        Message removed;
-        synchronized(this) {
-            removed = map.remove(id);
-            if ((lastBatch != null && lastBatch.equals(id)) || map.isEmpty()) {
-                resetBatching();
-            }
-        }
-        if( removed!=null ) {
-            removed.decrementReferenceCount();
-        }
-    }
-
-    synchronized int size() {
-        return map.size();
-    }
-
-    synchronized void recoverSubscription(MessageRecoveryListener listener) throws Exception {
-        for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Entry)iter.next();
-            Object msg = entry.getValue();
-            if (msg.getClass() == MessageId.class) {
-                listener.recoverMessageReference((MessageId)msg);
-            } else {
-                listener.recoverMessage((Message)msg);
-            }
-        }
-    }
-
-    synchronized void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception {
-        boolean pastLackBatch = lastBatch == null;
-        MessageId lastId = null;
-        // the message table is a synchronizedMap - so just have to synchronize
-        // here
-        int count = 0;
-        for (Iterator iter = map.entrySet().iterator(); iter.hasNext() && count < maxReturned;) {
-            Map.Entry entry = (Entry)iter.next();
-            if (pastLackBatch) {
-                count++;
-                Object msg = entry.getValue();
-                lastId = (MessageId)entry.getKey();
-                if (msg.getClass() == MessageId.class) {
-                    listener.recoverMessageReference((MessageId)msg);
-                } else {
-                    listener.recoverMessage((Message)msg);
-                }
-            } else {
-                pastLackBatch = entry.getKey().equals(lastBatch);
-            }
-        }
-        if (lastId != null) {
-            lastBatch = lastId;
-        }
-
-    }
-
-    synchronized void resetBatching() {
-        lastBatch = null;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java b/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java
deleted file mode 100755
index 5a1d01f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/**
- * 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.store.memory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Future;
-import javax.transaction.xa.XAException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.store.AbstractMessageStore;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.ProxyMessageStore;
-import org.apache.activemq.store.ProxyTopicMessageStore;
-import org.apache.activemq.store.TopicMessageStore;
-import org.apache.activemq.store.TransactionRecoveryListener;
-import org.apache.activemq.store.TransactionStore;
-
-/**
- * Provides a TransactionStore implementation that can create transaction aware
- * MessageStore objects from non transaction aware MessageStore objects.
- * 
- * 
- */
-public class MemoryTransactionStore implements TransactionStore {
-
-    ConcurrentHashMap<Object, Tx> inflightTransactions = new ConcurrentHashMap<Object, Tx>();
-    ConcurrentHashMap<TransactionId, Tx> preparedTransactions = new ConcurrentHashMap<TransactionId, Tx>();
-    final PersistenceAdapter persistenceAdapter;
-
-    private boolean doingRecover;
-
-    public class Tx {
-        private final ArrayList<AddMessageCommand> messages = new ArrayList<AddMessageCommand>();
-
-        private final ArrayList<RemoveMessageCommand> acks = new ArrayList<RemoveMessageCommand>();
-
-        public void add(AddMessageCommand msg) {
-            messages.add(msg);
-        }
-
-        public void add(RemoveMessageCommand ack) {
-            acks.add(ack);
-        }
-
-        public Message[] getMessages() {
-            Message rc[] = new Message[messages.size()];
-            int count = 0;
-            for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) {
-                AddMessageCommand cmd = iter.next();
-                rc[count++] = cmd.getMessage();
-            }
-            return rc;
-        }
-
-        public MessageAck[] getAcks() {
-            MessageAck rc[] = new MessageAck[acks.size()];
-            int count = 0;
-            for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) {
-                RemoveMessageCommand cmd = iter.next();
-                rc[count++] = cmd.getMessageAck();
-            }
-            return rc;
-        }
-
-        /**
-         * @throws IOException
-         */
-        public void commit() throws IOException {
-            ConnectionContext ctx = new ConnectionContext();
-            persistenceAdapter.beginTransaction(ctx);
-            try {
-                
-                // Do all the message adds.
-                for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) {
-                    AddMessageCommand cmd = iter.next();
-                    cmd.run(ctx);
-                }
-                // And removes..
-                for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) {
-                    RemoveMessageCommand cmd = iter.next();
-                    cmd.run(ctx);
-                }
-                
-            } catch ( IOException e ) {
-                persistenceAdapter.rollbackTransaction(ctx);
-                throw e;
-            }
-            persistenceAdapter.commitTransaction(ctx);
-        }
-    }
-    
-    public interface AddMessageCommand {
-        Message getMessage();
-
-        void run(ConnectionContext context) throws IOException;
-    }
-
-    public interface RemoveMessageCommand {
-        MessageAck getMessageAck();
-
-        void run(ConnectionContext context) throws IOException;
-    }
-    
-    public MemoryTransactionStore(PersistenceAdapter persistenceAdapter) {
-        this.persistenceAdapter=persistenceAdapter;
-    }
-
-    public MessageStore proxy(MessageStore messageStore) {
-        return new ProxyMessageStore(messageStore) {
-            @Override
-            public void addMessage(ConnectionContext context, final Message send) throws IOException {
-                MemoryTransactionStore.this.addMessage(getDelegate(), send);
-            }
-
-            @Override
-            public Future<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException {
-                MemoryTransactionStore.this.addMessage(getDelegate(), message);
-                return AbstractMessageStore.FUTURE;
-             }
-             
-            @Override
-            public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException {
-                MemoryTransactionStore.this.removeMessage(getDelegate(), ack);
-            }
-             
-            @Override
-            public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-                MemoryTransactionStore.this.removeMessage(getDelegate(), ack);       
-            }
-        };
-    }
-
-    public TopicMessageStore proxy(TopicMessageStore messageStore) {
-        return new ProxyTopicMessageStore(messageStore) {
-            @Override
-            public void addMessage(ConnectionContext context, final Message send) throws IOException {
-                MemoryTransactionStore.this.addMessage(getDelegate(), send);
-            }
-
-            @Override
-            public Future<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException {
-                MemoryTransactionStore.this.addMessage(getDelegate(), message);
-                return AbstractMessageStore.FUTURE;
-             }
-
-            @Override
-            public void removeMessage(ConnectionContext context, final MessageAck ack) throws IOException {
-                MemoryTransactionStore.this.removeMessage(getDelegate(), ack);
-            }
-            
-            @Override
-            public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException {
-                MemoryTransactionStore.this.removeMessage(getDelegate(), ack);       
-            }
-
-            @Override
-            public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
-                            MessageId messageId, MessageAck ack) throws IOException {
-                MemoryTransactionStore.this.acknowledge((TopicMessageStore)getDelegate(), clientId,
-                        subscriptionName, messageId, ack);
-            }
-        };
-    }
-
-    /**
-     * @see org.apache.activemq.store.TransactionStore#prepare(TransactionId)
-     */
-    public void prepare(TransactionId txid) {
-        Tx tx = inflightTransactions.remove(txid);
-        if (tx == null) {
-            return;
-        }
-        preparedTransactions.put(txid, tx);
-    }
-
-    public Tx getTx(Object txid) {
-        Tx tx = inflightTransactions.get(txid);
-        if (tx == null) {
-            tx = new Tx();
-            inflightTransactions.put(txid, tx);
-        }
-        return tx;
-    }
-
-    public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit,Runnable postCommit) throws IOException {
-        if (preCommit != null) {
-            preCommit.run();
-        }
-        Tx tx;
-        if (wasPrepared) {
-            tx = preparedTransactions.remove(txid);
-        } else {
-            tx = inflightTransactions.remove(txid);
-        }
-
-        if (tx == null) {
-            if (postCommit != null) {
-                postCommit.run();
-            }
-            return;
-        }
-        // ensure message order w.r.t to cursor and store for setBatch()
-        synchronized (this) {
-            tx.commit();
-            if (postCommit != null) {
-                postCommit.run();
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.store.TransactionStore#rollback(TransactionId)
-     */
-    public void rollback(TransactionId txid) {
-        preparedTransactions.remove(txid);
-        inflightTransactions.remove(txid);
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
-        // All the inflight transactions get rolled back..
-        inflightTransactions.clear();
-        this.doingRecover = true;
-        try {
-            for (Iterator<TransactionId> iter = preparedTransactions.keySet().iterator(); iter.hasNext();) {
-                Object txid = iter.next();
-                Tx tx = preparedTransactions.get(txid);
-                listener.recover((XATransactionId)txid, tx.getMessages(), tx.getAcks());
-            }
-        } finally {
-            this.doingRecover = false;
-        }
-    }
-
-    /**
-     * @param message
-     * @throws IOException
-     */
-    void addMessage(final MessageStore destination, final Message message) throws IOException {
-
-        if (doingRecover) {
-            return;
-        }
-
-        if (message.getTransactionId() != null) {
-            Tx tx = getTx(message.getTransactionId());
-            tx.add(new AddMessageCommand() {
-                public Message getMessage() {
-                    return message;
-                }
-
-                public void run(ConnectionContext ctx) throws IOException {
-                    destination.addMessage(ctx, message);
-                }
-
-            });
-        } else {
-            destination.addMessage(null, message);
-        }
-    }
-    
-    /**
-     * @param ack
-     * @throws IOException
-     */
-    final void removeMessage(final MessageStore destination, final MessageAck ack) throws IOException {
-        if (doingRecover) {
-            return;
-        }
-
-        if (ack.isInTransaction()) {
-            Tx tx = getTx(ack.getTransactionId());
-            tx.add(new RemoveMessageCommand() {
-                public MessageAck getMessageAck() {
-                    return ack;
-                }
-
-                public void run(ConnectionContext ctx) throws IOException {
-                    destination.removeMessage(ctx, ack);
-                }
-            });
-        } else {
-            destination.removeMessage(null, ack);
-        }
-    }
-
-    final void acknowledge(final TopicMessageStore destination, final String clientId, final String subscriptionName,
-                           final MessageId messageId, final MessageAck ack) throws IOException {
-        if (doingRecover) {
-            return;
-        }
-
-        if (ack.isInTransaction()) {
-            Tx tx = getTx(ack.getTransactionId());
-            tx.add(new RemoveMessageCommand() {
-                public MessageAck getMessageAck() {
-                    return ack;
-                }
-
-                public void run(ConnectionContext ctx) throws IOException {
-                    destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack);
-                }
-            });
-        } else {
-            destination.acknowledge(null, clientId, subscriptionName, messageId, ack);
-        }
-    }
-
-
-    public void delete() {
-        inflightTransactions.clear();
-        preparedTransactions.clear();
-        doingRecover = false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/package.html
deleted file mode 100755
index 3f1f319..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	VM based implementation of message persistence
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/store/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/store/package.html
deleted file mode 100755
index ffd5ce8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/store/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	The APIs which need to be implemented for persistent message stores for durable messaging
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DedicatedTaskRunner.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DedicatedTaskRunner.java
deleted file mode 100644
index ad19001..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DedicatedTaskRunner.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.thread;
-
-import org.apache.activemq.util.MDCHelper;
-
-import java.util.Map;
-
-/**
- * 
- */
-class DedicatedTaskRunner implements TaskRunner {
-
-    private final Task task;
-    private final Thread thread;
-
-    private final Object mutex = new Object();
-    private boolean threadTerminated;
-    private boolean pending;
-    private boolean shutdown;
-
-    public DedicatedTaskRunner(Task task, String name, int priority, boolean daemon) {
-        this.task = task;
-        final Map context = MDCHelper.getCopyOfContextMap();
-        thread = new Thread(name) {
-            public void run() {
-                MDCHelper.setContextMap(context);
-                runTask();
-            }
-        };
-        thread.setDaemon(daemon);
-        thread.setName(name);
-        thread.setPriority(priority);
-        thread.start();
-    }
-
-    /**
-     */
-    public void wakeup() throws InterruptedException {
-        synchronized (mutex) {
-            if (shutdown) {
-                return;
-            }
-            pending = true;
-            mutex.notifyAll();
-        }
-    }
-
-    /**
-     * shut down the task
-     * 
-     * @param timeout
-     * @throws InterruptedException
-     */
-    public void shutdown(long timeout) throws InterruptedException {
-        synchronized (mutex) {
-            shutdown = true;
-            pending = true;
-            mutex.notifyAll();
-
-            // Wait till the thread stops ( no need to wait if shutdown
-            // is called from thread that is shutting down)
-            if (Thread.currentThread() != thread && !threadTerminated) {
-                mutex.wait(timeout);
-            }
-        }
-    }
-
-    /**
-     * shut down the task
-     * 
-     * @throws InterruptedException
-     */
-    public void shutdown() throws InterruptedException {
-        shutdown(0);
-    }
-
-    final void runTask() {
-
-        try {
-            while (true) {
-
-                synchronized (mutex) {
-                    pending = false;
-                    if (shutdown) {
-                        return;
-                    }
-                }
-
-                if (!task.iterate()) {
-                    // wait to be notified.
-                    synchronized (mutex) {
-                        if (shutdown) {
-                            return;
-                        }
-                        while (!pending) {
-                            mutex.wait();
-                        }
-                    }
-                }
-
-            }
-
-        } catch (InterruptedException e) {
-            // Someone really wants this thread to die off.
-            Thread.currentThread().interrupt();
-        } finally {
-            // Make sure we notify any waiting threads that thread
-            // has terminated.
-            synchronized (mutex) {
-                threadTerminated = true;
-                mutex.notifyAll();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java
deleted file mode 100755
index 08b31d1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.thread;
-
-import java.util.concurrent.Executor;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-
-/**
- * 
- * 
- */
-public final class DefaultThreadPools {
-
-//    private static final Executor DEFAULT_POOL;
-//    static {
-//        DEFAULT_POOL = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
-//            public Thread newThread(Runnable runnable) {
-//                Thread thread = new Thread(runnable, "ActiveMQ Default Thread Pool Thread");
-//                thread.setDaemon(true);
-//                return thread;
-//            }
-//        });
-//    }    
-    private static final TaskRunnerFactory DEFAULT_TASK_RUNNER_FACTORY = new TaskRunnerFactory();
-    
-    private DefaultThreadPools() {        
-    }
-    
-//    public static Executor getDefaultPool() {
-//        return DEFAULT_POOL;
-//    }
-    
-    public static TaskRunnerFactory getDefaultTaskRunnerFactory() {
-        return DEFAULT_TASK_RUNNER_FACTORY;
-    }
-
-    /**
-     * Useful to cleanup when it is known that all brokers and connections are
-     * close and stopped, eg: when un deploying from web container.
-     */
-    public static void shutdown() {
-        DEFAULT_TASK_RUNNER_FACTORY.shutdown();
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DeterministicTaskRunner.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DeterministicTaskRunner.java
deleted file mode 100644
index 1db1af4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DeterministicTaskRunner.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.thread;
-
-import org.apache.activemq.util.MDCHelper;
-import org.slf4j.MDC;
-
-import java.util.Map;
-import java.util.concurrent.Executor;
-
-/**
- * 
- */
-public class DeterministicTaskRunner implements TaskRunner {
-
-    private final Executor executor;
-    private final Task task;
-    private final Runnable runable;
-    private boolean shutdown;    
-    
-    /**Constructor
-     * @param executor
-     * @param task
-     */
-    public DeterministicTaskRunner(Executor executor, Task task) {
-        this.executor = executor;
-        this.task = task;
-        final Map context = MDCHelper.getCopyOfContextMap();
-        this.runable = new Runnable() {
-            public void run() {
-                Thread.currentThread();
-                if (context != null) {
-                    MDCHelper.setContextMap(context);
-                }
-                runTask();
-            }
-        };
-    }
-
-    /**
-     * We Expect MANY wakeup calls on the same TaskRunner - but each
-     * needs to run
-     */
-    public void wakeup() throws InterruptedException {
-        synchronized (runable) {
-
-            if (shutdown) {
-                return;
-            }
-            executor.execute(runable);
-
-        }
-    }
-
-    /**
-     * shut down the task
-     * 
-     * @throws InterruptedException
-     */
-    public void shutdown(long timeout) throws InterruptedException {
-        synchronized (runable) {
-            shutdown = true;
-        }
-    }
-
-    public void shutdown() throws InterruptedException {
-        shutdown(0);
-    }
-
-    final void runTask() {
-
-        synchronized (runable) {
-            if (shutdown) {
-                runable.notifyAll();
-                return;
-            }
-        }
-        task.iterate();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
deleted file mode 100644
index 42d7b3a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.thread;
-
-import org.apache.activemq.util.MDCHelper;
-
-import java.util.Map;
-import java.util.concurrent.Executor;
-
-/**
- * 
- */
-class PooledTaskRunner implements TaskRunner {
-
-    private final int maxIterationsPerRun;
-    private final Executor executor;
-    private final Task task;
-    private final Runnable runable;
-    private boolean queued;
-    private boolean shutdown;
-    private boolean iterating;
-    private volatile Thread runningThread;
-
-    public PooledTaskRunner(Executor executor, Task task, int maxIterationsPerRun) {
-        this.executor = executor;
-        this.maxIterationsPerRun = maxIterationsPerRun;
-        this.task = task;
-        final Map context = MDCHelper.getCopyOfContextMap();
-        runable = new Runnable() {
-            public void run() {
-                MDCHelper.setContextMap(context);
-                runningThread = Thread.currentThread();
-                try {
-                    runTask();
-                } finally {
-                    runningThread = null;
-                }
-            }
-        };
-    }
-
-    /**
-     * We Expect MANY wakeup calls on the same TaskRunner.
-     */
-    public void wakeup() throws InterruptedException {
-        synchronized (runable) {
-
-            // When we get in here, we make some assumptions of state:
-            // queued=false, iterating=false: wakeup() has not be called and
-            // therefore task is not executing.
-            // queued=true, iterating=false: wakeup() was called but, task
-            // execution has not started yet
-            // queued=false, iterating=true : wakeup() was called, which caused
-            // task execution to start.
-            // queued=true, iterating=true : wakeup() called after task
-            // execution was started.
-
-            if (queued || shutdown) {
-                return;
-            }
-
-            queued = true;
-
-            // The runTask() method will do this for me once we are done
-            // iterating.
-            if (!iterating) {
-                executor.execute(runable);
-            }
-        }
-    }
-
-    /**
-     * shut down the task
-     *
-     * @throws InterruptedException
-     */
-    public void shutdown(long timeout) throws InterruptedException {
-        synchronized (runable) {
-            shutdown = true;
-            // the check on the thread is done
-            // because a call to iterate can result in
-            // shutDown() being called, which would wait forever
-            // waiting for iterating to finish
-            if (runningThread != Thread.currentThread()) {
-                if (iterating) {
-                    runable.wait(timeout);
-                }
-            }
-        }
-    }
-
-    public void shutdown() throws InterruptedException {
-        shutdown(0);
-    }
-
-    final void runTask() {
-
-        synchronized (runable) {
-            queued = false;
-            if (shutdown) {
-                iterating = false;
-                runable.notifyAll();
-                return;
-            }
-            iterating = true;
-        }
-
-        // Don't synchronize while we are iterating so that
-        // multiple wakeup() calls can be executed concurrently.
-        boolean done = false;
-        try {
-            for (int i = 0; i < maxIterationsPerRun; i++) {
-                if (!task.iterate()) {
-                    done = true;
-                    break;
-                }
-            }
-        } finally {
-            synchronized( runable ) {
-                iterating = false;
-                runable.notifyAll();
-                if (shutdown) {
-                    queued = false;
-                    runable.notifyAll();
-                    return;
-                }
-
-                // If we could not iterate all the items
-                // then we need to re-queue.
-                if (!done) {
-                    queued = true;
-                }
-
-                if (queued) {
-                    executor.execute(runable);
-                }
-
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java
deleted file mode 100755
index d54479b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.thread;
-
-import java.util.HashMap;
-import java.util.Timer;
-import java.util.TimerTask;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-
-/**
- * 
- */
-public final class Scheduler extends ServiceSupport { 
-    private final String name;
-	private Timer timer;
-    private final HashMap<Runnable, TimerTask> timerTasks = new HashMap<Runnable, TimerTask>();
-    
-    public Scheduler (String name) {
-        this.name = name;
-    }
-        
-    public void executePeriodically(final Runnable task, long period) {
-    	TimerTask timerTask = new SchedulerTimerTask(task);
-        timer.scheduleAtFixedRate(timerTask, period, period);
-        timerTasks.put(task, timerTask);
-    }
-
-    /*
-     * execute on rough schedual based on termination of last execution. There is no
-     * compensation (two runs in quick succession) for delays
-     */
-    public synchronized void schedualPeriodically(final Runnable task, long period) {
-        TimerTask timerTask = new SchedulerTimerTask(task);
-        timer.schedule(timerTask, period, period);
-        timerTasks.put(task, timerTask);
-    }
-    
-    public synchronized void cancel(Runnable task) {
-    	TimerTask ticket = timerTasks.remove(task);
-        if (ticket != null) {
-            ticket.cancel();
-            timer.purge();//remove cancelled TimerTasks
-        }
-    }
-
-    public synchronized void executeAfterDelay(final Runnable task, long redeliveryDelay) {
-    	TimerTask timerTask = new SchedulerTimerTask(task);
-        timer.schedule(timerTask, redeliveryDelay);
-    }
-    
-    public void shutdown() {
-        timer.cancel();
-    }
-
-    @Override
-    protected synchronized void doStart() throws Exception {
-        this.timer = new Timer(name, true);
-        
-    }
-
-    @Override
-    protected synchronized void doStop(ServiceStopper stopper) throws Exception {
-       if (this.timer != null) {
-           this.timer.cancel();
-       }
-        
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/SchedulerTimerTask.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/SchedulerTimerTask.java
deleted file mode 100644
index 95cbdb1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/SchedulerTimerTask.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.thread;
-
-import java.util.TimerTask;
-
-/**
- * A TimeTask for a Runnable object
- *
- */
-public class SchedulerTimerTask extends TimerTask {
-    private final Runnable task;
-
-    public SchedulerTimerTask(Runnable task) {
-        this.task = task;
-    }
-
-    public void run() {
-        this.task.run();                         
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Task.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Task.java
deleted file mode 100755
index b5d2784..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Task.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.thread;
-
-/**
- * Represents a task that may take a few iterations to complete.
- * 
- * 
- */
-public interface Task {
-    boolean iterate();
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunner.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunner.java
deleted file mode 100755
index 90267dd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunner.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.thread;
-
-/**
- * Allows you to request a thread execute the associated Task.
- * 
- * 
- */
-public interface TaskRunner {
-    void wakeup() throws InterruptedException;
-    void shutdown() throws InterruptedException;
-    void shutdown(long timeout) throws InterruptedException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
deleted file mode 100755
index c79d715..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.thread;
-
-import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * Manages the thread pool for long running tasks. Long running tasks are not
- * always active but when they are active, they may need a few iterations of
- * processing for them to become idle. The manager ensures that each task is
- * processes but that no one task overtakes the system. This is kinda like
- * cooperative multitasking.
- * 
- * 
- */
-public class TaskRunnerFactory implements Executor {
-
-    private ExecutorService executor;
-    private int maxIterationsPerRun;
-    private String name;
-    private int priority;
-    private boolean daemon;
-    private AtomicLong id = new AtomicLong(0);
-
-    public TaskRunnerFactory() {
-        this("ActiveMQ Task", Thread.NORM_PRIORITY, true, 1000);
-    }
-    
-    private TaskRunnerFactory(String name, int priority, boolean daemon, int maxIterationsPerRun) {
-    	this(name,priority,daemon,maxIterationsPerRun,false);
-    }
-
-
-    public TaskRunnerFactory(String name, int priority, boolean daemon, int maxIterationsPerRun, boolean dedicatedTaskRunner) {
-
-        this.name = name;
-        this.priority = priority;
-        this.daemon = daemon;
-        this.maxIterationsPerRun = maxIterationsPerRun;
-
-        // If your OS/JVM combination has a good thread model, you may want to
-        // avoid
-        // using a thread pool to run tasks and use a DedicatedTaskRunner
-        // instead.
-        if (dedicatedTaskRunner || "true".equalsIgnoreCase(System.getProperty("org.apache.activemq.UseDedicatedTaskRunner"))) {
-            executor = null;
-        } else {
-            executor = createDefaultExecutor();
-        }
-    }
-
-    public void shutdown() {
-        if (executor != null) {
-            executor.shutdownNow();
-        }
-    }
-
-    public TaskRunner createTaskRunner(Task task, String name) {
-        if (executor != null) {
-            return new PooledTaskRunner(executor, task, maxIterationsPerRun);
-        } else {
-            return new DedicatedTaskRunner(task, name, priority, daemon);
-        }
-    }
-
-    public void execute(Runnable runnable) {
-        execute(runnable, "ActiveMQ Task");
-    }
-    
-    public void execute(Runnable runnable, String name) {
-        if (executor != null) {
-            executor.execute(runnable);
-        } else {
-            new Thread(runnable, name + "-" + id.incrementAndGet()).start();
-        }
-    }
-
-    protected ExecutorService createDefaultExecutor() {
-        ThreadPoolExecutor rc = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 10, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), new ThreadFactory() {
-            public Thread newThread(Runnable runnable) {
-                Thread thread = new Thread(runnable, name + "-" + id.incrementAndGet());
-                thread.setDaemon(daemon);
-                thread.setPriority(priority);
-                return thread;
-            }
-        });
-        // rc.allowCoreThreadTimeOut(true);
-        return rc;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Valve.java b/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Valve.java
deleted file mode 100755
index dac76b4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Valve.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.thread;
-
-/**
- * A Valve is a synchronization object used enable or disable the "flow" of
- * concurrent processing.
- * 
- * 
- */
-public final class Valve {
-
-    private final Object mutex = new Object();
-    private boolean on;
-    private int turningOff;
-    private int usage;
-
-    public Valve(boolean on) {
-        this.on = on;
-    }
-
-    /**
-     * Turns the valve on. This method blocks until the valve is off.
-     * 
-     * @throws InterruptedException if wait is interrupted
-     */
-    public void turnOn() throws InterruptedException {
-        synchronized (mutex) {
-            while (on) {
-                mutex.wait();
-            }
-            on = true;
-            mutex.notifyAll();
-        }
-    }
-
-    public boolean isOn() {
-        synchronized (mutex) {
-            return on;
-        }
-    }
-
-    /**
-     * Turns the valve off. This method blocks until the valve is on and the
-     * valve is not in use.
-     * 
-     * @throws InterruptedException if wait is interrupted
-     */
-    public void turnOff() throws InterruptedException {
-        synchronized (mutex) {
-            if (turningOff < 0) {
-                throw new IllegalStateException("Unbalanced turningOff: " + turningOff);
-            }
-            try {
-                ++turningOff;
-                while (usage > 0 || !on) {
-                    mutex.wait();
-                }
-                on = false;
-                mutex.notifyAll();
-            } finally {
-                --turningOff;
-            }
-        }
-    }
-
-    /**
-     * Increments the use counter of the valve. This method blocks if the valve
-     * is off, or is being turned off.
-     * 
-     * @throws InterruptedException  if wait is interrupted
-     */
-    public void increment() throws InterruptedException {
-        synchronized (mutex) {
-            if (turningOff < 0) {
-                throw new IllegalStateException("Unbalanced turningOff: " + turningOff);
-            }
-            if (usage < 0) {
-                throw new IllegalStateException("Unbalanced usage: " + usage);
-            }
-            // Do we have to wait for the value to be on?
-            while (turningOff > 0 || !on) {
-                mutex.wait();
-            }
-            usage++;
-        }
-    }
-
-    /**
-     * Decrements the use counter of the valve.
-     */
-    public void decrement() {
-        synchronized (mutex) {
-            usage--;
-            if (turningOff < 0) {
-                throw new IllegalStateException("Unbalanced turningOff: " + turningOff);
-            }
-            if (usage < 0) {
-                throw new IllegalStateException("Unbalanced usage: " + usage);
-            }
-            if (turningOff > 0 && usage < 1) {
-                mutex.notifyAll();
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java
deleted file mode 100755
index cade35c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * 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.transaction;
-
-import java.io.IOException;
-import javax.transaction.xa.XAException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.TransactionStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class LocalTransaction extends Transaction {
-
-    private static final Logger LOG = LoggerFactory.getLogger(LocalTransaction.class);
-
-    private final TransactionStore transactionStore;
-    private final LocalTransactionId xid;
-    private final ConnectionContext context;
-
-    public LocalTransaction(TransactionStore transactionStore, LocalTransactionId xid, ConnectionContext context) {
-        this.transactionStore = transactionStore;
-        this.xid = xid;
-        this.context = context;
-    }
-
-    @Override
-    public void commit(boolean onePhase) throws XAException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("commit: "  + xid
-                    + " syncCount: " + size());
-        }
-        
-        // Get ready for commit.
-        try {
-            prePrepare();
-        } catch (XAException e) {
-            throw e;
-        } catch (Throwable e) {
-            LOG.warn("COMMIT FAILED: ", e);
-            rollback();
-            // Let them know we rolled back.
-            XAException xae = new XAException("COMMIT FAILED: Transaction rolled back.");
-            xae.errorCode = XAException.XA_RBOTHER;
-            xae.initCause(e);
-            throw xae;
-        }
-
-        setState(Transaction.FINISHED_STATE);
-        context.getTransactions().remove(xid);
-        // Sync on transaction store to avoid out of order messages in the cursor
-        // https://issues.apache.org/activemq/browse/AMQ-2594
-        try {
-            transactionStore.commit(getTransactionId(), false,preCommitTask, postCommitTask);
-            this.waitPostCommitDone(postCommitTask);
-        } catch (Throwable t) {
-            LOG.warn("Store COMMIT FAILED: ", t);
-            rollback();
-            XAException xae = new XAException("STORE COMMIT FAILED: Transaction rolled back.");
-            xae.errorCode = XAException.XA_RBOTHER;
-            xae.initCause(t);
-            throw xae;
-        }
-    }
-
-    @Override
-    public void rollback() throws XAException, IOException {
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("rollback: "  + xid
-                    + " syncCount: " + size());
-        }
-        setState(Transaction.FINISHED_STATE);
-        context.getTransactions().remove(xid);
-        // Sync on transaction store to avoid out of order messages in the cursor
-        // https://issues.apache.org/activemq/browse/AMQ-2594
-        synchronized (transactionStore) {
-           transactionStore.rollback(getTransactionId());
-
-            try {
-                fireAfterRollback();
-            } catch (Throwable e) {
-                LOG.warn("POST ROLLBACK FAILED: ", e);
-                XAException xae = new XAException("POST ROLLBACK FAILED");
-                xae.errorCode = XAException.XAER_RMERR;
-                xae.initCause(e);
-                throw xae;
-            }
-        }
-    }
-
-    @Override
-    public int prepare() throws XAException {
-        XAException xae = new XAException("Prepare not implemented on Local Transactions.");
-        xae.errorCode = XAException.XAER_RMERR;
-        throw xae;
-    }
-
-    @Override
-    public TransactionId getTransactionId() {
-        return xid;
-    }
-    
-    @Override
-    public Logger getLog() {
-        return LOG;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Synchronization.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Synchronization.java
deleted file mode 100755
index e428851..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Synchronization.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.transaction;
-
-/**
- * 
- */
-public class Synchronization {
-
-    public void beforeEnd() throws Exception {
-    }
-    
-    public void beforeCommit() throws Exception {
-    }
-
-    public void afterCommit() throws Exception {
-    }
-
-    public void afterRollback() throws Exception {
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java
deleted file mode 100755
index 4a6a69b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * 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.transaction;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.FutureTask;
-import javax.transaction.xa.XAException;
-import org.apache.activemq.command.TransactionId;
-import org.slf4j.Logger;
-
-/**
- * Keeps track of all the actions the need to be done when a transaction does a
- * commit or rollback.
- * 
- * 
- */
-public abstract class Transaction {
-
-    public static final byte START_STATE = 0; // can go to: 1,2,3
-    public static final byte IN_USE_STATE = 1; // can go to: 2,3
-    public static final byte PREPARED_STATE = 2; // can go to: 3
-    public static final byte FINISHED_STATE = 3;
-
-    private final ArrayList<Synchronization> synchronizations = new ArrayList<Synchronization>();
-    private byte state = START_STATE;
-    protected FutureTask<?> preCommitTask = new FutureTask<Object>(new Callable<Object>() {
-        public Object call() throws Exception {
-            doPreCommit();
-            return null;
-        }   
-    });
-    protected FutureTask<?> postCommitTask = new FutureTask<Object>(new Callable<Object>() {
-        public Object call() throws Exception {
-            doPostCommit();
-            return null;
-        }   
-    });
-    
-    public byte getState() {
-        return state;
-    }
-
-    public void setState(byte state) {
-        this.state = state;
-    }
-
-    public void addSynchronization(Synchronization r) {
-        synchronizations.add(r);
-        if (state == START_STATE) {
-            state = IN_USE_STATE;
-        }
-    }
-
-    public void removeSynchronization(Synchronization r) {
-        synchronizations.remove(r);
-    }
-
-    public void prePrepare() throws Exception {
-
-        // Is it ok to call prepare now given the state of the
-        // transaction?
-        switch (state) {
-        case START_STATE:
-        case IN_USE_STATE:
-            break;
-        default:
-            XAException xae = new XAException("Prepare cannot be called now.");
-            xae.errorCode = XAException.XAER_PROTO;
-            throw xae;
-        }
-
-        // // Run the prePrepareTasks
-        // for (Iterator iter = prePrepareTasks.iterator(); iter.hasNext();) {
-        // Callback r = (Callback) iter.next();
-        // r.execute();
-        // }
-    }
-    
-    protected void fireBeforeCommit() throws Exception {
-        for (Iterator<Synchronization> iter = synchronizations.iterator(); iter.hasNext();) {
-            Synchronization s = iter.next();
-            s.beforeCommit();
-        }
-    }
-
-    protected void fireAfterCommit() throws Exception {
-        for (Iterator<Synchronization> iter = synchronizations.iterator(); iter.hasNext();) {
-            Synchronization s = iter.next();
-            s.afterCommit();
-        }
-    }
-
-    public void fireAfterRollback() throws Exception {
-    	Collections.reverse(synchronizations);
-        for (Iterator<Synchronization> iter = synchronizations.iterator(); iter.hasNext();) {
-            Synchronization s = iter.next();
-            s.afterRollback();
-        }
-    }
-
-    @Override
-    public String toString() {
-        return super.toString() + "[synchronizations=" + synchronizations + "]";
-    }
-
-    public abstract void commit(boolean onePhase) throws XAException, IOException;
-
-    public abstract void rollback() throws XAException, IOException;
-
-    public abstract int prepare() throws XAException, IOException;
-
-    public abstract TransactionId getTransactionId();
-
-    public abstract Logger getLog();
-    
-    public boolean isPrepared() {
-        return getState() == PREPARED_STATE;
-    }
-    
-    public int size() {
-        return synchronizations.size();
-    }
-    
-    protected void waitPostCommitDone(FutureTask<?> postCommitTask) throws XAException, IOException {
-        try {
-            postCommitTask.get();
-        } catch (InterruptedException e) {
-            throw new InterruptedIOException(e.toString());
-        } catch (ExecutionException e) {
-            Throwable t = e.getCause();
-            if (t instanceof XAException) {
-                throw (XAException) t;
-            } else if (t instanceof IOException) {
-                throw (IOException) t;
-            } else {
-                throw new XAException(e.toString());
-            }
-        }    
-    }
-    
-    protected void doPreCommit() throws XAException {
-        try {
-            fireBeforeCommit();
-        } catch (Throwable e) {
-            // I guess this could happen. Post commit task failed
-            // to execute properly.
-            getLog().warn("PRE COMMIT FAILED: ", e);
-            XAException xae = new XAException("PRE COMMIT FAILED");
-            xae.errorCode = XAException.XAER_RMERR;
-            xae.initCause(e);
-            throw xae;
-        }
-    }
-
-    protected void doPostCommit() throws XAException {
-        try {
-            fireAfterCommit();
-        } catch (Throwable e) {
-            // I guess this could happen. Post commit task failed
-            // to execute properly.
-            getLog().warn("POST COMMIT FAILED: ", e);
-            XAException xae = new XAException("POST COMMIT FAILED");
-            xae.errorCode = XAException.XAER_RMERR;
-            xae.initCause(e);
-            throw xae;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java
deleted file mode 100755
index 277f6e0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * 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.transaction;
-
-import java.io.IOException;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import org.apache.activemq.broker.TransactionBroker;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.store.TransactionStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class XATransaction extends Transaction {
-
-    private static final Logger LOG = LoggerFactory.getLogger(XATransaction.class);
-
-    private final TransactionStore transactionStore;
-    private final XATransactionId xid;
-    private final TransactionBroker broker;
-    private final ConnectionId connectionId;
-
-    public XATransaction(TransactionStore transactionStore, XATransactionId xid, TransactionBroker broker, ConnectionId connectionId) {
-        this.transactionStore = transactionStore;
-        this.xid = xid;
-        this.broker = broker;
-        this.connectionId = connectionId;
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("XA Transaction new/begin : " + xid);
-        }
-    }
-
-    @Override
-    public void commit(boolean onePhase) throws XAException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("XA Transaction commit: " + xid);
-        }
-
-        switch (getState()) {
-        case START_STATE:
-            // 1 phase commit, no work done.
-            checkForPreparedState(onePhase);
-            setStateFinished();
-            break;
-        case IN_USE_STATE:
-            // 1 phase commit, work done.
-            checkForPreparedState(onePhase);
-            doPrePrepare();
-            setStateFinished();
-            storeCommit(getTransactionId(), false, preCommitTask, postCommitTask);
-            break;
-        case PREPARED_STATE:
-            // 2 phase commit, work done.
-            // We would record commit here.
-            setStateFinished();
-            storeCommit(getTransactionId(), true, preCommitTask, postCommitTask);
-            break;
-        default:
-            illegalStateTransition("commit");
-        }
-    }
-
-    private void storeCommit(TransactionId txid, boolean wasPrepared, Runnable preCommit,Runnable postCommit)
-            throws XAException, IOException {
-        try {
-            transactionStore.commit(getTransactionId(), wasPrepared, preCommitTask, postCommitTask);
-            waitPostCommitDone(postCommitTask);
-        } catch (XAException xae) {
-            throw xae;
-        } catch (Throwable t) {
-            LOG.warn("Store COMMIT FAILED: ", t);
-            rollback();
-            XAException xae = new XAException("STORE COMMIT FAILED: Transaction rolled back.");
-            xae.errorCode = XAException.XA_RBOTHER;
-            xae.initCause(t);
-            throw xae;
-        }
-    }
-
-    private void illegalStateTransition(String callName) throws XAException {
-        XAException xae = new XAException("Cannot call " + callName + " now.");
-        xae.errorCode = XAException.XAER_PROTO;
-        throw xae;
-    }
-
-    private void checkForPreparedState(boolean onePhase) throws XAException {
-        if (!onePhase) {
-            XAException xae = new XAException("Cannot do 2 phase commit if the transaction has not been prepared.");
-            xae.errorCode = XAException.XAER_PROTO;
-            throw xae;
-        }
-    }
-
-    private void doPrePrepare() throws XAException, IOException {
-        try {
-            prePrepare();
-        } catch (XAException e) {
-            throw e;
-        } catch (Throwable e) {
-            LOG.warn("PRE-PREPARE FAILED: ", e);
-            rollback();
-            XAException xae = new XAException("PRE-PREPARE FAILED: Transaction rolled back.");
-            xae.errorCode = XAException.XA_RBOTHER;
-            xae.initCause(e);
-            throw xae;
-        }
-    }
-
-    @Override
-    public void rollback() throws XAException, IOException {
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("XA Transaction rollback: " + xid);
-        }
-
-        switch (getState()) {
-        case START_STATE:
-            // 1 phase rollback no work done.
-            setStateFinished();
-            break;
-        case IN_USE_STATE:
-            // 1 phase rollback work done.
-            setStateFinished();
-            transactionStore.rollback(getTransactionId());
-            doPostRollback();
-            break;
-        case PREPARED_STATE:
-            // 2 phase rollback work done.
-            setStateFinished();
-            transactionStore.rollback(getTransactionId());
-            doPostRollback();
-            break;
-        case FINISHED_STATE:
-            // failure to commit
-            transactionStore.rollback(getTransactionId());
-            doPostRollback();
-            break;
-        default:
-            throw new XAException("Invalid state");
-        }
-
-    }
-
-    private void doPostRollback() throws XAException {
-        try {
-            fireAfterRollback();
-        } catch (Throwable e) {
-            // I guess this could happen. Post commit task failed
-            // to execute properly.
-            LOG.warn("POST ROLLBACK FAILED: ", e);
-            XAException xae = new XAException("POST ROLLBACK FAILED");
-            xae.errorCode = XAException.XAER_RMERR;
-            xae.initCause(e);
-            throw xae;
-        }
-    }
-
-    @Override
-    public int prepare() throws XAException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("XA Transaction prepare: " + xid);
-        }
-
-        switch (getState()) {
-        case START_STATE:
-            // No work done.. no commit/rollback needed.
-            setStateFinished();
-            return XAResource.XA_RDONLY;
-        case IN_USE_STATE:
-            // We would record prepare here.
-            doPrePrepare();
-            setState(Transaction.PREPARED_STATE);
-            transactionStore.prepare(getTransactionId());
-            return XAResource.XA_OK;
-        default:
-            illegalStateTransition("prepare");
-            return XAResource.XA_RDONLY;
-        }
-    }
-
-    private void setStateFinished() {
-        setState(Transaction.FINISHED_STATE);
-        broker.removeTransaction(xid);
-    }
-
-    public ConnectionId getConnectionId() {
-        return connectionId;
-    }
-
-    @Override
-    public TransactionId getTransactionId() {
-        return xid;
-    }
-    
-    @Override
-    public Logger getLog() {
-        return LOG;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java
deleted file mode 100644
index 91722e9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.LastPartialCommand;
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Joins together of partial commands which were split into individual chunks of
- * data.
- * 
- * 
- */
-public class CommandJoiner extends TransportFilter {
-    private static final Logger LOG = LoggerFactory.getLogger(CommandJoiner.class);
-
-    private ByteArrayOutputStream out = new ByteArrayOutputStream();
-    private OpenWireFormat wireFormat;
-
-    public CommandJoiner(Transport next, OpenWireFormat wireFormat) {
-        super(next);
-        this.wireFormat = wireFormat;
-    }
-
-    public void onCommand(Object o) {
-        Command command = (Command)o;
-        byte type = command.getDataStructureType();
-        if (type == PartialCommand.DATA_STRUCTURE_TYPE || type == LastPartialCommand.DATA_STRUCTURE_TYPE) {
-            PartialCommand header = (PartialCommand)command;
-            byte[] partialData = header.getData();
-            try {
-                out.write(partialData);
-            } catch (IOException e) {
-                getTransportListener().onException(e);
-            }
-            if (type == LastPartialCommand.DATA_STRUCTURE_TYPE) {
-                try {
-                    byte[] fullData = out.toByteArray();
-                    out.reset();
-                    DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(fullData));
-                    Command completeCommand = (Command)wireFormat.unmarshal(dataIn);
-
-                    LastPartialCommand lastCommand = (LastPartialCommand)command;
-                    lastCommand.configure(completeCommand);
-
-                    getTransportListener().onCommand(completeCommand);
-                } catch (IOException e) {
-                    LOG.warn("Failed to unmarshal partial command: " + command);
-                    getTransportListener().onException(e);
-                }
-            }
-        } else {
-            getTransportListener().onCommand(command);
-        }
-    }
-
-    public void stop() throws Exception {
-        super.stop();
-        out = null;
-    }
-
-    public String toString() {
-        return next.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CompositeTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CompositeTransport.java
deleted file mode 100644
index d3a2fd8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CompositeTransport.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.URI;
-
-public interface CompositeTransport extends Transport {
-    void add(boolean rebalance,URI[] uris);
-    void remove(boolean rebalance,URI[] uris);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java
deleted file mode 100755
index 48e0fb8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-/**
- * An asynchronous listener of commands
- * 
- * 
- */
-public class DefaultTransportListener implements TransportListener {
-
-    /**
-     * called to process a command
-     * 
-     * @param command
-     */
-    public void onCommand(Object command) {
-    }
-
-    /**
-     * An unrecoverable exception has occured on the transport
-     * 
-     * @param error
-     */
-    public void onException(IOException error) {
-    }
-
-    /**
-     * The transport has suffered an interuption from which it hopes to recover
-     */
-    public void transportInterupted() {
-    }
-
-    /**
-     * The transport has resumed after an interuption
-     */
-    public void transportResumed() {
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
deleted file mode 100755
index ba4bd67..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.activemq.command.Response;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class FutureResponse {
-    private static final Logger LOG = LoggerFactory.getLogger(FutureResponse.class);
-
-    private final ResponseCallback responseCallback;
-    private final ArrayBlockingQueue<Response> responseSlot = new ArrayBlockingQueue<Response>(1);
-
-    public FutureResponse(ResponseCallback responseCallback) {
-        this.responseCallback = responseCallback;
-    }
-
-    public Response getResult() throws IOException {
-        try {
-            return responseSlot.take();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Operation interupted: " + e, e);
-            }
-            throw new InterruptedIOException("Interrupted.");
-        }
-    }
-
-    public Response getResult(int timeout) throws IOException {
-        try {
-            Response result = responseSlot.poll(timeout, TimeUnit.MILLISECONDS);
-            if (result == null && timeout > 0) {
-                throw new RequestTimedOutIOException();
-            }
-            return result;
-        } catch (InterruptedException e) {
-            throw new InterruptedIOException("Interrupted.");
-        }
-    }
-
-    public void set(Response result) {
-        if (responseSlot.offer(result)) {
-            if (responseCallback != null) {
-                responseCallback.onCompletion(this);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityIOException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityIOException.java
deleted file mode 100644
index 9c081fd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityIOException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-/**
- * This is exception is thrown when the transport layer detects that the underlying socket has been inactive for 
- * too long.
- * 
- * 
- */
-public class InactivityIOException extends IOException {
-
-    /**
-     * 
-     */
-    private static final long serialVersionUID = 5816001466763503220L;
-
-    public InactivityIOException() {
-        super();
-    }
-
-    /**
-     * @param message
-     */
-    public InactivityIOException(String message) {
-        super(message);
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
deleted file mode 100755
index 1b00def..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.util.Timer;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.activemq.command.KeepAliveInfo;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.thread.SchedulerTimerTask;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Used to make sure that commands are arriving periodically from the peer of
- * the transport.
- *
- * 
- */
-public class InactivityMonitor extends TransportFilter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(InactivityMonitor.class);
-    private static ThreadPoolExecutor ASYNC_TASKS;
-    private static int CHECKER_COUNTER;
-    private static long DEFAULT_CHECK_TIME_MILLS = 30000;
-    private static Timer  READ_CHECK_TIMER;
-    private static Timer  WRITE_CHECK_TIMER;
-
-    private WireFormatInfo localWireFormatInfo;
-    private WireFormatInfo remoteWireFormatInfo;
-    private final AtomicBoolean monitorStarted = new AtomicBoolean(false);
-
-    private final AtomicBoolean commandSent = new AtomicBoolean(false);
-    private final AtomicBoolean inSend = new AtomicBoolean(false);
-    private final AtomicBoolean failed = new AtomicBoolean(false);
-
-    private final AtomicBoolean commandReceived = new AtomicBoolean(true);
-    private final AtomicBoolean inReceive = new AtomicBoolean(false);
-    private final AtomicInteger lastReceiveCounter = new AtomicInteger(0);
-
-    private SchedulerTimerTask writeCheckerTask;
-    private SchedulerTimerTask readCheckerTask;
-
-    private boolean ignoreRemoteWireFormat = false;
-    private boolean ignoreAllWireFormatInfo = false;
-
-    private long readCheckTime = DEFAULT_CHECK_TIME_MILLS;
-    private long writeCheckTime = DEFAULT_CHECK_TIME_MILLS;
-    private long initialDelayTime = DEFAULT_CHECK_TIME_MILLS;
-    private boolean useKeepAlive = true;
-    private boolean keepAliveResponseRequired;
-    private WireFormat wireFormat;
-
-    private final Runnable readChecker = new Runnable() {
-        long lastRunTime;
-        public void run() {
-            long now = System.currentTimeMillis();
-            long elapsed = (now-lastRunTime);
-
-            if( lastRunTime != 0 && LOG.isDebugEnabled() ) {
-                LOG.debug(""+elapsed+" ms elapsed since last read check.");
-            }
-
-            // Perhaps the timer executed a read check late.. and then executes
-            // the next read check on time which causes the time elapsed between
-            // read checks to be small..
-
-            // If less than 90% of the read check Time elapsed then abort this readcheck.
-            if( !allowReadCheck(elapsed) ) { // FUNKY qdox bug does not allow me to inline this expression.
-                LOG.debug("Aborting read check.. Not enough time elapsed since last read check.");
-                return;
-            }
-
-            lastRunTime = now;
-            readCheck();
-        }
-    };
-
-    private boolean allowReadCheck(long elapsed) {
-        return elapsed > (readCheckTime * 9 / 10);
-    }
-
-    private final Runnable writeChecker = new Runnable() {
-        long lastRunTime;
-        public void run() {
-            long now = System.currentTimeMillis();
-            if( lastRunTime != 0 && LOG.isDebugEnabled() ) {
-                LOG.debug(this + " "+(now-lastRunTime)+" ms elapsed since last write check.");
-
-            }
-            lastRunTime = now;
-            writeCheck();
-        }
-    };
-
-    public InactivityMonitor(Transport next, WireFormat wireFormat) {
-        super(next);
-        this.wireFormat = wireFormat;
-        if (this.wireFormat == null) {
-            this.ignoreAllWireFormatInfo = true;
-        }
-    }
-
-    public void start() throws Exception {
-        next.start();
-        startMonitorThreads();
-    }
-
-    public void stop() throws Exception {
-        stopMonitorThreads();
-        next.stop();
-    }
-
-    final void writeCheck() {
-        if (inSend.get()) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("A send is in progress");
-            }
-            return;
-        }
-
-        if (!commandSent.get() && useKeepAlive) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(this + " no message sent since last write check, sending a KeepAliveInfo");
-            }
-            ASYNC_TASKS.execute(new Runnable() {
-                public void run() {
-                    if (monitorStarted.get()) {
-                        try {
-
-                            KeepAliveInfo info = new KeepAliveInfo();
-                            info.setResponseRequired(keepAliveResponseRequired);
-                            oneway(info);
-                        } catch (IOException e) {
-                            onException(e);
-                        }
-                    }
-                };
-            });
-        } else {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace(this + " message sent since last write check, resetting flag");
-            }
-        }
-
-        commandSent.set(false);
-    }
-
-    final void readCheck() {
-        int currentCounter = next.getReceiveCounter();
-        int previousCounter = lastReceiveCounter.getAndSet(currentCounter);
-        if (inReceive.get() || currentCounter!=previousCounter ) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("A receive is in progress");
-            }
-            return;
-        }
-        if (!commandReceived.get()) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("No message received since last read check for " + toString() + "! Throwing InactivityIOException.");
-            }
-            ASYNC_TASKS.execute(new Runnable() {
-                public void run() {
-                    onException(new InactivityIOException("Channel was inactive for too (>" + readCheckTime + ") long: "+next.getRemoteAddress()));
-                };
-
-            });
-        } else {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Message received since last read check, resetting flag: ");
-            }
-        }
-        commandReceived.set(false);
-    }
-
-    public void onCommand(Object command) {
-        commandReceived.set(true);
-        inReceive.set(true);
-        try {
-            if (command.getClass() == KeepAliveInfo.class) {
-                KeepAliveInfo info = (KeepAliveInfo) command;
-                if (info.isResponseRequired()) {
-                    try {
-                        info.setResponseRequired(false);
-                        oneway(info);
-                    } catch (IOException e) {
-                        onException(e);
-                    }
-                }
-            } else {
-                if (command.getClass() == WireFormatInfo.class) {
-                    synchronized (this) {
-                        IOException error = null;
-                        remoteWireFormatInfo = (WireFormatInfo) command;
-                        try {
-                            startMonitorThreads();
-                        } catch (IOException e) {
-                            error = e;
-                        }
-                        if (error != null) {
-                            onException(error);
-                        }
-                    }
-                }
-                synchronized (readChecker) {
-                    transportListener.onCommand(command);
-                }
-            }
-        } finally {
-
-            inReceive.set(false);
-        }
-    }
-
-    public void oneway(Object o) throws IOException {
-        // Disable inactivity monitoring while processing a command.
-        //synchronize this method - its not synchronized
-        //further down the transport stack and gets called by more
-        //than one thread  by this class
-        synchronized(inSend) {
-            inSend.set(true);
-            try {
-
-                if( failed.get() ) {
-                    throw new InactivityIOException("Cannot send, channel has already failed: "+next.getRemoteAddress());
-                }
-                if (o.getClass() == WireFormatInfo.class) {
-                    synchronized (this) {
-                        localWireFormatInfo = (WireFormatInfo)o;
-                        startMonitorThreads();
-                    }
-                }
-                next.oneway(o);
-            } finally {
-                commandSent.set(true);
-                inSend.set(false);
-            }
-        }
-    }
-
-    public void onException(IOException error) {
-        if (failed.compareAndSet(false, true)) {
-            stopMonitorThreads();
-            transportListener.onException(error);
-        }
-    }
-
-    public void setKeepAliveResponseRequired(boolean val) {
-        keepAliveResponseRequired = val;
-    }
-    
-    public void setUseKeepAlive(boolean val) {
-        useKeepAlive = val;
-    }
-
-    public void setIgnoreRemoteWireFormat(boolean val) {
-        ignoreRemoteWireFormat = val;
-    }
-
-    public long getReadCheckTime() {
-        return readCheckTime;
-    }
-
-    public void setReadCheckTime(long readCheckTime) {
-        this.readCheckTime = readCheckTime;
-    }
-
-    public long getInitialDelayTime() {
-        return initialDelayTime;
-    }
-
-    public void setInitialDelayTime(long initialDelayTime) {
-        this.initialDelayTime = initialDelayTime;
-    }
-    
-    private synchronized void startMonitorThreads() throws IOException {
-        if (monitorStarted.get()) {
-            return;
-        }
-
-        if (!configuredOk()) {
-            return;
-        }
-
-        if (readCheckTime > 0) {
-            monitorStarted.set(true);
-            writeCheckerTask = new SchedulerTimerTask(writeChecker);
-            readCheckerTask = new  SchedulerTimerTask(readChecker);
-            writeCheckTime = readCheckTime>3 ? readCheckTime/3 : readCheckTime;
-            synchronized( InactivityMonitor.class ) {
-                if( CHECKER_COUNTER == 0 ) {
-                    ASYNC_TASKS = createExecutor();
-                    READ_CHECK_TIMER = new Timer("InactivityMonitor ReadCheck",true);
-                    WRITE_CHECK_TIMER = new Timer("InactivityMonitor WriteCheck",true);
-                }
-                CHECKER_COUNTER++;
-                WRITE_CHECK_TIMER.scheduleAtFixedRate(writeCheckerTask, initialDelayTime,writeCheckTime);
-                READ_CHECK_TIMER.scheduleAtFixedRate(readCheckerTask, initialDelayTime,readCheckTime);
-            }
-        }
-    }
-
-    private boolean configuredOk() throws IOException {
-        boolean configured = false;
-        if (ignoreAllWireFormatInfo) {
-            configured = true;
-        } else if (localWireFormatInfo != null && remoteWireFormatInfo != null) {
-            if (!ignoreRemoteWireFormat) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Using min of local: " + localWireFormatInfo + " and remote: " + remoteWireFormatInfo);
-                }
-                readCheckTime = Math.min(localWireFormatInfo.getMaxInactivityDuration(), remoteWireFormatInfo.getMaxInactivityDuration());
-                initialDelayTime = Math.min(localWireFormatInfo.getMaxInactivityDurationInitalDelay(), remoteWireFormatInfo.getMaxInactivityDurationInitalDelay());
-            } else {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Using local: " + localWireFormatInfo);
-                }
-                readCheckTime = localWireFormatInfo.getMaxInactivityDuration();
-                initialDelayTime = localWireFormatInfo.getMaxInactivityDurationInitalDelay();
-            }
-            configured = true;
-        }
-        return configured;
-    }
-
-    /**
-     *
-     */
-    private synchronized void stopMonitorThreads() {
-        if (monitorStarted.compareAndSet(true, false)) {
-            readCheckerTask.cancel();
-            writeCheckerTask.cancel();
-            synchronized( InactivityMonitor.class ) {
-                WRITE_CHECK_TIMER.purge();
-                READ_CHECK_TIMER.purge();
-                CHECKER_COUNTER--;
-                if(CHECKER_COUNTER==0) {
-                    WRITE_CHECK_TIMER.cancel();
-                    READ_CHECK_TIMER.cancel();
-                    WRITE_CHECK_TIMER = null;
-                    READ_CHECK_TIMER = null;
-                    ASYNC_TASKS.shutdownNow();
-                    ASYNC_TASKS = null;
-                }
-            }
-        }
-    }
-
-    private ThreadFactory factory = new ThreadFactory() {
-        public Thread newThread(Runnable runnable) {
-            Thread thread = new Thread(runnable, "InactivityMonitor Async Task: "+runnable);
-            thread.setDaemon(true);
-            return thread;
-        }
-    };
-
-    private ThreadPoolExecutor createExecutor() {
-        return new ThreadPoolExecutor(0, Integer.MAX_VALUE, 10, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), factory);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/LogWriter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/LogWriter.java
deleted file mode 100644
index afc2ca2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/LogWriter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-import org.slf4j.Logger;
-
-/**
- * Interface for classes that will be called by the TransportLogger
- * class to actually write to a log file.
- * Every class that implements this interface has do be declared in
- * the resources/META-INF/services/org/apache/activemq/transport/logwriters
- * directory, by creating a file with the name of the writer (for example
- * "default") and including the line
- * class=org.apache.activemq.transport.logwriters.(Name of the LogWriter class)
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public interface LogWriter {
-
-    /**
-     * Writes a header message to the log.
-     * @param log The log to be written to.
-     */
-    public void initialMessage(Logger log);
-    
-    /**
-     * Writes a message to a log when a request command is sent.
-     * @param log The log to be written to.
-     * @param command The command to be logged.
-     */
-    public void logRequest (Logger log, Object command);
-    
-    /**
-     * Writes a message to a log when a response command is received.
-     * @param log The log to be written to.
-     * @param command The command to be logged.
-     */
-    public void logResponse (Logger log, Object response);
-
-    /**
-     * Writes a message to a log when an asynchronous equest command is sent.
-     * @param log The log to be written to.
-     * @param command The command to be logged.
-     */
-    public void logAsyncRequest (Logger log, Object command);
-    
-    /**
-     * Writes a message to a log when message is sent.
-     * @param log The log to be written to.
-     * @param command The command to be logged.
-     */
-    public void logOneWay (Logger log, Object command);
-    
-    /**
-     * Writes a message to a log when message is received.
-     * @param log The log to be written to.
-     * @param command The command to be logged.
-     */
-    public void logReceivedCommand (Logger log, Object command);
-    
-    /**
-     * Writes a message to a log when an exception is received.
-     * @param log The log to be written to.
-     * @param command The command to be logged.
-     */
-    public void logReceivedException (Logger log, IOException error);
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java
deleted file mode 100755
index 14e0ed6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.wireformat.WireFormat;
-
-public class MarshallingTransportFilter extends TransportFilter {
-
-    private final WireFormat localWireFormat;
-    private final WireFormat remoteWireFormat;
-
-    public MarshallingTransportFilter(Transport next, WireFormat localWireFormat, WireFormat remoteWireFormat) {
-        super(next);
-        this.localWireFormat = localWireFormat;
-        this.remoteWireFormat = remoteWireFormat;
-    }
-    
-    public void oneway(Object command) throws IOException {
-        next.oneway((Command) remoteWireFormat.unmarshal(localWireFormat.marshal(command)));
-    }
-    
-    public void onCommand(Object command) {
-        try {
-            getTransportListener().onCommand((Command)localWireFormat.unmarshal(remoteWireFormat.marshal(command)));
-        } catch (IOException e) {
-            getTransportListener().onException(e);
-        }
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java
deleted file mode 100755
index 372fcc0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-/**
- * 
- */
-public class MutexTransport extends TransportFilter {
-
-    private final Object writeMutex = new Object();
-
-    public MutexTransport(Transport next) {
-        super(next);
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        synchronized (writeMutex) {
-            return next.asyncRequest(command, null);
-        }
-    }
-
-    public void oneway(Object command) throws IOException {
-        synchronized (writeMutex) {
-            next.oneway(command);
-        }
-    }
-
-    public Object request(Object command) throws IOException {
-        synchronized (writeMutex) {
-            return next.request(command);
-        }
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        synchronized (writeMutex) {
-            return next.request(command, timeout);
-        }
-    }
-
-    public String toString() {
-        return next.toString();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/RequestTimedOutIOException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/RequestTimedOutIOException.java
deleted file mode 100644
index 1191735..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/RequestTimedOutIOException.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-/**
- * thrown when the timeout specified on a request expires before
- * a reply or response is received
- */
-public class RequestTimedOutIOException extends IOException {
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCallback.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCallback.java
deleted file mode 100644
index 9a73c81..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCallback.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.transport;
-
-/**
- * 
- */
-public interface ResponseCallback {
-    void onCompletion(FutureResponse resp);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
deleted file mode 100755
index ec0cc40..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.util.IntSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Adds the incrementing sequence number to commands along with performing the
- * corelation of responses to requests to create a blocking request-response
- * semantics.
- * 
- * 
- */
-public class ResponseCorrelator extends TransportFilter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ResponseCorrelator.class);
-    private final Map<Integer, FutureResponse> requestMap = new HashMap<Integer, FutureResponse>();
-    private IntSequenceGenerator sequenceGenerator;
-    private final boolean debug = LOG.isDebugEnabled();
-    private IOException error;
-
-    public ResponseCorrelator(Transport next) {
-        this(next, new IntSequenceGenerator());
-    }
-
-    public ResponseCorrelator(Transport next, IntSequenceGenerator sequenceGenerator) {
-        super(next);
-        this.sequenceGenerator = sequenceGenerator;
-    }
-
-    public void oneway(Object o) throws IOException {
-        Command command = (Command)o;
-        command.setCommandId(sequenceGenerator.getNextSequenceId());
-        command.setResponseRequired(false);
-        next.oneway(command);
-    }
-
-    public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException {
-        Command command = (Command) o;
-        command.setCommandId(sequenceGenerator.getNextSequenceId());
-        command.setResponseRequired(true);
-        FutureResponse future = new FutureResponse(responseCallback);
-        IOException priorError = null;
-        synchronized (requestMap) {
-            priorError = this.error;
-            if (priorError == null) {
-                requestMap.put(new Integer(command.getCommandId()), future);
-            }
-        }
-
-        if (priorError != null) {
-            future.set(new ExceptionResponse(priorError));
-            throw priorError;
-        }
-
-        next.oneway(command);
-        return future;
-    }
-
-    public Object request(Object command) throws IOException {
-        FutureResponse response = asyncRequest(command, null);
-        return response.getResult();
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        FutureResponse response = asyncRequest(command, null);
-        return response.getResult(timeout);
-    }
-
-    public void onCommand(Object o) {
-        Command command = null;
-        if (o instanceof Command) {
-            command = (Command)o;
-        } else {
-            throw new ClassCastException("Object cannot be converted to a Command,  Object: " + o);
-        }
-        if (command.isResponse()) {
-            Response response = (Response)command;
-            FutureResponse future = null;
-            synchronized (requestMap) {
-                future = requestMap.remove(Integer.valueOf(response.getCorrelationId()));
-            }
-            if (future != null) {
-                future.set(response);
-            } else {
-                if (debug) {
-                    LOG.debug("Received unexpected response: {" + command + "}for command id: " + response.getCorrelationId());
-                }
-            }
-        } else {
-            getTransportListener().onCommand(command);
-        }
-    }
-
-    /**
-     * If an async exception occurs, then assume no responses will arrive for
-     * any of current requests. Lets let them know of the problem.
-     */
-    public void onException(IOException error) {
-        dispose(error);
-        super.onException(error);
-    }
-    
-    @Override
-    public void stop() throws Exception {
-        dispose(new IOException("Stopped."));
-        super.stop();
-    }
-
-    private void dispose(IOException error) {
-        ArrayList<FutureResponse> requests=null; 
-        synchronized(requestMap) {
-            if( this.error==null) {
-                this.error = error;
-                requests = new ArrayList<FutureResponse>(requestMap.values());
-                requestMap.clear();
-            }
-        }
-        if( requests!=null ) {
-            for (Iterator<FutureResponse> iter = requests.iterator(); iter.hasNext();) {
-                FutureResponse fr = iter.next();
-                fr.set(new ExceptionResponse(error));
-            }
-        }
-    }
-
-    public IntSequenceGenerator getSequenceGenerator() {
-        return sequenceGenerator;
-    }
-
-    public String toString() {
-        return next.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ThreadNameFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ThreadNameFilter.java
deleted file mode 100644
index 6a78bd1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ThreadNameFilter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-/**
- * The thread name filter, modifies the name of the thread during the invocation to a transport.
- * It appends the remote address, so that a call stuck in a transport method such as socketWrite0
- * will have the destination information in the thread name.
- * This is extremely useful for thread dumps when debugging.
- * To enable this transport, in the transport URI, simpley add<br/>
- * <code>transport.threadName</code>.<br/>
- * For example:</br>
- * <pre><code>
- * &lt;transportConnector 
- *     name=&quot;tcp1&quot; 
- *     uri=&quot;tcp://127.0.0.1:61616?transport.soTimeout=10000&amp;transport.threadName"
- * /&gt;
- * </code></pre>
- * @author Filip Hanik
- *
- */
-public class ThreadNameFilter extends TransportFilter {
-
-    public ThreadNameFilter(Transport next) {
-        super(next);
-    }
-
-    @Override
-    public void oneway(Object command) throws IOException {
-        String address =(next!=null?next.getRemoteAddress():null); 
-        if (address!=null) {
-            String name = Thread.currentThread().getName();
-            try {
-                String sendname = name + " - SendTo:"+address;
-                Thread.currentThread().setName(sendname);
-                super.oneway(command);
-            }finally {
-                Thread.currentThread().setName(name);
-            }
-        } else {
-            super.oneway(command);
-        }
-    }
-    
-    
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
deleted file mode 100755
index 8de83b7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.net.URI;
-import org.apache.activemq.Service;
-
-/**
- * Represents the client side of a transport allowing messages to be sent
- * synchronously, asynchronously and consumed.
- * 
- * 
- */
-public interface Transport extends Service {
-
-    /**
-     * A one way asynchronous send
-     * 
-     * @param command
-     * @throws IOException
-     */
-    void oneway(Object command) throws IOException;
-
-    /**
-     * An asynchronous request response where the Receipt will be returned in
-     * the future. If responseCallback is not null, then it will be called when
-     * the response has been completed.
-     * 
-     * @param command
-     * @param responseCallback TODO
-     * @return the FutureResponse
-     * @throws IOException
-     */
-    FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException;
-
-    /**
-     * A synchronous request response
-     * 
-     * @param command
-     * @return the response
-     * @throws IOException
-     */
-    Object request(Object command) throws IOException;
-
-    /**
-     * A synchronous request response
-     * 
-     * @param command
-     * @param timeout
-     * @return the repsonse or null if timeout
-     * @throws IOException
-     */
-    Object request(Object command, int timeout) throws IOException;
-
-    // /**
-    // * A one way asynchronous send
-    // * @param command
-    // * @throws IOException
-    // */
-    // void oneway(Command command) throws IOException;
-    //
-    // /**
-    // * An asynchronous request response where the Receipt will be returned
-    // * in the future. If responseCallback is not null, then it will be called
-    // * when the response has been completed.
-    // *
-    // * @param command
-    // * @param responseCallback TODO
-    // * @return the FutureResponse
-    // * @throws IOException
-    // */
-    // FutureResponse asyncRequest(Command command, ResponseCallback
-    // responseCallback) throws IOException;
-    //    
-    // /**
-    // * A synchronous request response
-    // * @param command
-    // * @return the response
-    // * @throws IOException
-    // */
-    // Response request(Command command) throws IOException;
-    //
-    // /**
-    // * A synchronous request response
-    // * @param command
-    // * @param timeout
-    // * @return the repsonse or null if timeout
-    // * @throws IOException
-    // */
-    // Response request(Command command, int timeout) throws IOException;
-
-    /**
-     * Returns the current transport listener
-     * 
-     * @return
-     */
-    TransportListener getTransportListener();
-
-    /**
-     * Registers an inbound command listener
-     * 
-     * @param commandListener
-     */
-    void setTransportListener(TransportListener commandListener);
-
-    /**
-     * @param target
-     * @return the target
-     */
-    <T> T narrow(Class<T> target);
-
-    /**
-     * @return the remote address for this connection
-     */
-    String getRemoteAddress();
-
-    /**
-     * Indicates if the transport can handle faults
-     * 
-     * @return true if fault tolerant
-     */
-    boolean isFaultTolerant();
-    
-    /**
-     * @return true if the transport is disposed
-     */
-    boolean isDisposed();
-    
-    /**
-     * @return true if the transport is connected
-     */
-    boolean isConnected();
-    
-    /**
-     * @return true if reconnect is supported
-     */
-    boolean isReconnectSupported();
-    
-    /**
-     * @return true if updating uris is supported
-     */
-    boolean isUpdateURIsSupported();
-    /**
-     * reconnect to another location
-     * @param uri
-     * @throws IOException on failure of if not supported
-     */
-    void reconnect(URI uri) throws IOException;
-    
-    /**
-     * Provide a list of available alternative locations
-     * @param rebalance 
-     * @param uris
-     * @throws IOException
-     */
-    void updateURIs(boolean rebalance,URI[] uris) throws IOException;
-
-    /**
-     * Returns a counter which gets incremented as data is read from the transport.
-     * It should only be used to determine if there is progress being made in reading the next command from the transport.  
-     * The value may wrap into the negative numbers. 
-     * 
-     * @return a counter which gets incremented as data is read from the transport.
-     */
-    int getReceiveCounter();    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportAcceptListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportAcceptListener.java
deleted file mode 100755
index 9ab063c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportAcceptListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.transport;
-
-
-public interface TransportAcceptListener {
-    
-    void onAccept(Transport transport);
-    
-    void onAcceptError(Exception error);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportDisposedIOException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportDisposedIOException.java
deleted file mode 100644
index 632fc05..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportDisposedIOException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-/**
- * This is exception is thrown when the transport is disposed
- * 
- * 
- */
-public class TransportDisposedIOException extends IOException {
-
-    private static final long serialVersionUID = -7107323414439622596L;
-
-    public TransportDisposedIOException() {
-        super();
-    }
-
-    /**
-     * @param message
-     */
-    public TransportDisposedIOException(String message) {
-        super(message);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
deleted file mode 100755
index 3dd9203..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executor;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.SslContext;
-import org.apache.activemq.util.FactoryFinder;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.wireformat.WireFormatFactory;
-
-public abstract class TransportFactory {
-
-    private static final FactoryFinder TRANSPORT_FACTORY_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/transport/");
-    private static final FactoryFinder WIREFORMAT_FACTORY_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/wireformat/");
-    private static final ConcurrentHashMap<String, TransportFactory> TRANSPORT_FACTORYS = new ConcurrentHashMap<String, TransportFactory>();
-
-    private static final String WRITE_TIMEOUT_FILTER = "soWriteTimeout";
-    private static final String THREAD_NAME_FILTER = "threadName";
-    
-    public abstract TransportServer doBind(URI location) throws IOException;
-
-    public Transport doConnect(URI location, Executor ex) throws Exception {
-        return doConnect(location);
-    }
-
-    public Transport doCompositeConnect(URI location, Executor ex) throws Exception {
-        return doCompositeConnect(location);
-    }
-
-    /**
-     * Creates a normal transport.
-     * 
-     * @param location
-     * @return the transport
-     * @throws Exception
-     */
-    public static Transport connect(URI location) throws Exception {
-        TransportFactory tf = findTransportFactory(location);
-        return tf.doConnect(location);
-    }
-
-    /**
-     * Creates a normal transport.
-     * 
-     * @param location
-     * @param ex
-     * @return the transport
-     * @throws Exception
-     */
-    public static Transport connect(URI location, Executor ex) throws Exception {
-        TransportFactory tf = findTransportFactory(location);
-        return tf.doConnect(location, ex);
-    }
-
-    /**
-     * Creates a slimmed down transport that is more efficient so that it can be
-     * used by composite transports like reliable and HA.
-     * 
-     * @param location
-     * @return the Transport
-     * @throws Exception
-     */
-    public static Transport compositeConnect(URI location) throws Exception {
-        TransportFactory tf = findTransportFactory(location);
-        return tf.doCompositeConnect(location);
-    }
-
-    /**
-     * Creates a slimmed down transport that is more efficient so that it can be
-     * used by composite transports like reliable and HA.
-     * 
-     * @param location
-     * @param ex
-     * @return the Transport
-     * @throws Exception
-     */
-    public static Transport compositeConnect(URI location, Executor ex) throws Exception {
-        TransportFactory tf = findTransportFactory(location);
-        return tf.doCompositeConnect(location, ex);
-    }
-
-    public static TransportServer bind(URI location) throws IOException {
-        TransportFactory tf = findTransportFactory(location);
-        return tf.doBind(location);
-    }
-
-    /**
-     * @deprecated 
-     */
-    public static TransportServer bind(String brokerId, URI location) throws IOException {
-        return bind(location);
-    }
-    
-    public static TransportServer bind(BrokerService brokerService, URI location) throws IOException {
-        TransportFactory tf = findTransportFactory(location);
-        if( brokerService!=null && tf instanceof BrokerServiceAware ) {
-            ((BrokerServiceAware)tf).setBrokerService(brokerService);
-        }
-        try {
-            if( brokerService!=null ) {
-                SslContext.setCurrentSslContext(brokerService.getSslContext());
-            }
-            return tf.doBind(location);
-        } finally {
-            SslContext.setCurrentSslContext(null);
-        }
-    }    
-
-    public Transport doConnect(URI location) throws Exception {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-            WireFormat wf = createWireFormat(options);
-            Transport transport = createTransport(location, wf);
-            Transport rc = configure(transport, wf, options);
-            if (!options.isEmpty()) {
-                throw new IllegalArgumentException("Invalid connect parameters: " + options);
-            }
-            return rc;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    public Transport doCompositeConnect(URI location) throws Exception {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-            WireFormat wf = createWireFormat(options);
-            Transport transport = createTransport(location, wf);
-            Transport rc = compositeConfigure(transport, wf, options);
-            if (!options.isEmpty()) {
-                throw new IllegalArgumentException("Invalid connect parameters: " + options);
-            }
-            return rc;
-
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-    
-     /**
-      * Allow registration of a transport factory without wiring via META-INF classes
-     * @param scheme
-     * @param tf
-     */
-    public static void registerTransportFactory(String scheme, TransportFactory tf) {
-        TRANSPORT_FACTORYS.put(scheme, tf);
-      }
-
-    /**
-     * Factory method to create a new transport
-     * 
-     * @throws IOException
-     * @throws UnknownHostException
-     */
-    protected Transport createTransport(URI location, WireFormat wf) throws MalformedURLException, UnknownHostException, IOException {
-        throw new IOException("createTransport() method not implemented!");
-    }
-
-    /**
-     * @param location
-     * @return
-     * @throws IOException
-     */
-    private static TransportFactory findTransportFactory(URI location) throws IOException {
-        String scheme = location.getScheme();
-        if (scheme == null) {
-            throw new IOException("Transport not scheme specified: [" + location + "]");
-        }
-        TransportFactory tf = TRANSPORT_FACTORYS.get(scheme);
-        if (tf == null) {
-            // Try to load if from a META-INF property.
-            try {
-                tf = (TransportFactory)TRANSPORT_FACTORY_FINDER.newInstance(scheme);
-                TRANSPORT_FACTORYS.put(scheme, tf);
-            } catch (Throwable e) {
-                throw IOExceptionSupport.create("Transport scheme NOT recognized: [" + scheme + "]", e);
-            }
-        }
-        return tf;
-    }
-
-    protected WireFormat createWireFormat(Map<String, String> options) throws IOException {
-        WireFormatFactory factory = createWireFormatFactory(options);
-        WireFormat format = factory.createWireFormat();
-        return format;
-    }
-
-    protected WireFormatFactory createWireFormatFactory(Map<String, String> options) throws IOException {
-        String wireFormat = (String)options.remove("wireFormat");
-        if (wireFormat == null) {
-            wireFormat = getDefaultWireFormatType();
-        }
-
-        try {
-            WireFormatFactory wff = (WireFormatFactory)WIREFORMAT_FACTORY_FINDER.newInstance(wireFormat);
-            IntrospectionSupport.setProperties(wff, options, "wireFormat.");
-            return wff;
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Could not create wire format factory for: " + wireFormat + ", reason: " + e, e);
-        }
-    }
-
-    protected String getDefaultWireFormatType() {
-        return "default";
-    }
-
-    /**
-     * Fully configures and adds all need transport filters so that the
-     * transport can be used by the JMS client.
-     * 
-     * @param transport
-     * @param wf
-     * @param options
-     * @return
-     * @throws Exception
-     */
-    public Transport configure(Transport transport, WireFormat wf, Map options) throws Exception {
-        transport = compositeConfigure(transport, wf, options);
-
-        transport = new MutexTransport(transport);
-        transport = new ResponseCorrelator(transport);
-
-        return transport;
-    }
-
-    /**
-     * Fully configures and adds all need transport filters so that the
-     * transport can be used by the ActiveMQ message broker. The main difference
-     * between this and the configure() method is that the broker does not issue
-     * requests to the client so the ResponseCorrelator is not needed.
-     * 
-     * @param transport
-     * @param format
-     * @param options
-     * @return
-     * @throws Exception
-     */
-    public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception {
-        if (options.containsKey(THREAD_NAME_FILTER)) {
-            transport = new ThreadNameFilter(transport);
-        }
-        transport = compositeConfigure(transport, format, options);
-        transport = new MutexTransport(transport);
-        return transport;
-    }
-
-    /**
-     * Similar to configure(...) but this avoid adding in the MutexTransport and
-     * ResponseCorrelator transport layers so that the resulting transport can
-     * more efficiently be used as part of a composite transport.
-     * 
-     * @param transport
-     * @param format
-     * @param options
-     * @return
-     */
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-        if (options.containsKey(WRITE_TIMEOUT_FILTER)) {
-            transport = new WriteTimeoutFilter(transport);
-            String soWriteTimeout = (String)options.remove(WRITE_TIMEOUT_FILTER);
-            if (soWriteTimeout!=null) {
-                ((WriteTimeoutFilter)transport).setWriteTimeout(Long.parseLong(soWriteTimeout));
-            }
-        }
-        IntrospectionSupport.setProperties(transport, options);
-        return transport;
-    }
-
-    protected String getOption(Map options, String key, String def) {
-        String rc = (String) options.remove(key);
-        if( rc == null ) {
-            rc = def;
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
deleted file mode 100755
index b0fafe8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.net.URI;
-
-/**
- * 
- */
-public class TransportFilter implements TransportListener, Transport {
-    protected final Transport next;
-    protected TransportListener transportListener;
-
-    public TransportFilter(Transport next) {
-        this.next = next;
-    }
-
-    public TransportListener getTransportListener() {
-        return transportListener;
-    }
-
-    public void setTransportListener(TransportListener channelListener) {
-        this.transportListener = channelListener;
-        if (channelListener == null) {
-            next.setTransportListener(null);
-        } else {
-            next.setTransportListener(this);
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.Service#start()
-     * @throws IOException
-     *             if the next channel has not been set.
-     */
-    public void start() throws Exception {
-        if (next == null) {
-            throw new IOException("The next channel has not been set.");
-        }
-        if (transportListener == null) {
-            throw new IOException("The command listener has not been set.");
-        }
-        next.start();
-    }
-
-    /**
-     * @see org.apache.activemq.Service#stop()
-     */
-    public void stop() throws Exception {
-        next.stop();
-    }
-
-    public void onCommand(Object command) {
-        transportListener.onCommand(command);
-    }
-
-    /**
-     * @return Returns the next.
-     */
-    public Transport getNext() {
-        return next;
-    }
-
-    @Override
-    public String toString() {
-        return next.toString();
-    }
-
-    public void oneway(Object command) throws IOException {
-        next.oneway(command);
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        return next.asyncRequest(command, null);
-    }
-
-    public Object request(Object command) throws IOException {
-        return next.request(command);
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        return next.request(command, timeout);
-    }
-
-    public void onException(IOException error) {
-        transportListener.onException(error);
-    }
-
-    public void transportInterupted() {
-        transportListener.transportInterupted();
-    }
-
-    public void transportResumed() {
-        transportListener.transportResumed();
-    }
-
-    public <T> T narrow(Class<T> target) {
-        if (target.isAssignableFrom(getClass())) {
-            return target.cast(this);
-        }
-        return next.narrow(target);
-    }
-
-    public String getRemoteAddress() {
-        return next.getRemoteAddress();
-    }
-
-    /**
-     * @return
-     * @see org.apache.activemq.transport.Transport#isFaultTolerant()
-     */
-    public boolean isFaultTolerant() {
-        return next.isFaultTolerant();
-    }
-
-    public boolean isDisposed() {
-        return next.isDisposed();
-    }
-
-    public boolean isConnected() {
-        return next.isConnected();
-    }
-
-    public void reconnect(URI uri) throws IOException {
-        next.reconnect(uri);
-    }
-
-    public int getReceiveCounter() {
-        return next.getReceiveCounter();
-    }
-
-    public boolean isReconnectSupported() {
-        return next.isReconnectSupported();
-    }
-
-    public boolean isUpdateURIsSupported() {
-        return next.isUpdateURIsSupported();
-    }
-
-    public void updateURIs(boolean rebalance,URI[] uris) throws IOException {
-        next.updateURIs(rebalance,uris);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java
deleted file mode 100755
index 477dd9b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-
-/**
- * An asynchronous listener of commands
- *
- * 
- */
-public interface TransportListener {
-    
-    /**
-     * called to process a command
-     * @param command
-     */
-    void onCommand(Object command);
-    /**
-     * An unrecoverable exception has occured on the transport
-     * @param error
-     */
-    void onException(IOException error);
-    
-    /**
-     * The transport has suffered an interuption from which it hopes to recover
-     *
-     */
-    void transportInterupted();
-    
-    
-    /**
-     * The transport has resumed after an interuption
-     *
-     */
-    void transportResumed();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java
deleted file mode 100755
index 60b38a4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-
-import org.slf4j.Logger;
-
-/**
- * This TransportFilter implementation writes output to a log
- * as it intercepts commands / events before sending them to the
- * following layer in the Transport stack.
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public class TransportLogger extends TransportFilter {
-
-    private final Logger log;
-    private boolean logging;
-    private final LogWriter logWriter;
-    private TransportLoggerView view;
-
-    public TransportLogger(Transport next, Logger log, boolean startLogging, LogWriter logWriter) {
-        // Changed constructor to pass the implementation of the LogWriter interface
-        // that will be used to write the messages.
-        super(next);
-        this.log = log;
-        this.logging = startLogging;
-        this.logWriter = logWriter;
-    }
-
-    /**
-     * Returns true if logging is activated for this TransportLogger, false otherwise.
-     * @return true if logging is activated for this TransportLogger, false otherwise.
-     */
-    public boolean isLogging() {
-        return logging;
-    }
-
-    /**
-     * Sets if logging should be activated for this TransportLogger.
-     * @param logging true to activate logging, false to deactivate.
-     */
-    public void setLogging(boolean logging) {
-        this.logging = logging;
-    } 
-
-    public Object request(Object command) throws IOException {
-        // Changed this method to use a LogWriter object to actually 
-        // print the messages to the log, and only in case of logging 
-        // being active, instead of logging the message directly.
-        if (logging)
-            logWriter.logRequest(log, command);
-        Object rc = super.request(command);
-        if (logging)
-            logWriter.logResponse(log, command);
-        return rc;
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        // Changed this method to use a LogWriter object to actually 
-        // print the messages to the log, and only in case of logging 
-        // being active, instead of logging the message directly.
-        if (logging)
-            logWriter.logRequest(log, command);
-        Object rc = super.request(command, timeout);
-        if (logging)
-            logWriter.logResponse(log, command);
-        return rc;
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        // Changed this method to use a LogWriter object to actually 
-        // print the messages to the log, and only in case of logging 
-        // being active, instead of logging the message directly.
-        if (logging)
-            logWriter.logAsyncRequest(log, command);
-        FutureResponse rc = next.asyncRequest(command, responseCallback);
-        return rc;
-    }
-
-    public void oneway(Object command) throws IOException {
-        // Changed this method to use a LogWriter object to actually 
-        // print the messages to the log, and only in case of logging 
-        // being active, instead of logging the message directly.
-        if( logging && log.isDebugEnabled() ) {
-            logWriter.logOneWay(log, command);
-        }
-        next.oneway(command);
-    }
-
-    public void onCommand(Object command) {
-        // Changed this method to use a LogWriter object to actually 
-        // print the messages to the log, and only in case of logging 
-        // being active, instead of logging the message directly.
-        if( logging && log.isDebugEnabled() ) {
-            logWriter.logReceivedCommand(log, command);
-        }
-        getTransportListener().onCommand(command);
-    }
-
-    public void onException(IOException error) {
-        // Changed this method to use a LogWriter object to actually 
-        // print the messages to the log, and only in case of logging 
-        // being active, instead of logging the message directly.
-        if( logging && log.isDebugEnabled() ) {
-            logWriter.logReceivedException(log, error);
-        }
-        getTransportListener().onException(error);
-    }
-
-    /**
-     * Gets the associated MBean for this TransportLogger.
-     * @return the associated MBean for this TransportLogger.
-     */
-    public TransportLoggerView getView() {
-        return view;
-    }
-
-    /**
-     * Sets the associated MBean for this TransportLogger.
-     * @param view the associated MBean for this TransportLogger.
-     */
-    public void setView(TransportLoggerView view) {
-        this.view = view;
-    }
-
-
-    public String toString() {
-        return next.toString();
-    }
-
-
-    /**
-     * We need to override this method
-     * so that we can unregister the associated
-     * MBean to avoid a memory leak.
-     */
-    public void finalize() throws Throwable {
-        if (view != null) {
-            view.unregister();    
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerControl.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerControl.java
deleted file mode 100644
index b9f3ac2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerControl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.transport;
-
-import org.apache.activemq.broker.jmx.BrokerView;
-import org.apache.activemq.broker.jmx.ManagementContext;
-
-/**
- * Implementation of the TransportLoggerControlMBean interface,
- * which is an MBean used to control all TransportLoggers at once.
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public class TransportLoggerControl implements TransportLoggerControlMBean {
-
-    /**
-     * Constructor
-     */
-    public TransportLoggerControl(ManagementContext managementContext) {
-    }
-
-    // doc comment inherited from TransportLoggerControlMBean
-    public void disableAllTransportLoggers() {
-        TransportLoggerView.disableAllTransportLoggers();
-    }
-
-    // doc comment inherited from TransportLoggerControlMBean
-    public void enableAllTransportLoggers() {
-        TransportLoggerView.enableAllTransportLoggers();
-    }
-
-    //  doc comment inherited from TransportLoggerControlMBean
-    public void reloadLog4jProperties() throws Throwable {
-        new BrokerView(null, null).reloadLog4jProperties();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerControlMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerControlMBean.java
deleted file mode 100644
index 44c1201..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerControlMBean.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.transport;
-
-/**
- * MBean used to manage all of the TransportLoggers at once.
- * Avalaible operations:
- *  -Enable logging for all TransportLoggers at once.
- *  -Disable logging for all TransportLoggers at once.
- *  
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public interface TransportLoggerControlMBean {
-
-    /**
-     * Enable logging for all Transport Loggers at once.
-     */
-    public void enableAllTransportLoggers();
-
-    /**
-     * Disable logging for all Transport Loggers at once.
-     */
-    public void disableAllTransportLoggers();
-
-    /**
-     * Reloads log4j.properties from the classpath
-     * @throws Throwable 
-     */
-    public void reloadLog4jProperties() throws Throwable;
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerFactory.java
deleted file mode 100644
index 6ba2f3a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerFactory.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * 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.transport;
-
-import org.apache.activemq.broker.jmx.AnnotatedMBean;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.LogWriterFinder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.IOException;
-import javax.management.ObjectName;
-
-/**
- * Singleton class to create TransportLogger objects.
- * When the method getInstance() is called for the first time,
- * a TransportLoggerControlMBean is created and registered.
- * This MBean permits enabling and disabling the logging for
- * all TransportLogger objects at once.
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- * @see TransportLoggerControlMBean
- */
-public class TransportLoggerFactory {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TransportLoggerFactory.class);
-
-    private static TransportLoggerFactory instance;
-    private static int lastId=0;
-    private static final LogWriterFinder logWriterFinder = new LogWriterFinder("META-INF/services/org/apache/activemq/transport/logwriters/");
-
-    /**
-     * LogWriter that will be used if none is specified.
-     */
-    public static String defaultLogWriterName = "default";
-    /**
-     * If transport logging is enabled, it will be possible to control
-     * the transport loggers or not based on this value 
-     */
-    private static boolean defaultDynamicManagement = false;
-    /**
-     * If transport logging is enabled, the transport loggers will initially
-     * output or not depending on this value.
-     * This setting only has a meaning if 
-     */
-    private static boolean defaultInitialBehavior = true;
-    /**
-     * Default port to control the transport loggers through JMX
-     */
-    private static int defaultJmxPort = 1099;
-
-    private boolean transportLoggerControlCreated = false;
-    private ManagementContext managementContext;
-    private ObjectName objectName;
-
-    /**
-     * Private constructor.
-     */
-    private TransportLoggerFactory() {
-    }
-
-    /**
-     * Returns a TransportLoggerFactory object which can be used to create TransportLogger objects.
-     * @return a TransportLoggerFactory object
-     */
-    public static synchronized TransportLoggerFactory getInstance() {
-        if (instance == null) {
-            instance = new TransportLoggerFactory();
-        }
-        return instance;
-    }
-
-    public void stop() {
-        try {
-            if (this.transportLoggerControlCreated) {
-                this.managementContext.unregisterMBean(this.objectName);
-                this.managementContext.stop();
-                this.managementContext = null;
-            }
-        } catch (Exception e) {
-            LOG.error("TransportLoggerFactory could not be stopped, reason: " + e, e);
-        }
-
-    }
-
-    /**
-     * Creates a TransportLogger object, that will be inserted in the Transport Stack.
-     * Uses the default initial behavior, the default log writer, and creates a new
-     * log4j object to be used by the TransportLogger.
-     * @param next The next Transport layer in the Transport stack.
-     * @return A TransportLogger object.
-     * @throws IOException
-     */
-    public TransportLogger createTransportLogger(Transport next) throws IOException {
-        int id = getNextId();
-        return createTransportLogger(next, id, createLog(id), defaultLogWriterName, defaultDynamicManagement, defaultInitialBehavior, defaultJmxPort);
-    }
-    
-    /**
-     * Creates a TransportLogger object, that will be inserted in the Transport Stack.
-     * Uses the default initial behavior and the default log writer.
-     * @param next The next Transport layer in the Transport stack.
-     * @param log The log4j log that will be used by the TransportLogger.
-     * @return A TransportLogger object.
-     * @throws IOException
-     */
-    public TransportLogger createTransportLogger(Transport next, Logger log) throws IOException {
-        return createTransportLogger(next, getNextId(), log, defaultLogWriterName, defaultDynamicManagement, defaultInitialBehavior, defaultJmxPort);
-    }
-
-    /**
-     * Creates a TransportLogger object, that will be inserted in the Transport Stack.
-     * Creates a new log4j object to be used by the TransportLogger.
-     * @param next The next Transport layer in the Transport stack.
-     * @param startLogging Specifies if this TransportLogger should be initially active or not.
-     * @param logWriterName The name or the LogWriter to be used. Different log writers can output
-     * logs with a different format.
-     * @return A TransportLogger object.
-     * @throws IOException
-     */
-    public TransportLogger createTransportLogger(Transport next, String logWriterName,
-            boolean useJmx, boolean startLogging, int jmxport) throws IOException {
-        int id = getNextId();
-        return createTransportLogger(next, id, createLog(id), logWriterName, useJmx, startLogging, jmxport);
-    }
-
-
-
-    /**
-     * Creates a TransportLogger object, that will be inserted in the Transport Stack.
-     * @param next The next Transport layer in the Transport stack.
-     * @param id The id of the transport logger.
-     * @param log The log4j log that will be used by the TransportLogger.
-     * @param logWriterName The name or the LogWriter to be used. Different log writers can output
-     * @param dynamicManagement Specifies if JMX will be used to switch on/off the TransportLogger to be created.
-     * @param startLogging Specifies if this TransportLogger should be initially active or not. Only has a meaning if
-     * dynamicManagement = true.
-     * @param jmxPort the port to be used by the JMX server. It should only be different from 1099 (broker's default JMX port)
-     * when it's a client that is using Transport Logging. In a broker, if the port is different from 1099, 2 JMX servers will
-     * be created, both identical, with all the MBeans.
-     * @return A TransportLogger object.
-     * @throws IOException
-     */
-    public TransportLogger createTransportLogger(Transport next, int id, Logger log,
-            String logWriterName, boolean dynamicManagement, boolean startLogging, int jmxport) throws IOException {
-        try {
-            LogWriter logWriter = logWriterFinder.newInstance(logWriterName);
-            TransportLogger tl =  new TransportLogger (next, log, startLogging, logWriter);
-            if (dynamicManagement) {
-                synchronized (this) {
-                    if (!this.transportLoggerControlCreated) {
-                        this.createTransportLoggerControl(jmxport);
-                    }
-                }
-                TransportLoggerView tlv = new TransportLoggerView(tl, next.toString(), id, this.managementContext);
-                tl.setView(tlv);
-            }
-            return tl;
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Could not create log writer object for: " + logWriterName + ", reason: " + e, e);
-        }
-    }
-
-    synchronized private static int getNextId() {
-        return ++lastId;
-    }
-
-    private static Logger createLog(int id) {
-        return LoggerFactory.getLogger(TransportLogger.class.getName()+".Connection:" + id);
-    }
-    
-    /**
-     * Starts the management context.
-     * Creates and registers a TransportLoggerControl MBean which enables the user
-     * to enable/disable logging for all transport loggers at once.
-     */
-     private void createTransportLoggerControl(int port) {
-         try {
-             this.managementContext = new ManagementContext();
-             this.managementContext.setConnectorPort(port);
-             this.managementContext.start();
-         } catch (Exception e) {
-             LOG.error("Management context could not be started, reason: " + e, e);
-         }
-
-         try {
-             this.objectName = new ObjectName(this.managementContext.getJmxDomainName()+":"+ "Type=TransportLoggerControl");
-             AnnotatedMBean.registerMBean(this.managementContext, new TransportLoggerControl(this.managementContext),this.objectName);
-             
-             this.transportLoggerControlCreated = true;
-
-         } catch (Exception e) {
-             LOG.error("TransportLoggerControlMBean could not be registered, reason: " + e, e);
-         }
-     }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerView.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerView.java
deleted file mode 100644
index b034e08..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerView.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * 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.transport;
-
-import java.lang.ref.WeakReference;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.jmx.AnnotatedMBean;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.util.JMXSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Class implementing the TransportLoggerViewMBean interface.
- * When an object of this class is created, it registers itself in
- * the MBeanServer of the management context provided.
- * When a TransportLogger object is finalized because the Transport Stack
- * where it resides is no longer in use, the method unregister() will be called.
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- *  
- * @see TransportLoggerViewMBean.
- */
-public class TransportLoggerView implements TransportLoggerViewMBean {
-
-    private static final Logger log = LoggerFactory.getLogger(TransportLoggerView.class);
-    
-    /**
-     * Set with the TransportLoggerViews objects created.
-     * Used by the methods enableAllTransportLoggers and diablellTransportLoggers.
-     * The method unregister() removes objects from this set.
-     */
-    private static Set<TransportLoggerView> transportLoggerViews = Collections.synchronizedSet(new HashSet<TransportLoggerView>());
-
-    private final WeakReference<TransportLogger> transportLogger;
-    private final String nextTransportName;
-    private final int id;
-    private final ManagementContext managementContext;
-    private final ObjectName name;
-
-    /**
-     * Constructor.
-     * @param transportLogger The TransportLogger object which is to be managed by this MBean.
-     * @param nextTransportName The name of the next TransportLayer. This is used to give a unique
-     * name for each MBean of the TransportLoggerView class.
-     * @param id The id of the TransportLogger to be watched.
-     * @param managementContext The management context who has the MBeanServer where this MBean will be registered.
-     */
-    public TransportLoggerView (TransportLogger transportLogger, String nextTransportName, int id, ManagementContext managementContext) {
-        this.transportLogger = new WeakReference<TransportLogger>(transportLogger);
-        this.nextTransportName = nextTransportName;
-        this.id = id;
-        this.managementContext = managementContext;
-        this.name = this.createTransportLoggerObjectName();
-        
-        TransportLoggerView.transportLoggerViews.add(this);
-        this.register();
-    }
-    
-    /**
-     * Enable logging for all Transport Loggers at once.
-     */
-    public static void enableAllTransportLoggers() {
-        for (TransportLoggerView view : transportLoggerViews) {
-            view.enableLogging();
-        }
-    }
-    
-    /**
-     * Disable logging for all Transport Loggers at once.
-     */
-    public static void disableAllTransportLoggers() {
-        for (TransportLoggerView view : transportLoggerViews) {
-            view.disableLogging();
-        }
-    }
-
-    // doc comment inherited from TransportLoggerViewMBean
-    public void enableLogging() {
-        this.setLogging(true);
-    }
-
-    // doc comment inherited from TransportLoggerViewMBean
-    public void disableLogging() {
-        this.setLogging(false);
-    }   
-
-    // doc comment inherited from TransportLoggerViewMBean
-    public boolean isLogging() {
-        return transportLogger.get().isLogging();
-    }
-
-    // doc comment inherited from TransportLoggerViewMBean
-    public void setLogging(boolean logging) {
-        transportLogger.get().setLogging(logging);
-    }
-
-    /**
-     * Registers this MBean in the MBeanServer of the management context
-     * provided at creation time. This method is only called by the constructor.
-     */
-    private void register() {
-        try {
-        	AnnotatedMBean.registerMBean(this.managementContext, this, this.name);
-        } catch (Exception e) {
-            log.error("Could not register MBean for TransportLoggerView " + id + "with name " + this.name.toString() + ", reason: " + e, e);
-        }
-
-    }
-
-    /**
-     * Unregisters the MBean from the MBeanServer of the management context
-     * provided at creation time.
-     * This method is called by the TransportLogger object being managed when
-     * the TransportLogger object is finalized, to avoid the memory leak that
-     * would be caused if MBeans were not unregistered. 
-     */
-    public void unregister() {
-        
-        TransportLoggerView.transportLoggerViews.remove(this);
-        
-        try {
-            this.managementContext.unregisterMBean(this.name);
-        } catch (Exception e) {
-            log.error("Could not unregister MBean for TransportLoggerView " + id + "with name " + this.name.toString() + ", reason: " + e, e);
-        }
-    }
-
-    /**
-     * Creates the ObjectName to be used when registering the MBean.
-     * @return the ObjectName to be used when registering the MBean.
-     */
-    private ObjectName createTransportLoggerObjectName()  {
-        try {
-            return new ObjectName(
-                    createTransportLoggerObjectNameRoot(this.managementContext)
-                    + JMXSupport.encodeObjectNamePart(TransportLogger.class.getSimpleName()
-                            + " " + this.id + ";" + this.nextTransportName));
-        } catch (Exception e) {
-            log.error("Could not create ObjectName for TransportLoggerView " + id + ", reason: " + e, e);
-            return null;
-        }
-    }
-
-    /**
-     * Creates the part of the ObjectName that will be used by all MBeans.
-     * This method is public so it can be used by the TransportLoggerControl class.
-     * @param managementContext
-     * @return A String with the part of the ObjectName common to all the TransportLoggerView MBeans.
-     */
-    public static String createTransportLoggerObjectNameRoot(ManagementContext managementContext) {
-        return managementContext.getJmxDomainName()+":"+"Type=TransportLogger,"+"TransportLoggerName=";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerViewMBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerViewMBean.java
deleted file mode 100644
index 58c0d31..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLoggerViewMBean.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.transport;
-
-/**
- * MBean to manage a single Transport Logger.
- * It can inform if the logger is currently writing to a log file or not,
- * by setting the logging property or by using the operations
- * enableLogging() and disableLogging().
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public interface TransportLoggerViewMBean {
-
-    /**
-     * Returns if the managed TransportLogger is currently active
-     * (writing to a log) or not.
-     * @return if the managed TransportLogger is currently active
-     * (writing to a log) or not.
-     */
-    public boolean isLogging();
-    
-    /**
-     * Enables or disables logging for the managed TransportLogger.
-     * @param logging Boolean value to enable or disable logging for
-     * the managed TransportLogger.
-     * true to enable logging, false to disable logging.
-     */
-    public void setLogging(boolean logging);
-    
-    /**
-     * Enables logging for the managed TransportLogger.
-     */
-    public void enableLogging();
-    
-    /**
-     * Disables logging for the managed TransportLogger.
-     */
-    public void disableLogging();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServer.java
deleted file mode 100755
index b9a57e2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.InetSocketAddress;
-import java.net.URI;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.BrokerInfo;
-
-/**
- * A TransportServer asynchronously accepts {@see Transport} objects and then
- * delivers those objects to a {@see TransportAcceptListener}.
- * 
- * 
- */
-public interface TransportServer extends Service {
-
-    /**
-     * Registers an {@see TransportAcceptListener} which is notified of accepted
-     * channels.
-     * 
-     * @param acceptListener
-     */
-    void setAcceptListener(TransportAcceptListener acceptListener);
-
-    /**
-     * Associates a broker info with the transport server so that the transport
-     * can do discovery advertisements of the broker.
-     * 
-     * @param brokerInfo
-     */
-    void setBrokerInfo(BrokerInfo brokerInfo);
-
-    URI getConnectURI();
-
-    /**
-     * @return The socket address that this transport is accepting connections
-     *         on or null if this does not or is not currently accepting
-     *         connections on a socket.
-     */
-    InetSocketAddress getSocketAddress();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerFilter.java
deleted file mode 100755
index 74e11dd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerFilter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.InetSocketAddress;
-import java.net.URI;
-
-import org.apache.activemq.command.BrokerInfo;
-
-public class TransportServerFilter implements TransportServer {
-
-    protected final TransportServer next;
-    
-    /**
-     * @param next
-     */
-    public TransportServerFilter(TransportServer next) {
-        this.next = next;
-    }
-
-    public URI getConnectURI() {
-        return next.getConnectURI();
-    }
-
-    public void setAcceptListener(TransportAcceptListener acceptListener) {
-        next.setAcceptListener(acceptListener);
-    }
-
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-        next.setBrokerInfo(brokerInfo);
-    }
-
-    public void start() throws Exception {
-        next.start();
-    }
-
-    public void stop() throws Exception {
-        next.stop();
-    }
-
-    public InetSocketAddress getSocketAddress() {
-        return next.getSocketAddress();
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerSupport.java
deleted file mode 100644
index 4fb61a4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerSupport.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.activemq.util.ServiceSupport;
-
-/**
- * A useful base class for implementations of {@link TransportServer}
- * 
- * 
- */
-public abstract class TransportServerSupport extends ServiceSupport implements TransportServer {
-
-    private URI connectURI;
-    private URI bindLocation;
-    private TransportAcceptListener acceptListener;
-    protected Map<String, Object> transportOptions;
-
-    public TransportServerSupport() {
-    }
-
-    public TransportServerSupport(URI location) {
-        this.connectURI = location;
-        this.bindLocation = location;
-    }
-
-    /**
-     * @return Returns the acceptListener.
-     */
-    public TransportAcceptListener getAcceptListener() {
-        return acceptListener;
-    }
-
-    /**
-     * Registers an accept listener
-     * 
-     * @param acceptListener
-     */
-    public void setAcceptListener(TransportAcceptListener acceptListener) {
-        this.acceptListener = acceptListener;
-    }
-
-    /**
-     * @return Returns the location.
-     */
-    public URI getConnectURI() {
-        return connectURI;
-    }
-
-    /**
-     * @param location The location to set.
-     */
-    public void setConnectURI(URI location) {
-        this.connectURI = location;
-    }
-
-    protected void onAcceptError(Exception e) {
-        if (acceptListener != null) {
-            acceptListener.onAcceptError(e);
-        }
-    }
-
-    public URI getBindLocation() {
-        return bindLocation;
-    }
-
-    public void setBindLocation(URI bindLocation) {
-        this.bindLocation = bindLocation;
-    }
-
-    public void setTransportOption(Map<String, Object> transportOptions) {
-        this.transportOptions = transportOptions;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
deleted file mode 100644
index 033c9d8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.URI;
-
-import org.apache.activemq.ThreadPriorities;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A useful base class for implementations of {@link TransportServer} which uses
- * a background thread to accept new connections.
- * 
- * 
- */
-public abstract class TransportServerThreadSupport extends TransportServerSupport implements Runnable {
-    private static final Logger LOG = LoggerFactory.getLogger(TransportServerThreadSupport.class);
-
-    private boolean daemon = true;
-    private boolean joinOnStop = true;
-    private Thread runner;
-    // should be a multiple of 128k
-    private long stackSize;
-
-    public TransportServerThreadSupport() {
-    }
-
-    public TransportServerThreadSupport(URI location) {
-        super(location);
-    }
-
-    public boolean isDaemon() {
-        return daemon;
-    }
-
-    /**
-     * Sets whether the background read thread is a daemon thread or not
-     */
-    public void setDaemon(boolean daemon) {
-        this.daemon = daemon;
-    }
-
-    public boolean isJoinOnStop() {
-        return joinOnStop;
-    }
-
-    /**
-     * Sets whether the background read thread is joined with (waited for) on a
-     * stop
-     */
-    public void setJoinOnStop(boolean joinOnStop) {
-        this.joinOnStop = joinOnStop;
-    }
-
-    protected void doStart() throws Exception {
-        LOG.info("Listening for connections at: " + getConnectURI());
-        runner = new Thread(null, this, "ActiveMQ Transport Server: " + toString(), stackSize);
-        runner.setDaemon(daemon);
-        runner.setPriority(ThreadPriorities.BROKER_MANAGEMENT);
-        runner.start();
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        if (runner != null && joinOnStop) {
-            runner.join();
-            runner = null;
-        }
-    }
-
-    /**
-     * @return the stackSize
-     */
-    public long getStackSize() {
-        return this.stackSize;
-    }
-
-    /**
-     * @param stackSize the stackSize to set
-     */
-    public void setStackSize(long stackSize) {
-        this.stackSize = stackSize;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
deleted file mode 100644
index cdf1174..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.net.URI;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A useful base class for transport implementations.
- * 
- * 
- */
-public abstract class TransportSupport extends ServiceSupport implements Transport {
-    private static final Logger LOG = LoggerFactory.getLogger(TransportSupport.class);
-
-    TransportListener transportListener;
-
-    /**
-     * Returns the current transport listener
-     */
-    public TransportListener getTransportListener() {
-        return transportListener;
-    }
-
-    /**
-     * Registers an inbound command listener
-     * 
-     * @param commandListener
-     */
-    public void setTransportListener(TransportListener commandListener) {
-        this.transportListener = commandListener;
-    }
-
-    /**
-     * narrow acceptance
-     * 
-     * @param target
-     * @return 'this' if assignable
-     */
-    public <T> T narrow(Class<T> target) {
-        boolean assignableFrom = target.isAssignableFrom(getClass());
-        if (assignableFrom) {
-            return target.cast(this);
-        }
-        return null;
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    /**
-     * Process the inbound command
-     */
-    public void doConsume(Object command) {
-        if (command != null) {
-            if (transportListener != null) {
-                transportListener.onCommand(command);
-            } else {
-                LOG.error("No transportListener available to process inbound command: " + command);
-            }
-        }
-    }
-
-    /**
-     * Passes any IO exceptions into the transport listener
-     */
-    public void onException(IOException e) {
-        if (transportListener != null) {
-            try {
-                transportListener.onException(e);
-            } catch (RuntimeException e2) {
-                // Handle any unexpected runtime exceptions by debug logging
-                // them.
-                LOG.debug("Unexpected runtime exception: " + e2, e2);
-            }
-        }
-    }
-
-    protected void checkStarted() throws IOException {
-        if (!isStarted()) {
-            throw new IOException("The transport is not running.");
-        }
-    }
-
-    public boolean isFaultTolerant() {
-        return false;
-    }
-
-    public void reconnect(URI uri) throws IOException {
-        throw new IOException("Not supported");
-    }
-
-    public boolean isReconnectSupported() {
-        return false;
-    }
-
-    public boolean isUpdateURIsSupported() {
-        return false;
-    }
-    public void updateURIs(boolean reblance,URI[] uris) throws IOException {
-        throw new IOException("Not supported");
-    }
-
-    public boolean isDisposed() {
-        return isStopped();
-    }
-
-    public boolean isConnected() {
-        return isStarted();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
deleted file mode 100644
index e5c2d04..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.transport;
-
-/**
- * A useful base class for a transport implementation which has a background
- * reading thread.
- * 
- * 
- */
-public abstract class TransportThreadSupport extends TransportSupport implements Runnable {
-
-    private boolean daemon;
-    private Thread runner;
-    // should be a multiple of 128k
-    private long stackSize;
-
-    public boolean isDaemon() {
-        return daemon;
-    }
-
-    public void setDaemon(boolean daemon) {
-        this.daemon = daemon;
-    }
-
-    protected void doStart() throws Exception {
-        runner = new Thread(null, this, "ActiveMQ Transport: " + toString(), stackSize);
-        runner.setDaemon(daemon);
-        runner.start();
-    }
-
-    /**
-     * @return the stackSize
-     */
-    public long getStackSize() {
-        return this.stackSize;
-    }
-
-    /**
-     * @param stackSize the stackSize to set
-     */
-    public void setStackSize(long stackSize) {
-        this.stackSize = stackSize;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
deleted file mode 100755
index c86c6ed..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.Socket;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Negotiates the wire format with a new connection
- */
-public class WireFormatNegotiator extends TransportFilter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(WireFormatNegotiator.class);
-
-    private OpenWireFormat wireFormat;
-    private final int minimumVersion;
-    private long negotiateTimeout = 15000L;
-
-    private final AtomicBoolean firstStart = new AtomicBoolean(true);
-    private final CountDownLatch readyCountDownLatch = new CountDownLatch(1);
-    private final CountDownLatch wireInfoSentDownLatch = new CountDownLatch(1);
-
-    /**
-     * Negotiator
-     * 
-     * @param next
-     */
-    public WireFormatNegotiator(Transport next, OpenWireFormat wireFormat, int minimumVersion) {
-        super(next);
-        this.wireFormat = wireFormat;
-        if (minimumVersion <= 0) {
-            minimumVersion = 1;
-        }
-        this.minimumVersion = minimumVersion;
-        
-        // Setup the initial negociation timeout to be the same as the inital max inactivity delay specified on the wireformat
-        // Does not make sense for us to take longer.
-        try {
-            if( wireFormat.getPreferedWireFormatInfo() !=null ) {
-                setNegotiateTimeout(wireFormat.getPreferedWireFormatInfo().getMaxInactivityDurationInitalDelay());
-            }
-        } catch (IOException e) {
-        }
-    }
-
-    public void start() throws Exception {
-        super.start();
-        if (firstStart.compareAndSet(true, false)) {
-            sendWireFormat();
-        }
-    }
-
-    public void sendWireFormat() throws IOException {
-        try {
-            WireFormatInfo info = wireFormat.getPreferedWireFormatInfo();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Sending: " + info);
-            }
-            sendWireFormat(info);
-        } finally {
-            wireInfoSentDownLatch.countDown();
-        }
-    }
-
-    public void stop() throws Exception {
-        super.stop();
-        readyCountDownLatch.countDown();
-    }
-
-    public void oneway(Object command) throws IOException {
-        try {
-            if (!readyCountDownLatch.await(negotiateTimeout, TimeUnit.MILLISECONDS)) {
-                throw new IOException("Wire format negotiation timeout: peer did not send his wire format.");
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            throw new InterruptedIOException();
-        }
-        super.oneway(command);
-    }
-
-    public void onCommand(Object o) {
-        Command command = (Command)o;
-        if (command.isWireFormatInfo()) {
-            WireFormatInfo info = (WireFormatInfo)command;
-            negociate(info);
-        }
-        getTransportListener().onCommand(command);
-    }
-
-    public void negociate(WireFormatInfo info) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Received WireFormat: " + info);
-        }
-
-        try {
-            wireInfoSentDownLatch.await();
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(this + " before negotiation: " + wireFormat);
-            }
-            if (!info.isValid()) {
-                onException(new IOException("Remote wire format magic is invalid"));
-            } else if (info.getVersion() < minimumVersion) {
-                onException(new IOException("Remote wire format (" + info.getVersion() + ") is lower the minimum version required (" + minimumVersion + ")"));
-            }
-
-            wireFormat.renegotiateWireFormat(info);
-            Socket socket = next.narrow(Socket.class);
-            if (socket != null) {
-                socket.setTcpNoDelay(wireFormat.isTcpNoDelayEnabled());
-            }
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(this + " after negotiation: " + wireFormat);
-            }
-
-        } catch (IOException e) {
-            onException(e);
-        } catch (InterruptedException e) {
-            onException((IOException)new InterruptedIOException().initCause(e));
-        } catch (Exception e) {
-            onException(IOExceptionSupport.create(e));
-        }
-        readyCountDownLatch.countDown();
-        onWireFormatNegotiated(info);
-    }
-
-    public void onException(IOException error) {
-        readyCountDownLatch.countDown();
-        /*
-         * try { super.oneway(new ExceptionResponse(error)); } catch
-         * (IOException e) { // ignore as we are already throwing an exception }
-         */
-        super.onException(error);
-    }
-
-    public String toString() {
-        return next.toString();
-    }
-
-    protected void sendWireFormat(WireFormatInfo info) throws IOException {
-        next.oneway(info);
-    }
-
-    protected void onWireFormatNegotiated(WireFormatInfo info) {
-    }
-
-    public long getNegotiateTimeout() {
-        return negotiateTimeout;
-    }
-
-    public void setNegotiateTimeout(long negotiateTimeout) {
-        this.negotiateTimeout = negotiateTimeout;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WriteTimeoutFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WriteTimeoutFilter.java
deleted file mode 100644
index 620ef2a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WriteTimeoutFilter.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.apache.activemq.transport.tcp.TcpBufferedOutputStream;
-import org.apache.activemq.transport.tcp.TimeStampStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This filter implements write timeouts for socket write operations.
- * When using blocking IO, the Java implementation doesn't have an explicit flag
- * to set a timeout, and can cause operations to block forever (or until the TCP stack implementation times out the retransmissions,
- * which is usually around 13-30 minutes).<br/>
- * To enable this transport, in the transport URI, simpley add<br/>
- * <code>transport.soWriteTimeout=<value in millis></code>.<br/>
- * For example (15 second timeout on write operations to the socket):</br>
- * <pre><code>
- * &lt;transportConnector 
- *     name=&quot;tcp1&quot; 
- *     uri=&quot;tcp://127.0.0.1:61616?transport.soTimeout=10000&amp;transport.soWriteTimeout=15000"
- * /&gt;
- * </code></pre><br/>
- * For example (enable default timeout on the socket):</br>
- * <pre><code>
- * &lt;transportConnector 
- *     name=&quot;tcp1&quot; 
- *     uri=&quot;tcp://127.0.0.1:61616?transport.soTimeout=10000&amp;transport.soWriteTimeout=15000"
- * /&gt;
- * </code></pre>
- * @author Filip Hanik
- *
- */
-public class WriteTimeoutFilter extends TransportFilter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(WriteTimeoutFilter.class);
-    protected static ConcurrentLinkedQueue<WriteTimeoutFilter> writers = new ConcurrentLinkedQueue<WriteTimeoutFilter>();
-    protected static AtomicInteger messageCounter = new AtomicInteger(0);
-    protected static TimeoutThread timeoutThread = new TimeoutThread(); 
-    
-    protected static long sleep = 5000l;
-
-    protected long writeTimeout = -1;
-    
-    public WriteTimeoutFilter(Transport next) {
-        super(next);
-    }
-
-    @Override
-    public void oneway(Object command) throws IOException {
-        try {
-            registerWrite(this);
-            super.oneway(command);
-        } catch (IOException x) {
-            throw x;
-        } finally {
-            deRegisterWrite(this,false,null);
-        }
-    }
-    
-    public long getWriteTimeout() {
-        return writeTimeout;
-    }
-
-    public void setWriteTimeout(long writeTimeout) {
-        this.writeTimeout = writeTimeout;
-    }
-    
-    public static long getSleep() {
-        return sleep;
-    }
-
-    public static void setSleep(long sleep) {
-        WriteTimeoutFilter.sleep = sleep;
-    }
-
-    
-    protected TimeStampStream getWriter() {
-        return next.narrow(TimeStampStream.class);
-    }
-    
-    protected Socket getSocket() {
-        return next.narrow(Socket.class);
-    }
-    
-    protected static void registerWrite(WriteTimeoutFilter filter) {
-        writers.add(filter);
-    }
-    
-    protected static boolean deRegisterWrite(WriteTimeoutFilter filter, boolean fail, IOException iox) {
-        boolean result = writers.remove(filter); 
-        if (result) {
-            if (fail) {
-                String message = "Forced write timeout for:"+filter.getNext().getRemoteAddress();
-                LOG.warn(message);
-                Socket sock = filter.getSocket();
-                if (sock==null) {
-                    LOG.error("Destination socket is null, unable to close socket.("+message+")");
-                } else {
-                    try {
-                        sock.close();
-                    }catch (IOException ignore) {
-                    }
-                }
-            }
-        }
-        return result;
-    }
-    
-    @Override
-    public void start() throws Exception {
-        super.start();
-    }
-    
-    @Override
-    public void stop() throws Exception {
-        super.stop();
-    }
-    
-    protected static class TimeoutThread extends Thread {
-        static AtomicInteger instance = new AtomicInteger(0);
-        boolean run = true;
-        public TimeoutThread() {
-            setName("WriteTimeoutFilter-Timeout-"+instance.incrementAndGet());
-            setDaemon(true);
-            setPriority(Thread.MIN_PRIORITY);
-            start();
-        }
-
-        
-        public void run() {
-            while (run) {
-            	boolean error = false;
-                try {
-                	if (!interrupted()) {
-                		Iterator<WriteTimeoutFilter> filters = writers.iterator();
-                	    while (run && filters.hasNext()) { 
-                            WriteTimeoutFilter filter = filters.next();
-                            if (filter.getWriteTimeout()<=0) continue; //no timeout set
-                            long writeStart = filter.getWriter().getWriteTimestamp();
-                            long delta = (filter.getWriter().isWriting() && writeStart>0)?System.currentTimeMillis() - writeStart:-1;
-                            if (delta>filter.getWriteTimeout()) {
-                                WriteTimeoutFilter.deRegisterWrite(filter, true,null);
-                            }//if timeout
-                        }//while
-                    }//if interrupted
-                    try {
-                        Thread.sleep(getSleep());
-                        error = false;
-                    } catch (InterruptedException x) {
-                        //do nothing
-                    }
-                }catch (Throwable t) { //make sure this thread never dies
-                    if (!error) { //use error flag to avoid filling up the logs
-                        LOG.error("WriteTimeout thread unable validate existing sockets.",t);
-                        error = true;
-                    }
-                }
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgent.java
deleted file mode 100755
index 65a6ab5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgent.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import java.io.IOException;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.DiscoveryEvent;
-
-/**
- * An agent used to discover other instances of a service. 
- * 
- * We typically use a discovery agent to auto-discover JMS clients and JMS brokers on a network
- *
- * 
- */
-public interface DiscoveryAgent extends Service {
-
-    /**
-     * Sets the discovery listener
-     * @param listener
-     */
-    void setDiscoveryListener(DiscoveryListener listener);
-
-    /**
-     * register a service
-     * @param name
-     * @param details
-     * @throws JMSException
-     */
-    void registerService(String name) throws IOException;
-    
-    /**
-     * A process actively using a service may see it go down before the DiscoveryAgent notices the
-     * service's failure.  That process can use this method to notify the DiscoveryAgent of the failure
-     * so that other listeners of this DiscoveryAgent can also be made aware of the failure.
-     */
-    void serviceFailed(DiscoveryEvent event) throws IOException;
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgentFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgentFactory.java
deleted file mode 100755
index 75183e2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgentFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.util.FactoryFinder;
-import org.apache.activemq.util.IOExceptionSupport;
-
-public abstract class DiscoveryAgentFactory {
-
-    private static final FactoryFinder DISCOVERY_AGENT_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/transport/discoveryagent/");
-    private static final ConcurrentHashMap<String, DiscoveryAgentFactory> DISCOVERY_AGENT_FACTORYS = new ConcurrentHashMap<String, DiscoveryAgentFactory>();
-
-    /**
-     * @param uri
-     * @return
-     * @throws IOException
-     */
-    private static DiscoveryAgentFactory findDiscoveryAgentFactory(URI uri) throws IOException {
-        String scheme = uri.getScheme();
-        if (scheme == null) {
-            throw new IOException("DiscoveryAgent scheme not specified: [" + uri + "]");
-        }
-        DiscoveryAgentFactory daf = DISCOVERY_AGENT_FACTORYS.get(scheme);
-        if (daf == null) {
-            // Try to load if from a META-INF property.
-            try {
-                daf = (DiscoveryAgentFactory)DISCOVERY_AGENT_FINDER.newInstance(scheme);
-                DISCOVERY_AGENT_FACTORYS.put(scheme, daf);
-            } catch (Throwable e) {
-                throw IOExceptionSupport.create("DiscoveryAgent scheme NOT recognized: [" + scheme + "]", e);
-            }
-        }
-        return daf;
-    }
-
-    public static DiscoveryAgent createDiscoveryAgent(URI uri) throws IOException {
-        DiscoveryAgentFactory tf = findDiscoveryAgentFactory(uri);
-        return tf.doCreateDiscoveryAgent(uri);
-
-    }
-
-    protected abstract DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException;
-    // {
-    // try {
-    // String type = ( uri.getScheme() == null ) ? uri.getPath() :
-    // uri.getScheme();
-    // DiscoveryAgent rc = (DiscoveryAgent)
-    // discoveryAgentFinder.newInstance(type);
-    // Map options = URISupport.parseParamters(uri);
-    // IntrospectionSupport.setProperties(rc, options);
-    // if( rc.getClass() == SimpleDiscoveryAgent.class ) {
-    // CompositeData data = URISupport.parseComposite(uri);
-    // ((SimpleDiscoveryAgent)rc).setServices(data.getComponents());
-    // }
-    // return rc;
-    // } catch (Throwable e) {
-    // throw IOExceptionSupport.create("Could not create discovery agent: "+uri,
-    // e);
-    // }
-    // }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryListener.java
deleted file mode 100755
index 60f48e5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import org.apache.activemq.command.DiscoveryEvent;
-
-/**
- * A listener of services being added or removed from a network
- * 
- * 
- */
-public interface DiscoveryListener {
-    public static final String DISCOVERED_OPTION_PREFIX = "discovered.";
-
-    void onServiceAdd(DiscoveryEvent event);
-
-    void onServiceRemove(DiscoveryEvent event);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
deleted file mode 100755
index 48cba82..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.transport.CompositeTransport;
-import org.apache.activemq.transport.TransportFilter;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.URISupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link ReliableTransportChannel} which uses a {@link DiscoveryAgent} to
- * discover remote broker instances and dynamically connect to them.
- * 
- * 
- */
-public class DiscoveryTransport extends TransportFilter implements DiscoveryListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DiscoveryTransport.class);
-
-    private final CompositeTransport next;
-    private DiscoveryAgent discoveryAgent;
-    private final ConcurrentHashMap<String, URI> serviceURIs = new ConcurrentHashMap<String, URI>();
-
-    private Map<String, String> parameters;
-
-    public DiscoveryTransport(CompositeTransport next) {
-        super(next);
-        this.next = next;
-    }
-
-    @Override
-    public void start() throws Exception {
-        if (discoveryAgent == null) {
-            throw new IllegalStateException("discoveryAgent not configured");
-        }
-
-        // lets pass into the agent the broker name and connection details
-        discoveryAgent.setDiscoveryListener(this);
-        discoveryAgent.start();
-        next.start();
-    }
-
-    @Override
-    public void stop() throws Exception {
-        ServiceStopper ss = new ServiceStopper();
-        ss.stop(discoveryAgent);
-        ss.stop(next);
-        ss.throwFirstException();
-    }
-
-    public void onServiceAdd(DiscoveryEvent event) {
-        String url = event.getServiceName();
-        if (url != null) {
-            try {
-                URI uri = new URI(url);
-                LOG.info("Adding new broker connection URL: " + uri);
-                uri = URISupport.applyParameters(uri, parameters, DISCOVERED_OPTION_PREFIX);
-                serviceURIs.put(event.getServiceName(), uri);
-                next.add(false,new URI[] {uri});
-            } catch (URISyntaxException e) {
-                LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
-            }
-        }
-    }
-
-    public void onServiceRemove(DiscoveryEvent event) {
-        URI uri = serviceURIs.get(event.getServiceName());
-        if (uri != null) {
-            next.remove(false,new URI[] {uri});
-        }
-    }
-
-    public DiscoveryAgent getDiscoveryAgent() {
-        return discoveryAgent;
-    }
-
-    public void setDiscoveryAgent(DiscoveryAgent discoveryAgent) {
-        this.discoveryAgent = discoveryAgent;
-    }
-
-    public void setParameters(Map<String, String> parameters) {
-       this.parameters = parameters;      
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java
deleted file mode 100755
index 6a0def8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.transport.CompositeTransport;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.failover.FailoverTransport;
-import org.apache.activemq.transport.failover.FailoverTransportFactory;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-/**
- * 
- */
-public class DiscoveryTransportFactory extends FailoverTransportFactory {
-        
-    public Transport createTransport(CompositeData compositeData) throws IOException {
-        Map<String, String> parameters = new HashMap<String, String>(compositeData.getParameters());
-        FailoverTransport failoverTransport = createTransport(parameters);
-        return createTransport(failoverTransport, compositeData, parameters);
-    }
-    
-    /**
-     * Creates a transport that reports discovered brokers to a specific composite transport.
-     * 
-     * @param compositeTransport transport to report discovered brokers to
-     * @param compositeData used to apply parameters to this transport 
-     * @return a transport that reports discovered brokers to a specific composite transport.
-     * @throws IOException
-     */
-    public static DiscoveryTransport createTransport(CompositeTransport compositeTransport, CompositeData compositeData, Map<String, String> parameters) throws IOException {
-        DiscoveryTransport transport = new DiscoveryTransport(compositeTransport);
-
-        IntrospectionSupport.setProperties(transport, parameters);
-        transport.setParameters(parameters);
-        
-        URI discoveryAgentURI = compositeData.getComponents()[0];
-        DiscoveryAgent discoveryAgent = DiscoveryAgentFactory.createDiscoveryAgent(discoveryAgentURI);
-        transport.setDiscoveryAgent(discoveryAgent);
-        return transport;
-    }
-
-    public TransportServer doBind(URI location) throws IOException {
-        throw new IOException("Invalid server URI: " + location);
-// try{
-//            CompositeData compositData=URISupport.parseComposite(location);
-//            URI[] components=compositData.getComponents();
-//            if(components.length!=1){
-//                throw new IOException("Invalid location: "+location
-//                                +", the location must have 1 and only 1 composite URI in it - components = "
-//                                +components.length);
-//            }
-//            Map parameters=new HashMap(compositData.getParameters());
-//            DiscoveryTransportServer server=new DiscoveryTransportServer(TransportFactory.bind(value,components[0]));
-//            IntrospectionSupport.setProperties(server,parameters,"discovery");
-//            DiscoveryAgent discoveryAgent=DiscoveryAgentFactory.createDiscoveryAgent(server.getDiscovery());
-//            // Use the host name to configure the group of the discovery agent.
-//            if(!parameters.containsKey("discovery.group")){
-//                if(compositData.getHost()!=null){
-//                    parameters.put("discovery.group",compositData.getHost());
-//                }
-//            }
-//            if(!parameters.containsKey("discovery.brokerName")){
-//                parameters.put("discovery.brokerName",value);
-//            }
-//            IntrospectionSupport.setProperties(discoveryAgent,parameters,"discovery.");
-//            server.setDiscoveryAgent(discoveryAgent);
-//            return server;
-//        }catch(URISyntaxException e){
-//            throw new IOException("Invalid location: "+location);
-//        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
deleted file mode 100755
index 8b80c7f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
+++ /dev/null
@@ -1,588 +0,0 @@
-/**
- * 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.transport.discovery.multicast;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.MulticastSocket;
-import java.net.NetworkInterface;
-import java.net.SocketAddress;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link DiscoveryAgent} using a multicast address and heartbeat packets
- * encoded using any wireformat, but openwire by default.
- * 
- * 
- */
-public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable {
-
-    public static final String DEFAULT_DISCOVERY_URI_STRING = "multicast://239.255.2.3:6155";
-    public static final String DEFAULT_HOST_STR = "default"; 
-    public static final String DEFAULT_HOST_IP  = System.getProperty("activemq.partition.discovery", "239.255.2.3"); 
-    public static final int    DEFAULT_PORT  = 6155; 
-        
-    private static final Logger LOG = LoggerFactory.getLogger(MulticastDiscoveryAgent.class);
-    private static final String TYPE_SUFFIX = "ActiveMQ-4.";
-    private static final String ALIVE = "alive.";
-    private static final String DEAD = "dead.";
-    private static final String DELIMITER = "%";
-    private static final int BUFF_SIZE = 8192;
-    private static final int DEFAULT_IDLE_TIME = 500;
-    private static final int HEARTBEAT_MISS_BEFORE_DEATH = 10;
-
-    private long initialReconnectDelay = 1000 * 5;
-    private long maxReconnectDelay = 1000 * 30;
-    private long backOffMultiplier = 2;
-    private boolean useExponentialBackOff;
-    private int maxReconnectAttempts;
-
-    private int timeToLive = 1;
-    private boolean loopBackMode;
-    private Map<String, RemoteBrokerData> brokersByService = new ConcurrentHashMap<String, RemoteBrokerData>();
-    private String group = "default";
-    private URI discoveryURI;
-    private InetAddress inetAddress;
-    private SocketAddress sockAddress;
-    private DiscoveryListener discoveryListener;
-    private String selfService;
-    private MulticastSocket mcast;
-    private Thread runner;
-    private long keepAliveInterval = DEFAULT_IDLE_TIME;
-    private String mcInterface;
-    private String mcNetworkInterface;
-    private String mcJoinNetworkInterface;
-    private long lastAdvertizeTime;
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private boolean reportAdvertizeFailed = true;
-    private ExecutorService executor = null;
-
-    class RemoteBrokerData {
-        final String brokerName;
-        final String service;
-        long lastHeartBeat;
-        long recoveryTime;
-        int failureCount;
-        boolean failed;
-
-        public RemoteBrokerData(String brokerName, String service) {
-            this.brokerName = brokerName;
-            this.service = service;
-            this.lastHeartBeat = System.currentTimeMillis();
-        }
-
-        public synchronized void updateHeartBeat() {
-            lastHeartBeat = System.currentTimeMillis();
-
-            // Consider that the broker recovery has succeeded if it has not
-            // failed in 60 seconds.
-            if (!failed && failureCount > 0 && (lastHeartBeat - recoveryTime) > 1000 * 60) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("I now think that the " + service + " service has recovered.");
-                }
-                failureCount = 0;
-                recoveryTime = 0;
-            }
-        }
-
-        public synchronized long getLastHeartBeat() {
-            return lastHeartBeat;
-        }
-
-        public synchronized boolean markFailed() {
-            if (!failed) {
-                failed = true;
-                failureCount++;
-
-                long reconnectDelay;
-                if (!useExponentialBackOff) {
-                    reconnectDelay = initialReconnectDelay;
-                } else {
-                    reconnectDelay = (long)Math.pow(backOffMultiplier, failureCount);
-                    if (reconnectDelay > maxReconnectDelay) {
-                        reconnectDelay = maxReconnectDelay;
-                    }
-                }
-
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Remote failure of " + service + " while still receiving multicast advertisements.  Advertising events will be suppressed for " + reconnectDelay
-                              + " ms, the current failure count is: " + failureCount);
-                }
-
-                recoveryTime = System.currentTimeMillis() + reconnectDelay;
-                return true;
-            }
-            return false;
-        }
-
-        /**
-         * @return true if this broker is marked failed and it is now the right
-         *         time to start recovery.
-         */
-        public synchronized boolean doRecovery() {
-            if (!failed) {
-                return false;
-            }
-
-            // Are we done trying to recover this guy?
-            if (maxReconnectAttempts > 0 && failureCount > maxReconnectAttempts) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Max reconnect attempts of the " + service + " service has been reached.");
-                }
-                return false;
-            }
-
-            // Is it not yet time?
-            if (System.currentTimeMillis() < recoveryTime) {
-                return false;
-            }
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Resuming event advertisement of the " + service + " service.");
-            }
-            failed = false;
-            return true;
-        }
-
-        public boolean isFailed() {
-            return failed;
-        }
-    }
-
-    /**
-     * Set the discovery listener
-     * 
-     * @param listener
-     */
-    public void setDiscoveryListener(DiscoveryListener listener) {
-        this.discoveryListener = listener;
-    }
-
-    /**
-     * register a service
-     */
-    public void registerService(String name) throws IOException {
-        this.selfService = name;
-        if (started.get()) {
-            doAdvertizeSelf();
-        }
-    }
-
-    /**
-     * @return Returns the loopBackMode.
-     */
-    public boolean isLoopBackMode() {
-        return loopBackMode;
-    }
-
-    /**
-     * @param loopBackMode The loopBackMode to set.
-     */
-    public void setLoopBackMode(boolean loopBackMode) {
-        this.loopBackMode = loopBackMode;
-    }
-
-    /**
-     * @return Returns the timeToLive.
-     */
-    public int getTimeToLive() {
-        return timeToLive;
-    }
-
-    /**
-     * @param timeToLive The timeToLive to set.
-     */
-    public void setTimeToLive(int timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-    /**
-     * @return the discoveryURI
-     */
-    public URI getDiscoveryURI() {
-        return discoveryURI;
-    }
-
-    /**
-     * Set the discoveryURI
-     * 
-     * @param discoveryURI
-     */
-    public void setDiscoveryURI(URI discoveryURI) {
-        this.discoveryURI = discoveryURI;
-    }
-
-    public long getKeepAliveInterval() {
-        return keepAliveInterval;
-    }
-
-    public void setKeepAliveInterval(long keepAliveInterval) {
-        this.keepAliveInterval = keepAliveInterval;
-    }
-    
-    public void setInterface(String mcInterface) {
-        this.mcInterface = mcInterface;
-    }
-    
-    public void setNetworkInterface(String mcNetworkInterface) {
-        this.mcNetworkInterface = mcNetworkInterface;    
-    }
-    
-    public void setJoinNetworkInterface(String mcJoinNetwrokInterface) {
-    	this.mcJoinNetworkInterface = mcJoinNetwrokInterface;
-    }
-    
-    /**
-     * start the discovery agent
-     * 
-     * @throws Exception
-     */
-    public void start() throws Exception {
-    	
-        if (started.compareAndSet(false, true)) {        	
-        	         	
-            if (group == null || group.length() == 0) {
-                throw new IOException("You must specify a group to discover");
-            }
-            String type = getType();
-            if (!type.endsWith(".")) {
-                LOG.warn("The type '" + type + "' should end with '.' to be a valid Discovery type");
-                type += ".";
-            }
-            
-            if (discoveryURI == null) {
-                discoveryURI = new URI(DEFAULT_DISCOVERY_URI_STRING);
-            }
-            
-            if (LOG.isTraceEnabled()) 
-        	  	LOG.trace("start - discoveryURI = " + discoveryURI);        	  	        	  
-        	  
-        	  String myHost = discoveryURI.getHost();
-        	  int    myPort = discoveryURI.getPort(); 
-        	     
-        	  if( DEFAULT_HOST_STR.equals(myHost) ) 
-        	  	myHost = DEFAULT_HOST_IP;       	      	  
-        	  
-        	  if(myPort < 0 )
-        	    myPort = DEFAULT_PORT;        	    
-        	  
-        	  if (LOG.isTraceEnabled()) {
-        	  	LOG.trace("start - myHost = " + myHost); 
-        	  	LOG.trace("start - myPort = " + myPort);   	
-        	  	LOG.trace("start - group  = " + group );		       	  	
-        	  	LOG.trace("start - interface  = " + mcInterface );
-        	  	LOG.trace("start - network interface  = " + mcNetworkInterface );
-        	  	LOG.trace("start - join network interface  = " + mcJoinNetworkInterface );
-        	  }	
-        	  
-            this.inetAddress = InetAddress.getByName(myHost);
-            this.sockAddress = new InetSocketAddress(this.inetAddress, myPort);
-            mcast = new MulticastSocket(myPort);
-            mcast.setLoopbackMode(loopBackMode);
-            mcast.setTimeToLive(getTimeToLive());
-            if (mcJoinNetworkInterface != null) {
-                mcast.joinGroup(sockAddress, NetworkInterface.getByName(mcJoinNetworkInterface));
-            }
-            else {
-            	mcast.joinGroup(inetAddress);
-            }
-            mcast.setSoTimeout((int)keepAliveInterval);
-            if (mcInterface != null) {
-                mcast.setInterface(InetAddress.getByName(mcInterface));
-            }
-            if (mcNetworkInterface != null) {
-                mcast.setNetworkInterface(NetworkInterface.getByName(mcNetworkInterface));
-            }
-            runner = new Thread(this);
-            runner.setName(this.toString() + ":" + runner.getName());
-            runner.setDaemon(true);
-            runner.start();
-            doAdvertizeSelf();
-        }
-    }
-
-    /**
-     * stop the channel
-     * 
-     * @throws Exception
-     */
-    public void stop() throws Exception {
-        if (started.compareAndSet(true, false)) {
-            doAdvertizeSelf();
-            if (mcast != null) {
-                mcast.close();
-            }
-            if (runner != null) {
-                runner.interrupt();
-            }
-            getExecutor().shutdownNow();
-        }
-    }
-
-    public String getType() {
-        return group + "." + TYPE_SUFFIX;
-    }
-
-    public void run() {
-        byte[] buf = new byte[BUFF_SIZE];
-        DatagramPacket packet = new DatagramPacket(buf, 0, buf.length);
-        while (started.get()) {
-            doTimeKeepingServices();
-            try {
-                mcast.receive(packet);
-                if (packet.getLength() > 0) {
-                    String str = new String(packet.getData(), packet.getOffset(), packet.getLength());
-                    processData(str);
-                }
-            } catch (SocketTimeoutException se) {
-                // ignore
-            } catch (IOException e) {
-                if (started.get()) {
-                    LOG.error("failed to process packet: " + e);
-                }
-            }
-        }
-    }
-
-    private void processData(String str) {
-        if (discoveryListener != null) {
-            if (str.startsWith(getType())) {
-                String payload = str.substring(getType().length());
-                if (payload.startsWith(ALIVE)) {
-                    String brokerName = getBrokerName(payload.substring(ALIVE.length()));
-                    String service = payload.substring(ALIVE.length() + brokerName.length() + 2);
-                    processAlive(brokerName, service);
-                } else {
-                    String brokerName = getBrokerName(payload.substring(DEAD.length()));
-                    String service = payload.substring(DEAD.length() + brokerName.length() + 2);
-                    processDead(service);
-                }
-            }
-        }
-    }
-
-    private void doTimeKeepingServices() {
-        if (started.get()) {
-            long currentTime = System.currentTimeMillis();
-            if (currentTime < lastAdvertizeTime || ((currentTime - keepAliveInterval) > lastAdvertizeTime)) {
-                doAdvertizeSelf();
-                lastAdvertizeTime = currentTime;
-            }
-            doExpireOldServices();
-        }
-    }
-
-    private void doAdvertizeSelf() {
-        if (selfService != null) {
-            String payload = getType();
-            payload += started.get() ? ALIVE : DEAD;
-            payload += DELIMITER + "localhost" + DELIMITER;
-            payload += selfService;
-            try {
-                byte[] data = payload.getBytes();
-                DatagramPacket packet = new DatagramPacket(data, 0, data.length, sockAddress);
-                mcast.send(packet);
-            } catch (IOException e) {
-                // If a send fails, chances are all subsequent sends will fail
-                // too.. No need to keep reporting the
-                // same error over and over.
-                if (reportAdvertizeFailed) {
-                    reportAdvertizeFailed = false;
-                    LOG.error("Failed to advertise our service: " + payload, e);
-                    if ("Operation not permitted".equals(e.getMessage())) {
-                        LOG.error("The 'Operation not permitted' error has been know to be caused by improper firewall/network setup.  "
-                                  + "Please make sure that the OS is properly configured to allow multicast traffic over: " + mcast.getLocalAddress());
-                    }
-                }
-            }
-        }
-    }
-
-    private void processAlive(String brokerName, String service) {
-        if (selfService == null || !service.equals(selfService)) {
-            RemoteBrokerData data = brokersByService.get(service);
-            if (data == null) {
-                data = new RemoteBrokerData(brokerName, service);
-                brokersByService.put(service, data);      
-                fireServiceAddEvent(data);
-                doAdvertizeSelf();
-            } else {
-                data.updateHeartBeat();
-                if (data.doRecovery()) {
-                    fireServiceAddEvent(data);
-                }
-            }
-        }
-    }
-
-    private void processDead(String service) {
-        if (!service.equals(selfService)) {
-            RemoteBrokerData data = brokersByService.remove(service);
-            if (data != null && !data.isFailed()) {
-                fireServiceRemovedEvent(data);
-            }
-        }
-    }
-
-    private void doExpireOldServices() {
-        long expireTime = System.currentTimeMillis() - (keepAliveInterval * HEARTBEAT_MISS_BEFORE_DEATH); 
-        for (Iterator<RemoteBrokerData> i = brokersByService.values().iterator(); i.hasNext();) {
-            RemoteBrokerData data = i.next();
-            if (data.getLastHeartBeat() < expireTime) {
-                processDead(data.service);
-            }
-        }
-    }
-
-    private String getBrokerName(String str) {
-        String result = null;
-        int start = str.indexOf(DELIMITER);
-        if (start >= 0) {
-            int end = str.indexOf(DELIMITER, start + 1);
-            result = str.substring(start + 1, end);
-        }
-        return result;
-    }
-
-    public void serviceFailed(DiscoveryEvent event) throws IOException {
-        RemoteBrokerData data = brokersByService.get(event.getServiceName());
-        if (data != null && data.markFailed()) {
-            fireServiceRemovedEvent(data);
-        }
-    }
-
-    private void fireServiceRemovedEvent(RemoteBrokerData data) {
-        if (discoveryListener != null && started.get()) {
-            final DiscoveryEvent event = new DiscoveryEvent(data.service);
-            event.setBrokerName(data.brokerName);
-
-            // Have the listener process the event async so that
-            // he does not block this thread since we are doing time sensitive
-            // processing of events.
-            getExecutor().execute(new Runnable() {
-                public void run() {
-                    DiscoveryListener discoveryListener = MulticastDiscoveryAgent.this.discoveryListener;
-                    if (discoveryListener != null) {
-                        discoveryListener.onServiceRemove(event);
-                    }
-                }
-            });
-        }
-    }
-
-    private void fireServiceAddEvent(RemoteBrokerData data) {
-        if (discoveryListener != null && started.get()) {
-            final DiscoveryEvent event = new DiscoveryEvent(data.service);
-            event.setBrokerName(data.brokerName);
-            
-            // Have the listener process the event async so that
-            // he does not block this thread since we are doing time sensitive
-            // processing of events.
-            getExecutor().execute(new Runnable() {
-                public void run() {
-                    DiscoveryListener discoveryListener = MulticastDiscoveryAgent.this.discoveryListener;
-                    if (discoveryListener != null) {
-                        discoveryListener.onServiceAdd(event);
-                    }
-                }
-            });
-        }
-    }
-
-    private ExecutorService getExecutor() {
-        if (executor == null) {
-            final String threadName = "Notifier-" + this.toString();
-            executor = new ThreadPoolExecutor(1, 1, 30, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
-                public Thread newThread(Runnable runable) {
-                    Thread t = new Thread(runable,  threadName);
-                    t.setDaemon(true);
-                    return t;
-                }
-            });
-        }
-        return executor;
-    }
-
-    public long getBackOffMultiplier() {
-        return backOffMultiplier;
-    }
-
-    public void setBackOffMultiplier(long backOffMultiplier) {
-        this.backOffMultiplier = backOffMultiplier;
-    }
-
-    public long getInitialReconnectDelay() {
-        return initialReconnectDelay;
-    }
-
-    public void setInitialReconnectDelay(long initialReconnectDelay) {
-        this.initialReconnectDelay = initialReconnectDelay;
-    }
-
-    public int getMaxReconnectAttempts() {
-        return maxReconnectAttempts;
-    }
-
-    public void setMaxReconnectAttempts(int maxReconnectAttempts) {
-        this.maxReconnectAttempts = maxReconnectAttempts;
-    }
-
-    public long getMaxReconnectDelay() {
-        return maxReconnectDelay;
-    }
-
-    public void setMaxReconnectDelay(long maxReconnectDelay) {
-        this.maxReconnectDelay = maxReconnectDelay;
-    }
-
-    public boolean isUseExponentialBackOff() {
-        return useExponentialBackOff;
-    }
-
-    public void setUseExponentialBackOff(boolean useExponentialBackOff) {
-        this.useExponentialBackOff = useExponentialBackOff;
-    }
-
-    public void setGroup(String group) {
-        this.group = group;
-    }
-    
-    @Override
-    public String toString() {
-        return  "MulticastDiscoveryAgent-"
-            + (selfService != null ? "advertise:" + selfService : "listener:" + this.discoveryListener);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java
deleted file mode 100755
index 2375e90..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.transport.discovery.multicast;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MulticastDiscoveryAgentFactory extends DiscoveryAgentFactory {
-	
-	  private static final Logger LOG = LoggerFactory.getLogger(MulticastDiscoveryAgentFactory.class); 
-
-    
-    protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException {
-        try {
-        	
-        	  if (LOG.isTraceEnabled()) {      
-               LOG.trace("doCreateDiscoveryAgent: uri = " + uri.toString());               
-            }
-            
-            MulticastDiscoveryAgent mda = new MulticastDiscoveryAgent();          
-            
-            mda.setDiscoveryURI(uri);            
-                        
-            // allow MDA's params to be set via query arguments  
-            // (e.g., multicast://default?group=foo             
-            Map options = URISupport.parseParameters(uri);         
-            IntrospectionSupport.setProperties(mda, options);
-            
-            return mda;
-            
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Could not create discovery agent: " + uri, e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/package.html
deleted file mode 100755
index 40a69d2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Discovery implementation using multicast
- 
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/package.html
deleted file mode 100755
index a27fa02..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Discovery mechanism to discover brokers and clients.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java
deleted file mode 100644
index 07be01f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.transport.discovery.rendezvous;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.activemq.jmdns.JmDNS;
-
-public final class JmDNSFactory {
-
-    static Map<InetAddress, UsageTracker> registry = new HashMap<InetAddress, UsageTracker>();
-
-    static class UsageTracker {
-        AtomicInteger count = new AtomicInteger(0);
-        JmDNS jmDNS;
-    }
-
-    private JmDNSFactory() {        
-    }
-    
-    static synchronized JmDNS create(final InetAddress address) throws IOException {
-        UsageTracker tracker = registry.get(address);
-        if (tracker == null) {
-            tracker = new UsageTracker();
-            tracker.jmDNS = new JmDNS(address) {
-                public void close() {
-                    if (onClose(address)) {
-                        super.close();
-                    }
-                }
-            };
-            registry.put(address, tracker);
-        }
-        tracker.count.incrementAndGet();
-        return tracker.jmDNS;
-    }
-
-    static synchronized boolean onClose(InetAddress address) {
-        UsageTracker tracker = registry.get(address);
-        if (tracker != null) {
-            if (tracker.count.decrementAndGet() == 0) {
-                registry.remove(address);
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java
deleted file mode 100755
index 100dd26..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * 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.transport.discovery.rendezvous;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.activemq.jmdns.JmDNS;
-import org.apache.activemq.jmdns.ServiceEvent;
-import org.apache.activemq.jmdns.ServiceInfo;
-import org.apache.activemq.jmdns.ServiceListener;
-
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryListener;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.MapHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link DiscoveryAgent} using <a href="http://www.zeroconf.org/">Zeroconf</a>
- * via the <a href="http://jmdns.sf.net/">jmDNS</a> library
- * 
- * 
- */
-public class RendezvousDiscoveryAgent implements DiscoveryAgent, ServiceListener {
-    private static final Logger LOG = LoggerFactory.getLogger(RendezvousDiscoveryAgent.class);
-
-    private static final String TYPE_SUFFIX = "ActiveMQ-4.";
-
-    private JmDNS jmdns;
-    private InetAddress localAddress;
-    private String localhost;
-    private int weight;
-    private int priority;
-
-    private DiscoveryListener listener;
-    private String group = "default";
-    private final CopyOnWriteArrayList<ServiceInfo> serviceInfos = new CopyOnWriteArrayList<ServiceInfo>();
-
-    // DiscoveryAgent interface
-    // -------------------------------------------------------------------------
-    public void start() throws Exception {
-        if (group == null) {
-            throw new IOException("You must specify a group to discover");
-        }
-        String type = getType();
-        if (!type.endsWith(".")) {
-            LOG.warn("The type '" + type + "' should end with '.' to be a valid Rendezvous type");
-            type += ".";
-        }
-        try {
-            // force lazy construction
-            getJmdns();
-            if (listener != null) {
-                LOG.info("Discovering service of type: " + type);
-                jmdns.addServiceListener(type, this);
-            }
-        } catch (IOException e) {
-            JMSExceptionSupport.create("Failed to start JmDNS service: " + e, e);
-        }
-    }
-
-    public void stop() {
-        if (jmdns != null) {
-            for (Iterator<ServiceInfo> iter = serviceInfos.iterator(); iter.hasNext();) {
-                ServiceInfo si = iter.next();
-                jmdns.unregisterService(si);
-            }
-
-            // Close it down async since this could block for a while.
-            final JmDNS closeTarget = jmdns;
-            Thread thread = new Thread() {
-                public void run() {
-                    closeTarget.close();
-                }
-            };
-
-            thread.setDaemon(true);
-            thread.start();
-
-            jmdns = null;
-        }
-    }
-
-    public void registerService(String name) throws IOException {
-        ServiceInfo si = createServiceInfo(name, new HashMap());
-        serviceInfos.add(si);
-        getJmdns().registerService(si);
-    }
-
-    // ServiceListener interface
-    // -------------------------------------------------------------------------
-    public void addService(JmDNS jmDNS, String type, String name) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("addService with type: " + type + " name: " + name);
-        }
-        if (listener != null) {
-            listener.onServiceAdd(new DiscoveryEvent(name));
-        }
-        jmDNS.requestServiceInfo(type, name);
-    }
-
-    public void removeService(JmDNS jmDNS, String type, String name) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("removeService with type: " + type + " name: " + name);
-        }
-        if (listener != null) {
-            listener.onServiceRemove(new DiscoveryEvent(name));
-        }
-    }
-
-    public void serviceAdded(ServiceEvent event) {
-        addService(event.getDNS(), event.getType(), event.getName());
-    }
-
-    public void serviceRemoved(ServiceEvent event) {
-        removeService(event.getDNS(), event.getType(), event.getName());
-    }
-
-    public void serviceResolved(ServiceEvent event) {
-    }
-
-    public void resolveService(JmDNS jmDNS, String type, String name, ServiceInfo serviceInfo) {
-    }
-
-    public int getPriority() {
-        return priority;
-    }
-
-    public void setPriority(int priority) {
-        this.priority = priority;
-    }
-
-    public int getWeight() {
-        return weight;
-    }
-
-    public void setWeight(int weight) {
-        this.weight = weight;
-    }
-
-    public JmDNS getJmdns() throws IOException {
-        if (jmdns == null) {
-            jmdns = createJmDNS();
-        }
-        return jmdns;
-    }
-
-    public void setJmdns(JmDNS jmdns) {
-        this.jmdns = jmdns;
-    }
-
-    public InetAddress getLocalAddress() throws UnknownHostException {
-        if (localAddress == null) {
-            localAddress = createLocalAddress();
-        }
-        return localAddress;
-    }
-
-    public void setLocalAddress(InetAddress localAddress) {
-        this.localAddress = localAddress;
-    }
-
-    public String getLocalhost() {
-        return localhost;
-    }
-
-    public void setLocalhost(String localhost) {
-        this.localhost = localhost;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected ServiceInfo createServiceInfo(String name, Map map) {
-        int port = MapHelper.getInt(map, "port", 0);
-
-        String type = getType();
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Registering service type: " + type + " name: " + name + " details: " + map);
-        }
-        return new ServiceInfo(type, name + "." + type, port, weight, priority, "");
-    }
-
-    protected JmDNS createJmDNS() throws IOException {
-        return JmDNSFactory.create(getLocalAddress());
-    }
-
-    protected InetAddress createLocalAddress() throws UnknownHostException {
-        if (localhost != null) {
-            return InetAddress.getByName(localhost);
-        }
-        return InetAddress.getLocalHost();
-    }
-
-    public void setDiscoveryListener(DiscoveryListener listener) {
-        this.listener = listener;
-    }
-
-    public String getGroup() {
-        return group;
-    }
-
-    public void setGroup(String group) {
-        this.group = group;
-    }
-
-    public String getType() {
-        return "_" + group + "." + TYPE_SUFFIX;
-    }
-
-    public void serviceFailed(DiscoveryEvent event) throws IOException {
-        // TODO: is there a way to notify the JmDNS that the service failed?
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgentFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgentFactory.java
deleted file mode 100755
index 2f6ed87..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgentFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.transport.discovery.rendezvous;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-
-public class RendezvousDiscoveryAgentFactory extends DiscoveryAgentFactory {
-
-    protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException {
-        try {
-            Map options = URISupport.parseParameters(uri);
-            RendezvousDiscoveryAgent rc = new RendezvousDiscoveryAgent();
-            rc.setGroup(uri.getHost());
-            IntrospectionSupport.setProperties(rc, options);
-            return rc;
-            
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Could not create discovery agent: " + uri, e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/package.html
deleted file mode 100755
index c5255b5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/package.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	A discovery agent using <a href="http://www.zeroconf.org/">Zeroconf</a> 
-	via the <a href="http://jmdns.sf.net/">jmDNS</a> library
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java
deleted file mode 100755
index 586912a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- * 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.transport.discovery.simple;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryListener;
-import org.apache.activemq.util.MDCHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple DiscoveryAgent that allows static configuration of the discovered
- * services.
- * 
- * 
- */
-public class SimpleDiscoveryAgent implements DiscoveryAgent {
-
-    private final static Logger LOG = LoggerFactory.getLogger(SimpleDiscoveryAgent.class);
-    private long initialReconnectDelay = 1000;
-    private long maxReconnectDelay = 1000 * 30;
-    private long backOffMultiplier = 2;
-    private boolean useExponentialBackOff=true;
-    private int maxReconnectAttempts;
-    private final Object sleepMutex = new Object();
-    private long minConnectTime = 5000;
-    private DiscoveryListener listener;
-    private String services[] = new String[] {};
-    private final AtomicBoolean running = new AtomicBoolean(false);
-
-    class SimpleDiscoveryEvent extends DiscoveryEvent {
-
-        private int connectFailures;
-        private long reconnectDelay = initialReconnectDelay;
-        private long connectTime = System.currentTimeMillis();
-        private AtomicBoolean failed = new AtomicBoolean(false);
-
-        public SimpleDiscoveryEvent(String service) {
-            super(service);
-        }
-
-    }
-
-    public void setDiscoveryListener(DiscoveryListener listener) {
-        this.listener = listener;
-    }
-
-    public void registerService(String name) throws IOException {
-    }
-
-    public void start() throws Exception {
-        running.set(true);
-        for (int i = 0; i < services.length; i++) {
-            listener.onServiceAdd(new SimpleDiscoveryEvent(services[i]));
-        }
-    }
-
-    public void stop() throws Exception {
-        running.set(false);
-        synchronized (sleepMutex) {
-            sleepMutex.notifyAll();
-        }
-    }
-
-    public String[] getServices() {
-        return services;
-    }
-
-    public void setServices(String services) {
-        this.services = services.split(",");
-    }
-
-    public void setServices(String services[]) {
-        this.services = services;
-    }
-
-    public void setServices(URI services[]) {
-        this.services = new String[services.length];
-        for (int i = 0; i < services.length; i++) {
-            this.services[i] = services[i].toString();
-        }
-    }
-
-    public void serviceFailed(DiscoveryEvent devent) throws IOException {
-
-        final SimpleDiscoveryEvent event = (SimpleDiscoveryEvent)devent;
-        if (event.failed.compareAndSet(false, true)) {
-
-            listener.onServiceRemove(event);
-            final Map context = MDCHelper.getCopyOfContextMap();
-            DefaultThreadPools.getDefaultTaskRunnerFactory().execute(new Runnable() {
-                public void run() {
-
-                    MDCHelper.setContextMap(context);
-
-                    // We detect a failed connection attempt because the service
-                    // fails right
-                    // away.
-                    if (event.connectTime + minConnectTime > System.currentTimeMillis()) {
-                        LOG.debug("Failure occurred soon after the discovery event was generated.  It will be classified as a connection failure: "+event);
-
-                        event.connectFailures++;
-
-                        if (maxReconnectAttempts > 0 && event.connectFailures >= maxReconnectAttempts) {
-                            LOG.debug("Reconnect attempts exceeded "+maxReconnectAttempts+" tries.  Reconnecting has been disabled.");
-                            return;
-                        }
-
-                        synchronized (sleepMutex) {
-                            try {
-                                if (!running.get()) {
-                                    return;
-                                }
-
-                                LOG.debug("Waiting "+event.reconnectDelay+" ms before attempting to reconnect.");
-                                sleepMutex.wait(event.reconnectDelay);
-                            } catch (InterruptedException ie) {
-                                Thread.currentThread().interrupt();
-                                return;
-                            }
-                        }
-
-                        if (!useExponentialBackOff) {
-                            event.reconnectDelay = initialReconnectDelay;
-                        } else {
-                            // Exponential increment of reconnect delay.
-                            event.reconnectDelay *= backOffMultiplier;
-                            if (event.reconnectDelay > maxReconnectDelay) {
-                                event.reconnectDelay = maxReconnectDelay;
-                            }
-                        }
-
-                    } else {
-                        event.connectFailures = 0;
-                        event.reconnectDelay = initialReconnectDelay;
-                    }
-
-                    if (!running.get()) {
-                        return;
-                    }
-
-                    event.connectTime = System.currentTimeMillis();
-                    event.failed.set(false);
-                    listener.onServiceAdd(event);
-                }
-            }, "Simple Discovery Agent");
-        }
-    }
-
-    public long getBackOffMultiplier() {
-        return backOffMultiplier;
-    }
-
-    public void setBackOffMultiplier(long backOffMultiplier) {
-        this.backOffMultiplier = backOffMultiplier;
-    }
-
-    public long getInitialReconnectDelay() {
-        return initialReconnectDelay;
-    }
-
-    public void setInitialReconnectDelay(long initialReconnectDelay) {
-        this.initialReconnectDelay = initialReconnectDelay;
-    }
-
-    public int getMaxReconnectAttempts() {
-        return maxReconnectAttempts;
-    }
-
-    public void setMaxReconnectAttempts(int maxReconnectAttempts) {
-        this.maxReconnectAttempts = maxReconnectAttempts;
-    }
-
-    public long getMaxReconnectDelay() {
-        return maxReconnectDelay;
-    }
-
-    public void setMaxReconnectDelay(long maxReconnectDelay) {
-        this.maxReconnectDelay = maxReconnectDelay;
-    }
-
-    public long getMinConnectTime() {
-        return minConnectTime;
-    }
-
-    public void setMinConnectTime(long minConnectTime) {
-        this.minConnectTime = minConnectTime;
-    }
-
-    public boolean isUseExponentialBackOff() {
-        return useExponentialBackOff;
-    }
-
-    public void setUseExponentialBackOff(boolean useExponentialBackOff) {
-        this.useExponentialBackOff = useExponentialBackOff;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgentFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgentFactory.java
deleted file mode 100755
index f858af3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgentFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.transport.discovery.simple;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-public class SimpleDiscoveryAgentFactory extends DiscoveryAgentFactory {
-
-    protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException {
-        try {
-            
-            CompositeData data = URISupport.parseComposite(uri);
-            Map options = data.getParameters();
-
-            SimpleDiscoveryAgent rc = new SimpleDiscoveryAgent();
-            IntrospectionSupport.setProperties(rc, options);
-            rc.setServices(data.getComponents());
-            
-            return rc;
-            
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Could not create discovery agent: " + uri, e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/package.html
deleted file mode 100755
index 4712d5a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- Simple discovery implementation using a static list
- 
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/BackupTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/BackupTransport.java
deleted file mode 100644
index fea5655..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/BackupTransport.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.IOException;
-import java.net.URI;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.Transport;
-
-class BackupTransport extends DefaultTransportListener{
-	private final FailoverTransport failoverTransport;
-	private Transport transport;
-	private URI uri;
-	private boolean disposed;
-	
-	BackupTransport(FailoverTransport ft){
-		this.failoverTransport=ft;
-	}
-	@Override
-    public void onException(IOException error) {
-		this.disposed=true;
-		if (failoverTransport!=null) {
-			this.failoverTransport.reconnect(false);
-		}
-	}
-
-	public Transport getTransport() {
-		return transport;
-	}
-	public void setTransport(Transport transport) {
-		this.transport = transport;
-		this.transport.setTransportListener(this);
-	}
-	public URI getUri() {
-		return uri;
-	}
-	public void setUri(URI uri) {
-		this.uri = uri;
-	}
-	
-	public boolean isDisposed() {
-		return disposed || transport != null && transport.isDisposed();
-	}
-	
-	public void setDisposed(boolean disposed) {
-		this.disposed = disposed;
-	}
-	
-	@Override
-    public int hashCode() {
-		return uri != null ? uri.hashCode():-1;
-	}
-	
-	@Override
-    public boolean equals(Object obj) {
-		if (obj instanceof BackupTransport) {
-			BackupTransport other = (BackupTransport) obj;
-			return uri== null && other.uri==null || 
-				(uri != null && other.uri != null && uri.equals(other.uri));
-		}
-		return false;
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
deleted file mode 100755
index 80ace90..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
+++ /dev/null
@@ -1,1148 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.InterruptedIOException;
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicReference;
-import org.apache.activemq.broker.SslContext;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionControl;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.state.ConnectionStateTracker;
-import org.apache.activemq.state.Tracked;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.transport.CompositeTransport;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.ResponseCallback;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * A Transport that is made reliable by being able to fail over to another
- * transport when a transport failure is detected.
- * 
- * 
- */
-public class FailoverTransport implements CompositeTransport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverTransport.class);
-    private static final int DEFAULT_INITIAL_RECONNECT_DELAY = 10;
-    private TransportListener transportListener;
-    private boolean disposed;
-    private boolean connected;
-    private final CopyOnWriteArrayList<URI> uris = new CopyOnWriteArrayList<URI>();
-    private final CopyOnWriteArrayList<URI> updated = new CopyOnWriteArrayList<URI>();
-
-    private final Object reconnectMutex = new Object();
-    private final Object backupMutex = new Object();
-    private final Object sleepMutex = new Object();
-    private final Object listenerMutex = new Object();
-    private final ConnectionStateTracker stateTracker = new ConnectionStateTracker();
-    private final Map<Integer, Command> requestMap = new LinkedHashMap<Integer, Command>();
-
-    private URI connectedTransportURI;
-    private URI failedConnectTransportURI;
-    private final AtomicReference<Transport> connectedTransport = new AtomicReference<Transport>();
-    private final TaskRunner reconnectTask;
-    private boolean started;
-    private boolean initialized;
-    private long initialReconnectDelay = DEFAULT_INITIAL_RECONNECT_DELAY;
-    private long maxReconnectDelay = 1000 * 30;
-    private double backOffMultiplier = 2d;
-    private long timeout = -1;
-    private boolean useExponentialBackOff = true;
-    private boolean randomize = true;
-    private int maxReconnectAttempts;
-    private int startupMaxReconnectAttempts;
-    private int connectFailures;
-    private long reconnectDelay = DEFAULT_INITIAL_RECONNECT_DELAY;
-    private Exception connectionFailure;
-    private boolean firstConnection = true;
-    // optionally always have a backup created
-    private boolean backup = false;
-    private final List<BackupTransport> backups = new CopyOnWriteArrayList<BackupTransport>();
-    private int backupPoolSize = 1;
-    private boolean trackMessages = false;
-    private boolean trackTransactionProducers = true;
-    private int maxCacheSize = 128 * 1024;
-    private final TransportListener disposedListener = new DefaultTransportListener() {
-    };
-    //private boolean connectionInterruptProcessingComplete;
-
-    private final TransportListener myTransportListener = createTransportListener();
-    private boolean updateURIsSupported=true;
-    private boolean reconnectSupported=true;
-    // remember for reconnect thread
-    private SslContext brokerSslContext;
-    private String updateURIsURL = null;
-    private boolean rebalanceUpdateURIs=true;
-    private boolean doRebalance = false;
-
-    public FailoverTransport() throws InterruptedIOException {
-        brokerSslContext = SslContext.getCurrentSslContext();
-        stateTracker.setTrackTransactions(true);
-        // Setup a task that is used to reconnect the a connection async.
-        reconnectTask = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(new Task() {
-            public boolean iterate() {
-                boolean result = false;
-                boolean buildBackup = true;
-                boolean doReconnect = !disposed;
-                synchronized (backupMutex) {
-                    if ((connectedTransport.get() == null || doRebalance) && !disposed) {
-                        result = doReconnect();
-                        buildBackup = false;
-                    }
-                }
-                if (buildBackup) {
-                    buildBackups();
-                } else {
-                    // build backups on the next iteration
-                    buildBackup = true;
-                    try {
-                        reconnectTask.wakeup();
-                    } catch (InterruptedException e) {
-                        LOG.debug("Reconnect task has been interrupted.", e);
-                    }
-                }
-                return result;
-            }
-
-        }, "ActiveMQ Failover Worker: " + System.identityHashCode(this));
-    }
-
-    TransportListener createTransportListener() {
-        return new TransportListener() {
-            public void onCommand(Object o) {
-                Command command = (Command) o;
-                if (command == null) {
-                    return;
-                }
-                if (command.isResponse()) {
-                    Object object = null;
-                    synchronized (requestMap) {
-                        object = requestMap.remove(Integer.valueOf(((Response) command).getCorrelationId()));
-                    }
-                    if (object != null && object.getClass() == Tracked.class) {
-                        ((Tracked) object).onResponses(command);
-                    }
-                }
-                if (!initialized) {      
-                    initialized = true;
-                }
-                
-                if(command.isConnectionControl()) {
-                    handleConnectionControl((ConnectionControl) command);
-                }
-                if (transportListener != null) {
-                    transportListener.onCommand(command);
-                }
-            }
-
-            public void onException(IOException error) {
-                try {
-                    handleTransportFailure(error);
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                    transportListener.onException(new InterruptedIOException());
-                }
-            }
-
-            public void transportInterupted() {
-                if (transportListener != null) {
-                    transportListener.transportInterupted();
-                }
-            }
-
-            public void transportResumed() {
-                if (transportListener != null) {
-                    transportListener.transportResumed();
-                }
-            }
-        };
-    }
-
-    public final void disposeTransport(Transport transport) {
-        transport.setTransportListener(disposedListener);
-        ServiceSupport.dispose(transport);
-    }
-
-    public final void handleTransportFailure(IOException e) throws InterruptedException {
-        if (LOG.isTraceEnabled()) {
-            LOG.trace(this + " handleTransportFailure: " + e);
-        }
-        Transport transport = connectedTransport.getAndSet(null);
-        if (transport == null) {
-            // sync with possible in progress reconnect
-            synchronized (reconnectMutex) {
-                transport = connectedTransport.getAndSet(null);
-            }
-        }
-        if (transport != null) {
-
-            disposeTransport(transport);
-
-            boolean reconnectOk = false;
-            synchronized (reconnectMutex) {
-                if (started) {
-                    LOG.warn("Transport (" + transport.getRemoteAddress() + ") failed to " + connectedTransportURI
-                            + " , attempting to automatically reconnect due to: " + e);
-                    LOG.debug("Transport failed with the following exception:", e);
-                    reconnectOk = true;
-                }
-                initialized = false;
-                failedConnectTransportURI = connectedTransportURI;
-                connectedTransportURI = null;
-                connected = false;
-
-                // notify before any reconnect attempt so ack state can be
-                // whacked
-                if (transportListener != null) {
-                    transportListener.transportInterupted();
-                }
-
-                if (reconnectOk) {
-                    reconnectTask.wakeup();
-                }
-            }
-        }
-    }
-
-    public final void handleConnectionControl(ConnectionControl control) {
-        String reconnectStr = control.getReconnectTo();
-        if (reconnectStr != null) {
-            reconnectStr = reconnectStr.trim();
-            if (reconnectStr.length() > 0) {
-                try {
-                    URI uri = new URI(reconnectStr);
-                    if (isReconnectSupported()) {
-                        reconnect(uri);
-                        LOG.info("Reconnected to: " + uri);
-                    }
-                } catch (Exception e) {
-                    LOG.error("Failed to handle ConnectionControl reconnect to " + reconnectStr, e);
-                }
-            }
-        }
-        processNewTransports(control.isRebalanceConnection(), control.getConnectedBrokers());
-    }
-
-    private final void processNewTransports(boolean rebalance, String newTransports) {
-        if (newTransports != null) {
-            newTransports = newTransports.trim();
-            if (newTransports.length() > 0 && isUpdateURIsSupported()) {
-                List<URI> list = new ArrayList<URI>();
-                StringTokenizer tokenizer = new StringTokenizer(newTransports, ",");
-                while (tokenizer.hasMoreTokens()) {
-                    String str = tokenizer.nextToken();
-                    try {
-                        URI uri = new URI(str);
-                        list.add(uri);
-                    } catch (Exception e) {
-                        LOG.error("Failed to parse broker address: " + str, e);
-                    }
-                }
-                if (list.isEmpty() == false) {
-                    try {
-                        updateURIs(rebalance, list.toArray(new URI[list.size()]));
-                    } catch (IOException e) {
-                        LOG.error("Failed to update transport URI's from: " + newTransports, e);
-                    }
-                }
-
-            }
-        }
-    }
-
-    public void start() throws Exception {
-        synchronized (reconnectMutex) {
-            LOG.debug("Started.");
-            if (started) {
-                return;
-            }
-            started = true;
-            stateTracker.setMaxCacheSize(getMaxCacheSize());
-            stateTracker.setTrackMessages(isTrackMessages());
-            stateTracker.setTrackTransactionProducers(isTrackTransactionProducers());
-            if (connectedTransport.get() != null) {
-                stateTracker.restore(connectedTransport.get());
-            } else {
-                reconnect(false);
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        Transport transportToStop = null;
-        synchronized (reconnectMutex) {
-            LOG.debug("Stopped.");
-            if (!started) {
-                return;
-            }
-            started = false;
-            disposed = true;
-            connected = false;
-            for (BackupTransport t : backups) {
-                t.setDisposed(true);
-            }
-            backups.clear();
-
-            if (connectedTransport.get() != null) {
-                transportToStop = connectedTransport.getAndSet(null);
-            }
-            reconnectMutex.notifyAll();
-        }
-        synchronized (sleepMutex) {
-            sleepMutex.notifyAll();
-        }
-        reconnectTask.shutdown();
-        if (transportToStop != null) {
-            transportToStop.stop();
-        }
-    }
-
-    public long getInitialReconnectDelay() {
-        return initialReconnectDelay;
-    }
-
-    public void setInitialReconnectDelay(long initialReconnectDelay) {
-        this.initialReconnectDelay = initialReconnectDelay;
-    }
-
-    public long getMaxReconnectDelay() {
-        return maxReconnectDelay;
-    }
-
-    public void setMaxReconnectDelay(long maxReconnectDelay) {
-        this.maxReconnectDelay = maxReconnectDelay;
-    }
-
-    public long getReconnectDelay() {
-        return reconnectDelay;
-    }
-
-    public void setReconnectDelay(long reconnectDelay) {
-        this.reconnectDelay = reconnectDelay;
-    }
-
-    public double getReconnectDelayExponent() {
-        return backOffMultiplier;
-    }
-
-    public void setReconnectDelayExponent(double reconnectDelayExponent) {
-        this.backOffMultiplier = reconnectDelayExponent;
-    }
-
-    public Transport getConnectedTransport() {
-        return connectedTransport.get();
-    }
-
-    public URI getConnectedTransportURI() {
-        return connectedTransportURI;
-    }
-
-    public int getMaxReconnectAttempts() {
-        return maxReconnectAttempts;
-    }
-
-    public void setMaxReconnectAttempts(int maxReconnectAttempts) {
-        this.maxReconnectAttempts = maxReconnectAttempts;
-    }
-
-    public int getStartupMaxReconnectAttempts() {
-        return this.startupMaxReconnectAttempts;
-    }
-
-    public void setStartupMaxReconnectAttempts(int startupMaxReconnectAttempts) {
-        this.startupMaxReconnectAttempts = startupMaxReconnectAttempts;
-    }
-
-    public long getTimeout() {
-        return timeout;
-    }
-
-    public void setTimeout(long timeout) {
-        this.timeout = timeout;
-    }
-
-    /**
-     * @return Returns the randomize.
-     */
-    public boolean isRandomize() {
-        return randomize;
-    }
-
-    /**
-     * @param randomize
-     *            The randomize to set.
-     */
-    public void setRandomize(boolean randomize) {
-        this.randomize = randomize;
-    }
-
-    public boolean isBackup() {
-        return backup;
-    }
-
-    public void setBackup(boolean backup) {
-        this.backup = backup;
-    }
-
-    public int getBackupPoolSize() {
-        return backupPoolSize;
-    }
-
-    public void setBackupPoolSize(int backupPoolSize) {
-        this.backupPoolSize = backupPoolSize;
-    }
-
-    public boolean isTrackMessages() {
-        return trackMessages;
-    }
-
-    public void setTrackMessages(boolean trackMessages) {
-        this.trackMessages = trackMessages;
-    }
-
-    public boolean isTrackTransactionProducers() {
-        return this.trackTransactionProducers;
-    }
-
-    public void setTrackTransactionProducers(boolean trackTransactionProducers) {
-        this.trackTransactionProducers = trackTransactionProducers;
-    }
-
-    public int getMaxCacheSize() {
-        return maxCacheSize;
-    }
-
-    public void setMaxCacheSize(int maxCacheSize) {
-        this.maxCacheSize = maxCacheSize;
-    }
-
-    /**
-     * @return Returns true if the command is one sent when a connection is
-     *         being closed.
-     */
-    private boolean isShutdownCommand(Command command) {
-        return (command != null && (command.isShutdownInfo() || command instanceof RemoveInfo));
-    }
-
-    public void oneway(Object o) throws IOException {
-
-        Command command = (Command) o;
-        Exception error = null;
-        try {
-
-            synchronized (reconnectMutex) {
-
-                if (isShutdownCommand(command) && connectedTransport.get() == null) {
-                    if (command.isShutdownInfo()) {
-                        // Skipping send of ShutdownInfo command when not
-                        // connected.
-                        return;
-                    }
-                    if (command instanceof RemoveInfo || command.isMessageAck()) {
-                        // Simulate response to RemoveInfo command or ack (as it
-                        // will be stale)
-                        stateTracker.track(command);
-                        Response response = new Response();
-                        response.setCorrelationId(command.getCommandId());
-                        myTransportListener.onCommand(response);
-                        return;
-                    }
-                }
-                // Keep trying until the message is sent.
-                for (int i = 0; !disposed; i++) {
-                    try {
-
-                        // Wait for transport to be connected.
-                        Transport transport = connectedTransport.get();
-                        long start = System.currentTimeMillis();
-                        boolean timedout = false;
-                        while (transport == null && !disposed && connectionFailure == null
-                                && !Thread.currentThread().isInterrupted()) {
-                            LOG.trace("Waiting for transport to reconnect..: " + command);
-                            long end = System.currentTimeMillis();
-                            if (timeout > 0 && (end - start > timeout)) {
-                                timedout = true;
-                                LOG.info("Failover timed out after " + (end - start) + "ms");
-                                break;
-                            }
-                            try {
-                                reconnectMutex.wait(100);
-                            } catch (InterruptedException e) {
-                                Thread.currentThread().interrupt();
-                                LOG.debug("Interupted: " + e, e);
-                            }
-                            transport = connectedTransport.get();
-                        }
-
-                        if (transport == null) {
-                            // Previous loop may have exited due to use being
-                            // disposed.
-                            if (disposed) {
-                                error = new IOException("Transport disposed.");
-                            } else if (connectionFailure != null) {
-                                error = connectionFailure;
-                            } else if (timedout == true) {
-                                error = new IOException("Failover timeout of " + timeout + " ms reached.");
-                            } else {
-                                error = new IOException("Unexpected failure.");
-                            }
-                            break;
-                        }
-
-                        // If it was a request and it was not being tracked by
-                        // the state tracker,
-                        // then hold it in the requestMap so that we can replay
-                        // it later.
-                        Tracked tracked = stateTracker.track(command);
-                        synchronized (requestMap) {
-                            if (tracked != null && tracked.isWaitingForResponse()) {
-                                requestMap.put(Integer.valueOf(command.getCommandId()), tracked);
-                            } else if (tracked == null && command.isResponseRequired()) {
-                                requestMap.put(Integer.valueOf(command.getCommandId()), command);
-                            }
-                        }
-
-                        // Send the message.
-                        try {
-                            transport.oneway(command);
-                            stateTracker.trackBack(command);
-                        } catch (IOException e) {
-
-                            // If the command was not tracked.. we will retry in
-                            // this method
-                            if (tracked == null) {
-
-                                // since we will retry in this method.. take it
-                                // out of the request
-                                // map so that it is not sent 2 times on
-                                // recovery
-                                if (command.isResponseRequired()) {
-                                    requestMap.remove(Integer.valueOf(command.getCommandId()));
-                                }
-
-                                // Rethrow the exception so it will handled by
-                                // the outer catch
-                                throw e;
-                            }
-
-                        }
-
-                        return;
-
-                    } catch (IOException e) {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Send oneway attempt: " + i + " failed for command:" + command);
-                        }
-                        handleTransportFailure(e);
-                    }
-                }
-            }
-        } catch (InterruptedException e) {
-            // Some one may be trying to stop our thread.
-            Thread.currentThread().interrupt();
-            throw new InterruptedIOException();
-        }
-        if (!disposed) {
-            if (error != null) {
-                if (error instanceof IOException) {
-                    throw (IOException) error;
-                }
-                throw IOExceptionSupport.create(error);
-            }
-        }
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public void add(boolean rebalance, URI u[]) {
-        boolean newURI = false;
-        for (int i = 0; i < u.length; i++) {
-            if (!contains(u[i])) {
-                uris.add(u[i]);
-                newURI = true;
-            }
-        }
-        if (newURI) {
-            reconnect(rebalance);
-        }
-    }
-
-    public void remove(boolean rebalance, URI u[]) {
-        for (int i = 0; i < u.length; i++) {
-            uris.remove(u[i]);
-        }
-        // rebalance is automatic if any connected to removed/stopped broker
-    }
-
-    public void add(boolean rebalance, String u) {
-        try {
-            URI newURI = new URI(u);
-            if (contains(newURI)==false) {
-                uris.add(newURI);
-                reconnect(rebalance);
-            }
-       
-        } catch (Exception e) {
-            LOG.error("Failed to parse URI: " + u);
-        }
-    }
-
-    public void reconnect(boolean rebalance) {
-        synchronized (reconnectMutex) {
-            if (started) {
-                if (rebalance) {
-                    doRebalance = true;
-                }
-                LOG.debug("Waking up reconnect task");
-                try {
-                    reconnectTask.wakeup();
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            } else {
-                LOG.debug("Reconnect was triggered but transport is not started yet. Wait for start to connect the transport.");
-            }
-        }
-    }
-
-    private List<URI> getConnectList() {
-        ArrayList<URI> l = new ArrayList<URI>(uris);
-        boolean removed = false;
-        if (failedConnectTransportURI != null) {
-            removed = l.remove(failedConnectTransportURI);
-        }
-        if (randomize) {
-            // Randomly, reorder the list by random swapping
-            for (int i = 0; i < l.size(); i++) {
-                int p = (int) (Math.random() * 100 % l.size());
-                URI t = l.get(p);
-                l.set(p, l.get(i));
-                l.set(i, t);
-            }
-        }
-        if (removed) {
-            l.add(failedConnectTransportURI);
-        }
-        LOG.debug("urlList connectionList:" + l + ", from: " + uris);
-        return l;
-    }
-
-    public TransportListener getTransportListener() {
-        return transportListener;
-    }
-
-    public void setTransportListener(TransportListener commandListener) {
-        synchronized (listenerMutex) {
-            this.transportListener = commandListener;
-            listenerMutex.notifyAll();
-        }
-    }
-
-    public <T> T narrow(Class<T> target) {
-
-        if (target.isAssignableFrom(getClass())) {
-            return target.cast(this);
-        }
-        Transport transport = connectedTransport.get();
-        if (transport != null) {
-            return transport.narrow(target);
-        }
-        return null;
-
-    }
-
-    protected void restoreTransport(Transport t) throws Exception, IOException {
-        t.start();
-        // send information to the broker - informing it we are an ft client
-        ConnectionControl cc = new ConnectionControl();
-        cc.setFaultTolerant(true);
-        t.oneway(cc);
-        stateTracker.restore(t);
-        Map tmpMap = null;
-        synchronized (requestMap) {
-            tmpMap = new LinkedHashMap<Integer, Command>(requestMap);
-        }
-        for (Iterator<Command> iter2 = tmpMap.values().iterator(); iter2.hasNext();) {
-            Command command = iter2.next();
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("restore requestMap, replay: " + command);
-            }
-            t.oneway(command);
-        }
-    }
-
-    public boolean isUseExponentialBackOff() {
-        return useExponentialBackOff;
-    }
-
-    public void setUseExponentialBackOff(boolean useExponentialBackOff) {
-        this.useExponentialBackOff = useExponentialBackOff;
-    }
-
-    @Override
-    public String toString() {
-        return connectedTransportURI == null ? "unconnected" : connectedTransportURI.toString();
-    }
-
-    public String getRemoteAddress() {
-        Transport transport = connectedTransport.get();
-        if (transport != null) {
-            return transport.getRemoteAddress();
-        }
-        return null;
-    }
-
-    public boolean isFaultTolerant() {
-        return true;
-    }
-
-    final boolean doReconnect() {
-        Exception failure = null;
-        synchronized (reconnectMutex) {
-
-            // If updateURIsURL is specified, read the file and add any new
-            // transport URI's to this FailOverTransport. 
-            // Note: Could track file timestamp to avoid unnecessary reading.
-            String fileURL = getUpdateURIsURL();
-            if (fileURL != null) {
-                BufferedReader in = null;
-                String newUris = null;
-                StringBuffer buffer = new StringBuffer();
-
-                try {
-                    in = new BufferedReader(getURLStream(fileURL));
-                    while (true) {
-                        String line = in.readLine();
-                        if (line == null) {
-                            break;
-                        }
-                        buffer.append(line);
-                    }
-                    newUris = buffer.toString();
-                } catch (IOException ioe) {
-                    LOG.error("Failed to read updateURIsURL: " + fileURL, ioe);
-                } finally {
-                    if (in != null) {
-                        try {
-                            in.close();
-                        } catch (IOException ioe) {
-                            // ignore
-                        }
-                    }
-                }
-                
-                processNewTransports(isRebalanceUpdateURIs(), newUris);
-            }
-
-            if (disposed || connectionFailure != null) {
-                reconnectMutex.notifyAll();
-            }
-
-            if ((connectedTransport.get() != null && !doRebalance) || disposed || connectionFailure != null) {
-                return false;
-            } else {
-                List<URI> connectList = getConnectList();
-                if (connectList.isEmpty()) {
-                    failure = new IOException("No uris available to connect to.");
-                } else {
-                    if (doRebalance) {
-                        if (connectList.get(0).equals(connectedTransportURI)) {
-                            // already connected to first in the list, no need to rebalance
-                            doRebalance = false;
-                            return false;
-                        } else {
-                            LOG.debug("Doing rebalance from: " + connectedTransportURI + " to " + connectList);
-                            try {
-                                Transport transport = this.connectedTransport.getAndSet(null);
-                                if (transport != null) {
-                                    disposeTransport(transport);
-                                }
-                            } catch (Exception e) {
-                                LOG.debug("Caught an exception stopping existing transport for rebalance", e);
-                            }
-                        }
-                        doRebalance = false;
-                    }
-                    if (!useExponentialBackOff || reconnectDelay == DEFAULT_INITIAL_RECONNECT_DELAY) {
-                        reconnectDelay = initialReconnectDelay;
-                    }
-                    synchronized (backupMutex) {
-                        if (backup && !backups.isEmpty()) {
-                            BackupTransport bt = backups.remove(0);
-                            Transport t = bt.getTransport();
-                            URI uri = bt.getUri();
-                            t.setTransportListener(myTransportListener);
-                            try {
-                                if (started) {
-                                    restoreTransport(t);
-                                }
-                                reconnectDelay = initialReconnectDelay;
-                                failedConnectTransportURI = null;
-                                connectedTransportURI = uri;
-                                connectedTransport.set(t);
-                                reconnectMutex.notifyAll();
-                                connectFailures = 0;
-                                LOG.info("Successfully reconnected to backup " + uri);
-                                return false;
-                            } catch (Exception e) {
-                                LOG.debug("Backup transport failed", e);
-                            }
-                        }
-                    }
-
-                    Iterator<URI> iter = connectList.iterator();
-                    while (iter.hasNext() && connectedTransport.get() == null && !disposed) {
-                        URI uri = iter.next();
-                        Transport t = null;
-                        try {
-                            LOG.debug("Attempting connect to: " + uri);
-                            SslContext.setCurrentSslContext(brokerSslContext);
-                            t = TransportFactory.compositeConnect(uri);
-                            t.setTransportListener(myTransportListener);
-                            t.start();
-
-                            if (started) {
-                                restoreTransport(t);
-                            }
-
-                            LOG.debug("Connection established");
-                            reconnectDelay = initialReconnectDelay;
-                            connectedTransportURI = uri;
-                            connectedTransport.set(t);
-                            reconnectMutex.notifyAll();
-                            connectFailures = 0;
-                            // Make sure on initial startup, that the
-                            // transportListener
-                            // has been initialized for this instance.
-                            synchronized (listenerMutex) {
-                                if (transportListener == null) {
-                                    try {
-                                        // if it isn't set after 2secs - it
-                                        // probably never will be
-                                        listenerMutex.wait(2000);
-                                    } catch (InterruptedException ex) {
-                                    }
-                                }
-                            }
-                            if (transportListener != null) {
-                                transportListener.transportResumed();
-                            } else {
-                                LOG.debug("transport resumed by transport listener not set");
-                            }
-                            if (firstConnection) {
-                                firstConnection = false;
-                                LOG.info("Successfully connected to " + uri);
-                            } else {
-                                LOG.info("Successfully reconnected to " + uri);
-                            }
-                            connected = true;
-                            return false;
-                        } catch (Exception e) {
-                            failure = e;
-                            LOG.debug("Connect fail to: " + uri + ", reason: " + e);
-                            if (t != null) {
-                                try {
-                                    t.stop();
-                                } catch (Exception ee) {
-                                    LOG.debug("Stop of failed transport: " + t + " failed with reason: " + ee);
-                                }
-                            }
-                        } finally {
-                            SslContext.setCurrentSslContext(null);
-                        }
-                    }
-                }
-            }
-            int reconnectAttempts = 0;
-            if (firstConnection) {
-                if (this.startupMaxReconnectAttempts != 0) {
-                    reconnectAttempts = this.startupMaxReconnectAttempts;
-                }
-            }
-            if (reconnectAttempts == 0) {
-                reconnectAttempts = this.maxReconnectAttempts;
-            }
-            if (reconnectAttempts > 0 && ++connectFailures >= reconnectAttempts) {
-                LOG.error("Failed to connect to transport after: " + connectFailures + " attempt(s)");
-                connectionFailure = failure;
-
-                // Make sure on initial startup, that the transportListener has
-                // been initialized
-                // for this instance.
-                synchronized (listenerMutex) {
-                    if (transportListener == null) {
-                        try {
-                            listenerMutex.wait(2000);
-                        } catch (InterruptedException ex) {
-                        }
-                    }
-                }
-
-                if (transportListener != null) {
-                    if (connectionFailure instanceof IOException) {
-                        transportListener.onException((IOException) connectionFailure);
-                    } else {
-                        transportListener.onException(IOExceptionSupport.create(connectionFailure));
-                    }
-                }
-                reconnectMutex.notifyAll();
-                return false;
-            }
-        }
-        if (!disposed) {
-
-            LOG.debug("Waiting " + reconnectDelay + " ms before attempting connection. ");
-            synchronized (sleepMutex) {
-                try {
-                    sleepMutex.wait(reconnectDelay);
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            }
-
-            if (useExponentialBackOff) {
-                // Exponential increment of reconnect delay.
-                reconnectDelay *= backOffMultiplier;
-                if (reconnectDelay > maxReconnectDelay) {
-                    reconnectDelay = maxReconnectDelay;
-                }
-            }
-        }
-        return !disposed;
-    }
-
-    final boolean buildBackups() {
-        synchronized (backupMutex) {
-            if (!disposed && backup && backups.size() < backupPoolSize) {
-                List<URI> connectList = getConnectList();
-                // removed disposed backups
-                List<BackupTransport> disposedList = new ArrayList<BackupTransport>();
-                for (BackupTransport bt : backups) {
-                    if (bt.isDisposed()) {
-                        disposedList.add(bt);
-                    }
-                }
-                backups.removeAll(disposedList);
-                disposedList.clear();
-                for (Iterator<URI> iter = connectList.iterator(); iter.hasNext() && backups.size() < backupPoolSize;) {
-                    URI uri = iter.next();
-                    if (connectedTransportURI != null && !connectedTransportURI.equals(uri)) {
-                        try {
-                            SslContext.setCurrentSslContext(brokerSslContext);
-                            BackupTransport bt = new BackupTransport(this);
-                            bt.setUri(uri);
-                            if (!backups.contains(bt)) {
-                                Transport t = TransportFactory.compositeConnect(uri);
-                                t.setTransportListener(bt);
-                                t.start();
-                                bt.setTransport(t);
-                                backups.add(bt);
-                            }
-                        } catch (Exception e) {
-                            LOG.debug("Failed to build backup ", e);
-                        } finally {
-                            SslContext.setCurrentSslContext(null);
-                        }
-                    }
-                }
-            }
-        }
-        return false;
-    }
-
-    public boolean isDisposed() {
-        return disposed;
-    }
-
-    public boolean isConnected() {
-        return connected;
-    }
-
-    public void reconnect(URI uri) throws IOException {
-        add(true, new URI[] { uri });
-    }
-
-    public boolean isReconnectSupported() {
-        return this.reconnectSupported;
-    }
-    
-    public void setReconnectSupported(boolean value) {
-        this.reconnectSupported=value;
-    }
-   
-    public boolean isUpdateURIsSupported() {
-        return this.updateURIsSupported;
-    }
-    
-    public void setUpdateURIsSupported(boolean value) {
-        this.updateURIsSupported=value;
-    }
-
-    public void updateURIs(boolean rebalance, URI[] updatedURIs) throws IOException {
-        if (isUpdateURIsSupported()) {
-            List<URI> copy = new ArrayList<URI>(this.updated);
-            List<URI> add = new ArrayList<URI>();
-            if (updatedURIs != null && updatedURIs.length > 0) {
-                Set<URI> set = new HashSet<URI>();
-                for (int i = 0; i < updatedURIs.length; i++) {
-                    URI uri = updatedURIs[i];
-                    if (uri != null) {
-                        set.add(uri);
-                    }
-                }
-                for (URI uri : set) {
-                    if (copy.remove(uri) == false) {
-                        add.add(uri);
-                    }
-                }
-                synchronized (reconnectMutex) {
-                    this.updated.clear();
-                    this.updated.addAll(add);
-                    for (URI uri : copy) {
-                        this.uris.remove(uri);
-                    }
-                    add(rebalance, add.toArray(new URI[add.size()]));
-                }
-            }
-        }
-    }
-    
-    /**
-     * @return the updateURIsURL
-     */
-    public String getUpdateURIsURL() {
-        return this.updateURIsURL;
-    }
-
-    /**
-     * @param updateURIsURL the updateURIsURL to set
-     */
-    public void setUpdateURIsURL(String updateURIsURL) {
-        this.updateURIsURL = updateURIsURL;
-    }
-    
-    /**
-     * @return the rebalanceUpdateURIs
-     */
-    public boolean isRebalanceUpdateURIs() {
-        return this.rebalanceUpdateURIs;
-    }
-
-    /**
-     * @param rebalanceUpdateURIs the rebalanceUpdateURIs to set
-     */
-    public void setRebalanceUpdateURIs(boolean rebalanceUpdateURIs) {
-        this.rebalanceUpdateURIs = rebalanceUpdateURIs;
-    }
-
-    public int getReceiveCounter() {
-        Transport transport = connectedTransport.get();
-        if (transport == null) {
-            return 0;
-        }
-        return transport.getReceiveCounter();
-    }
-
-    public void connectionInterruptProcessingComplete(ConnectionId connectionId) {
-        synchronized (reconnectMutex) {
-            stateTracker.connectionInterruptProcessingComplete(this, connectionId);
-        }
-    }
-    
-    public ConnectionStateTracker getStateTracker() {
-        return stateTracker;
-    }
-    
-    private boolean contains(URI newURI) {
-
-        boolean result = false;
-        try {
-        for (URI uri:uris) {
-            if (newURI.getPort()==uri.getPort()) {
-                InetAddress newAddr = InetAddress.getByName(newURI.getHost());
-                InetAddress addr = InetAddress.getByName(uri.getHost());
-                if (addr.equals(newAddr)) {
-                    result = true;
-                    break;
-                }
-            }
-        }
-        }catch(IOException e) {
-            result = true;
-            LOG.error("Failed to verify URI " + newURI + " already known: " + e);
-        }
-        return result;
-    }
-    
-    private InputStreamReader getURLStream(String path) throws IOException {
-        InputStreamReader result = null;
-        URL url = null;
-        try {
-            url = new URL(path);
-            result = new InputStreamReader(url.openStream());
-        } catch (MalformedURLException e) {
-            // ignore - it could be a path to a a local file
-        }
-        if (result == null) {
-            result = new FileReader(path);
-        }
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransportFactory.java
deleted file mode 100755
index d898035..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransportFactory.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import org.apache.activemq.transport.MutexTransport;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-public class FailoverTransportFactory extends TransportFactory {
-
-    @Override
-    public Transport doConnect(URI location) throws IOException {
-        try {
-            Transport transport = createTransport(URISupport.parseComposite(location));
-            transport = new MutexTransport(transport);
-            transport = new ResponseCorrelator(transport);
-            return transport;
-        } catch (URISyntaxException e) {
-            throw new IOException("Invalid location: " + location);
-        }
-    }
-
-    @Override
-    public Transport doCompositeConnect(URI location) throws IOException {
-        try {
-            return createTransport(URISupport.parseComposite(location));
-        } catch (URISyntaxException e) {
-            throw new IOException("Invalid location: " + location);
-        }
-    }
-
-    /**
-     * @param location
-     * @return
-     * @throws IOException
-     */
-    public Transport createTransport(CompositeData compositData) throws IOException {
-        Map options = compositData.getParameters();
-        FailoverTransport transport = createTransport(options);
-        if (!options.isEmpty()) {
-            throw new IllegalArgumentException("Invalid connect parameters: " + options);
-        }
-        transport.add(false,compositData.getComponents());
-        return transport;
-    }
-
-    public FailoverTransport createTransport(Map parameters) throws IOException {
-        FailoverTransport transport = new FailoverTransport();
-        IntrospectionSupport.setProperties(transport, parameters);
-        return transport;
-    }
-
-    @Override
-    public TransportServer doBind(URI location) throws IOException {
-        throw new IOException("Invalid server URI: " + location);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/package.html
deleted file mode 100755
index e8d4bdf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Fail-Over Transport which will automatically reconnect to a failed transport and choose one of a list of possible transport implementations to use.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
deleted file mode 100755
index a9b9aad..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
+++ /dev/null
@@ -1,617 +0,0 @@
-/**
- * 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.transport.fanout;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.state.ConnectionStateTracker;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.transport.CompositeTransport;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.ResponseCallback;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Transport that fans out a connection to multiple brokers.
- * 
- * 
- */
-public class FanoutTransport implements CompositeTransport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FanoutTransport.class);
-
-    private TransportListener transportListener;
-    private boolean disposed;
-    private boolean connected;
-
-    private final Object reconnectMutex = new Object();
-    private final ConnectionStateTracker stateTracker = new ConnectionStateTracker();
-    private final ConcurrentHashMap<Integer, RequestCounter> requestMap = new ConcurrentHashMap<Integer, RequestCounter>();
-
-    private final TaskRunner reconnectTask;
-    private boolean started;
-
-    private final ArrayList<FanoutTransportHandler> transports = new ArrayList<FanoutTransportHandler>();
-    private int connectedCount;
-
-    private int minAckCount = 2;
-
-    private long initialReconnectDelay = 10;
-    private long maxReconnectDelay = 1000 * 30;
-    private long backOffMultiplier = 2;
-    private final boolean useExponentialBackOff = true;
-    private int maxReconnectAttempts;
-    private Exception connectionFailure;
-    private FanoutTransportHandler primary;
-    private boolean fanOutQueues = false;
-
-    static class RequestCounter {
-
-        final Command command;
-        final AtomicInteger ackCount;
-
-        RequestCounter(Command command, int count) {
-            this.command = command;
-            this.ackCount = new AtomicInteger(count);
-        }
-
-        @Override
-        public String toString() {
-            return command.getCommandId() + "=" + ackCount.get();
-        }
-    }
-
-    class FanoutTransportHandler extends DefaultTransportListener {
-
-        private final URI uri;
-        private Transport transport;
-
-        private int connectFailures;
-        private long reconnectDelay = initialReconnectDelay;
-        private long reconnectDate;
-
-        public FanoutTransportHandler(URI uri) {
-            this.uri = uri;
-        }
-
-        @Override
-        public void onCommand(Object o) {
-            Command command = (Command)o;
-            if (command.isResponse()) {
-                Integer id = new Integer(((Response)command).getCorrelationId());
-                RequestCounter rc = requestMap.get(id);
-                if (rc != null) {
-                    if (rc.ackCount.decrementAndGet() <= 0) {
-                        requestMap.remove(id);
-                        transportListenerOnCommand(command);
-                    }
-                } else {
-                    transportListenerOnCommand(command);
-                }
-            } else {
-                transportListenerOnCommand(command);
-            }
-        }
-
-        @Override
-        public void onException(IOException error) {
-            try {
-                synchronized (reconnectMutex) {
-                    if (transport == null || !transport.isConnected()) {
-                        return;
-                    }
-
-                    LOG.debug("Transport failed, starting up reconnect task", error);
-
-                    ServiceSupport.dispose(transport);
-                    transport = null;
-                    connectedCount--;
-                    if (primary == this) {
-                        primary = null;
-                    }
-                    reconnectTask.wakeup();
-                }
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-                if (transportListener != null) {
-                    transportListener.onException(new InterruptedIOException());
-                }
-            }
-        }
-    }
-
-    public FanoutTransport() throws InterruptedIOException {
-        // Setup a task that is used to reconnect the a connection async.
-        reconnectTask = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(new Task() {
-            public boolean iterate() {
-                return doConnect();
-            }
-        }, "ActiveMQ Fanout Worker: " + System.identityHashCode(this));
-    }
-
-    /**
-     * @return
-     */
-    private boolean doConnect() {
-        long closestReconnectDate = 0;
-        synchronized (reconnectMutex) {
-
-            if (disposed || connectionFailure != null) {
-                reconnectMutex.notifyAll();
-            }
-
-            if (transports.size() == connectedCount || disposed || connectionFailure != null) {
-                return false;
-            } else {
-
-                if (transports.isEmpty()) {
-                    // connectionFailure = new IOException("No uris available to
-                    // connect to.");
-                } else {
-
-                    // Try to connect them up.
-                    Iterator<FanoutTransportHandler> iter = transports.iterator();
-                    for (int i = 0; iter.hasNext() && !disposed; i++) {
-
-                        long now = System.currentTimeMillis();
-
-                        FanoutTransportHandler fanoutHandler = iter.next();
-                        if (fanoutHandler.transport != null) {
-                            continue;
-                        }
-
-                        // Are we waiting a little to try to reconnect this one?
-                        if (fanoutHandler.reconnectDate != 0 && fanoutHandler.reconnectDate > now) {
-                            if (closestReconnectDate == 0 || fanoutHandler.reconnectDate < closestReconnectDate) {
-                                closestReconnectDate = fanoutHandler.reconnectDate;
-                            }
-                            continue;
-                        }
-
-                        URI uri = fanoutHandler.uri;
-                        try {
-                            LOG.debug("Stopped: " + this);
-                            LOG.debug("Attempting connect to: " + uri);
-                            Transport t = TransportFactory.compositeConnect(uri);
-                            fanoutHandler.transport = t;
-                            t.setTransportListener(fanoutHandler);
-                            if (started) {
-                                restoreTransport(fanoutHandler);
-                            }
-                            LOG.debug("Connection established");
-                            fanoutHandler.reconnectDelay = initialReconnectDelay;
-                            fanoutHandler.connectFailures = 0;
-                            if (primary == null) {
-                                primary = fanoutHandler;
-                            }
-                            connectedCount++;
-                        } catch (Exception e) {
-                            LOG.debug("Connect fail to: " + uri + ", reason: " + e);
-
-                            if( fanoutHandler.transport !=null ) {
-                                ServiceSupport.dispose(fanoutHandler.transport);
-                                fanoutHandler.transport=null;
-                            }
-                            
-                            if (maxReconnectAttempts > 0 && ++fanoutHandler.connectFailures >= maxReconnectAttempts) {
-                                LOG.error("Failed to connect to transport after: " + fanoutHandler.connectFailures + " attempt(s)");
-                                connectionFailure = e;
-                                reconnectMutex.notifyAll();
-                                return false;
-                            } else {
-
-                                if (useExponentialBackOff) {
-                                    // Exponential increment of reconnect delay.
-                                    fanoutHandler.reconnectDelay *= backOffMultiplier;
-                                    if (fanoutHandler.reconnectDelay > maxReconnectDelay) {
-                                        fanoutHandler.reconnectDelay = maxReconnectDelay;
-                                    }
-                                }
-
-                                fanoutHandler.reconnectDate = now + fanoutHandler.reconnectDelay;
-
-                                if (closestReconnectDate == 0 || fanoutHandler.reconnectDate < closestReconnectDate) {
-                                    closestReconnectDate = fanoutHandler.reconnectDate;
-                                }
-                            }
-                        }
-                    }
-                    if (transports.size() == connectedCount || disposed) {
-                        reconnectMutex.notifyAll();
-                        return false;
-                    }
-
-                }
-            }
-
-        }
-
-        try {
-            long reconnectDelay = closestReconnectDate - System.currentTimeMillis();
-            if (reconnectDelay > 0) {
-                LOG.debug("Waiting " + reconnectDelay + " ms before attempting connection. ");
-                Thread.sleep(reconnectDelay);
-            }
-        } catch (InterruptedException e1) {
-            Thread.currentThread().interrupt();
-        }
-        return true;
-    }
-
-    public void start() throws Exception {
-        synchronized (reconnectMutex) {
-            LOG.debug("Started.");
-            if (started) {
-                return;
-            }
-            started = true;
-            for (Iterator<FanoutTransportHandler> iter = transports.iterator(); iter.hasNext();) {
-                FanoutTransportHandler th = iter.next();
-                if (th.transport != null) {
-                    restoreTransport(th);
-                }
-            }
-            connected=true;
-        }
-    }
-
-    public void stop() throws Exception {
-        synchronized (reconnectMutex) {
-            ServiceStopper ss = new ServiceStopper();
-
-            if (!started) {
-                return;
-            }
-            started = false;
-            disposed = true;
-            connected=false;
-
-            for (Iterator<FanoutTransportHandler> iter = transports.iterator(); iter.hasNext();) {
-                FanoutTransportHandler th = iter.next();
-                if (th.transport != null) {
-                    ss.stop(th.transport);
-                }
-            }
-
-            LOG.debug("Stopped: " + this);
-            ss.throwFirstException();
-        }
-        reconnectTask.shutdown();
-    }
-
-	public int getMinAckCount() {
-		return minAckCount;
-	}
-
-	public void setMinAckCount(int minAckCount) {
-		this.minAckCount = minAckCount;
-	}    
-    
-    public long getInitialReconnectDelay() {
-        return initialReconnectDelay;
-    }
-
-    public void setInitialReconnectDelay(long initialReconnectDelay) {
-        this.initialReconnectDelay = initialReconnectDelay;
-    }
-
-    public long getMaxReconnectDelay() {
-        return maxReconnectDelay;
-    }
-
-    public void setMaxReconnectDelay(long maxReconnectDelay) {
-        this.maxReconnectDelay = maxReconnectDelay;
-    }
-
-    public long getReconnectDelayExponent() {
-        return backOffMultiplier;
-    }
-
-    public void setReconnectDelayExponent(long reconnectDelayExponent) {
-        this.backOffMultiplier = reconnectDelayExponent;
-    }
-
-    public int getMaxReconnectAttempts() {
-        return maxReconnectAttempts;
-    }
-
-    public void setMaxReconnectAttempts(int maxReconnectAttempts) {
-        this.maxReconnectAttempts = maxReconnectAttempts;
-    }
-
-    public void oneway(Object o) throws IOException {
-        final Command command = (Command)o;
-        try {
-            synchronized (reconnectMutex) {
-
-                // Wait for transport to be connected.
-                while (connectedCount < minAckCount && !disposed && connectionFailure == null) {
-                    LOG.debug("Waiting for at least " + minAckCount + " transports to be connected.");
-                    reconnectMutex.wait(1000);
-                }
-
-                // Still not fully connected.
-                if (connectedCount < minAckCount) {
-
-                    Exception error;
-
-                    // Throw the right kind of error..
-                    if (disposed) {
-                        error = new IOException("Transport disposed.");
-                    } else if (connectionFailure != null) {
-                        error = connectionFailure;
-                    } else {
-                        error = new IOException("Unexpected failure.");
-                    }
-
-                    if (error instanceof IOException) {
-                        throw (IOException)error;
-                    }
-                    throw IOExceptionSupport.create(error);
-                }
-
-                // If it was a request and it was not being tracked by
-                // the state tracker,
-                // then hold it in the requestMap so that we can replay
-                // it later.
-                boolean fanout = isFanoutCommand(command);
-                if (stateTracker.track(command) == null && command.isResponseRequired()) {
-                    int size = fanout ? minAckCount : 1;
-                    requestMap.put(new Integer(command.getCommandId()), new RequestCounter(command, size));
-                }
-                
-                // Send the message.
-                if (fanout) {
-                    for (Iterator<FanoutTransportHandler> iter = transports.iterator(); iter.hasNext();) {
-                        FanoutTransportHandler th = iter.next();
-                        if (th.transport != null) {
-                            try {
-                                th.transport.oneway(command);
-                            } catch (IOException e) {
-                                LOG.debug("Send attempt: failed.");
-                                th.onException(e);
-                            }
-                        }
-                    }
-                } else {
-                    try {
-                        primary.transport.oneway(command);
-                    } catch (IOException e) {
-                        LOG.debug("Send attempt: failed.");
-                        primary.onException(e);
-                    }
-                }
-
-            }
-        } catch (InterruptedException e) {
-            // Some one may be trying to stop our thread.
-            Thread.currentThread().interrupt();
-            throw new InterruptedIOException();
-        }
-    }
-
-    /**
-     * @param command
-     * @return
-     */
-    private boolean isFanoutCommand(Command command) {
-        if (command.isMessage()) {
-            if( fanOutQueues ) {
-                return true;
-            }
-            return ((Message)command).getDestination().isTopic();
-        }
-        if (command.getDataStructureType() == ConsumerInfo.DATA_STRUCTURE_TYPE ||
-                command.getDataStructureType() == RemoveInfo.DATA_STRUCTURE_TYPE) {
-            return false;
-        }
-        return true;
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public void reconnect() {
-        LOG.debug("Waking up reconnect task");
-        try {
-            reconnectTask.wakeup();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-        }
-    }
-
-    public TransportListener getTransportListener() {
-        return transportListener;
-    }
-
-    public void setTransportListener(TransportListener commandListener) {
-        this.transportListener = commandListener;
-    }
-
-    public <T> T narrow(Class<T> target) {
-
-        if (target.isAssignableFrom(getClass())) {
-            return target.cast(this);
-        }
-
-        synchronized (reconnectMutex) {
-            for (Iterator<FanoutTransportHandler> iter = transports.iterator(); iter.hasNext();) {
-                FanoutTransportHandler th = iter.next();
-                if (th.transport != null) {
-                    T rc = th.transport.narrow(target);
-                    if (rc != null) {
-                        return rc;
-                    }
-                }
-            }
-        }
-
-        return null;
-
-    }
-
-    protected void restoreTransport(FanoutTransportHandler th) throws Exception, IOException {
-        th.transport.start();
-        stateTracker.setRestoreConsumers(th.transport == primary);
-        stateTracker.restore(th.transport);
-        for (Iterator<RequestCounter> iter2 = requestMap.values().iterator(); iter2.hasNext();) {
-            RequestCounter rc = iter2.next();
-            th.transport.oneway(rc.command);
-        }
-    }
-
-    public void add(boolean reblance,URI uris[]) {
-
-        synchronized (reconnectMutex) {
-            for (int i = 0; i < uris.length; i++) {
-                URI uri = uris[i];
-
-                boolean match = false;
-                for (Iterator<FanoutTransportHandler> iter = transports.iterator(); iter.hasNext();) {
-                    FanoutTransportHandler th = iter.next();
-                    if (th.uri.equals(uri)) {
-                        match = true;
-                        break;
-                    }
-                }
-                if (!match) {
-                    FanoutTransportHandler th = new FanoutTransportHandler(uri);
-                    transports.add(th);
-                    reconnect();
-                }
-            }
-        }
-
-    }
-
-    public void remove(boolean rebalance,URI uris[]) {
-
-        synchronized (reconnectMutex) {
-            for (int i = 0; i < uris.length; i++) {
-                URI uri = uris[i];
-
-                for (Iterator<FanoutTransportHandler> iter = transports.iterator(); iter.hasNext();) {
-                    FanoutTransportHandler th = iter.next();
-                    if (th.uri.equals(uri)) {
-                        if (th.transport != null) {
-                            ServiceSupport.dispose(th.transport);
-                            connectedCount--;
-                        }
-                        iter.remove();
-                        break;
-                    }
-                }
-            }
-        }
-
-    }
-    
-    public void reconnect(URI uri) throws IOException {
-		add(true,new URI[]{uri});
-		
-	}
-    
-    public boolean isReconnectSupported() {
-        return true;
-    }
-
-    public boolean isUpdateURIsSupported() {
-        return true;
-    }
-    public void updateURIs(boolean reblance,URI[] uris) throws IOException {
-        add(reblance,uris);
-    }
-
-
-    public String getRemoteAddress() {
-        if (primary != null) {
-            if (primary.transport != null) {
-                return primary.transport.getRemoteAddress();
-            }
-        }
-        return null;
-    }
-
-    protected void transportListenerOnCommand(Command command) {
-        if (transportListener != null) {
-            transportListener.onCommand(command);
-        }
-    }
-
-    public boolean isFaultTolerant() {
-        return true;
-    }
-
-    public boolean isFanOutQueues() {
-        return fanOutQueues;
-    }
-
-    public void setFanOutQueues(boolean fanOutQueues) {
-        this.fanOutQueues = fanOutQueues;
-    }
-
-	public boolean isDisposed() {
-		return disposed;
-	}
-	
-
-    public boolean isConnected() {
-        return connected;
-    }
-
-    public int getReceiveCounter() {
-        int rc = 0;
-        synchronized (reconnectMutex) {
-            for (FanoutTransportHandler th : transports) {
-                if (th.transport != null) {
-                    rc += th.transport.getReceiveCounter();
-                }
-            }
-        }
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransportFactory.java
deleted file mode 100755
index cc55685..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransportFactory.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.transport.fanout;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.transport.MutexTransport;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.discovery.DiscoveryTransport;
-import org.apache.activemq.transport.discovery.DiscoveryTransportFactory;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-public class FanoutTransportFactory extends TransportFactory {
-
-    public Transport doConnect(URI location) throws IOException {
-        try {
-            Transport transport = createTransport(location);
-            transport = new MutexTransport(transport);
-            transport = new ResponseCorrelator(transport);
-            return transport;
-        } catch (URISyntaxException e) {
-            throw new IOException("Invalid location: " + location);
-        }
-    }
-
-    public Transport doCompositeConnect(URI location) throws IOException {
-        try {
-            return createTransport(location);
-        } catch (URISyntaxException e) {
-            throw new IOException("Invalid location: " + location);
-        }
-    }
-
-    /**
-     * @param location
-     * @return
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    public Transport createTransport(URI location) throws IOException, URISyntaxException {
-        CompositeData compositeData = URISupport.parseComposite(location);
-        Map<String, String> parameters = compositeData.getParameters();
-        FanoutTransport fanoutTransport = createTransport(parameters);        
-        DiscoveryTransport discoveryTransport = DiscoveryTransportFactory.createTransport(fanoutTransport, compositeData, parameters);
-        return discoveryTransport;
-    }
-
-    public FanoutTransport createTransport(Map<String,String> parameters) throws IOException {
-        FanoutTransport transport = new FanoutTransport();
-        IntrospectionSupport.setProperties(transport, parameters);
-        return transport;
-    }
-
-    public TransportServer doBind(URI location) throws IOException {
-        throw new IOException("Invalid server URI: " + location);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/package.html
deleted file mode 100755
index 1e87ed0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/package.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Fan-out Transport implementation which ensures that a message is sent to multiple destinations such as to ensure multiple brokers received a message for non-durable topic delivery to improve redundancy</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/CustomLogWriter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/CustomLogWriter.java
deleted file mode 100644
index 65b9162..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/CustomLogWriter.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * 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.transport.logwriters;
-
-import java.io.IOException;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.ProducerAck;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.transport.LogWriter;
-import org.slf4j.Logger;
-
-/**
- * Custom implementation of LogWriter interface.
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public class CustomLogWriter implements LogWriter {
-    
-    // doc comment inherited from LogWriter
-    public void initialMessage(Logger log) {
-        
-    }
-
-    // doc comment inherited from LogWriter
-    public void logRequest (Logger log, Object command) {
-        log.debug("$$ SENDREQ: " + CustomLogWriter.commandToString(command));
-    }
-    
-    // doc comment inherited from LogWriter
-    public void logResponse (Logger log, Object response) {
-        log.debug("$$ GOT_RESPONSE: "+response);
-    }
-    
-    // doc comment inherited from LogWriter
-    public void logAsyncRequest (Logger log, Object command) {
-        log.debug("$$ SENDING_ASNYC_REQUEST: "+command);
-    }
-    
-    // doc comment inherited from LogWriter
-    public void logOneWay (Logger log, Object command) {
-        log.debug("$$ SENDING: " + CustomLogWriter.commandToString(command));
-    }
-    
-    // doc comment inherited from LogWriter
-    public void logReceivedCommand (Logger log, Object command) {
-        log.debug("$$ RECEIVED: " + CustomLogWriter.commandToString(command));
-    }
-    
-    // doc comment inherited from LogWriter
-    public void logReceivedException (Logger log, IOException error) {
-        log.debug("$$ RECEIVED_EXCEPTION: "+error, error);
-    }
-    
-    /**
-     * Transforms a command into a String
-     * @param command An object (hopefully of the BaseCommand class or subclass)
-     * to be transformed into String.
-     * @return A String which will be written by the CustomLogWriter.
-     * If the object is not a BaseCommand, the String 
-     * "Unrecognized_object " + command.toString()
-     * will be returned.
-     */
-    private static String commandToString(Object command) {
-        StringBuilder sb = new StringBuilder();
-        
-        if (command instanceof BaseCommand) {
-
-            BaseCommand bc = (BaseCommand)command;
-            sb.append(command.getClass().getSimpleName());
-            sb.append(' ');
-            sb.append(bc.isResponseRequired() ? 'T' : 'F');
-            
-            
-            Message m = null;
-            
-            if (bc instanceof Message) {
-                m = (Message)bc;
-            }
-            if (bc instanceof MessageDispatch){
-                m = ((MessageDispatch)bc).getMessage();   
-            }
-                
-            if (m != null) {
-                sb.append(' ');
-                sb.append(m.getMessageId());
-                sb.append(',');
-                sb.append(m.getCommandId());
-                ProducerId pid = m.getProducerId();
-                long sid = pid.getSessionId();
-                sb.append(',');
-                sb.append(pid.getConnectionId());
-                sb.append(',');
-                sb.append(sid);
-                sb.append(',');
-                sb.append(pid.getValue());
-                sb.append(',');
-                sb.append(m.getCorrelationId());
-                sb.append(',');
-                sb.append(m.getType());
-            }
-            
-            if (bc instanceof MessageDispatch){
-                sb.append(" toConsumer:");
-                sb.append(((MessageDispatch)bc).getConsumerId());
-            }
-            
-            if (bc instanceof ProducerAck) {
-                sb.append(" ProducerId:");
-                sb.append(((ProducerAck)bc).getProducerId());
-            }
-            
-            if (bc instanceof MessageAck) {
-                MessageAck ma = (MessageAck)bc;
-                sb.append(" ConsumerID:");
-                sb.append(ma.getConsumerId());
-                sb.append(" ack:");
-                sb.append(ma.getFirstMessageId());
-                sb.append('-');
-                sb.append(ma.getLastMessageId());
-            }
-            
-            if (bc instanceof ConnectionInfo) {
-                ConnectionInfo ci = (ConnectionInfo)bc;
-                
-                sb.append(' ');
-                sb.append(ci.getConnectionId());
-            }
-            
-        } else if (command instanceof WireFormatInfo){
-            sb.append("WireFormatInfo");
-            
-        } else {
-            sb.append("Unrecognized_object ");
-            sb.append(command.toString());
-        }
-        
-        return sb.toString();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/DefaultLogWriter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/DefaultLogWriter.java
deleted file mode 100644
index b8261d9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/logwriters/DefaultLogWriter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.transport.logwriters;
-
-import java.io.IOException;
-
-import org.apache.activemq.transport.LogWriter;
-import org.slf4j.Logger;
-
-/**
- * Implementation of LogWriter interface to keep ActiveMQ's
- * old logging format.
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public class DefaultLogWriter implements LogWriter {
-
-    // doc comment inherited from LogWriter
-    public void initialMessage(Logger log) {
-        // Default log writer does nothing here
-    }
-
-    // doc comment inherited from LogWriter
-    public void logRequest (Logger log, Object command) {
-        log.debug("SENDING REQUEST: "+command);
-    }
-
-    // doc comment inherited from LogWriter
-    public void logResponse (Logger log, Object response) {
-        log.debug("GOT RESPONSE: "+response);
-    }
-
-    // doc comment inherited from LogWriter
-    public void logAsyncRequest (Logger log, Object command) {
-        log.debug("SENDING ASNYC REQUEST: "+command);
-    }
-
-    // doc comment inherited from LogWriter
-    public void logOneWay (Logger log, Object command) {
-        log.debug("SENDING: "+command);
-    }
-
-    // doc comment inherited from LogWriter
-    public void logReceivedCommand (Logger log, Object command) {
-        log.debug("RECEIVED: " + command);
-    }
-
-    // doc comment inherited from LogWriter
-    public void logReceivedException (Logger log, IOException error) {
-        log.debug("RECEIVED Exception: "+error, error);
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
deleted file mode 100644
index 60c94af..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * 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.transport.mock;
-
-import java.io.IOException;
-import java.net.URI;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.ResponseCallback;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFilter;
-import org.apache.activemq.transport.TransportListener;
-
-/**
- * 
- */
-public class MockTransport extends DefaultTransportListener implements Transport {
-
-    protected Transport next;
-    protected TransportListener transportListener;
-
-    public MockTransport(Transport next) {
-        this.next = next;
-    }
-
-    /**
-     */
-    public synchronized void setTransportListener(TransportListener channelListener) {
-        this.transportListener = channelListener;
-        if (channelListener == null) {
-            getNext().setTransportListener(null);
-        } else {
-            getNext().setTransportListener(this);
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.Service#start()
-     * @throws IOException if the next channel has not been set.
-     */
-    public void start() throws Exception {
-        if (getNext() == null) {
-            throw new IOException("The next channel has not been set.");
-        }
-        if (transportListener == null) {
-            throw new IOException("The command listener has not been set.");
-        }
-        getNext().start();
-    }
-
-    /**
-     * @see org.apache.activemq.Service#stop()
-     */
-    public void stop() throws Exception {
-        getNext().stop();
-    }
-
-    @Override
-    public void onCommand(Object command) {
-        getTransportListener().onCommand(command);
-    }
-
-    /**
-     * @return Returns the getNext().
-     */
-    public synchronized Transport getNext() {
-        return next;
-    }
-
-    /**
-     * @return Returns the packetListener.
-     */
-    public synchronized TransportListener getTransportListener() {
-        return transportListener;
-    }
-
-    @Override
-    public String toString() {
-        return getNext().toString();
-    }
-
-    public void oneway(Object command) throws IOException {
-        getNext().oneway(command);
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        return getNext().asyncRequest(command, null);
-    }
-
-    public Object request(Object command) throws IOException {
-        return getNext().request(command);
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        return getNext().request(command, timeout);
-    }
-
-    @Override
-    public void onException(IOException error) {
-        getTransportListener().onException(error);
-    }
-
-    public <T> T narrow(Class<T> target) {
-        if (target.isAssignableFrom(getClass())) {
-            return target.cast(this);
-        }
-        return getNext().narrow(target);
-    }
-
-    public synchronized void setNext(Transport next) {
-        this.next = next;
-    }
-
-    public void install(TransportFilter filter) {
-        filter.setTransportListener(this);
-        getNext().setTransportListener(filter);
-        setNext(filter);
-    }
-
-    public String getRemoteAddress() {
-        return getNext().getRemoteAddress();
-    }
-
-    /**
-     * @see org.apache.activemq.transport.Transport#isFaultTolerant()
-     */
-    public boolean isFaultTolerant() {
-        return getNext().isFaultTolerant();
-    }
-
-	public boolean isDisposed() {
-		return getNext().isDisposed();
-	}
-	
-	public boolean isConnected() {
-       return getNext().isConnected();
-    }
-
-	public void reconnect(URI uri) throws IOException {
-		getNext().reconnect(uri);
-	}
-
-    public int getReceiveCounter() {
-        return getNext().getReceiveCounter();
-    }
-    
-
-    public boolean isReconnectSupported() {
-        return getNext().isReconnectSupported();
-    }
-
-    public boolean isUpdateURIsSupported() {
-        return getNext().isUpdateURIsSupported();
-    }
-    public void updateURIs(boolean reblance,URI[] uris) throws IOException {
-       getNext().updateURIs(reblance,uris);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java
deleted file mode 100755
index 7d8eb4f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransportFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.transport.mock;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.apache.activemq.transport.MutexTransport;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-public class MockTransportFactory extends TransportFactory {
-
-    public Transport doConnect(URI location) throws URISyntaxException, Exception {
-        Transport transport = createTransport(URISupport.parseComposite(location));
-        transport = new MutexTransport(transport);
-        transport = new ResponseCorrelator(transport);
-        return transport;
-    }
-
-    public Transport doCompositeConnect(URI location) throws URISyntaxException, Exception {
-        return createTransport(URISupport.parseComposite(location));
-    }
-
-    /**
-     * @param location
-     * @return
-     * @throws Exception
-     */
-    public Transport createTransport(CompositeData compositData) throws Exception {
-        MockTransport transport = new MockTransport(TransportFactory.compositeConnect(compositData.getComponents()[0]));
-        IntrospectionSupport.setProperties(transport, compositData.getParameters());
-        return transport;
-    }
-
-    public TransportServer doBind(URI location) throws IOException {
-        throw new IOException("This protocol does not support being bound.");
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/package.html
deleted file mode 100755
index fb9bea2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- A mock implementation of the Transport layer useful for testing
- 
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastDatagramHeaderMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastDatagramHeaderMarshaller.java
deleted file mode 100644
index fa08ae6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastDatagramHeaderMarshaller.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.transport.multicast;
-
-import java.net.SocketAddress;
-import java.nio.ByteBuffer;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Endpoint;
-import org.apache.activemq.transport.udp.DatagramEndpoint;
-import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
-
-/**
- * 
- * 
- */
-public class MulticastDatagramHeaderMarshaller extends DatagramHeaderMarshaller {
-
-    private final byte[] localUriAsBytes;
-
-    public MulticastDatagramHeaderMarshaller(String localUri) {
-        this.localUriAsBytes = localUri.getBytes();
-    }
-
-    public Endpoint createEndpoint(ByteBuffer readBuffer, SocketAddress address) {
-        int size = readBuffer.getInt();
-        byte[] data = new byte[size];
-        readBuffer.get(data);
-        return new DatagramEndpoint(new String(data), address);
-    }
-
-    public void writeHeader(Command command, ByteBuffer writeBuffer) {
-        writeBuffer.putInt(localUriAsBytes.length);
-        writeBuffer.put(localUriAsBytes);
-        super.writeHeader(command, writeBuffer);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java
deleted file mode 100644
index c00a58d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * 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.transport.multicast;
-
-import java.io.IOException;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.MulticastSocket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.URI;
-import java.net.UnknownHostException;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.udp.CommandChannel;
-import org.apache.activemq.transport.udp.CommandDatagramSocket;
-import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
-import org.apache.activemq.transport.udp.UdpTransport;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A multicast based transport.
- * 
- * 
- */
-public class MulticastTransport extends UdpTransport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MulticastTransport.class);
-
-    private static final int DEFAULT_IDLE_TIME = 5000;
-
-    private MulticastSocket socket;
-    private InetAddress mcastAddress;
-    private int mcastPort;
-    private int timeToLive = 1;
-    private boolean loopBackMode;
-    private long keepAliveInterval = DEFAULT_IDLE_TIME;
-
-    public MulticastTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException, IOException {
-        super(wireFormat, remoteLocation);
-    }
-
-    public long getKeepAliveInterval() {
-        return keepAliveInterval;
-    }
-
-    public void setKeepAliveInterval(long keepAliveInterval) {
-        this.keepAliveInterval = keepAliveInterval;
-    }
-
-    public boolean isLoopBackMode() {
-        return loopBackMode;
-    }
-
-    public void setLoopBackMode(boolean loopBackMode) {
-        this.loopBackMode = loopBackMode;
-    }
-
-    public int getTimeToLive() {
-        return timeToLive;
-    }
-
-    public void setTimeToLive(int timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-    protected String getProtocolName() {
-        return "Multicast";
-    }
-
-    protected String getProtocolUriScheme() {
-        return "multicast://";
-    }
-
-    protected void bind(DatagramSocket socket, SocketAddress localAddress) throws SocketException {
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        super.doStop(stopper);
-        if (socket != null) {
-            try {
-                socket.leaveGroup(getMulticastAddress());
-            } catch (IOException e) {
-                stopper.onException(this, e);
-            }
-            socket.close();
-        }
-    }
-
-    protected CommandChannel createCommandChannel() throws IOException {
-        socket = new MulticastSocket(mcastPort);
-        socket.setLoopbackMode(loopBackMode);
-        socket.setTimeToLive(timeToLive);
-
-        LOG.debug("Joining multicast address: " + getMulticastAddress());
-        socket.joinGroup(getMulticastAddress());
-        socket.setSoTimeout((int)keepAliveInterval);
-
-        return new CommandDatagramSocket(this, getWireFormat(), getDatagramSize(), getTargetAddress(), createDatagramHeaderMarshaller(), getSocket());
-    }
-
-    protected InetAddress getMulticastAddress() {
-        return mcastAddress;
-    }
-
-    protected MulticastSocket getSocket() {
-        return socket;
-    }
-
-    protected void setSocket(MulticastSocket socket) {
-        this.socket = socket;
-    }
-
-    protected InetSocketAddress createAddress(URI remoteLocation) throws UnknownHostException, IOException {
-        this.mcastAddress = InetAddress.getByName(remoteLocation.getHost());
-        this.mcastPort = remoteLocation.getPort();
-        return new InetSocketAddress(mcastAddress, mcastPort);
-    }
-
-    protected DatagramHeaderMarshaller createDatagramHeaderMarshaller() {
-        return new MulticastDatagramHeaderMarshaller("udp://dummyHostName:" + getPort());
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java
deleted file mode 100644
index d000c6c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.transport.multicast;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.UnknownHostException;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.udp.UdpTransportFactory;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * A factory of multicast transport classes
- * 
- * 
- */
-public class MulticastTransportFactory extends UdpTransportFactory {
-
-    protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException {
-        OpenWireFormat wireFormat = asOpenWireFormat(wf);
-        return new MulticastTransport(wireFormat, location);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html
deleted file mode 100755
index f97efca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-A Multicast based Transport implementation.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOBufferedInputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOBufferedInputStream.java
deleted file mode 100644
index 31f0bfb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOBufferedInputStream.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- *
- * 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.transport.nio;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.nio.channels.Channel;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.SocketChannel;
-
-/**
- * Implementation of InputStream using Java NIO channel,direct buffer and
- * Selector
- */
-public class NIOBufferedInputStream extends InputStream {
-
-    private final static int BUFFER_SIZE = 8192;
-
-    private SocketChannel sc = null;
-
-    private ByteBuffer bb = null;
-
-    private Selector rs = null;
-
-    public NIOBufferedInputStream(ReadableByteChannel channel, int size)
-            throws ClosedChannelException, IOException {
-
-        if (size <= 0) {
-            throw new IllegalArgumentException("Buffer size <= 0");
-        }
-
-        this.bb = ByteBuffer.allocateDirect(size);
-        this.sc = (SocketChannel) channel;
-
-        this.sc.configureBlocking(false);
-
-        this.rs = Selector.open();
-
-        sc.register(rs, SelectionKey.OP_READ);
-
-        bb.position(0);
-        bb.limit(0);
-    }
-
-    public NIOBufferedInputStream(ReadableByteChannel channel)
-            throws ClosedChannelException, IOException {
-        this(channel, BUFFER_SIZE);
-    }
-
-    public int available() throws IOException {
-        if (!rs.isOpen())
-            throw new IOException("Input Stream Closed");
-
-        return bb.remaining();
-    }
-
-    public void close() throws IOException {
-        if (rs.isOpen()) {
-            rs.close();
-
-            if (sc.isOpen()) {
-                sc.socket().shutdownInput();
-                sc.socket().close();
-            }
-
-            bb = null;
-            sc = null;
-        }
-    }
-
-    public int read() throws IOException {
-        if (!rs.isOpen())
-            throw new IOException("Input Stream Closed");
-
-        if (!bb.hasRemaining()) {
-            try {
-                fill(1);
-            } catch (ClosedChannelException e) {
-                close();
-                return -1;
-            }
-        }
-
-        return (bb.get() & 0xFF);
-    }
-
-    public int read(byte[] b, int off, int len) throws IOException {
-        int bytesCopied = -1;
-
-        if (!rs.isOpen())
-            throw new IOException("Input Stream Closed");
-
-        while (bytesCopied == -1) {
-            if (bb.hasRemaining()) {
-                bytesCopied = (len < bb.remaining() ? len : bb.remaining());
-                bb.get(b, off, bytesCopied);
-            } else {
-                try {
-                    fill(1);
-                } catch (ClosedChannelException e) {
-                    close();
-                    return -1;
-                }
-            }
-        }
-
-        return bytesCopied;
-    }
-
-    public long skip(long n) throws IOException {
-        long skiped = 0;
-
-        if (!rs.isOpen())
-            throw new IOException("Input Stream Closed");
-
-        while (n > 0) {
-            if (n <= bb.remaining()) {
-                skiped += n;
-                bb.position(bb.position() + (int) n);
-                n = 0;
-            } else {
-                skiped += bb.remaining();
-                n -= bb.remaining();
-
-                bb.position(bb.limit());
-
-                try {
-                    fill((int) n);
-                } catch (ClosedChannelException e) {
-                    close();
-                    return skiped;
-                }
-            }
-        }
-
-        return skiped;
-    }
-
-    private void fill(int n) throws IOException, ClosedChannelException {
-        int bytesRead = -1;
-
-        if ((n <= 0) || (n <= bb.remaining()))
-            return;
-
-        bb.compact();
-
-        n = (bb.remaining() < n ? bb.remaining() : n);
-
-        for (;;) {
-            bytesRead = sc.read(bb);
-
-            if (bytesRead == -1)
-                throw new ClosedChannelException();
-
-            n -= bytesRead;
-
-            if (n <= 0)
-                break;
-
-            rs.select(0);
-            rs.selectedKeys().clear();
-        }
-
-        bb.flip();
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOInputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOInputStream.java
deleted file mode 100644
index 60c6a56..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOInputStream.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.transport.nio;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.BufferUnderflowException;
-import java.nio.ByteBuffer;
-
-/**
- * An optimized buffered input stream for Tcp
- * 
- * 
- */
-public class NIOInputStream extends InputStream {
-
-    protected int count;
-    protected int position;
-    private final ByteBuffer in;
-
-    public NIOInputStream(ByteBuffer in) {
-        this.in = in;
-    }
-
-    public int read() throws IOException {
-        try {
-            int rc = in.get() & 0xff;
-            return rc;
-        } catch (BufferUnderflowException e) {
-            return -1;
-        }
-    }
-
-    public int read(byte b[], int off, int len) throws IOException {
-        if (in.hasRemaining()) {
-            int rc = Math.min(len, in.remaining());
-            in.get(b, off, rc);
-            return rc;
-        } else {
-            return len == 0 ? 0 : -1;
-        }
-    }
-
-    public long skip(long n) throws IOException {
-        int rc = Math.min((int)n, in.remaining());
-        in.position(in.position() + rc);
-        return rc;
-    }
-
-    public int available() throws IOException {
-        return in.remaining();
-    }
-
-    public boolean markSupported() {
-        return false;
-    }
-
-    public void close() throws IOException {
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java
deleted file mode 100644
index 6e183ff..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * 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.transport.nio;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.nio.channels.WritableByteChannel;
-
-import org.apache.activemq.transport.tcp.TimeStampStream;
-
-/**
- * An optimized buffered outputstream for Tcp
- * 
- * 
- */
-
-public class NIOOutputStream extends OutputStream implements TimeStampStream {
-
-    private static final int BUFFER_SIZE = 8192;
-
-    private final WritableByteChannel out;
-    private final byte[] buffer;
-    private final ByteBuffer byteBuffer;
-
-    private int count;
-    private boolean closed;
-    private volatile long writeTimestamp = -1;//concurrent reads of this value
-
-    /**
-     * Constructor
-     * 
-     * @param out
-     */
-    public NIOOutputStream(WritableByteChannel out) {
-        this(out, BUFFER_SIZE);
-    }
-
-    /**
-     * Creates a new buffered output stream to write data to the specified
-     * underlying output stream with the specified buffer size.
-     * 
-     * @param out the underlying output stream.
-     * @param size the buffer size.
-     * @throws IllegalArgumentException if size <= 0.
-     */
-    public NIOOutputStream(WritableByteChannel out, int size) {
-        this.out = out;
-        if (size <= 0) {
-            throw new IllegalArgumentException("Buffer size <= 0");
-        }
-        buffer = new byte[size];
-        byteBuffer = ByteBuffer.wrap(buffer);
-    }
-
-    /**
-     * write a byte on to the stream
-     * 
-     * @param b - byte to write
-     * @throws IOException
-     */
-    public void write(int b) throws IOException {
-        checkClosed();
-        if (availableBufferToWrite() < 1) {
-            flush();
-        }
-        buffer[count++] = (byte)b;
-    }
-
-    /**
-     * write a byte array to the stream
-     * 
-     * @param b the byte buffer
-     * @param off the offset into the buffer
-     * @param len the length of data to write
-     * @throws IOException
-     */
-    public void write(byte b[], int off, int len) throws IOException {
-        checkClosed();
-        if (availableBufferToWrite() < len) {
-            flush();
-        }
-        if (buffer.length >= len) {
-            System.arraycopy(b, off, buffer, count, len);
-            count += len;
-        } else {
-            write(ByteBuffer.wrap(b, off, len));
-        }
-    }
-
-    /**
-     * flush the data to the output stream This doesn't call flush on the
-     * underlying outputstream, because Tcp is particularly efficent at doing
-     * this itself ....
-     * 
-     * @throws IOException
-     */
-    public void flush() throws IOException {
-        if (count > 0 && out != null) {
-            byteBuffer.position(0);
-            byteBuffer.limit(count);
-            write(byteBuffer);
-            count = 0;
-        }
-    }
-
-    /**
-     * close this stream
-     * 
-     * @throws IOException
-     */
-    public void close() throws IOException {
-        super.close();
-        closed = true;
-    }
-
-    /**
-     * Checks that the stream has not been closed
-     * 
-     * @throws IOException
-     */
-    protected void checkClosed() throws IOException {
-        if (closed) {
-            throw new EOFException("Cannot write to the stream any more it has already been closed");
-        }
-    }
-
-    /**
-     * @return the amount free space in the buffer
-     */
-    private int availableBufferToWrite() {
-        return buffer.length - count;
-    }
-
-    protected void write(ByteBuffer data) throws IOException {
-        int remaining = data.remaining();
-        int lastRemaining = remaining - 1;
-        long delay = 1;
-        try {
-            writeTimestamp = System.currentTimeMillis();
-            while (remaining > 0) {
-
-                // We may need to do a little bit of sleeping to avoid a busy loop.
-                // Slow down if no data was written out..
-                if (remaining == lastRemaining) {
-                    try {
-                        // Use exponential rollback to increase sleep time.
-                        Thread.sleep(delay);
-                        delay *= 2;
-                        if (delay > 1000) {
-                            delay = 1000;
-                        }
-                    } catch (InterruptedException e) {
-                        throw new InterruptedIOException();
-                    }
-                } else {
-                    delay = 1;
-                }
-                lastRemaining = remaining;
-
-                // Since the write is non-blocking, all the data may not have been
-                // written.
-                out.write(data);
-                remaining = data.remaining();
-            }
-        } finally {
-            writeTimestamp = -1;
-        }
-    }
-    
-    
-    /* (non-Javadoc)
-     * @see org.apache.activemq.transport.tcp.TimeStampStream#isWriting()
-     */
-    public boolean isWriting() {
-        return writeTimestamp > 0;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.activemq.transport.tcp.TimeStampStream#getWriteTimestamp()
-     */
-    public long getWriteTimestamp() {
-        return writeTimestamp;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java
deleted file mode 100644
index 133bdfc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.transport.nio;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.SocketChannel;
-
-import javax.net.SocketFactory;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * An implementation of the {@link Transport} interface using raw tcp/ip
- * 
- * 
- */
-public class NIOTransport extends TcpTransport {
-
-    // private static final Logger log = LoggerFactory.getLogger(NIOTransport.class);
-    private SocketChannel channel;
-    private SelectorSelection selection;
-    private ByteBuffer inputBuffer;
-    private ByteBuffer currentBuffer;
-    private int nextFrameSize;
-
-    public NIOTransport(WireFormat wireFormat, SocketFactory socketFactory, URI remoteLocation, URI localLocation) throws UnknownHostException, IOException {
-        super(wireFormat, socketFactory, remoteLocation, localLocation);
-    }
-
-    public NIOTransport(WireFormat wireFormat, Socket socket) throws IOException {
-        super(wireFormat, socket);
-    }
-
-    protected void initializeStreams() throws IOException {
-        channel = socket.getChannel();
-        channel.configureBlocking(false);
-
-        // listen for events telling us when the socket is readable.
-        selection = SelectorManager.getInstance().register(channel, new SelectorManager.Listener() {
-            public void onSelect(SelectorSelection selection) {
-                serviceRead();
-            }
-
-            public void onError(SelectorSelection selection, Throwable error) {
-                if (error instanceof IOException) {
-                    onException((IOException)error);
-                } else {
-                    onException(IOExceptionSupport.create(error));
-                }
-            }
-        });
-
-        // Send the data via the channel
-        // inputBuffer = ByteBuffer.allocateDirect(8*1024);
-        inputBuffer = ByteBuffer.allocate(8 * 1024);
-        currentBuffer = inputBuffer;
-        nextFrameSize = -1;
-        currentBuffer.limit(4);
-        NIOOutputStream outPutStream = new NIOOutputStream(channel, 16 * 1024);
-        this.dataOut = new DataOutputStream(outPutStream);
-        this.buffOut = outPutStream;
-    }
-
-    private void serviceRead() {
-        try {
-            while (true) {
-
-                int readSize = channel.read(currentBuffer);
-                if (readSize == -1) {
-                    onException(new EOFException());
-                    selection.close();
-                    break;
-                }
-                if (readSize == 0) {
-                    break;
-                }
-
-                if (currentBuffer.hasRemaining()) {
-                    continue;
-                }
-
-                // Are we trying to figure out the size of the next frame?
-                if (nextFrameSize == -1) {
-                    assert inputBuffer == currentBuffer;
-
-                    // If the frame is too big to fit in our direct byte buffer,
-                    // Then allocate a non direct byte buffer of the right size
-                    // for it.
-                    inputBuffer.flip();
-                    nextFrameSize = inputBuffer.getInt() + 4;
-                    if (nextFrameSize > inputBuffer.capacity()) {
-                        currentBuffer = ByteBuffer.allocate(nextFrameSize);
-                        currentBuffer.putInt(nextFrameSize);
-                    } else {
-                        inputBuffer.limit(nextFrameSize);
-                    }
-
-                } else {
-                    currentBuffer.flip();
-
-                    Object command = wireFormat.unmarshal(new DataInputStream(new NIOInputStream(currentBuffer)));
-                    doConsume((Command)command);
-
-                    nextFrameSize = -1;
-                    inputBuffer.clear();
-                    inputBuffer.limit(4);
-                    currentBuffer = inputBuffer;
-                }
-
-            }
-
-        } catch (IOException e) {
-            onException(e);
-        } catch (Throwable e) {
-            onException(IOExceptionSupport.create(e));
-        }
-    }
-
-    protected void doStart() throws Exception {
-        connect();
-        selection.setInterestOps(SelectionKey.OP_READ);
-        selection.enable();
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        if (selection != null) {
-            selection.close();
-        }
-        super.doStop(stopper);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransportFactory.java
deleted file mode 100644
index dd068b7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransportFactory.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.transport.nio;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.apache.activemq.transport.tcp.TcpTransportFactory;
-import org.apache.activemq.transport.tcp.TcpTransportServer;
-import org.apache.activemq.wireformat.WireFormat;
-
-public class NIOTransportFactory extends TcpTransportFactory {
-
-    protected TcpTransportServer createTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-        return new TcpTransportServer(this, location, serverSocketFactory) {
-            protected Transport createTransport(Socket socket, WireFormat format) throws IOException {
-                return new NIOTransport(format, socket);
-            }
-        };
-    }
-
-    protected TcpTransport createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws UnknownHostException, IOException {
-        return new NIOTransport(wf, socketFactory, location, localLocation);
-    }
-
-    protected ServerSocketFactory createServerSocketFactory() {
-        return new ServerSocketFactory() {
-            public ServerSocket createServerSocket(int port) throws IOException {
-                ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
-                serverSocketChannel.socket().bind(new InetSocketAddress(port));
-                return serverSocketChannel.socket();
-            }
-
-            public ServerSocket createServerSocket(int port, int backlog) throws IOException {
-                ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
-                serverSocketChannel.socket().bind(new InetSocketAddress(port), backlog);
-                return serverSocketChannel.socket();
-            }
-
-            public ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException {
-                ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
-                serverSocketChannel.socket().bind(new InetSocketAddress(ifAddress, port), backlog);
-                return serverSocketChannel.socket();
-            }
-        };
-    }
-
-    protected SocketFactory createSocketFactory() {
-        return new SocketFactory() {
-
-            public Socket createSocket() throws IOException {
-                SocketChannel channel = SocketChannel.open();
-                return channel.socket();
-            }
-
-            public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
-                SocketChannel channel = SocketChannel.open();
-                channel.connect(new InetSocketAddress(host, port));
-                return channel.socket();
-            }
-
-            public Socket createSocket(InetAddress address, int port) throws IOException {
-                SocketChannel channel = SocketChannel.open();
-                channel.connect(new InetSocketAddress(address, port));
-                return channel.socket();
-            }
-
-            public Socket createSocket(String address, int port, InetAddress localAddresss, int localPort) throws IOException, UnknownHostException {
-                SocketChannel channel = SocketChannel.open();
-                channel.socket().bind(new InetSocketAddress(localAddresss, localPort));
-                channel.connect(new InetSocketAddress(address, port));
-                return channel.socket();
-            }
-
-            public Socket createSocket(InetAddress address, int port, InetAddress localAddresss, int localPort) throws IOException {
-                SocketChannel channel = SocketChannel.open();
-                channel.socket().bind(new InetSocketAddress(localAddresss, localPort));
-                channel.connect(new InetSocketAddress(address, port));
-                return channel.socket();
-            }
-        };
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
deleted file mode 100644
index 9782f3b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.transport.nio;
-
-import java.io.IOException;
-import java.nio.channels.SocketChannel;
-import java.util.LinkedList;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-/**
- * The SelectorManager will manage one Selector and the thread that checks the
- * selector.
- * 
- * We may need to consider running more than one thread to check the selector if
- * servicing the selector takes too long.
- * 
- * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
- */
-public final class SelectorManager {
-
-    public static final SelectorManager SINGLETON = new SelectorManager();
-
-    private Executor selectorExecutor = createDefaultExecutor();
-    private Executor channelExecutor = selectorExecutor;
-    private LinkedList<SelectorWorker> freeWorkers = new LinkedList<SelectorWorker>();
-    private int maxChannelsPerWorker = 1024;
-    
-    protected ExecutorService createDefaultExecutor() {
-        ThreadPoolExecutor rc = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 10, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>(), new ThreadFactory() {
-            public Thread newThread(Runnable runnable) {
-                return new Thread(runnable, "ActiveMQ NIO Worker");
-            }
-        });
-        // rc.allowCoreThreadTimeOut(true);
-        return rc;
-    }
-    
-    public static SelectorManager getInstance() {
-        return SINGLETON;
-    }
-
-    public interface Listener {
-        void onSelect(SelectorSelection selector);
-
-        void onError(SelectorSelection selection, Throwable error);
-    }
-
-
-    public synchronized SelectorSelection register(SocketChannel socketChannel, Listener listener)
-        throws IOException {
-
-        SelectorSelection selection = null;
-        while( selection == null ) {
-            if (freeWorkers.size() > 0) {
-                SelectorWorker worker = freeWorkers.getFirst();
-                if( worker.isReleased() ) {
-                    freeWorkers.remove(worker);
-                } else {
-                    worker.retain();
-                    selection = new SelectorSelection(worker, socketChannel, listener);
-                }
-                
-            } else {
-                // Worker starts /w retain count of 1
-                SelectorWorker worker = new SelectorWorker(this);
-                freeWorkers.addFirst(worker);
-                selection = new SelectorSelection(worker, socketChannel, listener);
-            }
-        }
-        
-        return selection;
-    }
-
-    synchronized void onWorkerFullEvent(SelectorWorker worker) {
-        freeWorkers.remove(worker);
-    }
-
-    public synchronized void onWorkerEmptyEvent(SelectorWorker worker) {
-        freeWorkers.remove(worker);
-    }
-
-    public synchronized void onWorkerNotFullEvent(SelectorWorker worker) {
-        freeWorkers.addFirst(worker);
-    }
-
-    public Executor getChannelExecutor() {
-        return channelExecutor;
-    }
-
-    public void setChannelExecutor(Executor channelExecutor) {
-        this.channelExecutor = channelExecutor;
-    }
-
-    public int getMaxChannelsPerWorker() {
-        return maxChannelsPerWorker;
-    }
-
-    public void setMaxChannelsPerWorker(int maxChannelsPerWorker) {
-        this.maxChannelsPerWorker = maxChannelsPerWorker;
-    }
-
-    public Executor getSelectorExecutor() {
-        return selectorExecutor;
-    }
-
-    public void setSelectorExecutor(Executor selectorExecutor) {
-        this.selectorExecutor = selectorExecutor;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java
deleted file mode 100644
index e96d50d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.transport.nio;
-
-import java.nio.channels.CancelledKeyException;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.SocketChannel;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.transport.nio.SelectorManager.Listener;
-
-/**
- * @author chirino
- */
-public final class SelectorSelection {
-
-    private final SelectorWorker worker;
-    private final Listener listener;
-    private int interest;
-    private SelectionKey key;
-    private AtomicBoolean closed = new AtomicBoolean();
-
-    public SelectorSelection(final SelectorWorker worker, final SocketChannel socketChannel, Listener listener) throws ClosedChannelException {
-        this.worker = worker;
-        this.listener = listener;
-        worker.addIoTask(new Runnable() {
-            public void run() {
-                try {
-                    SelectorSelection.this.key = socketChannel.register(worker.selector, 0, SelectorSelection.this);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-    }
-
-    public void setInterestOps(int ops) {
-        interest = ops;
-    }
-
-    public void enable() {
-        worker.addIoTask(new Runnable() {
-            public void run() {
-                try {
-                    key.interestOps(interest);
-                } catch (CancelledKeyException e) {
-                }
-            }
-        });        
-    }
-
-    public void disable() {
-        worker.addIoTask(new Runnable() {
-            public void run() {
-                try {
-                    key.interestOps(0);
-                } catch (CancelledKeyException e) {
-                }
-            }
-        });        
-    }
-
-    public void close() {
-        // guard against multiple closes.
-        if( closed.compareAndSet(false, true) ) {
-            worker.addIoTask(new Runnable() {
-                public void run() {
-                    try {
-                        key.cancel();
-                    } catch (CancelledKeyException e) {
-                    }
-                    worker.release();
-                }
-            });        
-        }
-    }
-
-    public void onSelect() {
-        listener.onSelect(this);
-    }
-
-    public void onError(Throwable e) {
-        listener.onError(this, e);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorWorker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorWorker.java
deleted file mode 100644
index e55e378..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorWorker.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.transport.nio;
-
-import java.io.IOException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicInteger;
-
-public class SelectorWorker implements Runnable {
-
-    private static final AtomicInteger NEXT_ID = new AtomicInteger();
-
-    final SelectorManager manager;
-    final Selector selector;
-    final int id = NEXT_ID.getAndIncrement();
-    private final int maxChannelsPerWorker;
-
-    final AtomicInteger retainCounter = new AtomicInteger(1);
-    private final ConcurrentLinkedQueue<Runnable> ioTasks = new ConcurrentLinkedQueue<Runnable>();
-       
-    public SelectorWorker(SelectorManager manager) throws IOException {
-        this.manager = manager;
-        selector = Selector.open();
-        maxChannelsPerWorker = manager.getMaxChannelsPerWorker();
-        manager.getSelectorExecutor().execute(this);
-    }
-
-    void retain() {
-        if (retainCounter.incrementAndGet() == maxChannelsPerWorker) {
-            manager.onWorkerFullEvent(this);
-        }
-    }
-
-    void release() {
-        int use = retainCounter.decrementAndGet();
-        if (use == 0) {
-            manager.onWorkerEmptyEvent(this);
-        } else if (use == maxChannelsPerWorker - 1) {
-            manager.onWorkerNotFullEvent(this);
-        }
-    }
-    
-    boolean isReleased() {
-        return retainCounter.get()==0;
-    }
-
-
-    public void addIoTask(Runnable work) {
-        ioTasks.add(work);
-        selector.wakeup();
-    }
-    
-    private void processIoTasks() {
-        Runnable task; 
-        while( (task= ioTasks.poll()) !=null ) {
-            try {
-                task.run();
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    
-
-    public void run() {
-
-        String origName = Thread.currentThread().getName();
-        try {
-            Thread.currentThread().setName("Selector Worker: " + id);
-            while (!isReleased()) {
-            	
-            	processIoTasks();
-            	
-            	int count = selector.select(10);
-            	
-                if (count == 0) {
-                    continue;
-                }
-
-                // Get a java.util.Set containing the SelectionKey objects
-                // for all channels that are ready for I/O.
-                Set keys = selector.selectedKeys();
-
-                for (Iterator i = keys.iterator(); i.hasNext();) {
-                    final SelectionKey key = (SelectionKey)i.next();
-                    i.remove();
-
-                    final SelectorSelection s = (SelectorSelection)key.attachment();
-                    try {
-                        if( key.isValid() ) {
-                            key.interestOps(0);
-                        }
-
-                        // Kick off another thread to find newly selected keys
-                        // while we process the
-                        // currently selected keys
-                        manager.getChannelExecutor().execute(new Runnable() {
-                            public void run() {
-                                try {
-                                    s.onSelect();
-                                    s.enable();
-                                } catch (Throwable e) {
-                                    s.onError(e);
-                                }
-                            }
-                        });
-
-                    } catch (Throwable e) {
-                        s.onError(e);
-                    }
-
-                }
-
-            }
-        } catch (Throwable e) {         	
-            e.printStackTrace();
-            // Notify all the selections that the error occurred.
-            Set keys = selector.keys();
-            for (Iterator i = keys.iterator(); i.hasNext();) {
-                SelectionKey key = (SelectionKey)i.next();
-                SelectorSelection s = (SelectorSelection)key.attachment();
-                s.onError(e);
-            }
-        } finally {
-            try {
-                manager.onWorkerEmptyEvent(this);
-                selector.close();
-            } catch (IOException ignore) {
-            	ignore.printStackTrace();
-            }
-            Thread.currentThread().setName(origName);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/package.html
deleted file mode 100755
index b1906e4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-The core Transport abstraction and support classes
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/PeerTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/PeerTransportFactory.java
deleted file mode 100755
index fef19c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/PeerTransportFactory.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.transport.peer;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.broker.BrokerFactoryHandler;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.vm.VMTransportFactory;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-
-public class PeerTransportFactory extends TransportFactory {
-
-    public static final ConcurrentHashMap BROKERS = new ConcurrentHashMap();
-    public static final ConcurrentHashMap CONNECTORS = new ConcurrentHashMap();
-    public static final ConcurrentHashMap SERVERS = new ConcurrentHashMap();
-    private static final IdGenerator ID_GENERATOR = new IdGenerator("peer-");
-
-    public Transport doConnect(URI location) throws Exception {
-        VMTransportFactory vmTransportFactory = createTransportFactory(location);
-        return vmTransportFactory.doConnect(location);
-    }
-
-    public Transport doCompositeConnect(URI location) throws Exception {
-        VMTransportFactory vmTransportFactory = createTransportFactory(location);
-        return vmTransportFactory.doCompositeConnect(location);
-    }
-
-    /**
-     * @param location
-     * @return the converted URI
-     * @throws URISyntaxException
-     */
-    private VMTransportFactory createTransportFactory(URI location) throws IOException {
-        try {
-            String group = location.getHost();
-            String broker = URISupport.stripPrefix(location.getPath(), "/");
-
-            if (group == null) {
-                group = "default";
-            }
-            if (broker == null || broker.length() == 0) {
-                broker = ID_GENERATOR.generateSanitizedId();
-            }
-
-            final Map<String, String> brokerOptions = new HashMap<String, String>(URISupport.parseParameters(location));
-            if (!brokerOptions.containsKey("persistent")) {
-                brokerOptions.put("persistent", "false");
-            }
-
-            final URI finalLocation = new URI("vm://" + broker);
-            final String finalBroker = broker;
-            final String finalGroup = group;
-            VMTransportFactory rc = new VMTransportFactory() {
-                public Transport doConnect(URI ignore) throws Exception {
-                    return super.doConnect(finalLocation);
-                };
-
-                public Transport doCompositeConnect(URI ignore) throws Exception {
-                    return super.doCompositeConnect(finalLocation);
-                };
-            };
-            rc.setBrokerFactoryHandler(new BrokerFactoryHandler() {
-                public BrokerService createBroker(URI brokerURI) throws Exception {
-                    BrokerService service = new BrokerService();
-                    IntrospectionSupport.setProperties(service, brokerOptions);
-                    service.setBrokerName(finalBroker);
-                    TransportConnector c = service.addConnector("tcp://0.0.0.0:0");
-                    c.setDiscoveryUri(new URI("multicast://default?group=" + finalGroup));
-                    service.addNetworkConnector("multicast://default?group=" + finalGroup);
-                    return service;
-                }
-            });
-            return rc;
-
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    public TransportServer doBind(URI location) throws IOException {
-        throw new IOException("This protocol does not support being bound.");
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/package.html
deleted file mode 100755
index 18c9bcb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Peer based Transport implementation which does not require central servers to connect to
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java
deleted file mode 100644
index 77c821f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class DefaultReplayBuffer implements ReplayBuffer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DefaultReplayBuffer.class);
-
-    private final int size;
-    private ReplayBufferListener listener;
-    private Map<Integer, Object> map;
-    private int lowestCommandId = 1;
-    private Object lock = new Object();
-
-    public DefaultReplayBuffer(int size) {
-        this.size = size;
-        map = createMap(size);
-    }
-
-    public void addBuffer(int commandId, Object buffer) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Adding command ID: " + commandId + " to replay buffer: " + this + " object: " + buffer);
-        }
-        synchronized (lock) {
-            int max = size - 1;
-            while (map.size() >= max) {
-                // lets find things to evict
-                Object evictedBuffer = map.remove(Integer.valueOf(++lowestCommandId));
-                onEvictedBuffer(lowestCommandId, evictedBuffer);
-            }
-            map.put(Integer.valueOf(commandId), buffer);
-        }
-    }
-
-    public void setReplayBufferListener(ReplayBufferListener bufferPoolAdapter) {
-        this.listener = bufferPoolAdapter;
-    }
-
-    public void replayMessages(int fromCommandId, int toCommandId, Replayer replayer) throws IOException {
-        if (replayer == null) {
-            throw new IllegalArgumentException("No Replayer parameter specified");
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Buffer: " + this + " replaying messages from: " + fromCommandId + " to: " + toCommandId);
-        }
-        for (int i = fromCommandId; i <= toCommandId; i++) {
-            Object buffer = null;
-            synchronized (lock) {
-                buffer = map.get(Integer.valueOf(i));
-            }
-            replayer.sendBuffer(i, buffer);
-        }
-    }
-
-    protected Map<Integer, Object> createMap(int maximumSize) {
-        return new HashMap<Integer, Object>(maximumSize);
-    }
-
-    protected void onEvictedBuffer(int commandId, Object buffer) {
-        if (listener != null) {
-            listener.onBufferDiscarded(commandId, buffer);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayStrategy.java
deleted file mode 100644
index 38ac8d4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayStrategy.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-
-/**
- * Throws an exception if packets are dropped causing the transport to be
- * closed.
- * 
- * 
- */
-public class DefaultReplayStrategy implements ReplayStrategy {
-
-    private int maximumDifference = 5;
-
-    public DefaultReplayStrategy() {
-    }
-
-    public DefaultReplayStrategy(int maximumDifference) {
-        this.maximumDifference = maximumDifference;
-    }
-
-    public boolean onDroppedPackets(ReliableTransport transport, int expectedCounter, int actualCounter, int nextAvailableCounter) throws IOException {
-        int difference = actualCounter - expectedCounter;
-        long count = Math.abs(difference);
-        if (count > maximumDifference) {
-            int upperLimit = actualCounter - 1;
-            if (upperLimit < expectedCounter) {
-                upperLimit = expectedCounter;
-            }
-            transport.requestReplay(expectedCounter, upperLimit);
-        }
-
-        // lets discard old commands
-        return difference > 0;
-    }
-
-    public void onReceivedPacket(ReliableTransport transport, long expectedCounter) {
-        // TODO we could pro-actively evict stuff from the buffer if we knew there was only one client
-    }
-
-    public int getMaximumDifference() {
-        return maximumDifference;
-    }
-
-    /**
-     * Sets the maximum allowed difference between an expected packet and an
-     * actual packet before an error occurs
-     */
-    public void setMaximumDifference(int maximumDifference) {
-        this.maximumDifference = maximumDifference;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ExceptionIfDroppedReplayStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ExceptionIfDroppedReplayStrategy.java
deleted file mode 100644
index 5d47daf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ExceptionIfDroppedReplayStrategy.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-
-/**
- * Throws an exception if packets are dropped causing the transport to be
- * closed.
- * 
- * 
- */
-public class ExceptionIfDroppedReplayStrategy implements ReplayStrategy {
-
-    private int maximumDifference = 5;
-
-    public ExceptionIfDroppedReplayStrategy() {
-    }
-
-    public ExceptionIfDroppedReplayStrategy(int maximumDifference) {
-        this.maximumDifference = maximumDifference;
-    }
-
-    public boolean onDroppedPackets(ReliableTransport transport, int expectedCounter, int actualCounter, int nextAvailableCounter) throws IOException {
-        int difference = actualCounter - expectedCounter;
-        long count = Math.abs(difference);
-        if (count > maximumDifference) {
-            throw new IOException("Packets dropped on: " + transport + " count: " + count + " expected: " + expectedCounter + " but was: " + actualCounter);
-        }
-
-        // lets discard old commands
-        return difference > 0;
-    }
-
-    public void onReceivedPacket(ReliableTransport transport, long expectedCounter) {
-    }
-
-    public int getMaximumDifference() {
-        return maximumDifference;
-    }
-
-    /**
-     * Sets the maximum allowed difference between an expected packet and an
-     * actual packet before an error occurs
-     */
-    public void setMaximumDifference(int maximumDifference) {
-        this.maximumDifference = maximumDifference;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java
deleted file mode 100644
index 615c290..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ReplayCommand;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.openwire.CommandIdComparator;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.udp.UdpTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This interceptor deals with out of order commands together with being able to
- * handle dropped commands and the re-requesting dropped commands.
- * 
- * 
- */
-public class ReliableTransport extends ResponseCorrelator {
-    private static final Logger LOG = LoggerFactory.getLogger(ReliableTransport.class);
-
-    private ReplayStrategy replayStrategy;
-    private SortedSet<Command> commands = new TreeSet<Command>(new CommandIdComparator());
-    private int expectedCounter = 1;
-    private int replayBufferCommandCount = 50;
-    private int requestTimeout = 2000;
-    private ReplayBuffer replayBuffer;
-    private Replayer replayer;
-    private UdpTransport udpTransport;
-
-    public ReliableTransport(Transport next, ReplayStrategy replayStrategy) {
-        super(next);
-        this.replayStrategy = replayStrategy;
-    }
-
-    public ReliableTransport(Transport next, UdpTransport udpTransport) throws IOException {
-        super(next, udpTransport.getSequenceGenerator());
-        this.udpTransport = udpTransport;
-        this.replayer = udpTransport.createReplayer();
-    }
-
-    /**
-     * Requests that a range of commands be replayed
-     */
-    public void requestReplay(int fromCommandId, int toCommandId) {
-        ReplayCommand replay = new ReplayCommand();
-        replay.setFirstNakNumber(fromCommandId);
-        replay.setLastNakNumber(toCommandId);
-        try {
-            oneway(replay);
-        } catch (IOException e) {
-            getTransportListener().onException(e);
-        }
-    }
-
-    public Object request(Object o) throws IOException {
-        final Command command = (Command)o;
-        FutureResponse response = asyncRequest(command, null);
-        while (true) {
-            Response result = response.getResult(requestTimeout);
-            if (result != null) {
-                return result;
-            }
-            onMissingResponse(command, response);
-        }
-    }
-
-    public Object request(Object o, int timeout) throws IOException {
-        final Command command = (Command)o;
-        FutureResponse response = asyncRequest(command, null);
-        while (timeout > 0) {
-            int time = timeout;
-            if (timeout > requestTimeout) {
-                time = requestTimeout;
-            }
-            Response result = response.getResult(time);
-            if (result != null) {
-                return result;
-            }
-            onMissingResponse(command, response);
-            timeout -= time;
-        }
-        return response.getResult(0);
-    }
-
-    public void onCommand(Object o) {
-        Command command = (Command)o;
-        // lets pass wireformat through
-        if (command.isWireFormatInfo()) {
-            super.onCommand(command);
-            return;
-        } else if (command.getDataStructureType() == ReplayCommand.DATA_STRUCTURE_TYPE) {
-            replayCommands((ReplayCommand)command);
-            return;
-        }
-
-        int actualCounter = command.getCommandId();
-        boolean valid = expectedCounter == actualCounter;
-
-        if (!valid) {
-            synchronized (commands) {
-                int nextCounter = actualCounter;
-                boolean empty = commands.isEmpty();
-                if (!empty) {
-                    Command nextAvailable = commands.first();
-                    nextCounter = nextAvailable.getCommandId();
-                }
-
-                try {
-                    boolean keep = replayStrategy.onDroppedPackets(this, expectedCounter, actualCounter, nextCounter);
-
-                    if (keep) {
-                        // lets add it to the list for later on
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Received out of order command which is being buffered for later: " + command);
-                        }
-                        commands.add(command);
-                    }
-                } catch (IOException e) {
-                    onException(e);
-                }
-
-                if (!empty) {
-                    // lets see if the first item in the set is the next
-                    // expected
-                    command = commands.first();
-                    valid = expectedCounter == command.getCommandId();
-                    if (valid) {
-                        commands.remove(command);
-                    }
-                }
-            }
-        }
-
-        while (valid) {
-            // we've got a valid header so increment counter
-            replayStrategy.onReceivedPacket(this, expectedCounter);
-            expectedCounter++;
-            super.onCommand(command);
-
-            synchronized (commands) {
-                // we could have more commands left
-                valid = !commands.isEmpty();
-                if (valid) {
-                    // lets see if the first item in the set is the next
-                    // expected
-                    command = commands.first();
-                    valid = expectedCounter == command.getCommandId();
-                    if (valid) {
-                        commands.remove(command);
-                    }
-                }
-            }
-        }
-    }
-
-    public int getBufferedCommandCount() {
-        synchronized (commands) {
-            return commands.size();
-        }
-    }
-
-    public int getExpectedCounter() {
-        return expectedCounter;
-    }
-
-    /**
-     * This property should never really be set - but is mutable primarily for
-     * test cases
-     */
-    public void setExpectedCounter(int expectedCounter) {
-        this.expectedCounter = expectedCounter;
-    }
-
-    public int getRequestTimeout() {
-        return requestTimeout;
-    }
-
-    /**
-     * Sets the default timeout of requests before starting to request commands
-     * are replayed
-     */
-    public void setRequestTimeout(int requestTimeout) {
-        this.requestTimeout = requestTimeout;
-    }
-
-    public ReplayStrategy getReplayStrategy() {
-        return replayStrategy;
-    }
-
-    public ReplayBuffer getReplayBuffer() {
-        if (replayBuffer == null) {
-            replayBuffer = createReplayBuffer();
-        }
-        return replayBuffer;
-    }
-
-    public void setReplayBuffer(ReplayBuffer replayBuffer) {
-        this.replayBuffer = replayBuffer;
-    }
-
-    public int getReplayBufferCommandCount() {
-        return replayBufferCommandCount;
-    }
-
-    /**
-     * Sets the default number of commands which are buffered
-     */
-    public void setReplayBufferCommandCount(int replayBufferSize) {
-        this.replayBufferCommandCount = replayBufferSize;
-    }
-
-    public void setReplayStrategy(ReplayStrategy replayStrategy) {
-        this.replayStrategy = replayStrategy;
-    }
-
-    public Replayer getReplayer() {
-        return replayer;
-    }
-
-    public void setReplayer(Replayer replayer) {
-        this.replayer = replayer;
-    }
-
-    public String toString() {
-        return next.toString();
-    }
-
-    public void start() throws Exception {
-        if (udpTransport != null) {
-            udpTransport.setReplayBuffer(getReplayBuffer());
-        }
-        if (replayStrategy == null) {
-            throw new IllegalArgumentException("Property replayStrategy not specified");
-        }
-        super.start();
-    }
-
-    /**
-     * Lets attempt to replay the request as a command may have disappeared
-     */
-    protected void onMissingResponse(Command command, FutureResponse response) {
-        LOG.debug("Still waiting for response on: " + this + " to command: " + command + " sending replay message");
-
-        int commandId = command.getCommandId();
-        requestReplay(commandId, commandId);
-    }
-
-    protected ReplayBuffer createReplayBuffer() {
-        return new DefaultReplayBuffer(getReplayBufferCommandCount());
-    }
-
-    protected void replayCommands(ReplayCommand command) {
-        try {
-            if (replayer == null) {
-                onException(new IOException("Cannot replay commands. No replayer property configured"));
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Processing replay command: " + command);
-            }
-            getReplayBuffer().replayMessages(command.getFirstNakNumber(), command.getLastNakNumber(), replayer);
-
-            // TODO we could proactively remove ack'd stuff from the replay
-            // buffer
-            // if we only have a single client talking to us
-        } catch (IOException e) {
-            onException(e);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayBuffer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayBuffer.java
deleted file mode 100644
index 592e45c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayBuffer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-
-/**
- * This class keeps around a buffer of old commands which have been sent on
- * an unreliable transport. The buffers are of type Object as they could be datagrams
- * or byte[] or ByteBuffer - depending on the underlying transport implementation.
- * 
- * 
- */
-public interface ReplayBuffer {
-
-    /**
-     * Submit a buffer for caching around for a period of time, during which time it can be replayed
-     * to users interested in it.
-     */
-    void addBuffer(int commandId, Object buffer);
-    
-    void setReplayBufferListener(ReplayBufferListener bufferPoolAdapter);
-    
-    void replayMessages(int fromCommandId, int toCommandId, Replayer replayer) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayBufferListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayBufferListener.java
deleted file mode 100644
index 58c57b4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayBufferListener.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.transport.reliable;
-
-/**
- * Listens to events on a {@link ReplayBuffer}
- * 
- * 
- */
-public interface ReplayBufferListener {
-
-    /**
-     * Indications that the buffer has been discarded and so could be
-     * re-introduced into some pool
-     */
-    void onBufferDiscarded(int commandId, Object buffer);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayStrategy.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayStrategy.java
deleted file mode 100644
index afe69f5..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReplayStrategy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.transport.reliable;
-
-
-import java.io.IOException;
-
-/**
- * A pluggable strategy for how to deal with dropped packets.
- * 
- * 
- */
-public interface ReplayStrategy {
-
-    /**
-     * Deals with a dropped packet. 
-     * 
-     * @param transport the transport on which the packet was dropped
-     * @param expectedCounter the expected command counter
-     * @param actualCounter the actual command counter
-     * @param nextAvailableCounter TODO
-     * @return true if the command should be buffered or false if it should be discarded
-     */
-    boolean onDroppedPackets(ReliableTransport transport, int expectedCounter, int actualCounter, int nextAvailableCounter) throws IOException;
-
-    void onReceivedPacket(ReliableTransport transport, long expectedCounter);
-
-}
-
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/Replayer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/Replayer.java
deleted file mode 100644
index 73e1304..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/Replayer.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-
-/**
- * Used by a {@link ReplayBuffer} to replay buffers back over an unreliable transport
- * 
- * 
- */
-public interface Replayer {
-
-    /**
-     * Sends the given buffer back to the transport
-     * if the buffer could be found - otherwise maybe send some kind
-     * of exception
-     * 
-     * @param commandId the command ID
-     * @param buffer the buffer to be sent - or null if the buffer no longer exists in the buffer
-     */
-    void sendBuffer(int commandId, Object buffer) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/package.html
deleted file mode 100755
index 23568d9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-The Reliable transport deals with out of order commands as well as dealing with checking for missed commands and possibly re-requesting the replay of dropped commands.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/FrameTranslator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/FrameTranslator.java
deleted file mode 100644
index 77ea06a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/FrameTranslator.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.Message;
-
-/**
- * Implementations of this interface are used to map back and forth from Stomp
- * to ActiveMQ. There are several standard mappings which are semantically the
- * same, the inner class, Helper, provides functions to copy those properties
- * from one to the other
- */
-public interface FrameTranslator {
-    ActiveMQMessage convertFrame(ProtocolConverter converter, StompFrame frame) throws JMSException, ProtocolException;
-
-    StompFrame convertMessage(ProtocolConverter converter, ActiveMQMessage message) throws IOException, JMSException;
-
-    String convertDestination(ProtocolConverter converter, Destination d);
-
-    ActiveMQDestination convertDestination(ProtocolConverter converter, String name) throws ProtocolException;
-
-    /**
-     * Helper class which holds commonly needed functions used when implementing
-     * FrameTranslators
-     */
-    static final class Helper {
-
-        private Helper() {
-        }
-
-        public static void copyStandardHeadersFromMessageToFrame(ProtocolConverter converter, ActiveMQMessage message, StompFrame command, FrameTranslator ft) throws IOException {
-            final Map<String, String> headers = command.getHeaders();
-            headers.put(Stomp.Headers.Message.DESTINATION, ft.convertDestination(converter, message.getDestination()));
-            headers.put(Stomp.Headers.Message.MESSAGE_ID, message.getJMSMessageID());
-
-            if (message.getJMSCorrelationID() != null) {
-                headers.put(Stomp.Headers.Message.CORRELATION_ID, message.getJMSCorrelationID());
-            }
-            headers.put(Stomp.Headers.Message.EXPIRATION_TIME, "" + message.getJMSExpiration());
-
-            if (message.getJMSRedelivered()) {
-                headers.put(Stomp.Headers.Message.REDELIVERED, "true");
-            }
-            headers.put(Stomp.Headers.Message.PRORITY, "" + message.getJMSPriority());
-
-            if (message.getJMSReplyTo() != null) {
-                headers.put(Stomp.Headers.Message.REPLY_TO, ft.convertDestination(converter, message.getJMSReplyTo()));
-            }
-            headers.put(Stomp.Headers.Message.TIMESTAMP, "" + message.getJMSTimestamp());
-
-            if (message.getJMSType() != null) {
-                headers.put(Stomp.Headers.Message.TYPE, message.getJMSType());
-            }
-
-            if (message.getUserID() != null) {
-                headers.put(Stomp.Headers.Message.USERID, message.getUserID());
-            }
-
-            if (message.getOriginalDestination() != null) {
-                headers.put(Stomp.Headers.Message.ORIGINAL_DESTINATION, ft.convertDestination(converter, message.getOriginalDestination()));
-            }
-
-            // now lets add all the message headers
-            final Map<String, Object> properties = message.getProperties();
-            if (properties != null) {
-                for (Map.Entry<String, Object> prop : properties.entrySet()) {
-                    headers.put(prop.getKey(), "" + prop.getValue());
-                }
-            }
-        }
-
-        public static void copyStandardHeadersFromFrameToMessage(ProtocolConverter converter, StompFrame command, ActiveMQMessage msg, FrameTranslator ft) throws ProtocolException, JMSException {
-            final Map<String, String> headers = new HashMap<String, String>(command.getHeaders());
-            final String destination = headers.remove(Stomp.Headers.Send.DESTINATION);
-            msg.setDestination(ft.convertDestination(converter, destination));
-
-            // the standard JMS headers
-            msg.setJMSCorrelationID(headers.remove(Stomp.Headers.Send.CORRELATION_ID));
-
-            Object o = headers.remove(Stomp.Headers.Send.EXPIRATION_TIME);
-            if (o != null) {
-                msg.setJMSExpiration(Long.parseLong((String)o));
-            }
-
-            o = headers.remove(Stomp.Headers.Send.PRIORITY);
-            if (o != null) {
-                msg.setJMSPriority(Integer.parseInt((String)o));
-            } else {
-                msg.setJMSPriority(javax.jms.Message.DEFAULT_PRIORITY);
-            }
-
-            o = headers.remove(Stomp.Headers.Send.TYPE);
-            if (o != null) {
-                msg.setJMSType((String)o);
-            }
-
-            o = headers.remove(Stomp.Headers.Send.REPLY_TO);
-            if (o != null) {
-                msg.setJMSReplyTo(ft.convertDestination(converter, (String)o));
-            }
-
-            o = headers.remove(Stomp.Headers.Send.PERSISTENT);
-            if (o != null) {
-                msg.setPersistent("true".equals(o));
-            }
-
-            // Stomp specific headers
-            headers.remove(Stomp.Headers.RECEIPT_REQUESTED);
-
-            // Since we take the rest of the header and put them in properties which could then
-            // be sent back to a STOMP consumer we need to sanitize anything which could be in
-            // Stomp.Headers.Message and might get passed through to the consumer
-            headers.remove(Stomp.Headers.Message.MESSAGE_ID);
-            headers.remove(Stomp.Headers.Message.TIMESTAMP);
-            headers.remove(Stomp.Headers.Message.REDELIVERED);
-            headers.remove(Stomp.Headers.Message.SUBSCRIPTION);
-            headers.remove(Stomp.Headers.Message.USERID);
-
-            // now the general headers
-            msg.setProperties(headers);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java
deleted file mode 100644
index 12eaf27..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.BrokerContext;
-import org.apache.activemq.broker.BrokerContextAware;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.util.JettisonMappedXmlDriver;
-import org.codehaus.jettison.mapped.Configuration;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
-import com.thoughtworks.xstream.io.xml.XppReader;
-
-/**
- * Frame translator implementation that uses XStream to convert messages to and
- * from XML and JSON
- *
- * @author <a href="mailto:dejan@nighttale.net">Dejan Bosanac</a>
- */
-public class JmsFrameTranslator extends LegacyFrameTranslator implements
-		BrokerContextAware {
-
-	XStream xStream = null;
-	BrokerContext brokerContext;
-
-	public ActiveMQMessage convertFrame(ProtocolConverter converter,
-			StompFrame command) throws JMSException, ProtocolException {
-		Map headers = command.getHeaders();
-		ActiveMQMessage msg;
-		String transformation = (String) headers.get(Stomp.Headers.TRANSFORMATION);
-		if (headers.containsKey(Stomp.Headers.CONTENT_LENGTH) || transformation.equals(Stomp.Transformations.JMS_BYTE.toString())) {
-			msg = super.convertFrame(converter, command);
-		} else {
-			HierarchicalStreamReader in;
-
-			try {
-				String text = new String(command.getContent(), "UTF-8");
-				switch (Stomp.Transformations.getValue(transformation)) {
-				case JMS_OBJECT_XML:
-					in = new XppReader(new StringReader(text));
-					msg = createObjectMessage(in);
-					break;
-				case JMS_OBJECT_JSON:
-					in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
-					msg = createObjectMessage(in);
-					break;
-				case JMS_MAP_XML:
-					in = new XppReader(new StringReader(text));
-					msg = createMapMessage(in);
-					break;
-				case JMS_MAP_JSON:
-					in = new JettisonMappedXmlDriver().createReader(new StringReader(text));
-					msg = createMapMessage(in);
-					break;
-				default:
-					throw new Exception("Unkown transformation: " + transformation);
-				}
-			} catch (Throwable e) {
-				command.getHeaders().put(Stomp.Headers.TRANSFORMATION_ERROR, e.getMessage());
-				msg = super.convertFrame(converter, command);
-			}
-		}
-		FrameTranslator.Helper.copyStandardHeadersFromFrameToMessage(converter, command, msg, this);
-		return msg;
-	}
-
-	public StompFrame convertMessage(ProtocolConverter converter,
-			ActiveMQMessage message) throws IOException, JMSException {
-		if (message.getDataStructureType() == ActiveMQObjectMessage.DATA_STRUCTURE_TYPE) {
-			StompFrame command = new StompFrame();
-			command.setAction(Stomp.Responses.MESSAGE);
-			Map<String, String> headers = new HashMap<String, String>(25);
-			command.setHeaders(headers);
-
-			FrameTranslator.Helper.copyStandardHeadersFromMessageToFrame(
-					converter, message, command, this);
-
-            if (headers.get(Stomp.Headers.TRANSFORMATION).equals(Stomp.Transformations.JMS_XML.toString())) {
-            	headers.put(Stomp.Headers.TRANSFORMATION, Stomp.Transformations.JMS_OBJECT_XML.toString());
-            } else if (headers.get(Stomp.Headers.TRANSFORMATION).equals(Stomp.Transformations.JMS_JSON.toString())) {
-            	headers.put(Stomp.Headers.TRANSFORMATION, Stomp.Transformations.JMS_OBJECT_JSON.toString());
-            }
-
-            ActiveMQObjectMessage msg = (ActiveMQObjectMessage) message.copy();
-			command.setContent(marshall(msg.getObject(),
-					headers.get(Stomp.Headers.TRANSFORMATION))
-					.getBytes("UTF-8"));
-			return command;
-
-		} else if (message.getDataStructureType() == ActiveMQMapMessage.DATA_STRUCTURE_TYPE) {
-			StompFrame command = new StompFrame();
-			command.setAction(Stomp.Responses.MESSAGE);
-			Map<String, String> headers = new HashMap<String, String>(25);
-			command.setHeaders(headers);
-
-			FrameTranslator.Helper.copyStandardHeadersFromMessageToFrame(
-					converter, message, command, this);
-
-            if (headers.get(Stomp.Headers.TRANSFORMATION).equals(Stomp.Transformations.JMS_XML.toString())) {
-            	headers.put(Stomp.Headers.TRANSFORMATION, Stomp.Transformations.JMS_MAP_XML.toString());
-            } else if (headers.get(Stomp.Headers.TRANSFORMATION).equals(Stomp.Transformations.JMS_JSON.toString())) {
-            	headers.put(Stomp.Headers.TRANSFORMATION, Stomp.Transformations.JMS_MAP_JSON.toString());
-            }
-
-			ActiveMQMapMessage msg = (ActiveMQMapMessage) message.copy();
-			command.setContent(marshall((Serializable)msg.getContentMap(),
-					headers.get(Stomp.Headers.TRANSFORMATION))
-					.getBytes("UTF-8"));
-			return command;
-        } else if (message.getDataStructureType() == ActiveMQMessage.DATA_STRUCTURE_TYPE &&
-                AdvisorySupport.ADIVSORY_MESSAGE_TYPE.equals(message.getType())) {
-
-			StompFrame command = new StompFrame();
-			command.setAction(Stomp.Responses.MESSAGE);
-			Map<String, String> headers = new HashMap<String, String>(25);
-			command.setHeaders(headers);
-
-            FrameTranslator.Helper.copyStandardHeadersFromMessageToFrame(
-					converter, message, command, this);
-
-            if (headers.get(Stomp.Headers.TRANSFORMATION).equals(Stomp.Transformations.JMS_XML.toString())) {
-            	headers.put(Stomp.Headers.TRANSFORMATION, Stomp.Transformations.JMS_ADVISORY_XML.toString());
-            } else if (headers.get(Stomp.Headers.TRANSFORMATION).equals(Stomp.Transformations.JMS_JSON.toString())) {
-            	headers.put(Stomp.Headers.TRANSFORMATION, Stomp.Transformations.JMS_ADVISORY_JSON.toString());
-            }
-
-            String body = marshallAdvisory(message.getDataStructure(),
-            		headers.get(Stomp.Headers.TRANSFORMATION));
-            command.setContent(body.getBytes("UTF-8"));
-            return command;
-		} else {
-			return super.convertMessage(converter, message);
-		}
-	}
-
-	/**
-	 * Marshalls the Object to a string using XML or JSON encoding
-	 */
-	protected String marshall(Serializable object, String transformation)
-			throws JMSException {
-		StringWriter buffer = new StringWriter();
-		HierarchicalStreamWriter out;
-		if (transformation.toLowerCase().endsWith("json")) {
-			out = new JettisonMappedXmlDriver(new Configuration(), false).createWriter(buffer);
-		} else {
-			out = new PrettyPrintWriter(buffer);
-		}
-		getXStream().marshal(object, out);
-		return buffer.toString();
-	}
-
-	protected ActiveMQObjectMessage createObjectMessage(HierarchicalStreamReader in) throws JMSException {
-		ActiveMQObjectMessage objMsg = new ActiveMQObjectMessage();
-		Object obj = getXStream().unmarshal(in);
-		objMsg.setObject((Serializable) obj);
-		return objMsg;
-	}
-
-	protected ActiveMQMapMessage createMapMessage(HierarchicalStreamReader in) throws JMSException {
-		ActiveMQMapMessage mapMsg = new ActiveMQMapMessage();
-		Map<String, Object> map = (Map<String, Object>)getXStream().unmarshal(in);
-		for (String key : map.keySet()) {
-			mapMsg.setObject(key, map.get(key));
-		}
-		return mapMsg;
-	}
-
-    protected String marshallAdvisory(final DataStructure ds, String transformation) {
-
-		StringWriter buffer = new StringWriter();
-		HierarchicalStreamWriter out;
-		if (transformation.toLowerCase().endsWith("json")) {
-			out = new JettisonMappedXmlDriver().createWriter(buffer);
-		} else {
-			out = new PrettyPrintWriter(buffer);
-		}
-
-		XStream xstream = getXStream();
-        xstream.setMode(XStream.NO_REFERENCES);
-        xstream.aliasPackage("", "org.apache.activemq.command");
-		xstream.marshal(ds, out);
-		return buffer.toString();
-    }
-
-	// Properties
-	// -------------------------------------------------------------------------
-	public XStream getXStream() {
-		if (xStream == null) {
-			xStream = createXStream();
-		}
-		return xStream;
-	}
-
-	public void setXStream(XStream xStream) {
-		this.xStream = xStream;
-	}
-
-	// Implementation methods
-	// -------------------------------------------------------------------------
-	protected XStream createXStream() {
-		XStream xstream = null;
-		if (brokerContext != null) {
-			Map<String, XStream> beans = brokerContext.getBeansOfType(XStream.class);
-			for (XStream bean : beans.values()) {
-			    if (bean != null) {
-			        xstream = bean;
-			        break;
-			    }
-			}
-		}
-
-		if (xstream == null) {
-			xstream = new XStream();
-		}
-		return xstream;
-
-	}
-
-	public void setBrokerContext(BrokerContext brokerContext) {
-		this.brokerContext = brokerContext;
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/LegacyFrameTranslator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/LegacyFrameTranslator.java
deleted file mode 100644
index 826b588..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/LegacyFrameTranslator.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.command.*;
-
-/**
- * Implements ActiveMQ 4.0 translations
- */
-public class LegacyFrameTranslator implements FrameTranslator {
-
-
-    public ActiveMQMessage convertFrame(ProtocolConverter converter, StompFrame command) throws JMSException, ProtocolException {
-        final Map headers = command.getHeaders();
-        final ActiveMQMessage msg;
-        /*
-         * To reduce the complexity of this method perhaps a Chain of Responsibility
-         * would be a better implementation
-         */
-        if (headers.containsKey(Stomp.Headers.AMQ_MESSAGE_TYPE)) {
-            String intendedType = (String)headers.get(Stomp.Headers.AMQ_MESSAGE_TYPE);
-            if(intendedType.equalsIgnoreCase("text")){
-                ActiveMQTextMessage text = new ActiveMQTextMessage();
-                try {
-                    text.setText(new String(command.getContent(), "UTF-8"));
-                } catch (Throwable e) {
-                    throw new ProtocolException("Text could not bet set: " + e, false, e);
-                }
-                msg = text;
-            } else if(intendedType.equalsIgnoreCase("bytes")) {
-                ActiveMQBytesMessage byteMessage = new ActiveMQBytesMessage();
-                byteMessage.writeBytes(command.getContent());
-                msg = byteMessage;
-            } else {
-                throw new ProtocolException("Unsupported message type '"+intendedType+"'",false);
-            }
-        }else if (headers.containsKey(Stomp.Headers.CONTENT_LENGTH)) {
-            headers.remove(Stomp.Headers.CONTENT_LENGTH);
-            ActiveMQBytesMessage bm = new ActiveMQBytesMessage();
-            bm.writeBytes(command.getContent());
-            msg = bm;
-        } else {
-            ActiveMQTextMessage text = new ActiveMQTextMessage();
-            try {
-                text.setText(new String(command.getContent(), "UTF-8"));
-            } catch (Throwable e) {
-                throw new ProtocolException("Text could not bet set: " + e, false, e);
-            }
-            msg = text;
-        }
-        FrameTranslator.Helper.copyStandardHeadersFromFrameToMessage(converter, command, msg, this);
-        return msg;
-    }
-
-    public StompFrame convertMessage(ProtocolConverter converter, ActiveMQMessage message) throws IOException, JMSException {
-        StompFrame command = new StompFrame();
-        command.setAction(Stomp.Responses.MESSAGE);
-        Map<String, String> headers = new HashMap<String, String>(25);
-        command.setHeaders(headers);
-
-        FrameTranslator.Helper.copyStandardHeadersFromMessageToFrame(converter, message, command, this);
-
-        if (message.getDataStructureType() == ActiveMQTextMessage.DATA_STRUCTURE_TYPE) {
-
-            ActiveMQTextMessage msg = (ActiveMQTextMessage)message.copy();
-            command.setContent(msg.getText().getBytes("UTF-8"));
-
-        } else if (message.getDataStructureType() == ActiveMQBytesMessage.DATA_STRUCTURE_TYPE) {
-
-            ActiveMQBytesMessage msg = (ActiveMQBytesMessage)message.copy();
-            msg.setReadOnlyBody(true);
-            byte[] data = new byte[(int)msg.getBodyLength()];
-            msg.readBytes(data);
-
-            headers.put(Stomp.Headers.CONTENT_LENGTH, "" + data.length);
-            command.setContent(data);
-        } else if (message.getDataStructureType() == ActiveMQMessage.DATA_STRUCTURE_TYPE &&
-                AdvisorySupport.ADIVSORY_MESSAGE_TYPE.equals(message.getType())) {
-
-            FrameTranslator.Helper.copyStandardHeadersFromMessageToFrame(
-					converter, message, command, this);
-
-            String body = marshallAdvisory(message.getDataStructure());
-            command.setContent(body.getBytes("UTF-8"));
-        }
-        return command;
-    }
-
-    public String convertDestination(ProtocolConverter converter, Destination d) {
-        if (d == null) {
-            return null;
-        }
-        ActiveMQDestination activeMQDestination = (ActiveMQDestination)d;
-        String physicalName = activeMQDestination.getPhysicalName();
-
-        String rc = converter.getCreatedTempDestinationName(activeMQDestination);
-        if( rc!=null ) {
-        	return rc;
-        }
-
-        StringBuffer buffer = new StringBuffer();
-        if (activeMQDestination.isQueue()) {
-            if (activeMQDestination.isTemporary()) {
-                buffer.append("/remote-temp-queue/");
-            } else {
-                buffer.append("/queue/");
-            }
-        } else {
-            if (activeMQDestination.isTemporary()) {
-                buffer.append("/remote-temp-topic/");
-            } else {
-                buffer.append("/topic/");
-            }
-        }
-        buffer.append(physicalName);
-        return buffer.toString();
-    }
-
-    public ActiveMQDestination convertDestination(ProtocolConverter converter, String name) throws ProtocolException {
-        if (name == null) {
-            return null;
-        } else if (name.startsWith("/queue/")) {
-            String qName = name.substring("/queue/".length(), name.length());
-            return ActiveMQDestination.createDestination(qName, ActiveMQDestination.QUEUE_TYPE);
-        } else if (name.startsWith("/topic/")) {
-            String tName = name.substring("/topic/".length(), name.length());
-            return ActiveMQDestination.createDestination(tName, ActiveMQDestination.TOPIC_TYPE);
-        } else if (name.startsWith("/remote-temp-queue/")) {
-            String tName = name.substring("/remote-temp-queue/".length(), name.length());
-            return ActiveMQDestination.createDestination(tName, ActiveMQDestination.TEMP_QUEUE_TYPE);
-        } else if (name.startsWith("/remote-temp-topic/")) {
-            String tName = name.substring("/remote-temp-topic/".length(), name.length());
-            return ActiveMQDestination.createDestination(tName, ActiveMQDestination.TEMP_TOPIC_TYPE);
-        } else if (name.startsWith("/temp-queue/")) {
-            return converter.createTempQueue(name);
-        } else if (name.startsWith("/temp-topic/")) {
-            return converter.createTempTopic(name);
-        } else {
-            throw new ProtocolException("Illegal destination name: [" + name + "] -- ActiveMQ STOMP destinations "
-                                        + "must begin with one of: /queue/ /topic/ /temp-queue/ /temp-topic/");
-        }
-    }
-
-    /**
-     * Return an Advisory message as a JSON formatted string
-     * @param ds
-     * @return
-     */
-    protected String marshallAdvisory(final DataStructure ds) {
-        XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
-        xstream.setMode(XStream.NO_REFERENCES);
-        xstream.aliasPackage("", "org.apache.activemq.command");
-        return xstream.toXML(ds);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
deleted file mode 100644
index 4af6211..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
+++ /dev/null
@@ -1,646 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.BrokerContext;
-import org.apache.activemq.broker.BrokerContextAware;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionError;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.FactoryFinder;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationContextAware;
-
-/**
- * @author <a href="http://hiramchirino.com">chirino</a>
- */
-public class ProtocolConverter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ProtocolConverter.class);
-    
-    private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
-
-    private final ConnectionId connectionId = new ConnectionId(CONNECTION_ID_GENERATOR.generateId());
-    private final SessionId sessionId = new SessionId(connectionId, -1);
-    private final ProducerId producerId = new ProducerId(sessionId, 1);
-
-    private final LongSequenceGenerator consumerIdGenerator = new LongSequenceGenerator();
-    private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator();
-    private final LongSequenceGenerator transactionIdGenerator = new LongSequenceGenerator();
-    private final LongSequenceGenerator tempDestinationGenerator = new LongSequenceGenerator();
-
-    private final ConcurrentHashMap<Integer, ResponseHandler> resposeHandlers = new ConcurrentHashMap<Integer, ResponseHandler>();
-    private final ConcurrentHashMap<ConsumerId, StompSubscription> subscriptionsByConsumerId = new ConcurrentHashMap<ConsumerId, StompSubscription>();
-    private final ConcurrentHashMap<String, ActiveMQDestination> tempDestinations = new ConcurrentHashMap<String, ActiveMQDestination>();
-    private final ConcurrentHashMap<String, String> tempDestinationAmqToStompMap = new ConcurrentHashMap<String, String>();
-    private final Map<String, LocalTransactionId> transactions = new ConcurrentHashMap<String, LocalTransactionId>();
-    private final StompTransport stompTransport;
-
-    private final Object commnadIdMutex = new Object();
-    private int lastCommandId;
-    private final AtomicBoolean connected = new AtomicBoolean(false);
-    private final FrameTranslator frameTranslator;
-    private final FactoryFinder FRAME_TRANSLATOR_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/transport/frametranslator/");
-    private final BrokerContext brokerContext;
-
-    public ProtocolConverter(StompTransport stompTransport, FrameTranslator translator, BrokerContext brokerContext) {
-        this.stompTransport = stompTransport;
-        this.frameTranslator = translator;
-        this.brokerContext = brokerContext;
-    }
-
-    protected int generateCommandId() {
-        synchronized (commnadIdMutex) {
-            return lastCommandId++;
-        }
-    }
-
-    protected ResponseHandler createResponseHandler(final StompFrame command) {
-        final String receiptId = command.getHeaders().get(Stomp.Headers.RECEIPT_REQUESTED);
-        if (receiptId != null) {
-            return new ResponseHandler() {
-                public void onResponse(ProtocolConverter converter, Response response) throws IOException {
-                    if (response.isException()) {
-                        // Generally a command can fail.. but that does not invalidate the connection.
-                        // We report back the failure but we don't close the connection.
-                        Throwable exception = ((ExceptionResponse)response).getException();
-                        handleException(exception, command);
-                    } else {
-                        StompFrame sc = new StompFrame();
-                        sc.setAction(Stomp.Responses.RECEIPT);
-                        sc.setHeaders(new HashMap<String, String>(1));
-                        sc.getHeaders().put(Stomp.Headers.Response.RECEIPT_ID, receiptId);
-                        stompTransport.sendToStomp(sc);
-                    }
-                }
-            };
-        }
-        return null;
-    }
-
-    protected void sendToActiveMQ(Command command, ResponseHandler handler) {
-        command.setCommandId(generateCommandId());
-        if (handler != null) {
-            command.setResponseRequired(true);
-            resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler);
-        }
-        stompTransport.sendToActiveMQ(command);
-    }
-
-    protected void sendToStomp(StompFrame command) throws IOException {
-        stompTransport.sendToStomp(command);
-    }
-
-    protected FrameTranslator findTranslator(String header) {
-        FrameTranslator translator = frameTranslator;
-        try {
-            if (header != null) {
-                translator = (FrameTranslator) FRAME_TRANSLATOR_FINDER
-                        .newInstance(header);
-                if (translator instanceof BrokerContextAware) {
-                    ((BrokerContextAware)translator).setBrokerContext(brokerContext);
-                }
-            }
-        } catch (Exception ignore) {
-            // if anything goes wrong use the default translator
-        }
-
-        return translator;
-    }
-
-    /**
-     * Convert a stomp command
-     *
-     * @param command
-     */
-    public void onStompCommand(StompFrame command) throws IOException, JMSException {
-        try {
-
-            if (command.getClass() == StompFrameError.class) {
-                throw ((StompFrameError)command).getException();
-            }
-
-            String action = command.getAction();
-            if (action.startsWith(Stomp.Commands.SEND)) {
-                onStompSend(command);
-            } else if (action.startsWith(Stomp.Commands.ACK)) {
-                onStompAck(command);
-            } else if (action.startsWith(Stomp.Commands.BEGIN)) {
-                onStompBegin(command);
-            } else if (action.startsWith(Stomp.Commands.COMMIT)) {
-                onStompCommit(command);
-            } else if (action.startsWith(Stomp.Commands.ABORT)) {
-                onStompAbort(command);
-            } else if (action.startsWith(Stomp.Commands.SUBSCRIBE)) {
-                onStompSubscribe(command);
-            } else if (action.startsWith(Stomp.Commands.UNSUBSCRIBE)) {
-                onStompUnsubscribe(command);
-            } else if (action.startsWith(Stomp.Commands.CONNECT)) {
-                onStompConnect(command);
-            } else if (action.startsWith(Stomp.Commands.DISCONNECT)) {
-                onStompDisconnect(command);
-            } else {
-                throw new ProtocolException("Unknown STOMP action: " + action);
-            }
-
-        } catch (ProtocolException e) {
-            handleException(e, command);
-            // Some protocol errors can cause the connection to get closed.
-            if( e.isFatal() ) {
-               getStompTransport().onException(e);
-            }
-        }
-    }
-
-    protected void handleException(Throwable exception, StompFrame command) throws IOException {
-        LOG.warn("Exception occurred processing: \n" + command + ": " + exception.toString());
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Exception detail", exception);
-        }
-
-        // Let the stomp client know about any protocol errors.
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        PrintWriter stream = new PrintWriter(new OutputStreamWriter(baos, "UTF-8"));
-        exception.printStackTrace(stream);
-        stream.close();
-
-        HashMap<String, String> headers = new HashMap<String, String>();
-        headers.put(Stomp.Headers.Error.MESSAGE, exception.getMessage());
-
-        if (command != null) {
-            final String receiptId = command.getHeaders().get(Stomp.Headers.RECEIPT_REQUESTED);
-            if (receiptId != null) {
-                headers.put(Stomp.Headers.Response.RECEIPT_ID, receiptId);
-            }
-        }
-
-        StompFrame errorMessage = new StompFrame(Stomp.Responses.ERROR, headers, baos.toByteArray());
-        sendToStomp(errorMessage);
-    }
-
-    protected void onStompSend(StompFrame command) throws IOException, JMSException {
-        checkConnected();
-
-        Map<String, String> headers = command.getHeaders();
-        String stompTx = headers.get(Stomp.Headers.TRANSACTION);
-        headers.remove("transaction");
-
-        ActiveMQMessage message = convertMessage(command);
-
-        message.setProducerId(producerId);
-        MessageId id = new MessageId(producerId, messageIdGenerator.getNextSequenceId());
-        message.setMessageId(id);
-        message.setJMSTimestamp(System.currentTimeMillis());
-
-        if (stompTx != null) {
-            TransactionId activemqTx = transactions.get(stompTx);
-            if (activemqTx == null) {
-                throw new ProtocolException("Invalid transaction id: " + stompTx);
-            }
-            message.setTransactionId(activemqTx);
-        }
-
-        message.onSend();
-        sendToActiveMQ(message, createResponseHandler(command));
-
-    }
-
-    protected void onStompAck(StompFrame command) throws ProtocolException {
-        checkConnected();
-
-        // TODO: acking with just a message id is very bogus
-        // since the same message id could have been sent to 2 different
-        // subscriptions
-        // on the same stomp connection. For example, when 2 subs are created on
-        // the same topic.
-
-        Map<String, String> headers = command.getHeaders();
-        String messageId = headers.get(Stomp.Headers.Ack.MESSAGE_ID);
-        if (messageId == null) {
-            throw new ProtocolException("ACK received without a message-id to acknowledge!");
-        }
-
-        TransactionId activemqTx = null;
-        String stompTx = headers.get(Stomp.Headers.TRANSACTION);
-        if (stompTx != null) {
-            activemqTx = transactions.get(stompTx);
-            if (activemqTx == null) {
-                throw new ProtocolException("Invalid transaction id: " + stompTx);
-            }
-        }
-
-        boolean acked = false;
-        for (Iterator<StompSubscription> iter = subscriptionsByConsumerId.values().iterator(); iter.hasNext();) {
-            StompSubscription sub = iter.next();
-            MessageAck ack = sub.onStompMessageAck(messageId, activemqTx);
-            if (ack != null) {
-                ack.setTransactionId(activemqTx);
-                sendToActiveMQ(ack, createResponseHandler(command));
-                acked = true;
-                break;
-            }
-        }
-
-        if (!acked) {
-            throw new ProtocolException("Unexpected ACK received for message-id [" + messageId + "]");
-        }
-
-    }
-
-    protected void onStompBegin(StompFrame command) throws ProtocolException {
-        checkConnected();
-
-        Map<String, String> headers = command.getHeaders();
-
-        String stompTx = headers.get(Stomp.Headers.TRANSACTION);
-
-        if (!headers.containsKey(Stomp.Headers.TRANSACTION)) {
-            throw new ProtocolException("Must specify the transaction you are beginning");
-        }
-
-        if (transactions.get(stompTx) != null) {
-            throw new ProtocolException("The transaction was allready started: " + stompTx);
-        }
-
-        LocalTransactionId activemqTx = new LocalTransactionId(connectionId, transactionIdGenerator.getNextSequenceId());
-        transactions.put(stompTx, activemqTx);
-
-        TransactionInfo tx = new TransactionInfo();
-        tx.setConnectionId(connectionId);
-        tx.setTransactionId(activemqTx);
-        tx.setType(TransactionInfo.BEGIN);
-
-        sendToActiveMQ(tx, createResponseHandler(command));
-
-    }
-
-    protected void onStompCommit(StompFrame command) throws ProtocolException {
-        checkConnected();
-
-        Map<String, String> headers = command.getHeaders();
-
-        String stompTx = headers.get(Stomp.Headers.TRANSACTION);
-        if (stompTx == null) {
-            throw new ProtocolException("Must specify the transaction you are committing");
-        }
-
-        TransactionId activemqTx = transactions.remove(stompTx);
-        if (activemqTx == null) {
-            throw new ProtocolException("Invalid transaction id: " + stompTx);
-        }
-
-        for (Iterator<StompSubscription> iter = subscriptionsByConsumerId.values().iterator(); iter.hasNext();) {
-            StompSubscription sub = iter.next();
-            sub.onStompCommit(activemqTx);
-        }
-
-        TransactionInfo tx = new TransactionInfo();
-        tx.setConnectionId(connectionId);
-        tx.setTransactionId(activemqTx);
-        tx.setType(TransactionInfo.COMMIT_ONE_PHASE);
-
-        sendToActiveMQ(tx, createResponseHandler(command));
-
-    }
-
-    protected void onStompAbort(StompFrame command) throws ProtocolException {
-        checkConnected();
-        Map<String, String> headers = command.getHeaders();
-
-        String stompTx = headers.get(Stomp.Headers.TRANSACTION);
-        if (stompTx == null) {
-            throw new ProtocolException("Must specify the transaction you are committing");
-        }
-
-        TransactionId activemqTx = transactions.remove(stompTx);
-        if (activemqTx == null) {
-            throw new ProtocolException("Invalid transaction id: " + stompTx);
-        }
-        for (Iterator<StompSubscription> iter = subscriptionsByConsumerId.values().iterator(); iter.hasNext();) {
-            StompSubscription sub = iter.next();
-            try {
-                sub.onStompAbort(activemqTx);
-            } catch (Exception e) {
-                throw new ProtocolException("Transaction abort failed", false, e);
-            }
-        }
-
-        TransactionInfo tx = new TransactionInfo();
-        tx.setConnectionId(connectionId);
-        tx.setTransactionId(activemqTx);
-        tx.setType(TransactionInfo.ROLLBACK);
-
-        sendToActiveMQ(tx, createResponseHandler(command));
-
-    }
-
-    protected void onStompSubscribe(StompFrame command) throws ProtocolException {
-        checkConnected();
-        FrameTranslator translator = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION));
-        Map<String, String> headers = command.getHeaders();
-
-        String subscriptionId = headers.get(Stomp.Headers.Subscribe.ID);
-        String destination = headers.get(Stomp.Headers.Subscribe.DESTINATION);
-
-        ActiveMQDestination actualDest = translator.convertDestination(this, destination);
-
-        if (actualDest == null) {
-            throw new ProtocolException("Invalid Destination.");
-        }
-
-        ConsumerId id = new ConsumerId(sessionId, consumerIdGenerator.getNextSequenceId());
-        ConsumerInfo consumerInfo = new ConsumerInfo(id);
-        consumerInfo.setPrefetchSize(1000);
-        consumerInfo.setDispatchAsync(true);
-
-        String selector = headers.remove(Stomp.Headers.Subscribe.SELECTOR);
-        consumerInfo.setSelector(selector);
-
-        IntrospectionSupport.setProperties(consumerInfo, headers, "activemq.");
-
-        consumerInfo.setDestination(translator.convertDestination(this, destination));
-
-        StompSubscription stompSubscription = new StompSubscription(this, subscriptionId, consumerInfo, headers.get(Stomp.Headers.TRANSFORMATION));
-        stompSubscription.setDestination(actualDest);
-
-        String ackMode = headers.get(Stomp.Headers.Subscribe.ACK_MODE);
-        if (Stomp.Headers.Subscribe.AckModeValues.CLIENT.equals(ackMode)) {
-            stompSubscription.setAckMode(StompSubscription.CLIENT_ACK);
-        } else if (Stomp.Headers.Subscribe.AckModeValues.INDIVIDUAL.equals(ackMode)) {
-            stompSubscription.setAckMode(StompSubscription.INDIVIDUAL_ACK);
-        } else {
-            stompSubscription.setAckMode(StompSubscription.AUTO_ACK);
-        }
-
-        subscriptionsByConsumerId.put(id, stompSubscription);
-        sendToActiveMQ(consumerInfo, createResponseHandler(command));
-
-    }
-
-    protected void onStompUnsubscribe(StompFrame command) throws ProtocolException {
-        checkConnected();
-        Map<String, String> headers = command.getHeaders();
-
-        ActiveMQDestination destination = null;
-        Object o = headers.get(Stomp.Headers.Unsubscribe.DESTINATION);
-        if (o != null) {
-            destination = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertDestination(this, (String)o);
-        }
-
-        String subscriptionId = headers.get(Stomp.Headers.Unsubscribe.ID);
-
-        if (subscriptionId == null && destination == null) {
-            throw new ProtocolException("Must specify the subscriptionId or the destination you are unsubscribing from");
-        }
-
-        // check if it is a durable subscription
-        String durable = command.getHeaders().get("activemq.subscriptionName");
-        if (durable != null) {
-            RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-            info.setClientId(durable);
-            info.setSubscriptionName(durable);
-            info.setConnectionId(connectionId);
-            sendToActiveMQ(info, createResponseHandler(command));
-            return;
-        }
-
-        // TODO: Unsubscribing using a destination is a bit wierd if multiple
-        // subscriptions
-        // are created with the same destination. Perhaps this should be
-        // removed.
-        //
-        for (Iterator<StompSubscription> iter = subscriptionsByConsumerId.values().iterator(); iter.hasNext();) {
-            StompSubscription sub = iter.next();
-            if ((subscriptionId != null && subscriptionId.equals(sub.getSubscriptionId())) || (destination != null && destination.equals(sub.getDestination()))) {
-                sendToActiveMQ(sub.getConsumerInfo().createRemoveCommand(), createResponseHandler(command));
-                iter.remove();
-                return;
-            }
-        }
-
-        throw new ProtocolException("No subscription matched.");
-    }
-
-    ConnectionInfo connectionInfo = new ConnectionInfo();
-
-    protected void onStompConnect(final StompFrame command) throws ProtocolException {
-
-        if (connected.get()) {
-            throw new ProtocolException("Allready connected.");
-        }
-
-        final Map<String, String> headers = command.getHeaders();
-
-        // allow anyone to login for now
-        String login = headers.get(Stomp.Headers.Connect.LOGIN);
-        String passcode = headers.get(Stomp.Headers.Connect.PASSCODE);
-        String clientId = headers.get(Stomp.Headers.Connect.CLIENT_ID);
-
-
-        IntrospectionSupport.setProperties(connectionInfo, headers, "activemq.");
-
-        connectionInfo.setConnectionId(connectionId);
-        if (clientId != null) {
-            connectionInfo.setClientId(clientId);
-        } else {
-            connectionInfo.setClientId("" + connectionInfo.getConnectionId().toString());
-        }
-
-        connectionInfo.setResponseRequired(true);
-        connectionInfo.setUserName(login);
-        connectionInfo.setPassword(passcode);
-        connectionInfo.setTransportContext(stompTransport.getPeerCertificates());
-
-        sendToActiveMQ(connectionInfo, new ResponseHandler() {
-            public void onResponse(ProtocolConverter converter, Response response) throws IOException {
-
-                if (response.isException()) {
-                    // If the connection attempt fails we close the socket.
-                    Throwable exception = ((ExceptionResponse)response).getException();
-                    handleException(exception, command);
-                    getStompTransport().onException(IOExceptionSupport.create(exception));
-                    return;
-                }
-
-                final SessionInfo sessionInfo = new SessionInfo(sessionId);
-                sendToActiveMQ(sessionInfo, null);
-
-                final ProducerInfo producerInfo = new ProducerInfo(producerId);
-                sendToActiveMQ(producerInfo, new ResponseHandler() {
-                    public void onResponse(ProtocolConverter converter, Response response) throws IOException {
-
-                        if (response.isException()) {
-                            // If the connection attempt fails we close the socket.
-                            Throwable exception = ((ExceptionResponse)response).getException();
-                            handleException(exception, command);
-                            getStompTransport().onException(IOExceptionSupport.create(exception));
-                        }
-
-                        connected.set(true);
-                        HashMap<String, String> responseHeaders = new HashMap<String, String>();
-
-                        responseHeaders.put(Stomp.Headers.Connected.SESSION, connectionInfo.getClientId());
-                        String requestId = headers.get(Stomp.Headers.Connect.REQUEST_ID);
-                        if (requestId == null) {
-                            // TODO legacy
-                            requestId = headers.get(Stomp.Headers.RECEIPT_REQUESTED);
-                        }
-                        if (requestId != null) {
-                            // TODO legacy
-                            responseHeaders.put(Stomp.Headers.Connected.RESPONSE_ID, requestId);
-                            responseHeaders.put(Stomp.Headers.Response.RECEIPT_ID, requestId);
-                        }
-
-                        StompFrame sc = new StompFrame();
-                        sc.setAction(Stomp.Responses.CONNECTED);
-                        sc.setHeaders(responseHeaders);
-                        sendToStomp(sc);
-                    }
-                });
-
-            }
-        });
-    }
-
-    protected void onStompDisconnect(StompFrame command) throws ProtocolException {
-        checkConnected();
-        sendToActiveMQ(connectionInfo.createRemoveCommand(), createResponseHandler(command));
-        sendToActiveMQ(new ShutdownInfo(), createResponseHandler(command));
-        connected.set(false);
-    }
-
-    protected void checkConnected() throws ProtocolException {
-        if (!connected.get()) {
-            throw new ProtocolException("Not connected.");
-        }
-    }
-
-    /**
-     * Dispatch a ActiveMQ command
-     *
-     * @param command
-     * @throws IOException
-     */
-    public void onActiveMQCommand(Command command) throws IOException, JMSException {
-        if (command.isResponse()) {
-
-            Response response = (Response)command;
-            ResponseHandler rh = resposeHandlers.remove(Integer.valueOf(response.getCorrelationId()));
-            if (rh != null) {
-                rh.onResponse(this, response);
-            } else {
-                // Pass down any unexpected errors. Should this close the connection?
-                if (response.isException()) {
-                    Throwable exception = ((ExceptionResponse)response).getException();
-                    handleException(exception, null);
-                }
-            }
-        } else if (command.isMessageDispatch()) {
-
-            MessageDispatch md = (MessageDispatch)command;
-            StompSubscription sub = subscriptionsByConsumerId.get(md.getConsumerId());
-            if (sub != null) {
-                sub.onMessageDispatch(md);
-            }
-        } else if (command.getDataStructureType() == ConnectionError.DATA_STRUCTURE_TYPE) {
-            // Pass down any unexpected async errors. Should this close the connection?
-            Throwable exception = ((ConnectionError)command).getException();
-            handleException(exception, null);
-        }
-    }
-
-    public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException {
-        ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command);
-        return msg;
-    }
-
-    public StompFrame convertMessage(ActiveMQMessage message, boolean ignoreTransformation) throws IOException, JMSException {
-        if (ignoreTransformation == true) {
-            return frameTranslator.convertMessage(this, message);
-        } else {
-            return findTranslator(message.getStringProperty(Stomp.Headers.TRANSFORMATION)).convertMessage(this, message);
-        }
-    }
-
-    public StompTransport getStompTransport() {
-        return stompTransport;
-    }
-
-    public ActiveMQDestination createTempQueue(String name) {
-        ActiveMQDestination rc = tempDestinations.get(name);
-        if( rc == null ) {
-            rc = new ActiveMQTempQueue(connectionId, tempDestinationGenerator.getNextSequenceId());
-            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
-            tempDestinations.put(name, rc);
-        }
-        return rc;
-    }
-
-    public ActiveMQDestination createTempTopic(String name) {
-        ActiveMQDestination rc = tempDestinations.get(name);
-        if( rc == null ) {
-            rc = new ActiveMQTempTopic(connectionId, tempDestinationGenerator.getNextSequenceId());
-            sendToActiveMQ(new DestinationInfo(connectionId, DestinationInfo.ADD_OPERATION_TYPE, rc), null);
-            tempDestinations.put(name, rc);
-            tempDestinationAmqToStompMap.put(rc.getQualifiedName(), name);
-        }
-        return rc;
-    }
-
-    public String getCreatedTempDestinationName(ActiveMQDestination destination) {
-        return tempDestinationAmqToStompMap.get(destination.getQualifiedName());
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolException.java
deleted file mode 100644
index 2a923ca..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-
-/**
- * @author <a href="http://hiramchirino.com">chirino</a>
- */
-public class ProtocolException extends IOException {
-
-    private static final long serialVersionUID = -2869735532997332242L;
-
-    private final boolean fatal;
-
-    public ProtocolException() {
-        this(null);
-    }
-
-    public ProtocolException(String s) {
-        this(s, false);
-    }
-
-    public ProtocolException(String s, boolean fatal) {
-        this(s, fatal, null);
-    }
-
-    public ProtocolException(String s, boolean fatal, Throwable cause) {
-        super(s);
-        this.fatal = fatal;
-        initCause(cause);
-    }
-
-    public boolean isFatal() {
-        return fatal;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ResponseHandler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ResponseHandler.java
deleted file mode 100644
index 26dd9c6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ResponseHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-
-import org.apache.activemq.command.Response;
-
-/**
- * Interface used by the ProtocolConverter for callbacks.
- * 
- * @author <a href="http://hiramchirino.com">chirino</a> 
- */
-interface ResponseHandler {
-    void onResponse(ProtocolConverter converter, Response response) throws IOException;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Stomp.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Stomp.java
deleted file mode 100644
index a788a59..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Stomp.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.transport.stomp;
-
-public interface Stomp {
-    String NULL = "\u0000";
-    String NEWLINE = "\n";
-
-    public static interface Commands {
-        String CONNECT = "CONNECT";
-        String SEND = "SEND";
-        String DISCONNECT = "DISCONNECT";
-        String SUBSCRIBE = "SUB";
-        String UNSUBSCRIBE = "UNSUB";
-
-        String BEGIN_TRANSACTION = "BEGIN";
-        String COMMIT_TRANSACTION = "COMMIT";
-        String ABORT_TRANSACTION = "ABORT";
-        String BEGIN = "BEGIN";
-        String COMMIT = "COMMIT";
-        String ABORT = "ABORT";
-        String ACK = "ACK";
-    }
-
-    public interface Responses {
-        String CONNECTED = "CONNECTED";
-        String ERROR = "ERROR";
-        String MESSAGE = "MESSAGE";
-        String RECEIPT = "RECEIPT";
-    }
-
-    public interface Headers {
-        String SEPERATOR = ":";
-        String RECEIPT_REQUESTED = "receipt";
-        String TRANSACTION = "transaction";
-        String CONTENT_LENGTH = "content-length";
-        String TRANSFORMATION = "transformation";
-        String TRANSFORMATION_ERROR = "transformation-error";
-        /**
-         * This header is used to instruct ActiveMQ to construct the message
-         * based with a specific type.
-         */
-        String AMQ_MESSAGE_TYPE = "amq-msg-type";
-
-        public interface Response {
-            String RECEIPT_ID = "receipt-id";
-        }
-
-        public interface Send {
-            String DESTINATION = "destination";
-            String CORRELATION_ID = "correlation-id";
-            String REPLY_TO = "reply-to";
-            String EXPIRATION_TIME = "expires";
-            String PRIORITY = "priority";
-            String TYPE = "type";
-            String PERSISTENT = "persistent";
-        }
-
-        public interface Message {
-            String MESSAGE_ID = "message-id";
-            String DESTINATION = "destination";
-            String CORRELATION_ID = "correlation-id";
-            String EXPIRATION_TIME = "expires";
-            String REPLY_TO = "reply-to";
-            String PRORITY = "priority";
-            String REDELIVERED = "redelivered";
-            String TIMESTAMP = "timestamp";
-            String TYPE = "type";
-            String SUBSCRIPTION = "subscription";
-            String USERID = "JMSXUserID";
-            String ORIGINAL_DESTINATION = "original-destination";
-        }
-
-        public interface Subscribe {
-            String DESTINATION = "destination";
-            String ACK_MODE = "ack";
-            String ID = "id";
-            String SELECTOR = "selector";
-
-            public interface AckModeValues {
-                String AUTO = "auto";
-                String CLIENT = "client";
-                String INDIVIDUAL = "client-individual";
-            }
-        }
-
-        public interface Unsubscribe {
-            String DESTINATION = "destination";
-            String ID = "id";
-        }
-
-        public interface Connect {
-            String LOGIN = "login";
-            String PASSCODE = "passcode";
-            String CLIENT_ID = "client-id";
-            String REQUEST_ID = "request-id";
-        }
-
-        public interface Error {
-            String MESSAGE = "message";
-        }
-
-        public interface Connected {
-            String SESSION = "session";
-            String RESPONSE_ID = "response-id";
-        }
-
-        public interface Ack {
-            String MESSAGE_ID = "message-id";
-        }
-    }
-
-	public enum Transformations {
-		JMS_BYTE,
-		JMS_XML,
-		JMS_JSON,
-		JMS_OBJECT_XML,
-		JMS_OBJECT_JSON,
-		JMS_MAP_XML,
-		JMS_MAP_JSON,
-		JMS_ADVISORY_XML,
-		JMS_ADVISORY_JSON;
-
-		public String toString() {
-			return name().replaceAll("_", "-").toLowerCase();
-		}
-
-		public static Transformations getValue(String value) {
-			return valueOf(value.replaceAll("-", "_").toUpperCase());
-		}
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java
deleted file mode 100644
index 8838021..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-
-public class StompConnection {
-
-    public static final long RECEIVE_TIMEOUT = 10000;
-
-    private Socket stompSocket;
-    private ByteArrayOutputStream inputBuffer = new ByteArrayOutputStream();
-
-    public void open(String host, int port) throws IOException, UnknownHostException {
-        open(new Socket(host, port));
-    }
-
-    public void open(Socket socket) {
-    	stompSocket = socket;
-    }
-
-    public void close() throws IOException {
-        if (stompSocket != null) {
-            stompSocket.close();
-            stompSocket = null;
-        }
-    }
-
-    public void sendFrame(String data) throws Exception {
-        byte[] bytes = data.getBytes("UTF-8");
-        OutputStream outputStream = stompSocket.getOutputStream();
-        outputStream.write(bytes);
-        outputStream.write(0);
-        outputStream.flush();
-    }
-
-    public void sendFrame(String frame, byte[] data) throws Exception {
-        byte[] bytes = frame.getBytes("UTF-8");
-        OutputStream outputStream = stompSocket.getOutputStream();
-        outputStream.write(bytes);
-        outputStream.write(data);
-        outputStream.write(0);
-        outputStream.flush();
-    }
-
-    public StompFrame receive() throws Exception {
-        return receive(RECEIVE_TIMEOUT);
-    }
-
-    public StompFrame receive(long timeOut) throws Exception {
-    	stompSocket.setSoTimeout((int)timeOut);
-    	InputStream is = stompSocket.getInputStream();
-        StompWireFormat wf = new StompWireFormat();
-        DataInputStream dis = new DataInputStream(is);
-        return (StompFrame)wf.unmarshal(dis);
-    }
-
-    public String receiveFrame() throws Exception {
-        return receiveFrame(RECEIVE_TIMEOUT);
-    }
-
-    public String receiveFrame(long timeOut) throws Exception {
-        stompSocket.setSoTimeout((int)timeOut);
-        InputStream is = stompSocket.getInputStream();
-        int c = 0;
-        for (;;) {
-            c = is.read();
-            if (c < 0) {
-                throw new IOException("socket closed.");
-            } else if (c == 0) {
-                c = is.read();
-                if (c == '\n') {
-                    // end of frame
-                    return stringFromBuffer(inputBuffer);
-                } else {
-                    inputBuffer.write(0);
-                    inputBuffer.write(c);
-                }
-            } else {
-                inputBuffer.write(c);
-            }
-        }
-    }
-
-	private String stringFromBuffer(ByteArrayOutputStream inputBuffer) throws Exception {
-	    byte[] ba = inputBuffer.toByteArray();
-        inputBuffer.reset();
-        return new String(ba, "UTF-8");
-    }
-
-    public Socket getStompSocket() {
-		return stompSocket;
-	}
-
-	public void setStompSocket(Socket stompSocket) {
-		this.stompSocket = stompSocket;
-	}
-
-    public void connect(String username, String password) throws Exception {
-        connect(username, password, null);
-    }
-
-    public void connect(String username, String password, String client) throws Exception {
-    	HashMap<String, String> headers = new HashMap();
-    	headers.put("login", username);
-    	headers.put("passcode", password);
-    	if (client != null) {
-    		headers.put("client-id", client);
-    	}
-    	StompFrame frame = new StompFrame("CONNECT", headers);
-        sendFrame(frame.format());
-
-        StompFrame connect = receive();
-        if (!connect.getAction().equals(Stomp.Responses.CONNECTED)) {
-        	throw new Exception ("Not connected: " + connect.getBody());
-        }
-    }
-
-    public void disconnect() throws Exception {
-    	StompFrame frame = new StompFrame("DISCONNECT");
-        sendFrame(frame.format());
-    }
-
-    public void send(String destination, String message) throws Exception {
-    	send(destination, message, null, null);
-    }
-
-    public void send(String destination, String message, String transaction, HashMap<String, String> headers) throws Exception {
-    	if (headers == null) {
-    		headers = new HashMap<String, String>();
-    	}
-    	headers.put("destination", destination);
-    	if (transaction != null) {
-    		headers.put("transaction", transaction);
-    	}
-    	StompFrame frame = new StompFrame("SEND", headers, message.getBytes());
-        sendFrame(frame.format());
-    }
-
-    public void subscribe(String destination) throws Exception {
-    	subscribe(destination, null, null);
-    }
-
-    public void subscribe(String destination, String ack) throws Exception {
-    	subscribe(destination, ack, new HashMap<String, String>());
-    }
-
-    public void subscribe(String destination, String ack, HashMap<String, String> headers) throws Exception {
-		if (headers == null) {
-			headers = new HashMap<String, String>();
-		}
-		headers.put("destination", destination);
-    	if (ack != null) {
-    		headers.put("ack", ack);
-    	}
-    	StompFrame frame = new StompFrame("SUBSCRIBE", headers);
-        sendFrame(frame.format());
-    }
-
-    public void unsubscribe(String destination) throws Exception {
-    	unsubscribe(destination, null);
-    }
-
-    public void unsubscribe(String destination, HashMap<String, String> headers) throws Exception {
-		if (headers == null) {
-			headers = new HashMap<String, String>();
-		}
-		headers.put("destination", destination);
-    	StompFrame frame = new StompFrame("UNSUBSCRIBE", headers);
-        sendFrame(frame.format());
-    }    
-    
-    public void begin(String transaction) throws Exception {
-    	HashMap<String, String> headers = new HashMap<String, String>();
-    	headers.put("transaction", transaction);
-    	StompFrame frame = new StompFrame("BEGIN", headers);
-    	sendFrame(frame.format());
-    }
-
-    public void abort(String transaction) throws Exception {
-    	HashMap<String, String> headers = new HashMap<String, String>();
-    	headers.put("transaction", transaction);
-    	StompFrame frame = new StompFrame("ABORT", headers);
-    	sendFrame(frame.format());
-    }
-
-    public void commit(String transaction) throws Exception {
-    	HashMap<String, String> headers = new HashMap<String, String>();
-    	headers.put("transaction", transaction);
-    	StompFrame frame = new StompFrame("COMMIT", headers);
-    	sendFrame(frame.format());
-    }
-
-    public void ack(StompFrame frame) throws Exception {
-    	ack(frame.getHeaders().get("message-id"), null);
-    }
-
-    public void ack(StompFrame frame, String transaction) throws Exception {
-    	ack(frame.getHeaders().get("message-id"), transaction);
-    }
-
-    public void ack(String messageId) throws Exception {
-    	ack(messageId, null);
-    }
-
-    public void ack(String messageId, String transaction) throws Exception {
-    	HashMap<String, String> headers = new HashMap<String, String>();
-    	headers.put("message-id", messageId);
-    	if (transaction != null)
-    		headers.put("transaction", transaction);
-    	StompFrame frame = new StompFrame("ACK", headers);
-    	sendFrame(frame.format());
-    }
-
-    protected String appendHeaders(HashMap<String, Object> headers) {
-    	StringBuffer result = new StringBuffer();
-    	for (String key : headers.keySet()) {
-    		result.append(key + ":" + headers.get(key) + "\n");
-    	}
-    	result.append("\n");
-    	return result.toString();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java
deleted file mode 100644
index 537e9d3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Endpoint;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.util.MarshallingSupport;
-
-/**
- * Represents all the data in a STOMP frame.
- *
- * @author <a href="http://hiramchirino.com">chirino</a>
- */
-public class StompFrame implements Command {
-
-    public static final byte[] NO_DATA = new byte[] {};
-
-    private String action;
-    private Map<String, String> headers = new HashMap<String, String>();
-    private byte[] content = NO_DATA;
-
-    public StompFrame(String command) {
-        this(command, null, null);
-    }
-
-    public StompFrame(String command, Map<String, String> headers) {
-        this(command, headers, null);
-    }
-
-    public StompFrame(String command, Map<String, String> headers, byte[] data) {
-        this.action = command;
-        if (headers != null)
-            this.headers = headers;
-        if (data != null)
-            this.content = data;
-    }
-
-    public StompFrame() {
-    }
-
-    public String getAction() {
-        return action;
-    }
-
-    public void setAction(String command) {
-        this.action = command;
-    }
-
-    public byte[] getContent() {
-        return content;
-    }
-
-    public String getBody() {
-        try {
-            return new String(content, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            return new String(content);
-        }
-    }
-
-    public void setContent(byte[] data) {
-        this.content = data;
-    }
-
-    public Map<String, String> getHeaders() {
-        return headers;
-    }
-
-    public void setHeaders(Map<String, String> headers) {
-        this.headers = headers;
-    }
-
-    //
-    // Methods in the Command interface
-    //
-    public int getCommandId() {
-        return 0;
-    }
-
-    public Endpoint getFrom() {
-        return null;
-    }
-
-    public Endpoint getTo() {
-        return null;
-    }
-
-    public boolean isBrokerInfo() {
-        return false;
-    }
-
-    public boolean isMessage() {
-        return false;
-    }
-
-    public boolean isMessageAck() {
-        return false;
-    }
-
-    public boolean isMessageDispatch() {
-        return false;
-    }
-
-    public boolean isMessageDispatchNotification() {
-        return false;
-    }
-
-    public boolean isResponse() {
-        return false;
-    }
-
-    public boolean isResponseRequired() {
-        return false;
-    }
-
-    public boolean isShutdownInfo() {
-        return false;
-    }
-
-    public boolean isConnectionControl() {
-        return false;
-    }
-
-    public boolean isWireFormatInfo() {
-        return false;
-    }
-
-    public void setCommandId(int value) {
-    }
-
-    public void setFrom(Endpoint from) {
-    }
-
-    public void setResponseRequired(boolean responseRequired) {
-    }
-
-    public void setTo(Endpoint to) {
-    }
-
-    public Response visit(CommandVisitor visitor) throws Exception {
-        return null;
-    }
-
-    public byte getDataStructureType() {
-        return 0;
-    }
-
-    public boolean isMarshallAware() {
-        return false;
-    }
-
-    public String toString() {
-        return format(true);
-    }
-
-    public String format() {
-        return format(false);
-    }
-
-    public String format(boolean forLogging) {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append(getAction());
-        buffer.append("\n");
-        Map headers = getHeaders();
-        for (Iterator iter = headers.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            buffer.append(entry.getKey());
-            buffer.append(":");
-            if (forLogging && entry.getKey().toString().toLowerCase().contains(Stomp.Headers.Connect.PASSCODE)) {
-                buffer.append("*****");
-            } else {
-                buffer.append(entry.getValue());
-            }
-            buffer.append("\n");
-        }
-        buffer.append("\n");
-        if (getContent() != null) {
-            try {
-                String contentString = new String(getContent(), "UTF-8");
-                if (forLogging) {
-                    contentString = MarshallingSupport.truncate64(contentString);
-                }
-                buffer.append(contentString);
-            } catch (Throwable e) {
-                buffer.append(Arrays.toString(getContent()));
-            }
-        }
-        return buffer.toString();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrameError.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrameError.java
deleted file mode 100644
index af62b3b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompFrameError.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.transport.stomp;
-
-/**
- * Command indicating that an invalid Stomp Frame was received.
- * 
- * @author <a href="http://hiramchirino.com">chirino</a>
- */
-public class StompFrameError extends StompFrame {
-
-    private final ProtocolException exception;
-
-    public StompFrameError(ProtocolException exception) {
-        this.exception = exception;
-    }
-
-    public ProtocolException getException() {
-        return exception;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransport.java
deleted file mode 100644
index 080cd54..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransport.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.SocketChannel;
-import java.util.HashMap;
-
-import javax.net.SocketFactory;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.nio.NIOOutputStream;
-import org.apache.activemq.transport.nio.SelectorManager;
-import org.apache.activemq.transport.nio.SelectorSelection;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * An implementation of the {@link Transport} interface for using Stomp over NIO
- *
- * 
- */
-public class StompNIOTransport extends TcpTransport {
-
-    private SocketChannel channel;
-    private SelectorSelection selection;
-
-    private ByteBuffer inputBuffer;
-    ByteArrayOutputStream currentCommand = new ByteArrayOutputStream();
-    boolean processedHeaders = false;
-    String action;
-    HashMap<String, String> headers;
-    int contentLength = -1;
-    int readLength = 0;
-    int previousByte = -1;
-
-    public StompNIOTransport(WireFormat wireFormat, SocketFactory socketFactory, URI remoteLocation, URI localLocation) throws UnknownHostException, IOException {
-        super(wireFormat, socketFactory, remoteLocation, localLocation);
-    }
-
-    public StompNIOTransport(WireFormat wireFormat, Socket socket) throws IOException {
-        super(wireFormat, socket);
-    }
-
-    protected void initializeStreams() throws IOException {
-        channel = socket.getChannel();
-        channel.configureBlocking(false);
-
-        // listen for events telling us when the socket is readable.
-        selection = SelectorManager.getInstance().register(channel, new SelectorManager.Listener() {
-            public void onSelect(SelectorSelection selection) {
-                serviceRead();
-            }
-
-            public void onError(SelectorSelection selection, Throwable error) {
-                if (error instanceof IOException) {
-                    onException((IOException)error);
-                } else {
-                    onException(IOExceptionSupport.create(error));
-                }
-            }
-        });
-
-        inputBuffer = ByteBuffer.allocate(8 * 1024);
-        NIOOutputStream outPutStream = new NIOOutputStream(channel, 8 * 1024);
-        this.dataOut = new DataOutputStream(outPutStream);
-        this.buffOut = outPutStream;
-    }
-
-    private void serviceRead() {
-        try {
-
-           while (true) {
-               // read channel
-               int readSize = channel.read(inputBuffer);
-               // channel is closed, cleanup
-               if (readSize == -1) {
-                   onException(new EOFException());
-                   selection.close();
-                   break;
-               }
-               // nothing more to read, break
-               if (readSize == 0) {
-                   break;
-               }
-
-               inputBuffer.flip();
-
-               int b;
-               ByteArrayInputStream input = new ByteArrayInputStream(inputBuffer.array());
-
-               int i = 0;
-               while(i++ < readSize) {
-                   b = input.read();
-                   // skip repeating nulls
-                   if (!processedHeaders && previousByte == 0 && b == 0) {
-                       continue;
-                   }
-
-                   if (!processedHeaders) {
-                       currentCommand.write(b);
-                       // end of headers section, parse action and header
-                       if (previousByte == '\n' && b == '\n') {
-                           if (wireFormat instanceof StompWireFormat) {
-                               DataByteArrayInputStream data = new DataByteArrayInputStream(currentCommand.toByteArray());
-                               action = ((StompWireFormat)wireFormat).parseAction(data);
-                               headers = ((StompWireFormat)wireFormat).parseHeaders(data);
-                               String contentLengthHeader = headers.get(Stomp.Headers.CONTENT_LENGTH);
-                               if (contentLengthHeader != null) {
-                                   contentLength = ((StompWireFormat)wireFormat).parseContentLength(contentLengthHeader);
-                               } else {
-                                   contentLength = -1;
-                               }
-                           }
-                           processedHeaders = true;
-                           currentCommand.reset();
-                       }
-                   } else {
-
-                       if (contentLength == -1) {
-                           // end of command reached, unmarshal
-                           if (b == 0) {
-                               processCommand();
-                           } else {
-                               currentCommand.write(b);
-                           }
-                       } else {
-                           // read desired content length
-                           if (readLength++ == contentLength) {
-                               processCommand();
-                               readLength = 0;
-                           } else {
-                               currentCommand.write(b);
-                           }
-                       }
-                   }
-
-                   previousByte = b;
-               }
-               // clear the buffer
-               inputBuffer.clear();
-
-           }
-        } catch (IOException e) {
-            onException(e);
-        } catch (Throwable e) {
-            onException(IOExceptionSupport.create(e));
-        }
-    }
-
-    private void processCommand() throws Exception {
-        StompFrame frame = new StompFrame(action, headers, currentCommand.toByteArray());
-        doConsume(frame);
-        processedHeaders = false;
-        currentCommand.reset();
-        contentLength = -1;
-    }
-
-    protected void doStart() throws Exception {
-        connect();
-        selection.setInterestOps(SelectionKey.OP_READ);
-        selection.enable();
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        try {
-            selection.close();
-        } catch (Exception e) {
-        	e.printStackTrace();
-        }
-        super.doStop(stopper);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java
deleted file mode 100644
index c8e5323..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.Map;
-
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-
-import org.apache.activemq.broker.BrokerContext;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.nio.NIOTransportFactory;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.apache.activemq.transport.tcp.TcpTransportServer;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.xbean.XBeanBrokerService;
-
-/**
- * A <a href="http://stomp.codehaus.org/">STOMP</a> over NIO transport factory
- * 
- * 
- */
-public class StompNIOTransportFactory extends NIOTransportFactory implements BrokerServiceAware {
-
-    private BrokerContext brokerContext = null;
-
-    protected String getDefaultWireFormatType() {
-        return "stomp";
-    }
-
-    protected TcpTransportServer createTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-        return new TcpTransportServer(this, location, serverSocketFactory) {
-            protected Transport createTransport(Socket socket, WireFormat format) throws IOException {
-                return new StompNIOTransport(format, socket);
-            }
-        };
-    }
-
-    protected TcpTransport createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws UnknownHostException, IOException {
-        return new StompNIOTransport(wf, socketFactory, location, localLocation);
-    }  
-
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-        transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), brokerContext);
-        IntrospectionSupport.setProperties(transport, options);
-        return super.compositeConfigure(transport, format, options);
-    }
-
-    protected boolean isUseInactivityMonitor(Transport transport) {
-        // lets disable the inactivity monitor as stomp does not use keep alive
-        // packets
-        return false;
-    }
-    
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerContext = brokerService.getBrokerContext();
-    }
-
-}
-
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java
deleted file mode 100644
index a358b27..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.util.Map;
-
-import org.apache.activemq.broker.BrokerContext;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.SslTransportFactory;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * A <a href="http://stomp.codehaus.org/">STOMP</a> over SSL transport factory
- * 
- * 
- */
-public class StompSslTransportFactory extends SslTransportFactory implements BrokerServiceAware {
-
-    private BrokerContext brokerContext = null;
-
-    protected String getDefaultWireFormatType() {
-        return "stomp";
-    }
-
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-        transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), brokerContext);
-        IntrospectionSupport.setProperties(transport, options);
-        return super.compositeConfigure(transport, format, options);
-    }
-
-    public void setBrokerService(BrokerService brokerService) {
-        this.brokerContext = brokerService.getBrokerContext();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java
deleted file mode 100644
index e2b24c8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSubscription.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.TransactionId;
-
-/**
- * Keeps track of the STOMP subscription so that acking is correctly done.
- *
- * @author <a href="http://hiramchirino.com">chirino</a>
- */
-public class StompSubscription {
-
-    public static final String AUTO_ACK = Stomp.Headers.Subscribe.AckModeValues.AUTO;
-    public static final String CLIENT_ACK = Stomp.Headers.Subscribe.AckModeValues.CLIENT;
-    public static final String INDIVIDUAL_ACK = Stomp.Headers.Subscribe.AckModeValues.INDIVIDUAL;
-
-    private final ProtocolConverter protocolConverter;
-    private final String subscriptionId;
-    private final ConsumerInfo consumerInfo;
-
-    private final LinkedHashMap<MessageId, MessageDispatch> dispatchedMessage = new LinkedHashMap<MessageId, MessageDispatch>();
-    private final LinkedList<MessageDispatch> unconsumedMessage = new LinkedList<MessageDispatch>();
-
-    private String ackMode = AUTO_ACK;
-    private ActiveMQDestination destination;
-    private String transformation;
-
-
-    public StompSubscription(ProtocolConverter stompTransport, String subscriptionId, ConsumerInfo consumerInfo, String transformation) {
-        this.protocolConverter = stompTransport;
-        this.subscriptionId = subscriptionId;
-        this.consumerInfo = consumerInfo;
-        this.transformation = transformation;
-    }
-
-    void onMessageDispatch(MessageDispatch md) throws IOException, JMSException {
-        ActiveMQMessage message = (ActiveMQMessage)md.getMessage();
-        if (ackMode == CLIENT_ACK) {
-            synchronized (this) {
-                dispatchedMessage.put(message.getMessageId(), md);
-            }
-        } else if (ackMode == INDIVIDUAL_ACK) {
-            synchronized (this) {
-                dispatchedMessage.put(message.getMessageId(), md);
-            }
-        } else if (ackMode == AUTO_ACK) {
-            MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1);
-            protocolConverter.getStompTransport().sendToActiveMQ(ack);
-        }
-
-        boolean ignoreTransformation = false;
-
-        if (transformation != null && !( message instanceof ActiveMQBytesMessage ) ) {
-       		message.setReadOnlyProperties(false);
-        	message.setStringProperty(Stomp.Headers.TRANSFORMATION, transformation);
-        } else {
-        	if (message.getStringProperty(Stomp.Headers.TRANSFORMATION) != null) {
-        		ignoreTransformation = true;
-        	}
-        }
-
-        StompFrame command = protocolConverter.convertMessage(message, ignoreTransformation);
-
-        command.setAction(Stomp.Responses.MESSAGE);
-        if (subscriptionId != null) {
-            command.getHeaders().put(Stomp.Headers.Message.SUBSCRIPTION, subscriptionId);
-        }
-
-        protocolConverter.getStompTransport().sendToStomp(command);
-    }
-
-    synchronized void onStompAbort(TransactionId transactionId) {
-    	unconsumedMessage.clear();
-    }
-
-    synchronized void onStompCommit(TransactionId transactionId) {
-    	for (Iterator iter = dispatchedMessage.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Entry)iter.next();
-            MessageId id = (MessageId)entry.getKey();
-            MessageDispatch msg = (MessageDispatch)entry.getValue();
-            if (unconsumedMessage.contains(msg)) {
-            	iter.remove();
-            }
-    	}
-    	unconsumedMessage.clear();
-    }
-
-    synchronized MessageAck onStompMessageAck(String messageId, TransactionId transactionId) {
-
-    	MessageId msgId = new MessageId(messageId);
-
-        if (!dispatchedMessage.containsKey(msgId)) {
-            return null;
-        }
-
-        MessageAck ack = new MessageAck();
-        ack.setDestination(consumerInfo.getDestination());
-        ack.setConsumerId(consumerInfo.getConsumerId());
-
-        if (ackMode == CLIENT_ACK) {
-        	ack.setAckType(MessageAck.STANDARD_ACK_TYPE);
-            int count = 0;
-            for (Iterator iter = dispatchedMessage.entrySet().iterator(); iter.hasNext();) {
-
-                Map.Entry entry = (Entry)iter.next();
-                MessageId id = (MessageId)entry.getKey();
-                MessageDispatch msg = (MessageDispatch)entry.getValue();
-
-                if (ack.getFirstMessageId() == null) {
-                    ack.setFirstMessageId(id);
-                }
-
-                if (transactionId != null) {
-                	if (!unconsumedMessage.contains(msg)) {
-                		unconsumedMessage.add(msg);
-                	}
-                } else {
-                	iter.remove();
-                }
-
-
-                count++;
-
-                if (id.equals(msgId)) {
-                    ack.setLastMessageId(id);
-                    break;
-                }
-
-            }
-            ack.setMessageCount(count);
-            if (transactionId != null) {
-            	ack.setTransactionId(transactionId);
-            }
-        }
-        else if (ackMode == INDIVIDUAL_ACK) {
-            ack.setAckType(MessageAck.INDIVIDUAL_ACK_TYPE);
-            ack.setMessageID(msgId);
-            if (transactionId != null) {
-            	unconsumedMessage.add(dispatchedMessage.get(msgId));
-            	ack.setTransactionId(transactionId);
-            }
-            dispatchedMessage.remove(msgId);
-        }
-        return ack;
-    }
-
-    public String getAckMode() {
-        return ackMode;
-    }
-
-    public void setAckMode(String ackMode) {
-        this.ackMode = ackMode;
-    }
-
-    public String getSubscriptionId() {
-        return subscriptionId;
-    }
-
-    public void setDestination(ActiveMQDestination destination) {
-        this.destination = destination;
-    }
-
-    public ActiveMQDestination getDestination() {
-        return destination;
-    }
-
-    public ConsumerInfo getConsumerInfo() {
-        return consumerInfo;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransport.java
deleted file mode 100644
index 04c499b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-
-import org.apache.activemq.command.Command;
-
-/**
- * Basic interface that mediates between protocol converter and transport
- *
- */
-public interface StompTransport {
-
-    public void sendToActiveMQ(Command command);
-    
-    public void sendToStomp(StompFrame command) throws IOException;
-    
-    public X509Certificate[] getPeerCertificates();
-    
-    public void onException(IOException error);
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java
deleted file mode 100644
index 1c18065..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.util.Map;
-
-import org.apache.activemq.broker.BrokerContext;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.TcpTransportFactory;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.xbean.XBeanBrokerService;
-
-/**
- * A <a href="http://stomp.codehaus.org/">STOMP</a> transport factory
- * 
- * 
- */
-public class StompTransportFactory extends TcpTransportFactory implements BrokerServiceAware {
-
-	private BrokerContext brokerContext = null;
-	
-    protected String getDefaultWireFormatType() {
-        return "stomp";
-    }
-
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-        transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), brokerContext);
-        IntrospectionSupport.setProperties(transport, options);
-        return super.compositeConfigure(transport, format, options);
-    }
-
-    protected boolean isUseInactivityMonitor(Transport transport) {
-        // lets disable the inactivity monitor as stomp does not use keep alive
-        // packets
-        return false;
-    }
-
-	public void setBrokerService(BrokerService brokerService) {
-	    this.brokerContext = brokerService.getBrokerContext();
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
deleted file mode 100644
index 7ed9983..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.BrokerContext;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFilter;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.tcp.SslTransport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The StompTransportFilter normally sits on top of a TcpTransport that has been
- * configured with the StompWireFormat and is used to convert STOMP commands to
- * ActiveMQ commands. All of the conversion work is done by delegating to the
- * ProtocolConverter.
- * 
- * @author <a href="http://hiramchirino.com">chirino</a>
- */
-public class StompTransportFilter extends TransportFilter implements StompTransport {
-    private static final Logger LOG = LoggerFactory.getLogger(StompTransportFilter.class);
-    private final ProtocolConverter protocolConverter;
-    private final FrameTranslator frameTranslator;
-
-    private boolean trace;
-
-    public StompTransportFilter(Transport next, FrameTranslator translator, BrokerContext brokerContext) {
-        super(next);
-        this.frameTranslator = translator;
-        this.protocolConverter = new ProtocolConverter(this, translator, brokerContext);
-    }
-
-    public void oneway(Object o) throws IOException {
-        try {
-            final Command command = (Command)o;
-            protocolConverter.onActiveMQCommand(command);
-        } catch (JMSException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    public void onCommand(Object command) {
-        try {
-            if (trace) {
-                LOG.trace("Received: \n" + command);
-            }
-           
-            protocolConverter.onStompCommand((StompFrame)command);
-        } catch (IOException e) {
-            onException(e);
-        } catch (JMSException e) {
-            onException(IOExceptionSupport.create(e));
-        }
-    }
-
-    public void sendToActiveMQ(Command command) {
-        TransportListener l = transportListener;
-        if (l!=null) {
-            l.onCommand(command);
-        }
-    }
-
-    public void sendToStomp(StompFrame command) throws IOException {
-        if (trace) {
-            LOG.trace("Sending: \n" + command);
-        }
-        Transport n = next;
-        if (n!=null) {
-            n.oneway(command);
-        }
-    }
-
-    public FrameTranslator getFrameTranslator() {
-        return frameTranslator;
-    }
-
-    public X509Certificate[] getPeerCertificates() {
-    	if(next instanceof SslTransport) {    	
-    		X509Certificate[] peerCerts = ((SslTransport)next).getPeerCertificates();
-    		if (trace && peerCerts != null) {
-                LOG.debug("Peer Identity has been verified\n");
-            }
-    		return peerCerts;
-    	}
-    	return null;
-    }
-    
-    public boolean isTrace() {
-        return trace;
-    }
-
-    public void setTrace(boolean trace) {
-        this.trace = trace;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java
deleted file mode 100644
index 4955507..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompWireFormat.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Implements marshalling and unmarsalling the <a
- * href="http://stomp.codehaus.org/">Stomp</a> protocol.
- */
-public class StompWireFormat implements WireFormat {
-
-    private static final byte[] NO_DATA = new byte[] {};
-    private static final byte[] END_OF_FRAME = new byte[] {0, '\n'};
-
-    private static final int MAX_COMMAND_LENGTH = 1024;
-    private static final int MAX_HEADER_LENGTH = 1024 * 10;
-    private static final int MAX_HEADERS = 1000;
-    private static final int MAX_DATA_LENGTH = 1024 * 1024 * 100;
-
-    private int version = 1;
-
-    public ByteSequence marshal(Object command) throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream dos = new DataOutputStream(baos);
-        marshal(command, dos);
-        dos.close();
-        return baos.toByteSequence();
-    }
-
-    public Object unmarshal(ByteSequence packet) throws IOException {
-        ByteArrayInputStream stream = new ByteArrayInputStream(packet);
-        DataInputStream dis = new DataInputStream(stream);
-        return unmarshal(dis);
-    }
-
-    public void marshal(Object command, DataOutput os) throws IOException {
-        StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command;
-
-        StringBuffer buffer = new StringBuffer();
-        buffer.append(stomp.getAction());
-        buffer.append(Stomp.NEWLINE);
-
-        // Output the headers.
-        for (Iterator iter = stomp.getHeaders().entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            buffer.append(entry.getKey());
-            buffer.append(Stomp.Headers.SEPERATOR);
-            buffer.append(entry.getValue());
-            buffer.append(Stomp.NEWLINE);
-        }
-
-        // Add a newline to seperate the headers from the content.
-        buffer.append(Stomp.NEWLINE);
-
-        os.write(buffer.toString().getBytes("UTF-8"));
-        os.write(stomp.getContent());
-        os.write(END_OF_FRAME);
-    }
-
-    public Object unmarshal(DataInput in) throws IOException {
-
-        try {
-            
-            // parse action
-            String action = parseAction(in);
-
-            // Parse the headers
-            HashMap<String, String> headers = parseHeaders(in);
-
-            // Read in the data part.
-            byte[] data = NO_DATA;
-            String contentLength = headers.get(Stomp.Headers.CONTENT_LENGTH);
-            if (contentLength != null) {
-
-                // Bless the client, he's telling us how much data to read in.
-                int length = parseContentLength(contentLength);
-
-                data = new byte[length];
-                in.readFully(data);
-
-                if (in.readByte() != 0) {
-                    throw new ProtocolException(Stomp.Headers.CONTENT_LENGTH + " bytes were read and " + "there was no trailing null byte", true);
-                }
-
-            } else {
-
-                // We don't know how much to read.. data ends when we hit a 0
-                byte b;
-                ByteArrayOutputStream baos = null;
-                while ((b = in.readByte()) != 0) {
-
-                    if (baos == null) {
-                        baos = new ByteArrayOutputStream();
-                    } else if (baos.size() > MAX_DATA_LENGTH) {
-                        throw new ProtocolException("The maximum data length was exceeded", true);
-                    }
-
-                    baos.write(b);
-                }
-
-                if (baos != null) {
-                    baos.close();
-                    data = baos.toByteArray();
-                }
-
-            }
-
-            return new StompFrame(action, headers, data);
-
-        } catch (ProtocolException e) {
-            return new StompFrameError(e);
-        }
-
-    }
-
-    private String readLine(DataInput in, int maxLength, String errorMessage) throws IOException {
-        byte b;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream(maxLength);
-        while ((b = in.readByte()) != '\n') {
-            if (baos.size() > maxLength) {
-                throw new ProtocolException(errorMessage, true);
-            }
-            baos.write(b);
-        }
-        baos.close();
-        ByteSequence sequence = baos.toByteSequence();
-        return new String(sequence.getData(), sequence.getOffset(), sequence.getLength(), "UTF-8");
-    }
-    
-    protected String parseAction(DataInput in) throws IOException {
-        String action = null;
-
-        // skip white space to next real action line
-        while (true) {
-            action = readLine(in, MAX_COMMAND_LENGTH, "The maximum command length was exceeded");
-            if (action == null) {
-                throw new IOException("connection was closed");
-            } else {
-                action = action.trim();
-                if (action.length() > 0) {
-                    break;
-                }
-            }
-        }
-        return action;
-    }
-    
-    protected HashMap<String, String> parseHeaders(DataInput in) throws IOException {
-        HashMap<String, String> headers = new HashMap<String, String>(25);
-        while (true) {
-            String line = readLine(in, MAX_HEADER_LENGTH, "The maximum header length was exceeded");
-            if (line != null && line.trim().length() > 0) {
-
-                if (headers.size() > MAX_HEADERS) {
-                    throw new ProtocolException("The maximum number of headers was exceeded", true);
-                }
-
-                try {
-                    int seperatorIndex = line.indexOf(Stomp.Headers.SEPERATOR);
-                    String name = line.substring(0, seperatorIndex).trim();
-                    String value = line.substring(seperatorIndex + 1, line.length()).trim();
-                    headers.put(name, value);
-                } catch (Exception e) {
-                    throw new ProtocolException("Unable to parser header line [" + line + "]", true);
-                }
-            } else {
-                break;
-            }
-        }     
-        return headers;
-    }
-    
-    protected int parseContentLength(String contentLength) throws ProtocolException {
-        int length;
-        try {
-            length = Integer.parseInt(contentLength.trim());
-        } catch (NumberFormatException e) {
-            throw new ProtocolException("Specified content-length is not a valid integer", true);
-        }
-
-        if (length > MAX_DATA_LENGTH) {
-            throw new ProtocolException("The maximum data length was exceeded", true);
-        }
-        
-        return length;
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java
deleted file mode 100644
index 60fff93..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompWireFormatFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.wireformat.WireFormatFactory;
-
-/**
- * Creates WireFormat objects that marshalls the <a href="http://stomp.codehaus.org/">Stomp</a> protocol.
- */
-public class StompWireFormatFactory implements WireFormatFactory {
-    public WireFormat createWireFormat() {
-        return new StompWireFormat();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/package.html
deleted file mode 100644
index 39a94e7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-An implementation of the Stomp protocol which is a simple wire protocol for writing clients for ActiveMQ in different
-languages like Ruby, Python, PHP, C etc.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java
deleted file mode 100644
index f621059..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/ExceededMaximumConnectionsException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.transport.tcp;
-
-/**
- * Thrown to indicate that the {@link TcpTransportServer#maximumConnections} 
- * property has been exceeded. 
- * 
- * @see {@link TcpTransportServer#maximumConnections}
- * @author bsnyder
- *
- */
-public class ExceededMaximumConnectionsException extends Exception {
-
-    /**
-     * Default serial version id for serialization
-     */
-    private static final long serialVersionUID = -1166885550766355524L;
-
-    public ExceededMaximumConnectionsException(String message) {
-        super(message);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/QualityOfServiceUtils.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/QualityOfServiceUtils.java
deleted file mode 100644
index 5ce83bb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/QualityOfServiceUtils.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.net.Socket;
-import java.net.SocketException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Utilities for determining the values for the bits in the headers of the
- * outgoing TCP/IP packets that indicate Traffic Class for use in Quality of
- * Service forwarding policies.
- */
-public class QualityOfServiceUtils {
-
-    private static final int MAX_DIFF_SERV = 63;
-    private static final int MIN_DIFF_SERV = 0;
-    private static final Map<String, Integer> DIFF_SERV_NAMES
-        = new HashMap<String, Integer>();
-    /** Common names used for Differentiated Services values. */
-    static {
-        
-        DIFF_SERV_NAMES.put("CS0", 0);
-        DIFF_SERV_NAMES.put("CS1", 8);
-        DIFF_SERV_NAMES.put("CS2", 16);
-        DIFF_SERV_NAMES.put("CS3", 24);
-        DIFF_SERV_NAMES.put("CS4", 32);
-        DIFF_SERV_NAMES.put("CS5", 40);
-        DIFF_SERV_NAMES.put("CS6", 48);
-        DIFF_SERV_NAMES.put("CS7", 56);
-        DIFF_SERV_NAMES.put("AF11", 10);
-        DIFF_SERV_NAMES.put("AF12", 12);
-        DIFF_SERV_NAMES.put("AF13", 14);
-        DIFF_SERV_NAMES.put("AF21", 18);
-        DIFF_SERV_NAMES.put("AF22", 20);
-        DIFF_SERV_NAMES.put("AF23", 22);
-        DIFF_SERV_NAMES.put("AF31", 26);
-        DIFF_SERV_NAMES.put("AF32", 28);
-        DIFF_SERV_NAMES.put("AF33", 30);
-        DIFF_SERV_NAMES.put("AF41", 34);
-        DIFF_SERV_NAMES.put("AF42", 36);
-        DIFF_SERV_NAMES.put("AF43", 38);
-        DIFF_SERV_NAMES.put("EF", 46);
-    }
-
-    private static final int MAX_TOS = 255;
-    private static final int MIN_TOS = 0;
-
-    /**
-     * @param value A potential value to be used for Differentiated Services.
-     * @return The corresponding Differentiated Services Code Point (DSCP).
-     * @throws IllegalArgumentException if the value does not correspond to a
-     *         Differentiated Services Code Point or setting the DSCP is not
-     *         supported.
-     */
-    public static int getDSCP(String value) throws IllegalArgumentException {
-        int intValue = -1;
-
-        // Check the names first.
-        if (DIFF_SERV_NAMES.containsKey(value)) {
-            intValue = DIFF_SERV_NAMES.get(value);
-        } else {
-            try {
-                intValue = Integer.parseInt(value);
-                if (intValue > MAX_DIFF_SERV || intValue < MIN_DIFF_SERV) {
-                    throw new IllegalArgumentException("Differentiated Services"
-                        + " value: " + intValue + " not in legal range ["
-                        + MIN_DIFF_SERV + ", " + MAX_DIFF_SERV + "].");
-                }
-            } catch (NumberFormatException e) {
-                // value must have been a malformed name.
-                throw new IllegalArgumentException("No such Differentiated "
-                    + "Services name: " + value);
-            }
-        }
-
-        return adjustDSCPForECN(intValue);
-     }
-
-
-    /**
-     * @param value A potential value to be used for Type of Service.
-     * @return A valid value that can be used to set the Type of Service in the
-     *         packet headers.
-     * @throws IllegalArgumentException if the value is not a legal Type of
-     *         Service value.
-     */
-    public static int getToS(int value) throws IllegalArgumentException {
-        if (value > MAX_TOS || value < MIN_TOS) {
-            throw new IllegalArgumentException("Type of Service value: "
-                + value + " not in legal range [" + MIN_TOS + ", " + MAX_TOS
-                + ".");
-        }
-        return value;
-    }
-
-    /**
-     * The Differentiated Services values use only 6 of the 8 bits in the field
-     * in the TCP/IP packet header. Make sure any values the system has set for
-     * the other two bits (the ECN bits) are maintained.
-     *
-     * @param dscp The Differentiated Services Code Point.
-     * @return A Differentiated Services Code Point that respects the ECN bits
-     *         set on the system.
-     * @throws IllegalArgumentException if setting Differentiated Services is
-     *         not supported.
-     */
-    private static int adjustDSCPForECN(int dscp)
-            throws IllegalArgumentException {
-        // The only way to see if there are any values set for the ECN is to
-        // read the traffic class automatically set by the system and isolate
-        // the ECN bits.
-        Socket socket = new Socket();
-        try {
-            int systemTrafficClass = socket.getTrafficClass();
-            // The 1st and 2nd bits of the system traffic class are the ECN
-            // bits.
-            return (dscp << 2) | (systemTrafficClass & 3);
-        } catch (SocketException e) {
-            throw new IllegalArgumentException("Setting Differentiated Services"
-                + " not supported: " + e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java
deleted file mode 100755
index 6418a68..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/ResponseHolder.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import org.apache.activemq.command.Response;
-
-/**
- * ResponseHolder utility
- * 
- * 
- */
-public class ResponseHolder {
-    protected Response response;
-    protected Object lock = new Object();
-    protected boolean notified;
-
-    /**
-     * Construct a receipt holder
-     */
-    public ResponseHolder() {
-    }
-
-    /**
-     * Set the Response for this holder
-     * 
-     * @param r
-     */
-    public void setResponse(Response r) {
-        synchronized (lock) {
-            this.response = r;
-            notified = true;
-            lock.notify();
-        }
-    }
-
-    /**
-     * Get the Response
-     * 
-     * @return the Response or null if it is closed
-     */
-    public Response getResponse() {
-        return getResponse(0);
-    }
-
-    /**
-     * wait upto <Code>timeout</Code> timeout ms to get a receipt
-     * 
-     * @param timeout
-     * @return
-     */
-    public Response getResponse(int timeout) {
-        synchronized (lock) {
-            if (!notified) {
-                try {
-                    lock.wait(timeout);
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            }
-        }
-        return this.response;
-    }
-
-    /**
-     * close this holder
-     */
-    public void close() {
-        synchronized (lock) {
-            notified = true;
-            lock.notifyAll();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java
deleted file mode 100644
index f10bba2..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.security.cert.X509Certificate;
-
-import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
-
-import org.apache.activemq.command.ConnectionInfo;
-
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * A Transport class that uses SSL and client-side certificate authentication.
- * Client-side certificate authentication must be enabled through the
- * constructor. By default, this class will have the same client authentication
- * behavior as the socket it is passed. This class will set ConnectionInfo's
- * transportContext to the SSL certificates of the client. NOTE: Accessor method
- * for needClientAuth was not provided on purpose. This is because
- * needClientAuth's value must be set before the socket is connected. Otherwise,
- * unexpected situations may occur.
- */
-public class SslTransport extends TcpTransport {
-    /**
-     * Connect to a remote node such as a Broker.
-     * 
-     * @param wireFormat The WireFormat to be used.
-     * @param socketFactory The socket factory to be used. Forcing SSLSockets
-     *                for obvious reasons.
-     * @param remoteLocation The remote location.
-     * @param localLocation The local location.
-     * @param needClientAuth If set to true, the underlying socket will need
-     *                client certificate authentication.
-     * @throws UnknownHostException If TcpTransport throws.
-     * @throws IOException If TcpTransport throws.
-     */
-    public SslTransport(WireFormat wireFormat, SSLSocketFactory socketFactory, URI remoteLocation, URI localLocation, boolean needClientAuth) throws IOException {
-        super(wireFormat, socketFactory, remoteLocation, localLocation);
-        if (this.socket != null) {
-            ((SSLSocket)this.socket).setNeedClientAuth(needClientAuth);
-        }
-    }
-
-    /**
-     * Initialize from a ServerSocket. No access to needClientAuth is given
-     * since it is already set within the provided socket.
-     * 
-     * @param wireFormat The WireFormat to be used.
-     * @param socket The Socket to be used. Forcing SSL.
-     * @throws IOException If TcpTransport throws.
-     */
-    public SslTransport(WireFormat wireFormat, SSLSocket socket) throws IOException {
-        super(wireFormat, socket);
-    }
-
-    /**
-     * Overriding in order to add the client's certificates to ConnectionInfo
-     * Commmands.
-     * 
-     * @param command The Command coming in.
-     */
-    public void doConsume(Object command) {
-        // The instanceof can be avoided, but that would require modifying the
-        // Command clas tree and that would require too much effort right
-        // now.
-        if (command instanceof ConnectionInfo) {
-            ConnectionInfo connectionInfo = (ConnectionInfo)command;
-            connectionInfo.setTransportContext(getPeerCertificates());
-        } 
-        super.doConsume(command);
-    }
-    
-    /**
-     * @return peer certificate chain associated with the ssl socket
-     */
-    public X509Certificate[] getPeerCertificates() {
-    	
-        SSLSocket sslSocket = (SSLSocket)this.socket;
-
-        SSLSession sslSession = sslSocket.getSession();
-
-        X509Certificate[] clientCertChain;
-        try {
-            clientCertChain = (X509Certificate[])sslSession.getPeerCertificates();
-        } catch (SSLPeerUnverifiedException e) {
-        	clientCertChain = null;
-        }
-    	
-        return clientCertChain;
-    }
-
-    /**
-     * @return pretty print of 'this'
-     */
-    public String toString() {
-        return "ssl://" + socket.getInetAddress() + ":" + socket.getPort();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
deleted file mode 100644
index b69144d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.SecureRandom;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLServerSocketFactory;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManager;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerServiceAware;
-import org.apache.activemq.broker.SslContext;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.InactivityMonitor;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportLoggerFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.WireFormatNegotiator;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An implementation of the TcpTransportFactory using SSL. The major
- * contribution from this class is that it is aware of SslTransportServer and
- * SslTransport classes. All Transports and TransportServers created from this
- * factory will have their needClientAuth option set to false.
- * 
- * @author sepandm@gmail.com (Sepand)
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- * 
- */
-public class SslTransportFactory extends TcpTransportFactory {
-    // The log this uses.,
-    private static final Logger LOG = LoggerFactory.getLogger(SslTransportFactory.class);
-    
-    /**
-     * Overriding to use SslTransportServer and allow for proper reflection.
-     */
-    public TransportServer doBind(final URI location) throws IOException {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-
-            ServerSocketFactory serverSocketFactory = createServerSocketFactory();
-            SslTransportServer server = new SslTransportServer(this, location, (SSLServerSocketFactory)serverSocketFactory);
-            server.setWireFormatFactory(createWireFormatFactory(options));
-            IntrospectionSupport.setProperties(server, options);
-            Map<String, Object> transportOptions = IntrospectionSupport.extractProperties(options, "transport.");
-            server.setTransportOption(transportOptions);
-            server.bind();
-
-            return server;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    /**
-     * Overriding to allow for proper configuration through reflection.
-     */
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-
-        SslTransport sslTransport = (SslTransport)transport.narrow(SslTransport.class);
-        IntrospectionSupport.setProperties(sslTransport, options);
-
-        Map<String, Object> socketOptions = IntrospectionSupport.extractProperties(options, "socket.");
-
-        sslTransport.setSocketOptions(socketOptions);
-
-        if (sslTransport.isTrace()) {
-            try {
-                transport = TransportLoggerFactory.getInstance().createTransportLogger(transport,
-                        sslTransport.getLogWriterName(), sslTransport.isDynamicManagement(), sslTransport.isStartLogging(), sslTransport.getJmxPort());
-            } catch (Throwable e) {
-                LOG.error("Could not create TransportLogger object for: " + sslTransport.getLogWriterName() + ", reason: " + e, e);
-            }
-        }
-
-        transport = new InactivityMonitor(transport, format);
-
-        // Only need the WireFormatNegotiator if using openwire
-        if (format instanceof OpenWireFormat) {
-            transport = new WireFormatNegotiator(transport, (OpenWireFormat)format, sslTransport.getMinmumWireFormatVersion());
-        }
-
-        return transport;
-    }
-
-    /**
-     * Overriding to use SslTransports.
-     */
-    protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException {
-        URI localLocation = null;
-        String path = location.getPath();
-        // see if the path is a local URI location
-        if (path != null && path.length() > 0) {
-            int localPortIndex = path.indexOf(':');
-            try {
-                Integer.parseInt(path.substring(localPortIndex + 1, path.length()));
-                String localString = location.getScheme() + ":/" + path;
-                localLocation = new URI(localString);
-            } catch (Exception e) {
-                LOG.warn("path isn't a valid local location for SslTransport to use", e);
-            }
-        }
-        SocketFactory socketFactory = createSocketFactory();
-        return new SslTransport(wf, (SSLSocketFactory)socketFactory, location, localLocation, false);
-    }
-
-
-
-    /**
-     * Creates a new SSL ServerSocketFactory. The given factory will use
-     * user-provided key and trust managers (if the user provided them).
-     * 
-     * @return Newly created (Ssl)ServerSocketFactory.
-     * @throws IOException 
-     */
-    protected ServerSocketFactory createServerSocketFactory() throws IOException {
-        if( SslContext.getCurrentSslContext()!=null ) {
-            SslContext ctx = SslContext.getCurrentSslContext();
-            try {
-                return ctx.getSSLContext().getServerSocketFactory();
-            } catch (Exception e) {
-                throw IOExceptionSupport.create(e);
-            }
-        } else {
-            return SSLServerSocketFactory.getDefault();
-        }
-    }
-
-    /**
-     * Creates a new SSL SocketFactory. The given factory will use user-provided
-     * key and trust managers (if the user provided them).
-     * 
-     * @return Newly created (Ssl)SocketFactory.
-     * @throws IOException 
-     */
-    protected SocketFactory createSocketFactory() throws IOException {
-        
-        if( SslContext.getCurrentSslContext()!=null ) {
-            SslContext ctx = SslContext.getCurrentSslContext();
-            try {
-                return ctx.getSSLContext().getSocketFactory();
-            } catch (Exception e) {
-                throw IOExceptionSupport.create(e);
-            }
-        } else {
-            return SSLSocketFactory.getDefault();
-        }
-        
-    }
-
-    /**
-     * 
-     * @param km
-     * @param tm
-     * @param random
-     * @deprecated "Do not use anymore... using static initializers like this method only allows the JVM to use 1 SSL configuration per broker."
-     * @see org.apache.activemq.broker.SslContext#setCurrentSslContext(SslContext)
-     * @see org.apache.activemq.broker.SslContext#getSSLContext()
-     */
-    public void setKeyAndTrustManagers(KeyManager[] km, TrustManager[] tm, SecureRandom random) {
-        SslContext ctx = new SslContext(km, tm, random);
-        SslContext.setCurrentSslContext(ctx);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportServer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportServer.java
deleted file mode 100644
index 6f1fb43..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportServer.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.net.ssl.SSLServerSocket;
-import javax.net.ssl.SSLServerSocketFactory;
-import javax.net.ssl.SSLSocket;
-
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- *  An SSL TransportServer.
- * 
- *  Allows for client certificate authentication (refer to setNeedClientAuth for
- *      details).
- *  NOTE: Client certificate authentication is disabled by default. 
- *
- */
-public class SslTransportServer extends TcpTransportServer {
-    
-    // Specifies if sockets created from this server should needClientAuth.
-    private boolean needClientAuth;
-    
-    // Specifies if sockets created from this server should wantClientAuth.
-    private boolean wantClientAuth;
-    
-    
-    /**
-     * Creates a ssl transport server for the specified url using the provided
-     * serverSocketFactory
-     * 
-     * @param transportFactory The factory used to create transports when connections arrive.
-     * @param location The location of the broker to bind to.
-     * @param serverSocketFactory The factory used to create this server.
-     * @throws IOException passed up from TcpTransportFactory.
-     * @throws URISyntaxException passed up from TcpTransportFactory.
-     */
-    public SslTransportServer(
-            SslTransportFactory transportFactory,
-            URI location,
-            SSLServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-        super(transportFactory, location, serverSocketFactory);
-    }
-    
-    /**
-     * Sets whether client authentication should be required
-     * Must be called before {@link #bind()}
-     * Note: Calling this method clears the wantClientAuth flag
-     * in the underlying implementation.
-     */
-    public void setNeedClientAuth(boolean needAuth) {
-        this.needClientAuth = needAuth;
-    }
-    
-    /**
-     * Returns whether client authentication should be required.
-     */
-    public boolean getNeedClientAuth() {
-        return this.needClientAuth;
-    }
-    
-    /**
-     * Returns whether client authentication should be requested.
-     */
-    public boolean getWantClientAuth() {
-        return this.wantClientAuth;
-    }
-    
-    /**
-     * Sets whether client authentication should be requested.
-     * Must be called before {@link #bind()}
-     * Note: Calling this method clears the needClientAuth flag
-     * in the underlying implementation.
-     */
-    public void setWantClientAuth(boolean wantAuth) {
-        this.wantClientAuth = wantAuth;
-    }
-    
-    /**
-     * Binds this socket to the previously specified URI.
-     * 
-     * Overridden to allow for proper handling of needClientAuth.
-     * 
-     * @throws IOException passed up from TcpTransportServer. 
-     */
-    public void bind() throws IOException {
-        super.bind();
-        if (needClientAuth) {
-            ((SSLServerSocket)this.serverSocket).setNeedClientAuth(true);
-        } else if (wantClientAuth) {
-            ((SSLServerSocket)this.serverSocket).setWantClientAuth(true);
-        }
-    }
-    
-    /**
-     * Used to create Transports for this server.
-     * 
-     * Overridden to allow the use of SslTransports (instead of TcpTransports).
-     * 
-     * @param socket The incoming socket that will be wrapped into the new Transport. 
-     * @param format The WireFormat being used.
-     * @return The newly return (SSL) Transport.
-     * @throws IOException
-     */
-    protected Transport createTransport(Socket socket, WireFormat format) throws IOException {
-        return new SslTransport(format, (SSLSocket)socket);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpBufferedInputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpBufferedInputStream.java
deleted file mode 100755
index bdb817d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpBufferedInputStream.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * An optimized buffered input stream for Tcp
- * 
- * 
- */
-public class TcpBufferedInputStream extends FilterInputStream {
-    private static final int DEFAULT_BUFFER_SIZE = 8192;
-    protected byte internalBuffer[];
-    protected int count;
-    protected int position;
-
-    public TcpBufferedInputStream(InputStream in) {
-        this(in, DEFAULT_BUFFER_SIZE);
-    }
-
-    public TcpBufferedInputStream(InputStream in, int size) {
-        super(in);
-        if (size <= 0) {
-            throw new IllegalArgumentException("Buffer size <= 0");
-        }
-        internalBuffer = new byte[size];
-    }
-
-    protected void fill() throws IOException {
-        byte[] buffer = internalBuffer;
-        count = 0;
-        position = 0;
-        int n = in.read(buffer, position, buffer.length - position);
-        if (n > 0) {
-            count = n + position;
-        }
-    }
-
-    public int read() throws IOException {
-        if (position >= count) {
-            fill();
-            if (position >= count) {
-                return -1;
-            }
-        }
-        return internalBuffer[position++] & 0xff;
-    }
-
-    private int readStream(byte[] b, int off, int len) throws IOException {
-        int avail = count - position;
-        if (avail <= 0) {
-            if (len >= internalBuffer.length) {
-                return in.read(b, off, len);
-            }
-            fill();
-            avail = count - position;
-            if (avail <= 0) {
-                return -1;
-            }
-        }
-        int cnt = (avail < len) ? avail : len;
-        System.arraycopy(internalBuffer, position, b, off, cnt);
-        position += cnt;
-        return cnt;
-    }
-
-    public int read(byte b[], int off, int len) throws IOException {
-        if ((off | len | (off + len) | (b.length - (off + len))) < 0) {
-            throw new IndexOutOfBoundsException();
-        } else if (len == 0) {
-            return 0;
-        }
-        int n = 0;
-        for (;;) {
-            int nread = readStream(b, off + n, len - n);
-            if (nread <= 0) {
-                return (n == 0) ? nread : n;
-            }
-            n += nread;
-            if (n >= len) {
-                return n;
-            }
-            // if not closed but no bytes available, return
-            InputStream input = in;
-            if (input != null && input.available() <= 0) {
-                return n;
-            }
-        }
-    }
-
-    public long skip(long n) throws IOException {
-        if (n <= 0) {
-            return 0;
-        }
-        long avail = count - position;
-        if (avail <= 0) {
-            return in.skip(n);
-        }
-        long skipped = (avail < n) ? avail : n;
-        position += skipped;
-        return skipped;
-    }
-
-    public int available() throws IOException {
-        return in.available() + (count - position);
-    }
-
-    public boolean markSupported() {
-        return false;
-    }
-
-    public void close() throws IOException {
-        if (in != null) {
-            in.close();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpBufferedOutputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpBufferedOutputStream.java
deleted file mode 100755
index 8346dd6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpBufferedOutputStream.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * An optimized buffered outputstream for Tcp
- * 
- * 
- */
-
-public class TcpBufferedOutputStream extends FilterOutputStream implements TimeStampStream {
-    private static final int BUFFER_SIZE = 8192;
-    private byte[] buffer;
-    private int bufferlen;
-    private int count;
-    private volatile long writeTimestamp = -1;//concurrent reads of this value
-    
-
-    /**
-     * Constructor
-     * 
-     * @param out
-     */
-    public TcpBufferedOutputStream(OutputStream out) {
-        this(out, BUFFER_SIZE);
-    }
-
-    /**
-     * Creates a new buffered output stream to write data to the specified
-     * underlying output stream with the specified buffer size.
-     * 
-     * @param out the underlying output stream.
-     * @param size the buffer size.
-     * @throws IllegalArgumentException if size <= 0.
-     */
-    public TcpBufferedOutputStream(OutputStream out, int size) {
-        super(out);
-        if (size <= 0) {
-            throw new IllegalArgumentException("Buffer size <= 0");
-        }
-        buffer = new byte[size];
-        bufferlen = size;
-    }
-
-    /**
-     * write a byte on to the stream
-     * 
-     * @param b - byte to write
-     * @throws IOException
-     */
-    public void write(int b) throws IOException {
-        if ((bufferlen - count) < 1) {
-            flush();
-        }
-        buffer[count++] = (byte)b;
-    }
-
-    /**
-     * write a byte array to the stream
-     * 
-     * @param b the byte buffer
-     * @param off the offset into the buffer
-     * @param len the length of data to write
-     * @throws IOException
-     */
-    public void write(byte b[], int off, int len) throws IOException {
-        if (b != null) {
-            if ((bufferlen - count) < len) {
-                flush();
-            }
-            if (buffer.length >= len) {
-                System.arraycopy(b, off, buffer, count, len);
-                count += len;
-            } else {
-                try {
-                    writeTimestamp = System.currentTimeMillis();
-                    out.write(b, off, len);
-                } finally {
-                    writeTimestamp = -1;
-                }
-            }
-        }
-    }
-
-    /**
-     * flush the data to the output stream This doesn't call flush on the
-     * underlying outputstream, because Tcp is particularly efficent at doing
-     * this itself ....
-     * 
-     * @throws IOException
-     */
-    public void flush() throws IOException {
-        if (count > 0 && out != null) {
-            try {
-                writeTimestamp = System.currentTimeMillis();
-                out.write(buffer, 0, count);
-            } finally {
-            	writeTimestamp = -1;
-            }
-            count = 0;
-        }
-    }
-
-    /**
-     * close this stream
-     * 
-     * @throws IOException
-     */
-    public void close() throws IOException {
-        super.close();
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.activemq.transport.tcp.TimeStampStream#isWriting()
-     */
-    public boolean isWriting() {
-        return writeTimestamp > 0;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.activemq.transport.tcp.TimeStampStream#getWriteTimestamp()
-     */
-    public long getWriteTimestamp() {
-    	return writeTimestamp;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
deleted file mode 100755
index 661b705..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-import javax.net.SocketFactory;
-import org.apache.activemq.Service;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportLoggerFactory;
-import org.apache.activemq.transport.TransportThreadSupport;
-import org.apache.activemq.util.InetAddressUtil;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An implementation of the {@link Transport} interface using raw tcp/ip
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- * 
- */
-public class TcpTransport extends TransportThreadSupport implements Transport, Service, Runnable {
-    private static final Logger LOG = LoggerFactory.getLogger(TcpTransport.class);
-    protected final URI remoteLocation;
-    protected final URI localLocation;
-    protected final WireFormat wireFormat;
-
-    protected int connectionTimeout = 30000;
-    protected int soTimeout;
-    protected int socketBufferSize = 64 * 1024;
-    protected int ioBufferSize = 8 * 1024;
-    protected boolean closeAsync=true;
-    protected Socket socket;
-    protected DataOutputStream dataOut;
-    protected DataInputStream dataIn;
-    protected TimeStampStream buffOut = null;
-    /**
-     * The Traffic Class to be set on the socket.
-     */
-    protected int trafficClass = 0;
-    /**
-     * Keeps track of attempts to set the Traffic Class on the socket.
-     */
-    private boolean trafficClassSet = false;
-    /**
-     * Prevents setting both the Differentiated Services and Type of Service
-     * transport options at the same time, since they share the same spot in
-     * the TCP/IP packet headers.
-     */
-    protected boolean diffServChosen = false;
-    protected boolean typeOfServiceChosen = false;
-    /**
-     * trace=true -> the Transport stack where this TcpTransport
-     * object will be, will have a TransportLogger layer
-     * trace=false -> the Transport stack where this TcpTransport
-     * object will be, will NOT have a TransportLogger layer, and therefore
-     * will never be able to print logging messages.
-     * This parameter is most probably set in Connection or TransportConnector URIs.
-     */
-    protected boolean trace = false;
-    /**
-     * Name of the LogWriter implementation to use.
-     * Names are mapped to classes in the resources/META-INF/services/org/apache/activemq/transport/logwriters directory.
-     * This parameter is most probably set in Connection or TransportConnector URIs.
-     */
-    protected String logWriterName = TransportLoggerFactory.defaultLogWriterName;
-    /**
-     * Specifies if the TransportLogger will be manageable by JMX or not.
-     * Also, as long as there is at least 1 TransportLogger which is manageable,
-     * a TransportLoggerControl MBean will me created.
-     */
-    protected boolean dynamicManagement = false;
-    /**
-     * startLogging=true -> the TransportLogger object of the Transport stack
-     * will initially write messages to the log.
-     * startLogging=false -> the TransportLogger object of the Transport stack
-     * will initially NOT write messages to the log.
-     * This parameter only has an effect if trace == true.
-     * This parameter is most probably set in Connection or TransportConnector URIs.
-     */
-    protected boolean startLogging = true;
-    /**
-     * Specifies the port that will be used by the JMX server to manage
-     * the TransportLoggers.
-     * This should only be set in an URI by a client (producer or consumer) since
-     * a broker will already create a JMX server.
-     * It is useful for people who test a broker and clients in the same machine
-     * and want to control both via JMX; a different port will be needed.
-     */
-    protected int jmxPort = 1099;
-    protected boolean useLocalHost = false;
-    protected int minmumWireFormatVersion;
-    protected SocketFactory socketFactory;
-    protected final AtomicReference<CountDownLatch> stoppedLatch = new AtomicReference<CountDownLatch>();
-
-    private Map<String, Object> socketOptions;
-    private Boolean keepAlive;
-    private Boolean tcpNoDelay;
-    private Thread runnerThread;
-    private volatile int receiveCounter;
-
-    /**
-     * Connect to a remote Node - e.g. a Broker
-     * 
-     * @param wireFormat
-     * @param socketFactory
-     * @param remoteLocation
-     * @param localLocation - e.g. local InetAddress and local port
-     * @throws IOException
-     * @throws UnknownHostException
-     */
-    public TcpTransport(WireFormat wireFormat, SocketFactory socketFactory, URI remoteLocation,
-                        URI localLocation) throws UnknownHostException, IOException {
-        this.wireFormat = wireFormat;
-        this.socketFactory = socketFactory;
-        try {
-            this.socket = socketFactory.createSocket();
-        } catch (SocketException e) {
-            this.socket = null;
-        }
-        this.remoteLocation = remoteLocation;
-        this.localLocation = localLocation;
-        setDaemon(false);
-    }
-
-    /**
-     * Initialize from a server Socket
-     * 
-     * @param wireFormat
-     * @param socket
-     * @throws IOException
-     */
-    public TcpTransport(WireFormat wireFormat, Socket socket) throws IOException {
-        this.wireFormat = wireFormat;
-        this.socket = socket;
-        this.remoteLocation = null;
-        this.localLocation = null;
-        setDaemon(true);
-    }
-
-    /**
-     * A one way asynchronous send
-     */
-    public void oneway(Object command) throws IOException {
-        checkStarted();
-        wireFormat.marshal(command, dataOut);
-        dataOut.flush();
-    }
-
-    /**
-     * @return pretty print of 'this'
-     */
-    @Override
-    public String toString() {
-        return "" + (socket.isConnected() ? "tcp://" + socket.getInetAddress() + ":" + socket.getPort()
-                : (localLocation != null ? localLocation : remoteLocation)) ;
-    }
-
-    /**
-     * reads packets from a Socket
-     */
-    public void run() {
-        LOG.trace("TCP consumer thread for " + this + " starting");
-        this.runnerThread=Thread.currentThread();
-        try {
-            while (!isStopped()) {
-                doRun();
-            }
-        } catch (IOException e) {
-            stoppedLatch.get().countDown();
-            onException(e);
-        } catch (Throwable e){
-            stoppedLatch.get().countDown();
-            IOException ioe=new IOException("Unexpected error occured");
-            ioe.initCause(e);
-            onException(ioe);
-        }finally {
-            stoppedLatch.get().countDown();
-        }
-    }
-
-    protected void doRun() throws IOException {
-        try {
-            Object command = readCommand();
-            doConsume(command);
-        } catch (SocketTimeoutException e) {
-        } catch (InterruptedIOException e) {
-        }
-    }
-
-    protected Object readCommand() throws IOException {
-        return wireFormat.unmarshal(dataIn);
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public String getDiffServ() {
-        // This is the value requested by the user by setting the Tcp Transport
-        // options. If the socket hasn't been created, then this value may not
-        // reflect the value returned by Socket.getTrafficClass().
-        return Integer.toString(this.trafficClass);
-    }
-
-    public void setDiffServ(String diffServ) throws IllegalArgumentException {
-        this.trafficClass = QualityOfServiceUtils.getDSCP(diffServ);
-        this.diffServChosen = true;
-    }
-
-    public int getTypeOfService() {
-        // This is the value requested by the user by setting the Tcp Transport
-        // options. If the socket hasn't been created, then this value may not
-        // reflect the value returned by Socket.getTrafficClass().
-        return this.trafficClass;
-    }
-  
-    public void setTypeOfService(int typeOfService) {
-        this.trafficClass = QualityOfServiceUtils.getToS(typeOfService);
-        this.typeOfServiceChosen = true;
-    }
-
-    public boolean isTrace() {
-        return trace;
-    }
-
-    public void setTrace(boolean trace) {
-        this.trace = trace;
-    }
-    
-    public String getLogWriterName() {
-        return logWriterName;
-    }
-
-    public void setLogWriterName(String logFormat) {
-        this.logWriterName = logFormat;
-    }
-
-    public boolean isDynamicManagement() {
-        return dynamicManagement;
-    }
-
-    public void setDynamicManagement(boolean useJmx) {
-        this.dynamicManagement = useJmx;
-    }
-
-    public boolean isStartLogging() {
-        return startLogging;
-    }
-
-    public void setStartLogging(boolean startLogging) {
-        this.startLogging = startLogging;
-    }
-
-    public int getJmxPort() {
-        return jmxPort;
-    }
-
-    public void setJmxPort(int jmxPort) {
-        this.jmxPort = jmxPort;
-    }
-    
-    public int getMinmumWireFormatVersion() {
-        return minmumWireFormatVersion;
-    }
-
-    public void setMinmumWireFormatVersion(int minmumWireFormatVersion) {
-        this.minmumWireFormatVersion = minmumWireFormatVersion;
-    }
-
-    public boolean isUseLocalHost() {
-        return useLocalHost;
-    }
-
-    /**
-     * Sets whether 'localhost' or the actual local host name should be used to
-     * make local connections. On some operating systems such as Macs its not
-     * possible to connect as the local host name so localhost is better.
-     */
-    public void setUseLocalHost(boolean useLocalHost) {
-        this.useLocalHost = useLocalHost;
-    }
-
-    public int getSocketBufferSize() {
-        return socketBufferSize;
-    }
-
-    /**
-     * Sets the buffer size to use on the socket
-     */
-    public void setSocketBufferSize(int socketBufferSize) {
-        this.socketBufferSize = socketBufferSize;
-    }
-
-    public int getSoTimeout() {
-        return soTimeout;
-    }
-
-    /**
-     * Sets the socket timeout
-     */
-    public void setSoTimeout(int soTimeout) {
-        this.soTimeout = soTimeout;
-    }
-
-    public int getConnectionTimeout() {
-        return connectionTimeout;
-    }
-
-    /**
-     * Sets the timeout used to connect to the socket
-     */
-    public void setConnectionTimeout(int connectionTimeout) {
-        this.connectionTimeout = connectionTimeout;
-    }
-
-    public Boolean getKeepAlive() {
-        return keepAlive;
-    }
-
-    /**
-     * Enable/disable TCP KEEP_ALIVE mode
-     */
-    public void setKeepAlive(Boolean keepAlive) {
-        this.keepAlive = keepAlive;
-    }
-
-    public Boolean getTcpNoDelay() {
-        return tcpNoDelay;
-    }
-
-    /**
-     * Enable/disable the TCP_NODELAY option on the socket
-     */
-    public void setTcpNoDelay(Boolean tcpNoDelay) {
-        this.tcpNoDelay = tcpNoDelay;
-    }
-
-    /**
-     * @return the ioBufferSize
-     */
-    public int getIoBufferSize() {
-        return this.ioBufferSize;
-    }
-
-    /**
-     * @param ioBufferSize the ioBufferSize to set
-     */
-    public void setIoBufferSize(int ioBufferSize) {
-        this.ioBufferSize = ioBufferSize;
-    }
-    
-    /**
-     * @return the closeAsync
-     */
-    public boolean isCloseAsync() {
-        return closeAsync;
-    }
-
-    /**
-     * @param closeAsync the closeAsync to set
-     */
-    public void setCloseAsync(boolean closeAsync) {
-        this.closeAsync = closeAsync;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected String resolveHostName(String host) throws UnknownHostException {
-        if (isUseLocalHost()) {
-            String localName = InetAddressUtil.getLocalHostName();
-            if (localName != null && localName.equals(host)) {
-                return "localhost";
-            }
-        }
-        return host;
-    }
-
-    /**
-     * Configures the socket for use
-     * 
-     * @param sock
-     * @throws SocketException, IllegalArgumentException if setting the options
-     *         on the socket failed.
-     */
-    protected void initialiseSocket(Socket sock) throws SocketException,
-            IllegalArgumentException {
-        if (socketOptions != null) {
-            IntrospectionSupport.setProperties(socket, socketOptions);
-        }
-
-        try {
-            sock.setReceiveBufferSize(socketBufferSize);
-            sock.setSendBufferSize(socketBufferSize);
-        } catch (SocketException se) {
-            LOG.warn("Cannot set socket buffer size = " + socketBufferSize);
-            LOG.debug("Cannot set socket buffer size. Reason: " + se, se);
-        }
-        sock.setSoTimeout(soTimeout);
-
-        if (keepAlive != null) {
-            sock.setKeepAlive(keepAlive.booleanValue());
-        }
-        if (tcpNoDelay != null) {
-            sock.setTcpNoDelay(tcpNoDelay.booleanValue());
-        }
-        if (!this.trafficClassSet) {
-            this.trafficClassSet = setTrafficClass(sock);
-        }
-    }
-
-    @Override
-    protected void doStart() throws Exception {
-        connect();
-        stoppedLatch.set(new CountDownLatch(1));
-        super.doStart();
-    }
-
-    protected void connect() throws Exception {
-
-        if (socket == null && socketFactory == null) {
-            throw new IllegalStateException("Cannot connect if the socket or socketFactory have not been set");
-        }
-
-        InetSocketAddress localAddress = null;
-        InetSocketAddress remoteAddress = null;
-
-        if (localLocation != null) {
-            localAddress = new InetSocketAddress(InetAddress.getByName(localLocation.getHost()),
-                                                 localLocation.getPort());
-        }
-
-        if (remoteLocation != null) {
-            String host = resolveHostName(remoteLocation.getHost());
-            remoteAddress = new InetSocketAddress(host, remoteLocation.getPort());
-        }
-        // Set the traffic class before the socket is connected when possible so
-        // that the connection packets are given the correct traffic class.
-        this.trafficClassSet = setTrafficClass(socket);
-
-        if (socket != null) {
-
-            if (localAddress != null) {
-                socket.bind(localAddress);
-            }
-
-            // If it's a server accepted socket.. we don't need to connect it
-            // to a remote address.
-            if (remoteAddress != null) {
-                if (connectionTimeout >= 0) {
-                    socket.connect(remoteAddress, connectionTimeout);
-                } else {
-                    socket.connect(remoteAddress);
-                }
-            }
-
-        } else {
-            // For SSL sockets.. you can't create an unconnected socket :(
-            // This means the timout option are not supported either.
-            if (localAddress != null) {
-                socket = socketFactory.createSocket(remoteAddress.getAddress(), remoteAddress.getPort(),
-                                                    localAddress.getAddress(), localAddress.getPort());
-            } else {
-                socket = socketFactory.createSocket(remoteAddress.getAddress(), remoteAddress.getPort());
-            }
-        }
-
-        initialiseSocket(socket);
-        initializeStreams();
-    }
-
-    @Override
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Stopping transport " + this);
-        }
-
-        // Closing the streams flush the sockets before closing.. if the socket
-        // is hung.. then this hangs the close.
-        // closeStreams();
-        if (socket != null) {
-            if (closeAsync) {
-                //closing the socket can hang also 
-                final CountDownLatch latch = new CountDownLatch(1);
-                
-                DefaultThreadPools.getDefaultTaskRunnerFactory().execute(new Runnable() {
-    
-                    public void run() {
-                        try {
-                            socket.close();
-                        } catch (IOException e) {
-                            LOG.debug("Caught exception closing socket",e);
-                        }finally {
-                            latch.countDown();
-                        }
-                    }
-                    
-                });
-                latch.await(1,TimeUnit.SECONDS);
-            }else {
-                try {
-                    socket.close();
-                } catch (IOException e) {
-                    LOG.debug("Caught exception closing socket",e);
-                }
-            }
-           
-        }
-    }
-
-    /**
-     * Override so that stop() blocks until the run thread is no longer running.
-     */
-    @Override
-    public void stop() throws Exception {
-        super.stop();
-        CountDownLatch countDownLatch = stoppedLatch.get();
-        if (countDownLatch != null && Thread.currentThread() != this.runnerThread) {
-            countDownLatch.await(1,TimeUnit.SECONDS);
-        }
-    }
-
-    protected void initializeStreams() throws Exception {
-        TcpBufferedInputStream buffIn = new TcpBufferedInputStream(socket.getInputStream(), ioBufferSize) {
-            @Override
-            public int read() throws IOException {
-                receiveCounter++;
-                return super.read();
-            }
-            @Override
-            public int read(byte[] b, int off, int len) throws IOException {
-                receiveCounter++;
-                return super.read(b, off, len);
-            }
-            @Override
-            public long skip(long n) throws IOException {
-                receiveCounter++;
-                return super.skip(n);
-            }
-            @Override
-            protected void fill() throws IOException {
-                receiveCounter++;
-                super.fill();
-            }
-        };
-        this.dataIn = new DataInputStream(buffIn);
-        TcpBufferedOutputStream outputStream = new TcpBufferedOutputStream(socket.getOutputStream(), ioBufferSize);
-        this.dataOut = new DataOutputStream(outputStream);
-        this.buffOut = outputStream;
-    }
-
-    protected void closeStreams() throws IOException {
-        if (dataOut != null) {
-            dataOut.close();
-        }
-        if (dataIn != null) {
-            dataIn.close();
-        }
-    }
-
-    public void setSocketOptions(Map<String, Object> socketOptions) {
-        this.socketOptions = new HashMap<String, Object>(socketOptions);
-    }
-
-    public String getRemoteAddress() {
-        if (socket != null) {
-            return "" + socket.getRemoteSocketAddress();
-        }
-        return null;
-    }
-    
-    @Override
-    public <T> T narrow(Class<T> target) {
-        if (target == Socket.class) {
-            return target.cast(socket);
-        } else if ( target == TimeStampStream.class) {
-            return target.cast(buffOut);
-        }
-        return super.narrow(target);
-    }
-    
-    public int getReceiveCounter() {
-        return receiveCounter;
-    }
-    
-
-    /**
-     * @param sock The socket on which to set the Traffic Class.
-     * @return Whether or not the Traffic Class was set on the given socket.
-     * @throws SocketException if the system does not support setting the
-     *         Traffic Class.
-     * @throws IllegalArgumentException if both the Differentiated Services and
-     *         Type of Services transport options have been set on the same
-     *         connection.
-     */
-    private boolean setTrafficClass(Socket sock) throws SocketException,
-            IllegalArgumentException {
-        if (sock == null
-            || (!this.diffServChosen && !this.typeOfServiceChosen)) {
-            return false;
-        }
-        if (this.diffServChosen && this.typeOfServiceChosen) {
-            throw new IllegalArgumentException("Cannot set both the "
-                + " Differentiated Services and Type of Services transport "
-                + " options on the same connection.");
-        }
-
-        sock.setTrafficClass(this.trafficClass);
-
-        int resultTrafficClass = sock.getTrafficClass();
-        if (this.trafficClass != resultTrafficClass) {
-            // In the case where the user has specified the ECN bits (e.g. in
-            // Type of Service) but the system won't allow the ECN bits to be
-            // set or in the case where setting the traffic class failed for
-            // other reasons, emit a warning.
-            if ((this.trafficClass >> 2) == (resultTrafficClass >> 2)
-                    && (this.trafficClass & 3) != (resultTrafficClass & 3)) {
-                LOG.warn("Attempted to set the Traffic Class to "
-                    + this.trafficClass + " but the result Traffic Class was "
-                    + resultTrafficClass + ". Please check that your system "
-                    + "allows you to set the ECN bits (the first two bits).");
-            } else {
-                LOG.warn("Attempted to set the Traffic Class to "
-                    + this.trafficClass + " but the result Traffic Class was "
-                    + resultTrafficClass + ". Please check that your system "
-                         + "supports java.net.setTrafficClass.");
-            }
-            return false;
-        }
-        // Reset the guards that prevent both the Differentiated Services
-        // option and the Type of Service option from being set on the same
-        // connection.
-        this.diffServChosen = false;
-        this.typeOfServiceChosen = false;
-        return true;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
deleted file mode 100755
index dfc7f1d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.InactivityMonitor;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportLoggerFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.WireFormatNegotiator;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- *
- */
-public class TcpTransportFactory extends TransportFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(TcpTransportFactory.class);
-
-    public TransportServer doBind(final URI location) throws IOException {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-
-            ServerSocketFactory serverSocketFactory = createServerSocketFactory();
-            TcpTransportServer server = createTcpTransportServer(location, serverSocketFactory);
-            server.setWireFormatFactory(createWireFormatFactory(options));
-            IntrospectionSupport.setProperties(server, options);
-            Map<String, Object> transportOptions = IntrospectionSupport.extractProperties(options, "transport.");
-            server.setTransportOption(transportOptions);
-            server.bind();
-
-            return server;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    /**
-     * Allows subclasses of TcpTransportFactory to create custom instances of
-     * TcpTransportServer.
-     *
-     * @param location
-     * @param serverSocketFactory
-     * @return
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    protected TcpTransportServer createTcpTransportServer(final URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-        return new TcpTransportServer(this, location, serverSocketFactory);
-    }
-
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-
-        TcpTransport tcpTransport = (TcpTransport)transport.narrow(TcpTransport.class);
-        IntrospectionSupport.setProperties(tcpTransport, options);
-
-        Map<String, Object> socketOptions = IntrospectionSupport.extractProperties(options, "socket.");
-        tcpTransport.setSocketOptions(socketOptions);
-
-        if (tcpTransport.isTrace()) {
-            try {
-                transport = TransportLoggerFactory.getInstance().createTransportLogger(transport, tcpTransport.getLogWriterName(),
-                        tcpTransport.isDynamicManagement(), tcpTransport.isStartLogging(), tcpTransport.getJmxPort());
-            } catch (Throwable e) {
-                LOG.error("Could not create TransportLogger object for: " + tcpTransport.getLogWriterName() + ", reason: " + e, e);
-            }
-        }
-
-        boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor", "true"));
-        if (useInactivityMonitor && isUseInactivityMonitor(transport)) {
-            transport = new InactivityMonitor(transport, format);
-            IntrospectionSupport.setProperties(transport, options);
-        }
-
-
-        // Only need the WireFormatNegotiator if using openwire
-        if (format instanceof OpenWireFormat) {
-            transport = new WireFormatNegotiator(transport, (OpenWireFormat)format, tcpTransport.getMinmumWireFormatVersion());
-        }
-
-        return super.compositeConfigure(transport, format, options);
-    }
-
-    /**
-     * Returns true if the inactivity monitor should be used on the transport
-     */
-    protected boolean isUseInactivityMonitor(Transport transport) {
-        return true;
-    }
-
-    protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException {
-        URI localLocation = null;
-        String path = location.getPath();
-        // see if the path is a local URI location
-        if (path != null && path.length() > 0) {
-            int localPortIndex = path.indexOf(':');
-            try {
-                Integer.parseInt(path.substring(localPortIndex + 1, path.length()));
-                String localString = location.getScheme() + ":/" + path;
-                localLocation = new URI(localString);
-            } catch (Exception e) {
-                LOG.warn("path isn't a valid local location for TcpTransport to use", e.getMessage());
-                if(LOG.isDebugEnabled()) {
-                    LOG.debug("Failure detail", e);
-                }
-            }
-        }
-        SocketFactory socketFactory = createSocketFactory();
-        return createTcpTransport(wf, socketFactory, location, localLocation);
-    }
-
-    /**
-     * Allows subclasses of TcpTransportFactory to provide a create custom
-     * TcpTransport intances.
-     *
-     * @param location
-     * @param wf
-     * @param socketFactory
-     * @param localLocation
-     * @return
-     * @throws UnknownHostException
-     * @throws IOException
-     */
-    protected TcpTransport createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws UnknownHostException, IOException {
-        return new TcpTransport(wf, socketFactory, location, localLocation);
-    }
-
-    protected ServerSocketFactory createServerSocketFactory() throws IOException {
-        return ServerSocketFactory.getDefault();
-    }
-
-    protected SocketFactory createSocketFactory() throws IOException {
-        return SocketFactory.getDefault();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
deleted file mode 100755
index 1328637..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-import javax.net.ServerSocketFactory;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.ThreadPriorities;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.openwire.OpenWireFormatFactory;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportLoggerFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.TransportServerThreadSupport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.InetAddressUtil;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.ServiceListener;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.util.ServiceSupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.wireformat.WireFormatFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A TCP based implementation of {@link TransportServer}
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- * 
- */
-
-public class TcpTransportServer extends TransportServerThreadSupport implements ServiceListener{
-
-    private static final Logger LOG = LoggerFactory.getLogger(TcpTransportServer.class);
-    protected ServerSocket serverSocket;
-    protected int backlog = 5000;
-    protected WireFormatFactory wireFormatFactory = new OpenWireFormatFactory();
-    protected final TcpTransportFactory transportFactory;
-    protected long maxInactivityDuration = 30000;
-    protected long maxInactivityDurationInitalDelay = 10000;
-    protected int minmumWireFormatVersion;
-    protected boolean useQueueForAccept=true;
-       
-    /**
-     * trace=true -> the Transport stack where this TcpTransport
-     * object will be, will have a TransportLogger layer
-     * trace=false -> the Transport stack where this TcpTransport
-     * object will be, will NOT have a TransportLogger layer, and therefore
-     * will never be able to print logging messages.
-     * This parameter is most probably set in Connection or TransportConnector URIs.
-     */
-    protected boolean trace = false;
-
-    protected int soTimeout = 0;
-    protected int socketBufferSize = 64 * 1024;
-    protected int connectionTimeout =  30000;
-
-    /**
-     * Name of the LogWriter implementation to use.
-     * Names are mapped to classes in the resources/META-INF/services/org/apache/activemq/transport/logwriters directory.
-     * This parameter is most probably set in Connection or TransportConnector URIs.
-     */
-    protected String logWriterName = TransportLoggerFactory.defaultLogWriterName;
-    /**
-     * Specifies if the TransportLogger will be manageable by JMX or not.
-     * Also, as long as there is at least 1 TransportLogger which is manageable,
-     * a TransportLoggerControl MBean will me created.
-     */
-    protected boolean dynamicManagement = false;
-    /**
-     * startLogging=true -> the TransportLogger object of the Transport stack
-     * will initially write messages to the log.
-     * startLogging=false -> the TransportLogger object of the Transport stack
-     * will initially NOT write messages to the log.
-     * This parameter only has an effect if trace == true.
-     * This parameter is most probably set in Connection or TransportConnector URIs.
-     */
-    protected boolean startLogging = true;
-    protected final ServerSocketFactory serverSocketFactory;
-    protected BlockingQueue<Socket> socketQueue = new LinkedBlockingQueue<Socket>();
-    protected Thread socketHandlerThread;
-    /**
-     * The maximum number of sockets allowed for this server
-     */
-    protected int maximumConnections = Integer.MAX_VALUE;
-    protected int currentTransportCount=0;
-  
-    public TcpTransportServer(TcpTransportFactory transportFactory, URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-        super(location);
-        this.transportFactory = transportFactory;
-        this.serverSocketFactory = serverSocketFactory;
-        
-    }
-
-    public void bind() throws IOException {
-        URI bind = getBindLocation();
-
-        String host = bind.getHost();
-        host = (host == null || host.length() == 0) ? "localhost" : host;
-        InetAddress addr = InetAddress.getByName(host);
-
-        try {
-
-            this.serverSocket = serverSocketFactory.createServerSocket(bind.getPort(), backlog, addr);
-            configureServerSocket(this.serverSocket);
-            
-        } catch (IOException e) {
-            throw IOExceptionSupport.create("Failed to bind to server socket: " + bind + " due to: " + e, e);
-        }
-        try {
-            setConnectURI(new URI(bind.getScheme(), bind.getUserInfo(), resolveHostName(serverSocket, addr), serverSocket.getLocalPort(), bind.getPath(), bind.getQuery(), bind
-                .getFragment()));
-        } catch (URISyntaxException e) {
-
-            // it could be that the host name contains invalid characters such
-            // as _ on unix platforms
-            // so lets try use the IP address instead
-            try {
-                setConnectURI(new URI(bind.getScheme(), bind.getUserInfo(), addr.getHostAddress(), serverSocket.getLocalPort(), bind.getPath(), bind.getQuery(), bind.getFragment()));
-            } catch (URISyntaxException e2) {
-                throw IOExceptionSupport.create(e2);
-            }
-        }
-    }
-
-    private void configureServerSocket(ServerSocket socket) throws SocketException {
-        socket.setSoTimeout(2000);
-        if (transportOptions != null) {
-            IntrospectionSupport.setProperties(socket, transportOptions);
-        }
-    }
-
-    /**
-     * @return Returns the wireFormatFactory.
-     */
-    public WireFormatFactory getWireFormatFactory() {
-        return wireFormatFactory;
-    }
-
-    /**
-     * @param wireFormatFactory The wireFormatFactory to set.
-     */
-    public void setWireFormatFactory(WireFormatFactory wireFormatFactory) {
-        this.wireFormatFactory = wireFormatFactory;
-    }
-
-    /**
-     * Associates a broker info with the transport server so that the transport
-     * can do discovery advertisements of the broker.
-     * 
-     * @param brokerInfo
-     */
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-    }
-
-    public long getMaxInactivityDuration() {
-        return maxInactivityDuration;
-    }
-
-    public void setMaxInactivityDuration(long maxInactivityDuration) {
-        this.maxInactivityDuration = maxInactivityDuration;
-    }
-    
-    public long getMaxInactivityDurationInitalDelay() {
-        return this.maxInactivityDurationInitalDelay;
-    }
-
-    public void setMaxInactivityDurationInitalDelay(long maxInactivityDurationInitalDelay) {
-        this.maxInactivityDurationInitalDelay = maxInactivityDurationInitalDelay;
-    }
-
-    public int getMinmumWireFormatVersion() {
-        return minmumWireFormatVersion;
-    }
-
-    public void setMinmumWireFormatVersion(int minmumWireFormatVersion) {
-        this.minmumWireFormatVersion = minmumWireFormatVersion;
-    }
-
-    public boolean isTrace() {
-        return trace;
-    }
-
-    public void setTrace(boolean trace) {
-        this.trace = trace;
-    }
-    
-    public String getLogWriterName() {
-        return logWriterName;
-    }
-
-    public void setLogWriterName(String logFormat) {
-        this.logWriterName = logFormat;
-    }        
-
-    public boolean isDynamicManagement() {
-        return dynamicManagement;
-    }
-
-    public void setDynamicManagement(boolean useJmx) {
-        this.dynamicManagement = useJmx;
-    }
-
-    public boolean isStartLogging() {
-        return startLogging;
-    }
-
-
-    public void setStartLogging(boolean startLogging) {
-        this.startLogging = startLogging;
-    }
-    
-    /**
-     * @return the backlog
-     */
-    public int getBacklog() {
-        return backlog;
-    }
-
-    /**
-     * @param backlog the backlog to set
-     */
-    public void setBacklog(int backlog) {
-        this.backlog = backlog;
-    }
-
-    /**
-     * @return the useQueueForAccept
-     */
-    public boolean isUseQueueForAccept() {
-        return useQueueForAccept;
-    }
-
-    /**
-     * @param useQueueForAccept the useQueueForAccept to set
-     */
-    public void setUseQueueForAccept(boolean useQueueForAccept) {
-        this.useQueueForAccept = useQueueForAccept;
-    }
-    
-
-    /**
-     * pull Sockets from the ServerSocket
-     */
-    public void run() {
-        while (!isStopped()) {
-            Socket socket = null;
-            try {
-                socket = serverSocket.accept();
-                if (socket != null) {
-                    if (isStopped() || getAcceptListener() == null) {
-                        socket.close();
-                    } else {
-                        if (useQueueForAccept) {
-                            socketQueue.put(socket);
-                        }else {
-                            handleSocket(socket);
-                        }
-                    }
-                }
-            } catch (SocketTimeoutException ste) {
-                // expect this to happen
-            } catch (Exception e) {
-                if (!isStopping()) {
-                    onAcceptError(e);
-                } else if (!isStopped()) {
-                    LOG.warn("run()", e);
-                    onAcceptError(e);
-                }
-            }
-        }
-    }
-
-    /**
-     * Allow derived classes to override the Transport implementation that this
-     * transport server creates.
-     * 
-     * @param socket
-     * @param format
-     * @return
-     * @throws IOException
-     */
-    protected  Transport createTransport(Socket socket, WireFormat format) throws IOException {
-        return new TcpTransport(format, socket);
-    }
-
-    /**
-     * @return pretty print of this
-     */
-    public String toString() {
-        return "" + getBindLocation();
-    }
-
-    /**
-     * @param socket 
-     * @param inetAddress
-     * @return real hostName
-     * @throws UnknownHostException
-     */
-    protected String resolveHostName(ServerSocket socket, InetAddress bindAddress) throws UnknownHostException {
-        String result = null;
-        if (socket.isBound()) {
-            if (socket.getInetAddress().isAnyLocalAddress()) {
-                // make it more human readable and useful, an alternative to 0.0.0.0
-                result = InetAddressUtil.getLocalHostName();
-            } else {
-                result = socket.getInetAddress().getCanonicalHostName();
-            }
-        } else {
-            result = bindAddress.getCanonicalHostName();
-        }
-        return result;
-    }
-    
-    protected void doStart() throws Exception {
-        if(useQueueForAccept) {
-            Runnable run = new Runnable() {
-                public void run() {
-                    try {
-                        while (!isStopped() && !isStopping()) {
-                            Socket sock = socketQueue.poll(1, TimeUnit.SECONDS);
-                            if (sock != null) {
-                                handleSocket(sock);
-                            }
-                        }
-    
-                    } catch (InterruptedException e) {
-                        LOG.info("socketQueue interuppted - stopping");
-                        if (!isStopping()) {
-                            onAcceptError(e);
-                        }
-                    }
-    
-                }
-    
-            };
-            socketHandlerThread = new Thread(null, run,
-                    "ActiveMQ Transport Server Thread Handler: " + toString(),
-                    getStackSize());
-            socketHandlerThread.setDaemon(true);
-            socketHandlerThread.setPriority(ThreadPriorities.BROKER_MANAGEMENT-1);
-            socketHandlerThread.start();
-        }
-        super.doStart();
-        
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        super.doStop(stopper);
-        if (serverSocket != null) {
-            serverSocket.close();
-        }
-    }
-
-    public InetSocketAddress getSocketAddress() {
-        return (InetSocketAddress)serverSocket.getLocalSocketAddress();
-    }
-
-    protected final void handleSocket(Socket socket) {
-        try {
-            if (this.currentTransportCount >= this.maximumConnections) {
-                throw new ExceededMaximumConnectionsException("Exceeded the maximum " + 
-                    "number of allowed client connections. See the 'maximumConnections' " + 
-                    "property on the TCP transport configuration URI in the ActiveMQ " + 
-                    "configuration file (e.g., activemq.xml)"); 
-                
-            } else {
-                HashMap<String, Object> options = new HashMap<String, Object>();
-                options.put("maxInactivityDuration", Long.valueOf(maxInactivityDuration));
-                options.put("maxInactivityDurationInitalDelay", 
-                    Long.valueOf(maxInactivityDurationInitalDelay));
-                options.put("minmumWireFormatVersion", 
-                    Integer.valueOf(minmumWireFormatVersion));
-                options.put("trace", Boolean.valueOf(trace));
-                options.put("soTimeout", Integer.valueOf(soTimeout));
-                options.put("socketBufferSize", Integer.valueOf(socketBufferSize));
-                options.put("connectionTimeout", Integer.valueOf(connectionTimeout));
-                options.put("logWriterName", logWriterName);
-                options.put("dynamicManagement", Boolean.valueOf(dynamicManagement));
-                options.put("startLogging", Boolean.valueOf(startLogging));
-                options.putAll(transportOptions);
-
-                WireFormat format = wireFormatFactory.createWireFormat();
-                Transport transport = createTransport(socket, format);
-
-                if (transport instanceof ServiceSupport) {
-                    ((ServiceSupport) transport).addServiceListener(this);
-                }
-
-                Transport configuredTransport = 
-                    transportFactory.serverConfigure( transport, format, options);
-
-                getAcceptListener().onAccept(configuredTransport);
-            }
-        } catch (SocketTimeoutException ste) {
-            // expect this to happen
-        } catch (Exception e) {
-            if (!isStopping()) {
-                onAcceptError(e);
-            } else if (!isStopped()) {
-                LOG.warn("run()", e);
-                onAcceptError(e);
-            }
-        }
-        
-    }    
-
-	public int getSoTimeout() {
-		return soTimeout;
-	}
-
-	public void setSoTimeout(int soTimeout) {
-		this.soTimeout = soTimeout;
-	}
-
-	public int getSocketBufferSize() {
-		return socketBufferSize;
-	}
-
-	public void setSocketBufferSize(int socketBufferSize) {
-		this.socketBufferSize = socketBufferSize;
-	}
-
-	public int getConnectionTimeout() {
-		return connectionTimeout;
-	}
-
-	public void setConnectionTimeout(int connectionTimeout) {
-		this.connectionTimeout = connectionTimeout;
-	}
-
-    /**
-     * @return the maximumConnections
-     */
-    public int getMaximumConnections() {
-        return maximumConnections;
-    }
-
-    /**
-     * @param maximumConnections the maximumConnections to set
-     */
-    public void setMaximumConnections(int maximumConnections) {
-        this.maximumConnections = maximumConnections;
-    }
-
-    
-    public void started(Service service) {
-       this.currentTransportCount++;
-    }
-
-    public void stopped(Service service) {
-        this.currentTransportCount--;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TimeStampStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TimeStampStream.java
deleted file mode 100644
index 0188761..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TimeStampStream.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.transport.tcp;
-
-public interface TimeStampStream {
-
-    public abstract boolean isWriting();
-
-    public abstract long getWriteTimestamp();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/package.html
deleted file mode 100755
index 64ab2b3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-TCP/IP based Transport implementation.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ByteBufferPool.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ByteBufferPool.java
deleted file mode 100644
index c24fafe..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ByteBufferPool.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.nio.ByteBuffer;
-
-import org.apache.activemq.Service;
-
-/**
- * Represents a pool of {@link ByteBuffer} instances. 
- * This strategy could just create new buffers for each call or
- * it could pool them.
- * 
- * 
- */
-public interface ByteBufferPool extends Service {
-
-    /**
-     * Extract a buffer from the pool.
-     */
-    ByteBuffer borrowBuffer();
-
-    /**
-     * Returns the buffer to the pool or just discards it for a non-pool strategy
-     */
-    void returnBuffer(ByteBuffer buffer);
-
-    /**
-     * Sets the default size of the buffers
-     */
-    void setDefaultSize(int defaultSize);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java
deleted file mode 100644
index f8b61b8..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.IOException;
-import java.net.SocketAddress;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.transport.reliable.ReplayBuffer;
-import org.apache.activemq.transport.reliable.Replayer;
-
-/**
- *
- * 
- */
-public interface CommandChannel extends Replayer, Service {
-
-    Command read() throws IOException;
-
-    void write(Command command, SocketAddress address) throws IOException;
-
-    int getDatagramSize();
-
-    /**
-     * Sets the default size of a datagram on the network.
-     */
-    void setDatagramSize(int datagramSize);
-
-    DatagramHeaderMarshaller getHeaderMarshaller();
-
-    void setHeaderMarshaller(DatagramHeaderMarshaller headerMarshaller);
-
-    void setTargetAddress(SocketAddress address);
-
-    void setReplayAddress(SocketAddress address);
-
-    void setReplayBuffer(ReplayBuffer replayBuffer);
-    
-    public int getReceiveCounter();
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannelSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannelSupport.java
deleted file mode 100644
index 6647a91..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannelSupport.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.IOException;
-import java.net.SocketAddress;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.reliable.ReplayBuffer;
-import org.apache.activemq.util.IntSequenceGenerator;
-
-/**
- * 
- * 
- */
-public abstract class CommandChannelSupport implements CommandChannel {
-
-    protected OpenWireFormat wireFormat;
-    protected int datagramSize = 4 * 1024;
-    protected SocketAddress targetAddress;
-    protected SocketAddress replayAddress;
-    protected final String name;
-    protected final IntSequenceGenerator sequenceGenerator;
-    protected DatagramHeaderMarshaller headerMarshaller;
-    private ReplayBuffer replayBuffer;
-
-    public CommandChannelSupport(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress,
-            DatagramHeaderMarshaller headerMarshaller) {
-        this.wireFormat = wireFormat;
-        this.datagramSize = datagramSize;
-        this.targetAddress = targetAddress;
-        this.headerMarshaller = headerMarshaller;
-        this.name = transport.toString();
-        this.sequenceGenerator = transport.getSequenceGenerator();
-        this.replayAddress = targetAddress;
-        if (sequenceGenerator == null) {
-            throw new IllegalArgumentException("No sequenceGenerator on the given transport: " + transport);
-        }
-    }
-    
-    public void write(Command command) throws IOException {
-        write(command, targetAddress);
-    }
-
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public int getDatagramSize() {
-        return datagramSize;
-    }
-
-    /**
-     * Sets the default size of a datagram on the network.
-     */
-    public void setDatagramSize(int datagramSize) {
-        this.datagramSize = datagramSize;
-    }
-
-    public SocketAddress getTargetAddress() {
-        return targetAddress;
-    }
-
-    public void setTargetAddress(SocketAddress targetAddress) {
-        this.targetAddress = targetAddress;
-    }
-
-    public SocketAddress getReplayAddress() {
-        return replayAddress;
-    }
-
-    public void setReplayAddress(SocketAddress replayAddress) {
-        this.replayAddress = replayAddress;
-    }
-
-    public String toString() {
-        return "CommandChannel#" + name;
-    }
-
-    public DatagramHeaderMarshaller getHeaderMarshaller() {
-        return headerMarshaller;
-    }
-
-    public void setHeaderMarshaller(DatagramHeaderMarshaller headerMarshaller) {
-        this.headerMarshaller = headerMarshaller;
-    }
-
-    public ReplayBuffer getReplayBuffer() {
-        return replayBuffer;
-    }
-
-    public void setReplayBuffer(ReplayBuffer replayBuffer) {
-        this.replayBuffer = replayBuffer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java
deleted file mode 100644
index 2441ae9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.SocketAddress;
-import java.nio.ByteBuffer;
-import java.nio.channels.DatagramChannel;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Endpoint;
-import org.apache.activemq.command.LastPartialCommand;
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.reliable.ReplayBuffer;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A strategy for reading datagrams and de-fragmenting them together.
- * 
- * 
- */
-public class CommandDatagramChannel extends CommandChannelSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CommandDatagramChannel.class);
-
-    private DatagramChannel channel;
-    private ByteBufferPool bufferPool;
-
-    // reading
-    private Object readLock = new Object();
-    private ByteBuffer readBuffer;
-
-    // writing
-    private Object writeLock = new Object();
-    private int defaultMarshalBufferSize = 64 * 1024;
-    private volatile int receiveCounter;
-
-    public CommandDatagramChannel(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller,
-                                  DatagramChannel channel, ByteBufferPool bufferPool) {
-        super(transport, wireFormat, datagramSize, targetAddress, headerMarshaller);
-        this.channel = channel;
-        this.bufferPool = bufferPool;
-    }
-
-    public void start() throws Exception {
-        bufferPool.setDefaultSize(datagramSize);
-        bufferPool.start();
-        readBuffer = bufferPool.borrowBuffer();
-    }
-
-    public void stop() throws Exception {
-        bufferPool.stop();
-    }
-
-    public Command read() throws IOException {
-        Command answer = null;
-        Endpoint from = null;
-        synchronized (readLock) {
-            while (true) {
-                readBuffer.clear();
-                SocketAddress address = channel.receive(readBuffer);
-
-                readBuffer.flip();
-
-                if (readBuffer.limit() == 0) {
-                    continue;
-                }
-                
-                receiveCounter++;
-                from = headerMarshaller.createEndpoint(readBuffer, address);
-
-                int remaining = readBuffer.remaining();
-                byte[] data = new byte[remaining];
-                readBuffer.get(data);
-
-                // TODO could use a DataInput implementation that talks direct
-                // to
-                // the ByteBuffer to avoid object allocation and unnecessary
-                // buffering?
-                DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(data));
-                answer = (Command)wireFormat.unmarshal(dataIn);
-                break;
-            }
-        }
-        if (answer != null) {
-            answer.setFrom(from);
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Channel: " + name + " received from: " + from + " about to process: " + answer);
-            }
-        }
-        return answer;
-    }
-
-    public void write(Command command, SocketAddress address) throws IOException {
-        synchronized (writeLock) {
-
-            ByteArrayOutputStream largeBuffer = new ByteArrayOutputStream(defaultMarshalBufferSize);
-            wireFormat.marshal(command, new DataOutputStream(largeBuffer));
-            byte[] data = largeBuffer.toByteArray();
-            int size = data.length;
-
-            ByteBuffer writeBuffer = bufferPool.borrowBuffer();
-            writeBuffer.clear();
-            headerMarshaller.writeHeader(command, writeBuffer);
-
-            if (size > writeBuffer.remaining()) {
-                // lets split the command up into chunks
-                int offset = 0;
-                boolean lastFragment = false;
-                int length = data.length;
-                for (int fragment = 0; !lastFragment; fragment++) {
-                    // write the header
-                    if (fragment > 0) {
-                        writeBuffer = bufferPool.borrowBuffer();
-                        writeBuffer.clear();
-                        headerMarshaller.writeHeader(command, writeBuffer);
-                    }
-
-                    int chunkSize = writeBuffer.remaining();
-
-                    // we need to remove the amount of overhead to write the
-                    // partial command
-
-                    // lets write the flags in there
-                    BooleanStream bs = null;
-                    if (wireFormat.isTightEncodingEnabled()) {
-                        bs = new BooleanStream();
-                        bs.writeBoolean(true); // the partial data byte[] is
-                        // never null
-                    }
-
-                    // lets remove the header of the partial command
-                    // which is the byte for the type and an int for the size of
-                    // the byte[]
-
-                    // data type + the command ID + size of the partial data
-                    chunkSize -= 1 + 4 + 4;
-
-                    // the boolean flags
-                    if (bs != null) {
-                        chunkSize -= bs.marshalledSize();
-                    } else {
-                        chunkSize -= 1;
-                    }
-
-                    if (!wireFormat.isSizePrefixDisabled()) {
-                        // lets write the size of the command buffer
-                        writeBuffer.putInt(chunkSize);
-                        chunkSize -= 4;
-                    }
-
-                    lastFragment = offset + chunkSize >= length;
-                    if (chunkSize + offset > length) {
-                        chunkSize = length - offset;
-                    }
-
-                    if (lastFragment) {
-                        writeBuffer.put(LastPartialCommand.DATA_STRUCTURE_TYPE);
-                    } else {
-                        writeBuffer.put(PartialCommand.DATA_STRUCTURE_TYPE);
-                    }
-
-                    if (bs != null) {
-                        bs.marshal(writeBuffer);
-                    }
-
-                    int commandId = command.getCommandId();
-                    if (fragment > 0) {
-                        commandId = sequenceGenerator.getNextSequenceId();
-                    }
-                    writeBuffer.putInt(commandId);
-                    if (bs == null) {
-                        writeBuffer.put((byte)1);
-                    }
-
-                    // size of byte array
-                    writeBuffer.putInt(chunkSize);
-
-                    // now the data
-                    writeBuffer.put(data, offset, chunkSize);
-
-                    offset += chunkSize;
-                    sendWriteBuffer(commandId, address, writeBuffer, false);
-                }
-            } else {
-                writeBuffer.put(data);
-                sendWriteBuffer(command.getCommandId(), address, writeBuffer, false);
-            }
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public ByteBufferPool getBufferPool() {
-        return bufferPool;
-    }
-
-    /**
-     * Sets the implementation of the byte buffer pool to use
-     */
-    public void setBufferPool(ByteBufferPool bufferPool) {
-        this.bufferPool = bufferPool;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected void sendWriteBuffer(int commandId, SocketAddress address, ByteBuffer writeBuffer, boolean redelivery) throws IOException {
-        // lets put the datagram into the replay buffer first to prevent timing
-        // issues
-        ReplayBuffer bufferCache = getReplayBuffer();
-        if (bufferCache != null && !redelivery) {
-            bufferCache.addBuffer(commandId, writeBuffer);
-        }
-
-        writeBuffer.flip();
-
-        if (LOG.isDebugEnabled()) {
-            String text = redelivery ? "REDELIVERING" : "sending";
-            LOG.debug("Channel: " + name + " " + text + " datagram: " + commandId + " to: " + address);
-        }
-        channel.send(writeBuffer, address);
-    }
-
-    public void sendBuffer(int commandId, Object buffer) throws IOException {
-        if (buffer != null) {
-            ByteBuffer writeBuffer = (ByteBuffer)buffer;
-            sendWriteBuffer(commandId, getReplayAddress(), writeBuffer, true);
-        } else {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Request for buffer: " + commandId + " is no longer present");
-            }
-        }
-    }
-
-    public int getReceiveCounter() {
-        return receiveCounter;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java
deleted file mode 100644
index 233cc57..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.SocketAddress;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Endpoint;
-import org.apache.activemq.command.LastPartialCommand;
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.BooleanStream;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.reliable.ReplayBuffer;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A strategy for reading datagrams and de-fragmenting them together.
- * 
- * 
- */
-public class CommandDatagramSocket extends CommandChannelSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CommandDatagramSocket.class);
-
-    private DatagramSocket channel;
-    private Object readLock = new Object();
-    private Object writeLock = new Object();
-
-    private volatile int receiveCounter;
-
-    public CommandDatagramSocket(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller,
-                                 DatagramSocket channel) {
-        super(transport, wireFormat, datagramSize, targetAddress, headerMarshaller);
-        this.channel = channel;
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public Command read() throws IOException {
-        Command answer = null;
-        Endpoint from = null;
-        synchronized (readLock) {
-            while (true) {
-                DatagramPacket datagram = createDatagramPacket();
-                channel.receive(datagram);
-
-                // TODO could use a DataInput implementation that talks direct
-                // to the byte[] to avoid object allocation
-                receiveCounter++;
-                DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(datagram.getData(), 0, datagram.getLength()));
-                
-                from = headerMarshaller.createEndpoint(datagram, dataIn);
-                answer = (Command)wireFormat.unmarshal(dataIn);
-                break;
-            }
-        }
-        if (answer != null) {
-            answer.setFrom(from);
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Channel: " + name + " about to process: " + answer);
-            }
-        }
-        return answer;
-    }
-
-    public void write(Command command, SocketAddress address) throws IOException {
-        synchronized (writeLock) {
-
-            ByteArrayOutputStream writeBuffer = createByteArrayOutputStream();
-            DataOutputStream dataOut = new DataOutputStream(writeBuffer);
-            headerMarshaller.writeHeader(command, dataOut);
-
-            int offset = writeBuffer.size();
-
-            wireFormat.marshal(command, dataOut);
-
-            if (remaining(writeBuffer) >= 0) {
-                sendWriteBuffer(address, writeBuffer, command.getCommandId());
-            } else {
-                // lets split the command up into chunks
-                byte[] data = writeBuffer.toByteArray();
-                boolean lastFragment = false;
-                int length = data.length;
-                for (int fragment = 0; !lastFragment; fragment++) {
-                    writeBuffer = createByteArrayOutputStream();
-                    headerMarshaller.writeHeader(command, dataOut);
-
-                    int chunkSize = remaining(writeBuffer);
-
-                    // we need to remove the amount of overhead to write the
-                    // partial command
-
-                    // lets write the flags in there
-                    BooleanStream bs = null;
-                    if (wireFormat.isTightEncodingEnabled()) {
-                        bs = new BooleanStream();
-                        bs.writeBoolean(true); // the partial data byte[] is
-                        // never null
-                    }
-
-                    // lets remove the header of the partial command
-                    // which is the byte for the type and an int for the size of
-                    // the byte[]
-
-                    // data type + the command ID + size of the partial data
-                    chunkSize -= 1 + 4 + 4;
-
-                    // the boolean flags
-                    if (bs != null) {
-                        chunkSize -= bs.marshalledSize();
-                    } else {
-                        chunkSize -= 1;
-                    }
-
-                    if (!wireFormat.isSizePrefixDisabled()) {
-                        // lets write the size of the command buffer
-                        dataOut.writeInt(chunkSize);
-                        chunkSize -= 4;
-                    }
-
-                    lastFragment = offset + chunkSize >= length;
-                    if (chunkSize + offset > length) {
-                        chunkSize = length - offset;
-                    }
-
-                    if (lastFragment) {
-                        dataOut.write(LastPartialCommand.DATA_STRUCTURE_TYPE);
-                    } else {
-                        dataOut.write(PartialCommand.DATA_STRUCTURE_TYPE);
-                    }
-
-                    if (bs != null) {
-                        bs.marshal(dataOut);
-                    }
-
-                    int commandId = command.getCommandId();
-                    if (fragment > 0) {
-                        commandId = sequenceGenerator.getNextSequenceId();
-                    }
-                    dataOut.writeInt(commandId);
-                    if (bs == null) {
-                        dataOut.write((byte)1);
-                    }
-
-                    // size of byte array
-                    dataOut.writeInt(chunkSize);
-
-                    // now the data
-                    dataOut.write(data, offset, chunkSize);
-
-                    offset += chunkSize;
-                    sendWriteBuffer(address, writeBuffer, commandId);
-                }
-            }
-        }
-    }
-
-    public int getDatagramSize() {
-        return datagramSize;
-    }
-
-    public void setDatagramSize(int datagramSize) {
-        this.datagramSize = datagramSize;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected void sendWriteBuffer(SocketAddress address, ByteArrayOutputStream writeBuffer, int commandId) throws IOException {
-        byte[] data = writeBuffer.toByteArray();
-        sendWriteBuffer(commandId, address, data, false);
-    }
-
-    protected void sendWriteBuffer(int commandId, SocketAddress address, byte[] data, boolean redelivery) throws IOException {
-        // lets put the datagram into the replay buffer first to prevent timing
-        // issues
-        ReplayBuffer bufferCache = getReplayBuffer();
-        if (bufferCache != null && !redelivery) {
-            bufferCache.addBuffer(commandId, data);
-        }
-
-        if (LOG.isDebugEnabled()) {
-            String text = redelivery ? "REDELIVERING" : "sending";
-            LOG.debug("Channel: " + name + " " + text + " datagram: " + commandId + " to: " + address);
-        }
-        DatagramPacket packet = new DatagramPacket(data, 0, data.length, address);
-        channel.send(packet);
-    }
-
-    public void sendBuffer(int commandId, Object buffer) throws IOException {
-        if (buffer != null) {
-            byte[] data = (byte[])buffer;
-            sendWriteBuffer(commandId, replayAddress, data, true);
-        } else {
-            if (LOG.isWarnEnabled()) {
-                LOG.warn("Request for buffer: " + commandId + " is no longer present");
-            }
-        }
-    }
-
-    protected DatagramPacket createDatagramPacket() {
-        return new DatagramPacket(new byte[datagramSize], datagramSize);
-    }
-
-    protected int remaining(ByteArrayOutputStream buffer) {
-        return datagramSize - buffer.size();
-    }
-
-    protected ByteArrayOutputStream createByteArrayOutputStream() {
-        return new ByteArrayOutputStream(datagramSize);
-    }
-
-    public int getReceiveCounter() {
-        return receiveCounter;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java
deleted file mode 100644
index 35e69fe..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.net.SocketAddress;
-
-import org.apache.activemq.command.BaseEndpoint;
-
-/**
- * 
- * 
- */
-public class DatagramEndpoint extends BaseEndpoint {
-
-    private final SocketAddress address;
-
-    public DatagramEndpoint(String name, SocketAddress address) {
-        super(name);
-        this.address = address;
-    }
-
-    public SocketAddress getAddress() {
-        return address;
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramHeaderMarshaller.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramHeaderMarshaller.java
deleted file mode 100644
index 0f70eb0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramHeaderMarshaller.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.transport.udp;
-
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.net.DatagramPacket;
-import java.net.SocketAddress;
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Endpoint;
-
-/**
- * 
- * 
- */
-public class DatagramHeaderMarshaller {
-
-    // TODO for large dynamic networks
-    // we may want to evict endpoints that disconnect
-    // from a transport - e.g. for multicast
-    private Map<SocketAddress, Endpoint> endpoints = new HashMap<SocketAddress, Endpoint>();
-    
-    /**
-     * Reads any header if applicable and then creates an endpoint object
-     */
-    public Endpoint createEndpoint(ByteBuffer readBuffer, SocketAddress address) {
-        return getEndpoint(address);
-    }
-
-    public Endpoint createEndpoint(DatagramPacket datagram, DataInputStream dataIn) {
-        return getEndpoint(datagram.getSocketAddress());
-    }
-
-    public void writeHeader(Command command, ByteBuffer writeBuffer) {
-        /*
-        writeBuffer.putLong(command.getCounter());
-        writeBuffer.putInt(command.getDataSize());
-        byte flags = command.getFlags();
-        //System.out.println("Writing header with counter: " + header.getCounter() + " size: " + header.getDataSize() + " with flags: " + flags);
-        writeBuffer.put(flags);
-        */
-    }
-
-    public void writeHeader(Command command, DataOutputStream dataOut) {
-    }
-
-    /**
-     * Gets the current endpoint object for this address or creates one if not available.
-     * 
-     * Note that this method does not need to be synchronized as its only ever going to be
-     * used by the already-synchronized read() method of a CommandChannel 
-     * 
-     */
-    protected Endpoint getEndpoint(SocketAddress address) {
-        Endpoint endpoint = endpoints.get(address);
-        if (endpoint == null) {
-            endpoint = createEndpoint(address);
-            endpoints.put(address, endpoint);
-        }
-        return endpoint;
-    }
-
-    protected Endpoint createEndpoint(SocketAddress address) {
-        return new DatagramEndpoint(address.toString(), address);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java
deleted file mode 100644
index 4713535..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DefaultBufferPool.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A default implementation of {@link BufferPool} which keeps a pool of direct
- * byte buffers.
- * 
- * 
- */
-public class DefaultBufferPool extends SimpleBufferPool implements ByteBufferPool {
-
-    private List<ByteBuffer> buffers = new ArrayList<ByteBuffer>();
-    private Object lock = new Object();
-
-    public DefaultBufferPool() {
-        super(true);
-    }
-
-    public DefaultBufferPool(boolean useDirect) {
-        super(useDirect);
-    }
-
-    public synchronized ByteBuffer borrowBuffer() {
-        synchronized (lock) {
-            int size = buffers.size();
-            if (size > 0) {
-                return buffers.remove(size - 1);
-            }
-        }
-        return createBuffer();
-    }
-
-    public void returnBuffer(ByteBuffer buffer) {
-        synchronized (lock) {
-            buffers.add(buffer);
-        }
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-        synchronized (lock) {
-            /*
-             * for (Iterator iter = buffers.iterator(); iter.hasNext();) {
-             * ByteBuffer buffer = (ByteBuffer) iter.next(); }
-             */
-            buffers.clear();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java
deleted file mode 100644
index 7377d87..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.transport.udp;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Endpoint;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFilter;
-
-/**
- * 
- */
-public class ResponseRedirectInterceptor extends TransportFilter {
-    private final UdpTransport transport;
-
-    public ResponseRedirectInterceptor(Transport next, UdpTransport transport) {
-        super(next);
-        this.transport = transport;
-    }
-
-    public void onCommand(Object o) {
-        final Command command = (Command)o;
-        // redirect to the endpoint that the last response came from
-        Endpoint from = command.getFrom();
-        transport.setTargetEndpoint(from);
-
-        super.onCommand(command);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java
deleted file mode 100644
index 6d93388..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/SimpleBufferPool.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.nio.ByteBuffer;
-
-/**
- * A simple implementation of {@link BufferPool} which does no pooling and just
- * creates new buffers each time
- * 
- * 
- */
-public class SimpleBufferPool implements ByteBufferPool {
-
-    private int defaultSize;
-    private boolean useDirect;
-
-    public SimpleBufferPool() {
-        this(false);
-    }
-
-    public SimpleBufferPool(boolean useDirect) {
-        this.useDirect = useDirect;
-    }
-
-    public synchronized ByteBuffer borrowBuffer() {
-        return createBuffer();
-    }
-
-    public void returnBuffer(ByteBuffer buffer) {
-    }
-
-    public void setDefaultSize(int defaultSize) {
-        this.defaultSize = defaultSize;
-    }
-
-    public boolean isUseDirect() {
-        return useDirect;
-    }
-
-    /**
-     * Sets whether direct buffers are used or not
-     */
-    public void setUseDirect(boolean useDirect) {
-        this.useDirect = useDirect;
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    protected ByteBuffer createBuffer() {
-        if (useDirect) {
-            return ByteBuffer.allocateDirect(defaultSize);
-        } else {
-            return ByteBuffer.allocate(defaultSize);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java
deleted file mode 100755
index daa4860..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.net.BindException;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.nio.channels.AsynchronousCloseException;
-import java.nio.channels.DatagramChannel;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Endpoint;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportThreadSupport;
-import org.apache.activemq.transport.reliable.ExceptionIfDroppedReplayStrategy;
-import org.apache.activemq.transport.reliable.ReplayBuffer;
-import org.apache.activemq.transport.reliable.ReplayStrategy;
-import org.apache.activemq.transport.reliable.Replayer;
-import org.apache.activemq.util.InetAddressUtil;
-import org.apache.activemq.util.IntSequenceGenerator;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An implementation of the {@link Transport} interface using raw UDP
- * 
- * 
- */
-public class UdpTransport extends TransportThreadSupport implements Transport, Service, Runnable {
-    private static final Logger LOG = LoggerFactory.getLogger(UdpTransport.class);
-
-    private static final int MAX_BIND_ATTEMPTS = 50;
-    private static final long BIND_ATTEMPT_DELAY = 100;
-
-    private CommandChannel commandChannel;
-    private OpenWireFormat wireFormat;
-    private ByteBufferPool bufferPool;
-    private ReplayStrategy replayStrategy = new ExceptionIfDroppedReplayStrategy();
-    private ReplayBuffer replayBuffer;
-    private int datagramSize = 4 * 1024;
-    private SocketAddress targetAddress;
-    private SocketAddress originalTargetAddress;
-    private DatagramChannel channel;
-    private boolean trace;
-    private boolean useLocalHost = false;
-    private int port;
-    private int minmumWireFormatVersion;
-    private String description;
-    private IntSequenceGenerator sequenceGenerator;
-    private boolean replayEnabled = true;
-
-    protected UdpTransport(OpenWireFormat wireFormat) throws IOException {
-        this.wireFormat = wireFormat;
-    }
-
-    public UdpTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException, IOException {
-        this(wireFormat);
-        this.targetAddress = createAddress(remoteLocation);
-        description = remoteLocation.toString() + "@";
-    }
-
-    public UdpTransport(OpenWireFormat wireFormat, SocketAddress socketAddress) throws IOException {
-        this(wireFormat);
-        this.targetAddress = socketAddress;
-        this.description = getProtocolName() + "ServerConnection@";
-    }
-
-    /**
-     * Used by the server transport
-     */
-    public UdpTransport(OpenWireFormat wireFormat, int port) throws UnknownHostException, IOException {
-        this(wireFormat);
-        this.port = port;
-        this.targetAddress = null;
-        this.description = getProtocolName() + "Server@";
-    }
-
-    /**
-     * Creates a replayer for working with the reliable transport
-     */
-    public Replayer createReplayer() throws IOException {
-        if (replayEnabled) {
-            return getCommandChannel();
-        }
-        return null;
-    }
-
-    /**
-     * A one way asynchronous send
-     */
-    public void oneway(Object command) throws IOException {
-        oneway(command, targetAddress);
-    }
-
-    /**
-     * A one way asynchronous send to a given address
-     */
-    public void oneway(Object command, SocketAddress address) throws IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Sending oneway from: " + this + " to target: " + targetAddress + " command: " + command);
-        }
-        checkStarted();
-        commandChannel.write((Command)command, address);
-    }
-
-    /**
-     * @return pretty print of 'this'
-     */
-    public String toString() {
-        if (description != null) {
-            return description + port;
-        } else {
-            return getProtocolUriScheme() + targetAddress + "@" + port;
-        }
-    }
-
-    /**
-     * reads packets from a Socket
-     */
-    public void run() {
-        LOG.trace("Consumer thread starting for: " + toString());
-        while (!isStopped()) {
-            try {
-                Command command = commandChannel.read();
-                doConsume(command);
-            } catch (AsynchronousCloseException e) {
-                // DatagramChannel closed
-                try {
-                    stop();
-                } catch (Exception e2) {
-                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
-                }
-            } catch (SocketException e) {
-                // DatagramSocket closed
-                LOG.debug("Socket closed: " + e, e);
-                try {
-                    stop();
-                } catch (Exception e2) {
-                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
-                }
-            } catch (EOFException e) {
-                // DataInputStream closed
-                LOG.debug("Socket closed: " + e, e);
-                try {
-                    stop();
-                } catch (Exception e2) {
-                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
-                }
-            } catch (Exception e) {
-                try {
-                    stop();
-                } catch (Exception e2) {
-                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
-                }
-                if (e instanceof IOException) {
-                    onException((IOException)e);
-                } else {
-                    LOG.error("Caught: " + e, e);
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    /**
-     * We have received the WireFormatInfo from the server on the actual channel
-     * we should use for all future communication with the server, so lets set
-     * the target to be the actual channel that the server has chosen for us to
-     * talk on.
-     */
-    public void setTargetEndpoint(Endpoint newTarget) {
-        if (newTarget instanceof DatagramEndpoint) {
-            DatagramEndpoint endpoint = (DatagramEndpoint)newTarget;
-            SocketAddress address = endpoint.getAddress();
-            if (address != null) {
-                if (originalTargetAddress == null) {
-                    originalTargetAddress = targetAddress;
-                }
-                targetAddress = address;
-                commandChannel.setTargetAddress(address);
-            }
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public boolean isTrace() {
-        return trace;
-    }
-
-    public void setTrace(boolean trace) {
-        this.trace = trace;
-    }
-
-    public int getDatagramSize() {
-        return datagramSize;
-    }
-
-    public void setDatagramSize(int datagramSize) {
-        this.datagramSize = datagramSize;
-    }
-
-    public boolean isUseLocalHost() {
-        return useLocalHost;
-    }
-
-    /**
-     * Sets whether 'localhost' or the actual local host name should be used to
-     * make local connections. On some operating systems such as Macs its not
-     * possible to connect as the local host name so localhost is better.
-     */
-    public void setUseLocalHost(boolean useLocalHost) {
-        this.useLocalHost = useLocalHost;
-    }
-
-    public CommandChannel getCommandChannel() throws IOException {
-        if (commandChannel == null) {
-            commandChannel = createCommandChannel();
-        }
-        return commandChannel;
-    }
-
-    /**
-     * Sets the implementation of the command channel to use.
-     */
-    public void setCommandChannel(CommandDatagramChannel commandChannel) {
-        this.commandChannel = commandChannel;
-    }
-
-    public ReplayStrategy getReplayStrategy() {
-        return replayStrategy;
-    }
-
-    /**
-     * Sets the strategy used to replay missed datagrams
-     */
-    public void setReplayStrategy(ReplayStrategy replayStrategy) {
-        this.replayStrategy = replayStrategy;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    /**
-     * Sets the port to connect on
-     */
-    public void setPort(int port) {
-        this.port = port;
-    }
-
-    public int getMinmumWireFormatVersion() {
-        return minmumWireFormatVersion;
-    }
-
-    public void setMinmumWireFormatVersion(int minmumWireFormatVersion) {
-        this.minmumWireFormatVersion = minmumWireFormatVersion;
-    }
-
-    public OpenWireFormat getWireFormat() {
-        return wireFormat;
-    }
-
-    public IntSequenceGenerator getSequenceGenerator() {
-        if (sequenceGenerator == null) {
-            sequenceGenerator = new IntSequenceGenerator();
-        }
-        return sequenceGenerator;
-    }
-
-    public void setSequenceGenerator(IntSequenceGenerator sequenceGenerator) {
-        this.sequenceGenerator = sequenceGenerator;
-    }
-
-    public boolean isReplayEnabled() {
-        return replayEnabled;
-    }
-
-    /**
-     * Sets whether or not replay should be enabled when using the reliable
-     * transport. i.e. should we maintain a buffer of messages that can be
-     * replayed?
-     */
-    public void setReplayEnabled(boolean replayEnabled) {
-        this.replayEnabled = replayEnabled;
-    }
-
-    public ByteBufferPool getBufferPool() {
-        if (bufferPool == null) {
-            bufferPool = new DefaultBufferPool();
-        }
-        return bufferPool;
-    }
-
-    public void setBufferPool(ByteBufferPool bufferPool) {
-        this.bufferPool = bufferPool;
-    }
-
-    public ReplayBuffer getReplayBuffer() {
-        return replayBuffer;
-    }
-
-    public void setReplayBuffer(ReplayBuffer replayBuffer) throws IOException {
-        this.replayBuffer = replayBuffer;
-        getCommandChannel().setReplayBuffer(replayBuffer);
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    /**
-     * Creates an address from the given URI
-     */
-    protected InetSocketAddress createAddress(URI remoteLocation) throws UnknownHostException, IOException {
-        String host = resolveHostName(remoteLocation.getHost());
-        return new InetSocketAddress(host, remoteLocation.getPort());
-    }
-
-    protected String resolveHostName(String host) throws UnknownHostException {
-        String localName = InetAddressUtil.getLocalHostName();
-        if (localName != null && isUseLocalHost()) {
-            if (localName.equals(host)) {
-                return "localhost";
-            }
-        }
-        return host;
-    }
-
-    protected void doStart() throws Exception {
-        getCommandChannel().start();
-
-        super.doStart();
-    }
-
-    protected CommandChannel createCommandChannel() throws IOException {
-        SocketAddress localAddress = createLocalAddress();
-        channel = DatagramChannel.open();
-
-        channel = connect(channel, targetAddress);
-
-        DatagramSocket socket = channel.socket();
-        bind(socket, localAddress);
-        if (port == 0) {
-            port = socket.getLocalPort();
-        }
-
-        return createCommandDatagramChannel();
-    }
-
-    protected CommandChannel createCommandDatagramChannel() {
-        return new CommandDatagramChannel(this, getWireFormat(), getDatagramSize(), getTargetAddress(), createDatagramHeaderMarshaller(), getChannel(), getBufferPool());
-    }
-
-    protected void bind(DatagramSocket socket, SocketAddress localAddress) throws IOException {
-        channel.configureBlocking(true);
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Binding to address: " + localAddress);
-        }
-
-        //
-        // We have noticed that on some platfoms like linux, after you close
-        // down
-        // a previously bound socket, it can take a little while before we can
-        // bind it again.
-        // 
-        for (int i = 0; i < MAX_BIND_ATTEMPTS; i++) {
-            try {
-                socket.bind(localAddress);
-                return;
-            } catch (BindException e) {
-                if (i + 1 == MAX_BIND_ATTEMPTS) {
-                    throw e;
-                }
-                try {
-                    Thread.sleep(BIND_ATTEMPT_DELAY);
-                } catch (InterruptedException e1) {
-                    Thread.currentThread().interrupt();
-                    throw e;
-                }
-            }
-        }
-
-    }
-
-    protected DatagramChannel connect(DatagramChannel channel, SocketAddress targetAddress2) throws IOException {
-        // TODO
-        // connect to default target address to avoid security checks each time
-        // channel = channel.connect(targetAddress);
-
-        return channel;
-    }
-
-    protected SocketAddress createLocalAddress() {
-        return new InetSocketAddress(port);
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        if (channel != null) {
-            channel.close();
-        }
-    }
-
-    protected DatagramHeaderMarshaller createDatagramHeaderMarshaller() {
-        return new DatagramHeaderMarshaller();
-    }
-
-    protected String getProtocolName() {
-        return "Udp";
-    }
-
-    protected String getProtocolUriScheme() {
-        return "udp://";
-    }
-
-    protected SocketAddress getTargetAddress() {
-        return targetAddress;
-    }
-
-    protected DatagramChannel getChannel() {
-        return channel;
-    }
-
-    protected void setChannel(DatagramChannel channel) {
-        this.channel = channel;
-    }
-
-    public InetSocketAddress getLocalSocketAddress() {
-        if (channel == null) {
-            return null;
-        } else {
-            return (InetSocketAddress)channel.socket().getLocalSocketAddress();
-        }
-    }
-
-    public String getRemoteAddress() {
-        if (targetAddress != null) {
-            return "" + targetAddress;
-        }
-        return null;
-    }
-
-    public int getReceiveCounter() {
-        if (commandChannel == null) {
-            return 0;
-        }
-        return commandChannel.getReceiveCounter();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java
deleted file mode 100755
index fd294bf..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.CommandJoiner;
-import org.apache.activemq.transport.InactivityMonitor;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportLoggerFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.reliable.DefaultReplayStrategy;
-import org.apache.activemq.transport.reliable.ExceptionIfDroppedReplayStrategy;
-import org.apache.activemq.transport.reliable.ReliableTransport;
-import org.apache.activemq.transport.reliable.ReplayStrategy;
-import org.apache.activemq.transport.reliable.Replayer;
-import org.apache.activemq.transport.tcp.TcpTransportFactory;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- * 
- */
-public class UdpTransportFactory extends TransportFactory {
-    
-    private static final Logger log = LoggerFactory.getLogger(TcpTransportFactory.class);
-    
-    public TransportServer doBind(final URI location) throws IOException {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-            if (options.containsKey("port")) {
-                throw new IllegalArgumentException("The port property cannot be specified on a UDP server transport - please use the port in the URI syntax");
-            }
-            WireFormat wf = createWireFormat(options);
-            int port = location.getPort();
-            OpenWireFormat openWireFormat = asOpenWireFormat(wf);
-            UdpTransport transport = (UdpTransport) createTransport(location, wf);
-
-            Transport configuredTransport = configure(transport, wf, options, true);
-            UdpTransportServer server = new UdpTransportServer(location, transport, configuredTransport, createReplayStrategy());
-            return server;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        } catch (Exception e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    public Transport configure(Transport transport, WireFormat format, Map options) throws Exception {
-        return configure(transport, format, options, false);
-    }
-
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-        IntrospectionSupport.setProperties(transport, options);
-        final UdpTransport udpTransport = (UdpTransport)transport;
-
-        // deal with fragmentation
-        transport = new CommandJoiner(transport, asOpenWireFormat(format));
-
-        if (udpTransport.isTrace()) {
-            try {
-                transport = TransportLoggerFactory.getInstance().createTransportLogger(transport);
-            } catch (Throwable e) {
-                log.error("Could not create TransportLogger object for: " + TransportLoggerFactory.defaultLogWriterName + ", reason: " + e, e);
-            }
-        }
-
-        transport = new InactivityMonitor(transport, format);
-
-        if (format instanceof OpenWireFormat) {
-            transport = configureClientSideNegotiator(transport, format, udpTransport);
-        }
-
-        return transport;
-    }
-
-    protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException {
-        OpenWireFormat wireFormat = asOpenWireFormat(wf);
-        return new UdpTransport(wireFormat, location);
-    }
-
-    /**
-     * Configures the transport
-     * 
-     * @param acceptServer true if this transport is used purely as an 'accept'
-     *                transport for new connections which work like TCP
-     *                SocketServers where new connections spin up a new separate
-     *                UDP transport
-     */
-    protected Transport configure(Transport transport, WireFormat format, Map options, boolean acceptServer) throws Exception {
-        IntrospectionSupport.setProperties(transport, options);
-        UdpTransport udpTransport = (UdpTransport)transport;
-
-        OpenWireFormat openWireFormat = asOpenWireFormat(format);
-
-        if (udpTransport.isTrace()) {
-            transport = TransportLoggerFactory.getInstance().createTransportLogger(transport);
-        }
-
-        transport = new InactivityMonitor(transport, format);
-
-        if (!acceptServer && format instanceof OpenWireFormat) {
-            transport = configureClientSideNegotiator(transport, format, udpTransport);
-        }
-
-        // deal with fragmentation
-
-        if (acceptServer) {
-            // lets not support a buffer of messages to enable reliable
-            // messaging on the 'accept server' transport
-            udpTransport.setReplayEnabled(false);
-
-            // we don't want to do reliable checks on this transport as we
-            // delegate to one that does
-            transport = new CommandJoiner(transport, openWireFormat);
-            return transport;
-        } else {
-            ReliableTransport reliableTransport = new ReliableTransport(transport, udpTransport);
-            Replayer replayer = reliableTransport.getReplayer();
-            reliableTransport.setReplayStrategy(createReplayStrategy(replayer));
-
-            // Joiner must be on outside as the inbound messages must be
-            // processed by the reliable transport first
-            return new CommandJoiner(reliableTransport, openWireFormat);
-        }
-    }
-
-    protected ReplayStrategy createReplayStrategy(Replayer replayer) {
-        if (replayer != null) {
-            return new DefaultReplayStrategy(5);
-        }
-        return new ExceptionIfDroppedReplayStrategy(1);
-    }
-
-    protected ReplayStrategy createReplayStrategy() {
-        return new DefaultReplayStrategy(5);
-    }
-
-    protected Transport configureClientSideNegotiator(Transport transport, WireFormat format, final UdpTransport udpTransport) {
-        return new ResponseRedirectInterceptor(transport, udpTransport);
-    }
-
-    protected OpenWireFormat asOpenWireFormat(WireFormat wf) {
-        OpenWireFormat answer = (OpenWireFormat)wf;
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
deleted file mode 100755
index 673157a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.CommandJoiner;
-import org.apache.activemq.transport.InactivityMonitor;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.TransportServerSupport;
-import org.apache.activemq.transport.reliable.ReliableTransport;
-import org.apache.activemq.transport.reliable.ReplayStrategy;
-import org.apache.activemq.transport.reliable.Replayer;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A UDP based implementation of {@link TransportServer}
- * 
- * 
- */
-
-public class UdpTransportServer extends TransportServerSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(UdpTransportServer.class);
-
-    private UdpTransport serverTransport;
-    private ReplayStrategy replayStrategy;
-    private Transport configuredTransport;
-    private boolean usingWireFormatNegotiation;
-    private Map<DatagramEndpoint, Transport> transports = new HashMap<DatagramEndpoint, Transport>();
-
-    public UdpTransportServer(URI connectURI, UdpTransport serverTransport, Transport configuredTransport, ReplayStrategy replayStrategy) {
-        super(connectURI);
-        this.serverTransport = serverTransport;
-        this.configuredTransport = configuredTransport;
-        this.replayStrategy = replayStrategy;
-    }
-
-    public String toString() {
-        return "UdpTransportServer@" + serverTransport;
-    }
-
-    public void run() {
-    }
-
-    public UdpTransport getServerTransport() {
-        return serverTransport;
-    }
-
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-    }
-
-    protected void doStart() throws Exception {
-        LOG.info("Starting " + this);
-
-        configuredTransport.setTransportListener(new TransportListener() {
-            public void onCommand(Object o) {
-                final Command command = (Command)o;
-                processInboundConnection(command);
-            }
-
-            public void onException(IOException error) {
-                LOG.error("Caught: " + error, error);
-            }
-
-            public void transportInterupted() {
-            }
-
-            public void transportResumed() {
-            }
-        });
-        configuredTransport.start();
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        configuredTransport.stop();
-    }
-
-    protected void processInboundConnection(Command command) {
-        DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command);
-        }
-        Transport transport = null;
-        synchronized (transports) {
-            transport = transports.get(endpoint);
-            if (transport == null) {
-                if (usingWireFormatNegotiation && !command.isWireFormatInfo()) {
-                    LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command);
-                } else {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Creating a new UDP server connection");
-                    }
-                    try {
-                        transport = createTransport(command, endpoint);
-                        transport = configureTransport(transport);
-                        transports.put(endpoint, transport);
-                    } catch (IOException e) {
-                        LOG.error("Caught: " + e, e);
-                        getAcceptListener().onAcceptError(e);
-                    }
-                }
-            } else {
-                LOG.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command);
-            }
-        }
-    }
-
-    protected Transport configureTransport(Transport transport) {
-        transport = new InactivityMonitor(transport, serverTransport.getWireFormat());
-        getAcceptListener().onAccept(transport);
-        return transport;
-    }
-
-    protected Transport createTransport(final Command command, DatagramEndpoint endpoint) throws IOException {
-        if (endpoint == null) {
-            throw new IOException("No endpoint available for command: " + command);
-        }
-        final SocketAddress address = endpoint.getAddress();
-        final OpenWireFormat connectionWireFormat = serverTransport.getWireFormat().copy();
-        final UdpTransport transport = new UdpTransport(connectionWireFormat, address);
-
-        final ReliableTransport reliableTransport = new ReliableTransport(transport, transport);
-        reliableTransport.getReplayer();
-        reliableTransport.setReplayStrategy(replayStrategy);
-
-        // Joiner must be on outside as the inbound messages must be processed
-        // by the reliable transport first
-        return new CommandJoiner(reliableTransport, connectionWireFormat) {
-            public void start() throws Exception {
-                super.start();
-                reliableTransport.onCommand(command);
-            }
-        };
-
-        /**
-         * final WireFormatNegotiator wireFormatNegotiator = new
-         * WireFormatNegotiator(configuredTransport, transport.getWireFormat(),
-         * serverTransport .getMinmumWireFormatVersion()) { public void start()
-         * throws Exception { super.start(); log.debug("Starting a new server
-         * transport: " + this + " with command: " + command);
-         * onCommand(command); } // lets use the specific addressing of wire
-         * format protected void sendWireFormat(WireFormatInfo info) throws
-         * IOException { log.debug("#### we have negotiated the wireformat;
-         * sending a wireformat to: " + address); transport.oneway(info,
-         * address); } }; return wireFormatNegotiator;
-         */
-    }
-
-    public InetSocketAddress getSocketAddress() {
-        return serverTransport.getLocalSocketAddress();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/package.html
deleted file mode 100755
index 28b770c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-UDP based Transport implementation.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
deleted file mode 100755
index 3e05d4a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/**
- * 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.transport.vm;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.URI;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.thread.DefaultThreadPools;
-import org.apache.activemq.thread.Task;
-import org.apache.activemq.thread.TaskRunner;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.apache.activemq.thread.Valve;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.ResponseCallback;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportDisposedIOException;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.util.IOExceptionSupport;
-
-
-/**
- * A Transport implementation that uses direct method invocations.
- * 
- * 
- */
-public class VMTransport implements Transport, Task {
-
-    private static final Object DISCONNECT = new Object();
-    private static final AtomicLong NEXT_ID = new AtomicLong(0);
-    protected VMTransport peer;
-    protected TransportListener transportListener;
-    protected boolean disposed;
-    protected boolean marshal;
-    protected boolean network;
-    protected boolean async = true;
-    protected int asyncQueueDepth = 2000;
-    protected LinkedBlockingQueue<Object> messageQueue;
-    protected boolean started;
-    protected final URI location;
-    protected final long id;
-    private TaskRunner taskRunner;
-    private final Object lazyInitMutext = new Object();
-    private final Valve enqueueValve = new Valve(true);
-    protected final AtomicBoolean stopping = new AtomicBoolean();
-    private volatile int receiveCounter;
-    
-    public VMTransport(URI location) {
-        this.location = location;
-        this.id = NEXT_ID.getAndIncrement();
-    }
-
-    public void setPeer(VMTransport peer) {
-        this.peer = peer;
-    }
-
-    public void oneway(Object command) throws IOException {
-        if (disposed) {
-            throw new TransportDisposedIOException("Transport disposed.");
-        }
-        if (peer == null) {
-            throw new IOException("Peer not connected.");
-        }
-
-        
-        TransportListener transportListener=null;
-        try {
-            // Disable the peer from changing his state while we try to enqueue onto him.
-            peer.enqueueValve.increment();
-        
-            if (peer.disposed || peer.stopping.get()) {
-                throw new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed.");
-            }
-            
-            if (peer.started) {
-                if (peer.async) {
-                    peer.getMessageQueue().put(command);
-                    peer.wakeup();
-                } else {
-                    transportListener = peer.transportListener;
-                }
-            } else {
-                peer.getMessageQueue().put(command);
-            }
-            
-        } catch (InterruptedException e) {
-            InterruptedIOException iioe = new InterruptedIOException(e.getMessage());
-            iioe.initCause(e);
-            throw iioe;
-        } finally {
-            // Allow the peer to change state again...
-            peer.enqueueValve.decrement();
-        }
-
-        dispatch(peer, transportListener, command);
-    }
-    
-    public void dispatch(VMTransport transport, TransportListener transportListener, Object command) {
-        if( transportListener!=null ) {
-            if( command == DISCONNECT ) {
-                transportListener.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
-            } else {
-                transport.receiveCounter++;
-                transportListener.onCommand(command);
-            }
-        }
-    }
-
-    public void start() throws Exception {
-        if (transportListener == null) {
-            throw new IOException("TransportListener not set.");
-        }
-        try {
-            enqueueValve.turnOff();
-            if (messageQueue != null && !async) {
-                Object command;
-                while ((command = messageQueue.poll()) != null && !stopping.get() ) {
-                    receiveCounter++;
-                    dispatch(this, transportListener, command);
-                }
-            }
-            started = true;
-            wakeup();
-        } finally {
-            enqueueValve.turnOn();
-        }
-        // If we get stopped while starting up, then do the actual stop now 
-        // that the enqueueValve is back on.
-        if( stopping.get() ) {
-            stop();
-        }
-    }
-
-    public void stop() throws Exception {
-        stopping.set(true);
-        
-        // If stop() is called while being start()ed.. then we can't stop until we return to the start() method.
-        if( enqueueValve.isOn() ) {
-        	
-            // let the peer know that we are disconnecting..
-            try {
-                peer.transportListener.onCommand(new ShutdownInfo());
-            } catch (Exception ignore) {
-            }
-        	
-        	
-            TaskRunner tr = null;
-            try {
-                enqueueValve.turnOff();
-                if (!disposed) {
-                    started = false;
-                    disposed = true;
-                    if (taskRunner != null) {
-                        tr = taskRunner;
-                        taskRunner = null;
-                    }
-                }
-            } finally {
-                stopping.set(false);
-                enqueueValve.turnOn();
-            }
-            if (tr != null) {
-                tr.shutdown(1000);
-            }
-            
-
-        }
-        
-    }
-    
-    /**
-     * @see org.apache.activemq.thread.Task#iterate()
-     */
-    public boolean iterate() {
-        
-        final TransportListener tl;
-        try {
-            // Disable changing the state variables while we are running... 
-            enqueueValve.increment();
-            tl = transportListener;
-            if (!started || disposed || tl == null || stopping.get()) {
-                if( stopping.get() ) {
-                    // drain the queue it since folks could be blocked putting on to
-                    // it and that would not allow the stop() method for finishing up.
-                    getMessageQueue().clear();  
-                }
-                return false;
-            }
-        } catch (InterruptedException e) {
-            return false;
-        } finally {
-            enqueueValve.decrement();
-        }
-
-        LinkedBlockingQueue<Object> mq = getMessageQueue();
-        Object command = mq.poll();
-        if (command != null) {
-            if( command == DISCONNECT ) {
-                tl.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
-            } else {
-                tl.onCommand(command);
-            }
-            return !mq.isEmpty();
-        } else {
-            return false;
-        }
-        
-    }
-
-    public void setTransportListener(TransportListener commandListener) {
-        try {
-            try {
-                enqueueValve.turnOff();
-                this.transportListener = commandListener;
-                wakeup();
-            } finally {
-                enqueueValve.turnOn();
-            }
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    private LinkedBlockingQueue<Object> getMessageQueue() {
-        synchronized (lazyInitMutext) {
-            if (messageQueue == null) {
-                messageQueue = new LinkedBlockingQueue<Object>(this.asyncQueueDepth);
-            }
-            return messageQueue;
-        }
-    }
-
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public Object request(Object command, int timeout) throws IOException {
-        throw new AssertionError("Unsupported Method");
-    }
-
-    public TransportListener getTransportListener() {
-        return transportListener;
-    }
-
-    public <T> T narrow(Class<T> target) {
-        if (target.isAssignableFrom(getClass())) {
-            return target.cast(this);
-        }
-        return null;
-    }
-
-    public boolean isMarshal() {
-        return marshal;
-    }
-
-    public void setMarshal(boolean marshal) {
-        this.marshal = marshal;
-    }
-
-    public boolean isNetwork() {
-        return network;
-    }
-
-    public void setNetwork(boolean network) {
-        this.network = network;
-    }
-
-    @Override
-    public String toString() {
-        return location + "#" + id;
-    }
-
-    public String getRemoteAddress() {
-        if (peer != null) {
-            return peer.toString();
-        }
-        return null;
-    }
-
-    /**
-     * @return the async
-     */
-    public boolean isAsync() {
-        return async;
-    }
-
-    /**
-     * @param async the async to set
-     */
-    public void setAsync(boolean async) {
-        this.async = async;
-    }
-
-    /**
-     * @return the asyncQueueDepth
-     */
-    public int getAsyncQueueDepth() {
-        return asyncQueueDepth;
-    }
-
-    /**
-     * @param asyncQueueDepth the asyncQueueDepth to set
-     */
-    public void setAsyncQueueDepth(int asyncQueueDepth) {
-        this.asyncQueueDepth = asyncQueueDepth;
-    }
-
-    protected void wakeup() {
-        if (async) {
-            synchronized (lazyInitMutext) {
-                if (taskRunner == null) {
-                    taskRunner = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(this, "VMTransport: " + toString());
-                }
-            }
-            try {
-                taskRunner.wakeup();
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-            }
-        }
-    }
-
-    public boolean isFaultTolerant() {
-        return false;
-    }
-
-	public boolean isDisposed() {
-		return disposed;
-	}
-	
-	public boolean isConnected() {
-	    return started;
-	}
-
-	public void reconnect(URI uri) throws IOException {
-        throw new IOException("Not supported");
-    }
-
-    public boolean isReconnectSupported() {
-        return false;
-    }
-
-    public boolean isUpdateURIsSupported() {
-        return false;
-    }
-    public void updateURIs(boolean reblance,URI[] uris) throws IOException {
-        throw new IOException("Not supported");
-    }
-
-    public int getReceiveCounter() {
-        return receiveCounter;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
deleted file mode 100755
index dba6a8d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- * 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.transport.vm;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerFactoryHandler;
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.transport.MarshallingTransportFilter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.ServiceSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-public class VMTransportFactory extends TransportFactory {
-    
-    public static final ConcurrentHashMap<String, BrokerService> BROKERS = new ConcurrentHashMap<String, BrokerService>();
-    public static final ConcurrentHashMap<String, TransportConnector> CONNECTORS = new ConcurrentHashMap<String, TransportConnector>();
-    public static final ConcurrentHashMap<String, VMTransportServer> SERVERS = new ConcurrentHashMap<String, VMTransportServer>();
-    private static final Logger LOG = LoggerFactory.getLogger(VMTransportFactory.class);
-    
-    BrokerFactoryHandler brokerFactoryHandler;
-
-    public Transport doConnect(URI location) throws Exception {
-        return VMTransportServer.configure(doCompositeConnect(location));
-    }
-
-    public Transport doCompositeConnect(URI location) throws Exception {
-        URI brokerURI;
-        String host;
-        Map<String, String> options;
-        boolean create = true;
-        int waitForStart = -1;
-        CompositeData data = URISupport.parseComposite(location);
-        if (data.getComponents().length == 1 && "broker".equals(data.getComponents()[0].getScheme())) {
-            brokerURI = data.getComponents()[0];
-            CompositeData brokerData = URISupport.parseComposite(brokerURI);
-            host = (String)brokerData.getParameters().get("brokerName");
-            if (host == null) {
-                host = "localhost";
-            }
-            if (brokerData.getPath() != null) {
-                host = brokerData.getPath();
-            }
-            options = data.getParameters();
-            location = new URI("vm://" + host);
-        } else {
-            // If using the less complex vm://localhost?broker.persistent=true
-            // form
-            try {
-                host = extractHost(location);
-                options = URISupport.parseParameters(location);
-                String config = (String)options.remove("brokerConfig");
-                if (config != null) {
-                    brokerURI = new URI(config);
-                } else {
-                    Map brokerOptions = IntrospectionSupport.extractProperties(options, "broker.");
-                    brokerURI = new URI("broker://()/" + host + "?"
-                                        + URISupport.createQueryString(brokerOptions));
-                }
-                if ("false".equals(options.remove("create"))) {
-                    create = false;
-                }
-                String waitForStartString = options.remove("waitForStart");
-                if (waitForStartString != null) {
-                    waitForStart = Integer.parseInt(waitForStartString);
-                }
-            } catch (URISyntaxException e1) {
-                throw IOExceptionSupport.create(e1);
-            }
-            location = new URI("vm://" + host);
-        }
-        if (host == null) {
-            host = "localhost";
-        }
-        VMTransportServer server = SERVERS.get(host);
-        // validate the broker is still active
-        if (!validateBroker(host) || server == null) {
-            BrokerService broker = null;
-            // Synchronize on the registry so that multiple concurrent threads
-            // doing this do not think that the broker has not been created and
-            // cause multiple brokers to be started.
-            synchronized (BrokerRegistry.getInstance().getRegistryMutext()) {
-                broker = lookupBroker(BrokerRegistry.getInstance(), host, waitForStart);
-                if (broker == null) {
-                    if (!create) {
-                        throw new IOException("Broker named '" + host + "' does not exist.");
-                    }
-                    try {
-                        if (brokerFactoryHandler != null) {
-                            broker = brokerFactoryHandler.createBroker(brokerURI);
-                        } else {
-                            broker = BrokerFactory.createBroker(brokerURI);
-                        }
-                        broker.start();
-                        MDC.put("activemq.broker", broker.getBrokerName());
-                    } catch (URISyntaxException e) {
-                        throw IOExceptionSupport.create(e);
-                    }
-                    BROKERS.put(host, broker);
-                    BrokerRegistry.getInstance().getRegistryMutext().notifyAll();
-                }
-
-                server = SERVERS.get(host);
-                if (server == null) {
-                    server = (VMTransportServer)bind(location, true);
-                    TransportConnector connector = new TransportConnector(server);
-                    connector.setBrokerService(broker);
-                    connector.setUri(location);
-                    connector.setTaskRunnerFactory(broker.getTaskRunnerFactory());
-                    connector.start();
-                    CONNECTORS.put(host, connector);
-                }
-
-            }
-        }
-
-        VMTransport vmtransport = server.connect();
-        IntrospectionSupport.setProperties(vmtransport.peer, new HashMap<String,String>(options));
-        IntrospectionSupport.setProperties(vmtransport, options);
-        Transport transport = vmtransport;
-        if (vmtransport.isMarshal()) {
-            Map<String, String> optionsCopy = new HashMap<String, String>(options);
-            transport = new MarshallingTransportFilter(transport, createWireFormat(options),
-                                                       createWireFormat(optionsCopy));
-        }
-        if (!options.isEmpty()) {
-            throw new IllegalArgumentException("Invalid connect parameters: " + options);
-        }
-        return transport;
-    }
-
-   private static String extractHost(URI location) {
-       String host = location.getHost();
-       if (host == null || host.length() == 0) {
-           host = location.getAuthority();
-           if (host == null || host.length() == 0) {
-               host = "localhost";
-           }
-       }
-       return host;
-    }
-
-/**
-    * @param registry
-    * @param brokerName
-    * @param waitForStart - time in milliseconds to wait for a broker to appear
-    * @return
-    */
-    private BrokerService lookupBroker(final BrokerRegistry registry, final String brokerName, int waitForStart) {
-        BrokerService broker = null;
-        synchronized(registry.getRegistryMutext()) {
-            broker = registry.lookup(brokerName);
-            if (broker == null && waitForStart > 0) {
-                final long expiry = System.currentTimeMillis() + waitForStart;
-                while (broker == null  && expiry > System.currentTimeMillis()) {
-                    long timeout = Math.max(0, expiry - System.currentTimeMillis());
-                    try {
-                        LOG.debug("waiting for broker named: " + brokerName + " to start");
-                        registry.getRegistryMutext().wait(timeout);
-                    } catch (InterruptedException ignored) {
-                    }
-                    broker = registry.lookup(brokerName);
-                }
-            }
-        }
-        return broker;
-    }
-
-    public TransportServer doBind(URI location) throws IOException {
-        return bind(location, false);
-    }
-
-    /**
-     * @param location
-     * @return the TransportServer
-     * @throws IOException
-     */
-    private TransportServer bind(URI location, boolean dispose) throws IOException {
-        String host = extractHost(location);
-        LOG.debug("binding to broker: " + host);
-        VMTransportServer server = new VMTransportServer(location, dispose);
-        Object currentBoundValue = SERVERS.get(host);
-        if (currentBoundValue != null) {
-            throw new IOException("VMTransportServer already bound at: " + location);
-        }
-        SERVERS.put(host, server);
-        return server;
-    }
-
-    public static void stopped(VMTransportServer server) {
-        String host = extractHost(server.getBindURI());
-        stopped(host);
-    }
-
-    public static void stopped(String host) {
-        SERVERS.remove(host);
-        TransportConnector connector = CONNECTORS.remove(host);
-        if (connector != null) {
-            LOG.debug("Shutting down VM connectors for broker: " + host);
-            ServiceSupport.dispose(connector);
-            BrokerService broker = BROKERS.remove(host);
-            if (broker != null) {
-                ServiceSupport.dispose(broker);
-            }
-            MDC.remove("activemq.broker");
-        }
-    }
-
-    public BrokerFactoryHandler getBrokerFactoryHandler() {
-        return brokerFactoryHandler;
-    }
-
-    public void setBrokerFactoryHandler(BrokerFactoryHandler brokerFactoryHandler) {
-        this.brokerFactoryHandler = brokerFactoryHandler;
-    }
-
-    private boolean validateBroker(String host) {
-        boolean result = true;
-        if (BROKERS.containsKey(host) || SERVERS.containsKey(host) || CONNECTORS.containsKey(host)) {
-            // check the broker is still in the BrokerRegistry
-            TransportConnector connector = CONNECTORS.get(host);
-            if (BrokerRegistry.getInstance().lookup(host) == null
-                || (connector != null && connector.getBroker().isStopped())) {
-                result = false;
-                // clean-up
-                BROKERS.remove(host);
-                SERVERS.remove(host);
-                if (connector != null) {
-                    CONNECTORS.remove(host);
-                    if (connector != null) {
-                        ServiceSupport.dispose(connector);
-                    }
-                }
-            }
-        }
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportServer.java b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportServer.java
deleted file mode 100755
index 1313427..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportServer.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * 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.transport.vm;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.URI;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.transport.MutexTransport;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.TransportServer;
-
-/**
- * Broker side of the VMTransport
- */
-public class VMTransportServer implements TransportServer {
-
-    private TransportAcceptListener acceptListener;
-    private final URI location;
-    private boolean disposed;
-
-    private final AtomicInteger connectionCount = new AtomicInteger(0);
-    private final boolean disposeOnDisconnect;
-
-    /**
-     * @param location
-     * @param disposeOnDisconnect
-     */
-    public VMTransportServer(URI location, boolean disposeOnDisconnect) {
-        this.location = location;
-        this.disposeOnDisconnect = disposeOnDisconnect;
-    }
-
-    /**
-     * @return a pretty print of this
-     */
-    public String toString() {
-        return "VMTransportServer(" + location + ")";
-    }
-
-    /**
-     * @return new VMTransport
-     * @throws IOException
-     */
-    public VMTransport connect() throws IOException {
-        TransportAcceptListener al;
-        synchronized (this) {
-            if (disposed) {
-                throw new IOException("Server has been disposed.");
-            }
-            al = acceptListener;
-        }
-        if (al == null) {
-            throw new IOException("Server TransportAcceptListener is null.");
-        }
-
-        connectionCount.incrementAndGet();
-        VMTransport client = new VMTransport(location) {
-            public void stop() throws Exception {
-            	if (stopping.compareAndSet(false, true) && !disposed) {
-					super.stop();
-					if (connectionCount.decrementAndGet() == 0
-							&& disposeOnDisconnect) {
-						VMTransportServer.this.stop();
-					}
-				}
-            };
-        };
-
-        VMTransport server = new VMTransport(location);
-        client.setPeer(server);
-        server.setPeer(client);
-        al.onAccept(configure(server));
-        return client;
-    }
-
-    /**
-     * Configure transport
-     * 
-     * @param transport
-     * @return the Transport
-     */
-    public static Transport configure(Transport transport) {
-        transport = new MutexTransport(transport);
-        transport = new ResponseCorrelator(transport);
-        return transport;
-    }
-
-    /**
-     * Set the Transport accept listener for new Connections
-     * 
-     * @param acceptListener
-     */
-    public synchronized void setAcceptListener(TransportAcceptListener acceptListener) {
-        this.acceptListener = acceptListener;
-    }
-
-    public void start() throws IOException {
-    }
-
-    public void stop() throws IOException {
-        VMTransportFactory.stopped(this);
-    }
-
-    public URI getConnectURI() {
-        return location;
-    }
-
-    public URI getBindURI() {
-        return location;
-    }
-
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-    }
-
-    public InetSocketAddress getSocketAddress() {
-        return null;
-    }
-    
-    public int getConnectionCount() {
-        return connectionCount.intValue();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/package.html
deleted file mode 100755
index f0614cd..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-In-JVM based Transport implementation.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/DefaultUsageCapacity.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/DefaultUsageCapacity.java
deleted file mode 100755
index cdaf7cc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/DefaultUsageCapacity.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.usage;
-
-
-
-/**
- Identify if a limit has been reached
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public class DefaultUsageCapacity implements UsageCapacity{
-
-    private long limit;
-    
-    /**
-     * @param size
-     * @return true if the limit is reached
-     * @see org.apache.activemq.usage.UsageCapacity#isLimit(long)
-     */
-    public boolean isLimit(long size) {
-        return size >= limit;
-    }
-
-    
-    /**
-     * @return the limit
-     */
-    public final long getLimit(){
-        return this.limit;
-    }
-
-    
-    /**
-     * @param limit the limit to set
-     */
-    public final void setLimit(long limit){
-        this.limit=limit;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/MemoryUsage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/MemoryUsage.java
deleted file mode 100755
index 4030e33..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/MemoryUsage.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.usage;
-
-/**
- * Used to keep track of how much of something is being used so that a
- * productive working set usage can be controlled. Main use case is manage
- * memory usage.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class MemoryUsage extends Usage<MemoryUsage> {
-
-    private long usage;
-
-    public MemoryUsage() {
-        this(null, null);
-    }
-
-    /**
-     * Create the memory manager linked to a parent. When the memory manager is
-     * linked to a parent then when usage increased or decreased, the parent's
-     * usage is also increased or decreased.
-     * 
-     * @param parent
-     */
-    public MemoryUsage(MemoryUsage parent) {
-        this(parent, "default");
-    }
-
-    public MemoryUsage(String name) {
-        this(null, name);
-    }
-
-    public MemoryUsage(MemoryUsage parent, String name) {
-        this(parent, name, 1.0f);
-    }
-
-    public MemoryUsage(MemoryUsage parent, String name, float portion) {
-        super(parent, name, portion);
-    }
-
-    /**
-     * @throws InterruptedException
-     */
-    public void waitForSpace() throws InterruptedException {
-        if (parent != null) {
-            parent.waitForSpace();
-        }
-        synchronized (usageMutex) {
-            for (int i = 0; percentUsage >= 100; i++) {
-                usageMutex.wait();
-            }
-        }
-    }
-
-    /**
-     * @param timeout
-     * @throws InterruptedException
-     * @return true if space
-     */
-    public boolean waitForSpace(long timeout) throws InterruptedException {
-        if (parent != null) {
-            if (!parent.waitForSpace(timeout)) {
-                return false;
-            }
-        }
-        synchronized (usageMutex) {
-            if (percentUsage >= 100) {
-                usageMutex.wait(timeout);
-            }
-            return percentUsage < 100;
-        }
-    }
-
-    public boolean isFull() {
-        if (parent != null && parent.isFull()) {
-            return true;
-        }
-        synchronized (usageMutex) {
-            return percentUsage >= 100;
-        }
-    }
-
-    /**
-     * Tries to increase the usage by value amount but blocks if this object is
-     * currently full.
-     * 
-     * @param value
-     * @throws InterruptedException
-     */
-    public void enqueueUsage(long value) throws InterruptedException {
-        waitForSpace();
-        increaseUsage(value);
-    }
-
-    /**
-     * Increases the usage by the value amount.
-     * 
-     * @param value
-     */
-    public void increaseUsage(long value) {
-        if (value == 0) {
-            return;
-        }
-        int percentUsage;
-        synchronized (usageMutex) {
-            usage += value;
-            percentUsage = caclPercentUsage();
-        }
-        setPercentUsage(percentUsage);
-        if (parent != null) {
-            ((MemoryUsage)parent).increaseUsage(value);
-        }
-    }
-
-    /**
-     * Decreases the usage by the value amount.
-     * 
-     * @param value
-     */
-    public void decreaseUsage(long value) {
-        if (value == 0) {
-            return;
-        }
-        int percentUsage;
-        synchronized (usageMutex) {
-            usage -= value;
-            percentUsage = caclPercentUsage();
-        }
-        setPercentUsage(percentUsage);
-        if (parent != null) {
-            parent.decreaseUsage(value);
-        }
-    }
-
-    protected long retrieveUsage() {
-        return usage;
-    }
-
-    public long getUsage() {
-        return usage;
-    }
-
-    public void setUsage(long usage) {
-        this.usage = usage;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/StoreUsage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/StoreUsage.java
deleted file mode 100755
index a56c382..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/StoreUsage.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.usage;
-
-import org.apache.activemq.store.PersistenceAdapter;
-
-/**
- * Used to keep track of how much of something is being used so that a
- * productive working set usage can be controlled. Main use case is manage
- * memory usage.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class StoreUsage extends Usage<StoreUsage> {
-
-    private PersistenceAdapter store;
-
-    public StoreUsage() {
-        super(null, null, 1.0f);
-    }
-
-    public StoreUsage(String name, PersistenceAdapter store) {
-        super(null, name, 1.0f);
-        this.store = store;
-    }
-
-    public StoreUsage(StoreUsage parent, String name) {
-        super(parent, name, 1.0f);
-        this.store = parent.store;
-    }
-
-    protected long retrieveUsage() {
-        if (store == null)
-            return 0;
-        return store.size();
-    }
-
-    public PersistenceAdapter getStore() {
-        return store;
-    }
-
-    public void setStore(PersistenceAdapter store) {
-        this.store = store;
-        onLimitChange();
-    }
-
-    @Override
-    public int getPercentUsage() {
-        synchronized (usageMutex) {
-            percentUsage = caclPercentUsage();
-            return super.getPercentUsage();
-        }
-    }
-
-    @Override
-    public boolean waitForSpace(long timeout, int highWaterMark) throws InterruptedException {
-        if (parent != null) {
-            if (parent.waitForSpace(timeout, highWaterMark)) {
-                return true;
-            }
-        }
-
-        return super.waitForSpace(timeout, highWaterMark);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/SystemUsage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/SystemUsage.java
deleted file mode 100755
index ff80f2f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/SystemUsage.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/**
- * 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.usage;
-
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ThreadPoolExecutor;
-import org.apache.activemq.Service;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-
-/**
- * Holder for Usage instances for memory, store and temp files Main use case is
- * manage memory usage.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class SystemUsage implements Service {
-
-    private SystemUsage parent;
-    private String name;
-    private MemoryUsage memoryUsage;
-    private StoreUsage storeUsage;
-    private TempUsage tempUsage;
-    private ThreadPoolExecutor executor;
-
-    /**
-     * True if someone called setSendFailIfNoSpace() on this particular usage
-     * manager
-     */
-    private boolean sendFailIfNoSpaceExplicitySet;
-    private boolean sendFailIfNoSpace;
-    private boolean sendFailIfNoSpaceAfterTimeoutExplicitySet;
-    private long sendFailIfNoSpaceAfterTimeout = 0;
-
-    private final List<SystemUsage> children = new CopyOnWriteArrayList<SystemUsage>();
-
-    public SystemUsage() {
-        this("default", null, null);
-    }
-
-    public SystemUsage(String name, PersistenceAdapter adapter, PListStore tempStore) {
-        this.parent = null;
-        this.name = name;
-        this.memoryUsage = new MemoryUsage(name + ":memory");
-        this.storeUsage = new StoreUsage(name + ":store", adapter);
-        this.tempUsage = new TempUsage(name + ":temp", tempStore);
-        this.memoryUsage.setExecutor(getExecutor());
-        this.storeUsage.setExecutor(getExecutor());
-        this.tempUsage.setExecutor(getExecutor());
-    }
-
-    public SystemUsage(SystemUsage parent, String name) {
-        this.parent = parent;
-        this.executor = parent.getExecutor();
-        this.name = name;
-        this.memoryUsage = new MemoryUsage(parent.memoryUsage, name + ":memory");
-        this.storeUsage = new StoreUsage(parent.storeUsage, name + ":store");
-        this.tempUsage = new TempUsage(parent.tempUsage, name + ":temp");
-        this.memoryUsage.setExecutor(getExecutor());
-        this.storeUsage.setExecutor(getExecutor());
-        this.tempUsage.setExecutor(getExecutor());
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * @return the memoryUsage
-     */
-    public MemoryUsage getMemoryUsage() {
-        return this.memoryUsage;
-    }
-
-    /**
-     * @return the storeUsage
-     */
-    public StoreUsage getStoreUsage() {
-        return this.storeUsage;
-    }
-
-    /**
-     * @return the tempDiskUsage
-     */
-    public TempUsage getTempUsage() {
-        return this.tempUsage;
-    }
-
-    @Override
-    public String toString() {
-        return "UsageManager(" + getName() + ")";
-    }
-
-    public void start() {
-        if (parent != null) {
-            parent.addChild(this);
-        }
-        this.memoryUsage.start();
-        this.storeUsage.start();
-        this.tempUsage.start();
-    }
-
-    public void stop() {
-        if (parent != null) {
-            parent.removeChild(this);
-        }
-        this.memoryUsage.stop();
-        this.storeUsage.stop();
-        this.tempUsage.stop();
-    }
-
-    /**
-     * Sets whether or not a send() should fail if there is no space free. The
-     * default value is false which means to block the send() method until space
-     * becomes available
-     */
-    public void setSendFailIfNoSpace(boolean failProducerIfNoSpace) {
-        sendFailIfNoSpaceExplicitySet = true;
-        this.sendFailIfNoSpace = failProducerIfNoSpace;
-    }
-
-    public boolean isSendFailIfNoSpace() {
-        if (sendFailIfNoSpaceExplicitySet || parent == null) {
-            return sendFailIfNoSpace;
-        } else {
-            return parent.isSendFailIfNoSpace();
-        }
-    }
-
-    private void addChild(SystemUsage child) {
-        children.add(child);
-    }
-
-    private void removeChild(SystemUsage child) {
-        children.remove(child);
-    }
-
-    public SystemUsage getParent() {
-        return parent;
-    }
-
-    public void setParent(SystemUsage parent) {
-        this.parent = parent;
-    }
-
-    public boolean isSendFailIfNoSpaceExplicitySet() {
-        return sendFailIfNoSpaceExplicitySet;
-    }
-
-    public void setSendFailIfNoSpaceExplicitySet(boolean sendFailIfNoSpaceExplicitySet) {
-        this.sendFailIfNoSpaceExplicitySet = sendFailIfNoSpaceExplicitySet;
-    }
-
-    public long getSendFailIfNoSpaceAfterTimeout() {
-        if (sendFailIfNoSpaceAfterTimeoutExplicitySet || parent == null) {
-            return sendFailIfNoSpaceAfterTimeout;
-        } else {
-            return parent.getSendFailIfNoSpaceAfterTimeout();
-        }
-    }
-
-    public void setSendFailIfNoSpaceAfterTimeout(long sendFailIfNoSpaceAfterTimeout) {
-        this.sendFailIfNoSpaceAfterTimeoutExplicitySet = true;
-        this.sendFailIfNoSpaceAfterTimeout = sendFailIfNoSpaceAfterTimeout;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-        this.memoryUsage.setName(name + ":memory");
-        this.storeUsage.setName(name + ":store");
-        this.tempUsage.setName(name + ":temp");
-    }
-
-    public void setMemoryUsage(MemoryUsage memoryUsage) {
-        if (memoryUsage.getName() == null) {
-            memoryUsage.setName(this.memoryUsage.getName());
-        }
-        if (parent != null) {
-            memoryUsage.setParent(parent.memoryUsage);
-        }
-        this.memoryUsage = memoryUsage;
-        this.memoryUsage.setExecutor(getExecutor());
-    }
-
-    public void setStoreUsage(StoreUsage storeUsage) {
-        if (storeUsage.getStore() == null) {
-            storeUsage.setStore(this.storeUsage.getStore());
-        }
-        if (storeUsage.getName() == null) {
-            storeUsage.setName(this.storeUsage.getName());
-        }
-        if (parent != null) {
-            storeUsage.setParent(parent.storeUsage);
-        }
-        this.storeUsage = storeUsage;
-        this.storeUsage.setExecutor(executor);
-
-    }
-
-    public void setTempUsage(TempUsage tempDiskUsage) {
-        if (tempDiskUsage.getStore() == null) {
-            tempDiskUsage.setStore(this.tempUsage.getStore());
-        }
-        if (tempDiskUsage.getName() == null) {
-            tempDiskUsage.setName(this.tempUsage.getName());
-        }
-        if (parent != null) {
-            tempDiskUsage.setParent(parent.tempUsage);
-        }
-        this.tempUsage = tempDiskUsage;
-        this.tempUsage.setExecutor(getExecutor());
-    }
-
-    /**
-     * @return the executor
-     */
-    public ThreadPoolExecutor getExecutor() {
-        return this.executor;
-    }
-
-    /**
-     * @param executor
-     *            the executor to set
-     */
-    public void setExecutor(ThreadPoolExecutor executor) {
-        this.executor = executor;
-        if (this.memoryUsage != null) {
-            this.memoryUsage.setExecutor(this.executor);
-        }
-        if (this.storeUsage != null) {
-            this.storeUsage.setExecutor(this.executor);
-        }
-        if (this.tempUsage != null) {
-            this.tempUsage.setExecutor(this.executor);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/TempUsage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/TempUsage.java
deleted file mode 100755
index 7a8e24e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/TempUsage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.usage;
-
-import org.apache.activemq.store.kahadb.plist.PListStore;
-
-
-/**
- * Used to keep track of how much of something is being used so that a
- * productive working set usage can be controlled. Main use case is manage
- * memory usage.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public class TempUsage extends Usage<TempUsage> {
-
-    private PListStore store;
-
-    public TempUsage() {
-        super(null, null, 1.0f);
-    }
-
-    public TempUsage(String name, PListStore store) {
-        super(null, name, 1.0f);
-        this.store = store;
-    }
-
-    public TempUsage(TempUsage parent, String name) {
-        super(parent, name, 1.0f);
-        this.store = parent.store;
-    }
-
-    @Override
-    protected long retrieveUsage() {
-        if (store == null) {
-            return 0;
-        }
-        return store.size();
-    }
-
-    public PListStore getStore() {
-        return store;
-    }
-
-    public void setStore(PListStore store) {
-        this.store = store;
-        onLimitChange();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java
deleted file mode 100755
index 6c0fbe3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java
+++ /dev/null
@@ -1,414 +0,0 @@
-/**
- * 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.usage;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.activemq.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Used to keep track of how much of something is being used so that a
- * productive working set usage can be controlled. Main use case is manage
- * memory usage.
- * 
- * @org.apache.xbean.XBean
- * 
- */
-public abstract class Usage<T extends Usage> implements Service {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Usage.class);
-    protected final Object usageMutex = new Object();
-    protected int percentUsage;
-    protected T parent;
-    private UsageCapacity limiter = new DefaultUsageCapacity();
-    private int percentUsageMinDelta = 1;
-    private final List<UsageListener> listeners = new CopyOnWriteArrayList<UsageListener>();
-    private final boolean debug = LOG.isDebugEnabled();
-    private String name;
-    private float usagePortion = 1.0f;
-    private final List<T> children = new CopyOnWriteArrayList<T>();
-    private final List<Runnable> callbacks = new LinkedList<Runnable>();
-    private int pollingTime = 100;
-    private final AtomicBoolean started=new AtomicBoolean();
-    private ThreadPoolExecutor executor;
-    public Usage(T parent, String name, float portion) {
-        this.parent = parent;
-        this.usagePortion = portion;
-        if (parent != null) {
-            this.limiter.setLimit((long)(parent.getLimit() * portion));
-            name = parent.name + ":" + name;
-        }
-        this.name = name;
-    }
-
-    protected abstract long retrieveUsage();
-
-    /**
-     * @throws InterruptedException
-     */
-    public void waitForSpace() throws InterruptedException {
-        waitForSpace(0);
-    }
-
-    public boolean waitForSpace(long timeout) throws InterruptedException {
-        return waitForSpace(timeout, 100);
-    }
-    
-    /**
-     * @param timeout
-     * @throws InterruptedException
-     * @return true if space
-     */
-    public boolean waitForSpace(long timeout, int highWaterMark) throws InterruptedException {
-        if (parent != null) {
-            if (!parent.waitForSpace(timeout, highWaterMark)) {
-                return false;
-            }
-        }
-        synchronized (usageMutex) {
-            percentUsage=caclPercentUsage();
-            if (percentUsage >= highWaterMark) {
-                long deadline = timeout > 0 ? System.currentTimeMillis() + timeout : Long.MAX_VALUE;
-                long timeleft = deadline;
-                while (timeleft > 0) {
-                    percentUsage=caclPercentUsage();
-                    if (percentUsage >= highWaterMark) {
-                        usageMutex.wait(pollingTime);
-                        timeleft = deadline - System.currentTimeMillis();
-                    } else {
-                        break;
-                    }
-                }
-            }
-            return percentUsage < highWaterMark;
-        }
-    }
-
-    public boolean isFull() {
-        return isFull(100);
-    }
-    
-    public boolean isFull(int highWaterMark) {
-        if (parent != null && parent.isFull(highWaterMark)) {
-            return true;
-        }
-        synchronized (usageMutex) {
-            percentUsage=caclPercentUsage();
-            return percentUsage >= highWaterMark;
-        }
-    }
-
-    public void addUsageListener(UsageListener listener) {
-        listeners.add(listener);
-    }
-
-    public void removeUsageListener(UsageListener listener) {
-        listeners.remove(listener);
-    }
-
-    public long getLimit() {
-        synchronized (usageMutex) {
-            return limiter.getLimit();
-        }
-    }
-
-    /**
-     * Sets the memory limit in bytes. Setting the limit in bytes will set the
-     * usagePortion to 0 since the UsageManager is not going to be portion based
-     * off the parent.
-     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
-     * 
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     */
-    public void setLimit(long limit) {
-        if (percentUsageMinDelta < 0) {
-            throw new IllegalArgumentException("percentUsageMinDelta must be greater or equal to 0");
-        }
-        synchronized (usageMutex) {
-            this.limiter.setLimit(limit);
-            this.usagePortion = 0;
-        }
-        onLimitChange();
-    }
-
-    protected void onLimitChange() {
-        // We may need to calculate the limit
-        if (usagePortion > 0 && parent != null) {
-            synchronized (usageMutex) {
-                this.limiter.setLimit((long)(parent.getLimit() * usagePortion));
-            }
-        }
-        // Reset the percent currently being used.
-        int percentUsage;
-        synchronized (usageMutex) {
-            percentUsage = caclPercentUsage();
-        }
-        setPercentUsage(percentUsage);
-        // Let the children know that the limit has changed. They may need to
-        // set
-        // their limits based on ours.
-        for (T child : children) {
-            child.onLimitChange();
-        }
-    }
-
-    public float getUsagePortion() {
-        synchronized (usageMutex) {
-            return usagePortion;
-        }
-    }
-
-    public void setUsagePortion(float usagePortion) {
-        synchronized (usageMutex) {
-            this.usagePortion = usagePortion;
-        }
-        onLimitChange();
-    }
-
-    public int getPercentUsage() {
-        synchronized (usageMutex) {
-            return percentUsage;
-        }
-    }
-
-    public int getPercentUsageMinDelta() {
-        synchronized (usageMutex) {
-            return percentUsageMinDelta;
-        }
-    }
-
-    /**
-     * Sets the minimum number of percentage points the usage has to change
-     * before a UsageListener event is fired by the manager.
-     * 
-     * @param percentUsageMinDelta
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     */
-    public void setPercentUsageMinDelta(int percentUsageMinDelta) {
-        if (percentUsageMinDelta < 1) {
-            throw new IllegalArgumentException("percentUsageMinDelta must be greater than 0");
-        }
-        int percentUsage;
-        synchronized (usageMutex) {
-            this.percentUsageMinDelta = percentUsageMinDelta;
-            percentUsage = caclPercentUsage();
-        }
-        setPercentUsage(percentUsage);
-    }
-
-    public long getUsage() {
-        synchronized (usageMutex) {
-            return retrieveUsage();
-        }
-    }
-
-    protected void setPercentUsage(int value) {
-        synchronized (usageMutex) {
-            int oldValue = percentUsage;
-            percentUsage = value;
-            if (oldValue != value) {
-                fireEvent(oldValue, value);
-            }
-        }
-    }
-
-    protected int caclPercentUsage() {
-        if (limiter.getLimit() == 0) {
-            return 0;
-        }
-        return (int)((((retrieveUsage() * 100) / limiter.getLimit()) / percentUsageMinDelta) * percentUsageMinDelta);
-    }
-
-    private void fireEvent(final int oldPercentUsage, final int newPercentUsage) {
-        if (debug) {
-            LOG.debug(getName() + ": usage change from: " + oldPercentUsage + "% of available memory, to: " 
-                + newPercentUsage + "% of available memory");
-        }   
-        if (started.get()) {
-            // Switching from being full to not being full..
-            if (oldPercentUsage >= 100 && newPercentUsage < 100) {
-                synchronized (usageMutex) {
-                    usageMutex.notifyAll();
-                    if (!callbacks.isEmpty()) {
-                        for (Iterator<Runnable> iter = new ArrayList<Runnable>(callbacks).iterator(); iter.hasNext();) {
-                            Runnable callback = iter.next();
-                            getExecutor().execute(callback);
-                        }
-                        callbacks.clear();
-                    }
-                }
-            }
-            if (!listeners.isEmpty()) {
-                // Let the listeners know on a separate thread
-                Runnable listenerNotifier = new Runnable() {
-                    public void run() {
-                        for (Iterator<UsageListener> iter = listeners.iterator(); iter.hasNext();) {
-                            UsageListener l = iter.next();
-                            l.onUsageChanged(Usage.this, oldPercentUsage, newPercentUsage);
-                        }
-                    }
-                };
-                if (started.get()) {
-                    getExecutor().execute(listenerNotifier);
-                } else {
-                    LOG.warn("Not notifying memory usage change to listeners on shutdown");
-                }
-            }
-        }
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public String toString() {
-        return "Usage(" + getName() + ") percentUsage=" + percentUsage + "%, usage=" + retrieveUsage() + " limit=" + limiter.getLimit() + " percentUsageMinDelta=" + percentUsageMinDelta + "%";
-    }
-
-    @SuppressWarnings("unchecked")
-    public void start() {
-        if (started.compareAndSet(false, true)){
-            if (parent != null) {
-                parent.addChild(this);
-            }
-            for (T t:children) {
-                t.start();
-            }
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    public void stop() {
-        if (started.compareAndSet(true, false)){
-            if (parent != null) {
-                parent.removeChild(this);
-            }
-            
-            //clear down any callbacks
-            synchronized (usageMutex) {
-                usageMutex.notifyAll();
-                for (Iterator<Runnable> iter = new ArrayList<Runnable>(this.callbacks).iterator(); iter.hasNext();) {
-                    Runnable callback = iter.next();
-                    callback.run();
-                }
-                this.callbacks.clear();
-            }
-            for (T t:children) {
-                t.stop();
-            }
-        }
-    }
-
-    private void addChild(T child) {
-        children.add(child);
-        if (started.get()) {
-            child.start();
-        }
-    }
-
-    private void removeChild(T child) {
-        children.remove(child);
-    }
-
-    /**
-     * @param callback
-     * @return true if the UsageManager was full. The callback will only be
-     *         called if this method returns true.
-     */
-    public boolean notifyCallbackWhenNotFull(final Runnable callback) {
-        if (parent != null) {
-            Runnable r = new Runnable() {
-
-                public void run() {
-                    synchronized (usageMutex) {
-                        if (percentUsage >= 100) {
-                            callbacks.add(callback);
-                        } else {
-                            callback.run();
-                        }
-                    }
-                }
-            };
-            if (parent.notifyCallbackWhenNotFull(r)) {
-                return true;
-            }
-        }
-        synchronized (usageMutex) {
-            if (percentUsage >= 100) {
-                callbacks.add(callback);
-                return true;
-            } else {
-                return false;
-            }
-        }
-    }
-
-    /**
-     * @return the limiter
-     */
-    public UsageCapacity getLimiter() {
-        return this.limiter;
-    }
-
-    /**
-     * @param limiter the limiter to set
-     */
-    public void setLimiter(UsageCapacity limiter) {
-        this.limiter = limiter;
-    }
-
-    /**
-     * @return the pollingTime
-     */
-    public int getPollingTime() {
-        return this.pollingTime;
-    }
-
-    /**
-     * @param pollingTime the pollingTime to set
-     */
-    public void setPollingTime(int pollingTime) {
-        this.pollingTime = pollingTime;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public T getParent() {
-        return parent;
-    }
-
-    public void setParent(T parent) {
-        this.parent = parent;
-    }
-    
-    public void setExecutor (ThreadPoolExecutor executor) {
-        this.executor = executor;
-    }
-    public ThreadPoolExecutor getExecutor() {
-        return executor;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/UsageCapacity.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/UsageCapacity.java
deleted file mode 100755
index 98e329b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/UsageCapacity.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.usage;
-
-
-
-/**
- Identify if a limit has been reached
- * 
- * @org.apache.xbean.XBean
- * 
- * 
- */
-public interface UsageCapacity{
-
-    /**
-     * Has the limit been reached ?
-     * 
-     * @param size
-     * @return true if it has
-     */
-    boolean isLimit(long size);
-    
-    
-    /**
-     * @return the limit
-     */
-    long getLimit();
-    
-    /**
-     * @param limit the limit to set
-     */
-    void setLimit(long limit);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/UsageListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/usage/UsageListener.java
deleted file mode 100755
index 666d8f4..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/usage/UsageListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * 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.usage;
-
-public interface UsageListener {
-    void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage);
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ActiveMQMessageUtils.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ActiveMQMessageUtils.java
deleted file mode 100644
index 42f39ee..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ActiveMQMessageUtils.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.util;
-
-import org.apache.activemq.command.ActiveMQMessage;
-
-/**
- * Message utilities
- *
- */
-public class ActiveMQMessageUtils {
-    
-    /**
-     * Determine the size on the wire for a message
-     * @param message
-     * @return
-     */
-    public static int getWireSize(ActiveMQMessage message) {
-        int size =0;
-        if (message.getMarshalledProperties() != null) {
-            size += message.getMarshalledProperties().getLength();
-        }
-        if (message.getContent() != null) {
-            size += message.getContent().getLength();
-        }
-        return size;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArray.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArray.java
deleted file mode 100755
index 6c28f31..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArray.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * 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.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-
-/**
- * Simple BitArray to enable setting multiple boolean values efficently Used
- * instead of BitSet because BitSet does not allow for efficent serialization.
- * Will store up to 64 boolean values
- * 
- * 
- */
-public class BitArray implements Serializable {
-    
-    private static final long serialVersionUID = 1L;
-    
-    static final int LONG_SIZE = 64;
-    static final int INT_SIZE = 32;
-    static final int SHORT_SIZE = 16;
-    static final int BYTE_SIZE = 8;
-    private static final long[] BIT_VALUES = {0x0000000000000001L, 0x0000000000000002L, 0x0000000000000004L,
-                                              0x0000000000000008L, 0x0000000000000010L, 0x0000000000000020L,
-                                              0x0000000000000040L, 0x0000000000000080L, 0x0000000000000100L,
-                                              0x0000000000000200L, 0x0000000000000400L, 0x0000000000000800L,
-                                              0x0000000000001000L, 0x0000000000002000L, 0x0000000000004000L,
-                                              0x0000000000008000L, 0x0000000000010000L, 0x0000000000020000L,
-                                              0x0000000000040000L, 0x0000000000080000L, 0x0000000000100000L,
-                                              0x0000000000200000L, 0x0000000000400000L, 0x0000000000800000L,
-                                              0x0000000001000000L, 0x0000000002000000L, 0x0000000004000000L,
-                                              0x0000000008000000L, 0x0000000010000000L, 0x0000000020000000L,
-                                              0x0000000040000000L, 0x0000000080000000L, 0x0000000100000000L,
-                                              0x0000000200000000L, 0x0000000400000000L, 0x0000000800000000L,
-                                              0x0000001000000000L, 0x0000002000000000L, 0x0000004000000000L,
-                                              0x0000008000000000L, 0x0000010000000000L, 0x0000020000000000L,
-                                              0x0000040000000000L, 0x0000080000000000L, 0x0000100000000000L,
-                                              0x0000200000000000L, 0x0000400000000000L, 0x0000800000000000L,
-                                              0x0001000000000000L, 0x0002000000000000L, 0x0004000000000000L,
-                                              0x0008000000000000L, 0x0010000000000000L, 0x0020000000000000L,
-                                              0x0040000000000000L, 0x0080000000000000L, 0x0100000000000000L,
-                                              0x0200000000000000L, 0x0400000000000000L, 0x0800000000000000L,
-                                              0x1000000000000000L, 0x2000000000000000L, 0x4000000000000000L,
-                                              0x8000000000000000L};
-    private long bits;
-    private int length;
-
-    /**
-     * @return the length of bits set
-     */
-    public int length() {
-        return length;
-    }
-
-    /**
-     * @return the long containing the bits
-     */
-    public long getBits() {
-        return bits;
-    }
-
-    /**
-     * set the boolean value at the index
-     * 
-     * @param index
-     * @param flag
-     * @return the old value held at this index
-     */
-    public boolean set(int index, boolean flag) {
-        length = Math.max(length, index + 1);
-        boolean oldValue = (bits & BIT_VALUES[index]) != 0;
-        if (flag) {
-            bits |= BIT_VALUES[index];
-        } else if (oldValue) {
-            bits &= ~(BIT_VALUES[index]);
-        }
-        return oldValue;
-    }
-
-    /**
-     * @param index
-     * @return the boolean value at this index
-     */
-    public boolean get(int index) {
-        return (bits & BIT_VALUES[index]) != 0;
-    }
-
-    /**
-     * reset all the bit values to false
-     */
-    public void reset() {
-        bits = 0;
-    }
-
-    /**
-     * reset all the bits to the value supplied
-     * 
-     * @param bits
-     */
-    public void reset(long bits) {
-        this.bits = bits;
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws IOException {
-        writeToStream(out);
-    }
-    
-    private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
-        readFromStream(in);
-    }
-    
-    /**
-     * write the bits to an output stream
-     * 
-     * @param dataOut
-     * @throws IOException
-     */
-    public void writeToStream(DataOutput dataOut) throws IOException {
-        dataOut.writeByte(length);
-        if (length <= BYTE_SIZE) {
-            dataOut.writeByte((int)bits);
-        } else if (length <= SHORT_SIZE) {
-            dataOut.writeShort((short)bits);
-        } else if (length <= INT_SIZE) {
-            dataOut.writeInt((int)bits);
-        } else {
-            dataOut.writeLong(bits);
-        }
-    }
-
-    /**
-     * read the bits from an input stream
-     * 
-     * @param dataIn
-     * @throws IOException
-     */
-    public void readFromStream(DataInput dataIn) throws IOException {
-        length = dataIn.readByte();
-        if (length <= BYTE_SIZE) {
-            bits = dataIn.readByte();
-        } else if (length <= SHORT_SIZE) {
-            bits = dataIn.readShort();
-        } else if (length <= INT_SIZE) {
-            bits = dataIn.readInt();
-        } else {
-            bits = dataIn.readLong();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArrayBin.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArrayBin.java
deleted file mode 100755
index 592873b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArrayBin.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * 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.util;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-
-/**
- * Holder for many bitArrays - used for message audit
- * 
- * 
- */
-public class BitArrayBin implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-    private LinkedList<BitArray> list;
-    private int maxNumberOfArrays;
-    private int firstIndex = -1;
-    private long lastInOrderBit=-1;
-
-    /**
-     * Create a BitArrayBin to a certain window size (number of messages to
-     * keep)
-     * 
-     * @param windowSize
-     */
-    public BitArrayBin(int windowSize) {
-        maxNumberOfArrays = ((windowSize + 1) / BitArray.LONG_SIZE) + 1;
-        maxNumberOfArrays = Math.max(maxNumberOfArrays, 1);
-        list = new LinkedList<BitArray>();
-        for (int i = 0; i < maxNumberOfArrays; i++) {
-            list.add(null);
-        }
-    }
-
-    /**
-     * Set a bit
-     * 
-     * @param index
-     * @param value
-     * @return true if set
-     */
-    public boolean setBit(long index, boolean value) {
-        boolean answer = false;
-        BitArray ba = getBitArray(index);
-        if (ba != null) {
-            int offset = getOffset(index);
-            if (offset >= 0) {
-                answer = ba.set(offset, value);
-            }
-        }
-        return answer;
-    }
-    
-    /**
-     * Test if in order
-     * @param index
-     * @return true if next message is in order
-     */
-    public boolean isInOrder(long index) {
-        boolean result = false;
-        if (lastInOrderBit == -1) {
-            result = true;
-        } else {
-            result = lastInOrderBit + 1 == index;
-        }
-        lastInOrderBit = index;
-        return result;
-
-    }
-
-    /**
-     * Get the boolean value at the index
-     * 
-     * @param index
-     * @return true/false
-     */
-    public boolean getBit(long index) {
-        boolean answer = index >= firstIndex;
-        BitArray ba = getBitArray(index);
-        if (ba != null) {
-            int offset = getOffset(index);
-            if (offset >= 0) {
-                answer = ba.get(offset);
-                return answer;
-            }
-        } else {
-            // gone passed range for previous bins so assume set
-            answer = true;
-        }
-        return answer;
-    }
-
-    /**
-     * Get the BitArray for the index
-     * 
-     * @param index
-     * @return BitArray
-     */
-    private BitArray getBitArray(long index) {
-        int bin = getBin(index);
-        BitArray answer = null;
-        if (bin >= 0) {
-            if (bin >= maxNumberOfArrays) {
-                int overShoot = bin - maxNumberOfArrays + 1;
-                while (overShoot > 0) {
-                    list.removeFirst();
-                    firstIndex += BitArray.LONG_SIZE;
-                    list.add(new BitArray());
-                    overShoot--;
-                }
-                
-                bin = maxNumberOfArrays - 1;
-            }
-            answer = list.get(bin);
-            if (answer == null) {
-                answer = new BitArray();
-                list.set(bin, answer);
-            }
-        }
-        return answer;
-    }
-
-    /**
-     * Get the index of the bin from the total index
-     * 
-     * @param index
-     * @return the index of the bin
-     */
-    private int getBin(long index) {
-        int answer = 0;
-        if (firstIndex < 0) {
-            firstIndex = (int) (index - (index % BitArray.LONG_SIZE));
-        } else if (firstIndex >= 0) {
-            answer = (int)((index - firstIndex) / BitArray.LONG_SIZE);
-        }
-        return answer;
-    }
-
-    /**
-     * Get the offset into a bin from the total index
-     * 
-     * @param index
-     * @return the relative offset into a bin
-     */
-    private int getOffset(long index) {
-        int answer = 0;
-        if (firstIndex >= 0) {
-            answer = (int)((index - firstIndex) - (BitArray.LONG_SIZE * getBin(index)));
-        }
-        return answer;
-    }
-
-    public long getLastSetIndex() {
-        long result = -1;
-        
-        if (firstIndex >=0) {
-            result = firstIndex;   
-            BitArray last = null;
-            for (int lastBitArrayIndex = maxNumberOfArrays -1; lastBitArrayIndex >= 0; lastBitArrayIndex--) {
-                last = list.get(lastBitArrayIndex);
-                if (last != null) {
-                    result += last.length() -1;
-                    result += lastBitArrayIndex * BitArray.LONG_SIZE;
-                    break;
-                }
-            }
-        }
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BooleanEditor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/BooleanEditor.java
deleted file mode 100644
index 53ac987..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BooleanEditor.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.util;
-
-import java.beans.PropertyEditorSupport;
-
-public class BooleanEditor extends PropertyEditorSupport {
-
-    public String getJavaInitializationString() {
-        return String.valueOf(((Boolean)getValue()).booleanValue());
-    }
-
-    public String getAsText() {
-       return getJavaInitializationString();
-    }
-
-    public void setAsText(String text) throws java.lang.IllegalArgumentException {
-        if (text.toLowerCase().equals("true")) {
-            setValue(Boolean.TRUE);
-        } else if (text.toLowerCase().equals("false")) {
-            setValue(Boolean.FALSE);
-        } else {
-            throw new java.lang.IllegalArgumentException(text);
-        }
-    }
-
-    public String[] getTags() {
-        String result[] = { "true", "false" };
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java
deleted file mode 100644
index f3f3b78..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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.util;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.security.SecurityContext;
-import org.apache.activemq.state.ProducerState;
-
-/**
- * Utility class for broker operations
- *
- */
-public final class BrokerSupport {
-
-    private BrokerSupport() {        
-    }
-    
-    public static void resendNoCopy(final ConnectionContext context, Message originalMessage, ActiveMQDestination deadLetterDestination) throws Exception {
-        doResend(context, originalMessage, deadLetterDestination, false);
-    }
-    
-    /**
-     * @param context
-     * @param originalMessage 
-     * @param deadLetterDestination
-     * @throws Exception
-     */
-    public static void resend(final ConnectionContext context, Message originalMessage, ActiveMQDestination deadLetterDestination) throws Exception {
-        doResend(context, originalMessage, deadLetterDestination, true);
-    }
-    
-    public static void doResend(final ConnectionContext context, Message originalMessage, ActiveMQDestination deadLetterDestination, boolean copy) throws Exception {       
-        Message message = copy ? originalMessage.copy() : originalMessage;
-        message.setOriginalDestination(message.getDestination());
-        message.setOriginalTransactionId(message.getTransactionId());
-        message.setDestination(deadLetterDestination);
-        message.setTransactionId(null);
-        message.setMemoryUsage(null);
-        message.setRedeliveryCounter(0);
-        boolean originalFlowControl = context.isProducerFlowControl();
-        try {
-            context.setProducerFlowControl(false);
-            ProducerInfo info = new ProducerInfo();
-            ProducerState state = new ProducerState(info);
-            ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-            producerExchange.setProducerState(state);
-            producerExchange.setMutable(true);
-            producerExchange.setConnectionContext(context);
-            context.getBroker().send(producerExchange, message);
-        } finally {
-            context.setProducerFlowControl(originalFlowControl);
-        }
-    }
-
-    /**
-     * Returns the broker's administration connection context used for
-     * configuring the broker at startup
-     */
-    public static ConnectionContext getConnectionContext(Broker broker) {
-        ConnectionContext adminConnectionContext = broker.getAdminConnectionContext();
-        if (adminConnectionContext == null) {
-            adminConnectionContext = createAdminConnectionContext(broker);
-            broker.setAdminConnectionContext(adminConnectionContext);
-        }
-        return adminConnectionContext;
-    }
-
-    /**
-     * Factory method to create the new administration connection context
-     * object. Note this method is here rather than inside a default broker
-     * implementation to ensure that the broker reference inside it is the outer
-     * most interceptor
-     */
-    protected static ConnectionContext createAdminConnectionContext(Broker broker) {
-        ConnectionContext context = new ConnectionContext();
-        context.setBroker(broker);
-        context.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
-        return context;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java
deleted file mode 100644
index 52f27a6..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Very similar to the java.io.ByteArrayInputStream but this version is not
- * thread safe.
- */
-public class ByteArrayInputStream extends InputStream {
-
-    byte buffer[];
-    int limit;
-    int pos;
-    int mark;
-
-    public ByteArrayInputStream(byte data[]) {
-        this(data, 0, data.length);
-    }
-
-    public ByteArrayInputStream(ByteSequence sequence) {
-        this(sequence.getData(), sequence.getOffset(), sequence.getLength());
-    }
-
-    public ByteArrayInputStream(byte data[], int offset, int size) {
-        this.buffer = data;
-        this.mark = offset;
-        this.pos = offset;
-        this.limit = offset + size;
-    }
-
-    public int read() throws IOException {
-        if (pos < limit) {
-            return buffer[pos++] & 0xff;
-        } else {
-            return -1;
-        }
-    }
-
-    public int read(byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-
-    public int read(byte b[], int off, int len) {
-        if (pos < limit) {
-            len = Math.min(len, limit - pos);
-            if (len > 0) {
-                System.arraycopy(buffer, pos, b, off, len);
-                pos += len;
-            }
-            return len;
-        } else {
-            return -1;
-        }
-    }
-
-    public long skip(long len) throws IOException {
-        if (pos < limit) {
-            len = Math.min(len, limit - pos);
-            if (len > 0) {
-                pos += len;
-            }
-            return len;
-        } else {
-            return -1;
-        }
-    }
-
-    public int available() {
-        return limit - pos;
-    }
-
-    public boolean markSupported() {
-        return true;
-    }
-
-    public void mark(int markpos) {
-        mark = pos;
-    }
-
-    public void reset() {
-        pos = mark;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayOutputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayOutputStream.java
deleted file mode 100644
index fca10fc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayOutputStream.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.util;
-
-import java.io.OutputStream;
-
-
-/**
- * Very similar to the java.io.ByteArrayOutputStream but this version 
- * is not thread safe and the resulting data is returned in a ByteSequence
- * to avoid an extra byte[] allocation.
- */
-public class ByteArrayOutputStream extends OutputStream {
-
-    byte buffer[];
-    int size;
-
-    public ByteArrayOutputStream() {
-        this(1028);
-    }
-    public ByteArrayOutputStream(int capacity) {
-        buffer = new byte[capacity];
-    }
-
-    public void write(int b) {
-        int newsize = size + 1;
-        checkCapacity(newsize);
-        buffer[size] = (byte) b;
-        size = newsize;
-    }
-
-    public void write(byte b[], int off, int len) {
-        int newsize = size + len;
-        checkCapacity(newsize);
-        System.arraycopy(b, off, buffer, size, len);
-        size = newsize;
-    }
-    
-    /**
-     * Ensures the the buffer has at least the minimumCapacity specified. 
-     * @param i
-     */
-    private void checkCapacity(int minimumCapacity) {
-        if (minimumCapacity > buffer.length) {
-            byte b[] = new byte[Math.max(buffer.length << 1, minimumCapacity)];
-            System.arraycopy(buffer, 0, b, 0, size);
-            buffer = b;
-        }
-    }
-
-    public void reset() {
-        size = 0;
-    }
-
-    public ByteSequence toByteSequence() {
-        return new ByteSequence(buffer, 0, size);
-    }
-    
-    public byte[] toByteArray() {
-        byte rc[] = new byte[size];
-        System.arraycopy(buffer, 0, rc, 0, size);
-        return rc;
-    }
-    
-    public int size() {
-        return size;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequence.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequence.java
deleted file mode 100644
index 41b6f8c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequence.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.util;
-
-public class ByteSequence {
-
-    public byte[] data;
-    public int offset;
-    public int length;
-
-    public ByteSequence(byte data[]) {
-        this.data = data;
-        this.offset = 0;
-        this.length = data.length;
-    }
-
-    public ByteSequence(byte data[], int offset, int length) {
-        this.data = data;
-        this.offset = offset;
-        this.length = length;
-    }
-
-    public byte[] getData() {
-        return data;
-    }
-
-    public int getLength() {
-        return length;
-    }
-
-    public int getOffset() {
-        return offset;
-    }
-
-    public void setData(byte[] data) {
-        this.data = data;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-
-    public void setOffset(int offset) {
-        this.offset = offset;
-    }
-
-    public void compact() {
-        if (length != data.length) {
-            byte t[] = new byte[length];
-            System.arraycopy(data, offset, t, 0, length);
-            data = t;
-            offset = 0;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java
deleted file mode 100644
index 1b8a40a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-
-/**
- * Used to write and read primitives to and from a ByteSequence.
- */
-public final class ByteSequenceData {
-
-    private ByteSequenceData() {    
-    }
-    
-    public static byte[] toByteArray(ByteSequence packet) {
-        if (packet.offset == 0 && packet.length == packet.data.length) {
-            return packet.data;
-        }
-
-        byte rc[] = new byte[packet.length];
-        System.arraycopy(packet.data, packet.offset, rc, 0, packet.length);
-        return rc;
-    }
-
-    private static void spaceNeeded(ByteSequence packet, int i) {
-        assert packet.offset + i <= packet.length;
-    }
-
-    public static int remaining(ByteSequence packet) {
-        return packet.length - packet.offset;
-    }
-
-    public static int read(ByteSequence packet) {
-        return packet.data[packet.offset++] & 0xff;
-    }
-
-    public static void readFully(ByteSequence packet, byte[] b) throws IOException {
-        readFully(packet, b, 0, b.length);
-    }
-
-    public static void readFully(ByteSequence packet, byte[] b, int off, int len) throws IOException {
-        spaceNeeded(packet, len);
-        System.arraycopy(packet.data, packet.offset, b, off, len);
-        packet.offset += len;
-    }
-
-    public static int skipBytes(ByteSequence packet, int n) throws IOException {
-        int rc = Math.min(n, remaining(packet));
-        packet.offset += rc;
-        return rc;
-    }
-
-    public static boolean readBoolean(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 1);
-        return read(packet) != 0;
-    }
-
-    public static byte readByte(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 1);
-        return (byte)read(packet);
-    }
-
-    public static int readUnsignedByte(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 1);
-        return read(packet);
-    }
-
-    public static short readShortBig(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 2);
-        return (short)((read(packet) << 8) + (read(packet) << 0));
-    }
-
-    public static short readShortLittle(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 2);
-        return (short)((read(packet) << 0) + (read(packet) << 8));
-    }
-
-    public static int readUnsignedShortBig(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 2);
-        return (read(packet) << 8) + (read(packet) << 0);
-    }
-
-    public static int readUnsignedShortLittle(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 2);
-        return (read(packet) << 0) + (read(packet) << 8);
-    }
-
-    public static char readCharBig(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 2);
-        return (char)((read(packet) << 8) + (read(packet) << 0));
-    }
-
-    public static char readCharLittle(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 2);
-        return (char)((read(packet) << 0) + (read(packet) << 8));
-    }
-
-    public static int readIntBig(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 4);
-        return (read(packet) << 24) + (read(packet) << 16) + (read(packet) << 8) + (read(packet) << 0);
-    }
-
-    public static int readIntLittle(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 4);
-        return (read(packet) << 0) + (read(packet) << 8) + (read(packet) << 16) + (read(packet) << 24);
-    }
-
-    public static long readLongBig(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 8);
-        return ((long)read(packet) << 56) + ((long)read(packet) << 48) + ((long)read(packet) << 40) + ((long)read(packet) << 32) + ((long)read(packet) << 24)
-                + ((read(packet)) << 16) + ((read(packet)) << 8) + ((read(packet)) << 0);
-    }
-
-    public static long readLongLittle(ByteSequence packet) throws IOException {
-        spaceNeeded(packet, 8);
-        return (read(packet) << 0) + (read(packet) << 8) + (read(packet) << 16) + ((long)read(packet) << 24) + ((long)read(packet) << 32) + ((long)read(packet) << 40)
-                + ((long)read(packet) << 48) + ((long)read(packet) << 56);
-    }
-
-    public static double readDoubleBig(ByteSequence packet) throws IOException {
-        return Double.longBitsToDouble(readLongBig(packet));
-    }
-
-    public static double readDoubleLittle(ByteSequence packet) throws IOException {
-        return Double.longBitsToDouble(readLongLittle(packet));
-    }
-
-    public static float readFloatBig(ByteSequence packet) throws IOException {
-        return Float.intBitsToFloat(readIntBig(packet));
-    }
-
-    public static float readFloatLittle(ByteSequence packet) throws IOException {
-        return Float.intBitsToFloat(readIntLittle(packet));
-    }
-
-    public static void write(ByteSequence packet, int b) throws IOException {
-        spaceNeeded(packet, 1);
-        packet.data[packet.offset++] = (byte)b;
-    }
-
-    public static void write(ByteSequence packet, byte[] b) throws IOException {
-        write(packet, b, 0, b.length);
-    }
-
-    public static void write(ByteSequence packet, byte[] b, int off, int len) throws IOException {
-        spaceNeeded(packet, len);
-        System.arraycopy(b, off, packet.data, packet.offset, len);
-        packet.offset += len;
-    }
-
-    public static void writeBoolean(ByteSequence packet, boolean v) throws IOException {
-        spaceNeeded(packet, 1);
-        write(packet, v ? 1 : 0);
-    }
-
-    public static void writeByte(ByteSequence packet, int v) throws IOException {
-        spaceNeeded(packet, 1);
-        write(packet, v);
-    }
-
-    public static void writeShortBig(ByteSequence packet, int v) throws IOException {
-        spaceNeeded(packet, 2);
-        write(packet, (v >>> 8) & 0xFF);
-        write(packet, (v >>> 0) & 0xFF);
-    }
-
-    public static void writeShortLittle(ByteSequence packet, int v) throws IOException {
-        spaceNeeded(packet, 2);
-        write(packet, (v >>> 0) & 0xFF);
-        write(packet, (v >>> 8) & 0xFF);
-    }
-
-    public static void writeCharBig(ByteSequence packet, int v) throws IOException {
-        spaceNeeded(packet, 2);
-        write(packet, (v >>> 8) & 0xFF);
-        write(packet, (v >>> 0) & 0xFF);
-    }
-
-    public static void writeCharLittle(ByteSequence packet, int v) throws IOException {
-        spaceNeeded(packet, 2);
-        write(packet, (v >>> 0) & 0xFF);
-        write(packet, (v >>> 8) & 0xFF);
-    }
-
-    public static void writeIntBig(ByteSequence packet, int v) throws IOException {
-        spaceNeeded(packet, 4);
-        write(packet, (v >>> 24) & 0xFF);
-        write(packet, (v >>> 16) & 0xFF);
-        write(packet, (v >>> 8) & 0xFF);
-        write(packet, (v >>> 0) & 0xFF);
-    }
-
-    public static void writeIntLittle(ByteSequence packet, int v) throws IOException {
-        spaceNeeded(packet, 4);
-        write(packet, (v >>> 0) & 0xFF);
-        write(packet, (v >>> 8) & 0xFF);
-        write(packet, (v >>> 16) & 0xFF);
-        write(packet, (v >>> 24) & 0xFF);
-    }
-
-    public static void writeLongBig(ByteSequence packet, long v) throws IOException {
-        spaceNeeded(packet, 8);
-        write(packet, (int)(v >>> 56) & 0xFF);
-        write(packet, (int)(v >>> 48) & 0xFF);
-        write(packet, (int)(v >>> 40) & 0xFF);
-        write(packet, (int)(v >>> 32) & 0xFF);
-        write(packet, (int)(v >>> 24) & 0xFF);
-        write(packet, (int)(v >>> 16) & 0xFF);
-        write(packet, (int)(v >>> 8) & 0xFF);
-        write(packet, (int)(v >>> 0) & 0xFF);
-    }
-
-    public static void writeLongLittle(ByteSequence packet, long v) throws IOException {
-        spaceNeeded(packet, 8);
-        write(packet, (int)(v >>> 0) & 0xFF);
-        write(packet, (int)(v >>> 8) & 0xFF);
-        write(packet, (int)(v >>> 16) & 0xFF);
-        write(packet, (int)(v >>> 24) & 0xFF);
-        write(packet, (int)(v >>> 32) & 0xFF);
-        write(packet, (int)(v >>> 40) & 0xFF);
-        write(packet, (int)(v >>> 48) & 0xFF);
-        write(packet, (int)(v >>> 56) & 0xFF);
-    }
-
-    public static void writeDoubleBig(ByteSequence packet, double v) throws IOException {
-        writeLongBig(packet, Double.doubleToLongBits(v));
-    }
-
-    public static void writeDoubleLittle(ByteSequence packet, double v) throws IOException {
-        writeLongLittle(packet, Double.doubleToLongBits(v));
-    }
-
-    public static void writeFloatBig(ByteSequence packet, float v) throws IOException {
-        writeIntBig(packet, Float.floatToIntBits(v));
-    }
-
-    public static void writeFloatLittle(ByteSequence packet, float v) throws IOException {
-        writeIntLittle(packet, Float.floatToIntBits(v));
-    }
-
-    public static void writeRawDoubleBig(ByteSequence packet, double v) throws IOException {
-        writeLongBig(packet, Double.doubleToRawLongBits(v));
-    }
-
-    public static void writeRawDoubleLittle(ByteSequence packet, double v) throws IOException {
-        writeLongLittle(packet, Double.doubleToRawLongBits(v));
-    }
-
-    public static void writeRawFloatBig(ByteSequence packet, float v) throws IOException {
-        writeIntBig(packet, Float.floatToRawIntBits(v));
-    }
-
-    public static void writeRawFloatLittle(ByteSequence packet, float v) throws IOException {
-        writeIntLittle(packet, Float.floatToRawIntBits(v));
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/Callback.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/Callback.java
deleted file mode 100755
index 0d1fb49..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/Callback.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.util;
-
-/**
- * A simple callback object used by the
- * {@link org.apache.activemq.util.TransactionTemplate}
- * and {@link org.apache.activemq.util.ExceptionTemplate}
-   objects to provide automatic transactional or exception handling blocks.
- *
- * 
- */
-public interface Callback {
-
-    /**
-     * Executes some piece of code within a transaction
-     * performing a commit if there is no exception thrown
-     * else a rollback is performed
-     * @throws Exception TODO
-     */
-    void execute() throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java
deleted file mode 100644
index 26549d3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectStreamClass;
-import java.lang.reflect.Proxy;
-import java.util.HashMap;
-
-public class ClassLoadingAwareObjectInputStream extends ObjectInputStream {
-
-    private static final ClassLoader FALLBACK_CLASS_LOADER = ClassLoadingAwareObjectInputStream.class.getClassLoader();
-    /** <p>Maps primitive type names to corresponding class objects.</p> */
-    private static final HashMap<String, Class> primClasses = new HashMap<String, Class>(8, 1.0F);
-    public ClassLoadingAwareObjectInputStream(InputStream in) throws IOException {
-        super(in);
-    }
-
-    protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException {
-        ClassLoader cl = Thread.currentThread().getContextClassLoader();
-        return load(classDesc.getName(), cl);
-    }
-
-    protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException {
-        ClassLoader cl = Thread.currentThread().getContextClassLoader();
-        Class[] cinterfaces = new Class[interfaces.length];
-        for (int i = 0; i < interfaces.length; i++) {
-            cinterfaces[i] = load(interfaces[i], cl);
-        }
-
-        try {
-            return Proxy.getProxyClass(cinterfaces[0].getClassLoader(), cinterfaces);
-        } catch (IllegalArgumentException e) {
-            throw new ClassNotFoundException(null, e);
-        }
-    }
-
-    private Class load(String className, ClassLoader cl)
-            throws ClassNotFoundException {
-        try {
-            return Class.forName(className, false, cl);
-        } catch (ClassNotFoundException e) {
-            final Class clazz = (Class) primClasses.get(className);
-            if (clazz != null) {
-                return clazz;
-            } else {
-                return Class.forName(className, false, FALLBACK_CLASS_LOADER);
-            }
-        }
-    }
-    
-    
-    
-    static {
-        primClasses.put("boolean", boolean.class);
-        primClasses.put("byte", byte.class);
-        primClasses.put("char", char.class);
-        primClasses.put("short", short.class);
-        primClasses.put("int", int.class);
-        primClasses.put("long", long.class);
-        primClasses.put("float", float.class);
-        primClasses.put("double", double.class);
-        primClasses.put("void", void.class);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java
deleted file mode 100755
index 9bf229d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/**
- * 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.util;
-
-import java.io.DataInput;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UTFDataFormatException;
-
-/**
- * Optimized ByteArrayInputStream that can be used more than once
- * 
- * 
- */
-public final class DataByteArrayInputStream extends InputStream implements DataInput {
-    private byte[] buf;
-    private int pos;
-    private int offset;
-
-    /**
-     * Creates a <code>StoreByteArrayInputStream</code>.
-     * 
-     * @param buf the input buffer.
-     */
-    public DataByteArrayInputStream(byte buf[]) {
-        this.buf = buf;
-        this.pos = 0;
-        this.offset = 0;
-    }
-
-    /**
-     * Creates a <code>StoreByteArrayInputStream</code>.
-     * 
-     * @param sequence the input buffer.
-     */
-    public DataByteArrayInputStream(ByteSequence sequence) {
-        this.buf = sequence.getData();
-        this.offset = sequence.getOffset();
-        this.pos =  this.offset;
-    }
-
-    /**
-     * Creates <code>WireByteArrayInputStream</code> with a minmalist byte
-     * array
-     */
-    public DataByteArrayInputStream() {
-        this(new byte[0]);
-    }
-
-    /**
-     * @return the size
-     */
-    public int size() {
-        return pos - offset;
-    }
-
-    /**
-     * @return the underlying data array
-     */
-    public byte[] getRawData() {
-        return buf;
-    }
-
-    /**
-     * reset the <code>StoreByteArrayInputStream</code> to use an new byte
-     * array
-     * 
-     * @param newBuff
-     */
-    public void restart(byte[] newBuff) {
-        buf = newBuff;
-        pos = 0;
-    }
-
-    /**
-     * reset the <code>StoreByteArrayInputStream</code> to use an new
-     * ByteSequence
-     * 
-     * @param sequence
-     */
-    public void restart(ByteSequence sequence) {
-        this.buf = sequence.getData();
-        this.pos = sequence.getOffset();
-    }
-
-    /**
-     * re-start the input stream - reusing the current buffer
-     * 
-     * @param size
-     */
-    public void restart(int size) {
-        if (buf == null || buf.length < size) {
-            buf = new byte[size];
-        }
-        restart(buf);
-    }
-
-    /**
-     * Reads the next byte of data from this input stream. The value byte is
-     * returned as an <code>int</code> in the range <code>0</code> to
-     * <code>255</code>. If no byte is available because the end of the
-     * stream has been reached, the value <code>-1</code> is returned.
-     * <p>
-     * This <code>read</code> method cannot block.
-     * 
-     * @return the next byte of data, or <code>-1</code> if the end of the
-     *         stream has been reached.
-     */
-    public int read() {
-        return (pos < buf.length) ? (buf[pos++] & 0xff) : -1;
-    }
-
-    /**
-     * Reads up to <code>len</code> bytes of data into an array of bytes from
-     * this input stream.
-     * 
-     * @param b the buffer into which the data is read.
-     * @param off the start offset of the data.
-     * @param len the maximum number of bytes read.
-     * @return the total number of bytes read into the buffer, or
-     *         <code>-1</code> if there is no more data because the end of the
-     *         stream has been reached.
-     */
-    public int read(byte b[], int off, int len) {
-        if (b == null) {
-            throw new NullPointerException();
-        }
-        if (pos >= buf.length) {
-            return -1;
-        }
-        if (pos + len > buf.length) {
-            len = buf.length - pos;
-        }
-        if (len <= 0) {
-            return 0;
-        }
-        System.arraycopy(buf, pos, b, off, len);
-        pos += len;
-        return len;
-    }
-
-    /**
-     * @return the number of bytes that can be read from the input stream
-     *         without blocking.
-     */
-    public int available() {
-        return buf.length - pos;
-    }
-
-    public void readFully(byte[] b) {
-        read(b, 0, b.length);
-    }
-
-    public void readFully(byte[] b, int off, int len) {
-        read(b, off, len);
-    }
-
-    public int skipBytes(int n) {
-        if (pos + n > buf.length) {
-            n = buf.length - pos;
-        }
-        if (n < 0) {
-            return 0;
-        }
-        pos += n;
-        return n;
-    }
-
-    public boolean readBoolean() {
-        return read() != 0;
-    }
-
-    public byte readByte() {
-        return (byte)read();
-    }
-
-    public int readUnsignedByte() {
-        return read();
-    }
-
-    public short readShort() {
-        int ch1 = read();
-        int ch2 = read();
-        return (short)((ch1 << 8) + (ch2 << 0));
-    }
-
-    public int readUnsignedShort() {
-        int ch1 = read();
-        int ch2 = read();
-        return (ch1 << 8) + (ch2 << 0);
-    }
-
-    public char readChar() {
-        int ch1 = read();
-        int ch2 = read();
-        return (char)((ch1 << 8) + (ch2 << 0));
-    }
-
-    public int readInt() {
-        int ch1 = read();
-        int ch2 = read();
-        int ch3 = read();
-        int ch4 = read();
-        return (ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0);
-    }
-
-    public long readLong() {
-        long rc = ((long)buf[pos++] << 56) + ((long)(buf[pos++] & 255) << 48) + ((long)(buf[pos++] & 255) << 40) + ((long)(buf[pos++] & 255) << 32);
-        return rc + ((long)(buf[pos++] & 255) << 24) + ((buf[pos++] & 255) << 16) + ((buf[pos++] & 255) << 8) + ((buf[pos++] & 255) << 0);
-    }
-
-    public float readFloat() throws IOException {
-        return Float.intBitsToFloat(readInt());
-    }
-
-    public double readDouble() throws IOException {
-        return Double.longBitsToDouble(readLong());
-    }
-
-    public String readLine() {
-        int start = pos;
-        while (pos < buf.length) {
-            int c = read();
-            if (c == '\n') {
-                break;
-            }
-            if (c == '\r') {
-                c = read();
-                if (c != '\n' && c != -1) {
-                    pos--;
-                }
-                break;
-            }
-        }
-        return new String(buf, start, pos);
-    }
-
-    public String readUTF() throws IOException {
-        int length = readUnsignedShort();
-        char[] characters = new char[length];
-        int c;
-        int c2;
-        int c3;
-        int count = 0;
-        int total = pos + length;
-        while (pos < total) {
-            c = (int)buf[pos] & 0xff;
-            if (c > 127) {
-                break;
-            }
-            pos++;
-            characters[count++] = (char)c;
-        }
-        while (pos < total) {
-            c = (int)buf[pos] & 0xff;
-            switch (c >> 4) {
-            case 0:
-            case 1:
-            case 2:
-            case 3:
-            case 4:
-            case 5:
-            case 6:
-            case 7:
-                pos++;
-                characters[count++] = (char)c;
-                break;
-            case 12:
-            case 13:
-                pos += 2;
-                if (pos > total) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                c2 = (int)buf[pos - 1];
-                if ((c2 & 0xC0) != 0x80) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                characters[count++] = (char)(((c & 0x1F) << 6) | (c2 & 0x3F));
-                break;
-            case 14:
-                pos += 3;
-                if (pos > total) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                c2 = (int)buf[pos - 2];
-                c3 = (int)buf[pos - 1];
-                if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80)) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                characters[count++] = (char)(((c & 0x0F) << 12) | ((c2 & 0x3F) << 6) | ((c3 & 0x3F) << 0));
-                break;
-            default:
-                throw new UTFDataFormatException("bad string");
-            }
-        }
-        return new String(characters, 0, count);
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayOutputStream.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayOutputStream.java
deleted file mode 100755
index e1035fc..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayOutputStream.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/**
- * 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.util;
-
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UTFDataFormatException;
-
-/**
- * Optimized ByteArrayOutputStream
- * 
- * 
- */
-public final class DataByteArrayOutputStream extends OutputStream implements DataOutput {
-    private static final int DEFAULT_SIZE = 2048;
-    private byte buf[];
-    private int pos;
-
-    /**
-     * Creates a new byte array output stream, with a buffer capacity of the
-     * specified size, in bytes.
-     * 
-     * @param size the initial size.
-     * @exception IllegalArgumentException if size is negative.
-     */
-    public DataByteArrayOutputStream(int size) {
-        if (size < 0) {
-            throw new IllegalArgumentException("Invalid size: " + size);
-        }
-        buf = new byte[size];
-    }
-
-    /**
-     * Creates a new byte array output stream.
-     */
-    public DataByteArrayOutputStream() {
-        this(DEFAULT_SIZE);
-    }
-
-    /**
-     * start using a fresh byte array
-     * 
-     * @param size
-     */
-    public void restart(int size) {
-        buf = new byte[size];
-        pos = 0;
-    }
-
-    /**
-     * start using a fresh byte array
-     */
-    public void restart() {
-        restart(DEFAULT_SIZE);
-    }
-
-    /**
-     * Get a ByteSequence from the stream
-     * 
-     * @return the byte sequence
-     */
-    public ByteSequence toByteSequence() {
-        return new ByteSequence(buf, 0, pos);
-    }
-
-    /**
-     * Writes the specified byte to this byte array output stream.
-     * 
-     * @param b the byte to be written.
-     */
-    public void write(int b) {
-        int newcount = pos + 1;
-        ensureEnoughBuffer(newcount);
-        buf[pos] = (byte)b;
-        pos = newcount;
-    }
-
-    /**
-     * Writes <code>len</code> bytes from the specified byte array starting at
-     * offset <code>off</code> to this byte array output stream.
-     * 
-     * @param b the data.
-     * @param off the start offset in the data.
-     * @param len the number of bytes to write.
-     */
-    public void write(byte b[], int off, int len) {
-        if (len == 0) {
-            return;
-        }
-        int newcount = pos + len;
-        ensureEnoughBuffer(newcount);
-        System.arraycopy(b, off, buf, pos, len);
-        pos = newcount;
-    }
-
-    /**
-     * @return the underlying byte[] buffer
-     */
-    public byte[] getData() {
-        return buf;
-    }
-
-    /**
-     * reset the output stream
-     */
-    public void reset() {
-        pos = 0;
-    }
-
-    /**
-     * Set the current position for writing
-     * 
-     * @param offset
-     */
-    public void position(int offset) {
-        ensureEnoughBuffer(offset);
-        pos = offset;
-    }
-
-    public int size() {
-        return pos;
-    }
-
-    public void writeBoolean(boolean v) {
-        ensureEnoughBuffer(pos + 1);
-        buf[pos++] = (byte)(v ? 1 : 0);
-    }
-
-    public void writeByte(int v) {
-        ensureEnoughBuffer(pos + 1);
-        buf[pos++] = (byte)(v >>> 0);
-    }
-
-    public void writeShort(int v) {
-        ensureEnoughBuffer(pos + 2);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-    }
-
-    public void writeChar(int v) {
-        ensureEnoughBuffer(pos + 2);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-    }
-
-    public void writeInt(int v) {
-        ensureEnoughBuffer(pos + 4);
-        buf[pos++] = (byte)(v >>> 24);
-        buf[pos++] = (byte)(v >>> 16);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-    }
-
-    public void writeLong(long v) {
-        ensureEnoughBuffer(pos + 8);
-        buf[pos++] = (byte)(v >>> 56);
-        buf[pos++] = (byte)(v >>> 48);
-        buf[pos++] = (byte)(v >>> 40);
-        buf[pos++] = (byte)(v >>> 32);
-        buf[pos++] = (byte)(v >>> 24);
-        buf[pos++] = (byte)(v >>> 16);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-    }
-
-    public void writeFloat(float v) throws IOException {
-        writeInt(Float.floatToIntBits(v));
-    }
-
-    public void writeDouble(double v) throws IOException {
-        writeLong(Double.doubleToLongBits(v));
-    }
-
-    public void writeBytes(String s) {
-        int length = s.length();
-        for (int i = 0; i < length; i++) {
-            write((byte)s.charAt(i));
-        }
-    }
-
-    public void writeChars(String s) {
-        int length = s.length();
-        for (int i = 0; i < length; i++) {
-            int c = s.charAt(i);
-            write((c >>> 8) & 0xFF);
-            write((c >>> 0) & 0xFF);
-        }
-    }
-
-    public void writeUTF(String str) throws IOException {
-        int strlen = str.length();
-        int encodedsize = 0;
-        int c;
-        for (int i = 0; i < strlen; i++) {
-            c = str.charAt(i);
-            if ((c >= 0x0001) && (c <= 0x007F)) {
-                encodedsize++;
-            } else if (c > 0x07FF) {
-                encodedsize += 3;
-            } else {
-                encodedsize += 2;
-            }
-        }
-        if (encodedsize > 65535) {
-            throw new UTFDataFormatException("encoded string too long: " + encodedsize + " bytes");
-        }
-        ensureEnoughBuffer(pos + encodedsize + 2);
-        writeShort(encodedsize);
-        int i = 0;
-        for (i = 0; i < strlen; i++) {
-            c = str.charAt(i);
-            if (!((c >= 0x0001) && (c <= 0x007F))) {
-                break;
-            }
-            buf[pos++] = (byte)c;
-        }
-        for (; i < strlen; i++) {
-            c = str.charAt(i);
-            if ((c >= 0x0001) && (c <= 0x007F)) {
-                buf[pos++] = (byte)c;
-            } else if (c > 0x07FF) {
-                buf[pos++] = (byte)(0xE0 | ((c >> 12) & 0x0F));
-                buf[pos++] = (byte)(0x80 | ((c >> 6) & 0x3F));
-                buf[pos++] = (byte)(0x80 | ((c >> 0) & 0x3F));
-            } else {
-                buf[pos++] = (byte)(0xC0 | ((c >> 6) & 0x1F));
-                buf[pos++] = (byte)(0x80 | ((c >> 0) & 0x3F));
-            }
-        }
-    }
-
-    private void ensureEnoughBuffer(int newcount) {
-        if (newcount > buf.length) {
-            byte newbuf[] = new byte[Math.max(buf.length << 1, newcount)];
-            System.arraycopy(buf, 0, newbuf, 0, pos);
-            buf = newbuf;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
deleted file mode 100644
index d70e764..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/DefaultIOExceptionHandler.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @org.apache.xbean.XBean
- */
- public class DefaultIOExceptionHandler implements IOExceptionHandler {
-
-    private static final Logger LOG = LoggerFactory
-            .getLogger(DefaultIOExceptionHandler.class);
-    private BrokerService broker;
-    private boolean ignoreAllErrors = false;
-    private boolean ignoreNoSpaceErrors = true;
-    private boolean ignoreSQLExceptions = true;
-    private boolean stopStartConnectors = false;
-    private String noSpaceMessage = "space";
-    private String sqlExceptionMessage = ""; // match all
-    private long resumeCheckSleepPeriod = 5*1000;
-    private AtomicBoolean stopStartInProgress = new AtomicBoolean(false);
-
-    public void handle(IOException exception) {
-        if (ignoreAllErrors) {
-            LOG.info("Ignoring IO exception, " + exception, exception);
-            return;
-        }
-
-        if (ignoreNoSpaceErrors) {
-            Throwable cause = exception;
-            while (cause != null && cause instanceof IOException) {
-                if (cause.getMessage().contains(noSpaceMessage)) {
-                    LOG.info("Ignoring no space left exception, " + exception, exception);
-                    return;
-                }
-                cause = cause.getCause();
-            }
-        }
-
-        if (ignoreSQLExceptions) {
-            Throwable cause = exception;
-            while (cause != null) {
-                if (cause instanceof SQLException && cause.getMessage().contains(sqlExceptionMessage)) {
-                    LOG.info("Ignoring SQLException, " + exception, cause);
-                    return;
-                }
-                cause = cause.getCause();
-            }
-        }
-
-        if (stopStartConnectors) {
-            if (!stopStartInProgress.compareAndSet(false, true)) {
-                // we are already working on it
-                return;
-            }
-            LOG.info("Initiating stop/restart of broker transport due to IO exception, " + exception, exception);
-
-            new Thread("stop transport connectors on IO exception") {
-                public void run() {
-                    try {
-                        ServiceStopper stopper = new ServiceStopper();
-                        broker.stopAllConnectors(stopper);
-                    } catch (Exception e) {
-                        LOG.warn("Failure occurred while stopping broker connectors", e);
-                    }
-                }
-            }.start();
-
-            // resume again
-            new Thread("restart transport connectors post IO exception") {
-                public void run() {
-                    try {
-                        while (isPersistenceAdapterDown()) {
-                            LOG.info("waiting for broker persistence adapter checkpoint to succeed before restarting transports");
-                            TimeUnit.MILLISECONDS.sleep(resumeCheckSleepPeriod);
-                        }
-                        broker.startAllConnectors();
-                    } catch (Exception e) {
-                        LOG.warn("Failure occurred while restarting broker connectors", e);
-                    } finally {
-                        stopStartInProgress.compareAndSet(true, false);
-                    }
-                }
-
-                private boolean isPersistenceAdapterDown() {
-                    boolean checkpointSuccess = false;
-                    try {
-                        broker.getPersistenceAdapter().checkpoint(true);
-                        checkpointSuccess = true;
-                    } catch (Throwable ignored) {}
-                    return !checkpointSuccess;
-                }
-            }.start();
-
-            return;
-        }
-
-        LOG.info("Stopping the broker due to IO exception, " + exception, exception);
-        new Thread("Stopping the broker due to IO exception") {
-            public void run() {
-                try {
-                    broker.stop();
-                } catch (Exception e) {
-                    LOG.warn("Failure occurred while stopping broker", e);
-                }
-            }
-        }.start();
-    }
-
-    public void setBrokerService(BrokerService broker) {
-        this.broker = broker;
-    }
-
-    public boolean isIgnoreAllErrors() {
-        return ignoreAllErrors;
-    }
-
-    public void setIgnoreAllErrors(boolean ignoreAllErrors) {
-        this.ignoreAllErrors = ignoreAllErrors;
-    }
-
-    public boolean isIgnoreNoSpaceErrors() {
-        return ignoreNoSpaceErrors;
-    }
-
-    public void setIgnoreNoSpaceErrors(boolean ignoreNoSpaceErrors) {
-        this.ignoreNoSpaceErrors = ignoreNoSpaceErrors;
-    }
-
-    public String getNoSpaceMessage() {
-        return noSpaceMessage;
-    }
-
-    public void setNoSpaceMessage(String noSpaceMessage) {
-        this.noSpaceMessage = noSpaceMessage;
-    }
-
-    public boolean isIgnoreSQLExceptions() {
-        return ignoreSQLExceptions;
-    }
-
-    public void setIgnoreSQLExceptions(boolean ignoreSQLExceptions) {
-        this.ignoreSQLExceptions = ignoreSQLExceptions;
-    }
-
-    public String getSqlExceptionMessage() {
-        return sqlExceptionMessage;
-    }
-
-    public void setSqlExceptionMessage(String sqlExceptionMessage) {
-        this.sqlExceptionMessage = sqlExceptionMessage;
-    }
-
-    public boolean isStopStartConnectors() {
-        return stopStartConnectors;
-    }
-
-    public void setStopStartConnectors(boolean stopStartConnectors) {
-        this.stopStartConnectors = stopStartConnectors;
-    }
-
-    public long getResumeCheckSleepPeriod() {
-        return resumeCheckSleepPeriod;
-    }
-
-    public void setResumeCheckSleepPeriod(long resumeCheckSleepPeriod) {
-        this.resumeCheckSleepPeriod = resumeCheckSleepPeriod;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java
deleted file mode 100644
index 5016c28..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.util;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * 
- */
-public class FactoryFinder {
-
-    /**
-     * The strategy that the FactoryFinder uses to find load and instantiate Objects
-     * can be changed out by calling the
-     * {@link org.apache.activemq.util.FactoryFinder#setObjectFactory(org.apache.activemq.util.FactoryFinder.ObjectFactory)}
-     * method with a custom implementation of ObjectFactory.
-     *
-     * The default ObjectFactory is typically changed out when running in a specialized container
-     * environment where service discovery needs to be done via the container system.  For example,
-     * in an OSGi scenario.
-     */
-    public interface ObjectFactory {
-        /**
-         * @param path the full service path 
-         * @return
-         */
-        public Object create(String path) throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException;
-
-    }
-
-    /**
-     * The default implementation of Object factory which works well in standalone applications.
-     */
-    protected static class StandaloneObjectFactory implements ObjectFactory {
-        final ConcurrentHashMap<String, Class> classMap = new ConcurrentHashMap<String, Class>();
-
-        public Object create(final String path) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException {
-            Class clazz = classMap.get(path);
-            if (clazz == null) {
-                clazz = loadClass(loadProperties(path));
-                classMap.put(path, clazz);
-            }
-            return clazz.newInstance();
-        }
-
-        static public Class loadClass(Properties properties) throws ClassNotFoundException, IOException {
-
-            String className = properties.getProperty("class");
-            if (className == null) {
-                throw new IOException("Expected property is missing: class");
-            }
-            Class clazz = null;
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            if (loader != null) {
-                try {
-                    clazz = loader.loadClass(className);
-                } catch (ClassNotFoundException e) {
-                    // ignore
-                }
-            }
-            if (clazz == null) {
-                clazz = FactoryFinder.class.getClassLoader().loadClass(className);
-            }
-
-            return clazz;
-        }
-
-        static public Properties loadProperties(String uri) throws IOException {
-            // lets try the thread context class loader first
-            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-            if (classLoader == null) {
-                classLoader = StandaloneObjectFactory.class.getClassLoader();
-            }
-            InputStream in = classLoader.getResourceAsStream(uri);
-            if (in == null) {
-                in = FactoryFinder.class.getClassLoader().getResourceAsStream(uri);
-                if (in == null) {
-                    throw new IOException("Could not find factory class for resource: " + uri);
-                }
-            }
-
-            // lets load the file
-            BufferedInputStream reader = null;
-            try {
-                reader = new BufferedInputStream(in);
-                Properties properties = new Properties();
-                properties.load(reader);
-                return properties;
-            } finally {
-                try {
-                    reader.close();
-                } catch (Exception e) {
-                }
-            }
-        }
-    }
-
-    // ================================================================
-    // Class methods and properties
-    // ================================================================
-    private static ObjectFactory objectFactory = new StandaloneObjectFactory();
-
-    public static ObjectFactory getObjectFactory() {
-        return objectFactory;
-    }
-
-    public static void setObjectFactory(ObjectFactory objectFactory) {
-        FactoryFinder.objectFactory = objectFactory;
-    }
-
-    // ================================================================
-    // Instance methods and properties
-    // ================================================================
-    private final String path;
-
-    public FactoryFinder(String path) {
-        this.path = path;
-    }
-
-    /**
-     * Creates a new instance of the given key
-     *
-     * @param key is the key to add to the path to find a text file containing
-     *                the factory name
-     * @return a newly created instance
-     */
-    public Object newInstance(String key) throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException {
-        return objectFactory.create(path+key);
-    }
-
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/GenerateJDBCStatements.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/GenerateJDBCStatements.java
deleted file mode 100644
index 2a50a99..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/GenerateJDBCStatements.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.util;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-import org.apache.activemq.store.jdbc.Statements;
-
-
-public class GenerateJDBCStatements {
-    public static String returnStatement(Object statement){
-    	return ((String)statement).replace("<", "&lt;").replace(">", "&gt;");
-    	
-    }
-	/**
-	 * @param args
-	 */
-	public static void main(String[] args) throws Exception{
-    	Statements s=new Statements();
-    	s.setTablePrefix("ACTIVEMQ.");
-    	String[] stats=s.getCreateSchemaStatements();
-    	System.out.println("<bean id=\"statements\" class=\"org.apache.activemq.store.jdbc.Statements\">");
-    	System.out.println("<property name=\"createSchemaStatements\">");
-    	System.out.println("<list>");
-    	for(int i=0; i<stats.length;i++){
-    		System.out.println("<value>"+stats[i]+"</value>");
-    	}
-    	System.out.println("</list>");
-    	System.out.println("</property>");
-    	
-    	
-    	Method[] methods=Statements.class.getMethods();
-    	Pattern sPattern= Pattern.compile("get.*Statement$");
-    	Pattern setPattern= Pattern.compile("set.*Statement$");
-    	ArrayList<String> setMethods=new ArrayList<String>();
-    	for(int i=0; i<methods.length;i++){
-    		if(setPattern.matcher(methods[i].getName()).find()){
-    			setMethods.add(methods[i].getName());
-    		}
-    	}
-    	for(int i=0; i<methods.length;i++){
-    		if(sPattern.matcher(methods[i].getName()).find()&&setMethods.contains(methods[i].getName().replace("get","set"))){
-    			System.out.println("<property name=\""+methods[i].getName().substring(3,4).toLowerCase()+methods[i].getName().substring(4)+"\" value=\""+returnStatement(methods[i].invoke(s, (Object[])null))+"\" />");
-    		}
-    	}
-    	//for a typo is not needed if removeMessageStatment typo is corrected
-    	Pattern sPattern2= Pattern.compile("get.*Statment$");
-    	for(int i=0; i<methods.length;i++){
-    		if(sPattern2.matcher(methods[i].getName()).find()){
-    			System.out.println("<property name=\""+methods[i].getName().substring(3,4).toLowerCase()+methods[i].getName().substring(4)+"\" value=\""+returnStatement(methods[i].invoke(s, (Object[])null))+"\" />");
-    		}
-    	}
-    	//end of generating because of typo
-    	
-    	String[] statsDrop=s.getDropSchemaStatements();
-    	System.out.println("<property name=\"dropSchemaStatements\">");
-    	System.out.println("<list>");
-    	for(int i=0; i<statsDrop.length;i++){
-    		System.out.println("<value>"+statsDrop[i]+"</value>");
-    	}
-    	System.out.println("</list>");
-    	System.out.println("</property>");
-    	System.out.println("</bean>");
-    	
-
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/Handler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/Handler.java
deleted file mode 100644
index 0bdb69a..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/Handler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.util;
-
-public interface Handler<T> {
-	
-	void handle(T e);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/HexSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/HexSupport.java
deleted file mode 100755
index e44171c..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/HexSupport.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.util;
-
-/**
- * Used to convert to hex from byte arrays and back.
- * 
- * 
- */
-public final class HexSupport {
-    
-    private static final String[] HEX_TABLE = new String[]{
-        "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f",
-        "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f",
-        "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f",
-        "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f",
-        "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f",
-        "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f",
-        "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f",
-        "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f",
-        "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f",
-        "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f",
-        "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af",
-        "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf",
-        "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf",
-        "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df",
-        "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef",
-        "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff",
-    };
-    private static final int[] INT_OFFSETS = new int[]{
-    	24,16,8,0
-    };
-    
-    private HexSupport() {
-    }
-    
-    /**
-     * @param hex
-     * @return
-     */
-    public static byte[] toBytesFromHex(String hex) {
-        byte rc[] = new byte[hex.length() / 2];
-        for (int i = 0; i < rc.length; i++) {
-            String h = hex.substring(i * 2, i * 2 + 2);
-            int x = Integer.parseInt(h, 16);
-            rc[i] = (byte) x;
-        }
-        return rc;
-    }
-
-    /**
-     * @param bytes
-     * @return
-     */
-    public static String toHexFromBytes(byte[] bytes) {
-        StringBuffer rc = new StringBuffer(bytes.length * 2);
-        for (int i = 0; i < bytes.length; i++) {
-            rc.append(HEX_TABLE[0xFF & bytes[i]]);
-        }
-        return rc.toString();
-    }
-
-    /**
-     * 
-     * @param value 
-     * @param trim if the leading 0's should be trimmed off.
-     * @return
-     */
-    public static String toHexFromInt(int value, boolean trim) {
-        StringBuffer rc = new StringBuffer(INT_OFFSETS.length*2);
-        for (int i = 0; i < INT_OFFSETS.length; i++) {
-        	int b = 0xFF & (value>>INT_OFFSETS[i]);
-        	if( !(trim && b == 0) ) { 
-        		rc.append(HEX_TABLE[b]);
-        		trim=false;
-        	}
-        }
-        return rc.toString();
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionHandler.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionHandler.java
deleted file mode 100644
index 3a83f4b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionHandler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-
-import org.apache.activemq.broker.BrokerServiceAware;
-
-public interface IOExceptionHandler extends BrokerServiceAware {
-
-    public void handle(IOException exception);
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionSupport.java
deleted file mode 100755
index ed0925f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionSupport.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-
-public final class IOExceptionSupport {
-
-    private IOExceptionSupport() {
-    }
-
-    public static IOException create(String msg, Throwable cause) {
-        IOException exception = new IOException(msg);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static IOException create(String msg, Exception cause) {
-        IOException exception = new IOException(msg);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static IOException create(Throwable cause) {
-        IOException exception = new IOException(cause.getMessage());
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static IOException create(Exception cause) {
-        IOException exception = new IOException(cause.getMessage());
-        exception.initCause(cause);
-        return exception;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
deleted file mode 100644
index 266603f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOHelper.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/**
- * 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.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 
- */
-public final class IOHelper {
-    protected static final int MAX_DIR_NAME_LENGTH;
-    protected static final int MAX_FILE_NAME_LENGTH;
-    private static final int DEFAULT_BUFFER_SIZE = 4096;
-    private IOHelper() {
-    }
-
-    public static String getDefaultDataDirectory() {
-        return getDefaultDirectoryPrefix() + "activemq-data";
-    }
-
-    public static String getDefaultStoreDirectory() {
-        return getDefaultDirectoryPrefix() + "amqstore";
-    }
-
-    /**
-     * Allows a system property to be used to overload the default data
-     * directory which can be useful for forcing the test cases to use a target/
-     * prefix
-     */
-    public static String getDefaultDirectoryPrefix() {
-        try {
-            return System.getProperty("org.apache.activemq.default.directory.prefix", "");
-        } catch (Exception e) {
-            return "";
-        }
-    }
-
-    /**
-     * Converts any string into a string that is safe to use as a file name.
-     * The result will only include ascii characters and numbers, and the "-","_", and "." characters.
-     *
-     * @param name
-     * @return
-     */
-    public static String toFileSystemDirectorySafeName(String name) {
-        return toFileSystemSafeName(name, true, MAX_DIR_NAME_LENGTH);
-    }
-    
-    public static String toFileSystemSafeName(String name) {
-        return toFileSystemSafeName(name, false, MAX_FILE_NAME_LENGTH);
-    }
-    
-    /**
-     * Converts any string into a string that is safe to use as a file name.
-     * The result will only include ascii characters and numbers, and the "-","_", and "." characters.
-     *
-     * @param name
-     * @param dirSeparators 
-     * @param maxFileLength 
-     * @return
-     */
-    public static String toFileSystemSafeName(String name,boolean dirSeparators,int maxFileLength) {
-        int size = name.length();
-        StringBuffer rc = new StringBuffer(size * 2);
-        for (int i = 0; i < size; i++) {
-            char c = name.charAt(i);
-            boolean valid = c >= 'a' && c <= 'z';
-            valid = valid || (c >= 'A' && c <= 'Z');
-            valid = valid || (c >= '0' && c <= '9');
-            valid = valid || (c == '_') || (c == '-') || (c == '.') || (c=='#')
-                    ||(dirSeparators && ( (c == '/') || (c == '\\')));
-
-            if (valid) {
-                rc.append(c);
-            } else {
-                // Encode the character using hex notation
-                rc.append('#');
-                rc.append(HexSupport.toHexFromInt(c, true));
-            }
-        }
-        String result = rc.toString();
-        if (result.length() > maxFileLength) {
-            result = result.substring(result.length()-maxFileLength,result.length());
-        }
-        return result;
-    }
-    
-    public static boolean deleteFile(File fileToDelete) {
-        if (fileToDelete == null || !fileToDelete.exists()) {
-            return true;
-        }
-        boolean result = deleteChildren(fileToDelete);
-        result &= fileToDelete.delete();
-        return result;
-    }
-    
-    public static boolean deleteChildren(File parent) {
-        if (parent == null || !parent.exists()) {
-            return false;
-        }
-        boolean result = true;
-        if (parent.isDirectory()) {
-            File[] files = parent.listFiles();
-            if (files == null) {
-                result = false;
-            } else {
-                for (int i = 0; i < files.length; i++) {
-                    File file = files[i];
-                    if (file.getName().equals(".")
-                            || file.getName().equals("..")) {
-                        continue;
-                    }
-                    if (file.isDirectory()) {
-                        result &= deleteFile(file);
-                    } else {
-                        result &= file.delete();
-                    }
-                }
-            }
-        }
-       
-        return result;
-    }
-    
-    
-    public static void moveFile(File src, File targetDirectory) throws IOException {
-        if (!src.renameTo(new File(targetDirectory, src.getName()))) {
-            throw new IOException("Failed to move " + src + " to " + targetDirectory);
-        }
-    }
-    
-    public static void copyFile(File src, File dest) throws IOException {
-        copyFile(src,dest,null);
-    }
-    
-    public static void copyFile(File src, File dest, FilenameFilter filter) throws IOException {
-        if (src.getCanonicalPath().equals(dest.getCanonicalPath()) == false) {
-            if (src.isDirectory()) {
-
-                mkdirs(dest);
-                List<File> list = getFiles(src, filter);
-                for (File f : list) {
-                    if (f.isFile()) {
-                        File target = new File(getCopyParent(src, dest, f), f.getName());
-                        copySingleFile(f, target);
-                    }
-                }
-
-            } else if (dest.isDirectory()) {
-                mkdirs(dest);
-                File target = new File(dest, src.getName());
-                copySingleFile(src, target);
-            } else {
-                copySingleFile(src, dest);
-            }
-        }
-    }
-    
-    static File getCopyParent(File from, File to, File src) {
-        File result = null;
-        File parent = src.getParentFile();
-        String fromPath = from.getAbsolutePath();
-        if (parent.getAbsolutePath().equals(fromPath)) {
-            //one level down
-            result = to;
-        }else {
-            String parentPath = parent.getAbsolutePath();
-            String path = parentPath.substring(fromPath.length());
-            result = new File(to.getAbsolutePath()+File.separator+path);
-        }
-        return result;
-    }
-    
-    static List<File> getFiles(File dir,FilenameFilter filter){
-        List<File> result = new ArrayList<File>();
-        getFiles(dir,result,filter);
-        return result;
-    }
-    
-    static void getFiles(File dir,List<File> list,FilenameFilter filter) {
-        if (!list.contains(dir)) {
-            list.add(dir);
-            String[] fileNames=dir.list(filter);
-            for (int i =0; i < fileNames.length;i++) {
-                File f = new File(dir,fileNames[i]);
-                if (f.isFile()) {
-                    list.add(f);
-                }else {
-                    getFiles(dir,list,filter);
-                }
-            }
-        }
-    }
-    
-    
-    public static void copySingleFile(File src, File dest) throws IOException {
-        FileInputStream fileSrc = new FileInputStream(src);
-        FileOutputStream fileDest = new FileOutputStream(dest);
-        copyInputStream(fileSrc, fileDest);
-    }
-    
-    public static void copyInputStream(InputStream in, OutputStream out) throws IOException {
-        byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
-        int len = in.read(buffer);
-        while (len >= 0) {
-            out.write(buffer, 0, len);
-            len = in.read(buffer);
-        }
-        in.close();
-        out.close();
-    }
-    
-    static {
-        MAX_DIR_NAME_LENGTH = Integer.valueOf(System.getProperty("MaximumDirNameLength","200")).intValue();  
-        MAX_FILE_NAME_LENGTH = Integer.valueOf(System.getProperty("MaximumFileNameLength","64")).intValue();             
-    }
-
-    
-    public static void mkdirs(File dir) throws IOException {
-        if (dir.exists()) {
-            if (!dir.isDirectory()) {
-                throw new IOException("Failed to create directory '" + dir +"', regular file already existed with that name");
-            }
-            
-        } else {
-            if (!dir.mkdirs()) {
-                throw new IOException("Failed to create directory '" + dir+"'");
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java
deleted file mode 100755
index f7199c7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.util;
-
-import java.net.ServerSocket;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Generator for Globally unique Strings.
- */
-
-public class IdGenerator {
-
-    private static final Logger LOG = LoggerFactory.getLogger(IdGenerator.class);
-    private static final String UNIQUE_STUB;
-    private static int instanceCount;
-    private static String hostName;
-    private String seed;
-    private AtomicLong sequence = new AtomicLong(1);
-    private int length;
-
-    static {
-        String stub = "";
-        boolean canAccessSystemProps = true;
-        try {
-            SecurityManager sm = System.getSecurityManager();
-            if (sm != null) {
-                sm.checkPropertiesAccess();
-            }
-        } catch (SecurityException se) {
-            canAccessSystemProps = false;
-        }
-
-        if (canAccessSystemProps) {
-            try {
-                hostName = InetAddressUtil.getLocalHostName();
-                ServerSocket ss = new ServerSocket(0);
-                stub = "-" + ss.getLocalPort() + "-" + System.currentTimeMillis() + "-";
-                Thread.sleep(100);
-                ss.close();
-            } catch (Exception ioe) {
-                LOG.warn("could not generate unique stub", ioe);
-            }
-        } else {
-            hostName = "localhost";
-            stub = "-1-" + System.currentTimeMillis() + "-";
-        }
-        UNIQUE_STUB = stub;
-    }
-
-    /**
-     * Construct an IdGenerator
-     */
-    public IdGenerator(String prefix) {
-        synchronized (UNIQUE_STUB) {
-            this.seed = prefix + UNIQUE_STUB + (instanceCount++) + ":";
-            this.length = this.seed.length() + ("" + Long.MAX_VALUE).length();
-        }
-    }
-
-    public IdGenerator() {
-        this("ID:" + hostName);
-    }
-
-    /**
-     * As we have to find the hostname as a side-affect of generating a unique
-     * stub, we allow it's easy retrevial here
-     *
-     * @return the local host name
-     */
-
-    public static String getHostName() {
-        return hostName;
-    }
-
-
-    /**
-     * Generate a unqiue id
-     *
-     * @return a unique id
-     */
-
-    public synchronized String generateId() {
-        StringBuilder sb = new StringBuilder(length);
-        sb.append(seed);
-        sb.append(sequence.getAndIncrement());
-        return sb.toString();
-    }
-
-    /**
-     * Generate a unique ID - that is friendly for a URL or file system
-     *
-     * @return a unique id
-     */
-    public String generateSanitizedId() {
-        String result = generateId();
-        result = result.replace(':', '-');
-        result = result.replace('_', '-');
-        result = result.replace('.', '-');
-        return result;
-    }
-
-    /**
-     * From a generated id - return the seed (i.e. minus the count)
-     *
-     * @param id the generated identifer
-     * @return the seed
-     */
-    public static String getSeedFromId(String id) {
-        String result = id;
-        if (id != null) {
-            int index = id.lastIndexOf(':');
-            if (index > 0 && (index + 1) < id.length()) {
-                result = id.substring(0, index + 1);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * From a generated id - return the generator count
-     *
-     * @param id
-     * @return the count
-     */
-    public static long getSequenceFromId(String id) {
-        long result = -1;
-        if (id != null) {
-            int index = id.lastIndexOf(':');
-
-            if (index > 0 && (index + 1) < id.length()) {
-                String numStr = id.substring(index + 1, id.length());
-                result = Long.parseLong(numStr);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Does a proper compare on the ids
-     *
-     * @param id1
-     * @param id2
-     * @return 0 if equal else a positive if id1 is > id2 ...
-     */
-
-    public static int compare(String id1, String id2) {
-        int result = -1;
-        String seed1 = IdGenerator.getSeedFromId(id1);
-        String seed2 = IdGenerator.getSeedFromId(id2);
-        if (seed1 != null && seed2 != null) {
-            result = seed1.compareTo(seed2);
-            if (result == 0) {
-                long count1 = IdGenerator.getSequenceFromId(id1);
-                long count2 = IdGenerator.getSequenceFromId(id2);
-                result = (int)(count1 - count2);
-            }
-        }
-        return result;
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IndentPrinter.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/IndentPrinter.java
deleted file mode 100755
index 76fe7b9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IndentPrinter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.util;
-
-import java.io.PrintWriter;
-
-/**
- * A helper class for printing indented text
- *
- * 
- */
-public class IndentPrinter {
-
-    private int indentLevel;
-    private String indent;
-    private PrintWriter out;
-
-    public IndentPrinter() {
-        this(new PrintWriter(System.out), "  ");
-    }
-
-    public IndentPrinter(PrintWriter out) {
-        this(out, "  ");
-    }
-
-    public IndentPrinter(PrintWriter out, String indent) {
-        this.out = out;
-        this.indent = indent;
-    }
-
-    public void println(Object value) {
-        out.print(value.toString());
-        out.println();
-    }
-
-    public void println(String text) {
-        out.print(text);
-        out.println();
-    }
-
-    public void print(String text) {
-        out.print(text);
-    }
-
-    public void printIndent() {
-        for (int i = 0; i < indentLevel; i++) {
-            out.print(indent);
-        }
-    }
-
-    public void println() {
-        out.println();
-    }
-
-    public void incrementIndent() {
-        ++indentLevel;
-    }
-
-    public void decrementIndent() {
-        --indentLevel;
-    }
-
-    public int getIndentLevel() {
-        return indentLevel;
-    }
-
-    public void setIndentLevel(int indentLevel) {
-        this.indentLevel = indentLevel;
-    }
-
-    public void flush() {
-        out.flush();
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/InetAddressUtil.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/InetAddressUtil.java
deleted file mode 100644
index 20b13f3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/InetAddressUtil.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.util;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-public class InetAddressUtil {
-
-	/**
-	 * When using the {@link java.net.InetAddress#getHostName()} method in an 
-	 * environment where neither a proper DNS lookup nor an <tt>/etc/hosts</tt> 
-	 * entry exists for a given host, the following exception will be thrown: 
-	 * <code>
-	 * java.net.UnknownHostException: &lt;hostname&gt;: &lt;hostname&gt;
-     *  at java.net.InetAddress.getLocalHost(InetAddress.java:1425)
-     *   ...
-	 * </code>
-	 * Instead of just throwing an UnknownHostException and giving up, this 
-	 * method grabs a suitable hostname from the exception and prevents the 
-	 * exception from being thrown. If a suitable hostname cannot be acquired
-	 * from the exception, only then is the <tt>UnknownHostException</tt> thrown. 
-	 * 
-	 * @return The hostname 
-	 * @throws UnknownHostException
-	 * @see {@link java.net.InetAddress#getLocalHost()}
-	 * @see {@link java.net.InetAddress#getHostName()}
-	 */
-	public static String getLocalHostName() throws UnknownHostException {
-		try {
-			return (InetAddress.getLocalHost()).getHostName();
-		} catch (UnknownHostException uhe) {
-			String host = uhe.getMessage(); // host = "hostname: hostname"
-			if (host != null) {
-				int colon = host.indexOf(':');
-				if (colon > 0) {
-					return host.substring(0, colon);
-				}
-			}
-			throw uhe;
-		}
-	}
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntSequenceGenerator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntSequenceGenerator.java
deleted file mode 100644
index cbfbff7..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntSequenceGenerator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.util;
-
-public class IntSequenceGenerator {
-
-    private int lastSequenceId;
-
-    public synchronized int getNextSequenceId() {
-        return ++lastSequenceId;
-    }
-
-    public synchronized int getLastSequenceId() {
-        return lastSequenceId;
-    }
-
-    public synchronized void setLastSequenceId(int l) {
-        lastSequenceId = l;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
deleted file mode 100755
index 360c802..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/**
- * 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.util;
-
-import java.beans.PropertyEditor;
-import java.beans.PropertyEditorManager;
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-import javax.net.ssl.SSLServerSocket;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-
-
-
-public final class IntrospectionSupport {
-    
-    static {
-        // Add Spring and ActiveMQ specific property editors
-        String[] additionalPath = new String[] {
-                "org.springframework.beans.propertyeditors",
-                "org.apache.activemq.util" };
-        synchronized (PropertyEditorManager.class) {
-            String[] existingSearchPath = PropertyEditorManager.getEditorSearchPath();
-            String[] newSearchPath = (String[]) Array.newInstance(String.class,
-                    existingSearchPath.length + additionalPath.length);
-            System.arraycopy(existingSearchPath, 0,
-                    newSearchPath, 0,
-                    existingSearchPath.length);
-            System.arraycopy(additionalPath, 0, 
-                    newSearchPath, existingSearchPath.length,
-                    additionalPath.length);
-            try {
-                PropertyEditorManager.setEditorSearchPath(newSearchPath);                
-                PropertyEditorManager.registerEditor(String[].class, StringArrayEditor.class);
-            } catch(java.security.AccessControlException ignore) {
-                // we might be in an applet...
-            }
-        }
-    }
-    
-    private IntrospectionSupport() {
-    }
-
-    public static boolean getProperties(Object target, Map props, String optionPrefix) {
-
-        boolean rc = false;
-        if (target == null) {
-            throw new IllegalArgumentException("target was null.");
-        }
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        if (optionPrefix == null) {
-            optionPrefix = "";
-        }
-
-        Class clazz = target.getClass();
-        Method[] methods = clazz.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-            String name = method.getName();
-            Class type = method.getReturnType();
-            Class params[] = method.getParameterTypes();
-            if ((name.startsWith("is") || name.startsWith("get")) && params.length == 0 && type != null && isSettableType(type)) {
-
-                try {
-
-                    Object value = method.invoke(target, new Object[] {});
-                    if (value == null) {
-                        continue;
-                    }
-
-                    String strValue = convertToString(value, type);
-                    if (strValue == null) {
-                        continue;
-                    }
-                    if (name.startsWith("get")) {
-                        name = name.substring(3, 4).toLowerCase()
-                                + name.substring(4);
-                    } else {
-                        name = name.substring(2, 3).toLowerCase()
-                                + name.substring(3);
-                    }
-                    props.put(optionPrefix + name, strValue);
-                    rc = true;
-
-                } catch (Throwable ignore) {
-                }
-
-            }
-        }
-
-        return rc;
-    }
-
-    public static boolean setProperties(Object target, Map<String, ?> props, String optionPrefix) {
-        boolean rc = false;
-        if (target == null) {
-            throw new IllegalArgumentException("target was null.");
-        }
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        for (Iterator<String> iter = props.keySet().iterator(); iter.hasNext();) {
-            String name = iter.next();
-            if (name.startsWith(optionPrefix)) {
-                Object value = props.get(name);
-                name = name.substring(optionPrefix.length());
-                if (setProperty(target, name, value)) {
-                    iter.remove();
-                    rc = true;
-                }
-            }
-        }
-        return rc;
-    }
-
-    public static Map<String, Object> extractProperties(Map props, String optionPrefix) {
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        HashMap<String, Object> rc = new HashMap<String, Object>(props.size());
-
-        for (Iterator iter = props.keySet().iterator(); iter.hasNext();) {
-            String name = (String)iter.next();
-            if (name.startsWith(optionPrefix)) {
-                Object value = props.get(name);
-                name = name.substring(optionPrefix.length());
-                rc.put(name, value);
-                iter.remove();
-            }
-        }
-
-        return rc;
-    }
-
-    public static boolean setProperties(Object target, Map props) {
-        boolean rc = false;
-
-        if (target == null) {
-            throw new IllegalArgumentException("target was null.");
-        }
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        for (Iterator iter = props.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Entry)iter.next();
-            if (setProperty(target, (String)entry.getKey(), entry.getValue())) {
-                iter.remove();
-                rc = true;
-            }
-        }
-
-        return rc;
-    }
-
-    public static boolean setProperty(Object target, String name, Object value) {
-        try {
-            Class clazz = target.getClass();
-            if (target instanceof SSLServerSocket) {
-                // overcome illegal access issues with internal implementation class
-                clazz = SSLServerSocket.class;
-            }
-            Method setter = findSetterMethod(clazz, name);
-            if (setter == null) {
-                return false;
-            }
-
-            // If the type is null or it matches the needed type, just use the
-            // value directly
-            if (value == null || value.getClass() == setter.getParameterTypes()[0]) {
-                setter.invoke(target, new Object[] {value});
-            } else {
-                // We need to convert it
-                setter.invoke(target, new Object[] {convert(value, setter.getParameterTypes()[0])});
-            }
-            return true;
-        } catch (Throwable ignore) {
-            return false;
-        }
-    }
-
-    private static Object convert(Object value, Class type) {
-        PropertyEditor editor = PropertyEditorManager.findEditor(type);
-        if (editor != null) {
-            editor.setAsText(value.toString());
-            return editor.getValue();
-        }
-        return null;
-    }
-
-    public static String convertToString(Object value, Class type) {
-        PropertyEditor editor = PropertyEditorManager.findEditor(type);
-        if (editor != null) {
-            editor.setValue(value);
-            return editor.getAsText();
-        }
-        return null;
-    }
-
-    private static Method findSetterMethod(Class clazz, String name) {
-        // Build the method name.
-        name = "set" + Character.toUpperCase(name.charAt(0)) + name.substring(1);
-        Method[] methods = clazz.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-            Class params[] = method.getParameterTypes();
-            if (method.getName().equals(name) && params.length == 1 ) {
-                return method;
-            }
-        }
-        return null;
-    }
-
-    private static boolean isSettableType(Class clazz) {
-        if (PropertyEditorManager.findEditor(clazz) != null) {
-            return true;
-        }
-        	
-        return false;
-    }
-
-    public static String toString(Object target) {
-        return toString(target, Object.class, null);
-    }
-    
-    public static String toString(Object target, Class stopClass) {
-    	return toString(target, stopClass, null);
-    }
-
-    public static String toString(Object target, Class stopClass, Map<String, Object> overrideFields) {
-        LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();
-        addFields(target, target.getClass(), stopClass, map);
-        if (overrideFields != null) {
-        	for(String key : overrideFields.keySet()) {
-        	    Object value = overrideFields.get(key);
-        	    map.put(key, value);
-        	}
-
-        }
-        StringBuffer buffer = new StringBuffer(simpleName(target.getClass()));
-        buffer.append(" {");
-        Set entrySet = map.entrySet();
-        boolean first = true;
-        for (Iterator iter = entrySet.iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            Object value = entry.getValue();
-            Object key = entry.getKey();
-            if (first) {
-                first = false;
-            } else {
-                buffer.append(", ");
-            }
-            buffer.append(key);
-            buffer.append(" = ");
-            
-            appendToString(buffer, key, value);
-        }
-        buffer.append("}");
-        return buffer.toString();
-    }
-
-    protected static void appendToString(StringBuffer buffer, Object key, Object value) {
-        if (value instanceof ActiveMQDestination) {
-            ActiveMQDestination destination = (ActiveMQDestination)value;
-            buffer.append(destination.getQualifiedName());
-        } else if (key.toString().toLowerCase().contains("password")){
-            buffer.append("*****");           
-        } else {
-            buffer.append(value);
-        }
-    }
-
-    public static String simpleName(Class clazz) {
-        String name = clazz.getName();
-        int p = name.lastIndexOf(".");
-        if (p >= 0) {
-            name = name.substring(p + 1);
-        }
-        return name;
-    }
-
-    private static void addFields(Object target, Class startClass, Class<Object> stopClass, LinkedHashMap<String, Object> map) {
-
-        if (startClass != stopClass) {
-            addFields(target, startClass.getSuperclass(), stopClass, map);
-        }
-
-        Field[] fields = startClass.getDeclaredFields();
-        for (int i = 0; i < fields.length; i++) {
-            Field field = fields[i];
-            if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())
-                || Modifier.isPrivate(field.getModifiers())) {
-                continue;
-            }
-
-            try {
-                field.setAccessible(true);
-                Object o = field.get(target);
-                if (o != null && o.getClass().isArray()) {
-                    try {
-                        o = Arrays.asList((Object[])o);
-                    } catch (Throwable e) {
-                    }
-                }
-                map.put(field.getName(), o);
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMSExceptionSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMSExceptionSupport.java
deleted file mode 100755
index 9382362..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMSExceptionSupport.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.util;
-
-import javax.jms.JMSException;
-import javax.jms.MessageEOFException;
-import javax.jms.MessageFormatException;
-
-public final class JMSExceptionSupport {
-
-    private JMSExceptionSupport() {
-    }
-
-    public static JMSException create(String msg, Throwable cause) {
-        JMSException exception = new JMSException(msg);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static JMSException create(String msg, Exception cause) {
-        JMSException exception = new JMSException(msg);
-        exception.setLinkedException(cause);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static JMSException create(Throwable cause) {
-        if (cause instanceof JMSException) {
-            return (JMSException)cause;
-        }
-        String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0) {
-            msg = cause.toString();
-        }
-        JMSException exception = new JMSException(msg);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static JMSException create(Exception cause) {
-        if (cause instanceof JMSException) {
-            return (JMSException)cause;
-        }
-        String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0) {
-            msg = cause.toString();
-        }
-        JMSException exception = new JMSException(msg);
-        exception.setLinkedException(cause);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static MessageEOFException createMessageEOFException(Exception cause) {
-        String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0) {
-            msg = cause.toString();
-        }
-        MessageEOFException exception = new MessageEOFException(msg);
-        exception.setLinkedException(cause);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static MessageFormatException createMessageFormatException(Exception cause) {
-        String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0) {
-            msg = cause.toString();
-        }
-        MessageFormatException exception = new MessageFormatException(msg);
-        exception.setLinkedException(cause);
-        exception.initCause(cause);
-        return exception;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMXSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMXSupport.java
deleted file mode 100755
index 03cd457..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMXSupport.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.util;
-
-public final class JMXSupport {
-
-    private JMXSupport() {
-    }
-
-    public static String encodeObjectNamePart(String part) {
-        // return ObjectName.quote(part);
-        String answer = part.replaceAll("[\\:\\,\\'\\\"]", "_");
-        answer = answer.replaceAll("\\?", "&qe;");
-        answer = answer.replaceAll("=", "&amp;");
-        answer = answer.replaceAll("\\*", "&ast;");
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/JettisonMappedXmlDriver.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/JettisonMappedXmlDriver.java
deleted file mode 100644
index 8486b4b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/JettisonMappedXmlDriver.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.
- */
-
-/*
- * Copyright (c) 2007, 2008 XStream Committers.
- * All rights reserved.
- *
- * The software in this package is published under the terms of the BSD
- * style license a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- * 
- * Created on 30. March 2007 by Joerg Schaible
- */
-package org.apache.activemq.util;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-
-import javax.xml.stream.XMLStreamException;
-
-import org.codehaus.jettison.mapped.Configuration;
-import org.codehaus.jettison.mapped.MappedNamespaceConvention;
-import org.codehaus.jettison.mapped.MappedXMLInputFactory;
-import org.codehaus.jettison.mapped.MappedXMLOutputFactory;
-
-import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import com.thoughtworks.xstream.io.StreamException;
-import com.thoughtworks.xstream.io.json.JettisonStaxWriter;
-import com.thoughtworks.xstream.io.xml.QNameMap;
-import com.thoughtworks.xstream.io.xml.StaxReader;
-import com.thoughtworks.xstream.io.xml.StaxWriter;
-
-
-/**
- * 
- * Temporary used until XStream 1.3.2 is released
- * 
- * Simple XStream driver wrapping Jettison's Mapped reader and writer. Serializes object from
- * and to JSON.
- * 
- * @author Dejan Bosanac
- */
-public class JettisonMappedXmlDriver implements HierarchicalStreamDriver {
-
-    private final MappedXMLOutputFactory mof;
-    private final MappedXMLInputFactory mif;
-    private final MappedNamespaceConvention convention;
-    private boolean useSerializeAsArray = true;
-
-    public JettisonMappedXmlDriver() {
-        this(new Configuration(), true);
-    }
-
-    public JettisonMappedXmlDriver(final Configuration config, final boolean useSerializeAsArray) {
-        mof = new MappedXMLOutputFactory(config);
-        mif = new MappedXMLInputFactory(config);
-        convention = new MappedNamespaceConvention(config);
-        this.useSerializeAsArray = useSerializeAsArray;
-    }
-    
-    public HierarchicalStreamReader createReader(final Reader reader) {
-        try {
-            return new StaxReader(new QNameMap(), mif.createXMLStreamReader(reader));
-        } catch (final XMLStreamException e) {
-            throw new StreamException(e);
-        }
-    }
-
-    public HierarchicalStreamReader createReader(final InputStream input) {
-        try {
-            return new StaxReader(new QNameMap(), mif.createXMLStreamReader(input));
-        } catch (final XMLStreamException e) {
-            throw new StreamException(e);
-        }
-    }
-
-    public HierarchicalStreamWriter createWriter(final Writer writer) {
-        try {
-            if (useSerializeAsArray) {
-                return new JettisonStaxWriter(new QNameMap(), mof.createXMLStreamWriter(writer), convention);
-            } else {
-                return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(writer));
-            }
-        } catch (final XMLStreamException e) {
-            throw new StreamException(e);
-        }
-    }
-
-    public HierarchicalStreamWriter createWriter(final OutputStream output) {
-        try {
-            if (useSerializeAsArray) {
-                return new JettisonStaxWriter(new QNameMap(), mof.createXMLStreamWriter(output), convention);
-            } else {
-                return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(output));
-            }
-        } catch (final XMLStreamException e) {
-            throw new StreamException(e);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LRUCache.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/LRUCache.java
deleted file mode 100755
index 5abeb41..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LRUCache.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.util;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * A Simple LRU Cache
- * 
- * 
- * @param <K>
- * @param <V>
- */
-
-public class LRUCache<K, V> extends LinkedHashMap<K, V> {
-    private static final long serialVersionUID = -342098639681884413L;
-    protected int maxCacheSize = 10000;
-
-    /**
-     * Default constructor for an LRU Cache The default capacity is 10000
-     */
-    public LRUCache() {
-        this(0,10000, 0.75f, true);
-    }
-
-    /**
-     * Constructs a LRUCache with a maximum capacity
-     * 
-     * @param maximumCacheSize
-     */
-    public LRUCache(int maximumCacheSize) {
-        this(0, maximumCacheSize, 0.75f, true);
-    }
-
-    /**
-     * Constructs an empty <tt>LRUCache</tt> instance with the specified
-     * initial capacity, maximumCacheSize,load factor and ordering mode.
-     * 
-     * @param initialCapacity the initial capacity.
-     * @param maximumCacheSize
-     * @param loadFactor the load factor.
-     * @param accessOrder the ordering mode - <tt>true</tt> for access-order,
-     *                <tt>false</tt> for insertion-order.
-     * @throws IllegalArgumentException if the initial capacity is negative or
-     *                 the load factor is non-positive.
-     */
-
-    public LRUCache(int initialCapacity, int maximumCacheSize, float loadFactor, boolean accessOrder) {
-        super(initialCapacity, loadFactor, accessOrder);
-        this.maxCacheSize = maximumCacheSize;
-    }
-
-    /**
-     * @return Returns the maxCacheSize.
-     */
-    public int getMaxCacheSize() {
-        return maxCacheSize;
-    }
-
-    /**
-     * @param maxCacheSize The maxCacheSize to set.
-     */
-    public void setMaxCacheSize(int maxCacheSize) {
-        this.maxCacheSize = maxCacheSize;
-    }
-
-    protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
-        return size() > maxCacheSize;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LRUSet.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/LRUSet.java
deleted file mode 100755
index ea683e9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LRUSet.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.util;
-
-import java.util.AbstractSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * A Simple LRU Set
- * 
- * 
- * @param <K>
- * @param <V>
- */
-
-public class LRUSet<E>
-extends AbstractSet<E>
-implements Set<E>, Cloneable, java.io.Serializable{
-   
-    private static final Object IGNORE = new Object();
-   
-    private final LRUCache cache;
-
-    /**
-     * Default constructor for an LRU Cache The default capacity is 10000
-     */
-    public LRUSet() {
-        this(0,10000, 0.75f, true);
-    }
-
-    /**
-     * Constructs a LRUCache with a maximum capacity
-     * 
-     * @param maximumCacheSize
-     */
-    public LRUSet(int maximumCacheSize) {
-        this(0, maximumCacheSize, 0.75f, true);
-    }
-
-    /**
-     * Constructs an empty <tt>LRUCache</tt> instance with the specified
-     * initial capacity, maximumCacheSize,load factor and ordering mode.
-     * 
-     * @param initialCapacity
-     *            the initial capacity.
-     * @param maximumCacheSize
-     * @param loadFactor
-     *            the load factor.
-     * @param accessOrder
-     *            the ordering mode - <tt>true</tt> for access-order,
-     *            <tt>false</tt> for insertion-order.
-     * @throws IllegalArgumentException
-     *             if the initial capacity is negative or the load factor is
-     *             non-positive.
-     */
-
-    public LRUSet(int initialCapacity, int maximumCacheSize, float loadFactor, boolean accessOrder) {
-        this.cache = new LRUCache<E,Object>(initialCapacity,maximumCacheSize,loadFactor,accessOrder);
-    }
-
-   
-    public Iterator<E> iterator() {
-    return cache.keySet().iterator();
-    }
-
-   
-    public int size() {
-    return cache.size();
-    }
-
-   
-    public boolean isEmpty() {
-    return cache.isEmpty();
-    }
-
-    public boolean contains(Object o) {
-    return cache.containsKey(o);
-    }
-
-   
-    public boolean add(E o) {
-    return cache.put(o, IGNORE)==null;
-    }
-
-    public boolean remove(Object o) {
-    return cache.remove(o)==IGNORE;
-    }
-
-    
-    public void clear() {
-    cache.clear();
-    }
-
-    
-
-    
-      
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LinkedNode.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/LinkedNode.java
deleted file mode 100644
index 591b42d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LinkedNode.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.util;
-
-/**
- * Provides a base class for you to extend when you want object to maintain a
- * doubly linked list to other objects without using a collection class.
- * 
- * @author chirino
- */
-public class LinkedNode {
-
-    protected LinkedNode next = this;
-    protected LinkedNode prev = this;
-    protected boolean tail = true;
-
-    public LinkedNode getHeadNode() {
-        if (isHeadNode()) {
-            return this;
-        }
-        if (isTailNode()) {
-            return next;
-        }
-        LinkedNode rc = prev;
-        while (!rc.isHeadNode()) {
-            rc = rc.prev;
-        }
-        return rc;
-    }
-
-    public LinkedNode getTailNode() {
-        if (isTailNode()) {
-            return this;
-        }
-        if (isHeadNode()) {
-            return prev;
-        }
-        LinkedNode rc = next;
-        while (!rc.isTailNode()) {
-            rc = rc.next;
-        }
-        return rc;
-    }
-
-    public LinkedNode getNext() {
-        return tail ? null : next;
-    }
-
-    public LinkedNode getPrevious() {
-        return prev.tail ? null : prev;
-    }
-
-    public boolean isHeadNode() {
-        return prev.isTailNode();
-    }
-
-    public boolean isTailNode() {
-        return tail;
-    }
-
-    /**
-     * @param rightHead the node to link after this node.
-     * @return this
-     */
-    public LinkedNode linkAfter(LinkedNode rightHead) {
-
-        if (rightHead == this) {
-            throw new IllegalArgumentException("You cannot link to yourself");
-        }
-        if (!rightHead.isHeadNode()) {
-            throw new IllegalArgumentException("You only insert nodes that are the first in a list");
-        }
-
-        LinkedNode rightTail = rightHead.prev;
-
-        if (tail) {
-            tail = false;
-        } else {
-            rightTail.tail = false;
-        }
-
-        rightHead.prev = this; // link the head of the right side.
-        rightTail.next = next; // link the tail of the right side
-        next.prev = rightTail; // link the head of the left side
-        next = rightHead; // link the tail of the left side.
-
-        return this;
-    }
-
-    /**
-     * @param leftHead the node to link after this node.
-     * @return
-     * @return this
-     */
-    public LinkedNode linkBefore(LinkedNode leftHead) {
-
-        if (leftHead == this) {
-            throw new IllegalArgumentException("You cannot link to yourself");
-        }
-        if (!leftHead.isHeadNode()) {
-            throw new IllegalArgumentException("You only insert nodes that are the first in a list");
-        }
-
-        // The left side is no longer going to be a tail..
-        LinkedNode leftTail = leftHead.prev;
-        leftTail.tail = false;
-
-        leftTail.next = this; // link the tail of the left side.
-        leftHead.prev = prev; // link the head of the left side.
-        prev.next = leftHead; // link the tail of the right side.
-        prev = leftTail; // link the head of the right side.
-
-        return leftHead;
-    }
-
-    /**
-     * Removes this node out of the linked list it is chained in.
-     */
-    public void unlink() {
-        // If we are allready unlinked...
-        if (prev == this) {
-            reset();
-            return;
-        }
-
-        if (tail) {
-            prev.tail = true;
-        }
-
-        // Update the peers links..
-        next.prev = prev;
-        prev.next = next;
-
-        // Update our links..
-        reset();
-    }
-    
-    public void reset() {
-        next = this;
-        prev = this;
-        tail = true;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ListEditor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ListEditor.java
deleted file mode 100644
index 019a837..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ListEditor.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.util;
-
-import java.beans.PropertyEditorSupport;
-import java.util.ArrayList;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.springframework.util.StringUtils;
-
-/**
- * Used to serialize lists of ActiveMQDestinations. 
- * @see org.apache.activemq.util.IntrospectionSupport
- */
-public class ListEditor extends PropertyEditorSupport {
-	
-	public static final String DEFAULT_SEPARATOR = ",";
-
-	public String getAsText() {
-		return getValue().toString();
-	}
-
-
-	public void setAsText(String text) throws IllegalArgumentException {
-		text = text.substring(1, text.length() - 1);
-        String[] array = StringUtils.delimitedListToStringArray(text, ListEditor.DEFAULT_SEPARATOR, null);
-        ArrayList<ActiveMQDestination> list = new ArrayList<ActiveMQDestination>();
-		for (String item : array) {
-			list.add(ActiveMQDestination.createDestination(item.trim(), ActiveMQDestination.QUEUE_TYPE));
-		}
-		setValue(list);
-	}
-	
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LogWriterFinder.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/LogWriterFinder.java
deleted file mode 100644
index 5c800ef..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LogWriterFinder.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * 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.util;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.activemq.transport.LogWriter;
-import org.apache.activemq.transport.TransportLoggerView;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Class used to find a LogWriter implementation, and returning
- * a LogWriter object, taking as argument the name of a log writer.
- * The mapping between the log writer names and the classes
- * implementing LogWriter is specified by the files in the
- * resources/META-INF/services/org/apache/activemq/transport/logwriters
- * directory.
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
- * 
- */
-public class LogWriterFinder {
-    
-    private static final Logger log = LoggerFactory.getLogger(TransportLoggerView.class);
-
-    private final String path;
-    private final ConcurrentHashMap classMap = new ConcurrentHashMap();
-
-    /**
-     * Builds a LogWriterFinder that will look for the mappings between
-     * LogWriter names and classes in the directory "path".
-     * @param path The directory where the files that map log writer names to
-     * LogWriter classes are. 
-     */
-    public LogWriterFinder(String path) {
-        this.path = path;
-    }
-
-    /**
-     * Returns a LogWriter object, given a log writer name (for example "default", or "custom").
-     * Uses a ConcurrentHashMap to cache the Class objects that have already been loaded.
-     * @param logWriterName a log writer name (for example "default", or "custom").
-     * @return a LogWriter object to be used by the TransportLogger class.
-     * @throws IllegalAccessException
-     * @throws InstantiationException
-     * @throws IOException
-     * @throws ClassNotFoundException
-     */
-    public LogWriter newInstance(String logWriterName)
-    throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException
-    {
-        Class clazz = (Class) classMap.get(logWriterName);
-        if (clazz == null) {
-            clazz = newInstance(doFindLogWriterProperties(logWriterName));
-            classMap.put(logWriterName, clazz);
-        }
-        return (LogWriter)clazz.newInstance();
-    }
-    
-    /**
-     * Loads and returns a class given a Properties object with a "class" property.
-     * @param properties a Properties object with a "class" property.
-     * @return a Class object.
-     * @throws ClassNotFoundException
-     * @throws IOException
-     */
-    private Class newInstance(Properties properties) throws ClassNotFoundException, IOException {
-
-        String className = properties.getProperty("class");
-        if (className == null) {
-            throw new IOException("Expected property is missing: " + "class");
-        }
-        Class clazz;
-        try {
-            clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
-        } catch (ClassNotFoundException e) {
-            clazz = LogWriterFinder.class.getClassLoader().loadClass(className);
-        }
-
-        return clazz;
-    }
-
-    /**
-     * Given a log writer name, returns a Properties object with a "class" property
-     * whose value is a String with the name of the class to be loaded.
-     * @param logWriterName a log writer name.
-     * @return a Properties object with a "class" property
-     * @throws IOException
-     */
-    protected Properties doFindLogWriterProperties (String logWriterName) throws IOException {
-
-        String uri = path + logWriterName;
-
-        // lets try the thread context class loader first
-        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-        if (classLoader == null) classLoader = getClass().getClassLoader();
-        InputStream in = classLoader.getResourceAsStream(uri);
-        if (in == null) {
-            in = LogWriterFinder.class.getClassLoader().getResourceAsStream(uri);
-            if (in == null) {
-                log.error("Could not find log writer for resource: " + uri);
-                throw new IOException("Could not find log writer for resource: " + uri);
-            }
-        }
-
-        // lets load the file
-        BufferedInputStream reader = null;
-        Properties properties = new Properties();
-        try {
-            reader = new BufferedInputStream(in);
-            properties.load(reader);
-            return properties;
-        } finally {
-            try {
-                reader.close();
-            } catch (Exception e) {
-            }
-        }
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LongSequenceGenerator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/LongSequenceGenerator.java
deleted file mode 100755
index 53ae7f1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/LongSequenceGenerator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.util;
-
-public class LongSequenceGenerator {
-
-    private long lastSequenceId;
-
-    public synchronized long getNextSequenceId() {
-        return ++lastSequenceId;
-    }
-
-    public synchronized long getLastSequenceId() {
-        return lastSequenceId;
-    }
-
-    public synchronized void setLastSequenceId(long l) {
-        lastSequenceId = l;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MDCHelper.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/MDCHelper.java
deleted file mode 100644
index 768e1b3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MDCHelper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.util;
-
-import org.slf4j.MDC;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-/**
- *  Helper class as MDC Log4J adapter doesn't behave well with null values
- */
-public class MDCHelper {
-
-    public static Map getCopyOfContextMap() {
-        Map map = MDC.getCopyOfContextMap();
-        if (map == null) {
-            map = new Hashtable();
-        }
-        return map;
-    }
-
-    public static void setContextMap(Map map) {
-        if (map == null) {
-            map = new Hashtable();
-        }
-        MDC.setContextMap(map);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MapHelper.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/MapHelper.java
deleted file mode 100755
index 1c037b3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MapHelper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.util;
-
-import java.util.Map;
-
-/**
- * A bunch of utility methods for working with maps
- * 
- * 
- */
-public final class MapHelper {
-
-    private MapHelper() {
-    }
-
-    /**
-     * Extracts the value from the map and coerces to a String
-     */
-    public static String getString(Map map, String key) {
-        Object answer = map.get(key);
-        return (answer != null) ? answer.toString() : null;
-    }
-
-    /**
-     * Extracts the value from the map and coerces to an int value or returns a
-     * default value if one could not be found or coerced
-     */
-    public static int getInt(Map map, String key, int defaultValue) {
-        Object value = map.get(key);
-        if (value instanceof Number) {
-            return ((Number)value).intValue();
-        } else if (value instanceof String) {
-            return Integer.parseInt((String)value);
-        }
-        return defaultValue;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java
deleted file mode 100755
index 1e15e30..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/**
- * 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.util;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.UTFDataFormatException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * The fixed version of the UTF8 encoding function. Some older JVM's UTF8
- * encoding function breaks when handling large strings.
- * 
- * 
- */
-public final class MarshallingSupport {
-
-    public static final byte NULL = 0;
-    public static final byte BOOLEAN_TYPE = 1;
-    public static final byte BYTE_TYPE = 2;
-    public static final byte CHAR_TYPE = 3;
-    public static final byte SHORT_TYPE = 4;
-    public static final byte INTEGER_TYPE = 5;
-    public static final byte LONG_TYPE = 6;
-    public static final byte DOUBLE_TYPE = 7;
-    public static final byte FLOAT_TYPE = 8;
-    public static final byte STRING_TYPE = 9;
-    public static final byte BYTE_ARRAY_TYPE = 10;
-    public static final byte MAP_TYPE = 11;
-    public static final byte LIST_TYPE = 12;
-    public static final byte BIG_STRING_TYPE = 13;
-
-    private MarshallingSupport() {
-    }
-    
-    public static void marshalPrimitiveMap(Map map, DataOutputStream out) throws IOException {
-        if (map == null) {
-            out.writeInt(-1);
-        } else {
-            out.writeInt(map.size());
-            for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
-                String name = (String)iter.next();
-                out.writeUTF(name);
-                Object value = map.get(name);
-                marshalPrimitive(out, value);
-            }
-        }
-    }
-
-    public static Map<String, Object> unmarshalPrimitiveMap(DataInputStream in) throws IOException {
-        return unmarshalPrimitiveMap(in, Integer.MAX_VALUE);
-    }
-
-    /**
-     * @param in
-     * @return
-     * @throws IOException
-     * @throws IOException
-     */
-    public static Map<String, Object> unmarshalPrimitiveMap(DataInputStream in, int maxPropertySize) throws IOException {
-        int size = in.readInt();
-        if (size > maxPropertySize) {
-            throw new IOException("Primitive map is larger than the allowed size: " + size);
-        }
-        if (size < 0) {
-            return null;
-        } else {
-            Map<String, Object> rc = new HashMap<String, Object>(size);
-            for (int i = 0; i < size; i++) {
-                String name = in.readUTF();
-                rc.put(name, unmarshalPrimitive(in));
-            }
-            return rc;
-        }
-
-    }
-
-    public static void marshalPrimitiveList(List list, DataOutputStream out) throws IOException {
-        out.writeInt(list.size());
-        for (Iterator iter = list.iterator(); iter.hasNext();) {
-            Object element = (Object)iter.next();
-            marshalPrimitive(out, element);
-        }
-    }
-
-    public static List<Object> unmarshalPrimitiveList(DataInputStream in) throws IOException {
-        int size = in.readInt();
-        List<Object> answer = new ArrayList<Object>(size);
-        while (size-- > 0) {
-            answer.add(unmarshalPrimitive(in));
-        }
-        return answer;
-    }
-
-    public static void marshalPrimitive(DataOutputStream out, Object value) throws IOException {
-        if (value == null) {
-            marshalNull(out);
-        } else if (value.getClass() == Boolean.class) {
-            marshalBoolean(out, ((Boolean)value).booleanValue());
-        } else if (value.getClass() == Byte.class) {
-            marshalByte(out, ((Byte)value).byteValue());
-        } else if (value.getClass() == Character.class) {
-            marshalChar(out, ((Character)value).charValue());
-        } else if (value.getClass() == Short.class) {
-            marshalShort(out, ((Short)value).shortValue());
-        } else if (value.getClass() == Integer.class) {
-            marshalInt(out, ((Integer)value).intValue());
-        } else if (value.getClass() == Long.class) {
-            marshalLong(out, ((Long)value).longValue());
-        } else if (value.getClass() == Float.class) {
-            marshalFloat(out, ((Float)value).floatValue());
-        } else if (value.getClass() == Double.class) {
-            marshalDouble(out, ((Double)value).doubleValue());
-        } else if (value.getClass() == byte[].class) {
-            marshalByteArray(out, (byte[])value);
-        } else if (value.getClass() == String.class) {
-            marshalString(out, (String)value);
-        } else if (value instanceof Map) {
-            out.writeByte(MAP_TYPE);
-            marshalPrimitiveMap((Map)value, out);
-        } else if (value instanceof List) {
-            out.writeByte(LIST_TYPE);
-            marshalPrimitiveList((List)value, out);
-        } else {
-            throw new IOException("Object is not a primitive: " + value);
-        }
-    }
-
-    public static Object unmarshalPrimitive(DataInputStream in) throws IOException {
-        Object value = null;
-        byte type = in.readByte();
-        switch (type) {
-        case BYTE_TYPE:
-            value = Byte.valueOf(in.readByte());
-            break;
-        case BOOLEAN_TYPE:
-            value = in.readBoolean() ? Boolean.TRUE : Boolean.FALSE;
-            break;
-        case CHAR_TYPE:
-            value = Character.valueOf(in.readChar());
-            break;
-        case SHORT_TYPE:
-            value = Short.valueOf(in.readShort());
-            break;
-        case INTEGER_TYPE:
-            value = Integer.valueOf(in.readInt());
-            break;
-        case LONG_TYPE:
-            value = Long.valueOf(in.readLong());
-            break;
-        case FLOAT_TYPE:
-            value = new Float(in.readFloat());
-            break;
-        case DOUBLE_TYPE:
-            value = new Double(in.readDouble());
-            break;
-        case BYTE_ARRAY_TYPE:
-            value = new byte[in.readInt()];
-            in.readFully((byte[])value);
-            break;
-        case STRING_TYPE:
-            value = in.readUTF();
-            break;
-        case BIG_STRING_TYPE:
-            value = readUTF8(in);
-            break;
-        case MAP_TYPE:
-            value = unmarshalPrimitiveMap(in);
-            break;
-        case LIST_TYPE:
-            value = unmarshalPrimitiveList(in);
-            break;
-        case NULL:
-            value = null;
-            break;
-        default:
-            throw new IOException("Unknown primitive type: " + type);
-        }
-        return value;
-    }
-
-    public static void marshalNull(DataOutputStream out) throws IOException {
-        out.writeByte(NULL);
-    }
-
-    public static void marshalBoolean(DataOutputStream out, boolean value) throws IOException {
-        out.writeByte(BOOLEAN_TYPE);
-        out.writeBoolean(value);
-    }
-
-    public static void marshalByte(DataOutputStream out, byte value) throws IOException {
-        out.writeByte(BYTE_TYPE);
-        out.writeByte(value);
-    }
-
-    public static void marshalChar(DataOutputStream out, char value) throws IOException {
-        out.writeByte(CHAR_TYPE);
-        out.writeChar(value);
-    }
-
-    public static void marshalShort(DataOutputStream out, short value) throws IOException {
-        out.writeByte(SHORT_TYPE);
-        out.writeShort(value);
-    }
-
-    public static void marshalInt(DataOutputStream out, int value) throws IOException {
-        out.writeByte(INTEGER_TYPE);
-        out.writeInt(value);
-    }
-
-    public static void marshalLong(DataOutputStream out, long value) throws IOException {
-        out.writeByte(LONG_TYPE);
-        out.writeLong(value);
-    }
-
-    public static void marshalFloat(DataOutputStream out, float value) throws IOException {
-        out.writeByte(FLOAT_TYPE);
-        out.writeFloat(value);
-    }
-
-    public static void marshalDouble(DataOutputStream out, double value) throws IOException {
-        out.writeByte(DOUBLE_TYPE);
-        out.writeDouble(value);
-    }
-
-    public static void marshalByteArray(DataOutputStream out, byte[] value) throws IOException {
-        marshalByteArray(out, value, 0, value.length);
-    }
-
-    public static void marshalByteArray(DataOutputStream out, byte[] value, int offset, int length) throws IOException {
-        out.writeByte(BYTE_ARRAY_TYPE);
-        out.writeInt(length);
-        out.write(value, offset, length);
-    }
-
-    public static void marshalString(DataOutputStream out, String s) throws IOException {
-        // If it's too big, out.writeUTF may not able able to write it out.
-        if (s.length() < Short.MAX_VALUE / 4) {
-            out.writeByte(STRING_TYPE);
-            out.writeUTF(s);
-        } else {
-            out.writeByte(BIG_STRING_TYPE);
-            writeUTF8(out, s);
-        }
-    }
-
-    public static void writeUTF8(DataOutput dataOut, String text) throws IOException {
-        if (text != null) {
-            int strlen = text.length();
-            int utflen = 0;
-            char[] charr = new char[strlen];
-            int c = 0;
-            int count = 0;
-
-            text.getChars(0, strlen, charr, 0);
-
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    utflen++;
-                } else if (c > 0x07FF) {
-                    utflen += 3;
-                } else {
-                    utflen += 2;
-                }
-            }
-            // TODO diff: Sun code - removed
-            byte[] bytearr = new byte[utflen + 4]; // TODO diff: Sun code
-            bytearr[count++] = (byte)((utflen >>> 24) & 0xFF); // TODO diff:
-            // Sun code
-            bytearr[count++] = (byte)((utflen >>> 16) & 0xFF); // TODO diff:
-            // Sun code
-            bytearr[count++] = (byte)((utflen >>> 8) & 0xFF);
-            bytearr[count++] = (byte)((utflen >>> 0) & 0xFF);
-            for (int i = 0; i < strlen; i++) {
-                c = charr[i];
-                if ((c >= 0x0001) && (c <= 0x007F)) {
-                    bytearr[count++] = (byte)c;
-                } else if (c > 0x07FF) {
-                    bytearr[count++] = (byte)(0xE0 | ((c >> 12) & 0x0F));
-                    bytearr[count++] = (byte)(0x80 | ((c >> 6) & 0x3F));
-                    bytearr[count++] = (byte)(0x80 | ((c >> 0) & 0x3F));
-                } else {
-                    bytearr[count++] = (byte)(0xC0 | ((c >> 6) & 0x1F));
-                    bytearr[count++] = (byte)(0x80 | ((c >> 0) & 0x3F));
-                }
-            }
-            dataOut.write(bytearr);
-
-        } else {
-            dataOut.writeInt(-1);
-        }
-    }
-
-    public static String readUTF8(DataInput dataIn) throws IOException {
-        int utflen = dataIn.readInt(); // TODO diff: Sun code
-        if (utflen > -1) {
-            StringBuffer str = new StringBuffer(utflen);
-            byte bytearr[] = new byte[utflen];
-            int c;
-            int char2;
-            int char3;
-            int count = 0;
-
-            dataIn.readFully(bytearr, 0, utflen);
-
-            while (count < utflen) {
-                c = bytearr[count] & 0xff;
-                switch (c >> 4) {
-                case 0:
-                case 1:
-                case 2:
-                case 3:
-                case 4:
-                case 5:
-                case 6:
-                case 7:
-                    /* 0xxxxxxx */
-                    count++;
-                    str.append((char)c);
-                    break;
-                case 12:
-                case 13:
-                    /* 110x xxxx 10xx xxxx */
-                    count += 2;
-                    if (count > utflen) {
-                        throw new UTFDataFormatException();
-                    }
-                    char2 = bytearr[count - 1];
-                    if ((char2 & 0xC0) != 0x80) {
-                        throw new UTFDataFormatException();
-                    }
-                    str.append((char)(((c & 0x1F) << 6) | (char2 & 0x3F)));
-                    break;
-                case 14:
-                    /* 1110 xxxx 10xx xxxx 10xx xxxx */
-                    count += 3;
-                    if (count > utflen) {
-                        throw new UTFDataFormatException();
-                    }
-                    char2 = bytearr[count - 2]; // TODO diff: Sun code
-                    char3 = bytearr[count - 1]; // TODO diff: Sun code
-                    if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) {
-                        throw new UTFDataFormatException();
-                    }
-                    str.append((char)(((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0)));
-                    break;
-                default:
-                    /* 10xx xxxx, 1111 xxxx */
-                    throw new UTFDataFormatException();
-                }
-            }
-            // The number of chars produced may be less than utflen
-            return new String(str);
-        } else {
-            return null;
-        }
-    }
-
-    public static String propertiesToString(Properties props) throws IOException {
-        String result = "";
-        if (props != null) {
-            DataByteArrayOutputStream dataOut = new DataByteArrayOutputStream();
-            props.store(dataOut, "");
-            result = new String(dataOut.getData(), 0, dataOut.size());
-            dataOut.close();
-        }
-        return result;
-    }
-
-    public static Properties stringToProperties(String str) throws IOException {
-        Properties result = new Properties();
-        if (str != null && str.length() > 0) {
-            DataByteArrayInputStream dataIn = new DataByteArrayInputStream(str.getBytes());
-            result.load(dataIn);
-            dataIn.close();
-        }
-        return result;
-    }
-
-    public static String truncate64(String text) {
-        if (text.length() > 63) {
-            text = text.substring(0, 45) + "..." + text.substring(text.length() - 12);
-        }
-        return text;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryIntPropertyEditor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryIntPropertyEditor.java
deleted file mode 100644
index 88c5a9f..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryIntPropertyEditor.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.util;
-
-import java.beans.PropertyEditorSupport;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Converts string values like "20 Mb", "1024kb", and "1g" to int values in
- * bytes.
- */
-public class MemoryIntPropertyEditor extends PropertyEditorSupport {
-    public void setAsText(String text) throws IllegalArgumentException {
-
-        Pattern p = Pattern.compile("^\\s*(\\d+)\\s*(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        Matcher m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Integer.valueOf(Integer.parseInt(m.group(1))));
-            return;
-        }
-
-        p = Pattern.compile("^\\s*(\\d+)\\s*k(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Integer.valueOf(Integer.parseInt(m.group(1)) * 1024));
-            return;
-        }
-
-        p = Pattern.compile("^\\s*(\\d+)\\s*m(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Integer.valueOf(Integer.parseInt(m.group(1)) * 1024 * 1024));
-            return;
-        }
-
-        p = Pattern.compile("^\\s*(\\d+)\\s*g(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Integer.valueOf(Integer.parseInt(m.group(1)) * 1024 * 1024 * 1024));
-            return;
-        }
-
-        throw new IllegalArgumentException("Could convert not to a memory size: " + text);
-    }
-
-    public String getAsText() {
-        Integer value = (Integer)getValue();
-        return value != null ? value.toString() : "";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryPropertyEditor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryPropertyEditor.java
deleted file mode 100644
index 0092530..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MemoryPropertyEditor.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.util;
-
-import java.beans.PropertyEditorSupport;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Converts string values like "20 Mb", "1024kb", and "1g" to long values in
- * bytes.
- */
-public class MemoryPropertyEditor extends PropertyEditorSupport {
-    public void setAsText(String text) throws IllegalArgumentException {
-
-        Pattern p = Pattern.compile("^\\s*(\\d+)\\s*(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        Matcher m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Long.valueOf(Long.parseLong(m.group(1))));
-            return;
-        }
-
-        p = Pattern.compile("^\\s*(\\d+)\\s*k(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Long.valueOf(Long.parseLong(m.group(1)) * 1024));
-            return;
-        }
-
-        p = Pattern.compile("^\\s*(\\d+)\\s*m(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Long.valueOf(Long.parseLong(m.group(1)) * 1024 * 1024));
-            return;
-        }
-
-        p = Pattern.compile("^\\s*(\\d+)\\s*g(b)?\\s*$", Pattern.CASE_INSENSITIVE);
-        m = p.matcher(text);
-        if (m.matches()) {
-            setValue(Long.valueOf(Long.parseLong(m.group(1)) * 1024 * 1024 * 1024));
-            return;
-        }
-
-        throw new IllegalArgumentException("Could convert not to a memory size: " + text);
-    }
-
-    public String getAsText() {
-        Long value = (Long)getValue();
-        return value != null ? value.toString() : "";
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MessageComparatorSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/MessageComparatorSupport.java
deleted file mode 100644
index 448f7d0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MessageComparatorSupport.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.util;
-
-import java.io.Serializable;
-import java.util.Comparator;
-
-import javax.jms.Message;
-
-/**
- * A base class for comparators which works on JMS {@link Message} objects
- * 
- * 
- */
-public abstract class MessageComparatorSupport implements Comparator, Serializable {
-
-    public int compare(Object object1, Object object2) {
-        Message command1 = (Message)object1;
-        Message command2 = (Message)object2;
-        return compareMessages(command1, command2);
-    }
-
-    protected abstract int compareMessages(Message message1, Message message2);
-
-    protected int compareComparators(final Comparable comparable, final Comparable comparable2) {
-        if (comparable == null && comparable2 == null) {
-            return 0;
-        } else if (comparable != null) {
-            if (comparable2 == null) {
-                return 1;
-            }
-            return comparable.compareTo(comparable2);
-        } else if (comparable2 != null) {
-            if (comparable == null) {
-                return -11;
-            }
-            return comparable2.compareTo(comparable) * -1;
-        }
-        return 0;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MessageDestinationComparator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/MessageDestinationComparator.java
deleted file mode 100644
index c696b16..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/MessageDestinationComparator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.util;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.apache.activemq.command.ActiveMQMessage;
-
-/**
- * A comparator which works on SendCommand objects to compare the destinations
- * 
- * 
- */
-public class MessageDestinationComparator extends MessageComparatorSupport {
-
-    protected int compareMessages(Message message1, Message message2) {
-        return compareComparators(getComparable(getDestination(message1)), getComparable(getDestination(message2)));
-    }
-
-    protected Destination getDestination(Message message) {
-        if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage amqMessage = (ActiveMQMessage)message;
-            return amqMessage.getDestination();
-        }
-        try {
-            return message.getJMSDestination();
-        } catch (JMSException e) {
-            return null;
-        }
-    }
-
-    protected Comparable getComparable(Destination destination) {
-        if (destination != null) {
-            return destination.toString();
-        }
-        return null;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceListener.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceListener.java
deleted file mode 100644
index f6cdba1..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceListener.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.util;
-
-import org.apache.activemq.Service;
-
-/**
- * A listener for service start, stop events
- * 
- * 
- */
-public interface ServiceListener{
-    
-    public void started(Service service);
-    
-    public void stopped(Service service);
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceStopper.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceStopper.java
deleted file mode 100644
index 28ed572..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceStopper.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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.util;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.activemq.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A helper class used to stop a bunch of services, catching and logging any
- * exceptions and then throwing the first exception when everything is stoped.
- * 
- * 
- */
-public class ServiceStopper {
-    private Throwable firstException;
-
-    /**
-     * Stops the given service, catching any exceptions that are thrown.
-     */
-    public void stop(Service service) {
-        try {
-            if (service != null) {
-                service.stop();
-            }
-        } catch (Exception e) {
-            onException(service, e);
-        }
-    }
-
-    /**
-     * Performs the given code to stop some service handling the exceptions
-     * which may be thrown properly
-     */
-    public void run(Callback stopClosure) {
-        try {
-            stopClosure.execute();
-        } catch (Throwable e) {
-            onException(stopClosure, e);
-        }
-    }
-
-    /**
-     * Stops a list of services
-     */
-    public void stopServices(List services) {
-        for (Iterator iter = services.iterator(); iter.hasNext();) {
-            Service service = (Service)iter.next();
-            stop(service);
-        }
-    }
-
-    public void onException(Object owner, Throwable e) {
-        logError(owner, e);
-        if (firstException == null) {
-            firstException = e;
-        }
-    }
-
-    /**
-     * Throws the first exception that was thrown if there was one.
-     */
-    public void throwFirstException() throws Exception {
-        if (firstException != null) {
-            if (firstException instanceof Exception) {
-                Exception e = (Exception)firstException;
-                throw e;
-            } else if (firstException instanceof RuntimeException) {
-                RuntimeException e = (RuntimeException)firstException;
-                throw e;
-            } else {
-                throw new RuntimeException("Unknown type of exception: " + firstException, firstException);
-            }
-        }
-    }
-
-    protected void logError(Object service, Throwable e) {
-        Logger log = LoggerFactory.getLogger(service.getClass());
-        log.error("Could not stop service: " + service + ". Reason: " + e, e);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java
deleted file mode 100644
index 50a7811..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.util;
-
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A helper class for working with services together with a useful base class
- * for service implementations.
- * 
- * 
- */
-public abstract class ServiceSupport implements Service {
-    private static final Logger LOG = LoggerFactory.getLogger(ServiceSupport.class);
-
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private AtomicBoolean stopping = new AtomicBoolean(false);
-    private AtomicBoolean stopped = new AtomicBoolean(false);
-    private List<ServiceListener>serviceListeners = new CopyOnWriteArrayList<ServiceListener>();
-
-    public static void dispose(Service service) {
-        try {
-            service.stop();
-        } catch (Exception e) {
-            LOG.debug("Could not stop service: " + service + ". Reason: " + e, e);
-        }
-    }
-
-    public void start() throws Exception {
-        if (started.compareAndSet(false, true)) {
-            boolean success = false;
-            try {
-                doStart();
-                success = true;
-            } finally {
-                started.set(success);
-            }
-            for(ServiceListener l:this.serviceListeners) {
-                l.started(this);
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        if (stopped.compareAndSet(false, true)) {
-            stopping.set(true);
-            ServiceStopper stopper = new ServiceStopper();
-            try {
-                doStop(stopper);
-            } catch (Exception e) {
-                stopper.onException(this, e);
-            }
-            stopped.set(true);
-            started.set(false);
-            stopping.set(false);
-            for(ServiceListener l:this.serviceListeners) {
-                l.stopped(this);
-            }
-            stopper.throwFirstException();
-        }
-    }
-
-    /**
-     * @return true if this service has been started
-     */
-    public boolean isStarted() {
-        return started.get();
-    }
-
-    /**
-     * @return true if this service is in the process of closing
-     */
-    public boolean isStopping() {
-        return stopping.get();
-    }
-
-    /**
-     * @return true if this service is closed
-     */
-    public boolean isStopped() {
-        return stopped.get();
-    }
-    
-    public void addServiceListener(ServiceListener l) {
-        this.serviceListeners.add(l);
-    }
-    
-    public void removeServiceListener(ServiceListener l) {
-        this.serviceListeners.remove(l);
-    }
-
-    protected abstract void doStop(ServiceStopper stopper) throws Exception;
-
-    protected abstract void doStart() throws Exception;
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/StringArrayEditor.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/StringArrayEditor.java
deleted file mode 100644
index 9ad424d..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/StringArrayEditor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.util;
-
-import java.beans.PropertyEditorSupport;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-
-public class StringArrayEditor extends PropertyEditorSupport {
-
-    public void setAsText(String text) {
-        if (text == null || text.length() == 0) {
-            setValue(null);
-        } else {
-            StringTokenizer stok = new StringTokenizer(text, ",");
-            final List<String> list = new ArrayList<String>();
-
-            while (stok.hasMoreTokens()) {
-                list.add(stok.nextToken());
-            }
-
-            Object array = list.toArray(new String[list.size()]);
-
-            setValue(array);
-        }
-    }
-
-    public String getAsText() {
-        Object[] objects = (Object[]) getValue();
-        if (objects == null || objects.length == 0) {
-            return null;
-        }
-
-        StringBuffer result = new StringBuffer(String.valueOf(objects[0]));
-        for (int i = 1; i < objects.length; i++) {
-            result.append(",").append(objects[i]);
-        }
-
-        return result.toString();
-
-    }
-
-}
-
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java
deleted file mode 100755
index 0a87dfa..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/SubscriptionKey.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.util;
-
-import org.apache.activemq.command.SubscriptionInfo;
-
-public class SubscriptionKey {
-
-    public final String clientId;
-    public final String subscriptionName;
-    private final int hashValue;
-
-    public SubscriptionKey(SubscriptionInfo info) {
-        this(info.getClientId(), info.getSubscriptionName());
-    }
-
-    public SubscriptionKey(String clientId, String subscriptionName) {
-        this.clientId = clientId;
-        this.subscriptionName = subscriptionName != null ? subscriptionName : "NOT_SET";
-        hashValue = clientId.hashCode() ^ this.subscriptionName.hashCode();
-    }
-
-    public int hashCode() {
-        return hashValue;
-    }
-
-    public boolean equals(Object o) {
-        try {
-            SubscriptionKey key = (SubscriptionKey)o;
-            return key.clientId.equals(clientId) && key.subscriptionName.equals(subscriptionName);
-        } catch (Throwable e) {
-            return false;
-        }
-    }
-
-    public String toString() {
-        return clientId + ":" + subscriptionName;
-    }
-
-    public String getClientId() {
-        return clientId;
-    }
-
-    public String getSubscriptionName() {
-        return subscriptionName;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ThreadTracker.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/ThreadTracker.java
deleted file mode 100644
index 3ab7cb0..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/ThreadTracker.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.util;
-
-import java.util.HashMap;
-import java.util.Map.Entry;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Debugging tool to track entry points through code, useful to see runtime call paths
- * To use, add to a method as follows:<code>
- *  public void someMethod() {
- *      ThreadTracker.track("someMethod");
- *      ...
- *  }</code>
- *  and at some stage call <code>result</code> to get a LOG
- *  output of the callers with an associated call count
- *      
- */
-public class ThreadTracker {
-
-    static final Logger LOG = LoggerFactory.getLogger(ThreadTracker.class);  
-    static HashMap<String, Tracker> trackers = new HashMap<String, Tracker>();
-    
-    /**
-     * track the stack trace of callers
-     * @param name the method being tracked
-     */
-    public static void track(final String name) {
-        Tracker t;
-        final String key = name.intern();
-        synchronized(trackers) {
-            t = trackers.get(key);
-            if (t == null) {
-                t = new Tracker();
-                trackers.put(key, t);
-            }
-        }
-        t.track();
-    }
-    
-    /**
-     * output the result of stack trace capture to the log
-     */
-    public static void result() {
-        synchronized(trackers) {
-            for (Entry<String, Tracker> t: trackers.entrySet()) {
-                LOG.info("Tracker: " + t.getKey() + ", " + t.getValue().size() + " entry points...");
-                for (Trace trace : t.getValue().values()) {
-                    LOG.info("count: " + trace.count, trace);
-                }
-                LOG.info("Tracker: " + t.getKey() + ", done.");
-            }
-        }
-    }
-
-}
-
-@SuppressWarnings("serial")
-class Trace extends Throwable {
-    public int count = 1;
-    public final long id;
-    Trace() {
-        super();
-        id = calculateIdentifier();
-    }
-    private long calculateIdentifier() {
-        int len = 0;
-        for (int i=0; i<this.getStackTrace().length; i++) {
-            len += this.getStackTrace()[i].toString().intern().hashCode();
-        }
-        return len;
-    }
-}
-
-@SuppressWarnings("serial")
-class Tracker extends HashMap<Long, Trace> {
-    public void track() {
-        Trace current = new Trace();
-        synchronized(this) {
-            Trace exist = get(current.id);
-            if (exist != null) {
-                exist.count++;
-            } else {
-                put(current.id, current);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java
deleted file mode 100755
index 884ab99..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A helper class for running code with a PersistenceAdapter in a transaction.
- * 
- * 
- */
-public class TransactionTemplate {
-    private static final Logger LOG = LoggerFactory.getLogger(TransactionTemplate.class);
-    private PersistenceAdapter persistenceAdapter;
-    private ConnectionContext context;
-
-    public TransactionTemplate(PersistenceAdapter persistenceAdapter, ConnectionContext context) {
-        this.persistenceAdapter = persistenceAdapter;
-        this.context = context;
-    }
-
-    public void run(Callback task) throws IOException {
-        persistenceAdapter.beginTransaction(context);
-        Throwable throwable = null;
-        try {
-            task.execute();
-        } catch (IOException t) {
-            throwable = t;
-            throw t;
-        } catch (RuntimeException t) {
-            throwable = t;
-            throw t;
-        } catch (Throwable t) {
-            throwable = t;
-            throw IOExceptionSupport.create("Persistence task failed: " + t, t);
-        } finally {
-            if (throwable == null) {
-                persistenceAdapter.commitTransaction(context);
-            } else {
-                LOG.error("Having to Rollback - caught an exception: " + throwable);
-                persistenceAdapter.rollbackTransaction(context);
-            }
-        }
-    }
-
-    public ConnectionContext getContext() {
-        return context;
-    }
-
-    public PersistenceAdapter getPersistenceAdapter() {
-        return persistenceAdapter;
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/TypeConversionSupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/TypeConversionSupport.java
deleted file mode 100755
index 4e350b9..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/TypeConversionSupport.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * 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.util;
-
-import java.util.Date;
-import java.util.HashMap;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-public final class TypeConversionSupport {
-
-    static class ConversionKey {
-        final Class from;
-        final Class to;
-        final int hashCode;
-
-        public ConversionKey(Class from, Class to) {
-            this.from = from;
-            this.to = to;
-            this.hashCode = from.hashCode() ^ (to.hashCode() << 1);
-        }
-
-        public boolean equals(Object o) {
-            ConversionKey x = (ConversionKey)o;
-            return x.from == from && x.to == to;
-        }
-
-        public int hashCode() {
-            return hashCode;
-        }
-    }
-
-    interface Converter {
-        Object convert(Object value);
-    }
-
-    private static final HashMap<ConversionKey, Converter> CONVERSION_MAP = new HashMap<ConversionKey, Converter>();
-    static {
-        Converter toStringConverter = new Converter() {
-            public Object convert(Object value) {
-                return value.toString();
-            }
-        };
-        CONVERSION_MAP.put(new ConversionKey(Boolean.class, String.class), toStringConverter);
-        CONVERSION_MAP.put(new ConversionKey(Byte.class, String.class), toStringConverter);
-        CONVERSION_MAP.put(new ConversionKey(Short.class, String.class), toStringConverter);
-        CONVERSION_MAP.put(new ConversionKey(Integer.class, String.class), toStringConverter);
-        CONVERSION_MAP.put(new ConversionKey(Long.class, String.class), toStringConverter);
-        CONVERSION_MAP.put(new ConversionKey(Float.class, String.class), toStringConverter);
-        CONVERSION_MAP.put(new ConversionKey(Double.class, String.class), toStringConverter);
-
-        CONVERSION_MAP.put(new ConversionKey(String.class, Boolean.class), new Converter() {
-            public Object convert(Object value) {
-                return Boolean.valueOf((String)value);
-            }
-        });
-        CONVERSION_MAP.put(new ConversionKey(String.class, Byte.class), new Converter() {
-            public Object convert(Object value) {
-                return Byte.valueOf((String)value);
-            }
-        });
-        CONVERSION_MAP.put(new ConversionKey(String.class, Short.class), new Converter() {
-            public Object convert(Object value) {
-                return Short.valueOf((String)value);
-            }
-        });
-        CONVERSION_MAP.put(new ConversionKey(String.class, Integer.class), new Converter() {
-            public Object convert(Object value) {
-                return Integer.valueOf((String)value);
-            }
-        });
-        CONVERSION_MAP.put(new ConversionKey(String.class, Long.class), new Converter() {
-            public Object convert(Object value) {
-                return Long.valueOf((String)value);
-            }
-        });
-        CONVERSION_MAP.put(new ConversionKey(String.class, Float.class), new Converter() {
-            public Object convert(Object value) {
-                return Float.valueOf((String)value);
-            }
-        });
-        CONVERSION_MAP.put(new ConversionKey(String.class, Double.class), new Converter() {
-            public Object convert(Object value) {
-                return Double.valueOf((String)value);
-            }
-        });
-
-        Converter longConverter = new Converter() {
-            public Object convert(Object value) {
-                return Long.valueOf(((Number)value).longValue());
-            }
-        };
-        CONVERSION_MAP.put(new ConversionKey(Byte.class, Long.class), longConverter);
-        CONVERSION_MAP.put(new ConversionKey(Short.class, Long.class), longConverter);
-        CONVERSION_MAP.put(new ConversionKey(Integer.class, Long.class), longConverter);
-        CONVERSION_MAP.put(new ConversionKey(Date.class, Long.class), new Converter() {
-            public Object convert(Object value) {
-                return Long.valueOf(((Date)value).getTime());
-            }
-        });
-
-        Converter intConverter = new Converter() {
-            public Object convert(Object value) {
-                return Integer.valueOf(((Number)value).intValue());
-            }
-        };
-        CONVERSION_MAP.put(new ConversionKey(Byte.class, Integer.class), intConverter);
-        CONVERSION_MAP.put(new ConversionKey(Short.class, Integer.class), intConverter);
-
-        CONVERSION_MAP.put(new ConversionKey(Byte.class, Short.class), new Converter() {
-            public Object convert(Object value) {
-                return Short.valueOf(((Number)value).shortValue());
-            }
-        });
-
-        CONVERSION_MAP.put(new ConversionKey(Float.class, Double.class), new Converter() {
-            public Object convert(Object value) {
-                return new Double(((Number)value).doubleValue());
-            }
-        });
-        CONVERSION_MAP.put(new ConversionKey(String.class, ActiveMQDestination.class), new Converter() {
-            public Object convert(Object value) {
-                return ActiveMQDestination.createDestination((String)value, ActiveMQDestination.QUEUE_TYPE);
-            }
-        });
-    }
-
-    private TypeConversionSupport() {
-    }
-
-    public static Object convert(Object value, Class clazz) {
-
-        assert value != null && clazz != null;
-
-        if (value.getClass() == clazz) {
-            return value;
-        }
-
-        Converter c = CONVERSION_MAP.get(new ConversionKey(value.getClass(), clazz));
-        if (c == null) {
-            return null;
-        }
-        return c.convert(value);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java
deleted file mode 100755
index 686f8f3..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/**
- * 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.util;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 
- */
-public class URISupport {
-
-    public static class CompositeData {
-        private String host;
-        private String scheme;
-        private String path;
-        private URI components[];
-        private Map<String, String> parameters;
-        private String fragment;
-
-        public URI[] getComponents() {
-            return components;
-        }
-
-        public String getFragment() {
-            return fragment;
-        }
-
-        public Map<String, String> getParameters() {
-            return parameters;
-        }
-
-        public String getScheme() {
-            return scheme;
-        }
-
-        public String getPath() {
-            return path;
-        }
-
-        public String getHost() {
-            return host;
-        }
-
-        public URI toURI() throws URISyntaxException {
-            StringBuffer sb = new StringBuffer();
-            if (scheme != null) {
-                sb.append(scheme);
-                sb.append(':');
-            }
-
-            if (host != null && host.length() != 0) {
-                sb.append(host);
-            } else {
-                sb.append('(');
-                for (int i = 0; i < components.length; i++) {
-                    if (i != 0) {
-                        sb.append(',');
-                    }
-                    sb.append(components[i].toString());
-                }
-                sb.append(')');
-            }
-
-            if (path != null) {
-                sb.append('/');
-                sb.append(path);
-            }
-            if (!parameters.isEmpty()) {
-                sb.append("?");
-                sb.append(createQueryString(parameters));
-            }
-            if (fragment != null) {
-                sb.append("#");
-                sb.append(fragment);
-            }
-            return new URI(sb.toString());
-        }
-    }
-
-    public static Map<String, String> parseQuery(String uri) throws URISyntaxException {
-        try {
-            uri = uri.substring(uri.lastIndexOf("?") + 1); // get only the relevant part of the query
-            Map<String, String> rc = new HashMap<String, String>();
-            if (uri != null) {
-                String[] parameters = uri.split("&");
-                for (int i = 0; i < parameters.length; i++) {
-                    int p = parameters[i].indexOf("=");
-                    if (p >= 0) {
-                        String name = URLDecoder.decode(parameters[i].substring(0, p), "UTF-8");
-                        String value = URLDecoder.decode(parameters[i].substring(p + 1), "UTF-8");
-                        rc.put(name, value);
-                    } else {
-                        rc.put(parameters[i], null);
-                    }
-                }
-            }
-            return rc;
-        } catch (UnsupportedEncodingException e) {
-            throw (URISyntaxException)new URISyntaxException(e.toString(), "Invalid encoding").initCause(e);
-        }
-    }
-
-    public static Map<String, String> parseParameters(URI uri) throws URISyntaxException {
-        if (!isCompositeURI(uri)) {
-            return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?"));
-        } else {
-            CompositeData data = URISupport.parseComposite(uri);
-            Map<String, String> parameters = new HashMap<String, String>();
-            parameters.putAll(data.getParameters());
-            if (parameters.isEmpty()) {
-                parameters = emptyMap();
-            }
-            
-            return parameters;
-        }
-    }
-
-    public static URI applyParameters(URI uri, Map<String, String> queryParameters) throws URISyntaxException {
-        return applyParameters(uri, queryParameters, "");
-    }
-
-    public static URI applyParameters(URI uri, Map<String, String> queryParameters, String optionPrefix) throws URISyntaxException {
-        if (queryParameters != null && !queryParameters.isEmpty()) {
-            StringBuffer newQuery = uri.getRawQuery() != null ? new StringBuffer(uri.getRawQuery()) : new StringBuffer() ;
-            for ( Map.Entry<String, String> param: queryParameters.entrySet()) {
-                if (param.getKey().startsWith(optionPrefix)) {
-                    if (newQuery.length()!=0) {
-                        newQuery.append('&');
-                    }
-                    final String key = param.getKey().substring(optionPrefix.length());
-                    newQuery.append(key).append('=').append(param.getValue());
-                }
-            }
-            uri = createURIWithQuery(uri, newQuery.toString());
-        }
-        return uri;
-    }
-    
-    @SuppressWarnings("unchecked")
-    private static Map<String, String> emptyMap() {
-        return Collections.EMPTY_MAP;
-    }
-
-    /**
-     * Removes any URI query from the given uri
-     */
-    public static URI removeQuery(URI uri) throws URISyntaxException {
-        return createURIWithQuery(uri, null);
-    }
-
-    /**
-     * Creates a URI with the given query
-     */
-    public static URI createURIWithQuery(URI uri, String query) throws URISyntaxException {
-        String schemeSpecificPart = uri.getRawSchemeSpecificPart();
-        // strip existing query if any
-        int questionMark = schemeSpecificPart.lastIndexOf("?");
-        // make sure question mark is not within parentheses
-        if (questionMark < schemeSpecificPart.lastIndexOf(")")) {
-        	questionMark = -1;
-        }
-        if (questionMark > 0) {
-            schemeSpecificPart = schemeSpecificPart.substring(0, questionMark);
-        }
-        if (query != null && query.length() > 0) {
-            schemeSpecificPart += "?" + query;
-        }
-        return new URI(uri.getScheme(), schemeSpecificPart, uri.getFragment());
-    }
-
-    public static CompositeData parseComposite(URI uri) throws URISyntaxException {
-
-        CompositeData rc = new CompositeData();
-        rc.scheme = uri.getScheme();
-        String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim();
-        
-
-        parseComposite(uri, rc, ssp);
-
-        rc.fragment = uri.getFragment();
-        return rc;
-    }
-    
-    public static boolean isCompositeURI(URI uri) {
-        if (uri.getQuery() != null) {
-            return false;
-        } else {
-            String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "(").trim();
-            ssp = stripPrefix(ssp, "//").trim();
-            try {
-                new URI(ssp);
-            } catch (URISyntaxException e) {
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * @param uri
-     * @param rc
-     * @param ssp
-     * @throws URISyntaxException
-     */
-    private static void parseComposite(URI uri, CompositeData rc, String ssp) throws URISyntaxException {
-        String componentString;
-        String params;
-
-        if (!checkParenthesis(ssp)) {
-            throw new URISyntaxException(uri.toString(), "Not a matching number of '(' and ')' parenthesis");
-        }
-
-        int p;
-        int intialParen = ssp.indexOf("(");
-        if (intialParen == 0) {
-            rc.host = ssp.substring(0, intialParen);
-            p = rc.host.indexOf("/");
-            if (p >= 0) {
-                rc.path = rc.host.substring(p);
-                rc.host = rc.host.substring(0, p);
-            }
-            p = ssp.lastIndexOf(")");
-            componentString = ssp.substring(intialParen + 1, p);
-            params = ssp.substring(p + 1).trim();
-
-        } else {
-            componentString = ssp;
-            params = "";
-        }
-
-        String components[] = splitComponents(componentString);
-        rc.components = new URI[components.length];
-        for (int i = 0; i < components.length; i++) {
-            rc.components[i] = new URI(components[i].trim());
-        }
-
-        p = params.indexOf("?");
-        if (p >= 0) {
-            if (p > 0) {
-                rc.path = stripPrefix(params.substring(0, p), "/");
-            }
-            rc.parameters = parseQuery(params.substring(p + 1));
-        } else {
-            if (params.length() > 0) {
-                rc.path = stripPrefix(params, "/");
-            }
-            rc.parameters = emptyMap();
-        }
-    }
-
-    /**
-     * @param str
-     * @return
-     */
-    private static String[] splitComponents(String str) {
-        List<String> l = new ArrayList<String>();
-
-        int last = 0;
-        int depth = 0;
-        char chars[] = str.toCharArray();
-        for (int i = 0; i < chars.length; i++) {
-            switch (chars[i]) {
-            case '(':
-                depth++;
-                break;
-            case ')':
-                depth--;
-                break;
-            case ',':
-                if (depth == 0) {
-                    String s = str.substring(last, i);
-                    l.add(s);
-                    last = i + 1;
-                }
-                break;
-            default:
-            }
-        }
-
-        String s = str.substring(last);
-        if (s.length() != 0) {
-            l.add(s);
-        }
-
-        String rc[] = new String[l.size()];
-        l.toArray(rc);
-        return rc;
-    }
-
-    public static String stripPrefix(String value, String prefix) {
-        if (value.startsWith(prefix)) {
-            return value.substring(prefix.length());
-        }
-        return value;
-    }
-
-    public static URI stripScheme(URI uri) throws URISyntaxException {
-        return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//"));
-    }
-
-    public static String createQueryString(Map options) throws URISyntaxException {
-        try {
-            if (options.size() > 0) {
-                StringBuffer rc = new StringBuffer();
-                boolean first = true;
-                for (Iterator iter = options.keySet().iterator(); iter.hasNext();) {
-                    if (first) {
-                        first = false;
-                    } else {
-                        rc.append("&");
-                    }
-                    String key = (String)iter.next();
-                    String value = (String)options.get(key);
-                    rc.append(URLEncoder.encode(key, "UTF-8"));
-                    rc.append("=");
-                    rc.append(URLEncoder.encode(value, "UTF-8"));
-                }
-                return rc.toString();
-            } else {
-                return "";
-            }
-        } catch (UnsupportedEncodingException e) {
-            throw (URISyntaxException)new URISyntaxException(e.toString(), "Invalid encoding").initCause(e);
-        }
-    }
-
-    /**
-     * Creates a URI from the original URI and the remaining paramaters
-     * 
-     * @throws URISyntaxException
-     */
-    public static URI createRemainingURI(URI originalURI, Map params) throws URISyntaxException {
-        String s = createQueryString(params);
-        if (s.length() == 0) {
-            s = null;
-        }
-        return createURIWithQuery(originalURI, s);
-    }
-
-    public static URI changeScheme(URI bindAddr, String scheme) throws URISyntaxException {
-        return new URI(scheme, bindAddr.getUserInfo(), bindAddr.getHost(), bindAddr.getPort(), bindAddr
-            .getPath(), bindAddr.getQuery(), bindAddr.getFragment());
-    }
-
-    public static boolean checkParenthesis(String str) {
-        boolean result = true;
-        if (str != null) {
-            int open = 0;
-            int closed = 0;
-
-            int i = 0;
-            while ((i = str.indexOf('(', i)) >= 0) {
-                i++;
-                open++;
-            }
-            i = 0;
-            while ((i = str.indexOf(')', i)) >= 0) {
-                i++;
-                closed++;
-            }
-            result = open == closed;
-        }
-        return result;
-    }
-
-    public int indexOfParenthesisMatch(String str) {
-        int result = -1;
-
-        return result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/WrappedException.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/WrappedException.java
deleted file mode 100755
index a130e0b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/WrappedException.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.util;
-
-public class WrappedException extends RuntimeException {
-    private static final long serialVersionUID = 3257290240212217905L;
-
-    public WrappedException(Throwable original) {
-        super(original);
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/XStreamFactoryBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/XStreamFactoryBean.java
deleted file mode 100644
index 081a09b..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/XStreamFactoryBean.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.util;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.beans.propertyeditors.ClassEditor;
-import org.springframework.util.Assert;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.converters.Converter;
-import com.thoughtworks.xstream.converters.ConverterMatcher;
-import com.thoughtworks.xstream.converters.SingleValueConverter;
-
-public class XStreamFactoryBean implements FactoryBean {
-
-	XStream xstream = new XStream();
-	
-    /**
-     * Sets the <code>Converters</code> or <code>SingleValueConverters</code> to be registered with the
-     * <code>XStream</code> instance.
-     *
-     * @see Converter
-     * @see SingleValueConverter
-     */
-    public void setConverters(ConverterMatcher[] converters) {
-        for (int i = 0; i < converters.length; i++) {
-            if (converters[i] instanceof Converter) {
-                xstream.registerConverter((Converter) converters[i], i);
-            }
-            else if (converters[i] instanceof SingleValueConverter) {
-                xstream.registerConverter((SingleValueConverter) converters[i], i);
-            }
-            else {
-                throw new IllegalArgumentException("Invalid ConverterMatcher [" + converters[i] + "]");
-            }
-        }
-    }
-
-    /**
-     * Set a alias/type map, consisting of string aliases mapped to <code>Class</code> instances (or Strings to be
-     * converted to <code>Class</code> instances).
-     *
-     * @see org.springframework.beans.propertyeditors.ClassEditor
-     */
-    public void setAliases(Map aliases) {
-        for (Iterator iterator = aliases.entrySet().iterator(); iterator.hasNext();) {
-            Map.Entry entry = (Map.Entry) iterator.next();
-            // Check whether we need to convert from String to Class.
-            Class type;
-            if (entry.getValue() instanceof Class) {
-                type = (Class) entry.getValue();
-            }
-            else {
-                ClassEditor editor = new ClassEditor();
-                editor.setAsText(String.valueOf(entry.getValue()));
-                type = (Class) editor.getValue();
-            }
-            xstream.alias((String) entry.getKey(), type);
-        }
-    }	
-    
-    /**
-     * Sets the XStream mode.
-     *
-     * @see XStream#XPATH_REFERENCES
-     * @see XStream#ID_REFERENCES
-     * @see XStream#NO_REFERENCES
-     */
-    public void setMode(int mode) {
-        xstream.setMode(mode);
-    }    
-    
-    /**
-     * Sets the classes, for which mappings will be read from class-level JDK 1.5+ annotation metadata.
-     *
-     * @see Annotations#configureAliases(XStream, Class[])
-     */
-    public void setAnnotatedClass(Class<?> annotatedClass) {
-        Assert.notNull(annotatedClass, "'annotatedClass' must not be null");
-        xstream.processAnnotations(annotatedClass);
-    }
-
-    /**
-     * Sets annotated classes, for which aliases will be read from class-level JDK 1.5+ annotation metadata.
-     *
-     * @see Annotations#configureAliases(XStream, Class[])
-     */
-    public void setAnnotatedClasses(Class<?>[] annotatedClasses) {
-        Assert.notEmpty(annotatedClasses, "'annotatedClasses' must not be empty");
-        xstream.processAnnotations(annotatedClasses);
-    }    
-	
-	public Object getObject() throws Exception {
-		return xstream;
-	}
-
-	public Class getObjectType() {
-		return XStream.class;
-	}
-
-	public boolean isSingleton() {
-		return true;
-	}
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java b/trunk/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java
deleted file mode 100644
index 135fb2e..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/**
- * 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.util.osgi;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
-import java.util.Properties;
-import java.util.ArrayList;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.net.URL;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.util.FactoryFinder;
-import org.apache.activemq.util.FactoryFinder.ObjectFactory;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.SynchronousBundleListener;
-
-/**
- * An OSGi bundle activator for ActiveMQ which adapts the {@link org.apache.activemq.util.FactoryFinder}
- * to the OSGi environment.
- *
- */
-public class Activator implements BundleActivator, SynchronousBundleListener, ObjectFactory {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
-
-    private final ConcurrentHashMap<String, Class> serviceCache = new ConcurrentHashMap<String, Class>();
-    private final ConcurrentMap<Long, BundleWrapper> bundleWrappers = new ConcurrentHashMap<Long, BundleWrapper>();
-    private BundleContext bundleContext;
-
-    // ================================================================
-    // BundleActivator interface impl
-    // ================================================================
-
-    public synchronized void start(BundleContext bundleContext) throws Exception {
-
-        // This is how we replace the default FactoryFinder strategy
-        // with one that is more compatible in an OSGi env.
-        FactoryFinder.setObjectFactory(this);
-
-        debug("activating");
-        this.bundleContext = bundleContext;
-        debug("checking existing bundles");
-        bundleContext.addBundleListener(this);
-        for (Bundle bundle : bundleContext.getBundles()) {
-            if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING ||
-                bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) {
-                register(bundle);
-            }
-        }
-        debug("activated");
-    }
-
-
-    public synchronized void stop(BundleContext bundleContext) throws Exception {
-        debug("deactivating");
-        bundleContext.removeBundleListener(this);
-        while (!bundleWrappers.isEmpty()) {
-            unregister(bundleWrappers.keySet().iterator().next());
-        }
-        debug("deactivated");
-        this.bundleContext = null;
-    }
-
-    // ================================================================
-    // SynchronousBundleListener interface impl
-    // ================================================================
-
-    public void bundleChanged(BundleEvent event) {
-        if (event.getType() == BundleEvent.RESOLVED) {
-            register(event.getBundle());
-        } else if (event.getType() == BundleEvent.UNRESOLVED || event.getType() == BundleEvent.UNINSTALLED) {
-            unregister(event.getBundle().getBundleId());
-        }
-    }
-
-    protected void register(final Bundle bundle) {
-        debug("checking bundle " + bundle.getBundleId());
-        if( !isImportingUs(bundle) ) {
-            debug("The bundle does not import us: "+ bundle.getBundleId());
-            return;
-        }
-        bundleWrappers.put(bundle.getBundleId(), new BundleWrapper(bundle));
-    }
-
-    /**
-     * When bundles unload.. we remove them thier cached Class entries from the
-     * serviceCache.  Future service lookups for the service will fail.
-     *
-     * TODO: consider a way to get the Broker release any references to
-     * instances of the service.
-     *
-     * @param bundleId
-     */
-    protected void unregister(long bundleId) {
-        BundleWrapper bundle = bundleWrappers.remove(bundleId);
-        if (bundle != null) {
-            for (String path : bundle.cachedServices) {
-                debug("unregistering service for key: " +path );
-                serviceCache.remove(path);
-            }
-        }
-    }
-
-    // ================================================================
-    // ObjectFactory interface impl
-    // ================================================================
-
-    public Object create(String path) throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException {
-        Class clazz = serviceCache.get(path);
-        if (clazz == null) {
-            StringBuffer warnings = new StringBuffer();
-            // We need to look for a bundle that has that class.
-            int wrrningCounter=1;
-            for (BundleWrapper wrapper : bundleWrappers.values()) {
-                URL resource = wrapper.bundle.getResource(path);
-                if( resource == null ) {
-                    continue;
-                }
-
-                Properties properties = loadProperties(resource);
-
-                String className = properties.getProperty("class");
-                if (className == null) {
-                    warnings.append("("+(wrrningCounter++)+") Invalid sevice file in bundle "+wrapper+": 'class' property not defined.");
-                    continue;
-                }
-
-                try {
-                    clazz = wrapper.bundle.loadClass(className);
-                } catch (ClassNotFoundException e) {
-                    warnings.append("("+(wrrningCounter++)+") Bundle "+wrapper+" could not load "+className+": "+e);
-                    continue;
-                }
-
-                // Yay.. the class was found.  Now cache it.
-                serviceCache.put(path, clazz);
-                wrapper.cachedServices.add(path);
-                break;
-            }
-
-            if( clazz == null ) {
-                // Since OSGi is such a tricky enviorment to work in.. lets give folks the
-                // most information we can in the error message.
-                String msg = "Service not found: '" + path + "'";
-                if (warnings.length()!= 0) {
-                    msg += ", "+warnings;
-                }
-                throw new IOException(msg);
-            }
-        }
-        return clazz.newInstance();
-    }
-
-    // ================================================================
-    // Internal Helper Methods
-    // ================================================================
-
-    private void debug(Object msg) {
-        LOG.debug(msg.toString());
-    }
-
-    private Properties loadProperties(URL resource) throws IOException {
-        InputStream in = resource.openStream();
-        try {
-            BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
-            Properties properties = new Properties();
-            properties.load(in);
-            return properties;
-        } finally {
-            try {
-                in.close();
-            } catch (Exception e) {
-            }
-        }
-    }
-
-    private boolean isImportingUs(Bundle bundle) {
-        return isImportingClass(bundle, Service.class)
-                || isImportingClass(bundle, Transport.class)
-                || isImportingClass(bundle, DiscoveryAgent.class)
-                || isImportingClass(bundle, PersistenceAdapter.class);
-    }
-
-    private boolean isImportingClass(Bundle bundle, Class clazz) {
-        try {
-            return bundle.loadClass(clazz.getName())==clazz;
-        } catch (ClassNotFoundException e) {
-            return false;
-        }
-    }
-
-    private static class BundleWrapper {
-        private final Bundle bundle;
-        private final ArrayList<String> cachedServices = new ArrayList<String>();
-
-        public BundleWrapper(Bundle bundle) {
-            this.bundle = bundle;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/util/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/util/package.html
deleted file mode 100755
index 2c90838..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/util/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Some utility classes
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/ObjectStreamWireFormat.java b/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/ObjectStreamWireFormat.java
deleted file mode 100644
index fe59c37..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/ObjectStreamWireFormat.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.wireformat;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ClassLoadingAwareObjectInputStream;
-
-/**
- * A simple implementation which uses Object Stream serialization.
- * 
- * 
- */
-public class ObjectStreamWireFormat implements WireFormat {
-
-    public ByteSequence marshal(Object command) throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream ds = new DataOutputStream(baos);
-        marshal(command, ds);
-        ds.close();
-        return baos.toByteSequence();
-    }
-
-    public Object unmarshal(ByteSequence packet) throws IOException {
-        return unmarshal(new DataInputStream(new ByteArrayInputStream(packet)));
-    }
-
-    public void marshal(Object command, DataOutput ds) throws IOException {
-        ObjectOutputStream out = new ObjectOutputStream((OutputStream)ds);
-        out.writeObject(command);
-        out.flush();
-        out.reset();
-    }
-
-    public Object unmarshal(DataInput ds) throws IOException {
-        try {
-            ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream((InputStream)ds);
-            Object command;
-            command = in.readObject();
-            in.close();
-            return command;
-        } catch (ClassNotFoundException e) {
-            throw (IOException)new IOException("unmarshal failed: " + e).initCause(e);
-        }
-    }
-
-    public void setVersion(int version) {
-    }
-
-    public int getVersion() {
-        return 0;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java b/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java
deleted file mode 100644
index c869e33..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.wireformat;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.activemq.util.ByteSequence;
-
-
-/**
- * Provides a mechanism to marshal commands into and out of packets
- * or into and out of streams, Channels and Datagrams.
- *
- * 
- */
-public interface WireFormat {
-
-    /**
-     * Packet based marshaling 
-     */
-    ByteSequence marshal(Object command) throws IOException;
-    
-    /**
-     * Packet based un-marshaling 
-     */
-    Object unmarshal(ByteSequence packet) throws IOException;
-
-    /**
-     * Stream based marshaling 
-     */
-    void marshal(Object command, DataOutput out) throws IOException;
-    
-    /**
-     * Packet based un-marshaling 
-     */
-    Object unmarshal(DataInput in) throws IOException;
-    
-    /**
-     * @param the version of the wire format
-     */
-    void setVersion(int version);
-    
-    /**
-     * @return the version of the wire format
-     */
-    int getVersion();
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormatFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormatFactory.java
deleted file mode 100644
index b26bc56..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormatFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * 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.wireformat;
-
-public interface WireFormatFactory {
-    WireFormat createWireFormat();    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/package.html
deleted file mode 100644
index b2d8086..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-An API for WireFormats which are used to turn object into bytes and bytes into objects.
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java b/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
deleted file mode 100644
index 76e5eff..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.xbean;
-
-import java.beans.PropertyEditorManager;
-import java.net.URI;
-
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.xbean.spring.context.ResourceXmlApplicationContext;
-import org.apache.xbean.spring.context.impl.URIEditor;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.core.io.Resource;
-
-/**
- * A Spring {@link FactoryBean} which creates an embedded broker inside a Spring
- * XML using an external <a href="http://gbean.org/Custom+XML">XBean Spring XML
- * configuration file</a> which provides a much neater and more concise XML
- * format.
- * 
- * 
- */
-public class BrokerFactoryBean implements FactoryBean, InitializingBean, DisposableBean, ApplicationContextAware {
-
-    static {
-        PropertyEditorManager.registerEditor(URI.class, URIEditor.class);
-    }
-
-    private Resource config;
-    private XBeanBrokerService broker;
-    private boolean start;
-    private ResourceXmlApplicationContext context;
-    private ApplicationContext parentContext;
-    
-    private boolean systemExitOnShutdown;
-    private int systemExitOnShutdownExitCode;
-
-    public BrokerFactoryBean() {
-    }
-
-    public BrokerFactoryBean(Resource config) {
-        this.config = config;
-    }
-
-    public Object getObject() throws Exception {
-        return broker;
-    }
-
-    public Class getObjectType() {
-        return BrokerService.class;
-    }
-
-    public boolean isSingleton() {
-        return true;
-    }
-
-    public void setApplicationContext(ApplicationContext parentContext) throws BeansException {
-        this.parentContext = parentContext;
-    }
-
-    public void afterPropertiesSet() throws Exception {
-        if (config == null) {
-            throw new IllegalArgumentException("config property must be set");
-        }
-        context = new ResourceXmlApplicationContext(config, parentContext);
-
-        try {
-            broker = (XBeanBrokerService)context.getBean("broker");
-        } catch (BeansException e) {
-            // ignore...
-            // log.trace("No bean named broker available: " + e, e);
-        }
-        if (broker == null) {
-            // lets try find by type
-            String[] names = context.getBeanNamesForType(BrokerService.class);
-            for (int i = 0; i < names.length; i++) {
-                String name = names[i];
-                broker = (XBeanBrokerService)context.getBean(name);
-                if (broker != null) {
-                    break;
-                }
-            }
-        }
-        if (broker == null) {
-            throw new IllegalArgumentException("The configuration has no BrokerService instance for resource: " + config);
-        }
-        
-        if( systemExitOnShutdown ) {
-            broker.addShutdownHook(new Runnable(){
-                public void run() {
-                    System.exit(systemExitOnShutdownExitCode);
-                }
-            });
-        }
-        if (start) {
-            broker.start();
-        }
-    }
-
-    public void destroy() throws Exception {
-        if (context != null) {
-            context.close();
-        }
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    public Resource getConfig() {
-        return config;
-    }
-
-    public void setConfig(Resource config) {
-        this.config = config;
-    }
-
-    public BrokerService getBroker() {
-        return broker;
-    }
-
-    public boolean isStart() {
-        return start;
-    }
-
-    public void setStart(boolean start) {
-        this.start = start;
-    }
-
-    public boolean isSystemExitOnStop() {
-        return systemExitOnShutdown;
-    }
-
-    public void setSystemExitOnStop(boolean systemExitOnStop) {
-        this.systemExitOnShutdown = systemExitOnStop;
-    }
-
-    public boolean isSystemExitOnShutdown() {
-        return systemExitOnShutdown;
-    }
-
-    public void setSystemExitOnShutdown(boolean systemExitOnShutdown) {
-        this.systemExitOnShutdown = systemExitOnShutdown;
-    }
-
-    public int getSystemExitOnShutdownExitCode() {
-        return systemExitOnShutdownExitCode;
-    }
-
-    public void setSystemExitOnShutdownExitCode(int systemExitOnShutdownExitCode) {
-        this.systemExitOnShutdownExitCode = systemExitOnShutdownExitCode;
-    }
-
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java b/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java
deleted file mode 100644
index 28942ac..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.xbean;
-
-import java.beans.PropertyEditorManager;
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.activemq.broker.BrokerFactoryHandler;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.xbean.spring.context.ResourceXmlApplicationContext;
-import org.apache.xbean.spring.context.impl.URIEditor;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.FileSystemResource;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.UrlResource;
-import org.springframework.util.ResourceUtils;
-
-/**
- * 
- */
-public class XBeanBrokerFactory implements BrokerFactoryHandler {
-    private static final transient Logger LOG = LoggerFactory.getLogger(XBeanBrokerFactory.class);
-
-    static {
-        PropertyEditorManager.registerEditor(URI.class, URIEditor.class);
-    }
-
-    private boolean validate = true;
-    public boolean isValidate() {
-        return validate;
-    }
-
-    public void setValidate(boolean validate) {
-        this.validate = validate;
-    }
-
-    public BrokerService createBroker(URI config) throws Exception {
-
-        String uri = config.getSchemeSpecificPart();
-        if (uri.lastIndexOf('?') != -1) {
-            IntrospectionSupport.setProperties(this, URISupport.parseQuery(uri));
-            uri = uri.substring(0, uri.lastIndexOf('?'));
-        }
-
-        ApplicationContext context = createApplicationContext(uri);
-
-        BrokerService broker = null;
-        try {
-            broker = (BrokerService)context.getBean("broker");
-        } catch (BeansException e) {
-        }
-
-        if (broker == null) {
-            // lets try find by type
-            String[] names = context.getBeanNamesForType(BrokerService.class);
-            for (int i = 0; i < names.length; i++) {
-                String name = names[i];
-                broker = (BrokerService)context.getBean(name);
-                if (broker != null) {
-                    break;
-                }
-            }
-        }
-        if (broker == null) {
-            throw new IllegalArgumentException("The configuration has no BrokerService instance for resource: " + config);
-        }
-        
-        if (broker instanceof ApplicationContextAware) {
-        	((ApplicationContextAware)broker).setApplicationContext(context);
-        }
-        
-        // TODO warning resources from the context may not be closed down!
-
-        return broker;
-    }
-
-    protected ApplicationContext createApplicationContext(String uri) throws MalformedURLException {
-        LOG.debug("Now attempting to figure out the type of resource: " + uri);
-
-        Resource resource;
-        File file = new File(uri);
-        if (file.exists()) {
-            resource = new FileSystemResource(uri);
-        } else if (ResourceUtils.isUrl(uri)) {
-            resource = new UrlResource(uri);
-        } else {
-            resource = new ClassPathResource(uri);
-        }
-        return new ResourceXmlApplicationContext(resource) {
-            @Override
-            protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
-                reader.setValidating(isValidate());
-            }
-        };
-    }
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java b/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
deleted file mode 100644
index 467f5cb..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.xbean;
-
-import java.io.IOException;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An ActiveMQ Message Broker. It consists of a number of transport
- * connectors, network connectors and a bunch of properties which can be used to
- * configure the broker as its lazily created.
- * 
- * @org.apache.xbean.XBean element="broker" rootElement="true"
- * @org.apache.xbean.Defaults {code:xml} 
- * <broker test="foo.bar">
- *   lets.
- *   see what it includes.
- * </broker>   
- * {code}
- * 
- */
-public class XBeanBrokerService extends BrokerService {
-    private static final transient Logger LOG = LoggerFactory.getLogger(XBeanBrokerService.class);
-    
-    private boolean start = true;
-    
-    public XBeanBrokerService() {
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void afterPropertiesSet() throws Exception {
-        ensureSystemUsageHasStore();
-        if (shouldAutostart()) {
-            start();
-        }
-    }
-
-    @Override
-    protected boolean shouldAutostart() {
-        return start;
-    }
-
-    private void ensureSystemUsageHasStore() throws IOException {
-        SystemUsage usage = getSystemUsage();
-        if (usage.getStoreUsage().getStore() == null) {
-            usage.getStoreUsage().setStore(getPersistenceAdapter());
-        }
-        if (usage.getTempUsage().getStore() == null) {
-            usage.getTempUsage().setStore(getTempDataStore());
-        }
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.DestroyMethod
-     */
-    @PreDestroy
-    public void destroy() throws Exception {
-        stop();
-    }
-    
-
-    /**
-     * Sets whether or not the broker is started along with the ApplicationContext it is defined within.
-     * Normally you would want the broker to start up along with the ApplicationContext but sometimes when working
-     * with JUnit tests you may wish to start and stop the broker explicitly yourself.
-     */
-    public void setStart(boolean start) {
-        this.start = start;
-    }
-
-    /**
-     * Sets whether the broker should shutdown the ApplicationContext when the broker jvm is shutdown.
-     * The broker can be stopped because the underlying JDBC store is unavailable for example.
-     */
-    @Deprecated
-    public void setDestroyApplicationContextOnShutdown(boolean destroy) {
-        LOG.warn("destroyApplicationContextOnShutdown parameter is deprecated, please use shutdown hooks instead");
-    }
-    
-    /**
-     * Sets whether the broker should shutdown the ApplicationContext when the broker is stopped.
-     * The broker can be stopped because the underlying JDBC store is unavailable for example.
-     */
-    @Deprecated
-    public void setDestroyApplicationContextOnStop(boolean destroy) {
-        LOG.warn("destroyApplicationContextOnStop parameter is deprecated, please use shutdown hooks instead");
-    }
-    
-}
diff --git a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/package.html b/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/package.html
deleted file mode 100755
index ba27a78..0000000
--- a/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-Helper classes for creating the a broker using <a href="http://geronimo.apache.org/xbean/">XBean</a> and 
-for creating a broker within <a href="http://www.springframework.org/">Spring</a>.
-
-</body>
-</html>
diff --git a/trunk/activemq-core/src/main/proto/journal-data.proto b/trunk/activemq-core/src/main/proto/journal-data.proto
deleted file mode 100644
index 4e92ee0..0000000
--- a/trunk/activemq-core/src/main/proto/journal-data.proto
+++ /dev/null
@@ -1,164 +0,0 @@
-//
-// 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.store.kahadb.data;
-
-option java_multiple_files = true;
-option java_outer_classname = "JournalData";
-
-enum KahaEntryType {
-  //| option java_create_message="true";
-  KAHA_TRACE_COMMAND = 0;
-  KAHA_ADD_MESSAGE_COMMAND = 1;
-  KAHA_REMOVE_MESSAGE_COMMAND = 2;
-  KAHA_PREPARE_COMMAND = 3;
-  KAHA_COMMIT_COMMAND = 4;
-  KAHA_ROLLBACK_COMMAND = 5;
-  KAHA_REMOVE_DESTINATION_COMMAND = 6;
-  KAHA_SUBSCRIPTION_COMMAND = 7;
-  KAHA_PRODUCER_AUDIT_COMMAND = 8;
-}
-
-message KahaTraceCommand {
-  // We make use of the wonky comment style bellow because the following options
-  // are not valid for protoc, but they are valid for the ActiveMQ proto compiler.
-  // In the ActiveMQ proto compiler, comments terminate with the pipe character: |
-
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaTraceCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-  
-  required string message = 1;
-}
-
-message KahaAddMessageCommand {
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaAddMessageCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-  
-  optional KahaTransactionInfo transaction_info=1;
-  required KahaDestination destination = 2;
-  required string messageId = 3;
-  required bytes message = 4;
-  optional int32 priority =5 [default = 4];
-  optional bool prioritySupported = 6;
-}
-
-message KahaRemoveMessageCommand {
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaRemoveMessageCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-
-  optional KahaTransactionInfo transaction_info=1;
-  required KahaDestination destination = 2;
-  required string messageId = 3;
-  optional bytes ack = 4;
-  optional string subscriptionKey = 5;  // Set if it is a topic ack.
-}
-
-message KahaPrepareCommand {
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaPrepareCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-
-  required KahaTransactionInfo transaction_info=1;
-}
-
-message KahaCommitCommand {
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaCommitCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-
-  required KahaTransactionInfo transaction_info=1;
-}
-
-message KahaRollbackCommand {
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaRollbackCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-
-  required KahaTransactionInfo transaction_info=1;
-}
-
-message KahaRemoveDestinationCommand {
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaRemoveDestinationCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-
-  required KahaDestination destination = 1;
-}
-
-message KahaSubscriptionCommand {
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaSubscriptionCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-
-  required KahaDestination destination = 1;
-  required string subscriptionKey = 2;
-  optional bool retroactive = 3;
-  optional bytes subscriptionInfo = 4;
-}
-
-message KahaProducerAuditCommand {
-  // We make use of the wonky comment style bellow because the following options
-  // are not valid for protoc, but they are valid for the ActiveMQ proto compiler.
-  // In the ActiveMQ proto compiler, comments terminate with the pipe character: |
-
-  //| option java_implments = "org.apache.activemq.store.kahadb.JournalCommand<KahaProducerAuditCommand>";
-  //| option java_visitor = "org.apache.activemq.store.kahadb.Visitor:void:java.io.IOException";
-  //| option java_type_method = "KahaEntryType";
-  
-  required bytes audit = 1;
-}
-
-message KahaDestination {
-  enum DestinationType {
-    QUEUE = 0;
-    TOPIC = 1;
-    TEMP_QUEUE = 2;
-    TEMP_TOPIC = 3;
-  }
-
-  required DestinationType type = 1 [default = QUEUE];
-  required string name = 2;
-}
-
-message KahaTransactionInfo {
-  optional KahaLocalTransactionId local_transaciton_id=1;
-  optional KahaXATransactionId xa_transaciton_id=2;
-  optional KahaLocation previous_entry=3;
-}
-
-message KahaLocalTransactionId {
-  required string connection_id=1;
-  required int64 transaciton_id=1;
-}
-
-message KahaXATransactionId {
-  required int32 format_id = 1;
-  required bytes branch_qualifier = 2;
-  required bytes global_transaction_id = 3;
-}
-
-message KahaLocation {
-  required int32 log_id = 1;  
-  required int32 offset = 2;  
-}
-
-// TODO things to ponder
-// should we move more message fields
-// that are set by the sender (and rarely required by the broker
-// into the Properties object?
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/broker b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/broker
deleted file mode 100644
index 47b64ca..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/broker
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.broker.DefaultBrokerFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/properties b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/properties
deleted file mode 100644
index 6b7516b..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.broker.PropertiesBrokerFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/xbean b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/xbean
deleted file mode 100644
index baa4b1e..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/broker/xbean
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.xbean.XBeanBrokerFactory
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/apache_derby_embedded_jdbc_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/apache_derby_embedded_jdbc_driver
deleted file mode 100644
index 59008c8..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/apache_derby_embedded_jdbc_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.DB2JDBCAdapter
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/axion_jdbc_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/axion_jdbc_driver
deleted file mode 100644
index ebd44ae..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/axion_jdbc_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.AxionJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/hsql_database_engine_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/hsql_database_engine_driver
deleted file mode 100644
index 5d84ff8..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/hsql_database_engine_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.HsqldbJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000 b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000
deleted file mode 100644
index 18ae53d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture
deleted file mode 100644
index 7c3b0d6..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.DB2JDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_informix_jdbc_driver_for_ibm_informix_dynamic_server b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_informix_jdbc_driver_for_ibm_informix_dynamic_server
deleted file mode 100644
index 14f612a..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_informix_jdbc_driver_for_ibm_informix_dynamic_server
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.InformixJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_ b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_
deleted file mode 100644
index 72a2f45..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.SybaseJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase
deleted file mode 100644
index 18ae53d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_2005_jdbc_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_2005_jdbc_driver
deleted file mode 100644
index 8eb77e5..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_2005_jdbc_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactDatabaseLocker
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_jdbc_driver_2_0 b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_jdbc_driver_2_0
deleted file mode 100644
index 8eb77e5..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_jdbc_driver_2_0
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactDatabaseLocker
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_jdbc_driver_3_0 b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_jdbc_driver_3_0
deleted file mode 100644
index 8eb77e5..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_jdbc_driver_3_0
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactDatabaseLocker
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_2005_jdbc_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_2005_jdbc_driver
deleted file mode 100644
index 18ae53d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_2005_jdbc_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_jdbc_driver_2_0 b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_jdbc_driver_2_0
deleted file mode 100644
index 18ae53d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_jdbc_driver_2_0
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_jdbc_driver_3_0 b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_jdbc_driver_3_0
deleted file mode 100644
index 18ae53d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/microsoft_sql_server_jdbc_driver_3_0
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/mysql-ab_jdbc_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/mysql-ab_jdbc_driver
deleted file mode 100644
index 54ddcb4..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/mysql-ab_jdbc_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.MySqlJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/oracle_jdbc_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/oracle_jdbc_driver
deleted file mode 100644
index 0ab67f6..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/oracle_jdbc_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.OracleJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/postgresql_native_driver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/postgresql_native_driver
deleted file mode 100644
index d9b4438..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/postgresql_native_driver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.PostgresqlJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sap_db b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sap_db
deleted file mode 100644
index 120a4ac..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sap_db
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.MaxDBJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver
deleted file mode 100644
index 18ae53d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discovery b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discovery
deleted file mode 100644
index 929c938..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discovery
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.discovery.DiscoveryTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/multicast b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/multicast
deleted file mode 100644
index 966830f..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/multicast
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.discovery.multicast.MulticastDiscoveryAgentFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/rendezvous b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/rendezvous
deleted file mode 100644
index 1c0358d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/rendezvous
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.discovery.rendezvous.RendezvousDiscoveryAgentFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/simple b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/simple
deleted file mode 100644
index 9436f04..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/simple
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.discovery.simple.SimpleDiscoveryAgentFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/static b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/static
deleted file mode 100644
index 9436f04..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/static
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.discovery.simple.SimpleDiscoveryAgentFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/failover b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/failover
deleted file mode 100644
index 81c2151..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/failover
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.failover.FailoverTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/fanout b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/fanout
deleted file mode 100644
index 62d5dd6..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/fanout
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.fanout.FanoutTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-advisory-json b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-advisory-json
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-advisory-json
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-advisory-xml b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-advisory-xml
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-advisory-xml
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-byte b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-byte
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-byte
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-json b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-json
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-json
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-map-json b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-map-json
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-map-json
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-map-xml b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-map-xml
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-map-xml
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-object-json b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-object-json
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-object-json
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-object-xml b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-object-xml
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-object-xml
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-xml b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-xml
deleted file mode 100644
index e7fb9ad..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/frametranslator/jms-xml
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.JmsFrameTranslator
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/logwriters/custom b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/logwriters/custom
deleted file mode 100644
index d890090..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/logwriters/custom
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.logwriters.CustomLogWriter
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/logwriters/default b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/logwriters/default
deleted file mode 100644
index af6c314..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/logwriters/default
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.logwriters.DefaultLogWriter
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/mock b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/mock
deleted file mode 100644
index dd3c85a..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/mock
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.mock.MockTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/multicast b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/multicast
deleted file mode 100644
index 4665bbe..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/multicast
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.multicast.MulticastTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/nio b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/nio
deleted file mode 100644
index 4a0aa62..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/nio
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.nio.NIOTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/peer b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/peer
deleted file mode 100644
index 0825a9b..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/peer
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.peer.PeerTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/ssl b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/ssl
deleted file mode 100644
index c2576c6..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/ssl
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.tcp.SslTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp
deleted file mode 100644
index 4704ed9..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.StompTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp+nio b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp+nio
deleted file mode 100644
index 80a304c..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp+nio
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.StompNIOTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp+ssl b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp+ssl
deleted file mode 100644
index f62079b..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/stomp+ssl
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.StompSslTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/tcp b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/tcp
deleted file mode 100644
index ab6badf..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/tcp
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.tcp.TcpTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/udp b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/udp
deleted file mode 100644
index 29d860d..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/udp
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.udp.UdpTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/vm b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/vm
deleted file mode 100644
index 3ee3536..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/transport/vm
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.vm.VMTransportFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/wireformat/default b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/wireformat/default
deleted file mode 100644
index 1b993e1..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/wireformat/default
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.openwire.OpenWireFormatFactory
diff --git a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/wireformat/stomp b/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/wireformat/stomp
deleted file mode 100644
index 7f80527..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/wireformat/stomp
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.stomp.StompWireFormatFactory
\ No newline at end of file
diff --git a/trunk/activemq-core/src/main/resources/META-INF/spring.schemas b/trunk/activemq-core/src/main/resources/META-INF/spring.schemas
deleted file mode 100644
index e3a2613..0000000
--- a/trunk/activemq-core/src/main/resources/META-INF/spring.schemas
+++ /dev/null
@@ -1,30 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-http\://activemq.org/config/1.0=activemq.xsd
-http\://activemq.org/config/1.0/1.0.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.1.0.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.3.1.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.3.2.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.4.0.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.4.2.xsd=activemq.xsd
-http\://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd=activemq.xsd
diff --git a/trunk/activemq-core/src/test/data/message1.xml b/trunk/activemq-core/src/test/data/message1.xml
deleted file mode 100644
index d6a4645..0000000
--- a/trunk/activemq-core/src/test/data/message1.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<person user="james">
-  <firstName>James</firstName>
-  <lastName>Strachan</lastName>
-  <city>London</city>
-</person>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/eclipse-resources/log4j.properties b/trunk/activemq-core/src/test/eclipse-resources/log4j.properties
deleted file mode 100755
index f4e23ba..0000000
--- a/trunk/activemq-core/src/test/eclipse-resources/log4j.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-## ------------------------------------------------------------------------
-## 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 for eclipse testing, We want to see debug output on the console.
-#
-log4j.rootLogger=INFO, out
-
-
-
-# CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
-#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-# File appender
-log4j.appender.fout=org.apache.log4j.FileAppender
-log4j.appender.fout.layout=org.apache.log4j.PatternLayout
-log4j.appender.fout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.fout.file=target/amq-testlog.log
-log4j.appender.fout.append=true
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
deleted file mode 100755
index f1d880f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * 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;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQConnectionFactoryTest.class);
-
-    private ActiveMQConnection connection;
-    private BrokerService broker;
-
-    public void testUseURIToSetUseClientIDPrefixOnConnectionFactory() throws URISyntaxException, JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
-                                                                     "vm://localhost?jms.clientIDPrefix=Cheese");
-        assertEquals("Cheese", cf.getClientIDPrefix());
-
-        connection = (ActiveMQConnection)cf.createConnection();
-        connection.start();
-
-        String clientID = connection.getClientID();
-        LOG.info("Got client ID: " + clientID);
-
-        assertTrue("should start with Cheese! but was: " + clientID, clientID.startsWith("Cheese"));
-    }
-
-    protected void tearDown() throws Exception {
-        // Try our best to close any previously opend connection.
-        try {
-            connection.close();
-        } catch (Throwable ignore) {
-        }
-        // Try our best to stop any previously started broker.
-        try {
-            broker.stop();
-        } catch (Throwable ignore) {
-        }
-    }
-
-    public void testUseURIToSetOptionsOnConnectionFactory() throws URISyntaxException, JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?jms.useAsyncSend=true");
-        assertTrue(cf.isUseAsyncSend());
-        // the broker url have been adjusted.
-        assertEquals("vm://localhost", cf.getBrokerURL());
-
-        cf = new ActiveMQConnectionFactory("vm://localhost?jms.useAsyncSend=false");
-        assertFalse(cf.isUseAsyncSend());
-        // the broker url have been adjusted.
-        assertEquals("vm://localhost", cf.getBrokerURL());
-
-        cf = new ActiveMQConnectionFactory("vm:(broker:()/localhost)?jms.useAsyncSend=true");
-        assertTrue(cf.isUseAsyncSend());
-        // the broker url have been adjusted.
-        assertEquals("vm:(broker:()/localhost)", cf.getBrokerURL());
-        
-        cf = new ActiveMQConnectionFactory("vm://localhost?jms.auditDepth=5000");
-        assertEquals(5000, cf.getAuditDepth());
-    }
-
-    public void testUseURIToConfigureRedeliveryPolicy() throws URISyntaxException, JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
-                                                                     "vm://localhost?jms.redeliveryPolicy.maximumRedeliveries=2");
-        assertEquals("connection redeliveries", 2, cf.getRedeliveryPolicy().getMaximumRedeliveries());
-
-        ActiveMQConnection connection = (ActiveMQConnection)cf.createConnection();
-        assertEquals("connection redeliveries", 2, connection.getRedeliveryPolicy().getMaximumRedeliveries());
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)session.createConsumer(session
-            .createQueue("FOO.BAR"));
-        assertEquals("consumer redeliveries", 2, consumer.getRedeliveryPolicy().getMaximumRedeliveries());
-        connection.close();
-    }
-
-    public void testCreateVMConnectionWithEmbdeddBroker() throws URISyntaxException, JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        // Make sure the broker is not created until the connection is
-        // instantiated.
-        assertNull(BrokerRegistry.getInstance().lookup("localhost"));
-        connection = (ActiveMQConnection)cf.createConnection();
-        // This should create the connection.
-        assertNotNull(connection);
-        // Verify the broker was created.
-        assertNotNull(BrokerRegistry.getInstance().lookup("localhost"));
-
-        connection.close();
-
-        // Verify the broker was destroyed.
-        assertNull(BrokerRegistry.getInstance().lookup("localhost"));
-    }
-
-    public void testGetBrokerName() throws URISyntaxException, JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = (ActiveMQConnection)cf.createConnection();
-        connection.start();
-
-        String brokerName = connection.getBrokerName();
-        LOG.info("Got broker name: " + brokerName);
-
-        assertNotNull("No broker name available!", brokerName);
-    }
-
-    public void testCreateTcpConnectionUsingAllocatedPort() throws Exception {
-        assertCreateConnection("tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true");
-    }
-
-    public void testCreateTcpConnectionUsingKnownPort() throws Exception {
-        assertCreateConnection("tcp://localhost:61610?wireFormat.tcpNoDelayEnabled=true");
-    }
-
-    public void testCreateTcpConnectionUsingKnownLocalPort() throws Exception {
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        TransportConnector connector = broker.addConnector("tcp://localhost:61610?wireFormat.tcpNoDelayEnabled=true");
-        broker.start();
-
-        // This should create the connection.
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61610/localhost:51610");
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertNotNull(connection);
-
-        broker.stop();
-    }
-
-    public void testConnectionFailsToConnectToVMBrokerThatIsNotRunning() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?create=false");
-        try {
-            factory.createConnection();
-            fail("Expected connection failure.");
-        } catch (JMSException e) {
-        }
-    }
-
-    public void testFactorySerializable() throws Exception {
-        String clientID = "TestClientID";
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
-        cf.setClientID(clientID);
-        ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-        ObjectOutputStream objectsOut = new ObjectOutputStream(bytesOut);
-        objectsOut.writeObject(cf);
-        objectsOut.flush();
-        byte[] data = bytesOut.toByteArray();
-        ByteArrayInputStream bytesIn = new ByteArrayInputStream(data);
-        ObjectInputStream objectsIn = new ObjectInputStream(bytesIn);
-        cf = (ActiveMQConnectionFactory)objectsIn.readObject();
-        assertEquals(cf.getClientID(), clientID);
-    }
-    
-    public void testSetExceptionListener() throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertNull(connection.getExceptionListener());
-        
-        ExceptionListener exListener = new ExceptionListener() {
-			public void onException(JMSException arg0) {
-			}
-        };
-        cf.setExceptionListener(exListener);
-        
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertNotNull(connection.getExceptionListener());
-        assertEquals(exListener, connection.getExceptionListener());
-        
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertEquals(exListener, connection.getExceptionListener());
-        
-        assertEquals(exListener, cf.getExceptionListener());
-        
-    }
-
-    
-    public void testSetClientInternalExceptionListener() throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertNull(connection.getClientInternalExceptionListener());
-        
-        ClientInternalExceptionListener listener = new ClientInternalExceptionListener() {
-            public void onException(Throwable exception) {
-            }
-        };
-        connection.setClientInternalExceptionListener(listener);
-        cf.setClientInternalExceptionListener(listener);
-        
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertNotNull(connection.getClientInternalExceptionListener());
-        assertEquals(listener, connection.getClientInternalExceptionListener());
-        
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertEquals(listener, connection.getClientInternalExceptionListener());   
-        assertEquals(listener, cf.getClientInternalExceptionListener());
-        
-    }
-
-    protected void assertCreateConnection(String uri) throws Exception {
-        // Start up a broker with a tcp connector.
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        TransportConnector connector = broker.addConnector(uri);
-        broker.start();
-
-        URI temp = new URI(uri);
-        // URI connectURI = connector.getServer().getConnectURI();
-        // TODO this sometimes fails when using the actual local host name
-        URI currentURI = connector.getServer().getConnectURI();
-
-        // sometimes the actual host name doesn't work in this test case
-        // e.g. on OS X so lets use the original details but just use the actual
-        // port
-        URI connectURI = new URI(temp.getScheme(), temp.getUserInfo(), temp.getHost(), currentURI.getPort(),
-                                 temp.getPath(), temp.getQuery(), temp.getFragment());
-
-        LOG.info("connection URI is: " + connectURI);
-
-        // This should create the connection.
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(connectURI);
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertNotNull(connection);
-
-        broker.stop();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQInputStreamTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQInputStreamTest.java
deleted file mode 100644
index 73cf47c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQInputStreamTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.jms.Queue;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ActiveMQInputStreamTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQInputStreamTest.class);
-
-    private static final String BROKER_URL = "tcp://localhost:61616";
-    private static final String DESTINATION = "destination";
-    private static final int STREAM_LENGTH = 64 * 1024 + 0; // change 0 to 1 to make it not crash
-
-    public void testInputStreamMatchesDefaultChuckSize() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(false);
-        broker.setPersistent(false);
-        broker.setDestinations(new ActiveMQDestination[] {
-            ActiveMQDestination.createDestination(DESTINATION, ActiveMQDestination.QUEUE_TYPE),
-        });
-        broker.addConnector(BROKER_URL);
-        broker.start();
-
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URL);
-        ActiveMQConnection connection = (ActiveMQConnection) connectionFactory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(DESTINATION);
-
-        OutputStream out = null;
-        try {
-            out = connection.createOutputStream(destination);
-            LOG.debug("writing...");
-            for (int i = 0; i < STREAM_LENGTH; ++i) {
-                out.write(0);
-            }
-            LOG.debug("wrote " + STREAM_LENGTH + " bytes");
-        } finally {
-            if (out != null) {
-                out.close();
-            }
-        }
-
-        InputStream in = null;
-        try {
-            in = connection.createInputStream(destination);
-            LOG.debug("reading...");
-            int count = 0;
-            while (-1 != in.read()) {
-                ++count;
-            }
-            LOG.debug("read " + count + " bytes");
-        } finally {
-            if (in != null) {
-                in.close();
-            }
-        }
-
-        connection.close();
-        broker.stop();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java
deleted file mode 100755
index cd75103..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.List;
-import junit.framework.TestCase;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.util.IdGenerator;
-
-/**
- * ActiveMQMessageAuditTest
- * 
- * 
- */
-public class ActiveMQMessageAuditTest extends TestCase {
-
-
-    /**
-     * Constructor for ActiveMQMessageAuditTest.
-     * 
-     * @param name
-     */
-    public ActiveMQMessageAuditTest(String name) {
-        super(name);
-    }
-
-    public static void main(String[] args) {
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * test case for isDuplicate
-     */
-    public void testIsDuplicateString() {
-        int count = 10000;
-        ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
-        IdGenerator idGen = new IdGenerator();
-        // add to a list
-        List<String> list = new ArrayList<String>();
-        for (int i = 0; i < count; i++) {
-            String id = idGen.generateId();
-            list.add(id);
-            assertFalse(audit.isDuplicate(id));
-        }
-        List<String> windowList = list.subList(list.size() -1 -audit.getAuditDepth(), list.size() -1);
-        for (String id : windowList) {
-            assertTrue("duplicate, id:" + id, audit.isDuplicate(id));
-        }
-    }
-
-    public void testIsDuplicateMessageReference() {
-        int count = 10000;
-        ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
-        // add to a list
-        List<MessageReference> list = new ArrayList<MessageReference>();
-        for (int i = 0; i < count; i++) {
-            ProducerId pid = new ProducerId();
-            pid.setConnectionId("test");
-            pid.setSessionId(0);
-            pid.setValue(1);
-            MessageId id = new MessageId();
-            id.setProducerId(pid);
-            id.setProducerSequenceId(i);
-            ActiveMQMessage msg = new ActiveMQMessage();
-            msg.setMessageId(id);
-            list.add(msg);
-            assertFalse(audit.isDuplicate(msg.getMessageId()));
-        }
-        List<MessageReference> windowList = list.subList(list.size() -1 -audit.getAuditDepth(), list.size() -1);
-        for (MessageReference msg : windowList) {
-            assertTrue("duplicate msg:" + msg, audit.isDuplicate(msg));
-        }
-    }
-    
-    public void testIsInOrderString() {
-        int count = 10000;
-        ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
-        IdGenerator idGen = new IdGenerator();
-        // add to a list
-        List<String> list = new ArrayList<String>();
-        for (int i = 0; i < count; i++) {
-            String id = idGen.generateId();
-            if (i==0) {
-                assertFalse(audit.isDuplicate(id));
-                assertTrue(audit.isInOrder(id));
-            }
-            if (i > 1 && i%2 != 0) {
-                list.add(id);
-            }
-          
-        }
-        for (String id : list) {
-            assertFalse(audit.isInOrder(id));
-            assertFalse(audit.isDuplicate(id));
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQSslConnectionFactoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQSslConnectionFactoryTest.java
deleted file mode 100644
index a3b2af2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQSslConnectionFactoryTest.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- * 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;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.KeyStore;
-
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.SslBrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class ActiveMQSslConnectionFactoryTest extends CombinationTestSupport {
-    private static final Log LOG = LogFactory.getLog(ActiveMQSslConnectionFactoryTest.class);
-
-    public static final String KEYSTORE_TYPE = "jks";
-    public static final String PASSWORD = "password";
-    public static final String SERVER_KEYSTORE = "src/test/resources/server.keystore";
-    public static final String TRUST_KEYSTORE = "src/test/resources/client.keystore";
-
-    private TransportConnector connector;
-    private ActiveMQConnection connection;
-    private BrokerService broker;
-
-    protected void tearDown() throws Exception {
-        // Try our best to close any previously opend connection.
-        try {
-            connection.close();
-        } catch (Throwable ignore) {
-        }
-        // Try our best to stop any previously started broker.
-        try {
-            broker.stop();
-        } catch (Throwable ignore) {
-        }
-    }
-
-    public void testCreateTcpConnectionUsingKnownPort() throws Exception {
-        // Control case: check that the factory can create an ordinary (non-ssl) connection.
-        broker = createBroker("tcp://localhost:61610?wireFormat.tcpNoDelayEnabled=true");
-
-        // This should create the connection.
-        ActiveMQSslConnectionFactory cf = new ActiveMQSslConnectionFactory("tcp://localhost:61610?wireFormat.tcpNoDelayEnabled=true");
-        connection = (ActiveMQConnection)cf.createConnection();
-        assertNotNull(connection);
-
-	brokerStop();
-    }
-
-    public void testCreateSslConnection() throws Exception {
-        // Create SSL/TLS connection with trusted cert from truststore.
-    	String sslUri = "ssl://localhost:61611";
-        broker = createSslBroker(sslUri);
-        assertNotNull(broker);
-
-        // This should create the connection.
-        ActiveMQSslConnectionFactory cf = new ActiveMQSslConnectionFactory(sslUri);
-        cf.setTrustStore("server.keystore");
-        cf.setTrustStorePassword("password");
-        connection = (ActiveMQConnection)cf.createConnection();
-        LOG.info("Created client connection");
-        assertNotNull(connection);
-
-        brokerStop();
-    }
-
-    public void testNegativeCreateSslConnectionWithWrongPassword() throws Exception {
-        // Create SSL/TLS connection with trusted cert from truststore.
-    	String sslUri = "ssl://localhost:61611";
-        broker = createSslBroker(sslUri);
-        assertNotNull(broker);
-
-        // This should FAIL to connect, due to wrong password.
-        ActiveMQSslConnectionFactory cf = new ActiveMQSslConnectionFactory(sslUri);
-        cf.setTrustStore("server.keystore");
-        cf.setTrustStorePassword("wrongPassword");
-        try {
-            connection = (ActiveMQConnection)cf.createConnection();
-        }
-        catch (javax.jms.JMSException ignore) {
-        	// Expected exception
-        	LOG.info("Expected java.io.Exception [" + ignore + "]");
-        }
-        assertNull(connection);
-
-        brokerStop();
-    }
-
-    public void testNegativeCreateSslConnectionWithWrongCert() throws Exception {
-        // Create SSL/TLS connection with trusted cert from truststore.
-    	String sslUri = "ssl://localhost:61611";
-        broker = createSslBroker(sslUri);
-        assertNotNull(broker);
-
-        // This should FAIL to connect, due to wrong password.
-        ActiveMQSslConnectionFactory cf = new ActiveMQSslConnectionFactory(sslUri);
-        cf.setTrustStore("dummy.keystore");
-        cf.setTrustStorePassword("password");
-        try {
-            connection = (ActiveMQConnection)cf.createConnection();
-        }
-        catch (javax.jms.JMSException ignore) {
-        	// Expected exception
-        	LOG.info("Expected SSLHandshakeException [" + ignore + "]");
-        }
-        assertNull(connection);
-
-        brokerStop();
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        // Start up a broker with a tcp connector.
-        BrokerService service = new BrokerService();
-        service.setPersistent(false);
-        connector = service.addConnector(uri);
-        service.start();
-
-        return service;
-    }
-
-    protected BrokerService createSslBroker(String uri) throws Exception {
-        
-        // http://java.sun.com/javase/javaseforbusiness/docs/TLSReadme.html
-        // work around: javax.net.ssl.SSLHandshakeException: renegotiation is not allowed
-        //System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
-        
-        SslBrokerService service = new SslBrokerService();
-        service.setPersistent(false);
-        
-        KeyManager[] km = getKeyManager();
-        TrustManager[] tm = getTrustManager();
-        connector = service.addSslConnector(uri, km, tm, null);
-        service.start();
-        
-        return service;
-    }
-
-    protected void brokerStop() throws Exception {
-        broker.stop();
-    }
-
-    public static TrustManager[] getTrustManager() throws Exception {
-        TrustManager[] trustStoreManagers = null;
-        KeyStore trustedCertStore = KeyStore.getInstance(ActiveMQSslConnectionFactoryTest.KEYSTORE_TYPE);
-        
-        trustedCertStore.load(new FileInputStream(ActiveMQSslConnectionFactoryTest.TRUST_KEYSTORE), null);
-        TrustManagerFactory tmf  = 
-            TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
-  
-        tmf.init(trustedCertStore);
-        trustStoreManagers = tmf.getTrustManagers();
-        return trustStoreManagers; 
-    }
-
-    public static KeyManager[] getKeyManager() throws Exception {
-        KeyManagerFactory kmf = 
-            KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());  
-        KeyStore ks = KeyStore.getInstance(ActiveMQSslConnectionFactoryTest.KEYSTORE_TYPE);
-        KeyManager[] keystoreManagers = null;
-        
-        byte[] sslCert = loadClientCredential(ActiveMQSslConnectionFactoryTest.SERVER_KEYSTORE);
-        
-       
-        if (sslCert != null && sslCert.length > 0) {
-            ByteArrayInputStream bin = new ByteArrayInputStream(sslCert);
-            ks.load(bin, ActiveMQSslConnectionFactoryTest.PASSWORD.toCharArray());
-            kmf.init(ks, ActiveMQSslConnectionFactoryTest.PASSWORD.toCharArray());
-            keystoreManagers = kmf.getKeyManagers();
-        }
-        return keystoreManagers;          
-    }
-
-    private static byte[] loadClientCredential(String fileName) throws IOException {
-        if (fileName == null) {
-            return null;
-        }
-        FileInputStream in = new FileInputStream(fileName);
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        byte[] buf = new byte[512];
-        int i = in.read(buf);
-        while (i  > 0) {
-            out.write(buf, 0, i);
-            i = in.read(buf);
-        }
-        in.close();
-        return out.toByteArray();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java
deleted file mode 100644
index 42fb9cd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java
+++ /dev/null
@@ -1,438 +0,0 @@
-/**
- * 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;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-import javax.jms.XAConnection;
-import javax.jms.XAQueueConnection;
-import javax.jms.XASession;
-import javax.jms.XATopicConnection;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransactionBroker;
-import org.apache.activemq.broker.TransportConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.management.JMSConnectionStatsImpl;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.failover.FailoverTransport;
-import org.apache.activemq.transport.stomp.StompTransportFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ActiveMQXAConnectionFactoryTest extends CombinationTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQXAConnectionFactoryTest.class);
-    long txGenerator = System.currentTimeMillis();
-
-    public void testCopy() throws URISyntaxException, JMSException {
-        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory("vm://localhost?");
-        ActiveMQConnectionFactory copy = cf.copy();
-        assertTrue("Should be an ActiveMQXAConnectionFactory", copy instanceof ActiveMQXAConnectionFactory);
-    }
-
-    public void testUseURIToSetOptionsOnConnectionFactory() throws URISyntaxException, JMSException {
-        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(
-                                                                         "vm://localhost?jms.useAsyncSend=true");
-        assertTrue(cf.isUseAsyncSend());
-        // the broker url have been adjusted.
-        assertEquals("vm://localhost", cf.getBrokerURL());
-
-        cf = new ActiveMQXAConnectionFactory("vm://localhost?jms.useAsyncSend=false");
-        assertFalse(cf.isUseAsyncSend());
-        // the broker url have been adjusted.
-        assertEquals("vm://localhost", cf.getBrokerURL());
-
-        cf = new ActiveMQXAConnectionFactory("vm:(broker:()/localhost)?jms.useAsyncSend=true");
-        assertTrue(cf.isUseAsyncSend());
-        // the broker url have been adjusted.
-        assertEquals("vm:(broker:()/localhost)", cf.getBrokerURL());
-    }
-
-    public void testCreateVMConnectionWithEmbdeddBroker() throws URISyntaxException, JMSException {
-        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(
-                                                                         "vm://localhost?broker.persistent=false");
-        // Make sure the broker is not created until the connection is
-        // instantiated.
-        assertNull(BrokerRegistry.getInstance().lookup("localhost"));
-        Connection connection = cf.createConnection();
-        // This should create the connection.
-        assertNotNull(connection);
-        // Verify the broker was created.
-        assertNotNull(BrokerRegistry.getInstance().lookup("localhost"));
-        connection.close();
-        // Verify the broker was destroyed.
-        assertNull(BrokerRegistry.getInstance().lookup("localhost"));
-    }
-
-    public void testGetBrokerName() throws URISyntaxException, JMSException {
-        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(
-                                                                         "vm://localhost?broker.persistent=false");
-        ActiveMQConnection connection = (ActiveMQConnection)cf.createConnection();
-        connection.start();
-
-        String brokerName = connection.getBrokerName();
-        LOG.info("Got broker name: " + brokerName);
-
-        assertNotNull("No broker name available!", brokerName);
-        connection.close();
-    }
-
-    public void testCreateTcpConnectionUsingAllocatedPort() throws Exception {
-        assertCreateConnection("tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true");
-    }
-
-    public void testCreateTcpConnectionUsingKnownPort() throws Exception {
-        assertCreateConnection("tcp://localhost:61610?wireFormat.tcpNoDelayEnabled=true");
-    }
-    
-    public void testIsSameRM() throws URISyntaxException, JMSException, XAException {
-        
-        ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory("vm://localhost?broker.persistent=false");
-        XAConnection connection1 = (XAConnection)cf1.createConnection();
-        XASession session1 = connection1.createXASession();
-        XAResource resource1 = session1.getXAResource();
-        
-        ActiveMQXAConnectionFactory cf2 = new ActiveMQXAConnectionFactory("vm://localhost?broker.persistent=false");
-        XAConnection connection2 = (XAConnection)cf2.createConnection();
-        XASession session2 = connection2.createXASession();
-        XAResource resource2 = session2.getXAResource();
-
-        assertTrue(resource1.isSameRM(resource2));
-        
-        connection1.close();
-        connection2.close();
-    }
-
-    public void testVanilaTransactionalProduceReceive() throws Exception {
-        
-        ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory("vm://localhost?broker.persistent=false");
-        XAConnection connection1 = (XAConnection)cf1.createConnection();
-        connection1.start();
-        XASession session = connection1.createXASession();
-        XAResource resource = session.getXAResource();
-        Destination dest = new ActiveMQQueue(getName());
-        
-        // publish a message
-        Xid tid = createXid();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        MessageProducer producer = session.createProducer(dest);
-        ActiveMQTextMessage message  = new ActiveMQTextMessage();
-        message.setText(getName());
-        producer.send(message);
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-        session.close();
-        
-        session = connection1.createXASession();
-        MessageConsumer consumer = session.createConsumer(dest);
-        tid = createXid();
-        resource = session.getXAResource();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        TextMessage receivedMessage = (TextMessage) consumer.receive(1000);
-        assertNotNull(receivedMessage);
-        assertEquals(getName(), receivedMessage.getText());
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-    }
-    
-    public void testConsumerCloseTransactionalSendReceive() throws Exception {
-        
-        ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory("vm://localhost?broker.persistent=false");
-        XAConnection connection1 = (XAConnection)cf1.createConnection();
-        connection1.start();
-        XASession session = connection1.createXASession();
-        XAResource resource = session.getXAResource();
-        Destination dest = new ActiveMQQueue(getName());
-        
-        // publish a message
-        Xid tid = createXid();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        MessageProducer producer = session.createProducer(dest);
-        ActiveMQTextMessage message  = new ActiveMQTextMessage();
-        message.setText(getName());
-        producer.send(message);
-        producer.close();
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-        session.close();
-        
-        session = connection1.createXASession();
-        MessageConsumer consumer = session.createConsumer(dest);
-        tid = createXid();
-        resource = session.getXAResource();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        TextMessage receivedMessage = (TextMessage) consumer.receive(1000);
-        consumer.close();
-        assertNotNull(receivedMessage);
-        assertEquals(getName(), receivedMessage.getText());
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-        
-        session = connection1.createXASession();
-        consumer = session.createConsumer(dest);
-        tid = createXid();
-        resource = session.getXAResource();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        assertNull(consumer.receive(1000));
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-        
-    }
-
-    public void testSessionCloseTransactionalSendReceive() throws Exception {
-        
-        ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory("vm://localhost?broker.persistent=false");
-        XAConnection connection1 = (XAConnection)cf1.createConnection();
-        connection1.start();
-        XASession session = connection1.createXASession();
-        XAResource resource = session.getXAResource();
-        Destination dest = new ActiveMQQueue(getName());
-        
-        // publish a message
-        Xid tid = createXid();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        MessageProducer producer = session.createProducer(dest);
-        ActiveMQTextMessage message  = new ActiveMQTextMessage();
-        message.setText(getName());
-        producer.send(message);
-        session.close();
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-        
-        
-        session = connection1.createXASession();
-        MessageConsumer consumer = session.createConsumer(dest);
-        tid = createXid();
-        resource = session.getXAResource();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        TextMessage receivedMessage = (TextMessage) consumer.receive(1000);
-        session.close();
-        assertNotNull(receivedMessage);
-        assertEquals(getName(), receivedMessage.getText());
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-        
-        session = connection1.createXASession();
-        consumer = session.createConsumer(dest);
-        tid = createXid();
-        resource = session.getXAResource();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        assertNull(consumer.receive(1000));
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);        
-    }
-
-
-    public void testReadonlyNoLeak() throws Exception {
-        final String brokerName = "readOnlyNoLeak";
-        BrokerService broker = BrokerFactory.createBroker(new URI("broker:(tcp://localhost:0)/" + brokerName));
-        broker.setPersistent(false);
-        broker.start();
-        ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory("failover:(" + broker.getTransportConnectors().get(0).getConnectUri() + ")");
-        cf1.setStatsEnabled(true);
-        ActiveMQXAConnection xaConnection = (ActiveMQXAConnection)cf1.createConnection();
-        xaConnection.start();
-        XASession session = xaConnection.createXASession();
-        XAResource resource = session.getXAResource();        
-        Xid tid = createXid();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        session.close();
-        resource.end(tid, XAResource.TMSUCCESS);
-        resource.commit(tid, true);
-        
-        assertTransactionGoneFromBroker(tid);
-        assertTransactionGoneFromConnection(brokerName, xaConnection.getClientID(), xaConnection.getConnectionInfo().getConnectionId(), tid);
-        assertSessionGone(xaConnection, session);
-        assertTransactionGoneFromFailoverState(xaConnection, tid);
-        
-        // two phase
-        session = xaConnection.createXASession();
-        resource = session.getXAResource();        
-        tid = createXid();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        session.close();
-        resource.end(tid, XAResource.TMSUCCESS);
-        assertEquals(XAResource.XA_RDONLY, resource.prepare(tid));
-        
-        // no need for a commit on read only        
-        assertTransactionGoneFromBroker(tid);
-        assertTransactionGoneFromConnection(brokerName, xaConnection.getClientID(), xaConnection.getConnectionInfo().getConnectionId(), tid);
-        assertSessionGone(xaConnection, session);
-        assertTransactionGoneFromFailoverState(xaConnection, tid);
-        
-        xaConnection.close();
-        broker.stop();
-        
-    }
-
-    public void testCloseSendConnection() throws Exception {
-        String brokerName = "closeSend";
-        BrokerService broker = BrokerFactory.createBroker(new URI("broker:(tcp://localhost:0)/" + brokerName));
-        broker.start();
-        broker.waitUntilStarted();
-        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
-        XAConnection connection = (XAConnection)cf.createConnection();
-        connection.start();
-        XASession session = connection.createXASession();
-        XAResource resource = session.getXAResource();
-        Destination dest = new ActiveMQQueue(getName());
-
-        // publish a message
-        Xid tid = createXid();
-        resource.start(tid, XAResource.TMNOFLAGS);
-        MessageProducer producer = session.createProducer(dest);
-        ActiveMQTextMessage message  = new ActiveMQTextMessage();
-        message.setText(getName());
-        producer.send(message);
-
-        connection.close();
-
-        assertTransactionGoneFromBroker(tid);
-    }
-
-    private void assertTransactionGoneFromFailoverState(
-            ActiveMQXAConnection connection1, Xid tid) throws Exception {
-        
-        FailoverTransport transport = (FailoverTransport) connection1.getTransport().narrow(FailoverTransport.class);
-        TransactionInfo info = new TransactionInfo(connection1.getConnectionInfo().getConnectionId(), new XATransactionId(tid), TransactionInfo.COMMIT_ONE_PHASE);
-        assertNull("transaction shold not exist in the state tracker", 
-                transport.getStateTracker().processCommitTransactionOnePhase(info)); 
-    }
-
-    private void assertSessionGone(ActiveMQXAConnection connection1,
-            XASession session) {
-        JMSConnectionStatsImpl stats = (JMSConnectionStatsImpl)connection1.getStats();
-        // should be no dangling sessions maintained by the transaction
-        assertEquals("should be no sessions", 0, stats.getSessions().length);
-    }
-
-    private void assertTransactionGoneFromConnection(String brokerName, String clientId, ConnectionId connectionId, Xid tid) throws Exception {
-        BrokerService broker = BrokerRegistry.getInstance().lookup(brokerName);
-        CopyOnWriteArrayList<TransportConnection> connections = broker.getTransportConnectors().get(0).getConnections();
-        for (TransportConnection connection: connections) {
-            if (connection.getConnectionId().equals(clientId)) {
-                try {
-                    connection.processPrepareTransaction(new TransactionInfo(connectionId, new XATransactionId(tid), TransactionInfo.PREPARE));
-                    fail("did not get expected excepton on missing transaction, it must be still there in error!");
-                } catch (IllegalStateException expectedOnNoTransaction) {
-                }   
-            }
-        }
-    }
-
-    private void assertTransactionGoneFromBroker(Xid tid) throws Exception {
-        BrokerService broker = BrokerRegistry.getInstance().lookup("localhost");
-        TransactionBroker transactionBroker = (TransactionBroker)broker.getBroker().getAdaptor(TransactionBroker.class);
-        try {
-            transactionBroker.getTransaction(null, new XATransactionId(tid), false);
-            fail("expected exception on tx not found");
-        } catch (XAException expectedOnNotFound) {
-        }
-    }
-
-    protected void assertCreateConnection(String uri) throws Exception {
-        // Start up a broker with a tcp connector.
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        TransportConnector connector = broker.addConnector(uri);
-        broker.start();
-
-        URI temp = new URI(uri);
-        // URI connectURI = connector.getServer().getConnectURI();
-        // TODO this sometimes fails when using the actual local host name
-        URI currentURI = connector.getServer().getConnectURI();
-
-        // sometimes the actual host name doesn't work in this test case
-        // e.g. on OS X so lets use the original details but just use the actual
-        // port
-        URI connectURI = new URI(temp.getScheme(), temp.getUserInfo(), temp.getHost(), currentURI.getPort(),
-                                 temp.getPath(), temp.getQuery(), temp.getFragment());
-
-        LOG.info("connection URI is: " + connectURI);
-
-        // This should create the connection.
-        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(connectURI);
-        Connection connection = cf.createConnection();
-
-        assertXAConnection(connection);
-
-        assertNotNull(connection);
-        connection.close();
-
-        connection = cf.createXAConnection();
-
-        assertXAConnection(connection);
-
-        assertNotNull(connection);
-        connection.close();
-
-        broker.stop();
-    }
-
-    private void assertXAConnection(Connection connection) {
-        assertTrue("Should be an XAConnection", connection instanceof XAConnection);
-        assertTrue("Should be an XATopicConnection", connection instanceof XATopicConnection);
-        assertTrue("Should be an XAQueueConnection", connection instanceof XAQueueConnection);
-    }
-    
-    public Xid createXid() throws IOException {
-        
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream os = new DataOutputStream(baos);
-        os.writeLong(++txGenerator);
-        os.close();
-        final byte[] bs = baos.toByteArray();
-
-        return new Xid() {
-            public int getFormatId() {
-                return 86;
-            }
-
-            public byte[] getGlobalTransactionId() {
-                return bs;
-            }
-
-            public byte[] getBranchQualifier() {
-                return bs;
-            }
-        };
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
deleted file mode 100644
index e5401d9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Enforces a test case to run for only an allotted time to prevent them from
- * hanging and breaking the whole testing.
- * 
- * 
- */
-
-public abstract class AutoFailTestSupport extends TestCase {
-    public static final int EXIT_SUCCESS = 0;
-    public static final int EXIT_ERROR = 1;
-    private static final Logger LOG = LoggerFactory.getLogger(AutoFailTestSupport.class);
-
-    private long maxTestTime = 5 * 60 * 1000; // 5 mins by default
-    private Thread autoFailThread;
-
-    private boolean verbose = true;
-    private boolean useAutoFail; // Disable auto fail by default
-    private AtomicBoolean isTestSuccess;
-
-    protected void setUp() throws Exception {
-        // Runs the auto fail thread before performing any setup
-        if (isAutoFail()) {
-            startAutoFailThread();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        // Stops the auto fail thread only after performing any clean up
-        stopAutoFailThread();
-    }
-
-    /**
-     * Manually start the auto fail thread. To start it automatically, just set
-     * the auto fail to true before calling any setup methods. As a rule, this
-     * method is used only when you are not sure, if the setUp and tearDown
-     * method is propagated correctly.
-     */
-    public void startAutoFailThread() {
-        setAutoFail(true);
-        isTestSuccess = new AtomicBoolean(false);
-        autoFailThread = new Thread(new Runnable() {
-            public void run() {
-                try {
-                    // Wait for test to finish succesfully
-                    Thread.sleep(getMaxTestTime());
-                } catch (InterruptedException e) {
-                    // This usually means the test was successful
-                } finally {
-                    // Check if the test was able to tear down succesfully,
-                    // which usually means, it has finished its run.
-                    if (!isTestSuccess.get()) {
-                        LOG.error("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
-                        dumpAllThreads(getName());
-                        System.exit(EXIT_ERROR);
-                    }
-                }
-            }
-        }, "AutoFailThread");
-
-        if (verbose) {
-            LOG.info("Starting auto fail thread...");
-        }
-
-        LOG.info("Starting auto fail thread...");
-        autoFailThread.start();
-    }
-
-    /**
-     * Manually stops the auto fail thread. As a rule, this method is used only
-     * when you are not sure, if the setUp and tearDown method is propagated
-     * correctly.
-     */
-    public void stopAutoFailThread() {
-        if (isAutoFail() && autoFailThread != null && autoFailThread.isAlive()) {
-            isTestSuccess.set(true);
-
-            if (verbose) {
-                LOG.info("Stopping auto fail thread...");
-            }
-
-            LOG.info("Stopping auto fail thread...");
-            autoFailThread.interrupt();
-        }
-    }
-
-    /**
-     * Sets the auto fail value. As a rule, this should be used only before any
-     * setup methods is called to automatically enable the auto fail thread in
-     * the setup method of the test case.
-     * 
-     * @param val
-     */
-    public void setAutoFail(boolean val) {
-        this.useAutoFail = val;
-    }
-
-    public boolean isAutoFail() {
-        return this.useAutoFail;
-    }
-
-    /**
-     * The assigned value will only be reflected when the auto fail thread has
-     * started its run. Value is in milliseconds.
-     * 
-     * @param val
-     */
-    public void setMaxTestTime(long val) {
-        this.maxTestTime = val;
-    }
-
-    public long getMaxTestTime() {
-        return this.maxTestTime;
-    }
-    
-    
-    public static void dumpAllThreads(String prefix) {
-        Map<Thread, StackTraceElement[]> stacks = Thread.getAllStackTraces();
-        for (Entry<Thread, StackTraceElement[]> stackEntry : stacks.entrySet()) {
-            System.err.println(prefix + " " + stackEntry.getKey());
-            for(StackTraceElement element : stackEntry.getValue()) {
-                System.err.println("     " + element);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java
deleted file mode 100755
index 00a6938..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.JMSException;
-
-import junit.framework.TestCase;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.transport.TransportFactory;
-
-public class ClientTestSupport extends TestCase {
-
-    protected BrokerService broker;
-    protected long idGenerator;
-
-    private ActiveMQConnectionFactory connFactory;
-    private String brokerURL = "vm://localhost?broker.persistent=false";
-
-    public void setUp() throws Exception {
-        final AtomicBoolean connected = new AtomicBoolean(false);
-        TransportConnector connector;
-
-        // Start up a broker with a tcp connector.
-        try {
-            broker = BrokerFactory.createBroker(new URI(this.brokerURL));
-            String brokerId = broker.getBrokerName();
-            connector = new TransportConnector(TransportFactory.bind(new URI(this.brokerURL))) {
-                // Hook into the connector so we can assert that the server
-                // accepted a connection.
-                protected org.apache.activemq.broker.Connection createConnection(org.apache.activemq.transport.Transport transport) throws IOException {
-                    connected.set(true);
-                    return super.createConnection(transport);
-                }
-            };
-            broker.addConnector(connector);
-            broker.start();
-
-        } catch (IOException e) {
-            throw new JMSException("Error creating broker " + e);
-        } catch (URISyntaxException e) {
-            throw new JMSException("Error creating broker " + e);
-        }
-
-        URI connectURI;
-        connectURI = connector.getServer().getConnectURI();
-
-        // This should create the connection.
-        connFactory = new ActiveMQConnectionFactory(connectURI);
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    public ActiveMQConnectionFactory getConnectionFactory() throws JMSException {
-        if (this.connFactory == null) {
-            throw new JMSException("ActiveMQConnectionFactory is null ");
-        }
-        return this.connFactory;
-    }
-
-    // Helper Classes
-    protected ConnectionInfo createConnectionInfo() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        info.setConnectionId(new ConnectionId("connection:" + (++idGenerator)));
-        info.setClientId(info.getConnectionId().getValue());
-        return info;
-    }
-
-    protected SessionInfo createSessionInfo(ConnectionInfo connectionInfo) throws Exception {
-        SessionInfo info = new SessionInfo(connectionInfo, ++idGenerator);
-        return info;
-    }
-
-    protected ConsumerInfo createConsumerInfo(SessionInfo sessionInfo, ActiveMQDestination destination) throws Exception {
-        ConsumerInfo info = new ConsumerInfo(sessionInfo, ++idGenerator);
-        info.setBrowser(false);
-        info.setDestination(destination);
-        info.setPrefetchSize(1000);
-        info.setDispatchAsync(false);
-        return info;
-    }
-
-    protected RemoveInfo closeConsumerInfo(ConsumerInfo consumerInfo) {
-        return consumerInfo.createRemoveCommand();
-    }
-
-    protected MessageAck createAck(ConsumerInfo consumerInfo, Message msg, int count, byte ackType) {
-        MessageAck ack = new MessageAck();
-        ack.setAckType(ackType);
-        ack.setConsumerId(consumerInfo.getConsumerId());
-        ack.setDestination(msg.getDestination());
-        ack.setLastMessageId(msg.getMessageId());
-        ack.setMessageCount(count);
-        return ack;
-    }
-
-    protected Message receiveMessage(StubConnection connection, int maxWait) throws InterruptedException {
-        while (true) {
-            Object o = connection.getDispatchQueue().poll(maxWait, TimeUnit.MILLISECONDS);
-
-            if (o == null) {
-                return null;
-            }
-
-            if (o instanceof MessageDispatch) {
-                MessageDispatch dispatch = (MessageDispatch)o;
-                return dispatch.getMessage();
-            }
-        }
-    }
-
-    protected Broker getBroker() throws Exception {
-        return this.broker != null ? this.broker.getBroker() : null;
-    }
-
-    public static void removeMessageStore() {
-        if (System.getProperty("activemq.store.dir") != null) {
-            recursiveDelete(new File(System.getProperty("activemq.store.dir")));
-        }
-        if (System.getProperty("derby.system.home") != null) {
-            recursiveDelete(new File(System.getProperty("derby.system.home")));
-        }
-    }
-
-    public static void recursiveDelete(File f) {
-        if (f.isDirectory()) {
-            File[] files = f.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        f.delete();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java
deleted file mode 100755
index 2a5d45e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * 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;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Poor mans way of getting JUnit to run a test case through a few different
- * combinations of options. Usage: If you have a test case called testFoo what
- * you want to run through a few combinations, of of values for the attributes
- * age and color, you would something like: <code>
- *    public void initCombosForTestFoo() {    
- *        addCombinationValues( "age", new Object[]{ new Integer(21), new Integer(30) } );
- *        addCombinationValues( "color", new Object[]{"blue", "green"} );
- *    }
- * </code>
- * The testFoo test case would be run for each possible combination of age and
- * color that you setup in the initCombosForTestFoo method. Before each
- * combination is run, the age and color fields of the test class are set to one
- * of the values defined. This is done before the normal setUp method is called.
- * If you want the test combinations to show up as separate test runs in the
- * JUnit reports, add a suite method to your test case similar to: <code>
- *     public static Test suite() {
- *         return suite(FooTest.class);
- *     }
- * </code>
- * 
- * 
- */
-public abstract class CombinationTestSupport extends AutoFailTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CombinationTestSupport.class);
-
-    private HashMap<String, ComboOption> comboOptions = new HashMap<String, ComboOption>();
-    private boolean combosEvaluated;
-    private Map options;
-
-    static class ComboOption {
-        final String attribute;
-        final LinkedHashSet<Object> values = new LinkedHashSet<Object>();
-
-        public ComboOption(String attribute, Collection<Object> options) {
-            this.attribute = attribute;
-            this.values.addAll(options);
-        }
-    }
-
-    public void addCombinationValues(String attribute, Object[] options) {
-        ComboOption co = this.comboOptions.get(attribute);
-        if (co == null) {
-            this.comboOptions.put(attribute, new ComboOption(attribute, Arrays.asList(options)));
-        } else {
-            co.values.addAll(Arrays.asList(options));
-        }
-    }
-
-    public void runBare() throws Throwable {
-        if (combosEvaluated) {
-            super.runBare();
-        } else {
-            CombinationTestSupport[] combinations = getCombinations();
-            for (int i = 0; i < combinations.length; i++) {
-                CombinationTestSupport test = combinations[i];
-                if (getName() == null || getName().equals(test.getName())) {
-                    test.runBare();
-                }
-            }
-        }
-    }
-
-    private void setOptions(Map options) throws NoSuchFieldException, IllegalAccessException {
-        this.options = options;
-        for (Iterator iterator = options.keySet().iterator(); iterator.hasNext();) {
-            String attribute = (String)iterator.next();
-            Object value = options.get(attribute);
-            try {
-                Field field = getClass().getField(attribute);
-                field.set(this, value);
-            } catch (Throwable e) {
-                LOG.info("Could not set field '" + attribute + "' to value '" + value + "', make sure the field exists and is public.");
-            }
-        }
-    }
-
-    private CombinationTestSupport[] getCombinations() {
-        try {
-            Method method = getClass().getMethod("initCombos", (Class[])null);
-            method.invoke(this, (Object[])null);
-        } catch (Throwable e) {
-        }
-
-        String name = getName().split(" ")[0];
-        String comboSetupMethodName = "initCombosFor" + Character.toUpperCase(name.charAt(0)) + name.substring(1);
-        try {
-            Method method = getClass().getMethod(comboSetupMethodName, (Class[])null);
-            method.invoke(this, (Object[])null);
-        } catch (Throwable e) {
-        }
-
-        try {
-            ArrayList<HashMap<String, Object>> expandedOptions = new ArrayList<HashMap<String, Object>>();
-            expandCombinations(new ArrayList<ComboOption>(comboOptions.values()), expandedOptions);
-
-            if (expandedOptions.isEmpty()) {
-                combosEvaluated = true;
-                return new CombinationTestSupport[] {this};
-            } else {
-
-                ArrayList<CombinationTestSupport> result = new ArrayList<CombinationTestSupport>();
-                // Run the test case for each possible combination
-                for (Iterator<HashMap<String, Object>> iter = expandedOptions.iterator(); iter.hasNext();) {
-                    CombinationTestSupport combo = (CombinationTestSupport)TestSuite.createTest(getClass(), name);
-                    combo.combosEvaluated = true;
-                    combo.setOptions(iter.next());
-                    result.add(combo);
-                }
-
-                CombinationTestSupport rc[] = new CombinationTestSupport[result.size()];
-                result.toArray(rc);
-                return rc;
-            }
-        } catch (Throwable e) {
-            combosEvaluated = true;
-            return new CombinationTestSupport[] {this};
-        }
-
-    }
-
-    private void expandCombinations(List<ComboOption> optionsLeft, List<HashMap<String, Object>> expandedCombos) {
-        if (!optionsLeft.isEmpty()) {
-            HashMap<String, Object> map;
-            if (comboOptions.size() == optionsLeft.size()) {
-                map = new HashMap<String, Object>();
-                expandedCombos.add(map);
-            } else {
-                map = expandedCombos.get(expandedCombos.size() - 1);
-            }
-
-            LinkedList<ComboOption> l = new LinkedList<ComboOption>(optionsLeft);
-            ComboOption comboOption = l.removeLast();
-            int i = 0;
-            for (Iterator<Object> iter = comboOption.values.iterator(); iter.hasNext();) {
-                Object value = iter.next();
-                if (i != 0) {
-                    map = new HashMap<String, Object>(map);
-                    expandedCombos.add(map);
-                }
-                map.put(comboOption.attribute, value);
-                expandCombinations(l, expandedCombos);
-                i++;
-            }
-        }
-    }
-
-    public static Test suite(Class<? extends CombinationTestSupport> clazz) {
-        TestSuite suite = new TestSuite();
-
-        ArrayList<String> names = new ArrayList<String>();
-        Method[] methods = clazz.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            String name = methods[i].getName();
-            if (names.contains(name) || !isPublicTestMethod(methods[i])) {
-                continue;
-            }
-            names.add(name);
-            Test test = TestSuite.createTest(clazz, name);
-            if (test instanceof CombinationTestSupport) {
-                CombinationTestSupport[] combinations = ((CombinationTestSupport)test).getCombinations();
-                for (int j = 0; j < combinations.length; j++) {
-                    suite.addTest(combinations[j]);
-                }
-            } else {
-                suite.addTest(test);
-            }
-        }
-        return suite;
-    }
-
-    private static boolean isPublicTestMethod(Method m) {
-        return isTestMethod(m) && Modifier.isPublic(m.getModifiers());
-    }
-
-    private static boolean isTestMethod(Method m) {
-        String name = m.getName();
-        Class[] parameters = m.getParameterTypes();
-        Class returnType = m.getReturnType();
-        return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE);
-    }
-
-    public String getName() {
-    	return getName(false);
-    }
-    
-    public String getName(boolean original) {
-        if (options != null && !original) {
-            return super.getName() + " " + options;
-        }
-        return super.getName();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ConnectionCleanupTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ConnectionCleanupTest.java
deleted file mode 100755
index f7a64ac..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ConnectionCleanupTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-
-/**
- * 
- */
-public class ConnectionCleanupTest extends TestCase {
-
-    private ActiveMQConnection connection;
-
-    protected void setUp() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        connection = (ActiveMQConnection)factory.createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        connection.close();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void testChangeClientID() throws JMSException {
-
-        connection.setClientID("test");
-        connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        try {
-            connection.setClientID("test");
-            // fail("Should have received JMSException");
-        } catch (JMSException e) {
-        }
-
-        connection.cleanup();
-        connection.setClientID("test");
-
-        connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        try {
-            connection.setClientID("test");
-            // fail("Should have received JMSException");
-        } catch (JMSException e) {
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java
deleted file mode 100644
index b34fe7f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class ConsumerReceiveWithTimeoutTest extends TestSupport {
-
-    private Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    /**
-     * Test to check if consumer thread wakes up inside a receive(timeout) after
-     * a message is dispatched to the consumer
-     * 
-     * @throws javax.jms.JMSException
-     */
-    public void testConsumerReceiveBeforeMessageDispatched() throws JMSException {
-
-        connection.start();
-
-        final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue queue = session.createQueue("test");
-
-        Thread t = new Thread() {
-            public void run() {
-                try {
-                    // wait for 10 seconds to allow consumer.receive to be run
-                    // first
-                    Thread.sleep(10000);
-                    MessageProducer producer = session.createProducer(queue);
-                    producer.send(session.createTextMessage("Hello"));
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        };
-
-        t.start();
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(60000);
-        assertNotNull(msg);
-        session.close();
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/CreateConsumerButDontStartConnectionWarningTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/CreateConsumerButDontStartConnectionWarningTest.java
deleted file mode 100644
index 773e871..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/CreateConsumerButDontStartConnectionWarningTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class CreateConsumerButDontStartConnectionWarningTest extends JmsQueueSendReceiveTest {
-    private static final transient Logger LOG = LoggerFactory.getLogger(CreateConsumerButDontStartConnectionWarningTest.class);
-
-    @Override
-    protected void startConnection() throws JMSException {
-        // don't start the connection
-    }
-
-    @Override
-    protected void assertMessagesAreReceived() throws JMSException {
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-            LOG.warn("Caught: " + e, e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerAndConnectionTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerAndConnectionTestSupport.java
deleted file mode 100644
index aa39cc1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerAndConnectionTestSupport.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-
-/**
- * A base class for a test case which creates an embedded broker and uses a connection and session
- *
- * 
- */
-public abstract class EmbeddedBrokerAndConnectionTestSupport extends EmbeddedBrokerTestSupport {
-    protected Connection connection;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connection = createConnection();
-        connection.start();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
deleted file mode 100644
index 28dd7ad..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.springframework.jms.core.JmsTemplate;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-
-/**
- * A useful base class which creates and closes an embedded broker
- * 
- * 
- */
-public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport {
-
-    protected BrokerService broker;
-    // protected String bindAddress = "tcp://localhost:61616";
-    protected String bindAddress = "vm://localhost";
-    protected ConnectionFactory connectionFactory;
-    protected boolean useTopic;
-    protected ActiveMQDestination destination;
-    protected JmsTemplate template;
-    
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        startBroker();
-
-        connectionFactory = createConnectionFactory();
-
-        destination = createDestination();
-
-        template = createJmsTemplate();
-        template.setDefaultDestination(destination);
-        template.setPubSubDomain(useTopic);
-        template.afterPropertiesSet();
-    }
-
-    protected void tearDown() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    /**
-     * Factory method to create a new {@link JmsTemplate}
-     * 
-     * @return a newly created JmsTemplate
-     */
-    protected JmsTemplate createJmsTemplate() {
-        return new JmsTemplate(connectionFactory);
-    }
-
-    /**
-     * Factory method to create a new {@link Destination}
-     * 
-     * @return newly created Destinaiton
-     */
-    protected ActiveMQDestination createDestination() {
-        return createDestination(getDestinationString());
-    }
-
-    /**
-     * Factory method to create the destination in either the queue or topic
-     * space based on the value of the {@link #useTopic} field
-     */
-    protected ActiveMQDestination createDestination(String subject) {
-        if (useTopic) {
-            return new ActiveMQTopic(subject);
-        } else {
-            return new ActiveMQQueue(subject);
-        }
-    }
-
-    /**
-     * Returns the name of the destination used in this test case
-     */
-    protected String getDestinationString() {
-        return getClass().getName() + "." + getName();
-    }
-
-    /**
-     * Factory method to create a new {@link ConnectionFactory} instance
-     * 
-     * @return a newly created connection factory
-     */
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(bindAddress);
-    }
-
-    /**
-     * Factory method to create a new broker
-     * 
-     * @throws Exception
-     */
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(isPersistent());
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-
-    protected void startBroker() throws Exception {
-        broker.start();
-    }
-
-    /**
-     * @return whether or not persistence should be used
-     */
-    protected boolean isPersistent() {
-        return false;
-    }
-
-    /**
-     * Factory method to create a new connection
-     */
-    protected Connection createConnection() throws Exception {
-        return connectionFactory.createConnection();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ExclusiveConsumerStartupDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ExclusiveConsumerStartupDestinationTest.java
deleted file mode 100644
index 7c43dd7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ExclusiveConsumerStartupDestinationTest.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.Assert;
-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;
-
-public class ExclusiveConsumerStartupDestinationTest extends EmbeddedBrokerTestSupport{
-
-    private static final String VM_BROKER_URL = "vm://localhost";
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        PolicyMap map = new PolicyMap();
-        PolicyEntry entry = new PolicyEntry();
-        entry.setAllConsumersExclusiveByDefault(true);
-        map.setDefaultEntry(entry);
-        answer.setDestinationPolicy(map);        
-        return answer;
-    }
-
-    protected String getBrokerConfigUri() {
-        return "org/apache/activemq/broker/exclusive-consumer-startup-destination.xml";
-    }
-
-    private Connection createConnection(final boolean start) throws JMSException {
-        ConnectionFactory cf = new ActiveMQConnectionFactory(VM_BROKER_URL);
-        Connection conn = cf.createConnection();
-        if (start) {
-            conn.start();
-        }
-        return conn;
-    }
-
-    public void testExclusiveConsumerSelectedCreatedFirst() throws JMSException, InterruptedException {
-        Connection conn = createConnection(true);
-
-        Session exclusiveSession = null;
-        Session fallbackSession = null;
-        Session senderSession = null;
-
-        try {
-
-            exclusiveSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE1");
-            MessageConsumer exclusiveConsumer = exclusiveSession.createConsumer(exclusiveQueue);
-
-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE1");
-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);
-
-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE1");
-
-            MessageProducer producer = senderSession.createProducer(senderQueue);
-
-            Message msg = senderSession.createTextMessage("test");
-            producer.send(msg);
-            // TODO need two send a 2nd message - bug AMQ-1024
-            // producer.send(msg);
-            Thread.sleep(100);
-
-            // Verify exclusive consumer receives the message.
-            Assert.assertNotNull(exclusiveConsumer.receive(100));
-            Assert.assertNull(fallbackConsumer.receive(100));
-
-        } finally {
-            fallbackSession.close();
-            senderSession.close();
-            conn.close();
-        }
-
-    }
-
-    public void testFailoverToAnotherExclusiveConsumerCreatedFirst() throws JMSException,
-        InterruptedException {
-        Connection conn = createConnection(true);
-
-        Session exclusiveSession1 = null;
-        Session exclusiveSession2 = null;
-        Session fallbackSession = null;
-        Session senderSession = null;
-
-        try {
-
-            exclusiveSession1 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            exclusiveSession2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-            // This creates the exclusive consumer first which avoids AMQ-1024
-            // bug.
-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE2");
-            MessageConsumer exclusiveConsumer1 = exclusiveSession1.createConsumer(exclusiveQueue);
-            MessageConsumer exclusiveConsumer2 = exclusiveSession2.createConsumer(exclusiveQueue);
-
-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE2");
-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);
-
-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE2");
-
-            MessageProducer producer = senderSession.createProducer(senderQueue);
-
-            Message msg = senderSession.createTextMessage("test");
-            producer.send(msg);
-            Thread.sleep(100);
-
-            // Verify exclusive consumer receives the message.
-            Assert.assertNotNull(exclusiveConsumer1.receive(100));
-            Assert.assertNull(exclusiveConsumer2.receive(100));
-            Assert.assertNull(fallbackConsumer.receive(100));
-
-            // Close the exclusive consumer to verify the non-exclusive consumer
-            // takes over
-            exclusiveConsumer1.close();
-
-            producer.send(msg);
-            producer.send(msg);
-
-            Assert.assertNotNull("Should have received a message", exclusiveConsumer2.receive(100));
-            Assert.assertNull("Should not have received a message", fallbackConsumer.receive(100));
-
-        } finally {
-            fallbackSession.close();
-            senderSession.close();
-            conn.close();
-        }
-
-    }
-
-    public void testFailoverToNonExclusiveConsumer() throws JMSException, InterruptedException {
-        Connection conn = createConnection(true);
-
-        Session exclusiveSession = null;
-        Session fallbackSession = null;
-        Session senderSession = null;
-
-        try {
-
-            exclusiveSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-            // This creates the exclusive consumer first which avoids AMQ-1024
-            // bug.
-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE3");
-            MessageConsumer exclusiveConsumer = exclusiveSession.createConsumer(exclusiveQueue);
-
-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE3");
-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);
-
-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE3");
-
-            MessageProducer producer = senderSession.createProducer(senderQueue);
-
-            Message msg = senderSession.createTextMessage("test");
-            producer.send(msg);
-            Thread.sleep(100);
-
-            // Verify exclusive consumer receives the message.
-            Assert.assertNotNull(exclusiveConsumer.receive(100));
-            Assert.assertNull(fallbackConsumer.receive(100));
-
-            // Close the exclusive consumer to verify the non-exclusive consumer
-            // takes over
-            exclusiveConsumer.close();
-
-            producer.send(msg);
-
-            Assert.assertNotNull(fallbackConsumer.receive(100));
-
-        } finally {
-            fallbackSession.close();
-            senderSession.close();
-            conn.close();
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java
deleted file mode 100644
index 58ea18a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/**

- * 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;

-

-import javax.jms.Connection;

-import javax.jms.ConnectionFactory;

-import javax.jms.JMSException;

-import javax.jms.Message;

-import javax.jms.MessageConsumer;

-import javax.jms.MessageProducer;

-import javax.jms.Session;

-

-import junit.framework.Assert;

-import junit.framework.TestCase;

-import org.apache.activemq.command.ActiveMQQueue;

-

-public class ExclusiveConsumerTest extends TestCase {

-

-    private static final String VM_BROKER_URL = "vm://localhost?broker.persistent=false&broker.useJmx=true";

-

-    public ExclusiveConsumerTest(String name) {

-        super(name);

-    }

-

-    protected void setUp() throws Exception {

-        super.setUp();

-    }

-

-    protected void tearDown() throws Exception {

-        super.tearDown();

-    }

-

-    private Connection createConnection(final boolean start) throws JMSException {

-        ConnectionFactory cf = new ActiveMQConnectionFactory(VM_BROKER_URL);

-        Connection conn = cf.createConnection();

-        if (start) {

-            conn.start();

-        }

-        return conn;

-    }

-

-    public void testExclusiveConsumerSelectedCreatedFirst() throws JMSException, InterruptedException {

-        Connection conn = createConnection(true);

-

-        Session exclusiveSession = null;

-        Session fallbackSession = null;

-        Session senderSession = null;

-

-        try {

-

-            exclusiveSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-

-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE1?consumer.exclusive=true");

-            MessageConsumer exclusiveConsumer = exclusiveSession.createConsumer(exclusiveQueue);

-

-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE1");

-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);

-

-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE1");

-

-            MessageProducer producer = senderSession.createProducer(senderQueue);

-

-            Message msg = senderSession.createTextMessage("test");

-            producer.send(msg);

-            // TODO need two send a 2nd message - bug AMQ-1024

-            // producer.send(msg);

-            Thread.sleep(100);

-

-            // Verify exclusive consumer receives the message.

-            Assert.assertNotNull(exclusiveConsumer.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-        } finally {

-            fallbackSession.close();

-            senderSession.close();

-            conn.close();

-        }

-

-    }

-

-    public void testExclusiveConsumerSelectedCreatedAfter() throws JMSException, InterruptedException {

-        Connection conn = createConnection(true);

-

-        Session exclusiveSession = null;

-        Session fallbackSession = null;

-        Session senderSession = null;

-

-        try {

-

-            exclusiveSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-

-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE5");

-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);

-

-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE5?consumer.exclusive=true");

-            MessageConsumer exclusiveConsumer = exclusiveSession.createConsumer(exclusiveQueue);

-

-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE5");

-

-            MessageProducer producer = senderSession.createProducer(senderQueue);

-

-            Message msg = senderSession.createTextMessage("test");

-            producer.send(msg);

-            Thread.sleep(100);

-

-            // Verify exclusive consumer receives the message.

-            Assert.assertNotNull(exclusiveConsumer.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-        } finally {

-            fallbackSession.close();

-            senderSession.close();

-            conn.close();

-        }

-

-    }

-

-    public void testFailoverToAnotherExclusiveConsumerCreatedFirst() throws JMSException,

-        InterruptedException {

-        Connection conn = createConnection(true);

-

-        Session exclusiveSession1 = null;

-        Session exclusiveSession2 = null;

-        Session fallbackSession = null;

-        Session senderSession = null;

-

-        try {

-

-            exclusiveSession1 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            exclusiveSession2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-

-            // This creates the exclusive consumer first which avoids AMQ-1024

-            // bug.

-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE2?consumer.exclusive=true");

-            MessageConsumer exclusiveConsumer1 = exclusiveSession1.createConsumer(exclusiveQueue);

-            MessageConsumer exclusiveConsumer2 = exclusiveSession2.createConsumer(exclusiveQueue);

-

-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE2");

-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);

-

-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE2");

-

-            MessageProducer producer = senderSession.createProducer(senderQueue);

-

-            Message msg = senderSession.createTextMessage("test");

-            producer.send(msg);

-            Thread.sleep(100);

-

-            // Verify exclusive consumer receives the message.

-            Assert.assertNotNull(exclusiveConsumer1.receive(100));

-            Assert.assertNull(exclusiveConsumer2.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-            // Close the exclusive consumer to verify the non-exclusive consumer

-            // takes over

-            exclusiveConsumer1.close();

-

-            producer.send(msg);

-            producer.send(msg);

-

-            Assert.assertNotNull(exclusiveConsumer2.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-        } finally {

-            fallbackSession.close();

-            senderSession.close();

-            conn.close();

-        }

-

-    }

-

-    public void testFailoverToAnotherExclusiveConsumerCreatedAfter() throws JMSException,

-        InterruptedException {

-        Connection conn = createConnection(true);

-

-        Session exclusiveSession1 = null;

-        Session exclusiveSession2 = null;

-        Session fallbackSession = null;

-        Session senderSession = null;

-

-        try {

-

-            exclusiveSession1 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            exclusiveSession2 = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-

-            // This creates the exclusive consumer first which avoids AMQ-1024

-            // bug.

-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE6?consumer.exclusive=true");

-            MessageConsumer exclusiveConsumer1 = exclusiveSession1.createConsumer(exclusiveQueue);

-

-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE6");

-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);

-

-            MessageConsumer exclusiveConsumer2 = exclusiveSession2.createConsumer(exclusiveQueue);

-

-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE6");

-

-            MessageProducer producer = senderSession.createProducer(senderQueue);

-

-            Message msg = senderSession.createTextMessage("test");

-            producer.send(msg);

-            Thread.sleep(100);

-

-            // Verify exclusive consumer receives the message.

-            Assert.assertNotNull(exclusiveConsumer1.receive(100));

-            Assert.assertNull(exclusiveConsumer2.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-            // Close the exclusive consumer to verify the non-exclusive consumer

-            // takes over

-            exclusiveConsumer1.close();

-

-            producer.send(msg);

-            producer.send(msg);

-

-            Assert.assertNotNull(exclusiveConsumer2.receive(1000));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-        } finally {

-            fallbackSession.close();

-            senderSession.close();

-            conn.close();

-        }

-

-    }

-

-    public void testFailoverToNonExclusiveConsumer() throws JMSException, InterruptedException {

-        Connection conn = createConnection(true);

-

-        Session exclusiveSession = null;

-        Session fallbackSession = null;

-        Session senderSession = null;

-

-        try {

-

-            exclusiveSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-

-            // This creates the exclusive consumer first which avoids AMQ-1024

-            // bug.

-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE3?consumer.exclusive=true");

-            MessageConsumer exclusiveConsumer = exclusiveSession.createConsumer(exclusiveQueue);

-

-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE3");

-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);

-

-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE3");

-

-            MessageProducer producer = senderSession.createProducer(senderQueue);

-

-            Message msg = senderSession.createTextMessage("test");

-            producer.send(msg);

-            Thread.sleep(100);

-

-            // Verify exclusive consumer receives the message.

-            Assert.assertNotNull(exclusiveConsumer.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-            // Close the exclusive consumer to verify the non-exclusive consumer

-            // takes over

-            exclusiveConsumer.close();

-

-            producer.send(msg);

-

-            Assert.assertNotNull(fallbackConsumer.receive(100));

-

-        } finally {

-            fallbackSession.close();

-            senderSession.close();

-            conn.close();

-        }

-

-    }

-

-    public void testFallbackToExclusiveConsumer() throws JMSException, InterruptedException {

-        Connection conn = createConnection(true);

-

-        Session exclusiveSession = null;

-        Session fallbackSession = null;

-        Session senderSession = null;

-

-        try {

-

-            exclusiveSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            fallbackSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

-

-            // This creates the exclusive consumer first which avoids AMQ-1024

-            // bug.

-            ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.QUEUE4?consumer.exclusive=true");

-            MessageConsumer exclusiveConsumer = exclusiveSession.createConsumer(exclusiveQueue);

-

-            ActiveMQQueue fallbackQueue = new ActiveMQQueue("TEST.QUEUE4");

-            MessageConsumer fallbackConsumer = fallbackSession.createConsumer(fallbackQueue);

-

-            ActiveMQQueue senderQueue = new ActiveMQQueue("TEST.QUEUE4");

-

-            MessageProducer producer = senderSession.createProducer(senderQueue);

-

-            Message msg = senderSession.createTextMessage("test");

-            producer.send(msg);

-            Thread.sleep(100);

-

-            // Verify exclusive consumer receives the message.

-            Assert.assertNotNull(exclusiveConsumer.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-            // Close the exclusive consumer to verify the non-exclusive consumer

-            // takes over

-            exclusiveConsumer.close();

-

-            producer.send(msg);

-

-            // Verify other non-exclusive consumer receices the message.

-            Assert.assertNotNull(fallbackConsumer.receive(100));

-

-            // Create exclusive consumer to determine if it will start receiving

-            // the messages.

-            exclusiveConsumer = exclusiveSession.createConsumer(exclusiveQueue);

-

-            producer.send(msg);

-            Assert.assertNotNull(exclusiveConsumer.receive(100));

-            Assert.assertNull(fallbackConsumer.receive(100));

-

-        } finally {

-            fallbackSession.close();

-            senderSession.close();

-            conn.close();

-        }

-

-    }

-}

diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ExpiryHogTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ExpiryHogTest.java
deleted file mode 100644
index aa4f2e8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ExpiryHogTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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;
-
-import java.util.concurrent.TimeUnit;
-import javax.jms.ConnectionFactory;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-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.store.kahadb.KahaDBPersistenceAdapter;
-
-/**
- * User: gtully
- */
-public class ExpiryHogTest extends JmsMultipleClientsTestSupport {
-    boolean sleep = false;
-
-    int numMessages = 4;
-
-    public void testImmediateDispatchWhenCacheDisabled() throws Exception {
-        ConnectionFactory f = createConnectionFactory();
-        destination = createDestination();
-        startConsumers(f, destination);
-        sleep = true;
-        this.startProducers(f, destination, numMessages);
-        allMessagesList.assertMessagesReceived(numMessages);
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService bs = new BrokerService();
-        bs.setDeleteAllMessagesOnStartup(true);
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setExpireMessagesPeriod(5000);
-        defaultEntry.setUseCache(false);
-        policyMap.setDefaultEntry(defaultEntry);
-        bs.setDestinationPolicy(policyMap);
-
-        KahaDBPersistenceAdapter ad = (KahaDBPersistenceAdapter) bs.getPersistenceAdapter();
-        ad.setConcurrentStoreAndDispatchQueues(true);
-        return bs;
-    }
-
-    protected TextMessage createTextMessage(Session session, String initText) throws Exception {
-        if (sleep) {
-            TimeUnit.SECONDS.sleep(10);
-        }
-        TextMessage msg = super.createTextMessage(session, initText);
-        msg.setJMSExpiration(4000);
-        return msg;
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        autoFail = false;
-        persistent = true;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java
deleted file mode 100755
index b2877a6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSConsumerTest.java
+++ /dev/null
@@ -1,925 +0,0 @@
-/**
- * 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;
-
-import java.lang.Thread.UncaughtExceptionHandler;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.jmx.DestinationViewMBean;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Test cases used to test the JMS message consumer.
- * 
- * 
- */
-public class JMSConsumerTest extends JmsTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JMSConsumerTest.class);
-
-    public ActiveMQDestination destination;
-    public int deliveryMode;
-    public int prefetch;
-    public int ackMode;
-    public byte destinationType;
-    public boolean durableConsumer;
-
-    public static Test suite() {
-        return suite(JMSConsumerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void initCombosForTestMessageListenerWithConsumerCanBeStopped() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testMessageListenerWithConsumerCanBeStopped() throws Exception {
-
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch done1 = new CountDownLatch(1);
-        final CountDownLatch done2 = new CountDownLatch(1);
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                counter.incrementAndGet();
-                if (counter.get() == 1) {
-                    done1.countDown();
-                }
-                if (counter.get() == 2) {
-                    done2.countDown();
-                }
-            }
-        });
-
-        // Send a first message to make sure that the consumer dispatcher is
-        // running
-        sendMessages(session, destination, 1);
-        assertTrue(done1.await(1, TimeUnit.SECONDS));
-        assertEquals(1, counter.get());
-
-        // Stop the consumer.
-        consumer.stop();
-
-        // Send a message, but should not get delivered.
-        sendMessages(session, destination, 1);
-        assertFalse(done2.await(1, TimeUnit.SECONDS));
-        assertEquals(1, counter.get());
-
-        // Start the consumer, and the message should now get delivered.
-        consumer.start();
-        assertTrue(done2.await(1, TimeUnit.SECONDS));
-        assertEquals(2, counter.get());
-    }
-
-
-    public void testMessageListenerWithConsumerCanBeStoppedConcurently() throws Exception {
-
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch closeDone = new CountDownLatch(1);
-        
-        connection.start();
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        destination = createDestination(session, ActiveMQDestination.QUEUE_TYPE);
-
-        // preload the queue
-        sendMessages(session, destination, 2000);
-        
-
-        final ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)session.createConsumer(destination);
-       
-        final Map<Thread, Throwable> exceptions = 
-            Collections.synchronizedMap(new HashMap<Thread, Throwable>());
-        Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
-            public void uncaughtException(Thread t, Throwable e) {
-                LOG.error("Uncaught exception:", e);
-                exceptions.put(t, e);
-            }
-        });
-        
-        final class AckAndClose implements Runnable {            
-            private Message message;
-
-            public AckAndClose(Message m) {
-                this.message = m;
-            }
-
-            public void run() {
-                try {   
-                    int count = counter.incrementAndGet();
-                    if (count == 590) {
-                        // close in a separate thread is ok by jms
-                        consumer.close();
-                        closeDone.countDown();
-                    }
-                    if (count % 200 == 0) {
-                        // ensure there are some outstanding messages
-                        // ack every 200
-                        message.acknowledge();
-                    }
-                } catch (Exception e) {        
-                    LOG.error("Exception on close or ack:", e);
-                    exceptions.put(Thread.currentThread(), e);
-                } 
-            }  
-        };
-    
-        final ExecutorService executor = Executors.newCachedThreadPool();
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) { 
-                // ack and close eventually in separate thread
-                executor.execute(new AckAndClose(m));
-            }
-        });
-
-        assertTrue(closeDone.await(20, TimeUnit.SECONDS));
-        // await possible exceptions
-        Thread.sleep(1000);
-        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-    }
-
-    
-    public void initCombosForTestMutiReceiveWithPrefetch1() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE),
-                                                      Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testMutiReceiveWithPrefetch1() throws Exception {
-
-        // Set prefetch to 1
-        connection.getPrefetchPolicy().setAll(1);
-        connection.start();
-
-        // Use all the ack modes
-        Session session = connection.createSession(false, ackMode);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-
-        // Make sure 4 messages were delivered.
-        Message message = null;
-        for (int i = 0; i < 4; i++) {
-            message = consumer.receive(1000);
-            assertNotNull(message);
-        }
-        assertNull(consumer.receiveNoWait());
-        message.acknowledge();
-    }
-
-    public void initCombosForTestDurableConsumerSelectorChange() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testDurableConsumerSelectorChange() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.setClientID("test");
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-        MessageConsumer consumer = session.createDurableSubscriber((Topic)destination, "test", "color='red'", false);
-
-        // Send the messages
-        TextMessage message = session.createTextMessage("1st");
-        message.setStringProperty("color", "red");
-        producer.send(message);
-
-        Message m = consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", ((TextMessage)m).getText());
-
-        // Change the subscription.
-        consumer.close();
-        consumer = session.createDurableSubscriber((Topic)destination, "test", "color='blue'", false);
-
-        message = session.createTextMessage("2nd");
-        message.setStringProperty("color", "red");
-        producer.send(message);
-        message = session.createTextMessage("3rd");
-        message.setStringProperty("color", "blue");
-        producer.send(message);
-
-        // Selector should skip the 2nd message.
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("3rd", ((TextMessage)m).getText());
-
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void initCombosForTestSendReceiveBytesMessage() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testSendReceiveBytesMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        BytesMessage message = session.createBytesMessage();
-        message.writeBoolean(true);
-        message.writeBoolean(false);
-        producer.send(message);
-
-        // Make sure only 1 message was delivered.
-        BytesMessage m = (BytesMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertTrue(m.readBoolean());
-        assertFalse(m.readBoolean());
-
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void initCombosForTestSetMessageListenerAfterStart() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testSetMessageListenerAfterStart() throws Exception {
-
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch done = new CountDownLatch(1);
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-
-        // See if the message get sent to the listener
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                counter.incrementAndGet();
-                if (counter.get() == 4) {
-                    done.countDown();
-                }
-            }
-        });
-
-        assertTrue(done.await(1000, TimeUnit.MILLISECONDS));
-        Thread.sleep(200);
-
-        // Make sure only 4 messages were delivered.
-        assertEquals(4, counter.get());
-    }
-
-    public void initCombosForTestPassMessageListenerIntoCreateConsumer() {
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testPassMessageListenerIntoCreateConsumer() throws Exception {
-
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch done = new CountDownLatch(1);
-
-        // Receive a message with the JMS API
-        connection.start();
-        ActiveMQSession session = (ActiveMQSession) connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination, new MessageListener() {
-            public void onMessage(Message m) {
-                counter.incrementAndGet();
-                if (counter.get() == 4) {
-                    done.countDown();
-                }
-            }
-        });
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-
-        assertTrue(done.await(1000, TimeUnit.MILLISECONDS));
-        Thread.sleep(200);
-
-        // Make sure only 4 messages were delivered.
-        assertEquals(4, counter.get());
-    }
-
-    public void initCombosForTestMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() { 
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)});
-    }
-
-    public void testMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() throws Exception {
-    
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch sendDone = new CountDownLatch(1);
-        final CountDownLatch got2Done = new CountDownLatch(1);
-
-        // Set prefetch to 1
-        connection.getPrefetchPolicy().setAll(1);
-        // This test case does not work if optimized message dispatch is used as
-        // the main thread send block until the consumer receives the
-        // message. This test depends on thread decoupling so that the main
-        // thread can stop the consumer thread.
-        connection.setOptimizedMessageDispatch(false);
-        connection.start();
-
-        // Use all the ack modes
-        Session session = connection.createSession(false, ackMode);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                try {
-                    TextMessage tm = (TextMessage)m;
-                    LOG.info("Got in first listener: " + tm.getText());
-                    assertEquals("" + counter.get(), tm.getText());
-                    counter.incrementAndGet();
-                    if (counter.get() == 2) {
-                        sendDone.await();
-                        connection.close();
-                        got2Done.countDown();
-                    }
-                    tm.acknowledge();
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-        sendDone.countDown();
-
-        // Wait for first 2 messages to arrive.
-        assertTrue(got2Done.await(100000, TimeUnit.MILLISECONDS));
-
-        // Re-start connection.
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-
-        connection.getPrefetchPolicy().setAll(1);
-        connection.start();
-
-        // Pickup the remaining messages.
-        final CountDownLatch done2 = new CountDownLatch(1);
-        session = connection.createSession(false, ackMode);
-        consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                try {
-                    TextMessage tm = (TextMessage)m;
-                    LOG.info("Got in second listener: " + tm.getText());
-                    // order is not guaranteed as the connection is started before the listener is set.
-                    // assertEquals("" + counter.get(), tm.getText());
-                    counter.incrementAndGet();
-                    if (counter.get() == 4) {
-                        done2.countDown();
-                    }
-                } catch (Throwable e) {
-                    LOG.error("unexpected ex onMessage: ", e);
-                }
-            }
-        });
-
-        assertTrue(done2.await(1000, TimeUnit.MILLISECONDS));
-        Thread.sleep(200);
-
-        // assert msg 2 was redelivered as close() from onMessages() will only ack in auto_ack and dups_ok mode
-        assertEquals(5, counter.get());      
-    }
-
-    public void initCombosForTestMessageListenerAutoAckOnCloseWithPrefetch1() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)});
-    }
-
-    public void testMessageListenerAutoAckOnCloseWithPrefetch1() throws Exception {
-    
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch sendDone = new CountDownLatch(1);
-        final CountDownLatch got2Done = new CountDownLatch(1);
-
-        // Set prefetch to 1
-        connection.getPrefetchPolicy().setAll(1);
-        // This test case does not work if optimized message dispatch is used as
-        // the main thread send block until the consumer receives the
-        // message. This test depends on thread decoupling so that the main
-        // thread can stop the consumer thread.
-        connection.setOptimizedMessageDispatch(false);
-        connection.start();
-
-        // Use all the ack modes
-        Session session = connection.createSession(false, ackMode);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                try {
-                    TextMessage tm = (TextMessage)m;
-                    LOG.info("Got in first listener: " + tm.getText());
-                    assertEquals("" + counter.get(), tm.getText());
-                    counter.incrementAndGet();
-                    m.acknowledge();
-                    if (counter.get() == 2) {
-                        sendDone.await();
-                        connection.close();
-                        got2Done.countDown();
-                    }
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-        sendDone.countDown();
-
-        // Wait for first 2 messages to arrive.
-        assertTrue(got2Done.await(100000, TimeUnit.MILLISECONDS));
-
-        // Re-start connection.
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-
-        connection.getPrefetchPolicy().setAll(1);
-        connection.start();
-
-        // Pickup the remaining messages.
-        final CountDownLatch done2 = new CountDownLatch(1);
-        session = connection.createSession(false, ackMode);
-        consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                try {
-                    TextMessage tm = (TextMessage)m;
-                    LOG.info("Got in second listener: " + tm.getText());
-                    counter.incrementAndGet();
-                    if (counter.get() == 4) {
-                        done2.countDown();
-                    }
-                } catch (Throwable e) {
-                    LOG.error("unexpected ex onMessage: ", e);
-                }
-            }
-        });
-
-        assertTrue(done2.await(1000, TimeUnit.MILLISECONDS));
-        Thread.sleep(200);
-
-        // close from onMessage with Auto_ack will ack
-        // Make sure only 4 messages were delivered.
-        assertEquals(4, counter.get());
-    }
-
-    public void initCombosForTestMessageListenerWithConsumerWithPrefetch1() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testMessageListenerWithConsumerWithPrefetch1() throws Exception {
-
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch done = new CountDownLatch(1);
-
-        // Receive a message with the JMS API
-        connection.getPrefetchPolicy().setAll(1);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                counter.incrementAndGet();
-                if (counter.get() == 4) {
-                    done.countDown();
-                }
-            }
-        });
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-
-        assertTrue(done.await(1000, TimeUnit.MILLISECONDS));
-        Thread.sleep(200);
-
-        // Make sure only 4 messages were delivered.
-        assertEquals(4, counter.get());
-    }
-
-    public void initCombosForTestMessageListenerWithConsumer() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testMessageListenerWithConsumer() throws Exception {
-
-        final AtomicInteger counter = new AtomicInteger(0);
-        final CountDownLatch done = new CountDownLatch(1);
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message m) {
-                counter.incrementAndGet();
-                if (counter.get() == 4) {
-                    done.countDown();
-                }
-            }
-        });
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-
-        assertTrue(done.await(1000, TimeUnit.MILLISECONDS));
-        Thread.sleep(200);
-
-        // Make sure only 4 messages were delivered.
-        assertEquals(4, counter.get());
-    }
-
-    public void initCombosForTestUnackedWithPrefetch1StayInQueue() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE),
-                                                      Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)});
-    }
-
-    public void testUnackedWithPrefetch1StayInQueue() throws Exception {
-
-        // Set prefetch to 1
-        connection.getPrefetchPolicy().setAll(1);
-        connection.start();
-
-        // Use all the ack modes
-        Session session = connection.createSession(false, ackMode);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-
-        // Only pick up the first 2 messages.
-        Message message = null;
-        for (int i = 0; i < 2; i++) {
-            message = consumer.receive(1000);
-            assertNotNull(message);
-        }
-        message.acknowledge();
-
-        connection.close();
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.getPrefetchPolicy().setAll(1);
-        connection.start();
-
-        // Use all the ack modes
-        session = connection.createSession(false, ackMode);
-        consumer = session.createConsumer(destination);
-
-        // Pickup the rest of the messages.
-        for (int i = 0; i < 2; i++) {
-            message = consumer.receive(1000);
-            assertNotNull(message);
-        }
-        message.acknowledge();
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    public void initCombosForTestPrefetch1MessageNotDispatched() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    public void testPrefetch1MessageNotDispatched() throws Exception {
-
-        // Set prefetch to 1
-        connection.getPrefetchPolicy().setAll(1);
-        connection.start();
-
-        Session session = connection.createSession(true, 0);
-        destination = new ActiveMQQueue("TEST");
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send 2 messages to the destination.
-        sendMessages(session, destination, 2);
-        session.commit();
-
-        // The prefetch should fill up with 1 message.
-        // Since prefetch is still full, the 2nd message should get dispatched
-        // to another consumer.. lets create the 2nd consumer test that it does
-        // make sure it does.
-        ActiveMQConnection connection2 = (ActiveMQConnection)factory.createConnection();
-        connection2.start();
-        connections.add(connection2);
-        Session session2 = connection2.createSession(true, 0);
-        MessageConsumer consumer2 = session2.createConsumer(destination);
-
-        // Pick up the first message.
-        Message message1 = consumer.receive(1000);
-        assertNotNull(message1);
-
-        // Pick up the 2nd messages.
-        Message message2 = consumer2.receive(5000);
-        assertNotNull(message2);
-
-        session.commit();
-        session2.commit();
-
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    public void initCombosForTestDontStart() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testDontStart() throws Exception {
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        sendMessages(session, destination, 1);
-
-        // Make sure no messages were delivered.
-        assertNull(consumer.receive(1000));
-    }
-
-    public void initCombosForTestStartAfterSend() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testStartAfterSend() throws Exception {
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        sendMessages(session, destination, 1);
-
-        // Start the conncection after the message was sent.
-        connection.start();
-
-        // Make sure only 1 message was delivered.
-        assertNotNull(consumer.receive(1000));
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void initCombosForTestReceiveMessageWithConsumer() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testReceiveMessageWithConsumer() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        sendMessages(session, destination, 1);
-
-        // Make sure only 1 message was delivered.
-        Message m = consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("0", ((TextMessage)m).getText());
-        assertNull(consumer.receiveNoWait());
-    }
-
-    
-    public void testDupsOkConsumer() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-        destination = createDestination(session, ActiveMQDestination.QUEUE_TYPE);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        sendMessages(session, destination, 4);
-
-        // Make sure only 4 message are delivered.
-        for( int i=0; i < 4; i++){
-            Message m = consumer.receive(1000);
-            assertNotNull(m);
-        }
-        assertNull(consumer.receive(1000));
-        
-        // Close out the consumer.. no other messages should be left on the queue.
-        consumer.close();
-        
-        consumer = session.createConsumer(destination);
-        assertNull(consumer.receive(1000));
-    }
-
-    public void testRedispatchOfUncommittedTx() throws Exception {
-
-        connection.start();
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        destination = createDestination(session, ActiveMQDestination.QUEUE_TYPE);
-        
-        sendMessages(connection, destination, 2);
-        
-        MessageConsumer consumer = session.createConsumer(destination);
-        assertNotNull(consumer.receive(1000));
-        assertNotNull(consumer.receive(1000));
-        
-        // install another consumer while message dispatch is unacked/uncommitted
-        Session redispatchSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer redispatchConsumer = redispatchSession.createConsumer(destination);
-
-        // no commit so will auto rollback and get re-dispatched to redisptachConsumer
-        session.close();
-                
-        Message msg = redispatchConsumer.receive(1000);
-        assertNotNull(msg);
-        assertTrue("redelivered flag set", msg.getJMSRedelivered());
-        assertEquals(2, msg.getLongProperty("JMSXDeliveryCount"));
-        
-        msg = redispatchConsumer.receive(1000);
-        assertNotNull(msg);
-        assertTrue(msg.getJMSRedelivered());
-        assertEquals(2, msg.getLongProperty("JMSXDeliveryCount"));
-        redispatchSession.commit();
-        
-        assertNull(redispatchConsumer.receive(500));
-        redispatchSession.close();
-    }
-
-    
-    public void testRedispatchOfRolledbackTx() throws Exception {
-
-        connection.start();
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        destination = createDestination(session, ActiveMQDestination.QUEUE_TYPE);
-        
-        sendMessages(connection, destination, 2);
-        
-        MessageConsumer consumer = session.createConsumer(destination);
-        assertNotNull(consumer.receive(1000));
-        assertNotNull(consumer.receive(1000));
-        
-        // install another consumer while message dispatch is unacked/uncommitted
-        Session redispatchSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer redispatchConsumer = redispatchSession.createConsumer(destination);
-
-        session.rollback();
-        session.close();
-                
-        Message msg = redispatchConsumer.receive(1000);
-        assertNotNull(msg);
-        assertTrue(msg.getJMSRedelivered());
-        assertEquals(2, msg.getLongProperty("JMSXDeliveryCount"));
-        msg = redispatchConsumer.receive(1000);
-        assertNotNull(msg);
-        assertTrue(msg.getJMSRedelivered());
-        assertEquals(2, msg.getLongProperty("JMSXDeliveryCount"));
-        redispatchSession.commit();
-        
-        assertNull(redispatchConsumer.receive(500));
-        redispatchSession.close();
-    }
-    
-    
-    public void initCombosForTestAckOfExpired() {
-        addCombinationValues("destinationType", 
-                new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-        
-    public void testAckOfExpired() throws Exception {
-        
-        ActiveMQConnectionFactory fact = new ActiveMQConnectionFactory("vm://localhost?jms.prefetchPolicy.all=4&jms.sendAcksAsync=false");
-        connection = fact.createActiveMQConnection();
-        
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);  
-        destination = (ActiveMQDestination) (destinationType == ActiveMQDestination.QUEUE_TYPE ?
-                session.createQueue("test") : session.createTopic("test"));
-                    
-        MessageConsumer consumer = session.createConsumer(destination);
-        connection.setStatsEnabled(true);
-                
-        Session sendSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);  
-            MessageProducer producer = sendSession.createProducer(destination);
-        producer.setTimeToLive(1000);
-        final int count = 4;
-        for (int i = 0; i < count; i++) {
-            TextMessage message = sendSession.createTextMessage("" + i);
-            producer.send(message);
-        }
-        
-        // let first bunch in queue expire
-        Thread.sleep(2000);
-        
-        producer.setTimeToLive(0);
-        for (int i = 0; i < count; i++) {
-            TextMessage message = sendSession.createTextMessage("no expiry" + i);
-            producer.send(message);
-        }
-        
-        ActiveMQMessageConsumer amqConsumer = (ActiveMQMessageConsumer) consumer;
-        
-        for(int i=0; i<count; i++) {
-            TextMessage msg = (TextMessage) amqConsumer.receive();
-            assertNotNull(msg);
-            assertTrue("message has \"no expiry\" text: " + msg.getText(), msg.getText().contains("no expiry"));
-            
-            // force an ack when there are expired messages
-            amqConsumer.acknowledge();         
-        }
-        assertEquals("consumer has expiredMessages", count, amqConsumer.getConsumerStats().getExpiredMessageCount().getCount());
-    
-        DestinationViewMBean view = createView(destination);
-        
-        assertEquals("Wrong inFlightCount: " + view.getInFlightCount(), 0, view.getInFlightCount());
-        assertEquals("Wrong dispatch count: " + view.getDispatchCount(), 8, view.getDispatchCount());
-        assertEquals("Wrong dequeue count: " + view.getDequeueCount(), 8, view.getDequeueCount());
-    }
-    
-    protected DestinationViewMBean createView(ActiveMQDestination destination) throws Exception {
-         
-         String domain = "org.apache.activemq";
-         ObjectName name;
-        if (destination.isQueue()) {
-            name = new ObjectName(domain + ":BrokerName=localhost,Type=Queue,Destination=test");
-        } else {
-            name = new ObjectName(domain + ":BrokerName=localhost,Type=Topic,Destination=test");
-        }
-        return (DestinationViewMBean)broker.getManagementContext().newProxyInstance(name, DestinationViewMBean.class, true);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java
deleted file mode 100755
index 0380614..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JMSDurableTopicRedeliverTest extends JmsTopicRedeliverTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JMSDurableTopicRedeliverTest.class);
-
-    protected void setUp() throws Exception {
-        durable = true;
-        super.setUp();
-    }
-
-    /**
-     * Sends and consumes the messages.
-     * 
-     * @throws Exception
-     */
-    public void testRedeliverNewSession() throws Exception {
-        String text = "TEST: " + System.currentTimeMillis();
-        Message sendMessage = session.createTextMessage(text);
-
-        if (verbose) {
-            LOG.info("About to send a message: " + sendMessage + " with text: " + text);
-        }
-        producer.send(producerDestination, sendMessage);
-
-        // receive but don't acknowledge
-        Message unackMessage = consumer.receive(1000);
-        assertNotNull(unackMessage);
-        String unackId = unackMessage.getJMSMessageID();
-        assertEquals(((TextMessage)unackMessage).getText(), text);
-        assertFalse(unackMessage.getJMSRedelivered());
-        assertEquals(unackMessage.getIntProperty("JMSXDeliveryCount"), 1);
-        consumeSession.close();
-        consumer.close();
-
-        // receive then acknowledge
-        consumeSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        consumer = createConsumer();
-        Message ackMessage = consumer.receive(1000);
-        assertNotNull(ackMessage);
-        ackMessage.acknowledge();
-        String ackId = ackMessage.getJMSMessageID();
-        assertEquals(((TextMessage)ackMessage).getText(), text);
-        assertTrue(ackMessage.getJMSRedelivered());
-        assertEquals(ackMessage.getIntProperty("JMSXDeliveryCount"), 2);
-        assertEquals(unackId, ackId);
-        consumeSession.close();
-        consumer.close();
-
-        consumeSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        consumer = createConsumer();
-        assertNull(consumer.receive(1000));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSExclusiveConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSExclusiveConsumerTest.java
deleted file mode 100644
index eda6faa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSExclusiveConsumerTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * Test cases used to test the JMS message exclusive consumers.
- * 
- * 
- */
-public class JMSExclusiveConsumerTest extends JmsTestSupport {
-
-    public int deliveryMode;
-
-    public static Test suite() {
-        return suite(JMSExclusiveConsumerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void initCombosForTestRoundRobinDispatchOnNonExclusive() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    /**
-     * Shows that by default messages are round robined across a set of
-     * consumers.
-     * 
-     * @throws Exception
-     */
-    public void testRoundRobinDispatchOnNonExclusive() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-
-        MessageConsumer consumer1 = session.createConsumer(destination);
-        MessageConsumer consumer2 = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-
-        Message m;
-        m = consumer2.receive(1000);
-        assertNotNull(m);
-
-        m = consumer1.receive(1000);
-        assertNotNull(m);
-
-        assertNull(consumer1.receiveNoWait());
-        assertNull(consumer2.receiveNoWait());
-    }
-
-    public void initCombosForTestDispatchExclusive() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    /**
-     * Shows that if the "?consumer.exclusive=true" option is added to
-     * destination, then all messages are routed to 1 consumer.
-     * 
-     * @throws Exception
-     */
-    public void testDispatchExclusive() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST?consumer.exclusive=true");
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-
-        MessageConsumer consumer1 = session.createConsumer(destination);
-        MessageConsumer consumer2 = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        producer.send(session.createTextMessage("3nd"));
-
-        Message m;
-        m = consumer2.receive(1000);
-        if (m != null) {
-            // Consumer 2 should get all the messages.
-            for (int i = 0; i < 2; i++) {
-                m = consumer2.receive(1000);
-                assertNotNull(m);
-            }
-        } else {
-            // Consumer 1 should get all the messages.
-            for (int i = 0; i < 3; i++) {
-                m = consumer1.receive(1000);
-                assertNotNull(m);
-            }
-        }
-
-        assertNull(consumer1.receiveNoWait());
-        assertNull(consumer2.receiveNoWait());
-    }
-
-    public void testMixExclusiveWithNonExclusive() throws Exception {
-        ActiveMQQueue exclusiveQueue = new ActiveMQQueue("TEST.FOO?consumer.exclusive=true");
-        ActiveMQQueue nonExclusiveQueue = new ActiveMQQueue("TEST.FOO?consumer.exclusive=false");
-
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer nonExCon = session.createConsumer(nonExclusiveQueue);
-        MessageConsumer exCon = session.createConsumer(exclusiveQueue);
-
-        MessageProducer prod = session.createProducer(exclusiveQueue);
-        prod.send(session.createMessage());
-        prod.send(session.createMessage());
-        prod.send(session.createMessage());
-
-        Message m;
-        for (int i = 0; i < 3; i++) {
-            m = exCon.receive(1000);
-            assertNotNull(m);
-            m = nonExCon.receive(1000);
-            assertNull(m);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSIndividualAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSIndividualAckTest.java
deleted file mode 100644
index 51d0fa1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSIndividualAckTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-/**
- * 
- */
-public class JMSIndividualAckTest extends TestSupport {
-
-    private Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    /**
-     * Tests if acknowledged messages are being consumed.
-     *
-     * @throws JMSException
-     */
-    public void testAckedMessageAreConsumed() throws JMSException {
-        connection.start();
-        Session session = connection.createSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
-        Queue queue = session.createQueue(getQueueName());
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        msg.acknowledge();
-
-        // Reset the session.
-        session.close();
-        session = connection.createSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(1000);
-        assertNull(msg);
-
-        session.close();
-    }
-
-    /**
-     * Tests if acknowledged messages are being consumed.
-     *
-     * @throws JMSException
-     */
-    public void testLastMessageAcked() throws JMSException {
-        connection.start();
-        Session session = connection.createSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
-        Queue queue = session.createQueue(getQueueName());
-        MessageProducer producer = session.createProducer(queue);
-        TextMessage msg1 = session.createTextMessage("msg1");
-        TextMessage msg2 = session.createTextMessage("msg2");
-        TextMessage msg3 = session.createTextMessage("msg3");
-        producer.send(msg1);
-        producer.send(msg2);
-        producer.send(msg3);
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        msg = consumer.receive(1000);
-        assertNotNull(msg);        
-        msg = consumer.receive(1000);
-        assertNotNull(msg);
-        msg.acknowledge();
-
-        // Reset the session.
-        session.close();
-        session = connection.createSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertEquals(msg1,msg);
-        msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertEquals(msg2,msg);
-        msg = consumer.receive(1000);
-        assertNull(msg);
-        session.close();
-    }
-    
-    /**
-     * Tests if unacknowledged messages are being re-delivered when the consumer connects again.
-     * 
-     * @throws JMSException
-     */
-    public void testUnAckedMessageAreNotConsumedOnSessionClose() throws JMSException {
-        connection.start();
-        Session session = connection.createSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
-        Queue queue = session.createQueue(getQueueName());
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);        
-        // Don't ack the message.
-        
-        // Reset the session.  This should cause the unacknowledged message to be re-delivered.
-        session.close();
-        session = connection.createSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
-                
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(2000);
-        assertNotNull(msg);        
-        msg.acknowledge();
-        
-        session.close();
-    }
-
-    protected String getQueueName() {
-        return getClass().getName() + "." + getName();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSMessageTest.java
deleted file mode 100755
index 963fc93..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSMessageTest.java
+++ /dev/null
@@ -1,500 +0,0 @@
-/**
- * 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;
-
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Vector;
-
-import javax.jms.BytesMessage;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageEOFException;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TextMessage;
-
-import junit.framework.Test;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * Test cases used to test the JMS message consumer.
- * 
- * 
- */
-public class JMSMessageTest extends JmsTestSupport {
-
-    public ActiveMQDestination destination;
-    public int deliveryMode = DeliveryMode.NON_PERSISTENT;
-    public int prefetch;
-    public int ackMode;
-    public byte destinationType = ActiveMQDestination.QUEUE_TYPE;
-    public boolean durableConsumer;
-    public String connectURL = "vm://localhost?marshal=false";
-
-    /**
-     * Run all these tests in both marshaling and non-marshaling mode.
-     */
-    public void initCombos() {
-        addCombinationValues("connectURL", new Object[] {"vm://localhost?marshal=false",
-                                                         "vm://localhost?marshal=true"});
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)});
-    }
-
-    public void testTextMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // Send the message.
-        {
-            TextMessage message = session.createTextMessage();
-            message.setText("Hi");
-            producer.send(message);
-        }
-
-        // Check the Message
-        {
-            TextMessage message = (TextMessage)consumer.receive(1000);
-            assertNotNull(message);
-            assertEquals("Hi", message.getText());
-        }
-
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public static Test suite() {
-        return suite(JMSMessageTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws URISyntaxException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(connectURL);
-        return factory;
-    }
-
-    public void testBytesMessageLength() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // Send the message
-        {
-            BytesMessage message = session.createBytesMessage();
-            message.writeInt(1);
-            message.writeInt(2);
-            message.writeInt(3);
-            message.writeInt(4);
-            producer.send(message);
-        }
-
-        // Check the message.
-        {
-            BytesMessage message = (BytesMessage)consumer.receive(1000);
-            assertNotNull(message);
-            assertEquals(16, message.getBodyLength());
-        }
-
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testObjectMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // send the message.
-        {
-            ObjectMessage message = session.createObjectMessage();
-            message.setObject("Hi");
-            producer.send(message);
-        }
-
-        // Check the message
-        {
-            ObjectMessage message = (ObjectMessage)consumer.receive(1000);
-            assertNotNull(message);
-            assertEquals("Hi", message.getObject());
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testBytesMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // Send the message
-        {
-            BytesMessage message = session.createBytesMessage();
-            message.writeBoolean(true);
-            producer.send(message);
-        }
-
-        // Check the message
-        {
-            BytesMessage message = (BytesMessage)consumer.receive(1000);
-            assertNotNull(message);
-            assertTrue(message.readBoolean());
-
-            try {
-                message.readByte();
-                fail("Expected exception not thrown.");
-            } catch (MessageEOFException e) {
-            }
-
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testStreamMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // Send the message.
-        {
-            StreamMessage message = session.createStreamMessage();
-            message.writeString("This is a test to see how it works.");
-            producer.send(message);
-        }
-
-        // Check the message.
-        {
-            StreamMessage message = (StreamMessage)consumer.receive(1000);
-            assertNotNull(message);
-
-            // Invalid conversion should throw exception and not move the stream
-            // position.
-            try {
-                message.readByte();
-                fail("Should have received NumberFormatException");
-            } catch (NumberFormatException e) {
-            }
-
-            assertEquals("This is a test to see how it works.", message.readString());
-
-            // Invalid conversion should throw exception and not move the stream
-            // position.
-            try {
-                message.readByte();
-                fail("Should have received MessageEOFException");
-            } catch (MessageEOFException e) {
-            }
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testMapMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // send the message.
-        {
-            MapMessage message = session.createMapMessage();
-            message.setBoolean("boolKey", true);
-            producer.send(message);
-        }
-
-        // get the message.
-        {
-            MapMessage message = (MapMessage)consumer.receive(1000);
-            assertNotNull(message);
-            assertTrue(message.getBoolean("boolKey"));
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    static class ForeignMessage implements TextMessage {
-
-        public int deliveryMode;
-
-        private String messageId;
-        private long timestamp;
-        private String correlationId;
-        private Destination replyTo;
-        private Destination destination;
-        private boolean redelivered;
-        private String type;
-        private long expiration;
-        private int priority;
-        private String text;
-        private HashMap<String, Object> props = new HashMap<String, Object>();
-
-        public String getJMSMessageID() throws JMSException {
-            return messageId;
-        }
-
-        public void setJMSMessageID(String arg0) throws JMSException {
-            messageId = arg0;
-        }
-
-        public long getJMSTimestamp() throws JMSException {
-            return timestamp;
-        }
-
-        public void setJMSTimestamp(long arg0) throws JMSException {
-            timestamp = arg0;
-        }
-
-        public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
-            return null;
-        }
-
-        public void setJMSCorrelationIDAsBytes(byte[] arg0) throws JMSException {
-        }
-
-        public void setJMSCorrelationID(String arg0) throws JMSException {
-            correlationId = arg0;
-        }
-
-        public String getJMSCorrelationID() throws JMSException {
-            return correlationId;
-        }
-
-        public Destination getJMSReplyTo() throws JMSException {
-            return replyTo;
-        }
-
-        public void setJMSReplyTo(Destination arg0) throws JMSException {
-            replyTo = arg0;
-        }
-
-        public Destination getJMSDestination() throws JMSException {
-            return destination;
-        }
-
-        public void setJMSDestination(Destination arg0) throws JMSException {
-            destination = arg0;
-        }
-
-        public int getJMSDeliveryMode() throws JMSException {
-            return deliveryMode;
-        }
-
-        public void setJMSDeliveryMode(int arg0) throws JMSException {
-            deliveryMode = arg0;
-        }
-
-        public boolean getJMSRedelivered() throws JMSException {
-            return redelivered;
-        }
-
-        public void setJMSRedelivered(boolean arg0) throws JMSException {
-            redelivered = arg0;
-        }
-
-        public String getJMSType() throws JMSException {
-            return type;
-        }
-
-        public void setJMSType(String arg0) throws JMSException {
-            type = arg0;
-        }
-
-        public long getJMSExpiration() throws JMSException {
-            return expiration;
-        }
-
-        public void setJMSExpiration(long arg0) throws JMSException {
-            expiration = arg0;
-        }
-
-        public int getJMSPriority() throws JMSException {
-            return priority;
-        }
-
-        public void setJMSPriority(int arg0) throws JMSException {
-            priority = arg0;
-        }
-
-        public void clearProperties() throws JMSException {
-        }
-
-        public boolean propertyExists(String arg0) throws JMSException {
-            return false;
-        }
-
-        public boolean getBooleanProperty(String arg0) throws JMSException {
-            return false;
-        }
-
-        public byte getByteProperty(String arg0) throws JMSException {
-            return 0;
-        }
-
-        public short getShortProperty(String arg0) throws JMSException {
-            return 0;
-        }
-
-        public int getIntProperty(String arg0) throws JMSException {
-            return 0;
-        }
-
-        public long getLongProperty(String arg0) throws JMSException {
-            return 0;
-        }
-
-        public float getFloatProperty(String arg0) throws JMSException {
-            return 0;
-        }
-
-        public double getDoubleProperty(String arg0) throws JMSException {
-            return 0;
-        }
-
-        public String getStringProperty(String arg0) throws JMSException {
-            return (String)props.get(arg0);
-        }
-
-        public Object getObjectProperty(String arg0) throws JMSException {
-            return props.get(arg0);
-        }
-
-        public Enumeration getPropertyNames() throws JMSException {
-            return new Vector<String>(props.keySet()).elements();
-        }
-
-        public void setBooleanProperty(String arg0, boolean arg1) throws JMSException {
-        }
-
-        public void setByteProperty(String arg0, byte arg1) throws JMSException {
-        }
-
-        public void setShortProperty(String arg0, short arg1) throws JMSException {
-        }
-
-        public void setIntProperty(String arg0, int arg1) throws JMSException {
-        }
-
-        public void setLongProperty(String arg0, long arg1) throws JMSException {
-        }
-
-        public void setFloatProperty(String arg0, float arg1) throws JMSException {
-        }
-
-        public void setDoubleProperty(String arg0, double arg1) throws JMSException {
-        }
-
-        public void setStringProperty(String arg0, String arg1) throws JMSException {
-            props.put(arg0, arg1);
-        }
-
-        public void setObjectProperty(String arg0, Object arg1) throws JMSException {
-            props.put(arg0, arg1);
-        }
-
-        public void acknowledge() throws JMSException {
-        }
-
-        public void clearBody() throws JMSException {
-        }
-
-        public void setText(String arg0) throws JMSException {
-            text = arg0;
-        }
-
-        public String getText() throws JMSException {
-            return text;
-        }
-    }
-
-    public void testForeignMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // Send the message.
-        {
-            ForeignMessage message = new ForeignMessage();
-            message.text = "Hello";
-            message.setStringProperty("test", "value");
-            long timeToLive = 10000L;
-            long start = System.currentTimeMillis();
-            producer.send(message, Session.AUTO_ACKNOWLEDGE, 7, timeToLive);
-            long end = System.currentTimeMillis();
-
-
-            //validate jms spec 1.1 section 3.4.11 table 3.1
-            // JMSDestination, JMSDeliveryMode,  JMSExpiration, JMSPriority, JMSMessageID, and JMSTimestamp
-            //must be set by sending a message.
-
-            // exception for jms destination as the format is provider defined so it is only set on the copy
-            assertNull(message.getJMSDestination());
-            assertEquals(Session.AUTO_ACKNOWLEDGE, message.getJMSDeliveryMode());
-            assertTrue(start  + timeToLive <= message.getJMSExpiration());
-            assertTrue(end + timeToLive >= message.getJMSExpiration());
-            assertEquals(7, message.getJMSPriority());
-            assertNotNull(message.getJMSMessageID());
-            assertTrue(start <= message.getJMSTimestamp());
-            assertTrue(end >= message.getJMSTimestamp());
-        }
-
-        // Validate message is OK.
-        {
-            TextMessage message = (TextMessage)consumer.receive(1000);
-            assertNotNull(message);
-            assertEquals("Hello", message.getText());
-            assertEquals("value", message.getStringProperty("test"));
-        }
-
-        assertNull(consumer.receiveNoWait());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java
deleted file mode 100755
index be8a6f2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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;
-
-/**
- * 
- */
-public class JMSQueueRedeliverTest extends JmsTopicRedeliverTest {
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSUsecaseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSUsecaseTest.java
deleted file mode 100755
index ab4b00b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSUsecaseTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * 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;
-
-import java.util.Enumeration;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.Test;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-
-public class JMSUsecaseTest extends JmsTestSupport {
-
-    public ActiveMQDestination destination;
-    public int deliveryMode;
-    public int prefetch;
-    public byte destinationType;
-    public boolean durableConsumer;
-
-    public static Test suite() {
-        return suite(JMSUsecaseTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void initCombosForTestQueueBrowser() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)});
-    }
-
-    public void testQueueBrowser() throws Exception {
-
-        // Send a message to the broker.
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        sendMessages(session, destination, 5);
-
-        QueueBrowser browser = session.createBrowser((Queue)destination);
-        Enumeration enumeration = browser.getEnumeration();
-        for (int i = 0; i < 5; i++) {
-            Thread.sleep(100);
-            assertTrue(enumeration.hasMoreElements());
-            Message m = (Message)enumeration.nextElement();
-            assertNotNull(m);
-            assertEquals("" + i, ((TextMessage)m).getText());
-        }
-        assertFalse(enumeration.hasMoreElements());
-    }
-
-    public void initCombosForTestSendReceive() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testSendReceive() throws Exception {
-        // Send a message to the broker.
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageProducer producer = session.createProducer(destination);
-        MessageConsumer consumer = session.createConsumer(destination);
-        ActiveMQMessage message = new ActiveMQMessage();
-        producer.send(message);
-
-        // Make sure only 1 message was delivered.
-        assertNotNull(consumer.receive(1000));
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void initCombosForTestSendReceiveTransacted() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testSendReceiveTransacted() throws Exception {
-        // Send a message to the broker.
-        connection.start();
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        destination = createDestination(session, destinationType);
-        MessageProducer producer = session.createProducer(destination);
-        MessageConsumer consumer = session.createConsumer(destination);
-        producer.send(session.createTextMessage("test"));
-
-        // Message should not be delivered until commit.
-        assertNull(consumer.receiveNoWait());
-        session.commit();
-
-        // Make sure only 1 message was delivered.
-        Message message = consumer.receive(1000);
-        assertNotNull(message);
-        assertFalse(message.getJMSRedelivered());
-        assertNull(consumer.receiveNoWait());
-
-        // Message should be redelivered is rollback is used.
-        session.rollback();
-
-        // Make sure only 1 message was delivered.
-        message = consumer.receive(2000);
-        assertNotNull(message);
-        assertTrue(message.getJMSRedelivered());
-        assertNull(consumer.receiveNoWait());
-
-        // If we commit now, the message should not be redelivered.
-        session.commit();
-        assertNull(consumer.receiveNoWait());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSXAConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JMSXAConsumerTest.java
deleted file mode 100644
index 7deff27..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JMSXAConsumerTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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;
-
-import javax.jms.ConnectionFactory;
-import junit.framework.Test;
-
-/*
- * allow an XA session to be used as an auto ack session when no XA transaction
- * https://issues.apache.org/activemq/browse/AMQ-2659
- */
-public class JMSXAConsumerTest extends JMSConsumerTest {
-
-    public static Test suite() {
-        return suite(JMSXAConsumerTest.class);
-    }
-
-    @Override
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQXAConnectionFactory("vm://localhost");
-    }
-
-    // some tests use transactions, these will not work unless an XA transaction is in place
-    // slip these
-    public void testPrefetch1MessageNotDispatched() throws Exception {
-    }
-
-    public void testRedispatchOfUncommittedTx() throws Exception {
-    }
-
-    public void testRedispatchOfRolledbackTx() throws Exception {
-    }
-
-    public void testMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() throws Exception {
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java
deleted file mode 100755
index 5f34106..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class JmsAutoAckListenerTest extends TestSupport implements MessageListener {
-
-    private Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    /**
-     * Tests if acknowleged messages are being consumed.
-     * 
-     * @throws javax.jms.JMSException
-     */
-    public void testAckedMessageAreConsumed() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createQueue("test");
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        consumer.setMessageListener(this);
-
-        Thread.sleep(10000);
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        // Attempt to Consume the message...check if message was acknowledge
-        consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNull(msg);
-
-        session.close();
-    }
-
-    public void onMessage(Message message) {
-        assertNotNull(message);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsAutoAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsAutoAckTest.java
deleted file mode 100755
index 90ee032..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsAutoAckTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class JmsAutoAckTest extends TestSupport {
-
-    private Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-    
-    /**
-     * Tests if acknowleged messages are being consumed.
-     * 
-     * @throws javax.jms.JMSException
-     */
-    public void testAckedMessageAreConsumed() throws JMSException {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createQueue("test");
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        
-        // Reset the session.
-        session.close();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(1000);
-        assertNull(msg);        
-
-        session.close();
-    }
-    
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsBenchmark.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsBenchmark.java
deleted file mode 100755
index 31178f7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsBenchmark.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Benchmarks the broker by starting many consumer and producers against the
- * same destination. Make sure you run with jvm option -server (makes a big
- * difference). The tests simulate storing 1000 1k jms messages to see the rate
- * of processing msg/sec.
- * 
- * 
- */
-public class JmsBenchmark extends JmsTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(JmsBenchmark.class);
-
-    private static final long SAMPLE_DELAY = Integer.parseInt(System.getProperty("SAMPLE_DELAY", "" + 1000 * 5));
-    private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", "10"));
-    private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 60));
-    private static final int PRODUCER_COUNT = Integer.parseInt(System.getProperty("PRODUCER_COUNT", "10"));
-    private static final int CONSUMER_COUNT = Integer.parseInt(System.getProperty("CONSUMER_COUNT", "10"));
-
-    public ActiveMQDestination destination;
-
-    public static Test suite() {
-        return suite(JmsBenchmark.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(JmsBenchmark.class);
-    }
-
-    public void initCombos() {
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST")});
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://(tcp://localhost:0)?persistent=false"));
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws URISyntaxException, IOException {
-        return new ActiveMQConnectionFactory(((TransportConnector)broker.getTransportConnectors().get(0)).getServer().getConnectURI());
-    }
-
-    /**
-     * @throws Throwable
-     */
-    public void testConcurrentSendReceive() throws Throwable {
-
-        final Semaphore connectionsEstablished = new Semaphore(1 - (CONSUMER_COUNT + PRODUCER_COUNT));
-        final Semaphore workerDone = new Semaphore(1 - (CONSUMER_COUNT + PRODUCER_COUNT));
-        final CountDownLatch sampleTimeDone = new CountDownLatch(1);
-
-        final AtomicInteger producedMessages = new AtomicInteger(0);
-        final AtomicInteger receivedMessages = new AtomicInteger(0);
-
-        final Callable producer = new Callable() {
-            public Object call() throws JMSException, InterruptedException {
-                Connection connection = factory.createConnection();
-                connections.add(connection);
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                MessageProducer producer = session.createProducer(destination);
-                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                BytesMessage message = session.createBytesMessage();
-                message.writeBytes(new byte[1024]);
-                connection.start();
-                connectionsEstablished.release();
-
-                while (!sampleTimeDone.await(0, TimeUnit.MILLISECONDS)) {
-                    producer.send(message);
-                    producedMessages.incrementAndGet();
-                }
-
-                connection.close();
-                workerDone.release();
-                return null;
-            }
-        };
-
-        final Callable consumer = new Callable() {
-            public Object call() throws JMSException, InterruptedException {
-                Connection connection = factory.createConnection();
-                connections.add(connection);
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                MessageConsumer consumer = session.createConsumer(destination);
-
-                consumer.setMessageListener(new MessageListener() {
-                    public void onMessage(Message msg) {
-                        receivedMessages.incrementAndGet();
-                    }
-                });
-                connection.start();
-
-                connectionsEstablished.release();
-                sampleTimeDone.await();
-
-                connection.close();
-                workerDone.release();
-                return null;
-            }
-        };
-
-        final Throwable workerError[] = new Throwable[1];
-        for (int i = 0; i < PRODUCER_COUNT; i++) {
-            new Thread("Producer:" + i) {
-                public void run() {
-                    try {
-                        producer.call();
-                    } catch (Throwable e) {
-                        e.printStackTrace();
-                        workerError[0] = e;
-                    }
-                }
-            }.start();
-        }
-
-        for (int i = 0; i < CONSUMER_COUNT; i++) {
-            new Thread("Consumer:" + i) {
-                public void run() {
-                    try {
-                        consumer.call();
-                    } catch (Throwable e) {
-                        e.printStackTrace();
-                        workerError[0] = e;
-                    }
-                }
-            }.start();
-        }
-
-        LOG.info(getName() + ": Waiting for Producers and Consumers to startup.");
-        connectionsEstablished.acquire();
-        LOG.info("Producers and Consumers are now running.  Waiting for system to reach steady state: " + (SAMPLE_DELAY / 1000.0f) + " seconds");
-        Thread.sleep(1000 * 10);
-
-        LOG.info("Starting sample: " + SAMPLES + " each lasting " + (SAMPLE_DURATION / 1000.0f) + " seconds");
-
-        for (int i = 0; i < SAMPLES; i++) {
-
-            long start = System.currentTimeMillis();
-            producedMessages.set(0);
-            receivedMessages.set(0);
-
-            Thread.sleep(SAMPLE_DURATION);
-
-            long end = System.currentTimeMillis();
-            int r = receivedMessages.get();
-            int p = producedMessages.get();
-
-            LOG.info("published: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec, " + "consumed: " + r + " msgs at " + (r * 1000f / (end - start)) + " msgs/sec");
-        }
-
-        LOG.info("Sample done.");
-        sampleTimeDone.countDown();
-
-        workerDone.acquire();
-        if (workerError[0] != null) {
-            throw workerError[0];
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java
deleted file mode 100755
index c122807..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class JmsClientAckListenerTest extends TestSupport implements MessageListener {
-
-    private Connection connection;
-    private boolean dontAck;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    /**
-     * Tests if acknowleged messages are being consumed.
-     * 
-     * @throws javax.jms.JMSException
-     */
-    public void testAckedMessageAreConsumed() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("test");
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        consumer.setMessageListener(this);
-
-        Thread.sleep(10000);
-
-        // Reset the session.
-        session.close();
-
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNull(msg);
-
-        session.close();
-    }
-
-    /**
-     * Tests if unacknowleged messages are being redelivered when the consumer
-     * connects again.
-     * 
-     * @throws javax.jms.JMSException
-     */
-    public void testUnAckedMessageAreNotConsumedOnSessionClose() throws Exception {
-        connection.start();
-        // don't aknowledge message on onMessage() call
-        dontAck = true;
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("test");
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        consumer.setMessageListener(this);
-        // Don't ack the message.
-
-        // Reset the session. This should cause the Unacked message to be
-        // redelivered.
-        session.close();
-
-        Thread.sleep(10000);
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(2000);
-        assertNotNull(msg);
-        msg.acknowledge();
-
-        session.close();
-    }
-
-    public void onMessage(Message message) {
-
-        assertNotNull(message);
-        if (!dontAck) {
-            try {
-                message.acknowledge();
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsClientAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsClientAckTest.java
deleted file mode 100755
index ef33f9a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsClientAckTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class JmsClientAckTest extends TestSupport {
-
-    private Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    /**
-     * Tests if acknowledged messages are being consumed.
-     *
-     * @throws JMSException
-     */
-    public void testAckedMessageAreConsumed() throws JMSException {
-        connection.start();
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue(getQueueName());
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        msg.acknowledge();
-
-        // Reset the session.
-        session.close();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(1000);
-        assertNull(msg);
-
-        session.close();
-    }
-
-    /**
-     * Tests if acknowledged messages are being consumed.
-     *
-     * @throws JMSException
-     */
-    public void testLastMessageAcked() throws JMSException {
-        connection.start();
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue(getQueueName());
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-        producer.send(session.createTextMessage("Hello2"));
-        producer.send(session.createTextMessage("Hello3"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        msg = consumer.receive(1000);
-        assertNotNull(msg);        
-        msg = consumer.receive(1000);
-        assertNotNull(msg);
-        msg.acknowledge();
-
-        // Reset the session.
-        session.close();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(1000);
-        assertNull(msg);
-
-        session.close();
-    }
-    
-    /**
-     * Tests if unacknowledged messages are being re-delivered when the consumer connects again.
-     * 
-     * @throws JMSException
-     */
-    public void testUnAckedMessageAreNotConsumedOnSessionClose() throws JMSException {
-        connection.start();
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue(getQueueName());
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);        
-        // Don't ack the message.
-        
-        // Reset the session.  This should cause the unacknowledged message to be re-delivered.
-        session.close();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-                
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(2000);
-        assertNotNull(msg);        
-        msg.acknowledge();
-        
-        session.close();
-    }
-
-    protected String getQueueName() {
-        return getClass().getName() + "." + getName();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java
deleted file mode 100755
index 0a1a742..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsConnectionStartStopTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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;
-
-import java.util.Random;
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-/**
- * 
- */
-public class JmsConnectionStartStopTest extends TestSupport {
-
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-        .getLog(JmsConnectionStartStopTest.class);
-
-    private Connection startedConnection;
-    private Connection stoppedConnection;
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-
-        LOG.info(getClass().getClassLoader().getResource("log4j.properties"));
-
-        ActiveMQConnectionFactory factory = createConnectionFactory();
-        startedConnection = factory.createConnection();
-        startedConnection.start();
-        stoppedConnection = factory.createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        stoppedConnection.close();
-        startedConnection.close();
-    }
-
-    /**
-     * Tests if the consumer receives the messages that were sent before the
-     * connection was started.
-     * 
-     * @throws JMSException
-     */
-    public void testStoppedConsumerHoldsMessagesTillStarted() throws JMSException {
-        Session startedSession = startedConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Session stoppedSession = stoppedConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Setup the consumers.
-        Topic topic = startedSession.createTopic("test");
-        MessageConsumer startedConsumer = startedSession.createConsumer(topic);
-        MessageConsumer stoppedConsumer = stoppedSession.createConsumer(topic);
-
-        // Send the message.
-        MessageProducer producer = startedSession.createProducer(topic);
-        TextMessage message = startedSession.createTextMessage("Hello");
-        producer.send(message);
-
-        // Test the assertions.
-        Message m = startedConsumer.receive(1000);
-        assertNotNull(m);
-
-        m = stoppedConsumer.receive(1000);
-        assertNull(m);
-
-        stoppedConnection.start();
-        m = stoppedConsumer.receive(5000);
-        assertNotNull(m);
-
-        startedSession.close();
-        stoppedSession.close();
-    }
-
-    /**
-     * Tests if the consumer is able to receive messages eveb when the
-     * connecction restarts multiple times.
-     * 
-     * @throws Exception
-     */
-    public void testMultipleConnectionStops() throws Exception {
-        testStoppedConsumerHoldsMessagesTillStarted();
-        stoppedConnection.stop();
-        testStoppedConsumerHoldsMessagesTillStarted();
-        stoppedConnection.stop();
-        testStoppedConsumerHoldsMessagesTillStarted();
-    }
-
-
-    public void testConcurrentSessionCreateWithStart() throws Exception {
-        ThreadPoolExecutor executor = new ThreadPoolExecutor(50, Integer.MAX_VALUE,
-                                      60L, TimeUnit.SECONDS,
-                                      new SynchronousQueue<Runnable>());
-        final Vector<Throwable> exceptions = new Vector<Throwable>();
-        final Random rand = new Random();
-        Runnable createSessionTask = new Runnable() {
-            public void run() {
-                try {
-                    TimeUnit.MILLISECONDS.sleep(rand.nextInt(10));
-                    stoppedConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                } catch (Exception e) {
-                    exceptions.add(e);
-                }
-            }
-        };
-
-        Runnable startStopTask = new Runnable() {
-            public void run() {
-                try {
-                    TimeUnit.MILLISECONDS.sleep(rand.nextInt(10));
-                    stoppedConnection.start();
-                    stoppedConnection.stop();
-                } catch (Exception e) {
-                    exceptions.add(e);
-                }
-            }
-        };
-
-        for (int i=0; i<1000; i++) {
-            executor.execute(createSessionTask);
-            executor.execute(startStopTask);
-        }
-
-        executor.shutdown();
-        assertTrue("executor terminated", executor.awaitTermination(30, TimeUnit.SECONDS));
-        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java
deleted file mode 100755
index 1a1a958..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * 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;
-
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-
-public class JmsConsumerResetActiveListenerTest extends TestCase {
-
-    private Connection connection;
-    private ActiveMQConnectionFactory factory;
-   
-    protected void setUp() throws Exception {
-        factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = factory.createConnection();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-    }
-    
-    /**
-     * verify the (undefined by spec) behaviour of setting a listener while receiving a message.
-     * 
-     * @throws Exception
-     */
-    public void testSetListenerFromListener() throws Exception {
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Destination dest = session.createQueue("Queue-" + getName());
-        final MessageConsumer consumer = session.createConsumer(dest);
-       
-        final CountDownLatch latch = new CountDownLatch(2);
-        final AtomicBoolean first = new AtomicBoolean(true);
-        final Vector<Object> results = new Vector<Object>();
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                if (first.compareAndSet(true, false)) {
-                    try {
-                        consumer.setMessageListener(this);
-                        results.add(message);
-                    } catch (JMSException e) {
-                        results.add(e);
-                    }
-                } else {
-                    results.add(message);
-                }
-                latch.countDown();
-            }
-        });
-
-        connection.start();
-        
-        MessageProducer producer = session.createProducer(dest);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        producer.send(session.createTextMessage("First"));
-        producer.send(session.createTextMessage("Second"));
-        
-        assertTrue("we did not timeout", latch.await(5, TimeUnit.SECONDS));
-        
-        assertEquals("we have a result", 2, results.size());
-        Object result = results.get(0);
-        assertTrue(result instanceof TextMessage);
-        assertEquals("result is first", "First", ((TextMessage)result).getText());
-        result = results.get(1);
-        assertTrue(result instanceof TextMessage);
-        assertEquals("result is first", "Second", ((TextMessage)result).getText());
-    }
-    
-    /**
-     * and a listener on a new consumer, just in case.
-      *
-     * @throws Exception
-     */
-    public void testNewConsumerSetListenerFromListener() throws Exception {
-        final Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        final Destination dest = session.createQueue("Queue-" + getName());
-        final MessageConsumer consumer = session.createConsumer(dest);
-       
-        final CountDownLatch latch = new CountDownLatch(2);
-        final AtomicBoolean first = new AtomicBoolean(true);
-        final Vector<Object> results = new Vector<Object>();
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                if (first.compareAndSet(true, false)) {
-                    try {
-                        MessageConsumer anotherConsumer = session.createConsumer(dest);
-                        anotherConsumer.setMessageListener(this);
-                        results.add(message);
-                    } catch (JMSException e) {
-                        results.add(e);
-                    }
-                } else {
-                    results.add(message);
-                }
-                latch.countDown();
-            }
-        });
-
-        connection.start();
-        
-        MessageProducer producer = session.createProducer(dest);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        producer.send(session.createTextMessage("First"));
-        producer.send(session.createTextMessage("Second"));
-        
-        assertTrue("we did not timeout", latch.await(5, TimeUnit.SECONDS));
-        
-        assertEquals("we have a result", 2, results.size());
-        Object result = results.get(0);
-        assertTrue(result instanceof TextMessage);
-        assertEquals("result is first", "First", ((TextMessage)result).getText());
-        result = results.get(1);
-        assertTrue(result instanceof TextMessage);
-        assertEquals("result is first", "Second", ((TextMessage)result).getText());
-    }
- }
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java
deleted file mode 100755
index 7a219e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-/**
- * 
- */
-public class JmsCreateConsumerInOnMessageTest extends TestSupport implements MessageListener {
-
-    private Connection connection;
-    private Session publisherSession;
-    private Session consumerSession;
-    private MessageConsumer consumer;
-    private MessageConsumer testConsumer;
-    private MessageProducer producer;
-    private Topic topic;
-    private Object lock = new Object();
-
-    /*
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        super.topic = true;
-        connection = createConnection();
-        connection.setClientID("connection:" + getSubject());
-        publisherSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = (Topic)super.createDestination("Test.Topic");
-        consumer = consumerSession.createConsumer(topic);
-        consumer.setMessageListener(this);
-        producer = publisherSession.createProducer(topic);
-        connection.start();
-    }
-
-    /*
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        connection.close();
-    }
-
-    /**
-     * Tests if a consumer can be created asynchronusly
-     * 
-     * @throws Exception
-     */
-    public void testCreateConsumer() throws Exception {
-        Message msg = super.createMessage();
-        producer.send(msg);
-        if (testConsumer == null) {
-            synchronized (lock) {
-                lock.wait(3000);
-            }
-        }
-        assertTrue(testConsumer != null);
-    }
-
-    /**
-     * Use the asynchronous subscription mechanism
-     * 
-     * @param message
-     */
-    public void onMessage(Message message) {
-        try {
-            testConsumer = consumerSession.createConsumer(topic);
-            consumerSession.createProducer(topic);
-            synchronized (lock) {
-                lock.notify();
-            }
-        } catch (Exception ex) {
-            ex.printStackTrace();
-            assertTrue(false);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java
deleted file mode 100755
index 72dd8bc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-
-/**
- * 
- */
-public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest {
-
-    /**
-     * Set up the test with a queue and persistent delivery mode.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        topic = false;
-        deliveryMode = DeliveryMode.PERSISTENT;
-        super.setUp();
-    }
-
-    /**
-     * Returns the consumer subject.
-     */
-    protected String getConsumerSubject() {
-        return "FOO.>";
-    }
-
-    /**
-     * Returns the producer subject.
-     */
-    protected String getProducerSubject() {
-        return "FOO.BAR.HUMBUG";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java
deleted file mode 100755
index cc212ab..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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;
-
-/**
- * 
- */
-public class JmsDurableTopicSelectorTest extends JmsTopicSelectorTest {
-    public void setUp() throws Exception {
-        durable = true;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java
deleted file mode 100755
index fa47ea9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsDurableTopicSendReceiveTest extends JmsTopicSendReceiveTest {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsDurableTopicSendReceiveTest.class);
-
-    protected Connection connection2;
-    protected Session session2;
-    protected Session consumeSession2;
-    protected MessageConsumer consumer2;
-    protected MessageProducer producer2;
-    protected Destination consumerDestination2;
-    protected Destination producerDestination2;
-
-    /**
-     * Set up a durable suscriber test.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        this.durable = true;
-        super.setUp();
-    }
-
-    /**
-     * Test if all the messages sent are being received.
-     * 
-     * @throws Exception
-     */
-    public void testSendWhileClosed() throws Exception {
-        connection2 = createConnection();
-        connection2.setClientID("test");
-        connection2.start();
-        session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer2 = session2.createProducer(null);
-        producer2.setDeliveryMode(deliveryMode);
-        producerDestination2 = session2.createTopic(getProducerSubject() + "2");
-        Thread.sleep(1000);
-
-        consumeSession2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumerDestination2 = session2.createTopic(getConsumerSubject() + "2");
-        consumer2 = consumeSession2.createDurableSubscriber((Topic)consumerDestination2, getName());
-        Thread.sleep(1000);
-        consumer2.close();
-        TextMessage message = session2.createTextMessage("test");
-        message.setStringProperty("test", "test");
-        message.setJMSType("test");
-        producer2.send(producerDestination2, message);
-        LOG.info("Creating durable consumer");
-        consumer2 = consumeSession2.createDurableSubscriber((Topic)consumerDestination2, getName());
-        Message msg = consumer2.receive(1000);
-        assertNotNull(msg);
-        assertEquals(((TextMessage)msg).getText(), "test");
-        assertEquals(msg.getJMSType(), "test");
-        assertEquals(msg.getStringProperty("test"), "test");
-        connection2.stop();
-        connection2.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java
deleted file mode 100755
index c01fb7f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-
-import org.apache.activemq.test.JmsResourceProvider;
-
-/**
- * 
- */
-public class JmsDurableTopicTransactionTest extends JmsTopicTransactionTest {
-
-    /**
-     * @see JmsTransactionTestSupport#getJmsResourceProvider()
-     */
-    protected JmsResourceProvider getJmsResourceProvider() {
-        JmsResourceProvider provider = new JmsResourceProvider();
-        provider.setTopic(true);
-        provider.setDeliveryMode(DeliveryMode.PERSISTENT);
-        provider.setClientID(getClass().getName());
-        provider.setDurableName(getName());
-        return provider;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java
deleted file mode 100755
index 3058a57..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-
-/**
- * 
- */
-public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest {
-
-    /**
-     * Sets up a test with a topic destination, durable suscriber and persistent
-     * delivery mode.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        topic = true;
-        durable = true;
-        deliveryMode = DeliveryMode.PERSISTENT;
-        super.setUp();
-    }
-
-    /**
-     * Returns the consumer subject.
-     */
-    protected String getConsumerSubject() {
-        return "FOO.>";
-    }
-
-    /**
-     * Returns the producer subject.
-     */
-    protected String getProducerSubject() {
-        return "FOO.BAR.HUMBUG";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
deleted file mode 100644
index 516e905..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
+++ /dev/null
@@ -1,546 +0,0 @@
-/**
- * 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;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.advisory.ConsumerEvent;
-import org.apache.activemq.advisory.ConsumerEventSource;
-import org.apache.activemq.advisory.ConsumerListener;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.MessageIdList;
-import org.apache.activemq.util.Wait;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.springframework.core.io.Resource;
-
-/**
- * Test case support that allows the easy management and connection of several
- * brokers.
- * 
- * 
- */
-public class JmsMultipleBrokersTestSupport extends CombinationTestSupport {
-    public static final String AUTO_ASSIGN_TRANSPORT = "tcp://localhost:0";
-    public static int maxSetupTime = 5000;
-
-    protected Map<String, BrokerItem> brokers;
-    protected Map<String, Destination> destinations;
-
-    protected int messageSize = 1;
-
-    protected boolean persistentDelivery = true;
-    protected boolean verbose;
-
-    protected NetworkConnector bridgeBrokers(String localBrokerName, String remoteBrokerName) throws Exception {
-        return bridgeBrokers(localBrokerName, remoteBrokerName, false, 1, true);
-    }
-
-    protected void bridgeBrokers(String localBrokerName, String remoteBrokerName, boolean dynamicOnly) throws Exception {
-        BrokerService localBroker = brokers.get(localBrokerName).broker;
-        BrokerService remoteBroker = brokers.get(remoteBrokerName).broker;
-
-        bridgeBrokers(localBroker, remoteBroker, dynamicOnly, 1, true, false);
-    }
-
-    protected NetworkConnector bridgeBrokers(String localBrokerName, String remoteBrokerName, boolean dynamicOnly, int networkTTL, boolean conduit) throws Exception {
-        BrokerService localBroker = brokers.get(localBrokerName).broker;
-        BrokerService remoteBroker = brokers.get(remoteBrokerName).broker;
-
-        return bridgeBrokers(localBroker, remoteBroker, dynamicOnly, networkTTL, conduit, false);
-    }
-
-    // Overwrite this method to specify how you want to bridge the two brokers
-    // By default, bridge them using add network connector of the local broker
-    // and the first connector of the remote broker
-    protected NetworkConnector bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker, boolean dynamicOnly, int networkTTL, boolean conduit, boolean failover) throws Exception {
-        List<TransportConnector> transportConnectors = remoteBroker.getTransportConnectors();
-        URI remoteURI;
-        if (!transportConnectors.isEmpty()) {
-            remoteURI = transportConnectors.get(0).getConnectUri();
-            String uri = "static:(" + remoteURI + ")";
-            if (failover) {
-                uri = "static:(failover:(" + remoteURI + "))";
-            }
-            NetworkConnector connector = new DiscoveryNetworkConnector(new URI(uri));
-            connector.setDynamicOnly(dynamicOnly);
-            connector.setNetworkTTL(networkTTL);
-            connector.setConduitSubscriptions(conduit);
-            localBroker.addNetworkConnector(connector);
-            maxSetupTime = 2000;
-            return connector;
-        } else {
-            throw new Exception("Remote broker has no registered connectors.");
-        }
-
-    }
-
-    // This will interconnect all brokers using multicast
-    protected void bridgeAllBrokers() throws Exception {
-        bridgeAllBrokers("default", 1, false, false);
-    }
-    
-    protected void bridgeAllBrokers(String groupName, int ttl, boolean suppressduplicateQueueSubs) throws Exception {
-        bridgeAllBrokers(groupName, ttl, suppressduplicateQueueSubs, false);
-    }
-
-    protected void bridgeAllBrokers(String groupName, int ttl, boolean suppressduplicateQueueSubs, boolean decreasePriority) throws Exception {
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            List<TransportConnector> transportConnectors = broker.getTransportConnectors();
-
-            if (transportConnectors.isEmpty()) {
-                broker.addConnector(new URI(AUTO_ASSIGN_TRANSPORT));
-                transportConnectors = broker.getTransportConnectors();
-            }
-
-            TransportConnector transport = transportConnectors.get(0);
-            transport.setDiscoveryUri(new URI("multicast://default?group=" + groupName));
-            NetworkConnector nc = broker.addNetworkConnector("multicast://default?group=" + groupName);
-            nc.setNetworkTTL(ttl);
-            nc.setSuppressDuplicateQueueSubscriptions(suppressduplicateQueueSubs);
-            nc.setDecreaseNetworkConsumerPriority(decreasePriority);
-        }
-
-        // Multicasting may take longer to setup
-        maxSetupTime = 8000;
-    }
-
-
-    protected void waitForBridgeFormation(final int min) throws Exception {
-        for (BrokerItem brokerItem : brokers.values()) {
-            final BrokerService broker = brokerItem.broker;
-            waitForBridgeFormation(broker, min, 0);
-        }
-    }
-
-    public boolean waitForBridgeFormation(final BrokerService broker, final int min, final int bridgeIndex) throws Exception {
-        return waitForBridgeFormation(broker, min, bridgeIndex, Wait.MAX_WAIT_MILLIS*2);
-    }
-
-    public boolean waitForBridgeFormation(final BrokerService broker, final int min, final int bridgeIndex, long wait) throws Exception {
-
-        boolean result = false;
-        if (!broker.getNetworkConnectors().isEmpty()) {
-            result = Wait.waitFor(new Wait.Condition() {
-                public boolean isSatisified() throws Exception {
-                    return (broker.getNetworkConnectors().get(bridgeIndex).activeBridges().size() >= min);
-                }}, wait);
-        }
-        return result;
-    }
-
-    protected void waitForBridgeFormation() throws Exception {
-        waitForBridgeFormation(1);
-    }
-
-    protected void startAllBrokers() throws Exception {
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            broker.start();
-            broker.waitUntilStarted();
-        }
-
-        Thread.sleep(maxSetupTime);
-    }
-
-    protected BrokerService createBroker(String brokerName) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName(brokerName);
-        brokers.put(brokerName, new BrokerItem(broker));
-
-        return broker;
-    }
-
-    protected BrokerService createBroker(URI brokerUri) throws Exception {
-        BrokerService broker = BrokerFactory.createBroker(brokerUri);
-        brokers.put(broker.getBrokerName(), new BrokerItem(broker));
-
-        return broker;
-    }
-
-    protected BrokerService createBroker(Resource configFile) throws Exception {
-        BrokerFactoryBean brokerFactory = new BrokerFactoryBean(configFile);
-        brokerFactory.afterPropertiesSet();
-
-        BrokerService broker = brokerFactory.getBroker();
-        brokers.put(broker.getBrokerName(), new BrokerItem(broker));
-
-        return broker;
-    }
-
-    protected ConnectionFactory getConnectionFactory(String brokerName) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            return brokerItem.factory;
-        }
-        return null;
-    }
-
-    protected Connection createConnection(String brokerName) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            return brokerItem.createConnection();
-        }
-        return null;
-    }
-
-    protected MessageConsumer createSyncConsumer(String brokerName, Destination dest) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            Connection con = brokerItem.createConnection();
-            con.start();
-            Session sess = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageConsumer consumer = sess.createConsumer(dest);
-            return consumer;
-        }
-        return null;
-    }
-
-    protected MessageConsumer createConsumer(String brokerName, Destination dest) throws Exception {
-        return createConsumer(brokerName, dest, null, null);
-    }
-
-    protected MessageConsumer createConsumer(String brokerName, Destination dest, String messageSelector) throws Exception {
-        return createConsumer(brokerName, dest, null, messageSelector);
-    }
-    
-    protected MessageConsumer createConsumer(String brokerName, Destination dest, CountDownLatch latch) throws Exception {
-    	return createConsumer(brokerName, dest, latch, null);
-    }
-    
-    protected MessageConsumer createConsumer(String brokerName, Destination dest, CountDownLatch latch, String messageSelector) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            return brokerItem.createConsumer(dest, latch, messageSelector);
-        }
-        return null;
-    }
-    
-    protected QueueBrowser createBrowser(String brokerName, Destination dest) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            return brokerItem.createBrowser(dest);
-        }
-        return null;
-    }
-
-    protected MessageConsumer createDurableSubscriber(String brokerName, Topic dest, String name) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            return brokerItem.createDurableSubscriber(dest, name);
-        }
-        return null;
-    }
-
-    protected MessageIdList getBrokerMessages(String brokerName) {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            return brokerItem.getAllMessages();
-        }
-        return null;
-    }
-
-    protected MessageIdList getConsumerMessages(String brokerName, MessageConsumer consumer) {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        if (brokerItem != null) {
-            return brokerItem.getConsumerMessages(consumer);
-        }
-        return null;
-    }
-    
-    protected void assertConsumersConnect(String brokerName, Destination destination, final int count, long timeout) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-        Connection conn = brokerItem.createConnection();
-        conn.start();
-        ConsumerEventSource ces = new ConsumerEventSource(conn, destination);
-
-        try {
-        	final AtomicInteger actualConnected = new AtomicInteger();
-	        final CountDownLatch latch = new CountDownLatch(1);        
-	        ces.setConsumerListener(new ConsumerListener(){
-				public void onConsumerEvent(ConsumerEvent event) {
-					if( actualConnected.get() < count ) {
-						actualConnected.set(event.getConsumerCount());
-					}
-					if( event.getConsumerCount() >= count ) {
-						latch.countDown();
-					}				
-				}
-			});
-	        ces.start();
-	        
-	        latch.await(timeout, TimeUnit.MILLISECONDS);
-	        assertTrue("Expected at least "+count+" consumers to connect, but only "+actualConnected.get()+" connectect within "+timeout+" ms", actualConnected.get() >= count);
-	        
-        } finally {
-            ces.stop();
-            conn.close();
-            brokerItem.connections.remove(conn);
-        }
-    }
-
-
-    protected void sendMessages(String brokerName, Destination destination, int count) throws Exception {
-    	sendMessages(brokerName, destination, count, null);
-    }
-    
-    protected void sendMessages(String brokerName, Destination destination, int count, HashMap<String, Object>properties) throws Exception {
-        BrokerItem brokerItem = brokers.get(brokerName);
-
-        Connection conn = brokerItem.createConnection();
-        conn.start();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = brokerItem.createProducer(destination, sess);
-        producer.setDeliveryMode(persistentDelivery ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT);
-
-        for (int i = 0; i < count; i++) {
-            TextMessage msg = createTextMessage(sess, conn.getClientID() + ": Message-" + i);
-            if (properties != null) {
-            	for (String propertyName : properties.keySet()) {
-            		msg.setObjectProperty(propertyName, properties.get(propertyName));
-            	}
-            }
-            producer.send(msg);
-            onSend(i, msg);
-        }
-
-        producer.close();
-        sess.close();
-        conn.close();
-        brokerItem.connections.remove(conn);
-    }
-
-    protected void onSend(int i, TextMessage msg) {
-    }
-
-    protected TextMessage createTextMessage(Session session, String initText) throws Exception {
-        TextMessage msg = session.createTextMessage();
-
-        // Pad message text
-        if (initText.length() < messageSize) {
-            char[] data = new char[messageSize - initText.length()];
-            Arrays.fill(data, '*');
-            String str = new String(data);
-            msg.setText(initText + str);
-
-            // Do not pad message text
-        } else {
-            msg.setText(initText);
-        }
-
-        return msg;
-    }
-
-    protected ActiveMQDestination createDestination(String name, boolean topic) throws JMSException {
-        Destination dest;
-        if (topic) {
-            dest = new ActiveMQTopic(name);
-            destinations.put(name, dest);
-            return (ActiveMQDestination)dest;
-        } else {
-            dest = new ActiveMQQueue(name);
-            destinations.put(name, dest);
-            return (ActiveMQDestination)dest;
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        brokers = new HashMap<String, BrokerItem>();
-        destinations = new HashMap<String, Destination>();
-    }
-
-    protected void tearDown() throws Exception {
-        destroyAllBrokers();
-        super.tearDown();
-    }
-
-    protected void destroyBroker(String brokerName) throws Exception {
-        BrokerItem brokerItem = brokers.remove(brokerName);
-
-        if (brokerItem != null) {
-            brokerItem.destroy();
-        }
-    }
-
-    protected void destroyAllBrokers() throws Exception {
-        for (Iterator<BrokerItem> i = brokers.values().iterator(); i.hasNext();) {
-            BrokerItem brokerItem = i.next();
-            brokerItem.destroy();
-        }
-        brokers.clear();
-    }
-
-    // Class to group broker components together
-    public class BrokerItem {
-        public BrokerService broker;
-        public ActiveMQConnectionFactory factory;
-        public List<Connection> connections;
-        public Map<MessageConsumer, MessageIdList> consumers;
-        public MessageIdList allMessages = new MessageIdList();
-        public boolean persistent;
-        private IdGenerator id;
-
-        public BrokerItem(BrokerService broker) throws Exception {
-            this.broker = broker;
-
-            factory = new ActiveMQConnectionFactory(broker.getVmConnectorURI());
-            consumers = Collections.synchronizedMap(new HashMap<MessageConsumer, MessageIdList>());
-            connections = Collections.synchronizedList(new ArrayList<Connection>());
-            allMessages.setVerbose(verbose);
-            id = new IdGenerator(broker.getBrokerName() + ":");
-        }
-
-        public Connection createConnection() throws Exception {
-            Connection conn = factory.createConnection();
-            conn.setClientID(id.generateId());
-
-            connections.add(conn);
-            return conn;
-        }
-
-        public MessageConsumer createConsumer(Destination dest) throws Exception {
-            return createConsumer(dest, null, null);
-        }
-        
-        public MessageConsumer createConsumer(Destination dest, String messageSelector) throws Exception {
-        	return createConsumer(dest, null, messageSelector);
-        }
-
-        public MessageConsumer createConsumer(Destination dest, CountDownLatch latch, String messageSelector) throws Exception {
-            Connection c = createConnection();
-            c.start();
-            Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            return createConsumerWithSession(dest, s, latch, messageSelector);
-        }
-
-        public MessageConsumer createConsumerWithSession(Destination dest, Session sess) throws Exception {
-            return createConsumerWithSession(dest, sess, null, null);
-        }
-
-        public MessageConsumer createConsumerWithSession(Destination dest, Session sess, CountDownLatch latch, String messageSelector) throws Exception {
-            MessageConsumer client = sess.createConsumer(dest, messageSelector);
-            MessageIdList messageIdList = new MessageIdList();
-            messageIdList.setCountDownLatch(latch);
-            messageIdList.setParent(allMessages);
-            client.setMessageListener(messageIdList);
-            consumers.put(client, messageIdList);
-            return client;
-        }
-        
-        public QueueBrowser createBrowser(Destination dest) throws Exception {
-            Connection c = createConnection();
-            c.start();
-            Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            return s.createBrowser((Queue)dest);
-        }
-
-        public MessageConsumer createDurableSubscriber(Topic dest, String name) throws Exception {
-            Connection c = createConnection();
-            c.start();
-            Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            return createDurableSubscriber(dest, s, name);
-        }
-
-        public MessageConsumer createDurableSubscriber(Topic dest, Session sess, String name) throws Exception {
-            MessageConsumer client = sess.createDurableSubscriber((Topic)dest, name);
-            MessageIdList messageIdList = new MessageIdList();
-            messageIdList.setParent(allMessages);
-            client.setMessageListener(messageIdList);
-            consumers.put(client, messageIdList);
-
-            return client;
-        }
-
-        public MessageIdList getAllMessages() {
-            return allMessages;
-        }
-
-        public MessageIdList getConsumerMessages(MessageConsumer consumer) {
-            return consumers.get(consumer);
-        }
-
-        public MessageProducer createProducer(Destination dest) throws Exception {
-            Connection c = createConnection();
-            c.start();
-            Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            return createProducer(dest, s);
-        }
-
-        public MessageProducer createProducer(Destination dest, Session sess) throws Exception {
-            MessageProducer client = sess.createProducer(dest);
-            client.setDeliveryMode(persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT);
-            return client;
-        }
-
-        public void destroy() throws Exception {
-            while (!connections.isEmpty()) {
-                Connection c = connections.remove(0);
-                try {
-                    c.close();
-                } catch (ConnectionClosedException e) {
-                } catch (JMSException e) {
-                }
-            }
-
-            broker.stop();
-            broker.waitUntilStopped();
-            consumers.clear();
-
-            broker = null;
-            connections = null;
-            consumers = null;
-            factory = null;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
deleted file mode 100644
index aa77de5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- * 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;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.TopicSubscriber;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.util.MessageIdList;
-
-/**
- * Test case support used to test multiple message comsumers and message
- * producers connecting to a single broker.
- * 
- * 
- */
-public class JmsMultipleClientsTestSupport extends CombinationTestSupport {
-
-    protected Map<MessageConsumer, MessageIdList> consumers = new HashMap<MessageConsumer, MessageIdList>(); // Map of consumer with messages
-                                                // received
-    protected int consumerCount = 1;
-    protected int producerCount = 1;
-
-    protected int messageSize = 1024;
-
-    protected boolean useConcurrentSend = true;
-    protected boolean autoFail = true;
-    protected boolean durable;
-    public boolean topic;
-    protected boolean persistent;
-
-    protected BrokerService broker;
-    protected Destination destination;
-    protected List<Connection> connections = Collections.synchronizedList(new ArrayList<Connection>());
-    protected MessageIdList allMessagesList = new MessageIdList();
-
-    private AtomicInteger producerLock;
-
-    protected void startProducers(Destination dest, int msgCount) throws Exception {
-        startProducers(createConnectionFactory(), dest, msgCount);
-    }
-
-    protected void startProducers(final ConnectionFactory factory, final Destination dest, final int msgCount) throws Exception {
-        // Use concurrent send
-        if (useConcurrentSend) {
-            producerLock = new AtomicInteger(producerCount);
-
-            for (int i = 0; i < producerCount; i++) {
-                Thread t = new Thread(new Runnable() {
-                    public void run() {
-                        try {
-                            sendMessages(factory.createConnection(), dest, msgCount);
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
-
-                        synchronized (producerLock) {
-                            producerLock.decrementAndGet();
-                            producerLock.notifyAll();
-                        }
-                    }
-                });
-
-                t.start();
-            }
-
-            // Wait for all producers to finish sending
-            synchronized (producerLock) {
-                while (producerLock.get() != 0) {
-                    producerLock.wait(2000);
-                }
-            }
-
-            // Use serialized send
-        } else {
-            for (int i = 0; i < producerCount; i++) {
-                sendMessages(factory.createConnection(), dest, msgCount);
-            }
-        }
-    }
-
-    protected void sendMessages(Connection connection, Destination destination, int count) throws Exception {
-        connections.add(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT);
-
-        for (int i = 0; i < count; i++) {
-            TextMessage msg = createTextMessage(session, "" + i);
-            producer.send(msg);
-        }
-
-        producer.close();
-        session.close();
-        connection.close();
-    }
-
-    protected TextMessage createTextMessage(Session session, String initText) throws Exception {
-        TextMessage msg = session.createTextMessage();
-
-        // Pad message text
-        if (initText.length() < messageSize) {
-            char[] data = new char[messageSize - initText.length()];
-            Arrays.fill(data, '*');
-            String str = new String(data);
-            msg.setText(initText + str);
-
-            // Do not pad message text
-        } else {
-            msg.setText(initText);
-        }
-
-        return msg;
-    }
-
-    protected void startConsumers(Destination dest) throws Exception {
-        startConsumers(createConnectionFactory(), dest);
-    }
-
-    protected void startConsumers(ConnectionFactory factory, Destination dest) throws Exception {
-        MessageConsumer consumer;
-        for (int i = 0; i < consumerCount; i++) {
-            if (durable && topic) {
-                consumer = createDurableSubscriber(factory.createConnection(), dest, "consumer" + (i + 1));
-            } else {
-                consumer = createMessageConsumer(factory.createConnection(), dest);
-            }
-            MessageIdList list = new MessageIdList();
-            list.setParent(allMessagesList);
-            consumer.setMessageListener(list);
-            consumers.put(consumer, list);
-        }
-    }
-
-    protected MessageConsumer createMessageConsumer(Connection conn, Destination dest) throws Exception {
-        connections.add(conn);
-
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final MessageConsumer consumer = sess.createConsumer(dest);
-        conn.start();
-
-        return consumer;
-    }
-
-    protected TopicSubscriber createDurableSubscriber(Connection conn, Destination dest, String name) throws Exception {
-        conn.setClientID(name);
-        connections.add(conn);
-        conn.start();
-
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final TopicSubscriber consumer = sess.createDurableSubscriber((javax.jms.Topic)dest, name);
-
-        return consumer;
-    }
-
-    protected void waitForAllMessagesToBeReceived(int messageCount) throws Exception {
-        allMessagesList.waitForMessagesToArrive(messageCount);
-    }
-
-    protected ActiveMQDestination createDestination() throws JMSException {
-        String name = "." + getClass().getName() + "." + getName();
-        // ensure not inadvertently composite because of combos
-        name = name.replace(' ','_');
-        name = name.replace(',','&');
-        if (topic) {
-            destination = new ActiveMQTopic("Topic" + name);
-            return (ActiveMQDestination)destination;
-        } else {
-            destination = new ActiveMQQueue("Queue" + name);
-            return (ActiveMQDestination)destination;
-        }
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost");
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false&useJmx=true"));
-    }
-
-    protected void setUp() throws Exception {
-        super.setAutoFail(autoFail);
-        super.setUp();
-        broker = createBroker();
-        broker.start();
-    }
-
-    protected void tearDown() throws Exception {
-        for (Iterator<Connection> iter = connections.iterator(); iter.hasNext();) {
-            Connection conn = iter.next();
-            try {
-                conn.close();
-            } catch (Throwable e) {
-            }
-        }
-        broker.stop();
-        allMessagesList.flushMessages();
-        consumers.clear();
-        super.tearDown();
-    }
-
-    /*
-     * Some helpful assertions for multiple consumers.
-     */
-    protected void assertConsumerReceivedAtLeastXMessages(MessageConsumer consumer, int msgCount) {
-        MessageIdList messageIdList = consumers.get(consumer);
-        messageIdList.assertAtLeastMessagesReceived(msgCount);
-    }
-
-    protected void assertConsumerReceivedAtMostXMessages(MessageConsumer consumer, int msgCount) {
-        MessageIdList messageIdList = consumers.get(consumer);
-        messageIdList.assertAtMostMessagesReceived(msgCount);
-    }
-
-    protected void assertConsumerReceivedXMessages(MessageConsumer consumer, int msgCount) {
-        MessageIdList messageIdList = consumers.get(consumer);
-        messageIdList.assertMessagesReceivedNoWait(msgCount);
-    }
-
-    protected void assertEachConsumerReceivedAtLeastXMessages(int msgCount) {
-        for (Iterator<MessageConsumer> i = consumers.keySet().iterator(); i.hasNext();) {
-            assertConsumerReceivedAtLeastXMessages(i.next(), msgCount);
-        }
-    }
-
-    protected void assertEachConsumerReceivedAtMostXMessages(int msgCount) {
-        for (Iterator<MessageConsumer> i = consumers.keySet().iterator(); i.hasNext();) {
-            assertConsumerReceivedAtMostXMessages(i.next(), msgCount);
-        }
-    }
-
-    protected void assertEachConsumerReceivedXMessages(int msgCount) {
-        for (Iterator<MessageConsumer> i = consumers.keySet().iterator(); i.hasNext();) {
-            assertConsumerReceivedXMessages(i.next(), msgCount);
-        }
-    }
-
-    protected void assertTotalMessagesReceived(int msgCount) {
-        allMessagesList.assertMessagesReceivedNoWait(msgCount);
-
-        // now lets count the individual messages received
-        int totalMsg = 0;
-        for (Iterator<MessageConsumer> i = consumers.keySet().iterator(); i.hasNext();) {
-            MessageIdList messageIdList = consumers.get(i.next());
-            totalMsg += messageIdList.getMessageCount();
-        }
-        assertEquals("Total of consumers message count", msgCount, totalMsg);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
deleted file mode 100755
index 4afa0da..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.region.BaseDestination;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-/**
- * 
- */
-public class JmsQueueBrowserTest extends JmsTestSupport {
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(JmsQueueBrowserTest.class);
-    
-
-    /**
-     * Tests the queue browser. Browses the messages then the consumer tries to receive them. The messages should still
-     * be in the queue even when it was browsed.
-     *
-     * @throws Exception
-     */
-    public void testReceiveBrowseReceive() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-        MessageConsumer consumer = session.createConsumer(destination);
-        connection.start();
-
-        Message[] outbound = new Message[]{session.createTextMessage("First Message"),
-                                           session.createTextMessage("Second Message"),
-                                           session.createTextMessage("Third Message")};
-
-        // lets consume any outstanding messages from previous test runs
-        while (consumer.receive(1000) != null) {
-        }
-
-        producer.send(outbound[0]);
-        producer.send(outbound[1]);
-        producer.send(outbound[2]);
-
-        // Get the first.
-        assertEquals(outbound[0], consumer.receive(1000));
-        consumer.close();
-        //Thread.sleep(200);
-
-        QueueBrowser browser = session.createBrowser((Queue) destination);
-        Enumeration enumeration = browser.getEnumeration();
-
-        // browse the second
-        assertTrue("should have received the second message", enumeration.hasMoreElements());
-        assertEquals(outbound[1], (Message) enumeration.nextElement());
-
-        // browse the third.
-        assertTrue("Should have received the third message", enumeration.hasMoreElements());
-        assertEquals(outbound[2], (Message) enumeration.nextElement());
-
-        // There should be no more.
-        boolean tooMany = false;
-        while (enumeration.hasMoreElements()) {
-            LOG.info("Got extra message: " + ((TextMessage) enumeration.nextElement()).getText());
-            tooMany = true;
-        }
-        assertFalse(tooMany);
-        browser.close();
-
-        // Re-open the consumer.
-        consumer = session.createConsumer(destination);
-        // Receive the second.
-        assertEquals(outbound[1], consumer.receive(1000));
-        // Receive the third.
-        assertEquals(outbound[2], consumer.receive(1000));
-        consumer.close();
-
-    }
-    
-    public void testBrowseReceive() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-       
-        connection.start();
-
-        Message[] outbound = new Message[]{session.createTextMessage("First Message"),
-                                           session.createTextMessage("Second Message"),
-                                           session.createTextMessage("Third Message")};
-
-        
-        MessageProducer producer = session.createProducer(destination);
-        producer.send(outbound[0]);
-        
-        // create browser first
-        QueueBrowser browser = session.createBrowser((Queue) destination);
-        Enumeration enumeration = browser.getEnumeration();
-        
-        // create consumer
-        MessageConsumer consumer = session.createConsumer(destination);
-        
-        // browse the first message
-        assertTrue("should have received the first message", enumeration.hasMoreElements());
-        assertEquals(outbound[0], (Message) enumeration.nextElement());
-        
-        // Receive the first message.
-        assertEquals(outbound[0], consumer.receive(1000));
-        consumer.close();
-        browser.close();
-        producer.close();
-
-    }
-    
-    public void testQueueBrowserWith2Consumers() throws Exception {
-        final int numMessages = 1000;
-        connection.setAlwaysSyncSend(false);
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        ActiveMQQueue destinationPrefetch10 = new ActiveMQQueue("TEST?jms.prefetchSize=10");
-        ActiveMQQueue destinationPrefetch1 = new ActiveMQQueue("TEST?jms.prefetchsize=1");      
-        connection.start();
-
-        ActiveMQConnection connection2 = (ActiveMQConnection)factory.createConnection(userName, password);
-        connection2.start();
-        connections.add(connection2);
-        Session session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = session.createProducer(destination);
-        MessageConsumer consumer = session.createConsumer(destinationPrefetch10);
-  
-        for (int i=0; i<numMessages; i++) {
-            TextMessage message = session.createTextMessage("Message: " + i);
-            producer.send(message);   
-        }
-        
-        QueueBrowser browser = session2.createBrowser(destinationPrefetch1);
-        Enumeration<Message> browserView = browser.getEnumeration();
-    
-        List<Message> messages = new ArrayList<Message>();
-        for (int i = 0; i < numMessages; i++) {
-            Message m1 = consumer.receive(5000);
-            assertNotNull("m1 is null for index: " + i, m1);
-            messages.add(m1);
-        }
-
-        int i = 0;
-        for (; i < numMessages && browserView.hasMoreElements(); i++) {
-            Message m1 = messages.get(i);
-            Message m2 = browserView.nextElement();
-            assertNotNull("m2 is null for index: " + i, m2);
-            assertEquals(m1.getJMSMessageID(), m2.getJMSMessageID());
-        }
-        
-        // currently browse max page size is ignored for a queue browser consumer
-        // only guarantee is a page size - but a snapshot of pagedinpending is
-        // used so it is most likely more
-        assertTrue("got at least our expected minimum in the browser: ", i > BaseDestination.MAX_PAGE_SIZE);
-
-        assertFalse("nothing left in the browser", browserView.hasMoreElements());
-        assertNull("consumer finished", consumer.receiveNoWait());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java
deleted file mode 100755
index f381ec0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Topic;
-
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-import org.apache.activemq.util.Wait;
-
-
-/**
- * 
- */
-public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest {
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(JmsQueueCompositeSendReceiveTest.class);
-    
-    /**
-     * Sets a test to have a queue destination and non-persistent delivery mode.
-     *
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        topic = false;
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        super.setUp();
-    }
-
-    /**
-     * Returns the consumer subject.
-     *
-     * @return String - consumer subject
-     * @see org.apache.activemq.test.TestSupport#getConsumerSubject()
-     */
-    protected String getConsumerSubject() {
-        return "FOO.BAR.HUMBUG";
-    }
-
-    /**
-     * Returns the producer subject.
-     *
-     * @return String - producer subject
-     * @see org.apache.activemq.test.TestSupport#getProducerSubject()
-     */
-    protected String getProducerSubject() {
-        return "FOO.BAR.HUMBUG,FOO.BAR.HUMBUG2";
-    }
-   
-    /**
-     * Test if all the messages sent are being received.
-     *
-     * @throws Exception
-     */
-    public void testSendReceive() throws Exception {
-        super.testSendReceive();
-        messages.clear();
-        Destination consumerDestination = consumeSession.createQueue("FOO.BAR.HUMBUG2");
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        MessageConsumer consumer = null;
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            consumer = consumeSession.createDurableSubscriber((Topic) consumerDestination, getName());
-        } else {
-            consumer = consumeSession.createConsumer(consumerDestination);
-        }
-        consumer.setMessageListener(this);
-
-        assertMessagesAreReceived();
-        LOG.info("" + data.length + " messages(s) received, closing down connections");
-    }
-    
-    public void testDuplicate() throws Exception {
-    	ActiveMQDestination queue = (ActiveMQDestination)session.createQueue("TEST,TEST");
-        for (int i = 0; i < data.length; i++) {
-            Message message = createMessage(i);
-            configureMessage(message);
-            if (verbose) {
-                LOG.info("About to send a message: " + message + " with text: " + data[i]);
-            }
-            producer.send(queue, message);
-        }
-        
-        Thread.sleep(200); // wait for messages to be queued
-        
-        BrokerService broker = BrokerRegistry.getInstance().lookup("localhost");
-        final Queue dest = (Queue)((RegionBroker)broker.getRegionBroker()).getQueueRegion().getDestinationMap().get(new ActiveMQQueue("TEST"));
-        assertTrue("all messages were received", Wait.waitFor(new Wait.Condition(){
-            public boolean isSatisified() throws Exception {
-                return data.length == dest.getDestinationStatistics().getMessages().getCount();
-            }}));
-        
-        dest.purge();
-        assertEquals(0, dest.getDestinationStatistics().getMessages().getCount());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java
deleted file mode 100755
index 9282c0c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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;
-
-/**
- * 
- */
-public class JmsQueueRequestReplyTest extends JmsTopicRequestReplyTest {
-
-    /**
-     * Set up the test with a queue.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java
deleted file mode 100755
index 449edda..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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;
-
-/**
- * 
- */
-public class JmsQueueSelectorTest extends JmsTopicSelectorTest {
-    public void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java
deleted file mode 100755
index 73e3e24..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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;
-
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-
-/**
- * 
- */
-public class JmsQueueSendReceiveTest extends JmsTopicSendReceiveTest {
-
-    /**
-     * Set up the test with a queue.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
deleted file mode 100644
index 024f43b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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;
-
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQueueSendReceiveTwoConnectionsTest {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.class);
-
-    private Queue<Exception> errors = new ConcurrentLinkedQueue<Exception>();
-    private int delayBeforeStartingBroker = 1000;
-    private BrokerService broker;
-
-    public void startBroker() {
-        // Initialize the broker
-        LOG.info("Lets wait: " + delayBeforeStartingBroker + " millis  before creating the broker");
-        try {
-            Thread.sleep(delayBeforeStartingBroker);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        LOG.info("Now starting the broker");
-        try {
-            broker = new BrokerService();
-            broker.setPersistent(false);
-            broker.addConnector("tcp://localhost:61616");
-            broker.start();
-        } catch (Exception e) {
-            LOG.info("Caught: " + e);
-            errors.add(e);
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("failover:(tcp://localhost:61616)?maxReconnectAttempts=10&useExponentialBackOff=false&initialReconnectDelay=200");
-    }
-
-    protected void setUp() throws Exception {
-        // now lets asynchronously start a broker
-        Thread thread = new Thread() {
-            public void run() {
-                startBroker();
-            }
-        };
-        thread.start();
-
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        if (broker != null) {
-            broker.stop();
-        }
-        if (!errors.isEmpty()) {
-            Exception e = errors.remove();
-            throw e;
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java
deleted file mode 100755
index ea318dd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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;
-
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsQueueSendReceiveTwoConnectionsTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-
-    /**
-     * Set up the test with a queue and using two connections.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java
deleted file mode 100755
index cb793d0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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;
-
-/**
- * 
- */
-public class JmsQueueSendReceiveUsingTwoSessionsTest extends JmsQueueSendReceiveTest {
-
-    /**
-     * Set up the test using two sessions.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        useSeparateSession = true;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java
deleted file mode 100755
index d92696e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.Topic;
-
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-
-
-/**
- * 
- */
-public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest {
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(JmsQueueTopicCompositeSendReceiveTest.class);
-    Destination consumerDestination2;
-    MessageConsumer consumer2;
-
-    /**
-     * Sets a test to have a queue destination and non-persistent delivery mode.
-     *
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        topic = false;
-        super.setUp();
-        consumerDestination2 = consumeSession.createTopic("FOO.BAR.HUMBUG2");
-        LOG.info("Created  consumer destination: " + consumerDestination2 + " of type: " + consumerDestination2.getClass());
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            consumer2 = consumeSession.createDurableSubscriber((Topic) consumerDestination2, getName());
-        } else {
-            consumer2 = consumeSession.createConsumer(consumerDestination2);
-        }
-
-    }
-
-    /**
-     * Returns the consumer subject.
-     *
-     * @return String - consumer subject
-     * @see org.apache.activemq.test.TestSupport#getConsumerSubject()
-     */
-    protected String getConsumerSubject() {
-        return "FOO.BAR.HUMBUG";
-    }
-
-    /**
-     * Returns the producer subject.
-     *
-     * @return String - producer subject
-     * @see org.apache.activemq.test.TestSupport#getProducerSubject()
-     */
-    protected String getProducerSubject() {
-        return "queue://FOO.BAR.HUMBUG,topic://FOO.BAR.HUMBUG2";
-    }
-
-    /**
-     * Test if all the messages sent are being received.
-     *
-     * @throws Exception
-     */
-    public void testSendReceive() throws Exception {
-        super.testSendReceive();
-        messages.clear();
-        consumer2.setMessageListener(this);
-        assertMessagesAreReceived();
-        LOG.info("" + data.length + " messages(s) received, closing down connections");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
deleted file mode 100755
index a0aaa9d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.test.JmsResourceProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsQueueTransactionTest extends JmsTransactionTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsQueueTransactionTest.class);
-
-    /**
-     * @see org.apache.activemq.JmsTransactionTestSupport#getJmsResourceProvider()
-     */
-    protected JmsResourceProvider getJmsResourceProvider() {
-        JmsResourceProvider p = new JmsResourceProvider();
-        p.setTopic(false);
-        return p;
-    }
-
-    /**
-     * Tests if the the connection gets reset, the messages will still be
-     * received.
-     * 
-     * @throws Exception
-     */
-    public void testReceiveTwoThenCloseConnection() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message")};
-
-        // lets consume any outstanding messages from previous test runs
-        beginTx();
-        while (consumer.receive(1000) != null) {
-        }
-        commitTx();
-
-        beginTx();
-        producer.send(outbound[0]);
-        producer.send(outbound[1]);
-        commitTx();
-
-        LOG.info("Sent 0: " + outbound[0]);
-        LOG.info("Sent 1: " + outbound[1]);
-
-        ArrayList<Message> messages = new ArrayList<Message>();
-        beginTx();
-        Message message = consumer.receive(2000);
-        assertEquals(outbound[0], message);
-
-        message = consumer.receive(2000);
-        assertNotNull(message);
-        assertEquals(outbound[1], message);
-
-        // Close and reopen connection.
-        reconnect();
-
-        // Consume again.. the previous message should
-        // get redelivered.
-        beginTx();
-        message = consumer.receive(2000);
-        assertNotNull("Should have re-received the first message again!", message);
-        messages.add(message);
-        assertEquals(outbound[0], message);
-
-        message = consumer.receive(5000);
-        assertNotNull("Should have re-received the second message again!", message);
-        messages.add(message);
-        assertEquals(outbound[1], message);
-        commitTx();
-
-        Message inbound[] = new Message[messages.size()];
-        messages.toArray(inbound);
-
-        assertTextMessagesEqual("Rollback did not work", outbound, inbound);
-    }
-
-    /**
-     * Tests sending and receiving messages with two sessions(one for producing
-     * and another for consuming).
-     * 
-     * @throws Exception
-     */
-    public void testSendReceiveInSeperateSessionTest() throws Exception {
-        session.close();
-        int batchCount = 10;
-
-        for (int i = 0; i < batchCount; i++) {
-            // Session that sends messages
-            {
-                Session session = resourceProvider.createSession(connection);
-                this.session = session;
-                MessageProducer producer = resourceProvider.createProducer(session, destination);
-                // consumer = resourceProvider.createConsumer(session,
-                // destination);
-                beginTx();
-                producer.send(session.createTextMessage("Test Message: " + i));
-                commitTx();
-                session.close();
-            }
-
-            // Session that consumes messages
-            {
-                Session session = resourceProvider.createSession(connection);
-                this.session = session;
-                MessageConsumer consumer = resourceProvider.createConsumer(session, destination);
-
-                beginTx();
-                TextMessage message = (TextMessage)consumer.receive(1000 * 5);
-                assertNotNull("Received only " + i + " messages in batch ", message);
-                assertEquals("Test Message: " + i, message.getText());
-
-                commitTx();
-                session.close();
-            }
-        }
-    }
-
-    /**
-     * Tests the queue browser. Browses the messages then the consumer tries to
-     * receive them. The messages should still be in the queue even when it was
-     * browsed.
-     * 
-     * @throws Exception
-     */
-    public void testReceiveBrowseReceive() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message"), session.createTextMessage("Third Message")};
-
-        // lets consume any outstanding messages from previous test runs
-        beginTx();
-        while (consumer.receive(1000) != null) {
-        }
-        commitTx();
-
-        beginTx();
-        producer.send(outbound[0]);
-        producer.send(outbound[1]);
-        producer.send(outbound[2]);
-        commitTx();
-
-        // Get the first.
-        beginTx();
-        assertEquals(outbound[0], consumer.receive(1000));
-        consumer.close();
-        commitTx();
-        
-        beginTx();
-        QueueBrowser browser = session.createBrowser((Queue)destination);
-        Enumeration enumeration = browser.getEnumeration();
-
-        // browse the second
-        assertTrue("should have received the second message", enumeration.hasMoreElements());
-        assertEquals(outbound[1], (Message)enumeration.nextElement());
-
-        // browse the third.
-        assertTrue("Should have received the third message", enumeration.hasMoreElements());
-        assertEquals(outbound[2], (Message)enumeration.nextElement());
-
-        // There should be no more.
-        boolean tooMany = false;
-        while (enumeration.hasMoreElements()) {
-            LOG.info("Got extra message: " + ((TextMessage)enumeration.nextElement()).getText());
-            tooMany = true;
-        }
-        assertFalse(tooMany);
-        browser.close();
-
-        // Re-open the consumer.
-        consumer = resourceProvider.createConsumer(session, destination);
-        // Receive the second.
-        assertEquals(outbound[1], consumer.receive(1000));
-        // Receive the third.
-        assertEquals(outbound[2], consumer.receive(1000));
-        consumer.close();
-
-        commitTx();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java
deleted file mode 100755
index b689664..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-
-/**
- * 
- */
-public class JmsQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest {
-
-    private String destination1String = "TEST.ONE.ONE";
-    private String destination2String = "TEST.ONE.ONE.ONE";
-    private String destination3String = "TEST.ONE.TWO";
-    private String destination4String = "TEST.TWO.ONE";
-
-    /**
-     * Sets a test to have a queue destination and non-persistent delivery mode.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        topic = false;
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        super.setUp();
-    }
-
-    /**
-     * Returns the consumer subject.
-     * 
-     * @return String - consumer subject
-     * @see org.apache.activemq.test.TestSupport#getConsumerSubject()
-     */
-    protected String getConsumerSubject() {
-        return "FOO.>";
-    }
-
-    /**
-     * Returns the producer subject.
-     * 
-     * @return String - producer subject
-     * @see org.apache.activemq.test.TestSupport#getProducerSubject()
-     */
-    protected String getProducerSubject() {
-        return "FOO.BAR.HUMBUG";
-    }
-
-    public void testReceiveWildcardQueueEndAsterisk() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQDestination destination1 = (ActiveMQDestination)session.createQueue(destination1String);
-        ActiveMQDestination destination3 = (ActiveMQDestination)session.createQueue(destination3String);
-
-        Message m = null;
-        MessageConsumer consumer = null;
-        String text = null;
-
-        sendMessage(session, destination1, destination1String);
-        sendMessage(session, destination3, destination3String);
-        ActiveMQDestination destination6 = (ActiveMQDestination)session.createQueue("TEST.ONE.*");
-        consumer = session.createConsumer(destination6);
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testReceiveWildcardQueueEndGreaterThan() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQDestination destination1 = (ActiveMQDestination)session.createQueue(destination1String);
-        ActiveMQDestination destination2 = (ActiveMQDestination)session.createQueue(destination2String);
-        ActiveMQDestination destination3 = (ActiveMQDestination)session.createQueue(destination3String);
-
-        Message m = null;
-        MessageConsumer consumer = null;
-        String text = null;
-
-        sendMessage(session, destination1, destination1String);
-        sendMessage(session, destination2, destination2String);
-        sendMessage(session, destination3, destination3String);
-        ActiveMQDestination destination7 = (ActiveMQDestination)session.createQueue("TEST.ONE.>");
-        consumer = session.createConsumer(destination7);
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination2String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        if (!(text.equals(destination1String) || text.equals(destination2String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        if (!(text.equals(destination1String) || text.equals(destination2String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testReceiveWildcardQueueMidAsterisk() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQDestination destination1 = (ActiveMQDestination)session.createQueue(destination1String);
-        ActiveMQDestination destination4 = (ActiveMQDestination)session.createQueue(destination4String);
-
-        Message m = null;
-        MessageConsumer consumer = null;
-        String text = null;
-
-        sendMessage(session, destination1, destination1String);
-        sendMessage(session, destination4, destination4String);
-        ActiveMQDestination destination8 = (ActiveMQDestination)session.createQueue("TEST.*.ONE");
-        consumer = session.createConsumer(destination8);
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination4String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination4String))) {
-            fail("unexpected message:" + text);
-        }
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    private void sendMessage(Session session, Destination destination, String text) throws JMSException {
-        MessageProducer producer = session.createProducer(destination);
-        producer.send(session.createTextMessage(text));
-        producer.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsRedeliveredTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsRedeliveredTest.java
deleted file mode 100755
index 63c5911..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsRedeliveredTest.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * 
- */
-public class JmsRedeliveredTest extends TestCase {
-
-    private Connection connection;
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-    }
-
-    /**
-     * Creates a connection.
-     * 
-     * @return connection
-     * @throws Exception
-     */
-    protected Connection createConnection() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
-                                                                          "vm://localhost?broker.persistent=false");
-        return factory.createConnection();
-    }
-
-    /**
-     * Tests if a message unacknowledged message gets to be resent when the
-     * session is closed and then a new consumer session is created.
-     * 
-     */
-    public void testQueueSessionCloseMarksMessageRedelivered() throws JMSException {
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        producer.send(createTextMessage(session));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-        // Don't ack the message.
-
-        // Reset the session. This should cause the Unacked message to be
-        // redelivered.
-        session.close();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-        msg.acknowledge();
-
-        session.close();
-    }
-
-    
-
-    public void testQueueSessionCloseMarksUnAckedMessageRedelivered() throws JMSException {
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        producer.send(createTextMessage(session, "1"));
-        producer.send(createTextMessage(session, "2"));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-        assertEquals("1", ((TextMessage)msg).getText());
-        msg.acknowledge();
-        
-        // Don't ack the message.
-        msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-        assertEquals("2", ((TextMessage)msg).getText());
-        
-        // Reset the session. This should cause the Unacked message to be
-        // redelivered.
-        session.close();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createConsumer(queue);
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertEquals("2", ((TextMessage)msg).getText());
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-        msg.acknowledge();
-
-        session.close();
-    }
-
-    /**
-     * Tests session recovery and that the redelivered message is marked as
-     * such. Session uses client acknowledgement, the destination is a queue.
-     * 
-     * @throws JMSException
-     */
-    public void testQueueRecoverMarksMessageRedelivered() throws JMSException {
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        producer.send(createTextMessage(session));
-
-        // Consume the message...
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-        // Don't ack the message.
-
-        // Reset the session. This should cause the Unacked message to be
-        // redelivered.
-        session.recover();
-
-        // Attempt to Consume the message...
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-        msg.acknowledge();
-
-        session.close();
-    }
-
-    /**
-     * Tests rollback message to be marked as redelivered. Session uses client
-     * acknowledgement and the destination is a queue.
-     * 
-     * @throws JMSException
-     */
-    public void testQueueRollbackMarksMessageRedelivered() throws JMSException {
-        connection.start();
-
-        Session session = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        producer.send(createTextMessage(session));
-        session.commit();
-
-        // Get the message... Should not be redelivered.
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-
-        // Rollback.. should cause redelivery.
-        session.rollback();
-
-        // Attempt to Consume the message...
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-
-        session.commit();
-        session.close();
-    }
-
-    /**
-     * Tests if the message gets to be re-delivered when the session closes and
-     * that the re-delivered message is marked as such. Session uses client
-     * acknowledgment, the destination is a topic and the consumer is a durable
-     * subscriber.
-     * 
-     * @throws JMSException
-     */
-    public void testDurableTopicSessionCloseMarksMessageRedelivered() throws JMSException {
-        connection.setClientID(getName());
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic-" + getName());
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "sub1");
-
-        // This case only works with persistent messages since transient
-        // messages
-        // are dropped when the consumer goes offline.
-        MessageProducer producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        producer.send(createTextMessage(session));
-
-        // Consume the message...
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be re-delivered.", msg.getJMSRedelivered());
-        // Don't ack the message.
-
-        // Reset the session. This should cause the Unacked message to be
-        // re-delivered.
-        session.close();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Attempt to Consume the message...
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-        msg.acknowledge();
-
-        session.close();
-    }
-
-    /**
-     * Tests session recovery and that the redelivered message is marked as
-     * such. Session uses client acknowledgement, the destination is a topic and
-     * the consumer is a durable suscriber.
-     * 
-     * @throws JMSException
-     */
-    public void testDurableTopicRecoverMarksMessageRedelivered() throws JMSException {
-        connection.setClientID(getName());
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic-" + getName());
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "sub1");
-
-        MessageProducer producer = createProducer(session, topic);
-        producer.send(createTextMessage(session));
-
-        // Consume the message...
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-        // Don't ack the message.
-
-        // Reset the session. This should cause the Unacked message to be
-        // redelivered.
-        session.recover();
-
-        // Attempt to Consume the message...
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-        msg.acknowledge();
-
-        session.close();
-    }
-
-    /**
-     * Tests rollback message to be marked as redelivered. Session uses client
-     * acknowledgement and the destination is a topic.
-     * 
-     * @throws JMSException
-     */
-    public void testDurableTopicRollbackMarksMessageRedelivered() throws JMSException {
-        connection.setClientID(getName());
-        connection.start();
-
-        Session session = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic-" + getName());
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "sub1");
-
-        MessageProducer producer = createProducer(session, topic);
-        producer.send(createTextMessage(session));
-        session.commit();
-
-        // Get the message... Should not be redelivered.
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-
-        // Rollback.. should cause redelivery.
-        session.rollback();
-
-        // Attempt to Consume the message...
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-
-        session.commit();
-        session.close();
-    }
-
-    /**
-     * 
-     * 
-     * @throws JMSException
-     */
-    public void testTopicRecoverMarksMessageRedelivered() throws JMSException {
-
-        connection.setClientID(getName());
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic-" + getName());
-        MessageConsumer consumer = session.createConsumer(topic);
-
-        MessageProducer producer = createProducer(session, topic);
-        producer.send(createTextMessage(session));
-
-        // Consume the message...
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-        // Don't ack the message.
-
-        // Reset the session. This should cause the Unacked message to be
-        // redelivered.
-        session.recover();
-
-        // Attempt to Consume the message...
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-        msg.acknowledge();
-
-        session.close();
-    }
-
-    /**
-     * Tests rollback message to be marked as redelivered. Session uses client
-     * acknowledgement and the destination is a topic.
-     * 
-     * @throws JMSException
-     */
-    public void testTopicRollbackMarksMessageRedelivered() throws JMSException {
-        connection.setClientID(getName());
-        connection.start();
-
-        Session session = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic-" + getName());
-        MessageConsumer consumer = session.createConsumer(topic);
-
-        MessageProducer producer = createProducer(session, topic);
-        producer.send(createTextMessage(session));
-        session.commit();
-
-        // Get the message... Should not be redelivered.
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());
-
-        // Rollback.. should cause redelivery.
-        session.rollback();
-
-        // Attempt to Consume the message...
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
-
-        session.commit();
-        session.close();
-    }
-
-    /**
-     * Creates a text message.
-     * 
-     * @param session
-     * @return TextMessage.
-     * @throws JMSException
-     */
-    private TextMessage createTextMessage(Session session) throws JMSException {
-        return createTextMessage(session, "Hello");
-    }
-
-    private TextMessage createTextMessage(Session session, String txt) throws JMSException {
-        return session.createTextMessage(txt);
-    }
-    
-    /**
-     * Creates a producer.
-     * 
-     * @param session
-     * @param queue - destination.
-     * @return MessageProducer
-     * @throws JMSException
-     */
-    private MessageProducer createProducer(Session session, Destination queue) throws JMSException {
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(getDeliveryMode());
-        return producer;
-    }
-
-    /**
-     * Returns delivery mode.
-     * 
-     * @return int - persistent delivery mode.
-     */
-    protected int getDeliveryMode() {
-        return DeliveryMode.PERSISTENT;
-    }
-
-    /**
-     * Run the JmsRedeliverTest with the delivery mode set as persistent.
-     */
-    public static final class PersistentCase extends JmsRedeliveredTest {
-
-        /**
-         * Returns delivery mode.
-         * 
-         * @return int - persistent delivery mode.
-         */
-        protected int getDeliveryMode() {
-            return DeliveryMode.PERSISTENT;
-        }
-    }
-
-    /**
-     * Run the JmsRedeliverTest with the delivery mode set as non-persistent.
-     */
-    public static final class TransientCase extends JmsRedeliveredTest {
-
-        /**
-         * Returns delivery mode.
-         * 
-         * @return int - non-persistent delivery mode.
-         */
-        protected int getDeliveryMode() {
-            return DeliveryMode.NON_PERSISTENT;
-        }
-    }
-
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        suite.addTestSuite(PersistentCase.class);
-        suite.addTestSuite(TransientCase.class);
-        return suite;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java
deleted file mode 100644
index f9050c0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsRollbackRedeliveryTest.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/**
- * 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;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JmsRollbackRedeliveryTest extends AutoFailTestSupport {
-    protected static final Logger LOG = LoggerFactory.getLogger(JmsRollbackRedeliveryTest.class);
-    final int nbMessages = 10;
-    final String destinationName = "Destination";
-    final String brokerUrl = "vm://localhost?create=false";
-    boolean consumerClose = true;
-    boolean rollback = true;
-    BrokerService broker;
-    
-    public void setUp() throws Exception {
-        setAutoFail(true);
-        super.setUp();
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setUseJmx(false);
-        broker.start();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-    
-
-    public void testRedelivery() throws Exception {
-        doTestRedelivery(brokerUrl, false);
-    }
-
-    public void testRedeliveryWithInterleavedProducer() throws Exception {
-        doTestRedelivery(brokerUrl, true);
-    }
-
-    public void testRedeliveryWithPrefetch0() throws Exception {
-        doTestRedelivery(brokerUrl + "?jms.prefetchPolicy.queuePrefetch=0", true);
-    }
-    
-    public void testRedeliveryWithPrefetch1() throws Exception {
-        doTestRedelivery(brokerUrl + "?jms.prefetchPolicy.queuePrefetch=1", true);
-    }
-    
-    public void doTestRedelivery(String brokerUrl, boolean interleaveProducer) throws Exception {
-
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerUrl);
-        
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        if (interleaveProducer) {
-            populateDestinationWithInterleavedProducer(nbMessages, destinationName, connection);
-        } else {
-            populateDestination(nbMessages, destinationName, connection);
-        }
-        
-        // Consume messages and rollback transactions
-        {
-            AtomicInteger received = new AtomicInteger();
-            Map<String, Boolean> rolledback = new ConcurrentHashMap<String, Boolean>();
-            while (received.get() < nbMessages) {
-                Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-                Destination destination = session.createQueue(destinationName);
-                MessageConsumer consumer = session.createConsumer(destination);
-                TextMessage msg = (TextMessage) consumer.receive(6000000);
-                if (msg != null) {
-                    if (msg != null && rolledback.put(msg.getText(), Boolean.TRUE) != null) {
-                        LOG.info("Received message " + msg.getText() + " (" + received.getAndIncrement() + ")" + msg.getJMSMessageID());
-                        assertTrue(msg.getJMSRedelivered());
-                        assertEquals(2, msg.getLongProperty("JMSXDeliveryCount"));
-                        session.commit();
-                    } else {
-                        LOG.info("Rollback message " + msg.getText() + " id: " +  msg.getJMSMessageID());
-                        assertFalse("should not have redelivery flag set, id: " + msg.getJMSMessageID(), msg.getJMSRedelivered());
-                        session.rollback();
-                    }
-                }
-                consumer.close();
-                session.close();
-            }
-        }
-    }
-       
-    public void testRedeliveryOnSingleConsumer() throws Exception {
-
-        ConnectionFactory connectionFactory = 
-            new ActiveMQConnectionFactory(brokerUrl);
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        populateDestinationWithInterleavedProducer(nbMessages, destinationName, connection);
-
-        // Consume messages and rollback transactions
-        {
-            AtomicInteger received = new AtomicInteger();
-            Map<String, Boolean> rolledback = new ConcurrentHashMap<String, Boolean>();
-            Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-            Destination destination = session.createQueue(destinationName);
-            MessageConsumer consumer = session.createConsumer(destination);            
-            while (received.get() < nbMessages) {
-                TextMessage msg = (TextMessage) consumer.receive(6000000);
-                if (msg != null) {
-                    if (msg != null && rolledback.put(msg.getText(), Boolean.TRUE) != null) {
-                        LOG.info("Received message " + msg.getText() + " (" + received.getAndIncrement() + ")" + msg.getJMSMessageID());
-                        assertTrue(msg.getJMSRedelivered());
-                        session.commit();
-                    } else {
-                        LOG.info("Rollback message " + msg.getText() + " id: " +  msg.getJMSMessageID());
-                        session.rollback();
-                    }
-                }
-            }
-            consumer.close();
-            session.close();
-        }
-    }
-    
-    public void testRedeliveryOnSingleSession() throws Exception {
-
-        ConnectionFactory connectionFactory = 
-            new ActiveMQConnectionFactory(brokerUrl); 
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        populateDestination(nbMessages, destinationName, connection);
-
-        // Consume messages and rollback transactions
-        {
-            AtomicInteger received = new AtomicInteger();
-            Map<String, Boolean> rolledback = new ConcurrentHashMap<String, Boolean>();
-            Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-            Destination destination = session.createQueue(destinationName);
-            while (received.get() < nbMessages) {
-                MessageConsumer consumer = session.createConsumer(destination);            
-                TextMessage msg = (TextMessage) consumer.receive(6000000);
-                if (msg != null) {
-                    if (msg != null && rolledback.put(msg.getText(), Boolean.TRUE) != null) {
-                        LOG.info("Received message " + msg.getText() + " (" + received.getAndIncrement() + ")" + msg.getJMSMessageID());
-                        assertTrue(msg.getJMSRedelivered());
-                        session.commit();
-                    } else {
-                        LOG.info("Rollback message " + msg.getText() + " id: " +  msg.getJMSMessageID());
-                        session.rollback();
-                    }
-                }
-                consumer.close();
-            }
-            session.close();
-        }
-    }
-    
-    // AMQ-1593
-    public void testValidateRedeliveryCountOnRollback() throws Exception {
-
-        final int numMessages = 1;
-       ConnectionFactory connectionFactory = 
-            new ActiveMQConnectionFactory(brokerUrl);
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        populateDestination(numMessages, destinationName, connection);
-
-        {
-            AtomicInteger received = new AtomicInteger();
-            final int maxRetries = new RedeliveryPolicy().getMaximumRedeliveries();
-            while (received.get() < maxRetries) {
-                Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                Destination destination = session.createQueue(destinationName);
-
-                MessageConsumer consumer = session.createConsumer(destination);            
-                TextMessage msg = (TextMessage) consumer.receive(1000);
-                if (msg != null) {
-                    LOG.info("Received message " + msg.getText() + " (" + received.getAndIncrement() + ")" + msg.getJMSMessageID());
-                    assertEquals("redelivery property matches deliveries", received.get(), msg.getLongProperty("JMSXDeliveryCount"));
-                    session.rollback();
-                }
-                session.close();
-            }
-            consumeMessage(connection, maxRetries + 1);
-        }
-    }
-    
-    // AMQ-1593
-    public void testValidateRedeliveryCountOnRollbackWithPrefetch0() throws Exception {
-
-       final int numMessages = 1;
-       ConnectionFactory connectionFactory = 
-            new ActiveMQConnectionFactory(brokerUrl + "?jms.prefetchPolicy.queuePrefetch=0");
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        populateDestination(numMessages, destinationName, connection);
-
-        {
-            AtomicInteger received = new AtomicInteger();
-            final int maxRetries = new RedeliveryPolicy().getMaximumRedeliveries();
-            while (received.get() < maxRetries) {
-                Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                Destination destination = session.createQueue(destinationName);
-
-                MessageConsumer consumer = session.createConsumer(destination);            
-                TextMessage msg = (TextMessage) consumer.receive(1000);
-                if (msg != null) {
-                    LOG.info("Received message " + msg.getText() + " (" + received.getAndIncrement() + ")" + msg.getJMSMessageID());
-                    assertEquals("redelivery property matches deliveries", received.get(), msg.getLongProperty("JMSXDeliveryCount"));
-                    session.rollback();
-                }
-                session.close();
-            }
-            
-            consumeMessage(connection, maxRetries + 1);
-        }
-    }
-
-
-    private void consumeMessage(Connection connection, final int deliveryCount)
-            throws JMSException {
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        Destination destination = session.createQueue(destinationName);
-        MessageConsumer consumer = session.createConsumer(destination);            
-        TextMessage msg = (TextMessage) consumer.receive(1000);
-        assertNotNull(msg);
-        assertEquals("redelivery property matches deliveries", deliveryCount, msg.getLongProperty("JMSXDeliveryCount"));
-        session.commit();
-        session.close();
-    }
-
-    public void testRedeliveryPropertyWithNoRollback() throws Exception {
-        final int numMessages = 1;
-        ConnectionFactory connectionFactory = 
-            new ActiveMQConnectionFactory(brokerUrl);
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        populateDestination(numMessages, destinationName, connection);
-        connection.close();
-        
-        {
-            AtomicInteger received = new AtomicInteger();
-            final int maxRetries = new RedeliveryPolicy().getMaximumRedeliveries();
-            while (received.get() < maxRetries) {
-                connection = connectionFactory.createConnection();
-                connection.start();
-                Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                Destination destination = session.createQueue(destinationName);
-
-                MessageConsumer consumer = session.createConsumer(destination);            
-                TextMessage msg = (TextMessage) consumer.receive(2000);
-                if (msg != null) {
-                    LOG.info("Received message " + msg.getText() + " (" + received.getAndIncrement() + ")" + msg.getJMSMessageID());
-                    assertEquals("redelivery property matches deliveries", received.get(), msg.getLongProperty("JMSXDeliveryCount"));
-                }
-                session.close();
-                connection.close();
-            }
-            connection = connectionFactory.createConnection();
-            connection.start();
-            consumeMessage(connection, maxRetries + 1);
-        }
-    }
-    
-    private void populateDestination(final int nbMessages,
-            final String destinationName, Connection connection)
-            throws JMSException {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = session.createQueue(destinationName);
-        MessageProducer producer = session.createProducer(destination);
-        for (int i = 1; i <= nbMessages; i++) {
-            producer.send(session.createTextMessage("<hello id='" + i + "'/>"));
-        }
-        producer.close();
-        session.close();
-    }
-
-    
-    private void populateDestinationWithInterleavedProducer(final int nbMessages,
-            final String destinationName, Connection connection)
-            throws JMSException {
-        Session session1 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination1 = session1.createQueue(destinationName);
-        MessageProducer producer1 = session1.createProducer(destination1);
-        Session session2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination2 = session2.createQueue(destinationName);
-        MessageProducer producer2 = session2.createProducer(destination2);
-        
-        for (int i = 1; i <= nbMessages; i++) {
-            if (i%2 == 0) {
-                producer1.send(session1.createTextMessage("<hello id='" + i + "'/>"));
-            } else {
-                producer2.send(session2.createTextMessage("<hello id='" + i + "'/>"));
-            }
-        }
-        producer1.close();
-        session1.close();
-        producer2.close();
-        session2.close();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java
deleted file mode 100755
index eb4855a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsSendReceiveTestSupport extends TestSupport implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTestSupport.class);
-
-    protected int messageCount = 100;
-    protected String[] data;
-    protected Session session;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected Destination consumerDestination;
-    protected Destination producerDestination;
-    protected List<Message> messages = createConcurrentList();
-    protected boolean topic = true;
-    protected boolean durable;
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected final Object lock = new Object();
-    protected boolean verbose;
-
-    /*
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        String temp = System.getProperty("messageCount");
-
-        if (temp != null) {
-            int i = Integer.parseInt(temp);
-            if (i > 0) {
-                messageCount = i;
-            }
-        }
-
-        LOG.info("Message count for test case is: " + messageCount);
-        data = new String[messageCount];
-
-        for (int i = 0; i < messageCount; i++) {
-            data[i] = "Text for message: " + i + " at " + new Date();
-        }
-    }
-
-    /**
-     * Sends and consumes the messages.
-     * 
-     * @throws Exception
-     */
-    public void testSendReceive() throws Exception {
-        messages.clear();
-        for (int i = 0; i < data.length; i++) {
-            Message message = session.createTextMessage(data[i]);
-            message.setStringProperty("stringProperty", data[i]);
-            message.setIntProperty("intProperty", i);
-
-            if (verbose) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("About to send a message: " + message + " with text: " + data[i]);
-                }
-            }
-
-            sendToProducer(producer, producerDestination, message);
-            messageSent();
-        }
-
-        assertMessagesAreReceived();
-        LOG.info("" + data.length + " messages(s) received, closing down connections");
-    }
-
-    /**
-     * Sends a message to a destination using the supplied producer
-     * @param producer
-     * @param producerDestination
-     * @param message
-     * @throws JMSException
-     */
-    protected void sendToProducer(MessageProducer producer,
-            Destination producerDestination, Message message) throws JMSException {
-        producer.send(producerDestination, message);   
-    }
-
-    /**
-     * Asserts messages are received.
-     * 
-     * @throws JMSException
-     */
-    protected void assertMessagesAreReceived() throws JMSException {
-        waitForMessagesToBeDelivered();
-        assertMessagesReceivedAreValid(messages);
-    }
-
-    /**
-     * Tests if the messages received are valid.
-     * 
-     * @param receivedMessages - list of received messages.
-     * @throws JMSException
-     */
-    protected void assertMessagesReceivedAreValid(List<Message> receivedMessages) throws JMSException {
-        List<Object> copyOfMessages = Arrays.asList(receivedMessages.toArray());
-        int counter = 0;
-
-        if (data.length != copyOfMessages.size()) {
-            for (Iterator<Object> iter = copyOfMessages.iterator(); iter.hasNext();) {
-                TextMessage message = (TextMessage)iter.next();
-                if (LOG.isInfoEnabled()) {
-                    LOG.info("<== " + counter++ + " = " + message.getText());
-                }
-            }
-        }
-
-        assertEquals("Not enough messages received", data.length, receivedMessages.size());
-
-        for (int i = 0; i < data.length; i++) {
-            TextMessage received = (TextMessage)receivedMessages.get(i);
-            String text = received.getText();
-            String stringProperty = received.getStringProperty("stringProperty");
-            int intProperty = received.getIntProperty("intProperty");
-
-            if (verbose) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.info("Received Text: " + text);
-                }
-            }
-
-            assertEquals("Message: " + i, data[i], text);
-            assertEquals(data[i], stringProperty);
-            assertEquals(i, intProperty);
-        }
-    }
-
-    /**
-     * Waits for messages to be delivered.
-     */
-    protected void waitForMessagesToBeDelivered() {
-        long maxWaitTime = 30000;
-        long waitTime = maxWaitTime;
-        long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
-
-        synchronized (lock) {
-            while (messages.size() < data.length && waitTime >= 0) {
-                try {
-                    lock.wait(200);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-
-                waitTime = maxWaitTime - (System.currentTimeMillis() - start);
-            }
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
-     */
-    public synchronized void onMessage(Message message) {
-        consumeMessage(message, messages);
-    }
-
-    /**
-     * Consumes messages.
-     * 
-     * @param message - message to be consumed.
-     * @param messageList -list of consumed messages.
-     */
-    protected void consumeMessage(Message message, List<Message> messageList) {
-        if (verbose) {
-            if (LOG.isDebugEnabled()) {
-                LOG.info("Received message: " + message);
-            }
-        }
-
-        messageList.add(message);
-
-        if (messageList.size() >= data.length) {
-            synchronized (lock) {
-                lock.notifyAll();
-            }
-        }
-    }
-
-    /**
-     * Returns the ArrayList as a synchronized list.
-     * 
-     * @return List
-     */
-    protected List<Message> createConcurrentList() {
-        return Collections.synchronizedList(new ArrayList<Message>());
-    }
-
-    /**
-     * Just a hook so can insert failure tests
-     * 
-     * @throws Exception
-     */
-    protected void messageSent() throws Exception {
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
deleted file mode 100644
index 956fa40..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/**
- * 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;
-
-import java.util.Date;
-import java.util.Vector;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- */
-public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveWithMessageExpirationTest.class);
-
-    protected int messageCount = 100;
-    protected String[] data;
-    protected Session session;
-    protected Destination consumerDestination;
-    protected Destination producerDestination;
-    protected boolean durable;
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected long timeToLive = 5000;
-    protected boolean verbose;
-
-    protected Connection connection;
-
-    protected void setUp() throws Exception {
-
-        super.setUp();
-
-        data = new String[messageCount];
-
-        for (int i = 0; i < messageCount; i++) {
-            data[i] = "Text for message: " + i + " at " + new Date();
-        }
-
-        connectionFactory = createConnectionFactory();
-        connection = createConnection();
-
-        if (durable) {
-            connection.setClientID(getClass().getName());
-        }
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    /**
-     * Test consuming an expired queue.
-     * 
-     * @throws Exception
-     */
-    public void testConsumeExpiredQueue() throws Exception {
-
-        MessageProducer producer = createProducer(timeToLive);
-
-        consumerDestination = session.createQueue(getConsumerSubject());
-        producerDestination = session.createQueue(getProducerSubject());
-
-        MessageConsumer consumer = createConsumer();
-        connection.start();
-
-        for (int i = 0; i < data.length; i++) {
-            Message message = session.createTextMessage(data[i]);
-            message.setStringProperty("stringProperty", data[i]);
-            message.setIntProperty("intProperty", i);
-
-            if (verbose) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("About to send a queue message: " + message + " with text: " + data[i]);
-                }
-            }
-
-            producer.send(producerDestination, message);
-        }
-
-        // sleeps a second longer than the expiration time.
-        // Basically waits till queue expires.
-        Thread.sleep(timeToLive + 1000);
-
-        // message should have expired.
-        assertNull(consumer.receive(1000));
-    }
-
-     public void testConsumeExpiredQueueAndDlq() throws Exception {
-
-         MessageProducer producerNormal = createProducer(0);
-         MessageProducer producerExpire = createProducer(500);
-
-         consumerDestination = session.createQueue("ActiveMQ.DLQ");
-         MessageConsumer dlqConsumer = createConsumer();
-
-         consumerDestination = session.createQueue(getConsumerSubject());
-         producerDestination = session.createQueue(getProducerSubject());
-
-
-         Connection consumerConnection = createConnection();
-         ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-         prefetchPolicy.setAll(10);
-         ((ActiveMQConnection)consumerConnection).setPrefetchPolicy(prefetchPolicy);
-         Session consumerSession = consumerConnection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-         MessageConsumer consumer = consumerSession.createConsumer(consumerDestination);
-         consumerConnection.start();
-         connection.start();
-
-         String msgBody = new String(new byte[20*1024]);
-         for (int i = 0; i < data.length; i++) {
-             Message message = session.createTextMessage(msgBody);
-             producerExpire.send(producerDestination, message);
-         }
-
-         for (int i = 0; i < data.length; i++) {
-             Message message = session.createTextMessage(msgBody);
-             producerNormal.send(producerDestination, message);
-         }
-
-         Vector<Message> messages = new Vector<Message>();
-         Message received;
-         while ((received = consumer.receive(1000)) != null) {
-             messages.add(received);
-             if (messages.size() == 1) {
-                TimeUnit.SECONDS.sleep(1);
-             }
-             received.acknowledge();
-         };
-
-         assertEquals("got messages", messageCount + 1, messages.size());
-
-         Vector<Message> dlqMessages = new Vector<Message>();
-         while ((received = dlqConsumer.receive(1000)) != null) {
-             dlqMessages.add(received);
-         };
-
-         assertEquals("got dlq messages", data.length - 1, dlqMessages.size());
-    }
-    
-    /**
-     * Sends and consumes the messages to a queue destination.
-     * 
-     * @throws Exception
-     */
-    public void testConsumeQueue() throws Exception {
-
-        MessageProducer producer = createProducer(0);
-
-        consumerDestination = session.createQueue(getConsumerSubject());
-        producerDestination = session.createQueue(getProducerSubject());
-
-        MessageConsumer consumer = createConsumer();
-        connection.start();
-
-        for (int i = 0; i < data.length; i++) {
-            Message message = session.createTextMessage(data[i]);
-            message.setStringProperty("stringProperty", data[i]);
-            message.setIntProperty("intProperty", i);
-
-            if (verbose) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("About to send a queue message: " + message + " with text: " + data[i]);
-                }
-            }
-
-            producer.send(producerDestination, message);
-        }
-
-        // should receive a queue since there is no expiration.
-        assertNotNull(consumer.receive(1000));
-    }
-
-    /**
-     * Test consuming an expired topic.
-     * 
-     * @throws Exception
-     */
-    public void testConsumeExpiredTopic() throws Exception {
-
-        MessageProducer producer = createProducer(timeToLive);
-
-        consumerDestination = session.createTopic(getConsumerSubject());
-        producerDestination = session.createTopic(getProducerSubject());
-
-        MessageConsumer consumer = createConsumer();
-        connection.start();
-
-        for (int i = 0; i < data.length; i++) {
-            Message message = session.createTextMessage(data[i]);
-            message.setStringProperty("stringProperty", data[i]);
-            message.setIntProperty("intProperty", i);
-
-            if (verbose) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("About to send a topic message: " + message + " with text: " + data[i]);
-                }
-            }
-
-            producer.send(producerDestination, message);
-        }
-
-        // sleeps a second longer than the expiration time.
-        // Basically waits till topic expires.
-        Thread.sleep(timeToLive + 1000);
-
-        // message should have expired.
-        assertNull(consumer.receive(1000));
-    }
-
-    /**
-     * Sends and consumes the messages to a topic destination.
-     * 
-     * @throws Exception
-     */
-    public void testConsumeTopic() throws Exception {
-
-        MessageProducer producer = createProducer(0);
-
-        consumerDestination = session.createTopic(getConsumerSubject());
-        producerDestination = session.createTopic(getProducerSubject());
-
-        MessageConsumer consumer = createConsumer();
-        connection.start();
-
-        for (int i = 0; i < data.length; i++) {
-            Message message = session.createTextMessage(data[i]);
-            message.setStringProperty("stringProperty", data[i]);
-            message.setIntProperty("intProperty", i);
-
-            if (verbose) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("About to send a topic message: " + message + " with text: " + data[i]);
-                }
-            }
-
-            producer.send(producerDestination, message);
-        }
-
-        // should receive a topic since there is no expiration.
-        assertNotNull(consumer.receive(1000));
-    }
-
-    protected MessageProducer createProducer(long timeToLive) throws JMSException {
-        MessageProducer producer = session.createProducer(null);
-        producer.setDeliveryMode(deliveryMode);
-        producer.setTimeToLive(timeToLive);
-
-        return producer;
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            return session.createDurableSubscriber((Topic)consumerDestination, getName());
-        }
-        return session.createConsumer(consumerDestination);
-    }
-
-    protected void tearDown() throws Exception {
-        LOG.info("Dumping stats...");
-        LOG.info("Closing down connection");
-
-        session.close();
-        connection.close();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java
deleted file mode 100755
index a9e1b24..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/**
- * 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;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * Testcases to see if Session.recover() work.
- * 
- * 
- */
-public class JmsSessionRecoverTest extends TestCase {
-
-    private Connection connection;
-    private ActiveMQConnectionFactory factory;
-    private Destination dest;
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = factory.createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-    }
-
-    /**
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void testQueueSynchRecover() throws JMSException, InterruptedException {
-        dest = new ActiveMQQueue("Queue-" + System.currentTimeMillis());
-        doTestSynchRecover();
-    }
-
-    /**
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void testQueueAsynchRecover() throws JMSException, InterruptedException {
-        dest = new ActiveMQQueue("Queue-" + System.currentTimeMillis());
-        doTestAsynchRecover();
-    }
-
-    /**
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void testTopicSynchRecover() throws JMSException, InterruptedException {
-        dest = new ActiveMQTopic("Topic-" + System.currentTimeMillis());
-        doTestSynchRecover();
-    }
-
-    /**
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void testTopicAsynchRecover() throws JMSException, InterruptedException {
-        dest = new ActiveMQTopic("Topic-" + System.currentTimeMillis());
-        doTestAsynchRecover();
-    }
-
-    /**
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void testQueueAsynchRecoverWithAutoAck() throws JMSException, InterruptedException {
-        dest = new ActiveMQQueue("Queue-" + System.currentTimeMillis());
-        doTestAsynchRecoverWithAutoAck();
-    }
-
-    /**
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void testTopicAsynchRecoverWithAutoAck() throws JMSException, InterruptedException {
-        dest = new ActiveMQTopic("Topic-" + System.currentTimeMillis());
-        doTestAsynchRecoverWithAutoAck();
-    }
-
-    /**
-     * Test to make sure that a Sync recover works.
-     * 
-     * @throws JMSException
-     */
-    public void doTestSynchRecover() throws JMSException {
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(dest);
-        connection.start();
-
-        MessageProducer producer = session.createProducer(dest);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        producer.send(session.createTextMessage("First"));
-        producer.send(session.createTextMessage("Second"));
-
-        TextMessage message = (TextMessage)consumer.receive(1000);
-        assertEquals("First", message.getText());
-        assertFalse(message.getJMSRedelivered());
-        message.acknowledge();
-
-        message = (TextMessage)consumer.receive(1000);
-        assertEquals("Second", message.getText());
-        assertFalse(message.getJMSRedelivered());
-
-        session.recover();
-
-        message = (TextMessage)consumer.receive(2000);
-        assertEquals("Second", message.getText());
-        assertTrue(message.getJMSRedelivered());
-
-        message.acknowledge();
-    }
-
-    /**
-     * Test to make sure that a Async recover works.
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void doTestAsynchRecover() throws JMSException, InterruptedException {
-
-        final Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        final String errorMessage[] = new String[] {null};
-        final CountDownLatch doneCountDownLatch = new CountDownLatch(1);
-
-        MessageConsumer consumer = session.createConsumer(dest);
-
-        MessageProducer producer = session.createProducer(dest);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        producer.send(session.createTextMessage("First"));
-        producer.send(session.createTextMessage("Second"));
-
-        consumer.setMessageListener(new MessageListener() {
-            int counter;
-
-            public void onMessage(Message msg) {
-                counter++;
-                try {
-                    TextMessage message = (TextMessage)msg;
-                    switch (counter) {
-                    case 1:
-                        assertEquals("First", message.getText());
-                        assertFalse(message.getJMSRedelivered());
-                        message.acknowledge();
-
-                        break;
-                    case 2:
-                        assertEquals("Second", message.getText());
-                        assertFalse(message.getJMSRedelivered());
-                        session.recover();
-                        break;
-
-                    case 3:
-                        assertEquals("Second", message.getText());
-                        assertTrue(message.getJMSRedelivered());
-                        message.acknowledge();
-                        doneCountDownLatch.countDown();
-                        break;
-
-                    default:
-                        errorMessage[0] = "Got too many messages: " + counter;
-                        doneCountDownLatch.countDown();
-                    }
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                    errorMessage[0] = "Got exception: " + e;
-                    doneCountDownLatch.countDown();
-                }
-            }
-        });
-        connection.start();
-
-        if (doneCountDownLatch.await(5, TimeUnit.SECONDS)) {
-            if (errorMessage[0] != null) {
-                fail(errorMessage[0]);
-            }
-        } else {
-            fail("Timeout waiting for async message delivery to complete.");
-        }
-
-    }
-
-    /**
-     * Test to make sure that a Async recover works when using AUTO_ACKNOWLEDGE.
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void doTestAsynchRecoverWithAutoAck() throws JMSException, InterruptedException {
-
-        final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final String errorMessage[] = new String[] {null};
-        final CountDownLatch doneCountDownLatch = new CountDownLatch(1);
-
-        MessageConsumer consumer = session.createConsumer(dest);
-
-        MessageProducer producer = session.createProducer(dest);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        producer.send(session.createTextMessage("First"));
-        producer.send(session.createTextMessage("Second"));
-
-        consumer.setMessageListener(new MessageListener() {
-            int counter;
-
-            public void onMessage(Message msg) {
-                counter++;
-                try {
-                    TextMessage message = (TextMessage)msg;
-                    switch (counter) {
-                    case 1:
-                        assertEquals("First", message.getText());
-                        assertFalse(message.getJMSRedelivered());
-                        break;
-                    case 2:
-                        // This should rollback the delivery of this message..
-                        // and re-deliver.
-                        assertEquals("Second", message.getText());
-                        assertFalse(message.getJMSRedelivered());
-                        session.recover();
-                        break;
-
-                    case 3:
-                        assertEquals("Second", message.getText());
-                        assertTrue(message.getJMSRedelivered());
-                        doneCountDownLatch.countDown();
-                        break;
-
-                    default:
-                        errorMessage[0] = "Got too many messages: " + counter;
-                        doneCountDownLatch.countDown();
-                    }
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                    errorMessage[0] = "Got exception: " + e;
-                    doneCountDownLatch.countDown();
-                }
-            }
-        });
-        connection.start();
-
-        if (doneCountDownLatch.await(5000, TimeUnit.SECONDS)) {
-            if (errorMessage[0] != null) {
-                fail(errorMessage[0]);
-            }
-        } else {
-            fail("Timeout waiting for async message delivery to complete.");
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTempDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTempDestinationTest.java
deleted file mode 100755
index 4d1b1cd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTempDestinationTest.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/**
- * 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;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.InvalidDestinationException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-/**
- * @version
- */
-public class JmsTempDestinationTest extends TestCase {
-
-    private Connection connection;
-    private ActiveMQConnectionFactory factory;
-    protected List<Connection> connections = Collections.synchronizedList(new ArrayList<Connection>());
-
-    protected void setUp() throws Exception {
-        factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        factory.setAlwaysSyncSend(true);
-        connection = factory.createConnection();
-        connections.add(connection);
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        for (Iterator iter = connections.iterator(); iter.hasNext();) {
-            Connection conn = (Connection)iter.next();
-            try {
-                conn.close();
-            } catch (Throwable e) {
-            }
-            iter.remove();
-        }
-    }
-
-    /**
-     * Make sure Temp destination can only be consumed by local connection
-     * 
-     * @throws JMSException
-     */
-    public void testTempDestOnlyConsumedByLocalConn() throws JMSException {
-        connection.start();
-
-        Session tempSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = tempSession.createTemporaryQueue();
-        MessageProducer producer = tempSession.createProducer(queue);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        TextMessage message = tempSession.createTextMessage("First");
-        producer.send(message);
-
-        // temp destination should not be consume when using another connection
-        Connection otherConnection = factory.createConnection();
-        connections.add(otherConnection);
-        Session otherSession = otherConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue otherQueue = otherSession.createTemporaryQueue();
-        MessageConsumer consumer = otherSession.createConsumer(otherQueue);
-        Message msg = consumer.receive(3000);
-        assertNull(msg);
-
-        // should throw InvalidDestinationException when consuming a temp
-        // destination from another connection
-        try {
-            consumer = otherSession.createConsumer(queue);
-            fail("Send should fail since temp destination should be used from another connection");
-        } catch (InvalidDestinationException e) {
-            assertTrue("failed to throw an exception", true);
-        }
-
-        // should be able to consume temp destination from the same connection
-        consumer = tempSession.createConsumer(queue);
-        msg = consumer.receive(3000);
-        assertNotNull(msg);
-
-    }
-
-    /**
-     * Make sure that a temp queue does not drop message if there is an active
-     * consumers.
-     * 
-     * @throws JMSException
-     */
-    public void testTempQueueHoldsMessagesWithConsumers() throws JMSException {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createTemporaryQueue();
-        MessageConsumer consumer = session.createConsumer(queue);
-        connection.start();
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        TextMessage message = session.createTextMessage("Hello");
-        producer.send(message);
-
-        Message message2 = consumer.receive(1000);
-        assertNotNull(message2);
-        assertTrue("Expected message to be a TextMessage", message2 instanceof TextMessage);
-        assertTrue("Expected message to be a '" + message.getText() + "'", ((TextMessage)message2).getText().equals(message.getText()));
-    }
-
-    /**
-     * Make sure that a temp queue does not drop message if there are no active
-     * consumers.
-     * 
-     * @throws JMSException
-     */
-    public void testTempQueueHoldsMessagesWithoutConsumers() throws JMSException {
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createTemporaryQueue();
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        TextMessage message = session.createTextMessage("Hello");
-        producer.send(message);
-
-        connection.start();
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message message2 = consumer.receive(3000);
-        assertNotNull(message2);
-        assertTrue("Expected message to be a TextMessage", message2 instanceof TextMessage);
-        assertTrue("Expected message to be a '" + message.getText() + "'", ((TextMessage)message2).getText().equals(message.getText()));
-
-    }
-
-    /**
-     * Test temp queue works under load
-     * 
-     * @throws JMSException
-     */
-    public void testTmpQueueWorksUnderLoad() throws JMSException {
-        int count = 500;
-        int dataSize = 1024;
-
-        ArrayList list = new ArrayList(count);
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createTemporaryQueue();
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-        byte[] data = new byte[dataSize];
-        for (int i = 0; i < count; i++) {
-            BytesMessage message = session.createBytesMessage();
-            message.writeBytes(data);
-            message.setIntProperty("c", i);
-            producer.send(message);
-            list.add(message);
-        }
-
-        connection.start();
-        MessageConsumer consumer = session.createConsumer(queue);
-        for (int i = 0; i < count; i++) {
-            Message message2 = consumer.receive(2000);
-            assertTrue(message2 != null);
-            assertEquals(i, message2.getIntProperty("c"));
-            assertTrue(message2.equals(list.get(i)));
-        }
-    }
-
-    /**
-     * Make sure you cannot publish to a temp destination that does not exist
-     * anymore.
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     * @throws URISyntaxException 
-     */
-    public void testPublishFailsForClosedConnection() throws JMSException, InterruptedException, URISyntaxException {
-        
-        Connection tempConnection = factory.createConnection();
-        connections.add(tempConnection);
-        Session tempSession = tempConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = tempSession.createTemporaryQueue();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        connection.start();
-
-        // This message delivery should work since the temp connection is still
-        // open.
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        TextMessage message = session.createTextMessage("First");
-        producer.send(message);
-
-        // Closing the connection should destroy the temp queue that was
-        // created.
-        tempConnection.close();
-        Thread.sleep(5000); // Wait a little bit to let the delete take effect.
-
-        // This message delivery NOT should work since the temp connection is
-        // now closed.
-        try {
-            message = session.createTextMessage("Hello");
-            producer.send(message);
-            fail("Send should fail since temp destination should not exist anymore.");
-        } catch (JMSException e) {
-        }
-    }
-
-    /**
-     * Make sure you cannot publish to a temp destination that does not exist
-     * anymore.
-     * 
-     * @throws JMSException
-     * @throws InterruptedException
-     */
-    public void testPublishFailsForDestoryedTempDestination() throws JMSException, InterruptedException {
-
-        Connection tempConnection = factory.createConnection();
-        connections.add(tempConnection);
-        Session tempSession = tempConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = tempSession.createTemporaryQueue();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        connection.start();
-
-        // This message delivery should work since the temp connection is still
-        // open.
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        TextMessage message = session.createTextMessage("First");
-        producer.send(message);
-
-        // deleting the Queue will cause sends to fail
-        queue.delete();
-        Thread.sleep(5000); // Wait a little bit to let the delete take effect.
-
-        // This message delivery NOT should work since the temp connection is
-        // now closed.
-        try {
-            message = session.createTextMessage("Hello");
-            producer.send(message);
-            fail("Send should fail since temp destination should not exist anymore.");
-        } catch (JMSException e) {
-            assertTrue("failed to throw an exception", true);
-        }
-    }
-
-    /**
-     * Test you can't delete a Destination with Active Subscribers
-     * 
-     * @throws JMSException
-     */
-    public void testDeleteDestinationWithSubscribersFails() throws JMSException {
-        Connection connection = factory.createConnection();
-        connections.add(connection);
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = session.createTemporaryQueue();
-
-        connection.start();
-
-        session.createConsumer(queue);
-
-        // This message delivery should NOT work since the temp connection is
-        // now closed.
-        try {
-            queue.delete();
-            fail("Should fail as Subscribers are active");
-        } catch (JMSException e) {
-            assertTrue("failed to throw an exception", true);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTestSupport.java
deleted file mode 100755
index 8c24ad0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTestSupport.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * Test cases used to test the JMS message consumer.
- * 
- * 
- */
-public class JmsTestSupport extends CombinationTestSupport {
-
-    static final private AtomicLong TEST_COUNTER = new AtomicLong();
-    public String userName;
-    public String password;
-    public String messageTextPrefix = "";
-
-    protected ConnectionFactory factory;
-    protected ActiveMQConnection connection;
-    protected BrokerService broker;
-
-    protected List<Connection> connections = Collections.synchronizedList(new ArrayList<Connection>());
-
-    // /////////////////////////////////////////////////////////////////
-    //
-    // Test support methods.
-    //
-    // /////////////////////////////////////////////////////////////////
-    protected ActiveMQDestination createDestination(Session session, byte type) throws JMSException {
-        String testMethod = getName();
-        if( testMethod.indexOf(" ")>0 ) {
-            testMethod = testMethod.substring(0, testMethod.indexOf(" "));
-        }
-        String name = "TEST." + getClass().getName() + "." +testMethod+"."+TEST_COUNTER.getAndIncrement();
-        switch (type) {
-        case ActiveMQDestination.QUEUE_TYPE:
-            return (ActiveMQDestination)session.createQueue(name);
-        case ActiveMQDestination.TOPIC_TYPE:
-            return (ActiveMQDestination)session.createTopic(name);
-        case ActiveMQDestination.TEMP_QUEUE_TYPE:
-            return (ActiveMQDestination)session.createTemporaryQueue();
-        case ActiveMQDestination.TEMP_TOPIC_TYPE:
-            return (ActiveMQDestination)session.createTemporaryTopic();
-        default:
-            throw new IllegalArgumentException("type: " + type);
-        }
-    }
-
-    protected void sendMessages(Destination destination, int count) throws Exception {
-        ConnectionFactory factory = createConnectionFactory();
-        Connection connection = factory.createConnection();
-        connection.start();
-        sendMessages(connection, destination, count);
-        connection.close();
-    }
-
-    protected void sendMessages(Connection connection, Destination destination, int count) throws JMSException {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        sendMessages(session, destination, count);
-        session.close();
-    }
-
-    protected void sendMessages(Session session, Destination destination, int count) throws JMSException {
-        MessageProducer producer = session.createProducer(destination);
-        for (int i = 0; i < count; i++) {
-            producer.send(session.createTextMessage(messageTextPrefix  + i));
-        }
-        producer.close();
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost");
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false"));
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        if (System.getProperty("basedir") == null) {
-            File file = new File(".");
-            System.setProperty("basedir", file.getAbsolutePath());
-        }
-
-        broker = createBroker();
-        broker.start();
-        factory = createConnectionFactory();
-        connection = (ActiveMQConnection)factory.createConnection(userName, password);
-        connections.add(connection);
-    }
-
-    protected void tearDown() throws Exception {
-        for (Iterator iter = connections.iterator(); iter.hasNext();) {
-            Connection conn = (Connection)iter.next();
-            try {
-                conn.close();
-            } catch (Throwable e) {
-            }
-            iter.remove();
-        }
-        broker.stop();
-        super.tearDown();
-    }
-
-    protected void safeClose(Connection c) {
-        try {
-            c.close();
-        } catch (Throwable e) {
-        }
-    }
-
-    protected void safeClose(Session s) {
-        try {
-            s.close();
-        } catch (Throwable e) {
-        }
-    }
-
-    protected void safeClose(MessageConsumer c) {
-        try {
-            c.close();
-        } catch (Throwable e) {
-        }
-    }
-
-    protected void safeClose(MessageProducer p) {
-        try {
-            p.close();
-        } catch (Throwable e) {
-        }
-    }
-
-    protected void profilerPause(String prompt) throws IOException {
-        if (System.getProperty("profiler") != null) {
-            pause(prompt);
-        }
-    }
-
-    protected void pause(String prompt) throws IOException {
-        System.out.println();
-        System.out.println(prompt + "> Press enter to continue: ");
-        while (System.in.read() != '\n') {
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java
deleted file mode 100755
index a948ffa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.Topic;
-
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-
-
-/**
- * 
- */
-public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest {
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(JmsTopicCompositeSendReceiveTest.class);
-    
-    Destination consumerDestination2;
-    MessageConsumer consumer2;
-
-    /**
-     * Sets a test to have a queue destination and non-persistent delivery mode.
-     *
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        super.setUp();
-        consumerDestination2 = consumeSession.createTopic("FOO.BAR.HUMBUG2");
-        LOG.info("Created  consumer destination: " + consumerDestination2 + " of type: " + consumerDestination2.getClass());
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            consumer2 = consumeSession.createDurableSubscriber((Topic) consumerDestination2, getName());
-        } else {
-            consumer2 = consumeSession.createConsumer(consumerDestination2);
-        }
-
-    }
-
-    /**
-     * Returns the consumer subject.
-     *
-     * @return String - consumer subject
-     * @see org.apache.activemq.test.TestSupport#getConsumerSubject()
-     */
-    protected String getConsumerSubject() {
-        return "FOO.BAR.HUMBUG";
-    }
-
-    /**
-     * Returns the producer subject.
-     *
-     * @return String - producer subject
-     * @see org.apache.activemq.test.TestSupport#getProducerSubject()
-     */
-    protected String getProducerSubject() {
-        return "FOO.BAR.HUMBUG,FOO.BAR.HUMBUG2";
-    }
-
-    /**
-     * Test if all the messages sent are being received.
-     *
-     * @throws Exception
-     */
-    public void testSendReceive() throws Exception {
-        super.testSendReceive();
-        messages.clear();
-        consumer2.setMessageListener(this);
-        assertMessagesAreReceived();
-        LOG.info("" + data.length + " messages(s) received, closing down connections");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java
deleted file mode 100755
index 188e4cd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsTopicRedeliverTest extends TestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicRedeliverTest.class);
-
-    protected Connection connection;
-    protected Session session;
-    protected Session consumeSession;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected Destination consumerDestination;
-    protected Destination producerDestination;
-    protected boolean topic = true;
-    protected boolean durable;
-    protected boolean verbose;
-    protected long initRedeliveryDelay;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connectionFactory = createConnectionFactory();
-        connection = createConnection();
-        initRedeliveryDelay = ((ActiveMQConnection)connection).getRedeliveryPolicy().getInitialRedeliveryDelay();
-
-        if (durable) {
-            connection.setClientID(getClass().getName());
-        }
-
-        LOG.info("Created connection: " + connection);
-
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        consumeSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        LOG.info("Created session: " + session);
-        LOG.info("Created consumeSession: " + consumeSession);
-        producer = session.createProducer(null);
-        // producer.setDeliveryMode(deliveryMode);
-
-        LOG.info("Created producer: " + producer);
-
-        if (topic) {
-            consumerDestination = session.createTopic(getConsumerSubject());
-            producerDestination = session.createTopic(getProducerSubject());
-        } else {
-            consumerDestination = session.createQueue(getConsumerSubject());
-            producerDestination = session.createQueue(getProducerSubject());
-        }
-
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
-        consumer = createConsumer();
-        connection.start();
-
-        LOG.info("Created connection: " + connection);
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    /**
-     * Returns the consumer subject.
-     * 
-     * @return String - consumer subject
-     * @see org.apache.activemq.test.TestSupport#getConsumerSubject()
-     */
-    protected String getConsumerSubject() {
-        return "TEST";
-    }
-
-    /**
-     * Returns the producer subject.
-     * 
-     * @return String - producer subject
-     * @see org.apache.activemq.test.TestSupport#getProducerSubject()
-     */
-    protected String getProducerSubject() {
-        return "TEST";
-    }
-
-    /**
-     * Sends and consumes the messages.
-     * 
-     * @throws Exception
-     */
-    public void testRecover() throws Exception {
-        String text = "TEST";
-        Message sendMessage = session.createTextMessage(text);
-
-        if (verbose) {
-            LOG.info("About to send a message: " + sendMessage + " with text: " + text);
-        }
-        producer.send(producerDestination, sendMessage);
-
-        // receive but don't acknowledge
-        Message unackMessage = consumer.receive(initRedeliveryDelay + 1000);
-        assertNotNull(unackMessage);
-        String unackId = unackMessage.getJMSMessageID();
-        assertEquals(((TextMessage)unackMessage).getText(), text);
-        assertFalse(unackMessage.getJMSRedelivered());
-        // assertEquals(unackMessage.getIntProperty("JMSXDeliveryCount"),1);
-
-        // receive then acknowledge
-        consumeSession.recover();
-        Message ackMessage = consumer.receive(initRedeliveryDelay + 1000);
-        assertNotNull(ackMessage);
-        ackMessage.acknowledge();
-        String ackId = ackMessage.getJMSMessageID();
-        assertEquals(((TextMessage)ackMessage).getText(), text);
-        assertTrue(ackMessage.getJMSRedelivered());
-        // assertEquals(ackMessage.getIntProperty("JMSXDeliveryCount"),2);
-        assertEquals(unackId, ackId);
-        consumeSession.recover();
-        assertNull(consumer.receiveNoWait());
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            return consumeSession.createDurableSubscriber((Topic)consumerDestination, getName());
-        }
-        return consumeSession.createConsumer(consumerDestination);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
deleted file mode 100755
index f5d1d2c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- * 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;
-
-import java.util.List;
-import java.util.Vector;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.test.TestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsTopicRequestReplyTest extends TestSupport implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicRequestReplyTest.class);
-
-    protected boolean useAsyncConsume;
-    private Connection serverConnection;
-    private Connection clientConnection;
-    private MessageProducer replyProducer;
-    private Session serverSession;
-    private Destination requestDestination;
-    private List<JMSException> failures = new Vector<JMSException>();
-    private boolean dynamicallyCreateProducer;
-    private String clientSideClientID;
-
-    public void testSendAndReceive() throws Exception {
-        clientConnection = createConnection();
-        clientConnection.setClientID("ClientConnection:" + getSubject());
-
-        Session session = clientConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        clientConnection.start();
-
-        Destination replyDestination = createTemporaryDestination(session);
-
-        // lets test the destination
-        clientSideClientID = clientConnection.getClientID();
-
-        // TODO
-        // String value = ActiveMQDestination.getClientId((ActiveMQDestination)
-        // replyDestination);
-        // assertEquals("clientID from the temporary destination must be the
-        // same", clientSideClientID, value);
-        LOG.info("Both the clientID and destination clientID match properly: " + clientSideClientID);
-
-        /* build queues */
-        MessageProducer requestProducer = session.createProducer(requestDestination);
-        MessageConsumer replyConsumer = session.createConsumer(replyDestination);
-
-        /* build requestmessage */
-        TextMessage requestMessage = session.createTextMessage("Olivier");
-        requestMessage.setJMSReplyTo(replyDestination);
-        requestProducer.send(requestMessage);
-
-        LOG.info("Sent request.");
-        LOG.info(requestMessage.toString());
-
-        Message msg = replyConsumer.receive(5000);
-
-        if (msg instanceof TextMessage) {
-            TextMessage replyMessage = (TextMessage)msg;
-            LOG.info("Received reply.");
-            LOG.info(replyMessage.toString());
-            assertEquals("Wrong message content", "Hello: Olivier", replyMessage.getText());
-        } else {
-            fail("Should have received a reply by now");
-        }
-        replyConsumer.close();
-        deleteTemporaryDestination(replyDestination);
-
-        assertEquals("Should not have had any failures: " + failures, 0, failures.size());
-    }
-
-    public void testSendAndReceiveWithDynamicallyCreatedProducer() throws Exception {
-        dynamicallyCreateProducer = true;
-        testSendAndReceive();
-    }
-
-    /**
-     * Use the asynchronous subscription mechanism
-     */
-    public void onMessage(Message message) {
-        try {
-            TextMessage requestMessage = (TextMessage)message;
-
-            LOG.info("Received request.");
-            LOG.info(requestMessage.toString());
-
-            Destination replyDestination = requestMessage.getJMSReplyTo();
-
-            // TODO
-            // String value =
-            // ActiveMQDestination.getClientId((ActiveMQDestination)
-            // replyDestination);
-            // assertEquals("clientID from the temporary destination must be the
-            // same", clientSideClientID, value);
-
-            TextMessage replyMessage = serverSession.createTextMessage("Hello: " + requestMessage.getText());
-
-            replyMessage.setJMSCorrelationID(requestMessage.getJMSMessageID());
-
-            if (dynamicallyCreateProducer) {
-                replyProducer = serverSession.createProducer(replyDestination);
-                replyProducer.send(replyMessage);
-            } else {
-                replyProducer.send(replyDestination, replyMessage);
-            }
-
-            LOG.info("Sent reply.");
-            LOG.info(replyMessage.toString());
-        } catch (JMSException e) {
-            onException(e);
-        }
-    }
-
-    /**
-     * Use the synchronous subscription mechanism
-     */
-    protected void syncConsumeLoop(MessageConsumer requestConsumer) {
-        try {
-            Message message = requestConsumer.receive(5000);
-            if (message != null) {
-                onMessage(message);
-            } else {
-                LOG.error("No message received");
-            }
-        } catch (JMSException e) {
-            onException(e);
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        serverConnection = createConnection();
-        serverConnection.setClientID("serverConnection:" + getSubject());
-        serverSession = serverConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        replyProducer = serverSession.createProducer(null);
-
-        requestDestination = createDestination(serverSession);
-
-        /* build queues */
-        final MessageConsumer requestConsumer = serverSession.createConsumer(requestDestination);
-        if (useAsyncConsume) {
-            requestConsumer.setMessageListener(this);
-        } else {
-            Thread thread = new Thread(new Runnable() {
-                public void run() {
-                    syncConsumeLoop(requestConsumer);
-                }
-            });
-            thread.start();
-        }
-        serverConnection.start();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        serverConnection.close();
-        clientConnection.stop();
-        clientConnection.close();
-    }
-
-    protected void onException(JMSException e) {
-        LOG.info("Caught: " + e);
-        e.printStackTrace();
-        failures.add(e);
-    }
-
-    protected Destination createDestination(Session session) throws JMSException {
-        if (topic) {
-            return session.createTopic(getSubject());
-        }
-        return session.createQueue(getSubject());
-    }
-
-    protected Destination createTemporaryDestination(Session session) throws JMSException {
-        if (topic) {
-            return session.createTemporaryTopic();
-        }
-        return session.createTemporaryQueue();
-    }
-    
-    protected void deleteTemporaryDestination(Destination dest) throws JMSException {
-        if (topic) {
-            ((TemporaryTopic)dest).delete();
-        } else {
-            ((TemporaryQueue)dest).delete();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java
deleted file mode 100755
index cfb7daa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsTopicSelectorTest extends TestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSelectorTest.class);
-
-    protected Connection connection;
-    protected Session session;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected Destination consumerDestination;
-    protected Destination producerDestination;
-    protected boolean topic = true;
-    protected boolean durable;
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-
-    public void setUp() throws Exception {
-        super.setUp();
-
-        connectionFactory = createConnectionFactory();
-        connection = createConnection();
-        if (durable) {
-            connection.setClientID(getClass().getName());
-        }
-
-        LOG.info("Created connection: " + connection);
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        LOG.info("Created session: " + session);
-
-        if (topic) {
-            consumerDestination = session.createTopic(getConsumerSubject());
-            producerDestination = session.createTopic(getProducerSubject());
-        } else {
-            consumerDestination = session.createQueue(getConsumerSubject());
-            producerDestination = session.createQueue(getProducerSubject());
-        }
-
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
-        producer = session.createProducer(producerDestination);
-        producer.setDeliveryMode(deliveryMode);
-
-        LOG.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
-        connection.start();
-    }
-
-    public void tearDown() throws Exception {
-        session.close();
-        connection.close();
-    }
-
-    protected MessageConsumer createConsumer(String selector) throws JMSException {
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            return session.createDurableSubscriber((Topic)consumerDestination, getName(), selector, false);
-        }
-        return session.createConsumer(consumerDestination, selector);
-    }
-
-    public void sendMessages() throws Exception {
-        TextMessage message = session.createTextMessage("1");
-        message.setIntProperty("id", 1);
-        message.setJMSType("a");
-        message.setStringProperty("stringProperty", "a");
-        message.setLongProperty("longProperty", 1);
-        message.setBooleanProperty("booleanProperty", true);
-        producer.send(message);
-
-        message = session.createTextMessage("2");
-        message.setIntProperty("id", 2);
-        message.setJMSType("a");
-        message.setStringProperty("stringProperty", "a");
-        message.setLongProperty("longProperty", 1);
-        message.setBooleanProperty("booleanProperty", false);
-        producer.send(message);
-
-        message = session.createTextMessage("3");
-        message.setIntProperty("id", 3);
-        message.setJMSType("a");
-        message.setStringProperty("stringProperty", "a");
-        message.setLongProperty("longProperty", 1);
-        message.setBooleanProperty("booleanProperty", true);
-        producer.send(message);
-
-        message = session.createTextMessage("4");
-        message.setIntProperty("id", 4);
-        message.setJMSType("b");
-        message.setStringProperty("stringProperty", "b");
-        message.setLongProperty("longProperty", 2);
-        message.setBooleanProperty("booleanProperty", false);
-        producer.send(message);
-
-        message = session.createTextMessage("5");
-        message.setIntProperty("id", 5);
-        message.setJMSType("c");
-        message.setStringProperty("stringProperty", "c");
-        message.setLongProperty("longProperty", 3);
-        message.setBooleanProperty("booleanProperty", true);
-        producer.send(message);
-    }
-
-    public void consumeMessages(int remaining) throws Exception {
-        consumer = createConsumer(null);
-        for (int i = 0; i < remaining; i++) {
-            consumer.receive(1000);
-        }
-        consumer.close();
-
-    }
-
-    public void testPropertySelector() throws Exception {
-        int remaining = 5;
-        Message message = null;
-        consumer = createConsumer("stringProperty = 'a' and longProperty = 1 and booleanProperty = true");
-        sendMessages();
-        while (true) {
-            message = consumer.receive(1000);
-            if (message == null) {
-                break;
-            }
-            String text = ((TextMessage)message).getText();
-            if (!text.equals("1") && !text.equals("3")) {
-                fail("unexpected message: " + text);
-            }
-            remaining--;
-        }
-        assertEquals(remaining, 3);
-        consumer.close();
-        consumeMessages(remaining);
-
-    }
-
-    public void testJMSPropertySelector() throws Exception {
-        int remaining = 5;
-        Message message = null;
-        consumer = createConsumer("JMSType = 'a' and stringProperty = 'a'");
-        sendMessages();
-        while (true) {
-            message = consumer.receive(1000);
-            if (message == null) {
-                break;
-            }
-            String text = ((TextMessage)message).getText();
-            if (!text.equals("1") && !text.equals("2") && !text.equals("3")) {
-                fail("unexpected message: " + text);
-            }
-            remaining--;
-        }
-        assertEquals(remaining, 2);
-        consumer.close();
-        consumeMessages(remaining);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java
deleted file mode 100755
index 7cb09ea..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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;
-
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Topic;
-import javax.jms.TopicSession;
-
-/**
- * 
- */
-public class JmsTopicSendReceiveSubscriberTest extends JmsTopicSendReceiveTest {
-    protected MessageConsumer createConsumer() throws JMSException {
-        if (durable) {
-            return super.createConsumer();
-        } else {
-            TopicSession topicSession = (TopicSession)session;
-            return topicSession.createSubscriber((Topic)consumerDestination, null, false);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java
deleted file mode 100755
index fd91ec4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveTest.class);
-
-    protected Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connectionFactory = createConnectionFactory();
-        connection = createConnection();
-        if (durable) {
-            connection.setClientID(getClass().getName());
-        }
-
-        LOG.info("Created connection: " + connection);
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        LOG.info("Created session: " + session);
-        producer = session.createProducer(null);
-        producer.setDeliveryMode(deliveryMode);
-
-        LOG.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
-
-        if (topic) {
-            consumerDestination = session.createTopic(getConsumerSubject());
-            producerDestination = session.createTopic(getProducerSubject());
-        } else {
-            consumerDestination = session.createQueue(getConsumerSubject());
-            producerDestination = session.createQueue(getProducerSubject());
-        }
-
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
-        consumer = createConsumer();
-        consumer.setMessageListener(this);
-        connection.start();
-
-        // log.info("Created connection: " + connection);
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            return session.createDurableSubscriber((Topic)consumerDestination, getName());
-        }
-        return session.createConsumer(consumerDestination);
-    }
-
-    protected void tearDown() throws Exception {
-        LOG.info("Dumping stats...");
-        // connectionFactory.getStats().reset();
-
-        LOG.info("Closing down connection");
-
-        /** TODO we should be able to shut down properly */
-        session.close();
-        connection.close();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java
deleted file mode 100755
index b56c15d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-/**
- * @version
- */
-public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTestSupport {
-
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-        .getLog(JmsTopicSendReceiveWithTwoConnectionsTest.class);
-
-    protected Connection sendConnection;
-    protected Connection receiveConnection;
-    protected Session receiveSession;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connectionFactory = createConnectionFactory();
-
-        sendConnection = createSendConnection();
-        sendConnection.start();
-
-        receiveConnection = createReceiveConnection();
-        receiveConnection.start();
-
-        LOG.info("Created sendConnection: " + sendConnection);
-        LOG.info("Created receiveConnection: " + receiveConnection);
-
-        session = createSendSession(sendConnection);
-        receiveSession = createReceiveSession(receiveConnection);
-
-        LOG.info("Created sendSession: " + session);
-        LOG.info("Created receiveSession: " + receiveSession);
-
-        producer = session.createProducer(null);
-        producer.setDeliveryMode(deliveryMode);
-
-        LOG.info("Created producer: " + producer + " delivery mode = "
-                 + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
-
-        if (topic) {
-            consumerDestination = session.createTopic(getConsumerSubject());
-            producerDestination = session.createTopic(getProducerSubject());
-        } else {
-            consumerDestination = session.createQueue(getConsumerSubject());
-            producerDestination = session.createQueue(getProducerSubject());
-        }
-
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: "
-                 + consumerDestination.getClass());
-        LOG.info("Created  producer destination: " + producerDestination + " of type: "
-                 + producerDestination.getClass());
-
-        consumer = createConsumer(receiveSession, consumerDestination);
-        consumer.setMessageListener(this);
-
-        LOG.info("Started connections");
-    }
-
-    protected Session createReceiveSession(Connection receiveConnection) throws Exception {
-        return receiveConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    protected Session createSendSession(Connection sendConnection) throws Exception {
-        return sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    protected Connection createReceiveConnection() throws Exception {
-        return createConnection();
-    }
-
-    protected Connection createSendConnection() throws Exception {
-        return createConnection();
-    }
-
-    protected MessageConsumer createConsumer(Session session, Destination dest) throws JMSException {
-        return session.createConsumer(dest);
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-    }
-
-    protected void tearDown() throws Exception {
-        session.close();
-        receiveSession.close();
-        sendConnection.close();
-        receiveConnection.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java
deleted file mode 100644
index da2c80c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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;
-
-/**
- * 
- * 
- */
-public class JmsTopicSendReceiveWithTwoConnectionsWithJMXTest extends
-    JmsTopicSendReceiveWithTwoConnectionsTest {
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=true");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java
deleted file mode 100755
index 9a92e49..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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;
-
-import javax.jms.TextMessage;
-
-/**
- * 
- */
-public class JmsTopicSendSameMessageTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-        .getLog(JmsTopicSendSameMessageTest.class);
-
-    public void testSendReceive() throws Exception {
-        messages.clear();
-
-        TextMessage message = session.createTextMessage();
-
-        for (int i = 0; i < data.length; i++) {
-            message.setText(data[i]);
-            message.setStringProperty("stringProperty", data[i]);
-            message.setIntProperty("intProperty", i);
-
-            if (verbose) {
-                LOG.info("About to send a message: " + message + " with text: " + data[i]);
-            }
-
-            producer.send(producerDestination, message);
-        }
-
-        assertMessagesAreReceived();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java
deleted file mode 100755
index cf5cdc0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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;
-
-import org.apache.activemq.test.JmsResourceProvider;
-
-
-/**
- * 
- */
-public class JmsTopicTransactionTest extends JmsTransactionTestSupport {
-
-    /**
-     * @see org.apache.activemq.JmsTransactionTestSupport#getJmsResourceProvider()
-     */
-    protected JmsResourceProvider getJmsResourceProvider() {
-        JmsResourceProvider p = new JmsResourceProvider();
-        p.setTopic(true);
-        p.setDurableName("testsub");
-        p.setClientID("testclient");
-        return p;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java
deleted file mode 100755
index 7239fb3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-
-/**
- * 
- */
-public class JmsTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest {
-
-    private String destination1String = "TEST.ONE.ONE";
-    private String destination2String = "TEST.ONE.ONE.ONE";
-    private String destination3String = "TEST.ONE.TWO";
-    private String destination4String = "TEST.TWO.ONE";
-
-    protected void setUp() throws Exception {
-        topic = true;
-        durable = false;
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        super.setUp();
-    }
-
-    protected String getConsumerSubject() {
-        return "FOO.>";
-    }
-
-    protected String getProducerSubject() {
-        return "FOO.BAR.HUMBUG";
-    }
-
-    public void testReceiveWildcardTopicEndAsterisk() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQDestination destination1 = (ActiveMQDestination)session.createTopic(destination1String);
-        ActiveMQDestination destination3 = (ActiveMQDestination)session.createTopic(destination3String);
-
-        Message m = null;
-        MessageConsumer consumer = null;
-        String text = null;
-
-        ActiveMQDestination destination6 = (ActiveMQDestination)session.createTopic("TEST.ONE.*");
-        consumer = session.createConsumer(destination6);
-        sendMessage(session, destination1, destination1String);
-        sendMessage(session, destination3, destination3String);
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testReceiveWildcardTopicEndGreaterThan() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQDestination destination1 = (ActiveMQDestination)session.createTopic(destination1String);
-        ActiveMQDestination destination2 = (ActiveMQDestination)session.createTopic(destination2String);
-        ActiveMQDestination destination3 = (ActiveMQDestination)session.createTopic(destination3String);
-
-        Message m = null;
-        MessageConsumer consumer = null;
-        String text = null;
-
-        ActiveMQDestination destination7 = (ActiveMQDestination)session.createTopic("TEST.ONE.>");
-        consumer = session.createConsumer(destination7);
-        sendMessage(session, destination1, destination1String);
-        sendMessage(session, destination2, destination2String);
-        sendMessage(session, destination3, destination3String);
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination2String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        if (!(text.equals(destination1String) || text.equals(destination2String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        if (!(text.equals(destination1String) || text.equals(destination2String) || text.equals(destination3String))) {
-            fail("unexpected message:" + text);
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-
-    public void testReceiveWildcardTopicMidAsterisk() throws Exception {
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQDestination destination1 = (ActiveMQDestination)session.createTopic(destination1String);
-        ActiveMQDestination destination4 = (ActiveMQDestination)session.createTopic(destination4String);
-
-        Message m = null;
-        MessageConsumer consumer = null;
-        String text = null;
-
-        ActiveMQDestination destination8 = (ActiveMQDestination)session.createTopic("TEST.*.ONE");
-        consumer = session.createConsumer(destination8);
-        sendMessage(session, destination1, destination1String);
-        sendMessage(session, destination4, destination4String);
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination4String))) {
-            fail("unexpected message:" + text);
-        }
-        m = consumer.receive(1000);
-        assertNotNull(m);
-        text = ((TextMessage)m).getText();
-        if (!(text.equals(destination1String) || text.equals(destination4String))) {
-            fail("unexpected message:" + text);
-        }
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    private void sendMessage(Session session, Destination destination, String text) throws JMSException {
-        MessageProducer producer = session.createProducer(destination);
-        producer.send(session.createTextMessage(text));
-        producer.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
deleted file mode 100755
index 013ecff..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
+++ /dev/null
@@ -1,710 +0,0 @@
-/**
- * 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;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.test.JmsResourceProvider;
-import org.apache.activemq.test.TestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public abstract class JmsTransactionTestSupport extends TestSupport implements MessageListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTransactionTestSupport.class);
-    private static final int MESSAGE_COUNT = 5;
-    private static final String MESSAGE_TEXT = "message";
-
-    protected ConnectionFactory connectionFactory;
-    protected Connection connection;
-    protected Session session;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected JmsResourceProvider resourceProvider;
-    protected Destination destination;
-    protected int batchCount = 10;
-    protected int batchSize = 20;
-    protected BrokerService broker;
-
-    // for message listener test
-    private List<Message> unackMessages = new ArrayList<Message>(MESSAGE_COUNT);
-    private List<Message> ackMessages = new ArrayList<Message>(MESSAGE_COUNT);
-    private boolean resendPhase;
-
-    public JmsTransactionTestSupport() {
-        super();
-    }
-
-    public JmsTransactionTestSupport(String name) {
-        super(name);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        broker = createBroker();
-        broker.start();
-        broker.waitUntilStarted();
-
-        resourceProvider = getJmsResourceProvider();
-        topic = resourceProvider.isTopic();
-        // We will be using transacted sessions.
-        setSessionTransacted();
-        connectionFactory = newConnectionFactory();
-        reconnect();
-    }
-
-    protected void setSessionTransacted() {
-        resourceProvider.setTransacted(true);
-    }
-
-    protected ConnectionFactory newConnectionFactory() throws Exception {
-        return resourceProvider.createConnectionFactory();
-    }
-
-    protected void beginTx() throws Exception {
-        //no-op for local tx
-    }
-
-    protected void commitTx() throws Exception {
-        session.commit();
-    }
-
-    protected void rollbackTx() throws Exception {
-        session.rollback();
-    }
-
-    /**
-     */
-    protected BrokerService createBroker() throws Exception, URISyntaxException {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false"));
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        LOG.info("Closing down connection");
-
-        session.close();
-        session = null;
-        connection.close();
-        connection = null;
-        broker.stop();
-        broker.waitUntilStopped();
-        broker = null;
-
-        LOG.info("Connection closed.");
-    }
-
-    protected abstract JmsResourceProvider getJmsResourceProvider();
-
-    /**
-     * Sends a batch of messages and validates that the messages are received.
-     * 
-     * @throws Exception
-     */
-    public void testSendReceiveTransactedBatches() throws Exception {
-
-        TextMessage message = session.createTextMessage("Batch Message");
-        for (int j = 0; j < batchCount; j++) {
-            LOG.info("Producing bacth " + j + " of " + batchSize + " messages");
-
-            beginTx();
-            for (int i = 0; i < batchSize; i++) {
-                producer.send(message);
-            }
-            messageSent();
-            commitTx();
-            LOG.info("Consuming bacth " + j + " of " + batchSize + " messages");
-
-            beginTx();
-            for (int i = 0; i < batchSize; i++) {
-                message = (TextMessage)consumer.receive(1000 * 5);
-                assertNotNull("Received only " + i + " messages in batch " + j, message);
-                assertEquals("Batch Message", message.getText());
-            }
-
-            commitTx();
-        }
-    }
-
-    protected void messageSent() throws Exception {
-    }
-
-    /**
-     * Sends a batch of messages and validates that the rollbacked message was
-     * not consumed.
-     * 
-     * @throws Exception
-     */
-    public void testSendRollback() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message")};
-
-        // sends a message
-        beginTx();
-        producer.send(outbound[0]);
-        commitTx();
-
-        // sends a message that gets rollbacked
-        beginTx();
-        producer.send(session.createTextMessage("I'm going to get rolled back."));
-        rollbackTx();
-
-        // sends a message
-        beginTx();
-        producer.send(outbound[1]);
-        commitTx();
-
-        // receives the first message
-        beginTx();
-        ArrayList<Message> messages = new ArrayList<Message>();
-        LOG.info("About to consume message 1");
-        Message message = consumer.receive(1000);
-        messages.add(message);
-        LOG.info("Received: " + message);
-
-        // receives the second message
-        LOG.info("About to consume message 2");
-        message = consumer.receive(4000);
-        messages.add(message);
-        LOG.info("Received: " + message);
-
-        // validates that the rollbacked was not consumed
-        commitTx();
-        Message inbound[] = new Message[messages.size()];
-        messages.toArray(inbound);
-        assertTextMessagesEqual("Rollback did not work.", outbound, inbound);
-    }
-
-    /**
-     * spec section 3.6 acking a message with automation acks has no effect.
-     * @throws Exception
-     */
-    public void testAckMessageInTx() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message")};
-
-        // sends a message
-        beginTx();
-        producer.send(outbound[0]);
-        outbound[0].acknowledge();
-        commitTx();
-        outbound[0].acknowledge();
-
-        // receives the first message
-        beginTx();
-        ArrayList<Message> messages = new ArrayList<Message>();
-        LOG.info("About to consume message 1");
-        Message message = consumer.receive(1000);
-        messages.add(message);
-        LOG.info("Received: " + message);
-
-        // validates that the rollbacked was not consumed
-        commitTx();
-        Message inbound[] = new Message[messages.size()];
-        messages.toArray(inbound);
-        assertTextMessagesEqual("Message not delivered.", outbound, inbound);
-    }
-
-    /**
-     * Sends a batch of messages and validates that the message sent before
-     * session close is not consumed.
-     *
-     * This test only works with local transactions, not xa.
-     * @throws Exception
-     */
-    public void testSendSessionClose() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message")};
-
-        // sends a message
-        beginTx();
-        producer.send(outbound[0]);
-        commitTx();
-
-        // sends a message that gets rollbacked
-        beginTx();
-        producer.send(session.createTextMessage("I'm going to get rolled back."));
-        consumer.close();
-
-        reconnectSession();
-
-        // sends a message
-        producer.send(outbound[1]);
-        commitTx();
-
-        // receives the first message
-        ArrayList<Message> messages = new ArrayList<Message>();
-        LOG.info("About to consume message 1");
-        beginTx();
-        Message message = consumer.receive(1000);
-        messages.add(message);
-        LOG.info("Received: " + message);
-
-        // receives the second message
-        LOG.info("About to consume message 2");
-        message = consumer.receive(4000);
-        messages.add(message);
-        LOG.info("Received: " + message);
-
-        // validates that the rollbacked was not consumed
-        commitTx();
-        Message inbound[] = new Message[messages.size()];
-        messages.toArray(inbound);
-        assertTextMessagesEqual("Rollback did not work.", outbound, inbound);
-    }
-
-    /**
-     * Sends a batch of messages and validates that the message sent before
-     * session close is not consumed.
-     * 
-     * @throws Exception
-     */
-    public void testSendSessionAndConnectionClose() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message")};
-
-        // sends a message
-        beginTx();
-        producer.send(outbound[0]);
-        commitTx();
-
-        // sends a message that gets rollbacked
-        beginTx();
-        producer.send(session.createTextMessage("I'm going to get rolled back."));
-        consumer.close();
-        session.close();
-
-        reconnect();
-
-        // sends a message
-        beginTx();
-        producer.send(outbound[1]);
-        commitTx();
-
-        // receives the first message
-        ArrayList<Message> messages = new ArrayList<Message>();
-        LOG.info("About to consume message 1");
-        beginTx();
-        Message message = consumer.receive(1000);
-        messages.add(message);
-        LOG.info("Received: " + message);
-
-        // receives the second message
-        LOG.info("About to consume message 2");
-        message = consumer.receive(4000);
-        messages.add(message);
-        LOG.info("Received: " + message);
-
-        // validates that the rollbacked was not consumed
-        commitTx();
-        Message inbound[] = new Message[messages.size()];
-        messages.toArray(inbound);
-        assertTextMessagesEqual("Rollback did not work.", outbound, inbound);
-    }
-
-    /**
-     * Sends a batch of messages and validates that the rollbacked message was
-     * redelivered.
-     * 
-     * @throws Exception
-     */
-    public void testReceiveRollback() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message")};
-
-        // lets consume any outstanding messages from prev test runs
-        beginTx();
-            while (consumer.receive(1000) != null) {
-        }
-        commitTx();
-
-        // sent both messages
-        beginTx();
-        producer.send(outbound[0]);
-        producer.send(outbound[1]);
-        commitTx();
-
-        LOG.info("Sent 0: " + outbound[0]);
-        LOG.info("Sent 1: " + outbound[1]);
-
-        ArrayList<Message> messages = new ArrayList<Message>();
-        beginTx();
-        Message message = consumer.receive(1000);
-        messages.add(message);
-        assertEquals(outbound[0], message);
-        commitTx();
-
-        // rollback so we can get that last message again.
-        beginTx();
-        message = consumer.receive(1000);
-        assertNotNull(message);
-        assertEquals(outbound[1], message);
-        rollbackTx();
-
-        // Consume again.. the prev message should
-        // get redelivered.
-        beginTx();
-        message = consumer.receive(5000);
-        assertNotNull("Should have re-received the message again!", message);
-        messages.add(message);
-        commitTx();
-
-        Message inbound[] = new Message[messages.size()];
-        messages.toArray(inbound);
-        assertTextMessagesEqual("Rollback did not work", outbound, inbound);
-    }
-
-    /**
-     * Sends a batch of messages and validates that the rollbacked message was
-     * redelivered.
-     * 
-     * @throws Exception
-     */
-    public void testReceiveTwoThenRollback() throws Exception {
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message")};
-
-        // lets consume any outstanding messages from prev test runs
-        beginTx();
-        while (consumer.receive(1000) != null) {
-        }
-        commitTx();
-
-        //
-        beginTx();
-        producer.send(outbound[0]);
-        producer.send(outbound[1]);
-        commitTx();
-
-        LOG.info("Sent 0: " + outbound[0]);
-        LOG.info("Sent 1: " + outbound[1]);
-
-        ArrayList<Message> messages = new ArrayList<Message>();
-        beginTx();
-        Message message = consumer.receive(1000);
-        assertEquals(outbound[0], message);
-
-        message = consumer.receive(1000);
-        assertNotNull(message);
-        assertEquals(outbound[1], message);
-        rollbackTx();
-
-        // Consume again.. the prev message should
-        // get redelivered.
-        beginTx();
-        message = consumer.receive(5000);
-        assertNotNull("Should have re-received the first message again!", message);
-        messages.add(message);
-        assertEquals(outbound[0], message);
-        message = consumer.receive(5000);
-        assertNotNull("Should have re-received the second message again!", message);
-        messages.add(message);
-        assertEquals(outbound[1], message);
-
-        assertNull(consumer.receiveNoWait());
-        commitTx();
-
-        Message inbound[] = new Message[messages.size()];
-        messages.toArray(inbound);
-        assertTextMessagesEqual("Rollback did not work", outbound, inbound);
-    }
-
-    /**
-     * Sends a batch of messages and validates that the rollbacked message was
-     * not consumed.
-     * 
-     * @throws Exception
-     */
-    public void testSendReceiveWithPrefetchOne() throws Exception {
-        setPrefetchToOne();
-        Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message"), session.createTextMessage("Third Message"),
-                                            session.createTextMessage("Fourth Message")};
-
-        beginTx();
-        for (int i = 0; i < outbound.length; i++) {
-            // sends a message
-            producer.send(outbound[i]);
-        }
-        commitTx();
-
-        // receives the first message
-        beginTx();
-        for (int i = 0; i < outbound.length; i++) {
-            LOG.info("About to consume message 1");
-            Message message = consumer.receive(1000);
-            assertNotNull(message);
-            LOG.info("Received: " + message);
-        }
-
-        // validates that the rollbacked was not consumed
-        commitTx();
-    }
-
-    /**
-     * Perform the test that validates if the rollbacked message was redelivered
-     * multiple times.
-     * 
-     * @throws Exception
-     */
-    public void testReceiveTwoThenRollbackManyTimes() throws Exception {
-        for (int i = 0; i < 5; i++) {
-            testReceiveTwoThenRollback();
-        }
-    }
-
-    /**
-     * Sends a batch of messages and validates that the rollbacked message was
-     * not consumed. This test differs by setting the message prefetch to one.
-     * 
-     * @throws Exception
-     */
-    public void testSendRollbackWithPrefetchOfOne() throws Exception {
-        setPrefetchToOne();
-        testSendRollback();
-    }
-
-    /**
-     * Sends a batch of messages and and validates that the rollbacked message
-     * was redelivered. This test differs by setting the message prefetch to
-     * one.
-     * 
-     * @throws Exception
-     */
-    public void testReceiveRollbackWithPrefetchOfOne() throws Exception {
-        setPrefetchToOne();
-        testReceiveRollback();
-    }
-
-    /**
-     * Tests if the messages can still be received if the consumer is closed
-     * (session is not closed).
-     * 
-     * @throws Exception see http://jira.codehaus.org/browse/AMQ-143
-     */
-    public void testCloseConsumerBeforeCommit() throws Exception {
-        TextMessage[] outbound = new TextMessage[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message")};
-
-        // lets consume any outstanding messages from prev test runs
-        beginTx();
-        while (consumer.receiveNoWait() != null) {
-        }
-
-        commitTx();
-
-        // sends the messages
-        beginTx();
-        producer.send(outbound[0]);
-        producer.send(outbound[1]);
-        commitTx();
-        LOG.info("Sent 0: " + outbound[0]);
-        LOG.info("Sent 1: " + outbound[1]);
-
-        beginTx();
-        TextMessage message = (TextMessage)consumer.receive(1000);
-        assertEquals(outbound[0].getText(), message.getText());
-        // Close the consumer before the commit. This should not cause the
-        // received message
-        // to rollback.
-        consumer.close();
-        commitTx();
-
-        // Create a new consumer
-        consumer = resourceProvider.createConsumer(session, destination);
-        LOG.info("Created consumer: " + consumer);
-
-        beginTx();
-        message = (TextMessage)consumer.receive(1000);
-        assertEquals(outbound[1].getText(), message.getText());
-        commitTx();
-    }
-
-    public void testChangeMutableObjectInObjectMessageThenRollback() throws Exception {
-        ArrayList<String> list = new ArrayList<String>();
-        list.add("First");
-        Message outbound = session.createObjectMessage(list);
-        outbound.setStringProperty("foo", "abc");
-
-        beginTx();
-        producer.send(outbound);
-        commitTx();
-
-        LOG.info("About to consume message 1");
-        beginTx();
-        Message message = consumer.receive(5000);
-
-        List<String> body = assertReceivedObjectMessageWithListBody(message);
-
-        // now lets try mutate it
-        try {
-            message.setStringProperty("foo", "def");
-            fail("Cannot change properties of the object!");
-        } catch (JMSException e) {
-            LOG.info("Caught expected exception: " + e, e);
-        }
-        body.clear();
-        body.add("This should never be seen!");
-        rollbackTx();
-
-        beginTx();
-        message = consumer.receive(5000);
-        List<String> secondBody = assertReceivedObjectMessageWithListBody(message);
-        assertNotSame("Second call should return a different body", secondBody, body);
-        commitTx();
-    }
-
-    @SuppressWarnings("unchecked")
-    protected List<String> assertReceivedObjectMessageWithListBody(Message message) throws JMSException {
-        assertNotNull("Should have received a message!", message);
-        assertEquals("foo header", "abc", message.getStringProperty("foo"));
-
-        assertTrue("Should be an object message but was: " + message, message instanceof ObjectMessage);
-        ObjectMessage objectMessage = (ObjectMessage)message;
-        List<String> body = (List<String>)objectMessage.getObject();
-        LOG.info("Received body: " + body);
-
-        assertEquals("Size of list should be 1", 1, body.size());
-        assertEquals("element 0 of list", "First", body.get(0));
-        return body;
-    }
-
-    /**
-     * Recreates the connection.
-     * 
-     * @throws JMSException
-     */
-    protected void reconnect() throws Exception {
-
-        if (connection != null) {
-            // Close the prev connection.
-            connection.close();
-        }
-        session = null;
-        connection = resourceProvider.createConnection(connectionFactory);
-        reconnectSession();
-        connection.start();
-    }
-
-    /**
-     * Recreates the connection.
-     * 
-     * @throws JMSException
-     */
-    protected void reconnectSession() throws JMSException {
-        if (session != null) {
-            session.close();
-        }
-
-        session = resourceProvider.createSession(connection);
-        destination = resourceProvider.createDestination(session, getSubject());
-        producer = resourceProvider.createProducer(session, destination);
-        consumer = resourceProvider.createConsumer(session, destination);
-    }
-
-    /**
-     * Sets the prefeftch policy to one.
-     */
-    protected void setPrefetchToOne() {
-        ActiveMQPrefetchPolicy prefetchPolicy = getPrefetchPolicy();
-        prefetchPolicy.setQueuePrefetch(1);
-        prefetchPolicy.setTopicPrefetch(1);
-        prefetchPolicy.setDurableTopicPrefetch(1);
-        prefetchPolicy.setOptimizeDurableTopicPrefetch(1);
-    }
-
-    protected ActiveMQPrefetchPolicy getPrefetchPolicy() {
-        return ((ActiveMQConnection)connection).getPrefetchPolicy();
-    }
-
-    //This test won't work with xa tx so no beginTx() has been added.
-    public void testMessageListener() throws Exception {
-        // send messages
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            producer.send(session.createTextMessage(MESSAGE_TEXT + i));
-        }
-        commitTx();
-        consumer.setMessageListener(this);
-        // wait receive
-        waitReceiveUnack();
-        assertEquals(unackMessages.size(), MESSAGE_COUNT);
-        // resend phase
-        waitReceiveAck();
-        assertEquals(ackMessages.size(), MESSAGE_COUNT);
-        // should no longer re-receive
-        consumer.setMessageListener(null);
-        assertNull(consumer.receive(500));
-        reconnect();
-    }
-
-    public void onMessage(Message message) {
-        if (!resendPhase) {
-            unackMessages.add(message);
-            if (unackMessages.size() == MESSAGE_COUNT) {
-                try {
-                    rollbackTx();
-                    resendPhase = true;
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        } else {
-            ackMessages.add(message);
-            if (ackMessages.size() == MESSAGE_COUNT) {
-                try {
-                    commitTx();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    private void waitReceiveUnack() throws Exception {
-        for (int i = 0; i < 100 && !resendPhase; i++) {
-            Thread.sleep(100);
-        }
-        assertTrue(resendPhase);
-    }
-
-    private void waitReceiveAck() throws Exception {
-        for (int i = 0; i < 100 && ackMessages.size() < MESSAGE_COUNT; i++) {
-            Thread.sleep(100);
-        }
-        assertFalse(ackMessages.size() < MESSAGE_COUNT);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/LargeMessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/LargeMessageTestSupport.java
deleted file mode 100755
index fc77218..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/LargeMessageTestSupport.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
- * 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;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.util.IdGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class LargeMessageTestSupport extends ClientTestSupport implements MessageListener {
-
-    protected static final int LARGE_MESSAGE_SIZE = 128 * 1024;
-    protected static final int MESSAGE_COUNT = 100;
-
-    private static final Logger LOG = LoggerFactory.getLogger(LargeMessageTestSupport.class);
-
-    protected Connection producerConnection;
-    protected Connection consumerConnection;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected Session producerSession;
-    protected Session consumerSession;
-    protected byte[] largeMessageData;
-    protected Destination destination;
-    protected boolean isTopic = true;
-    protected boolean isDurable = true;
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected IdGenerator idGen = new IdGenerator();
-    protected boolean validMessageConsumption = true;
-    protected AtomicInteger messageCount = new AtomicInteger(0);
-
-    protected int prefetchValue = 10000000;
-
-    protected Destination createDestination() {
-        String subject = getClass().getName();
-        if (isTopic) {
-            return new ActiveMQTopic(subject);
-        } else {
-            return new ActiveMQQueue(subject);
-        }
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        if (isTopic && isDurable) {
-            return consumerSession.createDurableSubscriber((Topic)destination, idGen.generateId());
-        } else {
-            return consumerSession.createConsumer(destination);
-        }
-    }
-
-    public void setUp() throws Exception {
-        super.setUp();
-        ClientTestSupport.removeMessageStore();
-        LOG.info("Setting up . . . . . ");
-        messageCount.set(0);
-
-        destination = createDestination();
-        largeMessageData = new byte[LARGE_MESSAGE_SIZE];
-        for (int i = 0; i < LARGE_MESSAGE_SIZE; i++) {
-            if (i % 2 == 0) {
-                largeMessageData[i] = 'a';
-            } else {
-                largeMessageData[i] = 'z';
-            }
-        }
-
-        try {
-            // allow the broker to start
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-            throw new JMSException(e.getMessage());
-        }
-
-        ActiveMQConnectionFactory fac = getConnectionFactory();
-        producerConnection = fac.createConnection();
-        setPrefetchPolicy((ActiveMQConnection)producerConnection);
-        producerConnection.start();
-
-        consumerConnection = fac.createConnection();
-        setPrefetchPolicy((ActiveMQConnection)consumerConnection);
-        consumerConnection.setClientID(idGen.generateId());
-        consumerConnection.start();
-        producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = producerSession.createProducer(createDestination());
-        producer.setDeliveryMode(deliveryMode);
-        consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = createConsumer();
-        consumer.setMessageListener(this);
-        LOG.info("Setup complete");
-    }
-
-    protected void setPrefetchPolicy(ActiveMQConnection activeMQConnection) {
-        activeMQConnection.getPrefetchPolicy().setTopicPrefetch(prefetchValue);
-        activeMQConnection.getPrefetchPolicy().setQueuePrefetch(prefetchValue);
-        activeMQConnection.getPrefetchPolicy().setDurableTopicPrefetch(prefetchValue);
-        activeMQConnection.getPrefetchPolicy().setQueueBrowserPrefetch(prefetchValue);
-        activeMQConnection.getPrefetchPolicy().setOptimizeDurableTopicPrefetch(prefetchValue);
-    }
-
-    public void tearDown() throws Exception {
-        Thread.sleep(1000);
-        producerConnection.close();
-        consumerConnection.close();
-
-        super.tearDown();
-
-        largeMessageData = null;
-    }
-
-    protected boolean isSame(BytesMessage msg1) throws Exception {
-        boolean result = false;
-        ((ActiveMQMessage)msg1).setReadOnlyBody(true);
-
-        for (int i = 0; i < LARGE_MESSAGE_SIZE; i++) {
-            result = msg1.readByte() == largeMessageData[i];
-            if (!result) {
-                break;
-            }
-        }
-
-        return result;
-    }
-
-    public void onMessage(Message msg) {
-        try {
-            BytesMessage ba = (BytesMessage)msg;
-            validMessageConsumption &= isSame(ba);
-            assertTrue(ba.getBodyLength() == LARGE_MESSAGE_SIZE);
-            if (messageCount.incrementAndGet() >= MESSAGE_COUNT) {
-                synchronized (messageCount) {
-                    messageCount.notify();
-                }
-            }
-            LOG.info("got message = " + messageCount);
-            if (messageCount.get() % 50 == 0) {
-                LOG.info("count = " + messageCount);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void testLargeMessages() throws Exception {
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            LOG.info("Sending message: " + i);
-            BytesMessage msg = producerSession.createBytesMessage();
-            msg.writeBytes(largeMessageData);
-            producer.send(msg);
-        }
-        long now = System.currentTimeMillis();
-        while (now + 60000 > System.currentTimeMillis() && messageCount.get() < MESSAGE_COUNT) {
-            LOG.info("message count = " + messageCount);
-            synchronized (messageCount) {
-                messageCount.wait(1000);
-            }
-        }
-        LOG.info("Finished count = " + messageCount);
-        assertTrue("Not enough messages - expected " + MESSAGE_COUNT + " but got " + messageCount, messageCount.get() == MESSAGE_COUNT);
-        assertTrue("received messages are not valid", validMessageConsumption);
-        Thread.sleep(1000);
-        LOG.info("FINAL count = " + messageCount);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java
deleted file mode 100644
index 9a0ed48..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * 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;
-
-/**
- * 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.
- */
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Random;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Destination;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author rnewson
- */
-public final class LargeStreamletTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(LargeStreamletTest.class);
-    private static final String BROKER_URL = "vm://localhost?broker.persistent=false";
-    private static final int BUFFER_SIZE = 1 * 1024;
-    private static final int MESSAGE_COUNT = 10 * 1024;
-
-    protected Exception writerException;
-    protected Exception readerException;
-
-    private AtomicInteger totalRead = new AtomicInteger();
-    private AtomicInteger totalWritten = new AtomicInteger();
-    private AtomicBoolean stopThreads = new AtomicBoolean(false);
-
-    public void testStreamlets() throws Exception {
-        final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(BROKER_URL);
-
-        final ActiveMQConnection connection = (ActiveMQConnection)factory.createConnection();
-        connection.start();
-        try {
-            final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            try {
-                final Destination destination = session.createQueue("wibble");
-                final Thread readerThread = new Thread(new Runnable() {
-
-                    public void run() {
-                        totalRead.set(0);
-                        try {
-                            final InputStream inputStream = connection.createInputStream(destination);
-                            try {
-                                int read;
-                                final byte[] buf = new byte[BUFFER_SIZE];
-                                while (!stopThreads.get() && (read = inputStream.read(buf)) != -1) {
-                                    totalRead.addAndGet(read);
-                                }
-                            } finally {
-                                inputStream.close();
-                            }
-                        } catch (Exception e) {
-                            readerException = e;
-                            e.printStackTrace();
-                        } finally {
-                            LOG.info(totalRead + " total bytes read.");
-                        }
-                    }
-                });
-
-                final Thread writerThread = new Thread(new Runnable() {
-                    private final Random random = new Random();
-
-                    public void run() {
-                        totalWritten.set(0);
-                        int count = MESSAGE_COUNT;
-                        try {
-                            final OutputStream outputStream = connection.createOutputStream(destination);
-                            try {
-                                final byte[] buf = new byte[BUFFER_SIZE];
-                                random.nextBytes(buf);
-                                while (count > 0 && !stopThreads.get()) {
-                                    outputStream.write(buf);
-                                    totalWritten.addAndGet(buf.length);
-                                    count--;
-                                }
-                            } finally {
-                                outputStream.close();
-                            }
-                        } catch (Exception e) {
-                            writerException = e;
-                            e.printStackTrace();
-                        } finally {
-                            LOG.info(totalWritten + " total bytes written.");
-                        }
-                    }
-                });
-
-                readerThread.start();
-                writerThread.start();
-
-                // Wait till reader is has finished receiving all the messages
-                // or he has stopped
-                // receiving messages.
-                Thread.sleep(1000);
-                int lastRead = totalRead.get();
-                while (readerThread.isAlive()) {
-                    readerThread.join(1000);
-                    // No progress?? then stop waiting..
-                    if (lastRead == totalRead.get()) {
-                        break;
-                    }
-                    lastRead = totalRead.get();
-                }
-
-                stopThreads.set(true);
-
-                assertTrue("Should not have received a reader exception", readerException == null);
-                assertTrue("Should not have received a writer exception", writerException == null);
-
-                Assert.assertEquals("Not all messages accounted for", totalWritten.get(), totalRead.get());
-
-            } finally {
-                session.close();
-            }
-        } finally {
-            connection.close();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/LoadTestBurnIn.java b/trunk/activemq-core/src/test/java/org/apache/activemq/LoadTestBurnIn.java
deleted file mode 100644
index 4462844..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/LoadTestBurnIn.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Small burn test moves sends a moderate amount of messages through the broker,
- * to checking to make sure that the broker does not lock up after a while of
- * sustained messaging.
- * 
- * 
- */
-public class LoadTestBurnIn extends JmsTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(LoadTestBurnIn.class);
-
-    public ActiveMQDestination destination;
-    public int deliveryMode;
-    public byte destinationType;
-    public boolean durableConsumer;
-    public int messageCount = 50000;
-    public int messageSize = 1024;
-
-    public static Test suite() {
-        return suite(LoadTestBurnIn.class);
-    }
-
-    protected void setUp() throws Exception {
-        LOG.info("Start: " + getName());
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        try {
-            super.tearDown();
-        } catch (Throwable e) {
-            e.printStackTrace(System.out);
-        } finally {
-            LOG.info("End: " + getName());
-        }
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://(tcp://localhost:0)?useJmx=true"));
-        // return BrokerFactory.createBroker(new
-        // URI("xbean:org/apache/activemq/broker/store/loadtester.xml"));
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws URISyntaxException, IOException {
-        return new ActiveMQConnectionFactory(((TransportConnector)broker.getTransportConnectors().get(0))
-            .getServer().getConnectURI());
-    }
-
-    public void initCombosForTestSendReceive() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-        addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE});
-        addCombinationValues("messageSize", new Object[] {Integer.valueOf(101), Integer.valueOf(102),
-                                                          Integer.valueOf(103), Integer.valueOf(104),
-                                                          Integer.valueOf(105), Integer.valueOf(106),
-                                                          Integer.valueOf(107), Integer.valueOf(108)});
-    }
-
-    public void testSendReceive() throws Exception {
-
-        // Durable consumer combination is only valid with topics
-        if (durableConsumer && destinationType != ActiveMQDestination.TOPIC_TYPE) {
-            return;
-        }
-
-        connection.setClientID(getName());
-        connection.getPrefetchPolicy().setAll(1000);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer;
-        if (durableConsumer) {
-            consumer = session.createDurableSubscriber((Topic)destination, "sub1:"
-                                                                           + System.currentTimeMillis());
-        } else {
-            consumer = session.createConsumer(destination);
-        }
-        profilerPause("Ready: ");
-
-        final CountDownLatch producerDoneLatch = new CountDownLatch(1);
-
-        // Send the messages, async
-        new Thread() {
-            public void run() {
-                Connection connection2 = null;
-                try {
-                    connection2 = factory.createConnection();
-                    Session session = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageProducer producer = session.createProducer(destination);
-                    producer.setDeliveryMode(deliveryMode);
-                    for (int i = 0; i < messageCount; i++) {
-                        BytesMessage m = session.createBytesMessage();
-                        m.writeBytes(new byte[messageSize]);
-                        producer.send(m);
-                    }
-                    producer.close();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                } finally {
-                    safeClose(connection2);
-                    producerDoneLatch.countDown();
-                }
-
-            }
-        }.start();
-
-        // Make sure all the messages were delivered.
-        Message message = null;
-        for (int i = 0; i < messageCount; i++) {
-            message = consumer.receive(5000);
-            assertNotNull("Did not get message: " + i, message);
-        }
-
-        profilerPause("Done: ");
-
-        assertNull(consumer.receiveNoWait());
-        message.acknowledge();
-
-        // Make sure the producer thread finishes.
-        assertTrue(producerDoneLatch.await(5, TimeUnit.SECONDS));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/MessageEvictionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/MessageEvictionTest.java
deleted file mode 100644
index b4a6e19..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/MessageEvictionTest.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/**
- * 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;
-
-import static junit.framework.Assert.fail;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.ConstantPendingMessageLimitStrategy;
-import org.apache.activemq.broker.region.policy.FilePendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.OldestMessageEvictionStrategy;
-import org.apache.activemq.broker.region.policy.PendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Test;
-
-public class MessageEvictionTest {
-    static final Logger LOG = LoggerFactory.getLogger(MessageEvictionTest.class);
-    private BrokerService broker;
-    private ConnectionFactory connectionFactory;
-    Connection connection;
-    private Session session;
-    private Topic destination;
-    private final String destinationName = "verifyEvection";
-    protected int numMessages = 2000;
-    protected String payload = new String(new byte[1024*2]);
-
-    public void setUp(PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy) throws Exception {
-        broker = createBroker(pendingSubscriberPolicy);
-        broker.start();
-        connectionFactory = createConnectionFactory();
-        connection = connectionFactory.createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        destination = session.createTopic(destinationName);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        connection.stop();
-        broker.stop();
-    }
-    
-    @Test
-    public void testMessageEvictionMemoryUsageFileCursor() throws Exception {
-        setUp(new FilePendingSubscriberMessageStoragePolicy());
-        doTestMessageEvictionMemoryUsage();
-    }
-    
-    @Test
-    public void testMessageEvictionMemoryUsageVmCursor() throws Exception {
-        setUp(new VMPendingSubscriberMessageStoragePolicy());
-        doTestMessageEvictionMemoryUsage();
-    }
-    
-    @Test
-    public void testMessageEvictionDiscardedAdvisory() throws Exception {
-        setUp(new VMPendingSubscriberMessageStoragePolicy());
-        
-        ExecutorService executor = Executors.newSingleThreadExecutor();
-        final CountDownLatch consumerRegistered = new CountDownLatch(1);
-        final CountDownLatch gotAdvisory = new CountDownLatch(1);
-        final CountDownLatch advisoryIsGood = new CountDownLatch(1);
-        
-        executor.execute(new Runnable() {
-            public void run() {
-                try {
-                    ActiveMQTopic discardedAdvisoryDestination = 
-                        AdvisorySupport.getMessageDiscardedAdvisoryTopic(destination);
-                    // use separate session rather than asyncDispatch on consumer session 
-                    // as we want consumer session to block
-                    Session advisorySession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    final MessageConsumer consumer = advisorySession.createConsumer(discardedAdvisoryDestination);
-                    consumer.setMessageListener(new MessageListener() {
-                        int advisoriesReceived = 0;
-                        public void onMessage(Message message) {
-                            try {
-                                LOG.info("advisory:" + message);
-                                ActiveMQMessage activeMQMessage = (ActiveMQMessage) message;
-                                assertNotNull(activeMQMessage.getStringProperty(AdvisorySupport.MSG_PROPERTY_CONSUMER_ID));
-                                assertEquals(++advisoriesReceived, activeMQMessage.getIntProperty(AdvisorySupport.MSG_PROPERTY_DISCARDED_COUNT));
-                                message.acknowledge();
-                                advisoryIsGood.countDown();
-                            } catch (JMSException e) {
-                                e.printStackTrace();
-                                fail(e.toString());
-                            } finally {
-                                gotAdvisory.countDown();
-                            }
-                        }           
-                    });
-                    consumerRegistered.countDown();
-                    gotAdvisory.await(120, TimeUnit.SECONDS);
-                    consumer.close();
-                    advisorySession.close();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    fail(e.toString());
-                }
-            }
-        });
-        assertTrue("we have an advisory consumer", consumerRegistered.await(60, TimeUnit.SECONDS));
-        doTestMessageEvictionMemoryUsage();
-        assertTrue("got an advisory for discarded", gotAdvisory.await(0, TimeUnit.SECONDS));
-        assertTrue("advisory is good",advisoryIsGood.await(0, TimeUnit.SECONDS));
-    }
-    
-    public void doTestMessageEvictionMemoryUsage() throws Exception {
-        
-        ExecutorService executor = Executors.newCachedThreadPool();
-        final CountDownLatch doAck = new CountDownLatch(1);
-        final CountDownLatch ackDone = new CountDownLatch(1);
-        final CountDownLatch consumerRegistered = new CountDownLatch(1);
-        executor.execute(new Runnable() {
-            public void run() {
-                try {
-                    final MessageConsumer consumer = session.createConsumer(destination);
-                    consumer.setMessageListener(new MessageListener() {
-                        public void onMessage(Message message) {
-                            try {
-                                // very slow, only ack once
-                                doAck.await(60, TimeUnit.SECONDS);
-                                LOG.info("acking: " + message.getJMSMessageID());
-                                message.acknowledge();
-                                ackDone.countDown();
-                            } catch (Exception e) {
-                                e.printStackTrace();   
-                                fail(e.toString());
-                            } finally {
-                                consumerRegistered.countDown();
-                                ackDone.countDown();
-                            }
-                        }           
-                    });
-                    consumerRegistered.countDown();
-                    ackDone.await(60, TimeUnit.SECONDS);
-                    consumer.close();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    fail(e.toString());
-                }
-            }
-        });
-        
-        assertTrue("we have a consumer", consumerRegistered.await(10, TimeUnit.SECONDS));
-        
-        final AtomicInteger sent = new AtomicInteger(0);
-        final CountDownLatch sendDone = new CountDownLatch(1);
-        executor.execute(new Runnable() {
-            public void run() {
-               MessageProducer producer;
-               try {
-                   producer = session.createProducer(destination);
-                   for (int i=0; i< numMessages; i++) {
-                       producer.send(session.createTextMessage(payload));
-                       sent.incrementAndGet();
-                       TimeUnit.MILLISECONDS.sleep(10);
-                   }
-                   producer.close();
-                   sendDone.countDown();
-               } catch (Exception e) {
-                   sendDone.countDown();
-                   e.printStackTrace();
-                   fail(e.toString());
-               }
-            }
-        });
-        
-        assertTrue("messages sending done", sendDone.await(180, TimeUnit.SECONDS));
-        assertEquals("all message were sent", numMessages, sent.get());
-        
-        doAck.countDown();
-        executor.shutdown();
-        executor.awaitTermination(30, TimeUnit.SECONDS);
-        
-        assertTrue("usage goes to 0 once consumer goes away", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return 0 == TestSupport.getDestination(broker, 
-                        ActiveMQDestination.transform(destination)).getMemoryUsage().getPercentUsage();
-            }
-        }));
-    }
-
-    BrokerService createBroker(PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy) throws Exception {
-        BrokerService brokerService = new BrokerService();
-        brokerService.addConnector("tcp://localhost:0");
-        brokerService.setUseJmx(false);
-        brokerService.setDeleteAllMessagesOnStartup(true);
-        
-        // spooling to disk early so topic memory limit is not reached
-        brokerService.getSystemUsage().getMemoryUsage().setLimit(500*1024);
-        
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setTopic(">");
-        
-        entry.setAdvisoryForDiscardingMessages(true);
-        
-        // so consumer does not get over run while blocked limit the prefetch
-        entry.setTopicPrefetch(50);
-        
-        
-        entry.setPendingSubscriberPolicy(pendingSubscriberPolicy);
-        
-        // limit the number of outstanding messages, large enough to use the file store
-        // or small enough not to blow memory limit
-        int pendingMessageLimit = 50;
-        if (pendingSubscriberPolicy instanceof FilePendingSubscriberMessageStoragePolicy) {
-            pendingMessageLimit = 500;
-        }
-        ConstantPendingMessageLimitStrategy pendingMessageLimitStrategy = new ConstantPendingMessageLimitStrategy();
-        pendingMessageLimitStrategy.setLimit(pendingMessageLimit);
-        entry.setPendingMessageLimitStrategy(pendingMessageLimitStrategy);
-
-        // to keep the limit in check and up to date rather than just the first few, evict some
-        OldestMessageEvictionStrategy messageEvictionStrategy = new OldestMessageEvictionStrategy();
-        // whether to check expiry before eviction, default limit 1000 is fine as no ttl set in this test
-        //messageEvictionStrategy.setEvictExpiredMessagesHighWatermark(1000);
-        entry.setMessageEvictionStrategy(messageEvictionStrategy);
-        
-        // let evicted messaged disappear
-        entry.setDeadLetterStrategy(null);
-        policyEntries.add(entry);
-
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        brokerService.setDestinationPolicy(policyMap);
-        
-        return brokerService;
-    }
-
-    ConnectionFactory createConnectionFactory() throws Exception {
-        String url = ((TransportConnector) broker.getTransportConnectors().get(0)).getServer().getConnectURI().toString();
-        ActiveMQConnectionFactory factory =  new ActiveMQConnectionFactory(url);
-        factory.setWatchTopicAdvisories(false);
-        return factory;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
deleted file mode 100644
index 61076db..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MessageListenerRedeliveryTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MessageListenerRedeliveryTest.class);
-
-    private Connection connection;
-
-    protected void setUp() throws Exception {
-        connection = createConnection();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-    }
-
-    protected RedeliveryPolicy getRedeliveryPolicy() {
-        RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
-        redeliveryPolicy.setInitialRedeliveryDelay(0);
-        redeliveryPolicy.setRedeliveryDelay(1000);
-        redeliveryPolicy.setMaximumRedeliveries(3);
-        redeliveryPolicy.setBackOffMultiplier((short)2);
-        redeliveryPolicy.setUseExponentialBackOff(true);
-        return redeliveryPolicy;
-    }
-
-    protected Connection createConnection() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&marshal=true");
-        factory.setRedeliveryPolicy(getRedeliveryPolicy());
-        return factory.createConnection();
-    }
-
-    private class TestMessageListener implements MessageListener {
-
-        public int counter;
-        private Session session;
-
-        public TestMessageListener(Session session) {
-            this.session = session;
-        }
-
-        public void onMessage(Message message) {
-            try {
-                LOG.info("Message Received: " + message);
-                counter++;
-                if (counter <= 4) {
-                    LOG.info("Message Rollback.");
-                    session.rollback();
-                } else {
-                    LOG.info("Message Commit.");
-                    message.acknowledge();
-                    session.commit();
-                }
-            } catch (JMSException e) {
-                LOG.error("Error when rolling back transaction");
-            }
-        }
-    }
-
-    public void testQueueRollbackConsumerListener() throws JMSException {
-        connection.start();
-
-        Session session = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        Message message = createTextMessage(session);
-        producer.send(message);
-        session.commit();
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        ActiveMQMessageConsumer mc = (ActiveMQMessageConsumer)consumer;
-        mc.setRedeliveryPolicy(getRedeliveryPolicy());
-
-        TestMessageListener listener = new TestMessageListener(session);
-        consumer.setMessageListener(listener);
-
-        try {
-            Thread.sleep(500);
-        } catch (InterruptedException e) {
-
-        }
-
-        // first try.. should get 2 since there is no delay on the
-        // first redeliver..
-        assertEquals(2, listener.counter);
-
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-
-        }
-        // 2nd redeliver (redelivery after 1 sec)
-        assertEquals(3, listener.counter);
-
-        try {
-            Thread.sleep(2000);
-        } catch (InterruptedException e) {
-
-        }
-        // 3rd redeliver (redelivery after 2 seconds) - it should give up after
-        // that
-        assertEquals(4, listener.counter);
-
-        // create new message
-        producer.send(createTextMessage(session));
-        session.commit();
-
-        try {
-            Thread.sleep(500);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-        // it should be committed, so no redelivery
-        assertEquals(5, listener.counter);
-
-        try {
-            Thread.sleep(1500);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-        // no redelivery, counter should still be 4
-        assertEquals(5, listener.counter);
-
-        session.close();
-    }
-
-    public void testQueueRollbackSessionListener() throws JMSException {
-        connection.start();
-
-        Session session = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        Message message = createTextMessage(session);
-        producer.send(message);
-        session.commit();
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        ActiveMQMessageConsumer mc = (ActiveMQMessageConsumer)consumer;
-        mc.setRedeliveryPolicy(getRedeliveryPolicy());
-
-        TestMessageListener listener = new TestMessageListener(session);
-        consumer.setMessageListener(listener);
-
-        try {
-            Thread.sleep(500);
-        } catch (InterruptedException e) {
-
-        }
-        // first try
-        assertEquals(2, listener.counter);
-
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-
-        }
-        // second try (redelivery after 1 sec)
-        assertEquals(3, listener.counter);
-
-        try {
-            Thread.sleep(2000);
-        } catch (InterruptedException e) {
-
-        }
-        // third try (redelivery after 2 seconds) - it should give up after that
-        assertEquals(4, listener.counter);
-
-        // create new message
-        producer.send(createTextMessage(session));
-        session.commit();
-
-        try {
-            Thread.sleep(500);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-        // it should be committed, so no redelivery
-        assertEquals(5, listener.counter);
-
-        try {
-            Thread.sleep(1500);
-        } catch (InterruptedException e) {
-            // ignore
-        }
-        // no redelivery, counter should still be 4
-        assertEquals(5, listener.counter);
-
-        session.close();
-    }
-
-    public void testQueueSessionListenerExceptionRetry() throws  Exception {
-        connection.start();
-            
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        Message message = createTextMessage(session, "1");
-        producer.send(message);
-        message = createTextMessage(session, "2");
-        producer.send(message);
-            
-        
-        MessageConsumer consumer = session.createConsumer(queue);
-            
-        final CountDownLatch gotMessage = new CountDownLatch(2);
-        final AtomicInteger count  = new AtomicInteger(0);
-        final int maxDeliveries = getRedeliveryPolicy().getMaximumRedeliveries();
-        final ArrayList<String> received = new ArrayList<String>();
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                LOG.info("Message Received: " + message);
-                try {
-                    received.add(((TextMessage) message).getText());
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                    fail(e.toString());
-                }
-                if (count.incrementAndGet() < maxDeliveries) {
-                    throw new RuntimeException(getName() + " force a redelivery");
-                }
-                // new blood
-                count.set(0);
-                gotMessage.countDown();
-            }
-        });
-            
-        assertTrue("got message before retry expiry", gotMessage.await(20, TimeUnit.SECONDS));
-        
-        for (int i=0; i<maxDeliveries; i++) {
-            assertEquals("got first redelivered: " + i, "1", received.get(i));
-        }
-        for (int i=maxDeliveries; i<maxDeliveries*2; i++) {
-            assertEquals("got first redelivered: " + i, "2", received.get(i));
-        }
-        session.close();
-    }
-        
-
-    public void testQueueSessionListenerExceptionDlq() throws  Exception {
-        connection.start();
-            
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue-" + getName());
-        MessageProducer producer = createProducer(session, queue);
-        Message message = createTextMessage(session);
-        producer.send(message);
-
-        final Message[] dlqMessage = new Message[1];
-        ActiveMQDestination dlqDestination = new ActiveMQQueue("ActiveMQ.DLQ");
-        MessageConsumer dlqConsumer = session.createConsumer(dlqDestination);
-        final CountDownLatch gotDlqMessage = new CountDownLatch(1);
-        dlqConsumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                LOG.info("DLQ Message Received: " + message);
-                dlqMessage[0] = message;
-                gotDlqMessage.countDown();
-            }
-        });
-
-        MessageConsumer consumer = session.createConsumer(queue);
-            
-        final int maxDeliveries = getRedeliveryPolicy().getMaximumRedeliveries();
-        final CountDownLatch gotMessage = new CountDownLatch(maxDeliveries);
-        
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                LOG.info("Message Received: " + message);
-                gotMessage.countDown();
-                throw new RuntimeException(getName() + " force a redelivery");
-            }
-        });
-            
-        assertTrue("got message before retry expiry", gotMessage.await(20, TimeUnit.SECONDS));
-        
-        // check DLQ
-        assertTrue("got dlq message", gotDlqMessage.await(20, TimeUnit.SECONDS));
-
-        // check DLQ message cause is captured
-        message = dlqMessage[0];
-        assertNotNull("dlq message captured", message);
-        String cause = message.getStringProperty(ActiveMQMessage.DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY);
-        assertTrue("cause exception is remembered", cause.contains("RuntimeException"));
-        assertTrue("is correct exception", cause.contains(getName()));
-        
-        session.close();
-    }
-    
-
-    private TextMessage createTextMessage(Session session, String text) throws JMSException {
-        return session.createTextMessage(text);
-    }
-    private TextMessage createTextMessage(Session session) throws JMSException {
-        return session.createTextMessage("Hello");
-    }
-
-    private MessageProducer createProducer(Session session, Destination queue) throws JMSException {
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(getDeliveryMode());
-        return producer;
-    }
-
-    protected int getDeliveryMode() {
-        return DeliveryMode.PERSISTENT;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/MessageTransformationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/MessageTransformationTest.java
deleted file mode 100755
index b4efd32..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/MessageTransformationTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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;
-
-import javax.jms.BytesMessage;
-import javax.jms.MapMessage;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-
-public class MessageTransformationTest extends TestCase {
-
-    /**
-     * Sets up the resources of the unit test.
-     * 
-     * @throws Exception
-     */
-    protected void setUp() throws Exception {
-    }
-
-    /**
-     * Clears up the resources used in the unit test.
-     */
-    protected void tearDown() throws Exception {
-    }
-
-    /**
-     * Tests transforming destinations into ActiveMQ's destination
-     * implementation.
-     */
-    public void testTransformDestination() throws Exception {
-        assertTrue("Transforming a TempQueue destination to an ActiveMQTempQueue",
-                   ActiveMQMessageTransformation.transformDestination((TemporaryQueue)new ActiveMQTempQueue()) instanceof ActiveMQTempQueue);
-
-        assertTrue("Transforming a TempTopic destination to an ActiveMQTempTopic",
-                   ActiveMQMessageTransformation.transformDestination((TemporaryTopic)new ActiveMQTempTopic()) instanceof ActiveMQTempTopic);
-
-        assertTrue("Transforming a Queue destination to an ActiveMQQueue", ActiveMQMessageTransformation.transformDestination((Queue)new ActiveMQQueue()) instanceof ActiveMQQueue);
-
-        assertTrue("Transforming a Topic destination to an ActiveMQTopic", ActiveMQMessageTransformation.transformDestination((Topic)new ActiveMQTopic()) instanceof ActiveMQTopic);
-
-        assertTrue("Transforming a Destination to an ActiveMQDestination",
-                   ActiveMQMessageTransformation.transformDestination((ActiveMQDestination)new ActiveMQTopic()) instanceof ActiveMQDestination);
-    }
-
-    /**
-     * Tests transforming messages into ActiveMQ's message implementation.
-     */
-    public void testTransformMessage() throws Exception {
-        assertTrue("Transforming a BytesMessage message into an ActiveMQBytesMessage", ActiveMQMessageTransformation.transformMessage((BytesMessage)new ActiveMQBytesMessage(),
-                                                                                                                                      null) instanceof ActiveMQBytesMessage);
-
-        assertTrue("Transforming a MapMessage message to an ActiveMQMapMessage",
-                   ActiveMQMessageTransformation.transformMessage((MapMessage)new ActiveMQMapMessage(), null) instanceof ActiveMQMapMessage);
-
-        assertTrue("Transforming an ObjectMessage message to an ActiveMQObjectMessage", ActiveMQMessageTransformation.transformMessage((ObjectMessage)new ActiveMQObjectMessage(),
-                                                                                                                                       null) instanceof ActiveMQObjectMessage);
-
-        assertTrue("Transforming a StreamMessage message to an ActiveMQStreamMessage", ActiveMQMessageTransformation.transformMessage((StreamMessage)new ActiveMQStreamMessage(),
-                                                                                                                                      null) instanceof ActiveMQStreamMessage);
-
-        assertTrue("Transforming a TextMessage message to an ActiveMQTextMessage",
-                   ActiveMQMessageTransformation.transformMessage((TextMessage)new ActiveMQTextMessage(), null) instanceof ActiveMQTextMessage);
-
-        assertTrue("Transforming an ActiveMQMessage message to an ActiveMQMessage",
-                   ActiveMQMessageTransformation.transformMessage(new ActiveMQMessage(), null) instanceof ActiveMQMessage);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
deleted file mode 100644
index 900b1c0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * 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;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.ServerSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-// see: https://issues.apache.org/activemq/browse/AMQ-2651
-public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(OnePrefetchAsyncConsumerTest.class);
-
-    private TestMutex testMutex;
-    protected Connection connection;
-    protected ConnectionConsumer connectionConsumer;
-    protected Queue queue;
-    protected CountDownLatch messageTwoDelay = new CountDownLatch(1);
-
-    public void testPrefetchExtension() throws Exception {
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(queue);
-
-        // when Msg1 is acked, the PrefetchSubscription will (incorrectly?) increment its prefetchExtension
-        producer.send(session.createTextMessage("Msg1"));
-
-        // Msg2 will exhaust the ServerSessionPool (since it only has 1 ServerSession)
-        producer.send(session.createTextMessage("Msg2"));
-
-        // Msg3 will cause the test to fail as it will attempt to retrieve an additional ServerSession from
-        // an exhausted ServerSessionPool due to the (incorrectly?) incremented prefetchExtension in the PrefetchSubscription
-        producer.send(session.createTextMessage("Msg3"));
-        
-        session.commit();
-        
-        // wait for test to complete and the test result to get set
-        // this happens asynchronously since the messages are delivered asynchronously
-        synchronized (testMutex) {
-           while (!testMutex.testCompleted) {
-              testMutex.wait();
-           }
-        }
-        
-        //test completed, result is ready
-        assertTrue("Attempted to retrieve more than one ServerSession at a time", testMutex.testSuccessful);
-    }
-
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:61616";
-        super.setUp();
-
-        testMutex = new TestMutex();
-        connection = createConnection();
-        queue = createQueue();
-        // note the last arg of 1, this becomes the prefetchSize in PrefetchSubscription
-        connectionConsumer = connection.createConnectionConsumer(
-           queue, null, new TestServerSessionPool(connection), 1);
-        connection.start();
-    }
-
-    protected void tearDown() throws Exception {
-        connectionConsumer.close();
-        connection.close();
-        super.tearDown();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = super.createBroker();
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        // ensure prefetch is exact. only delivery next when current is acked
-        defaultEntry.setUsePrefetchExtension(false);
-        policyMap.setDefaultEntry(defaultEntry);
-        answer.setDestinationPolicy(policyMap);
-        return answer;
-    }
-    
-    protected Queue createQueue() {
-        return new ActiveMQQueue(getDestinationString());
-    }
-
-    // simulates a ServerSessionPool with only 1 ServerSession
-    private class TestServerSessionPool implements ServerSessionPool {
-         Connection connection;
-         TestServerSession serverSession;
-         boolean serverSessionInUse = false;
-
-         public TestServerSessionPool(Connection connection) throws JMSException {
-             this.connection = connection;
-             serverSession = new TestServerSession(this);
-         }
-
-         public ServerSession getServerSession() throws JMSException {
-             synchronized (this) {
-                 if (serverSessionInUse) {
-                     LOG.info("asked for session while in use, not serialised delivery");
-                     synchronized (testMutex) {
-                        testMutex.testSuccessful = false;
-                        testMutex.testCompleted = true;
-                     }
-                 }
-                 serverSessionInUse = true;
-                 return serverSession;
-             }
-         }
-    }
-
-    private class TestServerSession implements ServerSession {
-         TestServerSessionPool pool;
-         Session session;
-
-         public TestServerSession(TestServerSessionPool pool) throws JMSException {
-             this.pool = pool;
-             session = pool.connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-             session.setMessageListener(new TestMessageListener());
-         }
-
-         public Session getSession() throws JMSException {
-             return session;
-         }
-
-         public void start() throws JMSException {
-             // use a separate thread to process the message asynchronously
-             new Thread() {
-                 public void run() {
-                     // let the session deliver the message
-                     session.run();
-
-                     // commit the tx
-                     try {
-                         session.commit();
-                     }
-                     catch (JMSException e) {
-                     }
-
-                     // return ServerSession to pool
-                     synchronized (pool) {
-                         pool.serverSessionInUse = false;
-                     }
-
-                     // let the test check if the test was completed
-                     synchronized (testMutex) {
-                         testMutex.notify();
-                     }
-                 }
-              }.start();
-         }
-    }
-
-    private class TestMessageListener implements MessageListener {
-        public void onMessage(Message message) {
-            try {
-               String text = ((TextMessage)message).getText();
-               LOG.info("got message: " + text);
-               if (text.equals("Msg3")) {
-                  // if we get here, Exception in getServerSession() was not thrown, test is successful
-                  // this obviously doesn't happen now,
-                  // need to fix prefetchExtension computation logic in PrefetchSubscription to get here
-                  synchronized (testMutex) {
-                      if (!testMutex.testCompleted) {
-                          testMutex.testSuccessful = true;
-                          testMutex.testCompleted = true;
-                      }
-                  }
-               }
-               else if (text.equals("Msg2")) {
-                  // simulate long message processing so that Msg3 comes when Msg2 is still being processed
-                  // and thus the single ServerSession is in use
-                  TimeUnit.SECONDS.sleep(4);
-               }
-            }
-            catch (JMSException e) {
-            }
-            catch (InterruptedException e) {
-            }
-        }
-    }
-
-    private class TestMutex {
-        boolean testCompleted = false;
-        boolean testSuccessful = true;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java
deleted file mode 100644
index 83d9179..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-// see: https://issues.apache.org/activemq/browse/AMQ-2668
-public class PerDestinationStoreLimitTest extends JmsTestSupport {
-    static final Logger LOG = LoggerFactory.getLogger(PerDestinationStoreLimitTest.class);
-    final String oneKb = new String(new byte[1024]);
-    
-    ActiveMQDestination queueDest = new ActiveMQQueue("PerDestinationStoreLimitTest.Queue");
-    ActiveMQDestination topicDest = new ActiveMQTopic("PerDestinationStoreLimitTest.Topic");
-
-    protected TransportConnector connector;
-    protected ActiveMQConnection connection;
-    
-    public void testDLQAfterBlockTopic() throws Exception {
-        doTestDLQAfterBlock(topicDest);
-    }
-    
-    public void testDLQAfterBlockQueue() throws Exception {
-        doTestDLQAfterBlock(queueDest);
-    }
-    
-    public void doTestDLQAfterBlock(ActiveMQDestination destination) throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
-        // Immediately sent to the DLQ on rollback, no redelivery
-        redeliveryPolicy.setMaximumRedeliveries(0);
-        factory.setRedeliveryPolicy(redeliveryPolicy);
-        
-        // Separate connection for consumer so it will not be blocked by filler thread
-        // sending when it blocks
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.setClientID("someId");
-        connection.start();
-
-        final Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);      
-        MessageConsumer consumer = destination.isQueue() ?
-                    consumerSession.createConsumer(destination) :
-                    consumerSession.createDurableSubscriber((Topic) destination, "Durable");
-        
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        final Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        final MessageProducer producer = session.createProducer(destination);
-        
-        final AtomicBoolean done = new AtomicBoolean(true);
-        final AtomicBoolean keepGoing = new AtomicBoolean(true);
-        final CountDownLatch fillerStarted = new CountDownLatch(1);
-
-        final AtomicLong sent = new AtomicLong(0);
-        Thread thread = new Thread("Filler") {
-            int i;
-            @Override
-            public void run() {
-                while (keepGoing.get()) {
-                    done.set(false);
-                    fillerStarted.countDown();
-                    try {
-                        producer.send(session.createTextMessage(oneKb + ++i));
-                        if (i%10 == 0) {
-                            session.commit();
-                            sent.getAndAdd(10);
-                            LOG.info("committed/sent: " + sent.get());
-                        }
-                        LOG.info("sent: " + i);
-                    } catch (JMSException e) {
-                    }
-                }
-            }
-        };
-        thread.start();
-		
-        assertTrue("filler started..", fillerStarted.await(20, TimeUnit.SECONDS));
-        waitForBlocked(done);
-
-        // consume and rollback some so message gets to DLQ
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-        TextMessage msg;
-        int received = 0;
-        for (;received < sent.get(); ++received) {
-        	msg = (TextMessage) consumer.receive(4000);
-        	if (msg == null) {
-        	    LOG.info("received null on count: " + received);
-        	    break;
-        	}
-        	LOG.info("received: " + received + ", msg: " + msg.getJMSMessageID());
-        	if (received%5==0) {
-        	    if (received%3==0) {
-        	        // force the use of the DLQ which will use some more store
-        	        LOG.info("rollback on : " + received);
-        	        consumerSession.rollback();
-        	    } else {
-        	        LOG.info("commit on : " + received);
-        	        consumerSession.commit();
-        	    }
-        	}
-        }
-        LOG.info("Done:: sent: " + sent.get() + ", received: " + received);
-        keepGoing.set(false);
-        assertTrue("some were sent:", sent.get() > 0);
-        assertEquals("received what was committed", sent.get(), received);	
-    }
-
-    protected void waitForBlocked(final AtomicBoolean done)
-            throws InterruptedException {
-        while (true) {
-            Thread.sleep(1000);
-            // the producer is blocked once the done flag stays true
-            if (done.get()) {
-                LOG.info("Blocked....");
-                break;
-            }
-            done.set(true);
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setDeleteAllMessagesOnStartup(true);
-        
-        service.setUseJmx(false);
-
-        service.getSystemUsage().getStoreUsage().setLimit(200*1024);
-        
-        // allow destination to use 50% of store, leaving 50% for DLQ.
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry policy = new PolicyEntry();
-        policy.setStoreUsageHighWaterMark(50);
-        policyMap.put(queueDest, policy);
-        policyMap.put(topicDest, policy);
-        service.setDestinationPolicy(policyMap);
-
-        connector = service.addConnector("tcp://localhost:0");
-        return service;
-    }
-
-    public void setUp() throws Exception {
-        setAutoFail(true);
-        super.setUp();
-    }
-    
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            TcpTransport t = (TcpTransport)connection.getTransport().narrow(TcpTransport.class);
-            t.getTransportListener().onException(new IOException("Disposed."));
-            connection.getTransport().stop();
-            super.tearDown();
-        }
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(connector.getConnectUri());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
deleted file mode 100644
index c18eccd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * 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;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ResourceAllocationException;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-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.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-
-public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setPersistent(false);
-        service.setUseJmx(false);
-
-        // Setup a destination policy where it takes only 1 message at a time.
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry policy = new PolicyEntry();
-        policy.setMemoryLimit(1);
-        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
-        policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-        policy.setProducerFlowControl(true);
-        policyMap.setDefaultEntry(policy);
-        service.setDestinationPolicy(policyMap);
-        
-        service.getSystemUsage().setSendFailIfNoSpace(true);
-
-        connector = service.addConnector("tcp://localhost:0");
-        return service;
-    }
-    
-    @Override
-    public void test2ndPubisherWithStandardConnectionThatIsBlocked() throws Exception {
-        // with sendFailIfNoSpace set, there is no blocking of the connection
-    }
-    
-    @Override
-    public void testAsyncPubisherRecoverAfterBlock() throws Exception {
-        // sendFail means no flowControllwindow as there is no producer ack, just an exception
-    }
-    
-    @Override
-    public void testPubisherRecoverAfterBlock() throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        // with sendFail, there must be no flowControllwindow
-        // sendFail is an alternative flow control mechanism that does not block
-        factory.setUseAsyncSend(true);
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        final Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        final MessageProducer producer = session.createProducer(queueA);
-        
-        final AtomicBoolean keepGoing = new AtomicBoolean(true);
-   
-        Thread thread = new Thread("Filler") {
-            @Override
-            public void run() {
-                while (keepGoing.get()) {
-                    try {
-                        producer.send(session.createTextMessage("Test message"));
-                        if (gotResourceException.get()) {
-                            // do not flood the broker with requests when full as we are sending async and they 
-                            // will be limited by the network buffers
-                            Thread.sleep(200);
-                        }
-                    } catch (Exception e) {
-                        // with async send, there will be no exceptions
-                        e.printStackTrace();
-                    }
-                }
-            }
-        };
-        thread.start();
-        waitForBlockedOrResourceLimit(new AtomicBoolean(false));
-
-        // resourceException on second message, resumption if we
-        // can receive 10
-        MessageConsumer consumer = session.createConsumer(queueA);
-        TextMessage msg;
-        for (int idx = 0; idx < 10; ++idx) {
-            msg = (TextMessage) consumer.receive(1000);
-            if (msg != null) {
-                msg.acknowledge();
-            }
-        }
-        keepGoing.set(false);
-    }
-
-    public void testPubisherRecoverAfterBlockWithSyncSend() throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        factory.setExceptionListener(null);
-        factory.setUseAsyncSend(false);
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        final Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        final MessageProducer producer = session.createProducer(queueA);
-        
-        final AtomicBoolean keepGoing = new AtomicBoolean(true);
-        final AtomicInteger exceptionCount = new AtomicInteger(0);
-        Thread thread = new Thread("Filler") {
-            @Override
-            public void run() {
-                while (keepGoing.get()) {
-                    try {
-                        producer.send(session.createTextMessage("Test message"));
-                    } catch (JMSException arg0) {
-                        if (arg0 instanceof ResourceAllocationException) {
-                            gotResourceException.set(true);
-                            exceptionCount.incrementAndGet();
-                        }
-                    }
-                }
-            }
-        };
-        thread.start();
-        waitForBlockedOrResourceLimit(new AtomicBoolean(false));
-
-        // resourceException on second message, resumption if we
-        // can receive 10
-        MessageConsumer consumer = session.createConsumer(queueA);
-        TextMessage msg;
-        for (int idx = 0; idx < 10; ++idx) {
-            msg = (TextMessage) consumer.receive(1000);
-            if (msg != null) {
-                msg.acknowledge();
-            }
-        }
-        assertTrue("we were blocked at least 5 times", 5 < exceptionCount.get());
-        keepGoing.set(false);
-    }
-    
-	@Override
-	protected ConnectionFactory createConnectionFactory() throws Exception {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(connector.getConnectUri());
-		connectionFactory.setExceptionListener(new ExceptionListener() {
-				public void onException(JMSException arg0) {
-					if (arg0 instanceof ResourceAllocationException) {
-						gotResourceException.set(true);
-					}
-				}
-	        });
-		return connectionFactory;
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java
deleted file mode 100644
index 70e15ec..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ProducerFlowControlTest extends JmsTestSupport {
-    static final Logger LOG = LoggerFactory.getLogger(ProducerFlowControlTest.class);
-    ActiveMQQueue queueA = new ActiveMQQueue("QUEUE.A");
-    ActiveMQQueue queueB = new ActiveMQQueue("QUEUE.B");
-    protected TransportConnector connector;
-    protected ActiveMQConnection connection;
-    // used to test sendFailIfNoSpace on SystemUsage 
-    protected final AtomicBoolean gotResourceException = new AtomicBoolean(false);
-
-    public void test2ndPubisherWithProducerWindowSendConnectionThatIsBlocked() throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        factory.setProducerWindowSize(1024 * 64);
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(queueB);
-
-        // Test sending to Queue A
-        // 1 few sends should not block until the producer window is used up.
-        fillQueue(queueA);
-
-        // Test sending to Queue B it should not block since the connection
-        // should not be blocked.
-        CountDownLatch pubishDoneToQeueuB = asyncSendTo(queueB, "Message 1");
-        assertTrue(pubishDoneToQeueuB.await(2, TimeUnit.SECONDS));
-
-        TextMessage msg = (TextMessage)consumer.receive();
-        assertEquals("Message 1", msg.getText());
-        msg.acknowledge();
-
-        pubishDoneToQeueuB = asyncSendTo(queueB, "Message 2");
-        assertTrue(pubishDoneToQeueuB.await(2, TimeUnit.SECONDS));
-
-        msg = (TextMessage)consumer.receive();
-        assertEquals("Message 2", msg.getText());
-        msg.acknowledge();
-    }
-
-    public void testPubisherRecoverAfterBlock() throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        final Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        final MessageProducer producer = session.createProducer(queueA);
-        
-        final AtomicBoolean done = new AtomicBoolean(true);
-        final AtomicBoolean keepGoing = new AtomicBoolean(true);
-        
-   
-		Thread thread = new Thread("Filler") {
-		    int i;
-			@Override
-			public void run() {
-                while (keepGoing.get()) {
-                    done.set(false);
-                    try {
-						producer.send(session.createTextMessage("Test message " + ++i));
-						LOG.info("sent: " + i);
-					} catch (JMSException e) {
-					}
-                }
-			}
-		};
-		thread.start();
-        waitForBlockedOrResourceLimit(done);
-
-        // after receiveing messges, producer should continue sending messages 
-        // (done == false)
-        MessageConsumer consumer = session.createConsumer(queueA);
-        TextMessage msg;
-        for (int idx = 0; idx < 5; ++idx) {
-        	msg = (TextMessage) consumer.receive(1000);
-        	LOG.info("received: " + idx + ", msg: " + msg.getJMSMessageID());
-        	msg.acknowledge();
-        }
-        Thread.sleep(1000);
-        keepGoing.set(false);
-    	
-		assertFalse("producer has resumed", done.get());
-    }
-
-    public void testAsyncPubisherRecoverAfterBlock() throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        factory.setProducerWindowSize(1024 * 5);
-        factory.setUseAsyncSend(true);
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        final Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        final MessageProducer producer = session.createProducer(queueA);
-        
-        final AtomicBoolean done = new AtomicBoolean(true);
-        final AtomicBoolean keepGoing = new AtomicBoolean(true);
-        
-   
-        Thread thread = new Thread("Filler") {
-            int i;
-            @Override
-            public void run() {
-                while (keepGoing.get()) {
-                    done.set(false);
-                    try {
-                        producer.send(session.createTextMessage("Test message " + ++i));
-                        LOG.info("sent: " + i);
-                    } catch (JMSException e) {
-                    }
-                }
-            }
-        };
-        thread.start();
-        waitForBlockedOrResourceLimit(done);
-
-        // after receiveing messges, producer should continue sending messages 
-        // (done == false)
-        MessageConsumer consumer = session.createConsumer(queueA);
-        TextMessage msg;
-        for (int idx = 0; idx < 5; ++idx) {
-            msg = (TextMessage) consumer.receive(1000);
-            assertNotNull("Got a message", msg);
-            LOG.info("received: " + idx + ", msg: " + msg.getJMSMessageID());
-            msg.acknowledge();
-        }
-        Thread.sleep(1000);
-        keepGoing.set(false);
-        
-        assertFalse("producer has resumed", done.get());
-    }
-
-    public void test2ndPubisherWithSyncSendConnectionThatIsBlocked() throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        factory.setAlwaysSyncSend(true);
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(queueB);
-
-        // Test sending to Queue A
-        // 1st send should not block. But the rest will.
-        fillQueue(queueA);
-
-        // Test sending to Queue B it should not block.
-        CountDownLatch pubishDoneToQeueuB = asyncSendTo(queueB, "Message 1");
-        assertTrue(pubishDoneToQeueuB.await(2, TimeUnit.SECONDS));
-
-        TextMessage msg = (TextMessage)consumer.receive();
-        assertEquals("Message 1", msg.getText());
-        msg.acknowledge();
-
-        pubishDoneToQeueuB = asyncSendTo(queueB, "Message 2");
-        assertTrue(pubishDoneToQeueuB.await(2, TimeUnit.SECONDS));
-
-        msg = (TextMessage)consumer.receive();
-        assertEquals("Message 2", msg.getText());
-        msg.acknowledge();
-    }
-
-    public void testSimpleSendReceive() throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        factory.setAlwaysSyncSend(true);
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(queueA);
-
-        // Test sending to Queue B it should not block.
-        CountDownLatch pubishDoneToQeueuA = asyncSendTo(queueA, "Message 1");
-        assertTrue(pubishDoneToQeueuA.await(2, TimeUnit.SECONDS));
-
-        TextMessage msg = (TextMessage)consumer.receive();
-        assertEquals("Message 1", msg.getText());
-        msg.acknowledge();
-
-        pubishDoneToQeueuA = asyncSendTo(queueA, "Message 2");
-        assertTrue(pubishDoneToQeueuA.await(2, TimeUnit.SECONDS));
-
-        msg = (TextMessage)consumer.receive();
-        assertEquals("Message 2", msg.getText());
-        msg.acknowledge();
-    }
-
-    public void test2ndPubisherWithStandardConnectionThatIsBlocked() throws Exception {
-        ConnectionFactory factory = createConnectionFactory();
-        connection = (ActiveMQConnection)factory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        // Test sending to Queue A
-        // 1st send should not block.
-        fillQueue(queueA);
-
-        // Test sending to Queue B it should block.
-        // Since even though the it's queue limits have not been reached, the
-        // connection
-        // is blocked.
-        CountDownLatch pubishDoneToQeueuB = asyncSendTo(queueB, "Message 1");
-        assertFalse(pubishDoneToQeueuB.await(2, TimeUnit.SECONDS));
-    }
-
-    private void fillQueue(final ActiveMQQueue queue) throws JMSException, InterruptedException {
-        final AtomicBoolean done = new AtomicBoolean(true);
-        final AtomicBoolean keepGoing = new AtomicBoolean(true);
-
-        // Starts an async thread that every time it publishes it sets the done
-        // flag to false.
-        // Once the send starts to block it will not reset the done flag
-        // anymore.
-        new Thread("Fill thread.") {
-            public void run() {
-                Session session = null;
-                try {
-                    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageProducer producer = session.createProducer(queue);
-                    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                    while (keepGoing.get()) {
-                        done.set(false);
-                        producer.send(session.createTextMessage("Hello World"));
-                    }
-                } catch (JMSException e) {
-                } finally {
-                    safeClose(session);
-                }
-            }
-        }.start();
-
-        waitForBlockedOrResourceLimit(done);
-        keepGoing.set(false);
-    }
-
-    protected void waitForBlockedOrResourceLimit(final AtomicBoolean done)
-            throws InterruptedException {
-        while (true) {
-            Thread.sleep(1000);
-            // the producer is blocked once the done flag stays true or there is a resource exception
-            if (done.get() || gotResourceException.get()) {
-                break;
-            }
-            done.set(true);
-        }
-    }
-
-    private CountDownLatch asyncSendTo(final ActiveMQQueue queue, final String message) throws JMSException {
-        final CountDownLatch done = new CountDownLatch(1);
-        new Thread("Send thread.") {
-            public void run() {
-                Session session = null;
-                try {
-                    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageProducer producer = session.createProducer(queue);
-                    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                    producer.send(session.createTextMessage(message));
-                    done.countDown();
-                } catch (JMSException e) {
-                } finally {
-                    safeClose(session);
-                }
-            }
-        }.start();
-        return done;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setPersistent(false);
-        service.setUseJmx(false);
-
-        // Setup a destination policy where it takes only 1 message at a time.
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry policy = new PolicyEntry();
-        policy.setMemoryLimit(1);
-        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
-        policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-        policy.setProducerFlowControl(true);
-        policyMap.setDefaultEntry(policy);
-        service.setDestinationPolicy(policyMap);
-
-        connector = service.addConnector("tcp://localhost:0");
-        return service;
-    }
-
-    public void setUp() throws Exception {
-        setAutoFail(true);
-        super.setUp();
-    }
-    
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            TcpTransport t = (TcpTransport)connection.getTransport().narrow(TcpTransport.class);
-            t.getTransportListener().onException(new IOException("Disposed."));
-            connection.getTransport().stop();
-        }
-        super.tearDown();
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(connector.getConnectUri());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
deleted file mode 100644
index 0154f0e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQQueue;
-
-public class QueueConsumerPriorityTest extends TestCase {
-
-    private static final String VM_BROKER_URL = "vm://localhost?broker.persistent=false&broker.useJmx=true";
-
-    public QueueConsumerPriorityTest(String name) {
-        super(name);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    private Connection createConnection(final boolean start) throws JMSException {
-        ConnectionFactory cf = new ActiveMQConnectionFactory(VM_BROKER_URL);
-        Connection conn = cf.createConnection();
-        if (start) {
-            conn.start();
-        }
-        return conn;
-    }
-
-    public void testQueueConsumerPriority() throws JMSException, InterruptedException {
-        Connection conn = createConnection(true);
-
-        Session consumerLowPriority = null;
-        Session consumerHighPriority = null;
-        Session senderSession = null;
-
-        try {
-
-            consumerLowPriority = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            consumerHighPriority = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            String queueName = getClass().getName();
-            ActiveMQQueue low = new ActiveMQQueue(queueName+"?consumer.priority=1");
-            MessageConsumer lowConsumer = consumerLowPriority.createConsumer(low);
-
-            ActiveMQQueue high = new ActiveMQQueue(queueName+"?consumer.priority=2");
-            MessageConsumer highConsumer = consumerLowPriority.createConsumer(high);
-
-            ActiveMQQueue senderQueue = new ActiveMQQueue(queueName);
-
-            MessageProducer producer = senderSession.createProducer(senderQueue);
-
-            Message msg = senderSession.createTextMessage("test");
-            for (int i =0; i< 10000;i++) {
-                producer.send(msg);
-                Assert.assertNotNull("null on iteration: " + i, highConsumer.receive(500));
-            }
-            Assert.assertNull(lowConsumer.receive(2000));
-            
-           
-        } finally {
-            conn.close();
-        }
-
-    }
-
-
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
deleted file mode 100644
index a935239..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.InvalidClientIDException;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class ReconnectWithSameClientIDTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ReconnectWithSameClientIDTest.class);
-
-    protected Connection connection;
-    protected boolean transacted;
-    protected int authMode = Session.AUTO_ACKNOWLEDGE;
-
-    public void testReconnectMultipleTimesWithSameClientID() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-
-        // now lets create another which should fail
-        for (int i = 1; i < 11; i++) {
-            Connection connection2 = connectionFactory.createConnection();
-            try {
-                useConnection(connection2);
-                fail("Should have thrown InvalidClientIDException on attempt" + i);
-            } catch (InvalidClientIDException e) {
-                connection2.close();
-                LOG.info("Caught expected: " + e);
-            }
-        }
-
-        // now lets try closing the original connection and creating a new
-        // connection with the same ID
-        connection.close();
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-    }
-
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:61616";
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    protected void useConnection(Connection connection) throws JMSException {
-        connection.setClientID("foo");
-        connection.start();
-        /**
-         * Session session = connection.createSession(transacted, authMode);
-         * return session;
-         */
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
deleted file mode 100644
index 1e378d4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
+++ /dev/null
@@ -1,482 +0,0 @@
-/**
- * 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;
-
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.Test;
-
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * Test cases used to test the JMS message exclusive consumers.
- *
- *
- */
-public class RedeliveryPolicyTest extends JmsTestSupport {
-
-    public static Test suite() {
-        return suite(RedeliveryPolicyTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testExponentialRedeliveryPolicyDelaysDeliveryOnRollback() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(0);
-        policy.setRedeliveryDelay(500);
-        policy.setBackOffMultiplier((short) 2);
-        policy.setUseExponentialBackOff(true);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue(getName());
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        // No delay on first rollback..
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        session.rollback();
-
-        // Show subsequent re-delivery delay is incrementing.
-        m = (TextMessage)consumer.receive(100);
-        assertNull(m);
-
-        m = (TextMessage)consumer.receive(700);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        // Show re-delivery delay is incrementing exponentially
-        m = (TextMessage)consumer.receive(100);
-        assertNull(m);
-        m = (TextMessage)consumer.receive(500);
-        assertNull(m);
-        m = (TextMessage)consumer.receive(700);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-
-    }
-
-
-    /**
-     * @throws Exception
-     */
-    public void testNornalRedeliveryPolicyDelaysDeliveryOnRollback() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(0);
-        policy.setRedeliveryDelay(500);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue(getName());
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        // No delay on first rollback..
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        session.rollback();
-
-        // Show subsequent re-delivery delay is incrementing.
-        m = (TextMessage)consumer.receive(100);
-        assertNull(m);
-        m = (TextMessage)consumer.receive(700);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        // The message gets redelivered after 500 ms every time since
-        // we are not using exponential backoff.
-        m = (TextMessage)consumer.receive(100);
-        assertNull(m);
-        m = (TextMessage)consumer.receive(700);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testDLQHandling() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(100);
-        policy.setUseExponentialBackOff(false);
-        policy.setMaximumRedeliveries(2);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageConsumer dlqConsumer = session.createConsumer(new ActiveMQQueue("ActiveMQ.DLQ"));
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        // The last rollback should cause the 1st message to get sent to the DLQ
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("2nd", m.getText());
-        session.commit();
-
-        // We should be able to get the message off the DLQ now.
-        m = (TextMessage)dlqConsumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.commit();
-
-    }
-
-
-    /**
-     * @throws Exception
-     */
-    public void testInfiniteMaximumNumberOfRedeliveries() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(100);
-        policy.setUseExponentialBackOff(false);
-       //  let's set the maximum redeliveries to no maximum (ie. infinite)
-        policy.setMaximumRedeliveries(-1);
-
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        //we should be able to get the 1st message redelivered until a session.commit is called
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.commit();
-
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("2nd", m.getText());
-        session.commit();
-
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testMaximumRedeliveryDelay() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(10);
-        policy.setUseExponentialBackOff(true);
-        policy.setMaximumRedeliveries(-1);
-        policy.setRedeliveryDelay(50);
-        policy.setMaximumRedeliveryDelay(1000);
-        policy.setBackOffMultiplier((short) 2);
-        policy.setUseExponentialBackOff(true);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-
-        for(int i = 0; i < 10; ++i) {
-            // we should be able to get the 1st message redelivered until a session.commit is called
-            m = (TextMessage)consumer.receive(2000);
-            assertNotNull(m);
-            assertEquals("1st", m.getText());
-            session.rollback();
-        }
-
-        m = (TextMessage)consumer.receive(2000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.commit();
-
-        m = (TextMessage)consumer.receive(2000);
-        assertNotNull(m);
-        assertEquals("2nd", m.getText());
-        session.commit();
-
-        assertTrue(policy.getNextRedeliveryDelay(Long.MAX_VALUE) == 1000 );
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testZeroMaximumNumberOfRedeliveries() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(100);
-        policy.setUseExponentialBackOff(false);
-        //let's set the maximum redeliveries to 0
-        policy.setMaximumRedeliveries(0);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        //the 1st  message should not be redelivered since maximumRedeliveries is set to 0
-        m = (TextMessage)consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("2nd", m.getText());
-        session.commit();
-
-
-
-    }
-
-
-    public void testInitialRedeliveryDelayZero() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(0);
-        policy.setUseExponentialBackOff(false);
-        policy.setMaximumRedeliveries(1);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        assertEquals("2nd", m.getText());
-        session.commit();
-
-        session.commit();
-    }
-
-
-    public void testInitialRedeliveryDelayOne() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(1000);
-        policy.setUseExponentialBackOff(false);
-        policy.setMaximumRedeliveries(1);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(100);
-        assertNull(m);
-
-        m = (TextMessage)consumer.receive(2000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        assertEquals("2nd", m.getText());
-        session.commit();
-    }
-
-    public void testRedeliveryDelayOne() throws Exception {
-
-        // Receive a message with the JMS API
-        RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-        policy.setInitialRedeliveryDelay(0);
-        policy.setRedeliveryDelay(1000);
-        policy.setUseExponentialBackOff(false);
-        policy.setMaximumRedeliveries(2);
-
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-        MessageProducer producer = session.createProducer(destination);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Send the messages
-        producer.send(session.createTextMessage("1st"));
-        producer.send(session.createTextMessage("2nd"));
-        session.commit();
-
-        TextMessage m;
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull("first immediate redelivery", m);
-        session.rollback();
-
-        m = (TextMessage)consumer.receive(100);
-        assertNull("second delivery delayed: " + m, m);
-
-        m = (TextMessage)consumer.receive(2000);
-        assertNotNull(m);
-        assertEquals("1st", m.getText());
-
-        m = (TextMessage)consumer.receive(100);
-        assertNotNull(m);
-        assertEquals("2nd", m.getText());
-        session.commit();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/RemoveDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/RemoveDestinationTest.java
deleted file mode 100644
index 292470f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/RemoveDestinationTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * 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;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TextMessage;
-import javax.management.ObjectName;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.advisory.DestinationSource;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-
-import junit.framework.TestCase;
-
-public class RemoveDestinationTest extends TestCase {
-
-    private static final String VM_BROKER_URL = "vm://localhost?create=false";
-    private static final String BROKER_URL = "broker:vm://localhost?broker.persistent=false&broker.useJmx=true";
-    
-    BrokerService broker;
-    
-    public RemoveDestinationTest(String name) {
-        super(name);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        
-        broker = BrokerFactory.createBroker(new URI(BROKER_URL));
-        broker.start();
-        
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        broker.stop();
-    }
-
-    private Connection createConnection(final boolean start) throws JMSException {
-        ConnectionFactory cf = new ActiveMQConnectionFactory(VM_BROKER_URL);
-        Connection conn = cf.createConnection();
-        if (start) {
-            conn.start();
-        }
-        return conn;
-    }
-
-    public void testRemoveDestinationWithoutSubscriber() throws Exception {
-
-        ActiveMQConnection amqConnection = (ActiveMQConnection) createConnection(true);
-        DestinationSource destinationSource = amqConnection.getDestinationSource();
-        Session session = amqConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TEST.FOO");
-        MessageProducer producer = session.createProducer(topic);
-        MessageConsumer consumer = session.createConsumer(topic);
-
-        TextMessage msg = session.createTextMessage("Hellow World");
-        producer.send(msg);
-        assertNotNull( consumer.receive( 5000 ) );
-        Thread.sleep( 1000 );
-
-        ActiveMQTopic amqTopic = (ActiveMQTopic)topic;
-        assertTrue( destinationSource.getTopics().contains(amqTopic) );
-
-        consumer.close();
-        producer.close();
-        session.close();
-
-        Thread.sleep( 3000 );
-        
-        amqConnection.destroyDestination( (ActiveMQDestination)topic );
-        
-        Thread.sleep( 3000 );
-
-        assertFalse( destinationSource.getTopics().contains(amqTopic) );
-    }
-
-    public void testRemoveDestinationWithSubscriber() throws Exception {
-        ActiveMQConnection amqConnection = (ActiveMQConnection) createConnection(true);
-        DestinationSource destinationSource = amqConnection.getDestinationSource();
-        
-        Session session = amqConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TEST.FOO");
-        MessageProducer producer = session.createProducer(topic);
-        MessageConsumer consumer = session.createConsumer(topic);
-
-        TextMessage msg = session.createTextMessage("Hellow World");
-        producer.send(msg);
-        assertNotNull( consumer.receive( 5000 ) );
-        Thread.sleep( 1000 );
-
-        ActiveMQTopic amqTopic = (ActiveMQTopic)topic;
-
-        assertTrue(destinationPresentInAdminView(broker, amqTopic));
-        
-        assertTrue( destinationSource.getTopics().contains(amqTopic) );
-
-        // This line generates a broker error since the consumer is still active.
-        try{
-            amqConnection.destroyDestination( (ActiveMQDestination)topic );
-            fail("expect exception on destroy if comsumer present");
-        } catch( JMSException expected ) {
-            assertTrue(expected.getMessage().indexOf(amqTopic.getTopicName()) != -1);
-        }
-
-        Thread.sleep( 3000 );
-
-        assertTrue( destinationSource.getTopics().contains(amqTopic) );
-        assertTrue(destinationPresentInAdminView(broker, amqTopic));
-        
-        consumer.close();
-        producer.close();
-        session.close();
-
-        Thread.sleep( 3000 );
-
-        // The destination will not be removed with this call, but if you remove the call
-        // above that generates the error it will.
-        amqConnection.destroyDestination( amqTopic );
-
-        Thread.sleep( 3000 );
-
-        assertFalse( destinationSource.getTopics().contains(amqTopic) );
-        assertFalse(destinationPresentInAdminView(broker, amqTopic));
-        
-    }
-
-    private boolean destinationPresentInAdminView(BrokerService broker2,
-            ActiveMQTopic amqTopic) throws Exception {
-        boolean found = false;
-        for (ObjectName name : broker.getAdminView().getTopics()) {
-            if (name.getKeyProperty("Destination") != null &&
-                    name.getKeyProperty("Destination").equalsIgnoreCase(amqTopic.getTopicName())) {
-                found = true;
-                break;
-            }   
-        }
-        return found;
-    }
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/SpringTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/SpringTestSupport.java
deleted file mode 100755
index e57f2c0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/SpringTestSupport.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-
-/**
- * A useful base class for spring based unit test cases
- * 
- * 
- */
-public abstract class SpringTestSupport extends TestCase {
-
-    protected AbstractApplicationContext context;
-
-    protected void setUp() throws Exception {
-        context = createApplicationContext();
-    }
-
-    protected abstract AbstractApplicationContext createApplicationContext();;
-
-    protected void tearDown() throws Exception {
-        if (context != null) {
-            context.destroy();
-        }
-    }
-
-    protected Object getBean(String name) {
-        Object bean = context.getBean(name);
-        if (bean == null) {
-            fail("Should have found bean named '" + name + "' in the Spring ApplicationContext");
-        }
-        return bean;
-    }
-
-    protected void assertSetEquals(String description, Object[] expected, Set actual) {
-        Set<Object> expectedSet = new HashSet<Object>();
-        expectedSet.addAll(Arrays.asList(expected));
-        assertEquals(description, expectedSet, actual);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java
deleted file mode 100755
index f2a7d81..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Useful base class for unit test cases
- * 
- * 
- */
-public abstract class TestSupport extends CombinationTestSupport {
-
-    protected ActiveMQConnectionFactory connectionFactory;
-    protected boolean topic = true;
-    public PersistenceAdapterChoice defaultPersistenceAdapter = PersistenceAdapterChoice.KahaDB;
-
-    protected ActiveMQMessage createMessage() {
-        return new ActiveMQMessage();
-    }
-
-    protected Destination createDestination(String subject) {
-        if (topic) {
-            return new ActiveMQTopic(subject);
-        } else {
-            return new ActiveMQQueue(subject);
-        }
-    }
-
-    protected Destination createDestination() {
-        return createDestination(getDestinationString());
-    }
-
-    /**
-     * Returns the name of the destination used in this test case
-     */
-    protected String getDestinationString() {
-        return getClass().getName() + "." + getName(true);
-    }
-
-    /**
-     * @param messsage
-     * @param firstSet
-     * @param secondSet
-     */
-    protected void assertTextMessagesEqual(String messsage, Message[] firstSet, Message[] secondSet)
-        throws JMSException {
-        assertEquals("Message count does not match: " + messsage, firstSet.length, secondSet.length);
-        for (int i = 0; i < secondSet.length; i++) {
-            TextMessage m1 = (TextMessage)firstSet[i];
-            TextMessage m2 = (TextMessage)secondSet[i];
-            assertFalse("Message " + (i + 1) + " did not match : " + messsage + ": expected {" + m1
-                        + "}, but was {" + m2 + "}", m1 == null ^ m2 == null);
-            assertEquals("Message " + (i + 1) + " did not match: " + messsage + ": expected {" + m1
-                         + "}, but was {" + m2 + "}", m1.getText(), m2.getText());
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-    }
-
-    /**
-     * Factory method to create a new connection
-     */
-    protected Connection createConnection() throws Exception {
-        return getConnectionFactory().createConnection();
-    }
-
-    public ActiveMQConnectionFactory getConnectionFactory() throws Exception {
-        if (connectionFactory == null) {
-            connectionFactory = createConnectionFactory();
-            assertTrue("Should have created a connection factory!", connectionFactory != null);
-        }
-        return connectionFactory;
-    }
-
-    protected String getConsumerSubject() {
-        return getSubject();
-    }
-
-    protected String getProducerSubject() {
-        return getSubject();
-    }
-
-    protected String getSubject() {
-        return getName();
-    }
-
-    public static void recursiveDelete(File f) {
-        if (f.isDirectory()) {
-            File[] files = f.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        f.delete();
-    }
-
-    public static void removeMessageStore() {
-        if (System.getProperty("activemq.store.dir") != null) {
-            recursiveDelete(new File(System.getProperty("activemq.store.dir")));
-        }
-        if (System.getProperty("derby.system.home") != null) {
-            recursiveDelete(new File(System.getProperty("derby.system.home")));
-        }
-    }
-    
-    public static DestinationStatistics getDestinationStatistics(BrokerService broker, ActiveMQDestination destination) {
-        DestinationStatistics result = null;
-        org.apache.activemq.broker.region.Destination dest = getDestination(broker, destination);
-        if (dest != null) {
-            result = dest.getDestinationStatistics();
-        }
-        return result;
-    }
-    
-    public static org.apache.activemq.broker.region.Destination getDestination(BrokerService target, ActiveMQDestination destination) {
-        org.apache.activemq.broker.region.Destination result = null;
-        for (org.apache.activemq.broker.region.Destination dest : getDestinationMap(target, destination).values()) {
-            if (dest.getName().equals(destination.getPhysicalName())) {
-                result = dest;
-                break;
-            }
-        }
-        return result;
-    }
-
-    private static Map<ActiveMQDestination, org.apache.activemq.broker.region.Destination> getDestinationMap(BrokerService target,
-            ActiveMQDestination destination) {
-        RegionBroker regionBroker = (RegionBroker) target.getRegionBroker();
-        return destination.isQueue() ?
-                    regionBroker.getQueueRegion().getDestinationMap() :
-                        regionBroker.getTopicRegion().getDestinationMap();
-    }
-
-    public static enum PersistenceAdapterChoice {KahaDB, AMQ, JDBC, MEM };
-
-    public PersistenceAdapter setDefaultPersistenceAdapter(BrokerService broker) throws IOException {
-        return setPersistenceAdapter(broker, defaultPersistenceAdapter);
-    }
-    
-    public PersistenceAdapter setPersistenceAdapter(BrokerService broker, PersistenceAdapterChoice choice) throws IOException {
-        PersistenceAdapter adapter = null;
-        switch (choice) {
-        case AMQ:
-            adapter = new AMQPersistenceAdapter();
-            break;
-        case JDBC:
-            adapter = new JDBCPersistenceAdapter();
-            break;
-        case KahaDB:
-            adapter = new KahaDBPersistenceAdapter();
-            break;
-        case MEM:
-            adapter = new MemoryPersistenceAdapter();
-            break;
-        }
-        broker.setPersistenceAdapter(adapter);
-        return adapter;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java
deleted file mode 100644
index 2ec57b5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.util.UDPTraceBrokerPlugin;
-import org.apache.activemq.broker.view.ConnectionDotFilePlugin;
-
-public class TimeStampTest extends TestCase {
-    public void test() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setUseJmx(true);
-        broker.setPlugins(new BrokerPlugin[] {new ConnectionDotFilePlugin(), new UDPTraceBrokerPlugin()});
-        TransportConnector tcpConnector = broker.addConnector("tcp://localhost:0");
-        broker.addConnector("stomp://localhost:0");
-        broker.start();
-
-        // Create a ConnectionFactory
-        ActiveMQConnectionFactory connectionFactory =
-            new ActiveMQConnectionFactory(tcpConnector.getConnectUri());
-
-        // Create a Connection
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        // Create a Session
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the destination Queue
-        Destination destination = session.createQueue("TEST.FOO");
-
-        // Create a MessageProducer from the Session to the Topic or Queue
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-        // Create a messages
-        Message sentMessage = session.createMessage();
-
-        // Tell the producer to send the message
-        long beforeSend = System.currentTimeMillis();
-        producer.send(sentMessage);
-        long afterSend = System.currentTimeMillis();
-
-        // assert message timestamp is in window
-        assertTrue(beforeSend <= sentMessage.getJMSTimestamp() && sentMessage.getJMSTimestamp() <= afterSend);
-
-        // Create a MessageConsumer from the Session to the Topic or Queue
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        // Wait for a message
-        Message receivedMessage = consumer.receive(1000);
-
-        // assert we got the same message ID we sent
-        assertEquals(sentMessage.getJMSMessageID(), receivedMessage.getJMSMessageID());
-
-        // assert message timestamp is in window
-        assertTrue("JMS Message Timestamp should be set during the send method: \n" + "        beforeSend = " + beforeSend + "\n" + "   getJMSTimestamp = "
-                   + receivedMessage.getJMSTimestamp() + "\n" + "         afterSend = " + afterSend + "\n", beforeSend <= receivedMessage.getJMSTimestamp()
-                                                                                                            && receivedMessage.getJMSTimestamp() <= afterSend);
-
-        // assert message timestamp is unchanged
-        assertEquals("JMS Message Timestamp of recieved message should be the same as the sent message\n        ", sentMessage.getJMSTimestamp(), receivedMessage.getJMSTimestamp());
-
-        // Clean up
-        producer.close();
-        consumer.close();
-        session.close();
-        connection.close();
-        broker.stop();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/TransactionContextTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/TransactionContextTest.java
deleted file mode 100644
index 5e45d52..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/TransactionContextTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.TransactionRolledBackException;
-
-import org.apache.activemq.transaction.Synchronization;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TransactionContextTest {
-    
-    TransactionContext underTest;
-    ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-    ActiveMQConnection connection;
-    
-    
-    @Before
-    public void setup() throws Exception {
-        connection = factory.createActiveMQConnection();
-        underTest = new TransactionContext(connection);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        connection.close();
-    }
-    
-    @Test
-    public void testSyncBeforeEndCalledOnceOnRollback() throws Exception {
-        final AtomicInteger beforeEndCountA = new AtomicInteger(0);
-        final AtomicInteger beforeEndCountB = new AtomicInteger(0);
-        final AtomicInteger rollbackCountA = new AtomicInteger(0);
-        final AtomicInteger rollbackCountB = new AtomicInteger(0);
-        underTest.addSynchronization(new Synchronization() {
-            @Override
-            public void beforeEnd() throws Exception {
-                if (beforeEndCountA.getAndIncrement() == 0) {
-                    throw new TransactionRolledBackException("force rollback");
-                }
-            }
-
-            @Override
-            public void afterCommit() throws Exception {
-                fail("exepcted rollback exception");
-            }
-
-            @Override
-            public void afterRollback() throws Exception {
-                rollbackCountA.incrementAndGet();
-            }
-            
-        });
-        
-        underTest.addSynchronization(new Synchronization() {
-            @Override
-            public void beforeEnd() throws Exception {
-                beforeEndCountB.getAndIncrement();
-            }
-            
-            @Override     
-            public void afterCommit() throws Exception {
-                fail("exepcted rollback exception");
-            }
-
-            @Override
-            public void afterRollback() throws Exception {
-                rollbackCountB.incrementAndGet();
-            }
-
-        });
-        
-        
-        try {
-            underTest.commit();
-            fail("exepcted rollback exception");
-        } catch (TransactionRolledBackException expected) {
-        }
-        
-        assertEquals("beforeEnd A called once", 1, beforeEndCountA.get());
-        assertEquals("beforeEnd B called once", 1, beforeEndCountA.get());
-        assertEquals("rollbackCount B 0", 1, rollbackCountB.get());
-        assertEquals("rollbackCount A B", rollbackCountA.get(), rollbackCountB.get());
-    }
-    
-    @Test
-    public void testSyncIndexCleared() throws Exception {
-        final AtomicInteger beforeEndCountA = new AtomicInteger(0);
-        final AtomicInteger rollbackCountA = new AtomicInteger(0);
-        Synchronization sync = new Synchronization() {
-            @Override
-            public void beforeEnd() throws Exception {
-                beforeEndCountA.getAndIncrement();
-            }
-            @Override
-            public void afterCommit() throws Exception {
-                fail("exepcted rollback exception");
-            }
-            @Override
-            public void afterRollback() throws Exception {
-                rollbackCountA.incrementAndGet();
-            } 
-        };
-        
-        underTest.begin();
-        underTest.addSynchronization(sync);
-        underTest.rollback();
-        
-        assertEquals("beforeEnd", 1, beforeEndCountA.get());
-        assertEquals("rollback", 1, rollbackCountA.get());
-     
-        // do it again
-        underTest.begin();
-        underTest.addSynchronization(sync);
-        underTest.rollback();
-     
-        assertEquals("beforeEnd", 2, beforeEndCountA.get());
-        assertEquals("rollback", 2, rollbackCountA.get());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java
deleted file mode 100644
index fd5f82a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/**
- * 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;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.spring.SpringConsumer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ZeroPrefetchConsumerTest extends EmbeddedBrokerTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ZeroPrefetchConsumerTest.class);
-
-    protected Connection connection;
-    protected Queue queue;
-
-    public void testCannotUseMessageListener() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        MessageListener listener = new SpringConsumer();
-        try {
-            consumer.setMessageListener(listener);
-            fail("Should have thrown JMSException as we cannot use MessageListener with zero prefetch");
-        } catch (JMSException e) {
-            LOG.info("Received expected exception : " + e);
-        }
-    }
-
-    public void testPullConsumerWorks() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Hello World!"));
-
-        // now lets receive it
-        MessageConsumer consumer = session.createConsumer(queue);
-        Message answer = consumer.receive(5000);
-        assertNotNull("Should have received a message!", answer);
-        // check if method will return at all and will return a null
-        answer = consumer.receive(1);
-        assertNull("Should have not received a message!", answer);
-        answer = consumer.receiveNoWait();
-        assertNull("Should have not received a message!", answer);
-    }
-
-    public void testIdleConsumer() throws Exception {
-        doTestIdleConsumer(false);
-    }
-
-    public void testIdleConsumerTranscated() throws Exception {
-        doTestIdleConsumer(true);
-    }
-
-    private void doTestIdleConsumer(boolean transacted) throws Exception {
-        Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Msg1"));
-        producer.send(session.createTextMessage("Msg2"));
-        if (transacted) {
-            session.commit();
-        }
-        // now lets receive it
-        MessageConsumer consumer = session.createConsumer(queue);
-        
-        session.createConsumer(queue);
-        TextMessage answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg1");
-        if (transacted) {
-            session.commit();
-        }
-        // this call would return null if prefetchSize > 0
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg2");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receiveNoWait();
-        assertNull("Should have not received a message!", answer);
-    }
-
-    public void testRecvRecvCommit() throws Exception {
-        doTestRecvRecvCommit(false);
-    }
-
-    public void testRecvRecvCommitTranscated() throws Exception {
-        doTestRecvRecvCommit(true);
-    }
-
-    private void doTestRecvRecvCommit(boolean transacted) throws Exception {
-        Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Msg1"));
-        producer.send(session.createTextMessage("Msg2"));
-        if (transacted) {
-            session.commit();
-        }
-        // now lets receive it
-        MessageConsumer consumer = session.createConsumer(queue);
-        TextMessage answer = (TextMessage)consumer.receiveNoWait();
-        assertEquals("Should have received a message!", answer.getText(), "Msg1");
-        answer = (TextMessage)consumer.receiveNoWait();
-        assertEquals("Should have received a message!", answer.getText(), "Msg2");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receiveNoWait();
-        assertNull("Should have not received a message!", answer);
-    }
-    
-    public void testTwoConsumers() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Msg1"));
-        producer.send(session.createTextMessage("Msg2"));
-
-        // now lets receive it
-        MessageConsumer consumer1 = session.createConsumer(queue);
-        MessageConsumer consumer2 = session.createConsumer(queue);
-        TextMessage answer = (TextMessage)consumer1.receiveNoWait();
-        assertEquals("Should have received a message!", answer.getText(), "Msg1");
-        answer = (TextMessage)consumer2.receiveNoWait();
-        assertEquals("Should have received a message!", answer.getText(), "Msg2");
-
-        answer = (TextMessage)consumer2.receiveNoWait();
-        assertNull("Should have not received a message!", answer);
-    }
-    
-    // https://issues.apache.org/activemq/browse/AMQ-2567
-    public void testManyMessageConsumer() throws Exception {
-        doTestManyMessageConsumer(true);
-    }
-
-    public void testManyMessageConsumerNoTransaction() throws Exception {
-        doTestManyMessageConsumer(false);
-    }
-    
-    private void doTestManyMessageConsumer(boolean transacted) throws Exception {
-        Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Msg1"));
-        producer.send(session.createTextMessage("Msg2"));
-        producer.send(session.createTextMessage("Msg3"));
-        producer.send(session.createTextMessage("Msg4"));
-        producer.send(session.createTextMessage("Msg5"));
-        producer.send(session.createTextMessage("Msg6"));
-        producer.send(session.createTextMessage("Msg7"));
-        producer.send(session.createTextMessage("Msg8"));
-        if (transacted) {
-            session.commit();
-        }
-        // now lets receive it
-        MessageConsumer consumer = session.createConsumer(queue);
-        
-        MessageConsumer consumer2  = session.createConsumer(queue);
-        TextMessage answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg1");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg2");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg3");
-        if (transacted) {
-            session.commit();
-        }
-        // this call would return null if prefetchSize > 0
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg4");
-        if (transacted) {
-            session.commit();
-        }
-        // Now using other consumer 
-        // this call should return the next message (Msg5) still left on the queue
-        answer = (TextMessage)consumer2.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg5");
-        if (transacted) {
-            session.commit();
-        }
-        // Now using other consumer 
-        // this call should return the next message (Msg5) still left on the queue
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg6");
-        // read one more message without commit
-        // Now using other consumer 
-        // this call should return the next message (Msg5) still left on the queue
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg7");
-        if (transacted) {
-            session.commit();
-        }
-        // Now using other consumer 
-        // this call should return the next message (Msg5) still left on the queue
-        answer = (TextMessage)consumer2.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg8");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receiveNoWait();
-        assertNull("Should have not received a message!", answer);
-    }
-
-    public void testManyMessageConsumerWithSend() throws Exception {
-        doTestManyMessageConsumerWithSend(true);
-    }
-
-    public void testManyMessageConsumerWithSendNoTransaction() throws Exception {
-        doTestManyMessageConsumerWithSend(false);
-    }
-    
-    private void doTestManyMessageConsumerWithSend(boolean transacted) throws Exception {
-        Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage("Msg1"));
-        producer.send(session.createTextMessage("Msg2"));
-        producer.send(session.createTextMessage("Msg3"));
-        producer.send(session.createTextMessage("Msg4"));
-        producer.send(session.createTextMessage("Msg5"));
-        producer.send(session.createTextMessage("Msg6"));
-        producer.send(session.createTextMessage("Msg7"));
-        producer.send(session.createTextMessage("Msg8"));
-        if (transacted) {
-            session.commit();
-        }
-        // now lets receive it
-        MessageConsumer consumer = session.createConsumer(queue);
-        
-        MessageConsumer consumer2  = session.createConsumer(queue);
-        TextMessage answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg1");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg2");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg3");
-        if (transacted) {
-            session.commit();
-        }
-        // Now using other consumer take 2
-        answer = (TextMessage)consumer2.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg4");
-        answer = (TextMessage)consumer2.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg5");
-
-        // ensure prefetch extension ok by sending another that could get dispatched
-        producer.send(session.createTextMessage("Msg9"));
-        if (transacted) {
-            session.commit();
-        }
-        
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg6");
-        // read one more message without commit
-        // and using other consumer 
-        answer = (TextMessage)consumer2.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg7");
-        if (transacted) {
-            session.commit();
-        }
-        
-        answer = (TextMessage)consumer2.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg8");
-        if (transacted) {
-            session.commit();
-        }
-        
-        answer = (TextMessage)consumer.receive(5000);
-        assertEquals("Should have received a message!", answer.getText(), "Msg9");
-        if (transacted) {
-            session.commit();
-        }
-        answer = (TextMessage)consumer.receiveNoWait();
-        assertNull("Should have not received a message!", answer);
-    }
-    
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:0";
-        super.setUp();
-
-        connection = createConnection();
-        connection.start();
-        queue = createQueue();
-    }
-    
-    protected void startBroker() throws Exception {
-        super.startBroker();
-        bindAddress = broker.getTransportConnectors().get(0).getConnectUri().toString();
-    }
-
-    protected void tearDown() throws Exception {
-        connection.close();
-        super.tearDown();
-    }
-
-    protected Queue createQueue() {
-        return new ActiveMQQueue(getDestinationString() + "?consumer.prefetchSize=0");
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
deleted file mode 100644
index e48815d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * 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.advisory;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.ConstantPendingMessageLimitStrategy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-
-import javax.jms.*;
-import java.util.ArrayList;
-import java.util.List;
-
-public class AdvisoryTempDestinationTests extends TestCase {
-
-    protected static final int MESSAGE_COUNT = 2000;
-    protected BrokerService broker;
-    protected Connection connection;
-    protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL;
-    protected int topicCount;
-
-
-    public void testNoSlowConsumerAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = s.createTemporaryQueue();
-        MessageConsumer consumer = s.createConsumer(queue);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-            }
-        });
-        Topic advisoryTopic = AdvisorySupport
-                .getSlowConsumerAdvisoryTopic((ActiveMQDestination) queue);
-        s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        // start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BytesMessage m = s.createBytesMessage();
-            m.writeBytes(new byte[1024]);
-            producer.send(m);
-        }
-        Message msg = advisoryConsumer.receive(1000);
-        assertNull(msg);
-    }
-
-    public void testSlowConsumerAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = s.createTemporaryQueue();
-        MessageConsumer consumer = s.createConsumer(queue);
-
-        Topic advisoryTopic = AdvisorySupport
-                .getSlowConsumerAdvisoryTopic((ActiveMQDestination) queue);
-        s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        // start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BytesMessage m = s.createBytesMessage();
-            m.writeBytes(new byte[1024]);
-            producer.send(m);
-        }
-        Message msg = advisoryConsumer.receive(1000);
-        assertNotNull(msg);
-    }
-
-    public void testMessageDeliveryAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = s.createTemporaryQueue();
-        MessageConsumer consumer = s.createConsumer(queue);
-
-        Topic advisoryTopic = AdvisorySupport.getMessageDeliveredAdvisoryTopic((ActiveMQDestination) queue);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        //start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-
-        BytesMessage m = s.createBytesMessage();
-        m.writeBytes(new byte[1024]);
-        producer.send(m);
-
-        Message msg = advisoryConsumer.receive(1000);
-        assertNotNull(msg);
-    }
-
-    public void testTempMessageConsumedAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue queue = s.createTemporaryQueue();
-        MessageConsumer consumer = s.createConsumer(queue);
-
-        Topic advisoryTopic = AdvisorySupport.getMessageConsumedAdvisoryTopic((ActiveMQDestination) queue);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        //start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-
-        BytesMessage m = s.createBytesMessage();
-        m.writeBytes(new byte[1024]);
-        producer.send(m);
-        String id = m.getJMSMessageID();
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-
-        msg = advisoryConsumer.receive(1000);
-        assertNotNull(msg);
-
-        ActiveMQMessage message = (ActiveMQMessage) msg;
-        ActiveMQMessage payload = (ActiveMQMessage) message.getDataStructure();
-        String originalId = payload.getJMSMessageID();
-        assertEquals(originalId, id);
-    }
-
-    public void testMessageExpiredAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = s.createQueue(getClass().getName());
-        MessageConsumer consumer = s.createConsumer(queue);
-
-        Topic advisoryTopic = AdvisorySupport.getExpiredMessageTopic((ActiveMQDestination) queue);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        //start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        producer.setTimeToLive(1);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BytesMessage m = s.createBytesMessage();
-            m.writeBytes(new byte[1024]);
-            producer.send(m);
-        }
-
-        Message msg = advisoryConsumer.receive(2000);
-        assertNotNull(msg);
-    }
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        ConnectionFactory factory = createConnectionFactory();
-        connection = factory.createConnection();
-        connection.start();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        connection.close();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory()
-            throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
-                ActiveMQConnection.DEFAULT_BROKER_URL);
-        return cf;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.setPersistent(false);
-        ConstantPendingMessageLimitStrategy strategy = new ConstantPendingMessageLimitStrategy();
-        strategy.setLimit(10);
-        PolicyEntry tempQueueEntry = createPolicyEntry(strategy);
-        tempQueueEntry.setTempQueue(true);
-        PolicyEntry tempTopicEntry = createPolicyEntry(strategy);
-        tempTopicEntry.setTempTopic(true);
-
-        PolicyMap pMap = new PolicyMap();
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-        policyEntries.add(tempQueueEntry);
-        policyEntries.add(tempTopicEntry);
-        pMap.setPolicyEntries(policyEntries);
-
-        answer.setDestinationPolicy(pMap);
-        answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-
-    private PolicyEntry createPolicyEntry(ConstantPendingMessageLimitStrategy strategy) {
-        PolicyEntry policy = new PolicyEntry();
-        policy.setAdvisdoryForFastProducers(true);
-        policy.setAdvisoryForConsumed(true);
-        policy.setAdvisoryForDelivery(true);
-        policy.setAdvisoryForDiscardingMessages(true);
-        policy.setAdvisoryForSlowConsumers(true);
-        policy.setAdvisoryWhenFull(true);
-        policy.setProducerFlowControl(false);
-        policy.setPendingMessageLimitStrategy(strategy);
-
-        return policy;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
deleted file mode 100644
index 2dee188..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * 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.advisory;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.Topic;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.ConstantPendingMessageLimitStrategy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-
-/**
- * 
- */
-public class AdvisoryTests extends TestCase {
-    protected static final int MESSAGE_COUNT = 2000;
-    protected BrokerService broker;
-    protected Connection connection;
-    protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL;
-    protected int topicCount;
-   
-
-    public void testNoSlowConsumerAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = s.createQueue(getClass().getName());
-        MessageConsumer consumer = s.createConsumer(queue);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-            }
-        });
-        Topic advisoryTopic = AdvisorySupport
-                .getSlowConsumerAdvisoryTopic((ActiveMQDestination) queue);
-        s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        // start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BytesMessage m = s.createBytesMessage();
-            m.writeBytes(new byte[1024]);
-            producer.send(m);
-        }
-        Message msg = advisoryConsumer.receive(1000);
-        assertNull(msg);
-    }
-    
-    public void testSlowConsumerAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = s.createQueue(getClass().getName());
-        MessageConsumer consumer = s.createConsumer(queue);
-        
-        Topic advisoryTopic = AdvisorySupport
-                .getSlowConsumerAdvisoryTopic((ActiveMQDestination) queue);
-        s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        // start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BytesMessage m = s.createBytesMessage();
-            m.writeBytes(new byte[1024]);
-            producer.send(m);
-        }
-        Message msg = advisoryConsumer.receive(1000);
-        assertNotNull(msg);
-    }
-    
-    public void testMessageDeliveryAdvisory() throws Exception {        
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = s.createQueue(getClass().getName());
-        MessageConsumer consumer = s.createConsumer(queue);
-                
-        Topic advisoryTopic = AdvisorySupport.getMessageDeliveredAdvisoryTopic((ActiveMQDestination) queue);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        //start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        
-        BytesMessage m = s.createBytesMessage();
-        m.writeBytes(new byte[1024]);
-        producer.send(m);
-        
-        Message msg = advisoryConsumer.receive(1000);
-        assertNotNull(msg);
-    }
-    
-    public void testMessageConsumedAdvisory() throws Exception {        
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = s.createQueue(getClass().getName());
-        MessageConsumer consumer = s.createConsumer(queue);
-                
-        Topic advisoryTopic = AdvisorySupport.getMessageConsumedAdvisoryTopic((ActiveMQDestination) queue);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        //start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        
-        BytesMessage m = s.createBytesMessage();
-        m.writeBytes(new byte[1024]);
-        producer.send(m);
-        String id = m.getJMSMessageID();
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        
-        msg = advisoryConsumer.receive(1000);
-        assertNotNull(msg);
-        
-        ActiveMQMessage message = (ActiveMQMessage) msg;
-        ActiveMQMessage payload = (ActiveMQMessage) message.getDataStructure();
-        String originalId = payload.getJMSMessageID();
-        assertEquals(originalId, id);
-    }
-    
-    public void testMessageExpiredAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = s.createQueue(getClass().getName());
-        MessageConsumer consumer = s.createConsumer(queue);
-                
-        Topic advisoryTopic = AdvisorySupport.getExpiredMessageTopic((ActiveMQDestination) queue);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        //start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(queue);
-        producer.setTimeToLive(1);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BytesMessage m = s.createBytesMessage();
-            m.writeBytes(new byte[1024]);
-            producer.send(m);
-        }
-                
-        Message msg = advisoryConsumer.receive(2000);
-        assertNotNull(msg);
-    }
-    
-    public void xtestMessageDiscardedAdvisory() throws Exception {
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = s.createTopic(getClass().getName());
-        MessageConsumer consumer = s.createConsumer(topic);
-                
-        Topic advisoryTopic = AdvisorySupport.getMessageDiscardedAdvisoryTopic((ActiveMQDestination) topic);
-        MessageConsumer advisoryConsumer = s.createConsumer(advisoryTopic);
-        //start throwing messages at the consumer
-        MessageProducer producer = s.createProducer(topic);
-        int count = (new ActiveMQPrefetchPolicy().getTopicPrefetch() * 2);
-        for (int i = 0; i < count; i++) {
-            BytesMessage m = s.createBytesMessage();
-            producer.send(m);
-        }
-                
-        Message msg = advisoryConsumer.receive(1000);
-        assertNotNull(msg);
-    }
-
-   
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        ConnectionFactory factory = createConnectionFactory();
-        connection = factory.createConnection();
-        connection.start();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        connection.close();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory()
-            throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
-                ActiveMQConnection.DEFAULT_BROKER_URL);
-        return cf;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.setPersistent(false);
-        PolicyEntry policy = new PolicyEntry();
-        policy.setAdvisdoryForFastProducers(true);
-        policy.setAdvisoryForConsumed(true);
-        policy.setAdvisoryForDelivery(true);
-        policy.setAdvisoryForDiscardingMessages(true);
-        policy.setAdvisoryForSlowConsumers(true);
-        policy.setAdvisoryWhenFull(true);
-        policy.setProducerFlowControl(false);
-        ConstantPendingMessageLimitStrategy strategy  = new ConstantPendingMessageLimitStrategy();
-        strategy.setLimit(10);
-        policy.setPendingMessageLimitStrategy(strategy);
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        answer.setDestinationPolicy(pMap);
-        answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
deleted file mode 100644
index 4d6875e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.ReconnectWithSameClientIDTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class ConsumerListenerTest extends EmbeddedBrokerTestSupport implements ConsumerListener {
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumerListenerTest.class);
-
-    protected Session consumerSession1;
-    protected Session consumerSession2;
-    protected int consumerCounter;
-    protected ConsumerEventSource consumerEventSource;
-    protected BlockingQueue<ConsumerEvent> eventQueue = new ArrayBlockingQueue<ConsumerEvent>(1000);
-    private Connection connection;
-
-    public void testConsumerEvents() throws Exception {
-        consumerEventSource.start();
-
-        consumerSession1 = createConsumer();
-        assertConsumerEvent(1, true);
-
-        consumerSession2 = createConsumer();
-        assertConsumerEvent(2, true);
-
-        consumerSession1.close();
-        consumerSession1 = null;
-        assertConsumerEvent(1, false);
-
-        consumerSession2.close();
-        consumerSession2 = null;
-        assertConsumerEvent(0, false);
-    }
-
-    public void testListenWhileAlreadyConsumersActive() throws Exception {
-        consumerSession1 = createConsumer();
-        consumerSession2 = createConsumer();
-
-        consumerEventSource.start();
-        assertConsumerEvent(2, true);
-        assertConsumerEvent(2, true);
-
-        consumerSession1.close();
-        consumerSession1 = null;
-        assertConsumerEvent(1, false);
-
-        consumerSession2.close();
-        consumerSession2 = null;
-        assertConsumerEvent(0, false);
-    }
-
-    public void onConsumerEvent(ConsumerEvent event) {
-        eventQueue.add(event);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connection = createConnection();
-        connection.start();
-        consumerEventSource = new ConsumerEventSource(connection, destination);
-        consumerEventSource.setConsumerListener(this);
-    }
-
-    protected void tearDown() throws Exception {
-        if (consumerEventSource != null) {
-            consumerEventSource.stop();
-        }
-        if (consumerSession2 != null) {
-            consumerSession2.close();
-        }
-        if (consumerSession1 != null) {
-            consumerSession1.close();
-        }
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected void assertConsumerEvent(int count, boolean started) throws InterruptedException {
-        ConsumerEvent event = waitForConsumerEvent();
-        assertEquals("Consumer count", count, event.getConsumerCount());
-        assertEquals("started", started, event.isStarted());
-    }
-
-    protected Session createConsumer() throws JMSException {
-        final String consumerText = "Consumer: " + (++consumerCounter);
-        LOG.info("Creating consumer: " + consumerText + " on destination: " + destination);
-
-        Session answer = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = answer.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                LOG.info("Received message by: " + consumerText + " message: " + message);
-            }
-        });
-        return answer;
-    }
-
-    protected ConsumerEvent waitForConsumerEvent() throws InterruptedException {
-        ConsumerEvent answer = eventQueue.poll(100000, TimeUnit.MILLISECONDS);
-        assertTrue("Should have received a consumer event!", answer != null);
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
deleted file mode 100644
index 01dc443..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import javax.jms.Session;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
-
-/**
- * 
- */
-public class DestinationListenerTest extends EmbeddedBrokerTestSupport implements DestinationListener {
-    private static final transient Logger LOG = LoggerFactory.getLogger(DestinationListenerTest.class);
-    protected ActiveMQConnection connection;
-    protected ActiveMQQueue sampleQueue = new ActiveMQQueue("foo.bar");
-    protected ActiveMQTopic sampleTopic = new ActiveMQTopic("cheese");
-    protected List<ActiveMQDestination> newDestinations = new ArrayList<ActiveMQDestination>();
-
-    public void testDestiationSourceHasInitialDestinations() throws Exception {
-        Thread.sleep(1000);
-
-        DestinationSource destinationSource = connection.getDestinationSource();
-        Set<ActiveMQQueue> queues = destinationSource.getQueues();
-        Set<ActiveMQTopic> topics = destinationSource.getTopics();
-
-        LOG.info("Queues: " + queues);
-        LOG.info("Topics: " + topics);
-
-        assertTrue("The queues should not be empty!", !queues.isEmpty());
-        assertTrue("The topics should not be empty!", !topics.isEmpty());
-
-        assertTrue("queues contains initial queue: " + queues, queues.contains(sampleQueue));
-        assertTrue("topics contains initial topic: " + queues, topics.contains(sampleTopic));
-    }
-
-    public void testConsumerForcesNotificationOfNewDestination() throws Exception {
-        // now lets cause a destination to be created
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue newQueue = new ActiveMQQueue("Test.Cheese");
-        session.createConsumer(newQueue);
-
-        Thread.sleep(3000);
-
-        assertThat(newQueue, isIn(newDestinations));
-
-        LOG.info("New destinations are: " + newDestinations);
-    }
-
-    public void testProducerForcesNotificationOfNewDestination() throws Exception {
-        // now lets cause a destination to be created
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQQueue newQueue = new ActiveMQQueue("Test.Beer");
-        MessageProducer producer = session.createProducer(newQueue);
-        TextMessage message = session.createTextMessage("<hello>world</hello>");
-        producer.send(message);
-
-        Thread.sleep(3000);
-
-        assertThat(newQueue, isIn(newDestinations));
-
-        LOG.info("New destinations are: " + newDestinations);
-    }
-
-    public void onDestinationEvent(DestinationEvent event) {
-        ActiveMQDestination destination = event.getDestination();
-        if (event.isAddOperation()) {
-            LOG.info("Added:   " + destination);
-            newDestinations.add(destination);
-        }
-        else {
-            LOG.info("Removed: " + destination);
-            newDestinations.remove(destination);
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connection = (ActiveMQConnection) createConnection();
-        connection.start();
-        connection.getDestinationSource().setDestinationListener(this);
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.setDestinations(new ActiveMQDestination[]{
-                sampleQueue,
-                sampleTopic
-        });
-        return broker;
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java
deleted file mode 100644
index 7bef61c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/MasterSlaveTempQueueMemoryTest.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.policy.DispatchPolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class MasterSlaveTempQueueMemoryTest extends TempQueueMemoryTest {
-   
-    private static final transient Logger LOG = LoggerFactory.getLogger(MasterSlaveTempQueueMemoryTest.class);
-    
-    String masterBindAddress = "tcp://localhost:61616";
-    String slaveBindAddress = "tcp://localhost:62616";
-    BrokerService slave;
-
-    /*
-     * add a slave broker
-     * @see org.apache.activemq.EmbeddedBrokerTestSupport#createBroker()
-     */
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        // bindAddress is used by super.createBroker
-        bindAddress = masterBindAddress;
-        BrokerService master = super.createBroker();
-        master.setBrokerName("master");
-        configureBroker(master);
-        bindAddress = slaveBindAddress;
-        slave = super.createBroker();
-        slave.setBrokerName("slave");
-        slave.setMasterConnectorURI(masterBindAddress);
-        
-        configureBroker(slave);
-        bindAddress = masterBindAddress;
-        return master;
-    }
-
-    private void configureBroker(BrokerService broker) {
-        broker.setUseJmx(false);
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setOptimizedDispatch(true);
-        policyMap.setDefaultEntry(defaultEntry);
-        // optimized dispatch does not effect the determinism of inflight between
-        // master and slave in this test
-        //broker.setDestinationPolicy(policyMap);
-        
-    }
-
-    @Override
-    protected void startBroker() throws Exception {
-        
-        // because master will wait for slave to connect it needs 
-        // to be in a separate thread
-        Thread starterThread = new Thread() { 
-            public void run() {
-                try {
-                    broker.setWaitForSlave(true);
-                    broker.start();
-                } catch (Exception e) {
-                    fail("failed to start broker, reason:" + e);
-                    e.printStackTrace();
-                }
-            }
-        };
-        starterThread.start();
-        
-        slave.start();
-        starterThread.join(60*1000);
-        assertTrue("slave is indeed a slave", slave.isSlave());
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        slave.stop();
-        super.tearDown();
-        
-    }
-
-    @Override
-    public void testLoadRequestReply() throws Exception {
-        super.testLoadRequestReply();
-
-        Thread.sleep(2000);
-        
-        // some checks on the slave
-        AdvisoryBroker ab = (AdvisoryBroker) slave.getBroker().getAdaptor(
-                AdvisoryBroker.class);
-        
-        assertEquals("the temp queues should not be visible as they are removed", 1, ab.getAdvisoryDestinations().size());
-                       
-        RegionBroker rb = (RegionBroker) slave.getBroker().getAdaptor(
-                RegionBroker.class); 
-               
-        //serverDestination + 
-        assertEquals(6, rb.getDestinationMap().size());     
-        
-        RegionBroker masterRb = (RegionBroker) broker.getBroker().getAdaptor(
-                RegionBroker.class);
-
-        LOG.info("enqueues " + rb.getDestinationStatistics().getEnqueues().getCount());
-        assertEquals("enqueues match", rb.getDestinationStatistics().getEnqueues().getCount(), masterRb.getDestinationStatistics().getEnqueues().getCount());
-        
-        LOG.info("dequeues " + rb.getDestinationStatistics().getDequeues().getCount());
-        assertEquals("dequeues match",
-                rb.getDestinationStatistics().getDequeues().getCount(),
-                masterRb.getDestinationStatistics().getDequeues().getCount());
-
-        LOG.info("inflight, slave " + rb.getDestinationStatistics().getInflight().getCount()
-                + ", master " + masterRb.getDestinationStatistics().getInflight().getCount());
-
-        // not totally deterministic for this test - maybe due to async send
-        //assertEquals("inflight match", rb.getDestinationStatistics().getInflight().getCount(), masterRb.getDestinationStatistics().getInflight().getCount());
-
-        // slave does not actually dispatch any messages, so no request/reply(2) pair per iteration(COUNT)
-        // slave estimate must be >= actual master value
-        // master does not always reach expected total, should be assertEquals.., why?
-        assertTrue("dispatched to slave is as good as master, master=" 
-                + masterRb.getDestinationStatistics().getDispatched().getCount(),
-                rb.getDestinationStatistics().getDispatched().getCount() + 2*messagesToSend >= 
-                masterRb.getDestinationStatistics().getDispatched().getCount());
-    }
-    
-    public void testMoreThanPageSizeUnacked() throws Exception {
-        
-        final int messageCount = Queue.MAX_PAGE_SIZE + 10;
-        final CountDownLatch latch = new CountDownLatch(1);
-        
-        serverSession = serverConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQSession s = (ActiveMQSession) serverSession;
-        s.setSessionAsyncDispatch(true);
-        
-        MessageConsumer serverConsumer = serverSession.createConsumer(serverDestination);
-        serverConsumer.setMessageListener(new MessageListener() {
-           
-            public void onMessage(Message msg) {
-                try {
-                    latch.await(30L, TimeUnit.SECONDS);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-            
-        MessageProducer producer = clientSession.createProducer(serverDestination);
-        for (int i =0; i< messageCount; i++) {
-            Message msg = clientSession.createMessage();
-            producer.send(msg);
-        }
-        Thread.sleep(5000);
-        
-        RegionBroker slaveRb = (RegionBroker) slave.getBroker().getAdaptor(
-                RegionBroker.class);
-        RegionBroker masterRb = (RegionBroker) broker.getBroker().getAdaptor(
-                RegionBroker.class);
-        
-        assertEquals("inflight match expected", messageCount, masterRb.getDestinationStatistics().getInflight().getCount());        
-        assertEquals("inflight match on slave and master", slaveRb.getDestinationStatistics().getInflight().getCount(), masterRb.getDestinationStatistics().getInflight().getCount());
-        
-        latch.countDown();
-        Thread.sleep(5000);
-        assertEquals("inflight match expected", 0, masterRb.getDestinationStatistics().getInflight().getCount());        
-        assertEquals("inflight match on slave and master", slaveRb.getDestinationStatistics().getInflight().getCount(), masterRb.getDestinationStatistics().getInflight().getCount());
-    }
-    
-    public void testLoadRequestReplyWithNoTempQueueDelete() throws Exception {
-        deleteTempQueue = false;
-        messagesToSend = 10;
-        testLoadRequestReply();
-    }
-    
-    public void testLoadRequestReplyWithTransactions() throws Exception {
-        serverTransactional = clientTransactional = true;
-        messagesToSend = 100;
-        reInitialiseSessions();
-        testLoadRequestReply();
-    }
-    
-    public void testConcurrentConsumerLoadRequestReplyWithTransactions() throws Exception {
-        serverTransactional = true;
-        numConsumers = numProducers = 10;
-        messagesToSend = 100;
-        reInitialiseSessions();
-        testLoadRequestReply();
-    }
-
-    protected void reInitialiseSessions() throws Exception {
-        // reinitialize so they can respect the transactional flags 
-        serverSession.close();
-        clientSession.close();
-        serverSession = serverConnection.createSession(serverTransactional, 
-                serverTransactional ? Session.SESSION_TRANSACTED : Session.AUTO_ACKNOWLEDGE);
-        clientSession = clientConnection.createSession(clientTransactional,
-                clientTransactional ? Session.SESSION_TRANSACTED : Session.AUTO_ACKNOWLEDGE);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java
deleted file mode 100644
index 9e26aac..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class ProducerListenerTest extends EmbeddedBrokerTestSupport implements ProducerListener {
-    private static final Logger LOG = LoggerFactory.getLogger(ProducerListenerTest.class);
-
-    protected Session consumerSession1;
-    protected Session consumerSession2;
-    protected int consumerCounter;
-    protected ProducerEventSource producerEventSource;
-    protected BlockingQueue<ProducerEvent> eventQueue = new ArrayBlockingQueue<ProducerEvent>(1000);
-    private Connection connection;
-
-    public void testProducerEvents() throws Exception {
-        producerEventSource.start();
-
-        consumerSession1 = createProducer();
-        assertConsumerEvent(1, true);
-
-        consumerSession2 = createProducer();
-        assertConsumerEvent(2, true);
-
-        consumerSession1.close();
-        consumerSession1 = null;
-        assertConsumerEvent(1, false);
-
-        consumerSession2.close();
-        consumerSession2 = null;
-        assertConsumerEvent(0, false);
-    }
-
-    public void testListenWhileAlreadyConsumersActive() throws Exception {
-        consumerSession1 = createProducer();
-        consumerSession2 = createProducer();
-
-        producerEventSource.start();
-        assertConsumerEvent(2, true);
-        assertConsumerEvent(2, true);
-
-        consumerSession1.close();
-        consumerSession1 = null;
-        assertConsumerEvent(1, false);
-
-        consumerSession2.close();
-        consumerSession2 = null;
-        assertConsumerEvent(0, false);
-    }
-
-    public void onProducerEvent(ProducerEvent event) {
-        eventQueue.add(event);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connection = createConnection();
-        connection.start();
-        producerEventSource = new ProducerEventSource(connection, destination);
-        producerEventSource.setProducerListener(this);
-    }
-
-    protected void tearDown() throws Exception {
-        if (producerEventSource != null) {
-            producerEventSource.stop();
-        }
-        if (consumerSession2 != null) {
-            consumerSession2.close();
-        }
-        if (consumerSession1 != null) {
-            consumerSession1.close();
-        }
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected void assertConsumerEvent(int count, boolean started) throws InterruptedException {
-        ProducerEvent event = waitForProducerEvent();
-        assertEquals("Producer count", count, event.getProducerCount());
-        assertEquals("started", started, event.isStarted());
-    }
-
-    protected Session createProducer() throws JMSException {
-        final String consumerText = "Consumer: " + (++consumerCounter);
-        LOG.info("Creating consumer: " + consumerText + " on destination: " + destination);
-
-        Session answer = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = answer.createProducer(destination);
-        return answer;
-    }
-
-    protected ProducerEvent waitForProducerEvent() throws InterruptedException {
-        ProducerEvent answer = eventQueue.poll(100000, TimeUnit.MILLISECONDS);
-        assertTrue("Should have received a consumer event!", answer != null);
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java
deleted file mode 100644
index 123c778..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 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.advisory;
-
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TempDestDeleteTest extends EmbeddedBrokerTestSupport implements ConsumerListener {
-    private static final Logger LOG = LoggerFactory.getLogger(TempDestDeleteTest.class);
-
-    protected int consumerCounter;
-    protected ConsumerEventSource topicConsumerEventSource;
-    protected BlockingQueue<ConsumerEvent> eventQueue = new ArrayBlockingQueue<ConsumerEvent>(1000);
-    
-    private ConsumerEventSource queueConsumerEventSource;
-    private Connection connection;
-    private Session session;
-    private ActiveMQTempTopic tempTopic;
-    private ActiveMQTempQueue tempQueue;
-
-    public void testDeleteTempTopicDeletesAvisoryTopics() throws Exception {
-        topicConsumerEventSource.start();
-
-        MessageConsumer consumer = createConsumer(tempTopic);
-        assertConsumerEvent(1, true);
-
-        Topic advisoryTopic = AdvisorySupport.getConsumerAdvisoryTopic(tempTopic);
-        assertTrue(destinationExists(advisoryTopic));
-
-        consumer.close();
-
-        // Once we delete the topic, the advisory topic for the destination
-        // should also be deleted.
-        tempTopic.delete();
-
-        assertFalse(destinationExists(advisoryTopic));
-    }
-
-    public void testDeleteTempQueueDeletesAvisoryTopics() throws Exception {
-        queueConsumerEventSource.start();
-
-        MessageConsumer consumer = createConsumer(tempQueue);
-        assertConsumerEvent(1, true);
-
-        Topic advisoryTopic = AdvisorySupport.getConsumerAdvisoryTopic(tempQueue);
-        assertTrue(destinationExists(advisoryTopic));
-
-        consumer.close();
-
-        // Once we delete the queue, the advisory topic for the destination
-        // should also be deleted.
-        tempQueue.delete();
-
-        assertFalse(destinationExists(advisoryTopic));
-    }
-
-    private boolean destinationExists(Destination dest) throws Exception {
-        RegionBroker rb = (RegionBroker)broker.getBroker().getAdaptor(RegionBroker.class);
-        return rb.getTopicRegion().getDestinationMap().containsKey(dest) || rb.getQueueRegion().getDestinationMap().containsKey(dest)
-               || rb.getTempTopicRegion().getDestinationMap().containsKey(dest) || rb.getTempQueueRegion().getDestinationMap().containsKey(dest);
-    }
-
-    public void onConsumerEvent(ConsumerEvent event) {
-        eventQueue.add(event);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-        connection.start();
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        tempTopic = (ActiveMQTempTopic)session.createTemporaryTopic();
-        topicConsumerEventSource = new ConsumerEventSource(connection, tempTopic);
-        topicConsumerEventSource.setConsumerListener(this);
-
-        tempQueue = (ActiveMQTempQueue)session.createTemporaryQueue();
-        queueConsumerEventSource = new ConsumerEventSource(connection, tempQueue);
-        queueConsumerEventSource.setConsumerListener(this);
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected void assertConsumerEvent(int count, boolean started) throws InterruptedException {
-        ConsumerEvent event = waitForConsumerEvent();
-        assertEquals("Consumer count", count, event.getConsumerCount());
-        assertEquals("started", started, event.isStarted());
-    }
-
-    protected MessageConsumer createConsumer(Destination dest) throws JMSException {
-        final String consumerText = "Consumer: " + (++consumerCounter);
-        LOG.info("Creating consumer: " + consumerText + " on destination: " + dest);
-
-        MessageConsumer consumer = session.createConsumer(dest);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                LOG.info("Received message by: " + consumerText + " message: " + message);
-            }
-        });
-        return consumer;
-    }
-
-    protected ConsumerEvent waitForConsumerEvent() throws InterruptedException {
-        ConsumerEvent answer = eventQueue.poll(1000, TimeUnit.MILLISECONDS);
-        assertTrue("Should have received a consumer event!", answer != null);
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.java
deleted file mode 100644
index e10f70f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.advisory;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * 
- */
-public class TempDestLoadTest extends EmbeddedBrokerTestSupport {
-  
-    protected int consumerCounter;
-    private Connection connection;
-    private Session session;
-    private static final int MESSAGE_COUNT = 2000;
-        
-    public void testLoadTempAdvisoryQueues() throws Exception {
-
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            TemporaryQueue tempQueue = session.createTemporaryQueue();
-            MessageConsumer consumer = session.createConsumer(tempQueue);
-            MessageProducer producer = session.createProducer(tempQueue);
-            consumer.close();
-            producer.close();
-            tempQueue.delete();
-        }
-
-        AdvisoryBroker ab = (AdvisoryBroker) broker.getBroker().getAdaptor(
-                AdvisoryBroker.class);
-               
-        assertTrue(ab.getAdvisoryDestinations().size() == 0);
-        assertTrue(ab.getAdvisoryConsumers().size() == 0);
-        assertTrue(ab.getAdvisoryProducers().size() == 0);
-               
-        RegionBroker rb = (RegionBroker) broker.getBroker().getAdaptor(
-                RegionBroker.class);
-        //there should be 2 destinations - advisories - 
-        //1 for the connection + 1 generic ones
-        assertTrue(rb.getDestinationMap().size()==2);            
-    }
-    
-    public void testLoadTempAdvisoryTopics() throws Exception {
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            TemporaryTopic tempTopic =  session.createTemporaryTopic();
-            MessageConsumer consumer = session.createConsumer(tempTopic);
-            MessageProducer producer = session.createProducer(tempTopic);
-            consumer.close();
-            producer.close();
-            tempTopic.delete();
-        }
-
-        AdvisoryBroker ab = (AdvisoryBroker) broker.getBroker().getAdaptor(
-                AdvisoryBroker.class);
-        assertTrue(ab.getAdvisoryDestinations().size() == 0);
-        assertTrue(ab.getAdvisoryConsumers().size() == 0);
-        assertTrue(ab.getAdvisoryProducers().size() == 0);
-        RegionBroker rb = (RegionBroker) broker.getBroker().getAdaptor(
-                RegionBroker.class);
-        //there should be 2 destinations - advisories - 
-        //1 for the connection + 1 generic ones
-        assertTrue(rb.getDestinationMap().size()==2);        
-        
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
deleted file mode 100644
index 1f42bca..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.advisory;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import java.util.Vector;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-/**
- * 
- */
-public class TempQueueMemoryTest extends EmbeddedBrokerTestSupport {
-    protected Connection serverConnection;
-    protected Session serverSession;
-    protected Connection clientConnection;
-    protected Session clientSession;
-    protected Destination serverDestination;
-    protected int messagesToSend = 2000;
-    protected boolean deleteTempQueue = true;
-    protected boolean serverTransactional = false;
-    protected boolean clientTransactional = false;
-    protected int numConsumers = 1;
-    protected int numProducers = 1;
-    
-
-    public void testConcurrentProducerRequestReply() throws Exception {
-        numProducers = 10;
-        testLoadRequestReply();
-    }
-    
-    public void testLoadRequestReply() throws Exception {
-        for (int i=0; i< numConsumers; i++) {
-            serverSession.createConsumer(serverDestination).setMessageListener(new MessageListener() {
-                public void onMessage(Message msg) {
-                    try {
-                        Destination replyTo = msg.getJMSReplyTo();
-                        MessageProducer producer = serverSession.createProducer(replyTo);
-                        producer.send(replyTo, msg);
-                        if (serverTransactional) {
-                            serverSession.commit();
-                        }
-                        producer.close();
-                    } catch (Exception e) {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
-                    }
-                }
-            });
-        }
-        
-        class Producer extends Thread {
-            private int numToSend;
-            public Producer(int numToSend) {
-                this.numToSend = numToSend;
-            }
-            public void run() {     
-                try {
-                    Session session = clientConnection.createSession(clientTransactional, 
-                            clientTransactional ? Session.SESSION_TRANSACTED : Session.AUTO_ACKNOWLEDGE);
-                    MessageProducer producer = session.createProducer(serverDestination);
-               
-                    for (int i =0; i< numToSend; i++) {
-                        TemporaryQueue replyTo = session.createTemporaryQueue();
-                        MessageConsumer consumer = session.createConsumer(replyTo);
-                        Message msg = session.createMessage();
-                        msg.setJMSReplyTo(replyTo);
-                        producer.send(msg);
-                        if (clientTransactional) {
-                            session.commit();
-                        }
-                        consumer.receive();
-                        if (clientTransactional) {
-                            session.commit();
-                        }
-                        consumer.close();
-                        if (deleteTempQueue) {
-                            replyTo.delete();
-                        } else {
-                            // temp queue will be cleaned up on clientConnection.close
-                        }
-                    }
-                } catch (JMSException e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
-            }
-        }
-        Vector<Thread> threads = new Vector<Thread>(numProducers);
-        for (int i=0; i<numProducers ; i++) {
-            threads.add(new Producer(messagesToSend/numProducers));
-        }
-        startAndJoinThreads(threads);
-        
-        clientSession.close();
-        serverSession.close();
-        clientConnection.close();
-        serverConnection.close();
-        
-        AdvisoryBroker ab = (AdvisoryBroker) broker.getBroker().getAdaptor(
-                AdvisoryBroker.class);
-              
-        ///The server destination will be left
-        assertTrue(ab.getAdvisoryDestinations().size() == 1);
-        
-        assertTrue("should be zero but is "+ab.getAdvisoryConsumers().size(),ab.getAdvisoryConsumers().size() == 0);
-        assertTrue("should be zero but is "+ab.getAdvisoryProducers().size(),ab.getAdvisoryProducers().size() == 0);
-               
-        RegionBroker rb = (RegionBroker) broker.getBroker().getAdaptor(
-                RegionBroker.class);
-        
-               
-        //serverDestination + 
-        assertEquals(6, rb.getDestinationMap().size());          
-    }
-
-    private void startAndJoinThreads(Vector<Thread> threads) throws Exception {
-        for (Thread thread: threads) {
-            thread.start();
-        }
-        for (Thread thread: threads) {
-            thread.join();
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        serverConnection = createConnection();
-        serverConnection.start();
-        serverSession = serverConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        clientConnection = createConnection();
-        clientConnection.start();
-        clientSession = clientConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        serverDestination = createDestination();
-    }
-
-    protected void tearDown() throws Exception {
-        
-        super.tearDown();
-        serverTransactional = clientTransactional = false;
-        numConsumers = numProducers = 1;
-        messagesToSend = 2000;
-    }
-    
-    protected ActiveMQDestination createDestination() {
-        return new ActiveMQQueue(getClass().getName());
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/BlobTransferPolicyUriTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/blob/BlobTransferPolicyUriTest.java
deleted file mode 100644
index 4040569..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/BlobTransferPolicyUriTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.blob;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class BlobTransferPolicyUriTest extends TestCase {
-    public void testBlobTransferPolicyIsConfiguredViaUri() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?jms.blobTransferPolicy.defaultUploadUrl=http://foo.com");
-        BlobTransferPolicy policy = factory.getBlobTransferPolicy();
-        assertEquals("http://foo.com", policy.getDefaultUploadUrl());
-        assertEquals("http://foo.com", policy.getUploadUrl());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobDownloadStrategyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobDownloadStrategyTest.java
deleted file mode 100644
index bc3ab76..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobDownloadStrategyTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.jms.JMSException;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-public class FTPBlobDownloadStrategyTest extends FTPTestSupport {
-
-    final int FILE_SIZE = Short.MAX_VALUE * 10;
-
-    public void testDownload() throws Exception {
-        setConnection();
-        
-        // create file
-        File uploadFile = new File(ftpHomeDirFile, "test.txt");
-        FileWriter wrt = new FileWriter(uploadFile);
-
-        wrt.write("hello world");
-
-        for(int ix = 0; ix < FILE_SIZE; ++ix ) {
-            wrt.write("a");
-        }
-
-        wrt.close();
-        
-        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
-        BlobDownloadStrategy strategy = new FTPBlobDownloadStrategy(new BlobTransferPolicy());
-        InputStream stream;
-        try {
-            message.setURL(new URL(ftpUrl + "test.txt"));
-            stream = strategy.getInputStream(message);
-            int i = stream.read();
-            StringBuilder sb = new StringBuilder(2048);
-            while(i != -1) {
-                sb.append((char)i);
-                i = stream.read();
-            }
-            Assert.assertEquals("hello world", sb.toString().substring(0, "hello world".length()));
-            Assert.assertEquals(FILE_SIZE, sb.toString().substring("hello world".length()).length());
-
-            assertTrue(uploadFile.exists());
-            strategy.deleteFile(message);
-            assertFalse(uploadFile.exists());
-            
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.assertTrue(false);
-        }
-    }
-
-    public void testWrongAuthentification() throws MalformedURLException {
-        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
-        BlobDownloadStrategy strategy = new FTPBlobDownloadStrategy(new BlobTransferPolicy());
-        try {
-            message.setURL(new URL("ftp://" + userNamePass + "_wrong:" + userNamePass + "@localhost:"	+ ftpPort + "/ftptest/"));
-            strategy.getInputStream(message);
-        } catch(JMSException e) {
-            Assert.assertEquals("Wrong Exception", "Cant Authentificate to FTP-Server", e.getMessage());
-            return;
-        } catch(Exception e) {
-            System.out.println(e);
-            Assert.assertTrue("Wrong Exception "+ e, false);
-            return;
-        }
-
-        Assert.assertTrue("Expect Exception", false);
-    }
-
-    public void testWrongFTPPort() throws MalformedURLException {
-        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
-        BlobDownloadStrategy strategy = new FTPBlobDownloadStrategy(new BlobTransferPolicy());
-        try {
-            message.setURL(new URL("ftp://" + userNamePass + ":" + userNamePass + "@localhost:"	+ 422 + "/ftptest/"));
-            strategy.getInputStream(message);
-        } catch(JMSException e) {
-            Assert.assertEquals("Wrong Exception", "Problem connecting the FTP-server", e.getMessage());
-            return;
-        } catch(Exception e) {
-            e.printStackTrace();
-            Assert.assertTrue("Wrong Exception "+ e, false);
-            return;
-        }
-
-        Assert.assertTrue("Expect Exception", false);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java
deleted file mode 100644
index 5eb52ae..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.BlobMessage;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-
-public class FTPBlobTest extends FTPTestSupport {
-
-    public void testBlobFile() throws Exception {
-        setConnection();
-        // first create Message
-        File file = File.createTempFile("amq-data-file-", ".dat");
-        // lets write some data
-        String content = "hello world " + System.currentTimeMillis();
-        BufferedWriter writer = new BufferedWriter(new FileWriter(file));
-        writer.append(content);
-        writer.close();
-
-        ActiveMQSession session = (ActiveMQSession) connection.createSession(
-                false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        MessageConsumer consumer = session.createConsumer(destination);
-        BlobMessage message = session.createBlobMessage(file);
-        message.setName("fileName");
-
-        producer.send(message);
-        Thread.sleep(1000);
-
-        // check message send
-        Message msg = consumer.receive(1000);
-        Assert.assertTrue(msg instanceof ActiveMQBlobMessage);
-
-        assertEquals("name is correct", "fileName", ((ActiveMQBlobMessage)msg).getName());
-        InputStream input = ((ActiveMQBlobMessage) msg).getInputStream();
-        StringBuilder b = new StringBuilder();
-        int i = input.read();
-        while (i != -1) {
-            b.append((char) i);
-            i = input.read();
-        }
-        input.close();
-        File uploaded = new File(ftpHomeDirFile, msg.getJMSMessageID().toString().replace(":", "_")); 
-        Assert.assertEquals(content, b.toString());
-        assertTrue(uploaded.exists());
-        ((ActiveMQBlobMessage)msg).deleteFile();
-        assertFalse(uploaded.exists());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.java
deleted file mode 100644
index f8214fc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.MessageId;
-
-
-public class FTPBlobUploadStrategyTest extends FTPTestSupport {
-
-    public void testFileUpload() throws Exception {
-        setConnection();
-		File file = File.createTempFile("amq-data-file-", ".dat");
-        // lets write some data
-        BufferedWriter writer = new BufferedWriter(new FileWriter(file));
-        writer.append("hello world");
-        writer.close();
-        
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ((ActiveMQConnection)connection).setCopyMessageOnSend(false);
-        
-        ActiveMQBlobMessage message = (ActiveMQBlobMessage) ((ActiveMQSession)session).createBlobMessage(file);
-        message.setMessageId(new MessageId("testmessage"));
-        message.onSend();
-        Assert.assertEquals(ftpUrl + "testmessage", message.getURL().toString()); 
-        File uploaded = new File(ftpHomeDirFile, "testmessage");
-        assertTrue("File doesn't exists", uploaded.exists());
-	}
-
-    public void testWriteDenied() throws Exception {
-        userNamePass = "guest";
-        setConnection();
-        File file = File.createTempFile("amq-data-file-", ".dat");
-        // lets write some data
-        BufferedWriter writer = new BufferedWriter(new FileWriter(file));
-        writer.append("hello world");
-        writer.close();
-        
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ((ActiveMQConnection)connection).setCopyMessageOnSend(false);
-        
-        ActiveMQBlobMessage message = (ActiveMQBlobMessage) ((ActiveMQSession)session).createBlobMessage(file);
-        message.setMessageId(new MessageId("testmessage"));
-        try {
-            message.onSend();
-        } catch (JMSException e) {
-            e.printStackTrace();
-            return;
-        }
-        fail("Should have failed with permission denied exception!");
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPTestSupport.java
deleted file mode 100644
index 6145f3b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPTestSupport.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.Connection;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.util.IOHelper;
-import org.apache.ftpserver.FtpServer;
-import org.apache.ftpserver.FtpServerFactory;
-import org.apache.ftpserver.ftplet.Authority;
-import org.apache.ftpserver.ftplet.UserManager;
-import org.apache.ftpserver.listener.ListenerFactory;
-import org.apache.ftpserver.usermanager.PropertiesUserManagerFactory;
-import org.apache.ftpserver.usermanager.impl.BaseUser;
-import org.apache.ftpserver.usermanager.impl.WritePermission;
-import org.jmock.Mockery;
-
-public abstract class FTPTestSupport extends EmbeddedBrokerTestSupport {
-    
-    protected static final String ftpServerListenerName = "default";
-    protected Connection connection;
-    protected FtpServer server;
-    String userNamePass = "activemq";
-
-    Mockery context = null;
-    String ftpUrl;
-    int ftpPort;
-    
-    final File ftpHomeDirFile = new File("target/FTPBlobTest/ftptest");
-    
-    protected void setUp() throws Exception {
-        
-        if (ftpHomeDirFile.getParentFile().exists()) {
-            IOHelper.deleteFile(ftpHomeDirFile.getParentFile());
-        }
-        ftpHomeDirFile.mkdirs();
-        ftpHomeDirFile.getParentFile().deleteOnExit();
-
-        FtpServerFactory serverFactory = new FtpServerFactory();
-        ListenerFactory factory = new ListenerFactory();
-
-        PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
-        UserManager userManager = userManagerFactory.createUserManager();
-
-        BaseUser user = new BaseUser();
-        user.setName("activemq");
-        user.setPassword("activemq");
-        user.setHomeDirectory(ftpHomeDirFile.getParent());
-        
-        // authorize user
-        List<Authority> auths = new ArrayList<Authority>();
-        Authority auth = new WritePermission();
-        auths.add(auth);
-        user.setAuthorities(auths);
-        
-        userManager.save(user);
-
-        BaseUser guest = new BaseUser();
-        guest.setName("guest");
-        guest.setPassword("guest");
-        guest.setHomeDirectory(ftpHomeDirFile.getParent());
-        
-        userManager.save(guest);
-        
-        serverFactory.setUserManager(userManager);
-        factory.setPort(0);
-        serverFactory.addListener(ftpServerListenerName, factory
-                .createListener());
-        server = serverFactory.createServer();
-        server.start();
-        ftpPort = serverFactory.getListener(ftpServerListenerName)
-                .getPort();
-        super.setUp();
-    }
-    
-    public void setConnection() throws Exception {
-        ftpUrl = "ftp://"
-            + userNamePass
-            + ":"
-            + userNamePass
-            + "@localhost:"
-            + ftpPort
-            + "/ftptest/";
-        bindAddress = "vm://localhost?jms.blobTransferPolicy.defaultUploadUrl=" + ftpUrl;
-        
-        connectionFactory = createConnectionFactory();
-        
-        connection = createConnection();
-        connection.start();        
-    }
-    
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.stop();
-        }
-        super.tearDown();
-        if (server != null) {
-            server.stop();
-        }
-        IOHelper.deleteFile(ftpHomeDirFile.getParentFile());
-    }
-
-    
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java
deleted file mode 100644
index bcd4a97..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.blob;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.BlobMessage;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class FilesystemBlobTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(FilesystemBlobTest.class);
-    
-    private Connection connection;
-    private String tmpDir =  System.getProperty("user.dir") + "/target/FilesystemBlobTest";
-	public void setUp() throws Exception {
-        super.setUp();
-        // replace \ with / to let it work on windows too
-        String fileUrl = "file:///" +tmpDir.replaceAll("\\\\", "/");
-        LOG.info("Using file: " + fileUrl);
-        bindAddress = "vm://localhost?jms.blobTransferPolicy.defaultUploadUrl=" + fileUrl;
-        
-        connectionFactory = createConnectionFactory();
-        
-        connection = createConnection();
-        connection.start();        
-    }
-    
-    
-    public void testBlobFile() throws Exception {
-        // first create Message
-        File file = File.createTempFile("amq-data-file-", ".dat");
-        // lets write some data
-        String content = "hello world " + System.currentTimeMillis();
-        BufferedWriter writer = new BufferedWriter(new FileWriter(file));
-        writer.append(content);
-        writer.close();
-
-        ActiveMQSession session = (ActiveMQSession) connection.createSession(
-                false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        MessageConsumer consumer = session.createConsumer(destination);
-        BlobMessage message = session.createBlobMessage(file);
-
-        producer.send(message);
-        Thread.sleep(1000);
-
-        // check message send
-        Message msg = consumer.receive(1000);
-        Assert.assertTrue(msg instanceof ActiveMQBlobMessage);
-
-        InputStream input = ((ActiveMQBlobMessage) msg).getInputStream();
-        StringBuilder b = new StringBuilder();
-        int i = input.read();
-        while (i != -1) {
-            b.append((char) i);
-            i = input.read();
-        }
-        input.close();
-        File uploaded = new File(tmpDir, msg.getJMSMessageID().toString().replace(":", "_")); 
-        Assert.assertEquals(content, b.toString());
-        assertTrue(uploaded.exists());
-        ((ActiveMQBlobMessage)msg).deleteFile();
-        assertFalse(uploaded.exists());
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.stop();
-        }
-        super.tearDown();
-       
-        IOHelper.deleteFile(new File(tmpDir));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java
deleted file mode 100755
index 3e154f9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import junit.framework.Test;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * BrokerBenchmark is used to get an idea of the raw performance of a broker.
- * Since the broker data structures using in message dispatching are under high
- * contention from client requests, it's performance should be monitored closely
- * since it typically is the biggest bottleneck in a high performance messaging
- * fabric. The benchmarks are run under all the following combinations options:
- * Queue vs. Topic, 1 vs. 10 producer threads, 1 vs. 10 consumer threads, and
- * Persistent vs. Non-Persistent messages. Message Acking uses client ack style
- * batch acking since that typically has the best ack performance.
- * 
- * 
- */
-public class BrokerBenchmark extends BrokerTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(BrokerBenchmark.class);
-
-    public int produceCount = Integer.parseInt(System.getProperty("PRODUCE_COUNT", "10000"));
-    public ActiveMQDestination destination;
-    public int prodcuerCount;
-    public int consumerCount;
-    public boolean deliveryMode;
-
-    public void initCombosForTestPerformance() {
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")});
-        addCombinationValues("PRODUCER_COUNT", new Object[] {new Integer("1"), new Integer("10")});
-        addCombinationValues("CONSUMER_COUNT", new Object[] {new Integer("1"), new Integer("10")});
-        addCombinationValues("CONSUMER_COUNT", new Object[] {new Integer("1"), new Integer("10")});
-        addCombinationValues("deliveryMode", new Object[] {Boolean.TRUE});
-    }
-
-    public void testPerformance() throws Exception {
-
-        LOG.info("Running Benchmark for destination=" + destination + ", producers=" + prodcuerCount + ", consumers=" + consumerCount + ", deliveryMode=" + deliveryMode);
-        final int consumeCount = destination.isTopic() ? consumerCount * produceCount : produceCount;
-
-        final Semaphore consumersStarted = new Semaphore(1 - consumerCount);
-        final Semaphore producersFinished = new Semaphore(1 - prodcuerCount);
-        final Semaphore consumersFinished = new Semaphore(1 - consumerCount);
-        final ProgressPrinter printer = new ProgressPrinter(produceCount + consumeCount, 10);
-
-        // Start a producer and consumer
-
-        profilerPause("Benchmark ready.  Start profiler ");
-
-        long start = System.currentTimeMillis();
-
-        final AtomicInteger receiveCounter = new AtomicInteger(0);
-        for (int i = 0; i < consumerCount; i++) {
-            new Thread() {
-                public void run() {
-                    try {
-
-                        // Consume the messages
-                        StubConnection connection = new StubConnection(broker);
-                        ConnectionInfo connectionInfo = createConnectionInfo();
-                        connection.send(connectionInfo);
-
-                        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-                        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-                        consumerInfo.setPrefetchSize(1000);
-                        connection.send(sessionInfo);
-                        connection.send(consumerInfo);
-
-                        consumersStarted.release();
-
-                        while (receiveCounter.get() < consumeCount) {
-
-                            int counter = 0;
-                            // Get a least 1 message.
-                            Message msg = receiveMessage(connection, 2000);
-                            if (msg != null) {
-                                printer.increment();
-                                receiveCounter.incrementAndGet();
-
-                                counter++;
-
-                                // Try to piggy back a few extra message acks if
-                                // they are ready.
-                                Message extra = null;
-                                while ((extra = receiveMessage(connection, 0)) != null) {
-                                    msg = extra;
-                                    printer.increment();
-                                    receiveCounter.incrementAndGet();
-                                    counter++;
-                                }
-                            }
-
-                            if (msg != null) {
-                                connection.send(createAck(consumerInfo, msg, counter, MessageAck.STANDARD_ACK_TYPE));
-                            } else if (receiveCounter.get() < consumeCount) {
-                                LOG.info("Consumer stall, waiting for message #" + receiveCounter.get() + 1);
-                            }
-                        }
-
-                        connection.send(closeConsumerInfo(consumerInfo));
-                    } catch (Throwable e) {
-                        e.printStackTrace();
-                    } finally {
-                        consumersFinished.release();
-                    }
-                }
-
-            }.start();
-        }
-
-        // Make sure that the consumers are started first to avoid sending
-        // messages
-        // before a topic is subscribed so that those messages are not missed.
-        consumersStarted.acquire();
-
-        // Send the messages in an async thread.
-        for (int i = 0; i < prodcuerCount; i++) {
-            new Thread() {
-                public void run() {
-                    try {
-                        StubConnection connection = new StubConnection(broker);
-                        ConnectionInfo connectionInfo = createConnectionInfo();
-                        connection.send(connectionInfo);
-
-                        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-                        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-                        connection.send(sessionInfo);
-                        connection.send(producerInfo);
-
-                        for (int i = 0; i < produceCount / prodcuerCount; i++) {
-                            Message message = createMessage(producerInfo, destination);
-                            message.setPersistent(deliveryMode);
-                            message.setResponseRequired(false);
-                            connection.send(message);
-                            printer.increment();
-                        }
-                    } catch (Throwable e) {
-                        e.printStackTrace();
-                    } finally {
-                        producersFinished.release();
-                    }
-                };
-            }.start();
-        }
-
-        producersFinished.acquire();
-        long end1 = System.currentTimeMillis();
-        consumersFinished.acquire();
-        long end2 = System.currentTimeMillis();
-
-        LOG.info("Results for destination=" + destination + ", producers=" + prodcuerCount + ", consumers=" + consumerCount + ", deliveryMode=" + deliveryMode);
-        LOG.info("Produced at messages/sec: " + (produceCount * 1000.0 / (end1 - start)));
-        LOG.info("Consumed at messages/sec: " + (consumeCount * 1000.0 / (end2 - start)));
-        profilerPause("Benchmark done.  Stop profiler ");
-    }
-
-    public static Test suite() {
-        return suite(BrokerBenchmark.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java
deleted file mode 100644
index 0a21f15..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.util.IOHelper;
-
-public class BrokerRestartTestSupport extends BrokerTestSupport {
-
-    private PersistenceAdapter persistenceAdapter;
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        File dir = broker.getBrokerDataDirectory();
-        if (dir != null) {
-            IOHelper.deleteChildren(dir);
-        }
-        //broker.setPersistent(false);
-        broker.setDeleteAllMessagesOnStartup(true);
-        persistenceAdapter = broker.getPersistenceAdapter();
-        return broker;
-    }
-
-    /**
-     * @return
-     * @throws Exception
-     */
-    protected BrokerService createRestartedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        //broker.setPersistenceAdapter(persistenceAdapter);
-        return broker;
-    }
-
-    /**
-     * Simulates a broker restart. The memory based persistence adapter is
-     * reused so that it does not "loose" it's "persistent" messages.
-     * 
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    protected void restartBroker() throws Exception {
-        broker.stop();
-        broker = createRestartedBroker();
-        broker.start();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java
deleted file mode 100644
index 5da180e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.broker;
-
-import junit.framework.TestCase;
-import org.apache.activemq.network.NetworkConnector;
-
-/**
- * Tests for the BrokerService class
- * 
- * @author chirino
- */
-public class BrokerServiceTest extends TestCase {
-
-    public void testAddRemoveTransportsWithJMX() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setUseJmx(true);
-        service.setPersistent(false);
-        TransportConnector connector = service.addConnector("tcp://localhost:0");
-        service.start();
-
-        service.removeConnector(connector);
-        connector.stop();
-        service.stop();
-    }
-
-    public void testAddRemoveTransportsWithoutJMX() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setPersistent(false);
-        service.setUseJmx(false);
-        TransportConnector connector = service.addConnector("tcp://localhost:0");
-        service.start();
-
-        service.removeConnector(connector);
-        connector.stop();
-        service.stop();
-    }
-
-    public void testAddRemoveNetworkWithJMX() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setPersistent(false);
-        service.setUseJmx(true);
-        NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
-        service.start();
-
-        service.removeNetworkConnector(connector);
-        connector.stop();
-        service.stop();
-    }
-
-    public void testAddRemoveNetworkWithoutJMX() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setPersistent(false);
-        service.setUseJmx(false);
-        NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
-        service.start();
-
-        service.removeNetworkConnector(connector);
-        connector.stop();
-        service.stop();
-    }
-    
-    public void testSystemUsage()
-    {
-        BrokerService service = new BrokerService();
-        assertEquals( service.getSystemUsage().getMemoryUsage().getLimit(), 1024 * 1024 * 64 );
-        assertEquals( service.getSystemUsage().getTempUsage().getLimit(), 1024L * 1024 * 1024 * 100 );
-        assertEquals( service.getSystemUsage().getStoreUsage().getLimit(), 1024L * 1024 * 1024 * 100 );
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java
deleted file mode 100755
index 8edd7d3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTest.java
+++ /dev/null
@@ -1,1759 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-public class BrokerTest extends BrokerTestSupport {
-
-    public ActiveMQDestination destination;
-    public int deliveryMode;
-    public int prefetch;
-    public byte destinationType;
-    public boolean durableConsumer;
-    protected static final int MAX_NULL_WAIT=500;
-
-    public void initCombosForTestQueueOnlyOnceDeliveryWith2Consumers() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    public void testQueueOnlyOnceDeliveryWith2Consumers() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(1);
-        connection1.request(consumerInfo1);
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(1);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-
-        for (int i = 0; i < 2; i++) {
-            Message m1 = receiveMessage(connection1);
-            Message m2 = receiveMessage(connection2);
-
-            assertNotNull("m1 is null for index: " + i, m1);
-            assertNotNull("m2 is null for index: " + i, m2);
-
-            assertNotSame(m1.getMessageId(), m2.getMessageId());
-            connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-            connection2.send(createAck(consumerInfo2, m2, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        assertNoMessagesLeft(connection1);
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void initCombosForTestQueueBrowserWith2Consumers() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    public void testQueueBrowserWith2Consumers() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(10);
-        connection1.request(consumerInfo1);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        //as the messages are sent async - need to synchronize the last
-        //one to ensure they arrive in the order we want
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-
-        // Setup a second connection with a queue browser.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(1);
-        consumerInfo2.setBrowser(true);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        List<Message> messages = new ArrayList<Message>();
-
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull("m1 is null for index: " + i, m1);
-            messages.add(m1);
-        }
-
-        for (int i = 0; i < 4; i++) {
-            Message m1 = messages.get(i);
-            Message m2 = receiveMessage(connection2);
-            assertNotNull("m2 is null for index: " + i, m2);
-            assertEquals(m1.getMessageId(), m2.getMessageId());
-            connection2.send(createAck(consumerInfo2, m2, 1, MessageAck.DELIVERED_ACK_TYPE));
-        }
-
-        assertNoMessagesLeft(connection1);
-        assertNoMessagesLeft(connection2);
-    }
-
-    
-    /*
-     * change the order of the above test
-     */
-    public void testQueueBrowserWith2ConsumersBrowseFirst() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        
-        
-        // Setup a second connection with a queue browser.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(10);
-        consumerInfo2.setBrowser(true);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(10);
-        connection1.request(consumerInfo1);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        //as the messages are sent async - need to synchronize the last
-        //one to ensure they arrive in the order we want
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-
-
-        List<Message> messages = new ArrayList<Message>();
-
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull("m1 is null for index: " + i, m1);
-            messages.add(m1);
-        }
-
-        // no messages present in queue browser as there were no messages when it
-        // was created
-        assertNoMessagesLeft(connection1);
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void testQueueBrowserWith2ConsumersInterleaved() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(10);
-        connection1.request(consumerInfo1);
-
-        // Send the messages
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-        
-        // Setup a second connection with a queue browser.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(1);
-        consumerInfo2.setBrowser(true);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        //as the messages are sent async - need to synchronize the last
-        //one to ensure they arrive in the order we want
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-
-        
-        List<Message> messages = new ArrayList<Message>();
-
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull("m1 is null for index: " + i, m1);
-            messages.add(m1);
-        }
-
-        for (int i = 0; i < 1; i++) {
-            Message m1 = messages.get(i);
-            Message m2 = receiveMessage(connection2);
-            assertNotNull("m2 is null for index: " + i, m2);
-            assertEquals(m1.getMessageId(), m2.getMessageId());
-            connection2.send(createAck(consumerInfo2, m2, 1, MessageAck.DELIVERED_ACK_TYPE));
-        }
-
-        assertNoMessagesLeft(connection1);
-        assertNoMessagesLeft(connection2);
-    }
-
-    
-    public void initCombosForTestConsumerPrefetchAndStandardAck() {
-        addCombinationValues("deliveryMode", new Object[] {
-        // Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                             Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testConsumerPrefetchAndStandardAck() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setPrefetchSize(1);
-        connection.send(consumerInfo);
-
-        // Send 3 messages to the broker.
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.request(createMessage(producerInfo, destination, deliveryMode));
-
-        // Make sure only 1 message was delivered.
-        Message m1 = receiveMessage(connection);
-        assertNotNull(m1);
-        assertNoMessagesLeft(connection);
-
-        // Acknowledge the first message. This should cause the next message to
-        // get dispatched.
-        connection.send(createAck(consumerInfo, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        Message m2 = receiveMessage(connection);
-        assertNotNull(m2);
-        connection.send(createAck(consumerInfo, m2, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        Message m3 = receiveMessage(connection);
-        assertNotNull(m3);
-        connection.send(createAck(consumerInfo, m3, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        connection.send(closeConnectionInfo(connectionInfo));
-    }
-
-    public void initCombosForTestTransactedAckWithPrefetchOfOne() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testTransactedAckWithPrefetchOfOne() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(1);
-        connection1.send(consumerInfo1);
-
-        // Send the messages
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo1, destination, deliveryMode);
-            connection1.send(message);
-        }
-
-       
-
-        // Now get the messages.
-        for (int i = 0; i < 4; i++) {
-            // Begin the transaction.
-            LocalTransactionId txid = createLocalTransaction(sessionInfo1);
-            connection1.send(createBeginTransaction(connectionInfo1, txid));
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            MessageAck ack = createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection1.send(ack);
-         // Commit the transaction.
-            connection1.send(createCommitTransaction1Phase(connectionInfo1, txid));
-        }
-        assertNoMessagesLeft(connection1);
-    }
-
-    public void initCombosForTestTransactedSend() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testTransactedSend() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // Begin the transaction.
-        LocalTransactionId txid = createLocalTransaction(sessionInfo1);
-        connection1.send(createBeginTransaction(connectionInfo1, txid));
-
-        // Send the messages
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo1, destination, deliveryMode);
-            message.setTransactionId(txid);
-            connection1.request(message);
-        }
-
-        // The point of this test is that message should not be delivered until
-        // send is committed.
-        assertNull(receiveMessage(connection1,MAX_NULL_WAIT));
-
-        // Commit the transaction.
-        connection1.send(createCommitTransaction1Phase(connectionInfo1, txid));
-
-        // Now get the messages.
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-        }
-
-        assertNoMessagesLeft(connection1);
-    }
-
-    public void initCombosForTestQueueTransactedAck() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)});
-    }
-
-    public void testQueueTransactedAck() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // Send the messages
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo1, destination, deliveryMode);
-            connection1.send(message);
-        }
-
-        // Begin the transaction.
-        LocalTransactionId txid = createLocalTransaction(sessionInfo1);
-        connection1.send(createBeginTransaction(connectionInfo1, txid));
-
-        // Acknowledge the first 2 messages.
-        for (int i = 0; i < 2; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull("m1 is null for index: " + i, m1);
-            MessageAck ack = createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection1.request(ack);
-        }
-
-        // Commit the transaction.
-        connection1.send(createCommitTransaction1Phase(connectionInfo1, txid));
-
-        // The queue should now only have the remaining 2 messages
-        assertEquals(2, countMessagesInQueue(connection1, connectionInfo1, destination));
-    }
-
-    public void initCombosForTestConsumerCloseCausesRedelivery() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST")});
-    }
-
-    public void testConsumerCloseCausesRedelivery() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.request(consumerInfo1);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-
-        // Receive the messages.
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull("m1 is null for index: " + i, m1);
-            assertFalse(m1.isRedelivered());
-        }
-
-        // Close the consumer without acking.. this should cause re-delivery of
-        // the messages.
-        connection1.send(consumerInfo1.createRemoveCommand());
-
-        // Create another consumer that should get the messages again.
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo2.setPrefetchSize(100);
-        connection1.request(consumerInfo2);
-
-        // Receive the messages.
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull("m1 is null for index: " + i, m1);
-            assertTrue(m1.isRedelivered());
-        }
-        assertNoMessagesLeft(connection1);
-
-    }
-
-    public void testTopicDurableSubscriptionCanBeRestored() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQTopic("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        connectionInfo1.setClientId("clientid1");
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        consumerInfo1.setSubscriptionName("test");
-        connection1.send(consumerInfo1);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-        connection1.send(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-        connection1.send(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-        connection1.request(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-
-        // Get the messages
-        Message m = null;
-        for (int i = 0; i < 2; i++) {
-            m = receiveMessage(connection1);
-            assertNotNull(m);
-        }
-        // Ack the last message.
-        connection1.send(createAck(consumerInfo1, m, 2, MessageAck.STANDARD_ACK_TYPE));
-        // Close the connection.
-        connection1.request(closeConnectionInfo(connectionInfo1));
-        connection1.stop();
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        connectionInfo2.setClientId("clientid1");
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(100);
-        consumerInfo2.setSubscriptionName("test");
-
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(consumerInfo2);
-
-        // Get the rest of the messages
-        for (int i = 0; i < 2; i++) {
-            Message m1 = receiveMessage(connection2);
-            assertNotNull("m1 is null for index: " + i, m1);
-        }
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void initCombosForTestGroupedMessagesDeliveredToOnlyOneConsumer() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    public void testGroupedMessagesDeliveredToOnlyOneConsumer() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(1);
-        connection1.send(consumerInfo1);
-
-        // Send the messages.
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination, deliveryMode);
-            message.setGroupID("TEST-GROUP");
-            message.setGroupSequence(i + 1);
-            connection1.request(message);
-        }
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(1);
-        connection2.send(consumerInfo2);
-
-        // All the messages should have been sent down connection 1.. just get
-        // the first 3
-        for (int i = 0; i < 3; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull("m1 is null for index: " + i, m1);
-            connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        // Close the first consumer.
-        connection1.request(closeConsumerInfo(consumerInfo1));
-
-        // The last messages should now go the the second consumer.
-        for (int i = 0; i < 1; i++) {
-            Message m1 = receiveMessage(connection2);
-            assertNotNull("m1 is null for index: " + i, m1);
-            connection2.request(createAck(consumerInfo2, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void initCombosForTestTopicConsumerOnlySeeMessagesAfterCreation() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testTopicConsumerOnlySeeMessagesAfterCreation() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQTopic("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        connectionInfo1.setClientId("A");
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        // Send the 1st message
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-
-        // Create the durable subscription.
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        if (durableConsumer) {
-            consumerInfo1.setSubscriptionName("test");
-        }
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        Message m = createMessage(producerInfo1, destination, deliveryMode);
-        connection1.send(m);
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-
-        // Subscription should skip over the first message
-        Message m2 = receiveMessage(connection1);
-        assertNotNull(m2);
-        assertEquals(m.getMessageId(), m2.getMessageId());
-        m2 = receiveMessage(connection1);
-        assertNotNull(m2);
-
-        assertNoMessagesLeft(connection1);
-    }
-
-    public void initCombosForTestTopicRetroactiveConsumerSeeMessagesBeforeCreation() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testTopicRetroactiveConsumerSeeMessagesBeforeCreation() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQTopic("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        connectionInfo1.setClientId("A");
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        // Send the messages
-        Message m = createMessage(producerInfo1, destination, deliveryMode);
-        connection1.send(m);
-
-        // Create the durable subscription.
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        if (durableConsumer) {
-            consumerInfo1.setSubscriptionName("test");
-        }
-        consumerInfo1.setPrefetchSize(100);
-        consumerInfo1.setRetroactive(true);
-        connection1.send(consumerInfo1);
-
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.request(createMessage(producerInfo1, destination, deliveryMode));
-
-        // the behavior is VERY dependent on the recovery policy used.
-        // But the default broker settings try to make it as consistent as
-        // possible
-
-        // Subscription should see all messages sent.
-        Message m2 = receiveMessage(connection1);
-        assertNotNull(m2);
-        assertEquals(m.getMessageId(), m2.getMessageId());
-        for (int i = 0; i < 2; i++) {
-            m2 = receiveMessage(connection1);
-            assertNotNull(m2);
-        }
-
-        assertNoMessagesLeft(connection1);
-    }
-
-    //
-    // TODO: need to reimplement this since we don't fail when we send to a
-    // non-existant
-    // destination. But if we can access the Region directly then we should be
-    // able to
-    // check that if the destination was removed.
-    // 
-    // public void initCombosForTestTempDestinationsRemovedOnConnectionClose() {
-    // addCombinationValues( "deliveryMode", new Object[]{
-    // Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-    // Integer.valueOf(DeliveryMode.PERSISTENT)} );
-    // addCombinationValues( "destinationType", new Object[]{
-    // Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-    // Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
-    // }
-    //    
-    // public void testTempDestinationsRemovedOnConnectionClose() throws
-    // Exception {
-    //        
-    // // Setup a first connection
-    // StubConnection connection1 = createConnection();
-    // ConnectionInfo connectionInfo1 = createConnectionInfo();
-    // SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-    // ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-    // connection1.send(connectionInfo1);
-    // connection1.send(sessionInfo1);
-    // connection1.send(producerInfo1);
-    //
-    // destination = createDestinationInfo(connection1, connectionInfo1,
-    // destinationType);
-    //        
-    // StubConnection connection2 = createConnection();
-    // ConnectionInfo connectionInfo2 = createConnectionInfo();
-    // SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-    // ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-    // connection2.send(connectionInfo2);
-    // connection2.send(sessionInfo2);
-    // connection2.send(producerInfo2);
-    //
-    // // Send from connection2 to connection1's temp destination. Should
-    // succeed.
-    // connection2.send(createMessage(producerInfo2, destination,
-    // deliveryMode));
-    //        
-    // // Close connection 1
-    // connection1.request(closeConnectionInfo(connectionInfo1));
-    //        
-    // try {
-    // // Send from connection2 to connection1's temp destination. Should not
-    // succeed.
-    // connection2.request(createMessage(producerInfo2, destination,
-    // deliveryMode));
-    // fail("Expected JMSException.");
-    // } catch ( JMSException success ) {
-    // }
-    //        
-    // }
-
-    // public void initCombosForTestTempDestinationsAreNotAutoCreated() {
-    // addCombinationValues( "deliveryMode", new Object[]{
-    // Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-    // Integer.valueOf(DeliveryMode.PERSISTENT)} );
-    // addCombinationValues( "destinationType", new Object[]{
-    // Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-    // Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
-    // }
-    //    
-    //   
-
-    // We create temp destination on demand now so this test case is no longer
-    // valid.
-    //    
-    // public void testTempDestinationsAreNotAutoCreated() throws Exception {
-    //        
-    // // Setup a first connection
-    // StubConnection connection1 = createConnection();
-    // ConnectionInfo connectionInfo1 = createConnectionInfo();
-    // SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-    // ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-    // connection1.send(connectionInfo1);
-    // connection1.send(sessionInfo1);
-    // connection1.send(producerInfo1);
-    //
-    // destination =
-    // ActiveMQDestination.createDestination(connectionInfo1.getConnectionId()+":1",
-    // destinationType);
-    //            
-    // // Should not be able to send to a non-existant temp destination.
-    // try {
-    // connection1.request(createMessage(producerInfo1, destination,
-    // deliveryMode));
-    // fail("Expected JMSException.");
-    // } catch ( JMSException success ) {
-    // }
-    //        
-    // }
-
-    
-    public void initCombosForTestExclusiveQueueDeliversToOnlyOneConsumer() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    public void testExclusiveQueueDeliversToOnlyOneConsumer() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(1);
-        consumerInfo1.setExclusive(true);
-        connection1.send(consumerInfo1);
-
-        // Send a message.. this should make consumer 1 the exclusive owner.
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(1);
-        consumerInfo2.setExclusive(true);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        // Second message should go to consumer 1 even though consumer 2 is
-        // ready
-        // for dispatch.
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Acknowledge the first 2 messages
-        for (int i = 0; i < 2; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        // Close the first consumer.
-        connection1.send(closeConsumerInfo(consumerInfo1));
-
-        // The last two messages should now go the the second consumer.
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-
-        for (int i = 0; i < 2; i++) {
-            Message m1 = receiveMessage(connection2);
-            assertNotNull(m1);
-            connection2.send(createAck(consumerInfo2, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void initCombosForTestWildcardConsume() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testWildcardConsume() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        // setup the wildcard consumer.
-        ActiveMQDestination compositeDestination = ActiveMQDestination.createDestination("WILD.*.TEST",
-                                                                                         destinationType);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, compositeDestination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // These two message should NOT match the wild card.
-        connection1.send(createMessage(producerInfo1, ActiveMQDestination.createDestination("WILD.CARD",
-                                                                                            destinationType),
-                                       deliveryMode));
-        connection1.send(createMessage(producerInfo1, ActiveMQDestination.createDestination("WILD.TEST",
-                                                                                            destinationType),
-                                       deliveryMode));
-
-        // These two message should match the wild card.
-        ActiveMQDestination d1 = ActiveMQDestination.createDestination("WILD.CARD.TEST", destinationType);
-        connection1.send(createMessage(producerInfo1, d1, deliveryMode));
-        
-        Message m = receiveMessage(connection1);
-        assertNotNull(m);
-        assertEquals(d1, m.getDestination());
-
-        ActiveMQDestination d2 = ActiveMQDestination.createDestination("WILD.FOO.TEST", destinationType);
-        connection1.request(createMessage(producerInfo1, d2, deliveryMode));
-        m = receiveMessage(connection1);
-        assertNotNull(m);
-        assertEquals(d2, m.getDestination());
-
-        assertNoMessagesLeft(connection1);
-        connection1.send(closeConnectionInfo(connectionInfo1));
-    }
-
-    public void initCombosForTestCompositeConsume() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testCompositeConsume() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        // setup the composite consumer.
-        ActiveMQDestination compositeDestination = ActiveMQDestination.createDestination("A,B",
-                                                                                         destinationType);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, compositeDestination);
-        consumerInfo1.setRetroactive(true);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // Publish to the two destinations
-        ActiveMQDestination destinationA = ActiveMQDestination.createDestination("A", destinationType);
-        ActiveMQDestination destinationB = ActiveMQDestination.createDestination("B", destinationType);
-
-        // Send a message to each destination .
-        connection1.send(createMessage(producerInfo1, destinationA, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destinationB, deliveryMode));
-
-        // The consumer should get both messages.
-        for (int i = 0; i < 2; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-        }
-
-        assertNoMessagesLeft(connection1);
-        connection1.send(closeConnectionInfo(connectionInfo1));
-    }
-
-    public void initCombosForTestCompositeSend() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testCompositeSend() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        ActiveMQDestination destinationA = ActiveMQDestination.createDestination("A", destinationType);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destinationA);
-        consumerInfo1.setRetroactive(true);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.request(consumerInfo1);
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-
-        ActiveMQDestination destinationB = ActiveMQDestination.createDestination("B", destinationType);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destinationB);
-        consumerInfo2.setRetroactive(true);
-        consumerInfo2.setPrefetchSize(100);
-        connection2.request(consumerInfo2);
-
-        // Send the messages to the composite destination.
-        ActiveMQDestination compositeDestination = ActiveMQDestination.createDestination("A,B",
-                                                                                         destinationType);
-        for (int i = 0; i < 4; i++) {
-            connection1.request(createMessage(producerInfo1, compositeDestination, deliveryMode));
-        }
-
-        // The messages should have been delivered to both the A and B
-        // destination.
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            Message m2 = receiveMessage(connection2);
-
-            assertNotNull(m1);
-            assertNotNull(m2);
-
-            assertEquals(m1.getMessageId(), m2.getMessageId());
-            assertEquals(compositeDestination, m1.getOriginalDestination());
-            assertEquals(compositeDestination, m2.getOriginalDestination());
-
-            connection1.request(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-            connection2.request(createAck(consumerInfo2, m2, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        }
-
-        assertNoMessagesLeft(connection1);
-        assertNoMessagesLeft(connection2);
-
-        connection1.send(closeConnectionInfo(connectionInfo1));
-        connection2.send(closeConnectionInfo(connectionInfo2));
-    }
-
-    public void initCombosForTestConnectionCloseCascades() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
-                                                          new ActiveMQQueue("TEST")});
-    }
-
-    public void testConnectionCloseCascades() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        consumerInfo1.setNoLocal(true);
-        connection1.request(consumerInfo1);
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(producerInfo2);
-
-        // Send the messages
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        // give the async ack a chance to perculate and validate all are currently consumed
-        Message msg = receiveMessage(connection1, MAX_NULL_WAIT);
-        assertNull("all messages were received " + msg, msg);
-        
-        // Close the connection, this should in turn close the consumer.
-        connection1.request(closeConnectionInfo(connectionInfo1));
-
-        // Send another message, connection1 should not get the message.
-        connection2.request(createMessage(producerInfo2, destination, deliveryMode));
-
-        assertNull("no message received", receiveMessage(connection1, MAX_NULL_WAIT));
-    }
-
-    public void initCombosForTestSessionCloseCascades() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
-                                                          new ActiveMQQueue("TEST")});
-    }
-
-    public void testSessionCloseCascades() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        consumerInfo1.setNoLocal(true);
-        connection1.request(consumerInfo1);
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(producerInfo2);
-
-        // Send the messages
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        // Close the session, this should in turn close the consumer.
-        connection1.request(closeSessionInfo(sessionInfo1));
-
-        // Send another message, connection1 should not get the message.
-        connection2.request(createMessage(producerInfo2, destination, deliveryMode));
-
-        Message msg = receiveMessage(connection1,MAX_NULL_WAIT);
-        assertNull("no message received from connection1 after session close", msg);
-    }
-
-    public void initCombosForTestConsumerClose() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
-                                                          new ActiveMQQueue("TEST")});
-    }
-
-    public void testConsumerClose() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        consumerInfo1.setNoLocal(true);
-        connection1.request(consumerInfo1);
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(producerInfo2);
-
-        // Send the messages
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-        connection2.send(createMessage(producerInfo2, destination, deliveryMode));
-
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-        }
-
-        // give the async ack a chance to perculate and validate all are currently consumed
-        // use receive rather than poll as broker info is sent async and may still need to be dequeued
-        Message result = receiveMessage(connection1, MAX_NULL_WAIT);
-        assertNull("no more messages " + result, result);
- 
-        // Close the consumer.
-        connection1.request(closeConsumerInfo(consumerInfo1));
-
-        // Send another message, connection1 should not get the message.
-        connection2.request(createMessage(producerInfo2, destination, deliveryMode));
-
-        result = receiveMessage(connection1, MAX_NULL_WAIT);
-        assertNull("no message received after close " + result, result);
-    }
-
-    public void initCombosForTestTopicNoLocal() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    public void testTopicNoLocal() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQTopic("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setRetroactive(true);
-        consumerInfo1.setPrefetchSize(100);
-        consumerInfo1.setNoLocal(true);
-        connection1.send(consumerInfo1);
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(producerInfo2);
-
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setRetroactive(true);
-        consumerInfo2.setPrefetchSize(100);
-        consumerInfo2.setNoLocal(true);
-        connection2.send(consumerInfo2);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-
-        // The 2nd connection should get the messages.
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection2);
-            assertNotNull(m1);
-        }
-
-        // Send a message with the 2nd connection
-        Message message = createMessage(producerInfo2, destination, deliveryMode);
-        connection2.send(message);
-
-        // The first connection should not see the initial 4 local messages sent
-        // but should
-        // see the messages from connection 2.
-        Message m = receiveMessage(connection1);
-        assertNotNull(m);
-        assertEquals(message.getMessageId(), m.getMessageId());
-
-        assertNoMessagesLeft(connection1);
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void initCombosForTopicDispatchIsBroadcast() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-    }
-
-    public void testTopicDispatchIsBroadcast() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQTopic("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setRetroactive(true);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // Setup a second connection
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setRetroactive(true);
-        consumerInfo2.setPrefetchSize(100);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(consumerInfo2);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo1, destination, deliveryMode));
-
-        // Get the messages
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            m1 = receiveMessage(connection2);
-            assertNotNull(m1);
-        }
-    }
-
-    public void initCombosForTestQueueDispatchedAreRedeliveredOnConsumerClose() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)});
-    }
-
-    public void testQueueDispatchedAreRedeliveredOnConsumerClose() throws Exception {
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Get the messages
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            assertFalse(m1.isRedelivered());
-        }
-        // Close the consumer without sending any ACKS.
-        connection1.send(closeConsumerInfo(consumerInfo1));
-
-        // Drain any in flight messages..
-        while (connection1.getDispatchQueue().poll(0, TimeUnit.MILLISECONDS) != null) {
-        }
-
-        // Add the second consumer
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo2.setPrefetchSize(100);
-        connection1.send(consumerInfo2);
-
-        // Make sure the messages were re delivered to the 2nd consumer.
-        for (int i = 0; i < 4; i++) {
-            Message m1 = receiveMessage(connection1);
-            assertNotNull(m1);
-            assertTrue(m1.isRedelivered());
-        }
-    }
-
-    public void initCombosForTestQueueBrowseMessages() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)});
-    }
-
-    public void testQueueBrowseMessages() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Use selector to skip first message.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setBrowser(true);
-        connection.send(consumerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-            connection.send(createAck(consumerInfo, m, 1, MessageAck.DELIVERED_ACK_TYPE));
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-
-    public void initCombosForTestQueueSendThenAddConsumer() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)});
-    }
-
-    public void testQueueSendThenAddConsumer() throws Exception {
-
-        // Start a producer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        // Send a message to the broker.
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Start the consumer
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Make sure the message was delivered.
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-
-    }
-
-    public void initCombosForTestQueueAckRemovesMessage() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)});
-    }
-
-    public void testQueueAckRemovesMessage() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        Message message1 = createMessage(producerInfo, destination, deliveryMode);
-        Message message2 = createMessage(producerInfo, destination, deliveryMode);
-        connection.send(message1);
-        connection.send(message2);
-
-        // Make sure the message was delivered.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.request(consumerInfo);
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-        assertEquals(m.getMessageId(), message1.getMessageId());
-
-        assertTrue(countMessagesInQueue(connection, connectionInfo, destination) == 2);
-        connection.send(createAck(consumerInfo, m, 1, MessageAck.DELIVERED_ACK_TYPE));
-        assertTrue(countMessagesInQueue(connection, connectionInfo, destination) == 2);
-        connection.send(createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE));
-        assertTrue(countMessagesInQueue(connection, connectionInfo, destination) == 1);
-
-    }
-
-    public void initCombosForTestSelectorSkipsMessages() {
-        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST_TOPIC"),
-                                                          new ActiveMQQueue("TEST_QUEUE")});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testSelectorSkipsMessages() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setSelector("JMSType='last'");
-        connection.send(consumerInfo);
-
-        Message message1 = createMessage(producerInfo, destination, deliveryMode);
-        message1.setType("first");
-        Message message2 = createMessage(producerInfo, destination, deliveryMode);
-        message2.setType("last");
-        connection.send(message1);
-        connection.send(message2);
-
-        // Use selector to skip first message.
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-        assertEquals(m.getMessageId(), message2.getMessageId());
-        connection.send(createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE));
-        connection.send(closeConsumerInfo(consumerInfo));
-
-        assertNoMessagesLeft(connection);
-    }
-
-    public void initCombosForTestAddConsumerThenSend() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testAddConsumerThenSend() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Make sure the message was delivered.
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-    }
-
-    public void initCombosForTestConsumerPrefetchAtOne() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testConsumerPrefetchAtOne() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setPrefetchSize(1);
-        connection.send(consumerInfo);
-
-        // Send 2 messages to the broker.
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Make sure only 1 message was delivered.
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-        assertNoMessagesLeft(connection);
-
-    }
-
-    public void initCombosForTestConsumerPrefetchAtTwo() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testConsumerPrefetchAtTwo() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setPrefetchSize(2);
-        connection.send(consumerInfo);
-
-        // Send 3 messages to the broker.
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Make sure only 1 message was delivered.
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-        m = receiveMessage(connection);
-        assertNotNull(m);
-        assertNoMessagesLeft(connection);
-
-    }
-
-    public void initCombosForTestConsumerPrefetchAndDeliveredAck() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT),
-                                                           Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType",
-                             new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
-                                           Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testConsumerPrefetchAndDeliveredAck() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setPrefetchSize(1);
-        connection.request(consumerInfo);
-
-        // Send 3 messages to the broker.
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.send(createMessage(producerInfo, destination, deliveryMode));
-        connection.request(createMessage(producerInfo, destination, deliveryMode));
-
-        // Make sure only 1 message was delivered.
-        Message m1 = receiveMessage(connection);
-        assertNotNull(m1);
-
-        assertNoMessagesLeft(connection);
-
-        // Acknowledge the first message. This should cause the next message to
-        // get dispatched.
-        connection.request(createAck(consumerInfo, m1, 1, MessageAck.DELIVERED_ACK_TYPE));
-
-        Message m2 = receiveMessage(connection);
-        assertNotNull(m2);
-        connection.request(createAck(consumerInfo, m2, 1, MessageAck.DELIVERED_ACK_TYPE));
-
-        Message m3 = receiveMessage(connection);
-        assertNotNull(m3);
-        connection.request(createAck(consumerInfo, m3, 1, MessageAck.DELIVERED_ACK_TYPE));
-    }
-
-    public void testGetServices() throws Exception {
-        assertTrue(broker.getServices().length != 0);
-    }
-    
-    public static Test suite() {
-        return suite(BrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
deleted file mode 100755
index a9158cc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.DeliveryMode;
-import javax.jms.MessageNotWriteableException;
-
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.policy.FixedCountSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.usage.SystemUsage;
-
-public class BrokerTestSupport extends CombinationTestSupport {
-
-    /**
-     * Setting this to false makes the test run faster but they may be less
-     * accurate.
-     */
-    public static final boolean FAST_NO_MESSAGE_LEFT_ASSERT = System.getProperty("FAST_NO_MESSAGE_LEFT_ASSERT", "true").equals("true");
-
-    protected RegionBroker regionBroker;
-    protected BrokerService broker;
-    protected long idGenerator;
-    protected int msgIdGenerator;
-    protected int txGenerator;
-    protected int tempDestGenerator;
-    protected PersistenceAdapter persistenceAdapter;
-    
-    protected String queueName = "TEST";
-
-    protected int maxWait = 4000;
-
-    protected SystemUsage memoryManager;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        broker = createBroker();
-        PolicyMap policyMap = new PolicyMap();
-        policyMap.setDefaultEntry(getDefaultPolicy());
-        broker.setDestinationPolicy(policyMap);
-        broker.start();
-    }
-
-    protected PolicyEntry getDefaultPolicy() {
-        PolicyEntry policy = new PolicyEntry();
-        policy.setDispatchPolicy(new RoundRobinDispatchPolicy());
-        policy.setSubscriptionRecoveryPolicy(new FixedCountSubscriptionRecoveryPolicy());
-        return policy;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = BrokerFactory.createBroker(new URI("broker:()/localhost?persistent=false"));
-        return broker;
-    }
-
-    protected void tearDown() throws Exception {
-        broker.stop();
-        broker.waitUntilStopped();
-        broker = null;
-        regionBroker = null;
-        persistenceAdapter = null;
-        memoryManager = null;
-        super.tearDown();
-    }
-
-    protected ConsumerInfo createConsumerInfo(SessionInfo sessionInfo, ActiveMQDestination destination) throws Exception {
-        ConsumerInfo info = new ConsumerInfo(sessionInfo, ++idGenerator);
-        info.setBrowser(false);
-        info.setDestination(destination);
-        info.setPrefetchSize(1000);
-        info.setDispatchAsync(false);
-        return info;
-    }
-
-    protected RemoveInfo closeConsumerInfo(ConsumerInfo consumerInfo) {
-        return consumerInfo.createRemoveCommand();
-    }
-
-    protected ProducerInfo createProducerInfo(SessionInfo sessionInfo) throws Exception {
-        ProducerInfo info = new ProducerInfo(sessionInfo, ++idGenerator);
-        return info;
-    }
-
-    protected SessionInfo createSessionInfo(ConnectionInfo connectionInfo) throws Exception {
-        SessionInfo info = new SessionInfo(connectionInfo, ++idGenerator);
-        return info;
-    }
-
-    protected ConnectionInfo createConnectionInfo() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        info.setConnectionId(new ConnectionId("connection:" + (++idGenerator)));
-        info.setClientId(info.getConnectionId().getValue());
-        return info;
-    }
-
-    protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination) {
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-        message.setMessageId(new MessageId(producerInfo, ++msgIdGenerator));
-        message.setDestination(destination);
-        message.setPersistent(false);
-        try {
-            message.setText("Test Message Payload.");
-        } catch (MessageNotWriteableException e) {
-        }
-        return message;
-    }
-
-    protected MessageAck createAck(ConsumerInfo consumerInfo, Message msg, int count, byte ackType) {
-        MessageAck ack = new MessageAck();
-        ack.setAckType(ackType);
-        ack.setConsumerId(consumerInfo.getConsumerId());
-        ack.setDestination(msg.getDestination());
-        ack.setLastMessageId(msg.getMessageId());
-        ack.setMessageCount(count);
-        return ack;
-    }
-
-    protected void gc() {
-        regionBroker.gc();
-    }
-
-    protected void profilerPause(String prompt) throws IOException {
-        if (System.getProperty("profiler") != null) {
-            System.out.println();
-            System.out.println(prompt + "> Press enter to continue: ");
-            while (System.in.read() != '\n') {
-            }
-            System.out.println(prompt + "> Done.");
-        }
-    }
-
-    protected RemoveInfo closeConnectionInfo(ConnectionInfo info) {
-        return info.createRemoveCommand();
-    }
-
-    protected RemoveInfo closeSessionInfo(SessionInfo info) {
-        return info.createRemoveCommand();
-    }
-
-    protected RemoveInfo closeProducerInfo(ProducerInfo info) {
-        return info.createRemoveCommand();
-    }
-
-    protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination, int deliveryMode) {
-        Message message = createMessage(producerInfo, destination);
-        message.setPersistent(deliveryMode == DeliveryMode.PERSISTENT);
-        return message;
-    }
-
-    protected LocalTransactionId createLocalTransaction(SessionInfo info) {
-        LocalTransactionId id = new LocalTransactionId(info.getSessionId().getParentId(), ++txGenerator);
-        return id;
-    }
-
-    protected XATransactionId createXATransaction(SessionInfo info) throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream os = new DataOutputStream(baos);
-        os.writeLong(++txGenerator);
-        os.close();
-        byte[] bs = baos.toByteArray();
-
-        XATransactionId xid = new XATransactionId();
-        xid.setBranchQualifier(bs);
-        xid.setGlobalTransactionId(bs);
-        xid.setFormatId(55);
-        return xid;
-    }
-
-    protected TransactionInfo createBeginTransaction(ConnectionInfo connectionInfo, TransactionId txid) {
-        TransactionInfo info = new TransactionInfo(connectionInfo.getConnectionId(), txid, TransactionInfo.BEGIN);
-        return info;
-    }
-
-    protected TransactionInfo createPrepareTransaction(ConnectionInfo connectionInfo, TransactionId txid) {
-        TransactionInfo info = new TransactionInfo(connectionInfo.getConnectionId(), txid, TransactionInfo.PREPARE);
-        return info;
-    }
-
-    protected TransactionInfo createCommitTransaction1Phase(ConnectionInfo connectionInfo, TransactionId txid) {
-        TransactionInfo info = new TransactionInfo(connectionInfo.getConnectionId(), txid, TransactionInfo.COMMIT_ONE_PHASE);
-        return info;
-    }
-
-    protected TransactionInfo createCommitTransaction2Phase(ConnectionInfo connectionInfo, TransactionId txid) {
-        TransactionInfo info = new TransactionInfo(connectionInfo.getConnectionId(), txid, TransactionInfo.COMMIT_TWO_PHASE);
-        return info;
-    }
-
-    protected TransactionInfo createRollbackTransaction(ConnectionInfo connectionInfo, TransactionId txid) {
-        TransactionInfo info = new TransactionInfo(connectionInfo.getConnectionId(), txid, TransactionInfo.ROLLBACK);
-        return info;
-    }
-
-    protected int countMessagesInQueue(StubConnection connection, ConnectionInfo connectionInfo, ActiveMQDestination destination) throws Exception {
-
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setPrefetchSize(1);
-        consumerInfo.setBrowser(true);
-        connection.send(consumerInfo);
-
-        ArrayList<Object> skipped = new ArrayList<Object>();
-
-        // Now get the messages.
-        Object m = connection.getDispatchQueue().poll(maxWait, TimeUnit.MILLISECONDS);
-        int i = 0;
-        while (m != null) {
-            if (m instanceof MessageDispatch && ((MessageDispatch)m).getConsumerId().equals(consumerInfo.getConsumerId())) {
-                MessageDispatch md = (MessageDispatch)m;
-                if (md.getMessage() != null) {
-                    i++;
-                    connection.send(createAck(consumerInfo, md.getMessage(), 1, MessageAck.STANDARD_ACK_TYPE));
-                } else {
-                    break;
-                }
-            } else {
-                skipped.add(m);
-            }
-            m = connection.getDispatchQueue().poll(maxWait, TimeUnit.MILLISECONDS);
-        }
-
-        for (Iterator<Object> iter = skipped.iterator(); iter.hasNext();) {
-            connection.getDispatchQueue().put(iter.next());
-        }
-
-        connection.send(closeSessionInfo(sessionInfo));
-        return i;
-
-    }
-
-    protected DestinationInfo createTempDestinationInfo(ConnectionInfo connectionInfo, byte destinationType) {
-        DestinationInfo info = new DestinationInfo();
-        info.setConnectionId(connectionInfo.getConnectionId());
-        info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
-        info.setDestination(ActiveMQDestination.createDestination(info.getConnectionId() + ":" + (++tempDestGenerator), destinationType));
-        return info;
-    }
-
-    protected ActiveMQDestination createDestinationInfo(StubConnection connection, ConnectionInfo connectionInfo1, byte destinationType) throws Exception {
-        if ((destinationType & ActiveMQDestination.TEMP_MASK) != 0) {
-            DestinationInfo info = createTempDestinationInfo(connectionInfo1, destinationType);
-            connection.send(info);
-            return info.getDestination();
-        } else {
-            return ActiveMQDestination.createDestination(queueName, destinationType);
-        }
-    }
-
-    protected DestinationInfo closeDestinationInfo(DestinationInfo info) {
-        info.setOperationType(DestinationInfo.REMOVE_OPERATION_TYPE);
-        info.setTimeout(0);
-        return info;
-    }
-
-    public static void recursiveDelete(File f) {
-        if (f.isDirectory()) {
-            File[] files = f.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        f.delete();
-    }
-
-    protected StubConnection createConnection() throws Exception {
-        return new StubConnection(broker);
-    }
-
-    /**
-     * @param connection
-     * @return
-     * @throws InterruptedException
-     */
-    public Message receiveMessage(StubConnection connection) throws InterruptedException {
-        return receiveMessage(connection, maxWait);
-    }
-
-    public Message receiveMessage(StubConnection connection, long timeout) throws InterruptedException {
-        while (true) {
-            Object o = connection.getDispatchQueue().poll(timeout, TimeUnit.MILLISECONDS);
-
-            if (o == null) {
-                return null;
-            }
-            if (o instanceof MessageDispatch) {
-
-                MessageDispatch dispatch = (MessageDispatch)o;
-                if (dispatch.getMessage() == null) {
-                    return null;
-                }
-                dispatch.setMessage(dispatch.getMessage().copy());
-                dispatch.getMessage().setRedeliveryCounter(dispatch.getRedeliveryCounter());
-                return dispatch.getMessage();
-            }
-        }
-    };
-
-    protected void assertNoMessagesLeft(StubConnection connection) throws InterruptedException {
-        long wait = FAST_NO_MESSAGE_LEFT_ASSERT ? 0 : maxWait;
-        while (true) {
-            Object o = connection.getDispatchQueue().poll(wait, TimeUnit.MILLISECONDS);
-            if (o == null) {
-                return;
-            }
-            if (o instanceof MessageDispatch && ((MessageDispatch)o).getMessage() != null) {
-                fail("Received a message: "+((MessageDispatch)o).getMessage().getMessageId());
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.java
deleted file mode 100644
index 0c791fd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.broker;
-
-import junit.framework.Test;
-
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.SessionId;
-
-public class ConcurrentConnectSimulationTest extends BrokerTestSupport {
-
-    /*
-     * simulate failover and retry of connection before broker has killed connection
-     * which appears as a concurrent connect request to the broker
-     * see: https://issues.apache.org/activemq/browse/AMQ-2241
-     */
-    public void testConcurrentConnection() throws Exception {
-
-        StubConnection connection1 = createConnection();
-        StubConnection connection2 = createConnection();
-        
-        // reuse same connection info
-        ConnectionInfo connectionInfo = createConnectionInfo();       
-        connection1.request(connectionInfo);
-        connection2.request(connectionInfo);
-        
-        // second one should win out, verify using consumer on default session (watchAdvisories)
-        ConsumerId consumerId = new ConsumerId(new SessionId(connectionInfo.getConnectionId(), -1), 1);
-        ConsumerInfo consumerInfo = new ConsumerInfo(consumerId);
-        consumerInfo.setDestination(AdvisorySupport.TEMP_DESTINATION_COMPOSITE_ADVISORY_TOPIC);
-
-        connection2.request(consumerInfo);
-    }
-    
-    public static Test suite() {
-        return suite(ConcurrentConnectSimulationTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
deleted file mode 100644
index 70fda7c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.Set;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.xbean.XBeanBrokerFactory;
-
-/**
- * 
- * 
- */
-public class CreateDestinationsOnStartupViaXBeanTest extends EmbeddedBrokerTestSupport {
-
-    public void testNewDestinationsAreCreatedOnStartup() throws Exception {
-        assertQueueCreated("FOO.BAR", true);
-        assertQueueCreated("FOO.DoesNotExist", false);
-        
-        assertTopicCreated("SOME.TOPIC", true);
-        assertTopicCreated("FOO.DoesNotExist", false);
-    }
-
-    protected void assertQueueCreated(String name, boolean expected) throws Exception {
-        assertDestinationCreated(new ActiveMQQueue(name), expected);
-    }
-    
-    protected void assertTopicCreated(String name, boolean expected) throws Exception {
-        assertDestinationCreated(new ActiveMQTopic(name), expected);
-    }
-
-    protected void assertDestinationCreated(ActiveMQDestination destination, boolean expected) throws Exception {
-        Set answer = broker.getBroker().getDestinations(destination);
-        int size = expected ? 1 : 0;
-        assertEquals("Could not find destination: " + destination + ". Size of found destinations: " + answer, size, answer.size());
-    }
-    
-    protected BrokerService createBroker() throws Exception {
-        XBeanBrokerFactory factory = new XBeanBrokerFactory();
-        BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri()));
-        
-        // lets disable persistence as we are a test
-        answer.setPersistent(false);
-        
-        return answer;
-    }
-
-    protected String getBrokerConfigUri() {
-        return "org/apache/activemq/broker/destinations-on-start.xml";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java
deleted file mode 100755
index c186420..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.broker;
-
-import junit.framework.Test;
-
-public class DedicatedTaskRunnerBrokerTest extends BrokerTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.setDedicatedTaskRunner(true);
-        return broker;
-    }
-    
-    public static Test suite() {
-        return suite(DedicatedTaskRunnerBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
deleted file mode 100644
index 8fd1292..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.broker;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.network.NetworkTestSupport;
-
-/**
- * Pretend to be an abusive client that sends multiple identical ConsumerInfo
- * commands and make sure the broker doesn't stall because of it.
- */
-
-public class DoubleSubscriptionTest extends NetworkTestSupport {
-
-    public ActiveMQDestination destination;
-    public int deliveryMode;
-
-    private String remoteURI = "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true";
-
-    public static Test suite() {
-        return suite(DoubleSubscriptionTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void initCombosForTestDoubleSubscription() {
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQQueue("TEST")});
-    }
-
-    public void testDoubleSubscription() throws Exception {
-
-        // Start a normal consumer on the remote broker
-        StubConnection connection1 = createRemoteConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.request(consumerInfo1);
-
-        // Start a normal producer on a remote broker
-        StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(producerInfo2);
-
-        // Send a message to make sure the basics are working
-        connection2.request(createMessage(producerInfo2, destination, DeliveryMode.PERSISTENT));
-
-        Message m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNoMessagesLeft(connection1);
-
-        connection1.send(createAck(consumerInfo1, m1, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        // Send a message to sit on the broker while we mess with it
-        connection2.request(createMessage(producerInfo2, destination, DeliveryMode.PERSISTENT));
-
-        // Now we're going to resend the same consumer commands again and see if
-        // the broker
-        // can handle it.
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.request(consumerInfo1);
-
-        // After this there should be 2 messages on the broker...
-        connection2.request(createMessage(producerInfo2, destination, DeliveryMode.PERSISTENT));
-
-        // ... let's start a fresh consumer...
-        connection1.stop();
-        StubConnection connection3 = createRemoteConnection();
-        ConnectionInfo connectionInfo3 = createConnectionInfo();
-        SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
-        ConsumerInfo consumerInfo3 = createConsumerInfo(sessionInfo3, destination);
-        connection3.send(connectionInfo3);
-        connection3.send(sessionInfo3);
-        connection3.request(consumerInfo3);
-
-        // ... and then grab the 2 that should be there.
-        assertNotNull(receiveMessage(connection3));
-        assertNotNull(receiveMessage(connection3));
-        assertNoMessagesLeft(connection3);
-    }
-
-    protected String getRemoteURI() {
-        return remoteURI;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/Main.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/Main.java
deleted file mode 100644
index c36d86e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/Main.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.broker;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.demo.DefaultQueueSender;
-
-/**
- * A helper class which can be handy for running a broker in your IDE from the
- * activemq-core module.
- * 
- * 
- */
-public final class Main {
-    protected static boolean createConsumers;
-
-    private Main() {        
-    }
-    
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        try {
-            // TODO - this seems to break interceptors for some reason
-            // BrokerService broker = BrokerFactory.createBroker(new
-            // URI(brokerURI));
-            BrokerService broker = new BrokerService();
-            broker.setPersistent(false);
-
-            // for running on Java 5 without mx4j
-            ManagementContext managementContext = broker.getManagementContext();
-            managementContext.setFindTigerMbeanServer(true);
-            managementContext.setUseMBeanServer(true);
-            managementContext.setCreateConnector(false);
-
-            broker.setUseJmx(true);
-            // broker.setPlugins(new BrokerPlugin[] { new
-            // ConnectionDotFilePlugin(), new UDPTraceBrokerPlugin() });
-            broker.addConnector("tcp://localhost:61616");
-            broker.addConnector("stomp://localhost:61613");
-            broker.start();
-
-            // lets publish some messages so that there is some stuff to browse
-            DefaultQueueSender.main(new String[] {"Prices.Equity.IBM"});
-            DefaultQueueSender.main(new String[] {"Prices.Equity.MSFT"});
-
-            // lets create a dummy couple of consumers
-            if (createConsumers) {
-                Connection connection = new ActiveMQConnectionFactory().createConnection();
-                connection.start();
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                session.createConsumer(new ActiveMQQueue("Orders.IBM"));
-                session.createConsumer(new ActiveMQQueue("Orders.MSFT"), "price > 100");
-                Session session2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                session2.createConsumer(new ActiveMQQueue("Orders.MSFT"), "price > 200");
-            } else {
-                // Lets wait for the broker
-                broker.waitUntilStopped();
-            }
-        } catch (Exception e) {
-            System.out.println("Failed: " + e);
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java
deleted file mode 100755
index 3175156..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Runs against the broker but marshals all request and response commands.
- * 
- * 
- */
-public class MarshallingBrokerTest extends BrokerTest {
-
-    public WireFormat wireFormat = new OpenWireFormat();
-
-    public void initCombos() {
-
-        OpenWireFormat wf1 = new OpenWireFormat();
-        wf1.setCacheEnabled(false);
-        OpenWireFormat wf2 = new OpenWireFormat();
-        wf2.setCacheEnabled(true);
-
-        addCombinationValues("wireFormat", new Object[] {wf1, wf2, });
-    }
-
-    protected StubConnection createConnection() throws Exception {
-        return new StubConnection(broker) {
-            public Response request(Command command) throws Exception {
-                Response r = super.request((Command)wireFormat.unmarshal(wireFormat.marshal(command)));
-                if (r != null) {
-                    r = (Response)wireFormat.unmarshal(wireFormat.marshal(r));
-                }
-                return r;
-            }
-
-            public void send(Command command) throws Exception {
-                super.send((Command)wireFormat.unmarshal(wireFormat.marshal(command)));
-            }
-
-            protected void dispatch(Command command) throws InterruptedException, IOException {
-                super.dispatch((Command)wireFormat.unmarshal(wireFormat.marshal(command)));
-            };
-        };
-    }
-
-    public static Test suite() {
-        return suite(MarshallingBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java
deleted file mode 100644
index 8015f38..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/**
- * 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.broker;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-public class MessageExpirationTest extends BrokerTestSupport {
-
-    public ActiveMQDestination destination;
-    public int deliveryMode = DeliveryMode.NON_PERSISTENT;
-    public int prefetch;
-    public byte destinationType = ActiveMQDestination.QUEUE_TYPE;
-    public boolean durableConsumer;
-
-    protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination, int deliveryMode, int timeToLive) {
-        Message message = createMessage(producerInfo, destination, deliveryMode);
-        long now = System.currentTimeMillis();
-        message.setTimestamp(now);
-        message.setExpiration(now + timeToLive);
-        return message;
-    }
-
-    public void initCombosForTestMessagesWaitingForUssageDecreaseExpire() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        return broker;
-    }
-
-    protected PolicyEntry getDefaultPolicy() {
-        PolicyEntry policy = super.getDefaultPolicy();
-        // disable spooling
-        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
-        // have aggressive expiry period to ensure no deadlock or clash
-        policy.setExpireMessagesPeriod(100);
-        
-        return policy;
-    }
-
-    public void testMessagesWaitingForUsageDecreaseExpire() throws Exception {
-
-        // Start a producer
-        final StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        final ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        // Start a consumer..
-        final StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-
-        destination = createDestinationInfo(connection2, connectionInfo2, destinationType);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(1);
-        connection2.request(consumerInfo2);
-
-        // Reduce the limit so that only 1 message can flow through the broker
-        // at a time.
-        broker.getSystemUsage().getMemoryUsage().setLimit(1);
-
-        final Message m1 = createMessage(producerInfo, destination, deliveryMode);
-        final Message m2 = createMessage(producerInfo, destination, deliveryMode, 1000);
-        final Message m3 = createMessage(producerInfo, destination, deliveryMode);
-        final Message m4 = createMessage(producerInfo, destination, deliveryMode, 1000);
-
-        // Produce in an async thread since the producer will be getting blocked
-        // by the usage manager..
-        new Thread() {
-            public void run() {
-                // m1 and m3 should not expire.. but the others should.
-                try {
-                    connection.send(m1);
-                    connection.send(m2);
-                    connection.send(m3);
-                    connection.send(m4);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }.start();
-
-        // Make sure only 1 message was delivered due to prefetch == 1
-        Message m = receiveMessage(connection2);
-        assertNotNull(m);
-        assertEquals(m1.getMessageId(), m.getMessageId());
-        assertNoMessagesLeft(connection);
-
-        // Sleep before we ack so that the messages expire on the usage manager
-        Thread.sleep(1500);
-        connection2.send(createAck(consumerInfo2, m, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        // 2nd message received should be m3.. it should have expired 2nd
-        // message sent.
-        m = receiveMessage(connection2);
-        assertNotNull(m);
-        assertEquals(m3.getMessageId(), m.getMessageId());
-
-        // Sleep before we ack so that the messages expire on the usage manager
-        Thread.sleep(1500);
-        connection2.send(createAck(consumerInfo2, m, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        // And there should be no messages left now..
-        assertNoMessagesLeft(connection2);
-
-        connection.send(closeConnectionInfo(connectionInfo));
-        connection.send(closeConnectionInfo(connectionInfo2));
-    }
-
-    /**
-     * Small regression. Looks like persistent messages to a queue are not being
-     * timedout when in a long transaction. See:
-     * http://issues.apache.org/activemq/browse/AMQ-1269 Commenting out the
-     * DeliveryMode.PERSISTENT test combination for now.
-     */
-    public void initCombosForTestMessagesInLongTransactionExpire() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testMessagesInLongTransactionExpire() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setPrefetchSize(1000);
-        connection.send(consumerInfo);
-
-        // Start the tx..
-        LocalTransactionId txid = createLocalTransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-
-        // m1 and m3 should not expire.. but the others should.
-        Message m1 = createMessage(producerInfo, destination, deliveryMode);
-        m1.setTransactionId(txid);
-        connection.send(m1);
-        Message m = createMessage(producerInfo, destination, deliveryMode, 1000);
-        m.setTransactionId(txid);
-        connection.send(m);
-        Message m3 = createMessage(producerInfo, destination, deliveryMode);
-        m3.setTransactionId(txid);
-        connection.send(m3);
-        m = createMessage(producerInfo, destination, deliveryMode, 1000);
-        m.setTransactionId(txid);
-        connection.send(m);
-
-        // Sleep before we commit so that the messages expire on the commit
-        // list..
-        Thread.sleep(1500);
-        connection.send(createCommitTransaction1Phase(connectionInfo, txid));
-
-        m = receiveMessage(connection);
-        assertNotNull(m);
-        assertEquals(m1.getMessageId(), m.getMessageId());
-        connection.send(createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        // 2nd message received should be m3.. it should have expired 2nd
-        // message sent.
-        m = receiveMessage(connection);
-        assertNotNull(m);
-        assertEquals(m3.getMessageId(), m.getMessageId());
-        connection.send(createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        // And there should be no messages left now..
-        assertNoMessagesLeft(connection);
-
-        connection.send(closeConnectionInfo(connectionInfo));
-    }
-
-    public void initCombosForTestMessagesInSubscriptionPendingListExpire() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
-                                                              Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
-    }
-
-    public void testMessagesInSubscriptionPendingListExpire() throws Exception {
-
-        // Start a producer and consumer
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        destination = createDestinationInfo(connection, connectionInfo, destinationType);
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        consumerInfo.setPrefetchSize(1);
-        connection.send(consumerInfo);
-
-        // m1 and m3 should not expire.. but the others should.
-        Message m1 = createMessage(producerInfo, destination, deliveryMode);
-        connection.send(m1);
-        connection.send(createMessage(producerInfo, destination, deliveryMode, 1000));
-        Message m3 = createMessage(producerInfo, destination, deliveryMode);
-        connection.send(m3);
-        connection.send(createMessage(producerInfo, destination, deliveryMode, 1000));
-
-        // Make sure only 1 message was delivered due to prefetch == 1
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-        assertEquals(m1.getMessageId(), m.getMessageId());
-        assertNoMessagesLeft(connection);
-
-        // Sleep before we ack so that the messages expire on the pending list..
-        Thread.sleep(1500);
-        connection.send(createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        // 2nd message received should be m3.. it should have expired 2nd
-        // message sent.
-        m = receiveMessage(connection);
-        assertNotNull(m);
-        assertEquals(m3.getMessageId(), m.getMessageId());
-        connection.send(createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE));
-
-        // And there should be no messages left now..
-        assertNoMessagesLeft(connection);
-
-        connection.send(closeConnectionInfo(connectionInfo));
-    }
-
-    public static Test suite() {
-        return suite(MessageExpirationTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/NioQueueSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/NioQueueSubscriptionTest.java
deleted file mode 100644
index 4833626..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/NioQueueSubscriptionTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-@SuppressWarnings("unchecked")
-public class NioQueueSubscriptionTest extends QueueSubscriptionTest implements ExceptionListener {
-    
-    protected static final Logger LOG = LoggerFactory.getLogger(NioQueueSubscriptionTest.class);
-    
-    private Map<Thread, Throwable> exceptions = Collections.synchronizedMap(new HashMap<Thread, Throwable>());
-    
-    @Override
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("tcp://localhost:62621?trace=false");
-    }
-    
-    protected void setUp() throws Exception {
-        //setMaxTestTime(20*60*1000);
-        super.setUp();
-    }
-    
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = BrokerFactory.createBroker(new URI("broker://nio://localhost:62621?useQueueForAccept=false&persistent=false&wiewformat.maxInactivityDuration=0"));
-        answer.getManagementContext().setCreateConnector(false);
-        answer.setUseJmx(false);
-        answer.setDeleteAllMessagesOnStartup(true);
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setQueue(">");
-        entry.setOptimizedDispatch(true);
-        policyEntries.add(entry);
-
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        answer.setDestinationPolicy(policyMap);
-        return answer;
-    }
-    
-    public void testLotsOfConcurrentConnections() throws Exception {
-        ExecutorService executor = Executors.newCachedThreadPool(); 
-        final ConnectionFactory factory = createConnectionFactory();
-        final ExceptionListener listener = this;
-        int connectionCount = 400;
-        for (int i=0;i<connectionCount ;i++) {
-            executor.execute(new Runnable() {
-                public void run() {
-                    try {
-                        ActiveMQConnection connection = (ActiveMQConnection) factory.createConnection();
-                        connection.setExceptionListener(listener);
-                        connection.start();
-                        assertNotNull(connection.getBrokerName());
-                        connections.add(connection);
-                    } catch (Exception e) {
-                        exceptions.put(Thread.currentThread(), e);
-                    }
-                }
-            });
-        }
-        
-        executor.shutdown();
-        executor.awaitTermination(30, TimeUnit.SECONDS);
-
-        if (!exceptions.isEmpty()) {
-          LOG.error("" + exceptions.size() + " exceptions like", exceptions.values().iterator().next());
-          fail("unexpected exceptions in worker threads: " + exceptions.values().iterator().next());
-        }
-        LOG.info("created " + connectionCount + " connecitons");
-    }
-
-    public void onException(JMSException exception) {
-        LOG.error("Exception on conneciton", exception);
-        exceptions.put(Thread.currentThread(), exception);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/OutOfOrderXMLTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/OutOfOrderXMLTest.java
deleted file mode 100644
index 11fbb56..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/OutOfOrderXMLTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.broker;
-
-import java.net.URI;
-import org.apache.activemq.xbean.XBeanBrokerFactory;
-import org.junit.Test;
-
-// https://issues.apache.org/activemq/browse/AMQ-2939
-public class OutOfOrderXMLTest {
-
-    @Test
-    public void verifyBrokerCreationWhenXmlOutOfOrderValidationFalse() throws Exception {
-        BrokerService answer =
-                BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/broker/out-of-order-broker-elements.xml?validate=false"));
-        answer.stop();
-
-    }    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ProgressPrinter.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ProgressPrinter.java
deleted file mode 100755
index dcf4b6e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ProgressPrinter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.broker;
-
-public class ProgressPrinter {
-
-    private final long total;
-    private final long interval;
-    private long percentDone;
-    private long counter;
-
-    public ProgressPrinter(long total, long interval) {
-        this.total = total;
-        this.interval = interval;
-    }
-
-    public synchronized void increment() {
-        update(++counter);
-    }
-
-    public synchronized void update(long current) {
-        long at = 100 * current / total;
-        if ((percentDone / interval) != (at / interval)) {
-            percentDone = at;
-            System.out.println("Completed: " + percentDone + "%");
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java
deleted file mode 100644
index c210353..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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.broker;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsMultipleClientsTestSupport;
-import org.apache.activemq.command.ActiveMQDestination;
-
-public class QueueSubscriptionTest extends JmsMultipleClientsTestSupport {
-    protected int messageCount = 1000; // 1000 Messages per producer
-    protected int prefetchCount = 10;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        durable = false;
-        topic = false;
-    }
-
-    public void testManyProducersOneConsumer() throws Exception {
-        consumerCount = 1;
-        producerCount = 10;
-        messageCount = 100;
-        messageSize = 1; // 1 byte
-        prefetchCount = 10;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesOnePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        messageCount = 1000;
-        messageSize = 1024; // 1 Kb
-        configurePrefetchOfOne();
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesLargePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        messageCount = 1000;
-        prefetchCount = messageCount * 2;
-        messageSize = 1024; // 1 Kb
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesOnePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        messageCount = 10;
-        messageSize = 1024 * 1024 * 1; // 2 MB
-        configurePrefetchOfOne();
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesLargePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        messageCount = 10;
-        prefetchCount = messageCount * 2;
-        messageSize = 1024 * 1024 * 1; // 2 MB
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    public void testOneProducerManyConsumersFewMessages() throws Exception {
-        consumerCount = 50;
-        producerCount = 1;
-        messageCount = 10;
-        messageSize = 1; // 1 byte
-        prefetchCount = 10;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    public void testOneProducerManyConsumersManyMessages() throws Exception {
-        consumerCount = 50;
-        producerCount = 1;
-        messageCount = 1000;
-        messageSize = 1; // 1 byte
-        prefetchCount = messageCount / consumerCount;
-        allMessagesList.setMaximumDuration(allMessagesList.getMaximumDuration() * 20);
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    public void testManyProducersManyConsumers() throws Exception {
-        consumerCount = 200;
-        producerCount = 50;
-        messageCount = 100;
-        messageSize = 1; // 1 byte
-        prefetchCount = 100;
-        allMessagesList.setMaximumDuration(allMessagesList.getMaximumDuration() * 20);
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount);
-    }
-
-    protected void configurePrefetchOfOne() {
-        prefetchCount = 1;
-
-        // this is gonna be a bit slow what with the low prefetch so bump up the
-        // wait time
-        allMessagesList.setMaximumDuration(allMessagesList.getMaximumDuration() * 20);
-    }
-
-    public void doMultipleClientsTest() throws Exception {
-        // Create destination
-        final ActiveMQDestination dest = createDestination();
-
-        // Create consumers
-        ActiveMQConnectionFactory consumerFactory = (ActiveMQConnectionFactory)createConnectionFactory();
-        consumerFactory.getPrefetchPolicy().setAll(prefetchCount);
-
-        startConsumers(consumerFactory, dest);
-
-        startProducers(dest, messageCount);
-
-        // Wait for messages to be received. Make it proportional to the
-        // messages delivered.
-        int totalMessageCount = messageCount * producerCount;
-        if (dest.isTopic()) {
-            totalMessageCount *= consumerCount;
-        }
-        waitForAllMessagesToBeReceived(totalMessageCount);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java
deleted file mode 100644
index db24bc3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.broker;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-
-/**
- * 
- * 
- */
-public class ReconnectWithJMXEnabledTest extends EmbeddedBrokerTestSupport {
-
-    protected Connection connection;
-    protected boolean transacted;
-    protected int authMode = Session.AUTO_ACKNOWLEDGE;
-
-    public void testTestUseConnectionCloseBrokerThenRestartInSameJVM() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-        connection.close();
-
-        broker.stop();
-        broker = createBroker();
-        startBroker();
-
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-    }
-
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:61616";
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setUseJmx(true);
-        answer.setPersistent(isPersistent());
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-
-    protected void useConnection(Connection connection) throws Exception {
-        connection.setClientID("foo");
-        connection.start();
-        Session session = connection.createSession(transacted, authMode);
-        Destination destination = createDestination();
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-        Message message = session.createTextMessage("Hello World");
-        producer.send(message);
-        Thread.sleep(1000);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/RecoveryBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/RecoveryBrokerTest.java
deleted file mode 100755
index f3297f8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/RecoveryBrokerTest.java
+++ /dev/null
@@ -1,584 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.ArrayList;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.XATransactionId;
-
-/**
- * Used to simulate the recovery that occurs when a broker shuts down.
- * 
- * 
- */
-public class RecoveryBrokerTest extends BrokerRestartTestSupport {
-
-    /**
-     * Used to verify that after a broker restart durable subscriptions that use
-     * wild cards are still wild card subscription after broker restart.
-     * 
-     * @throws Exception
-     */
-    //need to revist!!!
-    public void XtestWildCardSubscriptionPreservedOnRestart() throws Exception {
-        ActiveMQDestination dest1 = new ActiveMQTopic("TEST.A");
-        ActiveMQDestination dest2 = new ActiveMQTopic("TEST.B");
-        ActiveMQDestination dest3 = new ActiveMQTopic("TEST.C");
-        ActiveMQDestination wildDest = new ActiveMQTopic("TEST.>");
-
-        ArrayList<MessageId> sentBeforeRestart = new ArrayList<MessageId>();
-        ArrayList<MessageId> sentBeforeCreateConsumer = new ArrayList<MessageId>();
-        ArrayList<MessageId> sentAfterCreateConsumer = new ArrayList<MessageId>();
-
-        // Setup a first connection
-        {
-            StubConnection connection1 = createConnection();
-            ConnectionInfo connectionInfo1 = createConnectionInfo();
-            connectionInfo1.setClientId("A");
-            SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-            ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-            connection1.send(connectionInfo1);
-            connection1.send(sessionInfo1);
-            connection1.send(producerInfo1);
-
-            // Create the durable subscription.
-            ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, wildDest);
-            consumerInfo1.setSubscriptionName("test");
-            consumerInfo1.setPrefetchSize(100);
-            connection1.send(consumerInfo1);
-
-            // Close the subscription.
-            connection1.send(closeConsumerInfo(consumerInfo1));
-
-            // Send the messages
-            for (int i = 0; i < 4; i++) {
-                Message m = createMessage(producerInfo1, dest1, DeliveryMode.PERSISTENT);
-                connection1.send(m);
-                sentBeforeRestart.add(m.getMessageId());
-            }
-            connection1.request(closeConnectionInfo(connectionInfo1));
-            connection1.stop();
-        }
-
-        // Restart the broker.
-        restartBroker();
-
-        // Get a connection to the new broker.
-        {
-            StubConnection connection2 = createConnection();
-            ConnectionInfo connectionInfo2 = createConnectionInfo();
-            connectionInfo2.setClientId("A");
-            SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-            connection2.send(connectionInfo2);
-            connection2.send(sessionInfo2);
-
-            ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-            connection2.send(producerInfo2);
-
-            // Send messages before the durable subscription is re-activated.
-            for (int i = 0; i < 4; i++) {
-                Message m = createMessage(producerInfo2, dest2, DeliveryMode.PERSISTENT);
-                connection2.send(m);
-                sentBeforeCreateConsumer.add(m.getMessageId());
-            }
-
-            // Re-open the subscription.
-            ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, wildDest);
-            consumerInfo2.setSubscriptionName("test");
-            consumerInfo2.setPrefetchSize(100);
-            connection2.send(consumerInfo2);
-
-            // Send messages after the subscription is activated.
-            for (int i = 0; i < 4; i++) {
-                Message m = createMessage(producerInfo2, dest3, DeliveryMode.PERSISTENT);
-                connection2.send(m);
-                sentAfterCreateConsumer.add(m.getMessageId());
-            }
-
-            // We should get the recovered messages...
-            for (int i = 0; i < 4; i++) {
-                Message m2 = receiveMessage(connection2);
-                assertNotNull("Recovered message missing: " + i, m2);
-                assertEquals(sentBeforeRestart.get(i), m2.getMessageId());
-            }
-
-            // We should get get the messages that were sent before the sub was
-            // reactivated.
-            for (int i = 0; i < 4; i++) {
-                Message m2 = receiveMessage(connection2);
-                assertNotNull("Before activated message missing: " + i, m2);
-                assertEquals(sentBeforeCreateConsumer.get(i), m2.getMessageId());
-            }
-
-            // We should get get the messages that were sent after the sub was
-            // reactivated.
-            for (int i = 0; i < 4; i++) {
-                Message m2 = receiveMessage(connection2);
-                assertNotNull("After activated message missing: " + i, m2);
-                assertEquals("" + i, sentAfterCreateConsumer.get(i), m2.getMessageId());
-            }
-
-            assertNoMessagesLeft(connection2);
-        }
-
-    }
-
-    public void testConsumedQueuePersistentMessagesLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-        }
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // The we should get the messages.
-        for (int i = 0; i < 4; i++) {
-            Message m2 = receiveMessage(connection);
-            assertNotNull(m2);
-        }
-
-        // restart the broker.
-        restartBroker();
-
-        // No messages should be delivered.
-        Message m = receiveMessage(connection);
-        assertNull(m);
-    }
-
-    public void testQueuePersistentUncommitedMessagesLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        // Begin the transaction.
-        LocalTransactionId txid = createLocalTransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            message.setTransactionId(txid);
-            connection.send(message);
-        }
-
-        // Don't commit
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // No messages should be delivered.
-        Message m = receiveMessage(connection);
-        assertNull(m);
-    }
-    
-    public void testTopicDurableConsumerHoldsPersistentMessageAfterRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQTopic("TEST");
-
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        connectionInfo1.setClientId("A");
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo1 = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo1);
-
-        // Create the durable subscription.
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setSubscriptionName("test");
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // Close the subscription.
-        connection1.send(closeConsumerInfo(consumerInfo1));
-
-        // Send the messages
-        connection1.send(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-        connection1.send(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-        connection1.send(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-        connection1.send(createMessage(producerInfo1, destination, DeliveryMode.PERSISTENT));
-        connection1.request(closeConnectionInfo(connectionInfo1));
-        // Restart the broker.
-        restartBroker();
-
-        // Get a connection to the new broker.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        connectionInfo2.setClientId("A");
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-
-        // Re-open the subscription.
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setSubscriptionName("test");
-        consumerInfo2.setPrefetchSize(100);
-        connection2.send(consumerInfo2);
-
-        // The we should get the messages.
-        for (int i = 0; i < 4; i++) {
-            Message m2 = receiveMessage(connection2);
-            assertNotNull("Did not get message "+i, m2);
-        }
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void testQueuePersistentMessagesNotLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-        Message message = createMessage(producerInfo, destination);
-        message.setPersistent(true);
-        connection.send(message);
-        connection.request(closeConnectionInfo(connectionInfo));
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Message should have been dropped due to broker restart.
-        Message m = receiveMessage(connection);
-        assertNotNull("Should have received a message by now!", m);
-        assertEquals(m.getMessageId(), message.getMessageId());
-    }
-
-    public void testQueueNonPersistentMessagesLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-        Message message = createMessage(producerInfo, destination);
-        message.setPersistent(false);
-        connection.send(message);
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Message should have been dropped due to broker restart.
-        assertNoMessagesLeft(connection);
-    }
-
-    public void testQueuePersistentCommitedMessagesNotLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        // Begin the transaction.
-        LocalTransactionId txid = createLocalTransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            message.setTransactionId(txid);
-            connection.send(message);
-        }
-
-        // Commit
-        connection.send(createCommitTransaction1Phase(connectionInfo, txid));
-        connection.request(closeConnectionInfo(connectionInfo));
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-    
-
-    public void testQueuePersistentCommitedAcksNotLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-        }
-
-        // Setup the consumer and receive the message.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Begin the transaction.
-        LocalTransactionId txid = createLocalTransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection.send(ack);
-        }
-        // Commit
-        connection.send(createCommitTransaction1Phase(connectionInfo, txid));
-        connection.request(closeConnectionInfo(connectionInfo));
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // No messages should be delivered.
-        Message m = receiveMessage(connection);
-        assertNull(m);
-    }
-    
-    
-
-    public void testQueuePersistentUncommitedAcksLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-        }
-
-        // Setup the consumer and receive the message.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Begin the transaction.
-        LocalTransactionId txid = createLocalTransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection.send(ack);
-        }
-        // Don't commit
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // All messages should be re-delivered.
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-    
-    public void testQueuePersistentXAUncommitedAcksLostOnRestart() throws Exception {
-        int NUMBER = 100;
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        for (int i = 0; i < NUMBER; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-        }
-
-        // Setup the consumer and receive the message.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Begin the transaction.
-        XATransactionId txid = createXATransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-        for (int i = 0; i < NUMBER; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection.send(ack);
-        }
-        // Don't commit
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // All messages should be re-delivered.
-        for (int i = 0; i < NUMBER; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-
-    public static Test suite() {
-        return suite(RecoveryBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/SpringTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/SpringTest.java
deleted file mode 100755
index 5286ef0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/SpringTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.spring.SpringConsumer;
-import org.apache.activemq.spring.SpringProducer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class SpringTest extends TestCase {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(SpringTest.class);
-
-    protected AbstractApplicationContext context;
-    protected SpringConsumer consumer;
-    protected SpringProducer producer;
-
-    public void testSenderWithSpringXml() throws Exception {
-        assertSenderConfig("org/apache/activemq/broker/spring.xml");
-    }
-    /**
-     * assert method that is used by all the test method to send and receive messages
-     * based on each spring configuration.
-     *
-     * @param config
-     * @throws Exception
-     */
-    protected void assertSenderConfig(String config) throws Exception {
-        context = new ClassPathXmlApplicationContext(config);
-
-        consumer = (SpringConsumer) context.getBean("consumer");
-        assertTrue("Found a valid consumer", consumer != null);
-
-        consumer.start();
-
-        producer = (SpringProducer) context.getBean("producer");
-        assertTrue("Found a valid producer", producer != null);
-
-        consumer.flushMessages();
-        producer.start();
-
-        // lets sleep a little to give the JMS time to dispatch stuff
-        consumer.waitForMessagesToArrive(producer.getMessageCount());
-
-        // now lets check that the consumer has received some messages
-        List messages = consumer.flushMessages();
-        LOG.info("Consumer has received messages....");
-        for (Iterator iter = messages.iterator(); iter.hasNext();) {
-            Object message = iter.next();
-            LOG.info("Received: " + message);
-        }
-
-        assertEquals("Message count", producer.getMessageCount(), messages.size());
-    }
-
-    /**
-     * Clean up method.
-     *
-     * @throws Exception
-     */
-    protected void tearDown() throws Exception {
-        if (consumer != null) {
-            consumer.stop();
-        }
-        if (producer != null) {
-            producer.stop();
-        }
-
-        if (context != null) {
-            context.destroy();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java
deleted file mode 100644
index 7b4fa1b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.broker;
-
-import java.util.LinkedList;
-import org.apache.activemq.command.ConnectionInfo;
-
-public class StubBroker extends EmptyBroker {
-    public LinkedList<AddConnectionData> addConnectionData = new LinkedList<AddConnectionData>();
-    public LinkedList<RemoveConnectionData> removeConnectionData = new LinkedList<RemoveConnectionData>();
-
-    public class AddConnectionData {
-        public final ConnectionContext connectionContext;
-        public final ConnectionInfo connectionInfo;
-
-        public AddConnectionData(ConnectionContext context, ConnectionInfo info) {
-            connectionContext = context;
-            connectionInfo = info;
-        }
-    }
-
-    public static class RemoveConnectionData {
-        public final ConnectionContext connectionContext;
-        public final ConnectionInfo connectionInfo;
-        public final Throwable error;
-
-        public RemoveConnectionData(ConnectionContext context, ConnectionInfo info, Throwable error) {
-            connectionContext = context;
-            connectionInfo = info;
-            this.error = error;
-        }
-    }
-
-    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
-        addConnectionData.add(new AddConnectionData(context, info));
-    }
-
-    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
-        removeConnectionData.add(new RemoveConnectionData(context, info, error));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java
deleted file mode 100755
index 9a70c4e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * 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.broker;
-
-import java.io.IOException;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.transport.DefaultTransportListener;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.ServiceSupport;
-
-public class StubConnection implements Service {
-
-    private final BlockingQueue<Object> dispatchQueue = new LinkedBlockingQueue<Object>();
-    private Connection connection;
-    private Transport transport;
-    private boolean shuttingDown;
-    private TransportListener listener;
-    public AtomicReference<Throwable> error = new AtomicReference<Throwable>();
-
-    public StubConnection(BrokerService broker) throws Exception {
-        this(TransportFactory.connect(broker.getVmConnectorURI()));
-    }
-
-    public StubConnection(Connection connection) {
-        this.connection = connection;
-    }
-
-    public StubConnection(Transport transport) throws Exception {
-        this(transport, null);
-    }
-
-    public StubConnection(Transport transport, TransportListener transportListener) throws Exception {
-        listener = transportListener;
-        this.transport = transport;
-        transport.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Object command) {
-                try {
-                    if (command.getClass() == ShutdownInfo.class) {
-                        shuttingDown = true;
-                    }
-                    StubConnection.this.dispatch(command);
-                } catch (Exception e) {
-                    onException(new IOException("" + e));
-                }
-            }
-
-            public void onException(IOException e) {
-                if (listener != null) {
-                    listener.onException(e);
-                }
-                error.set(e);
-            }
-        });
-        transport.start();
-    }
-
-    protected void dispatch(Object command) throws InterruptedException, IOException {
-        if (listener != null) {
-            listener.onCommand(command);
-        }
-        dispatchQueue.put(command);
-    }
-
-    public BlockingQueue<Object> getDispatchQueue() {
-        return dispatchQueue;
-    }
-
-    public void send(Command command) throws Exception {
-        if (command instanceof Message) {
-            Message message = (Message)command;
-            message.setProducerId(message.getMessageId().getProducerId());
-        }
-        command.setResponseRequired(false);
-        if (connection != null) {
-            Response response = connection.service(command);
-            if (response != null && response.isException()) {
-                ExceptionResponse er = (ExceptionResponse)response;
-                throw JMSExceptionSupport.create(er.getException());
-            }
-        } else if (transport != null) {
-            transport.oneway(command);
-        }
-    }
-
-    public Response request(Command command) throws Exception {
-        if (command instanceof Message) {
-            Message message = (Message)command;
-            message.setProducerId(message.getMessageId().getProducerId());
-        }
-        command.setResponseRequired(true);
-        if (connection != null) {
-            Response response = connection.service(command);
-            if (response != null && response.isException()) {
-                ExceptionResponse er = (ExceptionResponse)response;
-                throw JMSExceptionSupport.create(er.getException());
-            }
-            return response;
-        } else if (transport != null) {
-            Response response = (Response)transport.request(command);
-            if (response != null && response.isException()) {
-                ExceptionResponse er = (ExceptionResponse)response;
-                throw JMSExceptionSupport.create(er.getException());
-            }
-            return response;
-        }
-        return null;
-    }
-
-    public Connection getConnection() {
-        return connection;
-    }
-
-    public Transport getTransport() {
-        return transport;
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-        shuttingDown = true;
-        if (transport != null) {
-            try {
-                transport.oneway(new ShutdownInfo());
-            } catch (IOException e) {
-            }
-            ServiceSupport.dispose(transport);
-        }
-    }
-
-    public TransportListener getListener() {
-        return listener;
-    }
-
-    public void setListener(TransportListener listener) {
-        this.listener = listener;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/TopicSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/TopicSubscriptionTest.java
deleted file mode 100644
index 5dc1871..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/TopicSubscriptionTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * 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.broker;
-
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.util.ThreadTracker;
-
-public class TopicSubscriptionTest extends QueueSubscriptionTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        durable = true;
-        topic = true;
-    }
-    
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        ThreadTracker.result();
-    }
-
-    public void testManyProducersManyConsumers() throws Exception {
-        consumerCount = 40;
-        producerCount = 20;
-        messageCount  = 100;
-        messageSize   = 1; 
-        prefetchCount = 10;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount * consumerCount);
-        assertDestinationMemoryUsageGoesToZero();
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesOnePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        messageCount  = 10;
-        messageSize   = 1024 * 1024 * 1; // 1 MB
-        prefetchCount = 1;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * consumerCount * producerCount);
-        assertDestinationMemoryUsageGoesToZero();
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesOnePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        prefetchCount = 1;
-        messageSize   = 1024;
-        messageCount  = 1000;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * consumerCount * producerCount);
-        assertDestinationMemoryUsageGoesToZero();
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesLargePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        messageCount  = 1000;
-        messageSize   = 1024;
-        prefetchCount = messageCount * 2;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * consumerCount * producerCount);
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesLargePrefetch() throws Exception {
-        consumerCount = 2;
-        producerCount = 1;
-        messageCount  = 10;
-        messageSize   = 1024 * 1024 * 1; // 1 MB
-        prefetchCount = messageCount * 2;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * consumerCount * producerCount);
-        assertDestinationMemoryUsageGoesToZero();
-    }
-
-    public void testOneProducerManyConsumersFewMessages() throws Exception {
-        consumerCount = 50;
-        producerCount = 1;
-        messageCount  = 10;
-        messageSize   = 1; // 1 byte
-        prefetchCount = 10;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * consumerCount * producerCount);
-        assertDestinationMemoryUsageGoesToZero();
-    }
-
-    public void testOneProducerManyConsumersManyMessages() throws Exception {
-        consumerCount = 50;
-        producerCount = 1;
-        messageCount  = 100;
-        messageSize   = 1; // 1 byte
-        prefetchCount = 10;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * consumerCount * producerCount);
-        assertDestinationMemoryUsageGoesToZero();
-    }
-
-
-    public void testManyProducersOneConsumer() throws Exception {
-        consumerCount = 1;
-        producerCount = 20;
-        messageCount  = 100;
-        messageSize   = 1; // 1 byte
-        prefetchCount = 10;
-
-        doMultipleClientsTest();
-
-        assertTotalMessagesReceived(messageCount * producerCount * consumerCount);
-        assertDestinationMemoryUsageGoesToZero();
-    }
-    
-    private void assertDestinationMemoryUsageGoesToZero() throws Exception {
-        assertEquals("destination memory is back to 0", 0, 
-                TestSupport.getDestination(broker, ActiveMQDestination.transform(destination)).getMemoryUsage().getPercentUsage());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
deleted file mode 100755
index 18b921c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/**
- * 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.broker;
-
-import junit.framework.Test;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.command.TransactionInfo;
-import org.apache.activemq.command.XATransactionId;
-
-/**
- * Used to simulate the recovery that occurs when a broker shuts down.
- * 
- * 
- */
-public class XARecoveryBrokerTest extends BrokerRestartTestSupport {
-
-    public void testPreparedTransactionRecoveredOnRestart() throws Exception {
-
-        ActiveMQDestination destination = createDestination();
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Prepare 4 message sends.
-        for (int i = 0; i < 4; i++) {
-            // Begin the transaction.
-            XATransactionId txid = createXATransaction(sessionInfo);
-            connection.send(createBeginTransaction(connectionInfo, txid));
-
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            message.setTransactionId(txid);
-            connection.send(message);
-
-            // Prepare
-            connection.send(createPrepareTransaction(connectionInfo, txid));
-        }
-
-        // Since prepared but not committed.. they should not get delivered.
-        assertNoMessagesLeft(connection);
-        connection.request(closeConnectionInfo(connectionInfo));
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Since prepared but not committed.. they should not get delivered.
-        assertNoMessagesLeft(connection);
-
-        Response response = connection.request(new TransactionInfo(connectionInfo.getConnectionId(), null, TransactionInfo.RECOVER));
-        assertNotNull(response);
-        DataArrayResponse dar = (DataArrayResponse)response;
-        assertEquals(4, dar.getData().length);
-
-        // Commit the prepared transactions.
-        for (int i = 0; i < dar.getData().length; i++) {
-            connection.send(createCommitTransaction2Phase(connectionInfo, (TransactionId)dar.getData()[i]));
-        }
-
-        // We should not get the committed transactions.
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-
-    public void testQueuePersistentCommitedMessagesNotLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = createDestination();
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        // Begin the transaction.
-        XATransactionId txid = createXATransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            message.setTransactionId(txid);
-            connection.send(message);
-        }
-
-        // Commit
-        connection.send(createCommitTransaction1Phase(connectionInfo, txid));
-        connection.request(closeConnectionInfo(connectionInfo));
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-
-    public void testQueuePersistentCommitedAcksNotLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = createDestination();
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-        }
-
-        // Setup the consumer and receive the message.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Begin the transaction.
-        XATransactionId txid = createXATransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection.send(ack);
-        }
-        // Commit
-        connection.request(createCommitTransaction1Phase(connectionInfo, txid));
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // No messages should be delivered.
-        assertNoMessagesLeft(connection);
-
-        Message m = receiveMessage(connection);
-        assertNull(m);
-    }
-    
-    public void testQueuePersistentPreparedAcksNotLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = createDestination();
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-        }
-
-        // Setup the consumer and receive the message.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Begin the transaction.
-        XATransactionId txid = createXATransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection.send(ack);
-        }
-        
-        connection.request(createPrepareTransaction(connectionInfo, txid));
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-        
-        // All messages should be re-delivered.
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-
-    public void testQueuePersistentUncommittedAcksLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = createDestination();
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-
-        for (int i = 0; i < 4; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-        }
-
-        // Setup the consumer and receive the message.
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // Begin the transaction.
-        XATransactionId txid = createXATransaction(sessionInfo);
-        connection.send(createBeginTransaction(connectionInfo, txid));
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            ack.setTransactionId(txid);
-            connection.send(ack);
-        }
-        // Don't commit
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        // All messages should be re-delivered.
-        for (int i = 0; i < 4; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull(m);
-        }
-
-        assertNoMessagesLeft(connection);
-    }
-
-    public static Test suite() {
-        return suite(XARecoveryBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    protected ActiveMQDestination createDestination() {
-        return new ActiveMQQueue(getClass().getName() + "." + getName());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryBrokerTest.java
deleted file mode 100755
index 4bb6a7c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryBrokerTest.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/**
- * 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.broker.advisory;
-
-import junit.framework.Test;
-
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.SessionInfo;
-
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-public class AdvisoryBrokerTest extends BrokerTestSupport {
-     
-    public void testConnectionAdvisories() throws Exception {
-        
-        ActiveMQDestination destination = AdvisorySupport.getConnectionAdvisoryTopic();
-        
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(consumerInfo1);
-
-        // We should get an advisory of our own connection.
-        Message m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ConnectionInfo)m1.getDataStructure()).getConnectionId(), connectionInfo1.getConnectionId());
-
-        // Setup a second connection 
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        connection2.send(connectionInfo2);
-        
-        // We should get an advisory of the second connection.
-        m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ConnectionInfo)m1.getDataStructure()).getConnectionId(), connectionInfo2.getConnectionId());
-
-        // Close the second connection.
-        connection2.send(closeConnectionInfo(connectionInfo2));
-        connection2.stop();
-
-        // We should get an advisory of the second connection closing
-        m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
-        assertEquals(r.getObjectId(), connectionInfo2.getConnectionId());
-        
-        assertNoMessagesLeft(connection1);
-    }
-
-    public void testConsumerAdvisories() throws Exception {
-
-        ActiveMQDestination queue = new ActiveMQQueue("test");
-        ActiveMQDestination destination = AdvisorySupport.getConsumerAdvisoryTopic(queue);
-        
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(consumerInfo1);
-
-        // We should not see and advisory for the advisory consumer.
-        assertNoMessagesLeft(connection1);
-
-        // Setup a second consumer.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, queue);
-        consumerInfo1.setPrefetchSize(100);
-        
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(consumerInfo2);
-        
-        // We should get an advisory of the new consumer.
-        Message m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ConsumerInfo)m1.getDataStructure()).getConsumerId(), consumerInfo2.getConsumerId());
-
-        // Close the second connection.
-        connection2.request(closeConnectionInfo(connectionInfo2));
-        connection2.stop();
-
-        // We should get an advisory of the consumer closing
-        m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
-        assertEquals(r.getObjectId(), consumerInfo2.getConsumerId());
-        
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void testConsumerAdvisoriesReplayed() throws Exception {
-
-        ActiveMQDestination queue = new ActiveMQQueue("test");
-        ActiveMQDestination destination = AdvisorySupport.getConsumerAdvisoryTopic(queue);
-        
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-
-        // Setup a second consumer.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, queue);
-        consumerInfo2.setPrefetchSize(100);        
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(consumerInfo2);
-        
-        // We should get an advisory of the previous consumer.        
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        Message m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ConsumerInfo)m1.getDataStructure()).getConsumerId(), consumerInfo2.getConsumerId());
-
-        // Close the second connection.
-        connection2.request(closeConnectionInfo(connectionInfo2));
-        connection2.stop();
-
-        // We should get an advisory of the consumer closing
-        m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
-        assertEquals(r.getObjectId(), consumerInfo2.getConsumerId());
-        
-        assertNoMessagesLeft(connection2);
-    }
-
-
-    public void testProducerAdvisories() throws Exception {
-
-        ActiveMQDestination queue = new ActiveMQQueue("test");
-        ActiveMQDestination destination = AdvisorySupport.getProducerAdvisoryTopic(queue);
-        
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(consumerInfo1);
-
-        assertNoMessagesLeft(connection1);
-
-        // Setup a producer.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        producerInfo2.setDestination(queue);
-        
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(producerInfo2);
-        
-        // We should get an advisory of the new produver.
-        Message m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ProducerInfo)m1.getDataStructure()).getProducerId(), producerInfo2.getProducerId());
-
-        // Close the second connection.
-        connection2.request(closeConnectionInfo(connectionInfo2));
-        connection2.stop();
-
-        // We should get an advisory of the producer closing
-        m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
-        assertEquals(r.getObjectId(), producerInfo2.getProducerId());
-        
-        assertNoMessagesLeft(connection2);
-    }
-    
-    public void testProducerAdvisoriesReplayed() throws Exception {
-
-        ActiveMQDestination queue = new ActiveMQQueue("test");
-        ActiveMQDestination destination = AdvisorySupport.getProducerAdvisoryTopic(queue);
-        
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-
-        // Setup a producer.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        producerInfo2.setDestination(queue);
-        
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(producerInfo2);
-        
-        // Create the advisory consumer.. it should see the previous producer        
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        Message m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ProducerInfo)m1.getDataStructure()).getProducerId(), producerInfo2.getProducerId());
-
-        // Close the second connection.
-        connection2.request(closeConnectionInfo(connectionInfo2));
-        connection2.stop();
-
-        // We should get an advisory of the producer closing
-        m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        RemoveInfo r = (RemoveInfo) m1.getDataStructure();
-        assertEquals(r.getObjectId(), producerInfo2.getProducerId());
-        
-        assertNoMessagesLeft(connection2);
-    }
-
-    public void testProducerAdvisoriesReplayedOnlyTargetNewConsumer() throws Exception {
-
-        ActiveMQDestination queue = new ActiveMQQueue("test");
-        ActiveMQDestination destination = AdvisorySupport.getProducerAdvisoryTopic(queue);
-        
-        // Setup a first connection
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        // Create the first consumer..         
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        consumerInfo1.setPrefetchSize(100);
-        connection1.send(consumerInfo1);
-
-        // Setup a producer.
-        StubConnection connection2 = createConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ProducerInfo producerInfo2 = createProducerInfo(sessionInfo2);
-        producerInfo2.setDestination(queue);        
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.send(producerInfo2);
-        
-        Message m1 = receiveMessage(connection1);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ProducerInfo)m1.getDataStructure()).getProducerId(), producerInfo2.getProducerId());
-        
-        // Create the 2nd consumer..         
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        consumerInfo2.setPrefetchSize(100);
-        connection2.send(consumerInfo2);
-
-        // The second consumer should se a replay
-        m1 = receiveMessage(connection2);
-        assertNotNull(m1);
-        assertNotNull(m1.getDataStructure());
-        assertEquals(((ProducerInfo)m1.getDataStructure()).getProducerId(), producerInfo2.getProducerId());
-
-        // But the first consumer should not see the replay.
-        assertNoMessagesLeft(connection1);
-    }
-
-    public static Test suite() {
-        return suite(AdvisoryBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java
deleted file mode 100644
index e791fbe..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.broker.advisory;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-
-import java.net.URI;
-
-public class AdvisoryDuplexNetworkBridgeTest extends AdvisoryNetworkBridgeTest {
-
-    @Override
-    public void createBroker1() throws Exception {
-        broker1 = new BrokerService();
-        broker1.setBrokerName("broker1");
-        broker1.addConnector("tcp://localhost:61617");
-        broker1.setUseJmx(false);
-        broker1.setPersistent(false);
-        broker1.start();
-        broker1.waitUntilStarted();
-    }
-
-    @Override
-    public void createBroker2() throws Exception {
-        broker2 = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/network/duplexLocalBroker.xml"));
-        broker2.start();
-        broker2.waitUntilStarted();
-    }
-
-    public void assertCreatedByDuplex(boolean createdByDuplex) {
-        assertTrue(createdByDuplex);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryJmxTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryJmxTest.java
deleted file mode 100644
index 90d7283..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryJmxTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.broker.advisory;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.DestinationInfo;
-
-import javax.jms.*;
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-public class AdvisoryJmxTest extends EmbeddedBrokerTestSupport {
-
-        protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(isPersistent());
-        answer.addConnector(bindAddress);
-        ManagementContext context = new ManagementContext();
-        context.setConnectorPort(1199);
-        answer.setManagementContext(context);
-        return answer;
-    }
-
-    public void testCreateDeleteDestinations() throws Exception {
-        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1199/jmxrmi");
-        JMXConnector connector = JMXConnectorFactory.connect(url, null);
-        connector.connect();
-        MBeanServerConnection connection = connector.getMBeanServerConnection();
-        ObjectName name = new ObjectName("org.apache.activemq:Type=Broker,BrokerName=localhost");
-        BrokerViewMBean brokerMbean = (BrokerViewMBean) MBeanServerInvocationHandler.newProxyInstance(connection, name, BrokerViewMBean.class, true);
-        Connection conn = createConnection();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = sess.createConsumer(sess.createTopic("ActiveMQ.Advisory.Queue"));
-        conn.start();
-        Destination dest = sess.createQueue("test");
-
-        brokerMbean.addQueue("test");
-
-        ActiveMQMessage msg = (ActiveMQMessage)consumer.receive(1000);
-        assertNotNull(msg);
-        assertTrue(msg.getDataStructure() instanceof DestinationInfo);
-        assertEquals(((DestinationInfo)msg.getDataStructure()).getDestination(), dest);
-        assertEquals(((DestinationInfo)msg.getDataStructure()).getOperationType(), 0);
-
-        brokerMbean.removeQueue("test");
-
-        msg = (ActiveMQMessage)consumer.receive(1000);
-        assertNotNull(msg);
-        assertTrue(msg.getDataStructure() instanceof DestinationInfo);
-        assertEquals(((DestinationInfo)msg.getDataStructure()).getDestination(), dest);
-        assertEquals(((DestinationInfo)msg.getDataStructure()).getOperationType(), 1);
-
-
-        brokerMbean.addQueue("test");
-        msg = (ActiveMQMessage)consumer.receive(1000);
-        assertNotNull(msg);
-        assertTrue(msg.getDataStructure() instanceof DestinationInfo);
-        assertEquals(((DestinationInfo)msg.getDataStructure()).getDestination(), dest);
-        assertEquals(((DestinationInfo)msg.getDataStructure()).getOperationType(), 0);
-        assertEquals(((DestinationInfo)msg.getDataStructure()).getOperationType(), 0);
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java
deleted file mode 100644
index 2da5b10..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/advisory/AdvisoryNetworkBridgeTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.broker.advisory;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.BrokerInfo;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import java.net.URI;
-
-public class AdvisoryNetworkBridgeTest extends TestCase {
-
-    BrokerService broker1;
-    BrokerService broker2;
-
-
-    public void testAdvisory() throws Exception {
-        createBroker1();
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://broker1");
-        Connection conn = factory.createConnection();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        conn.start();
-        MessageConsumer consumer = sess.createConsumer(AdvisorySupport.getNetworkBridgeAdvisoryTopic());
-        
-        Thread.sleep(1000);
-
-        createBroker2();
-        
-        ActiveMQMessage advisory = (ActiveMQMessage)consumer.receive(2000);
-        assertNotNull(advisory);
-        assertTrue(advisory.getDataStructure() instanceof BrokerInfo);
-        assertTrue(advisory.getBooleanProperty("started"));
-        assertCreatedByDuplex(advisory.getBooleanProperty("createdByDuplex"));
-        
-        broker2.stop();
-        broker2.waitUntilStopped();
-
-        advisory = (ActiveMQMessage)consumer.receive(2000);
-        assertNotNull(advisory);
-        assertTrue(advisory.getDataStructure() instanceof BrokerInfo);
-        assertFalse(advisory.getBooleanProperty("started"));
-    }
-
-    public void assertCreatedByDuplex(boolean createdByDuplex) {
-        assertFalse(createdByDuplex);
-    }
-
-    public void createBroker1() throws Exception {
-        broker1 = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/network/reconnect-broker1.xml"));
-        broker1.start();
-        broker1.waitUntilStarted();
-    }
-
-    public void createBroker2() throws Exception {
-        broker2 = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/network/reconnect-broker2.xml"));
-        broker2.start();
-        broker2.waitUntilStarted();
-    }
-
-
-    @Override
-    protected void tearDown() throws Exception {
-       broker1.stop();
-       broker1.waitUntilStopped();
-
-       broker2.stop();
-       broker2.waitUntilStopped();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java
deleted file mode 100644
index db2f11c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.broker.ft;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest {
-    private static final transient Logger LOG = LoggerFactory.getLogger(DbRestartJDBCQueueMasterSlaveTest.class);
-    
-    protected void messageSent() throws Exception {    
-        if (++inflightMessageCount == failureCount) {
-            LOG.info("STOPPING DB!@!!!!");
-            final EmbeddedDataSource ds = getExistingDataSource();
-            ds.setShutdownDatabase("shutdown");
-            LOG.info("DB STOPPED!@!!!!");
-            
-            Thread dbRestartThread = new Thread("db-re-start-thread") {
-                public void run() {
-                    LOG.info("Waiting for master broker to Stop");
-                    master.waitUntilStopped();
-                    ds.setShutdownDatabase("false");
-                    LOG.info("DB RESTARTED!@!!!!");
-                }
-            };
-            dbRestartThread.start();
-        }
-    }
-     
-    protected void sendToProducer(MessageProducer producer,
-            Destination producerDestination, Message message) throws JMSException {
-        {   
-            // do some retries as db failures filter back to the client until broker sees
-            // db lock failure and shuts down
-            boolean sent = false;
-            do {
-                try { 
-                    producer.send(producerDestination, message);
-                    sent = true;
-                } catch (JMSException e) {
-                    LOG.info("Exception on producer send:", e);
-                    try { 
-                        Thread.sleep(2000);
-                    } catch (InterruptedException ignored) {
-                    }
-                }
-            } while(!sent);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java
deleted file mode 100644
index 3c284b3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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.broker.ft;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTopicSendReceiveWithTwoConnectionsTest;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.jdbc.DataSourceSupport;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.util.DefaultIOExceptionHandler;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnectionsTest implements ExceptionListener {
-    private static final transient Logger LOG = LoggerFactory.getLogger(DbRestartJDBCQueueTest.class);
-
-    public boolean transactedSends = false;
-    public int failureCount = 25;  // or 20 for even tx batch boundary
-
-    int inflightMessageCount = 0;
-    EmbeddedDataSource sharedDs;
-    BrokerService broker;
-    final CountDownLatch restartDBLatch = new CountDownLatch(1);
-
-    protected void setUp() throws Exception {
-        setAutoFail(true);
-        topic = false;
-        verbose = true;
-        // startup db
-        sharedDs = (EmbeddedDataSource) new DataSourceSupport().getDataSource();
-
-        broker = new BrokerService();
-
-        DefaultIOExceptionHandler handler = new DefaultIOExceptionHandler();
-        handler.setIgnoreSQLExceptions(false);
-        handler.setStopStartConnectors(true);
-        broker.setIoExceptionHandler(handler);
-        broker.addConnector("tcp://localhost:0");
-        broker.setUseJmx(false);
-        broker.setPersistent(true);
-        broker.setDeleteAllMessagesOnStartup(true);
-        JDBCPersistenceAdapter persistenceAdapter = new JDBCPersistenceAdapter();
-        persistenceAdapter.setDataSource(sharedDs);
-        persistenceAdapter.setUseDatabaseLock(false);
-        persistenceAdapter.setLockKeepAlivePeriod(500);
-        persistenceAdapter.setLockAcquireSleepInterval(500);
-        broker.setPersistenceAdapter(persistenceAdapter);
-        broker.start();
-        super.setUp();
-    }
-
-    protected void tearDown() throws  Exception {
-       super.tearDown();
-        broker.stop();
-    }
-
-
-    protected Session createSendSession(Connection sendConnection) throws Exception {
-        if (transactedSends) {
-            return sendConnection.createSession(true, Session.SESSION_TRANSACTED);
-        } else {
-            return sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory f =
-                new ActiveMQConnectionFactory("failover://" + broker.getTransportConnectors().get(0).getPublishableConnectString());
-        f.setExceptionListener(this);
-        return f;
-    }
-
-    @Override
-    protected void messageSent() throws Exception {    
-        if (++inflightMessageCount == failureCount) {
-            LOG.info("STOPPING DB!@!!!!");
-            final EmbeddedDataSource ds = sharedDs;
-            ds.setShutdownDatabase("shutdown");
-            try {
-                ds.getConnection();
-            } catch (Exception ignored) {
-            }
-            LOG.info("DB STOPPED!@!!!!");
-            
-            Thread dbRestartThread = new Thread("db-re-start-thread") {
-                public void run() {
-                    LOG.info("Sleeping for 10 seconds before allowing db restart");
-                    try {
-                        restartDBLatch.await(10, TimeUnit.SECONDS);
-                    } catch (InterruptedException e) {
-                        e.printStackTrace();
-                    }
-                    ds.setShutdownDatabase("false");
-                    LOG.info("DB RESTARTED!@!!!!");
-                }
-            };
-            dbRestartThread.start();
-        }
-    }
-     
-    protected void sendToProducer(MessageProducer producer,
-            Destination producerDestination, Message message) throws JMSException {
-        {   
-            // do some retries as db failures filter back to the client until broker sees
-            // db lock failure and shuts down
-            boolean sent = false;
-            do {
-                try { 
-                    producer.send(producerDestination, message);
-
-                    if (transactedSends && ((inflightMessageCount+1) %10 == 0 || (inflightMessageCount+1) >= messageCount)) {
-                        LOG.info("committing on send: " + inflightMessageCount + " message: " + message);
-                        session.commit();
-                    }
-
-                    sent = true;
-                } catch (JMSException e) {
-                    LOG.info("Exception on producer send:", e);
-                    try { 
-                        Thread.sleep(2000);
-                    } catch (InterruptedException ignored) {
-                    }
-                }
-            } while(!sent);
-
-        }
-    }
-
-    @Override
-    public void onException(JMSException exception) {
-        LOG.error("exception on connection: ", exception);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/JDBCQueueMasterSlaveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/JDBCQueueMasterSlaveTest.java
deleted file mode 100644
index 1373e46..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/JDBCQueueMasterSlaveTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.broker.ft;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.jdbc.DataSourceSupport;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-public class JDBCQueueMasterSlaveTest extends QueueMasterSlaveTest {
-    protected EmbeddedDataSource sharedDs;
-    protected String MASTER_URL = "tcp://localhost:62001";
-    protected String SLAVE_URL  = "tcp://localhost:62002";
-
-    protected void setUp() throws Exception {
-        // startup db
-        sharedDs = (EmbeddedDataSource) new DataSourceSupport().getDataSource();
-        super.setUp();
-    }
-    
-    protected void createMaster() throws Exception {
-        master = new BrokerService();
-        master.addConnector(MASTER_URL);
-        master.setUseJmx(false);
-        master.setPersistent(true);
-        master.setDeleteAllMessagesOnStartup(true);
-        JDBCPersistenceAdapter persistenceAdapter = new JDBCPersistenceAdapter();
-        persistenceAdapter.setDataSource(getExistingDataSource());
-        persistenceAdapter.setLockKeepAlivePeriod(500);
-        persistenceAdapter.setLockAcquireSleepInterval(500);
-        master.setPersistenceAdapter(persistenceAdapter);
-        master.start();
-    }
-
-    protected void createSlave() throws Exception {
-        // use a separate thread as the slave will block waiting for
-        // the exclusive db lock
-        Thread t = new Thread() {
-            public void run() {
-                try {
-                    BrokerService broker = new BrokerService();
-                    broker.addConnector(SLAVE_URL);
-                    // no need for broker.setMasterConnectorURI(masterConnectorURI)
-                    // as the db lock provides the slave/master initialisation
-                    broker.setUseJmx(false);
-                    broker.setPersistent(true);
-                    JDBCPersistenceAdapter persistenceAdapter = new JDBCPersistenceAdapter();
-                    persistenceAdapter.setDataSource(getExistingDataSource());
-                    persistenceAdapter.setCreateTablesOnStartup(false);
-                    broker.setPersistenceAdapter(persistenceAdapter);
-                    broker.start();
-                    slave.set(broker);
-                    slaveStarted.countDown();
-                } catch (Exception e) {
-                    fail("failed to start slave broker, reason:" + e);
-                }
-            }
-        };
-        t.start();
-    }
-
-    protected EmbeddedDataSource getExistingDataSource() throws Exception {
-        return sharedDs;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java
deleted file mode 100644
index 488cabb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveProducerFlowControlTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.broker.ft;
-
-import org.apache.activemq.ProducerFlowControlTest;
-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.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MasterSlaveProducerFlowControlTest extends ProducerFlowControlTest {
-    static final Logger LOG = LoggerFactory.getLogger(MasterSlaveProducerFlowControlTest.class);
-    BrokerService slave;
-    protected BrokerService createBroker() throws Exception {
-        BrokerService service = super.createBroker();
-        service.start();
-        
-        slave = new BrokerService();
-        slave.setBrokerName("Slave");
-        slave.setPersistent(false);
-        slave.setUseJmx(false);
-        
-        // Setup a destination policy where it takes lots of message at a time.
-        // so that slave does not block first as there is no producer flow control
-        // on the master connector
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry policy = new PolicyEntry();
-        // don't apply the same memory limit as the master in this case
-        //policy.setMemoryLimit(10);
-        policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
-        policy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-        policy.setProducerFlowControl(true);
-        policyMap.setDefaultEntry(policy);
-        
-        slave.setDestinationPolicy(policyMap);
-        slave.setMasterConnectorURI(connector.getConnectUri().toString());
-        slave.start();
-        return service;
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (slave != null) {
-            slave.stop();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveSlaveDieTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveSlaveDieTest.java
deleted file mode 100644
index 9f39905..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/MasterSlaveSlaveDieTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.broker.ft;
-
-import java.net.URI;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.broker.BrokerPluginSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MasterSlaveSlaveDieTest extends TestCase {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(MasterSlaveSlaveDieTest.class);
-
-    private final AtomicBoolean pluginStopped = new AtomicBoolean(false);
-    class Plugin extends BrokerPluginSupport {
-
-        @Override
-        public void start() throws Exception {
-            LOG.info("plugin start");
-            super.start();
-        }
-
-        @Override
-        public void stop() throws Exception {
-            LOG.info("plugin stop");
-            pluginStopped.set(true);
-            super.stop();
-        }
-        
-    }
-    public void testSlaveDieMasterStays() throws Exception {
-        final BrokerService master = new BrokerService();
-        master.setBrokerName("master");
-        master.setPersistent(false);
-        // The wireformat negotiation timeout (defaults to same as
-        // MaxInactivityDurationInitalDelay) needs to be a bit longer
-        // on slow running machines - set it to 90 seconds.
-        master.addConnector("tcp://localhost:0?wireFormat.maxInactivityDurationInitalDelay=90000");
-        master.setWaitForSlave(true);
-        master.setPlugins(new BrokerPlugin[] { new Plugin() });
-        
-        final BrokerService slave = new BrokerService();
-        slave.setBrokerName("slave");
-        slave.setPersistent(false);
-        URI masterUri = master.getTransportConnectors().get(0).getConnectUri();
-        //SocketProxy masterProxy = new SocketProxy(masterUri);
-        slave.setMasterConnectorURI(masterUri.toString());
-        
-        slave.setUseJmx(false);
-        slave.getManagementContext().setCreateConnector(false);
-
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                try {
-                    master.start();
-                } catch (Exception e) {
-                    LOG.warn("Exception starting master: " + e);
-                    e.printStackTrace();
-                }
-            }
-        });
-        slave.start();
-        slave.waitUntilStarted();
-        
-        master.waitUntilStarted();
-        
-        LOG.info("killing slave..");
-        slave.stop();
-        slave.waitUntilStopped();
-
-        LOG.info("checking master still alive");
-        assertTrue("master is still alive", master.isStarted());
-        assertFalse("plugin was not yet stopped", pluginStopped.get());
-        master.stop();
-        master.waitUntilStopped();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveSingleUrlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveSingleUrlTest.java
deleted file mode 100644
index 63bd1e5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveSingleUrlTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.broker.ft;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-
-
-public class QueueMasterSlaveSingleUrlTest extends QueueMasterSlaveTest {
-    private final String brokerUrl = "tcp://localhost:62001";
-    private final String singleUriString = "failover://(" + brokerUrl +")?randomize=false";
-
-    @Override
-    protected void setUp() throws Exception {
-        setAutoFail(true);
-        super.setUp();
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(singleUriString);
-    }
-
-    protected void createMaster() throws Exception {
-        master = new BrokerService();
-        master.setBrokerName("shared-master");
-        configureSharedPersistenceAdapter(master);
-        master.addConnector(brokerUrl);
-        master.start();
-    }
-    
-    private void configureSharedPersistenceAdapter(BrokerService broker) throws Exception {
-       AMQPersistenceAdapter adapter = new AMQPersistenceAdapter();
-       adapter.setDirectory(new File("shared"));
-       broker.setPersistenceAdapter(adapter); 
-    }
-
-    protected void createSlave() throws Exception {      
-        new Thread(new Runnable() {
-            public void run() {
-                try {
-                    BrokerService broker = new BrokerService();
-                    broker.setBrokerName("shared-slave");
-                    configureSharedPersistenceAdapter(broker);
-                    // add transport as a service so that it is bound on start, after store started                
-                    final TransportConnector tConnector = new TransportConnector();
-                    tConnector.setUri(new URI(brokerUrl));
-                    broker.addConnector(tConnector);
-                    
-                    broker.start();
-                    slave.set(broker);
-                    slaveStarted.countDown();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }).start();
-    }
-        
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
deleted file mode 100644
index a9527e1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.broker.ft;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTopicSendReceiveWithTwoConnectionsTest;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- * Test failover for Queues
- */
-public class QueueMasterSlaveTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    private static final transient Logger LOG = LoggerFactory.getLogger(QueueMasterSlaveTest.class);
-
-    protected BrokerService master;
-    protected AtomicReference<BrokerService> slave = new AtomicReference<BrokerService>();
-    protected CountDownLatch slaveStarted = new CountDownLatch(1);
-    protected int inflightMessageCount;
-    protected int failureCount = 50;
-    protected String uriString = "failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false";
-
-    protected void setUp() throws Exception {
-        if (System.getProperty("basedir") == null) {
-            File file = new File(".");
-            System.setProperty("basedir", file.getAbsolutePath());
-        }
-        super.messageCount = 500;
-        failureCount = super.messageCount / 2;
-        super.topic = isTopic();
-        createMaster();
-        createSlave();
-        // wait for thing to connect
-        Thread.sleep(1000);
-        super.setUp();
-
-    }
-
-    protected String getSlaveXml() {
-        return "org/apache/activemq/broker/ft/slave.xml";
-    }
-
-    protected String getMasterXml() {
-        return "org/apache/activemq/broker/ft/master.xml";
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        
-    	slaveStarted.await(5, TimeUnit.SECONDS);
-        BrokerService brokerService = slave.get();
-        if( brokerService!=null ) {
-        	brokerService.stop();
-        }
-        master.stop();
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(uriString);
-    }
-
-    protected void messageSent() throws Exception {
-        if (++inflightMessageCount == failureCount) {
-            Thread.sleep(1000);
-            LOG.error("MASTER STOPPED!@!!!!");
-            master.stop();
-        }
-    }
-
-    protected boolean isTopic() {
-        return false;
-    }
-    
-    protected void createMaster() throws Exception {
-		BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getMasterXml()));
-		brokerFactory.afterPropertiesSet();
-		master = brokerFactory.getBroker();
-		master.start();
-    }
-    
-    protected void createSlave() throws Exception {
-    	BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getSlaveXml()));
-        brokerFactory.afterPropertiesSet();
-        BrokerService broker = brokerFactory.getBroker();
-        broker.start();
-        slave.set(broker);
-        slaveStarted.countDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestUsingSharedFileTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestUsingSharedFileTest.java
deleted file mode 100644
index 40cef97..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestUsingSharedFileTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.broker.ft;
-
-public class QueueMasterSlaveTestUsingSharedFileTest extends
-        QueueMasterSlaveTest {
-    
-    protected String getSlaveXml() {
-        return "org/apache/activemq/broker/ft/sharedFileSlave.xml";
-    }
-    
-    protected String getMasterXml() {
-        return "org/apache/activemq/broker/ft/sharedFileMaster.xml";
-    }
-    
-    protected void createSlave() throws Exception {    	
-    	// Start the Brokers async since starting them up could be a blocking operation..
-        new Thread(new Runnable() {
-            public void run() {
-                try {
-                    QueueMasterSlaveTestUsingSharedFileTest.super.createSlave();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }).start();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementCompositeQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementCompositeQueueTest.java
deleted file mode 100644
index 3f7862e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementCompositeQueueTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.broker.ft;
-
-/**
- * Let's test composite destinations
- * 
- */
-public class QueueMasterSlaveUsingMasterConnectorElementCompositeQueueTest extends QueueMasterSlaveUsingMasterConnectorElementTest {
-
-    /**
-     * Returns the consumer subject.
-     *
-     * @return String - consumer subject
-     * @see org.apache.activemq.test.TestSupport#getConsumerSubject()
-     */
-    protected String getConsumerSubject() {
-        return "FOO.BAR.HUMBUG2";
-    }
-
-    /**
-     * Returns the producer subject.
-     *
-     * @return String - producer subject
-     * @see org.apache.activemq.test.TestSupport#getProducerSubject()
-     */
-    protected String getProducerSubject() {
-        return "queue://FOO.BAR.HUMBUG,queue://FOO.BAR.HUMBUG2";
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementTest.java
deleted file mode 100644
index 7d5c7ef..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveUsingMasterConnectorElementTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.broker.ft;
-
-/**
- * Lets test using a <masterConnector/> element instead of the old masterConnectorURI attribute
- * 
- * 
- */
-public class QueueMasterSlaveUsingMasterConnectorElementTest extends QueueMasterSlaveTest {
-
-    protected String getSlaveXml() {
-        return "org/apache/activemq/broker/ft/slave2.xml";
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TopicMasterSlaveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TopicMasterSlaveTest.java
deleted file mode 100644
index 617c447..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TopicMasterSlaveTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.broker.ft;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-/**
- * Test failover for Queues
- */
-public class TopicMasterSlaveTest extends QueueMasterSlaveTest {
-
-    protected boolean isTopic() {
-        return true;
-    }
-
-    protected MessageConsumer createConsumer(Session session, Destination dest) throws JMSException {
-        return session.createDurableSubscriber((Topic)dest, "subName");
-    }
-
-    protected Connection createReceiveConnection() throws Exception {
-        Connection result = super.createReceiveConnection();
-        result.setClientID("clientId");
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
deleted file mode 100644
index 2a8bfc2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.broker.ft;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTopicTransactionTest;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.test.JmsResourceProvider;
-
-/**
- * Test failover for Topics
- */
-public class TransactedTopicMasterSlaveTest extends JmsTopicTransactionTest {
-    protected BrokerService slave;
-    protected int inflightMessageCount;
-    protected int failureCount = 50;
-    protected String uriString = "failover://(tcp://localhost:62001?soWriteTimeout=15000,tcp://localhost:62002?soWriteTimeout=15000)?randomize=false";
-    private boolean stopMaster = false;
-
-    @Override
-    protected void setUp() throws Exception {
-        failureCount = super.batchCount / 2;
-        // this will create the main (or master broker)
-        broker = createBroker();
-        File dir = new File ("target" + File.separator + "slave");
-        KahaDBPersistenceAdapter adapter = new KahaDBPersistenceAdapter();
-        adapter.setDirectory(dir);
-        broker.start();
-        slave = new BrokerService();
-        slave.setBrokerName("slave");
-        slave.setPersistenceAdapter(adapter);
-        slave.setDeleteAllMessagesOnStartup(true);
-        slave.setMasterConnectorURI("tcp://localhost:62001");
-        slave.addConnector("tcp://localhost:62002");
-        slave.start();
-        // wait for thing to connect
-        Thread.sleep(1000);
-        resourceProvider = getJmsResourceProvider();
-        topic = resourceProvider.isTopic();
-        // We will be using transacted sessions.
-        resourceProvider.setTransacted(true);
-        connectionFactory = resourceProvider.createConnectionFactory();
-        reconnect();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        slave.stop();
-        slave = null;
-        super.tearDown();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception, URISyntaxException {
-        File dir = new File ("target" + File.separator + "master");
-        KahaDBPersistenceAdapter adapter = new KahaDBPersistenceAdapter();
-        adapter.setDirectory(dir);
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName("master");
-        broker.setPersistenceAdapter(adapter);
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.addConnector("tcp://localhost:62001");
-        return broker;
-    }
-
-    @Override
-    protected JmsResourceProvider getJmsResourceProvider() {
-        JmsResourceProvider p = super.getJmsResourceProvider();
-        p.setServerUri(uriString);
-        return p;
-    }
-
-    @Override
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(uriString);
-    }
-
-    public void testSendReceiveTransactedBatchesWithMasterStop() throws Exception {
-        try {
-            stopMaster = true;
-            testSendReceiveTransactedBatches();
-        } finally {
-            stopMaster = false;
-        }
-    }
-    
-    @Override
-    protected void messageSent() throws Exception {
-        if (stopMaster) {
-            if (++inflightMessageCount >= failureCount) {
-                inflightMessageCount = 0;
-                Thread.sleep(1000);
-                broker.stop();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
deleted file mode 100644
index 9cf5363..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
+++ /dev/null
@@ -1,766 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.TabularData;
-
-import junit.textui.TestRunner;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.BlobMessage;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.BaseDestination;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.SharedDeadLetterStrategy;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.util.JMXSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A test case of the various MBeans in ActiveMQ. If you want to look at the
- * various MBeans after the test has been run then run this test case as a
- * command line application.
- * 
- * 
- */
-public class MBeanTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(MBeanTest.class);
-
-    private static boolean waitForKeyPress;
-
-    protected MBeanServer mbeanServer;
-    protected String domain = "org.apache.activemq";
-    protected String clientID = "foo";
-
-    protected Connection connection;
-    protected boolean transacted;
-    protected int authMode = Session.AUTO_ACKNOWLEDGE;
-    protected static final int MESSAGE_COUNT = 2*BaseDestination.MAX_PAGE_SIZE;
-
-    /**
-     * When you run this test case from the command line it will pause before
-     * terminating so that you can look at the MBeans state for debugging
-     * purposes.
-     */
-    public static void main(String[] args) {
-        waitForKeyPress = true;
-        TestRunner.run(MBeanTest.class);
-    }
-    
-    public void testConnectors() throws Exception{
-        ObjectName brokerName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
-        BrokerViewMBean broker = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
-        assertEquals("openwire URL port doesn't equal bind Address", new URI(broker.getOpenWireURL()).getPort(), new URI(this.bindAddress).getPort());
-
-    }
-
-    public void testMBeans() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-
-        // test all the various MBeans now we have a producer, consumer and
-        // messages on a queue
-        assertSendViaMBean();
-        assertQueueBrowseWorks();
-        assertCreateAndDestroyDurableSubscriptions();
-        assertConsumerCounts();
-    }
-
-    public void testMoveMessages() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-
-        QueueViewMBean queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        CompositeData[] compdatalist = queue.browse();
-        int initialQueueSize = compdatalist.length;
-        if (initialQueueSize == 0) {
-            fail("There is no message in the queue:");
-        }
-        else {
-            echo("Current queue size: " + initialQueueSize);
-        }
-        int messageCount = initialQueueSize;
-        String[] messageIDs = new String[messageCount];
-        for (int i = 0; i < messageCount; i++) {
-            CompositeData cdata = compdatalist[i];
-            String messageID = (String) cdata.get("JMSMessageID");
-            assertNotNull("Should have a message ID for message " + i, messageID);
-            messageIDs[i] = messageID;
-        }
-
-        assertTrue("dest has some memory usage", queue.getMemoryPercentUsage() > 0);
-
-        echo("About to move " + messageCount + " messages");
-
-        String newDestination = getSecondDestinationString();
-        for (String messageID : messageIDs) {
-            echo("Moving message: " + messageID);
-            queue.moveMessageTo(messageID, newDestination);
-        }
-
-        echo("Now browsing the queue");
-        compdatalist = queue.browse();
-        int actualCount = compdatalist.length;
-        echo("Current queue size: " + actualCount);
-        assertEquals("Should now have empty queue but was", initialQueueSize - messageCount, actualCount);
-
-        echo("Now browsing the second queue");
-
-        queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + newDestination + ",BrokerName=localhost");
-        QueueViewMBean queueNew = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        long newQueuesize = queueNew.getQueueSize();
-        echo("Second queue size: " + newQueuesize);
-        assertEquals("Unexpected number of messages ",messageCount, newQueuesize);
-        
-        // check memory usage migration
-        assertTrue("new dest has some memory usage", queueNew.getMemoryPercentUsage() > 0);
-        assertEquals("old dest has no memory usage", 0, queue.getMemoryPercentUsage());
-        assertTrue("use cache", queueNew.isUseCache());
-        assertTrue("cache enabled", queueNew.isCacheEnabled());
-    }
-
-    public void testRemoveMessages() throws Exception {
-        ObjectName brokerName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
-        BrokerViewMBean broker = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
-        broker.addQueue(getDestinationString());
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-
-        QueueViewMBean queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-        String msg1 = queue.sendTextMessage("message 1");
-        String msg2 = queue.sendTextMessage("message 2");
-
-        assertTrue(queue.removeMessage(msg2));
-
-        connection = connectionFactory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQDestination dest = createDestination();
-
-        MessageConsumer consumer = session.createConsumer(dest);
-        Message message = consumer.receive(1000);
-        assertNotNull(message);
-        assertEquals(msg1, message.getJMSMessageID());
-
-        String msg3 = queue.sendTextMessage("message 3");
-        message = consumer.receive(1000);
-        assertNotNull(message);
-        assertEquals(msg3, message.getJMSMessageID());
-
-        message = consumer.receive(1000);
-        assertNull(message);
-
-    }
-
-    public void testRetryMessages() throws Exception {
-        // lets speed up redelivery
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory) connectionFactory;
-        factory.getRedeliveryPolicy().setCollisionAvoidancePercent((short) 0);
-        factory.getRedeliveryPolicy().setMaximumRedeliveries(1);
-        factory.getRedeliveryPolicy().setInitialRedeliveryDelay(0);
-        factory.getRedeliveryPolicy().setUseCollisionAvoidance(false);
-        factory.getRedeliveryPolicy().setUseExponentialBackOff(false);
-        factory.getRedeliveryPolicy().setBackOffMultiplier((short) 0);
-
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-        QueueViewMBean queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        long initialQueueSize = queue.getQueueSize();
-        echo("current queue size: " + initialQueueSize);
-        assertTrue("dest has some memory usage", queue.getMemoryPercentUsage() > 0);
-
-        // lets create a duff consumer which keeps rolling back...
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = session.createConsumer(new ActiveMQQueue(getDestinationString()));
-        Message message = consumer.receive(5000);
-        while (message != null) {
-            echo("Message: " + message.getJMSMessageID() + " redelivered " + message.getJMSRedelivered() + " counter " + message.getObjectProperty("JMSXDeliveryCount"));
-            session.rollback();
-            message = consumer.receive(2000);
-        }
-        consumer.close();
-        session.close();
-
-
-        // now lets get the dead letter queue
-        Thread.sleep(1000);
-
-        ObjectName dlqQueueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + SharedDeadLetterStrategy.DEFAULT_DEAD_LETTER_QUEUE_NAME + ",BrokerName=localhost");
-        QueueViewMBean dlq = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, dlqQueueViewMBeanName, QueueViewMBean.class, true);
-
-        long initialDlqSize = dlq.getQueueSize();
-        CompositeData[] compdatalist = dlq.browse();
-        int dlqQueueSize = compdatalist.length;
-        if (dlqQueueSize == 0) {
-            fail("There are no messages in the queue:");
-        }
-        else {
-            echo("Current DLQ queue size: " + dlqQueueSize);
-        }
-        int messageCount = dlqQueueSize;
-        String[] messageIDs = new String[messageCount];
-        for (int i = 0; i < messageCount; i++) {
-            CompositeData cdata = compdatalist[i];
-            String messageID = (String) cdata.get("JMSMessageID");
-            assertNotNull("Should have a message ID for message " + i, messageID);
-            messageIDs[i] = messageID;
-        }
-
-        int dlqMemUsage = dlq.getMemoryPercentUsage();
-        assertTrue("dlq has some memory usage", dlqMemUsage > 0);
-        assertEquals("dest has no memory usage", 0, queue.getMemoryPercentUsage());
-        
-
-        echo("About to retry " + messageCount + " messages");
-
-        for (String messageID : messageIDs) {
-            echo("Retrying message: " + messageID);
-            dlq.retryMessage(messageID);
-        }
-
-        long queueSize = queue.getQueueSize();
-        compdatalist = queue.browse();
-        int actualCount = compdatalist.length;
-        echo("Orginal queue size is now " + queueSize);
-        echo("Original browse queue size: " + actualCount);
-
-        long dlqSize = dlq.getQueueSize();
-        echo("DLQ size: " + dlqSize);
-
-        assertEquals("DLQ size", initialDlqSize - messageCount, dlqSize);
-        assertEquals("queue size", initialQueueSize, queueSize);
-        assertEquals("browse queue size", initialQueueSize, actualCount);
-        
-        assertEquals("dest has some memory usage", dlqMemUsage, queue.getMemoryPercentUsage());
-    }
-
-    public void testMoveMessagesBySelector() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-
-        QueueViewMBean queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        String newDestination = getSecondDestinationString();
-        queue.moveMatchingMessagesTo("counter > 2", newDestination);
-
-        queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + newDestination + ",BrokerName=localhost");
-
-        queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-        int movedSize = MESSAGE_COUNT-3;
-        assertEquals("Unexpected number of messages ",movedSize,queue.getQueueSize());
-
-        // now lets remove them by selector
-        queue.removeMatchingMessages("counter > 2");
-
-        assertEquals("Should have no more messages in the queue: " + queueViewMBeanName, 0, queue.getQueueSize());
-        assertEquals("dest has no memory usage", 0, queue.getMemoryPercentUsage());
-    }
-
-    public void testCopyMessagesBySelector() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnection(connection);
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-
-        QueueViewMBean queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        String newDestination = getSecondDestinationString();
-        long queueSize = queue.getQueueSize();
-        queue.copyMatchingMessagesTo("counter > 2", newDestination);
-
-        
-
-        queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + newDestination + ",BrokerName=localhost");
-
-        queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        LOG.info("Queue: " + queueViewMBeanName + " now has: " + queue.getQueueSize() + " message(s)");
-        assertEquals("Expected messages in a queue: " + queueViewMBeanName, MESSAGE_COUNT-3, queue.getQueueSize());
-        // now lets remove them by selector
-        queue.removeMatchingMessages("counter > 2");
-
-        assertEquals("Should have no more messages in the queue: " + queueViewMBeanName, 0, queue.getQueueSize());
-        assertEquals("dest has no memory usage", 0, queue.getMemoryPercentUsage());
-    }
-
-
-    protected void assertSendViaMBean() throws Exception {
-        String queueName = getDestinationString() + ".SendMBBean";
-
-        ObjectName brokerName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
-        echo("Create QueueView MBean...");
-        BrokerViewMBean broker = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
-        broker.addQueue(queueName);
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + queueName + ",BrokerName=localhost");
-
-        echo("Create QueueView MBean...");
-        QueueViewMBean proxy = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        proxy.purge();
-        
-        int count = 5;
-        for (int i = 0; i < count; i++) {
-            String body = "message:" + i;
-
-            Map headers = new HashMap();
-            headers.put("JMSCorrelationID", "MyCorrId");
-            headers.put("JMSDeliveryMode", Boolean.FALSE);
-            headers.put("JMSXGroupID", "MyGroupID");
-            headers.put("JMSXGroupSeq", 1234);
-            headers.put("JMSPriority", i + 1);
-            headers.put("JMSType", "MyType");
-            headers.put("MyHeader", i);
-            headers.put("MyStringHeader", "StringHeader" + i);
-
-            proxy.sendTextMessage(headers, body);
-        }
-        
-        CompositeData[] compdatalist = proxy.browse();
-        if (compdatalist.length == 0) {
-            fail("There is no message in the queue:");
-        }
-        String[] messageIDs = new String[compdatalist.length];
-
-        for (int i = 0; i < compdatalist.length; i++) {
-            CompositeData cdata = compdatalist[i];
-
-            if (i == 0) {
-                echo("Columns: " + cdata.getCompositeType().keySet());
-            }
-
-            assertComplexData(i, cdata, "JMSCorrelationID", "MyCorrId");
-            assertComplexData(i, cdata, "JMSPriority", i + 1);
-            assertComplexData(i, cdata, "JMSType", "MyType");
-            assertComplexData(i, cdata, "JMSCorrelationID", "MyCorrId");
-            assertComplexData(i, cdata, "JMSDeliveryMode", "NON-PERSISTENT");
-            String expected = "{MyStringHeader=StringHeader" + i + ", MyHeader=" + i + "}";
-            // The order of the properties is different when using the ibm jdk.
-            if (System.getProperty("java.vendor").equals("IBM Corporation")) {
-                expected = "{MyHeader=" + i + ", MyStringHeader=StringHeader" + i + "}";
-            }
-            assertComplexData(i, cdata, "PropertiesText", expected);
-
-            Map intProperties = CompositeDataHelper.getTabularMap(cdata, CompositeDataConstants.INT_PROPERTIES);
-            assertEquals("intProperties size()", 1, intProperties.size());
-            assertEquals("intProperties.MyHeader", i, intProperties.get("MyHeader"));
-
-            Map stringProperties = CompositeDataHelper.getTabularMap(cdata, CompositeDataConstants.STRING_PROPERTIES);
-            assertEquals("stringProperties size()", 1, stringProperties.size());
-            assertEquals("stringProperties.MyHeader", "StringHeader" + i, stringProperties.get("MyStringHeader"));
-
-            Map properties = CompositeDataHelper.getMessageUserProperties(cdata);
-            assertEquals("properties size()", 2, properties.size());
-            assertEquals("properties.MyHeader", i, properties.get("MyHeader"));
-            assertEquals("properties.MyHeader", "StringHeader" + i, properties.get("MyStringHeader"));
-
-            assertComplexData(i, cdata, "JMSXGroupSeq", 1234);
-            assertComplexData(i, cdata, "JMSXGroupID", "MyGroupID");
-            assertComplexData(i, cdata, "Text", "message:" + i);
-
-        }
-    }
-
-    protected void assertComplexData(int messageIndex, CompositeData cdata, String name, Object expected) {
-        Object value = cdata.get(name);
-        assertEquals("Message " + messageIndex + " CData field: " + name, expected, value);
-    }
-
-
-    protected void assertQueueBrowseWorks() throws Exception {
-        Integer mbeancnt = mbeanServer.getMBeanCount();
-        echo("Mbean count :" + mbeancnt);
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-
-        echo("Create QueueView MBean...");
-        QueueViewMBean proxy = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        long concount = proxy.getConsumerCount();
-        echo("Consumer Count :" + concount);
-        long messcount = proxy.getQueueSize();
-        echo("current number of messages in the queue :" + messcount);
-
-        // lets browse
-        CompositeData[] compdatalist = proxy.browse();
-        if (compdatalist.length == 0) {
-            fail("There is no message in the queue:");
-        }
-        String[] messageIDs = new String[compdatalist.length];
-
-        for (int i = 0; i < compdatalist.length; i++) {
-            CompositeData cdata = compdatalist[i];
-
-            if (i == 0) {
-                echo("Columns: " + cdata.getCompositeType().keySet());
-            }
-            messageIDs[i] = (String)cdata.get("JMSMessageID");
-            echo("message " + i + " : " + cdata.values());
-        }
-
-        TabularData table = proxy.browseAsTable();
-        echo("Found tabular data: " + table);
-        assertTrue("Table should not be empty!", table.size() > 0);
-
-        assertEquals("Queue size", MESSAGE_COUNT, proxy.getQueueSize());
-
-        String messageID = messageIDs[0];
-        String newDestinationName = "queue://dummy.test.cheese";
-        echo("Attempting to copy: " + messageID + " to destination: " + newDestinationName);
-        proxy.copyMessageTo(messageID, newDestinationName);
-
-        assertEquals("Queue size", MESSAGE_COUNT, proxy.getQueueSize());
-
-        messageID = messageIDs[1];
-        echo("Attempting to remove: " + messageID);
-        proxy.removeMessage(messageID);
-
-        assertEquals("Queue size", MESSAGE_COUNT-1, proxy.getQueueSize());
-
-        echo("Worked!");
-    }
-
-    protected void assertCreateAndDestroyDurableSubscriptions() throws Exception {
-        // lets create a new topic
-        ObjectName brokerName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
-        echo("Create QueueView MBean...");
-        BrokerViewMBean broker = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
-
-        broker.addTopic(getDestinationString());
-
-        assertEquals("Durable subscriber count", 0, broker.getDurableTopicSubscribers().length);
-
-        String topicName = getDestinationString();
-        String selector = null;
-        ObjectName name1 = broker.createDurableSubscriber(clientID, "subscriber1", topicName, selector);
-        broker.createDurableSubscriber(clientID, "subscriber2", topicName, selector);
-        assertEquals("Durable subscriber count", 2, broker.getInactiveDurableTopicSubscribers().length);
-
-        assertNotNull("Should have created an mbean name for the durable subscriber!", name1);
-
-        LOG.info("Created durable subscriber with name: " + name1);
-
-        // now lets try destroy it
-        broker.destroyDurableSubscriber(clientID, "subscriber1");
-        assertEquals("Durable subscriber count", 1, broker.getInactiveDurableTopicSubscribers().length);
-    }
-
-    protected void assertConsumerCounts() throws Exception {
-        ObjectName brokerName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
-        BrokerViewMBean broker = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
-
-        assertTrue("broker is not a slave", !broker.isSlave());
-        // create 2 topics
-        broker.addTopic(getDestinationString() + "1");
-        broker.addTopic(getDestinationString() + "2");
-
-        ObjectName topicObjName1 = assertRegisteredObjectName(domain + ":Type=Topic,BrokerName=localhost,Destination=" + getDestinationString() + "1");
-        ObjectName topicObjName2 = assertRegisteredObjectName(domain + ":Type=Topic,BrokerName=localhost,Destination=" + getDestinationString() + "2");
-        TopicViewMBean topic1 = (TopicViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, topicObjName1, TopicViewMBean.class, true);
-        TopicViewMBean topic2 = (TopicViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, topicObjName2, TopicViewMBean.class, true);
-
-        assertEquals("topic1 Durable subscriber count", 0, topic1.getConsumerCount());
-        assertEquals("topic2 Durable subscriber count", 0, topic2.getConsumerCount());
-
-        String topicName = getDestinationString();
-        String selector = null;
-
-        // create 1 subscriber for each topic
-        broker.createDurableSubscriber(clientID, "topic1.subscriber1", topicName + "1", selector);
-        broker.createDurableSubscriber(clientID, "topic2.subscriber1", topicName + "2", selector);
-
-        assertEquals("topic1 Durable subscriber count", 1, topic1.getConsumerCount());
-        assertEquals("topic2 Durable subscriber count", 1, topic2.getConsumerCount());
-
-        // create 1 more subscriber for topic1
-        broker.createDurableSubscriber(clientID, "topic1.subscriber2", topicName + "1", selector);
-
-        assertEquals("topic1 Durable subscriber count", 2, topic1.getConsumerCount());
-        assertEquals("topic2 Durable subscriber count", 1, topic2.getConsumerCount());
-
-        // destroy topic1 subscriber
-        broker.destroyDurableSubscriber(clientID, "topic1.subscriber1");
-
-        assertEquals("topic1 Durable subscriber count", 1, topic1.getConsumerCount());
-        assertEquals("topic2 Durable subscriber count", 1, topic2.getConsumerCount());
-
-        // destroy topic2 subscriber
-        broker.destroyDurableSubscriber(clientID, "topic2.subscriber1");
-
-        assertEquals("topic1 Durable subscriber count", 1, topic1.getConsumerCount());
-        assertEquals("topic2 Durable subscriber count", 0, topic2.getConsumerCount());
-
-        // destroy remaining topic1 subscriber
-        broker.destroyDurableSubscriber(clientID, "topic1.subscriber2");
-
-        assertEquals("topic1 Durable subscriber count", 0, topic1.getConsumerCount());
-        assertEquals("topic2 Durable subscriber count", 0, topic2.getConsumerCount());
-    }
-
-    protected ObjectName assertRegisteredObjectName(String name) throws MalformedObjectNameException, NullPointerException {
-        ObjectName objectName = new ObjectName(name);
-        if (mbeanServer.isRegistered(objectName)) {
-            echo("Bean Registered: " + objectName);
-        } else {
-            fail("Could not find MBean!: " + objectName);
-        }
-        return objectName;
-    }
-
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:61616";
-        useTopic = false;
-        super.setUp();
-        mbeanServer = broker.getManagementContext().getMBeanServer();
-    }
-
-    protected void tearDown() throws Exception {
-        if (waitForKeyPress) {
-            // We are running from the command line so let folks browse the
-            // mbeans...
-            System.out.println();
-            System.out.println("Press enter to terminate the program.");
-            System.out.println("In the meantime you can use your JMX console to view the current MBeans");
-            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
-            reader.readLine();
-        }
-
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.setUseJmx(true);
-       
-        // apply memory limit so that %usage is visible
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setMemoryLimit(1024*1024*4);
-        policyMap.setDefaultEntry(defaultEntry);
-        answer.setDestinationPolicy(policyMap);
-        
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-
-    protected void useConnection(Connection connection) throws Exception {
-        connection.setClientID(clientID);
-        connection.start();
-        Session session = connection.createSession(transacted, authMode);
-        destination = createDestination();
-        MessageProducer producer = session.createProducer(destination);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            Message message = session.createTextMessage("Message: " + i);
-            message.setIntProperty("counter", i);
-            message.setJMSCorrelationID("MyCorrelationID");
-            message.setJMSReplyTo(new ActiveMQQueue("MyReplyTo"));
-            message.setJMSType("MyType");
-            message.setJMSPriority(5);
-            producer.send(message);
-        }
-        Thread.sleep(1000);
-    }
-
-    
-    protected void useConnectionWithBlobMessage(Connection connection) throws Exception {
-        connection.setClientID(clientID);
-        connection.start();
-        ActiveMQSession session = (ActiveMQSession) connection.createSession(transacted, authMode);
-        destination = createDestination();
-        MessageProducer producer = session.createProducer(destination);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BlobMessage message = session.createBlobMessage(new URL("http://foo.bar/test"));
-            message.setIntProperty("counter", i);
-            message.setJMSCorrelationID("MyCorrelationID");
-            message.setJMSReplyTo(new ActiveMQQueue("MyReplyTo"));
-            message.setJMSType("MyType");
-            message.setJMSPriority(5);
-            producer.send(message);
-        }
-        Thread.sleep(1000);
-    }
-
-    protected void useConnectionWithByteMessage(Connection connection) throws Exception {
-        connection.setClientID(clientID);
-        connection.start();
-        ActiveMQSession session = (ActiveMQSession) connection.createSession(transacted, authMode);
-        destination = createDestination();
-        MessageProducer producer = session.createProducer(destination);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            BytesMessage message = session.createBytesMessage();
-            message.writeBytes(("Message: " + i).getBytes());
-            message.setIntProperty("counter", i);
-            message.setJMSCorrelationID("MyCorrelationID");
-            message.setJMSReplyTo(new ActiveMQQueue("MyReplyTo"));
-            message.setJMSType("MyType");
-            message.setJMSPriority(5);
-            producer.send(message);
-        }
-        Thread.sleep(1000);
-    }
-
-    protected void echo(String text) {
-        LOG.info(text);
-    }
-
-
-    protected String getSecondDestinationString() {
-        return "test.new.destination." + getClass() + "." + getName();
-    }
-
-
-    public void testTempQueueJMXDelete() throws Exception {
-        connection = connectionFactory.createConnection();
-        
-        connection.setClientID(clientID);
-        connection.start();
-        Session session = connection.createSession(transacted, authMode);
-        ActiveMQTempQueue tQueue = (ActiveMQTempQueue) session.createTemporaryQueue();
-        Thread.sleep(1000);
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type="+  JMXSupport.encodeObjectNamePart(tQueue.getDestinationTypeAsString())+",Destination=" + JMXSupport.encodeObjectNamePart(tQueue.getPhysicalName()) + ",BrokerName=localhost");
-        
-        // should not throw an exception
-        mbeanServer.getObjectInstance(queueViewMBeanName);
-
-        tQueue.delete();
-        Thread.sleep(1000);
-        try {
-            // should throw an exception
-            mbeanServer.getObjectInstance(queueViewMBeanName);
-
-            fail("should be deleted already!");
-        } catch (Exception e) {
-            // expected!
-        }
-
-    }
-
-    // Test for AMQ-3029
-    public void testBrowseBlobMessages() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnectionWithBlobMessage(connection);
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-
-        QueueViewMBean queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        CompositeData[] compdatalist = queue.browse();
-        int initialQueueSize = compdatalist.length;
-        if (initialQueueSize == 0) {
-            fail("There is no message in the queue:");
-        }
-        else {
-            echo("Current queue size: " + initialQueueSize);
-        }
-        int messageCount = initialQueueSize;
-        String[] messageIDs = new String[messageCount];
-        for (int i = 0; i < messageCount; i++) {
-            CompositeData cdata = compdatalist[i];
-            String messageID = (String) cdata.get("JMSMessageID");
-            assertNotNull("Should have a message ID for message " + i, messageID);
-            
-            messageIDs[i] = messageID;
-        }
-
-        assertTrue("dest has some memory usage", queue.getMemoryPercentUsage() > 0);
-    }
-
-    public void testBrowseBytesMessages() throws Exception {
-        connection = connectionFactory.createConnection();
-        useConnectionWithByteMessage(connection);
-
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-
-        QueueViewMBean queue = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        CompositeData[] compdatalist = queue.browse();
-        int initialQueueSize = compdatalist.length;
-        if (initialQueueSize == 0) {
-            fail("There is no message in the queue:");
-        }
-        else {
-            echo("Current queue size: " + initialQueueSize);
-        }
-        int messageCount = initialQueueSize;
-        String[] messageIDs = new String[messageCount];
-        for (int i = 0; i < messageCount; i++) {
-            CompositeData cdata = compdatalist[i];
-            String messageID = (String) cdata.get("JMSMessageID");
-            assertNotNull("Should have a message ID for message " + i, messageID);
-            messageIDs[i] = messageID;
-
-            Byte[] preview = (Byte[]) cdata.get(CompositeDataConstants.BODY_PREVIEW);
-            assertNotNull("should be a preview", preview);
-            assertTrue("not empty", preview.length > 0);
-        }
-
-        assertTrue("dest has some memory usage", queue.getMemoryPercentUsage() > 0);
-
-        // consume all the messages
-        echo("Attempting to consume all bytes messages from: " + destination);
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(destination);
-        for (int i=0; i<MESSAGE_COUNT; i++) {
-            Message message = consumer.receive(5000);
-            assertNotNull(message);
-            assertTrue(message instanceof BytesMessage);
-        }
-        consumer.close();
-        session.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java
deleted file mode 100644
index b5ec915..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * 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.broker.jmx;
-
-import javax.jms.*;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A specific test of Queue.purge() functionality
- *
- * 
- */
-public class PurgeTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(PurgeTest.class);
-
-    protected MBeanServer mbeanServer;
-    protected String domain = "org.apache.activemq";
-    protected String clientID = "foo";
-
-    protected Connection connection;
-    protected boolean transacted;
-    protected int authMode = Session.AUTO_ACKNOWLEDGE;
-    protected int messageCount = 10;
-    public PersistenceAdapter persistenceAdapter;
-
-    public static void main(String[] args) {
-        TestRunner.run(PurgeTest.class);
-    }
-
-    public static Test suite() {
-        return suite(PurgeTest.class);
-    }
-
-    public void testPurge() throws Exception {
-        // Send some messages
-        connection = connectionFactory.createConnection();
-        connection.setClientID(clientID);
-        connection.start();
-        Session session = connection.createSession(transacted, authMode);
-        destination = createDestination();
-        MessageProducer producer = session.createProducer(destination);
-        for (int i = 0; i < messageCount; i++) {
-            Message message = session.createTextMessage("Message: " + i);
-            producer.send(message);
-        }
-
-        // Now get the QueueViewMBean and purge
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-        QueueViewMBean proxy = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        long count = proxy.getQueueSize();
-        assertEquals("Queue size", count, messageCount);
-
-        proxy.purge();
-        count = proxy.getQueueSize();
-        assertEquals("Queue size", count, 0);
-        assertEquals("Browse size", proxy.browseMessages().size(), 0);
-
-        // Queues have a special case once there are more than a thousand
-        // dead messages, make sure we hit that.
-        messageCount += 1000;
-        for (int i = 0; i < messageCount; i++) {
-            Message message = session.createTextMessage("Message: " + i);
-            producer.send(message);
-        }
-
-        count = proxy.getQueueSize();
-        assertEquals("Queue size", count, messageCount);
-
-        proxy.purge();
-        count = proxy.getQueueSize();
-        assertEquals("Queue size", count, 0);
-        assertEquals("Browse size", proxy.browseMessages().size(), 0);
-
-        producer.close();
-    }
-
-    public void initCombosForTestDelete() {
-        addCombinationValues("persistenceAdapter", new Object[] {new MemoryPersistenceAdapter(), new AMQPersistenceAdapter(), new JDBCPersistenceAdapter()});
-    }
-
-    public void testDeleteSameProducer() throws Exception {
-        connection = connectionFactory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination();
-
-        MessageProducer producer = session.createProducer(destination);
-        Message message = session.createTextMessage("Test Message");
-        producer.send(message);
-
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        Message received = consumer.receive(1000);
-        assertEquals(message, received);
-
-        ObjectName brokerViewMBeanName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
-        BrokerViewMBean brokerProxy = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerViewMBeanName, BrokerViewMBean.class, true);
-
-        brokerProxy.removeQueue(getDestinationString());
-
-
-        producer.send(message);
-
-        received = consumer.receive(1000);
-
-        assertNotNull("Message not received", received);
-        assertEquals(message, received);
-
-
-    }
-
-    public void testDelete() throws Exception {
-        // Send some messages
-        connection = connectionFactory.createConnection();
-        connection.setClientID(clientID);
-        connection.start();
-        Session session = connection.createSession(transacted, authMode);
-        destination = createDestination();
-        sendMessages(session, messageCount);
-
-        // Now get the QueueViewMBean and purge
-        ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-        QueueViewMBean queueProxy = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        ObjectName brokerViewMBeanName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
-        BrokerViewMBean brokerProxy = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerViewMBeanName, BrokerViewMBean.class, true);
-
-        long count = queueProxy.getQueueSize();
-        assertEquals("Queue size", count, messageCount);
-
-        brokerProxy.removeQueue(getDestinationString());
-
-        sendMessages(session, messageCount);
-
-        queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-        queueProxy = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        count = queueProxy.getQueueSize();
-        assertEquals("Queue size", count, messageCount);
-
-        queueProxy.purge();
-
-        // Queues have a special case once there are more than a thousand
-        // dead messages, make sure we hit that.
-        messageCount += 1000;
-        sendMessages(session, messageCount);
-
-        count = queueProxy.getQueueSize();
-        assertEquals("Queue size", count, messageCount);
-
-        brokerProxy.removeQueue(getDestinationString());
-
-        sendMessages(session, messageCount);
-
-        queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-        queueProxy = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
-
-        count = queueProxy.getQueueSize();
-        assertEquals("Queue size", count, messageCount);
-    }
-
-    private void sendMessages(Session session, int count) throws Exception {
-        MessageProducer producer = session.createProducer(destination);
-        for (int i = 0; i < messageCount; i++) {
-            Message message = session.createTextMessage("Message: " + i);
-            producer.send(message);
-        }
-    }
-
-    protected ObjectName assertRegisteredObjectName(String name) throws MalformedObjectNameException, NullPointerException {
-        ObjectName objectName = new ObjectName(name);
-        if (mbeanServer.isRegistered(objectName)) {
-            echo("Bean Registered: " + objectName);
-        } else {
-            fail("Could not find MBean!: " + objectName);
-        }
-        return objectName;
-    }
-
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:61616";
-        useTopic = false;
-        super.setUp();
-        mbeanServer = broker.getManagementContext().getMBeanServer();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setUseJmx(true);
-        answer.setEnableStatistics(true);
-        answer.addConnector(bindAddress);
-        answer.setPersistenceAdapter(persistenceAdapter);
-        answer.deleteAllMessages();
-        return answer;
-    }
-
-    protected void echo(String text) {
-        LOG.info(text);
-    }
-
-    /**
-     * Returns the name of the destination used in this test case
-     */
-    protected String getDestinationString() {
-        return getClass().getName() + "." + getName(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/message/security/MessageAuthenticationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/message/security/MessageAuthenticationTest.java
deleted file mode 100644
index 092c554..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/message/security/MessageAuthenticationTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.broker.message.security;
-
-import java.io.IOException;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.security.MessageAuthorizationPolicy;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.spring.ConsumerBean;
-
-/**
- * 
- */
-public class MessageAuthenticationTest extends EmbeddedBrokerTestSupport {
-
-    private Connection connection;
-
-    public void testSendInvalidMessage() throws Exception {
-        if (connection == null) {
-            connection = createConnection();
-        }
-        connection.start();
-
-        ConsumerBean messageList = new ConsumerBean();
-        messageList.setVerbose(true);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        Destination destination = new ActiveMQQueue("MyQueue");
-
-        MessageConsumer c1 = session.createConsumer(destination);
-
-        c1.setMessageListener(messageList);
-
-        MessageProducer producer = session.createProducer(destination);
-        assertNotNull(producer);
-
-        producer.send(createMessage(session, "invalidBody", "myHeader", "xyz"));
-        producer.send(createMessage(session, "validBody", "myHeader", "abc"));
-
-        messageList.assertMessagesArrived(1);
-        assertEquals("validBody", ((TextMessage) messageList.flushMessages().get(0)).getText());
-    }
-
-    private javax.jms.Message createMessage(Session session, String body, String header, String value) throws JMSException {
-        TextMessage msg = session.createTextMessage(body);
-        msg.setStringProperty(header, value);
-        return msg;
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.setMessageAuthorizationPolicy(new MessageAuthorizationPolicy() {
-            public boolean isAllowedToConsume(ConnectionContext context, Message message) {
-                try {
-                    Object value = message.getProperty("myHeader");
-                    return "abc".equals(value);
-                }
-                catch (IOException e) {
-                    System.out.println("Caught: " + e);
-                    e.printStackTrace();
-                    return false;
-                }
-            }
-        });
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/AbortSlowConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/AbortSlowConsumerTest.java
deleted file mode 100644
index 162e341..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/AbortSlowConsumerTest.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/**
- * 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.broker.policy;
-
-import junit.framework.Test;
-import org.apache.activemq.JmsMultipleClientsTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.AbortSlowConsumerStrategyViewMBean;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.Connection;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.TabularData;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.concurrent.TimeUnit;
-
-
-public class AbortSlowConsumerTest extends JmsMultipleClientsTestSupport implements ExceptionListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AbortSlowConsumerTest.class);
-
-    AbortSlowConsumerStrategy underTest;
-
-    public boolean abortConnection = false;
-    public long checkPeriod = 2 * 1000;
-    public long maxSlowDuration = 5 * 1000;
-
-    private List<Throwable> exceptions = new ArrayList<Throwable>();
-
-    @Override
-    protected void setUp() throws Exception {
-        exceptions.clear();
-        topic = true;
-        underTest = new AbortSlowConsumerStrategy();
-        super.setUp();
-        createDestination();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        PolicyEntry policy = new PolicyEntry();
-        underTest.setAbortConnection(abortConnection);
-        underTest.setCheckPeriod(checkPeriod);
-        underTest.setMaxSlowDuration(maxSlowDuration);
-
-        policy.setSlowConsumerStrategy(underTest);
-        policy.setQueuePrefetch(10);
-        policy.setTopicPrefetch(10);
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-        broker.setDestinationPolicy(pMap);
-        return broker;
-    }
-
-    public void testRegularConsumerIsNotAborted() throws Exception {
-        startConsumers(destination);
-        for (Connection c : connections) {
-            c.setExceptionListener(this);
-        }
-        startProducers(destination, 100);
-        allMessagesList.waitForMessagesToArrive(10);
-        allMessagesList.assertAtLeastMessagesReceived(10);
-    }
-
-    public void initCombosForTestLittleSlowConsumerIsNotAborted() {
-        addCombinationValues("topic", new Object[]{Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testLittleSlowConsumerIsNotAborted() throws Exception {
-        startConsumers(destination);
-        Entry<MessageConsumer, MessageIdList> consumertoAbort = consumers.entrySet().iterator().next();
-        consumertoAbort.getValue().setProcessingDelay(500);
-        for (Connection c : connections) {
-            c.setExceptionListener(this);
-        }
-        startProducers(destination, 12);
-        allMessagesList.waitForMessagesToArrive(10);
-        allMessagesList.assertAtLeastMessagesReceived(10);
-    }
-
-
-    public void initCombosForTestSlowConsumerIsAborted() {
-        addCombinationValues("abortConnection", new Object[]{Boolean.TRUE, Boolean.FALSE});
-        addCombinationValues("topic", new Object[]{Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testSlowConsumerIsAborted() throws Exception {
-        startConsumers(destination);
-        Entry<MessageConsumer, MessageIdList> consumertoAbort = consumers.entrySet().iterator().next();
-        consumertoAbort.getValue().setProcessingDelay(8 * 1000);
-        for (Connection c : connections) {
-            c.setExceptionListener(this);
-        }
-        startProducers(destination, 100);
-
-        consumertoAbort.getValue().assertMessagesReceived(1);
-
-        TimeUnit.SECONDS.sleep(5);
-
-        consumertoAbort.getValue().assertAtMostMessagesReceived(1);
-    }
-
-
-    public void testSlowConsumerIsAbortedViaJmx() throws Exception {
-        underTest.setMaxSlowDuration(60*1000); // so jmx does the abort
-        startConsumers(destination);
-        Entry<MessageConsumer, MessageIdList> consumertoAbort = consumers.entrySet().iterator().next();
-        consumertoAbort.getValue().setProcessingDelay(8 * 1000);
-        for (Connection c : connections) {
-            c.setExceptionListener(this);
-        }
-        startProducers(destination, 100);
-
-        consumertoAbort.getValue().assertMessagesReceived(1);
-
-        ActiveMQDestination amqDest = (ActiveMQDestination)destination;
-        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq:Type=" +
-                (amqDest.isTopic() ? "Topic" : "Queue") +",Destination="
-                + amqDest.getPhysicalName() + ",BrokerName=localhost");
-
-        QueueViewMBean queue = (QueueViewMBean) broker.getManagementContext().newProxyInstance(queueViewMBeanName, QueueViewMBean.class, true);
-        ObjectName slowConsumerPolicyMBeanName = queue.getSlowConsumerStrategy();
-
-        assertNotNull(slowConsumerPolicyMBeanName);
-
-        AbortSlowConsumerStrategyViewMBean abortPolicy = (AbortSlowConsumerStrategyViewMBean)
-                broker.getManagementContext().newProxyInstance(slowConsumerPolicyMBeanName, AbortSlowConsumerStrategyViewMBean.class, true);
-
-        TimeUnit.SECONDS.sleep(3);
-
-        TabularData slowOnes = abortPolicy.getSlowConsumers();
-        assertEquals("one slow consumers", 1, slowOnes.size());
-
-        LOG.info("slow ones:"  + slowOnes);
-
-        CompositeData slowOne = (CompositeData) slowOnes.values().iterator().next();
-        LOG.info("Slow one: " + slowOne);
-
-        assertTrue("we have an object name", slowOne.get("subscription") instanceof ObjectName);
-        abortPolicy.abortConsumer((ObjectName)slowOne.get("subscription"));
-
-        consumertoAbort.getValue().assertAtMostMessagesReceived(1);
-
-        slowOnes = abortPolicy.getSlowConsumers();
-        assertEquals("no slow consumers left", 0, slowOnes.size());
-
-    }
-
-
-    public void testOnlyOneSlowConsumerIsAborted() throws Exception {
-        consumerCount = 10;
-        startConsumers(destination);
-        Entry<MessageConsumer, MessageIdList> consumertoAbort = consumers.entrySet().iterator().next();
-        consumertoAbort.getValue().setProcessingDelay(8 * 1000);
-        for (Connection c : connections) {
-            c.setExceptionListener(this);
-        }
-        startProducers(destination, 100);
-
-        allMessagesList.waitForMessagesToArrive(99);
-        allMessagesList.assertAtLeastMessagesReceived(99);
-
-        consumertoAbort.getValue().assertMessagesReceived(1);
-
-        TimeUnit.SECONDS.sleep(5);
-
-        consumertoAbort.getValue().assertAtMostMessagesReceived(1);
-    }
-
-    public void testAbortAlreadyClosingConsumers() throws Exception {
-        consumerCount = 1;
-        startConsumers(destination);
-        for (MessageIdList list : consumers.values()) {
-            list.setProcessingDelay(6 * 1000);
-        }
-        for (Connection c : connections) {
-            c.setExceptionListener(this);
-        }
-        startProducers(destination, 100);
-        allMessagesList.waitForMessagesToArrive(consumerCount);
-
-        for (MessageConsumer consumer : consumers.keySet()) {
-            LOG.info("closing consumer: " + consumer);
-            /// will block waiting for on message till 6secs expire
-            consumer.close();
-        }
-    }
-
-    public void initCombosForTestAbortAlreadyClosedConsumers() {
-        addCombinationValues("abortConnection", new Object[]{Boolean.TRUE, Boolean.FALSE});
-        addCombinationValues("topic", new Object[]{Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testAbortAlreadyClosedConsumers() throws Exception {
-        Connection conn = createConnectionFactory().createConnection();
-        conn.setExceptionListener(this);
-        connections.add(conn);
-
-        Session sess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        final MessageConsumer consumer = sess.createConsumer(destination);
-        conn.start();
-        startProducers(destination, 20);
-        TimeUnit.SECONDS.sleep(1);
-        LOG.info("closing consumer: " + consumer);
-        consumer.close();
-
-        TimeUnit.SECONDS.sleep(5);
-        assertTrue("no exceptions : " + exceptions.toArray(), exceptions.isEmpty());
-    }
-
-
-    public void initCombosForTestAbortAlreadyClosedConnection() {
-        addCombinationValues("abortConnection", new Object[]{Boolean.TRUE, Boolean.FALSE});
-        addCombinationValues("topic", new Object[]{Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testAbortAlreadyClosedConnection() throws Exception {
-        Connection conn = createConnectionFactory().createConnection();
-        conn.setExceptionListener(this);
-
-        Session sess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        sess.createConsumer(destination);
-        conn.start();
-        startProducers(destination, 20);
-        TimeUnit.SECONDS.sleep(1);
-        LOG.info("closing connection: " + conn);
-        conn.close();
-
-        TimeUnit.SECONDS.sleep(5);
-        assertTrue("no exceptions : " + exceptions.toArray(), exceptions.isEmpty());
-    }
-
-    public void testAbortConsumerOnDeadConnection() throws Exception {
-        // socket proxy on pause, close could hang??
-    }
-
-    public void onException(JMSException exception) {
-        exceptions.add(exception);
-        exception.printStackTrace();
-    }
-
-    public static Test suite() {
-        return suite(AbortSlowConsumerTest.class);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java
deleted file mode 100644
index 6c31237..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.broker.policy;
-
-import javax.jms.Destination;
-import javax.jms.Message;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.RedeliveryPolicy;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class DeadLetterTest extends DeadLetterTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(DeadLetterTest.class);
-
-    protected int rollbackCount;
-
-    protected void doTest() throws Exception {
-        connection.start();
-
-        ActiveMQConnection amqConnection = (ActiveMQConnection) connection;
-        rollbackCount = amqConnection.getRedeliveryPolicy().getMaximumRedeliveries() + 1;
-        LOG.info("Will redeliver messages: " + rollbackCount + " times");
-
-        makeConsumer();
-        makeDlqConsumer();
-
-        sendMessages();
-
-        // now lets receive and rollback N times
-        for (int i = 0; i < messageCount; i++) {
-            consumeAndRollback(i);
-        }
-
-        for (int i = 0; i < messageCount; i++) {
-            Message msg = dlqConsumer.receive(1000);
-            assertMessage(msg, i);
-            assertNotNull("Should be a DLQ message for loop: " + i, msg);
-        }
-        session.commit();
-    }
-
-    protected void consumeAndRollback(int messageCounter) throws Exception {
-        for (int i = 0; i < rollbackCount; i++) {
-            Message message = consumer.receive(5000);
-            assertNotNull("No message received for message: " + messageCounter + " and rollback loop: " + i, message);
-            assertMessage(message, messageCounter);
-
-            session.rollback();
-        }
-        LOG.info("Rolled back: " + rollbackCount + " times");
-    }
-
-    protected void setUp() throws Exception {
-        transactedMode = true;
-        super.setUp();
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory answer = super.createConnectionFactory();
-        RedeliveryPolicy policy = new RedeliveryPolicy();
-        policy.setMaximumRedeliveries(3);
-        policy.setBackOffMultiplier((short) 1);
-        policy.setInitialRedeliveryDelay(10);
-        policy.setUseExponentialBackOff(false);
-        answer.setRedeliveryPolicy(policy);
-        return answer;
-    }
-
-    protected Destination createDlqDestination() {
-        return new ActiveMQQueue("ActiveMQ.DLQ");
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java
deleted file mode 100755
index 7b7aa7b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- * 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.broker.policy;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public abstract class DeadLetterTestSupport extends TestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(DeadLetterTestSupport.class);
-
-    protected int messageCount = 10;
-    protected long timeToLive;
-    protected Connection connection;
-    protected Session session;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected boolean durableSubscriber;
-    protected Destination dlqDestination;
-    protected MessageConsumer dlqConsumer;
-    protected QueueBrowser dlqBrowser;
-    protected BrokerService broker;
-    protected boolean transactedMode;
-    protected int acknowledgeMode = Session.CLIENT_ACKNOWLEDGE;
-    private Destination destination;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        broker = createBroker();
-        broker.start();
-        connection = createConnection();
-        connection.setClientID(createClientId());
-
-        session = connection.createSession(transactedMode, acknowledgeMode);
-        connection.start();
-    }
-
-    protected String createClientId() {
-        return toString();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected abstract void doTest() throws Exception;
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        PolicyEntry policy = new PolicyEntry();
-        DeadLetterStrategy defaultDeadLetterStrategy = policy.getDeadLetterStrategy();
-        if(defaultDeadLetterStrategy!=null) {
-            defaultDeadLetterStrategy.setProcessNonPersistent(true);
-        }
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-        broker.setDestinationPolicy(pMap);
-        return broker;
-    }
-
-    protected void makeConsumer() throws JMSException {
-        Destination destination = getDestination();
-        LOG.info("Consuming from: " + destination);
-        if (durableSubscriber) {
-            consumer = session.createDurableSubscriber((Topic)destination, destination.toString());
-        } else {
-            consumer = session.createConsumer(destination);
-        }
-    }
-
-    protected void makeDlqConsumer() throws JMSException {
-        dlqDestination = createDlqDestination();
-
-        LOG.info("Consuming from dead letter on: " + dlqDestination);
-        dlqConsumer = session.createConsumer(dlqDestination);
-    }
-    
-    protected void makeDlqBrowser() throws JMSException {
-        dlqDestination = createDlqDestination();
-
-        LOG.info("Browsing dead letter on: " + dlqDestination);
-        dlqBrowser = session.createBrowser((Queue)dlqDestination);    	
-    }
-
-    protected void sendMessages() throws JMSException {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(getDestination());
-        producer.setDeliveryMode(deliveryMode);
-        producer.setTimeToLive(timeToLive);
-
-        LOG.info("Sending " + messageCount + " messages to: " + getDestination());
-        for (int i = 0; i < messageCount; i++) {
-            Message message = createMessage(session, i);
-            producer.send(message);
-        }
-    }
-
-    protected TextMessage createMessage(Session session, int i) throws JMSException {
-        return session.createTextMessage(getMessageText(i));
-    }
-
-    protected String getMessageText(int i) {
-        return "message: " + i;
-    }
-
-    protected void assertMessage(Message message, int i) throws Exception {
-        LOG.info("Received message: " + message);
-        assertNotNull("No message received for index: " + i, message);
-        assertTrue("Should be a TextMessage not: " + message, message instanceof TextMessage);
-        TextMessage textMessage = (TextMessage)message;
-        assertEquals("text of message: " + i, getMessageText(i), textMessage.getText());
-    }
-
-    protected abstract Destination createDlqDestination();
-
-    public void testTransientTopicMessage() throws Exception {
-        super.topic = true;
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        durableSubscriber = true;
-        doTest();
-    }
-
-    public void testDurableTopicMessage() throws Exception {
-        super.topic = true;
-        deliveryMode = DeliveryMode.PERSISTENT;
-        durableSubscriber = true;
-        doTest();
-    }
-
-    public void testTransientQueueMessage() throws Exception {
-        super.topic = false;
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        durableSubscriber = false;
-        doTest();
-        validateConsumerPrefetch(this.getDestinationString(), 0);        
-    }
-        
-    public void testDurableQueueMessage() throws Exception {
-        super.topic = false;
-        deliveryMode = DeliveryMode.PERSISTENT;
-        durableSubscriber = false;
-        doTest();
-        validateConsumerPrefetch(this.getDestinationString(), 0);
-    }
-
-    public Destination getDestination() {
-        if (destination == null) {
-            destination = createDestination();
-        }
-        return destination;
-    }
-    
-    private void validateConsumerPrefetch(String destination, long expectedCount) {
-        RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker();
-        for (org.apache.activemq.broker.region.Destination dest : regionBroker.getQueueRegion().getDestinationMap().values()) {
-            if (dest.getName().equals(destination)) {
-                DestinationStatistics stats = dest.getDestinationStatistics();
-                LOG.info("inflight for : " + dest.getName() + ": " + stats.getInflight().getCount());
-                assertEquals("inflight for: " + dest.getName() + ": " + stats.getInflight().getCount() + " matches", 
-                        expectedCount, stats.getInflight().getCount());      
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DestinationCursorConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DestinationCursorConfigTest.java
deleted file mode 100644
index a5f7984..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DestinationCursorConfigTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.broker.policy;
-
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- * 
- */
-public class DestinationCursorConfigTest extends TestSupport {
-    protected BrokerService broker;
-
-    @Override
-    protected void setUp() throws Exception {
-        broker = createBroker();
-        super.setUp();  
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        broker.stop();
-        super.tearDown();    
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerFactoryBean factory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/broker/policy/cursor.xml"));
-        factory.afterPropertiesSet();
-        BrokerService answer = factory.getBroker();
-        return answer;
-    }
-
-    public void testQueueConfiguration() throws Exception {
-        super.topic = false;
-        ActiveMQDestination destination = (ActiveMQDestination) createDestination("org.apache.foo");
-        PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-        PendingQueueMessageStoragePolicy policy = entry.getPendingQueuePolicy();
-        assertNotNull(policy);
-        assertTrue("Policy is: " + policy, policy instanceof VMPendingQueueMessageStoragePolicy);
-    }
-
-    public void testTopicConfiguration() throws Exception {
-        super.topic = true;
-        ActiveMQDestination destination = (ActiveMQDestination) createDestination("org.apache.foo");
-        PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
-        PendingSubscriberMessageStoragePolicy policy = entry.getPendingSubscriberPolicy();
-        assertNotNull(policy);
-        assertFalse(entry.isProducerFlowControl());
-        assertTrue(entry.getMemoryLimit()==(1024*1024));
-        assertTrue("subscriberPolicy is: " + policy, policy instanceof VMPendingSubscriberMessageStoragePolicy);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java
deleted file mode 100644
index e686c7c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.broker.policy;
-
-import java.util.Enumeration;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.IndividualDeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class IndividualDeadLetterTest extends DeadLetterTest {
-    private static final Logger LOG = LoggerFactory.getLogger(IndividualDeadLetterTest.class);
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-
-        PolicyEntry policy = new PolicyEntry();
-        DeadLetterStrategy strategy = new IndividualDeadLetterStrategy();
-        strategy.setProcessNonPersistent(true);
-        policy.setDeadLetterStrategy(strategy);
-
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        broker.setDestinationPolicy(pMap);
-
-        return broker;
-    }
-
-    protected Destination createDlqDestination() {
-        String prefix = topic ? "ActiveMQ.DLQ.Topic." : "ActiveMQ.DLQ.Queue.";
-        return new ActiveMQQueue(prefix + getClass().getName() + "." + getName());
-    }
-    
-    public void testDLQBrowsing() throws Exception {
-        super.topic = false;
-        deliveryMode = DeliveryMode.PERSISTENT;
-        durableSubscriber = false;
-        messageCount = 1;
-
-        connection.start();
-
-        ActiveMQConnection amqConnection = (ActiveMQConnection) connection;
-        rollbackCount = amqConnection.getRedeliveryPolicy().getMaximumRedeliveries() + 1;
-        LOG.info("Will redeliver messages: " + rollbackCount + " times");
-
-        sendMessages();
-
-        // now lets receive and rollback N times
-        for (int i = 0; i < rollbackCount; i++) {
-            makeConsumer();
-            Message message = consumer.receive(5000);
-            assertNotNull("No message received: ", message);
-
-            session.rollback();
-            LOG.info("Rolled back: " + rollbackCount + " times");
-            consumer.close();
-        }
-
-        makeDlqBrowser();
-        browseDlq();
-        dlqBrowser.close();
-        session.close();
-        Thread.sleep(1000);
-        session = connection.createSession(transactedMode, acknowledgeMode);
-        Queue testQueue = new ActiveMQQueue("ActiveMQ.DLQ.Queue.ActiveMQ.DLQ.Queue." + getClass().getName() + "." + getName());
-        MessageConsumer testConsumer = session.createConsumer(testQueue);
-        assertNull("The message shouldn't be sent to another DLQ", testConsumer.receive(1000));
-
-    }
-    
-    protected void browseDlq() throws Exception {
-        Enumeration messages = dlqBrowser.getEnumeration();
-        while (messages.hasMoreElements()) {
-            LOG.info("Browsing: " + messages.nextElement());
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java
deleted file mode 100644
index 6dd87c2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.broker.policy;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- *
- * 
- */
-public class IndividualDeadLetterViaXmlTest extends DeadLetterTest {
-    private static final Logger LOG = LoggerFactory.getLogger(IndividualDeadLetterViaXmlTest.class);
-
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerFactoryBean factory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/broker/policy/individual-dlq.xml"));
-        factory.afterPropertiesSet();
-        BrokerService answer = factory.getBroker();
-        return answer;
-    }
-
-    protected Destination createDlqDestination() {
-        String queueName = "Test.DLQ." + getClass().getName() + "." + getName();
-        LOG.info("Using queue name: " + queueName);
-        return new ActiveMQQueue(queueName);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java
deleted file mode 100644
index b91f5a8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * 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.broker.policy;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.RedeliveryPolicy;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MessageListenerDeadLetterTest extends DeadLetterTestSupport {
-    private static final Logger LOG = LoggerFactory
-            .getLogger(MessageListenerDeadLetterTest.class);
-
-    private int rollbackCount;
-
-    private Session dlqSession;
-
-    private final Error[] error = new Error[1];
-
-    protected void doTest() throws Exception {
-        messageCount = 200;
-        connection.start();
-
-        ActiveMQConnection amqConnection = (ActiveMQConnection) connection;
-        rollbackCount = amqConnection.getRedeliveryPolicy().getMaximumRedeliveries() + 1;
-        LOG.info("Will redeliver messages: " + rollbackCount + " times");
-
-        makeConsumer();
-        makeDlqConsumer();
-
-        sendMessages();
-
-        // now lets receive and rollback N times
-        int maxRollbacks = messageCount * rollbackCount;
-        consumer.setMessageListener(new RollbackMessageListener(maxRollbacks, rollbackCount));
-
-        for (int i = 0; i < messageCount; i++) {
-            Message msg = dlqConsumer.receive(4000);
-            if (error[0] != null) {
-                // error from message listener
-                throw error[0];
-            }
-            assertMessage(msg, i);
-            assertNotNull("Should be a DLQ message for loop: " + i, msg);
-        }
-        if (error[0] != null) {
-            throw error[0];
-        }
-    }
-
-    protected void makeDlqConsumer() throws JMSException {
-        dlqDestination = createDlqDestination();
-
-        LOG.info("Consuming from dead letter on: " + dlqDestination);
-        dlqConsumer = dlqSession.createConsumer(dlqDestination);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        transactedMode = true;
-        super.setUp();
-        dlqSession = connection.createSession(transactedMode, acknowledgeMode);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        dlqConsumer.close();
-        dlqSession.close();
-        session.close();
-        super.tearDown();
-    };
-
-    protected ActiveMQConnectionFactory createConnectionFactory()
-            throws Exception {
-        ActiveMQConnectionFactory answer = super.createConnectionFactory();
-        RedeliveryPolicy policy = new RedeliveryPolicy();
-        policy.setMaximumRedeliveries(3);
-        policy.setBackOffMultiplier((short) 1);
-        policy.setRedeliveryDelay(0);
-        policy.setInitialRedeliveryDelay(0);
-        policy.setUseExponentialBackOff(false);
-        answer.setRedeliveryPolicy(policy);
-        return answer;
-    }
-
-    protected Destination createDlqDestination() {
-        return new ActiveMQQueue("ActiveMQ.DLQ");
-    }
-
-    class RollbackMessageListener implements MessageListener {
-
-        final int maxRollbacks;
-
-        final int deliveryCount;
-
-        AtomicInteger rollbacks = new AtomicInteger();
-
-        RollbackMessageListener(int c, int delvery) {
-            maxRollbacks = c;
-            deliveryCount = delvery;
-        }
-
-        public void onMessage(Message message) {
-            try {
-                int expectedMessageId = rollbacks.get() / deliveryCount;
-                LOG.info("expecting messageId: " + expectedMessageId);
-                assertMessage(message, expectedMessageId);
-                if (rollbacks.incrementAndGet() > maxRollbacks) {
-                    fail("received too many messages, already done too many rollbacks: "
-                            + rollbacks);
-                }
-                session.rollback();
-
-            } catch (Throwable e) {
-                LOG.error("unexpected exception:" + e, e);
-                // propagating assertError to execution task will cause a hang
-                // at shutdown
-                if (e instanceof Error) {
-                    error[0] = (Error) e;
-                } else {
-                    fail("unexpected exception: " + e);
-                }
-
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java
deleted file mode 100644
index bbc87a5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.broker.policy;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.advisory.AdvisorySupport;
-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.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * 
- */
-public class NoConsumerDeadLetterTest extends DeadLetterTestSupport {
-
-    // lets disable the inapplicable tests
-    public void testDurableQueueMessage() throws Exception {
-    }
-
-    public void testDurableTopicMessage() throws Exception {
-    }
-
-    protected void doTest() throws Exception {
-        makeDlqConsumer();
-        sendMessages();
-
-        for (int i = 0; i < messageCount; i++) {
-            Message msg = dlqConsumer.receive(1000);
-            assertNotNull("Should be a message for loop: " + i, msg);
-        }
-    }
-    
-    public void testConsumerReceivesMessages() throws Exception {
-    	this.topic = false;
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        connection = (ActiveMQConnection)factory.createConnection();
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(getDestination());
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-   
-        Topic advisoryTopic = AdvisorySupport.getNoQueueConsumersAdvisoryTopic(getDestination());
-        MessageConsumer advisoryConsumer = session.createConsumer(advisoryTopic);
-        
-        TextMessage msg = session.createTextMessage("Message: x");
-        producer.send(msg);
-        
-        Message advisoryMessage = advisoryConsumer.receive(1000);
-        assertNotNull("Advisory message not received", advisoryMessage);
-        
-        Thread.sleep(1000);
-        
-        factory = (ActiveMQConnectionFactory)createConnectionFactory();
-        connection = (ActiveMQConnection)factory.createConnection();
-        connection.start();
-        
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        MessageConsumer consumer = session.createConsumer(getDestination());
-        Message received = consumer.receive(1000);
-        assertNotNull("Message not received", received);
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-
-        PolicyEntry policy = new PolicyEntry();
-        policy.setSendAdvisoryIfNoConsumers(true);
-
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        broker.setDestinationPolicy(pMap);
-
-        return broker;
-    }
-
-    protected Destination createDlqDestination() {
-    	if (this.topic) {
-    		return AdvisorySupport.getNoTopicConsumersAdvisoryTopic((ActiveMQDestination)getDestination());
-    	} else {
-    		return AdvisorySupport.getNoQueueConsumersAdvisoryTopic((ActiveMQDestination)getDestination());
-    	}
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoRetryDeadLetterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoRetryDeadLetterTest.java
deleted file mode 100644
index 7421245..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoRetryDeadLetterTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.broker.policy;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.RedeliveryPolicy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NoRetryDeadLetterTest extends DeadLetterTest {
-    private static final Logger LOG = LoggerFactory.getLogger(NoRetryDeadLetterTest.class);
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory connectionFactory = super.createConnectionFactory();
-        RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
-        redeliveryPolicy.setMaximumRedeliveries(0);
-        connectionFactory.setRedeliveryPolicy(redeliveryPolicy);
-        return connectionFactory;
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/PerDurableConsumerDeadLetterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/PerDurableConsumerDeadLetterTest.java
deleted file mode 100644
index 369d29f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/PerDurableConsumerDeadLetterTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.broker.policy;
-
-import java.util.Enumeration;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.IndividualDeadLetterStrategy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * for durable subs, allow a dlq per subscriber such that poison messages are not duplicates
- * on the dlq and such that rejecting consumers can be identified
- * https://issues.apache.org/jira/browse/AMQ-3003
- */
-public class PerDurableConsumerDeadLetterTest extends DeadLetterTest {
-    private static final Logger LOG = LoggerFactory.getLogger(PerDurableConsumerDeadLetterTest.class);
-
-    private static final String CLIENT_ID = "george";
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-
-        PolicyEntry policy = new PolicyEntry();
-        IndividualDeadLetterStrategy strategy = new IndividualDeadLetterStrategy();
-        strategy.setProcessNonPersistent(true);
-        strategy.setDestinationPerDurableSubscriber(true);
-        policy.setDeadLetterStrategy(strategy);
-
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        broker.setDestinationPolicy(pMap);
-
-        return broker;
-    }
-
-    protected String createClientId() {
-        return CLIENT_ID;
-    }
-
-    protected Destination createDlqDestination() {
-        String prefix = topic ? "ActiveMQ.DLQ.Topic." : "ActiveMQ.DLQ.Queue.";
-        String destinationName = prefix + getClass().getName() + "." + getName();
-        if (durableSubscriber) {
-            String subName = // connectionId:SubName
-                CLIENT_ID + ":" + getDestination().toString();
-            destinationName += "." + subName ;
-        }
-        return new ActiveMQQueue(destinationName);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/PriorityNetworkDispatchPolicyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/PriorityNetworkDispatchPolicyTest.java
deleted file mode 100644
index 66e77ec..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/PriorityNetworkDispatchPolicyTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.broker.policy;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.TopicSubscription;
-import org.apache.activemq.broker.region.policy.PriorityNetworkDispatchPolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.usage.SystemUsage;
-import org.junit.Before;
-import org.junit.Test;
-
-
-import static org.junit.Assert.assertEquals;
-
-public class PriorityNetworkDispatchPolicyTest {
-
-    PriorityNetworkDispatchPolicy underTest = new PriorityNetworkDispatchPolicy();
-    SystemUsage usageManager = new SystemUsage();
-    ConsumerInfo info = new ConsumerInfo();
-    ActiveMQMessage node = new ActiveMQMessage();
-    ConsumerId id = new ConsumerId();
-    ConnectionContext context = new ConnectionContext();
-
-    @Before
-    public void init() throws Exception {
-        info.setDestination(ActiveMQDestination.createDestination("test", ActiveMQDestination.TOPIC_TYPE));
-        info.setConsumerId(id);
-        info.setNetworkSubscription(true);
-        info.setNetworkConsumerPath(new ConsumerId[]{id});
-    }
-
-    @Test
-    public void testRemoveLowerPriorityDup() throws Exception {
-        List<Subscription> consumers = new ArrayList<Subscription>();
-
-        for (int i=0; i<3; i++) {
-            ConsumerInfo instance = info.copy();
-            instance.setPriority((byte)i);
-            consumers.add(new TopicSubscription(null, context, instance, usageManager));
-        }
-        underTest.dispatch(node, null, consumers);
-
-        long count = 0;
-        for (Subscription consumer : consumers) {
-            count += consumer.getEnqueueCounter();
-        }
-        assertEquals("only one sub got message", 1, count);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java
deleted file mode 100644
index e966f74..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.broker.policy;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.QueueSubscriptionTest;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy;
-
-public class RoundRobinDispatchPolicyTest extends QueueSubscriptionTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-
-        PolicyEntry policy = new PolicyEntry();
-        policy.setDispatchPolicy(new RoundRobinDispatchPolicy());
-
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        broker.setDestinationPolicy(pMap);
-
-        return broker;
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesOnePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersSmallMessagesOnePrefetch();
-
-        // Ensure that each consumer should have received at least one message
-        // We cannot guarantee that messages will be equally divided, since
-        // prefetch is one
-        assertEachConsumerReceivedAtLeastXMessages(1);
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesLargePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersSmallMessagesLargePrefetch();
-        assertMessagesDividedAmongConsumers();
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesOnePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersLargeMessagesOnePrefetch();
-
-        // Ensure that each consumer should have received at least one message
-        // We cannot guarantee that messages will be equally divided, since
-        // prefetch is one
-        assertEachConsumerReceivedAtLeastXMessages(1);
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesLargePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersLargeMessagesLargePrefetch();
-        assertMessagesDividedAmongConsumers();
-    }
-
-    public void testOneProducerManyConsumersFewMessages() throws Exception {
-        super.testOneProducerManyConsumersFewMessages();
-
-        // Since there are more consumers, each consumer should have received at
-        // most one message only
-        assertMessagesDividedAmongConsumers();
-    }
-
-    public void testOneProducerManyConsumersManyMessages() throws Exception {
-        super.testOneProducerManyConsumersManyMessages();
-        assertMessagesDividedAmongConsumers();
-    }
-
-    public void testManyProducersManyConsumers() throws Exception {
-        super.testManyProducersManyConsumers();
-        assertMessagesDividedAmongConsumers();
-    }
-
-    public void testOneProducerTwoMatchingConsumersOneNotMatchingConsumer() throws Exception {
-        // Create consumer that won't consume any message
-        createMessageConsumer(createConnectionFactory().createConnection(), createDestination(), "JMSPriority<1");
-        super.testOneProducerTwoConsumersSmallMessagesLargePrefetch();
-        assertMessagesDividedAmongConsumers();
-    }
-
-    protected MessageConsumer createMessageConsumer(Connection conn, Destination dest, String selector) throws Exception {
-        connections.add(conn);
-
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final MessageConsumer consumer = sess.createConsumer(dest, selector);
-        conn.start();
-
-        return consumer;
-    }
-
-    public void assertMessagesDividedAmongConsumers() {
-        assertEachConsumerReceivedAtLeastXMessages((messageCount * producerCount) / consumerCount);
-        assertEachConsumerReceivedAtMostXMessages(((messageCount * producerCount) / consumerCount) + 1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/SimpleDispatchPolicyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/SimpleDispatchPolicyTest.java
deleted file mode 100644
index 0ca4029..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/SimpleDispatchPolicyTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.broker.policy;
-
-import java.util.Iterator;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.QueueSubscriptionTest;
-import org.apache.activemq.broker.region.policy.FixedCountSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.SimpleDispatchPolicy;
-import org.apache.activemq.util.MessageIdList;
-
-public class SimpleDispatchPolicyTest extends QueueSubscriptionTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-
-        PolicyEntry policy = new PolicyEntry();
-        policy.setDispatchPolicy(new SimpleDispatchPolicy());
-        policy.setSubscriptionRecoveryPolicy(new FixedCountSubscriptionRecoveryPolicy());
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        broker.setDestinationPolicy(pMap);
-
-        return broker;
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesLargePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersSmallMessagesLargePrefetch();
-
-        // One consumer should have received all messages, and the rest none
-       // assertOneConsumerReceivedAllMessages(messageCount);
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesLargePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersLargeMessagesLargePrefetch();
-
-        // One consumer should have received all messages, and the rest none
-       // assertOneConsumerReceivedAllMessages(messageCount);
-    }
-
-    public void assertOneConsumerReceivedAllMessages(int messageCount) throws Exception {
-        boolean found = false;
-        for (Iterator i = consumers.keySet().iterator(); i.hasNext();) {
-            MessageIdList messageIdList = (MessageIdList)consumers.get(i.next());
-            int count = messageIdList.getMessageCount();
-            if (count > 0) {
-                if (found) {
-                    fail("No other consumers should have received any messages");
-                } else {
-                    assertEquals("Consumer should have received all messages.", messageCount, count);
-                    found = true;
-                }
-            }
-        }
-
-        if (!found) {
-            fail("At least one consumer should have received all messages");
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/StrictOrderDispatchPolicyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/StrictOrderDispatchPolicyTest.java
deleted file mode 100644
index 145a542..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/StrictOrderDispatchPolicyTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.broker.policy;
-
-import java.util.Iterator;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TopicSubscriptionTest;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.StrictOrderDispatchPolicy;
-import org.apache.activemq.util.MessageIdList;
-
-public class StrictOrderDispatchPolicyTest extends TopicSubscriptionTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-
-        PolicyEntry policy = new PolicyEntry();
-        policy.setDispatchPolicy(new StrictOrderDispatchPolicy());
-
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        broker.setDestinationPolicy(pMap);
-
-        return broker;
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesOnePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersLargeMessagesOnePrefetch();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesOnePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersSmallMessagesOnePrefetch();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void testOneProducerTwoConsumersSmallMessagesLargePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersSmallMessagesLargePrefetch();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void testOneProducerTwoConsumersLargeMessagesLargePrefetch() throws Exception {
-        super.testOneProducerTwoConsumersLargeMessagesLargePrefetch();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void testOneProducerManyConsumersFewMessages() throws Exception {
-        super.testOneProducerManyConsumersFewMessages();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void testOneProducerManyConsumersManyMessages() throws Exception {
-        super.testOneProducerManyConsumersManyMessages();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void testManyProducersOneConsumer() throws Exception {
-        super.testManyProducersOneConsumer();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void testManyProducersManyConsumers() throws Exception {
-        super.testManyProducersManyConsumers();
-
-        assertReceivedMessagesAreOrdered();
-    }
-
-    public void assertReceivedMessagesAreOrdered() throws Exception {
-        // If there is only one consumer, messages is definitely ordered
-        if (consumers.size() <= 1) {
-            return;
-        }
-
-        // Get basis of order
-        Iterator i = consumers.keySet().iterator();
-        MessageIdList messageOrder = (MessageIdList)consumers.get(i.next());
-
-        for (; i.hasNext();) {
-            MessageIdList messageIdList = (MessageIdList)consumers.get(i.next());
-            assertTrue("Messages are not ordered.", messageOrder.equals(messageIdList));
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java
deleted file mode 100644
index c8194bc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.broker.region;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-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.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-
-public class DestinationGCTest extends EmbeddedBrokerTestSupport {
-
-    ActiveMQQueue queue = new ActiveMQQueue("TEST");
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.setDestinations(new ActiveMQDestination[] {queue});
-        broker.setSchedulePeriodForDestinationPurge(1000);
-        PolicyEntry entry = new PolicyEntry();
-        entry.setGcInactiveDestinations(true);
-        entry.setInactiveTimoutBeforeGC(3000);
-        PolicyMap map = new PolicyMap();
-        map.setDefaultEntry(entry);
-        broker.setDestinationPolicy(map);
-        return broker;
-    }
-
-    public void testDestinationGc() throws Exception {
-        assertEquals(1, broker.getAdminView().getQueues().length);
-        Thread.sleep(7000);
-        assertEquals(0, broker.getAdminView().getQueues().length);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/DestinationRemoveRestartTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/DestinationRemoveRestartTest.java
deleted file mode 100644
index 06011fe..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/DestinationRemoveRestartTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.broker.region;
-
-import junit.framework.Test;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-
-// from https://issues.apache.org/activemq/browse/AMQ-2216
-public class DestinationRemoveRestartTest extends CombinationTestSupport {
-    private final static String destinationName = "TEST";
-    public byte destinationType = ActiveMQDestination.QUEUE_TYPE;
-    BrokerService broker;
-
-    @Override
-    protected void setUp() throws Exception {
-        broker = createBroker();
-    }
-
-    private BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(false);
-        broker.setPersistent(true);
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.start();
-        return broker;
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    public void initCombosForTestCheckDestinationRemoveActionAfterRestart() {
-        addCombinationValues("destinationType", new Object[]{Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
-                Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-    
-    public void testCheckDestinationRemoveActionAfterRestart() throws Exception {
-        doAddDestination();
-        doRemoveDestination();
-        broker.stop();
-        broker.waitUntilStopped();
-        broker = createBroker();
-        doCheckRemoveActionAfterRestart();
-    }
-
-    public void doAddDestination() throws Exception {
-        boolean res = false;
-        
-        ActiveMQDestination amqDestination = 
-            ActiveMQDestination.createDestination(destinationName, destinationType);
-        broker.getRegionBroker().addDestination(broker.getAdminConnectionContext(), amqDestination,true);
-        
-        final ActiveMQDestination[] list = broker.getRegionBroker().getDestinations();
-        for (final ActiveMQDestination element : list) {
-            final Destination destination = broker.getDestination(element);
-            if (destination.getActiveMQDestination().getPhysicalName().equals(destinationName)) {                  
-                res = true;
-                break;
-            }
-        }
-        
-        assertTrue("Adding destination Failed", res);        
-    }
-    
-    public void doRemoveDestination() throws Exception {
-        boolean res = true;
-        
-        broker.removeDestination(ActiveMQDestination.createDestination(destinationName, destinationType));
-        final ActiveMQDestination[] list = broker.getRegionBroker().getDestinations();
-        for (final ActiveMQDestination element : list) {
-            final Destination destination = broker.getDestination(element);
-            if (destination.getActiveMQDestination().getPhysicalName().equals(destinationName)) {                  
-                res = false;
-                break;
-            }
-        }
-        
-        assertTrue("Removing destination Failed", res);      
-    }
-    
-    
-    public void doCheckRemoveActionAfterRestart() throws Exception {
-        boolean res = true;
-        
-        final ActiveMQDestination[] list = broker.getRegionBroker().getDestinations();
-        for (final ActiveMQDestination element : list) {
-            final Destination destination = broker.getDestination(element);
-            if (destination.getActiveMQDestination().getPhysicalName().equals(destinationName)) {                  
-                res = false;
-                break;
-            }
-        }
-        
-        assertTrue("The removed destination is reloaded after restart !", res);
-    }
-    
-    public static Test suite() {
-        return suite(DestinationRemoveRestartTest.class);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java
deleted file mode 100644
index 1fe61be..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.InvalidSelectorException;
-import javax.management.ObjectName;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.state.ProducerState;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.thread.TaskRunnerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author gtully
- * @see https://issues.apache.org/activemq/browse/AMQ-2020
- **/
-public class QueueDuplicatesFromStoreTest extends TestCase {
-    private static final Logger LOG = LoggerFactory
-            .getLogger(QueueDuplicatesFromStoreTest.class);
-
-    ActiveMQQueue destination = new ActiveMQQueue("queue-"
-            + QueueDuplicatesFromStoreTest.class.getSimpleName());
-    BrokerService brokerService;
-
-    final static String mesageIdRoot = "11111:22222:";
-    final int messageBytesSize = 256;
-    final String text = new String(new byte[messageBytesSize]);
-
-    final int ackStartIndex = 100;
-    final int ackWindow = 50;
-    final int ackBatchSize = 50;
-    final int fullWindow = 200;
-    protected int count = 20000;
-
-    public void setUp() throws Exception {
-        brokerService = createBroker();
-        brokerService.setUseJmx(false);
-        brokerService.deleteAllMessages();
-        brokerService.start();        
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return new BrokerService();
-    }
-
-	public void tearDown() throws Exception {
-        brokerService.stop();
-    }
-
-    public void testNoDuplicateAfterCacheFullAndAckedWithLargeAuditDepth() throws Exception {
-        doTestNoDuplicateAfterCacheFullAndAcked(1024*10);
-    }
-
-    public void testNoDuplicateAfterCacheFullAndAckedWithSmallAuditDepth() throws Exception {
-        doTestNoDuplicateAfterCacheFullAndAcked(512);
-    }
-
-    public void doTestNoDuplicateAfterCacheFullAndAcked(final int auditDepth) throws Exception {
-        final PersistenceAdapter persistenceAdapter =  brokerService.getPersistenceAdapter();
-        final MessageStore queueMessageStore = 
-            persistenceAdapter.createQueueMessageStore(destination);
-        final ConnectionContext contextNotInTx = new ConnectionContext();
-        final ConsumerInfo consumerInfo = new ConsumerInfo();
-        final DestinationStatistics destinationStatistics = new DestinationStatistics();
-        consumerInfo.setExclusive(true);
-        final Queue queue = new Queue(brokerService, destination,
-                queueMessageStore, destinationStatistics, brokerService.getTaskRunnerFactory());
-
-        // a workaround for this issue
-        // queue.setUseCache(false);
-        queue.systemUsage.getMemoryUsage().setLimit(1024 * 1024 * 10);
-        queue.setMaxAuditDepth(auditDepth);
-        queue.initialize();
-        queue.start();
-       
-
-        ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
-        ProducerInfo producerInfo = new ProducerInfo();
-        ProducerState producerState = new ProducerState(producerInfo);
-        producerExchange.setProducerState(producerState);
-        producerExchange.setConnectionContext(contextNotInTx);
-
-        final CountDownLatch receivedLatch = new CountDownLatch(count);
-        final AtomicLong ackedCount = new AtomicLong(0);
-        final AtomicLong enqueueCounter = new AtomicLong(0);
-        final Vector<String> errors = new Vector<String>();
-                
-        // populate the queue store, exceed memory limit so that cache is disabled
-        for (int i = 0; i < count; i++) {
-            Message message = getMessage(i);
-            queue.send(producerExchange, message);
-        }
-
-        assertEquals("store count is correct", count, queueMessageStore.getMessageCount());
-        
-        // pull from store in small windows
-        Subscription subscription = new Subscription() {
-
-            public void add(MessageReference node) throws Exception {
-                if (enqueueCounter.get() != node.getMessageId().getProducerSequenceId()) {
-                    errors.add("Not in sequence at: " + enqueueCounter.get() + ", received: "
-                            + node.getMessageId().getProducerSequenceId());
-                }
-                assertEquals("is in order", enqueueCounter.get(), node
-                        .getMessageId().getProducerSequenceId());
-                receivedLatch.countDown();
-                enqueueCounter.incrementAndGet();
-                node.decrementReferenceCount();
-            }
-
-            public void add(ConnectionContext context, Destination destination)
-                    throws Exception {
-            }
-
-            public int countBeforeFull() {
-                if (isFull()) {
-                    return 0;
-                } else {
-                    return fullWindow - (int) (enqueueCounter.get() - ackedCount.get());
-                }
-            }
-
-            public void destroy() {
-            };
-
-            public void gc() {
-            }
-
-            public ConsumerInfo getConsumerInfo() {
-                return consumerInfo;
-            }
-
-            public ConnectionContext getContext() {
-                return null;
-            }
-
-            public long getDequeueCounter() {
-                return 0;
-            }
-
-            public long getDispatchedCounter() {
-                return 0;
-            }
-
-            public int getDispatchedQueueSize() {
-                return 0;
-            }
-
-            public long getEnqueueCounter() {
-                return 0;
-            }
-
-            public int getInFlightSize() {
-                return 0;
-            }
-
-            public int getInFlightUsage() {
-                return 0;
-            }
-
-            public ObjectName getObjectName() {
-                return null;
-            }
-
-            public int getPendingQueueSize() {
-                return 0;
-            }
-
-            public int getPrefetchSize() {
-                return 0;
-            }
-
-            public String getSelector() {
-                return null;
-            }
-
-            public boolean isBrowser() {
-                return false;
-            }
-
-            public boolean isFull() {
-                return (enqueueCounter.get() - ackedCount.get()) >= fullWindow;
-            }
-
-            public boolean isHighWaterMark() {
-                return false;
-            }
-
-            public boolean isLowWaterMark() {
-                return false;
-            }
-
-            public boolean isRecoveryRequired() {
-                return false;
-            }
-
-            public boolean isSlave() {
-                return false;
-            }
-
-            public boolean matches(MessageReference node,
-                    MessageEvaluationContext context) throws IOException {
-                return true;
-            }
-
-            public boolean matches(ActiveMQDestination destination) {
-                return true;
-            }
-
-            public void processMessageDispatchNotification(
-                    MessageDispatchNotification mdn) throws Exception {
-            }
-
-            public Response pullMessage(ConnectionContext context,
-                    MessagePull pull) throws Exception {
-                return null;
-            }
-
-            public List<MessageReference> remove(ConnectionContext context,
-                    Destination destination) throws Exception {
-                return null;
-            }
-
-            public void setObjectName(ObjectName objectName) {
-            }
-
-            public void setSelector(String selector)
-                    throws InvalidSelectorException,
-                    UnsupportedOperationException {
-            }
-
-            public void updateConsumerPrefetch(int newPrefetch) {
-            }
-
-            public boolean addRecoveredMessage(ConnectionContext context,
-                    MessageReference message) throws Exception {
-                return false;
-            }
-
-            public ActiveMQDestination getActiveMQDestination() {
-                return destination;
-            }
-
-            public void acknowledge(ConnectionContext context, MessageAck ack)
-                    throws Exception {
-            }
-
-			public int getCursorMemoryHighWaterMark(){
-				return 0;
-			}
-
-			public void setCursorMemoryHighWaterMark(
-			        int cursorMemoryHighWaterMark) {				
-			}
-
-            public boolean isSlowConsumer() {
-                return false;
-            }
-
-            public void unmatched(MessageReference node) throws IOException {
-            }
-        };
-
-        queue.addSubscription(contextNotInTx, subscription);
-        int removeIndex = 0;
-        do {
-            // Simulate periodic acks in small but recent windows
-            long receivedCount = enqueueCounter.get();
-            if (receivedCount > ackStartIndex) {
-                if (receivedCount >= removeIndex + ackWindow) {
-                    for (int j = 0; j < ackBatchSize; j++, removeIndex++) {
-                        ackedCount.incrementAndGet();
-                        MessageAck ack = new MessageAck();
-                        ack.setLastMessageId(new MessageId(mesageIdRoot
-                                + removeIndex));
-                        ack.setMessageCount(1);
-                        queue.removeMessage(contextNotInTx, subscription,
-                                new IndirectMessageReference(
-                                        getMessage(removeIndex)), ack);
-                        queue.wakeup();
-
-                    }
-                    if (removeIndex % 1000 == 0) {
-                        LOG.info("acked: " + removeIndex);
-                        persistenceAdapter.checkpoint(true);
-                    }
-                }
-            }
-
-        } while (!receivedLatch.await(0, TimeUnit.MILLISECONDS) && errors.isEmpty());
-
-        assertTrue("There are no errors: " + errors, errors.isEmpty());
-        assertEquals(count, enqueueCounter.get());
-        assertEquals("store count is correct", count - removeIndex,
-                queueMessageStore.getMessageCount());
-    }
-
-    private Message getMessage(int i) throws Exception {
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-        message.setMessageId(new MessageId(mesageIdRoot + i));
-        message.setDestination(destination);
-        message.setPersistent(true);
-        message.setResponseRequired(true);
-        message.setText("Msg:" + i + " " + text);
-        assertEquals(message.getMessageId().getProducerSequenceId(), i);
-        return message;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java
deleted file mode 100644
index 17ce303..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.broker.region;
-
-import java.io.File;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class QueuePurgeTest extends CombinationTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(QueuePurgeTest.class);
-    private static final int NUM_TO_SEND = 40000;
-    private final String MESSAGE_TEXT = new String(new byte[1024]);
-    BrokerService broker;
-    ConnectionFactory factory;
-    Connection connection;
-    Session session;
-    Queue queue;
-    MessageConsumer consumer;
-
-    protected void setUp() throws Exception {
-        setMaxTestTime(10*60*1000); // 10 mins
-        setAutoFail(true);
-        super.setUp();
-        broker = new BrokerService();
-
-        File testDataDir = new File("target/activemq-data/QueuePurgeTest");
-        broker.setDataDirectoryFile(testDataDir);
-        broker.setUseJmx(true);
-        broker.setDeleteAllMessagesOnStartup(true);
-        KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter();
-        persistenceAdapter.setDirectory(new File(testDataDir, "kahadb"));
-        broker.setPersistenceAdapter(persistenceAdapter);
-        broker.addConnector("tcp://localhost:0");
-        broker.start();
-        factory = new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri().toString());
-        connection = factory.createConnection();
-        connection.start();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (consumer != null) {
-            consumer.close();
-        }
-        session.close();
-        connection.stop();
-        connection.close();
-        broker.stop();
-    }
-
-    public void testPurgeLargeQueue() throws Exception {
-        applyBrokerSpoolingPolicy();
-        createProducerAndSendMessages(NUM_TO_SEND);
-        QueueViewMBean proxy = getProxyToQueueViewMBean();
-        LOG.info("purging..");
-        proxy.purge();
-        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
-                proxy.getQueueSize());
-        assertTrue("cache is disabled, temp store being used", !proxy.isCacheEnabled());
-    }
-
-    public void testRepeatedExpiryProcessingOfLargeQueue() throws Exception {       
-        applyBrokerSpoolingPolicy();
-        final int exprityPeriod = 1000;
-        applyExpiryDuration(exprityPeriod);
-        createProducerAndSendMessages(NUM_TO_SEND);
-        QueueViewMBean proxy = getProxyToQueueViewMBean();
-        LOG.info("waiting for expiry to kick in a bunch of times to verify it does not blow mem");
-        Thread.sleep(10000);
-        assertEquals("Queue size is has not changed " + proxy.getQueueSize(), NUM_TO_SEND,
-                proxy.getQueueSize());
-    }
-    
-
-    private void applyExpiryDuration(int i) {
-        broker.getDestinationPolicy().getDefaultEntry().setExpireMessagesPeriod(i);
-    }
-
-    private void applyBrokerSpoolingPolicy() {
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setProducerFlowControl(false);
-        PendingQueueMessageStoragePolicy pendingQueuePolicy = new FilePendingQueueMessageStoragePolicy();
-        defaultEntry.setPendingQueuePolicy(pendingQueuePolicy);
-        policyMap.setDefaultEntry(defaultEntry);
-        broker.setDestinationPolicy(policyMap);
-    }
-
-    
-    public void testPurgeLargeQueueWithConsumer() throws Exception {       
-        applyBrokerSpoolingPolicy();
-        createProducerAndSendMessages(NUM_TO_SEND);
-        QueueViewMBean proxy = getProxyToQueueViewMBean();
-        createConsumer();
-        long start = System.currentTimeMillis();
-        LOG.info("purging..");
-        proxy.purge();
-        LOG.info("purge done: " + (System.currentTimeMillis() - start) + "ms");
-        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
-                proxy.getQueueSize());
-        assertEquals("usage goes to duck", 0, proxy.getMemoryPercentUsage());
-    }
-
-    private QueueViewMBean getProxyToQueueViewMBean()
-            throws MalformedObjectNameException, JMSException {
-        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq"
-                + ":Type=Queue,Destination=" + queue.getQueueName()
-                + ",BrokerName=localhost");
-        QueueViewMBean proxy = (QueueViewMBean) broker.getManagementContext()
-                .newProxyInstance(queueViewMBeanName,
-                        QueueViewMBean.class, true);
-        return proxy;
-    }
-
-    private void createProducerAndSendMessages(int numToSend) throws Exception {
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        queue = session.createQueue("test1");
-        MessageProducer producer = session.createProducer(queue);
-        for (int i = 0; i < numToSend; i++) {
-            TextMessage message = session.createTextMessage(MESSAGE_TEXT + i);
-            if (i  != 0 && i % 10000 == 0) {
-                LOG.info("sent: " + i);
-            }
-            producer.send(message);
-        }
-        producer.close();
-    }
-
-    private void createConsumer() throws Exception {
-        consumer = session.createConsumer(queue);
-        // wait for buffer fill out
-        Thread.sleep(5 * 1000);
-        for (int i = 0; i < 500; ++i) {
-            Message message = consumer.receive();
-            message.acknowledge();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java
deleted file mode 100644
index 12589ca..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * 
- */
-public class CursorDurableTest extends CursorSupport {
-
-    protected Destination getDestination(Session session) throws JMSException {
-        String topicName = getClass().getName();
-        return session.createTopic(topicName);
-    }
-
-    protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException {
-        Connection connection = fac.createConnection();
-        connection.setClientID("testConsumer");
-        connection.start();
-        return connection;
-    }
-
-    protected MessageConsumer getConsumer(Connection connection) throws Exception {
-        Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = (Topic)getDestination(consumerSession);
-        MessageConsumer consumer = consumerSession.createDurableSubscriber(topic, "testConsumer");
-        return consumer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java
deleted file mode 100644
index b0668d9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-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.broker.region.policy.StorePendingQueueMessageStoragePolicy;
-
-/**
- * 
- */
-public class CursorQueueStoreTest extends CursorSupport {
-
-    protected Destination getDestination(Session session) throws JMSException {
-        String queueName = "QUEUE" + getClass().getName();
-        return session.createQueue(queueName);
-    }
-
-    protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException {
-        Connection connection = fac.createConnection();
-        connection.setClientID("testConsumer");
-        connection.start();
-        return connection;
-    }
-
-    protected MessageConsumer getConsumer(Connection connection) throws Exception {
-        Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination dest = getDestination(consumerSession);
-        MessageConsumer consumer = consumerSession.createConsumer(dest);
-        return consumer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        PolicyEntry policy = new PolicyEntry();
-        policy.setPendingQueuePolicy(new StorePendingQueueMessageStoragePolicy());
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-        answer.setDestinationPolicy(pMap);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-    
-    public static Test suite() {
-        return suite(CursorQueueStoreTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
deleted file mode 100644
index 6ce07c1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-/**
- * 
- */
-public abstract class CursorSupport extends CombinationTestSupport {
-
-    public int MESSAGE_COUNT = 500;
-    public int PREFETCH_SIZE = 50;
-    private static final Logger LOG = LoggerFactory.getLogger(CursorSupport.class);
-
-    protected BrokerService broker;
-    protected String bindAddress = "tcp://localhost:60706";
-
-    protected abstract Destination getDestination(Session session) throws JMSException;
-
-    protected abstract MessageConsumer getConsumer(Connection connection) throws Exception;
-
-    protected abstract void configureBroker(BrokerService answer) throws Exception;
-
-    public void testSendFirstThenConsume() throws Exception {
-        ConnectionFactory factory = createConnectionFactory();
-        Connection consumerConnection = getConsumerConnection(factory);
-        MessageConsumer consumer = getConsumer(consumerConnection);
-        consumerConnection.close();
-        Connection producerConnection = factory.createConnection();
-        producerConnection.start();
-        Session session = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(getDestination(session));
-        List<Message> senderList = new ArrayList<Message>();
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            Message msg = session.createTextMessage("test" + i);
-            senderList.add(msg);
-            producer.send(msg);
-        }
-        producerConnection.close();
-        // now consume the messages
-        consumerConnection = getConsumerConnection(factory);
-        // create durable subs
-        consumer = getConsumer(consumerConnection);
-        List<Message> consumerList = new ArrayList<Message>();
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            Message msg = consumer.receive(1000*5);
-            assertNotNull("Message "+i+" was missing.", msg);
-            consumerList.add(msg);
-        }
-        assertEquals(senderList, consumerList);
-        consumerConnection.close();
-    }
-
-
-    public void initCombosForTestSendWhilstConsume() {
-        addCombinationValues("MESSAGE_COUNT", new Object[] {Integer.valueOf(400),
-                                                           Integer.valueOf(500)});
-        addCombinationValues("PREFETCH_SIZE", new Object[] {Integer.valueOf(100),
-                Integer.valueOf(50)});
-    }
-
-    public void testSendWhilstConsume() throws Exception {
-        ConnectionFactory factory = createConnectionFactory();
-        Connection consumerConnection = getConsumerConnection(factory);
-        // create durable subs
-        MessageConsumer consumer = getConsumer(consumerConnection);
-        consumerConnection.close();
-        Connection producerConnection = factory.createConnection();
-        producerConnection.start();
-        Session session = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(getDestination(session));
-        List<TextMessage> senderList = new ArrayList<TextMessage>();
-        for (int i = 0; i < MESSAGE_COUNT / 10; i++) {
-            TextMessage msg = session.createTextMessage("test" + i);
-            senderList.add(msg);
-            producer.send(msg);
-        }
-        // now consume the messages
-        consumerConnection = getConsumerConnection(factory);
-        // create durable subs
-        consumer = getConsumer(consumerConnection);
-        final List<Message> consumerList = new ArrayList<Message>();
-        final CountDownLatch latch = new CountDownLatch(1);
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message msg) {
-                try {
-                    // sleep to act as a slow consumer
-                    // which will force a mix of direct and polled dispatching
-                    // using the cursor on the broker
-                    Thread.sleep(50);
-                } catch (Exception e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
-                consumerList.add(msg);
-                if (consumerList.size() == MESSAGE_COUNT) {
-                    latch.countDown();
-                }
-            }
-        });
-        for (int i = MESSAGE_COUNT / 10; i < MESSAGE_COUNT; i++) {
-            TextMessage msg = session.createTextMessage("test" + i);
-            senderList.add(msg);
-            producer.send(msg);
-        }
-        latch.await(300000, TimeUnit.MILLISECONDS);
-        producerConnection.close();
-        consumerConnection.close();
-        assertEquals("Still dipatching - count down latch not sprung", latch.getCount(), 0);
-        //assertEquals("cosumerList - expected: " + MESSAGE_COUNT + " but was: " + consumerList.size(), consumerList.size(), senderList.size());
-        for (int i = 0; i < senderList.size(); i++) {
-            Message sent = senderList.get(i);
-            Message consumed = consumerList.get(i);
-            if (!sent.equals(consumed)) {
-                LOG.error("BAD MATCH AT POS " + i);
-                LOG.error(sent.toString());
-                LOG.error(consumed.toString());
-                /*
-                 * log.error("\n\n\n\n\n"); for (int j = 0; j <
-                 * consumerList.size(); j++) { log.error(consumerList.get(j)); }
-                 */
-            }
-            assertEquals("This should be the same at pos " + i + " in the list", sent.getJMSMessageID(), consumed.getJMSMessageID());
-        }
-    }
-    
-    protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException {
-        Connection connection = fac.createConnection();
-        connection.setClientID("testConsumer");
-        connection.start();
-        return connection;
-    }
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(bindAddress);
-        Properties props = new Properties();
-        props.setProperty("prefetchPolicy.durableTopicPrefetch", "" + PREFETCH_SIZE);
-        props.setProperty("prefetchPolicy.optimizeDurableTopicPrefetch", "" + PREFETCH_SIZE);
-        props.setProperty("prefetchPolicy.queuePrefetch", "" + PREFETCH_SIZE);
-        cf.setProperties(props);
-        return cf;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/NegativeQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/NegativeQueueTest.java
deleted file mode 100644
index 09eb371..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/NegativeQueueTest.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.AutoFailTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.StorePendingQueueMessageStoragePolicy;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.StoreUsage;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.usage.TempUsage;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Modified CursorSupport Unit test to reproduce the negative queue issue.
- * 
- * Keys to reproducing:
- * 1) Consecutive queues with listener on first sending to second queue
- * 2) Push each queue to the memory limit
- *      This seems to help reproduce the issue more consistently, but
- *      we have seen times in our production environment where the
- *      negative queue can occur without. Our memory limits are
- *      very high in production and it still happens in varying 
- *      frequency.
- * 3) Prefetch
- *      Lowering the prefetch down to 10 and below seems to help 
- *      reduce occurrences. 
- * 4) # of consumers per queue
- *      The issue occurs less with fewer consumers
- * 
- * Things that do not affect reproduction:
- * 1) Spring - we use spring in our production applications, but this test case works
- *      with or without it.
- * 2) transacted
- * 
- */
-public class NegativeQueueTest extends AutoFailTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(NegativeQueueTest.class);
-    
-    public static SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd,hh:mm:ss:SSS");
-    
-    private static final String QUEUE_1_NAME = "conn.test.queue.1";
-    private static final String QUEUE_2_NAME = "conn.test.queue.2";
-    
-    private static final long QUEUE_MEMORY_LIMIT = 2097152;
-    private static final long MEMORY_USAGE = 400000000;
-    private static final long TEMP_USAGE = 200000000;
-    private static final long STORE_USAGE = 1000000000;
-    private static final int MESSAGE_COUNT = 2000;  
-    
-    protected static final boolean TRANSACTED = true;
-    protected static final boolean DEBUG = true;
-    protected static int NUM_CONSUMERS = 20;    
-    protected static int PREFETCH_SIZE = 1000;  
-    
-    protected BrokerService broker;
-    protected String bindAddress = "tcp://localhost:0";
-    
-    public void testWithDefaultPrefetch() throws Exception{
-        PREFETCH_SIZE = 1000;
-        NUM_CONSUMERS = 20;
-        blastAndConsume();
-    }
-    
-    public void testWithDefaultPrefetchFiveConsumers() throws Exception{
-        PREFETCH_SIZE = 1000;
-        NUM_CONSUMERS = 5;
-        blastAndConsume();
-    }
-    
-    public void testWithDefaultPrefetchTwoConsumers() throws Exception{
-        PREFETCH_SIZE = 1000;
-        NUM_CONSUMERS = 2;
-        blastAndConsume();
-    }
-    
-    public void testWithDefaultPrefetchOneConsumer() throws Exception{
-        PREFETCH_SIZE = 1000;
-        NUM_CONSUMERS = 1;
-        blastAndConsume();
-    }
-    
-    public void testWithMediumPrefetch() throws Exception{
-        PREFETCH_SIZE = 50;
-        NUM_CONSUMERS = 20;
-        blastAndConsume();
-    }   
-    
-    public void testWithSmallPrefetch() throws Exception{
-        PREFETCH_SIZE = 10;
-        NUM_CONSUMERS = 20;
-        blastAndConsume();
-    }
-    
-    public void testWithNoPrefetch() throws Exception{
-        PREFETCH_SIZE = 1;
-        NUM_CONSUMERS = 20;
-        blastAndConsume();
-    }
-    
-    public void blastAndConsume() throws Exception {
-        LOG.info(getName());
-        ConnectionFactory factory = createConnectionFactory();
-        
-        //get proxy queues for statistics lookups
-        Connection proxyConnection = factory.createConnection();
-        proxyConnection.start();
-        Session proxySession = proxyConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final QueueViewMBean proxyQueue1 = getProxyToQueueViewMBean((Queue)proxySession.createQueue(QUEUE_1_NAME));
-        final QueueViewMBean proxyQueue2 = getProxyToQueueViewMBean((Queue)proxySession.createQueue(QUEUE_2_NAME));
-        
-        // LOAD THE QUEUE
-        Connection producerConnection = factory.createConnection();
-        producerConnection.start();
-        Session session = producerConnection.createSession(TRANSACTED, Session.AUTO_ACKNOWLEDGE);
-        Destination queue = session.createQueue(QUEUE_1_NAME);
-        MessageProducer producer = session.createProducer(queue);
-        List<TextMessage> senderList = new ArrayList<TextMessage>();
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            TextMessage msg = session.createTextMessage(i + " " + formatter.format(new Date()));
-            senderList.add(msg);
-            producer.send(msg);
-            if(TRANSACTED) session.commit();
-            if(DEBUG && i%100 == 0){
-                int index = (i/100)+1;
-                System.out.print(index-((index/10)*10));
-            }
-        }
-        
-        //get access to the Queue info
-        if(DEBUG){
-            System.out.println("");
-            System.out.println("Queue1 Size = "+proxyQueue1.getQueueSize());
-            System.out.println("Queue1 Memory % Used = "+proxyQueue1.getMemoryPercentUsage());
-            System.out.println("Queue1 Memory Available = "+proxyQueue1.getMemoryLimit());
-        }
-        
-        // FLUSH THE QUEUE
-        final CountDownLatch latch1 = new CountDownLatch(1);
-        final CountDownLatch latch2 = new CountDownLatch(1);        
-        Connection[] consumerConnections1 = new Connection[NUM_CONSUMERS];
-        List<Message> consumerList1 = new ArrayList<Message>();
-        Connection[] consumerConnections2 = new Connection[NUM_CONSUMERS];
-        Connection[] producerConnections2 = new Connection[NUM_CONSUMERS];
-        List<Message> consumerList2 = new ArrayList<Message>();
-        
-        for(int ix=0; ix<NUM_CONSUMERS; ix++){
-            producerConnections2[ix] = factory.createConnection();
-            producerConnections2[ix].start();
-            consumerConnections1[ix] = getConsumerConnection(factory);
-            Session consumerSession = consumerConnections1[ix].createSession(TRANSACTED, Session.AUTO_ACKNOWLEDGE);
-            MessageConsumer consumer = consumerSession.createConsumer(session.createQueue(QUEUE_1_NAME));
-            consumer.setMessageListener(new SessionAwareMessageListener(producerConnections2[ix], consumerSession, QUEUE_2_NAME, latch1, consumerList1));
-        }
-        
-        latch1.await(200000, TimeUnit.MILLISECONDS);
-        if(DEBUG){
-            System.out.println("");
-            System.out.println("Queue2 Size = "+proxyQueue2.getQueueSize());
-            System.out.println("Queue2 Memory % Used = "+proxyQueue2.getMemoryPercentUsage());
-            System.out.println("Queue2 Memory Available = "+proxyQueue2.getMemoryLimit());
-        }
-        
-        for(int ix=0; ix<NUM_CONSUMERS; ix++){
-            consumerConnections2[ix] = getConsumerConnection(factory);
-            Session consumerSession = consumerConnections2[ix].createSession(TRANSACTED, Session.AUTO_ACKNOWLEDGE);
-            MessageConsumer consumer = consumerSession.createConsumer(session.createQueue(QUEUE_2_NAME));
-            consumer.setMessageListener(new SessionAwareMessageListener(consumerSession, latch2, consumerList2));
-        }
-        
-        boolean success = Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                boolean done = latch2.await(10, TimeUnit.SECONDS);
-                if(DEBUG){
-                    System.out.println("");
-                    System.out.println("Queue1 Size = "+proxyQueue1.getQueueSize());
-                    System.out.println("Queue1 Memory % Used = "+proxyQueue1.getMemoryPercentUsage());
-                    System.out.println("Queue2 Size = "+proxyQueue2.getQueueSize());
-                    System.out.println("Queue2 Memory % Used = "+proxyQueue2.getMemoryPercentUsage());
-                    System.out.println("Queue2 Memory Available = "+proxyQueue2.getMemoryLimit());
-                }
-                return done;
-            }
-        }, 300 * 1000);
-        if (!success) {
-            dumpAllThreads("blocked waiting on 2");
-        }
-        assertTrue("got all expected messages on 2", success);
-
-        producerConnection.close();
-        for(int ix=0; ix<NUM_CONSUMERS; ix++){
-            consumerConnections1[ix].close();
-            consumerConnections2[ix].close();
-            producerConnections2[ix].close();
-        }
-        
-        //let the consumer statistics on queue2 have time to update
-        Thread.sleep(500);
-        
-        if(DEBUG){
-            System.out.println("");
-            System.out.println("Queue1 Size = "+proxyQueue1.getQueueSize());
-            System.out.println("Queue1 Memory % Used = "+proxyQueue1.getMemoryPercentUsage());
-            System.out.println("Queue2 Size = "+proxyQueue2.getQueueSize());
-            System.out.println("Queue2 Memory % Used = "+proxyQueue2.getMemoryPercentUsage());
-        }
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return 0 == proxyQueue1.getQueueSize();
-            }});
-        assertEquals("Queue1 has gone negative,",0, proxyQueue1.getQueueSize());
-        
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return 0 == proxyQueue2.getQueueSize();
-            }});
-        assertEquals("Queue2 has gone negative,",0, proxyQueue2.getQueueSize());
-        proxyConnection.close();
-        
-    }
-
-    private QueueViewMBean getProxyToQueueViewMBean(Queue queue)
-        throws MalformedObjectNameException, JMSException {
-        
-        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq" + ":Type=Queue,Destination=" + 
-            queue.getQueueName() + ",BrokerName=localhost");
-        QueueViewMBean proxy = (QueueViewMBean) broker.getManagementContext().newProxyInstance(queueViewMBeanName,
-                QueueViewMBean.class, true);
-     
-        return proxy;
-    }
-    
-   protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException {
-        Connection connection = fac.createConnection();
-        connection.start();
-        return connection;
-    }
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-            broker.waitUntilStopped();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(bindAddress);
-        Properties props = new Properties();
-        props.setProperty("prefetchPolicy.durableTopicPrefetch", "" + PREFETCH_SIZE);
-        props.setProperty("prefetchPolicy.optimizeDurableTopicPrefetch", "" + PREFETCH_SIZE);
-        props.setProperty("prefetchPolicy.queuePrefetch", "" + PREFETCH_SIZE);
-        cf.setProperties(props);
-        return cf;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        answer.waitUntilStarted();
-        bindAddress = answer.getTransportConnectors().get(0).getConnectUri().toString();
-        return answer;
-    }
-    
-    protected void configureBroker(BrokerService answer) throws Exception {
-        PolicyEntry policy = new PolicyEntry();
-        policy.setMemoryLimit(QUEUE_MEMORY_LIMIT); 
-        policy.setPendingQueuePolicy(new StorePendingQueueMessageStoragePolicy());
-        
-        // disable the cache to be sure setBatch is the problem
-        // will get lots of duplicates
-        // real problem is sync between cursor and store add - leads to out or order messages
-        // in the cursor so setBatch can break.
-        // policy.setUseCache(false);
-        
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-        answer.setDestinationPolicy(pMap);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector("tcp://localhost:0");
-
-        MemoryUsage memoryUsage = new MemoryUsage();
-        memoryUsage.setLimit(MEMORY_USAGE); 
-        memoryUsage.setPercentUsageMinDelta(20);
-
-        TempUsage tempUsage = new TempUsage();
-        tempUsage.setLimit(TEMP_USAGE); 
-
-        StoreUsage storeUsage = new StoreUsage();
-        storeUsage.setLimit(STORE_USAGE); 
-
-        SystemUsage systemUsage = new SystemUsage();
-        systemUsage.setMemoryUsage(memoryUsage);
-        systemUsage.setTempUsage(tempUsage);
-        systemUsage.setStoreUsage(storeUsage);
-        answer.setSystemUsage(systemUsage);
-    }
-    
-    /**
-     * Message listener that is given the Session for transacted consumers
-     */
-    class SessionAwareMessageListener implements MessageListener{
-        private List<Message> consumerList;
-        private CountDownLatch latch;
-        private Session consumerSession;
-        private Session producerSession;
-        private MessageProducer producer;
-        
-        public SessionAwareMessageListener(Session consumerSession, CountDownLatch latch, List<Message> consumerList){
-            this(null, consumerSession, null, latch, consumerList);
-        }
-        
-        public SessionAwareMessageListener(Connection producerConnection, Session consumerSession, String outQueueName, 
-                CountDownLatch latch, List<Message> consumerList){
-            this.consumerList = consumerList;
-            this.latch = latch;
-            this.consumerSession = consumerSession;
-            
-            if(producerConnection != null){
-                try {
-                    producerSession = producerConnection.createSession(TRANSACTED, Session.AUTO_ACKNOWLEDGE);
-                    Destination queue = producerSession.createQueue(outQueueName);
-                    producer = producerSession.createProducer(queue);
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        
-        public void onMessage(Message msg) {
-            try {
-                if(producer == null){
-                    // sleep to act as a slow consumer
-                    // which will force a mix of direct and polled dispatching
-                    // using the cursor on the broker
-                    Thread.sleep(50);
-                }else{
-                    producer.send(msg);
-                    if(TRANSACTED) producerSession.commit();
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-            
-            synchronized(consumerList){
-                consumerList.add(msg);
-                if(DEBUG && consumerList.size()%100 == 0) {
-                    int index = consumerList.size()/100;
-                    System.out.print(index-((index/10)*10));
-                }
-                if (consumerList.size() == MESSAGE_COUNT) {
-                    latch.countDown();
-                }
-            }
-            if(TRANSACTED){
-                try {
-                    consumerSession.commit();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java
deleted file mode 100644
index a330723..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-/**
- * A StoreBasedCursorTest
- *
- */
-
-import java.util.Date;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-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.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.usage.SystemUsage;
-
-public class StoreBasedCursorTest extends TestCase {
-    protected String bindAddress = "tcp://localhost:60706";
-    BrokerService broker;
-    ActiveMQConnectionFactory factory;
-    Connection connection;
-    Session session;
-    Queue queue;
-    int messageSize = 1024;
-    // actual message is messageSize*2, and 4*MessageSize would allow 2 messages be delivered, but the flush of the cache is async so the flush
-    // triggered on 2nd message maxing out the usage may not be in effect for the 3rd message to succeed. Making the memory usage more lenient
-    // gives the usageChange listener in the cursor an opportunity to kick in.
-    int memoryLimit = 12 * messageSize;
-    
-    protected void setUp() throws Exception {
-        super.setUp();
-        if (broker == null) {
-            broker = new BrokerService();
-            broker.setAdvisorySupport(false);
-        }
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-            broker = null;
-        }
-    }
-    
-    protected void start() throws Exception {
-        broker.start();
-        factory = new ActiveMQConnectionFactory("vm://localhost?jms.alwaysSyncSend=true");
-        factory.setWatchTopicAdvisories(false);
-        connection = factory.createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        queue = session.createQueue("QUEUE." + this.getClass().getName());
-    }
-    
-    protected void stop() throws Exception {
-        session.close();
-        connection.close();
-        broker.stop();
-        broker = null;
-    }
-    
-    protected void configureBroker(long memoryLimit, long systemLimit) throws Exception {
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.addConnector(bindAddress);
-        broker.setPersistent(true);
-        
-        SystemUsage systemUsage = broker.getSystemUsage();
-        systemUsage.setSendFailIfNoSpace(true);
-        systemUsage.getMemoryUsage().setLimit(systemLimit);
-        
-        PolicyEntry policy = new PolicyEntry();
-        policy.setProducerFlowControl(true);
-        policy.setUseCache(true);
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-        broker.setDestinationPolicy(pMap);
-    }
-    
-    protected String createMessageText(int index) {
-        StringBuffer buffer = new StringBuffer(messageSize);
-        buffer.append("Message: " + index + " sent at: " + new Date());
-        if (buffer.length() > messageSize) {
-            return buffer.substring(0, messageSize);
-        }
-        for (int i = buffer.length(); i < messageSize; i++) {
-            buffer.append(' ');
-        }
-        return buffer.toString();
-    }
-    
-    protected void sendMessages(int deliveryMode) throws Exception {
-        start();
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(deliveryMode);
-        int i =0;
-        try {
-            for (i = 0; i < 200; i++) {
-                TextMessage message = session.createTextMessage(createMessageText(i));
-                producer.send(message);
-            }
-        } catch (javax.jms.ResourceAllocationException e) {
-        	e.printStackTrace();
-            fail(e.getMessage() + " num msgs = " + i + ". percentUsage = " + broker.getSystemUsage().getMemoryUsage().getPercentUsage());
-        }
-        stop();
-    }
-    
-    // use QueueStorePrefetch
-    public void testTwoUsageEqualPersistent() throws Exception {
-        configureBroker(memoryLimit, memoryLimit);
-        sendMessages(DeliveryMode.PERSISTENT);
-    }
-    
-    public void testUseCachePersistent() throws Exception {
-        int limit = memoryLimit / 2;
-        configureBroker(limit, memoryLimit);
-        sendMessages(DeliveryMode.PERSISTENT);
-    }
-    
-    public void testMemoryUsageLowPersistent() throws Exception {
-        configureBroker(memoryLimit, 10 * memoryLimit);
-        sendMessages(DeliveryMode.PERSISTENT);
-    }
-    
-    // use FilePendingMessageCursor
-    public void testTwoUsageEqualNonPersistent() throws Exception {
-        configureBroker(memoryLimit, memoryLimit);
-        sendMessages(DeliveryMode.NON_PERSISTENT);
-    }
-    
-    public void testMemoryUsageLowNonPersistent() throws Exception {
-        configureBroker(memoryLimit, 10 * memoryLimit);
-        sendMessages(DeliveryMode.NON_PERSISTENT);
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJDBCNoDuplicateTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJDBCNoDuplicateTest.java
deleted file mode 100644
index 6b49c8d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJDBCNoDuplicateTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-
-/**
- * @author gtully
- * @see https://issues.apache.org/activemq/browse/AMQ-2020
- **/
-public class StoreQueueCursorJDBCNoDuplicateTest extends StoreQueueCursorNoDuplicateTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        PersistenceAdapter persistenceAdapter = new JDBCPersistenceAdapter();
-        broker.setPersistenceAdapter(persistenceAdapter);
-        return broker;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJournalNoDuplicateTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJournalNoDuplicateTest.java
deleted file mode 100644
index 0d9949f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJournalNoDuplicateTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.io.File;
-
-import org.apache.activeio.journal.active.JournalImpl;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.journal.JournalPersistenceAdapter;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-
-/**
- * @author gtully
- * @see https://issues.apache.org/activemq/browse/AMQ-2020
- **/
-public class StoreQueueCursorJournalNoDuplicateTest extends StoreQueueCursorNoDuplicateTest {
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        
-        File dataFileDir = new File("target/activemq-data/StoreQueueCursorJournalNoDuplicateTest");
-        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
-        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);
-
-        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
-        kahaAdaptor.setDirectory(dataFileDir);
-        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, broker.getTaskRunnerFactory());
-        journalAdaptor.setMaxCheckpointWorkers(1);
-
-        broker.setPersistenceAdapter(journalAdaptor);
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorKahaDBNoDuplicateTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorKahaDBNoDuplicateTest.java
deleted file mode 100644
index 11a98d6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorKahaDBNoDuplicateTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import java.io.File;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-
-/**
- * @author gtully
- * @see https://issues.apache.org/activemq/browse/AMQ-2020
- **/
-public class StoreQueueCursorKahaDBNoDuplicateTest extends StoreQueueCursorNoDuplicateTest {
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        PersistenceAdapter persistenceAdapter = new KahaDBStore();
-        persistenceAdapter.setDirectory(new File("target/activemq-data/kahadb"));      
-        broker.setPersistenceAdapter(persistenceAdapter);
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorMemoryNoDuplicateTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorMemoryNoDuplicateTest.java
deleted file mode 100644
index a62748a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorMemoryNoDuplicateTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * @author gtully
- * @see https://issues.apache.org/activemq/browse/AMQ-2020
- **/
-public class StoreQueueCursorMemoryNoDuplicateTest extends StoreQueueCursorNoDuplicateTest {
-  
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.setPersistent(false);
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java
deleted file mode 100644
index f012c7a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * 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.broker.region.cursors;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.store.MessageStore;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.usage.SystemUsage;
-
-/**
- * @author gtully
- * https://issues.apache.org/activemq/browse/AMQ-2020
- **/
-public class StoreQueueCursorNoDuplicateTest extends TestCase {
-    ActiveMQQueue destination = new ActiveMQQueue("queue-"
-            + StoreQueueCursorNoDuplicateTest.class.getSimpleName());
-    BrokerService brokerService;
-
-    final static String mesageIdRoot = "11111:22222:";
-    final int messageBytesSize = 1024;
-    final String text = new String(new byte[messageBytesSize]);
-
-    protected int count = 6;
-
-    public void setUp() throws Exception {
-        brokerService = createBroker();
-        brokerService.setUseJmx(false);
-        brokerService.deleteAllMessages();
-        brokerService.start();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return new BrokerService();
-    }
-
-    public void tearDown() throws Exception {
-        brokerService.stop();
-    }
-
-    public void testNoDuplicateAfterCacheFullAndReadPast() throws Exception {
-        final PersistenceAdapter persistenceAdapter = brokerService
-                .getPersistenceAdapter();
-        final MessageStore queueMessageStore = persistenceAdapter
-                .createQueueMessageStore(destination);
-        final ConsumerInfo consumerInfo = new ConsumerInfo();
-        final DestinationStatistics destinationStatistics = new DestinationStatistics();
-        consumerInfo.setExclusive(true);
-
-        final Queue queue = new Queue(brokerService, destination,
-                queueMessageStore, destinationStatistics, null);
-
-        queueMessageStore.start();
-
-        QueueStorePrefetch underTest = new QueueStorePrefetch(queue);
-        SystemUsage systemUsage = new SystemUsage();
-        // ensure memory limit is reached
-        systemUsage.getMemoryUsage().setLimit(messageBytesSize * (count + 2));
-        underTest.setSystemUsage(systemUsage);
-        underTest.setEnableAudit(false);
-        underTest.start();
-        assertTrue("cache enabled", underTest.isUseCache() && underTest.isCacheEnabled());
-
-        final ConnectionContext contextNotInTx = new ConnectionContext();
-        for (int i = 0; i < count; i++) {
-            ActiveMQTextMessage msg = getMessage(i);
-            msg.setMemoryUsage(systemUsage.getMemoryUsage());
-
-            queueMessageStore.addMessage(contextNotInTx, msg);
-            underTest.addMessageLast(msg);
-        }
-
-        assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled());
-        int dequeueCount = 0;
-
-        underTest.setMaxBatchSize(2);
-        underTest.reset();
-        while (underTest.hasNext() && dequeueCount < count) {
-            MessageReference ref = underTest.next();
-            ref.decrementReferenceCount();
-            underTest.remove();
-            assertEquals(dequeueCount++, ref.getMessageId()
-                    .getProducerSequenceId());
-        }
-        underTest.release();
-        assertEquals(count, dequeueCount);
-    }
-
-    private ActiveMQTextMessage getMessage(int i) throws Exception {
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-        MessageId id = new MessageId(mesageIdRoot + i);
-        id.setBrokerSequenceId(i);
-        id.setProducerSequenceId(i);
-        message.setMessageId(id);
-        message.setDestination(destination);
-        message.setPersistent(true);
-        message.setResponseRequired(true);
-        message.setText("Msg:" + i + " " + text);
-        assertEquals(message.getMessageId().getProducerSequenceId(), i);
-        return message;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketTest.java
deleted file mode 100644
index 66520c9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.broker.region.group;
-
-
-/**
- *
- * 
- */
-public class MessageGroupHashBucketTest extends MessageGroupMapTest {
-
-    protected MessageGroupMap createMessageGroupMap() {
-        return new MessageGroupHashBucket(1024);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java
deleted file mode 100644
index ab02426..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.broker.region.group;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.SessionId;
-
-/**
- * 
- * 
- */
-public class MessageGroupMapTest extends TestCase {
-
-    protected MessageGroupMap map;
-    private ConsumerId consumer1;
-    private ConsumerId consumer2;
-    private ConsumerId consumer3;
-    private long idCounter;
-
-    public void testSingleConsumerForManyBucks() throws Exception {
-        assertGet("1", null);
-
-        map.put("1", consumer1);
-        assertGet("1", consumer1);
-        map.put("2", consumer1);
-        assertGet("2", consumer1);
-        map.put("3", consumer1);
-        assertGet("3", consumer1);
-
-        MessageGroupSet set = map.removeConsumer(consumer1);
-        assertContains(set, "1");
-        assertContains(set, "2");
-        assertContains(set, "3");
-        assertGet("1", null);
-        assertGet("2", null);
-        assertGet("3", null);
-    }
-
-    public void testManyConsumers() throws Exception {
-        assertGet("1", null);
-
-        map.put("1", consumer1);
-        assertGet("1", consumer1);
-        map.put("2", consumer2);
-        assertGet("2", consumer2);
-        map.put("3", consumer3);
-        assertGet("3", consumer3);
-
-        MessageGroupSet set = map.removeConsumer(consumer1);
-        assertContains(set, "1");
-
-        assertGet("1", null);
-        map.put("1", consumer2);
-        assertGet("1", consumer2);
-
-        set = map.removeConsumer(consumer2);
-        assertContains(set, "1");
-        assertContains(set, "2");
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        map = createMessageGroupMap();
-        consumer1 = createConsumerId();
-        consumer2 = createConsumerId();
-        consumer3 = createConsumerId();
-    }
-
-    protected MessageGroupMap createMessageGroupMap() {
-        return new SimpleMessageGroupMap();
-    }
-
-    protected ConsumerId createConsumerId() {
-        ConnectionId connectionId = new ConnectionId("" + ++idCounter);
-        SessionId sessionId = new SessionId(connectionId, ++idCounter);
-        ConsumerId answer = new ConsumerId(sessionId, ++idCounter);
-        return answer;
-    }
-
-    protected void assertGet(String groupdId, ConsumerId expected) {
-        ConsumerId actual = map.get(groupdId);
-        assertEquals("Entry for groupId: " + groupdId, expected, actual);
-    }
-
-    protected void assertContains(MessageGroupSet set, String groupID) {
-        assertTrue("MessageGroup set: " + set + " does not contain groupID: " + groupID, set.contains(groupID));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupTest.java
deleted file mode 100644
index 3437ba8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupTest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * 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.broker.region.group;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MessageGroupTest extends JmsTestSupport {
-	
-	 private static final Logger LOG = LoggerFactory.getLogger(CombinationTestSupport.class);
-
-    public void testGroupedMessagesDeliveredToOnlyOneConsumer() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup a first connection
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer1 = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // Send the messages.
-        for (int i = 0; i < 4; i++) {     	
-        	TextMessage message = session.createTextMessage("message " + i);
-            message.setStringProperty("JMSXGroupID", "TEST-GROUP");
-            message.setIntProperty("JMSXGroupSeq", i + 1);
-            LOG.info("sending message: " + message);
-            producer.send(message);
-        }
-
-        // All the messages should have been sent down connection 1.. just get
-        // the first 3
-        for (int i = 0; i < 3; i++) {
-            TextMessage m1 = (TextMessage)consumer1.receive(500);
-            assertNotNull("m1 is null for index: " + i, m1);
-            assertEquals(m1.getIntProperty("JMSXGroupSeq"), i + 1);
-        }
-        
-        // Setup a second connection
-        Connection connection1 = factory.createConnection(userName, password);
-        connection1.start();
-        Session session2 = connection1.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer2 = session2.createConsumer(destination);
-
-        // Close the first consumer.
-        consumer1.close();
-
-        // The last messages should now go the the second consumer.
-        for (int i = 0; i < 1; i++) {
-            TextMessage m1 = (TextMessage)consumer2.receive(500);
-            assertNotNull("m1 is null for index: " + i, m1);
-            assertEquals(m1.getIntProperty("JMSXGroupSeq"), 4 + i);
-        }
-
-        //assert that there are no other messages left for the consumer 2
-        Message m = consumer2.receive(100);
-        assertNull("consumer 2 has some messages left", m);
-    }	
-    
-    public void testAddingConsumer() throws Exception {
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup a first connection
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        MessageProducer producer = session.createProducer(destination);
-        //MessageConsumer consumer = session.createConsumer(destination);
-        
-    	TextMessage message = session.createTextMessage("message");
-        message.setStringProperty("JMSXGroupID", "TEST-GROUP");
-        
-        LOG.info("sending message: " + message);
-        producer.send(message);
-        
-        MessageConsumer consumer = session.createConsumer(destination);
-        
-        TextMessage msg = (TextMessage)consumer.receive();
-        assertNotNull(msg);
-        boolean first = msg.getBooleanProperty("JMSXGroupFirstForConsumer");
-        assertTrue(first);
-    }    
-    
-    public void testClosingMessageGroup() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup a first connection
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer1 = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // Send the messages.
-        for (int i = 0; i < 4; i++) {     	
-        	TextMessage message = session.createTextMessage("message " + i);
-            message.setStringProperty("JMSXGroupID", "TEST-GROUP");
-            LOG.info("sending message: " + message);
-            producer.send(message);
-        }
-
-
-
-        // All the messages should have been sent down consumer1.. just get
-        // the first 3
-        for (int i = 0; i < 3; i++) {
-            TextMessage m1 = (TextMessage)consumer1.receive(500);
-            assertNotNull("m1 is null for index: " + i, m1);
-        }
-        
-        // Setup a second consumer
-        Connection connection1 = factory.createConnection(userName, password);
-        connection1.start();
-        Session session2 = connection1.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer2 = session2.createConsumer(destination);
-        
-        //assert that there are no messages for the consumer 2
-        Message m = consumer2.receive(100);
-        assertNull("consumer 2 has some messages", m);
-
-        // Close the group
-    	TextMessage message = session.createTextMessage("message " + 5);
-        message.setStringProperty("JMSXGroupID", "TEST-GROUP");
-        message.setIntProperty("JMSXGroupSeq", -1);
-        LOG.info("sending message: " + message);
-        producer.send(message);
-        
-        //Send some more messages
-        for (int i = 0; i < 4; i++) {     	
-        	message = session.createTextMessage("message " + i);
-            message.setStringProperty("JMSXGroupID", "TEST-GROUP");
-            LOG.info("sending message: " + message);
-            producer.send(message);
-        }
-        
-        // Receive the fourth message
-        TextMessage m1 = (TextMessage)consumer1.receive(500);
-        assertNotNull("m1 is null for index: " + 4, m1);
-        
-        // Receive the closing message
-        m1 = (TextMessage)consumer1.receive(500);
-        assertNotNull("m1 is null for index: " + 5, m1);        
-        
-        //assert that there are no messages for the consumer 1
-        m = consumer1.receive(100);
-        assertNull("consumer 1 has some messages left", m);
-
-        // The messages should now go to the second consumer.
-        for (int i = 0; i < 4; i++) {
-            m1 = (TextMessage)consumer2.receive(500);
-            assertNotNull("m1 is null for index: " + i, m1);
-        }
-
-    }
-	
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
deleted file mode 100644
index 5ef7c5a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import static org.junit.Assert.assertEquals;
-
-import static org.junit.Assert.fail;
-
-import java.util.Calendar;
-import java.util.List;
-import javax.jms.MessageFormatException;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class CronParserTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CronParserTest.class);
-
-    @Test
-    public void testgetNextTimeDayOfWeek() throws MessageFormatException {
-
-        // using an absolute date so that result will be absolute - Monday 15 Nov 2010
-        Calendar current = Calendar.getInstance();
-        current.set(2010, Calendar.NOVEMBER, 15, 9, 15, 30);
-        LOG.debug("start:" + current.getTime());
-
-        String test = "* * * * 5";
-        long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        Calendar result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(0,result.get(Calendar.MINUTE));
-        assertEquals(0,result.get(Calendar.HOUR));
-        // expecting Friday 19th
-        assertEquals(19,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.NOVEMBER,result.get(Calendar.MONTH));
-        assertEquals(2010,result.get(Calendar.YEAR));
-    }
-
-    @Test
-    public void testgetNextTimeDayOfWeekVariant() throws MessageFormatException {
-
-        // using an absolute date so that result will be absolute - Monday 7 March 2011
-        Calendar current = Calendar.getInstance();
-        current.set(2011, Calendar.MARCH, 7, 9, 15, 30);
-        LOG.debug("start:" + current.getTime());
-
-        String test = "50 20 * * 5";
-        long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        Calendar result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(50,result.get(Calendar.MINUTE));
-        assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
-        // expecting Friday 11th
-        assertEquals(11,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.FRIDAY,result.get(Calendar.DAY_OF_WEEK));
-        assertEquals(Calendar.MARCH,result.get(Calendar.MONTH));
-        assertEquals(2011,result.get(Calendar.YEAR));
-
-        // Match to the day of week, but to late to run, should just a week forward.
-        current = Calendar.getInstance();
-        current.set(2011, Calendar.MARCH, 11, 22, 0, 30);
-        LOG.debug("update:" + current.getTime());
-
-        next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        //assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(50,result.get(Calendar.MINUTE));
-        assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
-        // expecting Friday 18th
-        assertEquals(18,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.FRIDAY,result.get(Calendar.DAY_OF_WEEK));
-        assertEquals(Calendar.MARCH,result.get(Calendar.MONTH));
-        assertEquals(2011,result.get(Calendar.YEAR));
-    }
-
-    @Test
-    public void testgetNextTimeMonthVariant() throws MessageFormatException {
-
-        // using an absolute date so that result will be absolute - Monday 7 March 2011
-        Calendar current = Calendar.getInstance();
-        current.set(2011, Calendar.MARCH, 7, 9, 15, 30);
-        LOG.debug("start:" + current.getTime());
-
-        String test = "0 20 * 4,5 0";
-        long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        Calendar result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(0,result.get(Calendar.MINUTE));
-        assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
-        // expecting Sunday 3rd of April
-        assertEquals(Calendar.APRIL,result.get(Calendar.MONTH));
-        assertEquals(3,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.SUNDAY,result.get(Calendar.DAY_OF_WEEK));
-        assertEquals(2011,result.get(Calendar.YEAR));
-
-        current = Calendar.getInstance();
-        current.set(2011, Calendar.APRIL, 30, 22, 0, 30);
-        LOG.debug("update:" + current.getTime());
-
-        next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(0,result.get(Calendar.MINUTE));
-        assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
-        // expecting Sunday 1st of May
-        assertEquals(1,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.SUNDAY,result.get(Calendar.DAY_OF_WEEK));
-        assertEquals(Calendar.MAY,result.get(Calendar.MONTH));
-        assertEquals(2011,result.get(Calendar.YEAR));
-
-        // Move past last time and see if reschedule to next year works.
-        current = Calendar.getInstance();
-        current.set(2011, Calendar.MAY, 30, 22, 0, 30);
-        LOG.debug("update:" + current.getTime());
-
-        next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(0,result.get(Calendar.MINUTE));
-        assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
-        // expecting Sunday 1st of April - 2012
-        assertEquals(1,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.SUNDAY,result.get(Calendar.DAY_OF_WEEK));
-        assertEquals(Calendar.APRIL,result.get(Calendar.MONTH));
-        assertEquals(2012,result.get(Calendar.YEAR));
-    }
-
-    @Test
-    public void testgetNextTimeMonth() throws MessageFormatException {
-
-        // using an absolute date so that result will be absolute - Monday 15 Nov 2010
-        Calendar current = Calendar.getInstance();
-        current.set(2010, Calendar.NOVEMBER, 15, 9, 15, 30);
-        LOG.debug("start:" + current.getTime());
-
-        String test = "* * * 12 *";
-        long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        Calendar result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(0,result.get(Calendar.MINUTE));
-        assertEquals(0,result.get(Calendar.HOUR_OF_DAY));
-        assertEquals(1,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.DECEMBER,result.get(Calendar.MONTH));
-        assertEquals(2010,result.get(Calendar.YEAR));
-    }
-
-    @Test
-    public void testgetNextTimeDays() throws MessageFormatException {
-
-        // using an absolute date so that result will be absolute - Monday 15 Nov 2010
-        Calendar current = Calendar.getInstance();
-        current.set(2010, Calendar.NOVEMBER, 15, 9, 15, 30);
-        LOG.debug("start:" + current.getTime());
-
-        String test = "* * 16 * *";
-        long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
-        Calendar result = Calendar.getInstance();
-        result.setTimeInMillis(next);
-        LOG.debug("next:" + result.getTime());
-
-        assertEquals(0,result.get(Calendar.SECOND));
-        assertEquals(0,result.get(Calendar.MINUTE));
-        assertEquals(0,result.get(Calendar.HOUR));
-        assertEquals(16,result.get(Calendar.DAY_OF_MONTH));
-        assertEquals(Calendar.NOVEMBER,result.get(Calendar.MONTH));
-        assertEquals(2010,result.get(Calendar.YEAR));
-    }
-
-    @Test
-    public void testgetNextTimeMinutes() throws MessageFormatException {
-        String test = "30 * * * *";
-        long current = 20*60*1000;
-        Calendar calender = Calendar.getInstance();
-        calender.setTimeInMillis(current);
-        LOG.debug("start:" + calender.getTime());
-        long next = CronParser.getNextScheduledTime(test, current);
-
-        calender.setTimeInMillis(next);
-        LOG.debug("next:" + calender.getTime());
-        long result = next - current;
-        assertEquals(60*10*1000,result);
-    }
-
-    @Test
-    public void testgetNextTimeHours() throws MessageFormatException {
-        String test = "* 1 * * *";
-
-        Calendar calender = Calendar.getInstance();
-        calender.set(1972, 2, 2, 17, 10, 0);
-        long current = calender.getTimeInMillis();
-        long next = CronParser.getNextScheduledTime(test, current);
-
-        calender.setTimeInMillis(next);
-        long result = next - current;
-        long expected = 60*1000*60*8 + 60 * 1000;
-        assertEquals(expected,result);
-    }
-
-    @Test
-    public void testgetNextTimeHoursZeroMin() throws MessageFormatException {
-        String test = "0 1 * * *";
-
-        Calendar calender = Calendar.getInstance();
-        calender.set(1972, 2, 2, 17, 10, 0);
-        long current = calender.getTimeInMillis();
-        long next = CronParser.getNextScheduledTime(test, current);
-
-        calender.setTimeInMillis(next);
-        long result = next - current;
-        long expected = 60*1000*60*7 + 60*1000*50;
-        assertEquals(expected,result);
-    }
-
-    @Test
-    public void testValidate() {
-        try {
-            CronParser.validate("30 08 10 06 * ");
-            CronParser.validate("* * * * * ");
-            CronParser.validate("* * * * 1-6 ");
-            CronParser.validate("* * * * 1,2,5 ");
-            CronParser.validate("*/10 0-4,8-12 * * 1-2,3-6/2 ");
-
-        } catch (Exception e) {
-            fail("Should be valid ");
-        }
-
-        try {
-            CronParser.validate("61 08 10 06 * ");
-            fail("Should not be valid ");
-        } catch (Exception e) {
-        }
-        try {
-            CronParser.validate("61 08 06 * ");
-            fail("Should not be valid ");
-        } catch (Exception e) {
-        }
-    }
-
-    @Test
-    public void testGetNextCommaSeparated() throws MessageFormatException {
-        String token = "3,5,7";
-        // test minimum values
-        int next = CronParser.getNext(createEntry(token, 1, 10), 3);
-        assertEquals(2, next);
-        next = CronParser.getNext(createEntry(token, 1, 10), 8);
-        assertEquals(4, next);
-        next = CronParser.getNext(createEntry(token, 1, 10), 1);
-        assertEquals(2, next);
-    }
-
-    @Test
-    public void testGetNextRange() throws MessageFormatException {
-        String token = "3-5";
-        // test minimum values
-        int next = CronParser.getNext(createEntry(token, 1, 10), 3);
-        assertEquals(1, next);
-        next = CronParser.getNext(createEntry(token, 1, 10), 5);
-        assertEquals(7, next);
-        next = CronParser.getNext(createEntry(token, 1, 10), 6);
-        assertEquals(6, next);
-        next = CronParser.getNext(createEntry(token, 1, 10), 1);
-        assertEquals(2, next);
-    }
-
-    @Test
-    public void testGetNextExact() throws MessageFormatException {
-        String token = "3";
-        int next = CronParser.getNext(createEntry(token, 0, 10), 2);
-        assertEquals(1, next);
-        next = CronParser.getNext(createEntry(token, 0, 10), 3);
-        assertEquals(10, next);
-        next = CronParser.getNext(createEntry(token, 0, 10), 1);
-        assertEquals(2, next);
-    }
-
-    @Test
-    public void testTokenize() {
-        String test = "*/5 * * * *";
-        List<String> list = CronParser.tokenize(test);
-        assertEquals(list.size(), 5);
-
-        test = "*/5 * * * * *";
-        try {
-            list = CronParser.tokenize(test);
-            fail("Should have throw an exception");
-        } catch (Throwable e) {
-        }
-
-        test = "*/5 * * * *";
-        try {
-            list = CronParser.tokenize(test);
-            fail("Should have throw an exception");
-        } catch (Throwable e) {
-        }
-
-        test = "0 1 2 3 4";
-        list = CronParser.tokenize(test);
-        assertEquals(list.size(), 5);
-
-        assertEquals(list.get(0), "0");
-        assertEquals(list.get(1), "1");
-        assertEquals(list.get(2), "2");
-        assertEquals(list.get(3), "3");
-        assertEquals(list.get(4), "4");
-    }
-
-    public void testGetNextScheduledTime() {
-        fail("Not yet implemented");
-    }
-
-    CronParser.CronEntry createEntry(String str, int start, int end) {
-        return new CronParser.CronEntry("test", str, start, end);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JmsCronSchedulerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JmsCronSchedulerTest.java
deleted file mode 100644
index c25d09b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JmsCronSchedulerTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.File;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.ScheduledMessage;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JmsCronSchedulerTest extends EmbeddedBrokerTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JmsCronSchedulerTest.class);
-
-    public void testSimulatenousCron() throws Exception {
-
-        final int COUNT = 10;
-        final AtomicInteger count = new AtomicInteger();
-        Connection connection = createConnection();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-                count.incrementAndGet();
-            	LOG.debug("Received one Message, count is at: " + count.get());
-            }
-        });
-
-        connection.start();
-        for (int i = 0; i < COUNT; i++) {
-	        MessageProducer producer = session.createProducer(destination);
-	        TextMessage message = session.createTextMessage("test msg "+i);
-	        message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON, "* * * * *");
-	        producer.send(message);
-	        producer.close();
-	        //wait a couple sec so cron start time is different for next message
-            Thread.sleep(2000);
-        }
-        SchedulerBroker sb = (SchedulerBroker) this.broker.getBroker().getAdaptor(SchedulerBroker.class);
-        JobScheduler js = sb.getJobScheduler();
-        List<Job> list = js.getAllJobs();
-        assertEquals(COUNT, list.size());
-        latch.await(2, TimeUnit.MINUTES);
-        //All should messages should have been received by now
-        assertEquals(COUNT, count.get());
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "vm://localhost";
-        super.setUp();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        return createBroker(true);
-    }
-
-    protected BrokerService createBroker(boolean delete) throws Exception {
-        File schedulerDirectory = new File("target/scheduler");
-        if (delete) {
-            IOHelper.mkdirs(schedulerDirectory);
-            IOHelper.deleteChildren(schedulerDirectory);
-        }
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(isPersistent());
-        answer.getManagementContext().setCreateConnector(false);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.setDataDirectory("target");
-        answer.setSchedulerDirectoryFile(schedulerDirectory);
-        answer.setSchedulerSupport(true);
-        answer.setUseJmx(false);
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JmsSchedulerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JmsSchedulerTest.java
deleted file mode 100644
index 7535cfd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JmsSchedulerTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.File;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.ScheduledMessage;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.IOHelper;
-
-public class JmsSchedulerTest extends EmbeddedBrokerTestSupport {
-
-    public void testCron() throws Exception {
-        final int COUNT = 10;
-        final AtomicInteger count = new AtomicInteger();
-        Connection connection = createConnection();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-                count.incrementAndGet();
-            }
-        });
-
-        connection.start();
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage("test msg");
-        long time = 1000;
-        message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON, "* * * * *");
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, time);
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 500);
-        message.setIntProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, COUNT - 1);
-
-        producer.send(message);
-        producer.close();
-
-        Thread.sleep(500);
-        SchedulerBroker sb = (SchedulerBroker) this.broker.getBroker().getAdaptor(SchedulerBroker.class);
-        JobScheduler js = sb.getJobScheduler();
-        List<Job> list = js.getAllJobs();
-        assertEquals(1, list.size());
-        latch.await(240, TimeUnit.SECONDS);
-        assertEquals(COUNT, count.get());
-    }
-
-    public void testSchedule() throws Exception {
-        final int COUNT = 1;
-        Connection connection = createConnection();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-            }
-        });
-
-        connection.start();
-        long time = 5000;
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage("test msg");
-
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, time);
-
-        producer.send(message);
-        producer.close();
-        // make sure the message isn't delivered early
-        Thread.sleep(2000);
-        assertEquals(latch.getCount(), COUNT);
-        latch.await(5, TimeUnit.SECONDS);
-        assertEquals(latch.getCount(), 0);
-    }
-
-    public void testTransactedSchedule() throws Exception {
-        final int COUNT = 1;
-        Connection connection = createConnection();
-
-        final Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                try {
-                    session.commit();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-                latch.countDown();
-            }
-        });
-
-        connection.start();
-        long time = 5000;
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage("test msg");
-
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, time);
-
-        producer.send(message);
-        session.commit();
-        producer.close();
-        // make sure the message isn't delivered early
-        Thread.sleep(2000);
-        assertEquals(latch.getCount(), COUNT);
-        latch.await(5, TimeUnit.SECONDS);
-        assertEquals(latch.getCount(), 0);
-    }
-
-
-    public void testScheduleRepeated() throws Exception {
-        final int NUMBER = 10;
-        final AtomicInteger count = new AtomicInteger();
-        Connection connection = createConnection();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(NUMBER);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-                count.incrementAndGet();
-            }
-        });
-
-        connection.start();
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage("test msg");
-        long time = 1000;
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, time);
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 500);
-        message.setIntProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, NUMBER - 1);
-        producer.send(message);
-        producer.close();
-        assertEquals(latch.getCount(), NUMBER);
-        latch.await(10, TimeUnit.SECONDS);
-        assertEquals(0, latch.getCount());
-        // wait a little longer - make sure we only get NUMBER of replays
-        Thread.sleep(1000);
-        assertEquals(NUMBER, count.get());
-    }
-
-    public void testScheduleRestart() throws Exception {
-        // send a message
-        Connection connection = createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        connection.start();
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage("test msg");
-        long time = 5000;
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, time);
-        producer.send(message);
-        producer.close();
-
-        //restart broker
-        broker.stop();
-        broker.waitUntilStopped();
-
-        broker = createBroker(false);
-        broker.start();
-        broker.waitUntilStarted();
-
-
-        // consume the message
-        connection = createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(destination);
-        Message msg = consumer.receive(5000);
-        assertNotNull("Didn't receive the message", msg);
-
-        //send another message
-        producer = session.createProducer(destination);
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, time);
-        producer.send(message);
-        producer.close();
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "vm://localhost";
-        super.setUp();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        return createBroker(true);
-    }
-
-    protected BrokerService createBroker(boolean delete) throws Exception {
-        File schedulerDirectory = new File("target/scheduler");
-        if (delete) {
-            IOHelper.mkdirs(schedulerDirectory);
-            IOHelper.deleteChildren(schedulerDirectory);
-        }
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(isPersistent());
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.setDataDirectory("target");
-        answer.setSchedulerDirectoryFile(schedulerDirectory);
-        answer.setSchedulerSupport(true);
-        answer.setUseJmx(false);
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java
deleted file mode 100644
index b6acef5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.ScheduledMessage;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.IdGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JobSchedulerManagementTest extends EmbeddedBrokerTestSupport {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(JobSchedulerManagementTest.class);
-
-    public void testRemoveAllScheduled() throws Exception {
-        final int COUNT = 5;
-        Connection connection = createConnection();
-
-        // Setup the scheduled Message
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(6), COUNT);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the Browse Destination and the Reply To location
-        Destination management = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
-
-        // Create the eventual Consumer to receive the scheduled message
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-            }
-        });
-
-        connection.start();
-
-        // Send the remove request
-        MessageProducer producer = session.createProducer(management);
-        Message request = session.createMessage();
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION, ScheduledMessage.AMQ_SCHEDULER_ACTION_REMOVEALL);
-        producer.send(request);
-
-        // Now wait and see if any get delivered, none should.
-        latch.await(10, TimeUnit.SECONDS);
-        assertEquals(latch.getCount(), COUNT);
-    }
-
-    public void testRemoveAllScheduledAtTime() throws Exception {
-        final int COUNT = 3;
-        Connection connection = createConnection();
-
-        // Setup the scheduled Message
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(6));
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(15));
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(20));
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the Browse Destination and the Reply To location
-        Destination management = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
-        Destination browseDest = session.createTemporaryQueue();
-
-        // Create the eventual Consumer to receive the scheduled message
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-            }
-        });
-
-        // Create the "Browser"
-        MessageConsumer browser = session.createConsumer(browseDest);
-        final CountDownLatch browsedLatch = new CountDownLatch(COUNT);
-        browser.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-            	browsedLatch.countDown();
-            	LOG.debug("Scheduled Message Browser got Message: " + message);
-            }
-        });
-
-        connection.start();
-
-        long start = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(10);
-        long end = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(30);
-
-        // Send the remove request
-        MessageProducer producer = session.createProducer(management);
-        Message request = session.createMessage();
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION,
-        					      ScheduledMessage.AMQ_SCHEDULER_ACTION_REMOVEALL);
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION_START_TIME, Long.toString(start));
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION_END_TIME, Long.toString(end));
-        producer.send(request);
-
-        // Send the browse request
-        request = session.createMessage();
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION, ScheduledMessage.AMQ_SCHEDULER_ACTION_BROWSE);
-        request.setJMSReplyTo(browseDest);
-        producer.send(request);
-
-        // now see if we got back only the one remaining message.
-        latch.await(10, TimeUnit.SECONDS);
-        assertEquals(2, browsedLatch.getCount());
-
-        // Now wait and see if any get delivered, none should.
-        latch.await(10, TimeUnit.SECONDS);
-        assertEquals(2, latch.getCount());
-    }
-
-    public void testBrowseAllScheduled() throws Exception {
-        final int COUNT = 10;
-        Connection connection = createConnection();
-
-        // Setup the scheduled Message
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(9), COUNT);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the Browse Destination and the Reply To location
-        Destination requestBrowse = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
-        Destination browseDest = session.createTemporaryQueue();
-
-        // Create the eventual Consumer to receive the scheduled message
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-            }
-        });
-
-        // Create the "Browser"
-        MessageConsumer browser = session.createConsumer(browseDest);
-        final CountDownLatch browsedLatch = new CountDownLatch(COUNT);
-        browser.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-            	browsedLatch.countDown();
-            	LOG.debug("Scheduled Message Browser got Message: " + message);
-            }
-        });
-
-        connection.start();
-
-        // Send the browse request
-        MessageProducer producer = session.createProducer(requestBrowse);
-        Message request = session.createMessage();
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION, ScheduledMessage.AMQ_SCHEDULER_ACTION_BROWSE);
-        request.setJMSReplyTo(browseDest);
-        producer.send(request);
-
-        // make sure the message isn't delivered early because we browsed it
-        Thread.sleep(2000);
-        assertEquals(latch.getCount(), COUNT);
-
-        // now see if we got all the scheduled messages on the browse destination.
-        latch.await(10, TimeUnit.SECONDS);
-        assertEquals(browsedLatch.getCount(), 0);
-
-        // now check that they all got delivered
-        latch.await(10, TimeUnit.SECONDS);
-        assertEquals(latch.getCount(), 0);
-    }
-
-    public void testBrowseWindowlScheduled() throws Exception {
-        final int COUNT = 10;
-        Connection connection = createConnection();
-
-        // Setup the scheduled Message
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(5));
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(10), COUNT);
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(20));
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the Browse Destination and the Reply To location
-        Destination requestBrowse = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
-        Destination browseDest = session.createTemporaryQueue();
-
-        // Create the eventual Consumer to receive the scheduled message
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT + 2);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-            }
-        });
-
-        // Create the "Browser"
-        MessageConsumer browser = session.createConsumer(browseDest);
-        final CountDownLatch browsedLatch = new CountDownLatch(COUNT);
-        browser.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-            	browsedLatch.countDown();
-            	LOG.debug("Scheduled Message Browser got Message: " + message);
-            }
-        });
-
-        connection.start();
-
-        long start = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(6);
-        long end = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(15);
-
-        // Send the browse request
-        MessageProducer producer = session.createProducer(requestBrowse);
-        Message request = session.createMessage();
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION, ScheduledMessage.AMQ_SCHEDULER_ACTION_BROWSE);
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION_START_TIME, Long.toString(start));
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION_END_TIME, Long.toString(end));
-        request.setJMSReplyTo(browseDest);
-        producer.send(request);
-
-        // make sure the message isn't delivered early because we browsed it
-        Thread.sleep(2000);
-        assertEquals(COUNT + 2, latch.getCount());
-
-        // now see if we got all the scheduled messages on the browse destination.
-        latch.await(15, TimeUnit.SECONDS);
-        assertEquals(0, browsedLatch.getCount());
-
-        // now see if we got all the scheduled messages on the browse destination.
-        latch.await(20, TimeUnit.SECONDS);
-        assertEquals(0, latch.getCount());
-    }
-
-    public void testRemoveScheduled() throws Exception {
-        final int COUNT = 10;
-        Connection connection = createConnection();
-
-        // Setup the scheduled Message
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(9), COUNT);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the Browse Destination and the Reply To location
-        Destination management = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
-        Destination browseDest = session.createTemporaryQueue();
-
-        // Create the eventual Consumer to receive the scheduled message
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(management);
-
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-            }
-        });
-
-        // Create the "Browser"
-        Session browseSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer browser = browseSession.createConsumer(browseDest);
-
-        connection.start();
-
-        // Send the browse request
-        Message request = session.createMessage();
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION,
-        						  ScheduledMessage.AMQ_SCHEDULER_ACTION_BROWSE);
-        request.setJMSReplyTo(browseDest);
-        producer.send(request);
-
-        // Browse all the Scheduled Messages.
-        for (int i = 0; i < COUNT; ++i) {
-        	Message message = browser.receive(2000);
-        	assertNotNull(message);
-
-        	try{
-        		Message remove = session.createMessage();
-        		remove.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION,
-        				ScheduledMessage.AMQ_SCHEDULER_ACTION_REMOVE);
-        		remove.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_ID,
-        				message.getStringProperty(ScheduledMessage.AMQ_SCHEDULED_ID));
-        		producer.send(remove);
-        	} catch(Exception e) {
-        	}
-        }
-
-        // now check that they all got removed and are not delivered.
-        latch.await(11, TimeUnit.SECONDS);
-        assertEquals(COUNT, latch.getCount());
-    }
-
-    public void testRemoveNotScheduled() throws Exception {
-        Connection connection = createConnection();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the Browse Destination and the Reply To location
-        Destination management = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
-
-        MessageProducer producer = session.createProducer(management);
-
-    	try{
-
-	        // Send the remove request
-			Message remove = session.createMessage();
-			remove.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION,
-					ScheduledMessage.AMQ_SCHEDULER_ACTION_REMOVEALL);
-			remove.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_ID, new IdGenerator().generateId());
-			producer.send(remove);
-    	} catch(Exception e) {
-    		fail("Caught unexpected exception during remove of unscheduled message.");
-    	}
-    }
-
-    public void testBrowseWithSelector() throws Exception {
-        Connection connection = createConnection();
-
-        // Setup the scheduled Message
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(9));
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(10));
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(5));
-        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(45));
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        // Create the Browse Destination and the Reply To location
-        Destination requestBrowse = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
-        Destination browseDest = session.createTemporaryTopic();
-
-        // Create the "Browser"
-        MessageConsumer browser = session.createConsumer(browseDest, ScheduledMessage.AMQ_SCHEDULED_DELAY + " = 45000" );
-
-        connection.start();
-
-        // Send the browse request
-        MessageProducer producer = session.createProducer(requestBrowse);
-        Message request = session.createMessage();
-        request.setStringProperty(ScheduledMessage.AMQ_SCHEDULER_ACTION, ScheduledMessage.AMQ_SCHEDULER_ACTION_BROWSE);
-        request.setJMSReplyTo(browseDest);
-        producer.send(request);
-
-        // Now try and receive the one we selected
-        Message message = browser.receive(5000);
-        assertNotNull(message);
-        assertEquals(45000, message.getLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY));
-
-        // Now check if there are anymore, there shouldn't be
-        message = browser.receive(5000);
-        assertNull(message);
-    }
-
-
-    protected void scheduleMessage(Connection connection, long delay) throws Exception {
-    	scheduleMessage(connection, delay, 1);
-    }
-
-    protected void scheduleMessage(Connection connection, long delay, int count) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage("test msg");
-        message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay);
-
-        for(int i = 0; i < count; ++i ) {
-        	producer.send(message);
-        }
-
-        producer.close();
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "vm://localhost";
-        super.setUp();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        return createBroker(true);
-    }
-
-    protected BrokerService createBroker(boolean delete) throws Exception {
-        File schedulerDirectory = new File("target/scheduler");
-        if (delete) {
-            IOHelper.mkdirs(schedulerDirectory);
-            IOHelper.deleteChildren(schedulerDirectory);
-        }
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(isPersistent());
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.setDataDirectory("target");
-        answer.setSchedulerDirectoryFile(schedulerDirectory);
-        answer.setSchedulerSupport(true);
-        answer.setUseJmx(false);
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerStoreTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerStoreTest.java
deleted file mode 100644
index 219164a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerStoreTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import junit.framework.TestCase;
-import org.apache.activemq.util.IOHelper;
-import org.apache.kahadb.util.ByteSequence;
-
-public class JobSchedulerStoreTest extends TestCase {
-
-	public void testRestart() throws Exception {
-		JobSchedulerStore store = new JobSchedulerStore();
-		File directory = new File("target/test/ScheduledDB");
-		  IOHelper.mkdirs(directory);
-	      IOHelper.deleteChildren(directory);
-	      store.setDirectory(directory);
-		final int NUMBER = 1000;
-		store.start();
-		List<ByteSequence>list = new ArrayList<ByteSequence>();
-		for (int i = 0; i < NUMBER;i++ ) {
-            ByteSequence buff = new ByteSequence(new String("testjob"+i).getBytes());
-            list.add(buff);     
-        }
-		JobScheduler js = store.getJobScheduler("test");
-		int count = 0;
-		long startTime = 10000;
-		for (ByteSequence job:list) {
-		    js.schedule("id:"+(count++), job,"",startTime,10000,-1);	    
-		}
-		List<Job>test = js.getAllJobs();
-		assertEquals(list.size(),test.size());
-		store.stop();
-		
-		store.start();
-		js = store.getJobScheduler("test");
-		test = js.getAllJobs();
-		assertEquals(list.size(),test.size());
-		for (int i = 0; i < list.size();i++) {
-		    String orig = new String(list.get(i).getData());
-		    String payload = new String(test.get(i).getPayload());
-		    assertEquals(orig,payload);
-		}
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerTest.java
deleted file mode 100644
index 5051d83..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerTest.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * 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.broker.scheduler;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.util.Calendar;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import org.apache.activemq.util.IOHelper;
-import org.apache.kahadb.util.ByteSequence;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class JobSchedulerTest {
-
-    private JobSchedulerStore store;
-    private JobScheduler scheduler;
-
-    @Test
-    public void testAddLongStringByteSequence() throws Exception {
-        final int COUNT = 10;
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        scheduler.addListener(new JobListener() {
-
-            public void scheduledJob(String id, ByteSequence job) {
-                latch.countDown();
-            }
-
-        });
-        for (int i = 0; i < COUNT; i++) {
-            String test = new String("test" + i);
-            scheduler.schedule("id" + i, new ByteSequence(test.getBytes()), 1000);
-        }
-        latch.await(5, TimeUnit.SECONDS);
-        assertEquals(0,latch.getCount());
-    }
-
-    @Test
-    public void testAddCronAndByteSequence() throws Exception {
-
-        final CountDownLatch latch = new CountDownLatch(1);
-        scheduler.addListener(new JobListener() {
-
-            public void scheduledJob(String id, ByteSequence job) {
-                latch.countDown();
-            }
-
-        });
-
-        Calendar current = Calendar.getInstance();
-
-        int minutes = current.get(Calendar.MINUTE) + 1;
-        int hour = current.get(Calendar.HOUR_OF_DAY);
-        int day = current.get(Calendar.DAY_OF_WEEK) - 1;
-
-        String cronTab = String.format("%d %d * * %d", minutes, hour, day);
-
-        String str = new String("test1");
-        scheduler.schedule("id:1", new ByteSequence(str.getBytes()), cronTab, 0, 0, 0);
-
-        assertTrue(latch.await(60, TimeUnit.SECONDS));
-        assertEquals(0, latch.getCount());
-    }
-
-    @Test
-    public void testAddLongLongIntStringByteSequence() throws Exception {
-        final int COUNT = 10;
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        scheduler.addListener(new JobListener() {
-
-            public void scheduledJob(String id, ByteSequence job) {
-                latch.countDown();
-            }
-
-        });
-        long time = 2000;
-        for (int i = 0; i < COUNT; i++) {
-            String test = new String("test" + i);
-            scheduler.schedule("id" + i, new ByteSequence(test.getBytes()), "", time, 10, -1);
-        }
-        assertTrue(latch.getCount() == COUNT);
-        latch.await(3000, TimeUnit.SECONDS);
-        assertTrue(latch.getCount() == 0);
-    }
-
-    @Test
-    public void testAddStopThenDeliver() throws Exception {
-        final int COUNT = 10;
-        final CountDownLatch latch = new CountDownLatch(COUNT);
-        long time =  2000;
-        for (int i = 0; i < COUNT; i++) {
-            String test = new String("test" + i);
-            scheduler.schedule("id" + i, new ByteSequence(test.getBytes()), "", time, 1000, -1);
-        }
-        File directory = store.getDirectory();
-        tearDown();
-        startStore(directory);
-        scheduler.addListener(new JobListener() {
-
-            public void scheduledJob(String id, ByteSequence job) {
-                latch.countDown();
-            }
-
-        });
-        assertTrue(latch.getCount() == COUNT);
-        latch.await(3000, TimeUnit.SECONDS);
-        assertTrue(latch.getCount() == 0);
-    }
-
-    @Test
-    public void testRemoveLong() throws Exception {
-        final int COUNT = 10;
-
-        long time = 20000;
-        for (int i = 0; i < COUNT; i++) {
-            String str = new String("test" + i);
-            scheduler.schedule("id" + i, new ByteSequence(str.getBytes()), "", time, 1000, -1);
-
-        }
-        int size = scheduler.getNextScheduleJobs().size();
-        assertEquals(size, COUNT);
-        long removeTime = scheduler.getNextScheduleTime();
-        scheduler.remove(removeTime);
-        size = scheduler.getNextScheduleJobs().size();
-        assertEquals(0, size);
-    }
-
-    @Test
-    public void testRemoveString() throws Exception {
-        final int COUNT = 10;
-        final String test = "TESTREMOVE";
-        long time = 20000;
-        for (int i = 0; i < COUNT; i++) {
-            String str = new String("test" + i);
-            scheduler.schedule("id" + i, new ByteSequence(str.getBytes()), "", time, 10, -1);
-            if (i == COUNT / 2) {
-                scheduler.schedule(test, new ByteSequence(test.getBytes()), "", time, 10, -1);
-            }
-        }
-
-        int size = scheduler.getNextScheduleJobs().size();
-        assertEquals(size, COUNT + 1);
-        scheduler.remove(test);
-        size = scheduler.getNextScheduleJobs().size();
-        assertEquals(size, COUNT);
-    }
-
-    @Test
-    public void testgetAllJobs() throws Exception {
-        final int COUNT = 10;
-        final String ID = "id:";
-        long time =  20000;
-        for (int i = 0; i < COUNT; i++) {
-            String str = new String("test" + i);
-            scheduler.schedule(ID + i, new ByteSequence(str.getBytes()), "", time, 10 + i, -1);
-        }
-        List<Job> list = scheduler.getAllJobs();
-
-        assertEquals(list.size(), COUNT);
-        int count = 0;
-        for (Job job : list) {
-
-            assertEquals(job.getJobId(), ID + count);
-            count++;
-        }
-    }
-
-    @Test
-    public void testgetAllJobsInRange() throws Exception {
-        final int COUNT = 10;
-        final String ID = "id:";
-        long start = 10000;
-
-        for (int i = 0; i < COUNT; i++) {
-            String str = new String("test" + i);
-
-                scheduler.schedule(ID + i, new ByteSequence(str.getBytes()), "", start + (i * 1000), 10000 + i, 0);
-
-        }
-        start = System.currentTimeMillis();
-        long finish = start + 12000+ (COUNT * 1000);
-        List<Job> list = scheduler.getAllJobs(start, finish);
-
-        assertEquals( COUNT,list.size());
-        int count = 0;
-        for (Job job : list) {
-
-            assertEquals(job.getJobId(), ID + count);
-            count++;
-        }
-    }
-
-    @Test
-    public void testRemoveAllJobsInRange() throws Exception {
-        final int COUNT = 10;
-        final String ID = "id:";
-        long start = 10000;
-
-        for (int i = 0; i < COUNT; i++) {
-            String str = new String("test" + i);
-
-                scheduler.schedule(ID + i, new ByteSequence(str.getBytes()), "", start + (i * 1000), 10000 + i, 0);
-
-        }
-        start = System.currentTimeMillis();
-        long finish = start + 12000+ (COUNT * 1000);
-        scheduler.removeAllJobs(start, finish);
-
-        assertTrue(scheduler.getAllJobs().isEmpty());
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        File directory = new File("target/test/ScheduledJobsDB");
-        IOHelper.mkdirs(directory);
-        IOHelper.deleteChildren(directory);
-        startStore(directory);
-
-    }
-
-    protected void startStore(File directory) throws Exception {
-        store = new JobSchedulerStore();
-        store.setDirectory(directory);
-        store.start();
-        scheduler = store.getJobScheduler("test");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        store.stop();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreBrokerTest.java
deleted file mode 100755
index 1e9633a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreBrokerTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.broker.store;
-
-import java.net.URI;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTest;
-
-/**
- * Once the wire format is completed we can test against real persistence storage.
- * 
- * 
- */
-public class DefaultStoreBrokerTest extends BrokerTest {
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost?deleteAllMessagesOnStartup=true"));
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost"));
-    }
-    
-    public static Test suite() {
-        return suite(DefaultStoreBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreRecoveryBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreRecoveryBrokerTest.java
deleted file mode 100755
index e89ca04..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreRecoveryBrokerTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.broker.store;
-
-import java.net.URI;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.RecoveryBrokerTest;
-
-/**
- * Used to verify that recovery works correctly against 
- * 
- * 
- */
-public class DefaultStoreRecoveryBrokerTest extends RecoveryBrokerTest {
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost?deleteAllMessagesOnStartup=true"));
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost"));
-    }
-    
-    public static Test suite() {
-        return suite(DefaultStoreRecoveryBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreXARecoveryBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreXARecoveryBrokerTest.java
deleted file mode 100755
index b0e0733..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/DefaultStoreXARecoveryBrokerTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.broker.store;
-
-import java.net.URI;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.XARecoveryBrokerTest;
-
-/**
- * Used to verify that recovery works correctly against 
- * 
- * 
- */
-public class DefaultStoreXARecoveryBrokerTest extends XARecoveryBrokerTest {
-
-    public static Test suite() {
-        return suite(DefaultStoreXARecoveryBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost?deleteAllMessagesOnStartup=true"));
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("broker://()/localhost"));
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java
deleted file mode 100755
index a8ed2d0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.broker.store;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.jms.BytesMessage;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ProgressPrinter;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.memory.list.SimpleMessageList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class LoadTester extends JmsTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(LoadTester.class);
-    
-    protected int messageSize = 1024 * 64;
-    protected int produceCount = 10000;
-
-    protected BrokerService createBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/broker/store/loadtester.xml"));
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws URISyntaxException, IOException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(((TransportConnector)broker.getTransportConnectors().get(0)).getServer().getConnectURI());
-        factory.setUseAsyncSend(true);
-        return factory;
-    }
-
-    public void testQueueSendThenAddConsumer() throws Exception {
-        ProgressPrinter printer = new ProgressPrinter(produceCount, 20);
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        connection.setUseCompression(false);
-        connection.getPrefetchPolicy().setAll(10);
-        connection.start();
-        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-        LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
-                 + " megs of data.");
-        // Send a message to the broker.
-        long start = System.currentTimeMillis();
-        for (int i = 0; i < produceCount; i++) {
-            printer.increment();
-            BytesMessage msg = session.createBytesMessage();
-            msg.writeBytes(new byte[messageSize]);
-            producer.send(msg);
-        }
-        long end1 = System.currentTimeMillis();
-
-        LOG.info("Produced messages/sec: " + (produceCount * 1000.0 / (end1 - start)));
-
-        printer = new ProgressPrinter(produceCount, 10);
-        start = System.currentTimeMillis();
-        MessageConsumer consumer = session.createConsumer(destination);
-        for (int i = 0; i < produceCount; i++) {
-            printer.increment();
-            assertNotNull("Getting message: " + i, consumer.receive(20000));
-        }
-        end1 = System.currentTimeMillis();
-        LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));
-
-    }
-
-    public static Test suite() {
-        return suite(LoadTester.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java
deleted file mode 100755
index 4ef3e7b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.broker.store;
-
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.amq.AMQTransactionStore;
-import org.apache.activemq.store.amq.AMQTx;
-
-public class TransactionStoreTest extends TestCase {
-
-    protected static final int MAX_TX = 2500;
-    protected static final int MAX_THREADS = 200;
-    
-    class BeingTested extends AMQTransactionStore {
-        public BeingTested() {
-            super(null);
-        }
-        public Map<TransactionId, AMQTx>  getInFlight() {
-            return inflightTransactions;   
-        }
-    };
-    
-    BeingTested underTest = new BeingTested();
-    
-  public void testConcurrentGetTx() throws Exception {
-      final ConnectionId connectionId = new ConnectionId("1:1");
-      
-      Runnable getTx = new Runnable() {
-          
-        public void run() {
-            for (int i=0; i<MAX_TX;i++) {
-                TransactionId txid = new LocalTransactionId(connectionId, i);
-                underTest.getTx(txid, null);
-            }
-        }
-      };
-      
-      ExecutorService executor = Executors.newFixedThreadPool(MAX_THREADS);
-      for (int i=0;i < MAX_THREADS; i++) {
-          executor.execute(getTx);
-      }
-      executor.shutdown();
-      executor.awaitTermination(10, TimeUnit.SECONDS);
-      
-      assertEquals("has just the right amount of transactions", MAX_TX, underTest.getInFlight().size());
-  }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java
deleted file mode 100644
index 9361859..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.broker.util;
-
-import java.net.URI;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class PluginBrokerTest extends JmsTopicSendReceiveTest {
-    private static final Logger LOG = LoggerFactory.getLogger(PluginBrokerTest.class);
-    private BrokerService broker;
-
-    protected void setUp() throws Exception {
-        broker = createBroker();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }   
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/util/plugin-broker.xml");
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-	protected void assertMessageValid(int index, Message message)
-			throws JMSException {
-		// check if broker path has been set 
-		assertEquals("localhost", message.getStringProperty("BrokerPath"));
-		ActiveMQMessage amqMsg = (ActiveMQMessage)message;
-		if (index == 7) {
-			// check custom expiration
-			assertTrue("expiration is in range, depends on two distinct calls to System.currentTimeMillis", 1500 < amqMsg.getExpiration() - amqMsg.getTimestamp());
-		} else if (index == 9) {
-			// check ceiling
-			assertTrue("expiration ceeling is in range, depends on two distinct calls to System.currentTimeMillis", 59500 < amqMsg.getExpiration() - amqMsg.getTimestamp());
-		} else {
-			// check default expiration
-			assertEquals(1000, amqMsg.getExpiration() - amqMsg.getTimestamp());
-		}
-		super.assertMessageValid(index, message);
-	}
-	
-    protected void sendMessage(int index, Message message) throws Exception {
-    	if (index == 7) {
-    		producer.send(producerDestination, message, Message.DEFAULT_DELIVERY_MODE, Message.DEFAULT_PRIORITY, 2000);
-    	} else if (index == 9) {
-    		producer.send(producerDestination, message, Message.DEFAULT_DELIVERY_MODE, Message.DEFAULT_PRIORITY, 200000);
-    	} else {
-    		super.sendMessage(index, message);
-    	}
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java
deleted file mode 100644
index 3621a14..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-import org.apache.activemq.xbean.XBeanBrokerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class CompositeQueueTest extends EmbeddedBrokerTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CompositeQueueTest.class);
-    
-    protected int total = 10;
-    protected Connection connection;
-    public String messageSelector1, messageSelector2 = null;
-
-
-    public void testVirtualTopicCreation() throws Exception {
-        if (connection == null) {
-            connection = createConnection();
-        }
-        connection.start();
-
-        ConsumerBean messageList1 = new ConsumerBean();
-        ConsumerBean messageList2 = new ConsumerBean();
-        messageList1.setVerbose(true);
-        messageList2.setVerbose(true);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        Destination producerDestination = getProducerDestination();
-        Destination destination1 = getConsumer1Dsetination();
-        Destination destination2 = getConsumer2Dsetination();
-        
-        LOG.info("Sending to: " + producerDestination);
-        LOG.info("Consuming from: " + destination1 + " and " + destination2);
-        
-        MessageConsumer c1 = session.createConsumer(destination1, messageSelector1);
-        MessageConsumer c2 = session.createConsumer(destination2, messageSelector2);
-
-        c1.setMessageListener(messageList1);
-        c2.setMessageListener(messageList2);
-
-        // create topic producer
-        MessageProducer producer = session.createProducer(producerDestination);
-        assertNotNull(producer);
-
-        for (int i = 0; i < total; i++) {
-            producer.send(createMessage(session, i));
-        }
-
-        assertMessagesArrived(messageList1, messageList2);
-    }
-
-    protected void assertMessagesArrived(ConsumerBean messageList1, ConsumerBean messageList2) {
-        messageList1.assertMessagesArrived(total);
-        messageList2.assertMessagesArrived(total);
-    }
-
-    protected TextMessage createMessage(Session session, int i) throws JMSException {
-        TextMessage textMessage = session.createTextMessage("message: " + i);
-        if (i % 2 != 0) {
-            textMessage.setStringProperty("odd", "yes");
-        } else {
-            textMessage.setStringProperty("odd", "no");
-        }
-        textMessage.setIntProperty("i", i);
-        return textMessage;
-    }
-
-    protected Destination getConsumer1Dsetination() {
-        return new ActiveMQQueue("FOO");
-    }
-
-    protected Destination getConsumer2Dsetination() {
-        return new ActiveMQTopic("BAR");
-    }
-
-    protected Destination getProducerDestination() {
-        return new ActiveMQQueue("MY.QUEUE");
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        XBeanBrokerFactory factory = new XBeanBrokerFactory();
-        BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri()));
-        return answer;
-    }
-
-    protected String getBrokerConfigUri() {
-        return "org/apache/activemq/broker/virtual/composite-queue.xml";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java
deleted file mode 100644
index 991e3a5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- *
- * 
- */
-public class CompositeTopicTest extends CompositeQueueTest {
-    
-    protected Destination getConsumer1Dsetination() {
-        return new ActiveMQQueue("FOO");
-    }
-
-    protected Destination getConsumer2Dsetination() {
-        return new ActiveMQTopic("BAR");
-    }
-
-    protected Destination getProducerDestination() {
-        return new ActiveMQTopic("MY.TOPIC");
-    }
-
-    protected String getBrokerConfigUri() {
-        return "org/apache/activemq/broker/virtual/composite-topic.xml";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/FilteredQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/FilteredQueueTest.java
deleted file mode 100644
index 17a8706..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/FilteredQueueTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import org.apache.activemq.spring.ConsumerBean;
-
-/**
- * 
- */
-public class FilteredQueueTest extends CompositeQueueTest {
-
-    @Override
-    protected String getBrokerConfigUri() {
-        return "org/apache/activemq/broker/virtual/filtered-queue.xml";
-    }
-
-    @Override
-    protected void assertMessagesArrived(ConsumerBean messageList1, ConsumerBean messageList2) {
-        messageList1.assertMessagesArrived(total / 2);
-        messageList2.assertMessagesArrived(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueTest.java
deleted file mode 100644
index 6f35e0d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class MirroredQueueTest extends EmbeddedBrokerTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(MirroredQueueTest.class);
-    private Connection connection;
-
-    public void testSendingToQueueIsMirrored() throws Exception {
-        if (connection == null) {
-            connection = createConnection();
-        }
-        connection.start();
-
-        ConsumerBean messageList = new ConsumerBean();
-        messageList.setVerbose(true);
-
-        Destination consumeDestination = createConsumeDestination();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        LOG.info("Consuming from: " + consumeDestination);
-
-        MessageConsumer c1 = session.createConsumer(consumeDestination);
-        c1.setMessageListener(messageList);
-
-        // create topic producer
-        ActiveMQQueue sendDestination = new ActiveMQQueue(getQueueName());
-        LOG.info("Sending to: " + sendDestination);
-
-        MessageProducer producer = session.createProducer(sendDestination);
-        assertNotNull(producer);
-
-        int total = 10;
-        for (int i = 0; i < total; i++) {
-            producer.send(session.createTextMessage("message: " + i));
-        }
-
-        ///Thread.sleep(1000000);
-
-        messageList.assertMessagesArrived(total);
-
-        LOG.info("Received: " + messageList);
-    }
-    
-    public void testTempMirroredQueuesClearDown() throws Exception{
-        if (connection == null) {
-            connection = createConnection();
-        }
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue tempQueue = session.createTemporaryQueue();
-        RegionBroker rb = (RegionBroker) broker.getBroker().getAdaptor(
-                RegionBroker.class);
-        assertTrue(rb.getDestinationMap().size()==4);
-        tempQueue.delete();
-        assertTrue(rb.getDestinationMap().size()==3);        
-    }
-
-    protected Destination createConsumeDestination() {
-        return new ActiveMQTopic("VirtualTopic.Mirror." + getQueueName());
-    }
-
-    protected String getQueueName() {
-        return "My.Queue";
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setUseMirroredQueues(true);
-        answer.setPersistent(isPersistent());
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueUsingVirtualTopicQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueUsingVirtualTopicQueueTest.java
deleted file mode 100644
index f8cccf4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueUsingVirtualTopicQueueTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- *
- * 
- */
-public class MirroredQueueUsingVirtualTopicQueueTest extends MirroredQueueTest {
-
-    @Override
-    protected Destination createConsumeDestination() {
-        String queueName = "Consumer.A.VirtualTopic.Mirror." + getQueueName();
-        return new ActiveMQQueue(queueName);
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java
deleted file mode 100644
index 42e6e60..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import java.util.Vector;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-
-/**
- *
- * 
- */
-public class VirtualTopicPubSubTest extends EmbeddedBrokerTestSupport {
-
-    private Vector<Connection> connections = new Vector<Connection>();
-    public int ackMode = Session.AUTO_ACKNOWLEDGE;
-
-    public static Test suite() {
-        return suite(VirtualTopicPubSubTest.class);
-    }
-
-    public void initCombosForTestVirtualTopicCreation() {
-        addCombinationValues("ackMode", new Object[] {new Integer(Session.AUTO_ACKNOWLEDGE), new Integer(Session.CLIENT_ACKNOWLEDGE) });
-    }
-
-    private boolean doneTwice = false;
-
-	public void testVirtualTopicCreation() throws Exception {
-	  doTestVirtualTopicCreation(10);
-	}
-
-	public void doTestVirtualTopicCreation(int total) throws Exception {
-
-        ConsumerBean messageList = new ConsumerBean() {
-            public synchronized void onMessage(Message message) {
-                super.onMessage(message);
-                if (ackMode == Session.CLIENT_ACKNOWLEDGE) {
-                    try {
-                        message.acknowledge();
-                    } catch (JMSException e) {
-                        e.printStackTrace();
-                    }
-                }
-
-            }
-        };
-        messageList.setVerbose(true);
-
-        String queueAName = getVirtualTopicConsumerName();
-        // create consumer 'cluster'
-        ActiveMQQueue queue1 = new ActiveMQQueue(queueAName);
-        ActiveMQQueue queue2 = new ActiveMQQueue(queueAName);
-  
-        Session session = createStartAndTrackConnection().createSession(false, ackMode);
-        MessageConsumer c1 = session.createConsumer(queue1);
-         
-        session = createStartAndTrackConnection().createSession(false, ackMode);
-        MessageConsumer c2 = session.createConsumer(queue2);
-
-        c1.setMessageListener(messageList);
-        c2.setMessageListener(messageList);
-
-        // create topic producer
-        Session producerSession = createStartAndTrackConnection().createSession(false, ackMode);
-        MessageProducer producer = producerSession.createProducer(new ActiveMQTopic(getVirtualTopicName()));
-        assertNotNull(producer);
-
-        for (int i = 0; i < total; i++) {
-            producer.send(producerSession.createTextMessage("message: " + i));
-        }
-
-        messageList.assertMessagesArrived(total);
-
-        // do twice so we confirm messages do not get redelivered after client acknowledgement
-        if( doneTwice == false ) {
-            doneTwice = true;
-            doTestVirtualTopicCreation(0);
-		}
-    }
-
-    private Connection createStartAndTrackConnection() throws Exception {
-        Connection connection = createConnection();
-        connection.start();
-        connections.add(connection);
-        return connection;
-    }
-
-    protected String getVirtualTopicName() {
-        return "VirtualTopic.TEST";
-    }
-
-    protected String getVirtualTopicConsumerName() {
-        return "Consumer.A.VirtualTopic.TEST";
-    }
-
-
-    protected void tearDown() throws Exception {
-        for (Connection connection: connections) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java
deleted file mode 100644
index 6952331..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import java.net.URI;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.XBeanBrokerFactory;
-
-/**
- *
- * 
- */
-public class VirtualTopicPubSubUsingXBeanTest extends VirtualTopicPubSubTest {
-
-    protected String getVirtualTopicConsumerName() {
-        return "VirtualTopicConsumers.ConsumerNumberOne.FOO";
-    }
-
-    protected String getVirtualTopicName() {
-        return "FOO";
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        XBeanBrokerFactory factory = new XBeanBrokerFactory();
-        BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri()));
-        
-        // lets disable persistence as we are a test
-        answer.setPersistent(false);
-        
-        return answer;
-    }
-
-    protected String getBrokerConfigUri() {
-        return "org/apache/activemq/broker/virtual/global-virtual-topics.xml";
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java
deleted file mode 100644
index 3287bab..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualDestination;
-import org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualTopic;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class VirtualTopicSelectorTest extends CompositeTopicTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(VirtualTopicSelectorTest.class);
-            
-    protected Destination getConsumer1Dsetination() {
-        return new ActiveMQQueue("Consumer.1.VirtualTopic.TEST");
-    }
-
-    protected Destination getConsumer2Dsetination() {
-        return new ActiveMQQueue("Consumer.2.VirtualTopic.TEST");
-    }
-    
-    protected Destination getProducerDestination() {
-        return new ActiveMQTopic("VirtualTopic.TEST");
-    }
-    
-    @Override
-    protected void assertMessagesArrived(ConsumerBean messageList1, ConsumerBean messageList2) {
-        messageList1.assertMessagesArrived(total/2);
-        messageList2.assertMessagesArrived(total/2);
- 
-        messageList1.flushMessages();
-        messageList2.flushMessages();
-        
-        LOG.info("validate no other messages on queues");
-        try {
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                
-            Destination destination1 = getConsumer1Dsetination();
-            Destination destination2 = getConsumer2Dsetination();
-            MessageConsumer c1 = session.createConsumer(destination1, null);
-            MessageConsumer c2 = session.createConsumer(destination2, null);
-            c1.setMessageListener(messageList1);
-            c2.setMessageListener(messageList2);
-            
-            
-            LOG.info("send one simple message that should go to both consumers");
-            MessageProducer producer = session.createProducer(getProducerDestination());
-            assertNotNull(producer);
-            
-            producer.send(session.createTextMessage("Last Message"));
-            
-            messageList1.assertMessagesArrived(1);
-            messageList2.assertMessagesArrived(1);
-        
-        } catch (JMSException e) {
-            e.printStackTrace();
-            fail("unexpeced ex while waiting for last messages: " + e);
-        }
-    }
-    
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        // use message selectors on consumers that need to propagate up to the virtual
-        // topic dispatch so that un matched messages do not linger on subscription queues
-        messageSelector1 = "odd = 'yes'";
-        messageSelector2 = "odd = 'no'";
-        
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-
-        VirtualTopic virtualTopic = new VirtualTopic();
-        // the new config that enables selectors on the intercepter
-        virtualTopic.setSelectorAware(true);
-        VirtualDestinationInterceptor interceptor = new VirtualDestinationInterceptor();
-        interceptor.setVirtualDestinations(new VirtualDestination[]{virtualTopic});
-        broker.setDestinationInterceptors(new DestinationInterceptor[]{interceptor});
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicsAndDurableSubsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicsAndDurableSubsTest.java
deleted file mode 100644
index d1e709f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicsAndDurableSubsTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.broker.virtual;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.broker.jmx.MBeanTest;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-
-public class VirtualTopicsAndDurableSubsTest extends MBeanTest {
-
-    private Connection connection;
-
-    public void testVirtualTopicCreationAndDurableSubs() throws Exception {
-        if (connection == null) {
-            connection = createConnection();
-        }
-        connection.setClientID(getAClientID());
-        connection.start();
-
-        ConsumerBean messageList = new ConsumerBean();
-        messageList.setVerbose(true);
-        
-        String queueAName = getVirtualTopicConsumerName();
-        // create consumer 'cluster'
-        ActiveMQQueue queue1 = new ActiveMQQueue(queueAName);
-        ActiveMQQueue queue2 = new ActiveMQQueue(queueAName);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer c1 = session.createConsumer(queue1);
-        MessageConsumer c2 = session.createConsumer(queue2);
-
-        c1.setMessageListener(messageList);
-        c2.setMessageListener(messageList);
-
-        // create topic producer
-        MessageProducer producer = session.createProducer(new ActiveMQTopic(getVirtualTopicName()));
-        assertNotNull(producer);
-
-        int total = 10;
-        for (int i = 0; i < total; i++) {
-            producer.send(session.createTextMessage("message: " + i));
-        }
-        messageList.assertMessagesArrived(total);
-        
-        //Add and remove durable subscriber after using VirtualTopics
-        assertCreateAndDestroyDurableSubscriptions();
-    }
-
-    protected String getAClientID(){
-    	return "VirtualTopicCreationAndDurableSubs";
-    }
-
-    protected String getVirtualTopicName() {
-        return "VirtualTopic.TEST";
-    }
-
-
-    protected String getVirtualTopicConsumerName() {
-        return "Consumer.A.VirtualTopic.TEST";
-    }
-
-    protected String getDurableSubscriberName(){
-    	return "Sub1";
-    }
-    
-    protected String getDurableSubscriberTopicName(){
-    	return "simple.topic";
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-    
-    //Overrides test cases from MBeanTest to avoid having them run.
-    public void testMBeans() throws Exception {}
-    public void testMoveMessages() throws Exception {}
-    public void testRetryMessages() throws Exception {}
-    public void testMoveMessagesBySelector() throws Exception {}
-    public void testCopyMessagesBySelector() throws Exception {}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1282.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1282.java
deleted file mode 100644
index 779af4e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1282.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import junit.framework.TestCase;
-/**
- * An AMQ-1282 Test
- * 
- */
-public class AMQ1282 extends TestCase {
-    private ConnectionFactory factory;
-    private Connection connection;
-    private MapMessage message;
-
-    protected void setUp() throws Exception {
-        factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        message = session.createMapMessage();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        connection.close();
-        super.tearDown();
-    }
-
-    public void testUnmappedBooleanMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = Boolean.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            Boolean actual = message.getBoolean("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            assertEquals(expected, ex);
-        }
-    }
-
-    public void testUnmappedIntegerMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = Integer.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            Integer actual = message.getInt("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            Class aClass = expected.getClass();
-            assertTrue(aClass.isInstance(ex));
-        }
-    }
-
-    public void testUnmappedShortMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = Short.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            Short actual = message.getShort("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            Class aClass = expected.getClass();
-            assertTrue(aClass.isInstance(ex));
-        }
-    }
-
-    public void testUnmappedLongMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = Long.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            Long actual = message.getLong("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            Class aClass = expected.getClass();
-            assertTrue(aClass.isInstance(ex));
-        }
-    }
-
-    public void testUnmappedStringMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = String.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            String actual = message.getString("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            Class aClass = expected.getClass();
-            assertTrue(aClass.isInstance(ex));
-        }
-    }
-
-    public void testUnmappedCharMessage() throws JMSException {
-        try {
-            message.getChar("foo");
-            fail("should have thrown NullPointerException");
-        } catch (NullPointerException success) {
-            assertNotNull(success);
-        }
-    }
-
-    public void testUnmappedByteMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = Byte.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            Byte actual = message.getByte("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            Class aClass = expected.getClass();
-            assertTrue(aClass.isInstance(ex));
-        }
-    }
-
-    public void testUnmappedDoubleMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = Double.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            Double actual = message.getDouble("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            Class aClass = expected.getClass();
-            assertTrue(aClass.isInstance(ex));
-        }
-    }
-
-    public void testUnmappedFloatMessage() throws JMSException {
-        Object expected;
-        try {
-            expected = Float.valueOf(null);
-        } catch (Exception ex) {
-            expected = ex;
-        }
-        try {
-            Float actual = message.getFloat("foo");
-            assertEquals(expected, actual);
-        } catch (Exception ex) {
-            Class aClass = expected.getClass();
-            assertTrue(aClass.isInstance(ex));
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1687Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1687Test.java
deleted file mode 100644
index 0ea4dba..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1687Test.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-
-/**
- * 
- * 
- */
-public class AMQ1687Test extends EmbeddedBrokerTestSupport {
-
-    private Connection connection;
-
-    @Override
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        //prefetch change is not required, but test will not fail w/o it, only spew errors in the AMQ log.
-        return new ActiveMQConnectionFactory(this.bindAddress+"?jms.prefetchPolicy.all=5");
-        //return super.createConnectionFactory();
-        //return new ActiveMQConnectionFactory("tcp://localhost:61616");
-    }
-    
-    public void testVirtualTopicCreation() throws Exception {
-        if (connection == null) {
-            connection = createConnection();
-        }
-        connection.start();
-
-        ConsumerBean messageList = new ConsumerBean();
-        messageList.setVerbose(true);
-        
-        String queueAName = getVirtualTopicConsumerName();
-        String queueBName = getVirtualTopicConsumerNameB();
-        
-        // create consumer 'cluster'
-        ActiveMQQueue queue1 = new ActiveMQQueue(queueAName);
-        ActiveMQQueue queue2 = new ActiveMQQueue(queueBName);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer c1 = session.createConsumer(queue1);
-        MessageConsumer c2 = session.createConsumer(queue2);
-
-        c1.setMessageListener(messageList);
-        c2.setMessageListener(messageList);
-
-        // create topic producer
-        ActiveMQTopic topic = new ActiveMQTopic(getVirtualTopicName());
-        MessageProducer producer = session.createProducer(topic);
-        assertNotNull(producer);
-
-        int total = 100;
-        for (int i = 0; i < total; i++) {
-            producer.send(session.createTextMessage("message: " + i));
-        }
-        
-        messageList.assertMessagesArrived(total*2);
-    }
-
-
-    protected String getVirtualTopicName() {
-        return "VirtualTopic.TEST";
-    }
-
-
-    protected String getVirtualTopicConsumerName() {
-        return "Consumer.A.VirtualTopic.TEST";
-    }
-
-    protected String getVirtualTopicConsumerNameB() {
-        return "Consumer.B.VirtualTopic.TEST";
-    }
-    
-    
-    protected void setUp() throws Exception {
-        this.bindAddress="tcp://localhost:61616";
-        super.setUp();
-    }
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java
deleted file mode 100644
index b0e6ddf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.ArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.Connection;
-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.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This is a test case for the issue reported at:
- * https://issues.apache.org/activemq/browse/AMQ-1866
- * 
- * If you have a JMS producer sending messages to multiple fast consumers and 
- * one slow consumer, eventually all consumers will run as slow as 
- * the slowest consumer.  
- */
-public class AMQ1866 extends TestCase {
-
-    private static final Logger log = LoggerFactory.getLogger(ConsumerThread.class);
-    private BrokerService brokerService;
-    private ArrayList<Thread> threads = new ArrayList<Thread>();
-    
-    String ACTIVEMQ_BROKER_BIND = "tcp://localhost:61616";    
-    String ACTIVEMQ_BROKER_URI = "tcp://localhost:61616";
-    
-    AtomicBoolean shutdown = new AtomicBoolean();
-    private ActiveMQQueue destination;
-
-    @Override
-    protected void setUp() throws Exception {
-        // Start an embedded broker up.
-        brokerService = new BrokerService();
-        AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
-        adaptor.setIndexBinSize(4096);
-        brokerService.setPersistenceAdapter(adaptor);
-        brokerService.deleteAllMessages();
-        
-        // A small max page size makes this issue occur faster.
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry pe = new PolicyEntry();
-        pe.setMaxPageSize(1);
-        policyMap.put(new ActiveMQQueue(">"), pe);
-        brokerService.setDestinationPolicy(policyMap);
-        
-        brokerService.addConnector(ACTIVEMQ_BROKER_BIND);
-        brokerService.start();
-        destination = new ActiveMQQueue(getName());
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-        // Stop any running threads.
-        shutdown.set(true);
-        for (Thread t : threads) {
-            t.interrupt();
-            t.join();
-        }        
-        brokerService.stop();
-    }
-
-    public void testConsumerSlowDownPrefetch0() throws Exception {
-        ACTIVEMQ_BROKER_URI = "tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=0";
-        doTestConsumerSlowDown();
-    }
-
-    public void testConsumerSlowDownPrefetch10() throws Exception {
-        ACTIVEMQ_BROKER_URI = "tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=10";
-        doTestConsumerSlowDown();
-    }
-    
-    public void testConsumerSlowDownDefaultPrefetch() throws Exception {
-        ACTIVEMQ_BROKER_URI = "tcp://localhost:61616";
-        doTestConsumerSlowDown();
-    }
-
-    public void doTestConsumerSlowDown() throws Exception {
-        
-        // Preload the queue.
-        produce(20000);
-        
-        Thread producer = new Thread() {
-            @Override
-            public void run() {
-                try {
-                    while(!shutdown.get()) {
-                        produce(1000);
-                    }
-                } catch (Exception e) {
-                }
-            }
-        };
-        threads.add(producer);
-        producer.start();
-        
-        // This is the slow consumer.
-        ConsumerThread c1 = new ConsumerThread("Consumer-1");
-        threads.add(c1);
-        c1.start();
-
-        // Wait a bit so that the slow consumer gets assigned most of the messages.
-        Thread.sleep(500);
-        ConsumerThread c2 = new ConsumerThread("Consumer-2");
-        threads.add(c2);
-        c2.start();
-
-        int totalReceived = 0;
-        for ( int i=0; i < 30; i++) {
-            Thread.sleep(1000);
-            long c1Counter = c1.counter.getAndSet(0);
-            long c2Counter = c2.counter.getAndSet(0);
-            System.out.println("c1: "+c1Counter+", c2: "+c2Counter);
-            totalReceived += c1Counter;
-            totalReceived += c2Counter;
-            
-            // Once message have been flowing for a few seconds, start asserting that c2 always gets messages.  It should be receiving about 100 / sec
-            if( i > 10 ) {
-                assertTrue("Total received=" + totalReceived + ", Consumer 2 should be receiving new messages every second.", c2Counter > 0);
-            }
-        }
-    }    
-    
-    public void produce(int count) throws Exception {
-        Connection connection=null;
-        try {
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(ACTIVEMQ_BROKER_URI);
-            factory.setDispatchAsync(true);
-            
-            connection = factory.createConnection();
-            
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(destination);
-            connection.start();
-            
-            for( int i=0 ; i< count; i++ ) {
-                producer.send(session.createTextMessage(getName()+" Message "+(++i)));
-            }
-            
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable e) {
-            }
-        }
-    }
-    
-    public class ConsumerThread extends Thread {
-        final AtomicLong counter = new AtomicLong();
-
-        public ConsumerThread(String threadId) {
-            super(threadId);
-        }
-
-        public void run() {
-            Connection connection=null;
-            try {
-                log.debug(getName() + ": is running");
-                
-                ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(ACTIVEMQ_BROKER_URI);
-                factory.setDispatchAsync(true);
-                
-                connection = factory.createConnection();
-                
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                MessageConsumer consumer = session.createConsumer(destination);
-                connection.start();
-                
-                while (!shutdown.get()) {
-                    TextMessage msg = (TextMessage)consumer.receive(1000);
-                    if ( msg!=null ) {
-                        int sleepingTime;
-                        if (getName().equals("Consumer-1")) {
-                            sleepingTime = 1000 * 1000;
-                        } else {
-                            sleepingTime = 1; 
-                        }
-                        counter.incrementAndGet();
-                        Thread.sleep(sleepingTime);
-                    }
-                }
-                
-            } catch (Exception e) {
-            } finally {
-                log.debug(getName() + ": is stopping");
-                try {
-                    connection.close();
-                } catch (Throwable e) {
-                }
-            }
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java
deleted file mode 100644
index f5ccd50..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- * 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.bugs;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-public class AMQ1893Test extends TestCase {
-
-    private static final Logger log = LoggerFactory.getLogger(AMQ1893Test.class);
-
-    static final String QUEUE_NAME = "TEST";
-
-    static final int MESSAGE_COUNT_OF_ONE_GROUP = 10000;
-
-    static final int[] PRIORITIES = new int[]{0, 5, 10};
-
-    static final boolean debug = false;
-
-    private BrokerService brokerService;
-
-    private ActiveMQQueue destination;
-
-    @Override
-    protected void setUp() throws Exception {
-        brokerService = new BrokerService();
-        brokerService.setDeleteAllMessagesOnStartup(true);
-        brokerService.addConnector("tcp://localhost:0");
-        brokerService.start();
-        destination = new ActiveMQQueue(QUEUE_NAME);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        // Stop any running threads.
-        brokerService.stop();
-    }
-
-
-    public void testProduceConsumeWithSelector() throws Exception {
-        new TestProducer().produceMessages();
-        new TestConsumer().consume();
-    }
-
-    
-    class TestProducer {
-
-        public void produceMessages() throws Exception {
-            ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
-                    brokerService.getTransportConnectors().get(0).getConnectUri().toString()
-            );
-            Connection connection = connectionFactory.createConnection();
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Destination destination = session.createQueue(QUEUE_NAME);
-            MessageProducer producer = session.createProducer(destination);
-            producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-            long start = System.currentTimeMillis();
-
-            for (int priority : PRIORITIES) {
-
-                String name = null;
-                if (priority == 10) {
-                    name = "high";
-                } else if (priority == 5) {
-                    name = "mid";
-                } else {
-                    name = "low";
-                }
-
-                for (int i = 1; i <= MESSAGE_COUNT_OF_ONE_GROUP; i++) {
-
-                    TextMessage message = session.createTextMessage(name + "_" + i);
-                    message.setIntProperty("priority", priority);
-
-                    producer.send(message);
-                }
-            }
-
-            long end = System.currentTimeMillis();
-
-            log.info("sent " + (MESSAGE_COUNT_OF_ONE_GROUP * 3) + " messages in " + (end - start) + " ms");
-
-            producer.close();
-            session.close();
-            connection.close();
-        }
-    }
-
-    class TestConsumer {
-
-        private CountDownLatch finishLatch = new CountDownLatch(1);
-
-
-
-        public void consume() throws Exception {
-            ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
-                    brokerService.getTransportConnectors().get(0).getConnectUri().toString()
-            );
-
-
-            final int totalMessageCount = MESSAGE_COUNT_OF_ONE_GROUP * PRIORITIES.length;
-            final AtomicInteger counter = new AtomicInteger();
-            final MessageListener listener = new MessageListener() {
-                public void onMessage(Message message) {
-
-                    if (debug) {
-                        try {
-                            log.info(((TextMessage) message).getText());
-                        } catch (JMSException e) {
-                            e.printStackTrace();
-                        }
-                    }
-
-                    if (counter.incrementAndGet() == totalMessageCount) {
-
-                            finishLatch.countDown();
-
-                    }
-                }
-            };
-
-            int consumerCount = PRIORITIES.length;
-            Connection[] connections = new Connection[consumerCount];
-            Session[] sessions = new Session[consumerCount];
-            MessageConsumer[] consumers = new MessageConsumer[consumerCount];
-
-            for (int i = 0; i < consumerCount; i++) {
-                String selector = "priority = " + PRIORITIES[i];
-
-                connections[i] = connectionFactory.createConnection();
-                sessions[i] = connections[i].createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-                consumers[i] = sessions[i].createConsumer(destination, selector);
-                consumers[i].setMessageListener(listener);
-            }
-
-            for (Connection connection : connections) {
-                connection.start();
-            }
-
-            log.info("received " + counter.get() + " messages");
-
-            assertTrue("got all messages in time", finishLatch.await(60, TimeUnit.SECONDS));
-
-            log.info("received " + counter.get() + " messages");
-
-            for (MessageConsumer consumer : consumers) {
-                consumer.close();
-            }
-
-            for (Session session : sessions) {
-                session.close();
-            }
-
-            for (Connection connection : connections) {
-                connection.close();
-            }
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1917Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1917Test.java
deleted file mode 100644
index 8eb8059..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1917Test.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * 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.bugs;
-
-import junit.framework.TestCase;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-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.ActiveMQDestination;
-
-
-public class AMQ1917Test extends TestCase {
-
-        private static final int NUM_MESSAGES = 4000;
-        private static final int NUM_THREADS = 10;
-        public static final String REQUEST_QUEUE = "mock.in.queue";
-        public static final String REPLY_QUEUE = "mock.out.queue";
-
-        Destination requestDestination = ActiveMQDestination.createDestination(
-                REQUEST_QUEUE, ActiveMQDestination.QUEUE_TYPE);
-        Destination replyDestination = ActiveMQDestination.createDestination(
-                REPLY_QUEUE, ActiveMQDestination.QUEUE_TYPE);
-
-        CountDownLatch roundTripLatch = new CountDownLatch(NUM_MESSAGES);
-        CountDownLatch errorLatch = new CountDownLatch(1);
-        ThreadPoolExecutor tpe;
-        final String BROKER_URL = "tcp://localhost:61616";
-        BrokerService broker = null;
-        private boolean working = true;
-        
-        // trival session/producer pool
-        final Session[] sessions = new Session[NUM_THREADS];
-        final MessageProducer[] producers = new MessageProducer[NUM_THREADS];
-
-        public void setUp() throws Exception {
-            broker = new BrokerService();
-            broker.setPersistent(false);
-            broker.addConnector(BROKER_URL);
-            broker.start();
-            
-            BlockingQueue<Runnable> queue = new ArrayBlockingQueue<Runnable>(10000);
-            tpe = new ThreadPoolExecutor(NUM_THREADS, NUM_THREADS, 60000,
-                    TimeUnit.MILLISECONDS, queue);
-            ThreadFactory limitedthreadFactory = new LimitedThreadFactory(tpe.getThreadFactory());  
-            tpe.setThreadFactory(limitedthreadFactory);
-        }
-
-        public void tearDown() throws Exception {
-            broker.stop();
-            tpe.shutdown();
-        }
-        
-        public void testLoadedSendRecieveWithCorrelationId() throws Exception {            
-           
-            ActiveMQConnectionFactory connectionFactory = new org.apache.activemq.ActiveMQConnectionFactory();
-            connectionFactory.setBrokerURL(BROKER_URL);
-            Connection connection = connectionFactory.createConnection();          
-            setupReceiver(connection);
-
-            connection = connectionFactory.createConnection();
-            connection.start();
-            
-            // trival session/producer pool   
-            for (int i=0; i<NUM_THREADS; i++) {
-                sessions[i] = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                producers[i] = sessions[i].createProducer(requestDestination);
-            }
-            
-            for (int i = 0; i < NUM_MESSAGES; i++) {
-                MessageSenderReceiver msr = new MessageSenderReceiver(requestDestination,
-                        replyDestination, "Test Message : " + i);
-                tpe.execute(msr);
-            }
-            
-            while (!roundTripLatch.await(4000, TimeUnit.MILLISECONDS)) {
-                if (errorLatch.await(1000, TimeUnit.MILLISECONDS)) {
-                    fail("there was an error, check the console for thread or thread allocation failure");
-                    break;
-                }
-            }
-            working = false;
-        }
-
-        private void setupReceiver(final Connection connection) throws Exception {
-
-            final Session session = connection.createSession(false,
-                    Session.AUTO_ACKNOWLEDGE);
-            final MessageConsumer consumer = session
-                    .createConsumer(requestDestination);
-            final MessageProducer sender = session.createProducer(replyDestination);
-            connection.start();
-
-            new Thread() {
-                public void run() {
-                    while (working) {
-                        // wait for messages in infinitive loop
-                        // time out is set to show the client is awaiting
-                        try {
-                            TextMessage msg = (TextMessage) consumer.receive(20000);
-                            if (msg == null) {
-                                errorLatch.countDown();
-                                fail("Response timed out." 
-                                        + " latchCount=" + roundTripLatch.getCount());
-                            } else {
-                                String result = msg.getText();
-                                //System.out.println("Request:" + (i++)
-                                //        + ", msg=" + result + ", ID" + msg.getJMSMessageID());
-                                TextMessage response = session.createTextMessage();
-                                response.setJMSCorrelationID(msg.getJMSMessageID());
-                                response.setText(result);
-                                sender.send(response);
-                            }
-                        } catch (JMSException e) {
-                            if (working) {
-                                errorLatch.countDown();
-                                fail("Unexpected exception:" + e);
-                            }
-                        }
-                    }
-                }
-            }.start();
-        }
-
-        class MessageSenderReceiver implements Runnable {
-
-            Destination reqDest;
-            Destination replyDest;
-            String origMsg;
-
-            public MessageSenderReceiver(Destination reqDest,
-                    Destination replyDest, String msg) throws Exception {
-                this.replyDest = replyDest;
-                this.reqDest = reqDest;
-                this.origMsg = msg;
-            }
-
-            private int getIndexFromCurrentThread() {
-                String name = Thread.currentThread().getName();
-                String num = name.substring(name.lastIndexOf('-') +1);
-                int idx = Integer.parseInt(num) -1;
-                assertTrue("idx is in range: idx=" + idx,  idx < NUM_THREADS);
-                return idx;
-            }
-
-            public void run() {
-                try {
-                    // get thread session and producer from pool
-                    int threadIndex = getIndexFromCurrentThread();
-                    Session session = sessions[threadIndex];
-                    MessageProducer producer = producers[threadIndex];
-
-                    final Message sendJmsMsg = session.createTextMessage(origMsg);
-                    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                    producer.send(sendJmsMsg);
-
-                    String jmsId = sendJmsMsg.getJMSMessageID();
-                    String selector = "JMSCorrelationID='" + jmsId + "'";
-
-                    MessageConsumer consumer = session.createConsumer(replyDest,
-                            selector);
-                    Message receiveJmsMsg = consumer.receive(2000);
-                    consumer.close();
-                    if (receiveJmsMsg == null) {
-                        errorLatch.countDown();
-                        fail("Unable to receive response for:" + origMsg
-                                + ", with selector=" + selector);
-                    } else {
-                        //System.out.println("received response message :"
-                        //        + ((TextMessage) receiveJmsMsg).getText()
-                        //        + " with selector : " + selector);
-                        roundTripLatch.countDown();
-                    }
-                } catch (JMSException e) {
-                    fail("unexpected exception:" + e);
-                }
-            }
-        }
-        
-        public class LimitedThreadFactory implements ThreadFactory {
-            int threadCount;
-            private ThreadFactory factory;
-            public LimitedThreadFactory(ThreadFactory threadFactory) {
-                this.factory = threadFactory;
-            }
-
-            public Thread newThread(Runnable arg0) {
-                if (++threadCount > NUM_THREADS) {
-                    errorLatch.countDown();
-                    fail("too many threads requested");
-                }       
-                return factory.newThread(arg0);
-            }
-        }
-    }
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1936Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1936Test.java
deleted file mode 100644
index efaa5c4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1936Test.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * 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.bugs;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.AutoFailTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.Wait;
-import org.apache.log4j.Logger;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.TextMessage;
-import javax.naming.NamingException;
-import junit.framework.TestCase;
-/**
- * A AMQ1936Test
- *
- */
-public class AMQ1936Test extends TestCase{
-    private final static Logger logger = Logger.getLogger( AMQ1936Test.class );
-    private final static String TEST_QUEUE_NAME     = "dynamicQueues/duplicate.message.test.queue";
-    ////--
-    //
-    private final static long TEST_MESSAGE_COUNT    = 6000;    // The number of test messages to use
-    //
-    ////--
-    private final static int CONSUMER_COUNT         = 2;        // The number of message receiver instances
-    private final static boolean TRANSACTED_RECEIVE = true; // Flag used by receiver which indicates messages should be processed within a JMS transaction
-
-    private ThreadPoolExecutor threadPool           = new ThreadPoolExecutor( CONSUMER_COUNT,CONSUMER_COUNT, Long.MAX_VALUE,TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>() );
-    private ThreadedMessageReceiver[] receivers     = new ThreadedMessageReceiver[ CONSUMER_COUNT ];
-    private BrokerService broker                    = null;
-    static QueueConnectionFactory connectionFactory = null;
-   
-   
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        
-        broker = new BrokerService();
-        broker.getSystemUsage().getMemoryUsage().setLimit(5*1024*1024);
-        broker.setBrokerName("test");
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.start();
-        connectionFactory        = new ActiveMQConnectionFactory("vm://test");;
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        
-        if( threadPool!=null ) {
-            // signal receivers to stop
-            for( ThreadedMessageReceiver receiver: receivers) {
-                receiver.setShouldStop( true );
-            }
-            
-            logger.info("Waiting for receivers to shutdown..");
-            if( ! threadPool.awaitTermination( 10, TimeUnit.SECONDS ) ) {
-                logger.warn("Not all receivers completed shutdown.");
-            } else {
-                logger.info("All receivers shutdown successfully..");
-            }
-        }
-        
-        logger.debug("Stoping the broker.");
-        
-        if( broker!=null ) {
-            broker.stop();
-        }
-    }
-    
-    private void sendTextMessage( String queueName, int i ) throws JMSException, NamingException {
-        QueueConnectionFactory connectionFactory        = new ActiveMQConnectionFactory("vm://test");
-        QueueConnection queueConnection                 = null;
-        QueueSession session                            = null;
-        QueueSender sender                              = null;
-        Queue queue                                     = null;
-        TextMessage message                                 = null;
-        
-        try {
-            
-            // Create the queue connection
-            queueConnection = connectionFactory.createQueueConnection();
-    
-            session = queueConnection.createQueueSession( false, QueueSession.AUTO_ACKNOWLEDGE );
-            queue = session.createQueue(TEST_QUEUE_NAME);
-            sender = session.createSender( queue );
-            sender.setDeliveryMode( DeliveryMode.PERSISTENT );
-
-            message = session.createTextMessage( String.valueOf(i) );
-            
-            // send the message
-            sender.send( message );
-    
-            if( session.getTransacted()) {
-                session.commit();
-            }
-            if (i%1000 == 0) {
-                logger.info( "Message successfully sent to : " + queue.getQueueName( ) + " messageid: " + message.getJMSMessageID( )
-                        + " content:" + message.getText());
-            }
-        } finally {
-            if( sender!=null ) {
-                sender.close();
-            }
-            if( session!=null ) {
-                session.close();
-            }
-            if( queueConnection!=null ) {
-                queueConnection.close();
-            }
-        }
-    }
-     
-    
-    public void testForDuplicateMessages( ) throws Exception {
-        final ConcurrentHashMap<String,String> messages = new ConcurrentHashMap<String, String>( );
-        final Object lock                               = new Object( );
-        final CountDownLatch duplicateSignal            = new CountDownLatch( 1 );
-        final AtomicInteger messageCount                = new AtomicInteger( 0 );
-        
-        // add 1/2 the number of our total messages
-        for( int i = 0; i < TEST_MESSAGE_COUNT/2; i++ ) {
-            if( duplicateSignal.getCount()==0 ) {
-                fail( "Duplicate message id detected" );
-            }
-            sendTextMessage( TEST_QUEUE_NAME, i );
-        }
-        
-        // create a number of consumers to read of the messages and start them with a handler which simply stores the message ids
-        // in a Map and checks for a duplicate
-        for( int i = 0; i < CONSUMER_COUNT; i++ ) {
-            receivers[i] = new ThreadedMessageReceiver(TEST_QUEUE_NAME, new IMessageHandler( ) {
-            
-                public void onMessage( Message message ) throws Exception {
-                    synchronized( lock ) {
-                        int current = messageCount.incrementAndGet();
-                        if (current % 1000 == 0) {
-                            logger.info( "Received message:" + message.getJMSMessageID() +  " with content: " + ((TextMessage)message).getText() );
-                        }
-                        if(  messages.containsKey( message.getJMSMessageID()) ) {
-                            duplicateSignal.countDown( );
-                            logger.fatal( "duplicate message id detected:" + message.getJMSMessageID() );
-                            fail( "Duplicate message id detected:" + message.getJMSMessageID() );
-                        } else {
-                            messages.put( message.getJMSMessageID(), message.getJMSMessageID() );
-                        }
-                    }
-                }
-            });
-            threadPool.submit( receivers[i]);
-        }
-        
-        // starting adding the remaining messages
-        for(int i = 0; i < TEST_MESSAGE_COUNT/2; i++ ) {
-            if( duplicateSignal.getCount()==0) {
-                fail( "Duplicate message id detected" );
-            }
-            sendTextMessage( TEST_QUEUE_NAME, i );
-        }
-        
-        logger.info("sent all " + TEST_MESSAGE_COUNT + " messages");
-        
-        // allow some time for messages to be delivered to receivers.
-        boolean ok = Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return TEST_MESSAGE_COUNT == messages.size();
-            }
-        }, 1*60*1000);
-        if (!ok) {
-            AutoFailTestSupport.dumpAllThreads("--STUCK?--");
-        }
-        assertEquals( "Number of messages received does not match the number sent", TEST_MESSAGE_COUNT, messages.size( ) );
-        assertEquals( TEST_MESSAGE_COUNT,  messageCount.get() );
-    }
-    
-    
-    
-    private final static class ThreadedMessageReceiver implements Runnable {
-       
-        private String queueName            = null;
-        private IMessageHandler handler     = null;
-        private AtomicBoolean shouldStop    = new AtomicBoolean( false );
-        
-        public ThreadedMessageReceiver(String queueName, IMessageHandler handler ) {
-         
-            this.queueName      = queueName;
-            this.handler        = handler;
-        }
-
-        public void run( ) {
-           
-            QueueConnection queueConnection                 = null;
-            QueueSession session                            = null;
-            QueueReceiver receiver                          = null;
-            Queue queue                                     = null;
-            Message message                                 = null;
-            try {
-                try {
-                 
-                    queueConnection = connectionFactory.createQueueConnection( );
-                    // create a transacted session
-                    session = queueConnection.createQueueSession( TRANSACTED_RECEIVE, QueueSession.AUTO_ACKNOWLEDGE );
-                    queue = session.createQueue(TEST_QUEUE_NAME);
-                    receiver = session.createReceiver( queue );
-
-                    // start the connection
-                    queueConnection.start( );
-                    
-                    logger.info( "Receiver " + Thread.currentThread().getName() + " connected." );
-                    
-                    // start receive loop
-                    while( ! ( shouldStop.get() || Thread.currentThread().isInterrupted()) ) {
-                        try {
-                            message = receiver.receive( 200 );
-                        } catch( Exception e) {
-                            //
-                            // ignore interrupted exceptions
-                            //
-                            if( e instanceof InterruptedException || e.getCause() instanceof InterruptedException ) {
-                                /* ignore */
-                            } else {
-                                throw e;
-                            }
-                        }
-                        
-                        if( message!=null && this.handler!=null ) {
-                            this.handler.onMessage(message);
-                        }
-                        
-                        // commit session on successful handling of message
-                        if( session.getTransacted()) {
-                            session.commit();
-                        }
-                    }
-                    
-                    logger.info( "Receiver " + Thread.currentThread().getName() + " shutting down." );
-                    
-                } finally {
-                    if( receiver!=null ) {
-                        try {
-                            receiver.close();
-                        } catch (JMSException e)  { 
-                            logger.warn(e); 
-                        }
-                    }
-                    if( session!=null ) {
-                        try {
-                            session.close();
-                        } catch (JMSException e)  { 
-                            logger.warn(e); 
-                        }
-                    }
-                    if( queueConnection!=null ) {
-                        queueConnection.close();
-                    }
-                }
-            } catch ( JMSException e ) {
-                logger.error(e);
-                e.printStackTrace();
-            } catch (NamingException e) {
-                logger.error(e);
-            } catch (Exception e) {
-                logger.error(e);
-                e.printStackTrace();
-            }
-        }
-
-        public Boolean getShouldStop() {
-            return shouldStop.get();
-        }
-
-        public void setShouldStop(Boolean shouldStop) {
-            this.shouldStop.set(shouldStop);
-        }
-    }
-    
-    public interface IMessageHandler {
-        void onMessage( Message message ) throws Exception;
-    }
-    
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java
deleted file mode 100644
index 71cba39..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2021Test.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/**
- * 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.bugs;
-
-import java.lang.Thread.UncaughtExceptionHandler;
-import java.util.ArrayList;
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-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.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This is a test case for the issue reported at:
- * https://issues.apache.org/activemq/browse/AMQ-2021 
- * Bug is modification of inflight message properties so the failure can manifest itself in a bunch
- * or ways, from message receipt with null properties to marshall errors
- */
-public class AMQ2021Test extends TestCase implements ExceptionListener, UncaughtExceptionHandler {
-
-    private static final Logger log = LoggerFactory.getLogger(AMQ2021Test.class);
-    BrokerService brokerService;
-    ArrayList<Thread> threads = new ArrayList<Thread>();
-    Vector<Throwable> exceptions;
-    
-    AMQ2021Test testCase;
-    
-    String ACTIVEMQ_BROKER_BIND = "tcp://localhost:61616";    
-    String ACTIVEMQ_BROKER_URL = ACTIVEMQ_BROKER_BIND + "?jms.redeliveryPolicy.maximumRedeliveries=1&jms.redeliveryPolicy.initialRedeliveryDelay=0";
-    
-    private int numMessages = 1000;
-    private int numConsumers = 2;
-    private int dlqMessages = numMessages/2;
-    
-    CountDownLatch receivedLatch;
-    private ActiveMQTopic destination;
-    public CountDownLatch started;
-
-    @Override
-    protected void setUp() throws Exception {
-        Thread.setDefaultUncaughtExceptionHandler(this);
-        testCase = this;
-        
-        // Start an embedded broker up.
-        brokerService = new BrokerService();
-        brokerService.setDeleteAllMessagesOnStartup(true);
-        brokerService.addConnector(ACTIVEMQ_BROKER_BIND);
-        brokerService.start();
-        destination = new ActiveMQTopic(getName());
-        exceptions = new Vector<Throwable>();
-        
-        receivedLatch = 
-            new CountDownLatch(numConsumers * (numMessages + dlqMessages));
-        started = new CountDownLatch(1);
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-        for (Thread t : threads) {
-            t.interrupt();
-            t.join();
-        }        
-        brokerService.stop();
-    }
-
-    public void testConcurrentTopicResendToDLQ() throws Exception {
-
-        for (int i=0; i<numConsumers;i++) {
-            ConsumerThread c1 = new ConsumerThread("Consumer-" + i);
-            threads.add(c1);
-            c1.start();
-        }
-        
-        assertTrue(started.await(10, TimeUnit.SECONDS));
-        
-        Thread producer = new Thread() {
-            @Override
-            public void run() {
-                try {
-                    produce(numMessages);
-                } catch (Exception e) {
-                }
-            }
-        };
-        threads.add(producer);
-        producer.start();
-        
-        boolean allGood = receivedLatch.await(30, TimeUnit.SECONDS);
-        for (Throwable t: exceptions) {
-            log.error("failing test with first exception", t);
-            fail("exception during test : " + t);
-        }        
-        assertTrue("excepted messages received within time limit", allGood);
-        
-        assertEquals(0, exceptions.size());
-    
-        for (int i=0; i<numConsumers; i++) {
-            // last recovery sends message to deq so is not received again
-            assertEquals(dlqMessages*2, ((ConsumerThread)threads.get(i)).recoveries);
-            assertEquals(numMessages + dlqMessages, ((ConsumerThread)threads.get(i)).counter);
-        }
-       
-        // half of the messages for each consumer should go to the dlq but duplicates will
-        // be suppressed
-        consumeFromDLQ(dlqMessages);
-        
-    }    
-    
-    private void consumeFromDLQ( int messageCount) throws Exception {
-        ActiveMQConnectionFactory connectionFactory = 
-            new ActiveMQConnectionFactory(ACTIVEMQ_BROKER_URL);
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-                    
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer dlqConsumer = session.createConsumer(new ActiveMQQueue("ActiveMQ.DLQ"));
-        int count = 0;
-        for (int i=0; i< messageCount; i++) {
-            if (dlqConsumer.receive(1000) == null) {
-                break;
-            }
-            count++;
-        }
-        assertEquals(messageCount, count);
-    }
-
-    public void produce(int count) throws Exception {
-        Connection connection=null;
-        try {
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(ACTIVEMQ_BROKER_BIND);
-            connection = factory.createConnection();
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(destination);
-            producer.setTimeToLive(0);
-            connection.start();
-            
-            for (int i=0 ; i< count; i++) {
-                int id = i+1;
-                TextMessage message = session.createTextMessage(getName()+" Message "+ id);
-                message.setIntProperty("MsgNumber", id);
-                producer.send(message);
-                
-                if (id % 500 == 0) {
-                    log.info("sent " + id + ", ith " + message);
-                }
-            }
-        } catch (JMSException e) {
-            log.error("unexpected ex on produce", e);
-            exceptions.add(e);
-        } finally {
-            try {
-                if (connection != null) {
-                    connection.close();
-                }
-            } catch (Throwable e) {
-            }
-        }
-    }
-    
-    public class ConsumerThread extends Thread implements MessageListener   {
-        public long counter = 0;
-        public long recoveries = 0;
-        private Session session;
-
-        public ConsumerThread(String threadId) {
-            super(threadId);
-        }
-
-        public void run() {
-            try {
-                ActiveMQConnectionFactory connectionFactory = 
-                    new ActiveMQConnectionFactory(ACTIVEMQ_BROKER_URL);
-                Connection connection = connectionFactory.createConnection();
-                connection.setExceptionListener(testCase);
-                connection.setClientID(getName());            
-                session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-                MessageConsumer consumer = session.createDurableSubscriber(destination, getName());                            
-                consumer.setMessageListener(this);
-                connection.start();
-                
-                started .countDown();
-            
-            } catch (JMSException exception) {
-                log.error("unexpected ex in consumer run", exception);
-                exceptions.add(exception);
-            }
-        }
-        
-        public void onMessage(Message message) {
-            try {
-                counter++;
-                int messageNumber=message.getIntProperty("MsgNumber");
-                if(messageNumber%2==0){
-                    session.recover();
-                    recoveries++;
-                } else {
-                    message.acknowledge();
-                }     
-                
-                if (counter % 200 == 0) {
-                    log.info("recoveries:" + recoveries + ", Received " + counter + ", counter'th " + message);
-                }
-                receivedLatch.countDown();
-            }catch (Exception e) {
-                log.error("unexpected ex on onMessage", e);
-                exceptions.add(e);
-            }
-        }
-        
-    }
-
-    public void onException(JMSException exception) {
-        log.info("Unexpected JMSException", exception);
-        exceptions.add(exception);
-    }
-
-    public void uncaughtException(Thread thread, Throwable exception) {
-        log.info("Unexpected exception from thread " + thread + ", ex: " + exception);
-        exceptions.add(exception);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java
deleted file mode 100644
index 832fd3e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import javax.naming.InitialContext;
-
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class AMQ2084Test {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2084Test.class);
-    BrokerService broker;
-    CountDownLatch qreceived;
-    
-    @Before
-    public void startBroker() throws Exception {
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.addConnector("tcp://localhost:61616");
-        broker.start();
-        
-        qreceived = new CountDownLatch(1);
-    }
-    
-    @After
-    public void stopBroker() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-    
-    public void listenQueue(final String queueName, final String selectors) {
-        try {
-            Properties props = new Properties();
-            props.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-            props.put("java.naming.provider.url", "tcp://localhost:61616");
-            props.put("queue.queueName", queueName);
-
-            javax.naming.Context ctx = new InitialContext(props);
-            QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
-            QueueConnection conn = factory.createQueueConnection();
-            final Queue queue = (Queue) ctx.lookup("queueName");
-            QueueSession session = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            QueueReceiver receiver = session.createReceiver(queue, selectors);
-            System.out.println("Message Selector: " + receiver.getMessageSelector());
-            receiver.setMessageListener(new MessageListener() {
-                public void onMessage(Message message) {
-                    try {
-                        if (message instanceof TextMessage) {
-                            TextMessage txtMsg = (TextMessage) message;
-                            String msg = txtMsg.getText();
-                            LOG.info("Queue Message Received: " + queueName + " - " + msg);
-                            qreceived.countDown();
-                            
-                        }
-                        message.acknowledge();
-                    } catch (Throwable e) {
-                        e.printStackTrace();
-                    }
-                }
-            });
-            conn.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void listenTopic(final String topicName, final String selectors) {
-        try {
-            Properties props = new Properties();
-            props.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-            props.put("java.naming.provider.url", "tcp://localhost:61616");
-            props.put("topic.topicName", topicName);
-
-            javax.naming.Context ctx = new InitialContext(props);
-            TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
-            TopicConnection conn = factory.createTopicConnection();
-            final Topic topic = (Topic) ctx.lookup("topicName");
-            TopicSession session = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-            TopicSubscriber receiver = session.createSubscriber(topic, selectors, false);
-
-            receiver.setMessageListener(new MessageListener() {
-                public void onMessage(Message message) {
-                    try {
-                        if (message instanceof TextMessage) {
-                            TextMessage txtMsg = (TextMessage) message;
-                            String msg = txtMsg.getText();
-                            LOG.info("Topic Message Received: " + topicName + " - " + msg);
-                        }
-                        message.acknowledge();
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-            });
-            conn.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void publish(String topicName, String message) {
-        try {
-            Properties props = new Properties();
-            props.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-            props.put("java.naming.provider.url", "tcp://localhost:61616");
-            props.put("topic.topicName", topicName);
-            javax.naming.Context ctx = new InitialContext(props);
-            TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
-            TopicConnection conn = factory.createTopicConnection();
-            Topic topic = (Topic) ctx.lookup("topicName");
-            TopicSession session = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-            TopicPublisher publisher = session.createPublisher(topic);
-            if (message != null) {
-                Message msg = session.createTextMessage(message);
-                publisher.send(msg);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Test
-    public void tryXpathSelectorMatch() throws Exception {
-        String xPath = "XPATH '//books//book[@lang=''en'']'";
-        listenQueue("Consumer.Sample.VirtualTopic.TestXpath", xPath);
-        publish("VirtualTopic.TestXpath", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><books><book lang=\"en\">ABC</book></books>");
-        assertTrue("topic received: ", qreceived.await(20, TimeUnit.SECONDS));        
-    }
-    
-    @Test
-    public void tryXpathSelectorNoMatch() throws Exception {
-        String xPath = "XPATH '//books//book[@lang=''es'']'";
-        listenQueue("Consumer.Sample.VirtualTopic.TestXpath", xPath);
-        publish("VirtualTopic.TestXpath", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><books><book lang=\"en\">ABC</book></books>");
-        assertFalse("topic did not receive unmatched", qreceived.await(5, TimeUnit.SECONDS));        
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java
deleted file mode 100644
index e8ffcb7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/**
- * 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.bugs;
-
-
-import java.lang.Thread.UncaughtExceptionHandler;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.RedeliveryPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2102Test extends CombinationTestSupport implements UncaughtExceptionHandler {
-       
-    final static int MESSAGE_COUNT = 12120;
-    final static int NUM_CONSUMERS = 10;
-    final static int CONSUME_ALL = -1;
-    
-    
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2102Test.class);
-    
-    private final static Map<Thread, Throwable> exceptions = new ConcurrentHashMap<Thread, Throwable>();
-    
-    private class Consumer implements Runnable, ExceptionListener {
-        private ActiveMQConnectionFactory connectionFactory;
-        private String name;
-        private String queueName;
-        private boolean running;
-        private org.omg.CORBA.IntHolder startup;
-        private Thread thread;
-        private final int numToProcessPerIteration;
-
-        Consumer(ActiveMQConnectionFactory connectionFactory, String queueName, org.omg.CORBA.IntHolder startup, int id, int numToProcess) {
-            this.connectionFactory = connectionFactory;
-            this.queueName = queueName;
-            this.startup = startup;
-            name = "Consumer-" + queueName + "-" + id;
-            numToProcessPerIteration = numToProcess;
-            thread = new Thread(this, name);
-        }
-
-        private String getClientId() {
-            try {
-                return InetAddress.getLocalHost().getHostName() + ":" + name;
-            } catch (UnknownHostException e) {
-                return "localhost:" + name;
-            }
-        }
-
-        synchronized boolean isRunning() {
-            return running;
-        }
-
-        void join() {
-            try {
-                thread.join(30000);
-            } catch (InterruptedException e) {
-                error("Interrupted waiting for " + name + " to stop", e);
-            }
-        }
-
-        public void onException(JMSException e) {
-            exceptions.put(Thread.currentThread(), e);
-            error("JMS exception: ", e);
-        }
-
-        private void processMessage(Session session, MessageProducer producer, Message message) throws Exception {
-            if (message instanceof TextMessage) {
-                TextMessage textMessage = (TextMessage) message;
-
-                Destination replyQueue = textMessage.getJMSReplyTo();
-                if (replyQueue != null) {
-                    TextMessage reply = session.createTextMessage("reply-" + textMessage.getText());
-                    
-                    reply.setJMSCorrelationID(textMessage.getJMSCorrelationID());
-                    
-                    producer.send(replyQueue, reply);
-                    debug("replied via " + replyQueue + " for message => " + textMessage.getText() + ", " + textMessage.getJMSMessageID());
-                } else {
-                    debug("no reply to message => " + textMessage.getText() + ", " + textMessage.getJMSMessageID());
-                }
-            } else {
-                error("Consumer cannot process " + message.getClass().getSimpleName());
-            }
-        }
-
-        private void processMessages() throws JMSException {
-            ActiveMQConnection connection = null;
-
-            try {
-                connection = (ActiveMQConnection) connectionFactory.createConnection();
-
-                RedeliveryPolicy policy = connection.getRedeliveryPolicy();
-
-                policy.setMaximumRedeliveries(6);
-                policy.setInitialRedeliveryDelay(1000);
-                policy.setUseCollisionAvoidance(false);
-                policy.setCollisionAvoidancePercent((short) 15);
-                policy.setUseExponentialBackOff(false);
-                policy.setBackOffMultiplier((short) 5);
-
-                connection.setClientID(getClientId());
-                connection.setExceptionListener(this);
-                connection.start();
-
-                processMessages(connection);
-            } finally {
-                connection.close();
-                connection = null;
-            }
-        }
-
-        private void processMessages(Connection connection) throws JMSException {
-            Session session = null;
-            try {
-                session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                if (numToProcessPerIteration > 0) {
-                    while(isRunning()) {
-                        processMessages(session);
-                    }
-                } else {
-                    processMessages(session);
-                }
-            } finally {
-                if (session != null) {
-                    session.close();
-                }
-            }
-        }
-        private void processMessages(Session session) throws JMSException {
-            MessageConsumer consumer = null;
-
-            try {
-                consumer = session.createConsumer(session.createQueue(queueName), null);
-                processMessages(session, consumer);
-            } finally {
-                if (consumer != null) {
-                    consumer.close();
-                }
-            }
-        }
-
-        private void processMessages(Session session, MessageConsumer consumer) throws JMSException {
-            MessageProducer producer = null;
-
-            try {
-                producer = session.createProducer(null);
-                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                processMessages(session, consumer, producer);
-            } finally {
-                if (producer != null) {
-                    producer.close();
-                }
-            }
-        }
-
-        private void processMessages(Session session, MessageConsumer consumer, MessageProducer producer) throws JMSException {
-            debug("waiting for messages...");
-            if (startup != null) {
-                synchronized (startup) {
-                    startup.value--;
-                    startup.notify();
-                }
-                startup = null;
-            }
-            int numToProcess = numToProcessPerIteration;
-            do {
-                Message message = consumer.receive(5000);
-
-                if (message != null) {
-                    try {
-                        processMessage(session, producer, message);
-                        session.commit();
-                        numToProcess--;
-                    } catch (Throwable t) {
-                        error("message=" + message + " failure", t);
-                        session.rollback();
-                    }
-                } else {
-                    info("got null message on: " + numToProcess);
-                }
-            } while ((numToProcessPerIteration == CONSUME_ALL || numToProcess > 0) && isRunning());
-        }
-
-        public void run() {
-            setRunning(true);
-            
-            while (isRunning()) {
-                try {
-                    processMessages();
-                } catch (Throwable t) {
-                    error("Unexpected consumer problem: ", t);
-                }
-            }
-        }
-        synchronized void setRunning(boolean running) {
-            this.running = running;
-        }
-
-        void start() {
-            thread.start();
-        }
-    }
-    
-    private class Producer implements ExceptionListener {
-        private ActiveMQConnectionFactory connectionFactory;
-        private String queueName;
-        
-        Producer(ActiveMQConnectionFactory connectionFactory, String queueName) {
-            this.connectionFactory = connectionFactory;
-            this.queueName = queueName;
-        }
-        
-        void execute(String[] args) {
-            try {
-                sendMessages();
-            } catch (Exception e) {
-                error("Producer failed", e);
-            }
-        }
-
-        private void sendMessages() throws JMSException {
-            ActiveMQConnection connection = null;
-
-            try {
-                connection = (ActiveMQConnection) connectionFactory.createConnection();
-                connection.setExceptionListener(this);
-                connection.start();
-
-                sendMessages(connection);
-            } finally {
-                if (connection != null) {
-                    try {
-                        connection.close();
-                    } catch (JMSException e) {
-                        error("Problem closing connection", e);
-                    }
-                }
-            }
-        }
-
-        private void sendMessages(ActiveMQConnection connection) throws JMSException {
-            Session session = null;
-
-            try {
-                session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-                
-                sendMessages(session);
-            } catch (JMSException e) {
-                e.printStackTrace();
-                exceptions.put(Thread.currentThread(), e);
-                if (session != null) {
-                    session.rollback();
-                }
-            } finally {
-                if (session != null) {
-                    session.close();
-                }
-            }
-        }
-
-        private void sendMessages(Session session) throws JMSException {
-            TemporaryQueue replyQueue = null;
-            
-            try {
-                replyQueue = session.createTemporaryQueue();
-                
-                sendMessages(session, replyQueue);
-            } finally {
-                if (replyQueue != null) {
-                    replyQueue.delete();
-                }
-            }
-        }
-
-        private void sendMessages(Session session, Destination replyQueue) throws JMSException {
-            MessageConsumer consumer = null;
-            
-            try {
-                consumer = session.createConsumer(replyQueue);
-                sendMessages(session, replyQueue, consumer);
-            } finally {
-                consumer.close();
-                session.commit();
-            }
-        }
-
-        private void sendMessages(Session session, Destination replyQueue, int messageCount) throws JMSException {
-            MessageProducer producer = null;
-
-            try {
-                producer = session.createProducer(session.createQueue(queueName));
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-                producer.setTimeToLive(0);
-                producer.setPriority(Message.DEFAULT_PRIORITY);
-
-                for (int i = 0; i < messageCount; i++) {
-                    TextMessage message = session.createTextMessage("message#" + i);
-                    message.setJMSReplyTo(replyQueue);
-                    producer.send(message);
-                }
-            } finally {
-                if (producer != null) {
-                    producer.close();
-                }
-            }
-        }
-
-        private void sendMessages(final Session session, Destination replyQueue, MessageConsumer consumer) throws JMSException {
-            final org.omg.CORBA.IntHolder messageCount = new org.omg.CORBA.IntHolder(MESSAGE_COUNT);
-            consumer.setMessageListener(new MessageListener() {
-                public void onMessage(Message reply) {
-                    if (reply instanceof TextMessage) {
-                        TextMessage textReply = (TextMessage) reply;
-                        synchronized (messageCount) {
-                            try {
-                                debug("receive reply#" + messageCount.value + " " + textReply.getText() + ", " + textReply.getJMSMessageID());
-                            } catch (JMSException e) {
-                                error("Problem processing reply", e);
-                            }
-                            messageCount.value--;
-                            if (messageCount.value % 200 == 0) {
-                                // ack a bunch of replys
-                                info("acking via session commit: messageCount=" + messageCount.value);
-                                try {
-                                    session.commit();
-                                } catch (JMSException e) {
-                                    error("Failed to commit with count: " + messageCount.value, e);
-                                }
-                            }
-                            messageCount.notifyAll();
-                        }
-                    } else {
-                        error("Producer cannot process " + reply.getClass().getSimpleName());
-                    }
-                }});
-
-            sendMessages(session, replyQueue, messageCount.value);
-
-            session.commit();
-            
-            synchronized (messageCount) {
-                while (messageCount.value > 0) {
-                    
-                    
-                    try {
-                        messageCount.wait();
-                    } catch (InterruptedException e) {
-                        error("Interrupted waiting for replies", e);
-                    }
-                }
-            }
-            // outstanding replys
-            session.commit();
-            debug("All replies received...");
-        }
-
-        public void onException(JMSException exception) {
-           LOG.error(exception.toString());
-           exceptions.put(Thread.currentThread(), exception);
-        }
-    }
-
-    private static void debug(String message) {
-        LOG.info(message);
-    }
-
-    private static void info(String message) {
-        LOG.info(message);
-    }
-    
-    private static void error(String message) {
-        LOG.error(message);
-    }
-
-    private static void error(String message, Throwable t) {
-        t.printStackTrace();
-        String msg = message + ": " + (t.getMessage() != null ? t.getMessage() : t.toString());
-        LOG.error(msg, t);
-        exceptions.put(Thread.currentThread(), t);
-        fail(msg);
-    }
-
-    private ArrayList<Consumer> createConsumers(ActiveMQConnectionFactory connectionFactory, String queueName, 
-            int max, int numToProcessPerConsumer) {
-        ArrayList<Consumer> consumers = new ArrayList<Consumer>(max);
-        org.omg.CORBA.IntHolder startup = new org.omg.CORBA.IntHolder(max);
-
-        for (int id = 0; id < max; id++) {
-            consumers.add(new Consumer(connectionFactory, queueName, startup, id, numToProcessPerConsumer));
-        }
-        for (Consumer consumer : consumers) {
-            consumer.start();
-        }
-        synchronized (startup) {
-            while (startup.value > 0) {
-                try {
-                    startup.wait();
-                } catch (InterruptedException e) {
-                    error("Interrupted waiting for consumers to start", e);
-                }
-            }
-        }
-        return consumers;
-    }
-
-    final BrokerService master = new BrokerService();
-    BrokerService slave = new BrokerService();
-    String masterUrl;
-
-    public void setUp() throws Exception {
-        setMaxTestTime(12 * 60 * 1000);
-        setAutoFail(true);
-        super.setUp();
-        master.setUseShutdownHook(false);
-        master.setBrokerName("Master");
-        master.addConnector("tcp://localhost:0");
-        master.deleteAllMessages();
-        master.setWaitForSlave(true);
-        
-        Thread t = new Thread() {
-            public void run() {
-                try {
-                    master.start();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    exceptions.put(Thread.currentThread(), e);
-                }
-            }
-        };
-        t.start();
-        masterUrl = master.getTransportConnectors().get(0).getConnectUri().toString(); 
-        
-        debug("masterUrl: " + masterUrl);
-        slave.setUseShutdownHook(false);
-        slave.setBrokerName("Slave");
-        slave.deleteAllMessages();
-        slave.addConnector("tcp://localhost:0");
-        slave.setMasterConnectorURI(masterUrl);
-        slave.start();
-        slave.waitUntilStarted();
-        assertTrue("master started", master.waitUntilStarted());
-    }
-    
-    public void tearDown() throws Exception {
-        master.stop();
-        slave.stop();
-        exceptions.clear();
-    }
-    
-    public void testMasterSlaveBug() throws Exception {
-        
-        Thread.setDefaultUncaughtExceptionHandler(this);
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("failover:(" + 
-                masterUrl + ")?randomize=false");
-        String queueName = "MasterSlaveBug";
-        ArrayList<Consumer> consumers = createConsumers(connectionFactory, queueName, NUM_CONSUMERS, CONSUME_ALL);
-        
-        Producer producer = new Producer(connectionFactory, queueName);
-        producer.execute(new String[]{});
-
-        for (Consumer consumer : consumers) {
-            consumer.setRunning(false);
-        }
-        
-        for (Consumer consumer : consumers) {
-            consumer.join();
-        }
-        assertTrue(exceptions.isEmpty());
-    }
-
-    
-    public void testMasterSlaveBugWithStopStartConsumers() throws Exception {
-
-        Thread.setDefaultUncaughtExceptionHandler(this);
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
-                "failover:(" + masterUrl + ")?randomize=false");
-        String queueName = "MasterSlaveBug";
-        ArrayList<Consumer> consumers = createConsumers(connectionFactory,
-                queueName, NUM_CONSUMERS, 10);
-
-        Producer producer = new Producer(connectionFactory, queueName);
-        producer.execute(new String[] {});
-
-        for (Consumer consumer : consumers) {
-            consumer.setRunning(false);
-        }
-
-        for (Consumer consumer : consumers) {
-            consumer.join();
-        }
-        assertTrue(exceptions.isEmpty());
-    }
-
-    public void uncaughtException(Thread t, Throwable e) {
-        error("" + t + e);
-        exceptions.put(t,e);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2103Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2103Test.java
deleted file mode 100644
index 8a952fd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2103Test.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.usecases.MyObject;
-
-public class AMQ2103Test extends BrokerTestSupport {
-    static PolicyEntry reduceMemoryFootprint = new PolicyEntry();
-    static {
-        reduceMemoryFootprint.setReduceMemoryFootprint(true);
-    }
-
-    public PolicyEntry defaultPolicy = reduceMemoryFootprint;
-
-    @Override
-    protected PolicyEntry getDefaultPolicy() {
-        return defaultPolicy;
-    }
-
-    public void initCombosForTestVerifyMarshalledStateIsCleared() throws Exception {
-        addCombinationValues("defaultPolicy", new Object[]{defaultPolicy, null});    
-    }
-
-    public static Test suite() {
-        return suite(AMQ2103Test.class);
-    }
-
-    /**
-     * use mem persistence so no marshaling,
-     * reduceMemoryFootprint on/off that will reduce memory by whacking the marshaled state
-     * With vm transport and deferred serialisation and no persistence (mem persistence),
-     * we see the message as sent by the client so we can validate the contents against
-     * the policy
-     * @throws Exception
-     */
-    public void testVerifyMarshalledStateIsCleared() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        factory.setOptimizedMessageDispatch(true);
-        factory.setObjectMessageSerializationDefered(true);
-        factory.setCopyMessageOnSend(false);
-
-        Connection connection = factory.createConnection();
-        Session session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQDestination destination = new ActiveMQQueue("testQ");
-		MessageConsumer consumer = session.createConsumer(destination);
-		connection.start();
-
-        MessageProducer producer = session.createProducer(destination);
-        final MyObject obj = new MyObject("A message");
-        ActiveMQObjectMessage m1 = (ActiveMQObjectMessage)session.createObjectMessage();
-        m1.setObject(obj);
-        producer.send(m1);
-
-        ActiveMQTextMessage m2 = new ActiveMQTextMessage();
-        m2.setText("Test Message Payload.");
-        producer.send(m2);
-
-        ActiveMQMapMessage m3 = new ActiveMQMapMessage();
-        m3.setString("text", "my message");
-        producer.send(m3);
-
-        Message m = consumer.receive(maxWait);
-        assertNotNull(m);
-        assertEquals(m1.getMessageId().toString(), m.getJMSMessageID());
-        assertTrue(m instanceof ActiveMQObjectMessage);
-
-        if (getDefaultPolicy() != null) {
-            assertNull("object data cleared by reduceMemoryFootprint (and never marshalled as using mem persistence)",
-                ((ActiveMQObjectMessage)m).getObject());
-        }
-
-        // verify no serialisation via vm transport
-        assertEquals("writeObject called", 0, obj.getWriteObjectCalled());
-        assertEquals("readObject called", 0, obj.getReadObjectCalled());
-        assertEquals("readObjectNoData called", 0, obj.getReadObjectNoDataCalled());
-
-        m = consumer.receive(maxWait);
-        assertNotNull(m);
-        assertEquals(m2.getMessageId().toString(), m.getJMSMessageID());
-        assertTrue(m instanceof ActiveMQTextMessage);
-
-        if (getDefaultPolicy() != null) {
-            assertNull("text cleared by reduceMemoryFootprint (and never marshalled as using mem persistence)",
-                ((ActiveMQTextMessage)m).getText());
-        }
-
-        m = consumer.receive(maxWait);
-        assertNotNull(m);
-        assertEquals(m3.getMessageId().toString(), m.getJMSMessageID());
-        assertTrue(m instanceof ActiveMQMapMessage);
-
-        if (getDefaultPolicy() != null) {
-            assertNull("text cleared by reduceMemoryFootprint (and never marshalled as using mem persistence)",
-                ((ActiveMQMapMessage)m).getStringProperty("text"));
-        }
-
-        connection.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java
deleted file mode 100644
index bc968d1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.bugs;
-
-import org.apache.activemq.broker.BrokerService;
-
-public class AMQ2149KahaDBTest extends AMQ2149Test {
-
-    @Override
-    protected void configurePersistenceAdapter(BrokerService brokerService) throws Exception {
-        // nothing to do as kahaDB is now the default and concurrent store and dispatch topics defaults to false
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java
deleted file mode 100644
index 9c3edb8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.Vector;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TransactionRolledBackException;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.AutoFailTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.util.LoggingBrokerPlugin;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-interface Configurer {
-    public void configure(BrokerService broker) throws Exception;
-}
-
-public class AMQ2149Test extends AutoFailTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2149Test.class);
-
-    private static final String BROKER_CONNECTOR = "tcp://localhost:61617";
-    private static final String DEFAULT_BROKER_URL = "failover:("+ BROKER_CONNECTOR
-        +")?maxReconnectDelay=1000&useExponentialBackOff=false";
-        
-    private final String SEQ_NUM_PROPERTY = "seqNum";
-
-    final int MESSAGE_LENGTH_BYTES = 75 * 1024;
-    final long SLEEP_BETWEEN_SEND_MS = 25;
-    final int NUM_SENDERS_AND_RECEIVERS = 10;
-    final Object brokerLock = new Object();
-    
-    private static final long DEFAULT_BROKER_STOP_PERIOD = 20 * 1000;
-    private static final long DEFAULT_NUM_TO_SEND = 1400;
-    
-    long brokerStopPeriod = DEFAULT_BROKER_STOP_PERIOD;
-    long numtoSend = DEFAULT_NUM_TO_SEND;
-    long sleepBetweenSend = SLEEP_BETWEEN_SEND_MS;
-    String brokerURL = DEFAULT_BROKER_URL;
-    
-    int numBrokerRestarts = 0;
-    final static int MAX_BROKER_RESTARTS = 5;
-    BrokerService broker;
-    Vector<Throwable> exceptions = new Vector<Throwable>();
-
-    private File dataDirFile;
-    final LoggingBrokerPlugin[] plugins = new LoggingBrokerPlugin[]{new LoggingBrokerPlugin()};
-    
-    
-    public void createBroker(Configurer configurer) throws Exception {
-        broker = new BrokerService();
-        configurePersistenceAdapter(broker);
-        
-        SystemUsage usage = new SystemUsage();
-        MemoryUsage memoryUsage = new MemoryUsage();
-        memoryUsage.setLimit(MESSAGE_LENGTH_BYTES * 200 * NUM_SENDERS_AND_RECEIVERS);
-        usage.setMemoryUsage(memoryUsage);
-        broker.setSystemUsage(usage);
-        
-        
-
-        broker.addConnector(BROKER_CONNECTOR);        
-        broker.setBrokerName(getName());
-        broker.setDataDirectoryFile(dataDirFile);
-        if (configurer != null) {
-            configurer.configure(broker);
-        }
-        broker.start();
-    }
-    
-    protected void configurePersistenceAdapter(BrokerService brokerService) throws Exception {
-        AMQPersistenceAdapterFactory persistenceFactory = new AMQPersistenceAdapterFactory();
-        persistenceFactory.setDataDirectory(dataDirFile);
-        brokerService.setPersistenceFactory(persistenceFactory);
-    }
-
-    public void setUp() throws Exception {
-        setMaxTestTime(30*60*1000);
-        setAutoFail(true);
-        dataDirFile = new File("target/"+ getName());
-        numtoSend = DEFAULT_NUM_TO_SEND;
-        brokerStopPeriod = DEFAULT_BROKER_STOP_PERIOD;
-        sleepBetweenSend = SLEEP_BETWEEN_SEND_MS;
-        brokerURL = DEFAULT_BROKER_URL;
-    }
-    
-    public void tearDown() throws Exception {
-        synchronized(brokerLock) {
-            if (broker!= null) {
-                broker.stop();
-                broker.waitUntilStopped();
-            }
-        }
-        exceptions.clear();
-    }
-    
-    private String buildLongString() {
-        final StringBuilder stringBuilder = new StringBuilder(
-                MESSAGE_LENGTH_BYTES);
-        for (int i = 0; i < MESSAGE_LENGTH_BYTES; ++i) {
-            stringBuilder.append((int) (Math.random() * 10));
-        }
-        return stringBuilder.toString();
-    }
-
-    private class Receiver implements MessageListener {
-
-        private final javax.jms.Destination dest;
-
-        private final Connection connection;
-
-        private final Session session;
-
-        private final MessageConsumer messageConsumer;
-
-        private volatile long nextExpectedSeqNum = 0;
-                
-        private final boolean transactional;
-
-        private String lastId = null;
-
-        public Receiver(javax.jms.Destination dest, boolean transactional) throws JMSException {
-            this.dest = dest;
-            this.transactional = transactional;
-            connection = new ActiveMQConnectionFactory(brokerURL)
-                    .createConnection();
-            connection.setClientID(dest.toString());
-            session = connection.createSession(transactional, transactional ? Session.SESSION_TRANSACTED : Session.AUTO_ACKNOWLEDGE);
-            if (ActiveMQDestination.transform(dest).isTopic()) {
-                messageConsumer = session.createDurableSubscriber((Topic) dest, dest.toString());
-            } else {
-                messageConsumer = session.createConsumer(dest);
-            }
-            messageConsumer.setMessageListener(this);
-            connection.start();
-        }
-
-        public void close() throws JMSException {
-            connection.close();
-        }
-        
-        public long getNextExpectedSeqNo() {
-            return nextExpectedSeqNum;
-        }
-        
-        final int TRANSACITON_BATCH = 500;
-        public void onMessage(Message message) {
-            try {
-                final long seqNum = message.getLongProperty(SEQ_NUM_PROPERTY);
-                if ((seqNum % TRANSACITON_BATCH) == 0) {
-                    LOG.info(dest + " received " + seqNum);
-                    
-                    if (transactional) {
-                        LOG.info("committing..");
-                        session.commit();
-                    }
-                }
-                if (seqNum != nextExpectedSeqNum) {
-                    LOG.warn(dest + " received " + seqNum
-                            + " in msg: " + message.getJMSMessageID()
-                            + " expected "
-                            + nextExpectedSeqNum
-                            + ", lastId: " + lastId 
-                            + ", message:" + message);
-                    fail(dest + " received " + seqNum + " expected "
-                            + nextExpectedSeqNum);
-                }
-                ++nextExpectedSeqNum;
-                lastId = message.getJMSMessageID();
-            } catch (TransactionRolledBackException expectedSometimesOnFailoverRecovery) {
-                LOG.info("got rollback: " + expectedSometimesOnFailoverRecovery);
-                // batch will be replayed
-                nextExpectedSeqNum -= (TRANSACITON_BATCH -1);
-            } catch (Throwable e) {
-                LOG.error(dest + " onMessage error", e);
-                exceptions.add(e);
-            }
-        }
-
-    }
-
-    private class Sender implements Runnable {
-
-        private final javax.jms.Destination dest;
-
-        private final Connection connection;
-
-        private final Session session;
-
-        private final MessageProducer messageProducer;
-
-        private volatile long nextSequenceNumber = 0;
-
-        public Sender(javax.jms.Destination dest) throws JMSException {
-            this.dest = dest;
-            connection = new ActiveMQConnectionFactory(brokerURL)
-                    .createConnection();
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            messageProducer = session.createProducer(dest);
-            messageProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            connection.start();
-        }
-
-        public void run() {
-            final String longString = buildLongString();
-            while (nextSequenceNumber < numtoSend) {
-                try {
-                    final Message message = session
-                            .createTextMessage(longString);
-                    message.setLongProperty(SEQ_NUM_PROPERTY,
-                            nextSequenceNumber);
-                    ++nextSequenceNumber;
-                    messageProducer.send(message);
-                    
-                    if ((nextSequenceNumber % 500) == 0) {
-                        LOG.info(dest + " sent " + nextSequenceNumber);
-                    }
-                        
-                } catch (Exception e) {
-                    LOG.error(dest + " send error", e);
-                    exceptions.add(e);
-                }
-                if (sleepBetweenSend > 0) {
-                    try {
-                        Thread.sleep(sleepBetweenSend);
-                    } catch (InterruptedException e) {
-                        LOG.warn(dest + " sleep interrupted", e);
-                    }
-                }
-            }
-            try {
-                connection.close();
-            } catch (JMSException ignored) {
-            }
-        }
-    }
-
-    // no need to run this unless there are some issues with the others
-    public void vanilaVerify_testOrder() throws Exception {
-        
-        createBroker(new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-               broker.deleteAllMessages();            
-            }
-        });
-        
-        verifyOrderedMessageReceipt();
-        verifyStats(false);
-    }
-
-    // no need to run this unless there are some issues with the others
-    public void noProblem_testOrderWithRestartAndVMIndex() throws Exception {
-        createBroker(new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-                AMQPersistenceAdapterFactory persistenceFactory =
-                    (AMQPersistenceAdapterFactory) broker.getPersistenceFactory();
-                persistenceFactory.setPersistentIndex(false);
-                broker.deleteAllMessages();     
-            }
-        });
-        
-        final Timer timer = new Timer();
-        schedualRestartTask(timer, new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-                AMQPersistenceAdapterFactory persistenceFactory =
-                    (AMQPersistenceAdapterFactory) broker.getPersistenceFactory();
-                persistenceFactory.setPersistentIndex(false);
-            }
-        });
-        
-        try {
-            verifyOrderedMessageReceipt();
-        } finally {
-            timer.cancel();
-        }
-        verifyStats(true);
-    }
-
-
-    public void testOrderWithRestart() throws Exception {
-        createBroker(new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-                broker.deleteAllMessages();     
-            }
-        });
-        
-        final Timer timer = new Timer();
-        schedualRestartTask(timer, new Configurer() {
-            public void configure(BrokerService broker) throws Exception {    
-            }
-        });
-        
-        try {
-            verifyOrderedMessageReceipt();
-        } finally {
-            timer.cancel();
-        }
-        
-        verifyStats(true);
-    }
-        
-    public void testTopicOrderWithRestart() throws Exception {
-        createBroker(new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-                broker.deleteAllMessages();
-            }
-        });
-        
-        final Timer timer = new Timer();
-        schedualRestartTask(timer, null);
-        
-        try {
-            verifyOrderedMessageReceipt(ActiveMQDestination.TOPIC_TYPE);
-        } finally {
-            timer.cancel();
-        }
-        
-        verifyStats(true);
-    }
-
-    public void testQueueTransactionalOrderWithRestart() throws Exception {
-        doTestTransactionalOrderWithRestart(ActiveMQDestination.QUEUE_TYPE);
-    }
-    
-    public void testTopicTransactionalOrderWithRestart() throws Exception {
-        doTestTransactionalOrderWithRestart(ActiveMQDestination.TOPIC_TYPE);
-    }
-    
-    public void doTestTransactionalOrderWithRestart(byte destinationType) throws Exception {
-        numtoSend = 10000;
-        sleepBetweenSend = 3;
-        brokerStopPeriod = 30 * 1000;
-              
-        createBroker(new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-                broker.deleteAllMessages();
-            }
-        });
-        
-        final Timer timer = new Timer();
-        schedualRestartTask(timer, null);
-        
-        try {
-            verifyOrderedMessageReceipt(destinationType, 1, true);
-        } finally {
-            timer.cancel();
-        }
-        
-        verifyStats(true);
-    }
-
-
-    // no need to run this unless there are issues with the other restart tests
-  
-    public void eaiserToRepoduce_testOrderWithRestartWithForceRecover() throws Exception {
-        createBroker(new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-                AMQPersistenceAdapterFactory persistenceFactory =
-                    (AMQPersistenceAdapterFactory) broker.getPersistenceFactory();
-                persistenceFactory.setForceRecoverReferenceStore(true);
-                broker.setPlugins(plugins);
-                broker.deleteAllMessages();     
-            }
-        });
-        
-        final Timer timer = new Timer();
-        schedualRestartTask(timer, new Configurer() {
-            public void configure(BrokerService broker) throws Exception {
-                AMQPersistenceAdapterFactory persistenceFactory =
-                    (AMQPersistenceAdapterFactory) broker.getPersistenceFactory();
-                persistenceFactory.setForceRecoverReferenceStore(true);
-                broker.setPlugins(plugins);
-            }
-        });
-        
-        try {
-            verifyOrderedMessageReceipt();
-        } finally {
-            timer.cancel();
-        }
-        
-        verifyStats(true);
-    }
-
-    private void verifyStats(boolean brokerRestarts) throws Exception {
-        RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker();
-        
-        for (Destination dest : regionBroker.getQueueRegion().getDestinationMap().values()) {
-            DestinationStatistics stats = dest.getDestinationStatistics();
-            if (brokerRestarts) {
-                // all bets are off w.r.t stats as there may be duplicate sends and duplicate
-                // dispatches, all of which will be suppressed - either by the reference store
-                // not allowing duplicate references or consumers acking duplicates
-                LOG.info("with restart: not asserting qneue/dequeue stat match for: " + dest.getName()
-                        + " " + stats.getEnqueues().getCount() + " <= " +stats.getDequeues().getCount());
-            } else {
-                assertEquals("qneue/dequeue match for: " + dest.getName(),
-                        stats.getEnqueues().getCount(), stats.getDequeues().getCount());   
-            }
-        }
-    }
-
-    private void schedualRestartTask(final Timer timer, final Configurer configurer) {
-        class RestartTask extends TimerTask {
-            public void run() {
-                synchronized (brokerLock) {
-                    LOG.info("stopping broker..");
-                    try {
-                        broker.stop();
-                        broker.waitUntilStopped();
-                    } catch (Exception e) {
-                        LOG.error("ex on broker stop", e);
-                        exceptions.add(e);
-                    }
-                    LOG.info("restarting broker");
-                    try {
-                        createBroker(configurer);
-                        broker.waitUntilStarted();
-                    } catch (Exception e) {
-                        LOG.error("ex on broker restart", e);
-                        exceptions.add(e);
-                    }
-                }
-                if (++numBrokerRestarts < MAX_BROKER_RESTARTS) {
-                    // do it again
-                    try {
-                        timer.schedule(new RestartTask(), brokerStopPeriod);
-                    } catch (IllegalStateException ignore_alreadyCancelled) {   
-                    }
-                } else {
-                    LOG.info("no longer stopping broker on reaching Max restarts: " + MAX_BROKER_RESTARTS);
-                }
-            } 
-        }
-        timer.schedule(new RestartTask(), brokerStopPeriod);
-    }
-    
-    private void verifyOrderedMessageReceipt(byte destinationType) throws Exception {
-        verifyOrderedMessageReceipt(destinationType, NUM_SENDERS_AND_RECEIVERS, false);
-    }
-    
-    private void verifyOrderedMessageReceipt() throws Exception {
-        verifyOrderedMessageReceipt(ActiveMQDestination.QUEUE_TYPE, NUM_SENDERS_AND_RECEIVERS, false);
-    }
-    
-    private void verifyOrderedMessageReceipt(byte destinationType, int concurrentPairs, boolean transactional) throws Exception {
-                
-        Vector<Thread> threads = new Vector<Thread>();
-        Vector<Receiver> receivers = new Vector<Receiver>();
-        
-        for (int i = 0; i < concurrentPairs; ++i) {
-            final javax.jms.Destination destination =
-                    ActiveMQDestination.createDestination("test.dest." + i, destinationType);
-            receivers.add(new Receiver(destination, transactional));
-            Thread thread = new Thread(new Sender(destination));
-            thread.start();
-            threads.add(thread);
-        }
-        
-        final long expiry = System.currentTimeMillis() + 1000 * 60 * 30;
-        while(!threads.isEmpty() && exceptions.isEmpty() && System.currentTimeMillis() < expiry) {
-            Thread sendThread = threads.firstElement();
-            sendThread.join(1000*10);
-            if (!sendThread.isAlive()) {
-                threads.remove(sendThread);
-            }
-        }
-        LOG.info("senders done...");
-        
-        while(!receivers.isEmpty() && System.currentTimeMillis() < expiry) {
-            Receiver receiver = receivers.firstElement();
-            if (receiver.getNextExpectedSeqNo() >= numtoSend || !exceptions.isEmpty()) {
-                receiver.close();
-                receivers.remove(receiver);
-            }
-        }
-        assertTrue("No timeout waiting for senders/receivers to complete", System.currentTimeMillis() < expiry);
-        if (!exceptions.isEmpty()) {
-            exceptions.get(0).printStackTrace();
-        }
-        assertTrue("No exceptions", exceptions.isEmpty());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2171Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2171Test.java
deleted file mode 100644
index f23f758..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2171Test.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.*;
-import java.util.concurrent.CopyOnWriteArrayList;
-import javax.jms.*;
-import javax.jms.Queue;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class AMQ2171Test implements Thread.UncaughtExceptionHandler {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2171Test.class);
-    private static final String BROKER_URL = "tcp://localhost:0";
-    private static final int QUEUE_SIZE = 100;
-
-    private static BrokerService brokerService;
-    private static Queue destination;
-
-    private String brokerUri;
-    private String brokerUriNoPrefetch;
-    private Collection<Throwable> exceptions = new CopyOnWriteArrayList<Throwable>();
-
-    @Before
-    public void setUp() throws Exception {
-        // Start an embedded broker up.
-        brokerService = new BrokerService();
-        brokerService.setDeleteAllMessagesOnStartup(true);
-        brokerService.addConnector(BROKER_URL);
-        brokerService.start();
-
-        brokerUri = brokerService.getTransportConnectors().get(0).getPublishableConnectString().toString();
-        brokerUriNoPrefetch = brokerUri + "?jms.prefetchPolicy.all=0";
-
-        destination = new ActiveMQQueue("Test");
-        produce(brokerUri, QUEUE_SIZE);
-    }
-
-    @Before
-    public void addHandler() {
-        Thread.setDefaultUncaughtExceptionHandler(this);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        brokerService.stop();
-    }
-
-    @Test(timeout = 10000)
-    public void testBrowsePrefetch() throws Exception {
-        runTest(brokerUri);
-    }
-
-    @Test(timeout = 10000)
-    public void testBrowseNoPrefetch() throws Exception {
-        runTest(brokerUriNoPrefetch);
-    }
-
-    private void runTest(String brokerURL) throws Exception {
-
-        Connection connection = new ActiveMQConnectionFactory(brokerURL).createConnection();
-
-        try {
-            connection.start();
-
-            Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
-            @SuppressWarnings("unchecked")
-            Enumeration<Message> unread = (Enumeration<Message>) session.createBrowser(destination).getEnumeration();
-
-            int count = 0;
-            while (unread.hasMoreElements()) {
-                unread.nextElement();
-                count++;
-            }
-
-            assertEquals(QUEUE_SIZE, count);
-            assertTrue(exceptions.isEmpty());
-        } finally {
-            try {
-                connection.close();
-            } catch (JMSException e) {
-                exceptions.add(e);
-            }
-        }
-    }
-
-    private static void produce(String brokerURL, int count) throws Exception {
-        Connection connection = null;
-
-        try {
-
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerURL);
-            connection = factory.createConnection();
-            Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(destination);
-            producer.setTimeToLive(0);
-            connection.start();
-
-            for (int i = 0; i < count; i++) {
-                int id = i + 1;
-                TextMessage message = session.createTextMessage("Message " + id);
-                message.setIntProperty("MsgNumber", id);
-                producer.send(message);
-
-                if (id % 500 == 0) {
-                    LOG.info("sent " + id + ", ith " + message);
-                }
-            }
-        } finally {
-            try {
-                if (connection != null) {
-                    connection.close();
-                }
-            } catch (Throwable e) {
-            }
-        }
-    }
-
-    public void uncaughtException(Thread t, Throwable e) {
-        exceptions.add(e);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java
deleted file mode 100644
index 12c8006..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * 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.bugs;
-
-
-import java.io.IOException;
-import java.lang.Thread.UncaughtExceptionHandler;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.AutoFailTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.util.Wait;
-import org.apache.activemq.util.Wait.Condition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2183Test extends AutoFailTestSupport implements UncaughtExceptionHandler, MessageListener {
-       
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2183Test.class);
-    private static final int maxSent = 2000;    
-    private final Map<Thread, Throwable> exceptions = new ConcurrentHashMap<Thread, Throwable>();
-
-    BrokerService master = new BrokerService();
-    BrokerService slave = new BrokerService();
-    URI masterUrl, slaveUrl;
-
-    public void onException(JMSException e) {
-        exceptions.put(Thread.currentThread(), e);
-    }
-    
-    public void setUp() throws Exception {
-        setAutoFail(true);
-        super.setUp();
-        master = new BrokerService();
-        slave = new BrokerService();
-        
-        master.setBrokerName("Master");
-        master.addConnector("tcp://localhost:0");
-        master.deleteAllMessages();
-        master.setWaitForSlave(true);
-        
-        Thread t = new Thread() {
-            public void run() {
-                try {
-                    master.start();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    exceptions.put(Thread.currentThread(), e);
-                }
-            }
-        };
-        t.start();
-        Thread.sleep(2000);
-        masterUrl = master.getTransportConnectors().get(0).getConnectUri();
-    }
-
-    private void startSlave() throws IOException, Exception, URISyntaxException {
-        slave.setBrokerName("Slave");
-        slave.deleteAllMessages();
-        slave.addConnector("tcp://localhost:0");
-        slave.setMasterConnectorURI(masterUrl.toString());
-        slave.start();
-        slaveUrl = slave.getTransportConnectors().get(0).getConnectUri();
-    }
-    
-    public void tearDown() throws Exception {
-        master.stop();
-        slave.stop();
-        exceptions.clear();
-    }
-    
-    class MessageCounter implements MessageListener {
-        int count = 0;
-        public void onMessage(Message message) {
-            count++;
-        }
-        
-        int getCount() {
-            return count;
-        }
-    }
-    
-    public void testMasterSlaveBugWithStopStartConsumers() throws Exception {
-
-        Thread.setDefaultUncaughtExceptionHandler(this);
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
-                "failover:(" + masterUrl + ")?randomize=false");
-    
-        final Connection connection = connectionFactory.createConnection();
-        final CountDownLatch startCommenced = new CountDownLatch(1);
-        final CountDownLatch startDone = new CountDownLatch(1);
-        
-        // start will be blocked pending slave connection but should resume after slave started
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                startCommenced.countDown();
-                try {
-                    connection.start();
-                    startDone.countDown();
-                } catch (Exception e) {
-                    exceptions.put(Thread.currentThread(), e);
-                }
-            }});
-        
-       
-        assertTrue("connection.start has commenced", startCommenced.await(10, TimeUnit.SECONDS));
-        startSlave();
-        assertTrue("connection.start done", startDone.await(70, TimeUnit.SECONDS));
-        
-        final MessageCounter counterA = new MessageCounter();
-        connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQQueue("Consumer.A.VirtualTopic.T")).setMessageListener(counterA);
-       
-        final MessageCounter counterB = new MessageCounter();
-        connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQQueue("Consumer.B.VirtualTopic.T")).setMessageListener(counterB);
-       
-        Thread.sleep(2000);
-        
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(new ActiveMQTopic("VirtualTopic.T"));
-        for (int i=0; i<maxSent; i++) {
-            producer.send(session.createTextMessage("Hi" + i));
-        }
-        
-        Wait.waitFor(new Condition() {
-            public boolean isSatisified() throws Exception {
-                return maxSent == counterA.getCount() && maxSent == counterB.getCount();
-            }
-        });
-        assertEquals(maxSent, counterA.getCount());
-        assertEquals(maxSent, counterB.getCount());
-        assertTrue(exceptions.isEmpty());
-    }
-
-
-    public void uncaughtException(Thread t, Throwable e) {
-        exceptions.put(t,e);
-    }
-
-    public void onMessage(Message message) {
-        LOG.info("message received: " + message);        
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2213Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2213Test.java
deleted file mode 100644
index 34b8eaa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2213Test.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TopicConnection;
-import javax.jms.TopicSession;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class AMQ2213Test
-{
-    BrokerService broker;
-    ConnectionFactory factory;
-    Connection connection;
-    Session session;
-    Queue queue;
-    MessageConsumer consumer;
-
-    public void createBroker(boolean deleteAll) throws Exception {
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(deleteAll);
-        broker.setDataDirectory("target/AMQ3145Test");
-        broker.setUseJmx(true);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.addConnector("tcp://localhost:0");
-        broker.start();
-        broker.waitUntilStarted();
-        factory = new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri().toString());
-        connection = factory.createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-    }
-
-    @Before
-    public void createBroker() throws Exception {
-        createBroker(true);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        if (consumer != null) {
-            consumer.close();
-        }
-        session.close();
-        connection.stop();
-        connection.close();
-        broker.stop();
-    }
-
-    @Test
-    public void testEqualsGenericSession() throws JMSException
-    {
-        Assert.assertNotNull(this.connection);
-        Session sess = this.connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Assert.assertTrue(sess.equals(sess));
-    }
-
-    @Test
-    public void testEqualsTopicSession() throws JMSException
-    {
-        Assert.assertNotNull(this.connection);
-        Assert.assertTrue(this.connection instanceof TopicConnection);
-        TopicSession sess = ((TopicConnection)this.connection).createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        Assert.assertTrue(sess.equals(sess));
-    }
-
-    @Test
-    public void testEqualsQueueSession() throws JMSException
-    {
-        Assert.assertNotNull(this.connection);
-        Assert.assertTrue(this.connection instanceof QueueConnection);
-        QueueSession sess = ((QueueConnection)this.connection).createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-        Assert.assertTrue(sess.equals(sess));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java
deleted file mode 100644
index b6c7691..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class AMQ2314Test extends CombinationTestSupport {
-
-    public boolean consumeAll = false;
-    public int deliveryMode = DeliveryMode.NON_PERSISTENT;
-    
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2314Test.class);
-    private static final int MESSAGES_COUNT = 30000;
-    private static byte[]  buf = new byte[1024];
-    private BrokerService broker;
-    
-    protected long messageReceiveTimeout = 500L;
-
-    Destination destination = new ActiveMQTopic("FooTwo");
-    
-    public void testRemoveSlowSubscriberWhacksTempStore() throws Exception {
-        runProducerWithHungConsumer();
-    }
-    
-    public void testMemoryUsageReleasedOnAllConsumed() throws Exception {
-        consumeAll = true;
-        runProducerWithHungConsumer();
-        // do it again to ensure memory limits are decreased
-        runProducerWithHungConsumer();
-    }
-    
-    
-    public void runProducerWithHungConsumer() throws Exception {
-    
-        final CountDownLatch consumerContinue = new CountDownLatch(1);
-        final CountDownLatch consumerReady = new CountDownLatch(1);
-        
-        final long origTempUsage = broker.getSystemUsage().getTempUsage().getUsage();
-        
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        factory.setAlwaysSyncSend(true);
-        
-        // ensure messages are spooled to disk for this consumer
-        ActiveMQPrefetchPolicy prefetch = new ActiveMQPrefetchPolicy();
-        prefetch.setTopicPrefetch(500);
-        factory.setPrefetchPolicy(prefetch);
-        final Connection connection = factory.createConnection();
-        connection.start();
-
-        Thread producingThread = new Thread("Producing thread") {
-            public void run() {
-                try {
-                    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageProducer producer = session.createProducer(destination);
-                    producer.setDeliveryMode(deliveryMode);
-                    for (int idx = 0; idx < MESSAGES_COUNT; ++idx) {
-                        Message message = session.createTextMessage(new String(buf) + idx);
-                        producer.send(message);
-                    }
-                    producer.close();
-                    session.close();
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-        
-        Thread consumingThread = new Thread("Consuming thread") {
-            public void run() {
-                try {
-                    int count = 0;
-                    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageConsumer consumer = session.createConsumer(destination);
-                    
-                    while (consumer.receive(messageReceiveTimeout) == null) {
-                        consumerReady.countDown();
-                    }
-                    count++;
-                    LOG.info("Received one... waiting");  
-                    consumerContinue.await();
-                    if (consumeAll) {
-                        LOG.info("Consuming the rest of the messages...");
-                        while (consumer.receive(messageReceiveTimeout) != null) {
-                            count++;
-                        }
-                    }
-                    LOG.info("consumer session closing: consumed count: " + count);
-                    session.close();
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-        consumingThread.start();
-        consumerReady.await();
-        
-        producingThread.start();
-        producingThread.join();
-        
-        final long tempUsageBySubscription = broker.getSystemUsage().getTempUsage().getUsage();
-        LOG.info("Orig Usage: " + origTempUsage + ", currentUsage: " + tempUsageBySubscription);
-        assertTrue("some temp store has been used", tempUsageBySubscription != origTempUsage);
-        consumerContinue.countDown();
-        consumingThread.join();
-        connection.close();
-       
-        LOG.info("Subscrition Usage: " + tempUsageBySubscription + ", endUsage: "
-                + broker.getSystemUsage().getTempUsage().getUsage());
-        
-        assertTrue("temp usage decreased with removed sub", Wait.waitFor(new Wait.Condition(){
-            public boolean isSatisified() throws Exception {
-                return broker.getSystemUsage().getTempUsage().getUsage()  < tempUsageBySubscription;
-            }
-        }));
-    }
-    
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        broker = new BrokerService();
-        broker.setDataDirectory("target" + File.separator + "activemq-data");
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-        broker.setAdvisorySupport(false);
-        broker.setDeleteAllMessagesOnStartup(true);
-
-        broker.addConnector("tcp://localhost:61616").setName("Default");
-        broker.start();
-    }
-    
-    public void tearDown() throws Exception {
-        broker.stop();
-    }
-    
-    
-    public static Test suite() {
-        return suite(AMQ2314Test.class);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2356Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2356Test.java
deleted file mode 100644
index b74e11b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2356Test.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * 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.bugs;
-
-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.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.perf.NumberOfDestinationsTest;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.File;
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.TestCase;
-/*
-A AMQ2356Test
-We have an environment where we have a very large number of destinations. 
-In an effort to reduce the number of threads I have set the options
--Dorg.apache.activemq.UseDedicatedTaskRunner=false
-
-and
-
-<policyEntry queue=">" optimizedDispatch="true"/>
-
-Unfortunately this very quickly leads to deadlocked queues.
-
-My environment is:
-
-ActiveMQ 5.2 Ubunty Jaunty kernel 2.6.28-14-generic #47-Ubuntu SMP (although only a single core on my system)
-TCP transportConnector
-
-To reproduce the bug (which I can do 100% of the time) I connect 5 consumers (AUTO_ACK) to 5 different queues. 
-Then I start 5 producers and pair them up with a consumer on a queue, and they start sending PERSISTENT messages. 
-I've set the producer to send 100 messages and disconnect, and the consumer to receive 100 messages and disconnect. 
-The first pair usually gets through their 100 messages and disconnect, at which point all the other pairs have 
-deadlocked at less than 30 messages each.
- */
-public class AMQ2356Test extends TestCase {
-    protected static final int MESSAGE_COUNT = 1000;
-    protected static final int NUMBER_OF_PAIRS = 10;
-    private static final Logger LOG = LoggerFactory.getLogger(NumberOfDestinationsTest.class);
-    protected BrokerService broker;
-    protected String brokerURL = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL;
-    protected int destinationCount;
-
-    public void testScenario() throws Exception {
-        for (int i = 0; i < NUMBER_OF_PAIRS; i++) {
-            ActiveMQQueue queue = new ActiveMQQueue(getClass().getName()+":"+i);
-            ProducerConsumerPair cp = new ProducerConsumerPair();
-            cp.start(this.brokerURL, queue, MESSAGE_COUNT);
-            cp.testRun();
-            cp.stop();
-        }
-    }
-
-    protected Destination getDestination(Session session) throws JMSException {
-        String destinationName = getClass().getName() + "." + destinationCount++;
-        return session.createQueue(destinationName);
-    }
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        File dataFileDir = new File("target/test-amq-data/bugs/AMQ2356/kahadb");
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(dataFileDir);
-        answer.setUseJmx(false);
-     // Setup a destination policy where it takes only 1 message at a time.
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry policy = new PolicyEntry();
-        policy.setOptimizedDispatch(true);
-        policyMap.setDefaultEntry(policy);
-        answer.setDestinationPolicy(policyMap);
-        
-        answer.setAdvisorySupport(false);
-        answer.setEnableStatistics(false);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(brokerURL);
-       
-    }
-    static class ProducerConsumerPair {
-        private Destination destination;
-        private MessageProducer producer;
-        private MessageConsumer consumer;
-        private Connection producerConnection;
-        private Connection consumerConnection;
-        private int numberOfMessages;
-
-        ProducerConsumerPair(){
-           
-        }
-        void start(String brokerURL, final Destination dest, int msgNum) throws Exception {
-            this.destination=dest;
-            this.numberOfMessages=msgNum;
-            ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(brokerURL);
-            this.producerConnection = cf.createConnection();
-            this.producerConnection.start();
-            this.consumerConnection = cf.createConnection();
-            this.consumerConnection.start();
-            this.producer=createProducer(this.producerConnection);
-            this.consumer=createConsumer(this.consumerConnection);
-        }
-        
-        void testRun() throws Exception {
-            
-            
-                Session s = this.producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                for (int i = 0 ; i < this.numberOfMessages; i++) {
-                    BytesMessage msg = s.createBytesMessage();
-                    msg.writeBytes(new byte[1024]);
-                    this.producer.send(msg);
-                }
-                int received = 0;
-                for (int i = 0 ; i < this.numberOfMessages; i++) {
-                    Message msg = this.consumer.receive();
-                    assertNotNull(msg);
-                    received++;
-                }
-                assertEquals("Messages received on " + this.destination,this.numberOfMessages,received);
-           
-           
-        }
-        
-        void stop() throws Exception {
-            if (this.producerConnection != null) {
-                this.producerConnection.close();
-            }
-            if (this.consumerConnection != null) {
-                this.consumerConnection.close();
-            }
-        }
-
-        private MessageProducer createProducer(Connection connection) throws Exception {
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer result = session.createProducer(this.destination);
-            return result;
-        }
-        
-        private MessageConsumer createConsumer(Connection connection) throws Exception {
-          
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageConsumer result = session.createConsumer(this.destination);
-            return result;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2364Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2364Test.java
deleted file mode 100644
index b558e02..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2364Test.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.bugs;
-//package org.apache.activemq.transport.failover;
-
-import java.lang.reflect.Field;
-import java.net.URI;
-import java.util.Collection;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.state.ConnectionState;
-import org.apache.activemq.state.ConnectionStateTracker;
-import org.apache.activemq.state.TransactionState;
-import org.apache.activemq.transport.MutexTransport;
-import org.apache.activemq.transport.ResponseCorrelator;
-import org.apache.activemq.transport.failover.FailoverTransport;
-import org.junit.Test;
-
-
-public class AMQ2364Test {
-
-    @SuppressWarnings("unchecked")
-    @Test
-    public void testRollbackLeak() throws Exception {
-
-        int messageCount = 1000;
-        URI failoverUri = new URI("failover:(vm://localhost)?jms.redeliveryPolicy.maximumRedeliveries=0");
-
-        Destination dest = new ActiveMQQueue("Failover.Leak");
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(failoverUri);
-        ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-        final Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-
-        MessageProducer producer = session.createProducer(dest);
-
-        for (int i = 0; i < messageCount; ++i)
-            producer.send(session.createTextMessage("Test message #" + i));
-        producer.close();
-        session.commit();
-
-        MessageConsumer consumer = session.createConsumer(dest);
-
-        final CountDownLatch latch = new CountDownLatch(messageCount);
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message msg) {
-                try {
-                    session.rollback();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                } finally {
-                    latch.countDown();
-                }
-            }
-        });
-
-        latch.await();
-        consumer.close();
-        session.close();
-
-        ResponseCorrelator respCorr = (ResponseCorrelator) connection.getTransport();
-        MutexTransport mutexTrans = (MutexTransport) respCorr.getNext();
-        FailoverTransport failoverTrans = (FailoverTransport) mutexTrans.getNext();
-        Field stateTrackerField = FailoverTransport.class.getDeclaredField("stateTracker");
-        stateTrackerField.setAccessible(true);
-        ConnectionStateTracker stateTracker = (ConnectionStateTracker) stateTrackerField.get(failoverTrans);
-        Field statesField = ConnectionStateTracker.class.getDeclaredField("connectionStates");
-        statesField.setAccessible(true);
-        ConcurrentHashMap<ConnectionId, ConnectionState> states =
-                (ConcurrentHashMap<ConnectionId, ConnectionState>) statesField.get(stateTracker);
-
-        ConnectionState state = states.get(connection.getConnectionInfo().getConnectionId());
-
-        Collection<TransactionState> transactionStates = state.getTransactionStates();
-
-        connection.stop();
-        connection.close();
-
-        Assert.assertEquals("Transaction states not cleaned up", 0,transactionStates.size());
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2383Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2383Test.java
deleted file mode 100644
index 7a4ab86..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2383Test.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.bugs;
-
-
-import static org.junit.Assert.*;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.junit.Test;
-
-public class AMQ2383Test {
-
-    @Test
-    public void activeMQTest() throws Exception {
-        Destination dest = ActiveMQQueue.createDestination("testQueue", ActiveMQQueue.QUEUE_TYPE);
-        ConnectionFactory factory = new ActiveMQConnectionFactory(
-                "vm://localhost?broker.useJmx=false&broker.persistent=false");
-        Connection producerConnection = factory.createConnection();
-        producerConnection.start();
-        Connection consumerConnection = factory.createConnection();
-        consumerConnection.start();
-
-        Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(dest);
-        TextMessage sentMsg = producerSession.createTextMessage("test...");
-        producer.send(sentMsg);
-        producerSession.close();
-
-        Session consumerSession = consumerConnection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = consumerSession.createConsumer(dest);
-        TextMessage receivedMsg = (TextMessage)consumer.receive();
-        consumerSession.rollback();
-        consumerSession.close();
-
-        assertEquals(sentMsg, receivedMsg);
-
-        Thread.sleep(10000);
-
-        producerConnection.close();
-        consumerConnection.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2401Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2401Test.java
deleted file mode 100644
index ceb5939..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2401Test.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnection;
-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.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import junit.framework.TestCase;
-
-/**
- * An AMQ-2401 Test
- *
- */
-public class AMQ2401Test extends TestCase implements MessageListener{
-    BrokerService broker;
-    private ActiveMQConnectionFactory factory;
-    private static final int SEND_COUNT = 500;
-    private static final int CONSUMER_COUNT = 50;
-    private static final int PRODUCER_COUNT = 1;
-    private static final int LOG_INTERVAL = 10;
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2401Test.class);
-
-    private ArrayList<Service> services = new ArrayList<Service>(CONSUMER_COUNT + PRODUCER_COUNT);
-    int count = 0;
-    CountDownLatch latch;
-
-    protected void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setDataDirectory("target" + File.separator + "test-data" + File.separator + "AMQ2401Test");
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.addConnector("tcp://0.0.0.0:2401");
-        PolicyMap policies = new PolicyMap();
-        PolicyEntry entry = new PolicyEntry();
-        entry.setMemoryLimit(1024 * 100);
-        entry.setProducerFlowControl(true);
-        entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-        entry.setQueue(">");
-        policies.setDefaultEntry(entry);
-        broker.setDestinationPolicy(policies);
-        broker.start();
-        broker.waitUntilStarted();
-
-        factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:2401");
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    public void testDupsOk() throws Exception {
-
-        TestProducer p = null;
-        TestConsumer c = null;
-        try {
-
-            latch = new CountDownLatch(SEND_COUNT);
-
-            for(int i = 0; i < CONSUMER_COUNT; i++)
-            {
-                TestConsumer consumer = new TestConsumer();
-                consumer.start();
-                services.add(consumer);
-            }
-            for(int i = 0; i < PRODUCER_COUNT; i++)
-            {
-                TestProducer producer = new TestProducer();
-                producer.start();
-                services.add(producer);
-            }
-            waitForMessageReceipt(TimeUnit.SECONDS.toMillis(30));
-
-        } finally {
-            if (p != null) {
-                p.close();
-            }
-
-            if (c != null) {
-                c.close();
-            }
-        }
-
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
-     */
-    public void onMessage(Message message) {
-        latch.countDown();
-        if (++count % LOG_INTERVAL == 0) {
-            LOG.debug("Received message " + count);
-        }
-        try {
-            Thread.sleep(1);
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-        }
-
-    }
-
-    /**
-     * @throws InterruptedException
-     * @throws TimeoutException
-     *
-     */
-    private void waitForMessageReceipt(long timeout) throws InterruptedException, TimeoutException {
-        if (!latch.await(timeout, TimeUnit.MILLISECONDS)) {
-            throw new TimeoutException(String.format(
-                "Consumner didn't receive expected # of messages, %d of %d received.",
-                latch.getCount(), SEND_COUNT ));
-        }
-    }
-
-    private interface Service {
-        public void start() throws Exception;
-
-        public void close();
-    }
-
-    private class TestProducer implements Runnable, Service {
-        Thread thread;
-        BytesMessage message;
-
-        Connection connection;
-        Session session;
-        MessageProducer producer;
-
-        TestProducer() throws Exception {
-            thread = new Thread(this, "TestProducer");
-            connection = factory.createConnection();
-            connection.start();
-            session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-            producer = session.createProducer(session.createQueue("AMQ2401Test"));
-
-        }
-
-        public void start() {
-            thread.start();
-        }
-
-        public void run() {
-
-            int count = SEND_COUNT / PRODUCER_COUNT;
-            for (int i = 1; i <= count; i++) {
-                try {
-                    if( (i% LOG_INTERVAL)==0 ) {
-                        LOG.debug("Sending: " + i);
-                    }
-                    message = session.createBytesMessage();
-                    message.writeBytes(new byte[1024]);
-                    producer.send(message);
-                } catch (JMSException jmse) {
-                    jmse.printStackTrace();
-                    break;
-                }
-            }
-        }
-
-        public void close() {
-            try {
-                connection.close();
-            } catch (JMSException e) {
-            }
-        }
-    }
-
-    private class TestConsumer implements Runnable, Service {
-        ActiveMQConnection connection;
-        Session session;
-        MessageConsumer consumer;
-
-        TestConsumer() throws Exception {
-            factory.setOptimizeAcknowledge(false);
-            connection = (ActiveMQConnection) factory.createConnection();
-
-            session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-            consumer = session.createConsumer(session.createQueue("AMQ2401Test"));
-
-            consumer.setMessageListener(AMQ2401Test.this);
-        }
-
-        public void start() throws Exception {
-            connection.start();
-        }
-
-        public void close() {
-            try {
-                connection.close();
-            } catch (JMSException e) {
-            }
-        }
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see java.lang.Runnable#run()
-         */
-        public void run() {
-            while (latch.getCount() > 0) {
-                try {
-                    onMessage(consumer.receive());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
deleted file mode 100644
index e1df9c8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Vector;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-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.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2413Test extends CombinationTestSupport implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2413Test.class);
-    BrokerService broker;
-    private ActiveMQConnectionFactory factory;
-
-    private static final int HANG_THRESHOLD = 60;
-    private static final int SEND_COUNT = 10000;
-    private static final int RECEIVER_THINK_TIME = 1;
-    private static final int CONSUMER_COUNT = 1;
-    private static final int PRODUCER_COUNT = 50;
-    private static final int TO_SEND = SEND_COUNT / PRODUCER_COUNT;
-
-    public int deliveryMode = DeliveryMode.NON_PERSISTENT;
-    public int ackMode = Session.DUPS_OK_ACKNOWLEDGE;
-    public boolean useVMCursor = false;
-    public boolean useOptimizeAcks = false;
-
-    private ArrayList<Service> services = new ArrayList<Service>(CONSUMER_COUNT + PRODUCER_COUNT);
-    AtomicInteger count = new AtomicInteger(0);
-    Semaphore receivedMessages;
-    AtomicBoolean running = new AtomicBoolean(false);
-
-    public void initCombos() {
-        addCombinationValues("deliveryMode", new Object[] { DeliveryMode.PERSISTENT, DeliveryMode.NON_PERSISTENT });
-        addCombinationValues("ackMode", new Object[] { Session.DUPS_OK_ACKNOWLEDGE, Session.AUTO_ACKNOWLEDGE });
-        addCombinationValues("useVMCursor", new Object[] { true, false });
-        //addCombinationValues("useOptimizeAcks", new Object[] {true, false});
-    }
-
-    protected void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setDataDirectory("target" + File.separator + "test-data" + File.separator + "AMQ2401Test");
-        broker.setDeleteAllMessagesOnStartup(true);
-
-        KahaDBPersistenceAdapter kahaDb = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter();
-        kahaDb.setConcurrentStoreAndDispatchQueues(false);
-        broker.addConnector("tcp://0.0.0.0:2401");
-        PolicyMap policies = new PolicyMap();
-        PolicyEntry entry = new PolicyEntry();
-        entry.setMemoryLimit(1024 * 1024);
-        entry.setProducerFlowControl(true);
-        if (useVMCursor) {
-            entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-        }
-        entry.setQueue(">");
-        policies.setDefaultEntry(entry);
-        broker.setDestinationPolicy(policies);
-        broker.start();
-        broker.waitUntilStarted();
-
-        count.set(0);
-        receivedMessages = new Semaphore(0);
-
-        factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:2401");
-        //factory = new ActiveMQConnectionFactory("vm://localhost?broker.useJmx=false&broker.persistent=false");
-        setAutoFail(true);
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        running.set(false);
-        for(Service service : services)
-        {
-            service.close();
-        }
-        
-        broker.stop();
-        broker.waitUntilStopped();
-        
-        super.tearDown();
-    }
-
-    public void testReceipt() throws Exception {
-
-        running.set(true);
-        TestProducer p = null;
-        TestConsumer c = null;
-        try {
-
-            for (int i = 0; i < CONSUMER_COUNT; i++) {
-                TestConsumer consumer = new TestConsumer();
-                consumer.start();
-                services.add(consumer);
-            }
-            for (int i = 0; i < PRODUCER_COUNT; i++) {
-                TestProducer producer = new TestProducer(i);
-                producer.start();
-                services.add(producer);
-            }
-            waitForMessageReceipt();
-
-        } finally {
-            if (p != null) {
-                p.close();
-            }
-
-            if (c != null) {
-                c.close();
-            }
-        }
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
-     */
-    public void onMessage(Message message) {
-        receivedMessages.release();
-        if (count.incrementAndGet() % 100 == 0) {
-            LOG.info("Received message " + count);
-        }
-        track(message);
-        if (RECEIVER_THINK_TIME > 0) {
-            try {
-                Thread.currentThread().sleep(RECEIVER_THINK_TIME);
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-            }
-        }
-
-    }
-
-    HashMap<ProducerId, boolean[]> tracker = new HashMap<ProducerId, boolean[]>();
-    private synchronized void track(Message message) {
-        try {
-            MessageId id = new MessageId(message.getJMSMessageID());
-            ProducerId pid = id.getProducerId();
-            int seq = (int)id.getProducerSequenceId();
-            boolean[] ids = tracker.get(pid);
-            if (ids == null) {
-                ids = new boolean[TO_SEND + 1];
-                ids[seq] = true;
-                tracker.put(pid, ids);
-            } else {
-                assertTrue("not already received: " + id, !ids[seq]);
-                ids[seq] = true;
-            }
-        } catch (Exception e) {
-            LOG.error(e.toString());
-        }
-    }
-
-    /**
-     * @throws InterruptedException
-     * @throws TimeoutException
-     * 
-     */
-    private void waitForMessageReceipt() throws InterruptedException, TimeoutException {
-        try {
-            while (count.get() < SEND_COUNT) {
-                if (!receivedMessages.tryAcquire(HANG_THRESHOLD, TimeUnit.SECONDS)) {
-                    if (count.get() == SEND_COUNT) break;
-                    verifyTracking();
-                    throw new TimeoutException("@count=" + count.get() + " Message not received for more than " + HANG_THRESHOLD + " seconds");
-                }
-            }
-        } finally {
-            running.set(false);
-        }
-    }
-
-    private void verifyTracking() {
-        Vector<MessageId> missing = new Vector<MessageId>();
-        for (ProducerId pid : tracker.keySet()) {
-            boolean[] ids = tracker.get(pid);
-            for (int i=1; i<TO_SEND + 1; i++) {
-                if (!ids[i]) {
-                    missing.add(new MessageId(pid, i));
-                }
-            }
-        }
-        assertTrue("No missing messages: " + missing, missing.isEmpty());
-    }
-
-    private interface Service {
-        public void start() throws Exception;
-
-        public void close();
-    }
-
-    private class TestProducer implements Runnable, Service {
-        Thread thread;
-        BytesMessage message;
-        int id;
-        Connection connection;
-        Session session;
-        MessageProducer producer;
-
-        TestProducer(int id) throws Exception {
-            this.id = id;
-            thread = new Thread(this, "TestProducer-" + id);
-            connection = factory.createConnection();
-            connection.start();
-            session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-            producer = session.createProducer(session.createQueue("AMQ2401Test"));
-
-        }
-
-        public void start() {
-            thread.start();
-        }
-
-        public void run() {
-
-
-            int i = 1;
-            for (; i <= TO_SEND; i++) {
-                try {
-
-                    if (+i % 100 == 0) {
-                        LOG.info(thread.currentThread().getName() + " Sending message " + i);
-                    }
-                    message = session.createBytesMessage();
-                    message.writeBytes(new byte[1024]);
-                    producer.setDeliveryMode(deliveryMode);
-                    producer.send(message);
-                } catch (JMSException jmse) {
-                    jmse.printStackTrace();
-                    break;
-                }
-            }
-            LOG.info(thread.currentThread().getName() + " Sent: " + (i-1));
-        }
-
-        public void close() {
-            try {
-                connection.close();
-            } catch (JMSException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
-        }
-    }
-
-    private class TestConsumer implements Runnable, Service {
-        ActiveMQConnection connection;
-        Session session;
-        MessageConsumer consumer;
-        Thread thread;
-
-        TestConsumer() throws Exception {
-            factory.setOptimizeAcknowledge(false);
-            connection = (ActiveMQConnection) factory.createConnection();
-            if (useOptimizeAcks) {
-                connection.setOptimizeAcknowledge(true);
-            }
-
-            session = connection.createSession(false, ackMode);
-            consumer = session.createConsumer(session.createQueue("AMQ2401Test"));
-
-            consumer.setMessageListener(AMQ2413Test.this);
-        }
-
-        public void start() throws Exception {
-            connection.start();
-        }
-
-        public void close() {
-            try {
-                connection.close();
-            } catch (JMSException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
-        }
-
-        /*
-         * (non-Javadoc)
-         * 
-         * @see java.lang.Runnable#run()
-         */
-        public void run() {
-            while (running.get()) {
-                try {
-                    onMessage(consumer.receive());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }
-
-    }
-    
-    public static Test suite() {
-       return suite(AMQ2413Test.class);
-     }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java
deleted file mode 100644
index cd447f4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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.bugs;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.jmx.BrokerView;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2439Test extends JmsMultipleBrokersTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2439Test.class);
-    Destination dest;
-
-    
-    public void testDuplicatesThroughNetwork() throws Exception {
-        assertEquals("received expected amount", 500, receiveExactMessages("BrokerB", 500));
-        assertEquals("received expected amount", 500, receiveExactMessages("BrokerB", 500));
-        validateQueueStats();
-    }
-    
-    private void validateQueueStats() throws Exception {
-       final BrokerView brokerView = brokers.get("BrokerA").broker.getAdminView();
-       assertEquals("enequeue is correct", 1000, brokerView.getTotalEnqueueCount());
-       
-       assertTrue("dequeue is correct", Wait.waitFor(new Wait.Condition() {
-           public boolean isSatisified() throws Exception {
-               LOG.info("dequeue count (want 1000), is : " + brokerView.getTotalDequeueCount());
-               return 1000 == brokerView.getTotalDequeueCount();
-           }
-       }));
-    }
-
-    protected int receiveExactMessages(String brokerName, int msgCount) throws Exception {
-        
-        BrokerItem brokerItem = brokers.get(brokerName);
-        Connection connection = brokerItem.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);       
-        MessageConsumer consumer = session.createConsumer(dest);
-        
-        Message msg;
-        int i;
-        for (i = 0; i < msgCount; i++) {
-            msg = consumer.receive(1000);
-            if (msg == null) {
-                break;
-            }
-        }
-
-        connection.close();
-        brokerItem.connections.remove(connection);
-        
-        return i;
-    }
-    
-    public void setUp() throws Exception {
-        super.setUp();
-        createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&deleteAllMessagesOnStartup=true&advisorySupport=false"));
-        createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=true&deleteAllMessagesOnStartup=true&useJmx=false"));
-        bridgeBrokers("BrokerA", "BrokerB");
-        
-        startAllBrokers();
-        
-        // Create queue
-        dest = createDestination("TEST.FOO", false);
-        sendMessages("BrokerA", dest, 1000);
-    }   
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2489Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2489Test.java
deleted file mode 100755
index b581e6d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2489Test.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * In CLIENT_ACKNOWLEDGE and INDIVIDUAL_ACKNOWLEDGE modes following exception
- * occurs when ASYNCH consumers acknowledges messages in not in order they
- * received the messages.
- * <p>
- * Exception thrown on broker side:
- * <p>
- * {@code javax.jms.JMSException: Could not correlate acknowledgment with
- * dispatched message: MessageAck}
- * 
- * @author daroo
- */
-public class AMQ2489Test extends TestSupport {
-    private final static String SEQ_NUM_PROPERTY = "seqNum";
-
-    private final static int TOTAL_MESSAGES_CNT = 2;
-    private final static int CONSUMERS_CNT = 2;
-
-    private final CountDownLatch LATCH = new CountDownLatch(TOTAL_MESSAGES_CNT);
-
-    private Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-        super.tearDown();
-    }
-
-    public void testUnorderedClientAcknowledge() throws Exception {
-        doUnorderedAck(Session.CLIENT_ACKNOWLEDGE);
-    }
-
-    public void testUnorderedIndividualAcknowledge() throws Exception {
-        doUnorderedAck(ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE);
-    }
-
-    /**
-     * Main test method
-     * 
-     * @param acknowledgmentMode
-     *            - ACK mode to be used by consumers
-     * @throws Exception
-     */
-    protected void doUnorderedAck(int acknowledgmentMode) throws Exception {
-        List<Consumer> consumers = null;
-        Session producerSession = null;
-
-        connection.start();
-        // Because exception is thrown on broker side only, let's set up
-        // exception listener to get it
-        final TestExceptionListener exceptionListener = new TestExceptionListener();
-        connection.setExceptionListener(exceptionListener);
-        try {
-            consumers = new ArrayList<Consumer>();
-            // start customers
-            for (int i = 0; i < CONSUMERS_CNT; i++) {
-                consumers.add(new Consumer(acknowledgmentMode));
-            }
-
-            // produce few test messages
-            producerSession = connection.createSession(false,
-                    Session.AUTO_ACKNOWLEDGE);
-            final MessageProducer producer = producerSession
-                    .createProducer(new ActiveMQQueue(getQueueName()));
-            producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            for (int i = 0; i < TOTAL_MESSAGES_CNT; i++) {
-                final Message message = producerSession
-                        .createTextMessage("test");
-                // assign each message sequence number
-                message.setIntProperty(SEQ_NUM_PROPERTY, i);
-                producer.send(message);
-            }
-
-            // during each onMessage() calls consumers decreases the LATCH
-            // counter.
-            // 
-            // so, let's wait till all messages are consumed.
-            //
-            LATCH.await();
-
-            // wait a bit more to give exception listener a chance be populated
-            // with
-            // broker's error
-            TimeUnit.SECONDS.sleep(1);
-
-            assertFalse(exceptionListener.getStatusText(), exceptionListener.hasExceptions());
-
-        } finally {
-            if (producerSession != null)
-                producerSession.close();
-
-            if (consumers != null) {
-                for (Consumer c : consumers) {
-                    c.close();
-                }
-            }
-        }
-    }
-
-    protected String getQueueName() {
-        return getClass().getName() + "." + getName();
-    }
-
-    public final class Consumer implements MessageListener {
-        final Session session;
-
-        private Consumer(int acknowledgmentMode) {
-            try {
-                session = connection.createSession(false, acknowledgmentMode);
-                final Queue queue = session.createQueue(getQueueName()
-                        + "?consumer.prefetchSize=1");
-                final MessageConsumer consumer = session.createConsumer(queue);
-                consumer.setMessageListener(this);
-            } catch (JMSException e) {
-                e.printStackTrace();
-                throw new RuntimeException(e);
-            }
-        }
-
-        public void onMessage(Message message) {
-            try {
-                // retrieve sequence number assigned by producer...
-                final int seqNum = message.getIntProperty(SEQ_NUM_PROPERTY);
-
-                // ...and let's delay every second message a little bit before
-                // acknowledgment
-                if ((seqNum % 2) == 0) {
-                    System.out.println("Delayed message sequence numeber: "
-                            + seqNum);
-                    try {
-                        TimeUnit.SECONDS.sleep(1);
-                    } catch (InterruptedException e) {
-                        Thread.currentThread().interrupt();
-                    }
-                }
-
-                message.acknowledge();
-            } catch (JMSException e) {
-                e.printStackTrace();
-                throw new RuntimeException(e);
-            } finally {
-                // decrease LATCH counter in the main test method.
-                LATCH.countDown();
-            }
-        }
-
-        private void close() {
-            if (session != null) {
-                try {
-                    session.close();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                    throw new RuntimeException(e);
-                }
-            }
-        }
-    }
-
-    public final class TestExceptionListener implements ExceptionListener {
-        private final java.util.Queue<Exception> exceptions = new ConcurrentLinkedQueue<Exception>();
-
-        public void onException(JMSException e) {
-            exceptions.add(e);
-        }
-
-        public boolean hasExceptions() {
-            return exceptions.isEmpty() == false;
-        }
-
-        public String getStatusText() {
-            final StringBuilder str = new StringBuilder();
-            str.append("Exceptions count on broker side: " + exceptions.size()
-                    + ".\nMessages:\n");
-            for (Exception e : exceptions) {
-                str.append(e.getMessage() + "\n\n");
-            }
-            return str.toString();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2512Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2512Test.java
deleted file mode 100644
index 669066e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2512Test.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.util.IOHelper;
-
-public class AMQ2512Test extends EmbeddedBrokerTestSupport {
-    private static Connection connection;
-    private final static String QUEUE_NAME = "dee.q";
-    private final static int INITIAL_MESSAGES_CNT = 1000;
-    private final static int WORKER_INTERNAL_ITERATIONS = 100;
-    private final static int TOTAL_MESSAGES_CNT = INITIAL_MESSAGES_CNT * WORKER_INTERNAL_ITERATIONS
-            + INITIAL_MESSAGES_CNT;
-    private final static byte[] payload = new byte[5 * 1024];
-    private final static String TEXT = new String(payload);
-
-    private final static String PRP_INITIAL_ID = "initial-id";
-    private final static String PRP_WORKER_ID = "worker-id";
-
-    private final static CountDownLatch LATCH = new CountDownLatch(TOTAL_MESSAGES_CNT);
-
-    private final static AtomicInteger ON_MSG_COUNTER = new AtomicInteger();
-
-    public void testKahaDBFailure() throws Exception {
-        final ConnectionFactory fac = new ActiveMQConnectionFactory(this.bindAddress);
-        connection = fac.createConnection();
-        final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue queue = session.createQueue(QUEUE_NAME);
-        final MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-
-        final long startTime = System.nanoTime();
-
-        final List<Consumer> consumers = new ArrayList<Consumer>();
-        for (int i = 0; i < 20; i++) {
-            consumers.add(new Consumer("worker-" + i));
-        }
-
-        for (int i = 0; i < INITIAL_MESSAGES_CNT; i++) {
-            final TextMessage msg = session.createTextMessage(TEXT);
-            msg.setStringProperty(PRP_INITIAL_ID, "initial-" + i);
-            producer.send(msg);
-        }
-
-        LATCH.await();
-        final long endTime = System.nanoTime();
-        System.out.println("Total execution time = "
-                + TimeUnit.MILLISECONDS.convert(endTime - startTime, TimeUnit.NANOSECONDS) + " [ms].");
-        System.out.println("Rate = " + TOTAL_MESSAGES_CNT
-                / TimeUnit.SECONDS.convert(endTime - startTime, TimeUnit.NANOSECONDS) + " [msg/s].");
-
-        for (Consumer c : consumers) {
-            c.close();
-        }
-        connection.close();
-    }
-
-    private final static class Consumer implements MessageListener {
-        private final String name;
-        private final Session session;
-        private final MessageProducer producer;
-
-        private Consumer(String name) {
-            this.name = name;
-            try {
-                session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-                final Queue queue = session.createQueue(QUEUE_NAME + "?consumer.prefetchSize=10");
-                producer = session.createProducer(queue);
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-                final MessageConsumer consumer = session.createConsumer(queue);
-                consumer.setMessageListener(this);
-            } catch (JMSException e) {
-                e.printStackTrace();
-                throw new RuntimeException(e);
-            }
-        }
-
-        public void onMessage(Message message) {
-            final TextMessage msg = (TextMessage) message;
-            try {
-                if (!msg.propertyExists(PRP_WORKER_ID)) {
-                    for (int i = 0; i < WORKER_INTERNAL_ITERATIONS; i++) {
-                        final TextMessage newMsg = session.createTextMessage(msg.getText());
-                        newMsg.setStringProperty(PRP_WORKER_ID, name + "-" + i);
-                        newMsg.setStringProperty(PRP_INITIAL_ID, msg.getStringProperty(PRP_INITIAL_ID));
-                        producer.send(newMsg);
-                    }
-                }
-                msg.acknowledge();
-
-            } catch (JMSException e) {
-                e.printStackTrace();
-                throw new RuntimeException(e);
-            } finally {
-                final int onMsgCounter = ON_MSG_COUNTER.getAndIncrement();
-                if (onMsgCounter % 1000 == 0) {
-                    System.out.println("message received: " + onMsgCounter);
-                }
-                LATCH.countDown();
-            }
-        }
-
-        private void close() {
-            if (session != null) {
-                try {
-                    session.close();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                    throw new RuntimeException(e);
-                }
-            }
-        }
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://0.0.0.0:61617";
-        super.setUp();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        File dataFileDir = new File("target/test-amq-2512/datadb");
-        IOHelper.mkdirs(dataFileDir);
-        IOHelper.deleteChildren(dataFileDir);
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(dataFileDir); 
-        BrokerService answer = new BrokerService();
-        answer.setPersistenceAdapter(kaha);
-      
-        kaha.setEnableJournalDiskSyncs(false);
-        //kaha.setIndexCacheSize(10);
-        answer.setDataDirectoryFile(dataFileDir);
-        answer.setUseJmx(false);
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2513Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2513Test.java
deleted file mode 100644
index d69dd4b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2513Test.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.management.ObjectName;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.DestinationViewMBean;
-import org.apache.activemq.broker.jmx.ManagementContext;
-
-/**
- * This unit test verifies an issue when
- * javax.management.InstanceNotFoundException is thrown after subsequent startups when 
- * managementContext createConnector="false"
- *
- */
-public class AMQ2513Test extends TestCase {
-
-	BrokerService broker;
-	
-	void createBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        broker = new BrokerService();
-        broker.setBrokerName("localhost");
-        broker.setUseJmx(true);
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessagesOnStartup);
-        broker.addConnector("tcp://localhost:61616");
-
-        ManagementContext ctx = new ManagementContext();
-        //if createConnector == true everything is fine
-        ctx.setCreateConnector(false);
-        broker.setManagementContext(ctx);
-        
-        broker.start();
-
-        broker.waitUntilStarted();
-    }
-	
-	public void testJmx() throws Exception{
-		createBroker(true);
-		
-		ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(session.createQueue("test"));
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-        
-        producer.send(session.createTextMessage("test123"));
-        
-        DestinationViewMBean dv = createView();
-        assertTrue(dv.getQueueSize() > 0);
-        
-        connection.close();
-        
-        broker.stop();
-        broker.waitUntilStopped();
-        
-        createBroker(false);
-        factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        connection = factory.createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(session.createQueue("test"));
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-        producer.send(session.createTextMessage("test123"));
-        connection.close();
-        
-        dv = createView();
-        assertTrue(dv.getQueueSize() > 0);
-        
-        broker.stop();
-        broker.waitUntilStopped();
-        
-	}
-	
-	DestinationViewMBean createView() throws Exception {
-        String domain = "org.apache.activemq";
-        ObjectName name = new ObjectName(domain + ":BrokerName=localhost,Type=Queue,Destination=test");
-        return (DestinationViewMBean) broker.getManagementContext().newProxyInstance(name, DestinationViewMBean.class,
-                true);
-    }
-	
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2571Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2571Test.java
deleted file mode 100644
index ee2b3fe..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2571Test.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import javax.jms.TextMessage;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-
-public class AMQ2571Test extends EmbeddedBrokerTestSupport {
-
-    public void testTempQueueClosing() {
-        try {
-            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(this.bindAddress);
-
-            // First create session that will own the TempQueue
-            Connection connectionA = connectionFactory.createConnection();
-            connectionA.start();
-
-            Session sessionA = connectionA.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-            TemporaryQueue tempQueue = sessionA.createTemporaryQueue();
-
-            // Next, create session that will put messages on the queue.
-            Connection connectionB = connectionFactory.createConnection();
-            connectionB.start();
-
-            Session sessionB = connectionB.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-            // Create a producer for connection B.
-            final MessageProducer producerB = sessionB.createProducer(tempQueue);
-            producerB.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-            final TextMessage message = sessionB.createTextMessage("Testing AMQ TempQueue.");
-
-            Thread sendingThread = new Thread(new Runnable() {
-                public void run() {
-                    try {
-                        for (int i = 0; i < 100000; i++) {
-                            producerB.send(message);
-                        }
-                    } catch (JMSException e) {
-                        // We don't get this exception every time.
-                        // Not getting it means that we don't know if the
-                        // creator of the TempQueue has disconnected.
-                    }
-                }
-            });
-
-            // Send 5000 messages.
-            sendingThread.start();
-            // Now close connection A. This will remove the TempQueue.
-            connectionA.close();
-            // Wait for the thread to finish.
-            sendingThread.join();
-
-            // Sleep for a while to make sure that we should know that the
-            // TempQueue is gone.
-            //Thread.sleep(50);
-
-            // Now we test if we are able to send again.
-            try {
-                producerB.send(message);
-                fail("Involuntary recreated temporary queue.");
-            } catch (JMSException e) {
-                // Got exception, just as we wanted because the creator of
-                // the TempQueue had closed the connection prior to the send.
-                assertTrue("TempQueue does not exist anymore.", true);
-            }
-        } catch (Exception e) {
-            fail("Unexpected exception " + e);
-        }
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "vm://localhost";
-        super.setUp();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.setUseJmx(false);
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java
deleted file mode 100644
index 422af49..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * 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.bugs;
-
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;      
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicSession;
-
-public class AMQ2580Test extends TestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2580Test.class);
-
-    private static final String TOPIC_NAME = "topicName";
-    private static final String CLIENT_ID = "client_id";
-    private static final String textOfSelectedMsg = "good_message";
-
-    protected TopicConnection connection;
-
-    private Topic topic;
-    private Session session;
-    private MessageProducer producer;
-    private ConnectionFactory connectionFactory;
-    private TopicConnection topicConnection;
-    private BrokerService service;
-
-    public static Test suite() {
-        return suite(AMQ2580Test.class);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        initDurableBroker();
-        initConnectionFactory();
-        initTopic();
-    }
-
-    protected void tearDown() throws Exception {
-        shutdownClient();
-        service.stop();
-        super.tearDown();
-    }
-
-    private void initConnection() throws JMSException {
-        if (connection == null) {
-            LOG.info("Initializing connection");
-
-            connection = (TopicConnection) connectionFactory.createConnection();
-            connection.start();
-        }
-    }
-
-    public void initCombosForTestTopicIsDurableSmokeTest() throws Exception {
-        addCombinationValues("defaultPersistenceAdapter", PersistenceAdapterChoice.values());
-    }
-
-    public void testTopicIsDurableSmokeTest() throws Exception {
-
-        initClient();
-        MessageConsumer consumer = createMessageConsumer();
-        LOG.info("Consuming message");
-        assertNull(consumer.receive(1));
-        shutdownClient();
-        consumer.close();
-
-        sendMessages();
-        shutdownClient();
-
-        initClient();
-        consumer = createMessageConsumer();
-
-        LOG.info("Consuming message");
-        TextMessage answer1 = (TextMessage) consumer.receive(1000);
-        assertNotNull("we got our message", answer1);
-
-        consumer.close();
-    }
-
-    private MessageConsumer createMessageConsumer() throws JMSException {
-        LOG.info("creating durable subscriber");
-        return session.createDurableSubscriber(topic,
-                TOPIC_NAME,
-                "name='value'",
-                false);
-    }
-
-    private void initClient() throws JMSException {
-        LOG.info("Initializing client");
-
-        initConnection();
-        initSession();
-    }
-
-    private void shutdownClient()
-            throws JMSException {
-        LOG.info("Closing session and connection");
-        session.close();
-        connection.close();
-        session = null;
-        connection = null;
-    }
-
-    private void sendMessages()
-            throws JMSException {
-        initConnection();
-
-        initSession();
-
-        LOG.info("Creating producer");
-        producer = session.createProducer(topic);
-
-        sendMessageThatFailsSelection();
-
-        sendMessage(textOfSelectedMsg, "value");
-    }
-
-    private void initSession() throws JMSException {
-        LOG.info("Initializing session");
-        session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    private void sendMessageThatFailsSelection() throws JMSException {
-        for (int i = 0; i < 5; i++) {
-            String textOfNotSelectedMsg = "Msg_" + i;
-            sendMessage(textOfNotSelectedMsg, "not_value");
-            LOG.info("#");
-        }
-    }
-
-    private void sendMessage(
-            String msgText,
-            String propertyValue) throws JMSException {
-        LOG.info("Creating message: " + msgText);
-        TextMessage messageToSelect = session.createTextMessage(msgText);
-        messageToSelect.setStringProperty("name", propertyValue);
-        LOG.info("Sending message");
-        producer.send(messageToSelect);
-    }
-
-    protected void initConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory activeMqConnectionFactory = createActiveMqConnectionFactory();
-        connectionFactory = activeMqConnectionFactory;
-    }
-
-
-    private ActiveMQConnectionFactory createActiveMqConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory activeMqConnectionFactory = new ActiveMQConnectionFactory(
-                "failover:" + service.getTransportConnectors().get(0).getConnectUri().toString());
-        activeMqConnectionFactory.setWatchTopicAdvisories(false);
-        ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-        prefetchPolicy.setDurableTopicPrefetch(2);
-        prefetchPolicy.setOptimizeDurableTopicPrefetch(2);
-        activeMqConnectionFactory.setPrefetchPolicy(prefetchPolicy);
-        activeMqConnectionFactory.setClientID(CLIENT_ID);
-        return activeMqConnectionFactory;
-    }
-
-    private void initDurableBroker() throws Exception {
-        service = new BrokerService();
-        setDefaultPersistenceAdapter(service);
-        service.setDeleteAllMessagesOnStartup(true);
-        service.setAdvisorySupport(false);
-        service.setTransportConnectorURIs(new String[]{"tcp://localhost:0"});
-        service.setPersistent(true);
-        service.setUseJmx(false);
-        service.start();
-
-    }
-
-    private void initTopic() throws JMSException {
-        topicConnection = (TopicConnection) connectionFactory.createConnection();
-        TopicSession topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = topicSession.createTopic(TOPIC_NAME);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java
deleted file mode 100644
index 3e41dc9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.Arrays;
-import java.util.Properties;
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TopicSubscriber;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerView;
-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.ActiveMQTopic;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-// variation on AMQ2584 where the DLQ consumer works in parallel to producer so
-// that some dups are not suppressed as they are already acked by the consumer
-// the audit needs to be disabled to allow these dupes to be consumed
-public class AMQ2584ConcurrentDlqTest extends org.apache.activemq.TestSupport {
-
-    static final Logger LOG = LoggerFactory.getLogger(AMQ2584ConcurrentDlqTest.class);
-    BrokerService broker = null;
-    ActiveMQTopic topic;
-
-    ActiveMQConnection consumerConnection = null, producerConnection = null, dlqConnection = null;
-    Session consumerSession;
-    Session producerSession;
-    MessageProducer producer;
-    Vector<TopicSubscriber> duralbeSubs = new Vector<TopicSubscriber>();
-    final int numMessages = 1000;
-    final int numDurableSubs = 2;
-
-    String data;
-    private long dlqConsumerLastReceivedTimeStamp;
-    private AtomicLong dlqReceivedCount = new AtomicLong(0);
-
-    // 2 deliveries of each message, 3 producers
-    CountDownLatch redeliveryConsumerLatch = new CountDownLatch(((2 * numMessages) * numDurableSubs) - 1);
-    // should get at least numMessages, possibly more
-    CountDownLatch dlqConsumerLatch = new CountDownLatch((numMessages - 1));
-
-    public void testSize() throws Exception {
-        openConsumer(redeliveryConsumerLatch);
-        openDlqConsumer(dlqConsumerLatch);
-
-
-        assertEquals(0, broker.getAdminView().getStorePercentUsage());
-
-        for (int i = 0; i < numMessages; i++) {
-            sendMessage(false);
-        }
-
-        final BrokerView brokerView = broker.getAdminView();
-
-        broker.getSystemUsage().getStoreUsage().isFull();
-        LOG.info("store percent usage: " + brokerView.getStorePercentUsage());
-        assertTrue("redelivery consumer got all it needs, remaining: "
-                + redeliveryConsumerLatch.getCount(), redeliveryConsumerLatch.await(60, TimeUnit.SECONDS));
-        assertTrue("dql  consumer got all it needs", dlqConsumerLatch.await(60, TimeUnit.SECONDS));
-        closeConsumer();
-
-        LOG.info("Giving dlq a chance to clear down once topic consumer is closed");
-
-        // consumer all of the duplicates that arrived after the first ack
-        closeDlqConsumer();
-
-        //get broker a chance to clean obsolete messages, wait 2*cleanupInterval
-        Thread.sleep(5000);
-
-        FilenameFilter justLogFiles = new FilenameFilter() {
-            public boolean accept(File file, String s) {
-                return s.endsWith(".log");
-            }
-        };
-        int numFiles = ((KahaDBPersistenceAdapter) broker.getPersistenceAdapter()).getDirectory().list(justLogFiles).length;
-        if (numFiles > 2) {
-            LOG.info(Arrays.toString(((KahaDBPersistenceAdapter) broker.getPersistenceAdapter()).getDirectory().list(justLogFiles)));
-        }
-        LOG.info("num files: " + numFiles);
-        assertEquals("kahaDB dir should contain 1 db file,is: " + numFiles, 1, numFiles);
-    }
-
-    private void openConsumer(final CountDownLatch latch) throws Exception {
-        consumerConnection = (ActiveMQConnection) createConnection();
-        consumerConnection.setClientID("cliID");
-        consumerConnection.start();
-        consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageListener listener = new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-                try {
-                    consumerSession.recover();
-                } catch (Exception ignored) {
-                    ignored.printStackTrace();
-                }
-            }
-        };
-
-        for (int i = 1; i <= numDurableSubs; i++) {
-            TopicSubscriber sub = consumerSession.createDurableSubscriber(topic, "subName" + i);
-            sub.setMessageListener(listener);
-            duralbeSubs.add(sub);
-        }
-    }
-
-    private void openDlqConsumer(final CountDownLatch received) throws Exception {
-
-        dlqConnection = (ActiveMQConnection) createConnection();
-        Session dlqSession = dlqConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer dlqConsumer = dlqSession.createConsumer(new ActiveMQQueue("ActiveMQ.DLQ"));
-        dlqConsumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                if (received.getCount() > 0 && received.getCount() % 200 == 0) {
-                    LOG.info("remaining on DLQ: " + received.getCount());
-                }
-                received.countDown();
-                dlqConsumerLastReceivedTimeStamp = System.currentTimeMillis();
-                dlqReceivedCount.incrementAndGet();
-            }
-        });
-        dlqConnection.start();
-    }
-
-
-    private void closeConsumer() throws JMSException {
-        for (TopicSubscriber sub : duralbeSubs) {
-            sub.close();
-        }
-        if (consumerSession != null) {
-            for (int i = 1; i <= numDurableSubs; i++) {
-                consumerSession.unsubscribe("subName" + i);
-            }
-        }
-        if (consumerConnection != null) {
-            consumerConnection.close();
-            consumerConnection = null;
-        }
-    }
-
-    private void closeDlqConsumer() throws JMSException, InterruptedException {
-        final long limit = System.currentTimeMillis() + 30 * 1000;
-        if (dlqConsumerLastReceivedTimeStamp > 0) {
-            while (System.currentTimeMillis() < dlqConsumerLastReceivedTimeStamp + 5000
-                    && System.currentTimeMillis() < limit) {
-                LOG.info("waiting for DLQ do drain, receivedCount: " + dlqReceivedCount);
-                TimeUnit.SECONDS.sleep(1);
-            }
-        }
-        if (dlqConnection != null) {
-            dlqConnection.close();
-            dlqConnection = null;
-        }
-    }
-
-    private void sendMessage(boolean filter) throws Exception {
-        if (producerConnection == null) {
-            producerConnection = (ActiveMQConnection) createConnection();
-            producerConnection.start();
-            producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            producer = producerSession.createProducer(topic);
-        }
-
-        Message message = producerSession.createMessage();
-        message.setStringProperty("data", data);
-        producer.send(message);
-    }
-
-    private void startBroker(boolean deleteMessages) throws Exception {
-        broker = new BrokerService();
-        broker.setAdvisorySupport(false);
-        broker.setBrokerName("testStoreSize");
-
-        PolicyMap map = new PolicyMap();
-        PolicyEntry entry = new PolicyEntry();
-        entry.setEnableAudit(false);
-        map.setDefaultEntry(entry);
-        broker.setDestinationPolicy(map);
-
-        if (deleteMessages) {
-            broker.setDeleteAllMessagesOnStartup(true);
-        }
-        configurePersistenceAdapter(broker.getPersistenceAdapter());
-        broker.getSystemUsage().getStoreUsage().setLimit(200 * 1000 * 1000);
-        broker.start();
-    }
-
-    private void configurePersistenceAdapter(PersistenceAdapter persistenceAdapter) {
-        Properties properties = new Properties();
-        String maxFileLengthVal = String.valueOf(2 * 1024 * 1024);
-        properties.put("journalMaxFileLength", maxFileLengthVal);
-        properties.put("maxFileLength", maxFileLengthVal);
-        properties.put("cleanupInterval", "2000");
-        properties.put("checkpointInterval", "2000");
-        // there are problems with duplicate dispatch in the cursor, which maintain
-        // a map of messages. A dup dispatch can be dropped.
-        // see: org.apache.activemq.broker.region.cursors.OrderedPendingList
-        // Adding duplicate detection to the default DLQ strategy removes the problem
-        // which means we can leave the default for concurrent store and dispatch q
-        //properties.put("concurrentStoreAndDispatchQueues", "false");
-
-        IntrospectionSupport.setProperties(persistenceAdapter, properties);
-    }
-
-    private void stopBroker() throws Exception {
-        if (broker != null)
-            broker.stop();
-        broker = null;
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://testStoreSize?jms.watchTopicAdvisories=false&jms.redeliveryPolicy.maximumRedeliveries=1&jms.redeliveryPolicy.initialRedeliveryDelay=0&waitForStart=5000&create=false");
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        StringBuilder sb = new StringBuilder(5000);
-        for (int i = 0; i < 5000; i++) {
-            sb.append('a');
-        }
-        data = sb.toString();
-
-        startBroker(true);
-        topic = (ActiveMQTopic) createDestination();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        stopBroker();
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java
deleted file mode 100644
index 57e23b8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2584Test.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerView;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2584Test extends org.apache.activemq.TestSupport {
-
-    static final Logger LOG = LoggerFactory.getLogger(AMQ2584Test.class);
-    BrokerService broker = null;
-    ActiveMQTopic topic;
-
-    ActiveMQConnection consumerConnection = null, producerConnection = null;
-    Session producerSession;
-    MessageProducer producer;
-    final int minPercentUsageForStore = 10;
-    String data;
-
-    public static Test suite() {
-        return suite(AMQ2584Test.class);
-    }
-
-    public void initCombosForTestSize() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{
-                        PersistenceAdapterChoice.AMQ,
-                        PersistenceAdapterChoice.KahaDB
-                });
-    }
-
-    public void testSize() throws Exception {
-        CountDownLatch redeliveryConsumerLatch = new CountDownLatch(15000 -1);
-        openConsumer(redeliveryConsumerLatch);
-
-        assertEquals(0, broker.getAdminView().getStorePercentUsage());
-
-        for (int i = 0; i < 5000; i++) {
-            sendMessage(false);
-        }
-
-        final BrokerView brokerView = broker.getAdminView();
-
-        broker.getSystemUsage().getStoreUsage().isFull();
-        LOG.info("store percent usage: "+brokerView.getStorePercentUsage());
-        assertTrue("some store in use", broker.getAdminView().getStorePercentUsage() > minPercentUsageForStore);
-
-        assertTrue("redelivery consumer got all it needs", redeliveryConsumerLatch.await(60, TimeUnit.SECONDS));
-        closeConsumer();
-
-        // consume from DLQ
-        final CountDownLatch received = new CountDownLatch(5000 -1);
-        consumerConnection = (ActiveMQConnection) createConnection();
-        Session dlqSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer dlqConsumer = dlqSession.createConsumer(new ActiveMQQueue("ActiveMQ.DLQ"));
-        dlqConsumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                if (received.getCount() % 500 == 0) {
-                    LOG.info("remaining on DLQ: " + received.getCount());
-                }
-                received.countDown();
-            }
-        });
-        consumerConnection.start();
-
-        assertTrue("Not all messages reached the DLQ", received.await(60, TimeUnit.SECONDS));
-
-        assertTrue("Store usage exceeds expected usage",
-                Wait.waitFor(new Wait.Condition() {
-                    public boolean isSatisified() throws Exception {
-                        broker.getSystemUsage().getStoreUsage().isFull();
-                        LOG.info("store precent usage: "+brokerView.getStorePercentUsage());
-                        return broker.getAdminView().getStorePercentUsage() < minPercentUsageForStore;
-                    }
-                }));
-
-         closeConsumer();
-
-    }
-
-    private void openConsumer(final CountDownLatch latch) throws Exception {
-        consumerConnection = (ActiveMQConnection) createConnection();
-        consumerConnection.setClientID("cliID");
-        consumerConnection.start();
-        final Session session = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageListener listener = new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-                try {
-                    session.recover();
-                } catch (Exception ignored) {
-                    ignored.printStackTrace();
-                }
-
-            }
-        };
-
-        session.createDurableSubscriber(topic, "subName1").setMessageListener(listener);
-        session.createDurableSubscriber(topic, "subName2").setMessageListener(listener);
-        session.createDurableSubscriber(topic, "subName3").setMessageListener(listener);
-    }
-
-    private void closeConsumer() throws JMSException {
-        if (consumerConnection != null)
-            consumerConnection.close();
-        consumerConnection = null;
-    }
-
-    private void sendMessage(boolean filter) throws Exception {
-        if (producerConnection == null) {
-            producerConnection = (ActiveMQConnection) createConnection();
-            producerConnection.start();
-            producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            producer = producerSession.createProducer(topic);
-        }
-
-        Message message = producerSession.createMessage();
-        message.setStringProperty("data", data);
-        producer.send(message);
-    }
-
-    private void startBroker(boolean deleteMessages) throws Exception {
-        broker = new BrokerService();
-        broker.setAdvisorySupport(false);
-        broker.setBrokerName("testStoreSize");
-
-        if (deleteMessages) {
-            broker.setDeleteAllMessagesOnStartup(true);
-        }
-        setDefaultPersistenceAdapter(broker);
-        configurePersistenceAdapter(broker.getPersistenceAdapter());
-        broker.getSystemUsage().getStoreUsage().setLimit(200 * 1000 * 1000);
-        broker.start();
-    }
-
-    private void configurePersistenceAdapter(PersistenceAdapter persistenceAdapter) {
-        Properties properties = new Properties();
-        String maxFileLengthVal = String.valueOf(1 * 1024 * 1024);
-        properties.put("journalMaxFileLength", maxFileLengthVal);
-        properties.put("maxFileLength", maxFileLengthVal);
-        properties.put("cleanupInterval", "2000");
-        properties.put("checkpointInterval", "2000");
-
-        IntrospectionSupport.setProperties(persistenceAdapter, properties);
-    }
-
-    private void stopBroker() throws Exception {
-        if (broker != null)
-            broker.stop();
-        broker = null;
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://testStoreSize?jms.watchTopicAdvisories=false&jms.redeliveryPolicy.maximumRedeliveries=0&waitForStart=5000&create=false");
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        StringBuilder sb = new StringBuilder(5000);
-        for (int i = 0; i < 5000; i++) {
-            sb.append('a');
-        }
-        data = sb.toString();
-
-        startBroker(true);
-        topic = (ActiveMQTopic) createDestination();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        stopBroker();
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2585Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2585Test.java
deleted file mode 100644
index c9553be..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2585Test.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- *
- * 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.bugs;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.spring.ConsumerBean;
-
-public class AMQ2585Test extends EmbeddedBrokerAndConnectionTestSupport {
-    private final Destination destination = new ActiveMQQueue("MyQueue");
-    final static String LENGTH10STRING = "1234567890";
-    private Session session;
-    private MessageProducer producer;
-    private ConsumerBean messageList;
-
-    public void testOneMessageWithProperties() throws Exception {
-        TextMessage message = session.createTextMessage(LENGTH10STRING);
-        message.setStringProperty(LENGTH10STRING, LENGTH10STRING);
-        producer.send(message);
-
-        messageList.assertMessagesArrived(1);
-
-        ActiveMQTextMessage received = ((ActiveMQTextMessage) messageList
-                .flushMessages().get(0));
-
-        assertEquals(LENGTH10STRING, received.getText());
-        assertTrue(received.getProperties().size() > 0);
-        assertTrue(received.propertyExists(LENGTH10STRING));
-        assertEquals(LENGTH10STRING, received.getStringProperty(LENGTH10STRING));
-
-        /**
-         * As specified by getSize(), the size (memory usage) of the body should
-         * be length of text * 2. Unsure of how memory usage is calculated for
-         * properties, but should probably not be less than the sum of (string)
-         * lengths for the key name and value.
-         */
-
-        final int sizeShouldBeNoLessThan = LENGTH10STRING.length() * 4 + received.DEFAULT_MINIMUM_MESSAGE_SIZE;
-        assertTrue("Message size was smaller than expected: " + received.getSize(),
-                received.getSize() >= sizeShouldBeNoLessThan);
-        assertFalse(LENGTH10STRING.length() * 2 == received.getSize());
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = bindAddress + "?marshal=true";
-        super.setUp();
-        messageList = new ConsumerBean();
-        messageList.setVerbose(true);
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer messageConsumer = session.createConsumer(destination);
-
-        messageConsumer.setMessageListener(messageList);
-
-        producer = session.createProducer(destination);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2616Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2616Test.java
deleted file mode 100644
index 89157b3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2616Test.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy;
-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.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.util.IOHelper;
-
-public class AMQ2616Test extends TestCase {
-    private static final int NUMBER = 2000;
-    private BrokerService brokerService;
-    private final ArrayList<Thread> threads = new ArrayList<Thread>();
-    String ACTIVEMQ_BROKER_BIND = "tcp://0.0.0.0:61616";
-    AtomicBoolean shutdown = new AtomicBoolean();
-    
-    public void testQueueResourcesReleased() throws Exception{
-        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory(ACTIVEMQ_BROKER_BIND);
-        Connection tempConnection = fac.createConnection();
-        tempConnection.start();
-        Session tempSession = tempConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue tempQueue = tempSession.createTemporaryQueue();
-        final MessageConsumer tempConsumer = tempSession.createConsumer(tempQueue);
-               
-        Connection testConnection = fac.createConnection();
-        long startUsage = brokerService.getSystemUsage().getMemoryUsage().getUsage();
-        Session testSession = testConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer testProducer = testSession.createProducer(tempQueue);
-        byte[] payload = new byte[1024*4];
-        for (int i = 0; i < NUMBER; i++ ) {
-            BytesMessage msg = testSession.createBytesMessage();
-            msg.writeBytes(payload);
-            testProducer.send(msg);
-        }
-        long endUsage = brokerService.getSystemUsage().getMemoryUsage().getUsage();
-        assertFalse(startUsage==endUsage);
-        tempConnection.close();
-        Thread.sleep(1000);
-        endUsage = brokerService.getSystemUsage().getMemoryUsage().getUsage();
-        assertEquals(startUsage,endUsage);
-    }
-   
-    
-    @Override
-    protected void setUp() throws Exception {
-        // Start an embedded broker up.
-        brokerService = new BrokerService();
-
-        KahaDBPersistenceAdapter adaptor = new KahaDBPersistenceAdapter();
-        adaptor.setEnableJournalDiskSyncs(false);
-        File file = new File("target/AMQ2616Test");
-        IOHelper.mkdirs(file);
-        IOHelper.deleteChildren(file);
-        adaptor.setDirectory(file);
-        brokerService.setPersistenceAdapter(adaptor);
-
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry pe = new PolicyEntry();
-        pe.setMemoryLimit(10 * 1024 * 1024);
-        pe.setOptimizedDispatch(true);
-        pe.setProducerFlowControl(false);
-        pe.setExpireMessagesPeriod(1000);
-        pe.setPendingQueuePolicy(new FilePendingQueueMessageStoragePolicy());
-        policyMap.put(new ActiveMQQueue(">"), pe);
-        brokerService.setDestinationPolicy(policyMap);
-        brokerService.getSystemUsage().getMemoryUsage().setLimit(20 * 1024 * 1024);
-        brokerService.getSystemUsage().getTempUsage().setLimit(200 * 1024 * 1024);
-        brokerService.addConnector(ACTIVEMQ_BROKER_BIND);
-        brokerService.start();
-        new ActiveMQQueue(getName());
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        // Stop any running threads.
-        shutdown.set(true);
-        for (Thread t : threads) {
-            t.interrupt();
-            t.join();
-        }
-        brokerService.stop();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java
deleted file mode 100644
index 2ac6ff3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2645Test extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2645Test.class);
-    private final static String QUEUE_NAME = "test.daroo.q";
-
-    public void testWaitForTransportInterruptionProcessingHang()
-            throws Exception {
-        final ConnectionFactory fac = new ActiveMQConnectionFactory(
-                "failover:(" + this.bindAddress + ")");
-        final Connection connection = fac.createConnection();
-        try {
-            final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            final Queue queue = session.createQueue(QUEUE_NAME);
-            final MessageProducer producer = session.createProducer(queue);
-            producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            connection.start();
-
-            producer.send(session.createTextMessage("test"));
-
-            final CountDownLatch afterRestart = new CountDownLatch(1);
-            final CountDownLatch twoNewMessages = new CountDownLatch(1);
-            final CountDownLatch thirdMessageReceived = new CountDownLatch(1);
-
-            final MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME));
-            consumer.setMessageListener(new MessageListener() {
-                public void onMessage(Message message) {
-                    try {
-                        afterRestart.await();
-
-                        final TextMessage txtMsg = (TextMessage) message;
-                        if (txtMsg.getText().equals("test")) {
-                            producer.send(session.createTextMessage("test 1"));
-                            TimeUnit.SECONDS.sleep(5);
-                            // THIS SECOND send() WILL CAUSE CONSUMER DEADLOCK
-                            producer.send(session.createTextMessage("test 2"));
-                            LOG.info("Two new messages produced.");
-                            twoNewMessages.countDown();
-                        } else if (txtMsg.getText().equals("test 3")) {
-                            thirdMessageReceived.countDown();
-                        }
-                    } catch (Exception e) {
-                        LOG.error(e.toString());
-                        throw new RuntimeException(e);
-                    }
-                }
-            });
-
-            LOG.info("Stopping broker....");
-            broker.stop();
-
-            LOG.info("Creating new broker...");
-            broker = createBroker();
-            startBroker();
-            broker.waitUntilStarted();
-
-            afterRestart.countDown();
-            assertTrue("Consumer is deadlocked!", twoNewMessages.await(60, TimeUnit.SECONDS));
-
-            producer.send(session.createTextMessage("test 3"));
-            assertTrue("Consumer got third message after block", thirdMessageReceived.await(60, TimeUnit.SECONDS));
-
-        } finally {
-            broker.stop();
-        }
-
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://0.0.0.0:61617";
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2736Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2736Test.java
deleted file mode 100644
index 661b25d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2736Test.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.util.DefaultIOExceptionHandler;
-import org.junit.After;
-import org.junit.Test;
-
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-public class AMQ2736Test {
-    BrokerService broker;
-
-    @Test
-    public void testRollbackOnRecover() throws Exception {
-        broker = createAndStartBroker(true);
-        DefaultIOExceptionHandler ignoreAllExceptionsIOExHandler = new DefaultIOExceptionHandler();
-        ignoreAllExceptionsIOExHandler.setIgnoreAllErrors(true);
-        broker.setIoExceptionHandler(ignoreAllExceptionsIOExHandler);
-
-        ActiveMQConnectionFactory f = new ActiveMQConnectionFactory("vm://localhost?async=false");
-        f.setAlwaysSyncSend(true);
-        Connection c = f.createConnection();
-        c.start();
-        Session s = c.createSession(true, Session.SESSION_TRANSACTED);
-        MessageProducer p = s.createProducer(new ActiveMQQueue("Tx"));
-        p.send(s.createTextMessage("aa"));
-
-        // kill journal without commit
-        KahaDBPersistenceAdapter pa = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter();
-        KahaDBStore store = pa.getStore();
-
-        assertNotNull("last tx location is present " + store.getFirstInProgressTxLocation());
-
-        // test hack, close the journal to ensure no further journal updates when broker stops
-        // mimic kill -9 in terms of no normal shutdown sequence
-        store.getJournal().close();
-        try {
-            store.close();
-        } catch (Exception expectedLotsAsJournalBorked) {
-        }
-        store.getLockFile().unlock();
-
-        broker.stop();
-        broker.waitUntilStopped();
-
-        // restart with recovery
-        broker = createAndStartBroker(false);
-
-        pa = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter();
-        store = pa.getStore();
-
-        // inflight non xa tx should be rolledback on recovery
-        assertNull("in progress tx location is present ", store.getFirstInProgressTxLocation());
-
-    }
-
-    @After
-    public void stopBroker() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    private BrokerService createAndStartBroker(boolean deleteAll) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(deleteAll);
-        broker.setUseJmx(false);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.start();
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java
deleted file mode 100644
index b52f5c0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2751Test extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2751Test.class);
-
-    private static String clientIdPrefix = "consumer";
-    private static String queueName = "FOO";
-
-    public void testRecoverRedelivery() throws Exception {
-
-        final CountDownLatch redelivery = new CountDownLatch(6);
-        final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
-                "failover:(" + broker.getTransportConnectors().get(0).getConnectUri() + ")");
-        try {
-
-            Connection connection = factory.createConnection();
-            String clientId = clientIdPrefix;
-            connection.setClientID(clientId);
-
-            final Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-            Queue queue = session.createQueue(queueName);
-
-            MessageConsumer consumer = session.createConsumer(queue);
-
-            consumer.setMessageListener(new MessageListener() {
-                public void onMessage(Message message) {
-                    try {
-                        LOG.info("Got message: " + message.getJMSMessageID());
-                        if (message.getJMSRedelivered()) {
-                            LOG.info("It's a redelivery.");
-                            redelivery.countDown();
-                        }
-                        LOG.info("calling recover() on the session to force redelivery.");
-                        session.recover();
-                    } catch (JMSException e) {
-                        e.printStackTrace();
-                    }
-                }
-            });
-
-            System.out.println("Created queue consumer with clientId " + clientId);
-            connection.start();
-
-            MessageProducer producer = session.createProducer(queue);
-            producer.send(session.createTextMessage("test"));
-
-            assertTrue("we got 6 redeliveries", redelivery.await(20, TimeUnit.SECONDS));
-
-        } finally {
-            broker.stop();
-        }
-
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:0";
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2832Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2832Test.java
deleted file mode 100644
index b89c32b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2832Test.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.bugs;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Test;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class AMQ2832Test {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2832Test.class);
-
-    BrokerService broker = null;
-    private final Destination destination = new ActiveMQQueue("AMQ2832Test");
-
-    protected void startBroker(boolean delete) throws Exception {
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(delete);
-        broker.setPersistent(true);
-        broker.setUseJmx(false);
-        broker.addConnector("tcp://localhost:0");
-
-        configurePersistence(broker, delete);
-
-        broker.start();
-        LOG.info("Starting broker..");
-    }
-
-    protected void configurePersistence(BrokerService brokerService, boolean deleteAllOnStart) throws Exception {
-        KahaDBPersistenceAdapter adapter = (KahaDBPersistenceAdapter) brokerService.getPersistenceAdapter();
-
-        // ensure there are a bunch of data files but multiple entries in each
-        adapter.setJournalMaxFileLength(1024 * 20);
-
-        // speed up the test case, checkpoint an cleanup early and often
-        adapter.setCheckpointInterval(500);
-        adapter.setCleanupInterval(500);
-
-        if (!deleteAllOnStart) {
-            adapter.setForceRecoverIndex(true);
-        }
-
-    }
-
-    @Test
-    public void testAckRemovedMessageReplayedAfterRecovery() throws Exception {
-
-        startBroker(true);
-
-        StagedConsumer consumer = new StagedConsumer();
-        int numMessagesAvailable = produceMessagesToConsumeMultipleDataFiles(20);
-        // this will block the reclaiming of one data file
-        Message firstUnacked = consumer.receive(10);
-        LOG.info("first unacked: " + firstUnacked.getJMSMessageID());
-        Message secondUnacked = consumer.receive(1);
-        LOG.info("second unacked: " + secondUnacked.getJMSMessageID());
-        numMessagesAvailable -= 11;
-
-        numMessagesAvailable += produceMessagesToConsumeMultipleDataFiles(10);
-        // ensure ack is another data file
-        LOG.info("Acking firstUnacked: " + firstUnacked.getJMSMessageID());
-        firstUnacked.acknowledge();
-
-        numMessagesAvailable += produceMessagesToConsumeMultipleDataFiles(10);
-
-        consumer.receive(numMessagesAvailable).acknowledge();
-
-        // second unacked should keep first data file available but journal with the first ack
-        // may get whacked
-        consumer.close();
-
-        broker.stop();
-        broker.waitUntilStopped();
-
-        startBroker(false);
-
-        consumer = new StagedConsumer();     
-        // need to force recovery?
-
-        Message msg = consumer.receive(1, 5);
-        assertNotNull("One messages left after recovery", msg);
-        msg.acknowledge();
-
-        // should be no more messages
-        msg = consumer.receive(1, 5);
-        assertEquals("Only one messages left after recovery: " + msg, null, msg);
-        consumer.close();
-
-    }
-
-    private int produceMessagesToConsumeMultipleDataFiles(int numToSend) throws Exception {
-        int sent = 0;
-        Connection connection = new ActiveMQConnectionFactory(
-                broker.getTransportConnectors().get(0).getConnectUri()).createConnection();
-        connection.start();
-        try {
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(destination);
-            for (int i = 0; i < numToSend; i++) {
-                producer.send(createMessage(session, i));
-                sent++;
-            }
-        } finally {
-            connection.close();
-        }
-        
-        return sent;
-    }
-
-    final String payload = new String(new byte[1024]);
-
-    private Message createMessage(Session session, int i) throws Exception {
-        return session.createTextMessage(payload + "::" + i);
-    }
-
-    private class StagedConsumer {
-        Connection connection;
-        MessageConsumer consumer;
-
-        StagedConsumer() throws Exception {
-            connection = new ActiveMQConnectionFactory("failover://" +
-                    broker.getTransportConnectors().get(0).getConnectUri().toString()).createConnection();
-            connection.start();
-            consumer = connection.createSession(false, ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE).createConsumer(destination);
-        }
-
-        public Message receive(int numToReceive) throws Exception {
-            return receive(numToReceive, 2);
-        }
-
-        public Message receive(int numToReceive, int timeoutInSeconds) throws Exception {
-            Message msg = null;
-            for (; numToReceive > 0; numToReceive--) {
-
-                do  {
-                    msg = consumer.receive(1*1000);
-                } while (msg == null && --timeoutInSeconds > 0);
-
-                if (numToReceive > 1) {
-                    msg.acknowledge();
-                }
-
-                if (msg != null) {
-                    LOG.debug("received: " + msg.getJMSMessageID());
-                }
-            }
-            // last message, unacked
-            return msg;
-        }
-
-        void close() throws JMSException {
-            consumer.close();
-            connection.close();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2870Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2870Test.java
deleted file mode 100644
index 6355040..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2870Test.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.Properties;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TopicSubscriber;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerView;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2870Test extends org.apache.activemq.TestSupport {
-
-    static final Logger LOG = LoggerFactory.getLogger(AMQ2870Test.class);
-    BrokerService broker = null;
-    ActiveMQTopic topic;
-
-    ActiveMQConnection consumerConnection = null, producerConnection = null;
-    Session producerSession;
-    MessageProducer producer;
-    final int minPercentUsageForStore = 10;
-    String data;
-
-    public static Test suite() {
-        return suite(AMQ2870Test.class);
-    }
-    
-    public void initCombosForTestSize() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{ PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.AMQ});
-    }
-    
-    public void testSize() throws Exception {
-        openConsumer();
-
-        assertEquals(0, broker.getAdminView().getStorePercentUsage());
-
-        for (int i = 0; i < 5000; i++) {
-            sendMessage(false);
-        }
-
-        final BrokerView brokerView = broker.getAdminView();
-
-        // wait for reclaim
-        assertTrue("in range with consumer",
-                Wait.waitFor(new Wait.Condition() {
-                    public boolean isSatisified() throws Exception {
-                        // usage percent updated only on send check for isFull so once
-                        // sends complete it is no longer updated till next send via a call to isFull
-                        // this is optimal as it is only used to block producers
-                        broker.getSystemUsage().getStoreUsage().isFull();
-                        LOG.info("store precent usage: "+brokerView.getStorePercentUsage());
-                        return broker.getAdminView().getStorePercentUsage() < minPercentUsageForStore;
-                    }
-                }));
-
-
-        closeConsumer();
-
-        assertTrue("in range with closed consumer",
-                Wait.waitFor(new Wait.Condition() {
-                    public boolean isSatisified() throws Exception {
-                        broker.getSystemUsage().getStoreUsage().isFull();
-                        LOG.info("store precent usage: "+brokerView.getStorePercentUsage());
-                        return broker.getAdminView().getStorePercentUsage() < minPercentUsageForStore;
-                    }
-                }));
-
-        for (int i = 0; i < 5000; i++) {
-            sendMessage(false);
-        }
-
-        // What if i drop the subscription?
-        broker.getAdminView().destroyDurableSubscriber("cliID", "subName");
-
-        assertTrue("in range after send with consumer",
-                Wait.waitFor(new Wait.Condition() {
-                    public boolean isSatisified() throws Exception {
-                        broker.getSystemUsage().getStoreUsage().isFull();
-                        LOG.info("store precent usage: "+brokerView.getStorePercentUsage());                        
-                        return broker.getAdminView().getStorePercentUsage() < minPercentUsageForStore;
-                    }
-                }));
-
-    }
-
-    private void openConsumer() throws Exception {
-        consumerConnection = (ActiveMQConnection) createConnection();
-        consumerConnection.setClientID("cliID");
-        consumerConnection.start();
-        Session session = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TopicSubscriber subscriber = session.createDurableSubscriber(topic, "subName", "filter=true", false);
-
-        subscriber.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                // received++;
-            }
-        });
-    }
-
-    private void closeConsumer() throws JMSException {
-        if (consumerConnection != null)
-            consumerConnection.close();
-        consumerConnection = null;
-    }
-
-    private void sendMessage(boolean filter) throws Exception {
-        if (producerConnection == null) {
-            producerConnection = (ActiveMQConnection) createConnection();
-            producerConnection.start();
-            producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            producer = producerSession.createProducer(topic);
-        }
-
-        Message message = producerSession.createMessage();
-        message.setBooleanProperty("filter", filter);
-        message.setStringProperty("data", data);
-        producer.send(message);
-    }
-
-    private void startBroker(boolean deleteMessages) throws Exception {
-        broker = new BrokerService();
-        broker.setAdvisorySupport(false);
-        broker.setBrokerName("testStoreSize");
-
-        if (deleteMessages) {
-            broker.setDeleteAllMessagesOnStartup(true);
-        }
-        setDefaultPersistenceAdapter(broker);
-        configurePersistenceAdapter(broker.getPersistenceAdapter());
-        broker.getSystemUsage().getStoreUsage().setLimit(100 * 1000 * 1000);
-        broker.start();
-    }
-
-    private void configurePersistenceAdapter(PersistenceAdapter persistenceAdapter) {
-        Properties properties = new Properties();
-        String maxFileLengthVal = String.valueOf(2 * 1024 * 1024);
-        properties.put("journalMaxFileLength", maxFileLengthVal);
-        properties.put("maxFileLength", maxFileLengthVal);
-        properties.put("cleanupInterval", "2000");
-        properties.put("checkpointInterval", "2000");
-       
-        IntrospectionSupport.setProperties(persistenceAdapter, properties);
-    }
-
-    private void stopBroker() throws Exception {
-        if (broker != null)
-            broker.stop();
-        broker = null;
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://testStoreSize?jms.watchTopicAdvisories=false&waitForStart=5000&create=false");
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        StringBuilder sb = new StringBuilder(5000);
-        for (int i = 0; i < 5000; i++) {
-            sb.append('a');
-        }
-        data = sb.toString();
-
-        startBroker(true);
-        topic = (ActiveMQTopic) createDestination();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        stopBroker();
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2902Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2902Test.java
deleted file mode 100644
index 774d2ef..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2902Test.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.TransportConnection;
-import org.apache.activemq.transport.TransportDisposedIOException;
-import org.apache.log4j.Appender;
-import org.apache.log4j.Layout;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.spi.ErrorHandler;
-import org.apache.log4j.spi.Filter;
-import org.apache.log4j.spi.LoggingEvent;
-
-public class AMQ2902Test extends TestCase {
-    final AtomicBoolean gotExceptionInLog = new AtomicBoolean(Boolean.FALSE);
-
-    Appender appender = new Appender() {
-        public void addFilter(Filter newFilter) {
-        }
-
-        public Filter getFilter() {
-            return null;
-        }
-
-        public void clearFilters() {
-        }
-
-        public void close() {
-        }
-
-        public void doAppend(LoggingEvent event) {
-            if (event.getThrowableInformation() != null
-                    && event.getThrowableInformation().getThrowable() instanceof TransportDisposedIOException) {
-                gotExceptionInLog.set(Boolean.TRUE);
-            }
-            return;
-        }
-
-        public String getName() {
-            return "AMQ2902TestAppender";
-        }
-
-        public void setErrorHandler(ErrorHandler errorHandler) {
-        }
-
-        public ErrorHandler getErrorHandler() {
-            return null;
-        }
-
-        public void setLayout(Layout layout) {
-        }
-
-        public Layout getLayout() {
-            return null;
-        }
-
-        public void setName(String name) {
-        }
-
-        public boolean requiresLayout() {
-            return false;
-        }
-    };
-
-    public void testNoExceptionOnClosewithStartStop() throws JMSException {
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
-                "vm://localhost?broker.persistent=false");
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-        connection.stop();
-        connection.close();
-    }
-
-    public void testNoExceptionOnClose() throws JMSException {
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
-                "vm://localhost?broker.persistent=false");
-        Connection connection = connectionFactory.createConnection();
-        connection.close();
-    }
-
-    public void setUp() throws Exception {
-        gotExceptionInLog.set(Boolean.FALSE);
-        Logger.getRootLogger().addAppender(appender);
-        Logger.getLogger(TransportConnection.class.getName() + ".Transport").setLevel(Level.DEBUG);
-    }
-
-    public void tearDown() throws Exception {
-        Logger.getRootLogger().removeAppender(appender);
-        assertFalse("got unexpected ex in log on graceful close", gotExceptionInLog.get());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java
deleted file mode 100644
index 49f20f6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2910Test.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.Vector;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import javax.jms.ConnectionFactory;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsMultipleClientsTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQQueue;
-
-public class AMQ2910Test extends JmsMultipleClientsTestSupport {
-
-    final int maxConcurrency = 60;
-    final int msgCount = 200;
-    final Vector<Throwable> exceptions = new Vector<Throwable>();
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        //persistent = true;
-        BrokerService broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.addConnector("tcp://localhost:0");
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setPendingQueuePolicy(new FilePendingQueueMessageStoragePolicy());
-        defaultEntry.setCursorMemoryHighWaterMark(50);
-        defaultEntry.setMemoryLimit(500*1024);
-        defaultEntry.setProducerFlowControl(false);
-        policyMap.setDefaultEntry(defaultEntry);
-        broker.setDestinationPolicy(policyMap);
-
-        broker.getSystemUsage().getMemoryUsage().setLimit(1000 * 1024);
-
-        return broker;
-    }
-
-    public void testConcurrentSendToPendingCursor() throws Exception {
-        final ActiveMQConnectionFactory factory =
-                new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
-        factory.setCloseTimeout(30000);
-        ExecutorService executor = Executors.newCachedThreadPool();
-        for (int i=0; i<maxConcurrency; i++) {
-            final ActiveMQQueue dest = new ActiveMQQueue("Queue-" + i);
-            executor.execute(new Runnable() {
-                public void run() {
-                    try {
-                        sendMessages(factory.createConnection(), dest, msgCount);
-                    } catch (Throwable t) {
-                        exceptions.add(t);
-                    }
-                }
-            });
-        }
-
-        executor.shutdown();
-
-
-        assertTrue("send completed", executor.awaitTermination(60, TimeUnit.SECONDS));
-        assertNoExceptions();
-
-
-        executor = Executors.newCachedThreadPool();
-        for (int i=0; i<maxConcurrency; i++) {
-            final ActiveMQQueue dest = new ActiveMQQueue("Queue-" + i);
-            executor.execute(new Runnable() {
-                public void run() {
-                    try {
-                        startConsumers(factory, dest);
-                    } catch (Throwable t) {
-                        exceptions.add(t);
-                    }
-                }
-            });
-        }
-
-        executor.shutdown();
-        assertTrue("consumers completed", executor.awaitTermination(60, TimeUnit.SECONDS));
-
-        allMessagesList.setMaximumDuration(120*1000);
-        final int numExpected = maxConcurrency * msgCount;
-        allMessagesList.waitForMessagesToArrive(numExpected);
-
-        if (allMessagesList.getMessageCount() != numExpected) {
-            dumpAllThreads(getName());
-        }
-        allMessagesList.assertMessagesReceivedNoWait(numExpected);
-
-        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-
-    }
-
-    private void assertNoExceptions() {
-        if (!exceptions.isEmpty()) {
-            for (Throwable t: exceptions) {
-                t.printStackTrace();
-            }
-        }
-        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2982Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2982Test.java
deleted file mode 100644
index d5220c8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2982Test.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.concurrent.CountDownLatch;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.RedeliveryPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.SharedDeadLetterStrategy;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class AMQ2982Test {
-
-    private static final int MAX_MESSAGES = 500;
-
-    private static final String QUEUE_NAME = "test.queue";
-
-    private BrokerService broker;
-
-    private final CountDownLatch messageCountDown = new CountDownLatch(MAX_MESSAGES);
-
-    private CleanableKahaDBStore kahaDB;
-
-    private static class CleanableKahaDBStore extends KahaDBStore {
-        // make checkpoint cleanup accessible
-        public void forceCleanup() throws IOException {
-            checkpointCleanup(true);
-        }
-
-        public int getFileMapSize() throws IOException {
-            // ensure save memory publishing, use the right lock
-            indexLock.readLock().lock();
-            try {
-                return getJournal().getFileMap().size();
-            } finally {
-                indexLock.readLock().unlock();
-            }
-        }
-    }
-
-    @Before
-    public void setup() throws Exception {
-
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setPersistent(true);
-
-        kahaDB = new CleanableKahaDBStore();
-        kahaDB.setJournalMaxFileLength(256 * 1024);
-        broker.setPersistenceAdapter(kahaDB);
-
-        broker.start();
-        broker.waitUntilStarted();
-    }
-
-    private Connection registerDLQMessageListener() throws Exception {
-        ConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(session
-                .createQueue(SharedDeadLetterStrategy.DEFAULT_DEAD_LETTER_QUEUE_NAME));
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                messageCountDown.countDown();
-            }
-        });
-
-        return connection;
-    }
-
-    class ConsumerThread extends Thread {
-
-        @Override
-        public void run() {
-            try {
-                ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-
-                RedeliveryPolicy policy = new RedeliveryPolicy();
-                policy.setMaximumRedeliveries(0);
-                policy.setInitialRedeliveryDelay(100);
-                policy.setUseExponentialBackOff(false);
-
-                factory.setRedeliveryPolicy(policy);
-
-                Connection connection = factory.createConnection();
-                connection.start();
-                Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME));
-                do {
-                    Message message = consumer.receive(300);
-                    if (message != null) {
-                        session.rollback();
-                    }
-                } while (messageCountDown.getCount() != 0);
-                consumer.close();
-                session.close();
-                connection.close();
-            } catch (Exception e) {
-                Assert.fail(e.getMessage());
-            }
-        }
-    }
-
-    private void sendMessages() throws Exception {
-        ConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(session.createQueue(QUEUE_NAME));
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        for (int i = 0; i < MAX_MESSAGES; i++) {
-            BytesMessage message = session.createBytesMessage();
-            message.writeBytes(new byte[1000]);
-            producer.send(message);
-        }
-        producer.close();
-        session.close();
-        connection.close();
-    }
-
-    @Test
-    public void testNoStickyKahaDbLogFilesOnLocalTransactionRollback() throws Exception {
-
-        Connection dlqConnection = registerDLQMessageListener();
-
-        ConsumerThread thread = new ConsumerThread();
-        thread.start();
-
-        sendMessages();
-
-        thread.join(60 * 1000);
-        assertFalse(thread.isAlive());
-
-        dlqConnection.close();
-
-        kahaDB.forceCleanup();
-
-        assertEquals("only one active KahaDB log file after cleanup is expected", 1, kahaDB.getFileMapSize());
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        broker.stop();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2983Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2983Test.java
deleted file mode 100644
index f8b941a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2983Test.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class AMQ2983Test {
-
-    private static final int MAX_CONSUMER = 10;
-
-    private static final int MAX_MESSAGES = 2000;
-
-    private static final String QUEUE_NAME = "test.queue";
-
-    private BrokerService broker;
-
-    private final CountDownLatch messageCountDown = new CountDownLatch(MAX_MESSAGES);
-
-    private CleanableKahaDBStore kahaDB;
-
-    private static class CleanableKahaDBStore extends KahaDBStore {
-        // make checkpoint cleanup accessible
-        public void forceCleanup() throws IOException {
-            checkpointCleanup(true);
-        }
-
-        public int getFileMapSize() throws IOException {
-            // ensure save memory publishing, use the right lock
-            indexLock.readLock().lock();
-            try {
-                return getJournal().getFileMap().size();
-            } finally {
-                indexLock.readLock().unlock();
-            }
-        }
-    }
-
-    private class ConsumerThread extends Thread {
-
-        @Override
-        public void run() {
-            try {
-                ConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-                Connection connection = factory.createConnection();
-                connection.start();
-                Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME));
-                do {
-                    Message message = consumer.receive(200);
-                    if (message != null) {
-                        session.commit();
-                        messageCountDown.countDown();
-                    }
-                } while (messageCountDown.getCount() != 0);
-                consumer.close();
-                session.close();
-                connection.close();
-            } catch (Exception e) {
-                Assert.fail(e.getMessage());
-            }
-        }
-    }
-
-    @Before
-    public void setup() throws Exception {
-
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setPersistent(true);
-
-        kahaDB = new CleanableKahaDBStore();
-        kahaDB.setJournalMaxFileLength(256 * 1024);
-        broker.setPersistenceAdapter(kahaDB);
-
-        broker.start();
-        broker.waitUntilStarted();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    @Test
-    public void testNoStickyKahaDbLogFilesOnConcurrentTransactionalConsumer() throws Exception {
-
-        List<Thread> consumerThreads = new ArrayList<Thread>();
-        for (int i = 0; i < MAX_CONSUMER; i++) {
-            ConsumerThread thread = new ConsumerThread();
-            thread.start();
-            consumerThreads.add(thread);
-        }
-        sendMessages();
-
-        boolean allMessagesReceived = messageCountDown.await(60, TimeUnit.SECONDS);
-        assertTrue(allMessagesReceived);
-
-        for (Thread thread : consumerThreads) {
-            thread.join(TimeUnit.MILLISECONDS.convert(60, TimeUnit.SECONDS));
-            assertFalse(thread.isAlive());
-        }
-        kahaDB.forceCleanup();
-        assertEquals("Expect only one active KahaDB log file after cleanup", 1, kahaDB.getFileMapSize());
-    }
-
-    private void sendMessages() throws Exception {
-        ConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(session.createQueue(QUEUE_NAME));
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        for (int i = 0; i < MAX_MESSAGES; i++) {
-            BytesMessage message = session.createBytesMessage();
-            message.writeBytes(new byte[200]);
-            producer.send(message);
-        }
-        producer.close();
-        session.close();
-        connection.close();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3120Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3120Test.java
deleted file mode 100644
index bfff0fd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3120Test.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * 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.bugs;
-
-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.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.util.ConsumerThread;
-import org.apache.activemq.util.ProducerThread;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Test;
-
-import javax.jms.*;
-
-import java.io.File;
-
-import static org.junit.Assert.assertEquals;
-
-public class AMQ3120Test {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ3120Test.class);
-
-    BrokerService broker = null;
-    File kahaDbDir = null;
-    private final Destination destination = new ActiveMQQueue("AMQ3120Test");
-    final String payload = new String(new byte[1024]);
-
-    protected void startBroker(boolean delete) throws Exception {
-        broker = new BrokerService();
-
-        //Start with a clean directory
-        kahaDbDir = new File(broker.getBrokerDataDirectory(), "KahaDB");
-        deleteDir(kahaDbDir);
-
-        broker.setSchedulerSupport(false);
-        broker.setDeleteAllMessagesOnStartup(delete);
-        broker.setPersistent(true);
-        broker.setUseJmx(false);
-        broker.addConnector("tcp://localhost:0");
-
-        PolicyMap map = new PolicyMap();
-        PolicyEntry entry = new PolicyEntry();
-        entry.setUseCache(false);
-        map.setDefaultEntry(entry);
-        broker.setDestinationPolicy(map);
-
-        configurePersistence(broker, delete);
-
-        broker.start();
-        LOG.info("Starting broker..");
-    }
-
-    protected void configurePersistence(BrokerService brokerService, boolean deleteAllOnStart) throws Exception {
-        KahaDBPersistenceAdapter adapter = (KahaDBPersistenceAdapter) brokerService.getPersistenceAdapter();
-
-        // ensure there are a bunch of data files but multiple entries in each
-        adapter.setJournalMaxFileLength(1024 * 20);
-
-        // speed up the test case, checkpoint an cleanup early and often
-        adapter.setCheckpointInterval(500);
-        adapter.setCleanupInterval(500);
-
-        if (!deleteAllOnStart) {
-            adapter.setForceRecoverIndex(true);
-        }
-
-    }
-
-    private boolean deleteDir(File dir) {
-        if (dir.isDirectory()) {
-            String[] children = dir.list();
-            for (int i = 0; i < children.length; i++) {
-                boolean success = deleteDir(new File(dir, children[i]));
-                if (!success) {
-                    return false;
-                }
-            }
-        }
-
-        return dir.delete();
-    }
-
-    private int getFileCount(File dir){
-        if (dir.isDirectory()) {
-            String[] children = dir.list();
-            return children.length;
-        }
-
-        return 0;
-    }
-
-    @Test
-    public void testCleanupOfFiles() throws Exception {
-        final int messageCount = 500;
-        startBroker(true);
-        int fileCount = getFileCount(kahaDbDir);
-        assertEquals(4, fileCount);
-
-        Connection connection = new ActiveMQConnectionFactory(
-                broker.getTransportConnectors().get(0).getConnectUri()).createConnection();
-        connection.start();
-        Session producerSess = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Session consumerSess = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ProducerThread producer = new ProducerThread(producerSess, destination) {
-            @Override
-            protected Message createMessage(int i) throws Exception {
-                return sess.createTextMessage(payload + "::" + i);
-            }
-        };
-        producer.setSleep(650);
-        producer.setMessageCount(messageCount);
-        ConsumerThread consumer = new ConsumerThread(consumerSess, destination);
-        consumer.setBreakOnNull(false);
-        consumer.setMessageCount(messageCount);
-
-        producer.start();
-        consumer.start();
-
-        producer.join();
-        consumer.join();
-
-        assertEquals("consumer got all produced messages", producer.getMessageCount(), consumer.getReceived());
-
-        broker.stop();
-        broker.waitUntilStopped();
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3140Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3140Test.java
deleted file mode 100644
index bad29e8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3140Test.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ScheduledMessage;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.IOHelper;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class AMQ3140Test {
-
-    private static final int MESSAGES_PER_THREAD = 100;
-
-    private static final int THREAD_COUNT = 10;
-
-    private BrokerService broker;
-
-    private static final String QUEUE_NAME = "test";
-
-    private static class Sender extends Thread {
-
-        private static final int DELAY = 3000;
-
-        @Override
-        public void run() {
-            try {
-                ConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");
-                Connection connection = cf.createConnection();
-                connection.start();
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                MessageProducer producer = session.createProducer(session.createQueue(QUEUE_NAME));
-                Message message = session.createTextMessage("test");
-                for (int i = 0; i < MESSAGES_PER_THREAD; i++) {
-                    message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, DELAY);
-                    producer.send(message);
-                }
-                session.close();
-                connection.close();
-            } catch (JMSException e) {
-                fail(e.getMessage());
-            }
-        }
-    }
-
-    @Before
-    public void setup() throws Exception {
-        File schedulerDirectory = new File("target/test/ScheduledDB");
-
-        IOHelper.mkdirs(schedulerDirectory);
-        IOHelper.deleteChildren(schedulerDirectory);
-
-        broker = new BrokerService();
-        broker.setSchedulerSupport(true);
-        broker.setPersistent(false);
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setDataDirectory("target");
-        broker.setSchedulerDirectoryFile(schedulerDirectory);
-        broker.setUseJmx(false);
-        broker.addConnector("vm://localhost");
-
-        broker.start();
-        broker.waitUntilStarted();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    @Test
-    public void noMessageLostOnConcurrentScheduling() throws JMSException, InterruptedException {
-
-        final AtomicLong receiveCounter = new AtomicLong();
-
-        ConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");
-        Connection connection = cf.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME));
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                receiveCounter.incrementAndGet();
-            }
-        });
-
-        List<Sender> senderThreads = new ArrayList<Sender>();
-        for (int i = 0; i < THREAD_COUNT; i++) {
-            Sender sender = new Sender();
-            senderThreads.add(sender);
-        }
-        for (Sender sender : senderThreads) {
-            sender.start();
-        }
-        for (Sender sender : senderThreads) {
-            sender.join();
-        }
-
-        // wait until all scheduled messages has been received
-        TimeUnit.SECONDS.sleep(10);
-
-        session.close();
-        connection.close();
-
-        assertEquals(MESSAGES_PER_THREAD * THREAD_COUNT, receiveCounter.get());
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3141Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3141Test.java
deleted file mode 100644
index 460900f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3141Test.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ScheduledMessage;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.IOHelper;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class AMQ3141Test {
-
-    private static final int MAX_MESSAGES = 100;
-
-    private static final long DELAY_IN_MS = 100;
-
-    private static final String QUEUE_NAME = "target.queue";
-
-    private BrokerService broker;
-
-    private final CountDownLatch messageCountDown = new CountDownLatch(MAX_MESSAGES);
-
-    private ConnectionFactory factory;
-
-    @Before
-    public void setup() throws Exception {
-
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setSchedulerSupport(true);
-        broker.setDataDirectory("target");
-        broker.setUseJmx(false);
-        broker.addConnector("vm://localhost");
-
-        File schedulerDirectory = new File("target/test/ScheduledDB");
-        IOHelper.mkdirs(schedulerDirectory);
-        IOHelper.deleteChildren(schedulerDirectory);
-        broker.setSchedulerDirectoryFile(schedulerDirectory);
-
-        broker.start();
-        broker.waitUntilStarted();
-
-        factory = new ActiveMQConnectionFactory("vm://localhost");
-    }
-
-    private void sendMessages() throws Exception {
-        Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(session.createQueue(QUEUE_NAME));
-        for (int i = 0; i < MAX_MESSAGES; i++) {
-            Message message = session.createTextMessage();
-            message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, DELAY_IN_MS);
-            producer.send(message);
-        }
-        connection.close();
-    }
-
-    @Test
-    public void testNoMissingMessagesOnShortScheduleDelay() throws Exception {
-
-        Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME));
-
-        consumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                messageCountDown.countDown();
-            }
-        });
-        sendMessages();
-
-        boolean receiveComplete = messageCountDown.await(5, TimeUnit.SECONDS);
-
-        connection.close();
-
-        assertTrue("expect all messages received but " + messageCountDown.getCount() + " are missing", receiveComplete);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        broker.stop();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3145Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3145Test.java
deleted file mode 100644
index c7e0671..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3145Test.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-public class AMQ3145Test {
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ3145Test.class);
-    private final String MESSAGE_TEXT = new String(new byte[1024]);
-    BrokerService broker;
-    ConnectionFactory factory;
-    Connection connection;
-    Session session;
-    Queue queue;
-    MessageConsumer consumer;
-
-    @Before
-    public void createBroker() throws Exception {
-        createBroker(true);
-    }
-
-    public void createBroker(boolean deleteAll) throws Exception {
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(deleteAll);
-        broker.setDataDirectory("target/AMQ3145Test");
-        broker.setUseJmx(true);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.addConnector("tcp://localhost:0");
-        broker.start();
-        broker.waitUntilStarted();
-        factory = new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri().toString());
-        connection = factory.createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        if (consumer != null) {
-            consumer.close();
-        }
-        session.close();
-        connection.stop();
-        connection.close();
-        broker.stop();
-    }
-
-    @Test
-    public void testCacheDisableReEnable() throws Exception {
-        createProducerAndSendMessages(1);
-        QueueViewMBean proxy = getProxyToQueueViewMBean();
-        assertTrue("cache is enabled", proxy.isCacheEnabled());
-        tearDown();
-        createBroker(false);
-        proxy = getProxyToQueueViewMBean();
-        assertEquals("one pending message", 1, proxy.getQueueSize());
-        assertTrue("cache is disabled when there is a pending message", !proxy.isCacheEnabled());
-
-        createConsumer(1);
-        createProducerAndSendMessages(1);
-        assertTrue("cache is enabled again on next send when there are no messages", proxy.isCacheEnabled());
-    }
-
-    private void applyBrokerSpoolingPolicy() {
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setProducerFlowControl(false);
-        PendingQueueMessageStoragePolicy pendingQueuePolicy = new FilePendingQueueMessageStoragePolicy();
-        defaultEntry.setPendingQueuePolicy(pendingQueuePolicy);
-        policyMap.setDefaultEntry(defaultEntry);
-        broker.setDestinationPolicy(policyMap);
-    }
-
-    private QueueViewMBean getProxyToQueueViewMBean()
-            throws MalformedObjectNameException, JMSException {
-        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq"
-                + ":Type=Queue,Destination=" + queue.getQueueName()
-                + ",BrokerName=localhost");
-        QueueViewMBean proxy = (QueueViewMBean) broker.getManagementContext()
-                .newProxyInstance(queueViewMBeanName,
-                        QueueViewMBean.class, true);
-        return proxy;
-    }
-
-    private void createProducerAndSendMessages(int numToSend) throws Exception {
-        queue = session.createQueue("test1");
-        MessageProducer producer = session.createProducer(queue);
-        for (int i = 0; i < numToSend; i++) {
-            TextMessage message = session.createTextMessage(MESSAGE_TEXT + i);
-            if (i  != 0 && i % 50000 == 0) {
-                LOG.info("sent: " + i);
-            }
-            producer.send(message);
-        }
-        producer.close();
-    }
-
-    private void createConsumer(int numToConsume) throws Exception {
-        consumer = session.createConsumer(queue);
-        // wait for buffer fill out
-        for (int i = 0; i < numToConsume; ++i) {
-            Message message = consumer.receive(2000);
-            message.acknowledge();
-        }
-        consumer.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3167Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3167Test.java
deleted file mode 100644
index adf282b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3167Test.java
+++ /dev/null
@@ -1,509 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.ArrayList;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-/**
- * Test the loss of messages detected during testing with ActiveMQ 5.4.1 and 5.4.2.
- * <p/>
- * Symptoms:
- * - 1 record is lost "early" in the stream.
- * - no more records lost.
- * <p/>
- * Test Configuration:
- * - Broker Settings:
- * - Destination Policy
- * - Occurs with "Destination Policy" using Store Cursor and a memory limit
- * - Not reproduced without "Destination Policy" defined
- * - Persistence Adapter
- * - Memory: Does not occur.
- * - KahaDB: Occurs.
- * - Messages
- * - Occurs with TextMessage and BinaryMessage
- * - Persistent messages.
- * <p/>
- * Notes:
- * - Lower memory limits increase the rate of occurrence.
- * - Higher memory limits may prevent the problem (probably because memory limits not reached).
- * - Producers sending a number of messages before consumers come online increases rate of occurrence.
- */
-
-public class AMQ3167Test {
-    protected BrokerService embeddedBroker;
-
-    protected static final int MEMORY_LIMIT = 16 * 1024;
-
-    protected static boolean Debug_f = false;
-
-    protected long Producer_stop_time = 0;
-    protected long Consumer_stop_time = 0;
-    protected long Consumer_startup_delay_ms = 2000;
-    protected boolean Stop_after_error = true;
-
-    protected Connection JMS_conn;
-    protected long Num_error = 0;
-
-
-    ////             ////
-    ////  UTILITIES  ////
-    ////             ////
-
-
-    /**
-     * Create a new, unsecured, client connection to the test broker using the given username and password.  This
-     * connection bypasses all security.
-     * <p/>
-     * Don't forget to start the connection or no messages will be received by consumers even though producers
-     * will work fine.
-     *
-     * @username name of the JMS user for the connection; may be null.
-     * @password Password for the JMS user; may be null.
-     */
-
-    protected Connection createUnsecuredConnection(String username, String password)
-            throws javax.jms.JMSException {
-        ActiveMQConnectionFactory conn_fact;
-
-        conn_fact = new ActiveMQConnectionFactory(embeddedBroker.getVmConnectorURI());
-
-        return conn_fact.createConnection(username, password);
-    }
-
-
-    ////                      ////
-    ////  TEST FUNCTIONALITY  ////
-    ////                      ////
-
-
-    @Before
-    public void testPrep()
-            throws Exception {
-        embeddedBroker = new BrokerService();
-        configureBroker(embeddedBroker);
-        embeddedBroker.start();
-        embeddedBroker.waitUntilStarted();
-
-        // Prepare the connection
-        JMS_conn = createUnsecuredConnection(null, null);
-        JMS_conn.start();
-    }
-
-    @After
-    public void testCleanup()
-            throws java.lang.Exception {
-        JMS_conn.stop();
-        embeddedBroker.stop();
-    }
-
-
-    protected void configureBroker(BrokerService broker_svc)
-            throws Exception {
-        TransportConnector conn;
-
-        broker_svc.setBrokerName("testbroker1");
-
-        broker_svc.setUseJmx(false);
-        broker_svc.setPersistent(true);
-        broker_svc.setDataDirectory("target/AMQ3167Test");
-        configureDestinationPolicy(broker_svc);
-    }
-
-
-    /**
-     * NOTE: overrides any prior policy map defined for the broker service.
-     */
-
-    protected void configureDestinationPolicy(BrokerService broker_svc) {
-        PolicyMap pol_map;
-        PolicyEntry pol_ent;
-        ArrayList<PolicyEntry> ent_list;
-
-        ent_list = new ArrayList<PolicyEntry>();
-
-        //
-        // QUEUES
-        //
-
-        pol_ent = new PolicyEntry();
-        pol_ent.setQueue(">");
-        pol_ent.setMemoryLimit(MEMORY_LIMIT);
-        pol_ent.setProducerFlowControl(false);
-        ent_list.add(pol_ent);
-
-
-        //
-        // COMPLETE POLICY MAP
-        //
-
-        pol_map = new PolicyMap();
-        pol_map.setPolicyEntries(ent_list);
-
-        broker_svc.setDestinationPolicy(pol_map);
-    }
-
-
-    ////        ////
-    ////  TEST  ////
-    ////        ////
-
-    @Test
-    public void testQueueLostMessage()
-            throws Exception {
-        Destination dest;
-
-        dest = ActiveMQDestination.createDestination("lostmsgtest.queue", ActiveMQDestination.QUEUE_TYPE);
-
-        // 10 seconds from now
-        Producer_stop_time = java.lang.System.nanoTime() + (10L * 1000000000L);
-
-        // 15 seconds from now
-        Consumer_stop_time = Producer_stop_time + (5L * 1000000000L);
-
-        runLostMsgTest(dest, 1000000, 1, 1, false);
-
-        // Make sure failures in the threads are thoroughly reported in the JUnit framework.
-        assertTrue(Num_error == 0);
-    }
-
-
-    /**
-     *
-     */
-
-    protected static void log(String msg) {
-        if (Debug_f)
-            java.lang.System.err.println(msg);
-    }
-
-
-    /**
-     * Main body of the lost-message test.
-     */
-
-    protected void runLostMsgTest(Destination dest, int num_msg, int num_send_per_sess, int num_recv_per_sess,
-                                  boolean topic_f)
-            throws Exception {
-        Thread prod_thread;
-        Thread cons_thread;
-        String tag;
-        Session sess;
-        MessageProducer prod;
-        MessageConsumer cons;
-        int ack_mode;
-
-
-        //
-        // Start the producer
-        //
-
-        tag = "prod";
-        log(">> Starting producer " + tag);
-
-        sess = JMS_conn.createSession((num_send_per_sess > 1), Session.AUTO_ACKNOWLEDGE);
-        prod = sess.createProducer(dest);
-
-        prod_thread = new producerThread(sess, prod, tag, num_msg, num_send_per_sess);
-        prod_thread.start();
-        log("Started producer " + tag);
-
-
-        //
-        // Delay before starting consumers
-        //
-
-        log("Waiting before starting consumers");
-        java.lang.Thread.sleep(Consumer_startup_delay_ms);
-
-
-        //
-        // Now create and start the consumer
-        //
-
-        tag = "cons";
-        log(">> Starting consumer");
-
-        if (num_recv_per_sess > 1)
-            ack_mode = Session.CLIENT_ACKNOWLEDGE;
-        else
-            ack_mode = Session.AUTO_ACKNOWLEDGE;
-
-        sess = JMS_conn.createSession(false, ack_mode);
-        cons = sess.createConsumer(dest);
-
-        cons_thread = new consumerThread(sess, cons, tag, num_msg, num_recv_per_sess);
-        cons_thread.start();
-        log("Started consumer " + tag);
-
-
-        //
-        // Wait for the producer and consumer to finish.
-        //
-
-        log("< waiting for producer.");
-        prod_thread.join();
-
-        log("< waiting for consumer.");
-        cons_thread.join();
-
-        log("Shutting down");
-    }
-
-
-    ////                    ////
-    ////  INTERNAL CLASSES  ////
-    ////                    ////
-
-    /**
-     * Producer thread - runs a single producer until the maximum number of messages is sent, the producer stop
-     * time is reached, or a test error is detected.
-     */
-
-    protected class producerThread extends Thread {
-        protected Session msgSess;
-        protected MessageProducer msgProd;
-        protected String producerTag;
-        protected int numMsg;
-        protected int numPerSess;
-        protected long producer_stop_time;
-
-        producerThread(Session sess, MessageProducer prod, String tag, int num_msg, int sess_size) {
-            super();
-
-            producer_stop_time = 0;
-            msgSess = sess;
-            msgProd = prod;
-            producerTag = tag;
-            numMsg = num_msg;
-            numPerSess = sess_size;
-        }
-
-        public void execTest()
-                throws Exception {
-            Message msg;
-            int sess_start;
-            int cur;
-
-            sess_start = 0;
-            cur = 0;
-            while ((cur < numMsg) && (!didTimeOut()) &&
-                    ((!Stop_after_error) || (Num_error == 0))) {
-                msg = msgSess.createTextMessage("test message from " + producerTag);
-                msg.setStringProperty("testprodtag", producerTag);
-                msg.setIntProperty("seq", cur);
-
-                if (msg instanceof ActiveMQMessage) {
-                    ((ActiveMQMessage) msg).setResponseRequired(true);
-                }
-
-
-                //
-                // Send the message.
-                //
-
-                msgProd.send(msg);
-                cur++;
-
-
-                //
-                // Commit if the number of messages per session has been reached, and
-                //  transactions are being used (only when > 1 msg per sess).
-                //
-
-                if ((numPerSess > 1) && ((cur - sess_start) >= numPerSess)) {
-                    msgSess.commit();
-                    sess_start = cur;
-                }
-            }
-
-            // Make sure to send the final commit, if there were sends since the last commit.
-            if ((numPerSess > 1) && ((cur - sess_start) > 0))
-                msgSess.commit();
-
-            if (cur < numMsg)
-                log("* Producer " + producerTag + " timed out at " + java.lang.System.nanoTime() +
-                        " (stop time " + producer_stop_time + ")");
-        }
-
-
-        /**
-         * Check whether it is time for the producer to terminate.
-         */
-
-        protected boolean didTimeOut() {
-            if ((Producer_stop_time > 0) && (java.lang.System.nanoTime() >= Producer_stop_time))
-                return true;
-
-            return false;
-        }
-
-        /**
-         * Run the producer.
-         */
-
-        @Override
-        public void run() {
-            try {
-                log("- running producer " + producerTag);
-                execTest();
-                log("- finished running producer " + producerTag);
-            } catch (Throwable thrown) {
-                Num_error++;
-                fail("producer " + producerTag + " failed: " + thrown.getMessage());
-                throw new Error("producer " + producerTag + " failed", thrown);
-            }
-        }
-
-        @Override
-        public String toString() {
-            return producerTag;
-        }
-    }
-
-
-    /**
-     * Producer thread - runs a single consumer until the maximum number of messages is received, the consumer stop
-     * time is reached, or a test error is detected.
-     */
-
-    protected class consumerThread extends Thread {
-        protected Session msgSess;
-        protected MessageConsumer msgCons;
-        protected String consumerTag;
-        protected int numMsg;
-        protected int numPerSess;
-
-        consumerThread(Session sess, MessageConsumer cons, String tag, int num_msg, int sess_size) {
-            super();
-
-            msgSess = sess;
-            msgCons = cons;
-            consumerTag = tag;
-            numMsg = num_msg;
-            numPerSess = sess_size;
-        }
-
-        public void execTest()
-                throws Exception {
-            Message msg;
-            int sess_start;
-            int cur;
-
-            msg = null;
-            sess_start = 0;
-            cur = 0;
-
-            while ((cur < numMsg) && (!didTimeOut()) &&
-                    ((!Stop_after_error) || (Num_error == 0))) {
-                //
-                // Use a timeout of 1 second to periodically check the consumer timeout.
-                //
-                msg = msgCons.receive(1000);
-                if (msg != null) {
-                    checkMessage(msg, cur);
-                    cur++;
-
-                    if ((numPerSess > 1) && ((cur - sess_start) >= numPerSess)) {
-                        msg.acknowledge();
-                        sess_start = cur;
-                    }
-                }
-            }
-
-            // Acknowledge the last messages, if they were not yet acknowledged.
-            if ((numPerSess > 1) && ((cur - sess_start) > 0))
-                msg.acknowledge();
-
-            if (cur < numMsg)
-                log("* Consumer " + consumerTag + " timed out");
-        }
-
-
-        /**
-         * Check whether it is time for the consumer to terminate.
-         */
-
-        protected boolean didTimeOut() {
-            if ((Consumer_stop_time > 0) && (java.lang.System.nanoTime() >= Consumer_stop_time))
-                return true;
-
-            return false;
-        }
-
-
-        /**
-         * Verify the message received.  Sequence numbers are checked and are expected to exactly match the
-         * message number (starting at 0).
-         */
-
-        protected void checkMessage(Message msg, int exp_seq)
-                throws javax.jms.JMSException {
-            int seq;
-
-            seq = msg.getIntProperty("seq");
-
-            if (exp_seq != seq) {
-                Num_error++;
-                fail("*** Consumer " + consumerTag + " expected seq " + exp_seq + "; received " + seq);
-            }
-        }
-
-
-        /**
-         * Run the consumer.
-         */
-
-        @Override
-        public void run() {
-            try {
-                log("- running consumer " + consumerTag);
-                execTest();
-                log("- running consumer " + consumerTag);
-            } catch (Throwable thrown) {
-                Num_error++;
-                fail("consumer " + consumerTag + " failed: " + thrown.getMessage());
-                throw new Error("consumer " + consumerTag + " failed", thrown);
-            }
-        }
-
-        @Override
-        public String toString() {
-            return consumerTag;
-        }
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java
deleted file mode 100644
index e7ee4d9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.bugs;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConnectionPerMessageTest extends EmbeddedBrokerTestSupport {
-
-	private static final Logger LOG = LoggerFactory.getLogger(ConnectionPerMessageTest.class);
-	private static final int COUNT = 20000;
-	protected String bindAddress;
-
-	public void testConnectionPerMessage() throws Exception {
-		final String topicName = "test.topic";
-
-		LOG.info("Initializing pooled connection factory for JMS to URL: "
-				+ bindAddress);
-		final ActiveMQConnectionFactory normalFactory = new ActiveMQConnectionFactory();
-		normalFactory.setBrokerURL(bindAddress);
-		for (int i = 0; i < COUNT; i++) {
-
-			if (i % 1000 == 0) {
-				LOG.info(new Integer(i).toString());
-			}
-
-			Connection conn = null;
-			try {
-
-				conn = normalFactory.createConnection();
-				final Session session = conn.createSession(false,
-						Session.AUTO_ACKNOWLEDGE);
-				final Topic topic = session.createTopic(topicName);
-				final MessageProducer producer = session.createProducer(topic);
-				producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-				final MapMessage m = session.createMapMessage();
-				m.setInt("hey", i);
-
-				producer.send(m);
-
-			} catch (JMSException e) {
-				LOG.warn(e.getMessage(), e);
-			} finally {
-				if (conn != null)
-					try {
-						conn.close();
-					} catch (JMSException e) {
-						LOG.warn(e.getMessage(), e);
-					}
-			}
-		}
-	}
-
-	protected void setUp() throws Exception {
-		bindAddress = "vm://localhost";
-		super.setUp();
-	}
-
-	protected BrokerService createBroker() throws Exception {
-		BrokerService answer = new BrokerService();
-		answer.setUseJmx(false);
-		answer.setPersistent(isPersistent());
-		answer.addConnector(bindAddress);
-		return answer;
-	}
-
-	protected boolean isPersistent() {
-		return true;
-	}
-
-	protected void tearDown() throws Exception {
-		super.tearDown();
-	}
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java
deleted file mode 100644
index 855f286..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * 
- */
-public class CraigsBugTest extends EmbeddedBrokerTestSupport {
-
-    public void testConnectionFactory() throws Exception {
-        final ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        final ActiveMQQueue queue = new ActiveMQQueue("testqueue");
-        final Connection conn = cf.createConnection();
-
-        Runnable r = new Runnable() {
-            public void run() {
-                try {
-                    Session session = conn.createSession(false, 1);
-                    MessageConsumer consumer = session.createConsumer(queue, null);
-                    consumer.receive(1000);
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-            }
-        };
-        new Thread(r).start();
-        conn.start();
-
-        try {
-            synchronized (this) {
-                wait(3000);
-            }
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:61616";
-        super.setUp();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
deleted file mode 100644
index 273dd7b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.concurrent.CountDownLatch;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.kaha.impl.async.AsyncDataManager;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/*
- * see https://issues.apache.org/activemq/browse/AMQ-1926
- */
-public class DataFileNotDeletedTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DataFileNotDeletedTest.class);
-
-    private final CountDownLatch latch = new CountDownLatch(max_messages);
-    private static int max_messages = 600;
-    private static int messageCounter;
-    private final String destinationName = getName()+"_Queue";
-    private BrokerService broker;
-    private Connection receiverConnection;
-    private Connection producerConnection;
-    final boolean useTopic = false;
-    
-    AMQPersistenceAdapter persistentAdapter;
-    protected static final String payload = new String(new byte[512]);
-
-    @Override
-    public void setUp() throws Exception {
-        messageCounter = 0;
-        startBroker();
-        receiverConnection = createConnection();
-        receiverConnection.start();
-        producerConnection = createConnection();
-        producerConnection.start();
-    }
-    
-    @Override
-    public void tearDown() throws Exception {
-        receiverConnection.close();
-        producerConnection.close();
-        broker.stop();
-    }
-
-    public void testForDataFileNotDeleted() throws Exception {
-        doTestForDataFileNotDeleted(false);
-    }
-    
-    public void testForDataFileNotDeletedTransacted() throws Exception {
-        doTestForDataFileNotDeleted(true);
-    }
-    
-    private void doTestForDataFileNotDeleted(boolean transacted) throws Exception {
-        
-        Receiver receiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                messageCounter++; 
-                latch.countDown();
-            }
-        };
-        buildReceiver(receiverConnection, destinationName, transacted, receiver, useTopic);
-
-        final MessageSender producer = new MessageSender(destinationName, producerConnection, transacted, useTopic);
-        for (int i=0; i< max_messages; i++) {
-            producer.send(payload );
-        }
-        latch.await();
-        assertEquals(max_messages, messageCounter);
-        LOG.info("Sent and received + " + messageCounter + ", file count " + persistentAdapter.getAsyncDataManager().getFiles().size());
-        waitFordataFilesToBeCleanedUp(persistentAdapter.getAsyncDataManager(), 60000, 2); 
-    }
-
-    private void waitFordataFilesToBeCleanedUp(
-            AsyncDataManager asyncDataManager, int timeout, int numExpected) throws InterruptedException {
-        long expiry = System.currentTimeMillis()  + timeout;
-        while(expiry > System.currentTimeMillis()) {
-            if (asyncDataManager.getFiles().size() > numExpected) {
-                Thread.sleep(1000);
-            } else {
-                break;
-            }
-        }
-        assertEquals("persistence adapter dataManager has correct number of files", numExpected, asyncDataManager.getFiles().size());
-    }
-
-    private Connection createConnection() throws JMSException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        return factory.createConnection();
-    }
-
-    private void startBroker() throws Exception {
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-        broker.addConnector("tcp://localhost:61616").setName("Default");
-        broker.setPersistenceFactory(new AMQPersistenceAdapterFactory());
-        AMQPersistenceAdapterFactory factory = (AMQPersistenceAdapterFactory) broker.getPersistenceFactory();
-        // ensure there are a bunch of data files but multiple entries in each
-        factory.setMaxFileLength(1024 * 20);
-        // speed up the test case, checkpoint an cleanup early and often
-        factory.setCheckpointInterval(500);
-        factory.setCleanupInterval(500);
-        factory.setSyncOnWrite(false);
-        
-        persistentAdapter = (AMQPersistenceAdapter) broker.getPersistenceAdapter();
-        broker.start();
-        LOG.info("Starting broker..");
-    }
-
-    private void buildReceiver(Connection connection, final String queueName, boolean transacted, final Receiver receiver, boolean isTopic) throws Exception {
-        final Session session = transacted ? connection.createSession(true, Session.SESSION_TRANSACTED) : connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer inputMessageConsumer = session.createConsumer(isTopic ? session.createTopic(queueName) : session.createQueue(queueName));
-        MessageListener messageListener = new MessageListener() {
-
-            public void onMessage(Message message) {
-                try {
-                    ObjectMessage objectMessage = (ObjectMessage)message;
-                    String s = (String)objectMessage.getObject();
-                    receiver.receive(s);
-                    if (session.getTransacted()) {
-                        session.commit();
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        };
-        inputMessageConsumer.setMessageListener(messageListener);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java
deleted file mode 100644
index bb66943..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.concurrent.TimeoutException;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.junit.Assert;
-
-public class DoubleExpireTest extends EmbeddedBrokerTestSupport {
-
-	private static final long MESSAGE_TTL_MILLIS = 1000;
-	private static final long MAX_TEST_TIME_MILLIS = 60000;
-
-	public void setUp() throws Exception {
-		setAutoFail(true);
-		setMaxTestTime(MAX_TEST_TIME_MILLIS);
-		super.setUp();
-	}
-
-	/**
-	 * This test verifies that a message that expires can be be resent to queue
-	 * with a new expiration and that it will be processed as a new message and
-	 * allowed to re-expire.
-	 * <p>
-	 * <b>NOTE:</b> This test fails on AMQ 5.4.2 because the originalExpiration
-	 * timestamp is not cleared when the message is resent.
-	 */
-	public void testDoubleExpireWithoutMove() throws Exception {
-		// Create the default dead letter queue.
-		final ActiveMQDestination DLQ = createDestination("ActiveMQ.DLQ");
-
-		Connection conn = createConnection();
-		try {
-			conn.start();
-			Session session = conn.createSession(false,
-					Session.AUTO_ACKNOWLEDGE);
-
-			// Verify that the test queue and DLQ are empty.
-			Assert.assertEquals(0, getSize(destination));
-			Assert.assertEquals(0, getSize(DLQ));
-
-			// Enqueue a message to the test queue that will expire after 1s.
-			MessageProducer producer = session.createProducer(destination);
-			Message testMessage = session.createTextMessage("test message");
-			producer.send(testMessage, Message.DEFAULT_DELIVERY_MODE,
-					Message.DEFAULT_PRIORITY, MESSAGE_TTL_MILLIS);
-			Assert.assertEquals(1, getSize(destination));
-
-			// Wait for the message to expire.
-			waitForSize(destination, 0, MAX_TEST_TIME_MILLIS);
-			Assert.assertEquals(1, getSize(DLQ));
-
-			// Consume the message from the DLQ and re-enqueue it to the test
-			// queue so that it expires after 1s.
-			MessageConsumer consumer = session.createConsumer(DLQ);
-			Message expiredMessage = consumer.receive();
-			Assert.assertEquals(testMessage.getJMSMessageID(), expiredMessage
-					.getJMSMessageID());
-
-			producer.send(expiredMessage, Message.DEFAULT_DELIVERY_MODE,
-					Message.DEFAULT_PRIORITY, MESSAGE_TTL_MILLIS);
-			Assert.assertEquals(1, getSize(destination));
-			Assert.assertEquals(0, getSize(DLQ));
-
-			// Verify that the resent message is "different" in that it has
-			// another ID.
-			Assert.assertNotSame(testMessage.getJMSMessageID(), expiredMessage
-					.getJMSMessageID());
-
-			// Wait for the message to re-expire.
-			waitForSize(destination, 0, MAX_TEST_TIME_MILLIS);
-			Assert.assertEquals(1, getSize(DLQ));
-
-			// Re-consume the message from the DLQ.
-			Message reexpiredMessage = consumer.receive();
-			Assert.assertEquals(expiredMessage.getJMSMessageID(), reexpiredMessage
-					.getJMSMessageID());
-		} finally {
-			conn.close();
-		}
-	}
-
-	/**
-	 * A helper method that returns the embedded broker's implementation of a
-	 * JMS queue.
-	 */
-	private Queue getPhysicalDestination(ActiveMQDestination destination)
-			throws Exception {
-		return (Queue) broker.getAdminView().getBroker().getDestinationMap()
-				.get(destination);
-	}
-
-	/**
-	 * A helper method that returns the size of the specified queue/topic.
-	 */
-	private long getSize(ActiveMQDestination destination) throws Exception {
-		return getPhysicalDestination(destination) != null ? getPhysicalDestination(
-				destination).getDestinationStatistics().getMessages()
-				.getCount()
-				: 0;
-	}
-
-	/**
-	 * A helper method that waits for a destination to reach a certain size.
-	 */
-	private void waitForSize(ActiveMQDestination destination, int size,
-			long timeoutMillis) throws Exception, TimeoutException {
-		long startTimeMillis = System.currentTimeMillis();
-
-		while (getSize(destination) != size
-				&& System.currentTimeMillis() < (startTimeMillis + timeoutMillis)) {
-			Thread.sleep(250);
-		}
-
-		if (getSize(destination) != size) {
-			throw new TimeoutException("Destination "
-					+ destination.getPhysicalName() + " did not reach size "
-					+ size + " within " + timeoutMillis + "ms.");
-		}
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java
deleted file mode 100755
index d273dff..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java
+++ /dev/null
@@ -1,455 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import javax.management.ObjectName;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerView;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.util.IOHelper;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *  A Test case for AMQ-1479
- */
-public class DurableConsumerTest extends CombinationTestSupport{
-    private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerTest.class);
-    private static int COUNT = 1024 * 10;
-    private static String CONSUMER_NAME = "DURABLE_TEST";
-    protected BrokerService broker;
-    
-    protected String bindAddress = "tcp://localhost:61616";
-    
-    protected byte[] payload = new byte[1024 * 32];
-    protected ConnectionFactory factory;
-    protected Vector<Exception> exceptions = new Vector<Exception>();
-    
-    private static final String TOPIC_NAME = "failoverTopic";
-    private static final String CONNECTION_URL = "failover:(tcp://localhost:61616,tcp://localhost:61617)";
-    public boolean useDedicatedTaskRunner = false;
-    
-    private class SimpleTopicSubscriber implements MessageListener,ExceptionListener{
-        
-        private TopicConnection topicConnection = null;
-        
-        public SimpleTopicSubscriber(String connectionURL,String clientId,String topicName) {
-            
-            ActiveMQConnectionFactory topicConnectionFactory = null;
-            TopicSession topicSession = null;
-            Topic topic = null;
-            TopicSubscriber topicSubscriber = null;
-            
-            topicConnectionFactory = new ActiveMQConnectionFactory(connectionURL);
-            try {
-                
-                topic = new ActiveMQTopic(topicName);
-                topicConnection = topicConnectionFactory.createTopicConnection();
-                topicConnection.setClientID((clientId));
-                topicConnection.start();
-                
-                topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-                topicSubscriber = topicSession.createDurableSubscriber(topic, (clientId));
-                topicSubscriber.setMessageListener(this);
-                
-            } catch (JMSException e) {
-                e.printStackTrace();
-            }
-        }
-        
-        public void onMessage(Message arg0){
-        }
-        
-        public void closeConnection(){
-            if (topicConnection != null) {
-                try {
-                    topicConnection.close();
-                } catch (JMSException e) {
-                }
-            }
-        }
-        
-        public void onException(JMSException exception){
-            exceptions.add(exception);
-        }
-    }
-    
-    private class MessagePublisher implements Runnable{
-        private final boolean shouldPublish = true;
-        
-        public void run(){
-            TopicConnectionFactory topicConnectionFactory = null;
-            TopicConnection topicConnection = null;
-            TopicSession topicSession = null;
-            Topic topic = null;
-            TopicPublisher topicPublisher = null;
-            Message message = null;
-            
-            topicConnectionFactory = new ActiveMQConnectionFactory(CONNECTION_URL);
-            try {
-                topic = new ActiveMQTopic(TOPIC_NAME);
-                topicConnection = topicConnectionFactory.createTopicConnection();
-                topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-                topicPublisher = topicSession.createPublisher(topic);
-                message = topicSession.createMessage();
-            } catch (Exception ex) {
-                exceptions.add(ex);
-            }
-            while (shouldPublish) {
-                try {
-                    topicPublisher.publish(message, DeliveryMode.PERSISTENT, 1, 2 * 60 * 60 * 1000);
-                } catch (JMSException ex) {
-                    exceptions.add(ex);
-                }
-                try {
-                    Thread.sleep(1);
-                } catch (Exception ex) {
-                }
-            }
-        }
-    }
-    
-    private void configurePersistence(BrokerService broker) throws Exception{
-        File dataDirFile = new File("target/" + getName());
-        KahaDBPersistenceAdapter kahaDBAdapter = new KahaDBPersistenceAdapter();
-        kahaDBAdapter.setDirectory(dataDirFile);
-        broker.setPersistenceAdapter(kahaDBAdapter);
-    }
-    
-    public void testFailover() throws Exception{
-        
-        configurePersistence(broker);
-        broker.start();
-        
-        Thread publisherThread = new Thread(new MessagePublisher());
-        publisherThread.start();
-        final List<SimpleTopicSubscriber> list = new ArrayList<SimpleTopicSubscriber>();
-        for (int i = 0; i < 100; i++) {
-            
-            final int id = i;
-            Thread thread = new Thread(new Runnable(){
-                public void run(){
-                    SimpleTopicSubscriber s =new SimpleTopicSubscriber(CONNECTION_URL, System.currentTimeMillis() + "-" + id, TOPIC_NAME);
-                    list.add(s);
-                }
-            });
-            thread.start();
-            
-        }
-        
-        Thread.sleep(5000);
-        broker.stop();
-        broker = createBroker(false);
-        configurePersistence(broker);
-        broker.start();
-        Thread.sleep(10000);
-        for (SimpleTopicSubscriber s:list) {
-            s.closeConnection();
-        }
-        assertEquals(0, exceptions.size());
-    }
-    
-    // makes heavy use of threads and can demonstrate https://issues.apache.org/activemq/browse/AMQ-2028
-    // with use dedicatedTaskRunner=true and produce OOM
-    public void initCombosForTestConcurrentDurableConsumer(){
-        addCombinationValues("useDedicatedTaskRunner", new Object[] { Boolean.TRUE, Boolean.FALSE });
-    }
-    
-    public void testConcurrentDurableConsumer() throws Exception{
-        
-        broker.start();
-        
-        factory = createConnectionFactory();
-        final String topicName = getName();
-        final int numMessages = 500;
-        int numConsumers = 1;
-        final CountDownLatch counsumerStarted = new CountDownLatch(numConsumers);
-        final AtomicInteger receivedCount = new AtomicInteger();
-        Runnable consumer = new Runnable(){
-            public void run(){
-                final String consumerName = Thread.currentThread().getName();
-                int acked = 0;
-                int received = 0;
-                
-                try {
-                    while (acked < numMessages / 2) {
-                        // take one message and close, ack on occasion
-                        Connection consumerConnection = factory.createConnection();
-                        ((ActiveMQConnection) consumerConnection).setWatchTopicAdvisories(false);
-                        consumerConnection.setClientID(consumerName);
-                        Session consumerSession = consumerConnection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-                        Topic topic = consumerSession.createTopic(topicName);
-                        consumerConnection.start();
-                        
-                        MessageConsumer consumer = consumerSession.createDurableSubscriber(topic, consumerName);
-                        
-                        counsumerStarted.countDown();
-                        Message msg = null;
-                        do {
-                            msg = consumer.receive(5000);
-                            if (msg != null) {
-                                receivedCount.incrementAndGet();
-                                if (received != 0 && received % 100 == 0) {
-                                    LOG.info("Received msg: " + msg.getJMSMessageID());
-                                }
-                                if (++received % 2 == 0) {
-                                    msg.acknowledge();
-                                    acked++;
-                                }
-                            }
-                        } while (msg == null);
-                        
-                        consumerConnection.close();
-                    }
-                    assertTrue(received >= acked);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    exceptions.add(e);
-                }
-            }
-        };
-        
-        ExecutorService executor = Executors.newFixedThreadPool(numConsumers);
-        
-        for (int i = 0; i < numConsumers; i++) {
-            executor.execute(consumer);
-        }
-        
-        assertTrue(counsumerStarted.await(30, TimeUnit.SECONDS));
-        
-        Connection producerConnection = factory.createConnection();
-        ((ActiveMQConnection) producerConnection).setWatchTopicAdvisories(false);
-        Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = producerSession.createTopic(topicName);
-        MessageProducer producer = producerSession.createProducer(topic);
-        producerConnection.start();
-        for (int i = 0; i < numMessages; i++) {
-            BytesMessage msg = producerSession.createBytesMessage();
-            msg.writeBytes(payload);
-            producer.send(msg);
-            if (i != 0 && i % 100 == 0) {
-                LOG.info("Sent msg " + i);
-            }
-        }
-        
-        executor.shutdown();
-        executor.awaitTermination(30, TimeUnit.SECONDS);
-        
-        Wait.waitFor(new Wait.Condition(){
-            public boolean isSatisified() throws Exception{
-                LOG.info("receivedCount: " + receivedCount.get());
-                return receivedCount.get() == numMessages;
-            }
-        }, 360 * 1000);
-        assertEquals("got required some messages", numMessages, receivedCount.get());
-        assertTrue("no exceptions, but: " + exceptions, exceptions.isEmpty());
-    }
-    
-    public void testConsumerRecover() throws Exception{
-        doTestConsumer(true);
-    }
-    
-    public void testConsumer() throws Exception{
-        doTestConsumer(false);
-    }
-
-    public void testPrefetchViaBrokerConfig() throws Exception {
-
-        Integer prefetchVal = new Integer(150);
-        PolicyEntry policyEntry = new PolicyEntry();
-        policyEntry.setDurableTopicPrefetch(prefetchVal.intValue());
-        policyEntry.setPrioritizedMessages(true);
-        PolicyMap policyMap = new PolicyMap();
-        policyMap.setDefaultEntry(policyEntry);
-        broker.setDestinationPolicy(policyMap);
-        broker.start();
-
-        factory = createConnectionFactory();
-        Connection consumerConnection = factory.createConnection();
-        consumerConnection.setClientID(CONSUMER_NAME);
-        Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = consumerSession.createTopic(getClass().getName());
-        MessageConsumer consumer = consumerSession.createDurableSubscriber(topic, CONSUMER_NAME);
-        consumerConnection.start();
-
-        ObjectName activeSubscriptionObjectName = broker.getAdminView().getDurableTopicSubscribers()[0];
-        Object prefetchFromSubView = broker.getManagementContext().getAttribute(activeSubscriptionObjectName, "PrefetchSize");
-        assertEquals(prefetchVal, prefetchFromSubView);
-    }
-    
-    public void doTestConsumer(boolean forceRecover) throws Exception{
-        
-        if (forceRecover) {
-            configurePersistence(broker);
-        }
-        broker.start();
-        
-        factory = createConnectionFactory();
-        Connection consumerConnection = factory.createConnection();
-        consumerConnection.setClientID(CONSUMER_NAME);
-        Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = consumerSession.createTopic(getClass().getName());
-        MessageConsumer consumer = consumerSession.createDurableSubscriber(topic, CONSUMER_NAME);
-        consumerConnection.start();
-        consumerConnection.close();
-        broker.stop();
-        broker = createBroker(false);
-        if (forceRecover) {
-            configurePersistence(broker);
-        }
-        broker.start();
-        
-        Connection producerConnection = factory.createConnection();
-        
-        Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        MessageProducer producer = producerSession.createProducer(topic);
-        producerConnection.start();
-        for (int i = 0; i < COUNT; i++) {
-            BytesMessage msg = producerSession.createBytesMessage();
-            msg.writeBytes(payload);
-            producer.send(msg);
-            if (i != 0 && i % 1000 == 0) {
-                LOG.info("Sent msg " + i);
-            }
-        }
-        producerConnection.close();
-        broker.stop();
-        broker = createBroker(false);
-        if (forceRecover) {
-            configurePersistence(broker);
-        }
-        broker.start();
-        
-        consumerConnection = factory.createConnection();
-        consumerConnection.setClientID(CONSUMER_NAME);
-        consumerConnection.start();
-        consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        consumer = consumerSession.createDurableSubscriber(topic, CONSUMER_NAME);
-        for (int i = 0; i < COUNT; i++) {
-            Message msg = consumer.receive(10000);
-            assertNotNull("Missing message: " + i, msg);
-            if (i != 0 && i % 1000 == 0) {
-                LOG.info("Received msg " + i);
-            }
-            
-        }
-        consumerConnection.close();
-        
-    }
-    
-    @Override
-    protected void setUp() throws Exception{
-        if (broker == null) {
-            broker = createBroker(true);
-        }
-        
-        super.setUp();
-    }
-    
-    @Override
-    protected void tearDown() throws Exception{
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-            broker = null;
-        }
-    }
-    
-    protected Topic creatTopic(Session s,String destinationName) throws JMSException{
-        return s.createTopic(destinationName);
-    }
-    
-    /**
-     * Factory method to create a new broker
-     * 
-     * @throws Exception
-     */
-    protected BrokerService createBroker(boolean deleteStore) throws Exception{
-        BrokerService answer = new BrokerService();
-        configureBroker(answer, deleteStore);
-        return answer;
-    }
-    
-    protected void configureBroker(BrokerService answer,boolean deleteStore) throws Exception{
-        answer.setDeleteAllMessagesOnStartup(deleteStore);
-        KahaDBStore kaha = new KahaDBStore();
-        //kaha.setConcurrentStoreAndDispatchTopics(false);
-        File directory = new File("target/activemq-data/kahadb");
-        if (deleteStore) {
-            IOHelper.deleteChildren(directory);
-        }
-        kaha.setDirectory(directory);
-        //kaha.setMaxAsyncJobs(10);
-        
-        answer.setPersistenceAdapter(kaha);
-        answer.addConnector(bindAddress);
-        answer.setUseShutdownHook(false);
-        answer.setAdvisorySupport(false);
-        answer.setDedicatedTaskRunner(useDedicatedTaskRunner);
-    }
-    
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception{
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(bindAddress);
-        factory.setUseDedicatedTaskRunner(useDedicatedTaskRunner);
-        return factory;
-    }
-    
-    public static Test suite(){
-        return suite(DurableConsumerTest.class);
-    }
-    
-    public static void main(String[] args){
-        junit.textui.TestRunner.run(suite());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JMSDurableTopicNoLocalTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JMSDurableTopicNoLocalTest.java
deleted file mode 100644
index 80c4e9f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JMSDurableTopicNoLocalTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * 
- */
-public class JMSDurableTopicNoLocalTest extends EmbeddedBrokerTestSupport {
-    protected String bindAddress;
-
-    public void testConsumeNoLocal() throws Exception {
-        final String TEST_NAME = getClass().getName();
-        Connection connection = createConnection();
-        connection.setClientID(TEST_NAME);
-        
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        TopicSubscriber subscriber = session.createDurableSubscriber((Topic) destination, "topicUser2", null, true);
-        
-        
-        final CountDownLatch latch = new CountDownLatch(1);
-        subscriber.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                System.out.println("Receive a message " + message);
-                latch.countDown();        
-            }   
-        });
-        
-        connection.start();
-        
-        MessageProducer producer = session.createProducer(destination);
-        TextMessage message = session.createTextMessage("THIS IS A TEST");
-        producer.send(message);
-        producer.close();
-        latch.await(5,TimeUnit.SECONDS);
-        assertEquals(latch.getCount(),1);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "vm://localhost";
-        useTopic=true;
-        super.setUp();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setUseJmx(false);
-        answer.setPersistent(true);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
deleted file mode 100755
index 05a8c1d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.Properties;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsDurableTopicSlowReceiveTest extends JmsTopicSendReceiveTest {
-    
-    static final int NMSG = 200;
-    static final int MSIZE = 256000;
-    private static final transient Logger LOG = LoggerFactory.getLogger(JmsDurableTopicSlowReceiveTest.class);
-    private static final String COUNT_PROPERY_NAME = "count";
-
-    protected Connection connection2;
-    protected Session session2;
-    protected Session consumeSession2;
-    protected MessageConsumer consumer2;
-    protected MessageProducer producer2;
-    protected Destination consumerDestination2;
-    BrokerService broker;
-    private Connection connection3;
-    private Session consumeSession3;
-    private TopicSubscriber consumer3;
-
-    /**
-     * Set up a durable suscriber test.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        this.durable = true;
-        broker = createBroker();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        broker.stop();
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory result = new ActiveMQConnectionFactory("vm://localhost?async=false");
-        Properties props = new Properties();
-        props.put("prefetchPolicy.durableTopicPrefetch", "5");
-        props.put("prefetchPolicy.optimizeDurableTopicPrefetch", "5");
-        result.setProperties(props);
-        return result;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-
-    /**
-     * Test if all the messages sent are being received.
-     * 
-     * @throws Exception
-     */
-    public void testSlowReceiver() throws Exception {
-        connection2 = createConnection();
-        connection2.setClientID("test");
-        connection2.start();
-        consumeSession2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumerDestination2 = session2.createTopic(getConsumerSubject() + "2");
-        consumer2 = consumeSession2.createDurableSubscriber((Topic)consumerDestination2, getName());
-
-        consumer2.close();
-        connection2.close();
-        new Thread(new Runnable() {
-
-            public void run() {
-                try {
-                    int count = 0;
-                    for (int loop = 0; loop < 4; loop++) {
-                        connection2 = createConnection();
-                        connection2.start();
-                        session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                        producer2 = session2.createProducer(null);
-                        producer2.setDeliveryMode(deliveryMode);
-                        Thread.sleep(1000);
-                        for (int i = 0; i < NMSG / 4; i++) {
-                            BytesMessage message = session2.createBytesMessage();
-                            message.writeBytes(new byte[MSIZE]);
-                            message.setStringProperty("test", "test");
-                            message.setIntProperty(COUNT_PROPERY_NAME, count);
-                            message.setJMSType("test");
-                            producer2.send(consumerDestination2, message);
-                            Thread.sleep(50);
-                            if (verbose) {
-                                LOG.debug("Sent(" + loop + "): " + i);
-                            }
-                            count++;
-                        }
-                        producer2.close();
-                        connection2.stop();
-                        connection2.close();
-                    }
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                }
-            }
-        }, "SENDER Thread").start();
-        connection3 = createConnection();
-        connection3.setClientID("test");
-        connection3.start();
-        consumeSession3 = connection3.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        consumer3 = consumeSession3.createDurableSubscriber((Topic)consumerDestination2, getName());
-        connection3.close();
-        int count = 0;
-        for (int loop = 0; loop < 4; ++loop) {
-            connection3 = createConnection();
-            connection3.setClientID("test");
-            connection3.start();
-            consumeSession3 = connection3.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-            consumer3 = consumeSession3.createDurableSubscriber((Topic)consumerDestination2, getName());
-            Message msg = null;
-            int i;
-            for (i = 0; i < NMSG / 4; i++) {
-                msg = consumer3.receive(10000);
-                if (msg == null) {
-                    break;
-                }
-                if (verbose) {
-                    LOG.debug("Received(" + loop + "): " + i + " count = " + msg.getIntProperty(COUNT_PROPERY_NAME));
-                }
-                assertNotNull(msg);
-                assertEquals(msg.getJMSType(), "test");
-                assertEquals(msg.getStringProperty("test"), "test");
-                assertEquals("Messages received out of order", count, msg.getIntProperty(COUNT_PROPERY_NAME));
-                Thread.sleep(500);
-                msg.acknowledge();
-                count++;
-            }
-            consumer3.close();
-            assertEquals("Receiver " + loop, NMSG / 4, i);
-            connection3.close();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
deleted file mode 100644
index 671e7bf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.bugs;
-
-
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.ResourceAllocationException;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.transport.RequestTimedOutIOException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class JmsTimeoutTest extends EmbeddedBrokerTestSupport {
-
-		static final Logger LOG = LoggerFactory.getLogger(JmsTimeoutTest.class);
-	
-		private int messageSize=1024*64;
-		private int messageCount=10000;
-		private final AtomicInteger exceptionCount = new AtomicInteger(0);
-		
-	    /**
-	     * Test the case where the broker is blocked due to a memory limit 
-	     * and a producer timeout is set on the connection.
-	     * @throws Exception
-	     */
-	    public void testBlockedProducerConnectionTimeout() throws Exception {
-	        final ActiveMQConnection cx = (ActiveMQConnection)createConnection();
-	        final ActiveMQDestination queue = createDestination("testqueue");
-	        
-	        // we should not take longer than 10 seconds to return from send
-	        cx.setSendTimeout(10000);
-	        	
-	        Runnable r = new Runnable() {
-	            public void run() {
-	                try {
-	                	LOG.info("Sender thread starting");
-	                    Session session = cx.createSession(false, 1);
-	                    MessageProducer producer = session.createProducer(queue);
-	                    producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-	                    
-	                    TextMessage message = session.createTextMessage(createMessageText());
-	                    for(int count=0; count<messageCount; count++){
-	                    	producer.send(message);
-	                    }	  
-	                    LOG.info("Done sending..");
-                    } catch (JMSException e) {
-                        if (e.getCause() instanceof RequestTimedOutIOException) {
-	                        exceptionCount.incrementAndGet();
-                        } else {
-                            e.printStackTrace();
-                        }
-	                    return;
-	                }
-
-	            }
-	        };
-	        cx.start();
-	        Thread producerThread = new Thread(r);
-	        producerThread.start();
-	        producerThread.join(30000);
-	        cx.close();
-	        // We should have a few timeout exceptions as memory store will fill up
-	        assertTrue("No exception from the broker", exceptionCount.get() > 0);
-	    }
-
-
-        /**
-	     * Test the case where the broker is blocked due to a memory limit
-	     * with a fail timeout
-	     * @throws Exception
-	     */
-	    public void testBlockedProducerUsageSendFailTimeout() throws Exception {
-	        final ActiveMQConnection cx = (ActiveMQConnection)createConnection();
-	        final ActiveMQDestination queue = createDestination("testqueue");
-
-            broker.getSystemUsage().setSendFailIfNoSpaceAfterTimeout(5000);
-	        Runnable r = new Runnable() {
-	            public void run() {
-	                try {
-	                	LOG.info("Sender thread starting");
-	                    Session session = cx.createSession(false, 1);
-	                    MessageProducer producer = session.createProducer(queue);
-	                    producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-	                    TextMessage message = session.createTextMessage(createMessageText());
-	                    for(int count=0; count<messageCount; count++){
-	                    	producer.send(message);
-	                    }
-	                    LOG.info("Done sending..");
-                    } catch (JMSException e) {
-                        if (e instanceof ResourceAllocationException || e.getCause() instanceof RequestTimedOutIOException) {
-	                        exceptionCount.incrementAndGet();
-                        } else {
-                            e.printStackTrace();
-                        }
-	                    return;
-	                }
-
-	            }
-	        };
-	        cx.start();
-	        Thread producerThread = new Thread(r);
-	        producerThread.start();
-	        producerThread.join(30000);
-	        cx.close();
-	        // We should have a few timeout exceptions as memory store will fill up
-	        assertTrue("No exception from the broker", exceptionCount.get() > 0);
-	    }
-
-	    protected void setUp() throws Exception {
-            exceptionCount.set(0);
-	        bindAddress = "tcp://localhost:61616";
-	        broker = createBroker();
-	        broker.setDeleteAllMessagesOnStartup(true);
-	        broker.getSystemUsage().getMemoryUsage().setLimit(5*1024*1024);
-
-	        super.setUp();
-	    }
-
-        private String createMessageText() {
-	        StringBuffer buffer = new StringBuffer();
-	        buffer.append("<filler>");
-	        for (int i = buffer.length(); i < messageSize; i++) {
-	            buffer.append('X');
-	        }
-	        buffer.append("</filler>");
-	        return buffer.toString();
-	    }
-	    
-	}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
deleted file mode 100644
index e328809..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageExpirationReaperTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.DestinationViewMBean;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.ObjectName;
-
-/**
- * Test to determine if expired messages are being reaped if there is
- * no active consumer connected to the broker. 
- * 
- * @author bsnyder
- *
- */
-public class MessageExpirationReaperTest {
-    
-    protected BrokerService broker; 
-    protected ConnectionFactory factory;
-    protected ActiveMQConnection connection;
-    protected String destinationName = "TEST.Q";
-    protected String brokerUrl = "tcp://localhost:61616";
-    protected String brokerName = "testBroker";
-    
-    @Before
-    public void init() throws Exception {
-        createBroker();
-        
-        factory = createConnectionFactory();
-        connection = (ActiveMQConnection) factory.createConnection();
-        connection.start();
-    }
-    
-    @After
-    public void cleanUp() throws Exception {
-        connection.close();
-        broker.stop();
-    }
-    
-    protected void createBroker() throws Exception {
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setBrokerName(brokerName);
-        broker.addConnector(brokerUrl);
-        
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setExpireMessagesPeriod(500);
-        policyMap.setDefaultEntry(defaultEntry);
-        broker.setDestinationPolicy(policyMap);
-        
-        broker.start();
-    }
-    
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(brokerUrl);
-    }
-    
-    protected Session createSession() throws Exception {
-        return connection.createSession(false, Session.AUTO_ACKNOWLEDGE);  
-    }
-    
-    @Test
-    public void testExpiredMessageReaping() throws Exception {
-        
-        Session producerSession = createSession();
-        ActiveMQDestination destination =  (ActiveMQDestination) producerSession.createQueue(destinationName);
-        MessageProducer producer = producerSession.createProducer(destination);
-        producer.setTimeToLive(1000);
-        
-        final int count = 3;
-        // Send some messages with an expiration 
-        for (int i = 0; i < count; i++) {
-            TextMessage message = producerSession.createTextMessage("" + i);
-            producer.send(message);
-        }
-        
-        // Let the messages expire 
-        Thread.sleep(2000);
-        
-        DestinationViewMBean view = createView(destination);
-        
-        assertEquals("Incorrect inflight count: " + view.getInFlightCount(), 0, view.getInFlightCount());
-        assertEquals("Incorrect queue size count", 0, view.getQueueSize());
-        assertEquals("Incorrect expired size count", view.getEnqueueCount(), view.getExpiredCount());   
-        
-        // Send more messages with an expiration 
-        for (int i = 0; i < count; i++) {
-            TextMessage message = producerSession.createTextMessage("" + i);
-            producer.send(message);
-        }
-        
-        // Let the messages expire 
-        Thread.sleep(2000);
-        
-        // Simply browse the queue 
-        Session browserSession = createSession();
-        QueueBrowser browser = browserSession.createBrowser((Queue) destination);
-        assertFalse("no message in the browser", browser.getEnumeration().hasMoreElements()); 
-        
-        // The messages expire and should be reaped because of the presence of 
-        // the queue browser 
-        assertEquals("Wrong inFlightCount: " + view.getInFlightCount(), 0, view.getInFlightCount());
-    }
-    
-    protected DestinationViewMBean createView(ActiveMQDestination destination) throws Exception {
-        String domain = "org.apache.activemq";
-        ObjectName name;
-        if (destination.isQueue()) {
-            name = new ObjectName(domain + ":BrokerName=" + brokerName + ",Type=Queue,Destination=" + destinationName);
-        } else {
-            name = new ObjectName(domain + ":BrokerName=" + brokerName + ",Type=Topic,Destination=" + destinationName);
-        }
-        return (DestinationViewMBean) broker.getManagementContext().newProxyInstance(name, DestinationViewMBean.class,
-                true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageSender.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageSender.java
deleted file mode 100644
index f85bdba..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MessageSender.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-
-public class MessageSender {
-    private MessageProducer producer;
-    private Session session;
-
-    public MessageSender(String queueName, Connection connection, boolean useTransactedSession, boolean topic) throws Exception {
-        session = useTransactedSession ? connection.createSession(true, Session.SESSION_TRANSACTED) : connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(topic ? session.createTopic(queueName) : session.createQueue(queueName));
-    }
-
-    public void send(String payload) throws Exception {
-        ObjectMessage message = session.createObjectMessage();
-        message.setObject(payload);
-        producer.send(message);
-        if (session.getTransacted()) {
-            session.commit();
-        }
-    }
-    
-    public MessageProducer getProducer() {
-        return producer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MissingDataFileTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MissingDataFileTest.java
deleted file mode 100644
index 007181c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/MissingDataFileTest.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/*
- * Try and replicate:
- * Caused by: java.io.IOException: Could not locate data file data--188
- *  at org.apache.activemq.kaha.impl.async.AsyncDataManager.getDataFile(AsyncDataManager.java:302)
- *  at org.apache.activemq.kaha.impl.async.AsyncDataManager.read(AsyncDataManager.java:614)
- *  at org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand(AMQPersistenceAdapter.java:523)
- */
-
-public class MissingDataFileTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MissingDataFileTest.class);
-    
-    private static int counter = 300;
-
-    private static int hectorToHaloCtr;
-    private static int xenaToHaloCtr;
-    private static int troyToHaloCtr;
-
-    private static int haloToHectorCtr;
-    private static int haloToXenaCtr;
-    private static int haloToTroyCtr;
-
-    private String hectorToHalo = "hectorToHalo";
-    private String xenaToHalo = "xenaToHalo";
-    private String troyToHalo = "troyToHalo";
-
-    private String haloToHector = "haloToHector";
-    private String haloToXena = "haloToXena";
-    private String haloToTroy = "haloToTroy";
-
-
-    private BrokerService broker;
-
-    private Connection hectorConnection;
-    private Connection xenaConnection;
-    private Connection troyConnection;
-    private Connection haloConnection;
-
-    private final Object lock = new Object();
-    final boolean useTopic = false;
-    final boolean useSleep = true;
-    
-    protected static final String payload = new String(new byte[500]);
-
-    public Connection createConnection() throws JMSException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        return factory.createConnection();
-    }
-
-    public Session createSession(Connection connection, boolean transacted) throws JMSException {
-        return connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    public void startBroker() throws Exception {
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-        broker.addConnector("tcp://localhost:61616").setName("Default");
-   
-        SystemUsage systemUsage;
-        systemUsage = new SystemUsage();
-        systemUsage.getMemoryUsage().setLimit(1024 * 1024); // Just a few messags 
-        broker.setSystemUsage(systemUsage);
-        
-        AMQPersistenceAdapterFactory factory = (AMQPersistenceAdapterFactory) broker.getPersistenceFactory();
-        factory.setMaxFileLength(2*1024); // ~4 messages
-        factory.setCleanupInterval(1000); // every few second
-        
-        broker.start();
-        LOG.info("Starting broker..");
-    }
-
-    public void tearDown() throws Exception {
-        hectorConnection.close();
-        xenaConnection.close();
-        troyConnection.close();
-        haloConnection.close();
-        broker.stop();
-    }
-
-    public void testForNoDataFoundError() throws Exception {
-        
-        startBroker();
-        hectorConnection = createConnection();
-        Thread hectorThread = buildProducer(hectorConnection, hectorToHalo, false, useTopic);
-        Receiver hHectorReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                haloToHectorCtr++;
-                if (haloToHectorCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-                possiblySleep(haloToHectorCtr);
-            }
-        };
-        buildReceiver(hectorConnection, haloToHector, false, hHectorReceiver, useTopic);
-
-        troyConnection = createConnection();
-        Thread troyThread = buildProducer(troyConnection, troyToHalo);
-        Receiver hTroyReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                haloToTroyCtr++;
-                if (haloToTroyCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-                possiblySleep(haloToTroyCtr);
-            }
-        };
-        buildReceiver(hectorConnection, haloToTroy, false, hTroyReceiver, false);
-
-        xenaConnection = createConnection();
-        Thread xenaThread = buildProducer(xenaConnection, xenaToHalo);
-        Receiver hXenaReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                haloToXenaCtr++;
-                if (haloToXenaCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-                possiblySleep(haloToXenaCtr);
-            }
-        };
-        buildReceiver(xenaConnection, haloToXena, false, hXenaReceiver, false);
-
-        haloConnection = createConnection();
-        final MessageSender hectorSender = buildTransactionalProducer(haloToHector, haloConnection, false);
-        final MessageSender troySender = buildTransactionalProducer(haloToTroy, haloConnection, false);
-        final MessageSender xenaSender = buildTransactionalProducer(haloToXena, haloConnection, false);
-        Receiver hectorReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                hectorToHaloCtr++;
-                troySender.send(payload);
-                if (hectorToHaloCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                    possiblySleep(hectorToHaloCtr);
-                }
-            }
-        };
-        Receiver xenaReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                xenaToHaloCtr++;
-                hectorSender.send(payload);
-                if (xenaToHaloCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-                possiblySleep(xenaToHaloCtr);
-            }
-        };
-        Receiver troyReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                troyToHaloCtr++;
-                xenaSender.send(payload);
-                if (troyToHaloCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-            }
-        };
-        buildReceiver(haloConnection, hectorToHalo, true, hectorReceiver, false);
-        buildReceiver(haloConnection, xenaToHalo, true, xenaReceiver, false);
-        buildReceiver(haloConnection, troyToHalo, true, troyReceiver, false);
-
-        haloConnection.start();
-
-        troyConnection.start();
-        troyThread.start();
-
-        xenaConnection.start();
-        xenaThread.start();
-
-        hectorConnection.start();
-        hectorThread.start();
-        waitForMessagesToBeDelivered();
-        // number of messages received should match messages sent
-        assertEquals(hectorToHaloCtr, counter);
-        LOG.info("hectorToHalo received " + hectorToHaloCtr + " messages");
-        assertEquals(xenaToHaloCtr, counter);
-        LOG.info("xenaToHalo received " + xenaToHaloCtr + " messages");
-        assertEquals(troyToHaloCtr, counter);
-        LOG.info("troyToHalo received " + troyToHaloCtr + " messages");
-        assertEquals(haloToHectorCtr, counter);
-        LOG.info("haloToHector received " + haloToHectorCtr + " messages");
-        assertEquals(haloToXenaCtr, counter);
-        LOG.info("haloToXena received " + haloToXenaCtr + " messages");
-        assertEquals(haloToTroyCtr, counter);
-        LOG.info("haloToTroy received " + haloToTroyCtr + " messages");
-
-    }
-
-    protected void possiblySleep(int count) throws InterruptedException {
-        if (useSleep) {
-            if (count % 100 == 0) {
-                Thread.sleep(5000);
-            }
-        }
-        
-    }
-
-    protected void waitForMessagesToBeDelivered() {
-        // let's give the listeners enough time to read all messages
-        long maxWaitTime = counter * 1000;
-        long waitTime = maxWaitTime;
-        long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
-
-        synchronized (lock) {
-            boolean hasMessages = true;
-            while (hasMessages && waitTime >= 0) {
-                try {
-                    lock.wait(200);
-                } catch (InterruptedException e) {
-                    LOG.error(e.toString());
-                }
-                // check if all messages have been received
-                hasMessages = hectorToHaloCtr < counter || xenaToHaloCtr < counter || troyToHaloCtr < counter || haloToHectorCtr < counter || haloToXenaCtr < counter
-                              || haloToTroyCtr < counter;
-                waitTime = maxWaitTime - (System.currentTimeMillis() - start);
-            }
-        }
-    }
-
-    public MessageSender buildTransactionalProducer(String queueName, Connection connection, boolean isTopic) throws Exception {
-
-        return new MessageSender(queueName, connection, true, isTopic);
-    }
-
-    public Thread buildProducer(Connection connection, final String queueName) throws Exception {
-        return buildProducer(connection, queueName, false, false);
-    }
-    
-    public Thread buildProducer(Connection connection, final String queueName, boolean transacted, boolean isTopic) throws Exception {
-        final MessageSender producer = new MessageSender(queueName, connection, transacted, isTopic);
-        Thread thread = new Thread() {
-            public synchronized void run() {
-                for (int i = 0; i < counter; i++) {
-                    try {
-                        producer.send(payload );
-                    } catch (Exception e) {
-                        throw new RuntimeException("on " + queueName + " send", e);
-                    }
-                }
-            }
-        };
-        return thread;
-    }
-
-    public void buildReceiver(Connection connection, final String queueName, boolean transacted, final Receiver receiver, boolean isTopic) throws Exception {
-        final Session session = transacted ? connection.createSession(true, Session.SESSION_TRANSACTED) : connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer inputMessageConsumer = session.createConsumer(isTopic ? session.createTopic(queueName) : session.createQueue(queueName));
-        MessageListener messageListener = new MessageListener() {
-
-            public void onMessage(Message message) {
-                try {
-                    ObjectMessage objectMessage = (ObjectMessage)message;
-                    String s = (String)objectMessage.getObject();
-                    receiver.receive(s);
-                    if (session.getTransacted()) {
-                        session.commit();
-                    }
-
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        };
-        inputMessageConsumer.setMessageListener(messageListener);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java
deleted file mode 100644
index 413ffe0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OutOfOrderTestCase extends TestCase {
-	
-	private static final Logger log = LoggerFactory.getLogger(OutOfOrderTestCase.class);
-	
-	public static final String BROKER_URL = "tcp://localhost:61616";
-	private static final int PREFETCH = 10;
-	private static final String CONNECTION_URL = BROKER_URL + "?jms.prefetchPolicy.all=" + PREFETCH;
-
-	public static final String QUEUE_NAME = "QUEUE";
-	private static final String DESTINATION = "QUEUE?consumer.exclusive=true";
-	
-	BrokerService brokerService;
-	Session session;
-	Connection connection;
-	
-	int seq = 0;
-	
-	public void setUp() throws Exception {
-		brokerService = new BrokerService();
-		brokerService.setUseJmx(true);
-		brokerService.addConnector(BROKER_URL);
-		brokerService.deleteAllMessages();
-		brokerService.start();
-		
-		ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(CONNECTION_URL);
-		connection = connectionFactory.createConnection();
-		connection.start();
-		session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
- 
-	}
-	
-
-	protected void tearDown() throws Exception {
-		session.close();
-		connection.close();
-		brokerService.stop();
-	}
-
-
-
-    public void testOrder() throws Exception {
-
-        log.info("Producing messages 0-29 . . .");
-        Destination destination = session.createQueue(DESTINATION);
-        final MessageProducer messageProducer = session
-                .createProducer(destination);
-        try {
-            for (int i = 0; i < 30; ++i) {
-                final Message message = session
-                        .createTextMessage(createMessageText(i));
-                message.setStringProperty("JMSXGroupID", "FOO");
-
-                messageProducer.send(message);
-                log.info("sent " + toString(message));
-            }
-        } finally {
-            messageProducer.close();
-        }
-
-        log.info("Consuming messages 0-9 . . .");
-        consumeBatch();
-
-        log.info("Consuming messages 10-19 . . .");
-        consumeBatch();
-
-        log.info("Consuming messages 20-29 . . .");
-        consumeBatch();
-    }
-	
-    protected void consumeBatch() throws Exception {
-        Destination destination = session.createQueue(DESTINATION);
-        final MessageConsumer messageConsumer = session.createConsumer(destination);
-        try {
-            for (int i = 0; i < 10; ++i) {
-                final Message message = messageConsumer.receive(1000L);
-                log.info("received " + toString(message));
-                assertEquals("Message out of order", createMessageText(seq++), ((TextMessage) message).getText());
-                message.acknowledge();
-            }
-        } finally {
-            messageConsumer.close();
-        }
-    }
-
-	private String toString(final Message message) throws JMSException {
-	    String ret = "received message '" + ((TextMessage) message).getText() + "' - " + message.getJMSMessageID();
-		if (message.getJMSRedelivered())
-			 ret += " (redelivered)";
-		return ret;
-		
-	}
-
-	private static String createMessageText(final int index) {
-		return "message #" + index;
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java
deleted file mode 100644
index feba861..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.Serializable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Test case demonstrating situation where messages are not delivered to consumers.
- */
-public class QueueWorkerPrefetchTest extends TestCase implements MessageListener
-{
-	 private static final Logger LOG = LoggerFactory.getLogger(QueueWorkerPrefetchTest.class);
-    private static final int BATCH_SIZE = 10;
-    private static final long WAIT_TIMEOUT = 1000*10;
-
-    /** The connection URL. */
-    private static final String CONNECTION_URL = "tcp://localhost:61616";
-
-    /** The queue prefetch size to use. A value greater than 1 seems to make things work. */
-    private static final int QUEUE_PREFETCH_SIZE = 1;
-
-    /** The number of workers to use.  A single worker with a prefetch of 1 works. */
-    private static final int NUM_WORKERS = 2;
-
-    /** Embedded JMS broker. */
-    private BrokerService broker;
-
-    /** The master's producer object for creating work items. */
-    private MessageProducer workItemProducer;
-
-    /** The master's consumer object for consuming ack messages from workers. */
-    private MessageConsumer masterItemConsumer;
-
-    /** The number of acks received by the master. */
-    private AtomicLong acksReceived = new AtomicLong(0);
-
-    private AtomicReference<CountDownLatch> latch = new AtomicReference<CountDownLatch>();
-
-    /** Messages sent to the work-item queue. */
-    private static class WorkMessage implements Serializable
-    {
-        private final int id;
-        public WorkMessage(int id) {
-            this.id = id;
-        }
-        @Override
-        public String toString() {
-            return "Work: "+id;
-        }
-    }
-
-    /**
-     * The worker process.  Consume messages from the work-item queue, possibly creating
-     * more messages to submit to the work-item queue.  For each work item, send an ack
-     * to the master.
-     */
-    private static class Worker implements MessageListener
-    {
-
-        /** Counter shared between workers to decided when new work-item messages are created. */
-        private static AtomicInteger counter = new AtomicInteger(0);
-
-        /** Session to use. */
-        private Session session;
-
-        /** Producer for sending ack messages to the master. */
-        private MessageProducer masterItemProducer;
-
-        /** Producer for sending new work items to the work-items queue. */
-        private MessageProducer workItemProducer;
-
-        public Worker(Session session)
-            throws JMSException
-        {
-            this.session = session;
-            masterItemProducer = session.createProducer(session.createQueue("master-item"));
-            Queue workItemQueue = session.createQueue("work-item");
-            workItemProducer = session.createProducer(workItemQueue);
-            MessageConsumer workItemConsumer = session.createConsumer(workItemQueue);
-            workItemConsumer.setMessageListener(this);
-        }
-
-        public void onMessage(javax.jms.Message message)
-        {
-            try
-            {
-                WorkMessage work = (WorkMessage)((ObjectMessage)message).getObject();
-                
-                long c = counter.incrementAndGet();
-                
-                // Don't create a new work item for every BATCH_SIZE message. */
-                if (c % BATCH_SIZE != 0)
-                {
-                    // Send new work item to work-item queue.
-                    workItemProducer.send(session.createObjectMessage(
-                            new WorkMessage(work.id+1)));
-                }
-
-                // Send ack to master.
-                masterItemProducer.send(session.createObjectMessage(work));
-            }
-            catch (JMSException e)
-            {
-                throw new IllegalStateException("Something has gone wrong", e);
-            }
-        }
-
-        /** Close of JMS resources used by worker. */
-        public void close() throws JMSException
-        {
-            masterItemProducer.close();
-            workItemProducer.close();
-            session.close();
-        }
-    }
-
-    /** Master message handler.  Process ack messages. */
-    public void onMessage(javax.jms.Message message)
-    {
-        long acks = acksReceived.incrementAndGet();
-        latch.get().countDown();
-        if (acks % 1 == 0) {
-            LOG.info("Master now has ack count of: " + acksReceived);
-        }
-    }
-
-    protected void setUp() throws Exception
-    {
-        // Create the message broker.
-        super.setUp();
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setUseJmx(true);
-        broker.addConnector(CONNECTION_URL);
-        broker.start();
-    }
-
-    protected void tearDown() throws Exception
-    {
-        // Shut down the message broker.
-        broker.deleteAllMessages();
-        broker.stop();
-        super.tearDown();
-    }
-
-    public void testActiveMQ()
-        throws Exception
-    {
-        // Create the connection to the broker.
-        ActiveMQConnectionFactory connectionFactory =
-                new ActiveMQConnectionFactory(CONNECTION_URL);
-        ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-        prefetchPolicy.setQueuePrefetch(QUEUE_PREFETCH_SIZE);
-        connectionFactory.setPrefetchPolicy(prefetchPolicy);
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        Session masterSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        workItemProducer = masterSession.createProducer(masterSession.createQueue("work-item"));
-        masterItemConsumer = masterSession.createConsumer(masterSession.createQueue("master-item"));
-        masterItemConsumer.setMessageListener(this);
-
-        // Create the workers.
-        Worker[] workers = new Worker[NUM_WORKERS];
-        for (int i = 0; i < NUM_WORKERS; i++)
-        {
-            workers[i] = new Worker(connection.createSession(false, Session.AUTO_ACKNOWLEDGE));
-        }
-
-        // Send a message to the work queue, and wait for the BATCH_SIZE acks from the workers.
-        acksReceived.set(0);
-        latch.set(new CountDownLatch(BATCH_SIZE));
-        workItemProducer.send(masterSession.createObjectMessage(new WorkMessage(1)));
-        
-        if (!latch.get().await(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) {
-            fail("First batch only received " + acksReceived + " messages");
-        }
-
-       LOG.info("First batch received");
-
-        // Send another message to the work queue, and wait for the next 1000 acks.  It is
-        // at this point where the workers never get notified of this message, as they
-        // have a large pending queue.  Creating a new worker at this point however will
-        // receive this new message.
-        acksReceived.set(0);
-        latch.set(new CountDownLatch(BATCH_SIZE));
-        workItemProducer.send(masterSession.createObjectMessage(new WorkMessage(1)));
-        
-        if (!latch.get().await(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) {
-            fail("Second batch only received " + acksReceived + " messages");
-        }
-
-        LOG.info("Second batch received");
-
-        // Cleanup all JMS resources.
-        for (int i = 0; i < NUM_WORKERS; i++) {
-            workers[i].close();
-        }
-        masterSession.close();
-        connection.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/RawRollbackSharedConsumerTests.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/RawRollbackSharedConsumerTests.java
deleted file mode 100644
index 4790e42..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/RawRollbackSharedConsumerTests.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class RawRollbackSharedConsumerTests {
-	
-	private static ConnectionFactory connectionFactory;
-	private static Destination queue;
-	private static BrokerService broker;
-
-	@BeforeClass
-	public static void clean() throws Exception {	
-		broker = new BrokerService();
-		broker.setDeleteAllMessagesOnStartup(true);
-		broker.setUseJmx(true);
-		broker.start();
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
-		connectionFactory.setBrokerURL("vm://localhost?async=false");
-		RawRollbackSharedConsumerTests.connectionFactory = connectionFactory;
-		queue = new ActiveMQQueue("queue");
-	}
-
-	@AfterClass
-	public static void close() throws Exception {
-		broker.stop();
-	}
-
-	@Before
-	public void clearData() throws Exception {
-		getMessages(false); // drain queue
-		convertAndSend("foo");
-		convertAndSend("bar");
-	}
-
-
-	@After
-	public void checkPostConditions() throws Exception {
-
-		Thread.sleep(1000L);
-		List<String> list = getMessages(false);
-		assertEquals(2, list.size());
-
-	}
-
-	@Test
-	public void testReceiveMessages() throws Exception {
-
-		List<String> list = getMessages(true);
-		assertEquals(2, list.size());
-		assertTrue(list.contains("foo"));
-
-	}
-	
-	private void convertAndSend(String msg) throws Exception {
-		Connection connection = connectionFactory.createConnection();
-		connection.start();
-		Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-		MessageProducer producer = session.createProducer(queue);
-		producer.send(session.createTextMessage(msg));
-		producer.close();
-		session.commit();
-		session.close();
-		connection.close();
-	}
-
-	private List<String> getMessages(boolean rollback) throws Exception {
-		Connection connection = connectionFactory.createConnection();
-		connection.start();
-		Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-		String next = "";
-		List<String> msgs = new ArrayList<String>();
-		MessageConsumer consumer = session.createConsumer(queue);
-		while (next != null) {
-			next = (String) receiveAndConvert(consumer);
-			if (next != null)
-				msgs.add(next);
-		}
-		consumer.close();
-		if (rollback) {
-			session.rollback();
-		} else {
-			session.commit();
-		}
-		session.close();
-		connection.close();
-		return msgs;
-	}
-
-	private String receiveAndConvert(MessageConsumer consumer) throws Exception {
-		Message message = consumer.receive(100L);
-		if (message==null) {
-			return null;
-		}
-		return ((TextMessage)message).getText();
-	}
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/RawRollbackTests.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/RawRollbackTests.java
deleted file mode 100644
index 93abb28..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/RawRollbackTests.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class RawRollbackTests {
-	
-	private static ConnectionFactory connectionFactory;
-	private static Destination queue;
-	private static BrokerService broker;
-
-	@BeforeClass
-	public static void clean() throws Exception {
-		broker = new BrokerService();
-		broker.setDeleteAllMessagesOnStartup(true);
-		broker.setUseJmx(true);
-		broker.start();
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
-		connectionFactory.setBrokerURL("vm://localhost?async=false&waitForStart=5000&jms.prefetchPolicy.all=0");
-		RawRollbackTests.connectionFactory = connectionFactory;
-		queue = new ActiveMQQueue("queue");
-	}
-
-	@AfterClass
-	public static void close() throws Exception {
-		broker.stop();
-	}
-
-	@Before
-	public void clearData() throws Exception {
-		getMessages(false); // drain queue
-		convertAndSend("foo");
-		convertAndSend("bar");
-	}
-
-
-	@After
-	public void checkPostConditions() throws Exception {
-
-		Thread.sleep(1000L);
-		List<String> list = getMessages(false);
-		assertEquals(2, list.size());
-
-	}
-
-	@Test
-	public void testReceiveMessages() throws Exception {
-
-		List<String> list = getMessages(true);
-		assertEquals(2, list.size());
-		assertTrue(list.contains("foo"));
-
-	}
-	
-	private void convertAndSend(String msg) throws Exception {
-		Connection connection = connectionFactory.createConnection();
-		connection.start();
-		Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-		MessageProducer producer = session.createProducer(queue);
-		producer.send(session.createTextMessage(msg));
-		producer.close();
-		session.commit();
-		session.close();
-		connection.close();
-	}
-
-	private List<String> getMessages(boolean rollback) throws Exception {
-		Connection connection = connectionFactory.createConnection();
-		connection.start();
-		Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-		String next = "";
-		List<String> msgs = new ArrayList<String>();
-		while (next != null) {
-			next = (String) receiveAndConvert(session);
-			if (next != null)
-				msgs.add(next);
-		}
-		if (rollback) {
-			session.rollback();
-		} else {
-			session.commit();
-		}
-		session.close();
-		connection.close();
-		return msgs;
-	}
-
-	private String receiveAndConvert(Session session) throws Exception {
-		MessageConsumer consumer = session.createConsumer(queue);
-		Message message = consumer.receive(100L);
-		consumer.close();
-		if (message==null) {
-			return null;
-		}
-		return ((TextMessage)message).getText();
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/Receiver.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/Receiver.java
deleted file mode 100644
index b1872df..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/Receiver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**

- * 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.bugs;

-

-public interface Receiver {

-    void receive(String s) throws Exception;

-}

diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java
deleted file mode 100644
index cb5a9d0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-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.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SlowConsumerTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SlowConsumerTest.class);
-    private static final int MESSAGES_COUNT = 10000;
-
-    protected int messageLogFrequency = 2500;
-    protected long messageReceiveTimeout = 10000L;
-
-    private Socket stompSocket;
-    private ByteArrayOutputStream inputBuffer;
-    private int messagesCount;
-
-    /**
-     * @param args
-     * @throws Exception
-     */
-    public void testRemoveSubscriber() throws Exception {
-        final BrokerService broker = new BrokerService();
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-        broker.setDeleteAllMessagesOnStartup(true);
-
-        broker.addConnector("tcp://localhost:61616").setName("Default");
-        broker.start();
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        final Connection connection = factory.createConnection();
-        connection.start();
-
-        Thread producingThread = new Thread("Producing thread") {
-            public void run() {
-                try {
-                    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageProducer producer = session.createProducer(new ActiveMQQueue(getDestinationName()));
-                    for (int idx = 0; idx < MESSAGES_COUNT; ++idx) {
-                        Message message = session.createTextMessage("" + idx);
-                        producer.send(message);
-                        LOG.debug("Sending: " + idx);
-                    }
-                    producer.close();
-                    session.close();
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-        producingThread.setPriority(Thread.MAX_PRIORITY);
-        producingThread.start();
-        Thread.sleep(1000);
-
-        Thread consumingThread = new Thread("Consuming thread") {
-
-            public void run() {
-                try {
-                    Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-                    MessageConsumer consumer = session.createConsumer(new ActiveMQQueue(getDestinationName()));
-                    int diff = 0;
-                    while (messagesCount != MESSAGES_COUNT) {
-                        Message msg = consumer.receive(messageReceiveTimeout);
-                        if (msg == null) {
-                            LOG.warn("Got null message at count: " + messagesCount + ". Continuing...");
-                            break;
-                        }
-                        String text = ((TextMessage)msg).getText();
-                        int currentMsgIdx = Integer.parseInt(text);
-                        LOG.debug("Received: " + text + " messageCount: " + messagesCount);
-                        msg.acknowledge();
-                        if ((messagesCount + diff) != currentMsgIdx) {
-                            LOG.debug("Message(s) skipped!! Should be message no.: " + messagesCount + " but got: " + currentMsgIdx);
-                            diff = currentMsgIdx - messagesCount;
-                        }
-                        ++messagesCount;
-                        if (messagesCount % messageLogFrequency == 0) {
-                            LOG.info("Received: " + messagesCount + " messages so far");
-                        }
-                        // Thread.sleep(70);
-                    }
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-        consumingThread.start();
-        consumingThread.join();
-
-        assertEquals(MESSAGES_COUNT, messagesCount);
-
-    }
-
-    public void sendFrame(String data) throws Exception {
-        byte[] bytes = data.getBytes("UTF-8");
-        OutputStream outputStream = stompSocket.getOutputStream();
-        for (int i = 0; i < bytes.length; i++) {
-            outputStream.write(bytes[i]);
-        }
-        outputStream.flush();
-    }
-
-    public String receiveFrame(long timeOut) throws Exception {
-        stompSocket.setSoTimeout((int)timeOut);
-        InputStream is = stompSocket.getInputStream();
-        int c = 0;
-        for (;;) {
-            c = is.read();
-            if (c < 0) {
-                throw new IOException("socket closed.");
-            } else if (c == 0) {
-                c = is.read();
-                byte[] ba = inputBuffer.toByteArray();
-                inputBuffer.reset();
-                return new String(ba, "UTF-8");
-            } else {
-                inputBuffer.write(c);
-            }
-        }
-    }
-
-    protected String getDestinationName() {
-        return getClass().getName() + "." + getName();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SparseAckReplayAfterStoreCleanupAMQStoreTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SparseAckReplayAfterStoreCleanupAMQStoreTest.java
deleted file mode 100644
index 103a673..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SparseAckReplayAfterStoreCleanupAMQStoreTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.bugs;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
-
-
-public class SparseAckReplayAfterStoreCleanupAMQStoreTest extends AMQ2832Test {
-    @Override
-    protected void configurePersistence(BrokerService brokerService, boolean deleteAllOnStart) throws Exception {
-    brokerService.setPersistenceFactory(new AMQPersistenceAdapterFactory());
-        AMQPersistenceAdapterFactory factory = (AMQPersistenceAdapterFactory) brokerService.getPersistenceFactory();
-        // ensure there are a bunch of data files but multiple entries in each
-        factory.setMaxFileLength(1024 * 12);
-        // speed up the test case, checkpoint an cleanup early and often
-        factory.setCheckpointInterval(500);
-        factory.setCleanupInterval(500);
-        factory.setSyncOnWrite(false);
-        if (!deleteAllOnStart) {
-            factory.setForceRecoverReferenceStore(true);
-        }
-        brokerService.getPersistenceAdapter();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/TempStorageBlockedBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/TempStorageBlockedBrokerTest.java
deleted file mode 100644
index a9b9b12..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/TempStorageBlockedBrokerTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-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.ActiveMQTopic;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.apache.activemq.store.kahadb.plist.PListStore;
-import org.apache.activemq.usage.MemoryUsage;
-import org.apache.activemq.usage.StoreUsage;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.usage.TempUsage;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class TempStorageBlockedBrokerTest {
-
-    public boolean consumeAll = false;
-    public int deliveryMode = DeliveryMode.PERSISTENT;
-
-    private static final Logger LOG = LoggerFactory.getLogger(TempStorageBlockedBrokerTest.class);
-    private static final int MESSAGES_COUNT = 1000;
-    private static byte[] buf = new byte[4 * 1024];
-    private BrokerService broker;
-    AtomicInteger messagesSent = new AtomicInteger(0);
-    AtomicInteger messagesConsumed = new AtomicInteger(0);
-
-    protected long messageReceiveTimeout = 10L;
-
-    Destination destination = new ActiveMQTopic("FooTwo");
-
-    @Test
-    public void runProducerWithHungConsumer() throws Exception {
-
-        final long origTempUsage = broker.getSystemUsage().getTempUsage().getUsage();
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61618");
-        // ensure messages are spooled to disk for this consumer
-        ActiveMQPrefetchPolicy prefetch = new ActiveMQPrefetchPolicy();
-        prefetch.setTopicPrefetch(10);
-        factory.setPrefetchPolicy(prefetch);
-        Connection consumerConnection = factory.createConnection();
-        consumerConnection.start();
-
-        Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = consumerSession.createConsumer(destination);
-
-        final Connection producerConnection = factory.createConnection();
-        producerConnection.start();
-
-        final CountDownLatch producerHasSentTenMessages = new CountDownLatch(10);
-        Thread producingThread = new Thread("Producing thread") {
-            @Override
-            public void run() {
-                try {
-                    Session session = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageProducer producer = session.createProducer(destination);
-                    producer.setDeliveryMode(deliveryMode);
-                    for (int idx = 0; idx < MESSAGES_COUNT; ++idx) {
-                        Message message = session.createTextMessage(new String(buf) + idx);
-
-                        producer.send(message);
-                        messagesSent.incrementAndGet();
-                        producerHasSentTenMessages.countDown();
-                        Thread.sleep(10);
-                        if (idx != 0 && idx%100 == 0) {
-                            LOG.info("Sent Message " + idx);
-                            LOG.info("Temp Store Usage " + broker.getSystemUsage().getTempUsage().getUsage());
-                        }
-                    }
-                    producer.close();
-                    session.close();
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-        producingThread.start();
-
-        assertTrue("producer has sent 10 in a reasonable time", producerHasSentTenMessages.await(30, TimeUnit.SECONDS));
-        
-        int count = 0;
-
-        Message m = null;
-        while ((m = consumer.receive(messageReceiveTimeout)) != null) {
-            count++;
-            if (count != 0 && count%10 == 0) {
-                LOG.info("Recieved Message (" + count + "):" + m);
-            }
-            messagesConsumed.incrementAndGet();
-            try {
-                Thread.sleep(100);
-            } catch (Exception e) {
-                LOG.info("error sleeping");
-            }
-        }
-
-        LOG.info("Connection Timeout: Retrying.. count: " + count);
-
-        while ((m = consumer.receive(messageReceiveTimeout)) != null) {
-            count++;
-            if (count != 0 && count%10 == 0) {
-                LOG.info("Recieved Message (" + count + "):" + m);
-            }
-            messagesConsumed.incrementAndGet();
-            try {
-                Thread.sleep(100);
-            } catch (Exception e) {
-                LOG.info("error sleeping");
-            }
-        }
-
-        LOG.info("consumer session closing: consumed count: " + count);
-
-        consumerSession.close();
-
-        producingThread.join();
-
-        final long tempUsageBySubscription = broker.getSystemUsage().getTempUsage().getUsage();
-        LOG.info("Orig Usage: " + origTempUsage + ", currentUsage: " + tempUsageBySubscription);
-        // assertTrue("some temp store has been used", tempUsageBySubscription
-        // != origTempUsage);
-
-        producerConnection.close();
-        consumerConnection.close();
-
-        LOG.info("Subscrition Usage: " + tempUsageBySubscription + ", endUsage: "
-                + broker.getSystemUsage().getTempUsage().getUsage());
-
-
-        assertEquals("Incorrect number of Messages Sent: " + messagesSent.get(), messagesSent.get(), MESSAGES_COUNT);
-        assertEquals("Incorrect number of Messages Consumed: " + messagesConsumed.get(), messagesConsumed.get(),
-                MESSAGES_COUNT);
-    }
-
-    @Before
-    public void setUp() throws Exception {
-
-        broker = new BrokerService();
-        broker.setDataDirectory("target" + File.separator + "activemq-data");
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-        broker.setAdvisorySupport(false);
-        broker.setDeleteAllMessagesOnStartup(true);
-
-        AMQPersistenceAdapter persistence = new AMQPersistenceAdapter();
-        persistence.setSyncOnWrite(false);
-        File directory = new File("target" + File.separator + "activemq-data");
-        persistence.setDirectory(directory);
-        File tmpDir = new File(directory, "tmp");
-        IOHelper.deleteChildren(tmpDir);
-        PListStore tempStore = new PListStore();
-        tempStore.setDirectory(tmpDir);
-        tempStore.start();
-
-        SystemUsage sysUsage = new SystemUsage("mySysUsage", persistence, tempStore);
-        MemoryUsage memUsage = new MemoryUsage();
-        memUsage.setLimit((1024 * 1024));
-        StoreUsage storeUsage = new StoreUsage();
-        storeUsage.setLimit((1024 * 1024) * 38);
-        TempUsage tmpUsage = new TempUsage();
-        tmpUsage.setLimit((1024 * 1024) * 38);
-
-        PolicyEntry defaultPolicy = new PolicyEntry();
-        // defaultPolicy.setTopic("FooTwo");
-        defaultPolicy.setProducerFlowControl(false);
-        defaultPolicy.setMemoryLimit(10 * 1024);
-
-        PolicyMap policyMap = new PolicyMap();
-        policyMap.setDefaultEntry(defaultPolicy);
-
-        sysUsage.setMemoryUsage(memUsage);
-        sysUsage.setStoreUsage(storeUsage);
-        sysUsage.setTempUsage(tmpUsage);
-
-        broker.setDestinationPolicy(policyMap);
-        broker.setSystemUsage(sysUsage);
-        broker.setTempDataStore(tempStore);
-        broker.setPersistenceAdapter(persistence);
-
-        broker.addConnector("tcp://localhost:61618").setName("Default");
-        broker.start();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java
deleted file mode 100644
index c37c8c9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/**
- * 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.bugs;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/*
- * simulate message flow which cause the following exception in the broker
- * (exception logged by client) <p/> 2007-07-24 13:51:23,624
- * com.easynet.halo.Halo ERROR (LoggingErrorHandler.java: 23) JMS failure
- * javax.jms.JMSException: Transaction 'TX:ID:dmt-53625-1185281414694-1:0:344'
- * has not been started. at
- * org.apache.activemq.broker.TransactionBroker.getTransaction(TransactionBroker.java:230)
- * This appears to be consistent in a MacBook. Haven't been able to replicate it
- * on Windows though
- */
-public class TransactionNotStartedErrorTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TransactionNotStartedErrorTest.class);
-    
-    private static int counter = 500;
-
-    private static int hectorToHaloCtr;
-    private static int xenaToHaloCtr;
-    private static int troyToHaloCtr;
-
-    private static int haloToHectorCtr;
-    private static int haloToXenaCtr;
-    private static int haloToTroyCtr;
-
-    private String hectorToHalo = "hectorToHalo";
-    private String xenaToHalo = "xenaToHalo";
-    private String troyToHalo = "troyToHalo";
-
-    private String haloToHector = "haloToHector";
-    private String haloToXena = "haloToXena";
-    private String haloToTroy = "haloToTroy";
-
-
-    private BrokerService broker;
-
-    private Connection hectorConnection;
-    private Connection xenaConnection;
-    private Connection troyConnection;
-    private Connection haloConnection;
-
-    private final Object lock = new Object();
-
-    public Connection createConnection() throws JMSException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        return factory.createConnection();
-    }
-
-    public Session createSession(Connection connection, boolean transacted) throws JMSException {
-        return connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    public void startBroker() throws Exception {
-        broker = new BrokerService();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-        broker.addConnector("tcp://localhost:61616").setName("Default");
-        broker.start();
-        LOG.info("Starting broker..");
-    }
-
-    public void tearDown() throws Exception {
-        hectorConnection.close();
-        xenaConnection.close();
-        troyConnection.close();
-        haloConnection.close();
-        broker.stop();
-    }
-
-    public void testTransactionNotStartedError() throws Exception {
-        startBroker();
-        hectorConnection = createConnection();
-        Thread hectorThread = buildProducer(hectorConnection, hectorToHalo);
-        Receiver hHectorReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                haloToHectorCtr++;
-                if (haloToHectorCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-            }
-        };
-        buildReceiver(hectorConnection, haloToHector, false, hHectorReceiver);
-
-        troyConnection = createConnection();
-        Thread troyThread = buildProducer(troyConnection, troyToHalo);
-        Receiver hTroyReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                haloToTroyCtr++;
-                if (haloToTroyCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-            }
-        };
-        buildReceiver(hectorConnection, haloToTroy, false, hTroyReceiver);
-
-        xenaConnection = createConnection();
-        Thread xenaThread = buildProducer(xenaConnection, xenaToHalo);
-        Receiver hXenaReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                haloToXenaCtr++;
-                if (haloToXenaCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-            }
-        };
-        buildReceiver(xenaConnection, haloToXena, false, hXenaReceiver);
-
-        haloConnection = createConnection();
-        final MessageSender hectorSender = buildTransactionalProducer(haloToHector, haloConnection);
-        final MessageSender troySender = buildTransactionalProducer(haloToTroy, haloConnection);
-        final MessageSender xenaSender = buildTransactionalProducer(haloToXena, haloConnection);
-        Receiver hectorReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                hectorToHaloCtr++;
-                troySender.send("halo to troy because of hector");
-                if (hectorToHaloCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-            }
-        };
-        Receiver xenaReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                xenaToHaloCtr++;
-                hectorSender.send("halo to hector because of xena");
-                if (xenaToHaloCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-            }
-        };
-        Receiver troyReceiver = new Receiver() {
-            public void receive(String s) throws Exception {
-                troyToHaloCtr++;
-                xenaSender.send("halo to xena because of troy");
-                if (troyToHaloCtr >= counter) {
-                    synchronized (lock) {
-                        lock.notifyAll();
-                    }
-                }
-            }
-        };
-        buildReceiver(haloConnection, hectorToHalo, true, hectorReceiver);
-        buildReceiver(haloConnection, xenaToHalo, true, xenaReceiver);
-        buildReceiver(haloConnection, troyToHalo, true, troyReceiver);
-
-        haloConnection.start();
-
-        troyConnection.start();
-        troyThread.start();
-
-        xenaConnection.start();
-        xenaThread.start();
-
-        hectorConnection.start();
-        hectorThread.start();
-        waitForMessagesToBeDelivered();
-        // number of messages received should match messages sent
-        assertEquals(hectorToHaloCtr, counter);
-        LOG.info("hectorToHalo received " + hectorToHaloCtr + " messages");
-        assertEquals(xenaToHaloCtr, counter);
-        LOG.info("xenaToHalo received " + xenaToHaloCtr + " messages");
-        assertEquals(troyToHaloCtr, counter);
-        LOG.info("troyToHalo received " + troyToHaloCtr + " messages");
-        assertEquals(haloToHectorCtr, counter);
-        LOG.info("haloToHector received " + haloToHectorCtr + " messages");
-        assertEquals(haloToXenaCtr, counter);
-        LOG.info("haloToXena received " + haloToXenaCtr + " messages");
-        assertEquals(haloToTroyCtr, counter);
-        LOG.info("haloToTroy received " + haloToTroyCtr + " messages");
-
-    }
-
-    protected void waitForMessagesToBeDelivered() {
-        // let's give the listeners enough time to read all messages
-        long maxWaitTime = counter * 3000;
-        long waitTime = maxWaitTime;
-        long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
-
-        synchronized (lock) {
-            boolean hasMessages = true;
-            while (hasMessages && waitTime >= 0) {
-                try {
-                    lock.wait(200);
-                } catch (InterruptedException e) {
-                    LOG.error(e.toString());
-                }
-                // check if all messages have been received
-                hasMessages = hectorToHaloCtr < counter || xenaToHaloCtr < counter || troyToHaloCtr < counter || haloToHectorCtr < counter || haloToXenaCtr < counter
-                              || haloToTroyCtr < counter;
-                waitTime = maxWaitTime - (System.currentTimeMillis() - start);
-            }
-        }
-    }
-
-    public MessageSender buildTransactionalProducer(String queueName, Connection connection) throws Exception {
-
-        return new MessageSender(queueName, connection, true, false);
-    }
-
-    public Thread buildProducer(Connection connection, final String queueName) throws Exception {
-
-        final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final MessageSender producer = new MessageSender(queueName, connection, false, false);
-        Thread thread = new Thread() {
-
-            public synchronized void run() {
-                for (int i = 0; i < counter; i++) {
-                    try {
-                        producer.send(queueName);
-                        if (session.getTransacted()) {
-                            session.commit();
-                        }
-
-                    } catch (Exception e) {
-                        throw new RuntimeException("on " + queueName + " send", e);
-                    }
-                }
-            }
-        };
-        return thread;
-    }
-
-    public void buildReceiver(Connection connection, final String queueName, boolean transacted, final Receiver receiver) throws Exception {
-        final Session session = transacted ? connection.createSession(true, Session.SESSION_TRANSACTED) : connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer inputMessageConsumer = session.createConsumer(session.createQueue(queueName));
-        MessageListener messageListener = new MessageListener() {
-
-            public void onMessage(Message message) {
-                try {
-                    ObjectMessage objectMessage = (ObjectMessage)message;
-                    String s = (String)objectMessage.getObject();
-                    receiver.receive(s);
-                    if (session.getTransacted()) {
-                        session.commit();
-                    }
-
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        };
-        inputMessageConsumer.setMessageListener(messageListener);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/VMTransportClosureTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/VMTransportClosureTest.java
deleted file mode 100644
index 6a96a14..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/VMTransportClosureTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.IOException;
-
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class VMTransportClosureTest extends EmbeddedBrokerTestSupport {
-	private static final Log LOG = LogFactory
-			.getLog(VMTransportClosureTest.class);
-	private static final long MAX_TEST_TIME_MILLIS = 300000; // 5min
-	private static final int NUM_ATTEMPTS = 100000;
-
-	public void setUp() throws Exception {
-		setAutoFail(true);
-		setMaxTestTime(MAX_TEST_TIME_MILLIS);
-		super.setUp();
-	}
-
-	/**
-	 * EmbeddedBrokerTestSupport.createBroker() binds the broker to a VM
-	 * transport address, which results in a call to
-	 * VMTransportFactory.doBind(location):
-	 * <p>
-	 * <code>
-	 *     public TransportServer doBind(URI location) throws IOException {
-	 *        return bind(location, false);
-	 *}
-	 *</code>
-	 * </p>
-	 * As a result, VMTransportServer.disposeOnDisconnect is <code>false</code>.
-	 * To expose the bug, we need to have VMTransportServer.disposeOnDisconnect
-	 * <code>true</code>, which is the case when the VMTransportServer is not
-	 * already bound when the first connection is made.
-	 */
-	@Override
-	protected BrokerService createBroker() throws Exception {
-		BrokerService answer = new BrokerService();
-		answer.setPersistent(isPersistent());
-		// answer.addConnector(bindAddress);
-		return answer;
-	}
-
-	/**
-	 * This test demonstrates how the "disposeOnDisonnect" feature of
-	 * VMTransportServer can incorrectly close all VM connections to the local
-	 * broker.
-	 */
-	public void testPrematureClosure() throws Exception {
-
-		// Open a persistent connection to the local broker. The persistent
-		// connection is maintained through the test and should prevent the
-		// VMTransportServer from stopping itself when the local transport is
-		// closed.
-		ActiveMQConnection persistentConn = (ActiveMQConnection) createConnection();
-		persistentConn.start();
-		Session session = persistentConn.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageProducer producer = session.createProducer(destination);
-
-		for (int i = 0; i < NUM_ATTEMPTS; i++) {
-			LOG.info("Attempt: " + i);
-
-			// Open and close a local transport connection. As is done by by
-			// most users of the transport, ensure that the transport is stopped
-			// when closed by the peer (via ShutdownInfo). Closing the local
-			// transport should not affect the persistent connection.
-			final Transport localTransport = TransportFactory.connect(broker
-					.getVmConnectorURI());
-			localTransport.setTransportListener(new TransportListener() {
-				public void onCommand(Object command) {
-					if (command instanceof ShutdownInfo) {
-						try {
-							localTransport.stop();
-						} catch (Exception ex) {
-							throw new RuntimeException(ex);
-						}
-					}
-				}
-
-				public void onException(IOException error) {
-					// ignore
-				}
-
-				public void transportInterupted() {
-					// ignore
-				}
-
-				public void transportResumed() {
-					// ignore
-				}
-			});
-
-			localTransport.start();
-			localTransport.stop();
-
-			// Ensure that the persistent connection is still usable.
-			producer.send(session.createMessage());
-			session.rollback();
-		}
-
-		persistentConn.close();
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/VerifySteadyEnqueueRate.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/VerifySteadyEnqueueRate.java
deleted file mode 100644
index 69d736a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/VerifySteadyEnqueueRate.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * 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.bugs;
-
-import java.io.File;
-import java.text.DateFormat;
-import java.util.Date;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.Connection;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class VerifySteadyEnqueueRate extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(VerifySteadyEnqueueRate.class);
-
-    private static int max_messages = 1000000;
-    private String destinationName = getName() + "_Queue";
-    private BrokerService broker;
-    final boolean useTopic = false;
-
-    private boolean useAMQPStore = false;
-    protected static final String payload = new String(new byte[24]);
-
-    public void setUp() throws Exception {
-        startBroker();
-    }
-
-    public void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    public void testEnqueueRateCanMeetSLA() throws Exception {
-        if (true) {
-            return;
-        }
-        doTestEnqueue(false);
-    }
-
-    private void doTestEnqueue(final boolean transacted) throws Exception {
-        final long min = 100;
-        final AtomicLong total = new AtomicLong(0);
-        final AtomicLong slaViolations = new AtomicLong(0);
-        final AtomicLong max = new AtomicLong(0);
-        final int numThreads = 6;
-        
-        Runnable runner = new Runnable() {
-
-            public void run() {
-                try {
-                    MessageSender producer = new MessageSender(destinationName,
-                            createConnection(), transacted, useTopic);
-
-                    for (int i = 0; i < max_messages; i++) {
-                        long startT = System.currentTimeMillis();
-                        producer.send(payload);
-                        long endT = System.currentTimeMillis();
-                        long duration = endT - startT;
-
-                        total.incrementAndGet();
-                        
-                        if (duration > max.get()) {
-                            max.set(duration);
-                        }
-
-                        if (duration > min) {
-                        	slaViolations.incrementAndGet();
-                            System.err.println("SLA violation @ "+Thread.currentThread().getName()
-                                    + " "
-                                    + DateFormat.getTimeInstance().format(
-                                            new Date(startT)) + " at message "
-                                    + i + " send time=" + duration
-                                    + " - Total SLA violations: "+slaViolations.get()+"/"+total.get()+" ("+String.format("%.6f", 100.0*slaViolations.get()/total.get())+"%)");
-                        }
-                    }
-
-                } catch (Exception e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
-                System.out.println("Max Violation = " + max + " - Total SLA violations: "+slaViolations.get()+"/"+total.get()+" ("+String.format("%.6f", 100.0*slaViolations.get()/total.get())+"%)");
-            }
-        };
-        ExecutorService executor = Executors.newCachedThreadPool();
-        
-        for (int i = 0; i < numThreads; i++) {
-            executor.execute(runner);
-        }
-        
-        executor.shutdown();
-        while(!executor.isTerminated()) {
-            executor.awaitTermination(10, TimeUnit.SECONDS);
-        }
-    }
-
-    private Connection createConnection() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
-                broker.getTransportConnectors().get(0).getConnectUri());
-        return factory.createConnection();
-    }
-
-    private void startBroker() throws Exception {
-        broker = new BrokerService();
-        //broker.setDeleteAllMessagesOnStartup(true);
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-
-        if (useAMQPStore) {
-            AMQPersistenceAdapterFactory factory = (AMQPersistenceAdapterFactory) broker
-                    .getPersistenceFactory();
-            // ensure there are a bunch of data files but multiple entries in
-            // each
-            // factory.setMaxFileLength(1024 * 20);
-            // speed up the test case, checkpoint an cleanup early and often
-            // factory.setCheckpointInterval(500);
-            factory.setCleanupInterval(1000 * 60 * 30);
-            factory.setSyncOnWrite(false);
-
-            // int indexBinSize=262144; // good for 6M
-            int indexBinSize = 1024;
-            factory.setIndexMaxBinSize(indexBinSize * 2);
-            factory.setIndexBinSize(indexBinSize);
-            factory.setIndexPageSize(192 * 20);
-        } else {
-            KahaDBStore kaha = new KahaDBStore();
-            kaha.setDirectory(new File("target/activemq-data/kahadb"));
-            // The setEnableJournalDiskSyncs(false) setting is a little dangerous right now, as I have not verified 
-            // what happens if the index is updated but a journal update is lost.
-            // Index is going to be in consistent, but can it be repaired?
-            kaha.setEnableJournalDiskSyncs(false);
-            // Using a bigger journal file size makes he take fewer spikes as it is not switching files as often.
-            kaha.setJournalMaxFileLength(1024*1024*100);
-            
-            // small batch means more frequent and smaller writes
-            kaha.setIndexWriteBatchSize(100);
-            // do the index write in a separate thread
-            kaha.setEnableIndexWriteAsync(true);
-            
-            broker.setPersistenceAdapter(kaha);
-        }
-
-        broker.addConnector("tcp://localhost:0").setName("Default");
-        broker.start();
-        LOG.info("Starting broker..");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java
deleted file mode 100644
index 0beef83..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/* ====================================================================
-   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.bugs.amq1095;
-
-import java.io.File;
-import java.net.URI;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * <p>
- * Common functionality for ActiveMQ test cases.
- * </p>
- * 
- * @author Rainer Klute <a
- *         href="mailto:rainer.klute@dp-itsolutions.de">&lt;rainer.klute@dp-itsolutions.de&gt;</a>
- * @since 2007-08-10
- * @version $Id: ActiveMQTestCase.java 12 2007-08-14 12:02:02Z rke $
- */
-public class ActiveMQTestCase extends TestCase
-{
-    private Context context;
-    private BrokerService broker;
-    protected Connection connection;
-    protected Destination destination;
-    private List<MessageConsumer> consumersToEmpty = new LinkedList<MessageConsumer>();
-    protected final long RECEIVE_TIMEOUT = 500;
-
-
-    /** <p>Constructor</p> */
-    public ActiveMQTestCase()
-    {}
-    
-    /** <p>Constructor</p> 
-     * @param name the test case's name
-     */
-    public ActiveMQTestCase(final String name)
-    {
-        super(name);
-    }
-
-    /**
-     * <p>Sets up the JUnit testing environment.
-     */
-    protected void setUp()
-    {
-        URI uri;
-        try
-        {
-            /* Copy all system properties starting with "java.naming." to the initial context. */
-            final Properties systemProperties = System.getProperties();
-            final Properties jndiProperties = new Properties();
-            for (final Iterator i = systemProperties.keySet().iterator(); i.hasNext();)
-            {
-                final String key = (String) i.next();
-                if (key.startsWith("java.naming.") || key.startsWith("topic.") ||
-                    key.startsWith("queue."))
-                {
-                    final String value = (String) systemProperties.get(key);
-                    jndiProperties.put(key, value);
-                }
-            }
-            context = new InitialContext(jndiProperties); 
-            uri = new URI("xbean:org/apache/activemq/bugs/amq1095/activemq.xml");
-            broker = BrokerFactory.createBroker(uri);
-            broker.start();
-        }
-        catch (Exception ex)
-        {
-            throw new RuntimeException(ex);
-        }
-
-        final ConnectionFactory connectionFactory;
-        try
-        {
-            /* Lookup the connection factory. */
-            connectionFactory = (ConnectionFactory) context.lookup("TopicConnectionFactory");
-
-            destination = new ActiveMQTopic("TestTopic");
-
-            /* Create a connection: */
-            connection = connectionFactory.createConnection();
-            connection.setClientID("sampleClientID");
-        }
-        catch (JMSException ex1)
-        {
-            ex1.printStackTrace();
-            Assert.fail(ex1.toString());
-        }
-        catch (NamingException ex2) {
-            ex2.printStackTrace();
-            Assert.fail(ex2.toString());
-        }
-        catch (Throwable ex3) {
-            ex3.printStackTrace();
-            Assert.fail(ex3.toString());
-        }
-    }
-
-
-    /**
-     * <p>
-     * Tear down the testing environment by receiving any messages that might be
-     * left in the topic after a failure and shutting down the broker properly.
-     * This is quite important for subsequent test cases that assume the topic
-     * to be empty.
-     * </p>
-     */
-    protected void tearDown() throws Exception {
-        TextMessage msg;
-        try {
-			for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();)
-			{
-			    final MessageConsumer consumer = (MessageConsumer) i.next();
-			    if (consumer != null)
-			        do
-			            msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT);
-			        while (msg != null);
-			}
-		} catch (Exception e) {
-		}
-        if (connection != null) {
-            connection.stop();
-        }
-        broker.stop();
-    }
-
-    protected void registerToBeEmptiedOnShutdown(final MessageConsumer consumer)
-    {
-        consumersToEmpty.add(consumer);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/MessageSelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/MessageSelectorTest.java
deleted file mode 100644
index a127422..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/MessageSelectorTest.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/* ====================================================================
-   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.bugs.amq1095;
-
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import junit.framework.Assert;
-
-
-/**
- * <p>
- * Test cases for various ActiveMQ functionalities.
- * </p>
- * 
- * <ul>
- * <li>
- * <p>
- * Durable subscriptions are used.
- * </p>
- * </li>
- * <li>
- * <p>
- * The Kaha persistence manager is used.
- * </p>
- * </li>
- * <li>
- * <p>
- * An already existing Kaha directory is used. Everything runs fine if the
- * ActiveMQ broker creates a new Kaha directory.
- * </p>
- * </li>
- * </ul>
- * 
- * @author Rainer Klute <a
- *         href="mailto:rainer.klute@dp-itsolutions.de">&lt;rainer.klute@dp-itsolutions.de&gt;</a>
- * @since 2007-08-09
- * @version $Id: MessageSelectorTest.java 12 2007-08-14 12:02:02Z rke $
- */
-public class MessageSelectorTest extends ActiveMQTestCase {
-
-    private MessageConsumer consumer1;
-    private MessageConsumer consumer2;
-
-    /** <p>Constructor</p> */
-    public MessageSelectorTest()
-    {}
-    
-    /** <p>Constructor</p>
-     * @param name the test case's name
-     */
-    public MessageSelectorTest(final String name)
-    {
-        super(name);
-    }
-
-    /**
-     * <p>
-     * Tests whether message selectors work for durable subscribers.
-     * </p>
-     */
-    public void testMessageSelectorForDurableSubscribersRunA()
-    {
-        runMessageSelectorTest(true);
-    }
-
-    /**
-     * <p>
-     * Tests whether message selectors work for durable subscribers.
-     * </p>
-     */
-    public void testMessageSelectorForDurableSubscribersRunB()
-    {
-        runMessageSelectorTest(true);
-    }
-
-    /**
-     * <p>
-     * Tests whether message selectors work for non-durable subscribers.
-     * </p>
-     */
-    public void testMessageSelectorForNonDurableSubscribers()
-    {
-        runMessageSelectorTest(false);
-    }
-    
-    /**
-     * <p>
-     * Tests whether message selectors work. This is done by sending two
-     * messages to a topic. Both have an int property with different values. Two
-     * subscribers use message selectors to receive the messages. Each one
-     * should receive exactly one of the messages.
-     * </p>
-     */
-    private void runMessageSelectorTest(final boolean isDurableSubscriber)
-    {
-        try
-        {
-            final String PROPERTY_CONSUMER = "consumer";
-            final String CONSUMER_1 = "Consumer 1";
-            final String CONSUMER_2 = "Consumer 2";
-            final String MESSAGE_1 = "Message to " + CONSUMER_1;
-            final String MESSAGE_2 = "Message to " + CONSUMER_2;
-
-            assertNotNull(connection);
-            assertNotNull(destination);
-
-            final Session producingSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            final MessageProducer producer = producingSession.createProducer(destination);
-
-            final Session consumingSession1 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            final Session consumingSession2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-            if (isDurableSubscriber)
-            {
-                consumer1 = consumingSession1.createDurableSubscriber
-                    ((Topic) destination, CONSUMER_1, PROPERTY_CONSUMER + " = 1", false);
-                consumer2 = consumingSession2.createDurableSubscriber
-                    ((Topic) destination, CONSUMER_2, PROPERTY_CONSUMER + " = 2", false);
-            }
-            else
-            {
-                consumer1 = consumingSession1.createConsumer(destination, PROPERTY_CONSUMER + " = 1");
-                consumer2 = consumingSession2.createConsumer(destination, PROPERTY_CONSUMER + " = 2");
-            }
-            registerToBeEmptiedOnShutdown(consumer1);
-            registerToBeEmptiedOnShutdown(consumer2);
-
-            connection.start();
-
-            TextMessage msg1;
-            TextMessage msg2;
-            int propertyValue;
-            String contents;
-
-            /* Try to receive any messages from the consumers. There shouldn't be any yet. */
-            msg1 = (TextMessage) consumer1.receive(RECEIVE_TIMEOUT);
-            if (msg1 != null)
-            {
-                final StringBuffer msg = new StringBuffer("The consumer read a message that was left over from a former ActiveMQ broker run.");
-                propertyValue = msg1.getIntProperty(PROPERTY_CONSUMER);
-                contents = msg1.getText();
-                if (propertyValue != 1) // Is the property value as expected?
-                {
-                    msg.append(" That message does not match the consumer's message selector.");
-                    fail(msg.toString());
-                }
-                assertEquals(1, propertyValue);
-                assertEquals(MESSAGE_1, contents);
-            }
-            msg2 = (TextMessage) consumer2.receive(RECEIVE_TIMEOUT);
-            if (msg2 != null)
-            {
-                final StringBuffer msg = new StringBuffer("The consumer read a message that was left over from a former ActiveMQ broker run.");
-                propertyValue = msg2.getIntProperty(PROPERTY_CONSUMER);
-                contents = msg2.getText();
-                if (propertyValue != 2) // Is the property value as expected?
-                {
-                    msg.append(" That message does not match the consumer's message selector.");
-                    fail(msg.toString());
-                }
-                assertEquals(2, propertyValue);
-                assertEquals(MESSAGE_2, contents);
-            }
-
-            /* Send two messages. Each is targeted at one of the consumers. */
-            TextMessage msg;
-            msg = producingSession.createTextMessage();
-            msg.setText(MESSAGE_1);
-            msg.setIntProperty(PROPERTY_CONSUMER, 1);
-            producer.send(msg);
-
-            msg = producingSession.createTextMessage();
-            msg.setText(MESSAGE_2);
-            msg.setIntProperty(PROPERTY_CONSUMER, 2);
-            producer.send(msg);
-
-            /* Receive the messages that have just been sent. */
-
-            /* Use consumer 1 to receive one of the messages. The receive()
-             * method is called twice to make sure there is nothing else in
-             * stock for this consumer. */
-            msg1 = (TextMessage) consumer1.receive(RECEIVE_TIMEOUT);
-            assertNotNull(msg1);
-            propertyValue = msg1.getIntProperty(PROPERTY_CONSUMER);
-            contents = msg1.getText();
-            assertEquals(1, propertyValue);
-            assertEquals(MESSAGE_1, contents);
-            msg1 = (TextMessage) consumer1.receive(RECEIVE_TIMEOUT);
-            assertNull(msg1);
-
-            /* Use consumer 2 to receive the other message. The receive()
-             * method is called twice to make sure there is nothing else in
-             * stock for this consumer. */
-            msg2 = (TextMessage) consumer2.receive(RECEIVE_TIMEOUT);
-            assertNotNull(msg2);
-            propertyValue = msg2.getIntProperty(PROPERTY_CONSUMER);
-            contents = msg2.getText();
-            assertEquals(2, propertyValue);
-            assertEquals(MESSAGE_2, contents);
-            msg2 = (TextMessage) consumer2.receive(RECEIVE_TIMEOUT);
-            assertNull(msg2);
-        }
-        catch (JMSException ex)
-        {
-            ex.printStackTrace();
-            Assert.fail();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsClient.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsClient.java
deleted file mode 100644
index f6fd175..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsClient.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.bugs.amq1974;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-import org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent;
-
-public class TryJmsClient
-{
-    private final BrokerService broker = new BrokerService();
-
-    public static void main(String[] args) throws Exception {
-        new TryJmsClient().start();
-    }
-
-    private void start() throws Exception {
-
-        broker.setUseJmx(false);
-        broker.setPersistent(true);
-        broker.setBrokerName("TestBroker");
-        broker.getSystemUsage().setSendFailIfNoSpace(true);
-
-        broker.getSystemUsage().getMemoryUsage().setLimit(10 * 1024 * 1024);
-
-        KahaPersistenceAdapter persist = new KahaPersistenceAdapter();
-        persist.setDirectory(new File("/tmp/broker2"));
-        persist.setMaxDataFileLength(20 * 1024 * 1024);
-        broker.setPersistenceAdapter(persist);
-
-        String brokerUrl = "tcp://localhost:4501";
-        broker.addConnector(brokerUrl);
-
-        broker.start();
-
-        addNetworkBroker();
-
-        startUsageMonitor(broker);
-
-        startMessageSend();
-
-        synchronized(this) {
-            this.wait();
-        }
-    }
-
-    private void startUsageMonitor(final BrokerService brokerService) {
-        new Thread(new Runnable() {
-            public void run() {
-                while (true) {
-                    try {
-                        Thread.sleep(10000);
-                    } catch (InterruptedException e) {
-                        e.printStackTrace();
-                    }
-
-                    System.out.println("ActiveMQ memeory " + brokerService.getSystemUsage().getMemoryUsage().getPercentUsage()
-                            + " " + brokerService.getSystemUsage().getMemoryUsage().getUsage());
-                    System.out.println("ActiveMQ message store " + brokerService.getSystemUsage().getStoreUsage().getPercentUsage());
-                    System.out.println("ActiveMQ temp space " + brokerService.getSystemUsage().getTempUsage().getPercentUsage());
-                }
-            }
-        }).start();
-    }
-
-    private void addNetworkBroker() throws Exception {
-
-        DiscoveryNetworkConnector dnc = new DiscoveryNetworkConnector();
-        dnc.setNetworkTTL(1);
-        dnc.setBrokerName("TestBroker");
-        dnc.setName("Broker1Connector");
-        dnc.setDynamicOnly(true);
-
-        SimpleDiscoveryAgent discoveryAgent = new SimpleDiscoveryAgent();
-        String remoteUrl = "tcp://localhost:4500";
-        discoveryAgent.setServices(remoteUrl);
-
-        dnc.setDiscoveryAgent(discoveryAgent);
-
-        broker.addNetworkConnector(dnc);
-        dnc.start();
-    }
-
-    private void startMessageSend() {
-        new Thread(new MessageSend()).start();
-    }
-
-    private class MessageSend implements Runnable {
-        public void run() {
-            try {
-                String url = "vm://TestBroker";
-                ActiveMQConnection connection = ActiveMQConnection.makeConnection(url);
-                connection.setDispatchAsync(true);
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                Destination dest = session.createTopic("TestDestination");
-
-                MessageProducer producer = session.createProducer(dest);
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-                for(int i = 0; i < 99999999; i++)  {
-                    TextMessage message = session.createTextMessage("test" + i);
-
-                    /*
-                    try {
-                        Thread.sleep(1);
-                    } catch (InterruptedException e) {
-                        e.printStackTrace();
-                    }
-                    */
-
-                    try {
-                        producer.send(message);
-                    } catch (Exception e ) {
-                        e.printStackTrace();
-                        System.out.println("TOTAL number of messages sent " + i);
-                        break;
-                    }
-
-                    if (i % 1000 == 0) {
-                        System.out.println("sent message " + message.getJMSMessageID());
-                    }
-                }
-            } catch (JMSException e) {
-                e.printStackTrace();
-            } catch (URISyntaxException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsManager.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsManager.java
deleted file mode 100644
index 059400c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsManager.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * 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.bugs.amq1974;
-import java.io.File;
-import java.net.URISyntaxException;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-import org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent;
-
-public class TryJmsManager {
-
-    private final BrokerService broker = new BrokerService();
-
-    public static void main(String[] args) throws Exception {
-        new TryJmsManager().start();
-    }
-
-    private void start() throws Exception {
-
-        broker.setUseJmx(false);
-        broker.setPersistent(true);
-        broker.setBrokerName("TestBroker");
-        broker.getSystemUsage().setSendFailIfNoSpace(true);
-
-        broker.getSystemUsage().getMemoryUsage().setLimit(10 * 1024 * 1024);
-
-        KahaPersistenceAdapter persist = new KahaPersistenceAdapter();
-        persist.setDirectory(new File("/tmp/broker1"));
-        persist.setMaxDataFileLength(20 * 1024 * 1024);
-        broker.setPersistenceAdapter(persist);
-
-        String brokerUrl = "tcp://localhost:4500";
-        broker.addConnector(brokerUrl);
-
-        broker.start();
-
-        addNetworkBroker();
-
-        startUsageMonitor(broker);
-
-        startMessageConsumer();
-
-        synchronized(this) {
-            this.wait();
-        }
-    }
-
-    private void startUsageMonitor(final BrokerService brokerService) {
-        new Thread(new Runnable() {
-            public void run() {
-                while (true) {
-                    try {
-                        Thread.sleep(10000);
-                    } catch (InterruptedException e) {
-                        e.printStackTrace();
-                    }
-
-                    System.out.println("ActiveMQ memeory " + brokerService.getSystemUsage().getMemoryUsage().getPercentUsage()
-                            + " " + brokerService.getSystemUsage().getMemoryUsage().getUsage());
-                    System.out.println("ActiveMQ message store " + brokerService.getSystemUsage().getStoreUsage().getPercentUsage());
-                    System.out.println("ActiveMQ temp space " + brokerService.getSystemUsage().getTempUsage().getPercentUsage());
-                }
-            }
-        }).start();
-    }
-
-    private void addNetworkBroker() throws Exception {
-        DiscoveryNetworkConnector dnc = new DiscoveryNetworkConnector();
-        dnc.setNetworkTTL(1);
-        dnc.setBrokerName("TestBroker");
-        dnc.setName("Broker1Connector");
-        dnc.setDynamicOnly(true);
-
-        SimpleDiscoveryAgent discoveryAgent = new SimpleDiscoveryAgent();
-        String remoteUrl = "tcp://localhost:4501";
-        discoveryAgent.setServices(remoteUrl);
-
-        dnc.setDiscoveryAgent(discoveryAgent);
-
-        broker.addNetworkConnector(dnc);
-        dnc.start();
-    }
-
-    private void startMessageConsumer() throws JMSException, URISyntaxException {
-        String url = "vm://TestBroker";
-        ActiveMQConnection connection = ActiveMQConnection.makeConnection(url);
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination dest = session.createTopic("TestDestination");
-
-        MessageConsumer consumer = session.createConsumer(dest);
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                try {
-                    System.out.println("got message " + message.getJMSMessageID());
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        );
-
-        connection.start();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/embedded/EmbeddedActiveMQ.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/embedded/EmbeddedActiveMQ.java
deleted file mode 100644
index 3b4f2fd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/embedded/EmbeddedActiveMQ.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.bugs.embedded;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.log4j.Logger;
-
-public class EmbeddedActiveMQ
-{
- 
-        private static Logger logger = Logger.getLogger(EmbeddedActiveMQ.class);
- 
-        public static void main(String[] args)
-        {
- 
-                BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
-                BrokerService brokerService = null;
-                Connection connection = null;
- 
-                logger.info("Start...");
-                try
-                {
-                        brokerService = new BrokerService();
-                        brokerService.setBrokerName("TestMQ");
-                        brokerService.setUseJmx(true);
-                        logger.info("Broker '" + brokerService.getBrokerName() + "' is starting........");
-                        brokerService.start();
-                        ConnectionFactory fac = new ActiveMQConnectionFactory("vm://TestMQ");
-                        connection = fac.createConnection();
-                        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                        Destination queue = session.createQueue("TEST.QUEUE");
-                        MessageProducer producer = session.createProducer(queue);
-                        for (int i = 0; i < 1000;i++) {
-                            Message msg = session.createTextMessage("test"+i);
-                            producer.send(msg);
-                        }
-                        logger.info(ThreadExplorer.show("Active threads after start:"));
-                        System.out.println("Press return to stop........");
-                        String key = br.readLine();
-                }
- 
-                catch (Exception e)
-                {
-                        e.printStackTrace();
-                }
-                finally
-                {
-                        try
-                        {
-                                br.close();
-                                logger.info("Broker '" + brokerService.getBrokerName() + "' is stopping........");
-                                connection.close();
-                                brokerService.stop(); 
-                                sleep(8);
-                                logger.info(ThreadExplorer.show("Active threads after stop:"));
- 
-                        }
-                        catch (Exception e)
-                        {
-                                e.printStackTrace();
-                        }
-                }
- 
-                logger.info("Waiting for list theads is greater then 1 ...");
-                int numTh = ThreadExplorer.active();
- 
-                while (numTh > 2)
-                {
-                        sleep(3);
-                        numTh = ThreadExplorer.active();
-                        logger.info(ThreadExplorer.show("Still active threads:"));
-                }
- 
-                System.out.println("Stop...");
-        }
- 
-        private static void sleep(int second)
-        {
-                try
-                {
-                        logger.info("Waiting for " + second + "s...");
-                        Thread.sleep(second * 1000L);
-                }
-                catch (InterruptedException e)
-                {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
-                }
-        }
- 
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/embedded/ThreadExplorer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/embedded/ThreadExplorer.java
deleted file mode 100644
index eab5fd1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/embedded/ThreadExplorer.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
- * 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.bugs.embedded;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.apache.log4j.Logger;
-
-public class ThreadExplorer
-{
-    static Logger logger = Logger.getLogger(ThreadExplorer.class);
-
-    public static Thread[] listThreads()
-    {
-
-        int nThreads = Thread.activeCount();
-        Thread ret[] = new Thread[nThreads];
-
-        Thread.enumerate(ret);
-
-        return ret;
-
-    }
-
-    /**
-     * Helper function to access a thread per name (ignoring case)
-     * 
-     * @param name
-     * @return
-     */
-    public static Thread fetchThread(String name)
-    {
-        Thread[] threadArray = listThreads();
-        // for (Thread t : threadArray)
-        for (int i = 0; i < threadArray.length; i++)
-        {
-            Thread t = threadArray[i];
-            if (t.getName().equalsIgnoreCase(name))
-                return t;
-        }
-        return null;
-    }
-
-    /**
-     * Allow for killing threads
-     * 
-     * @param threadName
-     * @param isStarredExp
-     *            (regular expressions with *)
-     */
-    @SuppressWarnings("deprecation")
-    public static int kill(String threadName, boolean isStarredExp, String motivation)
-    {
-        String me = "ThreadExplorer.kill: ";
-        if (logger.isDebugEnabled())
-        {
-            logger.debug("Entering " + me + " with " + threadName + " isStarred: " + isStarredExp);
-        }
-        int ret = 0;
-        Pattern mypattern = null;
-        if (isStarredExp)
-        {
-            String realreg = threadName.toLowerCase().replaceAll("\\*", "\\.\\*");
-            mypattern = Pattern.compile(realreg);
-
-        }
-        Thread[] threads = listThreads();
-        for (int i = 0; i < threads.length; i++)
-        {
-            Thread thread = threads[i];
-            if (thread == null)
-                continue;
-            // kill the thread unless it is not current thread
-            boolean matches = false;
-
-            if (isStarredExp)
-            {
-                Matcher matcher = mypattern.matcher(thread.getName().toLowerCase());
-                matches = matcher.matches();
-            }
-            else
-            {
-                matches = (thread.getName().equalsIgnoreCase(threadName));
-            }
-            if (matches && (Thread.currentThread() != thread) && !thread.getName().equals("main"))
-            {
-                if (logger.isInfoEnabled())
-                    logger.info("Killing thread named [" + thread.getName() + "]"); // , removing its uncaught
-                // exception handler to
-                // avoid ThreadDeath
-                // exception tracing
-                // "+motivation );
-
-                ret++;
-
-                // PK leaving uncaught exception handler otherwise master push
-                // cannot recover from this error
-                // thread.setUncaughtExceptionHandler(null);
-                try
-                {
-                    thread.stop();
-                }
-                catch (ThreadDeath e)
-                {
-                    logger.warn("Thread already death.", e);
-                }
-
-            }
-        }
-        return ret;
-    }
-
-    public static String show(String title)
-    {
-        StringBuffer out = new StringBuffer();
-        Thread[] threadArray = ThreadExplorer.listThreads();
-
-        out.append(title + "\n");
-        for (int i = 0; i < threadArray.length; i++)
-        {
-            Thread thread = threadArray[i];
-
-            if (thread != null)
-            {
-                out.append("* [" + thread.getName() + "] " + (thread.isDaemon() ? "(Daemon)" : "")
-                        + " Group: " + thread.getThreadGroup().getName() + "\n");
-            }
-            else
-            {
-                out.append("* ThreadDeath: " + thread + "\n");
-            }
-
-        }
-        return out.toString();
-    }
-
-    public static int active()
-    {
-        int count = 0;
-        Thread[] threadArray = ThreadExplorer.listThreads();
-
-        for (int i = 0; i < threadArray.length; i++)
-        {
-            Thread thread = threadArray[i];
-            if (thread != null)
-            {
-                count++;
-            }
-        }
-
-        return count;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java
deleted file mode 100755
index 0219815..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java
+++ /dev/null
@@ -1,488 +0,0 @@
-/**
- * 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.command;
-
-import javax.jms.JMSException;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotReadableException;
-import javax.jms.MessageNotWriteableException;
-
-import junit.framework.TestCase;
-
-/**
- * 
- */
-public class ActiveMQBytesMessageTest extends TestCase {
-
-    public ActiveMQBytesMessageTest(String name) {
-        super(name);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ActiveMQBytesMessageTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testGetDataStructureType() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        assertEquals(msg.getDataStructureType(), CommandTypes.ACTIVEMQ_BYTES_MESSAGE);
-    }
-
-    public void testGetBodyLength() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        int len = 10;
-        try {
-            for (int i = 0; i < len; i++) {
-                msg.writeLong(5L);
-            }
-        } catch (JMSException ex) {
-            ex.printStackTrace();
-        }
-        try {
-            msg.reset();
-            assertTrue(msg.getBodyLength() == (len * 8));
-        } catch (Throwable e) {
-            e.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadBoolean() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeBoolean(true);
-            msg.reset();
-            assertTrue(msg.readBoolean());
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadByte() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeByte((byte) 2);
-            msg.reset();
-            assertTrue(msg.readByte() == 2);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadUnsignedByte() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeByte((byte) 2);
-            msg.reset();
-            assertTrue(msg.readUnsignedByte() == 2);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadShort() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeShort((short) 3000);
-            msg.reset();
-            assertTrue(msg.readShort() == 3000);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadUnsignedShort() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeShort((short) 3000);
-            msg.reset();
-            assertTrue(msg.readUnsignedShort() == 3000);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadChar() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeChar('a');
-            msg.reset();
-            assertTrue(msg.readChar() == 'a');
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadInt() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeInt(3000);
-            msg.reset();
-            assertTrue(msg.readInt() == 3000);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadLong() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeLong(3000);
-            msg.reset();
-            assertTrue(msg.readLong() == 3000);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadFloat() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeFloat(3.3f);
-            msg.reset();
-            assertTrue(msg.readFloat() == 3.3f);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadDouble() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeDouble(3.3d);
-            msg.reset();
-            assertTrue(msg.readDouble() == 3.3d);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadUTF() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            String str = "this is a test";
-            msg.writeUTF(str);
-            msg.reset();
-            assertTrue(msg.readUTF().equals(str));
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    /*
-     * Class to test for int readBytes(byte[])
-     */
-    public void testReadBytesbyteArray() {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            byte[] data = new byte[50];
-            for (int i = 0; i < data.length; i++) {
-                data[i] = (byte) i;
-            }
-            msg.writeBytes(data);
-            msg.reset();
-            byte[] test = new byte[data.length];
-            msg.readBytes(test);
-            for (int i = 0; i < test.length; i++) {
-                assertTrue(test[i] == i);
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testWriteObject() throws JMSException {
-        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
-        try {
-            msg.writeObject("fred");
-            msg.writeObject(Boolean.TRUE);
-            msg.writeObject(Character.valueOf('q'));
-            msg.writeObject(Byte.valueOf((byte) 1));
-            msg.writeObject(Short.valueOf((short) 3));
-            msg.writeObject(Integer.valueOf(3));
-            msg.writeObject(Long.valueOf(300L));
-            msg.writeObject(new Float(3.3f));
-            msg.writeObject(new Double(3.3));
-            msg.writeObject(new byte[3]);
-        } catch (MessageFormatException mfe) {
-            fail("objectified primitives should be allowed");
-        }
-        try {
-            msg.writeObject(new Object());
-            fail("only objectified primitives are allowed");
-        } catch (MessageFormatException mfe) {
-        }
-    }
-
-
-    /* new */
-    public void testClearBody() throws JMSException {
-        ActiveMQBytesMessage bytesMessage = new ActiveMQBytesMessage();
-        try {
-            bytesMessage.writeInt(1);
-            bytesMessage.clearBody();
-            assertFalse(bytesMessage.isReadOnlyBody());
-            bytesMessage.writeInt(1);
-            bytesMessage.readInt();
-        } catch (MessageNotReadableException mnwe) {
-        } catch (MessageNotWriteableException mnwe) {
-            assertTrue(false);
-        }
-    }
-
-    public void testReset() throws JMSException {
-        ActiveMQBytesMessage message = new ActiveMQBytesMessage();
-        try {
-            message.writeDouble(24.5);
-            message.writeLong(311);
-        } catch (MessageNotWriteableException mnwe) {
-            fail("should be writeable");
-        }
-        message.reset();
-        try {
-            assertTrue(message.isReadOnlyBody());
-            assertEquals(message.readDouble(), 24.5, 0);
-            assertEquals(message.readLong(), 311);
-        } catch (MessageNotReadableException mnre) {
-            fail("should be readable");
-        }
-        try {
-            message.writeInt(33);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-
-    public void testReadOnlyBody() throws JMSException {
-        ActiveMQBytesMessage message = new ActiveMQBytesMessage();
-        try {
-            message.writeBoolean(true);
-            message.writeByte((byte) 1);
-            message.writeByte((byte) 1);
-            message.writeBytes(new byte[1]);
-            message.writeBytes(new byte[3], 0, 2);
-            message.writeChar('a');
-            message.writeDouble(1.5);
-            message.writeFloat((float) 1.5);
-            message.writeInt(1);
-            message.writeLong(1);
-            message.writeObject("stringobj");
-            message.writeShort((short) 1);
-            message.writeShort((short) 1);
-            message.writeUTF("utfstring");
-        } catch (MessageNotWriteableException mnwe) {
-            fail("Should be writeable");
-        }
-        message.reset();
-        try {
-            message.readBoolean();
-            message.readByte();
-            message.readUnsignedByte();
-            message.readBytes(new byte[1]);
-            message.readBytes(new byte[2], 2);
-            message.readChar();
-            message.readDouble();
-            message.readFloat();
-            message.readInt();
-            message.readLong();
-            message.readUTF();
-            message.readShort();
-            message.readUnsignedShort();
-            message.readUTF();
-        } catch (MessageNotReadableException mnwe) {
-            fail("Should be readable");
-        }
-        try {
-            message.writeBoolean(true);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeByte((byte) 1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeBytes(new byte[1]);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeBytes(new byte[3], 0, 2);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeChar('a');
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeDouble(1.5);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeFloat((float) 1.5);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeInt(1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeLong(1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeObject("stringobj");
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeShort((short) 1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeUTF("utfstring");
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-
-    public void testWriteOnlyBody() throws JMSException {
-        ActiveMQBytesMessage message = new ActiveMQBytesMessage();
-        message.clearBody();
-        try {
-            message.writeBoolean(true);
-            message.writeByte((byte) 1);
-            message.writeByte((byte) 1);
-            message.writeBytes(new byte[1]);
-            message.writeBytes(new byte[3], 0, 2);
-            message.writeChar('a');
-            message.writeDouble(1.5);
-            message.writeFloat((float) 1.5);
-            message.writeInt(1);
-            message.writeLong(1);
-            message.writeObject("stringobj");
-            message.writeShort((short) 1);
-            message.writeShort((short) 1);
-            message.writeUTF("utfstring");
-        } catch (MessageNotWriteableException mnwe) {
-            fail("Should be writeable");
-        }
-        try {
-            message.readBoolean();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException mnwe) {
-        }
-        try {
-            message.readByte();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readUnsignedByte();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readBytes(new byte[1]);
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readBytes(new byte[2], 2);
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readChar();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readDouble();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readFloat();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readInt();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readLong();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readUTF();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readShort();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readUnsignedShort();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readUTF();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java
deleted file mode 100755
index 2ed668f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.Topic;
-
-import junit.framework.Test;
-
-public class ActiveMQDestinationTest extends DataStructureTestSupport {
-
-    public ActiveMQDestination destination;
-
-    public void initCombosForTestDesintaionMarshaling() {
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"),
-                                                          new ActiveMQTopic("TEST"),
-                                                          new ActiveMQTempQueue("TEST:1"),
-                                                          new ActiveMQTempTopic("TEST:1"),
-                                                          new ActiveMQTempQueue("TEST"),
-                                                          new ActiveMQTempTopic("TEST"),
-                                                          new ActiveMQQueue("TEST?option=value"),
-                                                          new ActiveMQTopic("TEST?option=value"),
-                                                          new ActiveMQTempQueue("TEST:1?option=value"),
-                                                          new ActiveMQTempTopic("TEST:1?option=value")});
-    }
-
-    public void testDesintaionMarshaling() throws IOException {
-        assertBeanMarshalls(destination);
-    }
-
-    public void initCombosForTestDesintaionOptions() {
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST?k1=v1&k2=v2"),
-                                                          new ActiveMQTopic("TEST?k1=v1&k2=v2"),
-                                                          new ActiveMQTempQueue("TEST:1?k1=v1&k2=v2"),
-                                                          new ActiveMQTempTopic("TEST:1?k1=v1&k2=v2")});
-    }
-
-    public void testDesintaionOptions() throws IOException {
-        Map options = destination.getOptions();
-        assertNotNull(options);
-        assertEquals("v1", options.get("k1"));
-        assertEquals("v2", options.get("k2"));
-    }
-
-    public void testSorting() throws Exception {
-        SortedSet<ActiveMQDestination> set = new TreeSet<ActiveMQDestination>();
-        ActiveMQDestination[] destinations = {new ActiveMQQueue("A"), new ActiveMQQueue("B"),
-                                              new ActiveMQTopic("A"), new ActiveMQTopic("B")};
-        List<ActiveMQDestination> expected = Arrays.asList(destinations);
-        set.addAll(expected);
-        List<ActiveMQDestination> actual = new ArrayList<ActiveMQDestination>(set);
-        assertEquals("Sorted order", expected, actual);
-    }
-
-    // https://issues.apache.org/activemq/browse/AMQ-2630
-    class CombyDest implements Queue, Topic, TemporaryQueue, TemporaryTopic {
-
-        private final String qName;
-        private final String topicName;
-
-        public CombyDest(String qName, String topicName) {
-            this.qName = qName;
-            this.topicName = topicName;
-        }
-        
-        public void delete() throws JMSException {
-        }
-
-        public String getTopicName() throws JMSException {
-            return topicName;
-        }
-
-        public String getQueueName() throws JMSException {
-            return qName;
-        }    
-    }
-    
-    public void testTransformPollymorphic() throws Exception {
-        ActiveMQQueue queue = new ActiveMQQueue("TEST");
-        assertEquals(ActiveMQDestination.transform(queue), queue);
-        assertTrue("is a q", ActiveMQDestination.transform(new CombyDest(null, "Topic")) instanceof ActiveMQTopic);
-        assertTrue("is a q", ActiveMQDestination.transform(new CombyDest("Q", null)) instanceof ActiveMQQueue);
-        try {
-            ActiveMQDestination.transform(new CombyDest(null, null));
-            fail("expect ex as cannot disambiguate");
-        } catch (JMSException expected) { 
-        } 
-        try {
-            ActiveMQDestination.transform(new CombyDest("Q", "T"));
-            fail("expect ex as cannot disambiguate");
-        } catch (JMSException expected) { 
-        }
-    }
-    
-    public static Test suite() {
-        return suite(ActiveMQDestinationTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java
deleted file mode 100755
index 5b82b29..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java
+++ /dev/null
@@ -1,492 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-
-import javax.jms.JMSException;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotReadableException;
-import javax.jms.MessageNotWriteableException;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ActiveMQMapMessageTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQMapMessageTest.class);
-
-    private String name = "testName";
-
-    /**
-     * Constructor for ActiveMQMapMessageTest.
-     * 
-     * @param name
-     */
-    public ActiveMQMapMessageTest(String name) {
-        super(name);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ActiveMQMapMessageTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testBytesConversion() throws JMSException, IOException {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        msg.setBoolean("boolean", true);
-        msg.setByte("byte", (byte)1);
-        msg.setBytes("bytes", new byte[1]);
-        msg.setChar("char", 'a');
-        msg.setDouble("double", 1.5);
-        msg.setFloat("float", 1.5f);
-        msg.setInt("int", 1);
-        msg.setLong("long", 1);
-        msg.setObject("object", "stringObj");
-        msg.setShort("short", (short)1);
-        msg.setString("string", "string");
-
-        // Test with a 1Meg String
-        StringBuffer bigSB = new StringBuffer(1024 * 1024);
-        for (int i = 0; i < 1024 * 1024; i++) {
-            bigSB.append((char)'a' + i % 26);
-        }
-        String bigString = bigSB.toString();
-
-        msg.setString("bigString", bigString);
-
-        msg = (ActiveMQMapMessage)msg.copy();
-
-        assertEquals(msg.getBoolean("boolean"), true);
-        assertEquals(msg.getByte("byte"), (byte)1);
-        assertEquals(msg.getBytes("bytes").length, 1);
-        assertEquals(msg.getChar("char"), 'a');
-        assertEquals(msg.getDouble("double"), 1.5, 0);
-        assertEquals(msg.getFloat("float"), 1.5f, 0);
-        assertEquals(msg.getInt("int"), 1);
-        assertEquals(msg.getLong("long"), 1);
-        assertEquals(msg.getObject("object"), "stringObj");
-        assertEquals(msg.getShort("short"), (short)1);
-        assertEquals(msg.getString("string"), "string");
-        assertEquals(msg.getString("bigString"), bigString);
-    }
-
-    public void testGetBoolean() throws JMSException {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        msg.setBoolean(name, true);
-        msg.setReadOnlyBody(true);
-        assertTrue(msg.getBoolean(name));
-        msg.clearBody();
-        msg.setString(name, "true");
-
-        msg = (ActiveMQMapMessage)msg.copy();
-
-        assertTrue(msg.getBoolean(name));
-    }
-
-    public void testGetByte() throws JMSException {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        msg.setByte(this.name, (byte)1);
-        msg = (ActiveMQMapMessage)msg.copy();
-        assertTrue(msg.getByte(this.name) == (byte)1);
-    }
-
-    public void testGetShort() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            msg.setShort(this.name, (short)1);
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertTrue(msg.getShort(this.name) == (short)1);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetChar() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            msg.setChar(this.name, 'a');
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertTrue(msg.getChar(this.name) == 'a');
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetInt() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            msg.setInt(this.name, 1);
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertTrue(msg.getInt(this.name) == 1);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetLong() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            msg.setLong(this.name, 1);
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertTrue(msg.getLong(this.name) == 1);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetFloat() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            msg.setFloat(this.name, 1.5f);
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertTrue(msg.getFloat(this.name) == 1.5f);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetDouble() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            msg.setDouble(this.name, 1.5);
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertTrue(msg.getDouble(this.name) == 1.5);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetString() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            String str = "test";
-            msg.setString(this.name, str);
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertEquals(msg.getString(this.name), str);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetBytes() {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        try {
-            byte[] bytes1 = new byte[3];
-            byte[] bytes2 = new byte[2];
-            System.arraycopy(bytes1, 0, bytes2, 0, 2);
-            msg.setBytes(this.name, bytes1);
-            msg.setBytes(this.name + "2", bytes1, 0, 2);
-            msg = (ActiveMQMapMessage)msg.copy();
-            assertTrue(Arrays.equals(msg.getBytes(this.name), bytes1));
-            assertEquals(msg.getBytes(this.name + "2").length, bytes2.length);
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testGetObject() throws JMSException {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        Boolean booleanValue = Boolean.TRUE;
-        Byte byteValue = Byte.valueOf("1");
-        byte[] bytesValue = new byte[3];
-        Character charValue = new Character('a');
-        Double doubleValue = Double.valueOf("1.5");
-        Float floatValue = Float.valueOf("1.5");
-        Integer intValue = Integer.valueOf("1");
-        Long longValue = Long.valueOf("1");
-        Short shortValue = Short.valueOf("1");
-        String stringValue = "string";
-
-        try {
-            msg.setObject("boolean", booleanValue);
-            msg.setObject("byte", byteValue);
-            msg.setObject("bytes", bytesValue);
-            msg.setObject("char", charValue);
-            msg.setObject("double", doubleValue);
-            msg.setObject("float", floatValue);
-            msg.setObject("int", intValue);
-            msg.setObject("long", longValue);
-            msg.setObject("short", shortValue);
-            msg.setObject("string", stringValue);
-        } catch (MessageFormatException mfe) {
-            LOG.warn("Caught: " + mfe);
-            mfe.printStackTrace();
-            fail("object formats should be correct");
-        }
-
-        msg = (ActiveMQMapMessage)msg.copy();
-
-        assertTrue(msg.getObject("boolean") instanceof Boolean);
-        assertEquals(msg.getObject("boolean"), booleanValue);
-        assertEquals(msg.getBoolean("boolean"), booleanValue.booleanValue());
-        assertTrue(msg.getObject("byte") instanceof Byte);
-        assertEquals(msg.getObject("byte"), byteValue);
-        assertEquals(msg.getByte("byte"), byteValue.byteValue());
-        assertTrue(msg.getObject("bytes") instanceof byte[]);
-        assertEquals(((byte[])msg.getObject("bytes")).length, bytesValue.length);
-        assertEquals(msg.getBytes("bytes").length, bytesValue.length);
-        assertTrue(msg.getObject("char") instanceof Character);
-        assertEquals(msg.getObject("char"), charValue);
-        assertEquals(msg.getChar("char"), charValue.charValue());
-        assertTrue(msg.getObject("double") instanceof Double);
-        assertEquals(msg.getObject("double"), doubleValue);
-        assertEquals(msg.getDouble("double"), doubleValue.doubleValue(), 0);
-        assertTrue(msg.getObject("float") instanceof Float);
-        assertEquals(msg.getObject("float"), floatValue);
-        assertEquals(msg.getFloat("float"), floatValue.floatValue(), 0);
-        assertTrue(msg.getObject("int") instanceof Integer);
-        assertEquals(msg.getObject("int"), intValue);
-        assertEquals(msg.getInt("int"), intValue.intValue());
-        assertTrue(msg.getObject("long") instanceof Long);
-        assertEquals(msg.getObject("long"), longValue);
-        assertEquals(msg.getLong("long"), longValue.longValue());
-        assertTrue(msg.getObject("short") instanceof Short);
-        assertEquals(msg.getObject("short"), shortValue);
-        assertEquals(msg.getShort("short"), shortValue.shortValue());
-        assertTrue(msg.getObject("string") instanceof String);
-        assertEquals(msg.getObject("string"), stringValue);
-        assertEquals(msg.getString("string"), stringValue);
-
-        msg.clearBody();
-        try {
-            msg.setObject("object", new Object());
-            fail("should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-
-    }
-
-    public void testGetMapNames() throws JMSException {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        msg.setBoolean("boolean", true);
-        msg.setByte("byte", (byte)1);
-        msg.setBytes("bytes1", new byte[1]);
-        msg.setBytes("bytes2", new byte[3], 0, 2);
-        msg.setChar("char", 'a');
-        msg.setDouble("double", 1.5);
-        msg.setFloat("float", 1.5f);
-        msg.setInt("int", 1);
-        msg.setLong("long", 1);
-        msg.setObject("object", "stringObj");
-        msg.setShort("short", (short)1);
-        msg.setString("string", "string");
-
-        msg = (ActiveMQMapMessage)msg.copy();
-
-        Enumeration<String> mapNamesEnum = msg.getMapNames();
-        List<String> mapNamesList = Collections.list(mapNamesEnum);
-
-        assertEquals(mapNamesList.size(), 12);
-        assertTrue(mapNamesList.contains("boolean"));
-        assertTrue(mapNamesList.contains("byte"));
-        assertTrue(mapNamesList.contains("bytes1"));
-        assertTrue(mapNamesList.contains("bytes2"));
-        assertTrue(mapNamesList.contains("char"));
-        assertTrue(mapNamesList.contains("double"));
-        assertTrue(mapNamesList.contains("float"));
-        assertTrue(mapNamesList.contains("int"));
-        assertTrue(mapNamesList.contains("long"));
-        assertTrue(mapNamesList.contains("object"));
-        assertTrue(mapNamesList.contains("short"));
-        assertTrue(mapNamesList.contains("string"));
-    }
-
-    public void testItemExists() throws JMSException {
-        ActiveMQMapMessage mapMessage = new ActiveMQMapMessage();
-
-        mapMessage.setString("exists", "test");
-
-        mapMessage = (ActiveMQMapMessage)mapMessage.copy();
-
-        assertTrue(mapMessage.itemExists("exists"));
-        assertFalse(mapMessage.itemExists("doesntExist"));
-    }
-
-    public void testClearBody() throws JMSException {
-        ActiveMQMapMessage mapMessage = new ActiveMQMapMessage();
-        mapMessage.setString("String", "String");
-        mapMessage.clearBody();
-        assertFalse(mapMessage.isReadOnlyBody());
-
-        mapMessage.onSend();
-        mapMessage.setContent(mapMessage.getContent());
-        assertNull(mapMessage.getString("String"));
-        mapMessage.clearBody();
-        mapMessage.setString("String", "String");
-
-        mapMessage = (ActiveMQMapMessage)mapMessage.copy();
-
-        mapMessage.getString("String");
-    }
-
-    public void testReadOnlyBody() throws JMSException {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        msg.setBoolean("boolean", true);
-        msg.setByte("byte", (byte)1);
-        msg.setBytes("bytes", new byte[1]);
-        msg.setBytes("bytes2", new byte[3], 0, 2);
-        msg.setChar("char", 'a');
-        msg.setDouble("double", 1.5);
-        msg.setFloat("float", 1.5f);
-        msg.setInt("int", 1);
-        msg.setLong("long", 1);
-        msg.setObject("object", "stringObj");
-        msg.setShort("short", (short)1);
-        msg.setString("string", "string");
-
-        msg.setReadOnlyBody(true);
-
-        try {
-            msg.getBoolean("boolean");
-            msg.getByte("byte");
-            msg.getBytes("bytes");
-            msg.getChar("char");
-            msg.getDouble("double");
-            msg.getFloat("float");
-            msg.getInt("int");
-            msg.getLong("long");
-            msg.getObject("object");
-            msg.getShort("short");
-            msg.getString("string");
-        } catch (MessageNotReadableException mnre) {
-            fail("should be readable");
-        }
-        try {
-            msg.setBoolean("boolean", true);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setByte("byte", (byte)1);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setBytes("bytes", new byte[1]);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setBytes("bytes2", new byte[3], 0, 2);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setChar("char", 'a');
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setDouble("double", 1.5);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setFloat("float", 1.5f);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setInt("int", 1);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setLong("long", 1);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setObject("object", "stringObj");
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setShort("short", (short)1);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            msg.setString("string", "string");
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-
-    public void testWriteOnlyBody() throws JMSException {
-        ActiveMQMapMessage msg = new ActiveMQMapMessage();
-        msg.setReadOnlyBody(false);
-
-        msg.setBoolean("boolean", true);
-        msg.setByte("byte", (byte)1);
-        msg.setBytes("bytes", new byte[1]);
-        msg.setBytes("bytes2", new byte[3], 0, 2);
-        msg.setChar("char", 'a');
-        msg.setDouble("double", 1.5);
-        msg.setFloat("float", 1.5f);
-        msg.setInt("int", 1);
-        msg.setLong("long", 1);
-        msg.setObject("object", "stringObj");
-        msg.setShort("short", (short)1);
-        msg.setString("string", "string");
-
-        msg.setReadOnlyBody(true);
-
-        msg.getBoolean("boolean");
-        msg.getByte("byte");
-        msg.getBytes("bytes");
-        msg.getChar("char");
-        msg.getDouble("double");
-        msg.getFloat("float");
-        msg.getInt("int");
-        msg.getLong("long");
-        msg.getObject("object");
-        msg.getShort("short");
-        msg.getString("string");
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
deleted file mode 100755
index 62c9744..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
+++ /dev/null
@@ -1,946 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Map;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotWriteableException;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.state.CommandVisitor;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ActiveMQMessageTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQMessageTest.class);
-
-    protected boolean readOnlyMessage;
-
-    private String jmsMessageID;
-    private String jmsCorrelationID;
-    private ActiveMQDestination jmsDestination;
-    private ActiveMQDestination jmsReplyTo;
-    private int jmsDeliveryMode;
-    private boolean jmsRedelivered;
-    private String jmsType;
-    private long jmsExpiration;
-    private int jmsPriority;
-    private long jmsTimestamp;
-    private long[] consumerIDs;
-    
-    /**
-     * Constructor for ActiveMQMessageTest.
-     * 
-     * @param name
-     */
-    public ActiveMQMessageTest(String name) {
-        super(name);
-    }
-
-    public static void main(String[] args) {
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        this.jmsMessageID = "testid";
-        this.jmsCorrelationID = "testcorrelationid";
-        this.jmsDestination = new ActiveMQTopic("test.topic");
-        this.jmsReplyTo = new ActiveMQTempTopic("test.replyto.topic:001");
-        this.jmsDeliveryMode = Message.DEFAULT_DELIVERY_MODE;
-        this.jmsRedelivered = true;
-        this.jmsType = "test type";
-        this.jmsExpiration = 100000;
-        this.jmsPriority = 5;
-        this.jmsTimestamp = System.currentTimeMillis();
-        this.readOnlyMessage = false;
-        this.consumerIDs = new long[3];
-        for (int i = 0; i < this.consumerIDs.length; i++) {
-            this.consumerIDs[i] = i;
-        }
-
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testGetDataStructureType() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        assertEquals(msg.getDataStructureType(), CommandTypes.ACTIVEMQ_MESSAGE);
-    }
-
-    public void testHashCode() throws Exception {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSMessageID(this.jmsMessageID);
-        assertTrue(msg.hashCode() == jmsMessageID.hashCode());
-    }
-
-    public void testSetReadOnly() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setReadOnlyProperties(true);
-        boolean test = false;
-        try {
-            msg.setIntProperty("test", 1);
-        } catch (MessageNotWriteableException me) {
-            test = true;
-        } catch (JMSException e) {
-            e.printStackTrace(System.err);
-            test = false;
-        }
-        assertTrue(test);
-    }
-
-    public void testSetToForeignJMSID() throws Exception {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSMessageID("ID:EMS-SERVER.8B443C380083:429");
-
-    }
-
-    /*
-     * Class to test for boolean equals(Object)
-     */
-    public void testEqualsObject() throws Exception {
-        ActiveMQMessage msg1 = new ActiveMQMessage();
-        ActiveMQMessage msg2 = new ActiveMQMessage();
-        msg1.setJMSMessageID(this.jmsMessageID);
-        assertTrue(!msg1.equals(msg2));
-        msg2.setJMSMessageID(this.jmsMessageID);
-        assertTrue(msg1.equals(msg2));
-    }
-
-    public void testShallowCopy() throws Exception {
-        ActiveMQMessage msg1 = new ActiveMQMessage();
-        msg1.setJMSMessageID(jmsMessageID);
-        ActiveMQMessage msg2 = (ActiveMQMessage)msg1.copy();
-        assertTrue(msg1 != msg2 && msg1.equals(msg2));
-    }
-
-    public void testCopy() throws Exception {
-        this.jmsMessageID = "testid";
-        this.jmsCorrelationID = "testcorrelationid";
-        this.jmsDestination = new ActiveMQTopic("test.topic");
-        this.jmsReplyTo = new ActiveMQTempTopic("test.replyto.topic:001");
-        this.jmsDeliveryMode = Message.DEFAULT_DELIVERY_MODE;
-        this.jmsRedelivered = true;
-        this.jmsType = "test type";
-        this.jmsExpiration = 100000;
-        this.jmsPriority = 5;
-        this.jmsTimestamp = System.currentTimeMillis();
-        this.readOnlyMessage = false;
-
-        ActiveMQMessage msg1 = new ActiveMQMessage();
-        msg1.setJMSMessageID(this.jmsMessageID);
-        msg1.setJMSCorrelationID(this.jmsCorrelationID);
-        msg1.setJMSDestination(this.jmsDestination);
-        msg1.setJMSReplyTo(this.jmsReplyTo);
-        msg1.setJMSDeliveryMode(this.jmsDeliveryMode);
-        msg1.setJMSRedelivered(this.jmsRedelivered);
-        msg1.setJMSType(this.jmsType);
-        msg1.setJMSExpiration(this.jmsExpiration);
-        msg1.setJMSPriority(this.jmsPriority);
-        msg1.setJMSTimestamp(this.jmsTimestamp);
-        msg1.setReadOnlyProperties(true);
-        ActiveMQMessage msg2 = new ActiveMQMessage();
-        msg1.copy(msg2);
-        assertTrue(msg1.getJMSMessageID().equals(msg2.getJMSMessageID()));
-        assertTrue(msg1.getJMSCorrelationID().equals(msg2.getJMSCorrelationID()));
-        assertTrue(msg1.getJMSDestination().equals(msg2.getJMSDestination()));
-        assertTrue(msg1.getJMSReplyTo().equals(msg2.getJMSReplyTo()));
-        assertTrue(msg1.getJMSDeliveryMode() == msg2.getJMSDeliveryMode());
-        assertTrue(msg1.getJMSRedelivered() == msg2.getJMSRedelivered());
-        assertTrue(msg1.getJMSType().equals(msg2.getJMSType()));
-        assertTrue(msg1.getJMSExpiration() == msg2.getJMSExpiration());
-        assertTrue(msg1.getJMSPriority() == msg2.getJMSPriority());
-        assertTrue(msg1.getJMSTimestamp() == msg2.getJMSTimestamp());
-
-        LOG.info("Message is:  " + msg1);
-    }
-
-    public void testGetAndSetJMSMessageID() throws Exception {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSMessageID(this.jmsMessageID);
-        assertEquals(msg.getJMSMessageID(), this.jmsMessageID);
-    }
-
-    public void testGetAndSetJMSTimestamp() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSTimestamp(this.jmsTimestamp);
-        assertTrue(msg.getJMSTimestamp() == this.jmsTimestamp);
-    }
-
-    public void testGetJMSCorrelationIDAsBytes() throws Exception {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSCorrelationID(this.jmsCorrelationID);
-        byte[] testbytes = msg.getJMSCorrelationIDAsBytes();
-        String str2 = new String(testbytes);
-        assertTrue(this.jmsCorrelationID.equals(str2));
-    }
-
-    public void testSetJMSCorrelationIDAsBytes() throws Exception {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        byte[] testbytes = this.jmsCorrelationID.getBytes();
-        msg.setJMSCorrelationIDAsBytes(testbytes);
-        testbytes = msg.getJMSCorrelationIDAsBytes();
-        String str2 = new String(testbytes);
-        assertTrue(this.jmsCorrelationID.equals(str2));
-    }
-
-    public void testGetAndSetJMSCorrelationID() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSCorrelationID(this.jmsCorrelationID);
-        assertTrue(msg.getJMSCorrelationID().equals(this.jmsCorrelationID));
-    }
-
-    public void testGetAndSetJMSReplyTo() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSReplyTo(this.jmsReplyTo);
-        assertTrue(msg.getJMSReplyTo().equals(this.jmsReplyTo));
-    }
-
-    public void testGetAndSetJMSDestination() throws Exception {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSDestination(this.jmsDestination);
-        assertTrue(msg.getJMSDestination().equals(this.jmsDestination));
-    }
-
-    public void testGetAndSetJMSDeliveryMode() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSDeliveryMode(this.jmsDeliveryMode);
-        assertTrue(msg.getJMSDeliveryMode() == this.jmsDeliveryMode);
-    }
-
-    public void testGetAndSetMSRedelivered() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSRedelivered(this.jmsRedelivered);
-        assertTrue(msg.getJMSRedelivered() == this.jmsRedelivered);
-    }
-
-    public void testGetAndSetJMSType() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSType(this.jmsType);
-        assertTrue(msg.getJMSType().equals(this.jmsType));
-    }
-
-    public void testGetAndSetJMSExpiration() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSExpiration(this.jmsExpiration);
-        assertTrue(msg.getJMSExpiration() == this.jmsExpiration);
-    }
-
-    public void testGetAndSetJMSPriority() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSPriority(this.jmsPriority);
-        assertTrue(msg.getJMSPriority() == this.jmsPriority);
-
-        msg.setJMSPriority(-90);
-        assertEquals(0, msg.getJMSPriority());
-
-        msg.setJMSPriority(90);
-        assertEquals(9, msg.getJMSPriority());                
-    }
-
-    public void testClearProperties() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setStringProperty("test", "test");
-        msg.setContent(new ByteSequence(new byte[1], 0, 0));
-        msg.setJMSMessageID(this.jmsMessageID);
-        msg.clearProperties();
-        assertNull(msg.getStringProperty("test"));
-        assertNotNull(msg.getJMSMessageID());
-        assertNotNull(msg.getContent());
-    }
-
-    public void testPropertyExists() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setStringProperty("test", "test");
-        assertTrue(msg.propertyExists("test"));
-
-        msg.setIntProperty("JMSXDeliveryCount", 1);
-        assertTrue(msg.propertyExists("JMSXDeliveryCount"));
-    }
-
-    public void testGetBooleanProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "booleanProperty";
-        msg.setBooleanProperty(name, true);
-        assertTrue(msg.getBooleanProperty(name));
-    }
-
-    public void testGetByteProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "byteProperty";
-        msg.setByteProperty(name, (byte)1);
-        assertTrue(msg.getByteProperty(name) == 1);
-    }
-
-    public void testGetShortProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "shortProperty";
-        msg.setShortProperty(name, (short)1);
-        assertTrue(msg.getShortProperty(name) == 1);
-    }
-
-    public void testGetIntProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "intProperty";
-        msg.setIntProperty(name, 1);
-        assertTrue(msg.getIntProperty(name) == 1);
-    }
-
-    public void testGetLongProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "longProperty";
-        msg.setLongProperty(name, 1);
-        assertTrue(msg.getLongProperty(name) == 1);
-    }
-
-    public void testGetFloatProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "floatProperty";
-        msg.setFloatProperty(name, 1.3f);
-        assertTrue(msg.getFloatProperty(name) == 1.3f);
-    }
-
-    public void testGetDoubleProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "doubleProperty";
-        msg.setDoubleProperty(name, 1.3d);
-        assertTrue(msg.getDoubleProperty(name) == 1.3);
-    }
-
-    public void testGetStringProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "stringProperty";
-        msg.setStringProperty(name, name);
-        assertTrue(msg.getStringProperty(name).equals(name));
-    }
-
-    public void testGetObjectProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "floatProperty";
-        msg.setFloatProperty(name, 1.3f);
-        assertTrue(msg.getObjectProperty(name) instanceof Float);
-        assertTrue(((Float)msg.getObjectProperty(name)).floatValue() == 1.3f);
-    }
-
-    public void testGetPropertyNames() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name1 = "floatProperty";
-        msg.setFloatProperty(name1, 1.3f);
-        String name2 = "JMSXDeliveryCount";
-        msg.setIntProperty(name2, 1);
-        String name3 = "JMSRedelivered";
-        msg.setBooleanProperty(name3, false);
-        boolean found1 = false;
-        boolean found2 = false;
-        boolean found3 = false;
-        for (Enumeration iter = msg.getPropertyNames(); iter.hasMoreElements();) {
-            Object element = iter.nextElement();
-            found1 |= element.equals(name1);
-            found2 |= element.equals(name2);
-            found3 |= element.equals(name3);
-        }
-        assertTrue("prop name1 found", found1);
-        // spec compliance, only non JMS (and JMSX) props returned
-        assertFalse("prop name2 not found", found2);
-        assertFalse("prop name4 not found", found3);
-    }
-
-    public void testGetAllPropertyNames() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name1 = "floatProperty";
-        msg.setFloatProperty(name1, 1.3f);
-        String name2 = "JMSXDeliveryCount";
-        msg.setIntProperty(name2, 1);
-        String name3 = "JMSRedelivered";
-        msg.setBooleanProperty(name3, false);
-        boolean found1 = false;
-        boolean found2 = false;
-        boolean found3 = false;
-        for (Enumeration iter = msg.getAllPropertyNames(); iter.hasMoreElements();) {
-            Object element = iter.nextElement();
-            found1 |= element.equals(name1);
-            found2 |= element.equals(name2);
-            found3 |= element.equals(name3);
-        }
-        assertTrue("prop name1 found", found1);
-        assertTrue("prop name2 found", found2);
-        assertTrue("prop name4 found", found3);
-    }
-
-    public void testSetObjectProperty() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String name = "property";
-
-        try {
-            msg.setObjectProperty(name, "string");
-            msg.setObjectProperty(name, Byte.valueOf("1"));
-            msg.setObjectProperty(name, Short.valueOf("1"));
-            msg.setObjectProperty(name, Integer.valueOf("1"));
-            msg.setObjectProperty(name, Long.valueOf("1"));
-            msg.setObjectProperty(name, Float.valueOf("1.1f"));
-            msg.setObjectProperty(name, Double.valueOf("1.1"));
-            msg.setObjectProperty(name, Boolean.TRUE);
-            msg.setObjectProperty(name, null);
-        } catch (MessageFormatException e) {
-            fail("should accept object primitives and String");
-        }
-        try {
-            msg.setObjectProperty(name, new byte[5]);
-            fail("should accept only object primitives and String");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.setObjectProperty(name, new Object());
-            fail("should accept only object primitives and String");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testConvertProperties() throws Exception {
-        org.apache.activemq.command.Message msg = new org.apache.activemq.command.Message() {
-            public org.apache.activemq.command.Message copy() {
-                return null;
-            }
-
-            public void beforeMarshall(WireFormat wireFormat) throws IOException {
-                super.beforeMarshall(wireFormat);
-            }
-
-            public byte getDataStructureType() {
-                return 0;
-            }
-
-            public Response visit(CommandVisitor visitor) throws Exception {
-                return null;
-            }
-
-            @Override
-            public void clearBody() throws JMSException {                
-            }
-        };
-
-        msg.setProperty("stringProperty", "string");
-        msg.setProperty("byteProperty", Byte.valueOf("1"));
-        msg.setProperty("shortProperty", Short.valueOf("1"));
-        msg.setProperty("intProperty", Integer.valueOf("1"));
-        msg.setProperty("longProperty", Long.valueOf("1"));
-        msg.setProperty("floatProperty", Float.valueOf("1.1f"));
-        msg.setProperty("doubleProperty", Double.valueOf("1.1"));
-        msg.setProperty("booleanProperty", Boolean.TRUE);
-        msg.setProperty("nullProperty", null);
-
-        msg.beforeMarshall(new OpenWireFormat());
-
-        Map properties = msg.getProperties();
-        assertEquals(properties.get("stringProperty"), "string");
-        assertEquals(((Byte)properties.get("byteProperty")).byteValue(), 1);
-        assertEquals(((Short)properties.get("shortProperty")).shortValue(), 1);
-        assertEquals(((Integer)properties.get("intProperty")).intValue(), 1);
-        assertEquals(((Long)properties.get("longProperty")).longValue(), 1);
-        assertEquals(((Float)properties.get("floatProperty")).floatValue(), 1.1f, 0);
-        assertEquals(((Double)properties.get("doubleProperty")).doubleValue(), 1.1, 0);
-        assertEquals(((Boolean)properties.get("booleanProperty")).booleanValue(), true);
-        assertNull(properties.get("nullProperty"));
-
-    }
-
-    public void testSetNullProperty() throws JMSException {
-        Message msg = new ActiveMQMessage();
-        String name = "cheese";
-        msg.setStringProperty(name, "Cheddar");
-        assertEquals("Cheddar", msg.getStringProperty(name));
-
-        msg.setStringProperty(name, null);
-        assertEquals(null, msg.getStringProperty(name));
-    }
-
-    public void testSetNullPropertyName() throws JMSException {
-        Message msg = new ActiveMQMessage();
-
-        try {
-            msg.setStringProperty(null, "Cheese");
-            fail("Should have thrown exception");
-        } catch (IllegalArgumentException e) {
-            LOG.info("Worked, caught: " + e);
-        }
-    }
-
-    public void testSetEmptyPropertyName() throws JMSException {
-        Message msg = new ActiveMQMessage();
-
-        try {
-            msg.setStringProperty("", "Cheese");
-            fail("Should have thrown exception");
-        } catch (IllegalArgumentException e) {
-            LOG.info("Worked, caught: " + e);
-        }
-    }
-
-    public void testGetAndSetJMSXDeliveryCount() throws JMSException {
-        Message msg = new ActiveMQMessage();
-        msg.setIntProperty("JMSXDeliveryCount", 1);
-        int count = msg.getIntProperty("JMSXDeliveryCount");
-        assertTrue("expected delivery count = 1 - got: " + count, count == 1);
-    }
-
-    public void testClearBody() throws JMSException {
-        ActiveMQBytesMessage message = new ActiveMQBytesMessage();
-        message.clearBody();
-        assertFalse(message.isReadOnlyBody());
-        assertNull(message.getContent());
-    }
-
-    public void testBooleanPropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setBooleanProperty(propertyName, true);
-
-        assertEquals(((Boolean)msg.getObjectProperty(propertyName)).booleanValue(), true);
-        assertTrue(msg.getBooleanProperty(propertyName));
-        assertEquals(msg.getStringProperty(propertyName), "true");
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getShortProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getIntProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getLongProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getDoubleProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testBytePropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setByteProperty(propertyName, (byte)1);
-
-        assertEquals(((Byte)msg.getObjectProperty(propertyName)).byteValue(), 1);
-        assertEquals(msg.getByteProperty(propertyName), 1);
-        assertEquals(msg.getShortProperty(propertyName), 1);
-        assertEquals(msg.getIntProperty(propertyName), 1);
-        assertEquals(msg.getLongProperty(propertyName), 1);
-        assertEquals(msg.getStringProperty(propertyName), "1");
-        try {
-            msg.getBooleanProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getDoubleProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testShortPropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setShortProperty(propertyName, (short)1);
-
-        assertEquals(((Short)msg.getObjectProperty(propertyName)).shortValue(), 1);
-        assertEquals(msg.getShortProperty(propertyName), 1);
-        assertEquals(msg.getIntProperty(propertyName), 1);
-        assertEquals(msg.getLongProperty(propertyName), 1);
-        assertEquals(msg.getStringProperty(propertyName), "1");
-        try {
-            msg.getBooleanProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getDoubleProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testIntPropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setIntProperty(propertyName, (int)1);
-
-        assertEquals(((Integer)msg.getObjectProperty(propertyName)).intValue(), 1);
-        assertEquals(msg.getIntProperty(propertyName), 1);
-        assertEquals(msg.getLongProperty(propertyName), 1);
-        assertEquals(msg.getStringProperty(propertyName), "1");
-        try {
-            msg.getBooleanProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getShortProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getDoubleProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testLongPropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setLongProperty(propertyName, 1);
-
-        assertEquals(((Long)msg.getObjectProperty(propertyName)).longValue(), 1);
-        assertEquals(msg.getLongProperty(propertyName), 1);
-        assertEquals(msg.getStringProperty(propertyName), "1");
-        try {
-            msg.getBooleanProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getShortProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getIntProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getDoubleProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testFloatPropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setFloatProperty(propertyName, (float)1.5);
-        assertEquals(((Float)msg.getObjectProperty(propertyName)).floatValue(), 1.5, 0);
-        assertEquals(msg.getFloatProperty(propertyName), 1.5, 0);
-        assertEquals(msg.getDoubleProperty(propertyName), 1.5, 0);
-        assertEquals(msg.getStringProperty(propertyName), "1.5");
-        try {
-            msg.getBooleanProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getShortProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getIntProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getLongProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testDoublePropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setDoubleProperty(propertyName, 1.5);
-        assertEquals(((Double)msg.getObjectProperty(propertyName)).doubleValue(), 1.5, 0);
-        assertEquals(msg.getDoubleProperty(propertyName), 1.5, 0);
-        assertEquals(msg.getStringProperty(propertyName), "1.5");
-        try {
-            msg.getBooleanProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getShortProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getIntProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getLongProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-    }
-
-    public void testStringPropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        String stringValue = "true";
-        msg.setStringProperty(propertyName, stringValue);
-        assertEquals(msg.getStringProperty(propertyName), stringValue);
-        assertEquals((String)msg.getObjectProperty(propertyName), stringValue);
-        assertEquals(msg.getBooleanProperty(propertyName), true);
-
-        stringValue = "1";
-        msg.setStringProperty(propertyName, stringValue);
-        assertEquals(msg.getByteProperty(propertyName), 1);
-        assertEquals(msg.getShortProperty(propertyName), 1);
-        assertEquals(msg.getIntProperty(propertyName), 1);
-        assertEquals(msg.getLongProperty(propertyName), 1);
-
-        stringValue = "1.5";
-        msg.setStringProperty(propertyName, stringValue);
-        assertEquals(msg.getFloatProperty(propertyName), 1.5, 0);
-        assertEquals(msg.getDoubleProperty(propertyName), 1.5, 0);
-
-        stringValue = "bad";
-        msg.setStringProperty(propertyName, stringValue);
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (NumberFormatException e) {
-        }
-        try {
-            msg.getShortProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (NumberFormatException e) {
-        }
-        try {
-            msg.getIntProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (NumberFormatException e) {
-        }
-        try {
-            msg.getLongProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (NumberFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (NumberFormatException e) {
-        }
-        try {
-            msg.getDoubleProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (NumberFormatException e) {
-        }
-        assertFalse(msg.getBooleanProperty(propertyName));
-    }
-
-    public void testObjectPropertyConversion() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        Object obj = new Object();
-        try {
-            ((org.apache.activemq.command.Message)msg).setProperty(propertyName, obj); // bypass
-            // object
-            // check
-        } catch (IOException e) {
-        }
-        try {
-            msg.getStringProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getBooleanProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getByteProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getShortProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getIntProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getLongProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getFloatProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-        try {
-            msg.getDoubleProperty(propertyName);
-            fail("Should have thrown exception");
-        } catch (MessageFormatException e) {
-        }
-
-    }
-
-    public void testReadOnlyProperties() throws JMSException {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        String propertyName = "property";
-        msg.setReadOnlyProperties(true);
-
-        try {
-            msg.setObjectProperty(propertyName, new Object());
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setStringProperty(propertyName, "test");
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setBooleanProperty(propertyName, true);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setByteProperty(propertyName, (byte)1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setShortProperty(propertyName, (short)1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setIntProperty(propertyName, 1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setLongProperty(propertyName, 1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setFloatProperty(propertyName, (float)1.5);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-        try {
-            msg.setDoubleProperty(propertyName, 1.5);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException e) {
-        }
-    }
-
-    public void testIsExpired() {
-        ActiveMQMessage msg = new ActiveMQMessage();
-        msg.setJMSExpiration(System.currentTimeMillis() - 1);
-        assertTrue(msg.isExpired());
-        msg.setJMSExpiration(System.currentTimeMillis() + 10000);
-        assertFalse(msg.isExpired());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQObjectMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQObjectMessageTest.java
deleted file mode 100755
index fc38a30..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQObjectMessageTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-
-import javax.jms.JMSException;
-import javax.jms.MessageNotReadableException;
-import javax.jms.MessageNotWriteableException;
-
-import junit.framework.TestCase;
-
-/**
- * 
- */
-public class ActiveMQObjectMessageTest extends TestCase {
-
-    /**
-     * Constructor for ActiveMQObjectMessageTest.
-     *
-     * @param name
-     */
-    public ActiveMQObjectMessageTest(String name) {
-        super(name);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ActiveMQObjectMessageTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testBytes() throws JMSException, IOException {
-        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
-        String str = "testText";
-        msg.setObject(str);
-        
-        msg = (ActiveMQObjectMessage) msg.copy();
-        assertEquals(msg.getObject(), str);
-
-    }
-
-    public void testSetObject() throws JMSException {
-        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
-        String str = "testText";
-        msg.setObject(str);
-        assertTrue(msg.getObject() == str);
-    }
-
-    public void testClearBody() throws JMSException {
-        ActiveMQObjectMessage objectMessage = new ActiveMQObjectMessage();
-        try {
-            objectMessage.setObject("String");
-            objectMessage.clearBody();
-            assertFalse(objectMessage.isReadOnlyBody());
-            assertNull(objectMessage.getObject());
-            objectMessage.setObject("String");
-            objectMessage.getObject();
-        } catch (MessageNotWriteableException mnwe) {
-            fail("should be writeable");
-        }
-    }
-
-    public void testReadOnlyBody() throws JMSException {
-        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
-        msg.setObject("test");
-        msg.setReadOnlyBody(true);
-        try {
-            msg.getObject();
-        } catch (MessageNotReadableException e) {
-            fail("should be readable");
-        }
-        try {
-            msg.setObject("test");
-            fail("should throw exception");
-        } catch (MessageNotWriteableException e) {
-        }
-    }
-
-    public void testWriteOnlyBody() throws JMSException { // should always be readable
-        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
-        msg.setReadOnlyBody(false);
-        try {
-            msg.setObject("test");
-            msg.getObject();
-        } catch (MessageNotReadableException e) {
-            fail("should be readable");
-        }
-        msg.setReadOnlyBody(true);
-        try {
-            msg.getObject();
-            msg.setObject("test");
-            fail("should throw exception");
-        } catch (MessageNotReadableException e) {
-            fail("should be readable");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java
deleted file mode 100755
index 9e0f468..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java
+++ /dev/null
@@ -1,1000 +0,0 @@
-/**
- * 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.command;
-
-import java.io.Serializable;
-
-import javax.jms.JMSException;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotReadableException;
-import javax.jms.MessageNotWriteableException;
-
-import junit.framework.TestCase;
-
-/**
- * 
- */
-public class ActiveMQStreamMessageTest extends TestCase {
-
-    /**
-     * Constructor for ActiveMQStreamMessageTest.
-     * 
-     * @param name
-     */
-    public ActiveMQStreamMessageTest(String name) {
-        super(name);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ActiveMQStreamMessageTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testGetDataStructureType() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        assertEquals(msg.getDataStructureType(), CommandTypes.ACTIVEMQ_STREAM_MESSAGE);
-    }
-
-    public void testReadBoolean() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            msg.writeBoolean(true);
-            msg.reset();
-            assertTrue(msg.readBoolean());
-            msg.reset();
-            assertTrue(msg.readString().equals("true"));
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readShort();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readInt();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readLong();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readDouble();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testreadByte() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            byte test = (byte)4;
-            msg.writeByte(test);
-            msg.reset();
-            assertTrue(msg.readByte() == test);
-            msg.reset();
-            assertTrue(msg.readShort() == test);
-            msg.reset();
-            assertTrue(msg.readInt() == test);
-            msg.reset();
-            assertTrue(msg.readLong() == test);
-            msg.reset();
-            assertTrue(msg.readString().equals(new Byte(test).toString()));
-            msg.reset();
-            try {
-                msg.readBoolean();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readDouble();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadShort() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            short test = (short)4;
-            msg.writeShort(test);
-            msg.reset();
-            assertTrue(msg.readShort() == test);
-            msg.reset();
-            assertTrue(msg.readInt() == test);
-            msg.reset();
-            assertTrue(msg.readLong() == test);
-            msg.reset();
-            assertTrue(msg.readString().equals(new Short(test).toString()));
-            msg.reset();
-            try {
-                msg.readBoolean();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readDouble();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadChar() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            char test = 'z';
-            msg.writeChar(test);
-            msg.reset();
-            assertTrue(msg.readChar() == test);
-            msg.reset();
-            assertTrue(msg.readString().equals(new Character(test).toString()));
-            msg.reset();
-            try {
-                msg.readBoolean();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readShort();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readInt();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readLong();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readDouble();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadInt() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            int test = 4;
-            msg.writeInt(test);
-            msg.reset();
-            assertTrue(msg.readInt() == test);
-            msg.reset();
-            assertTrue(msg.readLong() == test);
-            msg.reset();
-            assertTrue(msg.readString().equals(new Integer(test).toString()));
-            msg.reset();
-            try {
-                msg.readBoolean();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readShort();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readDouble();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadLong() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            long test = 4L;
-            msg.writeLong(test);
-            msg.reset();
-            assertTrue(msg.readLong() == test);
-            msg.reset();
-            assertTrue(msg.readString().equals(Long.valueOf(test).toString()));
-            msg.reset();
-            try {
-                msg.readBoolean();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readShort();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readInt();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readDouble();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg = new ActiveMQStreamMessage();
-            msg.writeObject(new Long("1"));
-            // reset so it's readable now
-            msg.reset();
-            assertEquals(new Long("1"), msg.readObject());
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadFloat() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            float test = 4.4f;
-            msg.writeFloat(test);
-            msg.reset();
-            assertTrue(msg.readFloat() == test);
-            msg.reset();
-            assertTrue(msg.readDouble() == test);
-            msg.reset();
-            assertTrue(msg.readString().equals(new Float(test).toString()));
-            msg.reset();
-            try {
-                msg.readBoolean();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readShort();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readInt();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readLong();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadDouble()  {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            double test = 4.4d;
-            msg.writeDouble(test);
-            msg.reset();
-            assertTrue(msg.readDouble() == test);
-            msg.reset();
-            assertTrue(msg.readString().equals(new Double(test).toString()));
-            msg.reset();
-            try {
-                msg.readBoolean();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readShort();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readInt();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readLong();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readBytes(new byte[1]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-      
-    }
-
-    public void testReadString() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            byte testByte = (byte)2;
-            msg.writeString(new Byte(testByte).toString());
-            msg.reset();
-            assertTrue(msg.readByte() == testByte);
-            msg.clearBody();
-            short testShort = 3;
-            msg.writeString(new Short(testShort).toString());
-            msg.reset();
-            assertTrue(msg.readShort() == testShort);
-            msg.clearBody();
-            int testInt = 4;
-            msg.writeString(new Integer(testInt).toString());
-            msg.reset();
-            assertTrue(msg.readInt() == testInt);
-            msg.clearBody();
-            long testLong = 6L;
-            msg.writeString(new Long(testLong).toString());
-            msg.reset();
-            assertTrue(msg.readLong() == testLong);
-            msg.clearBody();
-            float testFloat = 6.6f;
-            msg.writeString(new Float(testFloat).toString());
-            msg.reset();
-            assertTrue(msg.readFloat() == testFloat);
-            msg.clearBody();
-            double testDouble = 7.7d;
-            msg.writeString(new Double(testDouble).toString());
-            msg.reset();
-            assertTrue(msg.readDouble() == testDouble);
-            msg.clearBody();
-            msg.writeString("true");
-            msg.reset();
-            assertTrue(msg.readBoolean());
-            msg.clearBody();
-            msg.writeString("a");
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException e) {
-            }
-            msg.clearBody();
-            msg.writeString("777");
-            msg.reset();
-            try {
-                msg.readBytes(new byte[3]);
-                fail("Should have thrown exception");
-            } catch (MessageFormatException e) {
-            }
-
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadBigString() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            // Test with a 1Meg String
-            StringBuffer bigSB = new StringBuffer(1024 * 1024);
-            for (int i = 0; i < 1024 * 1024; i++) {
-                bigSB.append((char)'a' + i % 26);
-            }
-            String bigString = bigSB.toString();
-
-            msg.writeString(bigString);
-            msg.reset();
-            assertEquals(bigString, msg.readString());
-
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadBytes() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            byte[] test = new byte[50];
-            for (int i = 0; i < test.length; i++) {
-                test[i] = (byte)i;
-            }
-            msg.writeBytes(test);
-            msg.reset();
-            byte[] valid = new byte[test.length];
-            msg.readBytes(valid);
-            for (int i = 0; i < valid.length; i++) {
-                assertTrue(valid[i] == test[i]);
-            }
-            msg.reset();
-            try {
-                msg.readByte();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readShort();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readInt();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readLong();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readFloat();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readChar();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-            msg.reset();
-            try {
-                msg.readString();
-                fail("Should have thrown exception");
-            } catch (MessageFormatException mfe) {
-            }
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testReadObject() {
-        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
-        try {
-            byte testByte = (byte)2;
-            msg.writeByte(testByte);
-            msg.reset();
-            assertTrue(((Byte)msg.readObject()).byteValue() == testByte);
-            msg.clearBody();
-
-            short testShort = 3;
-            msg.writeShort(testShort);
-            msg.reset();
-            assertTrue(((Short)msg.readObject()).shortValue() == testShort);
-            msg.clearBody();
-
-            int testInt = 4;
-            msg.writeInt(testInt);
-            msg.reset();
-            assertTrue(((Integer)msg.readObject()).intValue() == testInt);
-            msg.clearBody();
-
-            long testLong = 6L;
-            msg.writeLong(testLong);
-            msg.reset();
-            assertTrue(((Long)msg.readObject()).longValue() == testLong);
-            msg.clearBody();
-
-            float testFloat = 6.6f;
-            msg.writeFloat(testFloat);
-            msg.reset();
-            assertTrue(((Float)msg.readObject()).floatValue() == testFloat);
-            msg.clearBody();
-
-            double testDouble = 7.7d;
-            msg.writeDouble(testDouble);
-            msg.reset();
-            assertTrue(((Double)msg.readObject()).doubleValue() == testDouble);
-            msg.clearBody();
-
-            char testChar = 'z';
-            msg.writeChar(testChar);
-            msg.reset();
-            assertTrue(((Character)msg.readObject()).charValue() == testChar);
-            msg.clearBody();
-
-            byte[] data = new byte[50];
-            for (int i = 0; i < data.length; i++) {
-                data[i] = (byte)i;
-            }
-            msg.writeBytes(data);
-            msg.reset();
-            byte[] valid = (byte[])msg.readObject();
-            assertTrue(valid.length == data.length);
-            for (int i = 0; i < valid.length; i++) {
-                assertTrue(valid[i] == data[i]);
-            }
-            msg.clearBody();
-            msg.writeBoolean(true);
-            msg.reset();
-            assertTrue(((Boolean)msg.readObject()).booleanValue());
-
-        } catch (JMSException jmsEx) {
-            jmsEx.printStackTrace();
-            assertTrue(false);
-        }
-    }
-
-    public void testClearBody() throws JMSException {
-        ActiveMQStreamMessage streamMessage = new ActiveMQStreamMessage();
-        try {
-            streamMessage.writeObject(new Long(2));
-            streamMessage.clearBody();
-            assertFalse(streamMessage.isReadOnlyBody());
-            streamMessage.writeObject(new Long(2));
-            streamMessage.readObject();
-            fail("should throw exception");
-        } catch (MessageNotReadableException mnwe) {
-        } catch (MessageNotWriteableException mnwe) {
-            fail("should be writeable");
-        }
-    }
-
-    public void testReset() throws JMSException {
-        ActiveMQStreamMessage streamMessage = new ActiveMQStreamMessage();
-        try {
-            streamMessage.writeDouble(24.5);
-            streamMessage.writeLong(311);
-        } catch (MessageNotWriteableException mnwe) {
-            fail("should be writeable");
-        }
-        streamMessage.reset();
-        try {
-            assertTrue(streamMessage.isReadOnlyBody());
-            assertEquals(streamMessage.readDouble(), 24.5, 0);
-            assertEquals(streamMessage.readLong(), 311);
-        } catch (MessageNotReadableException mnre) {
-            fail("should be readable");
-        }
-        try {
-            streamMessage.writeInt(33);
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-
-    public void testReadOnlyBody() throws JMSException {
-        ActiveMQStreamMessage message = new ActiveMQStreamMessage();
-        try {
-            message.writeBoolean(true);
-            message.writeByte((byte)1);
-            message.writeBytes(new byte[1]);
-            message.writeBytes(new byte[3], 0, 2);
-            message.writeChar('a');
-            message.writeDouble(1.5);
-            message.writeFloat((float)1.5);
-            message.writeInt(1);
-            message.writeLong(1);
-            message.writeObject("stringobj");
-            message.writeShort((short)1);
-            message.writeString("string");
-        } catch (MessageNotWriteableException mnwe) {
-            fail("Should be writeable");
-        }
-        message.reset();
-        try {
-            message.readBoolean();
-            message.readByte();
-            assertEquals(1, message.readBytes(new byte[10]));
-            assertEquals(-1, message.readBytes(new byte[10]));
-            assertEquals(2, message.readBytes(new byte[10]));
-            assertEquals(-1, message.readBytes(new byte[10]));
-            message.readChar();
-            message.readDouble();
-            message.readFloat();
-            message.readInt();
-            message.readLong();
-            message.readString();
-            message.readShort();
-            message.readString();
-        } catch (MessageNotReadableException mnwe) {
-            fail("Should be readable");
-        }
-        try {
-            message.writeBoolean(true);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeByte((byte)1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeBytes(new byte[1]);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeBytes(new byte[3], 0, 2);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeChar('a');
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeDouble(1.5);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeFloat((float)1.5);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeInt(1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeLong(1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeObject("stringobj");
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeShort((short)1);
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-        try {
-            message.writeString("string");
-            fail("Should have thrown exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-
-    public void testWriteOnlyBody() throws JMSException {
-        ActiveMQStreamMessage message = new ActiveMQStreamMessage();
-        message.clearBody();
-        try {
-            message.writeBoolean(true);
-            message.writeByte((byte)1);
-            message.writeBytes(new byte[1]);
-            message.writeBytes(new byte[3], 0, 2);
-            message.writeChar('a');
-            message.writeDouble(1.5);
-            message.writeFloat((float)1.5);
-            message.writeInt(1);
-            message.writeLong(1);
-            message.writeObject("stringobj");
-            message.writeShort((short)1);
-            message.writeString("string");
-        } catch (MessageNotWriteableException mnwe) {
-            fail("Should be writeable");
-        }
-        try {
-            message.readBoolean();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException mnwe) {
-        }
-        try {
-            message.readByte();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readBytes(new byte[1]);
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readBytes(new byte[2]);
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readChar();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readDouble();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readFloat();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readInt();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readLong();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readString();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readShort();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-        try {
-            message.readString();
-            fail("Should have thrown exception");
-        } catch (MessageNotReadableException e) {
-        }
-    }
-    
-    public void testWriteObject() {
-        try {
-            ActiveMQStreamMessage message = new ActiveMQStreamMessage();
-            message.clearBody();
-            message.writeObject("test");
-            message.writeObject(new Character('a'));
-            message.writeObject(new Boolean(false));
-            message.writeObject(new Byte((byte) 2));
-            message.writeObject(new Short((short) 2));
-            message.writeObject(new Integer(2));
-            message.writeObject(new Long(2l));
-            message.writeObject(new Float(2.0f));
-            message.writeObject(new Double(2.0d));
-        }catch(Exception e) {
-            fail(e.getMessage());
-        }
-        try {
-            ActiveMQStreamMessage message = new ActiveMQStreamMessage();
-            message.clearBody();
-            message.writeObject(new Object());
-            fail("should throw an exception");
-        }catch(MessageFormatException e) {
-            
-        }catch(Exception e) {
-            fail(e.getMessage());
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java
deleted file mode 100755
index 28fc307..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.command;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import javax.jms.JMSException;
-import javax.jms.MessageNotReadableException;
-import javax.jms.MessageNotWriteableException;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.MarshallingSupport;
-
-/**
- * 
- */
-public class ActiveMQTextMessageTest extends TestCase {
-
-    public static void main(String[] args) {
-        TestRunner.run(ActiveMQTextMessageTest.class);
-    }
-
-    public void testGetDataStructureType() {
-        ActiveMQTextMessage msg = new ActiveMQTextMessage();
-        assertEquals(msg.getDataStructureType(), CommandTypes.ACTIVEMQ_TEXT_MESSAGE);
-    }
-
-    public void testShallowCopy() throws JMSException {
-        ActiveMQTextMessage msg = new ActiveMQTextMessage();
-        String string = "str";
-        msg.setText(string);
-        Message copy = msg.copy();
-        assertTrue(msg.getText() == ((ActiveMQTextMessage) copy).getText());
-    }
-
-    public void testSetText() {
-        ActiveMQTextMessage msg = new ActiveMQTextMessage();
-        String str = "testText";
-        try {
-            msg.setText(str);
-            assertEquals(msg.getText(), str);
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void testGetBytes() throws JMSException, IOException {
-        ActiveMQTextMessage msg = new ActiveMQTextMessage();
-        String str = "testText";
-        msg.setText(str);
-        msg.beforeMarshall(null);
-        
-        ByteSequence bytes = msg.getContent();
-        msg = new ActiveMQTextMessage();
-        msg.setContent(bytes);
-        
-        assertEquals(msg.getText(), str);
-    }
-
-    public void testClearBody() throws JMSException, IOException {
-        ActiveMQTextMessage textMessage = new ActiveMQTextMessage();
-        textMessage.setText("string");
-        textMessage.clearBody();
-        assertFalse(textMessage.isReadOnlyBody());
-        assertNull(textMessage.getText());
-        try {
-            textMessage.setText("String");
-            textMessage.getText();
-        } catch (MessageNotWriteableException mnwe) {
-            fail("should be writeable");
-        } catch (MessageNotReadableException mnre) {
-            fail("should be readable");
-        }
-    }
-
-    public void testReadOnlyBody() throws JMSException {
-        ActiveMQTextMessage textMessage = new ActiveMQTextMessage();
-        textMessage.setText("test");
-        textMessage.setReadOnlyBody(true);
-        try {
-            textMessage.getText();
-        } catch (MessageNotReadableException e) {
-            fail("should be readable");
-        }
-        try {
-            textMessage.setText("test");
-            fail("should throw exception");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-
-    public void testWriteOnlyBody() throws JMSException { // should always be readable
-        ActiveMQTextMessage textMessage = new ActiveMQTextMessage();
-        textMessage.setReadOnlyBody(false);
-        try {
-            textMessage.setText("test");
-            textMessage.getText();
-        } catch (MessageNotReadableException e) {
-            fail("should be readable");
-        }
-        textMessage.setReadOnlyBody(true);
-        try {
-            textMessage.getText();
-            textMessage.setText("test");
-            fail("should throw exception");
-        } catch (MessageNotReadableException e) {
-            fail("should be readable");
-        } catch (MessageNotWriteableException mnwe) {
-        }
-    }
-    
-    public void testShortText() throws Exception {
-        String shortText = "Content";
-    	ActiveMQTextMessage shortMessage = new ActiveMQTextMessage();
-        setContent(shortMessage, shortText);
-        assertTrue(shortMessage.toString().contains("text = " + shortText));
-        assertTrue(shortMessage.getText().equals(shortText));
-        
-        String longText = "Very very very very veeeeeeery loooooooooooooooooooooooooooooooooong text";
-        String longExpectedText = "Very very very very veeeeeeery looooooooooooo...ooooong text";
-        ActiveMQTextMessage longMessage = new ActiveMQTextMessage();
-        setContent(longMessage, longText);
-        assertTrue(longMessage.toString().contains("text = " + longExpectedText));
-        assertTrue(longMessage.getText().equals(longText));         
-    }
-    
-    public void testNullText() throws Exception {
-    	ActiveMQTextMessage nullMessage = new ActiveMQTextMessage();
-    	setContent(nullMessage, null);
-    	assertTrue(nullMessage.toString().contains("text = null"));
-    }
-    
-    protected void setContent(Message message, String text) throws Exception {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream dataOut = new DataOutputStream(baos);
-        MarshallingSupport.writeUTF8(dataOut, text);
-        dataOut.close();
-        message.setContent(baos.toByteSequence());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java
deleted file mode 100755
index fa977af..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-public abstract class DataStructureTestSupport extends CombinationTestSupport {
-    public boolean cacheEnabled;
-    public WireFormat wireFormat;
-
-    public void assertBeanMarshalls(Object original) throws IOException {
-        Object o = marshalAndUnmarshall(original, wireFormat);
-        assertNotNull(o);
-        assertEquals(original, o);
-        // assertEquals(original.getClass(), o.getClass());
-        //        
-        // Method[] methods = original.getClass().getMethods();
-        // for (int i = 0; i < methods.length; i++) {
-        // Method method = methods[i];
-        // if( ( method.getName().startsWith("get")
-        // || method.getName().startsWith("is")
-        // )
-        // && method.getParameterTypes().length==0
-        // && method.getReturnType()!=null
-        // ) {
-        // try {
-        // Object expect = method.invoke(original, null);
-        // Object was = method.invoke(o, null);
-        // assertEquals(expect, was);
-        // } catch (IllegalArgumentException e) {
-        // } catch (IllegalAccessException e) {
-        // } catch (InvocationTargetException e) {
-        // }
-        // }
-        // }
-    }
-
-    public static void assertEquals(Object expect, Object was) {
-        if (expect == null ^ was == null) {
-            throw new AssertionFailedError("Not equals, expected: " + expect + ", was: " + was);
-        }
-        if (expect == null) {
-            return;
-        }
-        if (expect.getClass() != was.getClass()) {
-            throw new AssertionFailedError("Not equals, classes don't match. expected: " + expect.getClass() + ", was: " + was.getClass());
-        }
-        if (expect.getClass().isArray()) {
-            Class componentType = expect.getClass().getComponentType();
-            if (componentType.isPrimitive()) {
-                boolean ok = false;
-                if (componentType == byte.class) {
-                    ok = Arrays.equals((byte[])expect, (byte[])was);
-                }
-                if (componentType == char.class) {
-                    ok = Arrays.equals((char[])expect, (char[])was);
-                }
-                if (componentType == short.class) {
-                    ok = Arrays.equals((short[])expect, (short[])was);
-                }
-                if (componentType == int.class) {
-                    ok = Arrays.equals((int[])expect, (int[])was);
-                }
-                if (componentType == long.class) {
-                    ok = Arrays.equals((long[])expect, (long[])was);
-                }
-                if (componentType == double.class) {
-                    ok = Arrays.equals((double[])expect, (double[])was);
-                }
-                if (componentType == float.class) {
-                    ok = Arrays.equals((float[])expect, (float[])was);
-                }
-                if (!ok) {
-                    throw new AssertionFailedError("Arrays not equal");
-                }
-            } else {
-                Object expectArray[] = (Object[])expect;
-                Object wasArray[] = (Object[])was;
-                if (expectArray.length != wasArray.length) {
-                    throw new AssertionFailedError("Not equals, array lengths don't match. expected: " + expectArray.length + ", was: " + wasArray.length);
-                }
-                for (int i = 0; i < wasArray.length; i++) {
-                    assertEquals(expectArray[i], wasArray[i]);
-                }
-
-            }
-        } else if (expect instanceof Command) {
-            assertEquals(expect.getClass(), was.getClass());
-            Method[] methods = expect.getClass().getMethods();
-            for (int i = 0; i < methods.length; i++) {
-                Method method = methods[i];
-                if ((method.getName().startsWith("get") || method.getName().startsWith("is")) && method.getParameterTypes().length == 0 && method.getReturnType() != null) {
-
-                    // Check to see if there is a setter for the method.
-                    try {
-                        if (method.getName().startsWith("get")) {
-                            expect.getClass().getMethod(method.getName().replaceFirst("get", "set"), new Class[] {method.getReturnType()});
-                        } else {
-                            expect.getClass().getMethod(method.getName().replaceFirst("is", "set"), new Class[] {method.getReturnType()});
-                        }
-                    } catch (Throwable ignore) {
-                        continue;
-                    }
-
-                    try {
-                        assertEquals(method.invoke(expect, (Object)null), method.invoke(was, (Object)null));
-                    } catch (IllegalArgumentException e) {
-                    } catch (IllegalAccessException e) {
-                    } catch (InvocationTargetException e) {
-                    }
-                }
-            }
-        } else {
-            TestCase.assertEquals(expect, was);
-        }
-    }
-
-    protected void setUp() throws Exception {
-        wireFormat = createWireFormat();
-        super.setUp();
-    }
-
-    protected WireFormat createWireFormat() {
-        OpenWireFormat answer = new OpenWireFormat();
-        answer.setCacheEnabled(cacheEnabled);
-        return answer;
-    }
-
-    protected Object marshalAndUnmarshall(Object original, WireFormat wireFormat) throws IOException {
-        ByteSequence packet = wireFormat.marshal(original);
-        return wireFormat.unmarshal(packet);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java
deleted file mode 100644
index 97e493d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageCompressionTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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.command;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-
-public class MessageCompressionTest extends TestCase {
-
-    private static final String BROKER_URL = "tcp://localhost:61216";
-    // The following text should compress well
-    private static final String TEXT = "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. " + "The quick red fox jumped over the lazy brown dog. "
-                                       + "The quick red fox jumped over the lazy brown dog. ";
-
-    protected BrokerService broker;
-    private ActiveMQQueue queue;
-
-    protected void setUp() throws Exception {
-        broker = new BrokerService();
-
-        TransportConnector tc = new TransportConnector();
-        tc.setUri(new URI(BROKER_URL));
-        tc.setName("tcp");
-
-        queue = new ActiveMQQueue("TEST." + System.currentTimeMillis());
-
-        broker.addConnector(tc);
-        broker.start();
-
-    }
-
-    protected void tearDown() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    public void testTextMessageCompression() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(BROKER_URL);
-        factory.setUseCompression(true);
-        sendTestMessage(factory, TEXT);
-        ActiveMQTextMessage message = receiveTestMessage(factory);
-        int compressedSize = message.getContent().getLength();
-
-        factory = new ActiveMQConnectionFactory(BROKER_URL);
-        factory.setUseCompression(false);
-        sendTestMessage(factory, TEXT);
-        message = receiveTestMessage(factory);
-        int unCompressedSize = message.getContent().getLength();
-
-        assertTrue("expected: compressed Size '" + compressedSize + "' < unCompressedSize '" + unCompressedSize + "'", compressedSize < unCompressedSize);
-    }
-
-    public void testBytesMessageCompression() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(BROKER_URL);
-        factory.setUseCompression(true);
-        sendTestBytesMessage(factory, TEXT);
-        ActiveMQBytesMessage message = receiveTestBytesMessage(factory);
-        int compressedSize = message.getContent().getLength();
-        byte[] bytes = new byte[TEXT.getBytes("UTF8").length];
-        message.readBytes(bytes);
-        assertTrue(message.readBytes( new byte[255]) == -1);
-        String rcvString = new String(bytes, "UTF8");
-        assertEquals(TEXT, rcvString);
-
-        factory = new ActiveMQConnectionFactory(BROKER_URL);
-        factory.setUseCompression(false);
-        sendTestBytesMessage(factory, TEXT);
-        message = receiveTestBytesMessage(factory);
-        int unCompressedSize = message.getContent().getLength();
-
-        assertTrue("expected: compressed Size '" + compressedSize + "' < unCompressedSize '" + unCompressedSize + "'", compressedSize < unCompressedSize);
-    }
-
-    private void sendTestMessage(ActiveMQConnectionFactory factory, String message) throws JMSException {
-        ActiveMQConnection connection = (ActiveMQConnection)factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(session.createTextMessage(message));
-        connection.close();
-    }
-
-    private ActiveMQTextMessage receiveTestMessage(ActiveMQConnectionFactory factory) throws JMSException {
-        ActiveMQConnection connection = (ActiveMQConnection)factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(queue);
-        ActiveMQTextMessage rc = (ActiveMQTextMessage)consumer.receive();
-        connection.close();
-        return rc;
-    }
-
-    private void sendTestBytesMessage(ActiveMQConnectionFactory factory, String message) throws JMSException, UnsupportedEncodingException {
-        ActiveMQConnection connection = (ActiveMQConnection)factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(queue);
-        BytesMessage bytesMessage = session.createBytesMessage();
-        bytesMessage.writeBytes(message.getBytes("UTF8"));
-        producer.send(bytesMessage);
-        connection.close();
-    }
-
-    private ActiveMQBytesMessage receiveTestBytesMessage(ActiveMQConnectionFactory factory) throws JMSException, UnsupportedEncodingException {
-        ActiveMQConnection connection = (ActiveMQConnection)factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(queue);
-        ActiveMQBytesMessage rc = (ActiveMQBytesMessage)consumer.receive();
-        connection.close();
-        return rc;
-    }
-
-    // public void testJavaUtilZip() throws Exception {
-    // String str = "When the going gets weird, the weird turn pro.";
-    // byte[] bytes = str.getBytes();
-    //
-    // ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length);
-    // DeflaterOutputStream dos = new DeflaterOutputStream(baos);
-    // dos.
-    // }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java
deleted file mode 100755
index bab9309..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-
-import org.apache.activemq.JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest;
-import org.apache.activemq.util.ByteSequence;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MessageSendTest extends DataStructureTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(MessageSendTest.class);
-
-    public static Test suite() {
-        return suite(MessageSendTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void initCombosForTestMessageSendMarshaling() {
-        addCombinationValues("cacheEnabled", new Object[] {Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testMessageSendMarshaling() throws IOException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        message.setCommandId((short)1);
-        message.setDestination(new ActiveMQQueue("queue"));
-        message.setGroupID("group");
-        message.setGroupSequence(4);
-        message.setCorrelationId("correlation");
-        message.setMessageId(new MessageId("c1:1:1", 1));
-
-        assertBeanMarshalls(message);
-        assertBeanMarshalls(message);
-
-    }
-
-    public void xtestPerformance() throws IOException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        message.setProducerId(new ProducerId(new SessionId(new ConnectionId(new ConnectionId("test")), 1), 1));
-        message.setMessageId(new MessageId(message.getProducerId(), 1));
-        message.setCommandId((short)1);
-        message.setGroupID("group");
-        message.setGroupSequence(4);
-        message.setCorrelationId("correlation");
-        message.setContent(new ByteSequence(new byte[1024], 0, 1024));
-        message.setTimestamp(System.currentTimeMillis());
-        message.setDestination(new ActiveMQQueue("TEST"));
-
-        int p = 1000000;
-
-        long start = System.currentTimeMillis();
-        for (int i = 0; i < p; i++) {
-            marshalAndUnmarshall(message, wireFormat);
-        }
-        long end = System.currentTimeMillis();
-
-        LOG.info("marshaled/unmarshaled: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageTest.java
deleted file mode 100755
index dbf33fc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.command;
-
-import java.io.IOException;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-
-public class MessageTest extends DataStructureTestSupport {
-
-    public boolean cacheEnabled;
-
-    public static Test suite() {
-        return suite(MessageTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public void initCombosForTestActiveMQMessageMarshaling() {
-        addCombinationValues("cacheEnabled", new Object[] {Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testActiveMQMessageMarshaling() throws IOException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        message.setCommandId((short)1);
-        message.setOriginalDestination(new ActiveMQQueue("queue"));
-        message.setGroupID("group");
-        message.setGroupSequence(4);
-        message.setCorrelationId("correlation");
-        message.setMessageId(new MessageId("c1:1:1", 1));
-        assertBeanMarshalls(message);
-    }
-
-    public void testActiveMQMessageMarshalingBigMessageId() throws IOException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        message.setCommandId((short)1);
-        message.setOriginalDestination(new ActiveMQQueue("queue"));
-        message.setGroupID("group");
-        message.setGroupSequence(4);
-        message.setCorrelationId("correlation");
-        message.setMessageId(new MessageId("c1:1:1", Short.MAX_VALUE));
-        assertBeanMarshalls(message);
-    }
-
-    public void testActiveMQMessageMarshalingBiggerMessageId() throws IOException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        message.setCommandId((short)1);
-        message.setOriginalDestination(new ActiveMQQueue("queue"));
-        message.setGroupID("group");
-        message.setGroupSequence(4);
-        message.setCorrelationId("correlation");
-        message.setMessageId(new MessageId("c1:1:1", Integer.MAX_VALUE));
-        assertBeanMarshalls(message);
-    }
-
-    public void testActiveMQMessageMarshalingBiggestMessageId() throws IOException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        message.setCommandId((short)1);
-        message.setOriginalDestination(new ActiveMQQueue("queue"));
-        message.setGroupID("group");
-        message.setGroupSequence(4);
-        message.setCorrelationId("correlation");
-        message.setMessageId(new MessageId("c1:1:1", Long.MAX_VALUE));
-        assertBeanMarshalls(message);
-    }
-
-    public void testMessageIdMarshaling() throws IOException {
-        assertBeanMarshalls(new MessageId("c1:1:1", 1));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java
deleted file mode 100644
index f8c3ec5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.config;
-
-import javax.jms.Connection;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class BrokerPropertiesTest extends TestCase {
-    private static final transient Logger LOG = LoggerFactory.getLogger(BrokerPropertiesTest.class);
-    
-    public void testPropertiesFile() throws Exception {
-        BrokerService broker = BrokerFactory.createBroker("properties:org/apache/activemq/config/broker.properties");
-
-        LOG.info("Created broker: " + broker);
-        assertNotNull(broker);
-
-        assertEquals("isUseJmx()", false, broker.isUseJmx());
-        assertEquals("isPersistent()", false, broker.isPersistent());
-        assertEquals("getBrokerName()", "Cheese", broker.getBrokerName());
-        broker.stop();
-    }
-
-
-    public void testVmBrokerPropertiesFile() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?brokerConfig=properties:org/apache/activemq/config/broker.properties");
-        Connection connection = factory.createConnection();
-        BrokerService broker = BrokerRegistry.getInstance().lookup("Cheese");
-        LOG.info("Found broker : " + broker);
-        assertNotNull(broker);
-
-        assertEquals("isUseJmx()", false, broker.isUseJmx());
-        assertEquals("isPersistent()", false, broker.isPersistent());
-        assertEquals("getBrokerName()", "Cheese", broker.getBrokerName());
-        connection.close();
-        broker.stop();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
deleted file mode 100755
index 89548e0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.config;
-
-import java.io.File;
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-
-/**
- * 
- */
-public class BrokerXmlConfigFromJNDITest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        assertBaseDirectoryContainsSpaces();
-
-        // we could put these properties into a jndi.properties
-        // on the classpath instead
-        Hashtable properties = new Hashtable();
-        properties.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-
-        // configure the embedded broker using an XML config file
-        // which is either a URL or a resource on the classpath
-        File f = new File(System.getProperty("basedir", "."), "/src/test/resources/activemq.xml");
-        properties.put(Context.PROVIDER_URL, "vm://localhost?brokerConfig=xbean:" + f.toURI());
-
-        InitialContext context = new InitialContext(properties);
-        ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) context.lookup("ConnectionFactory");
-
-        // END SNIPPET: example
-        return connectionFactory;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java
deleted file mode 100755
index c392b12..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.config;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-
-/**
- * 
- */
-public class BrokerXmlConfigTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        // START SNIPPET: bean
-
-        // configure the connection factory using
-        // normal Java Bean property methods
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
-
-        // configure the embedded broker using an XML config file
-        // which is either a URL or a resource on the classpath
-
-        // TODO ...
-
-        //connectionFactory.setBrokerXmlConfig("file:src/sample-conf/default.xml");
-
-        // you only need to configure the broker URL if you wish to change the
-        // default connection mechanism, which in this test case we do
-        connectionFactory.setBrokerURL("vm://localhost");
-
-        // END SNIPPET: bean
-        return connectionFactory;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java
deleted file mode 100755
index de6c979..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/**
- * 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.config;
-
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.util.List;
-
-import javax.sql.DataSource;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.FixedSizedSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.LastImageSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy;
-import org.apache.activemq.broker.region.policy.SimpleDispatchPolicy;
-import org.apache.activemq.broker.region.policy.StrictOrderDispatchPolicy;
-import org.apache.activemq.broker.region.policy.SubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.TimedSubscriptionRecoveryPolicy;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.jdbc.DefaultDatabaseLocker;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.jdbc.adapter.TransactDatabaseLocker;
-import org.apache.activemq.store.journal.JournalPersistenceAdapter;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.apache.activemq.transport.tcp.TcpTransportServer;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.wireformat.ObjectStreamWireFormat;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.FileSystemResource;
-import org.springframework.core.io.Resource;
-
-/**
- * 
- */
-public class ConfigTest extends TestCase {
-
-    protected static final String JOURNAL_ROOT = "target/test-data/";
-    protected static final String DERBY_ROOT = "target/test-data/";
-    protected static final String CONF_ROOT = "src/test/resources/org/apache/activemq/config/sample-conf/";
-    private static final Logger LOG = LoggerFactory.getLogger(ConfigTest.class);
-
-    static {
-        System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore");
-        System.setProperty("javax.net.ssl.trustStorePassword", "password");
-        System.setProperty("javax.net.ssl.trustStoreType", "jks");
-        System.setProperty("javax.net.ssl.keyStore", "src/test/resources/server.keystore");
-        System.setProperty("javax.net.ssl.keyStorePassword", "password");
-        System.setProperty("javax.net.ssl.keyStoreType", "jks");
-    }
-
-    /*
-     * IMPORTANT NOTE: Assertions checking for the existence of the derby
-     * directory will fail if the first derby directory is not created under
-     * target/test-data/. The test in unable to change the derby root directory
-     * for succeeding creation. It uses the first created directory as the root.
-     */
-
-    /*
-     * This tests creating a journal persistence adapter using the persistence
-     * adapter factory bean
-     */
-    public void testJournaledJDBCConfig() throws Exception {
-        // System.out.print("Checking journaled JDBC persistence adapter
-        // configuration... ");
-
-        File journalFile = new File(JOURNAL_ROOT + "testJournaledJDBCConfig/journal");
-        recursiveDelete(journalFile);
-
-        File derbyFile = new File(DERBY_ROOT + "testJournaledJDBCConfig/derbydb"); // Default
-                                                                                    // derby
-                                                                                    // name
-        recursiveDelete(derbyFile);
-
-        BrokerService broker;
-        broker = createBroker(new FileSystemResource(CONF_ROOT + "journaledjdbc-example.xml"));
-        try {
-            assertEquals("Broker Config Error (brokerName)", "brokerJournaledJDBCConfigTest", broker.getBrokerName());
-
-            PersistenceAdapter adapter = broker.getPersistenceAdapter();
-
-            assertTrue("Should have created a journal persistence adapter", adapter instanceof JournalPersistenceAdapter);
-            assertTrue("Should have created a derby directory at " + derbyFile.getAbsolutePath(), derbyFile.exists());
-            assertTrue("Should have created a journal directory at " + journalFile.getAbsolutePath(), journalFile.exists());
-
-            // Check persistence factory configurations
-            // System.out.print("Checking persistence adapter factory
-            // settings... ");
-            broker.getPersistenceAdapter();
-            
-            assertTrue(broker.getSystemUsage().getStoreUsage().getStore() instanceof JournalPersistenceAdapter);
-
-            LOG.info("Success");
-        } finally {
-            if (broker != null) {
-                broker.stop();
-            }
-        }
-    }
-
-    /*
-     * This tests creating a jdbc persistence adapter using xbeans-spring
-     */
-    public void testJdbcConfig() throws Exception {
-        // System.out.print("Checking jdbc persistence adapter configuration...
-        // ");     
-        File journalFile = new File(JOURNAL_ROOT + "testJDBCConfig/journal");
-        recursiveDelete(journalFile);
-        
-        File derbyFile = new File(DERBY_ROOT + "testJDBCConfig/derbydb"); // Default
-                                                                            // derby
-                                                                            // name
-        recursiveDelete(derbyFile);
-
-        BrokerService broker;
-        broker = createBroker(new FileSystemResource(CONF_ROOT + "jdbc-example.xml"));
-        try {
-            assertEquals("Broker Config Error (brokerName)", "brokerJdbcConfigTest", broker.getBrokerName());
-
-            PersistenceAdapter adapter = broker.getPersistenceAdapter();
-
-            assertTrue("Should have created a jdbc persistence adapter", adapter instanceof JDBCPersistenceAdapter);
-            assertEquals("JDBC Adapter Config Error (cleanupPeriod)", 60000, ((JDBCPersistenceAdapter)adapter).getCleanupPeriod());
-            assertTrue("Should have created an EmbeddedDataSource", ((JDBCPersistenceAdapter)adapter).getDataSource() instanceof EmbeddedDataSource);
-            assertTrue("Should have created a DefaultWireFormat", ((JDBCPersistenceAdapter)adapter).getWireFormat() instanceof ObjectStreamWireFormat);
-
-            LOG.info("Success");
-        } finally {
-            if (broker != null) {
-                broker.stop();
-            }
-        }
-    }
-
-    public void testJdbcLockConfigOverride() throws Exception {
-      
-        JDBCPersistenceAdapter adapter = new JDBCPersistenceAdapter();
-        Mockery context = new Mockery();
-        final DataSource dataSource = context.mock(DataSource.class);
-        final Connection connection = context.mock(Connection.class);
-        final DatabaseMetaData metadata = context.mock(DatabaseMetaData.class);
-        final ResultSet result = context.mock(ResultSet.class);
-        adapter.setDataSource(dataSource);
-        adapter.setCreateTablesOnStartup(false);
-        
-        context.checking(new Expectations() {{
-            allowing (dataSource).getConnection(); will (returnValue(connection));
-            allowing (connection).getMetaData(); will (returnValue(metadata));
-            allowing (connection);
-            allowing (metadata).getDriverName(); will (returnValue("Microsoft_SQL_Server_2005_jdbc_driver"));
-            allowing (result).next(); will (returnValue(true));
-        }});
-        
-        adapter.start();
-        assertTrue("has the locker override", adapter.getDatabaseLocker() instanceof TransactDatabaseLocker);
-        adapter.stop();
-    }
-
-    
-
-    public void testJdbcLockConfigDefault() throws Exception {
-      
-        JDBCPersistenceAdapter adapter = new JDBCPersistenceAdapter();
-        Mockery context = new Mockery();
-        final DataSource dataSource = context.mock(DataSource.class);
-        final Connection connection = context.mock(Connection.class);
-        final DatabaseMetaData metadata = context.mock(DatabaseMetaData.class);
-        final ResultSet result = context.mock(ResultSet.class);
-        adapter.setDataSource(dataSource);
-        adapter.setCreateTablesOnStartup(false);
-        
-        context.checking(new Expectations() {{
-            allowing (dataSource).getConnection(); will (returnValue(connection));
-            allowing (connection).getMetaData(); will (returnValue(metadata));
-            allowing (connection);
-            allowing (metadata).getDriverName(); will (returnValue("Some_Unknown_driver"));
-            allowing (result).next(); will (returnValue(true));
-        }});
-        
-        adapter.start();
-        assertEquals("has the default locker", adapter.getDatabaseLocker().getClass(), DefaultDatabaseLocker.class);
-        adapter.stop();
-    }
-
-    /*
-     * This tests configuring the different broker properties using
-     * xbeans-spring
-     */
-    public void testBrokerConfig() throws Exception {
-        ActiveMQTopic dest;
-        BrokerService broker;
-
-        File journalFile = new File(JOURNAL_ROOT);
-        recursiveDelete(journalFile);
-
-        // Create broker from resource
-        // System.out.print("Creating broker... ");
-        broker = createBroker("org/apache/activemq/config/example.xml");
-        LOG.info("Success");
-
-        try {
-            // Check broker configuration
-            // System.out.print("Checking broker configurations... ");
-            assertEquals("Broker Config Error (brokerName)", "brokerConfigTest", broker.getBrokerName());
-            assertEquals("Broker Config Error (populateJMSXUserID)", false, broker.isPopulateJMSXUserID());
-            assertEquals("Broker Config Error (useLoggingForShutdownErrors)", true, broker.isUseLoggingForShutdownErrors());
-            assertEquals("Broker Config Error (useJmx)", true, broker.isUseJmx());
-            assertEquals("Broker Config Error (persistent)", false, broker.isPersistent());
-            assertEquals("Broker Config Error (useShutdownHook)", false, broker.isUseShutdownHook());
-            assertEquals("Broker Config Error (deleteAllMessagesOnStartup)", true, broker.isDeleteAllMessagesOnStartup());
-            LOG.info("Success");
-
-            // Check specific vm transport
-            // System.out.print("Checking vm connector... ");
-            assertEquals("Should have a specific VM Connector", "vm://javacoola", broker.getVmConnectorURI().toString());
-            LOG.info("Success");
-
-            // Check transport connectors list
-            // System.out.print("Checking transport connectors... ");
-            List connectors = broker.getTransportConnectors();
-            assertTrue("Should have created at least 3 connectors", connectors.size() >= 3);
-            assertTrue("1st connector should be TcpTransportServer", ((TransportConnector)connectors.get(0)).getServer() instanceof TcpTransportServer);
-            assertTrue("2nd connector should be TcpTransportServer", ((TransportConnector)connectors.get(1)).getServer() instanceof TcpTransportServer);
-            assertTrue("3rd connector should be TcpTransportServer", ((TransportConnector)connectors.get(2)).getServer() instanceof TcpTransportServer);
-
-            // Check network connectors
-            // System.out.print("Checking network connectors... ");
-            List networkConnectors = broker.getNetworkConnectors();
-            assertEquals("Should have a single network connector", 1, networkConnectors.size());
-            LOG.info("Success");
-
-            // Check dispatch policy configuration
-            // System.out.print("Checking dispatch policies... ");
-
-            dest = new ActiveMQTopic("Topic.SimpleDispatch");
-            assertTrue("Should have a simple dispatch policy for " + dest.getTopicName(),
-                       broker.getDestinationPolicy().getEntryFor(dest).getDispatchPolicy() instanceof SimpleDispatchPolicy);
-
-            dest = new ActiveMQTopic("Topic.RoundRobinDispatch");
-            assertTrue("Should have a round robin dispatch policy for " + dest.getTopicName(),
-                       broker.getDestinationPolicy().getEntryFor(dest).getDispatchPolicy() instanceof RoundRobinDispatchPolicy);
-
-            dest = new ActiveMQTopic("Topic.StrictOrderDispatch");
-            assertTrue("Should have a strict order dispatch policy for " + dest.getTopicName(),
-                       broker.getDestinationPolicy().getEntryFor(dest).getDispatchPolicy() instanceof StrictOrderDispatchPolicy);
-            LOG.info("Success");
-
-            // Check subscription policy configuration
-            // System.out.print("Checking subscription recovery policies... ");
-            SubscriptionRecoveryPolicy subsPolicy;
-
-            dest = new ActiveMQTopic("Topic.FixedSizedSubs");
-            subsPolicy = broker.getDestinationPolicy().getEntryFor(dest).getSubscriptionRecoveryPolicy();
-            assertTrue("Should have a fixed sized subscription recovery policy for " + dest.getTopicName(), subsPolicy instanceof FixedSizedSubscriptionRecoveryPolicy);
-            assertEquals("FixedSizedSubsPolicy Config Error (maximumSize)", 2000000, ((FixedSizedSubscriptionRecoveryPolicy)subsPolicy).getMaximumSize());
-            assertEquals("FixedSizedSubsPolicy Config Error (useSharedBuffer)", false, ((FixedSizedSubscriptionRecoveryPolicy)subsPolicy).isUseSharedBuffer());
-
-            dest = new ActiveMQTopic("Topic.LastImageSubs");
-            subsPolicy = broker.getDestinationPolicy().getEntryFor(dest).getSubscriptionRecoveryPolicy();
-            assertTrue("Should have a last image subscription recovery policy for " + dest.getTopicName(), subsPolicy instanceof LastImageSubscriptionRecoveryPolicy);
-
-            dest = new ActiveMQTopic("Topic.NoSubs");
-            subsPolicy = broker.getDestinationPolicy().getEntryFor(dest).getSubscriptionRecoveryPolicy();
-            assertTrue("Should have no subscription recovery policy for " + dest.getTopicName(), subsPolicy instanceof NoSubscriptionRecoveryPolicy);
-
-            dest = new ActiveMQTopic("Topic.TimedSubs");
-            subsPolicy = broker.getDestinationPolicy().getEntryFor(dest).getSubscriptionRecoveryPolicy();
-            assertTrue("Should have a timed subscription recovery policy for " + dest.getTopicName(), subsPolicy instanceof TimedSubscriptionRecoveryPolicy);
-            assertEquals("TimedSubsPolicy Config Error (recoverDuration)", 25000, ((TimedSubscriptionRecoveryPolicy)subsPolicy).getRecoverDuration());
-            LOG.info("Success");
-
-            // Check usage manager
-            // System.out.print("Checking memory manager configurations... ");
-            SystemUsage systemUsage = broker.getSystemUsage();
-            assertTrue("Should have a SystemUsage", systemUsage != null);
-            assertEquals("SystemUsage Config Error (MemoryUsage.limit)", 1024 * 1024 * 10, systemUsage.getMemoryUsage().getLimit());
-            assertEquals("SystemUsage Config Error (MemoryUsage.percentUsageMinDelta)", 20, systemUsage.getMemoryUsage().getPercentUsageMinDelta());
-            assertEquals("SystemUsage Config Error (TempUsage.limit)", 1024 * 1024 * 100, systemUsage.getTempUsage().getLimit());
-            assertEquals("SystemUsage Config Error (StoreUsage.limit)", 1024 * 1024 * 1024, systemUsage.getStoreUsage().getLimit());
-            assertEquals("SystemUsage Config Error (StoreUsage.name)", "foo", systemUsage.getStoreUsage().getName());
-            
-            assertNotNull(systemUsage.getStoreUsage().getStore());
-            assertTrue(systemUsage.getStoreUsage().getStore() instanceof MemoryPersistenceAdapter);
-                        
-            LOG.info("Success");
-
-        } finally {
-            if (broker != null) {
-                broker.stop();
-            }
-        }
-    }
-
-    /*
-     * This tests creating a journal persistence adapter using xbeans-spring
-     */
-    public void testJournalConfig() throws Exception {
-        // System.out.print("Checking journal persistence adapter
-        // configuration... ");
-
-        File journalFile = new File(JOURNAL_ROOT + "testJournalConfig/journal");
-        recursiveDelete(journalFile);
-
-        BrokerService broker;
-        broker = createBroker(new FileSystemResource(CONF_ROOT + "journal-example.xml"));
-        try {
-            assertEquals("Broker Config Error (brokerName)", "brokerJournalConfigTest", broker.getBrokerName());
-
-            PersistenceAdapter adapter = broker.getPersistenceAdapter();
-
-            assertTrue("Should have created a journal persistence adapter", adapter instanceof JournalPersistenceAdapter);
-            assertTrue("Should have created a journal directory at " + journalFile.getAbsolutePath(), journalFile.exists());
-
-            LOG.info("Success");
-        } finally {
-            if (broker != null) {
-                broker.stop();
-            }
-        }
-    }
-
-    /*
-     * This tests creating a memory persistence adapter using xbeans-spring
-     */
-    public void testMemoryConfig() throws Exception {
-        // System.out.print("Checking memory persistence adapter
-        // configuration... ");
-
-        File journalFile = new File(JOURNAL_ROOT + "testMemoryConfig");
-        recursiveDelete(journalFile);
-
-        File derbyFile = new File(DERBY_ROOT + "testMemoryConfig");
-        recursiveDelete(derbyFile);
-
-        BrokerService broker;
-        broker = createBroker(new FileSystemResource(CONF_ROOT + "memory-example.xml"));
-
-        try {
-            assertEquals("Broker Config Error (brokerName)", "brokerMemoryConfigTest", broker.getBrokerName());
-
-            PersistenceAdapter adapter = broker.getPersistenceAdapter();
-
-            assertTrue("Should have created a memory persistence adapter", adapter instanceof MemoryPersistenceAdapter);
-            assertTrue("Should have not created a derby directory at " + derbyFile.getAbsolutePath(), !derbyFile.exists());
-            assertTrue("Should have not created a journal directory at " + journalFile.getAbsolutePath(), !journalFile.exists());
-
-            LOG.info("Success");
-        } finally {
-            if (broker != null) {
-                broker.stop();
-            }
-        }
-
-    }
-
-    public void testXmlConfigHelper() throws Exception {
-        BrokerService broker;
-
-        broker = createBroker(new FileSystemResource(CONF_ROOT + "memory-example.xml"));
-        try {
-            assertEquals("Broker Config Error (brokerName)", "brokerMemoryConfigTest", broker.getBrokerName());
-        } finally {
-            if (broker != null) {
-                broker.stop();
-            }
-        }
-
-        broker = createBroker("org/apache/activemq/config/config.xml");
-        try {
-            assertEquals("Broker Config Error (brokerName)", "brokerXmlConfigHelper", broker.getBrokerName());
-        } finally {
-            if (broker != null) {
-                broker.stop();
-            }
-        }
-    }
-
-    /*
-     * TODO: Create additional tests for forwarding bridges
-     */
-
-    protected static void recursiveDelete(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        file.delete();
-    }
-
-    protected BrokerService createBroker(String resource) throws Exception {
-        return createBroker(new ClassPathResource(resource));
-    }
-
-    protected BrokerService createBroker(Resource resource) throws Exception {
-        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
-        factory.afterPropertiesSet();
-
-        BrokerService broker = factory.getBroker();
-
-        assertTrue("Should have a broker!", broker != null);
-
-        // Broker is already started by default when using the XML file
-        // broker.start();
-
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java b/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java
deleted file mode 100644
index 465e1e5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.config;
-
-import javax.jms.Connection;
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQMessageConsumer;
-import org.apache.activemq.command.ActiveMQQueue;
-
-public class ConfigUsingDestinationOptions extends TestCase {
-    public void testValidSelectorConfig() throws JMSException {
-        ActiveMQQueue queue = new ActiveMQQueue("TEST.FOO?consumer.selector=test=1");
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        Connection conn = factory.createConnection();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQMessageConsumer cons;
-        // JMS selector should be priority
-        cons = (ActiveMQMessageConsumer) sess.createConsumer(queue, "test=2");
-        assertEquals("test=2", cons.getMessageSelector());
-
-        // Test setting using JMS destinations
-        cons = (ActiveMQMessageConsumer) sess.createConsumer(queue);
-        assertEquals("test=1", cons.getMessageSelector());
-    }
-
-    public void testInvalidSelectorConfig() throws JMSException {
-        ActiveMQQueue queue = new ActiveMQQueue("TEST.FOO?consumer.selector=test||1");
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        Connection conn = factory.createConnection();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQMessageConsumer cons;
-        // JMS selector should be priority
-        try {
-            cons = (ActiveMQMessageConsumer) sess.createConsumer(queue, "test||1");
-            fail("Selector should be invalid");
-        } catch (InvalidSelectorException e) {
-
-        }
-
-        // Test setting using JMS destinations
-        try {
-            cons = (ActiveMQMessageConsumer) sess.createConsumer(queue);
-            fail("Selector should be invalid");
-        } catch (InvalidSelectorException e) {
-
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java b/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java
deleted file mode 100644
index 98ca666..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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 SimpleQueueSender class consists only of a main method,
- * which sends several messages to a queue.
- *
- * Run this program in conjunction with SimpleQueueReceiver.
- * Specify a queue name on the command line when you run the
- * program.  By default, the program sends one message.  Specify
- * a number after the queue name to send that number of messages.
- */
-package org.apache.activemq.demo;
-
-// START SNIPPET: demo
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple queue sender which does not use JNDI
- * 
- * 
- */
-public final class DefaultQueueSender {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DefaultQueueSender.class);
-
-    private DefaultQueueSender() {    
-    }
-
-    public static void main(String[] args) {
-
-        String uri = "tcp://localhost:61616";
-        String text = "Hello World!";
-
-        Connection connection = null;
-
-        if (args.length < 1) {
-            printUsage();
-            System.exit(1);
-        }
-
-        int idx = 0;
-        String arg = args[0];
-        if (arg.equals("-uri")) {
-            if (args.length == 1) {
-                printUsage();
-                System.exit(1);
-            }
-            uri = args[1];
-            idx += 2;
-        }
-        String queueName = args[idx];
-        LOG.info("Connecting to: " + uri);
-        LOG.info("Queue name is " + queueName);
-
-        if (++idx < args.length) {
-            text = args[idx];
-        }
-
-        try {
-            ConnectionFactory factory = new ActiveMQConnectionFactory(uri);
-            connection = factory.createConnection();
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Destination destination = session.createQueue(queueName);
-            MessageProducer producer = session.createProducer(destination);
-
-            Message message = session.createTextMessage(text);
-            producer.send(message);
-        } catch (JMSException e) {
-            LOG.info("Exception occurred: " + e.toString());
-        } finally {
-            if (connection != null) {
-                try {
-                    connection.close();
-                } catch (JMSException e) {
-                }
-            }
-        }
-    }
-
-    protected static void printUsage() {
-        System.out.println("Usage: java DefaultQueueSender [-uri <connection-uri>] " + "<queue-name> [<message-body>]");
-    }
-}
-
-// END SNIPPET: demo
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java
deleted file mode 100755
index 9b515ac..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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 SimpleQueueReceiver class consists only of a main method,
- * which fetches one or more messages from a queue using
- * synchronous message delivery.  Run this program in conjunction
- * with SimpleQueueSender.  Specify a queue name on the command
- * line when you run the program.
- */
-package org.apache.activemq.demo;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-/**
- * A simple polymorphic JMS consumer which can work with Queues or Topics which
- * uses JNDI to lookup the JMS connection factory and destination
- * 
- * 
- */
-public final class SimpleConsumer {
-
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-        .getLog(SimpleConsumer.class);
-
-    private SimpleConsumer() {
-    }
-
-    /**
-     * @param args the queue used by the example
-     */
-    public static void main(String[] args) {
-        String destinationName = null;
-        Context jndiContext = null;
-        ConnectionFactory connectionFactory = null;
-        Connection connection = null;
-        Session session = null;
-        Destination destination = null;
-        MessageConsumer consumer = null;
-
-        /*
-         * Read destination name from command line and display it.
-         */
-        if (args.length != 1) {
-            LOG.info("Usage: java SimpleConsumer <destination-name>");
-            System.exit(1);
-        }
-        destinationName = args[0];
-        LOG.info("Destination name is " + destinationName);
-
-        /*
-         * Create a JNDI API InitialContext object
-         */
-        try {
-            jndiContext = new InitialContext();
-        } catch (NamingException e) {
-            LOG.info("Could not create JNDI API " + "context: " + e.toString());
-            System.exit(1);
-        }
-
-        /*
-         * Look up connection factory and destination.
-         */
-        try {
-            connectionFactory = (ConnectionFactory)jndiContext.lookup("ConnectionFactory");
-            destination = (Destination)jndiContext.lookup(destinationName);
-        } catch (NamingException e) {
-            LOG.info("JNDI API lookup failed: " + e.toString());
-            System.exit(1);
-        }
-
-        /*
-         * Create connection. Create session from connection; false means
-         * session is not transacted. Create receiver, then start message
-         * delivery. Receive all text messages from destination until a non-text
-         * message is received indicating end of message stream. Close
-         * connection.
-         */
-        try {
-            connection = connectionFactory.createConnection();
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            consumer = session.createConsumer(destination);
-            connection.start();
-            while (true) {
-                Message m = consumer.receive(1);
-                if (m != null) {
-                    if (m instanceof TextMessage) {
-                        TextMessage message = (TextMessage)m;
-                        LOG.info("Reading message: " + message.getText());
-                    } else {
-                        break;
-                    }
-                }
-            }
-        } catch (JMSException e) {
-            LOG.info("Exception occurred: " + e);
-        } finally {
-            if (connection != null) {
-                try {
-                    connection.close();
-                } catch (JMSException e) {
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java
deleted file mode 100755
index 85061c8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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 SimpleQueueSender class consists only of a main method,
- * which sends several messages to a queue.
- *
- * Run this program in conjunction with SimpleQueueReceiver.
- * Specify a queue name on the command line when you run the
- * program.  By default, the program sends one message.  Specify
- * a number after the queue name to send that number of messages.
- */
-package org.apache.activemq.demo;
-
-// START SNIPPET: demo
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple polymorphic JMS producer which can work with Queues or Topics which
- * uses JNDI to lookup the JMS connection factory and destination
- * 
- * 
- */
-public final class SimpleProducer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleProducer.class);
-
-    private SimpleProducer() {
-    }
-
-    /**
-     * @param args the destination name to send to and optionally, the number of
-     *                messages to send
-     */
-    public static void main(String[] args) {
-        Context jndiContext = null;
-        ConnectionFactory connectionFactory = null;
-        Connection connection = null;
-        Session session = null;
-        Destination destination = null;
-        MessageProducer producer = null;
-        String destinationName = null;
-        final int numMsgs;
-
-        if ((args.length < 1) || (args.length > 2)) {
-            LOG.info("Usage: java SimpleProducer <destination-name> [<number-of-messages>]");
-            System.exit(1);
-        }
-        destinationName = args[0];
-        LOG.info("Destination name is " + destinationName);
-        if (args.length == 2) {
-            numMsgs = (new Integer(args[1])).intValue();
-        } else {
-            numMsgs = 1;
-        }
-
-        /*
-         * Create a JNDI API InitialContext object
-         */
-        try {
-            jndiContext = new InitialContext();
-        } catch (NamingException e) {
-            LOG.info("Could not create JNDI API context: " + e.toString());
-            System.exit(1);
-        }
-
-        /*
-         * Look up connection factory and destination.
-         */
-        try {
-            connectionFactory = (ConnectionFactory)jndiContext.lookup("ConnectionFactory");
-            destination = (Destination)jndiContext.lookup(destinationName);
-        } catch (NamingException e) {
-            LOG.info("JNDI API lookup failed: " + e);
-            System.exit(1);
-        }
-
-        /*
-         * Create connection. Create session from connection; false means
-         * session is not transacted. Create sender and text message. Send
-         * messages, varying text slightly. Send end-of-messages message.
-         * Finally, close connection.
-         */
-        try {
-            connection = connectionFactory.createConnection();
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            producer = session.createProducer(destination);
-            TextMessage message = session.createTextMessage();
-            for (int i = 0; i < numMsgs; i++) {
-                message.setText("This is message " + (i + 1));
-                LOG.info("Sending message: " + message.getText());
-                producer.send(message);
-            }
-
-            /*
-             * Send a non-text control message indicating end of messages.
-             */
-            producer.send(session.createMessage());
-        } catch (JMSException e) {
-            LOG.info("Exception occurred: " + e);
-        } finally {
-            if (connection != null) {
-                try {
-                    connection.close();
-                } catch (JMSException e) {
-                }
-            }
-        }
-    }
-}
-
-// END SNIPPET: demo
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java b/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java
deleted file mode 100755
index 791efa1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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 SimpleQueueReceiver class consists only of a main method,
- * which fetches one or more messages from a queue using
- * synchronous message delivery.  Run this program in conjunction
- * with SimpleQueueSender.  Specify a queue name on the command
- * line when you run the program.
- */
-package org.apache.activemq.demo;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class SimpleQueueReceiver {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleQueueReceiver.class);
-
-    private SimpleQueueReceiver() {
-    }
-
-    /**
-     * Main method.
-     * 
-     * @param args the queue used by the example
-     */
-    public static void main(String[] args) {
-        String queueName = null;
-        Context jndiContext = null;
-        QueueConnectionFactory queueConnectionFactory = null;
-        QueueConnection queueConnection = null;
-        QueueSession queueSession = null;
-        Queue queue = null;
-        QueueReceiver queueReceiver = null;
-        TextMessage message = null;
-
-        /*
-         * Read queue name from command line and display it.
-         */
-        if (args.length != 1) {
-            LOG.info("Usage: java " + "SimpleQueueReceiver <queue-name>");
-            System.exit(1);
-        }
-        queueName = args[0];
-        LOG.info("Queue name is " + queueName);
-
-        /*
-         * Create a JNDI API InitialContext object if none exists yet.
-         */
-        try {
-            jndiContext = new InitialContext();
-        } catch (NamingException e) {
-            LOG.info("Could not create JNDI API " + "context: " + e.toString());
-            System.exit(1);
-        }
-
-        /*
-         * Look up connection factory and queue. If either does not exist, exit.
-         */
-        try {
-            queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
-            queue = (Queue)jndiContext.lookup(queueName);
-        } catch (NamingException e) {
-            LOG.info("JNDI API lookup failed: " + e.toString());
-            System.exit(1);
-        }
-
-        /*
-         * Create connection. Create session from connection; false means
-         * session is not transacted. Create receiver, then start message
-         * delivery. Receive all text messages from queue until a non-text
-         * message is received indicating end of message stream. Close
-         * connection.
-         */
-        try {
-            queueConnection = queueConnectionFactory.createQueueConnection();
-            queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            queueReceiver = queueSession.createReceiver(queue);
-            queueConnection.start();
-            while (true) {
-                Message m = queueReceiver.receive(1);
-                if (m != null) {
-                    if (m instanceof TextMessage) {
-                        message = (TextMessage)m;
-                        LOG.info("Reading message: " + message.getText());
-                    } else {
-                        break;
-                    }
-                }
-            }
-        } catch (JMSException e) {
-            LOG.info("Exception occurred: " + e.toString());
-        } finally {
-            if (queueConnection != null) {
-                try {
-                    queueConnection.close();
-                } catch (JMSException e) {
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java b/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java
deleted file mode 100755
index 22ee403..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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 SimpleQueueSender class consists only of a main method,
- * which sends several messages to a queue.
- *
- * Run this program in conjunction with SimpleQueueReceiver.
- * Specify a queue name on the command line when you run the
- * program.  By default, the program sends one message.  Specify
- * a number after the queue name to send that number of messages.
- */
-package org.apache.activemq.demo;
-
-// START SNIPPET: demo
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class SimpleQueueSender {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleQueueSender.class);
-
-    private SimpleQueueSender() {
-    }
-
-    /**
-     * Main method.
-     * 
-     * @param args the queue used by the example and, optionally, the number of
-     *                messages to send
-     */
-    public static void main(String[] args) {
-        String queueName = null;
-        Context jndiContext = null;
-        QueueConnectionFactory queueConnectionFactory = null;
-        QueueConnection queueConnection = null;
-        QueueSession queueSession = null;
-        Queue queue = null;
-        QueueSender queueSender = null;
-        TextMessage message = null;
-        final int numMsgs;
-
-        if ((args.length < 1) || (args.length > 2)) {
-            LOG.info("Usage: java SimpleQueueSender " + "<queue-name> [<number-of-messages>]");
-            System.exit(1);
-        }
-        queueName = args[0];
-        LOG.info("Queue name is " + queueName);
-        if (args.length == 2) {
-            numMsgs = (new Integer(args[1])).intValue();
-        } else {
-            numMsgs = 1;
-        }
-
-        /*
-         * Create a JNDI API InitialContext object if none exists yet.
-         */
-        try {
-            jndiContext = new InitialContext();
-        } catch (NamingException e) {
-            LOG.info("Could not create JNDI API context: " + e.toString());
-            System.exit(1);
-        }
-
-        /*
-         * Look up connection factory and queue. If either does not exist, exit.
-         */
-        try {
-            queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
-            queue = (Queue)jndiContext.lookup(queueName);
-        } catch (NamingException e) {
-            LOG.info("JNDI API lookup failed: " + e);
-            System.exit(1);
-        }
-
-        /*
-         * Create connection. Create session from connection; false means
-         * session is not transacted. Create sender and text message. Send
-         * messages, varying text slightly. Send end-of-messages message.
-         * Finally, close connection.
-         */
-        try {
-            queueConnection = queueConnectionFactory.createQueueConnection();
-            queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            queueSender = queueSession.createSender(queue);
-            message = queueSession.createTextMessage();
-            for (int i = 0; i < numMsgs; i++) {
-                message.setText("This is message " + (i + 1));
-                LOG.info("Sending message: " + message.getText());
-                queueSender.send(message);
-            }
-
-            /*
-             * Send a non-text control message indicating end of messages.
-             */
-            queueSender.send(queueSession.createMessage());
-        } catch (JMSException e) {
-            LOG.info("Exception occurred: " + e.toString());
-        } finally {
-            if (queueConnection != null) {
-                try {
-                    queueConnection.close();
-                } catch (JMSException e) {
-                }
-            }
-        }
-    }
-}
-
-// END SNIPPET: demo
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java
deleted file mode 100644
index e119ca3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.filter;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class BadDummyPolicyConfigTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BadDummyPolicyConfigTest.class);
-    protected DummyPolicy policy = new DummyPolicy();
-
-    public void testNoDestinationSpecified() throws Exception {
-        DummyPolicyEntry entry = new DummyPolicyEntry();
-        entry.setDescription("cheese");
-
-        assertFailsToSetEntries(entry);
-    }
-
-    public void testNoValueSpecified() throws Exception {
-        DummyPolicyEntry entry = new DummyPolicyEntry();
-        entry.setTopic("FOO.BAR");
-
-        assertFailsToSetEntries(entry);
-    }
-
-    public void testValidEntry() throws Exception {
-        DummyPolicyEntry entry = new DummyPolicyEntry();
-        entry.setDescription("cheese");
-        entry.setTopic("FOO.BAR");
-
-        entry.afterPropertiesSet();
-    }
-
-    protected void assertFailsToSetEntries(DummyPolicyEntry entry) throws Exception {
-        try {
-            entry.afterPropertiesSet();
-        } catch (IllegalArgumentException e) {
-            LOG.info("Worked! Caught expected exception: " + e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationFilterTest.java
deleted file mode 100644
index 53ea0e7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationFilterTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.filter;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-import junit.framework.TestCase;
-
-public class DestinationFilterTest extends TestCase {
-
-	public void testPrefixFilter() throws Exception {
-		DestinationFilter filter = DestinationFilter.parseFilter(new ActiveMQQueue(">"));
-		assertTrue("Filter not parsed well: " + filter.getClass(), filter instanceof PrefixDestinationFilter);
-		System.out.println(filter);
-		assertFalse("Filter matched wrong destination type", filter.matches(new ActiveMQTopic(">")));
-	}
-
-	public void testWildcardFilter() throws Exception {
-		DestinationFilter filter = DestinationFilter.parseFilter(new ActiveMQQueue("A.*"));
-		assertTrue("Filter not parsed well: " + filter.getClass(), filter instanceof WildcardDestinationFilter);
-		assertFalse("Filter matched wrong destination type", filter.matches(new ActiveMQTopic("A.B")));
-	}
-
-	public void testCompositeFilter() throws Exception {
-		DestinationFilter filter = DestinationFilter.parseFilter(new ActiveMQQueue("A.B,B.C"));
-		assertTrue("Filter not parsed well: " + filter.getClass(), filter instanceof CompositeDestinationFilter);
-		assertFalse("Filter matched wrong destination type", filter.matches(new ActiveMQTopic("A.B")));
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapMemoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapMemoryTest.java
deleted file mode 100644
index 42edaf4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapMemoryTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.filter;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-
-public class DestinationMapMemoryTest extends TestCase {
-
-    public void testLongDestinationPath() throws Exception {
-        ActiveMQTopic d1 = new ActiveMQTopic("1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18");
-        DestinationMap map = new DestinationMap();
-        map.put(d1, d1);
-    }
-
-    public void testVeryLongestinationPaths() throws Exception {
-
-        for (int i = 1; i < 100; i++) {
-            String name = "1";
-            for (int j = 2; j <= i; j++) {
-                name += "." + j;
-            }
-            // System.out.println("Checking: " + name);
-            try {
-                ActiveMQDestination d1 = createDestination(name);
-                DestinationMap map = new DestinationMap();
-                map.put(d1, d1);
-            } catch (Throwable e) {
-                fail("Destination name too long: " + name + " : " + e);
-            }
-        }
-    }
-
-    protected ActiveMQDestination createDestination(String name) {
-        return new ActiveMQTopic(name);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTempDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTempDestinationTest.java
deleted file mode 100644
index ffe8dd9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTempDestinationTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.Set;
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.util.IdGenerator;
-
-public class DestinationMapTempDestinationTest extends TestCase {
-    
-    public void testtestTempDestinations() throws Exception {
-        ConnectionId id = new ConnectionId(new IdGenerator().generateId());
-        DestinationMap map = new DestinationMap();
-        Object value = new Object();
-        int count = 1000;
-        for (int i = 0; i < count; i++) {
-            ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
-            map.put(queue, value);
-        }
-        for (int i = 0; i < count; i++) {
-            ActiveMQTempQueue queue = new ActiveMQTempQueue(id, i);
-            map.remove(queue, value);
-            Set set = map.get(queue);
-            assertTrue(set.isEmpty());
-        }
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTest.java
deleted file mode 100755
index 0acf11f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTest.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-public class DestinationMapTest extends TestCase {
-    protected DestinationMap map = new DestinationMap();
-
-    protected ActiveMQDestination d1 = createDestination("TEST.D1");
-    protected ActiveMQDestination d2 = createDestination("TEST.BAR.D2");
-    protected ActiveMQDestination d3 = createDestination("TEST.BAR.D3");
-    protected ActiveMQDestination compositeDestination1 = createDestination("TEST.D1,TEST.BAR.D2");
-    protected ActiveMQDestination compositeDestination2 = createDestination("TEST.D1,TEST.BAR.D3");
-
-    protected Object v1 = "value1";
-    protected Object v2 = "value2";
-    protected Object v3 = "value3";
-    protected Object v4 = "value4";
-    protected Object v5 = "value5";
-    protected Object v6 = "value6";
-
-    public void testCompositeDestinations() throws Exception {
-        ActiveMQDestination d1 = createDestination("TEST.BAR.D2");
-        ActiveMQDestination d2 = createDestination("TEST.BAR.D3");
-        map.put(d1, d1);
-        map.put(d2, d2);
-        map.get(createDestination("TEST.BAR.D2,TEST.BAR.D3"));
-
-    }
-
-    public void testSimpleDestinations() throws Exception {
-        map.put(d1, v1);
-        map.put(d2, v2);
-        map.put(d3, v3);
-
-        assertMapValue(d1, v1);
-        assertMapValue(d2, v2);
-        assertMapValue(d3, v3);
-    }
-
-    public void testQueueAndTopicWithSameName() throws Exception {
-        ActiveMQQueue q1 = new ActiveMQQueue("foo");
-        ActiveMQTopic t1 = new ActiveMQTopic("foo");
-
-        map.put(q1, v1);
-        map.put(t1, v2);
-
-        assertMapValue(q1, v1);
-        assertMapValue(t1, v2);
-    }
-
-    public void testSimpleDestinationsWithMultipleValues() throws Exception {
-        map.put(d1, v1);
-        map.put(d2, v2);
-        map.put(d2, v3);
-
-        assertMapValue(d1, v1);
-        assertMapValue("TEST.BAR.D2", v2, v3);
-        assertMapValue(d3, null);
-    }
-
-    public void testSimpleAndCompositeDestinations() throws Exception {
-        map.put(d1, v1);
-        map.put(compositeDestination1, v2);
-        map.put(compositeDestination2, v3);
-
-        assertMapValue("TEST.D1", v1, v2, v3);
-        assertMapValue(d2, v2);
-        assertMapValue(d3, v3);
-        assertMapValue(compositeDestination1.toString(), v1, v2, v3);
-        assertMapValue(compositeDestination2.toString(), v1, v2, v3);
-
-        map.remove(compositeDestination1, v2);
-        map.remove(compositeDestination2, v3);
-
-        assertMapValue("TEST.D1", v1);
-    }
-
-    public void testLookupOneStepWildcardDestinations() throws Exception {
-        map.put(d1, v1);
-        map.put(d2, v2);
-        map.put(d3, v3);
-
-        assertMapValue("TEST.D1", v1);
-        assertMapValue("TEST.*", v1);
-        assertMapValue("*.D1", v1);
-        assertMapValue("*.*", v1);
-
-        assertMapValue("TEST.BAR.D2", v2);
-        assertMapValue("TEST.*.D2", v2);
-        assertMapValue("*.BAR.D2", v2);
-        assertMapValue("*.*.D2", v2);
-
-        assertMapValue("TEST.BAR.D3", v3);
-        assertMapValue("TEST.*.D3", v3);
-        assertMapValue("*.BAR.D3", v3);
-        assertMapValue("*.*.D3", v3);
-
-        assertMapValue("TEST.BAR.D4", null);
-
-        assertMapValue("TEST.BAR.*", v2, v3);
-    }
-
-    public void testLookupMultiStepWildcardDestinations() throws Exception {
-        map.put(d1, v1);
-        map.put(d2, v2);
-        map.put(d3, v3);
-
-        List allValues = Arrays.asList(new Object[] {v1, v2, v3});
-
-        assertMapValue(">", allValues);
-        assertMapValue("TEST.>", allValues);
-        assertMapValue("*.>", allValues);
-
-        assertMapValue("FOO.>", null);
-    }
-
-    public void testStoreWildcardWithOneStepPath() throws Exception {
-        put("TEST.*", v1);
-        put("TEST.D1", v2);
-        put("TEST.BAR.*", v2);
-        put("TEST.BAR.D3", v3);
-
-        assertMapValue("FOO", null);
-        assertMapValue("TEST.FOO", v1);
-        assertMapValue("TEST.D1", v1, v2);
-
-        assertMapValue("TEST.FOO.FOO", null);
-        assertMapValue("TEST.BAR.FOO", v2);
-        assertMapValue("TEST.BAR.D3", v2, v3);
-
-        assertMapValue("TEST.*", v1, v2);
-        assertMapValue("*.D1", v1, v2);
-        assertMapValue("*.*", v1, v2);
-        assertMapValue("TEST.*.*", v2, v3);
-        assertMapValue("TEST.BAR.*", v2, v3);
-        assertMapValue("*.*.*", v2, v3);
-        assertMapValue("*.BAR.*", v2, v3);
-        assertMapValue("*.BAR.D3", v2, v3);
-        assertMapValue("*.*.D3", v2, v3);
-    }
-
-    public void testStoreWildcardInMiddleOfPath() throws Exception {
-        put("TEST.*", v1);
-        put("TEST.D1", v2);
-        put("TEST.BAR.*", v2);
-        put("TEST.XYZ.D3", v3);
-        put("TEST.XYZ.D4", v4);
-        put("TEST.BAR.D3", v5);
-        put("TEST.*.D2", v6);
-
-        assertMapValue("TEST.*.D3", v2, v3, v5);
-        assertMapValue("TEST.*.D4", v2, v4);
-
-        assertMapValue("TEST.*", v1, v2);
-        assertMapValue("TEST.*.*", v2, v3, v4, v5, v6);
-        assertMapValue("TEST.*.>", v1, v2, v3, v4, v5, v6);
-        assertMapValue("TEST.>", v1, v2, v3, v4, v5, v6);
-        assertMapValue("TEST.>.>", v1, v2, v3, v4, v5, v6);
-        assertMapValue("*.*.D3", v2, v3, v5);
-        assertMapValue("TEST.BAR.*", v2, v5, v6);
-
-        assertMapValue("TEST.BAR.D2", v2, v6);
-        assertMapValue("TEST.*.D2", v2, v6);
-        assertMapValue("TEST.BAR.*", v2, v5, v6);
-    }
-
-    public void testDoubleWildcardDoesNotMatchLongerPattern() throws Exception {
-        put("TEST.*", v1);
-        put("TEST.BAR.D3", v2);
-
-        assertMapValue("*.*.D3", v2);
-    }
-
-    public void testWildcardAtEndOfPathAndAtBeginningOfSearch() throws Exception {
-        put("TEST.*", v1);
-
-        assertMapValue("*.D1", v1);
-    }
-
-    public void testAnyPathWildcardInMap() throws Exception {
-        put("TEST.FOO.>", v1);
-
-        assertMapValue("TEST.FOO.BAR.WHANOT.A.B.C", v1);
-        assertMapValue("TEST.FOO.BAR.WHANOT", v1);
-        assertMapValue("TEST.FOO.BAR", v1);
-
-        assertMapValue("TEST.*.*", v1);
-        assertMapValue("TEST.BAR", null);
-
-        assertMapValue("TEST.FOO", v1);
-    }
-
-    public void testSimpleAddRemove() throws Exception {
-        put("TEST.D1", v2);
-
-        assertEquals("Root child count", 1, map.getTopicRootChildCount());
-
-        assertMapValue("TEST.D1", v2);
-
-        remove("TEST.D1", v2);
-
-        assertEquals("Root child count", 0, map.getTopicRootChildCount());
-        assertMapValue("TEST.D1", null);
-    }
-
-    public void testStoreAndLookupAllWildcards() throws Exception {
-        loadSample2();
-
-        assertSample2();
-
-        // lets remove everything and add it back
-        remove("TEST.FOO", v1);
-
-        assertMapValue("TEST.FOO", v2, v3, v4);
-        assertMapValue("TEST.*", v2, v3, v4, v6);
-        assertMapValue("*.*", v2, v3, v4, v6);
-
-        remove("TEST.XYZ", v6);
-
-        assertMapValue("TEST.*", v2, v3, v4);
-        assertMapValue("*.*", v2, v3, v4);
-
-        remove("TEST.*", v2);
-
-        assertMapValue("TEST.*", v3, v4);
-        assertMapValue("*.*", v3, v4);
-
-        remove(">", v4);
-
-        assertMapValue("TEST.*", v3);
-        assertMapValue("*.*", v3);
-
-        remove("TEST.>", v3);
-        remove("TEST.FOO.BAR", v5);
-
-        assertMapValue("FOO", null);
-        assertMapValue("TEST.FOO", null);
-        assertMapValue("TEST.D1", null);
-
-        assertMapValue("TEST.FOO.FOO", null);
-        assertMapValue("TEST.BAR.FOO", null);
-        assertMapValue("TEST.FOO.BAR", null);
-        assertMapValue("TEST.BAR.D3", null);
-
-        assertMapValue("TEST.*", null);
-        assertMapValue("*.*", null);
-        assertMapValue("*.D1", null);
-        assertMapValue("TEST.*.*", null);
-        assertMapValue("TEST.BAR.*", null);
-
-        loadSample2();
-
-        assertSample2();
-
-        remove(">", v4);
-        remove("TEST.*", v2);
-
-        assertMapValue("FOO", null);
-        assertMapValue("TEST.FOO", v1, v3);
-        assertMapValue("TEST.D1", v3);
-
-        assertMapValue("TEST.FOO.FOO", v3);
-        assertMapValue("TEST.BAR.FOO", v3);
-        assertMapValue("TEST.FOO.BAR", v3, v5);
-        assertMapValue("TEST.BAR.D3", v3);
-
-        assertMapValue("TEST.*", v1, v3, v6);
-        assertMapValue("*.*", v1, v3, v6);
-        assertMapValue("*.D1", v3);
-        assertMapValue("TEST.*.*", v3, v5);
-        assertMapValue("TEST.BAR.*", v3);
-    }
-
-    public void testAddAndRemove() throws Exception {
-
-        put("FOO.A", v1);
-        assertMapValue("FOO.>", v1);
-
-        put("FOO.B", v2);
-        assertMapValue("FOO.>", v1, v2);
-
-        Set set = map.removeAll(createDestination("FOO.A"));
-
-        assertMapValue("FOO.>", v2);
-
-    }
-
-    protected void loadSample2() {
-        put("TEST.FOO", v1);
-        put("TEST.*", v2);
-        put("TEST.>", v3);
-        put(">", v4);
-        put("TEST.FOO.BAR", v5);
-        put("TEST.XYZ", v6);
-    }
-
-    protected void assertSample2() {
-        assertMapValue("FOO", v4);
-        assertMapValue("TEST.FOO", v1, v2, v3, v4);
-        assertMapValue("TEST.D1", v2, v3, v4);
-
-        assertMapValue("TEST.FOO.FOO", v3, v4);
-        assertMapValue("TEST.BAR.FOO", v3, v4);
-        assertMapValue("TEST.FOO.BAR", v3, v4, v5);
-        assertMapValue("TEST.BAR.D3", v3, v4);
-
-        assertMapValue("TEST.*", v1, v2, v3, v4, v6);
-        assertMapValue("*.*", v1, v2, v3, v4, v6);
-        assertMapValue("*.D1", v2, v3, v4);
-        assertMapValue("TEST.*.*", v3, v4, v5);
-        assertMapValue("TEST.BAR.*", v3, v4);
-    }
-
-    protected void put(String name, Object value) {
-        map.put(createDestination(name), value);
-    }
-
-    protected void remove(String name, Object value) {
-        ActiveMQDestination destination = createDestination(name);
-        map.remove(destination, value);
-    }
-
-    protected void assertMapValue(String destinationName, Object expected) {
-        ActiveMQDestination destination = createDestination(destinationName);
-        assertMapValue(destination, expected);
-    }
-
-    protected void assertMapValue(String destinationName, Object expected1, Object expected2) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2}));
-    }
-
-    protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3}));
-    }
-
-    protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3, Object expected4) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3, expected4}));
-    }
-
-    protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3, Object expected4, Object expected5) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3, expected4, expected5}));
-    }
-
-    protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3, Object expected4, Object expected5, Object expected6) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3, expected4, expected5, expected6}));
-    }
-
-    @SuppressWarnings("unchecked")
-    protected void assertMapValue(ActiveMQDestination destination, Object expected) {
-        List expectedList = null;
-        if (expected == null) {
-            expectedList = Collections.EMPTY_LIST;
-        } else if (expected instanceof List) {
-            expectedList = (List)expected;
-        } else {
-            expectedList = new ArrayList();
-            expectedList.add(expected);
-        }
-        Collections.sort(expectedList);
-        Set actualSet = map.get(destination);
-        List actual = new ArrayList(actualSet);
-        Collections.sort(actual);
-        assertEquals("map value for destinationName:  " + destination, expectedList, actual);
-    }
-
-    protected ActiveMQDestination createDestination(String name) {
-        return new ActiveMQTopic(name);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationPathTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationPathTest.java
deleted file mode 100755
index 397ccca..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationPathTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.filter;
-
-import org.apache.activemq.test.TestSupport;
-
-public class DestinationPathTest extends TestSupport {
-
-    public void testPathParse() {
-        assertParse("FOO", new String[]{"FOO"});
-        assertParse("FOO.BAR", new String[]{"FOO", "BAR"});
-        assertParse("FOO.*", new String[]{"FOO", "*"});
-        assertParse("FOO.>", new String[]{"FOO", ">"});
-        assertParse("FOO.BAR.XYZ", new String[]{"FOO", "BAR", "XYZ"});
-        assertParse("FOO.BAR.", new String[]{"FOO", "BAR", ""});
-    }
-
-    protected void assertParse(String subject, String[] expected) {
-        String[] path = DestinationPath.getDestinationPaths(subject);
-        assertArrayEqual(subject, expected, path);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicy.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicy.java
deleted file mode 100644
index 893952b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicy.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.List;
-
-/**
- * Represents a destination based policy
- * 
- * 
- */
-public class DummyPolicy extends DestinationMap {
-
-    protected Class getEntryClass() {
-        return DummyPolicyEntry.class;
-    }
-
-    public void setEntries(List entries) {
-        super.setEntries(entries);
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyEntry.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyEntry.java
deleted file mode 100644
index 443e34e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyEntry.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.filter;
-
-
-/**
- * 
- * 
- */
-public class DummyPolicyEntry extends DestinationMapEntry {
-
-    private String description;
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Object getValue() {
-        return description;
-    }
-
-    protected String getValuePropertyName() {
-        return "description";
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java
deleted file mode 100644
index 0721efb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DummyPolicyTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.filter;
-
-import java.util.Set;
-
-import org.apache.activemq.SpringTestSupport;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * 
- */
-public class DummyPolicyTest extends SpringTestSupport {
-
-    public void testPolicy() throws Exception {
-        DummyPolicy policy = (DummyPolicy)getBean("policy");
-
-        Set set = policy.get(new ActiveMQTopic("FOO.BAR"));
-
-        assertSetEquals("FOO.BAR set", new Object[] {"Edam", "Cheddar"}, set);
-    }
-
-    protected AbstractApplicationContext createApplicationContext() {
-        // TODO Auto-generated method stub
-        return new ClassPathXmlApplicationContext("org/apache/activemq/filter/dummyPolicy.xml");
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
deleted file mode 100644
index c164929..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.jmx;
-
-import org.apache.activemq.broker.jmx.OpenTypeSupport;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OpenTypeSupportTest {
-    private static final Logger LOG = LoggerFactory.getLogger(OpenTypeSupportTest.class);
-    @Test
-    public void testBrowseByteMessageFails() throws Exception {
-        ActiveMQBytesMessage bm = new ActiveMQBytesMessage();
-        bm.writeBytes("123456".getBytes());
-        Object result = OpenTypeSupport.convert(bm);
-        LOG.info("result : " + result);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.java
deleted file mode 100755
index 86e5a43..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.jndi;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * 
- */
-public class ActiveMQInitialContextFactoryTest extends JNDITestSupport {
-
-    public void testConnectionFactoriesArePresent() throws NamingException {
-        String lookupName = getConnectionFactoryLookupName();
-        assertConnectionFactoryPresent(lookupName);
-    }
-
-    public void testDestinationsArePresent() throws NamingException {
-
-        // Retrieving destinations context is not yet implemented on the broker.
-        // For this test, a jndi file properties will be used.
-
-        InitialContext context = new InitialContext();
-
-        // make sure context is not null
-        assertTrue("Created context", context != null);
-
-        Object topicDestination = context.lookup("MyTopic");
-
-        // check if MyTopic is an ActiveMQTopic
-        assertTrue("Should have found a topic but found: " + topicDestination, topicDestination instanceof ActiveMQTopic);
-
-        Object queueDestination = context.lookup("MyQueue");
-
-        // check if MyQueue is an ActiveMQueue
-        assertTrue("Should have found a queue but found: " + queueDestination, queueDestination instanceof ActiveMQQueue);
-
-    }
-
-    public void testDynamicallyGrowing() throws Exception {
-        Object answer = context.lookup("dynamicQueues/FOO.BAR");
-        assertTrue("Should have found a queue but found: " + answer, answer instanceof ActiveMQQueue);
-
-        ActiveMQQueue queue = (ActiveMQQueue)answer;
-        assertEquals("queue name", "FOO.BAR", queue.getPhysicalName());
-
-        answer = context.lookup("dynamicTopics/A.B.C");
-        assertTrue("Should have found a topic but found: " + answer, answer instanceof ActiveMQTopic);
-
-        ActiveMQTopic topic = (ActiveMQTopic)answer;
-        assertEquals("topic name", "A.B.C", topic.getPhysicalName());
-
-    }
-
-    protected String getConnectionFactoryLookupName() {
-        return "ConnectionFactory";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.java
deleted file mode 100755
index 8abc697..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.jndi;
-
-import javax.naming.NamingException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * Test case for AMQ-141
- *
- * 
- */
-public class CustomConnectionFactoryNameTest extends ActiveMQInitialContextFactoryTest {
-    
-    public void testConnectionFactoriesArePresent() throws NamingException {
-        super.testConnectionFactoriesArePresent();
-        assertConnectionFactoryPresent("jms/Connection");
-        assertConnectionFactoryPresent("jms/DURABLE_SUB_CONNECTION_FACTORY");
-    }
-    
-    public void testConnectionFactoriesAreConfigured() throws NamingException {
-        super.testConnectionFactoriesArePresent();
-        ActiveMQConnectionFactory factory1 = (ActiveMQConnectionFactory) context.lookup("jms/Connection");
-        assertNull(factory1.getClientID());
-        ActiveMQConnectionFactory factory2 = (ActiveMQConnectionFactory) context.lookup("jms/DURABLE_SUB_CONNECTION_FACTORY");
-        assertEquals("testclient", factory2.getClientID());
-    }
-
-    protected String getConnectionFactoryLookupName() {
-        return "myConnectionFactory";
-    }
-
-    protected void configureEnvironment() {
-        super.configureEnvironment();
-        environment.put("connectionFactoryNames", " myConnectionFactory, jms/Connection, jms/DURABLE_SUB_CONNECTION_FACTORY");
-        environment.put("connection.jms/DURABLE_SUB_CONNECTION_FACTORY.clientID", "testclient");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.java
deleted file mode 100755
index b3fda32..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.jndi;
-
-
-/**
- * Test case for AMQ-140
- *
- * 
- */
-public class DestinationNameWithSlashTest extends JNDITestSupport {
-    public void testNameWithSlash() throws Exception {
-        assertDestinationExists("jms/Queue");
-
-    }
-
-    protected void configureEnvironment() {
-        super.configureEnvironment();
-        environment.put("queue.jms/Queue", "example.myqueue");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java
deleted file mode 100755
index 7c4695a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.jndi;
-
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class InitialContextTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(InitialContextTest.class);
-
-    public void testInitialContext() throws Exception {
-        InitialContext context = new InitialContext();
-        assertTrue("Created context", context != null);
-
-        ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory)context.lookup("ConnectionFactory");
-
-        assertTrue("Should have created a ConnectionFactory", connectionFactory != null);
-
-        LOG.info("Created with brokerURL: " + connectionFactory.getBrokerURL());
-
-    }
-
-    public void testUsingStandardJNDIKeys() throws Exception {
-        Properties properties = new Properties();
-        properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-        String expected = "tcp://localhost:65432";
-        properties.put(Context.PROVIDER_URL, expected);
-
-        InitialContext context = new InitialContext(properties);
-        assertTrue("Created context", context != null);
-
-        ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory)context.lookup("ConnectionFactory");
-
-        assertTrue("Should have created a ConnectionFactory", connectionFactory != null);
-
-        assertEquals("the brokerURL should match", expected, connectionFactory.getBrokerURL());
-    }
-
-    public void testConnectionFactoryPolicyConfig() throws Exception {
-
-        Properties properties = new Properties();
-        properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-        properties.put(Context.PROVIDER_URL, "tcp://localhost:65432");
-        properties.put("prefetchPolicy.queuePrefetch", "777");
-        properties.put("redeliveryPolicy.maximumRedeliveries", "15");
-        properties.put("redeliveryPolicy.backOffMultiplier", "32");
-
-        InitialContext context = new InitialContext(properties);
-        assertTrue("Created context", context != null);
-
-        ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory)context.lookup("ConnectionFactory");
-
-        assertTrue("Should have created a ConnectionFactory", connectionFactory != null);
-
-        assertEquals(777, connectionFactory.getPrefetchPolicy().getQueuePrefetch());
-        assertEquals(15, connectionFactory.getRedeliveryPolicy().getMaximumRedeliveries());
-        assertEquals(32d, connectionFactory.getRedeliveryPolicy().getBackOffMultiplier());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java
deleted file mode 100755
index 9547f27..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.jndi;
-
-import java.util.Hashtable;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.naming.Binding;
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.spi.InitialContextFactory;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public abstract class JNDITestSupport extends TestCase {
-    
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(JNDITestSupport.class);
-    
-    protected Hashtable environment = new Hashtable();
-    protected Context context;
-
-    protected void assertConnectionFactoryPresent(String lookupName) throws NamingException {
-        Object connectionFactory = context.lookup(lookupName);
-
-        assertTrue("Should have created a ConnectionFactory for key: " + lookupName
-                + " but got: " + connectionFactory, connectionFactory instanceof ConnectionFactory);
-    }
-
-    protected void assertBinding(Binding binding) throws NamingException {
-        Object object = binding.getObject();
-        assertTrue("Should have got a child context but got: " + object, object instanceof Context);
-
-        Context childContext = (Context) object;
-        NamingEnumeration iter = childContext.listBindings("");
-        while (iter.hasMore()) {
-            Binding destinationBinding = (Binding) iter.next();
-            LOG.info("Found destination: " + destinationBinding.getName());
-            Object destination = destinationBinding.getObject();
-            assertTrue("Should have a Destination but got: " + destination, destination instanceof Destination);
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        configureEnvironment();
-
-        InitialContextFactory factory = new ActiveMQInitialContextFactory();
-        context = factory.getInitialContext(environment);
-        assertTrue("No context created", context != null);
-    }
-
-    /**
-     * Stops all existing ActiveMQConnectionFactory in Context.
-     *
-     * @throws javax.naming.NamingException
-     */
-    protected void tearDown() throws NamingException, JMSException {
-        NamingEnumeration iter = context.listBindings("");
-        while (iter.hasMore()) {
-            Binding binding = (Binding) iter.next();
-            Object connFactory = binding.getObject();
-            if (connFactory instanceof ActiveMQConnectionFactory) {
-               // ((ActiveMQConnectionFactory) connFactory).stop();
-            }
-        }
-    }
-
-    protected void configureEnvironment() {
-        environment.put("brokerURL", "vm://localhost");
-    }
-
-    protected void assertDestinationExists(String name) throws NamingException {
-        Object object = context.lookup(name);
-        assertTrue("Should have received a Destination for name: " + name + " but instead found: " + object,
-                object instanceof Destination);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.java
deleted file mode 100644
index c389144..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.jndi;
-
-import javax.naming.Reference;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-
-public class ObjectFactoryTest extends CombinationTestSupport {
-    public void testConnectionFactory() throws Exception {
-        // Create sample connection factory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
-        factory.setDispatchAsync(true);
-        factory.setBrokerURL("vm://test");
-        factory.setClientID("test");
-        factory.setCopyMessageOnSend(false);
-        factory.setDisableTimeStampsByDefault(true);
-        factory.setObjectMessageSerializationDefered(true);
-        factory.setOptimizedMessageDispatch(false);
-        factory.setPassword("pass");
-        factory.setUseAsyncSend(true);
-        factory.setUseCompression(true);
-        factory.setUseRetroactiveConsumer(true);
-        factory.setUserName("user");
-        factory.getPrefetchPolicy().setQueuePrefetch(777);
-        factory.getRedeliveryPolicy().setMaximumRedeliveries(15);
-        factory.getRedeliveryPolicy().setBackOffMultiplier((short) 32);
-        
-
-        // Create reference
-        Reference ref = JNDIReferenceFactory.createReference(factory.getClass().getName(), factory);
-
-        // Get object created based on reference
-        ActiveMQConnectionFactory temp;
-        JNDIReferenceFactory refFactory = new JNDIReferenceFactory();
-        temp = (ActiveMQConnectionFactory)refFactory.getObjectInstance(ref, null, null, null);
-
-        // Check settings
-        assertEquals(factory.isDispatchAsync(), temp.isDispatchAsync());
-        assertEquals(factory.getBrokerURL(), temp.getBrokerURL());
-        assertEquals(factory.getClientID(), temp.getClientID());
-        assertEquals(factory.isCopyMessageOnSend(), temp.isCopyMessageOnSend());
-        assertEquals(factory.isDisableTimeStampsByDefault(), temp.isDisableTimeStampsByDefault());
-        assertEquals(factory.isObjectMessageSerializationDefered(), temp.isObjectMessageSerializationDefered());
-        assertEquals(factory.isOptimizedMessageDispatch(), temp.isOptimizedMessageDispatch());
-        assertEquals(factory.getPassword(), temp.getPassword());
-        assertEquals(factory.isUseAsyncSend(), temp.isUseAsyncSend());
-        assertEquals(factory.isUseCompression(), temp.isUseCompression());
-        assertEquals(factory.isUseRetroactiveConsumer(), temp.isUseRetroactiveConsumer());
-        assertEquals(factory.getUserName(), temp.getUserName());
-        assertEquals(factory.getPrefetchPolicy().getQueuePrefetch(), temp.getPrefetchPolicy().getQueuePrefetch());
-        assertEquals(factory.getRedeliveryPolicy().getMaximumRedeliveries(), temp.getRedeliveryPolicy().getMaximumRedeliveries());
-        assertEquals(factory.getRedeliveryPolicy().getBackOffMultiplier(), temp.getRedeliveryPolicy().getBackOffMultiplier());
-    }
-
-    public void testDestination() throws Exception {
-        // Create sample destination
-        ActiveMQDestination dest = new ActiveMQQueue();
-        dest.setPhysicalName("TEST.FOO");
-
-        // Create reference
-        Reference ref = JNDIReferenceFactory.createReference(dest.getClass().getName(), dest);
-
-        // Get object created based on reference
-        ActiveMQDestination temp;
-        JNDIReferenceFactory refFactory = new JNDIReferenceFactory();
-        temp = (ActiveMQDestination)refFactory.getObjectInstance(ref, null, null, null);
-
-        // Check settings
-        assertEquals(dest.getPhysicalName(), temp.getPhysicalName());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java
deleted file mode 100755
index cf7cca1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.jndi;
-
-import javax.jms.XAConnectionFactory;
-import javax.naming.NamingException;
-
-public class XAConnectionFactoryTest extends ActiveMQInitialContextFactoryTest {
-    
-    public void testConnectionFactoriesIsXA() throws NamingException {
-        assertTrue("connection factory implements XA", context.lookup(getConnectionFactoryLookupName()) instanceof XAConnectionFactory);
-    }
-    
-    protected void configureEnvironment() {
-        environment.put("xa", "true");
-        super.configureEnvironment();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java
deleted file mode 100644
index b1fb38e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/ListContainerTest.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-import junit.framework.TestCase;
-
-public class ListContainerTest extends TestCase {
-    
-    protected static final int COUNT = 10;
-
-    protected String name = "test";
-    protected Store store;
-    protected ListContainer<Object> container;
-    protected LinkedList<Object> testList;
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.ListContainer.size()'
-     */
-    public void testSize() throws Exception {
-        container.addAll(testList);
-        assertEquals(container.size(), testList.size());
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.ListContainer.addFirst(Object)'
-     */
-    public void testAddFirst() throws Exception {
-        container.addAll(testList);
-        assertEquals(container.size(), testList.size());
-        String first = "first";
-        container.addFirst(first);
-        assertEquals(first, container.get(0));
-        assertEquals(container.size(), testList.size() + 1);
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.ListContainer.addLast(Object)'
-     */
-    public void testAddLast() throws Exception {
-        container.addAll(testList);
-        assertEquals(container.size(), testList.size());
-        String last = "last";
-        container.addLast(last);
-        assertEquals(last, container.get(testList.size()));
-        assertEquals(container.size(), testList.size() + 1);
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.ListContainer.removeFirst()'
-     */
-    public void testRemoveFirst() throws Exception {
-        container.addAll(testList);
-        assertEquals(container.size(), testList.size());
-        assertEquals(testList.get(0), container.removeFirst());
-        assertEquals(container.size(), testList.size() - 1);
-        for (int i = 1; i < testList.size(); i++) {
-            assertEquals(testList.get(i), container.get(i - 1));
-        }
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.ListContainer.removeLast()'
-     */
-    public void testRemoveLast() throws Exception {
-        container.addAll(testList);
-        assertEquals(container.size(), testList.size());
-        assertEquals(testList.get(testList.size() - 1), container.removeLast());
-        assertEquals(container.size(), testList.size() - 1);
-        for (int i = 0; i < testList.size() - 1; i++) {
-            assertEquals(testList.get(i), container.get(i));
-        }
-    }
-
-    /*
-     * Test method for 'java.util.List.iterator()'
-     */
-    public void testIterator() throws Exception {
-        container.addAll(testList);
-        Iterator<Object> j = container.iterator();
-        for (Iterator<Object> i = testList.iterator(); i.hasNext();) {
-            assertEquals(i.next(), j.next());
-        }
-        for (Iterator<Object> i = container.iterator(); i.hasNext();) {
-            i.next();
-            i.remove();
-        }
-        assert container.isEmpty();
-    }
-
-    /*
-     * Test method for 'java.util.List.isEmpty()'
-     */
-    public void testIsEmpty() throws Exception {
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for 'java.util.List.contains(Object)'
-     */
-    public void testContains() throws Exception {
-        container.addAll(testList);
-        for (Iterator<Object> i = testList.iterator(); i.hasNext();) {
-            assertTrue(container.contains(i.next()));
-        }
-    }
-
-    /*
-     * Test method for 'java.util.List.toArray()'
-     */
-    public void testToArray() throws Exception {
-        container.addAll(testList);
-        Object[] a = testList.toArray();
-        Object[] b = container.toArray();
-        assertEquals(a.length, b.length);
-        for (int i = 0; i < a.length; i++) {
-            assertEquals(a[i], b[i]);
-        }
-    }
-
-    /*
-     * Test method for 'java.util.List.remove(Object)'
-     */
-    public void testRemoveObject() throws Exception {
-        container.addAll(testList);
-        assertEquals(container.size(), testList.size());
-        for (int i = 0; i < testList.size(); i++) {
-            container.remove(testList.get(i));
-        }
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for 'java.util.List.containsAll(Collection<?>)'
-     */
-    public void testContainsAll() throws Exception {
-        container.addAll(testList);
-        assertTrue(container.containsAll(testList));
-    }
-
-    /*
-     * Test method for 'java.util.List.removeAll(Collection<?>)'
-     */
-    public void testRemoveAll() throws Exception {
-        container.addAll(testList);
-        assertEquals(testList.size(), container.size());
-        container.removeAll(testList);
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for 'java.util.List.retainAll(Collection<?>)'
-     */
-    public void testRetainAll() throws Exception {
-        container.addAll(testList);
-        assertEquals(testList.size(), container.size());
-        testList.remove(0);
-        container.retainAll(testList);
-        assertEquals(testList.size(), container.size());
-    }
-
-    /*
-     * Test method for 'java.util.List.clear()'
-     */
-    public void testClear() throws Exception {
-        container.addAll(testList);
-        assertEquals(testList.size(), container.size());
-        container.clear();
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for 'java.util.List.get(int)'
-     */
-    public void testGet() throws Exception {
-        container.addAll(testList);
-        for (int i = 0; i < testList.size(); i++) {
-            assertEquals(container.get(i), testList.get(i));
-        }
-    }
-
-    /*
-     * Test method for 'java.util.List.set(int, E)'
-     */
-    public void testSet() throws Exception {
-        container.addAll(testList);
-    }
-
-    /*
-     * Test method for 'java.util.List.add(int, E)'
-     */
-    public void testAddIntE() throws Exception {
-        container.addAll(testList);
-        assertTrue(container.equals(testList));
-        Object testObj = "testObj";
-        int index = 0;
-        testList.set(index, testObj);
-        container.set(index, testObj);
-        assertTrue(container.equals(testList));
-        index = testList.size() - 1;
-        testList.set(index, testObj);
-        container.set(index, testObj);
-        assertTrue(container.equals(testList));
-    }
-
-    /*
-     * Test method for 'java.util.List.remove(int)'
-     */
-    public void testRemoveInt() throws Exception {
-        container.addAll(testList);
-        assertTrue(container.equals(testList));
-        testList.remove(0);
-        container.remove(0);
-        assertTrue(container.equals(testList));
-        int pos = testList.size() - 1;
-        testList.remove(pos);
-        container.remove(pos);
-        assertTrue(container.equals(testList));
-    }
-
-    /*
-     * Test method for 'java.util.List.indexOf(Object)'
-     */
-    public void testIndexOf() throws Exception {
-        container.addAll(testList);
-        assertTrue(container.equals(testList));
-        for (int i = 0; i < testList.size(); i++) {
-            Object o = testList.get(i);
-            assertEquals(i, container.indexOf(o));
-        }
-    }
-
-    /*
-     * Test method for 'java.util.List.listIterator()'
-     */
-    public void testListIterator() throws Exception {
-        container.addAll(testList);
-        ListIterator<Object> containerIter = container.listIterator();
-        ListIterator<Object> testIter = testList.listIterator();
-        assertTrue(testIter.hasNext());
-        assertTrue(containerIter.hasNext());
-        while (testIter.hasNext()) {
-            Object o1 = testIter.next();
-            Object o2 = containerIter.next();
-            assertEquals(o1, o2);
-            testIter.remove();
-            containerIter.remove();
-        }
-        assertTrue(testList.isEmpty());
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for 'java.util.List.listIterator(int)'
-     */
-    public void testListIteratorInt() throws Exception {
-        container.addAll(testList);
-        int start = testList.size() / 2;
-        ListIterator<Object> containerIter = container.listIterator(start);
-        ListIterator<Object> testIter = testList.listIterator(start);
-        assertTrue(testIter.hasNext());
-        assertTrue(containerIter.hasNext());
-        while (testIter.hasNext()) {
-            Object o1 = testIter.next();
-            Object o2 = containerIter.next();
-            assertEquals(o1, o2);
-        }
-    }
-
-    /*
-     * Test method for 'java.util.List.subList(int, int)'
-     */
-    public void testSubList() throws Exception {
-        container.addAll(testList);
-        int start = testList.size() / 2;
-        List<Object> l1 = testList.subList(start, testList.size());
-        List<Object> l2 = container.subList(start, testList.size());
-        assertEquals(l1.size(), l2.size());
-        assertEquals(l1, l2);
-    }
-
-    protected Store getStore() throws IOException {
-        return StoreFactory.open(name, "rw");
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        name = System.getProperty("basedir", ".") + "/target/activemq-data/list-container.db";
-        StoreFactory.delete(name);
-        store = getStore();
-        store.deleteListContainer(name);
-        container = store.getListContainer(name);
-        container.load();
-        testList = new LinkedList<Object>();
-        for (int i = 0; i < COUNT; i++) {
-            String value = "value:" + i;
-            testList.add(value);
-        }
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (store != null) {
-            store.close();
-        }
-        assertTrue(StoreFactory.delete(name));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/LoadTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/LoadTest.java
deleted file mode 100644
index c7c1b1d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/LoadTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-
-import junit.framework.TestCase;
-import org.apache.activemq.kaha.impl.KahaStore;
-
-/**
- * Store test
- * 
- * 
- */
-public class LoadTest extends TestCase {
-    static final int COUNT = 10000;
-    static final int NUM_LOADERS = 5;
-    protected String name = "load.db";
-    protected KahaStore store;
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.Store.close()'
-     */
-    public void testLoad() throws Exception {
-        CountDownLatch start = new CountDownLatch(NUM_LOADERS);
-        CountDownLatch stop = new CountDownLatch(NUM_LOADERS);
-        for (int i = 0; i < NUM_LOADERS; i++) {
-            Loader loader = new Loader("loader:" + i, store, COUNT, start, stop);
-            loader.start();
-        }
-        stop.await();
-    }
-
-    protected KahaStore getStore() throws IOException {
-        return (KahaStore)StoreFactory.open(name, "rw");
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        name = System.getProperty("basedir", ".") + "/target/activemq-data/load.db";
-        StoreFactory.delete(name);
-        store = getStore();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        store.clear();
-        store.close();
-        assertTrue(StoreFactory.delete(name));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java
deleted file mode 100644
index 65e1385..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 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.kaha;
-
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Store test
- * 
- * 
- */
-class Loader extends Thread {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Loader.class);
-
-    private String name;
-    private Store store;
-    private int count;
-    private CountDownLatch start;
-    private CountDownLatch stop;
-
-    public Loader(String name, Store store, int count, CountDownLatch start, CountDownLatch stop) {
-        this.name = name;
-        this.store = store;
-        this.count = count;
-        this.start = start;
-        this.stop = stop;
-    }
-
-    public void run() {
-        try {
-            start.countDown();
-            start.await();
-            Marshaller<String> keyMarshaller = new StringMarshaller();
-            Marshaller<Object> valueMarshaller = new BytesMarshaller();
-            MapContainer<String, Object> container = store.getMapContainer(name, store.getDefaultContainerName(), true);
-
-            container.setKeyMarshaller(keyMarshaller);
-            container.setValueMarshaller(valueMarshaller);
-            container.load();
-            // set data
-            Object value = getData(1024);
-            long startTime = System.currentTimeMillis();
-            long startLoad = System.currentTimeMillis();
-            for (int i = 0; i < count; i++) {
-                String key = "key:" + i;
-                container.put(key, value);
-            }
-            long finishLoad = System.currentTimeMillis();
-            long totalLoadTime = finishLoad - startLoad;
-            LOG.info("name " + name + " load time = " + totalLoadTime + "(ms)");
-
-            Set<String> keys = container.keySet();
-            long startExtract = System.currentTimeMillis();
-
-            for (Iterator<String> i = keys.iterator(); i.hasNext();) {
-                byte[] data = (byte[])container.get(i.next());
-            }
-            long finishExtract = System.currentTimeMillis();
-            long totalExtractTime = finishExtract - startExtract;
-            LOG.info("name " + name + " extract time = " + totalExtractTime + "(ms)");
-
-            long startRemove = System.currentTimeMillis();
-            for (Iterator<String> i = keys.iterator(); i.hasNext();) {
-                container.remove(i.next());
-            }
-            long finishRemove = System.currentTimeMillis();
-            long totalRemoveTime = finishRemove - startRemove;
-            LOG.info("name " + name + " remove time = " + totalRemoveTime + "(ms)");
-            // re-insert data of longer length
-            startLoad = System.currentTimeMillis();
-            value = getData(2048);
-            for (int i = 0; i < count; i++) {
-                // System.out.println(this + " Container size = " +
-                // container.size());
-                String key = "key:" + i;
-                container.put(key, value);
-            }
-            finishLoad = System.currentTimeMillis();
-            totalLoadTime = finishLoad - startLoad;
-            LOG.info("name " + name + " 2nd load time = " + totalLoadTime + "(ms)");
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            stop.countDown();
-        }
-    }
-
-    byte[] getData(int size) {
-        byte[] result = new byte[size];
-        for (int i = 0; i < size; i++) {
-            result[i] = 'a';
-        }
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
deleted file mode 100644
index c71237f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.apache.activemq.kaha.impl.container.BaseContainerImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import junit.framework.TestCase;
-
-public class MapContainerTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(MapContainerTest.class);
-    protected static final int COUNT = 10;
-
-    protected String name = "test";
-    protected Store store;
-    protected MapContainer<String, String> container;
-    protected Map<String, String> testMap;
-
-    public void testBasicAllocations() throws Exception {
-        String key = "key";
-        Object value = testMap;
-        MapContainer<String, Object> test = store.getMapContainer("test", "test");
-        test.put(key, value);
-        store.close();
-        store = getStore();
-        assertFalse(store.getMapContainerIds().isEmpty());
-        test = store.getMapContainer("test", "test");
-        assertEquals(value, test.get(key));
-
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.size()'
-     */
-    public void testSize() throws Exception {
-        container.putAll(testMap);
-        assertTrue(container.size() == testMap.size());
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.isEmpty()'
-     */
-    public void testIsEmpty() throws Exception {
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.clear()'
-     */
-    public void testClear() throws Exception {
-        container.putAll(testMap);
-        assertTrue(container.size() == testMap.size());
-        container.clear();
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for
-     * 'org.apache.activemq.kaha.MapContainer.containsKey(Object)'
-     */
-    public void testContainsKeyObject() throws Exception {
-        container.putAll(testMap);
-        for (Iterator i = testMap.entrySet().iterator(); i.hasNext();) {
-            Map.Entry entry = (Entry)i.next();
-            assertTrue(container.containsKey(entry.getKey()));
-        }
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.get(Object)'
-     */
-    public void testGetObject() throws Exception {
-        container.putAll(testMap);
-        for (Iterator i = testMap.entrySet().iterator(); i.hasNext();) {
-            Map.Entry entry = (Entry)i.next();
-            Object value = container.get(entry.getKey());
-            assertNotNull(value);
-            assertTrue(value.equals(entry.getValue()));
-        }
-    }
-
-    /*
-     * Test method for
-     * 'org.apache.activemq.kaha.MapContainer.containsValue(Object)'
-     */
-    public void testContainsValueObject() throws Exception {
-        container.putAll(testMap);
-        for (Iterator i = testMap.entrySet().iterator(); i.hasNext();) {
-            Map.Entry entry = (Entry)i.next();
-            assertTrue(container.containsValue(entry.getValue()));
-        }
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.putAll(Map)'
-     */
-    public void testPutAllMap() throws Exception {
-        container.putAll(testMap);
-        for (Iterator i = testMap.entrySet().iterator(); i.hasNext();) {
-            Map.Entry entry = (Entry)i.next();
-            assertTrue(container.containsValue(entry.getValue()));
-            assertTrue(container.containsKey(entry.getKey()));
-        }
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.keySet()'
-     */
-    public void testKeySet() throws Exception {
-        container.putAll(testMap);
-        Set<String> keys = container.keySet();
-        assertTrue(keys.size() == testMap.size());
-        for (Iterator<String> i = testMap.keySet().iterator(); i.hasNext();) {
-            Object key = i.next();
-            assertTrue(keys.contains(key));
-            keys.remove(key);
-        }
-        assertTrue(container.isEmpty());
-
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.values()'
-     */
-    public void testValues() throws Exception {
-        container.putAll(testMap);
-        Collection<String> values = container.values();
-        assertTrue(values.size() == testMap.size());
-        for (Iterator<String> i = testMap.values().iterator(); i.hasNext();) {
-            Object value = i.next();
-            assertTrue(values.contains(value));
-            assertTrue(values.remove(value));
-        }
-        assertTrue(container.isEmpty());
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.entrySet()'
-     */
-    public void testEntrySet() throws Exception {
-        container.putAll(testMap);
-        Set entries = container.entrySet();
-        assertTrue(entries.size() == testMap.size());
-        for (Iterator i = entries.iterator(); i.hasNext();) {
-            Map.Entry entry = (Entry)i.next();
-            assertTrue(testMap.containsKey(entry.getKey()));
-            assertTrue(testMap.containsValue(entry.getValue()));
-
-        }
-
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.MapContainer.remove(Object)'
-     */
-    public void testRemoveObject() throws Exception {
-        container.putAll(testMap);
-        for (Iterator<String> i = testMap.keySet().iterator(); i.hasNext();) {
-            container.remove(i.next());
-        }
-        assertTrue(container.isEmpty());
-    }
-
-    
-    public void testDuplicatesOk() throws Exception {
-        StoreEntry first, entry; 
-        
-        container.put("M1", "DD");
-        first = container.getFirst();
-        LOG.info("First=" + first);
-        assertEquals(-1, first.getNextItem());
-        
-        // add duplicate
-        String old = container.put("M1", "DD");
-        assertNotNull(old);
-        assertEquals(1, container.size());
-        
-        entry = container.getFirst();
-        LOG.info("New First=" + entry);
-        assertEquals(-1, entry.getNextItem());
-
-        assertEquals(first, entry);
-        
-        container.remove("M1");
-        
-        entry = container.getFirst();
-        assertNull(entry);
-    }
-
-    
-    public void testDuplicatesFreeListShared() throws Exception {
-        StoreEntry batchEntry; 
-        
-        MapContainer other = store.getMapContainer(getName()+"2", "test", true);
-        other.load();
-        other.put("M1", "DD");
-             
-        container.put("M1", "DD");
-        batchEntry = container.getFirst();
-        LOG.info("First=" + batchEntry);
-        assertEquals(-1, batchEntry.getNextItem());
-        
-        // have something on free list before duplicate
-        other.remove("M1");
-        
-        // add duplicate
-        String old = container.put("M1", "DD");
-        assertNotNull(old);
-        assertEquals(1, container.size());
-
-        // entry now on free list on its own
-        batchEntry = container.refresh(batchEntry);
-        assertEquals(-1, batchEntry.getNextItem());
-        LOG.info("refreshed=" + batchEntry);
-        
-        // ack
-        container.remove("M1");   
-        
-        //container is valid  (empty)
-        assertNull(container.getFirst());
-
-        // batchEntry now has next as there is another on the free list
-        batchEntry = container.refresh(batchEntry);
-        LOG.info("refreshed=" + batchEntry);
-        
-        assertTrue(batchEntry.getNextItem() != -1);        
-    }
-
-    protected Store getStore() throws IOException {
-        return StoreFactory.open(name, "rw");
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        name = System.getProperty("basedir", ".") + "/target/activemq-data/map-container.db";
-        store = getStore();
-        container = store.getMapContainer(getName(), "test", true);
-        container.load();
-        testMap = new HashMap<String, String>();
-        for (int i = 0; i < COUNT; i++) {
-            String key = "key:" + i;
-            String value = "value:" + i;
-            testMap.put(key, value);
-        }
-
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (store != null) {
-            store.close();
-            store = null;
-        }
-        assertTrue(StoreFactory.delete(name));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java
deleted file mode 100644
index 8bd5281..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/StoreTest.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-import org.apache.activemq.kaha.impl.StoreLockedExcpetion;
-
-/**
- * Store test
- * 
- * 
- */
-public class StoreTest extends TestCase {
-
-    protected String name;
-    protected Store store;
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.Store.close()'
-     */
-    public void testClose() throws Exception {
-        store.close();
-        try {
-            // access should throw an exception
-            store.getListContainer("fred");
-            assertTrue("Should have got a enception", false);
-        } catch (Exception e) {
-
-        }
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.Store.clear()'
-     */
-    public void testClear() throws Exception {
-        int count = 100;
-        ListContainer list = store.getListContainer("testClear");
-        list.load();
-        for (int i = 0; i < count; i++) {
-            list.add("test " + i);
-        }
-        assertEquals(count, list.size());
-        store.clear();
-        assertTrue(list.isEmpty());
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.Store.getMapContainer(Object)'
-     */
-    public void testGetMapContainer() throws Exception {
-        String containerId = "test";
-        MapContainer<Object, String> container = store.getMapContainer(containerId);
-        container.load();
-        assertNotNull(container);
-        store.close();
-        store = getStore();
-        container = store.getMapContainer(containerId);
-        assertNotNull(container);
-
-    }
-
-    /*
-     * Test method for
-     * 'org.apache.activemq.kaha.Store.deleteMapContainer(Object)'
-     */
-    public void testDeleteMapContainer() throws Exception {
-        String containerId = "test";
-        MapContainer<Object, String> container = store.getMapContainer(containerId);
-        assertNotNull(container);
-        store.deleteMapContainer(containerId);
-        assertFalse(store.doesMapContainerExist(containerId));
-        store.close();
-        store = getStore();
-        assertFalse(store.doesMapContainerExist(containerId));
-    }
-
-    /*
-     * Test method for 'org.apache.activemq.kaha.Store.getListContainer(Object)'
-     */
-    public void testGetListContainer() throws Exception {
-        String containerId = "test";
-        ListContainer container = store.getListContainer(containerId);
-        assertNotNull(container);
-        store.close();
-        store = getStore();
-        container = store.getListContainer(containerId);
-        assertNotNull(container);
-    }
-
-    /*
-     * Test method for
-     * 'org.apache.activemq.kaha.Store.deleteListContainer(Object)'
-     */
-    public void testDeleteListContainer() throws Exception {
-        String containerId = "test";
-        ListContainer container = store.getListContainer(containerId);
-        assertNotNull(container);
-        store.deleteListContainer(containerId);
-        assertFalse(store.doesListContainerExist(containerId));
-        store.close();
-        store = getStore();
-        assertFalse(store.doesListContainerExist(containerId));
-    }
-
-    public void testBasicAllocations() throws Exception {
-        Map<Object, String> testMap = new HashMap<Object, String>();
-        int count = 1000;
-        for (int i = 0; i < count; i++) {
-            String key = "key:" + i;
-            String value = "value:" + i;
-            testMap.put(key, value);
-        }
-        List testList = new ArrayList();
-        for (int i = 0; i < count; i++) {
-            testList.add("value:" + i);
-        }
-        String listId = "testList";
-        String mapId1 = "testMap";
-        String mapId2 = "testMap2";
-        MapContainer<Object, String> mapContainer1 = store.getMapContainer(mapId1);
-        mapContainer1.load();
-        mapContainer1.putAll(testMap);
-
-        MapContainer<Object, String> mapContainer2 = store.getMapContainer(mapId2, mapId2);
-        mapContainer2.load();
-        mapContainer2.putAll(testMap);
-
-        ListContainer listContainer = store.getListContainer(listId);
-        listContainer.load();
-
-        listContainer.addAll(testList);
-        store.close();
-        store = getStore();
-        mapContainer1 = store.getMapContainer(mapId1);
-        mapContainer1.load();
-        mapContainer2 = store.getMapContainer(mapId2, mapId2);
-        mapContainer2.load();
-        listContainer = store.getListContainer(listId);
-        listContainer.load();
-        for (Iterator<Object> i = testMap.keySet().iterator(); i.hasNext();) {
-            Object key = i.next();
-            Object value = testMap.get(key);
-            assertTrue(mapContainer1.containsKey(key));
-            assertEquals(value, mapContainer1.get(key));
-        }
-        for (Iterator<Object> i = testMap.keySet().iterator(); i.hasNext();) {
-            Object key = i.next();
-            Object value = testMap.get(key);
-            assertTrue(mapContainer2.containsKey(key));
-            assertEquals(value, mapContainer2.get(key));
-        }
-        assertEquals(testList.size(), listContainer.size());
-        Iterator j = listContainer.iterator();
-        for (Iterator i = testList.iterator(); i.hasNext();) {
-            assertEquals(i.next(), j.next());
-        }
-    }
-
-    public void testLock() throws Exception {
-        store.doesListContainerExist("fred");
-        Store s = getStore();
-        try {
-            s.doesListContainerExist("fred");
-        } catch (StoreLockedExcpetion e) {
-            return;
-        } finally {
-            s.close();
-        }
-        fail("Expected to catch an exception");
-    }
-
-    protected Store getStore() throws IOException {
-        return StoreFactory.open(name, "rw");
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        name = System.getProperty("basedir", ".") + "/target/activemq-data/store-test.db";
-        store = getStore();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (store != null) {
-            store.close();
-            store = null;
-        }
-        boolean rc = StoreFactory.delete(name);
-        assertTrue(rc);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java
deleted file mode 100644
index cb434bd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.kaha;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class VolumeTest extends TestCase {
-
-    protected static final int NUMBER = 1;
-    private static final transient Logger LOG = LoggerFactory.getLogger(VolumeTest.class);
-
-    protected Store store;
-    protected String name;
-
-    /*
-     * dump a large number of messages into a list - then retreive them
-     */
-    public void testListVolume() throws Exception {
-        ListContainer container = store.getListContainer("volume");
-        container.setMarshaller(Store.BYTES_MARSHALLER);
-        byte[] data = new byte[10];
-        for (int i = 0; i < NUMBER; i++) {
-            container.add(data);
-            if (i % 100000 == 0) {
-                LOG.error("persisted " + i);
-            }
-
-        }
-        int count = 0;
-
-        for (Iterator i = container.iterator(); i.hasNext();) {
-            assertNotNull(i.next());
-            count++;
-            if (count % 100000 == 0) {
-                LOG.error("retrived  " + count);
-            }
-        }
-        assertEquals("Different retrieved to stored", NUMBER, count);
-    }
-
-    protected Store getStore() throws IOException {
-        return StoreFactory.open(name, "rw");
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        name = System.getProperty("basedir", ".") + "/target/activemq-data/volume-container.db";
-        StoreFactory.delete(name);
-        store = StoreFactory.open(name, "rw");
-
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (store != null) {
-            store.close();
-        }
-        assertTrue(StoreFactory.delete(name));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/DataFileAppenderTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/DataFileAppenderTest.java
deleted file mode 100644
index 7b67e75..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/DataFileAppenderTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.util.ByteSequence;
-
-public class DataFileAppenderTest extends TestCase {
-    AsyncDataManager dataManager;
-    File dir;
-    
-    @Override
-    public void setUp() throws Exception {
-        dir = new File("target/tests/DataFileAppenderTest");
-        dir.mkdirs();
-        dataManager = new AsyncDataManager();
-        dataManager.setDirectory(dir);
-        configure(dataManager);
-        dataManager.start();
-    }
-    
-    protected void configure(AsyncDataManager dataManager) {
-        dataManager.setUseNio(false);
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        dataManager.close();
-        deleteFilesInDirectory(dir);
-        dir.delete();
-    }
-
-    private void deleteFilesInDirectory(File directory) {
-        File[] files = directory.listFiles();
-        for (int i=0; i<files.length; i++) {
-            File f = files[i];
-            if (f.isDirectory()) {
-                deleteFilesInDirectory(f);
-            }   
-            f.delete();
-        }  
-    }  
-
-    public void testBatchWriteCallbackCompleteAfterTimeout() throws Exception {
-        final int iterations = 10;
-        final CountDownLatch latch = new CountDownLatch(iterations);
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        for (int i=0; i < iterations; i++) {
-            dataManager.write(data, new Runnable() {
-                public void run() {
-                    latch.countDown();                 
-                }
-            });
-        }
-        // at this point most probably dataManager.getInflightWrites().size() >= 0
-        // as the Thread created in DataFileAppender.enqueue() may not have caught up.
-        assertTrue("queued data is written", latch.await(5, TimeUnit.SECONDS));
-    }
-
-    public void testBatchWriteCallbackCompleteAfterClose() throws Exception {
-        final int iterations = 10;
-        final CountDownLatch latch = new CountDownLatch(iterations);
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        for (int i=0; i<iterations; i++) {
-            dataManager.write(data, new Runnable() {
-                public void run() {
-                    latch.countDown();                 
-                }
-            });
-        }
-        dataManager.close();
-        assertTrue("queued data is written", dataManager.getInflightWrites().isEmpty());
-        assertEquals("none written", 0, latch.getCount());
-    }
-    
-    public void testBatchWriteCompleteAfterClose() throws Exception {
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        final int iterations = 10;
-        for (int i=0; i<iterations; i++) {
-            dataManager.write(data, false);
-        }
-        dataManager.close();
-        assertTrue("queued data is written:" + dataManager.getInflightWrites().size(), dataManager.getInflightWrites().isEmpty());
-    }
-    
-    public void testBatchWriteToMaxMessageSize() throws Exception {
-        final int iterations = 4;
-        final CountDownLatch latch = new CountDownLatch(iterations);
-        Runnable done = new Runnable() {
-            public void run() {
-                latch.countDown();                 
-            }
-        };
-        int messageSize = DataFileAppender.DEFAULT_MAX_BATCH_SIZE / iterations;
-        byte[] message = new byte[messageSize];
-        ByteSequence data = new ByteSequence(message);
-        
-        for (int i=0; i< iterations; i++) {
-            dataManager.write(data, done);
-        }
-        
-        // write may take some time
-        assertTrue("all callbacks complete", latch.await(10, TimeUnit.SECONDS));
-    }
-    
-    public void testNoBatchWriteWithSync() throws Exception {
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        final int iterations = 10;
-        for (int i=0; i<iterations; i++) {
-            dataManager.write(data, true);
-            assertTrue("queued data is written", dataManager.getInflightWrites().isEmpty());
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java
deleted file mode 100644
index c12a5e6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import junit.framework.TestCase;
-
-import org.apache.activeio.journal.InvalidRecordLocationException;
-import org.apache.activeio.journal.RecordLocation;
-import org.apache.activeio.packet.ByteArrayPacket;
-import org.apache.activeio.packet.Packet;
-import org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade;
-import org.apache.activemq.kaha.impl.async.ReadOnlyAsyncDataManager;
-import org.apache.activemq.util.ByteSequence;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Tests the AsyncDataManager based Journal
- * 
- * 
- */
-public class JournalImplTest extends TestCase {
-
-    Logger log = LoggerFactory.getLogger(JournalImplTest.class);
-
-    int size = 1024 * 10;
-    int logFileCount = 2;
-    File logDirectory = new File("target/dm-data2");
-    private JournalFacade journal;
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        if (logDirectory.exists()) {
-            deleteDir(logDirectory);
-        }
-        assertTrue("Could not delete directory: " + logDirectory.getCanonicalPath(), !logDirectory.exists());
-        AsyncDataManager dm = new AsyncDataManager();
-        dm.setDirectory(logDirectory);
-        dm.setMaxFileLength(1024 * 64);
-        dm.start();
-        journal = new JournalFacade(dm);
-    }
-
-    /**
-     */
-    private void deleteDir(File f) {
-        File[] files = f.listFiles();
-        for (int i = 0; i < files.length; i++) {
-            File file = files[i];
-            file.delete();
-        }
-        f.delete();
-    }
-
-    protected void tearDown() throws Exception {
-        journal.close();
-        if (logDirectory.exists()) {
-            deleteDir(logDirectory);
-        }
-        // assertTrue( !logDirectory.exists() );
-    }
-
-    public void testLogFileCreation() throws IOException {
-        RecordLocation mark = journal.getMark();
-        assertNull(mark);
-    }
-
-    @SuppressWarnings("unchecked")
-    public void testAppendAndRead() throws InvalidRecordLocationException, InterruptedException, IOException {
-
-        Packet data1 = createPacket("Hello World 1");
-        RecordLocation location1 = journal.write(data1, false);
-        Packet data2 = createPacket("Hello World 2");
-        RecordLocation location2 = journal.write(data2, false);
-        Packet data3 = createPacket("Hello World 3");
-        RecordLocation location3 = journal.write(data3, false);
-
-        // Thread.sleep(1000);
-
-        // Now see if we can read that data.
-        Packet data;
-        data = journal.read(location2);
-        assertEquals(data2, data);
-        data = journal.read(location1);
-        assertEquals(data1, data);
-        data = journal.read(location3);
-        assertEquals(data3, data);
-
-        // Can we cursor the data?
-        RecordLocation l = journal.getNextRecordLocation(null);
-        int t = l.compareTo(location1);
-        assertEquals(0, t);
-        data = journal.read(l);
-        assertEquals(data1, data);
-
-        l = journal.getNextRecordLocation(l);
-        assertEquals(0, l.compareTo(location2));
-        data = journal.read(l);
-        assertEquals(data2, data);
-
-        l = journal.getNextRecordLocation(l);
-        assertEquals(0, l.compareTo(location3));
-        data = journal.read(l);
-        assertEquals(data3, data);
-
-        l = journal.getNextRecordLocation(l);
-        assertNull(l);
-
-        log.info(journal.toString());
-    }
-
-    public void testReadOnlyRead() throws InvalidRecordLocationException, InterruptedException, IOException {
-    	
-    	Packet data1 = createPacket("Hello World 1");
-        RecordLocation location1 = journal.write(data1, false);
-        Packet data2 = createPacket("Hello World 2");
-        RecordLocation location2 = journal.write(data2, false);
-        Packet data3 = createPacket("Hello World 3");
-        RecordLocation location3 = journal.write(data3, false);
-        
-        Packet packet;
-        packet = journal.read(location2);
-        assertEquals(data2, packet);
-        packet = journal.read(location1);
-        assertEquals(data1, packet);
-        packet = journal.read(location3);
-        assertEquals(data3, packet);
-    	
-        ArrayList<File> data = new ArrayList<File>();
-        data.add(logDirectory);
-        ReadOnlyAsyncDataManager rodm = new ReadOnlyAsyncDataManager(data);
-        rodm.start();
-        try {
-            for (Location curr = rodm.getFirstLocation(); curr != null; curr = rodm.getNextLocation(curr)) {
-                ByteSequence bs = rodm.read(curr);
-                assertNotNull(bs);
-            }
-        } finally {
-    	    rodm.close();
-        }
-    }
-
-    public void testCanReadFromArchivedLogFile() throws InvalidRecordLocationException, InterruptedException, IOException {
-
-        Packet data1 = createPacket("Hello World 1");
-        RecordLocationFacade location1 = (RecordLocationFacade)journal.write(data1, false);
-
-        RecordLocationFacade pos;
-        int counter = 0;
-        do {
-
-            Packet p = createPacket("<<<data>>>");
-            pos = (RecordLocationFacade)journal.write(p, false);
-            if (counter++ % 1000 == 0) {
-                journal.setMark(pos, false);
-            }
-
-        } while (pos.getLocation().getDataFileId() < 5);
-
-        // Now see if we can read that first packet.
-        Packet data;
-        data = journal.read(location1);
-        assertEquals(data1, data);
-
-    }
-
-    /**
-     * @param string
-     * @return
-     */
-    private Packet createPacket(String string) {
-        return new ByteArrayPacket(string.getBytes());
-    }
-
-    public static void assertEquals(Packet arg0, Packet arg1) {
-        assertEquals(arg0.sliceAsBytes(), arg1.sliceAsBytes());
-    }
-
-    public static void assertEquals(byte[] arg0, byte[] arg1) {
-
-        // System.out.println("Comparing: "+new String(arg0)+" and "+new
-        // String(arg1));
-        if (arg0 == null ^ arg1 == null) {
-            fail("Not equal: " + arg0 + " != " + arg1);
-        }
-        if (arg0 == null) {
-            return;
-        }
-        if (arg0.length != arg1.length) {
-            fail("Array lenght not equal: " + arg0.length + " != " + arg1.length);
-        }
-        for (int i = 0; i < arg0.length; i++) {
-            if (arg0[i] != arg1[i]) {
-                fail("Array item not equal at index " + i + ": " + arg0[i] + " != " + arg1[i]);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalPerfTool.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalPerfTool.java
deleted file mode 100644
index 590fcde..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalPerfTool.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activeio.journal.Journal;
-import org.apache.activeio.journal.JournalPerfToolSupport;
-
-/**
- * A Performance statistics gathering tool for the AsyncDataManager based
- * Journal.
- * 
- * 
- */
-public class JournalPerfTool extends JournalPerfToolSupport {
-
-    private int logFileSize = 1024 * 1024 * 50;
-
-    public static void main(String[] args) throws Exception {
-        JournalPerfTool tool = new JournalPerfTool();
-
-        tool.initialWorkers = 10;
-        tool.syncFrequency = 15;
-        tool.workerIncrement = 0;
-        tool.workerThinkTime = 0;
-        tool.verbose = false;
-        tool.incrementDelay = 5 * 1000;
-
-        if (args.length > 0) {
-            tool.journalDirectory = new File(args[0]);
-        }
-        if (args.length > 1) {
-            tool.workerIncrement = Integer.parseInt(args[1]);
-        }
-        if (args.length > 2) {
-            tool.incrementDelay = Long.parseLong(args[2]);
-        }
-        if (args.length > 3) {
-            tool.verbose = Boolean.getBoolean(args[3]);
-        }
-        if (args.length > 4) {
-            tool.recordSize = Integer.parseInt(args[4]);
-        }
-        if (args.length > 5) {
-            tool.syncFrequency = Integer.parseInt(args[5]);
-        }
-        if (args.length > 6) {
-            tool.workerThinkTime = Integer.parseInt(args[6]);
-        }
-        tool.exec();
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activeio.journal.JournalPerfToolSupport#createJournal()
-     */
-    public Journal createJournal() throws IOException {
-        AsyncDataManager dm = new AsyncDataManager();
-        dm.setMaxFileLength(logFileSize);
-        dm.setDirectory(this.journalDirectory);
-        dm.start();
-        return new JournalFacade(dm);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalRWPerfTool.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalRWPerfTool.java
deleted file mode 100644
index 16e859b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalRWPerfTool.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activeio.journal.Journal;
-import org.apache.activeio.journal.JournalRWPerfToolSupport;
-
-/**
- * A Performance statistics gathering tool for the AsyncDataManager based
- * Journal.
- * 
- * 
- */
-public class JournalRWPerfTool extends JournalRWPerfToolSupport {
-
-    private int logFileSize = 1024 * 1024 * 50;
-
-    public static void main(String[] args) throws Exception {
-        JournalRWPerfTool tool = new JournalRWPerfTool();
-
-        tool.initialWriteWorkers = 10;
-        tool.syncFrequency = 15;
-        tool.writeWorkerIncrement = 0;
-        tool.writeWorkerThinkTime = 0;
-        tool.verbose = false;
-        tool.incrementDelay = 5 * 1000;
-
-        if (args.length > 0) {
-            tool.journalDirectory = new File(args[0]);
-        }
-        if (args.length > 1) {
-            tool.writeWorkerIncrement = Integer.parseInt(args[1]);
-        }
-        if (args.length > 2) {
-            tool.incrementDelay = Long.parseLong(args[2]);
-        }
-        if (args.length > 3) {
-            tool.verbose = Boolean.getBoolean(args[3]);
-        }
-        if (args.length > 4) {
-            tool.recordSize = Integer.parseInt(args[4]);
-        }
-        if (args.length > 5) {
-            tool.syncFrequency = Integer.parseInt(args[5]);
-        }
-        if (args.length > 6) {
-            tool.writeWorkerThinkTime = Integer.parseInt(args[6]);
-        }
-        tool.exec();
-    }
-
-    /**
-     * @throws IOException
-     * @see org.apache.activeio.journal.JournalPerfToolSupport#createJournal()
-     */
-    public Journal createJournal() throws IOException {
-        AsyncDataManager dm = new AsyncDataManager();
-        dm.setMaxFileLength(logFileSize);
-        dm.setDirectory(this.journalDirectory);
-        dm.start();
-        return new JournalFacade(dm);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java
deleted file mode 100644
index 6afdd1b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-
-import junit.framework.TestCase;
-import org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Tests the Location Class
- * 
- * 
- */
-public class LocationTest extends TestCase {
-    private static final transient Logger LOG = LoggerFactory.getLogger(LocationTest.class);
-
-    @SuppressWarnings("unchecked")
-    public synchronized void testRecordLocationImplComparison() throws IOException {
-        Location l1 = new Location();
-        l1.setDataFileId(0);
-        l1.setOffset(5);
-        Location l2 = new Location(l1);
-        l2.setOffset(10);
-        Location l3 = new Location(l2);
-        l3.setDataFileId(2);
-        l3.setOffset(0);
-
-        assertTrue(l1.compareTo(l2) < 0);
-
-        // Sort them using a list. Put them in the wrong order.
-        ArrayList<RecordLocationFacade> l = new ArrayList<RecordLocationFacade>();
-        l.add(new RecordLocationFacade(l2));
-        l.add(new RecordLocationFacade(l3));
-        l.add(new RecordLocationFacade(l1));
-        Collections.sort(l);
-
-        // Did they get sorted to the correct order?
-        LOG.debug(l.get(0).toString());
-        assertSame(l.get(0).getLocation(), l1);
-        assertSame(l.get(1).getLocation(), l2);
-        assertSame(l.get(2).getLocation(), l3);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/NioDataFileAppenderTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/NioDataFileAppenderTest.java
deleted file mode 100644
index c96b20d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/NioDataFileAppenderTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.kaha.impl.async;
-
-public class NioDataFileAppenderTest extends DataFileAppenderTest {
-
-    @Override
-    protected void configure(AsyncDataManager dataManager) {
-        dataManager.setUseNio(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedListTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedListTest.java
deleted file mode 100644
index 033c35c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedListTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.activemq.kaha.impl.DataManager;
-import org.apache.activemq.kaha.impl.data.DataManagerImpl;
-import org.apache.activemq.kaha.impl.data.Item;
-import org.apache.activemq.util.IOHelper;
-
-
-public class DiskIndexLinkedListTest extends VMIndexLinkedListTest {
-
-    private IndexManager im;
-    protected IndexLinkedList createList(IndexItem root) throws IOException {
-        String dirName = System.getProperty("basedir", ".") + "/target/activemq-data/testIndex";
-        File file = new File(dirName);
-        file.mkdirs();
-        IOHelper.deleteChildren(file);
-        DataManager dm = new DataManagerImpl(file,"test",new AtomicLong());
-        im = new IndexManager(file,"test","rw",dm,new AtomicLong());
-        root = im.createNewIndex();
-        im.storeIndex(root);
-        return new DiskIndexLinkedList(im,root);
-    }
-    
-    IndexItem createIndex(IndexLinkedList indexList,int offset) throws IOException {
-        IndexItem result =  im.createNewIndex();
-        im.storeIndex(result);
-        return result;
-    }
-    
-    protected void addToList(IndexLinkedList list,IndexItem item) throws IOException {
-        IndexItem root = list.getRoot();
-        IndexItem prev = list.getLast();
-        prev = prev != null ? prev : root;
-        IndexItem next = list.getNextEntry(prev);
-        prev.setNextItem(item.getOffset());
-        item.setPreviousItem(prev.getOffset());
-        im.updateIndexes(prev);
-        if (next != null) {
-            next.setPreviousItem(item.getOffset());
-            item.setNextItem(next.getOffset());
-            im.updateIndexes(next);
-        }
-        im.storeIndex(item);
-        list.add(item);
-    }
-    
-    protected void insertToList(IndexLinkedList list,int pos,IndexItem item) throws IOException {
-        IndexItem root = list.getRoot();
-        IndexItem prev = null;
-        IndexItem next = null;
-        if (pos <= 0) {
-            prev = root;
-            next = list.getNextEntry(root);
-        } else if (pos >= list.size()) {
-            prev = list.getLast();
-            if (prev==null) {
-                prev=root;
-            }
-            next = null;
-        } else {
-            prev = list.get(pos);
-            prev = prev != null ? prev : root;
-            next = list.getNextEntry(prev);
-        }
-        prev.setNextItem(item.getOffset());
-        item.setPreviousItem(prev.getOffset());
-        im.updateIndexes(prev);
-        if (next != null) {
-            next.setPreviousItem(item.getOffset());
-            item.setNextItem(next.getOffset());
-            im.updateIndexes(next);
-        }
-        im.storeIndex(item);
-        list.setRoot(root);
-        list.add(pos,item);
-    }
-    
-    protected void insertFirst(IndexLinkedList list,IndexItem item) throws IOException {
-        IndexItem root = list.getRoot();
-        IndexItem prev = root;
-        IndexItem next = list.getNextEntry(prev);
-        prev.setNextItem(item.getOffset());
-        item.setPreviousItem(prev.getOffset());
-        im.updateIndexes(prev);
-        if (next != null) {
-            next.setPreviousItem(item.getOffset());
-            item.setNextItem(next.getOffset());
-            im.updateIndexes(next);
-        }
-        im.storeIndex(item);
-        list.addFirst(item);
-    }
-    
-    protected synchronized void remove(IndexLinkedList list,IndexItem item) throws IOException {
-        IndexItem root = list.getRoot();
-        IndexItem prev = list.getPrevEntry(item);
-        IndexItem next = list.getNextEntry(item);
-        list.remove(item);
-
-        prev = prev == null ? root : prev;
-        next = (next == null || !next.equals(root)) ? next : null;
-       
-        if (next != null) {
-            prev.setNextItem(next.getOffset());
-            next.setPreviousItem(prev.getOffset());
-            im.updateIndexes(next);
-        } else {
-            prev.setNextItem(Item.POSITION_NOT_SET);
-        }
-        im.updateIndexes(prev);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/IndexBenchmark.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/IndexBenchmark.java
deleted file mode 100755
index 7197bcc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/IndexBenchmark.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
-import junit.framework.TestCase;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.util.IOHelper;
-
-/**
- * @author chirino
- */
-public abstract class IndexBenchmark extends TestCase {
-
-    // Slower machines might need to make this bigger.
-    private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
-    // How many times do we sample?
-    private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", "" + 60 * 1000 / SAMPLE_DURATION)); // Take
-                                                                                                                            // enough
-                                                                                                                            // samples
-                                                                                                                            // to
-                                                                                                                            // run
-                                                                                                                            // for
-                                                                                                                            // a
-                                                                                                                            // minute.
-
-    // How many indexes will we be benchmarking concurrently?
-    private static final int INDEX_COUNT = Integer.parseInt(System.getProperty("INDEX_COUNT", "" + 1));
-    // Indexes tend to perform worse when they get big.. so how many items
-    // should we put into the index before we start sampling.
-    private static final int INDEX_PRE_LOAD_COUNT = Integer.parseInt(System.getProperty("INDEX_PRE_LOAD_COUNT", "" + 10000 / INDEX_COUNT));
-
-    protected File ROOT_DIR;
-    protected final HashMap<String, Index> indexes = new HashMap<String, Index>();
-    protected IndexManager indexManager;
-
-    public void setUp() throws Exception {
-        ROOT_DIR = new File(IOHelper.getDefaultDataDirectory());
-        IOHelper.mkdirs(ROOT_DIR);
-        IOHelper.deleteChildren(ROOT_DIR);
-        indexManager = new IndexManager(ROOT_DIR, getClass().getName(), "rw", null, new AtomicLong());
-    }
-
-    protected void tearDown() throws Exception {
-        for (Index i : indexes.values()) {
-            try {
-                i.unload();
-            } catch (Throwable ignore) {
-            }
-        }
-        indexManager.close();
-    }
-
-    abstract protected Index createIndex(File root, String name) throws Exception;
-
-    synchronized private Index openIndex(String name) throws Exception {
-        Index index = indexes.get(name);
-        if (index == null) {
-            index = createIndex(ROOT_DIR, name);
-            index.load();
-            indexes.put(name, index);
-        }
-        return index;
-    }
-
-    class Producer extends Thread {
-        private final String name;
-        AtomicBoolean shutdown = new AtomicBoolean();
-
-        public Producer(String name) {
-            super("Producer: " + name);
-            this.name = name;
-        }
-
-        public void shutdown() {
-            shutdown.set(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-
-                IndexItem value = indexManager.createNewIndex();
-                indexManager.storeIndex(value);
-
-                Index index = openIndex(name);
-                long counter = 0;
-                while (!shutdown.get()) {
-                    long c = counter;
-
-                    String key = "a-long-message-id-like-key-" + c;
-                    index.store(key, value);
-                    onProduced(counter++);
-                }
-
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-
-        public void onProduced(long counter) {
-        }
-    }
-
-    class Consumer extends Thread {
-        private final String name;
-        AtomicBoolean shutdown = new AtomicBoolean();
-
-        public Consumer(String name) {
-            super("Consumer: " + name);
-            this.name = name;
-        }
-
-        public void shutdown() {
-            shutdown.set(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-                Index index = openIndex(name);
-                long counter = 0;
-                while (!shutdown.get()) {
-                    long c = counter;
-                    String key = "a-long-message-id-like-key-" + c;
-                    StoreEntry record;
-                    record = index.get(key);
-                    if (record != null) {
-                        index.remove(key);
-                        onConsumed(counter++);
-                    } else {
-                        Thread.sleep(0);
-                    }
-                }
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-
-        public void onConsumed(long counter) {
-        }
-    }
-
-    public void testLoad() throws Exception {
-
-        final Producer producers[] = new Producer[INDEX_COUNT];
-        final Consumer consumers[] = new Consumer[INDEX_COUNT];
-        final CountDownLatch preloadCountDown = new CountDownLatch(INDEX_COUNT);
-        final AtomicLong producedRecords = new AtomicLong();
-        final AtomicLong consumedRecords = new AtomicLong();
-
-        System.out.println("Starting: " + INDEX_COUNT + " producers");
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            producers[i] = new Producer("test-" + i) {
-                private boolean prelaodDone;
-
-                public void onProduced(long counter) {
-                    if (!prelaodDone && counter >= INDEX_PRE_LOAD_COUNT) {
-                        prelaodDone = true;
-                        preloadCountDown.countDown();
-                    }
-                    producedRecords.incrementAndGet();
-                }
-            };
-            producers[i].start();
-        }
-
-        long start = System.currentTimeMillis();
-        System.out.println("Waiting for each producer create " + INDEX_PRE_LOAD_COUNT + " records before starting the consumers.");
-        preloadCountDown.await();
-        long end = System.currentTimeMillis();
-        System.out.println("Preloaded " + INDEX_PRE_LOAD_COUNT * INDEX_COUNT + " records at " + (INDEX_PRE_LOAD_COUNT * INDEX_COUNT * 1000f / (end - start)) + " records/sec");
-
-        System.out.println("Starting: " + INDEX_COUNT + " consumers");
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            consumers[i] = new Consumer("test-" + i) {
-                public void onConsumed(long counter) {
-                    consumedRecords.incrementAndGet();
-                }
-            };
-            consumers[i].start();
-        }
-
-        long sample_start = System.currentTimeMillis();
-        System.out.println("Taking " + SAMPLES + " performance samples every " + SAMPLE_DURATION + " ms");
-        System.out.println("time (s), produced, produce rate (r/s), consumed, consume rate (r/s), used memory (k)");
-        producedRecords.set(0);
-        consumedRecords.set(0);
-        for (int i = 0; i < SAMPLES; i++) {
-            start = System.currentTimeMillis();
-            Thread.sleep(SAMPLE_DURATION);
-            end = System.currentTimeMillis();
-            long p = producedRecords.getAndSet(0);
-            long c = consumedRecords.getAndSet(0);
-
-            long usedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
-
-            System.out.println(((end-sample_start)/1000f)+", "+p+", "+(p * 1000f / (end - start)) + ", "+ c+", " + (c * 1000f / (end - start))+", "+(usedMemory/(1024)) );
-        }
-        System.out.println("Samples done... Shutting down the producers and consumers...");
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            producers[i].shutdown();
-            consumers[i].shutdown();
-        }
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            producers[i].join(1000 * 5);
-            consumers[i].join(1000 * 5);
-        }
-        System.out.println("Shutdown.");
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedListTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedListTest.java
deleted file mode 100644
index 02a1efd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedListTest.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * 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.kaha.impl.index;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-import org.apache.activemq.kaha.StoreEntry;
-import org.apache.activemq.kaha.impl.data.Item;
-
-/**
- * 
- */
-public class VMIndexLinkedListTest extends TestCase {
-    static final int NUMBER = 30;
-    private IndexItem root;
-    private List<IndexItem> testData = new ArrayList<IndexItem>();
-    private IndexLinkedList list;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        
-        IndexItem item = new IndexItem();
-        list = createList(item);
-        this.root = list.getRoot();
-        
-        for (int i = 0; i < NUMBER; i++) {
-            item = createIndex(list,i);
-            testData.add(item);
-        }
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        testData.clear();
-        list = null;
-    }
-    
-    IndexItem createIndex(IndexLinkedList list,int offset) throws IOException {
-        IndexItem result =  new IndexItem();
-        result.setOffset(offset);
-        return result;
-    }
-    protected IndexLinkedList createList(IndexItem root) throws IOException {
-        return new VMIndexLinkedList(root);
-    }
-    
-    protected void addToList(IndexLinkedList list,IndexItem item) throws IOException {
-        list.add(item);
-    }
-    
-    protected void insertToList(IndexLinkedList list,int pos,IndexItem item) throws IOException {
-        list.add(pos, item);
-    }
-    
-    protected void insertFirst(IndexLinkedList list,IndexItem item) throws IOException {
-        list.addFirst(item);
-    }
-    
-    protected synchronized void remove(IndexLinkedList list,IndexItem item) throws IOException {
-        IndexItem root = list.getRoot();
-        IndexItem prev = list.getPrevEntry(item);
-        IndexItem next = list.getNextEntry(item);
-        list.remove(item);
-    }
-    
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.getFirst()'
-     */
-    public void testGetFirst() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        assertNotNull(list.getFirst());
-        assertTrue(list.getFirst().equals(testData.get(0)));
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.getLast()'
-     */
-    public void testGetLast() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        assertTrue(list.getLast() == testData.get(testData.size() - 1));
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.removeFirst()'
-     */
-    public void testRemoveFirst() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        assertTrue(list.removeFirst().equals(testData.get(0)));
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.removeLast()'
-     */
-    public void testRemoveLast() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        assertTrue(list.removeLast().equals(testData.get(testData.size() - 1)));
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.addFirst(IndexItem)'
-     */
-    public void testAddFirst() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            insertFirst(list, testData.get(i));
-        }
-        int count = 0;
-        for (int i = testData.size() - 1; i >= 0; i--) {
-            assertTrue(testData.get(i).equals(list.get(count++)));
-        }
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.addLast(IndexItem)'
-     */
-    public void testAddLast() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        for (int i = 0; i < testData.size(); i++) {
-            assertTrue(testData.get(i).equals(list.get(i)));
-        }
-    }
-
-    /*
-     * test method for 'org.apache.activemq.kaha.impl.VMIndexLinkedList.size()'
-     */
-    public void testSize() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-            assertTrue(list.size() == i + 1);
-        }
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.isEmpty()'
-     */
-    public void testIsEmpty() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-            assertTrue(list.size() == i + 1);
-        }
-        list.clear();
-        assertTrue(list.isEmpty());
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.add(IndexItem)'
-     */
-    public void testAddIndexItem() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        for (int i = 0; i < testData.size(); i++) {
-            assertTrue(testData.get(i).equals(list.get(i)));
-        }
-    }
-
-    /*
-     * test method for 'org.apache.activemq.kaha.impl.VMIndexLinkedList.clear()'
-     */
-    public void testClear() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-            assertTrue(list.size() == i + 1);
-        }
-        list.clear();
-        assertTrue(list.isEmpty());
-    }
-
-    /*
-     * test method for 'org.apache.activemq.kaha.impl.VMIndexLinkedList.add(int,
-     * IndexItem)'
-     */
-    public void testAddIntIndexItem() throws IOException {
-        for (int i = 0; i < this.testData.size(); i++) {
-            insertToList(list, i, testData.get(i));
-        }
-        for (int i = 0; i < testData.size(); i++) {
-            assertTrue(testData.get(i).equals(list.get(i)));
-        }
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.remove(int)'
-     */
-    public void testRemoveInt() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            insertToList(list, i, testData.get(i));
-        }
-        for (int i = 0; i < testData.size(); i++) {
-            list.remove(0);
-        }
-        assertTrue(list.isEmpty());
-        for (int i = 0; i < testData.size(); i++) {
-            insertToList(list, i, testData.get(i));
-        }
-        for (int i = 0; i < testData.size(); i++) {
-            list.remove(list.size() - 1);
-        }
-        assertTrue(list.isEmpty());
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.indexOf(IndexItem)'
-     */
-    public void testIndexOf() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        for (int i = 0; i < testData.size(); i++) {
-            assertTrue(list.indexOf(testData.get(i)) == i);
-        }
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.getNextEntry(IndexItem)'
-     */
-    public void testGetNextEntry() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        IndexItem next = list.getFirst();
-        int count = 0;
-        while (next != null) {
-            assertTrue(next.equals(testData.get(count++)));
-            next = list.getNextEntry(next);
-            assertTrue(next == null || !next.equals(root));
-        }
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.getPrevEntry(IndexItem)'
-     */
-    public void testGetPrevEntry() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        IndexItem next = list.getLast();
-        int count = testData.size() - 1;
-        while (next != null) {
-            assertTrue(next.equals(testData.get(count--)));
-            next = list.getPrevEntry(next);
-            assertTrue(next == null || !next.equals(root));
-        }
-    }
-
-    /*
-     * test method for
-     * 'org.apache.activemq.kaha.impl.VMIndexLinkedList.remove(IndexItem)'
-     */
-    public void testRemoveIndexItem() throws IOException {
-        for (int i = 0; i < testData.size(); i++) {
-            addToList(list,testData.get(i));
-        }
-        for (int i = 0; i < testData.size(); i++) {
-            list.remove(testData.get(i));
-            assertTrue(list.size() == testData.size() - i - 1);
-        }
-    }
-    
-    public void testAddRemove() throws IOException {
-        IndexItem a = createIndex(list,0);
-        addToList(list, a);
-        IndexItem b = createIndex(list,1);
-        addToList(list, b);
-        IndexItem c = createIndex(list,2);
-        addToList(list, c);
-        IndexItem d = createIndex(list,3);
-        addToList(list, d);
-        remove(list, d);
-        assertTrue(list.getLast().equals(c));
-        assertTrue(list.getNextEntry(b).equals(c));
-        remove(list, b);
-        assertTrue(list.getNextEntry(a).equals(c));
-        assertTrue(list.getLast().equals(c));
-        
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashIndexBenchMark.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashIndexBenchMark.java
deleted file mode 100644
index 84877b1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashIndexBenchMark.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import java.io.File;
-
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.impl.index.Index;
-import org.apache.activemq.kaha.impl.index.IndexBenchmark;
-import org.apache.activemq.kaha.impl.index.hash.HashIndex;
-
-public class HashIndexBenchMark extends IndexBenchmark {
-
-    @Override
-    protected Index createIndex(File root, String name) throws Exception {
-        HashIndex index = new HashIndex(root, name, indexManager);
-        index.setNumberOfBins(12);
-        index.setPageSize(32 * 1024);
-        index.setKeyMarshaller(Store.STRING_MARSHALLER);
-        return index;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java
deleted file mode 100644
index 6894fe1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/hash/HashTest.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * 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.kaha.impl.index.hash;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicLong;
-import junit.framework.TestCase;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-import org.apache.activemq.util.IOHelper;
-
-/**
- * Test a HashIndex
- */
-public class HashTest extends TestCase {
-
-    private static final int COUNT = 10000;
-
-    private HashIndex hashIndex;
-
-    private File directory;
-
-    private IndexManager indexManager;
-
-    /**
-     * @throws java.lang.Exception
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        directory = new File(IOHelper.getDefaultDataDirectory());
-        IOHelper.mkdirs(directory);
-        IOHelper.deleteChildren(directory);
-        indexManager = new IndexManager(directory, "im-hash-test", "rw", null,
-                new AtomicLong());
-        this.hashIndex = new HashIndex(directory, "testHash", indexManager);
-        this.hashIndex.setNumberOfBins(12);
-        this.hashIndex.setPageSize(32 * 1024);
-        this.hashIndex.setKeyMarshaller(Store.STRING_MARSHALLER);
-    }
-
-    public void testHashIndex() throws Exception {
-        doTest(300);
-        hashIndex.clear();
-        hashIndex.unload();
-        doTest(600);
-        hashIndex.clear();
-        hashIndex.unload();
-        doTest(128);
-    }
-
-    public void doTest(int pageSize) throws Exception {
-        String keyRoot = "key:";
-        hashIndex.setPageSize(pageSize);
-        this.hashIndex.load();
-        doInsert(keyRoot);
-        this.hashIndex.unload();
-        this.hashIndex.load();
-        checkRetrieve(keyRoot);
-        doRemove(keyRoot);
-        this.hashIndex.unload();
-        this.hashIndex.load();
-        doInsert(keyRoot);
-        doRemoveHalf(keyRoot);
-        doInsertHalf(keyRoot);
-        this.hashIndex.unload();
-        this.hashIndex.load();
-        checkRetrieve(keyRoot);
-        this.hashIndex.unload();
-    }
-
-    void doInsert(String keyRoot) throws Exception {
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem value = indexManager.createNewIndex();
-            indexManager.storeIndex(value);
-            hashIndex.store(keyRoot + i, value);
-        }
-    }
-
-    void checkRetrieve(String keyRoot) throws IOException {
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem item = (IndexItem) hashIndex.get(keyRoot + i);
-            assertNotNull(item);
-        }
-    }
-
-    void doRemoveHalf(String keyRoot) throws Exception {
-        for (int i = 0; i < COUNT; i++) {
-            if (i % 2 == 0) {
-                hashIndex.remove(keyRoot + i);
-            }
-
-        }
-    }
-
-    void doInsertHalf(String keyRoot) throws Exception {
-        for (int i = 0; i < COUNT; i++) {
-            if (i % 2 == 0) {
-                IndexItem value = indexManager.createNewIndex();
-                indexManager.storeIndex(value);
-                hashIndex.store(keyRoot + i, value);
-            }
-        }
-    }
-
-    void doRemove(String keyRoot) throws Exception {
-        for (int i = 0; i < COUNT; i++) {
-            hashIndex.remove(keyRoot + i);
-        }
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem item = (IndexItem) hashIndex.get(keyRoot + i);
-            assertNull(item);
-        }
-    }
-
-    void doRemoveBackwards(String keyRoot) throws Exception {
-        for (int i = COUNT - 1; i >= 0; i--) {
-            hashIndex.remove(keyRoot + i);
-        }
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem item = (IndexItem) hashIndex.get(keyRoot + i);
-            assertNull(item);
-        }
-    }
-
-    /**
-     * @throws java.lang.Exception
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        File[] files = directory.listFiles();
-        for (File file : files) {
-            file.delete();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/tree/TreeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/tree/TreeTest.java
deleted file mode 100644
index d1adaf8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/index/tree/TreeTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * 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.kaha.impl.index.tree;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import junit.framework.TestCase;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexManager;
-
-/**
- * Test a TreeIndex
- */
-public class TreeTest extends TestCase {
-
-    private static final int COUNT = 55;
-    private TreeIndex tree;
-    private File directory;
-    private IndexManager indexManager;
-    private boolean dumpTree;
-
-    /**
-     * @throws java.lang.Exception
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        directory = new File("activemq-data");
-        directory.mkdirs();
-        indexManager = new IndexManager(directory, "im-test", "rw", null,new AtomicLong());
-        this.tree = new TreeIndex(directory, "testTree", indexManager);
-        this.tree.setKeyMarshaller(Store.STRING_MARSHALLER);
-    }
-
-    public void testTreeWithCaching() throws Exception {
-        this.tree.setEnablePageCaching(true);
-        // doTest();
-    }
-
-    public void testTreeWithoutCaching() throws Exception {
-        this.tree.setEnablePageCaching(false);
-        // doTest();
-    }
-
-    public void doTest() throws Exception {
-        // doTest(300);
-        // tree.clear();
-        // tree.unload();
-        // count = 55 - this fails
-        doTest(600);
-        // tree.clear();
-        // tree.unload();
-        // doTest(1024*16);
-    }
-
-    public void doTest(int pageSize) throws Exception {
-        String keyRoot = "key:";
-        tree.setPageSize(pageSize);
-        this.tree.load();
-        // doInsert(keyRoot);
-        // checkRetrieve(keyRoot);
-        // doRemove(keyRoot);
-        doInsert(keyRoot);
-        doRemoveBackwards(keyRoot);
-    }
-
-    void doInsert(String keyRoot) throws Exception {
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem value = indexManager.createNewIndex();
-            indexManager.storeIndex(value);
-            tree.store(keyRoot + i, value);
-        }
-    }
-
-    void checkRetrieve(String keyRoot) throws IOException {
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem item = (IndexItem)tree.get(keyRoot + i);
-            assertNotNull(item);
-        }
-    }
-
-    void doRemove(String keyRoot) throws Exception {
-        for (int i = 0; i < COUNT; i++) {
-            tree.remove(keyRoot + i);
-            // System.out.println("Removed " + keyRoot+i);
-            // tree.getRoot().dump();
-            // System.out.println("");
-        }
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem item = (IndexItem)tree.get(keyRoot + i);
-            assertNull(item);
-        }
-    }
-
-    void doRemoveBackwards(String keyRoot) throws Exception {
-        for (int i = COUNT - 1; i >= 0; i--) {
-            tree.remove(keyRoot + i);
-            System.out.println("BACK Removed " + keyRoot + i);
-            tree.getRoot().dump();
-            System.out.println("");
-        }
-        for (int i = 0; i < COUNT; i++) {
-            IndexItem item = (IndexItem)tree.get(keyRoot + i);
-            assertNull(item);
-        }
-    }
-
-    /**
-     * @throws java.lang.Exception
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        File[] files = directory.listFiles();
-        for (File file : files) {
-            file.delete();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java b/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java
deleted file mode 100644
index 0f69567..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * 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.load;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.activemq.perf.PerfRate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class LoadClient implements Runnable{
-    private static final Logger LOG = LoggerFactory.getLogger(LoadClient.class);
-    protected static int SLEEP_TIME = 2;
-    protected String name;
-    protected ConnectionFactory factory;
-    protected Connection connection;
-    protected Destination startDestination;
-    protected Destination nextDestination;
-    protected Session session;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected PerfRate rate = new PerfRate();
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
-    protected boolean connectionPerMessage = false;
-    protected boolean running;
-    protected int timeout = 10000;
-    
-
-    public LoadClient(String name,ConnectionFactory factory) {
-       this.name=name;
-       this.factory = factory;
-    }
-
-   
-
-    public synchronized void start() throws JMSException {
-        if (!running) {
-            rate.reset();
-            running = true;
-            if (!connectionPerMessage) {
-                connection = factory.createConnection();
-                connection.start();
-                session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                consumer = session.createConsumer(getConsumeDestination());
-                producer = session.createProducer(getSendDestination());
-                producer.setDeliveryMode(this.deliveryMode);
-                
-            }
-            
-            Thread t = new  Thread(this);
-            t.setName(name);
-            t.start();
-        }
-    }
-
-    public void stop() throws JMSException, InterruptedException {
-        running = false;
-        if(connection != null) {
-            connection.stop();
-        }
-    }
-
-    
-    public void run() {
-        try {
-            while (running) {
-                String result = consume();
-                if(result != null) {
-                    send(result);
-                    rate.increment();
-                }
-                else if (running) {
-                    LOG.error(name + " Failed to consume!");
-                }
-            }
-        } catch (Throwable e) {
-            e.printStackTrace();
-        } 
-    }
-    
-    protected String consume() throws Exception {
-        Connection con  = null;
-        MessageConsumer c = consumer;
-        if (connectionPerMessage){
-            con = factory.createConnection();
-            con.start();
-            Session s = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            c = s.createConsumer(getConsumeDestination());
-        }
-        TextMessage result = (TextMessage) c.receive(timeout);
-        if (result != null) {
-            if (audit.isDuplicate(result.getJMSMessageID())) {
-                throw new JMSException("Received duplicate " + result.getText());
-            }
-            if (!audit.isInOrder(result.getJMSMessageID())) {
-                throw new JMSException("Out of order " + result.getText());
-            }
-            
-            if (connectionPerMessage) {
-                Thread.sleep(SLEEP_TIME);//give the broker a chance
-                con.close();
-            }
-        }
-        return result != null ? result.getText() : null;
-    }
-    
-    protected void send(String text) throws Exception {
-        Connection con  = connection;
-        MessageProducer p = producer;
-        Session s = session;
-        if (connectionPerMessage){
-            con = factory.createConnection();
-            con.start();
-            s = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            p = s.createProducer(getSendDestination());
-            p.setDeliveryMode(deliveryMode);
-        }
-        TextMessage message = s.createTextMessage(text);
-        p.send(message);
-        if (connectionPerMessage) {
-            Thread.sleep(SLEEP_TIME);//give the broker a chance
-            con.close();
-        }
-    }
-
-
-
-    public String getName() {
-        return name;
-    }
-
-
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-
-
-    public Destination getStartDestination() {
-        return startDestination;
-    }
-
-
-
-    public void setStartDestination(Destination startDestination) {
-        this.startDestination = startDestination;
-    }
-
-
-
-    public Destination getNextDestination() {
-        return nextDestination;
-    }
-
-
-
-    public void setNextDestination(Destination nextDestination) {
-        this.nextDestination = nextDestination;
-    }
-
-
-
-    public int getDeliveryMode() {
-        return deliveryMode;
-    }
-
-
-
-    public void setDeliveryMode(int deliveryMode) {
-        this.deliveryMode = deliveryMode;
-    }
-
-
-
-    public boolean isConnectionPerMessage() {
-        return connectionPerMessage;
-    }
-
-
-
-    public void setConnectionPerMessage(boolean connectionPerMessage) {
-        this.connectionPerMessage = connectionPerMessage;
-    }
-
-
-
-    public int getTimeout() {
-        return timeout;
-    }
-
-
-
-    public void setTimeout(int timeout) {
-        this.timeout = timeout;
-    }
-    
-    protected Destination getSendDestination() {
-        return nextDestination;
-    }
-    
-    protected Destination getConsumeDestination() {
-        return startDestination;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadController.java b/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadController.java
deleted file mode 100644
index 7841eb9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadController.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.load;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-/**
- * 
- */
-public class LoadController extends LoadClient{
-    private int numberOfBatches=1;
-    private int batchSize =1000;
-    private int count;
-    private final CountDownLatch stopped = new CountDownLatch(1);
-     
-
-    public LoadController(String name,ConnectionFactory factory) {
-       super(name,factory);
-    }
-
-       
-    public int awaitTestComplete() throws InterruptedException {
-        boolean complete = stopped.await(60*5,TimeUnit.SECONDS);
-        return count;
-    }
-
-    public void stop() throws JMSException, InterruptedException {
-        running = false;
-        stopped.countDown();
-        if (connection != null) {
-            this.connection.stop();
-        }
-    }
-    
-    public void run() {
-        try {
-            for (int i = 0; i < numberOfBatches; i++) {
-                for (int j = 0; j < batchSize; j++) {
-                    String payLoad = "batch[" + i + "]no:" + j;
-                    send(payLoad);
-                }
-                for (int j = 0; j < batchSize; j++) {
-                    String result = consume();
-                    if (result != null) {
-                        count++;
-                    rate.increment();
-                    }
-                }
-            }
-        } catch (Throwable e) {
-            e.printStackTrace();
-        } finally {
-            stopped.countDown();
-        }
-    }
-
-
-    public int getNumberOfBatches() {
-        return numberOfBatches;
-    }
-
-
-    public void setNumberOfBatches(int numberOfBatches) {
-        this.numberOfBatches = numberOfBatches;
-    }
-
-
-    public int getBatchSize() {
-        return batchSize;
-    }
-
-
-    public void setBatchSize(int batchSize) {
-        this.batchSize = batchSize;
-    }
-    
-    protected Destination getSendDestination() {
-        return startDestination;
-    }
-    
-    protected Destination getConsumeDestination() {
-        return nextDestination;
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java
deleted file mode 100644
index ee1037b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.load;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class LoadTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(LoadTest.class);
-    
-    protected BrokerService broker;
-    protected String bindAddress="tcp://localhost:61616";
-    
-    protected LoadController controller;
-    protected LoadClient[] clients;
-    protected ConnectionFactory factory;
-    protected Destination destination;
-    protected int numberOfClients = 50;
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected int batchSize = 1000;
-    protected int numberOfBatches = 10;
-    protected int timeout = Integer.MAX_VALUE;
-    protected boolean connectionPerMessage = false;
-    protected Connection managementConnection;
-    protected Session managementSession;
-
-    /**
-     * Sets up a test where the producer and consumer have their own connection.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker(bindAddress);
-        }
-        factory = createConnectionFactory(bindAddress);
-        managementConnection = factory.createConnection();
-        managementSession = managementConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        Destination startDestination = createDestination(managementSession, getClass()+".start");
-        Destination endDestination = createDestination(managementSession, getClass()+".end");
-        LOG.info("Running with " + numberOfClients + " clients - sending "
-                + numberOfBatches + " batches of " + batchSize + " messages");
-        controller = new LoadController("Controller",factory);
-        controller.setBatchSize(batchSize);
-        controller.setNumberOfBatches(numberOfBatches);
-        controller.setDeliveryMode(deliveryMode);
-        controller.setConnectionPerMessage(connectionPerMessage);
-        controller.setStartDestination(startDestination);
-        controller.setNextDestination(endDestination);
-        controller.setTimeout(timeout);
-        clients = new LoadClient[numberOfClients];
-        for (int i = 0; i < numberOfClients; i++) {
-            Destination inDestination = null;
-            if (i==0) {
-                inDestination = startDestination;
-            }else {
-                inDestination = createDestination(managementSession, getClass() + ".client."+(i));
-            }
-            Destination outDestination = null;
-            if (i==(numberOfClients-1)) {
-                outDestination = endDestination;
-            }else {
-                outDestination = createDestination(managementSession, getClass() + ".client."+(i+1));
-            }
-            LoadClient client = new LoadClient("client("+i+")",factory);
-            client.setTimeout(timeout);
-            client.setDeliveryMode(deliveryMode);
-            client.setConnectionPerMessage(connectionPerMessage);
-            client.setStartDestination(inDestination);
-            client.setNextDestination(outDestination);
-            clients[i] = client;
-        }
-        
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        managementConnection.close();
-        for (int i = 0; i < numberOfClients; i++) {
-            clients[i].stop();
-        }
-        controller.stop();
-        if (broker != null) {
-            broker.stop();
-            broker = null;
-        }
-    }
-
-    protected Destination createDestination(Session s, String destinationName) throws JMSException {
-        return s.createQueue(destinationName);
-    }
-
-    /**
-     * Factory method to create a new broker
-     * 
-     * @throws Exception
-     */
-    protected BrokerService createBroker(String uri) throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer,uri);
-        answer.start();
-        return answer;
-    }
-
-    
-    
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(uri);
-        answer.setUseShutdownHook(false);
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory(String uri) throws Exception {
-        return new ActiveMQConnectionFactory(uri);
-    }
-
-    public void testLoad() throws JMSException, InterruptedException {
-        for (int i = 0; i < numberOfClients; i++) {
-            clients[i].start();
-        }
-        controller.start();
-        assertEquals((batchSize* numberOfBatches),controller.awaitTestComplete());
-        
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java
deleted file mode 100755
index 194cbbc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.management;
-
-
-public class BoundaryStatisticTest extends StatisticTestSupport {
-    
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(BoundaryStatisticTest.class);
-
-    /**
-     * Use case for BoundaryStatisticImpl class.
-     * @throws Exception
-     */
-    public void testStatistic() throws Exception {
-        BoundaryStatisticImpl stat = new BoundaryStatisticImpl("myBoundaryStat", "seconds", "myBoundaryStatDesc", 1000, 2000);
-        assertStatistic(stat, "myBoundaryStat", "seconds", "myBoundaryStatDesc");
-
-        assertEquals(1000, stat.getLowerBound());
-        assertEquals(2000, stat.getUpperBound());
-
-        LOG.info("Stat is: " + stat);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java
deleted file mode 100755
index b920718..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.management;
-
-
-
-/**
- * 
- */
-public class BoundedRangeStatisticTest extends RangeStatisticTest {
-
-    /**
-     * Use case for BoundedRangeStatisticImpl class.
-     * @throws Exception
-     */
-    public void testStatistic() throws Exception {
-        BoundedRangeStatisticImpl stat = new BoundedRangeStatisticImpl("myRange", "millis", "myDescription", 10, 3000);
-        assertStatistic(stat, "myRange", "millis", "myDescription");
-        assertEquals(10, stat.getLowerBound());
-        assertEquals(3000, stat.getUpperBound());
-
-        assertRangeStatistic(stat);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/management/CountStatisticTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/management/CountStatisticTest.java
deleted file mode 100755
index 85f8be1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/management/CountStatisticTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.management;
-
-
-public class CountStatisticTest extends StatisticTestSupport {
-    
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(CountStatisticTest.class);
-
-    /**
-     * Use case for CountStatisticImple class.
-     * @throws Exception
-     */
-    public void testStatistic() throws Exception {
-        CountStatisticImpl stat = new CountStatisticImpl("myCounter", "seconds", "myDescription");
-        stat.setEnabled(true);
-        assertStatistic(stat, "myCounter", "seconds", "myDescription");
-
-        assertEquals(0, stat.getCount());
-
-        stat.increment();
-        assertEquals(1, stat.getCount());
-
-        stat.increment();
-        assertEquals(2, stat.getCount());
-
-        stat.decrement();
-        assertEquals(1, stat.getCount());
-
-        Thread.sleep(500);
-
-        stat.increment();
-
-        assertLastTimeNotStartTime(stat);
-
-        LOG.info("Counter is: " + stat);
-
-        stat.reset();
-
-        assertEquals(0, stat.getCount());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/management/RangeStatisticTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/management/RangeStatisticTest.java
deleted file mode 100755
index 49caa98..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/management/RangeStatisticTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.management;
-
-
-public class RangeStatisticTest extends StatisticTestSupport {
-    
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(RangeStatisticTest.class);
-
-    /**
-     * Use case for RangeStatisticImpl class.
-     * @throws Exception
-     */
-    public void testStatistic() throws Exception {
-        RangeStatisticImpl stat = new RangeStatisticImpl("myRange", "millis", "myDescription");
-        assertStatistic(stat, "myRange", "millis", "myDescription");
-
-        assertRangeStatistic(stat);
-    }
-
-    protected void assertRangeStatistic(RangeStatisticImpl stat) throws InterruptedException {
-        assertEquals(0, stat.getCurrent());
-        assertEquals(0, stat.getLowWaterMark());
-        assertEquals(0, stat.getHighWaterMark());
-
-        stat.setCurrent(100);
-        assertEquals(100, stat.getCurrent());
-        assertEquals(100, stat.getLowWaterMark());
-        assertEquals(100, stat.getHighWaterMark());
-
-        stat.setCurrent(50);
-        assertEquals(50, stat.getCurrent());
-        assertEquals(50, stat.getLowWaterMark());
-        assertEquals(100, stat.getHighWaterMark());
-
-        stat.setCurrent(200);
-        assertEquals(200, stat.getCurrent());
-        assertEquals(50, stat.getLowWaterMark());
-        assertEquals(200, stat.getHighWaterMark());
-
-        Thread.sleep(500);
-
-        stat.setCurrent(10);
-        assertEquals(10, stat.getCurrent());
-        assertEquals(10, stat.getLowWaterMark());
-        assertEquals(200, stat.getHighWaterMark());
-
-        assertLastTimeNotStartTime(stat);
-
-        LOG.info("Stat is: " + stat);
-
-        stat.reset();
-
-        assertEquals(0, stat.getCurrent());
-        assertEquals(0, stat.getLowWaterMark());
-        assertEquals(0, stat.getHighWaterMark());
-
-        stat.setCurrent(100);
-        assertEquals(100, stat.getCurrent());
-        assertEquals(100, stat.getLowWaterMark());
-        assertEquals(100, stat.getHighWaterMark());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/management/StatisticTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/management/StatisticTestSupport.java
deleted file mode 100755
index 9d68cb2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/management/StatisticTestSupport.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.management;
-
-import junit.framework.TestCase;
-
-public abstract class StatisticTestSupport extends TestCase {
-
-    /**
-     * assert method used by the management related classes for its usecase.
-     * 
-     * @param counter
-     * @param name
-     * @param unit
-     * @param description
-     */
-    protected void assertStatistic(StatisticImpl counter, String name, String unit, String description) {
-        assertEquals(name, counter.getName());
-        assertEquals(unit, counter.getUnit());
-        assertEquals(description, counter.getDescription());
-    }
-
-    /**
-     * assert method to determine last time vs the start time.
-     * 
-     * @param counter
-     */
-    protected void assertLastTimeNotStartTime(StatisticImpl counter) {
-        assertTrue("Should not have start time the same as last sample time. Start time: "
-                   + counter.getStartTime() + " lastTime: " + counter.getLastSampleTime(), counter
-            .getStartTime() != counter.getLastSampleTime());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/management/TimeStatisticTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/management/TimeStatisticTest.java
deleted file mode 100755
index 88ec2ea..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/management/TimeStatisticTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.management;
-
-
-public class TimeStatisticTest extends StatisticTestSupport {
-    
-    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-            .getLog(TimeStatisticTest.class);
-
-    /**
-     * Use case for TimeStatisticImpl class.
-     * @throws Exception
-     */
-    public void testStatistic() throws Exception {
-        TimeStatisticImpl stat = new TimeStatisticImpl("myTimer", "millis", "myDescription");
-        assertStatistic(stat, "myTimer", "millis", "myDescription");
-
-        assertEquals(0, stat.getCount());
-
-        stat.addTime(100);
-        assertEquals(1, stat.getCount());
-        assertEquals(100, stat.getMinTime());
-        assertEquals(100, stat.getMaxTime());
-
-        stat.addTime(403);
-        assertEquals(2, stat.getCount());
-        assertEquals(100, stat.getMinTime());
-        assertEquals(403, stat.getMaxTime());
-
-        stat.addTime(50);
-        assertEquals(3, stat.getCount());
-        assertEquals(50, stat.getMinTime());
-        assertEquals(403, stat.getMaxTime());
-
-
-        assertEquals(553, stat.getTotalTime());
-
-        Thread.sleep(500);
-
-        stat.addTime(10);
-
-        assertLastTimeNotStartTime(stat);
-
-        LOG.info("Stat is: " + stat);
-
-        stat.reset();
-
-        assertEquals(0, stat.getCount());
-        assertEquals(0, stat.getMinTime());
-        assertEquals(0, stat.getMaxTime());
-        assertEquals(0, stat.getTotalTime());
-
-        stat.addTime(100);
-        assertEquals(1, stat.getCount());
-        assertEquals(100, stat.getMinTime());
-        assertEquals(100, stat.getMaxTime());
-        assertEquals(100, stat.getTotalTime());
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java
deleted file mode 100644
index 2b8e54d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.memory;
-
-import java.io.File;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-import junit.framework.TestCase;
-
-public class MemoryPropertyTest extends TestCase {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(MemoryPropertyTest.class);
-    BrokerService broker;
-
-    
-    /**
-     * Sets up a test where the producer and consumer have their own connection.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        // Create broker from resource
-        LOG.info("Creating broker... ");
-        broker = createBroker("xbean:org/apache/activemq/memory/activemq.xml");
-        LOG.info("Success");
-        super.setUp();
-    }
-    
-    protected BrokerService createBroker(String resource) throws Exception {
-        return BrokerFactory.createBroker(resource);
-    }
-
-
-    /*
-     * Stops the Broker
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        LOG.info("Closing Broker");
-        if (broker != null) {
-            broker.stop();
-        }
-        LOG.info("Broker closed...");
-    }
-
-
-
-    public void testBrokerInitialized() {
-        assertTrue("We should have a broker", broker != null);
-
-        assertEquals("test-broker", broker.getBrokerName());
-        assertEquals(1024, broker.getSystemUsage().getMemoryUsage().getLimit());
-        assertEquals(34, broker.getSystemUsage().getMemoryUsage().getPercentUsageMinDelta());
-        
-        assertNotNull(broker.getSystemUsage().getStoreUsage().getStore());
-        // non persistent broker so no temp storage
-        assertNull(broker.getSystemUsage().getTempUsage().getStore());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java b/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java
deleted file mode 100644
index e5823d8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.memory.buffer;
-
-import org.apache.activemq.command.ActiveMQMessage;
-
-/**
- * A message implementation which is useful for testing as we can spoof its size
- *  
- * 
- */
-public class DummyMessage extends ActiveMQMessage {
-
-    private int size;
-
-    public DummyMessage(int size) {
-        this.size = size;
-    }
-
-    public int getSize() {
-        return size;
-    }
-
-    public String toString() {
-        return "DummyMessage[id=" + getMessageId() + " size=" + size + "]"; 
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
deleted file mode 100644
index ea8f0a6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.memory.buffer;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.MessageQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * 
- */
-public abstract class MemoryBufferTestSupport extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(MemoryBufferTestSupport.class);
-
-    protected MessageBuffer buffer = createMessageBuffer();
-    protected MessageQueue qA = buffer.createMessageQueue();
-    protected MessageQueue qB = buffer.createMessageQueue();
-    protected MessageQueue qC = buffer.createMessageQueue();
-    protected int messageCount;
-
-    protected abstract MessageBuffer createMessageBuffer();
-
-    protected void setUp() throws Exception {
-        buffer = createMessageBuffer();
-        qA = buffer.createMessageQueue();
-        qB = buffer.createMessageQueue();
-        qC = buffer.createMessageQueue();
-    }
-
-    protected void dump() {
-        LOG.info("Dumping current state");
-        dumpQueue(qA, "A");
-        dumpQueue(qB, "B");
-        dumpQueue(qC, "C");
-    }
-
-    protected void dumpQueue(MessageQueue queue, String name) {
-        LOG.info("  " + name + " = " + queue.getList());
-    }
-
-    protected ActiveMQMessage createMessage(int size) throws Exception {
-        DummyMessage answer = new DummyMessage(size);
-        answer.setIntProperty("counter", ++messageCount);
-        answer.setJMSMessageID("" + messageCount);
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java
deleted file mode 100644
index 2e771f2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.memory.buffer;
-
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.OrderBasedMessageBuffer;
-
-
-/**
- *
- * 
- */
-public class OrderBasedMemoryBufferTest extends MemoryBufferTestSupport {
-
-    public void testSizeWorks() throws Exception {
-        qA.add(createMessage(10));
-        qB.add(createMessage(10));
-        qB.add(createMessage(10));
-        qC.add(createMessage(10));
-        
-        dump();
-        
-        assertEquals("buffer size", 40, buffer.getSize());
-        assertEquals("qA", 10, qA.getSize());
-        assertEquals("qB", 20, qB.getSize());
-        assertEquals("qC", 10, qC.getSize());
-        
-        qC.add(createMessage(10));
-        
-        dump();
-        
-        assertEquals("buffer size", 40, buffer.getSize());
-        assertEquals("qA", 0, qA.getSize());
-        assertEquals("qB", 20, qB.getSize());
-        assertEquals("qC", 20, qC.getSize());
-
-        qB.add(createMessage(10));
-        
-        dump();
-        
-        assertEquals("buffer size", 40, buffer.getSize());
-        assertEquals("qA", 0, qA.getSize());
-        assertEquals("qB", 20, qB.getSize());
-        assertEquals("qC", 20, qC.getSize());
-
-        qA.add(createMessage(10));
-
-        dump();
-        
-        assertEquals("buffer size", 40, buffer.getSize());
-        assertEquals("qA", 10, qA.getSize());
-        assertEquals("qB", 10, qB.getSize());
-        assertEquals("qC", 20, qC.getSize());
-    }
-
-    
-    protected MessageBuffer createMessageBuffer() {
-        return new OrderBasedMessageBuffer(40);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java
deleted file mode 100644
index ad02821..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.memory.buffer;
-
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.SizeBasedMessageBuffer;
-
-
-/**
- *
- * 
- */
-public class SizeBasedMessageBufferTest extends MemoryBufferTestSupport {
-
-    public void testSizeWorks() throws Exception {
-        qA.add(createMessage(10));
-        qB.add(createMessage(10));
-        qB.add(createMessage(10));
-        qC.add(createMessage(10));
-        
-        dump();
-        
-        assertEquals("buffer size", 40, buffer.getSize());
-        assertEquals("qA", 10, qA.getSize());
-        assertEquals("qB", 20, qB.getSize());
-        assertEquals("qC", 10, qC.getSize());
-        
-        // now lets force an eviction
-        qC.add(createMessage(10));
-
-        dump();
-        
-        assertEquals("buffer size", 40, buffer.getSize());
-        assertEquals("qA", 10, qA.getSize());
-        assertEquals("qB", 10, qB.getSize());
-        assertEquals("qC", 20, qC.getSize());
-    }
-
-    
-    protected MessageBuffer createMessageBuffer() {
-        return new SizeBasedMessageBuffer(40);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java
deleted file mode 100644
index 8aefa73..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/**
- * 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.network;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.MessageNotWriteableException;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.management.ObjectName;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.util.Wait;
-import org.apache.commons.io.FileUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This class duplicates most of the functionality in {@link NetworkTestSupport} 
- * and {@link BrokerTestSupport} because more control was needed over how brokers 
- * and connectors are created. Also, this test asserts message counts via JMX on 
- * each broker. 
- * 
- * @author bsnyder
- *
- */
-public class BrokerNetworkWithStuckMessagesTest extends TestCase /*NetworkTestSupport*/ {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(BrokerNetworkWithStuckMessagesTest.class);
-    
-    private BrokerService localBroker; 
-    private BrokerService remoteBroker; 
-    private DemandForwardingBridge bridge;
-    
-    protected Map<String, BrokerService> brokers = new HashMap<String, BrokerService>();
-    protected ArrayList connections = new ArrayList();
-    
-    protected TransportConnector connector;
-    protected TransportConnector remoteConnector;
-    
-    protected long idGenerator;
-    protected int msgIdGenerator;
-    protected int tempDestGenerator;
-    protected int maxWait = 4000;
-    protected String queueName = "TEST";
-    
-    protected String amqDomain = "org.apache.activemq";
-        
-    protected void setUp() throws Exception {
-        
-        // For those who want visual confirmation: 
-        //   Uncomment the following to enable JMX support on a port number to use 
-        //   Jconsole to view each broker. You will need to add some calls to 
-        //   Thread.sleep() to be able to actually slow things down so that you 
-        //   can manually see JMX attrs. 
-//        System.setProperty("com.sun.management.jmxremote", "");
-//        System.setProperty("com.sun.management.jmxremote.port", "1099");
-//        System.setProperty("com.sun.management.jmxremote.authenticate", "false");
-//        System.setProperty("com.sun.management.jmxremote.ssl", "false");
-        
-        // Create the local broker 
-        createBroker();
-        // Create the remote broker 
-        createRemoteBroker();
-        
-        // Remove the activemq-data directory from the creation of the remote broker
-        FileUtils.deleteDirectory(new File("activemq-data"));
-        
-        // Create a network bridge between the local and remote brokers so that 
-        // demand-based forwarding can take place
-        NetworkBridgeConfiguration config = new NetworkBridgeConfiguration();
-        config.setBrokerName("local");
-        config.setDispatchAsync(false);
-        
-        Transport localTransport = createTransport(); 
-        Transport remoteTransport = createRemoteTransport();
-        
-        // Create a network bridge between the two brokers 
-        bridge = new DemandForwardingBridge(config, localTransport, remoteTransport);
-        bridge.setBrokerService(localBroker);
-        bridge.start();
-        
-        waitForBridgeFormation();
-        
-    }
-    
-    protected void waitForBridgeFormation() throws Exception {
-        for (final BrokerService broker : brokers.values()) {
-            if (!broker.getNetworkConnectors().isEmpty()) {
-            	// Max wait here is 30 secs
-                Wait.waitFor(new Wait.Condition() {
-                    public boolean isSatisified() throws Exception {
-                        return !broker.getNetworkConnectors().get(0).activeBridges().isEmpty();
-                    }});
-            }
-        }
-    }
-    
-    protected void tearDown() throws Exception {
-        bridge.stop();
-        localBroker.stop();
-        remoteBroker.stop();
-    }
-
-    public void testBrokerNetworkWithStuckMessages() throws Exception {
-        
-        int sendNumMessages = 10;
-        int receiveNumMessages = 5;
-        
-        // Create a producer 
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-        
-        // Create a destination on the local broker 
-        ActiveMQDestination destinationInfo1 = null;
-        
-        // Send a 10 messages to the local broker 
-        for (int i = 0; i < sendNumMessages; ++i) {
-            destinationInfo1 = createDestinationInfo(connection1, connectionInfo1, ActiveMQDestination.QUEUE_TYPE);
-            connection1.request(createMessage(producerInfo, destinationInfo1, DeliveryMode.NON_PERSISTENT));
-        }
-        
-        // Ensure that there are 10 messages on the local broker 
-        Object[] messages = browseQueueWithJmx(localBroker);
-        assertEquals(sendNumMessages, messages.length);
-        
-        
-        // Create a synchronous consumer on the remote broker 
-        final StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        ActiveMQDestination destinationInfo2 = 
-            createDestinationInfo(connection2, connectionInfo2, ActiveMQDestination.QUEUE_TYPE);
-        final ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destinationInfo2);
-        connection2.send(consumerInfo2);
-        
-        // Consume 5 of the messages from the remote broker and ack them. 
-        // Because the prefetch size is set to 1000 in the createConsumerInfo() 
-        // method, this will cause the messages on the local broker to be 
-        // forwarded to the remote broker. 
-        for (int i = 0; i < receiveNumMessages; ++i) {
-            Message message1 = receiveMessage(connection2);
-            assertNotNull(message1);
-            connection2.send(createAck(consumerInfo2, message1, 1, MessageAck.STANDARD_ACK_TYPE));
-            
-            Object[] msgs1 = browseQueueWithJmx(remoteBroker);
-            LOG.info("Found [" + msgs1.length + "] messages with JMX");
-//            assertEquals((sendNumMessages-i), msgs.length);
-        }
-        
-        // Ensure that there are zero messages on the local broker. This tells 
-        // us that those messages have been prefetched to the remote broker 
-        // where the demand exists. 
-        messages = browseQueueWithJmx(localBroker);
-        assertEquals(0, messages.length);
-        
-        // Close the consumer on the remote broker 
-        connection2.send(consumerInfo2.createRemoveCommand());
-        
-        // There should now be 5 messages stuck on the remote broker 
-        messages = browseQueueWithJmx(remoteBroker);
-        assertEquals(5, messages.length);
-        
-        // Create a consumer on the local broker just to confirm that it doesn't 
-        // receive any messages  
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destinationInfo1);
-        connection1.send(consumerInfo1);
-        Message message1 = receiveMessage(connection1);
-        
-        //////////////////////////////////////////////////////
-        // An assertNull() is done here because this is currently the correct 
-        // behavior. This is actually the purpose of this test - to prove that 
-        // messages are stuck on the remote broker. AMQ-2324 and AMQ-2484 aim 
-        // to fix this situation so that messages don't get stuck. 
-        assertNull(message1);
-        //////////////////////////////////////////////////////
-        
-        ConsumerInfo consumerInfo3 = createConsumerInfo(sessionInfo2, destinationInfo2);
-        connection2.send(consumerInfo3);
-        
-        // Consume the last 5 messages from the remote broker and ack them just 
-        // to clean up the queue. 
-        int counter = 0;
-        for (int i = 0; i < receiveNumMessages; ++i) {
-            message1 = receiveMessage(connection2);
-            assertNotNull(message1);
-            connection2.send(createAck(consumerInfo3, message1, 1, MessageAck.STANDARD_ACK_TYPE));
-            ++counter;
-        }
-        // Ensure that 5 messages were received
-        assertEquals(receiveNumMessages, counter);
-        
-        // Let those acks percolate... This stinks but it's the only way currently
-        // because these types of internal broker actions are non-deterministic. 
-        Thread.sleep(4000);
-        
-        // Ensure that the queue on the remote broker is empty 
-        messages = browseQueueWithJmx(remoteBroker);
-        assertEquals(0, messages.length);
-        
-        // Close the consumer on the remote broker 
-        connection2.send(consumerInfo3.createRemoveCommand());
-        
-        connection1.stop();
-        connection2.stop();
-    }
-    
-    protected BrokerService createBroker() throws Exception {
-        localBroker = new BrokerService(); 
-        localBroker.setBrokerName("localhost");
-        localBroker.setUseJmx(true);
-        localBroker.setPersistenceAdapter(null);
-        localBroker.setPersistent(false);
-        connector = createConnector();
-        localBroker.addConnector(connector);
-        localBroker.start();
-        localBroker.waitUntilStarted();
-        
-        localBroker.getManagementContext().setConnectorPort(2221);
-        
-        brokers.put(localBroker.getBrokerName(), localBroker);
-        
-        return localBroker;
-    }
-    
-    protected BrokerService createRemoteBroker() throws Exception {
-        remoteBroker = new BrokerService();
-        remoteBroker.setBrokerName("remotehost");
-        remoteBroker.setUseJmx(true);
-        remoteBroker.setPersistenceAdapter(null);
-        remoteBroker.setPersistent(false);
-        remoteConnector = createRemoteConnector();
-        remoteBroker.addConnector(remoteConnector);
-        remoteBroker.waitUntilStarted();
-        
-        remoteBroker.getManagementContext().setConnectorPort(2222);
-        
-        brokers.put(remoteBroker.getBrokerName(), remoteBroker);
-        
-        return remoteBroker;
-    }
-    
-    protected Transport createTransport() throws Exception {
-        Transport transport = TransportFactory.connect(connector.getServer().getConnectURI());
-        return transport;
-    }
-    
-    protected Transport createRemoteTransport() throws Exception {
-        Transport transport = TransportFactory.connect(remoteConnector.getServer().getConnectURI());
-        return transport;
-    }
-    
-    protected TransportConnector createConnector() throws Exception, IOException, URISyntaxException {
-        return new TransportConnector(TransportFactory.bind(new URI(getLocalURI())));
-    }
-    
-    protected TransportConnector createRemoteConnector() throws Exception, IOException, URISyntaxException {
-        return new TransportConnector(TransportFactory.bind(new URI(getRemoteURI())));
-    }
-    
-    protected String getRemoteURI() {
-        return "vm://remotehost";
-    }
-
-    protected String getLocalURI() {
-        return "vm://localhost";
-    }
-    
-    protected StubConnection createConnection() throws Exception {
-        Transport transport = TransportFactory.connect(connector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-    protected StubConnection createRemoteConnection() throws Exception {
-        Transport transport = TransportFactory.connect(remoteConnector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-    
-    @SuppressWarnings("unchecked")
-    private Object[] browseQueueWithJms(BrokerService broker) throws Exception {
-		Object[] messages = null;
-		Connection connection = null;
-		Session session = null;
-
-		try {
-			URI brokerUri = connector.getUri();
-			ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerUri.toString());
-			connection = connectionFactory.createConnection();
-			connection.start();
-			session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-			Queue destination = session.createQueue(queueName);
-			QueueBrowser browser = session.createBrowser(destination);
-			List<Message> list = new ArrayList<Message>();
-			for (Enumeration<Message> enumn = browser.getEnumeration(); enumn.hasMoreElements();) {
-				list.add(enumn.nextElement());
-			}
-			messages = list.toArray();
-		}
-		finally {
-			if (session != null) {
-				session.close();
-			}
-			if (connection != null) {
-				connection.close();
-			}
-		}
-		LOG.info("+Browsed with JMS: " + messages.length);
-		
-		return messages;
-	}
-    
-    private Object[] browseQueueWithJmx(BrokerService broker) throws Exception {
-        Hashtable<String, String> params = new Hashtable<String, String>();
-        params.put("BrokerName", broker.getBrokerName());
-        params.put("Type", "Queue");
-        params.put("Destination", queueName);
-        ObjectName queueObjectName = ObjectName.getInstance(amqDomain, params);
-        
-        ManagementContext mgmtCtx = broker.getManagementContext();
-        QueueViewMBean queueView = (QueueViewMBean)mgmtCtx.newProxyInstance(queueObjectName, QueueViewMBean.class, true);
-        
-        Object[] messages = (Object[]) queueView.browse();
-        
-		LOG.info("+Browsed with JMX: " + messages.length);
-        
-        return messages;
-    }
-    
-    protected ConnectionInfo createConnectionInfo() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        info.setConnectionId(new ConnectionId("connection:" + (++idGenerator)));
-        info.setClientId(info.getConnectionId().getValue());
-        return info;
-    }
-    
-    protected SessionInfo createSessionInfo(ConnectionInfo connectionInfo) throws Exception {
-        SessionInfo info = new SessionInfo(connectionInfo, ++idGenerator);
-        return info;
-    }
-    
-    protected ProducerInfo createProducerInfo(SessionInfo sessionInfo) throws Exception {
-        ProducerInfo info = new ProducerInfo(sessionInfo, ++idGenerator);
-        return info;
-    }
-    
-    protected ConsumerInfo createConsumerInfo(SessionInfo sessionInfo, ActiveMQDestination destination) throws Exception {
-        ConsumerInfo info = new ConsumerInfo(sessionInfo, ++idGenerator);
-        info.setBrowser(false);
-        info.setDestination(destination);
-        info.setPrefetchSize(1000);
-        info.setDispatchAsync(false);
-        return info;
-    }
-    
-    protected DestinationInfo createTempDestinationInfo(ConnectionInfo connectionInfo, byte destinationType) {
-        DestinationInfo info = new DestinationInfo();
-        info.setConnectionId(connectionInfo.getConnectionId());
-        info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
-        info.setDestination(ActiveMQDestination.createDestination(info.getConnectionId() + ":" + (++tempDestGenerator), destinationType));
-        return info;
-    }
-    
-    protected ActiveMQDestination createDestinationInfo(StubConnection connection, ConnectionInfo connectionInfo1, byte destinationType) throws Exception {
-        if ((destinationType & ActiveMQDestination.TEMP_MASK) != 0) {
-            DestinationInfo info = createTempDestinationInfo(connectionInfo1, destinationType);
-            connection.send(info);
-            return info.getDestination();
-        } else {
-            return ActiveMQDestination.createDestination(queueName, destinationType);
-        }
-    }
-    
-    protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination, int deliveryMode) {
-        Message message = createMessage(producerInfo, destination);
-        message.setPersistent(deliveryMode == DeliveryMode.PERSISTENT);
-        return message;
-    }
-    
-    protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination) {
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-        message.setMessageId(new MessageId(producerInfo, ++msgIdGenerator));
-        message.setDestination(destination);
-        message.setPersistent(false);
-        try {
-            message.setText("Test Message Payload.");
-        } catch (MessageNotWriteableException e) {
-        }
-        return message;
-    }
-
-    protected MessageAck createAck(ConsumerInfo consumerInfo, Message msg, int count, byte ackType) {
-        MessageAck ack = new MessageAck();
-        ack.setAckType(ackType);
-        ack.setConsumerId(consumerInfo.getConsumerId());
-        ack.setDestination(msg.getDestination());
-        ack.setLastMessageId(msg.getMessageId());
-        ack.setMessageCount(count);
-        return ack;
-    }
-    
-    public Message receiveMessage(StubConnection connection) throws InterruptedException {
-        return receiveMessage(connection, maxWait);
-    }
-
-    public Message receiveMessage(StubConnection connection, long timeout) throws InterruptedException {
-        while (true) {
-            Object o = connection.getDispatchQueue().poll(timeout, TimeUnit.MILLISECONDS);
-
-            if (o == null) {
-                return null;
-            }
-            if (o instanceof MessageDispatch) {
-
-                MessageDispatch dispatch = (MessageDispatch)o;
-                if (dispatch.getMessage() == null) {
-                    return null;
-                }
-                dispatch.setMessage(dispatch.getMessage().copy());
-                dispatch.getMessage().setRedeliveryCounter(dispatch.getRedeliveryCounter());
-                return dispatch.getMessage();
-            }
-        }
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java
deleted file mode 100644
index 25f508d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.network;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-
-public class DemandForwardingBridgeFilterTest extends NetworkTestSupport {
-
-    private DemandForwardingBridge bridge;
-
-    private StubConnection producerConnection;
-
-    private ProducerInfo producerInfo;
-
-    private StubConnection consumerConnection;
-
-    private SessionInfo consumerSessionInfo;
-
-    public void testWildcardOnExcludedDestination() throws Exception {
-
-        bridge.setExcludedDestinations(new ActiveMQDestination[] { ActiveMQDestination.createDestination("OTHER.>",
-            ActiveMQDestination.TOPIC_TYPE) });
-        bridge.setDynamicallyIncludedDestinations(new ActiveMQDestination[] { ActiveMQDestination.createDestination(
-            "TEST", ActiveMQDestination.QUEUE_TYPE) });
-        bridge.start();
-
-        assertReceiveMessageOn("TEST", ActiveMQDestination.QUEUE_TYPE);
-        assertReceiveNoMessageOn("OTHER.T1", ActiveMQDestination.TOPIC_TYPE);
-    }
-
-    public void testWildcardOnTwoExcludedDestination() throws Exception {
-
-        bridge.setExcludedDestinations(new ActiveMQDestination[] {
-                ActiveMQDestination.createDestination("OTHER.>", ActiveMQDestination.QUEUE_TYPE),
-                ActiveMQDestination.createDestination("TEST.X1", ActiveMQDestination.QUEUE_TYPE) });
-        bridge.setDynamicallyIncludedDestinations(new ActiveMQDestination[] { ActiveMQDestination.createDestination(
-            "TEST.X2", ActiveMQDestination.QUEUE_TYPE) });
-        bridge.start();
-
-        assertReceiveMessageOn("TEST.X2", ActiveMQDestination.QUEUE_TYPE);
-        assertReceiveNoMessageOn("OTHER.X1", ActiveMQDestination.QUEUE_TYPE);
-        assertReceiveNoMessageOn("TEST.X1", ActiveMQDestination.QUEUE_TYPE);
-    }
-
-    public void testWildcardOnDynamicallyIncludedDestination() throws Exception {
-
-        bridge.setDynamicallyIncludedDestinations(new ActiveMQDestination[] {
-                ActiveMQDestination.createDestination("OTHER.>", ActiveMQDestination.QUEUE_TYPE),
-                ActiveMQDestination.createDestination("TEST.X2", ActiveMQDestination.QUEUE_TYPE) });
-        bridge.start();
-
-        assertReceiveMessageOn("OTHER.X1", ActiveMQDestination.QUEUE_TYPE);
-        assertReceiveMessageOn("TEST.X2", ActiveMQDestination.QUEUE_TYPE);
-    }
-
-    public void testDistinctTopicAndQueue() throws Exception {
-
-        bridge.setExcludedDestinations(new ActiveMQDestination[] { ActiveMQDestination.createDestination(">",
-            ActiveMQDestination.TOPIC_TYPE) });
-        bridge.setDynamicallyIncludedDestinations(new ActiveMQDestination[] { ActiveMQDestination.createDestination(
-            ">", ActiveMQDestination.QUEUE_TYPE) });
-        bridge.start();
-
-        assertReceiveMessageOn("TEST", ActiveMQDestination.QUEUE_TYPE);
-        assertReceiveNoMessageOn("TEST", ActiveMQDestination.TOPIC_TYPE);
-    }
-
-    public void testListOfExcludedDestinationWithWildcard() throws Exception {
-
-        bridge.setExcludedDestinations(new ActiveMQDestination[] {
-                ActiveMQDestination.createDestination("OTHER.>", ActiveMQDestination.TOPIC_TYPE),
-                ActiveMQDestination.createDestination("TEST.*", ActiveMQDestination.TOPIC_TYPE) });
-
-        bridge.setDynamicallyIncludedDestinations(new ActiveMQDestination[] { ActiveMQDestination.createDestination(
-            "TEST.X1", ActiveMQDestination.QUEUE_TYPE) });
-
-        bridge.start();
-
-        assertReceiveMessageOn("TEST.X1", ActiveMQDestination.QUEUE_TYPE);
-        assertReceiveNoMessageOn("OTHER.T1", ActiveMQDestination.TOPIC_TYPE);
-        assertReceiveNoMessageOn("OTHER.T2", ActiveMQDestination.TOPIC_TYPE);
-    }
-
-    private void assertReceiveMessageOn(String destinationName, byte destinationType) throws Exception,
-            InterruptedException {
-
-        ActiveMQDestination destination = ActiveMQDestination.createDestination(destinationName, destinationType);
-
-        // Send the message to the local broker.
-        producerConnection.send(createMessage(producerInfo, destination, destinationType));
-
-        // Make sure the message was delivered via the remote.
-        Message m = createConsumerAndReceiveMessage(destination);
-
-        assertNotNull(m);
-    }
-
-    private void assertReceiveNoMessageOn(String destinationName, byte destinationType) throws Exception,
-            InterruptedException {
-
-        ActiveMQDestination destination = ActiveMQDestination.createDestination(destinationName, destinationType);
-
-        // Send the message to the local broker.
-        producerConnection.send(createMessage(producerInfo, destination, destinationType));
-
-        // Make sure the message was delivered via the remote.
-        Message m = createConsumerAndReceiveMessage(destination);
-        assertNull(m);
-    }
-
-    private Message createConsumerAndReceiveMessage(ActiveMQDestination destination) throws Exception {
-        // Now create remote consumer that should cause message to move to this
-        // remote consumer.
-        ConsumerInfo consumerInfo = createConsumerInfo(consumerSessionInfo, destination);
-        consumerConnection.send(consumerInfo);
-
-        Message m = receiveMessage(consumerConnection);
-        return m;
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        NetworkBridgeConfiguration config = new NetworkBridgeConfiguration();
-        config.setBrokerName("local");
-        config.setDispatchAsync(false);
-        bridge = new DemandForwardingBridge(config, createTransport(), createRemoteTransport());
-        bridge.setBrokerService(broker);
-
-        producerConnection = createConnection();
-        ConnectionInfo producerConnectionInfo = createConnectionInfo();
-        SessionInfo producerSessionInfo = createSessionInfo(producerConnectionInfo);
-        producerInfo = createProducerInfo(producerSessionInfo);
-        producerConnection.send(producerConnectionInfo);
-        producerConnection.send(producerSessionInfo);
-        producerConnection.send(producerInfo);
-
-        consumerConnection = createRemoteConnection();
-        ConnectionInfo consumerConnectionInfo = createConnectionInfo();
-        consumerSessionInfo = createSessionInfo(consumerConnectionInfo);
-        consumerConnection.send(consumerConnectionInfo);
-        consumerConnection.send(consumerSessionInfo);
-    }
-
-    protected void tearDown() throws Exception {
-        bridge.stop();
-        super.tearDown();
-    }
-
-    public static Test suite() {
-        return suite(DemandForwardingBridgeFilterTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
deleted file mode 100755
index f5a1899..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * 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.network;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.util.Wait;
-
-public class DemandForwardingBridgeTest extends NetworkTestSupport {
-
-    public ActiveMQDestination destination;
-    public byte destinationType;
-    public int deliveryMode;
-    private DemandForwardingBridge bridge;
-
-    public void initCombosForTestSendThenAddConsumer() {
-        addCombinationValues("deliveryMode", new Object[] {new Integer(DeliveryMode.NON_PERSISTENT), new Integer(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {new Byte(ActiveMQDestination.QUEUE_TYPE)});
-    }
-
-    public void testSendThenAddConsumer() throws Exception {
-
-        // Start a producer on local broker
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-
-        // Start a consumer on a remote broker
-        final StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-
-        // Send the message to the local broker.
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Verify that the message stayed on the local broker.
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        connection1.send(consumerInfo1);
-        Message m = receiveMessage(connection1);
-        assertNotNull(m);
-        // Close consumer to cause the message to rollback.
-        connection1.send(consumerInfo1.createRemoveCommand());
-
-        // Now create remote consumer that should cause message to move to this
-        // remote consumer.
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        connection2.request(consumerInfo2);
-
-        // Make sure the message was delivered via the remote.
-        assertTrue("message was received", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return receiveMessage(connection2) != null;
-            }            
-        }));
-    }
-
-    public void initCombosForTestAddConsumerThenSend() {
-        addCombinationValues("deliveryMode", new Object[] {new Integer(DeliveryMode.NON_PERSISTENT), new Integer(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {new Byte(ActiveMQDestination.QUEUE_TYPE), new Byte(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testAddConsumerThenSend() throws Exception {
-
-        // Start a producer on local broker
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-
-        // Start a consumer on a remote broker
-        StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo2, destination);
-        connection2.send(consumerInfo);
-
-        // Give demand forwarding bridge a chance to finish forwarding the
-        // subscriptions.
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException ie) {
-            ie.printStackTrace();
-        }
-
-        // Send the message to the local boker.
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-        // Make sure the message was delivered via the remote.
-        Message m = receiveMessage(connection2);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        NetworkBridgeConfiguration config = new NetworkBridgeConfiguration();
-        config.setBrokerName("local");
-        config.setDispatchAsync(false);
-        bridge = new DemandForwardingBridge(config, createTransport(), createRemoteTransport());
-        bridge.setBrokerService(broker);
-        bridge.start();
-    }
-
-    protected void tearDown() throws Exception {
-        bridge.stop();
-        super.tearDown();
-    }
-
-    public static Test suite() {
-        return suite(DemandForwardingBridgeTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java
deleted file mode 100644
index c22ad94..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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.network;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeNotNull;
-
-import java.net.MalformedURLException;
-import java.util.Set;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.junit.Test;
-
-public class DuplexNetworkMBeanTest {
-
-    protected static final Logger LOG = LoggerFactory.getLogger(DuplexNetworkMBeanTest.class);
-    protected final int numRestarts = 3;
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName("broker");
-        broker.addConnector("tcp://localhost:61617?transport.reuseAddress=true");
-        
-        return broker;
-    }
-    
-    protected BrokerService createNetworkedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName("networkedBroker");
-        broker.addConnector("tcp://localhost:62617?transport.reuseAddress=true");
-        NetworkConnector networkConnector = broker.addNetworkConnector("static:(tcp://localhost:61617?wireFormat.maxInactivityDuration=500)?useExponentialBackOff=false");
-        networkConnector.setDuplex(true);
-        return broker;
-    }
-    
-    @Test
-    public void testMbeanPresenceOnNetworkBrokerRestart() throws Exception {
-        BrokerService broker = createBroker();
-        broker.start();
-        assertEquals(1, countMbeans(broker, "Connector", 30000));
-        assertEquals(0, countMbeans(broker, "Connection"));
-        BrokerService networkedBroker = null;
-        for (int i=0; i<numRestarts; i++) {       
-            networkedBroker = createNetworkedBroker();
-            networkedBroker.start();
-            assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 2000));
-            assertEquals(1, countMbeans(broker, "NetworkBridge", 2000));
-            assertEquals(1, countMbeans(broker, "Connection"));
-            networkedBroker.stop();
-            networkedBroker.waitUntilStopped();
-            assertEquals(0, countMbeans(networkedBroker, "stopped"));
-            assertEquals(0, countMbeans(broker, "NetworkBridge"));
-        }
-        
-        assertEquals(0, countMbeans(networkedBroker, "NetworkBridge"));
-        assertEquals(0, countMbeans(networkedBroker, "Connector"));
-        assertEquals(0, countMbeans(networkedBroker, "Connection"));
-        assertEquals(1, countMbeans(broker, "Connector"));
-        broker.stop();
-        broker.waitUntilStopped();
-    }
-
-    @Test
-    public void testMbeanPresenceOnBrokerRestart() throws Exception {
-        
-        BrokerService networkedBroker = createNetworkedBroker();
-        networkedBroker.start();
-        assertEquals(1, countMbeans(networkedBroker, "Connector", 30000));
-        assertEquals(0, countMbeans(networkedBroker, "Connection"));
-        
-        BrokerService broker = null;
-        for (int i=0; i<numRestarts; i++) {
-            broker = createBroker();
-            broker.start();
-            assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 5000));
-            assertEquals("restart number: " + i, 1, countMbeans(broker, "Connection", 10000));
-            
-            broker.stop();
-            broker.waitUntilStopped();
-            assertEquals(0, countMbeans(broker, "stopped"));
-        }
-        
-        //assertEquals(0, countMbeans(networkedBroker, "NetworkBridge"));
-        assertEquals(1, countMbeans(networkedBroker, "Connector"));
-        assertEquals(0, countMbeans(networkedBroker, "Connection"));
-        assertEquals(0, countMbeans(broker, "Connection"));
-        
-        networkedBroker.stop();
-        networkedBroker.waitUntilStopped();
-    }
-    
-    private int countMbeans(BrokerService broker, String type) throws Exception {
-        return countMbeans(broker, type, 0); 
-    }
-
-    private int countMbeans(BrokerService broker, String type, int timeout) throws Exception {
-        final long expiryTime = System.currentTimeMillis() + timeout;
-        final ObjectName beanName = new ObjectName("org.apache.activemq:BrokerName="
-                + broker.getBrokerName() + ",Type=" + type +",*");
-        Set<?> mbeans = null;
-        int count = 0;
-        do {
-            if (timeout > 0) {
-                Thread.sleep(100);
-            }
-            LOG.info("Query name: " + beanName);
-            mbeans = broker.getManagementContext().queryNames(beanName, null);
-            if (mbeans != null) {
-                count = mbeans.size();
-            } else {
-                logAllMbeans(broker);
-            }
-        } while ((mbeans == null || mbeans.isEmpty()) && expiryTime > System.currentTimeMillis());
-        
-        // If port 1099 is in use when the Broker starts, starting the jmx
-        // connector will fail.  So, if we have no mbsc to query, skip the
-        // test.
-        if (timeout > 0) {
-            assumeNotNull(mbeans);
-        }
-        
-        return count;
-    }
-
-    private void logAllMbeans(BrokerService broker) throws MalformedURLException {
-        try {
-            // trace all existing MBeans
-            Set<?> all = broker.getManagementContext().queryNames(null, null);
-            LOG.info("Total MBean count=" + all.size());
-            for (Object o : all) {
-                ObjectInstance bean = (ObjectInstance)o;
-                LOG.info(bean.getObjectName().toString());
-            }
-        } catch (Exception ignored) {
-            LOG.warn("getMBeanServer ex: " + ignored);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
deleted file mode 100755
index 34e00f0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.network;
-
-import javax.jms.MessageProducer;
-import javax.jms.TemporaryQueue;
-import org.apache.activemq.broker.BrokerService;
-
-public class DuplexNetworkTest extends SimpleNetworkTest {
-
-    @Override
-    protected String getLocalBrokerURI() {
-        return "org/apache/activemq/network/duplexLocalBroker.xml";
-    }
-
-    @Override
-    protected BrokerService createRemoteBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName("remoteBroker");
-        broker.addConnector("tcp://localhost:61617");
-        return broker;
-    }
-    
-    public void testTempQueues() throws Exception {
-        TemporaryQueue temp = localSession.createTemporaryQueue();
-        MessageProducer producer = localSession.createProducer(temp);
-        producer.send(localSession.createTextMessage("test"));
-        Thread.sleep(100);
-        assertEquals("Destination not created", 1, remoteBroker.getAdminView().getTemporaryQueues().length);
-        temp.delete();
-        Thread.sleep(100);
-        assertEquals("Destination not deleted", 0, remoteBroker.getAdminView().getTemporaryQueues().length);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java
deleted file mode 100644
index 62fcb94..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Vector;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-
-import static org.junit.Assert.assertTrue;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.TrustManager;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.SslContext;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.transport.tcp.SslBrokerServiceTest;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class FailoverStaticNetworkTest {
-    protected static final Logger LOG = LoggerFactory.getLogger(FailoverStaticNetworkTest.class);
-
-	private final static String DESTINATION_NAME = "testQ";
-	protected BrokerService brokerA;
-    protected BrokerService brokerA1;
-    protected BrokerService brokerB;
-    protected BrokerService brokerC;
-
-
-    private SslContext sslContext;
-
-    protected BrokerService createBroker(String scheme, String listenPort, String[] networkToPorts) throws Exception {
-        return createBroker(scheme, listenPort, networkToPorts, null);
-    }
-
-    protected BrokerService createBroker(String scheme, String listenPort, String[] networkToPorts,
-                                         HashMap<String, String> networkProps) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(false);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.setSslContext(sslContext);
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setBrokerName("Broker_" + listenPort);
-        broker.addConnector(scheme + "://localhost:" + listenPort);
-        if (networkToPorts != null && networkToPorts.length > 0) {
-            StringBuilder builder = new StringBuilder("static:(failover:(" + scheme + "://localhost:");
-            builder.append(networkToPorts[0]);
-            for (int i=1;i<networkToPorts.length; i++) {
-                builder.append("," + scheme + "://localhost:" + networkToPorts[i]);
-            }
-            // limit the reconnects in case of initial random connection to slave
-            // leaving randomize on verifies that this config is picked up
-            builder.append(")?maxReconnectAttempts=1)");
-            NetworkConnector nc = broker.addNetworkConnector(builder.toString());
-            if (networkProps != null) {
-                IntrospectionSupport.setProperties(nc, networkProps);
-            }
-        }
-        return broker;
-    }
-
-    private BrokerService createBroker(String listenPort, String dataDir) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(false);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.setBrokerName("Broker_Shared");
-        // lazy create transport connector on start completion
-        TransportConnector connector = new TransportConnector();
-        connector.setUri(new URI("tcp://localhost:" + listenPort));
-        broker.addConnector(connector);
-        broker.setDataDirectory(dataDir);
-        return broker;
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        KeyManager[] km = SslBrokerServiceTest.getKeyManager();
-        TrustManager[] tm = SslBrokerServiceTest.getTrustManager();
-        sslContext = new SslContext(km, tm, null);
-    }
-    
-    @After
-    public void tearDown() throws Exception {
-        brokerB.stop();
-        brokerB.waitUntilStopped();
-        
-        brokerA.stop();
-        brokerA.waitUntilStopped();
-
-        if (brokerA1 != null) {
-            brokerA1.stop();
-            brokerA1.waitUntilStopped();
-        }
-
-        if (brokerC != null) {
-            brokerC.stop();
-            brokerC.waitUntilStopped();
-        }
-    }
-
-    @Test
-    public void testSendReceiveAfterReconnect() throws Exception {
-        brokerA = createBroker("tcp", "61617", null);
-        brokerA.start();
-        brokerB = createBroker("tcp", "62617", new String[]{"61617"});
-        brokerB.start();
-        doTestNetworkSendReceive();
-
-        LOG.info("stopping brokerA");
-        brokerA.stop();
-        brokerA.waitUntilStopped();
-
-        LOG.info("restarting brokerA");
-        brokerA = createBroker("tcp", "61617", null);
-        brokerA.start();
-
-        doTestNetworkSendReceive();
-    }
-
-    @Test
-    public void testSendReceiveFailover() throws Exception {
-        brokerA = createBroker("tcp", "61617", null);
-        brokerA.start();
-        brokerB = createBroker("tcp", "62617", new String[]{"61617", "63617"});
-        brokerB.start();
-        doTestNetworkSendReceive();
-
-        LOG.info("stopping brokerA");
-        brokerA.stop();
-        brokerA.waitUntilStopped();
-
-        LOG.info("restarting brokerA");
-        brokerA = createBroker("tcp", "63617", null);
-        brokerA.start();
-
-        doTestNetworkSendReceive();
-    }
-
-    @Test
-    public void testSendReceiveFailoverDuplex() throws Exception {
-        final Vector<Throwable> errors = new Vector<Throwable>();
-        final String dataDir = "target/data/shared";
-        brokerA = createBroker("61617", dataDir);
-        brokerA.start();
-
-        final BrokerService slave = createBroker("63617", dataDir);
-        brokerA1 = slave;
-        ExecutorService executor = Executors.newCachedThreadPool();
-        executor.execute(new Runnable() {
-            public void run() {
-                try {
-                    slave.start();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    errors.add(e);
-                }
-            }
-        });
-        executor.shutdown();
-
-        HashMap<String, String> networkConnectorProps = new HashMap<String, String>();
-        networkConnectorProps.put("duplex", "true");
-        brokerB = createBroker("tcp", "62617", new String[]{"61617", "63617"}, networkConnectorProps);
-        brokerB.start();
-
-        doTestNetworkSendReceive(brokerA, brokerB);
-        doTestNetworkSendReceive(brokerB, brokerA);
-
-        LOG.info("stopping brokerA (master shared_broker)");
-        brokerA.stop();
-        brokerA.waitUntilStopped();
-
-        // wait for slave to start
-        brokerA1.waitUntilStarted();
-
-        doTestNetworkSendReceive(brokerA1, brokerB);
-        doTestNetworkSendReceive(brokerB, brokerA1);
-
-        assertTrue("No unexpected exceptions " + errors, errors.isEmpty());
-    }
-
-    @Test
-    // master slave piggy in the middle setup
-    public void testSendReceiveFailoverDuplexWithPIM() throws Exception {
-        final String dataDir = "target/data/shared/pim";
-        brokerA = createBroker("61617", dataDir);
-        brokerA.start();
-
-        final BrokerService slave = createBroker("63617", dataDir);
-        brokerA1 = slave;
-        ExecutorService executor = Executors.newCachedThreadPool();
-        executor.execute(new Runnable() {
-            public void run() {
-                try {
-                    slave.start();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-        executor.shutdown();
-
-        HashMap<String, String> networkConnectorProps = new HashMap<String, String>();
-        networkConnectorProps.put("duplex", "true");
-        networkConnectorProps.put("networkTTL", "2");
-
-        brokerB = createBroker("tcp", "62617", new String[]{"61617", "63617"}, networkConnectorProps);
-        brokerB.start();
-
-        assertTrue("all props applied", networkConnectorProps.isEmpty());
-        networkConnectorProps.put("duplex", "true");
-        networkConnectorProps.put("networkTTL", "2");
-
-        brokerC = createBroker("tcp", "64617", new String[]{"61617", "63617"}, networkConnectorProps);
-        brokerC.start();
-        assertTrue("all props applied a second time", networkConnectorProps.isEmpty());
-
-        //Thread.sleep(4000);
-        doTestNetworkSendReceive(brokerC, brokerB);
-        doTestNetworkSendReceive(brokerB, brokerC);
-
-        LOG.info("stopping brokerA (master shared_broker)");
-        brokerA.stop();
-        brokerA.waitUntilStopped();
-
-        doTestNetworkSendReceive(brokerC, brokerB);
-        doTestNetworkSendReceive(brokerB, brokerC);
-
-        brokerC.stop();
-        brokerC.waitUntilStopped();
-    }
-
-    /**
-     * networked broker started after target so first connect attempt succeeds
-     * start order is important
-     */
-    @Test
-    public void testSendReceive() throws Exception {
-              
-        brokerA = createBroker("tcp", "61617", null);
-        brokerA.start();        
-        brokerB = createBroker("tcp", "62617", new String[]{"61617","1111"});
-        brokerB.start();
-  
-        doTestNetworkSendReceive();
-    }
-
-    @Test
-    public void testSendReceiveSsl() throws Exception {
-              
-        brokerA = createBroker("ssl", "61617", null);
-        brokerA.start();        
-        brokerB = createBroker("ssl", "62617", new String[]{"61617", "1111"});
-        brokerB.start();
-  
-        doTestNetworkSendReceive();
-    }
-
-    private void doTestNetworkSendReceive() throws Exception, JMSException {
-        doTestNetworkSendReceive(brokerB, brokerA);
-    }
-
-    private void doTestNetworkSendReceive(BrokerService to, BrokerService from) throws Exception, JMSException {
-
-        LOG.info("Creating Consumer on the networked broker ..." + from);
-        
-        SslContext.setCurrentSslContext(sslContext);
-        // Create a consumer on brokerA
-        ConnectionFactory consFactory = createConnectionFactory(from);
-        Connection consConn = consFactory.createConnection();
-        consConn.start();
-        Session consSession = consConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQDestination destination = (ActiveMQDestination) consSession.createQueue(DESTINATION_NAME);
-        final MessageConsumer consumer = consSession.createConsumer(destination);
-
-        LOG.info("publishing to " + to);
-
-        sendMessageTo(destination, to);
-        
-        boolean gotMessage = Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return consumer.receive(1000) != null;
-            }      
-        });
-        try {
-            consConn.close();
-        } catch (JMSException ignored) {
-        }
-        assertTrue("consumer on A got message", gotMessage);
-    }
-
-    private void sendMessageTo(ActiveMQDestination destination, BrokerService brokerService) throws Exception {
-        ConnectionFactory factory = createConnectionFactory(brokerService);
-        Connection conn = factory.createConnection();
-        conn.start();
-        Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createProducer(destination).send(session.createTextMessage("Hi"));
-        conn.close();
-    }
-    
-    protected ConnectionFactory createConnectionFactory(final BrokerService broker) throws Exception {    
-        String url = ((TransportConnector) broker.getTransportConnectors().get(0)).getServer().getConnectURI().toString();
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
-        connectionFactory.setOptimizedMessageDispatch(true);
-        connectionFactory.setDispatchAsync(false);
-        connectionFactory.setUseAsyncSend(false);
-        connectionFactory.setOptimizeAcknowledge(false);
-        connectionFactory.setAlwaysSyncSend(true);
-        return connectionFactory;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java
deleted file mode 100755
index f2659f8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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.network;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-public class ForwardingBridgeTest extends NetworkTestSupport {
-
-    public ActiveMQDestination destination;
-    public byte destinationType;
-    public int deliveryMode;
-    private ForwardingBridge bridge;
-
-    public void initCombosForTestAddConsumerThenSend() {
-        addCombinationValues("deliveryMode", new Object[] {new Integer(DeliveryMode.NON_PERSISTENT),
-                                                           new Integer(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {new Byte(ActiveMQDestination.QUEUE_TYPE),
-                                                              new Byte(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testAddConsumerThenSend() throws Exception {
-        // Start a producer on local broker
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-
-        // Start a consumer on a remote broker
-        StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo2, destination);
-        connection2.send(consumerInfo);
-        Thread.sleep(1000);
-        // Give forwarding bridge a chance to finish setting up
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException ie) {
-            ie.printStackTrace();
-        }
-
-        // Send the message to the local boker.
-        connection1.send(createMessage(producerInfo, destination, deliveryMode));
-
-        // Make sure the message was delivered via the remote.
-
-        Message m = receiveMessage(connection2);
-        assertNotNull(m);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        bridge = new ForwardingBridge(createTransport(), createRemoteTransport());
-        bridge.setClientId("local-remote-bridge");
-        bridge.setDispatchAsync(false);
-        bridge.start();
-    }
-
-    protected void tearDown() throws Exception {
-        bridge.stop();
-        super.tearDown();
-    }
-
-    public static Test suite() {
-        return suite(ForwardingBridgeTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java
deleted file mode 100644
index 9c75b9e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.network;
-
-/**
- * 
- */
-public class MulticastNetworkTest extends SimpleNetworkTest {
-
-    protected String getRemoteBrokerURI() {
-        return "org/apache/activemq/network/multicast/remoteBroker.xml";
-    }
-
-    protected String getLocalBrokerURI() {
-        return "org/apache/activemq/network/multicast/localBroker.xml";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java
deleted file mode 100644
index a415e6e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * 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.network;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeNotNull;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TopicSubscriber;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class NetworkBrokerDetachTest {
-
-	private final static String BROKER_NAME = "broker";
-	private final static String REM_BROKER_NAME = "networkedBroker";
-	private final static String DESTINATION_NAME = "testQ";
-	private final static int    NUM_CONSUMERS = 1;
-	
-    protected static final Logger LOG = LoggerFactory.getLogger(NetworkBrokerDetachTest.class);
-    protected final int numRestarts = 3;
-    protected final int networkTTL = 2;
-    protected final boolean dynamicOnly = false;
-    
-    protected BrokerService broker;
-    protected BrokerService networkedBroker;
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName(BROKER_NAME);
-        configureBroker(broker);
-        broker.addConnector("tcp://localhost:61617");
-        NetworkConnector networkConnector = broker.addNetworkConnector("static:(tcp://localhost:62617?wireFormat.maxInactivityDuration=500)?useExponentialBackOff=false");
-        configureNetworkConnector(networkConnector);
-        return broker;
-    }
-
-    protected BrokerService createNetworkedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName(REM_BROKER_NAME);
-        configureBroker(broker);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.addConnector("tcp://localhost:62617");
-        NetworkConnector networkConnector = broker.addNetworkConnector("static:(tcp://localhost:61617?wireFormat.maxInactivityDuration=500)?useExponentialBackOff=false");
-        configureNetworkConnector(networkConnector);
-        return broker;
-    }
-    
-    private void configureNetworkConnector(NetworkConnector networkConnector) {
-        networkConnector.setDuplex(false);
-        networkConnector.setNetworkTTL(networkTTL);
-        networkConnector.setDynamicOnly(dynamicOnly);
-    }
-    
-    // variants for each store....
-    protected void configureBroker(BrokerService broker) throws Exception {
-        //KahaPersistenceAdapter persistenceAdapter = new KahaPersistenceAdapter();
-        //persistenceAdapter.setDirectory(new File("target/activemq-data/kaha/" + broker.getBrokerName() + "/NetworBrokerDetatchTest"));
-        //broker.setPersistenceAdapter(persistenceAdapter);        
-        
-        KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter();
-        persistenceAdapter.setDirectory(new File("target/activemq-data/kahadb/" + broker.getBrokerName() + "NetworBrokerDetatchTest"));
-        broker.setPersistenceAdapter(persistenceAdapter);
-        
-        // default AMQ
-    }
-    
-    @Before
-    public void init() throws Exception {
-        broker = createBroker();
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.start();
-        
-        networkedBroker = createNetworkedBroker();
-        networkedBroker.setDeleteAllMessagesOnStartup(true);
-        networkedBroker.start();
-    }
-    
-    @After
-    public void cleanup() throws Exception {
-        networkedBroker.stop();
-        networkedBroker.waitUntilStopped();
-        
-        broker.stop();
-        broker.waitUntilStopped();
-    }
-
-    @Test
-    public void testNetworkedBrokerDetach() throws Exception {
-        LOG.info("Creating Consumer on the networked broker ...");
-        // Create a consumer on the networked broker 
-        ConnectionFactory consFactory = createConnectionFactory(networkedBroker);
-        Connection consConn = consFactory.createConnection();
-        Session consSession = consConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQDestination destination = (ActiveMQDestination) consSession.createQueue(DESTINATION_NAME);
-        for(int i=0; i<NUM_CONSUMERS; i++) {
-            consSession.createConsumer(destination);
-        }
-        
-        assertTrue("got expected consumer count from mbean within time limit", 
-                verifyConsumerCount(1, destination, broker));
-        
-        
-        LOG.info("Stopping Consumer on the networked broker ...");
-        // Closing the connection will also close the consumer 
-        consConn.close();
-        
-        // We should have 0 consumer for the queue on the local broker
-        assertTrue("got expected 0 count from mbean within time limit", verifyConsumerCount(0, destination, broker));
-    }
-
-    
-    @Test
-    public void testNetworkedBrokerDurableSubAfterRestart() throws Exception {
-        
-        final AtomicInteger count = new AtomicInteger(0);
-        MessageListener counter = new MessageListener() {
-            public void onMessage(Message message) {
-                count.incrementAndGet();
-            }
-        };
-        
-        LOG.info("Creating durable consumer on each broker ...");
-        ActiveMQTopic destination = registerDurableConsumer(networkedBroker, counter);
-        registerDurableConsumer(broker, counter);
-        
-        assertTrue("got expected consumer count from local broker mbean within time limit",
-                verifyConsumerCount(2, destination, broker));
-        
-        assertTrue("got expected consumer count from network broker mbean within time limit",
-                verifyConsumerCount(2, destination, networkedBroker));
-        
-        sendMessageTo(destination, broker);
-        
-        assertTrue("Got one message on each", verifyMessageCount(2, count));
-        
-        LOG.info("Stopping brokerTwo...");
-        networkedBroker.stop();
-        networkedBroker.waitUntilStopped();           
-        
-        LOG.info("restarting  broker Two...");
-        networkedBroker = createNetworkedBroker();
-        networkedBroker.start();
-   
-        LOG.info("Recreating durable Consumer on the broker after restart...");
-        registerDurableConsumer(networkedBroker, counter);
-        
-        // give advisories a chance to percolate
-        TimeUnit.SECONDS.sleep(5);
-        
-        sendMessageTo(destination, broker);
-        
-        // expect similar after restart
-        assertTrue("got expected consumer count from local broker mbean within time limit",
-                verifyConsumerCount(2, destination, broker));
- 
-        // a durable sub is auto bridged on restart unless dynamicOnly=true
-        assertTrue("got expected consumer count from network broker mbean within time limit",
-                verifyConsumerCount(2, destination, networkedBroker));
-
-        assertTrue("got no inactive subs on broker", verifyDurableConsumerCount(0, broker));
-        assertTrue("got no inactive subs on other broker", verifyDurableConsumerCount(0, networkedBroker));
-
-        assertTrue("Got two more messages after restart", verifyMessageCount(4, count));
-        TimeUnit.SECONDS.sleep(1);
-        assertTrue("still Got just two more messages", verifyMessageCount(4, count));
-    }
-
-    private boolean verifyMessageCount(final int i, final AtomicInteger count) throws Exception {
-        return Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return i == count.get();
-            }      
-        });
-    }
-
-    private ActiveMQTopic registerDurableConsumer(
-            BrokerService brokerService, MessageListener listener) throws Exception {
-        ConnectionFactory factory = createConnectionFactory(brokerService);
-        Connection connection = factory.createConnection();
-        connection.setClientID("DurableOne");
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ActiveMQTopic destination = (ActiveMQTopic) session.createTopic(DESTINATION_NAME);
-        // unique to a broker
-        TopicSubscriber sub = session.createDurableSubscriber(destination, "SubOne" + brokerService.getBrokerName());
-        sub.setMessageListener(listener);
-        return destination;
-    }
-
-    private void sendMessageTo(ActiveMQTopic destination, BrokerService brokerService) throws Exception {
-        ConnectionFactory factory = createConnectionFactory(brokerService);
-        Connection conn = factory.createConnection();
-        conn.start();
-        Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createProducer(destination).send(session.createTextMessage("Hi"));
-        conn.close();
-    }
-    
-    protected ConnectionFactory createConnectionFactory(final BrokerService broker) throws Exception {
-        
-        String url = ((TransportConnector) broker.getTransportConnectors().get(0)).getServer().getConnectURI().toString();
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
-        connectionFactory.setOptimizedMessageDispatch(true);
-        connectionFactory.setCopyMessageOnSend(false);
-        connectionFactory.setUseCompression(false);
-        connectionFactory.setDispatchAsync(false);
-        connectionFactory.setUseAsyncSend(false);
-        connectionFactory.setOptimizeAcknowledge(false);
-        connectionFactory.setWatchTopicAdvisories(true);
-        ActiveMQPrefetchPolicy qPrefetchPolicy= new ActiveMQPrefetchPolicy();
-        qPrefetchPolicy.setQueuePrefetch(100);
-        qPrefetchPolicy.setTopicPrefetch(1000);
-        connectionFactory.setPrefetchPolicy(qPrefetchPolicy);
-        connectionFactory.setAlwaysSyncSend(true);
-        return connectionFactory;
-    }
-    
-    // JMX Helper Methods 
-    private boolean verifyConsumerCount(final long expectedCount, final ActiveMQDestination destination, final BrokerService broker) throws Exception {
-        return Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                boolean result = false;
-                try {
-                    // We should have 1 consumer for the queue on the local broker
-                    Object consumers = broker.getManagementContext().getAttribute(getObjectName(broker.getBrokerName(), destination.isQueue() ? "Queue" : "Topic", "Destination=" + destination.getPhysicalName()), "ConsumerCount");
-                    if (consumers != null) {
-                        LOG.info("Consumers for " + destination.getPhysicalName() + " on " + broker + " : " + consumers);
-                        if (expectedCount == ((Long)consumers).longValue()) {
-                            result = true;
-                        }
-                    }
-                } catch (Exception ignoreAndRetry) {
-                }
-                return result;
-            }      
-        });
-    }
-    
-    
-    private boolean verifyDurableConsumerCount(final long expectedCount, final BrokerService broker) throws Exception {
-        return Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                boolean result = false;
-                MBeanServerConnection mbsc = getMBeanServerConnection();
-                if (mbsc != null) {
-                    Set subs = broker.getManagementContext().queryNames(getObjectName(broker.getBrokerName(), "Subscription", "active=false,*"), null);
-                    if (subs != null) {
-                        LOG.info("inactive durable subs on " + broker + " : " + subs);
-                        if (expectedCount == subs.size()) {
-                            result = true;
-                        }
-                    }
-                }
-                return result;
-            }      
-        });
-    }
-
-    private MBeanServerConnection getMBeanServerConnection() throws MalformedURLException {
-        final JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi");
-        MBeanServerConnection mbsc = null;
-        try {
-            JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
-            mbsc = jmxc.getMBeanServerConnection();
-        } catch (Exception ignored) {
-            LOG.warn("getMBeanServer ex: " + ignored);
-        }
-        // If port 1099 is in use when the Broker starts, starting the jmx
-        // connector will fail.  So, if we have no mbsc to query, skip the
-        // test.
-        assumeNotNull(mbsc);
-        return mbsc;
-    }
-    
-    
-    private ObjectName getObjectName(String brokerName, String type, String pattern) throws Exception {
-      ObjectName beanName = new ObjectName(
-        "org.apache.activemq:BrokerName=" + brokerName + ",Type=" + type +"," + pattern
-      );
-      
-      return beanName;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java
deleted file mode 100755
index 8348e80..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.TopicRequestor;
-import javax.jms.TopicSession;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-public class NetworkConnectionsCleanedupTest extends TestCase {
-
-    protected static final int MESSAGE_COUNT = 10;
-    private static final Logger LOG = LoggerFactory.getLogger(NetworkConnectionsCleanedupTest.class);
-
-    protected AbstractApplicationContext context;
-    protected Connection localConnection;
-    protected Connection remoteConnection;
-    protected BrokerService localBroker;
-    protected BrokerService remoteBroker;
-    protected Session localSession;
-    protected Session remoteSession;
-    protected ActiveMQTopic included;
-    protected ActiveMQTopic excluded;
-    protected String consumerName = "durableSubs";
-
-    public void testNetworkConnections() throws Exception {
-    	String uri = "static:(tcp://localhost:61617)?initialReconnectDelay=100";
-    	List<ActiveMQDestination> list = new ArrayList<ActiveMQDestination>();
-    	for (int i =0;i < 100;i++){
-    	    list.add(new ActiveMQTopic("FOO"+i));
-    	}
-    	String bindAddress = "tcp://localhost:61616";
-		BrokerService broker = new BrokerService();
-		broker.setUseJmx(false);
-		broker.setPersistent(false);
-		broker.addConnector(bindAddress);
-		NetworkConnector network = broker.addNetworkConnector(uri);
-		network.setDynamicOnly(true);
-		network.setStaticallyIncludedDestinations(list);
-		uri = "static:(tcp://localhost:61618)?initialReconnectDelay=100";
-		network = broker.addNetworkConnector(uri);
-        network.setDynamicOnly(true);
-        network.setStaticallyIncludedDestinations(list);
-		broker.setUseShutdownHook(false);
-		broker.start();
-		Thread.sleep(1000 * 3600);
-    }
-
-    
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java
deleted file mode 100644
index f453ec7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.transport.TransportFilter;
-import org.apache.activemq.transport.failover.FailoverTransport;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-public class NetworkFailoverTest extends TestCase {
-
-    protected static final int MESSAGE_COUNT = 10;
-    private static final Logger LOG = LoggerFactory.getLogger(NetworkFailoverTest.class);
-
-    protected AbstractApplicationContext context;
-    protected Connection localConnection;
-    protected Connection remoteConnection;
-    protected BrokerService localBroker;
-    protected BrokerService remoteBroker;
-    protected Session localSession;
-    protected Session remoteSession;
-    protected ActiveMQQueue included=new ActiveMQQueue("include.test.foo");
-    protected String consumerName = "durableSubs";
-
-    public void testRequestReply() throws Exception {
-        final MessageProducer remoteProducer = remoteSession.createProducer(null);
-        MessageConsumer remoteConsumer = remoteSession.createConsumer(included);
-        remoteConsumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message msg) {
-                try {
-                    TextMessage textMsg = (TextMessage)msg;
-                    String payload = "REPLY: " + textMsg.getText();
-                    Destination replyTo;
-                    replyTo = msg.getJMSReplyTo();
-                    textMsg.clearBody();
-                    textMsg.setText(payload);
-                    remoteProducer.send(replyTo, textMsg);  
-                    
-                } catch (Exception e) {
-                    e.printStackTrace();
-                } 
-            }
-        });
-
-        Queue tempQueue = localSession.createTemporaryQueue();
-        MessageProducer requestProducer = localSession.createProducer(included);
-        requestProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        MessageConsumer requestConsumer = localSession.createConsumer(tempQueue);
-       
-        // allow for consumer infos to perculate arround
-        Thread.sleep(2000);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            String payload = "test msg " + i;
-            TextMessage msg = localSession.createTextMessage(payload);
-            msg.setJMSReplyTo(tempQueue);
-            requestProducer.send(msg);
-            LOG.info("Failing over");
-            ((FailoverTransport) ((TransportFilter) ((TransportFilter) 
-                    ((ActiveMQConnection) localConnection)
-                    .getTransport()).getNext()).getNext())
-                    .handleTransportFailure(new IOException());
-            TextMessage result = (TextMessage)requestConsumer.receive();
-            assertNotNull(result);
-            
-            LOG.info(result.getText());
-        }
-    }
-
-    
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        doSetUp();
-    }
-
-    protected void tearDown() throws Exception {
-        localBroker.deleteAllMessages();
-        remoteBroker.deleteAllMessages();
-        doTearDown();
-        super.tearDown();
-    }
-
-    protected void doTearDown() throws Exception {
-        localConnection.close();
-        remoteConnection.close();
-        localBroker.stop();
-        remoteBroker.stop();
-    }
-
-    protected void doSetUp() throws Exception {
-        
-        remoteBroker = createRemoteBroker();
-        remoteBroker.start();
-        localBroker = createLocalBroker();
-        localBroker.start();
-        String localURI = "tcp://localhost:61616";
-        String remoteURI = "tcp://localhost:61617";
-        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("failover:("+localURI+","+remoteURI+"?trackMessages=true)?randomize=false&backup=true");
-        //ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory(localURI);
-        localConnection = fac.createConnection();
-        localConnection.setClientID("local");
-        localConnection.start();
-        fac = new ActiveMQConnectionFactory("failover:("+remoteURI + ","+localURI+")?randomize=false&backup=true");
-        fac.setWatchTopicAdvisories(false);
-        remoteConnection = fac.createConnection();
-        remoteConnection.setClientID("remote");
-        remoteConnection.start();
-      
-        localSession = localConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        remoteSession = remoteConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    protected String getRemoteBrokerURI() {
-        return "org/apache/activemq/network/remoteBroker.xml";
-    }
-
-    protected String getLocalBrokerURI() {
-        return "org/apache/activemq/network/localBroker.xml";
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        Resource resource = new ClassPathResource(uri);
-        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
-        resource = new ClassPathResource(uri);
-        factory = new BrokerFactoryBean(resource);
-        factory.afterPropertiesSet();
-        BrokerService result = factory.getBroker();
-        return result;
-    }
-
-    protected BrokerService createLocalBroker() throws Exception {
-        return createBroker(getLocalBrokerURI());
-    }
-
-    protected BrokerService createRemoteBroker() throws Exception {
-        return createBroker(getRemoteBrokerURI());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
deleted file mode 100644
index 31d2a07..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-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.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This test case is used to load test store and forwarding between brokers.  It sets up
- * n brokers to which have a chain of queues which this test consumes and produces to. 
- * 
- * If the network bridges gets stuck at any point subsequent queues will not get messages.  This test 
- * samples the production and consumption stats every second and if the flow of messages
- * get stuck then this tast fails.  The test monitors the flow of messages for 1 min.
- *  
- * @author chirino
- */
-public class NetworkLoadTest extends TestCase {
-
-	private static final transient Logger LOG = LoggerFactory.getLogger(NetworkLoadTest.class);
-
-	// How many times do we sample?
-    private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", ""+60*1/5)); 
-    // Slower machines might need to make this bigger.
-    private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
-	protected static final int BROKER_COUNT = 4;
-	protected static final int MESSAGE_SIZE = 2000;
-        String groupId;
-        
-	class ForwardingClient {
-
-		private final AtomicLong forwardCounter = new AtomicLong();
-		private final Connection toConnection;
-		private final Connection fromConnection;
-
-		public ForwardingClient(int from, int to) throws JMSException {
-			toConnection = createConnection(from);
-			Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-			final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to));
-			producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-			producer.setDisableMessageID(true);
-
-			fromConnection = createConnection(from);
-			Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-			MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from));
-			
-			consumer.setMessageListener(new MessageListener() {
-					public void onMessage(Message msg) {
-						try {
-							producer.send(msg);
-							forwardCounter.incrementAndGet();
-						} catch (JMSException e) {
-							// this is caused by the connection getting closed. 
-						}
-					}
-			});
-		}
-
-		public void start() throws JMSException {
-			toConnection.start();
-			fromConnection.start();
-		}
-		
-		public void stop() throws JMSException {
-		        toConnection.stop();
-			fromConnection.stop();
-		}
-		
-		public void close() throws JMSException {
-			toConnection.close();
-			fromConnection.close();
-		}
-	}
-
-	private BrokerService[] brokers;
-	private ForwardingClient[] forwardingClients;
-
-	
-	protected void setUp() throws Exception {
-	        groupId = "network-load-test-"+System.currentTimeMillis();
-		brokers = new BrokerService[BROKER_COUNT];
-		for (int i = 0; i < brokers.length; i++) {
-		    LOG.info("Starting broker: "+i);
-			brokers[i] = createBroker(i);
-			brokers[i].start();
-		}
-		
-		// Wait for the network connection to get setup.
-		// The wait is exponential since every broker has to connect to every other broker.
-		Thread.sleep(BROKER_COUNT*BROKER_COUNT*50);
-		
-		forwardingClients = new ForwardingClient[BROKER_COUNT-1];		
-		for (int i = 0; i < forwardingClients.length; i++) {
-		    LOG.info("Starting fowarding client "+i);
-			forwardingClients[i] = new ForwardingClient(i, i+1);
-			forwardingClients[i].start();
-		}
-	}
-
-	protected void tearDown() throws Exception {
-		for (int i = 0; i < forwardingClients.length; i++) {
-		    LOG.info("Stoping fowarding client "+i);
-			forwardingClients[i].close();
-		}
-		for (int i = 0; i < brokers.length; i++) {
-		    LOG.info("Stoping broker "+i);
-			brokers[i].stop();
-		}
-	}
-
-	protected Connection createConnection(int brokerId) throws JMSException {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:"+(60000+brokerId));
-        connectionFactory.setOptimizedMessageDispatch(true);
-        connectionFactory.setCopyMessageOnSend(false);
-        connectionFactory.setUseCompression(false);
-        connectionFactory.setDispatchAsync(true);
-        connectionFactory.setUseAsyncSend(false);
-        connectionFactory.setOptimizeAcknowledge(false);
-        connectionFactory.setWatchTopicAdvisories(false);
-        ActiveMQPrefetchPolicy qPrefetchPolicy= new ActiveMQPrefetchPolicy();
-        qPrefetchPolicy.setQueuePrefetch(100);
-        qPrefetchPolicy.setTopicPrefetch(1000);
-        connectionFactory.setPrefetchPolicy(qPrefetchPolicy);
-        connectionFactory.setAlwaysSyncSend(true);
-		return connectionFactory.createConnection();
-	}
-
-	protected BrokerService createBroker(int brokerId) throws Exception {
-		BrokerService broker = new BrokerService();
-		broker.setBrokerName("broker-" + brokerId);
-		broker.setPersistent(false);
-		broker.setUseJmx(true);
-		broker.getManagementContext().setCreateConnector(false);
-
-		final SystemUsage memoryManager = new SystemUsage();
-		memoryManager.getMemoryUsage().setLimit(1024 * 1024 * 50); // 50 MB
-		broker.setSystemUsage(memoryManager);
-
-		final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-		final PolicyEntry entry = new PolicyEntry();
-		entry.setQueue(">");
-		entry.setMemoryLimit(1024 * 1024 * 1); // Set to 1 MB
-		entry.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
-		entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-		policyEntries.add(entry);
-
-		// This is to turn of the default behavior of storing topic messages for retroactive consumption
-		final PolicyEntry topicPolicyEntry = new PolicyEntry();
-		topicPolicyEntry.setTopic(">");
-		final NoSubscriptionRecoveryPolicy noSubscriptionRecoveryPolicy = new NoSubscriptionRecoveryPolicy();
-		topicPolicyEntry.setSubscriptionRecoveryPolicy(noSubscriptionRecoveryPolicy);
-
-		final PolicyMap policyMap = new PolicyMap();
-		policyMap.setPolicyEntries(policyEntries);
-		broker.setDestinationPolicy(policyMap);
-		
-        TransportConnector transportConnector = new TransportConnector();
-        transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId)));
-        
-        transportConnector.setDiscoveryUri(new URI("multicast://default?group="+groupId));        
-        broker.addConnector(transportConnector);
-                        
-        DiscoveryNetworkConnector networkConnector = new DiscoveryNetworkConnector();
-        networkConnector.setUri(new URI("multicast://default?group="+groupId));
-	    networkConnector.setBridgeTempDestinations(true);
-	    networkConnector.setPrefetchSize(1);
-	    broker.addNetworkConnector(networkConnector);
-        
-		return broker;
-	}
-	
-	public void testRequestReply() throws Exception {
-
-		final int to = 0; // Send to the first broker
-		int from = brokers.length-1; // consume from the last broker..
-				
-	    LOG.info("Staring Final Consumer");
-
-	    Connection fromConnection = createConnection(from);
-		fromConnection.start();
-		Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from));
-		
-		final AtomicReference<ActiveMQTextMessage> lastMessageReceived = new AtomicReference<ActiveMQTextMessage>();
-		final AtomicLong producedMessages = new AtomicLong();
-		final AtomicLong receivedMessages = new AtomicLong();
-		final AtomicBoolean done = new AtomicBoolean();
-
-		// Setup the consumer..
-		consumer.setMessageListener(new MessageListener() {
-			public void onMessage(Message msg) {
-				ActiveMQTextMessage m = (ActiveMQTextMessage) msg;
-				ActiveMQTextMessage last = lastMessageReceived.get();
-				if( last!=null ) {
-					// Some order checking...
-					if( last.getMessageId().getProducerSequenceId() > m.getMessageId().getProducerSequenceId() ) {
-						System.out.println("Received an out of order message. Got "+m.getMessageId()+", expected something after "+last.getMessageId());
-					}
-				}
-				lastMessageReceived.set(m);
-				receivedMessages.incrementAndGet();
-			}
-		});
-
-	    LOG.info("Staring Initial Producer");
-		final Connection toConnection = createConnection(to);
-		Thread producer = new Thread("Producer") {
-			@Override
-			public void run() {
-				try {
-					toConnection.start();
-					Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-					final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to));
-					producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-					producer.setDisableMessageID(true);
-
-					for (int i = 0; !done.get(); i++) {
-						TextMessage msg = toSession.createTextMessage(createMessageText(i));
-						producer.send(msg);
-						producedMessages.incrementAndGet();
-					}
-				} catch (JMSException e) {
-					e.printStackTrace();
-				}
-			}
-			
-		    private String createMessageText(int index) {
-				StringBuffer buffer = new StringBuffer(MESSAGE_SIZE);
-				buffer.append(index + " on " + new Date() + " ...");
-				if (buffer.length() > MESSAGE_SIZE) {
-					return buffer.substring(0, MESSAGE_SIZE);
-				}
-				for (int i = buffer.length(); i < MESSAGE_SIZE; i++) {
-					buffer.append(' ');
-				}
-
-				return buffer.toString();
-			}
-		};
-		producer.start();
-	
-		
-		// Give the forwarding clients a chance to get going and fill the down
-		// stream broker queues..
-		Thread.sleep(BROKER_COUNT*200);
-		
-        for (int i = 0; i < SAMPLES; i++) {
-
-            long start = System.currentTimeMillis();
-            producedMessages.set(0);
-            receivedMessages.set(0);
-            for (int j = 0; j < forwardingClients.length; j++) {
-    			forwardingClients[j].forwardCounter.set(0);
-    		}
-
-            Thread.sleep(SAMPLE_DURATION);
-
-            long end = System.currentTimeMillis();
-            long r = receivedMessages.get();
-            long p = producedMessages.get();
-
-            LOG.info("published: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec, " + "consumed: " + r + " msgs at " + (r * 1000f / (end - start)) + " msgs/sec");
-            
-            StringBuffer fwdingmsg = new StringBuffer(500);
-            fwdingmsg.append("  forwarding counters: ");
-            for (int j = 0; j < forwardingClients.length; j++) {
-            	if( j!= 0 ) {
-            		fwdingmsg.append(", ");
-            	}
-                fwdingmsg.append(forwardingClients[j].forwardCounter.get());
-    		}
-            LOG.info(fwdingmsg.toString());
-
-            // The test is just checking to make sure thaat the producer and consumer does not hang
-            // due to the network hops take to route the message form the producer to the consumer.
-            assertTrue("Recieved some messages since last sample", r>0);
-            assertTrue("Produced some messages since last sample", p>0);
-            
-        }
-        LOG.info("Sample done.");
-        done.set(true);
-        // Wait for the producer to finish.
-        producer.join(1000*5);
-        toConnection.close();
-        fromConnection.close();
-        
-	}
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java
deleted file mode 100644
index 68376e1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.advisory.ConsumerEvent;
-import org.apache.activemq.advisory.ConsumerEventSource;
-import org.apache.activemq.advisory.ConsumerListener;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * These test cases are used to verifiy that network connections get re
- * established in all broker restart scenarios.
- * 
- * @author chirino
- */
-public class NetworkReconnectTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(NetworkReconnectTest.class);
-
-    private BrokerService producerBroker;
-    private BrokerService consumerBroker;
-    private ActiveMQConnectionFactory producerConnectionFactory;
-    private ActiveMQConnectionFactory consumerConnectionFactory;
-    private Destination destination;
-    private ArrayList<Connection> connections = new ArrayList<Connection>();
-
-    public void xtestMultipleProducerBrokerRestarts() throws Exception {
-        for (int i = 0; i < 10; i++) {
-            testWithProducerBrokerRestart();
-            disposeConsumerConnections();
-        }
-    }
-
-    public void xtestWithoutRestarts() throws Exception {
-        startProducerBroker();
-        startConsumerBroker();
-
-        MessageConsumer consumer = createConsumer();
-        AtomicInteger counter = createConsumerCounter(producerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        String messageId = sendMessage();
-        Message message = consumer.receive(1000);
-
-        assertEquals(messageId, message.getJMSMessageID());
-
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    public void testWithProducerBrokerRestart() throws Exception {
-        startProducerBroker();
-        startConsumerBroker();
-
-        MessageConsumer consumer = createConsumer();
-        AtomicInteger counter = createConsumerCounter(producerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        String messageId = sendMessage();
-        Message message = consumer.receive(1000);
-
-        assertEquals(messageId, message.getJMSMessageID());
-        assertNull(consumer.receiveNoWait());
-
-        // Restart the first broker...
-        stopProducerBroker();
-        startProducerBroker();
-
-        counter = createConsumerCounter(producerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        messageId = sendMessage();
-        message = consumer.receive(1000);
-
-        assertEquals(messageId, message.getJMSMessageID());
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    public void xtestWithConsumerBrokerRestart() throws Exception {
-
-        startProducerBroker();
-        startConsumerBroker();
-
-        MessageConsumer consumer = createConsumer();
-        AtomicInteger counter = createConsumerCounter(producerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        String messageId = sendMessage();
-        Message message = consumer.receive(1000);
-
-        assertEquals(messageId, message.getJMSMessageID());
-        assertNull(consumer.receiveNoWait());
-
-        // Restart the first broker...
-        stopConsumerBroker();
-        waitForConsumerToLeave(counter);
-        startConsumerBroker();
-
-        consumer = createConsumer();
-        waitForConsumerToArrive(counter);
-
-        messageId = sendMessage();
-        message = consumer.receive(1000);
-
-        assertEquals(messageId, message.getJMSMessageID());
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    public void xtestWithConsumerBrokerStartDelay() throws Exception {
-
-        startConsumerBroker();
-        MessageConsumer consumer = createConsumer();
-
-        Thread.sleep(1000 * 5);
-
-        startProducerBroker();
-        AtomicInteger counter = createConsumerCounter(producerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        String messageId = sendMessage();
-        Message message = consumer.receive(1000);
-
-        assertEquals(messageId, message.getJMSMessageID());
-
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    public void xtestWithProducerBrokerStartDelay() throws Exception {
-
-        startProducerBroker();
-        AtomicInteger counter = createConsumerCounter(producerConnectionFactory);
-
-        Thread.sleep(1000 * 5);
-
-        startConsumerBroker();
-        MessageConsumer consumer = createConsumer();
-
-        waitForConsumerToArrive(counter);
-
-        String messageId = sendMessage();
-        Message message = consumer.receive(1000);
-
-        assertEquals(messageId, message.getJMSMessageID());
-
-        assertNull(consumer.receiveNoWait());
-
-    }
-
-    protected void setUp() throws Exception {
-
-        LOG.info("===============================================================================");
-        LOG.info("Running Test Case: " + getName());
-        LOG.info("===============================================================================");
-
-        producerConnectionFactory = createProducerConnectionFactory();
-        consumerConnectionFactory = createConsumerConnectionFactory();
-        destination = new ActiveMQQueue("RECONNECT.TEST.QUEUE");
-
-    }
-
-    protected void tearDown() throws Exception {
-        disposeConsumerConnections();
-        try {
-            stopProducerBroker();
-        } catch (Throwable e) {
-        }
-        try {
-            stopConsumerBroker();
-        } catch (Throwable e) {
-        }
-    }
-
-    protected void disposeConsumerConnections() {
-        for (Iterator<Connection> iter = connections.iterator(); iter.hasNext();) {
-            Connection connection = iter.next();
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected void startProducerBroker() throws Exception {
-        if (producerBroker == null) {
-            producerBroker = createFirstBroker();
-            producerBroker.start();
-        }
-    }
-
-    protected void stopProducerBroker() throws Exception {
-        if (producerBroker != null) {
-            producerBroker.stop();
-            producerBroker = null;
-        }
-    }
-
-    protected void startConsumerBroker() throws Exception {
-        if (consumerBroker == null) {
-            consumerBroker = createSecondBroker();
-            consumerBroker.start();
-        }
-    }
-
-    protected void stopConsumerBroker() throws Exception {
-        if (consumerBroker != null) {
-            consumerBroker.stop();
-            consumerBroker = null;
-        }
-    }
-
-    protected BrokerService createFirstBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/network/reconnect-broker1.xml"));
-    }
-
-    protected BrokerService createSecondBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/network/reconnect-broker2.xml"));
-    }
-
-    protected ActiveMQConnectionFactory createProducerConnectionFactory() {
-        return new ActiveMQConnectionFactory("vm://broker1");
-    }
-
-    protected ActiveMQConnectionFactory createConsumerConnectionFactory() {
-        return new ActiveMQConnectionFactory("vm://broker2");
-    }
-
-    protected String sendMessage() throws JMSException {
-        Connection connection = null;
-        try {
-            connection = producerConnectionFactory.createConnection();
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(destination);
-            Message message = session.createMessage();
-            producer.send(message);
-            return message.getJMSMessageID();
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        Connection connection = consumerConnectionFactory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        return session.createConsumer(destination);
-    }
-
-    protected AtomicInteger createConsumerCounter(ActiveMQConnectionFactory cf) throws Exception {
-        final AtomicInteger rc = new AtomicInteger(0);
-        Connection connection = cf.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        ConsumerEventSource source = new ConsumerEventSource(connection, destination);
-        source.setConsumerListener(new ConsumerListener() {
-            public void onConsumerEvent(ConsumerEvent event) {
-                rc.set(event.getConsumerCount());
-            }
-        });
-        source.start();
-
-        return rc;
-    }
-
-    protected void waitForConsumerToArrive(AtomicInteger consumerCounter) throws InterruptedException {
-        for (int i = 0; i < 100; i++) {
-            if (consumerCounter.get() > 0) {
-                return;
-            }
-            Thread.sleep(100);
-        }
-        fail("The consumer did not arrive.");
-    }
-
-    protected void waitForConsumerToLeave(AtomicInteger consumerCounter) throws InterruptedException {
-        for (int i = 0; i < 100; i++) {
-            if (consumerCounter.get() == 0) {
-                return;
-            }
-            Thread.sleep(100);
-        }
-        fail("The consumer did not leave.");
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.java
deleted file mode 100644
index 7f4d4f4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * 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.network;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TopicConnection;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * Various Tests to show the memory leak suspect in network of brokers. This is
- * for https://issues.apache.org/activemq/browse/AMQ-2530
- * 
- */
-public class NetworkRemovesSubscriptionsTest extends TestCase {
-    private final static String frontEndAddress = "tcp://0.0.0.0:61617";
-    private final static String backEndAddress = "tcp://0.0.0.0:61616";
-    private final static String TOPIC_NAME = "TEST_TOPIC";
-    private BrokerService frontEnd;
-    private BrokerService backEnd;
-    private final ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(frontEndAddress);
-    private final ActiveMQTopic topic = new ActiveMQTopic(TOPIC_NAME);
-
-    public void testWithSessionAndSubsciberClose() throws Exception {
-
-        TopicConnection connection = connectionFactory.createTopicConnection();
-        connection.start();
-
-        for (int i = 0; i < 100; i++) {
-            TopicSession subscriberSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-            TopicSubscriber subscriber = subscriberSession.createSubscriber(topic);
-            DummyMessageListener listener = new DummyMessageListener();
-            subscriber.setMessageListener(listener);
-            subscriber.close();
-            subscriberSession.close();
-        }
-        connection.close();
-        Thread.sleep(1000);
-        Destination dest = backEnd.getRegionBroker().getDestinationMap().get(topic);
-        assertNotNull(dest);
-        assertTrue(dest.getConsumers().isEmpty());
-    }
-
-    public void testWithSessionCloseOutsideTheLoop() throws Exception {
-
-        TopicConnection connection = connectionFactory.createTopicConnection();
-        connection.start();
-        TopicSession subscriberSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        for (int i = 0; i < 100; i++) {
-
-            TopicSubscriber subscriber = subscriberSession.createSubscriber(topic);
-            DummyMessageListener listener = new DummyMessageListener();
-            subscriber.setMessageListener(listener);
-            subscriber.close();
-        }
-        subscriberSession.close();
-        connection.close();
-        Thread.sleep(1000);
-        Destination dest = backEnd.getRegionBroker().getDestinationMap().get(topic);
-        assertNotNull(dest);
-        assertTrue(dest.getConsumers().isEmpty());
-
-    }
-
-    public void testWithOneSubscriber() throws Exception {
-
-        TopicConnection connection = connectionFactory.createTopicConnection();
-        connection.start();
-        TopicSession subscriberSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        TopicSubscriber subscriber = subscriberSession.createSubscriber(topic);
-        DummyMessageListener listener = new DummyMessageListener();
-        subscriber.setMessageListener(listener);
-        subscriber.close();
-        subscriberSession.close();
-        connection.close();
-        Thread.sleep(1000);
-        Destination dest = backEnd.getRegionBroker().getDestinationMap().get(topic);
-        assertNotNull(dest);
-        assertTrue(dest.getConsumers().isEmpty());
-    }
-
-    public void testWithoutSessionAndSubsciberClose() throws Exception {
-
-        TopicConnection connection = connectionFactory.createTopicConnection();
-        connection.start();
-
-        for (int i = 0; i < 100; i++) {
-            TopicSession subscriberSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-            TopicSubscriber subscriber = subscriberSession.createSubscriber(topic);
-        }
-
-        connection.close();
-        Thread.sleep(1000);
-        Destination dest = backEnd.getRegionBroker().getDestinationMap().get(topic);
-        assertNotNull(dest);
-        assertTrue(dest.getConsumers().isEmpty());
-    }
-
-    /**
-     * Running this test you can produce a leak of only 2 ConsumerInfo on BE
-     * broker, NOT 200 as in other cases!
-     * 
-     */
-    public void testWithoutSessionAndSubsciberClosePlayAround() throws Exception {
-
-        TopicConnection connection = connectionFactory.createTopicConnection();
-        connection.start();
-
-        for (int i = 0; i < 100; i++) {
-            TopicSession subscriberSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-            TopicSubscriber subscriber = subscriberSession.createSubscriber(topic);
-            DummyMessageListener listener = new DummyMessageListener();
-            subscriber.setMessageListener(listener);
-            if (i != 50) {
-                subscriber.close();
-                subscriberSession.close();
-            }
-        }
-
-        connection.close();
-        Thread.sleep(1000);
-        Destination dest = backEnd.getRegionBroker().getDestinationMap().get(topic);
-        assertNotNull(dest);
-        assertTrue(dest.getConsumers().isEmpty());
-    }
-
-    class DummyMessageListener implements MessageListener {
-
-        public void onMessage(Message arg0) {
-            // TODO Auto-generated method stub
-
-        }
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        this.backEnd = new BrokerService();
-        this.backEnd.setBrokerName("backEnd");
-        this.backEnd.setPersistent(false);
-        NetworkConnector backEndNetwork = this.backEnd.addNetworkConnector("static://" + frontEndAddress);
-        backEndNetwork.setName("backEndNetwork");
-        backEndNetwork.setDynamicOnly(true);
-        this.backEnd.addConnector(backEndAddress);
-        this.backEnd.start();
-
-        this.frontEnd = new BrokerService();
-        this.frontEnd.setBrokerName("frontEnd");
-        this.frontEnd.setPersistent(false);
-        NetworkConnector frontEndNetwork = this.frontEnd.addNetworkConnector("static://" + backEndAddress);
-        frontEndNetwork.setName("frontEndNetwork");
-        this.frontEnd.addConnector(frontEndAddress);
-        this.frontEnd.start();
-        Thread.sleep(2000);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (this.backEnd != null) {
-            this.backEnd.stop();
-        }
-        if (this.frontEnd != null) {
-            this.frontEnd.stop();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java
deleted file mode 100755
index 4b1c865..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.usage.SystemUsage;
-
-public class NetworkTestSupport extends BrokerTestSupport {
-
-    protected ArrayList connections = new ArrayList();
-
-    protected TransportConnector connector;
-
-    protected PersistenceAdapter remotePersistenceAdapter;
-    protected BrokerService remoteBroker;
-    protected SystemUsage remoteMemoryManager;
-    protected TransportConnector remoteConnector;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        remotePersistenceAdapter = createRemotePersistenceAdapter(true);        
-        remoteBroker = createRemoteBroker(remotePersistenceAdapter);
-        remoteConnector = createRemoteConnector();
-        remoteBroker.addConnector( remoteConnector );
-        BrokerRegistry.getInstance().bind("remotehost", remoteBroker);
-        remoteBroker.start();
-    }
-    
-    
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = BrokerFactory.createBroker(new URI("broker:()/localhost?persistent=false&useJmx=false&"));
-        connector = createConnector();
-        broker.addConnector(connector);
-        return broker;
-    }
-
-
-    /**
-     * @return
-     * @throws Exception
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    protected TransportConnector createRemoteConnector() throws Exception, IOException, URISyntaxException {
-        return new TransportConnector(TransportFactory.bind(new URI(getRemoteURI())));
-    }
-
-    /**
-     * @param value
-     * @return
-     * @throws Exception
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    protected TransportConnector createConnector() throws Exception, IOException, URISyntaxException {
-        return new TransportConnector(TransportFactory.bind(new URI(getLocalURI())));
-    }
-
-    protected String getRemoteURI() {
-        return "vm://remotehost";
-    }
-
-    protected String getLocalURI() {
-        return "vm://localhost";
-    }
-
-    protected PersistenceAdapter createRemotePersistenceAdapter(boolean clean) throws Exception {
-        if (remotePersistenceAdapter == null || clean) {
-            remotePersistenceAdapter = new MemoryPersistenceAdapter();
-        }
-        return remotePersistenceAdapter;
-    }
-
-    protected BrokerService createRemoteBroker(PersistenceAdapter persistenceAdapter) throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setBrokerName("remote");
-        answer.setUseJmx(false);
-        answer.setPersistenceAdapter(persistenceAdapter);
-        return answer;
-    }
-
-    protected StubConnection createConnection() throws Exception {
-        Transport transport = TransportFactory.connect(connector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-    protected StubConnection createRemoteConnection() throws Exception {
-        Transport transport = TransportFactory.connect(remoteConnector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-    protected Transport createTransport() throws Exception {
-        Transport transport = TransportFactory.connect(connector.getServer().getConnectURI());
-        return transport;
-    }
-
-    protected Transport createRemoteTransport() throws Exception {
-        Transport transport = TransportFactory.connect(remoteConnector.getServer().getConnectURI());
-        return transport;
-    }
-
-    /**
-     * Simulates a broker restart. The memory based persistence adapter is
-     * reused so that it does not "loose" it's "persistent" messages.
-     * 
-     * @throws Exception
-     */
-    protected void restartRemoteBroker() throws Exception {
-
-        BrokerRegistry.getInstance().unbind("remotehost");
-        remoteConnector.stop();
-
-        remoteBroker.stop();
-        remotePersistenceAdapter.stop();
-        remotePersistenceAdapter = createRemotePersistenceAdapter(false);
-        remotePersistenceAdapter.start();
-        
-        remoteBroker = createRemoteBroker(remotePersistenceAdapter);
-        remoteBroker.addConnector(getRemoteURI());
-        remoteBroker.start();
-        BrokerRegistry.getInstance().bind("remotehost", remoteBroker);
-    }
-
-    protected void tearDown() throws Exception {
-        for (Iterator iter = connections.iterator(); iter.hasNext();) {
-            StubConnection connection = (StubConnection)iter.next();
-            connection.stop();
-            iter.remove();
-        }
-
-        BrokerRegistry.getInstance().unbind("remotehost");
-        remoteConnector.stop();
-        connector.stop();
-
-        remoteBroker.stop();
-        remoteBroker.waitUntilStopped();
-        remotePersistenceAdapter.stop();
-        super.tearDown();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java
deleted file mode 100644
index 3f50bbb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.network;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Test network reconnects over SSH tunnels. This case can be especially tricky
- * since the SSH tunnels fool the TCP transport into thinking that they are
- * initially connected.
- * 
- * @author chirino
- */
-public class SSHTunnelNetworkReconnectTest extends NetworkReconnectTest {
-    private static final transient Logger LOG = LoggerFactory.getLogger(SSHTunnelNetworkReconnectTest.class);
-
-    ArrayList processes = new ArrayList();
-
-    protected BrokerService createFirstBroker() throws Exception {
-        return BrokerFactory
-            .createBroker(new URI("xbean:org/apache/activemq/network/ssh-reconnect-broker1.xml"));
-    }
-
-    protected BrokerService createSecondBroker() throws Exception {
-        return BrokerFactory
-            .createBroker(new URI("xbean:org/apache/activemq/network/ssh-reconnect-broker2.xml"));
-    }
-
-    protected void setUp() throws Exception {
-        startProcess("ssh -Nn -L60006:localhost:61616 localhost");
-        startProcess("ssh -Nn -L60007:localhost:61617 localhost");
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        for (Iterator iter = processes.iterator(); iter.hasNext();) {
-            Process p = (Process)iter.next();
-            p.destroy();
-        }
-    }
-
-    private void startProcess(String command) throws IOException {
-        final Process process = Runtime.getRuntime().exec(command);
-        processes.add(process);
-        new Thread("stdout: " + command) {
-            public void run() {
-                try {
-                    InputStream is = process.getInputStream();
-                    int c;
-                    while ((c = is.read()) >= 0) {
-                        System.out.write(c);
-                    }
-                } catch (IOException e) {
-                }
-            }
-        }.start();
-        new Thread("stderr: " + command) {
-            public void run() {
-                try {
-                    InputStream is = process.getErrorStream();
-                    int c;
-                    while ((c = is.read()) >= 0) {
-                        System.err.write(c);
-                    }
-                } catch (IOException e) {
-                }
-            }
-        }.start();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
deleted file mode 100755
index b56c86b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- * 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.network;
-
-import java.net.URI;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.TopicRequestor;
-import javax.jms.TopicSession;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-public class SimpleNetworkTest extends TestCase {
-
-    protected static final int MESSAGE_COUNT = 10;
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleNetworkTest.class);
-
-    protected AbstractApplicationContext context;
-    protected Connection localConnection;
-    protected Connection remoteConnection;
-    protected BrokerService localBroker;
-    protected BrokerService remoteBroker;
-    protected Session localSession;
-    protected Session remoteSession;
-    protected ActiveMQTopic included;
-    protected ActiveMQTopic excluded;
-    protected String consumerName = "durableSubs";
-
-    public void testRequestReply() throws Exception {
-        final MessageProducer remoteProducer = remoteSession.createProducer(null);
-        MessageConsumer remoteConsumer = remoteSession.createConsumer(included);
-        remoteConsumer.setMessageListener(new MessageListener() {
-            public void onMessage(Message msg) {
-                try {
-                    TextMessage textMsg = (TextMessage)msg;
-                    String payload = "REPLY: " + textMsg.getText();
-                    Destination replyTo;
-                    replyTo = msg.getJMSReplyTo();
-                    textMsg.clearBody();
-                    textMsg.setText(payload);
-                    remoteProducer.send(replyTo, textMsg);
-                } catch (JMSException e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        TopicRequestor requestor = new TopicRequestor((TopicSession)localSession, included);
-        // allow for consumer infos to perculate arround
-        Thread.sleep(5000);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            TextMessage msg = localSession.createTextMessage("test msg: " + i);
-            TextMessage result = (TextMessage)requestor.request(msg);
-            assertNotNull(result);
-            LOG.info(result.getText());
-        }
-    }
-
-    public void testFiltering() throws Exception {
-
-        MessageConsumer includedConsumer = remoteSession.createConsumer(included);
-        MessageConsumer excludedConsumer = remoteSession.createConsumer(excluded);
-        MessageProducer includedProducer = localSession.createProducer(included);
-        MessageProducer excludedProducer = localSession.createProducer(excluded);
-        // allow for consumer infos to perculate arround
-        Thread.sleep(2000);
-        Message test = localSession.createTextMessage("test");
-        includedProducer.send(test);
-        excludedProducer.send(test);
-        assertNull(excludedConsumer.receive(1000));
-        assertNotNull(includedConsumer.receive(1000));
-    }
-
-    public void testConduitBridge() throws Exception {
-        MessageConsumer consumer1 = remoteSession.createConsumer(included);
-        MessageConsumer consumer2 = remoteSession.createConsumer(included);
-        MessageProducer producer = localSession.createProducer(included);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        Thread.sleep(2000);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            Message test = localSession.createTextMessage("test-" + i);
-            producer.send(test);
-            assertNotNull(consumer1.receive(1000));
-            assertNotNull(consumer2.receive(1000));
-        }
-        // ensure no more messages received
-        assertNull(consumer1.receive(1000));
-        assertNull(consumer2.receive(1000));
-    }
-
-    public void testDurableStoreAndForward() throws Exception {
-        // create a remote durable consumer
-        MessageConsumer remoteConsumer = remoteSession.createDurableSubscriber(included, consumerName);
-        Thread.sleep(1000);
-        // now close everything down and restart
-        doTearDown();
-        doSetUp();
-        MessageProducer producer = localSession.createProducer(included);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            Message test = localSession.createTextMessage("test-" + i);
-            producer.send(test);
-        }
-        Thread.sleep(1000);
-        // close everything down and restart
-        doTearDown();
-        doSetUp();
-        remoteConsumer = remoteSession.createDurableSubscriber(included, consumerName);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            assertNotNull("message count: " + i, remoteConsumer.receive(2500));
-        }
-    }
-
-    public void testDurableStoreAndForwardReconnect() throws Exception {
-        // create a local durable consumer
-        MessageConsumer localConsumer = localSession.createDurableSubscriber(included, consumerName);
-        Thread.sleep(1000);
-        // now close everything down and restart
-        doTearDown();
-        doSetUp();
-        // send messages
-        MessageProducer producer = localSession.createProducer(included);
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            Message test = localSession.createTextMessage("test-" + i);
-            producer.send(test);
-        }
-        Thread.sleep(1000);
-        // consume some messages locally
-        localConsumer = localSession.createDurableSubscriber(included, consumerName);
-        for (int i = 0; i < MESSAGE_COUNT / 2; i++) {
-            assertNotNull("message count: " + i, localConsumer.receive(2500));
-        }
-        Thread.sleep(1000);
-        // close everything down and restart
-        doTearDown();
-        doSetUp();
-        // consume the rest remotely
-        MessageConsumer remoteConsumer = remoteSession.createDurableSubscriber(included, consumerName);
-        for (int i = 0; i < MESSAGE_COUNT / 2; i++) {
-            assertNotNull("message count: " + i, remoteConsumer.receive(2500));
-        }
-    }    
-    
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        doSetUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        localBroker.deleteAllMessages();
-        remoteBroker.deleteAllMessages();
-        doTearDown();
-        super.tearDown();
-    }
-
-    protected void doTearDown() throws Exception {
-        localConnection.close();
-        remoteConnection.close();
-        localBroker.stop();
-        remoteBroker.stop();
-    }
-
-    protected void doSetUp() throws Exception {
-        remoteBroker = createRemoteBroker();
-        remoteBroker.start();
-        localBroker = createLocalBroker();
-        localBroker.start();
-        URI localURI = localBroker.getVmConnectorURI();
-        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory(localURI);
-        fac.setAlwaysSyncSend(true);
-        fac.setDispatchAsync(false);
-        localConnection = fac.createConnection();
-        localConnection.setClientID("local");
-        localConnection.start();
-        URI remoteURI = remoteBroker.getVmConnectorURI();
-        fac = new ActiveMQConnectionFactory(remoteURI);
-        remoteConnection = fac.createConnection();
-        remoteConnection.setClientID("remote");
-        remoteConnection.start();
-        included = new ActiveMQTopic("include.test.bar");
-        excluded = new ActiveMQTopic("exclude.test.bar");
-        localSession = localConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        remoteSession = remoteConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    protected String getRemoteBrokerURI() {
-        return "org/apache/activemq/network/remoteBroker.xml";
-    }
-
-    protected String getLocalBrokerURI() {
-        return "org/apache/activemq/network/localBroker.xml";
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        Resource resource = new ClassPathResource(uri);
-        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
-        resource = new ClassPathResource(uri);
-        factory = new BrokerFactoryBean(resource);
-        factory.afterPropertiesSet();
-        BrokerService result = factory.getBroker();
-        return result;
-    }
-
-    protected BrokerService createLocalBroker() throws Exception {
-        return createBroker(getLocalBrokerURI());
-    }
-
-    protected BrokerService createRemoteBroker() throws Exception {
-        return createBroker(getRemoteBrokerURI());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
deleted file mode 100755
index 2ae9e61..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueRequestor;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class QueueBridgeTest extends TestCase implements MessageListener {
-
-    protected static final int MESSAGE_COUNT = 10;
-    private static final Logger LOG = LoggerFactory.getLogger(QueueBridgeTest.class);
-
-    protected AbstractApplicationContext context;
-    protected QueueConnection localConnection;
-    protected QueueConnection remoteConnection;
-    protected QueueRequestor requestor;
-    protected QueueSession requestServerSession;
-    protected MessageConsumer requestServerConsumer;
-    protected MessageProducer requestServerProducer;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        context = createApplicationContext();
-
-        createConnections();
-
-        requestServerSession = localConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue theQueue = requestServerSession.createQueue(getClass().getName());
-        requestServerConsumer = requestServerSession.createConsumer(theQueue);
-        requestServerConsumer.setMessageListener(this);
-        requestServerProducer = requestServerSession.createProducer(null);
-
-        QueueSession session = remoteConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-        requestor = new QueueRequestor(session, theQueue);
-    }
-
-    protected void createConnections() throws JMSException {
-        ActiveMQConnectionFactory fac = (ActiveMQConnectionFactory)context.getBean("localFactory");
-        localConnection = fac.createQueueConnection();
-        localConnection.start();
-
-        fac = (ActiveMQConnectionFactory)context.getBean("remoteFactory");
-        remoteConnection = fac.createQueueConnection();
-        remoteConnection.start();
-    }
-
-    protected AbstractApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/queue-config.xml");
-    }
-
-    protected void tearDown() throws Exception {
-        localConnection.close();
-        super.tearDown();
-    }
-
-    public void testQueueRequestorOverBridge() throws JMSException {
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            TextMessage msg = requestServerSession.createTextMessage("test msg: " + i);
-            TextMessage result = (TextMessage)requestor.request(msg);
-            assertNotNull(result);
-            LOG.info(result.getText());
-        }
-    }
-
-    public void onMessage(Message msg) {
-        try {
-            TextMessage textMsg = (TextMessage)msg;
-            String payload = "REPLY: " + textMsg.getText();
-            Destination replyTo;
-            replyTo = msg.getJMSReplyTo();
-            textMsg.clearBody();
-            textMsg.setText(payload);
-            requestServerProducer.send(replyTo, textMsg);
-        } catch (JMSException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeXBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeXBeanTest.java
deleted file mode 100644
index c75747d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeXBeanTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.network.jms;
-
-import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
-import org.springframework.context.support.AbstractApplicationContext;
-
-
-/**
- *
- * 
- */
-public class QueueBridgeXBeanTest extends QueueBridgeTest {
-
-    protected AbstractApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/queue-xbean.xml");
-    }
-
-    /*
-    protected void createConnections() throws JMSException {
-        ActiveMQConnectionFactory fac = (ActiveMQConnectionFactory) context.getBean("localFactory");
-        localConnection = fac.createQueueConnection();
-        localConnection.start();
-        
-        fac = (ActiveMQConnectionFactory) context.getBean("remoteFactory");
-        remoteConnection = fac.createQueueConnection();
-        remoteConnection.start();
-    }
-    */
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
deleted file mode 100755
index fc9e744..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.network.jms;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicRequestor;
-import javax.jms.TopicSession;
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class TopicBridgeSpringTest extends TestCase implements MessageListener {
-
-    protected static final int MESSAGE_COUNT = 10;
-    private static final Logger LOG = LoggerFactory.getLogger(TopicBridgeSpringTest.class);
-
-    protected AbstractApplicationContext context;
-    protected TopicConnection localConnection;
-    protected TopicConnection remoteConnection;
-    protected TopicRequestor requestor;
-    protected TopicSession requestServerSession;
-    protected MessageConsumer requestServerConsumer;
-    protected MessageProducer requestServerProducer;
-
-    protected void setUp() throws Exception {
-
-        super.setUp();
-        context = createApplicationContext();
-        ActiveMQConnectionFactory fac = (ActiveMQConnectionFactory)context.getBean("localFactory");
-        localConnection = fac.createTopicConnection();
-        localConnection.start();
-        requestServerSession = localConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic theTopic = requestServerSession.createTopic(getClass().getName());
-        requestServerConsumer = requestServerSession.createConsumer(theTopic);
-        requestServerConsumer.setMessageListener(this);
-        requestServerProducer = requestServerSession.createProducer(null);
-
-        fac = (ActiveMQConnectionFactory)context.getBean("remoteFactory");
-        remoteConnection = fac.createTopicConnection();
-        remoteConnection.start();
-        TopicSession session = remoteConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        requestor = new TopicRequestor(session, theTopic);
-    }
-
-    protected AbstractApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/topic-spring.xml");
-    }
-
-    protected void tearDown() throws Exception {
-        localConnection.close();
-        super.tearDown();
-    }
-
-    public void testTopicRequestorOverBridge() throws JMSException {
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            TextMessage msg = requestServerSession.createTextMessage("test msg: " + i);
-            LOG.info("Making request: " + msg);
-            TextMessage result = (TextMessage)requestor.request(msg);
-            assertNotNull(result);
-            LOG.info("Received result: " + result.getText());
-        }
-    }
-
-    public void onMessage(Message msg) {
-        try {
-            TextMessage textMsg = (TextMessage)msg;
-            String payload = "REPLY: " + textMsg.getText();
-            Destination replyTo;
-            replyTo = msg.getJMSReplyTo();
-            textMsg.clearBody();
-            textMsg.setText(payload);
-            LOG.info("Sending response: " + textMsg);
-            requestServerProducer.send(replyTo, textMsg);
-        } catch (JMSException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeXBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeXBeanTest.java
deleted file mode 100644
index 0b070f2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeXBeanTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.network.jms;
-
-import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
-import org.springframework.context.support.AbstractApplicationContext;
-
-/**
- * 
- * 
- */
-public class TopicBridgeXBeanTest extends TopicBridgeSpringTest {
-
-    protected AbstractApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/topic-config.xml");
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/BooleanStreamTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/BooleanStreamTest.java
deleted file mode 100644
index fa6d7db..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/BooleanStreamTest.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.openwire;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-
-/**
- * 
- */
-public class BooleanStreamTest extends TestCase {
-
-    protected OpenWireFormat openWireformat;
-    protected int endOfStreamMarker = 0x12345678;
-    int numberOfBytes = 8 * 200;
-
-    interface BooleanValueSet {
-        boolean getBooleanValueFor(int index, int count);
-    }
-
-    public void testBooleanMarshallingUsingAllTrue() throws Exception {
-        testBooleanStream(numberOfBytes, new BooleanValueSet() {
-            public boolean getBooleanValueFor(int index, int count) {
-                return true;
-            }
-        });
-    }
-
-    public void testBooleanMarshallingUsingAllFalse() throws Exception {
-        testBooleanStream(numberOfBytes, new BooleanValueSet() {
-            public boolean getBooleanValueFor(int index, int count) {
-                return false;
-            }
-        });
-    }
-
-    public void testBooleanMarshallingUsingOddAlternateTrueFalse() throws Exception {
-        testBooleanStream(numberOfBytes, new BooleanValueSet() {
-            public boolean getBooleanValueFor(int index, int count) {
-                return (index & 1) == 0;
-            }
-        });
-    }
-
-    public void testBooleanMarshallingUsingEvenAlternateTrueFalse() throws Exception {
-        testBooleanStream(numberOfBytes, new BooleanValueSet() {
-            public boolean getBooleanValueFor(int index, int count) {
-                return (index & 1) != 0;
-            }
-        });
-    }
-
-    protected void testBooleanStream(int numberOfBytes, BooleanValueSet valueSet) throws Exception {
-        for (int i = 0; i < numberOfBytes; i++) {
-            try {
-                assertMarshalBooleans(i, valueSet);
-            } catch (Throwable e) {
-                throw (AssertionFailedError)new AssertionFailedError("Iteration failed at: " + i).initCause(e);
-            }
-        }
-    }
-
-    protected void assertMarshalBooleans(int count, BooleanValueSet valueSet) throws Exception {
-        BooleanStream bs = new BooleanStream();
-        for (int i = 0; i < count; i++) {
-            bs.writeBoolean(valueSet.getBooleanValueFor(i, count));
-        }
-        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        DataOutputStream ds = new DataOutputStream(buffer);
-        bs.marshal(ds);
-        ds.writeInt(endOfStreamMarker);
-
-        // now lets read from the stream
-        ds.close();
-
-        ByteArrayInputStream in = new ByteArrayInputStream(buffer.toByteArray());
-        DataInputStream dis = new DataInputStream(in);
-        bs = new BooleanStream();
-        try {
-            bs.unmarshal(dis);
-        } catch (Exception e) {
-            e.printStackTrace();
-            fail("Failed to unmarshal: " + count + " booleans: " + e);
-        }
-
-        for (int i = 0; i < count; i++) {
-            boolean expected = valueSet.getBooleanValueFor(i, count);
-            // /System.out.println("Unmarshaling value: " + i + " = " + expected
-            // + " out of: " + count);
-
-            try {
-                boolean actual = bs.readBoolean();
-                assertEquals("value of object: " + i + " was: " + actual, expected, actual);
-            } catch (IOException e) {
-                e.printStackTrace();
-                fail("Failed to parse boolean: " + i + " out of: " + count + " due to: " + e);
-            }
-        }
-        int marker = dis.readInt();
-        assertEquals("Marker int when unmarshalling: " + count + " booleans", Integer.toHexString(endOfStreamMarker), Integer.toHexString(marker));
-
-        // lets try read and we should get an exception
-        try {
-            byte value = dis.readByte();
-            fail("Should have reached the end of the stream");
-        } catch (IOException e) {
-            // worked!
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        openWireformat = createOpenWireFormat();
-    }
-
-    protected OpenWireFormat createOpenWireFormat() {
-        OpenWireFormat wf = new OpenWireFormat();
-        wf.setCacheEnabled(true);
-        wf.setStackTraceEnabled(false);
-        wf.setVersion(1);
-        return wf;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/BrokerInfoData.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/BrokerInfoData.java
deleted file mode 100644
index baba584..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/BrokerInfoData.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.openwire;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-
-public class BrokerInfoData extends DataFileGenerator {
-
-    protected Object createObject() {
-        BrokerInfo rc = new BrokerInfo();
-        rc.setResponseRequired(false);
-        rc.setBrokerName("localhost");
-        rc.setBrokerURL("tcp://localhost:61616");
-        rc.setBrokerId(new BrokerId("ID:1289012830123"));
-        rc.setCommandId((short) 12);
-        rc.setResponseRequired(false);
-        return rc;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java
deleted file mode 100644
index fe56a07..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.openwire;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import junit.framework.Assert;
-
-public abstract class DataFileGenerator extends Assert {
-
-    static final File MODULE_BASE_DIR;
-    static final File CONTROL_DIR;
-    static final File CLASS_FILE_DIR;
-
-    static {
-        MODULE_BASE_DIR = new File(System.getProperty("basedir", "."));
-        CONTROL_DIR = new File(MODULE_BASE_DIR, "src/test/resources/openwire-control");
-        CLASS_FILE_DIR = new File(MODULE_BASE_DIR, "src/test/java/org/apache/activemq/openwire");
-    }
-
-    public static void main(String[] args) throws Exception {
-        generateControlFiles();
-    }
-
-    /**
-     * @param srcdir
-     * @return
-     * @throws ClassNotFoundException
-     * @throws InstantiationException
-     * @throws IllegalAccessException
-     */
-    public static ArrayList getAllDataFileGenerators() throws Exception {
-        // System.out.println("Looking for generators in : "+classFileDir);
-        ArrayList l = new ArrayList();
-        File[] files = CLASS_FILE_DIR.listFiles();
-        for (int i = 0; files != null && i < files.length; i++) {
-            File file = files[i];
-            if (file.getName().endsWith("Data.java")) {
-                String cn = file.getName();
-                cn = cn.substring(0, cn.length() - ".java".length());
-                Class clazz = DataFileGenerator.class.getClassLoader().loadClass("org.apache.activemq.openwire." + cn);
-                l.add((DataFileGenerator)clazz.newInstance());
-            }
-        }
-        return l;
-    }
-
-    private static void generateControlFiles() throws Exception {
-        ArrayList generators = getAllDataFileGenerators();
-        for (Iterator iter = generators.iterator(); iter.hasNext();) {
-            DataFileGenerator object = (DataFileGenerator)iter.next();
-            try {
-                // System.out.println("Processing: "+object.getClass());
-                object.generateControlFile();
-            } catch (Exception e) {
-                // System.err.println("Error while processing:
-                // "+object.getClass() + ". Reason: " + e);
-            }
-        }
-    }
-
-    public void generateControlFile() throws Exception {
-        CONTROL_DIR.mkdirs();
-        File dataFile = new File(CONTROL_DIR, getClass().getName() + ".bin");
-
-        OpenWireFormat wf = new OpenWireFormat();
-        wf.setCacheEnabled(false);
-        wf.setStackTraceEnabled(false);
-        wf.setVersion(1);
-
-        FileOutputStream os = new FileOutputStream(dataFile);
-        DataOutputStream ds = new DataOutputStream(os);
-        wf.marshal(createObject(), ds);
-        ds.close();
-    }
-
-    public InputStream generateInputStream() throws Exception {
-        OpenWireFormat wf = new OpenWireFormat();
-        wf.setCacheEnabled(false);
-        wf.setStackTraceEnabled(false);
-        wf.setVersion(1);
-
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
-        DataOutputStream ds = new DataOutputStream(os);
-        wf.marshal(createObject(), ds);
-        ds.close();
-
-        return new ByteArrayInputStream(os.toByteArray());
-    }
-
-    public static void assertAllControlFileAreEqual() throws Exception {
-        ArrayList generators = getAllDataFileGenerators();
-        for (Iterator iter = generators.iterator(); iter.hasNext();) {
-            DataFileGenerator object = (DataFileGenerator)iter.next();
-            // System.out.println("Processing: "+object.getClass());
-            object.assertControlFileIsEqual();
-        }
-    }
-
-    public void assertControlFileIsEqual() throws Exception {
-        File dataFile = new File(CONTROL_DIR, getClass().getName() + ".bin");
-        FileInputStream is1 = new FileInputStream(dataFile);
-        int pos = 0;
-        try {
-            InputStream is2 = generateInputStream();
-            int a = is1.read();
-            int b = is2.read();
-            pos++;
-            assertEquals("Data does not match control file: " + dataFile + " at byte position " + pos, a, b);
-            while (a >= 0 && b >= 0) {
-                a = is1.read();
-                b = is2.read();
-                pos++;
-                assertEquals(a, b);
-            }
-            is2.close();
-        } finally {
-            is1.close();
-        }
-    }
-
-    protected abstract Object createObject() throws IOException;
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
deleted file mode 100644
index 8502492..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/**
- * 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.openwire;
-
-import java.beans.BeanInfo;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.LocalTransactionId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.openwire.v1.ActiveMQTextMessageTest;
-import org.apache.activemq.openwire.v1.BrokerInfoTest;
-import org.apache.activemq.openwire.v1.MessageAckTest;
-import org.apache.activemq.test.TestSupport;
-import org.apache.activemq.util.ByteSequence;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class DataFileGeneratorTestSupport extends TestSupport {
-
-    protected static final Object[] EMPTY_ARGUMENTS = {};
-    private static final Logger LOG = LoggerFactory.getLogger(DataFileGeneratorTestSupport.class);
-
-    private static final Throwable SINGLETON_EXCEPTION = new Exception("shared exception");
-    private static final File MODULE_BASE_DIR;
-    private static final File CONTROL_DIR;
-
-
-    static {
-        File basedir = null;
-        try {
-            URL resource = DataFileGeneratorTestSupport.class.getResource("DataFileGeneratorTestSupport.class");
-            URI baseURI = new URI(resource.toString()).resolve("../../../../..");
-            basedir = new File(baseURI).getCanonicalFile();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        MODULE_BASE_DIR = basedir;
-        CONTROL_DIR = new File(MODULE_BASE_DIR, "src/test/resources/openwire-control");
-    }
-
-    private int counter;
-    private OpenWireFormat openWireformat;
-
-    public void xtestControlFileIsValid() throws Exception {
-        generateControlFile();
-        assertControlFileIsEqual();
-    }
-
-    public void testGenerateAndReParsingIsTheSame() throws Exception {
-        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        DataOutputStream ds = new DataOutputStream(buffer);
-        Object expected = createObject();
-        LOG.info("Created: " + expected);
-        openWireformat.marshal(expected, ds);
-        ds.close();
-
-        // now lets try parse it back again
-        ByteArrayInputStream in = new ByteArrayInputStream(buffer.toByteArray());
-        DataInputStream dis = new DataInputStream(in);
-        Object actual = openWireformat.unmarshal(dis);
-        assertBeansEqual("", new HashSet<Object>(), expected, actual);
-
-        LOG.info("Parsed: " + actual);
-    }
-
-    protected void assertBeansEqual(String message, Set<Object> comparedObjects, Object expected, Object actual) throws Exception {
-        assertNotNull("Actual object should be equal to: " + expected + " but was null", actual);
-        if (comparedObjects.contains(expected)) {
-            return;
-        }
-        comparedObjects.add(expected);
-        Class<? extends Object> type = expected.getClass();
-        assertEquals("Should be of same type", type, actual.getClass());
-        BeanInfo beanInfo = Introspector.getBeanInfo(type);
-        PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
-        for (int i = 0; i < descriptors.length; i++) {
-            PropertyDescriptor descriptor = descriptors[i];
-            Method method = descriptor.getReadMethod();
-            if (method != null) {
-                String name = descriptor.getName();
-                Object expectedValue = null;
-                Object actualValue = null;
-                try {
-                    expectedValue = method.invoke(expected, EMPTY_ARGUMENTS);
-                    actualValue = method.invoke(actual, EMPTY_ARGUMENTS);
-                } catch (Exception e) {
-                    LOG.info("Failed to access property: " + name);
-                }
-                assertPropertyValuesEqual(message + name, comparedObjects, expectedValue, actualValue);
-            }
-        }
-    }
-
-    protected void assertPropertyValuesEqual(String name, Set<Object> comparedObjects, Object expectedValue, Object actualValue) throws Exception {
-        String message = "Property " + name + " not equal";
-        if (expectedValue == null) {
-            assertNull("Property " + name + " should be null", actualValue);
-        } else if (expectedValue instanceof Object[]) {
-            assertArrayEqual(message, comparedObjects, (Object[])expectedValue, (Object[])actualValue);
-        } else if (expectedValue.getClass().isArray()) {
-            assertPrimitiveArrayEqual(message, comparedObjects, expectedValue, actualValue);
-        } else {
-            if (expectedValue instanceof Exception) {
-                assertExceptionsEqual(message, (Exception)expectedValue, actualValue);
-            } else if (expectedValue instanceof ByteSequence) {
-                assertByteSequencesEqual(message, (ByteSequence)expectedValue, actualValue);
-            } else if (expectedValue instanceof DataStructure) {
-                assertBeansEqual(message + name, comparedObjects, expectedValue, actualValue);
-            } else if (expectedValue instanceof Enumeration) {
-            	assertEnumerationEqual(message + name, comparedObjects, (Enumeration)expectedValue, (Enumeration)actualValue);
-            } else {
-                assertEquals(message, expectedValue, actualValue);
-            }
-
-        }
-    }
-
-    protected void assertArrayEqual(String message, Set<Object> comparedObjects, Object[] expected, Object[] actual) throws Exception {
-        assertEquals(message + ". Array length", expected.length, actual.length);
-        for (int i = 0; i < expected.length; i++) {
-            assertPropertyValuesEqual(message + ". element: " + i, comparedObjects, expected[i], actual[i]);
-        }
-    }
-    
-    protected void assertEnumerationEqual(String message, Set<Object> comparedObjects, Enumeration expected, Enumeration actual) throws Exception {
-        while (expected.hasMoreElements()) {
-        	Object expectedElem = expected.nextElement();
-        	Object actualElem = actual.nextElement();
-        	assertPropertyValuesEqual(message + ". element: " + expectedElem, comparedObjects, expectedElem, actualElem);
-        }
-    }
-
-    protected void assertPrimitiveArrayEqual(String message, Set<Object> comparedObjects, Object expected, Object actual) throws ArrayIndexOutOfBoundsException, IllegalArgumentException,
-        Exception {
-        int length = Array.getLength(expected);
-        assertEquals(message + ". Array length", length, Array.getLength(actual));
-        for (int i = 0; i < length; i++) {
-            assertPropertyValuesEqual(message + ". element: " + i, comparedObjects, Array.get(expected, i), Array.get(actual, i));
-        }
-    }
-
-    protected void assertByteSequencesEqual(String message, ByteSequence expected, Object actualValue) {
-        assertTrue(message + ". Actual value should be a ByteSequence but was: " + actualValue, actualValue instanceof ByteSequence);
-        ByteSequence actual = (ByteSequence)actualValue;
-        int length = expected.getLength();
-        assertEquals(message + ". Length", length, actual.getLength());
-        int offset = expected.getOffset();
-        assertEquals(message + ". Offset", offset, actual.getOffset());
-        byte[] data = expected.getData();
-        byte[] actualData = actual.getData();
-        for (int i = 0; i < length; i++) {
-            assertEquals(message + ". Offset " + i, data[offset + i], actualData[offset + i]);
-        }
-    }
-
-    protected void assertExceptionsEqual(String message, Exception expected, Object actualValue) {
-        assertTrue(message + ". Actual value should be an exception but was: " + actualValue, actualValue instanceof Exception);
-        Exception actual = (Exception)actualValue;
-        assertEquals(message, expected.getMessage(), actual.getMessage());
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        openWireformat = createOpenWireFormat();
-    }
-
-    public void generateControlFile() throws Exception {
-        CONTROL_DIR.mkdirs();
-        File dataFile = new File(CONTROL_DIR, getClass().getName() + ".bin");
-
-        FileOutputStream os = new FileOutputStream(dataFile);
-        DataOutputStream ds = new DataOutputStream(os);
-        openWireformat.marshal(createObject(), ds);
-        ds.close();
-    }
-
-    public InputStream generateInputStream() throws Exception {
-
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
-        DataOutputStream ds = new DataOutputStream(os);
-        openWireformat.marshal(createObject(), ds);
-        ds.close();
-
-        return new ByteArrayInputStream(os.toByteArray());
-    }
-
-    public void assertControlFileIsEqual() throws Exception {
-        File dataFile = new File(CONTROL_DIR, getClass().getName() + ".bin");
-        FileInputStream is1 = new FileInputStream(dataFile);
-        int pos = 0;
-        try {
-            InputStream is2 = generateInputStream();
-            int a = is1.read();
-            int b = is2.read();
-            pos++;
-            assertEquals("Data does not match control file: " + dataFile + " at byte position " + pos, a, b);
-            while (a >= 0 && b >= 0) {
-                a = is1.read();
-                b = is2.read();
-                pos++;
-                assertEquals("Data does not match control file: " + dataFile + " at byte position " + pos, a, b);
-            }
-            is2.close();
-        } finally {
-            is1.close();
-        }
-    }
-
-    protected abstract Object createObject() throws Exception;
-
-    protected void populateObject(Object info) throws Exception {
-        // empty method to allow derived classes to call super
-        // to simplify generated code
-    }
-
-    protected OpenWireFormat createOpenWireFormat() {
-        OpenWireFormat wf = new OpenWireFormat();
-        wf.setCacheEnabled(true);
-        wf.setStackTraceEnabled(false);
-        wf.setVersion(OpenWireFormat.DEFAULT_VERSION);
-        return wf;
-    }
-
-    protected BrokerId createBrokerId(String text) {
-        return new BrokerId(text);
-    }
-
-    protected TransactionId createTransactionId(String string) {
-        return new LocalTransactionId(createConnectionId(string), ++counter);
-    }
-
-    protected ConnectionId createConnectionId(String string) {
-        return new ConnectionId(string);
-    }
-
-    protected SessionId createSessionId(String string) {
-        return new SessionId(createConnectionId(string), ++counter);
-    }
-
-    protected ProducerId createProducerId(String string) {
-        return new ProducerId(createSessionId(string), ++counter);
-    }
-
-    protected ConsumerId createConsumerId(String string) {
-        return new ConsumerId(createSessionId(string), ++counter);
-    }
-
-    protected MessageId createMessageId(String string) {
-        return new MessageId(createProducerId(string), ++counter);
-    }
-
-    protected ActiveMQDestination createActiveMQDestination(String string) {
-        return new ActiveMQQueue(string);
-    }
-
-    protected Message createMessage(String string) throws Exception {
-        ActiveMQTextMessage message = (ActiveMQTextMessage)ActiveMQTextMessageTest.SINGLETON.createObject();
-        message.setText(string);
-        return message;
-    }
-
-    protected BrokerInfo createBrokerInfo(String string) throws Exception {
-        return (BrokerInfo)BrokerInfoTest.SINGLETON.createObject();
-    }
-
-    protected MessageAck createMessageAck(String string) throws Exception {
-        return (MessageAck)MessageAckTest.SINGLETON.createObject();
-    }
-
-    protected DataStructure createDataStructure(String string) throws Exception {
-        return createBrokerInfo(string);
-    }
-
-    protected Throwable createThrowable(String string) {
-        // we have issues with stack frames not being equal so share the same
-        // exception each time
-        return SINGLETON_EXCEPTION;
-    }
-
-    protected BooleanExpression createBooleanExpression(String string) {
-        return new NetworkBridgeFilter(new BrokerId(string), 10);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/ItStillMarshallsTheSameTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/ItStillMarshallsTheSameTest.java
deleted file mode 100644
index 8372f59..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/ItStillMarshallsTheSameTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.openwire;
-
-import junit.framework.TestCase;
-
-public class ItStillMarshallsTheSameTest extends TestCase {
-
-    public void testAll() throws Exception {
-        BrokerInfoData.assertAllControlFileAreEqual();
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java
deleted file mode 100644
index b70687d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.openwire;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.SessionId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class NumberRangesWhileMarshallingTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(NumberRangesWhileMarshallingTest.class);
-
-    protected String connectionId = "Cheese";
-    protected ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-    protected DataOutputStream ds = new DataOutputStream(buffer);
-    protected OpenWireFormat openWireformat;
-    protected int endOfStreamMarker = 0x12345678;
-
-    public void testLongNumberRanges() throws Exception {
-        long[] numberValues = {
-            // bytes
-            0, 1, 0x7e, 0x7f, 0x80, 0x81, 0xf0, 0xff,
-            // shorts
-            0x7eff, 0x7fffL, 0x8001L, 0x8000L, 0xe000L, 0xe0001L, 0xff00L, 0xffffL,
-            // ints
-            0x10000L, 0x700000L, 0x12345678L, 0x72345678L, 0x7fffffffL, 0x80000000L, 0x80000001L, 0xE0000001L, 0xFFFFFFFFL,
-            // 3 byte longs
-            0x123456781L, 0x1234567812L, 0x12345678123L, 0x123456781234L, 0x1234567812345L, 0x12345678123456L, 0x7e345678123456L, 0x7fffffffffffffL,
-            0x80000000000000L, 0x80000000000001L, 0xe0000000000001L, 0xffffffffffffffL,
-            // 4 byte longs
-            0x1234567812345678L, 0x7fffffffffffffffL, 0x8000000000000000L, 0x8000000000000001L, 0xe000000000000001L, 0xffffffffffffffffL, 1
-        };
-
-        for (int i = 0; i < numberValues.length; i++) {
-            long value = numberValues[i];
-
-            SessionId object = new SessionId();
-            object.setConnectionId(connectionId);
-            object.setValue(value);
-            writeObject(object);
-        }
-        ds.writeInt(endOfStreamMarker);
-
-        // now lets read from the stream
-        ds.close();
-
-        ByteArrayInputStream in = new ByteArrayInputStream(buffer.toByteArray());
-        DataInputStream dis = new DataInputStream(in);
-        for (int i = 0; i < numberValues.length; i++) {
-            long value = numberValues[i];
-            String expected = Long.toHexString(value);
-            LOG.info("Unmarshaling value: " + i + " = " + expected);
-
-            SessionId command = (SessionId)openWireformat.unmarshal(dis);
-            assertEquals("connection ID in object: " + i, connectionId, command.getConnectionId());
-            String actual = Long.toHexString(command.getValue());
-            assertEquals("value of object: " + i + " was: " + actual, expected, actual);
-        }
-        int marker = dis.readInt();
-        assertEquals("Marker int", Integer.toHexString(endOfStreamMarker), Integer.toHexString(marker));
-
-        // lets try read and we should get an exception
-        try {
-            byte value = dis.readByte();
-            fail("Should have reached the end of the stream");
-        } catch (IOException e) {
-            // worked!
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        openWireformat = createOpenWireFormat();
-    }
-
-    protected OpenWireFormat createOpenWireFormat() {
-        OpenWireFormat wf = new OpenWireFormat();
-        wf.setCacheEnabled(true);
-        wf.setStackTraceEnabled(false);
-        wf.setVersion(1);
-        return wf;
-    }
-
-    private void writeObject(Object object) throws IOException {
-        openWireformat.marshal(object, ds);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/WireFormatInfoData.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/WireFormatInfoData.java
deleted file mode 100644
index 208a6ed..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/WireFormatInfoData.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.openwire;
-
-import java.io.IOException;
-
-import org.apache.activemq.command.WireFormatInfo;
-
-public class WireFormatInfoData extends DataFileGenerator {
-
-    protected Object createObject() throws IOException {
-        WireFormatInfo rc = new WireFormatInfo();
-        rc.setResponseRequired(false);
-        rc.setCacheEnabled(true);
-        rc.setVersion(1);
-        return rc;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java
deleted file mode 100644
index a6a649c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQBytesMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQBytesMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQBytesMessageTest SINGLETON = new ActiveMQBytesMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQBytesMessage info = new ActiveMQBytesMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQBytesMessage info = (ActiveMQBytesMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java
deleted file mode 100644
index bfa4aed..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQDestination
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class ActiveMQDestinationTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQDestination info = (ActiveMQDestination)object;
-        info.setPhysicalName("PhysicalName:1");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java
deleted file mode 100644
index 2a09154..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQMapMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQMapMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQMapMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQMapMessageTest SINGLETON = new ActiveMQMapMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQMapMessage info = new ActiveMQMapMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQMapMessage info = (ActiveMQMapMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java
deleted file mode 100644
index 79f2520..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQMessageTest extends MessageTestSupport {
-
-    public static final ActiveMQMessageTest SINGLETON = new ActiveMQMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQMessage info = new ActiveMQMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQMessage info = (ActiveMQMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java
deleted file mode 100644
index 30d1476..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQObjectMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQObjectMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQObjectMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQObjectMessageTest SINGLETON = new ActiveMQObjectMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQObjectMessage info = new ActiveMQObjectMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQObjectMessage info = (ActiveMQObjectMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java
deleted file mode 100644
index 459090c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQQueue NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQQueueTest extends ActiveMQDestinationTestSupport {
-
-    public static final ActiveMQQueueTest SINGLETON = new ActiveMQQueueTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQQueue info = new ActiveMQQueue();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQQueue info = (ActiveMQQueue)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java
deleted file mode 100644
index 6648554..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQStreamMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQStreamMessage NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQStreamMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQStreamMessageTest SINGLETON = new ActiveMQStreamMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQStreamMessage info = new ActiveMQStreamMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQStreamMessage info = (ActiveMQStreamMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java
deleted file mode 100644
index 73133c4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQTempDestination;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTempDestination NOTE!:
- * This file is auto generated - do not modify! if you need to make a change,
- * please see the modify the groovy scripts in the under src/gram/script and
- * then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class ActiveMQTempDestinationTestSupport extends ActiveMQDestinationTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTempDestination info = (ActiveMQTempDestination)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java
deleted file mode 100644
index c358a5a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQTempQueue;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTempQueue NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport {
-
-    public static final ActiveMQTempQueueTest SINGLETON = new ActiveMQTempQueueTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTempQueue info = new ActiveMQTempQueue();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTempQueue info = (ActiveMQTempQueue)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java
deleted file mode 100644
index 18e33c0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQTempTopic;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTempTopic NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTempTopicTest extends ActiveMQTempDestinationTestSupport {
-
-    public static final ActiveMQTempTopicTest SINGLETON = new ActiveMQTempTopicTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTempTopic info = new ActiveMQTempTopic();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTempTopic info = (ActiveMQTempTopic)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java
deleted file mode 100644
index 839d713..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQTextMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTextMessage NOTE!: This
- * file is auto generated - do not modify! if you need to make a change, please
- * see the modify the groovy scripts in the under src/gram/script and then use
- * maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTextMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQTextMessageTest SINGLETON = new ActiveMQTextMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTextMessage info = new ActiveMQTextMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTextMessage info = (ActiveMQTextMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java
deleted file mode 100644
index a08d43a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTopic NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTopicTest extends ActiveMQDestinationTestSupport {
-
-    public static final ActiveMQTopicTest SINGLETON = new ActiveMQTopicTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTopic info = new ActiveMQTopic();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTopic info = (ActiveMQTopic)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java
deleted file mode 100644
index 3240cf0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BaseCommand NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BaseCommand info = (BaseCommand)object;
-        info.setCommandId(1);
-        info.setResponseRequired(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java
deleted file mode 100644
index 1893de3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BrokerId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class BrokerIdTest extends DataFileGeneratorTestSupport {
-
-    public static final BrokerIdTest SINGLETON = new BrokerIdTest();
-
-    public Object createObject() throws Exception {
-        BrokerId info = new BrokerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerId info = (BrokerId)object;
-        info.setValue("Value:1");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java
deleted file mode 100644
index e0541e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.BrokerInfo;
-
-/**
- * Test case for the OpenWire marshalling for BrokerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class BrokerInfoTest extends BaseCommandTestSupport {
-
-    public static final BrokerInfoTest SINGLETON = new BrokerInfoTest();
-
-    public Object createObject() throws Exception {
-        BrokerInfo info = new BrokerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerInfo info = (BrokerInfo)object;
-        info.setBrokerId(createBrokerId("BrokerId:1"));
-        info.setBrokerURL("BrokerURL:2");
-
-        {
-            BrokerInfo value[] = new BrokerInfo[0];
-            for (int i = 0; i < 0; i++) {
-                value[i] = createBrokerInfo("PeerBrokerInfos:3");
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        info.setBrokerName("BrokerName:4");
-        info.setSlaveBroker(true);
-        info.setMasterBroker(false);
-        info.setFaultTolerantConfiguration(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionControlTest.java
deleted file mode 100644
index 4dae003..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionControlTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ConnectionControl;
-
-/**
- * Test case for the OpenWire marshalling for ConnectionControl
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionControlTest extends BaseCommandTestSupport {
-
-    public static final ConnectionControlTest SINGLETON = new ConnectionControlTest();
-
-    public Object createObject() throws Exception {
-        ConnectionControl info = new ConnectionControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionControl info = (ConnectionControl)object;
-        info.setClose(true);
-        info.setExit(false);
-        info.setFaultTolerant(true);
-        info.setResume(false);
-        info.setSuspend(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java
deleted file mode 100644
index 438fe6b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ConnectionError;
-
-/**
- * Test case for the OpenWire marshalling for ConnectionError
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionErrorTest extends BaseCommandTestSupport {
-
-    public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest();
-
-    public Object createObject() throws Exception {
-        ConnectionError info = new ConnectionError();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionError info = (ConnectionError)object;
-        info.setException(createThrowable("Exception:1"));
-        info.setConnectionId(createConnectionId("ConnectionId:2"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java
deleted file mode 100644
index 3dd221e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for ConnectionId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionIdTest extends DataFileGeneratorTestSupport {
-
-    public static final ConnectionIdTest SINGLETON = new ConnectionIdTest();
-
-    public Object createObject() throws Exception {
-        ConnectionId info = new ConnectionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionId info = (ConnectionId)object;
-        info.setValue("Value:1");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java
deleted file mode 100644
index 9b45727..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConnectionInfo;
-
-/**
- * Test case for the OpenWire marshalling for ConnectionInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionInfoTest extends BaseCommandTestSupport {
-
-    public static final ConnectionInfoTest SINGLETON = new ConnectionInfoTest();
-
-    public Object createObject() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionInfo info = (ConnectionInfo)object;
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setClientId("ClientId:2");
-        info.setPassword("Password:3");
-        info.setUserName("UserName:4");
-
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setBrokerMasterConnector(true);
-        info.setManageable(false);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerControlTest.java
deleted file mode 100644
index 4ea061d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerControlTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ConsumerControl;
-
-/**
- * Test case for the OpenWire marshalling for ConsumerControl
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerControlTest extends BaseCommandTestSupport {
-
-    public static final ConsumerControlTest SINGLETON = new ConsumerControlTest();
-
-    public Object createObject() throws Exception {
-        ConsumerControl info = new ConsumerControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerControl info = (ConsumerControl)object;
-        info.setClose(true);
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setPrefetch(1);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java
deleted file mode 100644
index c31d8ef..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for ConsumerId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerIdTest extends DataFileGeneratorTestSupport {
-
-    public static final ConsumerIdTest SINGLETON = new ConsumerIdTest();
-
-    public Object createObject() throws Exception {
-        ConsumerId info = new ConsumerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerId info = (ConsumerId)object;
-        info.setConnectionId("ConnectionId:1");
-        info.setSessionId(1);
-        info.setValue(2);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java
deleted file mode 100644
index 50efd51..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConsumerInfo;
-
-/**
- * Test case for the OpenWire marshalling for ConsumerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerInfoTest extends BaseCommandTestSupport {
-
-    public static final ConsumerInfoTest SINGLETON = new ConsumerInfoTest();
-
-    public Object createObject() throws Exception {
-        ConsumerInfo info = new ConsumerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerInfo info = (ConsumerInfo)object;
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setBrowser(true);
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setPrefetchSize(1);
-        info.setMaximumPendingMessageLimit(2);
-        info.setDispatchAsync(false);
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubcriptionName:4");
-        info.setNoLocal(true);
-        info.setExclusive(false);
-        info.setRetroactive(true);
-        info.setPriority((byte)1);
-
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6"));
-        info.setNetworkSubscription(false);
-        info.setOptimizedAcknowledge(true);
-        info.setNoRangeAcks(false);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java
deleted file mode 100644
index 1efa08d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ControlCommand;
-
-/**
- * Test case for the OpenWire marshalling for ControlCommand
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ControlCommandTest extends BaseCommandTestSupport {
-
-    public static final ControlCommandTest SINGLETON = new ControlCommandTest();
-
-    public Object createObject() throws Exception {
-        ControlCommand info = new ControlCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ControlCommand info = (ControlCommand)object;
-        info.setCommand("Command:1");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java
deleted file mode 100644
index 3523ea7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DataStructure;
-
-/**
- * Test case for the OpenWire marshalling for DataArrayResponse NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DataArrayResponseTest extends ResponseTest {
-
-    public static final DataArrayResponseTest SINGLETON = new DataArrayResponseTest();
-
-    public Object createObject() throws Exception {
-        DataArrayResponse info = new DataArrayResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataArrayResponse info = (DataArrayResponse)object;
-
-        {
-            DataStructure value[] = new DataStructure[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createDataStructure("Data:1");
-            }
-            info.setData(value);
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java
deleted file mode 100644
index cffbd0a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.DataResponse;
-
-/**
- * Test case for the OpenWire marshalling for DataResponse
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DataResponseTest extends ResponseTest {
-
-    public static final DataResponseTest SINGLETON = new DataResponseTest();
-
-    public Object createObject() throws Exception {
-        DataResponse info = new DataResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataResponse info = (DataResponse)object;
-        info.setData(createDataStructure("Data:1"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java
deleted file mode 100644
index 20688f5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.DestinationInfo;
-
-/**
- * Test case for the OpenWire marshalling for DestinationInfo NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DestinationInfoTest extends BaseCommandTestSupport {
-
-    public static final DestinationInfoTest SINGLETON = new DestinationInfoTest();
-
-    public Object createObject() throws Exception {
-        DestinationInfo info = new DestinationInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DestinationInfo info = (DestinationInfo)object;
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setOperationType((byte)1);
-        info.setTimeout(1);
-
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java
deleted file mode 100644
index 33a33b5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for DiscoveryEvent
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DiscoveryEventTest extends DataFileGeneratorTestSupport {
-
-    public static final DiscoveryEventTest SINGLETON = new DiscoveryEventTest();
-
-    public Object createObject() throws Exception {
-        DiscoveryEvent info = new DiscoveryEvent();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DiscoveryEvent info = (DiscoveryEvent)object;
-        info.setServiceName("ServiceName:1");
-        info.setBrokerName("BrokerName:2");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java
deleted file mode 100644
index 01074ec..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ExceptionResponse;
-
-/**
- * Test case for the OpenWire marshalling for ExceptionResponse
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ExceptionResponseTest extends ResponseTest {
-
-    public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest();
-
-    public Object createObject() throws Exception {
-        ExceptionResponse info = new ExceptionResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ExceptionResponse info = (ExceptionResponse)object;
-        info.setException(createThrowable("Exception:1"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java
deleted file mode 100644
index 5084440..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.FlushCommand;
-
-/**
- * Test case for the OpenWire marshalling for FlushCommand
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class FlushCommandTest extends BaseCommandTestSupport {
-
-    public static final FlushCommandTest SINGLETON = new FlushCommandTest();
-
-    public Object createObject() throws Exception {
-        FlushCommand info = new FlushCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        FlushCommand info = (FlushCommand)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java
deleted file mode 100644
index fb33c72..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.IntegerResponse;
-
-/**
- * Test case for the OpenWire marshalling for IntegerResponse
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class IntegerResponseTest extends ResponseTest {
-
-    public static final IntegerResponseTest SINGLETON = new IntegerResponseTest();
-
-    public Object createObject() throws Exception {
-        IntegerResponse info = new IntegerResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        IntegerResponse info = (IntegerResponse)object;
-        info.setResult(1);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java
deleted file mode 100644
index 47ace83..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for JournalQueueAck
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class JournalQueueAckTest extends DataFileGeneratorTestSupport {
-
-    public static final JournalQueueAckTest SINGLETON = new JournalQueueAckTest();
-
-    public Object createObject() throws Exception {
-        JournalQueueAck info = new JournalQueueAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalQueueAck info = (JournalQueueAck)object;
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageAck(createMessageAck("MessageAck:2"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java
deleted file mode 100644
index d74528b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for JournalTopicAck
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class JournalTopicAckTest extends DataFileGeneratorTestSupport {
-
-    public static final JournalTopicAckTest SINGLETON = new JournalTopicAckTest();
-
-    public Object createObject() throws Exception {
-        JournalTopicAck info = new JournalTopicAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTopicAck info = (JournalTopicAck)object;
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageId(createMessageId("MessageId:2"));
-        info.setMessageSequenceId(1);
-        info.setSubscritionName("SubscritionName:3");
-        info.setClientId("ClientId:4");
-        info.setTransactionId(createTransactionId("TransactionId:5"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java
deleted file mode 100644
index aad7060..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for JournalTrace
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class JournalTraceTest extends DataFileGeneratorTestSupport {
-
-    public static final JournalTraceTest SINGLETON = new JournalTraceTest();
-
-    public Object createObject() throws Exception {
-        JournalTrace info = new JournalTrace();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTrace info = (JournalTrace)object;
-        info.setMessage("Message:1");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java
deleted file mode 100644
index 6e7008e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for JournalTransaction
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class JournalTransactionTest extends DataFileGeneratorTestSupport {
-
-    public static final JournalTransactionTest SINGLETON = new JournalTransactionTest();
-
-    public Object createObject() throws Exception {
-        JournalTransaction info = new JournalTransaction();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTransaction info = (JournalTransaction)object;
-        info.setTransactionId(createTransactionId("TransactionId:1"));
-        info.setType((byte)1);
-        info.setWasPrepared(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java
deleted file mode 100644
index 4a880bf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.KeepAliveInfo;
-
-/**
- * Test case for the OpenWire marshalling for KeepAliveInfo
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class KeepAliveInfoTest extends BaseCommandTestSupport {
-
-    public static final KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest();
-
-    public Object createObject() throws Exception {
-        KeepAliveInfo info = new KeepAliveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        KeepAliveInfo info = (KeepAliveInfo)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java
deleted file mode 100644
index c992ad4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.LastPartialCommand;
-
-/**
- * Test case for the OpenWire marshalling for LastPartialCommand
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class LastPartialCommandTest extends PartialCommandTest {
-
-    public static final LastPartialCommandTest SINGLETON = new LastPartialCommandTest();
-
-    public Object createObject() throws Exception {
-        LastPartialCommand info = new LastPartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LastPartialCommand info = (LastPartialCommand)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java
deleted file mode 100644
index 2275a30..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.LocalTransactionId;
-
-/**
- * Test case for the OpenWire marshalling for LocalTransactionId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class LocalTransactionIdTest extends TransactionIdTestSupport {
-
-    public static final LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest();
-
-    public Object createObject() throws Exception {
-        LocalTransactionId info = new LocalTransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LocalTransactionId info = (LocalTransactionId)object;
-        info.setValue(1);
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java
deleted file mode 100644
index 1a055da..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.MessageAck;
-
-/**
- * Test case for the OpenWire marshalling for MessageAck
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessageAckTest extends BaseCommandTestSupport {
-
-    public static final MessageAckTest SINGLETON = new MessageAckTest();
-
-    public Object createObject() throws Exception {
-        MessageAck info = new MessageAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageAck info = (MessageAck)object;
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setConsumerId(createConsumerId("ConsumerId:3"));
-        info.setAckType((byte)1);
-        info.setFirstMessageId(createMessageId("FirstMessageId:4"));
-        info.setLastMessageId(createMessageId("LastMessageId:5"));
-        info.setMessageCount(1);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java
deleted file mode 100644
index 94589e5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.MessageDispatchNotification;
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatchNotification
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessageDispatchNotificationTest extends BaseCommandTestSupport {
-
-    public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatchNotification info = new MessageDispatchNotification();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatchNotification info = (MessageDispatchNotification)object;
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setDeliverySequenceId(1);
-        info.setMessageId(createMessageId("MessageId:3"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java
deleted file mode 100644
index f7ffda6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.MessageDispatch;
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatch
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessageDispatchTest extends BaseCommandTestSupport {
-
-    public static final MessageDispatchTest SINGLETON = new MessageDispatchTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatch info = new MessageDispatch();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatch info = (MessageDispatch)object;
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setMessage(createMessage("Message:3"));
-        info.setRedeliveryCounter(1);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java
deleted file mode 100644
index 4f3b4f6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for MessageId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class MessageIdTest extends DataFileGeneratorTestSupport {
-
-    public static final MessageIdTest SINGLETON = new MessageIdTest();
-
-    public Object createObject() throws Exception {
-        MessageId info = new MessageId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageId info = (MessageId)object;
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setProducerSequenceId(1);
-        info.setBrokerSequenceId(2);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
deleted file mode 100644
index 5761a10..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import java.io.DataOutputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.MarshallingSupport;
-
-/**
- * Test case for the OpenWire marshalling for Message NOTE!: This file is auto
- * generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class MessageTestSupport extends BaseCommandTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Message info = (Message)object;
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTransactionId(createTransactionId("TransactionId:3"));
-        info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4"));
-        info.setMessageId(createMessageId("MessageId:5"));
-        info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6"));
-        info.setGroupID("GroupID:7");
-        info.setGroupSequence(1);
-        info.setCorrelationId("CorrelationId:8");
-        info.setPersistent(true);
-        info.setExpiration(1);
-        info.setPriority((byte)1);
-        info.setReplyTo(createActiveMQDestination("ReplyTo:9"));
-        info.setTimestamp(2);
-        info.setType("Type:10");
-
-        {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream dataOut = new DataOutputStream(baos);
-            MarshallingSupport.writeUTF8(dataOut, "Content:11");
-            dataOut.close();
-            info.setContent(baos.toByteSequence());
-        }
-
-        {
-        	Map map = new HashMap();
-        	map.put("MarshalledProperties", 12);
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream os = new DataOutputStream(baos);
-            MarshallingSupport.marshalPrimitiveMap(map, os);
-            os.close();
-            info.setMarshalledProperties(baos.toByteSequence());
-        }
-
-        info.setDataStructure(createDataStructure("DataStructure:13"));
-        info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));
-        info.setCompressed(false);
-        info.setRedeliveryCounter(2);
-
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:15");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setArrival(3);
-        info.setUserID("UserID:16");
-        info.setRecievedByDFBridge(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterTest.java
deleted file mode 100644
index 068af0b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for NetworkBridgeFilter
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport {
-
-    public static final NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest();
-
-    public Object createObject() throws Exception {
-        NetworkBridgeFilter info = new NetworkBridgeFilter();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        NetworkBridgeFilter info = (NetworkBridgeFilter)object;
-        info.setNetworkTTL(1);
-        info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java
deleted file mode 100644
index bdbe27d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for PartialCommand
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class PartialCommandTest extends DataFileGeneratorTestSupport {
-
-    public static final PartialCommandTest SINGLETON = new PartialCommandTest();
-
-    public Object createObject() throws Exception {
-        PartialCommand info = new PartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        PartialCommand info = (PartialCommand)object;
-        info.setCommandId(1);
-        info.setData("Data:1".getBytes());
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java
deleted file mode 100644
index d67dbaf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for ProducerId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerIdTest extends DataFileGeneratorTestSupport {
-
-    public static final ProducerIdTest SINGLETON = new ProducerIdTest();
-
-    public Object createObject() throws Exception {
-        ProducerId info = new ProducerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerId info = (ProducerId)object;
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-        info.setSessionId(2);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java
deleted file mode 100644
index 8d8b5b8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ProducerInfo;
-
-/**
- * Test case for the OpenWire marshalling for ProducerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerInfoTest extends BaseCommandTestSupport {
-
-    public static final ProducerInfoTest SINGLETON = new ProducerInfoTest();
-
-    public Object createObject() throws Exception {
-        ProducerInfo info = new ProducerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerInfo info = (ProducerInfo)object;
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java
deleted file mode 100644
index 3d09942..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.RemoveInfo;
-
-/**
- * Test case for the OpenWire marshalling for RemoveInfo
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class RemoveInfoTest extends BaseCommandTestSupport {
-
-    public static final RemoveInfoTest SINGLETON = new RemoveInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveInfo info = new RemoveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveInfo info = (RemoveInfo)object;
-        info.setObjectId(createDataStructure("ObjectId:1"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java
deleted file mode 100644
index 32697dd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-
-/**
- * Test case for the OpenWire marshalling for RemoveSubscriptionInfo
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {
-
-    public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)object;
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setSubscriptionName("SubcriptionName:2");
-        info.setClientId("ClientId:3");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java
deleted file mode 100644
index d9decb4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ReplayCommand;
-
-/**
- * Test case for the OpenWire marshalling for ReplayCommand
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ReplayCommandTest extends BaseCommandTestSupport {
-
-    public static final ReplayCommandTest SINGLETON = new ReplayCommandTest();
-
-    public Object createObject() throws Exception {
-        ReplayCommand info = new ReplayCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ReplayCommand info = (ReplayCommand)object;
-        info.setFirstNakNumber(1);
-        info.setLastNakNumber(2);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ResponseTest.java
deleted file mode 100644
index 80c6fa4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ResponseTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.Response;
-
-/**
- * Test case for the OpenWire marshalling for Response
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ResponseTest extends BaseCommandTestSupport {
-
-    public static final ResponseTest SINGLETON = new ResponseTest();
-
-    public Object createObject() throws Exception {
-        Response info = new Response();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Response info = (Response)object;
-        info.setCorrelationId(1);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SessionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SessionIdTest.java
deleted file mode 100644
index a928a4b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SessionIdTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for SessionId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class SessionIdTest extends DataFileGeneratorTestSupport {
-
-    public static final SessionIdTest SINGLETON = new SessionIdTest();
-
-    public Object createObject() throws Exception {
-        SessionId info = new SessionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionId info = (SessionId)object;
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SessionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SessionInfoTest.java
deleted file mode 100644
index 8dc1bb0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SessionInfoTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.SessionInfo;
-
-/**
- * Test case for the OpenWire marshalling for SessionInfo
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class SessionInfoTest extends BaseCommandTestSupport {
-
-    public static final SessionInfoTest SINGLETON = new SessionInfoTest();
-
-    public Object createObject() throws Exception {
-        SessionInfo info = new SessionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionInfo info = (SessionInfo)object;
-        info.setSessionId(createSessionId("SessionId:1"));
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ShutdownInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ShutdownInfoTest.java
deleted file mode 100644
index ee8dc4d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ShutdownInfoTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.ShutdownInfo;
-
-/**
- * Test case for the OpenWire marshalling for ShutdownInfo
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ShutdownInfoTest extends BaseCommandTestSupport {
-
-    public static final ShutdownInfoTest SINGLETON = new ShutdownInfoTest();
-
-    public Object createObject() throws Exception {
-        ShutdownInfo info = new ShutdownInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ShutdownInfo info = (ShutdownInfo)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SubscriptionInfoTest.java
deleted file mode 100644
index 5eae496..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/SubscriptionInfoTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for SubscriptionInfo
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class SubscriptionInfoTest extends DataFileGeneratorTestSupport {
-
-    public static final SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        SubscriptionInfo info = new SubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SubscriptionInfo info = (SubscriptionInfo)object;
-        info.setClientId("ClientId:1");
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubcriptionName:4");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionIdTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionIdTestSupport.java
deleted file mode 100644
index 8c77aa9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionIdTestSupport.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for TransactionId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionId info = (TransactionId)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java
deleted file mode 100644
index a5e558b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.TransactionInfo;
-
-/**
- * Test case for the OpenWire marshalling for TransactionInfo
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class TransactionInfoTest extends BaseCommandTestSupport {
-
-    public static final TransactionInfoTest SINGLETON = new TransactionInfoTest();
-
-    public Object createObject() throws Exception {
-        TransactionInfo info = new TransactionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionInfo info = (TransactionInfo)object;
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setType((byte)1);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java
deleted file mode 100644
index 5298b99..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for WireFormatInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class WireFormatInfoTest extends DataFileGeneratorTestSupport {
-
-    public static final WireFormatInfoTest SINGLETON = new WireFormatInfoTest();
-
-    public Object createObject() throws Exception {
-        WireFormatInfo info = new WireFormatInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        WireFormatInfo info = (WireFormatInfo)object;
-        info.setVersion(1);
-
-        {
-            byte data[] = "MarshalledProperties:1".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java
deleted file mode 100644
index 013c986..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v1;
-
-import org.apache.activemq.command.XATransactionId;
-
-/**
- * Test case for the OpenWire marshalling for XATransactionId
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class XATransactionIdTest extends TransactionIdTestSupport {
-
-    public static final XATransactionIdTest SINGLETON = new XATransactionIdTest();
-
-    public Object createObject() throws Exception {
-        XATransactionId info = new XATransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        XATransactionId info = (XATransactionId)object;
-        info.setFormatId(1);
-        info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
-        info.setBranchQualifier("BranchQualifier:2".getBytes());
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java
deleted file mode 100644
index 4588219..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQBytesMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQBytesMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQBytesMessageTest SINGLETON = new ActiveMQBytesMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQBytesMessage info = new ActiveMQBytesMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQBytesMessage info = (ActiveMQBytesMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java
deleted file mode 100644
index f582368..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQDestination
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class ActiveMQDestinationTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQDestination info = (ActiveMQDestination)object;
-        info.setPhysicalName("PhysicalName:1");
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java
deleted file mode 100644
index 45e531a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQMapMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQMapMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQMapMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQMapMessageTest SINGLETON = new ActiveMQMapMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQMapMessage info = new ActiveMQMapMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQMapMessage info = (ActiveMQMapMessage)object;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java
deleted file mode 100644
index eb1d050..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQMessageTest extends MessageTestSupport {
-
-    public static final ActiveMQMessageTest SINGLETON = new ActiveMQMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQMessage info = new ActiveMQMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQMessage info = (ActiveMQMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java
deleted file mode 100644
index ddb9b1b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQObjectMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQObjectMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQObjectMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQObjectMessageTest SINGLETON = new ActiveMQObjectMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQObjectMessage info = new ActiveMQObjectMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQObjectMessage info = (ActiveMQObjectMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java
deleted file mode 100644
index 453f702..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQQueue
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQQueueTest extends ActiveMQDestinationTestSupport {
-
-    public static final ActiveMQQueueTest SINGLETON = new ActiveMQQueueTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQQueue info = new ActiveMQQueue();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQQueue info = (ActiveMQQueue)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java
deleted file mode 100644
index 21ccc88..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQStreamMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQStreamMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQStreamMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQStreamMessageTest SINGLETON = new ActiveMQStreamMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQStreamMessage info = new ActiveMQStreamMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQStreamMessage info = (ActiveMQStreamMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java
deleted file mode 100644
index db609bf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQTempDestination;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTempDestination
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class ActiveMQTempDestinationTestSupport extends ActiveMQDestinationTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTempDestination info = (ActiveMQTempDestination)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java
deleted file mode 100644
index 817996f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQTempQueue;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTempQueue
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport {
-
-    public static final ActiveMQTempQueueTest SINGLETON = new ActiveMQTempQueueTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTempQueue info = new ActiveMQTempQueue();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTempQueue info = (ActiveMQTempQueue)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java
deleted file mode 100644
index b940fc5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQTempTopic;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTempTopic
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTempTopicTest extends ActiveMQTempDestinationTestSupport {
-
-    public static final ActiveMQTempTopicTest SINGLETON = new ActiveMQTempTopicTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTempTopic info = new ActiveMQTempTopic();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTempTopic info = (ActiveMQTempTopic)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java
deleted file mode 100644
index 0c7b742..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQTextMessage;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTextMessage
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTextMessageTest extends ActiveMQMessageTest {
-
-    public static final ActiveMQTextMessageTest SINGLETON = new ActiveMQTextMessageTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTextMessage info = new ActiveMQTextMessage();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTextMessage info = (ActiveMQTextMessage)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java
deleted file mode 100644
index ac3e9a1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * Test case for the OpenWire marshalling for ActiveMQTopic
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ActiveMQTopicTest extends ActiveMQDestinationTestSupport {
-
-    public static final ActiveMQTopicTest SINGLETON = new ActiveMQTopicTest();
-
-    public Object createObject() throws Exception {
-        ActiveMQTopic info = new ActiveMQTopic();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ActiveMQTopic info = (ActiveMQTopic)object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java
deleted file mode 100644
index 5aebc4f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BaseCommand NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BaseCommand info = (BaseCommand)object;
-        info.setCommandId(1);
-        info.setResponseRequired(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BrokerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BrokerIdTest.java
deleted file mode 100644
index 3ecb39e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BrokerIdTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final BrokerIdTest SINGLETON = new BrokerIdTest();
-
-    public Object createObject() throws Exception {
-        BrokerId info = new BrokerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerId info = (BrokerId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BrokerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BrokerInfoTest.java
deleted file mode 100644
index 5db9783..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BrokerInfoTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.BrokerInfo;
-
-/**
- * Test case for the OpenWire marshalling for BrokerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class BrokerInfoTest extends BaseCommandTestSupport {
-
-    public static final BrokerInfoTest SINGLETON = new BrokerInfoTest();
-
-    public Object createObject() throws Exception {
-        BrokerInfo info = new BrokerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerInfo info = (BrokerInfo)object;
-
-        info.setBrokerId(createBrokerId("BrokerId:1"));
-        info.setBrokerURL("BrokerURL:2");
-        {
-            BrokerInfo value[] = new BrokerInfo[0];
-            for (int i = 0; i < 0; i++) {
-                value[i] = createBrokerInfo("PeerBrokerInfos:3");
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        info.setBrokerName("BrokerName:4");
-        info.setSlaveBroker(true);
-        info.setMasterBroker(false);
-        info.setFaultTolerantConfiguration(true);
-        info.setDuplexConnection(false);
-        info.setNetworkConnection(true);
-        info.setConnectionId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionControlTest.java
deleted file mode 100644
index 5e89773..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionControlTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ConnectionControl;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlTest extends BaseCommandTestSupport {
-
-
-    public static final ConnectionControlTest SINGLETON = new ConnectionControlTest();
-
-    public Object createObject() throws Exception {
-        ConnectionControl info = new ConnectionControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionControl info = (ConnectionControl) object;
-
-        info.setClose(true);
-        info.setExit(false);
-        info.setFaultTolerant(true);
-        info.setResume(false);
-        info.setSuspend(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionErrorTest.java
deleted file mode 100644
index ac5b5d9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionErrorTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ConnectionError;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionError
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorTest extends BaseCommandTestSupport {
-
-
-    public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest();
-
-    public Object createObject() throws Exception {
-        ConnectionError info = new ConnectionError();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionError info = (ConnectionError) object;
-
-        info.setException(createThrowable("Exception:1"));
-        info.setConnectionId(createConnectionId("ConnectionId:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionIdTest.java
deleted file mode 100644
index 8e066ce..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionIdTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final ConnectionIdTest SINGLETON = new ConnectionIdTest();
-
-    public Object createObject() throws Exception {
-        ConnectionId info = new ConnectionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionId info = (ConnectionId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionInfoTest.java
deleted file mode 100644
index 82fb37d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConnectionInfoTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConnectionInfo;
-
-/**
- * Test case for the OpenWire marshalling for ConnectionInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionInfoTest extends BaseCommandTestSupport {
-
-    public static final ConnectionInfoTest SINGLETON = new ConnectionInfoTest();
-
-    public Object createObject() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionInfo info = (ConnectionInfo)object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setClientId("ClientId:2");
-        info.setPassword("Password:3");
-        info.setUserName("UserName:4");
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setBrokerMasterConnector(true);
-        info.setManageable(false);
-        info.setClientMaster(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerControlTest.java
deleted file mode 100644
index b550533..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerControlTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ConsumerControl;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlTest extends BaseCommandTestSupport {
-
-
-    public static final ConsumerControlTest SINGLETON = new ConsumerControlTest();
-
-    public Object createObject() throws Exception {
-        ConsumerControl info = new ConsumerControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerControl info = (ConsumerControl) object;
-
-        info.setClose(true);
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setPrefetch(1);
-        info.setFlush(false);
-        info.setStart(true);
-        info.setStop(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerIdTest.java
deleted file mode 100644
index d818c85..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerIdTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final ConsumerIdTest SINGLETON = new ConsumerIdTest();
-
-    public Object createObject() throws Exception {
-        ConsumerId info = new ConsumerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerId info = (ConsumerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setSessionId(1);
-        info.setValue(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java
deleted file mode 100644
index 1420260..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConsumerInfo;
-
-/**
- * Test case for the OpenWire marshalling for ConsumerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerInfoTest extends BaseCommandTestSupport {
-
-    public static final ConsumerInfoTest SINGLETON = new ConsumerInfoTest();
-
-    public Object createObject() throws Exception {
-        ConsumerInfo info = new ConsumerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerInfo info = (ConsumerInfo)object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setBrowser(true);
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setPrefetchSize(1);
-        info.setMaximumPendingMessageLimit(2);
-        info.setDispatchAsync(false);
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubscriptionName:4");
-        info.setNoLocal(true);
-        info.setExclusive(false);
-        info.setRetroactive(true);
-        info.setPriority((byte)1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6"));
-        info.setNetworkSubscription(false);
-        info.setOptimizedAcknowledge(true);
-        info.setNoRangeAcks(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ControlCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ControlCommandTest.java
deleted file mode 100644
index 7767267..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ControlCommandTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ControlCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for ControlCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandTest extends BaseCommandTestSupport {
-
-
-    public static final ControlCommandTest SINGLETON = new ControlCommandTest();
-
-    public Object createObject() throws Exception {
-        ControlCommand info = new ControlCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ControlCommand info = (ControlCommand) object;
-
-        info.setCommand("Command:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DataArrayResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DataArrayResponseTest.java
deleted file mode 100644
index 3398dff..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DataArrayResponseTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DataStructure;
-
-/**
- * Test case for the OpenWire marshalling for DataArrayResponse NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DataArrayResponseTest extends ResponseTest {
-
-    public static final DataArrayResponseTest SINGLETON = new DataArrayResponseTest();
-
-    public Object createObject() throws Exception {
-        DataArrayResponse info = new DataArrayResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataArrayResponse info = (DataArrayResponse)object;
-
-        {
-            DataStructure value[] = new DataStructure[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createDataStructure("Data:1");
-            }
-            info.setData(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DataResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DataResponseTest.java
deleted file mode 100644
index f8b4e49..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DataResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.DataResponse;
-
-
-/**
- * Test case for the OpenWire marshalling for DataResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseTest extends ResponseTest {
-
-
-    public static final DataResponseTest SINGLETON = new DataResponseTest();
-
-    public Object createObject() throws Exception {
-        DataResponse info = new DataResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataResponse info = (DataResponse) object;
-
-        info.setData(createDataStructure("Data:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DestinationInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DestinationInfoTest.java
deleted file mode 100644
index accfb0b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DestinationInfoTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.DestinationInfo;
-
-/**
- * Test case for the OpenWire marshalling for DestinationInfo NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DestinationInfoTest extends BaseCommandTestSupport {
-
-    public static final DestinationInfoTest SINGLETON = new DestinationInfoTest();
-
-    public Object createObject() throws Exception {
-        DestinationInfo info = new DestinationInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DestinationInfo info = (DestinationInfo)object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setOperationType((byte)1);
-        info.setTimeout(1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DiscoveryEventTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DiscoveryEventTest.java
deleted file mode 100644
index 77dca5f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/DiscoveryEventTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for DiscoveryEvent
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventTest extends DataFileGeneratorTestSupport {
-
-
-    public static final DiscoveryEventTest SINGLETON = new DiscoveryEventTest();
-
-    public Object createObject() throws Exception {
-        DiscoveryEvent info = new DiscoveryEvent();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DiscoveryEvent info = (DiscoveryEvent) object;
-
-        info.setServiceName("ServiceName:1");
-        info.setBrokerName("BrokerName:2");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ExceptionResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ExceptionResponseTest.java
deleted file mode 100644
index 0f81fc7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ExceptionResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ExceptionResponse;
-
-
-/**
- * Test case for the OpenWire marshalling for ExceptionResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseTest extends ResponseTest {
-
-
-    public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest();
-
-    public Object createObject() throws Exception {
-        ExceptionResponse info = new ExceptionResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ExceptionResponse info = (ExceptionResponse) object;
-
-        info.setException(createThrowable("Exception:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/FlushCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/FlushCommandTest.java
deleted file mode 100644
index c00826b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/FlushCommandTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.FlushCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for FlushCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandTest extends BaseCommandTestSupport {
-
-
-    public static final FlushCommandTest SINGLETON = new FlushCommandTest();
-
-    public Object createObject() throws Exception {
-        FlushCommand info = new FlushCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        FlushCommand info = (FlushCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/IntegerResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/IntegerResponseTest.java
deleted file mode 100644
index 171303b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/IntegerResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.IntegerResponse;
-
-
-/**
- * Test case for the OpenWire marshalling for IntegerResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseTest extends ResponseTest {
-
-
-    public static final IntegerResponseTest SINGLETON = new IntegerResponseTest();
-
-    public Object createObject() throws Exception {
-        IntegerResponse info = new IntegerResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        IntegerResponse info = (IntegerResponse) object;
-
-        info.setResult(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalQueueAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalQueueAckTest.java
deleted file mode 100644
index 5613a99..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalQueueAckTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalQueueAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalQueueAckTest SINGLETON = new JournalQueueAckTest();
-
-    public Object createObject() throws Exception {
-        JournalQueueAck info = new JournalQueueAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalQueueAck info = (JournalQueueAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageAck(createMessageAck("MessageAck:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTopicAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTopicAckTest.java
deleted file mode 100644
index 0221802..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTopicAckTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTopicAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalTopicAckTest SINGLETON = new JournalTopicAckTest();
-
-    public Object createObject() throws Exception {
-        JournalTopicAck info = new JournalTopicAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTopicAck info = (JournalTopicAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageId(createMessageId("MessageId:2"));
-        info.setMessageSequenceId(1);
-        info.setSubscritionName("SubscritionName:3");
-        info.setClientId("ClientId:4");
-        info.setTransactionId(createTransactionId("TransactionId:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTraceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTraceTest.java
deleted file mode 100644
index e0ac05c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTraceTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTrace
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalTraceTest SINGLETON = new JournalTraceTest();
-
-    public Object createObject() throws Exception {
-        JournalTrace info = new JournalTrace();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTrace info = (JournalTrace) object;
-
-        info.setMessage("Message:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTransactionTest.java
deleted file mode 100644
index 714a697..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/JournalTransactionTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTransaction
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalTransactionTest SINGLETON = new JournalTransactionTest();
-
-    public Object createObject() throws Exception {
-        JournalTransaction info = new JournalTransaction();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTransaction info = (JournalTransaction) object;
-
-        info.setTransactionId(createTransactionId("TransactionId:1"));
-        info.setType((byte) 1);
-        info.setWasPrepared(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/KeepAliveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/KeepAliveInfoTest.java
deleted file mode 100644
index b20eb45..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/KeepAliveInfoTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.KeepAliveInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for KeepAliveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoTest extends BaseCommandTestSupport {
-
-
-    public static final KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest();
-
-    public Object createObject() throws Exception {
-        KeepAliveInfo info = new KeepAliveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        KeepAliveInfo info = (KeepAliveInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/LastPartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/LastPartialCommandTest.java
deleted file mode 100644
index 5891acd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/LastPartialCommandTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.LastPartialCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for LastPartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandTest extends PartialCommandTest {
-
-
-    public static final LastPartialCommandTest SINGLETON = new LastPartialCommandTest();
-
-    public Object createObject() throws Exception {
-        LastPartialCommand info = new LastPartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LastPartialCommand info = (LastPartialCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/LocalTransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/LocalTransactionIdTest.java
deleted file mode 100644
index 2674801..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/LocalTransactionIdTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.LocalTransactionId;
-
-
-/**
- * Test case for the OpenWire marshalling for LocalTransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static final LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest();
-
-    public Object createObject() throws Exception {
-        LocalTransactionId info = new LocalTransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LocalTransactionId info = (LocalTransactionId) object;
-
-        info.setValue(1);
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageAckTest.java
deleted file mode 100644
index c4ac015..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageAckTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.MessageAck;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckTest extends BaseCommandTestSupport {
-
-
-    public static final MessageAckTest SINGLETON = new MessageAckTest();
-
-    public Object createObject() throws Exception {
-        MessageAck info = new MessageAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageAck info = (MessageAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setConsumerId(createConsumerId("ConsumerId:3"));
-        info.setAckType((byte) 1);
-        info.setFirstMessageId(createMessageId("FirstMessageId:4"));
-        info.setLastMessageId(createMessageId("LastMessageId:5"));
-        info.setMessageCount(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationTest.java
deleted file mode 100644
index adfe131..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.MessageDispatchNotification;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatchNotification
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationTest extends BaseCommandTestSupport {
-
-
-    public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatchNotification info = new MessageDispatchNotification();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatchNotification info = (MessageDispatchNotification) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setDeliverySequenceId(1);
-        info.setMessageId(createMessageId("MessageId:3"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchTest.java
deleted file mode 100644
index b100da3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.MessageDispatch;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatch
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchTest extends BaseCommandTestSupport {
-
-
-    public static final MessageDispatchTest SINGLETON = new MessageDispatchTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatch info = new MessageDispatch();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatch info = (MessageDispatch) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setMessage(createMessage("Message:3"));
-        info.setRedeliveryCounter(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageIdTest.java
deleted file mode 100644
index bc4af37..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageIdTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final MessageIdTest SINGLETON = new MessageIdTest();
-
-    public Object createObject() throws Exception {
-        MessageId info = new MessageId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageId info = (MessageId) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setProducerSequenceId(1);
-        info.setBrokerSequenceId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessagePullTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessagePullTest.java
deleted file mode 100644
index 030574d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessagePullTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.MessagePull;
-
-
-/**
- * Test case for the OpenWire marshalling for MessagePull
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullTest extends BaseCommandTestSupport {
-
-
-    public static final MessagePullTest SINGLETON = new MessagePullTest();
-
-    public Object createObject() throws Exception {
-        MessagePull info = new MessagePull();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessagePull info = (MessagePull) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTimeout(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
deleted file mode 100644
index 09bbd95..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import java.io.DataOutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.MarshallingSupport;
-
-/**
- * Test case for the OpenWire marshalling for Message NOTE!: This file is auto
- * generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class MessageTestSupport extends BaseCommandTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Message info = (Message)object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTransactionId(createTransactionId("TransactionId:3"));
-        info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4"));
-        info.setMessageId(createMessageId("MessageId:5"));
-        info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6"));
-        info.setGroupID("GroupID:7");
-        info.setGroupSequence(1);
-        info.setCorrelationId("CorrelationId:8");
-        info.setPersistent(true);
-        info.setExpiration(1);
-        info.setPriority((byte)1);
-        info.setReplyTo(createActiveMQDestination("ReplyTo:9"));
-        info.setTimestamp(2);
-        info.setType("Type:10");
-        {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream dataOut = new DataOutputStream(baos);
-            MarshallingSupport.writeUTF8(dataOut, "Content:11");
-            dataOut.close();
-            info.setContent(baos.toByteSequence());
-        }
-        {
-        	Map map = new HashMap();
-        	map.put("MarshalledProperties", 12);
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream os = new DataOutputStream(baos);
-            MarshallingSupport.marshalPrimitiveMap(map, os);
-            os.close();
-            info.setMarshalledProperties(baos.toByteSequence());
-        }
-        info.setDataStructure(createDataStructure("DataStructure:13"));
-        info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));
-        info.setCompressed(false);
-        info.setRedeliveryCounter(2);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:15");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setArrival(3);
-        info.setUserID("UserID:16");
-        info.setRecievedByDFBridge(true);
-        info.setDroppable(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterTest.java
deleted file mode 100644
index 6afa4ef..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for NetworkBridgeFilter
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport {
-
-
-    public static final NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest();
-
-    public Object createObject() throws Exception {
-        NetworkBridgeFilter info = new NetworkBridgeFilter();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        NetworkBridgeFilter info = (NetworkBridgeFilter) object;
-
-        info.setNetworkTTL(1);
-        info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/PartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/PartialCommandTest.java
deleted file mode 100644
index 38e245f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/PartialCommandTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for PartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandTest extends DataFileGeneratorTestSupport {
-
-
-    public static final PartialCommandTest SINGLETON = new PartialCommandTest();
-
-    public Object createObject() throws Exception {
-        PartialCommand info = new PartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        PartialCommand info = (PartialCommand) object;
-
-        info.setCommandId(1);
-        info.setData("Data:1".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ProducerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ProducerIdTest.java
deleted file mode 100644
index cbe32f8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ProducerIdTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final ProducerIdTest SINGLETON = new ProducerIdTest();
-
-    public Object createObject() throws Exception {
-        ProducerId info = new ProducerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerId info = (ProducerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-        info.setSessionId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ProducerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ProducerInfoTest.java
deleted file mode 100644
index 07e226b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ProducerInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ProducerInfo;
-
-/**
- * Test case for the OpenWire marshalling for ProducerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerInfoTest extends BaseCommandTestSupport {
-
-    public static final ProducerInfoTest SINGLETON = new ProducerInfoTest();
-
-    public Object createObject() throws Exception {
-        ProducerInfo info = new ProducerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerInfo info = (ProducerInfo)object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setDispatchAsync(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/RemoveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/RemoveInfoTest.java
deleted file mode 100644
index c45e7df..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/RemoveInfoTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.RemoveInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoTest extends BaseCommandTestSupport {
-
-
-    public static final RemoveInfoTest SINGLETON = new RemoveInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveInfo info = new RemoveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveInfo info = (RemoveInfo) object;
-
-        info.setObjectId(createDataStructure("ObjectId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoTest.java
deleted file mode 100644
index 4c30153..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveSubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {
-
-
-    public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setSubscriptionName("SubcriptionName:2");
-        info.setClientId("ClientId:3");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ReplayCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ReplayCommandTest.java
deleted file mode 100644
index a2d821c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ReplayCommandTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ReplayCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for ReplayCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandTest extends BaseCommandTestSupport {
-
-
-    public static final ReplayCommandTest SINGLETON = new ReplayCommandTest();
-
-    public Object createObject() throws Exception {
-        ReplayCommand info = new ReplayCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ReplayCommand info = (ReplayCommand) object;
-
-        info.setFirstNakNumber(1);
-        info.setLastNakNumber(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ResponseTest.java
deleted file mode 100644
index 0cde577..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.Response;
-
-
-/**
- * Test case for the OpenWire marshalling for Response
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseTest extends BaseCommandTestSupport {
-
-
-    public static final ResponseTest SINGLETON = new ResponseTest();
-
-    public Object createObject() throws Exception {
-        Response info = new Response();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Response info = (Response) object;
-
-        info.setCorrelationId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SessionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SessionIdTest.java
deleted file mode 100644
index 50d896f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SessionIdTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final SessionIdTest SINGLETON = new SessionIdTest();
-
-    public Object createObject() throws Exception {
-        SessionId info = new SessionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionId info = (SessionId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SessionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SessionInfoTest.java
deleted file mode 100644
index 233f37d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SessionInfoTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.SessionInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoTest extends BaseCommandTestSupport {
-
-
-    public static final SessionInfoTest SINGLETON = new SessionInfoTest();
-
-    public Object createObject() throws Exception {
-        SessionInfo info = new SessionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionInfo info = (SessionInfo) object;
-
-        info.setSessionId(createSessionId("SessionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ShutdownInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ShutdownInfoTest.java
deleted file mode 100644
index f617f14..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ShutdownInfoTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.ShutdownInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for ShutdownInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoTest extends BaseCommandTestSupport {
-
-
-    public static final ShutdownInfoTest SINGLETON = new ShutdownInfoTest();
-
-    public Object createObject() throws Exception {
-        ShutdownInfo info = new ShutdownInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ShutdownInfo info = (ShutdownInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SubscriptionInfoTest.java
deleted file mode 100644
index f34f962..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/SubscriptionInfoTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for SubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoTest extends DataFileGeneratorTestSupport {
-
-
-    public static final SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        SubscriptionInfo info = new SubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SubscriptionInfo info = (SubscriptionInfo) object;
-
-        info.setClientId("ClientId:1");
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubcriptionName:4");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/TransactionIdTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/TransactionIdTestSupport.java
deleted file mode 100644
index ffa7eb1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/TransactionIdTestSupport.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionId info = (TransactionId) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/TransactionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/TransactionInfoTest.java
deleted file mode 100644
index 128fde8c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/TransactionInfoTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.TransactionInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoTest extends BaseCommandTestSupport {
-
-
-    public static final TransactionInfoTest SINGLETON = new TransactionInfoTest();
-
-    public Object createObject() throws Exception {
-        TransactionInfo info = new TransactionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionInfo info = (TransactionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setType((byte) 1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java
deleted file mode 100644
index 4eba697..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for WireFormatInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class WireFormatInfoTest extends DataFileGeneratorTestSupport {
-
-    public static final WireFormatInfoTest SINGLETON = new WireFormatInfoTest();
-
-    public Object createObject() throws Exception {
-        WireFormatInfo info = new WireFormatInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        WireFormatInfo info = (WireFormatInfo)object;
-        info.setVersion(1);
-
-        {
-            byte data[] = "MarshalledProperties:1".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/XATransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/XATransactionIdTest.java
deleted file mode 100644
index d266111..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/XATransactionIdTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v2;
-
-import org.apache.activemq.command.XATransactionId;
-
-
-/**
- * Test case for the OpenWire marshalling for XATransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static final XATransactionIdTest SINGLETON = new XATransactionIdTest();
-
-    public Object createObject() throws Exception {
-        XATransactionId info = new XATransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        XATransactionId info = (XATransactionId) object;
-
-        info.setFormatId(1);
-        info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
-        info.setBranchQualifier("BranchQualifier:2".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java
deleted file mode 100644
index 628d34c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BaseCommand
- * 
- * 
- * NOTE!: This file is auto generated - do not modify! if you need to make a
- * change, please see the modify the groovy scripts in the under src/gram/script
- * and then use maven openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BaseCommand info = (BaseCommand)object;
-        info.setCommandId(1);
-        info.setResponseRequired(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java
deleted file mode 100644
index b3ed358..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final BrokerIdTest SINGLETON = new BrokerIdTest();
-
-    public Object createObject() throws Exception {
-        BrokerId info = new BrokerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerId info = (BrokerId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java
deleted file mode 100644
index a7bede2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BrokerInfo;
-
-/**
- * Test case for the OpenWire marshalling for BrokerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class BrokerInfoTest extends BaseCommandTestSupport {
-
-    public static final BrokerInfoTest SINGLETON = new BrokerInfoTest();
-
-    public Object createObject() throws Exception {
-        BrokerInfo info = new BrokerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerInfo info = (BrokerInfo)object;
-
-        info.setBrokerId(createBrokerId("BrokerId:1"));
-        info.setBrokerURL("BrokerURL:2");
-        {
-            BrokerInfo value[] = new BrokerInfo[0];
-            for (int i = 0; i < 0; i++) {
-                value[i] = createBrokerInfo("PeerBrokerInfos:3");
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        info.setBrokerName("BrokerName:4");
-        info.setSlaveBroker(true);
-        info.setMasterBroker(false);
-        info.setFaultTolerantConfiguration(true);
-        info.setDuplexConnection(false);
-        info.setNetworkConnection(true);
-        info.setConnectionId(1);
-        info.setBrokerUploadUrl("BrokerUploadUrl:5");
-        info.setNetworkProperties("NetworkProperties:6");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java
deleted file mode 100644
index ec7a109..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ConnectionControl;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlTest extends BaseCommandTestSupport {
-
-
-    public static final ConnectionControlTest SINGLETON = new ConnectionControlTest();
-
-    public Object createObject() throws Exception {
-        ConnectionControl info = new ConnectionControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionControl info = (ConnectionControl) object;
-
-        info.setClose(true);
-        info.setExit(false);
-        info.setFaultTolerant(true);
-        info.setResume(false);
-        info.setSuspend(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java
deleted file mode 100644
index dd19044..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ConnectionError;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionError
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorTest extends BaseCommandTestSupport {
-
-
-    public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest();
-
-    public Object createObject() throws Exception {
-        ConnectionError info = new ConnectionError();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionError info = (ConnectionError) object;
-
-        info.setException(createThrowable("Exception:1"));
-        info.setConnectionId(createConnectionId("ConnectionId:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java
deleted file mode 100644
index 05b5430..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final ConnectionIdTest SINGLETON = new ConnectionIdTest();
-
-    public Object createObject() throws Exception {
-        ConnectionId info = new ConnectionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionId info = (ConnectionId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java
deleted file mode 100644
index 78f0729..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConnectionInfo;
-
-/**
- * Test case for the OpenWire marshalling for ConnectionInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConnectionInfoTest extends BaseCommandTestSupport {
-
-    public static final ConnectionInfoTest SINGLETON = new ConnectionInfoTest();
-
-    public Object createObject() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionInfo info = (ConnectionInfo)object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setClientId("ClientId:2");
-        info.setPassword("Password:3");
-        info.setUserName("UserName:4");
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setBrokerMasterConnector(true);
-        info.setManageable(false);
-        info.setClientMaster(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java
deleted file mode 100644
index 7f061c8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ConsumerControl;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlTest extends BaseCommandTestSupport {
-
-
-    public static final ConsumerControlTest SINGLETON = new ConsumerControlTest();
-
-    public Object createObject() throws Exception {
-        ConsumerControl info = new ConsumerControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerControl info = (ConsumerControl) object;
-
-        info.setClose(true);
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setPrefetch(1);
-        info.setFlush(false);
-        info.setStart(true);
-        info.setStop(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java
deleted file mode 100644
index 54cc8da..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final ConsumerIdTest SINGLETON = new ConsumerIdTest();
-
-    public Object createObject() throws Exception {
-        ConsumerId info = new ConsumerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerId info = (ConsumerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setSessionId(1);
-        info.setValue(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java
deleted file mode 100644
index 24d00d6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ConsumerInfo;
-
-/**
- * Test case for the OpenWire marshalling for ConsumerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ConsumerInfoTest extends BaseCommandTestSupport {
-
-    public static final ConsumerInfoTest SINGLETON = new ConsumerInfoTest();
-
-    public Object createObject() throws Exception {
-        ConsumerInfo info = new ConsumerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerInfo info = (ConsumerInfo)object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setBrowser(true);
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setPrefetchSize(1);
-        info.setMaximumPendingMessageLimit(2);
-        info.setDispatchAsync(false);
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubscriptionName:4");
-        info.setNoLocal(true);
-        info.setExclusive(false);
-        info.setRetroactive(true);
-        info.setPriority((byte)1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6"));
-        info.setNetworkSubscription(false);
-        info.setOptimizedAcknowledge(true);
-        info.setNoRangeAcks(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java
deleted file mode 100644
index 401fe68..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ControlCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for ControlCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandTest extends BaseCommandTestSupport {
-
-
-    public static final ControlCommandTest SINGLETON = new ControlCommandTest();
-
-    public Object createObject() throws Exception {
-        ControlCommand info = new ControlCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ControlCommand info = (ControlCommand) object;
-
-        info.setCommand("Command:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java
deleted file mode 100644
index b6f3a87..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.DataArrayResponse;
-import org.apache.activemq.command.DataStructure;
-
-/**
- * Test case for the OpenWire marshalling for DataArrayResponse NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DataArrayResponseTest extends ResponseTest {
-
-    public static final DataArrayResponseTest SINGLETON = new DataArrayResponseTest();
-
-    public Object createObject() throws Exception {
-        DataArrayResponse info = new DataArrayResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataArrayResponse info = (DataArrayResponse)object;
-
-        {
-            DataStructure value[] = new DataStructure[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createDataStructure("Data:1");
-            }
-            info.setData(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java
deleted file mode 100644
index cf773a5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.DataResponse;
-
-
-/**
- * Test case for the OpenWire marshalling for DataResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseTest extends ResponseTest {
-
-
-    public static final DataResponseTest SINGLETON = new DataResponseTest();
-
-    public Object createObject() throws Exception {
-        DataResponse info = new DataResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataResponse info = (DataResponse) object;
-
-        info.setData(createDataStructure("Data:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java
deleted file mode 100644
index d7f7343..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.DestinationInfo;
-
-/**
- * Test case for the OpenWire marshalling for DestinationInfo NOTE!: This file
- * is auto generated - do not modify! if you need to make a change, please see
- * the modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class DestinationInfoTest extends BaseCommandTestSupport {
-
-    public static final DestinationInfoTest SINGLETON = new DestinationInfoTest();
-
-    public Object createObject() throws Exception {
-        DestinationInfo info = new DestinationInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DestinationInfo info = (DestinationInfo)object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setOperationType((byte)1);
-        info.setTimeout(1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java
deleted file mode 100644
index 173801e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for DiscoveryEvent
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventTest extends DataFileGeneratorTestSupport {
-
-
-    public static final DiscoveryEventTest SINGLETON = new DiscoveryEventTest();
-
-    public Object createObject() throws Exception {
-        DiscoveryEvent info = new DiscoveryEvent();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DiscoveryEvent info = (DiscoveryEvent) object;
-
-        info.setServiceName("ServiceName:1");
-        info.setBrokerName("BrokerName:2");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java
deleted file mode 100644
index 9c2edb3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ExceptionResponse;
-
-
-/**
- * Test case for the OpenWire marshalling for ExceptionResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseTest extends ResponseTest {
-
-
-    public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest();
-
-    public Object createObject() throws Exception {
-        ExceptionResponse info = new ExceptionResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ExceptionResponse info = (ExceptionResponse) object;
-
-        info.setException(createThrowable("Exception:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java
deleted file mode 100644
index ac16ffb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.FlushCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for FlushCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandTest extends BaseCommandTestSupport {
-
-
-    public static final FlushCommandTest SINGLETON = new FlushCommandTest();
-
-    public Object createObject() throws Exception {
-        FlushCommand info = new FlushCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        FlushCommand info = (FlushCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java
deleted file mode 100644
index 6db78d1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.IntegerResponse;
-
-
-/**
- * Test case for the OpenWire marshalling for IntegerResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseTest extends ResponseTest {
-
-
-    public static final IntegerResponseTest SINGLETON = new IntegerResponseTest();
-
-    public Object createObject() throws Exception {
-        IntegerResponse info = new IntegerResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        IntegerResponse info = (IntegerResponse) object;
-
-        info.setResult(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java
deleted file mode 100644
index 1cdfa0a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalQueueAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalQueueAckTest SINGLETON = new JournalQueueAckTest();
-
-    public Object createObject() throws Exception {
-        JournalQueueAck info = new JournalQueueAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalQueueAck info = (JournalQueueAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageAck(createMessageAck("MessageAck:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java
deleted file mode 100644
index e9b826a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTopicAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalTopicAckTest SINGLETON = new JournalTopicAckTest();
-
-    public Object createObject() throws Exception {
-        JournalTopicAck info = new JournalTopicAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTopicAck info = (JournalTopicAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageId(createMessageId("MessageId:2"));
-        info.setMessageSequenceId(1);
-        info.setSubscritionName("SubscritionName:3");
-        info.setClientId("ClientId:4");
-        info.setTransactionId(createTransactionId("TransactionId:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java
deleted file mode 100644
index 6cfd58c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTrace
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalTraceTest SINGLETON = new JournalTraceTest();
-
-    public Object createObject() throws Exception {
-        JournalTrace info = new JournalTrace();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTrace info = (JournalTrace) object;
-
-        info.setMessage("Message:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java
deleted file mode 100644
index 5918926..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTransaction
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionTest extends DataFileGeneratorTestSupport {
-
-
-    public static final JournalTransactionTest SINGLETON = new JournalTransactionTest();
-
-    public Object createObject() throws Exception {
-        JournalTransaction info = new JournalTransaction();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTransaction info = (JournalTransaction) object;
-
-        info.setTransactionId(createTransactionId("TransactionId:1"));
-        info.setType((byte) 1);
-        info.setWasPrepared(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java
deleted file mode 100644
index 19896c1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.KeepAliveInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for KeepAliveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoTest extends BaseCommandTestSupport {
-
-
-    public static final KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest();
-
-    public Object createObject() throws Exception {
-        KeepAliveInfo info = new KeepAliveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        KeepAliveInfo info = (KeepAliveInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java
deleted file mode 100644
index eadb6d8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.LastPartialCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for LastPartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandTest extends PartialCommandTest {
-
-
-    public static final LastPartialCommandTest SINGLETON = new LastPartialCommandTest();
-
-    public Object createObject() throws Exception {
-        LastPartialCommand info = new LastPartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LastPartialCommand info = (LastPartialCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java
deleted file mode 100644
index acd7678..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.LocalTransactionId;
-
-
-/**
- * Test case for the OpenWire marshalling for LocalTransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static final LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest();
-
-    public Object createObject() throws Exception {
-        LocalTransactionId info = new LocalTransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LocalTransactionId info = (LocalTransactionId) object;
-
-        info.setValue(1);
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java
deleted file mode 100644
index f67e844..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.MessageAck;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckTest extends BaseCommandTestSupport {
-
-
-    public static final MessageAckTest SINGLETON = new MessageAckTest();
-
-    public Object createObject() throws Exception {
-        MessageAck info = new MessageAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageAck info = (MessageAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setConsumerId(createConsumerId("ConsumerId:3"));
-        info.setAckType((byte) 1);
-        info.setFirstMessageId(createMessageId("FirstMessageId:4"));
-        info.setLastMessageId(createMessageId("LastMessageId:5"));
-        info.setMessageCount(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java
deleted file mode 100644
index f9a76f4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.MessageDispatchNotification;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatchNotification
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationTest extends BaseCommandTestSupport {
-
-
-    public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatchNotification info = new MessageDispatchNotification();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatchNotification info = (MessageDispatchNotification) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setDeliverySequenceId(1);
-        info.setMessageId(createMessageId("MessageId:3"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java
deleted file mode 100644
index 0892188..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.MessageDispatch;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatch
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchTest extends BaseCommandTestSupport {
-
-
-    public static final MessageDispatchTest SINGLETON = new MessageDispatchTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatch info = new MessageDispatch();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatch info = (MessageDispatch) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setMessage(createMessage("Message:3"));
-        info.setRedeliveryCounter(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java
deleted file mode 100644
index 8f4da88..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final MessageIdTest SINGLETON = new MessageIdTest();
-
-    public Object createObject() throws Exception {
-        MessageId info = new MessageId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageId info = (MessageId) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setProducerSequenceId(1);
-        info.setBrokerSequenceId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java
deleted file mode 100644
index 2c628fa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.MessagePull;
-
-
-/**
- * Test case for the OpenWire marshalling for MessagePull
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullTest extends BaseCommandTestSupport {
-
-
-    public static final MessagePullTest SINGLETON = new MessagePullTest();
-
-    public Object createObject() throws Exception {
-        MessagePull info = new MessagePull();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessagePull info = (MessagePull) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTimeout(1);
-        info.setCorrelationId("CorrelationId:3");
-        info.setMessageId(createMessageId("MessageId:4"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java
deleted file mode 100644
index 20feff1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.Message;
-
-/**
- * Test case for the OpenWire marshalling for Message NOTE!: This file is auto
- * generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class MessageTestSupport extends BaseCommandTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Message info = (Message)object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTransactionId(createTransactionId("TransactionId:3"));
-        info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4"));
-        info.setMessageId(createMessageId("MessageId:5"));
-        info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6"));
-        info.setGroupID("GroupID:7");
-        info.setGroupSequence(1);
-        info.setCorrelationId("CorrelationId:8");
-        info.setPersistent(true);
-        info.setExpiration(1);
-        info.setPriority((byte)1);
-        info.setReplyTo(createActiveMQDestination("ReplyTo:9"));
-        info.setTimestamp(2);
-        info.setType("Type:10");
-        {
-            byte data[] = "Content:11".getBytes();
-            info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
-        }
-        {
-            byte data[] = "MarshalledProperties:12".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
-        }
-        info.setDataStructure(createDataStructure("DataStructure:13"));
-        info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));
-        info.setCompressed(false);
-        info.setRedeliveryCounter(2);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:15");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setArrival(3);
-        info.setUserID("UserID:16");
-        info.setRecievedByDFBridge(true);
-        info.setDroppable(false);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("Cluster:17");
-            }
-            info.setCluster(value);
-        }
-        info.setBrokerInTime(4);
-        info.setBrokerOutTime(5);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java
deleted file mode 100644
index 19cb220..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.NetworkBridgeFilter;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for NetworkBridgeFilter
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport {
-
-
-    public static final NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest();
-
-    public Object createObject() throws Exception {
-        NetworkBridgeFilter info = new NetworkBridgeFilter();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        NetworkBridgeFilter info = (NetworkBridgeFilter) object;
-
-        info.setNetworkTTL(1);
-        info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java
deleted file mode 100644
index 6ad3f40..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.PartialCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for PartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandTest extends DataFileGeneratorTestSupport {
-
-
-    public static final PartialCommandTest SINGLETON = new PartialCommandTest();
-
-    public Object createObject() throws Exception {
-        PartialCommand info = new PartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        PartialCommand info = (PartialCommand) object;
-
-        info.setCommandId(1);
-        info.setData("Data:1".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerAckTest.java
deleted file mode 100644
index cd3610d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerAckTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ProducerAck;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckTest extends BaseCommandTestSupport {
-
-
-    public static final ProducerAckTest SINGLETON = new ProducerAckTest();
-
-    public Object createObject() throws Exception {
-        ProducerAck info = new ProducerAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerAck info = (ProducerAck) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java
deleted file mode 100644
index 4387544..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final ProducerIdTest SINGLETON = new ProducerIdTest();
-
-    public Object createObject() throws Exception {
-        ProducerId info = new ProducerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerId info = (ProducerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-        info.setSessionId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java
deleted file mode 100644
index 4fbf05f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.ProducerInfo;
-
-/**
- * Test case for the OpenWire marshalling for ProducerInfo NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public class ProducerInfoTest extends BaseCommandTestSupport {
-
-    public static final ProducerInfoTest SINGLETON = new ProducerInfoTest();
-
-    public Object createObject() throws Exception {
-        ProducerInfo info = new ProducerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerInfo info = (ProducerInfo)object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        {
-            BrokerId value[] = new BrokerId[2];
-            for (int i = 0; i < 2; i++) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setDispatchAsync(true);
-        info.setWindowSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java
deleted file mode 100644
index 7bc480e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.RemoveInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoTest extends BaseCommandTestSupport {
-
-
-    public static final RemoveInfoTest SINGLETON = new RemoveInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveInfo info = new RemoveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveInfo info = (RemoveInfo) object;
-
-        info.setObjectId(createDataStructure("ObjectId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java
deleted file mode 100644
index 2c85ef2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveSubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {
-
-
-    public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setSubscriptionName("SubcriptionName:2");
-        info.setClientId("ClientId:3");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java
deleted file mode 100644
index 9e4c337..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ReplayCommand;
-
-
-/**
- * Test case for the OpenWire marshalling for ReplayCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandTest extends BaseCommandTestSupport {
-
-
-    public static final ReplayCommandTest SINGLETON = new ReplayCommandTest();
-
-    public Object createObject() throws Exception {
-        ReplayCommand info = new ReplayCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ReplayCommand info = (ReplayCommand) object;
-
-        info.setFirstNakNumber(1);
-        info.setLastNakNumber(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java
deleted file mode 100644
index 7dd6543..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.Response;
-
-
-/**
- * Test case for the OpenWire marshalling for Response
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseTest extends BaseCommandTestSupport {
-
-
-    public static final ResponseTest SINGLETON = new ResponseTest();
-
-    public Object createObject() throws Exception {
-        Response info = new Response();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Response info = (Response) object;
-
-        info.setCorrelationId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java
deleted file mode 100644
index 136956a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static final SessionIdTest SINGLETON = new SessionIdTest();
-
-    public Object createObject() throws Exception {
-        SessionId info = new SessionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionId info = (SessionId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java
deleted file mode 100644
index 81bed8b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.SessionInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoTest extends BaseCommandTestSupport {
-
-
-    public static final SessionInfoTest SINGLETON = new SessionInfoTest();
-
-    public Object createObject() throws Exception {
-        SessionInfo info = new SessionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionInfo info = (SessionInfo) object;
-
-        info.setSessionId(createSessionId("SessionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java
deleted file mode 100644
index 2c8c03f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.ShutdownInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for ShutdownInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoTest extends BaseCommandTestSupport {
-
-
-    public static final ShutdownInfoTest SINGLETON = new ShutdownInfoTest();
-
-    public Object createObject() throws Exception {
-        ShutdownInfo info = new ShutdownInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ShutdownInfo info = (ShutdownInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java
deleted file mode 100644
index d8da085..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.SubscriptionInfo;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for SubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoTest extends DataFileGeneratorTestSupport {
-
-
-    public static final SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        SubscriptionInfo info = new SubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SubscriptionInfo info = (SubscriptionInfo) object;
-
-        info.setClientId("ClientId:1");
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubcriptionName:4");
-        info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java
deleted file mode 100644
index ce874bb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionId info = (TransactionId) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java
deleted file mode 100644
index 8daad39..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.TransactionInfo;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoTest extends BaseCommandTestSupport {
-
-
-    public static final TransactionInfoTest SINGLETON = new TransactionInfoTest();
-
-    public Object createObject() throws Exception {
-        TransactionInfo info = new TransactionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionInfo info = (TransactionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setType((byte) 1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java
deleted file mode 100644
index e9d36e3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.openwire.v3;
-
-import org.apache.activemq.command.XATransactionId;
-
-
-/**
- * Test case for the OpenWire marshalling for XATransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static final XATransactionIdTest SINGLETON = new XATransactionIdTest();
-
-    public Object createObject() throws Exception {
-        XATransactionId info = new XATransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        XATransactionId info = (XATransactionId) object;
-
-        info.setFormatId(1);
-        info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
-        info.setBranchQualifier("BranchQualifier:2".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BaseCommandTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BaseCommandTestSupport.java
deleted file mode 100644
index f281a94..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BaseCommandTestSupport.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.openwire.v4;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BaseCommand NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- * 
- */
-public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BaseCommand info = (BaseCommand)object;
-        info.setCommandId(1);
-        info.setResponseRequired(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BrokerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BrokerIdTest.java
deleted file mode 100644
index 97cf048..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BrokerIdTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static BrokerIdTest SINGLETON = new BrokerIdTest();
-
-    public Object createObject() throws Exception {
-        BrokerId info = new BrokerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerId info = (BrokerId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BrokerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BrokerInfoTest.java
deleted file mode 100644
index b76df14..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/BrokerInfoTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerInfoTest extends BaseCommandTestSupport {
-
-
-    public static BrokerInfoTest SINGLETON = new BrokerInfoTest();
-
-    public Object createObject() throws Exception {
-        BrokerInfo info = new BrokerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerInfo info = (BrokerInfo) object;
-
-        info.setBrokerId(createBrokerId("BrokerId:1"));
-        info.setBrokerURL("BrokerURL:2");
-        {
-            BrokerInfo value[] = new BrokerInfo[0];
-            for( int i=0; i < 0; i++ ) {
-                value[i] = createBrokerInfo("PeerBrokerInfos:3");
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        info.setBrokerName("BrokerName:4");
-        info.setSlaveBroker(true);
-        info.setMasterBroker(false);
-        info.setFaultTolerantConfiguration(true);
-        info.setDuplexConnection(false);
-        info.setNetworkConnection(true);
-        info.setConnectionId(1);
-        info.setBrokerUploadUrl("BrokerUploadUrl:5");
-        info.setNetworkProperties("NetworkProperties:6");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionControlTest.java
deleted file mode 100644
index 7250787..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionControlTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionControlTest SINGLETON = new ConnectionControlTest();
-
-    public Object createObject() throws Exception {
-        ConnectionControl info = new ConnectionControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionControl info = (ConnectionControl) object;
-
-        info.setClose(true);
-        info.setExit(false);
-        info.setFaultTolerant(true);
-        info.setResume(false);
-        info.setSuspend(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionErrorTest.java
deleted file mode 100644
index 56d4c89..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionErrorTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionError
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest();
-
-    public Object createObject() throws Exception {
-        ConnectionError info = new ConnectionError();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionError info = (ConnectionError) object;
-
-        info.setException(createThrowable("Exception:1"));
-        info.setConnectionId(createConnectionId("ConnectionId:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionIdTest.java
deleted file mode 100644
index 9f25aa7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionIdTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ConnectionIdTest SINGLETON = new ConnectionIdTest();
-
-    public Object createObject() throws Exception {
-        ConnectionId info = new ConnectionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionId info = (ConnectionId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionInfoTest.java
deleted file mode 100644
index 56512a6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConnectionInfoTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionInfoTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest();
-
-    public Object createObject() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionInfo info = (ConnectionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setClientId("ClientId:2");
-        info.setPassword("Password:3");
-        info.setUserName("UserName:4");
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setBrokerMasterConnector(true);
-        info.setManageable(false);
-        info.setClientMaster(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerControlTest.java
deleted file mode 100644
index e82fdcc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerControlTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlTest extends BaseCommandTestSupport {
-
-
-    public static ConsumerControlTest SINGLETON = new ConsumerControlTest();
-
-    public Object createObject() throws Exception {
-        ConsumerControl info = new ConsumerControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerControl info = (ConsumerControl) object;
-
-        info.setClose(true);
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setPrefetch(1);
-        info.setFlush(false);
-        info.setStart(true);
-        info.setStop(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerIdTest.java
deleted file mode 100644
index cd26cb7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ConsumerIdTest SINGLETON = new ConsumerIdTest();
-
-    public Object createObject() throws Exception {
-        ConsumerId info = new ConsumerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerId info = (ConsumerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setSessionId(1);
-        info.setValue(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerInfoTest.java
deleted file mode 100644
index 277cbf5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ConsumerInfoTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerInfoTest extends BaseCommandTestSupport {
-
-
-    public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest();
-
-    public Object createObject() throws Exception {
-        ConsumerInfo info = new ConsumerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerInfo info = (ConsumerInfo) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setBrowser(true);
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setPrefetchSize(1);
-        info.setMaximumPendingMessageLimit(2);
-        info.setDispatchAsync(false);
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubscriptionName:4");
-        info.setNoLocal(true);
-        info.setExclusive(false);
-        info.setRetroactive(true);
-        info.setPriority((byte) 1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6"));
-        info.setNetworkSubscription(false);
-        info.setOptimizedAcknowledge(true);
-        info.setNoRangeAcks(false);
-        {
-            ConsumerId value[] = new ConsumerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createConsumerId("NetworkConsumerPath:7");
-            }
-            info.setNetworkConsumerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ControlCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ControlCommandTest.java
deleted file mode 100644
index 850c663..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ControlCommandTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ControlCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandTest extends BaseCommandTestSupport {
-
-
-    public static ControlCommandTest SINGLETON = new ControlCommandTest();
-
-    public Object createObject() throws Exception {
-        ControlCommand info = new ControlCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ControlCommand info = (ControlCommand) object;
-
-        info.setCommand("Command:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DataArrayResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DataArrayResponseTest.java
deleted file mode 100644
index 20fdd6b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DataArrayResponseTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DataArrayResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataArrayResponseTest extends ResponseTest {
-
-
-    public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest();
-
-    public Object createObject() throws Exception {
-        DataArrayResponse info = new DataArrayResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataArrayResponse info = (DataArrayResponse) object;
-
-        {
-            DataStructure value[] = new DataStructure[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createDataStructure("Data:1");
-            }
-            info.setData(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DataResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DataResponseTest.java
deleted file mode 100644
index d7c4c3d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DataResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DataResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseTest extends ResponseTest {
-
-
-    public static DataResponseTest SINGLETON = new DataResponseTest();
-
-    public Object createObject() throws Exception {
-        DataResponse info = new DataResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataResponse info = (DataResponse) object;
-
-        info.setData(createDataStructure("Data:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DestinationInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DestinationInfoTest.java
deleted file mode 100644
index cb9fa0a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DestinationInfoTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DestinationInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DestinationInfoTest extends BaseCommandTestSupport {
-
-
-    public static DestinationInfoTest SINGLETON = new DestinationInfoTest();
-
-    public Object createObject() throws Exception {
-        DestinationInfo info = new DestinationInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DestinationInfo info = (DestinationInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setOperationType((byte) 1);
-        info.setTimeout(1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DiscoveryEventTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DiscoveryEventTest.java
deleted file mode 100644
index e8dbb59..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/DiscoveryEventTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DiscoveryEvent
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventTest extends DataFileGeneratorTestSupport {
-
-
-    public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest();
-
-    public Object createObject() throws Exception {
-        DiscoveryEvent info = new DiscoveryEvent();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DiscoveryEvent info = (DiscoveryEvent) object;
-
-        info.setServiceName("ServiceName:1");
-        info.setBrokerName("BrokerName:2");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ExceptionResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ExceptionResponseTest.java
deleted file mode 100644
index 320b22c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ExceptionResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ExceptionResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseTest extends ResponseTest {
-
-
-    public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest();
-
-    public Object createObject() throws Exception {
-        ExceptionResponse info = new ExceptionResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ExceptionResponse info = (ExceptionResponse) object;
-
-        info.setException(createThrowable("Exception:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/FlushCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/FlushCommandTest.java
deleted file mode 100644
index 330b6af..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/FlushCommandTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for FlushCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandTest extends BaseCommandTestSupport {
-
-
-    public static FlushCommandTest SINGLETON = new FlushCommandTest();
-
-    public Object createObject() throws Exception {
-        FlushCommand info = new FlushCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        FlushCommand info = (FlushCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/IntegerResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/IntegerResponseTest.java
deleted file mode 100644
index 98c8e90..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/IntegerResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for IntegerResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseTest extends ResponseTest {
-
-
-    public static IntegerResponseTest SINGLETON = new IntegerResponseTest();
-
-    public Object createObject() throws Exception {
-        IntegerResponse info = new IntegerResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        IntegerResponse info = (IntegerResponse) object;
-
-        info.setResult(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalQueueAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalQueueAckTest.java
deleted file mode 100644
index 1d7cba6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalQueueAckTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalQueueAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest();
-
-    public Object createObject() throws Exception {
-        JournalQueueAck info = new JournalQueueAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalQueueAck info = (JournalQueueAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageAck(createMessageAck("MessageAck:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTopicAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTopicAckTest.java
deleted file mode 100644
index ece6779..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTopicAckTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTopicAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest();
-
-    public Object createObject() throws Exception {
-        JournalTopicAck info = new JournalTopicAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTopicAck info = (JournalTopicAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageId(createMessageId("MessageId:2"));
-        info.setMessageSequenceId(1);
-        info.setSubscritionName("SubscritionName:3");
-        info.setClientId("ClientId:4");
-        info.setTransactionId(createTransactionId("TransactionId:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTraceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTraceTest.java
deleted file mode 100644
index 125d984..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTraceTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTrace
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTraceTest SINGLETON = new JournalTraceTest();
-
-    public Object createObject() throws Exception {
-        JournalTrace info = new JournalTrace();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTrace info = (JournalTrace) object;
-
-        info.setMessage("Message:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTransactionTest.java
deleted file mode 100644
index 3dc47ab..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/JournalTransactionTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTransaction
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTransactionTest SINGLETON = new JournalTransactionTest();
-
-    public Object createObject() throws Exception {
-        JournalTransaction info = new JournalTransaction();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTransaction info = (JournalTransaction) object;
-
-        info.setTransactionId(createTransactionId("TransactionId:1"));
-        info.setType((byte) 1);
-        info.setWasPrepared(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/KeepAliveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/KeepAliveInfoTest.java
deleted file mode 100644
index d804f50..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/KeepAliveInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for KeepAliveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoTest extends BaseCommandTestSupport {
-
-
-    public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest();
-
-    public Object createObject() throws Exception {
-        KeepAliveInfo info = new KeepAliveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        KeepAliveInfo info = (KeepAliveInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/LastPartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/LastPartialCommandTest.java
deleted file mode 100644
index 81c1eb3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/LastPartialCommandTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for LastPartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandTest extends PartialCommandTest {
-
-
-    public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest();
-
-    public Object createObject() throws Exception {
-        LastPartialCommand info = new LastPartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LastPartialCommand info = (LastPartialCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/LocalTransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/LocalTransactionIdTest.java
deleted file mode 100644
index 544220b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/LocalTransactionIdTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for LocalTransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest();
-
-    public Object createObject() throws Exception {
-        LocalTransactionId info = new LocalTransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LocalTransactionId info = (LocalTransactionId) object;
-
-        info.setValue(1);
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageAckTest.java
deleted file mode 100644
index 440bfdf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageAckTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckTest extends BaseCommandTestSupport {
-
-
-    public static MessageAckTest SINGLETON = new MessageAckTest();
-
-    public Object createObject() throws Exception {
-        MessageAck info = new MessageAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageAck info = (MessageAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setConsumerId(createConsumerId("ConsumerId:3"));
-        info.setAckType((byte) 1);
-        info.setFirstMessageId(createMessageId("FirstMessageId:4"));
-        info.setLastMessageId(createMessageId("LastMessageId:5"));
-        info.setMessageCount(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationTest.java
deleted file mode 100644
index bfa2300..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatchNotification
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationTest extends BaseCommandTestSupport {
-
-
-    public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatchNotification info = new MessageDispatchNotification();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatchNotification info = (MessageDispatchNotification) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setDeliverySequenceId(1);
-        info.setMessageId(createMessageId("MessageId:3"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchTest.java
deleted file mode 100644
index 41e40f7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatch
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchTest extends BaseCommandTestSupport {
-
-
-    public static MessageDispatchTest SINGLETON = new MessageDispatchTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatch info = new MessageDispatch();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatch info = (MessageDispatch) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setMessage(createMessage("Message:3"));
-        info.setRedeliveryCounter(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageIdTest.java
deleted file mode 100644
index fcdc62f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static MessageIdTest SINGLETON = new MessageIdTest();
-
-    public Object createObject() throws Exception {
-        MessageId info = new MessageId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageId info = (MessageId) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setProducerSequenceId(1);
-        info.setBrokerSequenceId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessagePullTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessagePullTest.java
deleted file mode 100644
index f07f827..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessagePullTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessagePull
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullTest extends BaseCommandTestSupport {
-
-
-    public static MessagePullTest SINGLETON = new MessagePullTest();
-
-    public Object createObject() throws Exception {
-        MessagePull info = new MessagePull();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessagePull info = (MessagePull) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTimeout(1);
-        info.setCorrelationId("CorrelationId:3");
-        info.setMessageId(createMessageId("MessageId:4"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java
deleted file mode 100644
index 07ef2ce..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for Message
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class MessageTestSupport extends BaseCommandTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Message info = (Message) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTransactionId(createTransactionId("TransactionId:3"));
-        info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4"));
-        info.setMessageId(createMessageId("MessageId:5"));
-        info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6"));
-        info.setGroupID("GroupID:7");
-        info.setGroupSequence(1);
-        info.setCorrelationId("CorrelationId:8");
-        info.setPersistent(true);
-        info.setExpiration(1);
-        info.setPriority((byte) 1);
-        info.setReplyTo(createActiveMQDestination("ReplyTo:9"));
-        info.setTimestamp(2);
-        info.setType("Type:10");
-        {
-            byte data[] = "Content:11".getBytes();
-            info.setContent(new org.apache.activemq.util.ByteSequence(data,0,data.length));
-}
-        {
-            byte data[] = "MarshalledProperties:12".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data,0,data.length));
-}
-        info.setDataStructure(createDataStructure("DataStructure:13"));
-        info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));
-        info.setCompressed(false);
-        info.setRedeliveryCounter(2);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:15");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setArrival(3);
-        info.setUserID("UserID:16");
-        info.setRecievedByDFBridge(true);
-        info.setDroppable(false);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("Cluster:17");
-            }
-            info.setCluster(value);
-        }
-        info.setBrokerInTime(4);
-        info.setBrokerOutTime(5);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterTest.java
deleted file mode 100644
index e07dc53..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for NetworkBridgeFilter
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport {
-
-
-    public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest();
-
-    public Object createObject() throws Exception {
-        NetworkBridgeFilter info = new NetworkBridgeFilter();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        NetworkBridgeFilter info = (NetworkBridgeFilter) object;
-
-        info.setNetworkTTL(1);
-        info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/PartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/PartialCommandTest.java
deleted file mode 100644
index a6e1f47..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/PartialCommandTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for PartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandTest extends DataFileGeneratorTestSupport {
-
-
-    public static PartialCommandTest SINGLETON = new PartialCommandTest();
-
-    public Object createObject() throws Exception {
-        PartialCommand info = new PartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        PartialCommand info = (PartialCommand) object;
-
-        info.setCommandId(1);
-        info.setData("Data:1".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerAckTest.java
deleted file mode 100644
index c2de958..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerAckTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckTest extends BaseCommandTestSupport {
-
-
-    public static ProducerAckTest SINGLETON = new ProducerAckTest();
-
-    public Object createObject() throws Exception {
-        ProducerAck info = new ProducerAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerAck info = (ProducerAck) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerIdTest.java
deleted file mode 100644
index a75953d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ProducerIdTest SINGLETON = new ProducerIdTest();
-
-    public Object createObject() throws Exception {
-        ProducerId info = new ProducerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerId info = (ProducerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-        info.setSessionId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerInfoTest.java
deleted file mode 100644
index d6bafb6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ProducerInfoTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerInfoTest extends BaseCommandTestSupport {
-
-
-    public static ProducerInfoTest SINGLETON = new ProducerInfoTest();
-
-    public Object createObject() throws Exception {
-        ProducerInfo info = new ProducerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerInfo info = (ProducerInfo) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setDispatchAsync(true);
-        info.setWindowSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/RemoveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/RemoveInfoTest.java
deleted file mode 100644
index 45f05a3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/RemoveInfoTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoTest extends BaseCommandTestSupport {
-
-
-    public static RemoveInfoTest SINGLETON = new RemoveInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveInfo info = new RemoveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveInfo info = (RemoveInfo) object;
-
-        info.setObjectId(createDataStructure("ObjectId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoTest.java
deleted file mode 100644
index f2e0fd0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveSubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {
-
-
-    public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setSubscriptionName("SubcriptionName:2");
-        info.setClientId("ClientId:3");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ReplayCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ReplayCommandTest.java
deleted file mode 100644
index 81028a7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ReplayCommandTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ReplayCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandTest extends BaseCommandTestSupport {
-
-
-    public static ReplayCommandTest SINGLETON = new ReplayCommandTest();
-
-    public Object createObject() throws Exception {
-        ReplayCommand info = new ReplayCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ReplayCommand info = (ReplayCommand) object;
-
-        info.setFirstNakNumber(1);
-        info.setLastNakNumber(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ResponseTest.java
deleted file mode 100644
index f757031..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for Response
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseTest extends BaseCommandTestSupport {
-
-
-    public static ResponseTest SINGLETON = new ResponseTest();
-
-    public Object createObject() throws Exception {
-        Response info = new Response();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Response info = (Response) object;
-
-        info.setCorrelationId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SessionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SessionIdTest.java
deleted file mode 100644
index 923f49b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SessionIdTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static SessionIdTest SINGLETON = new SessionIdTest();
-
-    public Object createObject() throws Exception {
-        SessionId info = new SessionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionId info = (SessionId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SessionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SessionInfoTest.java
deleted file mode 100644
index ed897c6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SessionInfoTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoTest extends BaseCommandTestSupport {
-
-
-    public static SessionInfoTest SINGLETON = new SessionInfoTest();
-
-    public Object createObject() throws Exception {
-        SessionInfo info = new SessionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionInfo info = (SessionInfo) object;
-
-        info.setSessionId(createSessionId("SessionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ShutdownInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ShutdownInfoTest.java
deleted file mode 100644
index 411d392..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/ShutdownInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ShutdownInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoTest extends BaseCommandTestSupport {
-
-
-    public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest();
-
-    public Object createObject() throws Exception {
-        ShutdownInfo info = new ShutdownInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ShutdownInfo info = (ShutdownInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SubscriptionInfoTest.java
deleted file mode 100644
index 1724bee..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/SubscriptionInfoTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoTest extends DataFileGeneratorTestSupport {
-
-
-    public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        SubscriptionInfo info = new SubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SubscriptionInfo info = (SubscriptionInfo) object;
-
-        info.setClientId("ClientId:1");
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubcriptionName:4");
-        info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/TransactionIdTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/TransactionIdTestSupport.java
deleted file mode 100644
index 6172e4d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/TransactionIdTestSupport.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionId info = (TransactionId) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/TransactionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/TransactionInfoTest.java
deleted file mode 100644
index 26e2f41..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/TransactionInfoTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoTest extends BaseCommandTestSupport {
-
-
-    public static TransactionInfoTest SINGLETON = new TransactionInfoTest();
-
-    public Object createObject() throws Exception {
-        TransactionInfo info = new TransactionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionInfo info = (TransactionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setType((byte) 1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/XATransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/XATransactionIdTest.java
deleted file mode 100644
index d79de31..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v4/XATransactionIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v4;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for XATransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static XATransactionIdTest SINGLETON = new XATransactionIdTest();
-
-    public Object createObject() throws Exception {
-        XATransactionId info = new XATransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        XATransactionId info = (XATransactionId) object;
-
-        info.setFormatId(1);
-        info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
-        info.setBranchQualifier("BranchQualifier:2".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BaseCommandTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BaseCommandTestSupport.java
deleted file mode 100644
index 55bfd64..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BaseCommandTestSupport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.openwire.v5;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BaseCommand NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- */
-public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BaseCommand info = (BaseCommand)object;
-        info.setCommandId(1);
-        info.setResponseRequired(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BrokerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BrokerIdTest.java
deleted file mode 100644
index d5ebc11..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BrokerIdTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static BrokerIdTest SINGLETON = new BrokerIdTest();
-
-    public Object createObject() throws Exception {
-        BrokerId info = new BrokerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerId info = (BrokerId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BrokerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BrokerInfoTest.java
deleted file mode 100644
index 26186f1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/BrokerInfoTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerInfoTest extends BaseCommandTestSupport {
-
-
-    public static BrokerInfoTest SINGLETON = new BrokerInfoTest();
-
-    public Object createObject() throws Exception {
-        BrokerInfo info = new BrokerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerInfo info = (BrokerInfo) object;
-
-        info.setBrokerId(createBrokerId("BrokerId:1"));
-        info.setBrokerURL("BrokerURL:2");
-        {
-            BrokerInfo value[] = new BrokerInfo[0];
-            for( int i=0; i < 0; i++ ) {
-                value[i] = createBrokerInfo("PeerBrokerInfos:3");
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        info.setBrokerName("BrokerName:4");
-        info.setSlaveBroker(true);
-        info.setMasterBroker(false);
-        info.setFaultTolerantConfiguration(true);
-        info.setDuplexConnection(false);
-        info.setNetworkConnection(true);
-        info.setConnectionId(1);
-        info.setBrokerUploadUrl("BrokerUploadUrl:5");
-        info.setNetworkProperties("NetworkProperties:6");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionControlTest.java
deleted file mode 100644
index fa2e0cc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionControlTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionControlTest SINGLETON = new ConnectionControlTest();
-
-    public Object createObject() throws Exception {
-        ConnectionControl info = new ConnectionControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionControl info = (ConnectionControl) object;
-
-        info.setClose(true);
-        info.setExit(false);
-        info.setFaultTolerant(true);
-        info.setResume(false);
-        info.setSuspend(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionErrorTest.java
deleted file mode 100644
index 52420e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionErrorTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionError
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest();
-
-    public Object createObject() throws Exception {
-        ConnectionError info = new ConnectionError();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionError info = (ConnectionError) object;
-
-        info.setException(createThrowable("Exception:1"));
-        info.setConnectionId(createConnectionId("ConnectionId:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionIdTest.java
deleted file mode 100644
index e69d674..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionIdTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ConnectionIdTest SINGLETON = new ConnectionIdTest();
-
-    public Object createObject() throws Exception {
-        ConnectionId info = new ConnectionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionId info = (ConnectionId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionInfoTest.java
deleted file mode 100644
index 776b2d2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConnectionInfoTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionInfoTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest();
-
-    public Object createObject() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionInfo info = (ConnectionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setClientId("ClientId:2");
-        info.setPassword("Password:3");
-        info.setUserName("UserName:4");
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setBrokerMasterConnector(true);
-        info.setManageable(false);
-        info.setClientMaster(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerControlTest.java
deleted file mode 100644
index 546f3cb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerControlTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlTest extends BaseCommandTestSupport {
-
-
-    public static ConsumerControlTest SINGLETON = new ConsumerControlTest();
-
-    public Object createObject() throws Exception {
-        ConsumerControl info = new ConsumerControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerControl info = (ConsumerControl) object;
-
-        info.setClose(true);
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setPrefetch(1);
-        info.setFlush(false);
-        info.setStart(true);
-        info.setStop(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerIdTest.java
deleted file mode 100644
index cfcac6a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ConsumerIdTest SINGLETON = new ConsumerIdTest();
-
-    public Object createObject() throws Exception {
-        ConsumerId info = new ConsumerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerId info = (ConsumerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setSessionId(1);
-        info.setValue(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerInfoTest.java
deleted file mode 100644
index 3316d20..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ConsumerInfoTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerInfoTest extends BaseCommandTestSupport {
-
-
-    public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest();
-
-    public Object createObject() throws Exception {
-        ConsumerInfo info = new ConsumerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerInfo info = (ConsumerInfo) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setBrowser(true);
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setPrefetchSize(1);
-        info.setMaximumPendingMessageLimit(2);
-        info.setDispatchAsync(false);
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubscriptionName:4");
-        info.setNoLocal(true);
-        info.setExclusive(false);
-        info.setRetroactive(true);
-        info.setPriority((byte) 1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6"));
-        info.setNetworkSubscription(false);
-        info.setOptimizedAcknowledge(true);
-        info.setNoRangeAcks(false);
-        {
-            ConsumerId value[] = new ConsumerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createConsumerId("NetworkConsumerPath:7");
-            }
-            info.setNetworkConsumerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ControlCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ControlCommandTest.java
deleted file mode 100644
index 04c41d3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ControlCommandTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ControlCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandTest extends BaseCommandTestSupport {
-
-
-    public static ControlCommandTest SINGLETON = new ControlCommandTest();
-
-    public Object createObject() throws Exception {
-        ControlCommand info = new ControlCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ControlCommand info = (ControlCommand) object;
-
-        info.setCommand("Command:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DataArrayResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DataArrayResponseTest.java
deleted file mode 100644
index 52d2dfd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DataArrayResponseTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DataArrayResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataArrayResponseTest extends ResponseTest {
-
-
-    public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest();
-
-    public Object createObject() throws Exception {
-        DataArrayResponse info = new DataArrayResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataArrayResponse info = (DataArrayResponse) object;
-
-        {
-            DataStructure value[] = new DataStructure[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createDataStructure("Data:1");
-            }
-            info.setData(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DataResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DataResponseTest.java
deleted file mode 100644
index d1047de..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DataResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DataResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseTest extends ResponseTest {
-
-
-    public static DataResponseTest SINGLETON = new DataResponseTest();
-
-    public Object createObject() throws Exception {
-        DataResponse info = new DataResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataResponse info = (DataResponse) object;
-
-        info.setData(createDataStructure("Data:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DestinationInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DestinationInfoTest.java
deleted file mode 100644
index 45ef248..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DestinationInfoTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DestinationInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DestinationInfoTest extends BaseCommandTestSupport {
-
-
-    public static DestinationInfoTest SINGLETON = new DestinationInfoTest();
-
-    public Object createObject() throws Exception {
-        DestinationInfo info = new DestinationInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DestinationInfo info = (DestinationInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setOperationType((byte) 1);
-        info.setTimeout(1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DiscoveryEventTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DiscoveryEventTest.java
deleted file mode 100644
index 2c2cbab..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/DiscoveryEventTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DiscoveryEvent
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventTest extends DataFileGeneratorTestSupport {
-
-
-    public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest();
-
-    public Object createObject() throws Exception {
-        DiscoveryEvent info = new DiscoveryEvent();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DiscoveryEvent info = (DiscoveryEvent) object;
-
-        info.setServiceName("ServiceName:1");
-        info.setBrokerName("BrokerName:2");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ExceptionResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ExceptionResponseTest.java
deleted file mode 100644
index 41d60e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ExceptionResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ExceptionResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseTest extends ResponseTest {
-
-
-    public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest();
-
-    public Object createObject() throws Exception {
-        ExceptionResponse info = new ExceptionResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ExceptionResponse info = (ExceptionResponse) object;
-
-        info.setException(createThrowable("Exception:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/FlushCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/FlushCommandTest.java
deleted file mode 100644
index c48a679..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/FlushCommandTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for FlushCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandTest extends BaseCommandTestSupport {
-
-
-    public static FlushCommandTest SINGLETON = new FlushCommandTest();
-
-    public Object createObject() throws Exception {
-        FlushCommand info = new FlushCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        FlushCommand info = (FlushCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/IntegerResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/IntegerResponseTest.java
deleted file mode 100644
index 7737769..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/IntegerResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for IntegerResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseTest extends ResponseTest {
-
-
-    public static IntegerResponseTest SINGLETON = new IntegerResponseTest();
-
-    public Object createObject() throws Exception {
-        IntegerResponse info = new IntegerResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        IntegerResponse info = (IntegerResponse) object;
-
-        info.setResult(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalQueueAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalQueueAckTest.java
deleted file mode 100644
index 0f1de7e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalQueueAckTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalQueueAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest();
-
-    public Object createObject() throws Exception {
-        JournalQueueAck info = new JournalQueueAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalQueueAck info = (JournalQueueAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageAck(createMessageAck("MessageAck:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTopicAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTopicAckTest.java
deleted file mode 100644
index d0856f8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTopicAckTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTopicAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest();
-
-    public Object createObject() throws Exception {
-        JournalTopicAck info = new JournalTopicAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTopicAck info = (JournalTopicAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageId(createMessageId("MessageId:2"));
-        info.setMessageSequenceId(1);
-        info.setSubscritionName("SubscritionName:3");
-        info.setClientId("ClientId:4");
-        info.setTransactionId(createTransactionId("TransactionId:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTraceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTraceTest.java
deleted file mode 100644
index 530f2ad..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTraceTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTrace
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTraceTest SINGLETON = new JournalTraceTest();
-
-    public Object createObject() throws Exception {
-        JournalTrace info = new JournalTrace();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTrace info = (JournalTrace) object;
-
-        info.setMessage("Message:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTransactionTest.java
deleted file mode 100644
index 4348e23..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/JournalTransactionTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTransaction
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTransactionTest SINGLETON = new JournalTransactionTest();
-
-    public Object createObject() throws Exception {
-        JournalTransaction info = new JournalTransaction();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTransaction info = (JournalTransaction) object;
-
-        info.setTransactionId(createTransactionId("TransactionId:1"));
-        info.setType((byte) 1);
-        info.setWasPrepared(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/KeepAliveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/KeepAliveInfoTest.java
deleted file mode 100644
index 48610fa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/KeepAliveInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for KeepAliveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoTest extends BaseCommandTestSupport {
-
-
-    public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest();
-
-    public Object createObject() throws Exception {
-        KeepAliveInfo info = new KeepAliveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        KeepAliveInfo info = (KeepAliveInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/LastPartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/LastPartialCommandTest.java
deleted file mode 100644
index edef39a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/LastPartialCommandTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for LastPartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandTest extends PartialCommandTest {
-
-
-    public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest();
-
-    public Object createObject() throws Exception {
-        LastPartialCommand info = new LastPartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LastPartialCommand info = (LastPartialCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/LocalTransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/LocalTransactionIdTest.java
deleted file mode 100644
index ba1f7c8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/LocalTransactionIdTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for LocalTransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest();
-
-    public Object createObject() throws Exception {
-        LocalTransactionId info = new LocalTransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LocalTransactionId info = (LocalTransactionId) object;
-
-        info.setValue(1);
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageAckTest.java
deleted file mode 100644
index 3185c79..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageAckTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckTest extends BaseCommandTestSupport {
-
-
-    public static MessageAckTest SINGLETON = new MessageAckTest();
-
-    public Object createObject() throws Exception {
-        MessageAck info = new MessageAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageAck info = (MessageAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setConsumerId(createConsumerId("ConsumerId:3"));
-        info.setAckType((byte) 1);
-        info.setFirstMessageId(createMessageId("FirstMessageId:4"));
-        info.setLastMessageId(createMessageId("LastMessageId:5"));
-        info.setMessageCount(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationTest.java
deleted file mode 100644
index 296aba7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatchNotification
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationTest extends BaseCommandTestSupport {
-
-
-    public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatchNotification info = new MessageDispatchNotification();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatchNotification info = (MessageDispatchNotification) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setDeliverySequenceId(1);
-        info.setMessageId(createMessageId("MessageId:3"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchTest.java
deleted file mode 100644
index a8c6987..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatch
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchTest extends BaseCommandTestSupport {
-
-
-    public static MessageDispatchTest SINGLETON = new MessageDispatchTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatch info = new MessageDispatch();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatch info = (MessageDispatch) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setMessage(createMessage("Message:3"));
-        info.setRedeliveryCounter(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageIdTest.java
deleted file mode 100644
index 78e8029..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static MessageIdTest SINGLETON = new MessageIdTest();
-
-    public Object createObject() throws Exception {
-        MessageId info = new MessageId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageId info = (MessageId) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setProducerSequenceId(1);
-        info.setBrokerSequenceId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessagePullTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessagePullTest.java
deleted file mode 100644
index f23fa67..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessagePullTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessagePull
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullTest extends BaseCommandTestSupport {
-
-
-    public static MessagePullTest SINGLETON = new MessagePullTest();
-
-    public Object createObject() throws Exception {
-        MessagePull info = new MessagePull();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessagePull info = (MessagePull) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTimeout(1);
-        info.setCorrelationId("CorrelationId:3");
-        info.setMessageId(createMessageId("MessageId:4"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java
deleted file mode 100644
index 811e555..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for Message
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class MessageTestSupport extends BaseCommandTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Message info = (Message) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTransactionId(createTransactionId("TransactionId:3"));
-        info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4"));
-        info.setMessageId(createMessageId("MessageId:5"));
-        info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6"));
-        info.setGroupID("GroupID:7");
-        info.setGroupSequence(1);
-        info.setCorrelationId("CorrelationId:8");
-        info.setPersistent(true);
-        info.setExpiration(1);
-        info.setPriority((byte) 1);
-        info.setReplyTo(createActiveMQDestination("ReplyTo:9"));
-        info.setTimestamp(2);
-        info.setType("Type:10");
-        {
-            byte data[] = "Content:11".getBytes();
-            info.setContent(new org.apache.activemq.util.ByteSequence(data,0,data.length));
-}
-        {
-            byte data[] = "MarshalledProperties:12".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data,0,data.length));
-}
-        info.setDataStructure(createDataStructure("DataStructure:13"));
-        info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));
-        info.setCompressed(false);
-        info.setRedeliveryCounter(2);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:15");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setArrival(3);
-        info.setUserID("UserID:16");
-        info.setRecievedByDFBridge(true);
-        info.setDroppable(false);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("Cluster:17");
-            }
-            info.setCluster(value);
-        }
-        info.setBrokerInTime(4);
-        info.setBrokerOutTime(5);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterTest.java
deleted file mode 100644
index e2e8fef..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for NetworkBridgeFilter
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport {
-
-
-    public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest();
-
-    public Object createObject() throws Exception {
-        NetworkBridgeFilter info = new NetworkBridgeFilter();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        NetworkBridgeFilter info = (NetworkBridgeFilter) object;
-
-        info.setNetworkTTL(1);
-        info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/PartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/PartialCommandTest.java
deleted file mode 100644
index c234eaf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/PartialCommandTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for PartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandTest extends DataFileGeneratorTestSupport {
-
-
-    public static PartialCommandTest SINGLETON = new PartialCommandTest();
-
-    public Object createObject() throws Exception {
-        PartialCommand info = new PartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        PartialCommand info = (PartialCommand) object;
-
-        info.setCommandId(1);
-        info.setData("Data:1".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerAckTest.java
deleted file mode 100644
index 48fd0c7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerAckTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckTest extends BaseCommandTestSupport {
-
-
-    public static ProducerAckTest SINGLETON = new ProducerAckTest();
-
-    public Object createObject() throws Exception {
-        ProducerAck info = new ProducerAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerAck info = (ProducerAck) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerIdTest.java
deleted file mode 100644
index e4994ff..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ProducerIdTest SINGLETON = new ProducerIdTest();
-
-    public Object createObject() throws Exception {
-        ProducerId info = new ProducerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerId info = (ProducerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-        info.setSessionId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerInfoTest.java
deleted file mode 100644
index 1dc0633..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ProducerInfoTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerInfoTest extends BaseCommandTestSupport {
-
-
-    public static ProducerInfoTest SINGLETON = new ProducerInfoTest();
-
-    public Object createObject() throws Exception {
-        ProducerInfo info = new ProducerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerInfo info = (ProducerInfo) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setDispatchAsync(true);
-        info.setWindowSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/RemoveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/RemoveInfoTest.java
deleted file mode 100644
index e083079..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/RemoveInfoTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoTest extends BaseCommandTestSupport {
-
-
-    public static RemoveInfoTest SINGLETON = new RemoveInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveInfo info = new RemoveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveInfo info = (RemoveInfo) object;
-
-        info.setObjectId(createDataStructure("ObjectId:1"));
-        info.setLastDeliveredSequenceId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoTest.java
deleted file mode 100644
index 8c6c056..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveSubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {
-
-
-    public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setSubscriptionName("SubcriptionName:2");
-        info.setClientId("ClientId:3");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ReplayCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ReplayCommandTest.java
deleted file mode 100644
index c4a8879..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ReplayCommandTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ReplayCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandTest extends BaseCommandTestSupport {
-
-
-    public static ReplayCommandTest SINGLETON = new ReplayCommandTest();
-
-    public Object createObject() throws Exception {
-        ReplayCommand info = new ReplayCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ReplayCommand info = (ReplayCommand) object;
-
-        info.setFirstNakNumber(1);
-        info.setLastNakNumber(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ResponseTest.java
deleted file mode 100644
index 4732749..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for Response
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseTest extends BaseCommandTestSupport {
-
-
-    public static ResponseTest SINGLETON = new ResponseTest();
-
-    public Object createObject() throws Exception {
-        Response info = new Response();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Response info = (Response) object;
-
-        info.setCorrelationId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SessionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SessionIdTest.java
deleted file mode 100644
index c38b446..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SessionIdTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static SessionIdTest SINGLETON = new SessionIdTest();
-
-    public Object createObject() throws Exception {
-        SessionId info = new SessionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionId info = (SessionId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SessionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SessionInfoTest.java
deleted file mode 100644
index 852a0d7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SessionInfoTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoTest extends BaseCommandTestSupport {
-
-
-    public static SessionInfoTest SINGLETON = new SessionInfoTest();
-
-    public Object createObject() throws Exception {
-        SessionInfo info = new SessionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionInfo info = (SessionInfo) object;
-
-        info.setSessionId(createSessionId("SessionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ShutdownInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ShutdownInfoTest.java
deleted file mode 100644
index af6e21a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/ShutdownInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ShutdownInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoTest extends BaseCommandTestSupport {
-
-
-    public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest();
-
-    public Object createObject() throws Exception {
-        ShutdownInfo info = new ShutdownInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ShutdownInfo info = (ShutdownInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SubscriptionInfoTest.java
deleted file mode 100644
index 5740f3e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/SubscriptionInfoTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoTest extends DataFileGeneratorTestSupport {
-
-
-    public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        SubscriptionInfo info = new SubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SubscriptionInfo info = (SubscriptionInfo) object;
-
-        info.setClientId("ClientId:1");
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubcriptionName:4");
-        info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/TransactionIdTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/TransactionIdTestSupport.java
deleted file mode 100644
index 25c5f5a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/TransactionIdTestSupport.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionId info = (TransactionId) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/TransactionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/TransactionInfoTest.java
deleted file mode 100644
index ab4a153..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/TransactionInfoTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoTest extends BaseCommandTestSupport {
-
-
-    public static TransactionInfoTest SINGLETON = new TransactionInfoTest();
-
-    public Object createObject() throws Exception {
-        TransactionInfo info = new TransactionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionInfo info = (TransactionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setType((byte) 1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/XATransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/XATransactionIdTest.java
deleted file mode 100644
index 742a8bd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v5/XATransactionIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v5;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for XATransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static XATransactionIdTest SINGLETON = new XATransactionIdTest();
-
-    public Object createObject() throws Exception {
-        XATransactionId info = new XATransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        XATransactionId info = (XATransactionId) object;
-
-        info.setFormatId(1);
-        info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
-        info.setBranchQualifier("BranchQualifier:2".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BaseCommandTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BaseCommandTestSupport.java
deleted file mode 100644
index 8c16b55..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BaseCommandTestSupport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.openwire.v6;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BaseCommand NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- */
-public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BaseCommand info = (BaseCommand)object;
-        info.setCommandId(1);
-        info.setResponseRequired(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BrokerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BrokerIdTest.java
deleted file mode 100644
index 0f5ed87..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BrokerIdTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static BrokerIdTest SINGLETON = new BrokerIdTest();
-
-    public Object createObject() throws Exception {
-        BrokerId info = new BrokerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerId info = (BrokerId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BrokerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BrokerInfoTest.java
deleted file mode 100644
index 8c7f26d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/BrokerInfoTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for BrokerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class BrokerInfoTest extends BaseCommandTestSupport {
-
-
-    public static BrokerInfoTest SINGLETON = new BrokerInfoTest();
-
-    public Object createObject() throws Exception {
-        BrokerInfo info = new BrokerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BrokerInfo info = (BrokerInfo) object;
-
-        info.setBrokerId(createBrokerId("BrokerId:1"));
-        info.setBrokerURL("BrokerURL:2");
-        {
-            BrokerInfo value[] = new BrokerInfo[0];
-            for( int i=0; i < 0; i++ ) {
-                value[i] = createBrokerInfo("PeerBrokerInfos:3");
-            }
-            info.setPeerBrokerInfos(value);
-        }
-        info.setBrokerName("BrokerName:4");
-        info.setSlaveBroker(true);
-        info.setMasterBroker(false);
-        info.setFaultTolerantConfiguration(true);
-        info.setDuplexConnection(false);
-        info.setNetworkConnection(true);
-        info.setConnectionId(1);
-        info.setBrokerUploadUrl("BrokerUploadUrl:5");
-        info.setNetworkProperties("NetworkProperties:6");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionControlTest.java
deleted file mode 100644
index f5aa0ca..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionControlTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionControlTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionControlTest SINGLETON = new ConnectionControlTest();
-
-    public Object createObject() throws Exception {
-        ConnectionControl info = new ConnectionControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionControl info = (ConnectionControl) object;
-
-        info.setClose(true);
-        info.setExit(false);
-        info.setFaultTolerant(true);
-        info.setResume(false);
-        info.setSuspend(true);
-        info.setConnectedBrokers("ConnectedBrokers:1");
-        info.setReconnectTo("ReconnectTo:2");
-        info.setRebalanceConnection(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionErrorTest.java
deleted file mode 100644
index 156ff9f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionErrorTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionError
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionErrorTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest();
-
-    public Object createObject() throws Exception {
-        ConnectionError info = new ConnectionError();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionError info = (ConnectionError) object;
-
-        info.setException(createThrowable("Exception:1"));
-        info.setConnectionId(createConnectionId("ConnectionId:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionIdTest.java
deleted file mode 100644
index 8fa7559..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionIdTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ConnectionIdTest SINGLETON = new ConnectionIdTest();
-
-    public Object createObject() throws Exception {
-        ConnectionId info = new ConnectionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionId info = (ConnectionId) object;
-
-        info.setValue("Value:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionInfoTest.java
deleted file mode 100644
index fb3ecdb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConnectionInfoTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConnectionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConnectionInfoTest extends BaseCommandTestSupport {
-
-
-    public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest();
-
-    public Object createObject() throws Exception {
-        ConnectionInfo info = new ConnectionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConnectionInfo info = (ConnectionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setClientId("ClientId:2");
-        info.setPassword("Password:3");
-        info.setUserName("UserName:4");
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setBrokerMasterConnector(true);
-        info.setManageable(false);
-        info.setClientMaster(true);
-        info.setFaultTolerant(false);
-        info.setFailoverReconnect(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerControlTest.java
deleted file mode 100644
index 275ce11..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerControlTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerControl
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerControlTest extends BaseCommandTestSupport {
-
-
-    public static ConsumerControlTest SINGLETON = new ConsumerControlTest();
-
-    public Object createObject() throws Exception {
-        ConsumerControl info = new ConsumerControl();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerControl info = (ConsumerControl) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setClose(true);
-        info.setConsumerId(createConsumerId("ConsumerId:2"));
-        info.setPrefetch(1);
-        info.setFlush(false);
-        info.setStart(true);
-        info.setStop(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerIdTest.java
deleted file mode 100644
index d322dfb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ConsumerIdTest SINGLETON = new ConsumerIdTest();
-
-    public Object createObject() throws Exception {
-        ConsumerId info = new ConsumerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerId info = (ConsumerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setSessionId(1);
-        info.setValue(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerInfoTest.java
deleted file mode 100644
index d8d1d0c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ConsumerInfoTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ConsumerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ConsumerInfoTest extends BaseCommandTestSupport {
-
-
-    public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest();
-
-    public Object createObject() throws Exception {
-        ConsumerInfo info = new ConsumerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ConsumerInfo info = (ConsumerInfo) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setBrowser(true);
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setPrefetchSize(1);
-        info.setMaximumPendingMessageLimit(2);
-        info.setDispatchAsync(false);
-        info.setSelector("Selector:3");
-        info.setSubscriptionName("SubscriptionName:4");
-        info.setNoLocal(true);
-        info.setExclusive(false);
-        info.setRetroactive(true);
-        info.setPriority((byte) 1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:5");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6"));
-        info.setNetworkSubscription(false);
-        info.setOptimizedAcknowledge(true);
-        info.setNoRangeAcks(false);
-        {
-            ConsumerId value[] = new ConsumerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createConsumerId("NetworkConsumerPath:7");
-            }
-            info.setNetworkConsumerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ControlCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ControlCommandTest.java
deleted file mode 100644
index 8b48365..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ControlCommandTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ControlCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ControlCommandTest extends BaseCommandTestSupport {
-
-
-    public static ControlCommandTest SINGLETON = new ControlCommandTest();
-
-    public Object createObject() throws Exception {
-        ControlCommand info = new ControlCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ControlCommand info = (ControlCommand) object;
-
-        info.setCommand("Command:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DataArrayResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DataArrayResponseTest.java
deleted file mode 100644
index 1fe80fd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DataArrayResponseTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DataArrayResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataArrayResponseTest extends ResponseTest {
-
-
-    public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest();
-
-    public Object createObject() throws Exception {
-        DataArrayResponse info = new DataArrayResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataArrayResponse info = (DataArrayResponse) object;
-
-        {
-            DataStructure value[] = new DataStructure[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createDataStructure("Data:1");
-            }
-            info.setData(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DataResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DataResponseTest.java
deleted file mode 100644
index e7728ea..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DataResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DataResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DataResponseTest extends ResponseTest {
-
-
-    public static DataResponseTest SINGLETON = new DataResponseTest();
-
-    public Object createObject() throws Exception {
-        DataResponse info = new DataResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DataResponse info = (DataResponse) object;
-
-        info.setData(createDataStructure("Data:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DestinationInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DestinationInfoTest.java
deleted file mode 100644
index ac065e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DestinationInfoTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DestinationInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DestinationInfoTest extends BaseCommandTestSupport {
-
-
-    public static DestinationInfoTest SINGLETON = new DestinationInfoTest();
-
-    public Object createObject() throws Exception {
-        DestinationInfo info = new DestinationInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DestinationInfo info = (DestinationInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setOperationType((byte) 1);
-        info.setTimeout(1);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DiscoveryEventTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DiscoveryEventTest.java
deleted file mode 100644
index de87bd9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/DiscoveryEventTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for DiscoveryEvent
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class DiscoveryEventTest extends DataFileGeneratorTestSupport {
-
-
-    public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest();
-
-    public Object createObject() throws Exception {
-        DiscoveryEvent info = new DiscoveryEvent();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        DiscoveryEvent info = (DiscoveryEvent) object;
-
-        info.setServiceName("ServiceName:1");
-        info.setBrokerName("BrokerName:2");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ExceptionResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ExceptionResponseTest.java
deleted file mode 100644
index 9471dfd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ExceptionResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ExceptionResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ExceptionResponseTest extends ResponseTest {
-
-
-    public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest();
-
-    public Object createObject() throws Exception {
-        ExceptionResponse info = new ExceptionResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ExceptionResponse info = (ExceptionResponse) object;
-
-        info.setException(createThrowable("Exception:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/FlushCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/FlushCommandTest.java
deleted file mode 100644
index 46f4bb4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/FlushCommandTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for FlushCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class FlushCommandTest extends BaseCommandTestSupport {
-
-
-    public static FlushCommandTest SINGLETON = new FlushCommandTest();
-
-    public Object createObject() throws Exception {
-        FlushCommand info = new FlushCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        FlushCommand info = (FlushCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/IntegerResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/IntegerResponseTest.java
deleted file mode 100644
index 999b047..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/IntegerResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for IntegerResponse
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class IntegerResponseTest extends ResponseTest {
-
-
-    public static IntegerResponseTest SINGLETON = new IntegerResponseTest();
-
-    public Object createObject() throws Exception {
-        IntegerResponse info = new IntegerResponse();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        IntegerResponse info = (IntegerResponse) object;
-
-        info.setResult(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalQueueAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalQueueAckTest.java
deleted file mode 100644
index 7757277..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalQueueAckTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalQueueAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalQueueAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest();
-
-    public Object createObject() throws Exception {
-        JournalQueueAck info = new JournalQueueAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalQueueAck info = (JournalQueueAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageAck(createMessageAck("MessageAck:2"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTopicAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTopicAckTest.java
deleted file mode 100644
index dfcb658..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTopicAckTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTopicAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTopicAckTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest();
-
-    public Object createObject() throws Exception {
-        JournalTopicAck info = new JournalTopicAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTopicAck info = (JournalTopicAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setMessageId(createMessageId("MessageId:2"));
-        info.setMessageSequenceId(1);
-        info.setSubscritionName("SubscritionName:3");
-        info.setClientId("ClientId:4");
-        info.setTransactionId(createTransactionId("TransactionId:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTraceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTraceTest.java
deleted file mode 100644
index 9406aeb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTraceTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTrace
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTraceTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTraceTest SINGLETON = new JournalTraceTest();
-
-    public Object createObject() throws Exception {
-        JournalTrace info = new JournalTrace();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTrace info = (JournalTrace) object;
-
-        info.setMessage("Message:1");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTransactionTest.java
deleted file mode 100644
index d61fe9f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/JournalTransactionTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for JournalTransaction
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class JournalTransactionTest extends DataFileGeneratorTestSupport {
-
-
-    public static JournalTransactionTest SINGLETON = new JournalTransactionTest();
-
-    public Object createObject() throws Exception {
-        JournalTransaction info = new JournalTransaction();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        JournalTransaction info = (JournalTransaction) object;
-
-        info.setTransactionId(createTransactionId("TransactionId:1"));
-        info.setType((byte) 1);
-        info.setWasPrepared(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/KeepAliveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/KeepAliveInfoTest.java
deleted file mode 100644
index 67d61f0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/KeepAliveInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for KeepAliveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class KeepAliveInfoTest extends BaseCommandTestSupport {
-
-
-    public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest();
-
-    public Object createObject() throws Exception {
-        KeepAliveInfo info = new KeepAliveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        KeepAliveInfo info = (KeepAliveInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/LastPartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/LastPartialCommandTest.java
deleted file mode 100644
index 4ede0f5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/LastPartialCommandTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for LastPartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LastPartialCommandTest extends PartialCommandTest {
-
-
-    public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest();
-
-    public Object createObject() throws Exception {
-        LastPartialCommand info = new LastPartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LastPartialCommand info = (LastPartialCommand) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/LocalTransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/LocalTransactionIdTest.java
deleted file mode 100644
index 02ea10d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/LocalTransactionIdTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for LocalTransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class LocalTransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest();
-
-    public Object createObject() throws Exception {
-        LocalTransactionId info = new LocalTransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        LocalTransactionId info = (LocalTransactionId) object;
-
-        info.setValue(1);
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageAckTest.java
deleted file mode 100644
index b66c6ce..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageAckTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageAckTest extends BaseCommandTestSupport {
-
-
-    public static MessageAckTest SINGLETON = new MessageAckTest();
-
-    public Object createObject() throws Exception {
-        MessageAck info = new MessageAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageAck info = (MessageAck) object;
-
-        info.setDestination(createActiveMQDestination("Destination:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setConsumerId(createConsumerId("ConsumerId:3"));
-        info.setAckType((byte) 1);
-        info.setFirstMessageId(createMessageId("FirstMessageId:4"));
-        info.setLastMessageId(createMessageId("LastMessageId:5"));
-        info.setMessageCount(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationTest.java
deleted file mode 100644
index aa805ca..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatchNotification
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchNotificationTest extends BaseCommandTestSupport {
-
-
-    public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatchNotification info = new MessageDispatchNotification();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatchNotification info = (MessageDispatchNotification) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setDeliverySequenceId(1);
-        info.setMessageId(createMessageId("MessageId:3"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchTest.java
deleted file mode 100644
index bbc0459..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageDispatch
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageDispatchTest extends BaseCommandTestSupport {
-
-
-    public static MessageDispatchTest SINGLETON = new MessageDispatchTest();
-
-    public Object createObject() throws Exception {
-        MessageDispatch info = new MessageDispatch();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageDispatch info = (MessageDispatch) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setMessage(createMessage("Message:3"));
-        info.setRedeliveryCounter(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageIdTest.java
deleted file mode 100644
index 1f61361..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessageId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessageIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static MessageIdTest SINGLETON = new MessageIdTest();
-
-    public Object createObject() throws Exception {
-        MessageId info = new MessageId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessageId info = (MessageId) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setProducerSequenceId(1);
-        info.setBrokerSequenceId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessagePullTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessagePullTest.java
deleted file mode 100644
index f0d48a6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessagePullTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for MessagePull
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class MessagePullTest extends BaseCommandTestSupport {
-
-
-    public static MessagePullTest SINGLETON = new MessagePullTest();
-
-    public Object createObject() throws Exception {
-        MessagePull info = new MessagePull();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        MessagePull info = (MessagePull) object;
-
-        info.setConsumerId(createConsumerId("ConsumerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTimeout(1);
-        info.setCorrelationId("CorrelationId:3");
-        info.setMessageId(createMessageId("MessageId:4"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageTestSupport.java
deleted file mode 100644
index fd2f608..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/MessageTestSupport.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for Message
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class MessageTestSupport extends BaseCommandTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Message info = (Message) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setTransactionId(createTransactionId("TransactionId:3"));
-        info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4"));
-        info.setMessageId(createMessageId("MessageId:5"));
-        info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6"));
-        info.setGroupID("GroupID:7");
-        info.setGroupSequence(1);
-        info.setCorrelationId("CorrelationId:8");
-        info.setPersistent(true);
-        info.setExpiration(1);
-        info.setPriority((byte) 1);
-        info.setReplyTo(createActiveMQDestination("ReplyTo:9"));
-        info.setTimestamp(2);
-        info.setType("Type:10");
-        {
-            byte data[] = "Content:11".getBytes();
-            info.setContent(new org.apache.activemq.util.ByteSequence(data,0,data.length));
-}
-        {
-            byte data[] = "MarshalledProperties:12".getBytes();
-            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data,0,data.length));
-}
-        info.setDataStructure(createDataStructure("DataStructure:13"));
-        info.setTargetConsumerId(createConsumerId("TargetConsumerId:14"));
-        info.setCompressed(false);
-        info.setRedeliveryCounter(2);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:15");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setArrival(3);
-        info.setUserID("UserID:16");
-        info.setRecievedByDFBridge(true);
-        info.setDroppable(false);
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("Cluster:17");
-            }
-            info.setCluster(value);
-        }
-        info.setBrokerInTime(4);
-        info.setBrokerOutTime(5);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterTest.java
deleted file mode 100644
index e6bcf54..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for NetworkBridgeFilter
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport {
-
-
-    public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest();
-
-    public Object createObject() throws Exception {
-        NetworkBridgeFilter info = new NetworkBridgeFilter();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        NetworkBridgeFilter info = (NetworkBridgeFilter) object;
-
-        info.setNetworkTTL(1);
-        info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/PartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/PartialCommandTest.java
deleted file mode 100644
index 2f0e8ee..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/PartialCommandTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for PartialCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class PartialCommandTest extends DataFileGeneratorTestSupport {
-
-
-    public static PartialCommandTest SINGLETON = new PartialCommandTest();
-
-    public Object createObject() throws Exception {
-        PartialCommand info = new PartialCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        PartialCommand info = (PartialCommand) object;
-
-        info.setCommandId(1);
-        info.setData("Data:1".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerAckTest.java
deleted file mode 100644
index f4db4a9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerAckTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerAck
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerAckTest extends BaseCommandTestSupport {
-
-
-    public static ProducerAckTest SINGLETON = new ProducerAckTest();
-
-    public Object createObject() throws Exception {
-        ProducerAck info = new ProducerAck();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerAck info = (ProducerAck) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerIdTest.java
deleted file mode 100644
index 17c88d3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static ProducerIdTest SINGLETON = new ProducerIdTest();
-
-    public Object createObject() throws Exception {
-        ProducerId info = new ProducerId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerId info = (ProducerId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-        info.setSessionId(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerInfoTest.java
deleted file mode 100644
index d960980..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ProducerInfoTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ProducerInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ProducerInfoTest extends BaseCommandTestSupport {
-
-
-    public static ProducerInfoTest SINGLETON = new ProducerInfoTest();
-
-    public Object createObject() throws Exception {
-        ProducerInfo info = new ProducerInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ProducerInfo info = (ProducerInfo) object;
-
-        info.setProducerId(createProducerId("ProducerId:1"));
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        {
-            BrokerId value[] = new BrokerId[2];
-            for( int i=0; i < 2; i++ ) {
-                value[i] = createBrokerId("BrokerPath:3");
-            }
-            info.setBrokerPath(value);
-        }
-        info.setDispatchAsync(true);
-        info.setWindowSize(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/RemoveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/RemoveInfoTest.java
deleted file mode 100644
index 5033935..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/RemoveInfoTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveInfoTest extends BaseCommandTestSupport {
-
-
-    public static RemoveInfoTest SINGLETON = new RemoveInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveInfo info = new RemoveInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveInfo info = (RemoveInfo) object;
-
-        info.setObjectId(createDataStructure("ObjectId:1"));
-        info.setLastDeliveredSequenceId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoTest.java
deleted file mode 100644
index 9b86af5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for RemoveSubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {
-
-
-    public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setSubcriptionName("SubcriptionName:2");
-        info.setClientId("ClientId:3");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ReplayCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ReplayCommandTest.java
deleted file mode 100644
index d26de25..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ReplayCommandTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ReplayCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ReplayCommandTest extends BaseCommandTestSupport {
-
-
-    public static ReplayCommandTest SINGLETON = new ReplayCommandTest();
-
-    public Object createObject() throws Exception {
-        ReplayCommand info = new ReplayCommand();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ReplayCommand info = (ReplayCommand) object;
-
-        info.setFirstNakNumber(1);
-        info.setLastNakNumber(2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ResponseTest.java
deleted file mode 100644
index 8153f23..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ResponseTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for Response
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ResponseTest extends BaseCommandTestSupport {
-
-
-    public static ResponseTest SINGLETON = new ResponseTest();
-
-    public Object createObject() throws Exception {
-        Response info = new Response();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        Response info = (Response) object;
-
-        info.setCorrelationId(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SessionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SessionIdTest.java
deleted file mode 100644
index 404fb20..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SessionIdTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionIdTest extends DataFileGeneratorTestSupport {
-
-
-    public static SessionIdTest SINGLETON = new SessionIdTest();
-
-    public Object createObject() throws Exception {
-        SessionId info = new SessionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionId info = (SessionId) object;
-
-        info.setConnectionId("ConnectionId:1");
-        info.setValue(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SessionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SessionInfoTest.java
deleted file mode 100644
index 2d69568..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SessionInfoTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SessionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SessionInfoTest extends BaseCommandTestSupport {
-
-
-    public static SessionInfoTest SINGLETON = new SessionInfoTest();
-
-    public Object createObject() throws Exception {
-        SessionInfo info = new SessionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SessionInfo info = (SessionInfo) object;
-
-        info.setSessionId(createSessionId("SessionId:1"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ShutdownInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ShutdownInfoTest.java
deleted file mode 100644
index 5a90219..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/ShutdownInfoTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for ShutdownInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class ShutdownInfoTest extends BaseCommandTestSupport {
-
-
-    public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest();
-
-    public Object createObject() throws Exception {
-        ShutdownInfo info = new ShutdownInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        ShutdownInfo info = (ShutdownInfo) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SubscriptionInfoTest.java
deleted file mode 100644
index df5e24e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/SubscriptionInfoTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for SubscriptionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class SubscriptionInfoTest extends DataFileGeneratorTestSupport {
-
-
-    public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest();
-
-    public Object createObject() throws Exception {
-        SubscriptionInfo info = new SubscriptionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        SubscriptionInfo info = (SubscriptionInfo) object;
-
-        info.setClientId("ClientId:1");
-        info.setDestination(createActiveMQDestination("Destination:2"));
-        info.setSelector("Selector:3");
-        info.setSubcriptionName("SubcriptionName:4");
-        info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/TransactionIdTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/TransactionIdTestSupport.java
deleted file mode 100644
index f2f0ec9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/TransactionIdTestSupport.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport {
-
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionId info = (TransactionId) object;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/TransactionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/TransactionInfoTest.java
deleted file mode 100644
index fb4e5ca..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/TransactionInfoTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for TransactionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class TransactionInfoTest extends BaseCommandTestSupport {
-
-
-    public static TransactionInfoTest SINGLETON = new TransactionInfoTest();
-
-    public Object createObject() throws Exception {
-        TransactionInfo info = new TransactionInfo();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        TransactionInfo info = (TransactionInfo) object;
-
-        info.setConnectionId(createConnectionId("ConnectionId:1"));
-        info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setType((byte) 1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/XATransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/XATransactionIdTest.java
deleted file mode 100644
index c4e1c04..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v6/XATransactionIdTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- * 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.openwire.v6;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
-/**
- * Test case for the OpenWire marshalling for XATransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
- * 
- */
-public class XATransactionIdTest extends TransactionIdTestSupport {
-
-
-    public static XATransactionIdTest SINGLETON = new XATransactionIdTest();
-
-    public Object createObject() throws Exception {
-        XATransactionId info = new XATransactionId();
-        populateObject(info);
-        return info;
-    }
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        XATransactionId info = (XATransactionId) object;
-
-        info.setFormatId(1);
-        info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
-        info.setBranchQualifier("BranchQualifier:2".getBytes());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BaseCommandTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BaseCommandTestSupport.java
deleted file mode 100644
index f741fba..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BaseCommandTestSupport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.openwire.v7;
-
-import org.apache.activemq.command.BaseCommand;
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
-
-/**
- * Test case for the OpenWire marshalling for BaseCommand NOTE!: This file is
- * auto generated - do not modify! if you need to make a change, please see the
- * modify the groovy scripts in the under src/gram/script and then use maven
- * openwire:generate to regenerate this file.
- * 
- */
-public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
-
-    protected void populateObject(Object object) throws Exception {
-        super.populateObject(object);
-        BaseCommand info = (BaseCommand)object;
-        info.setCommandId(1);
-        info.setResponseRequired(true);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BrokerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BrokerIdTest.java
deleted file mode 100644
index b701693..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BrokerIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BrokerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BrokerInfoTest.java
deleted file mode 100644
index 657e60f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/BrokerInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionControlTest.java
deleted file mode 100644
index cff204e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionControlTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionErrorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionErrorTest.java
deleted file mode 100644
index 46cfa3c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionErrorTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionIdTest.java
deleted file mode 100644
index 54fc16c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionInfoTest.java
deleted file mode 100644
index c059052..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConnectionInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerControlTest.java
deleted file mode 100644
index df1b480..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerControlTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerIdTest.java
deleted file mode 100644
index 32db0ac..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerInfoTest.java
deleted file mode 100644
index e3a1207..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ConsumerInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ControlCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ControlCommandTest.java
deleted file mode 100644
index ca402e6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ControlCommandTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DataArrayResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DataArrayResponseTest.java
deleted file mode 100644
index 67e23c6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DataArrayResponseTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DataResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DataResponseTest.java
deleted file mode 100644
index ef239ce..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DataResponseTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DestinationInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DestinationInfoTest.java
deleted file mode 100644
index 3d36583..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DestinationInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DiscoveryEventTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DiscoveryEventTest.java
deleted file mode 100644
index 939ed8c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/DiscoveryEventTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ExceptionResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ExceptionResponseTest.java
deleted file mode 100644
index d05f918..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ExceptionResponseTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/FlushCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/FlushCommandTest.java
deleted file mode 100644
index 21275c7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/FlushCommandTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/IntegerResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/IntegerResponseTest.java
deleted file mode 100644
index 88c6e33..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/IntegerResponseTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalQueueAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalQueueAckTest.java
deleted file mode 100644
index f12c69c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalQueueAckTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTopicAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTopicAckTest.java
deleted file mode 100644
index fe48a8d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTopicAckTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTraceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTraceTest.java
deleted file mode 100644
index fce7d59..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTraceTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTransactionTest.java
deleted file mode 100644
index 8b9bd07..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/JournalTransactionTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/KeepAliveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/KeepAliveInfoTest.java
deleted file mode 100644
index ba6a23a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/KeepAliveInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/LastPartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/LastPartialCommandTest.java
deleted file mode 100644
index 9e5922d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/LastPartialCommandTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/LocalTransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/LocalTransactionIdTest.java
deleted file mode 100644
index c70c948..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/LocalTransactionIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageAckTest.java
deleted file mode 100644
index 8a00f6e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageAckTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationTest.java
deleted file mode 100644
index b661a23..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchTest.java
deleted file mode 100644
index 05a0384..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageIdTest.java
deleted file mode 100644
index 484b037..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessagePullTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessagePullTest.java
deleted file mode 100644
index 279c089..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessagePullTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageTestSupport.java
deleted file mode 100644
index e4cb894..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/MessageTestSupport.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterTest.java
deleted file mode 100644
index 3cb5e24..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/PartialCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/PartialCommandTest.java
deleted file mode 100644
index dceac83..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/PartialCommandTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerAckTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerAckTest.java
deleted file mode 100644
index 7310456..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerAckTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerIdTest.java
deleted file mode 100644
index 2a8c13b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerInfoTest.java
deleted file mode 100644
index 474a55e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ProducerInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/RemoveInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/RemoveInfoTest.java
deleted file mode 100644
index 01b2639..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/RemoveInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoTest.java
deleted file mode 100644
index 4159ee6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ReplayCommandTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ReplayCommandTest.java
deleted file mode 100644
index 8a1e8e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ReplayCommandTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ResponseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ResponseTest.java
deleted file mode 100644
index 1d64767..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ResponseTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SessionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SessionIdTest.java
deleted file mode 100644
index d12c964..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SessionIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SessionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SessionInfoTest.java
deleted file mode 100644
index cee5c07..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SessionInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ShutdownInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ShutdownInfoTest.java
deleted file mode 100644
index 66dda57..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/ShutdownInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SubscriptionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SubscriptionInfoTest.java
deleted file mode 100644
index 0a9e934..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/SubscriptionInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/TransactionIdTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/TransactionIdTestSupport.java
deleted file mode 100644
index 9706f12..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/TransactionIdTestSupport.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/TransactionInfoTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/TransactionInfoTest.java
deleted file mode 100644
index 3132a2b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/TransactionInfoTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/XATransactionIdTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/XATransactionIdTest.java
deleted file mode 100644
index 79db316..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v7/XATransactionIdTest.java
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
deleted file mode 100644
index 94883bf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.perf;
-
-import java.io.File;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-
-/**
- * 
- */
-public class AMQStoreDurableTopicTest extends SimpleDurableTopicTest {
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        File dataFileDir = new File("target/test-amq-data/perfTest/amqdb");
-        dataFileDir.mkdirs();
-        answer.setDeleteAllMessagesOnStartup(true);
-        AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
-        //adaptor.setArchiveDataLogs(true);
-        //adaptor.setMaxFileLength(1024 * 64);       
-        
-        answer.setDataDirectoryFile(dataFileDir);
-        answer.setPersistenceAdapter(adaptor);
-        answer.addConnector(uri);
-    }
-    
-    protected void setUp() throws Exception {
-        numberofProducers=1;
-        numberOfConsumers=1;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
deleted file mode 100644
index 6b47598..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.perf;
-
-import java.io.File;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-
-/**
- * 
- */
-public class AMQStoreQueueTest extends SimpleQueueTest {
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-
-        File dataFileDir = new File("target/test-amq-data/perfTest/amq");
-
-        AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
-        adaptor.setDirectory(dataFileDir);
-
-        answer.setPersistenceAdapter(adaptor);
-        answer.addConnector(uri);
-        answer.setDeleteAllMessagesOnStartup(true);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java
deleted file mode 100644
index 9ee3ab7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.perf;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ConnectionChurnTest extends TestCase {
-    protected static final int CONNECTION_COUNT = 200;
-    private static final Logger LOG = LoggerFactory.getLogger(ConnectionChurnTest.class);
-    protected BrokerService broker;
-    protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL+"?transport.closeAsync=false";
-    protected int topicCount;
-
-    public void testPerformance() throws Exception {
-        ConnectionFactory factory = createConnectionFactory();
-        List<Connection> list = new ArrayList();
-        for (int i = 0; i < CONNECTION_COUNT; i++) {
-            Connection connection = factory.createConnection();
-            connection.start();
-            list.add(connection);
-            LOG.info("Created " + i);
-            if (i % 100 == 0) {
-                closeConnections(list);
-            }
-        }
-        closeConnections(list);
-    }
-
-    protected void closeConnections(List<Connection> list) throws JMSException {
-        for (Connection c : list) {
-            c.close();
-        }
-        for (TransportConnector tc : broker.getTransportConnectors()) {
-            System.out.println(tc.getConnections().size());
-        }
-        list.clear();
-    }
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory()
-            throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(
-                ActiveMQConnection.DEFAULT_BROKER_URL);
-        return cf;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.setPersistent(false);
-        answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java
deleted file mode 100644
index 1f46005..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class InactiveDurableTopicTest extends TestCase {
-    private static final transient Logger LOG = LoggerFactory.getLogger(InactiveDurableTopicTest.class);
-
-    private static final int MESSAGE_COUNT = 2000;
-    private static final String DEFAULT_PASSWORD = "";
-    private static final String USERNAME = "testuser";
-    private static final String CLIENTID = "mytestclient";
-    private static final String TOPIC_NAME = "testevent";
-    private static final String SUBID = "subscription1";
-    private static final int DELIVERY_MODE = javax.jms.DeliveryMode.PERSISTENT;
-    private static final int DELIVERY_PRIORITY = javax.jms.Message.DEFAULT_PRIORITY;
-    private Connection connection;
-    private MessageProducer publisher;
-    private TopicSubscriber subscriber;
-    private Topic topic;
-    private Session session;
-    private ActiveMQConnectionFactory connectionFactory;
-    private BrokerService broker;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        broker = new BrokerService();
-
-        //broker.setPersistenceAdapter(new KahaPersistenceAdapter());
-        /*
-         * JournalPersistenceAdapterFactory factory = new
-         * JournalPersistenceAdapterFactory();
-         * factory.setDataDirectoryFile(broker.getDataDirectory());
-         * factory.setTaskRunnerFactory(broker.getTaskRunnerFactory());
-         * factory.setUseJournal(false); broker.setPersistenceFactory(factory);
-         */
-        broker.addConnector(ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL);
-        broker.start();
-        connectionFactory = new ActiveMQConnectionFactory(ActiveMQConnectionFactory.DEFAULT_BROKER_URL);
-        /*
-         * Doesn't matter if you enable or disable these, so just leaving them
-         * out for this test case connectionFactory.setAlwaysSessionAsync(true);
-         * connectionFactory.setAsyncDispatch(true);
-         */
-        connectionFactory.setUseAsyncSend(true);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        broker.stop();
-    }
-
-    public void test1CreateSubscription() throws Exception {
-        try {
-            /*
-             * Step 1 - Establish a connection with a client id and create a
-             * durable subscription
-             */
-            connection = connectionFactory.createConnection(USERNAME, DEFAULT_PASSWORD);
-            assertNotNull(connection);
-            connection.setClientID(CLIENTID);
-            connection.start();
-            session = connection.createSession(false, javax.jms.Session.CLIENT_ACKNOWLEDGE);
-            assertNotNull(session);
-            topic = session.createTopic(TOPIC_NAME);
-            assertNotNull(topic);
-            subscriber = session.createDurableSubscriber(topic, SUBID, "", false);
-            assertNotNull(subscriber);
-            subscriber.close();
-            session.close();
-            connection.close();
-        } catch (JMSException ex) {
-            try {
-                connection.close();
-            } catch (Exception ignore) {
-            }
-            throw new AssertionFailedError("Create Subscription caught: " + ex);
-        }
-    }
-
-    public void test2ProducerTestCase() {
-        /*
-         * Step 2 - Establish a connection without a client id and create a
-         * producer and start pumping messages. We will get hung
-         */
-        try {
-            connection = connectionFactory.createConnection(USERNAME, DEFAULT_PASSWORD);
-            assertNotNull(connection);
-            session = connection.createSession(false, javax.jms.Session.CLIENT_ACKNOWLEDGE);
-            assertNotNull(session);
-            topic = session.createTopic(TOPIC_NAME);
-            assertNotNull(topic);
-            publisher = session.createProducer(topic);
-            assertNotNull(publisher);
-            MapMessage msg = session.createMapMessage();
-            assertNotNull(msg);
-            msg.setString("key1", "value1");
-            int loop;
-            for (loop = 0; loop < MESSAGE_COUNT; loop++) {
-                msg.setInt("key2", loop);
-                publisher.send(msg, DELIVERY_MODE, DELIVERY_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
-                if (loop % 5000 == 0) {
-                    LOG.info("Sent " + loop + " messages");
-                }
-            }
-            Assert.assertEquals(loop, MESSAGE_COUNT);
-            publisher.close();
-            session.close();
-            connection.stop();
-            connection.stop();
-        } catch (JMSException ex) {
-            try {
-                connection.close();
-            } catch (Exception ignore) {
-            }
-            throw new AssertionFailedError("Create Subscription caught: " + ex);
-        }
-    }
-
-    public void test3CreateSubscription() throws Exception {
-        try {
-            /*
-             * Step 1 - Establish a connection with a client id and create a
-             * durable subscription
-             */
-            connection = connectionFactory.createConnection(USERNAME, DEFAULT_PASSWORD);
-            assertNotNull(connection);
-            connection.setClientID(CLIENTID);
-            connection.start();
-            session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-            assertNotNull(session);
-            topic = session.createTopic(TOPIC_NAME);
-            assertNotNull(topic);
-            subscriber = session.createDurableSubscriber(topic, SUBID, "", false);
-            assertNotNull(subscriber);
-            int loop;
-            for (loop = 0; loop < MESSAGE_COUNT; loop++) {
-                Message msg = subscriber.receive();
-                if (loop % 500 == 0) {
-                    LOG.debug("Received " + loop + " messages");
-                }
-            }
-            this.assertEquals(loop, MESSAGE_COUNT);
-            subscriber.close();
-            session.close();
-            connection.close();
-        } catch (JMSException ex) {
-            try {
-                connection.close();
-            } catch (Exception ignore) {
-            }
-            throw new AssertionFailedError("Create Subscription caught: " + ex);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java
deleted file mode 100644
index 4854ea6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TopicSubscriber;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class InactiveQueueTest extends TestCase {
-    private static final transient Logger LOG = LoggerFactory.getLogger(InactiveQueueTest.class);
-
-    private static final int MESSAGE_COUNT = 0;
-    private static final String DEFAULT_PASSWORD = "";
-    private static final String USERNAME = "testuser";
-    private static final String CLIENTID = "mytestclient";
-    private static final String QUEUE_NAME = "testevent";
-    private static final int DELIVERY_MODE = javax.jms.DeliveryMode.PERSISTENT;
-    private static final int DELIVERY_PRIORITY = javax.jms.Message.DEFAULT_PRIORITY;
-    
-    ActiveMQConnectionFactory connectionFactory;
-    BrokerService broker;
-
-    private Connection connection;
-    private MessageProducer publisher;
-    private TopicSubscriber subscriber;
-    private Destination destination;
-    private Session session;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        broker = new BrokerService();
-
-        // broker.setPersistenceAdapter(new KahaPersistenceAdapter(new File
-        // ("TEST_STUFD")));
-        /*
-         * JournalPersistenceAdapterFactory factory = new
-         * JournalPersistenceAdapterFactory();
-         * factory.setDataDirectoryFile(broker.getDataDirectory());
-         * factory.setTaskRunnerFactory(broker.getTaskRunnerFactory());
-         * factory.setUseJournal(false); broker.setPersistenceFactory(factory);
-         */
-        broker.addConnector(ActiveMQConnectionFactory.DEFAULT_BROKER_URL);
-        broker.start();
-        connectionFactory = new ActiveMQConnectionFactory(ActiveMQConnectionFactory.DEFAULT_BROKER_URL);
-        /*
-         * Doesn't matter if you enable or disable these, so just leaving them
-         * out for this test case connectionFactory.setAlwaysSessionAsync(true);
-         * connectionFactory.setAsyncDispatch(true);
-         */
-        connectionFactory.setUseAsyncSend(true);
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        broker.stop();
-    }
-
-    public void testNoSubscribers() throws Exception {
-        connection = connectionFactory.createConnection(USERNAME, DEFAULT_PASSWORD);
-        assertNotNull(connection);
-        connection.start();
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        assertNotNull(session);
-        destination = session.createQueue(QUEUE_NAME);
-        assertNotNull(destination);
-        publisher = session.createProducer(destination);
-        assertNotNull(publisher);
-        MapMessage msg = session.createMapMessage();
-        assertNotNull(msg);
-        msg.setString("key1", "value1");
-        int loop;
-        for (loop = 0; loop < MESSAGE_COUNT; loop++) {
-            msg.setInt("key2", loop);
-            publisher.send(msg, DELIVERY_MODE, DELIVERY_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
-            if (loop % 500 == 0) {
-                LOG.debug("Sent " + loop + " messages");
-            }
-        }
-        Thread.sleep(1000000);
-        this.assertEquals(loop, MESSAGE_COUNT);
-        publisher.close();
-        session.close();
-        connection.stop();
-        connection.stop();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
deleted file mode 100644
index 5367db0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.perf;
-
-import java.io.File;
-import org.apache.activeio.journal.active.JournalImpl;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.journal.JournalPersistenceAdapter;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-
-/**
- * 
- */
-public class JournalKahaDurableTopicTest extends SimpleDurableTopicTest {
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-
-        File dataFileDir = new File("target/test-amq-data/perfTest");
-        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
-        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);
-
-        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
-        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory());
-        journalAdaptor.setMaxCheckpointWorkers(1);
-
-        answer.setPersistenceAdapter(journalAdaptor);
-        answer.addConnector(uri);
-        answer.setDeleteAllMessagesOnStartup(true);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java
deleted file mode 100644
index 902f370..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaQueueTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.perf;
-
-import java.io.File;
-
-import org.apache.activeio.journal.active.JournalImpl;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.journal.JournalPersistenceAdapter;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-
-/**
- * 
- */
-public class JournalKahaQueueTest extends SimpleQueueTest {
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-
-        File dataFileDir = new File("target/test-amq-data/perfTest");
-        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
-        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);
-
-        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
-        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory());
-        journalAdaptor.setMaxCheckpointWorkers(1);
-
-        answer.setPersistenceAdapter(journalAdaptor);
-        answer.addConnector(uri);
-        answer.setDeleteAllMessagesOnStartup(true);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBDurableTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBDurableTopicTest.java
deleted file mode 100644
index 3609c62..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBDurableTopicTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.perf;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * 
- */
-public class KahaDBDurableTopicTest extends SimpleDurableTopicTest {
-
-    @Override
-    protected void setUp() throws Exception {
-        //this.initialConsumerDelay = 10 * 1000;
-        super.setUp();
-    }
-    
-    @Override
-    protected ActiveMQConnectionFactory createConnectionFactory(String uri) throws Exception {
-        ActiveMQConnectionFactory result = new ActiveMQConnectionFactory(uri);
-        //result.setDispatchAsync(false);
-        return result;
-    }
-    
-    @Override
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        //AMQPersistenceAdapterFactory persistenceFactory = new AMQPersistenceAdapterFactory();
-        //persistenceFactory.setMaxFileLength(1024*16);
-        //persistenceFactory.setPersistentIndex(true);
-        //persistenceFactory.setCleanupInterval(10000);
-        //answer.setPersistenceFactory(persistenceFactory);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(uri);
-        answer.setUseShutdownHook(false);
-        answer.setEnableStatistics(false);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBDurableTransactedTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBDurableTransactedTopicTest.java
deleted file mode 100644
index d1ed9cf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBDurableTransactedTopicTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-/**
- * 
- */
-public class KahaDBDurableTransactedTopicTest extends KahaDBDurableTopicTest {
-
-    @Override
-    protected void setUp() throws Exception {
-        //this.initialConsumerDelay = 10 * 1000;
-        super.setUp();
-    }
-    @Override
-    protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte[] payload) throws JMSException {
-        PerfProducer result= new PerfProducer(fac, dest, payload, true);
-        result.setDeliveryMode(DeliveryMode.PERSISTENT);
-        return result;
-    }
-
-  
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBQueueTest.java
deleted file mode 100644
index a11b92e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDBQueueTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.perf;
-
-import java.io.File;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-
-/**
- * 
- */
-public class KahaDBQueueTest extends SimpleQueueTest {
-
-    @Override
-    protected void setUp() throws Exception {
-        this.numberOfDestinations = 25;
-        this.numberofProducers = 1;
-        super.setUp();
-    }
-    @Override
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-
-        File dataFileDir = new File("target/test-amq-data/perfTest/kahadb");
-        File archiveDir = new File(dataFileDir,"archive");
-        KahaDBPersistenceAdapter kaha = new KahaDBPersistenceAdapter();
-        kaha.setDirectory(dataFileDir);
-        kaha.setDirectoryArchive(archiveDir);
-        kaha.setArchiveDataLogs(false);
-
-        // The setEnableJournalDiskSyncs(false) setting is a little dangerous right now, as I have not verified 
-        // what happens if the index is updated but a journal update is lost.
-        // Index is going to be in consistent, but can it be repaired?
-        kaha.setEnableJournalDiskSyncs(true);
-        // Using a bigger journal file size makes he take fewer spikes as it is not switching files as often.
-        //kaha.setJournalMaxFileLength(1024*1024*100);
-        
-        // small batch means more frequent and smaller writes
-        //kaha.setIndexWriteBatchSize(100);
-        // do the index write in a separate thread
-        kaha.setEnableIndexWriteAsync(true);
-        kaha.setIndexCacheSize(10000);
-        
-        answer.setPersistenceAdapter(kaha);
-        answer.addConnector(uri);
-        answer.setDeleteAllMessagesOnStartup(true);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java
deleted file mode 100644
index ff57e0e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaDurableTopicTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
-revision 946600 * 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.perf;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-
-/**
- * 
- */
-public class KahaDurableTopicTest extends SimpleDurableTopicTest {
-
-    /*
-     * protected BrokerService createBroker() throws Exception{ Resource
-     * resource=new ClassPathResource(
-     * "org/apache/activemq/perf/kahaBroker.xml"); BrokerFactoryBean factory=new
-     * BrokerFactoryBean(resource); factory.afterPropertiesSet(); BrokerService
-     * result=factory.getBroker(); result.start(); return result; }
-     */
-
-    @Override
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter();
-        answer.setPersistenceAdapter(adaptor);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(uri);
-       
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java
deleted file mode 100644
index e448c41..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/KahaQueueTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.perf;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-/**
- * 
- */
-public class KahaQueueTest extends SimpleQueueTest {
-    final static String config = "org/apache/activemq/perf/kahadbBroker.xml";
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        Resource resource = new ClassPathResource(config);
-        BrokerFactoryBean brokerFactory = new BrokerFactoryBean(resource);
-        resource = new ClassPathResource(config);
-        brokerFactory = new BrokerFactoryBean(resource);
-        brokerFactory.afterPropertiesSet();
-        return brokerFactory.getBroker();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java
deleted file mode 100644
index 5d92adf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class MemoryAllocationTest extends TestCase {
-
-    protected static final int MESSAGE_COUNT = 2000;
-    private static final Logger LOG = LoggerFactory.getLogger(MemoryAllocationTest.class);
-
-    protected BrokerService broker;
-    protected String bindAddress = "vm://localhost";
-    protected int topicCount;
-
-    public void testPerformance() throws Exception {
-        ConnectionFactory factory = createConnectionFactory();
-        Connection connection = factory.createConnection();
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Destination dest = session.createTemporaryTopic();
-            session.createConsumer(dest);
-            MessageProducer mp = session.createProducer(dest);
-            Message msg = session.createTextMessage("test" + i);
-            mp.send(msg);
-            session.close();
-            releaseDestination(dest);
-            if (i % 500 == 0) {
-                LOG.info("Iterator " + i);
-            }
-        }
-        connection.close();
-    }
-
-    protected Destination getDestination(Session session) throws JMSException {
-        String topicName = getClass().getName() + "." + topicCount++;
-        return session.createTopic(topicName);
-    }
-
-    protected void releaseDestination(Destination dest) throws JMSException {
-        if (dest instanceof TemporaryTopic) {
-            TemporaryTopic tt = (TemporaryTopic)dest;
-            tt.delete();
-        } else if (dest instanceof TemporaryQueue) {
-            TemporaryQueue tq = (TemporaryQueue)dest;
-            tq.delete();
-        }
-    }
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(bindAddress);
-        return cf;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.setPersistent(false);
-        answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java
deleted file mode 100644
index c46919f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
-import org.springframework.core.io.ClassPathResource;
-
-
-public class NetworkedSyncTest extends TestCase {
-
-    // constants
-    public static final int MESSAGE_COUNT = 10000; //100000;
-    public final static String config = "org/apache/activemq/perf/networkSync.xml";
-    public final static String broker1URL = "tcp://localhost:61616";
-    public final static String broker2URL = "tcp://localhost:62616";
-    private final String networkConnectorURL = "static://(" + broker2URL + ")";
-    private static final Logger LOG = LoggerFactory.getLogger(NetworkedSyncTest.class);
-    BrokerService broker1 = null;
-    BrokerService broker2 = null;
-    NetworkConnector connector = null;
-
-    /**
-     * @param name
-     */
-    public NetworkedSyncTest(String name) {
-        super(name);
-        LOG.info("Testcase started.");
-    }
-    
-   public static void main(String args[]) {
-       TestRunner.run(NetworkedSyncTest.class);
-   }
-
-    /**
-     * @throws java.lang.Exception
-     */
-    protected void setUp() throws Exception {
-        LOG.info("setUp() called.");
-        ClassPathXmlApplicationContext context1 = null;
-        BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(config));
-
-        /* start up first broker instance */
-        try {
-            // resolve broker1
-            Thread.currentThread().setContextClassLoader(
-                    NetworkedSyncTest.class.getClassLoader());
-            context1 = new ClassPathXmlApplicationContext(config);
-            broker1 = (BrokerService) context1.getBean("broker1");
-
-            // start the broker
-            if (!broker1.isStarted()) {
-                LOG.info("Broker broker1 not yet started. Kicking it off now.");
-                broker1.start();
-            } else {
-                LOG.info("Broker broker1 already started. Not kicking it off a second time.");
-                broker1.waitUntilStopped();
-            }
-        } catch (Exception e) {
-            LOG.error("Error: " + e.getMessage());
-            throw e;
-            // brokerService.stop();
-        }
-
-        /* start up second broker instance */
-        try {
-            Thread.currentThread().setContextClassLoader(
-                    NetworkedSyncTest.class.getClassLoader());
-            context1 = new ClassPathXmlApplicationContext(config);
-            broker2 = (BrokerService) context1.getBean("broker2");
-
-            // start the broker
-            if (!broker2.isStarted()) {
-                LOG.info("Broker broker2 not yet started. Kicking it off now.");
-                broker2.start();
-            } else {
-                LOG.info("Broker broker2 already started. Not kicking it off a second time.");
-                broker2.waitUntilStopped();
-            }
-        } catch (Exception e) {
-            LOG.error("Error: " + e.getMessage());
-            throw e;
-        }
-
-        // setup network connector from broker1 to broker2
-        connector = broker1.addNetworkConnector(networkConnectorURL);
-        connector.setBrokerName(broker1.getBrokerName());
-        connector.setDuplex(true);
-        connector.start();
-        LOG.info("Network connector created.");
-    }
-
-    /**
-     * @throws java.lang.Exception
-     */
-    protected void tearDown() throws Exception {
-
-        LOG.info("tearDown() called.");
-
-        if (broker1 != null && broker1.isStarted()) {
-            LOG.info("Broker1 still running, stopping it now.");
-            broker1.stop();
-        } else {
-            LOG.info("Broker1 not running, nothing to shutdown.");
-        }
-        if (broker2 != null && broker2.isStarted()) {
-            LOG.info("Broker2 still running, stopping it now.");
-            broker2.stop();
-        } else {
-            LOG.info("Broker2 not running, nothing to shutdown.");
-        }
-
-    }
-
-    public void testMessageExchange() throws Exception {
-        LOG.info("testMessageExchange() called.");
-
-        long start = System.currentTimeMillis();
-        
-        // create producer and consumer threads
-        Thread producer = new Thread(new Producer());
-        Thread consumer = new Thread(new Consumer());
-        // start threads
-        consumer.start();
-        Thread.sleep(2000);
-        producer.start();
-        
-
-        // wait for threads to finish
-        producer.join();
-        consumer.join();
-        long end = System.currentTimeMillis();
-        
-        System.out.println("Duration: "+(end-start));
-    }
-}
-
-/**
- * Message producer running as a separate thread, connecting to broker1
- * 
- * @author tmielke
- * 
- */
-class Producer implements Runnable {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Producer.class);
-
-    /**
-     * connect to broker and constantly send messages
-     */
-    public void run() {
-
-        Connection connection = null;
-        Session session = null;
-        MessageProducer producer = null;
-
-        try {
-            ActiveMQConnectionFactory amq = new ActiveMQConnectionFactory(
-                    NetworkedSyncTest.broker1URL);
-            connection = amq.createConnection();
-
-            connection.setExceptionListener(new javax.jms.ExceptionListener() {
-                public void onException(javax.jms.JMSException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            connection.start();
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Topic destination = session.createTopic("TEST.FOO");
-
-            producer = session.createProducer(destination);
-            producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-            long counter = 0;
-
-            // Create and send message
-            for (int i = 0; i < NetworkedSyncTest.MESSAGE_COUNT; i++) {
-
-                String text = "Hello world! From: "
-                        + Thread.currentThread().getName() + " : "
-                        + this.hashCode() + ":" + counter;
-                TextMessage message = session.createTextMessage(text);
-                producer.send(message);
-                counter++;
-
-                if ((counter % 1000) == 0)
-                    LOG.info("sent " + counter + " messages");
-
-            }
-        } catch (Exception ex) {
-            LOG.error(ex.toString());
-            return;
-        } finally {
-            try {
-                if (producer != null)
-                    producer.close();
-                if (session != null)
-                    session.close();
-                if (connection != null)
-                    connection.close();
-            } catch (Exception e) {
-                LOG.error("Problem closing down JMS objects: " + e);
-            }
-        }
-    }
-}
-
-/*
- * * Message consumer running as a separate thread, connecting to broker2
- * @author tmielke
- * 
- */
-class Consumer implements Runnable {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Consumer.class);;
-
-    
-    /**
-     * connect to broker and receive messages
-     */
-    public void run() {
-        Connection connection = null;
-        Session session = null;
-        MessageConsumer consumer = null;
-
-        try {
-            ActiveMQConnectionFactory amq = new ActiveMQConnectionFactory(
-                    NetworkedSyncTest.broker2URL);
-            connection = amq.createConnection();
-            // need to set clientID when using durable subscription.
-            connection.setClientID("tmielke");
-
-            connection.setExceptionListener(new javax.jms.ExceptionListener() {
-                public void onException(javax.jms.JMSException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            connection.start();
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Destination destination = session.createTopic("TEST.FOO");
-            consumer = session.createDurableSubscriber((Topic) destination,"tmielke");
-
-            long counter = 0;
-            // Wait for a message
-            for (int i = 0; i < NetworkedSyncTest.MESSAGE_COUNT; i++) { 
-                Message message2 = consumer.receive();
-                if (message2 instanceof TextMessage) {
-                    TextMessage textMessage = (TextMessage) message2;
-                    String text = textMessage.getText();
-                    // logger.info("Received: " + text);
-                } else {
-                    LOG.error("Received message of unsupported type. Expecting TextMessage. "+ message2);
-                }
-                counter++;
-                if ((counter % 1000) == 0)
-                    LOG.info("received " + counter + " messages");
-
-                
-            }
-        } catch (Exception e) {
-            LOG.error("Error in Consumer: " + e);
-            return;
-        } finally {
-            try {
-                if (consumer != null)
-                    consumer.close();
-                if (session != null)
-                    session.close();
-                if (connection != null)
-                    connection.close();
-            } catch (Exception ex) {
-                LOG.error("Error closing down JMS objects: " + ex);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java
deleted file mode 100644
index f25c0a5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * 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.perf;
-
-/**
- * A NumberOfDestinationsTest
- *
- */
-import java.io.File;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * 
- */
-public class NumberOfDestinationsTest extends TestCase {
-    protected static final int MESSAGE_COUNT = 1;
-    protected static final int NUMBER_OF_DESTINATIONS = 100000;
-    private static final Logger LOG = LoggerFactory.getLogger(NumberOfDestinationsTest.class);
-    protected BrokerService broker;
-    protected String bindAddress = "vm://localhost";
-    protected int destinationCount;
-
-    public void testDestinations() throws Exception {
-        ConnectionFactory factory = createConnectionFactory();
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer mp = session.createProducer(null);
-        for (int j = 0; j < NUMBER_OF_DESTINATIONS; j++) {
-            Destination dest = getDestination(session);
-          
-            for (int i = 0; i < MESSAGE_COUNT; i++) {
-                Message msg = session.createTextMessage("test" + i);
-                mp.send(dest, msg);
-                
-            }
-            if (j % 500 == 0) {
-                LOG.info("Iterator " + j);
-            }
-        }
-        
-        connection.close();
-    }
-
-    protected Destination getDestination(Session session) throws JMSException {
-        String topicName = getClass().getName() + "." + destinationCount++;
-        return session.createTopic(topicName);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(bindAddress);
-        return cf;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        File dataFileDir = new File("target/test-amq-data/perfTest/kahadb");
-
-        KahaDBPersistenceAdapter kaha = new KahaDBPersistenceAdapter();
-        kaha.setDirectory(dataFileDir);
-        //answer.setUseJmx(false);
-
-        // The setEnableJournalDiskSyncs(false) setting is a little dangerous right now, as I have not verified 
-        // what happens if the index is updated but a journal update is lost.
-        // Index is going to be in consistent, but can it be repaired?
-        //kaha.setEnableJournalDiskSyncs(false);
-        // Using a bigger journal file size makes he take fewer spikes as it is not switching files as often.
-        //kaha.setJournalMaxFileLength(1024*100);
-        
-        // small batch means more frequent and smaller writes
-        //kaha.setIndexWriteBatchSize(100);
-        // do the index write in a separate thread
-        //kaha.setEnableIndexWriteAsync(true);
-        
-        answer.setPersistenceAdapter(kaha);
-        answer.setAdvisorySupport(false);
-        answer.setEnableStatistics(false);
-        answer.addConnector(bindAddress);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java
deleted file mode 100644
index 018a96e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.Topic;
-import org.apache.activemq.ActiveMQMessageAudit;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class PerfConsumer implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(PerfConsumer.class);
-    protected Connection connection;
-    protected MessageConsumer consumer;
-    protected long sleepDuration;
-    protected long initialDelay;
-    protected boolean enableAudit = false;
-    protected ActiveMQMessageAudit audit = new ActiveMQMessageAudit(16 * 1024,20);
-    protected boolean firstMessage =true;
-    protected String lastMsgId;
-
-    protected PerfRate rate = new PerfRate();
-
-    public PerfConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException {
-        connection = fac.createConnection();
-        connection.setClientID(consumerName);
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        if (dest instanceof Topic && consumerName != null && consumerName.length() > 0) {
-            consumer = s.createDurableSubscriber((Topic)dest, consumerName);
-        } else {
-            consumer = s.createConsumer(dest);
-        }
-        consumer.setMessageListener(this);
-    }
-
-    public PerfConsumer(ConnectionFactory fac, Destination dest) throws JMSException {
-        this(fac, dest, null);
-    }
-
-    public void start() throws JMSException {
-        connection.start();
-        rate.reset();
-    }
-
-    public void stop() throws JMSException {
-        connection.stop();
-    }
-
-    public void shutDown() throws JMSException {
-        connection.close();
-    }
-
-    public PerfRate getRate() {
-        return rate;
-    }
-
-    public void onMessage(Message msg) {
-        if (firstMessage) {
-            firstMessage=false;
-            if (getInitialDelay() > 0) {
-                try {
-                    Thread.sleep(getInitialDelay());
-                } catch (InterruptedException e) {
-                }
-            }
-        }
-        rate.increment();
-        try {
-            if (enableAudit && !this.audit.isInOrder(msg.getJMSMessageID())) {
-                LOG.error("Message out of order!!" + msg.getJMSMessageID() + " LAST = " + lastMsgId);
-            }
-            if (enableAudit && this.audit.isDuplicate(msg)){
-                LOG.error("Duplicate Message!" + msg);
-            }
-            lastMsgId=msg.getJMSMessageID();
-        } catch (JMSException e1) {
-            // TODO Auto-generated catch block
-            e1.printStackTrace();
-        }
-        try {
-            if (sleepDuration != 0) {
-                Thread.sleep(sleepDuration);
-            }
-        } catch (InterruptedException e) {
-        }
-    }
-
-    public synchronized long getSleepDuration() {
-        return sleepDuration;
-    }
-
-    public synchronized void setSleepDuration(long sleepDuration) {
-        this.sleepDuration = sleepDuration;
-    }
-
-    public boolean isEnableAudit() {
-        return enableAudit;
-    }
-
-    public void setEnableAudit(boolean doAudit) {
-        this.enableAudit = doAudit;
-    }
-
-    /**
-     * @return the initialDelay
-     */
-    public long getInitialDelay() {
-        return initialDelay;
-    }
-
-    /**
-     * @param initialDelay the initialDelay to set
-     */
-    public void setInitialDelay(long initialDelay) {
-        this.initialDelay = initialDelay;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java
deleted file mode 100644
index 10dc740..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.perf;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class PerfProducer implements Runnable {
-    protected Connection connection;
-    protected MessageProducer producer;
-    protected PerfRate rate = new PerfRate();
-    private final byte[] payload;
-    private Session session;
-    private final CountDownLatch stopped = new CountDownLatch(1);
-    private boolean running;
-    private final boolean transacted;
-    private int sleep = 0;
-
-    public PerfProducer(ConnectionFactory fac, Destination dest, byte[] payload) throws JMSException {
-        this(fac, dest, payload, false);
-    }
-    public PerfProducer(ConnectionFactory fac, Destination dest, byte[] payload, boolean transacted)
-            throws JMSException {
-        connection = fac.createConnection();
-        this.transacted = transacted;
-        if (transacted) {
-            session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        } else {
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        }
-        producer = session.createProducer(dest);
-        this.payload = payload;
-       
-    }
-
-    public void setDeliveryMode(int mode) throws JMSException {
-        producer.setDeliveryMode(mode);
-    }
-
-    public void setTimeToLive(int ttl) throws JMSException {
-        producer.setTimeToLive(ttl);
-    }
-
-    public void shutDown() throws JMSException {
-        connection.close();
-    }
-
-    public PerfRate getRate() {
-        return rate;
-    }
-
-    public synchronized void start() throws JMSException {
-        if (!running) {
-            rate.reset();
-            running = true;
-            connection.start();
-            Thread t = new Thread(this);
-            t.setName("Producer");
-            t.start();
-        }
-    }
-
-    public void stop() throws JMSException, InterruptedException {
-        synchronized (this) {
-            running = false;
-        }
-        stopped.await(1, TimeUnit.SECONDS);
-        connection.stop();
-    }
-
-    public synchronized boolean isRunning() {
-        return running;
-    }
-
-    public void run() {
-        try {
-            while (isRunning()) {
-                BytesMessage msg;
-                msg = session.createBytesMessage();
-                msg.writeBytes(payload);
-                producer.send(msg);
-                if(this.transacted) {
-                    this.session.commit();
-                }
-                rate.increment();
-                if (sleep > 0) {
-                    Thread.sleep(sleep);
-                }
-            }
-        } catch (Throwable e) {
-            e.printStackTrace();
-        } finally {
-            stopped.countDown();
-        }
-    }
-
-    public int getSleep() {
-        return sleep;
-    }
-
-    public void setSleep(int sleep) {
-        this.sleep = sleep;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfRate.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfRate.java
deleted file mode 100644
index 8f82617..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfRate.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.perf;
-
-/**
- * 
- */
-public class PerfRate {
-
-    protected int totalCount;
-    protected int count;
-    protected long startTime = System.currentTimeMillis();
-
-    /**
-     * @return Returns the count.
-     */
-    public int getCount() {
-        return totalCount;
-    }
-
-    public synchronized void increment() {
-        totalCount++;
-        count++;
-    }
-
-    public int getRate() {
-        long endTime = System.currentTimeMillis();
-        long totalTime = endTime - startTime;
-        int result = (int)((count * 1000) / totalTime);
-        return result;
-    }
-
-    /**
-     * Resets the rate sampling.
-     */
-    public synchronized PerfRate cloneAndReset() {
-        PerfRate rc = new PerfRate();
-        rc.totalCount = totalCount;
-        rc.count = count;
-        rc.startTime = startTime;
-        count = 0;
-        startTime = System.currentTimeMillis();
-        return rc;
-    }
-
-    /**
-     * Resets the rate sampling.
-     */
-    public void reset() {
-        count = 0;
-        startTime = System.currentTimeMillis();
-    }
-
-    /**
-     * @return Returns the totalCount.
-     */
-    public int getTotalCount() {
-        return totalCount;
-    }
-
-    /**
-     * @param totalCount The totalCount to set.
-     */
-    public void setTotalCount(int totalCount) {
-        this.totalCount = totalCount;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java
deleted file mode 100644
index cc6ac36..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class QueueConnectionMemoryTest extends SimpleQueueTest {
-    private static final transient Logger LOG = LoggerFactory.getLogger(QueueConnectionMemoryTest.class);
-
-    protected void setUp() throws Exception {
-    }
-
-    protected void tearDown() throws Exception {
-
-    }
-
-    protected Destination createDestination(Session s, String destinationName) throws JMSException {
-        return s.createTemporaryQueue();
-    }
-
-    public void testPerformance() throws JMSException {
-        // just cancel super class test
-    }
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter();
-        answer.setPersistenceAdapter(adaptor);
-        answer.addConnector(uri);
-        answer.setDeleteAllMessagesOnStartup(true);
-    }
-
-    public void testMemory() throws Exception {
-        if (broker == null) {
-            broker = createBroker(bindAddress);
-        }
-        factory = createConnectionFactory(bindAddress);
-        Connection con = factory.createConnection();
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = createDestination(session, destinationName);
-        con.close();
-        for (int i = 0; i < 3; i++) {
-            Connection connection = factory.createConnection();
-            connection.start();
-            Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Destination dest = s.createTemporaryQueue();
-            MessageConsumer consumer = s.createConsumer(dest);
-            LOG.debug("Created connnection: " + i);
-            Thread.sleep(1000);
-        }
-
-        Thread.sleep(Integer.MAX_VALUE);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RunBroker.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RunBroker.java
deleted file mode 100644
index 9602585..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/RunBroker.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.perf;
-
-import java.io.File;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.util.IOHelper;
-
-public class RunBroker {
-
-    public static void main(String arg[]) {
-
-        try {
-            KahaDBPersistenceAdapter kahaDB = new KahaDBPersistenceAdapter();
-            File dataFileDir = new File("target/test-amq-data/perfTest/kahadb");
-            IOHelper.deleteChildren(dataFileDir);
-            File archiveDir = new File(dataFileDir, "archive");
-            kahaDB.setDirectory(dataFileDir);
-
-            // The setEnableJournalDiskSyncs(false) setting is a little
-            // dangerous right now, as I have not verified
-            // what happens if the index is updated but a journal update is
-            // lost.
-            // Index is going to be in consistent, but can it be repaired?
-            // kaha.setEnableJournalDiskSyncs(false);
-            // Using a bigger journal file size makes he take fewer spikes as it
-            // is not switching files as often.
-            // kaha.setJournalMaxFileLength(1024*1024*100);
-
-            // small batch means more frequent and smaller writes
-            kahaDB.setIndexWriteBatchSize(1000);
-            kahaDB.setIndexCacheSize(10000);
-
-            // do the index write in a separate thread
-            // kahaDB.setEnableIndexWriteAsync(true);
-            BrokerService broker = new BrokerService();
-            broker.setUseJmx(false);
-            // broker.setPersistenceAdapter(adaptor);
-            broker.setPersistenceAdapter(kahaDB);
-            // broker.setPersistent(false);
-            broker.setDeleteAllMessagesOnStartup(true);
-            broker.addConnector("tcp://0.0.0.0:61616");
-            broker.start();
-            System.err.println("Running");
-            Thread.sleep(Long.MAX_VALUE);
-        } catch (Throwable e) {
-            e.printStackTrace();
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java
deleted file mode 100644
index c4fd892..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-
-public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest {
-    
-    protected void setUp() throws Exception {
-        numberofProducers=1;
-        numberOfConsumers=1;
-        sampleCount=1000;
-        playloadSize = 1024;
-        super.setUp();
-    }
-    
-    
-    protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte payload[]) throws JMSException {
-        PerfProducer pp = new PerfProducer(fac, dest, payload);
-        pp.setDeliveryMode(DeliveryMode.PERSISTENT);
-        return pp;
-    }
-
-    protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        return new PerfConsumer(fac, dest, "subs:" + number);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleDurableTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleDurableTopicTest.java
deleted file mode 100644
index 08a0fba..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleDurableTopicTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
-
-/**
- * 
- */
-public class SimpleDurableTopicTest extends SimpleTopicTest {
-    protected long initialConsumerDelay = 0;
-    @Override
-    protected void setUp() throws Exception {
-        numberOfDestinations=1;
-        numberOfConsumers = 1;
-        numberofProducers = Integer.parseInt(System.getProperty("SimpleDurableTopicTest.numberofProducers", "20"), 20);
-        sampleCount= Integer.parseInt(System.getProperty("SimpleDurableTopicTest.sampleCount", "1000"), 10);
-        playloadSize = 1024;
-        super.setUp();
-    }
-    
-    @Override
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        AMQPersistenceAdapterFactory persistenceFactory = new AMQPersistenceAdapterFactory();
-        persistenceFactory.setMaxFileLength(1024*16);
-        persistenceFactory.setPersistentIndex(true);
-        persistenceFactory.setCleanupInterval(10000);
-        answer.setPersistenceFactory(persistenceFactory);
-        //answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(uri);
-        answer.setUseShutdownHook(false);
-    }
-    
-    @Override
-    protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte payload[]) throws JMSException {
-        PerfProducer pp = new PerfProducer(fac, dest, payload);
-        pp.setDeliveryMode(DeliveryMode.PERSISTENT);
-        return pp;
-    }
-
-    @Override
-    protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        PerfConsumer result = new PerfConsumer(fac, dest, "subs:" + number);
-        result.setInitialDelay(this.initialConsumerDelay);
-        return result;
-    }
-    
-    @Override
-    protected ActiveMQConnectionFactory createConnectionFactory(String uri) throws Exception {
-        ActiveMQConnectionFactory result = super.createConnectionFactory(uri);
-        //result.setSendAcksAsync(false);
-        return result;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java
deleted file mode 100644
index fdb14e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.network.NetworkConnector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class SimpleNetworkTest extends SimpleTopicTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleNetworkTest.class);
-    protected String consumerBindAddress = "tcp://localhost:61616";
-    protected String producerBindAddress = "tcp://localhost:61617";
-    protected static final String CONSUMER_BROKER_NAME = "Consumer";
-    protected static final String PRODUCER_BROKER_NAME = "Producer";
-    protected BrokerService consumerBroker;
-    protected BrokerService producerBroker;
-    protected ActiveMQConnectionFactory consumerFactory;
-    protected ActiveMQConnectionFactory producerFactory;
-    
-    
-    protected void setUp() throws Exception {
-        if (consumerBroker == null) {
-           consumerBroker = createConsumerBroker(consumerBindAddress);
-        }
-        if (producerBroker == null) {
-            producerBroker = createProducerBroker(producerBindAddress);
-        }
-        consumerFactory = createConnectionFactory(consumerBindAddress);
-        consumerFactory.setDispatchAsync(true);
-        ActiveMQPrefetchPolicy policy = new ActiveMQPrefetchPolicy();
-        policy.setQueuePrefetch(100);
-        consumerFactory.setPrefetchPolicy(policy);
-        producerFactory = createConnectionFactory(producerBindAddress);
-        Connection con = consumerFactory.createConnection();
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        
-        producers = new PerfProducer[numberofProducers*numberOfDestinations];
-        consumers = new PerfConsumer[numberOfConsumers*numberOfDestinations];
-        
-        for (int k =0; k < numberOfDestinations;k++) {
-            Destination destination = createDestination(session, destinationName+":"+k);
-            LOG.info("Testing against destination: " + destination);
-            for (int i = 0; i < numberOfConsumers; i++) {
-                consumers[i] = createConsumer(consumerFactory, destination, i);
-                consumers[i].start();
-            }
-            for (int i = 0; i < numberofProducers; i++) {
-                array = new byte[playloadSize];
-                for (int j = i; j < array.length; j++) {
-                    array[j] = (byte)j;
-                }
-                producers[i] = createProducer(producerFactory, destination, i, array);
-                producers[i].start();
-               
-            }
-        }
-        con.close();
-    }
-
-    protected void tearDown() throws Exception {
-        for (int i = 0; i < numberOfConsumers; i++) {
-            consumers[i].shutDown();
-        }
-        for (int i = 0; i < numberofProducers; i++) {
-            producers[i].shutDown();
-        }
-        
-        if (producerBroker != null) {
-            producerBroker.stop();
-            producerBroker = null;
-        }
-        if (consumerBroker != null) {
-            consumerBroker.stop();
-            consumerBroker = null;
-        }
-    }
-    
-    protected BrokerService createConsumerBroker(String uri) throws Exception {
-        BrokerService answer = new BrokerService();
-        configureConsumerBroker(answer,uri);
-        answer.start();
-        return answer;
-    }
-    
-    protected void configureConsumerBroker(BrokerService answer,String uri) throws Exception {
-        configureBroker(answer);
-        answer.setPersistent(false);
-        answer.setBrokerName(CONSUMER_BROKER_NAME);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(uri);
-        answer.setUseShutdownHook(false);
-    }
-    
-    protected BrokerService createProducerBroker(String uri) throws Exception {
-        BrokerService answer = new BrokerService();
-        configureProducerBroker(answer,uri);
-        answer.start();
-        return answer;
-    }
-    
-    protected void configureProducerBroker(BrokerService answer,String uri) throws Exception {
-        configureBroker(answer);
-        answer.setBrokerName(PRODUCER_BROKER_NAME);
-        answer.setMonitorConnectionSplits(false);
-        //answer.setSplitSystemUsageForProducersConsumers(true);
-        answer.setPersistent(false);
-        answer.setDeleteAllMessagesOnStartup(true);
-        NetworkConnector connector = answer.addNetworkConnector("static://"+consumerBindAddress);
-        //connector.setNetworkTTL(3);
-        //connector.setDynamicOnly(true);
-        connector.setDuplex(true);
-        answer.addConnector(uri);
-        answer.setUseShutdownHook(false);
-    }
-    
-    protected void configureBroker(BrokerService service) throws Exception{
-        
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java
deleted file mode 100644
index 7011a35..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.perf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-
-public class SimpleNonPersistentQueueNetworkTest extends SimpleNetworkTest {
-
-	protected void setUp()throws Exception {
-	    numberOfDestinations =20;
-	    super.setUp();
-	}
-	protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte[] payload) throws JMSException {
-        PerfProducer pp = new PerfProducer(fac, dest, payload);
-       pp.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-       // pp.setTimeToLive(1000);
-        //pp.setSleep(1);
-        return pp;
-    }
-	
-	protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        PerfConsumer consumer =  new PerfConsumer(fac, dest);
-        boolean enableAudit = numberOfConsumers <= 1;
-        System.out.println("Enable Audit = " + enableAudit);
-        consumer.setEnableAudit(false);
-        return consumer;
-    }
-	
-	 public void testPerformance() throws JMSException, InterruptedException {
-	     //Thread.sleep(5000);
-	     super.testPerformance();
-	 }
-	
-	 protected Destination createDestination(Session s, String destinationName) throws JMSException {
-	        return s.createQueue(destinationName);
-	 }
-	 
-	 protected void configureBroker(BrokerService answer) throws Exception {
-	        answer.setPersistent(false);
-	        answer.setMonitorConnectionSplits(true);
-	        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-	        final PolicyEntry entry = new PolicyEntry();
-	        entry.setQueue(">");
-	        entry.setMemoryLimit(1024 * 1024 * 100); // Set to 1 MB
-	        entry.setOptimizedDispatch(true);
-	        entry.setProducerFlowControl(true);
-	        entry.setMaxPageSize(10);
-	        entry.setLazyDispatch(false);
-	        policyEntries.add(entry);
-
-	        
-	        final PolicyMap policyMap = new PolicyMap();
-	        policyMap.setPolicyEntries(policyEntries);
-	        answer.setDestinationPolicy(policyMap);
-	        super.configureBroker(answer);
-	    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueTest.java
deleted file mode 100644
index 1a531f4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.perf;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-
-/**
- * 
- */
-public class SimpleNonPersistentQueueTest extends SimpleQueueTest {
-
-    @Override
-    protected void setUp() throws Exception {
-        numberOfConsumers = 1;
-        numberofProducers = 1;
-        super.setUp();
-    }
-    @Override
-    protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte[] payload) throws JMSException {
-        PerfProducer pp = new PerfProducer(fac, dest, payload);
-        pp.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        //pp.setTimeToLive(100);
-        return pp;
-    }
-    
-    @Override
-    protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        PerfConsumer result =  new PerfConsumer(fac, dest);
-        result.setInitialDelay(10*1000);
-        boolean enableAudit = numberOfConsumers <= 1;
-        System.err.println("Enable Audit = " + enableAudit);
-        result.setEnableAudit(enableAudit);
-
-        return result;
-    }
-    
-    
-    @Override
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-       // answer.setPersistent(false);
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setQueue(">");
-        entry.setMemoryLimit(1024 * 1024 * 1); // Set to 1 MB
-        entry.setOptimizedDispatch(true);
-        entry.setLazyDispatch(true);
-        policyEntries.add(entry);
-
-        
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        answer.setDestinationPolicy(policyMap);
-        super.configureBroker(answer, uri);
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java
deleted file mode 100644
index eacc6e1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-/**
- * 
- */
-public class SimpleNonPersistentTopicTest extends SimpleTopicTest {
-
-    protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte[] payload) throws JMSException {
-        PerfProducer pp = new PerfProducer(fac, dest, payload);
-        pp.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        return pp;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleQueueTest.java
deleted file mode 100644
index 30708f4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleQueueTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class SimpleQueueTest extends SimpleTopicTest {
-
-    protected long initialConsumerDelay = 0;
-    protected long consumerSleep = 0;
-    @Override
-    protected Destination createDestination(Session s, String destinationName) throws JMSException {
-        return s.createQueue(destinationName);
-    }
-    
-    @Override
-    protected void setUp() throws Exception {
-        numberOfConsumers = 1;
-        super.setUp();
-    }
-    
-    @Override
-    protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        PerfConsumer consumer =  new PerfConsumer(fac, dest);
-        consumer.setInitialDelay(this.initialConsumerDelay);
-        consumer.setSleepDuration(this.consumerSleep);
-        boolean enableAudit = numberOfConsumers <= 1;
-        System.err.println("Enable Audit = " + enableAudit);
-        consumer.setEnableAudit(enableAudit);
-        return consumer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java
deleted file mode 100644
index c89c2cc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class SimpleTopicTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleTopicTest.class);
-    
-    protected BrokerService broker;
-    protected String clientURI="tcp://localhost:61616?wireFormat.cacheEnabled=true&wireFormat.tightEncodingEnabled=true&jms.useAsyncSend=false&wireFormat.maxInactivityDuration=0";
-    //protected String clientURI="tcp://localhost:61616";
-    protected String bindAddress="tcp://localhost:61616?wireFormat.maxInactivityDuration=0";
-    //protected String bindAddress = "tcp://localhost:61616";
-    //protected String bindAddress="vm://localhost?marshal=true";
-    //protected String bindAddress="vm://localhost";
-    protected PerfProducer[] producers;
-    protected PerfConsumer[] consumers;
-    protected String destinationName = getClass().getName();
-    protected int sampleCount = 20;
-    protected long sampleInternal = 10000;
-    protected int numberOfDestinations=1;
-    protected int numberOfConsumers = 1;
-    protected int numberofProducers = 1;
-    protected int totalNumberOfProducers;
-    protected int totalNumberOfConsumers;
-    protected int playloadSize = 12;
-    protected byte[] array;
-    protected ConnectionFactory factory;
-    
-     /**
-     * Sets up a test where the producer and consumer have their own connection.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker(bindAddress);
-        }
-        factory = createConnectionFactory(clientURI);
-        Connection con = factory.createConnection();
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-       
-        
-        LOG.info("Running " + numberofProducers + " producer(s) and " + numberOfConsumers + " consumer(s) per " + numberOfDestinations + " Destination(s)");
-       
-        totalNumberOfConsumers=numberOfConsumers*numberOfDestinations;
-        totalNumberOfProducers=numberofProducers*numberOfDestinations;
-        producers = new PerfProducer[totalNumberOfProducers];
-        consumers = new PerfConsumer[totalNumberOfConsumers];
-        int consumerCount = 0;
-        int producerCount = 0;
-        for (int k =0; k < numberOfDestinations;k++) {
-            Destination destination = createDestination(session, destinationName+":"+k);
-            LOG.info("Testing against destination: " + destination);
-            for (int i = 0; i < numberOfConsumers; i++) {
-                consumers[consumerCount] = createConsumer(factory, destination, consumerCount);
-                consumerCount++;
-            }
-            for (int i = 0; i < numberofProducers; i++) {
-                array = new byte[playloadSize];
-                for (int j = i; j < array.length; j++) {
-                    array[j] = (byte)j;
-                }
-                producers[producerCount] = createProducer(factory, destination, i, array);
-                producerCount++;
-            }
-        }
-        con.close();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        for (int i = 0; i < numberOfConsumers; i++) {
-            consumers[i].shutDown();
-        }
-        for (int i = 0; i < numberofProducers; i++) {
-            producers[i].shutDown();
-        }
-        if (broker != null) {
-            broker.stop();
-            broker = null;
-        }
-    }
-
-    protected Destination createDestination(Session s, String destinationName) throws JMSException {
-        return s.createTopic(destinationName);
-    }
-
-    /**
-     * Factory method to create a new broker
-     * 
-     * @throws Exception
-     */
-    protected BrokerService createBroker(String uri) throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer,uri);
-        answer.start();
-        return answer;
-    }
-
-    protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte[] payload) throws JMSException {
-        return new PerfProducer(fac, dest, payload);
-    }
-
-    protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        return new PerfConsumer(fac, dest);
-    }
-    
-    
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector(uri);
-        answer.setUseShutdownHook(false);
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory(String uri) throws Exception {
-        return new ActiveMQConnectionFactory(uri);
-    }
-
-    public void testPerformance() throws JMSException, InterruptedException {
-        for (int i = 0; i < totalNumberOfConsumers; i++) {
-            consumers[i].start();
-        }
-        for (int i = 0; i < totalNumberOfProducers; i++) {
-            producers[i].start();
-        }
-        LOG.info("Sampling performance " + sampleCount + " times at a " + sampleInternal + " ms interval.");
-        for (int i = 0; i < sampleCount; i++) {
-            Thread.sleep(sampleInternal);
-            dumpProducerRate();
-            dumpConsumerRate();
-        }
-        for (int i = 0; i < totalNumberOfProducers; i++) {
-            producers[i].stop();
-        }
-        for (int i = 0; i < totalNumberOfConsumers; i++) {
-            consumers[i].stop();
-        }
-    }
-
-    protected void dumpProducerRate() {
-        int totalRate = 0;
-        int totalCount = 0;
-        String producerString="Producers:";
-        for (int i = 0; i < producers.length; i++) {
-            PerfRate rate = producers[i].getRate().cloneAndReset();
-            totalRate += rate.getRate();
-            totalCount += rate.getTotalCount();
-            producerString+="["+i+":"+rate.getRate() + ","+rate.getTotalCount()+"];";
-        }
-        if (producers != null && producers.length > 0) {
-            int avgRate = totalRate / producers.length;
-            System.out.println("Avg producer rate = " + avgRate
-                    + " msg/sec | Total rate = " + totalRate + ", sent = "
-                    + totalCount);
-           // System.out.println(producerString);
-        }
-    }
-
-    protected void dumpConsumerRate() {
-        int totalRate = 0;
-        int totalCount = 0;
-        String consumerString="Consumers:";
-        for (int i = 0; i < consumers.length; i++) {
-            PerfRate rate = consumers[i].getRate().cloneAndReset();
-            totalRate += rate.getRate();
-            totalCount += rate.getTotalCount();
-            consumerString+="["+i+":"+rate.getRate() + ","+rate.getTotalCount()+"];";
-        }
-        if (consumers != null && consumers.length > 0) {
-            int avgRate = totalRate / consumers.length;
-            System.out.println("Avg consumer rate = " + avgRate + " msg/sec | Total rate = " + totalRate + ", received = " + totalCount);
-            System.out.println(consumerString);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java
deleted file mode 100644
index 913e86a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class SlowConsumer extends PerfConsumer {
-    private static final transient Logger LOG = LoggerFactory.getLogger(SlowConsumer.class);
-
-    public SlowConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException {
-        super(fac, dest, consumerName);
-    }
-
-    public SlowConsumer(ConnectionFactory fac, Destination dest) throws JMSException {
-        super(fac, dest, null);
-    }
-
-    public void onMessage(Message msg) {
-        super.onMessage(msg);
-        LOG.debug("GOT A MSG " + msg);
-        try {
-            Thread.sleep(10000);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java
deleted file mode 100644
index 8c87aa8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-/**
- * 
- */
-public class SlowConsumerTopicTest extends SimpleTopicTest {
-
-    protected PerfConsumer[] slowConsumers;
-    
-    protected void setUp() throws Exception {
-        
-        playloadSize = 10 * 1024;
-        super.setUp();
-    }
-   
-
-    protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        PerfConsumer result = new SlowConsumer(fac, dest);
-        return result;
-    }
-
-    protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, byte[] payload) throws JMSException {
-        PerfProducer result = super.createProducer(fac, dest, number, payload);
-        result.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        result.setSleep(10);
-        return result;
-    }
-
-    protected BrokerService createBroker(String url) throws Exception {
-        Resource resource = new ClassPathResource("org/apache/activemq/perf/slowConsumerBroker.xml");
-        System.err.println("CREATE BROKER FROM " + resource);
-        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
-        factory.afterPropertiesSet();
-        BrokerService broker = factory.getBroker();
-        
-        broker.start();
-        return broker;
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory(String uri) throws Exception {
-        ActiveMQConnectionFactory result = super.createConnectionFactory(uri);
-        ActiveMQPrefetchPolicy policy = new ActiveMQPrefetchPolicy();
-        policy.setTopicPrefetch(10);
-        result.setPrefetchPolicy(policy);
-        return result;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
deleted file mode 100644
index c71cc5a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-
-/**
- * 
- */
-public class SlowDurableConsumerTopicTest extends SlowConsumerTopicTest {
-
-    protected PerfConsumer[] slowConsumers;
-    protected int numberOfSlowConsumers = 1;
-
-    protected PerfConsumer createSlowConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
-        return new SlowConsumer(fac, dest, "durableSlowConsumer" + number);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java
deleted file mode 100644
index 9eb51d7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.perf;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class TemporaryTopicMemoryAllocationTest extends MemoryAllocationTest {
-    public TemporaryTopicMemoryAllocationTest() {
-        super();
-        // TODO Auto-generated constructor stub
-    }
-
-    protected Destination getDestination(Session session) throws JMSException {
-        return session.createTemporaryTopic();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java
deleted file mode 100644
index 79f07cc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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.plugin;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.net.URI;
-import java.util.Enumeration;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import junit.framework.TestCase;
-
-/**
- * A BrokerStatisticsPluginTest
- * A testcase for https://issues.apache.org/activemq/browse/AMQ-2379
- *
- */
-public class BrokerStatisticsPluginTest extends TestCase{
-    private static final Logger LOG = LoggerFactory.getLogger(BrokerStatisticsPluginTest.class);
-    
-    private Connection connection;
-    private BrokerService broker;
-    
-    public void testBrokerStats() throws Exception{
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue replyTo = session.createTemporaryQueue();
-        MessageConsumer consumer = session.createConsumer(replyTo);
-        Queue query = session.createQueue(StatisticsBroker.STATS_BROKER_PREFIX);
-        MessageProducer producer = session.createProducer(query);
-        Message msg = session.createMessage();
-        msg.setJMSReplyTo(replyTo);
-        producer.send(msg);
-        MapMessage reply = (MapMessage) consumer.receive(10*1000);
-        assertNotNull(reply);
-        assertTrue(reply.getMapNames().hasMoreElements());
-        /*
-        for (Enumeration e = reply.getMapNames();e.hasMoreElements();) {
-            String name = e.nextElement().toString();
-            System.err.println(name+"="+reply.getObject(name));
-        }
-        */
-        
-        
-    }
-    
-    public void testDestinationStats() throws Exception{
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue replyTo = session.createTemporaryQueue();
-        MessageConsumer consumer = session.createConsumer(replyTo);
-        Queue testQueue = session.createQueue("Test.Queue");
-        MessageProducer producer = session.createProducer(null);
-        Queue query = session.createQueue(StatisticsBroker.STATS_DESTINATION_PREFIX + testQueue.getQueueName());
-        Message msg = session.createMessage();
-        
-        producer.send(testQueue,msg);
-        
-        msg.setJMSReplyTo(replyTo);
-        producer.send(query,msg);
-        MapMessage reply = (MapMessage) consumer.receive();
-        assertNotNull(reply);
-        assertTrue(reply.getMapNames().hasMoreElements());
-        /*
-        for (Enumeration e = reply.getMapNames();e.hasMoreElements();) {
-            String name = e.nextElement().toString();
-            System.err.println(name+"="+reply.getObject(name));
-        }
-        */
-        
-        
-    }
-    
-    protected void setUp() throws Exception {
-        broker = createBroker();
-        ConnectionFactory factory = new ActiveMQConnectionFactory(broker.getTransportConnectorURIsAsMap().get("tcp"));
-        connection = factory.createConnection();
-        connection.start();
-    }
-    
-    protected void tearDown() throws Exception{
-        if (this.connection != null) {
-            this.connection.close();
-        }
-        if (this.broker!=null) {
-            this.broker.stop();
-        }
-    }
-    
-    protected BrokerService createBroker() throws Exception {
-        //return createBroker("org/apache/activemq/plugin/statistics-plugin-broker.xml");
-        BrokerService answer = new BrokerService();
-        BrokerPlugin[] plugins = new BrokerPlugin[1];
-        plugins[0] = new StatisticsBrokerPlugin();
-        answer.setPlugins(plugins);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.addConnector("tcp://localhost:0");
-        answer.start();
-        return answer;
-    }
-    
-    protected BrokerService createBroker(String uri) throws Exception {
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java
deleted file mode 100755
index bf14a05..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.proxy;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-public class ProxyConnectorTest extends ProxyTestSupport {
-
-    public ActiveMQDestination destination;
-    public byte destinationType;
-    public int deliveryMode;
-
-    public static Test suite() {
-        return suite(ProxyConnectorTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-    }
-
-    public void initCombosForTestSendAndConsume() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
-    }
-
-    public void testSendAndConsume() throws Exception {
-
-        // Start a producer on local broker using the proxy
-        StubConnection connection1 = createProxyConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.send(producerInfo);
-
-        destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        connection1.send(consumerInfo1);
-
-        // Start a consumer on a remote broker using a proxy connection.
-        StubConnection connection2 = createRemoteProxyConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        connection2.send(consumerInfo2);
-
-        // Give broker enough time to receive and register the consumer info
-        // Either that or make consumer retroactive
-        try {
-            Thread.sleep(2000);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-        // Send the message to the local broker.
-        connection1.request(createMessage(producerInfo, destination, deliveryMode));
-
-        // Verify that the message Was sent to the remote broker and the local
-        // broker.
-        Message m;
-        m = receiveMessage(connection1);
-        assertNotNull(m);
-        assertNoMessagesLeft(connection1);
-
-        m = receiveMessage(connection2);
-        assertNotNull(m);
-        assertNoMessagesLeft(connection2);
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java
deleted file mode 100644
index 8451042..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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.proxy;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.ConsumerThread;
-import org.apache.activemq.util.ProducerThread;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-import java.net.URI;
-
-public class ProxyFailoverTest extends TestCase {
-
-    BrokerService proxyBroker;
-    BrokerService remoteBroker;
-
-    @Override
-    protected void setUp() throws Exception {
-
-        startRemoteBroker(true);
-
-        proxyBroker = new BrokerService();
-        ProxyConnector connector = new ProxyConnector();
-        connector.setBind(new URI("tcp://localhost:51618"));
-        connector.setProxyToLocalBroker(false);
-        connector.setRemote(new URI("failover:(tcp://localhost:61616)"));
-        proxyBroker.addProxyConnector(connector);
-        proxyBroker.setPersistent(false);
-        proxyBroker.setUseJmx(false);
-        proxyBroker.start();
-        proxyBroker.waitUntilStarted();
-
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        proxyBroker.stop();
-        proxyBroker.waitUntilStopped();
-
-        remoteBroker.stop();
-        remoteBroker.waitUntilStopped();
-    }
-
-    public void testFailover() throws Exception {
-        ActiveMQConnectionFactory producerFactory = new ActiveMQConnectionFactory("failover:(tcp://localhost:61616,tcp://localhost:61626)?randomize=false");
-        Connection producerConnection = producerFactory.createConnection();
-        producerConnection.start();
-        Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ProducerThread producer = new ProducerThread(producerSession, producerSession.createQueue("ProxyTest"));
-        producer.setSleep(10);
-        producer.start();
-
-
-        //ActiveMQConnectionFactory consumerFactory = new ActiveMQConnectionFactory("tcp://localhost:51618?wireFormat.cacheEnabled=false");
-        ActiveMQConnectionFactory consumerFactory = new ActiveMQConnectionFactory("tcp://localhost:51618");
-        Connection consumerConnection = consumerFactory.createConnection();
-        consumerConnection.start();
-        Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        ConsumerThread consumer = new ConsumerThread(consumerSession, consumerSession.createQueue("ProxyTest"));
-        consumer.start();
-
-        Thread.sleep(10*1000);
-
-        remoteBroker.stop();
-        remoteBroker.waitUntilStopped();
-        startRemoteBroker(false);
-
-        producer.join();
-        consumer.join();
-
-        assertEquals(1000, consumer.getReceived());
-
-    }
-
-    protected void startRemoteBroker(boolean delete) throws Exception {
-        remoteBroker = new BrokerService();
-        remoteBroker.addConnector("tcp://localhost:61616");
-        if (delete) {
-            remoteBroker.deleteAllMessages();
-        }
-        remoteBroker.setUseJmx(false);
-        remoteBroker.start();
-        remoteBroker.waitUntilStarted();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java
deleted file mode 100755
index 2c884ec..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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.proxy;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.usage.SystemUsage;
-
-public class ProxyTestSupport extends BrokerTestSupport {
-
-    protected ArrayList<StubConnection> connections = new ArrayList<StubConnection>();
-
-    protected TransportConnector connector;
-
-    protected PersistenceAdapter remotePersistenceAdapter;
-    protected BrokerService remoteBroker;
-    protected SystemUsage remoteMemoryManager;
-    protected TransportConnector remoteConnector;
-    private ProxyConnector proxyConnector;
-    private ProxyConnector remoteProxyConnector;
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setBrokerName("broker1");
-        service.setPersistent(false);
-        service.setUseJmx(false);
-
-        connector = service.addConnector(getLocalURI());
-        proxyConnector = new ProxyConnector();
-        proxyConnector.setName("proxy");
-        proxyConnector.setBind(new URI(getLocalProxyURI()));
-        proxyConnector.setRemote(new URI("fanout:static://" + getRemoteURI()));
-        service.addProxyConnector(proxyConnector);
-
-        return service;
-    }
-
-    protected BrokerService createRemoteBroker() throws Exception {
-        BrokerService service = new BrokerService();
-        service.setBrokerName("broker2");
-        service.setPersistent(false);
-        service.setUseJmx(false);
-
-        remoteConnector = service.addConnector(getRemoteURI());
-        remoteProxyConnector = new ProxyConnector();
-        remoteProxyConnector.setName("remoteProxy");
-        remoteProxyConnector.setBind(new URI(getRemoteProxyURI()));
-        remoteProxyConnector.setRemote(new URI("fanout:static://" + getLocalURI()));
-        service.addProxyConnector(remoteProxyConnector);
-
-        return service;
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        remoteBroker = createRemoteBroker();
-        remoteBroker.start();
-    }
-
-    protected void tearDown() throws Exception {
-        for (Iterator<StubConnection> iter = connections.iterator(); iter.hasNext();) {
-            StubConnection connection = iter.next();
-            connection.stop();
-            iter.remove();
-        }
-        remoteBroker.stop();
-        super.tearDown();
-    }
-
-    protected String getRemoteURI() {
-        return "tcp://localhost:6171";
-    }
-
-    protected String getLocalURI() {
-        return "tcp://localhost:6161";
-    }
-
-    protected String getRemoteProxyURI() {
-        return "tcp://localhost:6162";
-    }
-
-    protected String getLocalProxyURI() {
-        return "tcp://localhost:6172";
-    }
-
-    protected StubConnection createConnection() throws Exception {
-        Transport transport = TransportFactory.connect(connector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-    protected StubConnection createRemoteConnection() throws Exception {
-        Transport transport = TransportFactory.connect(remoteConnector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-    protected StubConnection createProxyConnection() throws Exception {
-        Transport transport = TransportFactory.connect(proxyConnector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-    protected StubConnection createRemoteProxyConnection() throws Exception {
-        Transport transport = TransportFactory.connect(remoteProxyConnector.getServer().getConnectURI());
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java
deleted file mode 100644
index 0b6b223..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.security;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.jaas.GroupPrincipal;
-
-/**
- * 
- * 
- */
-public class AuthorizationMapTest extends TestCase {
-    static final GroupPrincipal GUESTS = new GroupPrincipal("guests");
-    static final GroupPrincipal USERS = new GroupPrincipal("users");
-    static final GroupPrincipal ADMINS = new GroupPrincipal("admins");
-    static final GroupPrincipal TEMP_DESTINATION_ADMINS = new GroupPrincipal("tempDestAdmins");
-
-    public void testAuthorizationMap() {
-        AuthorizationMap map = createAuthorizationMap();
-
-        Set readACLs = map.getReadACLs(new ActiveMQQueue("USERS.FOO.BAR"));
-        assertEquals("set size: " + readACLs, 2, readACLs.size());
-        assertTrue("Contains users group", readACLs.contains(ADMINS));
-        assertTrue("Contains users group", readACLs.contains(USERS));
-
-    }
-
-    public void testAuthorizationMapWithTempDest() {
-        AuthorizationMap map = createAuthorizationMapWithTempDest();
-
-        Set readACLs = map.getReadACLs(new ActiveMQQueue("USERS.FOO.BAR"));
-        assertEquals("set size: " + readACLs, 2, readACLs.size());
-        assertTrue("Contains users group", readACLs.contains(ADMINS));
-        assertTrue("Contains users group", readACLs.contains(USERS));
-
-        Set tempAdminACLs = map.getTempDestinationAdminACLs();
-        assertEquals("set size: " + tempAdminACLs, 1, tempAdminACLs.size());
-        assertTrue("Contains users group", tempAdminACLs.contains(TEMP_DESTINATION_ADMINS));
-
-    }
-
-    protected AuthorizationMap createAuthorizationMap() {
-        DefaultAuthorizationMap answer = new DefaultAuthorizationMap();
-
-        List<AuthorizationEntry> entries = new ArrayList<AuthorizationEntry>();
-
-        AuthorizationEntry entry = new AuthorizationEntry();
-        entry.setGroupClass("org.apache.activemq.jaas.GroupPrincipal");
-        entry.setQueue(">");
-        try {
-            entry.setRead("admins");
-        } catch (Exception e) {
-            fail(e.toString());
-        }
-
-        entries.add(entry);
-        // entry using default org.apache.activemq.jaas.GroupPrincipal class
-        entry = new AuthorizationEntry();
-        entry.setQueue("USERS.>");
-        try {
-            entry.setRead("users");
-        } catch (Exception e) {
-            fail(e.toString());
-        }
-        entries.add(entry);
-
-        answer.setAuthorizationEntries(entries);
-
-        return answer;
-    }
-
-    protected AuthorizationMap createAuthorizationMapWithTempDest() {
-        DefaultAuthorizationMap answer = new DefaultAuthorizationMap();
-
-        List<AuthorizationEntry> entries = new ArrayList<AuthorizationEntry>();
-
-        AuthorizationEntry entry = new AuthorizationEntry();
-        entry.setQueue(">");
-        try {
-            entry.setRead("admins");
-        } catch (Exception e) {
-            fail(e.toString());
-        }
-        entries.add(entry);
-
-        entry = new AuthorizationEntry();
-        entry.setQueue("USERS.>");
-        try {
-            entry.setRead("users");
-        } catch (Exception e) {
-            fail(e.toString());
-        }
-        entries.add(entry);
-
-        answer.setAuthorizationEntries(entries);
-
-        // create entry for temporary queue
-        TempDestinationAuthorizationEntry tEntry = new TempDestinationAuthorizationEntry();
-        try {
-            tEntry.setAdmin("tempDestAdmins");
-        } catch (Exception e) {
-            fail(e.toString());
-        }
-
-        answer.setTempDestinationAuthorizationEntry(tEntry);
-
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasCertificateAuthenticationBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasCertificateAuthenticationBrokerTest.java
deleted file mode 100644
index 2673f69..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasCertificateAuthenticationBrokerTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- * 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.security;
-
-import java.security.Principal;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
-
-import junit.framework.TestCase;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.StubBroker;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.jaas.GroupPrincipal;
-import org.apache.activemq.jaas.UserPrincipal;
-import org.apache.activemq.transport.tcp.StubX509Certificate;
-
-public class JaasCertificateAuthenticationBrokerTest extends TestCase {
-    StubBroker receiveBroker;
-
-    JaasCertificateAuthenticationBroker authBroker;
-
-    ConnectionContext connectionContext;
-    ConnectionInfo connectionInfo;
-
-    protected void setUp() throws Exception {
-        receiveBroker = new StubBroker();
-
-        authBroker = new JaasCertificateAuthenticationBroker(receiveBroker, "");
-
-        connectionContext = new ConnectionContext();
-        connectionInfo = new ConnectionInfo();
-
-        connectionInfo.setTransportContext(new StubX509Certificate[] {});
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    private void setConfiguration(Set<String> userNames, Set<String> groupNames, boolean loginShouldSucceed) {
-        HashMap<String, String> configOptions = new HashMap<String, String>();
-
-        String userNamesString;
-        {
-            Iterator<String> iter = userNames.iterator();
-            userNamesString = "" + (iter.hasNext() ? iter.next() : "");
-            while (iter.hasNext()) {
-                userNamesString += "," + iter.next();
-            }
-        }
-
-        String groupNamesString = "";
-        {
-            Iterator<String> iter = groupNames.iterator();
-            groupNamesString = "" + (iter.hasNext() ? iter.next() : "");
-            while (iter.hasNext()) {
-                groupNamesString += "," + iter.next();
-            }
-        }
-
-        configOptions.put(StubLoginModule.ALLOW_LOGIN_PROPERTY, loginShouldSucceed ? "true" : "false");
-        configOptions.put(StubLoginModule.USERS_PROPERTY, userNamesString);
-        configOptions.put(StubLoginModule.GROUPS_PROPERTY, groupNamesString);
-        AppConfigurationEntry configEntry = new AppConfigurationEntry("org.apache.activemq.security.StubLoginModule", AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
-                                                                      configOptions);
-
-        StubJaasConfiguration jaasConfig = new StubJaasConfiguration(configEntry);
-
-        Configuration.setConfiguration(jaasConfig);
-    }
-
-    public void testAddConnectionSuccess() {
-        String dnUserName = "dnUserName";
-
-        HashSet<String> userNames = new HashSet<String>();
-        userNames.add(dnUserName);
-
-        HashSet<String> groupNames = new HashSet<String>();
-        groupNames.add("testGroup1");
-        groupNames.add("testGroup2");
-        groupNames.add("tesetGroup3");
-
-        setConfiguration(userNames, groupNames, true);
-
-        try {
-            authBroker.addConnection(connectionContext, connectionInfo);
-        } catch (Exception e) {
-            fail("Call to addConnection failed: " + e.getMessage());
-        }
-
-        assertEquals("Number of addConnection calls to underlying Broker must match number of calls made to " + "AuthenticationBroker.", 1, receiveBroker.addConnectionData.size());
-
-        ConnectionContext receivedContext = ((StubBroker.AddConnectionData)receiveBroker.addConnectionData.getFirst()).connectionContext;
-
-        assertEquals("The SecurityContext's userName must be set to that of the UserPrincipal.", dnUserName, receivedContext.getSecurityContext().getUserName());
-
-        Set receivedPrincipals = receivedContext.getSecurityContext().getPrincipals();
-
-        for (Iterator iter = receivedPrincipals.iterator(); iter.hasNext();) {
-            Principal currentPrincipal = (Principal)iter.next();
-
-            if (currentPrincipal instanceof UserPrincipal) {
-                if (userNames.remove(currentPrincipal.getName())) {
-                    // Nothing, we did good.
-                } else {
-                    // Found an unknown userName.
-                    fail("Unknown UserPrincipal found");
-                }
-            } else if (currentPrincipal instanceof GroupPrincipal) {
-                if (groupNames.remove(currentPrincipal.getName())) {
-                    // Nothing, we did good.
-                } else {
-                    fail("Unknown GroupPrincipal found.");
-                }
-            } else {
-                fail("Unexpected Principal subclass found.");
-            }
-        }
-
-        if (!userNames.isEmpty()) {
-            fail("Some usernames were not added as UserPrincipals");
-        }
-
-        if (!groupNames.isEmpty()) {
-            fail("Some group names were not added as GroupPrincipals");
-        }
-    }
-
-    public void testAddConnectionFailure() {
-        HashSet<String> userNames = new HashSet<String>();
-
-        HashSet<String> groupNames = new HashSet<String>();
-        groupNames.add("testGroup1");
-        groupNames.add("testGroup2");
-        groupNames.add("tesetGroup3");
-
-        setConfiguration(userNames, groupNames, false);
-
-        boolean connectFailed = false;
-        try {
-            authBroker.addConnection(connectionContext, connectionInfo);
-        } catch (SecurityException e) {
-            connectFailed = true;
-        } catch (Exception e) {
-            fail("Failed to connect for unexpected reason: " + e.getMessage());
-        }
-
-        if (!connectFailed) {
-            fail("Unauthenticated connection allowed.");
-        }
-
-        assertEquals("Unauthenticated connection allowed.", true, receiveBroker.addConnectionData.isEmpty());
-    }
-
-    public void testRemoveConnection() throws Exception {
-        connectionContext.setSecurityContext(new StubSecurityContext());
-
-        authBroker.removeConnection(connectionContext, connectionInfo, new Throwable());
-
-        assertEquals("removeConnection should clear ConnectionContext.", null, connectionContext.getSecurityContext());
-
-        assertEquals("Incorrect number of calls to underlying broker were made.", 1, receiveBroker.removeConnectionData.size());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasDualAuthenticationBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasDualAuthenticationBrokerTest.java
deleted file mode 100644
index f8b977e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasDualAuthenticationBrokerTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * 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.security;
-
-import junit.framework.TestCase;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.Connector;
-import org.apache.activemq.broker.StubBroker;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.jaas.GroupPrincipal;
-import org.apache.activemq.jaas.UserPrincipal;
-import org.apache.activemq.transport.tcp.*;
-
-import javax.net.ssl.SSLServerSocket;
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
-import java.net.URI;
-import java.security.Principal;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- *
- */
-public class JaasDualAuthenticationBrokerTest extends TestCase {
-
-    private static final String INSECURE_GROUP = "insecureGroup";
-    private static final String INSECURE_USERNAME = "insecureUserName";
-    private static final String DN_GROUP = "dnGroup";
-    private static final String DN_USERNAME = "dnUserName";
-
-    StubBroker receiveBroker;
-    JaasDualAuthenticationBroker authBroker;
-
-    ConnectionContext connectionContext;
-    ConnectionInfo connectionInfo;
-
-    SslTransportServer sslTransportServer;
-    TcpTransportServer nonSslTransportServer;
-
-    /** create a dual login config, for both SSL and non-SSL connections
-     * using the StubLoginModule
-     *
-     */
-    void createLoginConfig() {
-        HashMap<String, String> sslConfigOptions = new HashMap<String, String>();
-        HashMap<String, String> configOptions = new HashMap<String, String>();
-
-        sslConfigOptions.put(StubLoginModule.ALLOW_LOGIN_PROPERTY, "true");
-        sslConfigOptions.put(StubLoginModule.USERS_PROPERTY, DN_USERNAME);
-        sslConfigOptions.put(StubLoginModule.GROUPS_PROPERTY, DN_GROUP);
-        AppConfigurationEntry sslConfigEntry = new AppConfigurationEntry("org.apache.activemq.security.StubLoginModule",
-                AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, sslConfigOptions);
-
-        configOptions.put(StubLoginModule.ALLOW_LOGIN_PROPERTY, "true");
-        configOptions.put(StubLoginModule.USERS_PROPERTY, INSECURE_USERNAME);
-        configOptions.put(StubLoginModule.GROUPS_PROPERTY, INSECURE_GROUP);
-        AppConfigurationEntry configEntry = new AppConfigurationEntry("org.apache.activemq.security.StubLoginModule",
-                AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, configOptions);
-
-        StubDualJaasConfiguration jaasConfig = new StubDualJaasConfiguration(configEntry, sslConfigEntry);
-
-        Configuration.setConfiguration(jaasConfig);
-    }
-
-    protected void setUp() throws Exception {
-        receiveBroker = new StubBroker();
-
-        authBroker = new JaasDualAuthenticationBroker(receiveBroker, "activemq-domain", "activemq-ssl-domain");
-
-        connectionContext = new ConnectionContext();
-
-        SSLServerSocket sslServerSocket = new StubSSLServerSocket();
-        StubSSLSocketFactory socketFactory = new StubSSLSocketFactory(sslServerSocket);
-
-        try {
-            sslTransportServer = new SslTransportServer(null, new URI("ssl://localhost:61616?needClientAuth=true"),
-                    socketFactory);
-        } catch (Exception e) {
-            fail("Unable to create SslTransportServer.");
-        }
-        sslTransportServer.setNeedClientAuth(true);
-        sslTransportServer.bind();
-
-        try {
-            nonSslTransportServer = new TcpTransportServer(null, new URI("tcp://localhost:61613"), socketFactory); 
-        } catch (Exception e) {
-            fail("Unable to create TcpTransportServer.");
-        }
-
-
-        connectionInfo = new ConnectionInfo();
-
-        createLoginConfig();
-    }
-
-    protected void tearDown() throws Exception {
-            super.tearDown();
-    }
-
-
-    public void testSecureConnector() {
-        Connector connector = new TransportConnector(sslTransportServer);
-        connectionContext.setConnector(connector);
-        connectionInfo.setTransportContext(new StubX509Certificate[] {});
-
-        try {
-            authBroker.addConnection(connectionContext, connectionInfo);
-        } catch (Exception e) {
-            fail("Call to addConnection failed: " + e.getMessage());
-        }
-
-        assertEquals("Number of addConnection calls to underlying Broker must match number of calls made to " +
-                "AuthenticationBroker.", 1, receiveBroker.addConnectionData.size());
-
-        ConnectionContext receivedContext = receiveBroker.addConnectionData.getFirst().connectionContext;
-
-        assertEquals("The SecurityContext's userName must be set to that of the UserPrincipal.",
-                DN_USERNAME, receivedContext.getSecurityContext().getUserName());
-
-        Set receivedPrincipals = receivedContext.getSecurityContext().getPrincipals();
-
-
-        assertEquals("2 Principals received", 2, receivedPrincipals.size());
-        
-        for (Iterator iter = receivedPrincipals.iterator(); iter.hasNext();) {
-            Principal currentPrincipal = (Principal)iter.next();
-
-            if (currentPrincipal instanceof UserPrincipal) {
-                assertEquals("UserPrincipal is '" + DN_USERNAME + "'", DN_USERNAME, currentPrincipal.getName());
-            } else if (currentPrincipal instanceof GroupPrincipal) {
-                assertEquals("GroupPrincipal is '" + DN_GROUP + "'", DN_GROUP, currentPrincipal.getName());
-            } else {
-                fail("Unexpected Principal subclass found.");
-            }
-        }
-
-        try {
-            authBroker.removeConnection(connectionContext, connectionInfo, null);
-        } catch (Exception e) {
-            fail("Call to removeConnection failed: " + e.getMessage());
-        }
-        assertEquals("Number of removeConnection calls to underlying Broker must match number of calls made to " +
-                "AuthenticationBroker.", 1, receiveBroker.removeConnectionData.size());
-    }
-
-    public void testInsecureConnector() {
-        Connector connector = new TransportConnector(nonSslTransportServer);
-        connectionContext.setConnector(connector);
-        connectionInfo.setUserName(INSECURE_USERNAME);
-        
-        try {
-            authBroker.addConnection(connectionContext, connectionInfo);
-        } catch (Exception e) {
-            fail("Call to addConnection failed: " + e.getMessage());
-        }
-
-        assertEquals("Number of addConnection calls to underlying Broker must match number of calls made to " +
-                "AuthenticationBroker.", 1, receiveBroker.addConnectionData.size());
-
-        ConnectionContext receivedContext = receiveBroker.addConnectionData.getFirst().connectionContext;
-
-        assertEquals("The SecurityContext's userName must be set to that of the UserPrincipal.",
-                INSECURE_USERNAME, receivedContext.getSecurityContext().getUserName());
-
-        Set receivedPrincipals = receivedContext.getSecurityContext().getPrincipals();
-
-        assertEquals("2 Principals received", 2, receivedPrincipals.size());
-        for (Iterator iter = receivedPrincipals.iterator(); iter.hasNext();) {
-            Principal currentPrincipal = (Principal)iter.next();
-
-            if (currentPrincipal instanceof UserPrincipal) {
-                assertEquals("UserPrincipal is '" + INSECURE_USERNAME + "'",
-                        INSECURE_USERNAME, currentPrincipal.getName());
-            } else if (currentPrincipal instanceof GroupPrincipal) {
-                assertEquals("GroupPrincipal is '" + INSECURE_GROUP + "'",
-                        INSECURE_GROUP, currentPrincipal.getName());
-            } else {
-                fail("Unexpected Principal subclass found.");
-            }
-        }
-
-        try {
-            authBroker.removeConnection(connectionContext, connectionInfo, null);
-        } catch (Exception e) {
-            fail("Call to removeConnection failed: " + e.getMessage());
-        }
-        assertEquals("Number of removeConnection calls to underlying Broker must match number of calls made to " +
-                "AuthenticationBroker.", 1, receiveBroker.removeConnectionData.size());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasNetworkTest.java
deleted file mode 100644
index 5c85cb6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/JaasNetworkTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.security;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-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.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-
-public class JaasNetworkTest extends TestCase {
-    
-    BrokerService broker1;
-    BrokerService broker2;
-    
-    public void setUp() throws Exception {
-        System.setProperty("java.security.auth.login.config", "src/test/resources/login.config");
-        broker1 = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/security/broker1.xml"));
-        broker2 = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/security/broker2.xml"));
-        broker1.waitUntilStarted();
-        broker2.waitUntilStarted();
-        Thread.sleep(2000);
-    }
-    
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        broker1.stop();
-        broker1.waitUntilStopped();
-        broker2.stop();
-        broker2.waitUntilStopped();
-    }
-
-
-
-    public void testNetwork() throws Exception {
-        
-        System.setProperty("javax.net.ssl.trustStore", "src/test/resources/org/apache/activemq/security/client.ts");
-        System.setProperty("javax.net.ssl.trustStorePassword", "password");
-        System.setProperty("javax.net.ssl.trustStoreType", "jks");
-        System.setProperty("javax.net.ssl.keyStore", "src/test/resources/org/apache/activemq/security/client.ks");
-        System.setProperty("javax.net.ssl.keyStorePassword", "password");
-        System.setProperty("javax.net.ssl.keyStoreType", "jks");  
-        
-        ActiveMQConnectionFactory producerFactory  = new ActiveMQConnectionFactory("ssl://localhost:61617");
-        Connection producerConn = producerFactory.createConnection();
-        Session producerSess = producerConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSess.createProducer(new ActiveMQQueue("test"));
-        producerConn.start();
-        TextMessage sentMessage = producerSess.createTextMessage("test");
-        producer.send(sentMessage);
-        
-        ActiveMQConnectionFactory consumerFactory  = new ActiveMQConnectionFactory("ssl://localhost:61618");
-        Connection consumerConn = consumerFactory.createConnection();
-        Session consumerSess = consumerConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumerConn.start();
-        MessageConsumer consumer = consumerSess.createConsumer(new ActiveMQQueue("test"));
-        TextMessage receivedMessage = (TextMessage)consumer.receive(100);
-        assertEquals(sentMessage, receivedMessage);
-
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/LDAPAuthorizationMapTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/LDAPAuthorizationMapTest.java
deleted file mode 100755
index 3310451..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/LDAPAuthorizationMapTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.security;
-
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.naming.Context;
-import javax.naming.NameClassPair;
-import javax.naming.NamingEnumeration;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.jaas.GroupPrincipal;
-import org.apache.directory.server.core.configuration.StartupConfiguration;
-import org.apache.directory.server.core.jndi.CoreContextFactory;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * This test assumes setup like in file 'AMQauth.ldif'. Contents of this file is
- * attached below in comments.
- * 
- * @author ngcutura
- * 
- */
-public class LDAPAuthorizationMapTest extends TestCase {
-    private LDAPAuthorizationMap authMap;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        startLdapServer();
-
-        authMap = new LDAPAuthorizationMap();
-    }
-
-    protected void startLdapServer() throws Exception {
-        ApplicationContext factory = new ClassPathXmlApplicationContext("org/apache/activemq/security/ldap-spring.xml");
-        StartupConfiguration cfg = (StartupConfiguration) factory.getBean("configuration");
-        Properties env = (Properties) factory.getBean("environment");
-
-        env.setProperty(Context.PROVIDER_URL, "");
-        env.setProperty(Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName());
-        env.putAll(cfg.toJndiEnvironment());
-
-        new InitialDirContext(env);
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testOpen() throws Exception {
-        DirContext ctx = authMap.open();
-        HashSet<String> set = new HashSet<String>();
-        NamingEnumeration list = ctx.list("ou=destinations,o=ActiveMQ,dc=example,dc=com");
-        while (list.hasMore()) {
-            NameClassPair ncp = (NameClassPair) list.next();
-            set.add(ncp.getName());
-        }
-        assertTrue(set.contains("ou=topics"));
-        assertTrue(set.contains("ou=queues"));
-    }
-
-    /*
-     * Test method for
-     * 'org.apache.activemq.security.LDAPAuthorizationMap.getAdminACLs(ActiveMQDestination)'
-     */
-    public void testGetAdminACLs() {
-        ActiveMQDestination q1 = new ActiveMQQueue("queue1");
-        Set aclsq1 = authMap.getAdminACLs(q1);
-        assertEquals(1, aclsq1.size());
-        assertTrue(aclsq1.contains(new GroupPrincipal("role1")));
-
-        ActiveMQDestination t1 = new ActiveMQTopic("topic1");
-        Set aclst1 = authMap.getAdminACLs(t1);
-        assertEquals(1, aclst1.size());
-        assertTrue(aclst1.contains(new GroupPrincipal("role1")));
-    }
-
-    /*
-     * Test method for
-     * 'org.apache.activemq.security.LDAPAuthorizationMap.getReadACLs(ActiveMQDestination)'
-     */
-    public void testGetReadACLs() {
-        ActiveMQDestination q1 = new ActiveMQQueue("queue1");
-        Set aclsq1 = authMap.getReadACLs(q1);
-        assertEquals(1, aclsq1.size());
-        assertTrue(aclsq1.contains(new GroupPrincipal("role1")));
-
-        ActiveMQDestination t1 = new ActiveMQTopic("topic1");
-        Set aclst1 = authMap.getReadACLs(t1);
-        assertEquals(1, aclst1.size());
-        assertTrue(aclst1.contains(new GroupPrincipal("role2")));
-    }
-
-    /*
-     * Test method for
-     * 'org.apache.activemq.security.LDAPAuthorizationMap.getWriteACLs(ActiveMQDestination)'
-     */
-    public void testGetWriteACLs() {
-        ActiveMQDestination q1 = new ActiveMQQueue("queue1");
-        Set aclsq1 = authMap.getWriteACLs(q1);
-        assertEquals(2, aclsq1.size());
-        assertTrue(aclsq1.contains(new GroupPrincipal("role1")));
-        assertTrue(aclsq1.contains(new GroupPrincipal("role2")));
-
-        ActiveMQDestination t1 = new ActiveMQTopic("topic1");
-        Set aclst1 = authMap.getWriteACLs(t1);
-        assertEquals(1, aclst1.size());
-        assertTrue(aclst1.contains(new GroupPrincipal("role3")));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
deleted file mode 100644
index 157b1e4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.security;
-
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SecurityJMXTest extends TestCase {
-	
-	private static final Logger LOG = LoggerFactory.getLogger(SimpleAuthenticationPluginTest.class);
-	private BrokerService broker; 
-	
-	public void setUp() throws Exception {
-		broker = createBroker();
-		broker.waitUntilStarted();
-		Thread.sleep(500);
-	}
-
-	public void tearDown() throws Exception {
-	    broker.stop();
-	}
-
-    public void testMoveMessages() throws Exception {
-        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1199/jmxrmi");
-        JMXConnector connector = JMXConnectorFactory.connect(url, null);
-        connector.connect();
-        MBeanServerConnection connection = connector.getMBeanServerConnection();
-        ObjectName name = new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=TEST.Q");
-        QueueViewMBean queueMbean = (QueueViewMBean) MBeanServerInvocationHandler.newProxyInstance(connection, name, QueueViewMBean.class, true);
-        String msgId = queueMbean.sendTextMessage("test", "system", "manager");
-        queueMbean.moveMessageTo(msgId, "TEST1.Q");
-    }
-    
-    
-    public void testBrowseExpiredMessages() throws Exception {
-        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1199/jmxrmi");
-        JMXConnector connector = JMXConnectorFactory.connect(url, null);
-        connector.connect();
-        MBeanServerConnection connection = connector.getMBeanServerConnection();
-        ObjectName name = new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=TEST.Q");
-        QueueViewMBean queueMbean = (QueueViewMBean) MBeanServerInvocationHandler.newProxyInstance(connection, name, QueueViewMBean.class, true);
-        HashMap<String, String> headers = new HashMap<String, String>();
-        headers.put("JMSExpiration", Long.toString(System.currentTimeMillis() + 2000));
-        headers.put("JMSDeliveryMode", Integer.toString(DeliveryMode.PERSISTENT));
-        String msgId = queueMbean.sendTextMessage(headers, "test", "system", "manager");
-        // allow message to expire on the queue
-        TimeUnit.SECONDS.sleep(3);
-        
-        Connection c = new ActiveMQConnectionFactory("vm://localhost").createConnection("system", "manager");
-        c.start();
-        
-        // browser consumer will force expriation check on addConsumer
-        QueueBrowser browser = c.createSession(false, Session.AUTO_ACKNOWLEDGE).createBrowser(new ActiveMQQueue("TEST.Q"));
-        assertTrue("no message in the q", !browser.getEnumeration().hasMoreElements());
-        
-        // verify dlq got the message, no security exception as brokers context is now used
-        browser = c.createSession(false, Session.AUTO_ACKNOWLEDGE).createBrowser(new ActiveMQQueue("ActiveMQ.DLQ"));  
-        assertTrue("one message in the dlq", browser.getEnumeration().hasMoreElements());
-    }
-    
-	
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/security/simple-auth-broker.xml");
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-	
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java
deleted file mode 100644
index 8717708..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * 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.security;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * 
- */
-public class SecurityTestSupport extends JmsTestSupport {
-
-    public ActiveMQDestination destination;
-
-    /**
-     * Overrides to set the JMSXUserID flag to true.
-     */
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.setPopulateJMSXUserID(true);
-        return broker;
-    }
-
-    public void testUserReceiveFails() throws JMSException {
-        doReceive(true);
-    }
-
-    public void testInvalidAuthentication() throws JMSException {
-        try {
-            // No user id
-            Connection c = factory.createConnection();
-            connections.add(c);
-            c.start();
-            fail("Expected exception.");
-        } catch (JMSException e) {
-        }
-
-        try {
-            // Bad password
-            Connection c = factory.createConnection("user", "krap");
-            connections.add(c);
-            c.start();
-            fail("Expected exception.");
-        } catch (JMSException e) {
-        }
-
-        try {
-            // Bad userid
-            Connection c = factory.createConnection("userkrap", null);
-            connections.add(c);
-            c.start();
-            fail("Expected exception.");
-        } catch (JMSException e) {
-        }
-    }
-
-    public void testUserReceiveSucceeds() throws JMSException {
-        Message m = doReceive(false);
-        assertEquals("system", ((ActiveMQMessage)m).getUserID());
-        assertEquals("system", m.getStringProperty("JMSXUserID"));
-    }
-
-    public void testGuestReceiveSucceeds() throws JMSException {
-        doReceive(false);
-    }
-
-    public void testGuestReceiveFails() throws JMSException {
-        doReceive(true);
-    }
-
-    public void testUserSendSucceeds() throws JMSException {
-        Message m = doSend(false);
-        assertEquals("user", ((ActiveMQMessage)m).getUserID());
-        assertEquals("user", m.getStringProperty("JMSXUserID"));
-    }
-
-    public void testUserSendFails() throws JMSException {
-        doSend(true);
-    }
-
-    public void testGuestSendFails() throws JMSException {
-        doSend(true);
-    }
-
-    public void testGuestSendSucceeds() throws JMSException {
-        doSend(false);
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public Message doSend(boolean fail) throws JMSException {
-
-        Connection adminConnection = factory.createConnection("system", "manager");
-        connections.add(adminConnection);
-
-        adminConnection.start();
-        Session adminSession = adminConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = adminSession.createConsumer(destination);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        try {
-            sendMessages(session, destination, 1);
-        } catch (JMSException e) {
-            // If test is expected to fail, the cause must only be a
-            // SecurityException
-            // otherwise rethrow the exception
-            if (!fail || !(e.getCause() instanceof SecurityException)) {
-                throw e;
-            }
-        }
-
-        Message m = consumer.receive(1000);
-        if (fail) {
-            assertNull(m);
-        } else {
-            assertNotNull(m);
-            assertEquals("0", ((TextMessage)m).getText());
-            assertNull(consumer.receiveNoWait());
-        }
-        return m;
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public Message doReceive(boolean fail) throws JMSException {
-
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = null;
-        try {
-            consumer = session.createConsumer(destination);
-            if (fail) {
-                fail("Expected failure due to security constraint.");
-            }
-        } catch (JMSException e) {
-            if (fail && e.getCause() instanceof SecurityException) {
-                return null;
-            }
-            throw e;
-        }
-
-        Connection adminConnection = factory.createConnection("system", "manager");
-        connections.add(adminConnection);
-        Session adminSession = adminConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        sendMessages(adminSession, destination, 1);
-
-        Message m = consumer.receive(1000);
-        assertNotNull(m);
-        assertEquals("0", ((TextMessage)m).getText());
-        assertNull(consumer.receiveNoWait());
-        return m;
-
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserReceiveFails() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("GUEST.BAR")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestInvalidAuthentication() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestGuestReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("GUEST.BAR")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestGuestReceiveFails() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO") });
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendSucceeds() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("USERS.FOO"), new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("USERS.FOO"),
-                                                          new ActiveMQTopic("GUEST.BAR")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendFails() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestGuestSendFails() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestGuestSendSucceeds() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("GUEST.BAR")});
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
deleted file mode 100644
index 6e8a1b5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.security;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-
-import junit.framework.Test;
-
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleAnonymousPluginTest.class);
-
-    public static Test suite() {
-        return suite(SimpleAnonymousPluginTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/security/simple-anonymous-broker.xml");
-    }    
-    
-    public void testInvalidAuthentication() throws JMSException {
-
-        try {
-            // Bad password
-            Connection c = factory.createConnection("user", "krap");
-            connections.add(c);
-            c.start();
-            fail("Expected exception.");
-        } catch (JMSException e) {
-        }
-
-        try {
-            // Bad userid
-            Connection c = factory.createConnection("userkrap", null);
-            connections.add(c);
-            c.start();
-            fail("Expected exception.");
-        } catch (JMSException e) {
-        }
-    }
-    
-    
-    public void testAnonymousReceiveSucceeds() throws JMSException {
-        doReceive(false);
-    }
-
-    public void testAnonymousReceiveFails() throws JMSException {
-        doReceive(true);
-    }
-    
-    public void testAnonymousSendFails() throws JMSException {
-        doSend(true);
-    }
-
-    public void testAnonymousSendSucceeds() throws JMSException {
-        doSend(false);
-    }
-    
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestAnonymousReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("GUEST.BAR")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestAnonymousReceiveFails() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO") });
-    }
-    
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestAnonymousSendFails() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestAnonymousSendSucceeds() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("GUEST.BAR")});
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java
deleted file mode 100644
index 0456841..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.security;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticationPluginTest {
-
-    public static Test suite() {
-        return suite(SimpleAuthenticationPluginSeparatorTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/security/simple-auth-separator.xml");
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserReceiveFails() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("GUEST/BAR"), new ActiveMQTopic("GUEST/BAR")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestInvalidAuthentication() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("USERS/FOO"), new ActiveMQTopic("USERS/FOO")});
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestGuestReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST/BAR"), new ActiveMQTopic("GUEST/BAR")});
-    }
-
-    /**
-     * @see {@link org.apache.activemq.CombinationTestSupport}
-     */
-    public void initCombosForTestGuestReceiveFails() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS/FOO"), new ActiveMQTopic("USERS/FOO") });
-    }
-
-    /**
-     * @see {@link org.apache.activemq.CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendSucceeds() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("USERS/FOO"), new ActiveMQQueue("GUEST/BAR"), new ActiveMQTopic("USERS/FOO"),
-                                                          new ActiveMQTopic("GUEST/BAR")});
-    }
-
-    /**
-     * @see {@link org.apache.activemq.CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendFails() {
-        addCombinationValues("userName", new Object[] {"user"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")});
-    }
-
-    /**
-     * @see {@link org.apache.activemq.CombinationTestSupport}
-     */
-    public void initCombosForTestGuestSendFails() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS/FOO"), new ActiveMQTopic("USERS/FOO")});
-    }
-
-    /**
-     * @see {@link org.apache.activemq.CombinationTestSupport}
-     */
-    public void initCombosForTestGuestSendSucceeds() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST/BAR"), new ActiveMQTopic("GUEST/BAR")});
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java
deleted file mode 100644
index 02892e6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.security;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.TemporaryTopic;
-import javax.management.ObjectName;
-
-import junit.framework.Test;
-
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.TopicViewMBean;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SimpleAuthenticationPluginTest extends SecurityTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleAuthenticationPluginTest.class);
-
-    public static Test suite() {
-        return suite(SimpleAuthenticationPluginTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/security/simple-auth-broker.xml");
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-    
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestPredefinedDestinations() {
-        addCombinationValues("userName", new Object[] {"guest"});
-        addCombinationValues("password", new Object[] {"password"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST.Q")});
-    }
-    
-    public void testPredefinedDestinations() throws JMSException {
-    	Message sent = doSend(false);
-        assertEquals("guest", ((ActiveMQMessage)sent).getUserID());
-        assertEquals("guest", sent.getStringProperty("JMSXUserID"));
-    }
-    
-    public void testTempDestinations() throws Exception {
-        Connection conn = factory.createConnection("guest", "password");
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        String name = "org.apache.activemq:BrokerName=localhost,Type=TempTopic";
-        try {
-            conn.start();
-            TemporaryTopic temp = sess.createTemporaryTopic();
-            name += ",Destination=" + temp.getTopicName().replaceAll(":", "_");
-            fail("Should have failed creating a temp topic");
-        } catch (Exception ignore) {}
-        
-        ObjectName objName = new ObjectName(name);
-        TopicViewMBean mbean = (TopicViewMBean)broker.getManagementContext().newProxyInstance(objName, TopicViewMBean.class, true);
-        try {
-            System.out.println(mbean.getName());
-            fail("Shouldn't have created a temp topic");
-        } catch (Exception ignore) {}
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java
deleted file mode 100644
index f86e0fc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.security;
-
-/**
- * 
- * 
- */
-public class SimpleAuthorizationMapTest extends AuthorizationMapTest {
-    
-    protected AuthorizationMap createAuthorizationMap() {
-        return SimpleSecurityBrokerSystemTest.createAuthorizationMap();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java
deleted file mode 100644
index fbc5d38..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.security;
-
-import java.net.URL;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-
-import junit.framework.Test;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.MessageSendTest;
-import org.apache.activemq.filter.DestinationMap;
-import org.apache.activemq.jaas.GroupPrincipal;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Tests that the broker allows/fails access to destinations based on the
- * security policy installed on the broker.
- * 
- * 
- */
-public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport {
-
-    static final GroupPrincipal GUESTS = new GroupPrincipal("guests");
-    static final GroupPrincipal USERS = new GroupPrincipal("users");
-    static final GroupPrincipal ADMINS = new GroupPrincipal("admins");
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleSecurityBrokerSystemTest.class);
-
-    public BrokerPlugin authorizationPlugin;
-    public BrokerPlugin authenticationPlugin;
-
-    static {
-        String path = System.getProperty("java.security.auth.login.config");
-        if (path == null) {
-            URL resource = SimpleSecurityBrokerSystemTest.class.getClassLoader().getResource("login.config");
-            if (resource != null) {
-                path = resource.getFile();
-                System.setProperty("java.security.auth.login.config", path);
-            }
-        }
-        LOG.info("Path to login config: " + path);
-    }
-
-    public static Test suite() {
-        return suite(SimpleSecurityBrokerSystemTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public static AuthorizationMap createAuthorizationMap() {
-        DestinationMap readAccess = new DestinationMap();
-        readAccess.put(new ActiveMQQueue(">"), ADMINS);
-        readAccess.put(new ActiveMQQueue("USERS.>"), USERS);
-        readAccess.put(new ActiveMQQueue("GUEST.>"), GUESTS);
-        readAccess.put(new ActiveMQTopic(">"), ADMINS);
-        readAccess.put(new ActiveMQTopic("USERS.>"), USERS);
-        readAccess.put(new ActiveMQTopic("GUEST.>"), GUESTS);
-
-        DestinationMap writeAccess = new DestinationMap();
-        writeAccess.put(new ActiveMQQueue(">"), ADMINS);
-        writeAccess.put(new ActiveMQQueue("USERS.>"), USERS);
-        writeAccess.put(new ActiveMQQueue("GUEST.>"), USERS);
-        writeAccess.put(new ActiveMQQueue("GUEST.>"), GUESTS);
-        writeAccess.put(new ActiveMQTopic(">"), ADMINS);
-        writeAccess.put(new ActiveMQTopic("USERS.>"), USERS);
-        writeAccess.put(new ActiveMQTopic("GUEST.>"), USERS);
-        writeAccess.put(new ActiveMQTopic("GUEST.>"), GUESTS);
-
-        readAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), GUESTS);
-        readAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), USERS);
-        writeAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), GUESTS);
-        writeAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), USERS);
-
-        DestinationMap adminAccess = new DestinationMap();
-        adminAccess.put(new ActiveMQTopic(">"), ADMINS);
-        adminAccess.put(new ActiveMQTopic(">"), USERS);
-        adminAccess.put(new ActiveMQTopic(">"), GUESTS);
-        adminAccess.put(new ActiveMQQueue(">"), ADMINS);
-        adminAccess.put(new ActiveMQQueue(">"), USERS);
-        adminAccess.put(new ActiveMQQueue(">"), GUESTS);
-
-        return new SimpleAuthorizationMap(writeAccess, readAccess, adminAccess);
-    }
-
-    static class SimpleAuthenticationFactory implements BrokerPlugin {
-        public Broker installPlugin(Broker broker) {
-
-            HashMap<String, String> u = new HashMap<String, String>();
-            u.put("system", "manager");
-            u.put("user", "password");
-            u.put("guest", "password");
-
-            HashMap<String, HashSet<Object>> groups = new HashMap<String, HashSet<Object>>();
-            groups.put("system", new HashSet<Object>(Arrays.asList(new Object[] {ADMINS, USERS})));
-            groups.put("user", new HashSet<Object>(Arrays.asList(new Object[] {USERS})));
-            groups.put("guest", new HashSet<Object>(Arrays.asList(new Object[] {GUESTS})));
-
-            return new SimpleAuthenticationBroker(broker, u, groups);
-        }
-
-        public String toString() {
-            return "SimpleAuthenticationBroker";
-        }
-    }
-
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombos() {
-        addCombinationValues("authorizationPlugin",
-                             new Object[] {new AuthorizationPlugin(createAuthorizationMap())});
-        addCombinationValues("authenticationPlugin", new Object[] {new SimpleAuthenticationFactory(),
-                                                                   new JaasAuthenticationPlugin()});
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.setPlugins(new BrokerPlugin[] {authorizationPlugin, authenticationPlugin});
-        broker.setPersistent(false);
-        return broker;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java
deleted file mode 100644
index aa9056c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.security;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-public class StubDoNothingCallbackHandler implements CallbackHandler {
-
-    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java
deleted file mode 100644
index 7cb9282..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.security;
-
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
-
-public class StubDualJaasConfiguration extends Configuration {
-    private AppConfigurationEntry nonSslConfigEntry;
-    private AppConfigurationEntry sslConfigEntry;
-
-    public StubDualJaasConfiguration(AppConfigurationEntry nonSslConfigEntry, AppConfigurationEntry sslConfigEntry) {
-        this.nonSslConfigEntry = nonSslConfigEntry;
-        this.sslConfigEntry = sslConfigEntry;
-    }
-
-    public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-        if ("activemq-domain".equals(name)) {
-            return new AppConfigurationEntry[] {nonSslConfigEntry};
-        } else {
-            return new AppConfigurationEntry[] {sslConfigEntry};            
-        }
-    }
-
-    public void refresh() {
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java
deleted file mode 100644
index 9f66d30..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.security;
-
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
-
-public class StubJaasConfiguration extends Configuration {
-    private AppConfigurationEntry configEntry;
-
-    public StubJaasConfiguration(AppConfigurationEntry configEntry) {
-        this.configEntry = configEntry;
-    }
-
-    public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-        return new AppConfigurationEntry[] {configEntry};
-    }
-
-    public void refresh() {
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubLoginModule.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubLoginModule.java
deleted file mode 100644
index fd86d65..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubLoginModule.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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.security;
-
-import java.util.Map;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.FailedLoginException;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
-
-import org.apache.activemq.jaas.GroupPrincipal;
-import org.apache.activemq.jaas.UserPrincipal;
-
-public class StubLoginModule implements LoginModule {
-    public static final String ALLOW_LOGIN_PROPERTY = "org.apache.activemq.jaas.stubproperties.allow_login";
-    public static final String USERS_PROPERTY = "org.apache.activemq.jaas.stubproperties.users";
-    public static final String GROUPS_PROPERTY = "org.apache.activemq.jaas.stubproperties.groups";
-
-    private Subject subject;
-
-    private String userNames[];
-    private String groupNames[];
-    private boolean allowLogin;
-
-    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
-        String allowLoginString = (String)(options.get(ALLOW_LOGIN_PROPERTY));
-        String usersString = (String)(options.get(USERS_PROPERTY));
-        String groupsString = (String)(options.get(GROUPS_PROPERTY));
-
-        this.subject = subject;
-
-        allowLogin = Boolean.parseBoolean(allowLoginString);
-        userNames = usersString.split(",");
-        groupNames = groupsString.split(",");
-    }
-
-    public boolean login() throws LoginException {
-        if (!allowLogin) {
-            throw new FailedLoginException("Login was not allowed (as specified in configuration).");
-        }
-
-        return true;
-    }
-
-    public boolean commit() throws LoginException {
-        if (!allowLogin) {
-            throw new FailedLoginException("Login was not allowed (as specified in configuration).");
-        }
-
-        for (int i = 0; i < userNames.length; ++i) {
-            if (userNames[i].length() > 0) {
-                subject.getPrincipals().add(new UserPrincipal(userNames[i]));
-            }
-        }
-
-        for (int i = 0; i < groupNames.length; ++i) {
-            if (groupNames[i].length() > 0) {
-                subject.getPrincipals().add(new GroupPrincipal(groupNames[i]));
-            }
-        }
-
-        return true;
-    }
-
-    public boolean abort() throws LoginException {
-        return true;
-    }
-
-    public boolean logout() throws LoginException {
-        subject.getPrincipals().clear();
-
-        return true;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubSecurityContext.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubSecurityContext.java
deleted file mode 100644
index 3b35578..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/StubSecurityContext.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.security;
-
-import java.util.Set;
-
-public class StubSecurityContext extends SecurityContext {
-    StubSecurityContext() {
-        super("");
-    }
-
-    public Set<?> getPrincipals() {
-        return null;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java
deleted file mode 100644
index d01e607..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.security;
-
-import java.net.URI;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class XBeanSecurityTest extends SecurityTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(XBeanSecurityTest.class);
-    
-    public static Test suite() {
-        return suite(XBeanSecurityTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/security/jaas-broker.xml");
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java
deleted file mode 100644
index 14b6dcc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * 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.security;
-
-import java.net.URI;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class XBeanSecurityWithGuestNoCredentialsOnlyTest extends JmsTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(XBeanSecurityWithGuestNoCredentialsOnlyTest.class);
-    public ActiveMQDestination destination;
-    
-    public static Test suite() {
-        return suite(XBeanSecurityWithGuestNoCredentialsOnlyTest.class);
-    }
-    
-    public void testUserSendGoodPassword() throws JMSException {
-        Message m = doSend(false);
-        assertEquals("system", ((ActiveMQMessage)m).getUserID());
-        assertEquals("system", m.getStringProperty("JMSXUserID"));
-    }
-    
-    public void testUserSendWrongPassword() throws JMSException {
-        try {
-            doSend(true);
-            fail("expect exception on connect");
-        } catch (JMSException expected) {
-            assertTrue("cause as expected", expected.getCause() instanceof SecurityException);
-        }
-    }
-
-    public void testUserSendNoCredentials() throws JMSException {
-        Message m = doSend(false);
-        // note brokerService.useAuthenticatedPrincipalForJMXUserID=true for this
-        assertEquals("guest", ((ActiveMQMessage)m).getUserID());
-        assertEquals("guest", m.getStringProperty("JMSXUserID"));
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/security/jaas-broker-guest-no-creds-only.xml");
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-    public Message doSend(boolean fail) throws JMSException {
-
-        Connection adminConnection = factory.createConnection("system", "manager");
-        connections.add(adminConnection);
-
-        adminConnection.start();
-        Session adminSession = adminConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = adminSession.createConsumer(destination);
-
-        connections.remove(connection);
-        connection = (ActiveMQConnection)factory.createConnection(userName, password);
-        connections.add(connection);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        try {
-            sendMessages(session, destination, 1);
-        } catch (JMSException e) {
-            // If test is expected to fail, the cause must only be a
-            // SecurityException
-            // otherwise rethrow the exception
-            if (!fail || !(e.getCause() instanceof SecurityException)) {
-                throw e;
-            }
-        }
-
-        Message m = consumer.receive(1000);
-        if (fail) {
-            assertNull(m);
-        } else {
-            assertNotNull(m);
-            assertEquals("0", ((TextMessage)m).getText());
-            assertNull(consumer.receiveNoWait());
-        }
-        return m;
-    }
-    
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendGoodPassword() {
-        addCombinationValues("userName", new Object[] {"system"});
-        addCombinationValues("password", new Object[] {"manager"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("test"), new ActiveMQTopic("test")});
-    }
-    
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendWrongPassword() {
-        addCombinationValues("userName", new Object[] {"system"});
-        addCombinationValues("password", new Object[] {"wrongpassword"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GuestQueue")});
-    }
-
-    public void initCombosForTestUserSendNoCredentials() {
-        addCombinationValues("userName", new Object[] {null, "system"});
-        addCombinationValues("password", new Object[] {null});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GuestQueue")});
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java
deleted file mode 100644
index 16f95b4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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.security;
-
-import java.net.URI;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class XBeanSecurityWithGuestTest extends JmsTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(XBeanSecurityWithGuestTest.class);
-    public ActiveMQDestination destination;
-    
-    public static Test suite() {
-        return suite(XBeanSecurityWithGuestTest.class);
-    }
-    
-    public void testUserSendGoodPassword() throws JMSException {
-        Message m = doSend(false);
-        assertEquals("system", ((ActiveMQMessage)m).getUserID());
-        assertEquals("system", m.getStringProperty("JMSXUserID"));
-    }
-    
-    public void testUserSendWrongPassword() throws JMSException {
-        Message m = doSend(false);
-        // note brokerService.useAuthenticatedPrincipalForJMXUserID=true for this
-        assertEquals("guest", ((ActiveMQMessage)m).getUserID());
-        assertEquals("guest", m.getStringProperty("JMSXUserID"));
-    }
-
-    public void testUserSendNoCredentials() throws JMSException {
-        Message m = doSend(false);
-        // note brokerService.useAuthenticatedPrincipalForJMXUserID=true for this
-        assertEquals("guest", ((ActiveMQMessage)m).getUserID());
-        assertEquals("guest", m.getStringProperty("JMSXUserID"));
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return createBroker("org/apache/activemq/security/jaas-broker-guest.xml");
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-    public Message doSend(boolean fail) throws JMSException {
-
-        Connection adminConnection = factory.createConnection("system", "manager");
-        connections.add(adminConnection);
-
-        adminConnection.start();
-        Session adminSession = adminConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = adminSession.createConsumer(destination);
-
-        connections.remove(connection);
-        connection = (ActiveMQConnection)factory.createConnection(userName, password);
-        connections.add(connection);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        try {
-            sendMessages(session, destination, 1);
-        } catch (JMSException e) {
-            // If test is expected to fail, the cause must only be a
-            // SecurityException
-            // otherwise rethrow the exception
-            if (!fail || !(e.getCause() instanceof SecurityException)) {
-                throw e;
-            }
-        }
-
-        Message m = consumer.receive(1000);
-        if (fail) {
-            assertNull(m);
-        } else {
-            assertNotNull(m);
-            assertEquals("0", ((TextMessage)m).getText());
-            assertNull(consumer.receiveNoWait());
-        }
-        return m;
-    }
-    
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendGoodPassword() {
-        addCombinationValues("userName", new Object[] {"system"});
-        addCombinationValues("password", new Object[] {"manager"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("test"), new ActiveMQTopic("test")});
-    }
-    
-    /**
-     * @see {@link CombinationTestSupport}
-     */
-    public void initCombosForTestUserSendWrongPassword() {
-        addCombinationValues("userName", new Object[] {"system"});
-        addCombinationValues("password", new Object[] {"wrongpassword"});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GuestQueue")});
-    }
-
-    public void initCombosForTestUserSendNoCredentials() {
-        addCombinationValues("userName", new Object[] {"", null});
-        addCombinationValues("password", new Object[] {"", null});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GuestQueue")});
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java
deleted file mode 100755
index 4bd5ee0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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.selector;
-
-import junit.framework.TestCase;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.ComparisonExpression;
-import org.apache.activemq.filter.Expression;
-import org.apache.activemq.filter.LogicExpression;
-import org.apache.activemq.filter.PropertyExpression;
-import org.apache.activemq.filter.XPathExpression;
-import org.apache.activemq.spring.ConsumerBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class SelectorParserTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(SelectorParserTest.class);
-
-    public void testParseXPath() throws Exception {
-        BooleanExpression filter = parse("XPATH '//title[@lang=''eng'']'");
-        assertTrue("Created XPath expression", filter instanceof XPathExpression);
-        LOG.info("Expression: " + filter);
-    }
-
-    public void testParseWithParensAround() throws Exception {
-        String[] values = {"x = 1 and y = 2", "(x = 1) and (y = 2)", "((x = 1) and (y = 2))"};
-
-        for (int i = 0; i < values.length; i++) {
-            String value = values[i];
-            LOG.info("Parsing: " + value);
-
-            BooleanExpression andExpression = parse(value);
-            assertTrue("Created LogicExpression expression", andExpression instanceof LogicExpression);
-            LogicExpression logicExpression = (LogicExpression)andExpression;
-            Expression left = logicExpression.getLeft();
-            Expression right = logicExpression.getRight();
-
-            assertTrue("Left is a binary filter", left instanceof ComparisonExpression);
-            assertTrue("Right is a binary filter", right instanceof ComparisonExpression);
-            ComparisonExpression leftCompare = (ComparisonExpression)left;
-            ComparisonExpression rightCompare = (ComparisonExpression)right;
-            assertPropertyExpression("left", leftCompare.getLeft(), "x");
-            assertPropertyExpression("right", rightCompare.getLeft(), "y");
-        }
-    }
-
-    protected void assertPropertyExpression(String message, Expression expression, String expected) {
-        assertTrue(message + ". Must be PropertyExpression", expression instanceof PropertyExpression);
-        PropertyExpression propExp = (PropertyExpression)expression;
-        assertEquals(message + ". Property name", expected, propExp.getName());
-    }
-
-    protected BooleanExpression parse(String text) throws Exception {
-        return SelectorParser.parse(text);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorTest.java
deleted file mode 100755
index 4ffac0e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorTest.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/**
- * 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.selector;
-
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-
-/**
- * 
- */
-public class SelectorTest extends TestCase {
-
-    public void testBooleanSelector() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "(trueProp OR falseProp) AND trueProp", true);
-        assertSelector(message, "(trueProp OR falseProp) AND falseProp", false);
-        assertSelector(message, "trueProp", true);
-
-    }
-
-    public void testXPathSelectors() throws Exception {
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-
-        message.setJMSType("xml");
-        message.setText("<root><a key='first' num='1'/><b key='second' num='2'>b</b></root>");
-
-        assertSelector(message, "XPATH 'root/a'", true);
-        assertSelector(message, "XPATH '//root/b'", true);
-        assertSelector(message, "XPATH 'root/c'", false);
-        assertSelector(message, "XPATH '//root/b/text()=\"b\"'", true);
-        assertSelector(message, "XPATH '//root/b=\"b\"'", true);
-        assertSelector(message, "XPATH '//root/b=\"c\"'", false);
-        assertSelector(message, "XPATH '//root/b!=\"c\"'", true);
-        
-        assertSelector(message, "XPATH '//root/*[@key=''second'']'", true);
-        assertSelector(message, "XPATH '//root/*[@key=''third'']'", false);
-        assertSelector(message, "XPATH '//root/a[@key=''first'']'", true);
-        assertSelector(message, "XPATH '//root/a[@num=1]'", true);
-        assertSelector(message, "XPATH '//root/a[@key=''second'']'", false);
-        
-        assertSelector(message, "XPATH '/root/*[@key=''first'' or @key=''third'']'", true);
-        assertSelector(message, "XPATH '//root/*[@key=''third'' or @key=''forth'']'", false);
-
-        assertSelector(message, "XPATH '/root/b=''b'' and /root/b[@key=''second'']'", true);
-        assertSelector(message, "XPATH '/root/b=''b'' and /root/b[@key=''first'']'", false);
-        
-        assertSelector(message, "XPATH 'not(//root/a)'", false);
-        assertSelector(message, "XPATH 'not(//root/c)'", true);
-        assertSelector(message, "XPATH '//root/a[not(@key=''first'')]'", false);
-        assertSelector(message, "XPATH '//root/a[not(not(@key=''first''))]'", true);
-        
-        assertSelector(message, "XPATH 'string(//root/b)'", true);
-        assertSelector(message, "XPATH 'string(//root/a)'", false);
-        
-        assertSelector(message, "XPATH 'sum(//@num) < 10'", true);
-        assertSelector(message, "XPATH 'sum(//@num) > 10'", false);
-        
-        assertSelector(message, "XPATH '//root/a[@num > 1]'", false);
-        assertSelector(message, "XPATH '//root/b[@num > 1]'", true);  
-        
-    }
-
-    public void testJMSPropertySelectors() throws Exception {
-        Message message = createMessage();
-        message.setJMSType("selector-test");
-        message.setJMSMessageID("id:test:1:1:1:1");
-
-        assertSelector(message, "JMSType = 'selector-test'", true);
-        assertSelector(message, "JMSType = 'crap'", false);
-
-        assertSelector(message, "JMSMessageID = 'id:test:1:1:1:1'", true);
-        assertSelector(message, "JMSMessageID = 'id:not-test:1:1:1:1'", false);
-
-        message = createMessage();
-        message.setJMSType("1001");
-
-        assertSelector(message, "JMSType='1001'", true);
-        assertSelector(message, "JMSType='1001' OR JMSType='1002'", true);
-        assertSelector(message, "JMSType = 'crap'", false);
-    }
-
-    public void testBasicSelectors() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "name = 'James'", true);
-        assertSelector(message, "rank > 100", true);
-        assertSelector(message, "rank >= 123", true);
-        assertSelector(message, "rank >= 124", false);
-
-    }
-
-    public void testPropertyTypes() throws Exception {
-        Message message = createMessage();
-        assertSelector(message, "byteProp = 123", true);
-        assertSelector(message, "byteProp = 10", false);
-        assertSelector(message, "byteProp2 = 33", true);
-        assertSelector(message, "byteProp2 = 10", false);
-
-        assertSelector(message, "shortProp = 123", true);
-        assertSelector(message, "shortProp = 10", false);
-
-        assertSelector(message, "shortProp = 123", true);
-        assertSelector(message, "shortProp = 10", false);
-
-        assertSelector(message, "intProp = 123", true);
-        assertSelector(message, "intProp = 10", false);
-
-        assertSelector(message, "longProp = 123", true);
-        assertSelector(message, "longProp = 10", false);
-
-        assertSelector(message, "floatProp = 123", true);
-        assertSelector(message, "floatProp = 10", false);
-
-        assertSelector(message, "doubleProp = 123", true);
-        assertSelector(message, "doubleProp = 10", false);
-    }
-
-    public void testAndSelectors() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "name = 'James' and rank < 200", true);
-        assertSelector(message, "name = 'James' and rank > 200", false);
-        assertSelector(message, "name = 'Foo' and rank < 200", false);
-        assertSelector(message, "unknown = 'Foo' and anotherUnknown < 200", false);
-    }
-
-    public void testOrSelectors() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "name = 'James' or rank < 200", true);
-        assertSelector(message, "name = 'James' or rank > 200", true);
-        assertSelector(message, "name = 'Foo' or rank < 200", true);
-        assertSelector(message, "name = 'Foo' or rank > 200", false);
-        assertSelector(message, "unknown = 'Foo' or anotherUnknown < 200", false);
-    }
-
-    public void testPlus() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "rank + 2 = 125", true);
-        assertSelector(message, "(rank + 2) = 125", true);
-        assertSelector(message, "125 = (rank + 2)", true);
-        assertSelector(message, "rank + version = 125", true);
-        assertSelector(message, "rank + 2 < 124", false);
-        assertSelector(message, "name + '!' = 'James!'", true);
-    }
-
-    public void testMinus() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "rank - 2 = 121", true);
-        assertSelector(message, "rank - version = 121", true);
-        assertSelector(message, "rank - 2 > 122", false);
-    }
-
-    public void testMultiply() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "rank * 2 = 246", true);
-        assertSelector(message, "rank * version = 246", true);
-        assertSelector(message, "rank * 2 < 130", false);
-    }
-
-    public void testDivide() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "rank / version = 61.5", true);
-        assertSelector(message, "rank / 3 > 100.0", false);
-        assertSelector(message, "rank / 3 > 100", false);
-        assertSelector(message, "version / 2 = 1", true);
-
-    }
-
-    public void testBetween() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "rank between 100 and 150", true);
-        assertSelector(message, "rank between 10 and 120", false);
-    }
-
-    public void testIn() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "name in ('James', 'Bob', 'Gromit')", true);
-        assertSelector(message, "name in ('Bob', 'James', 'Gromit')", true);
-        assertSelector(message, "name in ('Gromit', 'Bob', 'James')", true);
-
-        assertSelector(message, "name in ('Gromit', 'Bob', 'Cheddar')", false);
-        assertSelector(message, "name not in ('Gromit', 'Bob', 'Cheddar')", true);
-    }
-
-    public void testIsNull() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "dummy is null", true);
-        assertSelector(message, "dummy is not null", false);
-        assertSelector(message, "name is not null", true);
-        assertSelector(message, "name is null", false);
-    }
-
-    public void testLike() throws Exception {
-        Message message = createMessage();
-        message.setStringProperty("modelClassId", "com.whatever.something.foo.bar");
-        message.setStringProperty("modelInstanceId", "170");
-        message.setStringProperty("modelRequestError", "abc");
-        message.setStringProperty("modelCorrelatedClientId", "whatever");
-
-        assertSelector(message, "modelClassId LIKE 'com.whatever.something.%' AND modelInstanceId = '170' AND (modelRequestError IS NULL OR modelCorrelatedClientId = 'whatever')",
-                       true);
-
-        message.setStringProperty("modelCorrelatedClientId", "shouldFailNow");
-
-        assertSelector(message, "modelClassId LIKE 'com.whatever.something.%' AND modelInstanceId = '170' AND (modelRequestError IS NULL OR modelCorrelatedClientId = 'whatever')",
-                       false);
-
-        message = createMessage();
-        message.setStringProperty("modelClassId", "com.whatever.something.foo.bar");
-        message.setStringProperty("modelInstanceId", "170");
-        message.setStringProperty("modelCorrelatedClientId", "shouldNotMatch");
-
-        assertSelector(message, "modelClassId LIKE 'com.whatever.something.%' AND modelInstanceId = '170' AND (modelRequestError IS NULL OR modelCorrelatedClientId = 'whatever')",
-                       true);
-    }
-
-    /**
-     * Test cases from Mats Henricson
-     */
-    public void testMatsHenricsonUseCases() throws Exception {
-        Message message = createMessage();
-        assertSelector(message, "SessionserverId=1870414179", false);
-
-        message.setLongProperty("SessionserverId", 1870414179);
-        assertSelector(message, "SessionserverId=1870414179", true);
-
-        message.setLongProperty("SessionserverId", 1234);
-        assertSelector(message, "SessionserverId=1870414179", false);
-
-        assertSelector(message, "Command NOT IN ('MirrorLobbyRequest', 'MirrorLobbyReply')", false);
-
-        message.setStringProperty("Command", "Cheese");
-        assertSelector(message, "Command NOT IN ('MirrorLobbyRequest', 'MirrorLobbyReply')", true);
-
-        message.setStringProperty("Command", "MirrorLobbyRequest");
-        assertSelector(message, "Command NOT IN ('MirrorLobbyRequest', 'MirrorLobbyReply')", false);
-        message.setStringProperty("Command", "MirrorLobbyReply");
-        assertSelector(message, "Command NOT IN ('MirrorLobbyRequest', 'MirrorLobbyReply')", false);
-    }
-
-    public void testFloatComparisons() throws Exception {
-        Message message = createMessage();
-
-        // JMS 1.1 Section 3.8.1.1 : Approximate literals use the Java
-        // floating-point literal syntax.
-        // We will use the java varible x to demo valid floating point syntaxs.
-        double x;
-
-        // test decimals like x.x
-        x = 1.0;
-        x = -1.1;
-        x = 1.0E1;
-        x = 1.1E1;
-        x = -1.1E1;
-        assertSelector(message, "1.0 < 1.1", true);
-        assertSelector(message, "-1.1 < 1.0", true);
-        assertSelector(message, "1.0E1 < 1.1E1", true);
-        assertSelector(message, "-1.1E1 < 1.0E1", true);
-
-        // test decimals like x.
-        x = 1.;
-        x = 1.E1;
-        assertSelector(message, "1. < 1.1", true);
-        assertSelector(message, "-1.1 < 1.", true);
-        assertSelector(message, "1.E1 < 1.1E1", true);
-        assertSelector(message, "-1.1E1 < 1.E1", true);
-
-        // test decimals like .x
-        x = .5;
-        x = -.5;
-        x = .5E1;
-        assertSelector(message, ".1 < .5", true);
-        assertSelector(message, "-.5 < .1", true);
-        assertSelector(message, ".1E1 < .5E1", true);
-        assertSelector(message, "-.5E1 < .1E1", true);
-
-        // test exponents
-        x = 4E10;
-        x = -4E10;
-        x = 5E+10;
-        x = 5E-10;
-        assertSelector(message, "4E10 < 5E10", true);
-        assertSelector(message, "5E8 < 5E10", true);
-        assertSelector(message, "-4E10 < 2E10", true);
-        assertSelector(message, "-5E8 < 2E2", true);
-        assertSelector(message, "4E+10 < 5E+10", true);
-        assertSelector(message, "4E-10 < 5E-10", true);
-    }
-
-    public void testStringQuoteParsing() throws Exception {
-        Message message = createMessage();
-        assertSelector(message, "quote = '''In God We Trust'''", true);
-    }
-
-    public void testLikeComparisons() throws Exception {
-        Message message = createMessage();
-
-        assertSelector(message, "quote LIKE '''In G_d We Trust'''", true);
-        assertSelector(message, "quote LIKE '''In Gd_ We Trust'''", false);
-        assertSelector(message, "quote NOT LIKE '''In G_d We Trust'''", false);
-        assertSelector(message, "quote NOT LIKE '''In Gd_ We Trust'''", true);
-
-        assertSelector(message, "foo LIKE '%oo'", true);
-        assertSelector(message, "foo LIKE '%ar'", false);
-        assertSelector(message, "foo NOT LIKE '%oo'", false);
-        assertSelector(message, "foo NOT LIKE '%ar'", true);
-
-        assertSelector(message, "foo LIKE '!_%' ESCAPE '!'", true);
-        assertSelector(message, "quote LIKE '!_%' ESCAPE '!'", false);
-        assertSelector(message, "foo NOT LIKE '!_%' ESCAPE '!'", false);
-        assertSelector(message, "quote NOT LIKE '!_%' ESCAPE '!'", true);
-
-        assertSelector(message, "punctuation LIKE '!#$&()*+,-./:;<=>?@[\\]^`{|}~'", true);
-    }
-
-    public void testInvalidSelector() throws Exception {
-        Message message = createMessage();
-        assertInvalidSelector(message, "3+5");
-        assertInvalidSelector(message, "True AND 3+5");
-        assertInvalidSelector(message, "=TEST 'test'");
-    }
-
-    protected Message createMessage() throws JMSException {
-        Message message = createMessage("FOO.BAR");
-        message.setJMSType("selector-test");
-        message.setJMSMessageID("connection:1:1:1:1");
-        message.setObjectProperty("name", "James");
-        message.setObjectProperty("location", "London");
-
-        message.setByteProperty("byteProp", (byte)123);
-        message.setByteProperty("byteProp2", (byte)33);
-        message.setShortProperty("shortProp", (short)123);
-        message.setIntProperty("intProp", (int)123);
-        message.setLongProperty("longProp", (long)123);
-        message.setFloatProperty("floatProp", (float)123);
-        message.setDoubleProperty("doubleProp", (double)123);
-
-        message.setIntProperty("rank", 123);
-        message.setIntProperty("version", 2);
-        message.setStringProperty("quote", "'In God We Trust'");
-        message.setStringProperty("foo", "_foo");
-        message.setStringProperty("punctuation", "!#$&()*+,-./:;<=>?@[\\]^`{|}~");
-        message.setBooleanProperty("trueProp", true);
-        message.setBooleanProperty("falseProp", false);
-        return message;
-    }
-
-    protected void assertInvalidSelector(Message message, String text) throws JMSException {
-        try {
-            SelectorParser.parse(text);
-            fail("Created a valid selector");
-        } catch (InvalidSelectorException e) {
-        }
-    }
-
-    protected void assertSelector(Message message, String text, boolean expected) throws JMSException {
-        BooleanExpression selector = SelectorParser.parse(text);
-        assertTrue("Created a valid selector", selector != null);
-        MessageEvaluationContext context = new MessageEvaluationContext();
-        context.setMessageReference((org.apache.activemq.command.Message)message);
-        boolean value = selector.matches(context);
-        assertEquals("Selector for: " + text, expected, value);
-    }
-
-    protected Message createMessage(String subject) throws JMSException {
-        ActiveMQMessage message = new ActiveMQMessage();
-        message.setJMSDestination(new ActiveMQTopic(subject));
-        return message;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBeanTest.java
deleted file mode 100644
index b3bc597..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ActiveMQConnectionFactoryFactoryBeanTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- *
- * 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.spring;
-
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ActiveMQConnectionFactoryFactoryBeanTest extends TestCase {
-    private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQConnectionFactoryFactoryBeanTest.class);
-
-    private ActiveMQConnectionFactoryFactoryBean factory;
-
-
-    public void testSingleTcpURL() throws Exception {
-        factory.setTcpHostAndPort("tcp://localhost:61616");
-        assertCreatedURL("failover:(tcp://localhost:61616)");
-    }
-
-    public void testSingleTcpURLWithInactivityTimeout() throws Exception {
-        factory.setTcpHostAndPort("tcp://localhost:61616");
-        factory.setMaxInactivityDuration(60000L);
-        assertCreatedURL("failover:(tcp://localhost:61616?wireFormat.maxInactivityDuration=60000)");
-    }
-
-    public void testSingleTcpURLWithInactivityTimeoutAndTcpNoDelay() throws Exception {
-        factory.setTcpHostAndPort("tcp://localhost:61616");
-        factory.setMaxInactivityDuration(50000L);
-        factory.setTcpProperties("tcpNoDelayEnabled=true");
-        assertCreatedURL("failover:(tcp://localhost:61616?wireFormat.maxInactivityDuration=50000&tcpNoDelayEnabled=true)");
-    }
-
-    public void testSingleTcpURLWithInactivityTimeoutAndMaxReconnectDelay() throws Exception {
-        factory.setTcpHostAndPort("tcp://localhost:61616");
-        factory.setMaxInactivityDuration(60000L);
-        factory.setMaxReconnectDelay(50000L);
-        assertCreatedURL("failover:(tcp://localhost:61616?wireFormat.maxInactivityDuration=60000)?maxReconnectDelay=50000");
-    }
-
-    public void testSingleTcpURLWithInactivityTimeoutAndMaxReconnectDelayAndFailoverProperty() throws Exception {
-        factory.setTcpHostAndPort("tcp://localhost:61616");
-        factory.setMaxInactivityDuration(40000L);
-        factory.setMaxReconnectDelay(30000L);
-        factory.setFailoverProperties("useExponentialBackOff=false");
-
-        assertCreatedURL("failover:(tcp://localhost:61616?wireFormat.maxInactivityDuration=40000)?maxReconnectDelay=30000&useExponentialBackOff=false");
-    }
-
-    public void testMultipleTcpURLsWithInactivityTimeoutAndMaxReconnectDelayAndFailoverProperty() throws Exception {
-        factory.setTcpHostAndPorts(Arrays.asList(new String[] {"tcp://localhost:61618", "tcp://foo:61619"}));
-        factory.setMaxInactivityDuration(40000L);
-        factory.setMaxReconnectDelay(30000L);
-        factory.setFailoverProperties("useExponentialBackOff=false");
-
-        assertCreatedURL("failover:(tcp://localhost:61618?wireFormat.maxInactivityDuration=40000,tcp://foo:61619?wireFormat.maxInactivityDuration=40000)?maxReconnectDelay=30000&useExponentialBackOff=false");
-    }
-
-    protected void assertCreatedURL(String expectedURL) throws Exception {
-        String url = factory.getBrokerURL();
-        LOG.debug("Generated URL: " + url);
-
-        assertEquals("URL", expectedURL, url);
-        Object value = factory.getObject();
-        assertTrue("Value should be an ActiveMQConnectionFactory", value instanceof ActiveMQConnectionFactory);
-        ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) value;
-        String brokerURL = connectionFactory.getBrokerURL();
-        assertEquals("brokerURL", expectedURL, brokerURL);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        factory = new ActiveMQConnectionFactoryFactoryBean();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java
deleted file mode 100755
index 2b0de0a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.spring;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import junit.framework.Assert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConsumerBean extends Assert implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumerBean.class);
-    private final List<Message> messages = new ArrayList<Message>();
-    private boolean verbose;
-
-    /**
-     * Constructor.
-     */
-    public ConsumerBean() {
-    }
-
-    
-    /**
-     * @return all the messages on the list so far, clearing the buffer
-     */
-    public List<Message> flushMessages() {
-        List<Message> answer = null;
-        synchronized(messages) {
-        answer = new ArrayList<Message>(messages);
-        messages.clear();
-        }
-        return answer;
-    }
-
-    /**
-     * Method implemented from MessageListener interface.
-     *
-     * @param message
-     */
-    public void onMessage(Message message) {
-        synchronized (messages) {
-            messages.add(message);
-            if (verbose) {
-                LOG.info("Received: " + message);
-            }
-            messages.notifyAll();
-        }
-    }
-
-    /**
-     * Use to wait for a single message to arrive.
-     */
-    public void waitForMessageToArrive() {
-        LOG.info("Waiting for message to arrive");
-
-        long start = System.currentTimeMillis();
-
-        try {
-            if (hasReceivedMessage()) {
-                synchronized (messages) {
-                    messages.wait(4000);
-                }
-            }
-        } catch (InterruptedException e) {
-            LOG.info("Caught: " + e);
-        }
-        long end = System.currentTimeMillis() - start;
-
-        LOG.info("End of wait for " + end + " millis");
-    }
-
-    /**
-     * Used to wait for a message to arrive given a particular message count.
-     *
-     * @param messageCount
-     */
-    public void waitForMessagesToArrive(int messageCount) {
-        long maxRemainingMessageCount = Math.max(0, messageCount - messages.size());
-        LOG.info("Waiting for (" + maxRemainingMessageCount + ") message(s) to arrive");
-        long start = System.currentTimeMillis();
-        long maxWaitTime = start + 120 * 1000;
-        while (maxRemainingMessageCount > 0) {
-            try {
-                synchronized (messages) {
-                    messages.wait(1000);
-                }
-                if (hasReceivedMessages(messageCount) || System.currentTimeMillis() > maxWaitTime) {
-                    break;
-                }
-            } catch (InterruptedException e) {
-                LOG.info("Caught: " + e);
-            }
-            maxRemainingMessageCount = Math.max(0, messageCount - messages.size());
-        }
-        long end = System.currentTimeMillis() - start;
-        LOG.info("End of wait for " + end + " millis");
-    }
-
-    public void assertMessagesArrived(int total) {
-        waitForMessagesToArrive(total);
-        synchronized (messages) {
-            int count = messages.size();
-
-            assertEquals("Messages received", total, count);
-        }
-    }
-
-    public boolean isVerbose() {
-        return verbose;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    /**
-     * Identifies if the message is empty.
-     *
-     * @return
-     */
-    protected boolean hasReceivedMessage() {
-        return messages.isEmpty();
-    }
-
-    /**
-     * Identifies if the message count has reached the total size of message.
-     *
-     * @param messageCount
-     * @return
-     */
-    protected boolean hasReceivedMessages(int messageCount) {
-        synchronized (messages) {
-            return messages.size() >= messageCount;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/Spring2XmlNamespacesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/Spring2XmlNamespacesTest.java
deleted file mode 100755
index ca62d01..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/Spring2XmlNamespacesTest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.spring;
-
-public class Spring2XmlNamespacesTest extends SpringTestSupport {
-    public void testUsingSpringXmlNamespacesWithPublicXsdLocation() throws Exception {
-        assertSenderConfig("spring-embedded-xbean.xml");
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/Spring2XmlNamespacesWithoutRemoteSchemaTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/Spring2XmlNamespacesWithoutRemoteSchemaTest.java
deleted file mode 100644
index 7a32877..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/Spring2XmlNamespacesWithoutRemoteSchemaTest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.spring;
-
-public class Spring2XmlNamespacesWithoutRemoteSchemaTest extends SpringTestSupport {
-    public void testUsingSpring2NamespacesForANonExistingXsdDocument() throws Exception {
-        assertSenderConfig("spring-embedded-xbean-noversion.xml");
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java
deleted file mode 100755
index 118e036..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.spring;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jms.core.JmsTemplate;
-
-public class SpringConsumer extends ConsumerBean implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(SpringConsumer.class);
-    private JmsTemplate template;
-    private String myId = "foo";
-    private Destination destination;
-    private Connection connection;
-    private Session session;
-    private MessageConsumer consumer;
-
-    public void start() throws JMSException {
-        String selector = "next = '" + myId + "'";
-
-        try {
-            ConnectionFactory factory = template.getConnectionFactory();
-            connection = factory.createConnection();
-
-            // we might be a reusable connection in spring
-            // so lets only set the client ID once if its not set
-            synchronized (connection) {
-                if (connection.getClientID() == null) {
-                    connection.setClientID(myId);
-                }
-            }
-
-            connection.start();
-
-            session = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-            consumer = session.createConsumer(destination, selector, false);
-            consumer.setMessageListener(this);
-        } catch (JMSException ex) {
-            LOG.error("", ex);
-            throw ex;
-        }
-    }
-
-    public void stop() throws JMSException {
-        if (consumer != null) {
-            consumer.close();
-        }
-        if (session != null) {
-            session.close();
-        }
-        if (connection != null) {
-            connection.close();
-        }
-    }
-
-    public void onMessage(Message message) {
-        super.onMessage(message);
-        try {
-            message.acknowledge();
-        } catch (JMSException e) {
-            LOG.error("Failed to acknowledge: " + e, e);
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public Destination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(Destination destination) {
-        this.destination = destination;
-    }
-
-    public String getMyId() {
-        return myId;
-    }
-
-    public void setMyId(String myId) {
-        this.myId = myId;
-    }
-
-    public JmsTemplate getTemplate() {
-        return template;
-    }
-
-    public void setTemplate(JmsTemplate template) {
-        this.template = template;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java
deleted file mode 100755
index c2bbad0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.spring;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-
-public class SpringProducer {
-    private static final Logger LOG = LoggerFactory.getLogger(SpringProducer.class);
-    private JmsTemplate template;
-    private Destination destination;
-    private int messageCount = 10;
-
-    public void start() throws JMSException {
-        for (int i = 0; i < messageCount; i++) {
-            final String text = "Text for message: " + i;
-            template.send(destination, new MessageCreator() {
-                public Message createMessage(Session session) throws JMSException {
-                    LOG.info("Sending message: " + text);
-                    TextMessage message = session.createTextMessage(text);
-                    message.setStringProperty("next", "foo");
-                    return message;
-                }
-            });
-        }
-    }
-
-    public void stop() throws JMSException {
-    }
-
-    // Properties
-    //-------------------------------------------------------------------------
-
-    public JmsTemplate getTemplate() {
-        return template;
-    }
-
-    public void setTemplate(JmsTemplate template) {
-        this.template = template;
-    }
-
-    public int getMessageCount() {
-        return messageCount;
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    public Destination getDestination() {
-        return destination;
-    }
-
-    public void setDestination(Destination destination) {
-        this.destination = destination;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java
deleted file mode 100755
index 9bea3ed..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.spring;
-
-import org.apache.activemq.broker.BrokerService;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class SpringTest extends SpringTestSupport {
-
-    /**
-     * Uses ActiveMQConnectionFactory to create the connection context.
-     * Configuration file is /resources/spring.xml
-     *
-     * @throws Exception
-     */
-    public void testSenderWithSpringXml() throws Exception {
-        String config = "spring.xml";
-        assertSenderConfig(config);
-    }
-
-    /**
-     * Spring configured test that uses ActiveMQConnectionFactory for
-     * connection context and ActiveMQQueue for destination. Configuration
-     * file is /resources/spring-queue.xml.
-     *
-     * @throws Exception
-     */
-    public void testSenderWithSpringXmlAndQueue() throws Exception {
-        String config = "spring-queue.xml";
-        assertSenderConfig(config);
-    }
-
-    /**
-     * Spring configured test that uses JNDI. Configuration file is
-     * /resources/spring-jndi.xml.
-     *
-     * @throws Exception
-     */
-    public void testSenderWithSpringXmlUsingJNDI() throws Exception {
-        String config = "spring-jndi.xml";
-        assertSenderConfig(config);
-    }
-
-    /**
-     * Spring configured test where in the connection context is set to use
-     * an embedded broker. Configuration file is /resources/spring-embedded.xml
-     * and /resources/activemq.xml.
-     *
-     * @throws Exception
-     */
-    public void testSenderWithSpringXmlEmbeddedBrokerConfiguredViaXml() throws Exception {
-        String config = "spring-embedded.xml";
-        assertSenderConfig(config);
-    }
-
-    /**
-     * Spring configured test case that tests the remotely deployed xsd
-     * http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-SNAPSHOT.xsd
-     *
-     * @throws Exception
-     */
-    public void testSenderWithSpringXmlUsingSpring2NamespacesWithEmbeddedBrokerConfiguredViaXml() throws Exception {
-        String config = "spring-embedded-xbean.xml";
-        assertSenderConfig(config);
-    }
-
-    /**
-     * Spring configured test case that tests the locally generated xsd
-     *
-     * @throws Exception
-     */
-    public void testSenderWithSpringXmlUsingSpring2NamespacesWithEmbeddedBrokerConfiguredViaXmlUsingLocalXsd() throws Exception {
-        String config = "spring-embedded-xbean-local.xml";
-        assertSenderConfig(config);
-    }
-    
-    public void testStartFalse() throws Exception {
-        String config = "spring-start-false.xml";
-        Thread.currentThread().setContextClassLoader(SpringTest.class.getClassLoader());
-        context = new ClassPathXmlApplicationContext(config);
-        BrokerService broker = (BrokerService)context.getBean(BrokerService.class);
-        assertFalse("Broker is started", broker.isStarted());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java
deleted file mode 100644
index 571ac51..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.spring;
-
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.TestCase;
-import org.apache.activemq.test.JmsTopicSendReceiveTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * 
- */
-public class SpringTestSupport extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(SpringTest.class);
-    protected AbstractApplicationContext context;
-    protected SpringConsumer consumer;
-    protected SpringProducer producer;
-
-    /**
-     * assert method that is used by all the test method to send and receive messages
-     * based on each spring configuration.
-     *
-     * @param config
-     * @throws Exception
-     */
-    protected void assertSenderConfig(String config) throws Exception {
-        Thread.currentThread().setContextClassLoader(SpringTest.class.getClassLoader());
-        context = new ClassPathXmlApplicationContext(config);
-
-        consumer = (SpringConsumer) context.getBean("consumer");
-        assertTrue("Found a valid consumer", consumer != null);
-
-        consumer.start();
-
-        // Wait a little to drain any left over messages.
-        Thread.sleep(1000);
-        consumer.flushMessages();
-
-        producer = (SpringProducer) context.getBean("producer");
-        assertTrue("Found a valid producer", producer != null);
-
-        producer.start();
-
-        // lets sleep a little to give the JMS time to dispatch stuff
-        consumer.waitForMessagesToArrive(producer.getMessageCount());
-
-        // now lets check that the consumer has received some messages
-        List messages = consumer.flushMessages();
-        LOG.info("Consumer has received messages....");
-        for (Iterator iter = messages.iterator(); iter.hasNext();) {
-            Object message = iter.next();
-            LOG.info("Received: " + message);
-        }
-
-        assertEquals("Message count", producer.getMessageCount(), messages.size());
-    }
-
-    /**
-     * Clean up method.
-     *
-     * @throws Exception
-     */
-    protected void tearDown() throws Exception {
-        if (consumer != null) {
-            consumer.stop();
-        }
-        if (producer != null) {
-            producer.stop();
-        }
-
-        if (context != null) {
-            context.destroy();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/MessagePriorityTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/MessagePriorityTest.java
deleted file mode 100644
index aa6d9fd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/MessagePriorityTest.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * 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.store;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.PendingDurableSubscriberMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.StorePendingDurableSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-abstract public class MessagePriorityTest extends CombinationTestSupport {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(MessagePriorityTest.class);
-
-    BrokerService broker;
-    PersistenceAdapter adapter;
-    
-    protected ActiveMQConnectionFactory factory;
-    protected Connection conn;
-    protected Session sess;
-    
-    public boolean useCache = true;
-    public boolean dispatchAsync = true;
-    public boolean prioritizeMessages = true;
-    public boolean immediatePriorityDispatch = true;
-    public int prefetchVal = 500;
-
-    public int MSG_NUM = 600;
-    public int HIGH_PRI = 7;
-    public int LOW_PRI = 3;
-    
-    abstract protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws Exception;
-    
-    protected void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setBrokerName("priorityTest");
-        broker.setAdvisorySupport(false);
-        adapter = createPersistenceAdapter(true);
-        broker.setPersistenceAdapter(adapter);
-        PolicyEntry policy = new PolicyEntry();
-        policy.setPrioritizedMessages(prioritizeMessages);
-        policy.setUseCache(useCache);
-        StorePendingDurableSubscriberMessageStoragePolicy durableSubPending =
-                new StorePendingDurableSubscriberMessageStoragePolicy();
-        durableSubPending.setImmediatePriorityDispatch(immediatePriorityDispatch);
-        policy.setPendingDurableSubscriberPolicy(durableSubPending);
-        PolicyMap policyMap = new PolicyMap();
-        policyMap.put(new ActiveMQQueue("TEST"), policy);
-        policyMap.put(new ActiveMQTopic("TEST"), policy);
-        broker.setDestinationPolicy(policyMap);
-        broker.start();
-        broker.waitUntilStarted();
-        
-        factory = new ActiveMQConnectionFactory("vm://priorityTest");
-        ActiveMQPrefetchPolicy prefetch = new ActiveMQPrefetchPolicy();
-        prefetch.setAll(prefetchVal);
-        factory.setPrefetchPolicy(prefetch);
-        factory.setWatchTopicAdvisories(false);
-        factory.setDispatchAsync(dispatchAsync);
-        conn = factory.createConnection();
-        conn.setClientID("priority");
-        conn.start();
-        sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-    
-    protected void tearDown() throws Exception {
-        try {
-            sess.close();
-            conn.close();
-        } catch (Exception ignored) {
-        } finally {
-            broker.stop();
-            broker.waitUntilStopped();
-        }
-    }
-    
-    public void testStoreConfigured() throws Exception {
-        Queue queue = sess.createQueue("TEST");
-        Topic topic = sess.createTopic("TEST");
-        
-        MessageProducer queueProducer = sess.createProducer(queue);
-        MessageProducer topicProducer = sess.createProducer(topic);
-        
-        
-        Thread.sleep(500); // get it all propagated
-        
-        assertTrue(broker.getRegionBroker().getDestinationMap().get(queue).getMessageStore().isPrioritizedMessages());
-        assertTrue(broker.getRegionBroker().getDestinationMap().get(topic).getMessageStore().isPrioritizedMessages());
-        
-        queueProducer.close();
-        topicProducer.close();
-        
-    }
-    
-    protected class ProducerThread extends Thread {
-
-        int priority;
-        int messageCount;
-        ActiveMQDestination dest;
-        
-        public ProducerThread(ActiveMQDestination dest, int messageCount, int priority) {
-            this.messageCount = messageCount;
-            this.priority = priority;
-            this.dest = dest;
-        }
-        
-        public void run() {
-            try {
-                MessageProducer producer = sess.createProducer(dest);
-                producer.setPriority(priority);
-                for (int i = 0; i < messageCount; i++) {
-                    producer.send(sess.createTextMessage("message priority: " + priority));
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-
-        public void setMessagePriority(int priority) {
-            this.priority = priority;
-        }
-
-        public void setMessageCount(int messageCount) {
-            this.messageCount = messageCount;    
-        }
-        
-    }
-    
-    public void initCombosForTestQueues() {
-        addCombinationValues("useCache", new Object[] {new Boolean(true), new Boolean(false)});
-    }
-    
-    public void testQueues() throws Exception {
-        ActiveMQQueue queue = (ActiveMQQueue)sess.createQueue("TEST");
-
-        ProducerThread lowPri = new ProducerThread(queue, MSG_NUM, LOW_PRI);
-        ProducerThread highPri = new ProducerThread(queue, MSG_NUM, HIGH_PRI);
-        
-        lowPri.start();
-        highPri.start();
-        
-        lowPri.join();
-        highPri.join();
-        
-        MessageConsumer queueConsumer = sess.createConsumer(queue);
-        for (int i = 0; i < MSG_NUM * 2; i++) {
-            Message msg = queueConsumer.receive(5000);
-            LOG.debug("received i=" + i + ", " + (msg!=null? msg.getJMSMessageID() : null));
-            assertNotNull("Message " + i + " was null", msg);
-            assertEquals("Message " + i + " has wrong priority", i < MSG_NUM ? HIGH_PRI : LOW_PRI, msg.getJMSPriority());
-        }
-    }
-    
-    protected Message createMessage(int priority) throws Exception {
-        final String text = "priority " + priority;
-        Message msg = sess.createTextMessage(text);
-        LOG.info("Sending  " + text);
-        return msg;
-    }
-
-    public void initCombosForTestDurableSubs() {
-        addCombinationValues("prefetchVal", new Object[] {new Integer(1000), new Integer(MSG_NUM/4)});
-    }
-    
-    public void testDurableSubs() throws Exception {
-        ActiveMQTopic topic = (ActiveMQTopic)sess.createTopic("TEST");
-        TopicSubscriber sub = sess.createDurableSubscriber(topic, "priority");
-        sub.close();
-        
-        ProducerThread lowPri = new ProducerThread(topic, MSG_NUM, LOW_PRI);
-        ProducerThread highPri = new ProducerThread(topic, MSG_NUM, HIGH_PRI);
-        
-        lowPri.start();
-        highPri.start();
-        
-        lowPri.join();
-        highPri.join();
-        
-        sub = sess.createDurableSubscriber(topic, "priority");
-        for (int i = 0; i < MSG_NUM * 2; i++) {
-            Message msg = sub.receive(5000);
-            assertNotNull("Message " + i + " was null", msg);
-            assertEquals("Message " + i + " has wrong priority", i < MSG_NUM ? HIGH_PRI : LOW_PRI, msg.getJMSPriority());
-        }
-
-
-        // verify that same broker/store can deal with non priority dest also
-        topic = (ActiveMQTopic)sess.createTopic("HAS_NO_PRIORITY");
-        sub = sess.createDurableSubscriber(topic, "no_priority");
-        sub.close();
-
-        lowPri = new ProducerThread(topic, MSG_NUM, LOW_PRI);
-        highPri = new ProducerThread(topic, MSG_NUM, HIGH_PRI);
-
-        lowPri.start();
-        highPri.start();
-
-        lowPri.join();
-        highPri.join();
-
-        sub = sess.createDurableSubscriber(topic, "no_priority");
-        // verify we got them all
-        for (int i = 0; i < MSG_NUM * 2; i++) {
-            Message msg = sub.receive(5000);
-            assertNotNull("Message " + i + " was null", msg);
-        }
-
-    }
-
-    public void initCombosForTestDurableSubsReconnect() {
-        addCombinationValues("prefetchVal", new Object[] {new Integer(1000), new Integer(MSG_NUM/2)});
-        // REVISIT = is dispatchAsync = true a problem or is it just the test?
-        addCombinationValues("dispatchAsync", new Object[] {Boolean.FALSE});
-        addCombinationValues("useCache", new Object[] {Boolean.TRUE, Boolean.FALSE});
-    }
-    
-    public void testDurableSubsReconnect() throws Exception {
-        ActiveMQTopic topic = (ActiveMQTopic)sess.createTopic("TEST");
-        final String subName = "priorityDisconnect";
-        TopicSubscriber sub = sess.createDurableSubscriber(topic, subName);
-        sub.close();
-
-        ProducerThread lowPri = new ProducerThread(topic, MSG_NUM, LOW_PRI);
-        ProducerThread highPri = new ProducerThread(topic, MSG_NUM, HIGH_PRI);
-
-        lowPri.start();
-        highPri.start();
-
-        lowPri.join();
-        highPri.join();
-
-
-        final int closeFrequency = MSG_NUM/4;
-        sub = sess.createDurableSubscriber(topic, subName);
-        for (int i = 0; i < MSG_NUM * 2; i++) {
-            Message msg = sub.receive(15000);
-            LOG.debug("received i=" + i + ", " + (msg!=null? msg.getJMSMessageID() : null));
-            assertNotNull("Message " + i + " was null", msg);
-            assertEquals("Message " + i + " has wrong priority", i < MSG_NUM ? HIGH_PRI : LOW_PRI, msg.getJMSPriority());
-            if (i>0 && i%closeFrequency==0) {
-                LOG.info("Closing durable sub.. on: " + i);
-                sub.close();
-                sub = sess.createDurableSubscriber(topic, subName);
-            }
-        }
-    }
-
-    public void testHighPriorityDelivery() throws Exception {
-
-        // get zero prefetch
-        ActiveMQPrefetchPolicy prefetch = new ActiveMQPrefetchPolicy();
-        prefetch.setAll(0);
-        factory.setPrefetchPolicy(prefetch);
-        conn.close();
-        conn = factory.createConnection();
-        conn.setClientID("priority");
-        conn.start();
-        sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQTopic topic = (ActiveMQTopic)sess.createTopic("TEST");
-        final String subName = "priorityDisconnect";
-        TopicSubscriber sub = sess.createDurableSubscriber(topic, subName);
-        sub.close();
-
-        final int numToProduce = 2000;
-        final int[] dups = new int[numToProduce*2];
-        ProducerThread producerThread = new ProducerThread(topic, numToProduce, LOW_PRI+1);
-        producerThread.run();
-        LOG.info("Low priority messages sent");
-
-        sub = sess.createDurableSubscriber(topic, subName);
-        final int batchSize = 250;
-        int lowLowCount = 0;
-        for (int i=0; i<numToProduce; i++) {
-            Message msg = sub.receive(15000);
-            LOG.info("received i=" + i + ", " + (msg!=null? msg.getJMSMessageID() + "-" + msg.getJMSPriority() : null));
-            assertNotNull("Message " + i + " was null", msg);
-            assertEquals("Message " + i + " has wrong priority", LOW_PRI+1, msg.getJMSPriority());
-            assertTrue("not duplicate ", dups[i] == 0);
-            dups[i] = 1;
-
-            if (i % batchSize == 0) {
-                producerThread.setMessagePriority(HIGH_PRI);
-                producerThread.setMessageCount(1);
-                producerThread.run();
-                LOG.info("High priority message sent, should be able to receive immediately");
-
-                if (i % batchSize*2 == 0) {
-                    producerThread.setMessagePriority(HIGH_PRI -1);
-                    producerThread.setMessageCount(1);
-                    producerThread.run();
-                    LOG.info("High -1 priority message sent, should be able to receive immediately");
-                }
-
-                if (i % batchSize*4 == 0) {
-                    producerThread.setMessagePriority(LOW_PRI);
-                    producerThread.setMessageCount(1);
-                    producerThread.run();
-                    lowLowCount++;
-                    LOG.info("Low low priority message sent, should not be able to receive immediately");
-                }
-
-                msg = sub.receive(15000);
-                assertNotNull("Message was null", msg);
-                LOG.info("received hi? : " + msg);
-                assertEquals("high priority", HIGH_PRI, msg.getJMSPriority());
-                            
-                if (i % batchSize*2 == 0) {
-                    msg = sub.receive(15000);
-                    assertNotNull("Message was null", msg);
-                    LOG.info("received hi -1 ? i=" + i + ", " + msg);
-                    assertEquals("high priority", HIGH_PRI -1, msg.getJMSPriority());
-                }
-            }
-        }
-        for (int i=0; i<lowLowCount; i++) {
-            Message msg = sub.receive(15000);
-            LOG.debug("received i=" + i + ", " + (msg!=null? msg.getJMSMessageID() : null));
-            assertNotNull("Message " + i + " was null", msg);
-            assertEquals("Message " + i + " has wrong priority", LOW_PRI, msg.getJMSPriority());
-        }
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/PersistenceAdapterTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/PersistenceAdapterTestSupport.java
deleted file mode 100644
index b6e37ec..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/PersistenceAdapterTestSupport.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.store;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageId;
-
-/**
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-abstract public class PersistenceAdapterTestSupport extends TestCase {
-
-    protected PersistenceAdapter pa;
-    protected BrokerService brokerService = new BrokerService();
-
-    abstract protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws Exception;
-
-    @Override
-    protected void setUp() throws Exception {
-        pa = createPersistenceAdapter(true);
-        pa.start();
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-        if( pa!=null ) {
-            pa.stop();
-            pa=null;
-        }
-    }
-    
-    public void testStoreCanHandleDupMessages() throws Exception {
-
-        
-        MessageStore ms = pa.createQueueMessageStore(new ActiveMQQueue("TEST"));
-        ConnectionContext context = new ConnectionContext();
-
-        ActiveMQTextMessage message = new ActiveMQTextMessage();
-        message.setText("test");
-        MessageId messageId = new MessageId("ID:localhost-56913-1254499826208-0:0:1:1:1");
-        messageId.setBrokerSequenceId(1);
-        message.setMessageId(messageId);
-        ms.addMessage(context, message);
-
-        // here comes the dup...
-        message = new ActiveMQTextMessage();
-        message.setText("test");
-        messageId = new MessageId("ID:localhost-56913-1254499826208-0:0:1:1:1");
-        messageId.setBrokerSequenceId(2);
-        message.setMessageId(messageId);
-        ms.addMessage(context, message);
-
-        final AtomicInteger recovered = new AtomicInteger();
-        ms.recover(new MessageRecoveryListener() {
-            public boolean hasSpace() {
-                return true;
-            }
-
-            public boolean isDuplicate(MessageId ref) {
-                return false;
-            }
-
-            public boolean recoverMessage(Message message) throws Exception {
-                recovered.incrementAndGet();
-                return true;
-            }
-
-            public boolean recoverMessageReference(MessageId ref) throws Exception {
-                recovered.incrementAndGet();
-                return true;
-            }
-        });
-        assertEquals(1, recovered.get());
-
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/StoreOrderTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/StoreOrderTest.java
deleted file mode 100644
index 3e12fb4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/StoreOrderTest.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/**
- * 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.store;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-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.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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-//  https://issues.apache.org/activemq/browse/AMQ-2594
-public abstract class StoreOrderTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(StoreOrderTest.class);
-    
-    protected BrokerService broker;
-    private ActiveMQConnection connection;
-    public Destination destination = new ActiveMQQueue("StoreOrderTest?consumer.prefetchSize=0");
-    
-    protected abstract void setPersistentAdapter(BrokerService brokerService) throws Exception;
-    protected void dumpMessages() throws Exception {}
-
-    public class TransactedSend implements Runnable {
-
-        private CountDownLatch readyForCommit;
-        private CountDownLatch firstDone;
-        private boolean first;
-        private Session session;
-        private MessageProducer producer;
-
-        public TransactedSend(CountDownLatch readyForCommit,
-                CountDownLatch firstDone, boolean b) throws Exception {
-            this.readyForCommit = readyForCommit;
-            this.firstDone = firstDone;
-            this.first = b;
-            session = connection.createSession(true, Session.SESSION_TRANSACTED);
-            producer = session.createProducer(destination);
-        }
-
-        public void run() {
-            try {
-                if (!first) {              
-                    firstDone.await(30, TimeUnit.SECONDS);
-                }
-                producer.send(session.createTextMessage(first ? "first" : "second"));
-                if (first) {
-                    firstDone.countDown();
-                }
-                readyForCommit.countDown();
-            
-            } catch (Exception e) {
-                e.printStackTrace();
-                fail("unexpected ex on run " + e);
-            }
-        }
-        
-        public void commit() throws Exception {
-            session.commit();
-            session.close();
-        }
-    }
-
-    @Before
-    public void setup() throws Exception {
-        broker = createBroker();
-        initConnection();
-    }
-    
-    public void initConnection() throws Exception {
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?create=false");
-        connection = (ActiveMQConnection) connectionFactory.createConnection();
-        connection.setWatchTopicAdvisories(false);
-        connection.start();
-    }
-
-    @After
-    public void stopBroker() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-    
-    @Test
-    public void testCompositeSendReceiveAfterRestart() throws Exception {
-        destination = new ActiveMQQueue("StoreOrderTest,SecondStoreOrderTest");
-        enqueueOneMessage();
-        
-        LOG.info("restart broker");
-        stopBroker();
-        broker = createRestartedBroker();
-        dumpMessages();
-        initConnection();
-        destination = new ActiveMQQueue("StoreOrderTest");
-        assertNotNull("got one message from first dest", receiveOne());
-        dumpMessages();
-        destination = new ActiveMQQueue("SecondStoreOrderTest");
-        assertNotNull("got one message from second dest", receiveOne());
-    }
-    
-    @Test
-    public void validateUnorderedTxCommit() throws Exception {
-        
-        Executor executor = Executors.newCachedThreadPool();
-        CountDownLatch readyForCommit = new CountDownLatch(2);
-        CountDownLatch firstDone = new CountDownLatch(1);
-        
-        TransactedSend first = new TransactedSend(readyForCommit, firstDone, true);
-        TransactedSend second = new TransactedSend(readyForCommit, firstDone, false);
-        executor.execute(first);
-        executor.execute(second);
-        
-        assertTrue("both started", readyForCommit.await(20, TimeUnit.SECONDS));
-        
-        LOG.info("commit out of order");        
-        // send interleaved so sequence id at time of commit could be reversed
-        second.commit();
-        
-        // force usage over the limit before second commit to flush cache
-        enqueueOneMessage();
-        
-        // can get lost in the cursor as it is behind the last sequenceId that was cached
-        first.commit();
-        
-        LOG.info("send/commit done..");
-        
-        dumpMessages();
-        
-        String received1, received2, received3 = null;
-        if (true) {
-            LOG.info("receive and rollback...");
-            Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-            received1 = receive(session);
-            received2 = receive(session);
-            received3 = receive(session);
-            
-            assertEquals("second", received1);
-            assertEquals("middle", received2);
-            assertEquals("first", received3);
-            
-            session.rollback();
-            session.close();
-        }
-        
-        
-        LOG.info("restart broker");
-        stopBroker();
-        broker = createRestartedBroker();
-        initConnection();
-        
-        if (true) {
-            LOG.info("receive and rollback after restart...");
-            Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-            received1 = receive(session);
-            received2 = receive(session);
-            received3 = receive(session);
-            assertEquals("second", received1);
-            assertEquals("middle", received2);
-            assertEquals("first", received3);
-            session.rollback();
-            session.close();
-        }
-        
-        LOG.info("receive and ack each message");
-        received1 = receiveOne();
-        received2 = receiveOne();
-        received3 = receiveOne();
-        
-        assertEquals("second", received1);
-        assertEquals("middle", received2);
-        assertEquals("first", received3);
-    }
-    
-    private void enqueueOneMessage() throws Exception {
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageProducer producer = session.createProducer(destination);
-        producer.send(session.createTextMessage("middle"));
-        session.commit();
-        session.close();
-    }
-
-
-    private String receiveOne() throws Exception {
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        String received = receive(session);
-        session.commit();
-        session.close();
-        return received;
-    }
-    
-    private String receive(Session session) throws Exception {
-        MessageConsumer consumer = session.createConsumer(destination);
-        String result = null;
-        TextMessage message = (TextMessage) consumer.receive(5000);
-        if (message != null) {
-            LOG.info("got message: " + message);
-            result  = message.getText();
-        }
-        consumer.close();
-        return result;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        boolean deleteMessagesOnStartup = true;
-        return startBroker(deleteMessagesOnStartup);
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        boolean deleteMessagesOnStartup = false;
-        return startBroker(deleteMessagesOnStartup);
-    }   
-
-    protected BrokerService startBroker(boolean deleteMessagesOnStartup) throws Exception {
-        BrokerService newBroker = new BrokerService();   
-        configureBroker(newBroker);
-        newBroker.setDeleteAllMessagesOnStartup(deleteMessagesOnStartup);
-        newBroker.start();
-        return newBroker;
-    }
-    
-    protected void configureBroker(BrokerService brokerService) throws Exception {
-        setPersistentAdapter(brokerService);
-        brokerService.setAdvisorySupport(false);
-        
-        PolicyMap map = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setMemoryLimit(1024*3);
-        defaultEntry.setCursorMemoryHighWaterMark(68);
-        defaultEntry.setExpireMessagesPeriod(0);
-        map.setDefaultEntry(defaultEntry);
-        brokerService.setDestinationPolicy(map);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/BrokenPersistenceAdapter.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/BrokenPersistenceAdapter.java
deleted file mode 100644
index e275d75..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/BrokenPersistenceAdapter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-
-import org.apache.activemq.broker.ConnectionContext;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-class BrokenPersistenceAdapter extends JDBCPersistenceAdapter {
-
-    private final Logger LOG = LoggerFactory.getLogger(BrokenPersistenceAdapter.class);
-
-    private boolean shouldBreak = false;
-
-    @Override
-    public void commitTransaction(ConnectionContext context) throws IOException {
-        if ( shouldBreak ) {
-            LOG.warn("Throwing exception on purpose");
-            throw new IOException("Breaking on purpose");
-        }
-        LOG.debug("in commitTransaction");
-        super.commitTransaction(context);
-    }
-
-    public void setShouldBreak(boolean shouldBreak) {
-        this.shouldBreak = shouldBreak;
-    }
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCCommitExceptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCCommitExceptionTest.java
deleted file mode 100644
index 46e1b73..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCCommitExceptionTest.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.Properties;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-import junit.framework.TestCase;
-
-// https://issues.apache.org/activemq/browse/AMQ-2880
-public class JDBCCommitExceptionTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JDBCCommitExceptionTest.class);
-
-    protected static final int messagesExpected = 10;
-    protected ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
-            "tcp://localhost:61616?jms.prefetchPolicy.all=0&jms.redeliveryPolicy.maximumRedeliveries="+messagesExpected); 
-    protected BrokerService broker;
-    protected EmbeddedDataSource dataSource;
-    protected java.sql.Connection dbConnection;
-    protected BrokenPersistenceAdapter jdbc;
-
-
-    public void setUp() throws Exception {
-        broker = createBroker();
-        broker.start();
-    }
-
-
-    public void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    public void testSqlException() throws Exception {
-        doTestSqlException();
-    }
-
-    public void doTestSqlException() throws Exception {
-        sendMessages(messagesExpected);
-        int messagesReceived = receiveMessages(messagesExpected);
-
-        dumpMessages();
-
-        assertEquals("Messages expected doesn't equal messages received", messagesExpected, messagesReceived);
-
-        broker.stop();
-    }
-
-     protected void dumpMessages() throws Exception {
-        WireFormat wireFormat = new OpenWireFormat();
-        java.sql.Connection conn = ((JDBCPersistenceAdapter) broker.getPersistenceAdapter()).getDataSource().getConnection();
-        PreparedStatement statement = conn.prepareStatement("SELECT ID, MSG FROM ACTIVEMQ_MSGS");    
-        ResultSet result = statement.executeQuery();
-        LOG.info("Messages left in broker after test");
-        while(result.next()) {
-            long id = result.getLong(1);
-            org.apache.activemq.command.Message message = (org.apache.activemq.command.Message)wireFormat.unmarshal(new ByteSequence(result.getBytes(2)));
-            LOG.info("id: " + id + ", message SeqId: " + message.getMessageId().getBrokerSequenceId() + ", MSG: " + message);
-        }
-        statement.close();
-        conn.close();
-    }
-
-    protected int receiveMessages(int messagesExpected) throws Exception {
-        javax.jms.Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-
-        jdbc.setShouldBreak(true);
-
-        // first try and receive these messages, they'll continually fail
-        receiveMessages(messagesExpected, session);
-
-        jdbc.setShouldBreak(false);
-
-        // now that the store is sane, try and get all the messages sent
-        return receiveMessages(messagesExpected, session);
-    }
-
-    protected int receiveMessages(int messagesExpected, Session session) throws Exception {
-        int messagesReceived = 0;
-
-        for (int i=0; i<messagesExpected; i++) {
-            Destination destination = session.createQueue("TEST");
-            MessageConsumer consumer = session.createConsumer(destination);
-            Message message = null;
-            try {
-                LOG.debug("Receiving message " + (messagesReceived+1) + " of " + messagesExpected);
-                message = consumer.receive(2000);
-                LOG.info("Received : " + message);
-                if (message != null) {
-                    session.commit();
-                    messagesReceived++;
-                }
-            } catch (Exception e) {
-                LOG.debug("Caught exception " + e);
-                session.rollback();
-            } finally {
-                if (consumer != null) {
-                    consumer.close();
-                }
-            }
-        }
-        return messagesReceived;
-    }
-
-    protected void sendMessages(int messagesExpected) throws Exception {
-        javax.jms.Connection connection = factory.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = session.createQueue("TEST");        
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-        for (int i=0; i<messagesExpected; i++) {
-            LOG.debug("Sending message " + (i+1) + " of " + messagesExpected);
-            producer.send(session.createTextMessage("test message " + (i+1)));
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-
-        BrokerService broker = new BrokerService();
-        jdbc = new BrokenPersistenceAdapter();
-
-        dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("target/derbyDb");
-        dataSource.setCreateDatabase("create");
-
-        jdbc.setDataSource(dataSource);
-        jdbc.setUseDatabaseLock(false);
-        jdbc.deleteAllMessages();
-
-        broker.setPersistenceAdapter(jdbc);
-        broker.setPersistent(true);
-        broker.addConnector("tcp://localhost:61616");
-
-        return broker;
-    }
-
-}
-
-
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java
deleted file mode 100644
index e3c07cd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Vector;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.TopicSubscriber;
-import junit.framework.Test;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.MessagePriorityTest;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-public class JDBCMessagePriorityTest extends MessagePriorityTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JDBCMessagePriorityTest.class);
-    EmbeddedDataSource dataSource;
-
-    @Override
-    protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws Exception {
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        dataSource.setShutdownDatabase(null);
-        jdbc.setDataSource(dataSource);
-        jdbc.deleteAllMessages();
-        jdbc.setCleanupPeriod(2000);
-        return jdbc;
-    }
-
-
-    protected void tearDown() throws Exception {
-       super.tearDown();
-       try {
-            if (dataSource != null) {
-                // ref http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java?view=markup
-                dataSource.setShutdownDatabase("shutdown");
-                dataSource.getConnection();
-           }
-       } catch (Exception ignored) {
-       } finally {
-            dataSource.setShutdownDatabase(null);
-       }
-
-    }
-
-    // this cannot be a general test as kahaDB just has support for 3 priority levels
-    public void testDurableSubsReconnectWithFourLevels() throws Exception {
-        ActiveMQTopic topic = (ActiveMQTopic) sess.createTopic("TEST");
-        final String subName = "priorityDisconnect";
-        TopicSubscriber sub = sess.createDurableSubscriber(topic, subName);
-        sub.close();
-
-        final int MED_PRI = LOW_PRI + 1;
-        final int MED_HIGH_PRI = HIGH_PRI - 1;
-
-        ProducerThread lowPri = new ProducerThread(topic, MSG_NUM, LOW_PRI);
-        ProducerThread medPri = new ProducerThread(topic, MSG_NUM, MED_PRI);
-        ProducerThread medHighPri = new ProducerThread(topic, MSG_NUM, MED_HIGH_PRI);
-        ProducerThread highPri = new ProducerThread(topic, MSG_NUM, HIGH_PRI);
-
-        lowPri.start();
-        highPri.start();
-        medPri.start();
-        medHighPri.start();
-
-        lowPri.join();
-        highPri.join();
-        medPri.join();
-        medHighPri.join();
-
-
-        final int closeFrequency = MSG_NUM;
-        final int[] priorities = new int[]{HIGH_PRI, MED_HIGH_PRI, MED_PRI, LOW_PRI};
-        sub = sess.createDurableSubscriber(topic, subName);
-        for (int i = 0; i < MSG_NUM * 4; i++) {
-            Message msg = sub.receive(10000);
-            LOG.debug("received i=" + i + ", m=" + (msg != null ?
-                    msg.getJMSMessageID() + ", priority: " + msg.getJMSPriority()
-                    : null));
-            assertNotNull("Message " + i + " was null", msg);
-            assertEquals("Message " + i + " has wrong priority", priorities[i / MSG_NUM], msg.getJMSPriority());
-            if (i > 0 && i % closeFrequency == 0) {
-                LOG.info("Closing durable sub.. on: " + i);
-                sub.close();
-                sub = sess.createDurableSubscriber(topic, subName);
-            }
-        }
-        LOG.info("closing on done!");
-        sub.close();
-    }
-
-    public void initCombosForTestConcurrentDurableSubsReconnectWithXLevels() {
-        addCombinationValues("prioritizeMessages", new Object[]{Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testConcurrentDurableSubsReconnectWithXLevels() throws Exception {
-        ActiveMQTopic topic = (ActiveMQTopic) sess.createTopic("TEST");
-        final String subName = "priorityDisconnect";
-        Connection consumerConn = factory.createConnection();
-        consumerConn.setClientID("priorityDisconnect");
-        consumerConn.start();
-        Session consumerSession = consumerConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        TopicSubscriber sub = consumerSession.createDurableSubscriber(topic, subName);
-        sub.close();
-
-        final int maxPriority = 5;
-
-        final AtomicInteger[] messageCounts = new AtomicInteger[maxPriority];
-        Vector<ProducerThread> producers = new Vector<ProducerThread>();
-        for (int priority = 0; priority < maxPriority; priority++) {
-            producers.add(new ProducerThread(topic, MSG_NUM, priority));
-            messageCounts[priority] = new AtomicInteger(0);
-        }
-
-        for (ProducerThread producer : producers) {
-            producer.start();
-        }
-
-        final int closeFrequency = MSG_NUM / 2;
-        HashMap dups = new HashMap();
-        sub = consumerSession.createDurableSubscriber(topic, subName);
-        for (int i = 0; i < MSG_NUM * maxPriority; i++) {
-            Message msg = sub.receive(10000);
-            LOG.debug("received i=" + i + ", m=" + (msg != null ?
-                    msg.getJMSMessageID() + ", priority: " + msg.getJMSPriority()
-                    : null));
-            assertNull("no duplicate message failed on : " + msg.getJMSMessageID(), dups.put(msg.getJMSMessageID(), subName));
-            assertNotNull("Message " + i + " was null", msg);
-            messageCounts[msg.getJMSPriority()].incrementAndGet();
-            if (i > 0 && i % closeFrequency == 0) {
-                LOG.info("Closing durable sub.. on: " + i + ", counts: " + Arrays.toString(messageCounts));
-                sub.close();
-                sub = consumerSession.createDurableSubscriber(topic, subName);
-            }
-        }
-        LOG.info("closing on done!");
-        sub.close();
-        consumerSession.close();
-        consumerConn.close();
-
-        for (ProducerThread producer : producers) {
-            producer.join();
-        }
-    }
-
-    public void initCombosForTestConcurrentRate() {
-        addCombinationValues("prefetchVal", new Object[]{new Integer(1), new Integer(500)});
-    }
-
-    public void testConcurrentRate() throws Exception {
-        ActiveMQTopic topic = (ActiveMQTopic) sess.createTopic("TEST");
-        final String subName = "priorityConcurrent";
-        Connection consumerConn = factory.createConnection();
-        consumerConn.setClientID("subName");
-        consumerConn.start();
-        Session consumerSession = consumerConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TopicSubscriber sub = consumerSession.createDurableSubscriber(topic, subName);
-        sub.close();
-
-        final int TO_SEND = 2000;
-        final Vector<Message> duplicates = new Vector<Message>();
-        final int[] dups = new int[TO_SEND * 4];
-        long start;
-        double max = 0, sum = 0;
-        MessageProducer messageProducer = sess.createProducer(topic);
-        TextMessage message = sess.createTextMessage();
-        for (int i = 0; i < TO_SEND; i++) {
-            int priority = i % 10;
-            message.setText(i + "-" + priority);
-            message.setIntProperty("seq", i);
-            message.setJMSPriority(priority);
-            if (i > 0 && i % 1000 == 0) {
-                LOG.info("Max send time: " + max + ". Sending message: " + message.getText());
-            }
-            start = System.currentTimeMillis();
-            messageProducer.send(message, DeliveryMode.PERSISTENT, message.getJMSPriority(), 0);
-            long duration = System.currentTimeMillis() - start;
-            max = Math.max(max, duration);
-            if (duration == max) {
-                LOG.info("new max: " + max + " on i=" + i + ", " + message.getText());
-            }
-            sum += duration;
-        }
-
-        LOG.info("Sent: " + TO_SEND + ", max send time: " + max);
-
-        double noConsumerAve = (sum * 100 / TO_SEND);
-        sub = consumerSession.createDurableSubscriber(topic, subName);
-        final AtomicInteger count = new AtomicInteger();
-        sub.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                try {
-                    count.incrementAndGet();
-                    if (count.get() % 100 == 0) {
-                        LOG.info("onMessage: count: " + count.get() + ", " + ((TextMessage) message).getText() + ", seqNo " + message.getIntProperty("seq") + ", " + message.getJMSMessageID());
-                    }
-                    int seqNo = message.getIntProperty("seq");
-                    if (dups[seqNo] == 0) {
-                        dups[seqNo] = 1;
-                    } else {
-                        LOG.error("Duplicate: " + ((TextMessage) message).getText() + ", " + message.getJMSMessageID());
-                        duplicates.add(message);
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        LOG.info("Activated consumer");
-        sum = max = 0;
-        for (int i = TO_SEND; i < (TO_SEND * 2); i++) {
-            int priority = i % 10;
-            message.setText(i + "-" + priority);
-            message.setIntProperty("seq", i);
-            message.setJMSPriority(priority);
-            if (i > 0 && i % 1000 == 0) {
-                LOG.info("Max send time: " + max + ". Sending message: " + message.getText());
-            }
-            start = System.currentTimeMillis();
-            messageProducer.send(message, DeliveryMode.PERSISTENT, message.getJMSPriority(), 0);
-            long duration = System.currentTimeMillis() - start;
-            max = Math.max(max, duration);
-            if (duration == max) {
-                LOG.info("new max: " + max + " on i=" + i + ", " + message.getText());
-            }
-            sum += duration;
-        }
-        LOG.info("Sent another: " + TO_SEND + ", max send time: " + max);
-
-        double withConsumerAve = (sum * 100 / TO_SEND);
-        final int reasonableMultiplier = 4; // not so reasonable, but on slow disks it can be
-        assertTrue("max X times as slow with consumer:" + withConsumerAve + " , noConsumerMax:" + noConsumerAve,
-                withConsumerAve < noConsumerAve * reasonableMultiplier);
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                LOG.info("count: " + count.get());
-                return TO_SEND * 2 == count.get();
-            }
-        }, 60 * 1000);
-
-        assertTrue("No duplicates : " + duplicates, duplicates.isEmpty());
-        assertEquals("got all messages", TO_SEND * 2, count.get());
-    }
-
-    public static Test suite() {
-        return suite(JDBCMessagePriorityTest.class);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java
deleted file mode 100644
index 998ff7c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.PrintStream;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.cursors.NegativeQueueTest;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-public class JDBCNegativeQueueTest extends NegativeQueueTest {
-
-    EmbeddedDataSource dataSource;
-    
-    protected void configureBroker(BrokerService answer) throws Exception {
-        super.configureBroker(answer);
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);     
-        answer.setPersistenceAdapter(jdbc);
-    }
-
-    protected void tearDown() throws Exception {
-        if (DEBUG) {
-            printQuery("Select * from ACTIVEMQ_MSGS", System.out);
-        }
-        super.tearDown();
-    }
-    
-    
-    private void printQuery(String query, PrintStream out)
-            throws SQLException {
-        Connection conn = dataSource.getConnection();
-        printQuery(conn.prepareStatement(query), out);
-        conn.close();
-    }
-
-    private void printQuery(PreparedStatement s, PrintStream out)
-            throws SQLException {
-
-        ResultSet set = null;
-        try {
-            set = s.executeQuery();
-            ResultSetMetaData metaData = set.getMetaData();
-            for (int i = 1; i <= metaData.getColumnCount(); i++) {
-                if (i == 1)
-                    out.print("||");
-                out.print(metaData.getColumnName(i) + "||");
-            }
-            out.println();
-            while (set.next()) {
-                for (int i = 1; i <= metaData.getColumnCount(); i++) {
-                    if (i == 1)
-                        out.print("|");
-                    out.print(set.getString(i) + "|");
-                }
-                out.println();
-            }
-        } finally {
-            try {
-                set.close();
-            } catch (Throwable ignore) {
-            }
-            try {
-                s.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java
deleted file mode 100644
index cde444f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.network.NetworkBrokerDetachTest;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-public class JDBCNetworkBrokerDetachTest extends NetworkBrokerDetachTest {
-
-    protected void configureBroker(BrokerService broker) throws Exception {
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName(broker.getBrokerName());
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        jdbc.deleteAllMessages();
-        broker.setPersistenceAdapter(jdbc);
-    }
-	
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java
deleted file mode 100644
index ce539d2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.IOException;
-
-import junit.framework.AssertionFailedError;
-
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.PersistenceAdapterTestSupport;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-public class JDBCPersistenceAdapterTest extends PersistenceAdapterTestSupport {
-    
-    protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws IOException {
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        
-        // explicitly enable audit as it is now off by default
-        // due to org.apache.activemq.broker.ProducerBrokerExchange.canDispatch(Message)
-        jdbc.setEnableAudit(true);
-        
-        brokerService.setSchedulerSupport(false);
-        brokerService.setPersistenceAdapter(jdbc);
-        jdbc.setBrokerService(brokerService);
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        if( delete ) {
-            jdbc.deleteAllMessages();
-        }
-        return jdbc;
-    }
-    
-    public void testAuditOff() throws Exception {
-        pa.stop();
-        pa = createPersistenceAdapter(true);
-        ((JDBCPersistenceAdapter)pa).setEnableAudit(false);
-        pa.start();
-    	boolean failed = true;
-    	try {
-    		testStoreCanHandleDupMessages();
-    		failed = false;
-    	} catch (AssertionFailedError e) {
-    	}
-    	
-    	if (!failed) {
-    		fail("Should have failed with audit turned off");
-    	}
-    }   
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java
deleted file mode 100644
index 6e78927..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTest;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-public class JDBCStoreBrokerTest extends BrokerTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        
-        jdbc.deleteAllMessages();
-        broker.setPersistenceAdapter(jdbc);
-        return broker;
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        broker.setPersistenceAdapter(jdbc);
-        return broker;
-    }
-    
-    
-    public static Test suite() {
-        return suite(JDBCStoreBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-	
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreOrderTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreOrderTest.java
deleted file mode 100644
index 4d3ac55..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreOrderTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.store.StoreOrderTest;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-//  https://issues.apache.org/activemq/browse/AMQ-2594
-public class JDBCStoreOrderTest extends StoreOrderTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JDBCStoreOrderTest.class);
-    
-    @Override
-     protected void dumpMessages() throws Exception {
-        WireFormat wireFormat = new OpenWireFormat();
-        java.sql.Connection conn = ((JDBCPersistenceAdapter) broker.getPersistenceAdapter()).getDataSource().getConnection();
-        PreparedStatement statement = conn.prepareStatement("SELECT ID, MSG FROM ACTIVEMQ_MSGS");    
-        ResultSet result = statement.executeQuery();
-        while(result.next()) {
-            long id = result.getLong(1);
-            Message message = (Message)wireFormat.unmarshal(new ByteSequence(result.getBytes(2)));
-            LOG.info("id: " + id + ", message SeqId: " + message.getMessageId().getBrokerSequenceId() + ", MSG: " + message);
-        }
-        statement.close();
-        conn.close();
-    }
-    
-     @Override
-     protected void setPersistentAdapter(BrokerService brokerService)
-             throws Exception {
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        brokerService.setPersistenceAdapter(jdbc);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java
deleted file mode 100644
index 6699d33..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-
-public class JDBCTestMemory extends TestCase {
-
-    ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-    Connection conn;
-    Session sess;
-    Destination dest;
-    
-    BrokerService broker;
-    
-    protected void setUp() throws Exception {
-        broker = createBroker();
-        broker.start();
-        broker.waitUntilStarted();
-    }
-
-    protected void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(true);
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        
-        jdbc.deleteAllMessages();
-        broker.setPersistenceAdapter(jdbc);
-        broker.addConnector("tcp://0.0.0.0:61616");
-        return broker;
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(true);
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        broker.setPersistenceAdapter(jdbc);
-        broker.addConnector("tcp://0.0.0.0:61616");
-        return broker;
-    }
-    
-    public void init() throws Exception {
-        conn = factory.createConnection();
-        conn.start();
-        sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        dest = sess.createQueue("test");        
-    }
-    
-    public void testRecovery() throws Exception {
-        init();
-        MessageProducer producer = sess.createProducer(dest);
-        for (int i = 0; i < 1000; i++) {
-            producer.send(sess.createTextMessage("test"));
-        }
-        producer.close();
-        sess.close();
-        conn.close();
-        
-        broker.stop();
-        broker.waitUntilStopped();
-        broker = createRestartedBroker();
-        broker.start();
-        broker.waitUntilStarted();
-        
-        init();
-        
-        for (int i = 0; i < 10; i++) {
-            new Thread("Producer " + i) {
-
-                public void run() {
-                    try {
-                        MessageProducer producer = sess.createProducer(dest);
-                        for (int i = 0; i < 15000; i++) {
-                            producer.send(sess.createTextMessage("test"));
-                            if (i % 100 == 0) {
-                                System.out.println(getName() + " sent message " + i);
-                            }
-                        }
-                        producer.close();
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-                
-            }.start();
-            
-            new Thread("Consumer " + i) {
-
-                public void run() {
-                    try {
-                        MessageConsumer consumer = sess.createConsumer(dest);
-                        for (int i = 0; i < 15000; i++) {
-                            consumer.receive(2000);
-                            if (i % 100 == 0) {
-                                System.out.println(getName() + " received message " + i);
-                            }
-                        }
-                        consumer.close();
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-                
-            }.start();
-        }
-        
-        // Check out JConsole
-        System.in.read();
-        sess.close();
-        conn.close();
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCXACommitExceptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCXACommitExceptionTest.java
deleted file mode 100644
index 7dd5fbc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/jdbc/JDBCXACommitExceptionTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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.store.jdbc;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.Properties;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.XAConnection;
-import javax.jms.XASession;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import org.apache.activemq.ActiveMQXAConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import junit.framework.TestCase;
-
-// https://issues.apache.org/activemq/browse/AMQ-2880
-public class JDBCXACommitExceptionTest extends JDBCCommitExceptionTest {
-    private static final Logger LOG = LoggerFactory.getLogger(JDBCXACommitExceptionTest.class);
-
-    private long txGenerator = System.currentTimeMillis();
-
-    protected ActiveMQXAConnectionFactory factory = new ActiveMQXAConnectionFactory(
-            "tcp://localhost:61616?jms.prefetchPolicy.all=0&jms.redeliveryPolicy.maximumRedeliveries="+messagesExpected); 
-
-    boolean onePhase = true;
-
-    public void testTwoPhaseSqlException() throws Exception {
-        onePhase = false;
-        doTestSqlException();
-    }
-
-    @Override
-    protected int receiveMessages(int messagesExpected) throws Exception {
-        XAConnection connection = factory.createXAConnection();
-        connection.start();
-        XASession session = connection.createXASession();
-
-        jdbc.setShouldBreak(true);
-
-        // first try and receive these messages, they'll continually fail
-        receiveMessages(messagesExpected, session, onePhase);
-
-        jdbc.setShouldBreak(false);
-
-        // now that the store is sane, try and get all the messages sent
-        return receiveMessages(messagesExpected, session, onePhase);
-    }
-
-    protected int receiveMessages(int messagesExpected, XASession session, boolean onePhase) throws Exception {
-        int messagesReceived = 0;
-
-        for (int i=0; i<messagesExpected; i++) {
-            Destination destination = session.createQueue("TEST");
-            MessageConsumer consumer = session.createConsumer(destination);
-
-            XAResource resource = session.getXAResource();
-            resource.recover(XAResource.TMSTARTRSCAN);
-            resource.recover(XAResource.TMNOFLAGS);
-
-            Xid tid = createXid();
-
-            Message message = null;
-            try {
-                LOG.debug("Receiving message " + (messagesReceived+1) + " of " + messagesExpected);
-                resource.start(tid, XAResource.TMNOFLAGS);
-                message = consumer.receive(2000);
-                LOG.info("Received : " + message);
-                resource.end(tid, XAResource.TMSUCCESS);
-                if (message != null) {
-                    if (onePhase) {
-                        resource.commit(tid, true);
-                    } else {
-                        resource.prepare(tid);
-                        resource.commit(tid, false);
-                    }
-                    messagesReceived++;
-                }
-            } catch (Exception e) {
-                LOG.debug("Caught exception:", e);
-
-                try {
-                    LOG.debug("Rolling back transaction (just in case, no need to do this as it is implicit in a 1pc commit failure) " + tid);
-                    resource.rollback(tid);
-                }
-                catch (XAException ex) {
-                    try {
-                        LOG.debug("Caught exception during rollback: " + ex + " forgetting transaction " + tid);
-                        resource.forget(tid);
-                    }
-                    catch (XAException ex1) {
-                        LOG.debug("rollback/forget failed: " + ex1.errorCode);
-                    }
-                }
-            } finally {
-                if (consumer != null) {
-                    consumer.close();
-                }
-            }
-        }
-        return messagesReceived;
-    }
-
-    public Xid createXid() throws IOException {
-        
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream os = new DataOutputStream(baos);
-        os.writeLong(++txGenerator);
-        os.close();
-        final byte[] bs = baos.toByteArray();
-
-        return new Xid() {
-            public int getFormatId() {
-                return 86;
-            }
-
-            public byte[] getGlobalTransactionId() {
-                return bs;
-            }
-
-            public byte[] getBranchQualifier() {
-                return bs;
-            }
-        };
-
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBMessagePriorityTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBMessagePriorityTest.java
deleted file mode 100644
index 438b8c0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBMessagePriorityTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import junit.framework.Test;
-import org.apache.activemq.store.MessagePriorityTest;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-
-public class KahaDBMessagePriorityTest extends MessagePriorityTest {
-
-    @Override
-    protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws Exception {
-        KahaDBPersistenceAdapter adapter = new KahaDBPersistenceAdapter();
-        adapter.setConcurrentStoreAndDispatchQueues(false);
-        adapter.setConcurrentStoreAndDispatchTopics(false);
-        adapter.deleteAllMessages();
-        return adapter;
-    }
-    
-    public static Test suite() {
-        return suite(KahaDBMessagePriorityTest.class);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java
deleted file mode 100644
index c45c3e5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.PersistenceAdapterTestSupport;
-
-/**
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-public class KahaDBPersistenceAdapterTest extends PersistenceAdapterTestSupport {
-    
-    protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws IOException {
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        if (delete) {
-            kaha.deleteAllMessages();
-        }
-        return kaha;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java
deleted file mode 100644
index 2152501..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTest;
-import org.apache.activemq.util.IOHelper;
-
-/**
- * Once the wire format is completed we can test against real persistence storage.
- * 
- * 
- */
-public class KahaDBStoreBrokerTest extends BrokerTest {
-
-    protected void setUp() throws Exception {
-        this.setAutoFail(true);
-        super.setUp();
-    }
-    
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        File directory = new File("target/activemq-data/kahadb");
-        IOHelper.deleteChildren(directory);
-        kaha.setDirectory(directory);
-        kaha.deleteAllMessages();
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-    
-    public static Test suite() {
-        return suite(KahaDBStoreBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreOrderTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreOrderTest.java
deleted file mode 100644
index 8cace61..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreOrderTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.StoreOrderTest;
-
-//  https://issues.apache.org/activemq/browse/AMQ-2594
-public class KahaDBStoreOrderTest extends StoreOrderTest {
-    
-    @Override
-    protected void setPersistentAdapter(BrokerService brokerService)
-             throws Exception {
-        KahaDBStore kaha = new KahaDBStore();
-        File directory = new File("target/activemq-data/kahadb/storeOrder");
-        kaha.setDirectory(directory);
-        brokerService.setPersistenceAdapter(kaha);
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreRecoveryBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreRecoveryBrokerTest.java
deleted file mode 100644
index 0c0b167..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreRecoveryBrokerTest.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.RecoveryBrokerTest;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-
-
-/**
- * Used to verify that recovery works correctly against 
- * 
- * 
- */
-public class KahaDBStoreRecoveryBrokerTest extends RecoveryBrokerTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        kaha.deleteAllMessages();
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-    public static Test suite() {
-        return suite(KahaDBStoreRecoveryBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    
-    public void testLargeQueuePersistentMessagesNotLostOnRestart() throws Exception {
-
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        // Setup the producer and send the message.
-        StubConnection connection = createConnection();
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-        
-        ArrayList<String> expected = new ArrayList<String>();
-        
-        int MESSAGE_COUNT = 10000;
-        for(int i=0; i < MESSAGE_COUNT; i++) {
-            Message message = createMessage(producerInfo, destination);
-            message.setPersistent(true);
-            connection.send(message);
-            expected.add(message.getMessageId().toString());
-        }
-        connection.request(closeConnectionInfo(connectionInfo));
-
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-        producerInfo = createProducerInfo(sessionInfo);
-        connection.send(producerInfo);
-
-        for(int i=0; i < MESSAGE_COUNT/2; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull("Should have received message "+expected.get(0)+" by now!", m);
-            assertEquals(expected.remove(0), m.getMessageId().toString());
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            connection.send(ack);
-        }
-        
-        connection.request(closeConnectionInfo(connectionInfo));
-        
-        // restart the broker.
-        restartBroker();
-
-        // Setup the consumer and receive the message.
-        connection = createConnection();
-        connectionInfo = createConnectionInfo();
-        sessionInfo = createSessionInfo(connectionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        consumerInfo = createConsumerInfo(sessionInfo, destination);
-        connection.send(consumerInfo);
-
-        for(int i=0; i < MESSAGE_COUNT/2; i++) {
-            Message m = receiveMessage(connection);
-            assertNotNull("Should have received message "+expected.get(i)+" by now!", m);
-            assertEquals(expected.get(i), m.getMessageId().toString());
-            MessageAck ack = createAck(consumerInfo, m, 1, MessageAck.STANDARD_ACK_TYPE);
-            connection.send(ack);
-            
-            
-        }
-        
-        connection.request(closeConnectionInfo(connectionInfo));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreXARecoveryBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreXARecoveryBrokerTest.java
deleted file mode 100644
index 280e74f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreXARecoveryBrokerTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-import java.net.URI;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.XARecoveryBrokerTest;
-
-/**
- * Used to verify that recovery works correctly against 
- * 
- * 
- */
-public class KahaDBStoreXARecoveryBrokerTest extends XARecoveryBrokerTest {
-
-    public static Test suite() {
-        return suite(KahaDBStoreXARecoveryBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        kaha.deleteAllMessages();
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBTest.java
deleted file mode 100644
index 049f01e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBTest.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import junit.framework.TestCase;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-
-import javax.jms.*;
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.io.FileNotFoundException;
-
-/**
- * @author chirino
- */
-public class KahaDBTest extends TestCase {
-
-    protected BrokerService createBroker(KahaDBStore kaha) throws Exception {
-
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(false);
-        broker.setPersistenceAdapter(kaha);
-        broker.start();
-        return broker;
-
-    }
-
-    private KahaDBStore createStore(boolean delete) throws IOException {
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        if( delete ) {
-            kaha.deleteAllMessages();
-        }
-        return kaha;
-    }
-
-    public void testIgnoreMissingJournalfilesOptionSetFalse() throws Exception {
-        KahaDBStore kaha = createStore(true);
-        kaha.setJournalMaxFileLength(1024*100);
-        assertFalse(kaha.isIgnoreMissingJournalfiles());
-        BrokerService broker = createBroker(kaha);
-        sendMessages(1000);
-        broker.stop();
-
-        // Delete some journal files..
-        assertExistsAndDelete(new File(kaha.getDirectory(), "db-4.log"));
-        assertExistsAndDelete(new File(kaha.getDirectory(), "db-8.log"));
-
-        kaha = createStore(false);
-        kaha.setJournalMaxFileLength(1024*100);
-        assertFalse(kaha.isIgnoreMissingJournalfiles());
-        try {
-            broker = createBroker(kaha);
-            fail("expected IOException");
-        } catch (IOException e) {
-            assertTrue( e.getMessage().startsWith("Detected missing/corrupt journal files") );
-        }
-
-    }
-
-
-    public void testIgnoreMissingJournalfilesOptionSetTrue() throws Exception {
-        KahaDBStore kaha = createStore(true);
-        kaha.setJournalMaxFileLength(1024*100);
-        assertFalse(kaha.isIgnoreMissingJournalfiles());
-        BrokerService broker = createBroker(kaha);
-        sendMessages(1000);
-        broker.stop();
-
-        // Delete some journal files..
-        assertExistsAndDelete(new File(kaha.getDirectory(), "db-4.log"));
-        assertExistsAndDelete(new File(kaha.getDirectory(), "db-8.log"));
-
-        kaha = createStore(false);
-        kaha.setIgnoreMissingJournalfiles(true);
-        kaha.setJournalMaxFileLength(1024*100);
-        broker = createBroker(kaha);
-
-        // We know we won't get all the messages but we should get most of them.
-        int count = receiveMessages();
-        assertTrue( count > 800 ); 
-        assertTrue( count < 1000 );
-
-        broker.stop();
-    }
-
-
-    public void testCheckCorruptionNotIgnored() throws Exception {
-        KahaDBStore kaha = createStore(true);
-        assertFalse(kaha.isChecksumJournalFiles());
-        assertFalse(kaha.isCheckForCorruptJournalFiles());
-
-        kaha.setJournalMaxFileLength(1024*100);
-        kaha.setChecksumJournalFiles(true);
-        BrokerService broker = createBroker(kaha);
-        sendMessages(1000);
-        broker.stop();
-
-        // Modify/Corrupt some journal files..
-        assertExistsAndCorrupt(new File(kaha.getDirectory(), "db-4.log"));
-        assertExistsAndCorrupt(new File(kaha.getDirectory(), "db-8.log"));
-
-        kaha = createStore(false);
-        kaha.setJournalMaxFileLength(1024*100);
-        kaha.setChecksumJournalFiles(true);
-        kaha.setCheckForCorruptJournalFiles(true);
-        assertFalse(kaha.isIgnoreMissingJournalfiles());
-        try {
-            broker = createBroker(kaha);
-            fail("expected IOException");
-        } catch (IOException e) {
-            assertTrue( e.getMessage().startsWith("Detected missing/corrupt journal files") );
-        }
-
-    }
-
-    private void assertExistsAndCorrupt(File file) throws IOException {
-        assertTrue(file.exists());
-        RandomAccessFile f = new RandomAccessFile(file, "rw");
-        try {
-            f.seek(1024*5+134);
-            f.write("... corruption string ...".getBytes());
-        } finally {
-            f.close();
-        }
-    }
-
-
-    public void testCheckCorruptionIgnored() throws Exception {
-        KahaDBStore kaha = createStore(true);
-        kaha.setJournalMaxFileLength(1024*100);
-        kaha.setChecksumJournalFiles(true);
-        BrokerService broker = createBroker(kaha);
-        sendMessages(1000);
-        broker.stop();
-
-        // Delete some journal files..
-        assertExistsAndCorrupt(new File(kaha.getDirectory(), "db-4.log"));
-        assertExistsAndCorrupt(new File(kaha.getDirectory(), "db-8.log"));
-
-        kaha = createStore(false);
-        kaha.setIgnoreMissingJournalfiles(true);
-        kaha.setJournalMaxFileLength(1024*100);
-        kaha.setChecksumJournalFiles(true);
-        kaha.setCheckForCorruptJournalFiles(true);
-        broker = createBroker(kaha);
-
-        // We know we won't get all the messages but we should get most of them.
-        int count = receiveMessages();
-        assertTrue("Expected to received a min # of messages.. Got: "+count,  count > 990 );
-        assertTrue( count < 1000 );
-
-        broker.stop();
-    }
-
-    private void assertExistsAndDelete(File file) {
-        assertTrue(file.exists());
-        file.delete();
-        assertFalse(file.exists());
-    }
-
-    private void sendMessages(int count) throws JMSException {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");
-        Connection connection = cf.createConnection();
-        try {
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(new ActiveMQQueue("TEST"));
-            for (int i = 0; i < count; i++) {
-                producer.send(session.createTextMessage(createContent(i)));
-            }
-        } finally {
-            connection.close();
-        }
-    }
-
-    private int receiveMessages() throws JMSException {
-        int rc=0;
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");
-        Connection connection = cf.createConnection();
-        try {
-            connection.start();
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageConsumer messageConsumer = session.createConsumer(new ActiveMQQueue("TEST"));
-            while ( messageConsumer.receive(1000) !=null ) {
-                rc++;
-            }
-            return rc;
-        } finally {
-            connection.close();
-        }
-    }
-
-    private String createContent(int i) {
-        StringBuilder sb = new StringBuilder(i+":");
-        while( sb.length() < 1024 ) {
-            sb.append("*");
-        }
-        return sb.toString();
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java
deleted file mode 100644
index b1abe18..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import junit.framework.TestCase;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.util.IOHelper;
-
-import javax.jms.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.io.FileNotFoundException;
-
-/**
- * @author chirino
- */
-public class KahaDBVersionTest extends TestCase {
-
-    static final Logger LOG = LoggerFactory.getLogger(KahaDBVersionTest.class);
-    final static File VERSION_1_DB= new File("src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1");
-    final static File VERSION_2_DB= new File("src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2");
-
-    BrokerService broker = null;
-
-    protected BrokerService createBroker(KahaDBPersistenceAdapter kaha) throws Exception {
-
-        broker = new BrokerService();
-        broker.setUseJmx(false);
-        broker.setPersistenceAdapter(kaha);
-        broker.start();
-        return broker;
-
-    }
-
-    protected void tearDown() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-        
-    public void XtestCreateStore() throws Exception {
-        KahaDBPersistenceAdapter kaha = new KahaDBPersistenceAdapter();
-        File dir = new File("src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersionX");
-        IOHelper.deleteFile(dir);
-        kaha.setDirectory(dir);
-        kaha.setJournalMaxFileLength(1024*1024);
-        BrokerService broker = createBroker(kaha);
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");        
-        Connection connection = cf.createConnection();
-        connection.setClientID("test");
-        connection.start();
-        producerSomeMessages(connection, 1000);
-        connection.close();
-        broker.stop();
-    }
-
-    private void producerSomeMessages(Connection connection, int numToSend) throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("test.topic");
-        Queue queue = session.createQueue("test.queue");
-        MessageConsumer consumer = session.createDurableSubscriber(topic,"test");
-        consumer.close();
-        MessageProducer producer = session.createProducer(topic);
-        producer.setPriority(9);
-        for (int i =0; i < numToSend; i++) {
-            Message msg = session.createTextMessage("test message:"+i);
-            producer.send(msg);
-        }
-        LOG.info("sent "  + numToSend +" to topic");
-        producer = session.createProducer(queue);
-        for (int i =0; i < numToSend; i++) {
-            Message msg = session.createTextMessage("test message:"+i);
-            producer.send(msg);
-        }
-        LOG.info("sent " + numToSend +" to queue");
-    }
-
-    public void testVersion1Conversion() throws Exception{
-          doConvertRestartCycle(VERSION_1_DB);
-    }
-
-    public void testVersion2Conversion() throws Exception{
-          doConvertRestartCycle(VERSION_2_DB);
-    }
-
-    public void doConvertRestartCycle(File existingStore) throws Exception {
-
-        File testDir = new File("target/activemq-data/kahadb/versionDB");
-        IOHelper.deleteFile(testDir);
-        IOHelper.copyFile(existingStore, testDir);
-        final int numToSend = 1000;
-
-        // on repeat store will be upgraded
-        for (int repeats = 0; repeats < 3; repeats++) {
-            KahaDBPersistenceAdapter kaha = new KahaDBPersistenceAdapter();
-            kaha.setDirectory(testDir);
-            kaha.setJournalMaxFileLength(1024 * 1024);
-            BrokerService broker = createBroker(kaha);
-            ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");
-            Connection connection = cf.createConnection();
-            connection.setClientID("test");
-            connection.start();
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Topic topic = session.createTopic("test.topic");
-            Queue queue = session.createQueue("test.queue");
-
-            if (repeats > 0) {
-                // upgraded store will be empty so generated some more messages
-                producerSomeMessages(connection, numToSend);
-            }
-
-            MessageConsumer queueConsumer = session.createConsumer(queue);
-            int count = 0;
-            for (int i = 0; i < (repeats == 0 ? 1000 : numToSend); i++) {
-                TextMessage msg = (TextMessage) queueConsumer.receive(10000);
-                count++;
-                //System.err.println(msg.getText());
-                assertNotNull(msg);
-            }
-            LOG.info("Consumed " + count + " from queue");
-            count = 0;
-            MessageConsumer topicConsumer = session.createDurableSubscriber(topic, "test");
-            for (int i = 0; i < (repeats == 0 ? 1000 : numToSend); i++) {
-                TextMessage msg = (TextMessage) topicConsumer.receive(10000);
-                count++;
-                //System.err.println(msg.getText());
-                assertNotNull(msg);
-            }
-            LOG.info("Consumed " + count + " from topic");
-            connection.close();
-            
-            broker.stop();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/NoSpaceIOTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/NoSpaceIOTest.java
deleted file mode 100644
index fd61f89..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/NoSpaceIOTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-import java.io.RandomAccessFile;
-import java.util.concurrent.atomic.AtomicLong;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class NoSpaceIOTest {
-    private static final Logger LOG = LoggerFactory.getLogger(NoSpaceIOTest.class);
-
-    // need an app to input to console in intellij idea
-    public static void main(String[] args) throws Exception {
-       new NoSpaceIOTest().testRunOutOfSpace();
-    }
-
-    // handy way to validate some out of space related errors with a usb key
-    // allow it to run out of space, delete toDelete and see it recover
-    @Ignore("needs small volume, like usb key")
-    @Test
-    public void testRunOutOfSpace() throws Exception {
-        BrokerService broker = new BrokerService();
-        File dataDir = new File("/Volumes/NO NAME/");
-        File useUpSpace = new File(dataDir, "bigFile");
-        if (!useUpSpace.exists()) {
-            LOG.info("using up some space...");
-            RandomAccessFile filler = new RandomAccessFile(useUpSpace, "rw");
-            filler.setLength(1024*1024*1212); // use ~1.xG of 2G (usb) volume
-            filler.close();
-            File toDelete = new File(dataDir, "toDelete");
-            filler = new RandomAccessFile(toDelete, "rw");
-            filler.setLength(1024*1024*32*10); // 10 data files
-            filler.close();
-        }
-        broker.setDataDirectoryFile(dataDir);
-        broker.start();
-        AtomicLong consumed = new AtomicLong(0);
-        consume(consumed);
-        LOG.info("consumed: " + consumed);
-
-        broker.getPersistenceAdapter().checkpoint(true);
-
-        AtomicLong sent = new AtomicLong(0);
-        try {
-            produce(sent, 200);
-        } catch (Exception expected) {
-            LOG.info("got ex, sent: " + sent);
-        }
-        LOG.info("sent: " + sent);
-        System.out.println("Remove toDelete file and press any key to continue");
-        int read = System.in.read();
-        System.err.println("read:" + read);
-
-        LOG.info("Trying to send again: " + sent);
-        try {
-            produce(sent, 200);
-        } catch (Exception expected) {
-            LOG.info("got ex, sent: " + sent);
-        }
-        LOG.info("sent: " + sent);
-    }
-
-    private void consume(AtomicLong consumed) throws JMSException {
-        Connection c = new ActiveMQConnectionFactory("vm://localhost").createConnection();
-        try {
-            c.start();
-            Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageConsumer consumer = s.createConsumer(new ActiveMQQueue("t"));
-            while (consumer.receive(2000) != null) {
-                consumed.incrementAndGet();
-            }
-        } finally {
-            c.close();
-        }
-    }
-
-    private void produce(AtomicLong sent, long toSend) throws JMSException {
-        Connection c = new ActiveMQConnectionFactory("vm://localhost").createConnection();
-        try {
-            c.start();
-            Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = s.createProducer(new ActiveMQQueue("t"));
-            TextMessage m = s.createTextMessage();
-            m.setText(String.valueOf(new char[1024*1024]));
-            for (int i=0; i<toSend; i++) {
-                producer.send(m);
-                sent.incrementAndGet();
-            }
-        } finally {
-            c.close();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/PBMesssagesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/PBMesssagesTest.java
deleted file mode 100644
index 26912ac..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/PBMesssagesTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**

- * 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.store.kahadb;

-

-import java.io.IOException;

-

-import junit.framework.TestCase;

-

-import org.apache.activemq.protobuf.Buffer;

-import org.apache.kahadb.journal.Location;

-import org.apache.activemq.store.kahadb.data.KahaAddMessageCommand;

-import org.apache.activemq.store.kahadb.data.KahaDestination;

-import org.apache.activemq.store.kahadb.data.KahaEntryType;

-import org.apache.activemq.store.kahadb.data.KahaDestination.DestinationType;

-import org.apache.kahadb.util.ByteSequence;

-import org.apache.kahadb.util.DataByteArrayInputStream;

-import org.apache.kahadb.util.DataByteArrayOutputStream;

-

-public class PBMesssagesTest extends TestCase {

-

-    public void testKahaAddMessageCommand() throws IOException {

-

-       KahaAddMessageCommand expected = new KahaAddMessageCommand();

-       expected.setDestination(new KahaDestination().setName("Foo").setType(DestinationType.QUEUE));

-       expected.setMessage(new Buffer(new byte[] {1,2,3,4,5,6} ));

-       expected.setMessageId("Hello World");

-       

-       int size = expected.serializedSizeFramed();

-       DataByteArrayOutputStream os = new DataByteArrayOutputStream(size + 1);

-       os.writeByte(expected.type().getNumber());

-       expected.writeFramed(os);

-       ByteSequence seq = os.toByteSequence();

-       

-       DataByteArrayInputStream is = new DataByteArrayInputStream(seq);

-       KahaEntryType type = KahaEntryType.valueOf(is.readByte());

-       JournalCommand message = (JournalCommand)type.createMessage();

-       message.mergeFramed(is);

-       

-       assertEquals(expected, message);

-    }

-    

-}

diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java
deleted file mode 100644
index e2d9109..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.store.kahadb;
-
-import java.io.File;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTest;
-
-/**
- * Once the wire format is completed we can test against real persistence storage.
- * 
- * 
- */
-public class TempKahaDBStoreBrokerTest extends BrokerTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        kaha.deleteAllMessages();
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-    protected BrokerService createRestartedBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        TempKahaDBStore kaha = new TempKahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        broker.setPersistenceAdapter(kaha);
-        return broker;
-    }
-    
-    
-    public static Test suite() {
-        return suite(TempKahaDBStoreBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaBulkLoadingTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaBulkLoadingTest.java
deleted file mode 100644
index 1e049c7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaBulkLoadingTest.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.store.kahadb.perf;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ProgressPrinter;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-
-/**
- * This tests bulk loading and unloading of messages to a Queue.s
- * 
- * 
- */
-public class KahaBulkLoadingTest extends JmsTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(KahaBulkLoadingTest.class);
-
-    protected int messageSize = 1024 * 4;
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
-        // kaha.deleteAllMessages();
-        broker.setPersistenceAdapter(kaha);
-        broker.addConnector("tcp://localhost:0");
-        return broker;
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws URISyntaxException, IOException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(((TransportConnector)broker.getTransportConnectors().get(0)).getServer().getConnectURI());
-        factory.setUseAsyncSend(true);
-        return factory;
-    }
-
-    public void testQueueSendThenAddConsumer() throws Exception {
-        long start;
-        long end;
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-
-        connection.setUseCompression(false);
-        connection.getPrefetchPolicy().setAll(10);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-
-        LOG.info("Receiving messages that are in the queue");
-        MessageConsumer consumer = session.createConsumer(destination);
-        BytesMessage msg = (BytesMessage)consumer.receive(2000);
-        int consumed = 0;
-        if( msg!=null ) {
-            consumed++;
-        }
-        while (true) {
-            int counter = 0;
-            if (msg == null) {
-                break;
-            }
-            end = start = System.currentTimeMillis();
-            int size = 0;
-            while ((end - start) < 5000) {
-                msg = (BytesMessage)consumer.receive(5000);
-                if (msg == null) {
-                    break;
-                }
-                counter++;
-                consumed++;
-                end = System.currentTimeMillis();
-                size += msg.getBodyLength();
-            }
-            LOG.info("Consumed: " + (counter * 1000.0 / (end - start)) + " " + " messages/sec, " + (1.0 * size / (1024.0 * 1024.0)) * ((1000.0 / (end - start))) + " megs/sec ");
-        }
-        consumer.close();
-        LOG.info("Consumed " + consumed + " messages from the queue.");
-
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-        LOG.info("Sending messages that are " + (messageSize / 1024.0) + "k large");
-        // Send a message to the broker.
-        start = System.currentTimeMillis();
-
-        final AtomicBoolean stop = new AtomicBoolean();
-        Runtime.getRuntime().addShutdownHook(new Thread() {
-            @Override
-            public void run() {
-                stop.set(true);
-            }
-        });
-
-        int produced = 0;
-        while (!stop.get()) {
-            end = start = System.currentTimeMillis();
-            int produceCount = 0;
-            while ((end - start) < 5000 && !stop.get()) {
-                BytesMessage bm = session.createBytesMessage();
-                bm.writeBytes(new byte[messageSize]);
-                producer.send(bm);
-                produceCount++;
-                produced++;
-                end = System.currentTimeMillis();
-            }
-            LOG.info("Produced: " + (produceCount * 1000.0 / (end - start)) + " messages/sec, " + (1.0 * produceCount * messageSize / (1024.0 * 1024.0)) * ((1000.0 / (end - start))) + " megs/sec");
-        }
-        LOG.info("Prodcued " + produced + " messages to the queue.");
-
-    }
-
-    public static Test suite() {
-        return suite(KahaBulkLoadingTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java
deleted file mode 100644
index 0ce91bb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.store.kahadb.perf;
-
-import java.io.File;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.perf.SimpleDurableTopicTest;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-
-/**
- * 
- */
-public class KahaStoreDurableTopicTest extends SimpleDurableTopicTest {
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        File dataFileDir = new File("target/test-amq-data/perfTest/amqdb");
-        dataFileDir.mkdirs();
-        // answer.setDeleteAllMessagesOnStartup(true);
-               
-         KahaDBStore adaptor = new KahaDBStore();
-         adaptor.setDirectory(dataFileDir);
-         
-        
-        answer.setDataDirectoryFile(dataFileDir);
-        answer.setPersistenceAdapter(adaptor);
-        answer.addConnector(uri);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java
deleted file mode 100644
index 3db1c33..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.store.kahadb.perf;
-
-import java.io.File;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.perf.SimpleQueueTest;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-
-/**
- * 
- */
-public class KahaStoreQueueTest extends SimpleQueueTest {
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        File dataFileDir = new File("target/test-amq-data/perfTest/amqdb");
-        dataFileDir.mkdirs();
-        answer.setDeleteAllMessagesOnStartup(true);
-               
-         KahaDBStore adaptor = new KahaDBStore();
-         adaptor.setDirectory(dataFileDir);
-         
-        
-        answer.setDataDirectoryFile(dataFileDir);
-        answer.setPersistenceAdapter(adaptor);
-        answer.addConnector(uri);
-    }
-
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java
deleted file mode 100644
index 7f0b6aa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.store.kahadb.perf;
-
-import java.io.File;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.perf.SimpleQueueTest;
-import org.apache.activemq.store.kahadb.TempKahaDBStore;
-
-/**
- * 
- */
-public class TempKahaStoreQueueTest extends SimpleQueueTest {
-
-    protected void configureBroker(BrokerService answer,String uri) throws Exception {
-        File dataFileDir = new File("target/test-amq-data/perfTest/temp-amqdb");
-        dataFileDir.mkdirs();
-        answer.setDeleteAllMessagesOnStartup(true);
-               
-         TempKahaDBStore adaptor = new TempKahaDBStore();
-         adaptor.setDirectory(dataFileDir);
-         
-        
-        answer.setDataDirectoryFile(dataFileDir);
-        answer.setPersistenceAdapter(adaptor);
-        answer.addConnector(uri);
-    }
-
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/plist/PListTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/plist/PListTest.java
deleted file mode 100644
index ec56464..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/plist/PListTest.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.store.kahadb.plist;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.apache.activemq.util.IOHelper;
-import org.apache.kahadb.util.ByteSequence;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class PListTest {
-
-    private PListStore store;
-    private PList plist;
-   
-
-    @Test
-    public void testAddLast() throws Exception {
-        final int COUNT = 1000;
-        Map<String, ByteSequence> map = new LinkedHashMap<String, ByteSequence>();
-        for (int i = 0; i < COUNT; i++) {
-            String test = new String("test" + i);
-            ByteSequence bs = new ByteSequence(test.getBytes());
-            map.put(test, bs);
-            plist.addLast(test, bs);
-        }
-        assertEquals(plist.size(), COUNT);
-        int count = 0;
-        for (ByteSequence bs : map.values()) {
-            String origStr = new String(bs.getData(), bs.getOffset(), bs.getLength());
-            PListEntry entry = plist.get(count);
-            String plistString = new String(entry.getByteSequence().getData(), entry.getByteSequence().getOffset(),
-                    entry.getByteSequence().getLength());
-            assertEquals(origStr, plistString);
-            count++;
-        }
-    }
-
-   @Test
-    public void testAddFirst() throws Exception {
-        final int COUNT = 1000;
-        Map<String, ByteSequence> map = new LinkedHashMap<String, ByteSequence>();
-        for (int i = 0; i < COUNT; i++) {
-            String test = new String("test" + i);
-            ByteSequence bs = new ByteSequence(test.getBytes());
-            map.put(test, bs);
-            plist.addFirst(test, bs);
-        }
-        assertEquals(plist.size(), COUNT);
-        int count = plist.size() - 1;
-        for (ByteSequence bs : map.values()) {
-            String origStr = new String(bs.getData(), bs.getOffset(), bs.getLength());
-            PListEntry entry = plist.get(count);
-            String plistString = new String(entry.getByteSequence().getData(), entry.getByteSequence().getOffset(),
-                    entry.getByteSequence().getLength());
-            assertEquals(origStr, plistString);
-            count--;
-        }
-    }
-
-    @Test
-    public void testRemove() throws IOException {
-        doTestRemove(2000);
-    }
-    
-    protected void doTestRemove(final int COUNT) throws IOException {            
-        Map<String, ByteSequence> map = new LinkedHashMap<String, ByteSequence>();
-        for (int i = 0; i < COUNT; i++) {
-            String test = new String("test" + i);
-            ByteSequence bs = new ByteSequence(test.getBytes());
-            map.put(test, bs);
-            plist.addLast(test, bs);
-        }
-        assertEquals(plist.size(), COUNT);
-        PListEntry entry = plist.getFirst();
-        while (entry != null) {
-            plist.remove(entry.copy());
-            entry = plist.getFirst();
-        }
-        assertEquals(0,plist.size());
-
-    }
-
-    @Test
-    public void testDestroy() throws Exception {
-        doTestRemove(1);
-        plist.destroy();
-        assertEquals(0,plist.size());
-    }
-    
-    @Test
-    public void testDestroyNonEmpty() throws Exception {
-        final int COUNT = 1000;
-        Map<String, ByteSequence> map = new LinkedHashMap<String, ByteSequence>();
-        for (int i = 0; i < COUNT; i++) {
-            String test = new String("test" + i);
-            ByteSequence bs = new ByteSequence(test.getBytes());
-            map.put(test, bs);
-            plist.addLast(test, bs);
-        }
-        plist.destroy();
-        assertEquals(0,plist.size());
-        assertNull("no first entry", plist.getFirst());
-    }
-    
-    @Test
-    public void testRemoveSecond() throws Exception {
-        plist.addLast("First", new ByteSequence("A".getBytes()));
-        plist.addLast("Second", new ByteSequence("B".getBytes()));
-        
-        assertTrue(plist.remove("Second"));
-        assertTrue(plist.remove("First"));
-        assertFalse(plist.remove("doesNotExist"));
-    }
-    
-    
-    @Test
-    public void testRemoveSecondPosition() throws Exception {
-        plist.addLast("First", new ByteSequence("A".getBytes()));
-        plist.addLast("Second", new ByteSequence("B".getBytes()));
-        
-        assertTrue(plist.remove(1));
-        assertTrue(plist.remove(0));
-        assertFalse(plist.remove(3));
-    }
-    
-
-    @Before
-    public void setUp() throws Exception {
-        File directory = new File("target/test/PlistDB");
-        IOHelper.mkdirs(directory);
-        IOHelper.deleteChildren(directory);
-        startStore(directory);
-
-    }
-
-    protected void startStore(File directory) throws Exception {
-        store = new PListStore();
-        store.setDirectory(directory);
-        store.start();
-        plist = store.getPList("test");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        store.stop();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java
deleted file mode 100755
index bcc63ba..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * 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.streams;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQInputStream;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * JMSInputStreamTest
- */
-public class JMSInputStreamTest extends JmsTestSupport {
-
-    public Destination destination;
-    protected DataOutputStream out;
-    protected DataInputStream in;
-    private ActiveMQConnection connection2;
-
-    private ActiveMQInputStream amqIn;
-
-    
-    public static Test suite() {
-        return suite(JMSInputStreamTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void initCombos() {
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST.QUEUE"), new ActiveMQTopic("TEST.TOPIC")});
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-    }
-
-    /**
-     * Setup connection and streams
-     * 
-     * @param props
-     * @throws JMSException
-     */
-    private void setUpConnection(Map<String, Object> props, long timeout) throws JMSException {
-        connection2 = (ActiveMQConnection)factory.createConnection(userName, password);
-        connections.add(connection2);
-        OutputStream amqOut;
-        if (props != null) {
-            amqOut = connection.createOutputStream(destination, props, Message.DEFAULT_DELIVERY_MODE, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
-        } else {
-            amqOut = connection.createOutputStream(destination);
-        }
-        out = new DataOutputStream(amqOut);
-        if (timeout == -1) {
-            amqIn = (ActiveMQInputStream) connection2.createInputStream(destination);
-        } else {
-            amqIn = (ActiveMQInputStream) connection2.createInputStream(destination, null, false, timeout);
-        }
-        in = new DataInputStream(amqIn);
-    }
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * Test for AMQ-3010
-     */
-    public void testInputStreamTimeout() throws Exception {
-        long timeout = 500;
-        
-        setUpConnection(null, timeout);
-        try {
-            in.read();
-            fail();
-        } catch (ActiveMQInputStream.ReadTimeoutException e) {
-            // timeout reached, everything ok
-        }
-        in.close();
-        
-    }
-
-    // Test for AMQ-2988
-    public void testStreamsWithProperties() throws Exception {
-        String name1 = "PROPERTY_1";
-        String name2 = "PROPERTY_2";
-        String value1 = "VALUE_1";
-        String value2 = "VALUE_2";
-        Map<String,Object> jmsProperties = new HashMap<String, Object>();
-        jmsProperties.put(name1, value1);
-        jmsProperties.put(name2, value2);
-        setUpConnection(jmsProperties, -1);
-        
-        out.writeInt(4);
-        out.flush();
-        assertTrue(in.readInt() == 4);
-        out.writeFloat(2.3f);
-        out.flush();
-        assertTrue(in.readFloat() == 2.3f);
-        String str = "this is a test string";
-        out.writeUTF(str);
-        out.flush();
-        assertTrue(in.readUTF().equals(str));
-        for (int i = 0; i < 100; i++) {
-            out.writeLong(i);
-        }
-        out.flush();
-     
-        // check properties before we try to read the stream
-        checkProperties(jmsProperties);
-        
-        for (int i = 0; i < 100; i++) {
-            assertTrue(in.readLong() == i);
-        }
-        
-        // check again after read was done
-        checkProperties(jmsProperties);
-    }
-    
-    // check if the received stream has the properties set
-    // Test for AMQ-2988
-    private void checkProperties(Map<String, Object> jmsProperties) throws IOException {
-        Map<String, Object> receivedJmsProps = amqIn.getJMSProperties();
-        
-        // we should at least have the same amount or more properties
-        assertTrue(jmsProperties.size() <= receivedJmsProps.size());
-        
-
-        // check the properties to see if we have everything in there
-        Iterator<String>  propsIt = jmsProperties.keySet().iterator();
-        while(propsIt.hasNext()) {
-            String key = propsIt.next();
-            assertTrue(receivedJmsProps.containsKey(key));
-            assertEquals(jmsProperties.get(key), receivedJmsProps.get(key));
-        }
-    }
-    
-    public void testLarge() throws Exception {
-        setUpConnection(null, -1);
-        
-        final int testData = 23;
-        final int dataLength = 4096;
-        final int count = 1024;
-        byte[] data = new byte[dataLength];
-        for (int i = 0; i < data.length; i++) {
-            data[i] = testData;
-        }
-        final AtomicBoolean complete = new AtomicBoolean(false);
-        Thread runner = new Thread(new Runnable() {
-            public void run() {
-                try {
-                    for (int x = 0; x < count; x++) {
-                        byte[] b = new byte[2048];
-                        in.readFully(b);
-                        for (int i = 0; i < b.length; i++) {
-                            assertTrue(b[i] == testData);
-                        }
-                    }
-                    complete.set(true);
-                    synchronized (complete) {
-                        complete.notify();
-                    }
-                } catch (Exception ex) {
-                    ex.printStackTrace();
-                }
-            }
-        });
-        runner.start();
-        for (int i = 0; i < count; i++) {
-            out.write(data);
-        }
-        out.flush();
-        synchronized (complete) {
-            if (!complete.get()) {
-                complete.wait(30000);
-            }
-        }
-        assertTrue(complete.get());
-    }
-    
-    public void testStreams() throws Exception {
-        setUpConnection(null, -1);
-        out.writeInt(4);
-        out.flush();
-        assertTrue(in.readInt() == 4);
-        out.writeFloat(2.3f);
-        out.flush();
-        assertTrue(in.readFloat() == 2.3f);
-        String str = "this is a test string";
-        out.writeUTF(str);
-        out.flush();
-        assertTrue(in.readUTF().equals(str));
-        for (int i = 0; i < 100; i++) {
-            out.writeLong(i);
-        }
-        out.flush();
-        
-        for (int i = 0; i < 100; i++) {
-            assertTrue(in.readLong() == i);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsResourceProvider.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsResourceProvider.java
deleted file mode 100755
index a480a7d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsResourceProvider.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/**
- * 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.test;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class JmsResourceProvider {
-
-    private String serverUri = "vm://localhost?broker.persistent=false";
-    private boolean transacted;
-    private int ackMode = Session.AUTO_ACKNOWLEDGE;
-    private boolean isTopic;
-    private int deliveryMode = DeliveryMode.PERSISTENT;
-    private String durableName = "DummyName";
-    private String clientID = getClass().getName();
-
-    /**
-     * Creates a connection factory.
-     * 
-     * @see org.apache.activemq.test.JmsResourceProvider#createConnectionFactory()
-     */
-    public ConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(serverUri);
-    }
-
-    /**
-     * Creates a connection.
-     * 
-     * @see org.apache.activemq.test.JmsResourceProvider#createConnection(javax.jms.ConnectionFactory)
-     */
-    public Connection createConnection(ConnectionFactory cf) throws JMSException {
-        Connection connection = cf.createConnection();
-        if (getClientID() != null) {
-            connection.setClientID(getClientID());
-        }
-        return connection;
-    }
-
-    /**
-     * @see org.apache.activemq.test.JmsResourceProvider#createSession(javax.jms.Connection)
-     */
-    public Session createSession(Connection conn) throws JMSException {
-        return conn.createSession(transacted, ackMode);
-    }
-
-    /**
-     * @see org.apache.activemq.test.JmsResourceProvider#createConsumer(javax.jms.Session,
-     *      javax.jms.Destination)
-     */
-    public MessageConsumer createConsumer(Session session, Destination destination) throws JMSException {
-        if (isDurableSubscriber()) {
-            return session.createDurableSubscriber((Topic)destination, durableName);
-        }
-        return session.createConsumer(destination);
-    }
-
-    /**
-     * Creates a connection for a consumer.
-     * 
-     * @param ssp - ServerSessionPool
-     * @return ConnectionConsumer
-     */
-    public ConnectionConsumer createConnectionConsumer(Connection connection, Destination destination, ServerSessionPool ssp) throws JMSException {
-        return connection.createConnectionConsumer(destination, null, ssp, 1);
-    }
-
-    /**
-     * Creates a producer.
-     * 
-     * @see org.apache.activemq.test.JmsResourceProvider#createProducer(javax.jms.Session,
-     *      javax.jms.Destination)
-     */
-    public MessageProducer createProducer(Session session, Destination destination) throws JMSException {
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-        return producer;
-    }
-
-    /**
-     * Creates a destination, which can either a topic or a queue.
-     * 
-     * @see org.apache.activemq.test.JmsResourceProvider#createDestination(javax.jms.Session,
-     *      java.lang.String)
-     */
-    public Destination createDestination(Session session, String name) throws JMSException {
-        if (isTopic) {
-            return session.createTopic("TOPIC." + name);
-        } else {
-            return session.createQueue("QUEUE." + name);
-        }
-    }
-
-    /**
-     * Returns true if the subscriber is durable.
-     * 
-     * @return isDurableSubscriber
-     */
-    public boolean isDurableSubscriber() {
-        return isTopic && durableName != null;
-    }
-
-    /**
-     * Returns the acknowledgement mode.
-     * 
-     * @return Returns the ackMode.
-     */
-    public int getAckMode() {
-        return ackMode;
-    }
-
-    /**
-     * Sets the acnknowledgement mode.
-     * 
-     * @param ackMode The ackMode to set.
-     */
-    public void setAckMode(int ackMode) {
-        this.ackMode = ackMode;
-    }
-
-    /**
-     * Returns true if the destination is a topic, false if the destination is a
-     * queue.
-     * 
-     * @return Returns the isTopic.
-     */
-    public boolean isTopic() {
-        return isTopic;
-    }
-
-    /**
-     * @param isTopic The isTopic to set.
-     */
-    public void setTopic(boolean isTopic) {
-        this.isTopic = isTopic;
-    }
-
-    /**
-     * Returns the server URI.
-     * 
-     * @return Returns the serverUri.
-     */
-    public String getServerUri() {
-        return serverUri;
-    }
-
-    /**
-     * Sets the server URI.
-     * 
-     * @param serverUri - the server URI to set.
-     */
-    public void setServerUri(String serverUri) {
-        this.serverUri = serverUri;
-    }
-
-    /**
-     * Return true if the session is transacted.
-     * 
-     * @return Returns the transacted.
-     */
-    public boolean isTransacted() {
-        return transacted;
-    }
-
-    /**
-     * Sets the session to be transacted.
-     * 
-     * @param transacted
-     */
-    public void setTransacted(boolean transacted) {
-        this.transacted = transacted;
-        if (transacted) {
-            setAckMode(Session.SESSION_TRANSACTED);
-        }
-    }
-
-    /**
-     * Returns the delivery mode.
-     * 
-     * @return deliveryMode
-     */
-    public int getDeliveryMode() {
-        return deliveryMode;
-    }
-
-    /**
-     * Sets the delivery mode.
-     * 
-     * @param deliveryMode
-     */
-    public void setDeliveryMode(int deliveryMode) {
-        this.deliveryMode = deliveryMode;
-    }
-
-    /**
-     * Returns the client id.
-     * 
-     * @return clientID
-     */
-    public String getClientID() {
-        return clientID;
-    }
-
-    /**
-     * Sets the client id.
-     * 
-     * @param clientID
-     */
-    public void setClientID(String clientID) {
-        this.clientID = clientID;
-    }
-
-    /**
-     * Returns the durable name of the provider.
-     * 
-     * @return durableName
-     */
-    public String getDurableName() {
-        return durableName;
-    }
-
-    /**
-     * Sets the durable name of the provider.
-     * 
-     * @param durableName
-     */
-    public void setDurableName(String durableName) {
-        this.durableName = durableName;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
deleted file mode 100755
index 22499c5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/**
- * 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.test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.AssertionFailedError;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public abstract class JmsSendReceiveTestSupport extends TestSupport implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTestSupport.class);
-
-    protected int messageCount = 100;
-    protected String[] data;
-    protected Session session;
-    protected Session consumeSession;
-    protected MessageConsumer consumer;
-    protected MessageProducer producer;
-    protected Destination consumerDestination;
-    protected Destination producerDestination;
-    protected List<Message> messages = createConcurrentList();
-    protected boolean topic = true;
-    protected boolean durable;
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected final Object lock = new Object();
-    protected boolean verbose;
-    protected boolean useSeparateSession;
-    protected boolean largeMessages;
-    protected int largeMessageLoopSize = 4 * 1024;
-
-    /*
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        String temp = System.getProperty("messageCount");
-
-        if (temp != null) {
-            int i = Integer.parseInt(temp);
-            if (i > 0) {
-                messageCount = i;
-            }
-        }
-
-        LOG.info("Message count for test case is: " + messageCount);
-        data = new String[messageCount];
-        for (int i = 0; i < messageCount; i++) {
-            data[i] = createMessageText(i);
-        }
-    }
-
-    protected String createMessageText(int i) {
-        if (largeMessages) {
-            return createMessageBodyText();
-        } else {
-            return "Text for message: " + i + " at " + new Date();
-        }
-    }
-
-    protected String createMessageBodyText() {
-        StringBuffer buffer = new StringBuffer();
-        for (int i = 0; i < largeMessageLoopSize; i++) {
-            buffer.append("0123456789");
-        }
-        return buffer.toString();
-    }
-
-    /**
-     * Test if all the messages sent are being received.
-     * 
-     * @throws Exception
-     */
-    public void testSendReceive() throws Exception {
-
-        Thread.sleep(1000);
-        messages.clear();
-
-        for (int i = 0; i < data.length; i++) {
-            Message message = createMessage(i);
-            configureMessage(message);
-            if (verbose) {
-                LOG.info("About to send a message: " + message + " with text: " + data[i]);
-            }
-            sendMessage(i, message);
-        }
-
-        assertMessagesAreReceived();
-        LOG.info("" + data.length + " messages(s) received, closing down connections");
-    }
-    
-    protected void sendMessage(int index, Message message) throws Exception {
-    	producer.send(producerDestination, message);
-    }
-
-    protected Message createMessage(int index) throws JMSException {
-        Message message = session.createTextMessage(data[index]);
-        return message;
-    }
-
-    /**
-     * A hook to allow the message to be configured such as adding extra headers
-     * 
-     * @throws JMSException
-     */
-    protected void configureMessage(Message message) throws JMSException {
-    }
-
-    /**
-     * Waits to receive the messages and performs the test if all messages have
-     * been received and are in sequential order.
-     * 
-     * @throws JMSException
-     */
-    protected void assertMessagesAreReceived() throws JMSException {
-        waitForMessagesToBeDelivered();
-        assertMessagesReceivedAreValid(messages);
-    }
-
-    /**
-     * Tests if the messages have all been received and are in sequential order.
-     * 
-     * @param receivedMessages
-     * @throws JMSException
-     */
-    protected void assertMessagesReceivedAreValid(List<Message> receivedMessages) throws JMSException {
-        List<Object> copyOfMessages = Arrays.asList(receivedMessages.toArray());
-        int counter = 0;
-
-        if (data.length != copyOfMessages.size()) {
-            for (Iterator<Object> iter = copyOfMessages.iterator(); iter.hasNext();) {
-                Object message = iter.next();
-                LOG.info("<== " + counter++ + " = " + message);
-            }
-        }
-
-        assertEquals("Invalid number of messages received", data.length, receivedMessages.size());
-
-        for (int i = 0; i < data.length; i++) {
-            Message received = receivedMessages.get(i);
-            try {
-                assertMessageValid(i, received);
-            } catch (AssertionFailedError e) {
-                for (int j = 0; j < data.length; j++) {
-                    Message m = receivedMessages.get(j);
-                    System.out.println(j+" => "+m.getJMSMessageID());
-                }
-                throw e;
-            }
-        }
-    }
-
-    protected void assertMessageValid(int index, Message message) throws JMSException {
-        TextMessage textMessage = (TextMessage)message;
-        String text = textMessage.getText();
-
-        if (verbose) {
-            LOG.info("Received Text: " + text);
-        }
-
-        assertEquals("Message: " + index, data[index], text);
-    }
-
-    /**
-     * Waits for the messages to be delivered or when the wait time has been
-     * reached.
-     */
-    protected void waitForMessagesToBeDelivered() {
-        long maxWaitTime = 60000;
-        long waitTime = maxWaitTime;
-        long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
-
-        synchronized (lock) {
-            while (messages.size() < data.length && waitTime >= 0) {
-                try {
-                    lock.wait(200);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-
-                waitTime = maxWaitTime - (System.currentTimeMillis() - start);
-            }
-        }
-    }
-
-    /**
-     * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
-     */
-    public synchronized void onMessage(Message message) {
-        consumeMessage(message, messages);
-    }
-
-    /**
-     * Consumes a received message.
-     * 
-     * @param message - a newly received message.
-     * @param messageList - list containing the received messages.
-     */
-    protected void consumeMessage(Message message, List<Message> messageList) {
-        if (verbose) {
-            LOG.info("Received message: " + message);
-        }
-
-        messageList.add(message);
-
-        if (messageList.size() >= data.length) {
-            synchronized (lock) {
-                lock.notifyAll();
-            }
-        }
-    }
-
-    /**
-     * Creates a synchronized list.
-     * 
-     * @return a synchronized view of the specified list.
-     */
-    protected List<Message> createConcurrentList() {
-        return Collections.synchronizedList(new ArrayList<Message>());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
deleted file mode 100755
index feff243..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.test;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveTest.class);
-
-    protected Connection connection;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connectionFactory = createConnectionFactory();
-        connection = createConnection();
-        if (durable) {
-            connection.setClientID(getClass().getName());
-        }
-
-        LOG.info("Created connection: " + connection);
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumeSession = createConsumerSession();
-
-        LOG.info("Created session: " + session);
-        LOG.info("Created consumeSession: " + consumeSession);
-        producer = session.createProducer(null);
-        producer.setDeliveryMode(deliveryMode);
-
-        LOG.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
-
-        if (topic) {
-            consumerDestination = session.createTopic(getConsumerSubject());
-            producerDestination = session.createTopic(getProducerSubject());
-        } else {
-            consumerDestination = session.createQueue(getConsumerSubject());
-            producerDestination = session.createQueue(getProducerSubject());
-        }
-
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
-        consumer = createConsumer();
-        consumer.setMessageListener(this);
-        startConnection();
-
-        LOG.info("Created connection: " + connection);
-    }
-
-    protected void startConnection() throws JMSException {
-        connection.start();
-    }
-
-    protected void tearDown() throws Exception {
-        LOG.info("Dumping stats...");
-        // TODO
-        // connectionFactory.getFactoryStats().dump(new IndentPrinter());
-
-        LOG.info("Closing down connection");
-
-        /** TODO we should be able to shut down properly */
-        session.close();
-        connection.close();
-    }
-
-    /**
-     * Creates a session.
-     * 
-     * @return session
-     * @throws JMSException
-     */
-    protected Session createConsumerSession() throws JMSException {
-        if (useSeparateSession) {
-            return connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        } else {
-            return session;
-        }
-    }
-
-    /**
-     * Creates a durable suscriber or a consumer.
-     * 
-     * @return MessageConsumer - durable suscriber or consumer.
-     * @throws JMSException
-     */
-    protected MessageConsumer createConsumer() throws JMSException {
-        if (durable) {
-            LOG.info("Creating durable consumer");
-            return consumeSession.createDurableSubscriber((Topic)consumerDestination, getName());
-        }
-        return consumeSession.createConsumer(consumerDestination);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java
deleted file mode 100644
index 3a1e9bf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.test;
-
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.security.SimpleSecurityBrokerSystemTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.class);
-
-    protected String userName = "James";
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory answer = super.createConnectionFactory();
-        answer.setUserName(userName);
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.setPopulateJMSXUserID(true);
-        super.configureBroker(answer);
-    }
-
-    protected void assertMessagesReceivedAreValid(List receivedMessages) throws JMSException {
-        super.assertMessagesReceivedAreValid(receivedMessages);
-
-        // lets assert that the user ID is set
-        for (Iterator iter = receivedMessages.iterator(); iter.hasNext();) {
-            Message message = (Message)iter.next();
-            String userID = message.getStringProperty("JMSXUserID");
-
-            LOG.info("Received message with userID: " + userID);
-
-            assertEquals("JMSXUserID header", userName, userID);
-        }
-    }
-
-    public void testSpoofedJMSXUserIdIsIgnored() throws Exception {
-        Thread.sleep(1000);
-        messages.clear();
-
-        for (int i = 0; i < data.length; i++) {
-            Message message = createMessage(i);
-            configureMessage(message);
-            message.setStringProperty("JMSXUserID", "spoofedId");
-            if (verbose) {
-                LOG.info("About to send a message: " + message + " with text: " + data[i]);
-            }
-            sendMessage(i, message);
-        }
-        assertMessagesAreReceived();
-        LOG.info("" + data.length + " messages(s) received, closing down connections");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java
deleted file mode 100644
index 78a7f6f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.test;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-
-/**
- * 
- */
-public class JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    
-
-    protected void configureMessage(Message message) throws JMSException {
-        message.setByteProperty("dummy", (byte) 33);
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        return receiveSession.createConsumer(consumerDestination, "dummy = 33", false);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java
deleted file mode 100644
index 6bd92df..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * 
- */
-public class JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-
-    protected BrokerService broker;
-    protected String bindAddress = "tcp://localhost:61616";
-
-    /**
-     * Sets up a test where the producer and consumer have their own connection.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    /**
-     * Factory method to create a new broker
-     * 
-     * @throws Exception
-     */
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        configureBroker(answer);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureBroker(BrokerService answer) throws Exception {
-        answer.addConnector(bindAddress);
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(bindAddress);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java
deleted file mode 100755
index 21a3575..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.test;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JmsTopicSendReceiveWithTwoConnectionsTest.class);
-
-    protected Connection sendConnection;
-    protected Connection receiveConnection;
-    protected Session receiveSession;
-
-    /**
-     * Sets up a test where the producer and consumer have their own connection.
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connectionFactory = createConnectionFactory();
-
-        LOG.info("Creating send connection");
-        sendConnection = createSendConnection();
-        LOG.info("Starting send connection");
-        sendConnection.start();
-
-        LOG.info("Creating receive connection");
-        receiveConnection = createReceiveConnection();
-        LOG.info("Starting receive connection");
-        receiveConnection.start();
-
-        LOG.info("Created sendConnection: " + sendConnection);
-        LOG.info("Created receiveConnection: " + receiveConnection);
-
-        session = sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        receiveSession = receiveConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        LOG.info("Created sendSession: " + session);
-        LOG.info("Created receiveSession: " + receiveSession);
-
-        producer = session.createProducer(null);
-        producer.setDeliveryMode(deliveryMode);
-
-        LOG.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
-
-        if (topic) {
-            consumerDestination = session.createTopic(getConsumerSubject());
-            producerDestination = session.createTopic(getProducerSubject());
-        } else {
-            consumerDestination = session.createQueue(getConsumerSubject());
-            producerDestination = session.createQueue(getProducerSubject());
-        }
-
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
-
-        consumer = createConsumer();
-        consumer.setMessageListener(this);
-
-        LOG.info("Started connections");
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        return receiveSession.createConsumer(consumerDestination);
-    }
-
-    /*
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        session.close();
-        receiveSession.close();
-        sendConnection.close();
-        receiveConnection.close();
-    }
-
-    /**
-     * Creates a connection.
-     * 
-     * @return Connection
-     * @throws Exception
-     */
-    protected Connection createReceiveConnection() throws Exception {
-        return createConnection();
-    }
-
-    /**
-     * Creates a connection.
-     * 
-     * @return Connection
-     * @throws Exception
-     */
-    protected Connection createSendConnection() throws Exception {
-        return createConnection();
-    }
-
-    /**
-     * Creates an ActiveMQConnectionFactory.
-     * 
-     * @see org.apache.activemq.test.TestSupport#createConnectionFactory()
-     */
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java
deleted file mode 100644
index 4dc0088..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.test;
-
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport;
-import org.apache.activemq.broker.jmx.PurgeTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TemporaryDestinationToFromNameTest extends EmbeddedBrokerAndConnectionTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TemporaryDestinationToFromNameTest.class);
-
-    public void testCreateTemporaryQueueThenCreateAQueueFromItsName() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        Queue tempQueue = session.createTemporaryQueue();
-        String name = tempQueue.getQueueName();
-        LOG.info("Created queue named: " + name);
-
-        Queue createdQueue = session.createQueue(name);
-
-        assertEquals("created queue not equal to temporary queue", tempQueue, createdQueue);
-    }
-
-    public void testCreateTemporaryTopicThenCreateATopicFromItsName() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        Topic tempTopic = session.createTemporaryTopic();
-        String name = tempTopic.getTopicName();
-        LOG.info("Created topic named: " + name);
-
-        Topic createdTopic = session.createTopic(name);
-
-        assertEquals("created topic not equal to temporary topic", tempTopic, createdTopic);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java
deleted file mode 100755
index a73bc40..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * 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.test;
-
-import java.io.File;
-import java.lang.reflect.Array;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Useful base class for unit test cases
- * 
- * 
- */
-public abstract class TestSupport extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(TestSupport.class);
-    
-    protected ActiveMQConnectionFactory connectionFactory;
-    protected boolean topic = true;
-
-    public TestSupport() {
-        super();
-    }
-
-    public TestSupport(String name) {
-        super(name);
-    }
-
-    /**
-     * Creates an ActiveMQMessage.
-     * 
-     * @return ActiveMQMessage
-     */
-    protected ActiveMQMessage createMessage() {
-        return new ActiveMQMessage();
-    }
-
-    /**
-     * Creates a destination.
-     * 
-     * @param subject - topic or queue name.
-     * @return Destination - either an ActiveMQTopic or ActiveMQQUeue.
-     */
-    protected Destination createDestination(String subject) {
-        if (topic) {
-            return new ActiveMQTopic(subject);
-        } else {
-            return new ActiveMQQueue(subject);
-        }
-    }
-
-    /**
-     * Tests if firstSet and secondSet are equal.
-     * 
-     * @param messsage - string to be displayed when the assertion fails.
-     * @param firstSet[] - set of messages to be compared with its counterpart
-     *                in the secondset.
-     * @param secondSet[] - set of messages to be compared with its counterpart
-     *                in the firstset.
-     * @throws JMSException
-     */
-    protected void assertTextMessagesEqual(Message[] firstSet, Message[] secondSet) throws JMSException {
-        assertTextMessagesEqual("", firstSet, secondSet);
-    }
-
-    /**
-     * Tests if firstSet and secondSet are equal.
-     * 
-     * @param messsage - string to be displayed when the assertion fails.
-     * @param firstSet[] - set of messages to be compared with its counterpart
-     *                in the secondset.
-     * @param secondSet[] - set of messages to be compared with its counterpart
-     *                in the firstset.
-     */
-    protected void assertTextMessagesEqual(String messsage, Message[] firstSet, Message[] secondSet) throws JMSException {
-        assertEquals("Message count does not match: " + messsage, firstSet.length, secondSet.length);
-
-        for (int i = 0; i < secondSet.length; i++) {
-            TextMessage m1 = (TextMessage)firstSet[i];
-            TextMessage m2 = (TextMessage)secondSet[i];
-            assertTextMessageEqual("Message " + (i + 1) + " did not match : ", m1, m2);
-        }
-    }
-
-    /**
-     * Tests if m1 and m2 are equal.
-     * 
-     * @param m1 - message to be compared with m2.
-     * @param m2 - message to be compared with m1.
-     * @throws JMSException
-     */
-    protected void assertEquals(TextMessage m1, TextMessage m2) throws JMSException {
-        assertEquals("", m1, m2);
-    }
-
-    /**
-     * Tests if m1 and m2 are equal.
-     * 
-     * @param message - string to be displayed when the assertion fails.
-     * @param m1 - message to be compared with m2.
-     * @param m2 - message to be compared with m1.
-     */
-    protected void assertTextMessageEqual(String message, TextMessage m1, TextMessage m2) throws JMSException {
-        assertFalse(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1 == null ^ m2 == null);
-
-        if (m1 == null) {
-            return;
-        }
-
-        assertEquals(message, m1.getText(), m2.getText());
-    }
-
-    /**
-     * Tests if m1 and m2 are equal.
-     * 
-     * @param m1 - message to be compared with m2.
-     * @param m2 - message to be compared with m1.
-     * @throws JMSException
-     */
-    protected void assertEquals(Message m1, Message m2) throws JMSException {
-        assertEquals("", m1, m2);
-    }
-
-    /**
-     * Tests if m1 and m2 are equal.
-     * 
-     * @param message - error message.
-     * @param m1 - message to be compared with m2.
-     * @param m2 -- message to be compared with m1.
-     */
-    protected void assertEquals(String message, Message m1, Message m2) throws JMSException {
-        assertFalse(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1 == null ^ m2 == null);
-
-        if (m1 == null) {
-            return;
-        }
-
-        assertTrue(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1.getClass() == m2.getClass());
-
-        if (m1 instanceof TextMessage) {
-            assertTextMessageEqual(message, (TextMessage)m1, (TextMessage)m2);
-        } else {
-            assertEquals(message, m1, m2);
-        }
-    }
-    
-    /**
-     * Test if base directory contains spaces
-     */
-    protected void assertBaseDirectoryContainsSpaces() {
-    	assertFalse("Base directory cannot contain spaces.", new File(System.getProperty("basedir", ".")).getAbsoluteFile().toString().contains(" "));
-    }
-
-    /**
-     * Creates an ActiveMQConnectionFactory.
-     * 
-     * @return ActiveMQConnectionFactory
-     * @throws Exception
-     */
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-    }
-
-    /**
-     * Factory method to create a new connection.
-     * 
-     * @return connection
-     * @throws Exception
-     */
-    protected Connection createConnection() throws Exception {
-        return getConnectionFactory().createConnection();
-    }
-
-    /**
-     * Creates an ActiveMQ connection factory.
-     * 
-     * @return connectionFactory
-     * @throws Exception
-     */
-    public ActiveMQConnectionFactory getConnectionFactory() throws Exception {
-        if (connectionFactory == null) {
-            connectionFactory = createConnectionFactory();
-            assertTrue("Should have created a connection factory!", connectionFactory != null);
-        }
-
-        return connectionFactory;
-    }
-
-    /**
-     * Returns the consumer subject.
-     * 
-     * @return String
-     */
-    protected String getConsumerSubject() {
-        return getSubject();
-    }
-
-    /**
-     * Returns the producer subject.
-     * 
-     * @return String
-     */
-    protected String getProducerSubject() {
-        return getSubject();
-    }
-
-    /**
-     * Returns the subject.
-     * 
-     * @return String
-     */
-    protected String getSubject() {
-        return getClass().getName() + "." + getName();
-    }
-
-    protected void assertArrayEqual(String message, Object[] expected, Object[] actual) {
-        assertEquals(message + ". Array length", expected.length, actual.length);
-        for (int i = 0; i < expected.length; i++) {
-            assertEquals(message + ". element: " + i, expected[i], actual[i]);
-        }
-    }
-
-    protected void assertPrimitiveArrayEqual(String message, Object expected, Object actual) {
-        int length = Array.getLength(expected);
-        assertEquals(message + ". Array length", length, Array.getLength(actual));
-        for (int i = 0; i < length; i++) {
-            assertEquals(message + ". element: " + i, Array.get(expected, i), Array.get(actual, i));
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java
deleted file mode 100644
index aa1c801..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.test.message;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Tests that a Message can have nested Map and List properties attached.
- * 
- * 
- */
-public class NestedMapAndListPropertyTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(NestedMapAndListPropertyTest.class);
-
-    protected void assertMessageValid(int index, Message message) throws JMSException {
-        Object value = message.getObjectProperty("textField");
-        assertEquals("textField", data[index], value);
-
-        Map map = (Map)message.getObjectProperty("mapField");
-        assertNotNull(map);
-        assertEquals("mapField.a", "foo", map.get("a"));
-        assertEquals("mapField.b", new Integer(23), map.get("b"));
-        assertEquals("mapField.c", new Long(45), map.get("c"));
-
-        value = map.get("d");
-        assertTrue("mapField.d should be a Map", value instanceof Map);
-        map = (Map)value;
-
-        assertEquals("mapField.d.x", "abc", map.get("x"));
-        value = map.get("y");
-        assertTrue("mapField.d.y is a List", value instanceof List);
-        List list = (List)value;
-        LOG.debug("mapField.d.y: " + list);
-        assertEquals("listField.size", 3, list.size());
-
-        LOG.debug("Found map: " + map);
-
-        list = (List)message.getObjectProperty("listField");
-        LOG.debug("listField: " + list);
-        assertEquals("listField.size", 3, list.size());
-        assertEquals("listField[0]", "a", list.get(0));
-        assertEquals("listField[1]", "b", list.get(1));
-        assertEquals("listField[2]", "c", list.get(2));
-        assertEquals("JohnDoe", message.getStringProperty("JMSXUserID"));
-    }
-
-    protected Message createMessage(int index) throws JMSException {
-        Message answer = session.createMessage();
-
-        answer.setStringProperty("textField", data[index]);
-
-        Map<String, Object> grandChildMap = new HashMap<String, Object>();
-        grandChildMap.put("x", "abc");
-        grandChildMap.put("y", Arrays.asList(new Object[] {"a", "b", "c"}));
-
-        Map<String, Object> nestedMap = new HashMap<String, Object>();
-        nestedMap.put("a", "foo");
-        nestedMap.put("b", new Integer(23));
-        nestedMap.put("c", new Long(45));
-        nestedMap.put("d", grandChildMap);
-
-        answer.setObjectProperty("mapField", nestedMap);
-        answer.setObjectProperty("listField", Arrays.asList(new Object[] {"a", "b", "c"}));
-        answer.setStringProperty("JMSXUserID", "JohnDoe");
-
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java
deleted file mode 100644
index 985d0dd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.test.message;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class NestedMapMessageTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(NestedMapMessageTest.class);
-
-    protected void assertMessageValid(int index, Message message) throws JMSException {
-        assertTrue("Should be a MapMessage: " + message, message instanceof MapMessage);
-
-        MapMessage mapMessage = (MapMessage)message;
-
-        Object value = mapMessage.getObject("textField");
-        assertEquals("textField", data[index], value);
-
-        Map map = (Map)mapMessage.getObject("mapField");
-        assertNotNull(map);
-        assertEquals("mapField.a", "foo", map.get("a"));
-        assertEquals("mapField.b", Integer.valueOf(23), map.get("b"));
-        assertEquals("mapField.c", Long.valueOf(45), map.get("c"));
-
-        value = map.get("d");
-        assertTrue("mapField.d should be a Map", value instanceof Map);
-        map = (Map)value;
-
-        assertEquals("mapField.d.x", "abc", map.get("x"));
-        value = map.get("y");
-        assertTrue("mapField.d.y is a List", value instanceof List);
-        List list = (List)value;
-        LOG.debug("mapField.d.y: " + list);
-        assertEquals("listField.size", 3, list.size());
-
-        LOG.debug("Found map: " + map);
-
-        list = (List)mapMessage.getObject("listField");
-        LOG.debug("listField: " + list);
-        assertEquals("listField.size", 3, list.size());
-        assertEquals("listField[0]", "a", list.get(0));
-        assertEquals("listField[1]", "b", list.get(1));
-        assertEquals("listField[2]", "c", list.get(2));
-    }
-
-    protected Message createMessage(int index) throws JMSException {
-        MapMessage answer = session.createMapMessage();
-
-        answer.setString("textField", data[index]);
-
-        Map<String, Object> grandChildMap = new HashMap<String, Object>();
-        grandChildMap.put("x", "abc");
-        grandChildMap.put("y", Arrays.asList(new Object[] {"a", "b", "c"}));
-
-        Map<String, Object> nestedMap = new HashMap<String, Object>();
-        nestedMap.put("a", "foo");
-        nestedMap.put("b", Integer.valueOf(23));
-        nestedMap.put("c", Long.valueOf(45));
-        nestedMap.put("d", grandChildMap);
-
-        answer.setObject("mapField", nestedMap);
-        answer.setObject("listField", Arrays.asList(new Object[] {"a", "b", "c"}));
-
-        return answer;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java
deleted file mode 100644
index 98f547c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.test.retroactive;
-
-import javax.jms.MessageListener;
-
-import org.apache.activemq.broker.region.policy.MessageQuery;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * 
- */
-public class DummyMessageQuery implements MessageQuery {
-    
-    public static final int MESSAGE_COUNT = 10;
-    private static final Logger LOG = LoggerFactory.getLogger(DummyMessageQuery.class);
-
-    
-    public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception {
-        LOG.info("Initial query is creating: " + MESSAGE_COUNT + " messages");
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            ActiveMQTextMessage message = new ActiveMQTextMessage();
-            message.setText("Initial message: " + i + " loaded from query");
-            listener.onMessage(message);
-        }
-    }
-
-    public boolean validateUpdate(Message message) {
-        return true;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java
deleted file mode 100644
index 0248109..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.test.retroactive;
-
-/**
- *
- * 
- */
-public class RetroactiveConsumerTestWithDestinationBasedBufferTest extends RetroactiveConsumerTestWithSimpleMessageListTest {
-    protected String getBrokerXml() {
-        return "org/apache/activemq/test/retroactive/activemq-fixed-destination-buffer.xml";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java
deleted file mode 100644
index d34189a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.test.retroactive;
-
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.command.ActiveMQTopic;
-
-/**
- * 
- */
-public class RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest extends RetroactiveConsumerTestWithSimpleMessageListTest {
-    private int counter = 1;
-
-    protected void sendMessage(MessageProducer producer, TextMessage message) throws JMSException {
-        ActiveMQTopic topic = new ActiveMQTopic(destination.getPhysicalName() + "." + (counter++));
-        producer.send(topic, message);
-    }
-
-    protected MessageProducer createProducer() throws JMSException {
-        return session.createProducer(null);
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        return session.createConsumer(new ActiveMQTopic(destination.getPhysicalName() + ".>"));
-    }
-
-    protected String getBrokerXml() {
-        return "org/apache/activemq/test/retroactive/activemq-lastimage-policy.xml";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java
deleted file mode 100644
index e4de13e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.test.retroactive;
-
-import java.net.URI;
-import java.util.Date;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.test.TemporaryDestinationToFromNameTest;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class RetroactiveConsumerTestWithSimpleMessageListTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(RetroactiveConsumerTestWithSimpleMessageListTest.class);
-
-    protected int messageCount = 20;
-    protected Connection connection;
-    protected Session session;
-
-    public void testSendThenConsume() throws Exception {
-
-        // lets some messages
-        connection = createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = createProducer();
-        for (int i = 0; i < messageCount; i++) {
-            TextMessage message = session.createTextMessage("Message: " + i + " sent at: " + new Date());
-            sendMessage(producer, message);
-        }
-        producer.close();
-        session.close();
-        connection.close();
-
-        connection = createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer consumer = createConsumer();
-        MessageIdList listener = new MessageIdList();
-        consumer.setMessageListener(listener);
-        listener.waitForMessagesToArrive(messageCount);
-        listener.assertMessagesReceived(messageCount);
-
-    }
-
-    protected void setUp() throws Exception {
-        useTopic = true;
-        bindAddress = "vm://localhost";
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        if (session != null) {
-            session.close();
-            session = null;
-        }
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(bindAddress);
-        answer.setUseRetroactiveConsumer(true);
-        return answer;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        String uri = getBrokerXml();
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-    protected void startBroker() throws Exception {
-        // broker already started by XBean
-    }
-
-    protected String getBrokerXml() {
-        return "org/apache/activemq/test/retroactive/activemq-fixed-buffer.xml";
-    }
-
-    protected MessageProducer createProducer() throws JMSException {
-        return session.createProducer(destination);
-    }
-
-    protected void sendMessage(MessageProducer producer, TextMessage message) throws JMSException {
-        producer.send(message);
-    }
-
-    protected MessageConsumer createConsumer() throws JMSException {
-        return session.createConsumer(destination);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java
deleted file mode 100644
index bb99b5d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.test.retroactive;
-
-/**
- *
- * 
- */
-public class RetroactiveConsumerTestWithTimePolicyTest extends RetroactiveConsumerTestWithSimpleMessageListTest {
-    protected String getBrokerXml() {
-        return "org/apache/activemq/test/retroactive/activemq-timed-policy.xml";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java
deleted file mode 100644
index 4aa65b6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * 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.test.retroactive;
-
-import java.net.URI;
-import java.util.Date;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.usecases.CreateLotsOfTemporaryQueuesTest;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class RetroactiveConsumerWithMessageQueryTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(RetroactiveConsumerWithMessageQueryTest.class);
-    
-    protected int messageCount = 20;
-    protected Connection connection;
-    protected Session session;
-
-    public void testConsumeAndReceiveInitialQueryBeforeUpdates() throws Exception {
-
-        // lets some messages
-        connection = createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        connection.start();
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageIdList listener = new MessageIdList();
-        listener.setVerbose(true);
-        consumer.setMessageListener(listener);
-
-        MessageProducer producer = session.createProducer(destination);
-        int updateMessageCount = messageCount - DummyMessageQuery.MESSAGE_COUNT;
-        for (int i = 0; i < updateMessageCount; i++) {
-            TextMessage message = session.createTextMessage("Update Message: " + i + " sent at: " + new Date());
-            producer.send(message);
-        }
-        producer.close();
-        LOG.info("Sent: " + updateMessageCount + " update messages");
-
-        listener.assertMessagesReceived(messageCount);
-    }
-
-    protected void setUp() throws Exception {
-        useTopic = true;
-        bindAddress = "vm://localhost";
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        if (session != null) {
-            session.close();
-            session = null;
-        }
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(bindAddress);
-        answer.setUseRetroactiveConsumer(true);
-        return answer;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        String uri = getBrokerXml();
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-    protected void startBroker() throws Exception {
-        // broker already started by XBean
-    }
-
-    protected String getBrokerXml() {
-        return "org/apache/activemq/test/retroactive/activemq-message-query.xml";
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java
deleted file mode 100644
index 26725a6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.test.rollback;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jms.core.MessageCreator;
-
-public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(CloseRollbackRedeliveryQueueTest.class);
-
-    protected int numberOfMessagesOnQueue = 1;
-    private Connection connection;
-   
-    public void testVerifySessionCloseRedeliveryWithFailoverTransport() throws Throwable {
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        Message message = consumer.receive(1000);
-        String id = message.getJMSMessageID();
-        assertNotNull(message);
-        LOG.info("got message " + message);
-        // close will rollback the current tx
-        session.close();
-        
-        session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        consumer = session.createConsumer(destination);
-
-        message = consumer.receive(1000);
-        session.commit();
-        assertNotNull(message);
-        assertEquals("redelivered message", id, message.getJMSMessageID());
-        assertEquals(2, message.getLongProperty("JMSXDeliveryCount"));
-    }
-    
-    public void testVerifyConsumerAndSessionCloseRedeliveryWithFailoverTransport() throws Throwable {
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        Message message = consumer.receive(1000);
-        String id = message.getJMSMessageID();
-        assertNotNull(message);
-        LOG.info("got message " + message);
-        consumer.close();
-        session.close();
-        session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        consumer = session.createConsumer(destination);
-
-        message = consumer.receive(1000);
-        session.commit();
-        assertNotNull(message);
-        assertEquals("redelivered message", id, message.getJMSMessageID());
-        assertEquals(2, message.getLongProperty("JMSXDeliveryCount"));
-    }
-
-    public void testVerifyConsumerCloseSessionRollbackRedeliveryWithFailoverTransport() throws Throwable {
-        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        Message message = consumer.receive(1000);
-        String id = message.getJMSMessageID();
-        assertNotNull(message);
-        LOG.info("got message " + message);
-        consumer.close();
-        session.rollback();
-        
-        consumer = session.createConsumer(destination);
-        message = consumer.receive(1000);
-        session.commit();
-        assertNotNull(message);
-        assertEquals("redelivered message", id, message.getJMSMessageID());
-        assertEquals(2, message.getLongProperty("JMSXDeliveryCount"));
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connection = createConnection();
-        connection.start();
-
-        // lets fill the queue up
-        for (int i = 0; i < numberOfMessagesOnQueue; i++) {
-            template.send(createMessageCreator(i));
-        }
-
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        // failover: enables message audit - which could get in the way of redelivery 
-        return new ActiveMQConnectionFactory("failover:" + bindAddress);
-    }
-    
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected MessageCreator createMessageCreator(final int i) {
-        return new MessageCreator() {
-            public Message createMessage(Session session) throws JMSException {
-                TextMessage answer = session.createTextMessage("Message: " + i);
-                answer.setIntProperty("Counter", i);
-                return answer;
-            }
-        };
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java
deleted file mode 100644
index 8fd3457..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.test.rollback;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DelegatingTransactionalMessageListener implements MessageListener {
-    private static final transient Logger LOG = LoggerFactory.getLogger(DelegatingTransactionalMessageListener.class);
-
-    private final MessageListener underlyingListener;
-    private boolean transacted = true;
-    private int ackMode = Session.AUTO_ACKNOWLEDGE;
-    private Session session;
-
-    public DelegatingTransactionalMessageListener(MessageListener underlyingListener, Connection connection, Destination destination) {
-        this.underlyingListener = underlyingListener;
-
-        try {
-            session = connection.createSession(transacted, ackMode);
-            MessageConsumer consumer = session.createConsumer(destination);
-            consumer.setMessageListener(this);
-        } catch (JMSException e) {
-            throw new IllegalStateException("Could not listen to " + destination, e);
-        }
-    }
-
-    public void onMessage(Message message) {
-        try {
-            underlyingListener.onMessage(message);
-            session.commit();
-        } catch (Throwable e) {
-            rollback();
-        }
-    }
-
-    private void rollback() {
-        try {
-            session.rollback();
-        } catch (JMSException e) {
-            LOG.error("Failed to rollback: " + e, e);
-        }
-    }
-
-    public Session getSession() {
-        return session;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java
deleted file mode 100644
index cebe74d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * 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.test.rollback;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.RedeliveryPolicy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jms.core.MessageCreator;
-
-/**
- * 
- */
-public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSupport implements MessageListener {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(RollbacksWhileConsumingLargeQueueTest.class);
-
-    protected int numberOfMessagesOnQueue = 650;
-    private Connection connection;
-    private AtomicInteger deliveryCounter = new AtomicInteger(0);
-    private AtomicInteger ackCounter = new AtomicInteger(0);
-    private CountDownLatch latch;
-    private Throwable failure;
-
-    public void testWithReciever() throws Throwable {
-        latch = new CountDownLatch(numberOfMessagesOnQueue);
-        Session session = connection.createSession(true, 0);
-        MessageConsumer consumer = session.createConsumer(destination);
-
-        long start = System.currentTimeMillis();
-        while ((System.currentTimeMillis() - start) < 1000 * 1000) {
-            if (getFailure() != null) {
-                throw getFailure();
-            }
-
-            // Are we done receiving all the messages.
-            if (ackCounter.get() == numberOfMessagesOnQueue) {
-                return;
-            }
-
-            Message message = consumer.receive(1000);
-            if (message == null) {
-                continue;
-            }
-
-            try {
-                onMessage(message);
-                session.commit();
-            } catch (Throwable e) {
-                session.rollback();
-            }
-        }
-
-        fail("Did not receive all the messages.");
-    }
-
-    public void testWithMessageListener() throws Throwable {
-        latch = new CountDownLatch(numberOfMessagesOnQueue);
-        new DelegatingTransactionalMessageListener(this, connection, destination);
-
-        long start = System.currentTimeMillis();
-        while ((System.currentTimeMillis() - start) < 1000 * 1000) {
-
-            if (getFailure() != null) {
-                throw getFailure();
-            }
-
-            if (latch.await(1, TimeUnit.SECONDS)) {
-                LOG.debug("Received: " + deliveryCounter.get() + "  message(s)");
-                return;
-            }
-
-        }
-
-        fail("Did not receive all the messages.");
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory answer = (ActiveMQConnectionFactory) super.createConnectionFactory();
-        RedeliveryPolicy policy = new RedeliveryPolicy();
-        policy.setMaximumRedeliveries(3);
-        policy.setRedeliveryDelay(0);
-        policy.setInitialRedeliveryDelay(0);
-        policy.setUseExponentialBackOff(false);
-        answer.setRedeliveryPolicy(policy);
-        return answer;
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connection = createConnection();
-        connection.start();
-
-        // lets fill the queue up
-        for (int i = 0; i < numberOfMessagesOnQueue; i++) {
-            template.send(createMessageCreator(i));
-        }
-
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-
-    protected MessageCreator createMessageCreator(final int i) {
-        return new MessageCreator() {
-            public Message createMessage(Session session) throws JMSException {
-                TextMessage answer = session.createTextMessage("Message: " + i);
-                answer.setIntProperty("Counter", i);
-                return answer;
-            }
-        };
-    }
-
-    public void onMessage(Message message) {
-        String msgId = null;
-        String msgText = null;
-
-        try {
-            msgId = message.getJMSMessageID();
-            msgText = ((TextMessage)message).getText();
-        } catch (JMSException e) {
-            setFailure(e);
-        }
-
-        try {
-            assertEquals("Message: " + ackCounter.get(), msgText);
-        } catch (Throwable e) {
-            setFailure(e);
-        }
-
-        int value = deliveryCounter.incrementAndGet();
-        if (value % 2 == 0) {
-            LOG.info("Rolling Back message: " + ackCounter.get() + " id: " + msgId + ", content: " + msgText);
-            throw new RuntimeException("Dummy exception on message: " + value);
-        }
-
-        LOG.info("Received message: " + ackCounter.get() + " id: " + msgId + ", content: " + msgText);
-        ackCounter.incrementAndGet();
-        latch.countDown();
-    }
-
-    public synchronized Throwable getFailure() {
-        return failure;
-    }
-
-    public synchronized void setFailure(Throwable failure) {
-        this.failure = failure;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/thread/PooledTaskRunnerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/thread/PooledTaskRunnerTest.java
deleted file mode 100644
index 0fffdce..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/thread/PooledTaskRunnerTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * 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.thread;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import junit.framework.TestCase;
-
-public class PooledTaskRunnerTest extends TestCase {
-    private ExecutorService executor;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        executor = Executors.newCachedThreadPool(new IgnoreUncaughtExceptionThreadFactory());
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        executor.shutdownNow();
-
-        super.tearDown();
-    }
-
-    public void testNormalBehavior() throws Exception {
-        final CountDownLatch latch = new CountDownLatch( 1 );
-
-        PooledTaskRunner runner = new PooledTaskRunner( executor, new Task() {
-            public boolean iterate() {
-                latch.countDown();
-
-                return false;
-            }
-        }, 1 );
-
-        runner.wakeup();
-
-        assertTrue( latch.await( 1, TimeUnit.SECONDS ) );
-
-        runner.shutdown();
-    }
-
-    
-    public void testWakeupResultsInThreadSafeCalls() throws Exception {
-        
-        ThreadPoolExecutor executor = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 10, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), new ThreadFactory() {
-            public Thread newThread(Runnable runnable) {
-                Thread thread = new Thread(runnable, getName());
-                thread.setDaemon(true);
-                thread.setPriority(Thread.NORM_PRIORITY);
-                return thread;
-            }
-        });
-        final CountDownLatch doneLatch = new CountDownLatch( 100 );
-        final AtomicInteger clashCount = new AtomicInteger();
-        final AtomicInteger count = new AtomicInteger();
-
-
-        final PooledTaskRunner runner = new PooledTaskRunner(executor, new Task() {
-            String threadUnSafeVal = null;
-            public boolean iterate() {
-                if (threadUnSafeVal != null) {
-                    clashCount.incrementAndGet();
-                }
-                threadUnSafeVal = Thread.currentThread().getName();
-                count.incrementAndGet();
-                doneLatch.countDown();
-                if (!threadUnSafeVal.equals(Thread.currentThread().getName())) {
-                    clashCount.incrementAndGet();
-                }
-                threadUnSafeVal = null;
-                return false;
-            }
-        }, 1 );
-
-        Runnable doWakeup = new Runnable() {
-            public void run() {
-                try {
-                    runner.wakeup();
-                } catch (InterruptedException ignored) {
-                }
-            }
-        };
-        
-        final int iterations = 1000;
-        for (int i=0; i< iterations; i++) {
-            if (i%100 == 0) {
-                Thread.sleep(10);
-            }
-            executor.execute(doWakeup);
-        }    
-        
-        doneLatch.await(20, TimeUnit.SECONDS);
-        assertEquals("thread safety clash", 0, clashCount.get());
-        assertTrue("called more than once", count.get() > 1);
-        runner.shutdown();
-    }
-
-    public void testShutsDownAfterRunnerFailure() throws Exception {
-        Future<Object> future = executor.submit( new Callable<Object>() {
-            public Object call() throws Exception {
-                final CountDownLatch latch = new CountDownLatch( 1 );
-
-                PooledTaskRunner runner = new PooledTaskRunner( executor, new Task() {
-                    public boolean iterate() {
-                        latch.countDown();
-
-                        throw new RuntimeException();
-                    }
-                }, 1 );
-
-                runner.wakeup();
-
-                assertTrue( latch.await( 1, TimeUnit.SECONDS ) );
-
-                runner.shutdown();
-
-                return null;
-            }
-        } );
-
-        try {
-            future.get( 5, TimeUnit.SECONDS );
-        } catch( TimeoutException e ) {
-            fail( "TaskRunner did not shut down cleanly" );
-        }
-    }
-    
-    class IgnoreUncaughtExceptionThreadFactory implements ThreadFactory, Thread.UncaughtExceptionHandler {
-        ThreadFactory threadFactory = Executors.defaultThreadFactory();
-        public Thread newThread(Runnable r) {
-            Thread thread = threadFactory.newThread(r);
-            thread.setUncaughtExceptionHandler(this);
-            return thread;
-        }
-        
-        public void uncaughtException(Thread t, Throwable e) {
-            // ignore ie: no printStackTrace that would sully the test console
-         }
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java
deleted file mode 100755
index 7d3c288..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.thread;
-
-import java.util.concurrent.BrokenBarrierException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.CyclicBarrier;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TaskRunnerTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(TaskRunnerTest.class);
-
-    public void testWakeupPooled() throws InterruptedException, BrokenBarrierException {
-        System.setProperty("org.apache.activemq.UseDedicatedTaskRunner", "false");
-        doTestWakeup();
-    }
-
-    public void testWakeupDedicated() throws InterruptedException, BrokenBarrierException {
-        System.setProperty("org.apache.activemq.UseDedicatedTaskRunner", "true");
-        doTestWakeup();
-    }
-
-    /**
-     * Simulate multiple threads queuing work for the TaskRunner. The Task
-     * Runner dequeues the work.
-     * 
-     * @throws InterruptedException
-     * @throws BrokenBarrierException
-     */
-    public void doTestWakeup() throws InterruptedException, BrokenBarrierException {
-
-        final int enqueueCount = 100000;
-        final AtomicInteger iterations = new AtomicInteger(0);
-        final AtomicInteger counter = new AtomicInteger(0);
-        final AtomicInteger queue = new AtomicInteger(0);
-        final CountDownLatch doneCountDownLatch = new CountDownLatch(1);
-
-        TaskRunnerFactory factory = new TaskRunnerFactory();
-        final TaskRunner runner = factory.createTaskRunner(new Task() {
-            public boolean iterate() {
-                if (queue.get() == 0) {
-                    return false;
-                } else {
-                    while (queue.get() > 0) {
-                        queue.decrementAndGet();
-                        counter.incrementAndGet();
-                    }
-                    iterations.incrementAndGet();
-                    if (counter.get() == enqueueCount) {
-                        doneCountDownLatch.countDown();
-                    }
-                    return true;
-                }
-            }
-        }, "Thread Name");
-
-        long start = System.currentTimeMillis();
-        final int workerCount = 5;
-        final CyclicBarrier barrier = new CyclicBarrier(workerCount + 1);
-        for (int i = 0; i < workerCount; i++) {
-            new Thread() {
-                public void run() {
-                    try {
-                        barrier.await();
-                        for (int i = 0; i < enqueueCount / workerCount; i++) {
-                            queue.incrementAndGet();
-                            runner.wakeup();
-                            yield();
-                        }
-                    } catch (BrokenBarrierException e) {
-                    } catch (InterruptedException e) {
-                    }
-                }
-            }.start();
-        }
-        barrier.await();
-
-        boolean b = doneCountDownLatch.await(30, TimeUnit.SECONDS);
-        long end = System.currentTimeMillis();
-        LOG.info("Iterations: " + iterations.get());
-        LOG.info("counter: " + counter.get());
-        LOG.info("Dequeues/s: " + (1000.0 * enqueueCount / (end - start)));
-        LOG.info("duration: " + ((end - start) / 1000.0));
-        assertTrue(b);
-
-        runner.shutdown();
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(TaskRunnerTest.class);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/QueueClusterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/QueueClusterTest.java
deleted file mode 100755
index 447e2e2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/QueueClusterTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.transport;
-
-/**
- * 
- */
-public class QueueClusterTest extends TopicClusterTest {
-
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-
-    protected int expectedReceiveCount() {
-        return MESSAGE_COUNT * NUMBER_IN_CLUSTER;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java
deleted file mode 100644
index b9f159b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.URI;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.transport.stomp.Stomp;
-import org.apache.activemq.transport.stomp.StompConnection;
-import org.apache.activemq.util.SocketProxy;
-import org.apache.activemq.util.URISupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SoWriteTimeoutTest extends JmsTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(SoWriteTimeoutTest.class);
-    
-    final int receiveBufferSize = 16*1024;
-    public String brokerTransportScheme = "nio";
-    
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.addConnector(brokerTransportScheme + "://localhost:0?transport.soWriteTimeout=1000&transport.sleep=1000&socketBufferSize="+ receiveBufferSize);
-        if ("nio".equals(brokerTransportScheme)) {
-            broker.addConnector("stomp+" + brokerTransportScheme + "://localhost:0?transport.soWriteTimeout=1000&transport.sleep=1000&socketBufferSize=" + receiveBufferSize + "&trace=true");
-        }
-        return broker;
-    }
-    
-    public void initCombosForTestWriteTimeout() {
-        addCombinationValues("brokerTransportScheme", new Object[]{"tcp", "nio"});
-    }
-    
-    public void testWriteTimeout() throws Exception {
-        
-        Destination dest = new ActiveMQQueue("testWriteTimeout");
-        messageTextPrefix = initMessagePrefix(8*1024);
-        sendMessages(dest, 500);
-        
-        URI tcpBrokerUri = URISupport.removeQuery(broker.getTransportConnectors().get(0).getConnectUri());
-        LOG.info("consuming using uri: " + tcpBrokerUri);
-        
-        SocketProxy proxy = new SocketProxy();
-        proxy.setTarget(tcpBrokerUri);
-        proxy.setReceiveBufferSize(receiveBufferSize);
-        proxy.open();
-        
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(proxy.getUrl());
-        Connection c = factory.createConnection();
-        c.start();
-        Session session = c.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = session.createConsumer(dest); 
-        proxy.pause();
-        // writes should back up... writeTimeout will kick in a abort the connection
-        TimeUnit.SECONDS.sleep(10);
-        proxy.goOn();
-        assertNotNull("can receive buffered messages", consumer.receive(500));
-        try {
-            session.commit();
-            fail("expect commit to fail as server has aborted writeTimeout connection");
-        } catch (JMSException expected) {
-        }
-    }
-    
-    public void testWriteTimeoutStompNio() throws Exception {
-        ActiveMQQueue dest = new ActiveMQQueue("testWriteTimeout");
-        messageTextPrefix = initMessagePrefix(8*1024);
-        sendMessages(dest, 500);
-        
-        URI stompBrokerUri = URISupport.removeQuery(broker.getTransportConnectors().get(1).getConnectUri());
-        LOG.info("consuming using uri: " + stompBrokerUri);
-        
-        SocketProxy proxy = new SocketProxy();
-        proxy.setTarget(new URI("tcp://localhost:" + stompBrokerUri.getPort()));
-        proxy.setReceiveBufferSize(receiveBufferSize);
-        proxy.open();
-        
-        StompConnection stompConnection = new StompConnection();
-        stompConnection.open(new Socket("localhost", proxy.getUrl().getPort()));
-        
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + dest.getQueueName() + "\n" + "ack:client\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        
-        // ensure dispatch has started before pause
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-        
-        proxy.pause();
-        
-        // writes should back up... writeTimeout will kick in a abort the connection
-        TimeUnit.SECONDS.sleep(1);
-
-        // see the blocked threads
-        //dumpAllThreads("blocked on write");
-        
-        // abort should be done after this
-        TimeUnit.SECONDS.sleep(4);
-
-        proxy.goOn();
-        
-        // get a buffered message
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-        
-        // verify connection is dead
-        try {
-            for (int i=0; i<10; i++) {
-                stompConnection.send("/queue/" + dest.getPhysicalName(), messageTextPrefix + "ReplyText" + i);
-            }
-            fail("expected send to fail with timeout out connection");
-        } catch (SocketException expected) {
-            LOG.info("got exception on send after timeout: " + expected);
-        }
-    }
-    
-    private String initMessagePrefix(int i) {
-        byte[] content = new byte[i];
-        return new String(content);
-    }
-
-    public static Test suite() {
-        return suite(SoWriteTimeoutTest.class);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java
deleted file mode 100644
index 91df36c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- *
- */
-public class StubCompositeTransport extends StubTransport implements CompositeTransport
-{
-    private List<URI> transportURIs = new ArrayList<URI>();    
-    
-    /**
-     * @see org.apache.activemq.transport.CompositeTransport#add(java.net.URI[])
-     */
-    public void add(boolean rebalance, URI[] uris)
-    {
-        transportURIs.addAll(Arrays.asList(uris));
-    }
-
-    /**
-     * @see org.apache.activemq.transport.CompositeTransport#remove(java.net.URI[])
-     */
-    public void remove(boolean rebalance, URI[] uris)
-    {
-        transportURIs.removeAll(Arrays.asList(uris));
-    }
-
-    public URI[] getTransportURIs()
-    {
-        return transportURIs.toArray(new URI[0]);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java
deleted file mode 100644
index 8fb70ec..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import org.apache.activemq.util.ServiceStopper;
-
-/**
- * 
- * 
- */
-public class StubTransport extends TransportSupport {
-
-    private Queue<Object> queue = new ConcurrentLinkedQueue<Object>();
-    private volatile int receiveCounter;
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-    }
-
-    protected void doStart() throws Exception {
-    }
-
-    public void oneway(Object command) throws IOException {
-        receiveCounter++;
-        queue.add(command);
-    }
-
-    public Queue<Object> getQueue() {
-        return queue;
-    }
-
-    public String getRemoteAddress() {
-        return null;
-    }
-
-    public int getReceiveCounter() {
-        return receiveCounter;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java
deleted file mode 100644
index 8ea2bfe..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.transport;
-
-import java.io.IOException;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-/**
- * 
- * 
- */
-public class StubTransportListener implements TransportListener {
-
-    private Queue commands = new ConcurrentLinkedQueue();
-    private Queue exceptions = new ConcurrentLinkedQueue();
-
-    public Queue getCommands() {
-        return commands;
-    }
-
-    public Queue getExceptions() {
-        return exceptions;
-    }
-
-    public void onCommand(Object command) {
-        commands.add(command);
-    }
-
-    public void onException(IOException error) {
-        exceptions.add(error);
-    }
-
-    public void transportInterupted() {
-    }
-
-    public void transportResumed() {
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
deleted file mode 100755
index 4db7c23..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-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.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TopicClusterTest extends TestCase implements MessageListener {
-    
-    protected static final int MESSAGE_COUNT = 50;
-    protected static final int NUMBER_IN_CLUSTER = 3;
-    private static final Logger LOG = LoggerFactory.getLogger(TopicClusterTest.class);
-    
-    protected Destination destination;
-    protected boolean topic = true;
-    protected AtomicInteger receivedMessageCount = new AtomicInteger(0);
-    protected int deliveryMode = DeliveryMode.NON_PERSISTENT;
-    protected MessageProducer[] producers;
-    protected Connection[] connections;
-    protected List<BrokerService> services = new ArrayList<BrokerService>();
-    protected String groupId;
-    
-    protected void setUp() throws Exception {
-        groupId = "topic-cluster-test-"+System.currentTimeMillis();
-        connections = new Connection[NUMBER_IN_CLUSTER];
-        producers = new MessageProducer[NUMBER_IN_CLUSTER];
-        Destination destination = createDestination();
-        String root = System.getProperty("activemq.store.dir");
-        if (root == null) {
-            root = "target/store";
-        }
-        try {
-            for (int i = 0; i < NUMBER_IN_CLUSTER; i++) {
-
-                System.setProperty("activemq.store.dir", root + "_broker_" + i);
-                connections[i] = createConnection("broker-" + i);
-                connections[i].setClientID("ClusterTest" + i);
-                connections[i].start();
-                Session session = connections[i].createSession(false, Session.AUTO_ACKNOWLEDGE);
-                producers[i] = session.createProducer(destination);
-                producers[i].setDeliveryMode(deliveryMode);
-                MessageConsumer consumer = createMessageConsumer(session, destination);
-                consumer.setMessageListener(this);
-
-            }
-            LOG.info("Sleeping to ensure cluster is fully connected");
-            Thread.sleep(5000);
-        } finally {
-            System.setProperty("activemq.store.dir", root);
-        }
-    }
-
-    protected void tearDown() throws Exception {
-        if (connections != null) {
-            for (int i = 0; i < connections.length; i++) {
-                connections[i].close();
-            }
-        }
-        ServiceStopper stopper = new ServiceStopper();
-        stopper.stopServices(services);
-    }
-
-    protected MessageConsumer createMessageConsumer(Session session, Destination destination) throws JMSException {
-        return session.createConsumer(destination);
-    }
-
-    protected ActiveMQConnectionFactory createGenericClusterFactory(String brokerName) throws Exception {
-        BrokerService container = new BrokerService();
-        container.setBrokerName(brokerName);
-
-        String url = "tcp://localhost:0";
-        TransportConnector connector = container.addConnector(url);
-        connector.setDiscoveryUri(new URI("multicast://default?group="+groupId));
-        container.addNetworkConnector("multicast://default?group="+groupId);
-        container.start();
-
-        services.add(container);
-
-        return new ActiveMQConnectionFactory("vm://" + brokerName);
-    }
-
-    protected int expectedReceiveCount() {
-        return MESSAGE_COUNT * NUMBER_IN_CLUSTER * NUMBER_IN_CLUSTER;
-    }
-
-    protected Connection createConnection(String name) throws Exception {
-        return createGenericClusterFactory(name).createConnection();
-    }
-
-    protected Destination createDestination() {
-        return createDestination(getClass().getName());
-    }
-
-    protected Destination createDestination(String name) {
-        if (topic) {
-            return new ActiveMQTopic(name);
-        } else {
-            return new ActiveMQQueue(name);
-        }
-    }
-
-    /**
-     * @param msg
-     */
-    public void onMessage(Message msg) {
-        // log.info("GOT: " + msg);
-        receivedMessageCount.incrementAndGet();
-        synchronized (receivedMessageCount) {
-            if (receivedMessageCount.get() >= expectedReceiveCount()) {
-                receivedMessageCount.notify();
-            }
-        }
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testSendReceive() throws Exception {
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            TextMessage textMessage = new ActiveMQTextMessage();
-            textMessage.setText("MSG-NO:" + i);
-            for (int x = 0; x < producers.length; x++) {
-                producers[x].send(textMessage);
-            }
-        }
-        synchronized (receivedMessageCount) {
-            if (receivedMessageCount.get() < expectedReceiveCount()) {
-                receivedMessageCount.wait(20000);
-            }
-        }
-        // sleep a little - to check we don't get too many messages
-        Thread.sleep(2000);
-        LOG.info("GOT: " + receivedMessageCount.get());
-        assertEquals("Expected message count not correct", expectedReceiveCount(), receivedMessageCount.get());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java
deleted file mode 100755
index 7b5debe..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.transport;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTest;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-
-public abstract class TransportBrokerTestSupport extends BrokerTest {
-
-    protected TransportConnector connector;
-    private ArrayList<StubConnection> connections = new ArrayList<StubConnection>();
-
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService service = super.createBroker();
-        connector = service.addConnector(getBindLocation());
-        return service;
-    }
-    
-    protected abstract String getBindLocation();
-
-    protected void tearDown() throws Exception {
-        for (Iterator<StubConnection> iter = connections.iterator(); iter.hasNext();) {
-            StubConnection connection = iter.next();
-            connection.stop();
-            iter.remove();
-        }
-        if( connector!=null ) {
-            connector.stop();
-        }
-        super.tearDown();
-    }
-
-    protected URI getBindURI() throws URISyntaxException {
-        return new URI(getBindLocation());
-    }
-
-    protected StubConnection createConnection() throws Exception {
-        URI bindURI = getBindURI();
-        
-        // Note: on platforms like OS X we cannot bind to the actual hostname, so we
-        // instead use the original host name (typically localhost) to bind to 
-        
-        URI actualURI = connector.getServer().getConnectURI();
-        URI connectURI = new URI(actualURI.getScheme(), actualURI.getUserInfo(), bindURI.getHost(), actualURI.getPort(), actualURI.getPath(), actualURI
-                .getQuery(), actualURI.getFragment());
-
-        Transport transport = TransportFactory.connect(connectURI);
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
deleted file mode 100755
index 78dc1e7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import static org.junit.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgentFactory;
-import org.apache.activemq.util.SocketProxy;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.api.Invocation;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.lib.action.CustomAction;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-
-@RunWith(JMock.class)
-public class DiscoveryNetworkReconnectTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DiscoveryNetworkReconnectTest.class);
-    final int maxReconnects = 5;
-    final String groupName = "GroupID-" + "DiscoveryNetworkReconnectTest";
-    final String discoveryAddress = "multicast://default?group=" + groupName + "&initialReconnectDelay=1000";
-    final Semaphore mbeanRegistered = new Semaphore(0);
-    final Semaphore mbeanUnregistered = new Semaphore(0);
-    BrokerService brokerA, brokerB;
-    Mockery context;
-    ManagementContext managementContext;
-    DiscoveryAgent agent;
-    SocketProxy proxy;
-    
-    // ignore the hostname resolution component as this is machine dependent
-    class NetworkBridgeObjectNameMatcher<T> extends BaseMatcher<T> {
-        T name;
-        NetworkBridgeObjectNameMatcher(T o) {
-            name = o;
-        }
-        
-        public boolean matches(Object arg0) {
-            ObjectName other = (ObjectName) arg0;
-            ObjectName mine = (ObjectName) name;
-            return other.getKeyProperty("Type").equals(mine.getKeyProperty("Type")) &&
-                other.getKeyProperty("NetworkConnectorName").equals(mine.getKeyProperty("NetworkConnectorName"));
-        }
-
-        public void describeTo(Description arg0) {
-            arg0.appendText(this.getClass().getName());
-        }       
-    }
-    
-    @Before
-    public void setUp() throws Exception {
-        context = new JUnit4Mockery() {{
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }};
-        brokerA = new BrokerService();
-        brokerA.setBrokerName("BrokerA");
-        configure(brokerA);
-        brokerA.addConnector("tcp://localhost:0");
-        brokerA.start();
-        brokerA.waitUntilStarted();
-        
-        proxy = new SocketProxy(brokerA.getTransportConnectors().get(0).getConnectUri());
-        managementContext = context.mock(ManagementContext.class);
-        
-        context.checking(new Expectations(){{
-            allowing (managementContext).getJmxDomainName(); will (returnValue("Test"));
-            allowing (managementContext).start();
-            allowing (managementContext).isCreateConnector();
-            allowing (managementContext).stop();
-            allowing (managementContext).isConnectorStarted();
-            
-            // expected MBeans
-            allowing (managementContext).registerMBean(with(any(Object.class)), with(equal(
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=Broker"))));
-            allowing (managementContext).registerMBean(with(any(Object.class)), with(equal(
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=NetworkConnector,NetworkConnectorName=NC"))));
-            allowing (managementContext).registerMBean(with(any(Object.class)), with(equal(            
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=Topic,Destination=ActiveMQ.Advisory.Connection"))));
-            allowing (managementContext).registerMBean(with(any(Object.class)), with(equal(
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=Topic,Destination=ActiveMQ.Advisory.NetworkBridge"))));
-            allowing (managementContext).registerMBean(with(any(Object.class)), with(equal(            
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=jobScheduler,jobSchedulerName=JMS"))));
-            
-            atLeast(maxReconnects - 1).of (managementContext).registerMBean(with(any(Object.class)), with(new NetworkBridgeObjectNameMatcher<ObjectName>(
-                        new ObjectName("Test:BrokerName=BrokerNC,Type=NetworkBridge,NetworkConnectorName=NC,Name=localhost/127.0.0.1_" 
-                            + proxy.getUrl().getPort())))); will(new CustomAction("signal register network mbean") {
-                                public Object invoke(Invocation invocation) throws Throwable {
-                                    LOG.info("Mbean Registered: " + invocation.getParameter(0));
-                                    mbeanRegistered.release();
-                                    return new ObjectInstance((ObjectName)invocation.getParameter(0), "dscription");
-                                }
-                            });
-            atLeast(maxReconnects - 1).of (managementContext).unregisterMBean(with(new NetworkBridgeObjectNameMatcher<ObjectName>(
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=NetworkBridge,NetworkConnectorName=NC,Name=localhost/127.0.0.1_" 
-                            + proxy.getUrl().getPort())))); will(new CustomAction("signal unregister network mbean") {
-                                public Object invoke(Invocation invocation) throws Throwable {
-                                    LOG.info("Mbean Unregistered: " + invocation.getParameter(0));
-                                    mbeanUnregistered.release();
-                                    return null;
-                                }
-                            });
-           
-            allowing (managementContext).unregisterMBean(with(equal(
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=Broker"))));
-            allowing (managementContext).unregisterMBean(with(equal(
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=NetworkConnector,NetworkConnectorName=NC"))));
-            allowing (managementContext).unregisterMBean(with(equal(            
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=Topic,Destination=ActiveMQ.Advisory.Connection"))));
-            allowing (managementContext).unregisterMBean(with(equal(
-                    new ObjectName("Test:BrokerName=BrokerNC,Type=Topic,Destination=ActiveMQ.Advisory.NetworkBridge"))));
-        }});
-        
-        brokerB = new BrokerService();
-        brokerB.setManagementContext(managementContext);
-        brokerB.setBrokerName("BrokerNC");
-        configure(brokerB);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        brokerA.stop();
-        brokerA.waitUntilStopped();
-        brokerB.stop();
-        brokerB.waitUntilStopped();
-        proxy.close();
-    }
-    
-    private void configure(BrokerService broker) {
-        broker.setPersistent(false);
-        broker.setUseJmx(true);      
-    }
-    
-    @Test
-    public void testMulicastReconnect() throws Exception {     
-        
-        // control multicast advertise agent to inject proxy
-        agent = MulticastDiscoveryAgentFactory.createDiscoveryAgent(new URI(discoveryAddress));
-        agent.registerService(proxy.getUrl().toString());
-        agent.start();
-
-        brokerB.addNetworkConnector(discoveryAddress + "&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
-        brokerB.start();
-        brokerB.waitUntilStarted();
-        doReconnect();
-    }
-    
-    
-
-    @Test
-    public void testSimpleReconnect() throws Exception {
-        brokerB.addNetworkConnector("simple://(" + proxy.getUrl() 
-                + ")?useExponentialBackOff=false&initialReconnectDelay=500&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
-        brokerB.start();   
-        brokerB.waitUntilStarted();
-        doReconnect();
-    }
-
-    private void doReconnect() throws Exception {
-        
-        for (int i=0; i<maxReconnects; i++) {
-            // Wait for connection
-            assertTrue("we got a network connection in a timely manner", Wait.waitFor(new Wait.Condition() {
-                public boolean isSatisified() throws Exception {
-                   return proxy.connections.size() >= 1;
-                }
-            }));
-            
-            // wait for network connector
-            assertTrue("network connector mbean registered within 3 minute", mbeanRegistered.tryAcquire(180, TimeUnit.SECONDS));
-            
-            // force an inactivity timeout via the proxy
-            proxy.pause();
-        
-            // wait for the inactivity timeout and network shutdown
-            assertTrue("network connector mbean unregistered within 3 minute", mbeanUnregistered.tryAcquire(180, TimeUnit.SECONDS));
-            
-            // whack all connections
-            proxy.close();
-            
-            // let a reconnect succeed
-            proxy.reopen();       
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java
deleted file mode 100755
index 38f7cdb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.network.NetworkTestSupport;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.failover.FailoverTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DiscoveryTransportBrokerTest extends NetworkTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DiscoveryTransportBrokerTest.class);
-
-    String groupName;
-    
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-    }
-
-    public void testPublisherFailsOver() throws Exception {
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
-        int deliveryMode = DeliveryMode.NON_PERSISTENT;
-
-        // Start a normal consumer on the local broker
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.request(consumerInfo1);
-
-        // Start a normal consumer on a remote broker
-        StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        // Start a failover publisher.
-        StubConnection connection3 = createFailoverConnection();
-        ConnectionInfo connectionInfo3 = createConnectionInfo();
-        SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
-        ProducerInfo producerInfo3 = createProducerInfo(sessionInfo3);
-        connection3.send(connectionInfo3);
-        connection3.send(sessionInfo3);
-        connection3.send(producerInfo3);
-
-        // Send the message using the fail over publisher.
-        connection3.request(createMessage(producerInfo3, destination, deliveryMode));
-
-        // The message will be sent to one of the brokers.
-        FailoverTransport ft = (FailoverTransport)connection3.getTransport().narrow(FailoverTransport.class);
-
-        // See which broker we were connected to.
-        StubConnection connectionA;
-        StubConnection connectionB;
-        TransportConnector serverA;
-        if (connector.getServer().getConnectURI().getPort() == ft.getConnectedTransportURI().getPort()) {
-            connectionA = connection1;
-            connectionB = connection2;
-            serverA = connector;
-        } else {
-            connectionA = connection2;
-            connectionB = connection1;
-            serverA = remoteConnector;
-        }
-
-        assertNotNull(receiveMessage(connectionA));
-        assertNoMessagesLeft(connectionB);
-
-        // Dispose the server so that it fails over to the other server.
-        LOG.info("Disconnecting active server");
-        serverA.stop();
-
-        LOG.info("Sending request that should failover");
-        connection3.request(createMessage(producerInfo3, destination, deliveryMode));
-
-        assertNotNull(receiveMessage(connectionB));
-        assertNoMessagesLeft(connectionA);
-
-    }
-
-    protected String getLocalURI() {
-        return "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true";
-    }
-
-    protected String getRemoteURI() {
-        return "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true";
-    }
-
-    protected TransportConnector createConnector() throws Exception, IOException, URISyntaxException {
-        TransportConnector x = super.createConnector();
-        x.setDiscoveryUri(new URI(getDiscoveryUri()));
-        return x;
-    }
-
-    protected String getDiscoveryUri() {
-    	if ( groupName == null ) {
-    		groupName = "group-"+System.currentTimeMillis();
-    	}
-        return "multicast://default?group="+groupName;
-    }
-
-    protected TransportConnector createRemoteConnector() throws Exception, IOException, URISyntaxException {
-        TransportConnector x = super.createRemoteConnector();
-        x.setDiscoveryUri(new URI(getDiscoveryUri()));
-        return x;
-    }
-
-    protected StubConnection createFailoverConnection() throws Exception {
-        URI failoverURI = new URI("discovery:" + getDiscoveryUri());
-        Transport transport = TransportFactory.connect(failoverURI);
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-    public static Test suite() {
-        return suite(DiscoveryTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportNoBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportNoBrokerTest.java
deleted file mode 100644
index 70950f7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportNoBrokerTest.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Vector;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.transport.StubCompositeTransport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.URISupport.CompositeData;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DiscoveryTransportNoBrokerTest extends CombinationTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DiscoveryTransportNoBrokerTest.class);
-
-    public void testNoExtraThreads() throws Exception {
-        BrokerService broker = new BrokerService();
-        TransportConnector tcp = broker.addConnector("tcp://localhost:0?transport.closeAsync=false");
-        String group = "GR-" +  System.currentTimeMillis();
-        URI discoveryUri = new URI("multicast://default?group=" + group);
-        tcp.setDiscoveryUri(discoveryUri);
-        broker.start();
-        broker.waitUntilStarted();
-        
-        Vector<String> existingNames = new Vector<String>();
-        Thread[] threads = getThreads();
-        for (Thread t : threads) {
-            existingNames.add(t.getName());
-        }
-        final int idleThreadCount = threads.length;
-        LOG.info("Broker started - thread Count:" + idleThreadCount);
-        
-       final int noConnectionToCreate = 10;
-        for (int i=0; i<10;i++) {
-            ActiveMQConnectionFactory factory = 
-                new ActiveMQConnectionFactory("discovery:(multicast://239.255.2.3:6155?group=" + group +")?closeAsync=false");
-            LOG.info("Connecting.");
-            Connection connection = factory.createConnection();
-            connection.setClientID("test");  
-            connection.close();
-        }
-        Thread.sleep(2000);
-        threads = getThreads();
-        for (Thread t : threads) {
-            if (!existingNames.contains(t.getName())) {
-                LOG.info("Remaining thread:" + t);
-            }
-        }
-        assertTrue("no extra threads per connection", Thread.activeCount() - idleThreadCount < noConnectionToCreate);
-    }
-   
-    
-    private Thread[] getThreads() {
-        Thread[] threads = new Thread[Thread.activeCount()];
-        Thread.enumerate(threads);
-        return threads;
-    }
-
-
-    public void testMaxReconnectAttempts() throws JMSException {
-        try {
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("discovery:(multicast://doesNOTexist)");
-            LOG.info("Connecting.");
-            Connection connection = factory.createConnection();
-            connection.setClientID("test");
-            fail("Did not fail to connect as expected.");
-        }
-        catch ( JMSException expected ) {
-            assertTrue("reason is java.io.IOException, was: " + expected.getCause(), expected.getCause() instanceof java.io.IOException);
-        }
-    }
-    
-    public void testInitialConnectDelayWithNoBroker() throws Exception {
-        // the initialReconnectDelay only kicks in once a set of connect URL have
-        // been returned from the discovery agent.
-        // Up to that point the reconnectDelay is used which has a default value of 10
-        //
-        long initialReconnectDelay = 4000;
-        long startT = System.currentTimeMillis();
-        String groupId = "WillNotMatch" + startT;
-        try {
-            String urlStr = "discovery:(multicast://default?group=" + groupId + 
-                ")?useExponentialBackOff=false&maxReconnectAttempts=2&reconnectDelay=" + initialReconnectDelay;
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(urlStr);
-            LOG.info("Connecting.");
-            Connection connection = factory.createConnection();
-            connection.setClientID("test");
-            fail("Did not fail to connect as expected.");
-        } catch ( JMSException expected ) {
-            assertTrue("reason is java.io.IOException, was: " + expected.getCause(), expected.getCause() instanceof java.io.IOException);
-            long duration = System.currentTimeMillis() - startT;
-            assertTrue("took at least initialReconnectDelay time: " + duration + " e:" + expected, duration >= initialReconnectDelay);
-        }
-    }
-    
-    public void testSetDiscoveredBrokerProperties() throws Exception {
-        final String extraParameterName = "connectionTimeout";
-        final String extraParameterValue = "3000";
-        final URI uri = new URI("discovery:(multicast://default)?initialReconnectDelay=100&"
-                + DiscoveryListener.DISCOVERED_OPTION_PREFIX + extraParameterName + "=" + extraParameterValue);
-        CompositeData compositeData = URISupport.parseComposite(uri);
-        
-        StubCompositeTransport compositeTransport = new StubCompositeTransport();      
-        DiscoveryTransport discoveryTransport = DiscoveryTransportFactory.createTransport(compositeTransport, compositeData, compositeData.getParameters());
-        
-        discoveryTransport.onServiceAdd(new DiscoveryEvent("tcp://localhost:61616"));        
-        assertEquals("expected added URI after discovery event", compositeTransport.getTransportURIs().length, 1);
-        
-        URI discoveredServiceURI = compositeTransport.getTransportURIs()[0];
-        Map<String, String> parameters = URISupport.parseParameters(discoveredServiceURI);
-        assertTrue("unable to add parameter to discovered service", parameters.containsKey(extraParameterName));
-        assertEquals("incorrect value for parameter added to discovered service", parameters.get(extraParameterName), extraParameterValue);
-    }
-    
-    public void testAddRemoveDiscoveredBroker() throws Exception {
-        final URI uri = new URI("discovery:(multicast://default)?initialReconnectDelay=100&connectionTimeout=3000");        
-        CompositeData compositeData = URISupport.parseComposite(uri);
-        
-        StubCompositeTransport compositeTransport = new StubCompositeTransport();      
-        DiscoveryTransport discoveryTransport = DiscoveryTransportFactory.createTransport(compositeTransport, compositeData, compositeData.getParameters());
-        
-        final String serviceName = "tcp://localhost:61616";
-        discoveryTransport.onServiceAdd(new DiscoveryEvent(serviceName));        
-        assertEquals("expected added URI after discovery event", 1, compositeTransport.getTransportURIs().length);
-        
-        discoveryTransport.onServiceRemove(new DiscoveryEvent(serviceName));        
-        assertEquals("expected URI removed after discovery event", 0, compositeTransport.getTransportURIs().length);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryUriTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryUriTest.java
deleted file mode 100644
index ddbf45d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryUriTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.transport.discovery;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-
-import javax.jms.*;
-import java.net.URI;
-
-public class DiscoveryUriTest extends EmbeddedBrokerTestSupport {
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        bindAddress = "tcp://localhost:0";
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(isPersistent());
-        TransportConnector connector = new TransportConnector();
-        connector.setUri(new URI(bindAddress));
-        connector.setDiscoveryUri(new URI("multicast://default?group=test"));
-        answer.addConnector(connector);
-        return answer;
-    }
-
-    public void testConnect() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("discovery:(multicast://default?group=test)?reconnectDelay=1000&maxReconnectAttempts=30&useExponentialBackOff=false");
-        Connection conn = factory.createConnection();
-        conn.start();
-
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = sess.createProducer(sess.createQueue("test"));
-        producer.send(sess.createTextMessage("test"));
-        MessageConsumer consumer = sess.createConsumer(sess.createQueue("test"));
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-    }
-
-    public void testFailedConnect() throws Exception {
-        try {
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("discovery:(multicast://default?group=test1)?reconnectDelay=1000&maxReconnectAttempts=3&useExponentialBackOff=false");
-            Connection conn = factory.createConnection();
-            conn.start();
-        } catch (Exception e) {
-            return;
-        }
-        fail("Expected connection failure");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/RendezvousDiscoverTransportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/RendezvousDiscoverTransportTest.java
deleted file mode 100644
index 0a34510..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/RendezvousDiscoverTransportTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.transport.discovery;
-
-/**
- *
- * 
- */
-public class RendezvousDiscoverTransportTest extends DiscoveryTransportBrokerTest {
-
-    protected String getDiscoveryUri() {
-        return "rendezvous://cheese";
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java
deleted file mode 100644
index ce78f7f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.TransactionRolledBackException;
-
-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.broker.region.Destination;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.log4j.Logger;
-
-/**
- * TestCase showing the message-destroying described in AMQ-1925
- * 
- * 
- */
-public class AMQ1925Test extends TestCase implements ExceptionListener {
-	private static final Logger log = Logger.getLogger(AMQ1925Test.class);
-
-	private static final String QUEUE_NAME = "test.amq1925";
-	private static final String PROPERTY_MSG_NUMBER = "NUMBER";
-	private static final int MESSAGE_COUNT = 10000;
-
-	private BrokerService bs;
-	private URI tcpUri;
-	private ActiveMQConnectionFactory cf;
-
-    private JMSException exception;
-
-	public void XtestAMQ1925_TXInProgress() throws Exception {
-		Connection connection = cf.createConnection();
-		connection.start();
-		Session session = connection.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageConsumer consumer = session.createConsumer(session
-				.createQueue(QUEUE_NAME));
-
-		// The runnable is likely to interrupt during the session#commit, since
-		// this takes the longest
-		final Object starter = new Object();
-		final AtomicBoolean restarted = new AtomicBoolean();
-		new Thread(new Runnable() {
-			public void run() {
-				try {
-					synchronized (starter) {
-						starter.wait();
-					}
-
-					// Simulate broker failure & restart
-					bs.stop();
-					bs = new BrokerService();
-					bs.setPersistent(true);
-					bs.setUseJmx(true);
-					bs.addConnector(tcpUri);
-					bs.start();
-
-					restarted.set(true);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			}
-		}).start();
-
-		synchronized (starter) {
-			starter.notifyAll();
-		}
-		for (int i = 0; i < MESSAGE_COUNT; i++) {
-			Message message = consumer.receive(500);
-			assertNotNull("No Message " + i + " found", message);
-
-			if (i < 10)
-				assertFalse("Timing problem, restarted too soon", restarted
-						.get());
-			if (i == 10) {
-				synchronized (starter) {
-					starter.notifyAll();
-				}
-			}
-			if (i > MESSAGE_COUNT - 100) {
-				assertTrue("Timing problem, restarted too late", restarted
-						.get());
-			}
-
-			assertEquals(i, message.getIntProperty(PROPERTY_MSG_NUMBER));
-			session.commit();
-		}
-		assertNull(consumer.receive(500));
-
-		consumer.close();
-		session.close();
-		connection.close();
-
-		assertQueueEmpty();
-	}
-
-	public void XtestAMQ1925_TXInProgress_TwoConsumers() throws Exception {
-		Connection connection = cf.createConnection();
-		connection.start();
-		Session session1 = connection.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageConsumer consumer1 = session1.createConsumer(session1
-				.createQueue(QUEUE_NAME));
-		Session session2 = connection.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageConsumer consumer2 = session2.createConsumer(session2
-				.createQueue(QUEUE_NAME));
-
-		// The runnable is likely to interrupt during the session#commit, since
-		// this takes the longest
-		final Object starter = new Object();
-		final AtomicBoolean restarted = new AtomicBoolean();
-		new Thread(new Runnable() {
-			public void run() {
-				try {
-					synchronized (starter) {
-						starter.wait();
-					}
-
-					// Simulate broker failure & restart
-					bs.stop();
-					bs = new BrokerService();
-					bs.setPersistent(true);
-					bs.setUseJmx(true);
-					bs.addConnector(tcpUri);
-					bs.start();
-
-					restarted.set(true);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			}
-		}).start();
-
-		synchronized (starter) {
-			starter.notifyAll();
-		}
-		Collection<Integer> results = new ArrayList<Integer>(MESSAGE_COUNT);
-		for (int i = 0; i < MESSAGE_COUNT; i++) {
-			Message message1 = consumer1.receive(20);
-			Message message2 = consumer2.receive(20);
-			if (message1 == null && message2 == null) {
-				if (results.size() < MESSAGE_COUNT) {
-					message1 = consumer1.receive(500);
-					message2 = consumer2.receive(500);
-
-					if (message1 == null && message2 == null) {
-						// Missing messages
-						break;
-					}
-				}
-				break;
-			}
-
-			if (i < 10)
-				assertFalse("Timing problem, restarted too soon", restarted
-						.get());
-			if (i == 10) {
-				synchronized (starter) {
-					starter.notifyAll();
-				}
-			}
-			if (i > MESSAGE_COUNT - 50) {
-				assertTrue("Timing problem, restarted too late", restarted
-						.get());
-			}
-
-			if (message1 != null) {
-				results.add(message1.getIntProperty(PROPERTY_MSG_NUMBER));
-				session1.commit();
-			}
-			if (message2 != null) {
-				results.add(message2.getIntProperty(PROPERTY_MSG_NUMBER));
-				session2.commit();
-			}
-		}
-		assertNull(consumer1.receive(500));
-		assertNull(consumer2.receive(500));
-
-		consumer1.close();
-		session1.close();
-		consumer2.close();
-		session2.close();
-		connection.close();
-
-		int foundMissingMessages = 0;
-		if (results.size() < MESSAGE_COUNT) {
-			foundMissingMessages = tryToFetchMissingMessages();
-		}
-		for (int i = 0; i < MESSAGE_COUNT; i++) {
-			assertTrue("Message-Nr " + i + " not found (" + results.size()
-					+ " total, " + foundMissingMessages
-					+ " have been found 'lingering' in the queue)", results
-					.contains(i));
-		}
-		assertQueueEmpty();
-	}
-
-	private int tryToFetchMissingMessages() throws JMSException {
-		Connection connection = cf.createConnection();
-		connection.start();
-		Session session = connection.createSession(true, 0);
-		MessageConsumer consumer = session.createConsumer(session
-				.createQueue(QUEUE_NAME));
-
-		int count = 0;
-		while (true) {
-			Message message = consumer.receive(500);
-			if (message == null)
-				break;
-
-			log.info("Found \"missing\" message: " + message);
-			count++;
-		}
-
-		consumer.close();
-		session.close();
-		connection.close();
-
-		return count;
-	}
-
-	public void testAMQ1925_TXBegin() throws Exception {
-		Connection connection = cf.createConnection();
-		connection.start();
-		connection.setExceptionListener(this);
-		Session session = connection.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageConsumer consumer = session.createConsumer(session
-				.createQueue(QUEUE_NAME));
-
-		boolean restartDone = false;
-		for (int i = 0; i < MESSAGE_COUNT; i++) {
-			Message message = consumer.receive(500);
-			assertNotNull(message);
-
-			if (i == 222 && !restartDone) {
-				// Simulate broker failure & restart
-				bs.stop();
-				bs = new BrokerService();
-				bs.setPersistent(true);
-				bs.setUseJmx(true);
-				bs.addConnector(tcpUri);
-				bs.start();
-				restartDone = true;
-			}
-
-			assertEquals(i, message.getIntProperty(PROPERTY_MSG_NUMBER));
-			try {
-			    session.commit();
-			} catch (TransactionRolledBackException expectedOnOccasion) {
-			    log.info("got rollback: "  + expectedOnOccasion);
-			    i--;
-			}
-		}
-		assertNull(consumer.receive(500));
-
-		consumer.close();
-		session.close();
-		connection.close();
-
-		assertQueueEmpty();
-		assertNull("no exception on connection listener: " + exception, exception);
-	}
-
-	public void testAMQ1925_TXCommited() throws Exception {
-		Connection connection = cf.createConnection();
-		connection.start();
-		Session session = connection.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageConsumer consumer = session.createConsumer(session
-				.createQueue(QUEUE_NAME));
-
-		for (int i = 0; i < MESSAGE_COUNT; i++) {
-			Message message = consumer.receive(500);
-			assertNotNull(message);
-
-			assertEquals(i, message.getIntProperty(PROPERTY_MSG_NUMBER));
-			session.commit();
-
-			if (i == 222) {
-				// Simulate broker failure & restart
-				bs.stop();
-				bs = new BrokerService();
-				bs.setPersistent(true);
-				bs.setUseJmx(true);
-				bs.addConnector(tcpUri);
-				bs.start();
-			}
-		}
-		assertNull(consumer.receive(500));
-
-		consumer.close();
-		session.close();
-		connection.close();
-
-		assertQueueEmpty();
-	}
-
-	private void assertQueueEmpty() throws Exception {
-		Connection connection = cf.createConnection();
-		connection.start();
-		Session session = connection.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageConsumer consumer = session.createConsumer(session
-				.createQueue(QUEUE_NAME));
-
-		Message msg = consumer.receive(500);
-		if (msg != null) {
-			fail(msg.toString());
-		}
-
-		consumer.close();
-		session.close();
-		connection.close();
-
-		assertQueueLength(0);
-	}
-
-	private void assertQueueLength(int len) throws Exception, IOException {
-		Set<Destination> destinations = bs.getBroker().getDestinations(
-				new ActiveMQQueue(QUEUE_NAME));
-		Queue queue = (Queue) destinations.iterator().next();
-		assertEquals(len, queue.getMessageStore().getMessageCount());
-	}
-
-	private void sendMessagesToQueue() throws Exception {
-		Connection connection = cf.createConnection();
-		Session session = connection.createSession(true,
-				Session.SESSION_TRANSACTED);
-		MessageProducer producer = session.createProducer(session
-				.createQueue(QUEUE_NAME));
-
-		producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-		for (int i = 0; i < MESSAGE_COUNT; i++) {
-			TextMessage message = session
-					.createTextMessage("Test message " + i);
-			message.setIntProperty(PROPERTY_MSG_NUMBER, i);
-			producer.send(message);
-		}
-		session.commit();
-
-		producer.close();
-		session.close();
-		connection.close();
-
-		assertQueueLength(MESSAGE_COUNT);
-	}
-
-	protected void setUp() throws Exception {
-	    exception = null;
-		bs = new BrokerService();
-		bs.setDeleteAllMessagesOnStartup(true);
-		bs.setPersistent(true);
-		bs.setUseJmx(true);
-		TransportConnector connector = bs.addConnector("tcp://localhost:0");
-		bs.start();
-		tcpUri = connector.getConnectUri();
-
-		cf = new ActiveMQConnectionFactory("failover://(" + tcpUri + ")");
-
-		sendMessagesToQueue();
-	}
-
-	protected void tearDown() throws Exception {
-		new ServiceStopper().stop(bs);
-	}
-
-    public void onException(JMSException exception) {
-        this.exception = exception;    
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java
deleted file mode 100644
index dd89456..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.IOException;
-import java.net.URI;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class BadConnectionTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BadConnectionTest.class);
-
-    protected Transport transport;
-
-    public void testConnectingToUnavailableServer() throws Exception {
-        try {
-            transport.asyncRequest(new ActiveMQMessage(), null);
-            fail("This should never succeed");
-        } catch (IOException e) {
-            LOG.info("Caught expected exception: " + e, e);
-        }
-    }
-
-    protected Transport createTransport() throws Exception {
-        return TransportFactory.connect(new URI("failover://(tcp://doesNotExist:1234)?useExponentialBackOff=false&maxReconnectAttempts=3&initialReconnectDelay=100"));
-    }
-
-    protected void setUp() throws Exception {
-        transport = createTransport();
-        transport.setTransportListener(new TransportListener() {
-
-            public void onCommand(Object command) {
-            }
-
-            public void onException(IOException error) {
-            }
-
-            public void transportInterupted() {
-            }
-
-            public void transportResumed() {
-            }
-        });
-        transport.start();
-    }
-
-    protected void tearDown() throws Exception {
-        if (transport != null) {
-            transport.stop();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java
deleted file mode 100644
index 9905778..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverClusterTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.network.NetworkConnector;
-
-
-public class FailoverClusterTest extends TestCase {
-
-    private static final int NUMBER = 10;
-    private static final String BROKER_BIND_ADDRESS = "tcp://0.0.0.0:0";
-    private static final String BROKER_A_NAME = "BROKERA";
-    private static final String BROKER_B_NAME = "BROKERB";
-    private BrokerService brokerA;
-    private BrokerService brokerB;
-    private String clientUrl;
-
-    private final List<ActiveMQConnection> connections = new ArrayList<ActiveMQConnection>();
-
-
-    public void testClusterConnectedAfterClients() throws Exception {
-        createClients();
-        if (brokerB == null) {
-            brokerB = createBrokerB(BROKER_BIND_ADDRESS);
-        }
-        Thread.sleep(3000);
-        Set<String> set = new HashSet<String>();
-        for (ActiveMQConnection c : connections) {
-            set.add(c.getTransportChannel().getRemoteAddress());
-        }
-        assertTrue(set.size() > 1);
-    }
-
-    public void testClusterURIOptionsStrip() throws Exception {
-        createClients();
-        if (brokerB == null) {
-            // add in server side only url param, should not be propagated
-            brokerB = createBrokerB(BROKER_BIND_ADDRESS + "?transport.closeAsync=false");
-        }
-        Thread.sleep(3000);
-        Set<String> set = new HashSet<String>();
-        for (ActiveMQConnection c : connections) {
-            set.add(c.getTransportChannel().getRemoteAddress());
-        }
-        assertTrue(set.size() > 1);
-    }
-
-
-    public void testClusterConnectedBeforeClients() throws Exception {
-
-        if (brokerB == null) {
-            brokerB = createBrokerB(BROKER_BIND_ADDRESS);
-        }
-        Thread.sleep(5000);
-        createClients();
-        Thread.sleep(2000);
-        brokerA.stop();
-        Thread.sleep(2000);
-
-        URI brokerBURI = new URI( brokerB.getTransportConnectors().get(0).getPublishableConnectString());
-        for (ActiveMQConnection c : connections) {
-            String addr = c.getTransportChannel().getRemoteAddress();
-            assertTrue(addr.indexOf("" + brokerBURI.getPort()) > 0);
-        }
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        if (brokerA == null) {
-            brokerA = createBrokerA(BROKER_BIND_ADDRESS + "?transport.closeAsync=false");
-            clientUrl = "failover://(" + brokerA.getTransportConnectors().get(0).getPublishableConnectString() + ")";
-        }
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        for (Connection c : connections) {
-            c.close();
-        }
-        if (brokerB != null) {
-            brokerB.stop();
-            brokerB = null;
-        }
-        if (brokerA != null) {
-            brokerA.stop();
-            brokerA = null;
-        }
-    }
-
-    protected BrokerService createBrokerA(String uri) throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setUseJmx(false);
-        configureConsumerBroker(answer, uri);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureConsumerBroker(BrokerService answer, String uri) throws Exception {
-        answer.setBrokerName(BROKER_A_NAME);
-        answer.setPersistent(false);
-        TransportConnector connector = answer.addConnector(uri);
-        connector.setRebalanceClusterClients(true);
-        connector.setUpdateClusterClients(true);
-        answer.setUseShutdownHook(false);
-    }
-
-    protected BrokerService createBrokerB(String uri) throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setUseJmx(false);
-        configureNetwork(answer, uri);
-        answer.start();
-        return answer;
-    }
-
-    protected void configureNetwork(BrokerService answer, String uri) throws Exception {
-        answer.setBrokerName(BROKER_B_NAME);
-        answer.setPersistent(false);
-        NetworkConnector network = answer.addNetworkConnector("static://" + brokerA.getTransportConnectors().get(0).getPublishableConnectString());
-        network.setDuplex(true);
-        TransportConnector connector = answer.addConnector(uri);
-        connector.setRebalanceClusterClients(true);
-        connector.setUpdateClusterClients(true);
-        answer.setUseShutdownHook(false);
-    }
-
-    protected void createClients() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(clientUrl);
-        for (int i = 0; i < NUMBER; i++) {
-            ActiveMQConnection c = (ActiveMQConnection) factory.createConnection();
-            c.start();
-            Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            Queue queue = s.createQueue(getClass().getName());
-            MessageConsumer consumer = s.createConsumer(queue);
-            connections.add(c);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
deleted file mode 100644
index ff38fd9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/**
- * 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.transport.failover;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-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.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.TransactionId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Test;
-
-public class FailoverConsumerOutstandingCommitTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverConsumerOutstandingCommitTest.class);
-    private static final String QUEUE_NAME = "FailoverWithOutstandingCommit";
-    private static final String MESSAGE_TEXT = "Test message ";
-    private static final String TRANSPORT_URI = "tcp://localhost:0";
-    private String url;
-    final int prefetch = 10;
-    BrokerService broker;
-
-    @After
-    public void stopBroker() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    public void startBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        broker = createBroker(deleteAllMessagesOnStartup);
-        broker.start();
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        return createBroker(deleteAllMessagesOnStartup, TRANSPORT_URI);
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup, String bindAddress) throws Exception {
-        broker = new BrokerService();
-        broker.addConnector(bindAddress);
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessagesOnStartup);
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-
-        // optimizedDispatche and sync dispatch ensure that the dispatch happens
-        // before the commit reply that the consumer.clearDispatchList is waiting for.
-        defaultEntry.setOptimizedDispatch(true);
-        policyMap.setDefaultEntry(defaultEntry);
-        broker.setDestinationPolicy(policyMap);
-
-        url = broker.getTransportConnectors().get(0).getConnectUri().toString();
-
-        return broker;
-    }
-
-    @Test
-    public void testFailoverConsumerDups() throws Exception {
-        doTestFailoverConsumerDups(true);
-    }
-
-    public void doTestFailoverConsumerDups(final boolean watchTopicAdvisories) throws Exception {
-
-        broker = createBroker(true);
-
-        broker.setPlugins(new BrokerPlugin[] {
-                new BrokerPluginSupport() {
-                    @Override
-                    public void commitTransaction(ConnectionContext context,
-                            TransactionId xid, boolean onePhase) throws Exception {
-                        // so commit will hang as if reply is lost
-                        context.setDontSendReponse(true);
-                        Executors.newSingleThreadExecutor().execute(new Runnable() {
-                            public void run() {
-                                LOG.info("Stopping broker before commit...");
-                                try {
-                                    broker.stop();
-                                } catch (Exception e) {
-                                    e.printStackTrace();
-                                }
-                            }
-                        });
-                    }
-                }
-        });
-        broker.start();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        cf.setWatchTopicAdvisories(watchTopicAdvisories);
-        cf.setDispatchAsync(false);
-
-        final ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-
-        final Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = producerSession.createQueue(QUEUE_NAME + "?consumer.prefetchSize=" + prefetch);
-
-        final Session consumerSession = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-
-
-        final CountDownLatch commitDoneLatch = new CountDownLatch(1);
-        final CountDownLatch messagesReceived = new CountDownLatch(2);
-
-        final MessageConsumer testConsumer = consumerSession.createConsumer(destination);
-        testConsumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                LOG.info("consume one and commit");
-
-                assertNotNull("got message", message);
-
-                try {
-                    consumerSession.commit();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-                commitDoneLatch.countDown();
-                messagesReceived.countDown();
-                LOG.info("done commit");
-            }
-        });
-
-        // may block if broker shutodwn happens quickly
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("producer started");
-                try {
-                    produceMessage(producerSession, destination, prefetch * 2);
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                    fail("unexpceted ex on producer: " + e);
-                }
-                LOG.info("producer done");
-            }
-        });
-
-        // will be stopped by the plugin
-        broker.waitUntilStopped();
-        broker = createBroker(false, url);
-        broker.start();
-
-        assertTrue("consumer added through failover", commitDoneLatch.await(20, TimeUnit.SECONDS));
-        assertTrue("another message was recieved after failover", messagesReceived.await(20, TimeUnit.SECONDS));
-
-        connection.close();
-    }
-
-    @Test
-    public void TestFailoverConsumerOutstandingSendTxIncomplete() throws Exception {
-        doTestFailoverConsumerOutstandingSendTx(false);
-    }
-
-    @Test
-    public void TestFailoverConsumerOutstandingSendTxComplete() throws Exception {
-        doTestFailoverConsumerOutstandingSendTx(true);
-    }
-
-    public void doTestFailoverConsumerOutstandingSendTx(final boolean doActualBrokerCommit) throws Exception {
-        final boolean watchTopicAdvisories = true;
-        broker = createBroker(true);
-
-        broker.setPlugins(new BrokerPlugin[] { new BrokerPluginSupport() {
-            @Override
-            public void commitTransaction(ConnectionContext context,
-                    TransactionId xid, boolean onePhase) throws Exception {
-                // from the consumer perspective whether the commit completed on the broker or
-                // not is irrelevant, the transaction is still in doubt in the absence of a reply
-                if (doActualBrokerCommit) {
-                    LOG.info("doing actual broker commit...");
-                    super.commitTransaction(context, xid, onePhase);
-                }
-                // so commit will hang as if reply is lost
-                context.setDontSendReponse(true);
-                Executors.newSingleThreadExecutor().execute(new Runnable() {
-                    public void run() {
-                        LOG.info("Stopping broker before commit...");
-                        try {
-                            broker.stop();
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
-                    }
-                });
-            }
-        } });
-        broker.start();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        cf.setWatchTopicAdvisories(watchTopicAdvisories);
-        cf.setDispatchAsync(false);
-
-        final ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-
-        final Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = producerSession.createQueue(QUEUE_NAME
-                + "?consumer.prefetchSize=" + prefetch);
-
-        final Queue signalDestination = producerSession.createQueue(QUEUE_NAME + ".signal"
-                + "?consumer.prefetchSize=" + prefetch);
-
-
-        final Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-
-        final CountDownLatch commitDoneLatch = new CountDownLatch(1);
-        final CountDownLatch messagesReceived = new CountDownLatch(3);
-        final AtomicBoolean gotCommitException = new AtomicBoolean(false);
-        final ArrayList<TextMessage> receivedMessages = new ArrayList<TextMessage>();
-        final MessageConsumer testConsumer = consumerSession.createConsumer(destination);
-        testConsumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                LOG.info("consume one and commit: " + message);
-                assertNotNull("got message", message);
-                receivedMessages.add((TextMessage) message);
-                try {
-                    produceMessage(consumerSession, signalDestination, 1);
-                    consumerSession.commit();
-                } catch (JMSException e) {
-                    LOG.info("commit exception", e);
-                    gotCommitException.set(true);
-                }
-                commitDoneLatch.countDown();
-                messagesReceived.countDown();
-                LOG.info("done commit");
-            }
-        });
-
-        // may block if broker shutdown happens quickly
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("producer started");
-                try {
-                    produceMessage(producerSession, destination, prefetch * 2);
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                    fail("unexpceted ex on producer: " + e);
-                }
-                LOG.info("producer done");
-            }
-        });
-
-        // will be stopped by the plugin
-        broker.waitUntilStopped();
-        broker = createBroker(false, url);
-        broker.start();
-
-        assertTrue("commit done through failover", commitDoneLatch.await(20, TimeUnit.SECONDS));
-        assertTrue("commit failed", gotCommitException.get());
-        assertTrue("another message was received after failover", messagesReceived.await(20, TimeUnit.SECONDS));
-        assertEquals("get message 0 first", MESSAGE_TEXT + "0", receivedMessages.get(0).getText());
-        // it was redelivered
-        assertEquals("get message 0 second", MESSAGE_TEXT + "0", receivedMessages.get(1).getText());
-        assertTrue("another message was received", messagesReceived.await(20, TimeUnit.SECONDS));
-        assertEquals("get message 1 eventually", MESSAGE_TEXT + "1", receivedMessages.get(2).getText());
-
-
-        connection.close();
-    }
-
-    @Test
-    public void testRollbackFailoverConsumerTx() throws Exception {
-        broker = createBroker(true);
-        broker.start();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        cf.setConsumerFailoverRedeliveryWaitPeriod(10000);
-        final ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-
-        final Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = producerSession.createQueue(QUEUE_NAME);
-
-        final Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-        final MessageConsumer testConsumer = consumerSession.createConsumer(destination);
-        assertNull("no message yet", testConsumer.receiveNoWait());
-
-        produceMessage(producerSession, destination, 1);
-        producerSession.close();
-
-        // consume then rollback after restart
-        Message msg = testConsumer.receive(5000);
-        assertNotNull(msg);
-
-        // restart with outstanding delivered message
-        broker.stop();
-        broker.waitUntilStopped();
-        broker = createBroker(false, url);
-        broker.start();
-
-        consumerSession.rollback();
-
-        // receive again
-        msg = testConsumer.receive(10000);
-        assertNotNull("got message again after rollback", msg);
-
-        consumerSession.commit();
-
-        // close before sweep
-        consumerSession.close();
-        msg = receiveMessage(cf, destination);
-        assertNull("should be nothing left after commit", msg);
-        connection.close();
-    }
-
-    private Message receiveMessage(ActiveMQConnectionFactory cf,
-            Queue destination) throws Exception {
-        final ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-        final Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-        final MessageConsumer consumer = consumerSession.createConsumer(destination);
-        Message msg = consumer.receive(5000);
-        consumerSession.commit();
-        connection.close();
-        return msg;
-    }
-
-    private void produceMessage(final Session producerSession, Queue destination, long count)
-        throws JMSException {
-        MessageProducer producer = producerSession.createProducer(destination);
-        for (int i=0; i<count; i++) {
-            TextMessage message = producerSession.createTextMessage(MESSAGE_TEXT + i);
-            producer.send(message);
-        }
-        producer.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java
deleted file mode 100644
index 61e976f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.network.NetworkTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class FailoverConsumerTest extends NetworkTestSupport {
-
-    public static final int MSG_COUNT = 100;
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverConsumerTest.class);
-
-
-    public void testPublisherFailsOver() throws Exception {
-        // Uncomment this if you want to use remote broker created by
-        // NetworkTestSupport.
-        // But it doesn't work. See comments below.
-        // URI failoverURI = new
-        // URI("failover://"+remoteConnector.getServer().getConnectURI());
-        URI failoverURI = new URI("failover://tcp://localhost:61616");
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(failoverURI);
-        ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-
-        // Prefetch size must be less than messages in the queue!!
-        prefetchPolicy.setQueuePrefetch(MSG_COUNT - 10);
-        factory.setPrefetchPolicy(prefetchPolicy);
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("Test"));
-        for (int idx = 0; idx < MSG_COUNT; ++idx) {
-            producer.send(session.createTextMessage("Test"));
-        }
-        producer.close();
-        session.close();
-        int count = 0;
-
-        Session consumerSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = consumerSession.createConsumer(new ActiveMQQueue("Test"));
-        connection.start();
-        Message msg = consumer.receive(3000);
-
-        // restartRemoteBroker() doesn't work (you won't get received any
-        // messages
-        // after restart, javadoc says, that messages should be received
-        // though).
-        // So we must use external broker ant restart it manually.
-        LOG.info("You should restart remote broker now and press enter!");
-        System.in.read();
-        // Thread.sleep(20000);
-        restartRemoteBroker();
-        msg.acknowledge();
-        ++count;
-
-        for (int idx = 1; idx < MSG_COUNT; ++idx) {
-            msg = consumer.receive(3000);
-            if (msg == null) {
-                LOG.error("No messages received! Received:" + count);
-                break;
-            }
-            msg.acknowledge();
-            ++count;
-        }
-        assertEquals(count, MSG_COUNT);
-        consumer.close();
-        consumerSession.close();
-        connection.close();
-
-        connection = factory.createConnection();
-        consumerSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        consumer = consumerSession.createConsumer(new ActiveMQQueue("Test"));
-        connection.start();
-
-        count = 0;
-        do {
-            msg = consumer.receive(1000);
-            if (msg != null) {
-                msg.acknowledge();
-                ++count;
-            }
-        } while (msg != null);
-
-        assertEquals(count, 0);
-
-        consumer.close();
-        consumerSession.close();
-        connection.close();
-    }
-
-    protected String getRemoteURI() {
-        return "tcp://localhost:55555";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
deleted file mode 100644
index c743615..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * 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.transport.failover;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQMessageConsumer;
-import org.apache.activemq.ActiveMQMessageTransformation;
-import org.apache.activemq.ActiveMQSession;
-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.broker.region.Subscription;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Test;
-
-// see https://issues.apache.org/activemq/browse/AMQ-2573
-public class FailoverConsumerUnconsumedTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverConsumerUnconsumedTest.class);
-    private static final String QUEUE_NAME = "FailoverWithUnconsumed";
-    private static final String TRANSPORT_URI = "tcp://localhost:0";
-    private String url;
-    final int prefetch = 10;
-    BrokerService broker;
-
-    @After
-    public void stopBroker() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    public void startBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        broker = createBroker(deleteAllMessagesOnStartup);
-        broker.start();
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        return createBroker(deleteAllMessagesOnStartup, TRANSPORT_URI);
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup, String bindAddress) throws Exception {
-        broker = new BrokerService();
-        broker.addConnector(bindAddress);
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessagesOnStartup);
-
-        this.url = broker.getTransportConnectors().get(0).getConnectUri().toString();
-
-        return broker;
-    }
-
-    @Test
-    public void testFailoverConsumerDups() throws Exception {
-        doTestFailoverConsumerDups(true);
-    }
-
-    @Test
-    public void testFailoverConsumerDupsNoAdvisoryWatch() throws Exception {
-        doTestFailoverConsumerDups(false);
-    }
-
-    public void doTestFailoverConsumerDups(final boolean watchTopicAdvisories) throws Exception {
-
-        final int maxConsumers = 4;
-        broker = createBroker(true);
-
-        broker.setPlugins(new BrokerPlugin[] {
-                new BrokerPluginSupport() {
-                    int consumerCount;
-
-                    // broker is killed on x create consumer
-                    @Override
-                    public Subscription addConsumer(ConnectionContext context,
-                            final ConsumerInfo info) throws Exception {
-                         if (++consumerCount == maxConsumers + (watchTopicAdvisories ? 1:0)) {
-                             context.setDontSendReponse(true);
-                             Executors.newSingleThreadExecutor().execute(new Runnable() {
-                                 public void run() {
-                                     LOG.info("Stopping broker on consumer: " + info.getConsumerId());
-                                     try {
-                                         broker.stop();
-                                     } catch (Exception e) {
-                                         e.printStackTrace();
-                                     }
-                                 }
-                             });
-                         }
-                        return super.addConsumer(context, info);
-                    }
-                }
-        });
-        broker.start();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        cf.setWatchTopicAdvisories(watchTopicAdvisories);
-
-        final ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-
-        final Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = consumerSession.createQueue(QUEUE_NAME + "?jms.consumer.prefetch=" + prefetch);
-
-        final Vector<TestConsumer> testConsumers = new Vector<TestConsumer>();
-        for (int i=0; i<maxConsumers -1; i++) {
-            testConsumers.add(new TestConsumer(consumerSession, destination, connection));
-        }
-
-        produceMessage(consumerSession, destination, maxConsumers * prefetch);
-
-        assertTrue("add messages are dispatched", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                int totalUnconsumed = 0;
-                for (TestConsumer testConsumer : testConsumers) {
-                    long unconsumed = testConsumer.unconsumedSize();
-                    LOG.info(testConsumer.getConsumerId() + " unconsumed: " + unconsumed);
-                    totalUnconsumed += unconsumed;
-                }
-                return totalUnconsumed == (maxConsumers-1) * prefetch;
-            }
-        }));
-
-        final CountDownLatch commitDoneLatch = new CountDownLatch(1);
-
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                try {
-                    LOG.info("add last consumer...");
-                    testConsumers.add(new TestConsumer(consumerSession, destination, connection));
-                    commitDoneLatch.countDown();
-                    LOG.info("done add last consumer");
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        // will be stopped by the plugin
-        broker.waitUntilStopped();
-
-        // verify interrupt
-        assertTrue("add messages dispatched and unconsumed are cleaned up", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                int totalUnconsumed = 0;
-                for (TestConsumer testConsumer : testConsumers) {
-                    long unconsumed = testConsumer.unconsumedSize();
-                    LOG.info(testConsumer.getConsumerId() + " unconsumed: " + unconsumed);
-                    totalUnconsumed += unconsumed;
-                }
-                return totalUnconsumed == 0;
-            }
-        }));
-
-        broker = createBroker(false, this.url);
-        broker.start();
-
-        assertTrue("consumer added through failover", commitDoneLatch.await(30, TimeUnit.SECONDS));
-
-        // each should again get prefetch messages - all unconsumed deliveries should be rolledback
-        assertTrue("after start all messages are re dispatched", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                int totalUnconsumed = 0;
-                for (TestConsumer testConsumer : testConsumers) {
-                    long unconsumed = testConsumer.unconsumedSize();
-                    LOG.info(testConsumer.getConsumerId() + " after restart: unconsumed: " + unconsumed);
-                    totalUnconsumed += unconsumed;
-                }
-                return totalUnconsumed == (maxConsumers) * prefetch;
-            }
-        }));
-
-        connection.close();
-    }
-
-    private void produceMessage(final Session producerSession, Queue destination, long count)
-        throws JMSException {
-        MessageProducer producer = producerSession.createProducer(destination);
-        for (int i=0; i<count; i++) {
-            TextMessage message = producerSession.createTextMessage("Test message " + i);
-            producer.send(message);
-        }
-        producer.close();
-    }
-
-    // allow access to unconsumedMessages
-    class TestConsumer extends ActiveMQMessageConsumer {
-
-        TestConsumer(Session consumerSession, Destination destination, ActiveMQConnection connection) throws Exception {
-            super((ActiveMQSession) consumerSession,
-                new ConsumerId(new SessionId(connection.getConnectionInfo().getConnectionId(),1), nextGen()),
-                ActiveMQMessageTransformation.transformDestination(destination), null, "",
-                prefetch, -1, false, false, true, null);
-        }
-
-        public int unconsumedSize() {
-            return unconsumedMessages.size();
-        }
-    }
-
-    static long idGen = 100;
-    private static long nextGen() {
-        idGen -=5;
-        return idGen;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java
deleted file mode 100644
index 970020e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import org.apache.activemq.ActiveMQConnection;
-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.MessagePull;
-import org.apache.activemq.command.Response;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Test;
-
-
-import static org.junit.Assert.assertTrue;
-
-// see: https://issues.apache.org/activemq/browse/AMQ-2877
-public class FailoverPrefetchZeroTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverPrefetchZeroTest.class);
-    private static final String QUEUE_NAME = "FailoverPrefetchZero";
-    private static final String TRANSPORT_URI = "tcp://localhost:0";
-    private String url;
-    final int prefetch = 0;
-    BrokerService broker;
-
-    @After
-    public void stopBroker() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    public void startBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        broker = createBroker(deleteAllMessagesOnStartup);
-        broker.start();
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        return createBroker(deleteAllMessagesOnStartup, TRANSPORT_URI);
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup, String bindAddress) throws Exception {
-        broker = new BrokerService();
-        broker.addConnector(bindAddress);
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessagesOnStartup);
-
-        url = broker.getTransportConnectors().get(0).getConnectUri().toString();
-
-        return broker;
-    }
-
-    @Test
-    public void testPrefetchZeroConsumerThroughRestart() throws Exception {
-        broker = createBroker(true);
-
-        final CountDownLatch pullDone = new CountDownLatch(1);
-        broker.setPlugins(new BrokerPlugin[]{
-                new BrokerPluginSupport() {
-                    @Override
-                    public Response messagePull(ConnectionContext context, final MessagePull pull) throws Exception {
-                        context.setDontSendReponse(true);
-                        pullDone.countDown();
-                        Executors.newSingleThreadExecutor().execute(new Runnable() {
-                            public void run() {
-                                LOG.info("Stopping broker on pull: " + pull);
-                                try {
-                                    broker.stop();
-                                } catch (Exception e) {
-                                    e.printStackTrace();
-                                }
-                            }
-                        });
-                        return null;
-                    }
-                }
-        });
-        broker.start();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        cf.setWatchTopicAdvisories(false);
-
-        final ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-
-        final Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = consumerSession.createQueue(QUEUE_NAME + "?consumer.prefetchSize=" + prefetch);
-
-        final MessageConsumer consumer = consumerSession.createConsumer(destination);
-        produceMessage(consumerSession, destination, 1);
-
-        final CountDownLatch receiveDone = new CountDownLatch(1);
-        final Vector<Message> received = new Vector<Message>();
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                try {
-                    LOG.info("receive one...");
-                    Message msg = consumer.receive(30000);
-                    if (msg != null) {
-                        received.add(msg);
-                    }
-                    receiveDone.countDown();
-                    LOG.info("done receive");
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        // will be stopped by the plugin
-        assertTrue("pull completed on broker", pullDone.await(30, TimeUnit.SECONDS));
-        broker.waitUntilStopped();
-        broker = createBroker(false, url);
-        broker.start();
-
-        assertTrue("receive completed through failover", receiveDone.await(30, TimeUnit.SECONDS));
-
-        assertTrue("we got our message:", !received.isEmpty());
-
-        connection.close();
-    }
-
-    private void produceMessage(final Session producerSession, Queue destination, long count)
-            throws JMSException {
-        MessageProducer producer = producerSession.createProducer(destination);
-        for (int i = 0; i < count; i++) {
-            TextMessage message = producerSession.createTextMessage("Test message " + i);
-            producer.send(message);
-        }
-        producer.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java
deleted file mode 100644
index 8998fe7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.transport.failover;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-public class FailoverRandomTest extends TestCase {
-	
-    BrokerService brokerA, brokerB;
-   
-    public void setUp() throws Exception {
-        brokerA = createBroker("A");
-        brokerB = createBroker("B");
-    }
-    
-    public void tearDown() throws Exception {
-        brokerA.stop();
-        brokerB.stop();
-    }
-    
-	private BrokerService createBroker(String name) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName("Broker"+ name);
-        broker.addConnector("tcp://localhost:0");
-        broker.getManagementContext().setCreateConnector(false);
-        broker.setPersistent(false);
-        broker.setUseJmx(false);
-        broker.start();
-        return broker;
-    }
-
-    public void testRandomConnections() throws Exception {
-        String failoverUrl = "failover:("
-            + brokerA.getTransportConnectors().get(0).getConnectUri()
-            + ","
-            + brokerB.getTransportConnectors().get(0).getConnectUri()
-            + ")";
-		ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(failoverUrl);
-		
-		
-		ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-		connection.start();
-		String brokerName1 = connection.getBrokerName();
-		assertNotNull(brokerName1);
-		connection.close();
-		
-		String brokerName2 = brokerName1;
-		int attempts = 40;
-		while (brokerName1.equals(brokerName2) && attempts-- > 0) {
-		    connection = (ActiveMQConnection) cf.createConnection();
-		    connection.start();
-		    brokerName2 = connection.getBrokerName();
-		    assertNotNull(brokerName2);
-		    connection.close();
-		}
-        assertTrue(brokerName1 + "!=" + brokerName2, !brokerName1.equals(brokerName2));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java
deleted file mode 100644
index e52b2c7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.net.URI;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-public class FailoverTimeoutTest extends TestCase {
-
-    private static final String QUEUE_NAME = "test.failovertimeout";
-    BrokerService bs;
-    URI tcpUri;
-
-    public void setUp() throws Exception {
-        bs = new BrokerService();
-        bs.setUseJmx(false);
-        bs.addConnector("tcp://localhost:0");
-        bs.start();
-        tcpUri = bs.getTransportConnectors().get(0).getConnectUri();
-    }
-
-    public void tearDown() throws Exception {
-        if (bs != null) {
-            bs.stop();
-        }
-    }
-
-    public void testTimeout() throws Exception {
-
-        long timeout = 1000;
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + tcpUri + ")?timeout=" + timeout + "&useExponentialBackOff=false");
-        Connection connection = cf.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(session
-                .createQueue(QUEUE_NAME));
-        TextMessage message = session.createTextMessage("Test message");
-        producer.send(message);
-
-        bs.stop();
-
-        try {
-            producer.send(message);
-        } catch (JMSException jmse) {
-            assertEquals("Failover timeout of " + timeout + " ms reached.", jmse.getMessage());
-        }
-
-        bs = new BrokerService();
-        bs.setUseJmx(false);
-        bs.addConnector(tcpUri);
-        bs.start();
-        bs.waitUntilStarted();
-
-        producer.send(message);
-
-        bs.stop();
-    }
-
-    public void testUpdateUris() throws Exception {
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + tcpUri + ")?useExponentialBackOff=false");
-        ActiveMQConnection connection = (ActiveMQConnection) cf.createConnection();
-        connection.start();
-        FailoverTransport failoverTransport = connection.getTransport().narrow(FailoverTransport.class);
-
-        URI[] bunchOfUnknownAndOneKnown = new URI[]{
-                new URI("tcp://unknownHost:" + tcpUri.getPort()),
-                new URI("tcp://unknownHost2:" + tcpUri.getPort()),
-                new URI("tcp://localhost:2222")};
-        failoverTransport.add(false, bunchOfUnknownAndOneKnown);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java
deleted file mode 100644
index 854e5ec..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java
+++ /dev/null
@@ -1,904 +0,0 @@
-/**
- * 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.transport.failover;
-
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.AutoFailTestSupport;
-import org.apache.activemq.TestSupport;
-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.broker.ConsumerBrokerExchange;
-import org.apache.activemq.broker.ProducerBrokerExchange;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.util.SocketProxy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.ServerSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.TransactionRolledBackException;
-import java.net.URI;
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-// see https://issues.apache.org/activemq/browse/AMQ-2473
-
-// https://issues.apache.org/activemq/browse/AMQ-2590
-public class FailoverTransactionTest extends TestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverTransactionTest.class);
-    private static final String QUEUE_NAME = "FailoverWithTx";
-    private static final String TRANSPORT_URI = "tcp://localhost:0";
-    private String url;
-    BrokerService broker;
-
-    public static Test suite() {
-        return suite(FailoverTransactionTest.class);
-    }
-
-    public void setUp() throws Exception {
-        super.setMaxTestTime(20 * 60 * 1000); // some boxes can be real slow
-        super.setAutoFail(true);
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        stopBroker();
-    }
-
-    public void stopBroker() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    private void startCleanBroker() throws Exception {
-        startBroker(true);
-    }
-
-    public void startBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        broker = createBroker(deleteAllMessagesOnStartup);
-        broker.start();
-    }
-
-    public void startBroker(boolean deleteAllMessagesOnStartup, String bindAddress) throws Exception {
-        broker = createBroker(deleteAllMessagesOnStartup, bindAddress);
-        broker.start();
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup) throws Exception {
-        return createBroker(deleteAllMessagesOnStartup, TRANSPORT_URI);
-    }
-
-    public BrokerService createBroker(boolean deleteAllMessagesOnStartup, String bindAddress) throws Exception {
-        broker = new BrokerService();
-        broker.setUseJmx(false);
-        broker.setAdvisorySupport(false);
-        broker.addConnector(bindAddress);
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessagesOnStartup);
-
-        url = broker.getTransportConnectors().get(0).getConnectUri().toString();
-
-        return broker;
-    }
-
-    public void testFailoverProducerCloseBeforeTransaction() throws Exception {
-        startCleanBroker();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        Connection connection = cf.createConnection();
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(QUEUE_NAME);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        produceMessage(session, destination);
-
-        // restart to force failover and connection state recovery before the commit
-        broker.stop();
-        startBroker(false, url);
-
-        session.commit();
-        assertNotNull("we got the message", consumer.receive(20000));
-        session.commit();
-        connection.close();
-    }
-
-    public void initCombosForTestFailoverCommitReplyLost() {
-        addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.AMQ, PersistenceAdapterChoice.JDBC});
-    }
-
-    public void testFailoverCommitReplyLost() throws Exception {
-
-        broker = createBroker(true);
-        setDefaultPersistenceAdapter(broker);
-
-        broker.setPlugins(new BrokerPlugin[]{
-                new BrokerPluginSupport() {
-                    @Override
-                    public void commitTransaction(ConnectionContext context,
-                                                  TransactionId xid, boolean onePhase) throws Exception {
-                        super.commitTransaction(context, xid, onePhase);
-                        // 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();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        Connection connection = cf.createConnection();
-        connection.start();
-        final Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(QUEUE_NAME);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        produceMessage(session, destination);
-
-        final CountDownLatch commitDoneLatch = new CountDownLatch(1);
-        // broker will die on commit reply so this will hang till restart
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("doing async commit...");
-                try {
-                    session.commit();
-                } catch (JMSException e) {
-                    assertTrue(e instanceof TransactionRolledBackException);
-                    LOG.info("got commit exception: ", e);
-                }
-                commitDoneLatch.countDown();
-                LOG.info("done async commit");
-            }
-        });
-
-        // will be stopped by the plugin
-        broker.waitUntilStopped();
-        broker = createBroker(false, url);
-        setDefaultPersistenceAdapter(broker);
-        broker.start();
-
-        assertTrue("tx committed trough failover", commitDoneLatch.await(30, TimeUnit.SECONDS));
-
-        // new transaction
-        Message msg = consumer.receive(20000);
-        LOG.info("Received: " + msg);
-        assertNotNull("we got the message", msg);
-        assertNull("we got just one message", consumer.receive(2000));
-        session.commit();
-        consumer.close();
-        connection.close();
-
-        // ensure no dangling messages with fresh broker etc
-        broker.stop();
-        broker.waitUntilStopped();
-
-        LOG.info("Checking for remaining/hung messages..");
-        broker = createBroker(false, url);
-        setDefaultPersistenceAdapter(broker);
-        broker.start();
-
-        // after restart, ensure no dangling messages
-        cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        connection = cf.createConnection();
-        connection.start();
-        Session session2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = session2.createConsumer(destination);
-        msg = consumer.receive(1000);
-        if (msg == null) {
-            msg = consumer.receive(5000);
-        }
-        LOG.info("Received: " + msg);
-        assertNull("no messges left dangling but got: " + msg, msg);
-        connection.close();
-    }
-
-
-    public void initCombosForTestFailoverSendReplyLost() {
-        addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{PersistenceAdapterChoice.KahaDB,
-                        PersistenceAdapterChoice.JDBC
-                        // not implemented for AMQ store
-                });
-    }
-
-    public void testFailoverSendReplyLost() throws Exception {
-
-        broker = createBroker(true);
-        setDefaultPersistenceAdapter(broker);
-
-        broker.setPlugins(new BrokerPlugin[]{
-                new BrokerPluginSupport() {
-                    @Override
-                    public void send(ProducerBrokerExchange producerExchange,
-                                     org.apache.activemq.command.Message messageSend)
-                            throws Exception {
-                        // so send will hang as if reply is lost
-                        super.send(producerExchange, messageSend);
-                        producerExchange.getConnectionContext().setDontSendReponse(true);
-                        Executors.newSingleThreadExecutor().execute(new Runnable() {
-                            public void run() {
-                                LOG.info("Stopping broker post send...");
-                                try {
-                                    broker.stop();
-                                } catch (Exception e) {
-                                    e.printStackTrace();
-                                }
-                            }
-                        });
-                    }
-                }
-        });
-        broker.start();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")?jms.watchTopicAdvisories=false");
-        Connection connection = cf.createConnection();
-        connection.start();
-        final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = session.createQueue(QUEUE_NAME);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        final CountDownLatch sendDoneLatch = new CountDownLatch(1);
-        // broker will die on send reply so this will hang till restart
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("doing async send...");
-                try {
-                    produceMessage(session, destination);
-                } catch (JMSException e) {
-                    //assertTrue(e instanceof TransactionRolledBackException);
-                    LOG.error("got send exception: ", e);
-                    fail("got unexpected send exception" + e);
-                }
-                sendDoneLatch.countDown();
-                LOG.info("done async send");
-            }
-        });
-
-        // will be stopped by the plugin
-        broker.waitUntilStopped();
-        broker = createBroker(false, url);
-        setDefaultPersistenceAdapter(broker);
-        LOG.info("restarting....");
-        broker.start();
-
-        assertTrue("message sent through failover", sendDoneLatch.await(30, TimeUnit.SECONDS));
-
-        // new transaction
-        Message msg = consumer.receive(20000);
-        LOG.info("Received: " + msg);
-        assertNotNull("we got the message", msg);
-        assertNull("we got just one message", consumer.receive(2000));
-        consumer.close();
-        connection.close();
-
-        // verify stats
-        assertEquals("no newly queued messages", 0, ((RegionBroker) broker.getRegionBroker()).getDestinationStatistics().getEnqueues().getCount());
-        assertEquals("1 dequeue", 1, ((RegionBroker) broker.getRegionBroker()).getDestinationStatistics().getDequeues().getCount());
-
-        // ensure no dangling messages with fresh broker etc
-        broker.stop();
-        broker.waitUntilStopped();
-
-        LOG.info("Checking for remaining/hung messages with second restart..");
-        broker = createBroker(false, url);
-        setDefaultPersistenceAdapter(broker);
-        broker.start();
-
-        // after restart, ensure no dangling messages
-        cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        connection = cf.createConnection();
-        connection.start();
-        Session session2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = session2.createConsumer(destination);
-        msg = consumer.receive(1000);
-        if (msg == null) {
-            msg = consumer.receive(5000);
-        }
-        LOG.info("Received: " + msg);
-        assertNull("no messges left dangling but got: " + msg, msg);
-        connection.close();
-    }
-
-
-    public void initCombosForTestFailoverConnectionSendReplyLost() {
-        addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{PersistenceAdapterChoice.KahaDB,
-                        PersistenceAdapterChoice.JDBC
-                        // last producer message id store feature not implemented for AMQ store
-                });
-    }
-
-    public void testFailoverConnectionSendReplyLost() throws Exception {
-
-        broker = createBroker(true);
-        PersistenceAdapter store = setDefaultPersistenceAdapter(broker);
-        if (store instanceof KahaDBPersistenceAdapter) {
-            // duplicate checker not updated on canceled tasks, even it
-            // it was, recovery of the audit would fail as the message is
-            // not recorded in the store and the audit may not be up to date.
-            // So if duplicate messages are a absolute no no after restarts,
-            // ConcurrentStoreAndDispatchQueues must be disabled
-            ((KahaDBPersistenceAdapter) store).setConcurrentStoreAndDispatchQueues(false);
-        }
-
-        final SocketProxy proxy = new SocketProxy();
-
-        broker.setPlugins(new BrokerPlugin[]{
-                new BrokerPluginSupport() {
-                    private boolean firstSend = true;
-
-                    @Override
-                    public void send(ProducerBrokerExchange producerExchange,
-                                     org.apache.activemq.command.Message messageSend)
-                            throws Exception {
-                        // so send will hang as if reply is lost
-                        super.send(producerExchange, messageSend);
-                        if (firstSend) {
-                            firstSend = false;
-
-                            producerExchange.getConnectionContext().setDontSendReponse(true);
-                            Executors.newSingleThreadExecutor().execute(new Runnable() {
-                                public void run() {
-                                    LOG.info("Stopping connection post send...");
-                                    try {
-                                        proxy.close();
-                                    } catch (Exception e) {
-                                        e.printStackTrace();
-                                    }
-                                }
-                            });
-                        }
-                    }
-                }
-        });
-        broker.start();
-
-        proxy.setTarget(new URI(url));
-        proxy.open();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + proxy.getUrl().toASCIIString() + ")?jms.watchTopicAdvisories=false");
-        Connection connection = cf.createConnection();
-        connection.start();
-        final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = session.createQueue(QUEUE_NAME);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        final CountDownLatch sendDoneLatch = new CountDownLatch(1);
-        // proxy connection will die on send reply so this will hang on failover reconnect till open
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("doing async send...");
-                try {
-                    produceMessage(session, destination);
-                } catch (JMSException e) {
-                    //assertTrue(e instanceof TransactionRolledBackException);
-                    LOG.info("got send exception: ", e);
-                }
-                sendDoneLatch.countDown();
-                LOG.info("done async send");
-            }
-        });
-
-        // will be closed by the plugin
-        assertTrue("proxy was closed", proxy.waitUntilClosed(30));
-        LOG.info("restarting proxy");
-        proxy.open();
-
-        assertTrue("message sent through failover", sendDoneLatch.await(30, TimeUnit.SECONDS));
-
-        Message msg = consumer.receive(20000);
-        LOG.info("Received: " + msg);
-        assertNotNull("we got the message", msg);
-        assertNull("we got just one message", consumer.receive(2000));
-        consumer.close();
-        connection.close();
-
-        // verify stats, connection dup suppression means dups don't get to broker
-        assertEquals("one queued message", 1, ((RegionBroker) broker.getRegionBroker()).getDestinationStatistics().getEnqueues().getCount());
-
-        // ensure no dangling messages with fresh broker etc
-        broker.stop();
-        broker.waitUntilStopped();
-
-        LOG.info("Checking for remaining/hung messages with restart..");
-        broker = createBroker(false, url);
-        setDefaultPersistenceAdapter(broker);
-        broker.start();
-
-        // after restart, ensure no dangling messages
-        cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        connection = cf.createConnection();
-        connection.start();
-        Session session2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = session2.createConsumer(destination);
-        msg = consumer.receive(1000);
-        if (msg == null) {
-            msg = consumer.receive(5000);
-        }
-        LOG.info("Received: " + msg);
-        assertNull("no messges left dangling but got: " + msg, msg);
-        connection.close();
-    }
-
-    public void testFailoverProducerCloseBeforeTransactionFailWhenDisabled() throws Exception {
-        startCleanBroker();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")?trackTransactionProducers=false");
-        Connection connection = cf.createConnection();
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(QUEUE_NAME);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        produceMessage(session, destination);
-
-        // restart to force failover and connection state recovery before the commit
-        broker.stop();
-        startBroker(false, url);
-
-        session.commit();
-
-        // without tracking producers, message will not be replayed on recovery
-        assertNull("we got the message", consumer.receive(5000));
-        session.commit();
-        connection.close();
-    }
-
-    public void testFailoverMultipleProducerCloseBeforeTransaction() throws Exception {
-        startCleanBroker();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        Connection connection = cf.createConnection();
-        connection.start();
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(QUEUE_NAME);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer;
-        TextMessage message;
-        final int count = 10;
-        for (int i = 0; i < count; i++) {
-            producer = session.createProducer(destination);
-            message = session.createTextMessage("Test message: " + count);
-            producer.send(message);
-            producer.close();
-        }
-
-        // restart to force failover and connection state recovery before the commit
-        broker.stop();
-        startBroker(false, url);
-
-        session.commit();
-        for (int i = 0; i < count; i++) {
-            assertNotNull("we got all the message: " + count, consumer.receive(20000));
-        }
-        session.commit();
-        connection.close();
-    }
-
-    // https://issues.apache.org/activemq/browse/AMQ-2772
-    public void testFailoverWithConnectionConsumer() throws Exception {
-        startCleanBroker();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        Connection connection = cf.createConnection();
-        connection.start();
-
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        Queue destination = session.createQueue(QUEUE_NAME);
-
-        final CountDownLatch connectionConsumerGotOne = new CountDownLatch(1);
-        final Session poolSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        connection.createConnectionConsumer(destination, null, new ServerSessionPool() {
-            public ServerSession getServerSession() throws JMSException {
-                return new ServerSession() {
-                    public Session getSession() throws JMSException {
-                        return poolSession;
-                    }
-
-                    public void start() throws JMSException {
-                        connectionConsumerGotOne.countDown();
-                        poolSession.run();
-                    }
-                };
-            }
-        }, 1);
-
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer;
-        TextMessage message;
-        final int count = 10;
-        for (int i = 0; i < count; i++) {
-            producer = session.createProducer(destination);
-            message = session.createTextMessage("Test message: " + count);
-            producer.send(message);
-            producer.close();
-        }
-
-        // restart to force failover and connection state recovery before the commit
-        broker.stop();
-        startBroker(false, url);
-
-        session.commit();
-        for (int i = 0; i < count - 1; i++) {
-            assertNotNull("we got all the message: " + count, consumer.receive(20000));
-        }
-        session.commit();
-        connection.close();
-
-        assertTrue("connectionconsumer got a message", connectionConsumerGotOne.await(10, TimeUnit.SECONDS));
-    }
-
-    public void testFailoverConsumerAckLost() throws Exception {
-        // as failure depends on hash order of state tracker recovery, do a few times
-        for (int i = 0; i < 3; i++) {
-            try {
-                doTestFailoverConsumerAckLost(i);
-            } finally {
-                stopBroker();
-            }
-        }
-    }
-
-    public void doTestFailoverConsumerAckLost(final int pauseSeconds) throws Exception {
-        broker = createBroker(true);
-        setDefaultPersistenceAdapter(broker);
-
-        broker.setPlugins(new BrokerPlugin[]{
-                new BrokerPluginSupport() {
-
-                    // broker is killed on delivered ack as prefetch is 1
-                    @Override
-                    public void acknowledge(
-                            ConsumerBrokerExchange consumerExchange,
-                            final MessageAck ack) throws Exception {
-
-                        consumerExchange.getConnectionContext().setDontSendReponse(true);
-                        Executors.newSingleThreadExecutor().execute(new Runnable() {
-                            public void run() {
-                                LOG.info("Stopping broker on ack: " + ack);
-                                try {
-                                    broker.stop();
-                                } catch (Exception e) {
-                                    e.printStackTrace();
-                                }
-                            }
-                        });
-                    }
-                }
-        });
-        broker.start();
-
-        Vector<Connection> connections = new Vector<Connection>();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        Connection connection = cf.createConnection();
-        connection.start();
-        connections.add(connection);
-        final Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = producerSession.createQueue(QUEUE_NAME + "?consumer.prefetchSize=1");
-
-        connection = cf.createConnection();
-        connection.start();
-        connections.add(connection);
-        final Session consumerSession1 = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-
-        connection = cf.createConnection();
-        connection.start();
-        connections.add(connection);
-        final Session consumerSession2 = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-
-        final MessageConsumer consumer1 = consumerSession1.createConsumer(destination);
-        final MessageConsumer consumer2 = consumerSession2.createConsumer(destination);
-
-        produceMessage(producerSession, destination);
-        produceMessage(producerSession, destination);
-
-        final Vector<Message> receivedMessages = new Vector<Message>();
-        final CountDownLatch commitDoneLatch = new CountDownLatch(1);
-        final AtomicBoolean gotTransactionRolledBackException = new AtomicBoolean(false);
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("doing async commit after consume...");
-                try {
-                    Message msg = consumer1.receive(20000);
-                    LOG.info("consumer1 first attempt got message: " + msg);
-                    receivedMessages.add(msg);
-
-                    // give some variance to the runs
-                    TimeUnit.SECONDS.sleep(pauseSeconds * 2);
-
-                    // should not get a second message as there are two messages and two consumers
-                    // and prefetch=1, but with failover and unordered connection restore it can get the second
-                    // message.
-
-                    // For the transaction to complete it needs to get the same one or two messages
-                    // again so that the acks line up.
-                    // If redelivery order is different, the commit should fail with an ex
-                    //
-                    msg = consumer1.receive(5000);
-                    LOG.info("consumer1 second attempt got message: " + msg);
-                    if (msg != null) {
-                        receivedMessages.add(msg);
-                    }
-
-                    LOG.info("committing consumer1 session: " + receivedMessages.size() + " messsage(s)");
-                    try {
-                        consumerSession1.commit();
-                    } catch (JMSException expectedSometimes) {
-                        LOG.info("got exception ex on commit", expectedSometimes);
-                        if (expectedSometimes instanceof TransactionRolledBackException) {
-                            gotTransactionRolledBackException.set(true);
-                            // ok, message one was not replayed so we expect the rollback
-                        } else {
-                            throw expectedSometimes;
-                        }
-
-                    }
-                    commitDoneLatch.countDown();
-                    LOG.info("done async commit");
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-
-
-        // will be stopped by the plugin
-        broker.waitUntilStopped();
-        broker = createBroker(false, url);
-        setDefaultPersistenceAdapter(broker);
-        broker.start();
-
-        assertTrue("tx committed trough failover", commitDoneLatch.await(30, TimeUnit.SECONDS));
-
-        LOG.info("received message count: " + receivedMessages.size());
-
-        // new transaction
-        Message msg = consumer1.receive(gotTransactionRolledBackException.get() ? 5000 : 20000);
-        LOG.info("post: from consumer1 received: " + msg);
-        if (gotTransactionRolledBackException.get()) {
-            assertNotNull("should be available again after commit rollback ex", msg);
-        } else {
-            assertNull("should be nothing left for consumer as recieve should have committed", msg);
-        }
-        consumerSession1.commit();
-
-        if (gotTransactionRolledBackException.get() ||
-                !gotTransactionRolledBackException.get() && receivedMessages.size() == 1) {
-            // just one message successfully consumed or none consumed
-            // consumer2 should get other message
-            msg = consumer2.receive(10000);
-            LOG.info("post: from consumer2 received: " + msg);
-            assertNotNull("got second message on consumer2", msg);
-            consumerSession2.commit();
-        }
-
-        for (Connection c : connections) {
-            c.close();
-        }
-
-        // ensure no dangling messages with fresh broker etc
-        broker.stop();
-        broker.waitUntilStopped();
-
-        LOG.info("Checking for remaining/hung messages..");
-        broker = createBroker(false, url);
-        setDefaultPersistenceAdapter(broker);
-        broker.start();
-
-        // after restart, ensure no dangling messages
-        cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        connection = cf.createConnection();
-        connection.start();
-        Session sweeperSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer sweeper = sweeperSession.createConsumer(destination);
-        msg = sweeper.receive(1000);
-        if (msg == null) {
-            msg = sweeper.receive(5000);
-        }
-        LOG.info("Sweep received: " + msg);
-        assertNull("no messges left dangling but got: " + msg, msg);
-        connection.close();
-    }
-
-    public void testAutoRollbackWithMissingRedeliveries() throws Exception {
-        broker = createBroker(true);
-        broker.start();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")");
-        Connection connection = cf.createConnection();
-        connection.start();
-        final Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = producerSession.createQueue(QUEUE_NAME + "?consumer.prefetchSize=1");
-        final Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = consumerSession.createConsumer(destination);
-
-        produceMessage(producerSession, destination);
-
-        Message msg = consumer.receive(20000);
-        assertNotNull(msg);
-
-        broker.stop();
-        broker = createBroker(false, url);
-        // use empty jdbc store so that default wait(0) for redeliveries will timeout after failover
-        setPersistenceAdapter(broker, PersistenceAdapterChoice.JDBC);
-        broker.start();
-
-        try {
-            consumerSession.commit();
-            fail("expected transaciton rolledback ex");
-        } catch (TransactionRolledBackException expected) {
-        }
-
-        broker.stop();
-        broker = createBroker(false, url);
-        broker.start();
-
-        assertNotNull("should get rolledback message from original restarted broker", consumer.receive(20000));
-        connection.close();
-    }
-
-
-    public void testWaitForMissingRedeliveries() throws Exception {
-        LOG.info("testWaitForMissingRedeliveries()");
-        broker = createBroker(true);
-        broker.start();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")?jms.consumerFailoverRedeliveryWaitPeriod=30000");
-        Connection connection = cf.createConnection();
-        connection.start();
-        final Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = producerSession.createQueue(QUEUE_NAME);
-        final Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = consumerSession.createConsumer(destination);
-
-        produceMessage(producerSession, destination);
-        Message msg = consumer.receive(20000);
-        if (msg == null) {
-            AutoFailTestSupport.dumpAllThreads("missing-");
-        }
-        assertNotNull("got message just produced", msg);
-
-        broker.stop();
-        broker = createBroker(false, url);
-        // use empty jdbc store so that wait for re-deliveries occur when failover resumes
-        setPersistenceAdapter(broker, PersistenceAdapterChoice.JDBC);
-        broker.start();
-
-        final CountDownLatch commitDone = new CountDownLatch(1);
-        // will block pending re-deliveries
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("doing async commit...");
-                try {
-                    consumerSession.commit();
-                    commitDone.countDown();
-                } catch (JMSException ignored) {
-                }
-            }
-        });
-
-        broker.stop();
-        broker = createBroker(false, url);
-        broker.start();
-
-        assertTrue("commit was successful", commitDone.await(30, TimeUnit.SECONDS));
-
-        assertNull("should not get committed message", consumer.receive(5000));
-        connection.close();
-    }
-
-
-    public void testPoisonOnDeliveryWhilePending() throws Exception {
-        LOG.info("testPoisonOnDeliveryWhilePending()");
-        broker = createBroker(true);
-        broker.start();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + url + ")?jms.consumerFailoverRedeliveryWaitPeriod=10000");
-        Connection connection = cf.createConnection();
-        connection.start();
-        final Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final Queue destination = producerSession.createQueue(QUEUE_NAME + "?consumer.prefetchSize=0");
-        final Session consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-        MessageConsumer consumer = consumerSession.createConsumer(destination);
-
-        produceMessage(producerSession, destination);
-        Message msg = consumer.receive(20000);
-        if (msg == null) {
-            AutoFailTestSupport.dumpAllThreads("missing-");
-        }
-        assertNotNull("got message just produced", msg);
-
-        // add another consumer into the mix that may get the message after restart
-        MessageConsumer consumer2 = consumerSession.createConsumer(consumerSession.createQueue(QUEUE_NAME + "?consumer.prefetchSize=1"));
-
-        broker.stop();
-        broker = createBroker(false, url);
-        broker.start();
-
-        final CountDownLatch commitDone = new CountDownLatch(1);
-
-        final Vector<Exception> exceptions = new Vector<Exception>();
-
-        // commit may fail if other consumer gets the message on restart, it will be seen a a duplicate on teh connection
-        // but with no transaciton and it pending on another consumer it will be posion
-        Executors.newSingleThreadExecutor().execute(new Runnable() {
-            public void run() {
-                LOG.info("doing async commit...");
-                try {
-                    consumerSession.commit();
-                } catch (JMSException ex) {
-                    exceptions.add(ex);
-                } finally {
-                    commitDone.countDown();
-                }
-            }
-        });
-
-        assertNull("consumer2 not get a message while pending to 1 or consumed by 1", consumer2.receive(2000));
-
-        assertTrue("commit completed ", commitDone.await(15, TimeUnit.SECONDS));
-
-        // either message consumed or sent to dlq via poison on redelivery to wrong consumer
-        // message should not be available again in any event
-        assertNull("consumer should not get rolledback on non redelivered message or duplicate", consumer.receive(5000));
-
-        // consumer replay is hashmap order dependent on a failover connection state recover so need to deal with both cases
-        if (exceptions.isEmpty()) {
-            // commit succeeded, message was redelivered to the correct consumer after restart so commit was fine
-        } else {
-            // message should be in dlq
-            MessageConsumer dlqConsumer = consumerSession.createConsumer(consumerSession.createQueue("ActiveMQ.DLQ"));
-            TextMessage dlqMessage = (TextMessage) dlqConsumer.receive(5000);
-            assertNotNull("found message in dlq", dlqMessage);
-            assertEquals("text matches", "Test message", dlqMessage.getText());
-            consumerSession.commit();
-        }
-        connection.close();
-    }
-
-    private void produceMessage(final Session producerSession, Queue destination)
-            throws JMSException {
-        MessageProducer producer = producerSession.createProducer(destination);
-        TextMessage message = producerSession.createTextMessage("Test message");
-        producer.send(message);
-        producer.close();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
deleted file mode 100755
index 2e8831f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.network.NetworkTestSupport;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.multicast.MulticastTransportTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class FailoverTransportBrokerTest extends NetworkTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverTransportBrokerTest.class);
-
-    public ActiveMQDestination destination;
-    public int deliveryMode;
-
-    public void initCombosForTestPublisherFailsOver() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")});
-    }
-
-    public void testPublisherFailsOver() throws Exception {
-
-        // Start a normal consumer on the local broker
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.request(consumerInfo1);
-
-        // Start a normal consumer on a remote broker
-        StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        // Start a failover publisher.
-        LOG.info("Starting the failover connection.");
-        StubConnection connection3 = createFailoverConnection(null);
-        ConnectionInfo connectionInfo3 = createConnectionInfo();
-        SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
-        ProducerInfo producerInfo3 = createProducerInfo(sessionInfo3);
-        connection3.send(connectionInfo3);
-        connection3.send(sessionInfo3);
-        connection3.send(producerInfo3);
-
-        // Send the message using the fail over publisher.
-        connection3.request(createMessage(producerInfo3, destination, deliveryMode));
-
-        // The message will be sent to one of the brokers.
-        FailoverTransport ft = connection3.getTransport().narrow(FailoverTransport.class);
-
-        // See which broker we were connected to.
-        StubConnection connectionA;
-        StubConnection connectionB;
-        TransportConnector serverA;
-        if (connector.getServer().getConnectURI().equals(ft.getConnectedTransportURI())) {
-            connectionA = connection1;
-            connectionB = connection2;
-            serverA = connector;
-        } else {
-            connectionA = connection2;
-            connectionB = connection1;
-            serverA = remoteConnector;
-        }
-
-        assertNotNull(receiveMessage(connectionA));
-        assertNoMessagesLeft(connectionB);
-
-        // Dispose the server so that it fails over to the other server.
-        LOG.info("Disconnecting the active connection");
-        serverA.stop();
-
-        connection3.request(createMessage(producerInfo3, destination, deliveryMode));
-
-        assertNotNull(receiveMessage(connectionB));
-        assertNoMessagesLeft(connectionA);
-
-    }
-
-    public void testNoBrokersInBrokerInfo() throws Exception {
-        final BrokerInfo info[] = new BrokerInfo[1];
-        TransportListener listener = new TransportListener() {
-            @Override
-            public void onCommand(Object command) {
-                LOG.info("Got command: " + command);
-                if (command instanceof BrokerInfo) {
-                    info[0] = (BrokerInfo) command;
-                }
-            }
-
-            @Override
-            public void onException(IOException error) {
-                //To change body of implemented methods use File | Settings | File Templates.
-            }
-
-            @Override
-            public void transportInterupted() {
-                //To change body of implemented methods use File | Settings | File Templates.
-            }
-
-            @Override
-            public void transportResumed() {
-                //To change body of implemented methods use File | Settings | File Templates.
-            }
-        };
-        StubConnection c = createFailoverConnection(listener);
-        int count = 0;
-        while(count++ < 20 && info[0] == null) {
-            TimeUnit.SECONDS.sleep(1);
-        }
-        assertNotNull("got a valid brokerInfo after 20 secs", info[0]);
-        assertNull("no peer brokers present", info[0].getPeerBrokerInfos());
-    }
-
-    protected String getLocalURI() {
-        return "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true";
-    }
-
-    protected String getRemoteURI() {
-        return "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true";
-    }
-
-    protected StubConnection createFailoverConnection(TransportListener listener) throws Exception {
-        URI failoverURI = new URI("failover://" + connector.getServer().getConnectURI() + "," + remoteConnector.getServer().getConnectURI() + "");
-        Transport transport = TransportFactory.connect(failoverURI);
-        StubConnection connection = new StubConnection(transport, listener);
-        connections.add(connection);
-        return connection;
-    }
-
-    public static Test suite() {
-        return suite(FailoverTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java
deleted file mode 100644
index 5865425..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUpdateURIsTest.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.util.concurrent.TimeUnit;
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-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.network.NetworkConnector;
-import org.apache.log4j.Logger;
-
-public class FailoverUpdateURIsTest extends TestCase {
-
-    private static final String QUEUE_NAME = "test.failoverupdateuris";
-    private static final Logger LOG = Logger.getLogger(FailoverUpdateURIsTest.class);
-
-    String firstTcpUri = "tcp://localhost:61616";
-    String secondTcpUri = "tcp://localhost:61626";
-    Connection connection = null;
-    BrokerService bs2 = null;
-
-    public void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        if (bs2 != null) {
-            bs2.stop();
-        }
-    }
-
-    public void testUpdateURIsViaFile() throws Exception {
-
-        String targetDir = "target/" + getName();
-        new File(targetDir).mkdir();
-        File updateFile = new File(targetDir + "/updateURIsFile.txt");
-        LOG.info(updateFile);
-        LOG.info(updateFile.toURI());
-        LOG.info(updateFile.getAbsoluteFile());
-        LOG.info(updateFile.getAbsoluteFile().toURI());
-        FileOutputStream out = new FileOutputStream(updateFile);
-        out.write(firstTcpUri.getBytes());
-        out.close();
-
-        BrokerService bs1 = createBroker("bs1", firstTcpUri);
-        bs1.start();
-
-        // no failover uri's to start with, must be read from file...
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:()?updateURIsURL=file:///" + updateFile.getAbsoluteFile());
-        connection = cf.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue theQueue = session.createQueue(QUEUE_NAME);
-        MessageProducer producer = session.createProducer(theQueue);
-        MessageConsumer consumer = session.createConsumer(theQueue);
-        Message message = session.createTextMessage("Test message");
-        producer.send(message);
-        Message msg = consumer.receive(2000);
-        assertNotNull(msg);
-
-        bs1.stop();
-        bs1.waitUntilStopped();
-
-        bs2 = createBroker("bs2", secondTcpUri);
-        bs2.start();
-
-        // add the transport uri for broker number 2
-        out = new FileOutputStream(updateFile, true);
-        out.write(",".getBytes());
-        out.write(secondTcpUri.toString().getBytes());
-        out.close();
-
-        producer.send(message);
-        msg = consumer.receive(2000);
-        assertNotNull(msg);
-    }
-
-    private BrokerService createBroker(String name, String tcpUri) throws Exception {
-        BrokerService bs = new BrokerService();
-        bs.setBrokerName(name);
-        bs.setUseJmx(false);
-        bs.setPersistent(false);
-        bs.addConnector(tcpUri);
-        return bs;
-    }
-
-    public void testAutoUpdateURIs() throws Exception {
-
-        BrokerService bs1 = new BrokerService();
-        bs1.setUseJmx(false);
-        TransportConnector transportConnector = bs1.addConnector(firstTcpUri);
-        transportConnector.setUpdateClusterClients(true);
-        bs1.start();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + firstTcpUri + ")");
-        Connection connection = cf.createConnection();
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue theQueue = session.createQueue(QUEUE_NAME);
-        MessageProducer producer = session.createProducer(theQueue);
-        MessageConsumer consumer = session.createConsumer(theQueue);
-        Message message = session.createTextMessage("Test message");
-        producer.send(message);
-        Message msg = consumer.receive(4000);
-        assertNotNull(msg);
-
-        bs2 = createBroker("bs2", secondTcpUri);
-        NetworkConnector networkConnector = bs2.addNetworkConnector("static:(" + firstTcpUri + ")");
-        networkConnector.setDuplex(true);
-        bs2.start();
-        LOG.info("started brokerService 2");
-        bs2.waitUntilStarted();
-
-        TimeUnit.SECONDS.sleep(4);
-
-        LOG.info("stopping brokerService 1");
-        bs1.stop();
-        bs1.waitUntilStopped();
-
-        producer.send(message);
-        msg = consumer.receive(4000);
-        assertNotNull(msg);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
deleted file mode 100644
index ebdaf85..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**

- * 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.transport.failover;

-

-import junit.framework.Test;

-

-import org.apache.activemq.transport.tcp.TransportUriTest;

-

-public class FailoverUriTest extends TransportUriTest {

-	

-    public void initCombosForTestUriOptionsWork() {

-		addCombinationValues("prefix", new Object[] {"failover:(", "failover://("});

-		addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"

-				, "?wireFormat.tightEncodingEnabled=false)?jms.useAsyncSend=true&jms.copyMessageOnSend=false"

-				, "?wireFormat.maxInactivityDuration=0&keepAlive=true)?jms.prefetchPolicy.all=500&initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false"});

-	}

-	

-	public void initCombosForTestBadVersionNumberDoesNotWork() {

-		addCombinationValues("prefix", new Object[] {"failover:("});

-		addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"});

-	}

-	

-	public void initCombosForTestBadPropertyNameFails() {

-		addCombinationValues("prefix", new Object[] {"failover:("});

-		addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"});

-	}

-	

-    public static Test suite() {

-    	return suite(FailoverUriTest.class);

-    }

-}

diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java
deleted file mode 100644
index a717d2f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.mock.MockTransport;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ReconnectTest extends TestCase {
-
-    public static final int MESSAGES_PER_ITTERATION = 10;
-    public static final int WORKER_COUNT = 10;
-
-    private static final Logger LOG = LoggerFactory.getLogger(ReconnectTest.class);
-
-    private BrokerService bs;
-    private URI tcpUri;
-    private final AtomicInteger resumedCount = new AtomicInteger();
-    private final AtomicInteger interruptedCount = new AtomicInteger();
-    private Worker[] workers;
-
-    class Worker implements Runnable {
-
-        public AtomicInteger iterations = new AtomicInteger();
-        public CountDownLatch stopped = new CountDownLatch(1);
-
-        private final ActiveMQConnection connection;
-        private final AtomicBoolean stop = new AtomicBoolean(false);
-        private Throwable error;
-        private final String name;
-
-        public Worker(final String name) throws URISyntaxException, JMSException {
-            this.name=name;
-            URI uri = new URI("failover://(mock://(" + tcpUri + "))?updateURIsSupported=false");
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(uri);
-            connection = (ActiveMQConnection)factory.createConnection();
-            connection.addTransportListener(new TransportListener() {
-                public void onCommand(Object command) {
-                }
-
-                public void onException(IOException error) {
-                    setError(error);
-                }
-
-                public void transportInterupted() {
-                    LOG.info("Worker "+name+" was interrupted...");
-                    interruptedCount.incrementAndGet();
-                }
-
-                public void transportResumed() {
-                    LOG.info("Worker "+name+" was resummed...");
-                    resumedCount.incrementAndGet();
-                }
-            });
-            connection.start();
-        }
-
-        public void failConnection() {
-            MockTransport mockTransport = connection.getTransportChannel().narrow(MockTransport.class);
-            mockTransport.onException(new IOException("Simulated error"));
-        }
-
-        public void start() {
-            new Thread(this).start();
-        }
-
-        public void stop() {
-            stop.set(true);
-            try {
-                if (!stopped.await(5, TimeUnit.SECONDS)) {
-                    connection.close();
-                    stopped.await(5, TimeUnit.SECONDS);
-                } else {
-                    connection.close();
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-
-        public void run() {
-            try {
-                ActiveMQQueue queue = new ActiveMQQueue("FOO_"+name);
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                MessageConsumer consumer = session.createConsumer(queue);
-                MessageProducer producer = session.createProducer(queue);
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-                while (!stop.get()) {
-                    for (int i = 0; i < MESSAGES_PER_ITTERATION; i++) {
-                        producer.send(session.createTextMessage("TEST:" + i));
-                    }
-                    for (int i = 0; i < MESSAGES_PER_ITTERATION; i++) {
-                        consumer.receive();
-                    }
-                    iterations.incrementAndGet();
-                }
-                session.close();
-            } catch (JMSException e) {
-                setError(e);
-            } finally {
-                stopped.countDown();
-            }
-        }
-
-        public synchronized Throwable getError() {
-            return error;
-        }
-
-        public synchronized void setError(Throwable error) {
-            this.error = error;
-        }
-
-        public synchronized void assertNoErrors() {
-            if (error != null) {
-                error.printStackTrace();
-                fail("Worker "+name+" got Exception: " + error);
-            }
-        }
-
-    }
-
-    public void testReconnects() throws Exception {
-
-        for (int k = 1; k < 10; k++) {
-
-            LOG.info("Test run: " + k);
-
-            // Wait for at least one iteration to occur...
-            for (int i = 0; i < WORKER_COUNT; i++) {
-               int c=0;
-                for (int j = 0; j < 30; j++) {
-                       c = workers[i].iterations.getAndSet(0);
-                       if( c != 0 ) {
-                               break;
-                       }
-                    workers[i].assertNoErrors();
-                    LOG.info("Test run "+k+": Waiting for worker " + i + " to finish an iteration.");
-                    Thread.sleep(1000);
-                }
-                assertTrue("Test run "+k+": Worker " + i + " never completed an interation.", c != 0);
-                workers[i].assertNoErrors();
-            }
-
-            LOG.info("Simulating transport error to cause reconnect.");
-
-            // Simulate a transport failure.
-            for (int i = 0; i < WORKER_COUNT; i++) {
-                workers[i].failConnection();
-            }
-
-            long start;
-            // Wait for the connections to get interrupted...
-            start = System.currentTimeMillis();
-            while (interruptedCount.get() < WORKER_COUNT) {
-               if( System.currentTimeMillis()-start > 1000*60 ) {
-                      fail("Timed out waiting for all connections to be interrupted.");
-               }
-                LOG.info("Test run "+k+": Waiting for connections to get interrupted.. at: " + interruptedCount.get());
-                Thread.sleep(1000);
-            }
-
-            // Wait for the connections to re-establish...
-            start = System.currentTimeMillis();
-            while (resumedCount.get() < WORKER_COUNT) {
-               if( System.currentTimeMillis()-start > 1000*60 ) {
-                       fail("Timed out waiting for all connections to be resumed.");
-               }
-                LOG.info("Test run "+k+": Waiting for connections to get resumed.. at: " + resumedCount.get());
-                Thread.sleep(1000);
-            }
-
-            // Reset the counters..
-            interruptedCount.set(0);
-            resumedCount.set(0);
-            for (int i = 0; i < WORKER_COUNT; i++) {
-                workers[i].iterations.set(0);
-            }
-            
-            Thread.sleep(1000);
-
-        }
-
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bs = new BrokerService();
-        bs.setPersistent(false);
-        bs.setUseJmx(true);
-        TransportConnector connector = bs.addConnector("tcp://localhost:0");
-        bs.start();
-        tcpUri = connector.getConnectUri();
-
-        workers = new Worker[WORKER_COUNT];
-        for (int i = 0; i < WORKER_COUNT; i++) {
-            workers[i] = new Worker(""+i);
-            workers[i].start();
-        }
-
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        for (int i = 0; i < WORKER_COUNT; i++) {
-            workers[i].stop();
-        }
-        new ServiceStopper().stop(bs);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/SlowConnectionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/SlowConnectionTest.java
deleted file mode 100644
index 5a132a2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/SlowConnectionTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.transport.failover;
-
-import java.io.IOException;
-import java.net.*;
-import java.util.*;
-
-import javax.jms.Connection;
-import javax.net.ServerSocketFactory;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-public class SlowConnectionTest extends TestCase {
-        
-    public void testSlowConnection() throws Exception {
-        
-        int timeout = 1000;
-        URI tcpUri = new URI("tcp://localhost:61616?soTimeout=" + timeout + "&trace=true&connectionTimeout=" + timeout + "&wireFormat.maxInactivityDurationInitalDelay=" + timeout);
-        
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + tcpUri + ")");
-        final Connection connection = cf.createConnection();
-        
-        MockBroker broker = new MockBroker();
-        broker.start();
-        
-        new Thread(new Runnable() {
-            public void run() {
-                try { connection.start(); } catch (Throwable ignored) {}
-            }
-        }).start();
-        
-        Thread.sleep(timeout * 5);
-        
-        int count = 0;
-        for (Thread thread : Thread.getAllStackTraces().keySet()) {
-            if (thread.getName().contains("ActiveMQ Transport")) { count++; }
-        }
-        
-        broker.interrupt();
-        broker.join();
-        
-        assertTrue("Transport count: " + count + ", expected <= 1", count <= 1);        
-    }   
-    
-    class MockBroker extends Thread {
-        
-        public void run() {
-            
-            List<Socket> inProgress = new ArrayList<Socket>();
-            ServerSocketFactory factory = ServerSocketFactory.getDefault();
-            ServerSocket ss = null;
-            
-            try {
-                ss = factory.createServerSocket(61616);
-                
-                while (!interrupted()) {
-                    inProgress.add(ss.accept());    // eat socket
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            } finally {
-                try { ss.close(); } catch (IOException ignored) {}
-                for (Socket s : inProgress) {               
-                    try { s.close(); } catch (IOException ignored) {}
-                }               
-            }           
-        }
-    }
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTest.java
deleted file mode 100644
index 62104d4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.transport.fanout;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.MessageIdList;
-
-public class FanoutTest extends TestCase {
-
-    BrokerService broker1;
-    BrokerService broker2;
-    
-    ActiveMQConnectionFactory producerFactory = new ActiveMQConnectionFactory("fanout:(static:(tcp://localhost:61616,tcp://localhost:61617))?fanOutQueues=true");
-    Connection producerConnection;
-    Session producerSession;
-    int messageCount = 100;
-
-    public void setUp() throws Exception {
-        broker1 = BrokerFactory.createBroker("broker:(tcp://localhost:61616)/brokerA?persistent=false&useJmx=false");
-        broker2 = BrokerFactory.createBroker("broker:(tcp://localhost:61617)/brokerB?persistent=false&useJmx=false");
-        
-        broker1.start();
-        broker2.start();
-        
-        broker1.waitUntilStarted();
-        broker2.waitUntilStarted();
-        
-        producerConnection = producerFactory.createConnection();
-        producerConnection.start();
-        producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-    
-    public void tearDown() throws Exception {
-        producerSession.close();
-        producerConnection.close();
-        
-        broker1.stop();
-        broker2.stop();
-    }
-    
-    public void testSendReceive() throws Exception {
-
-        MessageProducer prod = createProducer();
-        for (int i = 0; i < messageCount; i++) {
-            Message msg = producerSession.createTextMessage("Message " + i);
-            prod.send(msg);
-        }
-        prod.close();
-        
-        assertMessagesReceived("tcp://localhost:61616");
-        assertMessagesReceived("tcp://localhost:61617");
-        
-    }
-    
-    protected MessageProducer createProducer() throws Exception {
-        return producerSession.createProducer(producerSession.createQueue("TEST"));   
-    }
-    
-    protected void assertMessagesReceived(String brokerURL) throws Exception {
-        ActiveMQConnectionFactory consumerFactory = new ActiveMQConnectionFactory(brokerURL);
-        Connection consumerConnection = consumerFactory.createConnection();
-        consumerConnection.start();
-        Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = consumerSession.createConsumer(consumerSession.createQueue("TEST"));
-        MessageIdList listener = new MessageIdList();
-        consumer.setMessageListener(listener);
-        listener.waitForMessagesToArrive(messageCount);
-        listener.assertMessagesReceived(messageCount);
-        
-        consumer.close(); consumerConnection.close(); consumerSession.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
deleted file mode 100755
index f8236f5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * 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.transport.fanout;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.DeliveryMode;
-
-import junit.framework.Test;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.network.NetworkTestSupport;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportFilter;
-import org.apache.activemq.transport.mock.MockTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class FanoutTransportBrokerTest extends NetworkTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FanoutTransportBrokerTest.class);
-
-    public ActiveMQDestination destination;
-    public int deliveryMode;
-
-    public static Test suite() {
-        return suite(FanoutTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void initCombosForTestPublisherFansout() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"), new ActiveMQQueue("TEST")});
-    }
-
-    public void testPublisherFansout() throws Exception {
-
-        // Start a normal consumer on the local broker
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.request(consumerInfo1);
-
-        // Start a normal consumer on a remote broker
-        StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        // Start a fanout publisher.
-        LOG.info("Starting the fanout connection.");
-        StubConnection connection3 = createFanoutConnection();
-        ConnectionInfo connectionInfo3 = createConnectionInfo();
-        SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
-        ProducerInfo producerInfo3 = createProducerInfo(sessionInfo3);
-        connection3.send(connectionInfo3);
-        connection3.send(sessionInfo3);
-        connection3.send(producerInfo3);
-
-        // Send the message using the fail over publisher.
-        connection3.request(createMessage(producerInfo3, destination, deliveryMode));
-
-        assertNotNull(receiveMessage(connection1));
-        assertNoMessagesLeft(connection1);
-
-        assertNotNull(receiveMessage(connection2));
-        assertNoMessagesLeft(connection2);
-
-    }
-
-    public void initCombosForTestPublisherWaitsForServerToBeUp() {
-        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
-        addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST")});
-    }
-
-    public void testPublisherWaitsForServerToBeUp() throws Exception {
-
-        // Start a normal consumer on the local broker
-        StubConnection connection1 = createConnection();
-        ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
-        connection1.send(connectionInfo1);
-        connection1.send(sessionInfo1);
-        connection1.request(consumerInfo1);
-
-        // Start a normal consumer on a remote broker
-        StubConnection connection2 = createRemoteConnection();
-        ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
-        connection2.send(connectionInfo2);
-        connection2.send(sessionInfo2);
-        connection2.request(consumerInfo2);
-
-        // Start a fanout publisher.
-        LOG.info("Starting the fanout connection.");
-        final StubConnection connection3 = createFanoutConnection();
-        ConnectionInfo connectionInfo3 = createConnectionInfo();
-        SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
-        final ProducerInfo producerInfo3 = createProducerInfo(sessionInfo3);
-        connection3.send(connectionInfo3);
-        connection3.send(sessionInfo3);
-        connection3.send(producerInfo3);
-
-        // Send the message using the fail over publisher.
-        connection3.request(createMessage(producerInfo3, destination, deliveryMode));
-
-        assertNotNull(receiveMessage(connection1));
-        assertNoMessagesLeft(connection1);
-
-        assertNotNull(receiveMessage(connection2));
-        assertNoMessagesLeft(connection2);
-
-        final CountDownLatch publishDone = new CountDownLatch(1);
-
-        // The MockTransport is on the remote connection.
-        // Slip in a new transport filter after the MockTransport
-        MockTransport mt = (MockTransport)connection3.getTransport().narrow(MockTransport.class);
-        mt.install(new TransportFilter(mt.getNext()) {
-            public void oneway(Object command) throws IOException {
-                LOG.info("Dropping: " + command);
-                // just eat it! to simulate a recent failure.
-            }
-        });
-
-        // Send a message (async) as this will block
-        new Thread() {
-            public void run() {
-                // Send the message using the fail over publisher.
-                try {
-                    connection3.request(createMessage(producerInfo3, destination, deliveryMode));
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                }
-                publishDone.countDown();
-            }
-        }.start();
-
-        // Assert that we block:
-        assertFalse(publishDone.await(3, TimeUnit.SECONDS));
-
-        // Restart the remote server. State should be re-played and the publish
-        // should continue.
-        LOG.info("Restarting Broker");
-        restartRemoteBroker();
-        LOG.info("Broker Restarted");
-
-        // This should reconnect, and resend
-        assertTrue(publishDone.await(20, TimeUnit.SECONDS));
-
-    }
-
-    protected String getLocalURI() {
-        return "tcp://localhost:61616";
-    }
-
-    protected String getRemoteURI() {
-        return "tcp://localhost:61617";
-    }
-
-    protected StubConnection createFanoutConnection() throws Exception {
-        URI fanoutURI = new URI("fanout://(static://(" + connector.getServer().getConnectURI() + "," + "mock://" + remoteConnector.getServer().getConnectURI() + "))?fanOutQueues=true");
-        Transport transport = TransportFactory.connect(fanoutURI);
-        StubConnection connection = new StubConnection(transport);
-        connections.add(connection);
-        return connection;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java
deleted file mode 100644
index 2d1bf4c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.transport.multicast;
-
-import java.net.URI;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.CommandJoiner;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.udp.UdpTransportTest;
-import org.apache.activemq.util.IntSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * 
- */
-public class MulticastTransportTest extends UdpTransportTest {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(MulticastTransportTest.class);
-
-    private String multicastURI = "multicast://224.1.2.3:6255";
-    
-
-    protected Transport createProducer() throws Exception {
-        LOG.info("Producer using URI: " + multicastURI);
-        
-        // we are not using the TransportFactory as this assumes that
-        // transports talk to a server using a WireFormat Negotiation step
-        // rather than talking directly to each other
-        
-        OpenWireFormat wireFormat = createWireFormat();
-        MulticastTransport transport = new MulticastTransport(wireFormat, new URI(multicastURI));
-        transport.setLoopBackMode(false);
-        transport.setSequenceGenerator(new IntSequenceGenerator());
-        return new CommandJoiner(transport, wireFormat);
-    }
-
-    protected Transport createConsumer() throws Exception {
-        OpenWireFormat wireFormat = createWireFormat();
-        MulticastTransport transport = new MulticastTransport(wireFormat, new URI(multicastURI));
-        transport.setLoopBackMode(false);
-        transport.setSequenceGenerator(new IntSequenceGenerator());
-        return new CommandJoiner(transport, wireFormat);
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOJmsDurableTopicSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOJmsDurableTopicSendReceiveTest.java
deleted file mode 100644
index 84f955e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOJmsDurableTopicSendReceiveTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.transport.nio;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsDurableTopicSendReceiveTest;
-import org.apache.activemq.broker.BrokerService;
-
-public class NIOJmsDurableTopicSendReceiveTest extends JmsDurableTopicSendReceiveTest {
-    protected BrokerService broker;
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-            broker.start();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() {
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(getBrokerURL());
-        return connectionFactory;
-    }
-
-    protected String getBrokerURL() {
-        return "nio://localhost:61616";
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.addConnector(getBrokerURL());
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOJmsSendAndReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOJmsSendAndReceiveTest.java
deleted file mode 100644
index 0f1032c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOJmsSendAndReceiveTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.transport.nio;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-
-/**
- * 
- */
-public class NIOJmsSendAndReceiveTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    protected BrokerService broker;
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-            broker.start();
-        }
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() {
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(getBrokerURL());
-        return connectionFactory;
-    }
-
-    protected String getBrokerURL() {
-        return "nio://localhost:61616";
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.addConnector(getBrokerURL());
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOPersistentSendAndReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOPersistentSendAndReceiveTest.java
deleted file mode 100644
index 330557f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOPersistentSendAndReceiveTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.transport.nio;
-
-import javax.jms.DeliveryMode;
-
-import org.apache.activemq.broker.BrokerService;
-
-public class NIOPersistentSendAndReceiveTest extends NIOJmsSendAndReceiveTest {
-    protected BrokerService broker;
-
-    protected void setUp() throws Exception {
-        this.topic = false;
-        this.deliveryMode = DeliveryMode.PERSISTENT;
-        super.setUp();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(true);
-        answer.addConnector(getBrokerURL());
-        return answer;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOTransportBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOTransportBrokerTest.java
deleted file mode 100644
index ea10387..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/nio/NIOTransportBrokerTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.transport.nio;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-import org.apache.activemq.transport.TransportBrokerTestSupport;
-
-public class NIOTransportBrokerTest extends TransportBrokerTestSupport {
-
-    protected String getBindLocation() {
-        return "nio://localhost:61616";
-    }
-
-    public static Test suite() {
-        return suite(NIOTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java
deleted file mode 100755
index d9d2e62..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * 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.transport.peer;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-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.advisory.AdvisorySupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class PeerTransportTest extends TestCase {
-    protected static final int MESSAGE_COUNT = 50;
-    protected static final int NUMBER_IN_CLUSTER = 3;
-    private static final Logger LOG = LoggerFactory.getLogger(PeerTransportTest.class);
-    
-    protected ActiveMQDestination destination;
-    protected boolean topic = true;
-    protected int deliveryMode = DeliveryMode.NON_PERSISTENT;
-    protected MessageProducer[] producers;
-    protected Connection[] connections;
-    protected MessageIdList messageIdList[];
-
-    protected void setUp() throws Exception {
-
-        connections = new Connection[NUMBER_IN_CLUSTER];
-        producers = new MessageProducer[NUMBER_IN_CLUSTER];
-        messageIdList = new MessageIdList[NUMBER_IN_CLUSTER];
-        ActiveMQDestination destination = createDestination();
-
-        String root = System.getProperty("activemq.store.dir");
-
-        for (int i = 0; i < NUMBER_IN_CLUSTER; i++) {
-            connections[i] = createConnection(i);
-            connections[i].setClientID("ClusterTest" + i);
-            connections[i].start();
-
-            Session session = connections[i].createSession(false, Session.AUTO_ACKNOWLEDGE);
-            producers[i] = session.createProducer(destination);
-            producers[i].setDeliveryMode(deliveryMode);
-            MessageConsumer consumer = createMessageConsumer(session, destination);
-            messageIdList[i] = new MessageIdList();
-            consumer.setMessageListener(messageIdList[i]);
-        }
-
-        LOG.info("Waiting for cluster to be fully connected");
-
-        // Each connection should see that NUMBER_IN_CLUSTER consumers get
-        // registered on the destination.
-        ActiveMQDestination advisoryDest = AdvisorySupport.getConsumerAdvisoryTopic(destination);
-        for (int i = 0; i < NUMBER_IN_CLUSTER; i++) {
-            Session session = connections[i].createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageConsumer consumer = createMessageConsumer(session, advisoryDest);
-
-            int j = 0;
-            while (j < NUMBER_IN_CLUSTER) {
-                ActiveMQMessage message = (ActiveMQMessage)consumer.receive(1000);
-                if (message == null) {
-                    fail("Connection " + i + " saw " + j + " consumers, expected: " + NUMBER_IN_CLUSTER);
-                }
-                if (message.getDataStructure() != null && message.getDataStructure().getDataStructureType() == ConsumerInfo.DATA_STRUCTURE_TYPE) {
-                    j++;
-                }
-            }
-
-            session.close();
-        }
-
-        LOG.info("Cluster is online.");
-    }
-
-    protected void tearDown() throws Exception {
-        if (connections != null) {
-            for (int i = 0; i < connections.length; i++) {
-                connections[i].close();
-            }
-        }
-    }
-
-    protected MessageConsumer createMessageConsumer(Session session, Destination destination) throws JMSException {
-        return session.createConsumer(destination);
-    }
-
-    protected Connection createConnection(int i) throws JMSException {
-        LOG.info("creating connection ....");
-        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("peer://" + getClass().getName() + "/node" + i);
-        return fac.createConnection();
-    }
-
-    protected ActiveMQDestination createDestination() {
-        return createDestination(getClass().getName());
-    }
-
-    protected ActiveMQDestination createDestination(String name) {
-        if (topic) {
-            return new ActiveMQTopic(name);
-        } else {
-            return new ActiveMQQueue(name);
-        }
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testSendReceive() throws Exception {
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            for (int x = 0; x < producers.length; x++) {
-                TextMessage textMessage = new ActiveMQTextMessage();
-                textMessage.setText("MSG-NO: " + i + " in cluster: " + x);
-                producers[x].send(textMessage);
-            }
-        }
-
-        for (int i = 0; i < NUMBER_IN_CLUSTER; i++) {
-            messageIdList[i].assertMessagesReceived(expectedReceiveCount());
-        }
-    }
-
-    protected int expectedReceiveCount() {
-        return MESSAGE_COUNT * NUMBER_IN_CLUSTER;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/DropCommandStrategy.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/DropCommandStrategy.java
deleted file mode 100644
index f35ed7e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/DropCommandStrategy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.net.SocketAddress;
-
-/**
- *
- * 
- */
-public interface DropCommandStrategy {
-
-    /**
-     * Returns true if the command should be dropped for
-     * the given command ID and address
-     */
-    boolean shouldDropCommand(int commandId, SocketAddress address, boolean redelivery);
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
deleted file mode 100644
index 4f00e06..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.util.Queue;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.transport.StubTransport;
-import org.apache.activemq.transport.StubTransportListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ReliableTransportTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ReliableTransportTest.class);
-
-    protected ReliableTransport transport;
-    protected StubTransportListener listener = new StubTransportListener();
-    protected ReplayStrategy replayStrategy;
-
-    public void testValidSequenceOfPackets() throws Exception {
-        int[] sequenceNumbers = {1, 2, 3, 4, 5, 6, 7};
-
-        sendStreamOfCommands(sequenceNumbers, true);
-    }
-
-    public void testValidWrapAroundPackets() throws Exception {
-        int[] sequenceNumbers = new int[10];
-
-        int value = Integer.MAX_VALUE - 3;
-        transport.setExpectedCounter(value);
-
-        for (int i = 0; i < 10; i++) {
-            LOG.info("command: " + i + " = " + value);
-            sequenceNumbers[i] = value++;
-        }
-
-        sendStreamOfCommands(sequenceNumbers, true);
-    }
-
-    public void testDuplicatePacketsDropped() throws Exception {
-        int[] sequenceNumbers = {1, 2, 2, 3, 4, 5, 6, 7};
-
-        sendStreamOfCommands(sequenceNumbers, true, 7);
-    }
-
-    public void testOldDuplicatePacketsDropped() throws Exception {
-        int[] sequenceNumbers = {1, 2, 3, 4, 5, 2, 6, 7};
-
-        sendStreamOfCommands(sequenceNumbers, true, 7);
-    }
-
-    public void testOldDuplicatePacketsDroppedUsingNegativeCounters() throws Exception {
-        int[] sequenceNumbers = {-3, -1, -3, -2, -1, 0, 1, -1, 3, 2, 0, 2, 4};
-
-        transport.setExpectedCounter(-3);
-
-        sendStreamOfCommands(sequenceNumbers, true, 8);
-    }
-
-    public void testWrongOrderOfPackets() throws Exception {
-        int[] sequenceNumbers = {4, 3, 1, 5, 2, 7, 6, 8, 10, 9};
-
-        sendStreamOfCommands(sequenceNumbers, true);
-    }
-
-    public void testMissingPacketsFails() throws Exception {
-        int[] sequenceNumbers = {1, 2, /* 3, */4, 5, 6, 7, 8, 9, 10};
-
-        sendStreamOfCommands(sequenceNumbers, false);
-    }
-
-    protected void sendStreamOfCommands(int[] sequenceNumbers, boolean expected) {
-        sendStreamOfCommands(sequenceNumbers, expected, sequenceNumbers.length);
-    }
-
-    protected void sendStreamOfCommands(int[] sequenceNumbers, boolean expected, int expectedCount) {
-        for (int i = 0; i < sequenceNumbers.length; i++) {
-            int commandId = sequenceNumbers[i];
-
-            ConsumerInfo info = new ConsumerInfo();
-            info.setSelector("Cheese: " + commandId);
-            info.setCommandId(commandId);
-
-            transport.onCommand(info);
-        }
-
-        Queue exceptions = listener.getExceptions();
-        Queue commands = listener.getCommands();
-        if (expected) {
-            if (!exceptions.isEmpty()) {
-                Exception e = (Exception)exceptions.remove();
-                e.printStackTrace();
-                fail("Caught exception: " + e);
-            }
-            assertEquals("number of messages received", expectedCount, commands.size());
-
-            assertEquals("Should have no buffered commands", 0, transport.getBufferedCommandCount());
-        } else {
-            assertTrue("Should have received an exception!", exceptions.size() > 0);
-            Exception e = (Exception)exceptions.remove();
-            LOG.info("Caught expected response: " + e);
-        }
-    }
-
-    protected void setUp() throws Exception {
-        if (replayStrategy == null) {
-            replayStrategy = new ExceptionIfDroppedReplayStrategy();
-        }
-        transport = new ReliableTransport(new StubTransport(), replayStrategy);
-        transport.setTransportListener(listener);
-        transport.start();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java
deleted file mode 100644
index 0acf5c3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-import java.net.SocketAddress;
-import java.nio.ByteBuffer;
-import java.nio.channels.DatagramChannel;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.udp.ByteBufferPool;
-import org.apache.activemq.transport.udp.CommandDatagramChannel;
-import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
-import org.apache.activemq.transport.udp.UdpTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class UnreliableCommandDatagramChannel extends CommandDatagramChannel {
-
-    private static final Logger LOG = LoggerFactory.getLogger(UnreliableCommandDatagramChannel.class);
-
-    private DropCommandStrategy dropCommandStrategy;
-
-    public UnreliableCommandDatagramChannel(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress,
-                                            DatagramHeaderMarshaller headerMarshaller, ReplayBuffer replayBuffer, DatagramChannel channel, ByteBufferPool bufferPool,
-                                            DropCommandStrategy strategy) {
-        super(transport, wireFormat, datagramSize, targetAddress, headerMarshaller, channel, bufferPool);
-        this.dropCommandStrategy = strategy;
-    }
-
-    protected void sendWriteBuffer(int commandId, SocketAddress address, ByteBuffer writeBuffer, boolean redelivery) throws IOException {
-        if (dropCommandStrategy.shouldDropCommand(commandId, address, redelivery)) {
-            writeBuffer.flip();
-            LOG.info("Dropping datagram with command: " + commandId);
-
-            // lets still add it to the replay buffer though!
-            getReplayBuffer().addBuffer(commandId, writeBuffer);
-        } else {
-            super.sendWriteBuffer(commandId, address, writeBuffer, redelivery);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java
deleted file mode 100644
index 2d59903..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-import java.net.DatagramSocket;
-import java.net.SocketAddress;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.udp.CommandDatagramSocket;
-import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
-import org.apache.activemq.transport.udp.UdpTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class UnreliableCommandDatagramSocket extends CommandDatagramSocket {
-    private static final Logger LOG = LoggerFactory.getLogger(UnreliableCommandDatagramSocket.class);
-
-    private DropCommandStrategy dropCommandStrategy;
-
-    public UnreliableCommandDatagramSocket(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress,
-                                           DatagramHeaderMarshaller headerMarshaller, DatagramSocket channel, DropCommandStrategy strategy) {
-        super(transport, wireFormat, datagramSize, targetAddress, headerMarshaller, channel);
-        this.dropCommandStrategy = strategy;
-    }
-
-    protected void sendWriteBuffer(int commandId, SocketAddress address, byte[] data, boolean redelivery) throws IOException {
-        if (dropCommandStrategy.shouldDropCommand(commandId, address, redelivery)) {
-            LOG.info("Dropping datagram with command: " + commandId);
-
-            // lets still add it to the replay buffer though!
-            ReplayBuffer bufferCache = getReplayBuffer();
-            if (bufferCache != null && !redelivery) {
-                bufferCache.addBuffer(commandId, data);
-            }
-        } else {
-            super.sendWriteBuffer(commandId, address, data, redelivery);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java
deleted file mode 100644
index cd969d4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.io.IOException;
-import java.net.SocketAddress;
-import java.net.URI;
-import java.net.UnknownHostException;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.udp.CommandChannel;
-import org.apache.activemq.transport.udp.UdpTransport;
-
-/**
- * An unreliable UDP transport that will randomly discard packets to simulate a
- * bad network (or UDP buffers being flooded).
- * 
- * 
- */
-public class UnreliableUdpTransport extends UdpTransport {
-
-    private DropCommandStrategy dropCommandStrategy;
-
-    public UnreliableUdpTransport(OpenWireFormat wireFormat, int port) throws UnknownHostException, IOException {
-        super(wireFormat, port);
-    }
-
-    public UnreliableUdpTransport(OpenWireFormat wireFormat, SocketAddress socketAddress) throws IOException {
-        super(wireFormat, socketAddress);
-    }
-
-    public UnreliableUdpTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException,
-            IOException {
-        super(wireFormat, remoteLocation);
-    }
-
-    public UnreliableUdpTransport(OpenWireFormat wireFormat) throws IOException {
-        super(wireFormat);
-    }
-
-    public DropCommandStrategy getDropCommandStrategy() {
-        return dropCommandStrategy;
-    }
-
-    public void setDropCommandStrategy(DropCommandStrategy dropCommandStrategy) {
-        this.dropCommandStrategy = dropCommandStrategy;
-    }
-
-    protected CommandChannel createCommandDatagramChannel() {
-        return new UnreliableCommandDatagramChannel(this, getWireFormat(), getDatagramSize(), getTargetAddress(),
-                createDatagramHeaderMarshaller(), getReplayBuffer(), getChannel(), getBufferPool(), dropCommandStrategy);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java
deleted file mode 100644
index 952ab68..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.transport.reliable;
-
-import java.net.SocketAddress;
-import java.net.URI;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.test.JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest;
-import org.apache.activemq.transport.CommandJoiner;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.udp.ResponseRedirectInterceptor;
-import org.apache.activemq.transport.udp.UdpTransport;
-import org.apache.activemq.transport.udp.UdpTransportTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class UnreliableUdpTransportTest extends UdpTransportTest {
-    private static final Logger LOG = LoggerFactory.getLogger(UnreliableUdpTransportTest.class);
-
-    protected DropCommandStrategy dropStrategy = new DropCommandStrategy() {
-        
-        public boolean shouldDropCommand(int commandId, SocketAddress address, boolean redelivery) {
-            if (redelivery) {
-                return false;
-            }
-            return commandId % 3 == 2;
-        }
-    };
-
-    protected Transport createProducer() throws Exception {
-        LOG.info("Producer using URI: " + producerURI);
-
-        OpenWireFormat wireFormat = createWireFormat();
-        UnreliableUdpTransport transport = new UnreliableUdpTransport(wireFormat, new URI(producerURI));
-        transport.setDropCommandStrategy(dropStrategy);
-
-        ReliableTransport reliableTransport = new ReliableTransport(transport, transport);
-        Replayer replayer = reliableTransport.getReplayer();
-        reliableTransport.setReplayStrategy(createReplayStrategy(replayer));
-
-        return new CommandJoiner(reliableTransport, wireFormat);
-    }
-
-    protected Transport createConsumer() throws Exception {
-        LOG.info("Consumer on port: " + consumerPort);
-        OpenWireFormat wireFormat = createWireFormat();
-        UdpTransport transport = new UdpTransport(wireFormat, consumerPort);
-
-        ReliableTransport reliableTransport = new ReliableTransport(transport, transport);
-        Replayer replayer = reliableTransport.getReplayer();
-        reliableTransport.setReplayStrategy(createReplayStrategy(replayer));
-
-        ResponseRedirectInterceptor redirectInterceptor = new ResponseRedirectInterceptor(reliableTransport, transport);
-        return new CommandJoiner(redirectInterceptor, wireFormat);
-    }
-
-    protected ReplayStrategy createReplayStrategy(Replayer replayer) {
-        assertNotNull("Should have a replayer!", replayer);
-        return new DefaultReplayStrategy(1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/SamplePojo.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/SamplePojo.java
deleted file mode 100644
index c510798..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/SamplePojo.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.Serializable;
-
-import com.thoughtworks.xstream.annotations.XStreamAlias;
-
-@XStreamAlias("pojo")
-public class SamplePojo implements Serializable {
-	private static final long serialVersionUID = 9118938642100015088L;
-	
-	@XStreamAlias("name")
-    private String name;
-	@XStreamAlias("city")
-    private String city;
-
-    public SamplePojo() {
-    }
-
-    public SamplePojo(String name, String city) {
-        this.name = name;
-        this.city = city;
-    }
-
-
-    public String getCity() {
-        return city;
-    }
-
-    public void setCity(String city) {
-        this.city = city;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompAdvisoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompAdvisoryTest.java
deleted file mode 100644
index 50dcbc3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompAdvisoryTest.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.ConstantPendingMessageLimitStrategy;
-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.ActiveMQTopic;
-import org.apache.activemq.util.URISupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.*;
-import java.io.File;
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 
- */
-public class StompAdvisoryTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(StompAdvisoryTest.class);
-
-    protected ConnectionFactory factory;
-    protected ActiveMQConnection connection;
-    protected BrokerService broker;
-
-    StompConnection stompConnection;
-    URI tcpBrokerUri;
-    URI stompBrokerUri;
-
-    private PolicyEntry createPolicyEntry() {
-        PolicyEntry policy = new PolicyEntry();
-        policy.setAdvisdoryForFastProducers(true);
-        policy.setAdvisoryForConsumed(true);
-        policy.setAdvisoryForDelivery(true);
-        policy.setAdvisoryForDiscardingMessages(true);
-        policy.setAdvisoryForSlowConsumers(true);
-        policy.setAdvisoryWhenFull(true);
-        policy.setProducerFlowControl(false);
-
-        ConstantPendingMessageLimitStrategy strategy = new ConstantPendingMessageLimitStrategy();
-        strategy.setLimit(10);
-        policy.setPendingMessageLimitStrategy(strategy);
-        return policy;
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = BrokerFactory.createBroker(new URI("broker://()/localhost?useJmx=false"));
-
-        broker.setPersistent(false);
-        PolicyEntry policy = new PolicyEntry();
-        policy.setAdvisdoryForFastProducers(true);
-        policy.setAdvisoryForConsumed(true);
-        policy.setAdvisoryForDelivery(true);
-        policy.setAdvisoryForDiscardingMessages(true);
-        policy.setAdvisoryForSlowConsumers(true);
-        policy.setAdvisoryWhenFull(true);
-        policy.setProducerFlowControl(false);
-        ConstantPendingMessageLimitStrategy strategy  = new ConstantPendingMessageLimitStrategy();
-        strategy.setLimit(10);
-        policy.setPendingMessageLimitStrategy(strategy);
-        PolicyMap pMap = new PolicyMap();
-        pMap.setDefaultEntry(policy);
-
-        broker.setDestinationPolicy(pMap);
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.addConnector("tcp://localhost:0");
-        broker.addConnector("stomp://localhost:0");
-        return broker;
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        if (System.getProperty("basedir") == null) {
-            File file = new File(".");
-            System.setProperty("basedir", file.getAbsolutePath());
-        }
-
-        broker = createBroker();
-        broker.start();
-
-        tcpBrokerUri = URISupport.removeQuery(broker.getTransportConnectors().get(0).getConnectUri());
-        stompBrokerUri = URISupport.removeQuery(broker.getTransportConnectors().get(1).getConnectUri());
-        LOG.info("Producing using TCP uri: " + tcpBrokerUri);
-        LOG.info("consuming using STOMP uri: " + stompBrokerUri);
-
-        stompConnection = new StompConnection();
-        stompConnection.open(new Socket("localhost", stompBrokerUri.getPort()));
-
-    }
-
-    protected void tearDown() throws Exception {
-        stompConnection.disconnect();
-        stompConnection.close();
-        broker.stop();
-
-    }
-
-    public void testConnectionAdvisory() throws Exception {
-
-        Destination dest = new ActiveMQQueue("testConnectionAdvisory");
-
-        stompConnection.connect("system", "manager");
-        stompConnection.subscribe("/topic/ActiveMQ.Advisory.Connection", Stomp.Headers.Subscribe.AckModeValues.AUTO);
-
-        // Now connect via openwire and check we get the advisory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(tcpBrokerUri);
-        Connection c = factory.createConnection();
-        c.start();
-
-        StompFrame f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertTrue("Should have a body", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("{\"ConnectionInfo\":"));
-        Map<String,String> headers = f.getHeaders();
-
-        c.stop();
-        c.close();
-
-        f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertNotNull("Body is not null", f.getBody());
-        assertTrue("Body should have content", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("{\"ConnectionInfo\":"));
-    }
-
-    public void testConnectionAdvisoryJSON() throws Exception {
-
-        Destination dest = new ActiveMQQueue("testConnectionAdvisory");
-
-        HashMap<String, String> subheaders = new HashMap<String, String>(1);
-        subheaders.put("transformation", Stomp.Transformations.JMS_JSON.toString());
-
-        stompConnection.connect("system", "manager");
-        stompConnection.subscribe("/topic/ActiveMQ.Advisory.Connection",
-        		Stomp.Headers.Subscribe.AckModeValues.AUTO, subheaders);
-
-        // Now connect via openwire and check we get the advisory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(tcpBrokerUri);
-        Connection c = factory.createConnection();
-        c.start();
-
-        StompFrame f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertTrue("Should have a body", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("{\"ConnectionInfo\":"));
-        Map<String,String> headers = f.getHeaders();
-
-        c.stop();
-        c.close();
-
-        f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertNotNull("Body is not null", f.getBody());
-        assertTrue("Body should have content", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("{\"ConnectionInfo\":"));
-    }
-
-    public void testConnectionAdvisoryXML() throws Exception {
-
-        Destination dest = new ActiveMQQueue("testConnectionAdvisory");
-
-        HashMap<String, String> subheaders = new HashMap<String, String>(1);
-        subheaders.put("transformation", Stomp.Transformations.JMS_XML.toString());
-
-        stompConnection.connect("system", "manager");
-        stompConnection.subscribe("/topic/ActiveMQ.Advisory.Connection",
-        		Stomp.Headers.Subscribe.AckModeValues.AUTO, subheaders);
-
-        // Now connect via openwire and check we get the advisory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(tcpBrokerUri);
-        Connection c = factory.createConnection();
-        c.start();
-
-        StompFrame f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertTrue("Should have a body", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("<ConnectionInfo>"));
-        Map<String,String> headers = f.getHeaders();
-
-        c.stop();
-        c.close();
-
-        f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertNotNull("Body is not null", f.getBody());
-        assertTrue("Body should have content", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("<ConnectionInfo>"));
-    }
-
-    public void testConsumerAdvisory() throws Exception {
-
-        Destination dest = new ActiveMQQueue("testConsumerAdvisory");
-
-        stompConnection.connect("system", "manager");
-        stompConnection.subscribe("/topic/ActiveMQ.Advisory.Consumer.>", Stomp.Headers.Subscribe.AckModeValues.AUTO);
-
-        // Now connect via openwire and check we get the advisory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(tcpBrokerUri);
-        Connection c = factory.createConnection();
-        c.start();
-
-        Session session = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createConsumer(dest);
-
-        StompFrame f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertTrue("Should have a body", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("{\"ConsumerInfo\":"));
-
-        c.stop();
-        c.close();
-    }
-
-    public void testProducerAdvisory() throws Exception {
-
-        Destination dest = new ActiveMQQueue("testProducerAdvisory");
-
-        stompConnection.connect("system", "manager");
-        stompConnection.subscribe("/topic/ActiveMQ.Advisory.Producer.>", Stomp.Headers.Subscribe.AckModeValues.AUTO);
-
-        // Now connect via openwire and check we get the advisory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(tcpBrokerUri);
-        Connection c = factory.createConnection();
-        c.start();
-
-        Session session = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(dest);
-        Message mess = session.createTextMessage("test");
-        producer.send(mess);
-
-        StompFrame f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertTrue("Should have a body", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("{\"ProducerInfo\":"));
-
-        c.stop();
-        c.close();
-    }
-
-    public void testProducerAdvisoryXML() throws Exception {
-
-        Destination dest = new ActiveMQQueue("testProducerAdvisoryXML");
-
-        HashMap<String, String> subheaders = new HashMap<String, String>(1);
-        subheaders.put("transformation", Stomp.Transformations.JMS_ADVISORY_XML.toString());
-
-        stompConnection.connect("system", "manager");
-        stompConnection.subscribe("/topic/ActiveMQ.Advisory.Producer.>",
-        		Stomp.Headers.Subscribe.AckModeValues.AUTO, subheaders);
-
-        // Now connect via openwire and check we get the advisory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(tcpBrokerUri);
-        Connection c = factory.createConnection();
-        c.start();
-
-        Session session = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(dest);
-        Message mess = session.createTextMessage("test");
-        producer.send(mess);
-
-        StompFrame f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertTrue("Should have a body", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("<ProducerInfo>"));
-
-        c.stop();
-        c.close();
-    }
-
-    public void testProducerAdvisoryJSON() throws Exception {
-
-        Destination dest = new ActiveMQQueue("testProducerAdvisoryJSON");
-
-        HashMap<String, String> subheaders = new HashMap<String, String>(1);
-        subheaders.put("transformation", Stomp.Transformations.JMS_ADVISORY_JSON.toString());
-
-        stompConnection.connect("system", "manager");
-        stompConnection.subscribe("/topic/ActiveMQ.Advisory.Producer.>",
-        		Stomp.Headers.Subscribe.AckModeValues.AUTO, subheaders);
-
-        // Now connect via openwire and check we get the advisory
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(tcpBrokerUri);
-        Connection c = factory.createConnection();
-        c.start();
-
-        Session session = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(dest);
-        Message mess = session.createTextMessage("test");
-        producer.send(mess);
-
-        StompFrame f = stompConnection.receive();
-        LOG.debug(f.toString());
-        assertEquals(f.getAction(),"MESSAGE");
-        assertTrue("Should have a body", f.getBody().length() > 0);
-        assertTrue(f.getBody().startsWith("{\"ProducerInfo\":"));
-
-        c.stop();
-        c.close();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompFrameTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompFrameTest.java
deleted file mode 100644
index 1e60e94..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompFrameTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.util.HashMap;
-import org.junit.Test;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-
-public class StompFrameTest {
-    StompFrame underTest = new StompFrame();
-
-    @Test
-    public void testNoPasscodeInToString() throws Exception {
-        HashMap headers = new HashMap<String, String>();
-        headers.put("userName", "bob");
-        headers.put("passcode", "please");
-        underTest.setHeaders(headers);
-
-        assertEquals("no password present", -1, underTest.toString().indexOf("please"));
-        assertTrue("*** present", underTest.toString().indexOf("***") > 0);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompNIOTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompNIOTest.java
deleted file mode 100644
index 2792515..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompNIOTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.transport.stomp;
-
-
-/**
- * 
- */
-public class StompNIOTest extends StompTest {
-
-    protected void setUp() throws Exception {
-        bindAddress = "stomp+nio://localhost:61612";
-        confUri = "xbean:org/apache/activemq/transport/stomp/niostomp-auth-broker.xml";  
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSslAuthTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSslAuthTest.java
deleted file mode 100644
index a93be2d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSslAuthTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-
-import javax.net.SocketFactory;
-import javax.net.ssl.SSLSocketFactory;
-
-
-
-/**
- * 
- */
-public class StompSslAuthTest extends StompTest {
-
-
-    protected void setUp() throws Exception {
-
-        // Test mutual authentication on both stomp and standard ssl transports
-        bindAddress = "stomp+ssl://localhost:61612";
-        confUri = "xbean:org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml";
-        jmsUri="ssl://localhost:61617";
-
-        System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore");
-        System.setProperty("javax.net.ssl.trustStorePassword", "password");
-        System.setProperty("javax.net.ssl.trustStoreType", "jks");
-        System.setProperty("javax.net.ssl.keyStore", "src/test/resources/server.keystore");
-        System.setProperty("javax.net.ssl.keyStorePassword", "password");
-        System.setProperty("javax.net.ssl.keyStoreType", "jks");
-        //System.setProperty("javax.net.debug","ssl,handshake");
-        super.setUp();
-    }
-
-    protected Socket createSocket(URI connectUri) throws IOException {
-        SocketFactory factory = SSLSocketFactory.getDefault();
-        return factory.createSocket("127.0.0.1", connectUri.getPort());
-    }
-
-    // NOOP - These operations handled by jaas cert login module
-    public void testConnectNotAuthenticatedWrongUser() throws Exception {
-    }
-
-    public void testConnectNotAuthenticatedWrongPassword() throws Exception {
-    }
-
-    public void testSendNotAuthorized() throws Exception {
-    }
-
-    public void testSubscribeNotAuthorized() throws Exception {
-    }
-
-    public void testJMSXUserIDIsSetInMessage() throws Exception {
-    }
-
-    public void testJMSXUserIDIsSetInStompMessage() throws Exception {
-    }
-    
-    public void testClientSetMessageIdIsIgnored() throws Exception {
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSslTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSslTest.java
deleted file mode 100644
index 1120aeb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSslTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-
-import javax.net.SocketFactory;
-import javax.net.ssl.SSLSocketFactory;
-
-/**
- * 
- */
-public class StompSslTest extends StompTest {
-
-    protected void setUp() throws Exception {
-        bindAddress = "stomp+ssl://localhost:61612";
-        confUri = "xbean:org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml";
-        System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore");
-        System.setProperty("javax.net.ssl.trustStorePassword", "password");
-        System.setProperty("javax.net.ssl.trustStoreType", "jks");
-        System.setProperty("javax.net.ssl.keyStore", "src/test/resources/server.keystore");
-        System.setProperty("javax.net.ssl.keyStorePassword", "password");
-        System.setProperty("javax.net.ssl.keyStoreType", "jks");  
-        super.setUp();
-    }
-
-    protected Socket createSocket(URI connectUri) throws IOException {
-        SocketFactory factory = SSLSocketFactory.getDefault();
-        return factory.createSocket("127.0.0.1", connectUri.getPort());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java
deleted file mode 100644
index efa487e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.net.Socket;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class StompSubscriptionRemoveTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(StompSubscriptionRemoveTest.class);
-    private static final String COMMAND_MESSAGE = "MESSAGE";
-    private static final String HEADER_MESSAGE_ID = "message-id";
-    private static final int STOMP_PORT = 61613;
-
-    private StompConnection stompConnection = new StompConnection();
-
-    public void testRemoveSubscriber() throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-
-        broker.addConnector("stomp://localhost:61613").setName("Stomp");
-        broker.addConnector("tcp://localhost:61616").setName("Default");
-        broker.start();
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(new ActiveMQQueue(getDestinationName()));
-        Message message = session.createTextMessage("Testas");
-        for (int idx = 0; idx < 2000; ++idx) {
-            producer.send(message);
-            LOG.debug("Sending: " + idx);
-        }
-        producer.close();
-        session.close();
-        connection.close();
-
-        stompConnection.open(new Socket("localhost", STOMP_PORT));
-
-        String connectFrame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "\n";
-        stompConnection.sendFrame(connectFrame);
-
-        stompConnection.receiveFrame();
-        String frame = "SUBSCRIBE\n" + "destination:/queue/" + getDestinationName() + "\n" + "ack:client\n\n";
-        stompConnection.sendFrame(frame);
-
-        int messagesCount = 0;
-        int count = 0;
-        while (count < 2) {
-            String receiveFrame = stompConnection.receiveFrame();
-            LOG.debug("Received: " + receiveFrame);
-            assertEquals("Unexpected frame received", COMMAND_MESSAGE, getCommand(receiveFrame));
-            String messageId = getHeaderValue(receiveFrame, HEADER_MESSAGE_ID);
-            String ackmessage = "ACK\n" + HEADER_MESSAGE_ID + ":" + messageId + "\n\n";
-            stompConnection.sendFrame(ackmessage);
-            // Thread.sleep(1000);
-            ++messagesCount;
-            ++count;
-        }
-
-        stompConnection.sendFrame("DISCONNECT\n\n");
-        Thread.sleep(1000);
-        stompConnection.close();
-
-        stompConnection.open(new Socket("localhost", STOMP_PORT));
-
-        connectFrame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "\n";
-        stompConnection.sendFrame(connectFrame);
-
-        stompConnection.receiveFrame();
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getDestinationName() + "\n" + "ack:client\n\n";
-        stompConnection.sendFrame(frame);
-        try {
-            while (count != 2000) {
-                String receiveFrame = stompConnection.receiveFrame();
-                LOG.debug("Received: " + receiveFrame);
-                assertEquals("Unexpected frame received", COMMAND_MESSAGE, getCommand(receiveFrame));
-                String messageId = getHeaderValue(receiveFrame, HEADER_MESSAGE_ID);
-                String ackmessage = "ACK\n" + HEADER_MESSAGE_ID + ":" + messageId.trim() + "\n\n";
-                stompConnection.sendFrame(ackmessage);
-                // Thread.sleep(1000);
-                ++messagesCount;
-                ++count;
-            }
-        } catch (IOException ex) {
-            ex.printStackTrace();
-        }
-
-        stompConnection.sendFrame("DISCONNECT\n\n");
-        stompConnection.close();
-        broker.stop();
-
-        LOG.info("Total messages received: " + messagesCount);
-        assertTrue("Messages received after connection loss: " + messagesCount, messagesCount >= 2000);
-
-        // The first ack messages has no chance complete, so we receiving more
-        // messages
-
-        // Don't know how to list subscriptions for the broker. Currently you
-        // can check using JMX console. You'll see
-        // Subscription without any connections
-    }
-
-    protected String getDestinationName() {
-        return getClass().getName() + "." + getName();
-    }
-
-    // These two methods could move to a utility class
-    protected String getCommand(String frame) {
-        return frame.substring(0, frame.indexOf('\n') + 1).trim();
-    }
-
-    protected String getHeaderValue(String frame, String header) throws IOException {
-        DataInput input = new DataInputStream(new ByteArrayInputStream(frame.getBytes()));
-        String line;
-        for (int idx = 0; /* forever, sort of */; ++idx) {
-            line = input.readLine();
-            if (line == null) {
-                // end of message, no headers
-                return null;
-            }
-            line = line.trim();
-            if (line.length() == 0) {
-                // start body, no headers from here on
-                return null;
-            }
-            if (idx > 0) { // Ignore command line
-                int pos = line.indexOf(':');
-                if (header.equals(line.substring(0, pos))) {
-                    return line.substring(pos + 1).trim();
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
deleted file mode 100644
index 4db08ae..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
+++ /dev/null
@@ -1,1465 +0,0 @@
-/**
- * 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.transport.stomp;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.ObjectName;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class StompTest extends CombinationTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(StompTest.class);
-
-    protected String bindAddress = "stomp://localhost:61613";
-    protected String confUri = "xbean:org/apache/activemq/transport/stomp/stomp-auth-broker.xml";
-    protected String jmsUri = "vm://localhost";
-
-
-    private BrokerService broker;
-    private StompConnection stompConnection = new StompConnection();
-    private Connection connection;
-    private Session session;
-    private ActiveMQQueue queue;
-    private final String xmlObject = "<pojo>\n"
-            + "  <name>Dejan</name>\n"
-            + "  <city>Belgrade</city>\n"
-            + "</pojo>";
-
-    private String xmlMap = "<map>\n"
-        + "  <entry>\n"
-        + "    <string>name</string>\n"
-        + "    <string>Dejan</string>\n"
-        + "  </entry>\n"
-        + "  <entry>\n"
-        + "    <string>city</string>\n"
-        + "    <string>Belgrade</string>\n"
-        + "  </entry>\n"
-        + "</map>\n";
-
-    private final String jsonObject = "{\"pojo\":{"
-        + "\"name\":\"Dejan\","
-        + "\"city\":\"Belgrade\""
-        + "}}";
-
-    private String jsonMap = "{\"map\":{"
-        + "\"entry\":["
-        + "{\"string\":[\"name\",\"Dejan\"]},"
-        + "{\"string\":[\"city\",\"Belgrade\"]}"
-        + "]"
-        + "}}";
-
-    @Override
-    protected void setUp() throws Exception {
-        // The order of the entries is different when using ibm jdk 5.
-        if (System.getProperty("java.vendor").equals("IBM Corporation")
-            && System.getProperty("java.version").startsWith("1.5")) {
-            xmlMap = "<map>\n"
-                + "  <entry>\n"
-                + "    <string>city</string>\n"
-                + "    <string>Belgrade</string>\n"
-                + "  </entry>\n"
-                + "  <entry>\n"
-                + "    <string>name</string>\n"
-                + "    <string>Dejan</string>\n"
-                + "  </entry>\n"
-                + "</map>\n";
-            jsonMap = "{\"map\":{"
-                + "\"entry\":["
-                + "{\"string\":[\"city\",\"Belgrade\"]},"
-                + "{\"string\":[\"name\",\"Dejan\"]}"
-                + "]"
-                + "}}";
-        }
-        broker = BrokerFactory.createBroker(new URI(confUri));
-        broker.start();
-
-        stompConnect();
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(jmsUri);
-        connection = cf.createConnection("system", "manager");
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        queue = new ActiveMQQueue(getQueueName());
-        connection.start();
-    }
-
-    private void stompConnect() throws IOException, URISyntaxException, UnknownHostException {
-        URI connectUri = new URI(bindAddress);
-        stompConnection.open(createSocket(connectUri));
-    }
-
-    protected Socket createSocket(URI connectUri) throws IOException {
-        return new Socket("127.0.0.1", connectUri.getPort());
-    }
-
-    protected String getQueueName() {
-        return getClass().getName() + "." + getName();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        try {
-            connection.close();
-            stompDisconnect();
-        } catch(Exception e) {
-            // Some tests explicitly disconnect from stomp so can ignore
-        } finally {
-            broker.stop();
-        }
-    }
-
-    private void stompDisconnect() throws IOException {
-        if (stompConnection != null) {
-            stompConnection.close();
-            stompConnection = null;
-        }
-    }
-
-    public void sendMessage(String msg) throws Exception {
-        sendMessage(msg, "foo", "xyz");
-    }
-
-    public void sendMessage(String msg, String propertyName, String propertyValue) throws JMSException {
-        MessageProducer producer = session.createProducer(queue);
-        TextMessage message = session.createTextMessage(msg);
-        message.setStringProperty(propertyName, propertyValue);
-        producer.send(message);
-    }
-
-    public void sendBytesMessage(byte[] msg) throws Exception {
-        MessageProducer producer = session.createProducer(queue);
-        BytesMessage message = session.createBytesMessage();
-        message.writeBytes(msg);
-        producer.send(message);
-    }
-
-    public void testConnect() throws Exception {
-
-        String connectFrame = "CONNECT\n" + "login: system\n" + "passcode: manager\n" + "request-id: 1\n" + "\n" + Stomp.NULL;
-        stompConnection.sendFrame(connectFrame);
-
-        String f = stompConnection.receiveFrame();
-        assertTrue(f.startsWith("CONNECTED"));
-        assertTrue(f.indexOf("response-id:1") >= 0);
-
-    }
-
-    public void testSendMessage() throws Exception {
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals("Hello World", message.getText());
-
-        // Make sure that the timestamp is valid - should
-        // be very close to the current time.
-        long tnow = System.currentTimeMillis();
-        long tmsg = message.getJMSTimestamp();
-        assertTrue(Math.abs(tnow - tmsg) < 1000);
-    }
-
-    public void testJMSXGroupIdCanBeSet() throws Exception {
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "JMSXGroupID: TEST\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals("TEST", ((ActiveMQTextMessage)message).getGroupID());
-    }
-
-    public void testSendMessageWithCustomHeadersAndSelector() throws Exception {
-
-        MessageConsumer consumer = session.createConsumer(queue, "foo = 'abc'");
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "foo:abc\n" + "bar:123\n" + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals("Hello World", message.getText());
-        assertEquals("foo", "abc", message.getStringProperty("foo"));
-        assertEquals("bar", "123", message.getStringProperty("bar"));
-    }
-
-    public void testSendMessageWithDelay() throws Exception {
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "AMQ_SCHEDULED_DELAY:5000\n"  + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2000);
-        assertNull(message);
-        message = (TextMessage)consumer.receive(5000);
-        assertNotNull(message);
-    }
-
-    public void testSendMessageWithStandardHeaders() throws Exception {
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "correlation-id:c123\n" + "priority:3\n" + "type:t345\n" + "JMSXGroupID:abc\n" + "foo:abc\n" + "bar:123\n" + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World"
-                + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals("Hello World", message.getText());
-        assertEquals("JMSCorrelationID", "c123", message.getJMSCorrelationID());
-        assertEquals("getJMSType", "t345", message.getJMSType());
-        assertEquals("getJMSPriority", 3, message.getJMSPriority());
-        assertEquals("foo", "abc", message.getStringProperty("foo"));
-        assertEquals("bar", "123", message.getStringProperty("bar"));
-
-        assertEquals("JMSXGroupID", "abc", message.getStringProperty("JMSXGroupID"));
-        ActiveMQTextMessage amqMessage = (ActiveMQTextMessage)message;
-        assertEquals("GroupID", "abc", amqMessage.getGroupID());
-    }
-
-    public void testSendMessageWithNoPriorityReceivesDefault() throws Exception {
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "correlation-id:c123\n" + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World"
-                + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals("Hello World", message.getText());
-        assertEquals("getJMSPriority", 4, message.getJMSPriority());
-    }
-    
-    public void testReceipts() throws Exception {
-
-        StompConnection receiver = new StompConnection();
-        URI connectUri = new URI(bindAddress);
-        receiver.open(createSocket(connectUri));
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        receiver.sendFrame(frame);
-
-        frame = receiver.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        receiver.sendFrame(frame);
-
-        frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "receipt: msg-1\n" + "\n\n" + "Hello World" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = receiver.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-        assertTrue("Stomp Message does not contain receipt request", frame.indexOf(Stomp.Headers.RECEIPT_REQUESTED) == -1);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("RECEIPT"));
-        assertTrue("Receipt contains correct receipt-id", frame.indexOf(Stomp.Headers.Response.RECEIPT_ID) >= 0);
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        receiver.sendFrame(frame);
-
-        waitForFrameToTakeEffect();
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "receipt: msg-1\n" + "\n\n" + "Hello World" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("RECEIPT"));
-        assertTrue("Receipt contains correct receipt-id", frame.indexOf(Stomp.Headers.Response.RECEIPT_ID) >= 0);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertNull("JMS Message does not contain receipt request", message.getStringProperty(Stomp.Headers.RECEIPT_REQUESTED));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testSubscribeWithAutoAck() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        sendMessage(getName());
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testSubscribeWithAutoAckAndBytesMessage() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        sendBytesMessage(new byte[] {
-            1, 2, 3, 4, 5
-        });
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-
-        Pattern cl = Pattern.compile("Content-length:\\s*(\\d+)", Pattern.CASE_INSENSITIVE);
-        Matcher clMmatcher = cl.matcher(frame);
-        assertTrue(clMmatcher.find());
-        assertEquals("5", clMmatcher.group(1));
-
-        assertFalse(Pattern.compile("type:\\s*null", Pattern.CASE_INSENSITIVE).matcher(frame).find());
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testBytesMessageWithNulls() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n destination:/queue/" + getQueueName() + "\ncontent-length:5" + " \n\n" + "\u0001\u0002\u0000\u0004\u0005" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        StompFrame message = stompConnection.receive();
-        assertTrue(message.getAction().startsWith("MESSAGE"));
-
-        String length = message.getHeaders().get("content-length");
-        assertEquals("5", length);
-
-        assertEquals(5, message.getContent().length);
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testSendMultipleBytesMessages() throws Exception {
-
-    	final int MSG_COUNT = 50;
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        for( int ix = 0; ix < MSG_COUNT; ix++) {
-            frame = "SEND\n destination:/queue/" + getQueueName() + "\ncontent-length:5" + " \n\n" + "\u0001\u0002\u0000\u0004\u0005" + Stomp.NULL;
-            stompConnection.sendFrame(frame);
-        }
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        for( int ix = 0; ix < MSG_COUNT; ix++) {
-            StompFrame message = stompConnection.receive();
-            assertTrue(message.getAction().startsWith("MESSAGE"));
-
-            String length = message.getHeaders().get("content-length");
-            assertEquals("5", length);
-
-            assertEquals(5, message.getContent().length);
-        }
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testSubscribeWithMessageSentWithProperties() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        MessageProducer producer = session.createProducer(queue);
-        TextMessage message = session.createTextMessage("Hello World");
-        message.setStringProperty("s", "value");
-        message.setBooleanProperty("n", false);
-        message.setByteProperty("byte", (byte)9);
-        message.setDoubleProperty("d", 2.0);
-        message.setFloatProperty("f", (float)6.0);
-        message.setIntProperty("i", 10);
-        message.setLongProperty("l", 121);
-        message.setShortProperty("s", (short)12);
-        producer.send(message);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testMessagesAreInOrder() throws Exception {
-        int ctr = 10;
-        String[] data = new String[ctr];
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        for (int i = 0; i < ctr; ++i) {
-            data[i] = getName() + i;
-            sendMessage(data[i]);
-        }
-
-        for (int i = 0; i < ctr; ++i) {
-            frame = stompConnection.receiveFrame();
-            assertTrue("Message not in order", frame.indexOf(data[i]) >= 0);
-        }
-
-        // sleep a while before publishing another set of messages
-        waitForFrameToTakeEffect();
-
-        for (int i = 0; i < ctr; ++i) {
-            data[i] = getName() + ":second:" + i;
-            sendMessage(data[i]);
-        }
-
-        for (int i = 0; i < ctr; ++i) {
-            frame = stompConnection.receiveFrame();
-            assertTrue("Message not in order", frame.indexOf(data[i]) >= 0);
-        }
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testSubscribeWithAutoAckAndSelector() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "selector: foo = 'zzz'\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        sendMessage("Ignored message", "foo", "1234");
-        sendMessage("Real message", "foo", "zzz");
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-        assertTrue("Should have received the real message but got: " + frame, frame.indexOf("Real message") > 0);
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testSubscribeWithClientAck() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:client\n\n" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-        sendMessage(getName());
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-
-        stompDisconnect();
-
-        // message should be received since message was not acknowledged
-        MessageConsumer consumer = session.createConsumer(queue);
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertTrue(message.getJMSRedelivered());
-    }
-
-    public void testUnsubscribe() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        // send a message to our queue
-        sendMessage("first message");
-
-        // receive message from socket
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-
-        // remove suscription
-        frame = "UNSUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        waitForFrameToTakeEffect();
-
-        // send a message to our queue
-        sendMessage("second message");
-
-        try {
-            frame = stompConnection.receiveFrame();
-            LOG.info("Received frame: " + frame);
-            fail("No message should have been received since subscription was removed");
-        } catch (SocketTimeoutException e) {
-        }
-    }
-
-    public void testTransactionCommit() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        String f = stompConnection.receiveFrame();
-        assertTrue(f.startsWith("CONNECTED"));
-
-        frame = "BEGIN\n" + "transaction: tx1\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transaction: tx1\n" + "\n\n" + "Hello World" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "COMMIT\n" + "transaction: tx1\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        waitForFrameToTakeEffect();
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull("Should have received a message", message);
-    }
-
-    public void testTransactionRollback() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        String f = stompConnection.receiveFrame();
-        assertTrue(f.startsWith("CONNECTED"));
-
-        frame = "BEGIN\n" + "transaction: tx1\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transaction: tx1\n" + "\n" + "first message" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        // rollback first message
-        frame = "ABORT\n" + "transaction: tx1\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "BEGIN\n" + "transaction: tx1\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transaction: tx1\n" + "\n" + "second message" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "COMMIT\n" + "transaction: tx1\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        // This test case is currently failing
-        waitForFrameToTakeEffect();
-
-        // only second msg should be received since first msg was rolled back
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals("second message", message.getText().trim());
-    }
-
-    public void testDisconnectedClientsAreRemovedFromTheBroker() throws Exception {
-        assertClients(1);
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        // This test case is currently failing
-        waitForFrameToTakeEffect();
-
-        assertClients(2);
-
-        // now lets kill the stomp connection
-        stompConnection.close();
-
-        Thread.sleep(2000);
-
-        assertClients(1);
-    }
-
-    public void testConnectNotAuthenticatedWrongUser() throws Exception {
-        String frame = "CONNECT\n" + "login: dejanb\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        String f = stompConnection.receiveFrame();
-
-        assertTrue(f.startsWith("ERROR"));
-        assertClients(1);
-    }
-
-    public void testConnectNotAuthenticatedWrongPassword() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: dejanb\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        String f = stompConnection.receiveFrame();
-
-        assertTrue(f.startsWith("ERROR"));
-        assertClients(1);
-    }
-
-    public void testSendNotAuthorized() throws Exception {
-
-        String frame = "CONNECT\n" + "login: guest\n" + "passcode: password\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/USERS." + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-        String f = stompConnection.receiveFrame();
-        assertTrue(f.startsWith("ERROR"));
-    }
-
-    public void testSubscribeNotAuthorized() throws Exception {
-
-        String frame = "CONNECT\n" + "login: guest\n" + "passcode: password\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-        String f = stompConnection.receiveFrame();
-        assertTrue(f.startsWith("ERROR"));
-
-    }
-
-    public void testTransformationUnknownTranslator() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:test" + "\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals("Hello World", message.getText());
-    }
-
-    public void testTransformationFailed() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:" + Stomp.Transformations.JMS_OBJECT_XML + "\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(2500);
-        assertNotNull(message);
-        assertNotNull(message.getStringProperty(Stomp.Headers.TRANSFORMATION_ERROR));
-        assertEquals("Hello World", message.getText());
-    }
-
-    public void testTransformationSendXMLObject() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:" + Stomp.Transformations.JMS_OBJECT_XML + "\n\n" + xmlObject + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        ObjectMessage message = (ObjectMessage)consumer.receive(2500);
-        assertNotNull(message);
-        SamplePojo object = (SamplePojo)message.getObject();
-        assertEquals("Dejan", object.getName());
-    }
-
-    public void testTransformationSendJSONObject() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:" + Stomp.Transformations.JMS_OBJECT_JSON + "\n\n" + jsonObject + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        ObjectMessage message = (ObjectMessage)consumer.receive(2500);
-        assertNotNull(message);
-        SamplePojo object = (SamplePojo)message.getObject();
-        assertEquals("Dejan", object.getName());
-    }
-
-    public void testTransformationSubscribeXML() throws Exception {
-
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage message = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_OBJECT_XML + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(xmlObject));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationReceiveJSONObject() throws Exception {
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage message = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_OBJECT_JSON + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(jsonObject));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationReceiveXMLObject() throws Exception {
-
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage message = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_OBJECT_XML + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(xmlObject));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationReceiveObject() throws Exception {
-
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage message = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_OBJECT_XML + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(xmlObject));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationReceiveXMLObjectAndMap() throws Exception {
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage objMessage = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        producer.send(objMessage);
-
-        MapMessage mapMessage = session.createMapMessage();
-        mapMessage.setString("name", "Dejan");
-        mapMessage.setString("city", "Belgrade");
-        producer.send(mapMessage);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_XML + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(xmlObject));
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(xmlMap.trim()));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationReceiveJSONObjectAndMap() throws Exception {
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage objMessage = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        producer.send(objMessage);
-
-        MapMessage mapMessage = session.createMapMessage();
-        mapMessage.setString("name", "Dejan");
-        mapMessage.setString("city", "Belgrade");
-        producer.send(mapMessage);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_JSON + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(jsonObject));
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(jsonMap.trim()));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationSendAndReceiveXmlMap() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:" + Stomp.Transformations.JMS_XML + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:" + Stomp.Transformations.JMS_MAP_JSON + "\n\n" + jsonMap + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertNotNull(frame);
-        assertTrue(frame.trim().endsWith(xmlMap.trim()));
-        assertTrue(frame.contains("jms-map-xml"));
-    }
-
-    public void testTransformationSendAndReceiveJsonMap() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:" + Stomp.Transformations.JMS_JSON + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:" + Stomp.Transformations.JMS_MAP_XML + "\n\n" + xmlMap + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertNotNull(frame);
-        assertTrue(frame.trim().endsWith(jsonMap.trim()));
-        assertTrue(frame.contains("jms-map-json"));
-    }
-
-    public void testTransformationReceiveBytesMessage() throws Exception {
-
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        BytesMessage message = session.createBytesMessage();
-        message.writeBytes(new byte[]{1, 2, 3, 4, 5});
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_XML + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("MESSAGE"));
-
-        Pattern cl = Pattern.compile("Content-length:\\s*(\\d+)", Pattern.CASE_INSENSITIVE);
-        Matcher clMmatcher = cl.matcher(frame);
-        assertTrue(clMmatcher.find());
-        assertEquals("5", clMmatcher.group(1));
-
-        assertFalse(Pattern.compile("type:\\s*null", Pattern.CASE_INSENSITIVE).matcher(frame).find());
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationNotOverrideSubscription() throws Exception {
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage message = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        message.setStringProperty("transformation",	Stomp.Transformations.JMS_OBJECT_XML.toString());
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n" + "transformation:"	+ Stomp.Transformations.JMS_OBJECT_JSON + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(jsonObject));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationIgnoreTransformation() throws Exception {
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        ObjectMessage message = session.createObjectMessage(new SamplePojo("Dejan", "Belgrade"));
-        message.setStringProperty("transformation", Stomp.Transformations.JMS_OBJECT_XML.toString());
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.endsWith("\n\n"));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationSendXMLMap() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:" + Stomp.Transformations.JMS_MAP_XML + "\n\n" + xmlMap + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        MapMessage message = (MapMessage) consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals(message.getString("name"), "Dejan");
-    }
-
-    public void testTransformationSendJSONMap() throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n" + "transformation:" + Stomp.Transformations.JMS_MAP_JSON + "\n\n" + jsonMap + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        MapMessage message = (MapMessage) consumer.receive(2500);
-        assertNotNull(message);
-        assertEquals(message.getString("name"), "Dejan");
-    }
-
-    public void testTransformationReceiveXMLMap() throws Exception {
-
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        MapMessage message = session.createMapMessage();
-        message.setString("name", "Dejan");
-        message.setString("city", "Belgrade");
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto\n" + "transformation:" + Stomp.Transformations.JMS_MAP_XML + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(xmlMap.trim()));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testTransformationReceiveJSONMap() throws Exception {
-
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("USERS." + getQueueName()));
-        MapMessage message = session.createMapMessage();
-        message.setString("name", "Dejan");
-        message.setString("city", "Belgrade");
-        producer.send(message);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/USERS." + getQueueName() + "\n" + "ack:auto\n" + "transformation:" + Stomp.Transformations.JMS_MAP_JSON + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-
-        assertTrue(frame.trim().endsWith(jsonMap.trim()));
-
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-    }
-
-    public void testDurableUnsub() throws Exception {
-        // get broker JMX view
-
-        String domain = "org.apache.activemq";
-        ObjectName brokerName = new ObjectName(domain + ":Type=Broker,BrokerName=localhost");
-
-        BrokerViewMBean view = (BrokerViewMBean)broker.getManagementContext().newProxyInstance(brokerName, BrokerViewMBean.class, true);
-
-        // connect
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\nclient-id:test\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-        assertEquals(view.getDurableTopicSubscribers().length, 0);
-
-        // subscribe
-        frame = "SUBSCRIBE\n" + "destination:/topic/" + getQueueName() + "\n" + "ack:auto\nactivemq.subscriptionName:test\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        // wait a bit for MBean to get refreshed
-        try {
-            Thread.sleep(400);
-        } catch (InterruptedException e){}
-
-        assertEquals(view.getDurableTopicSubscribers().length, 1);
-        // disconnect
-        frame = "DISCONNECT\nclient-id:test\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        try {
-            Thread.sleep(400);
-        } catch (InterruptedException e){}
-
-        //reconnect
-        stompConnect();
-        // connect
-        frame = "CONNECT\n" + "login: system\n" + "passcode: manager\nclient-id:test\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        // unsubscribe
-        frame = "UNSUBSCRIBE\n" + "destination:/topic/" + getQueueName() + "\n" + "ack:auto\nactivemq.subscriptionName:test\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-        try {
-            Thread.sleep(400);
-        } catch (InterruptedException e){}
-        assertEquals(view.getDurableTopicSubscribers().length, 0);
-    }
-
-    public void testMessageIdHeader() throws Exception {
-        stompConnection.connect("system", "manager");
-
-        stompConnection.begin("tx1");
-        stompConnection.send("/queue/" + getQueueName(), "msg", "tx1", null);
-        stompConnection.commit("tx1");
-
-        stompConnection.subscribe("/queue/" + getQueueName());
-        StompFrame stompMessage = stompConnection.receive();
-        assertNull(stompMessage.getHeaders().get("transaction"));
-    }
-
-    public void testPrefetchSize() throws Exception {
-        stompConnection.connect("system", "manager");
-
-        HashMap<String, String> headers = new HashMap<String, String>();
-        headers.put("activemq.prefetchSize", "1");
-        stompConnection.subscribe("/queue/" + getQueueName(), "client", headers);
-
-        // send messages using JMS
-        sendMessage("message 1");
-        sendMessage("message 2");
-        sendMessage("message 3");
-        sendMessage("message 4");
-        sendMessage("message 5");
-
-        StompFrame frame = stompConnection.receive();
-        assertEquals(frame.getBody(), "message 1");
-
-        stompConnection.begin("tx1");
-        stompConnection.ack(frame, "tx1");
-
-        StompFrame frame1 = stompConnection.receive();
-        assertEquals(frame1.getBody(), "message 2");
-
-        try {
-            StompFrame frame2 = stompConnection.receive(500);
-            if (frame2 != null) {
-                fail("Should not have received the second message");
-            }
-        } catch (SocketTimeoutException soe) {}
-
-        stompConnection.ack(frame1, "tx1");
-        Thread.sleep(1000);
-        stompConnection.abort("tx1");
-
-        stompConnection.begin("tx2");
-
-        // Previously delivered message need to get re-acked...
-        stompConnection.ack(frame, "tx2");
-        stompConnection.ack(frame1, "tx2");
-
-        StompFrame frame3 = stompConnection.receive();
-        assertEquals(frame3.getBody(), "message 3");
-        stompConnection.ack(frame3, "tx2");
-
-        StompFrame frame4 = stompConnection.receive();
-        assertEquals(frame4.getBody(), "message 4");
-        stompConnection.ack(frame4, "tx2");
-
-        stompConnection.commit("tx2");
-
-        stompConnection.begin("tx3");
-        StompFrame frame5 = stompConnection.receive();
-        assertEquals(frame5.getBody(), "message 5");
-        stompConnection.ack(frame5, "tx3");
-        stompConnection.commit("tx3");
-
-        stompDisconnect();
-    }
-
-    public void testTransactionsWithMultipleDestinations() throws Exception {
-
-        stompConnection.connect("system", "manager");
-
-        HashMap<String, String> headers = new HashMap<String, String>();
-        headers.put("activemq.prefetchSize", "1");
-        headers.put("activemq.exclusive", "true");
-
-        stompConnection.subscribe("/queue/test1", "client", headers);
-
-        stompConnection.begin("ID:tx1");
-
-        headers.clear();
-        headers.put("receipt", "ID:msg1");
-        stompConnection.send("/queue/test2", "test message", "ID:tx1", headers);
-
-        stompConnection.commit("ID:tx1");
-
-        // make sure connection is active after commit
-        Thread.sleep(1000);
-        stompConnection.send("/queue/test1", "another message");
-
-        StompFrame frame = stompConnection.receive(500);
-        assertNotNull(frame);
-
-        stompConnection.disconnect();
-    }
-
-    public void testTempDestination() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/temp-queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SEND\n" + "destination:/temp-queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        StompFrame message = stompConnection.receive(1000);
-        assertEquals("Hello World", message.getBody());
-    }
-
-    public void testJMSXUserIDIsSetInMessage() throws Exception {
-
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
-
-        stompConnection.sendFrame(frame);
-
-        TextMessage message = (TextMessage)consumer.receive(5000);
-        assertNotNull(message);
-        assertEquals("system", message.getStringProperty(Stomp.Headers.Message.USERID));
-
-    }
-
-    public void testJMSXUserIDIsSetInStompMessage() throws Exception {
-
-        String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = stompConnection.receiveFrame();
-        assertTrue(frame.startsWith("CONNECTED"));
-
-        frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        frame = "SEND\n" + "destination:/queue/" + getQueueName() + "\n\n" + "Hello World" + Stomp.NULL;
-        stompConnection.sendFrame(frame);
-
-        StompFrame message = stompConnection.receive(5000);
-        assertEquals("system", message.getHeaders().get(Stomp.Headers.Message.USERID));
-    }
-
-    public void testClientSetMessageIdIsIgnored() throws Exception {
-        HashMap<String, String> headers = new HashMap<String, String>();
-        headers.put(Stomp.Headers.Message.MESSAGE_ID, "Thisisnotallowed");
-        headers.put(Stomp.Headers.Message.TIMESTAMP, "1234");
-        headers.put(Stomp.Headers.Message.REDELIVERED, "true");
-        headers.put(Stomp.Headers.Message.SUBSCRIPTION, "Thisisnotallowed");
-        headers.put(Stomp.Headers.Message.USERID, "Thisisnotallowed");
-
-
-        stompConnection.connect("system", "manager");
-
-
-        stompConnection.send("/queue/" + getQueueName(), "msg", null, headers);
-
-        stompConnection.subscribe("/queue/" + getQueueName());
-        StompFrame stompMessage = stompConnection.receive();
-
-        Map<String, String> mess_headers = new HashMap<String, String>();
-        mess_headers = stompMessage.getHeaders();
-
-        assertFalse("Thisisnotallowed".equals(mess_headers.get(Stomp.Headers.Message.MESSAGE_ID)
-                ));
-        assertFalse("1234".equals(mess_headers.get(Stomp.Headers.Message.TIMESTAMP)));
-        assertNull(mess_headers.get(Stomp.Headers.Message.REDELIVERED));
-        assertNull(mess_headers.get(Stomp.Headers.Message.SUBSCRIPTION));
-        assertEquals("system", mess_headers.get(Stomp.Headers.Message.USERID));
-
-    }
-
-    public void testExpire() throws Exception {
-        stompConnection.connect("system", "manager");
-
-        HashMap<String, String> headers = new HashMap<String, String>();
-        long timestamp = System.currentTimeMillis();
-        headers.put(Stomp.Headers.Message.EXPIRATION_TIME, String.valueOf(timestamp));
-        headers.put(Stomp.Headers.Send.PERSISTENT, "true");
-
-
-        stompConnection.send("/queue/" + getQueueName(), "msg", null, headers);
-
-        stompConnection.subscribe("/queue/ActiveMQ.DLQ");
-        StompFrame stompMessage = stompConnection.receive(1000);
-        assertNotNull(stompMessage);
-        assertEquals(stompMessage.getHeaders().get(Stomp.Headers.Message.ORIGINAL_DESTINATION), "/queue/" + getQueueName());
-    }
-
-
-
-
-    protected void assertClients(int expected) throws Exception {
-        org.apache.activemq.broker.Connection[] clients = broker.getBroker().getClients();
-        int actual = clients.length;
-
-        assertEquals("Number of clients", expected, actual);
-    }
-
-    protected void waitForFrameToTakeEffect() throws InterruptedException {
-        // bit of a dirty hack :)
-        // another option would be to force some kind of receipt to be returned
-        // from the frame
-        Thread.sleep(2000);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
deleted file mode 100644
index 5a67b4a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.net.SocketFactory;
-
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.TransportServer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class InactivityMonitorTest extends CombinationTestSupport implements TransportAcceptListener {
-    private static final Logger LOG = LoggerFactory.getLogger(InactivityMonitorTest.class);
-
-    public Runnable serverRunOnCommand;
-    public Runnable clientRunOnCommand;
-
-    private TransportServer server;
-    private Transport clientTransport;
-    private Transport serverTransport;
-
-    private final AtomicInteger clientReceiveCount = new AtomicInteger(0);
-    private final AtomicInteger clientErrorCount = new AtomicInteger(0);
-    private final AtomicInteger serverReceiveCount = new AtomicInteger(0);
-    private final AtomicInteger serverErrorCount = new AtomicInteger(0);
-
-    private final AtomicBoolean ignoreClientError = new AtomicBoolean(false);
-    private final AtomicBoolean ignoreServerError = new AtomicBoolean(false);
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        startTransportServer();
-    }
-
-    /**
-     * @throws Exception
-     * @throws URISyntaxException
-     */
-    private void startClient() throws Exception, URISyntaxException {
-        clientTransport = TransportFactory.connect(new URI("tcp://localhost:61616?trace=true&wireFormat.maxInactivityDuration=1000"));
-        clientTransport.setTransportListener(new TransportListener() {
-            public void onCommand(Object command) {
-                clientReceiveCount.incrementAndGet();
-                if (clientRunOnCommand != null) {
-                    clientRunOnCommand.run();
-                }
-            }
-
-            public void onException(IOException error) {
-                if (!ignoreClientError.get()) {
-                    LOG.info("Client transport error:");
-                    error.printStackTrace();
-                    clientErrorCount.incrementAndGet();
-                }
-            }
-
-            public void transportInterupted() {
-            }
-
-            public void transportResumed() {
-            }
-        });
-        clientTransport.start();
-    }
-
-    /**
-     * @throws IOException
-     * @throws URISyntaxException
-     * @throws Exception
-     */
-    private void startTransportServer() throws IOException, URISyntaxException, Exception {
-        server = TransportFactory.bind(new URI("tcp://localhost:61616?trace=true&wireFormat.maxInactivityDuration=1000"));
-        server.setAcceptListener(this);
-        server.start();
-    }
-
-    protected void tearDown() throws Exception {
-        ignoreClientError.set(true);
-        ignoreServerError.set(true);
-        try {
-            if (clientTransport != null) {
-                clientTransport.stop();
-            }
-            if (serverTransport != null) {
-                serverTransport.stop();
-            }
-            if (server != null) {
-                server.stop();
-            }
-        } catch (Throwable e) {
-            e.printStackTrace();
-        }
-        super.tearDown();
-    }
-
-    public void onAccept(Transport transport) {
-        try {
-            LOG.info("[" + getName() + "] Server Accepted a Connection");
-            serverTransport = transport;
-            serverTransport.setTransportListener(new TransportListener() {
-                public void onCommand(Object command) {
-                    serverReceiveCount.incrementAndGet();
-                    if (serverRunOnCommand != null) {
-                        serverRunOnCommand.run();
-                    }
-                }
-
-                public void onException(IOException error) {
-                    if (!ignoreClientError.get()) {
-                        LOG.info("Server transport error:", error);
-                        serverErrorCount.incrementAndGet();
-                    }
-                }
-
-                public void transportInterupted() {
-                }
-
-                public void transportResumed() {
-                }
-            });
-            serverTransport.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void onAcceptError(Exception error) {
-        LOG.trace(error.toString());
-    }
-
-    public void testClientHang() throws Exception {
-
-        // 
-        // Manually create a client transport so that it does not send KeepAlive
-        // packets.
-        // this should simulate a client hang.
-        clientTransport = new TcpTransport(new OpenWireFormat(), SocketFactory.getDefault(), new URI("tcp://localhost:61616"), null);
-        clientTransport.setTransportListener(new TransportListener() {
-            public void onCommand(Object command) {
-                clientReceiveCount.incrementAndGet();
-                if (clientRunOnCommand != null) {
-                    clientRunOnCommand.run();
-                }
-            }
-
-            public void onException(IOException error) {
-                if (!ignoreClientError.get()) {
-                    LOG.info("Client transport error:");
-                    error.printStackTrace();
-                    clientErrorCount.incrementAndGet();
-                }
-            }
-
-            public void transportInterupted() {
-            }
-
-            public void transportResumed() {
-            }
-        });
-        clientTransport.start();
-        WireFormatInfo info = new WireFormatInfo();
-        info.setVersion(OpenWireFormat.DEFAULT_VERSION);
-        info.setMaxInactivityDuration(1000);
-        clientTransport.oneway(info);
-
-        assertEquals(0, serverErrorCount.get());
-        assertEquals(0, clientErrorCount.get());
-
-        // Server should consider the client timed out right away since the
-        // client is not hart beating fast enough.
-        Thread.sleep(6000);
-
-        assertEquals(0, clientErrorCount.get());
-        assertTrue(serverErrorCount.get() > 0);
-    }
-
-    public void testNoClientHang() throws Exception {
-        startClient();
-
-        assertEquals(0, serverErrorCount.get());
-        assertEquals(0, clientErrorCount.get());
-
-        Thread.sleep(4000);
-
-        assertEquals(0, clientErrorCount.get());
-        assertEquals(0, serverErrorCount.get());
-    }
-
-    /**
-     * Used to test when a operation blocks. This should not cause transport to
-     * get disconnected.
-     * 
-     * @throws Exception
-     * @throws URISyntaxException
-     */
-    public void initCombosForTestNoClientHangWithServerBlock() throws Exception {
-
-        startClient();
-
-        addCombinationValues("clientInactivityLimit", new Object[] {Long.valueOf(1000)});
-        addCombinationValues("serverInactivityLimit", new Object[] {Long.valueOf(1000)});
-        addCombinationValues("serverRunOnCommand", new Object[] {new Runnable() {
-            public void run() {
-                try {
-                    LOG.info("Sleeping");
-                    Thread.sleep(4000);
-                } catch (InterruptedException e) {
-                }
-            }
-        }});
-    }
-
-    public void testNoClientHangWithServerBlock() throws Exception {
-
-        startClient();
-
-        assertEquals(0, serverErrorCount.get());
-        assertEquals(0, clientErrorCount.get());
-
-        Thread.sleep(4000);
-
-        assertEquals(0, clientErrorCount.get());
-        assertEquals(0, serverErrorCount.get());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/QualityOfServiceUtilsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/QualityOfServiceUtilsTest.java
deleted file mode 100644
index f1bc13d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/QualityOfServiceUtilsTest.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.net.Socket;
-import java.util.HashMap;
-import java.util.Map;
-import junit.framework.TestCase;
-
-public class QualityOfServiceUtilsTest extends TestCase {
-    /**
-     * Keeps track of the value that the System has set for the ECN bits, which
-     * should not be overridden when Differentiated Services is set, but may be
-     * overridden when Type of Service is set.
-     */
-    private int ECN;
-
-    @Override
-    protected void setUp() throws Exception {
-        Socket socket = new Socket();
-        ECN = socket.getTrafficClass() & Integer.parseInt("00000011", 2);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testValidDiffServIntegerValues() {
-        int[] values = {0, 1, 32, 62, 63};
-        for (int val : values) {
-            testValidDiffServIntegerValue(val);
-        }
-    }
-
-    public void testInvalidDiffServIntegerValues() {
-        int[] values = {-2, -1, 64, 65};
-        for (int val : values) {
-            testInvalidDiffServIntegerValue(val);
-        }
-    }
-
-    public void testValidDiffServNames() {
-        Map<String, Integer> namesToExpected = new HashMap<String, Integer>();
-        namesToExpected.put("CS0", Integer.valueOf("000000", 2));
-        namesToExpected.put("CS1", Integer.valueOf("001000", 2));
-        namesToExpected.put("CS2", Integer.valueOf("010000", 2));
-        namesToExpected.put("CS3", Integer.valueOf("011000", 2));
-        namesToExpected.put("CS4", Integer.valueOf("100000", 2));
-        namesToExpected.put("CS5", Integer.valueOf("101000", 2));
-        namesToExpected.put("CS6", Integer.valueOf("110000", 2));
-        namesToExpected.put("CS7", Integer.valueOf("111000", 2));
-        namesToExpected.put("EF", Integer.valueOf("101110", 2));
-        namesToExpected.put("AF11", Integer.valueOf("001010", 2));
-        namesToExpected.put("AF12", Integer.valueOf("001100", 2));
-        namesToExpected.put("AF13", Integer.valueOf("001110", 2));
-        namesToExpected.put("AF21", Integer.valueOf("010010", 2));
-        namesToExpected.put("AF22", Integer.valueOf("010100", 2));
-        namesToExpected.put("AF23", Integer.valueOf("010110", 2));
-        namesToExpected.put("AF31", Integer.valueOf("011010", 2));
-        namesToExpected.put("AF32", Integer.valueOf("011100", 2));
-        namesToExpected.put("AF33", Integer.valueOf("011110", 2));
-        namesToExpected.put("AF41", Integer.valueOf("100010", 2));
-        namesToExpected.put("AF42", Integer.valueOf("100100", 2));
-        namesToExpected.put("AF43", Integer.valueOf("100110", 2));
-        for (String name : namesToExpected.keySet()) {
-            testValidDiffServName(name, namesToExpected.get(name));
-        }
-    }
-
-    public void testInvalidDiffServNames() {
-        String[] names = {"hello_world", "", "abcd"};
-        for (String name : names) {
-            testInvalidDiffServName(name);
-        }
-    }
-
-    private void testValidDiffServName(String name, int expected) {
-        int dscp = -1;
-        try {
-            dscp = QualityOfServiceUtils.getDSCP(name);
-        } catch (IllegalArgumentException e) {
-            fail("IllegalArgumentException thrown for valid Differentiated "
-                 + " Services name: " + name);
-        }
-        // Make sure it adjusted for any system ECN values.
-        assertEquals("Incorrect Differentiated Services Code Point "  + dscp
-            + " returned for name " + name + ".", ECN | (expected << 2), dscp);
-    }
-
-    private void testInvalidDiffServName(String name) {
-        try {
-            int dscp = QualityOfServiceUtils.getDSCP(name);
-            fail("No IllegalArgumentException thrown for invalid Differentiated"
-                 + " Services value: " + name + ".");
-        } catch (IllegalArgumentException e) {
-        }
-    }
-    
-    private void testValidDiffServIntegerValue(int val) {
-        try {
-            int dscp = QualityOfServiceUtils.getDSCP(Integer.toString(val));
-            // Make sure it adjusted for any system ECN values.
-            assertEquals("Incorrect Differentiated Services Code Point "
-                + "returned for value " + val + ".", ECN | (val << 2), dscp);
-        } catch (IllegalArgumentException e) {
-            fail("IllegalArgumentException thrown for valid Differentiated "
-                 + "Services value " + val);
-        }
-    }
-
-    private void testInvalidDiffServIntegerValue(int val) {
-        try {
-            int dscp = QualityOfServiceUtils.getDSCP(Integer.toString(val));
-            fail("No IllegalArgumentException thrown for invalid "
-                + "Differentiated Services value " + val + ".");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    public void testValidTypeOfServiceValues() {
-        int[] values = {0, 1, 32, 100, 255};
-        for (int val : values) {
-            testValidTypeOfServiceValue(val);
-        }
-    }
-
-    public void testInvalidTypeOfServiceValues() {
-        int[] values = {-2, -1, 256, 257};
-        for (int val : values) {
-            testInvalidTypeOfServiceValue(val);
-        }
-    }
-
-    private void testValidTypeOfServiceValue(int val) {
-        try {
-            int typeOfService = QualityOfServiceUtils.getToS(val);
-            assertEquals("Incorrect Type of Services value returned for " + val
-                + ".", val, typeOfService);
-        } catch (IllegalArgumentException e) {
-            fail("IllegalArgumentException thrown for valid Type of Service "
-                 + "value " + val + ".");
-        }
-    }
-
-    private void testInvalidTypeOfServiceValue(int val) {
-        try {
-            int typeOfService = QualityOfServiceUtils.getToS(val);
-            fail("No IllegalArgumentException thrown for invalid "
-                + "Type of Service value " + val + ".");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java
deleted file mode 100755
index 5b6adf6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.util.Random;
-import javax.net.ServerSocketFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- */
-public class ServerSocketTstFactory extends ServerSocketFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(ServerSocketTstFactory.class);
-
-    private class ServerSocketTst {
-
-	private final	ServerSocket	socket;
-
-	public ServerSocketTst(int port, Random rnd) throws IOException {
-		this.socket = ServerSocketFactory.getDefault().createServerSocket(port);
-	}
-
-	public ServerSocketTst(int port, int backlog, Random rnd) throws IOException {
-		this.socket = ServerSocketFactory.getDefault().createServerSocket(port, backlog);
-	}
-
-	public ServerSocketTst(int port, int backlog, InetAddress bindAddr, Random rnd) throws IOException {
-		this.socket = ServerSocketFactory.getDefault().createServerSocket(port, backlog, bindAddr);
-	}
-
-	public ServerSocket	getSocket() {
-		return this.socket;
-	}
-    };
-
-   private final Random	rnd;
-
-   public ServerSocketTstFactory() {
-	super();
-	LOG.info("Creating a new ServerSocketTstFactory");
-	this.rnd = new Random();
-   }
-
-   public ServerSocket createServerSocket(int port) throws IOException {
-	ServerSocketTst	sSock = new ServerSocketTst(port, this.rnd);
-	return sSock.getSocket();
-   }
-
-   public ServerSocket createServerSocket(int port, int backlog) throws IOException {
-	ServerSocketTst	sSock = new ServerSocketTst(port, backlog, this.rnd);
-	return sSock.getSocket();
-   }
-
-   public ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException {
-	ServerSocketTst	sSock = new ServerSocketTst(port, backlog, ifAddress, this.rnd);
-	return sSock.getSocket();
-   }
-
-   private final static ServerSocketTstFactory server = new ServerSocketTstFactory();
-
-   public static ServerSocketTstFactory getDefault() {
-	return server;
-   }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SocketTstFactory.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SocketTstFactory.java
deleted file mode 100755
index 4aca348..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SocketTstFactory.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.Random;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.net.SocketFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- *
- * Automatically generated socket.close() calls to simulate network faults
- */
-public class SocketTstFactory extends SocketFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(SocketTstFactory.class);
-
-    private static final ConcurrentHashMap<InetAddress, Integer>	closeIter = new ConcurrentHashMap<InetAddress, Integer>();
-
-    private class SocketTst {
-
-	private class Bagot implements Runnable {
-		private Thread			processus;
-		private Random	rnd;
-		private Socket			socket;
-		private final InetAddress	address;
-
-		public Bagot(Random rnd, Socket socket, InetAddress address) {
-			this.processus  = new Thread(this, "Network Faults maker : undefined");
-			this.rnd	= rnd;
-			this.socket	= socket;
-			this.address	= address;
-		}
-
-		public void start() {
-			this.processus.setName("Network Faults maker : " + this.socket.toString());
-			this.processus.start();
-		}
-
-		public void run () {
-			int 	lastDelayVal;
-			Integer lastDelay;
-			while (!this.processus.isInterrupted()) {
-				if (!this.socket.isClosed()) {
-					try {
-						lastDelay = closeIter.get(this.address);
-						if (lastDelay == null) { 
-							lastDelayVal = 0;
-						}
-						else {
-							lastDelayVal = lastDelay.intValue();
-							if (lastDelayVal > 10)
-								lastDelayVal += 20;
-							else	lastDelayVal += 1;	
-						}
-
-						lastDelay = new Integer(lastDelayVal);
-
-						LOG.info("Trying to close client socket " + socket.toString() +  " in " + lastDelayVal + " milliseconds");
-
-						try {
-							Thread.sleep(lastDelayVal);
-						} catch (InterruptedException e) {
-							this.processus.interrupt();
-							Thread.currentThread().interrupt();
-						} catch (IllegalArgumentException e) {
-						}
-							
-						this.socket.close();
-						closeIter.put(this.address, lastDelay);
-						LOG.info("Client socket " + this.socket.toString() + " is closed.");
-					} catch (IOException e) {
-					}
-				}
-
-				this.processus.interrupt();
-			}
-		}
-	}
-
-	private	final Bagot		bagot;
-	private final Socket		socket;
-
-	public SocketTst(InetAddress address, int port, Random rnd) throws IOException {
-		this.socket = new Socket(address, port);
-		bagot = new Bagot(rnd, this.socket, address);
-	}
-
-	public SocketTst(InetAddress address, int port, InetAddress localAddr, int localPort, Random rnd) throws IOException {
-		this.socket = new Socket(address, port, localAddr, localPort);
-		bagot = new Bagot(rnd, this.socket, address);
-	}
-
-	public SocketTst(String address, int port, Random rnd) throws UnknownHostException, IOException {
-		this.socket = new Socket(address, port);
-		bagot = new Bagot(rnd, this.socket, InetAddress.getByName(address));
-	}
-
-	public SocketTst(String address, int port, InetAddress localAddr, int localPort, Random rnd) throws IOException {
-		this.socket = new Socket(address, port, localAddr, localPort);
-		bagot = new Bagot(rnd, this.socket, InetAddress.getByName(address));
-	}
-
-	public Socket getSocket() {
-		return this.socket;
-	}
-
-	public void startBagot() {
-		bagot.start();
-	}
-    };
-
-    private final Random		rnd;
-
-    public SocketTstFactory() {
-	super();
-	LOG.info("Creating a new SocketTstFactory");
-	this.rnd	= new Random();
-    }
-
-    public Socket createSocket(InetAddress host, int port) throws IOException {
-	SocketTst sockTst;
-	sockTst = new SocketTst(host, port, this.rnd);
-	sockTst.startBagot();
-	return sockTst.getSocket();
-    }
-
-    public Socket createSocket(InetAddress host, int port, InetAddress localAddress, int localPort) throws IOException {
-	SocketTst	sockTst;
-	sockTst = new SocketTst(host, port, localAddress, localPort, this.rnd);
-	sockTst.startBagot();
-	return sockTst.getSocket();
-    }
-
-    public Socket createSocket(String host, int port) throws IOException {
-	SocketTst	sockTst;
-	sockTst = new SocketTst(host, port, this.rnd);
-	sockTst.startBagot();
-	return sockTst.getSocket();
-    }
-
-    public Socket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException {
-	SocketTst	sockTst;
-	sockTst = new SocketTst(host, port, localAddress, localPort, this.rnd);
-	sockTst.startBagot();
-	return sockTst.getSocket();
-    }
-
-    private final static SocketTstFactory client = new SocketTstFactory();
-
-    public static SocketFactory getDefault() {
-	return client;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java
deleted file mode 100644
index 25d7f3f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.security.KeyStore;
-
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.SslBrokerService;
-import org.apache.activemq.broker.SslContext;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.transport.TransportBrokerTestSupport;
-import org.apache.activemq.transport.TransportFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SslBrokerServiceTest extends TransportBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(SslBrokerServiceTest.class);
-
-    TransportConnector needClientAuthConnector;
-    TransportConnector limitedCipherSuites;
-    
-    protected String getBindLocation() {
-        return "ssl://localhost:0";
-    }
-    
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        
-        // http://java.sun.com/javase/javaseforbusiness/docs/TLSReadme.html
-        // work around: javax.net.ssl.SSLHandshakeException: renegotiation is not allowed
-        System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
-        
-        SslBrokerService service = new SslBrokerService();
-        service.setPersistent(false);
-        
-        KeyManager[] km = getKeyManager();
-        TrustManager[] tm = getTrustManager();
-        connector = service.addSslConnector(getBindLocation(), km, tm, null);
-        limitedCipherSuites = service.addSslConnector("ssl://localhost:0?transport.enabledCipherSuites=SSL_RSA_WITH_RC4_128_SHA,SSL_DH_anon_WITH_3DES_EDE_CBC_SHA", km, tm, null);
-        needClientAuthConnector = service.addSslConnector("ssl://localhost:0?transport.needClientAuth=true", km, tm, null);
-        
-        // for client side
-        SslTransportFactory sslFactory = new SslTransportFactory();
-        SslContext ctx = new SslContext(km, tm, null);
-        SslContext.setCurrentSslContext(ctx);
-        TransportFactory.registerTransportFactory("ssl", sslFactory);
-        
-        return service;
-    }
-
-    public void testNeedClientAuth() throws Exception {   
-        SSLContext context = SSLContext.getInstance("TLS");    
-        // no client cert
-        context.init(null, getTrustManager(), null);
-        
-        try {
-            makeSSLConnection(context, null, needClientAuthConnector);
-            fail("expected failure on no client cert");
-        } catch (SSLException expected) {
-            expected.printStackTrace();
-        }
-        // should work with regular connector
-        makeSSLConnection(context, null, connector);
-    }
-    
-    public void testCipherSuitesDisabled() throws Exception {
-        SSLContext context = SSLContext.getInstance("TLS");
-        context.init(getKeyManager(), getTrustManager(), null);
-        
-        // Enable only one cipher suite which is not enabled on the server
-        try {
-            makeSSLConnection(context, new String[]{ "SSL_RSA_WITH_RC4_128_MD5" }, limitedCipherSuites);
-            fail("expected failure on non allowed cipher suite");
-        } catch (SSLException expectedOnNotAnAvailableSuite) {
-        }
-
-        // ok with the enabled one
-        makeSSLConnection(context, new String[]{ "SSL_RSA_WITH_RC4_128_SHA" }, limitedCipherSuites);
-    }
-
-    private void makeSSLConnection(SSLContext context, String enabledSuites[], TransportConnector connector) throws Exception,
-            UnknownHostException, SocketException {
-        SSLSocket sslSocket = (SSLSocket) context.getSocketFactory().createSocket("localhost", connector.getUri().getPort());
-        
-        if (enabledSuites != null) {
-            sslSocket.setEnabledCipherSuites(enabledSuites);
-        }
-        sslSocket.setSoTimeout(5000);
-        
-        SSLSession session = sslSocket.getSession();
-        sslSocket.startHandshake();
-        LOG.info("cyphersuite: " + session.getCipherSuite());
-        LOG.info("peer port: " + session.getPeerPort());
-        LOG.info("peer cert: " + session.getPeerCertificateChain()[0].toString());    
-    }
-    
-    public static TrustManager[] getTrustManager() throws Exception {
-        TrustManager[] trustStoreManagers = null;
-        KeyStore trustedCertStore = KeyStore.getInstance(SslTransportBrokerTest.KEYSTORE_TYPE);
-        
-        trustedCertStore.load(new FileInputStream(SslTransportBrokerTest.TRUST_KEYSTORE), null);
-        TrustManagerFactory tmf  = 
-            TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
-  
-        tmf.init(trustedCertStore);
-        trustStoreManagers = tmf.getTrustManagers();
-        return trustStoreManagers; 
-    }
-
-    public static KeyManager[] getKeyManager() throws Exception {
-        KeyManagerFactory kmf = 
-            KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());  
-        KeyStore ks = KeyStore.getInstance(SslTransportBrokerTest.KEYSTORE_TYPE);
-        KeyManager[] keystoreManagers = null;
-        
-        byte[] sslCert = loadClientCredential(SslTransportBrokerTest.SERVER_KEYSTORE);
-        
-       
-        if (sslCert != null && sslCert.length > 0) {
-            ByteArrayInputStream bin = new ByteArrayInputStream(sslCert);
-            ks.load(bin, SslTransportBrokerTest.PASSWORD.toCharArray());
-            kmf.init(ks, SslTransportBrokerTest.PASSWORD.toCharArray());
-            keystoreManagers = kmf.getKeyManagers();
-        }
-        return keystoreManagers;          
-    }
-
-    private static byte[] loadClientCredential(String fileName) throws IOException {
-        if (fileName == null) {
-            return null;
-        }
-        FileInputStream in = new FileInputStream(fileName);
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        byte[] buf = new byte[512];
-        int i = in.read(buf);
-        while (i  > 0) {
-            out.write(buf, 0, i);
-            i = in.read(buf);
-        }
-        in.close();
-        return out.toByteArray();
-    }
-
-    protected void setUp() throws Exception {
-        maxWait = 10000;
-        super.setUp();
-    }
-
-    public static Test suite() {
-        return suite(SslBrokerServiceTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextBrokerServiceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextBrokerServiceTest.java
deleted file mode 100644
index a154e41..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextBrokerServiceTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.transport.TransportBrokerTestSupport;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * 
- */
-public class SslContextBrokerServiceTest extends TestCase {
-
-    
-    private ClassPathXmlApplicationContext context;
-    private BrokerService broker;
-    private TransportConnector connector;
-
-
-    public void testConfiguration() throws URISyntaxException {
-
-        assertNotNull(broker);
-        assertNotNull(connector);
-        
-        assertEquals(new URI("ssl://localhost:61616"), connector.getUri());
-        
-        assertNotNull(broker.getSslContext());
-        assertFalse(broker.getSslContext().getKeyManagers().isEmpty());
-        assertFalse(broker.getSslContext().getTrustManagers().isEmpty());
-        
-    }
-
-    protected void setUp() throws Exception {
-        Thread.currentThread().setContextClassLoader(SslContextBrokerServiceTest.class.getClassLoader());
-        context = new ClassPathXmlApplicationContext("org/apache/activemq/transport/tcp/activemq-ssl.xml");
-        Map beansOfType = context.getBeansOfType(BrokerService.class);
-        broker = (BrokerService)beansOfType.values().iterator().next();
-        connector = broker.getTransportConnectors().get(0); 
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-
-        context.destroy();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextNBrokerServiceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextNBrokerServiceTest.java
deleted file mode 100644
index 94647af..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslContextNBrokerServiceTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.net.URI;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-
-public class SslContextNBrokerServiceTest extends TestCase {
-    private static final transient Logger LOG = LoggerFactory.getLogger(SslContextNBrokerServiceTest.class);
-    
-    private ClassPathXmlApplicationContext context;
-    Map beansOfType;
-    
-    public void testConfigurationIsolation() throws Exception {
-        
-        assertTrue("dummy bean has dummy cert", verifyCredentials("dummy"));
-        assertTrue("good bean has amq cert", verifyCredentials("activemq.org"));
-    }
-    
-    private boolean verifyCredentials(String name) throws Exception {
-        boolean result = false;
-        BrokerService broker = getBroker(name);
-        assertNotNull(name, broker);
-        broker.start();
-        try {
-            result = verifySslCredentials(broker);
-        } finally {
-            broker.stop();
-        }
-        return result;
-    }
-
-    private boolean verifySslCredentials(BrokerService broker) throws Exception {
-        TransportConnector connector = broker.getTransportConnectors().get(0);
-        URI brokerUri = connector.getConnectUri();
-
-        SSLContext context = SSLContext.getInstance("TLS");        
-        CertChainCatcher catcher = new CertChainCatcher(); 
-        context.init(null, new TrustManager[] {catcher}, null);
-        
-        SSLSocketFactory factory = context.getSocketFactory();
-        LOG.info("Connecting to broker: " + broker.getBrokerName()
-                + " on: " + brokerUri.getHost() + ":" + brokerUri.getPort());
-        SSLSocket socket = (SSLSocket)factory.createSocket(brokerUri.getHost(), brokerUri.getPort());
-        socket.setSoTimeout(5000);
-        socket.startHandshake();
-        socket.close();
-        
-        boolean matches = false;
-        if (catcher.serverCerts != null) {
-            for (int i = 0; i < catcher.serverCerts.length; i++) {
-                X509Certificate cert = catcher.serverCerts[i];
-                LOG.info(" " + (i + 1) + " Issuer " + cert.getIssuerDN());
-            }
-            if (catcher.serverCerts.length > 0) {
-                String issuer = catcher.serverCerts[0].getIssuerDN().toString();
-                if (issuer.indexOf(broker.getBrokerName()) != -1) {
-                    matches = true;
-                }
-            }
-        }
-        return matches; 
-    }
-
-
-    private BrokerService getBroker(String name) {
-        BrokerService result = null;
-        Iterator iterator = beansOfType.values().iterator();
-        while(iterator.hasNext()) {
-            BrokerService candidate = (BrokerService)iterator.next();
-            if (candidate.getBrokerName().equals(name)) {
-                result = candidate;
-                break;
-            }
-        }
-        return result;
-    }
-
-
-    protected void setUp() throws Exception {     
-        //System.setProperty("javax.net.debug", "ssl");
-        Thread.currentThread().setContextClassLoader(SslContextNBrokerServiceTest.class.getClassLoader());
-        context = new ClassPathXmlApplicationContext("org/apache/activemq/transport/tcp/n-brokers-ssl.xml");
-        beansOfType = context.getBeansOfType(BrokerService.class);
-        
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-        context.destroy();
-    }
-
-
-    class CertChainCatcher implements  X509TrustManager {  
-        X509Certificate[] serverCerts;
-        
-        public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
-        }
-        public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
-            serverCerts = arg0;
-        }
-        public X509Certificate[] getAcceptedIssuers() {
-            return null;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslSocketHelper.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslSocketHelper.java
deleted file mode 100644
index 52a5db1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslSocketHelper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-
-import javax.management.remote.JMXPrincipal;
-import javax.net.ssl.SSLSocket;
-
-/**
- * 
- */
-public final class SslSocketHelper {
-
-    private SslSocketHelper() {
-    }
-
-    public static SSLSocket createSSLSocket(String certDistinguishedName, boolean wantAuth, boolean needAuth)
-        throws IOException {
-        JMXPrincipal principal = new JMXPrincipal(certDistinguishedName);
-        X509Certificate cert = new StubX509Certificate(principal);
-        StubSSLSession sslSession = new StubSSLSession(cert);
-
-        StubSSLSocket sslSocket = new StubSSLSocket(sslSession);
-        sslSocket.setWantClientAuth(wantAuth);
-        sslSocket.setNeedClientAuth(needAuth);
-        return sslSocket;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java
deleted file mode 100755
index c5a90fc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-import org.apache.activemq.transport.TransportBrokerTestSupport;
-
-public class SslTransportBrokerTest extends TransportBrokerTestSupport {
-
-    public static final String KEYSTORE_TYPE = "jks";
-    public static final String PASSWORD = "password";
-    public static final String SERVER_KEYSTORE = "src/test/resources/server.keystore";
-    public static final String TRUST_KEYSTORE = "src/test/resources/client.keystore";
-
-    protected String getBindLocation() {
-        return "ssl://localhost:0";
-    }
-
-    protected void setUp() throws Exception {
-        System.setProperty("javax.net.ssl.trustStore", TRUST_KEYSTORE);
-        System.setProperty("javax.net.ssl.trustStorePassword", PASSWORD);
-        System.setProperty("javax.net.ssl.trustStoreType", KEYSTORE_TYPE);        
-        System.setProperty("javax.net.ssl.keyStore", SERVER_KEYSTORE);
-        System.setProperty("javax.net.ssl.keyStorePassword", PASSWORD);
-        System.setProperty("javax.net.ssl.keyStoreType", KEYSTORE_TYPE);        
-        //System.setProperty("javax.net.debug", "ssl,handshake,data,trustmanager");        
-
-        maxWait = 10000;
-        super.setUp();
-    }
-
-    public static Test suite() {
-        return suite(SslTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java
deleted file mode 100644
index af9d672..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SslTransportFactoryTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(SslTransportFactoryTest.class);
-
-    private SslTransportFactory factory;
-    private boolean verbose;
-
-    protected void setUp() throws Exception {
-        factory = new SslTransportFactory();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testBindServerOptions() throws IOException {
-
-        SslTransportServer sslTransportServer = null;
-
-        for (int i = 0; i < 4; ++i) {
-            final boolean wantClientAuth = (i & 0x1) == 1;
-            final boolean needClientAuth = (i & 0x2) == 1;
-
-            String options = "wantClientAuth=" + (wantClientAuth ? "true" : "false") + "&needClientAuth="
-                             + (needClientAuth ? "true" : "false");
-
-            try {
-                sslTransportServer = (SslTransportServer)factory.doBind(new URI(
-                                                                                            "ssl://localhost:61616?"
-                                                                                                + options));
-            } catch (Exception e) {
-                fail("Unable to bind to address: " + e.getMessage());
-            }
-
-            assertEquals("Created ServerSocket did not have correct wantClientAuth status.",
-                         sslTransportServer.getWantClientAuth(), wantClientAuth);
-
-            assertEquals("Created ServerSocket did not have correct needClientAuth status.",
-                         sslTransportServer.getNeedClientAuth(), needClientAuth);
-
-            try {
-                sslTransportServer.stop();
-            } catch (Exception e) {
-                fail("Unable to stop TransportServer: " + e.getMessage());
-            }
-        }
-    }
-
-    private int getMthNaryDigit(int number, int digitIdx, int numBase) {
-        return (number / ((int)Math.pow(numBase, digitIdx))) % numBase;
-    }
-
-    public void testCompositeConfigure() throws IOException {
-        // The 5 options being tested.
-        int optionSettings[] = new int[5];
-
-        String optionNames[] = {"wantClientAuth", "needClientAuth", "socket.wantClientAuth",
-                                "socket.needClientAuth", "socket.useClientMode"};
-
-        // Using a trinary interpretation of i to set all possible values of
-        // stub options for socket and transport.
-        // 2 transport options, 3 socket options, 3 settings for each option =>
-        // 3^5 = 243 combos.
-        for (int i = 0; i < 243; ++i) {
-            Map<String, String> options = new HashMap<String, String>();
-
-            for (int j = 0; j < 5; ++j) {
-                // -1 since the option range is [-1,1], not [0,2].
-                optionSettings[j] = getMthNaryDigit(i, j, 3) - 1;
-
-                if (optionSettings[j] != -1) {
-                    options.put(optionNames[j], optionSettings[j] == 1 ? "true" : "false");
-                }
-            }
-
-            StubSSLSocket socketStub = new StubSSLSocket(null);
-            StubSslTransport transport = null;
-
-            try {
-                transport = new StubSslTransport(null, socketStub);
-            } catch (Exception e) {
-                fail("Unable to create StubSslTransport: " + e.getMessage());
-            }
-
-            if (verbose) {
-                LOG.info("");
-                LOG.info("Iteration: " + i);
-                LOG.info("Map settings: " + options);
-                for (int x = 0; x < optionSettings.length; x++) {
-                    LOG.info("optionSetting[" + x + "] = " + optionSettings[x]);
-                }
-            }
-
-            factory.compositeConfigure(transport, new OpenWireFormat(), options);
-
-            // lets start the transport to force the introspection
-            try {
-                transport.start();
-            } catch (Exception e) {
-                // ignore bad connection
-            }
-
-            if (socketStub.getWantClientAuthStatus() != optionSettings[2]) {
-                LOG.info("sheiite");
-            }
-
-            assertEquals("wantClientAuth was not properly set for iteration: " + i, optionSettings[0],
-                         transport.getWantClientAuthStatus());
-            assertEquals("needClientAuth was not properly set for iteration: " + i, optionSettings[1],
-                         transport.getNeedClientAuthStatus());
-            assertEquals("socket.wantClientAuth was not properly set for iteration: " + i, optionSettings[2],
-                         socketStub.getWantClientAuthStatus());
-            assertEquals("socket.needClientAuth was not properly set for iteration: " + i, optionSettings[3],
-                         socketStub.getNeedClientAuthStatus());
-            assertEquals("socket.useClientMode was not properly set for iteration: " + i, optionSettings[4],
-                         socketStub.getUseClientModeStatus());
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java
deleted file mode 100644
index 4053a5b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-
-import junit.framework.TestCase;
-
-public class SslTransportServerTest extends TestCase {
-    private SslTransportServer sslTransportServer;
-    private StubSSLServerSocket sslServerSocket;
-
-    protected void setUp() throws Exception {
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    private void createAndBindTransportServer(boolean wantClientAuth, boolean needClientAuth, String options) throws IOException {
-        sslServerSocket = new StubSSLServerSocket();
-
-        StubSSLSocketFactory socketFactory = new StubSSLSocketFactory(sslServerSocket);
-
-        try {
-            sslTransportServer = new SslTransportServer(null, new URI("ssl://localhost:61616?" + options), socketFactory);
-        } catch (Exception e) {
-            fail("Unable to create SslTransportServer.");
-        }
-
-        sslTransportServer.setWantClientAuth(wantClientAuth);
-        sslTransportServer.setNeedClientAuth(needClientAuth);
-
-        sslTransportServer.bind();
-    }
-
-    public void testWantAndNeedClientAuthSetters() throws IOException {
-        for (int i = 0; i < 4; ++i) {
-            String options = "";
-            singleTest(i, options);
-            }
-    }
-
-    public void testWantAndNeedAuthReflection() throws IOException {
-        for (int i = 0; i < 4; ++i) {
-            String options = "wantClientAuth=" + (getWantClientAuth(i) ? "true" : "false") +
-                "&needClientAuth=" + (getNeedClientAuth(i) ? "true" : "false");
-            singleTest(i, options);
-        }
-    }
-
-    private void singleTest(int i, String options) throws IOException {
-        final boolean wantClientAuth = getWantClientAuth(i);
-        final boolean needClientAuth = getNeedClientAuth(i);
-
-        final int expectedWantStatus = (needClientAuth? StubSSLServerSocket.UNTOUCHED: wantClientAuth ? StubSSLServerSocket.TRUE : StubSSLServerSocket.UNTOUCHED);
-        final int expectedNeedStatus = (needClientAuth ? StubSSLServerSocket.TRUE : StubSSLServerSocket.UNTOUCHED );
-
-
-        createAndBindTransportServer(wantClientAuth, needClientAuth, options);
-
-        assertEquals("Created ServerSocket did not have correct wantClientAuth status. wantClientAuth: " + wantClientAuth + ", needClientAuth: " + needClientAuth,
-            expectedWantStatus, sslServerSocket.getWantClientAuthStatus());
-
-        assertEquals("Created ServerSocket did not have correct needClientAuth status. wantClientAuth: " + wantClientAuth + ", needClientAuth: " + needClientAuth,
-            expectedNeedStatus, sslServerSocket.getNeedClientAuthStatus());
-    }
-
-    private boolean getNeedClientAuth(int i) {
-        return ((i & 0x2) == 0x2);
-    }
-
-    private boolean getWantClientAuth(int i) {
-        return ((i & 0x1) == 0x1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportTest.java
deleted file mode 100644
index d049745..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-
-import javax.management.remote.JMXPrincipal;
-import javax.net.ssl.SSLSocket;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.transport.StubTransportListener;
-import org.apache.activemq.wireformat.ObjectStreamWireFormat;
-
-/**
- * Unit tests for the SslTransport class.
- */
-public class SslTransportTest extends TestCase {
-
-    SSLSocket sslSocket;
-    StubTransportListener stubListener;
-
-    String username;
-    String password;
-    String certDistinguishedName;
-
-    protected void setUp() throws Exception {
-        certDistinguishedName = "ThisNameIsDistinguished";
-        username = "SomeUserName";
-        password = "SomePassword";
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    private void createTransportAndConsume(boolean wantAuth, boolean needAuth) throws IOException {
-        JMXPrincipal principal = new JMXPrincipal(certDistinguishedName);
-        X509Certificate cert = new StubX509Certificate(principal);
-        StubSSLSession sslSession = new StubSSLSession(cert);
-
-        sslSocket = new StubSSLSocket(sslSession);
-        sslSocket.setWantClientAuth(wantAuth);
-        sslSocket.setNeedClientAuth(needAuth);
-
-        SslTransport transport = new SslTransport(new ObjectStreamWireFormat(), sslSocket);
-
-        stubListener = new StubTransportListener();
-
-        transport.setTransportListener(stubListener);
-
-        ConnectionInfo sentInfo = new ConnectionInfo();
-
-        sentInfo.setUserName(username);
-        sentInfo.setPassword(password);
-
-        transport.doConsume(sentInfo);
-    }
-
-    public void testKeepClientUserName() throws IOException {
-        createTransportAndConsume(true, true);
-
-        final ConnectionInfo receivedInfo = (ConnectionInfo)stubListener.getCommands().remove();
-
-        X509Certificate receivedCert;
-
-        try {
-            receivedCert = ((X509Certificate[])receivedInfo.getTransportContext())[0];
-        } catch (Exception e) {
-            receivedCert = null;
-        }
-
-        if (receivedCert == null) {
-            fail("Transmitted certificate chain was not attached to ConnectionInfo.");
-        }
-
-        assertEquals("Received certificate distinguished name did not match the one transmitted.", certDistinguishedName, receivedCert.getSubjectDN().getName());
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java
deleted file mode 100644
index cc3d91c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-
-import javax.net.ssl.SSLServerSocket;
-
-public class StubSSLServerSocket extends SSLServerSocket {
-    public static final int UNTOUCHED = -1;
-    public static final int FALSE = 0;
-    public static final int TRUE = 1;
-    
-    private int wantClientAuthStatus = UNTOUCHED;
-    private int needClientAuthStatus = UNTOUCHED;
-    
-    public StubSSLServerSocket() throws IOException {
-        
-    }
-    
-    public int getWantClientAuthStatus() {
-        return wantClientAuthStatus;
-    }
-    
-    public int getNeedClientAuthStatus() {
-        return needClientAuthStatus;
-    }
-    
-    public void setWantClientAuth(boolean want) {
-        wantClientAuthStatus = want ? TRUE : FALSE;
-    }
-    
-    public void setNeedClientAuth(boolean need) {
-        needClientAuthStatus = need ? TRUE : FALSE;
-    }
-
-    // --- Stubbed methods ---
-    
-    public boolean getEnableSessionCreation() {
-        return false;
-    }
-
-    public String[] getEnabledCipherSuites() {
-        return null;
-    }
-
-    public String[] getEnabledProtocols() {
-        return null;
-    }
-
-    public boolean getNeedClientAuth() {
-        return false;
-    }
-
-    public String[] getSupportedCipherSuites() {
-        return null;
-    }
-
-    public String[] getSupportedProtocols() {
-        return null;
-    }
-
-    public boolean getUseClientMode() {
-        return false;
-    }
-
-    public boolean getWantClientAuth() {
-        return false;
-    }
-
-    public void setEnableSessionCreation(boolean flag) {
-    }
-
-    public void setEnabledCipherSuites(String[] suites) {
-    }
-
-    public void setEnabledProtocols(String[] protocols) {
-    }
-
-    public void setUseClientMode(boolean mode) {
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java
deleted file mode 100644
index 7c0a70b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.security.Principal;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-
-import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSessionContext;
-
-class StubSSLSession implements SSLSession {
-
-    X509Certificate cert;
-    boolean isVerified;
-
-    public StubSSLSession(X509Certificate cert) {
-        if (cert != null) {
-            this.isVerified = true;
-            this.cert = cert;
-        } else {
-            this.isVerified = false;
-            this.cert = null;
-        }
-    }
-
-    public void setIsVerified(boolean verified) {
-        this.isVerified = verified;
-    }
-
-    public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException {
-        if (this.isVerified) {
-            return new X509Certificate[] {this.cert};
-        } else {
-            throw new SSLPeerUnverifiedException("Socket is unverified.");
-        }
-    }
-
-    // --- Stubbed methods ---
-
-    public byte[] getId() {
-        return null;
-    }
-
-    public SSLSessionContext getSessionContext() {
-        return null;
-    }
-
-    public long getCreationTime() {
-        return 0;
-    }
-
-    public long getLastAccessedTime() {
-        return 0;
-    }
-
-    public void invalidate() {
-    }
-
-    public boolean isValid() {
-        return false;
-    }
-
-    public void putValue(String arg0, Object arg1) {
-    }
-
-    public Object getValue(String arg0) {
-        return null;
-    }
-
-    public void removeValue(String arg0) {
-    }
-
-    public String[] getValueNames() {
-        return null;
-    }
-
-    public Certificate[] getLocalCertificates() {
-        return null;
-    }
-
-    public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException {
-        return null;
-    }
-
-    public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
-        return null;
-    }
-
-    public Principal getLocalPrincipal() {
-        return null;
-    }
-
-    public String getCipherSuite() {
-        return null;
-    }
-
-    public String getProtocol() {
-        return null;
-    }
-
-    public String getPeerHost() {
-        return null;
-    }
-
-    public int getPeerPort() {
-        return 0;
-    }
-
-    public int getPacketBufferSize() {
-        return 0;
-    }
-
-    public int getApplicationBufferSize() {
-        return 0;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java
deleted file mode 100644
index d1de9aa..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-
-import javax.net.ssl.HandshakeCompletedListener;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-
-public class StubSSLSocket extends SSLSocket {
-
-    public static final int UNTOUCHED = -1;
-    public static final int FALSE = 0;
-    public static final int TRUE = 1;
-
-    private int wantClientAuthStatus = UNTOUCHED;
-    private int needClientAuthStatus = UNTOUCHED;
-    private int useClientModeStatus = UNTOUCHED;
-    private final StubSSLSession session;
-
-    public StubSSLSocket(StubSSLSession ses) {
-        this.session = ses;
-    }
-
-    public void setWantClientAuth(boolean arg0) {
-        this.wantClientAuthStatus = arg0 ? TRUE : FALSE;
-    }
-
-    public void setNeedClientAuth(boolean arg0) {
-        this.needClientAuthStatus = arg0 ? TRUE : FALSE;
-        if (session != null) {
-            this.session.setIsVerified(arg0);
-        }
-    }
-
-    public void setUseClientMode(boolean arg0) {
-        useClientModeStatus = arg0 ? TRUE : FALSE;
-    }
-
-    public boolean getWantClientAuth() {
-        return wantClientAuthStatus == TRUE;
-    }
-
-    public boolean getNeedClientAuth() {
-        return needClientAuthStatus == TRUE;
-    }
-
-    public boolean getUseClientMode() {
-        return useClientModeStatus == TRUE;
-    }
-
-    public int getWantClientAuthStatus() {
-        return wantClientAuthStatus;
-    }
-
-    public int getNeedClientAuthStatus() {
-        return needClientAuthStatus;
-    }
-
-    public int getUseClientModeStatus() {
-        return useClientModeStatus;
-    }
-
-    public SSLSession getSession() {
-        return this.session;
-    }
-
-    // --- Stubbed methods ---
-
-    public String[] getSupportedCipherSuites() {
-        return null;
-    }
-
-    public String[] getEnabledCipherSuites() {
-        return null;
-    }
-
-    public void setEnabledCipherSuites(String[] arg0) {
-    }
-
-    public String[] getSupportedProtocols() {
-        return null;
-    }
-
-    public String[] getEnabledProtocols() {
-        return null;
-    }
-
-    public void setEnabledProtocols(String[] arg0) {
-    }
-
-    public void addHandshakeCompletedListener(HandshakeCompletedListener arg0) {
-    }
-
-    public void removeHandshakeCompletedListener(HandshakeCompletedListener arg0) {
-    }
-
-    public void startHandshake() throws IOException {
-    }
-
-    public void setEnableSessionCreation(boolean arg0) {
-    }
-
-    public boolean getEnableSessionCreation() {
-        return false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java
deleted file mode 100644
index fa13cc3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-
-import javax.net.ssl.SSLServerSocketFactory;
-
-public class StubSSLSocketFactory extends SSLServerSocketFactory {
-
-    private final ServerSocket retServerSocket;
-
-    public StubSSLSocketFactory(ServerSocket returnServerSocket) {
-        retServerSocket = returnServerSocket;
-    }
-
-    public ServerSocket createServerSocket(int arg0) throws IOException {
-        return retServerSocket;
-    }
-
-    public ServerSocket createServerSocket(int arg0, int arg1) throws IOException {
-        return retServerSocket;
-    }
-
-    public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException {
-        return retServerSocket;
-    }
-
-    // --- Stubbed Methods ---
-
-    public String[] getDefaultCipherSuites() {
-        return null;
-    }
-
-    public String[] getSupportedCipherSuites() {
-        return null;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSslTransport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSslTransport.java
deleted file mode 100644
index f5d2dc7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSslTransport.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import javax.net.ssl.SSLSocket;
-
-import org.apache.activemq.wireformat.WireFormat;
-
-public class StubSslTransport extends SslTransport {
-    public static final int UNTOUCHED = -1;
-    public static final int FALSE = 0;
-    public static final int TRUE = 1;
-
-    private int wantClientAuthStatus = UNTOUCHED;
-    private int needClientAuthStatus = UNTOUCHED;
-
-    public StubSslTransport(WireFormat wireFormat, SSLSocket socket) throws Exception {
-        super(wireFormat, socket);
-    }
-
-    public void setWantClientAuth(boolean arg0) {
-        this.wantClientAuthStatus = arg0 ? TRUE : FALSE;
-    }
-
-    public void setNeedClientAuth(boolean arg0) {
-        this.needClientAuthStatus = arg0 ? TRUE : FALSE;
-    }
-
-    public int getWantClientAuthStatus() {
-        return wantClientAuthStatus;
-    }
-
-    public int getNeedClientAuthStatus() {
-        return needClientAuthStatus;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java
deleted file mode 100644
index d46d0b8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.math.BigInteger;
-import java.security.Principal;
-import java.security.PublicKey;
-import java.security.cert.X509Certificate;
-import java.util.Date;
-import java.util.Set;
-
-public class StubX509Certificate extends X509Certificate {
-    
-    private final Principal id;
-
-    public StubX509Certificate(Principal id) {
-        this.id = id;
-    }
-
-    public Principal getSubjectDN() {
-        return this.id;
-    }
-
-    // --- Stubbed Methods ---
-    public void checkValidity() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void checkValidity(Date arg0) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public int getVersion() {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    public BigInteger getSerialNumber() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Principal getIssuerDN() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Date getNotBefore() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Date getNotAfter() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public byte[] getTBSCertificate() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public byte[] getSignature() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public String getSigAlgName() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public String getSigAlgOID() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public byte[] getSigAlgParams() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public boolean[] getIssuerUniqueID() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public boolean[] getSubjectUniqueID() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public boolean[] getKeyUsage() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public int getBasicConstraints() {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    public byte[] getEncoded() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public void verify(PublicKey arg0) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void verify(PublicKey arg0, String arg1) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public String toString() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public PublicKey getPublicKey() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public boolean hasUnsupportedCriticalExtension() {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Set getCriticalExtensionOIDs() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Set getNonCriticalExtensionOIDs() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public byte[] getExtensionValue(String arg0) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransport.java
deleted file mode 100755
index b3783b5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransport.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.TcpTransport;
-
-import org.apache.activemq.wireformat.WireFormat;
-
-import javax.net.SocketFactory;
-
-/**
- * An implementation of the {@link Transport} interface using raw tcp/ip
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- * 
- */
-public class TcpFaultyTransport extends TcpTransport implements Transport, Service, Runnable {
-
-    public TcpFaultyTransport(WireFormat wireFormat, SocketFactory socketFactory, URI remoteLocation,
-                        URI localLocation) throws UnknownHostException, IOException {
-	super(wireFormat, socketFactory, remoteLocation, localLocation);
-    }
-
-    /**
-     * @return pretty print of 'this'
-     */
-    public String toString() {
-        return "tcpfaulty://" + socket.getInetAddress() + ":" + socket.getPort();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java
deleted file mode 100755
index 9044b70..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.InactivityMonitor;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportLoggerFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.WireFormatNegotiator;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.Socket;
-import java.net.ServerSocket;
-import java.net.InetAddress;
-
-import org.apache.activemq.transport.tcp.ServerSocketTstFactory;
-
-/**
- * Automatically generated socket.close() calls to simulate network faults
- */
-public class TcpFaultyTransportFactory extends TcpTransportFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(TcpFaultyTransportFactory.class);
-
-   protected TcpFaultyTransport createTcpFaultyTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws UnknownHostException, IOException {
-        return new TcpFaultyTransport(wf, socketFactory, location, localLocation);
-    }
-
-    protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException {
-        URI localLocation = null;
-        String path = location.getPath();
-        // see if the path is a local URI location
-        if (path != null && path.length() > 0) {
-            int localPortIndex = path.indexOf(':');
-            try {
-                Integer.parseInt(path.substring(localPortIndex + 1, path.length()));
-                String localString = location.getScheme() + ":/" + path;
-                localLocation = new URI(localString);
-            } catch (Exception e) {
-                LOG.warn("path isn't a valid local location for TcpTransport to use", e);
-            }
-        }
-        SocketFactory socketFactory = createSocketFactory();
-        return createTcpFaultyTransport(wf, socketFactory, location, localLocation);
-    }
-
-    protected TcpFaultyTransportServer createTcpFaultyTransportServer(final URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException     {
-        return new TcpFaultyTransportServer(this, location, serverSocketFactory);
-    }
-
-    public TransportServer doBind(final URI location) throws IOException {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-
-            ServerSocketFactory serverSocketFactory = createServerSocketFactory();
-            TcpFaultyTransportServer server = createTcpFaultyTransportServer(location, serverSocketFactory);
-            server.setWireFormatFactory(createWireFormatFactory(options));
-            IntrospectionSupport.setProperties(server, options);
-            Map<String, Object> transportOptions = IntrospectionSupport.extractProperties(options, "transport.");
-            server.setTransportOption(transportOptions);
-            server.bind();
-
-            return server;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    
-    protected SocketFactory createSocketFactory() throws IOException {
-	return SocketTstFactory.getDefault();
-    }
-
-    
-    protected ServerSocketFactory createServerSocketFactory() throws IOException {
-	return ServerSocketTstFactory.getDefault();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportServer.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportServer.java
deleted file mode 100755
index 50494ca..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportServer.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-
-import org.apache.activemq.util.ServiceListener;
-import org.apache.activemq.transport.tcp.TcpTransportServer;
-
-import javax.net.ServerSocketFactory;
-
-/**
- * A TCP based implementation of {@link TransportServer}
- * 
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- * 
- */
-
-public class TcpFaultyTransportServer extends TcpTransportServer implements ServiceListener{
-
-    public TcpFaultyTransportServer(TcpFaultyTransportFactory transportFactory, URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-	super(transportFactory, location, serverSocketFactory);
-    }
-
-    /**
-     * @return pretty print of this
-     */
-    public String toString() {
-        return "" + getBindLocation();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBindTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBindTest.java
deleted file mode 100644
index 33b83ed..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBindTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.util.Timer;
-import java.util.TimerTask;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-
-public class TcpTransportBindTest extends EmbeddedBrokerTestSupport {
-    final String addr = "tcp://localhost:61617";
-    
-    /**
-     * exercise some server side socket options
-     * @throws Exception
-     */
-    protected void setUp() throws Exception {   
-        bindAddress = addr + "?transport.reuseAddress=true&transport.soTimeout=1000";
-        super.setUp();
-    }
-    
-    public void testConnect() throws Exception {
-        Connection connection = new ActiveMQConnectionFactory(addr).createConnection();
-        connection.start();
-    }
-    
-    
-    public void testReceiveThrowsException() throws Exception {
-        Connection connection = new ActiveMQConnectionFactory(addr).createConnection();
-        connection.start();
-        Session sess = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = sess.createConsumer(createDestination());
-        class StopTask extends TimerTask {
-            public void run() {
-                try {
-                    broker.stop();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        Timer timer = new Timer();
-        timer.schedule(new StopTask(), 1000);
-        try {
-            consumer.receive(30000);
-            fail("Should have thrown an exception");
-        } catch (Exception e) {
-            // should fail
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java
deleted file mode 100755
index 9ce2e8b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import junit.framework.Test;
-import org.apache.activemq.transport.TransportBrokerTestSupport;
-
-public class TcpTransportBrokerTest extends TransportBrokerTestSupport {
-
-    protected String getBindLocation() {
-        return "tcp://localhost:0";
-    }
-
-    protected void setUp() throws Exception {
-        maxWait = 2000;
-        super.setUp();
-    }
-
-    public static Test suite() {
-        return suite(TcpTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
deleted file mode 100644
index e4c459c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TransportUriTest extends EmbeddedBrokerTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TransportUriTest.class);
-    private static final String DIFF_SERV = "&diffServ=";
-    private static final String TOS = "&typeOfService=";
-
-    protected Connection connection;
-    
-    public String prefix;
-    public String postfix;
-
-
-    public void initCombosForTestUriOptionsWork() {
-        initSharedCombos();
-    }
-
-    public void testUriOptionsWork() throws Exception {
-        String uri = prefix + bindAddress + postfix;
-        LOG.info("Connecting via: " + uri);
-
-        connection = new ActiveMQConnectionFactory(uri).createConnection();
-        connection.start();
-    }
-
-    public void initCombosForTestValidDiffServOptionsWork() {
-        initSharedCombos();
-    }
-
-    public void testValidDiffServOptionsWork() throws Exception {
-        String[] validIntegerOptions = {"0", "1", "32", "62", "63"};
-        for (String opt : validIntegerOptions) {
-            testValidOptionsWork(DIFF_SERV + opt, "");
-        }
-        String[] validNameOptions = { "CS0", "CS1", "CS2", "CS3", "CS4", "CS5", "CS6",
-                "CS7", "EF", "AF11", "AF12","AF13", "AF21", "AF22", "AF23", "AF31", 
-                "AF32", "AF33", "AF41", "AF42", "AF43" };
-        for (String opt : validNameOptions) {
-            testValidOptionsWork(DIFF_SERV + opt, "");
-        }
-    }
-
-    public void initCombosForTestInvalidDiffServOptionDoesNotWork() {
-        initSharedCombos();
-    }
-
-    public void testInvalidDiffServOptionsDoesNotWork() throws Exception {
-        String[] invalidIntegerOptions = {"-2", "-1", "64", "65", "100", "255"};
-        for (String opt : invalidIntegerOptions) {
-            testInvalidOptionsDoNotWork(DIFF_SERV + opt, "");
-        }
-        String[] invalidNameOptions = {"hi", "", "A", "AF", "-AF21"};
-        for (String opt : invalidNameOptions) {
-            testInvalidOptionsDoNotWork(DIFF_SERV + opt, "");
-        }
-    }
-
-    public void initCombosForTestValidTypeOfServiceOptionsWork() {
-        initSharedCombos();
-    }
-
-    public void testValidTypeOfServiceOptionsWork() throws Exception {
-        int[] validOptions = {0, 1, 32, 100, 254, 255};
-        for (int opt : validOptions) {
-            testValidOptionsWork(TOS + opt, "");
-        }
-    }
-
-    public void initCombosForTestInvalidTypeOfServiceOptionDoesNotWork() {
-        initSharedCombos();
-    }
-
-    public void testInvalidTypeOfServiceOptionDoesNotWork() throws Exception {
-        int[] invalidOptions = {-2, -1, 256, 257};
-        for (int opt : invalidOptions) {
-            testInvalidOptionsDoNotWork(TOS + opt, "");
-        }
-    }
-
-    public void initCombosForTestDiffServAndTypeOfServiceMutuallyExclusive() {
-        initSharedCombos();
-    }
-
-    public void testDiffServAndTypeServiceMutuallyExclusive() {
-        String msg = "It should not be possible to set both Differentiated "
-            + "Services and Type of Service options on the same connection "
-            + "URI.";
-        testInvalidOptionsDoNotWork(TOS + 32 + DIFF_SERV, msg);
-        testInvalidOptionsDoNotWork(DIFF_SERV + 32 + TOS + 32, msg);
-    }
-
-    public void initCombosForTestBadVersionNumberDoesNotWork() {
-        initSharedCombos();
-    }
-
-    public void testBadVersionNumberDoesNotWork() throws Exception {
-        testInvalidOptionsDoNotWork("&minmumWireFormatVersion=65535", "");
-    }
-
-    public void initCombosForTestBadPropertyNameFails() {
-        initSharedCombos();
-    }
-        
-    public void testBadPropertyNameFails() throws Exception {
-        testInvalidOptionsDoNotWork("&cheese=abc", "");
-    }
-
-    private void initSharedCombos() {
-        addCombinationValues("prefix", new Object[] {""});
-        // TODO: Add more combinations.
-        addCombinationValues("postfix", new Object[]
-            {"?tcpNoDelay=true&keepAlive=true"});
-    }
-
-    private void testValidOptionsWork(String options, String msg) {
-        String uri = prefix + bindAddress + postfix + options;
-        LOG.info("Connecting via: " + uri);
-
-        try {
-            connection = new ActiveMQConnectionFactory(uri).createConnection();
-            connection.start();
-        } catch (Exception unexpected) {
-            fail("Valid options '" + options + "' on URI '" + uri + "' should "
-                 + "not have caused an exception to be thrown. " + msg
-                 + " Exception: " + unexpected);
-        }
-    }
-
-    private void testInvalidOptionsDoNotWork(String options, String msg) {
-        String uri = prefix + bindAddress + postfix + options;
-        LOG.info("Connecting via: " + uri);
-
-        try {
-            connection = new ActiveMQConnectionFactory(uri).createConnection();
-            connection.start();
-            fail("Invalid options '" + options + "' on URI '" + uri + "' should"
-                 + " have caused an exception to be thrown. " + msg);
-        } catch (Exception expected) {
-        }
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        bindAddress = "tcp://localhost:61616";
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            try {
-                connection.close();
-            } catch (JMSException e) {
-                e.printStackTrace();
-            }
-        }
-        super.tearDown();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setUseJmx(false);
-        answer.setPersistent(isPersistent());
-        answer.addConnector(bindAddress);
-        return answer;
-    }
-    
-    public static Test suite() {
-        return suite(TransportUriTest.class);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java
deleted file mode 100644
index 37ae138..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * 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.transport.tcp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.command.CommandTypes;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.TransportServer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class WireformatNegociationTest extends CombinationTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(WireformatNegociationTest.class);
-
-    private TransportServer server;
-    private Transport clientTransport;
-    private Transport serverTransport;
-
-    private final AtomicReference<WireFormatInfo> clientWF = new AtomicReference<WireFormatInfo>();
-    private final AtomicReference<WireFormatInfo> serverWF = new AtomicReference<WireFormatInfo>();
-    private final AtomicReference<Exception> asyncError = new AtomicReference<Exception>();
-    private final AtomicBoolean ignoreAsycError = new AtomicBoolean();
-
-    private final CountDownLatch negociationCounter = new CountDownLatch(2);
-
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /**
-     * @throws Exception
-     * @throws URISyntaxException
-     */
-    private void startClient(String uri) throws Exception, URISyntaxException {
-        clientTransport = TransportFactory.connect(new URI(uri));
-        clientTransport.setTransportListener(new TransportListener() {
-            public void onCommand(Object command) {
-                if (command instanceof WireFormatInfo) {
-                    clientWF.set((WireFormatInfo)command);
-                    negociationCounter.countDown();
-                }
-            }
-
-            public void onException(IOException error) {
-                if (!ignoreAsycError.get()) {
-                    LOG.info("Client transport error: ", error);
-                    asyncError.set(error);
-                    negociationCounter.countDown();
-                }
-            }
-
-            public void transportInterupted() {
-            }
-
-            public void transportResumed() {
-            }
-        });
-        clientTransport.start();
-    }
-
-    /**
-     * @throws IOException
-     * @throws URISyntaxException
-     * @throws Exception
-     */
-    private void startServer(String uri) throws IOException, URISyntaxException, Exception {
-        server = TransportFactory.bind(new URI(uri));
-        server.setAcceptListener(new TransportAcceptListener() {
-            public void onAccept(Transport transport) {
-                try {
-                    LOG.info("[" + getName() + "] Server Accepted a Connection");
-                    serverTransport = transport;
-                    serverTransport.setTransportListener(new TransportListener() {
-                        public void onCommand(Object command) {
-                            if (command instanceof WireFormatInfo) {
-                                serverWF.set((WireFormatInfo)command);
-                                negociationCounter.countDown();
-                            }
-                        }
-
-                        public void onException(IOException error) {
-                            if (!ignoreAsycError.get()) {
-                                LOG.info("Server transport error: ", error);
-                                asyncError.set(error);
-                                negociationCounter.countDown();
-                            }
-                        }
-
-                        public void transportInterupted() {
-                        }
-
-                        public void transportResumed() {
-                        }
-                    });
-                    serverTransport.start();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-            public void onAcceptError(Exception error) {
-                error.printStackTrace();
-            }
-        });
-        server.start();
-    }
-
-    protected void tearDown() throws Exception {
-        ignoreAsycError.set(true);
-        try {
-            if (clientTransport != null) {
-                clientTransport.stop();
-            }
-            if (serverTransport != null) {
-                serverTransport.stop();
-            }
-            if (server != null) {
-                server.stop();
-            }
-        } catch (Throwable e) {
-            e.printStackTrace();
-        }
-        super.tearDown();
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testWireFomatInfoSeverVersion1() throws Exception {
-
-        startServer("tcp://localhost:61616?wireFormat.version=1");
-        startClient("tcp://localhost:61616");
-
-        assertTrue("Connect timeout", negociationCounter.await(10, TimeUnit.SECONDS));
-        assertNull("Async error: " + asyncError, asyncError.get());
-
-        assertNotNull(clientWF.get());
-        assertEquals(1, clientWF.get().getVersion());
-
-        assertNotNull(serverWF.get());
-        assertEquals(1, serverWF.get().getVersion());
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testWireFomatInfoClientVersion1() throws Exception {
-
-        startServer("tcp://localhost:61616");
-        startClient("tcp://localhost:61616?wireFormat.version=1");
-
-        assertTrue("Connect timeout", negociationCounter.await(10, TimeUnit.SECONDS));
-        assertNull("Async error: " + asyncError, asyncError.get());
-
-        assertNotNull(clientWF.get());
-        assertEquals(1, clientWF.get().getVersion());
-
-        assertNotNull(serverWF.get());
-        assertEquals(1, serverWF.get().getVersion());
-    }
-
-    /**
-     * @throws Exception
-     */
-    public void testWireFomatInfoCurrentVersion() throws Exception {
-
-        startServer("tcp://localhost:61616");
-        startClient("tcp://localhost:61616");
-
-        assertTrue("Connect timeout", negociationCounter.await(10, TimeUnit.SECONDS));
-        assertNull("Async error: " + asyncError, asyncError.get());
-
-        assertNotNull(clientWF.get());
-        assertEquals(CommandTypes.PROTOCOL_VERSION, clientWF.get().getVersion());
-
-        assertNotNull(serverWF.get());
-        assertEquals(CommandTypes.PROTOCOL_VERSION, serverWF.get().getVersion());
-    }
-    
-    public void testWireFomatInactivityDurationInitalDelay() throws Exception {
-
-        startServer("tcp://localhost:61616");
-        startClient("tcp://localhost:61616?wireFormat.maxInactivityDurationInitalDelay=60000");
-
-        assertTrue("Connect timeout", negociationCounter.await(10, TimeUnit.SECONDS));
-        assertNull("Async error: " + asyncError, asyncError.get());
-
-        assertNotNull(clientWF.get());
-        assertEquals(CommandTypes.PROTOCOL_VERSION, clientWF.get().getVersion());
-
-        assertNotNull(serverWF.get());
-        assertEquals(CommandTypes.PROTOCOL_VERSION, serverWF.get().getVersion());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java
deleted file mode 100644
index 59ba9de..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.transport.udp;
-
-/**
- *
- * 
- */
-public class UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest extends UdpSendReceiveWithTwoConnectionsTest {
-
-    protected void setUp() throws Exception {
-        largeMessages = true;
-        //messageCount = 2;
-        super.setUp();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsTest.java
deleted file mode 100755
index 9ddd5ab..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.transport.udp;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-
-/**
- * @version
- */
-public class UdpSendReceiveWithTwoConnectionsTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-
-    protected String brokerURI = "udp://localhost:8891";
-    protected BrokerService broker;
-
-    protected void setUp() throws Exception {
-        broker = createBroker();
-        broker.start();
-
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.setUseJmx(false);
-        answer.addConnector(brokerURI);
-        return answer;
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(brokerURI);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java
deleted file mode 100644
index d947140..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.io.IOException;
-
-import javax.jms.MessageNotWriteableException;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.TransportServer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public abstract class UdpTestSupport extends TestCase implements TransportListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(UdpTestSupport.class);
-
-    protected Transport producer;
-    protected Transport consumer;
-
-    protected Object lock = new Object();
-    protected Command receivedCommand;
-    protected TransportServer server;
-    protected boolean large;
-
-    // You might want to set this to massive number if debugging
-    protected int waitForCommandTimeout = 40000;
-
-    public void testSendingSmallMessage() throws Exception {
-        ConsumerInfo expected = new ConsumerInfo();
-        expected.setSelector("Cheese");
-        expected.setExclusive(true);
-        expected.setExclusive(true);
-        expected.setPrefetchSize(3456);
-
-        try {
-            LOG.info("About to send: " + expected);
-            producer.oneway(expected);
-
-            Command received = assertCommandReceived();
-            assertTrue("Should have received a ConsumerInfo but was: " + received, received instanceof ConsumerInfo);
-            ConsumerInfo actual = (ConsumerInfo)received;
-            assertEquals("Selector", expected.getSelector(), actual.getSelector());
-            assertEquals("isExclusive", expected.isExclusive(), actual.isExclusive());
-            assertEquals("getPrefetchSize", expected.getPrefetchSize(), actual.getPrefetchSize());
-        } catch (Exception e) {
-            LOG.info("Caught: " + e);
-            e.printStackTrace();
-            fail("Failed to send to transport: " + e);
-        }
-    }
-
-    public void testSendingMediumMessage() throws Exception {
-        String text = createMessageBodyText(4 * 105);
-        ActiveMQDestination destination = new ActiveMQQueue("Foo.Bar.Medium");
-        assertSendTextMessage(destination, text);
-    }
-
-    public void testSendingLargeMessage() throws Exception {
-        String text = createMessageBodyText(4 * 1024);
-        ActiveMQDestination destination = new ActiveMQQueue("Foo.Bar.Large");
-        assertSendTextMessage(destination, text);
-    }
-
-    protected void assertSendTextMessage(ActiveMQDestination destination, String text) throws MessageNotWriteableException {
-        large = true;
-
-        ActiveMQTextMessage expected = new ActiveMQTextMessage();
-
-        expected.setText(text);
-        expected.setDestination(destination);
-
-        try {
-            LOG.info("About to send message of type: " + expected.getClass());
-            producer.oneway(expected);
-
-            // lets send a dummy command to ensure things don't block if we
-            // discard the last one
-            // keepalive does not have a commandId...
-            // producer.oneway(new KeepAliveInfo());
-            producer.oneway(new ProducerInfo());
-            producer.oneway(new ProducerInfo());
-
-            Command received = assertCommandReceived();
-            assertTrue("Should have received a ActiveMQTextMessage but was: " + received, received instanceof ActiveMQTextMessage);
-            ActiveMQTextMessage actual = (ActiveMQTextMessage)received;
-
-            assertEquals("getDestination", expected.getDestination(), actual.getDestination());
-            assertEquals("getText", expected.getText(), actual.getText());
-
-            LOG.info("Received text message with: " + actual.getText().length() + " character(s)");
-        } catch (Exception e) {
-            LOG.info("Caught: " + e);
-            e.printStackTrace();
-            fail("Failed to send to transport: " + e);
-        }
-    }
-
-    protected String createMessageBodyText(int loopSize) {
-        StringBuffer buffer = new StringBuffer();
-        for (int i = 0; i < loopSize; i++) {
-            buffer.append("0123456789");
-        }
-        return buffer.toString();
-    }
-
-    protected void setUp() throws Exception {
-        server = createServer();
-        if (server != null) {
-            server.setAcceptListener(new TransportAcceptListener() {
-
-                public void onAccept(Transport transport) {
-                    consumer = transport;
-                    consumer.setTransportListener(UdpTestSupport.this);
-                    try {
-                        consumer.start();
-                    } catch (Exception e) {
-                        throw new RuntimeException(e);
-                    }
-                }
-
-                public void onAcceptError(Exception error) {
-                }
-            });
-            server.start();
-        }
-
-        consumer = createConsumer();
-        if (consumer != null) {
-            consumer.setTransportListener(this);
-            consumer.start();
-        }
-
-        producer = createProducer();
-        producer.setTransportListener(new TransportListener() {
-            public void onCommand(Object command) {
-                LOG.info("Producer received: " + command);
-            }
-
-            public void onException(IOException error) {
-                LOG.info("Producer exception: " + error);
-                error.printStackTrace();
-            }
-
-            public void transportInterupted() {
-            }
-
-            public void transportResumed() {
-            }
-        });
-
-        producer.start();
-    }
-
-    protected void tearDown() throws Exception {
-        if (producer != null) {
-            producer.stop();
-        }
-        if (consumer != null) {
-            consumer.stop();
-        }
-        if (server != null) {
-            server.stop();
-        }
-    }
-
-    public void onCommand(Object o) {
-        final Command command = (Command)o;
-        if (command instanceof WireFormatInfo) {
-            LOG.info("Got WireFormatInfo: " + command);
-        } else {
-            if (command.isResponseRequired()) {
-                // lets send a response back...
-                sendResponse(command);
-
-            }
-            if (large) {
-                LOG.info("### Received command: " + command.getClass() + " with id: " + command.getCommandId());
-            } else {
-                LOG.info("### Received command: " + command);
-            }
-
-            synchronized (lock) {
-                if (receivedCommand == null) {
-                    receivedCommand = command;
-                } else {
-                    LOG.info("Ignoring superfluous command: " + command);
-                }
-                lock.notifyAll();
-            }
-        }
-    }
-
-    protected void sendResponse(Command command) {
-        Response response = new Response();
-        response.setCorrelationId(command.getCommandId());
-        try {
-            consumer.oneway(response);
-        } catch (IOException e) {
-            LOG.info("Caught: " + e);
-            e.printStackTrace();
-            throw new RuntimeException(e);
-        }
-    }
-
-    public void onException(IOException error) {
-        LOG.info("### Received error: " + error);
-        error.printStackTrace();
-    }
-
-    public void transportInterupted() {
-        LOG.info("### Transport interrupted");
-    }
-
-    public void transportResumed() {
-        LOG.info("### Transport resumed");
-    }
-
-    protected Command assertCommandReceived() throws InterruptedException {
-        Command answer = null;
-        synchronized (lock) {
-            answer = receivedCommand;
-            if (answer == null) {
-                lock.wait(waitForCommandTimeout);
-            }
-            answer = receivedCommand;
-        }
-
-        assertNotNull("Should have received a Command by now!", answer);
-        return answer;
-    }
-
-    protected abstract Transport createConsumer() throws Exception;
-
-    protected abstract Transport createProducer() throws Exception;
-
-    protected TransportServer createServer() throws Exception {
-        return null;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java
deleted file mode 100644
index 98ea8f1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.net.URI;
-
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.CommandJoiner;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.util.IntSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class UdpTransportTest extends UdpTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(UdpTransportTest.class);
-
-    protected int consumerPort = 9123;
-    protected String producerURI = "udp://localhost:" + consumerPort;
-
-    protected Transport createProducer() throws Exception {
-        LOG.info("Producer using URI: " + producerURI);
-        
-        // we are not using the TransportFactory as this assumes that
-        // UDP transports talk to a server using a WireFormat Negotiation step
-        // rather than talking directly to each other
-        
-        OpenWireFormat wireFormat = createWireFormat();
-        UdpTransport transport = new UdpTransport(wireFormat, new URI(producerURI));
-        transport.setSequenceGenerator(new IntSequenceGenerator());
-        return new CommandJoiner(transport, wireFormat);
-    }
-
-    protected Transport createConsumer() throws Exception {
-        LOG.info("Consumer on port: " + consumerPort);
-        OpenWireFormat wireFormat = createWireFormat();
-        UdpTransport transport = new UdpTransport(wireFormat, consumerPort);
-        transport.setSequenceGenerator(new IntSequenceGenerator());
-        return new CommandJoiner(transport, wireFormat);
-    }
-
-    protected OpenWireFormat createWireFormat() {
-        return new OpenWireFormat();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java
deleted file mode 100644
index bd9d963..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.transport.udp;
-
-import java.net.URI;
-
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.tcp.WireformatNegociationTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class UdpTransportUsingServerTest extends UdpTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(UdpTransportUsingServerTest.class);
-
-    protected int consumerPort = 9123;
-    protected String producerURI = "udp://localhost:" + consumerPort;
-    protected String serverURI = producerURI;
-
-    public void testRequestResponse() throws Exception {
-        ConsumerInfo expected = new ConsumerInfo();
-        expected.setSelector("Edam");
-        expected.setResponseRequired(true);
-        LOG.info("About to send: " + expected);
-        Response response = (Response) producer.request(expected, 2000);
-
-        LOG.info("Received: " + response);
-        assertNotNull("Received a response", response);
-        assertTrue("Should not be an exception", !response.isException());
-    }
-
-    protected Transport createProducer() throws Exception {
-        LOG.info("Producer using URI: " + producerURI);
-        URI uri = new URI(producerURI);
-        return TransportFactory.connect(uri);
-    }
-
-    protected TransportServer createServer() throws Exception {
-        return TransportFactory.bind(new URI(serverURI));
-    }
-
-    protected Transport createConsumer() throws Exception {
-        return null;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerNameTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerNameTest.java
deleted file mode 100644
index ac05393..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerNameTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.transport.vm;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerRegistry;
-
-public class VMTransportBrokerNameTest extends TestCase {
-
-    private static final String MY_BROKER = "myBroker";
-    final String vmUrl = "vm:(broker:(tcp://localhost:61616)/" + MY_BROKER + "?persistent=false)";
-
-    public void testBrokerName() throws Exception {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(new URI(vmUrl));
-        ActiveMQConnection c1 = (ActiveMQConnection) cf.createConnection();
-        assertTrue("Transport has name in it: " + c1.getTransport(), c1.getTransport().toString().contains(MY_BROKER));
-        
-        // verify Broker is there with name
-        ActiveMQConnectionFactory cfbyName = new ActiveMQConnectionFactory(new URI("vm://" + MY_BROKER + "?create=false"));
-        Connection c2 = cfbyName.createConnection();
-        
-        assertNotNull(BrokerRegistry.getInstance().lookup(MY_BROKER));
-        assertEquals(BrokerRegistry.getInstance().findFirst().getBrokerName(), MY_BROKER);
-        assertEquals(BrokerRegistry.getInstance().getBrokers().size(), 1);
-        
-        c1.close();
-        c2.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerTest.java
deleted file mode 100755
index c4f9ab2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.transport.vm;
-
-import junit.framework.Test;
-import org.apache.activemq.transport.TransportBrokerTestSupport;
-
-public class VMTransportBrokerTest extends TransportBrokerTestSupport {
-
-    protected String getBindLocation() {
-        return "vm://localhost";
-    }
-
-    public static Test suite() {
-        return suite(VMTransportBrokerTest.class);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportEmbeddedBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportEmbeddedBrokerTest.java
deleted file mode 100755
index 62e4f71..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportEmbeddedBrokerTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.transport.vm;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.jms.DeliveryMode;
-
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.util.IOExceptionSupport;
-
-/**
- * Used to see if the VM transport starts an embedded broker on demand.
- * 
- * 
- */
-public class VMTransportEmbeddedBrokerTest extends BrokerTestSupport {
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(VMTransportEmbeddedBrokerTest.class);
-    }
-
-    public void testConsumerPrefetchAtOne() throws Exception {
-        
-        // Make sure the broker is created due to the connection being started.
-        assertNull(BrokerRegistry.getInstance().lookup("localhost"));        
-        StubConnection connection = createConnection();
-        assertNotNull(BrokerRegistry.getInstance().lookup("localhost"));
-
-        // Start a producer and consumer
-        ConnectionInfo connectionInfo = createConnectionInfo();
-        SessionInfo sessionInfo = createSessionInfo(connectionInfo);
-        ProducerInfo producerInfo = createProducerInfo(sessionInfo);
-        connection.send(connectionInfo);
-        connection.send(sessionInfo);
-        connection.send(producerInfo);
-        
-        ActiveMQQueue destination = new ActiveMQQueue("TEST");
-
-        ConsumerInfo consumerInfo = createConsumerInfo(sessionInfo, destination);  
-        consumerInfo.setPrefetchSize(1);
-        connection.send(consumerInfo);
-        
-        // Send 2 messages to the broker.
-        connection.send(createMessage(producerInfo, destination, DeliveryMode.NON_PERSISTENT));
-        connection.send(createMessage(producerInfo, destination, DeliveryMode.NON_PERSISTENT));
-        
-        // Make sure only 1 message was delivered.
-        Message m = receiveMessage(connection);
-        assertNotNull(m);
-        assertNoMessagesLeft(connection);
-        
-        // Make sure the broker is shutdown when the connection is stopped.
-        assertNotNull(BrokerRegistry.getInstance().lookup("localhost"));        
-        connection.stop();
-        assertNull(BrokerRegistry.getInstance().lookup("localhost"));        
-    }
-
-    protected void setUp() throws Exception {
-        // Don't call super since it manually starts up a broker.
-    }
-    protected void tearDown() throws Exception {
-        // Don't call super since it manually tears down a broker.
-    }
-    protected StubConnection createConnection() throws Exception {
-        try {
-            Transport transport = TransportFactory.connect(new URI("vm://localhost?broker.persistent=false"));
-            StubConnection connection = new StubConnection(transport);
-            return connection;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java
deleted file mode 100644
index 505e65c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VMTransportWaitForTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.transport.vm;
-
-import java.net.URI;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.JMSException;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-public class VMTransportWaitForTest extends TestCase {
-
-    private static final String VM_BROKER_URI_NO_WAIT = 
-        "vm://localhost?broker.persistent=false&create=false";
-    
-    private static final String VM_BROKER_URI_WAIT_FOR_START = 
-        VM_BROKER_URI_NO_WAIT + "&waitForStart=20000";
-    
-    CountDownLatch started = new CountDownLatch(1);
-    CountDownLatch gotConnection = new CountDownLatch(1);
-
-    public void testWaitFor() throws Exception {
-        try {
-            ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(new URI(VM_BROKER_URI_NO_WAIT));
-            cf.createConnection();
-            fail("expect broker not exist exception");
-        } catch (JMSException expectedOnNoBrokerAndNoCreate) {
-        }
-        
-        // spawn a thread that will wait for an embedded broker to start via vm://..
-        Thread t = new Thread() {
-            public void run() {
-                    try {
-                        started.countDown();
-                        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(new URI(VM_BROKER_URI_WAIT_FOR_START));
-                        cf.createConnection();
-                        gotConnection.countDown();
-                   
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                        fail("unexpected exception: " + e);
-                    }
-            }
-        };
-        t.start();
-        started.await(20, TimeUnit.SECONDS);
-        Thread.yield();
-        assertFalse("has not got connection", gotConnection.await(2, TimeUnit.SECONDS));
-        
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.addConnector("tcp://localhost:61616");
-        broker.start();
-        assertTrue("has got connection", gotConnection.await(400, TimeUnit.MILLISECONDS));
-        broker.stop(); 
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java
deleted file mode 100644
index 48beedd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.transport.vm;
-
-import java.net.URI;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.bugs.embedded.ThreadExplorer;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.thread.DefaultThreadPools;
-
-
-public class VmTransportNetworkBrokerTest extends TestCase {
-
-    private static final String VM_BROKER_URI = 
-        "vm://localhost?create=false";
-    
-    CountDownLatch started = new CountDownLatch(1);
-    CountDownLatch gotConnection = new CountDownLatch(1);
-
-    public void testNoThreadLeak() throws Exception {
-
-        // with VMConnection and simple discovery network connector
-        int originalThreadCount = Thread.activeCount();
-        BrokerService broker = new BrokerService();
-        broker.setDedicatedTaskRunner(true);
-        broker.setPersistent(false);
-        broker.addConnector("tcp://localhost:61616");
-        NetworkConnector networkConnector = broker.addNetworkConnector("static:(tcp://wrongHostname1:61617,tcp://wrongHostname2:61618)?useExponentialBackOff=false");
-        networkConnector.setDuplex(true);
-        broker.start();
-        
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(new URI(VM_BROKER_URI));
-        Connection connection = cf.createConnection("system", "manager");
-        connection.start();
-        
-        // let it settle
-        TimeUnit.SECONDS.sleep(5);
-        
-        int threadCountAfterStart = Thread.activeCount();
-        TimeUnit.SECONDS.sleep(30);
-        int threadCountAfterSleep = Thread.activeCount();
-        
-        assertTrue("Threads are leaking: " + ThreadExplorer.show("active sleep") + ", threadCount=" +threadCountAfterStart + " threadCountAfterSleep=" + threadCountAfterSleep,
-                threadCountAfterSleep < threadCountAfterStart + 8);
-
-        connection.close();
-        broker.stop();
-        broker.waitUntilStopped();
-
-        // testNoDanglingThreadsAfterStop with tcp transport
-
-        broker = new BrokerService();
-        broker.setSchedulerSupport(true);
-        broker.setDedicatedTaskRunner(true);
-        broker.setPersistent(false);
-        broker.addConnector("tcp://localhost:61616?wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
-        broker.start();
-
-        cf = new ActiveMQConnectionFactory("tcp://localhost:61616?wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
-        connection = cf.createConnection("system", "manager");
-        connection.start();
-        connection.close();
-        broker.stop();
-        broker.waitUntilStopped();
-
-        // must only be called when all brokers and connections are done!
-        DefaultThreadPools.shutdown();
-
-        // let it settle
-        TimeUnit.SECONDS.sleep(5);        
-        
-        int threadCountAfterStop = Thread.activeCount();
-        assertTrue("Threads are leaking: " + ThreadExplorer.show("active after stop") + ". originalThreadCount=" + originalThreadCount + " threadCountAfterStop=" + threadCountAfterStop,
-                threadCountAfterStop == originalThreadCount);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usage/CompositeMessageCursorUsageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usage/CompositeMessageCursorUsageTest.java
deleted file mode 100644
index 9cb1245..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usage/CompositeMessageCursorUsageTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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.usage;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.ObjectName;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-
-public class CompositeMessageCursorUsageTest extends TestCase {
-    
-    BrokerService broker;
-    
-    public void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.start();
-    }
-    
-    protected void tearDown() throws Exception {
-        broker.stop();
-    }
-
-    public void testCompositeMessageUsage() throws Exception {
-
-        String compositeQueue = "compositeA,compositeB";
-
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");
-        JmsTemplate jt = new JmsTemplate(cf);
-
-        jt.send(compositeQueue, new MessageCreator() {
-            public Message createMessage(Session session) throws JMSException {
-                TextMessage tm = session.createTextMessage();
-                tm.setText("test");
-                return tm;
-            }
-        });
-
-        jt.send("noCompositeA", new MessageCreator() {
-            public Message createMessage(Session session) throws JMSException {
-                TextMessage tm = session.createTextMessage();
-                tm.setText("test");
-                return tm;
-            }
-        });
-
-        jt.send("noCompositeB", new MessageCreator() {
-            public Message createMessage(Session session) throws JMSException {
-                TextMessage tm = session.createTextMessage();
-                tm.setText("test");
-                return tm;
-            }
-        });
-        
-        assertEquals("Cursor memory usage wrong for 'noCompositeA' queue", 1032, getQueueView("noCompositeA").getCursorMemoryUsage());
-        assertEquals("Cursor memory usage wrong for 'noCompositeB' queue", 1032, getQueueView("noCompositeB").getCursorMemoryUsage());
-        assertEquals("Cursor memory usage wrong for 'CompositeA' queue", 1032, getQueueView("compositeA").getCursorMemoryUsage());
-        assertEquals("Cursor memory usage wrong for 'CompositeB' queue", 1032, getQueueView("compositeB").getCursorMemoryUsage());
-        
-    }
-    
-    public QueueViewMBean getQueueView(String queueName) throws Exception {
-        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq" + ":Type=Queue,Destination=" + queueName + ",BrokerName=localhost");
-        return (QueueViewMBean) broker.getManagementContext().newProxyInstance(queueViewMBeanName, QueueViewMBean.class, true);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usage/MemoryUsageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usage/MemoryUsageTest.java
deleted file mode 100644
index 03f78f7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usage/MemoryUsageTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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.usage;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class MemoryUsageTest {
-
-    MemoryUsage underTest;
-    ThreadPoolExecutor executor;
-      
-    @Test
-    public final void testPercentUsageNeedsNoThread() {    
-        int activeThreadCount = Thread.activeCount();
-        underTest.setLimit(10);
-        underTest.start();
-        underTest.increaseUsage(1);
-        assertEquals("usage is correct", 10, underTest.getPercentUsage());
-        assertEquals("no new thread created withough listener or callback",activeThreadCount, Thread.activeCount()); 
-    }
-    
-    @Test
-    public final void testAddUsageListenerStartsThread() throws Exception {       
-        int activeThreadCount = Thread.activeCount();
-        underTest = new MemoryUsage();
-        underTest.setExecutor(executor);
-        underTest.setLimit(10);
-        underTest.start();
-        final CountDownLatch called = new CountDownLatch(1);
-        final String[] listnerThreadNameHolder = new String[1];
-        underTest.addUsageListener(new UsageListener() {
-            public void onUsageChanged(Usage usage, int oldPercentUsage,
-                    int newPercentUsage) {
-                called.countDown();
-                listnerThreadNameHolder[0] = Thread.currentThread().toString();
-            }
-        });
-        underTest.increaseUsage(1);
-        assertTrue("listner was called", called.await(30, TimeUnit.SECONDS));
-        assertTrue("listner called from another thread", !Thread.currentThread().toString().equals(listnerThreadNameHolder[0]));
-        assertEquals("usage is correct", 10, underTest.getPercentUsage());
-        assertEquals("new thread created with listener", activeThreadCount + 1, Thread.activeCount());        
-    }
-    
-    @Before
-    public void setUp() throws Exception {
-        underTest = new MemoryUsage();
-        this.executor = new ThreadPoolExecutor(1, 10, 30, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
-            public Thread newThread(Runnable runnable) {
-                Thread thread = new Thread(runnable, "Usage Async Task");
-                thread.setDaemon(true);
-                return thread;
-            }
-        });
-        underTest.setExecutor(this.executor);
-        
-    }
-    
-    @After
-    public void tearDown() {
-        assertNotNull(underTest);
-        underTest.stop();
-        if (this.executor != null) {
-            this.executor.shutdownNow();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java
deleted file mode 100644
index 901a325..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usage/StoreUsageTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.usage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.ProducerThread;
-import org.apache.activemq.util.Wait;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Session;
-
-public class StoreUsageTest extends EmbeddedBrokerTestSupport {
-
-    final int WAIT_TIME_MILLS = 20*1000;
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = super.createBroker();
-        broker.getSystemUsage().getStoreUsage().setLimit(10 * 1024);
-        broker.deleteAllMessages();
-        return broker;
-    }
-
-    protected boolean isPersistent() {
-        return true;
-    }
-
-    public void testJmx() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-        Connection conn = factory.createConnection();
-        conn.start();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination dest = sess.createQueue(this.getClass().getName());
-        final ProducerThread producer = new ProducerThread(sess, dest);
-        producer.start();
-
-        // wait for the producer to block
-        Thread.sleep(WAIT_TIME_MILLS / 2);
-
-        broker.getAdminView().setStoreLimit(1024 * 1024);
-
-        Thread.sleep(WAIT_TIME_MILLS);
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return producer.getSentCount() == producer.getMessageCount();
-            }
-        }, WAIT_TIME_MILLS * 2);
-
-        assertEquals("Producer didn't send all messages", producer.getMessageCount(), producer.getSentCount());
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQ2927Test.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQ2927Test.java
deleted file mode 100644
index e2df753..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQ2927Test.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-import javax.jms.MessageConsumer;
-import java.net.URI;
-
-
-public class AMQ2927Test extends JmsMultipleBrokersTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2927Test.class);
-
-    ActiveMQQueue queue = new ActiveMQQueue("TEST");
-
-    @Override
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        BrokerService brokerA = createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&useJmx=false&deleteAllMessagesOnStartup=true"));
-        brokerA.setBrokerId("BrokerA");
-        BrokerService brokerB = createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=true&useJmx=false&deleteAllMessagesOnStartup=true"));
-        brokerB.setBrokerId("BrokerB");
-        NetworkConnector aTOb = bridgeBrokers(brokers.get("BrokerA").broker, brokers.get("BrokerB").broker, false, 2, true, true);
-        aTOb.addStaticallyIncludedDestination(queue);
-        NetworkConnector bTOa = bridgeBrokers(brokers.get("BrokerB").broker, brokers.get("BrokerA").broker, false, 2, true, true);
-        bTOa.addStaticallyIncludedDestination(queue);
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-    }
-
-    public void testRestartSend() throws Exception {
-
-        Thread.sleep(1000);
-
-        LOG.info("restarting broker");
-
-        restartBroker("BrokerA");
-
-        Thread.sleep(5000);
-
-        LOG.info("sending message");
-
-        sendMessages("BrokerA", queue, 1);
-
-        Thread.sleep(3000);
-
-        LOG.info("consuming message");
-
-        MessageConsumer consumerA = createConsumer("BrokerA", queue);
-        MessageConsumer consumerB = createConsumer("BrokerB", queue);
-
-        Thread.sleep(1000);
-
-        MessageIdList messagesA = getConsumerMessages("BrokerA", consumerA);
-        MessageIdList messagesB = getConsumerMessages("BrokerB", consumerB);
-
-        LOG.info("consumerA = " + messagesA);
-        LOG.info("consumerB = " + messagesB);
-
-        messagesA.assertMessagesReceived(0);
-        messagesB.assertMessagesReceived(1);
-
-    }
-
-
-    public void testSendRestart() throws Exception {
-
-        Thread.sleep(1000);
-
-        LOG.info("sending message");
-
-        sendMessages("BrokerA", queue, 1);
-
-        Thread.sleep(3000);
-
-        LOG.info("restarting broker");
-
-        restartBroker("BrokerA");
-
-        Thread.sleep(5000);
-
-        LOG.info("consuming message");
-
-        MessageConsumer consumerA = createConsumer("BrokerA", queue);
-        MessageConsumer consumerB = createConsumer("BrokerB", queue);
-
-        Thread.sleep(1000);
-
-        MessageIdList messagesA = getConsumerMessages("BrokerA", consumerA);
-        MessageIdList messagesB = getConsumerMessages("BrokerB", consumerB);
-
-        LOG.info("consumerA = " + messagesA);
-        LOG.info("consumerB = " + messagesB);
-
-        messagesA.assertMessagesReceived(0);
-        messagesB.assertMessagesReceived(1);
-    }
-
-    protected void restartBroker(String brokerName) throws Exception {
-        destroyBroker("BrokerA");
-        BrokerService broker = createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&useJmx=false"));
-        broker.setBrokerId("BrokerA");
-        NetworkConnector aTOb = bridgeBrokers(brokers.get("BrokerA").broker, brokers.get("BrokerB").broker, false, 2, true, true);
-        aTOb.addStaticallyIncludedDestination(queue);
-        broker.start();
-        broker.waitUntilStarted();
-        waitForBridgeFormation();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQStackOverFlowTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQStackOverFlowTest.java
deleted file mode 100644
index c9cdd30..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQStackOverFlowTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.Assert;
-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.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.usage.SystemUsage;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-
-public class AMQStackOverFlowTest extends TestCase {
-
-    private static final String URL1 = "tcp://localhost:61616";
-
-    private static final String URL2 = "tcp://localhost:61617";
-
-    public void testStackOverflow() throws Exception {
-        BrokerService brokerService1 = null;
-        BrokerService brokerService2 = null;
-
-        try {
-            brokerService1 = createBrokerService("broker1", URL1, URL2);
-            brokerService1.start();
-            brokerService2 = createBrokerService("broker2", URL2, URL1);
-            brokerService2.start();
-
-            final ActiveMQConnectionFactory cf1 = new ActiveMQConnectionFactory(URL1);
-            cf1.setUseAsyncSend(false);
-
-            final ActiveMQConnectionFactory cf2 = new ActiveMQConnectionFactory(URL2);
-            cf2.setUseAsyncSend(false);
-
-            final JmsTemplate template1 = new JmsTemplate(cf1);
-            template1.setReceiveTimeout(10000);
-
-            template1.send("test.q", new MessageCreator() {
-
-                public Message createMessage(Session session) throws JMSException {
-                    return session.createTextMessage("test");
-                }
-
-            });
-
-            final JmsTemplate template2 = new JmsTemplate(cf2);
-            template2.setReceiveTimeout(10000);
-
-            final Message m = template2.receive("test.q");
-            assertTrue(m instanceof TextMessage);
-
-            final TextMessage tm = (TextMessage)m;
-
-            Assert.assertEquals("test", tm.getText());
-
-            template2.send("test2.q", new MessageCreator() {
-
-                public Message createMessage(Session session) throws JMSException {
-                    return session.createTextMessage("test2");
-                }
-
-            });
-
-            final Message m2 = template1.receive("test2.q");
-            assertNotNull(m2);
-            assertTrue(m2 instanceof TextMessage);
-
-            final TextMessage tm2 = (TextMessage)m2;
-
-            Assert.assertEquals("test2", tm2.getText());
-
-        } finally {
-
-            brokerService1.stop();
-            brokerService1 = null;
-            brokerService2.stop();
-            brokerService2 = null;
-
-        }
-
-    }
-
-    private BrokerService createBrokerService(final String brokerName, final String uri1, final String uri2)
-        throws Exception {
-        final BrokerService brokerService = new BrokerService();
-
-        brokerService.setBrokerName(brokerName);
-        brokerService.setPersistent(false);
-        brokerService.setUseJmx(true);
-
-        final SystemUsage memoryManager = new SystemUsage();
-        //memoryManager.getMemoryUsage().setLimit(10);
-        brokerService.setSystemUsage(memoryManager);
-
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setQueue(">");
-        //entry.setMemoryLimit(1);
-        policyEntries.add(entry);
-
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        brokerService.setDestinationPolicy(policyMap);
-
-        final TransportConnector tConnector = new TransportConnector();
-        tConnector.setUri(new URI(uri1));
-        tConnector.setName(brokerName + ".transportConnector");
-        brokerService.addConnector(tConnector);
-
-        if (uri2 != null) {
-            final NetworkConnector nc = new DiscoveryNetworkConnector(new URI("static:" + uri2));
-            nc.setBridgeTempDestinations(true);
-            nc.setBrokerName(brokerName);
-            //nc.setPrefetchSize(1);
-            brokerService.addNetworkConnector(nc);
-        }
-
-        return brokerService;
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQStoreDurableSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQStoreDurableSubscriptionTest.java
deleted file mode 100644
index f854701..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQStoreDurableSubscriptionTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-
-public class AMQStoreDurableSubscriptionTest extends DurableSubscriptionTestSupport {
-
-    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
-        File dataDir = new File("target/test-data/durableAmq");
-        AMQPersistenceAdapter adapter = new AMQPersistenceAdapter();
-        adapter.setDirectory(dataDir);
-        return adapter;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport.java
deleted file mode 100644
index b84acd7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-
-import javax.jms.MessageConsumer;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualDestination;
-import org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualTopic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.util.MessageIdList;
-
-public abstract class AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport extends JmsMultipleBrokersTestSupport {
-	
-    protected static final int MESSAGE_COUNT = 1;
-    boolean dynamicOnly = true;
-    int networkTTL = 1;
-    boolean conduit = true;
-    boolean suppressDuplicateQueueSubscriptions = true;
-    boolean decreaseNetworkConsumerPriority = true;
-    
-    /**
-     * simple nwob
-     */
-    public void testSimpleNWOB() throws Exception {
-       
-        sendReceive("BrokerA", "local.test",  false, "BrokerB", "local.test",  false, 1, 0);
-        sendReceive("BrokerA", "local.test",  true,  "BrokerB", "local.test",  true,  1, 0);
-        sendReceive("BrokerA", "global.test", false, "BrokerB", "global.test", false, 1, 1);
-        sendReceive("BrokerA", "global.test", true,  "BrokerB", "global.test", true,  1, 1);
-        
-    }
-    
-    /**
-     * nwob with wild-card subscriptions
-     */
-    public void testSimpleNWOBWithWildcardSubscriptions() throws Exception {
-
-        sendReceive("BrokerA", "local.test.1", false, "BrokerB", "local.test.>", false, 1, 0);
-        sendReceive("BrokerA", "local.test.2", true, "BrokerB", "local.test.>", true, 1, 0);
-        sendReceive("BrokerA", "global.test.1", false, "BrokerB", "global.test.>", false, 1, 1);
-        sendReceive("BrokerA", "global.test.2", true, "BrokerB", "global.test.>", true, 1, 1);
-
-    }
-    
-    /**
-     * nwob with virtual destinations
-     */
-    public void testSimpleNWOBWithVirtualDestinations() throws Exception {
-        
-        sendReceive("BrokerA", "local.test",  true, "BrokerB", "Consumer.a.local.test",  false, 1, 0);
-        sendReceive("BrokerA", "global.test", true, "BrokerB", "Consumer.a.global.test", false, 1, 1);
-        
-    }
-    
-    /**
-     * nwob with virtual destinations and wild-card subscriptions
-     */
-    public void testSimpleNWOBWithVirtualDestinationsAndWildcardSubscriptions() throws Exception {
-        
-        sendReceive("BrokerA", "local.test.1",  true, "BrokerB", "Consumer.a.local.test.>",  false, 1, 0);
-        sendReceive("BrokerA", "global.test.1", true, "BrokerB", "Consumer.a.global.test.>", false, 1, 1);
-        
-    }
-    
-    public void sendReceive(String broker1, String dest1, boolean topic1, String broker2, String dest2, boolean topic2, int send, int expected) throws Exception{
-        MessageConsumer client = createConsumer(broker2, createDestination(dest2, topic2));
-        Thread.sleep(1000);
-        sendMessages(broker1, createDestination(dest1, topic1), send);
-        MessageIdList msgs = getConsumerMessages(broker2, client);
-        msgs.setMaximumDuration(1000);
-        msgs.waitForMessagesToArrive(send);
-        assertEquals(expected, msgs.getMessageCount());
-        client.close();
-        Thread.sleep(500);
-    }
-
-    protected abstract void addIncludedDestination(NetworkConnector networkConnector);
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        String options = new String("?useJmx=false&deleteAllMessagesOnStartup=true"); 
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA" + options));
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61617)/BrokerB" + options));
-        
-        // Setup broker networks
-        NetworkConnector nc = bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduit);
-        nc.setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
-        nc.setSuppressDuplicateQueueSubscriptions(suppressDuplicateQueueSubscriptions);
-        
-        addIncludedDestination(nc);
-        
-        nc = bridgeBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduit);
-        nc.setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
-        nc.setSuppressDuplicateQueueSubscriptions(suppressDuplicateQueueSubscriptions);
-        
-        addIncludedDestination(nc);
-        
-        startAllBrokers();
-        
-    }
-    
-    private BrokerService createAndConfigureBroker(URI uri) throws Exception {
-        BrokerService broker = createBroker(uri);
-        
-        configurePersistenceAdapter(broker);
-        
-        // make all topics virtual and consumers use the default prefix
-        VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
-        virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[]{new VirtualTopic()});
-        DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[]{virtualDestinationInterceptor};
-        broker.setDestinationInterceptors(destinationInterceptors);
-        return broker;
-    }
-    
-    protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
-        File dataFileDir = new File("target/test-amq-data/kahadb/" + broker.getBrokerName());
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(dataFileDir);
-        broker.setPersistenceAdapter(kaha);
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AdvisoryTopicDeletionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AdvisoryTopicDeletionTest.java
deleted file mode 100644
index 1c00e69..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AdvisoryTopicDeletionTest.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AdvisoryTopicDeletionTest extends TestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(AdvisoryTopicDeletionTest.class);
-
-    private BrokerService broker;
-    private Connection connection;
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://" + getName());
-    }
-
-    protected void setUp() throws Exception {
-        createBroker();
-        topic = false;
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        destroyBroker();
-    }
-
-    private void createBroker() throws Exception {
-        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
-        broker.setPersistent(false);
-        broker.setBrokerName(getName());
-        broker.start();
-
-        connection = createConnection();
-    }
-
-    @Override
-    protected Connection createConnection() throws Exception {
-        Connection con = super.createConnection();
-        con.start();
-        return con;
-    }
-
-    private void destroyBroker() throws Exception {
-        if (connection != null)
-            connection.close();
-        if (broker != null)
-            broker.stop();
-    }
-
-    public void doTest() throws Exception {
-        Destination dest = createDestination();
-
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        MessageConsumer consumer = consumerSession.createConsumer(dest);
-
-        MessageProducer prod = producerSession.createProducer(dest);
-        Message message = producerSession.createMessage();
-        prod.send(message);
-
-        consumer.receive(60 * 1000);
-        connection.close();
-        connection = null;
-
-        if ( topic ) {
-            broker.getAdminView().removeTopic(((ActiveMQDestination)dest).getPhysicalName());
-        } else {
-            broker.getAdminView().removeQueue(((ActiveMQDestination)dest).getPhysicalName());
-        }
-
-        ActiveMQDestination dests[] = broker.getRegionBroker().getDestinations();
-        int matchingDestinations = 0;
-        for (ActiveMQDestination destination: dests) {
-            String name = destination.getPhysicalName();
-            LOG.debug("Found destination " + name);
-            if (name.startsWith("ActiveMQ.Advisory") && name.contains(getDestinationString())) {
-                matchingDestinations++;
-            }
-        }
-
-        assertEquals("No matching destinations should be found", 0, matchingDestinations);
-    }
-
-    public void testTopic() throws Exception {
-        topic=true;
-        doTest();
-    }
-
-    public void testQueue() throws Exception {
-        topic=false;
-        doTest();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AuthorizationFromAdminViewTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AuthorizationFromAdminViewTest.java
deleted file mode 100644
index 33651cb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AuthorizationFromAdminViewTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.security.AuthorizationPlugin;
-import org.apache.activemq.security.SimpleAuthorizationMap;
-
-public class AuthorizationFromAdminViewTest extends org.apache.activemq.TestSupport {
-
-    private BrokerService broker;
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://" + getName());
-    }
-
-    protected void setUp() throws Exception {
-        createBroker();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        destroyBroker();
-    }
-
-    private void createBroker() throws Exception {
-        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
-        broker.setPersistent(false);
-        broker.setBrokerName(getName());
-
-        AuthorizationPlugin plugin = new AuthorizationPlugin();
-        plugin.setMap(new SimpleAuthorizationMap());
-        BrokerPlugin[] plugins = new BrokerPlugin[] {plugin};
-        broker.setPlugins(plugins);
-
-        broker.start();
-    }
-
-    private void destroyBroker() throws Exception {
-        if (broker != null)
-            broker.stop();
-    }
-
-    public void testAuthorizationFromAdminView() throws Exception {
-        broker.getAdminView().addQueue(getDestinationString());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/BrokerQueueNetworkWithDisconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/BrokerQueueNetworkWithDisconnectTest.java
deleted file mode 100644
index 5b4980b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/BrokerQueueNetworkWithDisconnectTest.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.TextMessage;
-
-import junit.framework.Test;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-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.broker.TransportConnector;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.transport.vm.VMTransportFactory;
-import org.apache.activemq.util.MessageIdList;
-import org.apache.activemq.util.SocketProxy;
-import org.apache.activemq.util.Wait;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-
-public class BrokerQueueNetworkWithDisconnectTest extends JmsMultipleBrokersTestSupport {
-    private static final Log LOG = LogFactory.getLog(BrokerQueueNetworkWithDisconnectTest.class);
-    private static final int NETWORK_DOWN_TIME = 5000;
-    protected static final int MESSAGE_COUNT = 200;
-    private static final String HUB = "HubBroker";
-    private static final String SPOKE = "SpokeBroker";
-    private SocketProxy socketProxy;
-    private long networkDownTimeStart;
-    public boolean useDuplexNetworkBridge = true;
-    public boolean sumulateStalledNetwork;
-    private long inactiveDuration = 1000;
-    private boolean useSocketProxy = true;
-
-   
-    public void initCombosForTestSendOnAReceiveOnBWithTransportDisconnect() {
-        addCombinationValues( "useDuplexNetworkBridge", new Object[]{ Boolean.TRUE, Boolean.FALSE} );
-        addCombinationValues( "sumulateStalledNetwork", new Object[]{ Boolean.TRUE } );
-    }
-    
-    public void testSendOnAReceiveOnBWithTransportDisconnect() throws Exception {
-        bridgeBrokers(SPOKE, HUB);
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-        
-        // Setup consumers
-        MessageConsumer client = createConsumer(HUB, dest);
-        
-        // allow subscription information to flow back to Spoke
-        sleep(600);
-        
-        // Send messages
-        sendMessages(SPOKE, dest, MESSAGE_COUNT);
-
-        MessageIdList msgs = getConsumerMessages(HUB, client);
-        msgs.waitForMessagesToArrive(MESSAGE_COUNT);
-
-        assertTrue("At least message " + MESSAGE_COUNT + 
-                " must be recieved, duplicates are expected, count=" + msgs.getMessageCount(),
-                MESSAGE_COUNT <= msgs.getMessageCount());
-    }
-
-    public void testNoStuckConnectionsWithTransportDisconnect() throws Exception {
-        inactiveDuration=60000l;
-        useDuplexNetworkBridge = true;
-
-        bridgeBrokers(SPOKE, HUB);
-
-        final BrokerItem hub = brokers.get(HUB);
-        hub.broker.setPlugins(new BrokerPlugin[]{
-                new BrokerPluginSupport() {
-                    int sleepCount = 2;
-                    @Override
-                    public void removeConnection(ConnectionContext context,
-                            ConnectionInfo info, Throwable error)
-                            throws Exception {
-                        try {
-                            while(--sleepCount >= 0) {
-                                LOG.info("sleeping for a bit in close impl to simulate load where reconnect fails due to a pending close");
-                                TimeUnit.SECONDS.sleep(2);
-                            }
-                        } catch (Exception ignored) {}
-                        super.removeConnection(context, info, error);
-                    }
-                }
-        });
-        startAllBrokers();
-        waitForBridgeFormation();
-
-        // kill the initiator side, leaving remote end intact
-        // simulate async network breakage
-        // remote side will need to spot duplicate network and stop/kill the original
-        for (int i=0; i< 3;  i++) {
-            socketProxy.halfClose();
-            sleep(10000);
-        }
-        // wait for full reformation of bridge       
-        // verify no extra connections
-        boolean allGood = Wait.waitFor(new Wait.Condition(){ 
-                    public boolean isSatisified() throws Exception {
-                        long numConnections = hub.broker.getTransportConnectors().get(0).getConnections().size();
-                        LOG.info("Num connetions:" + numConnections);
-                        return numConnections == 1;
-                    }});
-        if (!allGood) {
-            dumpAllThreads("ExtraHubConnection");
-        }
-        assertTrue("should be only one transport connection for the single duplex network connector", allGood);
-
-        allGood = Wait.waitFor(new Wait.Condition(){
-                    public boolean isSatisified() throws Exception {
-                        long numVmConnections = VMTransportFactory.SERVERS.get(HUB).getConnectionCount();
-                        LOG.info("Num VM connetions:" + numVmConnections);
-                        return numVmConnections == 1;
-                    }});
-        if (!allGood) {
-            dumpAllThreads("ExtraHubVMConnection");
-        }
-        assertTrue("should be only one vm connection for the single network duplex network connector", allGood);
-    }
-    
-    public void testTwoDuplexNCsAreAllowed() throws Exception {
-        useDuplexNetworkBridge = true;
-        useSocketProxy = false;
-
-        NetworkConnector connector = bridgeBrokers(SPOKE, HUB);
-        connector.setName("FirstDuplex");
-        connector = bridgeBrokers(SPOKE, HUB);
-        connector.setName("SecondDuplex");
-
-        startAllBrokers(); 
-        waitForBridgeFormation();
-
-        BrokerItem hub = brokers.get(HUB);
-        assertEquals("Has two transport Connectors", 2, hub.broker.getTransportConnectors().get(0).getConnections().size());
-    }
-    
-    @Override
-    protected void startAllBrokers() throws Exception {
-        // Ensure HUB is started first so bridge will be active from the get go
-        BrokerItem brokerItem = brokers.get(HUB);
-        brokerItem.broker.start();
-        brokerItem = brokers.get(SPOKE);
-        brokerItem.broker.start();
-        sleep(600);
-    }
-
-    public void setUp() throws Exception {
-        networkDownTimeStart = 0;
-        inactiveDuration = 1000;
-        useSocketProxy = true;
-        super.setAutoFail(true);
-        super.setUp();
-        final String options = "?persistent=true&useJmx=false&deleteAllMessagesOnStartup=true";
-        createBroker(new URI("broker:(tcp://localhost:61617)/" + HUB + options));
-        createBroker(new URI("broker:(tcp://localhost:61616)/" + SPOKE + options));
-    }
-    
-    public void tearDown() throws Exception {
-        super.tearDown();
-        if (socketProxy != null) {
-            socketProxy.close();
-        }
-    }
-    
-    public static Test suite() {
-        return suite(BrokerQueueNetworkWithDisconnectTest.class);
-    }
-       
-    @Override
-    protected void onSend(int i, TextMessage msg) {
-        sleep(50);
-        if (i == 50 || i == 150) {
-            if (sumulateStalledNetwork) {
-                socketProxy.pause();
-            } else {
-                socketProxy.close();
-            }
-            networkDownTimeStart = System.currentTimeMillis();
-        } else if (networkDownTimeStart > 0) {
-             // restart after NETWORK_DOWN_TIME seconds
-             if (networkDownTimeStart + NETWORK_DOWN_TIME < System.currentTimeMillis()) {
-                 if (sumulateStalledNetwork) {
-                     socketProxy.goOn();
-                 } else {
-                     socketProxy.reopen();
-                 }
-                 networkDownTimeStart = 0;
-             } else {
-                 // slow message production to allow bridge to recover and limit message duplication
-                 sleep(500);
-            }
-        }
-        super.onSend(i, msg);
-    }
-
-    private void sleep(int milliSecondTime) {
-        try {
-            Thread.sleep(milliSecondTime);
-        } catch (InterruptedException igonred) {
-        }    
-    }
-
-    @Override
-    protected NetworkConnector bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker, boolean dynamicOnly, int networkTTL, boolean conduit, boolean failover) throws Exception {
-        List<TransportConnector> transportConnectors = remoteBroker.getTransportConnectors();
-        URI remoteURI;
-        if (!transportConnectors.isEmpty()) {
-            remoteURI = ((TransportConnector)transportConnectors.get(0)).getConnectUri();
-            if (useSocketProxy) {
-                socketProxy = new SocketProxy(remoteURI);
-                remoteURI = socketProxy.getUrl();
-            }
-            DiscoveryNetworkConnector connector = new DiscoveryNetworkConnector(new URI("static:(" + remoteURI 
-                    + "?wireFormat.maxInactivityDuration=" + inactiveDuration + "&wireFormat.maxInactivityDurationInitalDelay=" + inactiveDuration + ")?useExponentialBackOff=false"));
-            connector.setDynamicOnly(dynamicOnly);
-            connector.setNetworkTTL(networkTTL);
-            localBroker.addNetworkConnector(connector);
-            maxSetupTime = 2000;
-            if (useDuplexNetworkBridge) {
-                connector.setDuplex(true);
-            }
-            return connector;
-        } else {
-            throw new Exception("Remote broker has no registered connectors.");
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java
deleted file mode 100644
index 5285683..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Enumeration;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.QueueBrowser;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.region.QueueSubscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-
-public class BrowseOverNetworkTest extends JmsMultipleBrokersTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(QueueSubscription.class);
-    protected static final int MESSAGE_COUNT = 10;
-
-    public void testBrowse() throws Exception {
-        createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=false&useJmx=false"));
-        createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=false&useJmx=false"));
-
-        bridgeBrokers("BrokerA", "BrokerB");
-
-
-        startAllBrokers();
-
-        Destination dest = createDestination("TEST.FOO", false);
-
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        Thread.sleep(1000);
-
-        int browsed = browseMessages("BrokerB", dest);
-
-        Thread.sleep(1000);
-
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
-
-        Thread.sleep(1000);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT);
-
-        LOG.info("A+B: " + msgsA.getMessageCount() + "+"
-                + msgsB.getMessageCount());
-        assertEquals("Consumer on Broker A, should've consumed all messages", MESSAGE_COUNT, msgsA.getMessageCount());
-        assertEquals("Broker B shouldn't get any messages", 0, browsed);
-    }
-
-    public void testConsumerInfo() throws Exception {
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker1.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker2.xml"));
-
-        startAllBrokers();
-
-        brokers.get("broker1").broker.waitUntilStarted();
-
-
-        Destination dest = createDestination("QUEUE.A,QUEUE.B", false);
-
-
-        int broker1 = browseMessages("broker1", dest);
-        assertEquals("Browsed a message on an empty queue", 0, broker1);
-        Thread.sleep(1000);
-        int broker2 = browseMessages("broker2", dest);
-        assertEquals("Browsed a message on an empty queue", 0, broker2);
-
-    }
-
-    public class Browser extends Thread {
-
-        String broker;
-        Destination dest;
-        int totalCount;
-        QueueBrowser browser = null;
-        MessageConsumer consumer = null;
-        boolean consume = false;
-
-        public Browser(String broker, Destination dest) {
-            this.broker = broker;
-            this.dest = dest;
-        }
-
-        public void run() {
-            int retries = 0;
-            while (retries++ < 5) {
-                try {
-                    QueueBrowser browser = createBrowser(broker, dest);
-                    int count  = browseMessages(browser, broker);
-                    if (consume) {
-                        if (count != 0) {
-                            MessageConsumer consumer = createSyncConsumer(broker, dest);
-                            totalCount += count;
-                            for (int i = 0; i < count; i++) {
-                                ActiveMQTextMessage message = (ActiveMQTextMessage)consumer.receive(1000);
-                                LOG.info(broker + " consumer: " + message.getText() + " " + message.getDestination() +  " " + message.getMessageId() + " " + Arrays.toString(message.getBrokerPath()));
-                                if (message == null) break;
-                            }
-                        }
-                    } else {
-                        totalCount = count;
-                    }
-                    LOG.info("browser '" + broker + "' browsed " + totalCount);
-
-                    Thread.sleep(1000);
-                } catch (Exception e) {
-                    LOG.info("Exception browsing " + e, e);
-                } finally {
-                    try {
-                        if (browser != null) {
-                            browser.close();
-                        }
-                        if (consumer != null) {
-                            consumer.close();
-                        }
-                    } catch (Exception e) {
-                        LOG.info("Exception closing browser " + e, e);
-                    }
-                }
-            }
-        }
-
-        public int getTotalCount() {
-            return totalCount;
-        }
-    }
-
-    protected NetworkConnector bridgeBrokersWithIncludedDestination(String localBrokerName, String remoteBrokerName, ActiveMQDestination included, ActiveMQDestination excluded) throws Exception {
-        NetworkConnector nc = bridgeBrokers(localBrokerName, remoteBrokerName, false, 4, true);
-        nc.addStaticallyIncludedDestination(included);
-        if (excluded != null) {
-            nc.addExcludedDestination(excluded);
-        }
-        nc.setPrefetchSize(1);
-        return nc;
-    }
-
-    public void testAMQ3020() throws Exception {
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker1A.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker1B.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker2A.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker2B.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker3A.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/browse-broker3B.xml"));
-
-        brokers.get("broker-1A").broker.waitUntilStarted();
-        brokers.get("broker-2A").broker.waitUntilStarted();
-        brokers.get("broker-3A").broker.waitUntilStarted();
-
-        Destination composite = createDestination("PROD.FUSESOURCE.3.A,PROD.FUSESOURCE.3.B", false);
-
-        Browser browser1 = new Browser("broker-3A", composite);
-        browser1.start();
-
-        Thread.sleep(1000);
-
-        Browser browser2 = new Browser("broker-3B", composite);
-        browser2.start();
-
-        Thread.sleep(1000);
-
-        sendMessages("broker-1A", composite, MESSAGE_COUNT);
-
-        browser1.join();
-        browser2.join();
-
-
-        LOG.info("broker-3A browsed " + browser1.getTotalCount());
-        LOG.info("broker-3B browsed " + browser2.getTotalCount());
-        
-        assertEquals(MESSAGE_COUNT * 2, browser1.getTotalCount() + browser2.getTotalCount() );
-
-    }    
-
-    protected int browseMessages(QueueBrowser browser, String name) throws Exception {
-        Enumeration msgs = browser.getEnumeration();
-        int browsedMessage = 0;
-        while (msgs.hasMoreElements()) {
-            browsedMessage++;
-            ActiveMQTextMessage message = (ActiveMQTextMessage)msgs.nextElement();
-            LOG.info(name + " browsed: " + message.getText() + " " + message.getDestination() +  " " + message.getMessageId() + " " + Arrays.toString(message.getBrokerPath()));
-        }
-        return browsedMessage;
-    }
-
-
-    protected int browseMessages(String broker, Destination dest) throws Exception {
-        QueueBrowser browser = createBrowser(broker, dest);
-        int browsedMessage = browseMessages(browser, "browser");
-        browser.close();
-        return browsedMessage;
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ChangeSentMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ChangeSentMessageTest.java
deleted file mode 100755
index a979fe3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ChangeSentMessageTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.HashMap;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-
-import org.apache.activemq.test.TestSupport;
-
-/**
- * 
- */
-public class ChangeSentMessageTest extends TestSupport {
-    private static final int COUNT = 200;
-    private static final String VALUE_NAME = "value";
-
-    /**
-     * test Object messages can be changed after sending with no side-affects
-     * 
-     * @throws Exception
-     */
-    public void testDoChangeSentMessage() throws Exception {
-        Destination destination = createDestination("test-" + ChangeSentMessageTest.class.getName());
-        Connection connection = createConnection();
-        connection.start();
-        Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = consumerSession.createConsumer(destination);
-        Session publisherSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = publisherSession.createProducer(destination);
-        HashMap<String, Integer> map = new HashMap<String, Integer>();
-        ObjectMessage message = publisherSession.createObjectMessage();
-        for (int i = 0; i < COUNT; i++) {
-            map.put(VALUE_NAME, Integer.valueOf(i));
-            message.setObject(map);
-            producer.send(message);
-            assertTrue(message.getObject() == map);
-        }
-        for (int i = 0; i < COUNT; i++) {
-            ObjectMessage msg = (ObjectMessage)consumer.receive();
-            HashMap receivedMap = (HashMap)msg.getObject();
-            Integer intValue = (Integer)receivedMap.get(VALUE_NAME);
-            assertTrue(intValue.intValue() == i);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java
deleted file mode 100755
index 6c9724e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.test.TestSupport;
-
-/**
- * 
- */
-public class ChangeSessionDeliveryModeTest extends TestSupport implements MessageListener {
-
-    /**
-     * test following condition- which are defined by JMS Spec 1.1:
-     * MessageConsumers cannot use a MessageListener and receive() from the same
-     * session
-     * 
-     * @throws Exception
-     */
-    public void testDoChangeSessionDeliveryMode() throws Exception {
-        Destination destination = createDestination("foo.bar");
-        Connection connection = createConnection();
-        connection.start();
-        Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer1 = consumerSession.createConsumer(destination);
-        consumer1.setMessageListener(this);
-        JMSException jmsEx = null;
-        MessageConsumer consumer2 = consumerSession.createConsumer(destination);
-
-        try {
-            consumer2.receive(10);
-            fail("Did not receive expected exception.");
-        } catch (JMSException e) {
-            assertTrue(e instanceof IllegalStateException);
-        }
-    }
-
-    public void onMessage(Message msg) {
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java
deleted file mode 100755
index add5a3c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Destination;
-import javax.jms.Message;
-
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-import org.apache.activemq.transport.udp.UdpTransportUsingServerTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class CompositeConsumeTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    private static final Logger LOG = LoggerFactory.getLogger(CompositeConsumeTest.class);
-
-    public void testSendReceive() throws Exception {
-        messages.clear();
-
-        Destination[] destinations = getDestinations();
-        int destIdx = 0;
-
-        for (int i = 0; i < data.length; i++) {
-            Message message = session.createTextMessage(data[i]);
-
-            if (verbose) {
-                LOG.info("About to send a message: " + message + " with text: " + data[i]);
-            }
-
-            producer.send(destinations[destIdx], message);
-
-            if (++destIdx >= destinations.length) {
-                destIdx = 0;
-            }
-        }
-
-        assertMessagesAreReceived();
-    }
-
-    /**
-     * Returns the subscription subject
-     */
-    protected String getSubject() {
-        return getPrefix() + "FOO.BAR," + getPrefix() + "FOO.X.Y," + getPrefix() + "BAR.>";
-    }
-
-    /**
-     * Returns the destinations on which we publish
-     */
-    protected Destination[] getDestinations() {
-        return new Destination[]{new ActiveMQTopic(getPrefix() + "FOO.BAR"), new ActiveMQTopic(getPrefix() + "BAR.WHATNOT.XYZ"), new ActiveMQTopic(getPrefix() + "FOO.X.Y")};
-    }
-
-    protected String getPrefix() {
-        return super.getSubject() + ".";
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java
deleted file mode 100755
index bd60129..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.test.JmsSendReceiveTestSupport;
-import org.apache.activemq.test.retroactive.RetroactiveConsumerTestWithSimpleMessageListTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class CompositePublishTest extends JmsSendReceiveTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(CompositePublishTest.class);
-
-    protected Connection sendConnection;
-    protected Connection receiveConnection;
-    protected Session receiveSession;
-    protected MessageConsumer[] consumers;
-    protected List[] messageLists;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        connectionFactory = createConnectionFactory();
-
-        sendConnection = createConnection();
-        sendConnection.start();
-
-        receiveConnection = createConnection();
-        receiveConnection.start();
-
-        LOG.info("Created sendConnection: " + sendConnection);
-        LOG.info("Created receiveConnection: " + receiveConnection);
-
-        session = sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        receiveSession = receiveConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        LOG.info("Created sendSession: " + session);
-        LOG.info("Created receiveSession: " + receiveSession);
-
-        producer = session.createProducer(null);
-
-        LOG.info("Created producer: " + producer);
-
-        if (topic) {
-            consumerDestination = session.createTopic(getConsumerSubject());
-            producerDestination = session.createTopic(getProducerSubject());
-        } else {
-            consumerDestination = session.createQueue(getConsumerSubject());
-            producerDestination = session.createQueue(getProducerSubject());
-        }
-
-        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
-
-        Destination[] destinations = getDestinations();
-        consumers = new MessageConsumer[destinations.length];
-        messageLists = new List[destinations.length];
-        for (int i = 0; i < destinations.length; i++) {
-            Destination dest = destinations[i];
-            messageLists[i] = createConcurrentList();
-            consumers[i] = receiveSession.createConsumer(dest);
-            consumers[i].setMessageListener(createMessageListener(i, messageLists[i]));
-        }
-
-        LOG.info("Started connections");
-    }
-
-    protected MessageListener createMessageListener(int i, final List<Message> messageList) {
-        return new MessageListener() {
-            public void onMessage(Message message) {
-                consumeMessage(message, messageList);
-            }
-        };
-    }
-
-    /**
-     * Returns the subject on which we publish
-     */
-    protected String getSubject() {
-        return getPrefix() + "FOO.BAR," + getPrefix() + "FOO.X.Y";
-    }
-
-    /**
-     * Returns the destinations to which we consume
-     */
-    protected Destination[] getDestinations() {
-        return new Destination[] {new ActiveMQTopic(getPrefix() + "FOO.BAR"), new ActiveMQTopic(getPrefix() + "FOO.*"), new ActiveMQTopic(getPrefix() + "FOO.X.Y")};
-    }
-
-    protected String getPrefix() {
-        return super.getSubject() + ".";
-    }
-
-    protected void assertMessagesAreReceived() throws JMSException {
-        waitForMessagesToBeDelivered();
-        int size = messageLists.length;
-        for (int i = 0; i < size; i++) {
-            LOG.info("Message list: " + i + " contains: " + messageLists[i].size() + " message(s)");
-        }
-        size = messageLists.length;
-        for (int i = 0; i < size; i++) {
-            assertMessagesReceivedAreValid(messageLists[i]);
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() {
-        return new ActiveMQConnectionFactory("vm://localhost");
-    }
-
-    protected void tearDown() throws Exception {
-        session.close();
-        receiveSession.close();
-
-        sendConnection.close();
-        receiveConnection.close();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java
deleted file mode 100644
index 9f1f862..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.TopicSubscriber;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.TestSupport;
-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.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.util.MessageIdList;
-import org.apache.activemq.util.Wait;
-//import org.apache.commons.dbcp.BasicDataSource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConcurrentProducerDurableConsumerTest extends TestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ConcurrentProducerDurableConsumerTest.class);
-    private int consumerCount = 5;
-    BrokerService broker;
-    protected List<Connection> connections = Collections.synchronizedList(new ArrayList<Connection>());
-    protected Map<MessageConsumer, TimedMessageListener> consumers = new HashMap<MessageConsumer, TimedMessageListener>();
-    protected MessageIdList allMessagesList = new MessageIdList();
-    private int messageSize = 1024;
-
-    public void initCombosForTestSendRateWithActivatingConsumers() throws Exception {
-        addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{PersistenceAdapterChoice.KahaDB, /* too slow for hudson - PersistenceAdapterChoice.JDBC,*/  PersistenceAdapterChoice.MEM});
-    }
-
-    public void testSendRateWithActivatingConsumers() throws Exception {
-        final Destination destination = createDestination();
-        final ConnectionFactory factory = createConnectionFactory();
-        startInactiveConsumers(factory, destination);
-
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = createMessageProducer(session, destination);
-
-        // preload the durable consumers
-        double[] inactiveConsumerStats = produceMessages(destination, 500, 10, session, producer, null);
-        LOG.info("With inactive consumers: ave: " + inactiveConsumerStats[1]
-                + ", max: " + inactiveConsumerStats[0] + ", multiplier: " + (inactiveConsumerStats[0]/inactiveConsumerStats[1]));
-
-        // periodically start a durable sub that has a backlog
-        final int consumersToActivate = 5;
-        final Object addConsumerSignal = new Object();
-        Executors.newCachedThreadPool(new ThreadFactory() {
-            @Override
-            public Thread newThread(Runnable r) {
-                return new Thread(r, "ActivateConsumer" + this);
-            }
-        }).execute(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    MessageConsumer consumer = null;
-                    for (int i = 0; i < consumersToActivate; i++) {
-                        LOG.info("Waiting for add signal from producer...");
-                        synchronized (addConsumerSignal) {
-                            addConsumerSignal.wait(30 * 60 * 1000);
-                        }
-                        TimedMessageListener listener = new TimedMessageListener();
-                        consumer = createDurableSubscriber(factory.createConnection(), destination, "consumer" + (i + 1));
-                        LOG.info("Created consumer " + consumer);
-                        consumer.setMessageListener(listener);
-                        consumers.put(consumer, listener);
-                    }
-                } catch (Exception e) {
-                    LOG.error("failed to start consumer", e);
-                }
-            }
-        });
-
-
-        double[] statsWithActive = produceMessages(destination, 300, 10, session, producer, addConsumerSignal);
-
-        LOG.info(" with concurrent activate, ave: " + statsWithActive[1] + ", max: " + statsWithActive[0] + ", multiplier: " + (statsWithActive[0]/ statsWithActive[1]));
-
-        while(consumers.size() < consumersToActivate) {
-            TimeUnit.SECONDS.sleep(2);
-        }
-
-        long timeToFirstAccumulator = 0;
-        for (TimedMessageListener listener : consumers.values()) {
-            long time = listener.getFirstReceipt();
-            timeToFirstAccumulator += time;
-            LOG.info("Time to first " + time);
-        }
-        LOG.info("Ave time to first message =" + timeToFirstAccumulator/consumers.size());
-
-        for (TimedMessageListener listener : consumers.values()) {
-            LOG.info("Ave batch receipt time: " + listener.waitForReceivedLimit(5000) + " max receipt: " + listener.maxReceiptTime);
-        }
-
-        //assertTrue("max (" + statsWithActive[0] + ") within reasonable multiplier of ave (" + statsWithActive[1] + ")",
-        //        statsWithActive[0] < 5 * statsWithActive[1]);
-
-        // compare no active to active
-        LOG.info("Ave send time with active: " + statsWithActive[1]
-                + " as multiplier of ave with none active: " + inactiveConsumerStats[1]
-                + ", multiplier=" + (statsWithActive[1]/inactiveConsumerStats[1]));
-
-        assertTrue("Ave send time with active: " + statsWithActive[1]
-                + " within reasonable multpler of ave with none active: " + inactiveConsumerStats[1]
-                + ", multiplier " + (statsWithActive[1]/inactiveConsumerStats[1]),
-                statsWithActive[1] < 15 * inactiveConsumerStats[1]);
-    }
-
-
-    public void x_initCombosForTestSendWithInactiveAndActiveConsumers() throws Exception {
-        addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-    }
-
-    public void x_testSendWithInactiveAndActiveConsumers() throws Exception {
-        Destination destination = createDestination();
-        ConnectionFactory factory = createConnectionFactory();
-        startInactiveConsumers(factory, destination);
-
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-        final int toSend = 100;
-        final int numIterations = 5;
-
-        double[] noConsumerStats = produceMessages(destination, toSend, numIterations, session, producer, null);
-
-        startConsumers(factory, destination);
-        LOG.info("Activated consumer");
-
-        double[] withConsumerStats = produceMessages(destination, toSend, numIterations, session, producer, null);
-
-        LOG.info("With consumer: " + withConsumerStats[1] + " , with noConsumer: " + noConsumerStats[1]
-                + ", multiplier: " + (withConsumerStats[1]/noConsumerStats[1]));
-        final int reasonableMultiplier = 15; // not so reasonable but improving
-        assertTrue("max X times as slow with consumer: " + withConsumerStats[1] + ", with no Consumer: "
-                + noConsumerStats[1] + ", multiplier: " + (withConsumerStats[1]/noConsumerStats[1]),
-                withConsumerStats[1] < noConsumerStats[1] * reasonableMultiplier);
-
-        final int toReceive = toSend * numIterations * consumerCount * 2;
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                LOG.info("count: " + allMessagesList.getMessageCount());
-                return toReceive == allMessagesList.getMessageCount();
-            }
-        }, 60 * 1000);
-
-        assertEquals("got all messages", toReceive, allMessagesList.getMessageCount());
-    }
-
-
-    private MessageProducer createMessageProducer(Session session, Destination destination) throws JMSException {
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        return producer;
-    }
-
-
-    private void startInactiveConsumers(ConnectionFactory factory, Destination destination) throws Exception {
-        // create off line consumers
-        startConsumers(factory, destination);
-        for (Connection connection: connections) {
-            connection.close();
-        }
-        connections.clear();
-        consumers.clear();
-    }
-
-
-    protected void startConsumers(ConnectionFactory factory, Destination dest) throws Exception {
-        MessageConsumer consumer;
-        for (int i = 0; i < consumerCount; i++) {
-            TimedMessageListener list = new TimedMessageListener();
-            consumer = createDurableSubscriber(factory.createConnection(), dest, "consumer" + (i + 1));
-            consumer.setMessageListener(list);
-            consumers.put(consumer, list);
-        }
-    }
-
-    protected TopicSubscriber createDurableSubscriber(Connection conn, Destination dest, String name) throws Exception {
-        conn.setClientID(name);
-        connections.add(conn);
-        conn.start();
-
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final TopicSubscriber consumer = sess.createDurableSubscriber((javax.jms.Topic)dest, name);
-
-        return consumer;
-    }
-
-    /**
-     * @return max and ave send time
-     * @throws Exception
-     */
-    private double[] produceMessages(Destination destination,
-                                     final int toSend,
-                                     final int numIterations,
-                                     Session session,
-                                     MessageProducer producer,
-                                     Object addConsumerSignal) throws Exception {
-        long start;
-        long count = 0;
-        double batchMax = 0, max = 0, sum = 0;
-        for (int i=0; i<numIterations; i++) {
-            start = System.currentTimeMillis();
-            for (int j=0; j < toSend; j++) {
-                long singleSendstart = System.currentTimeMillis();
-                TextMessage msg = createTextMessage(session, "" + j);
-                producer.send(msg);
-                max = Math.max(max, (System.currentTimeMillis() - singleSendstart));
-                if (++count % 500 == 0) {
-                    if (addConsumerSignal != null) {
-                        synchronized (addConsumerSignal) {
-                            addConsumerSignal.notifyAll();
-                            LOG.info("Signalled add consumer");
-                        }
-                    }
-                }
-                ;
-                if (count % 5000 == 0) {
-                    LOG.info("Sent " + count + ", singleSendMax:" + max);
-                }
-
-            }
-            long duration = System.currentTimeMillis() - start;
-            batchMax = Math.max(batchMax, duration);
-            sum += duration;
-            LOG.info("Iteration " + i + ", sent " + toSend + ", time: "
-                    + duration + ", batchMax:" + batchMax + ", singleSendMax:" + max);
-        }
-
-        LOG.info("Sent: " + toSend * numIterations + ", batchMax: " + batchMax + " singleSendMax: " + max);
-        return new double[]{batchMax, sum/numIterations};
-    }
-
-    protected TextMessage createTextMessage(Session session, String initText) throws Exception {
-        TextMessage msg = session.createTextMessage();
-
-        // Pad message text
-        if (initText.length() < messageSize) {
-            char[] data = new char[messageSize - initText.length()];
-            Arrays.fill(data, '*');
-            String str = new String(data);
-            msg.setText(initText + str);
-
-            // Do not pad message text
-        } else {
-            msg.setText(initText);
-        }
-
-        return msg;
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        topic = true;
-        super.setUp();
-        broker = createBroker();
-        broker.start();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        for (Iterator<Connection> iter = connections.iterator(); iter.hasNext();) {
-            Connection conn = iter.next();
-            try {
-                conn.close();
-            } catch (Throwable e) {
-            }
-        }
-        broker.stop();
-        allMessagesList.flushMessages();
-        consumers.clear();
-        super.tearDown();
-    }
-
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService brokerService = new BrokerService();
-        brokerService.setEnableStatistics(false);
-        brokerService.addConnector("tcp://0.0.0.0:61616");
-        brokerService.setDeleteAllMessagesOnStartup(true);
-
-        PolicyEntry policy = new PolicyEntry();
-        policy.setPrioritizedMessages(true);
-        policy.setMaxPageSize(500);
-
-        PolicyMap policyMap = new PolicyMap();
-        policyMap.setDefaultEntry(policy);
-        brokerService.setDestinationPolicy(policyMap);
-
-        if (false) {
-              // external mysql works a lot faster
-              //
-//            JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-//            BasicDataSource ds = new BasicDataSource();
-//            com.mysql.jdbc.Driver d = new com.mysql.jdbc.Driver();
-//            ds.setDriverClassName("com.mysql.jdbc.Driver");
-//            ds.setUrl("jdbc:mysql://localhost/activemq?relaxAutoCommit=true");
-//            ds.setMaxActive(200);
-//            ds.setUsername("root");
-//            ds.setPassword("");
-//            ds.setPoolPreparedStatements(true);
-//            jdbc.setDataSource(ds);
-//            brokerService.setPersistenceAdapter(jdbc);
-
-/* add mysql bits to the pom in the testing dependencies
-<dependency>
-    <groupId>mysql</groupId>
-    <artifactId>mysql-connector-java</artifactId>
-    <version>5.1.10</version>
-    <scope>test</scope>
-</dependency>
-<dependency>
-    <groupId>commons-dbcp</groupId>
-    <artifactId>commons-dbcp</artifactId>
-    <version>1.2.2</version>
-    <scope>test</scope>
-</dependency>
-             */
-        } else {
-            setDefaultPersistenceAdapter(brokerService);
-        }
-        return brokerService;
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-        prefetchPolicy.setAll(1);
-        factory.setPrefetchPolicy(prefetchPolicy);
-
-        factory.setDispatchAsync(true);
-        return factory;
-    }
-
-    public static Test suite() {
-        return suite(ConcurrentProducerDurableConsumerTest.class);
-    }
-
-    class TimedMessageListener implements MessageListener {
-        final int batchSize = 1000;
-        CountDownLatch firstReceiptLatch = new CountDownLatch(1);
-        long mark = System.currentTimeMillis();
-        long firstReceipt = 0l;
-        long receiptAccumulator = 0;
-        long batchReceiptAccumulator = 0;
-        long maxReceiptTime = 0;
-        AtomicLong count = new AtomicLong(0);
-
-        @Override
-        public void onMessage(Message message) {
-            final long current = System.currentTimeMillis();
-            final long duration = current - mark;
-            receiptAccumulator += duration;
-            allMessagesList.onMessage(message);
-            if (count.incrementAndGet() == 1) {
-                firstReceipt = duration;
-                firstReceiptLatch.countDown();
-                LOG.info("First receipt in " + firstReceipt + "ms");
-            } else if (count.get() % batchSize == 0) {
-                LOG.info("Consumed " + batchSize + " in " + batchReceiptAccumulator + "ms");
-                batchReceiptAccumulator=0;
-            }
-            maxReceiptTime = Math.max(maxReceiptTime, duration);
-            receiptAccumulator += duration;
-            batchReceiptAccumulator += duration;
-            mark = current;
-        }
-
-        long getMessageCount() {
-            return count.get();
-        }
-
-        long getFirstReceipt() throws Exception {
-            firstReceiptLatch.await(30, TimeUnit.SECONDS);
-            return firstReceipt;
-        }
-
-        public long waitForReceivedLimit(long limit) throws Exception {
-            final long expiry = System.currentTimeMillis() + 30*60*1000;
-            while (count.get() < limit) {
-                if (System.currentTimeMillis() > expiry) {
-                    throw new RuntimeException("Expired waiting for X messages, " + limit);
-                }
-                TimeUnit.SECONDS.sleep(2);
-            }
-            return receiptAccumulator/(limit/batchSize);
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java
deleted file mode 100755
index 3810505..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConsumeQueuePrefetchTest extends ConsumeTopicPrefetchTest {
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumeQueuePrefetchTest.class);
-    
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-    
-    public void testInflightWithConsumerPerMessage() throws JMSException {
-        makeMessages(prefetchSize);
-
-        LOG.info("About to send and receive: " + prefetchSize + " on destination: " + destination
-                + " of type: " + destination.getClass().getName());
-
-        for (int i = 0; i < prefetchSize; i++) {
-            Message message = session.createTextMessage(messageTexts[i]);
-            producer.send(message);
-        }
-
-        validateConsumerPrefetch(this.getSubject(), prefetchSize);
-        
-        // new consumer per 20 messages
-        for (int i = 0; i < prefetchSize; i+=20) {
-            consumer.close();
-            consumer = session.createConsumer(destination);
-            validateConsumerPrefetch(this.getSubject(), prefetchSize - i);
-            for (int j=0; j<20; j++) {
-                Message message = consumeMessge(i+j);
-                message.acknowledge();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java
deleted file mode 100755
index 535a4b7..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.policy.IndividualDeadLetterViaXmlTest;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.util.Wait;
-import org.apache.activemq.util.Wait.Condition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ConsumeTopicPrefetchTest extends ProducerConsumerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumeTopicPrefetchTest.class);
-
-    protected int prefetchSize = 100;
-    protected String[] messageTexts;
-    protected long consumerTimeout = 10000L;
-
-    public void testSendPrefetchSize() throws JMSException {
-        testWithMessageCount(prefetchSize);
-    }
-
-    public void testSendDoublePrefetchSize() throws JMSException {
-        testWithMessageCount(prefetchSize * 2);
-    }
-
-    public void testSendPrefetchSizePlusOne() throws JMSException {
-        testWithMessageCount(prefetchSize + 1);
-    }
-
-    protected void testWithMessageCount(int messageCount) throws JMSException {
-        makeMessages(messageCount);
-
-        LOG.info("About to send and receive: " + messageCount + " on destination: " + destination
-                + " of type: " + destination.getClass().getName());
-
-        for (int i = 0; i < messageCount; i++) {
-            Message message = session.createTextMessage(messageTexts[i]);
-            producer.send(message);
-        }
-
-        validateConsumerPrefetch(this.getSubject(), prefetchSize);
-        
-        // lets consume them in two fetch batches
-        for (int i = 0; i < messageCount; i++) {
-            consumeMessge(i);
-        }
-    }
-
-    protected Connection createConnection() throws Exception {
-        ActiveMQConnection connection = (ActiveMQConnection) super.createConnection();
-        connection.getPrefetchPolicy().setQueuePrefetch(prefetchSize);
-        connection.getPrefetchPolicy().setTopicPrefetch(prefetchSize);
-        return connection;
-    }
-
-    protected TextMessage consumeMessge(int i) throws JMSException {
-        Message message = consumer.receive(consumerTimeout);
-        assertTrue("Should have received a message by now for message: " + i, message != null);
-        assertTrue("Should be a TextMessage: " + message, message instanceof TextMessage);
-        TextMessage textMessage = (TextMessage) message;
-        assertEquals("Message content", messageTexts[i], textMessage.getText());
-        return textMessage;
-    }
-
-
-    protected void makeMessages(int messageCount) {
-        messageTexts = new String[messageCount];
-        for (int i = 0; i < messageCount; i++) {
-            messageTexts[i] = "Message for test: + " + getName() + " = " + i;
-        }
-    }
-
-    protected void validateConsumerPrefetch(String destination, final long expectedCount) throws JMSException {
-        RegionBroker regionBroker = (RegionBroker) BrokerRegistry.getInstance().lookup("localhost").getRegionBroker();
-        for (org.apache.activemq.broker.region.Destination dest : regionBroker.getQueueRegion().getDestinationMap().values()) {
-            final org.apache.activemq.broker.region.Destination target = dest;
-            if (dest.getName().equals(destination)) {
-                try {
-                    Wait.waitFor(new Condition() {
-                        public boolean isSatisified() throws Exception {
-                            DestinationStatistics stats = target.getDestinationStatistics();
-                            LOG.info("inflight for : " + target.getName() + ": " +  stats.getInflight().getCount());
-                            return stats.getInflight().getCount() == expectedCount;
-                        }
-                    });
-                } catch (Exception e) {
-                    throw new JMSException(e.toString());
-                }
-                DestinationStatistics stats = dest.getDestinationStatistics();
-                LOG.info("inflight for : " + dest.getName() + ": " + stats.getInflight().getCount());
-                assertEquals("inflight for: " + dest.getName() + ": " + stats.getInflight().getCount() + " matches", 
-                        expectedCount, stats.getInflight().getCount());      
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java
deleted file mode 100644
index 4328a26..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * 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.usecases;
-
-import static org.junit.Assert.*;
-
-import java.net.URI;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeData;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConsumeUncompressedCompressedMessageTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumeUncompressedCompressedMessageTest.class);
-
-    private BrokerService broker;
-    private URI tcpUri;
-
-    ActiveMQConnectionFactory factory;
-    ActiveMQConnection connection;
-    Session session;
-    Queue queue;
-
-    @Before
-    public void setUp() throws Exception {
-        broker = createBroker();
-        broker.start();
-        broker.waitUntilStarted();
-
-        factory = new ActiveMQConnectionFactory(tcpUri);
-        factory.setUseCompression(true);
-
-        connection = (ActiveMQConnection) factory.createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        queue = session.createQueue("CompressionTestQueue");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-
-        if(connection != null) {
-            connection.close();
-        }
-
-        broker.stop();
-        broker.waitUntilStopped();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        return createBroker(true);
-    }
-
-    protected BrokerService createBroker(boolean delete) throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.setDeleteAllMessagesOnStartup(true);
-        answer.setSchedulerSupport(false);
-        answer.setUseJmx(true);
-        TransportConnector connector = answer.addConnector("tcp://localhost:0");
-        tcpUri = connector.getConnectUri();
-        return answer;
-    }
-
-    @Test
-    public void testBrowseAndReceiveCompressedMessages() throws Exception {
-
-        assertTrue(((ActiveMQConnection) connection).isUseCompression());
-
-        createProducerAndSendMessages(1);
-
-        QueueViewMBean queueView = getProxyToQueueViewMBean();
-
-        assertNotNull(queueView);
-
-        CompositeData[] compdatalist = queueView.browse();
-        if (compdatalist.length == 0) {
-            fail("There is no message in the queue:");
-        }
-
-        CompositeData cdata = compdatalist[0];
-
-        assertComplexData(0, cdata, "Text", "Test Text Message: " + 0);
-
-        assertMessageAreCorrect(1);
-    }
-
-    @Test
-    public void testReceiveAndResendWithCompressionOff() throws Exception {
-
-        assertTrue(connection.isUseCompression());
-
-        createProducerAndSendMessages(1);
-
-        MessageConsumer consumer = session.createConsumer(queue);
-        TextMessage message = (TextMessage) consumer.receive(5000);
-
-        assertTrue(((ActiveMQMessage) message).isCompressed());
-
-        LOG.debug("Received Message with Text = " + message.getText());
-
-        connection.setUseCompression(false);
-
-        MessageProducer producer = session.createProducer(queue);
-        producer.send(message);
-        producer.close();
-
-        message = (TextMessage) consumer.receive(5000);
-
-        LOG.debug("Received Message with Text = " + message.getText());
-    }
-
-    protected void assertComplexData(int messageIndex, CompositeData cdata, String name, Object expected) {
-        Object value = cdata.get(name);
-        assertEquals("Message " + messageIndex + " CData field: " + name, expected, value);
-    }
-
-    private void createProducerAndSendMessages(int numToSend) throws Exception {
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(queue);
-        for (int i = 0; i < numToSend; i++) {
-            TextMessage message = session.createTextMessage("Test Text Message: " + i);
-            if (i  != 0 && i % 10000 == 0) {
-                LOG.info("sent: " + i);
-            }
-            producer.send(message);
-        }
-        producer.close();
-    }
-
-    private QueueViewMBean getProxyToQueueViewMBean()
-            throws MalformedObjectNameException, JMSException {
-        ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq"
-                + ":Type=Queue,Destination=" + queue.getQueueName()
-                + ",BrokerName=localhost");
-        QueueViewMBean proxy = (QueueViewMBean) broker.getManagementContext()
-                .newProxyInstance(queueViewMBeanName, QueueViewMBean.class,
-                        true);
-        return proxy;
-    }
-
-    private void assertMessageAreCorrect(int numToReceive) throws Exception {
-        MessageConsumer consumer = session.createConsumer(queue);
-
-        try{
-
-            for (int i = 0; i < numToReceive; ++i) {
-                TextMessage message = (TextMessage) consumer.receive(5000);
-                assertNotNull(message);
-                assertEquals("Test Text Message: " + i, message.getText());
-            }
-
-        } finally {
-            consumer.close();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java
deleted file mode 100644
index 77b821e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class CreateLotsOfTemporaryQueuesTest extends EmbeddedBrokerAndConnectionTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(CreateLotsOfTemporaryQueuesTest.class);
-
-    private static int numberToCreate = 500;
-    private static long sleep = 20;
-
-    public static void main(String[] args) {
-        configure(args);
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(CreateLotsOfTemporaryQueuesTest.class);
-    }
-
-    public void testCreateLotsOfTemporaryQueues() throws Exception {
-        LOG.info("Creating " + numberToCreate + " temporary queue(s)");
-
-        Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        for (int i = 0; i < numberToCreate; i++) {
-            if (i % 1000 == 0) {
-                LOG.info("attempt " + i);
-            }
-            TemporaryQueue temporaryQueue = session.createTemporaryQueue();
-            temporaryQueue.delete();
-            Thread.sleep(sleep);
-        }
-        LOG.info("Created " + numberToCreate + " temporary queue(s)");
-    }
-
-    public static void configure(String[] args) {
-        if (args.length > 0) {
-            numberToCreate = Integer.parseInt(args[0]);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java
deleted file mode 100755
index 58f92cc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * @author Peter Henning
- * 
- */
-public class CreateTemporaryQueueBeforeStartTest extends TestCase {
-    protected String bindAddress = "tcp://localhost:61621";
-    private Connection connection;
-    private BrokerService broker = new BrokerService();
-
-    public void testCreateTemporaryQueue() throws Exception {
-        connection = createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Queue queue = session.createTemporaryQueue();
-        assertTrue("No queue created!", queue != null);
-        Topic topic = session.createTemporaryTopic();
-        assertTrue("No topic created!", topic != null);
-    }
-
-    public void testTryToReproduceNullPointerBug() throws Exception {
-        String url = bindAddress;
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
-        QueueConnection queueConnection = factory.createQueueConnection();
-        this.connection = queueConnection;
-        QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createSender(null); // Unidentified
-        Queue receiverQueue = session.createTemporaryQueue();
-        session.createReceiver(receiverQueue);
-        queueConnection.start();
-    }
-
-    public void testTemporaryQueueConsumer() throws Exception {
-        final int number = 20;
-        final AtomicInteger count = new AtomicInteger(0);
-        for (int i = 0; i < number; i++) {
-            Thread thread = new Thread(new Runnable() {
-                public void run() {
-                    try {
-                        QueueConnection connection = createConnection();
-                        QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-                        Queue queue = session.createTemporaryQueue();
-                        session.createReceiver(queue);
-                        connection.start();
-
-                        if (count.incrementAndGet() >= number) {
-                            synchronized (count) {
-                                count.notify();
-                            }
-                        }
-                    } catch (Exception ex) {
-                        ex.printStackTrace();
-                    }
-                }
-            });
-            thread.start();
-        }
-        int maxWaitTime = 20000;
-        synchronized (count) {
-            long waitTime = maxWaitTime;
-            long start = System.currentTimeMillis();
-            while (count.get() < number) {
-                if (waitTime <= 0) {
-                    break;
-                } else {
-                    count.wait(waitTime);
-                    waitTime = maxWaitTime - (System.currentTimeMillis() - start);
-                }
-            }
-        }
-        assertTrue("Unexpected count: " + count, count.get() == number);
-    }
-
-    protected QueueConnection createConnection() throws Exception {
-        ActiveMQConnectionFactory factory = createConnectionFactory();
-        return factory.createQueueConnection();
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(bindAddress);
-    }
-
-    protected void setUp() throws Exception {
-        broker.setPersistent(false);
-        broker.addConnector(bindAddress);
-        broker.start();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        broker.stop();
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DiscriminatingConsumerLoadTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DiscriminatingConsumerLoadTest.java
deleted file mode 100644
index c62a2b6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DiscriminatingConsumerLoadTest.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsConnectionStartStopTest;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-
-/**
- * Test case intended to demonstrate delivery interruption to queue consumers when
- * a JMS selector leaves some messages on the queue (due to use of a JMS Selector)
- * 
- * testNonDiscriminatingConsumer() demonstrates proper functionality for consumers that don't use
- * a selector to qualify their input.
- * 
- * testDiscriminatingConsumer() demonstrates the failure condition in which delivery to the consumer
- * eventually halts.
- * 
- * The expected behavior is for the delivery to the client to be maintained regardless of the depth
- * of the queue, particularly when the messages in the queue do not meet the selector criteria of the
- * client.
- *
- * https://issues.apache.org/activemq/browse/AMQ-2217
- * 
- */
-public class DiscriminatingConsumerLoadTest extends TestSupport {
-
-	private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
-	.getLog(DiscriminatingConsumerLoadTest.class);
-
-	private Connection producerConnection;
-	private Connection consumerConnection;
-	private int counterSent = 0;
-	private int counterReceived = 0;
-	
-	public static final String JMSTYPE_EATME		= "DiscriminatingLoadClient.EatMe";
-	public static final String JMSTYPE_IGNOREME 	= "DiscriminatingLoadClient.IgnoreMe";
-
-	private int testSize = 5000; // setting this to a small number will pass all tests
-
-    BrokerService broker;
-
-	protected void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setPersistent(false);
-
-        // workaround is to ensure sufficient dispatch buffer for the destination
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultPolicy = new PolicyEntry();
-        defaultPolicy.setMaxPageSize(testSize);
-        policyMap.setDefaultEntry(defaultPolicy);
-        broker.setDestinationPolicy(policyMap);
-        broker.start();
-
-		super.setUp();
-		this.producerConnection = this.createConnection();
-		this.consumerConnection = this.createConnection();
-	}
-
-	/**
-	 * @see junit.framework.TestCase#tearDown()
-	 */
-	protected void tearDown() throws Exception {
-		if (producerConnection != null) {
-			producerConnection.close();
-			producerConnection = null;
-		}
-		if (consumerConnection != null) {
-			consumerConnection.close();
-			consumerConnection = null;
-		}
-		super.tearDown();
-        broker.stop();
-	}
-
-	/**
-	 * Test to check if a single consumer with no JMS selector will receive all intended messages
-	 * 
-	 * @throws java.lang.Exception
-	 */
-	public void testNonDiscriminatingConsumer() throws Exception {
-		
-		consumerConnection = createConnection();
-		consumerConnection.start();
-		LOG.info("consumerConnection = " +consumerConnection);
-
-		try {Thread.sleep(1000); } catch (Exception e) {}
-
-		// here we pass in null for the JMS selector
-		Consumer consumer = new Consumer(consumerConnection, null);
-		Thread consumerThread = new Thread(consumer);
-
-		consumerThread.start();
-
-		producerConnection = createConnection();
-		producerConnection.start();
-		LOG.info("producerConnection = " +producerConnection);
-
-		try {Thread.sleep(3000); } catch (Exception e) {}
-
-		Producer producer = new Producer(producerConnection);
-		Thread producerThread = new Thread(producer);
-		producerThread.start();
-
-		// now that everything is running, let's wait for the consumer thread to finish ...
-		consumerThread.join();
-		producer.stop = true;
-
-		if (consumer.getCount() == testSize )
-			LOG.info("test complete .... all messsages consumed!!");
-		else
-			LOG.info("test failed .... Sent " + (testSize / 1) + 
-					" messages intended to be consumed ( " + testSize + " total), but only consumed " + consumer.getCount());
-
-
-		assertTrue("Sent " + testSize + " messages intended to be consumed, but only consumed " + consumer.getCount(),
-				(consumer.getCount() == testSize ));
-		assertFalse("Delivery of messages to consumer was halted during this test", consumer.deliveryHalted());
-
-
-	}
-	
-	/**
-	 * Test to check if a single consumer with a JMS selector will receive all intended messages
-	 * 
-	 * @throws java.lang.Exception
-	 */
-	public void testDiscriminatingConsumer() throws Exception {
-
-		consumerConnection = createConnection();
-		consumerConnection.start();
-		LOG.info("consumerConnection = " +consumerConnection);
-
-		try {Thread.sleep(1000); } catch (Exception e) {}
-
-		// here we pass the JMS selector we intend to consume
-		Consumer consumer = new Consumer(consumerConnection, JMSTYPE_EATME);
-		Thread consumerThread = new Thread(consumer);
-
-		consumerThread.start();
-
-		producerConnection = createConnection();
-		producerConnection.start();
-		LOG.info("producerConnection = " +producerConnection);
-
-		try {Thread.sleep(3000); } catch (Exception e) {}
-
-		Producer producer = new Producer(producerConnection);
-		Thread producerThread = new Thread(producer);
-		producerThread.start();
-
-		// now that everything is running, let's wait for the consumer thread to finish ...
-		consumerThread.join();
-		producer.stop = true;
-
-		if (consumer.getCount() == (testSize / 2))
-        {
-			LOG.info("test complete .... all messsages consumed!!");
-        }
-        else
-		{
-			LOG.info("test failed .... Sent " + testSize  + " original messages, only half of which (" + (testSize / 2) + 
-					") were intended to be consumed: consumer paused at: " + consumer.getCount());
-			//System.out.println("test failed .... Sent " + testSize  + " original messages, only half of which (" + (testSize / 2) +
-			//		") were intended to be consumed: consumer paused at: " + consumer.getCount());
-			
-		}
-			
-		assertTrue("Sent " + testSize  + " original messages, only half of which (" + (testSize / 2) + 
-					") were intended to be consumed: consumer paused at: " + consumer.getCount(),
-				(consumer.getCount() == (testSize / 2)));
-		assertTrue("Delivery of messages to consumer was halted during this test as it only wants half", consumer.deliveryHalted());
-	}
-	
-	/**
-	 * Helper class that will publish 2 * testSize messages.  The messages will be distributed evenly
-	 * between the following two JMS types:
-	 * 
-	 * @see JMSTYPE_INTENDED_FOR_CONSUMPTION
-	 * @see JMSTYPE_NOT_INTENDED_FOR_CONSUMPTION
-	 * 
-	 * @author jlyons
-	 *
-	 */
-	private class Producer extends Thread 
-	{
-		private int counterSent = 0;
-		private Connection connection = null;
-		public boolean stop = false;
-
-		public Producer(Connection connection)
-		{
-			this.connection = connection;
-		}
-
-		public void run() {
-			try {
-				final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-				final Queue queue = session.createQueue("test");
-
-				// wait for 10 seconds to allow consumer.receive to be run
-				// first
-				Thread.sleep(10000);
-				MessageProducer producer = session.createProducer(queue);
-
-				while (!stop && (counterSent < testSize))
-				{
-					// first send a message intended to be consumed ....
-					TextMessage message = session.createTextMessage("*** Ill ....... Ini ***");  // alma mater ...
-					message.setJMSType(JMSTYPE_EATME);
-					//LOG.info("sending .... JMSType = " + message.getJMSType());
-					producer.send(message,DeliveryMode.NON_PERSISTENT,0,1800000);
-					
-					counterSent++;
-
-					// now send a message intended to be consumed by some other consumer in the the future
-					// ... we expect these messages to accrue in the queue 
-					message = session.createTextMessage("*** Ill ....... Ini ***");  // alma mater ...
-					message.setJMSType(JMSTYPE_IGNOREME);
-					//LOG.info("sending .... JMSType = " + message.getJMSType());
-					producer.send(message,DeliveryMode.NON_PERSISTENT,0,1800000);
-
-					counterSent++;
-				}
-
-				session.close();
-
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-			LOG.info("producer thread complete ... " + counterSent + " messages sent to the queue");
-		}
-		
-		public int getCount()
-		{
-			return this.counterSent;
-		}
-		
-	}
-	
-	/**
-	 * Helper class that will consume messages from the queue based on the supplied JMS selector.
-	 * Thread will stop after the first receive(..) timeout, or once all expected messages have
-	 * been received (see testSize).  If the thread stops due to a timeout, it is experiencing the
-	 * delivery pause that is symptomatic of a bug in the broker.
-	 * 
-	 * @author jlyons
-	 *
-	 */
-	private class Consumer extends Thread 
-	{
-		protected int counterReceived = 0;
-		private Connection connection = null;
-		private String jmsSelector = null;
-		private boolean deliveryHalted = false;
-		
-		public Consumer(Connection connection, String jmsSelector)
-		{
-			this.connection = connection;
-			this.jmsSelector = jmsSelector;
-		}
-
-		public void run() {
-			boolean testComplete = false;
-			try {
-				Session session = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-				final Queue queue = session.createQueue("test");
-				MessageConsumer consumer = null;
-				if (null != this.jmsSelector)
-				{
-					consumer = session.createConsumer(queue, "JMSType='" + this.jmsSelector + "'");
-				}
-				else
-				{
-					consumer = session.createConsumer(queue);					
-				}
-
-				while (!deliveryHalted && (counterReceived < testSize))
-				{
-					TextMessage result = (TextMessage) consumer.receive(30000);
-					if (result != null) {
-						counterReceived++;
-						//System.out.println("consuming .... JMSType = " + result.getJMSType() + " received = " + counterReceived);
-						LOG.info("consuming .... JMSType = " + result.getJMSType() + " received = " + counterReceived);
-					} else
-					{
-						LOG.info("consuming .... timeout while waiting for a message ... broker must have stopped delivery ...  received = " + counterReceived);
-						deliveryHalted = true;
-					}
-				}
-				session.close();
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-
-		}
-		
-		public int getCount()
-		{
-			return this.counterReceived;
-		}
-		
-		public boolean deliveryHalted()
-		{
-			return this.deliveryHalted;
-		}
-	}
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DispatchMultipleConsumersTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DispatchMultipleConsumersTest.java
deleted file mode 100644
index 98b0861..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DispatchMultipleConsumersTest.java
+++ /dev/null
@@ -1,235 +0,0 @@
-
-/**
- * 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.usecases;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * @author Rajani Chennamaneni
- *
- */
-public class DispatchMultipleConsumersTest extends TestCase {
-    private final static Logger logger = LoggerFactory.getLogger(DispatchMultipleConsumersTest.class);
-    BrokerService broker;
-    Destination dest;
-    String destinationName = "TEST.Q";
-    String msgStr = "Test text message";
-    int messagesPerThread = 20;
-    int producerThreads = 50;
-    int consumerCount = 2;
-    AtomicInteger sentCount;
-    AtomicInteger consumedCount;
-    CountDownLatch producerLatch;
-    CountDownLatch consumerLatch;
-    String brokerURL = "tcp://localhost:61616";
-    String userName = "";
-    String password = "";
-    
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        broker = new BrokerService();
-        broker.setPersistent(true);
-        broker.setUseJmx(true);
-        broker.deleteAllMessages();
-        broker.addConnector("tcp://localhost:61616");
-        broker.start();
-        dest = new ActiveMQQueue(destinationName);
-        resetCounters();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-//      broker.stop();
-        super.tearDown();
-    }
-    
-    private void resetCounters() {
-        sentCount = new AtomicInteger(0);
-        consumedCount = new AtomicInteger(0);
-        producerLatch = new CountDownLatch(producerThreads);
-        consumerLatch = new CountDownLatch(consumerCount);
-    }
-    
-    public void testDispatch1() {
-        for (int i = 1; i <= 5; i++) {
-            resetCounters();
-            dispatch();
-            /*try {
-                System.out.print("Press Enter to continue/finish:");
-                //pause to check the counts on JConsole
-                System.in.read();
-                System.in.read();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }*/
-            //check for consumed messages count
-            assertEquals("Incorrect messages in Iteration " + i, sentCount.get(), consumedCount.get());
-        }
-    }
-    
-    private void dispatch() {
-        startConsumers();
-        startProducers();
-        try {
-            producerLatch.await();
-            consumerLatch.await();
-        } catch (InterruptedException e) {
-            fail("test interrupted!");
-        }
-    }
-
-    private void startConsumers() {
-        ActiveMQConnectionFactory connFactory = new ActiveMQConnectionFactory(userName, password, brokerURL);
-        Connection conn;
-        try {
-            conn = connFactory.createConnection();
-            conn.start();
-            for (int i = 0; i < consumerCount; i++) {
-                new ConsumerThread(conn, "ConsumerThread"+i);
-            }
-        } catch (JMSException e) {
-            logger.error("Failed to start consumers", e);
-        }
-    }
-
-    private void startProducers() {
-        ActiveMQConnectionFactory connFactory = new ActiveMQConnectionFactory(userName, password, brokerURL);
-        for (int i = 0; i < producerThreads; i++) {
-            new ProducerThread(connFactory, messagesPerThread, "ProducerThread"+i);
-        }
-    }
-
-    private class ConsumerThread extends Thread {
-        Connection conn;
-        Session session;
-        MessageConsumer consumer;
-
-        public ConsumerThread(Connection conn, String name) {
-            super();
-            this.conn = conn;
-            this.setName(name);
-            logger.info("Created new consumer thread:" + name);
-            try {
-                session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                consumer = session.createConsumer(dest);
-                start();
-            } catch (JMSException e) {
-                logger.error("Failed to start consumer thread:" + name, e);
-            }
-        }
-
-        @Override
-        public void run() {
-            int msgCount = 0;
-            int nullCount = 0;
-            while (true) {
-                try {
-                    Message msg = consumer.receive(1000);
-                    if (msg == null) {
-                        if (producerLatch.getCount() > 0) {
-                            continue;
-                        }
-                        nullCount++;
-                        if (nullCount > 10) {
-                            //assume that we are not getting any more messages
-                            break;
-                        } else {
-                            continue;
-                        }
-                    } else {
-                        nullCount = 0;
-                    }
-                    Thread.sleep(100);
-                    logger.info("Message received:" + msg.getJMSMessageID());
-                    msgCount++;
-                } catch (JMSException e) {
-                    logger.error("Failed to consume:", e);                  
-                } catch (InterruptedException e) {
-                    logger.error("Interrupted!", e);    
-                }
-            }
-            try {
-                consumer.close();
-            } catch (JMSException e) {
-                logger.error("Failed to close consumer " + getName(), e);   
-            }
-            consumedCount.addAndGet(msgCount);
-            consumerLatch.countDown();
-            logger.info("Consumed " + msgCount + " messages using thread " + getName());
-        }
-        
-    }
-
-    private class ProducerThread extends Thread {
-        int count;
-        Connection conn;
-        Session session;
-        MessageProducer producer;
-                
-        public ProducerThread(ActiveMQConnectionFactory connFactory, int count, String name) {
-            super();
-            this.count = count;
-            this.setName(name);
-            logger.info("Created new producer thread:" + name);
-            try {
-                conn = connFactory.createConnection();
-                conn.start();
-                session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                producer = session.createProducer(dest);
-                start();
-            } catch (JMSException e) {
-                logger.error("Failed to start producer thread:" + name, e);
-            }
-        }
-
-        @Override
-        public void run() {
-            int i = 0;
-            try {
-                for (; i < count; i++) {
-                    producer.send(session.createTextMessage(msgStr));
-                    Thread.sleep(500);
-                }
-                conn.close();
-            } catch (JMSException e) {
-                logger.error(e.getMessage(), e);
-            } catch (InterruptedException e) {
-                logger.error("Interrupted!", e);    
-            }
-            sentCount.addAndGet(i);
-            producerLatch.countDown();
-            logger.info("Sent " + i + " messages from thread " + getName());
-        }
-    }
-        
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java
deleted file mode 100755
index ac7bd62..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.net.SocketFactory;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.tcp.TcpTransportFactory;
-import org.apache.activemq.util.URISupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DurableConsumerCloseAndReconnectTcpTest extends DurableConsumerCloseAndReconnectTest
-implements ExceptionListener, TransportListener {
-    private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerCloseAndReconnectTcpTest.class);
-    
-    private BrokerService broker;
-    private TransportConnector connector;
-
-    private CountDownLatch gotException = new CountDownLatch(1);
-
-    private Exception reconnectException;
-
-    private boolean reconnectInExceptionListener;
-
-    private boolean reconnectInTransportListener;
-    
-    public void setUp() throws Exception {
-        broker = new BrokerService();
-        // let the client initiate the inactivity timeout
-        connector = broker.addConnector("tcp://localhost:0?transport.useInactivityMonitor=false");
-        broker.setPersistent(false);
-        broker.start();
-        broker.waitUntilStarted();
-        
-        class SlowCloseSocketTcpTransportFactory extends TcpTransportFactory {
-
-            class SlowCloseSocketFactory extends SocketFactory {
-                
-                class SlowCloseSocket extends Socket {
-                    public SlowCloseSocket(String host, int port) throws IOException {
-                        super(host, port);
-                    }
-
-                    public SlowCloseSocket(InetAddress host, int port) throws IOException {
-                        super(host, port);
-                    }
-
-                    public SlowCloseSocket(String host, int port, InetAddress localHost, int localPort) throws IOException {
-                        super(host, port, localHost, localPort);
-                    }
-
-                    public SlowCloseSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
-                        super(address, port, localAddress, localPort);
-                    }
-
-                    @Override
-                    public synchronized void close() throws IOException {
-                        LOG.info("delaying close");
-                        try {
-                            TimeUnit.MILLISECONDS.sleep(500);
-                        } catch (InterruptedException e) {
-                            // TODO Auto-generated catch block
-                            e.printStackTrace();
-                        }
-                        super.close();
-                    }
-                    
-                    
-                }
-                @Override
-                public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
-                    return new SlowCloseSocket(host, port);
-                }
-
-                @Override
-                public Socket createSocket(InetAddress host, int port) throws IOException {
-                    return new SlowCloseSocket(host, port);
-                }
-
-                @Override
-                public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException,
-                        UnknownHostException {
-                    return new SlowCloseSocket(host, port, localHost, localPort);
-                }
-
-                @Override
-                public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
-                    return new SlowCloseSocket(address, port, localAddress, localPort);
-                }
-                
-            }
-            @Override
-            protected SocketFactory createSocketFactory() throws IOException {
-                return new SlowCloseSocketFactory();
-            }
-            
-        }
-        
-        TransportFactory.registerTransportFactory("tcp", new SlowCloseSocketTcpTransportFactory());
-        
-    }
-    
-    public void tearDown() throws Exception {
-        broker.stop();
-        broker.waitUntilStopped();
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory(URISupport.removeQuery(connector.getConnectUri()) + "?useKeepAlive=false&wireFormat.maxInactivityDuration=2000");
-    }
-
-    @Override
-    public void testCreateDurableConsumerCloseThenReconnect() throws Exception {
-        reconnectInExceptionListener = true;
-        makeConsumer();
-        connection.setExceptionListener(this);
-        ((ActiveMQConnection)connection).addTransportListener(this);
-        assertTrue("inactive connection timedout", gotException.await(30, TimeUnit.SECONDS));
-        assertNotNull("Got expected exception on close reconnect overlap: " + reconnectException, reconnectException);
-    }
-
-    
-    public void testCreateDurableConsumerSlowCloseThenReconnectTransportListener() throws Exception {
-        reconnectInTransportListener = true;
-        makeConsumer();
-        connection.setExceptionListener(this);
-        ((ActiveMQConnection)connection).addTransportListener(this);
-        assertTrue("inactive connection timedout", gotException.await(30, TimeUnit.SECONDS));
-        assertNull("No exception: " + reconnectException, reconnectException);
-    }
-    
-    public void onException(JMSException exception) {
-        LOG.info("Exception listener exception:" + exception);
-        if (reconnectInExceptionListener) {
-            try {
-                makeConsumer();
-            } catch (Exception e) {
-                reconnectException = e;
-            }
-        
-            gotException.countDown();
-        }
-    }
-
-    public void onCommand(Object command) {}
-
-    public void onException(IOException error) {
-       LOG.info("Transport listener exception:" + error);
-       if (reconnectInTransportListener) {
-           try {
-               TimeUnit.MILLISECONDS.sleep(500);
-               makeConsumer();
-           } catch (Exception e) {
-               reconnectException = e;
-           }
-       
-           gotException.countDown();
-       }
-    }
-
-    public void transportInterupted() {}
-
-    public void transportResumed() {}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java
deleted file mode 100755
index 41d1f05..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.test.TestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class DurableConsumerCloseAndReconnectTest extends TestSupport {
-    protected static final long RECEIVE_TIMEOUT = 5000L;
-    private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerCloseAndReconnectTest.class);
-
-    protected Connection connection;
-    private Session session;
-    private MessageConsumer consumer;
-    private MessageProducer producer;
-    private Destination destination;
-    private int messageCount;
-
-    
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        deleteAllMessages();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        deleteAllMessages();
-    }
-
-    private void deleteAllMessages() throws Exception {
-        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("vm://localhost?broker.deleteAllMessagesOnStartup=true");
-        Connection dummyConnection = fac.createConnection();
-        dummyConnection.start();
-        dummyConnection.close();
-    }
-    
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost?broker.deleteAllMessagesOnStartup=false");
-    }
-
-    public void testCreateDurableConsumerCloseThenReconnect() throws Exception {
-        // force the server to stay up across both connection tests
-        Connection dummyConnection = createConnection();
-        dummyConnection.start();
-
-        consumeMessagesDeliveredWhileConsumerClosed();
-
-        dummyConnection.close();
-
-        // now lets try again without one connection open
-        consumeMessagesDeliveredWhileConsumerClosed();       
-    }
-
-    protected void consumeMessagesDeliveredWhileConsumerClosed() throws Exception {
-        makeConsumer();
-        closeConsumer();
-
-        publish();
-
-        // wait a few moments for the close to really occur
-        Thread.sleep(1000);
-
-        makeConsumer();
-
-        Message message = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue("Should have received a message!", message != null);
-
-        closeConsumer();
-
-        LOG.info("Now lets create the consumer again and because we didn't ack, we should get it again");
-        makeConsumer();
-
-        message = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue("Should have received a message!", message != null);
-        message.acknowledge();
-
-        closeConsumer();
-
-        LOG.info("Now lets create the consumer again and because we did ack, we should not get it again");
-        makeConsumer();
-
-        message = consumer.receive(2000);
-        assertTrue("Should have no more messages left!", message == null);
-
-        closeConsumer();
-
-        LOG.info("Lets publish one more message now");
-        publish();
-
-        makeConsumer();
-        message = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue("Should have received a message!", message != null);
-        message.acknowledge();
-
-        closeConsumer();
-    }
-
-    protected void publish() throws Exception {
-        connection = createConnection();
-        connection.start();
-
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        destination = createDestination();
-
-        producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        TextMessage msg = session.createTextMessage("This is a test: " + messageCount++);
-        producer.send(msg);
-
-        producer.close();
-        producer = null;
-        closeSession();
-    }
-
-    protected Destination createDestination() throws JMSException {
-        if (isTopic()) {
-            return session.createTopic(getSubject());
-        } else {
-            return session.createQueue(getSubject());
-        }
-    }
-
-    protected boolean isTopic() {
-        return true;
-    }
-
-    protected void closeConsumer() throws JMSException {
-        consumer.close();
-        consumer = null;
-        closeSession();
-    }
-
-    protected void closeSession() throws JMSException {
-        session.close();
-        session = null;
-        connection.close();
-        connection = null;
-    }
-
-    protected void makeConsumer() throws Exception {
-        String durableName = getName();
-        String clientID = getSubject();
-        LOG.info("Creating a durable subscribe for clientID: " + clientID + " and durable name: " + durableName);
-        createSession(clientID);
-        consumer = createConsumer(durableName);
-    }
-
-    private MessageConsumer createConsumer(String durableName) throws JMSException {
-        if (destination instanceof Topic) {
-            return session.createDurableSubscriber((Topic)destination, durableName);
-        } else {
-            return session.createConsumer(destination);
-        }
-    }
-
-    protected void createSession(String clientID) throws Exception {
-        connection = createConnection();
-        connection.setClientID(clientID);
-        connection.start();
-
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        destination = createDestination();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java
deleted file mode 100644
index 65f9bfb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java
+++ /dev/null
@@ -1,678 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Test;
-
-import javax.jms.*;
-import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-// see https://issues.apache.org/activemq/browse/AMQ-2985
-// this demonstrated receiving old messages eventually along with validating order receipt
-public class DurableSubProcessTest extends org.apache.activemq.TestSupport  {
-    private static final Logger LOG = LoggerFactory.getLogger(DurableSubProcessTest.class);
-    public static final long RUNTIME = 4 * 60 * 1000;
-
-    public static final int SERVER_SLEEP = 2 * 1000; // max
-    public static final int CARGO_SIZE = 10; // max
-
-    public static final int MAX_CLIENTS = 7;
-    public static final Random CLIENT_LIFETIME = new Random(30 * 1000, 2 * 60 * 1000);
-    public static final Random CLIENT_ONLINE = new Random(2 * 1000, 15 * 1000);
-    public static final Random CLIENT_OFFLINE = new Random(1 * 1000, 20 * 1000);
-
-    public static final boolean PERSISTENT_BROKER = true;
-    public static final boolean ALLOW_SUBSCRIPTION_ABANDONMENT = true;
-
-
-    private BrokerService broker;
-    private ActiveMQTopic topic;
-
-    private ClientManager clientManager;
-    private Server server;
-    private HouseKeeper houseKeeper;
-
-    static final Vector<Throwable> exceptions = new Vector<Throwable>(); 
-
-    @Test
-    public void testProcess() {
-        try {
-            server.start();
-            clientManager.start();
-
-            if (ALLOW_SUBSCRIPTION_ABANDONMENT)
-                houseKeeper.start();
-
-            Thread.sleep(RUNTIME);
-            assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-        }
-        catch (Throwable e) {
-            exit("DurableSubProcessTest.testProcess failed.", e);
-        }
-        LOG.info("DONE.");
-    }
-
-    /**
-     * Creates batch of messages in a transaction periodically.
-     * The last message in the transaction is always a special
-     * message what contains info about the whole transaction.
-     * <p>Notifies the clients about the created messages also.
-     */
-    final class Server extends Thread {
-
-        final String url = "vm://" + DurableSubProcessTest.this.getName() + "?" +
-                "jms.redeliveryPolicy.maximumRedeliveries=2&jms.redeliveryPolicy.initialRedeliveryDelay=500&" +
-                "jms.producerWindowSize=20971520&jms.prefetchPolicy.all=100&" +
-                "jms.copyMessageOnSend=false&jms.disableTimeStampsByDefault=false&" +
-                "jms.alwaysSyncSend=true&jms.dispatchAsync=false&" +
-                "jms.watchTopicAdvisories=false&" +
-                "waitForStart=200&create=false";
-        final ConnectionFactory cf = new ActiveMQConnectionFactory(url);
-
-        final Object sendMutex = new Object();
-        final String[] cargos = new String[500];
-
-        int transRover = 0;
-        int messageRover = 0;
-
-        public Server() {
-            super("Server");
-            setDaemon(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-                while (true) {
-                    DurableSubProcessTest.sleepRandom(SERVER_SLEEP);
-                    send();
-                }
-            }
-            catch (Throwable e) {
-                exit("Server.run failed", e);
-            }
-        }
-
-        public void send() throws JMSException {
-            // do not create new clients now
-            // ToDo: Test this case later.
-            synchronized (sendMutex) {
-                int trans = ++transRover;
-                boolean relevantTrans = random(2) > 1;
-                ClientType clientType = relevantTrans ? ClientType.randomClientType() : null; // sends this types
-                int count = random(200);
-
-                LOG.info("Sending Trans[id=" + trans + ", count=" + count + ", clientType=" + clientType + "]");
-
-                Connection con = cf.createConnection();
-                Session sess = con.createSession(true, Session.AUTO_ACKNOWLEDGE);
-                MessageProducer prod = sess.createProducer(null);
-
-                for (int i = 0; i < count; i++) {
-                    Message message = sess.createMessage();
-                    message.setIntProperty("ID", ++messageRover);
-                    String type = clientType != null ? clientType.randomMessageType() : ClientType.randomNonRelevantMessageType();
-                    message.setStringProperty("TYPE", type);
-
-                    if (CARGO_SIZE > 0)
-                        message.setStringProperty("CARGO", getCargo(CARGO_SIZE));
-
-                    prod.send(topic, message);
-                    clientManager.onServerMessage(message);
-                }
-
-                Message message = sess.createMessage();
-                message.setIntProperty("ID", ++messageRover);
-                message.setIntProperty("TRANS", trans);
-                message.setBooleanProperty("COMMIT", true);
-                message.setBooleanProperty("RELEVANT", relevantTrans);
-                prod.send(topic, message);
-                clientManager.onServerMessage(message);
-
-                sess.commit();
-                sess.close();
-                con.close();
-            }
-        }
-
-        private String getCargo(int length) {
-            if (length == 0)
-                return null;
-
-            if (length < cargos.length) {
-                String result = cargos[length];
-                if (result == null) {
-                    result = getCargoImpl(length);
-                    cargos[length] = result;
-                }
-                return result;
-            }
-            return getCargoImpl(length);
-        }
-
-        private String getCargoImpl(int length) {
-            StringBuilder sb = new StringBuilder(length);
-            for (int i = length; --i >=0; ) {
-                sb.append('a');
-            }
-            return sb.toString();
-        }
-    }
-
-    /**
-     * Clients listen on different messages in the topic.
-     * The 'TYPE' property helps the client to select the
-     * proper messages.
-     */
-    private enum ClientType {
-        A ("a", "b", "c"),
-        B ("c", "d", "e"),
-        C ("d", "e", "f"),
-        D ("g", "h");
-
-        public final String[] messageTypes;
-        public final HashSet<String> messageTypeSet;
-        public final String selector;
-
-        ClientType(String... messageTypes) {
-            this.messageTypes = messageTypes;
-            messageTypeSet = new HashSet<String>(Arrays.asList(messageTypes));
-
-            StringBuilder sb = new StringBuilder("TYPE in (");
-            for (int i = 0; i < messageTypes.length; i++) {
-                if (i > 0)
-                    sb.append(", ");
-                sb.append('\'').append(messageTypes[i]).append('\'');
-            }
-            sb.append(')');
-            selector = sb.toString();
-        }
-
-        public static ClientType randomClientType() {
-            return values()[DurableSubProcessTest.random(values().length - 1)];
-        }
-
-        public final String randomMessageType() {
-            return messageTypes[DurableSubProcessTest.random(messageTypes.length - 1)];
-        }
-
-        public static String randomNonRelevantMessageType() {
-            return Integer.toString(DurableSubProcessTest.random(20));
-        }
-
-        public final boolean isRelevant(String messageType) {
-            return messageTypeSet.contains(messageType);
-        }
-
-        @Override
-        public final String toString() {
-            return this.name() /*+ '[' + selector + ']'*/;
-        }
-    }
-
-    /**
-     * Creates new cliens.
-     */
-    private final class ClientManager extends Thread {
-
-        private int clientRover = 0;
-
-        private final CopyOnWriteArrayList<Client> clients = new CopyOnWriteArrayList<Client>();
-
-        public ClientManager() {
-            super("ClientManager");
-            setDaemon(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-                while (true) {
-                    if (clients.size() < MAX_CLIENTS)
-                        createNewClient();
-
-                    int size = clients.size();
-                    sleepRandom(size * 3 * 1000, size * 6 * 1000);
-                }
-            }
-            catch (Throwable e) {
-                exit("ClientManager.run failed.", e);
-            }
-        }
-
-        private void createNewClient() throws JMSException {
-            ClientType type = ClientType.randomClientType();
-
-            Client client;
-            synchronized (server.sendMutex) {
-                client = new Client(++clientRover, type, CLIENT_LIFETIME, CLIENT_ONLINE, CLIENT_OFFLINE);
-                clients.add(client);
-            }
-            client.start();
-
-            LOG.info(client.toString() + " created. " + this);
-        }
-
-        public void removeClient(Client client) {
-            clients.remove(client);
-        }
-
-        public void onServerMessage(Message message) throws JMSException {
-            for (Client client: clients) {
-                client.onServerMessage(message);
-            }
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder("ClientManager[count=");
-            sb.append(clients.size());
-            sb.append(", clients=");
-            boolean sep = false;
-            for (Client client: clients) {
-                if (sep) sb.append(", ");
-                else sep = true;
-                sb.append(client.toString());
-            }
-            sb.append(']');
-            return sb.toString();
-        }
-    }
-
-    /**
-     * Consumes massages from a durable subscription.
-     * Goes online/offline periodically. Checks the incoming messages
-     * against the sent messages of the server.
-     */
-    private final class Client extends Thread {
-
-        String url = "failover:(tcp://localhost:61656?wireFormat.maxInactivityDuration=0)?" +
-                "jms.watchTopicAdvisories=false&" +
-                "jms.alwaysSyncSend=true&jms.dispatchAsync=true&" +
-                "jms.producerWindowSize=20971520&" +
-                "jms.copyMessageOnSend=false&" +
-                "initialReconnectDelay=100&maxReconnectDelay=30000&maxReconnectAttempts=0&" +
-                "useExponentialBackOff=true";
-        final ConnectionFactory cf = new ActiveMQConnectionFactory(url);
-
-        public static final String SUBSCRIPTION_NAME = "subscription";
-
-        private final int id;
-        private final String conClientId;
-
-        private final Random lifetime;
-        private final Random online;
-        private final Random offline;
-
-        private final ClientType clientType;
-        private final String selector;
-
-        private final ConcurrentLinkedQueue<Message> waitingList = new ConcurrentLinkedQueue<Message>();
-
-        public Client(int id, ClientType clientType, Random lifetime, Random online, Random offline) throws JMSException {
-            super("Client" + id);
-            setDaemon(true);
-
-            this.id = id;
-            conClientId = "cli" + id;
-            this.clientType = clientType;
-            selector = "(COMMIT = true and RELEVANT = true) or " + clientType.selector;
-
-            this.lifetime = lifetime;
-            this.online = online;
-            this.offline = offline;
-
-            subscribe();
-        }
-
-        @Override
-        public void run() {
-            long end = System.currentTimeMillis() + lifetime.next();
-            try {
-                boolean sleep = false;
-                while (true) {
-                    long max = end - System.currentTimeMillis();
-                    if (max <= 0)
-                        break;
-
-                    if (sleep) offline.sleepRandom();
-                    else sleep = true;
-
-                    process(online.next());
-                }
-
-                if (!ALLOW_SUBSCRIPTION_ABANDONMENT || random(1) > 0)
-                    unsubscribe();
-                else {
-                    LOG.info("Client abandon the subscription. " + this);
-
-                    // housekeeper should sweep these abandoned subscriptions
-                    houseKeeper.abandonedSubscriptions.add(conClientId);
-                }
-            }
-            catch (Throwable e) {
-                exit(toString() + " failed.", e);
-            }
-
-            clientManager.removeClient(this);
-            LOG.info(toString() + " DONE.");
-        }
-
-        private void process(long millis) throws JMSException {
-            long end = System.currentTimeMillis() + millis;
-            long hardEnd = end + 2000; // wait to finish the transaction.
-            boolean inTransaction = false;
-            int transCount = 0;
-
-            LOG.info(toString() + " ONLINE.");
-            Connection con = openConnection();
-            Session sess = con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-            MessageConsumer consumer = sess.createDurableSubscriber(topic, SUBSCRIPTION_NAME, selector, false);
-            try {
-                do {
-                    long max = end - System.currentTimeMillis();
-                    if (max <= 0) {
-                        if (!inTransaction)
-                            break;
-
-                        max = hardEnd - System.currentTimeMillis();
-                        if (max <= 0)
-                            exit("" + this + " failed: Transaction is not finished.");
-                    }
-
-                    Message message = consumer.receive(max);
-                    if (message == null)
-                        continue;
-
-                    onClientMessage(message);
-
-                    if (message.propertyExists("COMMIT")) {
-                        message.acknowledge();
-
-                        LOG.info("Received Trans[id=" + message.getIntProperty("TRANS") + ", count=" + transCount + "] in " + this + ".");
-
-                        inTransaction = false;
-                        transCount = 0;
-                    }
-                    else {
-                        inTransaction = true;
-                        transCount++;
-                    }
-                } while (true);
-            }
-            finally {
-                sess.close();
-                con.close();
-
-                LOG.info(toString() + " OFFLINE.");
-
-                // Check if the messages are in the waiting
-                // list for long time.
-                Message topMessage = waitingList.peek();
-                if (topMessage != null)
-                    checkDeliveryTime(topMessage);
-            }
-        }
-
-        public void onServerMessage(Message message) throws JMSException {
-            if (Boolean.TRUE.equals(message.getObjectProperty("COMMIT"))) {
-                if (Boolean.TRUE.equals(message.getObjectProperty("RELEVANT")))
-                    waitingList.add(message);
-            }
-            else {
-                String messageType = message.getStringProperty("TYPE");
-                if (clientType.isRelevant(messageType))
-                    waitingList.add(message);
-            }
-        }
-
-        public void onClientMessage(Message message) {
-            Message serverMessage = waitingList.poll();
-            try {
-                if (serverMessage == null)
-                    exit("" + this + " failed: There is no next server message, but received: " + message);
-
-                Integer receivedId = (Integer) message.getObjectProperty("ID");
-                Integer serverId = (Integer) serverMessage.getObjectProperty("ID");
-                if (receivedId == null || serverId == null)
-                    exit("" + this + " failed: message ID not found.\r\n" +
-                            " received: " + message + "\r\n" +
-                            "   server: " + serverMessage);
-
-                if (!serverId.equals(receivedId))
-                    exit("" + this + " failed: Received wrong message.\r\n" +
-                            " received: " + message + "\r\n" +
-                            "   server: " + serverMessage);
-
-                checkDeliveryTime(message);
-            }
-            catch (Throwable e) {
-                exit("" + this + ".onClientMessage failed.\r\n" +
-                        " received: " + message + "\r\n" +
-                        "   server: " + serverMessage, e);
-            }
-        }
-
-        /**
-         * Checks if the message was not delivered fast enough.
-         */
-        public void checkDeliveryTime(Message message) throws JMSException {
-            long creation = message.getJMSTimestamp();
-            long min = System.currentTimeMillis() - (offline.max + online.min);
-
-            if (min > creation) {
-                SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss.SSS");
-                exit("" + this + ".checkDeliveryTime failed. Message time: " + df.format(new Date(creation)) + ", min: " + df.format(new Date(min)) + "\r\n" + message);
-            }
-        }
-
-        private Connection openConnection() throws JMSException {
-            Connection con = cf.createConnection();
-            con.setClientID(conClientId);
-            con.start();
-            return con;
-        }
-
-        private void subscribe() throws JMSException {
-            Connection con = openConnection();
-            Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            session.createDurableSubscriber(topic, SUBSCRIPTION_NAME, selector, true);
-            session.close();
-            con.close();
-        }
-
-        private void unsubscribe() throws JMSException {
-            Connection con = openConnection();
-            Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            session.unsubscribe(SUBSCRIPTION_NAME);
-            session.close();
-            con.close();
-        }
-
-        @Override
-        public String toString() {
-            return "Client[id=" + id + ", type=" + clientType + "]";
-        }
-    }
-
-    /**
-     * Sweeps out not-used durable subscriptions.
-     */
-    private final class HouseKeeper extends Thread {
-
-        private HouseKeeper() {
-            super("HouseKeeper");
-            setDaemon(true);
-        }
-
-        public final CopyOnWriteArrayList<String> abandonedSubscriptions = new CopyOnWriteArrayList<String>();
-
-        @Override
-        public void run() {
-            while (true) {
-                try {
-                    Thread.sleep(60 * 1000);
-                    sweep();
-                }
-                catch (InterruptedException ex) {
-                    break;
-                }
-                catch (Throwable e) {
-                    Exception log = new Exception("HouseKeeper failed.", e);
-                    log.printStackTrace();
-                }
-            }
-        }
-
-        private void sweep() throws Exception {
-            LOG.info("Housekeeper sweeping.");
-
-            int closed = 0;
-            ArrayList<String> sweeped = new ArrayList<String>();
-            try {
-                for (String clientId: abandonedSubscriptions) {
-                    sweeped.add(clientId);
-                    LOG.info("Sweeping out subscription of " + clientId + ".");
-                    broker.getAdminView().destroyDurableSubscriber(clientId, Client.SUBSCRIPTION_NAME);
-                    closed++;
-                }
-            }
-            finally {
-                abandonedSubscriptions.removeAll(sweeped);
-            }
-
-            LOG.info("Housekeeper sweeped out " + closed + " subscriptions.");
-        }
-    }
-
-    public static int random(int max) {
-        return (int) (Math.random() * (max + 1));
-    }
-
-    public static int random(int min, int max) {
-        return random(max - min) + min;
-    }
-
-    public static void sleepRandom(int maxMillis) throws InterruptedException {
-        Thread.sleep(random(maxMillis));
-    }
-
-    public static void sleepRandom(int minMillis, int maxMillis) throws InterruptedException {
-        Thread.sleep(random(minMillis, maxMillis));
-    }
-
-    public static final class Random {
-
-        final int min;
-        final int max;
-
-        Random(int min, int max) {
-            this.min = min;
-            this.max = max;
-        }
-
-        public int next() {
-            return random(min, max);
-        }
-
-        public void sleepRandom() throws InterruptedException {
-            DurableSubProcessTest.sleepRandom(min, max);
-        }
-    }
-
-    public static void exit(String message) {
-        exit(message, null);
-    }
-
-    public static void exit(String message, Throwable e) {
-        Throwable log = new RuntimeException(message, e);
-        log.printStackTrace();
-        LOG.error(message, e);
-        exceptions.add(e);
-        fail(message);
-    }
-
-    protected void setUp() throws Exception {
-        topic = (ActiveMQTopic) createDestination();
-        startBroker();
-
-        clientManager = new ClientManager();
-        server = new Server();
-        houseKeeper = new HouseKeeper();
-
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        destroyBroker();
-    }
-
-    private void startBroker() throws Exception {
-        startBroker(true);
-    }
-
-    private void startBroker(boolean deleteAllMessages) throws Exception {
-        if (broker != null)
-            return;
-
-        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
-        broker.setBrokerName(getName());
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessages);
-
-        if (PERSISTENT_BROKER) {
-            broker.setPersistent(true);
-            KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter();
-            persistenceAdapter.setDirectory(new File("activemq-data/" + getName()));
-            broker.setPersistenceAdapter(persistenceAdapter);
-        }
-        else
-            broker.setPersistent(false);
-
-        broker.addConnector("tcp://localhost:61656");
-
-        broker.getSystemUsage().getMemoryUsage().setLimit(256 * 1024 * 1024);
-        broker.getSystemUsage().getTempUsage().setLimit(256 * 1024 * 1024);
-        broker.getSystemUsage().getStoreUsage().setLimit(256 * 1024 * 1024);
-
-        broker.start();
-    }
-
-    private void destroyBroker() throws Exception {
-        if (broker == null)
-            return;
-
-        broker.stop();
-        broker = null;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessWithRestartTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessWithRestartTest.java
deleted file mode 100644
index 8cdf327..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubProcessWithRestartTest.java
+++ /dev/null
@@ -1,846 +0,0 @@
-/**
- * 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 ONDITIONS 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.usecases;
-
-import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-public class DurableSubProcessWithRestartTest {
-    private static final Logger LOG = LoggerFactory.getLogger(DurableSubProcessWithRestartTest.class);
-    public static final long RUNTIME = 5 * 60 * 1000;
-
-    public static final int SERVER_SLEEP = 2 * 1000; // max
-    public static final int CARGO_SIZE = 400; // max
-
-    public static final int MAX_CLIENTS = 5;
-    public static final Random CLIENT_LIFETIME = new Random(5 * 1000,
-            2 * 5 * 1000);
-    public static final Random CLIENT_ONLINE = new Random(2 * 1000, 2 * 1000);
-    public static final Random CLIENT_OFFLINE = new Random(10 * 1000, 10 * 1000);
-
-    public static final Persistence PERSISTENT_ADAPTER = Persistence.KAHADB;
-    public static final long BROKER_RESTART = 1 * 10 * 1000;
-
-    public static final boolean ALLOW_SUBSCRIPTION_ABANDONMENT = true;
-    public static final boolean CHECK_REDELIVERY = true;
-
-    private BrokerService broker;
-    private ActiveMQTopic topic;
-
-    private ClientManager clientManager;
-    private Server server;
-    private HouseKeeper houseKeeper;
-
-    private final ReentrantReadWriteLock processLock = new ReentrantReadWriteLock(
-            true);
-    private int restartCount = 0;
-    static final Vector<Throwable> exceptions = new Vector<Throwable>();
-
-    // this is a nice test but it takes 5mins, may be handy in the future
-    // resulting bug https://issues.apache.org/jira/browse/AMQ-3190
-    @Ignore("covered by org.apache.activemq.usecases.DurableSubscriptionOfflineTest.testNoMissOnMatchingSubAfterRestart()") @Test
-    public void testProcess() {
-        try {
-            server.start();
-            clientManager.start();
-
-            if (ALLOW_SUBSCRIPTION_ABANDONMENT)
-                houseKeeper.start();
-
-            if (BROKER_RESTART <= 0)
-                Thread.sleep(RUNTIME);
-            else {
-                long end = System.currentTimeMillis() + RUNTIME;
-
-                while (true) {
-                    long now = System.currentTimeMillis();
-                    if (now > end)
-                        break;
-
-                    now = end - now;
-                    now = now < BROKER_RESTART ? now : BROKER_RESTART;
-                    Thread.sleep(now);
-
-                    restartBroker();
-                }
-            }
-        } catch (Throwable e) {
-            exit("ProcessTest.testProcess failed.", e);
-        }
-
-        processLock.writeLock().lock();
-        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-        LOG.info("DONE.");
-    }
-
-    private void restartBroker() throws Exception {
-        LOG.info("Broker restart: waiting for components.");
-
-        processLock.writeLock().lock();
-        try {
-            destroyBroker();
-            startBroker(false);
-
-            restartCount++;
-            LOG.info("Broker restarted. count: " + restartCount);
-        } finally {
-            processLock.writeLock().unlock();
-        }
-    }
-
-    /**
-     * Creates batch of messages in a transaction periodically. The last message
-     * in the transaction is always a special message what contains info about
-     * the whole transaction.
-     * <p>
-     * Notifies the clients about the created messages also.
-     */
-    final class Server extends Thread {
-
-        final String url = "vm://"
-                + DurableSubProcessWithRestartTest.getName()
-                + "?"
-                + "jms.redeliveryPolicy.maximumRedeliveries=2&jms.redeliveryPolicy.initialRedeliveryDelay=500&"
-                + "jms.producerWindowSize=20971520&jms.prefetchPolicy.all=100&"
-                + "jms.copyMessageOnSend=false&jms.disableTimeStampsByDefault=false&"
-                + "jms.alwaysSyncSend=true&jms.dispatchAsync=false&"
-                + "jms.watchTopicAdvisories=false&"
-                + "waitForStart=200&create=false";
-        final ConnectionFactory cf = new ActiveMQConnectionFactory(url);
-
-        final Object sendMutex = new Object();
-        final String[] cargos = new String[500];
-
-        int transRover = 0;
-        int messageRover = 0;
-
-        public Server() {
-            super("Server");
-            setDaemon(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-                while (true) {
-                    DurableSubProcessWithRestartTest.sleepRandom(SERVER_SLEEP);
-
-                    processLock.readLock().lock();
-                    try {
-                        send();
-                    } finally {
-                        processLock.readLock().unlock();
-                    }
-                }
-            } catch (Throwable e) {
-                exit("Server.run failed", e);
-            }
-        }
-
-        public void send() throws JMSException {
-            // do not create new clients now
-            // ToDo: Test this case later.
-            synchronized (sendMutex) {
-                int trans = ++transRover;
-                boolean relevantTrans = random(2) > 1;
-                ClientType clientType = relevantTrans ? ClientType
-                        .randomClientType() : null; // sends this types
-                int count = random(200);
-
-                LOG.info("Sending Trans[id=" + trans + ", count="
-                        + count + ", clientType=" + clientType + "]");
-
-                Connection con = cf.createConnection();
-                Session sess = con
-                        .createSession(true, Session.SESSION_TRANSACTED);
-                MessageProducer prod = sess.createProducer(null);
-
-                for (int i = 0; i < count; i++) {
-                    Message message = sess.createMessage();
-                    message.setIntProperty("ID", ++messageRover);
-                    message.setIntProperty("TRANS", trans);
-                    String type = clientType != null ? clientType
-                            .randomMessageType() : ClientType
-                            .randomNonRelevantMessageType();
-                    message.setStringProperty("TYPE", type);
-
-                    if (CARGO_SIZE > 0)
-                        message.setStringProperty("CARGO",
-                                getCargo(random(CARGO_SIZE)));
-
-                    prod.send(topic, message);
-                    clientManager.onServerMessage(message);
-                }
-
-                Message message = sess.createMessage();
-                message.setIntProperty("ID", ++messageRover);
-                message.setIntProperty("TRANS", trans);
-                message.setBooleanProperty("COMMIT", true);
-                message.setBooleanProperty("RELEVANT", relevantTrans);
-                prod.send(topic, message);
-                clientManager.onServerMessage(message);
-
-                sess.commit();
-                LOG.info("Committed Trans[id=" + trans + ", count="
-                        + count + ", clientType=" + clientType + "], ID=" + messageRover);
-
-                sess.close();
-                con.close();
-            }
-        }
-
-        private String getCargo(int length) {
-            if (length == 0)
-                return null;
-
-            if (length < cargos.length) {
-                String result = cargos[length];
-                if (result == null) {
-                    result = getCargoImpl(length);
-                    cargos[length] = result;
-                }
-                return result;
-            }
-            return getCargoImpl(length);
-        }
-
-        private String getCargoImpl(int length) {
-            StringBuilder sb = new StringBuilder(length);
-            for (int i = length; --i >= 0;) {
-                sb.append('a');
-            }
-            return sb.toString();
-        }
-    }
-
-    /**
-     * Clients listen on different messages in the topic. The 'TYPE' property
-     * helps the client to select the proper messages.
-     */
-    private enum ClientType {
-        A("a", "b", "c"), B("c", "d", "e"), C("d", "e", "f"), D("g", "h");
-
-        public final String[] messageTypes;
-        public final HashSet<String> messageTypeSet;
-        public final String selector;
-
-        ClientType(String... messageTypes) {
-            this.messageTypes = messageTypes;
-            messageTypeSet = new HashSet<String>(Arrays.asList(messageTypes));
-
-            StringBuilder sb = new StringBuilder("TYPE in (");
-            for (int i = 0; i < messageTypes.length; i++) {
-                if (i > 0)
-                    sb.append(", ");
-                sb.append('\'').append(messageTypes[i]).append('\'');
-            }
-            sb.append(')');
-            selector = sb.toString();
-        }
-
-        public static ClientType randomClientType() {
-            return values()[DurableSubProcessWithRestartTest
-                    .random(values().length - 1)];
-        }
-
-        public final String randomMessageType() {
-            return messageTypes[DurableSubProcessWithRestartTest
-                    .random(messageTypes.length - 1)];
-        }
-
-        public static String randomNonRelevantMessageType() {
-            return Integer
-                    .toString(DurableSubProcessWithRestartTest.random(20));
-        }
-
-        public final boolean isRelevant(String messageType) {
-            return messageTypeSet.contains(messageType);
-        }
-
-        @Override
-        public final String toString() {
-            return this.name() /* + '[' + selector + ']' */;
-        }
-    }
-
-    /**
-     * Creates new cliens.
-     */
-    private final class ClientManager extends Thread {
-
-        private int clientRover = 0;
-
-        private final CopyOnWriteArrayList<Client> clients = new CopyOnWriteArrayList<Client>();
-
-        public ClientManager() {
-            super("ClientManager");
-            setDaemon(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-                while (true) {
-                    if (clients.size() < MAX_CLIENTS) {
-                        processLock.readLock().lock();
-                        try {
-                            createNewClient();
-                        } finally {
-                            processLock.readLock().unlock();
-                        }
-                    }
-
-                    int size = clients.size();
-                    sleepRandom(size * 3 * 1000, size * 6 * 1000);
-                }
-            } catch (Throwable e) {
-                exit("ClientManager.run failed.", e);
-            }
-        }
-
-        private void createNewClient() throws JMSException {
-            ClientType type = ClientType.randomClientType();
-
-            Client client;
-            synchronized (server.sendMutex) {
-                client = new Client(++clientRover, type, CLIENT_LIFETIME,
-                        CLIENT_ONLINE, CLIENT_OFFLINE);
-                clients.add(client);
-            }
-            client.start();
-
-            LOG.info(client.toString() + " created. " + this);
-        }
-
-        public void removeClient(Client client) {
-            clients.remove(client);
-        }
-
-        public void onServerMessage(Message message) throws JMSException {
-            for (Client client : clients) {
-                client.onServerMessage(message);
-            }
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder("ClientManager[count=");
-            sb.append(clients.size());
-            sb.append(", clients=");
-            boolean sep = false;
-            for (Client client : clients) {
-                if (sep)
-                    sb.append(", ");
-                else
-                    sep = true;
-                sb.append(client.toString());
-            }
-            sb.append(']');
-            return sb.toString();
-        }
-    }
-
-    /**
-     * Consumes massages from a durable subscription. Goes online/offline
-     * periodically. Checks the incoming messages against the sent messages of
-     * the server.
-     */
-    private final class Client extends Thread {
-
-        String url = "failover:(tcp://localhost:61656?wireFormat.maxInactivityDuration=0)?"
-                + "jms.watchTopicAdvisories=false&"
-                + "jms.alwaysSyncSend=true&jms.dispatchAsync=true&"
-                + "jms.producerWindowSize=20971520&"
-                + "jms.copyMessageOnSend=false&"
-                + "initialReconnectDelay=100&maxReconnectDelay=30000&maxReconnectAttempts=0&"
-                + "useExponentialBackOff=true";
-        final ConnectionFactory cf = new ActiveMQConnectionFactory(url);
-
-        public static final String SUBSCRIPTION_NAME = "subscription";
-
-        private final int id;
-        private final String conClientId;
-
-        private final Random lifetime;
-        private final Random online;
-        private final Random offline;
-
-        private final ClientType clientType;
-        private final String selector;
-
-        private final ConcurrentLinkedQueue<Message> waitingList = new ConcurrentLinkedQueue<Message>();
-        private final HashSet<Integer> processed = CHECK_REDELIVERY ? new HashSet<Integer>(
-                10000) : null;
-
-        public Client(int id, ClientType clientType, Random lifetime,
-                Random online, Random offline) throws JMSException {
-            super("Client" + id);
-            setDaemon(true);
-
-            this.id = id;
-            conClientId = "cli" + id;
-            this.clientType = clientType;
-            selector = "(COMMIT = true and RELEVANT = true) or "
-                    + clientType.selector;
-
-            this.lifetime = lifetime;
-            this.online = online;
-            this.offline = offline;
-
-            subscribe();
-        }
-
-        @Override
-        public void run() {
-            long end = System.currentTimeMillis() + lifetime.next();
-            try {
-                boolean sleep = false;
-                while (true) {
-                    long max = end - System.currentTimeMillis();
-                    if (max <= 0)
-                        break;
-
-                    if (sleep)
-                        offline.sleepRandom();
-                    else
-                        sleep = true;
-
-                    processLock.readLock().lock();
-                    try {
-                        process(online.next());
-                    } finally {
-                        processLock.readLock().unlock();
-                    }
-                }
-
-                if (!ALLOW_SUBSCRIPTION_ABANDONMENT || random(1) > 0)
-                    unsubscribe();
-                else {
-                    LOG.info("Client abandon the subscription. "
-                            + this);
-
-                    // housekeeper should sweep these abandoned subscriptions
-                    houseKeeper.abandonedSubscriptions.add(conClientId);
-                }
-            } catch (Throwable e) {
-                exit(toString() + " failed.", e);
-            }
-
-            clientManager.removeClient(this);
-            LOG.info(toString() + " DONE.");
-        }
-
-        private void process(long millis) throws JMSException {
-            long end = System.currentTimeMillis() + millis;
-            long hardEnd = end + 20000; // wait to finish the transaction.
-            boolean inTransaction = false;
-            int transCount = 0;
-
-            LOG.info(toString() + " ONLINE.");
-            Connection con = openConnection();
-            Session sess = con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-            MessageConsumer consumer = sess.createDurableSubscriber(topic,
-                    SUBSCRIPTION_NAME, selector, false);
-            try {
-                do {
-                    long max = end - System.currentTimeMillis();
-                    if (max <= 0) {
-                        if (!inTransaction)
-                            break;
-
-                        max = hardEnd - System.currentTimeMillis();
-                        if (max <= 0)
-                            exit("" + this
-                                    + " failed: Transaction is not finished.");
-                    }
-
-                    Message message = consumer.receive(max);
-                    if (message == null)
-                        continue;
-
-                    onClientMessage(message);
-
-                    if (message.propertyExists("COMMIT")) {
-                        message.acknowledge(); // CLIENT_ACKNOWLEDGE
-
-                        LOG.info("Received Trans[id="
-                                + message.getIntProperty("TRANS") + ", count="
-                                + transCount + "] in " + this + ".");
-
-                        inTransaction = false;
-                        transCount = 0;
-                    } else {
-                        inTransaction = true;
-                        transCount++;
-                    }
-                } while (true);
-            } finally {
-                sess.close();
-                con.close();
-
-                LOG.info(toString() + " OFFLINE.");
-
-                // Check if the messages are in the waiting
-                // list for long time.
-                Message topMessage = waitingList.peek();
-                if (topMessage != null)
-                    checkDeliveryTime(topMessage);
-            }
-        }
-
-        public void onServerMessage(Message message) throws JMSException {
-            if (Boolean.TRUE.equals(message.getObjectProperty("COMMIT"))) {
-                if (Boolean.TRUE.equals(message.getObjectProperty("RELEVANT")))
-                    waitingList.add(message);
-            } else {
-                String messageType = message.getStringProperty("TYPE");
-                if (clientType.isRelevant(messageType))
-                    waitingList.add(message);
-            }
-        }
-
-        public void onClientMessage(Message message) {
-            Message serverMessage = waitingList.poll();
-            try {
-                Integer receivedId = (Integer) message.getObjectProperty("ID");
-                if (processed != null && processed.contains(receivedId))
-                    LOG.info("! Message has been processed before. "
-                            + this + " message = " + message);
-
-                if (serverMessage == null)
-                    exit(""
-                            + this
-                            + " failed: There is no next server message, but received: "
-                            + message);
-
-                Integer serverId = (Integer) serverMessage
-                        .getObjectProperty("ID");
-                if (receivedId == null || serverId == null)
-                    exit("" + this + " failed: message ID not found.\r\n"
-                            + " received: " + message + "\r\n" + "   server: "
-                            + serverMessage);
-
-                if (!serverId.equals(receivedId)) {
-                    String detail = processed != null ?
-                        Arrays.toString(processed.toArray()) + "\n"
-                        : "";
-                    exit(detail + this + " failed: Received wrong message.\r\n"
-                            + " received: " + message + "\r\n" + "   server: "
-                            + serverMessage);
-                }
-
-                checkDeliveryTime(message);
-
-                if (processed != null)
-                    processed.add(receivedId);
-            } catch (Throwable e) {
-                exit("" + this + ".onClientMessage failed.\r\n" + " received: "
-                        + message + "\r\n" + "   server: " + serverMessage, e);
-            }
-        }
-
-        /**
-         * Checks if the message was not delivered fast enough.
-         */
-        public void checkDeliveryTime(Message message) throws JMSException {
-            long creation = message.getJMSTimestamp();
-            long min = System.currentTimeMillis() - (offline.max + online.min)
-                    * (BROKER_RESTART > 0 ? 4 : 1);
-
-            if (false && min > creation) {
-                SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss.SSS");
-                exit("" + this + ".checkDeliveryTime failed. Message time: "
-                        + df.format(new Date(creation)) + ", min: "
-                        + df.format(new Date(min)) + "\r\n" + message);
-            }
-        }
-
-        private Connection openConnection() throws JMSException {
-            Connection con = cf.createConnection();
-            con.setClientID(conClientId);
-            con.start();
-            return con;
-        }
-
-        private void subscribe() throws JMSException {
-            Connection con = openConnection();
-            Session session = con
-                    .createSession(false, Session.AUTO_ACKNOWLEDGE);
-            session.createDurableSubscriber(topic, SUBSCRIPTION_NAME, selector,
-                    true);
-            session.close();
-            con.close();
-        }
-
-        private void unsubscribe() throws JMSException {
-            Connection con = openConnection();
-            Session session = con
-                    .createSession(false, Session.AUTO_ACKNOWLEDGE);
-            session.unsubscribe(SUBSCRIPTION_NAME);
-            session.close();
-            con.close();
-        }
-
-        @Override
-        public String toString() {
-            return "Client[id=" + id + ", type=" + clientType + "]";
-        }
-    }
-
-    /**
-     * Sweeps out not-used durable subscriptions.
-     */
-    private final class HouseKeeper extends Thread {
-
-        private HouseKeeper() {
-            super("HouseKeeper");
-            setDaemon(true);
-        }
-
-        public final CopyOnWriteArrayList<String> abandonedSubscriptions = new CopyOnWriteArrayList<String>();
-
-        @Override
-        public void run() {
-            while (true) {
-                try {
-                    Thread.sleep(3 * 60 * 1000);
-
-                    processLock.readLock().lock();
-                    try {
-                        sweep();
-                    } finally {
-                        processLock.readLock().unlock();
-                    }
-                } catch (InterruptedException ex) {
-                    break;
-                } catch (Throwable e) {
-                    Exception log = new Exception("HouseKeeper failed.", e);
-                    log.printStackTrace();
-                }
-            }
-        }
-
-        private void sweep() throws Exception {
-            LOG.info("Housekeeper sweeping.");
-
-            int closed = 0;
-            ArrayList<String> sweeped = new ArrayList<String>();
-            try {
-                for (String clientId : abandonedSubscriptions) {
-                    LOG.info("Sweeping out subscription of "
-                            + clientId + ".");
-                    broker.getAdminView().destroyDurableSubscriber(clientId,
-                            Client.SUBSCRIPTION_NAME);
-                    sweeped.add(clientId);
-                    closed++;
-                }
-            } catch (Exception ignored) {
-                LOG.info("Ex on destroy sub " + ignored);
-            } finally {
-                abandonedSubscriptions.removeAll(sweeped);
-            }
-
-            LOG.info("Housekeeper sweeped out " + closed
-                    + " subscriptions.");
-        }
-    }
-
-    public static int random(int max) {
-        return (int) (Math.random() * (max + 1));
-    }
-
-    public static int random(int min, int max) {
-        return random(max - min) + min;
-    }
-
-    public static void sleepRandom(int maxMillis) throws InterruptedException {
-        Thread.sleep(random(maxMillis));
-    }
-
-    public static void sleepRandom(int minMillis, int maxMillis)
-            throws InterruptedException {
-        Thread.sleep(random(minMillis, maxMillis));
-    }
-
-    public static final class Random {
-
-        final int min;
-        final int max;
-
-        Random(int min, int max) {
-            this.min = min;
-            this.max = max;
-        }
-
-        public int next() {
-            return random(min, max);
-        }
-
-        public void sleepRandom() throws InterruptedException {
-            DurableSubProcessWithRestartTest.sleepRandom(min, max);
-        }
-    }
-
-    public static void exit(String message) {
-        exit(message, null);
-    }
-
-    public static void exit(String message, Throwable e) {
-        Throwable cause = new RuntimeException(message, e);
-        LOG.error(message, cause);
-        exceptions.add(cause);
-        fail(cause.toString());
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        topic = new ActiveMQTopic("TopicT");
-        startBroker();
-
-        clientManager = new ClientManager();
-        server = new Server();
-        houseKeeper = new HouseKeeper();
-
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        destroyBroker();
-    }
-
-    private enum Persistence {
-        MEMORY, AMQ, KAHA, KAHADB
-    }
-
-    private void startBroker() throws Exception {
-        startBroker(true);
-    }
-
-    private void startBroker(boolean deleteAllMessages) throws Exception {
-        if (broker != null)
-            return;
-
-        broker = BrokerFactory.createBroker("broker:(vm://" + getName() + ")");
-        broker.setBrokerName(getName());
-        broker.setAdvisorySupport(false);
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessages);
-
-        switch (PERSISTENT_ADAPTER) {
-        case MEMORY:
-            broker.setPersistent(false);
-            break;
-
-        case AMQ:
-            File amqData = new File("activemq-data/" + getName() + "-amq");
-            if (deleteAllMessages)
-                delete(amqData);
-
-            broker.setPersistent(true);
-            AMQPersistenceAdapter amq = new AMQPersistenceAdapter();
-            amq.setDirectory(amqData);
-            broker.setPersistenceAdapter(amq);
-            break;
-
-        case KAHA:
-            File kahaData = new File("activemq-data/" + getName() + "-kaha");
-            if (deleteAllMessages)
-                delete(kahaData);
-
-            broker.setPersistent(true);
-            KahaPersistenceAdapter kaha = new KahaPersistenceAdapter();
-            kaha.setDirectory(kahaData);
-            broker.setPersistenceAdapter(kaha);
-            break;
-
-        case KAHADB:
-            File kahadbData = new File("activemq-data/" + getName() + "-kahadb");
-            if (deleteAllMessages)
-                delete(kahadbData);
-
-            broker.setPersistent(true);
-            KahaDBPersistenceAdapter kahadb = new KahaDBPersistenceAdapter();
-            kahadb.setDirectory(kahadbData);
-            kahadb.setJournalMaxFileLength(5 * 1024 * 1024);
-            broker.setPersistenceAdapter(kahadb);
-            break;
-        }
-
-        broker.addConnector("tcp://localhost:61656");
-
-        broker.getSystemUsage().getMemoryUsage().setLimit(256 * 1024 * 1024);
-        broker.getSystemUsage().getTempUsage().setLimit(256 * 1024 * 1024);
-        broker.getSystemUsage().getStoreUsage().setLimit(256 * 1024 * 1024);
-
-        broker.start();
-    }
-
-    protected static String getName() {
-        return "DurableSubProcessWithRestartTest";
-    }
-
-    private static boolean delete(File path) {
-        if (path == null)
-            return true;
-
-        if (path.isDirectory()) {
-            for (File file : path.listFiles()) {
-                delete(file);
-            }
-        }
-        return path.delete();
-    }
-
-    private void destroyBroker() throws Exception {
-        if (broker == null)
-            return;
-
-        broker.stop();
-        broker = null;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java
deleted file mode 100644
index 602ec1d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-
-public class DurableSubscriptionActivationTest extends org.apache.activemq.TestSupport {
-
-    private BrokerService broker;
-    private Connection connection;
-    private ActiveMQTopic topic;
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://" + getName());
-    }
-
-    protected Connection createConnection() throws Exception {
-        Connection rc = super.createConnection();
-        rc.setClientID(getName());
-        return rc;
-    }
-
-    protected void setUp() throws Exception {
-        topic = (ActiveMQTopic) createDestination();
-        createBroker();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        destroyBroker();
-    }
-
-    protected void restartBroker() throws Exception {
-        destroyBroker();
-        createBroker();
-    }
-
-    private void createBroker() throws Exception {
-        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
-        broker.setKeepDurableSubsActive(true);
-        broker.setPersistent(true);
-        AMQPersistenceAdapter persistenceAdapter = new AMQPersistenceAdapter();
-        persistenceAdapter.setDirectory(new File("activemq-data/" + getName()));
-        broker.setPersistenceAdapter(persistenceAdapter);
-        broker.setBrokerName(getName());
-
-        // only if we pre-create the destinations
-        broker.setDestinations(new ActiveMQDestination[]{topic});
-
-        broker.start();
-
-        connection = createConnection();
-    }
-
-    private void destroyBroker() throws Exception {
-        if (connection != null)
-            connection.close();
-        if (broker != null)
-            broker.stop();
-    }
-
-    public void testActivateWithExistingTopic() throws Exception {
-        // create durable subscription
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-
-        Destination d = broker.getDestination(topic);
-        assertTrue("More than one consumer.", d.getConsumers().size() == 1);
-        
-        // restart the broker
-        restartBroker();
-
-        // activate
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-
-        assertTrue("More than one consumer.", d.getConsumers().size() == 1);
-
-        // re-activate
-        connection.close();
-        connection = createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-
-        assertTrue("More than one consumer.", d.getConsumers().size() == 1);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java
deleted file mode 100644
index 9d685b4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java
+++ /dev/null
@@ -1,1164 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.Vector;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-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.ActiveMQTopic;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.activemq.util.Wait;
-import org.apache.kahadb.journal.Journal;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DurableSubscriptionOfflineTest extends org.apache.activemq.TestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DurableSubscriptionOfflineTest.class);
-    public boolean usePrioritySupport = Boolean.TRUE;
-    public int journalMaxFileLength = Journal.DEFAULT_MAX_FILE_LENGTH;
-    private BrokerService broker;
-    private ActiveMQTopic topic;
-    private Vector<Exception> exceptions = new Vector<Exception>();
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://" + getName(true));
-    }
-
-    @Override
-    protected Connection createConnection() throws Exception {
-        return createConnection("cliName");
-    }
-
-    protected Connection createConnection(String name) throws Exception {
-        Connection con = super.createConnection();
-        con.setClientID(name);
-        con.start();
-        return con;
-    }
-
-    public static Test suite() {
-        return suite(DurableSubscriptionOfflineTest.class);
-    }
-    
-    protected void setUp() throws Exception {
-        exceptions.clear();
-        topic = (ActiveMQTopic) createDestination();
-        createBroker();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        destroyBroker();
-    }
-
-    private void createBroker() throws Exception {
-        createBroker(true);
-    }
-    
-    private void createBroker(boolean deleteAllMessages) throws Exception {
-        broker = BrokerFactory.createBroker("broker:(vm://" + getName(true) +")");
-        broker.setBrokerName(getName(true));
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessages);
-        broker.getManagementContext().setCreateConnector(false);
-
-        if (usePrioritySupport) {
-            PolicyEntry policy = new PolicyEntry();
-            policy.setPrioritizedMessages(true);
-            PolicyMap policyMap = new PolicyMap();
-            policyMap.setDefaultEntry(policy);
-            broker.setDestinationPolicy(policyMap);
-        }
-        
-        setDefaultPersistenceAdapter(broker);
-        if (broker.getPersistenceAdapter() instanceof JDBCPersistenceAdapter) {
-            // ensure it kicks in during tests
-            ((JDBCPersistenceAdapter)broker.getPersistenceAdapter()).setCleanupPeriod(2*1000);
-        } else if (broker.getPersistenceAdapter() instanceof KahaDBPersistenceAdapter) {
-            // have lots of journal files
-            ((KahaDBPersistenceAdapter)broker.getPersistenceAdapter()).setJournalMaxFileLength(journalMaxFileLength);
-        }
-        broker.start();
-    }
-
-    private void destroyBroker() throws Exception {
-        if (broker != null)
-            broker.stop();
-    }
-
-    public void initCombosForTestConsumeOnlyMatchedMessages() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{ PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-        this.addCombinationValues("usePrioritySupport",
-                new Object[]{ Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testConsumeOnlyMatchedMessages() throws Exception {
-        // create durable subscription
-        Connection con = createConnection();
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            boolean filter = i % 2 == 1;
-            if (filter)
-                sent++;
-
-            Message message = session.createMessage();
-            message.setStringProperty("filter", filter ? "true" : "false");
-            producer.send(topic, message);
-        }
-
-        session.close();
-        con.close();
-
-        // consume messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-
-        assertEquals(sent, listener.count);
-    }
-
-     public void testConsumeAllMatchedMessages() throws Exception {
-         // create durable subscription
-         Connection con = createConnection();
-         Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-         session.close();
-         con.close();
-
-         // send messages
-         con = createConnection();
-         session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageProducer producer = session.createProducer(null);
-
-         int sent = 0;
-         for (int i = 0; i < 10; i++) {
-             sent++;
-             Message message = session.createMessage();
-             message.setStringProperty("filter", "true");
-             producer.send(topic, message);
-         }
-
-         Thread.sleep(1 * 1000);
-
-         session.close();
-         con.close();
-
-         // consume messages
-         con = createConnection();
-         session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-         Listener listener = new Listener();
-         consumer.setMessageListener(listener);
-
-         Thread.sleep(3 * 1000);
-
-         session.close();
-         con.close();
-
-         assertEquals(sent, listener.count);
-     }
-
-    
-    public void initCombosForTestVerifyAllConsumedAreAcked() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-               new Object[]{ PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-        this.addCombinationValues("usePrioritySupport",
-                new Object[]{ Boolean.TRUE, Boolean.FALSE});
-    }
-
-     public void testVerifyAllConsumedAreAcked() throws Exception {
-         // create durable subscription
-         Connection con = createConnection();
-         Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-         session.close();
-         con.close();
-
-         // send messages
-         con = createConnection();
-         session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageProducer producer = session.createProducer(null);
-
-         int sent = 0;
-         for (int i = 0; i < 10; i++) {
-             sent++;
-             Message message = session.createMessage();
-             message.setStringProperty("filter", "true");
-             producer.send(topic, message);
-         }
-
-         Thread.sleep(1 * 1000);
-
-         session.close();
-         con.close();
-
-         // consume messages
-         con = createConnection();
-         session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-         Listener listener = new Listener();
-         consumer.setMessageListener(listener);
-
-         Thread.sleep(3 * 1000);
-
-         session.close();
-         con.close();
-
-         LOG.info("Consumed: " + listener.count);
-         assertEquals(sent, listener.count);
-
-         // consume messages again, should not get any
-         con = createConnection();
-         session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-         listener = new Listener();
-         consumer.setMessageListener(listener);
-
-         Thread.sleep(3 * 1000);
-
-         session.close();
-         con.close();
-
-         assertEquals(0, listener.count);
-     }
-
-    public void testTwoOfflineSubscriptionCanConsume() throws Exception {
-        // create durable subscription 1
-        Connection con = createConnection("cliId1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // create durable subscription 2
-        Connection con2 = createConnection("cliId2");
-        Session session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer2 = session2.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener2 = new Listener();
-        consumer2.setMessageListener(listener2);
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            sent++;
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "true");
-            producer.send(topic, message);
-        }
-
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        // test online subs
-        Thread.sleep(3 * 1000);
-        session2.close();
-        con2.close();
-
-        assertEquals(sent, listener2.count);
-
-        // consume messages
-        con = createConnection("cliId1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-
-        assertEquals("offline consumer got all", sent, listener.count);
-    }
-
-    public void initCombosForTestOfflineSubscriptionCanConsumeAfterOnlineSubs() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{ PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-        this.addCombinationValues("usePrioritySupport",
-                new Object[]{ Boolean.TRUE, Boolean.FALSE});
-    }
-
-    public void testOfflineSubscriptionCanConsumeAfterOnlineSubs() throws Exception {
-        Connection con = createConnection("offCli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        con = createConnection("offCli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        Connection con2 = createConnection("onlineCli1");
-        Session session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer2 = session2.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener2 = new Listener();
-        consumer2.setMessageListener(listener2);
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            sent++;
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "true");
-            producer.send(topic, message);
-        }
-
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        // test online subs
-        Thread.sleep(3 * 1000);
-        session2.close();
-        con2.close();
-        assertEquals(sent, listener2.count);
-
-        // restart broker
-        broker.stop();
-        createBroker(false /*deleteAllMessages*/);
-
-        // test offline
-        con = createConnection("offCli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-
-        Connection con3 = createConnection("offCli2");
-        Session session3 = con3.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer3 = session3.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-        Listener listener3 = new Listener();
-        consumer3.setMessageListener(listener3);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-        session3.close();
-        con3.close();
-
-        assertEquals(sent, listener.count);
-        assertEquals(sent, listener3.count);
-    }
-
-
-    public void initCombosForTestInterleavedOfflineSubscriptionCanConsume() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-    }
-
-    public void testInterleavedOfflineSubscriptionCanConsume() throws Exception {
-        // create durable subscription 1
-        Connection con = createConnection("cliId1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            sent++;
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "true");
-            producer.send(topic, message);
-        }
-
-        Thread.sleep(1 * 1000);
-
-        // create durable subscription 2
-        Connection con2 = createConnection("cliId2");
-        Session session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer2 = session2.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener2 = new Listener();
-        consumer2.setMessageListener(listener2);
-
-        assertEquals(0, listener2.count);
-        session2.close();
-        con2.close();
-
-        // send some more
-        for (int i = 0; i < 10; i++) {
-            sent++;
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "true");
-            producer.send(topic, message);
-        }
-
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        con2 = createConnection("cliId2");
-        session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer2 = session2.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        listener2 = new Listener("cliId2");
-        consumer2.setMessageListener(listener2);
-        // test online subs
-        Thread.sleep(3 * 1000);
-
-        assertEquals(10, listener2.count);
-
-        // consume all messages
-        con = createConnection("cliId1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener = new Listener("cliId1");
-        consumer.setMessageListener(listener);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-
-        assertEquals("offline consumer got all", sent, listener.count);
-    }    
-
-    public void initCombosForTestMixOfOnLineAndOfflineSubsGetAllMatched() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{ PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-    }
-
-    private static String filter = "$a='A1' AND (($b=true AND $c=true) OR ($d='D1' OR $d='D2'))";
-    public void testMixOfOnLineAndOfflineSubsGetAllMatched() throws Exception {
-        // create offline subs 1
-        Connection con = createConnection("offCli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", filter, true);
-        session.close();
-        con.close();
-
-        // create offline subs 2
-        con = createConnection("offCli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", filter, true);
-        session.close();
-        con.close();
-
-        // create online subs
-        Connection con2 = createConnection("onlineCli1");
-        Session session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer2 = session2.createDurableSubscriber(topic, "SubsId", filter, true);
-        Listener listener2 = new Listener();
-        consumer2.setMessageListener(listener2);
-
-        // create non-durable consumer
-        Connection con4 = createConnection("nondurableCli");
-        Session session4 = con4.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer4 = session4.createConsumer(topic, filter, true);
-        Listener listener4 = new Listener();
-        consumer4.setMessageListener(listener4);
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        boolean hasRelevant = false;
-        int filtered = 0;
-        for (int i = 0; i < 100; i++) {
-            int postf = (int) (Math.random() * 9) + 1;
-            String d = "D" + postf;
-
-            if ("D1".equals(d) || "D2".equals(d)) {
-                hasRelevant = true;
-                filtered++;
-            }
-
-            Message message = session.createMessage();
-            message.setStringProperty("$a", "A1");
-            message.setStringProperty("$d", d);
-            producer.send(topic, message);
-        }
-
-        Message message = session.createMessage();
-        message.setStringProperty("$a", "A1");
-        message.setBooleanProperty("$b", true);
-        message.setBooleanProperty("$c", hasRelevant);
-        producer.send(topic, message);
-
-        if (hasRelevant)
-            filtered++;
-
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        Thread.sleep(3 * 1000);
-
-        // test non-durable consumer
-        session4.close();
-        con4.close();
-        assertEquals(filtered, listener4.count); // succeeded!
-
-        // test online subs
-        session2.close();
-        con2.close();
-        assertEquals(filtered, listener2.count); // succeeded!
-
-        // test offline 1
-        con = createConnection("offCli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", filter, true);
-        Listener listener = new FilterCheckListener();
-        consumer.setMessageListener(listener);
-
-        Thread.sleep(3 * 1000);
-        session.close();
-        con.close();
-
-        assertEquals(filtered, listener.count);
-
-        // test offline 2
-        Connection con3 = createConnection("offCli2");
-        Session session3 = con3.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer3 = session3.createDurableSubscriber(topic, "SubsId", filter, true);
-        Listener listener3 = new FilterCheckListener();
-        consumer3.setMessageListener(listener3);
-
-        Thread.sleep(3 * 1000);
-        session3.close();
-        con3.close();
-
-        assertEquals(filtered, listener3.count);
-        assertTrue("no unexpected exceptions: " + exceptions, exceptions.isEmpty());
-    }
-
-    public void testRemovedDurableSubDeletes() throws Exception {
-        // create durable subscription 1
-        Connection con = createConnection("cliId1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            sent++;
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "true");
-            producer.send(topic, message);
-        }
-
-        Thread.sleep(1 * 1000);
-
-        Connection con2 = createConnection("cliId1");
-        Session session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session2.unsubscribe("SubsId");
-        session2.close();
-        con2.close();
-
-        // see if retroactive can consumer any
-        topic = new ActiveMQTopic(topic.getPhysicalName() + "?consumer.retroactive=true");
-        con = createConnection("offCli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", filter, true);
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-        session.close();
-        con.close();
-        assertEquals(0, listener.count);
-    }
-
-    public void initCombosForTestOfflineSubscriptionWithSelectorAfterRestart() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{ PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-    }
-    
-    public void testOfflineSubscriptionWithSelectorAfterRestart() throws Exception {
-        // create offline subs 1
-        Connection con = createConnection("offCli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // create offline subs 2
-        con = createConnection("offCli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int filtered = 0;
-        for (int i = 0; i < 10; i++) {
-            boolean filter = (int) (Math.random() * 2) >= 1;
-            if (filter)
-                filtered++;
-
-            Message message = session.createMessage();
-            message.setStringProperty("filter", filter ? "true" : "false");
-            producer.send(topic, message);
-        }
-
-        LOG.info("sent: " + filtered);
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        // restart broker
-        Thread.sleep(3 * 1000);
-        broker.stop();
-        createBroker(false /*deleteAllMessages*/);
- 
-        // send more messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(null);
-
-        for (int i = 0; i < 10; i++) {
-            boolean filter = (int) (Math.random() * 2) >= 1;
-            if (filter)
-                filtered++;
-
-            Message message = session.createMessage();
-            message.setStringProperty("filter", filter ? "true" : "false");
-            producer.send(topic, message);
-        }
-
-        LOG.info("after restart, sent: " + filtered);
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        // test offline subs
-        con = createConnection("offCli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-
-        Connection con3 = createConnection("offCli2");
-        Session session3 = con3.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer3 = session3.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener3 = new Listener();
-        consumer3.setMessageListener(listener3);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-        session3.close();
-        con3.close();
-
-        assertEquals(filtered, listener.count);
-        assertEquals(filtered, listener3.count);
-    }
-
-    public void initCombosForTestOfflineAfterRestart() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter",
-                new Object[]{ PersistenceAdapterChoice.KahaDB, PersistenceAdapterChoice.JDBC});
-    }
-
-    public void testOfflineSubscriptionAfterRestart() throws Exception {
-        // create offline subs 1
-        Connection con = createConnection("offCli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", null, false);
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-
-        // send messages
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            sent++;
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "false");
-            producer.send(topic, message);
-        }
-
-        LOG.info("sent: " + sent);
-        Thread.sleep(5 * 1000);
-        session.close();
-        con.close();
-
-        assertEquals(sent, listener.count);
-
-        // restart broker
-        Thread.sleep(3 * 1000);
-        broker.stop();
-        createBroker(false /*deleteAllMessages*/);
-
-        // send more messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(null);
-
-        for (int i = 0; i < 10; i++) {
-            sent++;
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "false");
-            producer.send(topic, message);
-        }
-
-        LOG.info("after restart, sent: " + sent);
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        // test offline subs
-        con = createConnection("offCli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = session.createDurableSubscriber(topic, "SubsId", null, true);
-        consumer.setMessageListener(listener);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-
-        assertEquals(sent, listener.count);
-    }
-
-    public void testInterleavedOfflineSubscriptionCanConsumeAfterUnsub() throws Exception {
-        // create offline subs 1
-        Connection con = createConnection("offCli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // create offline subs 2
-        con = createConnection("offCli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", null, true);
-        session.close();
-        con.close();
-
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            boolean filter = (int) (Math.random() * 2) >= 1;
-
-            sent++;
-
-            Message message = session.createMessage();
-            message.setStringProperty("filter", filter ? "true" : "false");
-            producer.send(topic, message);
-        }
-
-        Thread.sleep(1 * 1000);
-
-        Connection con2 = createConnection("offCli1");
-        Session session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session2.unsubscribe("SubsId");
-        session2.close();
-        con2.close();
-
-        // consume all messages
-        con = createConnection("offCli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", null, true);
-        Listener listener = new Listener("SubsId");
-        consumer.setMessageListener(listener);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-
-        assertEquals("offline consumer got all", sent, listener.count);
-    }
-
-
-    public void testUnmatchedSubUnsubscribeDeletesAll() throws Exception {
-        // create offline subs 1
-        Connection con = createConnection("offCli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        session.close();
-        con.close();
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int filtered = 0;
-        for (int i = 0; i < 10; i++) {
-            boolean filter = (i %2 == 0); //(int) (Math.random() * 2) >= 1;
-            if (filter)
-                filtered++;
-
-            Message message = session.createMessage();
-            message.setStringProperty("filter", filter ? "true" : "false");
-            producer.send(topic, message);
-        }
-
-        LOG.info("sent: " + filtered);
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        // test offline subs
-        con = createConnection("offCli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.unsubscribe("SubsId");
-        session.close();
-        con.close();
-
-
-        con = createConnection("offCli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", "filter = 'true'", true);
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-
-        Thread.sleep(3 * 1000);
-
-        session.close();
-        con.close();
-
-        assertEquals(0, listener.count);
-    }
-
-
-    public void testAllConsumed() throws Exception {
-        final String filter = "filter = 'true'";
-        Connection con = createConnection("cli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", filter, true);
-        session.close();
-        con.close();
-
-        con = createConnection("cli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", filter, true);
-        session.close();
-        con.close();
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        for (int i = 0; i < 10; i++) {
-            Message message = session.createMessage();
-            message.setStringProperty("filter", "true");
-            producer.send(topic, message);
-            sent++;
-        }
-
-        LOG.info("sent: " + sent);
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
-
-        con = createConnection("cli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", filter, true);
-        Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-        Thread.sleep(3 * 1000);
-        session.close();
-        con.close();
-
-        assertEquals(sent, listener.count);
-
-        LOG.info("cli2 pull 2");
-        con = createConnection("cli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = session.createDurableSubscriber(topic, "SubsId", filter, true);
-        assertNotNull("got message", consumer.receive(2000));
-        assertNotNull("got message", consumer.receive(2000));
-        session.close();
-        con.close();
-
-
-        // send messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(null);
-
-        sent = 0;
-        for (int i = 0; i < 2; i++) {
-            Message message = session.createMessage();
-            message.setStringProperty("filter", i==1 ? "true" : "false");
-            producer.send(topic, message);
-            sent++;
-        }
-        LOG.info("sent: " + sent);
-        Thread.sleep(1 * 1000);
-        session.close();
-        con.close();
- 
-        LOG.info("cli1 again, should get 1 new ones");
-        con = createConnection("cli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = session.createDurableSubscriber(topic, "SubsId", filter, true);
-        listener = new Listener();
-        consumer.setMessageListener(listener);
-        Thread.sleep(3 * 1000);
-        session.close();
-        con.close();
-
-        assertEquals(1, listener.count);
-    }
-
-    // https://issues.apache.org/jira/browse/AMQ-3190
-    public void testNoMissOnMatchingSubAfterRestart() throws Exception {
-
-        final String filter = "filter = 'true'";
-        Connection con = createConnection("cli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", filter, true);
-        session.close();
-        con.close();
-
-        // send unmatched messages
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        int sent = 0;
-        // message for cli1 to keep it interested
-        Message message = session.createMessage();
-        message.setStringProperty("filter", "true");
-        message.setIntProperty("ID", 0);
-        producer.send(topic, message);
-        sent++;
-
-        for (int i = sent; i < 10; i++) {
-            message = session.createMessage();
-            message.setStringProperty("filter", "false");
-            message.setIntProperty("ID", i);
-            producer.send(topic, message);
-            sent++;
-        }
-        con.close();
-        LOG.info("sent: " + sent);
-
-
-        // new sub at id 10
-        con = createConnection("cli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", filter, true);
-        session.close();
-        con.close();
-
-        destroyBroker();
-        createBroker(false);
-
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(null);
-
-        for (int i = sent; i < 30; i++) {
-            message = session.createMessage();
-            message.setStringProperty("filter", "true");
-            message.setIntProperty("ID", i);
-            producer.send(topic, message);
-            sent++;
-        }
-        con.close();
-        LOG.info("sent: " + sent);
-
-        // pick up the first of the next twenty messages
-        con = createConnection("cli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", filter, true);
-        Message m = consumer.receive(3000);
-        assertEquals("is message 10", 10, m.getIntProperty("ID"));
-
-        session.close();
-        con.close();
-
-        // pick up the first few messages for client1
-        con = createConnection("cli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumer = session.createDurableSubscriber(topic, "SubsId", filter, true);
-        m = consumer.receive(3000);
-        assertEquals("is message 0", 0, m.getIntProperty("ID"));
-        m = consumer.receive(3000);
-        assertEquals("is message 10", 10, m.getIntProperty("ID"));
-
-        session.close();
-        con.close();
-    }
-
-    // use very small journal to get lots of files to cleanup
-    public void initCombosForTestCleanupDeletedSubAfterRestart() throws Exception {
-        this.addCombinationValues("journalMaxFileLength",
-                new Object[]{new Integer(64*1024)});
-    }
-
-    // https://issues.apache.org/jira/browse/AMQ-3206
-    public void testCleanupDeletedSubAfterRestart() throws Exception {
-        Connection con = createConnection("cli1");
-        Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", null, true);
-        session.close();
-        con.close();
-
-        con = createConnection("cli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId", null, true);
-        session.close();
-        con.close();
-
-        con = createConnection();
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(null);
-
-        final int toSend = 500;
-        final String payload = new byte[40*1024].toString();
-        int sent = 0;
-        for (int i = sent; i < toSend; i++) {
-            Message message = session.createTextMessage(payload);
-            message.setStringProperty("filter", "false");
-            message.setIntProperty("ID", i);
-            producer.send(topic, message);
-            sent++;
-        }
-        con.close();
-        LOG.info("sent: " + sent);
-
-        // kill off cli1
-        con = createConnection("cli1");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.unsubscribe("SubsId");
-
-        destroyBroker();
-        createBroker(false);
-
-        con = createConnection("cli2");
-        session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "SubsId", null, true);
-        final Listener listener = new Listener();
-        consumer.setMessageListener(listener);
-        assertTrue("got all sent", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                LOG.info("Want: " + toSend  + ", current: " + listener.count);
-                return listener.count == toSend;
-            }
-        }));
-        session.close();
-        con.close();
-
-        destroyBroker();
-        createBroker(false);
-        KahaDBPersistenceAdapter pa = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter();
-        assertEquals("only one journal file left after restart", 1, pa.getStore().getJournal().getFileMap().size());
-    }
-
-    public static class Listener implements MessageListener {
-        int count = 0;
-        String id = null;
-
-        Listener() {
-        }
-        Listener(String id) {
-            this.id = id;
-        }
-        public void onMessage(Message message) {
-            count++;
-            if (id != null) {
-                try {
-                    LOG.info(id + ", " + message.getJMSMessageID());
-                } catch (Exception ignored) {}
-            }
-        }
-    }
-
-    public class FilterCheckListener extends Listener  {
-
-        public void onMessage(Message message) {
-            count++;
-
-            try {
-                Object b = message.getObjectProperty("$b");
-                if (b != null) {
-                    boolean c = message.getBooleanProperty("$c");
-                    assertTrue("", c);
-                }
-                else {
-                    String d = message.getStringProperty("$d");
-                    assertTrue("", "D1".equals(d) || "D2".equals(d));
-                }
-            }
-            catch (JMSException e) {
-                exceptions.add(e);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionReactivationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionReactivationTest.java
deleted file mode 100644
index 7bd50a8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionReactivationTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-import junit.framework.Test;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-
-public class DurableSubscriptionReactivationTest extends EmbeddedBrokerTestSupport {
-
-    public boolean keepDurableSubsActive;
-    
-    public void initCombosForTestReactivateKeepaliveSubscription() {
-        addCombinationValues("keepDurableSubsActive", new Object[] { new Boolean(true), new Boolean(false) });
-    }
-    
-    public void testReactivateKeepaliveSubscription() throws Exception {
-
-        Connection connection = createConnection();
-        connection.setClientID("cliID");
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TopicSubscriber subscriber = session.createDurableSubscriber((Topic) createDestination(), "subName");
-        subscriber.close();
-        connection.close();
-
-        connection = createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(createDestination());
-        producer.send(session.createMessage());
-        connection.close();
-
-        connection = createConnection();
-        connection.setClientID("cliID");
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        subscriber = session.createDurableSubscriber((Topic) createDestination(), "subName");
-        Message message = subscriber.receive(1 * 1000);
-        subscriber.close();
-        connection.close();
-
-        assertNotNull("Message not received.", message);
-    }
-
-    protected void setUp() throws Exception {
-        useTopic = true;
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = super.createBroker();
-        answer.setKeepDurableSubsActive(keepDurableSubsActive);
-        answer.setPersistenceAdapter(new JDBCPersistenceAdapter());
-        answer.setDeleteAllMessagesOnStartup(true);
-        return answer;
-    }
-
-    protected boolean isPersistent() {
-        return true;
-    }
-    
-    public static Test suite() {
-        return suite(DurableSubscriptionReactivationTest.class);
-      }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java
deleted file mode 100644
index 83f3bb6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.usecases;
-
-import java.lang.management.ManagementFactory;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TopicSubscriber;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.util.Wait;
-
-public class DurableSubscriptionSelectorTest extends org.apache.activemq.TestSupport {
-
-    MBeanServer mbs;
-    BrokerService broker = null;
-    ActiveMQTopic topic;
-
-    ActiveMQConnection consumerConnection = null, producerConnection = null;
-    Session producerSession;
-    MessageProducer producer;
-
-    private int received = 0;
-
-    public static Test suite() {
-        return suite(DurableSubscriptionSelectorTest.class);
-    }
-
-    public void initCombosForTestSubscription() throws Exception {
-        this.addCombinationValues("defaultPersistenceAdapter", PersistenceAdapterChoice.values());
-    }
-
-    public void testSubscription() throws Exception {
-        openConsumer();
-        for (int i = 0; i < 4000; i++) {
-            sendMessage(false);
-        }
-        Thread.sleep(1000);
-
-        assertEquals("Invalid message received.", 0, received);
-
-        closeProducer();
-        closeConsumer();
-        stopBroker();
-
-        startBroker(false);
-        openConsumer();
-
-        sendMessage(true);
-
-        Wait.waitFor(new Wait.Condition() { public boolean isSatisified() { return received >= 1;} }, 10000);
-
-        assertEquals("Message is not recieved.", 1, received);
-
-        sendMessage(true);
-        Thread.sleep(100);
-
-        assertEquals("Message is not recieved.", 2, received);
-    }
-
-    private void openConsumer() throws Exception {
-        consumerConnection = (ActiveMQConnection) createConnection();
-        consumerConnection.setClientID("cliID");
-        consumerConnection.start();
-        Session session = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TopicSubscriber subscriber = session.createDurableSubscriber(topic, "subName", "filter=true", false);
-
-        subscriber.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                received++;
-            }
-        });
-    }
-
-    private void closeConsumer() throws JMSException {
-        if (consumerConnection != null)
-            consumerConnection.close();
-        consumerConnection = null;
-    }
-
-    private void sendMessage(boolean filter) throws Exception {
-        if (producerConnection == null) {
-            producerConnection = (ActiveMQConnection) createConnection();
-            producerConnection.start();
-            producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            producer = producerSession.createProducer(topic);
-        }
-
-        Message message = producerSession.createMessage();
-        message.setBooleanProperty("filter", filter);
-        producer.send(message);
-    }
-
-    private void closeProducer() throws JMSException {
-        if (producerConnection != null)
-            producerConnection.close();
-        producerConnection = null;
-    }
-
-    private int getPendingQueueSize() throws Exception {
-        ObjectName[] subs = broker.getAdminView().getDurableTopicSubscribers();
-        for (ObjectName sub: subs) {
-            if ("cliID".equals(mbs.getAttribute(sub, "ClientId"))) {
-                Integer size = (Integer) mbs.getAttribute(sub, "PendingQueueSize");
-                return size != null ? size : 0;
-            }
-        }
-        assertTrue(false);
-        return -1;
-    }
-
-    private void startBroker(boolean deleteMessages) throws Exception {
-        broker = new BrokerService();
-        broker.setBrokerName("test-broker");
-        
-        if (deleteMessages) {
-            broker.setDeleteAllMessagesOnStartup(true);
-        }
-        setDefaultPersistenceAdapter(broker);
-
-        if (broker.getPersistenceAdapter() instanceof JDBCPersistenceAdapter) {
-            ((JDBCPersistenceAdapter)broker.getPersistenceAdapter()).setMaxRows(5000);    
-        }
-        broker.start();
-    }
-
-    private void stopBroker() throws Exception {
-        if (broker != null)
-            broker.stop();
-        broker = null;
-    }
-    
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://test-broker?jms.watchTopicAdvisories=false&waitForStart=5000&create=false");
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        startBroker(true);
-        topic = (ActiveMQTopic) createDestination();
-        mbs = ManagementFactory.getPlatformMBeanServer();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        stopBroker();
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java
deleted file mode 100755
index 4dc9d57..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java
+++ /dev/null
@@ -1,449 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.PersistenceAdapter;
-
-/**
- * 
- */
-public abstract class DurableSubscriptionTestSupport extends TestSupport {
-
-    private Connection connection;
-    private Session session;
-    private TopicSubscriber consumer;
-    private MessageProducer producer;
-    private BrokerService broker;
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://durable-broker");
-    }
-
-    protected Connection createConnection() throws Exception {
-        Connection rc = super.createConnection();
-        rc.setClientID(getName());
-        return rc;
-    }
-
-    protected void setUp() throws Exception {
-        createBroker();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        destroyBroker();
-    }
-
-    protected void restartBroker() throws Exception {
-        destroyBroker();
-        createRestartedBroker(); // retain stored messages
-    }
-
-    private void createBroker() throws Exception {
-        broker = new BrokerService();
-        broker.setBrokerName("durable-broker");
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.setPersistenceAdapter(createPersistenceAdapter());
-        broker.setPersistent(true);
-        broker.start();
-
-        connection = createConnection();
-    }
-
-    private void createRestartedBroker() throws Exception {
-        broker = new BrokerService();
-        broker.setBrokerName("durable-broker");
-        broker.setDeleteAllMessagesOnStartup(false);
-        broker.setPersistenceAdapter(createPersistenceAdapter());
-        broker.setPersistent(true);
-        broker.start();
-
-        connection = createConnection();
-    }
-
-    private void destroyBroker() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected abstract PersistenceAdapter createPersistenceAdapter() throws Exception;
-    
-    public void testMessageExpire() throws Exception {
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TestTopic");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        producer.setTimeToLive(1000);
-        connection.start();
-
-        // Make sure it works when the durable sub is active.
-        producer.send(session.createTextMessage("Msg:1"));
-        assertTextMessageEquals("Msg:1", consumer.receive(1000));
-        
-        consumer.close();
-        
-        producer.send(session.createTextMessage("Msg:2"));
-        producer.send(session.createTextMessage("Msg:3"));
-        
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        // Try to get the message.
-        assertTextMessageEquals("Msg:2", consumer.receive(1000));
-        Thread.sleep(1000);
-        assertNull(consumer.receive(1000));
-    }
-
-    public void testUnsubscribeSubscription() throws Exception {
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TestTopic");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-
-        // Make sure it works when the durable sub is active.
-        producer.send(session.createTextMessage("Msg:1"));
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-
-        // Deactivate the sub.
-        consumer.close();
-        // Send a new message.
-        producer.send(session.createTextMessage("Msg:2"));
-        session.unsubscribe("sub1");
-
-        // Reopen the connection.
-        connection.close();
-        connection = createConnection();
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(topic);
-        connection.start();
-
-        // Activate the sub.
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        producer.send(session.createTextMessage("Msg:3"));
-
-        // Try to get the message.
-        assertTextMessageEquals("Msg:3", consumer.receive(5000));
-    }
-
-    public void testInactiveDurableSubscriptionTwoConnections() throws Exception {
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TestTopic");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-
-        // Make sure it works when the durable sub is active.
-        producer.send(session.createTextMessage("Msg:1"));
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-
-        // Deactivate the sub.
-        consumer.close();
-
-        // Send a new message.
-        producer.send(session.createTextMessage("Msg:2"));
-
-        // Reopen the connection.
-        connection.close();
-        connection = createConnection();
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        connection.start();
-
-        // Activate the sub.
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        // Try to get the message.
-        assertTextMessageEquals("Msg:2", consumer.receive(5000));
-    }
-
-    public void testInactiveDurableSubscriptionBrokerRestart() throws Exception {
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TestTopic");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-
-        // Make sure it works when the durable sub is active.
-        producer.send(session.createTextMessage("Msg:1"));
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-
-        // Deactivate the sub.
-        consumer.close();
-
-        // Send a new message.
-        producer.send(session.createTextMessage("Msg:2"));
-
-        // Reopen the connection.
-        restartBroker();
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        connection.start();
-
-        // Activate the sub.
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        // Try to get the message.
-        assertTextMessageEquals("Msg:2", consumer.receive(5000));
-        assertNull(consumer.receive(5000));
-    }
-    
-    public void testDurableSubscriptionBrokerRestart() throws Exception {
-
-        // Create the durable sub.
-        connection.start();
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-
-        // Ensure that consumer will receive messages sent before it was created
-        Topic topic = session.createTopic("TestTopic?consumer.retroactive=true");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        producer.send(session.createTextMessage("Msg:1"));
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-        
-        // Make sure cleanup kicks in
-        Thread.sleep(1000);
-
-        // Restart the broker.
-        restartBroker();
-    }
-
-    public void testDurableSubscriptionPersistsPastBrokerRestart() throws Exception {
-
-        // Create the durable sub.
-        connection.start();
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-
-        // Ensure that consumer will receive messages sent before it was created
-        Topic topic = session.createTopic("TestTopic?consumer.retroactive=true");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        // Restart the broker.
-        restartBroker();
-
-        // Reconnection
-        connection.start();
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-        // Make sure it works when the durable sub is active.
-        producer.send(session.createTextMessage("Msg:1"));
-
-        // Activate the sub.
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        // Send a new message.
-        producer.send(session.createTextMessage("Msg:2"));
-
-        // Try to get the message.
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-        assertTextMessageEquals("Msg:2", consumer.receive(5000));
-
-        assertNull(consumer.receive(5000));
-    }
-
-    public void testDurableSubscriptionRollbackRedeliver() throws Exception {
-
-        // Create the durable sub.
-        connection.start();
-
-        session = connection.createSession(true, javax.jms.Session.SESSION_TRANSACTED);
-        Topic topic = session.createTopic("TestTopic");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        Session producerSession = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        producer = producerSession.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-        producer.send(session.createTextMessage("Msg:1"));
-
-        // receive and rollback
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-        session.rollback();
-        consumer.close();
-        session.close();
-
-        session = connection.createSession(true, javax.jms.Session.SESSION_TRANSACTED);
-
-        // Ensure that consumer will receive messages sent and rolled back
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-        session.commit();
-
-        assertNull(consumer.receive(5000));
-    }
-
-    public void xtestInactiveDurableSubscriptionOneConnection() throws Exception {
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TestTopic");
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-
-        // Make sure it works when the durable sub is active.
-        producer.send(session.createTextMessage("Msg:1"));
-        assertTextMessageEquals("Msg:1", consumer.receive(5000));
-
-        // Deactivate the sub.
-        consumer.close();
-
-        // Send a new message.
-        producer.send(session.createTextMessage("Msg:2"));
-
-        // Activate the sub.
-        consumer = session.createDurableSubscriber(topic, "sub1");
-
-        // Try to get the message.
-        assertTextMessageEquals("Msg:2", consumer.receive(5000));
-    }
-
-    public void testSelectorChange() throws Exception {
-        session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("TestTopic");
-        consumer = session.createDurableSubscriber(topic, "sub1", "color='red'", false);
-        producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        connection.start();
-
-        // Make sure it works when the durable sub is active.
-        TextMessage msg = session.createTextMessage();
-        msg.setText("Msg:1");
-        msg.setStringProperty("color", "blue");
-        producer.send(msg);
-        msg.setText("Msg:2");
-        msg.setStringProperty("color", "red");
-        producer.send(msg);
-
-        assertTextMessageEquals("Msg:2", consumer.receive(5000));
-
-        // Change the subscription
-        consumer.close();
-        consumer = session.createDurableSubscriber(topic, "sub1", "color='blue'", false);
-
-        // Send a new message.
-        msg.setText("Msg:3");
-        msg.setStringProperty("color", "red");
-        producer.send(msg);
-        msg.setText("Msg:4");
-        msg.setStringProperty("color", "blue");
-        producer.send(msg);
-
-        // Try to get the message.
-        assertTextMessageEquals("Msg:4", consumer.receive(5000));
-    }
-
-    public void testDurableSubWorksInNewSession() throws JMSException {
-
-        // Create the consumer.
-        connection.start();
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic-" + getName());
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "sub1");
-        // Drain any messages that may allready be in the sub
-        while (consumer.receive(1000) != null) {
-        }
-
-        // See if the durable sub works in a new session.
-        session.close();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Send a Message that should be added to the durable sub.
-        MessageProducer producer = createProducer(session, topic);
-        producer.send(session.createTextMessage("Message 1"));
-
-        // Activate the durable sub now. And receive the message.
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertEquals("Message 1", ((TextMessage)msg).getText());
-
-    }
-
-    public void testDurableSubWorksInNewConnection() throws Exception {
-
-        // Create the consumer.
-        connection.start();
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic-" + getName());
-        MessageConsumer consumer = session.createDurableSubscriber(topic, "sub1");
-        // Drain any messages that may allready be in the sub
-        while (consumer.receive(1000) != null) {
-        }
-
-        // See if the durable sub works in a new connection.
-        // The embeded broker shutsdown when his connections are closed.
-        // So we open the new connection before the old one is closed.
-        connection.close();
-        connection = createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-
-        // Send a Message that should be added to the durable sub.
-        MessageProducer producer = createProducer(session, topic);
-        producer.send(session.createTextMessage("Message 1"));
-
-        // Activate the durable sub now. And receive the message.
-        consumer = session.createDurableSubscriber(topic, "sub1");
-        Message msg = consumer.receive(1000);
-        assertNotNull(msg);
-        assertEquals("Message 1", ((TextMessage)msg).getText());
-
-    }
-
-    private MessageProducer createProducer(Session session, Destination queue) throws JMSException {
-        MessageProducer producer = session.createProducer(queue);
-        producer.setDeliveryMode(getDeliveryMode());
-        return producer;
-    }
-
-    protected int getDeliveryMode() {
-        return DeliveryMode.PERSISTENT;
-    }
-
-    private void assertTextMessageEquals(String string, Message message) throws JMSException {
-        assertNotNull("Message was null", message);
-        assertTrue("Message is not a TextMessage", message instanceof TextMessage);
-        assertEquals(string, ((TextMessage)message).getText());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionUnsubscribeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionUnsubscribeTest.java
deleted file mode 100644
index 8eed7c4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionUnsubscribeTest.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.jmx.DurableSubscriptionViewMBean;
-import org.apache.activemq.broker.jmx.SubscriptionView;
-import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.DurableTopicSubscription;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.management.*;
-import java.io.File;
-import java.lang.management.ManagementFactory;
-import java.util.List;
-
-
-public class DurableSubscriptionUnsubscribeTest extends TestSupport {
-
-    BrokerService broker = null;
-    Connection connection = null;
-    ActiveMQTopic topic;
-
-    public void testJMXSubscriptionUnsubscribe() throws Exception {
-        doJMXUnsubscribe(false);
-    }
-
-    public void testJMXSubscriptionUnsubscribeWithRestart() throws Exception {
-        doJMXUnsubscribe(true);
-    }
-
-    public void testConnectionSubscriptionUnsubscribe() throws Exception {
-        doConnectionUnsubscribe(false);
-    }
-
-    public void testConnectionSubscriptionUnsubscribeWithRestart() throws Exception {
-        doConnectionUnsubscribe(true);
-    }
-
-    public void testDirectSubscriptionUnsubscribe() throws Exception {
-        doDirectUnsubscribe(false);
-    }
-
-    public void testDirectubscriptionUnsubscribeWithRestart() throws Exception {
-        doDirectUnsubscribe(true);
-    }
-
-    public void doJMXUnsubscribe(boolean restart) throws Exception {
-        createSubscriptions();
-
-        Thread.sleep(1000);
-        assertCount(100, 0);
-
-        if (restart) {
-            restartBroker();
-            assertCount(100, 0);
-        }
-
-        ObjectName[] subs = broker.getAdminView().getInactiveDurableTopicSubscribers();
-
-        for (int i = 0; i < subs.length; i++) {
-            ObjectName subName = subs[i];
-            DurableSubscriptionViewMBean sub = (DurableSubscriptionViewMBean)broker.getManagementContext().newProxyInstance(subName, DurableSubscriptionViewMBean.class, true);
-            sub.destroy();
-
-            if (i % 20 == 0) {
-                Thread.sleep(1000);
-                assertCount(100 - i - 1, 0);
-            }
-        }
-
-        Thread.sleep(1000);
-        assertCount(0, 0);
-
-        if (restart) {
-            restartBroker();
-            assertCount(0, 0);
-        }
-    }
-
-    public void doConnectionUnsubscribe(boolean restart) throws Exception {
-        createSubscriptions();
-
-        Thread.sleep(1000);
-        assertCount(100, 0);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId1");
-
-        Thread.sleep(1000);
-        assertCount(100, 1);
-
-        Session session2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session2.createDurableSubscriber(topic, "SubsId2");
-
-        Thread.sleep(1000);
-        assertCount(100, 2);
-
-        session.close();
-
-        Thread.sleep(1000);
-        assertCount(100, 1);
-
-        session2.close();
-
-        Thread.sleep(1000);
-        assertCount(100, 0);
-
-        if (restart) {
-            restartBroker();
-            assertCount(100, 0);
-        }
-
-        for (int i = 0; i < 100; i++) {
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            session.unsubscribe("SubsId" + i);
-            session.close();
-
-            if (i % 20 == 0) {
-                Thread.sleep(1000);
-                assertCount(100 - i - 1, 0);
-            }
-        }
-
-        Thread.sleep(1000);
-        assertCount(0, 0);
-
-        if (restart) {
-            restartBroker();
-            assertCount(0, 0);
-        }
-    }
-
-    public void doDirectUnsubscribe(boolean restart) throws Exception {
-        createSubscriptions();
-
-        Thread.sleep(1000);
-        assertCount(100, 0);
-
-        if (restart) {
-            restartBroker();
-            assertCount(100, 0);
-        }
-
-        for (int i = 0; i < 100; i++) {
-            RemoveSubscriptionInfo info = new RemoveSubscriptionInfo();
-            info.setClientId(getName());
-            info.setSubscriptionName("SubsId" + i);
-            ConnectionContext context = new ConnectionContext();
-            context.setBroker(broker.getRegionBroker());
-            context.setClientId(getName());
-            broker.getRegionBroker().removeSubscription(context, info);
-
-            if (i % 20 == 0) {
-                assertCount(100 - i - 1, 0);
-            }
-        }
-
-        assertCount(0, 0);
-
-        if (restart) {
-            restartBroker();
-            assertCount(0, 0);
-        }
-    }
-
-    private void createSubscriptions() throws Exception {
-        for (int i = 0; i < 100; i++) {
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            session.createDurableSubscriber(topic, "SubsId" + i);
-            session.close();
-        }        
-    }
-
-
-    private void assertCount(int all, int active) throws Exception {
-        int inactive = all - active;
-
-        // broker check
-        Destination destination = broker.getDestination(topic);
-        List<Subscription> subs = destination.getConsumers();
-        int cActive = 0, cInactive = 0;
-        for (Subscription sub: subs) {
-            if (sub instanceof DurableTopicSubscription) {
-                DurableTopicSubscription durable = (DurableTopicSubscription) sub;
-                if (durable.isActive())
-                    cActive++;
-                else
-                    cInactive++;
-            }
-        }
-        assertEquals(active, cActive);
-        assertEquals(inactive, cInactive);
-
-        // admin view
-        ObjectName[] subscriptions = broker.getAdminView().getDurableTopicSubscribers();
-        assertEquals(active, subscriptions.length);
-        subscriptions = broker.getAdminView().getInactiveDurableTopicSubscribers();
-        assertEquals(inactive, subscriptions.length);
-
-        // check the strange false MBean
-        if (all == 0)
-            assertEquals(0, countMBean());
-    }
-
-    private int countMBean() throws MalformedObjectNameException, InstanceNotFoundException {
-        int count = 0;
-        for (int i = 0; i < 100; i++) {
-            String name = "org.apache.activemq:BrokerName=" + getName() + ",Type=Subscription,active=false,name=" + getName() + "_SubsId" + i;
-            ObjectName sub = new ObjectName(name);
-            try {
-                broker.getManagementContext().getObjectInstance(sub);
-                count++;
-            }
-            catch (InstanceNotFoundException ignore) {
-                // this should happen
-            }
-        }
-        return count;
-    }
-
-    private void startBroker(boolean deleteMessages) throws Exception {
-        broker = BrokerFactory.createBroker("broker:(vm://" + getName() + ")");
-        broker.setUseJmx(true);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.setBrokerName(getName());
-
-        broker.setPersistent(true);
-        KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter();
-        persistenceAdapter.setDirectory(new File("activemq-data/" + getName()));
-        broker.setPersistenceAdapter(persistenceAdapter);
-        if (deleteMessages) {
-            broker.setDeleteAllMessagesOnStartup(true);
-        }
-
-
-        broker.setKeepDurableSubsActive(true);
-
-        broker.start();
-        broker.waitUntilStarted();
-
-        connection = createConnection();
-    }
-
-    private void stopBroker() throws Exception {
-        if (connection != null)
-            connection.close();
-        connection = null;
-
-        if (broker != null) {
-            broker.stop();
-            broker.waitUntilStopped();
-        }
-        broker = null;
-    }
-
-    private void restartBroker() throws Exception {
-        stopBroker();
-        startBroker(false);
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://" + getName() + "?waitForStart=5000&create=false");
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        topic = (ActiveMQTopic) createDestination();
-        startBroker(true);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        stopBroker();
-        super.tearDown();
-    }
-
-    @Override
-    protected Connection createConnection() throws Exception {
-        Connection rc = super.createConnection();
-        rc.setClientID(getName());
-        rc.start();
-        return rc;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableUnsubscribeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableUnsubscribeTest.java
deleted file mode 100644
index 6a83016..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableUnsubscribeTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * 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.usecases;
-
-import java.lang.management.ManagementFactory;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.command.ActiveMQTopic;
-
-public class DurableUnsubscribeTest extends org.apache.activemq.TestSupport {
-
-    private BrokerService broker;
-    private Connection connection;
-    private ActiveMQTopic topic;
-
-    public void testUnsubscribe() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-        session.close();
-
-        Destination d = broker.getDestination(topic);
-        assertEquals("Subscription is missing.", 1, d.getConsumers().size());
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.unsubscribe("SubsId");
-        session.close();
-
-        assertEquals("Subscription exists.", 0, d.getConsumers().size());
-    }
-
-    public void testDestroy() throws Exception {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId2");
-        session.close();
-
-        connection.close();
-        connection = null;
-        Thread.sleep(1000);
-
-        Destination d = broker.getDestination(topic);
-        assertEquals("Subscription is missing.", 1, d.getConsumers().size());
-
-        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-        ObjectName[] subNames = broker.getAdminView().getInactiveDurableTopicSubscribers();
-        mbs.invoke(subNames[0], "destroy", new Object[0], new String[0]);
-
-        assertEquals("Subscription exists.", 0, d.getConsumers().size());
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://" + getName());
-    }
-
-    protected Connection createConnection() throws Exception {
-        Connection rc = super.createConnection();
-        rc.setClientID(getName());
-        return rc;
-    }
-
-    protected void setUp() throws Exception {
-        topic = (ActiveMQTopic) createDestination();
-        createBroker();
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        destroyBroker();
-    }
-
-    private void createBroker() throws Exception {
-        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
-        broker.setPersistent(false);
-        broker.setUseJmx(true);
-        broker.setBrokerName(getName());
-        broker.start();
-
-        connection = createConnection();
-    }
-
-    private void destroyBroker() throws Exception {
-        if (connection != null)
-            connection.close();
-        if (broker != null)
-            broker.stop();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java
deleted file mode 100755
index 4e6be25..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-
-import junit.framework.TestCase;
-
-/**
- * @author Oliver Belikan
- * 
- */
-public class ExceptionListenerTest extends TestCase implements ExceptionListener {
-    boolean isException;
-
-    public ExceptionListenerTest(String arg) {
-        super(arg);
-    }
-
-    public void testOnException() throws Exception {
-        /*
-         * TODO not sure yet if this is a valid test
-         * System.setProperty("activemq.persistenceAdapter",
-         * "org.apache.activemq.store.vm.VMPersistenceAdapter"); //
-         * configuration of container and all protocolls BrokerContainerImpl
-         * container = new BrokerContainerImpl("DefaultBroker");
-         * BrokerConnectorImpl connector = new BrokerConnectorImpl(container,
-         * "vm://localhost", new DefaultWireFormat()); container.start();
-         * ActiveMQConnectionFactory factory = new
-         * ActiveMQConnectionFactory("vm://localhost"); factory.start();
-         * Connection connection = factory.createConnection();
-         * connection.setExceptionListener(this); connection.start(); Session
-         * session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         * Destination destination = session.createTopic(getClass().getName());
-         * MessageProducer producer = session.createProducer(destination); try {
-         * Thread.currentThread().sleep(1000); } catch (Exception e) { }
-         * container.stop(); // now lets try send try {
-         * producer.send(session.createTextMessage("This will never get
-         * anywhere")); } catch (JMSException e) { log.info("Caught: " + e); }
-         * try { Thread.currentThread().sleep(1000); } catch (Exception e) { }
-         * assertTrue("Should have received an exception", isException);
-         */
-    }
-
-    public void onException(JMSException e) {
-        isException = true;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
deleted file mode 100644
index 2508443..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationStatistics;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import static org.apache.activemq.TestSupport.getDestination;
-import static org.apache.activemq.TestSupport.getDestinationStatistics;
-
-
-public class ExpiredMessagesTest extends CombinationTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ExpiredMessagesTest.class);
-    
-    BrokerService broker;
-    Connection connection;
-    Session session;
-    MessageProducer producer;
-    MessageConsumer consumer;
-    public ActiveMQDestination destination = new ActiveMQQueue("test");
-    public ActiveMQDestination dlqDestination = new ActiveMQQueue("ActiveMQ.DLQ");
-    public boolean useTextMessage = true;
-    public boolean useVMCursor = true;
-    
-    public static Test suite() {
-        return suite(ExpiredMessagesTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-	
-	protected void setUp() throws Exception {
-        final boolean deleteAllMessages = true;
-        broker = createBroker(deleteAllMessages, 100);
-    }
-	
-	public void testExpiredMessages() throws Exception {
-		
-		ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-		connection = factory.createConnection();
-		session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		producer = session.createProducer(destination);
-		producer.setTimeToLive(100);
-		consumer = session.createConsumer(destination);
-		connection.start();
-		final AtomicLong received = new AtomicLong();
-		
-		Thread consumerThread = new Thread("Consumer Thread") {
-			public void run() {
-				long start = System.currentTimeMillis();
-				try {
-					long end = System.currentTimeMillis();
-					while (end - start < 3000) {
-						if (consumer.receive(1000) != null) {
-						    received.incrementAndGet();
-						}
-						Thread.sleep(100);
-						end = System.currentTimeMillis();
-					}
-					consumer.close();
-				} catch (Throwable ex) {
-					ex.printStackTrace();
-				}
-			}
-		};
-		
-        consumerThread.start();
-		
-		final int numMessagesToSend = 10000;
-		Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                	int i = 0;
-                	while (i++ < numMessagesToSend) {
-                		producer.send(session.createTextMessage("test"));
-                	}
-                	producer.close();
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-		};
-		
-		producingThread.start();
-		
-        consumerThread.join();
-        producingThread.join();
-        session.close();
-        
-        final DestinationStatistics view = getDestinationStatistics(broker, destination);
-
-        // wait for all to inflight to expire
-        assertTrue("all inflight messages expired ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return view.getInflight().getCount() == 0;
-            }        
-        }));
-        assertEquals("Wrong inFlightCount: ", 0, view.getInflight().getCount());
-        
-        LOG.info("Stats: received: "  + received.get() + ", enqueues: " + view.getEnqueues().getCount() + ", dequeues: " + view.getDequeues().getCount()
-                + ", dispatched: " + view.getDispatched().getCount() + ", inflight: " + view.getInflight().getCount() + ", expiries: " + view.getExpired().getCount());
-        
-        // wait for all sent to get delivered and expire
-        assertTrue("all sent messages expired ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                long oldEnqueues = view.getEnqueues().getCount();
-                Thread.sleep(200);
-                LOG.info("Stats: received: "  + received.get() + ", size= " + view.getMessages().getCount() + ", enqueues: " + view.getDequeues().getCount() + ", dequeues: " + view.getDequeues().getCount()
-                        + ", dispatched: " + view.getDispatched().getCount() + ", inflight: " + view.getInflight().getCount() + ", expiries: " + view.getExpired().getCount());
-                return oldEnqueues == view.getEnqueues().getCount();
-            }           
-        }, 60*1000));
-        
-
-        LOG.info("Stats: received: "  + received.get() + ", size= " + view.getMessages().getCount() + ", enqueues: " + view.getEnqueues().getCount() + ", dequeues: " + view.getDequeues().getCount()
-                + ", dispatched: " + view.getDispatched().getCount() + ", inflight: " + view.getInflight().getCount() + ", expiries: " + view.getExpired().getCount());
-        
-        assertTrue("got at least what did not expire", received.get() >= view.getDequeues().getCount() - view.getExpired().getCount());
-        
-        assertTrue("all messages expired - queue size gone to zero " + view.getMessages().getCount(), Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                LOG.info("Stats: received: "  + received.get() + ", size= " + view.getMessages().getCount() + ", enqueues: " + view.getEnqueues().getCount() + ", dequeues: " + view.getDequeues().getCount()
-                        + ", dispatched: " + view.getDispatched().getCount() + ", inflight: " + view.getInflight().getCount() + ", expiries: " + view.getExpired().getCount());
-                return view.getMessages().getCount() == 0;
-            }
-        }));
-        
-        final long expiredBeforeEnqueue = numMessagesToSend - view.getEnqueues().getCount();
-        final long totalExpiredCount = view.getExpired().getCount() + expiredBeforeEnqueue;
-        
-        final DestinationStatistics dlqView = getDestinationStatistics(broker, dlqDestination);
-        LOG.info("DLQ stats: size= " + dlqView.getMessages().getCount() + ", enqueues: " + dlqView.getDequeues().getCount() + ", dequeues: " + dlqView.getDequeues().getCount()
-                + ", dispatched: " + dlqView.getDispatched().getCount() + ", inflight: " + dlqView.getInflight().getCount() + ", expiries: " + dlqView.getExpired().getCount());
-        
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return totalExpiredCount == dlqView.getMessages().getCount();
-            }
-        });
-        assertEquals("dlq contains all expired", totalExpiredCount, dlqView.getMessages().getCount());
-        
-        // memory check
-        assertEquals("memory usage is back to duck egg", 0, getDestination(broker, destination).getMemoryUsage().getPercentUsage());
-        assertTrue("memory usage is increased ", 0 < getDestination(broker, dlqDestination).getMemoryUsage().getPercentUsage());    
-        
-        // verify DLQ
-        MessageConsumer dlqConsumer = createDlqConsumer(connection);
-        final DLQListener dlqListener = new DLQListener();
-        dlqConsumer.setMessageListener(dlqListener);
-        
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return totalExpiredCount == dlqListener.count;
-            }
-        }, 60 * 1000);
-        
-        assertEquals("dlq returned all expired", dlqListener.count, totalExpiredCount);
-	}
-
-    class DLQListener implements MessageListener {
-        
-        int count = 0;
-        
-        public void onMessage(Message message) {
-            count++;
-        }
-        
-    };
-    
-	private MessageConsumer createDlqConsumer(Connection connection) throws Exception {
-	    return connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(dlqDestination);
-    }
-
-    public void initCombosForTestRecoverExpiredMessages() {
-	    addCombinationValues("useVMCursor", new Object[] {Boolean.TRUE, Boolean.FALSE});
-	}
-	
-	public void testRecoverExpiredMessages() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
-                "failover://tcp://localhost:61616");
-        connection = factory.createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(destination);
-        producer.setTimeToLive(2000);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-        Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                    int i = 0;
-                    while (i++ < 1000) {
-                        Message message = useTextMessage ? session
-                                .createTextMessage("test") : session
-                                .createObjectMessage("test");
-                        producer.send(message);
-                    }
-                    producer.close();
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-
-        producingThread.start();
-        producingThread.join();
-
-        DestinationStatistics view = getDestinationStatistics(broker, destination);
-        LOG.info("Stats: size: " + view.getMessages().getCount() + ", enqueues: " 
-                + view.getEnqueues().getCount() + ", dequeues: "
-                + view.getDequeues().getCount() + ", dispatched: "
-                + view.getDispatched().getCount() + ", inflight: "
-                + view.getInflight().getCount() + ", expiries: "
-                + view.getExpired().getCount());
-
-        LOG.info("stopping broker");
-        broker.stop();
-        broker.waitUntilStopped();
-
-        Thread.sleep(5000);
-
-        LOG.info("recovering broker");
-        final boolean deleteAllMessages = false;
-        broker = createBroker(deleteAllMessages, 5000);
-        
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                DestinationStatistics view = getDestinationStatistics(broker, destination);
-                LOG.info("Stats: size: " + view.getMessages().getCount() + ", enqueues: "
-                        + view.getEnqueues().getCount() + ", dequeues: "
-                        + view.getDequeues().getCount() + ", dispatched: "
-                        + view.getDispatched().getCount() + ", inflight: "
-                        + view.getInflight().getCount() + ", expiries: "
-                        + view.getExpired().getCount());
-                    
-                return view.getMessages().getCount() == 0;
-            }
-        });
-        
-        view = getDestinationStatistics(broker, destination);
-        assertEquals("Expect empty queue, QueueSize: ", 0, view.getMessages().getCount());
-        assertEquals("all dequeues were expired", view.getDequeues().getCount(), view.getExpired().getCount());
-    }
-
-	private BrokerService createBroker(boolean deleteAllMessages, long expireMessagesPeriod) throws Exception {
-	    BrokerService broker = new BrokerService();
-        broker.setBrokerName("localhost");
-        broker.setDestinations(new ActiveMQDestination[]{destination});
-        AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
-        adaptor.setDirectory(new File("target/expiredtest-data/"));
-        adaptor.setForceRecoverReferenceStore(true);
-        broker.setPersistenceAdapter(adaptor);
-        
-        PolicyEntry defaultPolicy = new PolicyEntry();
-        if (useVMCursor) {
-            defaultPolicy.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-        }
-        defaultPolicy.setExpireMessagesPeriod(expireMessagesPeriod);
-        defaultPolicy.setMaxExpirePageSize(1200);
-        PolicyMap policyMap = new PolicyMap();
-        policyMap.setDefaultEntry(defaultPolicy);
-        broker.setDestinationPolicy(policyMap);
-        broker.setDeleteAllMessagesOnStartup(deleteAllMessages);
-        broker.addConnector("tcp://localhost:61616");
-        broker.start();
-        broker.waitUntilStarted();
-        return broker;
-	}
-    
-    
-
-	protected void tearDown() throws Exception {
-		connection.stop();
-		broker.stop();
-		broker.waitUntilStopped();
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java
deleted file mode 100644
index 23e493a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesWithNoConsumerTest.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.management.ObjectName;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.DestinationViewMBean;
-import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class ExpiredMessagesWithNoConsumerTest extends CombinationTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ExpiredMessagesWithNoConsumerTest.class);
-
-    
-	BrokerService broker;
-	Connection connection;
-	Session session;
-	MessageProducer producer;
-	public ActiveMQDestination destination = new ActiveMQQueue("test");
-    public boolean optimizedDispatch = true;
-    public PendingQueueMessageStoragePolicy pendingQueuePolicy;
-	
-    public static Test suite() {
-        return suite(ExpiredMessagesWithNoConsumerTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-	
-    protected void createBrokerWithMemoryLimit() throws Exception {
-        doCreateBroker(true);
-    }
-    
-    protected void createBroker() throws Exception {
-        doCreateBroker(false);
-    }
-    
-    private void doCreateBroker(boolean memoryLimit) throws Exception {
-        broker = new BrokerService();
-        broker.setBrokerName("localhost");
-        broker.setUseJmx(true);
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.addConnector("tcp://localhost:61616");
-
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry defaultEntry = new PolicyEntry();
-        defaultEntry.setOptimizedDispatch(optimizedDispatch );
-        defaultEntry.setExpireMessagesPeriod(800);
-        defaultEntry.setMaxExpirePageSize(800);
-        
-        defaultEntry.setPendingQueuePolicy(pendingQueuePolicy);
-
-        if (memoryLimit) {
-            // so memory is not consumed by DLQ turn if off
-            defaultEntry.setDeadLetterStrategy(null);
-            defaultEntry.setMemoryLimit(200 * 1000);
-        }
-
-        policyMap.setDefaultEntry(defaultEntry);
-        broker.setDestinationPolicy(policyMap);
-
-        broker.start();
-
-        broker.waitUntilStarted();
-    }
-		
-    public void initCombosForTestExpiredMessagesWithNoConsumer() {
-        addCombinationValues("optimizedDispatch", new Object[] {Boolean.TRUE, Boolean.FALSE});
-        addCombinationValues("pendingQueuePolicy", new Object[] {null, new VMPendingQueueMessageStoragePolicy(), new FilePendingQueueMessageStoragePolicy()});
-    }
-    
-	public void testExpiredMessagesWithNoConsumer() throws Exception {
-		
-	    createBrokerWithMemoryLimit();
-	    
-		ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-		connection = factory.createConnection();
-		session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		producer = session.createProducer(destination);
-		producer.setTimeToLive(1000);
-		connection.start();
-		final long sendCount = 2000;
-		
-		final Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                	int i = 0;
-                	long tStamp = System.currentTimeMillis();
-                	while (i++ < sendCount) {
-                		producer.send(session.createTextMessage("test"));
-                		if (i%100 == 0) {
-                		    LOG.info("sent: " + i + " @ " + ((System.currentTimeMillis() - tStamp) / 100)  + "m/ms");
-                		    tStamp = System.currentTimeMillis() ;
-                		}
-                	}
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-		};
-		
-		producingThread.start();
-		
-		assertTrue("producer completed within time", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                producingThread.join(1000);
-                return !producingThread.isAlive();
-            }
-		}));
-		
-        final DestinationViewMBean view = createView(destination);
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
-                        + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
-                        + ", size= " + view.getQueueSize());
-                return sendCount == view.getExpiredCount();
-            }
-        });
-        LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
-                + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
-                + ", size= " + view.getQueueSize());
-        
-        assertEquals("All sent have expired", sendCount, view.getExpiredCount());
-        assertEquals("memory usage goes to duck egg", 0, view.getMemoryPercentUsage());
-	}
-    
-	// first ack delivered after expiry
-    public void testExpiredMessagesWithVerySlowConsumer() throws Exception {
-        createBroker();  
-        final long queuePrefetch = 600;
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=" + queuePrefetch);
-        connection = factory.createConnection();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        producer = session.createProducer(destination);
-        final int ttl = 4000;
-        producer.setTimeToLive(ttl);
-        
-        final long sendCount = 1500; 
-        final CountDownLatch receivedOneCondition = new CountDownLatch(1);
-        final CountDownLatch waitCondition = new CountDownLatch(1);
-        
-        MessageConsumer consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                try {
-                    LOG.info("Got my message: " + message);
-                    receivedOneCondition.countDown();
-                    waitCondition.await(60, TimeUnit.SECONDS);
-                    LOG.info("acking message: " + message);
-                    message.acknowledge();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    fail(e.toString());
-                }  
-            }        
-        });
-        
-        connection.start();
-      
-        
-        final Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                    int i = 0;
-                    long tStamp = System.currentTimeMillis();
-                    while (i++ < sendCount) {
-                        producer.send(session.createTextMessage("test"));
-                        if (i%100 == 0) {
-                            LOG.info("sent: " + i + " @ " + ((System.currentTimeMillis() - tStamp) / 100)  + "m/ms");
-                            tStamp = System.currentTimeMillis() ;
-                        }
-                    }
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-        
-        producingThread.start();
-        assertTrue("got one message", receivedOneCondition.await(20, TimeUnit.SECONDS));
-        
-        assertTrue("producer completed within time ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                producingThread.join(1000);
-                return !producingThread.isAlive();
-            }      
-        }, Wait.MAX_WAIT_MILLIS * 2));
-             
-        final DestinationViewMBean view = createView(destination);
-            
-        assertTrue("all dispatched up to default prefetch ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return queuePrefetch == view.getDispatchCount();
-            }
-        }));
-        assertTrue("All sent have expired ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return sendCount == view.getExpiredCount();
-            }
-        }));     
-        
-        LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
-                + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
-                + ", size= " + view.getQueueSize());
-        
-        // let the ack happen
-        waitCondition.countDown();
-        
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                // consumer ackLater(delivery ack for expired messages) is based on half the prefetch value
-                // which will leave half of the prefetch pending till consumer close
-                return (queuePrefetch/2) -1 == view.getInFlightCount();
-            }
-        });
-        LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
-                + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
-                + ", size= " + view.getQueueSize());
-        
-        
-        assertEquals("inflight reduces to half prefetch minus single delivered message", (queuePrefetch/2) -1, view.getInFlightCount());
-        assertEquals("size gets back to 0 ", 0, view.getQueueSize());
-        assertEquals("dequeues match sent/expired ", sendCount, view.getDequeueCount());
-        
-        consumer.close();
-        
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return 0 == view.getInFlightCount();
-            }
-        });
-        assertEquals("inflight goes to zeor on close", 0, view.getInFlightCount());
-      
-        LOG.info("done: " + getName());
-    }
-
-    public void testExpiredMessagesWithVerySlowConsumerCanContinue() throws Exception {
-        createBroker();
-        final long queuePrefetch = 600;
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=" + queuePrefetch);
-        connection = factory.createConnection();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        producer = session.createProducer(destination);
-        final int ttl = 4000;
-        producer.setTimeToLive(ttl);
-
-        final long sendCount = 1500;
-        final CountDownLatch receivedOneCondition = new CountDownLatch(1);
-        final CountDownLatch waitCondition = new CountDownLatch(1);
-        final AtomicLong received = new AtomicLong();
-        MessageConsumer consumer = session.createConsumer(destination);
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message message) {
-                try {
-                    LOG.info("Got my message: " + message);
-                    receivedOneCondition.countDown();
-                    received.incrementAndGet();
-                    waitCondition.await(60, TimeUnit.SECONDS);
-                    LOG.info("acking message: " + message);
-                    message.acknowledge();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    fail(e.toString());
-                }
-            }
-        });
-
-        connection.start();
-
-
-        final Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                    int i = 0;
-                    long tStamp = System.currentTimeMillis();
-                    while (i++ < sendCount) {
-                        producer.send(session.createTextMessage("test"));
-                        if (i%100 == 0) {
-                            LOG.info("sent: " + i + " @ " + ((System.currentTimeMillis() - tStamp) / 100)  + "m/ms");
-                            tStamp = System.currentTimeMillis() ;
-                        }
-                    }
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                }
-            }
-        };
-
-        producingThread.start();
-        assertTrue("got one message", receivedOneCondition.await(20, TimeUnit.SECONDS));
-
-        assertTrue("producer completed within time ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                producingThread.join(1000);
-                return !producingThread.isAlive();
-            }
-        }));
-
-        final DestinationViewMBean view = createView(destination);
-
-        assertTrue("all dispatched up to default prefetch ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return queuePrefetch == view.getDispatchCount();
-            }
-        }));
-        assertTrue("All sent have expired ", Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return sendCount == view.getExpiredCount();
-            }
-        }));
-
-        LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
-                + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
-                + ", size= " + view.getQueueSize());
-
-        // let the ack happen
-        waitCondition.countDown();
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                // consumer ackLater(delivery ack for expired messages) is based on half the prefetch value
-                // which will leave half of the prefetch pending till consumer close
-                return (queuePrefetch/2) -1 == view.getInFlightCount();
-            }
-        });
-        LOG.info("enqueue=" + view.getEnqueueCount() + ", dequeue=" + view.getDequeueCount()
-                + ", inflight=" + view.getInFlightCount() + ", expired= " + view.getExpiredCount()
-                + ", size= " + view.getQueueSize());
-
-
-        assertEquals("inflight reduces to half prefetch minus single delivered message", (queuePrefetch/2) -1, view.getInFlightCount());
-        assertEquals("size gets back to 0 ", 0, view.getQueueSize());
-        assertEquals("dequeues match sent/expired ", sendCount, view.getDequeueCount());
-
-
-        // produce some more
-        producer.setTimeToLive(0);
-        for (int i=0; i<sendCount; i++) {
-            producer.send(session.createTextMessage("test-" + i));
-        }
-
-        Wait.waitFor(new Wait.Condition() {
-             public boolean isSatisified() throws Exception {
-                 return received.get() >= sendCount;
-             }
-         });
-
-        consumer.close();
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return 0 == view.getInFlightCount();
-            }
-        });
-        assertEquals("inflight goes to zeor on close", 0, view.getInFlightCount());
-
-        LOG.info("done: " + getName());
-    }
-
-
-
-	protected DestinationViewMBean createView(ActiveMQDestination destination) throws Exception {
-        String domain = "org.apache.activemq";
-        ObjectName name;
-        if (destination.isQueue()) {
-            name = new ObjectName(domain + ":BrokerName=localhost,Type=Queue,Destination=test");
-        } else {
-            name = new ObjectName(domain + ":BrokerName=localhost,Type=Topic,Destination=test");
-        }
-        return (DestinationViewMBean) broker.getManagementContext().newProxyInstance(name, DestinationViewMBean.class,
-                true);
-    }
-
-	protected void tearDown() throws Exception {
-		connection.stop();
-		broker.stop();
-		broker.waitUntilStopped();
-	}
-
-	
-
-	
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java
deleted file mode 100755
index 33afc85..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.IOException;
-
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-
-/**
- * 
- */
-public class JDBCDurableSubscriptionTest extends DurableSubscriptionTestSupport {
-
-    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
-        JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
-        EmbeddedDataSource dataSource = new EmbeddedDataSource();
-        dataSource.setDatabaseName("derbyDb");
-        dataSource.setCreateDatabase("create");
-        jdbc.setDataSource(dataSource);
-        jdbc.setCleanupPeriod(1000); // set up small cleanup period
-        return jdbc;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java
deleted file mode 100644
index 3d04045..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/**
- * 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.usecases;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Vector;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-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.broker.region.policy.StorePendingDurableSubscriberMessageStoragePolicy;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-
-import static org.junit.Assert.assertTrue;
-
-public class JdbcDurableSubDupTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JdbcDurableSubDupTest.class);
-    final int prefetchVal = 150;
-    String urlOptions = "jms.watchTopicAdvisories=false";
-    String url = null;
-    String queueName = "topicTest?consumer.prefetchSize=" + prefetchVal;
-    String xmlMessage = "<Example 01234567890123456789012345678901234567890123456789 MessageText>";
-
-    String selector = "";
-    String clntVersion = "87";
-    String clntId = "timsClntId345" + clntVersion;
-    String subscriptionName = "subscriptionName-y" + clntVersion;
-    SimpleDateFormat dtf = new SimpleDateFormat("HH:mm:ss");
-
-    final int TO_RECEIVE = 5000;
-    BrokerService broker = null;
-    Vector<Throwable> exceptions = new Vector();
-    final int MAX_MESSAGES = 100000;
-    int[] dupChecker = new int[MAX_MESSAGES];
-
-    @Before
-    public void startBroker() throws Exception {
-        exceptions.clear();
-        for (int i = 0; i < MAX_MESSAGES; i++) {
-            dupChecker[i] = 0;
-        }
-        broker = new BrokerService();
-        broker.setAdvisorySupport(false);
-        broker.setPersistenceAdapter(new JDBCPersistenceAdapter());
-        PolicyEntry policyEntry = new PolicyEntry();
-        policyEntry.setMaxAuditDepth(2000);
-        policyEntry.setMaxPageSize(150);
-        policyEntry.setPrioritizedMessages(true);
-        PolicyMap policyMap = new PolicyMap();
-        policyMap.setDefaultEntry(policyEntry);
-        broker.setDestinationPolicy(policyMap);
-
-        broker.addConnector("tcp://localhost:0");
-        broker.setDeleteAllMessagesOnStartup(true);
-        broker.start();
-        broker.waitUntilStarted();
-        url = broker.getTransportConnectors().get(0).getConnectUri().toString() + "?" + urlOptions;
-    }
-
-    @After
-    public void stopBroker() throws Exception {
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    @Test
-    public void testNoDupsOnSlowConsumerReconnect() throws Exception {
-        JmsConsumerDup consumer = new JmsConsumerDup();
-        consumer.done.set(true);
-        consumer.run();
-
-        consumer.done.set(false);
-
-        LOG.info("serial production then consumption");
-        JmsProvider provider = new JmsProvider();
-        provider.run();
-
-        consumer.run();
-
-        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-
-        for (int i = 0; i < TO_RECEIVE; i++) {
-            assertTrue("got message " + i, dupChecker[i] == 1);
-        }
-    }
-
-    @Test
-    public void testNoDupsOnSlowConsumerLargePriorityGapReconnect() throws Exception {
-        JmsConsumerDup consumer = new JmsConsumerDup();
-        consumer.done.set(true);
-        consumer.run();
-
-        consumer.done.set(false);
-        JmsProvider provider = new JmsProvider();
-        provider.priorityModulator = 2500;
-        provider.run();
-
-        consumer.run();
-
-        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
-        for (int i = 0; i < TO_RECEIVE; i++) {
-            assertTrue("got message " + i, dupChecker[i] == 1);
-        }
-        
-    }
-
-    class JmsConsumerDup implements MessageListener {
-        long count = 0;
-
-        AtomicBoolean done = new AtomicBoolean(false);
-
-        public void run() {
-            Connection connection = null;
-            Session session;
-            Topic topic;
-            ActiveMQConnectionFactory factory;
-            MessageConsumer consumer;
-
-            factory = new ActiveMQConnectionFactory(url);
-
-            try {
-                connection = factory.createConnection("MyUsername", "MyPassword");
-                connection.setClientID(clntId);
-                connection.start();
-                session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                topic = session.createTopic(queueName);
-                consumer = session.createDurableSubscriber(topic, subscriptionName, selector, false);
-                consumer.setMessageListener(this);
-                LOG.info("Waiting for messages...");
-
-                while (!done.get()) {
-                    TimeUnit.SECONDS.sleep(5);
-                    if (count == TO_RECEIVE || !exceptions.isEmpty()) {
-                        done.set(true);
-                    }
-                }
-            } catch (Exception e) {
-                LOG.error("caught", e);
-                exceptions.add(e);
-                throw new RuntimeException(e);
-            } finally {
-                if (connection != null) {
-                    try {
-                        LOG.info("consumer done (" + exceptions.isEmpty() + "), closing connection");
-                        connection.close();
-                    } catch (JMSException e) {
-                        e.printStackTrace();
-                    }
-                }
-            }
-        }
-
-        public void onMessage(Message message) {
-            ++count;
-
-            try {
-                Thread.sleep(0L);
-            } catch (InterruptedException e) {
-            }
-            ;
-
-            try {
-                TextMessage m = (TextMessage) message;
-
-                if (count%100 == 0) {
-                    LOG.info("Rcvd Msg #-" + count + " " + m.getText()
-                            + " Sent->" + dtf.format(new Date(m.getJMSTimestamp()))
-                            + " Recv->" + dtf.format(new Date())
-                            + " Expr->" + dtf.format(new Date(m.getJMSExpiration()))
-                            + ", mid: " + m.getJMSMessageID()
-                    );
-                }
-                int i = m.getIntProperty("SeqNo");
-
-                //check for duplicate messages
-                if (i < MAX_MESSAGES) {
-                    if (dupChecker[i] == 1) {
-                        LOG.error("Duplicate message received at count: " + count + ", id: " + m.getJMSMessageID());
-                        exceptions.add(new RuntimeException("Got Duplicate at: " + m.getJMSMessageID()));
-
-                    } else {
-                        dupChecker[i] = 1;
-                    }
-                }
-            } catch (JMSException e) {
-                LOG.error("caught ", e);
-                exceptions.add(e);
-            }
-        }
-    }
-
-
-    class JmsProvider implements Runnable {
-
-        int priorityModulator = 10;
-
-        public void run() {
-
-            Connection connection;
-            Session session;
-            Topic topic;
-
-            ActiveMQConnectionFactory factory;
-            MessageProducer messageProducer;
-            long timeToLive = 0l;
-
-            TextMessage message = null;
-
-            factory = new ActiveMQConnectionFactory(url);
-
-            try {
-                connection = factory.createConnection("MyUserName", "MyPassword");
-                session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                topic = session.createTopic(queueName);
-                messageProducer = session.createProducer(topic);
-                messageProducer.setPriority(3);
-                messageProducer.setTimeToLive(timeToLive);
-                messageProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
-
-                int msgSeqNo = 0;
-                int NUM_MSGS = 1000;
-                int NUM_GROUPS = TO_RECEIVE/NUM_MSGS;
-                for (int n = 0; n < NUM_GROUPS; n++) {
-
-                    message = session.createTextMessage();
-
-                    for (int i = 0; i < NUM_MSGS; i++) {
-                        int priority = 0;
-                        if (priorityModulator <= 10) {
-                            priority = msgSeqNo % priorityModulator;
-                        } else {
-                            priority = (msgSeqNo >= priorityModulator) ? 9 : 0;
-                        }
-                        message.setText(xmlMessage + msgSeqNo + "-" + priority);
-                        message.setJMSPriority(priority);
-                        message.setIntProperty("SeqNo", msgSeqNo);
-                        if (i > 0 && i%100 == 0) {
-                            LOG.info("Sending message: " + message.getText());
-                        }
-                        messageProducer.send(message, DeliveryMode.PERSISTENT, message.getJMSPriority(), timeToLive);
-                        msgSeqNo++;
-                    }
-                    try {
-                        Thread.sleep(1000L);
-                    } catch (InterruptedException e) {
-                        e.printStackTrace();
-                        exceptions.add(e);
-                    }
-                }
-
-            } catch (JMSException e) {
-                LOG.error("caught ", e);
-                e.printStackTrace();
-                exceptions.add(e);
-
-            }
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java
deleted file mode 100755
index 8634be3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.journal.JournalPersistenceAdapterFactory;
-
-/**
- * 
- */
-public class JournalDurableSubscriptionTest extends DurableSubscriptionTestSupport {
-
-    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
-        File dataDir = new File("target/test-data/durableJournal");
-        JournalPersistenceAdapterFactory factory = new JournalPersistenceAdapterFactory();
-        factory.setDataDirectoryFile(dataDir);
-        factory.setUseJournal(true);
-        factory.setJournalLogFileSize(1024 * 64);
-        return factory.createPersistenceAdapter();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDBDurableSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDBDurableSubscriptionTest.java
deleted file mode 100644
index 26faccc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDBDurableSubscriptionTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.IOException;
-import org.apache.activemq.store.PersistenceAdapter;
-
-public class KahaDBDurableSubscriptionTest extends DurableSubscriptionTestSupport {
-
-    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
-        return null; // use default
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDurableSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDurableSubscriptionTest.java
deleted file mode 100755
index f7a95e3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDurableSubscriptionTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-
-/**
- * 
- */
-public class KahaDurableSubscriptionTest extends DurableSubscriptionTestSupport {
-
-    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
-        File dataDir = new File("target/test-data/durableKaha");
-        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter();
-        adaptor.setDirectory(dataDir);
-        return adaptor;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ManagedDurableSubscriptionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ManagedDurableSubscriptionTest.java
deleted file mode 100644
index b16197c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ManagedDurableSubscriptionTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.management.ObjectName;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-
-public class ManagedDurableSubscriptionTest extends org.apache.activemq.TestSupport {
-
-    BrokerService broker = null;
-    Connection connection = null;
-    ActiveMQTopic topic;
-
-    public void testJMXSubscriptions() throws Exception {
-        // create durable subscription
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-        session.close();
-
-        // restart the broker
-        stopBroker();
-        startBroker();
-
-        ObjectName inactiveSubscriptionObjectName = broker.getAdminView().getInactiveDurableTopicSubscribers()[0];
-
-        Object inactive = broker.getManagementContext().getAttribute(inactiveSubscriptionObjectName, "Active");
-        assertTrue("Subscription is active.", Boolean.FALSE.equals(inactive));
-
-        // activate
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-
-        ObjectName activeSubscriptionObjectName = broker.getAdminView().getDurableTopicSubscribers()[0];
-
-        Object active = broker.getManagementContext().getAttribute(activeSubscriptionObjectName, "Active");
-        assertTrue("Subscription is INactive.", Boolean.TRUE.equals(active));
-
-        // deactivate
-        connection.close();
-        connection = null;
-
-        inactive = broker.getManagementContext().getAttribute(inactiveSubscriptionObjectName, "Active");
-        assertTrue("Subscription is active.", Boolean.FALSE.equals(inactive));
-
-    }
-
-    private void startBroker() throws Exception {
-        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
-        broker.setKeepDurableSubsActive(false);
-        broker.setPersistent(true);
-        KahaPersistenceAdapter persistenceAdapter = new KahaPersistenceAdapter();
-        persistenceAdapter.setDirectory(new File("activemq-data/" + getName()));
-        broker.setPersistenceAdapter(persistenceAdapter);
-        broker.setUseJmx(true);
-        broker.getManagementContext().setCreateConnector(false);
-        broker.setBrokerName(getName());
-        broker.start();
-
-        connection = createConnection();
-    }
-
-    private void stopBroker() throws Exception {
-        if (connection != null)
-            connection.close();
-        connection = null;
-        if (broker != null)
-            broker.stop();
-        broker = null;
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://" + getName() + "?waitForStart=5000&create=false");
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        topic = (ActiveMQTopic) createDestination();
-        startBroker();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        stopBroker();
-        super.tearDown();
-    }
-
-    @Override
-    protected Connection createConnection() throws Exception {
-        Connection rc = super.createConnection();
-        rc.setClientID(getName());
-        rc.start();
-        return rc;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java
deleted file mode 100644
index 4e008de..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- * 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.usecases;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.*;
-import javax.jms.Queue;
-import java.util.*;
-import java.util.concurrent.CountDownLatch;
-
-/*
- * Test plan:
- * Producer: publish messages into a queue, with 10 message groups, closing the group with seq=-1 on message 5 and message 10
- * Consumers: 2 consumers created after all messages are sent
- *
- * Expected: for each group, messages 1-5 are handled by one consumer and messages 6-10 are handled by the other consumer.  Messages
- * 1 and 6 have the JMSXGroupFirstForConsumer property set to true.
- */
-public class MessageGroupCloseTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(MessageGroupNewConsumerTest.class);
-    private Connection connection;
-    // Released after all messages are created
-    private CountDownLatch latchMessagesCreated = new CountDownLatch(1);
-
-    private int messagesSent, messagesRecvd1, messagesRecvd2, messageGroupCount, errorCountFirstForConsumer, errorCountWrongConsumerClose, errorCountDuplicateClose;
-    // groupID, count
-    private HashMap<String, Integer> messageGroups1 = new HashMap<String, Integer>();
-    private HashMap<String, Integer> messageGroups2 = new HashMap<String, Integer>();
-    private HashSet<String> closedGroups1 = new HashSet<String>();
-    private HashSet<String> closedGroups2 = new HashSet<String>();
-    // with the prefetch too high, this bug is not realized
-    private static final String connStr =
-        //"tcp://localhost:61616";
-        "vm://localhost?broker.persistent=false&broker.useJmx=false&jms.prefetchPolicy.all=1";
-
-    public void testNewConsumer() throws JMSException, InterruptedException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(connStr);
-        connection = factory.createConnection();
-        connection.start();
-        final String queueName = this.getClass().getSimpleName();
-        final Thread producerThread = new Thread() {
-            public void run() {
-                try {
-                    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                    Queue queue = session.createQueue(queueName);
-                    MessageProducer prod = session.createProducer(queue);
-                    for (int i=0; i<10; i++) {
-                        for (int j=0; j<10; j++) {
-                            int seq = j + 1;
-                            if ((j+1) % 5 == 0) {
-                                seq = -1;
-                            }
-                            Message message = generateMessage(session, Integer.toString(i), seq);
-                            prod.send(message);
-                            session.commit();
-                            messagesSent++;
-                            LOG.info("Sent message: group=" + i + ", seq="+ seq);
-                            //Thread.sleep(20);
-                        }
-                        if (i % 100 == 0) {
-                            LOG.info("Sent messages: group=" + i);
-                        }
-                        messageGroupCount++;
-                    }
-                    LOG.info(messagesSent+" messages sent");
-                    latchMessagesCreated.countDown();
-                    prod.close();
-                    session.close();
-                } catch (Exception e) {
-                    LOG.error("Producer failed", e);
-                }
-            }
-        };
-        final Thread consumerThread1 = new Thread() {
-            public void run() {
-                try {
-                    latchMessagesCreated.await();
-                    LOG.info("starting consumer1");
-                    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                    Queue queue = session.createQueue(queueName);
-                    MessageConsumer con1 = session.createConsumer(queue);
-                    while(true) {
-                        Message message = con1.receive(5000);
-                        if (message == null) break;
-                        LOG.info("Con1: got message "+formatMessage(message));
-                        checkMessage(message, "Con1", messageGroups1, closedGroups1);
-                        session.commit();
-                        messagesRecvd1++;
-                        if (messagesRecvd1 % 100 == 0) {
-                            LOG.info("Con1: got messages count=" + messagesRecvd1);
-                        }
-                        //Thread.sleep(50);
-                    }
-                    LOG.info("Con1: total messages=" + messagesRecvd1);
-                    LOG.info("Con1: total message groups=" + messageGroups1.size());
-                    con1.close();
-                    session.close();
-                } catch (Exception e) {
-                    LOG.error("Consumer 1 failed", e);
-                }
-            }
-        };
-        final Thread consumerThread2 = new Thread() {
-            public void run() {
-                try {
-                    latchMessagesCreated.await();
-                    LOG.info("starting consumer2");
-                    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                    Queue queue = session.createQueue(queueName);
-                    MessageConsumer con2 = session.createConsumer(queue);
-                    while(true) {
-                        Message message = con2.receive(5000);
-                        if (message == null) { break; }
-                        LOG.info("Con2: got message "+formatMessage(message));
-                        checkMessage(message, "Con2", messageGroups2, closedGroups2);
-                        session.commit();
-                        messagesRecvd2++;
-                        if (messagesRecvd2 % 100 == 0) {
-                            LOG.info("Con2: got messages count=" + messagesRecvd2);
-                        }
-                        //Thread.sleep(50);
-                    }
-                    con2.close();
-                    session.close();
-                    LOG.info("Con2: total messages=" + messagesRecvd2);
-                    LOG.info("Con2: total message groups=" + messageGroups2.size());
-                } catch (Exception e) {
-                    LOG.error("Consumer 2 failed", e);
-                }
-            }
-        };
-        consumerThread2.start();
-        consumerThread1.start();
-        producerThread.start();
-        // wait for threads to finish
-        producerThread.join();
-        consumerThread1.join();
-        consumerThread2.join();
-        connection.close();
-        // check results
-
-        assertEquals("consumers should get all the messages", messagesSent, messagesRecvd1 + messagesRecvd2);
-        assertEquals("not all message groups closed for consumer 1", messageGroups1.size(), closedGroups1.size());
-        assertEquals("not all message groups closed for consumer 2", messageGroups2.size(), closedGroups2.size());
-        assertTrue("producer failed to send any messages", messagesSent > 0);
-        assertEquals("JMSXGroupFirstForConsumer not set", 0, errorCountFirstForConsumer);
-        assertEquals("wrong consumer got close message", 0, errorCountWrongConsumerClose);
-        assertEquals("consumer got duplicate close message", 0, errorCountDuplicateClose);
-    }
-
-    public Message generateMessage(Session session, String groupId, int seq) throws JMSException {
-        TextMessage m = session.createTextMessage();
-        m.setJMSType("TEST_MESSAGE");
-        m.setStringProperty("JMSXGroupID", groupId);
-        m.setIntProperty("JMSXGroupSeq", seq);
-        m.setText("<?xml?><testMessage/>");
-        return m;
-    }
-    public String formatMessage(Message m) {
-        try {
-            return "group="+m.getStringProperty("JMSXGroupID")+", seq="+m.getIntProperty("JMSXGroupSeq");
-        } catch (Exception e) {
-            return e.getClass().getSimpleName()+": "+e.getMessage();
-        }
-    }
-    public void checkMessage(Message m, String consumerId, Map<String, Integer> messageGroups, Set<String> closedGroups) throws JMSException {
-        String groupId = m.getStringProperty("JMSXGroupID");
-        int seq = m.getIntProperty("JMSXGroupSeq");
-        Integer count = messageGroups.get(groupId);
-        if (count == null) {
-            // first time seeing this group
-            if (!m.propertyExists("JMSXGroupFirstForConsumer") ||
-                !m.getBooleanProperty("JMSXGroupFirstForConsumer")) {
-                LOG.info(consumerId + ": JMSXGroupFirstForConsumer not set for group=" + groupId + ", seq=" +seq);
-                errorCountFirstForConsumer++;
-            }
-            if (seq == -1) {
-                closedGroups.add(groupId);
-                LOG.info(consumerId + ": wrong consumer got close message for group=" + groupId);
-                errorCountWrongConsumerClose++;
-            }
-            messageGroups.put(groupId, 1);
-        } else {
-            // existing group
-            if (closedGroups.contains(groupId)) {
-                // group reassigned to same consumer
-                closedGroups.remove(groupId);
-                if (!m.propertyExists("JMSXGroupFirstForConsumer") ||
-                    !m.getBooleanProperty("JMSXGroupFirstForConsumer")) {
-                    LOG.info(consumerId + ": JMSXGroupFirstForConsumer not set for group=" + groupId + ", seq=" +seq);
-                    errorCountFirstForConsumer++;
-                }
-                if (seq == -1) {
-                    LOG.info(consumerId + ": consumer got duplicate close message for group=" + groupId);
-                    errorCountDuplicateClose++;
-                }
-            }
-            if (seq == -1) {
-                closedGroups.add(groupId);
-            }
-            messageGroups.put(groupId, count + 1);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java
deleted file mode 100644
index 134d07c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupDelayedTest.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-
-public class MessageGroupDelayedTest extends JmsTestSupport {
-  public static final Logger log = LoggerFactory.getLogger(MessageGroupDelayedTest.class);
-  protected Connection connection;
-  protected Session session;
-  protected MessageProducer producer;
-  protected Destination destination;
-  
-  public int consumersBeforeDispatchStarts;
-  public int timeBeforeDispatchStarts;
-  
-  BrokerService broker;
-  protected TransportConnector connector;
-  
-  protected HashMap<String, Integer> messageCount = new HashMap<String, Integer>();
-  protected HashMap<String, Set<String>> messageGroups = new HashMap<String, Set<String>>();
-  
-  public static Test suite() {
-      return suite(MessageGroupDelayedTest.class);
-  }
-
-  public static void main(String[] args) {
-      junit.textui.TestRunner.run(suite());
-  }
-
-  public void setUp() throws Exception {
-	broker = createBroker();  
-	broker.start();
-    ActiveMQConnectionFactory connFactory = new ActiveMQConnectionFactory(connector.getConnectUri() + "?jms.prefetchPolicy.all=1");
-    connection = connFactory.createConnection();
-    session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-    destination = new ActiveMQQueue("test-queue2");
-    producer = session.createProducer(destination);
-    connection.start();
-  }
-  
-  protected BrokerService createBroker() throws Exception {
-      BrokerService service = new BrokerService();
-      service.setPersistent(false);
-      service.setUseJmx(false);
-
-      // Setup a destination policy where it takes only 1 message at a time.
-      PolicyMap policyMap = new PolicyMap();
-      PolicyEntry policy = new PolicyEntry();
-      log.info("testing with consumersBeforeDispatchStarts=" + consumersBeforeDispatchStarts + " and timeBeforeDispatchStarts=" + timeBeforeDispatchStarts);
-      policy.setConsumersBeforeDispatchStarts(consumersBeforeDispatchStarts);
-      policy.setTimeBeforeDispatchStarts(timeBeforeDispatchStarts);
-      policyMap.setDefaultEntry(policy);
-      service.setDestinationPolicy(policyMap);
-
-      connector = service.addConnector("tcp://localhost:0");
-      return service;
-  }
-  
-  public void tearDown() throws Exception {
-      producer.close();
-      session.close();
-      connection.close();
-      broker.stop();
-  }
-  
-  
-  
-  public void initCombosForTestDelayedDirectConnectionListener() {
-	  addCombinationValues("consumersBeforeDispatchStarts", new Object[] {0, 3, 5});
-	  addCombinationValues("timeBeforeDispatchStarts", new Object[] {0, 100});
-  }
-  
-  public void testDelayedDirectConnectionListener() throws Exception {
-	  
-	for(int i = 0; i < 10; i++) {
-      Message msga = session.createTextMessage("hello a");
-      msga.setStringProperty("JMSXGroupID", "A");
-      producer.send(msga);
-      Message msgb = session.createTextMessage("hello b");
-      msgb.setStringProperty("JMSXGroupID", "B");
-      producer.send(msgb);
-      Message msgc = session.createTextMessage("hello c");
-      msgc.setStringProperty("JMSXGroupID", "C");
-      producer.send(msgc);
-    }
-    log.info("30 messages sent to group A/B/C");
-   
-    int[] counters = {10, 10, 10};
-    
-    CountDownLatch startSignal = new CountDownLatch(1);
-    CountDownLatch doneSignal = new CountDownLatch(1);
-
-    messageCount.put("worker1", 0);
-    messageGroups.put("worker1", new HashSet<String>());
-    Worker worker1 = new Worker(connection, destination, "worker1", startSignal, doneSignal, counters, messageCount, messageGroups);
-    messageCount.put("worker2", 0);
-    messageGroups.put("worker2", new HashSet<String>());
-    Worker worker2 = new Worker(connection, destination, "worker2", startSignal, doneSignal, counters, messageCount, messageGroups);
-    messageCount.put("worker3", 0);
-    messageGroups.put("worker3", new HashSet<String>());
-    Worker worker3 = new Worker(connection, destination, "worker3", startSignal, doneSignal, counters, messageCount, messageGroups);
-
-
-    new Thread(worker1).start();
-    new Thread(worker2).start();
-    new Thread(worker3).start();
-
-    startSignal.countDown();
-    doneSignal.await();
-    
-    // check results
-    if (consumersBeforeDispatchStarts == 0 && timeBeforeDispatchStarts == 0) {
-    	log.info("Ignoring results because both parameters are 0");
-    	return;
-    }
-    
-    for (String worker: messageCount.keySet()) {
-    	log.info("worker " + worker + " received " + messageCount.get(worker) + " messages from groups " + messageGroups.get(worker));
-    	assertEquals("worker " + worker + " received " + messageCount.get(worker) + " messages from groups " + messageGroups.get(worker)
-    			, 10, messageCount.get(worker).intValue());
-    	assertEquals("worker " + worker + " received " + messageCount.get(worker) + " messages from groups " + messageGroups.get(worker)
-    			, 1, messageGroups.get(worker).size());
-    }
-    
-  }
-
-  private static final class Worker implements Runnable {
-    private Connection connection = null;
-    private Destination queueName = null;
-    private String workerName = null;
-    private CountDownLatch startSignal = null;
-    private CountDownLatch doneSignal = null;
-    private int[] counters = null;
-    private HashMap<String, Integer> messageCount;
-    private HashMap<String, Set<String>>messageGroups;
-    
-    
-    private Worker(Connection connection, Destination queueName, String workerName, CountDownLatch startSignal, CountDownLatch doneSignal, int[] counters, HashMap<String, Integer> messageCount, HashMap<String, Set<String>>messageGroups) {
-      this.connection = connection;
-      this.queueName = queueName;
-      this.workerName = workerName;
-      this.startSignal = startSignal;
-      this.doneSignal = doneSignal;
-      this.counters = counters;
-      this.messageCount = messageCount;
-      this.messageGroups = messageGroups;
-    }
-    
-    private void update(String group) {
-        int msgCount = messageCount.get(workerName);
-        messageCount.put(workerName, msgCount + 1);
-        Set<String> groups = messageGroups.get(workerName);
-        groups.add(group);
-        messageGroups.put(workerName, groups);
-    }
-    
-    public void run() {
-
-      try {
-        log.info(workerName);
-        startSignal.await();
-        Session sess = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = sess.createConsumer(queueName);
-
-        while(true) {
-          if(counters[0] == 0 && counters[1] == 0 && counters[2] == 0 ) {
-            doneSignal.countDown();
-            log.info(workerName + " done...");
-            break;
-          }
-          
-          Message msg = consumer.receive(500);
-          if(msg == null)
-            continue;
-
-          String group = msg.getStringProperty("JMSXGroupID");
-          boolean first = msg.getBooleanProperty("JMSXGroupFirstForConsumer");
-
-          if("A".equals(group)){
-        	--counters[0];
-            update(group);
-            Thread.sleep(500);
-          }
-          else if("B".equals(group)) {
-        	--counters[1];
-            update(group);
-            Thread.sleep(100);
-          }
-          else if("C".equals(group)) {
-        	--counters[2];
-            update(group);
-            Thread.sleep(10);
-          }
-          else {
-            log.warn("unknown group");
-          }
-          if (counters[0] != 0 || counters[1] != 0 || counters[2] != 0 ) {
-        	  msg.acknowledge();
-          }
-        }
-        consumer.close();
-        sess.close();
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-    }
-  }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java
deleted file mode 100644
index 5d43f66..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.concurrent.CountDownLatch;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import junit.framework.TestCase;
-
-/*
- * Test plan:
- * Producer: publish messages into a queue, with three message groups
- * Consumer1: created before any messages are created
- * Consumer2: created after consumer1 has processed one message from each message group
- * 
- * All three groups are handled by to consumer1, so consumer2 should not get any messages.
- * See bug AMQ-2016: Message grouping fails when consumers are added
- */
-public class MessageGroupNewConsumerTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(MessageGroupNewConsumerTest.class);
-    private Connection connection;
-    // Released after the messages are created
-    private CountDownLatch latchMessagesCreated = new CountDownLatch(1);
-    // Released after one message from each group is consumed
-    private CountDownLatch latchGroupsAcquired = new CountDownLatch(1);
-
-    private static final String[] groupNames = { "GrA", "GrB", "GrC" };
-    private int messagesSent, messagesRecvd1, messagesRecvd2;
-    // with the prefetch too high, this bug is not realized
-    private static final String connStr = "vm://localhost?broker.persistent=false&broker.useJmx=false&jms.prefetchPolicy.all=1";
-
-    public void testNewConsumer() throws JMSException, InterruptedException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(connStr);
-        connection = factory.createConnection();
-        connection.start();
-        final String queueName = this.getClass().getSimpleName();
-        final Thread producerThread = new Thread() {
-            public void run() {
-                try {
-                    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                    Queue queue = session.createQueue(queueName);
-                    MessageProducer prod = session.createProducer(queue);
-                    for (int i=0; i<10; i++) {
-                        for(String group : groupNames) {
-                            Message message = generateMessage(session, group, i+1);
-                            prod.send(message);
-                            session.commit();
-                            messagesSent++;
-                        }
-                        LOG.info("Sent message seq "+ (i+1));
-                        if (i==0) {
-                            latchMessagesCreated.countDown();
-                        }
-                        if (i==2) {
-                            LOG.info("Prod: Waiting for groups");
-                            latchGroupsAcquired.await();
-                        }
-                        Thread.sleep(20);
-                    }
-                    LOG.info(messagesSent+" messages sent");
-                    prod.close();
-                    session.close();
-                } catch (Exception e) {
-                    LOG.error("Producer failed", e);
-                }
-            }
-        };
-        final Thread consumerThread1 = new Thread() {
-            public void run() {
-                try {
-                    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                    Queue queue = session.createQueue(queueName);
-                    MessageConsumer con1 = session.createConsumer(queue);
-                    latchMessagesCreated.await();
-                    while(true) {
-                        Message message = con1.receive(1000);
-                        if (message == null)  break;
-                        LOG.info("Con1 got message "+formatMessage(message));
-                        session.commit();
-                        messagesRecvd1++;
-                        // since we get the messages in order, the first few messages will be one from each group
-                        // after we get one from each group, start the other consumer
-                        if (messagesRecvd1 == groupNames.length) {
-                            LOG.info("All groups acquired");
-                            latchGroupsAcquired.countDown();
-                            Thread.sleep(1000);
-                        }
-                        Thread.sleep(50);
-                    }
-                    LOG.info(messagesRecvd1+" messages received by consumer1");
-                    con1.close();
-                    session.close();
-                } catch (Exception e) {
-                    LOG.error("Consumer 1 failed", e);
-                }
-            }
-        };
-        final Thread consumerThread2 = new Thread() {
-            public void run() {
-                try {
-                    latchGroupsAcquired.await();
-                    while(consumerThread1.isAlive()) {
-                        LOG.info("(re)starting consumer2");
-                        Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
-                        Queue queue = session.createQueue(queueName);
-                        MessageConsumer con2 = session.createConsumer(queue);
-                        while(true) {
-                            Message message = con2.receive(500);
-                            if (message == null) break;
-                            LOG.info("Con2 got message       "+formatMessage(message));
-                            session.commit();
-                            messagesRecvd2++;
-                            Thread.sleep(50);
-                        }
-                        con2.close();
-                        session.close();
-                    }
-                    LOG.info(messagesRecvd2+" messages received by consumer2");
-                } catch (Exception e) {
-                    LOG.error("Consumer 2 failed", e);
-                }
-            }
-        };
-        consumerThread2.start();
-        consumerThread1.start();
-        producerThread.start();
-        // wait for threads to finish
-        producerThread.join();
-        consumerThread1.join();
-        consumerThread2.join();
-        connection.close();
-        // check results
-        assertEquals("consumer 2 should not get any messages", 0, messagesRecvd2);
-        assertEquals("consumer 1 should get all the messages", messagesSent, messagesRecvd1);
-        assertTrue("producer failed to send any messages", messagesSent > 0);
-    }
-
-    public Message generateMessage(Session session, String groupId, int seq) throws JMSException {
-        TextMessage m = session.createTextMessage();
-        m.setJMSType("TEST_MESSAGE");
-        m.setStringProperty("JMSXGroupID", groupId);
-        m.setIntProperty("JMSXGroupSeq", seq);
-        m.setText("<?xml?><testMessage/>");
-        return m;
-    }
-    public String formatMessage(Message m) {
-        try {
-            return m.getStringProperty("JMSXGroupID")+"-"+m.getIntProperty("JMSXGroupSeq")+"-"+m.getBooleanProperty("JMSXGroupFirstForConsumer");
-        } catch (Exception e) {
-            return e.getClass().getSimpleName()+": "+e.getMessage();
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java
deleted file mode 100644
index 8a83ee3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-import junit.framework.Test;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-
-public class MessageReroutingTest extends JmsMultipleBrokersTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(MessageReroutingTest.class);
-    
-    
-    public Destination dest;
-    public static final int MESSAGE_COUNT = 50;
-
-    protected void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/rerouting-activemq-D.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/rerouting-activemq-C.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/rerouting-activemq-B.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/rerouting-activemq-A.xml"));
-
-        brokers.get("broker-A").broker.waitUntilStarted();
-    }
-    
-    public void initCombos() {
-        addCombinationValues("dest", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")});
-    }
-    
-    public void testMessageRerouting() throws Exception {
-        MessageConsumer consumer = createConsumer("broker-D", dest);
-        
-        MessageIdList received = getConsumerMessages("broker-D", consumer);
-        
-        Thread.sleep(2000); //wait for subs to propagate
-
-        // send/receive messages
-        sendMessages("broker-A", dest, MESSAGE_COUNT);
-        received.waitForMessagesToArrive(MESSAGE_COUNT);
-        LOG.info("received " +  received.getMessageCount() + " messages");
-        assertEquals(MESSAGE_COUNT, received.getMessageCount());
-        
-        brokers.get("broker-B").broker.stop();
-        brokers.get("broker-B").broker.waitUntilStopped();
-        Thread.sleep(2000);
-        
-        // ensure send/receive still works
-        sendMessages("broker-A", dest, MESSAGE_COUNT);
-        received.waitForMessagesToArrive(MESSAGE_COUNT);
-        LOG.info("received " +  received.getMessageCount() + " messages");
-        assertTrue("Didn't receive any more messages " + received.getMessageCount(), received.getMessageCount() > MESSAGE_COUNT);
-        
-        
-    }
-
-    
-    public static Test suite() {
-        return suite(MessageReroutingTest.class);
-    }
-    
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java
deleted file mode 100644
index bd5c4c8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * 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.usecases;
-
-import java.lang.Thread.UncaughtExceptionHandler;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport implements UncaughtExceptionHandler {
-    public static final int BROKER_COUNT = 6; // number of brokers to network
-    public static final int CONSUMER_COUNT = 25; // consumers per broker
-    public static final int PRODUCER_COUNT = 3; // producers per broker
-    public static final int MESSAGE_COUNT = 20; // messages per producer
-
-    private static final Logger LOG = LoggerFactory.getLogger(MultiBrokersMultiClientsTest.class);
-
-    protected Map<String, MessageConsumer> consumerMap;
-    Map<Thread, Throwable> unhandeledExceptions = new HashMap<Thread, Throwable>();
-
-    public void testTopicAllConnected() throws Exception {
-        bridgeAllBrokers();
-        startAllBrokers();
-        waitForBridgeFormation();
-
-        // Setup topic destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        CountDownLatch latch = new CountDownLatch(BROKER_COUNT * PRODUCER_COUNT * BROKER_COUNT * CONSUMER_COUNT * MESSAGE_COUNT);
-
-        // Setup consumers
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            for (int j = 0; j < CONSUMER_COUNT; j++) {
-                consumerMap.put("Consumer:" + i + ":" + j, createConsumer("Broker" + i, dest, latch));
-            }
-        }
-
-        // wait for consumers to get propagated
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-        	// all consumers on the remote brokers look like 1 consumer to the local broker.
-        	assertConsumersConnect("Broker" + i, dest, (BROKER_COUNT-1)+CONSUMER_COUNT, 65000);
-        }
-
-        // Send messages
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            for (int j = 0; j < PRODUCER_COUNT; j++) {
-                sendMessages("Broker" + i, dest, MESSAGE_COUNT);
-            }
-        }
-
-        assertTrue("Missing " + latch.getCount() + " messages", latch.await(45, TimeUnit.SECONDS));
-
-        // Get message count
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            for (int j = 0; j < CONSUMER_COUNT; j++) {
-                MessageIdList msgs = getConsumerMessages("Broker" + i, (MessageConsumer)consumerMap.get("Consumer:" + i + ":" + j));
-                assertEquals(BROKER_COUNT * PRODUCER_COUNT * MESSAGE_COUNT, msgs.getMessageCount());
-            }
-        }
-
-        assertNoUnhandeledExceptions();
-    }
-
-    private void assertNoUnhandeledExceptions() {
-        for( Entry<Thread, Throwable> e: unhandeledExceptions.entrySet()) {
-            LOG.error("Thread:" + e.getKey() + " Had unexpected: " + e.getValue());
-        }
-        assertTrue("There are no unhandelled exceptions, see: log for detail on: " + unhandeledExceptions,
-                unhandeledExceptions.isEmpty());
-    }
-
-    public void testQueueAllConnected() throws Exception {
-        bridgeAllBrokers();
-        startAllBrokers();
-        this.waitForBridgeFormation();
-
-        // Setup topic destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        CountDownLatch latch = new CountDownLatch(BROKER_COUNT * PRODUCER_COUNT * MESSAGE_COUNT);
-
-        // Setup consumers
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            for (int j = 0; j < CONSUMER_COUNT; j++) {
-                consumerMap.put("Consumer:" + i + ":" + j, createConsumer("Broker" + i, dest, latch));
-            }
-        }
-
-        // wait for consumers to get propagated
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-        	// all consumers on the remote brokers look like 1 consumer to the local broker.
-        	assertConsumersConnect("Broker" + i, dest, (BROKER_COUNT-1)+CONSUMER_COUNT, 65000);
-        }
-
-        // Send messages
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            for (int j = 0; j < PRODUCER_COUNT; j++) {
-                sendMessages("Broker" + i, dest, MESSAGE_COUNT);
-            }
-        }
-
-        // Wait for messages to be delivered
-        assertTrue("Missing " + latch.getCount() + " messages", latch.await(45, TimeUnit.SECONDS));
-
-        // Get message count
-        int totalMsg = 0;
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            for (int j = 0; j < CONSUMER_COUNT; j++) {
-                MessageIdList msgs = getConsumerMessages("Broker" + i, consumerMap.get("Consumer:" + i + ":" + j));
-                totalMsg += msgs.getMessageCount();
-            }
-        }
-        assertEquals(BROKER_COUNT * PRODUCER_COUNT * MESSAGE_COUNT, totalMsg);
-        
-        assertNoUnhandeledExceptions();
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-
-        unhandeledExceptions.clear();
-        Thread.setDefaultUncaughtExceptionHandler(this);
-        
-        // Setup n brokers
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            createBroker(new URI("broker:()/Broker" + i + "?persistent=false&useJmx=false"));
-        }
-
-        consumerMap = new HashMap<String, MessageConsumer>();
-    }
-
-    public void uncaughtException(Thread t, Throwable e) {
-        synchronized(unhandeledExceptions) {
-            unhandeledExceptions.put(t,e);
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java
deleted file mode 100644
index 23cf042..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.network.DemandForwardingBridge;
-import org.apache.activemq.network.NetworkBridgeConfiguration;
-import org.apache.activemq.transport.TransportFactory;
-
-/**
- * 
- */
-public class MultiBrokersMultiClientsUsingTcpTest extends MultiBrokersMultiClientsTest {
-    protected List<DemandForwardingBridge> bridges;
-
-    protected void bridgeAllBrokers(String groupName) throws Exception {
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            for (int j = 1; j <= BROKER_COUNT; j++) {
-                if (i != j) {
-                    bridgeBrokers("Broker" + i, "Broker" + j);
-                }
-            }
-        }
-
-        maxSetupTime = 5000;
-    }
-
-    protected void bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker) throws Exception {
-        List<TransportConnector> remoteTransports = remoteBroker.getTransportConnectors();
-        List<TransportConnector> localTransports = localBroker.getTransportConnectors();
-
-        URI remoteURI;
-        URI localURI;
-        if (!remoteTransports.isEmpty() && !localTransports.isEmpty()) {
-            remoteURI = remoteTransports.get(0).getConnectUri();
-            localURI = localTransports.get(0).getConnectUri();
-
-            // Ensure that we are connecting using tcp
-            if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) {
-                NetworkBridgeConfiguration config = new NetworkBridgeConfiguration();
-                config.setBrokerName(localBroker.getBrokerName());
-                DemandForwardingBridge bridge = new DemandForwardingBridge(config, TransportFactory.connect(localURI), TransportFactory.connect(remoteURI));
-                bridge.setBrokerService(localBroker);
-                bridges.add(bridge);
-
-                bridge.start();
-            } else {
-                throw new Exception("Remote broker or local broker is not using tcp connectors");
-            }
-        } else {
-            throw new Exception("Remote broker or local broker has no registered connectors.");
-        }
-    }
-
-    public void setUp() throws Exception {
-        super.setUp();
-
-        // Assign a tcp connector to each broker
-        int j = 0;
-        for (Iterator<BrokerItem> i = brokers.values().iterator(); i.hasNext();) {
-            i.next().broker.addConnector("tcp://localhost:" + (61616 + j++));
-        }
-
-        bridges = new ArrayList<DemandForwardingBridge>();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MulticastDiscoveryOnFaultyNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MulticastDiscoveryOnFaultyNetworkTest.java
deleted file mode 100644
index 882792e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MulticastDiscoveryOnFaultyNetworkTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.List;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.TextMessage;
-
-import junit.framework.Test;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.MessageIdList;
-
-
-public class MulticastDiscoveryOnFaultyNetworkTest extends JmsMultipleBrokersTestSupport {
-    protected static final int MESSAGE_COUNT = 200;
-    private static final String HUB = "HubBroker";
-    private static final String SPOKE = "SpokeBroker";
-    public boolean useDuplexNetworkBridge;
-    public boolean sumulateStalledNetwork;
-
-   private TransportConnector mCastTrpConnector;
-   
-    public void initCombosForTestSendOnAFaultyTransport() {
-        addCombinationValues( "useDuplexNetworkBridge", new Object[]{ Boolean.TRUE , Boolean.FALSE } );
-        addCombinationValues( "sumulateStalledNetwork", new Object[]{ Boolean.TRUE } );
-    }
-    
-    public void testSendOnAFaultyTransport() throws Exception {
-        bridgeBrokers(SPOKE, HUB);
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-        
-        // Setup consumers
-        MessageConsumer client = createConsumer(HUB, dest);
-        
-        // allow subscription information to flow back to Spoke
-        sleep(600);
-        
-        // Send messages
-        sendMessages(SPOKE, dest, MESSAGE_COUNT);
-
-        MessageIdList msgs = getConsumerMessages(HUB, client);
-	msgs.setMaximumDuration(200000L);
-        msgs.waitForMessagesToArrive(MESSAGE_COUNT);
-
-        assertTrue("At least message " + MESSAGE_COUNT + 
-                " must be recieved, duplicates are expected, count=" + msgs.getMessageCount(),
-                MESSAGE_COUNT <= msgs.getMessageCount());
-    }
-
-    
-    @Override
-    protected void startAllBrokers() throws Exception {
-        // Ensure HUB is started first so bridge will be active from the get go
-        BrokerItem brokerItem = brokers.get(HUB);
-        brokerItem.broker.start();
-        brokerItem = brokers.get(SPOKE);
-        brokerItem.broker.start();
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        final String options = "?persistent=false&useJmx=false&deleteAllMessagesOnStartup=true";
-        createBroker(new URI("broker:(tcpfaulty://localhost:61617)/" + HUB + options));
-        createBroker(new URI("broker:(tcpfaulty://localhost:61616)/" + SPOKE + options));
-    }
-    
-    public static Test suite() {
-        return suite(MulticastDiscoveryOnFaultyNetworkTest.class);
-    }
-       
-    @Override
-    protected void onSend(int i, TextMessage msg) {
-        sleep(50);
-    }
-
-    private void sleep(int milliSecondTime) {
-        try {
-            Thread.sleep(milliSecondTime);
-        } catch (InterruptedException igonred) {
-        }    
-    }
-
-
-    @Override
-    protected NetworkConnector bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker, boolean dynamicOnly, int networkTTL, boolean conduit, boolean failover) throws Exception {
-        DiscoveryNetworkConnector connector = new DiscoveryNetworkConnector(new URI("multicast://default?group=TESTERIC&useLocalHost=false"));
-        connector.setDynamicOnly(dynamicOnly);
-        connector.setNetworkTTL(networkTTL);
-        localBroker.addNetworkConnector(connector);
-        maxSetupTime = 2000;
-        if (useDuplexNetworkBridge) {
-            connector.setDuplex(true);
-        }
-
-        List<TransportConnector> transportConnectors = remoteBroker.getTransportConnectors();
-        if (!transportConnectors.isEmpty()) {
-		mCastTrpConnector = ((TransportConnector)transportConnectors.get(0));
-		mCastTrpConnector.setDiscoveryUri(new URI("multicast://default?group=TESTERIC"));
-	}
-	return connector;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MyObject.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MyObject.java
deleted file mode 100644
index 09364a9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MyObject.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.Serializable;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.IOException;
-import java.io.ObjectStreamException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-public class MyObject implements Serializable {
-
-    private String message;
-    private AtomicInteger writeObjectCalled = new AtomicInteger(0);
-    private AtomicInteger readObjectCalled = new AtomicInteger(0);
-    private AtomicInteger readObjectNoDataCalled = new AtomicInteger(0);
-
-    public MyObject(String message) {
-        this.setMessage(message);
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws IOException {
-        writeObjectCalled.incrementAndGet();
-        out.defaultWriteObject();
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
-        in.defaultReadObject();
-        readObjectCalled.incrementAndGet();        
-    }
-
-    private void readObjectNoData() throws ObjectStreamException {
-        readObjectNoDataCalled.incrementAndGet();
-    }
-
-    public int getWriteObjectCalled() {
-        return writeObjectCalled.get();
-    }
-
-    public int getReadObjectCalled() {
-        return readObjectCalled.get();
-    }
-
-    public int getReadObjectNoDataCalled() {
-        return readObjectNoDataCalled.get();
-    }
-}
-
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkAsyncStartTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkAsyncStartTest.java
deleted file mode 100644
index 818e8af..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkAsyncStartTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.SocketProxy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NetworkAsyncStartTest extends JmsMultipleBrokersTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(NetworkAsyncStartTest.class);
-
-    private String brokerBUri = "tcp://localhost:61617";
-    private String brokerCUri = "tcp://localhost:61618";
-    int bridgeCount=0;
-
-    public void testAsyncNetworkStartup() throws Exception {
-
-        BrokerService brokerA = brokers.get("BrokerA").broker;
-        bridgeBroker(brokerA, brokerBUri);
-        bridgeBroker(brokerA, brokerCUri);
-
-        LOG.info("starting A, no blocking on failed network connectors");
-        brokerA.start();
-
-        LOG.info("starting C transport connector");
-        BrokerService brokerC = brokers.get("BrokerC").broker;
-        brokerC.addConnector(brokerCUri);
-        brokerC.start();
-
-        assertTrue("got bridge to C", waitForBridgeFormation(brokerA, 1, 1));
-        LOG.info("Got bridge A->C");
-
-        LOG.info("starting B transport connector");
-        BrokerService brokerB = brokers.get("BrokerB").broker;
-        brokerB.addConnector(brokerBUri);
-        brokerC.start();
-
-        assertTrue("got bridge to B", waitForBridgeFormation(brokerA, 1, 0));
-        assertTrue("got bridge to B&C", waitForBridgeFormation(brokerA, 1, 1));
-    }
-
-    public void testAsyncNetworkStartupWithSlowConnectionCreation() throws Exception {
-
-        final BrokerService brokerA = brokers.get("BrokerA").broker;
-
-        SocketProxy proxyToB = new SocketProxy();
-        // don't accept any connections so limited to one connection with backlog
-        proxyToB.setPauseAtStart(true);
-        proxyToB.setAcceptBacklog(1);
-        proxyToB.setTarget(new URI(brokerBUri));
-        proxyToB.open();
-        bridgeBroker(brokerA, proxyToB.getUrl().toString());
-        bridgeBroker(brokerA, proxyToB.getUrl().toString());
-        bridgeBroker(brokerA, proxyToB.getUrl().toString());
-        bridgeBroker(brokerA, proxyToB.getUrl().toString());
-        bridgeBroker(brokerA, proxyToB.getUrl().toString());
-        bridgeBroker(brokerA, proxyToB.getUrl().toString());
-        bridgeBroker(brokerA, proxyToB.getUrl().toString());
-        bridgeBroker(brokerA, brokerCUri);
-
-        Executor e = Executors.newCachedThreadPool();
-        e.execute(new Runnable() {
-            public void run() {
-                LOG.info("starting A");
-                try {
-                    brokerA.setNetworkConnectorStartAsync(true);
-                    brokerA.start();
-                } catch (Exception e) {
-                    LOG.error("start failed", e);
-                }
-            }
-        });
-
-        LOG.info("starting transport connector on C");
-        BrokerService brokerC = brokers.get("BrokerC").broker;
-        brokerC.addConnector(brokerCUri);
-        brokerC.start();
-
-        final long maxWaitMillis = 20*1000;
-        assertTrue("got bridge to C in 10 seconds", waitForBridgeFormation(brokerA, 1, 7, maxWaitMillis));
-    }
-
-    private void bridgeBroker(BrokerService localBroker, String remoteURI) throws Exception {
-        String uri = "static:(" + remoteURI + ")";
-        NetworkConnector connector = new DiscoveryNetworkConnector(new URI(uri));
-        connector.setName("bridge-" + bridgeCount++);
-        localBroker.addNetworkConnector(connector);
-    }
-
-    @Override
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        // initially with no tcp transport connector
-        createBroker(new URI("broker:()BrokerA?persistent=false&useJmx=false"));
-        createBroker(new URI("broker:()BrokerB?persistent=false&useJmx=false"));
-        createBroker(new URI("broker:()BrokerC?persistent=false&useJmx=false"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java
deleted file mode 100644
index c968127..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.ThreadTracker;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NetworkOfTwentyBrokersTest extends JmsMultipleBrokersTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(NetworkOfTwentyBrokersTest.class);
-
-    // This will interconnect all brokers using multicast
-    protected void bridgeAllBrokers() throws Exception {
-        bridgeAllBrokers("TwentyBrokersTest", 1, false, false);
-    }
-
-    protected void bridgeAllBrokers(String groupName, int ttl, boolean suppressduplicateQueueSubs) throws Exception {
-        bridgeAllBrokers(groupName, ttl, suppressduplicateQueueSubs, false);
-    }
-
-    protected void bridgeAllBrokers(String groupName, int ttl, boolean suppressduplicateQueueSubs, boolean decreasePriority) throws Exception {
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            List<TransportConnector> transportConnectors = broker.getTransportConnectors();
-
-            if (transportConnectors.isEmpty()) {
-                broker.addConnector(new URI(AUTO_ASSIGN_TRANSPORT));
-                transportConnectors = broker.getTransportConnectors();
-            }
-
-            TransportConnector transport = transportConnectors.get(0);
-            if (transport.getDiscoveryUri() == null) {
-                transport.setDiscoveryUri(new URI("multicast://default?group=" + groupName));
-            }
-
-            List<NetworkConnector> networkConnectors = broker.getNetworkConnectors();
-            if (networkConnectors.isEmpty()) {
-                broker.addNetworkConnector("multicast://default?group=" + groupName);
-                networkConnectors = broker.getNetworkConnectors();
-            }
-
-            NetworkConnector nc = networkConnectors.get(0);
-            nc.setNetworkTTL(ttl);
-            nc.setSuppressDuplicateQueueSubscriptions(suppressduplicateQueueSubs);
-            nc.setDecreaseNetworkConsumerPriority(decreasePriority);
-        }
-
-        // Multicasting may take longer to setup
-        maxSetupTime = 8000;
-    }
-
-    protected BrokerService createBroker(String brokerName) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setUseJmx(false);
-        broker.setBrokerName(brokerName);
-        broker.addConnector(new URI(AUTO_ASSIGN_TRANSPORT));
-        brokers.put(brokerName, new BrokerItem(broker));
-
-        return broker;
-    }
-
-    /* AMQ-3077 Bug */
-    public void testBrokers() throws Exception {
-        int X = 20;
-        int i;
-
-        LOG.info("Creating X Brokers");
-        for (i = 0; i < X; i++) {
-            createBroker("Broker" + i);
-        }
-
-        bridgeAllBrokers();
-        startAllBrokers();
-        waitForBridgeFormation(X-1);
-
-        LOG.info("Waiting for complete formation");
-        try {
-            Thread.sleep(10000);
-        } catch (Exception e) {
-        }
-
-        verifyPeerBrokerInfos(X-1);
-
-        LOG.info("Stopping half the brokers");
-        for (i = 0; i < X/2; i++) {
-            destroyBroker("Broker" + i);
-        }
-
-        LOG.info("Waiting for complete stop");
-        try {
-            Thread.sleep(10000);
-        } catch (Exception e) {
-        }
-
-        verifyPeerBrokerInfos((X/2) -1);
-
-        LOG.info("Recreating first half");
-        for (i = 0; i < X/2; i++) {
-            createBroker("Broker" + i);
-        }
-
-        bridgeAllBrokers();
-        startAllBrokers();
-        waitForBridgeFormation(X-1);
-
-        LOG.info("Waiting for complete reformation");
-        try {
-            Thread.sleep(10000);
-        } catch (Exception e) {
-        }
-
-        verifyPeerBrokerInfos(X-1);
-    }
-
-    public void testPeerBrokerCountHalfPeer() throws Exception {
-        createBroker("A");
-        createBroker("B");
-        bridgeBrokers("A", "B");
-        startAllBrokers();
-        verifyPeerBrokerInfo(brokers.get("A"), 1);
-        verifyPeerBrokerInfo(brokers.get("B"), 0);
-    }
-
-    public void testPeerBrokerCountHalfPeerTwice() throws Exception {
-        createBroker("A");
-        createBroker("B");
-        bridgeBrokers("A", "B");
-        bridgeBrokers("A", "B");
-        startAllBrokers();
-        verifyPeerBrokerInfo(brokers.get("A"), 1);
-        verifyPeerBrokerInfo(brokers.get("B"), 0);
-    }
-
-    public void testPeerBrokerCountFullPeer() throws Exception {
-        createBroker("A");
-        createBroker("B");
-        bridgeBrokers("A", "B");
-        bridgeBrokers("B", "A");
-        startAllBrokers();
-        verifyPeerBrokerInfo(brokers.get("A"), 1);
-        verifyPeerBrokerInfo(brokers.get("B"), 1);
-    }
-
-    public void testPeerBrokerCountFullPeerDuplex() throws Exception {
-        createBroker("A");
-        createBroker("B");
-        NetworkConnector nc = bridgeBrokers("A", "B");
-        nc.setDuplex(true);
-        startAllBrokers();
-        verifyPeerBrokerInfo(brokers.get("A"), 1);
-        verifyPeerBrokerInfo(brokers.get("B"), 1);
-    }
-
-
-    private void verifyPeerBrokerInfo(BrokerItem brokerItem, final int max) {
-        BrokerService broker = brokerItem.broker;
-        RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker();
-        LOG.info("verify infos " + broker.getBrokerName() + ", len: " + regionBroker.getPeerBrokerInfos().length);
-        for (BrokerInfo info : regionBroker.getPeerBrokerInfos()) {
-            LOG.info(info.getBrokerName());
-        }
-        assertEquals(broker.getBrokerName(), max, regionBroker.getPeerBrokerInfos().length);
-    }
-
-    private void verifyPeerBrokerInfos(final int max) {
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            verifyPeerBrokerInfo(i.next(), max);
-        }
-    }
-
-    @Override
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-        ThreadTracker.result();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java
deleted file mode 100644
index 12b5830..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.Set;
-
-import javax.jms.Destination;
-import javax.jms.Session;
-
-import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * 
- */
-public class NewConsumerCreatesDestinationTest extends EmbeddedBrokerAndConnectionTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(NewConsumerCreatesDestinationTest.class);
-
-    private ActiveMQQueue wildcard;
-    
-    public void testNewConsumerCausesNewDestinationToBeAutoCreated() throws Exception {
-
-        // lets create a wildcard thats kinda like those used by Virtual Topics
-        String wildcardText = "org.*" + getDestinationString().substring("org.apache".length());
-        wildcard = new ActiveMQQueue(wildcardText);
-
-        LOG.info("Using wildcard: " + wildcard);
-        LOG.info("on destination: " + destination);
-        
-        assertDestinationCreated(destination, false);
-        assertDestinationCreated(wildcard, false);
-        
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createConsumer(destination);
-
-        assertDestinationCreated(destination, true);
-        assertDestinationCreated(wildcard, true);
-    }
-
-    protected void assertDestinationCreated(Destination destination, boolean expected) throws Exception {
-        Set answer = broker.getBroker().getDestinations((ActiveMQDestination) destination);
-        int size = expected ? 1 : 0;
-        assertEquals("Size of found destinations: " + answer, size, answer.size());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java
deleted file mode 100644
index 277bcc8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.DispatchPolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.PriorityNetworkDispatchPolicy;
-import org.apache.activemq.broker.region.policy.SimpleDispatchPolicy;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NoDuplicateOnTopicNetworkTest extends CombinationTestSupport {
-    private static final Logger LOG = LoggerFactory
-            .getLogger(NoDuplicateOnTopicNetworkTest.class);
-
-    private static final String MULTICAST_DEFAULT = "multicast://default";
-    private static final String BROKER_1 = "tcp://localhost:61626";
-    private static final String BROKER_2 = "tcp://localhost:61636";
-    private static final String BROKER_3 = "tcp://localhost:61646";
-    private final static String TOPIC_NAME = "broadcast";
-    private BrokerService broker1;
-    private BrokerService broker2;
-    private BrokerService broker3;
-
-    public boolean suppressDuplicateTopicSubs = false;
-    public DispatchPolicy dispatchPolicy = new SimpleDispatchPolicy();
-    
-    private boolean dynamicOnly = false;
-    // no duplicates in cyclic network if networkTTL <=1
-    // when > 1, subscriptions perculate around resulting in duplicates as there is no
-    // memory of the original subscription.
-    // solution for 6.0 using org.apache.activemq.command.ConsumerInfo.getNetworkConsumerIds()
-    private int ttl = 3;
-    
-    
-  
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        broker3 = createAndStartBroker("broker3", BROKER_3);
-        Thread.sleep(3000);
-        broker2 = createAndStartBroker("broker2", BROKER_2);
-        Thread.sleep(3000);
-        broker1 = createAndStartBroker("broker1", BROKER_1);
-        Thread.sleep(1000);
-        
-        waitForBridgeFormation();
-    }
-    
-    public static Test suite() {
-        return suite(NoDuplicateOnTopicNetworkTest.class);
-    }
-    
-    protected void waitForBridgeFormation() throws Exception {
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return !broker3.getNetworkConnectors().get(0).activeBridges().isEmpty();
-            }});
- 
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return !broker2.getNetworkConnectors().get(0).activeBridges().isEmpty();
-            }});
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return !broker1.getNetworkConnectors().get(0).activeBridges().isEmpty();
-            }});
-    }
-
-    private BrokerService createAndStartBroker(String name, String addr)
-            throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setBrokerName(name);
-        broker.addConnector(addr).setDiscoveryUri(new URI(MULTICAST_DEFAULT));
-        broker.setUseJmx(false);
-
-        NetworkConnector networkConnector = broker
-                .addNetworkConnector(MULTICAST_DEFAULT);
-        networkConnector.setDecreaseNetworkConsumerPriority(true);
-        networkConnector.setDynamicOnly(dynamicOnly);
-        networkConnector.setNetworkTTL(ttl);
-        networkConnector.setSuppressDuplicateTopicSubscriptions(suppressDuplicateTopicSubs);
-
-        
-        PolicyMap policyMap = new PolicyMap();
-        PolicyEntry policy = new PolicyEntry();
-        policy.setDispatchPolicy(dispatchPolicy);
-        // the audit will suppress the duplicates as it defaults to true so this test
-        // checking for dups will fail. it is good to have it on in practice.
-        policy.setEnableAudit(false);
-        policyMap.put(new ActiveMQTopic(TOPIC_NAME), policy);
-        broker.setDestinationPolicy(policyMap);
-        broker.start();
-       
-        return broker;
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        broker1.stop();
-        broker2.stop();
-        broker3.stop();
-        super.tearDown();
-    }
-
-    public void initCombosForTestProducerConsumerTopic() {
-        this.addCombinationValues("suppresDuplicateTopicSubs", new Object[]{Boolean.TRUE, Boolean.FALSE});
-        this.addCombinationValues("dispatchPolicy", new Object[]{new PriorityNetworkDispatchPolicy(), new SimpleDispatchPolicy()});
-    }
-    
-    public void testProducerConsumerTopic() throws Exception {
-        
-        final CountDownLatch consumerStarted = new CountDownLatch(1);
-        
-        Thread producerThread = new Thread(new Runnable() {
-            public void run() {
-                TopicWithDuplicateMessages producer = new TopicWithDuplicateMessages();
-                producer.setBrokerURL(BROKER_1);
-                producer.setTopicName(TOPIC_NAME);
-                try {
-                    producer.produce();
-                } catch (JMSException e) {
-                    fail("Unexpected " + e);
-                }
-            }
-        });
-
-        final TopicWithDuplicateMessages consumer = new TopicWithDuplicateMessages();
-        Thread consumerThread = new Thread(new Runnable() {
-            public void run() {
-                consumer.setBrokerURL(BROKER_2);
-                consumer.setTopicName(TOPIC_NAME);
-                try {
-                    consumer.consumer();
-                    consumerStarted.countDown();
-                    consumer.getLatch().await(60, TimeUnit.SECONDS);
-                } catch (Exception e) {
-                    fail("Unexpected " + e);
-                }
-            }
-        });
-
-        consumerThread.start();
-        LOG.info("Started Consumer");
-        
-        assertTrue("consumer started eventually", consumerStarted.await(10, TimeUnit.SECONDS));
-        
-        // ensure subscription has percolated though the network
-        Thread.sleep(2000);
-        
-        producerThread.start();
-        LOG.info("Started Producer");
-        producerThread.join();
-        consumerThread.join();
-
-        int duplicateCount = 0;
-        Map<String, String> map = new HashMap<String, String>();
-        for (String msg : consumer.getMessageStrings()) {
-            if (map.containsKey(msg)) {
-                LOG.info("got duplicate: " + msg);
-                duplicateCount++;
-            }
-            map.put(msg, msg);
-        }
-        if (suppressDuplicateTopicSubs || dispatchPolicy instanceof PriorityNetworkDispatchPolicy) {
-            assertEquals("no duplicates", 0, duplicateCount);
-            assertEquals("got all required messages: " + map.size(), consumer
-                    .getNumMessages(), map.size());
-        } else {
-            assertTrue("we can get some duplicates: " + duplicateCount, duplicateCount >= 0);
-            if (duplicateCount == 0) {
-               assertEquals("got all required messages: " + map.size(), consumer
-                    .getNumMessages(), map.size()); 
-            }
-        }
-    }
-
-    class TopicWithDuplicateMessages {
-        private String brokerURL;
-        private String topicName;
-        private Connection connection;
-        private Session session;
-        private Topic topic;
-        private MessageProducer producer;
-        private MessageConsumer consumer;
-
-        private List<String> receivedStrings = Collections.synchronizedList(new ArrayList<String>());
-        private int numMessages = 10;
-        private CountDownLatch recievedLatch = new CountDownLatch(numMessages);
-
-        public CountDownLatch getLatch() {
-            return recievedLatch;
-        }
-        
-        public List<String> getMessageStrings() {
-            synchronized(receivedStrings) {
-                return new ArrayList<String>(receivedStrings);
-            }
-        }
-
-        public String getBrokerURL() {
-            return brokerURL;
-        }
-
-        public void setBrokerURL(String brokerURL) {
-            this.brokerURL = brokerURL;
-        }
-
-        public String getTopicName() {
-            return topicName;
-        }
-
-        public void setTopicName(String topicName) {
-            this.topicName = topicName;
-        }
-
-        private void createConnection() throws JMSException {
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
-                    brokerURL);
-            connection = factory.createConnection();
-        }
-
-        private void createTopic() throws JMSException {
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            topic = session.createTopic(topicName);
-        }
-
-        private void createProducer() throws JMSException {
-            producer = session.createProducer(topic);
-        }
-
-        private void createConsumer() throws JMSException {
-            consumer = session.createConsumer(topic);
-            consumer.setMessageListener(new MessageListener() {
-
-                public void onMessage(Message arg0) {
-                    TextMessage msg = (TextMessage) arg0;
-                    try {
-                        LOG.debug("Received message [" + msg.getText() + "]");
-                        receivedStrings.add(msg.getText());
-                        recievedLatch.countDown();
-                    } catch (JMSException e) {
-                        fail("Unexpected :" + e);
-                    }
-                }
-
-            });
-        }
-
-        private void publish() throws JMSException {
-            for (int i = 0; i < numMessages; i++) {
-                TextMessage textMessage = session.createTextMessage();
-                String message = "message: " + i;
-                LOG.debug("Sending message[" + message + "]");
-                textMessage.setText(message);
-                producer.send(textMessage);
-            }
-        }
-
-        public void produce() throws JMSException {
-            createConnection();
-            createTopic();
-            createProducer();
-            connection.start();
-            publish();
-        }
-
-        public void consumer() throws JMSException {
-            createConnection();
-            createTopic();
-            createConsumer();
-            connection.start();
-        }
-
-        public int getNumMessages() {
-            return numMessages;
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java
deleted file mode 100644
index c9f0f53..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class ObjectMessageNotSerializableTest extends CombinationTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ObjectMessageNotSerializableTest.class);
-    
-    BrokerService broker;
-    AtomicInteger numReceived = new AtomicInteger(0);
-    final Vector<Throwable> exceptions = new Vector<Throwable>();
-
-    public static Test suite() {
-        return suite(ObjectMessageNotSerializableTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-	
-	protected void setUp() throws Exception {
-        exceptions.clear();
-        broker = createBroker();
-    }
-	
-	public void testSendNotSerializeableObjectMessage() throws Exception {
-
-        final  ActiveMQDestination destination = new ActiveMQQueue("testQ");
-        final MyObject obj = new MyObject("A message");
-
-        final CountDownLatch consumerStarted = new CountDownLatch(1);
-
-		Thread vmConsumerThread = new Thread("Consumer Thread") {
-			public void run() {
-				try {
-                    ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-                    factory.setOptimizedMessageDispatch(true);
-                    factory.setObjectMessageSerializationDefered(true);
-                    factory.setCopyMessageOnSend(false);
-
-                    Connection connection = factory.createConnection();
-		            Session session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		            MessageConsumer consumer = session.createConsumer(destination);
-		            connection.start();
-                    consumerStarted.countDown();
-                    ActiveMQObjectMessage message = (ActiveMQObjectMessage)consumer.receive(30000);
-                    if ( message != null ) {
-                        MyObject object = (MyObject)message.getObject();
-                        LOG.info("Got message " + object.getMessage());
-                        numReceived.incrementAndGet();
-                    }
-					consumer.close();
-				} catch (Throwable ex) {
-					exceptions.add(ex);
-				}
-			}
-		};
-        vmConsumerThread.start();
-
-		Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                    ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-                    factory.setOptimizedMessageDispatch(true);
-                    factory.setObjectMessageSerializationDefered(true);
-                    factory.setCopyMessageOnSend(false);
-
-                    Connection connection = factory.createConnection();
-		            Session session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		            MessageProducer producer = session.createProducer(destination);
-                    ActiveMQObjectMessage message = (ActiveMQObjectMessage)session.createObjectMessage();
-                    message.setObject(obj);
-                    producer.send(message);
-                	producer.close();
-                } catch (Throwable ex) {
-                    exceptions.add(ex);
-                }
-            }
-		};
-
-        assertTrue("consumers started", consumerStarted.await(10, TimeUnit.SECONDS));
-		producingThread.start();
-
-        vmConsumerThread.join();
-        producingThread.join();
-
-        assertEquals("writeObject called", 0, obj.getWriteObjectCalled());
-        assertEquals("readObject called", 0, obj.getReadObjectCalled());
-        assertEquals("readObjectNoData called", 0, obj.getReadObjectNoDataCalled());
-
-        assertEquals("Got expected messages", 1, numReceived.get());
-        assertTrue("no unexpected exceptions: " + exceptions, exceptions.isEmpty());
-	}
-
-    public void testSendNotSerializeableObjectMessageOverTcp() throws Exception {
-        final  ActiveMQDestination destination = new ActiveMQTopic("testTopic");
-        final MyObject obj = new MyObject("A message");
-
-        final CountDownLatch consumerStarted = new CountDownLatch(3);
-        final Vector<Throwable> exceptions = new Vector<Throwable>();
-		Thread vmConsumerThread = new Thread("Consumer Thread") {
-			public void run() {
-				try {
-                    ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-                    factory.setOptimizedMessageDispatch(true);
-                    factory.setObjectMessageSerializationDefered(true);
-                    factory.setCopyMessageOnSend(false);
-
-                    Connection connection = factory.createConnection();
-		            Session session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		            MessageConsumer consumer = session.createConsumer(destination);
-		            connection.start();
-                    consumerStarted.countDown();
-                    ActiveMQObjectMessage message = (ActiveMQObjectMessage)consumer.receive(30000);
-                    if ( message != null ) {                  
-                        MyObject object = (MyObject)message.getObject();
-                        LOG.info("Got message " + object.getMessage());
-                        numReceived.incrementAndGet();
-                    }
-					consumer.close();
-				} catch (Throwable ex) {
-					exceptions.add(ex);
-				}
-			}
-		};
-        vmConsumerThread.start();
-
-        Thread tcpConsumerThread = new Thread("Consumer Thread") {
-			public void run() {
-				try {
-
-                    ActiveMQConnectionFactory factory =
-                            new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
-                    factory.setOptimizedMessageDispatch(true);
-
-                    Connection connection = factory.createConnection();
-		            Session session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		            MessageConsumer consumer = session.createConsumer(destination);
-		            connection.start();
-                    consumerStarted.countDown();
-                    ActiveMQObjectMessage message = (ActiveMQObjectMessage)consumer.receive(30000);
-                    if ( message != null ) {
-                        MyObject object = (MyObject)message.getObject();
-                        LOG.info("Got message " + object.getMessage());
-                        numReceived.incrementAndGet();
-                        assertEquals("readObject called", 1, object.getReadObjectCalled());
-                    }
-					consumer.close();
-				} catch (Throwable ex) {
-					exceptions.add(ex);
-				}
-			}
-		};
-        tcpConsumerThread.start();
-
-
-        Thread notherVmConsumerThread = new Thread("Consumer Thread") {
-            public void run() {
-                try {
-                    ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-                    factory.setOptimizedMessageDispatch(true);
-                    factory.setObjectMessageSerializationDefered(true);
-                    factory.setCopyMessageOnSend(false);
-
-                    Connection connection = factory.createConnection();
-                    Session session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                    MessageConsumer consumer = session.createConsumer(destination);
-                    connection.start();
-                    consumerStarted.countDown();
-                    ActiveMQObjectMessage message = (ActiveMQObjectMessage)consumer.receive(30000);
-                    if ( message != null ) {
-                        MyObject object = (MyObject)message.getObject();
-                        LOG.info("Got message " + object.getMessage());
-                        numReceived.incrementAndGet();
-                    }
-                    consumer.close();
-                } catch (Throwable ex) {
-                    exceptions.add(ex);
-                }
-            }
-        };
-        notherVmConsumerThread.start();
-
-		Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                    ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-                    factory.setOptimizedMessageDispatch(true);
-                    factory.setObjectMessageSerializationDefered(true);
-                    factory.setCopyMessageOnSend(false);
-
-                    Connection connection = factory.createConnection();
-		            Session session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		            MessageProducer producer = session.createProducer(destination);
-                    ActiveMQObjectMessage message = (ActiveMQObjectMessage)session.createObjectMessage();
-                    message.setObject(obj);
-                    producer.send(message);
-                	producer.close();
-                } catch (Throwable ex) {
-                    exceptions.add(ex);
-                }
-            }
-		};
-
-        assertTrue("consumers started", consumerStarted.await(10, TimeUnit.SECONDS));
-		producingThread.start();
-		
-        vmConsumerThread.join();
-        tcpConsumerThread.join();
-        notherVmConsumerThread.join();
-        producingThread.join();
-
-        assertEquals("writeObject called", 1, obj.getWriteObjectCalled());
-        assertEquals("readObject called", 0, obj.getReadObjectCalled());
-        assertEquals("readObjectNoData called", 0, obj.getReadObjectNoDataCalled());
-
-        assertEquals("Got expected messages", 3, numReceived.get());
-        assertTrue("no unexpected exceptions: " + exceptions, exceptions.isEmpty());
-	}
-
-	private BrokerService createBroker() throws Exception {
-	    BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setUseJmx(false);
-        broker.addConnector("tcp://localhost:0");
-        
-        broker.start();
-        broker.waitUntilStarted();
-        return broker;
-	}
-
-	protected void tearDown() throws Exception {
-		broker.stop();
-		broker.waitUntilStopped();
-	}
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java
deleted file mode 100755
index ce0c135..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-
-/**
- * Base class for simple test cases using a single connection, session
- * producer and consumer
- *
- * 
- */
-public class ProducerConsumerTestSupport extends TestSupport {
-    protected Connection connection;
-    protected Session session;
-    protected MessageProducer producer;
-    protected MessageConsumer consumer;
-    protected Destination destination;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        connection = createConnection();
-        session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        destination = this.createDestination(getSubject());
-        producer = session.createProducer(destination);
-        consumer = session.createConsumer(destination);
-        connection.start();
-    }
-
-    protected void tearDown() throws Exception {
-        consumer.close();
-        producer.close();
-        session.close();
-        connection.close();
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java
deleted file mode 100755
index c701301..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.usecases;
-
-/**
- * 
- */
-public class PublishOnDurableTopicConsumedMessageTest extends PublishOnTopicConsumedMessageTest {
-
-    protected void setUp() throws Exception {
-        this.durable = true;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
deleted file mode 100644
index ae203b0..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCase implements MessageListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(PublishOnQueueConsumedMessageInTransactionTest.class);
-
-    private Session producerSession;
-    private Session consumerSession;
-    private Destination queue;
-    private ActiveMQConnectionFactory factory;
-    private MessageProducer producer;
-    private MessageConsumer consumer;
-    private Connection connection;
-    private ObjectMessage objectMessage;
-    private List<Message> messages = createConcurrentList();
-    private final Object lock = new Object();
-    private String[] data;
-    private String dataFileRoot = IOHelper.getDefaultDataDirectory();
-    private int messageCount = 3;
-    private String url = "vm://localhost";
-
-    // Invalid acknowledgment warning can be viewed on the console of a remote
-    // broker
-    // The warning message is not thrown back to the client
-    // private String url = "tcp://localhost:61616";
-
-    protected void setUp() throws Exception {
-        File dataFile = new File(dataFileRoot);
-        recursiveDelete(dataFile);
-        try {
-            factory = new ActiveMQConnectionFactory(url);
-            connection = factory.createConnection();
-            producerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-            consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
-            queue = new ActiveMQQueue("FOO.BAR");
-            data = new String[messageCount];
-
-            for (int i = 0; i < messageCount; i++) {
-                data[i] = "Message : " + i;
-            }
-        } catch (JMSException je) {
-            fail("Error setting up connection : " + je.toString());
-        }
-    }
-
-    public void testSendReceive() throws Exception {
-        sendMessage();
-
-        connection.start();
-        consumer = consumerSession.createConsumer(queue);
-        consumer.setMessageListener(this);
-        waitForMessagesToBeDelivered();
-        assertEquals("Messages received doesn't equal messages sent", messages.size(), data.length);
-
-    }
-
-    protected void sendMessage() throws JMSException {
-        messages.clear();
-        try {
-            for (int i = 0; i < data.length; ++i) {
-                producer = producerSession.createProducer(queue);
-                objectMessage = producerSession.createObjectMessage(data[i]);
-                producer.send(objectMessage);
-                producerSession.commit();
-                LOG.info("sending message :" + objectMessage);
-            }
-        } catch (Exception e) {
-            if (producerSession != null) {
-                producerSession.rollback();
-                LOG.info("rollback");
-                producerSession.close();
-            }
-
-            e.printStackTrace();
-        }
-    }
-
-    public synchronized void onMessage(Message m) {
-        try {
-            objectMessage = (ObjectMessage)m;
-            consumeMessage(objectMessage, messages);
-
-            LOG.info("consumer received message :" + objectMessage);
-            consumerSession.commit();
-
-        } catch (Exception e) {
-            try {
-                consumerSession.rollback();
-                LOG.info("rolled back transaction");
-            } catch (JMSException e1) {
-                LOG.info(e1.toString());
-                e1.printStackTrace();
-            }
-            LOG.info(e.toString());
-            e.printStackTrace();
-        }
-    }
-
-    protected void consumeMessage(Message message, List<Message> messageList) {
-        messageList.add(message);
-        if (messageList.size() >= data.length) {
-            synchronized (lock) {
-                lock.notifyAll();
-            }
-        }
-
-    }
-
-    protected List<Message> createConcurrentList() {
-        return Collections.synchronizedList(new ArrayList<Message>());
-    }
-
-    protected void waitForMessagesToBeDelivered() {
-        long maxWaitTime = 5000;
-        long waitTime = maxWaitTime;
-        long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
-
-        synchronized (lock) {
-            while (messages.size() <= data.length && waitTime >= 0) {
-                try {
-                    lock.wait(200);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-
-                waitTime = maxWaitTime - (System.currentTimeMillis() - start);
-            }
-        }
-    }
-
-    protected static void recursiveDelete(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        file.delete();
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java
deleted file mode 100755
index 584af37..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.usecases;
-
-/**
- * 
- */
-public class PublishOnQueueConsumedMessageTest extends PublishOnTopicConsumedMessageTest {
-
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java
deleted file mode 100644
index 93eefb4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-/**
- * Test Publish/Consume queue using the release activemq.xml configuration file
- *
- * 
- */
-public class PublishOnQueueConsumedMessageUsingActivemqXMLTest extends PublishOnTopicConsumedMessageTest {
-    protected static final String JOURNAL_ROOT = "../data/";
-    private static final transient Logger LOG = LoggerFactory.getLogger(PublishOnQueueConsumedMessageUsingActivemqXMLTest.class);
-    BrokerService broker;
-
-    /**
-     * Use the transportConnector uri configured on the activemq.xml
-     *
-     * @return ActiveMQConnectionFactory
-     * @throws Exception
-     */
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("tcp://localhost:61616");
-    }
-
-    /**
-     * Sets up a test where the producer and consumer have their own connection.
-     *
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        File journalFile = new File(JOURNAL_ROOT);
-        recursiveDelete(journalFile);
-        // Create broker from resource
-        LOG.info("Creating broker... ");
-        broker = createBroker("org/apache/activemq/usecases/activemq.xml");
-        LOG.info("Success");
-        super.setUp();
-    }
-
-    /*
-    * Stops the Broker
-    * @see junit.framework.TestCase#tearDown()
-    */
-    protected void tearDown() throws Exception {
-        LOG.info("Closing Broker");
-        if (broker != null) {
-            broker.stop();
-        }
-        LOG.info("Broker closed...");
-    }
-
-    /*
-    * clean up the journal
-    */
-
-    protected static void recursiveDelete(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        file.delete();
-    }
-
-    protected BrokerService createBroker(String resource) throws Exception {
-        return createBroker(new ClassPathResource(resource));
-    }
-
-    protected BrokerService createBroker(Resource resource) throws Exception {
-        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
-        factory.afterPropertiesSet();
-
-        BrokerService broker = factory.getBroker();
-
-        //assertTrue("Should have a broker!", broker != null);
-
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTemporaryQueueConsumedMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTemporaryQueueConsumedMessageTest.java
deleted file mode 100755
index d2ee38f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTemporaryQueueConsumedMessageTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.DeliveryMode;
-
-/**
- * 
- */
-public class PublishOnTemporaryQueueConsumedMessageTest extends PublishOnTopicConsumedMessageTest {
-
-    protected void setUp() throws Exception {
-        topic = false;
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java
deleted file mode 100755
index f28a480..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class PublishOnTopicConsumedMessageTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(PublishOnTopicConsumedMessageTest.class);
-
-    private MessageProducer replyProducer;
-
-    public synchronized void onMessage(Message message) {
-
-        // lets resend the message somewhere else
-        try {
-            Message msgCopy = (Message)((org.apache.activemq.command.Message)message).copy();
-            replyProducer.send(msgCopy);
-
-            // log.info("Sending reply: " + message);
-            super.onMessage(message);
-        } catch (JMSException e) {
-            LOG.info("Failed to send message: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        Destination replyDestination = null;
-
-        if (topic) {
-            replyDestination = receiveSession.createTopic("REPLY." + getSubject());
-        } else {
-            replyDestination = receiveSession.createQueue("REPLY." + getSubject());
-        }
-
-        replyProducer = receiveSession.createProducer(replyDestination);
-        LOG.info("Created replyProducer: " + replyProducer);
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java
deleted file mode 100644
index 17dfa4c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-/**
- * Test Publish/Consume topic  using the release activemq.xml configuration file
- *
- * 
- */
-public class PublishOnTopicConsumerMessageUsingActivemqXMLTest extends PublishOnTopicConsumedMessageTest {
-    protected static final String JOURNAL_ROOT = "../data/";
-    private static final transient Logger LOG = LoggerFactory.getLogger(PublishOnTopicConsumerMessageUsingActivemqXMLTest.class);
-
-    BrokerService broker;
-
-    /**
-     * Use the transportConnector uri configured on the activemq.xml
-     *
-     * @return ActiveMQConnectionFactory
-     * @throws Exception
-     */
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("tcp://localhost:61616");
-    }
-
-    /**
-     * Sets up a test where the producer and consumer have their own connection.
-     *
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        File journalFile = new File(JOURNAL_ROOT);
-        recursiveDelete(journalFile);
-        // Create broker from resource
-        LOG.info("Creating broker... ");
-        broker = createBroker("org/apache/activemq/usecases/activemq.xml");
-        LOG.info("Success");
-        super.setUp();
-    }
-
-    /*
-    * Stops the Broker
-    * @see junit.framework.TestCase#tearDown()
-    */
-    protected void tearDown() throws Exception {
-        LOG.info("Closing Broker");
-        if (broker != null) {
-            broker.stop();
-        }
-        LOG.info("Broker closed...");
-    }
-
-    /*
-    * clean up the journal
-    */
-
-    protected static void recursiveDelete(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        file.delete();
-    }
-
-    protected BrokerService createBroker(String resource) throws Exception {
-        return createBroker(new ClassPathResource(resource));
-    }
-
-    protected BrokerService createBroker(Resource resource) throws Exception {
-        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
-        factory.afterPropertiesSet();
-
-        BrokerService broker = factory.getBroker();
-
-        //assertTrue("Should have a broker!", broker != null);
-
-        return broker;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueConsumerCloseAndReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueConsumerCloseAndReconnectTest.java
deleted file mode 100755
index 73fa27a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueConsumerCloseAndReconnectTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.usecases;
-
-/**
- * 
- */
-public class QueueConsumerCloseAndReconnectTest extends DurableConsumerCloseAndReconnectTest {
-    protected boolean isTopic() {
-        return false;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java
deleted file mode 100755
index 1084ce9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.usecases;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class QueueDuplicatesTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(QueueDuplicatesTest.class);
-
-    private static DateFormat formatter = new SimpleDateFormat("HH:mm:ss SSS");
-    private String brokerUrl;
-    private String subject;
-    private Connection brokerConnection;
-
-    public QueueDuplicatesTest(String name) {
-        super(name);
-    }
-
-    protected void setUp() throws Exception {
-        String peerUrl = "peer://localhost:6099";
-
-        subject = this.getClass().getName();
-
-        ActiveMQConnectionFactory fac = createFactory(peerUrl);
-        brokerConnection = fac.createConnection();
-        brokerConnection.start();
-    }
-
-    protected void tearDown() throws Exception {
-        if (brokerConnection != null) {
-            brokerConnection.close();
-        }
-    }
-
-    public void testDuplicates() {
-        try {
-            // Get Session
-            Session session = createSession(brokerConnection);
-            // create consumer
-            Destination dest = session.createQueue(subject);
-            MessageConsumer consumer = session.createConsumer(dest);
-            // subscribe to queue
-            consumer.setMessageListener(new SimpleConsumer());
-            // create producer
-            Thread sendingThread = new SendingThread(brokerUrl, subject);
-            // start producer
-            sendingThread.start();
-            // wait about 5 seconds
-            Thread.sleep(5000);
-            // unsubscribe consumer
-            consumer.close();
-            // wait another 5 seconds
-            Thread.sleep(5000);
-            // create new consumer
-            consumer = session.createConsumer(dest);
-            // subscribe to queue
-            consumer.setMessageListener(new SimpleConsumer());
-            // sleep a little while longer
-            Thread.sleep(15000);
-            session.close();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    Session createSession(Connection peerConnection) throws JMSException {
-        // Connect using peer to peer connection
-        Session session = peerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        return session;
-    }
-
-    private ActiveMQConnectionFactory createFactory(String brokerUrl) {
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
-        cf.setBrokerURL(brokerUrl);
-
-        return cf;
-    }
-
-    private class SendingThread extends Thread {
-        private String subject;
-
-        SendingThread(String brokerUrl, String subject) {
-            this.subject = subject;
-            setDaemon(false);
-        }
-
-        public void run() {
-            try {
-                Session session = createSession(brokerConnection);
-                Destination dest = session.createQueue(subject);
-                MessageProducer producer = session.createProducer(dest);
-                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                for (int i = 0; i < 20; i++) {
-                    String txt = "Text Message: " + i;
-                    TextMessage msg = session.createTextMessage(txt);
-                    producer.send(msg);
-                    LOG.info(formatter.format(new Date()) + " Sent ==> " + msg + " to " + subject);
-                    Thread.sleep(1000);
-                }
-                session.close();
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    private static class SimpleConsumer implements MessageListener {
-        private Map<String, Message> msgs = new HashMap<String, Message>();
-
-        public void onMessage(Message message) {
-            LOG.info(formatter.format(new Date()) + " SimpleConsumer Message Received: " + message);
-            try {
-                String id = message.getJMSMessageID();
-                assertNull("Message is duplicate: " + id, msgs.get(id));
-                msgs.put(id, message);
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueMemoryFullMultiBrokersTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueMemoryFullMultiBrokersTest.java
deleted file mode 100644
index 42776a4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueMemoryFullMultiBrokersTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Destination;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.usage.SystemUsage;
-
-public class QueueMemoryFullMultiBrokersTest extends JmsMultipleBrokersTestSupport {
-    public static final int BROKER_COUNT = 2;
-    public static final int MESSAGE_COUNT = 2000;
-   
-    public void testQueueNetworkWithConsumerFull() throws Exception {
-        
-        bridgeAllBrokers();
-        startAllBrokers();
-
-        Destination dest = createDestination("TEST.FOO", false);
-
-        sendMessages("Broker1", dest, 50);
-
-        CountDownLatch latch = new CountDownLatch(MESSAGE_COUNT);
-        createConsumer("Broker2", dest, latch);
-        assertConsumersConnect("Broker1", dest, 1, 30000);
-        sendMessages("Broker1", dest, MESSAGE_COUNT - 50);
-
-        // Wait for messages to be delivered
-        assertTrue("Missing " + latch.getCount() + " messages", latch.await(45, TimeUnit.SECONDS));
-        
-        // verify stats, all messages acked
-        BrokerService broker1 = brokers.get("Broker1").broker;
-        RegionBroker regionBroker = (RegionBroker) broker1.getRegionBroker();
-        // give the acks a chance to flow
-        Thread.sleep(2000);
-        Queue internalQueue = (Queue) regionBroker.getDestinations(ActiveMQDestination.transform(dest)).iterator().next(); 
-        
-        assertTrue("All messages are consumed and acked from source:" + internalQueue, internalQueue.getMessages().isEmpty());
-        assertEquals("messages source:" + internalQueue, 0, internalQueue.getDestinationStatistics().getMessages().getCount());
-        assertEquals("inflight source:" + internalQueue, 0, internalQueue.getDestinationStatistics().getInflight().getCount());
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        messageSize = 1024;
-        
-        // Setup n brokers
-        for (int i = 1; i <= BROKER_COUNT; i++) {
-            createBroker(new URI("broker:()/Broker" + i + "?persistent=false&useJmx=false"));
-        }
-        BrokerService broker2 = brokers.get("Broker2").broker;
-        applyMemoryLimitPolicy(broker2);
-    }
-
-    private void applyMemoryLimitPolicy(BrokerService broker) {
-        final SystemUsage memoryManager = new SystemUsage();
-        memoryManager.getMemoryUsage().setLimit(1024 * 50); // 50 MB
-        broker.setSystemUsage(memoryManager);
-
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setQueue(">");
-        entry.setMemoryLimit(1024 * 4); // Set to 2 kb
-        entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-        policyEntries.add(entry);
-
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        broker.setDestinationPolicy(policyMap);
-        
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRedeliverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRedeliverTest.java
deleted file mode 100755
index b9f821a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRedeliverTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.usecases;
-
-/**
- * 
- */
-public class QueueRedeliverTest extends TopicRedeliverTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        topic = false;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java
deleted file mode 100755
index dcd32fc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.Date;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-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.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author pragmasoft
- * 
- */
-public final class QueueRepeaterTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(QueueRepeaterTest.class);
-
-    private volatile String receivedText;
-
-    private Session producerSession;
-    private Session consumerSession;
-    private Destination queue;
-
-    private MessageProducer producer;
-    private MessageConsumer consumer;
-    private Connection connection;
-    private CountDownLatch latch = new CountDownLatch(1);
-
-    public void testTransaction() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = factory.createConnection();
-        queue = new ActiveMQQueue(getClass().getName() + "." + getName());
-
-        producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumerSession = connection.createSession(true, 0);
-
-        producer = producerSession.createProducer(queue);
-
-        consumer = consumerSession.createConsumer(queue);
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message m) {
-                try {
-                    TextMessage tm = (TextMessage)m;
-                    receivedText = tm.getText();
-                    latch.countDown();
-
-                    LOG.info("consumer received message :" + receivedText);
-                    consumerSession.commit();
-                    LOG.info("committed transaction");
-                } catch (JMSException e) {
-                    try {
-                        consumerSession.rollback();
-                        LOG.info("rolled back transaction");
-                    } catch (JMSException e1) {
-                        LOG.info(e1.toString());
-                        e1.printStackTrace();
-                    }
-                    LOG.info(e.toString());
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        connection.start();
-
-        TextMessage tm = null;
-        try {
-            tm = producerSession.createTextMessage();
-            tm.setText("Hello, " + new Date());
-            producer.send(tm);
-            LOG.info("producer sent message :" + tm.getText());
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-
-        LOG.info("Waiting for latch");
-        latch.await(2,TimeUnit.SECONDS);
-        assertNotNull(receivedText);
-        LOG.info("test completed, destination=" + receivedText);
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ReliableReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ReliableReconnectTest.java
deleted file mode 100755
index fc6e5c2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ReliableReconnectTest.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-import org.apache.activemq.test.TestSupport;
-import org.apache.activemq.util.IdGenerator;
-
-/**
- * 
- */
-public class ReliableReconnectTest extends TestSupport {
-    
-    protected static final int MESSAGE_COUNT = 100;
-    protected static final String DEFAULT_BROKER_URL = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL;
-    private static final int RECEIVE_TIMEOUT = 10000;
-    
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    protected String consumerClientId;
-    protected Destination destination;
-    protected AtomicBoolean closeBroker = new AtomicBoolean(false);
-    protected AtomicInteger messagesReceived = new AtomicInteger(0);
-    protected BrokerService broker;
-    protected int firstBatch = MESSAGE_COUNT / 10;
-    private IdGenerator idGen = new IdGenerator();
-
-    public ReliableReconnectTest() {
-    }
-
-    public ReliableReconnectTest(String n) {
-        super(n);
-    }
-
-    protected void setUp() throws Exception {
-        consumerClientId = idGen.generateId();
-        super.setUp();
-        topic = true;
-        destination = createDestination(getClass().getName());
-    }
-    
-    protected void tearDown() throws Exception {
-        if (broker!=null) {
-            broker.stop();
-        }
-    }
-
-    public ActiveMQConnectionFactory getConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory();
-    }
-
-    protected void startBroker(boolean deleteOnStart) throws JMSException {
-        try {
-            broker = BrokerFactory.createBroker(new URI("broker://()/localhost"));
-            broker.setUseShutdownHook(false);
-            broker.setDeleteAllMessagesOnStartup(deleteOnStart);
-           
-            broker.setUseJmx(false);
-            PersistenceAdapter adaptor = broker.getPersistenceAdapter();
-            if (adaptor instanceof AMQPersistenceAdapter) {
-                ((AMQPersistenceAdapter)adaptor).setDisableLocking(true);
-            }
-            broker.addConnector(DEFAULT_BROKER_URL);
-            broker.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    protected Connection createConsumerConnection() throws Exception {
-        Connection consumerConnection = getConnectionFactory().createConnection();
-        consumerConnection.setClientID(consumerClientId);
-        consumerConnection.start();
-        return consumerConnection;
-    }
-
-    protected MessageConsumer createConsumer(Connection con) throws Exception {
-        Session s = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        return s.createDurableSubscriber((Topic)destination, "TestFred");
-    }
-
-    protected void spawnConsumer() {
-        Thread thread = new Thread(new Runnable() {
-            public void run() {
-                try {
-                    Connection consumerConnection = createConsumerConnection();
-                    MessageConsumer consumer = createConsumer(consumerConnection);
-                    // consume some messages
-
-                    for (int i = 0; i < firstBatch; i++) {
-                        Message msg = consumer.receive(RECEIVE_TIMEOUT);
-                        if (msg != null) {
-                            // log.info("GOT: " + msg);
-                            messagesReceived.incrementAndGet();
-                        }
-                    }
-                    synchronized (closeBroker) {
-                        closeBroker.set(true);
-                        closeBroker.notify();
-                    }
-                    Thread.sleep(2000);
-                    for (int i = firstBatch; i < MESSAGE_COUNT; i++) {
-                        Message msg = consumer.receive(RECEIVE_TIMEOUT);
-                        // log.info("GOT: " + msg);
-                        if (msg != null) {
-                            messagesReceived.incrementAndGet();
-                        }
-                    }
-                    consumerConnection.close();
-                    synchronized (messagesReceived) {
-                        messagesReceived.notify();
-                    }
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-        thread.start();
-    }
-
-    public void testReconnect() throws Exception {
-        startBroker(true);
-        // register an interest as a durable subscriber
-        Connection consumerConnection = createConsumerConnection();
-        createConsumer(consumerConnection);
-        consumerConnection.close();
-        // send some messages ...
-        Connection connection = createConnection();
-        connection.setClientID(idGen.generateId());
-        connection.start();
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-        TextMessage msg = producerSession.createTextMessage();
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            msg.setText("msg: " + i);
-            producer.send(msg);
-        }
-        connection.close();
-        spawnConsumer();
-        synchronized (closeBroker) {
-            if (!closeBroker.get()) {
-                closeBroker.wait();
-            }
-        }
-        // System.err.println("Stopping broker");
-        broker.stop();
-        startBroker(false);
-        // System.err.println("Started Broker again");
-        synchronized (messagesReceived) {
-            if (messagesReceived.get() < MESSAGE_COUNT) {
-                messagesReceived.wait(60000);
-            }
-        }
-        // assertTrue(messagesReceived.get() == MESSAGE_COUNT);
-        int count = messagesReceived.get();
-        assertTrue("Not enough messages received: " + count, count > firstBatch);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SingleBrokerVirtualDestinationsWithWildcardTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SingleBrokerVirtualDestinationsWithWildcardTest.java
deleted file mode 100644
index 65b960b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SingleBrokerVirtualDestinationsWithWildcardTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualDestination;
-import org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualTopic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.util.MessageIdList;
-
-public class SingleBrokerVirtualDestinationsWithWildcardTest extends JmsMultipleBrokersTestSupport {
-
-    /**
-     * virtual destinations
-     */
-    public void testVirtualDestinations() throws Exception {
-        startAllBrokers();
-
-        sendReceive("local.test", true, "Consumer.a.local.test", false, 1, 1);
-        sendReceive("global.test", true, "Consumer.a.global.test", false, 1, 1);
-
-        destroyAllBrokers();
-    }
-
-    /**
-     * virtual destinations with wild-card subscriptions (without individual virtual queue)
-     */
-    public void testVirtualDestinationsWithWildcardWithoutIndividualVirtualQueue() throws Exception {
-        startAllBrokers();
-
-        sendReceive("local.test.1", true, "Consumer.a.local.test.>", false, 1, 1);
-        sendReceive("global.test.1", true, "Consumer.a.global.test.>", false, 1, 1);
-
-        destroyAllBrokers();
-    }
-
-    /**
-     * virtual destinations with wild-card subscriptions (with individual virtual queue)
-     */
-    public void testVirtualDestinationsWithWildcardWithIndividualVirtualQueue() throws Exception {
-        startAllBrokers();
-
-        sendReceive("local.test.1", true, "Consumer.a.local.test.1", false, 1, 1);
-        sendReceive("local.test.1", true, "Consumer.a.local.test.>", false, 1, 1);
-        sendReceive("global.test.1", true, "Consumer.a.global.test.1", false, 1, 1);
-        sendReceive("global.test.1", true, "Consumer.a.global.test.>", false, 1, 1);
-
-        destroyAllBrokers();
-    }
-
-    /**
-     * virtual destinations with wild-card subscriptions (wit virtual queue pre-created)
-     */
-    public void testVirtualDestinationsWithWildcardWithVirtualQueuePreCreated() throws Exception {
-        startAllBrokers();
-
-        sendReceive("Consumer.a.local.test.>", false, "Consumer.a.local.test.>", false, 1, 1);
-        sendReceive("local.test.1", true, "Consumer.a.local.test.>", false, 1, 1);
-        sendReceive("Consumer.a.global.test.>", false, "Consumer.a.global.test.>", false, 1, 1);
-        sendReceive("global.test.1", true, "Consumer.a.global.test.>", false, 1, 1);
-
-        destroyAllBrokers();
-    }
-
-    public void sendReceive(String dest1, boolean topic1, String dest2, boolean topic2, int send, int expected) throws Exception{
-        MessageConsumer client = createConsumer("BrokerA", createDestination(dest2, topic2));
-        Thread.sleep(1000);
-        sendMessages("BrokerA", createDestination(dest1, topic1), send);
-        MessageIdList msgs = getConsumerMessages("BrokerA", client);
-        msgs.setMaximumDuration(1000);
-        assertEquals(expected, msgs.getMessageCount());
-        client.close();
-        Thread.sleep(500);
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        String options = new String("?useJmx=false&deleteAllMessagesOnStartup=true");
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA" + options));
-    }
-
-    private BrokerService createAndConfigureBroker(URI uri) throws Exception {
-        BrokerService broker = createBroker(uri);
-
-        configurePersistenceAdapter(broker);
-
-        // make all topics virtual and consumers use the default prefix
-        VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
-        virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[]{new VirtualTopic()});
-        DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[]{virtualDestinationInterceptor};
-        broker.setDestinationInterceptors(destinationInterceptors);
-        return broker;
-    }
-
-    protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
-        File dataFileDir = new File("target/test-amq-data/kahadb/" + broker.getBrokerName());
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(dataFileDir);
-        broker.setPersistenceAdapter(kaha);
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopBrokerTest.java
deleted file mode 100755
index 728a2cc..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopBrokerTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-
-import javax.jms.JMSException;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * @author Oliver Belikan
- * 
- */
-public class StartAndStopBrokerTest extends TestCase {
-    public void testStartupShutdown() throws Exception {
-        // This systemproperty is used if we dont want to
-        // have persistence messages as a default
-        System.setProperty("activemq.persistenceAdapter",
-                "org.apache.activemq.store.vm.VMPersistenceAdapter");
-
-        // configuration of container and all protocolls
-        BrokerService broker = createBroker();
-
-        // start a client
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:9100");
-        factory.createConnection();
-
-        // stop activemq broker
-        broker.stop();
-
-        // start activemq broker again
-        broker = createBroker();
-
-        // start a client again
-        factory = new ActiveMQConnectionFactory("tcp://localhost:9100");
-        factory.createConnection();
-
-        // stop activemq broker
-        broker.stop();
-
-    }
-
-    protected BrokerService createBroker() throws JMSException {
-        BrokerService broker = null;
-
-        try {
-            broker = BrokerFactory.createBroker(new URI("broker://()/localhost"));
-            broker.setBrokerName("DefaultBroker");
-            broker.addConnector("tcp://localhost:9100");
-            broker.setUseShutdownHook(false);
-            
-            broker.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-        return broker;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java
deleted file mode 100644
index 38f5e11..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-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.spring.ConsumerBean;
-
-/**
- * 
- * 
- */
-public class StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest extends TestCase {
-
-    public static interface Task {
-        void execute() throws Exception;
-    }
-
-    public void setUp() throws Exception {
-    }
-
-    public void testStartAndStopClientAndBrokerAndCheckNoThreadsAreLeft() throws Exception {
-        runTest(new Task() {
-
-            public void execute() throws Exception {
-                BrokerService broker = new BrokerService();
-                broker.setPersistent(false);
-                broker.start();
-
-                ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
-                Connection connection = factory.createConnection();
-                connection.start();
-                Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-                Queue destination = session.createQueue(getName());
-
-                // consumer
-                MessageConsumer consumer = session.createConsumer(destination);
-                ConsumerBean listener = new ConsumerBean();
-                consumer.setMessageListener(listener);
-
-                // producer
-                MessageProducer producer = session.createProducer(destination);
-                TextMessage message = session.createTextMessage("Hello World!");
-                producer.send(message);
-                producer.close();
-
-                listener.assertMessagesArrived(1);
-
-                consumer.close();
-                session.close();
-                connection.close();
-
-                broker.stop();
-            }
-        });
-    }
-
-    public void runTest(Task task) throws Exception {
-        int numThreads = Thread.currentThread().getThreadGroup().activeCount();
-//        Thread.currentThread().getThreadGroup().list();
-
-        task.execute();
-
-        Thread.yield();
-        Thread.sleep(2000); // Wait for the threads to exit on their own
-
-//        Thread.currentThread().getThreadGroup().list();
-        int activeCount = Thread.currentThread().getThreadGroup().activeCount();
-        assertTrue("Should be at most one more thread but was: " + activeCount, numThreads + 1 <= activeCount);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java
deleted file mode 100755
index 38b9144..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.test.TestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author Paul Smith
- * 
- */
-public class SubscribeClosePublishThenConsumeTest extends TestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(SubscribeClosePublishThenConsumeTest.class);
-
-    public void testDurableTopic() throws Exception {
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://locahost");
-
-        String topicName = "TestTopic";
-        String clientID = getName();
-        String subscriberName = "MySubscriber:" + System.currentTimeMillis();
-
-        Connection connection = connectionFactory.createConnection();
-        connection.setClientID(clientID);
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic(topicName);
-
-        // this should register a durable subscriber, we then close it to
-        // test that we get messages from the producer later on
-        TopicSubscriber subscriber = session.createDurableSubscriber(topic, subscriberName);
-        connection.start();
-
-        topic = null;
-        subscriber.close();
-        subscriber = null;
-        session.close();
-        session = null;
-
-        // Create the new connection before closing to avoid the broker shutting
-        // down.
-        // now create a new Connection, Session & Producer, send some messages &
-        // then close
-        Connection t = connectionFactory.createConnection();
-        connection.close();
-        connection = t;
-
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = session.createTopic(topicName);
-        MessageProducer producer = session.createProducer(topic);
-        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        TextMessage textMessage = session.createTextMessage("Hello World");
-        producer.send(textMessage);
-        textMessage = null;
-
-        topic = null;
-        session.close();
-        session = null;
-
-        // Now (re)register the Durable subscriber, setup a listener and wait
-        // for messages that should
-        // have been published by the previous producer
-        t = connectionFactory.createConnection();
-        connection.close();
-        connection = t;
-
-        connection.setClientID(clientID);
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = session.createTopic(topicName);
-
-        subscriber = session.createDurableSubscriber(topic, subscriberName);
-        connection.start();
-
-        LOG.info("Started connection - now about to try receive the textMessage");
-
-        long time = System.currentTimeMillis();
-        Message message = subscriber.receive(15000L);
-        long elapsed = System.currentTimeMillis() - time;
-
-        LOG.info("Waited for: " + elapsed + " millis");
-
-        assertNotNull("Should have received the message we published by now", message);
-        assertTrue("should be text textMessage", message instanceof TextMessage);
-        textMessage = (TextMessage)message;
-        assertEquals("Hello World", textMessage.getText());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestBrokerConnectionDuplexExcludedDestinations.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestBrokerConnectionDuplexExcludedDestinations.java
deleted file mode 100644
index 3ee7d0d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestBrokerConnectionDuplexExcludedDestinations.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**

- * 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.usecases;

-

-import java.net.URI;

-

-import javax.jms.Connection;

-import javax.jms.ConnectionFactory;

-import javax.jms.DeliveryMode;

-import javax.jms.Message;

-import javax.jms.MessageConsumer;

-import javax.jms.MessageProducer;

-import javax.jms.Queue;

-import javax.jms.Session;

-import javax.jms.TextMessage;

-

-import junit.framework.TestCase;

-

-import org.apache.activemq.ActiveMQConnectionFactory;

-import org.apache.activemq.broker.BrokerFactory;

-import org.apache.activemq.broker.BrokerService;

-

-public class TestBrokerConnectionDuplexExcludedDestinations extends TestCase {

-	

-	BrokerService receiverBroker;

-	BrokerService senderBroker;

-	

-	Connection hubConnection;

-	Session hubSession;

-	

-	Connection spokeConnection;

-	Session spokeSession;

-	

-	public void setUp() throws Exception {

-		// Hub broker

-		String configFileName = "org/apache/activemq/usecases/receiver-duplex.xml";

-		URI uri = new URI("xbean:" + configFileName);

-		receiverBroker = BrokerFactory.createBroker(uri);

-		receiverBroker.setPersistent(false);

-		receiverBroker.setBrokerName("Hub");

-

-		// Spoke broker

-		configFileName = "org/apache/activemq/usecases/sender-duplex.xml";

-		uri = new URI("xbean:" + configFileName);

-		senderBroker = BrokerFactory.createBroker(uri);

-		senderBroker.setPersistent(false);

-		senderBroker.setBrokerName("Spoke");

-

-		// Start both Hub and Spoke broker

-		receiverBroker.start();

-		senderBroker.start();

-		

-		// create hub session

-		ConnectionFactory cfHub = new ActiveMQConnectionFactory("tcp://localhost:62002");

-

-		hubConnection = cfHub.createConnection();

-		hubConnection.start();

-		hubSession = hubConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);

-

-		// create spoke session

-		ConnectionFactory cfSpoke = new ActiveMQConnectionFactory("tcp://localhost:62001");

-		spokeConnection = cfSpoke.createConnection();

-		spokeConnection.start();

-		spokeSession = spokeConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);

-	}

-	

-	public void tearDown() throws Exception {

-		hubSession.close();

-		hubConnection.stop();

-		hubConnection.close();

-		

-		spokeSession.close();

-		spokeConnection.stop();

-		spokeConnection.close();

-

-		senderBroker.stop();

-		receiverBroker.stop();

-	}

-

-	public void testDuplexSendFromHubToSpoke()

-			throws Exception {

-

-		//create hub producer

-		MessageProducer hubProducer = hubSession.createProducer(null);

-		hubProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

-		hubProducer.setDisableMessageID(true);

-		hubProducer.setDisableMessageTimestamp(true);

-

-		Queue excludedQueueHub = hubSession.createQueue("exclude.test.foo");

-		TextMessage excludedMsgHub = hubSession.createTextMessage();

-		excludedMsgHub.setText(excludedQueueHub.toString());

-		

-		Queue includedQueueHub = hubSession.createQueue("include.test.foo");

-

-		TextMessage includedMsgHub = hubSession.createTextMessage();

-		includedMsgHub.setText(includedQueueHub.toString());		

-

-		// Sending from Hub queue

-		hubProducer.send(excludedQueueHub, excludedMsgHub);

-		hubProducer.send(includedQueueHub, includedMsgHub);

-

-

-		Queue excludedQueueSpoke = spokeSession.createQueue("exclude.test.foo");

-		MessageConsumer excludedConsumerSpoke = spokeSession.createConsumer(excludedQueueSpoke);

-		

-		Thread.sleep(100);

-

-	    Queue includedQueueSpoke = spokeSession.createQueue("include.test.foo");

-		MessageConsumer includedConsumerSpoke = spokeSession.createConsumer(includedQueueSpoke);		

-		

-		// Receiving from excluded Spoke queue

-		Message msg = excludedConsumerSpoke.receive(200);

-		assertNull(msg);

-		

-		// Receiving from included Spoke queue

-		msg = includedConsumerSpoke.receive(200);

-		assertEquals(includedMsgHub, msg);

-		

-		// we should be able to receive excluded queue message on Hub

-		MessageConsumer excludedConsumerHub = hubSession.createConsumer(excludedQueueHub);

-		msg = excludedConsumerHub.receive(200);;

-		assertEquals(excludedMsgHub, msg);

-

-		hubProducer.close();

-		excludedConsumerSpoke.close();

-

-	}

-	

-}

diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java
deleted file mode 100755
index 2a96031..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Useful base class for unit test cases
- * 
- * 
- */
-public class TestSupport extends TestCase {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(TestSupport.class);
-    
-    protected ActiveMQConnectionFactory connectionFactory;
-    protected boolean topic = true;
-
-    public TestSupport() {
-        super();
-    }
-
-    public TestSupport(String name) {
-        super(name);
-    }
-
-    protected ActiveMQMessage createMessage() {
-        return new ActiveMQMessage();
-    }
-
-    protected Destination createDestination(String subject) {
-        if (topic) {
-            return new ActiveMQTopic(subject);
-        } else {
-            return new ActiveMQQueue(subject);
-        }
-    }
-
-    protected void assertTextMessagesEqual(Message[] firstSet, Message[] secondSet) throws JMSException {
-        assertTextMessagesEqual("", firstSet, secondSet);
-    }
-
-    /**
-     * @param messsage
-     * @param firstSet
-     * @param secondSet
-     */
-    protected void assertTextMessagesEqual(String messsage, Message[] firstSet, Message[] secondSet) throws JMSException {
-        assertEquals("Message count does not match: " + messsage, firstSet.length, secondSet.length);
-        for (int i = 0; i < secondSet.length; i++) {
-            TextMessage m1 = (TextMessage)firstSet[i];
-            TextMessage m2 = (TextMessage)secondSet[i];
-            assertTextMessageEqual("Message " + (i + 1) + " did not match : ", m1, m2);
-        }
-    }
-
-    protected void assertEquals(TextMessage m1, TextMessage m2) throws JMSException {
-        assertEquals("", m1, m2);
-    }
-
-    /**
-     * @param message
-     * @param firstSet
-     * @param secondSet
-     */
-    protected void assertTextMessageEqual(String message, TextMessage m1, TextMessage m2) throws JMSException {
-        assertFalse(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1 == null ^ m2 == null);
-        if (m1 == null) {
-            return;
-        }
-        assertEquals(message, m1.getText(), m2.getText());
-    }
-
-    protected void assertEquals(Message m1, Message m2) throws JMSException {
-        assertEquals("", m1, m2);
-    }
-
-    /**
-     * @param message
-     * @param firstSet
-     * @param secondSet
-     */
-    protected void assertEquals(String message, Message m1, Message m2) throws JMSException {
-        assertFalse(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1 == null ^ m2 == null);
-        if (m1 == null) {
-            return;
-        }
-        assertTrue(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1.getClass() == m2.getClass());
-        if (m1 instanceof TextMessage) {
-            assertTextMessageEqual(message, (TextMessage)m1, (TextMessage)m2);
-        } else {
-            assertEquals(message, m1, m2);
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-    }
-
-    /**
-     * Factory method to create a new connection
-     */
-    protected Connection createConnection() throws Exception {
-        return getConnectionFactory().createConnection();
-    }
-
-    public ActiveMQConnectionFactory getConnectionFactory() throws Exception {
-        if (connectionFactory == null) {
-            connectionFactory = createConnectionFactory();
-            assertTrue("Should have created a connection factory!", connectionFactory != null);
-        }
-        return connectionFactory;
-    }
-
-    protected String getConsumerSubject() {
-        return getSubject();
-    }
-
-    protected String getProducerSubject() {
-        return getSubject();
-    }
-
-    protected String getSubject() {
-        return getClass().getName() + "." + getName();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java
deleted file mode 100644
index c3ccf08..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java
+++ /dev/null
@@ -1,642 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFilter;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ThreeBrokerQueueNetworkTest extends JmsMultipleBrokersTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ThreeBrokerQueueNetworkTest.class);
-    protected static final int MESSAGE_COUNT = 100;
-    private static final long MAX_WAIT_MILLIS = 10000;
-
-    interface Condition {
-        boolean isSatisified() throws Exception;
-    }
-    
-    /**
-     * BrokerA -> BrokerB -> BrokerC
-     */
-    public void testABandBCbrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-        bridgeBrokers("BrokerB", "BrokerC");
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Let's try to wait for any messages. Should be none.
-        Thread.sleep(1000);
-
-        // Get message count
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-        assertEquals(0, msgsC.getMessageCount());
-    }
-
-    /**
-     * BrokerA <- BrokerB -> BrokerC
-     */
-    public void testBAandBCbrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerB", "BrokerA");
-        bridgeBrokers("BrokerB", "BrokerC");
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-        Thread.sleep(2000); //et subscriptions get propagated
-        // Send messages
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-
-        // Let's try to wait for any messages.
-        Thread.sleep(1000);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        // Total received should be 100
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount() + msgsC.getMessageCount());
-    }
-    
-    /**
-     * BrokerA <- BrokerB -> BrokerC
-     */
-    public void testBAandBCbrokerNetworkWithSelectorsSendFirst() throws Exception {
-    	// Setup broker networks
-        bridgeBrokers("BrokerB", "BrokerA", true, 1, false);
-        bridgeBrokers("BrokerB", "BrokerC", true, 1, false);
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        
-        // Send messages for broker A
-        HashMap<String, Object> props = new HashMap<String, Object>();
-        props.put("broker", "BROKER_A");
-        sendMessages("BrokerB", dest, MESSAGE_COUNT, props);
-
-        //Send messages for broker C
-        props.clear();
-        props.put("broker", "BROKER_C");
-        sendMessages("BrokerB", dest, MESSAGE_COUNT, props);
-        
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest, "broker = 'BROKER_A'");
-        MessageConsumer clientC = createConsumer("BrokerC", dest, "broker = 'BROKER_C'");
-        Thread.sleep(2000); //et subscriptions get propagated
-        
-        // Let's try to wait for any messages.
-        //Thread.sleep(1000);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-        
-        // Total received should be 100
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT, msgsC.getMessageCount());
-    }
-    
-    /**
-     * BrokerA <- BrokerB -> BrokerC
-     */
-    public void testBAandBCbrokerNetworkWithSelectorsSubscribeFirst() throws Exception {
-    	// Setup broker networks
-        bridgeBrokers("BrokerB", "BrokerA", true, 1, false);
-        bridgeBrokers("BrokerB", "BrokerC", true, 1, false);
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest, "broker = 'BROKER_A'");
-        MessageConsumer clientC = createConsumer("BrokerC", dest, "broker = 'BROKER_C'");
-        Thread.sleep(2000); //et subscriptions get propagated
-        
-        
-        // Send messages for broker A
-        HashMap<String, Object> props = new HashMap<String, Object>();
-        props.put("broker", "BROKER_A");
-        sendMessages("BrokerB", dest, MESSAGE_COUNT, props);
-
-        //Send messages for broker C
-        props.clear();
-        props.put("broker", "BROKER_C");
-        sendMessages("BrokerB", dest, MESSAGE_COUNT, props);
-        
-        // Let's try to wait for any messages.
-        Thread.sleep(1000);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-        
-        // Total received should be 100
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT, msgsC.getMessageCount());
-    }    
-
-    /**
-     * BrokerA -> BrokerB <- BrokerC
-     */
-    public void testABandCBbrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-        bridgeBrokers("BrokerC", "BrokerB");
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 2);
-
-        assertEquals(MESSAGE_COUNT * 2, msgsB.getMessageCount());
-    }
-
-    /**
-     * BrokerA <-> BrokerB <-> BrokerC
-     */
-    public void testAllConnectedBrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-        bridgeBrokers("BrokerB", "BrokerA");
-        bridgeBrokers("BrokerB", "BrokerC");
-        bridgeBrokers("BrokerC", "BrokerB");
-        bridgeBrokers("BrokerA", "BrokerC");
-        bridgeBrokers("BrokerC", "BrokerA");
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Let's try to wait for any messages.
-        Thread.sleep(1000);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        assertEquals(MESSAGE_COUNT * 3, msgsA.getMessageCount() + msgsB.getMessageCount() + msgsC.getMessageCount());
-    }
-
-    public void testAllConnectedUsingMulticast() throws Exception {
-        // Setup broker networks
-        bridgeAllBrokers();
-
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Let's try to wait for any messages.
-        Thread.sleep(1000);
-
-        // Get message count
-        final MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        waitFor(new Condition() {
-            public boolean isSatisified() {
-                return msgsA.getMessageCount() == MESSAGE_COUNT;
-            } 
-        });
-        
-        assertEquals(MESSAGE_COUNT * 3, msgsA.getMessageCount() + msgsB.getMessageCount() + msgsC.getMessageCount());
-    }
-
-    // on slow machines some more waiting is required on account of slow advisories
-    private void waitFor(Condition condition) throws Exception {
-        final long expiry = System.currentTimeMillis() + MAX_WAIT_MILLIS;
-        while (!condition.isSatisified() && System.currentTimeMillis() < expiry) {
-            Thread.sleep(1000);
-        }   
-        if (System.currentTimeMillis() >= expiry) {
-            LOG.error("expired while waiting for condition " + condition);
-        }
-        
-    }
-
-    public void testAllConnectedUsingMulticastProducerConsumerOnA() throws Exception {
-        bridgeAllBrokers("default", 3, false);
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        int messageCount = 2000;
-        CountDownLatch messagesReceived = new CountDownLatch(messageCount);
-        MessageConsumer clientA = createConsumer("BrokerA", dest, messagesReceived);
-
-        // Let's try to wait for advisory percolation.
-        Thread.sleep(1000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, messageCount);
-     
-        assertTrue(messagesReceived.await(30, TimeUnit.SECONDS));
-        
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        assertEquals(messageCount, msgsA.getMessageCount());
-    }
-
-    public void testAllConnectedWithSpare() throws Exception {
-        bridgeAllBrokers("default", 3, false);
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        int messageCount = 2000;
-        CountDownLatch messagesReceived = new CountDownLatch(messageCount);
-        MessageConsumer clientA = createConsumer("BrokerA", dest, messagesReceived);
-
-        // ensure advisory percolation.
-        Thread.sleep(2000);
-
-        // Send messages
-        sendMessages("BrokerB", dest, messageCount);
-
-        assertTrue("messaged received within time limit", messagesReceived.await(30, TimeUnit.SECONDS));
-        
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        assertEquals(messageCount, msgsA.getMessageCount());
-    }
-    
-    /*
-     * This test is disabled - as it fails with a fix for 
-     * http://issues.apache.org/activemq/browse/AMQ-2530 - which highlights that 
-     * For a Conduit bridge - local subscription Ids weren't removed in a ConduitBridge
-     * The test fails because on closing clientA - clientB correctly receives all the 
-     * messages - ie. half dont get stuck on BrokerA - 
-     */
-    public void XtestMigrateConsumerStuckMessages() throws Exception {
-        boolean suppressQueueDuplicateSubscriptions = false;
-        bridgeAllBrokers("default", 3, suppressQueueDuplicateSubscriptions);
-        startAllBrokers();
-        waitForBridgeFormation();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);    
-        
-        // Setup consumers
-        LOG.info("Consumer on A");
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        
-        // ensure advisors have percolated
-        Thread.sleep(2000);
-        
-        LOG.info("Consumer on B");
-        int messageCount = 2000;
-        
-        // will only get half of the messages
-        CountDownLatch messagesReceived = new CountDownLatch(messageCount/2);
-        MessageConsumer clientB = createConsumer("BrokerB", dest, messagesReceived);
-          
-        // ensure advisors have percolated
-        Thread.sleep(2000);
-
-        LOG.info("Close consumer on A");
-        clientA.close();
-
-        // ensure advisors have percolated
-        Thread.sleep(2000);
-       
-        LOG.info("Send to B"); 
-        sendMessages("BrokerB", dest, messageCount);
-
-        // Let's try to wait for any messages.
-        assertTrue(messagesReceived.await(30, TimeUnit.SECONDS));
-
-        // Get message count
-        MessageIdList msgs = getConsumerMessages("BrokerB", clientB);
-        
-        // see will any more arrive
-        Thread.sleep(500);        
-        assertEquals(messageCount/2, msgs.getMessageCount());
-        
-        // pick up the stuck messages
-        messagesReceived = new CountDownLatch(messageCount/2);
-        clientA = createConsumer("BrokerA", dest, messagesReceived);
-        // Let's try to wait for any messages.
-        assertTrue(messagesReceived.await(30, TimeUnit.SECONDS));
-        
-        msgs = getConsumerMessages("BrokerA", clientA);
-        assertEquals(messageCount/2, msgs.getMessageCount());
-    }
-
-    // use case: for maintenance, migrate consumers and producers from one
-    // node in the network to another so node can be replaced/updated
-    public void testMigrateConsumer() throws Exception {
-        boolean suppressQueueDuplicateSubscriptions = true;
-        boolean decreaseNetworkConsumerPriority = true;
-        bridgeAllBrokers("default", 3, suppressQueueDuplicateSubscriptions, decreaseNetworkConsumerPriority);
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);    
-        
-        // Setup consumers
-        LOG.info("Consumer on A");
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        
-        // ensure advisors have percolated
-        Thread.sleep(2000);
-        
-        LOG.info("Consumer on B");
-        int messageCount = 2000;
-        CountDownLatch messagesReceived = new CountDownLatch(messageCount);
-        MessageConsumer clientB = createConsumer("BrokerB", dest, messagesReceived);
-       
-        // make the consumer slow so that any network consumer has a chance, even
-        // if it has a lower priority
-        MessageIdList msgs = getConsumerMessages("BrokerB", clientB);
-        msgs.setProcessingDelay(10);
-        
-        // ensure advisors have percolated
-        Thread.sleep(2000);
-
-        LOG.info("Close consumer on A");
-        clientA.close();
-
-        // ensure advisors have percolated
-        Thread.sleep(2000);
-       
-        LOG.info("Send to B"); 
-        sendMessages("BrokerB", dest, messageCount);
-
-        // Let's try to wait for any messages.
-        assertTrue("messages are received within limit", messagesReceived.await(60, TimeUnit.SECONDS));
-        assertEquals(messageCount, msgs.getMessageCount());      
-    }
-
-    public void testNoDuplicateQueueSubs() throws Exception {
-        
-        bridgeAllBrokers("default", 3, true);
-        
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        String brokerName = "BrokerA";
-        MessageConsumer consumer = createConsumer(brokerName, dest);
-        
-        // wait for advisories
-        Thread.sleep(2000);
-        
-        // verify there is one consumer on each broker, no cycles
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            verifyConsumerCount(broker, 1, dest);
-        }
-        
-        consumer.close();
-        
-        // wait for advisories
-        Thread.sleep(2000);
-        
-        // verify there is no more consumers
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            verifyConsumerCount(broker, 0, dest);
-        }
-    }
-    
-
-    public void testNoDuplicateQueueSubsHasLowestPriority() throws Exception {
-        boolean suppressQueueDuplicateSubscriptions = true;
-        boolean decreaseNetworkConsumerPriority = true;
-        bridgeAllBrokers("default", 3, suppressQueueDuplicateSubscriptions, decreaseNetworkConsumerPriority);
-
-        // Setup destination
-        final Destination dest = createDestination("TEST.FOO", false);
-
-        // delay the advisory messages so that one can percolate fully (cyclicly) before the other
-        BrokerItem brokerB = brokers.get("BrokerA");
-        brokerB.broker.setPlugins(new BrokerPlugin[]{new BrokerPlugin() {
-
-            public Broker installPlugin(Broker broker) throws Exception {          
-                return new BrokerFilter(broker) {
-
-                    final AtomicInteger count = new AtomicInteger();
-                    @Override
-                    public void preProcessDispatch(
-                            MessageDispatch messageDispatch) {
-                        if (messageDispatch.getDestination().getPhysicalName().contains("ActiveMQ.Advisory.Consumer")) {
-                            // lets delay the first advisory
-                            if (count.getAndIncrement() == 0) {
-                                LOG.info("Sleeping on first advisory: " + messageDispatch);
-                                try {
-                                    Thread.sleep(2000);
-                                } catch (InterruptedException e) {
-                                    e.printStackTrace();
-                                }
-                            }
-                        }
-                        super.postProcessDispatch(messageDispatch);
-                    }
-                    
-                };
-            }}
-        });
-        
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-    
-        // Setup consumers
-        String brokerName = "BrokerA";
-        createConsumer(brokerName, dest);
-        
-        // wait for advisories
-        Thread.sleep(5000);
-        
-        // verify there is one consumer on each broker, no cycles
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            verifyConsumerCount(broker, 1, dest);
-            if (!brokerName.equals(broker.getBrokerName())) {
-                verifyConsumePriority(broker, ConsumerInfo.NETWORK_CONSUMER_PRIORITY, dest);
-            }
-        }
-    }
-
-
-    public void testDuplicateQueueSubs() throws Exception {
-    	
-    	createBroker("BrokerD");
-        
-        bridgeAllBrokers("default", 3, false);
-        startAllBrokers();
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        String brokerName = "BrokerA";
-        MessageConsumer consumer = createConsumer(brokerName, dest);
-        
-        // wait for advisories
-        Thread.sleep(2000);
-        
-        verifyConsumerCount(brokers.get(brokerName).broker, 1, dest);
-        
-        // in a cyclic network, other brokers will get second order consumer
-        // an alternative route to A via each other
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            if (!brokerName.equals(broker.getBrokerName())) {
-                verifyConsumerCount(broker, 3, dest);
-                verifyConsumePriority(broker, ConsumerInfo.NORMAL_PRIORITY, dest);
-            }
-        }
-        
-        consumer.close();
-        
-        // wait for advisories
-        Thread.sleep(2000);
-        
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            verifyConsumerCount(broker, 0, dest);
-        }
-    }
-
-    private void verifyConsumerCount(BrokerService broker, int count, final Destination dest) throws Exception {
-        final RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker();
-        waitFor(new Condition() {
-            public boolean isSatisified() throws Exception {
-                return !regionBroker.getDestinations(ActiveMQDestination.transform(dest)).isEmpty();
-            }
-        });
-        Queue internalQueue = (Queue) regionBroker.getDestinations(ActiveMQDestination.transform(dest)).iterator().next();
-        assertEquals("consumer count on " + broker.getBrokerName() + " matches for q: " + internalQueue, count, internalQueue.getConsumers().size());      
-    }
-
-    private void verifyConsumePriority(BrokerService broker, byte expectedPriority, Destination dest) throws Exception {
-        RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker();
-        Queue internalQueue = (Queue) regionBroker.getDestinations(ActiveMQDestination.transform(dest)).iterator().next();
-        for (Subscription consumer : internalQueue.getConsumers()) {
-            assertEquals("consumer on " + broker.getBrokerName() + " matches priority: " + internalQueue, expectedPriority, consumer.getConsumerInfo().getPriority());      
-        }
-    }
-    
-    @Override
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=false&useJmx=false"));
-        createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=false&useJmx=false"));
-        createBroker(new URI("broker:(tcp://localhost:61618)/BrokerC?persistent=false&useJmx=false"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkUsingTcpTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkUsingTcpTest.java
deleted file mode 100644
index ef71a9b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkUsingTcpTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.network.DemandForwardingBridge;
-import org.apache.activemq.network.NetworkBridgeConfiguration;
-import org.apache.activemq.transport.TransportFactory;
-
-/**
- * 
- */
-public class ThreeBrokerQueueNetworkUsingTcpTest extends ThreeBrokerQueueNetworkTest {
-    protected List<DemandForwardingBridge> bridges;
-
-    protected void bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker) throws Exception {
-        List remoteTransports = remoteBroker.getTransportConnectors();
-        List localTransports = localBroker.getTransportConnectors();
-
-        URI remoteURI;
-        URI localURI;
-        if (!remoteTransports.isEmpty() && !localTransports.isEmpty()) {
-            remoteURI = ((TransportConnector)remoteTransports.get(0)).getConnectUri();
-            localURI = ((TransportConnector)localTransports.get(0)).getConnectUri();
-
-            // Ensure that we are connecting using tcp
-            if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) {
-                NetworkBridgeConfiguration config = new NetworkBridgeConfiguration();
-                config.setBrokerName(localBroker.getBrokerName());
-                DemandForwardingBridge bridge = new DemandForwardingBridge(config, TransportFactory.connect(localURI), TransportFactory.connect(remoteURI));
-                bridge.setBrokerService(localBroker);
-                bridges.add(bridge);
-
-                bridge.start();
-            } else {
-                throw new Exception("Remote broker or local broker is not using tcp connectors");
-            }
-        } else {
-            throw new Exception("Remote broker or local broker has no registered connectors.");
-        }
-
-        maxSetupTime = 2000;
-    }
-
-    public void setUp() throws Exception {
-        super.setUp();
-
-        bridges = new ArrayList<DemandForwardingBridge>();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerStompTemporaryQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerStompTemporaryQueueTest.java
deleted file mode 100644
index 89a76f3..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerStompTemporaryQueueTest.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.List;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.transport.stomp.Stomp;
-import org.apache.activemq.transport.stomp.StompConnection;
-import org.apache.activemq.transport.stomp.StompFrame;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class ThreeBrokerStompTemporaryQueueTest extends JmsMultipleBrokersTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ThreeBrokerStompTemporaryQueueTest.class);
-    private StompConnection stompConnection;
-
-    protected NetworkConnector bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker, boolean dynamicOnly, int networkTTL, boolean conduit, boolean failover) throws Exception {
-        List<TransportConnector> transportConnectors = remoteBroker.getTransportConnectors();
-        URI remoteURI;
-        if (!transportConnectors.isEmpty()) {
-            remoteURI = transportConnectors.get(0).getConnectUri();
-            NetworkConnector connector = new DiscoveryNetworkConnector(new URI("static:" + remoteURI));
-            connector.setName(localBroker.getBrokerName() + remoteBroker.getBrokerName());
-            localBroker.addNetworkConnector(connector);
-            maxSetupTime = 2000;
-            return connector;
-        } else {
-            throw new Exception("Remote broker has no registered connectors.");
-        }
-    }
-
-    public void testStompTemporaryQueue() throws Exception {
-        // Setup broker networks
-        bridgeAndConfigureBrokers("BrokerA", "BrokerB");
-        bridgeAndConfigureBrokers("BrokerA", "BrokerC");
-        bridgeAndConfigureBrokers("BrokerB", "BrokerA");
-        bridgeAndConfigureBrokers("BrokerB", "BrokerC");
-        bridgeAndConfigureBrokers("BrokerC", "BrokerA");
-        bridgeAndConfigureBrokers("BrokerC", "BrokerB");
-
-        startAllBrokers();
-        waitForBridgeFormation();
-
-        Thread.sleep(1000);
-
-        stompConnection = new StompConnection();
-        stompConnection.open("localhost", 61614);
-        // Creating a temp queue
-        stompConnection.sendFrame("CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL);
-
-        StompFrame frame = stompConnection.receive();
-        assertTrue(frame.toString().startsWith("CONNECTED"));
-
-        stompConnection.subscribe("/temp-queue/meaningless", "auto");
-        stompConnection.send("/temp-queue/meaningless", "Hello World");
-
-        frame = stompConnection.receive(3000);
-        assertEquals("Hello World", frame.getBody());
-
-        Thread.sleep(1000);
-
-        assertEquals("Destination", 1, brokers.get("BrokerA").broker.getAdminView().getTemporaryQueues().length);
-        assertEquals("Destination", 1, brokers.get("BrokerB").broker.getAdminView().getTemporaryQueues().length);
-        assertEquals("Destination", 1, brokers.get("BrokerC").broker.getAdminView().getTemporaryQueues().length);
-
-        int advisoryTopicsForTempQueues;
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerA", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should be present", 1, advisoryTopicsForTempQueues);
-
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerB", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should be present", 1, advisoryTopicsForTempQueues);
-
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerC", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should be present", 1, advisoryTopicsForTempQueues);
-
-        stompConnection.disconnect();
-        
-        Thread.sleep(1000);
-        
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerA", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should have been deleted", 0, advisoryTopicsForTempQueues);
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerB", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should have been deleted", 0, advisoryTopicsForTempQueues);
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerC", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should have been deleted", 0, advisoryTopicsForTempQueues);  
-        
-
-        LOG.info("Restarting brokerA");
-        BrokerItem brokerItem = brokers.remove("BrokerA");
-        if (brokerItem != null) {
-            brokerItem.destroy();
-        }
-        
-        BrokerService restartedBroker = createAndConfigureBroker(new URI("broker:(tcp://localhost:61616,stomp://localhost:61613)/BrokerA"));
-        bridgeAndConfigureBrokers("BrokerA", "BrokerB");
-        bridgeAndConfigureBrokers("BrokerA", "BrokerC");
-        restartedBroker.start();
-        waitForBridgeFormation();
-        
-        Thread.sleep(3000);
-
-        assertEquals("Destination", 0, brokers.get("BrokerA").broker.getAdminView().getTemporaryQueues().length);
-        assertEquals("Destination", 0, brokers.get("BrokerB").broker.getAdminView().getTemporaryQueues().length);
-        assertEquals("Destination", 0, brokers.get("BrokerC").broker.getAdminView().getTemporaryQueues().length);
-
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerA", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should have been deleted", 0, advisoryTopicsForTempQueues);
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerB", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should have been deleted", 0, advisoryTopicsForTempQueues);
-        advisoryTopicsForTempQueues = countTopicsByName("BrokerC", "ActiveMQ.Advisory.Consumer.Queue.ID");
-        assertEquals("Advisory topic should have been deleted", 0, advisoryTopicsForTempQueues);
-
-    }
-
-    private int countTopicsByName(String broker, String name)
-            throws Exception {
-        int advisoryTopicsForTempQueues = 0;
-        for(int i=0; i<brokers.get(broker).broker.getAdminView().getTopics().length; i++){
-            if(brokers.get(broker).broker.getAdminView().getTopics()[i].toString().contains(name)){
-                advisoryTopicsForTempQueues++;
-            }
-        }
-        return advisoryTopicsForTempQueues;
-    }
-
-
-    private void bridgeAndConfigureBrokers(String local, String remote) throws Exception {
-        NetworkConnector bridge = bridgeBrokers(local, remote);
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        String options = new String("?deleteAllMessagesOnStartup=true");
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61616,stomp://localhost:61613)/BrokerA" + options));
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61617,stomp://localhost:61614)/BrokerB" + options));
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61618,stomp://localhost:61615)/BrokerC" + options));
-
-    }
-
-    private BrokerService createAndConfigureBroker(URI uri) throws Exception {
-        BrokerService broker = createBroker(uri);
-
-        configurePersistenceAdapter(broker);
-
-        return broker;
-    }
-
-    protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
-        File dataFileDir = new File("target/test-amq-data/kahadb/" + broker.getBrokerName());
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(dataFileDir);
-        broker.setPersistenceAdapter(kaha);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTempQueueNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTempQueueNetworkTest.java
deleted file mode 100644
index e1dc998..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTempQueueNetworkTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.Iterator;
-
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.network.NetworkConnector;
-
-/**
- * 
- */
-public class ThreeBrokerTempQueueNetworkTest extends JmsMultipleBrokersTestSupport {
-    protected static final int MESSAGE_COUNT = 100;
-    boolean enableTempDestinationBridging = true;
-
-    /**
-     * BrokerA -> BrokerB -> BrokerC
-     */
-    public void testTempQueueCleanup() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB", false, 2);
-        bridgeBrokers("BrokerB", "BrokerC", false, 2);
-        startAllBrokers();
-        BrokerItem brokerItem = (BrokerItem)brokers.get("BrokerC");
-        Connection conn = brokerItem.createConnection();
-        conn.start();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue tempQ = sess.createTemporaryQueue();
-        Thread.sleep(5000);
-        for (Iterator i = brokers.values().iterator(); i.hasNext();) {
-            BrokerItem bi = (BrokerItem)i.next();
-            assertEquals("No queues on broker " + bi.broker.getBrokerName(), 1, bi.broker.getAdminView().getTemporaryQueues().length);
-        }
-        tempQ.delete();
-        Thread.sleep(2000);
-        for (Iterator i = brokers.values().iterator(); i.hasNext();) {
-            BrokerItem bi = (BrokerItem)i.next();
-            assertEquals("Temp queue left behind on broker " + bi.broker.getBrokerName(), 0, bi.broker.getAdminView().getTemporaryQueues().length);
-        }
-    }
-
-    // this actually uses 4 brokers ...
-    public void testTempQueueRecovery() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB", false, 3);
-        bridgeBrokers("BrokerB", "BrokerC", false, 3);
-        startAllBrokers();
-        BrokerItem brokerItem = (BrokerItem)brokers.get("BrokerC");
-        Connection conn = brokerItem.createConnection();
-        conn.start();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        TemporaryQueue tempQ = sess.createTemporaryQueue();
-        Thread.sleep(5000);
-        for (Iterator i = brokers.values().iterator(); i.hasNext();) {
-            BrokerItem bi = (BrokerItem)i.next();
-            assertEquals("No queues on broker " + bi.broker.getBrokerName(), 1, bi.broker.getAdminView().getTemporaryQueues().length);
-        }
-        createBroker(new URI("broker:(tcp://localhost:61619)/BrokerD?persistent=false&useJmx=true"));
-        bridgeBrokers("BrokerD", "BrokerA", false, 3);
-        BrokerItem newBroker = (BrokerItem)brokers.get("BrokerD");
-        newBroker.broker.start();
-        Thread.sleep(1000);
-        assertEquals("No queues on broker D", 1, newBroker.broker.getAdminView().getTemporaryQueues().length);
-        tempQ.delete();
-        Thread.sleep(2000);
-        for (Iterator i = brokers.values().iterator(); i.hasNext();) {
-            BrokerItem bi = (BrokerItem)i.next();
-            assertEquals("Temp queue left behind on broker " + bi.broker.getBrokerName(), 0, bi.broker.getAdminView().getTemporaryQueues().length);
-        }
-    }
-
-    public void testTempDisable() throws Exception {
-        enableTempDestinationBridging = false;
-        try {
-            testTempQueueCleanup();
-        } catch (Throwable e) {
-            // Expecting an error
-            return;
-        }
-        fail("Test should have failed since temp queues are disabled.");
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=false&useJmx=true"));
-        createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=false&useJmx=true"));
-        createBroker(new URI("broker:(tcp://localhost:61618)/BrokerC?persistent=false&useJmx=true"));
-    }
-
-    protected NetworkConnector bridgeBrokers(String localBrokerName, String remoteBrokerName, boolean dynamicOnly, int networkTTL) throws Exception {
-        NetworkConnector connector = super.bridgeBrokers(localBrokerName, remoteBrokerName, dynamicOnly, networkTTL, true);
-        connector.setBridgeTempDestinations(enableTempDestinationBridging);
-        return connector;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkTest.java
deleted file mode 100644
index 75f4f19..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkTest.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.Topic;
-
-import junit.framework.Test;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.JmsMultipleBrokersTestSupport.BrokerItem;
-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.util.MessageIdList;
-
-/**
- * 
- */
-public class ThreeBrokerTopicNetworkTest extends JmsMultipleBrokersTestSupport {
-    protected static final int MESSAGE_COUNT = 100;
-    public boolean dynamicOnly;
-
-    /**
-     * BrokerA -> BrokerB -> BrokerC
-     */
-    public void testABandBCbrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-        bridgeBrokers("BrokerB", "BrokerC");
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-
-//      let consumers propogate around the network
-        Thread.sleep(2000);
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 2);
-        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 2);
-
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 2, msgsB.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 2, msgsC.getMessageCount());
-    }
-    
-    public void initCombosForTestABandBCbrokerNetworkWithSelectors() {
-    	addCombinationValues("dynamicOnly", new Object[] {true, false});
-    }
-    
-    /**
-     * BrokerA -> BrokerB -> BrokerC
-     */
-    public void testABandBCbrokerNetworkWithSelectors() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, 2, true);
-        bridgeBrokers("BrokerB", "BrokerC", dynamicOnly, 2, true);
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerC", dest, "dummy = 33");
-        MessageConsumer clientB = createConsumer("BrokerC", dest, "dummy > 30");
-        MessageConsumer clientC = createConsumer("BrokerC", dest, "dummy = 34");
-
-        // let consumers propogate around the network
-        Thread.sleep(2000);
-        // Send messages
-        // Send messages for broker A
-        HashMap<String, Object> props = new HashMap<String, Object>();
-        props.put("dummy", 33);
-        sendMessages("BrokerA", dest, MESSAGE_COUNT, props);
-        props.put("dummy", 34);
-        sendMessages("BrokerA", dest, MESSAGE_COUNT * 2, props);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerC", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerC", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 2) ;
-
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
-        assertEquals(MESSAGE_COUNT *2, msgsC.getMessageCount());
-    }
-
-    /**
-     * BrokerA <- BrokerB -> BrokerC
-     */
-    public void testBAandBCbrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerB", "BrokerA");
-        bridgeBrokers("BrokerB", "BrokerC");
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-
-//      let consumers propogate around the network
-        Thread.sleep(2000);
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT * 2);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT);
-        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 2);
-
-        assertEquals(MESSAGE_COUNT * 2, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT, msgsB.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 2, msgsC.getMessageCount());
-    }
-
-    /**
-     * BrokerA -> BrokerB <- BrokerC
-     */
-    public void testABandCBbrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-        bridgeBrokers("BrokerC", "BrokerB");
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-
-//      let consumers propogate around the network
-        Thread.sleep(2000);
-        
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-        msgsC.waitForMessagesToArrive(MESSAGE_COUNT);
-
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
-        assertEquals(MESSAGE_COUNT, msgsC.getMessageCount());
-    }
-
-    /**
-     * BrokerA <-> BrokerB <-> BrokerC
-     */
-    public void testAllConnectedBrokerNetwork() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-        bridgeBrokers("BrokerB", "BrokerA");
-        bridgeBrokers("BrokerB", "BrokerC");
-        bridgeBrokers("BrokerC", "BrokerB");
-        bridgeBrokers("BrokerA", "BrokerC");
-        bridgeBrokers("BrokerC", "BrokerA");
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-        //let consumers propogate around the network
-        Thread.sleep(2000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-
-        assertEquals(MESSAGE_COUNT * 3, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 3, msgsC.getMessageCount());
-    }
-
-    public void testAllConnectedBrokerNetworkSingleProducerTTL() throws Exception {
-        
-        // duplicates are expected with ttl of 2 as each broker is connected to the next
-        // but the dups are suppressed by the store and now also by the topic sub when enableAudit
-        // default (true) is present in a matching destination policy entry
-        int networkTTL = 2;
-        boolean conduitSubs = true;
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerB", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerC", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerC", "BrokerA", dynamicOnly, networkTTL, conduitSubs);
-
-        PolicyMap policyMap = new PolicyMap();
-        // enable audit is on by default just need to give it matching policy entry
-        // so it will be applied to the topic subscription
-        policyMap.setDefaultEntry(new PolicyEntry());
-        Collection<BrokerItem> brokerList = brokers.values();
-        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
-            BrokerService broker = i.next().broker;
-            broker.setDestinationPolicy(policyMap);
-            broker.setDeleteAllMessagesOnStartup(true);
-        }
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-        //let consumers propogate around the network
-        Thread.sleep(2000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, 1);
-        
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(1);
-        msgsB.waitForMessagesToArrive(1);
-        msgsC.waitForMessagesToArrive(1);
-
-        // ensure we don't get any more messages
-        Thread.sleep(2000);
-        
-        assertEquals(1, msgsA.getMessageCount());
-        assertEquals(1, msgsB.getMessageCount());
-        assertEquals(1, msgsC.getMessageCount());
-    }
-
-    public void testAllConnectedBrokerNetworkDurableSubTTL() throws Exception {
-        int networkTTL = 2;
-        boolean conduitSubs = true;
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerB", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerC", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        bridgeBrokers("BrokerC", "BrokerA", dynamicOnly, networkTTL, conduitSubs);
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createDurableSubscriber("BrokerA", (Topic)dest, "clientA");
-        MessageConsumer clientB = createDurableSubscriber("BrokerB", (Topic)dest, "clientB");
-        MessageConsumer clientC = createDurableSubscriber("BrokerC", (Topic)dest, "clientC");
-        //let consumers propogate around the network
-        Thread.sleep(2000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, 1);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(1);
-        msgsB.waitForMessagesToArrive(1);
-        msgsC.waitForMessagesToArrive(1);
-
-        // ensure we don't get any more messages
-        Thread.sleep(2000);
-        
-        assertEquals(1, msgsA.getMessageCount());
-        assertEquals(1, msgsB.getMessageCount());
-        assertEquals(1, msgsC.getMessageCount());
-    }
-    
-    /**
-     * BrokerA <-> BrokerB <-> BrokerC
-     */
-    public void testAllConnectedUsingMulticast() throws Exception {
-        // Setup broker networks
-        bridgeAllBrokers();
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        MessageConsumer clientC = createConsumer("BrokerC", dest);
-        
-        //let consumers propogate around the network
-        Thread.sleep(2000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-        sendMessages("BrokerB", dest, MESSAGE_COUNT);
-        sendMessages("BrokerC", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-        msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 3);
-
-        assertEquals(MESSAGE_COUNT * 3, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 3, msgsB.getMessageCount());
-        assertEquals(MESSAGE_COUNT * 3, msgsC.getMessageCount());
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        String options = new String("?persistent=false&useJmx=false"); 
-        createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA" + options));
-        createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB" + options));
-        createBroker(new URI("broker:(tcp://localhost:61618)/BrokerC" + options));
-    }
-    
-    public static Test suite() {
-    	return suite(ThreeBrokerTopicNetworkTest.class);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkUsingTcpTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkUsingTcpTest.java
deleted file mode 100644
index e26618e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkUsingTcpTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.network.DemandForwardingBridge;
-import org.apache.activemq.network.NetworkBridgeConfiguration;
-import org.apache.activemq.transport.TransportFactory;
-
-/**
- * 
- */
-public class ThreeBrokerTopicNetworkUsingTcpTest extends ThreeBrokerTopicNetworkTest {
-    protected List<DemandForwardingBridge> bridges;
-
-    protected void bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker) throws Exception {
-        List remoteTransports = remoteBroker.getTransportConnectors();
-        List localTransports = localBroker.getTransportConnectors();
-
-        URI remoteURI;
-        URI localURI;
-        if (!remoteTransports.isEmpty() && !localTransports.isEmpty()) {
-            remoteURI = ((TransportConnector)remoteTransports.get(0)).getConnectUri();
-            localURI = ((TransportConnector)localTransports.get(0)).getConnectUri();
-
-            // Ensure that we are connecting using tcp
-            if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) {
-                NetworkBridgeConfiguration config = new NetworkBridgeConfiguration();
-                config.setBrokerName(localBroker.getBrokerName());
-                DemandForwardingBridge bridge = new DemandForwardingBridge(config, TransportFactory.connect(localURI), TransportFactory.connect(remoteURI));
-                bridge.setBrokerService(localBroker);
-                bridges.add(bridge);
-
-                bridge.start();
-            } else {
-                throw new Exception("Remote broker or local broker is not using tcp connectors");
-            }
-        } else {
-            throw new Exception("Remote broker or local broker has no registered connectors.");
-        }
-
-        maxSetupTime = 2000;
-    }
-
-    public void setUp() throws Exception {
-        super.setUp();
-
-        bridges = new ArrayList<DemandForwardingBridge>();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkAMQPATest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkAMQPATest.java
deleted file mode 100644
index 63f6c5f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkAMQPATest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
-
-
-public class ThreeBrokerVirtualTopicNetworkAMQPATest extends ThreeBrokerVirtualTopicNetworkTest {
-    
-     protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
-        File dataFileDir = new File("target/test-amq-data/amq/" + broker.getBrokerName());
-        AMQPersistenceAdapter adapter = new AMQPersistenceAdapter();
-        adapter.setDirectory(dataFileDir);
-        broker.setPersistenceAdapter(adapter);
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java
deleted file mode 100644
index a8e8f50..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualDestination;
-import org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualTopic;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.util.MessageIdList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class ThreeBrokerVirtualTopicNetworkTest extends JmsMultipleBrokersTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ThreeBrokerVirtualTopicNetworkTest.class);
-    protected static final int MESSAGE_COUNT = 1;
-    public boolean dynamicOnly = false;
-
-    
-    public void testNetworkVirtualTopic() throws Exception {
-        int networkTTL = 6;
-        boolean conduitSubs = true;
-        // Setup broker networks
-        bridgeAndConfigureBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-        bridgeAndConfigureBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        bridgeAndConfigureBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduitSubs);
-        bridgeAndConfigureBrokers("BrokerB", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        bridgeAndConfigureBrokers("BrokerC", "BrokerA", dynamicOnly, networkTTL, conduitSubs);
-        bridgeAndConfigureBrokers("BrokerC", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-
-        startAllBrokers();      
-        waitForBridgeFormation();
-        
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", createDestination("Consumer.A.TEST.FOO", false));
-        MessageConsumer clientB = createConsumer("BrokerB", createDestination("Consumer.B.TEST.FOO", false));
-        MessageConsumer clientC = createConsumer("BrokerC", createDestination("Consumer.C.TEST.FOO", false));
-        
-        Thread.sleep(2000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, 1);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        MessageIdList msgsC = getConsumerMessages("BrokerC", clientC);
-
-        msgsA.waitForMessagesToArrive(1);
-        msgsB.waitForMessagesToArrive(1);
-        msgsC.waitForMessagesToArrive(1);
-
-        // ensure we don't get any more messages
-        Thread.sleep(2000);
-        
-        assertEquals(1, msgsA.getMessageCount());
-        assertEquals(1, msgsB.getMessageCount());
-        assertEquals(1, msgsC.getMessageCount());
-        
-        // restart to ensure no hanging messages
-        LOG.info("Restarting brokerA");
-        BrokerItem brokerItem = brokers.remove("BrokerA");
-        if (brokerItem != null) {
-            brokerItem.destroy();
-        }
-        
-        BrokerService restartedBroker = createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?useJmx=false"));
-        bridgeAndConfigureBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-        bridgeAndConfigureBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        restartedBroker.start();
-        waitForBridgeFormation();
-        
-        clientA = createConsumer("BrokerA", createDestination("Consumer.A.TEST.FOO", false));
-        LOG.info("recreated clientA");
-        
-        Thread.sleep(2000);
-
-        sendMessages("BrokerA", dest, 10);
-
-        msgsA = getConsumerMessages("BrokerA", clientA);
-
-        msgsA.waitForMessagesToArrive(10);
-        msgsB.waitForMessagesToArrive(11);
-        msgsC.waitForMessagesToArrive(11);
-
-        // ensure we don't get any more messages
-        Thread.sleep(2000);
-        
-        LOG.info("MessagesA: " + msgsA.getMessageIds());
-        assertEquals(10, msgsA.getMessageCount());
-        assertEquals(11, msgsB.getMessageCount());
-        assertEquals(11, msgsC.getMessageCount());        
-        
-        // restart to ensure no hanging messages
-        LOG.info("Restarting brokerA again");
-        brokerItem = brokers.remove("BrokerA");
-        if (brokerItem != null) {
-            brokerItem.destroy();
-        }
-        
-        restartedBroker = createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?useJmx=false"));
-        bridgeAndConfigureBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduitSubs);
-        bridgeAndConfigureBrokers("BrokerA", "BrokerC", dynamicOnly, networkTTL, conduitSubs);
-        restartedBroker.start();
-        waitForBridgeFormation();
-        
-        clientA = createConsumer("BrokerA", createDestination("Consumer.A.TEST.FOO", false));
-        LOG.info("recreated clientA again");
-        
-        Thread.sleep(2000);
-
-        msgsA = getConsumerMessages("BrokerA", clientA);
-
-        // ensure we don't get any more messages
-        Thread.sleep(5000);
-        
-        LOG.info("Extra MessagesA: " + msgsA.getMessageIds());
-        assertEquals(0, msgsA.getMessageCount());
-        assertEquals(11, msgsB.getMessageCount());
-        assertEquals(11, msgsC.getMessageCount());
-    }
-    
-
-    private void bridgeAndConfigureBrokers(String local, String remote, boolean dynamicOnly, int networkTTL, boolean conduitSubs) throws Exception {
-        NetworkConnector bridge = bridgeBrokers(local, remote, dynamicOnly, networkTTL, conduitSubs);
-        bridge.setDecreaseNetworkConsumerPriority(true);
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        String options = new String("?useJmx=false&deleteAllMessagesOnStartup=true"); 
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA" + options));
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61617)/BrokerB" + options));
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61618)/BrokerC" + options));
-    }
-    
-    private BrokerService createAndConfigureBroker(URI uri) throws Exception {
-        BrokerService broker = createBroker(uri);
-        
-        configurePersistenceAdapter(broker);
-        
-        // make all topics virtual and consumers use the default prefix
-        VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
-        virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[]{new VirtualTopic()});
-        DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[]{virtualDestinationInterceptor};
-        broker.setDestinationInterceptors(destinationInterceptors);
-        return broker;
-    }
-    
-    protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
-        File dataFileDir = new File("target/test-amq-data/kahadb/" + broker.getBrokerName());
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(dataFileDir);
-        broker.setPersistenceAdapter(kaha);
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java
deleted file mode 100644
index da6d54e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.Arrays;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-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.ActiveMQTopic;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TopicProducerFlowControlTest extends TestCase implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(TopicProducerFlowControlTest.class);
-    private static final String brokerName = "testBroker";
-    private static final String brokerUrl = "vm://" + brokerName;
-    private static final int destinationMemLimit = 2097152; // 2MB
-    private static final AtomicLong produced = new AtomicLong();
-    private static final AtomicLong consumed = new AtomicLong();
-    private static final int numMessagesToSend = 50000;
-
-    private BrokerService broker;
-
-    protected void setUp() throws Exception {
-        // Setup and start the broker
-        broker = new BrokerService();
-        broker.setBrokerName(brokerName);
-        broker.setPersistent(false);
-        broker.setSchedulerSupport(false);
-        broker.setUseJmx(false);
-        broker.setUseShutdownHook(false);
-        broker.addConnector(brokerUrl);
-
-        // Setup the destination policy
-        PolicyMap pm = new PolicyMap();
-
-        // Setup the topic destination policy
-        PolicyEntry tpe = new PolicyEntry();
-        tpe.setTopic(">");
-        tpe.setMemoryLimit(destinationMemLimit);
-        tpe.setProducerFlowControl(true);
-
-        // Setup the topic destination policy
-        PolicyEntry qpe = new PolicyEntry();
-        qpe.setQueue(">");
-        qpe.setMemoryLimit(destinationMemLimit);
-        qpe.setProducerFlowControl(true);
-        qpe.setQueuePrefetch(1);
-
-        pm.setPolicyEntries(Arrays.asList(new PolicyEntry[]{tpe, qpe}));
-
-        broker.setDestinationPolicy(pm);
-
-        // Start the broker
-        broker.start();
-        broker.waitUntilStarted();
-    }
-
-
-    protected void tearDown() throws Exception {
-        broker.stop();
-        broker.waitUntilStopped();
-    }
-
-    public void testTopicProducerFlowControl() throws Exception {
-        Destination destination = new ActiveMQTopic("test");
-
-        // Create the connection factory
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerUrl);
-        connectionFactory.setAlwaysSyncSend(true);
-        connectionFactory.setProducerWindowSize(1024);
-
-        // Start the test destination listener
-        Connection c = connectionFactory.createConnection();
-        c.start();
-        c.createSession(false, 1).createConsumer(destination).setMessageListener(new TopicProducerFlowControlTest());
-
-        // Start producing the test messages
-        final Session session = connectionFactory.createConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
-        final MessageProducer producer = session.createProducer(destination);
-
-        Thread producingThread = new Thread("Producing Thread") {
-            public void run() {
-                try {
-                    for (long i = 0; i < numMessagesToSend; i++) {
-                        producer.send(session.createTextMessage("test"));
-
-                        long count = produced.incrementAndGet();
-                        if (count % 100 == 0) {
-                            LOG.info("Produced " + count + " messages");
-                        }
-                    }
-                } catch (Throwable ex) {
-                    ex.printStackTrace();
-                } finally {
-                    try {
-                        producer.close();
-                        session.close();
-                    } catch (Exception e) {
-                    }
-                }
-            }
-        };
-
-        producingThread.start();
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return consumed.get() == numMessagesToSend;
-            }
-        }, 5 * 60 * 1000); // give it plenty of time before failing
-
-        assertEquals("Didn't produce all messages", numMessagesToSend, produced.get());
-        assertEquals("Didn't consume all messages", numMessagesToSend, consumed.get());
-
-    }
-
-    @Override
-    public void onMessage(Message message) {
-        try {
-            Thread.sleep(1);
-        } catch (InterruptedException e) {
-        }
-
-        long count = consumed.incrementAndGet();
-        if (count % 100 == 0) {
-            LOG.info("\tConsumed " + count + " messages");
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java
deleted file mode 100755
index 3813491..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.test.TestSupport;
-import org.apache.activemq.util.IdGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TopicRedeliverTest extends TestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TopicRedeliverTest.class);
-    private static final int RECEIVE_TIMEOUT = 10000;
-
-    protected int deliveryMode = DeliveryMode.PERSISTENT;
-    private IdGenerator idGen = new IdGenerator();
-
-    public TopicRedeliverTest() {
-    }
-
-    public TopicRedeliverTest(String n) {
-        super(n);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        topic = true;
-    }
-
-    /**
-     * test messages are acknowledged and recovered properly
-     * 
-     * @throws Exception
-     */
-    public void testClientAcknowledge() throws Exception {
-        Destination destination = createDestination(getClass().getName());
-        Connection connection = createConnection();
-        connection.setClientID(idGen.generateId());
-        connection.start();
-        Session consumerSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = consumerSession.createConsumer(destination);
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-
-        // send some messages
-
-        TextMessage sent1 = producerSession.createTextMessage();
-        sent1.setText("msg1");
-        producer.send(sent1);
-
-        TextMessage sent2 = producerSession.createTextMessage();
-        sent1.setText("msg2");
-        producer.send(sent2);
-
-        TextMessage sent3 = producerSession.createTextMessage();
-        sent1.setText("msg3");
-        producer.send(sent3);
-
-        consumer.receive(RECEIVE_TIMEOUT);
-        Message rec2 = consumer.receive(RECEIVE_TIMEOUT);
-        consumer.receive(RECEIVE_TIMEOUT);
-
-        // ack rec2
-        rec2.acknowledge();
-
-        TextMessage sent4 = producerSession.createTextMessage();
-        sent4.setText("msg4");
-        producer.send(sent4);
-
-        Message rec4 = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue(rec4.equals(sent4));
-        consumerSession.recover();
-        rec4 = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue(rec4.equals(sent4));
-        assertTrue(rec4.getJMSRedelivered());
-        rec4.acknowledge();
-        connection.close();
-
-    }
-
-    /**
-     * Test redelivered flag is set on rollbacked transactions
-     * 
-     * @throws Exception
-     */
-    public void testRedilveredFlagSetOnRollback() throws Exception {
-        Destination destination = createDestination(getClass().getName());
-        Connection connection = createConnection();
-        connection.setClientID(idGen.generateId());
-        connection.start();
-        Session consumerSession = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = null;
-        if (topic) {
-            consumer = consumerSession.createDurableSubscriber((Topic)destination, "TESTRED");
-        } else {
-            consumer = consumerSession.createConsumer(destination);
-        }
-        Session producerSession = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-
-        TextMessage sentMsg = producerSession.createTextMessage();
-        sentMsg.setText("msg1");
-        producer.send(sentMsg);
-        producerSession.commit();
-
-        Message recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        assertFalse(recMsg.getJMSRedelivered());
-        recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        consumerSession.rollback();
-        recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue(recMsg.getJMSRedelivered());
-        consumerSession.commit();
-        assertTrue(recMsg.equals(sentMsg));
-        assertTrue(recMsg.getJMSRedelivered());
-        connection.close();
-    }
-
-    public void testNoExceptionOnRedeliveryAckWithSimpleTopicConsumer() throws Exception {
-        Destination destination = createDestination(getClass().getName());
-        Connection connection = createConnection();
-        final AtomicBoolean gotException = new AtomicBoolean();
-        connection.setExceptionListener(new ExceptionListener() {
-            public void onException(JMSException exception) {
-                LOG.error("unexpected ex:" + exception);
-                    gotException.set(true);
-            }
-        });
-        connection.setClientID(idGen.generateId());
-        connection.start();
-        Session consumerSession = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = null;
-        if (topic) {
-            consumer = consumerSession.createConsumer((Topic)destination);
-        } else {
-            consumer = consumerSession.createConsumer(destination);
-        }
-        Session producerSession = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-
-        TextMessage sentMsg = producerSession.createTextMessage();
-        sentMsg.setText("msg1");
-        producer.send(sentMsg);
-        producerSession.commit();
-
-        Message recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        assertFalse(recMsg.getJMSRedelivered());
-        recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        consumerSession.rollback();
-        recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue(recMsg.getJMSRedelivered());
-        consumerSession.rollback();
-        recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue(recMsg.getJMSRedelivered());
-        consumerSession.commit();
-        assertTrue(recMsg.equals(sentMsg));
-        assertTrue(recMsg.getJMSRedelivered());
-        connection.close();
-
-        assertFalse("no exception", gotException.get());
-    }
-
-    /**
-     * Check a session is rollbacked on a Session close();
-     * 
-     * @throws Exception
-     */
-
-    public void xtestTransactionRollbackOnSessionClose() throws Exception {
-        Destination destination = createDestination(getClass().getName());
-        Connection connection = createConnection();
-        connection.setClientID(idGen.generateId());
-        connection.start();
-        Session consumerSession = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = null;
-        if (topic) {
-            consumer = consumerSession.createDurableSubscriber((Topic)destination, "TESTRED");
-        } else {
-            consumer = consumerSession.createConsumer(destination);
-        }
-        Session producerSession = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-
-        TextMessage sentMsg = producerSession.createTextMessage();
-        sentMsg.setText("msg1");
-        producer.send(sentMsg);
-
-        producerSession.commit();
-
-        Message recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        assertFalse(recMsg.getJMSRedelivered());
-        consumerSession.close();
-        consumerSession = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        consumer = consumerSession.createConsumer(destination);
-
-        recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        consumerSession.commit();
-        assertTrue(recMsg.equals(sentMsg));
-        connection.close();
-    }
-
-    /**
-     * check messages are actuallly sent on a tx rollback
-     * 
-     * @throws Exception
-     */
-
-    public void testTransactionRollbackOnSend() throws Exception {
-        Destination destination = createDestination(getClass().getName());
-        Connection connection = createConnection();
-        connection.setClientID(idGen.generateId());
-        connection.start();
-        Session consumerSession = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE);
-        MessageConsumer consumer = consumerSession.createConsumer(destination);
-        Session producerSession = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-        producer.setDeliveryMode(deliveryMode);
-
-        TextMessage sentMsg = producerSession.createTextMessage();
-        sentMsg.setText("msg1");
-        producer.send(sentMsg);
-        producerSession.commit();
-
-        Message recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        consumerSession.commit();
-        assertTrue(recMsg.equals(sentMsg));
-
-        sentMsg = producerSession.createTextMessage();
-        sentMsg.setText("msg2");
-        producer.send(sentMsg);
-        producerSession.rollback();
-
-        sentMsg = producerSession.createTextMessage();
-        sentMsg.setText("msg3");
-        producer.send(sentMsg);
-        producerSession.commit();
-
-        recMsg = consumer.receive(RECEIVE_TIMEOUT);
-        assertTrue(recMsg.equals(sentMsg));
-        consumerSession.commit();
-
-        connection.close();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicReplicationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicReplicationTest.java
deleted file mode 100644
index 354f8af..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicReplicationTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.util.MessageIdList;
-import org.springframework.core.io.ClassPathResource;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-public class TopicReplicationTest extends JmsMultipleBrokersTestSupport {
-
-    public static final int MSG_COUNT = 10;
-
-    public void testReplication() throws Exception {
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/replication-broker1.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/replication-broker2.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/replication-broker3.xml"));
-        createBroker(new ClassPathResource("org/apache/activemq/usecases/replication-broker4.xml"));
-
-        brokers.get("replication-broker1").broker.waitUntilStarted();
-        brokers.get("replication-broker2").broker.waitUntilStarted();
-        brokers.get("replication-broker3").broker.waitUntilStarted();
-        brokers.get("replication-broker4").broker.waitUntilStarted();
-
-        Destination dest = createDestination("replication", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("replication-broker2", dest);
-        MessageConsumer clientB = createConsumer("replication-broker3", dest);
-        MessageConsumer clientC = createConsumer("replication-broker4", dest);
-        MessageConsumer clientD = createConsumer("replication-broker4", dest);
-
-        //let consumers propogate around the network
-        Thread.sleep(2000);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("replication-broker2", clientA);
-        MessageIdList msgsB = getConsumerMessages("replication-broker3", clientB);
-        MessageIdList msgsC = getConsumerMessages("replication-broker4", clientC);
-        MessageIdList msgsD = getConsumerMessages("replication-broker4", clientD);
-
-
-
-        // send messages to broker1
-        sendMessages("replication-broker1", dest, MSG_COUNT);
-
-
-        msgsA.waitForMessagesToArrive(MSG_COUNT);
-        msgsB.waitForMessagesToArrive(MSG_COUNT);
-        msgsC.waitForMessagesToArrive(MSG_COUNT);
-        msgsD.waitForMessagesToArrive(MSG_COUNT);
-
-        assertEquals(MSG_COUNT, msgsA.getMessageCount());
-        assertEquals(MSG_COUNT, msgsB.getMessageCount());
-        assertEquals(MSG_COUNT, msgsC.getMessageCount());
-        assertEquals(MSG_COUNT, msgsD.getMessageCount());
-
-        // send messages to broker4
-        sendMessages("replication-broker4", dest, MSG_COUNT);
-
-        msgsA.waitForMessagesToArrive(2 * MSG_COUNT);
-        msgsB.waitForMessagesToArrive(2 * MSG_COUNT);
-        msgsC.waitForMessagesToArrive(2 * MSG_COUNT);
-        msgsD.waitForMessagesToArrive(2 * MSG_COUNT);
-
-        assertEquals(2 * MSG_COUNT, msgsA.getMessageCount());
-        assertEquals(2 * MSG_COUNT, msgsB.getMessageCount());
-        assertEquals(2 * MSG_COUNT, msgsC.getMessageCount());
-        assertEquals(2 * MSG_COUNT, msgsD.getMessageCount());
-
-        // send messages to broker3
-        sendMessages("replication-broker3", dest, MSG_COUNT);
-
-        msgsA.waitForMessagesToArrive(3 * MSG_COUNT);
-        msgsB.waitForMessagesToArrive(3 * MSG_COUNT);
-        msgsC.waitForMessagesToArrive(3 * MSG_COUNT);
-        msgsD.waitForMessagesToArrive(3 * MSG_COUNT);
-
-        assertEquals(3 * MSG_COUNT, msgsA.getMessageCount());
-        assertEquals(3 * MSG_COUNT, msgsB.getMessageCount());
-        assertEquals(3 * MSG_COUNT, msgsC.getMessageCount());
-        assertEquals(3 * MSG_COUNT, msgsD.getMessageCount());
-
-        // send messages to broker2
-        sendMessages("replication-broker2", dest, MSG_COUNT);
-
-        msgsA.waitForMessagesToArrive(4 * MSG_COUNT);
-        msgsB.waitForMessagesToArrive(4 * MSG_COUNT);
-        msgsC.waitForMessagesToArrive(4 * MSG_COUNT);
-        msgsD.waitForMessagesToArrive(4 * MSG_COUNT);
-
-        assertEquals(4 * MSG_COUNT, msgsA.getMessageCount());
-        assertEquals(4 * MSG_COUNT, msgsB.getMessageCount());
-        assertEquals(4 * MSG_COUNT, msgsC.getMessageCount());
-        assertEquals(4 * MSG_COUNT, msgsD.getMessageCount());
-
-    }
-
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java
deleted file mode 100644
index 9567cea..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-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.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Test case for AMQ-268
- * 
- * @author Paul Smith
- * 
- */
-public final class TransactionRollbackOrderTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(TransactionRollbackOrderTest.class);
-
-    private volatile String receivedText;
-
-    private Session producerSession;
-    private Session consumerSession;
-    private Destination queue;
-
-    private MessageProducer producer;
-    private MessageConsumer consumer;
-    private Connection connection;
-    private CountDownLatch latch = new CountDownLatch(1);
-    private int numMessages = 5;
-    private List<String> msgSent = new ArrayList<String>();
-    private List<String> msgCommitted = new ArrayList<String>();
-    private List<String> msgRolledBack = new ArrayList<String>();
-    private List<String> msgRedelivered = new ArrayList<String>();
-
-    public void testTransaction() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-
-        connection = factory.createConnection();
-        queue = new ActiveMQQueue(getClass().getName() + "." + getName());
-
-        producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumerSession = connection.createSession(true, 0);
-
-        producer = producerSession.createProducer(queue);
-
-        consumer = consumerSession.createConsumer(queue);
-        consumer.setMessageListener(new MessageListener() {
-
-            int msgCount;
-            int msgCommittedCount;
-
-            public void onMessage(Message m) {
-                try {
-                    msgCount++;
-                    TextMessage tm = (TextMessage)m;
-                    receivedText = tm.getText();
-
-                    if (tm.getJMSRedelivered()) {
-                        msgRedelivered.add(receivedText);
-                    }
-
-                    LOG.info("consumer received message: " + receivedText + (tm.getJMSRedelivered() ? " ** Redelivered **" : ""));
-                    if (msgCount == 3) {
-                        msgRolledBack.add(receivedText);
-                        consumerSession.rollback();
-                        LOG.info("[msg: " + receivedText + "] ** rolled back **");
-                    } else {
-                        msgCommittedCount++;
-                        msgCommitted.add(receivedText);
-                        consumerSession.commit();
-                        LOG.info("[msg: " + receivedText + "] committed transaction ");
-                    }
-                    if (msgCommittedCount == numMessages) {
-                        latch.countDown();
-                    }
-                } catch (JMSException e) {
-                    try {
-                        consumerSession.rollback();
-                        LOG.info("rolled back transaction");
-                    } catch (JMSException e1) {
-                        LOG.info(e1.toString());
-                        e1.printStackTrace();
-                    }
-                    LOG.info(e.toString());
-                    e.printStackTrace();
-                }
-            }
-        });
-        connection.start();
-
-        TextMessage tm = null;
-        try {
-            for (int i = 1; i <= numMessages; i++) {
-                tm = producerSession.createTextMessage();
-                tm.setText("Hello " + i);
-                msgSent.add(tm.getText());
-                producer.send(tm);
-                LOG.info("producer sent message: " + tm.getText());
-            }
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-
-        LOG.info("Waiting for latch");
-        latch.await();
-
-        assertEquals(1, msgRolledBack.size());
-        assertEquals(1, msgRedelivered.size());
-
-        LOG.info("msg RolledBack = " + msgRolledBack.get(0));
-        LOG.info("msg Redelivered = " + msgRedelivered.get(0));
-
-        assertEquals(msgRolledBack.get(0), msgRedelivered.get(0));
-
-        assertEquals(numMessages, msgSent.size());
-        assertEquals(numMessages, msgCommitted.size());
-
-        assertEquals(msgSent, msgCommitted);
-
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            LOG.info("Closing the connection");
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java
deleted file mode 100755
index 725a55c..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.Date;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-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.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author pragmasoft
- * 
- */
-public final class TransactionTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(TransactionTest.class);
-
-    private volatile String receivedText;
-
-    private Session producerSession;
-    private Session consumerSession;
-    private Destination queue;
-
-    private MessageProducer producer;
-    private MessageConsumer consumer;
-    private Connection connection;
-    private CountDownLatch latch = new CountDownLatch(1);
-
-    public void testTransaction() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        connection = factory.createConnection();
-        queue = new ActiveMQQueue(getClass().getName() + "." + getName());
-
-        producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        consumerSession = connection.createSession(true, 0);
-
-        producer = producerSession.createProducer(queue);
-
-        consumer = consumerSession.createConsumer(queue);
-        consumer.setMessageListener(new MessageListener() {
-
-            public void onMessage(Message m) {
-                try {
-                    TextMessage tm = (TextMessage)m;
-                    receivedText = tm.getText();
-                    latch.countDown();
-
-                    LOG.info("consumer received message :" + receivedText);
-                    consumerSession.commit();
-                    LOG.info("committed transaction");
-                } catch (JMSException e) {
-                    try {
-                        consumerSession.rollback();
-                        LOG.info("rolled back transaction");
-                    } catch (JMSException e1) {
-                        LOG.info(e1.toString());
-                        e1.printStackTrace();
-                    }
-                    LOG.info(e.toString());
-                    e.printStackTrace();
-                }
-            }
-        });
-
-        connection.start();
-
-        TextMessage tm = null;
-        try {
-            tm = producerSession.createTextMessage();
-            tm.setText("Hello, " + new Date());
-            producer.send(tm);
-            LOG.info("producer sent message :" + tm.getText());
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-
-        LOG.info("Waiting for latch");
-        latch.await(2,TimeUnit.SECONDS);
-        assertNotNull(receivedText);
-        LOG.info("test completed, destination=" + receivedText);
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-        super.tearDown();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransientQueueRedeliverTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransientQueueRedeliverTest.java
deleted file mode 100755
index 24fd890..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransientQueueRedeliverTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.DeliveryMode;
-
-/**
- * 
- */
-public class TransientQueueRedeliverTest extends TopicRedeliverTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        topic = false;
-        deliveryMode = DeliveryMode.NON_PERSISTENT;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java
deleted file mode 100644
index 3e97eb2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.util.MessageIdList;
-
-public class TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest extends JmsMultipleBrokersTestSupport {
-    protected static final int MESSAGE_COUNT = 100;
-
-    /**
-     * BrokerA -> BrokerB
-     */
-    public void testRemoteBrokerHasConsumer() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-
-        Thread.sleep(2000);
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT);
-
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-        assertEquals(MESSAGE_COUNT, msgsB.getMessageCount());
-
-    }
-
-    /**
-     * BrokerA -> BrokerB
-     */
-    public void testRemoteBrokerHasNoConsumer() throws Exception {
-        // Setup broker networks
-        bridgeBrokers("BrokerA", "BrokerB");
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
-
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-
-    }
-    
-    /**
-     * BrokerA -> BrokerB && BrokerB -> BrokerA
-     */
-    public void testDuplexStaticRemoteBrokerHasNoConsumer() throws Exception {
-        // Setup broker networks
-        boolean dynamicOnly = true;
-        int networkTTL = 2;
-        boolean conduit = true;
-        bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduit);
-        bridgeBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduit);
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-
-        Thread.sleep(2*1000);
-        
-        int messageCount = 2000;
-        // Send messages
-        sendMessages("BrokerA", dest, messageCount);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-
-        msgsA.waitForMessagesToArrive(messageCount);
-
-        assertEquals(messageCount, msgsA.getMessageCount());
-
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        createBroker(new URI(
-                "broker:(tcp://localhost:61616)/BrokerA?persistent=false&useJmx=false"));
-        createBroker(new URI(
-                "broker:(tcp://localhost:61617)/BrokerB?persistent=false&useJmx=false"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java
deleted file mode 100644
index 4f196fb..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.Arrays;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.Test;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.util.MessageIdList;
-import org.apache.activemq.xbean.XBeanBrokerFactory;
-
-public class TwoBrokerMulticastQueueTest extends CombinationTestSupport {
-
-    public static final int MESSAGE_COUNT = 100;
-    public static final int BROKER_COUNT = 2;
-    public static final int CONSUMER_COUNT = 20;
-
-    public String sendUri;
-    public String recvUri;
-    private BrokerService[] brokers;
-    private String groupId;
-
-    public static Test suite() {
-        return suite(TwoBrokerMulticastQueueTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-
-    public void setUp() throws Exception {
-    	groupId = getClass().getName()+"-"+System.currentTimeMillis();
-    	System.setProperty("groupId", groupId);
-        super.setAutoFail(true);
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        if (brokers != null) {
-            for (int i = 0; i < BROKER_COUNT; i++) {
-                if (brokers[i] != null) {
-                    brokers[i].stop();
-                }
-            }
-            super.tearDown();
-        }
-    }
-
-    private void doSendReceiveTest() throws Exception {
-        Destination dest = new ActiveMQQueue("TEST.FOO");
-
-        ConnectionFactory sendFactory = createConnectionFactory(sendUri);
-
-        Connection conn = createConnection(sendFactory);
-        sendMessages(conn, dest, MESSAGE_COUNT);
-
-        Thread.sleep(500);
-
-        ConnectionFactory recvFactory = createConnectionFactory(recvUri);
-        assertEquals(MESSAGE_COUNT, receiveMessages(createConnection(recvFactory), dest, 0));
-    }
-
-    private void doMultipleConsumersConnectTest() throws Exception {
-        Destination dest = new ActiveMQQueue("TEST.FOO");
-
-        ConnectionFactory sendFactory = createConnectionFactory(sendUri);
-
-        Connection conn = createConnection(sendFactory);
-        sendMessages(conn, dest, MESSAGE_COUNT);
-
-        Thread.sleep(500);
-
-        ConnectionFactory recvFactory = createConnectionFactory(recvUri);
-        assertEquals(MESSAGE_COUNT, receiveMessages(createConnection(recvFactory), dest, 0));
-
-        for (int i = 0; i < (CONSUMER_COUNT - 1); i++) {
-            assertEquals(0, receiveMessages(createConnection(recvFactory), dest, 200));
-        }
-    }
-
-    public void initCombosForTestSendReceive() {
-        addCombinationValues("sendUri", new Object[] {"tcp://localhost:61616", "tcp://localhost:61617"});
-        addCombinationValues("recvUri", new Object[] {"tcp://localhost:61616", "tcp://localhost:61617"});
-    }
-
-    public void testSendReceive() throws Exception {
-        createMulticastBrokerNetwork();
-        doSendReceiveTest();
-    }
-
-    public void initCombosForTestMultipleConsumersConnect() {
-        addCombinationValues("sendUri", new Object[] {"tcp://localhost:61616", "tcp://localhost:61617"});
-        addCombinationValues("recvUri", new Object[] {"tcp://localhost:61616", "tcp://localhost:61617"});
-    }
-
-    public void testMultipleConsumersConnect() throws Exception {
-        createMulticastBrokerNetwork();
-        doMultipleConsumersConnectTest();
-    }
-
-    public void testSendReceiveUsingFailover() throws Exception {
-        sendUri = "failover:(tcp://localhost:61616,tcp://localhost:61617)";
-        recvUri = "failover:(tcp://localhost:61616,tcp://localhost:61617)";
-        createMulticastBrokerNetwork();
-        doSendReceiveTest();
-    }
-
-    public void testMultipleConsumersConnectUsingFailover() throws Exception {
-        sendUri = "failover:(tcp://localhost:61616,tcp://localhost:61617)";
-        recvUri = "failover:(tcp://localhost:61616,tcp://localhost:61617)";
-        createMulticastBrokerNetwork();
-        doMultipleConsumersConnectTest();
-    }
-
-    public void testSendReceiveUsingDiscovery() throws Exception {
-        sendUri = "discovery:multicast://default?group="+groupId;
-        recvUri = "discovery:multicast://default?group="+groupId;
-        createMulticastBrokerNetwork();
-        doSendReceiveTest();
-    }
-
-    public void testMultipleConsumersConnectUsingDiscovery() throws Exception {
-        sendUri = "discovery:multicast://default?group="+groupId;
-        recvUri = "discovery:multicast://default?group="+groupId;
-        createMulticastBrokerNetwork();
-        doMultipleConsumersConnectTest();
-    }
-
-    public void testSendReceiveUsingAutoAssignFailover() throws Exception {
-        sendUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
-        recvUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
-        createAutoAssignMulticastBrokerNetwork();
-        doSendReceiveTest();
-    }
-
-    public void testMultipleConsumersConnectUsingAutoAssignFailover() throws Exception {
-        sendUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
-        recvUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
-        createAutoAssignMulticastBrokerNetwork();
-        doMultipleConsumersConnectTest();
-    }
-
-    public void testSendReceiveUsingAutoAssignDiscovery() throws Exception {
-        sendUri = "discovery:multicast://default?group="+groupId;
-        recvUri = "discovery:multicast://default?group="+groupId;
-        createAutoAssignMulticastBrokerNetwork();
-        doSendReceiveTest();
-    }
-
-    public void testMultipleConsumersConnectUsingAutoAssignDiscovery() throws Exception {
-        sendUri = "discovery:multicast://default?group="+groupId;
-        recvUri = "discovery:multicast://default?group="+groupId;
-        createAutoAssignMulticastBrokerNetwork();
-        doMultipleConsumersConnectTest();
-    }
-
-    protected void createMulticastBrokerNetwork() throws Exception {
-        brokers = new BrokerService[BROKER_COUNT];
-        for (int i = 0; i < BROKER_COUNT; i++) {
-            brokers[i] = createBroker("org/apache/activemq/usecases/multicast-broker-" + (i + 1) + ".xml");
-            brokers[i].start();
-        }
-
-        // Let the brokers discover each other first
-        Thread.sleep(1000);
-    }
-
-    protected void createAutoAssignMulticastBrokerNetwork() throws Exception {
-        brokers = new BrokerService[BROKER_COUNT];
-        for (int i = 0; i < BROKER_COUNT; i++) {
-            brokers[i] = createBroker("org/apache/activemq/usecases/multicast-broker-auto.xml");
-            brokers[i].start();
-        }
-
-        // Let the brokers discover each other first
-        Thread.sleep(1000);
-    }
-
-    protected BrokerService createBroker(String uri) throws Exception {
-        return (new XBeanBrokerFactory()).createBroker(new URI(uri));
-    }
-
-    protected ConnectionFactory createConnectionFactory(String uri) {
-        return new ActiveMQConnectionFactory(uri);
-    }
-
-    protected Connection createConnection(ConnectionFactory factory) throws JMSException {
-        Connection conn = factory.createConnection();
-        return conn;
-    }
-
-    protected int receiveMessages(Connection conn, Destination dest, int waitTime) throws JMSException, InterruptedException {
-        conn.start();
-        MessageIdList list = new MessageIdList();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer consumer = sess.createConsumer(dest);
-        consumer.setMessageListener(list);
-
-        if (waitTime > 0) {
-            Thread.sleep(waitTime);
-        } else {
-            list.waitForMessagesToArrive(MESSAGE_COUNT);
-        }
-
-        conn.close();
-
-        return list.getMessageCount();
-    }
-
-    protected void sendMessages(Connection conn, Destination dest, int count) throws JMSException {
-        conn.start();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer prod = sess.createProducer(dest);
-
-        for (int i = 0; i < count; i++) {
-            prod.send(createTextMessage(sess, "Message " + i, 1024));
-        }
-
-        conn.close();
-    }
-
-    protected TextMessage createTextMessage(Session session, String initText, int messageSize) throws JMSException {
-        TextMessage msg = session.createTextMessage();
-
-        // Pad message text
-        if (initText.length() < messageSize) {
-            char[] data = new char[messageSize - initText.length()];
-            Arrays.fill(data, '*');
-            String str = new String(data);
-            msg.setText(initText + str);
-
-            // Do not pad message text
-        } else {
-            msg.setText(initText);
-        }
-
-        return msg;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest.java
deleted file mode 100644
index d6d0d65..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.network.NetworkConnector;
-
-public class TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest extends AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport {
-	
-    protected void addIncludedDestination(NetworkConnector nc) {
-        nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.QUEUE_TYPE));
-        nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.TOPIC_TYPE));
-        nc.addExcludedDestination(ActiveMQDestination.createDestination("Consumer.*.local.>", ActiveMQDestination.QUEUE_TYPE));
-        nc.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.QUEUE_TYPE));
-        nc.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
-        nc.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("Consumer.*.global.>", ActiveMQDestination.QUEUE_TYPE));
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest.java
deleted file mode 100644
index a8051db..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.network.NetworkConnector;
-
-public class TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest extends AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport {
-	
-    protected void addIncludedDestination(NetworkConnector nc) {
-        nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.QUEUE_TYPE));
-        nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.TOPIC_TYPE));
-        nc.addExcludedDestination(ActiveMQDestination.createDestination("Consumer.*.local.>", ActiveMQDestination.QUEUE_TYPE));
-        nc.addStaticallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.QUEUE_TYPE));
-        nc.addStaticallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
-        nc.addStaticallyIncludedDestination(ActiveMQDestination.createDestination("Consumer.*.global.>", ActiveMQDestination.QUEUE_TYPE));
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java
deleted file mode 100644
index e773db2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.util.MessageIdList;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TwoBrokerNetworkLoadBalanceTest extends JmsMultipleBrokersTestSupport {
-    protected static final Logger LOG = LoggerFactory.getLogger(TwoBrokerNetworkLoadBalanceTest.class);
-    public void testLoadBalancing() throws Exception {
-        bridgeBrokers("BrokerA", "BrokerB");
-        bridgeBrokers("BrokerB", "BrokerA");
-
-        startAllBrokers();
-        waitForBridgeFormation();
-
-        // Setup destination
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-
-     // Setup consumers
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-        
-        // Send messages
-        sendMessages("BrokerA", dest, 5000);
-
-        // Send messages
-        sendMessages("BrokerB", dest, 1000);
-
-        // Get message count
-        final MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        final MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return msgsA.getMessageCount() + msgsB.getMessageCount() == 6000;
-            }});
-        
-        LOG.info("A got: " +  msgsA.getMessageCount());
-        LOG.info("B got: " +  msgsB.getMessageCount());
-         
-        assertTrue("B got is fair share: " + msgsB.getMessageCount(), msgsB.getMessageCount() > 2000);
-    }
-    
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        createBroker(new URI(
-                "broker:(tcp://localhost:61616)/BrokerA?persistent=false&useJmx=false"));
-        createBroker(new URI(
-                "broker:(tcp://localhost:61617)/BrokerB?persistent=false&useJmx=false"));
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java
deleted file mode 100644
index 81680f2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class TwoBrokerQueueClientsReconnectTest extends JmsMultipleBrokersTestSupport {
-    protected static final int MESSAGE_COUNT = 100; // Best if a factor of 100
-    protected static final int PREFETCH_COUNT = 1;
-    private static final Logger LOG = LoggerFactory.getLogger(TwoBrokerQueueClientsReconnectTest.class);
-
-
-    protected int msgsClient1;
-    protected int msgsClient2;
-    protected String broker1;
-    protected String broker2;
-
-    public void testClientAReceivesOnly() throws Exception {
-        broker1 = "BrokerA";
-        broker2 = "BrokerB";
-
-        doOneClientReceivesOnly();
-    }
-
-    public void testClientBReceivesOnly() throws Exception {
-        broker1 = "BrokerB";
-        broker2 = "BrokerA";
-
-        doOneClientReceivesOnly();
-    }
-
-    public void doOneClientReceivesOnly() throws Exception {
-        // Bridge brokers
-        bridgeBrokers(broker1, broker2);
-        bridgeBrokers(broker2, broker1);
-
-        // Run brokers
-        startAllBrokers();
-
-        // Create queue
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Create consumers
-        MessageConsumer client1 = createConsumer(broker1, dest);
-        MessageConsumer client2 = createConsumer(broker2, dest);
-
-        // Give clients time to register with broker
-        Thread.sleep(500);
-
-        // Always send messages to broker A
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Close the second client, messages should be sent to the first client
-        client2.close();
-
-        // Let the first client receive all messages
-        msgsClient1 += receiveAllMessages(client1);
-        client1.close();
-
-        // First client should have received 100 messages
-        assertEquals("Client for " + broker1 + " should have receive all messages.", MESSAGE_COUNT, msgsClient1);
-    }
-
-    public void testClientAReceivesOnlyAfterReconnect() throws Exception {
-        broker1 = "BrokerA";
-        broker2 = "BrokerB";
-
-        doOneClientReceivesOnlyAfterReconnect();
-    }
-
-    public void testClientBReceivesOnlyAfterReconnect() throws Exception {
-        broker1 = "BrokerB";
-        broker2 = "BrokerA";
-
-        doOneClientReceivesOnlyAfterReconnect();
-    }
-
-    public void doOneClientReceivesOnlyAfterReconnect() throws Exception {
-        // Bridge brokers
-        bridgeBrokers(broker1, broker2);
-        bridgeBrokers(broker2, broker1);
-
-        // Run brokers
-        startAllBrokers();
-
-        // Create queue
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Create first consumer
-        MessageConsumer client1 = createConsumer(broker1, dest);
-        MessageConsumer client2 = createConsumer(broker2, dest);
-
-        // Give clients time to register with broker
-        Thread.sleep(500);
-
-        // Always send message to broker A
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Let the first client receive the first 20% of messages
-        msgsClient1 += receiveExactMessages(client1, (int)(MESSAGE_COUNT * 0.20));
-
-        // Disconnect the first client
-        client1.close();
-
-        // Create another client for the first broker
-        client1 = createConsumer(broker1, dest);
-        Thread.sleep(500);
-
-        // Close the second client, messages should be sent to the first client
-        client2.close();
-
-        // Receive the rest of the messages
-        msgsClient1 += receiveAllMessages(client1);
-        client1.close();
-
-        // The first client should have received 100 messages
-        assertEquals("Client for " + broker1 + " should have received all messages.", MESSAGE_COUNT, msgsClient1);
-    }
-
-    public void testTwoClientsReceiveClientADisconnects() throws Exception {
-        broker1 = "BrokerA";
-        broker2 = "BrokerB";
-
-        doTwoClientsReceiveOneClientDisconnects();
-    }
-
-    public void testTwoClientsReceiveClientBDisconnects() throws Exception {
-        broker1 = "BrokerB";
-        broker2 = "BrokerA";
-
-        doTwoClientsReceiveOneClientDisconnects();
-    }
-
-    public void doTwoClientsReceiveOneClientDisconnects() throws Exception {
-        // Bridge brokers
-        bridgeBrokers(broker1, broker2);
-        bridgeBrokers(broker2, broker1);
-
-        // Run brokers
-        startAllBrokers();
-
-        // Create queue
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Create first client
-        MessageConsumer client1 = createConsumer(broker1, dest);
-        MessageConsumer client2 = createConsumer(broker2, dest);
-
-        // Give clients time to register with broker
-        Thread.sleep(500);
-
-        // Always send messages to broker A
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Let each client receive 20% of the messages - 40% total
-        msgsClient1 += receiveExactMessages(client1, (int)(MESSAGE_COUNT * 0.20));
-        msgsClient2 += receiveExactMessages(client2, (int)(MESSAGE_COUNT * 0.20));
-
-        // Disconnect the first client
-        client1.close();
-
-        // Let the second client receive the rest of the messages
-        msgsClient2 += receiveAllMessages(client2);
-        client2.close();
-
-        // First client should have received 20% of the messages
-        assertEquals("Client for " + broker1 + " should have received 20% of the messages.", (int)(MESSAGE_COUNT * 0.20), msgsClient1);
-
-        // Second client should have received 80% of the messages
-        assertEquals("Client for " + broker2 + " should have received 80% of the messages.", (int)(MESSAGE_COUNT * 0.80), msgsClient2);
-    }
-
-    public void testTwoClientsReceiveClientAReconnects() throws Exception {
-        broker1 = "BrokerA";
-        broker2 = "BrokerB";
-
-        doTwoClientsReceiveOneClientReconnects();
-    }
-
-    public void testTwoClientsReceiveClientBReconnects() throws Exception {
-        broker1 = "BrokerB";
-        broker2 = "BrokerA";
-
-        doTwoClientsReceiveOneClientReconnects();
-    }
-
-    public void doTwoClientsReceiveOneClientReconnects() throws Exception {
-        // Bridge brokers
-        bridgeBrokers(broker1, broker2);
-        bridgeBrokers(broker2, broker1);
-
-        // Run brokers
-        startAllBrokers();
-
-        // Create queue
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Create the first client
-        MessageConsumer client1 = createConsumer(broker1, dest);
-        MessageConsumer client2 = createConsumer(broker2, dest);
-
-        // Give clients time to register with broker
-        Thread.sleep(500);
-
-        // Always send messages to broker A
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Let each client receive 20% of the messages - 40% total
-        msgsClient1 += receiveExactMessages(client1, (int)(MESSAGE_COUNT * 0.20));
-        msgsClient2 += receiveExactMessages(client2, (int)(MESSAGE_COUNT * 0.20));
-
-        // Disconnect the first client
-        client1.close();
-
-        // Let the second client receive 20% more of the total messages
-        msgsClient2 += receiveExactMessages(client2, (int)(MESSAGE_COUNT * 0.20));
-
-        // Create another client for broker 1
-        client1 = createConsumer(broker1, dest);
-        Thread.sleep(500);
-
-        // Let each client receive 20% of the messages - 40% total
-        msgsClient1 += receiveExactMessages(client1, (int)(MESSAGE_COUNT * 0.20));
-        client1.close();
-
-        msgsClient2 += receiveExactMessages(client2, (int)(MESSAGE_COUNT * 0.20));
-        client2.close();
-
-        // First client should have received 40 messages
-        assertEquals("Client for " + broker1 + " should have received 40% of the messages.", (int)(MESSAGE_COUNT * 0.40), msgsClient1);
-
-        // Second client should have received 60 messages
-        assertEquals("Client for " + broker2 + " should have received 60% of the messages.", (int)(MESSAGE_COUNT * 0.60), msgsClient2);
-    }
-
-    public void testTwoClientsReceiveTwoClientReconnects() throws Exception {
-        broker1 = "BrokerA";
-        broker2 = "BrokerB";
-
-        // Bridge brokers
-        bridgeBrokers(broker1, broker2);
-        bridgeBrokers(broker2, broker1);
-
-        // Run brokers
-        startAllBrokers();
-
-        // Create queue
-        Destination dest = createDestination("TEST.FOO", false);
-
-        // Create the first client
-        MessageConsumer client1 = createConsumer(broker1, dest);
-        MessageConsumer client2 = createConsumer(broker2, dest);
-
-        // Give clients time to register with broker
-        Thread.sleep(500);
-
-        // Always send messages to broker A
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Let each client receive 20% of the messages - 40% total
-        msgsClient1 += receiveExactMessages(client1, (int)(MESSAGE_COUNT * 0.20));
-        msgsClient2 += receiveExactMessages(client2, (int)(MESSAGE_COUNT * 0.20));
-
-        // Disconnect both clients
-        client1.close();
-        client2.close();
-
-        // Create another two clients for each broker
-        client1 = createConsumer(broker1, dest);
-        client2 = createConsumer(broker2, dest);
-        Thread.sleep(500);
-
-        // Let each client receive 30% more of the total messages - 60% total
-        msgsClient1 += receiveExactMessages(client1, (int)(MESSAGE_COUNT * 0.30));
-        client1.close();
-
-        msgsClient2 += receiveExactMessages(client2, (int)(MESSAGE_COUNT * 0.30));
-        client2.close();
-
-        // First client should have received 50% of the messages
-        assertEquals("Client for " + broker1 + " should have received 50% of the messages.", (int)(MESSAGE_COUNT * 0.50), msgsClient1);
-
-        // Second client should have received 50% of the messages
-        assertEquals("Client for " + broker2 + " should have received 50% of the messages.", (int)(MESSAGE_COUNT * 0.50), msgsClient2);
-    }
-
-    protected int receiveExactMessages(MessageConsumer consumer, int msgCount) throws Exception {
-        Message msg;
-        int i;
-        for (i = 0; i < msgCount; i++) {
-            msg = consumer.receive(1000);
-            if (msg == null) {
-                LOG.error("Consumer failed to receive exactly " + msgCount + " messages. Actual messages received is: " + i);
-                break;
-            }
-        }
-
-        return i;
-    }
-
-    protected int receiveAllMessages(MessageConsumer consumer) throws Exception {
-        int msgsReceived = 0;
-
-        Message msg;
-        do {
-            msg = consumer.receive(1000);
-            if (msg != null) {
-                msgsReceived++;
-            }
-        } while (msg != null);
-
-        return msgsReceived;
-    }
-
-    protected MessageConsumer createConsumer(String brokerName, Destination dest) throws Exception {
-        Connection conn = createConnection(brokerName);
-        conn.start();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        return sess.createConsumer(dest);
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=false&useJmx=false"));
-        createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=false&useJmx=false"));
-
-        // Configure broker connection factory
-        ActiveMQConnectionFactory factoryA;
-        ActiveMQConnectionFactory factoryB;
-        factoryA = (ActiveMQConnectionFactory)getConnectionFactory("BrokerA");
-        factoryB = (ActiveMQConnectionFactory)getConnectionFactory("BrokerB");
-
-        // Set prefetch policy
-        ActiveMQPrefetchPolicy policy = new ActiveMQPrefetchPolicy();
-        policy.setAll(PREFETCH_COUNT);
-
-        factoryA.setPrefetchPolicy(policy);
-        factoryB.setPrefetchPolicy(policy);
-
-        msgsClient1 = 0;
-        msgsClient2 = 0;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueSendReceiveTest.java
deleted file mode 100644
index b0706d9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueSendReceiveTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.usecases;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class TwoBrokerQueueSendReceiveTest  extends TwoBrokerTopicSendReceiveTest {
-
-    protected ActiveMQConnectionFactory sendFactory;
-    protected ActiveMQConnectionFactory receiveFactory;
-
-    protected void setUp() throws Exception {
-        topic = false;
-        super.setUp();
-    }
-
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest.java
deleted file mode 100644
index 0f6611a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.usecases;
-
-
-/**
- * 
- */
-public class TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest extends TwoBrokerTopicSendReceiveUsingTcpTest {
-
-    protected void setUp() throws Exception {
-        this.messageCount = 5000;
-        super.setUp();
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java
deleted file mode 100644
index ab0e734..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-import org.apache.activemq.util.ServiceSupport;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- * 
- */
-public class TwoBrokerTopicSendReceiveTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    private static final Logger LOG = LoggerFactory.getLogger(TwoBrokerTopicSendReceiveTest.class);
-
-    protected ActiveMQConnectionFactory sendFactory;
-    protected ActiveMQConnectionFactory receiveFactory;
-    protected HashMap brokers = new HashMap();
-
-    protected void setUp() throws Exception {
-        sendFactory = createSenderConnectionFactory();
-        receiveFactory = createReceiverConnectionFactory();
-
-        // Give server enough time to setup,
-        // so we don't lose messages when connection fails
-        LOG.info("Waiting for brokers Initialize.");
-        Thread.sleep(5000);
-        LOG.info("Brokers should be initialized by now.. starting test.");
-
-        super.setUp();
-    }
-
-    protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException {
-        return createConnectionFactory("org/apache/activemq/usecases/receiver.xml", "receiver",
-                                       "vm://receiver");
-    }
-
-    protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException {
-        return createConnectionFactory("org/apache/activemq/usecases/sender.xml", "sender", "vm://sender");
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        for (Iterator iter = brokers.values().iterator(); iter.hasNext();) {
-            BrokerService broker = (BrokerService)iter.next();
-            ServiceSupport.dispose(broker);
-            iter.remove();
-        }
-    }
-
-    protected Connection createReceiveConnection() throws JMSException {
-        return receiveFactory.createConnection();
-    }
-
-    protected Connection createSendConnection() throws JMSException {
-        return sendFactory.createConnection();
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory(String config, String brokerName,
-                                                                String connectUrl) throws JMSException {
-        try {
-            BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(config));
-            brokerFactory.afterPropertiesSet();
-            BrokerService broker = brokerFactory.getBroker();
-            brokers.put(brokerName, broker);
-
-            return new ActiveMQConnectionFactory(connectUrl);
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingHttpTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingHttpTest.java
deleted file mode 100644
index 361e8f5..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingHttpTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class TwoBrokerTopicSendReceiveUsingHttpTest extends TwoBrokerTopicSendReceiveTest {
-
-    protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException {
-        return createConnectionFactory("org/apache/activemq/usecases/receiver-http.xml", "receiver", "vm://receiver");
-    }
-
-    protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException {
-        return createConnectionFactory("org/apache/activemq/usecases/sender-http.xml", "sender", "vm://sender");
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingJavaConfigurationTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingJavaConfigurationTest.java
deleted file mode 100644
index 2254436..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingJavaConfigurationTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * 
- */
-public class TwoBrokerTopicSendReceiveUsingJavaConfigurationTest extends TwoBrokerTopicSendReceiveTest {
-    BrokerService receiveBroker;
-    BrokerService sendBroker;
-
-    protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException {
-        try {
-            receiveBroker = new BrokerService();
-            receiveBroker.setBrokerName("receiveBroker");
-            receiveBroker.setUseJmx(false);
-            receiveBroker.setPersistent(false);
-            receiveBroker.addConnector("tcp://localhost:62002");
-            receiveBroker.addNetworkConnector("static:failover:tcp://localhost:62001");
-            receiveBroker.start();
-
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:62002");
-            return factory;
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException {
-        try {
-            sendBroker = new BrokerService();
-            sendBroker.setBrokerName("sendBroker");
-            sendBroker.setUseJmx(false);
-            sendBroker.setPersistent(false);
-            sendBroker.addConnector("tcp://localhost:62001");
-            sendBroker.addNetworkConnector("static:failover:tcp://localhost:62002");
-            sendBroker.start();
-
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:62001");
-            return factory;
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (sendBroker != null) {
-            sendBroker.stop();
-        }
-        if (receiveBroker != null) {
-            receiveBroker.stop();
-        }
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingTcpTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingTcpTest.java
deleted file mode 100644
index 933cfd6..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingTcpTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- * 
- */
-public class TwoBrokerTopicSendReceiveUsingTcpTest extends TwoBrokerTopicSendReceiveTest {
-    private BrokerService receiverBroker;
-    private BrokerService senderBroker;
-
-    protected void setUp() throws Exception {
-        BrokerFactoryBean brokerFactory;
-
-        brokerFactory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/usecases/receiver.xml"));
-        brokerFactory.afterPropertiesSet();
-        receiverBroker = brokerFactory.getBroker();
-
-        brokerFactory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/usecases/sender.xml"));
-        brokerFactory.afterPropertiesSet();
-        senderBroker = brokerFactory.getBroker();
-
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        if (receiverBroker != null) {
-            receiverBroker.stop();
-        }
-        if (senderBroker != null) {
-            senderBroker.stop();
-        }
-    }
-
-    
-    protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException {
-        try {
-            ActiveMQConnectionFactory fac =  new ActiveMQConnectionFactory(((TransportConnector)receiverBroker.getTransportConnectors().get(0)).getConnectUri());
-            return fac;
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException {
-        try {
-            ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory(((TransportConnector)senderBroker.getTransportConnectors().get(0)).getConnectUri());
-            return fac;
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualDestDinamicallyIncludedDestTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualDestDinamicallyIncludedDestTest.java
deleted file mode 100644
index 40366ff..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualDestDinamicallyIncludedDestTest.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.usecases;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-
-import org.apache.activemq.JmsMultipleBrokersTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.DestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualDestination;
-import org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor;
-import org.apache.activemq.broker.region.virtual.VirtualTopic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.store.kahadb.KahaDBStore;
-import org.apache.activemq.util.MessageIdList;
-
-public class TwoBrokerVirtualDestDinamicallyIncludedDestTest extends JmsMultipleBrokersTestSupport {
-    protected static final int MESSAGE_COUNT = 10;
-    boolean dynamicOnly = true;
-    int networkTTL = 1;
-    boolean conduit = true;
-    boolean suppressDuplicateQueueSubscriptions = true;
-    boolean decreaseNetworkConsumerPriority = true;
-
-    /**
-     * BrokerA -> BrokerB && BrokerB -> BrokerA
-     */
-    public void testTopicDinamicallyIncludedBehavior() throws Exception {
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("test", true);
-
-        // Setup consumers
-        MessageConsumer clientA = createConsumer("BrokerA", dest);
-        MessageConsumer clientB = createConsumer("BrokerB", dest);
-
-        Thread.sleep(2*1000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsA = getConsumerMessages("BrokerA", clientA);
-        msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
-        assertEquals(MESSAGE_COUNT, msgsA.getMessageCount());
-
-        MessageIdList msgsB = getConsumerMessages("BrokerB", clientB);
-        msgsB.waitForMessagesToArrive(MESSAGE_COUNT);
-        assertEquals(0, msgsB.getMessageCount());
-
-    }
-
-    /**
-     * BrokerA -> BrokerB && BrokerB -> BrokerA
-     */
-    public void testVirtualDestinationsDinamicallyIncludedBehavior1() throws Exception {
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("global.test", true);
-
-        // Setup consumers
-        MessageConsumer clientB1 = createConsumer("BrokerB", dest);
-        MessageConsumer clientB2 = createConsumer("BrokerB", createDestination("Consumer.foo-bar.global.test", false));
-
-        Thread.sleep(2*1000);
-
-        int messageCount = MESSAGE_COUNT;
-        // Send messages
-        sendMessages("BrokerA", dest, messageCount);
-
-        // Get message count
-        MessageIdList msgsB1 = getConsumerMessages("BrokerB", clientB1);
-        msgsB1.waitForMessagesToArrive(messageCount);
-        assertEquals(messageCount, msgsB1.getMessageCount());
-
-        MessageIdList msgsB2 = getConsumerMessages("BrokerB", clientB2);
-        msgsB2.waitForMessagesToArrive(messageCount);
-        assertEquals(messageCount, msgsB2.getMessageCount());
-
-    }
-
-    /**
-     * BrokerA -> BrokerB && BrokerB -> BrokerA
-     */
-    public void testVirtualDestinationsDinamicallyIncludedBehavior2() throws Exception {
-
-        startAllBrokers();
-
-        // Setup destination
-        Destination dest = createDestination("global.test", true);
-
-        // Setup consumers
-        //MessageConsumer clientB1 = createConsumer("BrokerB", dest);
-        MessageConsumer clientB2 = createConsumer("BrokerB", createDestination("Consumer.foo-bar.global.test", false));
-
-        Thread.sleep(2*1000);
-
-        // Send messages
-        sendMessages("BrokerA", dest, MESSAGE_COUNT);
-
-        // Get message count
-        MessageIdList msgsB2 = getConsumerMessages("BrokerB", clientB2);
-        msgsB2.waitForMessagesToArrive(MESSAGE_COUNT);
-        assertEquals(MESSAGE_COUNT, msgsB2.getMessageCount());
-
-    }
-
-    public void setUp() throws Exception {
-        super.setAutoFail(true);
-        super.setUp();
-        String options = new String("?useJmx=false&deleteAllMessagesOnStartup=true");
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61616)/BrokerA" + options));
-        createAndConfigureBroker(new URI("broker:(tcp://localhost:61617)/BrokerB" + options));
-
-        // Setup broker networks
-        NetworkConnector nc1 = bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduit);
-        nc1.setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
-        nc1.setSuppressDuplicateQueueSubscriptions(suppressDuplicateQueueSubscriptions);
-        nc1.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.QUEUE_TYPE));
-        nc1.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
-        nc1.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("Consumer.>", ActiveMQDestination.QUEUE_TYPE));
-
-        NetworkConnector nc2 = bridgeBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduit);
-        nc2.setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
-        nc2.setSuppressDuplicateQueueSubscriptions(suppressDuplicateQueueSubscriptions);
-        nc2.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.QUEUE_TYPE));
-        nc2.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
-    }
-
-    private BrokerService createAndConfigureBroker(URI uri) throws Exception {
-        BrokerService broker = createBroker(uri);
-
-        configurePersistenceAdapter(broker);
-
-        // make all topics virtual and consumers use the default prefix
-        VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
-        virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[]{new VirtualTopic()});
-        DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[]{virtualDestinationInterceptor};
-        broker.setDestinationInterceptors(destinationInterceptors);
-        return broker;
-    }
-
-    protected void configurePersistenceAdapter(BrokerService broker) throws IOException {
-        File dataFileDir = new File("target/test-amq-data/kahadb/" + broker.getBrokerName());
-        KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(dataFileDir);
-        broker.setPersistenceAdapter(kaha);
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoMulticastDiscoveryBrokerTopicSendReceiveTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoMulticastDiscoveryBrokerTopicSendReceiveTest.java
deleted file mode 100644
index 8b8643a..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoMulticastDiscoveryBrokerTopicSendReceiveTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.usecases;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class TwoMulticastDiscoveryBrokerTopicSendReceiveTest extends TwoBrokerTopicSendReceiveTest {
-
-    protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException {
-        return createConnectionFactory("org/apache/activemq/usecases/receiver-discovery.xml", "receiver", "vm://receiver");
-    }
-
-    protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException {
-        return createConnectionFactory("org/apache/activemq/usecases/sender-discovery.xml", "sender", "vm://sender");
-    }
-    
-    protected void setUp() throws Exception{
-    	System.setProperty("groupId", getClass().getName()+"-"+System.currentTimeMillis());
-        messageCount = 100000;
-        super.setUp();
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/UnlimitedEnqueueTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/UnlimitedEnqueueTest.java
deleted file mode 100644
index 3366174..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/UnlimitedEnqueueTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.usecases;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.ResourceAllocationException;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.FilePendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.junit.Before;
-import org.junit.Test;
-
-public class UnlimitedEnqueueTest  {
-
-    BrokerService brokerService = null;
-    final long numMessages = 50000;
-    final long numThreads = 10;
-
-    @Test
-    public void testEnqueueIsOnlyLimitedByDisk() throws Exception {
-        ExecutorService executor = Executors.newCachedThreadPool();
-        for (int i=0; i<numThreads; i++) {
-            executor.execute(new Producer(numMessages/numThreads));
-        }
-        
-        executor.shutdown();
-        executor.awaitTermination(30*60, TimeUnit.SECONDS);
-    }
-    
-    @Before
-    public void createBrokerService() throws Exception {
-        brokerService = new BrokerService();
-        brokerService.setDeleteAllMessagesOnStartup(true);
-        brokerService.setAdvisorySupport(false);
-        
-        // optional, reduce the usage limit so that spooling will occur faster
-        brokerService.getSystemUsage().getMemoryUsage().setLimit(10 * 1024 * 1024);
-        PolicyMap policyMap = new PolicyMap();
-        List<PolicyEntry> entries = new ArrayList<PolicyEntry>();
-        PolicyEntry policy = new PolicyEntry();
-        
-        // NB: ensure queue cursor limit is below the default 70% usage that the destination will use
-        // if they are the same, the queue memory limit and flow control will kick in first
-        policy.setCursorMemoryHighWaterMark(20);
-        
-        // on by default
-        //policy.setProducerFlowControl(true);
-        policy.setQueue(">");
-        
-        // policy that will spool references to disk
-        policy.setPendingQueuePolicy(new FilePendingQueueMessageStoragePolicy());
-        entries.add(policy);
-        policyMap.setPolicyEntries(entries);
-        brokerService.setDestinationPolicy(policyMap);
-        
-        brokerService.start();
-    }
-    
-    public class Producer implements Runnable{
-
-        private final long numberOfMessages;
-
-        public Producer(final long n){
-            this.numberOfMessages = n;
-        }
-
-        public void run(){
-            ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerService.getVmConnectorURI());
-            try {
-                Connection conn = factory.createConnection();
-                conn.start();
-                for (int i = 0; i < numberOfMessages; i++) {
-                    Session session = conn.createSession(false,Session.AUTO_ACKNOWLEDGE);
-                    Destination destination = session.createQueue("test-queue");
-                    MessageProducer producer = session.createProducer(destination);
-                    producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-                    BytesMessage message = session.createBytesMessage();
-                    byte[] bytes = new byte[1024*10];
-                    message.writeBytes(bytes);
-                    try {
-                        producer.send(message);
-                    } catch (ResourceAllocationException e) {
-                        e.printStackTrace();
-                    }
-                    session.close();
-                }
-            } catch (JMSException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/BitArrayBinTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/BitArrayBinTest.java
deleted file mode 100644
index e1276d8..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/BitArrayBinTest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * 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.util;
-
-import junit.framework.TestCase;
-
-public class BitArrayBinTest extends TestCase {
-        
-    public void testSetAroundWindow() throws Exception {
-        doTestSetAroundWindow(500, 2000);
-        doTestSetAroundWindow(512, 2000);
-        doTestSetAroundWindow(128, 512);
-    }
-
-    public void testSetHiLo() throws Exception {
-        BitArrayBin toTest = new BitArrayBin(50);
-        toTest.setBit(0, true);
-        toTest.setBit(100, true);
-        toTest.setBit(150, true);
-        assertTrue("set", toTest.getBit(0));
-
-        toTest.setBit(0, true);
-        assertTrue("set", toTest.getBit(0));        
-    }
-    
-    private void doTestSetAroundWindow(int window, int dataSize) throws Exception {
-
-        BitArrayBin toTest = new BitArrayBin(window);
-        
-        for (int i=0; i <= dataSize; i++) {
-            assertTrue("not already set", !toTest.setBit(i, Boolean.TRUE));
-            assertEquals("current is max", i, toTest.getLastSetIndex());
-        }
-
-        assertEquals("last is max", dataSize, toTest.getLastSetIndex());
-        
-        int windowOfValidData = roundWindow(dataSize, window);
-        int i=dataSize;
-        for (; i >= dataSize -windowOfValidData; i--) {
-            assertTrue("was already set, id=" + i, toTest.setBit(i, Boolean.TRUE));
-        }
-
-        assertEquals("last is still max", dataSize, toTest.getLastSetIndex());
-        
-        for (; i >= 0; i--) {
-            assertTrue("was not already set, id=" + i, !toTest.setBit(i, Boolean.TRUE));
-        }
-        
-        for (int j= dataSize +1; j<=(2*dataSize); j++) {
-            assertTrue("not already set: id=" + j, !toTest.setBit(j, Boolean.TRUE));
-        }
-        
-        assertEquals("last still max*2", 2*dataSize, toTest.getLastSetIndex());
-
-    }
-    
-    public void testSetUnsetAroundWindow() throws Exception {
-        doTestSetUnSetAroundWindow(500, 2000);
-        doTestSetUnSetAroundWindow(512, 2000);
-        doTestSetUnSetAroundWindow(128, 512);
-    }
-    
-    private void doTestSetUnSetAroundWindow(int dataSize, int window) throws Exception {
-
-        BitArrayBin toTest = new BitArrayBin(window);
-        
-        for (int i=0; i <=dataSize; i++) {
-            assertTrue("not already set", !toTest.setBit(i, Boolean.TRUE));
-        }
-                
-        int windowOfValidData = roundWindow(dataSize, window);
-        for (int i=dataSize; i >= 0 && i >=dataSize -windowOfValidData; i--) {
-            assertTrue("was already set, id=" + i, toTest.setBit(i, Boolean.FALSE));
-        }
-
-        for (int i=0; i <=dataSize; i++) {
-            assertTrue("not already set, id:" + i, !toTest.setBit(i, Boolean.TRUE));
-        }
-
-        for (int j= 2*dataSize; j< 4*dataSize; j++) {
-            assertTrue("not already set: id=" + j, !toTest.setBit(j, Boolean.TRUE));
-        }
-    }
-    
-    public void testSetAroundLongSizeMultiplier() throws Exception {
-        int window = 512;
-        int dataSize = 1000;
-        for (int muliplier=1; muliplier <8; muliplier++) {
-            for (int value=0; value <dataSize; value++) {
-                BitArrayBin toTest = new BitArrayBin(window);
-                
-                int instance = value +muliplier*BitArray.LONG_SIZE;
-                assertTrue("not already set: id=" + instance, !toTest.setBit(instance, Boolean.TRUE));
-                assertTrue("not already set: id=" + value, !toTest.setBit(value, Boolean.TRUE));
-                assertEquals("max set correct", instance, toTest.getLastSetIndex());
-            }
-        }
-    }
-    
-    public void testLargeGapInData(int window) throws Exception {
-        doTestLargeGapInData(128);
-        doTestLargeGapInData(500);
-    }
-    
-    public void doTestLargeGapInData(int window) throws Exception {
-        BitArrayBin toTest = new BitArrayBin(window);
-        
-        int instance = BitArray.LONG_SIZE;
-        assertTrue("not already set: id=" + instance,  !toTest.setBit(instance, Boolean.TRUE));
-        
-        instance = 12 *BitArray.LONG_SIZE;
-        assertTrue("not already set: id=" + instance,  !toTest.setBit(instance, Boolean.TRUE));
-        
-        instance = 9 *BitArray.LONG_SIZE;
-        assertTrue("not already set: id=" + instance,  !toTest.setBit(instance, Boolean.TRUE));
-    }
-    
-    
-   public void testLastSeq() throws Exception {
-       BitArrayBin toTest = new BitArrayBin(512);
-       assertEquals("last not set", -1, toTest.getLastSetIndex());
-       
-       toTest.setBit(1, Boolean.TRUE);
-       assertEquals("last correct", 1, toTest.getLastSetIndex());
-       
-       toTest.setBit(64, Boolean.TRUE);
-       assertEquals("last correct", 64, toTest.getLastSetIndex());
-       
-       toTest.setBit(68, Boolean.TRUE);
-       assertEquals("last correct", 68, toTest.getLastSetIndex());
-       
-   }
-    
-    // window moves in increments of BitArray.LONG_SIZE.
-    // valid data window on low end can be larger than window
-    private int roundWindow(int dataSetEnd, int windowSize) {
-        
-        int validData = dataSetEnd - windowSize;
-        int validDataBin = validData / BitArray.LONG_SIZE;
-        validDataBin += (windowSize % BitArray.LONG_SIZE > 0? 1:0);
-        int startOfValid = validDataBin * BitArray.LONG_SIZE;
-        
-        return dataSetEnd - startOfValid;        
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/ConsumerThread.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/ConsumerThread.java
deleted file mode 100644
index bfa1d96..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/ConsumerThread.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.*;
-
-public class ConsumerThread extends Thread {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ConsumerThread.class);
-
-    int messageCount = 1000;
-    int received = 0;
-    Destination dest;
-    Session sess;
-    boolean breakOnNull = true;
-
-    public ConsumerThread(Session sess, Destination dest) {
-        this.dest = dest;
-        this.sess = sess;
-    }
-
-    @Override
-    public void run() {
-      MessageConsumer consumer = null;
-
-        try {
-            consumer = sess.createConsumer(dest);
-            while (received < messageCount) {
-                Message msg = consumer.receive(3000);
-                if (msg != null) {
-                    LOG.info("Received " + ((TextMessage)msg).getText());
-                    received++;
-                } else {
-                    if (breakOnNull) {
-                        break;
-                    }
-                }
-            }
-        } catch (JMSException e) {
-            e.printStackTrace();
-        } finally {
-            if (consumer != null) {
-                try {
-                    consumer.close();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    public int getReceived() {
-        return received;
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    public void setBreakOnNull(boolean breakOnNull) {
-        this.breakOnNull = breakOnNull;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/DataByteArrayInputStreamTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/DataByteArrayInputStreamTest.java
deleted file mode 100644
index 5267bf9..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/DataByteArrayInputStreamTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.util;
-
-import junit.framework.TestCase;
-
-public class DataByteArrayInputStreamTest extends TestCase {
-
-    /**
-     * https://issues.apache.org/activemq/browse/AMQ-1911
-     */
-    public void testNonAscii() throws Exception {
-        doMarshallUnMarshallValidation("meißen");
-        
-        String accumulator = new String();
-        
-        int test = 0; // int to get Supplementary chars
-        while(Character.isDefined(test)) {
-            String toTest = String.valueOf((char)test);
-            accumulator += toTest;
-            doMarshallUnMarshallValidation(toTest);
-            test++;
-        }
-        
-        int massiveThreeByteCharValue = 0x0FFF;
-        String toTest = String.valueOf((char)massiveThreeByteCharValue);
-        accumulator += toTest;
-        doMarshallUnMarshallValidation(String.valueOf((char)massiveThreeByteCharValue));
-        
-        // Altogether
-        doMarshallUnMarshallValidation(accumulator);
-        
-        // the three byte values
-        char t = '\u0800';
-        final char max =  '\uffff';
-        accumulator = String.valueOf(t);
-        while (t < max) {
-            String val = String.valueOf(t);
-            accumulator += val;
-            doMarshallUnMarshallValidation(val);
-            t++;
-        }
-        
-        // Altogether so long as it is not too big
-        while (accumulator.length() > 20000) {
-            accumulator = accumulator.substring(20000);
-        }
-        doMarshallUnMarshallValidation(accumulator);
-    }
-    
-    void doMarshallUnMarshallValidation(String value) throws Exception {        
-        DataByteArrayOutputStream out = new DataByteArrayOutputStream();
-        out.writeBoolean(true);
-        out.writeUTF(value);
-        out.close();
-        
-        DataByteArrayInputStream in = new DataByteArrayInputStream(out.getData());
-        in.readBoolean();
-        String readBack = in.readUTF();
-        assertEquals(value, readBack);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/DataByteArrayOutputStreamTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/DataByteArrayOutputStreamTest.java
deleted file mode 100644
index 9c12f22..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/DataByteArrayOutputStreamTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-public class DataByteArrayOutputStreamTest extends TestCase {
-
-    /**
-     * This test case assumes that an ArrayIndexOutOfBoundsException will be thrown when the buffer fails to resize
-     * @throws IOException
-     */
-    public void testResize() throws IOException {
-        int initSize = 64;
-        DataByteArrayOutputStream out = new DataByteArrayOutputStream();
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeBoolean(true);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeByte(1);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeBytes("test");
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeChar('C');
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeChars("test");
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeDouble(3.1416);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeFloat((float)3.1416);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeInt(12345);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeLong(12345);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeShort(1234);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.writeUTF("test");
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.write(1234);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.write(new byte[10], 5, 5);
-
-        fillOut(out, initSize);
-        // Should resized here
-        out.write(new byte[10]);
-    }
-
-    /**
-     * This method restarts the stream to the init size, and fills it up with data
-     * @param out
-     * @param size
-     * @throws IOException
-     */
-    public void fillOut(DataByteArrayOutputStream out, int size) throws IOException {
-        out.restart(size);
-        out.write(new byte[size]);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/LRUCacheTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/LRUCacheTest.java
deleted file mode 100644
index 0dd5e31..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/LRUCacheTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.util;
-
-import static org.junit.Assert.assertEquals;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Test;
-
-public class LRUCacheTest {
-    protected static final Logger LOG = LoggerFactory.getLogger(LRUCacheTest.class);
-    
-    @Test
-    public void testResize() throws Exception {
-        LRUCache<Long, Long> underTest = new LRUCache<Long, Long>(1000);
-        
-        Long count = new Long(0);
-        long max = 0;
-        for (; count < 27276827; count++) {
-            long start = System.currentTimeMillis();
-            if (!underTest.containsKey(count)) {
-                underTest.put(count, count);
-            }
-            long duration = System.currentTimeMillis() - start;
-            if (duration > max) {
-                LOG.info("count: " + count + ", new max=" + duration);
-                max = duration;
-            }
-            if (count % 100000000 == 0) {
-                LOG.info("count: " + count + ", max=" + max);
-            }
-        }
-        assertEquals("size is still in order", 1000, underTest.size());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/LinkedNodeTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/LinkedNodeTest.java
deleted file mode 100644
index 86c5262..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/LinkedNodeTest.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.util;
-
-import junit.framework.TestCase;
-
-/**
- * @author chirino
- */
-public class LinkedNodeTest extends TestCase {
-
-    static class IntLinkedNode extends LinkedNode {
-        public final int v;
-
-        public IntLinkedNode(int v) {
-            this.v = v;
-        };
-
-        @Override
-        public String toString() {
-            return "" + v;
-        }
-    }
-
-    IntLinkedNode i1 = new IntLinkedNode(1);
-    IntLinkedNode i2 = new IntLinkedNode(2);
-    IntLinkedNode i3 = new IntLinkedNode(3);
-    IntLinkedNode i4 = new IntLinkedNode(4);
-    IntLinkedNode i5 = new IntLinkedNode(5);
-    IntLinkedNode i6 = new IntLinkedNode(6);
-
-    public void testLinkAfter() {
-
-        i1.linkAfter(i2.linkAfter(i3));
-        // Order should be 1,2,3
-
-        assertTrue(i1.getNext() == i2);
-        assertTrue(i1.getNext().getNext() == i3);
-        assertNull(i1.getNext().getNext().getNext());
-
-        assertTrue(i3.getPrevious() == i2);
-        assertTrue(i3.getPrevious().getPrevious() == i1);
-        assertNull(i3.getPrevious().getPrevious().getPrevious());
-
-        assertTrue(i1.isHeadNode());
-        assertFalse(i1.isTailNode());
-        assertFalse(i2.isHeadNode());
-        assertFalse(i2.isTailNode());
-        assertTrue(i3.isTailNode());
-        assertFalse(i3.isHeadNode());
-
-        i1.linkAfter(i4.linkAfter(i5));
-
-        // Order should be 1,4,5,2,3
-
-        assertTrue(i1.getNext() == i4);
-        assertTrue(i1.getNext().getNext() == i5);
-        assertTrue(i1.getNext().getNext().getNext() == i2);
-        assertTrue(i1.getNext().getNext().getNext().getNext() == i3);
-        assertNull(i1.getNext().getNext().getNext().getNext().getNext());
-
-        assertTrue(i3.getPrevious() == i2);
-        assertTrue(i3.getPrevious().getPrevious() == i5);
-        assertTrue(i3.getPrevious().getPrevious().getPrevious() == i4);
-        assertTrue(i3.getPrevious().getPrevious().getPrevious().getPrevious() == i1);
-        assertNull(i3.getPrevious().getPrevious().getPrevious().getPrevious().getPrevious());
-
-        assertTrue(i1.isHeadNode());
-        assertFalse(i1.isTailNode());
-        assertFalse(i4.isHeadNode());
-        assertFalse(i4.isTailNode());
-        assertFalse(i5.isHeadNode());
-        assertFalse(i5.isTailNode());
-        assertFalse(i2.isHeadNode());
-        assertFalse(i2.isTailNode());
-        assertTrue(i3.isTailNode());
-        assertFalse(i3.isHeadNode());
-
-    }
-
-    public void testLinkBefore() {
-
-        i3.linkBefore(i2.linkBefore(i1));
-
-        assertTrue(i1.getNext() == i2);
-        assertTrue(i1.getNext().getNext() == i3);
-        assertNull(i1.getNext().getNext().getNext());
-
-        assertTrue(i3.getPrevious() == i2);
-        assertTrue(i3.getPrevious().getPrevious() == i1);
-        assertNull(i3.getPrevious().getPrevious().getPrevious());
-
-        assertTrue(i1.isHeadNode());
-        assertFalse(i1.isTailNode());
-        assertFalse(i2.isHeadNode());
-        assertFalse(i2.isTailNode());
-        assertTrue(i3.isTailNode());
-        assertFalse(i3.isHeadNode());
-
-        i2.linkBefore(i5.linkBefore(i4));
-
-        // Order should be 1,4,5,2,3
-
-        assertTrue(i1.getNext() == i4);
-        assertTrue(i1.getNext().getNext() == i5);
-        assertTrue(i1.getNext().getNext().getNext() == i2);
-        assertTrue(i1.getNext().getNext().getNext().getNext() == i3);
-        assertNull(i1.getNext().getNext().getNext().getNext().getNext());
-
-        assertTrue(i3.getPrevious() == i2);
-        assertTrue(i3.getPrevious().getPrevious() == i5);
-        assertTrue(i3.getPrevious().getPrevious().getPrevious() == i4);
-        assertTrue(i3.getPrevious().getPrevious().getPrevious().getPrevious() == i1);
-        assertNull(i3.getPrevious().getPrevious().getPrevious().getPrevious().getPrevious());
-
-        assertTrue(i1.isHeadNode());
-        assertFalse(i1.isTailNode());
-        assertFalse(i4.isHeadNode());
-        assertFalse(i4.isTailNode());
-        assertFalse(i5.isHeadNode());
-        assertFalse(i5.isTailNode());
-        assertFalse(i2.isHeadNode());
-        assertFalse(i2.isTailNode());
-        assertTrue(i3.isTailNode());
-        assertFalse(i3.isHeadNode());
-
-    }
-
-    public void testUnlink() {
-
-        i1.linkAfter(i2.linkAfter(i3));
-        i3.linkAfter(i4);
-        i1.linkBefore(i5);
-        i1.linkAfter(i6);
-
-        // Order should be 5,1,6,2,3,4
-        i4.unlink();
-        i5.unlink();
-        i6.unlink();
-
-        // Order should be 1,2,3
-
-        assertTrue(i1.getNext() == i2);
-        assertTrue(i1.getNext().getNext() == i3);
-        assertNull(i1.getNext().getNext().getNext());
-
-        assertTrue(i3.getPrevious() == i2);
-        assertTrue(i3.getPrevious().getPrevious() == i1);
-        assertNull(i3.getPrevious().getPrevious().getPrevious());
-
-        assertTrue(i1.isHeadNode());
-        assertFalse(i1.isTailNode());
-        assertFalse(i2.isHeadNode());
-        assertFalse(i2.isTailNode());
-        assertTrue(i3.isTailNode());
-        assertFalse(i3.isHeadNode());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/MarshallingSupportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/MarshallingSupportTest.java
deleted file mode 100644
index aa29dbf..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/MarshallingSupportTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.util;
-
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
-/**
- * @author rajdavies
- */
-public class MarshallingSupportTest extends TestCase {
-
-    /**
-     * @throws java.lang.Exception
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /**
-     * @throws java.lang.Exception
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * Test method for
-     * {@link org.apache.activemq.util.MarshallingSupport#propertiesToString(java.util.Properties)}.
-     * 
-     * @throws Exception
-     */
-    public void testPropertiesToString() throws Exception {
-        Properties props = new Properties();
-        for (int i = 0; i < 10; i++) {
-            String key = "key" + i;
-            String value = "value" + i;
-            props.put(key, value);
-        }
-        String str = MarshallingSupport.propertiesToString(props);
-        Properties props2 = MarshallingSupport.stringToProperties(str);
-        assertEquals(props, props2);
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java
deleted file mode 100644
index 119cce1..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/**
- * 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.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import junit.framework.Assert;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple container of messages for performing testing and rendezvous style
- * code. You can use this class a {@link MessageListener} and then make
- * assertions about how many messages it has received allowing a certain maximum
- * amount of time to ensure that the test does not hang forever. Also you can
- * chain these instances together with the {@link #setParent(MessageListener)}
- * method so that you can aggregate the total number of messages consumed across
- * a number of consumers.
- * 
- * 
- */
-public class MessageIdList extends Assert implements MessageListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MessageIdList.class);
-
-    private List<String> messageIds = new ArrayList<String>();
-    private Object semaphore;
-    private boolean verbose;
-    private MessageListener parent;
-    private long maximumDuration = 15000L;
-    private long processingDelay;
-
-    private CountDownLatch countDownLatch;
-
-    public MessageIdList() {
-        this(new Object());
-    }
-
-    public MessageIdList(Object semaphore) {
-        this.semaphore = semaphore;
-    }
-
-    public boolean equals(Object that) {
-        if (that instanceof MessageIdList) {
-            MessageIdList thatList = (MessageIdList)that;
-            return getMessageIds().equals(thatList.getMessageIds());
-        }
-        return false;
-    }
-
-    public int hashCode() {
-        synchronized (semaphore) {
-            return messageIds.hashCode() + 1;
-        }
-    }
-
-    public String toString() {
-        synchronized (semaphore) {
-            return messageIds.toString();
-        }
-    }
-
-    /**
-     * @return all the messages on the list so far, clearing the buffer
-     */
-    public List<String> flushMessages() {
-        synchronized (semaphore) {
-            List<String> answer = new ArrayList<String>(messageIds);
-            messageIds.clear();
-            return answer;
-        }
-    }
-
-    public synchronized List<String> getMessageIds() {
-        synchronized (semaphore) {
-            return new ArrayList<String>(messageIds);
-        }
-    }
-
-    public void onMessage(Message message) {
-        String id = null;
-        try {
-            id = message.getJMSMessageID();
-            synchronized (semaphore) {
-                messageIds.add(id);
-                semaphore.notifyAll();
-            }
-            if (countDownLatch != null) {
-                countDownLatch.countDown();
-            }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Received message: " + message);
-            }
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-        if (parent != null) {
-            parent.onMessage(message);
-        }
-        if (processingDelay > 0) {
-            try {
-                Thread.sleep(processingDelay);
-            } catch (InterruptedException e) {
-            }
-        }
-    }
-
-    public int getMessageCount() {
-        synchronized (semaphore) {
-            return messageIds.size();
-        }
-    }
-
-    public void waitForMessagesToArrive(int messageCount) {
-        LOG.info("Waiting for " + messageCount + " message(s) to arrive");
-
-        long start = System.currentTimeMillis();
-
-        for (int i = 0; i < messageCount; i++) {
-            try {
-                if (hasReceivedMessages(messageCount)) {
-                    break;
-                }
-                long duration = System.currentTimeMillis() - start;
-                if (duration >= maximumDuration) {
-                    break;
-                }
-                synchronized (semaphore) {
-                    semaphore.wait(maximumDuration - duration);
-                }
-            } catch (InterruptedException e) {
-                LOG.info("Caught: " + e);
-            }
-        }
-        long end = System.currentTimeMillis() - start;
-
-        LOG.info("End of wait for " + end + " millis and received: " + getMessageCount() + " messages");
-    }
-
-    /**
-     * Performs a testing assertion that the correct number of messages have
-     * been received without waiting
-     * 
-     * @param messageCount
-     */
-    public void assertMessagesReceivedNoWait(int messageCount) {
-        assertEquals("expected number of messages when received", messageCount, getMessageCount());
-    }
-
-    /**
-     * Performs a testing assertion that the correct number of messages have
-     * been received waiting for the messages to arrive up to a fixed amount of
-     * time.
-     * 
-     * @param messageCount
-     */
-    public void assertMessagesReceived(int messageCount) {
-        waitForMessagesToArrive(messageCount);
-
-        assertMessagesReceivedNoWait(messageCount);
-    }
-
-    /**
-     * Asserts that there are at least the given number of messages received
-     * without waiting.
-     */
-    public void assertAtLeastMessagesReceived(int messageCount) {
-        int actual = getMessageCount();
-        assertTrue("at least: " + messageCount + " messages received. Actual: " + actual, actual >= messageCount);
-    }
-
-    /**
-     * Asserts that there are at most the number of messages received without
-     * waiting
-     * 
-     * @param messageCount
-     */
-    public void assertAtMostMessagesReceived(int messageCount) {
-        int actual = getMessageCount();
-        assertTrue("at most: " + messageCount + " messages received. Actual: " + actual, actual <= messageCount);
-    }
-
-    public boolean hasReceivedMessage() {
-        return getMessageCount() == 0;
-    }
-
-    public boolean hasReceivedMessages(int messageCount) {
-        return getMessageCount() >= messageCount;
-    }
-
-    public boolean isVerbose() {
-        return verbose;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public MessageListener getParent() {
-        return parent;
-    }
-
-    /**
-     * Allows a parent listener to be specified such as to aggregate messages
-     * consumed across consumers
-     */
-    public void setParent(MessageListener parent) {
-        this.parent = parent;
-    }
-
-    /**
-     * @return the maximumDuration
-     */
-    public long getMaximumDuration() {
-        return this.maximumDuration;
-    }
-
-    /**
-     * @param maximumDuration the maximumDuration to set
-     */
-    public void setMaximumDuration(long maximumDuration) {
-        this.maximumDuration = maximumDuration;
-    }
-
-    public void setCountDownLatch(CountDownLatch countDownLatch) {
-        this.countDownLatch = countDownLatch;
-    }
-
-    /**
-     * Gets the amount of time the message listener will spend sleeping to
-     * simulate a processing delay.
-     * 
-     * @return
-     */
-    public long getProcessingDelay() {
-        return processingDelay;
-    }
-
-    /**
-     * Sets the amount of time the message listener will spend sleeping to
-     * simulate a processing delay.
-     * 
-     * @param processingDelay
-     */
-    public void setProcessingDelay(long processingDelay) {
-        this.processingDelay = processingDelay;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/ProducerThread.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/ProducerThread.java
deleted file mode 100644
index c7cf90d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/ProducerThread.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.*;
-
-public class ProducerThread extends Thread {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ProducerThread.class);
-
-    int messageCount = 1000;
-    Destination dest;
-    protected Session sess;
-    int sleep = 0;
-    int sentCount = 0;
-
-    public ProducerThread(Session sess, Destination dest) {
-        this.dest = dest;
-        this.sess = sess;
-    }
-
-    public void run() {
-        MessageProducer producer = null;
-        try {
-            producer = sess.createProducer(dest);
-            for (sentCount = 0; sentCount < messageCount; sentCount++) {
-                producer.send(createMessage(sentCount));
-                LOG.info("Sent 'test message: " + sentCount + "'");
-                if (sleep > 0) {
-                    Thread.sleep(sleep);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            if (producer != null) {
-                try {
-                    producer.close();
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    protected Message createMessage(int i) throws Exception {
-        return sess.createTextMessage("test message: " + i);
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    public void setSleep(int sleep) {
-        this.sleep = sleep;
-    }
-
-    public int getMessageCount() {
-        return messageCount;
-    }
-
-    public int getSentCount() {
-        return sentCount;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/ReflectionSupportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/ReflectionSupportTest.java
deleted file mode 100755
index 0f0095b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/ReflectionSupportTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.util;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-public class ReflectionSupportTest extends TestCase {
-	
-    List<ActiveMQDestination> favorites = new ArrayList<ActiveMQDestination>();
-    String favoritesString = "[queue://test, topic://test]";
-    List<ActiveMQDestination> nonFavorites = new ArrayList<ActiveMQDestination>();
-    String nonFavoritesString = "[topic://test1]";
-    
-    public void setUp() {
-        favorites.add(new ActiveMQQueue("test"));
-        favorites.add(new ActiveMQTopic("test"));
-        nonFavorites.add(new ActiveMQTopic("test1"));
-    }
-
-    public void testSetProperties() throws URISyntaxException {
-        SimplePojo pojo = new SimplePojo();
-        HashMap<String, String> map = new HashMap<String, String>();        
-        map.put("age", "27");
-        map.put("name", "Hiram");
-        map.put("enabled", "true");
-        map.put("uri", "test://value");        
-        map.put("favorites", favoritesString);
-        map.put("nonFavorites", nonFavoritesString);
-        map.put("others", null);
-        
-        IntrospectionSupport.setProperties(pojo, map);
-        
-        assertEquals(27, pojo.getAge());
-        assertEquals("Hiram", pojo.getName());
-        assertEquals(true, pojo.isEnabled());
-        assertEquals(new URI("test://value"), pojo.getUri());
-        assertEquals(favorites, pojo.getFavorites());
-        assertEquals(nonFavorites, pojo.getNonFavorites());
-        assertNull(pojo.getOthers());
-    }
-    
-    public void testGetProperties() {
-    	SimplePojo pojo = new SimplePojo();
-    	pojo.setAge(31);
-    	pojo.setName("Dejan");
-    	pojo.setEnabled(true);
-    	pojo.setFavorites(favorites);
-    	pojo.setNonFavorites(nonFavorites);
-    	pojo.setOthers(null);
-    	
-    	Properties props = new Properties();
-    	
-    	IntrospectionSupport.getProperties(pojo, props, null);
-    	
-    	assertEquals("Dejan", props.get("name"));
-    	assertEquals("31", props.get("age"));
-    	assertEquals("True", props.get("enabled"));
-    	assertEquals(favoritesString, props.get("favorites"));
-    	assertEquals(nonFavoritesString, props.get("nonFavorites"));
-    	assertNull(props.get("others"));
-    }
-    
-    public void testSetBoolean() {
-                  
-        TestWitBoolean target = new TestWitBoolean();
-        assertTrue(!target.getKeepAlive());
-
-        IntrospectionSupport.setProperty(target, "keepAlive", "TRUE");
-        assertTrue(target.getKeepAlive());
-        
-        IntrospectionSupport.setProperty(target, "keepAlive", "false");
-        assertTrue(!target.getKeepAlive());
-    }
-
-    public static class TestWitBoolean {
-        private Boolean keepAlive = new Boolean(false);
-        public Boolean getKeepAlive() {
-            return keepAlive;
-        }
-        public void setKeepAlive(Boolean keepAlive) {
-            this.keepAlive = keepAlive;
-        }
-    }
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/SimplePojo.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/SimplePojo.java
deleted file mode 100755
index ac19075..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/SimplePojo.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.util;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.activemq.command.ActiveMQDestination;
-
-public class SimplePojo {
-
-    String name;
-    int age;
-    boolean enabled;
-    URI uri;
-    List<ActiveMQDestination> favorites = new ArrayList<ActiveMQDestination>();
-    List<ActiveMQDestination> nonFavorites = new ArrayList<ActiveMQDestination>();
-    List<ActiveMQDestination> others = new ArrayList<ActiveMQDestination>();
-    
-    public int getAge() {
-        return age;
-    }
-    public void setAge(int age) {
-        this.age = age;
-    }
-    public boolean isEnabled() {
-        return enabled;
-    }
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-    public String getName() {
-        return name;
-    }
-    public void setName(String name) {
-        this.name = name;
-    }
-    public URI getUri() {
-        return uri;
-    }
-    public void setUri(URI uri) {
-        this.uri = uri;
-    }
-	public List<ActiveMQDestination> getFavorites() {
-		return favorites;
-	}
-	public void setFavorites(List<ActiveMQDestination> favorites) {
-		this.favorites = favorites;
-	}
-	public List<ActiveMQDestination> getNonFavorites() {
-		return nonFavorites;
-	}
-	public void setNonFavorites(List<ActiveMQDestination> nonFavorites) {
-		this.nonFavorites = nonFavorites;
-	}
-	public List<ActiveMQDestination> getOthers() {
-		return others;
-	}
-	public void setOthers(List<ActiveMQDestination> others) {
-		this.others = others;
-	}
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/SocketProxy.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/SocketProxy.java
deleted file mode 100644
index d3f37f4..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/SocketProxy.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SocketProxy {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(SocketProxy.class);
-
-    public static final int ACCEPT_TIMEOUT_MILLIS = 100;
-
-    private URI proxyUrl;
-    private URI target;
-
-    private Acceptor acceptor;
-    private ServerSocket serverSocket;
-    
-    private CountDownLatch closed = new CountDownLatch(1);
-
-    public List<Bridge> connections = new LinkedList<Bridge>();
-
-    private int listenPort = 0;
-
-    private int receiveBufferSize = -1;
-
-    private boolean pauseAtStart = false;
-
-    private int acceptBacklog = 50;
-
-    public SocketProxy() throws Exception {    
-    }
-    
-    public SocketProxy(URI uri) throws Exception {
-        this(0, uri);
-    }
-
-    public SocketProxy(int port, URI uri) throws Exception {
-        listenPort = port;
-        target = uri;
-        open();
-    }
-
-    public void setReceiveBufferSize(int receiveBufferSize) {
-        this.receiveBufferSize = receiveBufferSize;
-    }
-    
-    public void setTarget(URI tcpBrokerUri) {
-        target = tcpBrokerUri;
-    }
-
-    public void open() throws Exception {
-        serverSocket = new ServerSocket();
-        serverSocket.setReuseAddress(true);
-        if (receiveBufferSize > 0) {
-            serverSocket.setReceiveBufferSize(receiveBufferSize);
-        }
-        if (proxyUrl == null) {
-            serverSocket.bind(new InetSocketAddress(listenPort), acceptBacklog);
-            proxyUrl = urlFromSocket(target, serverSocket);
-        } else {
-            serverSocket.bind(new InetSocketAddress(proxyUrl.getPort()));
-        }
-        acceptor = new Acceptor(serverSocket, target);
-        if (pauseAtStart) {
-            acceptor.pause();
-        }
-        new Thread(null, acceptor, "SocketProxy-Acceptor-" + serverSocket.getLocalPort()).start();
-        closed = new CountDownLatch(1);
-    }
-
-    public URI getUrl() {
-        return proxyUrl;
-    }
-
-    /*
-     * close all proxy connections and acceptor
-     */
-    public void close() {
-        List<Bridge> connections;
-        synchronized(this.connections) {
-            connections = new ArrayList<Bridge>(this.connections);
-        }            
-        LOG.info("close, numConnectons=" + connections.size());
-        for (Bridge con : connections) {
-            closeConnection(con);
-        }
-        acceptor.close();
-        closed.countDown();
-    }
-
-    /*
-     * close all proxy receive connections, leaving acceptor
-     * open
-     */
-    public void halfClose() {
-        List<Bridge> connections;
-        synchronized(this.connections) {
-            connections = new ArrayList<Bridge>(this.connections);
-        }            
-        LOG.info("halfClose, numConnectons=" + connections.size());
-        for (Bridge con : connections) {
-            halfCloseConnection(con);
-        }
-    }
-
-    public boolean waitUntilClosed(long timeoutSeconds) throws InterruptedException {
-        return closed.await(timeoutSeconds, TimeUnit.SECONDS);
-    }
-
-    /*
-     * called after a close to restart the acceptor on the same port
-     */
-    public void reopen() {
-        LOG.info("reopen");
-        try {
-            open();
-        } catch (Exception e) {
-            LOG.debug("exception on reopen url:" + getUrl(), e);
-        }
-    }
-
-    /*
-     * pause accepting new connecitons and data transfer through existing proxy
-     * connections. All sockets remain open
-     */
-    public void pause() {
-        synchronized(connections) {
-            LOG.info("pause, numConnectons=" + connections.size());
-            acceptor.pause();
-            for (Bridge con : connections) {
-                con.pause();
-            }
-        }
-    }
-
-    /*
-     * continue after pause
-     */
-    public void goOn() {
-        synchronized(connections) {
-            LOG.info("goOn, numConnectons=" + connections.size());
-            for (Bridge con : connections) {
-                con.goOn();
-            }
-        }
-        acceptor.goOn();
-    }
-
-    private void closeConnection(Bridge c) {
-        try {
-            c.close();
-        } catch (Exception e) {
-            LOG.debug("exception on close of: " + c, e);
-        }
-    }
-
-    private void halfCloseConnection(Bridge c) {
-        try {
-            c.halfClose();
-        } catch (Exception e) {
-            LOG.debug("exception on half close of: " + c, e);
-        }
-    }
-
-    public boolean isPauseAtStart() {
-        return pauseAtStart;
-    }
-
-    public void setPauseAtStart(boolean pauseAtStart) {
-        this.pauseAtStart = pauseAtStart;
-    }
-
-    public int getAcceptBacklog() {
-        return acceptBacklog;
-    }
-
-    public void setAcceptBacklog(int acceptBacklog) {
-        this.acceptBacklog = acceptBacklog;
-    }
-
-    private URI urlFromSocket(URI uri, ServerSocket serverSocket) throws Exception {
-        int listenPort = serverSocket.getLocalPort();
-
-        return new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), listenPort, uri.getPath(), uri.getQuery(), uri.getFragment());
-    }
-
-    public class Bridge {
-
-        private Socket receiveSocket;
-        private Socket sendSocket;
-        private Pump requestThread;
-        private Pump responseThread;
-
-        public Bridge(Socket socket, URI target) throws Exception {
-            receiveSocket = socket;
-            sendSocket = new Socket();
-            if (receiveBufferSize > 0) {
-                sendSocket.setReceiveBufferSize(receiveBufferSize);
-            }
-            sendSocket.connect(new InetSocketAddress(target.getHost(), target.getPort()));
-            linkWithThreads(receiveSocket, sendSocket);
-            LOG.info("proxy connection " + sendSocket + ", receiveBufferSize=" + sendSocket.getReceiveBufferSize());
-        }
-
-        public void goOn() {
-            responseThread.goOn();
-            requestThread.goOn();
-        }
-
-        public void pause() {
-            requestThread.pause();
-            responseThread.pause();
-        }
-
-        public void close() throws Exception {
-            synchronized(connections) {
-                connections.remove(this);
-            }
-            receiveSocket.close();
-            sendSocket.close();
-        }
-
-        public void halfClose() throws Exception {
-            receiveSocket.close();
-        }
-
-        private void linkWithThreads(Socket source, Socket dest) {
-            requestThread = new Pump(source, dest);
-            requestThread.start();
-            responseThread = new Pump(dest, source);
-            responseThread.start();
-        }
-
-        public class Pump extends Thread {
-
-            protected Socket src;
-            private Socket destination;
-            private AtomicReference<CountDownLatch> pause = new AtomicReference<CountDownLatch>();
-
-            public Pump(Socket source, Socket dest) {
-                super("SocketProxy-DataTransfer-" + source.getPort() + ":" + dest.getPort());
-                src = source;
-                destination = dest;
-                pause.set(new CountDownLatch(0));
-            }
-
-            public void pause() {
-                pause.set(new CountDownLatch(1));
-            }
-
-            public void goOn() {
-                pause.get().countDown();
-            }
-
-            public void run() {
-                byte[] buf = new byte[1024];
-                try {
-                    InputStream in = src.getInputStream();
-                    OutputStream out = destination.getOutputStream();
-                    while (true) {
-                        int len = in.read(buf);
-                        if (len == -1) {
-                            LOG.debug("read eof from:" + src);
-                            break;
-                        }
-                        pause.get().await();
-                        out.write(buf, 0, len);
-                    }
-                } catch (Exception e) {
-                    LOG.debug("read/write failed, reason: " + e.getLocalizedMessage());
-                    try {
-                        if (!receiveSocket.isClosed()) {
-                            // for halfClose, on read/write failure if we close the
-                            // remote end will see a close at the same time.
-                            close();
-                        }
-                    } catch (Exception ignore) {
-                    }
-                }
-            }
-        }
-    }
-
-    public class Acceptor implements Runnable {
-
-        private ServerSocket socket;
-        private URI target;
-        private AtomicReference<CountDownLatch> pause = new AtomicReference<CountDownLatch>();
-
-
-        public Acceptor(ServerSocket serverSocket, URI uri) {
-            socket = serverSocket;
-            target = uri;
-            pause.set(new CountDownLatch(0));
-            try {
-                socket.setSoTimeout(ACCEPT_TIMEOUT_MILLIS);
-            } catch (SocketException e) {
-                e.printStackTrace();
-            }
-        }
-
-        public void pause() {
-            pause.set(new CountDownLatch(1));
-        }
-        
-        public void goOn() {
-            pause.get().countDown();
-        }
-
-        public void run() {
-            try {
-                while(!socket.isClosed()) {
-                    pause.get().await();
-                    try {
-                        Socket source = socket.accept();
-                        pause.get().await();
-                        if (receiveBufferSize > 0) {
-                            source.setReceiveBufferSize(receiveBufferSize);
-                        }
-                        LOG.info("accepted " + source + ", receiveBufferSize:" + source.getReceiveBufferSize());
-                        synchronized(connections) {
-                            connections.add(new Bridge(source, target));
-                        }
-                    } catch (SocketTimeoutException expected) {
-                    }
-                }
-            } catch (Exception e) {
-                LOG.debug("acceptor: finished for reason: " + e.getLocalizedMessage());
-            }
-        }
-        
-        public void close() {
-            try {
-                socket.close();
-                closed.countDown();
-                goOn();
-            } catch (IOException ignored) {
-            }
-        }
-    }
-
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/URISupportTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/URISupportTest.java
deleted file mode 100644
index 3a98c1f..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/URISupportTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * 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.util;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-import org.apache.activemq.util.URISupport.CompositeData;
-
-/**
- *
- * 
- */
-public class URISupportTest extends TestCase {
-    
-    public void testEmptyCompositePath() throws Exception {
-        CompositeData data = URISupport.parseComposite(new URI("broker:()/localhost?persistent=false"));
-        assertEquals(0, data.getComponents().length);        
-    }
-            
-    public void testCompositePath() throws Exception {
-        CompositeData data = URISupport.parseComposite(new URI("test:(path)/path"));
-        assertEquals("path", data.getPath());        
-        data = URISupport.parseComposite(new URI("test:path"));
-        assertNull(data.getPath());
-    }
-
-    public void testSimpleComposite() throws Exception {
-        CompositeData data = URISupport.parseComposite(new URI("test:part1"));
-        assertEquals(1, data.getComponents().length);
-    }
-
-    public void testComposite() throws Exception {
-        CompositeData data = URISupport.parseComposite(new URI("test:(part1://host,part2://(sub1://part,sube2:part))"));
-        assertEquals(2, data.getComponents().length);
-    }
-
-    
-    public void testCompositeWithComponentParam() throws Exception {
-        CompositeData data = URISupport.parseComposite(new URI("test:(part1://host?part1=true)?outside=true"));
-        assertEquals(1, data.getComponents().length);
-        assertEquals(1, data.getParameters().size());
-        Map part1Params = URISupport.parseParameters(data.getComponents()[0]);
-        assertEquals(1, part1Params.size());
-        assertTrue(part1Params.containsKey("part1"));
-    }
-    
-    public void testParsingURI() throws Exception {
-        URI source = new URI("tcp://localhost:61626/foo/bar?cheese=Edam&x=123");
-        
-        Map map = URISupport.parseParameters(source);
-    
-        assertEquals("Size: " + map, 2, map.size());
-        assertMapKey(map, "cheese", "Edam");
-        assertMapKey(map, "x", "123");
-        
-        URI result = URISupport.removeQuery(source);
-        
-        assertEquals("result", new URI("tcp://localhost:61626/foo/bar"), result);
-    }
-    
-    protected void assertMapKey(Map map, String key, Object expected) {
-        assertEquals("Map key: " + key, map.get(key), expected);
-    }
-    
-    public void testParsingCompositeURI() throws URISyntaxException {
-        CompositeData data = URISupport.parseComposite(new URI("broker://(tcp://localhost:61616)?name=foo"));
-        assertEquals("one component", 1, data.getComponents().length);
-        assertEquals("Size: " + data.getParameters(), 1, data.getParameters().size());
-    }
-    
-    public void testCheckParenthesis() throws Exception {
-        String str = "fred:(((ddd))";
-        assertFalse(URISupport.checkParenthesis(str));
-        str += ")";
-        assertTrue(URISupport.checkParenthesis(str));
-    }
-    
-    public void testCreateWithQuery() throws Exception {
-        URI source = new URI("vm://localhost");
-        URI dest = URISupport.createURIWithQuery(source, "network=true&one=two");
-        
-        assertEquals("correct param count", 2, URISupport.parseParameters(dest).size());
-        assertEquals("same uri, host", source.getHost(), dest.getHost());
-        assertEquals("same uri, scheme", source.getScheme(), dest.getScheme());
-        assertFalse("same uri, ssp", dest.getQuery().equals(source.getQuery()));
-    }
-    
-    public void testParsingParams() throws Exception {
-        URI uri = new URI("static:(http://localhost:61617?proxyHost=jo&proxyPort=90)?proxyHost=localhost&proxyPort=80");
-        Map<String,String>parameters = URISupport.parseParameters(uri);
-        verifyParams(parameters);
-        uri = new URI("static://http://localhost:61617?proxyHost=localhost&proxyPort=80");
-        parameters = URISupport.parseParameters(uri);
-        verifyParams(parameters);
-        uri = new URI("http://0.0.0.0:61616");
-        parameters = URISupport.parseParameters(uri);
-    }
-    
-    public void testCompositeCreateURIWithQuery() throws Exception {
-    	String queryString = "query=value";
-    	URI originalURI = new URI("outerscheme:(innerscheme:innerssp)");
-    	URI querylessURI = originalURI;
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, null));
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, ""));
-    	assertEquals(new URI(querylessURI + "?" + queryString), URISupport.createURIWithQuery(originalURI, queryString));
-    	originalURI = new URI("outerscheme:(innerscheme:innerssp)?outerquery=0");
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, null));
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, ""));
-    	assertEquals(new URI(querylessURI + "?" + queryString), URISupport.createURIWithQuery(originalURI, queryString));
-    	originalURI = new URI("outerscheme:(innerscheme:innerssp?innerquery=0)");
-    	querylessURI = originalURI;
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, null));
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, ""));
-    	assertEquals(new URI(querylessURI + "?" + queryString), URISupport.createURIWithQuery(originalURI, queryString));
-    	originalURI = new URI("outerscheme:(innerscheme:innerssp?innerquery=0)?outerquery=0");
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, null));
-    	assertEquals(querylessURI, URISupport.createURIWithQuery(originalURI, ""));
-    	assertEquals(new URI(querylessURI + "?" + queryString), URISupport.createURIWithQuery(originalURI, queryString));
-    }
-
-    public void testApplyParameters() throws Exception {
-
-        URI uri = new URI("http://0.0.0.0:61616");
-        Map<String,String> parameters = new HashMap<String, String>();
-        parameters.put("t.proxyHost", "localhost");
-        parameters.put("t.proxyPort", "80");
-
-        uri = URISupport.applyParameters(uri, parameters);
-        Map<String,String> appliedParameters = URISupport.parseParameters(uri);
-        assertEquals("all params applied  with no prefix", 2, appliedParameters.size());
-
-        // strip off params again
-        uri = URISupport.createURIWithQuery(uri, null);
-
-        uri = URISupport.applyParameters(uri, parameters, "joe");
-        appliedParameters = URISupport.parseParameters(uri);
-        assertTrue("no params applied as none match joe", appliedParameters.isEmpty());
-
-        uri = URISupport.applyParameters(uri, parameters, "t.");
-        verifyParams(URISupport.parseParameters(uri));
-    }
-    
-    private void verifyParams(Map<String,String> parameters) {
-        assertEquals(parameters.get("proxyHost"), "localhost");
-        assertEquals(parameters.get("proxyPort"), "80");
-    }
-    
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/util/Wait.java b/trunk/activemq-core/src/test/java/org/apache/activemq/util/Wait.java
deleted file mode 100644
index 7756d5e..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/util/Wait.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.util;
-
-
-public class Wait {
-    
-    public static final long MAX_WAIT_MILLIS = 30*1000;
-    
-    public interface Condition {
-        boolean isSatisified() throws Exception;
-    }
-
-    public static boolean waitFor(Condition condition) throws Exception {
-        return waitFor(condition, MAX_WAIT_MILLIS);
-    }
-    
-    public static boolean waitFor(final Condition condition, final long duration) throws Exception {
-        final long expiry = System.currentTimeMillis() + duration;
-        boolean conditionSatisified = condition.isSatisified();
-        while (!conditionSatisified && System.currentTimeMillis() < expiry) {
-            Thread.sleep(1000);
-            conditionSatisified = condition.isSatisified();
-        }   
-        return conditionSatisified;
-    }  
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/ConnectorXBeanConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/ConnectorXBeanConfigTest.java
deleted file mode 100644
index 2313e9d..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/ConnectorXBeanConfigTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.xbean;
-
-import java.net.URI;
-import java.util.List;
-
-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.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.network.NetworkConnector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ConnectorXBeanConfigTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ConnectorXBeanConfigTest.class);
-    protected BrokerService brokerService;
-
-    public void testConnectorConfiguredCorrectly() throws Exception {
-
-        TransportConnector connector = (TransportConnector)brokerService.getTransportConnectors().get(0);
-
-        assertEquals(new URI("tcp://localhost:61636"), connector.getUri());
-        assertTrue(connector.getTaskRunnerFactory() == brokerService.getTaskRunnerFactory());
-
-        NetworkConnector netConnector = (NetworkConnector)brokerService.getNetworkConnectors().get(0);
-        List excludedDestinations = netConnector.getExcludedDestinations();
-        assertEquals(new ActiveMQQueue("exclude.test.foo"), excludedDestinations.get(0));
-        assertEquals(new ActiveMQTopic("exclude.test.bar"), excludedDestinations.get(1));
-
-        List dynamicallyIncludedDestinations = netConnector.getDynamicallyIncludedDestinations();
-        assertEquals(new ActiveMQQueue("include.test.foo"), dynamicallyIncludedDestinations.get(0));
-        assertEquals(new ActiveMQTopic("include.test.bar"), dynamicallyIncludedDestinations.get(1));
-
-    }
-    
-    public void testBrokerRestartIsAllowed() throws Exception {
-    	brokerService.stop();
-    	brokerService.waitUntilStopped();
-    
-    	// redundant start is now ignored
-    	brokerService.start();
-    }
-    
-    public void testForceBrokerRestart() throws Exception {
-    	brokerService.stop();
-    	brokerService.waitUntilStopped();
-    	
-    	brokerService.start(true); // force restart
-    	brokerService.waitUntilStarted();
-    	
-    	LOG.info("try and connect to restarted broker");
-    	//send and receive a message from a restarted broker
-    	ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61636");
-    	Connection conn = factory.createConnection();
-    	Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    	Destination dest = new ActiveMQQueue("test");
-    	MessageProducer producer = sess.createProducer(dest);
-    	MessageConsumer consumer = sess.createConsumer(dest);
-    	producer.send(sess.createTextMessage("test"));
-    	TextMessage msg = (TextMessage)consumer.receive(1000);
-    	assertEquals("test", msg.getText());
-    }
-
-
-    protected void setUp() throws Exception {
-        brokerService = createBroker();
-        brokerService.start();
-    }
-
-    protected void tearDown() throws Exception {
-        if (brokerService != null) {
-            brokerService.stop();
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        String uri = "org/apache/activemq/xbean/connector-test.xml";
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/JDBCPersistenceXBeanConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/JDBCPersistenceXBeanConfigTest.java
deleted file mode 100644
index b1b1701..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/JDBCPersistenceXBeanConfigTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.xbean;
-
-import java.net.URI;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-
-/**
- * 
- */
-public class JDBCPersistenceXBeanConfigTest extends TestCase {
-
-    protected BrokerService brokerService;
-
-    public void testManagmentContextConfiguredCorrectly() throws Exception {
-
-        PersistenceAdapter persistenceAdapter = brokerService.getPersistenceAdapter();
-        assertNotNull(persistenceAdapter);
-        assertTrue(persistenceAdapter instanceof JDBCPersistenceAdapter);
-
-        JDBCPersistenceAdapter jpa = (JDBCPersistenceAdapter)persistenceAdapter;
-        assertEquals("BROKER1.", jpa.getStatements().getTablePrefix());
-
-    }
-
-    protected void setUp() throws Exception {
-        brokerService = createBroker();
-        brokerService.start();
-    }
-
-    protected void tearDown() throws Exception {
-        if (brokerService != null) {
-            brokerService.stop();
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        String uri = "org/apache/activemq/xbean/jdbc-persistence-test.xml";
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/ManagementContextXBeanConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/ManagementContextXBeanConfigTest.java
deleted file mode 100644
index 04a3870..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/ManagementContextXBeanConfigTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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.xbean;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.util.JMXSupport;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import junit.framework.TestCase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ManagementContextXBeanConfigTest extends TestCase {
-
-    protected BrokerService brokerService;
-    private static final transient Logger LOG = LoggerFactory.getLogger(ManagementContextXBeanConfigTest.class);
-
-    public void testManagmentContextConfiguredCorrectly() throws Exception {
-        assertEquals(2011, brokerService.getManagementContext().getConnectorPort());
-        assertEquals("test.domain", brokerService.getManagementContext().getJmxDomainName());
-        // Make sure the broker is registered in the right jmx domain.
-        Hashtable<String, String> map = new Hashtable<String, String>();
-        map.put("Type", "Broker");
-        map.put("BrokerName", JMXSupport.encodeObjectNamePart("localhost"));
-        ObjectName on = new ObjectName("test.domain", map);
-        Object value = brokerService.getManagementContext().getAttribute(on, "TotalEnqueueCount");
-        assertNotNull(value);
-    }
-
-    public void testSuccessAuthentication() throws Exception {
-        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi");
-        Map env = new HashMap();
-        env.put(JMXConnector.CREDENTIALS, new String[]{"admin", "activemq"});
-        JMXConnector connector = JMXConnectorFactory.connect(url, env);
-        assertAuthentication(connector);
-    }
-
-    public void testFailAuthentication() throws Exception {
-        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi");
-        try {
-            JMXConnector connector = JMXConnectorFactory.connect(url, null);
-            assertAuthentication(connector);
-        } catch (SecurityException e) {
-            return;
-        }
-        fail("Should have thrown an exception");
-    }
-
-    public void assertAuthentication(JMXConnector connector) throws Exception {
-        connector.connect();
-        MBeanServerConnection connection = connector.getMBeanServerConnection();
-        ObjectName name = new ObjectName("test.domain:BrokerName=localhost,Type=Broker");
-        BrokerViewMBean mbean = (BrokerViewMBean) MBeanServerInvocationHandler
-                .newProxyInstance(connection, name, BrokerViewMBean.class, true);
-        LOG.info("Broker " + mbean.getBrokerId() + " - " + mbean.getBrokerName());
-    }
-
-    protected void setUp() throws Exception {
-        brokerService = createBroker();
-        brokerService.start();
-    }
-
-    protected void tearDown() throws Exception {
-        if (brokerService != null) {
-            brokerService.stop();
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        String uri = "org/apache/activemq/xbean/management-context-test.xml";
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerAndPersistenceTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerAndPersistenceTest.java
deleted file mode 100644
index 5397dc2..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerAndPersistenceTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.xbean;
-
-/**
- *
- * 
- */
-public class MultipleTestsWithEmbeddedBrokerAndPersistenceTest extends MultipleTestsWithEmbeddedBrokerTest {
-
-    protected boolean isPersistent() {
-        return true;
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java
deleted file mode 100644
index ef7909b..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.xbean;
-
-import javax.jms.Connection;
-
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.test.retroactive.RetroactiveConsumerWithMessageQueryTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * @author Neil Clayton
- * 
- */
-public class MultipleTestsWithEmbeddedBrokerTest extends EmbeddedBrokerTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(MultipleTestsWithEmbeddedBrokerTest.class);
-
-    protected Connection connection;
-
-    public void test1() throws Exception {
-    }
-
-    public void test2() throws Exception {
-    }
-
-    protected void setUp() throws Exception {
-        LOG.info("### starting up the test case: " + getName());
-
-        super.setUp();
-        connection = connectionFactory.createConnection();
-        connection.start();
-        LOG.info("### started up the test case: " + getName());
-    }
-
-    protected void tearDown() throws Exception {
-        connection.close();
-
-        super.tearDown();
-
-        LOG.info("### closed down the test case: " + getName());
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java
deleted file mode 100644
index 8017abd..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.xbean;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * 
- * @author Neil Clayton
- * 
- */
-public class MultipleTestsWithSpringFactoryBeanTest extends TestCase {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(MultipleTestsWithSpringFactoryBeanTest.class);
-    
-    protected AbstractApplicationContext context;
-    protected BrokerService service;
-    private Connection connection;
-
-    public void test1() throws Exception {
-    }
-    
-    public void test2() throws Exception {
-    }
-    
-    protected void setUp() throws Exception {
-        LOG.info("### starting up the test case: " + getName());
-        
-        super.setUp();
-        context = new ClassPathXmlApplicationContext("org/apache/activemq/xbean/spring2.xml");
-        service = (BrokerService) context.getBean("broker");
-        
-        // already started
-        service.start();
-        
-        connection = createConnectionFactory().createConnection();
-        connection.start();
-        LOG.info("### started up the test case: " + getName());
-    }
-
-    protected void tearDown() throws Exception {
-        connection.close();
-        
-        // stopped as part of the context
-        service.stop();
-        context.close();
-        super.tearDown();
-        
-        LOG.info("### closed down the test case: " + getName());
-    }
-
-    protected ConnectionFactory createConnectionFactory() {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
-        factory.setBrokerURL("vm://localhost");
-        return factory;
-    }
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringXBeanFactoryBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringXBeanFactoryBeanTest.java
deleted file mode 100644
index 2526314..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringXBeanFactoryBeanTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.xbean;
-
-import org.apache.activemq.broker.BrokerService;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * 
- */
-public class MultipleTestsWithSpringXBeanFactoryBeanTest extends MultipleTestsWithEmbeddedBrokerTest {
-
-    private ClassPathXmlApplicationContext context;
-
-    protected BrokerService createBroker() throws Exception {
-        context = new ClassPathXmlApplicationContext("org/apache/activemq/xbean/spring2.xml");
-        return  (BrokerService) context.getBean("broker");
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (context != null) {
-            context.destroy();
-        }
-    }
-
-    
-
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithXBeanFactoryBeanTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithXBeanFactoryBeanTest.java
deleted file mode 100644
index f6b1507..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithXBeanFactoryBeanTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.xbean;
-
-import org.apache.activemq.broker.BrokerService;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- * 
- */
-public class MultipleTestsWithXBeanFactoryBeanTest extends MultipleTestsWithEmbeddedBrokerTest {
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerFactoryBean factory = new BrokerFactoryBean();
-        factory.setConfig(new ClassPathResource("org/apache/activemq/xbean/activemq2.xml"));
-        factory.afterPropertiesSet();
-        return factory.getBroker();
-    }
-
-
-}
-
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java
deleted file mode 100644
index e1e66ab..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.xbean;
-
-import java.net.URI;
-import junit.framework.TestCase;
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.broker.region.policy.DispatchPolicy;
-import org.apache.activemq.broker.region.policy.LastImageSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy;
-import org.apache.activemq.broker.region.policy.StrictOrderDispatchPolicy;
-import org.apache.activemq.broker.region.policy.SubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.TimedSubscriptionRecoveryPolicy;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class XBeanConfigTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(XBeanConfigTest.class);
-
-    protected BrokerService brokerService;
-    protected Broker broker;
-    protected ConnectionContext context;
-    protected ConnectionInfo info;
-
-    public void testBrokerConfiguredCorrectly() throws Exception {
-
-        // Validate the system properties are being evaluated in xbean.
-        assertEquals("testbroker", brokerService.getBrokerName());
-
-        Topic topic = (Topic)broker.addDestination(context, new ActiveMQTopic("FOO.BAR"),true);
-        DispatchPolicy dispatchPolicy = topic.getDispatchPolicy();
-        assertTrue("dispatchPolicy should be RoundRobinDispatchPolicy: " + dispatchPolicy, dispatchPolicy instanceof RoundRobinDispatchPolicy);
-
-        SubscriptionRecoveryPolicy subscriptionRecoveryPolicy = topic.getSubscriptionRecoveryPolicy();
-        assertTrue("subscriptionRecoveryPolicy should be LastImageSubscriptionRecoveryPolicy: " + subscriptionRecoveryPolicy,
-                   subscriptionRecoveryPolicy instanceof LastImageSubscriptionRecoveryPolicy);
-
-        LOG.info("destination: " + topic);
-        LOG.info("dispatchPolicy: " + dispatchPolicy);
-        LOG.info("subscriptionRecoveryPolicy: " + subscriptionRecoveryPolicy);
-
-        topic = (Topic)broker.addDestination(context, new ActiveMQTopic("ORDERS.BOOKS"),true);
-        dispatchPolicy = topic.getDispatchPolicy();
-        assertTrue("dispatchPolicy should be StrictOrderDispatchPolicy: " + dispatchPolicy, dispatchPolicy instanceof StrictOrderDispatchPolicy);
-
-        subscriptionRecoveryPolicy = topic.getSubscriptionRecoveryPolicy();
-        assertTrue("subscriptionRecoveryPolicy should be TimedSubscriptionRecoveryPolicy: " + subscriptionRecoveryPolicy,
-                   subscriptionRecoveryPolicy instanceof TimedSubscriptionRecoveryPolicy);
-        TimedSubscriptionRecoveryPolicy timedSubcriptionPolicy = (TimedSubscriptionRecoveryPolicy)subscriptionRecoveryPolicy;
-        assertEquals("getRecoverDuration()", 60000, timedSubcriptionPolicy.getRecoverDuration());
-
-        LOG.info("destination: " + topic);
-        LOG.info("dispatchPolicy: " + dispatchPolicy);
-        LOG.info("subscriptionRecoveryPolicy: " + subscriptionRecoveryPolicy);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        System.setProperty("brokername", "testbroker");
-        brokerService = createBroker();
-        broker = brokerService.getBroker();
-
-        // started automatically
-        // brokerService.start();
-
-        context = new ConnectionContext();
-        context.setBroker(broker);
-        info = new ConnectionInfo();
-        info.setClientId("James");
-        info.setUserName("James");
-        info.setConnectionId(new ConnectionId("1234"));
-
-        try {
-            broker.addConnection(context, info);
-        } catch (Throwable e) {
-            e.printStackTrace();
-            fail(e.getMessage());
-        }
-
-        assertNotNull("No broker created!");
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (brokerService != null) {
-            brokerService.stop();
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        String uri = "org/apache/activemq/xbean/activemq-policy.xml";
-        LOG.info("Loading broker configuration from the classpath with URI: " + uri);
-        return BrokerFactory.createBroker(new URI("xbean:" + uri));
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanStartFalseTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanStartFalseTest.java
deleted file mode 100644
index 13f5064..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanStartFalseTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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.xbean;
-
-import java.net.URI;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-
-public class XBeanStartFalseTest extends TestCase {
-    
-    public void testStartFalse() throws Exception {
-        BrokerService broker = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/xbean/activemq2.xml"));
-        assertFalse("Broker is started", broker.isStarted());
-    }
-
-}
diff --git a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanXmlTest.java b/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanXmlTest.java
deleted file mode 100755
index 3a98114..0000000
--- a/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanXmlTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.xbean;
-
-import org.apache.activemq.broker.SpringTest;
-
-public class XBeanXmlTest extends SpringTest {
-
-    public void testSenderWithSpringXml() throws Exception {
-        assertSenderConfig("org/apache/activemq/xbean/spring.xml");
-    }
-}
diff --git a/trunk/activemq-core/src/test/resources/META-INF/LICENSE b/trunk/activemq-core/src/test/resources/META-INF/LICENSE
deleted file mode 100755
index 6b0b127..0000000
--- a/trunk/activemq-core/src/test/resources/META-INF/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 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.
-
diff --git a/trunk/activemq-core/src/test/resources/META-INF/NOTICE b/trunk/activemq-core/src/test/resources/META-INF/NOTICE
deleted file mode 100644
index 6860153..0000000
--- a/trunk/activemq-core/src/test/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,12 +0,0 @@
-=========================================================================
-==  NOTICE file corresponding to the section 4 d of                    ==
-==  the Apache License, Version 2.0,                                   ==
-==  in this case for the Apache ActiveMQ distribution.                 ==
-=========================================================================
-
-Apache ActiveMQ
-Copyright 2005-2006 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/trunk/activemq-core/src/test/resources/META-INF/services/org/apache/activemq/transport/tcpfaulty b/trunk/activemq-core/src/test/resources/META-INF/services/org/apache/activemq/transport/tcpfaulty
deleted file mode 100644
index 2c5278f..0000000
--- a/trunk/activemq-core/src/test/resources/META-INF/services/org/apache/activemq/transport/tcpfaulty
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.tcp.TcpFaultyTransportFactory
diff --git a/trunk/activemq-core/src/test/resources/activemq-browse.properties b/trunk/activemq-core/src/test/resources/activemq-browse.properties
deleted file mode 100644
index 36559c7..0000000
--- a/trunk/activemq-core/src/test/resources/activemq-browse.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# Remote addresses for the other brokers in mesh
-
-
-# 1a
-1a.name=1a-nc
-1a.uri=failover:(tcp://localhost:6106)?randomize=false
-1a.transport=tcp://localhost:6106
-1a.jmx=1090
-1a.data=target/data/1a_store
-
-# 1b
-1b.name=1b-nc
-1b.uri=failover:(tcp://localhost:6107)?randomize=false
-1b.transport=tcp://localhost:6107
-1b.jmx=1091
-1b.data=target/data/1b_store
-
-# 2a
-2a.name=2a-nc
-2a.uri=failover:(tcp://localhost:6108)?randomize=false
-2a.transport=tcp://localhost:6108
-2a.jmx=1092
-2a.data=target/data/2a_store
-
-# 2b
-2b.name=2b-nc
-2b.uri=failover:(tcp://localhost:6109)?randomize=false
-2b.transport=tcp://localhost:6109
-2b.jmx=1093
-2b.data=target/data/2b_store
-
-# 3a
-3a.name=3a-nc
-3a.uri=failover:(tcp://localhost:6110)?randomize=false
-3a.transport=tcp://localhost:6110
-3a.jmx=1094
-3a.data=target/data/3a_store
-
-# 3b
-3b.name=3b-nc
-3b.uri=failover:(tcp://localhost:6111)?randomize=false
-3b.transport=tcp://localhost:6111
-3b.jmx=1095
-3b.data=target/data/3b_store
diff --git a/trunk/activemq-core/src/test/resources/activemq.xml b/trunk/activemq-core/src/test/resources/activemq.xml
deleted file mode 100755
index 0434580..0000000
--- a/trunk/activemq-core/src/test/resources/activemq.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
- 
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="false"  xmlns="http://activemq.apache.org/schema/core" persistent="false">
-  
-    <networkConnectors>
-      <networkConnector uri="multicast://default"/>
-    </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default"/>
-    </transportConnectors>
-        
-  </broker>
-  
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/client.keystore b/trunk/activemq-core/src/test/resources/client.keystore
deleted file mode 100755
index 8580672..0000000
--- a/trunk/activemq-core/src/test/resources/client.keystore
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/credentials.properties b/trunk/activemq-core/src/test/resources/credentials.properties
deleted file mode 100644
index 86f7199..0000000
--- a/trunk/activemq-core/src/test/resources/credentials.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# Defines credentials that will be used by components (like web console) to access the broker
-
-activemq.username=system
-#activemq.password=manager
-activemq.password=ENC(mYRkg+4Q4hua1kvpCCI2hg==)
-#guest.password=password
-guest.password=ENC(Cf3Jf3tM+UrSOoaKU50od5CuBa8rxjoL)
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/dummy.keystore b/trunk/activemq-core/src/test/resources/dummy.keystore
deleted file mode 100644
index 9f705e5..0000000
--- a/trunk/activemq-core/src/test/resources/dummy.keystore
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/jmx.access b/trunk/activemq-core/src/test/resources/jmx.access
deleted file mode 100644
index 4625b7d..0000000
--- a/trunk/activemq-core/src/test/resources/jmx.access
+++ /dev/null
@@ -1,18 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-admin readwrite
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/jmx.password b/trunk/activemq-core/src/test/resources/jmx.password
deleted file mode 100644
index 053aa65..0000000
--- a/trunk/activemq-core/src/test/resources/jmx.password
+++ /dev/null
@@ -1,18 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-admin activemq
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/jndi.properties b/trunk/activemq-core/src/test/resources/jndi.properties
deleted file mode 100755
index d627de9..0000000
--- a/trunk/activemq-core/src/test/resources/jndi.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost
-
-# use the following property to specify the JNDI name the connection factory
-# should appear as. 
-#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.MyQueue = example.MyQueue
-
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-topic.MyTopic = example.MyTopic
-
-# END SNIPPET: jndi
diff --git a/trunk/activemq-core/src/test/resources/log4j.properties b/trunk/activemq-core/src/test/resources/log4j.properties
deleted file mode 100755
index 8fa2f62..0000000
--- a/trunk/activemq-core/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.broker.scheduler=DEBUG
-#log4j.logger.org.apache.activemq.network.DemandForwardingBridgeSupport=DEBUG
-#log4j.logger.org.apache.activemq=TRACE
-#log4j.logger.org.apache.activemq.store.jdbc=TRACE
-#log4j.logger.org.apache.activemq.broker.region.cursors.AbstractStoreCursor=DEBUG
-#log4j.logger.org.apache.activemq.store.jdbc.JDBCMessageStore=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
-#log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{activemq.broker} %-20.20X{activemq.connector} %-10.10X{activemq.destination} - %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.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{activemq.broker} %-20.20X{activemq.connector} %-10.10X{activemq.destination} - %m%n
-log4j.appender.out.file=target/activemq-test.log
-log4j.appender.out.append=true
diff --git a/trunk/activemq-core/src/test/resources/login.config b/trunk/activemq-core/src/test/resources/login.config
deleted file mode 100644
index 6f669f7..0000000
--- a/trunk/activemq-core/src/test/resources/login.config
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.
- */
-activemq-domain {
-    org.apache.activemq.jaas.PropertiesLoginModule required
-        debug=true
-        org.apache.activemq.jaas.properties.user="org/apache/activemq/security/users.properties"
-        org.apache.activemq.jaas.properties.group="org/apache/activemq/security/groups.properties";
-};
-
-activemq-guest-domain {
-    org.apache.activemq.jaas.PropertiesLoginModule sufficient
-        debug=true
-        org.apache.activemq.jaas.properties.user="org/apache/activemq/security/users.properties"
-        org.apache.activemq.jaas.properties.group="org/apache/activemq/security/groups.properties";
-    org.apache.activemq.jaas.GuestLoginModule sufficient
-       debug=true
-       org.apache.activemq.jaas.guest.user="guest"
-       org.apache.activemq.jaas.guest.group="guests";
-};
-
-activemq-guest-when-no-creds-only-domain {
-    org.apache.activemq.jaas.GuestLoginModule sufficient
-       debug=true
-       credentialsInvalidate=true
-       org.apache.activemq.jaas.guest.user="guest"
-       org.apache.activemq.jaas.guest.group="guests";
-
-    org.apache.activemq.jaas.PropertiesLoginModule requisite
-        debug=true
-        org.apache.activemq.jaas.properties.user="org/apache/activemq/security/users.properties"
-        org.apache.activemq.jaas.properties.group="org/apache/activemq/security/groups.properties";
-};
-
-cert-login {
-    org.apache.activemq.jaas.TextFileCertificateLoginModule required
-        debug=true
-        org.apache.activemq.jaas.textfiledn.user="org/apache/activemq/security/users.properties"
-        org.apache.activemq.jaas.textfiledn.group="org/apache/activemq/security/groups.properties";
-
-};
-
-broker1 {
-    org.apache.activemq.jaas.TextFileCertificateLoginModule required
-        debug=true
-        org.apache.activemq.jaas.textfiledn.user="org/apache/activemq/security/users1.properties"
-        org.apache.activemq.jaas.textfiledn.group="org/apache/activemq/security/groups.properties";
-};
-
-broker2 {
-    org.apache.activemq.jaas.TextFileCertificateLoginModule required
-        debug=true
-        org.apache.activemq.jaas.textfiledn.user="org/apache/activemq/security/users2.properties"
-        org.apache.activemq.jaas.textfiledn.group="org/apache/activemq/security/groups.properties";
-};
diff --git a/trunk/activemq-core/src/test/resources/openwire-control/org.apache.activemq.openwire.BrokerInfoData.bin b/trunk/activemq-core/src/test/resources/openwire-control/org.apache.activemq.openwire.BrokerInfoData.bin
deleted file mode 100644
index 9588069..0000000
--- a/trunk/activemq-core/src/test/resources/openwire-control/org.apache.activemq.openwire.BrokerInfoData.bin
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/openwire-control/org.apache.activemq.openwire.WireFormatInfoData.bin b/trunk/activemq-core/src/test/resources/openwire-control/org.apache.activemq.openwire.WireFormatInfoData.bin
deleted file mode 100644
index 1012106..0000000
--- a/trunk/activemq-core/src/test/resources/openwire-control/org.apache.activemq.openwire.WireFormatInfoData.bin
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/destinations-on-start.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/destinations-on-start.xml
deleted file mode 100644
index f0ee482..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/destinations-on-start.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <broker xmlns="http://activemq.apache.org/schema/core">
-    <destinations>
-      <queue physicalName="FOO.BAR" />
-      <topic physicalName="SOME.TOPIC" />
-    </destinations>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/exclusive-consumer-startup-destination.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/exclusive-consumer-startup-destination.xml
deleted file mode 100644
index 5c10b7d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/exclusive-consumer-startup-destination.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <broker xmlns="http://activemq.apache.org/schema/core">
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry queue="TEST.>" allConsumersExclusiveByDefault="true"/>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-    <destinations>
-      <queue physicalName="TEST.QUEUE1"/>
-      <queue physicalName="TEST.QUEUE2"/>
-      <queue physicalName="TEST.QUEUE3"/>
-    </destinations>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/master.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/master.xml
deleted file mode 100755
index 3fbc3d1..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/master.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="master" useJmx="false" deleteAllMessagesOnStartup="true"  xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62001"/>
-    </transportConnectors>
-       
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/sharedFileMaster.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/sharedFileMaster.xml
deleted file mode 100755
index f5eef67..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/sharedFileMaster.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="shared"  useJmx="false" deleteAllMessagesOnStartup="true"  xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62001"/>
-    </transportConnectors>
-       
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/sharedFileSlave.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/sharedFileSlave.xml
deleted file mode 100755
index e4274cb..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/sharedFileSlave.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="shared" useJmx="false"  deleteAllMessagesOnStartup="true"  xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62002"/>
-    </transportConnectors>
-    
-       
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/slave.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/slave.xml
deleted file mode 100755
index a0723a3..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/slave.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="slave" deleteAllMessagesOnStartup="true" useJmx="false" masterConnectorURI="tcp://localhost:62001"  xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62002"/>
-    </transportConnectors>
-    
-       
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/slave2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/slave2.xml
deleted file mode 100755
index 888cade..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/slave2.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <!-- START SNIPPET: example -->
-  <broker brokerName="slave" useJmx="false"  deleteAllMessagesOnStartup="true"  xmlns="http://activemq.apache.org/schema/core">
-  
-    <services>
-      <masterConnector remoteURI= "tcp://localhost:62001" userName="James" password="Cheese"/>
-    </services>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62002"/>
-    </transportConnectors>
-    
-  </broker>
-  <!-- END SNIPPET: example -->
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/out-of-order-broker-elements.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/out-of-order-broker-elements.xml
deleted file mode 100644
index 245d946..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/out-of-order-broker-elements.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library with validation off -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-    <broker xmlns="http://activemq.apache.org/schema/core">
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-        <destinations>
-            <queue physicalName="FOO.BAR"/>
-            <topic physicalName="SOME.TOPIC"/>
-        </destinations>
-
-    </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/policy/cursor.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/policy/cursor.xml
deleted file mode 100644
index d067a2c..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/policy/cursor.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-  
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <!--  lets define the dispatch policy -->
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="org.apache.>" producerFlowControl="false" memoryLimit="1mb">
-            
-            <deadLetterStrategy>
-              <individualDeadLetterStrategy  topicPrefix="Test.DLQ." />
-            </deadLetterStrategy>
-            <dispatchPolicy>
-              <strictOrderDispatchPolicy />
-            </dispatchPolicy>
-            <pendingSubscriberPolicy>
-            	<vmCursor />
-            </pendingSubscriberPolicy>
-          </policyEntry>
-
-          <policyEntry queue="org.apache.>">
-            
-            <deadLetterStrategy>
-              <individualDeadLetterStrategy queuePrefix="Test.DLQ."/>
-            </deadLetterStrategy>
-            <dispatchPolicy>
-              <strictOrderDispatchPolicy />
-            </dispatchPolicy>
-            <pendingQueuePolicy>
-            	<vmQueueCursor />
-            </pendingQueuePolicy>
-          </policyEntry>
-
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/policy/individual-dlq.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/policy/individual-dlq.xml
deleted file mode 100644
index e79ea92..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/policy/individual-dlq.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <!--  lets define the dispatch policy -->
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="org.apache.>">
-            <deadLetterStrategy>
-              <individualDeadLetterStrategy  topicPrefix="Test.DLQ." processNonPersistent="true" />
-            </deadLetterStrategy>
-            <dispatchPolicy>
-              <strictOrderDispatchPolicy />
-            </dispatchPolicy>
-          </policyEntry>
-
-          <policyEntry queue="org.apache.>">
-            <deadLetterStrategy>
-              <individualDeadLetterStrategy queuePrefix="Test.DLQ." processNonPersistent="true"/>
-            </deadLetterStrategy>
-            <dispatchPolicy>
-              <strictOrderDispatchPolicy />
-            </dispatchPolicy>
-          </policyEntry>
-
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/spring.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/spring.xml
deleted file mode 100644
index 7d37217..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/spring.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- START SNIPPET: spring -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <!-- an embedded broker -->
-
-  <bean id="broker" class="org.apache.activemq.broker.BrokerService" 
-    init-method="start">
-    <property name="transportConnectorURIs">
-      <list>
-        <value>tcp://localhost:61616</value>
-        <value>tcp://localhost:61636</value>
-      </list>
-    </property>
-  </bean>
-
-  <!-- JMS ConnectionFactory to use -->
-  <bean id="jmsFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61636" />
-  </bean>
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate"
-    class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean
-        class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref local="jmsFactory" />
-        </property>
-      </bean>
-    </property>
-  </bean>
-  
-  <!-- Spring JMS Template -->
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination" />
-    </property>
-
-    <property name="messageCount">
-      <value>10</value>
-    </property>
-  </bean>
-
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template">
-      <ref bean="consumerJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination" />
-    </property>
-  </bean>
-
-  <bean id="destination" class="org.apache.activemq.command.ActiveMQTopic"
-    autowire="constructor">
-    <constructor-arg>
-      <value>org.apache.activemq.spring.Test.spring.topic</value>
-    </constructor-arg>
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/store/kahabroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/store/kahabroker.xml
deleted file mode 100755
index 4c8254b..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/store/kahabroker.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-    <persistenceAdapter>
-      <kahaPersistenceAdapter dir = "${basedir}/target/activemq-data/kaha-broker.db"  maxDataFileLength = "1024"/>
-    </persistenceAdapter>
-
-     <transportConnectors>
-      <transportConnector uri="tcp://localhost:0"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/store/loadtester.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/store/loadtester.xml
deleted file mode 100755
index 6383e84..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/store/loadtester.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <amq:systemUsage id="memory-manager" >
-    <amq:memoryUsage>
-  	  <amq:memoryUsage limit = "1048576" /> <!--  1 meg limit -->
-  	</amq:memoryUsage>
-  </amq:systemUsage>
-  
-  <broker useJmx="true" deleteAllMessagesOnStartup="true" systemUsage="#memory-manager"  xmlns="http://activemq.apache.org/schema/core">
-  
-    <persistenceFactory>
-      <journalPersistenceAdapterFactory 
-      useQuickJournal="false" journalLogFiles="2" dataDirectory="loadtest"/>
-    </persistenceFactory>
-  
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:0"/>
-    </transportConnectors>
-        
-  </broker>
-  
-  <!-- The Derby Datasource that will be used by the Broker -->
-  <!-- 
-  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource" destroy-method="close">
-    <property name="serverName" value="localhost"/>
-    <property name="databaseName" value="activemq"/>
-    <property name="portNumber" value="0"/>
-    <property name="user" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="dataSourceName" value="postgres"/>
-    <property name="initialConnections" value="1"/>
-    <property name="maxConnections" value="10"/>
-  </bean>
-  -->
-   
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/composite-queue.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/composite-queue.xml
deleted file mode 100644
index ed3bc73..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/composite-queue.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <broker persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-    <destinationInterceptors>
-      <virtualDestinationInterceptor>
-        <virtualDestinations>
-          <compositeQueue name="MY.QUEUE">
-            <forwardTo>
-              <queue physicalName="FOO" />
-              <topic physicalName="BAR" />
-            </forwardTo>
-          </compositeQueue>
-        </virtualDestinations>
-      </virtualDestinationInterceptor>
-    </destinationInterceptors>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/composite-topic.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/composite-topic.xml
deleted file mode 100644
index ded6471..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/composite-topic.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <broker xmlns="http://activemq.apache.org/schema/core">
-    <destinationInterceptors>
-      <virtualDestinationInterceptor>
-        <virtualDestinations>
-          <compositeTopic name="MY.TOPIC">
-            <forwardTo>
-              <queue physicalName="FOO" />
-              <topic physicalName="BAR" />
-            </forwardTo>
-          </compositeTopic>
-        </virtualDestinations>
-      </virtualDestinationInterceptor>
-    </destinationInterceptors>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/filtered-queue.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/filtered-queue.xml
deleted file mode 100644
index d51f03c..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/filtered-queue.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <broker xmlns="http://activemq.apache.org/schema/core">
-    <destinationInterceptors>
-      <virtualDestinationInterceptor>
-        <virtualDestinations>
-          <compositeQueue name="MY.QUEUE">
-            <forwardTo>
-              <filteredDestination selector="odd = 'yes'" queue="FOO"/>
-              <filteredDestination selector="i = 5" topic="BAR"/>
-            </forwardTo>
-          </compositeQueue>
-        </virtualDestinations>
-      </virtualDestinationInterceptor>
-    </destinationInterceptors>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/global-virtual-topics.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/global-virtual-topics.xml
deleted file mode 100644
index ddd0667..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/global-virtual-topics.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <broker xmlns="http://activemq.apache.org/schema/core">
-    <destinationInterceptors>
-      <virtualDestinationInterceptor>
-        <virtualDestinations>
-          <virtualTopic name=">" prefix="VirtualTopicConsumers.*." selectorAware="false"/>
-        </virtualDestinations>
-      </virtualDestinationInterceptor>
-    </destinationInterceptors>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/bugs/amq1095/activemq.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/bugs/amq1095/activemq.xml
deleted file mode 100644
index 5bd11d9..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/bugs/amq1095/activemq.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker brokerName="localhost" xmlns="http://activemq.apache.org/schema/core" persistent="true" deleteAllMessagesOnStartup="true">
-
-    <destinations>
-      <queue physicalName="unused"/>
-      <topic physicalName="activemq.TestTopic"/>
-    </destinations>
-  
-    <persistenceAdapter>
-      <kahaPersistenceAdapter directory="file:target/amq1095" maxDataFileLength="200000"/>
-    </persistenceAdapter>
-
-
-  </broker>
-
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/broker.properties b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/broker.properties
deleted file mode 100644
index 921671f..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/broker.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-# START SNIPPET: example
-useJmx = false
-persistent = false
-brokerName = Cheese
-# END SNIPPET: example
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/config.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/config.xml
deleted file mode 100755
index 9ec13ff..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/config.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker brokerName="brokerXmlConfigHelper" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true" xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61638"/>
-    </transportConnectors>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/example.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/example.xml
deleted file mode 100755
index 0a7a686..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/example.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-    <!-- normal ActiveMQ XML config which is less verbose & can be validated -->
-    <amq:broker brokerName="brokerConfigTest" populateJMSXUserID="false"
-        useLoggingForShutdownErrors="true" useJmx="true"
-        persistent="false" vmConnectorURI="vm://javacoola"
-        useShutdownHook="false" deleteAllMessagesOnStartup="true">
-
-        <!--
-        || NOTE this config file is used for unit testing the configuration mechanism
-        || it is not necessarily a good example of a config file! :)
-        -->
-        <amq:destinationPolicy>
-            <amq:policyMap>
-                <amq:policyEntries>
-
-                    <amq:policyEntry topic="Topic.SimpleDispatch">
-                        <amq:dispatchPolicy><amq:simpleDispatchPolicy /></amq:dispatchPolicy>
-                    </amq:policyEntry>
-
-                    <amq:policyEntry topic="Topic.RoundRobinDispatch">
-                        <amq:dispatchPolicy><amq:roundRobinDispatchPolicy /></amq:dispatchPolicy>
-                    </amq:policyEntry>
-
-                    <amq:policyEntry topic="Topic.StrictOrderDispatch">
-                        <amq:dispatchPolicy><amq:strictOrderDispatchPolicy /></amq:dispatchPolicy>
-                    </amq:policyEntry>
-
-                    <amq:policyEntry topic="Topic.FixedSizedSubs">
-                        <amq:subscriptionRecoveryPolicy>
-                            <amq:fixedSizedSubscriptionRecoveryPolicy maximumSize="2000000" useSharedBuffer="false"/>
-                        </amq:subscriptionRecoveryPolicy>
-                    </amq:policyEntry>
-
-                    <amq:policyEntry topic="Topic.LastImageSubs">
-                        <amq:subscriptionRecoveryPolicy><amq:lastImageSubscriptionRecoveryPolicy/></amq:subscriptionRecoveryPolicy>
-                    </amq:policyEntry>
-
-                    <amq:policyEntry topic="Topic.NoSubs">
-                        <amq:subscriptionRecoveryPolicy><amq:noSubscriptionRecoveryPolicy/></amq:subscriptionRecoveryPolicy>
-                    </amq:policyEntry>
-
-                    <amq:policyEntry topic="Topic.TimedSubs">
-                        <amq:subscriptionRecoveryPolicy><amq:timedSubscriptionRecoveryPolicy recoverDuration="25000"/></amq:subscriptionRecoveryPolicy>
-                    </amq:policyEntry>
-
-                </amq:policyEntries>
-            </amq:policyMap>
-        </amq:destinationPolicy>
-
-        <amq:networkConnectors>
-            <amq:networkConnector uri="static://(tcp://localhost:61616)"/>
-        </amq:networkConnectors>
-
-        <amq:persistenceAdapter>
-            <amq:memoryPersistenceAdapter createTransactionStore="true"/>
-        </amq:persistenceAdapter>
-
-        <amq:systemUsage>
-            <amq:systemUsage>
-	            <amq:memoryUsage>
-    	            <amq:memoryUsage limit="10 mb" percentUsageMinDelta="20"/>
-	            </amq:memoryUsage>
-	            <amq:storeUsage>
-    	            <amq:storeUsage limit="1 gb" name="foo"/>
-	            </amq:storeUsage>
-	            <amq:tempUsage>
-    	            <amq:tempUsage limit="100 mb"/>
-	            </amq:tempUsage>
-            </amq:systemUsage>
-        </amq:systemUsage>
-
-        <amq:transportConnectors>
-            <amq:transportConnector uri="tcp://localhost:61635"/>
-            <amq:transportConnector uri="tcp://localhost:61636"/>
-            <amq:transportConnector uri="tcp://localhost:61637"/>
-        </amq:transportConnectors>
-
-
-    </amq:broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/jdbc-example.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/jdbc-example.xml
deleted file mode 100644
index 078d1e9..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/jdbc-example.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <amq:broker brokerName="brokerJdbcConfigTest" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true">
-
-        <amq:persistenceAdapter>
-            <amq:jdbcPersistenceAdapter>
-                <property name="cleanupPeriod" value="60000"/>
-                <property name="dataSource" ref="embedded-ds"/>
-                <property name="wireFormat">
-                    <bean id="myWireFormat" class="org.apache.activemq.wireformat.ObjectStreamWireFormat"/>
-                </property>
-            </amq:jdbcPersistenceAdapter>
-        </amq:persistenceAdapter>
-
-        <amq:transportConnectors>
-            <amq:transportConnector uri="tcp://localhost:61635"/>
-        </amq:transportConnectors>
-
-    </amq:broker>
-
-    <!-- ==================================================================== -->
-    <!-- JDBC DataSource Configurations -->
-    <!-- ==================================================================== -->
-
-    <!-- The Datasource that will be used by the Broker -->
-    <bean id="embedded-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <property name="databaseName" value="testJdbcConfig"/>
-        <property name="createDatabase" value="create"/>
-    </bean>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/journal-example.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/journal-example.xml
deleted file mode 100644
index 2a79308..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/journal-example.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <amq:broker brokerName="brokerJournalConfigTest" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true">
-
-        <amq:persistenceAdapter>
-            <amq:journalPersistenceAdapter>
-                <amq:journal>
-                    <ref bean="myJournalImpl"/>
-                </amq:journal>
-
-                <amq:persistenceAdapter>
-                    <amq:memoryPersistenceAdapter createTransactionStore="true"/>
-                </amq:persistenceAdapter>
-
-                <amq:taskRunnerFactory>
-                    <bean id="myTaskRunnerFactory" class="org.apache.activemq.thread.TaskRunnerFactory"/>
-                </amq:taskRunnerFactory>
-            </amq:journalPersistenceAdapter>
-        </amq:persistenceAdapter>
-
-        <amq:transportConnectors>
-            <amq:transportConnector uri="tcp://localhost:61635"/>
-        </amq:transportConnectors>
-
-    </amq:broker>
-
-    <!-- The journal implementation that will be used -->
-    <bean id="myJournalImpl" class="org.apache.activeio.journal.active.JournalImpl">
-        <constructor-arg index="0">
-            <bean id="myFile" class="java.io.File">
-                <constructor-arg index="0">
-                    <value>target/test-data/testJournalConfig/journal</value>
-                </constructor-arg>
-            </bean>
-        </constructor-arg>
-    </bean>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/journaledjdbc-example.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/journaledjdbc-example.xml
deleted file mode 100644
index 4a6a0db..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/journaledjdbc-example.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <amq:broker brokerName="brokerJournaledJDBCConfigTest" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true">
-	
-	    <amq:persistenceFactory>
-           <amq:journalPersistenceAdapterFactory journalLogFiles="4" journalLogFileSize="32768" dataDirectory="target/test-data/testJournaledJDBCConfig" />
-        </amq:persistenceFactory>
-        <amq:transportConnectors>
-            <amq:transportConnector uri="tcp://localhost:61635"/>
-        </amq:transportConnectors>
-
-    </amq:broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/memory-example.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/memory-example.xml
deleted file mode 100644
index 10b38a8..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/sample-conf/memory-example.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <amq:broker brokerName="brokerMemoryConfigTest" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true">
-
-        <amq:persistenceAdapter>
-            <amq:memoryPersistenceAdapter createTransactionStore = "true"/>
-        </amq:persistenceAdapter>
-
-        <amq:transportConnectors>
-            <amq:transportConnector uri="tcp://localhost:61635"/>
-        </amq:transportConnectors>
-
-    </amq:broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/spring-test.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/config/spring-test.xml
deleted file mode 100755
index 0e2f145..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/config/spring-test.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-  <bean id="wireFormat" class="org.apache.activemq.io.impl.DefaultWireFormat"/>
-
-  <bean id="transport" factory-method="newInstance" class="org.apache.activemq.transport.TransportServerChannelProvider">
-    <constructor-arg index="0">
-      <bean class="org.apache.activemq.io.impl.DefaultWireFormat"/>
-      <!---
-      <ref bean="wireFormat"/>
-    -->
-    </constructor-arg>
-    <constructor-arg index="1">
-      <value>vm://localhost</value>
-    </constructor-arg>
-  </bean>
-
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/filter/dummyPolicy.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/filter/dummyPolicy.xml
deleted file mode 100644
index 6585986..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/filter/dummyPolicy.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <bean id="policy" class="org.apache.activemq.filter.DummyPolicy">
-    <property name="entries">
-      <list>
-        <bean class="org.apache.activemq.filter.DummyPolicyEntry">
-          <property name="topic" value="FOO.>" />
-          <property name="description" value="Edam" />
-        </bean>
-        <bean class="org.apache.activemq.filter.DummyPolicyEntry">
-          <property name="topic" value="FOO.BAR" />
-          <property name="description" value="Cheddar" />
-        </bean>
-      </list>
-    </property>
-  </bean>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/memory/activemq.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/memory/activemq.xml
deleted file mode 100644
index 511d6d1..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/memory/activemq.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <!-- Allows us to use system properties as variables in this configuration file -->
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-	<property name="location" value="org/apache/activemq/memory/usage.properties"/> 
-  </bean>  
-
-  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${name}" persistent="false">
-   
-    <!-- Use the following to set the broker memory limit -->
-	<systemUsage>
-	    <systemUsage>
-			<memoryUsage>
-		    	<memoryUsage limit="${limit}" percentUsageMinDelta="${delta}"/>
-			</memoryUsage>
-			<storeUsage>
-		    	<storeUsage limit="1 gb" name="foo"/>
-			</storeUsage>
-			<tempUsage>	
-		    	<tempUsage limit="100 mb"/>
-			</tempUsage>
-	    </systemUsage>
-	</systemUsage>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/memory/usage.properties b/trunk/activemq-core/src/test/resources/org/apache/activemq/memory/usage.properties
deleted file mode 100644
index b5d33d1..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/memory/usage.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-limit=1k
-name=test-broker
-delta=34
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/duplexLocalBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/duplexLocalBroker.xml
deleted file mode 100644
index b7af9db..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/duplexLocalBroker.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-<broker brokerName="localBroker" persistent="true" useShutdownHook="false" xmlns="http://activemq.apache.org/schema/core">
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:61617)"
-         duplex="true"
-         dynamicOnly = "false"
-         conduitSubscriptions = "true"
-         decreaseNetworkConsumerPriority = "false">
-
-      	<dynamicallyIncludedDestinations>
-      		<queue physicalName="include.test.foo"/>
-      		<topic physicalName="include.test.bar"/>
-      	</dynamicallyIncludedDestinations>
-
-      	<excludedDestinations>
-      		<queue physicalName="exclude.test.foo"/>
-      		<topic physicalName="exclude.test.bar"/>
-      	</excludedDestinations>
-
-      </networkConnector>
-    </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnectors>
-
-  </broker>
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/queue-config.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/queue-config.xml
deleted file mode 100644
index 8a73068..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/queue-config.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <!-- remote broker -->
-
-  <bean id="remotebroker" class="org.apache.activemq.broker.BrokerService" 
-    init-method="start">
-    <property name="brokerName" value = "remotebroker"/>
-    <property name="persistent" value = "false"/>
-    <property name="transportConnectorURIs">
-      <list>
-        <value>tcp://localhost:61666</value>
-      </list>
-      </property>
-  </bean>
-
-  <!-- JMS ConnectionFactory to use remote -->
-  <bean id="remoteFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61666" />
-  </bean>
-  
-  
-  <!-- local broker with embedded Jms to Jms bridge (ok - it's contrived) -->
-  <bean id="localbroker" class="org.apache.activemq.broker.BrokerService" 
-    init-method="start">
-    <property name="brokerName" value = "localBroker"/>
-      <property name="persistent" value = "false"/>
-    <property name="transportConnectorURIs">
-      <list>
-        <value>tcp://localhost:61234</value>
-      </list>
-    </property>
-    <property name="jmsBridgeConnectors">
-      <list>
-      	<ref bean="jmsConnector"/>
-      </list>
-    </property>
-  </bean>
-  
-  <!-- JMS ConnectionFactory to use local broker (the one with the bridge) -->
-  <bean id="localFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61234" />
-  </bean>
-  
-  <!--JmsQueueConnector - the Jms bridge -->
-  <bean id="jmsConnector"
-  	class="org.apache.activemq.network.jms.JmsQueueConnector">
-  	<property name = "outboundQueueConnectionFactory" ref = "remoteFactory"/>
-  	
-  	<property name = "inboundQueueBridges">
-  	 <list>
-  	  <ref bean="InboundQueueBridge" />
-  	 </list>
-  	 </property>
-
-  </bean>
-
-  <bean id ="InboundQueueBridge" class="org.apache.activemq.network.jms.InboundQueueBridge">
-  	<property name = "inboundQueueName" value = "org.apache.activemq.network.jms.QueueBridgeTest"/>
-  </bean>
-</beans>
-
-
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/queue-xbean.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/queue-xbean.xml
deleted file mode 100644
index 017e89c..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/queue-xbean.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean
-    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <!-- remote broker -->
-
-  <broker xmlns="http://activemq.apache.org/schema/core" id="remotebroker"
-    brokerName="remotebroker" persistent="false">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61666" />
-    </transportConnectors>
-  </broker>
-
-  <!-- local broker with embedded Jms to Jms bridge (ok - it's contrived) -->
-  
-  <!-- START SNIPPET: example -->
-  <broker xmlns="http://activemq.apache.org/schema/core" id="localbroker"
-    brokerName="localBroker" persistent="false">
-
-    <jmsBridgeConnectors>
-      <jmsQueueConnector
-        outboundQueueConnectionFactory="#remoteFactory">
-        <inboundQueueBridges>
-          <inboundQueueBridge
-            inboundQueueName="org.apache.activemq.network.jms.QueueBridgeXBeanTest" />
-        </inboundQueueBridges>
-      </jmsQueueConnector>
-    </jmsBridgeConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61234" />
-    </transportConnectors>
-
-  </broker>
-
-  <!-- JMS ConnectionFactory to use remote -->
-  <bean id="remoteFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61666" />
-  </bean>
-  <!-- END SNIPPET: example -->
-
-  <!-- JMS ConnectionFactory to use local broker (the one with the bridge) -->
-  <bean id="localFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61234" />
-  </bean>
-
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/topic-config.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/topic-config.xml
deleted file mode 100644
index b898750..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/topic-config.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <!-- remote broker -->
-
-  <bean id="remotebroker" class="org.apache.activemq.broker.BrokerService" 
-    init-method="start">
-    <property name="brokerName" value = "remotebroker"/>
-    <property name="persistent" value = "false"/>
-    <property name="transportConnectorURIs">
-      <list>
-        <value>tcp://localhost:61666</value>
-      </list>
-      </property>
-  </bean>
-
-  <!-- JMS ConnectionFactory to use remote -->
-  <bean id="remoteFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61666" />
-  </bean>
-  
-  
-  <!-- local broker with embedded Jms to Jms bridge (ok - it's contrived) -->
-  <bean id="localbroker" class="org.apache.activemq.broker.BrokerService" 
-    init-method="start">
-    <property name="brokerName" value = "localBroker"/>
-      <property name="persistent" value = "false"/>
-    <property name="transportConnectorURIs">
-      <list>
-        <value>tcp://localhost:61234</value>
-      </list>
-    </property>
-    <property name="jmsBridgeConnectors">
-      <list>
-      	<ref bean="jmsConnector"/>
-      </list>
-    </property>
-  </bean>
-  
-  <!-- JMS ConnectionFactory to use local broker (the one with the bridge) -->
-  <bean id="localFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61234" />
-  </bean>
-  
-  <!--JmsTopicConnector - the Jms bridge -->
-  <bean id="jmsConnector"
-  	class="org.apache.activemq.network.jms.JmsTopicConnector">
-  	<property name = "outboundTopicConnectionFactory" ref = "remoteFactory"/>
-  	
-  	<property name = "inboundTopicBridges">
-  	 <list>
-  	  <ref bean="InboundTopicBridge" />
-  	 </list>
-  	 </property>
-
-  </bean>
-
-  <bean id ="InboundTopicBridge" class="org.apache.activemq.network.jms.InboundTopicBridge">
-  	<property name = "inboundTopicName" value = "org.apache.activemq.network.jms.TopicBridgeXBeanTest"/>
-  </bean>
-</beans>
-
-
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/topic-spring.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/topic-spring.xml
deleted file mode 100644
index f94fcd3..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/jms/topic-spring.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <!-- remote broker -->
-
-  <bean id="remotebroker" class="org.apache.activemq.broker.BrokerService" 
-    init-method="start">
-    <property name="brokerName" value = "remotebroker"/>
-    <property name="persistent" value = "false"/>
-    <property name="transportConnectorURIs">
-      <list>
-        <value>tcp://localhost:61666</value>
-      </list>
-      </property>
-  </bean>
-
-  <!-- JMS ConnectionFactory to use remote -->
-  <bean id="remoteFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61666" />
-  </bean>
-  
-  
-  <!-- local broker with embedded Jms to Jms bridge (ok - it's contrived) -->
-  <bean id="localbroker" class="org.apache.activemq.broker.BrokerService" 
-    init-method="start">
-    <property name="brokerName" value = "localBroker"/>
-      <property name="persistent" value = "false"/>
-    <property name="transportConnectorURIs">
-      <list>
-        <value>tcp://localhost:61234</value>
-      </list>
-    </property>
-    <property name="jmsBridgeConnectors">
-      <list>
-      	<ref bean="jmsConnector"/>
-      </list>
-    </property>
-  </bean>
-  
-  <!-- JMS ConnectionFactory to use local broker (the one with the bridge) -->
-  <bean id="localFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61234" />
-  </bean>
-  
-  <!--JmsTopicConnector - the Jms bridge -->
-  <bean id="jmsConnector"
-  	class="org.apache.activemq.network.jms.JmsTopicConnector">
-  	<property name = "outboundTopicConnectionFactory" ref = "remoteFactory"/>
-  	
-  	<property name = "inboundTopicBridges">
-  	 <list>
-  	  <ref bean="InboundTopicBridge" />
-  	 </list>
-  	 </property>
-
-  </bean>
-
-  <bean id ="InboundTopicBridge" class="org.apache.activemq.network.jms.InboundTopicBridge">
-  	<property name = "inboundTopicName" value = "org.apache.activemq.network.jms.TopicBridgeSpringTest"/>
-  </bean>
-</beans>
-
-
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/localBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/localBroker.xml
deleted file mode 100644
index 6689c59..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/localBroker.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-<broker brokerName="localBroker" persistent="true" useShutdownHook="false" monitorConnectionSplits="true" xmlns="http://activemq.apache.org/schema/core">
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:61617)"
-         dynamicOnly = "false"
-         conduitSubscriptions = "true"
-         decreaseNetworkConsumerPriority = "false">
-      	<dynamicallyIncludedDestinations>
-      		<queue physicalName="include.test.foo"/>
-      		<topic physicalName="include.test.bar"/>
-      	</dynamicallyIncludedDestinations>
-      	<excludedDestinations>
-      		<queue physicalName="exclude.test.foo"/>
-      		<topic physicalName="exclude.test.bar"/>
-      	</excludedDestinations>
-      </networkConnector>
-    </networkConnectors>
-    
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnectors>
-    
-  </broker>
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/multicast/localBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/multicast/localBroker.xml
deleted file mode 100644
index 6310b67..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/multicast/localBroker.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  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.
--->
-<beans>
-
-  <broker brokerName="localBroker" persistent="true" useShutdownHook="false" xmlns="http://activemq.apache.org/schema/core">
-    
-    <transportConnectors><transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://224.1.2.6:6123" /></transportConnectors>
-
-    <networkConnectors>
-      <networkConnector uri="multicast://224.1.2.6:6123">
-        <excludedDestinations>
-          <queue physicalName="exclude.test.foo" />
-          <topic physicalName="exclude.test.bar" />
-        </excludedDestinations>
-        <dynamicallyIncludedDestinations>
-          <queue physicalName="include.test.foo" />
-          <topic physicalName="include.test.bar" />
-        </dynamicallyIncludedDestinations>
-      </networkConnector>
-    </networkConnectors>
-  </broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/multicast/remoteBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/multicast/remoteBroker.xml
deleted file mode 100644
index c8e5fac..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/multicast/remoteBroker.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  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.
--->
-<beans>
-
-  <broker brokerName="remoteBroker" persistent="true" useShutdownHook="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <transportConnectors><transportConnector uri="tcp://localhost:61617" discoveryUri="multicast://224.1.2.6:6123" /></transportConnectors>
-
-    <networkConnectors>
-      <networkConnector uri="multicast://224.1.2.6:6123">
-        <excludedDestinations>
-          <queue physicalName="exclude.test.foo" />
-          <topic physicalName="exclude.test.bar" />
-        </excludedDestinations>
-        <dynamicallyIncludedDestinations>
-          <queue physicalName="include.test.foo" />
-          <topic physicalName="include.test.bar" />
-        </dynamicallyIncludedDestinations>
-      </networkConnector>
-    </networkConnectors>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml
deleted file mode 100644
index e7c124e..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker1.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker1" persistent="false" useShutdownHook="false" useJmx="false"  xmlns="http://activemq.apache.org/schema/core">
-
-    <!-- disabling the subscription recovery policy allows us take memory leaks easier -->
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic=">">
-            <subscriptionRecoveryPolicy>
-              <noSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-      </policyEntries></policyMap>
-    </destinationPolicy>
-    
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:61617)"/>
-    </networkConnectors>
-    
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-      <transportConnector uri="vm://broker1"/>
-    </transportConnectors>
-    
-  </broker>
-  
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml
deleted file mode 100644
index 24604d9..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/reconnect-broker2.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker2" persistent="false" useShutdownHook="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <!-- disabling the subscription recovery policy allows us take memory leaks easier -->
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic=">">
-            <subscriptionRecoveryPolicy>
-              <noSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-      </policyEntries></policyMap>
-    </destinationPolicy>
-
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:61616)"/>
-    </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61617"/>
-      <transportConnector uri="vm://broker2"/>
-    </transportConnectors>
-    
-  </broker>
-  
-
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/remoteBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/remoteBroker.xml
deleted file mode 100644
index 4c12218..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/remoteBroker.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="remoteBroker" useJmx="false" persistent="true" useShutdownHook="false" monitorConnectionSplits="true" xmlns="http://activemq.apache.org/schema/core">
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:61616)" />
-      </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61617"/>
-    </transportConnectors>
-  </broker>
-
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml
deleted file mode 100644
index 592fd52..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker1.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker1" persistent="false" useShutdownHook="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <!-- disabling the subscription recovery policy allows us take memory leaks easier -->
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic=">">
-            <subscriptionRecoveryPolicy>
-              <noSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-      </policyEntries></policyMap>
-    </destinationPolicy>
-    
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:60007)"/>
-    </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-      <transportConnector uri="vm://broker1"/>
-    </transportConnectors>
-
-    
-  </broker>
-  
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml
deleted file mode 100644
index d3d52dd..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/network/ssh-reconnect-broker2.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker2" persistent="false" useShutdownHook="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <!-- disabling the subscription recovery policy allows us take memory leaks easier -->
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic=">">
-            <subscriptionRecoveryPolicy>
-              <noSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-      </policyEntries></policyMap>
-    </destinationPolicy>
-    
-
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:60006)"/>
-    </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61617"/>
-      <transportConnector uri="vm://broker2"/>
-    </transportConnectors>
-    
-  </broker>
-  
-
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml
deleted file mode 100644
index 1262436..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahaBroker.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans >
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true" xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnectors>
-    <persistenceAdapter>
-      <kahaPersistenceAdapter dir = "target/activemq-data"/>
-    </persistenceAdapter>
-  </broker>
-
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahadbBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahadbBroker.xml
deleted file mode 100644
index 226a441..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/kahadbBroker.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans >
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true" xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnectors>
-    <persistenceAdapter>
-      <kahaDB directory = "target/activemq-data"/>
-    </persistenceAdapter>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/networkSync.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/networkSync.xml
deleted file mode 100644
index 7fb9dce..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/networkSync.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.org/config/1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.org/config/1.0 http://activemq.apache.org/snapshot-schema/activemq-core-5.0-SNAPSHOT.xsd">
- 
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-  </bean>
- 
-  <!-- Broker1 -->
-  <broker brokerName="broker1" id="broker1" useJmx="true" persistent="true" deleteAllMessagesOnStartup="true" start="false" xmlns="http://activemq.org/config/1.0">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616" />
-    </transportConnectors>
- 
-    <persistenceAdapter>
-      <amqPersistenceAdapter directory="target/Broker1-data/activemq-data" syncOnWrite="true"  indexPageSize="16kb" indexBinSize="100" maxReferenceFileLength="8192"/>
-    </persistenceAdapter>
-  </broker>
- 
- 
-  <!-- Broker2 -->
-  <broker brokerName="broker2" id="broker2" useJmx="true" persistent="false" deleteAllMessagesOnStartup="true" start="false" xmlns="http://activemq.org/config/1.0">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62616" />
-    </transportConnectors>
-     <persistenceAdapter>
-      <amqPersistenceAdapter directory="target/Broker2-data/activemq-data" syncOnWrite="true"  indexPageSize="16kb" indexBinSize="100" maxReferenceFileLength="8192"/>
-    </persistenceAdapter>
-  </broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/slowConsumerBroker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/slowConsumerBroker.xml
deleted file mode 100644
index ac0e8bc..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/perf/slowConsumerBroker.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans>
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="slowConsumerBroker" useJmx="false" persistent="false" useShutdownHook="false" xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnectors>
-     <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic=">" producerFlowControl="false">            
-            <!-- lets force old messages to be discarded for slow consumers -->
-            <pendingMessageLimitStrategy>
-              <constantPendingMessageLimitStrategy limit="0"/>
-            </pendingMessageLimitStrategy>
-          </policyEntry>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-   
-  </broker>
-
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/plugin/statistics-plugin-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/plugin/statistics-plugin-broker.xml
deleted file mode 100644
index ad3933a..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/plugin/statistics-plugin-broker.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans>
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core" >
-
- <transportConnectors>
-      <transportConnector uri="tcp://localhost:0"/>
-    </transportConnectors>
-    <plugins>
-        <statisticsBrokerPlugin/>
-    </plugins>
-    
-   
-  </broker>
-
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/AMQauth.ldif b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/AMQauth.ldif
deleted file mode 100755
index 9d3eb32..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/AMQauth.ldif
+++ /dev/null
@@ -1,112 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-version: 1
-dn: dc=example,dc=com
-objectClass: top
-objectClass: domain
-objectClass: extensibleObject
-dc: example
-
-dn: o=ActiveMQ,dc=example,dc=com
-objectclass: organization
-objectclass: top
-o: ActiveMQ
-
-dn: ou=users,o=ActiveMQ,dc=example,dc=com
-objectclass: organizationalUnit
-objectclass: top
-ou: users
-
-dn: uid=ngcutura,ou=users,o=ActiveMQ,dc=example,dc=com
-objectclass: inetOrgPerson
-objectclass: organizationalPerson
-objectclass: person
-objectclass: top
-cn: Goran Cutura
-sn: Cutura
-uid: ngcutura
-userpassword:: e3NoYX0wZE9sTGxnU2ZRT3NSaFR5OGx3NUM3K1hlSkE9
-
-dn: cn=roles,uid=ngcutura,ou=users,o=ActiveMQ,dc=example,dc=com
-objectclass: groupOfUniqueNames
-objectclass: top
-cn: roles
-uniquemember: aa
-
-dn: ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: organizationalUnit
-objectclass: top
-ou: destinations
-
-dn: ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: organizationalUnit
-objectclass: top
-ou: topics
-
-dn: uid=topic1,ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: uidObject
-objectclass: top
-uid: topic1
-
-dn: cn=admin,uid=topic1,ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: groupOfUniqueNames
-objectclass: top
-cn: admin
-uniquemember: role1
-
-dn: cn=read,uid=topic1,ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: groupOfUniqueNames
-objectclass: top
-cn: read
-uniquemember: role2
-
-dn: cn=write,uid=topic1,ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: groupOfUniqueNames
-objectclass: top
-cn: write
-uniquemember: role3
-
-dn: ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: organizationalUnit
-objectclass: top
-ou: queues
-
-dn: uid=queue1,ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: uidObject
-objectclass: top
-uid: queue1
-
-dn: cn=read,uid=queue1,ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: groupOfUniqueNames
-objectclass: top
-cn: read
-uniquemember: role1
-
-dn: cn=write,uid=queue1,ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: groupOfUniqueNames
-objectclass: top
-cn: write
-uniquemember: role1
-uniquemember: role2
-
-dn: cn=admin,uid=queue1,ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com
-objectclass: groupOfUniqueNames
-objectclass: top
-cn: admin
-uniquemember: role1
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/LDAPAuthorizationMap.properties b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/LDAPAuthorizationMap.properties
deleted file mode 100755
index fc7b13b..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/LDAPAuthorizationMap.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-initialContextFactory	=	com.sun.jndi.ldap.LdapCtxFactory
-connectionURL		=	ldap://localhost:10389
-authentication		=	simple
-connectionUsername	=	uid=admin,ou=system
-connectionPassword	=	secret
-connectionProtocol	=	s
-topicSearchMatching	=	uid={0},ou=topics,ou=destinations,o=ActiveMQ,dc=example,dc=com
-topicSearchSubtree	=	true
-queueSearchMatching	=	uid={0},ou=queues,ou=destinations,o=ActiveMQ,dc=example,dc=com
-queueSearchSubtree	=	true
-adminBase		=	(cn=admin)
-adminAttribute		=	uniqueMember
-readBase		=	(cn=read)
-readAttribute		=	uniqueMember
-writeBAse		=	(cn=write)
-writeAttribute		=	uniqueMember
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.ks b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.ks
deleted file mode 100644
index 688eeb0..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.ks
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.ts b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.ts
deleted file mode 100644
index 62190ea..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.ts
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.xml
deleted file mode 100644
index 190f701..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker1.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker1" useJmx="false" persistent="false">
-
-  
-    <networkConnectors>
-      <networkConnector uri="static://(ssl://localhost:61618)"
-         name="tobackbone"
-         duplex="true"
-         prefetchSize="1"
-         networkTTL="10">
-   </networkConnector>
-    </networkConnectors>
-    
- <plugins>
-      <jaasCertificateAuthenticationPlugin configuration="broker1" />
-      <!--  lets configure a destination based authorization mechanism -->
-
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-             
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-
-    <sslContext>
-        <sslContext keyStore="org/apache/activemq/security/broker1.ks"
-                    keyStorePassword="password"
-                    trustStore="org/apache/activemq/security/broker1.ts"
-                    trustStorePassword="password"/>
-    </sslContext>
-
-    <!-- The transport connectors ActiveMQ will listen to -->
-    <transportConnectors>
-       <transportConnector name="ssl" uri="ssl://0.0.0.0:61617?transport.closeAsync=false&amp;wantClientAuth=true&amp;needClientAuth=true"/>
-    </transportConnectors>
-
-  </broker>
-  
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.ks b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.ks
deleted file mode 100644
index 1b5fdf2..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.ks
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.ts b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.ts
deleted file mode 100644
index 6b1ef39..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.ts
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.xml
deleted file mode 100644
index 946b04d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/broker2.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker2" useJmx="false" persistent="false">
-
-    <plugins>
-      <jaasCertificateAuthenticationPlugin configuration="broker2" />
-
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-            
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-
-
-    <sslContext>
-        <sslContext keyStore="org/apache/activemq/security/broker2.ks"
-                    keyStorePassword="password"
-                    trustStore="org/apache/activemq/security/broker2.ts"
-                    trustStorePassword="password"/>
-    </sslContext>
-
-
-    <!-- The transport connectors ActiveMQ will listen to -->
-    <transportConnectors>
-       <transportConnector name="ssl"     uri="ssl://0.0.0.0:61618?transport.closeAsync=false&amp;wantClientAuth=true&amp;needClientAuth=true"/>
-    </transportConnectors>
-
-  </broker>
-  
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/client.ks b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/client.ks
deleted file mode 100644
index f651aca..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/client.ks
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/client.ts b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/client.ts
deleted file mode 100644
index 39016d1..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/client.ts
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/groups.properties b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/groups.properties
deleted file mode 100644
index 0898ea4..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/groups.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-admins=system,sslclient,client,broker1,broker2
-tempDestinationAdmins=system,user,sslclient,client,broker1,broker2
-users=system,user,sslclient,client,broker1,broker2
-guests=guest
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker-guest-no-creds-only.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker-guest-no-creds-only.xml
deleted file mode 100644
index 6ad1e72..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker-guest-no-creds-only.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core"
-          populateJMSXUserID="true"
-          useAuthenticatedPrincipalForJMSXUserID="true">
-
-    <plugins>
-      <!--  use JAAS to authenticate using the login.config file on the classpath to configure JAAS -->
-      <jaasDualAuthenticationPlugin configuration="activemq-guest-when-no-creds-only-domain" sslConfiguration="cert-login" />
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-             <authorizationEntry queue="&gt;" read="admins" write="admins" admin="admins"/>
-             <authorizationEntry topic="&gt;" read="admins" write="admins" admin="admins"/>
-             <authorizationEntry queue="GuestQueue" read="admins" write="admins, guests" admin="admins"/>
-             <authorizationEntry topic="ActiveMQ.Advisory.&gt;" read="guests" write="guests" admin="guests"/>
-            </authorizationEntries>    
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-    
-    <transportConnectors>
-		<transportConnector name="stomp"   uri="stomp://localhost:61613"/>
-	</transportConnectors>
-  </broker>
-
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker-guest.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker-guest.xml
deleted file mode 100644
index c8474a3..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker-guest.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core"
-          populateJMSXUserID="true"
-          useAuthenticatedPrincipalForJMSXUserID="true">
-
-    <plugins>
-      <!--  use JAAS to authenticate using the login.config file on the classpath to configure JAAS -->
-      <jaasDualAuthenticationPlugin configuration="activemq-guest-domain" sslConfiguration="cert-login" />
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-             <authorizationEntry queue="&gt;" read="admins" write="admins" admin="admins"/>
-             <authorizationEntry topic="&gt;" read="admins" write="admins" admin="admins"/>
-             <authorizationEntry queue="GuestQueue" read="admins" write="admins, guests" admin="admins"/>
-             <authorizationEntry topic="ActiveMQ.Advisory.&gt;" read="guests" write="guests" admin="guests"/>
-            </authorizationEntries>    
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-    
-    <transportConnectors>
-		<transportConnector name="stomp"   uri="stomp://localhost:61613"/>
-	</transportConnectors>
-  </broker>
-
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker.xml
deleted file mode 100644
index 55b3bbe..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/jaas-broker.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
-
-    <plugins>
-      <!--  use JAAS to authenticate using the login.config file on the classpath to configure JAAS -->
-      <jaasAuthenticationPlugin configuration="activemq-domain" />
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-            
-            <!-- let's assign roles to temporary destinations. comment this entry if we don't want any roles assigned to temp destinations  -->
-            <tempDestinationAuthorizationEntry>  
-              <tempDestinationAuthorizationEntry read="tempDestinationAdmins" write="tempDestinationAdmins" admin="tempDestinationAdmins"/>
-           </tempDestinationAuthorizationEntry>               
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/ldap-spring.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/ldap-spring.xml
deleted file mode 100644
index aa6b086..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/ldap-spring.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
-  "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-  <bean id="environment" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
-    <property name="properties">
-      <props>
-        <prop key="java.naming.security.authentication">simple</prop>
-        <prop key="java.naming.security.principal">uid=admin,ou=system</prop>
-        <prop key="java.naming.security.credentials">secret</prop>
-        <!--<prop key="kdc.entryBaseDn">ou=users,dc=example,dc=com</prop>-->
-        <!--<prop key="kdc.java.naming.security.credentials">secret</prop>-->
-        <!--<prop key="changepw.entryBaseDn">ou=users,dc=example,dc=com</prop>-->
-        <!--<prop key="changepw.java.naming.security.credentials">secret</prop>-->
-        <!-- Set this key to a space delimited set of attributeType descriptions
-             and their OID's if you want an attributeType to be handled as 
-             binary content.
- 
-             The server will use the schema to derive the set of attributeTypes
-             to treat as binary.  The union if the values you provide here 
-             will be taken as the set of binaries. Note to be consistent you 
-             must add both the OID and all the names an attributeType can have.
-        -->
-        <!-- 
-        <prop key="java.naming.ldap.attributes.binary"></prop>
-        -->
-      </props>
-    </property>
-  </bean>
-  
-  <bean id="configuration" class="org.apache.directory.server.core.configuration.MutableStartupConfiguration">
-    <property name="workingDirectory"><value>example.com</value></property>
-
-    <!-- Uncomment below to have the server load entries on startup!        -->
-    <!-- ldifDirectory property can point to a relative file, directory or  -->
-    <!-- can point to an absolute path to either using the URL path         -->
-    <!-- notation: i.e. file:///Users/jack/apacheds/ldifs                   -->
-
-    <!-- Entries will optionally be filtered using LdifLoadFilters in the   -->
-    <!-- order specified.  The included Krb5KdcEntryFilter will filter      -->
-    <!-- kerberos principals creating keys for them using their             -->
-    <!-- userPassword attribute if present.                                 -->
-
-    <!--<property name="ldifDirectory">
-      <value>example.ldif</value>
-    </property>
-    <property name="ldifFilters">
-      <list>
-        <bean class="org.apache.directory.server.protocol.shared.store.Krb5KdcEntryFilter"/>
-      </list>
-    </property>-->
-
-    <property name="allowAnonymousAccess"><value>false</value></property>
-    <property name="accessControlEnabled"><value>false</value></property>
-    <!--  
-    <property name="enableNtp"><value>false</value></property>
-    <property name="enableKerberos"><value>false</value></property>
-    <property name="enableChangePassword"><value>false</value></property>
-    <property name="ldapPort"><value>10389</value></property>
-    <property name="contextPartitionConfigurations">
-      <set>
-        <ref bean="examplePartitionConfiguration"/>
-      </set>
-    </property>
-    -->
-    <property name="bootstrapSchemas">
-      <set>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.AutofsSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.CorbaSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.CoreSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.CosineSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.ApacheSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.CollectiveSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.JavaSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.NisSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.SystemSchema"/>
-        <bean class="org.apache.directory.server.core.schema.bootstrap.ApachednsSchema"/>
-      </set>
-    </property>
-    
-      <!-- 
-    <property name="extendedOperationHandlers">
-      <list>
-        <bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
-        <bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
-       </list>
-    </property>
-
-    <property name="interceptorConfigurations">
-      <list>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>normalizationService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.normalization.NormalizationService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>authenticationService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.authn.AuthenticationService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>referralService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.referral.ReferralService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>authorizationService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.authz.AuthorizationService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>defaultAuthorizationService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.authz.DefaultAuthorizationService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>exceptionService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.exception.ExceptionService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>schemaService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.schema.SchemaService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>subentryService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.subtree.SubentryService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>operationalAttributeService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.operational.OperationalAttributeService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>collectiveAttributeService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.collective.CollectiveAttributeService" />
-          </property>
-        </bean>
-        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
-          <property name="name"><value>eventService</value></property>
-          <property name="interceptor">
-            <bean class="org.apache.directory.server.core.event.EventService" />
-          </property>
-        </bean>
-      </list>
-    </property>
- -->
-  </bean>
-  
-  <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration">
-    <property name="name"><value>example</value></property>
-    <property name="suffix"><value>dc=example,dc=com</value></property>
-    <property name="indexedAttributes">
-      <set>
-        <value>dc</value>
-        <value>ou</value>
-        <value>objectClass</value>
-        <value>krb5PrincipalName</value>
-        <value>uid</value>
-      </set>
-    </property>
-    <property name="contextEntry">
-      <value>
-        objectClass: top
-        objectClass: domain
-        objectClass: extensibleObject
-        dc: example
-      </value>
-    </property>
-  </bean>
-
-  <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
-    <property name="customEditors">
-      <map>
-        <entry key="javax.naming.directory.Attributes">
-          <bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
-        </entry>
-      </map>
-   </property>
-  </bean>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-anonymous-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-anonymous-broker.xml
deleted file mode 100644
index dcbcd92..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-anonymous-broker.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
-
-    <destinations>
-      <queue physicalName="TEST.Q" />      
-    </destinations> 
-
-    <!-- Use a non-default port in case the default port is in use -->
-    <managementContext>
-      <managementContext connectorPort="1199"/>
-    </managementContext>
-
-    <plugins>
-        <simpleAuthenticationPlugin anonymousAccessAllowed="true">
-            <users>
-                <authenticationUser username="system" password="manager"
-                    groups="users,admins"/>
-                <authenticationUser username="user" password="password"
-                    groups="users"/>
-                <authenticationUser username="guest" password="password" groups="guests"/>
-            </users>
-        </simpleAuthenticationPlugin>
-
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests,anonymous" write="guests,users,anonymous" admin="guests,users,anonymous" />
-              
-              <authorizationEntry queue="TEST.Q" read="guests" write="guests" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests,anonymous" write="guests,users,anonymous" admin="guests,users,anonymous" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users,anonymous" write="guests,users,anonymous" admin="guests,users,anonymous"/>
-            </authorizationEntries>
-            <tempDestinationAuthorizationEntry>  
-                <tempDestinationAuthorizationEntry read="admin" write="admin" admin="admin"/> 
-            </tempDestinationAuthorizationEntry>     
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml
deleted file mode 100644
index e525ee3..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor"> 
-      <property name="algorithm" value="PBEWithMD5AndDES"/> 
-      <property name="password" value="activemq"/> 
-  </bean> 
-    
-  <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer"> 
-      <constructor-arg ref="configurationEncryptor" /> 
-      <property name="location" value="classpath:credentials.properties"/> 
-  </bean> 
-
-  <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
-
-    <destinations>
-      <queue physicalName="TEST.Q" />      
-    </destinations> 
-
-    <!-- Use a non-default port in case the default port is in use -->
-    <managementContext>
-      <managementContext connectorPort="1199"/>
-    </managementContext>
-
-    <plugins>
-		<simpleAuthenticationPlugin>
-			<users>
-				<authenticationUser username="system" password="${activemq.password}"
-					groups="users,admins"/>
-				<authenticationUser username="user" password="${guest.password}"
-					groups="users"/>
-				<authenticationUser username="guest" password="${guest.password}" groups="guests"/>
-			</users>
-		</simpleAuthenticationPlugin>
-
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry queue="TEST.Q" read="guests" write="guests" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-            <tempDestinationAuthorizationEntry>  
-                <tempDestinationAuthorizationEntry read="admin" write="admin" admin="admin"/> 
-            </tempDestinationAuthorizationEntry>     
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-separator.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-separator.xml
deleted file mode 100644
index baea8c7..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-separator.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
-      <property name="algorithm" value="PBEWithMD5AndDES"/>
-      <property name="password" value="activemq"/>
-  </bean>
-
-  <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
-      <constructor-arg ref="configurationEncryptor" />
-      <property name="location" value="classpath:credentials.properties"/>
-  </bean>
-
-  <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
-
-    <destinations>
-      <queue physicalName="TEST.Q" />
-    </destinations>
-
-    <!-- Use a non-default port in case the default port is in use -->
-    <managementContext>
-      <managementContext connectorPort="1199"/>
-    </managementContext>
-
-    <plugins>
-		<simpleAuthenticationPlugin>
-			<users>
-				<authenticationUser username="system" password="${activemq.password}"
-					groups="users,admins"/>
-				<authenticationUser username="user" password="${guest.password}"
-					groups="users"/>
-				<authenticationUser username="guest" password="${guest.password}" groups="guests"/>
-			</users>
-		</simpleAuthenticationPlugin>
-
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-
-              <authorizationEntry queue="TEST.Q" read="guests" write="guests" />
-
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-            <tempDestinationAuthorizationEntry>
-                <tempDestinationAuthorizationEntry read="admin" write="admin" admin="admin"/>
-            </tempDestinationAuthorizationEntry>
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-      <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.broker.util.DestinationPathSeparatorBroker"/>
-    </plugins>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users.properties b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users.properties
deleted file mode 100644
index cf72413..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-system=manager
-user=password
-guest=password
-sslclient=CN=localhost, OU=activemq.org, O=activemq.org, L=LA, ST=CA, C=US
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users1.properties b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users1.properties
deleted file mode 100644
index 2810afd..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users1.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-client=CN=client, OU=activemq, O=apache, L=Unknown, ST=Unknown, C=Unknown
-broker2=CN=broker2, OU=activemq, O=apache, L=Unknown, ST=Unknown, C=Unknown
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users2.properties b/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users2.properties
deleted file mode 100644
index 980fe5b..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/security/users2.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-client=CN=client, OU=activemq, O=apache, L=Unknown, ST=Unknown, C=Unknown
-broker1=CN=broker1, OU=activemq, O=apache, L=Unknown, ST=Unknown, C=Unknown
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db-1.log b/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db-1.log
deleted file mode 100644
index 37d28a6..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db-1.log
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db.data b/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db.data
deleted file mode 100644
index f68f8c2..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db.data
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db.redo b/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db.redo
deleted file mode 100644
index 0a4b98f..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1/db.redo
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db-1.log b/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db-1.log
deleted file mode 100644
index 82461ce..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db-1.log
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db.data b/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db.data
deleted file mode 100644
index 56275da..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db.data
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db.redo b/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db.redo
deleted file mode 100644
index b331eab..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2/db.redo
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-fixed-buffer.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-fixed-buffer.xml
deleted file mode 100644
index 820bdc0..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-fixed-buffer.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="org.apache.activemq.test.>">
-            <subscriptionRecoveryPolicy>
-              <fixedSizedSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-fixed-destination-buffer.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-fixed-destination-buffer.xml
deleted file mode 100644
index 45d623c..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-fixed-destination-buffer.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="org.apache.activemq.test.>">
-            <subscriptionRecoveryPolicy>
-              <fixedSizedSubscriptionRecoveryPolicy useSharedBuffer="false" maximumSize="600000"/>
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-lastimage-policy.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-lastimage-policy.xml
deleted file mode 100644
index 0ee21a6..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-lastimage-policy.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="org.apache.activemq.test.>">
-            <subscriptionRecoveryPolicy>
-              <lastImageSubscriptionRecoveryPolicy/>
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-message-query.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-message-query.xml
deleted file mode 100644
index a607738..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-message-query.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="org.apache.activemq.test.>">
-            <subscriptionRecoveryPolicy>
-              <queryBasedSubscriptionRecoveryPolicy query="#myQuery" />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-  </broker>
-
-  <bean id="myQuery"
-    class="org.apache.activemq.test.retroactive.DummyMessageQuery" />
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-timed-policy.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-timed-policy.xml
deleted file mode 100644
index 5e45fb3..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/test/retroactive/activemq-timed-policy.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="org.apache.activemq.test.>">
-            <subscriptionRecoveryPolicy>
-              <timedSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml
deleted file mode 100644
index d312843..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-  
-  <bean class="org.apache.activemq.util.XStreamFactoryBean" name="xstream">
-        <property name="annotatedClass"><value>org.apache.activemq.transport.stomp.SamplePojo</value></property>
-  </bean>
-  
-  <bean id="springContext" class="org.apache.activemq.spring.SpringBrokerContext" />
-
-  <broker useJmx="true" schedulerSupport="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true" brokerContext="#springContext">
-
-    <plugins>
-		<simpleAuthenticationPlugin>
-			<users>
-				<authenticationUser username="system" password="manager"
-					groups="users,admins"/>
-				<authenticationUser username="user" password="password"
-					groups="users"/>
-				<authenticationUser username="guest" password="password" groups="guests"/>
-			</users>
-		</simpleAuthenticationPlugin>
-
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-    
-    <transportConnectors>
-      <transportConnector name="stomp+nio"   uri="stomp+nio://localhost:61612"/>
-    </transportConnectors>
-
-    
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml
deleted file mode 100644
index 1bf76fc..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-  
-  <bean class="org.apache.activemq.util.XStreamFactoryBean" name="xstream">
-        <property name="annotatedClass"><value>org.apache.activemq.transport.stomp.SamplePojo</value></property>
-  </bean>
-
-  <bean id="springContext" class="org.apache.activemq.spring.SpringBrokerContext" />
-
-  <broker start="false" useJmx="true" schedulerSupport="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true" brokerContext="#springContext">
-
-    <plugins>
-		<simpleAuthenticationPlugin>
-			<users>
-				<authenticationUser username="system" password="manager"
-					groups="users,admins"/>
-				<authenticationUser username="user" password="password"
-					groups="users"/>
-				<authenticationUser username="guest" password="password" groups="guests"/>
-			</users>
-		</simpleAuthenticationPlugin>
-
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-    
-    <transportConnectors>
-      <transportConnector name="stomp+ssl"   uri="stomp+ssl://localhost:61612"/>
-    </transportConnectors>
-
-    
-  </broker>
-
-</beans>
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml
deleted file mode 100644
index a68477e..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <bean class="org.apache.activemq.util.XStreamFactoryBean" name="xstream">
-        <property name="annotatedClass"><value>org.apache.activemq.transport.stomp.SamplePojo</value></property>
-  </bean>
-  
-  <bean id="springContext" class="org.apache.activemq.spring.SpringBrokerContext" />
-  
-  <!--  lets create an embedded ActiveMQ Broker -->
-  <amq:broker useJmx="true" schedulerSupport="true" persistent="false" start="false" brokerContext="#springContext">
-
-     <amq:plugins>
-		<amq:jaasCertificateAuthenticationPlugin configuration="cert-login"/>
-		
-		<!--  lets configure a destination based authorization mechanism -->
-        <amq:authorizationPlugin>
-			<amq:map>
-			  <amq:authorizationMap>
-			    <amq:authorizationEntries>
-			      <amq:authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-			      <amq:authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-			      <amq:authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-			      
-			      <amq:authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-			      <amq:authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-			      <amq:authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-			      
-			      <amq:authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-			    </amq:authorizationEntries>
-			    
-			    <!-- let's assign roles to temporary destinations. comment this entry if we don't want any roles assigned to temp destinations  -->
-			    <amq:tempDestinationAuthorizationEntry>  
-			      <amq:tempDestinationAuthorizationEntry read="tempDestinationAdmins" write="tempDestinationAdmins" admin="tempDestinationAdmins"/>
-			   </amq:tempDestinationAuthorizationEntry>               
-			  </amq:authorizationMap>
-			</amq:map>
-      </amq:authorizationPlugin>
-	</amq:plugins>
-
-    <amq:sslContext>
-      <amq:sslContext 
-      		keyStore="server.keystore" keyStorePassword="password"
-      		trustStore="client.keystore" trustStorePassword="password"/>
-    </amq:sslContext>
-    
-    <amq:transportConnectors>
-      <amq:transportConnector name="stomp+ssl"   uri="stomp+ssl://localhost:61612?needClientAuth=true"/>
-      <amq:transportConnector name="ssl"   uri="ssl://localhost:61617?needClientAuth=true"/>
-    </amq:transportConnectors>
-    	
-  </amq:broker>
-  
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml
deleted file mode 100644
index 51d55b4..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-  
-  <bean class="org.apache.activemq.util.XStreamFactoryBean" name="xstream">
-  		<property name="annotatedClass"><value>org.apache.activemq.transport.stomp.SamplePojo</value></property>
-  </bean>
-
-  <bean id="springContext" class="org.apache.activemq.spring.SpringBrokerContext" />
-
-  <broker useJmx="true" schedulerSupport="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true" brokerContext="#springContext">
-
-    <plugins>
-		<simpleAuthenticationPlugin>
-			<users>
-				<authenticationUser username="system" password="manager"
-					groups="users,admins"/>
-				<authenticationUser username="user" password="password"
-					groups="users"/>
-				<authenticationUser username="guest" password="password" groups="guests"/>
-			</users>
-		</simpleAuthenticationPlugin>
-
-
-      <!--  lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-    
-    <transportConnectors>
-		<transportConnector name="stomp"   uri="stomp://localhost:61613"/>
-	</transportConnectors>
-    
-  </broker>
-
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/tcp/activemq-ssl.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/tcp/activemq-ssl.xml
deleted file mode 100755
index 1fe92a9..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/tcp/activemq-ssl.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- START SNIPPET: spring -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <!--  lets create an embedded ActiveMQ Broker -->
-  <amq:broker useJmx="false" persistent="false">
-
-    <amq:sslContext>
-      <amq:sslContext 
-      		keyStore="server.keystore" keyStorePassword="password"
-      		trustStore="client.keystore" trustStorePassword="password"/>
-    </amq:sslContext>
-    
-    <amq:transportConnectors>
-      <amq:transportConnector uri="ssl://localhost:61616" />
-    </amq:transportConnectors>
-    
-  </amq:broker>
-  
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/tcp/n-brokers-ssl.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/tcp/n-brokers-ssl.xml
deleted file mode 100644
index 0cb2f7e..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/tcp/n-brokers-ssl.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <amq:broker useJmx="false" persistent="false" start="false" brokerName="dummy">
-
-    <amq:sslContext>
-      <amq:sslContext 
-      		keyStore="dummy.keystore" keyStorePassword="password"/>
-    </amq:sslContext>
-    
-    <amq:transportConnectors>
-      <amq:transportConnector uri="ssl://0.0.0.0:62616" />
-    </amq:transportConnectors>
-    
-  </amq:broker>
-
-  <amq:broker useJmx="false" persistent="false" start="false" brokerName="activemq.org">
-    <amq:sslContext>
-      <amq:sslContext 
-      		keyStore="server.keystore" keyStorePassword="password"
-       		trustStore="client.keystore" trustStorePassword="password"/>
-    </amq:sslContext>
-    
-    <amq:transportConnectors>
-      <amq:transportConnector uri="ssl://localhost:63616" />
-    </amq:transportConnectors>
-    
-  </amq:broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/activemq.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/activemq.xml
deleted file mode 100644
index a0aac2a..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/activemq.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core">
-
-	<!-- In ActiveMQ 4, you can setup destination policies -->  
-    <destinationPolicy>
-      <policyMap><policyEntries>
-        
-          <policyEntry topic="FOO.>">
-            <dispatchPolicy>
-              <strictOrderDispatchPolicy />
-            </dispatchPolicy>
-            <subscriptionRecoveryPolicy>
-              <lastImageSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-
-          <!-- lets force old messages to be discarded for slow consumers -->
-          <policyEntry topic="Prices.>">
-            <pendingMessageLimitStrategy>
-              <constantPendingMessageLimitStrategy limit="0"/>
-            </pendingMessageLimitStrategy>
-          </policyEntry>
-
-      </policyEntries></policyMap>
-    </destinationPolicy>
-  
-    <networkConnectors>
-      <!-- by default just auto discover the other brokers -->
-      <networkConnector uri="multicast://default"/>
-      <!--  
-      <networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-      -->
-    </networkConnectors>
-  
-    <persistenceFactory>
-      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="../data"/>
-      <!-- To use a different datasource, use the following syntax : -->
-      <!-- 
-      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="../data" dataSource="#postgres-ds"/>
-       -->
-    </persistenceFactory>
-  
-    <transportConnectors>
-       <transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
-    </transportConnectors>
-        
-  </broker>
-  
-  <!--  This xbean configuration file supports all the standard spring xml configuration options -->
-  
-  <!-- Postgres DataSource Sample Setup -->
-  <!-- 
-  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
-    <property name="serverName" value="localhost"/>
-    <property name="databaseName" value="activemq"/>
-    <property name="portNumber" value="0"/>
-    <property name="user" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="dataSourceName" value="postgres"/>
-    <property name="initialConnections" value="1"/>
-    <property name="maxConnections" value="10"/>
-  </bean>
-  -->
-  
-  <!-- MySql DataSource Sample Setup -->
-  <!-- 
-  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-    <property name="url" value="jdbc:mysql://localhost/activemq"/>
-    <property name="username" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-  -->  
-   
-  <!-- Embedded Derby DataSource Sample Setup -->
-  <!-- 
-  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-    <property name="databaseName" value="derbydb"/>
-    <property name="createDatabase" value="create"/>
-  </bean>
-  -->  
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1.xml
deleted file mode 100644
index 8a27d49..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->        
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-  
-  <!-- Broker1 ?useQueueForAccept=false -->
-  <amq:broker brokerName="broker1" id="broker1" useJmx="true" 
-  			  persistent="true" start="false" advisorySupport="true" deleteAllMessagesOnStartup="true">
- 
- 
-   <amq:destinationInterceptors>
-            <amq:virtualDestinationInterceptor>
-              <amq:virtualDestinations>
-                <amq:virtualTopic name=">" prefix="VTopic.*." />
-              </amq:virtualDestinations>
-           </amq:virtualDestinationInterceptor>
-    </amq:destinationInterceptors>
-
-    <amq:networkConnectors>
-      
-      <amq:networkConnector uri="static:(tcp://localhost:61617)" name="broker1_broker2">
-        
-        <amq:excludedDestinations>
-          <amq:queue physicalName="QUEUE.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="QUEUE.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
- 
-    </amq:networkConnectors>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:61616" />
-    </amq:transportConnectors>
-
-  </amq:broker>
-  
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1A.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1A.xml
deleted file mode 100644
index 1d0c34e..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1A.xml
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-  <bean
-    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-    <property name="locations">
-      <list>
-        <value>classpath:activemq-browse.properties</value>
-      </list>
-    </property>
-    <property name="ignoreResourceNotFound" value="true" />
-    <property name="searchSystemEnvironment" value="true" />
-  </bean>
-
-  <amq:broker brokerName="broker-1A" brokerId="broker-1A" useJmx="false"
-  			  persistent="true" advisorySupport="true" deleteAllMessagesOnStartup="true">
-
-
-   <amq:destinationInterceptors>
-            <amq:virtualDestinationInterceptor>
-              <amq:virtualDestinations>
-                <amq:virtualTopic name=">" prefix="VTopic.*." />
-                <amq:compositeQueue name="PROD.FUSESOURCE">
-                  <amq:forwardTo>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-                  </amq:forwardTo>
-                </amq:compositeQueue>
-              </amq:virtualDestinations>
-           </amq:virtualDestinationInterceptor>
-    </amq:destinationInterceptors>
-
-
-    <amq:destinationPolicy>
-      <amq:policyMap>
-        <amq:policyEntries>
-          <amq:policyEntry topic=">" enableAudit="true">
-            <amq:dispatchPolicy>
-              <amq:priorityNetworkDispatchPolicy/>
-            </amq:dispatchPolicy>
-          </amq:policyEntry>
-        </amq:policyEntries>
-      </amq:policyMap>
-    </amq:destinationPolicy>
-
-    <amq:networkConnectors>
-
-      <amq:networkConnector uri="static:(${1b.uri})"
-        name="1a_${1b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2a.uri})"
-        name="1a_${2a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2b.uri})"
-        name="1a_${2b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3a.uri})"
-        name="1a_${3a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3b.uri})"
-        name="1a_${3b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-    </amq:networkConnectors>
-
-    <amq:persistenceAdapter>
-       <amq:kahaDB directory="${1a.data}"/>
-    </amq:persistenceAdapter>
-
-
-	<amq:plugins>
-       	<amq:timeStampingBrokerPlugin futureOnly="true"/>
-	</amq:plugins>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="${1a.transport}" />
-    </amq:transportConnectors>
-
-  </amq:broker>
-
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1B.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1B.xml
deleted file mode 100644
index 639b53d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker1B.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-
-  <bean
-    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-    <property name="locations">
-      <list>
-        <value>classpath:activemq-browse.properties</value>
-      </list>
-    </property>
-    <property name="ignoreResourceNotFound" value="true" />
-    <property name="searchSystemEnvironment" value="true" />
-  </bean>
-
-  <amq:broker brokerName="broker-1B" brokerId="broker-1B" useJmx="false"
-  			  persistent="true" advisorySupport="true" deleteAllMessagesOnStartup="true">
-
-
-    <amq:destinationInterceptors>
-            <amq:virtualDestinationInterceptor>
-              <amq:virtualDestinations>
-                <!--  amq:virtualTopic name=">" prefix="VTopic.*." / -->
-                <amq:compositeQueue name="PROD.FUSESOURCE">
-                  <amq:forwardTo>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-                  </amq:forwardTo>
-                </amq:compositeQueue>
-              </amq:virtualDestinations>
-           </amq:virtualDestinationInterceptor>
-    </amq:destinationInterceptors>
-
-
-    <amq:destinationPolicy>
-      <amq:policyMap>
-        <amq:policyEntries>
-          <amq:policyEntry topic=">" enableAudit="true">
-            <amq:dispatchPolicy>
-              <amq:priorityNetworkDispatchPolicy/>
-            </amq:dispatchPolicy>
-          </amq:policyEntry>
-        </amq:policyEntries>
-      </amq:policyMap>
-    </amq:destinationPolicy>
-
-
-    <!--  Network connectors -->
-    <amq:networkConnectors>
-
-      <amq:networkConnector uri="static:(${1a.uri})"
-        name="1b_${1a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2a.uri})"
-        name="1b_${2a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2b.uri})"
-        name="1b_${2b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3a.uri})"
-        name="1b_${3a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3b.uri})"
-        name="1b_${3b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-    </amq:networkConnectors>
-
-    <amq:persistenceAdapter>
-       <amq:kahaDB directory="${1b.data}"/>
-    </amq:persistenceAdapter>
-
-	<amq:plugins>
-       	<amq:timeStampingBrokerPlugin futureOnly="true"/>
-	</amq:plugins>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="${1b.transport}" />
-    </amq:transportConnectors>
-
-  </amq:broker>
-
-  </beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2.xml
deleted file mode 100644
index 0b34f0e..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->        
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-    
-  <!-- Broker2 (lonb) -->
-  <amq:broker brokerName="broker2" id="broker2" useJmx="true" 
-  				persistent="true" start="false" advisorySupport="true" deleteAllMessagesOnStartup="true">
-
-    <!--  Network connectors -->
-    <amq:networkConnectors>
-      
-      <amq:networkConnector uri="static:(tcp://localhost:61616)" name="broker2_broker1">
-       
-        <amq:excludedDestinations>
-          <amq:queue physicalName="QUEUE.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="QUEUE.A"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
- 
-    </amq:networkConnectors>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:61617" />
-    </amq:transportConnectors>
-        
-  </amq:broker>
-  
-  </beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2A.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2A.xml
deleted file mode 100644
index 0e2008c..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2A.xml
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->         
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-  <bean
-    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-    <property name="locations">
-      <list>
-        <value>classpath:activemq-browse.properties</value>
-      </list>
-    </property>
-    <property name="ignoreResourceNotFound" value="true" />
-    <property name="searchSystemEnvironment" value="true" />
-  </bean>
-
-  <amq:broker brokerName="broker-2A" brokerId="broker-2A" useJmx="false"
-  			  persistent="true" advisorySupport="true" deleteAllMessagesOnStartup="true">
-
-
-    <amq:destinationInterceptors>
-            <amq:virtualDestinationInterceptor>
-              <amq:virtualDestinations>
-                <!--  amq:virtualTopic name=">" prefix="VTopic.*." / -->
-                <amq:compositeQueue name="PROD.FUSESOURCE">
-                  <amq:forwardTo>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-                  </amq:forwardTo>
-                </amq:compositeQueue>
-              </amq:virtualDestinations>
-           </amq:virtualDestinationInterceptor>
-    </amq:destinationInterceptors>
-
-
-    <amq:destinationPolicy>
-      <amq:policyMap>
-        <amq:policyEntries>
-          <amq:policyEntry topic=">" enableAudit="true">
-            <amq:dispatchPolicy>
-              <amq:priorityNetworkDispatchPolicy/>
-            </amq:dispatchPolicy>
-          </amq:policyEntry>
-        </amq:policyEntries>
-      </amq:policyMap>
-    </amq:destinationPolicy>
-
-    <!--  Network connectors -->
-    <amq:networkConnectors>
-
-      <amq:networkConnector uri="static:(${1a.uri})"
-        name="2a_${1a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${1b.uri})"
-        name="2a_${1b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2b.uri})"
-        name="2a_${2b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3a.uri})"
-        name="2a_${3a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3b.uri})"
-        name="2a_${3b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-    </amq:networkConnectors>
-
-    <amq:persistenceAdapter>
-       <amq:kahaDB directory="${2a.data}"/>
-    </amq:persistenceAdapter>
-
-	<amq:plugins>
-       	<amq:timeStampingBrokerPlugin futureOnly="true"/>
-	</amq:plugins>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="${2a.transport}" />
-    </amq:transportConnectors>
-
-  </amq:broker>
-
-
-
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2B.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2B.xml
deleted file mode 100644
index 2139cfb..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker2B.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->         
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-  <bean
-    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-    <property name="locations">
-      <list>
-        <value>classpath:activemq-browse.properties</value>
-      </list>
-    </property>
-    <property name="ignoreResourceNotFound" value="true" />
-    <property name="searchSystemEnvironment" value="true" />
-  </bean>
-
-
-  <amq:broker brokerName="broker-2B" brokerId="broker-2B" useJmx="false"
-  			  persistent="true" advisorySupport="true" deleteAllMessagesOnStartup="true">
-
-
-    <amq:destinationInterceptors>
-            <amq:virtualDestinationInterceptor>
-              <amq:virtualDestinations>
-                <!--  amq:virtualTopic name=">" prefix="VTopic.*." / -->
-                <amq:compositeQueue name="PROD.FUSESOURCE">
-                  <amq:forwardTo>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-                  </amq:forwardTo>
-                </amq:compositeQueue>
-              </amq:virtualDestinations>
-           </amq:virtualDestinationInterceptor>
-    </amq:destinationInterceptors>
-
-
-    <amq:destinationPolicy>
-      <amq:policyMap>
-        <amq:policyEntries>
-          <amq:policyEntry topic=">" enableAudit="true">
-            <amq:dispatchPolicy>
-              <amq:priorityNetworkDispatchPolicy/>
-            </amq:dispatchPolicy>
-          </amq:policyEntry>
-        </amq:policyEntries>
-      </amq:policyMap>
-    </amq:destinationPolicy>
-
-    <!--  Network connectors -->
-    <amq:networkConnectors>
-
-      <amq:networkConnector uri="static:(${1a.uri})"
-        name="2b_${1a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${1b.uri})"
-        name="2b_${1b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2a.uri})"
-        name="2b_${2a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3a.uri})"
-        name="2b_${3a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-       <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3b.uri})"
-        name="2b_${3b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-    </amq:networkConnectors>
-
-    <amq:persistenceAdapter>
-       <amq:kahaDB directory="${2b.data}"/>
-    </amq:persistenceAdapter>
-
-	<amq:plugins>
-       	<amq:timeStampingBrokerPlugin futureOnly="true"/>
-	</amq:plugins>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="${2b.transport}" />
-    </amq:transportConnectors>
-
-  </amq:broker>
-
-
-
-
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker3A.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker3A.xml
deleted file mode 100644
index f879b1d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker3A.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->         
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-  <bean
-    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-    <property name="locations">
-      <list>
-        <value>classpath:activemq-browse.properties</value>
-      </list>
-    </property>
-    <property name="ignoreResourceNotFound" value="true" />
-    <property name="searchSystemEnvironment" value="true" />
-  </bean>
-
-  <amq:broker brokerName="broker-3A" brokerId="broker-3A" useJmx="false"
-  			  persistent="true" advisorySupport="true" deleteAllMessagesOnStartup="true">
-
-
-    <amq:destinationInterceptors>
-            <amq:virtualDestinationInterceptor>
-              <amq:virtualDestinations>
-                <!--  amq:virtualTopic name=">" prefix="VTopic.*." / -->
-                <amq:compositeQueue name="PROD.FUSESOURCE">
-                  <amq:forwardTo>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-                  </amq:forwardTo>
-                </amq:compositeQueue>
-              </amq:virtualDestinations>
-           </amq:virtualDestinationInterceptor>
-    </amq:destinationInterceptors>
-
-
-    <amq:destinationPolicy>
-      <amq:policyMap>
-        <amq:policyEntries>
-          <amq:policyEntry topic=">" enableAudit="true">
-            <amq:dispatchPolicy>
-              <amq:priorityNetworkDispatchPolicy/>
-            </amq:dispatchPolicy>
-          </amq:policyEntry>
-        </amq:policyEntries>
-      </amq:policyMap>
-    </amq:destinationPolicy>
-
-    <!--  Network connectors -->
-    <amq:networkConnectors>
-
-      <amq:networkConnector uri="static:(${1a.uri})"
-        name="3a_${1a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${1b.uri})"
-        name="3a_${1b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2a.uri})"
-        name="3a_${2a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${2b.uri})"
-        name="3a_${2b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-       <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3b.uri})"
-        name="3a_${3b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:staticallyIncludedDestinations>
-       </amq:networkConnector>
-    </amq:networkConnectors>
-
-    <amq:persistenceAdapter>
-       <amq:kahaDB directory="${3a.data}"/>
-    </amq:persistenceAdapter>
-
-	<amq:plugins>
-       	<amq:timeStampingBrokerPlugin futureOnly="true"/>
-	</amq:plugins>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="${3a.transport}" />
-    </amq:transportConnectors>
-
-  </amq:broker>
-
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker3B.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker3B.xml
deleted file mode 100644
index 5301677..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/browse-broker3B.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->         
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-  <bean
-    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-    <property name="locations">
-      <list>
-        <value>classpath:activemq-browse.properties</value>
-      </list>
-    </property>
-    <property name="ignoreResourceNotFound" value="true" />
-    <property name="searchSystemEnvironment" value="true" />
-  </bean>
-
-  <amq:broker brokerName="broker-3B" brokerId="broker-3B" useJmx="false"
-  			  persistent="true" advisorySupport="true" deleteAllMessagesOnStartup="true">
-
-
-    <amq:destinationInterceptors>
-            <amq:virtualDestinationInterceptor>
-              <amq:virtualDestinations>
-                <!--  amq:virtualTopic name=">" prefix="VTopic.*." / -->
-                <amq:compositeQueue name="PROD.FUSESOURCE">
-                  <amq:forwardTo>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-                    <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-                  </amq:forwardTo>
-                </amq:compositeQueue>
-              </amq:virtualDestinations>
-           </amq:virtualDestinationInterceptor>
-    </amq:destinationInterceptors>
-
-
-    <amq:destinationPolicy>
-      <amq:policyMap>
-        <amq:policyEntries>
-          <amq:policyEntry topic=">" enableAudit="true">
-            <amq:dispatchPolicy>
-              <amq:priorityNetworkDispatchPolicy/>
-            </amq:dispatchPolicy>
-          </amq:policyEntry>
-        </amq:policyEntries>
-      </amq:policyMap>
-    </amq:destinationPolicy>
-
-    <!--  Network connectors -->
-    <amq:networkConnectors>
-
-      <amq:networkConnector uri="static:(${1a.uri})"
-        name="3a_${1a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
-       <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${1b.uri})"
-        name="3a_${1b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-  		<amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:staticallyIncludedDestinations>
-      </amq:networkConnector>
-
-
-      <amq:networkConnector uri="static:(${2a.uri})"
-        name="3a_${2a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-  		<amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:staticallyIncludedDestinations>
-
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${2b.uri})"
-        name="3b_${2b.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-
- 		<amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:staticallyIncludedDestinations>
-
-      </amq:networkConnector>
-
-      <amq:networkConnector uri="static:(${3a.uri})"
-        name="3b_${3a.name}"
-        networkTTL="6"
-        prefetchSize="5"
-        suppressDuplicateTopicSubscriptions="false"
-        suppressDuplicateQueueSubscriptions="false"
-        decreaseNetworkConsumerPriority="true">
-        <amq:excludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.B"/>
-        </amq:excludedDestinations>
-        <amq:staticallyIncludedDestinations>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.1.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.A"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.2.B"/>
-          <amq:queue physicalName="PROD.FUSESOURCE.3.A"/>
-        </amq:staticallyIncludedDestinations>
-       </amq:networkConnector>
-    </amq:networkConnectors>
-
-    <amq:persistenceAdapter>
-       <amq:kahaDB directory="${3b.data}"/>
-    </amq:persistenceAdapter>
-
-	<amq:plugins>
-       	<amq:timeStampingBrokerPlugin futureOnly="true"/>
-	</amq:plugins>
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="${3b.transport}" />
-    </amq:transportConnectors>
-
-  </amq:broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-1.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-1.xml
deleted file mode 100644
index a3123b6..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-1.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="BrokerA" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <networkConnectors>
-      <networkConnector uri="multicast://default?group=${groupId}"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default?group=${groupId}"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-2.xml
deleted file mode 100644
index b97ddb0..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-2.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans>
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="BrokerB" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61617" discoveryUri="multicast://default?group=${groupId}"/>
-    </transportConnectors>
-
-    <networkConnectors>
-      <networkConnector uri="multicast://default?group=${groupId}"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-auto.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-auto.xml
deleted file mode 100644
index 7c298d8..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/multicast-broker-auto.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="BrokerB" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <networkConnectors>
-      <networkConnector uri="multicast://default?group=${groupId}"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default?group=${groupId}"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-activecluster.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-activecluster.xml
deleted file mode 100755
index 719e6d2..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-activecluster.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!DOCTYPE beans PUBLIC  "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
-<beans>
-
-  <broker name="receiver">
-    <connector>
-      <tcpServerTransport uri="tcp://localhost:62002"/>
-    </connector>
-
-    <discoveryAgent>
-      <activeClusterDiscovery uri="multicast://224.1.2.3:2123" subject="org.apache.activemq.discover"/>
-    </discoveryAgent>
-
-    <discoveryNetworkConnector/>
-
-    <persistence>
-      <vmPersistence/>
-    </persistence>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-discovery.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-discovery.xml
deleted file mode 100644
index 9ad519d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-discovery.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="receiver" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <networkConnectors>
-      <networkConnector uri="multicast://default?group=${groupId}"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default?group=${groupId}"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
-        <!-- END SNIPPET: example -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-duplex.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-duplex.xml
deleted file mode 100644
index 9b4750f..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-duplex.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <!-- Allows us to use system properties as variables in this configuration file -->
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-  <broker brokerName="receiver" persistent="false" useJmx="true" xmlns="http://activemq.apache.org/schema/core" >
-  
-    
-
-    <!-- The store and forward broker networks ActiveMQ will listen to -->
-    <networkConnectors>
-    </networkConnectors>
-
-    <!-- The transport connectors ActiveMQ will listen to -->
-    <transportConnectors>
-       <transportConnector uri="tcp://localhost:62002"/>
-    </transportConnectors>
-
-    
-  </broker>
-
-  
-
-</beans>
-
-
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-http.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-http.xml
deleted file mode 100644
index 06aba93..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-http.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-
-  <broker brokerName="receiver" persistent="false" xmlns="http://activemq.apache.org/schema/core">
-    <networkConnectors>
-      <networkConnector uri="static:(http://localhost:62301)"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="http://localhost:62302"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-zeroconf.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-zeroconf.xml
deleted file mode 100755
index 470fe35..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-zeroconf.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC  "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker name="receiver">
-    <connector>
-      <tcpServerTransport uri="tcp://localhost:62002"/>
-    </connector>
-
-    <discoveryAgent>
-      <zeroconfDiscovery type="_activemq.broker.development."/>
-    </discoveryAgent>
-
-    <discoveryNetworkConnector/>
-
-    <persistence>
-      <vmPersistence/>
-    </persistence>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver.xml
deleted file mode 100755
index 50d2db2..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker brokerName="receiver" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:62001)"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62002"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker1.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker1.xml
deleted file mode 100644
index 20a974c..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker1.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<!--
-    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.
--->
-<beans
-	xmlns="http://www.springframework.org/schema/beans"
-	xmlns:amq="http://activemq.apache.org/schema/core"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-						http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-
-	<broker xmlns="http://activemq.apache.org/schema/core"
-		brokerName="replication-broker1"
-        brokerId="replication-broker1"
-		dataDirectory="target/replication-broker1/data"
-		persistent="true"
-		advisorySupport="true">
-
-		<!--
-			For better performances use VM cursor and small memory limit. For
-			more information, see:
-
-			http://activemq.apache.org/message-cursors.html Also, if your
-			producer is "hanging", it's probably due to producer flow control.
-			For more information, see:
-			http://activemq.apache.org/producer-flow-control.html
-		-->
-		<destinationPolicy>
-			<policyMap>
-				<policyEntries>
-					<policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-						<pendingSubscriberPolicy>
-							<vmCursor />
-						</pendingSubscriberPolicy>
-					</policyEntry>
-					<policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb" optimizedDispatch="true">
-						<!--
-							Use VM cursor for better latency For more information, see:
-
-							http://activemq.apache.org/message-cursors.html
-
-							<pendingQueuePolicy> <vmQueueCursor/> </pendingQueuePolicy>
-						-->
-					</policyEntry>
-				</policyEntries>
-			</policyMap>
-		</destinationPolicy>
-
-
-		<networkConnectors>
-            <networkConnector name="broker1-broker2"
-                uri="static:(tcp://localhost:61617)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker1-broker3"
-                uri="static:(tcp://localhost:61618)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker1-broker4"
-                uri="static:(tcp://localhost:61619)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-		</networkConnectors>
-
-		<!--
-			Configure message persistence for the broker. The default persistence
-			mechanism is the KahaDB store (identified by the kahaDB tag). For
-			more information, see: http://activemq.apache.org/persistence.html
-		-->
-		<persistenceAdapter>
-			<kahaDB directory="target/replication-broker1/data/kahadb" />
-		</persistenceAdapter>
-
-		<systemUsage>
-			<amq:systemUsage>
-				<amq:memoryUsage>
-					<amq:memoryUsage limit="700mb" />
-				</amq:memoryUsage>
-				<amq:storeUsage>
-					<amq:storeUsage limit="1gb" name="foo" />
-				</amq:storeUsage>
-				<amq:tempUsage>
-					<amq:tempUsage limit="256mb" />
-				</amq:tempUsage>
-			</amq:systemUsage>
-		</systemUsage>
-
-		<!-- The transport connectors ActiveMQ will listen to -->
-		<transportConnectors>
-            <transportConnector name="tcp" uri="tcp://0.0.0.0:61616" />
-		</transportConnectors>
-	</broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker2.xml
deleted file mode 100644
index 700095e..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker2.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<!--
-    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.
--->
-<beans
-	xmlns="http://www.springframework.org/schema/beans"
-	xmlns:amq="http://activemq.apache.org/schema/core"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-						http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-
-	<broker xmlns="http://activemq.apache.org/schema/core"
-		brokerName="replication-broker2"
-        brokerId="replication-broker2"
-		dataDirectory="target/replication-broker2/data"
-		persistent="true"
-		advisorySupport="true">
-
-		<!--
-			For better performances use VM cursor and small memory limit. For
-			more information, see:
-
-			http://activemq.apache.org/message-cursors.html Also, if your
-			producer is "hanging", it's probably due to producer flow control.
-			For more information, see:
-			http://activemq.apache.org/producer-flow-control.html
-		-->
-		<destinationPolicy>
-			<policyMap>
-				<policyEntries>
-					<policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-						<pendingSubscriberPolicy>
-							<vmCursor />
-						</pendingSubscriberPolicy>
-					</policyEntry>
-					<policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb" optimizedDispatch="true">
-						<!--
-							Use VM cursor for better latency For more information, see:
-
-							http://activemq.apache.org/message-cursors.html
-
-							<pendingQueuePolicy> <vmQueueCursor/> </pendingQueuePolicy>
-						-->
-					</policyEntry>
-				</policyEntries>
-			</policyMap>
-		</destinationPolicy>
-
-		<networkConnectors>
-            <networkConnector name="broker2-broker1"
-                uri="static:(tcp://localhost:61616)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker2-broker3"
-                uri="static:(tcp://localhost:61618)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker2-broker4"
-                uri="static:(tcp://localhost:61619)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-		</networkConnectors>
-
-		<!--
-			Configure message persistence for the broker. The default persistence
-			mechanism is the KahaDB store (identified by the kahaDB tag). For
-			more information, see: http://activemq.apache.org/persistence.html
-		-->
-		<persistenceAdapter>
-			<kahaDB directory="target/replication-broker2/data/kahadb" />
-		</persistenceAdapter>
-
-		<systemUsage>
-			<amq:systemUsage>
-				<amq:memoryUsage>
-					<amq:memoryUsage limit="700mb" />
-				</amq:memoryUsage>
-				<amq:storeUsage>
-					<amq:storeUsage limit="1gb" name="foo" />
-				</amq:storeUsage>
-				<amq:tempUsage>
-					<amq:tempUsage limit="256mb" />
-				</amq:tempUsage>
-			</amq:systemUsage>
-		</systemUsage>
-
-		<!-- The transport connectors ActiveMQ will listen to -->
-		<transportConnectors>
-            <transportConnector name="tcp" uri="tcp://0.0.0.0:61617" />
-		</transportConnectors>
-	</broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker3.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker3.xml
deleted file mode 100644
index f3ee99d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker3.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<!--
-    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.
--->
-<beans
-	xmlns="http://www.springframework.org/schema/beans"
-	xmlns:amq="http://activemq.apache.org/schema/core"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-						http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-
-	<broker xmlns="http://activemq.apache.org/schema/core"
-		brokerName="replication-broker3"
-        brokerId="replication-broker3"
-		dataDirectory="target/replication-broker3/data"
-		persistent="true"
-		advisorySupport="true">
-
-		<!--
-			For better performances use VM cursor and small memory limit. For
-			more information, see:
-
-			http://activemq.apache.org/message-cursors.html Also, if your
-			producer is "hanging", it's probably due to producer flow control.
-			For more information, see:
-			http://activemq.apache.org/producer-flow-control.html
-		-->
-		<destinationPolicy>
-			<policyMap>
-				<policyEntries>
-					<policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-						<pendingSubscriberPolicy>
-							<vmCursor />
-						</pendingSubscriberPolicy>
-					</policyEntry>
-					<policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb" optimizedDispatch="true">
-						<!--
-							Use VM cursor for better latency For more information, see:
-
-							http://activemq.apache.org/message-cursors.html
-
-							<pendingQueuePolicy> <vmQueueCursor/> </pendingQueuePolicy>
-						-->
-					</policyEntry>
-				</policyEntries>
-			</policyMap>
-		</destinationPolicy>
-
-		<networkConnectors>
-            <networkConnector name="broker3-broker1"
-                uri="static:(tcp://localhost:61616)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker3-broker2"
-                uri="static:(tcp://localhost:61617)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker3-broker4"
-                uri="static:(tcp://localhost:61619)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-		</networkConnectors>
-
-		<!--
-			Configure message persistence for the broker. The default persistence
-			mechanism is the KahaDB store (identified by the kahaDB tag). For
-			more information, see: http://activemq.apache.org/persistence.html
-		-->
-		<persistenceAdapter>
-			<kahaDB directory="target/replication-broker3/data/kahadb" />
-		</persistenceAdapter>
-
-		<systemUsage>
-			<amq:systemUsage>
-				<amq:memoryUsage>
-					<amq:memoryUsage limit="700mb" />
-				</amq:memoryUsage>
-				<amq:storeUsage>
-					<amq:storeUsage limit="1gb" name="foo" />
-				</amq:storeUsage>
-				<amq:tempUsage>
-					<amq:tempUsage limit="256mb" />
-				</amq:tempUsage>
-			</amq:systemUsage>
-		</systemUsage>
-
-		<!-- The transport connectors ActiveMQ will listen to -->
-		<transportConnectors>
-            <transportConnector name="tcp" uri="tcp://0.0.0.0:61618" />
-		</transportConnectors>
-	</broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker4.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker4.xml
deleted file mode 100644
index 96b778a..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/replication-broker4.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<!--
-    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.
--->
-<beans
-	xmlns="http://www.springframework.org/schema/beans"
-	xmlns:amq="http://activemq.apache.org/schema/core"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-						http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-
-	<broker xmlns="http://activemq.apache.org/schema/core"
-		brokerName="replication-broker4"
-        brokerId="replication-broker4"
-		dataDirectory="target/replication-broker4/data"
-		persistent="true"
-		advisorySupport="true">
-
-		<!--
-			For better performances use VM cursor and small memory limit. For
-			more information, see:
-
-			http://activemq.apache.org/message-cursors.html Also, if your
-			producer is "hanging", it's probably due to producer flow control.
-			For more information, see:
-			http://activemq.apache.org/producer-flow-control.html
-		-->
-		<destinationPolicy>
-			<policyMap>
-				<policyEntries>
-					<policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-						<pendingSubscriberPolicy>
-							<vmCursor />
-						</pendingSubscriberPolicy>
-					</policyEntry>
-					<policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb" optimizedDispatch="true">
-						<!--
-							Use VM cursor for better latency For more information, see:
-
-							http://activemq.apache.org/message-cursors.html
-
-							<pendingQueuePolicy> <vmQueueCursor/> </pendingQueuePolicy>
-						-->
-					</policyEntry>
-				</policyEntries>
-			</policyMap>
-		</destinationPolicy>
-
-		<networkConnectors>
-            <networkConnector name="broker4-broker1"
-                uri="static:(tcp://localhost:61616)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker4-broker2"
-                uri="static:(tcp://localhost:61617)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-            <networkConnector name="broker4-broker3"
-                uri="static:(tcp://localhost:61618)"
-                dynamicOnly="true"
-                prefetchSize="1000"
-                conduitSubscriptions="true"
-                decreaseNetworkConsumerPriority="true"
-                suppressDuplicateTopicSubscriptions="true"
-                networkTTL="3">
-            </networkConnector>
-		</networkConnectors>
-
-		<!--
-			Configure message persistence for the broker. The default persistence
-			mechanism is the KahaDB store (identified by the kahaDB tag). For
-			more information, see: http://activemq.apache.org/persistence.html
-		-->
-		<persistenceAdapter>
-			<kahaDB directory="target/replication-broker4/data/kahadb" />
-		</persistenceAdapter>
-
-		<systemUsage>
-			<amq:systemUsage>
-				<amq:memoryUsage>
-					<amq:memoryUsage limit="700mb" />
-				</amq:memoryUsage>
-				<amq:storeUsage>
-					<amq:storeUsage limit="1gb" name="foo" />
-				</amq:storeUsage>
-				<amq:tempUsage>
-					<amq:tempUsage limit="256mb" />
-				</amq:tempUsage>
-			</amq:systemUsage>
-		</systemUsage>
-
-		<!-- The transport connectors ActiveMQ will listen to -->
-		<transportConnectors>
-            <transportConnector name="tcp" uri="tcp://0.0.0.0:61619" />
-		</transportConnectors>
-	</broker>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-A.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-A.xml
deleted file mode 100644
index bc367f7..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-A.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-	<!--
-		The <broker> element is used to configure the ActiveMQ broker.
-	-->
-	<broker xmlns="http://activemq.apache.org/schema/core"
-		brokerName="broker-A" dataDirectory="target/durable-data-A" persistent="false" useJmx="false">
-
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry topic=">" enableAudit="true">
-                        <dispatchPolicy>
-                            <priorityNetworkDispatchPolicy/>
-                        </dispatchPolicy>
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-		
-		<!--  connect to B and C-->
-        <networkConnectors>
-            <networkConnector uri="static:(tcp://localhost:61617)" name="A-B" networkTTL="2" suppressDuplicateTopicSubscriptions="false" />
-            <networkConnector uri="static:(tcp://localhost:61618)" name="A-C" networkTTL="2" suppressDuplicateTopicSubscriptions="false" />
-        </networkConnectors>
-
-		<transportConnectors>
-			<transportConnector name="openwire" uri="tcp://0.0.0.0:61616" />
-		</transportConnectors>
-		
-	</broker>
-    
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-B.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-B.xml
deleted file mode 100644
index 524a338..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-B.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core"
-        brokerName="broker-B" dataDirectory="target/durable-data-B" persistent="false" useJmx="false">
-        
-        <!--  connect to D -->
-        <networkConnectors>
-            <networkConnector uri="static:(tcp://localhost:61619)" name="B-D" networkTTL="2" />
-        </networkConnectors>
-
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61617" />
-        </transportConnectors>
-
-    </broker>
-    
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-C.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-C.xml
deleted file mode 100644
index 8c5c810..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-C.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core"
-        brokerName="broker-C" dataDirectory="target/durable-data-C" persistent="false" useJmx="false">
-
-        
-        <!--  connect to D -->
-        <networkConnectors>
-            <networkConnector uri="static:(tcp://localhost:61619)" name="C-D" networkTTL="2" />
-        </networkConnectors>                
-
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618" />
-        </transportConnectors>
-
-    </broker>
-    
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-D.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-D.xml
deleted file mode 100644
index 8a2de52..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rerouting-activemq-D.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!--
-        The <broker> element is used to configure the ActiveMQ broker.
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core"
-        brokerName="broker-D" dataDirectory="target/durable-data-D" persistent="false" useJmx="false">
-
-
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry topic=">" enableAudit="true"/>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61619" />
-        </transportConnectors>
-
-    </broker>
-    
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-activecluster.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-activecluster.xml
deleted file mode 100755
index 38f7a3c..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-activecluster.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC  "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker name="sender">
-    <connector>
-      <tcpServerTransport uri="tcp://localhost:62001"/>
-    </connector>
-
-    <discoveryAgent>
-      <activeClusterDiscovery uri="multicast://224.1.2.3:2123" subject="org.apache.activemq.discover"/>
-    </discoveryAgent>
-
-    <discoveryNetworkConnector/>
-
-    <persistence>
-      <vmPersistence/>
-    </persistence>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-discovery.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-discovery.xml
deleted file mode 100644
index 5319b39..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-discovery.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="sender" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <networkConnectors>
-      <networkConnector uri="multicast://default?group=${groupId}"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default?group=${groupId}"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-duplex.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-duplex.xml
deleted file mode 100644
index 856d86d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-duplex.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--

-    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.

--->

-<beans 

-  xmlns="http://www.springframework.org/schema/beans" 

-  xmlns:amq="http://activemq.apache.org/schema/core"

-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

-

-  <!-- Allows us to use system properties as variables in this configuration file -->

-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

-  

-  <broker brokerName="sender" persistent="false" useJmx="true" xmlns="http://activemq.apache.org/schema/core" > <!-- dataDirectory="${activemq.base}/data"> -->

-  

-   

-    <!-- The store and forward broker networks ActiveMQ will listen to -->

-    <networkConnectors>

-      <!-- by default just auto discover the other brokers -->

-      <networkConnector name="monitoring" uri="static:(tcp://localhost:62002)" duplex="true" >

-      	<dynamicallyIncludedDestinations>

-      		<queue physicalName="include.test.foo"/>

-      		<topic physicalName="include.test.bar"/>

-      	</dynamicallyIncludedDestinations>

-        <excludedDestinations>

-      		<queue physicalName="exclude.test.foo"/>

-      		<topic physicalName="exclude.test.bar"/>

-      	</excludedDestinations>

-        <staticallyIncludedDestinations>

-      		<queue physicalName="always.include.queue"/>

-      		<topic physicalName="always.include.topic"/>

-      	</staticallyIncludedDestinations>

-

-      </networkConnector>

-    </networkConnectors>

-

-

-

-    <!-- The transport connectors ActiveMQ will listen to -->

-    <transportConnectors>

-       <transportConnector uri="tcp://localhost:62001"/>

-    </transportConnectors>

-  

-      

-  </broker>

-

- 

-</beans>

-

-

diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-http.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-http.xml
deleted file mode 100644
index b5f5cea..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-http.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker brokerName="sender" persistent="false" xmlns="http://activemq.apache.org/schema/core">
-    <transportConnectors>
-      <transportConnector uri="http://localhost:62301"/>
-    </transportConnectors>
-
-    <networkConnectors>
-      <networkConnector uri="static:(http://localhost:62302)"/>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-zeroconf.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-zeroconf.xml
deleted file mode 100755
index aa69556..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender-zeroconf.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC  "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker name="sender">
-    <connector>
-      <tcpServerTransport uri="tcp://localhost:62001"/>
-    </connector>
-
-    <discoveryAgent>
-      <zeroconfDiscovery type="_activemq.broker.development."/>
-    </discoveryAgent>
-
-    <discoveryNetworkConnector/>
-
-    <persistence>
-      <vmPersistence/>
-    </persistence>
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml
deleted file mode 100755
index c83d89b..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/sender.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <broker brokerName="sender" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <networkConnectors>
-      <networkConnector uri="static:(tcp://localhost:62002)">
-        <staticallyIncludedDestinations>
-          <topic physicalName=">"/>
-        </staticallyIncludedDestinations>
-      </networkConnector>
-    </networkConnectors>
-
-    <persistenceAdapter>
-      <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:62001"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/util/plugin-broker.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/util/plugin-broker.xml
deleted file mode 100644
index 598ba92..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/util/plugin-broker.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <plugins>
-    
-      <!-- lets enable detailed logging in the broker but ignore ConnectionEvents -->
-      <loggingBrokerPlugin logAll="true" logConnectionEvents="false"/>
-      
-      <timeStampingBrokerPlugin zeroExpirationOverride="1000" ttlCeiling="60000" futureOnly="true"/>
-      
-      <traceBrokerPathPlugin/>
-      
-    </plugins>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq-policy.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq-policy.xml
deleted file mode 100644
index 1188734..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq-policy.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker persistent="false" brokerName="${brokername}" xmlns="http://activemq.apache.org/schema/core">
-
-    <!--  lets define the dispatch policy -->
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-          <policyEntry topic="FOO.>">
-            <dispatchPolicy>
-              <roundRobinDispatchPolicy />
-            </dispatchPolicy>
-            <subscriptionRecoveryPolicy>
-              <lastImageSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-
-          <policyEntry topic="ORDERS.>">
-            <dispatchPolicy>
-              <strictOrderDispatchPolicy />
-            </dispatchPolicy>
-            <!--  1 minutes worth -->
-            <subscriptionRecoveryPolicy>
-              <timedSubscriptionRecoveryPolicy recoverDuration="60000" />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-
-          <policyEntry topic="PRICES.>">
-
-            <!-- lets force old messages to be discarded for slow consumers -->
-            <pendingMessageLimitStrategy>
-              <constantPendingMessageLimitStrategy limit="10"/>
-            </pendingMessageLimitStrategy>
-
-            <!--  10 seconds worth -->
-            <subscriptionRecoveryPolicy>
-              <timedSubscriptionRecoveryPolicy recoverDuration="10000" />
-            </subscriptionRecoveryPolicy>
-            
-          </policyEntry>
-          <policyEntry tempTopic="true" advisoryForConsumed="true" />
-
-          <policyEntry tempQueue="true" advisoryForConsumed="true" />
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq.xml
deleted file mode 100644
index 375a5a3..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: example -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core">
-
-    <networkConnectors>
-      <!-- 
-      <networkConnector uri="multicast://default?initialReconnectDelay=100" />
-      <networkConnector uri="static://(tcp://localhost:61616)" />
-       -->
-    </networkConnectors>
-
-    <persistenceFactory>
-      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="${basedir}/target/foo" />
-      
-      <!-- To use a different dataSource, use the following syntax : -->
-      <!-- 
-      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="${basedir}/activemq-data" dataSource="#mysql-ds"/>
-       -->
-    </persistenceFactory>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61636" />
-    </transportConnectors>
-
-  </broker>
-
-  <!-- MySql DataSource Sample Setup -->
-  <!-- 
-  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
-    <property name="username" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-  -->  
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq2.xml
deleted file mode 100644
index 78d1995..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/activemq2.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <!-- for easier integration with the JUnit tests, lets not start the broker when the ApplicationContext starts -->
-  <broker useJmx="true" start="false" xmlns="http://activemq.apache.org/schema/core">
-    <destinationPolicy>
-      <policyMap>
-        <policyEntries>
-
-          <policyEntry topic="FOO.>">
-            <dispatchPolicy>
-              <strictOrderDispatchPolicy />
-            </dispatchPolicy>
-            <subscriptionRecoveryPolicy>
-              <lastImageSubscriptionRecoveryPolicy />
-            </subscriptionRecoveryPolicy>
-          </policyEntry>
-        </policyEntries>
-      </policyMap>
-    </destinationPolicy>
-
-
-    <persistenceFactory>
-      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="${basedir}/target/data" />
-    </persistenceFactory>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616" />
-    </transportConnectors>
-
-  </broker>
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/connector-test.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/connector-test.xml
deleted file mode 100644
index 99dd04f..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/connector-test.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core">
-
-
-    <networkConnectors>
-      <networkConnector uri="static://(tcp://localhost:61616)">
-      	<dynamicallyIncludedDestinations>
-      		<queue physicalName="include.test.foo"/>
-      		<topic physicalName="include.test.bar"/>
-      	</dynamicallyIncludedDestinations>
-      	<excludedDestinations>
-      		<queue physicalName="exclude.test.foo"/>
-      		<topic physicalName="exclude.test.bar"/>
-      	</excludedDestinations>
-      </networkConnector>
-    </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61636" />
-    </transportConnectors>
-	
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/jdbc-persistence-test.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/jdbc-persistence-test.xml
deleted file mode 100644
index d00a8b9..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/jdbc-persistence-test.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <persistenceFactory>
-      <journalPersistenceAdapterFactory useJournal="false">
-        <statements>
-          <statements tablePrefix="BROKER1."/>
-        </statements>
-      </journalPersistenceAdapterFactory>
-    </persistenceFactory>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/management-context-test.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/management-context-test.xml
deleted file mode 100644
index 98f8c0f..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/management-context-test.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- this file can only be parsed using the xbean-spring library -->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-  <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core">
-    <managementContext>
-      <managementContext createConnector="true" connectorPort="2011" jmxDomainName="test.domain">
-          <property xmlns="http://www.springframework.org/schema/beans" name="environment">
-              <map xmlns="http://www.springframework.org/schema/beans">
-				<entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.password.file" value="src/test/resources/jmx.password"/>
-				<entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.access.file" value="src/test/resources/jmx.access"/>
-              </map>
-          </property>
-      </managementContext>
-    </managementContext>
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/spring.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/spring.xml
deleted file mode 100644
index ef37855..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/spring.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- START SNIPPET: spring -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-
-  <!-- an embedded broker -->
-
-  <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
-    <property name="config" value="classpath:org/apache/activemq/xbean/activemq.xml" />
-  </bean>
-
-  <!-- JMS ConnectionFactory to use -->
-  <bean id="jmsFactory"
-    class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="tcp://localhost:61636"/>
-  </bean>
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate"
-    class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean
-        class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory" ref="jmsFactory" />
-      </bean>
-    </property>
-  </bean>
-  
-  <bean id="consumerJmsTemplate"
-    class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template" ref="myJmsTemplate" />
-    <property name="destination" ref="destination" />
-    <property name="messageCount" value="10" />
-  </bean>
-
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template" ref="consumerJmsTemplate" />
-    <property name="destination" ref="destination" />
-  </bean>
-
-  <bean id="destination" class="org.apache.activemq.command.ActiveMQTopic"
-    autowire="constructor">
-    <constructor-arg value="org.apache.activemq.spring.Test.spring.topic" />
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/spring2.xml b/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/spring2.xml
deleted file mode 100644
index 395e24d..0000000
--- a/trunk/activemq-core/src/test/resources/org/apache/activemq/xbean/spring2.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans default-autowire="autodetect">
-  <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
-    <property name="config" value="classpath:org/apache/activemq/xbean/activemq2.xml" />
-  </bean>
-</beans>
diff --git a/trunk/activemq-core/src/test/resources/server.keystore b/trunk/activemq-core/src/test/resources/server.keystore
deleted file mode 100755
index d9223d8..0000000
--- a/trunk/activemq-core/src/test/resources/server.keystore
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-core/src/test/resources/spring-embedded-xbean-bean-ref.xml b/trunk/activemq-core/src/test/resources/spring-embedded-xbean-bean-ref.xml
deleted file mode 100644
index b6daf72..0000000
--- a/trunk/activemq-core/src/test/resources/spring-embedded-xbean-bean-ref.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- START SNIPPET: spring -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <bean id="store" class="org.apache.activemq.store.kahadb.KahaDBStore" >
-      <property name="directory" value="target/amqdata/kahadb" />
-      <property name="journalMaxFileLength" value="1000000" />
-      <property name="checkpointInterval" value="5000" />
-      <property name="cleanupInterval" value="5000" />
-
-      <property name="indexWriteBatchSize" value="100" />
-      <property name="enableIndexWriteAsync" value="true" />
-
-    </bean>
-
-    <amq:broker
-          persistent="true"
-          advisorySupport="false"
-          dataDirectory="target/amqdata"
-          deleteAllMessagesOnStartup="true"
-          useJmx="true"
-          brokerName="localhost"
-          monitorConnectionSplits="false"
-          splitSystemUsageForProducersConsumers="false"
-          start="true"
-          persistenceAdapter="#store">
-          
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:0" />
-    </amq:transportConnectors>
-  </amq:broker>
-
-   <!--  ActiveMQ destinations to use  -->
-  <amq:queue id="destination"  physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
-
-  <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
-  <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
-  
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref local="jmsFactory" />
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination" />
-    </property>
-
-    <property name="messageCount">
-      <value>10</value>
-    </property>
-  </bean>
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template" ref="consumerJmsTemplate"/>
-    <property name="destination" ref="destination"/>
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/spring-embedded-xbean-local.xml b/trunk/activemq-core/src/test/resources/spring-embedded-xbean-local.xml
deleted file mode 100644
index ae3652c..0000000
--- a/trunk/activemq-core/src/test/resources/spring-embedded-xbean-local.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  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.

--->

-

-<!-- START SNIPPET: spring -->

-<beans 

-  xmlns="http://www.springframework.org/schema/beans" 

-  xmlns:amq="http://activemq.apache.org/schema/core"

-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 

-  http://activemq.apache.org/schema/core classpath:activemq.xsd">

-  

-  <!--  lets create an embedded ActiveMQ Broker -->

-  <amq:broker useJmx="false" persistent="false">

-    <amq:transportConnectors>

-      <amq:transportConnector uri="tcp://localhost:0" />

-    </amq:transportConnectors>

-  </amq:broker>

-

-   <!--  ActiveMQ destinations to use  -->

-  <amq:queue id="destination"  physicalName="org.apache.activemq.spring.Test.spring.embedded"/>

-

-  <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->

-  <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>

-  

-

-  <!-- Spring JMS Template -->

-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">

-    <property name="connectionFactory">

-      <!-- lets wrap in a pool to avoid creating a connection per send -->

-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">

-        <property name="targetConnectionFactory">

-          <ref local="jmsFactory" />

-        </property>

-      </bean>

-    </property>

-  </bean>

-

-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">

-    <property name="connectionFactory" ref="jmsFactory"/>

-  </bean>

-

-  <!-- a sample POJO which uses a Spring JmsTemplate -->

-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">

-    <property name="template">

-      <ref bean="myJmsTemplate"></ref>

-    </property>

-

-    <property name="destination">

-      <ref bean="destination" />

-    </property>

-

-    <property name="messageCount">

-      <value>10</value>

-    </property>

-  </bean>

-

-  <!-- a sample POJO consumer -->

-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">

-    <property name="template" ref="consumerJmsTemplate"/>

-    <property name="destination" ref="destination"/>

-  </bean>

-

-</beans>

-

-<!-- END SNIPPET: spring -->

diff --git a/trunk/activemq-core/src/test/resources/spring-embedded-xbean-noversion.xml b/trunk/activemq-core/src/test/resources/spring-embedded-xbean-noversion.xml
deleted file mode 100755
index e21073c..0000000
--- a/trunk/activemq-core/src/test/resources/spring-embedded-xbean-noversion.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- START SNIPPET: spring -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <!--  lets create an embedded ActiveMQ Broker -->
-  <amq:broker useJmx="false" persistent="false">
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:0" />
-    </amq:transportConnectors>
-  </amq:broker>
-
-   <!--  ActiveMQ destinations to use  -->
-  <amq:queue id="destination"  physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
-
-  <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
-  <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
-  
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref local="jmsFactory" />
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination" />
-    </property>
-
-    <property name="messageCount">
-      <value>10</value>
-    </property>
-  </bean>
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template" ref="consumerJmsTemplate"/>
-    <property name="destination" ref="destination"/>
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/spring-embedded-xbean.xml b/trunk/activemq-core/src/test/resources/spring-embedded-xbean.xml
deleted file mode 100755
index e21073c..0000000
--- a/trunk/activemq-core/src/test/resources/spring-embedded-xbean.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- START SNIPPET: spring -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <!--  lets create an embedded ActiveMQ Broker -->
-  <amq:broker useJmx="false" persistent="false">
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:0" />
-    </amq:transportConnectors>
-  </amq:broker>
-
-   <!--  ActiveMQ destinations to use  -->
-  <amq:queue id="destination"  physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
-
-  <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
-  <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
-  
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref local="jmsFactory" />
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination" />
-    </property>
-
-    <property name="messageCount">
-      <value>10</value>
-    </property>
-  </bean>
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template" ref="consumerJmsTemplate"/>
-    <property name="destination" ref="destination"/>
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/spring-embedded.xml b/trunk/activemq-core/src/test/resources/spring-embedded.xml
deleted file mode 100755
index 39f0950..0000000
--- a/trunk/activemq-core/src/test/resources/spring-embedded.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- START SNIPPET: spring -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-
-    <bean id="brokerContainer" class="org.apache.activemq.xbean.BrokerFactoryBean">
-      <property name="config" value="classpath:activemq.xml"/>
-    </bean>
-
-    <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
-    <bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-        <property name="brokerURL" value="vm://localhost" />
-    </bean>
-
-    <!-- Spring JMS Template -->
-    <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-        <property name="connectionFactory">
-            <!-- lets wrap in a pool to avoid creating a connection per send -->
-            <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-                <property name="targetConnectionFactory">
-                    <ref local="jmsFactory"/>
-                </property>
-            </bean>
-        </property>
-    </bean>
-    
-    <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-        <property name="connectionFactory" ref="jmsFactory"/>
-    </bean>
-
-    <!-- a sample POJO which uses a Spring JmsTemplate -->
-    <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-        <property name="template">
-            <ref bean="myJmsTemplate"></ref>
-        </property>
-
-        <property name="destination">
-            <ref bean="destination"/>
-        </property>
-
-        <property name="messageCount">
-            <value>10</value>
-        </property>
-    </bean>
-
-
-    <!-- a sample POJO consumer -->
-    <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-        <property name="template">
-            <ref bean="consumerJmsTemplate"></ref>
-        </property>
-
-        <property name="destination">
-            <ref bean="destination"/>
-        </property>
-    </bean>
-
-    <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue" autowire="constructor">
-        <constructor-arg>
-            <value>org.apache.activemq.spring.Test.spring.embedded</value>
-        </constructor-arg>
-    </bean>
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/spring-jndi.xml b/trunk/activemq-core/src/test/resources/spring-jndi.xml
deleted file mode 100755
index 4ad519b..0000000
--- a/trunk/activemq-core/src/test/resources/spring-jndi.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- START SNIPPET: spring -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-  <!-- create a JNDI initial template already prepopulated with
-    || ActiveMQ's ConnectionFactory and some destinations. This setting also
-    uses the Provider url configured in /resource/jndi.properties.
-  -->
-
-  <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
-    <property name="environment">
-      <props>
-        <prop key="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</prop>
-        <!-- lets register some destinations -->
-        <prop key="topic.MyTopic">example.Spring.MyTopic</prop>
-      </props>
-    </property>
-  </bean>
-
-  <!-- look up the JMS ConnectionFactory in JNDI -->
-  <bean id="myConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
-    <property name="jndiTemplate">
-      <ref bean="jndiTemplate"/>
-    </property>
-    <property name="jndiName">
-      <value>ConnectionFactory</value>
-    </property>
-  </bean>
-
-  <!-- look up the Destination in JNDI -->
-  <bean id="myDestination" class="org.springframework.jndi.JndiObjectFactoryBean">
-    <property name="jndiTemplate">
-      <ref bean="jndiTemplate"/>
-    </property>
-    <property name="jndiName">
-      <value>MyTopic</value>
-    </property>
-  </bean>
-
-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="pubSubDomain">
-      <value>true</value>
-    </property>
-    <property name="connectionFactory">
-
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref bean="myConnectionFactory"/>
-        </property>
-      </bean>
-    </property>
-    <property name="defaultDestination">
-      <ref bean="myDestination"/>
-    </property>
-  </bean>
-
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="pubSubDomain">
-      <value>true</value>
-    </property>
-    <property name="connectionFactory" ref="myConnectionFactory"/>
-    <property name="defaultDestination">
-      <ref bean="myDestination"/>
-    </property>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="myDestination"/>
-    </property>
-
-    <property name="messageCount">
-      <value>10</value>
-    </property>
-  </bean>
-
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template">
-      <ref bean="consumerJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="myDestination"/>
-    </property>
-  </bean>
-
-  <bean id="destination" class="org.apache.activemq.command.ActiveMQTopic" autowire="constructor">
-    <constructor-arg>
-      <value>example.Spring.MyTopic</value>
-    </constructor-arg>
-  </bean>
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/spring-queue.xml b/trunk/activemq-core/src/test/resources/spring-queue.xml
deleted file mode 100755
index 94c31a2..0000000
--- a/trunk/activemq-core/src/test/resources/spring-queue.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- START SNIPPET: spring -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-  <!-- JMS ConnectionFactory to use -->
-  <bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="vm://localhost?broker.deleteAllMessagesOnStartup=true"/>
-  </bean>
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref local="jmsFactory"/>
-        </property>
-      </bean>
-    </property>
-    <property name="pubSubDomain">
-      <value>false</value>
-    </property>
-  </bean>
-
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-    <property name="pubSubDomain">
-      <value>false</value>
-    </property>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination"/>
-    </property>
-
-    <property name="messageCount">
-      <value>10</value>
-    </property>
-  </bean>
-
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template">
-      <ref bean="consumerJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination"/>
-    </property>
-  </bean>
-
-
-  <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue" autowire="constructor">
-    <constructor-arg>
-      <value>org.apache.activemq.spring.Test.spring.queue</value>
-    </constructor-arg>
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-core/src/test/resources/spring-start-false.xml b/trunk/activemq-core/src/test/resources/spring-start-false.xml
deleted file mode 100644
index 447921e..0000000
--- a/trunk/activemq-core/src/test/resources/spring-start-false.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- START SNIPPET: spring -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <bean id="store" class="org.apache.activemq.store.kahadb.KahaDBStore" >
-      <property name="directory" value="target/amqdata/kahadb" />
-      <property name="journalMaxFileLength" value="1000000" />
-      <property name="checkpointInterval" value="5000" />
-      <property name="cleanupInterval" value="5000" />
-
-      <property name="indexWriteBatchSize" value="100" />
-      <property name="enableIndexWriteAsync" value="true" />
-
-    </bean>
-
-    <amq:broker
-          persistent="true"
-          advisorySupport="false"
-          dataDirectory="target/amqdata"
-          deleteAllMessagesOnStartup="true"
-          useJmx="true"
-          brokerName="localhost"
-          monitorConnectionSplits="false"
-          splitSystemUsageForProducersConsumers="false"
-          start="false"
-          persistenceAdapter="#store">
-          
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:0" />
-    </amq:transportConnectors>
-  </amq:broker>
-  
-</beans>
\ No newline at end of file
diff --git a/trunk/activemq-core/src/test/resources/spring.xml b/trunk/activemq-core/src/test/resources/spring.xml
deleted file mode 100755
index 51eb08d..0000000
--- a/trunk/activemq-core/src/test/resources/spring.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- START SNIPPET: spring -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-  <!-- JMS ConnectionFactory to use -->
-  <bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="vm://localhost?broker.deleteAllMessagesOnStartup=true" />
-  </bean>
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref local="jmsFactory"/>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination"/>
-    </property>
-
-    <property name="messageCount">
-      <value>10</value>
-    </property>
-  </bean>
-
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template">
-      <ref bean="consumerJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination"/>
-    </property>
-  </bean>
-
-  <bean id="destination" class="org.apache.activemq.command.ActiveMQTopic" autowire="constructor">
-    <constructor-arg>
-      <value>org.apache.activemq.spring.Test.spring.topic</value>
-    </constructor-arg>
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-fileserver/pom.xml b/trunk/activemq-fileserver/pom.xml
deleted file mode 100755
index a2115fa..0000000
--- a/trunk/activemq-fileserver/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-fileserver</artifactId>
-  <packaging>war</packaging>
-  <name>ActiveMQ :: File Server</name>
-  <description>Web File Server for out of band large message exchange</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>jetty-maven-plugin</artifactId>
-        <version>${jetty-version}</version>
-        <configuration>
-          <connectors>
-            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
-              <port>${jetty.port}</port>
-              <maxIdleTime>60000</maxIdleTime>
-            </connector>
-          </connectors>
-          <scanIntervalSeconds>10</scanIntervalSeconds>
-        </configuration>
-      </plugin>
-
-    <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <excludes>
-            <exclude>**/RestFilterTest.*</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-  
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    
-    <!-- web container -->
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-servlet_2.5_spec</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-
-    <!-- used for testing -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>    
-
-    <dependency>
-      <groupId>org.eclipse.jetty.aggregate</groupId>
-      <artifactId>jetty-all-server</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    
-  </dependencies>
-
-  <properties>
-    <jetty.port>8080</jetty.port>
-  </properties>
-</project>
diff --git a/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java b/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java
deleted file mode 100644
index 099fa41..0000000
--- a/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class FilenameGuardFilter implements Filter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FilenameGuardFilter.class);
-    
-    public void destroy() {
-        // nothing to destroy
-    }
-
-    public void init(FilterConfig config) throws ServletException {
-        // nothing to init
-    }
-
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
-        if (request instanceof HttpServletRequest) {
-            HttpServletRequest httpRequest = (HttpServletRequest)request;
-            GuardedHttpServletRequest guardedRequest = new GuardedHttpServletRequest(httpRequest);
-            chain.doFilter(guardedRequest, response);
-        } else {
-            chain.doFilter(request, response);
-        }
-    }
-
-    private static class GuardedHttpServletRequest extends HttpServletRequestWrapper {
-
-        public GuardedHttpServletRequest(HttpServletRequest httpRequest) {
-            super(httpRequest);
-        }
-
-        private String guard(String filename) {
-            String guarded = filename.replace(":", "_");
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("guarded " + filename + " to " + guarded);
-            }
-            return guarded;
-        }
-
-        @Override
-        public String getParameter(String name) {
-            if (name.equals("Destination")) {
-                return guard(super.getParameter(name));
-            } else {
-                return super.getParameter(name);
-            }
-        }
-
-        @Override
-        public String getPathInfo() {
-            return guard(super.getPathInfo());
-        }
-
-        @Override
-        public String getPathTranslated() {
-            return guard(super.getPathTranslated());
-        }
-
-        @Override
-        public String getRequestURI() {
-            return guard(super.getRequestURI());
-        }
-    }
-}
diff --git a/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/IOHelper.java b/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/IOHelper.java
deleted file mode 100644
index 90149f5..0000000
--- a/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/IOHelper.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * 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.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * 
- */
-public final class IOHelper {
-    protected static final int MAX_DIR_NAME_LENGTH;
-    protected static final int MAX_FILE_NAME_LENGTH;
-    private static final int DEFAULT_BUFFER_SIZE = 4096;
-    private IOHelper() {
-    }
-
-    public static String getDefaultDataDirectory() {
-        return getDefaultDirectoryPrefix() + "activemq-data";
-    }
-
-    public static String getDefaultStoreDirectory() {
-        return getDefaultDirectoryPrefix() + "amqstore";
-    }
-
-    /**
-     * Allows a system property to be used to overload the default data
-     * directory which can be useful for forcing the test cases to use a target/
-     * prefix
-     */
-    public static String getDefaultDirectoryPrefix() {
-        try {
-            return System.getProperty("org.apache.activemq.default.directory.prefix", "");
-        } catch (Exception e) {
-            return "";
-        }
-    }
-    
-    public static boolean deleteFile(File fileToDelete) {
-        if (fileToDelete == null || !fileToDelete.exists()) {
-            return true;
-        }
-        boolean result = deleteChildren(fileToDelete);
-        result &= fileToDelete.delete();
-        return result;
-    }
-    
-    public static boolean deleteChildren(File parent) {
-        if (parent == null || !parent.exists()) {
-            return false;
-        }
-        boolean result = true;
-        if (parent.isDirectory()) {
-            File[] files = parent.listFiles();
-            if (files == null) {
-                result = false;
-            } else {
-                for (int i = 0; i < files.length; i++) {
-                    File file = files[i];
-                    if (file.getName().equals(".")
-                            || file.getName().equals("..")) {
-                        continue;
-                    }
-                    if (file.isDirectory()) {
-                        result &= deleteFile(file);
-                    } else {
-                        result &= file.delete();
-                    }
-                }
-            }
-        }
-       
-        return result;
-    }
-    
-    
-    public static void moveFile(File src, File targetDirectory) throws IOException {
-        if (!src.renameTo(new File(targetDirectory, src.getName()))) {
-            throw new IOException("Failed to move " + src + " to " + targetDirectory);
-        }
-    }
-    
-    public static void copyFile(File src, File dest) throws IOException {
-        FileInputStream fileSrc = new FileInputStream(src);
-        FileOutputStream fileDest = new FileOutputStream(dest);
-        copyInputStream(fileSrc, fileDest);
-    }
-    
-    public static void copyInputStream(InputStream in, OutputStream out) throws IOException {
-        byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
-        int len = in.read(buffer);
-        while (len >= 0) {
-            out.write(buffer, 0, len);
-            len = in.read(buffer);
-        }
-        in.close();
-        out.close();
-    }
-    
-    static {
-        MAX_DIR_NAME_LENGTH = Integer.valueOf(System.getProperty("MaximumDirNameLength","200")).intValue();  
-        MAX_FILE_NAME_LENGTH = Integer.valueOf(System.getProperty("MaximumFileNameLength","64")).intValue();             
-    }
-
-    
-    public static void mkdirs(File dir) throws IOException {
-        if (dir.exists()) {
-            if (!dir.isDirectory()) {
-                throw new IOException("Failed to create directory '" + dir +"', regular file already existed with that name");
-            }
-            
-        } else {
-            if (!dir.mkdirs()) {
-                throw new IOException("Failed to create directory '" + dir+"'");
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java b/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java
deleted file mode 100644
index 9c19f5b..0000000
--- a/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * 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.
- */
-//========================================================================
-//Copyright 2007 CSC - Scientific Computing Ltd.
-//========================================================================
-package org.apache.activemq.util;
-
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.UnavailableException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * <p>
- * Adds support for HTTP PUT, MOVE and DELETE methods. If init parameters
- * read-permission-role and write-permission-role are defined then all requests
- * are authorized using the defined roles. Also GET methods are authorized.
- * </p>
- * 
- * @author Aleksi Kallio
- */
-public class RestFilter implements Filter {
-    private static final Logger LOG = LoggerFactory.getLogger(RestFilter.class);
-
-    private static final String HTTP_HEADER_DESTINATION = "Destination";
-    private static final String HTTP_METHOD_MOVE = "MOVE";
-    private static final String HTTP_METHOD_PUT = "PUT";
-    private static final String HTTP_METHOD_GET = "GET";
-    private static final String HTTP_METHOD_DELETE = "DELETE";
-
-    private String readPermissionRole;
-    private String writePermissionRole;
-    private FilterConfig filterConfig;
-
-    public void init(FilterConfig filterConfig) throws UnavailableException {
-        this.filterConfig = filterConfig;
-        readPermissionRole = filterConfig.getInitParameter("read-permission-role");
-        writePermissionRole = filterConfig.getInitParameter("write-permission-role");
-    }
-
-    private File locateFile(HttpServletRequest request) {
-        return new File(filterConfig.getServletContext().getRealPath(request.getServletPath()), request.getPathInfo());
-    }
-
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
-        if (!(request instanceof HttpServletRequest && response instanceof HttpServletResponse)) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("request not HTTP, can not understand: " + request.toString());
-            }
-            chain.doFilter(request, response);
-            return;
-        }
-
-        HttpServletRequest httpRequest = (HttpServletRequest)request;
-        HttpServletResponse httpResponse = (HttpServletResponse)response;
-
-        if (httpRequest.getMethod().equals(HTTP_METHOD_MOVE)) {
-            doMove(httpRequest, httpResponse);
-        } else if (httpRequest.getMethod().equals(HTTP_METHOD_PUT)) {
-            doPut(httpRequest, httpResponse);
-        } else if (httpRequest.getMethod().equals(HTTP_METHOD_GET)) {
-            if (checkGet(httpRequest, httpResponse)) {
-                chain.doFilter(httpRequest, httpResponse); // actual processing
-                                                            // done elsewhere
-            }
-        } else if (httpRequest.getMethod().equals(HTTP_METHOD_DELETE)) {
-            doDelete(httpRequest, httpResponse);
-        } else {
-            chain.doFilter(httpRequest, httpResponse);
-        }
-    }
-
-    protected void doMove(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("RESTful file access: MOVE request for " + request.getRequestURI());
-        }
-
-        if (writePermissionRole != null && !request.isUserInRole(writePermissionRole)) {
-            response.sendError(HttpURLConnection.HTTP_FORBIDDEN);
-            return;
-        }
-
-        File file = locateFile(request);
-        String destination = request.getHeader(HTTP_HEADER_DESTINATION);
-
-        if (destination == null) {
-            response.sendError(HttpURLConnection.HTTP_BAD_REQUEST, "Destination header not found");
-            return;
-        }
-
-        try {
-            URL destinationUrl = new URL(destination);
-            IOHelper.copyFile(file, new File(destinationUrl.getFile()));
-            IOHelper.deleteFile(file);
-        } catch (IOException e) {
-            response.sendError(HttpURLConnection.HTTP_INTERNAL_ERROR); // file
-                                                                        // could
-                                                                        // not
-                                                                        // be
-                                                                        // moved
-            return;
-        }
-
-        response.setStatus(HttpURLConnection.HTTP_NO_CONTENT); // we return no
-                                                                // content
-    }
-
-    protected boolean checkGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("RESTful file access: GET request for " + request.getRequestURI());
-        }
-
-        if (readPermissionRole != null && !request.isUserInRole(readPermissionRole)) {
-            response.sendError(HttpURLConnection.HTTP_FORBIDDEN);
-            return false;
-        } else {
-            return true;
-        }
-    }
-
-    protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("RESTful file access: PUT request for " + request.getRequestURI());
-        }
-
-        if (writePermissionRole != null && !request.isUserInRole(writePermissionRole)) {
-            response.sendError(HttpURLConnection.HTTP_FORBIDDEN);
-            return;
-        }
-
-        File file = locateFile(request);
-
-        if (file.exists()) {
-            boolean success = file.delete(); // replace file if it exists
-            if (!success) {
-                response.sendError(HttpURLConnection.HTTP_INTERNAL_ERROR); // file
-                                                                            // existed
-                                                                            // and
-                                                                            // could
-                                                                            // not
-                                                                            // be
-                                                                            // deleted
-                return;
-            }
-        }
-
-        FileOutputStream out = new FileOutputStream(file);
-        try {
-            IOHelper.copyInputStream(request.getInputStream(), out);
-        } catch (IOException e) {
-            LOG.warn("Exception occured" , e);
-            out.close();
-            throw e;
-        }
-
-        response.setStatus(HttpURLConnection.HTTP_NO_CONTENT); // we return no
-                                                                // content
-    }
-
-    protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("RESTful file access: DELETE request for " + request.getRequestURI());
-        }
-
-        if (writePermissionRole != null && !request.isUserInRole(writePermissionRole)) {
-            response.sendError(HttpURLConnection.HTTP_FORBIDDEN);
-            return;
-        }
-
-        File file = locateFile(request);
-
-        if (!file.exists()) {
-            response.sendError(HttpURLConnection.HTTP_NOT_FOUND); // file not
-                                                                    // found
-            return;
-        }
-
-        boolean success = IOHelper.deleteFile(file); // actual delete operation
-
-        if (success) {
-            response.setStatus(HttpURLConnection.HTTP_NO_CONTENT); // we return
-                                                                    // no
-                                                                    // content
-        } else {
-            response.sendError(HttpURLConnection.HTTP_INTERNAL_ERROR); // could
-                                                                        // not
-                                                                        // be
-                                                                        // deleted
-                                                                        // due
-                                                                        // to
-                                                                        // internal
-                                                                        // error
-        }
-    }
-
-    public void destroy() {
-        // nothing to destroy
-    }
-}
diff --git a/trunk/activemq-fileserver/src/main/webapp/META-INF/LICENSE b/trunk/activemq-fileserver/src/main/webapp/META-INF/LICENSE
deleted file mode 100644
index 6b0b127..0000000
--- a/trunk/activemq-fileserver/src/main/webapp/META-INF/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 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.
-
diff --git a/trunk/activemq-fileserver/src/main/webapp/META-INF/NOTICE b/trunk/activemq-fileserver/src/main/webapp/META-INF/NOTICE
deleted file mode 100644
index 3d99f9d..0000000
--- a/trunk/activemq-fileserver/src/main/webapp/META-INF/NOTICE
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache ActiveMQ
-Copyright 2005-2006 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
diff --git a/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml b/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 372ec1c..0000000
--- a/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  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.
--->
-<!DOCTYPE web-app 
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 
-    "http://java.sun.com/dtd/web-app_2_3.dtd">
-    
-<web-app>
-
-  <display-name>RESTful file access application</display-name>
-
-  <filter>
-   <filter-name>RestFilter</filter-name>
-   <filter-class>org.apache.activemq.util.RestFilter</filter-class>
-  </filter>
-
-  <filter>
-   <filter-name>FilenameGuardFilter</filter-name>
-   <filter-class>org.apache.activemq.util.FilenameGuardFilter</filter-class>
-  </filter>
-
-  <filter-mapping>
-   <filter-name>FilenameGuardFilter</filter-name>
-   <url-pattern>/*</url-pattern>
-  </filter-mapping>  
-
-  <filter-mapping>
-   <filter-name>RestFilter</filter-name>
-   <url-pattern>/*</url-pattern>
-  </filter-mapping>  
-   
-  <servlet>
-    <servlet-name>DefaultServlet</servlet-name>
-    <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
-  </servlet>
-
-  <servlet-mapping>
-   <servlet-name>DefaultServlet</servlet-name>
-   <url-pattern>/*</url-pattern>
-  </servlet-mapping>
-  
-</web-app>
diff --git a/trunk/activemq-fileserver/src/main/webapp/index.html b/trunk/activemq-fileserver/src/main/webapp/index.html
deleted file mode 100644
index 56294f6..0000000
--- a/trunk/activemq-fileserver/src/main/webapp/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-  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.
--->
-<html>
-<head>
-<title>ActiveMQ Console</title>
-</head>
-<body>
-
-<h1>RESTful file access</h1>
-
-<p>
-	This webapp provides RESTful file access.
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpBlobTest.java b/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpBlobTest.java
deleted file mode 100644
index b97abea..0000000
--- a/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpBlobTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.util;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.BlobMessage;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-public class HttpBlobTest extends HttpTestSupport {
-    
-    public void testBlobFile() throws Exception {
-        // first create Message
-        File file = File.createTempFile("amq-data-file-", ".dat");
-        // lets write some data
-        String content = "hello world " + System.currentTimeMillis();
-        BufferedWriter writer = new BufferedWriter(new FileWriter(file));
-        writer.append(content);
-        writer.close();
-
-        ActiveMQSession session = (ActiveMQSession) connection.createSession(
-                false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        MessageConsumer consumer = session.createConsumer(destination);
-        BlobMessage message = session.createBlobMessage(file);
-
-        producer.send(message);
-        Thread.sleep(1000);
-
-        // check message send
-        Message msg = consumer.receive(1000);
-        Assert.assertTrue(msg instanceof ActiveMQBlobMessage);
-
-        InputStream input = ((ActiveMQBlobMessage) msg).getInputStream();
-        StringBuilder b = new StringBuilder();
-        int i = input.read();
-        while (i != -1) {
-            b.append((char) i);
-            i = input.read();
-        }
-        input.close();
-        File uploaded = new File(homeDir, msg.getJMSMessageID().toString().replace(":", "_")); 
-        Assert.assertEquals(content, b.toString());
-        assertTrue(uploaded.exists());
-        ((ActiveMQBlobMessage)msg).deleteFile();
-        assertFalse(uploaded.exists());
-    }
-    
-}
diff --git a/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpTestSupport.java b/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpTestSupport.java
deleted file mode 100644
index 2d9c65e..0000000
--- a/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/HttpTestSupport.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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.util;
-
-import java.io.File;
-import java.net.Socket;
-import java.net.URL;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.net.SocketFactory;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-public abstract class HttpTestSupport extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(HttpTestSupport.class);
-    
-    BrokerService broker;
-    Server server;
-    ActiveMQConnectionFactory factory;
-    Connection connection;
-    Session session;
-    MessageProducer producer;
-    Destination destination;
-    
-    protected boolean createBroker = true;
-    
-    final File homeDir = new File("src/main/webapp/uploads/");
-    
-    protected void setUp() throws Exception {
-        
-        server = new Server();
-        SelectChannelConnector connector = new SelectChannelConnector();
-        connector.setPort(8080);
-        connector.setServer(server);
-        WebAppContext context = new WebAppContext();
-
-        context.setResourceBase("src/main/webapp");
-        context.setContextPath("/");
-        context.setServer(server);
-        server.setHandler(context);
-        server.setConnectors(new Connector[] {
-            connector
-        });
-        server.start();
-        waitForJettySocketToAccept("http://localhost:8080");
-        
-        if (createBroker) {
-            broker = new BrokerService();
-            broker.setPersistent(false);
-            broker.setUseJmx(true);
-            broker.addConnector("vm://localhost");
-            broker.start();
-            broker.waitUntilStarted();
-            
-            factory = new ActiveMQConnectionFactory("vm://localhost");
-            connection = factory.createConnection();
-            connection.start();
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            destination = session.createQueue("test");
-            producer = session.createProducer(destination);
-            
-            IOHelper.deleteFile(homeDir);
-            homeDir.mkdir();
-        }
-    }
-
-    protected void tearDown() throws Exception {
-        server.stop();
-        if (createBroker) {
-            session.close();
-            connection.close();
-            broker.stop();
-            broker.waitUntilStopped();
-            IOHelper.deleteFile(homeDir);
-        }
-    }
-
-    public void waitForJettySocketToAccept(String bindLocation) throws Exception {
-        final URL url = new URL(bindLocation);
-        assertTrue("Jetty endpoint is available", Wait.waitFor(new Wait.Condition() {
-
-            public boolean isSatisified() throws Exception {
-                boolean canConnect = false;
-                try {
-                    Socket socket = SocketFactory.getDefault().createSocket(url.getHost(), url.getPort());
-                    socket.close();
-                    canConnect = true;
-                } catch (Exception e) {
-                    LOG.warn("verify jetty available, failed to connect to " + url + e);
-                }
-                return canConnect;
-            }}, 60 * 1000));
-    }
-    
-}
-
diff --git a/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/RestFilterTest.java b/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/RestFilterTest.java
deleted file mode 100644
index 7e2b799..0000000
--- a/trunk/activemq-fileserver/src/test/java/org/apache/activemq/util/RestFilterTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import org.eclipse.jetty.util.IO;
-
-public class RestFilterTest extends HttpTestSupport {
-
-    protected boolean createBroker = false;
-    
-    public void testFilter() throws Exception {
-        byte[] fileContents = new byte[] {
-            'a', 'b', 'c'
-        };
-        URL url = new URL("http://localhost:8080/uploads/file.txt");
-
-        // 1. upload
-        HttpURLConnection connection = (HttpURLConnection)url.openConnection();
-        connection.setRequestMethod("PUT");
-        connection.setDoOutput(true);
-        connection.setChunkedStreamingMode(fileContents.length);
-        OutputStream os = connection.getOutputStream();
-        IO.copy(new ByteArrayInputStream(fileContents), os);
-        os.close();
-        assertTrue(isSuccessfulCode(connection.getResponseCode()));
-        connection.disconnect();
-
-        // 2. download
-        connection = (HttpURLConnection)url.openConnection();
-        InputStream is = connection.getInputStream();
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        IO.copy(is, baos);
-        is.close();
-        assertTrue(isSuccessfulCode(connection.getResponseCode()));
-        connection.disconnect();
-        assertEquals(fileContents.length, baos.size());
-
-        // 3. remove
-        connection = (HttpURLConnection)url.openConnection();
-        connection.setRequestMethod("DELETE");
-        is = connection.getInputStream();
-        is.close();
-        assertTrue(isSuccessfulCode(connection.getResponseCode()));
-    }
-
-    private boolean isSuccessfulCode(int responseCode) {
-        return responseCode >= 200 && responseCode < 300; // 2xx => successful
-    }
-}
diff --git a/trunk/activemq-jaas/login.config b/trunk/activemq-jaas/login.config
deleted file mode 100644
index c7c024c..0000000
--- a/trunk/activemq-jaas/login.config
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-testLogin {
-    org.apache.activemq.jaas.PropertiesLoginModule required
-        debug=true
-        org.apache.activemq.jaas.properties.user="src/test/resources/users.properties"
-        org.apache.activemq.jaas.properties.group="src/test/resources/groups.properties";
-};
diff --git a/trunk/activemq-jaas/pom.xml b/trunk/activemq-jaas/pom.xml
deleted file mode 100644
index 318127b..0000000
--- a/trunk/activemq-jaas/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-jaas</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: JAAS</name>
-  <description>A collection of generic JAAS Login Modules</description>
-
-  <properties>
-	<activemq.osgi.import.pkg>*</activemq.osgi.import.pkg>
-  </properties>
-
-  <build>
-    <plugins>
-      <!-- Configure which tests are included/excuded -->
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>pertest</forkMode>
-          <childDelegation>false</childDelegation>
-          <useFile>true</useFile>
-          <argLine>-Xmx512M</argLine>
-
-           <systemProperties>
-            <property>
-              <name>org.apache.activemq.default.directory.prefix</name>
-              <value>target/</value>
-            </property>
-            <!-- Uncomment the following if you want to configure custom logging (using src/test/resources/log4j.properties)
-                 while running mvn:test
-                 Note: if you want to see log messages on the console window remove
-                       "redirectTestOutputToFile" from the parent pom
-            -->
-            <!--           
-            <property>
-              <name>log4j.configuration</name>
-              <value>file:target/test-classes/log4j.properties</value>
-            </property>
-            -->
-          </systemProperties>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-
-  <dependencies>
-    <dependency>
-        <groupId>commons-collections</groupId>
-        <artifactId>commons-collections</artifactId>
-        <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-core-integ</artifactId>
-      <version>${directory-version}</version>
-      <scope>test</scope>
-    </dependency>  
-
-    <dependency>
-      <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-server-integ</artifactId>
-      <version>${directory-version}</version>
-      <scope>test</scope>
-    </dependency> 
-    
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-      <optional>true</optional>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateCallback.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateCallback.java
deleted file mode 100644
index 692764a..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateCallback.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.jaas;
-
-import java.security.cert.X509Certificate;
-
-import javax.security.auth.callback.Callback;
-
-/**
- * A Callback for SSL certificates.
- * 
- * Will return a certificate chain to its client.
- * 
- * @author sepandm@gmail.com (Sepand)
- *
- */
-public class CertificateCallback implements Callback {
-    X509Certificate certificates[];
-    
-    /**
-     * Setter for certificate chain.
-     * 
-     * @param certs The certificates to be returned.
-     */
-    public void setCertificates(X509Certificate certs[]) {
-        certificates = certs;
-    }
-    
-    /**
-     * Getter for certificate chain.
-     * 
-     * @return The certificates being carried.
-     */
-    public X509Certificate[] getCertificates() {
-        return certificates;
-    }
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java
deleted file mode 100644
index 130829d..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-import java.security.Principal;
-import java.security.cert.X509Certificate;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.FailedLoginException;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A LoginModule that allows for authentication based on SSL certificates.
- * Allows for subclasses to define methods used to verify user certificates and
- * find user groups. Uses CertificateCallbacks to retrieve certificates.
- * 
- * @author sepandm@gmail.com (Sepand)
- */
-public abstract class CertificateLoginModule implements LoginModule {
-
-    private static final Logger LOG = LoggerFactory.getLogger(CertificateLoginModule.class);
-
-    private CallbackHandler callbackHandler;
-    private Subject subject;
-
-    private X509Certificate certificates[];
-    private String username;
-    private Set groups;
-    private Set<Principal> principals = new HashSet<Principal>();
-    private boolean debug;
-
-    /**
-     * Overriding to allow for proper initialization. Standard JAAS.
-     */
-    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
-        this.subject = subject;
-        this.callbackHandler = callbackHandler;
-
-        debug = "true".equalsIgnoreCase((String)options.get("debug"));
-
-        if (debug) {
-            LOG.debug("Initialized debug");
-        }
-    }
-
-    /**
-     * Overriding to allow for certificate-based login. Standard JAAS.
-     */
-    public boolean login() throws LoginException {
-        Callback[] callbacks = new Callback[1];
-
-        callbacks[0] = new CertificateCallback();
-        try {
-            callbackHandler.handle(callbacks);
-        } catch (IOException ioe) {
-            throw new LoginException(ioe.getMessage());
-        } catch (UnsupportedCallbackException uce) {
-            throw new LoginException(uce.getMessage() + " Unable to obtain client certificates.");
-        }
-        certificates = ((CertificateCallback)callbacks[0]).getCertificates();
-
-        username = getUserNameForCertificates(certificates);
-        if (username == null) {
-            throw new FailedLoginException("No user for client certificate: " + getDistinguishedName(certificates));
-        }
-
-        groups = getUserGroups(username);
-
-        if (debug) {
-            LOG.debug("Certificate for user: " + username);
-        }
-        return true;
-    }
-
-    /**
-     * Overriding to complete login process. Standard JAAS.
-     */
-    public boolean commit() throws LoginException {
-        principals.add(new UserPrincipal(username));
-
-        String currentGroup = null;
-        for (Iterator iter = groups.iterator(); iter.hasNext();) {
-            currentGroup = (String)iter.next();
-            principals.add(new GroupPrincipal(currentGroup));
-        }
-
-        subject.getPrincipals().addAll(principals);
-
-        clear();
-
-        if (debug) {
-            LOG.debug("commit");
-        }
-        return true;
-    }
-
-    /**
-     * Standard JAAS override.
-     */
-    public boolean abort() throws LoginException {
-        clear();
-
-        if (debug) {
-            LOG.debug("abort");
-        }
-        return true;
-    }
-
-    /**
-     * Standard JAAS override.
-     */
-    public boolean logout() {
-        subject.getPrincipals().removeAll(principals);
-        principals.clear();
-
-        if (debug) {
-            LOG.debug("logout");
-        }
-        return true;
-    }
-
-    /**
-     * Helper method.
-     */
-    private void clear() {
-        groups.clear();
-        certificates = null;
-    }
-
-    /**
-     * Should return a unique name corresponding to the certificates given. The
-     * name returned will be used to look up access levels as well as group
-     * associations.
-     * 
-     * @param certs The distinguished name.
-     * @return The unique name if the certificate is recognized, null otherwise.
-     */
-    protected abstract String getUserNameForCertificates(final X509Certificate[] certs) throws LoginException;
-
-    /**
-     * Should return a set of the groups this user belongs to. The groups
-     * returned will be added to the user's credentials.
-     * 
-     * @param username The username of the client. This is the same name that
-     *                getUserNameForDn returned for the user's DN.
-     * @return A Set of the names of the groups this user belongs to.
-     */
-    protected abstract Set getUserGroups(final String username) throws LoginException;
-
-    protected String getDistinguishedName(final X509Certificate[] certs) {
-        if (certs != null && certs.length > 0 && certs[0] != null) {
-            return certs[0].getSubjectDN().getName();
-        } else {
-            return null;
-        }
-    }
-
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/GroupPrincipal.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/GroupPrincipal.java
deleted file mode 100644
index 792213b..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/GroupPrincipal.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.jaas;
-
-import java.security.Principal;
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class GroupPrincipal implements Principal {
-
-    private final String name;
-    private transient int hash;
-
-    public GroupPrincipal(String name) {
-        if (name == null) {
-            throw new IllegalArgumentException("name cannot be null");
-        }
-        this.name = name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        final GroupPrincipal that = (GroupPrincipal)o;
-
-        if (!name.equals(that.name)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    public int hashCode() {
-        if (hash == 0) {
-            hash = name.hashCode();
-        }
-        return hash;
-    }
-
-    public String toString() {
-        return name;
-    }
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/GuestLoginModule.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/GuestLoginModule.java
deleted file mode 100644
index c3eaed6..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/GuestLoginModule.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-import java.security.Principal;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Always login the user with a default 'guest' identity.
- *
- * Useful for unauthenticated communication channels being used in the
- * same broker as authenticated ones.
- * 
- */
-public class GuestLoginModule implements LoginModule {
-
-    private static final String GUEST_USER = "org.apache.activemq.jaas.guest.user";
-    private static final String GUEST_GROUP = "org.apache.activemq.jaas.guest.group";
-
-    private static final Logger LOG = LoggerFactory.getLogger(GuestLoginModule.class);
-    
-
-    private String userName = "guest";
-    private String groupName = "guests";
-    private Subject subject;
-    private boolean debug;
-    private boolean credentialsInvalidate;
-    private Set<Principal> principals = new HashSet<Principal>();
-    private CallbackHandler callbackHandler;
-    private boolean loginSucceeded;
-
-
-    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
-        this.subject = subject;
-        this.callbackHandler = callbackHandler;
-        debug = "true".equalsIgnoreCase((String)options.get("debug"));
-        credentialsInvalidate = "true".equalsIgnoreCase((String)options.get("credentialsInvalidate"));
-        if (options.get(GUEST_USER) != null) {
-            userName = (String)options.get(GUEST_USER);
-        }
-        if (options.get(GUEST_GROUP) != null) {
-            groupName = (String)options.get(GUEST_GROUP);
-        }
-        principals.add(new UserPrincipal(userName));
-        principals.add(new GroupPrincipal(groupName));
-        
-        if (debug) {
-            LOG.debug("Initialized debug=" + debug + " guestUser=" + userName + " guestGroup=" + groupName);
-        }
-
-    }
-
-    public boolean login() throws LoginException {
-        loginSucceeded = true;
-        if (credentialsInvalidate) {
-            PasswordCallback passwordCallback = new PasswordCallback("Password: ", false);
-            try {
-                 callbackHandler.handle(new Callback[]{passwordCallback});
-                 if (passwordCallback.getPassword() != null) {
-                     if (debug) {
-                        LOG.debug("Guest login failing (credentialsInvalidate=true) on presence of a password");
-                     }
-                     loginSucceeded = false;
-                     passwordCallback.clearPassword();
-                 };
-             } catch (IOException ioe) {
-             } catch (UnsupportedCallbackException uce) {
-             }
-        }
-        if (debug) {
-            LOG.debug("Guest login " + loginSucceeded);
-        }
-        return loginSucceeded;
-    }
-
-    public boolean commit() throws LoginException {
-        if (loginSucceeded) {
-            subject.getPrincipals().addAll(principals);
-        }
-
-        if (debug) {
-            LOG.debug("commit");
-        }
-        return loginSucceeded;
-    }
-
-    public boolean abort() throws LoginException {
-
-        if (debug) {
-            LOG.debug("abort");
-        }
-        return true;
-    }
-
-    public boolean logout() throws LoginException {
-        subject.getPrincipals().removeAll(principals);
-
-        if (debug) {
-            LOG.debug("logout");
-        }
-        return true;
-    }
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JaasCertificateCallbackHandler.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JaasCertificateCallbackHandler.java
deleted file mode 100644
index f1a229e..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JaasCertificateCallbackHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-/**
- * A Standard JAAS callback handler for SSL certificate requests. Will only
- * handle callbacks of type CertificateCallback.
- * 
- * @author sepandm@gmail.com (Sepand)
- */
-public class JaasCertificateCallbackHandler implements CallbackHandler {
-    final X509Certificate certificates[];
-
-    /**
-     * Basic constructor.
-     * 
-     * @param cert The certificate returned when calling back.
-     */
-    public JaasCertificateCallbackHandler(X509Certificate certs[]) {
-        certificates = certs;
-    }
-
-    /**
-     * Overriding handle method to handle certificates.
-     * 
-     * @param callbacks The callbacks requested.
-     * @throws IOException
-     * @throws UnsupportedCallbackException Thrown if an unkown Callback type is
-     *                 encountered.
-     */
-    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-        for (int i = 0; i < callbacks.length; i++) {
-            Callback callback = callbacks[i];
-            if (callback instanceof CertificateCallback) {
-                CertificateCallback certCallback = (CertificateCallback)callback;
-
-                certCallback.setCertificates(certificates);
-
-            } else {
-                throw new UnsupportedCallbackException(callback);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JassCredentialCallbackHandler.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JassCredentialCallbackHandler.java
deleted file mode 100644
index 6799779..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JassCredentialCallbackHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-/**
- * A JASS username password CallbackHandler.
- */
-public class JassCredentialCallbackHandler implements CallbackHandler {
-
-    private final String username;
-    private final String password;
-
-    public JassCredentialCallbackHandler(String username, String password) {
-        this.username = username;
-        this.password = password;
-    }
-
-    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-        for (int i = 0; i < callbacks.length; i++) {
-            Callback callback = callbacks[i];
-            if (callback instanceof PasswordCallback) {
-                PasswordCallback passwordCallback = (PasswordCallback)callback;
-                if (password == null) {
-                    passwordCallback.setPassword(null);
-                } else {
-                    passwordCallback.setPassword(password.toCharArray());
-                }
-            } else if (callback instanceof NameCallback) {
-                NameCallback nameCallback = (NameCallback)callback;
-                if (username == null) {
-                    nameCallback.setName(null);
-                } else {
-                    nameCallback.setName(username);
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
deleted file mode 100644
index 285397f..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-import java.security.Principal;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.naming.AuthenticationException;
-import javax.naming.CommunicationException;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NameParser;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.FailedLoginException;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class LDAPLoginModule implements LoginModule {
-
-    private static final String INITIAL_CONTEXT_FACTORY = "initialContextFactory";
-    private static final String CONNECTION_URL = "connectionURL";
-    private static final String CONNECTION_USERNAME = "connectionUsername";
-    private static final String CONNECTION_PASSWORD = "connectionPassword";
-    private static final String CONNECTION_PROTOCOL = "connectionProtocol";
-    private static final String AUTHENTICATION = "authentication";
-    private static final String USER_BASE = "userBase";
-    private static final String USER_SEARCH_MATCHING = "userSearchMatching";
-    private static final String USER_SEARCH_SUBTREE = "userSearchSubtree";
-    private static final String ROLE_BASE = "roleBase";
-    private static final String ROLE_NAME = "roleName";
-    private static final String ROLE_SEARCH_MATCHING = "roleSearchMatching";
-    private static final String ROLE_SEARCH_SUBTREE = "roleSearchSubtree";
-    private static final String USER_ROLE_NAME = "userRoleName";
-
-    private static Logger log = LoggerFactory.getLogger(LDAPLoginModule.class);
-
-    protected DirContext context;
-
-    private Subject subject;
-    private CallbackHandler handler;  
-    private LDAPLoginProperty [] config;
-    private String username;
-    private Set<GroupPrincipal> groups = new HashSet<GroupPrincipal>();
-
-    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
-        this.subject = subject;
-        this.handler = callbackHandler;
-        
-        config = new LDAPLoginProperty [] {
-        		new LDAPLoginProperty (INITIAL_CONTEXT_FACTORY, (String)options.get(INITIAL_CONTEXT_FACTORY)),
-        		new LDAPLoginProperty (CONNECTION_URL, (String)options.get(CONNECTION_URL)),
-        		new LDAPLoginProperty (CONNECTION_USERNAME, (String)options.get(CONNECTION_USERNAME)),
-        		new LDAPLoginProperty (CONNECTION_PASSWORD, (String)options.get(CONNECTION_PASSWORD)),
-        		new LDAPLoginProperty (CONNECTION_PROTOCOL, (String)options.get(CONNECTION_PROTOCOL)),
-        		new LDAPLoginProperty (AUTHENTICATION, (String)options.get(AUTHENTICATION)),
-        		new LDAPLoginProperty (USER_BASE, (String)options.get(USER_BASE)),
-        		new LDAPLoginProperty (USER_SEARCH_MATCHING, (String)options.get(USER_SEARCH_MATCHING)),
-        		new LDAPLoginProperty (USER_SEARCH_SUBTREE, (String)options.get(USER_SEARCH_SUBTREE)),
-        		new LDAPLoginProperty (ROLE_BASE, (String)options.get(ROLE_BASE)),
-        		new LDAPLoginProperty (ROLE_NAME, (String)options.get(ROLE_NAME)),
-        		new LDAPLoginProperty (ROLE_SEARCH_MATCHING, (String)options.get(ROLE_SEARCH_MATCHING)),
-        		new LDAPLoginProperty (ROLE_SEARCH_SUBTREE, (String)options.get(ROLE_SEARCH_SUBTREE)),
-        		new LDAPLoginProperty (USER_ROLE_NAME, (String)options.get(USER_ROLE_NAME)),
-        		};
-    }
-
-    public boolean login() throws LoginException {
-
-        Callback[] callbacks = new Callback[2];
-
-        callbacks[0] = new NameCallback("User name");
-        callbacks[1] = new PasswordCallback("Password", false);
-        try {
-            handler.handle(callbacks);
-        } catch (IOException ioe) {
-            throw (LoginException)new LoginException().initCause(ioe);
-        } catch (UnsupportedCallbackException uce) {
-            throw (LoginException)new LoginException().initCause(uce);
-        }
-        
-        String password;
-        
-        username = ((NameCallback)callbacks[0]).getName();
-        if (username == null)
-        	return false;
-        	
-        if (((PasswordCallback)callbacks[1]).getPassword() != null)
-        	password = new String(((PasswordCallback)callbacks[1]).getPassword());
-        else
-        	password="";
-
-        try {
-            boolean result = authenticate(username, password);
-            if (!result) {
-                throw new FailedLoginException();
-            } else {
-                return true;
-            }
-        } catch (Exception e) {
-            throw (LoginException)new LoginException("LDAP Error").initCause(e);
-        }
-    }
-
-    public boolean logout() throws LoginException {
-        username = null;
-        return true;
-    }
-
-    public boolean commit() throws LoginException {
-        Set<Principal> principals = subject.getPrincipals();
-        principals.add(new UserPrincipal(username));
-        Iterator<GroupPrincipal> iter = groups.iterator();
-        while (iter.hasNext()) {
-            principals.add(iter.next());
-        }
-        return true;
-    }
-
-    public boolean abort() throws LoginException {
-        username = null;
-        return true;
-    }
-
-    protected void close(DirContext context) {
-        try {
-            context.close();
-        } catch (Exception e) {
-            log.error(e.toString());
-        }
-    }
-
-    protected boolean authenticate(String username, String password) throws Exception {
-
-        MessageFormat userSearchMatchingFormat;
-        boolean userSearchSubtreeBool;
-        
-        DirContext context = null;
-        context = open();
-        
-        if (!isLoginPropertySet(USER_SEARCH_MATCHING))
-        	return false;
-
-        userSearchMatchingFormat = new MessageFormat(getLDAPPropertyValue(USER_SEARCH_MATCHING));
-        userSearchSubtreeBool = Boolean.valueOf(getLDAPPropertyValue(USER_SEARCH_SUBTREE)).booleanValue();
-
-        try {
-
-            String filter = userSearchMatchingFormat.format(new String[] {
-                username
-            });
-            SearchControls constraints = new SearchControls();
-            if (userSearchSubtreeBool) {
-                constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-            } else {
-                constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
-            }
-
-            // setup attributes
-            ArrayList<String> list = new ArrayList<String>();
-            if (isLoginPropertySet(USER_ROLE_NAME)) {
-                list.add(getLDAPPropertyValue(USER_ROLE_NAME));
-            }
-            String[] attribs = new String[list.size()];
-            list.toArray(attribs);
-            constraints.setReturningAttributes(attribs);
-
-            NamingEnumeration results = context.search(getLDAPPropertyValue(USER_BASE), filter, constraints);
-
-            if (results == null || !results.hasMore()) {
-                return false;
-            }
-
-            SearchResult result = (SearchResult)results.next();
-
-            if (results.hasMore()) {
-                // ignore for now
-            }
-            NameParser parser = context.getNameParser("");
-            Name contextName = parser.parse(context.getNameInNamespace());
-            Name baseName = parser.parse(getLDAPPropertyValue(USER_BASE));
-            Name entryName = parser.parse(result.getName());
-            Name name = contextName.addAll(baseName);
-            name = name.addAll(entryName);
-            String dn = name.toString();
-
-            Attributes attrs = result.getAttributes();
-            if (attrs == null) {
-                return false;
-            }
-            ArrayList<String> roles = null;
-            if (isLoginPropertySet(USER_ROLE_NAME)) {
-                roles = addAttributeValues(getLDAPPropertyValue(USER_ROLE_NAME), attrs, roles);
-            }
-
-            // check the credentials by binding to server
-            if (bindUser(context, dn, password)) {
-                // if authenticated add more roles
-                roles = getRoles(context, dn, username, roles);
-                for (int i = 0; i < roles.size(); i++) {
-                    groups.add(new GroupPrincipal(roles.get(i)));
-                }
-            } else {
-                return false;
-            }
-        } catch (CommunicationException e) {
-
-        } catch (NamingException e) {
-            if (context != null) {
-                close(context);
-            }
-            return false;
-        }
-
-        return true;
-    }
-
-    protected ArrayList<String> getRoles(DirContext context, String dn, String username, ArrayList<String> currentRoles) throws NamingException {
-        ArrayList<String> list = currentRoles;
-        MessageFormat roleSearchMatchingFormat;
-        boolean roleSearchSubtreeBool;
-        roleSearchMatchingFormat = new MessageFormat(getLDAPPropertyValue(ROLE_SEARCH_MATCHING));
-        roleSearchSubtreeBool = Boolean.valueOf(getLDAPPropertyValue(ROLE_SEARCH_SUBTREE)).booleanValue();
-        
-        if (list == null) {
-            list = new ArrayList<String>();
-        }
-        if (!isLoginPropertySet(ROLE_NAME)) {
-            return list;
-        }
-        String filter = roleSearchMatchingFormat.format(new String[] {
-            doRFC2254Encoding(dn), username
-        });
-
-        SearchControls constraints = new SearchControls();
-        if (roleSearchSubtreeBool) {
-            constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-        } else {
-            constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
-        }
-        NamingEnumeration results = context.search(getLDAPPropertyValue(ROLE_BASE), filter, constraints);
-        while (results.hasMore()) {
-            SearchResult result = (SearchResult)results.next();
-            Attributes attrs = result.getAttributes();
-            if (attrs == null) {
-                continue;
-            }
-            list = addAttributeValues(getLDAPPropertyValue(ROLE_NAME), attrs, list);
-        }
-        return list;
-
-    }
-
-    protected String doRFC2254Encoding(String inputString) {
-        StringBuffer buf = new StringBuffer(inputString.length());
-        for (int i = 0; i < inputString.length(); i++) {
-            char c = inputString.charAt(i);
-            switch (c) {
-            case '\\':
-                buf.append("\\5c");
-                break;
-            case '*':
-                buf.append("\\2a");
-                break;
-            case '(':
-                buf.append("\\28");
-                break;
-            case ')':
-                buf.append("\\29");
-                break;
-            case '\0':
-                buf.append("\\00");
-                break;
-            default:
-                buf.append(c);
-                break;
-            }
-        }
-        return buf.toString();
-    }
-
-    protected boolean bindUser(DirContext context, String dn, String password) throws NamingException {
-        boolean isValid = false;
-
-        context.addToEnvironment(Context.SECURITY_PRINCIPAL, dn);
-        context.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
-        try {
-            context.getAttributes("", null);
-            isValid = true;
-        } catch (AuthenticationException e) {
-            isValid = false;
-            log.debug("Authentication failed for dn=" + dn);
-        }
-
-        if (isLoginPropertySet(CONNECTION_USERNAME)) {
-            context.addToEnvironment(Context.SECURITY_PRINCIPAL, getLDAPPropertyValue(CONNECTION_USERNAME));
-        } else {
-            context.removeFromEnvironment(Context.SECURITY_PRINCIPAL);
-        }
-
-        if (isLoginPropertySet(CONNECTION_PASSWORD)) {
-            context.addToEnvironment(Context.SECURITY_CREDENTIALS, getLDAPPropertyValue(CONNECTION_PASSWORD));
-        } else {
-            context.removeFromEnvironment(Context.SECURITY_CREDENTIALS);
-        }
-
-        return isValid;
-    }
-
-    private ArrayList<String> addAttributeValues(String attrId, Attributes attrs, ArrayList<String> values) throws NamingException {
-
-        if (attrId == null || attrs == null) {
-            return values;
-        }
-        if (values == null) {
-            values = new ArrayList<String>();
-        }
-        Attribute attr = attrs.get(attrId);
-        if (attr == null) {
-            return values;
-        }
-        NamingEnumeration e = attr.getAll();
-        while (e.hasMore()) {
-            String value = (String)e.next();
-            values.add(value);
-        }
-        return values;
-    }
-
-    protected DirContext open() throws NamingException {
-        try {
-            Hashtable<String, String> env = new Hashtable<String, String>();
-            env.put(Context.INITIAL_CONTEXT_FACTORY, getLDAPPropertyValue(INITIAL_CONTEXT_FACTORY));
-            if (isLoginPropertySet(CONNECTION_USERNAME)) {
-                env.put(Context.SECURITY_PRINCIPAL, getLDAPPropertyValue(CONNECTION_USERNAME));
-            }
-            if (isLoginPropertySet(CONNECTION_PASSWORD)) {
-                env.put(Context.SECURITY_CREDENTIALS, getLDAPPropertyValue(CONNECTION_PASSWORD));
-            }
-            env.put(Context.SECURITY_PROTOCOL, getLDAPPropertyValue(CONNECTION_PROTOCOL));
-            env.put(Context.PROVIDER_URL, getLDAPPropertyValue(CONNECTION_URL));
-            env.put(Context.SECURITY_AUTHENTICATION, getLDAPPropertyValue(AUTHENTICATION));
-            context = new InitialDirContext(env);
-
-        } catch (NamingException e) {
-            log.error(e.toString());
-            throw e;
-        }
-        return context;
-    }
-    
-    private String getLDAPPropertyValue (String propertyName){
-    	for (int i=0; i < config.length; i++ )
-    		if (config[i].getPropertyName() == propertyName)
-    			return config[i].getPropertyValue();
-    	return null;
-    }
-    
-    private boolean isLoginPropertySet(String propertyName) {
-    	for (int i=0; i < config.length; i++ ) {
-    		if (config[i].getPropertyName() == propertyName && config[i].getPropertyValue() != null)
-    				return true;
-    	}
-    	return false;
-    }
-
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginProperty.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginProperty.java
deleted file mode 100644
index 39c7397..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginProperty.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.jaas;
-
-public class LDAPLoginProperty {
-	private String name;
-	private String value;
-
-	public LDAPLoginProperty(String name) {
-		this.name = name;
-	}
-
-	public LDAPLoginProperty(String name, String value) {
-		this.name = name;
-		this.value = value;
-	}
-	
-	public String getPropertyName() {
-		return this.name;
-	}
-	public String getPropertyValue() {
-		return this.value;
-	}
-
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java
deleted file mode 100644
index 6f4909b..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.File;
-import java.io.IOException;
-import java.security.Principal;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.FailedLoginException;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class PropertiesLoginModule implements LoginModule {
-
-    private static final String USER_FILE = "org.apache.activemq.jaas.properties.user";
-    private static final String GROUP_FILE = "org.apache.activemq.jaas.properties.group";
-
-    private static final Logger LOG = LoggerFactory.getLogger(PropertiesLoginModule.class);
-
-    private Subject subject;
-    private CallbackHandler callbackHandler;
-
-    private boolean debug;
-    private boolean reload = true;
-    private static String usersFile;
-    private static String groupsFile;
-    private static Properties users;
-    private static Properties groups;
-    private String user;
-    private Set<Principal> principals = new HashSet<Principal>();
-    private File baseDir;
-    private boolean loginSucceeded;
-
-
-    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
-        this.subject = subject;
-        this.callbackHandler = callbackHandler;
-        loginSucceeded = false;
-
-        debug = "true".equalsIgnoreCase((String)options.get("debug"));
-        if (options.get("reload") != null) {
-            reload = "true".equalsIgnoreCase((String)options.get("reload"));
-        }
-
-        if (reload || users == null) {
-            setBaseDir();
-            usersFile = (String)options.get(USER_FILE) + "";
-            File uf = new File(baseDir, usersFile);
-            try {
-                users = new Properties();
-                java.io.FileInputStream in = new java.io.FileInputStream(uf);
-                users.load(in);
-                in.close();
-            } catch (IOException ioe) {
-                LOG.warn("Unable to load user properties file " + uf);
-            }
-            if (debug) {
-                LOG.debug("Using usersFile=" + usersFile);
-            }
-        }
-        if (reload || groups == null) {
-            setBaseDir();
-            groupsFile = (String)options.get(GROUP_FILE) + "";
-            File gf = new File(baseDir, groupsFile);
-            try {
-                groups = new Properties();
-                java.io.FileInputStream in = new java.io.FileInputStream(gf);
-                groups.load(in);
-                in.close();
-            } catch (IOException ioe) {
-                LOG.warn("Unable to load group properties file " + gf);
-            }
-            if (debug) {
-                LOG.debug("Using groupsFile=" + groupsFile);
-            }
-        }
-    }
-
-    private void setBaseDir() {
-        if (baseDir == null) {
-            if (System.getProperty("java.security.auth.login.config") != null) {
-                baseDir = new File(System.getProperty("java.security.auth.login.config")).getParentFile();
-            } else {
-                baseDir = new File(".");
-            }
-            if (debug) {
-                LOG.debug("Using basedir=" + baseDir);
-            }
-        }
-    }
-
-    public boolean login() throws LoginException {
-        Callback[] callbacks = new Callback[2];
-
-        callbacks[0] = new NameCallback("Username: ");
-        callbacks[1] = new PasswordCallback("Password: ", false);
-        try {
-            callbackHandler.handle(callbacks);
-        } catch (IOException ioe) {
-            throw new LoginException(ioe.getMessage());
-        } catch (UnsupportedCallbackException uce) {
-            throw new LoginException(uce.getMessage() + " not available to obtain information from user");
-        }
-        user = ((NameCallback)callbacks[0]).getName();
-        char[] tmpPassword = ((PasswordCallback)callbacks[1]).getPassword();
-        if (tmpPassword == null) {
-            tmpPassword = new char[0];
-        }
-        String password = users.getProperty(user);
-
-        if (password == null) {
-            throw new FailedLoginException("User does exist");
-        }
-        if (!password.equals(new String(tmpPassword))) {
-            throw new FailedLoginException("Password does not match");
-        }
-        loginSucceeded = true;
-
-        if (debug) {
-            LOG.debug("login " + user);
-        }
-        return loginSucceeded;
-    }
-
-    public boolean commit() throws LoginException {
-        boolean result = loginSucceeded;
-        if (result) {
-            principals.add(new UserPrincipal(user));
-
-            for (Enumeration enumeration = groups.keys(); enumeration.hasMoreElements();) {
-                String name = (String)enumeration.nextElement();
-                String[] userList = ((String)groups.getProperty(name) + "").split(",");
-                for (int i = 0; i < userList.length; i++) {
-                    if (user.equals(userList[i])) {
-                        principals.add(new GroupPrincipal(name));
-                        break;
-                    }
-                }
-            }
-
-            subject.getPrincipals().addAll(principals);
-        }
-
-        // will whack loginSucceeded
-        clear();
-
-        if (debug) {
-            LOG.debug("commit, result: " + result);
-        }
-        return result;
-    }
-
-    public boolean abort() throws LoginException {
-        clear();
-
-        if (debug) {
-            LOG.debug("abort");
-        }
-        return true;
-    }
-
-    public boolean logout() throws LoginException {
-        subject.getPrincipals().removeAll(principals);
-        principals.clear();
-        clear();
-        if (debug) {
-            LOG.debug("logout");
-        }
-        return true;
-    }
-
-    private void clear() {
-        user = null;
-        loginSucceeded = false;
-    }
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java
deleted file mode 100644
index 4e4d840..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.File;
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.LoginException;
-
-/**
- * A LoginModule allowing for SSL certificate based authentication based on
- * Distinguished Names (DN) stored in text files. The DNs are parsed using a
- * Properties class where each line is <user_name>=<user_DN>. This class also
- * uses a group definition file where each line is <group_name>=<user_name_1>,<user_name_2>,etc.
- * The user and group files' locations must be specified in the
- * org.apache.activemq.jaas.textfiledn.user and
- * org.apache.activemq.jaas.textfiledn.user properties respectively. NOTE: This
- * class will re-read user and group files for every authentication (i.e it does
- * live updates of allowed groups and users).
- * 
- * @author sepandm@gmail.com (Sepand)
- */
-public class TextFileCertificateLoginModule extends CertificateLoginModule {
-
-    private static final String USER_FILE = "org.apache.activemq.jaas.textfiledn.user";
-    private static final String GROUP_FILE = "org.apache.activemq.jaas.textfiledn.group";
-
-    private File baseDir;
-    private String usersFilePathname;
-    private String groupsFilePathname;
-
-    /**
-     * Performs initialization of file paths. A standard JAAS override.
-     */
-    public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) {
-        super.initialize(subject, callbackHandler, sharedState, options);
-        if (System.getProperty("java.security.auth.login.config") != null) {
-            baseDir = new File(System.getProperty("java.security.auth.login.config")).getParentFile();
-        } else {
-            baseDir = new File(".");
-        }
-
-        usersFilePathname = (String)options.get(USER_FILE) + "";
-        groupsFilePathname = (String)options.get(GROUP_FILE) + "";
-    }
-
-    /**
-     * Overriding to allow DN authorization based on DNs specified in text
-     * files.
-     * 
-     * @param certs The certificate the incoming connection provided.
-     * @return The user's authenticated name or null if unable to authenticate
-     *         the user.
-     * @throws LoginException Thrown if unable to find user file or connection
-     *                 certificate.
-     */
-    protected String getUserNameForCertificates(final X509Certificate[] certs) throws LoginException {
-        if (certs == null) {
-            throw new LoginException("Client certificates not found. Cannot authenticate.");
-        }
-
-        File usersFile = new File(baseDir, usersFilePathname);
-
-        Properties users = new Properties();
-
-        try {
-            java.io.FileInputStream in = new java.io.FileInputStream(usersFile);
-            users.load(in);
-            in.close();
-        } catch (IOException ioe) {
-            throw new LoginException("Unable to load user properties file " + usersFile);
-        }
-
-        String dn = getDistinguishedName(certs);
-
-        Enumeration<Object> keys = users.keys();
-        for (Enumeration vals = users.elements(); vals.hasMoreElements();) {
-            if (((String)vals.nextElement()).equals(dn)) {
-                return (String)keys.nextElement();
-            } else {
-                keys.nextElement();
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Overriding to allow for group discovery based on text files.
-     * 
-     * @param username The name of the user being examined. This is the same
-     *                name returned by getUserNameForCertificates.
-     * @return A Set of name Strings for groups this user belongs to.
-     * @throws LoginException Thrown if unable to find group definition file.
-     */
-    protected Set<String> getUserGroups(String username) throws LoginException {
-        File groupsFile = new File(baseDir, groupsFilePathname);
-
-        Properties groups = new Properties();
-        try {
-            java.io.FileInputStream in = new java.io.FileInputStream(groupsFile);
-            groups.load(in);
-            in.close();
-        } catch (IOException ioe) {
-            throw new LoginException("Unable to load group properties file " + groupsFile);
-        }
-        Set<String> userGroups = new HashSet<String>();
-        for (Enumeration enumeration = groups.keys(); enumeration.hasMoreElements();) {
-            String groupName = (String)enumeration.nextElement();
-            String[] userList = (groups.getProperty(groupName) + "").split(",");
-            for (int i = 0; i < userList.length; i++) {
-                if (username.equals(userList[i])) {
-                    userGroups.add(groupName);
-                    break;
-                }
-            }
-        }
-
-        return userGroups;
-    }
-}
diff --git a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/UserPrincipal.java b/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/UserPrincipal.java
deleted file mode 100644
index 1c7ca9d..0000000
--- a/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/UserPrincipal.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.jaas;
-
-import java.security.Principal;
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class UserPrincipal implements Principal {
-
-    private final String name;
-    private transient int hash;
-
-    public UserPrincipal(String name) {
-        if (name == null) {
-            throw new IllegalArgumentException("name cannot be null");
-        }
-        this.name = name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        final UserPrincipal that = (UserPrincipal)o;
-
-        if (!name.equals(that.name)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    public int hashCode() {
-        if (hash == 0) {
-            hash = name.hashCode();
-        }
-        return hash;
-    }
-
-    public String toString() {
-        return name;
-    }
-}
diff --git a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java b/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java
deleted file mode 100644
index 901610c..0000000
--- a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-import java.security.Principal;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import javax.security.auth.Subject;
-import javax.security.auth.login.LoginException;
-
-import junit.framework.TestCase;
-
-public class CertificateLoginModuleTest extends TestCase {
-
-    private static final String USER_NAME = "testUser";
-    private static final List<String> GROUP_NAMES = new Vector<String>();
-
-    private StubCertificateLoginModule loginModule;
-
-    private Subject subject;
-
-    public CertificateLoginModuleTest() {
-        GROUP_NAMES.add("testGroup1");
-        GROUP_NAMES.add("testGroup2");
-        GROUP_NAMES.add("testGroup3");
-        GROUP_NAMES.add("testGroup4");
-    }
-
-    protected void setUp() throws Exception {
-        subject = new Subject();
-    }
-
-    protected void tearDown() throws Exception {
-    }
-
-    private void loginWithCredentials(String userName, Set<String> groupNames) throws LoginException {
-        loginModule = new StubCertificateLoginModule(userName, new HashSet<String>(groupNames));
-        JaasCertificateCallbackHandler callbackHandler = new JaasCertificateCallbackHandler(null);
-
-        loginModule.initialize(subject, callbackHandler, null, new HashMap());
-
-        loginModule.login();
-        loginModule.commit();
-    }
-
-    private void checkPrincipalsMatch(Subject subject) {
-        boolean nameFound = false;
-        boolean groupsFound[] = new boolean[GROUP_NAMES.size()];
-        for (int i = 0; i < groupsFound.length; ++i) {
-            groupsFound[i] = false;
-        }
-
-        for (Iterator iter = subject.getPrincipals().iterator(); iter.hasNext();) {
-            Principal currentPrincipal = (Principal)iter.next();
-
-            if (currentPrincipal instanceof UserPrincipal) {
-                if (((UserPrincipal)currentPrincipal).getName().equals(USER_NAME)) {
-                    if (!nameFound) {
-                        nameFound = true;
-                    } else {
-                        fail("UserPrincipal found twice.");
-                    }
-
-                } else {
-                    fail("Unknown UserPrincipal found.");
-                }
-
-            } else if (currentPrincipal instanceof GroupPrincipal) {
-                int principalIdx = GROUP_NAMES.indexOf(((GroupPrincipal)currentPrincipal).getName());
-
-                if (principalIdx < 0) {
-                    fail("Unknown GroupPrincipal found.");
-                }
-
-                if (!groupsFound[principalIdx]) {
-                    groupsFound[principalIdx] = true;
-                } else {
-                    fail("GroupPrincipal found twice.");
-                }
-            } else {
-                fail("Unknown Principal type found.");
-            }
-        }
-    }
-
-    public void testLoginSuccess() throws IOException {
-        try {
-            loginWithCredentials(USER_NAME, new HashSet<String>(GROUP_NAMES));
-        } catch (Exception e) {
-            fail("Unable to login: " + e.getMessage());
-        }
-
-        checkPrincipalsMatch(subject);
-    }
-
-    public void testLoginFailure() throws IOException {
-        boolean loginFailed = false;
-
-        try {
-            loginWithCredentials(null, new HashSet<String>());
-        } catch (LoginException e) {
-            loginFailed = true;
-        }
-
-        if (!loginFailed) {
-            fail("Logged in with unknown certificate.");
-        }
-    }
-
-    public void testLogOut() throws IOException {
-        try {
-            loginWithCredentials(USER_NAME, new HashSet<String>(GROUP_NAMES));
-        } catch (Exception e) {
-            fail("Unable to login: " + e.getMessage());
-        }
-
-        loginModule.logout();
-
-        assertEquals("logout should have cleared Subject principals.", 0, subject.getPrincipals().size());
-    }
-}
diff --git a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/GroupPrincipalTest.java b/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/GroupPrincipalTest.java
deleted file mode 100644
index 403a349..0000000
--- a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/GroupPrincipalTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.jaas;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class GroupPrincipalTest extends TestCase {
-
-    public void testArguments() {
-        GroupPrincipal principal = new GroupPrincipal("FOO");
-
-        assertEquals("FOO", principal.getName());
-
-        try {
-            new GroupPrincipal(null);
-            fail("Should have thrown IllegalArgumentException");
-        } catch (IllegalArgumentException ingore) {
-
-        }
-    }
-
-    public void testHash() {
-        GroupPrincipal p1 = new GroupPrincipal("FOO");
-        GroupPrincipal p2 = new GroupPrincipal("FOO");
-
-        assertEquals(p1.hashCode(), p1.hashCode());
-        assertEquals(p1.hashCode(), p2.hashCode());
-    }
-
-    public void testEquals() {
-        GroupPrincipal p1 = new GroupPrincipal("FOO");
-        GroupPrincipal p2 = new GroupPrincipal("FOO");
-        GroupPrincipal p3 = new GroupPrincipal("BAR");
-
-        assertTrue(p1.equals(p1));
-        assertTrue(p1.equals(p2));
-        assertFalse(p1.equals(null));
-        assertFalse(p1.equals("FOO"));
-        assertFalse(p1.equals(p3));
-    }
-}
diff --git a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/GuestLoginModuleTest.java b/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/GuestLoginModuleTest.java
deleted file mode 100644
index 3b05782..0000000
--- a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/GuestLoginModuleTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-
-import junit.framework.TestCase;
-
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class GuestLoginModuleTest extends TestCase {
-
-    static {
-        String path = System.getProperty("java.security.auth.login.config");
-        if (path == null) {
-            URL resource = GuestLoginModuleTest.class.getClassLoader().getResource("login.config");
-            if (resource != null) {
-                path = resource.getFile();
-                System.setProperty("java.security.auth.login.config", path);
-            }
-        }
-    }
-
-    public void testLogin() throws LoginException {
-        LoginContext context = new LoginContext("GuestLogin", new CallbackHandler() {
-            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-                assertEquals("Should have no Callbacks", 0, callbacks.length);
-            }
-        });
-        context.login();
-
-        Subject subject = context.getSubject();
-
-        assertEquals("Should have two principals", 2, subject.getPrincipals().size());
-        assertEquals("Should have one user principal", 1, subject.getPrincipals(UserPrincipal.class).size());
-        assertTrue("User principal is 'foo'",subject.getPrincipals(UserPrincipal.class).contains(new UserPrincipal("foo")));
-
-        assertEquals("Should have one group principal", 1, subject.getPrincipals(GroupPrincipal.class).size());
-        assertTrue("Group principal is 'bar'", subject.getPrincipals(GroupPrincipal.class).contains(new GroupPrincipal("bar")));
-
-        context.logout();
-
-        assertEquals("Should have zero principals", 0, subject.getPrincipals().size());
-    }
-
-    public void testLoginWithDefaults() throws LoginException {
-        LoginContext context = new LoginContext("GuestLoginWithDefaults", new CallbackHandler() {
-            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-                assertEquals("Should have no Callbacks", 0, callbacks.length);
-            }
-        });
-        context.login();
-
-        Subject subject = context.getSubject();
-
-        assertEquals("Should have two principals", 2, subject.getPrincipals().size());
-        assertEquals("Should have one user principal", 1, subject.getPrincipals(UserPrincipal.class).size());
-        assertTrue("User principal is 'guest'",subject.getPrincipals(UserPrincipal.class).contains(new UserPrincipal("guest")));
-
-        assertEquals("Should have one group principal", 1, subject.getPrincipals(GroupPrincipal.class).size());
-        assertTrue("Group principal is 'guests'", subject.getPrincipals(GroupPrincipal.class).contains(new GroupPrincipal("guests")));
-
-        context.logout();
-
-        assertEquals("Should have zero principals", 0, subject.getPrincipals().size());
-    }
-}
diff --git a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/LDAPLoginModuleTest.java b/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/LDAPLoginModuleTest.java
deleted file mode 100644
index 1cd4e37..0000000
--- a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/LDAPLoginModuleTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * 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.jaas;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.NameClassPair;
-import javax.naming.NamingEnumeration;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import org.apache.directory.server.ldap.LdapServer;
-
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.CLASS )
-@ApplyLdifs( {
-	"dn: uid=first,ou=system\n" +
-	"uid: first\n" +
-	"userPassword: secret\n" +
-	"objectClass: account\n" +
-	"objectClass: simpleSecurityObject\n" +
-	"objectClass: top\n" 
-}
-)
-public class LDAPLoginModuleTest {
-	
-    static {
-        String path = System.getProperty("java.security.auth.login.config");
-        if (path == null) {
-            URL resource = PropertiesLoginModuleTest.class.getClassLoader().getResource("login.config");
-            if (resource != null) {
-                path = resource.getFile();
-                System.setProperty("java.security.auth.login.config", path);
-            }
-        }
-    }
-    
-    private static final String BASE = "ou=system";
-    public static LdapServer ldapServer;
-    private static final String FILTER = "(objectclass=*)";
-    
-    private static final String PRINCIPAL = "uid=admin,ou=system";
-    private static final String CREDENTIALS = "secret";
-    
-    @SuppressWarnings("unchecked")
-    @Test
-    public void testRunning() throws Exception {
-
-        Hashtable env = new Hashtable();
-        env.put(Context.PROVIDER_URL, "ldap://localhost:1024");
-        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
-        env.put(Context.SECURITY_AUTHENTICATION, "simple");
-        env.put(Context.SECURITY_PRINCIPAL, PRINCIPAL);
-        env.put(Context.SECURITY_CREDENTIALS, CREDENTIALS);
-        DirContext ctx = new InitialDirContext(env);
-
-        HashSet set = new HashSet();
-
-        NamingEnumeration list = ctx.list("ou=system");
-
-        while (list.hasMore()) {
-            NameClassPair ncp = (NameClassPair) list.next();
-            set.add(ncp.getName());
-        }
-
-        assertTrue(set.contains("uid=admin"));
-        assertTrue(set.contains("ou=users"));
-        assertTrue(set.contains("ou=groups"));
-        assertTrue(set.contains("ou=configuration"));
-        assertTrue(set.contains("prefNodeName=sysPrefRoot"));
-
-    }
-    
-    @Test
-    public void testLogin() throws LoginException {
-        LoginContext context = new LoginContext("LDAPLogin", new CallbackHandler() {
-            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-                for (int i = 0; i < callbacks.length; i++) {
-                    if (callbacks[i] instanceof NameCallback) {
-                        ((NameCallback) callbacks[i]).setName("first");
-                    } else if (callbacks[i] instanceof PasswordCallback) {
-                        ((PasswordCallback) callbacks[i]).setPassword("secret".toCharArray());
-                    } else {
-                        throw new UnsupportedCallbackException(callbacks[i]);
-                    }
-                }
-            }
-        });
-        context.login();
-        context.logout();
-    }
-
-}
diff --git a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/PropertiesLoginModuleTest.java b/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/PropertiesLoginModuleTest.java
deleted file mode 100644
index 82aef75..0000000
--- a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/PropertiesLoginModuleTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * 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.jaas;
-
-import java.io.IOException;
-import java.net.URL;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.FailedLoginException;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-
-import junit.framework.TestCase;
-
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class PropertiesLoginModuleTest extends TestCase {
-    
-    static {
-        String path = System.getProperty("java.security.auth.login.config");
-        if (path == null) {
-            URL resource = PropertiesLoginModuleTest.class.getClassLoader().getResource("login.config");
-            if (resource != null) {
-                path = resource.getFile();
-                System.setProperty("java.security.auth.login.config", path);
-            }
-        }
-    }
-
-    public void testLogin() throws LoginException {
-        LoginContext context = new LoginContext("PropertiesLogin", new CallbackHandler() {
-            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-                for (int i = 0; i < callbacks.length; i++) {
-                    if (callbacks[i] instanceof NameCallback) {
-                        ((NameCallback) callbacks[i]).setName("first");
-                    } else if (callbacks[i] instanceof PasswordCallback) {
-                        ((PasswordCallback) callbacks[i]).setPassword("secret".toCharArray());
-                    } else {
-                        throw new UnsupportedCallbackException(callbacks[i]);
-                    }
-                }
-            }
-        });
-        context.login();
-
-        Subject subject = context.getSubject();
-
-        assertEquals("Should have three principals", 3, subject.getPrincipals().size());
-        assertEquals("Should have one user principal", 1, subject.getPrincipals(UserPrincipal.class).size());
-        assertEquals("Should have two group principals", 2, subject.getPrincipals(GroupPrincipal.class).size());
-
-        context.logout();
-
-        assertEquals("Should have zero principals", 0, subject.getPrincipals().size());
-    }
-
-    public void testBadUseridLogin() throws Exception {
-        LoginContext context = new LoginContext("PropertiesLogin", new CallbackHandler() {
-            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-                for (int i = 0; i < callbacks.length; i++) {
-                    if (callbacks[i] instanceof NameCallback) {
-                        ((NameCallback) callbacks[i]).setName("BAD");
-                    } else if (callbacks[i] instanceof PasswordCallback) {
-                        ((PasswordCallback) callbacks[i]).setPassword("secret".toCharArray());
-                    } else {
-                        throw new UnsupportedCallbackException(callbacks[i]);
-                    }
-                }
-            }
-        });
-        try {
-            context.login();
-            fail("Should have thrown a FailedLoginException");
-        } catch (FailedLoginException doNothing) {
-        }
-
-    }
-
-    public void testBadPWLogin() throws Exception {
-        LoginContext context = new LoginContext("PropertiesLogin", new CallbackHandler() {
-            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
-                for (int i = 0; i < callbacks.length; i++) {
-                    if (callbacks[i] instanceof NameCallback) {
-                        ((NameCallback) callbacks[i]).setName("first");
-                    } else if (callbacks[i] instanceof PasswordCallback) {
-                        ((PasswordCallback) callbacks[i]).setPassword("BAD".toCharArray());
-                    } else {
-                        throw new UnsupportedCallbackException(callbacks[i]);
-                    }
-                }
-            }
-        });
-        try {
-            context.login();
-            fail("Should have thrown a FailedLoginException");
-        } catch (FailedLoginException doNothing) {
-        }
-
-    }
-}
diff --git a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/StubCertificateLoginModule.java b/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/StubCertificateLoginModule.java
deleted file mode 100644
index f6a7b20..0000000
--- a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/StubCertificateLoginModule.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.jaas;
-
-import java.security.cert.X509Certificate;
-import java.util.Set;
-
-import javax.security.auth.login.LoginException;
-
-public class StubCertificateLoginModule extends CertificateLoginModule {
-    final String userName;
-    final Set groupNames;
-
-    String lastUserName;
-    X509Certificate[] lastCertChain;
-
-    public StubCertificateLoginModule(String userName, Set groupNames) {
-        this.userName = userName;
-        this.groupNames = groupNames;
-    }
-
-    protected String getUserNameForCertificates(X509Certificate[] certs) throws LoginException {
-        lastCertChain = certs;
-        return userName;
-    }
-
-    protected Set getUserGroups(String username) throws LoginException {
-        lastUserName = username;
-        return this.groupNames;
-    }
-}
diff --git a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/UserPrincipalTest.java b/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/UserPrincipalTest.java
deleted file mode 100644
index de12103..0000000
--- a/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/UserPrincipalTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.jaas;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Rev: $ $Date: $
- */
-public class UserPrincipalTest extends TestCase {
-
-    public void testArguments() {
-        UserPrincipal principal = new UserPrincipal("FOO");
-
-        assertEquals("FOO", principal.getName());
-
-        try {
-            new UserPrincipal(null);
-            fail("Should have thrown IllegalArgumentException");
-        } catch (IllegalArgumentException ingore) {
-
-        }
-    }
-
-    public void testHash() {
-        UserPrincipal p1 = new UserPrincipal("FOO");
-        UserPrincipal p2 = new UserPrincipal("FOO");
-
-        assertEquals(p1.hashCode(), p1.hashCode());
-        assertEquals(p1.hashCode(), p2.hashCode());
-    }
-
-    public void testEquals() {
-        UserPrincipal p1 = new UserPrincipal("FOO");
-        UserPrincipal p2 = new UserPrincipal("FOO");
-        UserPrincipal p3 = new UserPrincipal("BAR");
-
-        assertTrue(p1.equals(p1));
-        assertTrue(p1.equals(p2));
-        assertFalse(p1.equals(null));
-        assertFalse(p1.equals("FOO"));
-        assertFalse(p1.equals(p3));
-    }
-}
diff --git a/trunk/activemq-jaas/src/test/resources/groups.properties b/trunk/activemq-jaas/src/test/resources/groups.properties
deleted file mode 100644
index f34a84f..0000000
--- a/trunk/activemq-jaas/src/test/resources/groups.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-programmers=first
-accounting=second
-employees=first,second
diff --git a/trunk/activemq-jaas/src/test/resources/log4j.properties b/trunk/activemq-jaas/src/test/resources/log4j.properties
deleted file mode 100644
index 18cee24..0000000
--- a/trunk/activemq-jaas/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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=INFO
-
-# 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
diff --git a/trunk/activemq-jaas/src/test/resources/login.config b/trunk/activemq-jaas/src/test/resources/login.config
deleted file mode 100644
index 7dd4f00..0000000
--- a/trunk/activemq-jaas/src/test/resources/login.config
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.         
- */
-PropertiesLogin {
-    org.apache.activemq.jaas.PropertiesLoginModule required
-        debug=true
-        org.apache.activemq.jaas.properties.user="users.properties"
-        org.apache.activemq.jaas.properties.group="groups.properties";
-};
-
-LDAPLogin {
-    org.apache.activemq.jaas.LDAPLoginModule required
-        debug=true
-        initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
-        connectionURL="ldap://localhost:1024"
-        connectionUsername="uid=admin,ou=system"
-        connectionPassword=secret
-        connectionProtocol=s
-        authentication=simple
-        userBase="ou=system"
-        userSearchMatching="(uid={0})"
-        userSearchSubtree=false
-        roleBase="ou=system"
-        roleName=dummyRoleName
-        roleSearchMatching="(uid={1})"
-        roleSearchSubtree=false
-        ;
-};
-
-GuestLogin {
-    org.apache.activemq.jaas.GuestLoginModule required
-        debug=true
-        org.apache.activemq.jaas.guest.user="foo"
-        org.apache.activemq.jaas.guest.group="bar";
-
-};
-
-GuestLoginWithDefaults {
-    org.apache.activemq.jaas.GuestLoginModule required
-        debug=true;
-};
diff --git a/trunk/activemq-jaas/src/test/resources/users.properties b/trunk/activemq-jaas/src/test/resources/users.properties
deleted file mode 100644
index 0f6386f..0000000
--- a/trunk/activemq-jaas/src/test/resources/users.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-first=secret
-second=password
diff --git a/trunk/activemq-jmdns_1.0/pom.xml b/trunk/activemq-jmdns_1.0/pom.xml
deleted file mode 100644
index c749e5b..0000000
--- a/trunk/activemq-jmdns_1.0/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <artifactId>activemq-parent</artifactId>
-    <groupId>org.apache.activemq</groupId>
-    <version>5.5.0</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>activemq-jmdns_1.0</artifactId>
-  <name>ActiveMQ :: jmdns 1.0</name>
-
-  <description>
-    The activemq-jmdns_1.0 source is derived from http://repo1.maven.org/maven2/jmdns/jmdns/1.0/jmdns-1.0-sources.jar
-
-    Changes to apache activemq version:
-    - renamed package javax.jmdns to org.apache.activemq.jmdns
-    - removed classes with lgpl source headers, leaving only the org.apache.activemq.jmdns package.
-  </description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSCache.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSCache.java
deleted file mode 100644
index 5b7cde0..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSCache.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.logging.Logger;
-
-/**
- * A table of DNS entries. This is a hash table which
- * can handle multiple entries with the same name.
- * <p/>
- * Storing multiple entries with the same name is implemented using a
- * linked list of <code>CacheNode</code>'s.
- * <p/>
- * The current implementation of the API of DNSCache does expose the
- * cache nodes to clients. Clients must explicitly deal with the nodes
- * when iterating over entries in the cache. Here's how to iterate over
- * all entries in the cache:
- * <pre>
- * for (Iterator i=dnscache.iterator(); i.hasNext(); ) {
- *    for (DNSCache.CacheNode n = (DNSCache.CacheNode) i.next(); n != null; n.next()) {
- *       DNSEntry entry = n.getValue();
- *       ...do something with entry...
- *    }
- * }
- * </pre>
- * <p/>
- * And here's how to iterate over all entries having a given name:
- * <pre>
- * for (DNSCache.CacheNode n = (DNSCache.CacheNode) dnscache.find(name); n != null; n.next()) {
- *     DNSEntry entry = n.getValue();
- *     ...do something with entry...
- * }
- * </pre>
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Werner Randelshofer, Rick Blair
- */
-class DNSCache
-{
-    private static Logger logger = Logger.getLogger(DNSCache.class.toString());
-    // Implementation note:
-    // We might completely hide the existence of CacheNode's in a future version
-    // of DNSCache. But this will require to implement two (inner) classes for
-    // the  iterators that will be returned by method <code>iterator()</code> and
-    // method <code>find(name)</code>.
-    // Since DNSCache is not a public class, it does not seem worth the effort
-    // to clean its API up that much.
-
-    // [PJYF Oct 15 2004] This should implements Collections that would be amuch cleaner implementation
-    
-    /**
-     * The number of DNSEntry's in the cache.
-     */
-    private int size;
-
-    /**
-     * The hashtable used internally to store the entries of the cache.
-     * Keys are instances of String. The String contains an unqualified service
-     * name.
-     * Values are linked lists of CacheNode instances.
-     */
-    private HashMap hashtable;
-
-    /**
-     * Cache nodes are used to implement storage of multiple DNSEntry's of the
-     * same name in the cache.
-     */
-    public static class CacheNode
-    {
-        private static Logger logger = Logger.getLogger(CacheNode.class.toString());
-        private DNSEntry value;
-        private CacheNode next;
-
-        public CacheNode(DNSEntry value)
-        {
-            this.value = value;
-        }
-
-        public CacheNode next()
-        {
-            return next;
-        }
-
-        public DNSEntry getValue()
-        {
-            return value;
-        }
-    }
-
-
-    /**
-     * Create a table with a given initial size.
-     */
-    public DNSCache(final int size)
-    {
-        hashtable = new HashMap(size);
-    }
-
-    /**
-     * Clears the cache.
-     */
-    public synchronized void clear()
-    {
-        hashtable.clear();
-        size = 0;
-    }
-
-    /**
-     * Adds an entry to the table.
-     */
-    public synchronized void add(final DNSEntry entry)
-    {
-        //logger.log("DNSCache.add("+entry.getName()+")");
-        CacheNode newValue = new CacheNode(entry);
-        CacheNode node = (CacheNode) hashtable.get(entry.getName());
-        if (node == null)
-        {
-            hashtable.put(entry.getName(), newValue);
-        }
-        else
-        {
-            newValue.next = node.next;
-            node.next = newValue;
-        }
-        size++;
-    }
-
-    /**
-     * Remove a specific entry from the table. Returns true if the
-     * entry was found.
-     */
-    public synchronized boolean remove(DNSEntry entry)
-    {
-        CacheNode node = (CacheNode) hashtable.get(entry.getName());
-        if (node != null)
-        {
-            if (node.value == entry)
-            {
-                if (node.next == null)
-                {
-                    hashtable.remove(entry.getName());
-                }
-                else
-                {
-                    hashtable.put(entry.getName(), node.next);
-                }
-                size--;
-                return true;
-            }
-
-            CacheNode previous = node;
-            node = node.next;
-            while (node != null)
-            {
-                if (node.value == entry)
-                {
-                    previous.next = node.next;
-                    size--;
-                    return true;
-                }
-                previous = node;
-                node = node.next;
-            }
-            ;
-        }
-        return false;
-    }
-
-    /**
-     * Get a matching DNS entry from the table (using equals).
-     * Returns the entry that was found.
-     */
-    public synchronized DNSEntry get(DNSEntry entry)
-    {
-        for (CacheNode node = find(entry.getName()); node != null; node = node.next)
-        {
-            if (node.value.equals(entry))
-            {
-                return node.value;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Get a matching DNS entry from the table.
-     */
-    public synchronized DNSEntry get(String name, int type, int clazz)
-    {
-        for (CacheNode node = find(name); node != null; node = node.next)
-        {
-            if (node.value.type == type && node.value.clazz == clazz)
-            {
-                return node.value;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Iterates over all cache nodes.
-     * The iterator returns instances of DNSCache.CacheNode.
-     * Each instance returned is the first node of a linked list.
-     * To retrieve all entries, one must iterate over this linked list. See
-     * code snippets in the header of the class.
-     */
-    public Iterator iterator()
-    {
-        return Collections.unmodifiableCollection(hashtable.values()).iterator();
-    }
-
-    /**
-     * Iterate only over items with matching name.
-     * Returns an instance of DNSCache.CacheNode or null.
-     * If an instance is returned, it is the first node of a linked list.
-     * To retrieve all entries, one must iterate over this linked list.
-     */
-    public synchronized CacheNode find(String name)
-    {
-        return (CacheNode) hashtable.get(name);
-    }
-
-    /**
-     * List all entries for debugging.
-     */
-    public synchronized void print()
-    {
-        for (Iterator i = iterator(); i.hasNext();)
-        {
-            for (CacheNode n = (CacheNode) i.next(); n != null; n = n.next)
-            {
-                System.out.println(n.value);
-            }
-        }
-    }
-
-    public synchronized String toString()
-    {
-        StringBuffer aLog = new StringBuffer();
-        aLog.append("\t---- cache ----");
-        for (Iterator i = iterator(); i.hasNext();)
-        {
-            for (CacheNode n = (CacheNode) i.next(); n != null; n = n.next)
-            {
-                aLog.append("\n\t\t" + n.value);
-            }
-        }
-        return aLog.toString();
-    }
-
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSConstants.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSConstants.java
deleted file mode 100644
index 21363e5..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSConstants.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-/**
- * DNS constants.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Jeff Sonstein, Werner Randelshofer, Pierre Frisch, Rick Blair
- */
-final class DNSConstants
-{
-
-    // changed to final class - jeffs
-    final static String MDNS_GROUP = "224.0.0.251";
-    final static String MDNS_GROUP_IPV6 = "FF02::FB";
-    final static int MDNS_PORT = 5353;
-    final static int DNS_PORT = 53;
-    final static int DNS_TTL = 60 * 60;	// default one hour TTL
-    // final static int DNS_TTL		    = 120 * 60;	// two hour TTL (draft-cheshire-dnsext-multicastdns.txt ch 13)
-    
-    final static int MAX_MSG_TYPICAL = 1460;
-    final static int MAX_MSG_ABSOLUTE = 8972;
-
-    final static int FLAGS_QR_MASK = 0x8000;	// Query response mask
-    final static int FLAGS_QR_QUERY = 0x0000;	// Query
-    final static int FLAGS_QR_RESPONSE = 0x8000;	// Response
-
-    final static int FLAGS_AA = 0x0400;	// Authorative answer
-    final static int FLAGS_TC = 0x0200;	// Truncated
-    final static int FLAGS_RD = 0x0100;	// Recursion desired
-    final static int FLAGS_RA = 0x8000;	// Recursion available
-
-    final static int FLAGS_Z = 0x0040;	// Zero
-    final static int FLAGS_AD = 0x0020;	// Authentic data
-    final static int FLAGS_CD = 0x0010;	// Checking disabled
-
-    final static int CLASS_IN = 1;		// Final Static Internet
-    final static int CLASS_CS = 2;		// CSNET
-    final static int CLASS_CH = 3;		// CHAOS
-    final static int CLASS_HS = 4;		// Hesiod
-    final static int CLASS_NONE = 254;		// Used in DNS UPDATE [RFC 2136]
-    final static int CLASS_ANY = 255;		// Not a DNS class, but a DNS query class, meaning "all classes"
-    final static int CLASS_MASK = 0x7FFF;	// Multicast DNS uses the bottom 15 bits to identify the record class...
-    final static int CLASS_UNIQUE = 0x8000;	// ... and the top bit indicates that all other cached records are now invalid
-
-    final static int TYPE_IGNORE = 0;		// This is a hack to stop further processing
-    final static int TYPE_A = 1; 		// Address
-    final static int TYPE_NS = 2;		// Name Server
-    final static int TYPE_MD = 3;		// Mail Destination
-    final static int TYPE_MF = 4;		// Mail Forwarder
-    final static int TYPE_CNAME = 5;		// Canonical Name
-    final static int TYPE_SOA = 6;		// Start of Authority
-    final static int TYPE_MB = 7;		// Mailbox
-    final static int TYPE_MG = 8;		// Mail Group
-    final static int TYPE_MR = 9;		// Mail Rename
-    final static int TYPE_NULL = 10;		// NULL RR
-    final static int TYPE_WKS = 11;		// Well-known-service
-    final static int TYPE_PTR = 12;		// Domain Name pofinal static inter
-    final static int TYPE_HINFO = 13;		// Host information
-    final static int TYPE_MINFO = 14;		// Mailbox information
-    final static int TYPE_MX = 15;		// Mail exchanger
-    final static int TYPE_TXT = 16;		// Arbitrary text string
-    final static int TYPE_RP = 17; 		// for Responsible Person                 [RFC1183]
-    final static int TYPE_AFSDB = 18; 		// for AFS Data Base location             [RFC1183]
-    final static int TYPE_X25 = 19; 		// for X.25 PSDN address                  [RFC1183]
-    final static int TYPE_ISDN = 20; 		// for ISDN address                       [RFC1183]
-    final static int TYPE_RT = 21; 		// for Route Through                      [RFC1183]
-    final static int TYPE_NSAP = 22; 		// for NSAP address, NSAP style A record  [RFC1706]
-    final static int TYPE_NSAP_PTR = 23;		//
-    final static int TYPE_SIG = 24; 		// for security signature                 [RFC2931]
-    final static int TYPE_KEY = 25; 		// for security key                       [RFC2535]
-    final static int TYPE_PX = 26; 		// X.400 mail mapping information         [RFC2163]
-    final static int TYPE_GPOS = 27; 		// Geographical Position                  [RFC1712]
-    final static int TYPE_AAAA = 28; 		// IP6 Address                            [Thomson]
-    final static int TYPE_LOC = 29; 		// Location Information                   [Vixie]
-    final static int TYPE_NXT = 30; 		// Next Domain - OBSOLETE                 [RFC2535, RFC3755]
-    final static int TYPE_EID = 31; 		// Endpoint Identifier                    [Patton]
-    final static int TYPE_NIMLOC = 32; 		// Nimrod Locator                         [Patton]
-    final static int TYPE_SRV = 33; 		// Server Selection                       [RFC2782]
-    final static int TYPE_ATMA = 34; 		// ATM Address                            [Dobrowski]
-    final static int TYPE_NAPTR = 35; 		// Naming Authority Pointer               [RFC2168, RFC2915]
-    final static int TYPE_KX = 36; 		// Key Exchanger                          [RFC2230]
-    final static int TYPE_CERT = 37; 		// CERT                                   [RFC2538]
-    final static int TYPE_A6 = 38; 		// A6                                     [RFC2874]
-    final static int TYPE_DNAME = 39; 		// DNAME                                  [RFC2672]
-    final static int TYPE_SINK = 40; 		// SINK                                   [Eastlake]
-    final static int TYPE_OPT = 41; 		// OPT                                    [RFC2671]
-    final static int TYPE_APL = 42; 		// APL                                    [RFC3123]
-    final static int TYPE_DS = 43; 		// Delegation Signer                      [RFC3658]
-    final static int TYPE_SSHFP = 44; 		// SSH Key Fingerprint                    [RFC-ietf-secsh-dns-05.txt]
-    final static int TYPE_RRSIG = 46; 		// RRSIG                                  [RFC3755]
-    final static int TYPE_NSEC = 47; 		// NSEC                                   [RFC3755]
-    final static int TYPE_DNSKEY = 48;		// DNSKEY                                 [RFC3755]
-    final static int TYPE_UINFO = 100;      //									      [IANA-Reserved]
-    final static int TYPE_UID = 101;      //                                        [IANA-Reserved]
-    final static int TYPE_GID = 102;      //                                        [IANA-Reserved]
-    final static int TYPE_UNSPEC = 103;      //                                        [IANA-Reserved]
-    final static int TYPE_TKEY = 249; 		// Transaction Key                        [RFC2930]
-    final static int TYPE_TSIG = 250; 		// Transaction Signature                  [RFC2845]
-    final static int TYPE_IXFR = 251; 		// Incremental transfer                   [RFC1995]
-    final static int TYPE_AXFR = 252;		// Transfer of an entire zone             [RFC1035]
-    final static int TYPE_MAILA = 253;		// Mailbox-related records (MB, MG or MR) [RFC1035]
-    final static int TYPE_MAILB = 254;		// Mail agent RRs (Obsolete - see MX)     [RFC1035]
-    final static int TYPE_ANY = 255;		// Request for all records	        	  [RFC1035]
-    
-    //Time Intervals for various functions
-    
-    final static int SHARED_QUERY_TIME = 20;            //milliseconds before send shared query
-    final static int QUERY_WAIT_INTERVAL = 225;           //milliseconds between query loops.
-    final static int PROBE_WAIT_INTERVAL = 250;           //milliseconds between probe loops.
-    final static int RESPONSE_MIN_WAIT_INTERVAL = 20;            //minimal wait interval for response.
-    final static int RESPONSE_MAX_WAIT_INTERVAL = 115;           //maximal wait interval for response
-    final static int PROBE_CONFLICT_INTERVAL = 1000;          //milliseconds to wait after conflict.
-    final static int PROBE_THROTTLE_COUNT = 10;            //After x tries go 1 time a sec. on probes.
-    final static int PROBE_THROTTLE_COUNT_INTERVAL = 5000;          //We only increment the throttle count, if
-    // the previous increment is inside this interval.
-    final static int ANNOUNCE_WAIT_INTERVAL = 1000;          //milliseconds between Announce loops.
-    final static int RECORD_REAPER_INTERVAL = 10000;         //milliseconds between cache cleanups.
-    final static int KNOWN_ANSWER_TTL = 120;
-    final static int ANNOUNCED_RENEWAL_TTL_INTERVAL = DNS_TTL * 500; // 50% of the TTL in milliseconds
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSEntry.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSEntry.java
deleted file mode 100644
index b0bc06b..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSEntry.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.util.logging.Logger;
-
-/**
- * DNS entry with a name, type, and class. This is the base
- * class for questions and records.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Pierre Frisch, Rick Blair
- */
-class DNSEntry
-{
-    private static Logger logger = Logger.getLogger(DNSEntry.class.toString());
-    String key;
-    String name;
-    int type;
-    int clazz;
-    boolean unique;
-
-    /**
-     * Create an entry.
-     */
-    DNSEntry(String name, int type, int clazz)
-    {
-        this.key = name.toLowerCase();
-        this.name = name;
-        this.type = type;
-        this.clazz = clazz & DNSConstants.CLASS_MASK;
-        this.unique = (clazz & DNSConstants.CLASS_UNIQUE) != 0;
-    }
-
-    /**
-     * Check if two entries have exactly the same name, type, and class.
-     */
-    public boolean equals(Object obj)
-    {
-        if (obj instanceof DNSEntry)
-        {
-            DNSEntry other = (DNSEntry) obj;
-            return name.equals(other.name) && type == other.type && clazz == other.clazz;
-        }
-        return false;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public int getType()
-    {
-        return type;
-    }
-
-    /**
-     * Overriden, to return a value which is consistent with the value returned
-     * by equals(Object).
-     */
-    public int hashCode()
-    {
-        return name.hashCode() + type + clazz;
-    }
-
-    /**
-     * Get a string given a clazz.
-     */
-    static String getClazz(int clazz)
-    {
-        switch (clazz & DNSConstants.CLASS_MASK)
-        {
-            case DNSConstants.CLASS_IN:
-                return "in";
-            case DNSConstants.CLASS_CS:
-                return "cs";
-            case DNSConstants.CLASS_CH:
-                return "ch";
-            case DNSConstants.CLASS_HS:
-                return "hs";
-            case DNSConstants.CLASS_NONE:
-                return "none";
-            case DNSConstants.CLASS_ANY:
-                return "any";
-            default:
-                return "?";
-        }
-    }
-
-    /**
-     * Get a string given a type.
-     */
-    static String getType(int type)
-    {
-        switch (type)
-        {
-            case DNSConstants.TYPE_A:
-                return "a";
-            case DNSConstants.TYPE_AAAA:
-                return "aaaa";
-            case DNSConstants.TYPE_NS:
-                return "ns";
-            case DNSConstants.TYPE_MD:
-                return "md";
-            case DNSConstants.TYPE_MF:
-                return "mf";
-            case DNSConstants.TYPE_CNAME:
-                return "cname";
-            case DNSConstants.TYPE_SOA:
-                return "soa";
-            case DNSConstants.TYPE_MB:
-                return "mb";
-            case DNSConstants.TYPE_MG:
-                return "mg";
-            case DNSConstants.TYPE_MR:
-                return "mr";
-            case DNSConstants.TYPE_NULL:
-                return "null";
-            case DNSConstants.TYPE_WKS:
-                return "wks";
-            case DNSConstants.TYPE_PTR:
-                return "ptr";
-            case DNSConstants.TYPE_HINFO:
-                return "hinfo";
-            case DNSConstants.TYPE_MINFO:
-                return "minfo";
-            case DNSConstants.TYPE_MX:
-                return "mx";
-            case DNSConstants.TYPE_TXT:
-                return "txt";
-            case DNSConstants.TYPE_SRV:
-                return "srv";
-            case DNSConstants.TYPE_ANY:
-                return "any";
-            default:
-                return "?";
-        }
-    }
-
-    public String toString(String hdr, String other)
-    {
-        return hdr + "[" + getType(type) + "," + getClazz(clazz) + (unique ? "-unique," : ",") + name + ((other != null) ? "," + other + "]" : "]");
-    }
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSIncoming.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSIncoming.java
deleted file mode 100644
index 90c18d9..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSIncoming.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Parse an incoming DNS message into its components.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Werner Randelshofer, Pierre Frisch
- */
-final class DNSIncoming
-{
-    private static Logger logger = Logger.getLogger(DNSIncoming.class.toString());
-    // Implementation note: This vector should be immutable.
-    // If a client of DNSIncoming changes the contents of this vector,
-    // we get undesired results. To fix this, we have to migrate to
-    // the Collections API of Java 1.2. i.e we replace Vector by List.
-    // final static Vector EMPTY = new Vector();
-    
-    private DatagramPacket packet;
-    private int off;
-    private int len;
-    private byte data[];
-
-    int id;
-    private int flags;
-    private int numQuestions;
-    int numAnswers;
-    private int numAuthorities;
-    private int numAdditionals;
-    private long receivedTime;
-
-    List questions;
-    List answers;
-
-    /**
-     * Parse a message from a datagram packet.
-     */
-    DNSIncoming(DatagramPacket packet) throws IOException
-    {
-        this.packet = packet;
-        this.data = packet.getData();
-        this.len = packet.getLength();
-        this.off = packet.getOffset();
-        this.questions = Collections.EMPTY_LIST;
-        this.answers = Collections.EMPTY_LIST;
-        this.receivedTime = System.currentTimeMillis();
-
-        try
-        {
-            id = readUnsignedShort();
-            flags = readUnsignedShort();
-            numQuestions = readUnsignedShort();
-            numAnswers = readUnsignedShort();
-            numAuthorities = readUnsignedShort();
-            numAdditionals = readUnsignedShort();
-
-            // parse questions
-            if (numQuestions > 0)
-            {
-                questions = Collections.synchronizedList(new ArrayList(numQuestions));
-                for (int i = 0; i < numQuestions; i++)
-                {
-                    DNSQuestion question = new DNSQuestion(readName(), readUnsignedShort(), readUnsignedShort());
-                    questions.add(question);
-                }
-            }
-
-            // parse answers
-            int n = numAnswers + numAuthorities + numAdditionals;
-            if (n > 0)
-            {
-                answers = Collections.synchronizedList(new ArrayList(n));
-                for (int i = 0; i < n; i++)
-                {
-                    String domain = readName();
-                    int type = readUnsignedShort();
-                    int clazz = readUnsignedShort();
-                    int ttl = readInt();
-                    int len = readUnsignedShort();
-                    int end = off + len;
-                    DNSRecord rec = null;
-
-                    switch (type)
-                    {
-                        case DNSConstants.TYPE_A:		// IPv4
-                        case DNSConstants.TYPE_AAAA:	// IPv6 FIXME [PJYF Oct 14 2004] This has not been tested
-                            rec = new DNSRecord.Address(domain, type, clazz, ttl, readBytes(off, len));
-                            break;
-                        case DNSConstants.TYPE_CNAME:
-                        case DNSConstants.TYPE_PTR:
-                            rec = new DNSRecord.Pointer(domain, type, clazz, ttl, readName());
-                            break;
-                        case DNSConstants.TYPE_TXT:
-                            rec = new DNSRecord.Text(domain, type, clazz, ttl, readBytes(off, len));
-                            break;
-                        case DNSConstants.TYPE_SRV:
-                            rec = new DNSRecord.Service(domain, type, clazz, ttl,
-                                readUnsignedShort(), readUnsignedShort(), readUnsignedShort(), readName());
-                            break;
-                        case DNSConstants.TYPE_HINFO:
-                            // Maybe we should do something with those
-                            break;
-                        default :
-                            logger.finer("DNSIncoming() unknown type:" + type);
-                            break;
-                    }
-
-                    if (rec != null)
-                    {
-                        // Add a record, if we were able to create one.
-                        answers.add(rec);
-                    }
-                    else
-                    {
-                        // Addjust the numbers for the skipped record
-                        if (answers.size() < numAnswers)
-                        {
-                            numAnswers--;
-                        }
-                        else
-                        {
-                            if (answers.size() < numAnswers + numAuthorities)
-                            {
-                                numAuthorities--;
-                            }
-                            else
-                            {
-                                if (answers.size() < numAnswers + numAuthorities + numAdditionals)
-                                {
-                                    numAdditionals--;
-                                }
-                            }
-                        }
-                    }
-                    off = end;
-                }
-            }
-        }
-        catch (IOException e)
-        {
-            logger.log(Level.WARNING, "DNSIncoming() dump " + print(true) + "\n exception ", e);
-            throw e;
-        }
-    }
-
-    /**
-     * Check if the message is a query.
-     */
-    boolean isQuery()
-    {
-        return (flags & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY;
-    }
-
-    /**
-     * Check if the message is truncated.
-     */
-    boolean isTruncated()
-    {
-        return (flags & DNSConstants.FLAGS_TC) != 0;
-    }
-
-    /**
-     * Check if the message is a response.
-     */
-    boolean isResponse()
-    {
-        return (flags & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_RESPONSE;
-    }
-
-    private int get(int off) throws IOException
-    {
-        if ((off < 0) || (off >= len))
-        {
-            throw new IOException("parser error: offset=" + off);
-        }
-        return data[off] & 0xFF;
-    }
-
-    private int readUnsignedShort() throws IOException
-    {
-        return (get(off++) << 8) + get(off++);
-    }
-
-    private int readInt() throws IOException
-    {
-        return (readUnsignedShort() << 16) + readUnsignedShort();
-    }
-
-    private byte[] readBytes(int off, int len) throws IOException
-    {
-        byte bytes[] = new byte[len];
-        System.arraycopy(data, off, bytes, 0, len);
-        return bytes;
-    }
-
-    private void readUTF(StringBuffer buf, int off, int len) throws IOException
-    {
-        for (int end = off + len; off < end;)
-        {
-            int ch = get(off++);
-            switch (ch >> 4)
-            {
-                case 0:
-                case 1:
-                case 2:
-                case 3:
-                case 4:
-                case 5:
-                case 6:
-                case 7:
-                    // 0xxxxxxx
-                    break;
-                case 12:
-                case 13:
-                    // 110x xxxx   10xx xxxx
-                    ch = ((ch & 0x1F) << 6) | (get(off++) & 0x3F);
-                    break;
-                case 14:
-                    // 1110 xxxx  10xx xxxx  10xx xxxx
-                    ch = ((ch & 0x0f) << 12) | ((get(off++) & 0x3F) << 6) | (get(off++) & 0x3F);
-                    break;
-                default:
-                    // 10xx xxxx,  1111 xxxx
-                    ch = ((ch & 0x3F) << 4) | (get(off++) & 0x0f);
-                    break;
-            }
-            buf.append((char) ch);
-        }
-    }
-
-    private String readName() throws IOException
-    {
-        StringBuffer buf = new StringBuffer();
-        int off = this.off;
-        int next = -1;
-        int first = off;
-
-        while (true)
-        {
-            int len = get(off++);
-            if (len == 0)
-            {
-                break;
-            }
-            switch (len & 0xC0)
-            {
-                case 0x00:
-                    //buf.append("[" + off + "]");
-                    readUTF(buf, off, len);
-                    off += len;
-                    buf.append('.');
-                    break;
-                case 0xC0:
-                    //buf.append("<" + (off - 1) + ">");
-                    if (next < 0)
-                    {
-                        next = off + 1;
-                    }
-                    off = ((len & 0x3F) << 8) | get(off++);
-                    if (off >= first)
-                    {
-                        throw new IOException("bad domain name: possible circular name detected");
-                    }
-                    first = off;
-                    break;
-                default:
-                    throw new IOException("bad domain name: '" + buf + "' at " + off);
-            }
-        }
-        this.off = (next >= 0) ? next : off;
-        return buf.toString();
-    }
-
-    /**
-     * Debugging.
-     */
-    String print(boolean dump)
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append(toString() + "\n");
-        for (Iterator iterator = questions.iterator(); iterator.hasNext();)
-        {
-            buf.append("    ques:" + iterator.next() + "\n");
-        }
-        int count = 0;
-        for (Iterator iterator = answers.iterator(); iterator.hasNext(); count++)
-        {
-            if (count < numAnswers)
-            {
-                buf.append("    answ:");
-            }
-            else
-            {
-                if (count < numAnswers + numAuthorities)
-                {
-                    buf.append("    auth:");
-                }
-                else
-                {
-                    buf.append("    addi:");
-                }
-            }
-            buf.append(iterator.next() + "\n");
-        }
-        if (dump)
-        {
-            for (int off = 0, len = packet.getLength(); off < len; off += 32)
-            {
-                int n = Math.min(32, len - off);
-                if (off < 10)
-                {
-                    buf.append(' ');
-                }
-                if (off < 100)
-                {
-                    buf.append(' ');
-                }
-                buf.append(off);
-                buf.append(':');
-                for (int i = 0; i < n; i++)
-                {
-                    if ((i % 8) == 0)
-                    {
-                        buf.append(' ');
-                    }
-                    buf.append(Integer.toHexString((data[off + i] & 0xF0) >> 4));
-                    buf.append(Integer.toHexString((data[off + i] & 0x0F) >> 0));
-                }
-                buf.append("\n");
-                buf.append("    ");
-                for (int i = 0; i < n; i++)
-                {
-                    if ((i % 8) == 0)
-                    {
-                        buf.append(' ');
-                    }
-                    buf.append(' ');
-                    int ch = data[off + i] & 0xFF;
-                    buf.append(((ch > ' ') && (ch < 127)) ? (char) ch : '.');
-                }
-                buf.append("\n");
-
-                // limit message size
-                if (off + 32 >= 256)
-                {
-                    buf.append("....\n");
-                    break;
-                }
-            }
-        }
-        return buf.toString();
-    }
-
-    public String toString()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append(isQuery() ? "dns[query," : "dns[response,");
-        if (packet.getAddress() != null)
-        {
-            buf.append(packet.getAddress().getHostAddress());
-        }
-        buf.append(':');
-        buf.append(packet.getPort());
-        buf.append(",len=");
-        buf.append(packet.getLength());
-        buf.append(",id=0x");
-        buf.append(Integer.toHexString(id));
-        if (flags != 0)
-        {
-            buf.append(",flags=0x");
-            buf.append(Integer.toHexString(flags));
-            if ((flags & DNSConstants.FLAGS_QR_RESPONSE) != 0)
-            {
-                buf.append(":r");
-            }
-            if ((flags & DNSConstants.FLAGS_AA) != 0)
-            {
-                buf.append(":aa");
-            }
-            if ((flags & DNSConstants.FLAGS_TC) != 0)
-            {
-                buf.append(":tc");
-            }
-        }
-        if (numQuestions > 0)
-        {
-            buf.append(",questions=");
-            buf.append(numQuestions);
-        }
-        if (numAnswers > 0)
-        {
-            buf.append(",answers=");
-            buf.append(numAnswers);
-        }
-        if (numAuthorities > 0)
-        {
-            buf.append(",authorities=");
-            buf.append(numAuthorities);
-        }
-        if (numAdditionals > 0)
-        {
-            buf.append(",additionals=");
-            buf.append(numAdditionals);
-        }
-        buf.append("]");
-        return buf.toString();
-    }
-
-    /**
-     * Appends answers to this Incoming.
-     *
-     * @throws IllegalArgumentException If not a query or if Truncated.
-     */
-    void append(DNSIncoming that)
-    {
-        if (this.isQuery() && this.isTruncated() && that.isQuery())
-        {
-            this.questions.addAll(that.questions);
-            this.numQuestions += that.numQuestions;
-
-            if (Collections.EMPTY_LIST.equals(answers))
-            {
-                answers = Collections.synchronizedList(new ArrayList());
-            }
-
-            if (that.numAnswers > 0)
-            {
-                this.answers.addAll(this.numAnswers, that.answers.subList(0, that.numAnswers));
-                this.numAnswers += that.numAnswers;
-            }
-            if (that.numAuthorities > 0)
-            {
-                this.answers.addAll(this.numAnswers + this.numAuthorities, that.answers.subList(that.numAnswers, that.numAnswers + that.numAuthorities));
-                this.numAuthorities += that.numAuthorities;
-            }
-            if (that.numAdditionals > 0)
-            {
-                this.answers.addAll(that.answers.subList(that.numAnswers + that.numAuthorities, that.numAnswers + that.numAuthorities + that.numAdditionals));
-                this.numAdditionals += that.numAdditionals;
-            }
-        }
-        else
-        {
-            throw new IllegalArgumentException();
-        }
-    }
-
-    int elapseSinceArrival()
-    {
-        return (int) (System.currentTimeMillis() - receivedTime);
-    }
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java
deleted file mode 100644
index 4471df3..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSListener.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-// REMIND: Listener should follow Java idiom for listener or have a different
-//         name.
-
-/**
- * DNSListener.
- * Listener for record updates.
- *
- * @author Werner Randelshofer, Rick Blair
- * @version 1.0  May 22, 2004  Created.
- */
-interface DNSListener
-{
-    /**
-     * Update a DNS record.
-     */
-    void updateRecord(JmDNS jmdns, long now, DNSRecord record);
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSOutgoing.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSOutgoing.java
deleted file mode 100644
index a39dfec..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSOutgoing.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.io.IOException;
-import java.util.Hashtable;
-import java.util.LinkedList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An outgoing DNS message.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Rick Blair, Werner Randelshofer
- */
-final class DNSOutgoing
-{
-    private static Logger logger = Logger.getLogger(DNSOutgoing.class.toString());
-    int id;
-    int flags;
-    private boolean multicast;
-    private int numQuestions;
-    private int numAnswers;
-    private int numAuthorities;
-    private int numAdditionals;
-    private Hashtable names;
-
-    byte data[];
-    int off;
-    int len;
-
-    /**
-     * Create an outgoing multicast query or response.
-     */
-    DNSOutgoing(int flags)
-    {
-        this(flags, true);
-    }
-
-    /**
-     * Create an outgoing query or response.
-     */
-    DNSOutgoing(int flags, boolean multicast)
-    {
-        this.flags = flags;
-        this.multicast = multicast;
-        names = new Hashtable();
-        data = new byte[DNSConstants.MAX_MSG_TYPICAL];
-        off = 12;
-    }
-
-    /**
-     * Add a question to the message.
-     */
-    void addQuestion(DNSQuestion rec) throws IOException
-    {
-        if (numAnswers > 0 || numAuthorities > 0 || numAdditionals > 0)
-        {
-            throw new IllegalStateException("Questions must be added before answers");
-        }
-        numQuestions++;
-        writeQuestion(rec);
-    }
-
-    /**
-     * Add an answer if it is not suppressed.
-     */
-    void addAnswer(DNSIncoming in, DNSRecord rec) throws IOException
-    {
-        if (numAuthorities > 0 || numAdditionals > 0)
-        {
-            throw new IllegalStateException("Answers must be added before authorities and additionals");
-        }
-        if (!rec.suppressedBy(in))
-        {
-            addAnswer(rec, 0);
-        }
-    }
-
-    /**
-     * Add an additional answer to the record. Omit if there is no room.
-     */
-    void addAdditionalAnswer(DNSIncoming in, DNSRecord rec) throws IOException
-    {
-        if ((off < DNSConstants.MAX_MSG_TYPICAL - 200) && !rec.suppressedBy(in))
-        {
-            writeRecord(rec, 0);
-            numAdditionals++;
-        }
-    }
-
-    /**
-     * Add an answer to the message.
-     */
-    void addAnswer(DNSRecord rec, long now) throws IOException
-    {
-        if (numAuthorities > 0 || numAdditionals > 0)
-        {
-            throw new IllegalStateException("Questions must be added before answers");
-        }
-        if (rec != null)
-        {
-            if ((now == 0) || !rec.isExpired(now))
-            {
-                writeRecord(rec, now);
-                numAnswers++;
-            }
-        }
-    }
-
-    private LinkedList authorativeAnswers = new LinkedList();
-
-    /**
-     * Add an authorative answer to the message.
-     */
-    void addAuthorativeAnswer(DNSRecord rec) throws IOException
-    {
-        if (numAdditionals > 0)
-        {
-            throw new IllegalStateException("Authorative answers must be added before additional answers");
-        }
-        authorativeAnswers.add(rec);
-        writeRecord(rec, 0);
-        numAuthorities++;
-
-        // VERIFY:
-
-    }
-
-    void writeByte(int value) throws IOException
-    {
-        if (off >= data.length)
-        {
-            throw new IOException("buffer full");
-        }
-        data[off++] = (byte) value;
-    }
-
-    void writeBytes(String str, int off, int len) throws IOException
-    {
-        for (int i = 0; i < len; i++)
-        {
-            writeByte(str.charAt(off + i));
-        }
-    }
-
-    void writeBytes(byte data[]) throws IOException
-    {
-        if (data != null)
-        {
-            writeBytes(data, 0, data.length);
-        }
-    }
-
-    void writeBytes(byte data[], int off, int len) throws IOException
-    {
-        for (int i = 0; i < len; i++)
-        {
-            writeByte(data[off + i]);
-        }
-    }
-
-    void writeShort(int value) throws IOException
-    {
-        writeByte(value >> 8);
-        writeByte(value);
-    }
-
-    void writeInt(int value) throws IOException
-    {
-        writeShort(value >> 16);
-        writeShort(value);
-    }
-
-    void writeUTF(String str, int off, int len) throws IOException
-    {
-        // compute utf length
-        int utflen = 0;
-        for (int i = 0; i < len; i++)
-        {
-            int ch = str.charAt(off + i);
-            if ((ch >= 0x0001) && (ch <= 0x007F))
-            {
-                utflen += 1;
-            }
-            else
-            {
-                if (ch > 0x07FF)
-                {
-                    utflen += 3;
-                }
-                else
-                {
-                    utflen += 2;
-                }
-            }
-        }
-        // write utf length
-        writeByte(utflen);
-        // write utf data
-        for (int i = 0; i < len; i++)
-        {
-            int ch = str.charAt(off + i);
-            if ((ch >= 0x0001) && (ch <= 0x007F))
-            {
-                writeByte(ch);
-            }
-            else
-            {
-                if (ch > 0x07FF)
-                {
-                    writeByte(0xE0 | ((ch >> 12) & 0x0F));
-                    writeByte(0x80 | ((ch >> 6) & 0x3F));
-                    writeByte(0x80 | ((ch >> 0) & 0x3F));
-                }
-                else
-                {
-                    writeByte(0xC0 | ((ch >> 6) & 0x1F));
-                    writeByte(0x80 | ((ch >> 0) & 0x3F));
-                }
-            }
-        }
-    }
-
-    void writeName(String name) throws IOException
-    {
-        while (true)
-        {
-            int n = name.indexOf('.');
-            if (n < 0)
-            {
-                n = name.length();
-            }
-            if (n <= 0)
-            {
-                writeByte(0);
-                return;
-            }
-            Integer offset = (Integer) names.get(name);
-            if (offset != null)
-            {
-                int val = offset.intValue();
-
-                if (val > off)
-                {
-                    logger.log(Level.WARNING, "DNSOutgoing writeName failed val=" + val + " name=" + name);
-                }
-
-                writeByte((val >> 8) | 0xC0);
-                writeByte(val);
-                return;
-            }
-            names.put(name, new Integer(off));
-            writeUTF(name, 0, n);
-            name = name.substring(n);
-            if (name.startsWith("."))
-            {
-                name = name.substring(1);
-            }
-        }
-    }
-
-    void writeQuestion(DNSQuestion question) throws IOException
-    {
-        writeName(question.name);
-        writeShort(question.type);
-        writeShort(question.clazz);
-    }
-
-    void writeRecord(DNSRecord rec, long now) throws IOException
-    {
-        int save = off;
-        try
-        {
-            writeName(rec.name);
-            writeShort(rec.type);
-            writeShort(rec.clazz | ((rec.unique && multicast) ? DNSConstants.CLASS_UNIQUE : 0));
-            writeInt((now == 0) ? rec.ttl : rec.getRemainingTTL(now));
-            writeShort(0);
-            int start = off;
-            rec.write(this);
-            int len = off - start;
-            data[start - 2] = (byte) (len >> 8);
-            data[start - 1] = (byte) (len & 0xFF);
-        }
-        catch (IOException e)
-        {
-            off = save;
-            throw e;
-        }
-    }
-
-    /**
-     * Finish the message before sending it off.
-     */
-    void finish() throws IOException
-    {
-        int save = off;
-        off = 0;
-
-        writeShort(multicast ? 0 : id);
-        writeShort(flags);
-        writeShort(numQuestions);
-        writeShort(numAnswers);
-        writeShort(numAuthorities);
-        writeShort(numAdditionals);
-        off = save;
-    }
-
-    boolean isQuery()
-    {
-        return (flags & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY;
-    }
-
-    public boolean isEmpty()
-    {
-        return numQuestions == 0 && numAuthorities == 0
-            && numAdditionals == 0 && numAnswers == 0;
-    }
-
-
-    public String toString()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append(isQuery() ? "dns[query," : "dns[response,");
-        //buf.append(packet.getAddress().getHostAddress());
-        buf.append(':');
-        //buf.append(packet.getPort());
-        //buf.append(",len=");
-        //buf.append(packet.getLength());
-        buf.append(",id=0x");
-        buf.append(Integer.toHexString(id));
-        if (flags != 0)
-        {
-            buf.append(",flags=0x");
-            buf.append(Integer.toHexString(flags));
-            if ((flags & DNSConstants.FLAGS_QR_RESPONSE) != 0)
-            {
-                buf.append(":r");
-            }
-            if ((flags & DNSConstants.FLAGS_AA) != 0)
-            {
-                buf.append(":aa");
-            }
-            if ((flags & DNSConstants.FLAGS_TC) != 0)
-            {
-                buf.append(":tc");
-            }
-        }
-        if (numQuestions > 0)
-        {
-            buf.append(",questions=");
-            buf.append(numQuestions);
-        }
-        if (numAnswers > 0)
-        {
-            buf.append(",answers=");
-            buf.append(numAnswers);
-        }
-        if (numAuthorities > 0)
-        {
-            buf.append(",authorities=");
-            buf.append(numAuthorities);
-        }
-        if (numAdditionals > 0)
-        {
-            buf.append(",additionals=");
-            buf.append(numAdditionals);
-        }
-        buf.append(",\nnames=" + names);
-        buf.append(",\nauthorativeAnswers=" + authorativeAnswers);
-
-        buf.append("]");
-        return buf.toString();
-    }
-
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSQuestion.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSQuestion.java
deleted file mode 100644
index a206d81..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSQuestion.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.util.logging.Logger;
-
-/**
- * A DNS question.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff
- */
-final class DNSQuestion extends DNSEntry
-{
-    private static Logger logger = Logger.getLogger(DNSQuestion.class.toString());
-
-    /**
-     * Create a question.
-     */
-    DNSQuestion(String name, int type, int clazz)
-    {
-        super(name, type, clazz);
-    }
-
-    /**
-     * Check if this question is answered by a given DNS record.
-     */
-    boolean answeredBy(DNSRecord rec)
-    {
-        return (clazz == rec.clazz) && ((type == rec.type) || (type == DNSConstants.TYPE_ANY)) &&
-            name.equals(rec.name);
-    }
-
-    /**
-     * For debugging only.
-     */
-    public String toString()
-    {
-        return toString("question", null);
-    }
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java
deleted file mode 100644
index a65369d..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSRecord.java
+++ /dev/null
@@ -1,686 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.Inet4Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * DNS record
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Rick Blair, Werner Randelshofer, Pierre Frisch
- */
-abstract class DNSRecord extends DNSEntry
-{
-    private static Logger logger = Logger.getLogger(DNSRecord.class.toString());
-    int ttl;
-    private long created;
-
-    /**
-     * Create a DNSRecord with a name, type, clazz, and ttl.
-     */
-    DNSRecord(String name, int type, int clazz, int ttl)
-    {
-        super(name, type, clazz);
-        this.ttl = ttl;
-        this.created = System.currentTimeMillis();
-    }
-
-    /**
-     * True if this record is the same as some other record.
-     */
-    public boolean equals(Object other)
-    {
-        return (other instanceof DNSRecord) && sameAs((DNSRecord) other);
-    }
-
-    /**
-     * True if this record is the same as some other record.
-     */
-    boolean sameAs(DNSRecord other)
-    {
-        return super.equals(other) && sameValue((DNSRecord) other);
-    }
-
-    /**
-     * True if this record has the same value as some other record.
-     */
-    abstract boolean sameValue(DNSRecord other);
-
-    /**
-     * True if this record has the same type as some other record.
-     */
-    boolean sameType(DNSRecord other)
-    {
-        return type == other.type;
-    }
-
-    /**
-     * Handles a query represented by this record.
-     *
-     * @return Returns true if a conflict with one of the services registered
-     *         with JmDNS or with the hostname occured.
-     */
-    abstract boolean handleQuery(JmDNS dns, long expirationTime);
-
-    /**
-     * Handles a responserepresented by this record.
-     *
-     * @return Returns true if a conflict with one of the services registered
-     *         with JmDNS or with the hostname occured.
-     */
-    abstract boolean handleResponse(JmDNS dns);
-
-    /**
-     * Adds this as an answer to the provided outgoing datagram.
-     */
-    abstract DNSOutgoing addAnswer(JmDNS dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException;
-
-    /**
-     * True if this record is suppressed by the answers in a message.
-     */
-    boolean suppressedBy(DNSIncoming msg)
-    {
-        try
-        {
-            for (int i = msg.numAnswers; i-- > 0;)
-            {
-                if (suppressedBy((DNSRecord) msg.answers.get(i)))
-                {
-                    return true;
-                }
-            }
-            return false;
-        }
-        catch (ArrayIndexOutOfBoundsException e)
-        {
-            logger.log(Level.WARNING, "suppressedBy() message " + msg + " exception ", e);
-            // msg.print(true);
-            return false;
-        }
-    }
-
-    /**
-     * True if this record would be supressed by an answer.
-     * This is the case if this record would not have a
-     * significantly longer TTL.
-     */
-    boolean suppressedBy(DNSRecord other)
-    {
-        if (sameAs(other) && (other.ttl > ttl / 2))
-        {
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * Get the expiration time of this record.
-     */
-    long getExpirationTime(int percent)
-    {
-        return created + (percent * ttl * 10L);
-    }
-
-    /**
-     * Get the remaining TTL for this record.
-     */
-    int getRemainingTTL(long now)
-    {
-        return (int) Math.max(0, (getExpirationTime(100) - now) / 1000);
-    }
-
-    /**
-     * Check if the record is expired.
-     */
-    boolean isExpired(long now)
-    {
-        return getExpirationTime(100) <= now;
-    }
-
-    /**
-     * Check if the record is stale, ie it has outlived
-     * more than half of its TTL.
-     */
-    boolean isStale(long now)
-    {
-        return getExpirationTime(50) <= now;
-    }
-
-    /**
-     * Reset the TTL of a record. This avoids having to
-     * update the entire record in the cache.
-     */
-    void resetTTL(DNSRecord other)
-    {
-        created = other.created;
-        ttl = other.ttl;
-    }
-
-    /**
-     * Write this record into an outgoing message.
-     */
-    abstract void write(DNSOutgoing out) throws IOException;
-
-    /**
-     * Address record.
-     */
-    static class Address extends DNSRecord
-    {
-        private static Logger logger = Logger.getLogger(Address.class.toString());
-        InetAddress addr;
-
-        Address(String name, int type, int clazz, int ttl, InetAddress addr)
-        {
-            super(name, type, clazz, ttl);
-            this.addr = addr;
-        }
-
-        Address(String name, int type, int clazz, int ttl, byte[] rawAddress)
-        {
-            super(name, type, clazz, ttl);
-            try
-            {
-                this.addr = InetAddress.getByAddress(rawAddress);
-            }
-            catch (UnknownHostException exception)
-            {
-                logger.log(Level.WARNING, "Address() exception ", exception);
-            }
-        }
-
-        void write(DNSOutgoing out) throws IOException
-        {
-            if (addr != null)
-            {
-                byte[] buffer = addr.getAddress();
-                if (DNSConstants.TYPE_A == type)
-                {
-                    // If we have a type A records we should answer with a IPv4 address
-                    if (addr instanceof Inet4Address)
-                    {
-                        // All is good
-                    }
-                    else
-                    {
-                        // Get the last four bytes
-                        byte[] tempbuffer = buffer;
-                        buffer = new byte[4];
-                        System.arraycopy(tempbuffer, 12, buffer, 0, 4);
-                    }
-                }
-                else
-                {
-                    // If we have a type AAAA records we should answer with a IPv6 address
-                    if (addr instanceof Inet4Address)
-                    {
-                        byte[] tempbuffer = buffer;
-                        buffer = new byte[16];
-                        for (int i = 0; i < 16; i++)
-                        {
-                            if (i < 11)
-                            {
-                                buffer[i] = tempbuffer[i - 12];
-                            }
-                            else
-                            {
-                                buffer[i] = 0;
-                            }
-                        }
-                    }
-                }
-                int length = buffer.length;
-                out.writeBytes(buffer, 0, length);
-            }
-        }
-
-        boolean same(DNSRecord other)
-        {
-            return ((sameName(other)) && ((sameValue(other))));
-        }
-
-        boolean sameName(DNSRecord other)
-        {
-            return name.equalsIgnoreCase(((Address) other).name);
-        }
-
-        boolean sameValue(DNSRecord other)
-        {
-            return addr.equals(((Address) other).getAddress());
-        }
-
-        InetAddress getAddress()
-        {
-            return addr;
-        }
-
-        /**
-         * Creates a byte array representation of this record.
-         * This is needed for tie-break tests according to
-         * draft-cheshire-dnsext-multicastdns-04.txt chapter 9.2.
-         */
-        private byte[] toByteArray()
-        {
-            try
-            {
-                ByteArrayOutputStream bout = new ByteArrayOutputStream();
-                DataOutputStream dout = new DataOutputStream(bout);
-                dout.write(name.getBytes("UTF8"));
-                dout.writeShort(type);
-                dout.writeShort(clazz);
-                //dout.writeInt(len);
-                byte[] buffer = addr.getAddress();
-                for (int i = 0; i < buffer.length; i++)
-                {
-                    dout.writeByte(buffer[i]);
-                }
-                dout.close();
-                return bout.toByteArray();
-            }
-            catch (IOException e)
-            {
-                throw new InternalError();
-            }
-        }
-
-        /**
-         * Does a lexicographic comparison of the byte array representation
-         * of this record and that record.
-         * This is needed for tie-break tests according to
-         * draft-cheshire-dnsext-multicastdns-04.txt chapter 9.2.
-         */
-        private int lexCompare(DNSRecord.Address that)
-        {
-            byte[] thisBytes = this.toByteArray();
-            byte[] thatBytes = that.toByteArray();
-            for (int i = 0, n = Math.min(thisBytes.length, thatBytes.length); i < n; i++)
-            {
-                if (thisBytes[i] > thatBytes[i])
-                {
-                    return 1;
-                }
-                else
-                {
-                    if (thisBytes[i] < thatBytes[i])
-                    {
-                        return -1;
-                    }
-                }
-            }
-            return thisBytes.length - thatBytes.length;
-        }
-
-        /**
-         * Does the necessary actions, when this as a query.
-         */
-        boolean handleQuery(JmDNS dns, long expirationTime)
-        {
-            DNSRecord.Address dnsAddress = dns.getLocalHost().getDNSAddressRecord(this);
-            if (dnsAddress != null)
-            {
-                if (dnsAddress.sameType(this) && dnsAddress.sameName(this) && (!dnsAddress.sameValue(this)))
-                {
-                    logger.finer("handleQuery() Conflicting probe detected. dns state " + dns.getState() + " lex compare " + lexCompare(dnsAddress));
-                    // Tie-breaker test
-                    if (dns.getState().isProbing() && lexCompare(dnsAddress) >= 0)
-                    {
-                        // We lost the tie-break. We have to choose a different name.
-                        dns.getLocalHost().incrementHostName();
-                        dns.getCache().clear();
-                        for (Iterator i = dns.services.values().iterator(); i.hasNext();)
-                        {
-                            ServiceInfo info = (ServiceInfo) i.next();
-                            info.revertState();
-                        }
-                    }
-                    dns.revertState();
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        /**
-         * Does the necessary actions, when this as a response.
-         */
-        boolean handleResponse(JmDNS dns)
-        {
-            DNSRecord.Address dnsAddress = dns.getLocalHost().getDNSAddressRecord(this);
-            if (dnsAddress != null)
-            {
-                if (dnsAddress.sameType(this) && dnsAddress.sameName(this) && (!dnsAddress.sameValue(this)))
-                {
-                    logger.finer("handleResponse() Denial detected");
-
-                    if (dns.getState().isProbing())
-                    {
-                        dns.getLocalHost().incrementHostName();
-                        dns.getCache().clear();
-                        for (Iterator i = dns.services.values().iterator(); i.hasNext();)
-                        {
-                            ServiceInfo info = (ServiceInfo) i.next();
-                            info.revertState();
-                        }
-                    }
-                    dns.revertState();
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        DNSOutgoing addAnswer(JmDNS dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException
-        {
-            return out;
-        }
-
-        public String toString()
-        {
-            return toString(" address '" + (addr != null ? addr.getHostAddress() : "null") + "'");
-        }
-
-    }
-
-    /**
-     * Pointer record.
-     */
-    static class Pointer extends DNSRecord
-    {
-        private static Logger logger = Logger.getLogger(Pointer.class.toString());
-        String alias;
-
-        Pointer(String name, int type, int clazz, int ttl, String alias)
-        {
-            super(name, type, clazz, ttl);
-            this.alias = alias;
-        }
-
-        void write(DNSOutgoing out) throws IOException
-        {
-            out.writeName(alias);
-        }
-
-        boolean sameValue(DNSRecord other)
-        {
-            return alias.equals(((Pointer) other).alias);
-        }
-
-        boolean handleQuery(JmDNS dns, long expirationTime)
-        {
-            // Nothing to do (?)
-            // I think there is no possibility for conflicts for this record type?
-            return false;
-        }
-
-        boolean handleResponse(JmDNS dns)
-        {
-            // Nothing to do (?)
-            // I think there is no possibility for conflicts for this record type?
-            return false;
-        }
-
-        String getAlias()
-        {
-            return alias;
-        }
-
-        DNSOutgoing addAnswer(JmDNS dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException
-        {
-            return out;
-        }
-
-        public String toString()
-        {
-            return toString(alias);
-        }
-    }
-
-    static class Text extends DNSRecord
-    {
-        private static Logger logger = Logger.getLogger(Text.class.toString());
-        byte text[];
-
-        Text(String name, int type, int clazz, int ttl, byte text[])
-        {
-            super(name, type, clazz, ttl);
-            this.text = text;
-        }
-
-        void write(DNSOutgoing out) throws IOException
-        {
-            out.writeBytes(text, 0, text.length);
-        }
-
-        boolean sameValue(DNSRecord other)
-        {
-            Text txt = (Text) other;
-            if (txt.text.length != text.length)
-            {
-                return false;
-            }
-            for (int i = text.length; i-- > 0;)
-            {
-                if (txt.text[i] != text[i])
-                {
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        boolean handleQuery(JmDNS dns, long expirationTime)
-        {
-            // Nothing to do (?)
-            // I think there is no possibility for conflicts for this record type?
-            return false;
-        }
-
-        boolean handleResponse(JmDNS dns)
-        {
-            // Nothing to do (?)
-            // Shouldn't we care if we get a conflict at this level?
-            /*
-                         ServiceInfo info = (ServiceInfo) dns.services.get(name.toLowerCase());
-                         if (info != null) {
-                                 if (! Arrays.equals(text,info.text)) {
-                                         info.revertState();
-                                         return true;
-                                 }
-                         }*/
-            return false;
-        }
-
-        DNSOutgoing addAnswer(JmDNS dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException
-        {
-            return out;
-        }
-
-        public String toString()
-        {
-            return toString((text.length > 10) ? new String(text, 0, 7) + "..." : new String(text));
-        }
-    }
-
-    /**
-     * Service record.
-     */
-    static class Service extends DNSRecord
-    {
-        private static Logger logger = Logger.getLogger(Service.class.toString());
-        int priority;
-        int weight;
-        int port;
-        String server;
-
-        Service(String name, int type, int clazz, int ttl, int priority, int weight, int port, String server)
-        {
-            super(name, type, clazz, ttl);
-            this.priority = priority;
-            this.weight = weight;
-            this.port = port;
-            this.server = server;
-        }
-
-        void write(DNSOutgoing out) throws IOException
-        {
-            out.writeShort(priority);
-            out.writeShort(weight);
-            out.writeShort(port);
-            out.writeName(server);
-        }
-
-        private byte[] toByteArray()
-        {
-            try
-            {
-                ByteArrayOutputStream bout = new ByteArrayOutputStream();
-                DataOutputStream dout = new DataOutputStream(bout);
-                dout.write(name.getBytes("UTF8"));
-                dout.writeShort(type);
-                dout.writeShort(clazz);
-                //dout.writeInt(len);
-                dout.writeShort(priority);
-                dout.writeShort(weight);
-                dout.writeShort(port);
-                dout.write(server.getBytes("UTF8"));
-                dout.close();
-                return bout.toByteArray();
-            }
-            catch (IOException e)
-            {
-                throw new InternalError();
-            }
-        }
-
-        private int lexCompare(DNSRecord.Service that)
-        {
-            byte[] thisBytes = this.toByteArray();
-            byte[] thatBytes = that.toByteArray();
-            for (int i = 0, n = Math.min(thisBytes.length, thatBytes.length); i < n; i++)
-            {
-                if (thisBytes[i] > thatBytes[i])
-                {
-                    return 1;
-                }
-                else
-                {
-                    if (thisBytes[i] < thatBytes[i])
-                    {
-                        return -1;
-                    }
-                }
-            }
-            return thisBytes.length - thatBytes.length;
-        }
-
-        boolean sameValue(DNSRecord other)
-        {
-            Service s = (Service) other;
-            return (priority == s.priority) && (weight == s.weight) && (port == s.port) && server.equals(s.server);
-        }
-
-        boolean handleQuery(JmDNS dns, long expirationTime)
-        {
-            ServiceInfo info = (ServiceInfo) dns.services.get(name.toLowerCase());
-            if (info != null
-                && (port != info.port || !server.equalsIgnoreCase(dns.getLocalHost().getName())))
-            {
-                logger.finer("handleQuery() Conflicting probe detected");
-
-                // Tie breaker test
-                if (info.getState().isProbing() && lexCompare(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV,
-                    DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE,
-                    DNSConstants.DNS_TTL, info.priority,
-                    info.weight, info.port, dns.getLocalHost().getName())) >= 0)
-                {
-                    // We lost the tie break
-                    String oldName = info.getQualifiedName().toLowerCase();
-                    info.setName(dns.incrementName(info.getName()));
-                    dns.services.remove(oldName);
-                    dns.services.put(info.getQualifiedName().toLowerCase(), info);
-                    logger.finer("handleQuery() Lost tie break: new unique name chosen:" + info.getName());
-
-                }
-                info.revertState();
-                return true;
-
-            }
-            return false;
-        }
-
-        boolean handleResponse(JmDNS dns)
-        {
-            ServiceInfo info = (ServiceInfo) dns.services.get(name.toLowerCase());
-            if (info != null
-                && (port != info.port || !server.equalsIgnoreCase(dns.getLocalHost().getName())))
-            {
-                logger.finer("handleResponse() Denial detected");
-
-                if (info.getState().isProbing())
-                {
-                    String oldName = info.getQualifiedName().toLowerCase();
-                    info.setName(dns.incrementName(info.getName()));
-                    dns.services.remove(oldName);
-                    dns.services.put(info.getQualifiedName().toLowerCase(), info);
-                    logger.finer("handleResponse() New unique name chose:" + info.getName());
-
-                }
-                info.revertState();
-                return true;
-            }
-            return false;
-        }
-
-        DNSOutgoing addAnswer(JmDNS dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException
-        {
-            ServiceInfo info = (ServiceInfo) dns.services.get(name.toLowerCase());
-            if (info != null)
-            {
-                if (this.port == info.port != server.equals(dns.getLocalHost().getName()))
-                {
-                    return dns.addAnswer(in, addr, port, out,
-                        new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV,
-                            DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE,
-                            DNSConstants.DNS_TTL, info.priority,
-                            info.weight, info.port, dns.getLocalHost().getName()));
-                }
-            }
-            return out;
-        }
-
-        public String toString()
-        {
-            return toString(server + ":" + port);
-        }
-    }
-
-    public String toString(String other)
-    {
-        return toString("record", ttl + "/" + getRemainingTTL(System.currentTimeMillis()) + "," + other);
-    }
-}
-
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSState.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSState.java
deleted file mode 100644
index 3e26d35..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/DNSState.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.util.ArrayList;
-import java.util.logging.Logger;
-
-/**
- * DNSState defines the possible states for services registered with JmDNS.
- *
- * @author Werner Randelshofer, Rick Blair
- * @version 1.0  May 23, 2004  Created.
- */
-public class DNSState implements Comparable
-{
-    private static Logger logger = Logger.getLogger(DNSState.class.toString());
-
-    private final String name;
-
-    /**
-     * Ordinal of next state to be created.
-     */
-    private static int nextOrdinal = 0;
-    /**
-     * Assign an ordinal to this state.
-     */
-    private final int ordinal = nextOrdinal++;
-    /**
-     * Logical sequence of states.
-     * The sequence is consistent with the ordinal of a state.
-     * This is used for advancing through states.
-     */
-    private final static ArrayList sequence = new ArrayList();
-
-    private DNSState(String name)
-    {
-        this.name = name;
-        sequence.add(this);
-    }
-
-    public final String toString()
-    {
-        return name;
-    }
-
-    public static final DNSState PROBING_1 = new DNSState("probing 1");
-    public static final DNSState PROBING_2 = new DNSState("probing 2");
-    public static final DNSState PROBING_3 = new DNSState("probing 3");
-    public static final DNSState ANNOUNCING_1 = new DNSState("announcing 1");
-    public static final DNSState ANNOUNCING_2 = new DNSState("announcing 2");
-    public static final DNSState ANNOUNCED = new DNSState("announced");
-    public static final DNSState CANCELED = new DNSState("canceled");
-
-    /**
-     * Returns the next advanced state.
-     * In general, this advances one step in the following sequence: PROBING_1,
-     * PROBING_2, PROBING_3, ANNOUNCING_1, ANNOUNCING_2, ANNOUNCED.
-     * Does not advance for ANNOUNCED and CANCELED state.
-     */
-    public final DNSState advance()
-    {
-        return (isProbing() || isAnnouncing()) ? (DNSState) sequence.get(ordinal + 1) : this;
-    }
-
-    /**
-     * Returns to the next reverted state.
-     * All states except CANCELED revert to PROBING_1.
-     * Status CANCELED does not revert.
-     */
-    public final DNSState revert()
-    {
-        return (this == CANCELED) ? this : PROBING_1;
-    }
-
-    /**
-     * Returns true, if this is a probing state.
-     */
-    public boolean isProbing()
-    {
-        return compareTo(PROBING_1) >= 0 && compareTo(PROBING_3) <= 0;
-    }
-
-    /**
-     * Returns true, if this is an announcing state.
-     */
-    public boolean isAnnouncing()
-    {
-        return compareTo(ANNOUNCING_1) >= 0 && compareTo(ANNOUNCING_2) <= 0;
-    }
-
-    /**
-     * Returns true, if this is an announced state.
-     */
-    public boolean isAnnounced()
-    {
-        return compareTo(ANNOUNCED) == 0;
-    }
-
-    /**
-     * Compares two states.
-     * The states compare as follows:
-     * PROBING_1 &lt; PROBING_2 &lt; PROBING_3 &lt; ANNOUNCING_1 &lt;
-     * ANNOUNCING_2 &lt; RESPONDING &lt; ANNOUNCED &lt; CANCELED.
-     */
-    public int compareTo(Object o)
-    {
-        return ordinal - ((DNSState) o).ordinal;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/HostInfo.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/HostInfo.java
deleted file mode 100644
index b464888..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/HostInfo.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.net.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * HostInfo information on the local host to be able to cope with change of addresses.
- *
- * @version %I%, %G%
- * @author	Pierre Frisch, Werner Randelshofer
- */
-class HostInfo
-{
-    private static Logger logger = Logger.getLogger(HostInfo.class.toString());
-    protected String name;
-    protected InetAddress address;
-    protected NetworkInterface interfaze;
-    /**
-     * This is used to create a unique name for the host name.
-     */
-    private int hostNameCount;
-
-    public HostInfo(InetAddress address, String name)
-    {
-        super();
-        this.address = address;
-        this.name = name;
-        if (address != null)
-        {
-            try
-            {
-                interfaze = NetworkInterface.getByInetAddress(address);
-            }
-            catch (Exception exception)
-            {
-                // FIXME Shouldn't we take an action here?
-                logger.log(Level.WARNING, "LocalHostInfo() exception ", exception);
-            }
-        }
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public InetAddress getAddress()
-    {
-        return address;
-    }
-
-    public NetworkInterface getInterface()
-    {
-        return interfaze;
-    }
-
-    synchronized String incrementHostName()
-    {
-        hostNameCount++;
-        int plocal = name.indexOf(".local.");
-        int punder = name.lastIndexOf("-");
-        name = name.substring(0, (punder == -1 ? plocal : punder)) + "-" + hostNameCount + ".local.";
-        return name;
-    }
-
-    boolean shouldIgnorePacket(DatagramPacket packet)
-    {
-        boolean result = false;
-        if (getAddress() != null)
-        {
-            InetAddress from = packet.getAddress();
-            if (from != null)
-            {
-                if (from.isLinkLocalAddress() && (!getAddress().isLinkLocalAddress()))
-                {
-                    // Ignore linklocal packets on regular interfaces, unless this is
-                    // also a linklocal interface. This is to avoid duplicates. This is
-                    // a terrible hack caused by the lack of an API to get the address
-                    // of the interface on which the packet was received.
-                    result = true;
-                }
-                if (from.isLoopbackAddress() && (!getAddress().isLoopbackAddress()))
-                {
-                    // Ignore loopback packets on a regular interface unless this is
-                    // also a loopback interface.
-                    result = true;
-                }
-            }
-        }
-        return result;
-    }
-
-    DNSRecord.Address getDNSAddressRecord(DNSRecord.Address address)
-    {
-        return (DNSConstants.TYPE_AAAA == address.type ? getDNS6AddressRecord() : getDNS4AddressRecord());
-    }
-
-    DNSRecord.Address getDNS4AddressRecord()
-    {
-        if ((getAddress() != null) &&
-            ((getAddress() instanceof Inet4Address) ||
-            ((getAddress() instanceof Inet6Address) && (((Inet6Address) getAddress()).isIPv4CompatibleAddress()))))
-        {
-            return new DNSRecord.Address(getName(), DNSConstants.TYPE_A, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, getAddress());
-        }
-        return null;
-    }
-
-    DNSRecord.Address getDNS6AddressRecord()
-    {
-        if ((getAddress() != null) && (getAddress() instanceof Inet6Address))
-        {
-            return new DNSRecord.Address(getName(), DNSConstants.TYPE_AAAA, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, getAddress());
-        }
-        return null;
-    }
-
-    public String toString()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append("local host info[");
-        buf.append(getName() != null ? getName() : "no name");
-        buf.append(", ");
-        buf.append(getInterface() != null ? getInterface().getDisplayName() : "???");
-        buf.append(":");
-        buf.append(getAddress() != null ? getAddress().getHostAddress() : "no address");
-        buf.append("]");
-        return buf.toString();
-    }
-
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java
deleted file mode 100644
index dcf146a..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/JmDNS.java
+++ /dev/null
@@ -1,2570 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.InetAddress;
-import java.net.MulticastSocket;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-// REMIND: multiple IP addresses
-
-/**
- * mDNS implementation in Java.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Rick Blair, Jeff Sonstein,
- * Werner Randelshofer, Pierre Frisch, Scott Lewis
- */
-public class JmDNS
-{
-    private static Logger logger = Logger.getLogger(JmDNS.class.toString());
-    /**
-     * The version of JmDNS.
-     */
-    public static String VERSION = "2.0";
-
-    /**
-     * This is the multicast group, we are listening to for multicast DNS messages.
-     */
-    private InetAddress group;
-    /**
-     * This is our multicast socket.
-     */
-    private MulticastSocket socket;
-
-    /**
-     * Used to fix live lock problem on unregester.
-     */
-
-     protected boolean closed = false;
-
-    /**
-     * Holds instances of JmDNS.DNSListener.
-     * Must by a synchronized collection, because it is updated from
-     * concurrent threads.
-     */
-    private List listeners;
-    /**
-     * Holds instances of ServiceListener's.
-     * Keys are Strings holding a fully qualified service type.
-     * Values are LinkedList's of ServiceListener's.
-     */
-    private Map serviceListeners;
-    /**
-     * Holds instances of ServiceTypeListener's.
-     */
-    private List typeListeners;
-
-
-    /**
-     * Cache for DNSEntry's.
-     */
-    private DNSCache cache;
-
-    /**
-     * This hashtable holds the services that have been registered.
-     * Keys are instances of String which hold an all lower-case version of the
-     * fully qualified service name.
-     * Values are instances of ServiceInfo.
-     */
-    Map services;
-
-    /**
-     * This hashtable holds the service types that have been registered or
-     * that have been received in an incoming datagram.
-     * Keys are instances of String which hold an all lower-case version of the
-     * fully qualified service type.
-     * Values hold the fully qualified service type.
-     */
-    Map serviceTypes;
-    /**
-     * This is the shutdown hook, we registered with the java runtime.
-     */
-    private Thread shutdown;
-
-    /**
-     * Handle on the local host
-     */
-    HostInfo localHost;
-
-    private Thread incomingListener = null;
-
-    /**
-     * Throttle count.
-     * This is used to count the overall number of probes sent by JmDNS.
-     * When the last throttle increment happened .
-     */
-    private int throttle;
-    /**
-     * Last throttle increment.
-     */
-    private long lastThrottleIncrement;
-
-    /**
-     * The timer is used to dispatch all outgoing messages of JmDNS.
-     * It is also used to dispatch maintenance tasks for the DNS cache.
-     */
-    private Timer timer;
-
-    /**
-     * The source for random values.
-     * This is used to introduce random delays in responses. This reduces the
-     * potential for collisions on the network.
-     */
-    private final static Random random = new Random();
-
-    /**
-     * This lock is used to coordinate processing of incoming and outgoing
-     * messages. This is needed, because the Rendezvous Conformance Test
-     * does not forgive race conditions.
-     */
-    private Object ioLock = new Object();
-
-    /**
-     * If an incoming package which needs an answer is truncated, we store it
-     * here. We add more incoming DNSRecords to it, until the JmDNS.Responder
-     * timer picks it up.
-     * Remind: This does not work well with multiple planned answers for packages
-     * that came in from different clients.
-     */
-    private DNSIncoming plannedAnswer;
-    
-    // State machine
-    /**
-     * The state of JmDNS.
-     * <p/>
-     * For proper handling of concurrency, this variable must be
-     * changed only using methods advanceState(), revertState() and cancel().
-     */
-    private DNSState state = DNSState.PROBING_1;
-
-    /**
-     * Timer task associated to the host name.
-     * This is used to prevent from having multiple tasks associated to the host
-     * name at the same time.
-     */
-    TimerTask task;
-
-    /**
-     * This hashtable is used to maintain a list of service types being collected
-     * by this JmDNS instance.
-     * The key of the hashtable is a service type name, the value is an instance
-     * of JmDNS.ServiceCollector.
-     *
-     * @see #list
-     */
-    private HashMap serviceCollectors = new HashMap();
-
-    /**
-     * Create an instance of JmDNS.
-     */
-    public JmDNS() throws IOException
-    {
-        logger.finer("JmDNS instance created");
-        try
-        {
-            InetAddress addr = InetAddress.getLocalHost();
-            init(addr.isLoopbackAddress() ? null : addr, addr.getHostName()); // [PJYF Oct 14 2004] Why do we disallow the loopback address?
-        }
-        catch (IOException e)
-        {
-            init(null, "computer");
-        }
-    }
-
-    /**
-     * Create an instance of JmDNS and bind it to a
-     * specific network interface given its IP-address.
-     */
-    public JmDNS(InetAddress addr) throws IOException
-    {
-        try
-        {
-            init(addr, addr.getHostName());
-        }
-        catch (IOException e)
-        {
-            init(null, "computer");
-        }
-    }
-
-    /**
-     * Initialize everything.
-     *
-     * @param address The interface to which JmDNS binds to.
-     * @param name    The host name of the interface.
-     */
-    private void init(InetAddress address, String name) throws IOException
-    {
-        // A host name with "." is illegal. so strip off everything and append .local.
-        int idx = name.indexOf(".");
-        if (idx > 0)
-        {
-            name = name.substring(0, idx);
-        }
-        name += ".local.";
-        // localHost to IP address binding
-        localHost = new HostInfo(address, name);
-
-        cache = new DNSCache(100);
-
-        listeners = Collections.synchronizedList(new ArrayList());
-        serviceListeners = new HashMap();
-        typeListeners = new ArrayList();
-
-        services = new Hashtable(20);
-        serviceTypes = new Hashtable(20);
-
-        timer = new Timer("JmDNS.Timer");
-        new RecordReaper().start();
-        shutdown = new Thread(new Shutdown(), "JmDNS.Shutdown");
-        Runtime.getRuntime().addShutdownHook(shutdown);
-
-        incomingListener = new Thread(new SocketListener(), "JmDNS.SocketListener");
-
-        // Bind to multicast socket
-        openMulticastSocket(localHost);
-        start(services.values());
-    }
-
-    private void start(Collection serviceInfos)
-    {
-        state = DNSState.PROBING_1;
-        incomingListener.start();
-        new Prober().start();
-        for (Iterator iterator = serviceInfos.iterator(); iterator.hasNext();)
-        {
-            try
-            {
-                registerService(new ServiceInfo((ServiceInfo) iterator.next()));
-            }
-            catch (Exception exception)
-            {
-                logger.log(Level.WARNING, "start() Registration exception ", exception);
-            }
-        }
-    }
-
-    private void openMulticastSocket(HostInfo hostInfo) throws IOException
-    {
-        if (group == null)
-        {
-            group = InetAddress.getByName(DNSConstants.MDNS_GROUP);
-        }
-        if (socket != null)
-        {
-            this.closeMulticastSocket();
-        }
-        socket = new MulticastSocket(DNSConstants.MDNS_PORT);
-        if ((hostInfo != null) && (localHost.getInterface() != null))
-        {
-            socket.setNetworkInterface(hostInfo.getInterface());
-        }
-        socket.setTimeToLive(255);
-        socket.joinGroup(group);
-    }
-
-    private void closeMulticastSocket()
-    {
-        logger.finer("closeMulticastSocket()");
-        if (socket != null)
-        {
-            // close socket
-            try
-            {
-                socket.leaveGroup(group);
-                socket.close();
-                if (incomingListener != null)
-                {
-                    incomingListener.join();
-                }
-            }
-            catch (Exception exception)
-            {
-                logger.log(Level.WARNING, "closeMulticastSocket() Close socket exception ", exception);
-            }
-            socket = null;
-        }
-    }
-    
-    // State machine
-    /**
-     * Sets the state and notifies all objects that wait on JmDNS.
-     */
-    synchronized void advanceState()
-    {
-        state = state.advance();
-        notifyAll();
-    }
-
-    /**
-     * Sets the state and notifies all objects that wait on JmDNS.
-     */
-    synchronized void revertState()
-    {
-        state = state.revert();
-        notifyAll();
-    }
-
-    /**
-     * Sets the state and notifies all objects that wait on JmDNS.
-     */
-    synchronized void cancel()
-    {
-        state = DNSState.CANCELED;
-        notifyAll();
-    }
-
-    /**
-     * Returns the current state of this info.
-     */
-    DNSState getState()
-    {
-        return state;
-    }
-
-
-    /**
-     * Return the DNSCache associated with the cache variable
-     */
-    DNSCache getCache()
-    {
-        return cache;
-    }
-
-    /**
-     * Return the HostName associated with this JmDNS instance.
-     * Note: May not be the same as what started.  The host name is subject to
-     * negotiation.
-     */
-    public String getHostName()
-    {
-        return localHost.getName();
-    }
-
-    public HostInfo getLocalHost()
-    {
-        return localHost;
-    }
-
-    /**
-     * Return the address of the interface to which this instance of JmDNS is
-     * bound.
-     */
-    public InetAddress getInterface() throws IOException
-    {
-        return socket.getInterface();
-    }
-
-    /**
-     * Get service information. If the information is not cached, the method
-     * will block until updated information is received.
-     * <p/>
-     * Usage note: Do not call this method from the AWT event dispatcher thread.
-     * You will make the user interface unresponsive.
-     *
-     * @param type fully qualified service type, such as <code>_http._tcp.local.</code> .
-     * @param name unqualified service name, such as <code>foobar</code> .
-     * @return null if the service information cannot be obtained
-     */
-    public ServiceInfo getServiceInfo(String type, String name)
-    {
-        return getServiceInfo(type, name, 3 * 1000);
-    }
-
-    /**
-     * Get service information. If the information is not cached, the method
-     * will block for the given timeout until updated information is received.
-     * <p/>
-     * Usage note: If you call this method from the AWT event dispatcher thread,
-     * use a small timeout, or you will make the user interface unresponsive.
-     *
-     * @param type    full qualified service type, such as <code>_http._tcp.local.</code> .
-     * @param name    unqualified service name, such as <code>foobar</code> .
-     * @param timeout timeout in milliseconds
-     * @return null if the service information cannot be obtained
-     */
-    public ServiceInfo getServiceInfo(String type, String name, int timeout)
-    {
-        ServiceInfo info = new ServiceInfo(type, name);
-        new ServiceInfoResolver(info).start();
-
-        try
-        {
-            long end = System.currentTimeMillis() + timeout;
-            long delay;
-            synchronized (info)
-            {
-                while (!info.hasData() && (delay = end - System.currentTimeMillis()) > 0)
-                {
-                    info.wait(delay);
-                }
-            }
-        }
-        catch (InterruptedException e)
-        {
-            // empty
-        }
-
-        return (info.hasData()) ? info : null;
-    }
-
-    /**
-     * Request service information. The information about the service is
-     * requested and the ServiceListener.resolveService method is called as soon
-     * as it is available.
-     * <p/>
-     * Usage note: Do not call this method from the AWT event dispatcher thread.
-     * You will make the user interface unresponsive.
-     *
-     * @param type full qualified service type, such as <code>_http._tcp.local.</code> .
-     * @param name unqualified service name, such as <code>foobar</code> .
-     */
-    public void requestServiceInfo(String type, String name)
-    {
-        requestServiceInfo(type, name, 3 * 1000);
-    }
-
-    /**
-     * Request service information. The information about the service is requested
-     * and the ServiceListener.resolveService method is called as soon as it is available.
-     *
-     * @param type    full qualified service type, such as <code>_http._tcp.local.</code> .
-     * @param name    unqualified service name, such as <code>foobar</code> .
-     * @param timeout timeout in milliseconds
-     */
-    public void requestServiceInfo(String type, String name, int timeout)
-    {
-        registerServiceType(type);
-        ServiceInfo info = new ServiceInfo(type, name);
-        new ServiceInfoResolver(info).start();
-
-        try
-        {
-            long end = System.currentTimeMillis() + timeout;
-            long delay;
-            synchronized (info)
-            {
-                while (!info.hasData() && (delay = end - System.currentTimeMillis()) > 0)
-                {
-                    info.wait(delay);
-                }
-            }
-        }
-        catch (InterruptedException e)
-        {
-            // empty
-        }
-    }
-
-    void handleServiceResolved(ServiceInfo info)
-    {
-        List list = (List) serviceListeners.get(info.type.toLowerCase());
-        if (list != null)
-        {
-            ServiceEvent event = new ServiceEvent(this, info.type, info.getName(), info);
-            // Iterate on a copy in case listeners will modify it
-            final ArrayList listCopy = new ArrayList(list);
-            for (Iterator iterator = listCopy.iterator(); iterator.hasNext();)
-            {
-                ((ServiceListener) iterator.next()).serviceResolved(event);
-            }
-        }
-    }
-
-    /**
-     * Listen for service types.
-     *
-     * @param listener listener for service types
-     */
-    public void addServiceTypeListener(ServiceTypeListener listener) throws IOException
-    {
-        synchronized (this)
-        {
-            typeListeners.remove(listener);
-            typeListeners.add(listener);
-        }
-
-        // report cached service types
-        for (Iterator iterator = serviceTypes.values().iterator(); iterator.hasNext();)
-        {
-            listener.serviceTypeAdded(new ServiceEvent(this, (String) iterator.next(), null, null));
-        }
-
-        new TypeResolver().start();
-    }
-
-    /**
-     * Remove listener for service types.
-     *
-     * @param listener listener for service types
-     */
-    public void removeServiceTypeListener(ServiceTypeListener listener)
-    {
-        synchronized (this)
-        {
-            typeListeners.remove(listener);
-        }
-    }
-
-    /**
-     * Listen for services of a given type. The type has to be a fully qualified
-     * type name such as <code>_http._tcp.local.</code>.
-     *
-     * @param type     full qualified service type, such as <code>_http._tcp.local.</code>.
-     * @param listener listener for service updates
-     */
-    public void addServiceListener(String type, ServiceListener listener)
-    {
-        String lotype = type.toLowerCase();
-        removeServiceListener(lotype, listener);
-        List list = null;
-        synchronized (this)
-        {
-            list = (List) serviceListeners.get(lotype);
-            if (list == null)
-            {
-                list = Collections.synchronizedList(new LinkedList());
-                serviceListeners.put(lotype, list);
-            }
-            list.add(listener);
-        }
-
-        // report cached service types
-        for (Iterator i = cache.iterator(); i.hasNext();)
-        {
-            for (DNSCache.CacheNode n = (DNSCache.CacheNode) i.next(); n != null; n = n.next())
-            {
-                DNSRecord rec = (DNSRecord) n.getValue();
-                if (rec.type == DNSConstants.TYPE_SRV)
-                {
-                    if (rec.name.endsWith(type))
-                    {
-                        listener.serviceAdded(new ServiceEvent(this, type, toUnqualifiedName(type, rec.name), null));
-                    }
-                }
-            }
-        }
-        new ServiceResolver(type).start();
-    }
-
-    /**
-     * Remove listener for services of a given type.
-     *
-     * @param listener listener for service updates
-     */
-    public void removeServiceListener(String type, ServiceListener listener)
-    {
-        type = type.toLowerCase();
-        List list = (List) serviceListeners.get(type);
-        if (list != null)
-        {
-            synchronized (this)
-            {
-                list.remove(listener);
-                if (list.size() == 0)
-                {
-                    serviceListeners.remove(type);
-                }
-            }
-        }
-    }
-
-    /**
-     * Register a service. The service is registered for access by other jmdns clients.
-     * The name of the service may be changed to make it unique.
-     */
-    public void registerService(ServiceInfo info) throws IOException
-    {
-        registerServiceType(info.type);
-
-        // bind the service to this address
-        info.server = localHost.getName();
-        info.addr = localHost.getAddress();
-
-        synchronized (this)
-        {
-            makeServiceNameUnique(info);
-            services.put(info.getQualifiedName().toLowerCase(), info);
-        }
-
-        new /*Service*/Prober().start();
-        try
-        {
-            synchronized (info)
-            {
-                while (info.getState().compareTo(DNSState.ANNOUNCED) < 0)
-                {
-                    info.wait();
-                }
-            }
-        }
-        catch (InterruptedException e)
-        {
-            //empty
-        }
-        logger.fine("registerService() JmDNS registered service as " + info);
-    }
-
-    /**
-     * Unregister a service. The service should have been registered.
-     */
-    public void unregisterService(ServiceInfo info)
-    {
-        synchronized (this)
-        {
-            services.remove(info.getQualifiedName().toLowerCase());
-        }
-        info.cancel();
-
-        // Note: We use this lock object to synchronize on it.
-        //       Synchronizing on another object (e.g. the ServiceInfo) does
-        //       not make sense, because the sole purpose of the lock is to
-        //       wait until the canceler has finished. If we synchronized on
-        //       the ServiceInfo or on the Canceler, we would block all
-        //       accesses to synchronized methods on that object. This is not
-        //       what we want!
-        Object lock = new Object();
-        new Canceler(info, lock).start();
-
-        // Remind: We get a deadlock here, if the Canceler does not run!
-        try
-        {
-            synchronized (lock)
-            {
-                lock.wait();
-            }
-        }
-        catch (InterruptedException e)
-        {
-            // empty
-        }
-    }
-
-    /**
-     * Unregister all services.
-     */
-    public void unregisterAllServices()
-    {
-        logger.finer("unregisterAllServices()");
-        if (services.size() == 0)
-        {
-            return;
-        }
-
-        Collection list;
-        synchronized (this)
-        {
-            list = new LinkedList(services.values());
-            services.clear();
-        }
-        for (Iterator iterator = list.iterator(); iterator.hasNext();)
-        {
-            ((ServiceInfo) iterator.next()).cancel();
-        }
-
-
-        Object lock = new Object();
-        new Canceler(list, lock).start();
-              // Remind: We get a livelock here, if the Canceler does not run!
-        try {
-            synchronized (lock) {
-                if (!closed) {
-                    lock.wait();
-                }
-            }
-        } catch (InterruptedException e) {
-            // empty
-        }
-
-
-    }
-
-    /**
-     * Register a service type. If this service type was not already known,
-     * all service listeners will be notified of the new service type. Service types
-     * are automatically registered as they are discovered.
-     */
-    public void registerServiceType(String type)
-    {
-        String name = type.toLowerCase();
-        if (serviceTypes.get(name) == null)
-        {
-            if ((type.indexOf("._mdns._udp.") < 0) && !type.endsWith(".in-addr.arpa."))
-            {
-                Collection list;
-                synchronized (this)
-                {
-                    serviceTypes.put(name, type);
-                    list = new LinkedList(typeListeners);
-                }
-                for (Iterator iterator = list.iterator(); iterator.hasNext();)
-                {
-                    ((ServiceTypeListener) iterator.next()).serviceTypeAdded(new ServiceEvent(this, type, null, null));
-                }
-            }
-        }
-    }
-
-    /**
-     * Generate a possibly unique name for a host using the information we
-     * have in the cache.
-     *
-     * @return returns true, if the name of the host had to be changed.
-     */
-    private boolean makeHostNameUnique(DNSRecord.Address host)
-    {
-        String originalName = host.getName();
-        long now = System.currentTimeMillis();
-
-        boolean collision;
-        do
-        {
-            collision = false;
-
-            // Check for collision in cache
-            for (DNSCache.CacheNode j = cache.find(host.getName().toLowerCase()); j != null; j = j.next())
-            {
-                DNSRecord a = (DNSRecord) j.getValue();
-                if (false)
-                {
-                    host.name = incrementName(host.getName());
-                    collision = true;
-                    break;
-                }
-            }
-        }
-        while (collision);
-
-        if (originalName.equals(host.getName()))
-        {
-            return false;
-        }
-        else
-        {
-            return true;
-        }
-    }
-
-    /**
-     * Generate a possibly unique name for a service using the information we
-     * have in the cache.
-     *
-     * @return returns true, if the name of the service info had to be changed.
-     */
-    private boolean makeServiceNameUnique(ServiceInfo info)
-    {
-        String originalQualifiedName = info.getQualifiedName();
-        long now = System.currentTimeMillis();
-
-        boolean collision;
-        do
-        {
-            collision = false;
-
-            // Check for collision in cache
-            for (DNSCache.CacheNode j = cache.find(info.getQualifiedName().toLowerCase()); j != null; j = j.next())
-            {
-                DNSRecord a = (DNSRecord) j.getValue();
-                if ((a.type == DNSConstants.TYPE_SRV) && !a.isExpired(now))
-                {
-                    DNSRecord.Service s = (DNSRecord.Service) a;
-                    if (s.port != info.port || !s.server.equals(localHost.getName()))
-                    {
-                        logger.finer("makeServiceNameUnique() JmDNS.makeServiceNameUnique srv collision:" + a + " s.server=" + s.server + " " + localHost.getName() + " equals:" + (s.server.equals(localHost.getName())));
-                        info.setName(incrementName(info.getName()));
-                        collision = true;
-                        break;
-                    }
-                }
-            }
-
-            // Check for collision with other service infos published by JmDNS
-            Object selfService = services.get(info.getQualifiedName().toLowerCase());
-            if (selfService != null && selfService != info)
-            {
-                info.setName(incrementName(info.getName()));
-                collision = true;
-            }
-        }
-        while (collision);
-
-        return !(originalQualifiedName.equals(info.getQualifiedName()));
-    }
-
-    String incrementName(String name)
-    {
-        try
-        {
-            int l = name.lastIndexOf('(');
-            int r = name.lastIndexOf(')');
-            if ((l >= 0) && (l < r))
-            {
-                name = name.substring(0, l) + "(" + (Integer.parseInt(name.substring(l + 1, r)) + 1) + ")";
-            }
-            else
-            {
-                name += " (2)";
-            }
-        }
-        catch (NumberFormatException e)
-        {
-            name += " (2)";
-        }
-        return name;
-    }
-
-    /**
-     * Add a listener for a question. The listener will receive updates
-     * of answers to the question as they arrive, or from the cache if they
-     * are already available.
-     */
-    void addListener(DNSListener listener, DNSQuestion question)
-    {
-        long now = System.currentTimeMillis();
-
-        // add the new listener
-        synchronized (this)
-        {
-            listeners.add(listener);
-        }
-
-        // report existing matched records
-        if (question != null)
-        {
-            for (DNSCache.CacheNode i = cache.find(question.name); i != null; i = i.next())
-            {
-                DNSRecord c = (DNSRecord) i.getValue();
-                if (question.answeredBy(c) && !c.isExpired(now))
-                {
-                    listener.updateRecord(this, now, c);
-                }
-            }
-        }
-    }
-
-    /**
-     * Remove a listener from all outstanding questions. The listener will no longer
-     * receive any updates.
-     */
-    void removeListener(DNSListener listener)
-    {
-        synchronized (this)
-        {
-            listeners.remove(listener);
-        }
-    }
-    
-    
-    // Remind: Method updateRecord should receive a better name.
-    /**
-     * Notify all listeners that a record was updated.
-     */
-    void updateRecord(long now, DNSRecord rec)
-    {
-        // We do not want to block the entire DNS while we are updating the record for each listener (service info)
-        List listenerList = null;
-        synchronized (this)
-        {
-            listenerList = new ArrayList(listeners);
-        }
-        for (Iterator iterator = listenerList.iterator(); iterator.hasNext();)
-        {
-            DNSListener listener = (DNSListener) iterator.next();
-            listener.updateRecord(this, now, rec);
-        }
-        if (rec.type == DNSConstants.TYPE_PTR || rec.type == DNSConstants.TYPE_SRV)
-        {
-            List serviceListenerList = null;
-            synchronized (this)
-            {
-                serviceListenerList = (List) serviceListeners.get(rec.name.toLowerCase());
-                // Iterate on a copy in case listeners will modify it
-                if (serviceListenerList != null)
-                {
-                    serviceListenerList = new ArrayList(serviceListenerList);
-                }
-            }
-            if (serviceListenerList != null)
-            {
-                boolean expired = rec.isExpired(now);
-                String type = rec.getName();
-                String name = ((DNSRecord.Pointer) rec).getAlias();
-                // DNSRecord old = (DNSRecord)services.get(name.toLowerCase());
-                if (!expired)
-                {
-                    // new record
-                    ServiceEvent event = new ServiceEvent(this, type, toUnqualifiedName(type, name), null);
-                    for (Iterator iterator = serviceListenerList.iterator(); iterator.hasNext();)
-                    {
-                        ((ServiceListener) iterator.next()).serviceAdded(event);
-                    }
-                }
-                else
-                {
-                    // expire record
-                    ServiceEvent event = new ServiceEvent(this, type, toUnqualifiedName(type, name), null);
-                    for (Iterator iterator = serviceListenerList.iterator(); iterator.hasNext();)
-                    {
-                        ((ServiceListener) iterator.next()).serviceRemoved(event);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Handle an incoming response. Cache answers, and pass them on to
-     * the appropriate questions.
-     */
-    private void handleResponse(DNSIncoming msg) throws IOException
-    {
-        long now = System.currentTimeMillis();
-
-        boolean hostConflictDetected = false;
-        boolean serviceConflictDetected = false;
-
-        for (Iterator i = msg.answers.iterator(); i.hasNext();)
-        {
-            boolean isInformative = false;
-            DNSRecord rec = (DNSRecord) i.next();
-            boolean expired = rec.isExpired(now);
-
-            // update the cache
-            DNSRecord c = (DNSRecord) cache.get(rec);
-            if (c != null)
-            {
-                if (expired)
-                {
-                    isInformative = true;
-                    cache.remove(c);
-                }
-                else
-                {
-                    c.resetTTL(rec);
-                    rec = c;
-                }
-            }
-            else
-            {
-                if (!expired)
-                {
-                    isInformative = true;
-                    cache.add(rec);
-                }
-            }
-            switch (rec.type)
-            {
-                case DNSConstants.TYPE_PTR:
-                    // handle _mdns._udp records
-                    if (rec.getName().indexOf("._mdns._udp.") >= 0)
-                    {
-                        if (!expired && rec.name.startsWith("_services._mdns._udp."))
-                        {
-                            isInformative = true;
-                            registerServiceType(((DNSRecord.Pointer) rec).alias);
-                        }
-                        continue;
-                    }
-                    registerServiceType(rec.name);
-                    break;
-            }
-
-            if ((rec.getType() == DNSConstants.TYPE_A) || (rec.getType() == DNSConstants.TYPE_AAAA))
-            {
-                hostConflictDetected |= rec.handleResponse(this);
-            }
-            else
-            {
-                serviceConflictDetected |= rec.handleResponse(this);
-            }
-
-            // notify the listeners
-            if (isInformative)
-            {
-                updateRecord(now, rec);
-            }
-        }
-
-        if (hostConflictDetected || serviceConflictDetected)
-        {
-            new Prober().start();
-        }
-    }
-
-    /**
-     * Handle an incoming query. See if we can answer any part of it
-     * given our service infos.
-     */
-    private void handleQuery(DNSIncoming in, InetAddress addr, int port) throws IOException
-    {
-        // Track known answers
-        boolean hostConflictDetected = false;
-        boolean serviceConflictDetected = false;
-        long expirationTime = System.currentTimeMillis() + DNSConstants.KNOWN_ANSWER_TTL;
-        for (Iterator i = in.answers.iterator(); i.hasNext();)
-        {
-            DNSRecord answer = (DNSRecord) i.next();
-            if ((answer.getType() == DNSConstants.TYPE_A) || (answer.getType() == DNSConstants.TYPE_AAAA))
-            {
-                hostConflictDetected |= answer.handleQuery(this, expirationTime);
-            }
-            else
-            {
-                serviceConflictDetected |= answer.handleQuery(this, expirationTime);
-            }
-        }
-
-        if (plannedAnswer != null)
-        {
-            plannedAnswer.append(in);
-        }
-        else
-        {
-            if (in.isTruncated())
-            {
-                plannedAnswer = in;
-            }
-
-            new Responder(in, addr, port).start();
-        }
-
-        if (hostConflictDetected || serviceConflictDetected)
-        {
-            new Prober().start();
-        }
-    }
-
-    /**
-     * Add an answer to a question. Deal with the case when the
-     * outgoing packet overflows
-     */
-    DNSOutgoing addAnswer(DNSIncoming in, InetAddress addr, int port, DNSOutgoing out, DNSRecord rec) throws IOException
-    {
-        if (out == null)
-        {
-            out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
-        }
-        try
-        {
-            out.addAnswer(in, rec);
-        }
-        catch (IOException e)
-        {
-            out.flags |= DNSConstants.FLAGS_TC;
-            out.id = in.id;
-            out.finish();
-            send(out);
-
-            out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
-            out.addAnswer(in, rec);
-        }
-        return out;
-    }
-
-
-    /**
-     * Send an outgoing multicast DNS message.
-     */
-    private void send(DNSOutgoing out) throws IOException
-    {
-        out.finish();
-        if (!out.isEmpty())
-        {
-            DatagramPacket packet = new DatagramPacket(out.data, out.off, group, DNSConstants.MDNS_PORT);
-
-            try
-            {
-                DNSIncoming msg = new DNSIncoming(packet);
-                logger.finest("send() JmDNS out:" + msg.print(true));
-            }
-            catch (IOException e)
-            {
-                logger.throwing(getClass().toString(), "send(DNSOutgoing) - JmDNS can not parse what it sends!!!", e);
-            }
-            socket.send(packet);
-        }
-    }
-
-    /**
-     * Listen for multicast packets.
-     */
-    class SocketListener implements Runnable
-    {
-        public void run()
-        {
-            try
-            {
-                byte buf[] = new byte[DNSConstants.MAX_MSG_ABSOLUTE];
-                DatagramPacket packet = new DatagramPacket(buf, buf.length);
-                while (state != DNSState.CANCELED)
-                {
-                    packet.setLength(buf.length);
-                    socket.receive(packet);
-                    if (state == DNSState.CANCELED)
-                    {
-                        break;
-                    }
-                    try
-                    {
-                        if (localHost.shouldIgnorePacket(packet))
-                        {
-                            continue;
-                        }
-
-                        DNSIncoming msg = new DNSIncoming(packet);
-                        logger.finest("SocketListener.run() JmDNS in:" + msg.print(true));
-
-                        synchronized (ioLock)
-                        {
-                            if (msg.isQuery())
-                            {
-                                if (packet.getPort() != DNSConstants.MDNS_PORT)
-                                {
-                                    handleQuery(msg, packet.getAddress(), packet.getPort());
-                                }
-                                handleQuery(msg, group, DNSConstants.MDNS_PORT);
-                            }
-                            else
-                            {
-                                handleResponse(msg);
-                            }
-                        }
-                    }
-                    catch (IOException e)
-                    {
-                        logger.log(Level.WARNING, "run() exception ", e);
-                    }
-                }
-            }
-            catch (IOException e)
-            {
-                if (state != DNSState.CANCELED)
-                {
-                    logger.log(Level.WARNING, "run() exception ", e);
-                    recover();
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Periodicaly removes expired entries from the cache.
-     */
-    private class RecordReaper extends TimerTask
-    {
-        public void start()
-        {
-            timer.schedule(this, DNSConstants.RECORD_REAPER_INTERVAL, DNSConstants.RECORD_REAPER_INTERVAL);
-        }
-
-        public void run()
-        {
-            synchronized (JmDNS.this)
-            {
-                if (state == DNSState.CANCELED)
-                {
-                    return;
-                }
-                logger.finest("run() JmDNS reaping cache");
-
-                // Remove expired answers from the cache
-                // -------------------------------------
-                // To prevent race conditions, we defensively copy all cache
-                // entries into a list.
-                List list = new ArrayList();
-                synchronized (cache)
-                {
-                    for (Iterator i = cache.iterator(); i.hasNext();)
-                    {
-                        for (DNSCache.CacheNode n = (DNSCache.CacheNode) i.next(); n != null; n = n.next())
-                        {
-                            list.add(n.getValue());
-                        }
-                    }
-                }
-                // Now, we remove them.
-                long now = System.currentTimeMillis();
-                for (Iterator i = list.iterator(); i.hasNext();)
-                {
-                    DNSRecord c = (DNSRecord) i.next();
-                    if (c.isExpired(now))
-                    {
-                        updateRecord(now, c);
-                        cache.remove(c);
-                    }
-                }
-            }
-        }
-    }
-
-
-    /**
-     * The Prober sends three consecutive probes for all service infos
-     * that needs probing as well as for the host name.
-     * The state of each service info of the host name is advanced, when a probe has
-     * been sent for it.
-     * When the prober has run three times, it launches an Announcer.
-     * <p/>
-     * If a conflict during probes occurs, the affected service infos (and affected
-     * host name) are taken away from the prober. This eventually causes the prober
-     * tho cancel itself.
-     */
-    private class Prober extends TimerTask
-    {
-        /**
-         * The state of the prober.
-         */
-        DNSState taskState = DNSState.PROBING_1;
-
-        public Prober()
-        {
-            // Associate the host name to this, if it needs probing
-            if (state == DNSState.PROBING_1)
-            {
-                task = this;
-            }
-            // Associate services to this, if they need probing
-            synchronized (JmDNS.this)
-            {
-                for (Iterator iterator = services.values().iterator(); iterator.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) iterator.next();
-                    if (info.getState() == DNSState.PROBING_1)
-                    {
-                        info.task = this;
-                    }
-                }
-            }
-        }
-
-
-        public void start()
-        {
-            long now = System.currentTimeMillis();
-            if (now - lastThrottleIncrement < DNSConstants.PROBE_THROTTLE_COUNT_INTERVAL)
-            {
-                throttle++;
-            }
-            else
-            {
-                throttle = 1;
-            }
-            lastThrottleIncrement = now;
-
-            if (state == DNSState.ANNOUNCED && throttle < DNSConstants.PROBE_THROTTLE_COUNT)
-            {
-                timer.schedule(this, random.nextInt(1 + DNSConstants.PROBE_WAIT_INTERVAL), DNSConstants.PROBE_WAIT_INTERVAL);
-            }
-            else
-            {
-                timer.schedule(this, DNSConstants.PROBE_CONFLICT_INTERVAL, DNSConstants.PROBE_CONFLICT_INTERVAL);
-            }
-        }
-
-        public boolean cancel()
-        {
-            // Remove association from host name to this
-            if (task == this)
-            {
-                task = null;
-            }
-
-            // Remove associations from services to this
-            synchronized (JmDNS.this)
-            {
-                for (Iterator i = services.values().iterator(); i.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) i.next();
-                    if (info.task == this)
-                    {
-                        info.task = null;
-                    }
-                }
-            }
-
-            return super.cancel();
-        }
-
-        public void run()
-        {
-            synchronized (ioLock)
-            {
-                DNSOutgoing out = null;
-                try
-                {
-                    // send probes for JmDNS itself
-                    if (state == taskState && task == this)
-                    {
-                        if (out == null)
-                        {
-                            out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
-                        }
-                        out.addQuestion(new DNSQuestion(localHost.getName(), DNSConstants.TYPE_ANY, DNSConstants.CLASS_IN));
-                        DNSRecord answer = localHost.getDNS4AddressRecord();
-                        if (answer != null)
-                        {
-                            out.addAuthorativeAnswer(answer);
-                        }
-                        answer = localHost.getDNS6AddressRecord();
-                        if (answer != null)
-                        {
-                            out.addAuthorativeAnswer(answer);
-                        }
-                        advanceState();
-                    }
-                    // send probes for services
-                    // Defensively copy the services into a local list,
-                    // to prevent race conditions with methods registerService
-                    // and unregisterService.
-                    List list;
-                    synchronized (JmDNS.this)
-                    {
-                        list = new LinkedList(services.values());
-                    }
-                    for (Iterator i = list.iterator(); i.hasNext();)
-                    {
-                        ServiceInfo info = (ServiceInfo) i.next();
-
-                        synchronized (info)
-                        {
-                            if (info.getState() == taskState && info.task == this)
-                            {
-                                info.advanceState();
-                                logger.fine("run() JmDNS probing " + info.getQualifiedName() + " state " + info.getState());
-                                if (out == null)
-                                {
-                                    out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
-                                    out.addQuestion(new DNSQuestion(info.getQualifiedName(), DNSConstants.TYPE_ANY, DNSConstants.CLASS_IN));
-                                }
-                                out.addAuthorativeAnswer(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.priority, info.weight, info.port, localHost.getName()));
-                            }
-                        }
-                    }
-                    if (out != null)
-                    {
-                        logger.finer("run() JmDNS probing #" + taskState);
-                        send(out);
-                    }
-                    else
-                    {
-                        // If we have nothing to send, another timer taskState ahead
-                        // of us has done the job for us. We can cancel.
-                        cancel();
-                        return;
-                    }
-                }
-                catch (Throwable e)
-                {
-                    logger.log(Level.WARNING, "run() exception ", e);
-                    recover();
-                }
-
-                taskState = taskState.advance();
-                if (!taskState.isProbing())
-                {
-                    cancel();
-
-                    new Announcer().start();
-                }
-            }
-        }
-
-    }
-
-    /**
-     * The Announcer sends an accumulated query of all announces, and advances
-     * the state of all serviceInfos, for which it has sent an announce.
-     * The Announcer also sends announcements and advances the state of JmDNS itself.
-     * <p/>
-     * When the announcer has run two times, it finishes.
-     */
-    private class Announcer extends TimerTask
-    {
-        /**
-         * The state of the announcer.
-         */
-        DNSState taskState = DNSState.ANNOUNCING_1;
-
-        public Announcer()
-        {
-            // Associate host to this, if it needs announcing
-            if (state == DNSState.ANNOUNCING_1)
-            {
-                task = this;
-            }
-            // Associate services to this, if they need announcing
-            synchronized (JmDNS.this)
-            {
-                for (Iterator s = services.values().iterator(); s.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) s.next();
-                    if (info.getState() == DNSState.ANNOUNCING_1)
-                    {
-                        info.task = this;
-                    }
-                }
-            }
-        }
-
-        public void start()
-        {
-            timer.schedule(this, DNSConstants.ANNOUNCE_WAIT_INTERVAL, DNSConstants.ANNOUNCE_WAIT_INTERVAL);
-        }
-
-        public boolean cancel()
-        {
-            // Remove association from host to this
-            if (task == this)
-            {
-                task = null;
-            }
-
-            // Remove associations from services to this
-            synchronized (JmDNS.this)
-            {
-                for (Iterator i = services.values().iterator(); i.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) i.next();
-                    if (info.task == this)
-                    {
-                        info.task = null;
-                    }
-                }
-            }
-
-            return super.cancel();
-        }
-
-        public void run()
-        {
-            DNSOutgoing out = null;
-            try
-            {
-                // send probes for JmDNS itself
-                if (state == taskState)
-                {
-                    if (out == null)
-                    {
-                        out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
-                    }
-                    DNSRecord answer = localHost.getDNS4AddressRecord();
-                    if (answer != null)
-                    {
-                        out.addAnswer(answer, 0);
-                    }
-                    answer = localHost.getDNS6AddressRecord();
-                    if (answer != null)
-                    {
-                        out.addAnswer(answer, 0);
-                    }
-                    advanceState();
-                }
-                // send announces for services
-                // Defensively copy the services into a local list,
-                // to prevent race conditions with methods registerService
-                // and unregisterService.
-                List list;
-                synchronized (JmDNS.this)
-                {
-                    list = new ArrayList(services.values());
-                }
-                for (Iterator i = list.iterator(); i.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) i.next();
-                    synchronized (info)
-                    {
-                        if (info.getState() == taskState && info.task == this)
-                        {
-                            info.advanceState();
-                            logger.finer("run() JmDNS announcing " + info.getQualifiedName() + " state " + info.getState());
-                            if (out == null)
-                            {
-                                out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
-                            }
-                            out.addAnswer(new DNSRecord.Pointer(info.type, DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.getQualifiedName()), 0);
-                            out.addAnswer(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.priority, info.weight, info.port, localHost.getName()), 0);
-                            out.addAnswer(new DNSRecord.Text(info.getQualifiedName(), DNSConstants.TYPE_TXT, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.text), 0);
-                        }
-                    }
-                }
-                if (out != null)
-                {
-                    logger.finer("run() JmDNS announcing #" + taskState);
-                    send(out);
-                }
-                else
-                {
-                    // If we have nothing to send, another timer taskState ahead
-                    // of us has done the job for us. We can cancel.
-                    cancel();
-                }
-            }
-            catch (Throwable e)
-            {
-                logger.log(Level.WARNING, "run() exception ", e);
-                recover();
-            }
-
-            taskState = taskState.advance();
-            if (!taskState.isAnnouncing())
-            {
-                cancel();
-
-                new Renewer().start();
-            }
-        }
-    }
-
-    /**
-     * The Renewer is there to send renewal announcment when the record expire for ours infos.
-     */
-    private class Renewer extends TimerTask
-    {
-        /**
-         * The state of the announcer.
-         */
-        DNSState taskState = DNSState.ANNOUNCED;
-
-        public Renewer()
-        {
-            // Associate host to this, if it needs renewal
-            if (state == DNSState.ANNOUNCED)
-            {
-                task = this;
-            }
-            // Associate services to this, if they need renewal
-            synchronized (JmDNS.this)
-            {
-                for (Iterator s = services.values().iterator(); s.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) s.next();
-                    if (info.getState() == DNSState.ANNOUNCED)
-                    {
-                        info.task = this;
-                    }
-                }
-            }
-        }
-
-        public void start()
-        {
-            timer.schedule(this, DNSConstants.ANNOUNCED_RENEWAL_TTL_INTERVAL, DNSConstants.ANNOUNCED_RENEWAL_TTL_INTERVAL);
-        }
-
-        public boolean cancel()
-        {
-            // Remove association from host to this
-            if (task == this)
-            {
-                task = null;
-            }
-
-            // Remove associations from services to this
-            synchronized (JmDNS.this)
-            {
-                for (Iterator i = services.values().iterator(); i.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) i.next();
-                    if (info.task == this)
-                    {
-                        info.task = null;
-                    }
-                }
-            }
-
-            return super.cancel();
-        }
-
-        public void run()
-        {
-            DNSOutgoing out = null;
-            try
-            {
-                // send probes for JmDNS itself
-                if (state == taskState)
-                {
-                    if (out == null)
-                    {
-                        out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
-                    }
-                    DNSRecord answer = localHost.getDNS4AddressRecord();
-                    if (answer != null)
-                    {
-                        out.addAnswer(answer, 0);
-                    }
-                    answer = localHost.getDNS6AddressRecord();
-                    if (answer != null)
-                    {
-                        out.addAnswer(answer, 0);
-                    }
-                    advanceState();
-                }
-                // send announces for services
-                // Defensively copy the services into a local list,
-                // to prevent race conditions with methods registerService
-                // and unregisterService.
-                List list;
-                synchronized (JmDNS.this)
-                {
-                    list = new ArrayList(services.values());
-                }
-                for (Iterator i = list.iterator(); i.hasNext();)
-                {
-                    ServiceInfo info = (ServiceInfo) i.next();
-                    synchronized (info)
-                    {
-                        if (info.getState() == taskState && info.task == this)
-                        {
-                            info.advanceState();
-                            logger.finer("run() JmDNS announced " + info.getQualifiedName() + " state " + info.getState());
-                            if (out == null)
-                            {
-                                out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
-                            }
-                            out.addAnswer(new DNSRecord.Pointer(info.type, DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.getQualifiedName()), 0);
-                            out.addAnswer(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.priority, info.weight, info.port, localHost.getName()), 0);
-                            out.addAnswer(new DNSRecord.Text(info.getQualifiedName(), DNSConstants.TYPE_TXT, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.text), 0);
-                        }
-                    }
-                }
-                if (out != null)
-                {
-                    logger.finer("run() JmDNS announced");
-                    send(out);
-                }
-                else
-                {
-                    // If we have nothing to send, another timer taskState ahead
-                    // of us has done the job for us. We can cancel.
-                    cancel();
-                }
-            }
-            catch (Throwable e)
-            {
-                logger.log(Level.WARNING, "run() exception ", e);
-                recover();
-            }
-
-            taskState = taskState.advance();
-            if (!taskState.isAnnounced())
-            {
-                cancel();
-
-            }
-        }
-    }
-
-    /**
-     * The Responder sends a single answer for the specified service infos
-     * and for the host name.
-     */
-    private class Responder extends TimerTask
-    {
-        private DNSIncoming in;
-        private InetAddress addr;
-        private int port;
-
-        public Responder(DNSIncoming in, InetAddress addr, int port)
-        {
-            this.in = in;
-            this.addr = addr;
-            this.port = port;
-        }
-
-        public void start()
-        {
-            // According to draft-cheshire-dnsext-multicastdns.txt
-            // chapter "8 Responding":
-            // We respond immediately if we know for sure, that we are
-            // the only one who can respond to the query.
-            // In all other cases, we respond within 20-120 ms.
-            //
-            // According to draft-cheshire-dnsext-multicastdns.txt
-            // chapter "7.2 Multi-Packet Known Answer Suppression":
-            // We respond after 20-120 ms if the query is truncated.
-
-            boolean iAmTheOnlyOne = true;
-            for (Iterator i = in.questions.iterator(); i.hasNext();)
-            {
-                DNSEntry entry = (DNSEntry) i.next();
-                if (entry instanceof DNSQuestion)
-                {
-                    DNSQuestion q = (DNSQuestion) entry;
-                    logger.finest("start() question=" + q);
-                    iAmTheOnlyOne &= (q.type == DNSConstants.TYPE_SRV
-                        || q.type == DNSConstants.TYPE_TXT
-                        || q.type == DNSConstants.TYPE_A
-                        || q.type == DNSConstants.TYPE_AAAA
-                        || localHost.getName().equalsIgnoreCase(q.name)
-                        || services.containsKey(q.name.toLowerCase()));
-                    if (!iAmTheOnlyOne)
-                    {
-                        break;
-                    }
-                }
-            }
-            int delay = (iAmTheOnlyOne && !in.isTruncated()) ? 0 : DNSConstants.RESPONSE_MIN_WAIT_INTERVAL + random.nextInt(DNSConstants.RESPONSE_MAX_WAIT_INTERVAL - DNSConstants.RESPONSE_MIN_WAIT_INTERVAL + 1) - in.elapseSinceArrival();
-            if (delay < 0)
-            {
-                delay = 0;
-            }
-            logger.finest("start() Responder chosen delay=" + delay);
-            timer.schedule(this, delay);
-        }
-
-        public void run()
-        {
-            synchronized (ioLock)
-            {
-                if (plannedAnswer == in)
-                {
-                    plannedAnswer = null;
-                }
-
-                // We use these sets to prevent duplicate records
-                // FIXME - This should be moved into DNSOutgoing
-                HashSet questions = new HashSet();
-                HashSet answers = new HashSet();
-
-
-                if (state == DNSState.ANNOUNCED)
-                {
-                    try
-                    {
-                        long now = System.currentTimeMillis();
-                        long expirationTime = now + 1; //=now+DNSConstants.KNOWN_ANSWER_TTL;
-                        boolean isUnicast = (port != DNSConstants.MDNS_PORT);
-
-
-                        // Answer questions
-                        for (Iterator iterator = in.questions.iterator(); iterator.hasNext();)
-                        {
-                            DNSEntry entry = (DNSEntry) iterator.next();
-                            if (entry instanceof DNSQuestion)
-                            {
-                                DNSQuestion q = (DNSQuestion) entry;
-
-                                // for unicast responses the question must be included
-                                if (isUnicast)
-                                {
-                                    //out.addQuestion(q);
-                                    questions.add(q);
-                                }
-
-                                int type = q.type;
-                                if (type == DNSConstants.TYPE_ANY || type == DNSConstants.TYPE_SRV)
-                                { // I ama not sure of why there is a special case here [PJYF Oct 15 2004]
-                                    if (localHost.getName().equalsIgnoreCase(q.getName()))
-                                    {
-                                        // type = DNSConstants.TYPE_A;
-                                        DNSRecord answer = localHost.getDNS4AddressRecord();
-                                        if (answer != null)
-                                        {
-                                            answers.add(answer);
-                                        }
-                                        answer = localHost.getDNS6AddressRecord();
-                                        if (answer != null)
-                                        {
-                                            answers.add(answer);
-                                        }
-                                        type = DNSConstants.TYPE_IGNORE;
-                                    }
-                                    else
-                                    {
-                                        if (serviceTypes.containsKey(q.getName().toLowerCase()))
-                                        {
-                                            type = DNSConstants.TYPE_PTR;
-                                        }
-                                    }
-                                }
-
-                                switch (type)
-                                {
-                                    case DNSConstants.TYPE_A:
-                                        {
-                                            // Answer a query for a domain name
-                                            //out = addAnswer( in, addr, port, out, host );
-                                            DNSRecord answer = localHost.getDNS4AddressRecord();
-                                            if (answer != null)
-                                            {
-                                                answers.add(answer);
-                                            }
-                                            break;
-                                        }
-                                    case DNSConstants.TYPE_AAAA:
-                                        {
-                                            // Answer a query for a domain name
-                                            DNSRecord answer = localHost.getDNS6AddressRecord();
-                                            if (answer != null)
-                                            {
-                                                answers.add(answer);
-                                            }
-                                            break;
-                                        }
-                                    case DNSConstants.TYPE_PTR:
-                                        {
-                                            // Answer a query for services of a given type
-
-                                            // find matching services
-                                            for (Iterator serviceIterator = services.values().iterator(); serviceIterator.hasNext();)
-                                            {
-                                                ServiceInfo info = (ServiceInfo) serviceIterator.next();
-                                                if (info.getState() == DNSState.ANNOUNCED)
-                                                {
-                                                    if (q.name.equalsIgnoreCase(info.type))
-                                                    {
-                                                        DNSRecord answer = localHost.getDNS4AddressRecord();
-                                                        if (answer != null)
-                                                        {
-                                                            answers.add(answer);
-                                                        }
-                                                        answer = localHost.getDNS6AddressRecord();
-                                                        if (answer != null)
-                                                        {
-                                                            answers.add(answer);
-                                                        }
-                                                        answers.add(new DNSRecord.Pointer(info.type, DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.getQualifiedName()));
-                                                        answers.add(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE, DNSConstants.DNS_TTL, info.priority, info.weight, info.port, localHost.getName()));
-                                                        answers.add(new DNSRecord.Text(info.getQualifiedName(), DNSConstants.TYPE_TXT, DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE, DNSConstants.DNS_TTL, info.text));
-                                                    }
-                                                }
-                                            }
-                                            if (q.name.equalsIgnoreCase("_services._mdns._udp.local."))
-                                            {
-                                                for (Iterator serviceTypeIterator = serviceTypes.values().iterator(); serviceTypeIterator.hasNext();)
-                                                {
-                                                    answers.add(new DNSRecord.Pointer("_services._mdns._udp.local.", DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, (String) serviceTypeIterator.next()));
-                                                }
-                                            }
-                                            break;
-                                        }
-                                    case DNSConstants.TYPE_SRV:
-                                    case DNSConstants.TYPE_ANY:
-                                    case DNSConstants.TYPE_TXT:
-                                        {
-                                            ServiceInfo info = (ServiceInfo) services.get(q.name.toLowerCase());
-                                            if (info != null && info.getState() == DNSState.ANNOUNCED)
-                                            {
-                                                DNSRecord answer = localHost.getDNS4AddressRecord();
-                                                if (answer != null)
-                                                {
-                                                    answers.add(answer);
-                                                }
-                                                answer = localHost.getDNS6AddressRecord();
-                                                if (answer != null)
-                                                {
-                                                    answers.add(answer);
-                                                }
-                                                answers.add(new DNSRecord.Pointer(info.type, DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.getQualifiedName()));
-                                                answers.add(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE, DNSConstants.DNS_TTL, info.priority, info.weight, info.port, localHost.getName()));
-                                                answers.add(new DNSRecord.Text(info.getQualifiedName(), DNSConstants.TYPE_TXT, DNSConstants.CLASS_IN | DNSConstants.CLASS_UNIQUE, DNSConstants.DNS_TTL, info.text));
-                                            }
-                                            break;
-                                        }
-                                    default :
-                                        {
-                                            //System.out.println("JmDNSResponder.unhandled query:"+q);
-                                            break;
-                                        }
-                                }
-                            }
-                        }
-
-
-                        // remove known answers, if the ttl is at least half of
-                        // the correct value. (See Draft Cheshire chapter 7.1.).
-                        for (Iterator i = in.answers.iterator(); i.hasNext();)
-                        {
-                            DNSRecord knownAnswer = (DNSRecord) i.next();
-                            if (knownAnswer.ttl > DNSConstants.DNS_TTL / 2 && answers.remove(knownAnswer))
-                            {
-                                logger.log(Level.FINER, "JmDNS Responder Known Answer Removed");
-                            }
-                        }
-
-
-                        // responde if we have answers
-                        if (answers.size() != 0)
-                        {
-                            logger.finer("run() JmDNS responding");
-                            DNSOutgoing out = null;
-                            if (isUnicast)
-                            {
-                                out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA, false);
-                            }
-
-                            for (Iterator i = questions.iterator(); i.hasNext();)
-                            {
-                                out.addQuestion((DNSQuestion) i.next());
-                            }
-                            for (Iterator i = answers.iterator(); i.hasNext();)
-                            {
-                                out = addAnswer(in, addr, port, out, (DNSRecord) i.next());
-                            }
-                            send(out);
-                        }
-                        cancel();
-                    }
-                    catch (Throwable e)
-                    {
-                        logger.log(Level.WARNING, "run() exception ", e);
-                        close();
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Helper class to resolve service types.
-     * <p/>
-     * The TypeResolver queries three times consecutively for service types, and then
-     * removes itself from the timer.
-     * <p/>
-     * The TypeResolver will run only if JmDNS is in state ANNOUNCED.
-     */
-    private class TypeResolver extends TimerTask
-    {
-        public void start()
-        {
-            timer.schedule(this, DNSConstants.QUERY_WAIT_INTERVAL, DNSConstants.QUERY_WAIT_INTERVAL);
-        }
-
-        /**
-         * Counts the number of queries that were sent.
-         */
-        int count = 0;
-
-        public void run()
-        {
-            try
-            {
-                if (state == DNSState.ANNOUNCED)
-                {
-                    if (++count < 3)
-                    {
-                        logger.finer("run() JmDNS querying type");
-                        DNSOutgoing out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
-                        out.addQuestion(new DNSQuestion("_services._mdns._udp.local.", DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN));
-                        for (Iterator iterator = serviceTypes.values().iterator(); iterator.hasNext();)
-                        {
-                            out.addAnswer(new DNSRecord.Pointer("_services._mdns._udp.local.", DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, (String) iterator.next()), 0);
-                        }
-                        send(out);
-                    }
-                    else
-                    {
-                        // After three queries, we can quit.
-                        cancel();
-                    }
-                    ;
-                }
-                else
-                {
-                    if (state == DNSState.CANCELED)
-                    {
-                        cancel();
-                    }
-                }
-            }
-            catch (Throwable e)
-            {
-                logger.log(Level.WARNING, "run() exception ", e);
-                recover();
-            }
-        }
-    }
-
-    /**
-     * The ServiceResolver queries three times consecutively for services of
-     * a given type, and then removes itself from the timer.
-     * <p/>
-     * The ServiceResolver will run only if JmDNS is in state ANNOUNCED.
-     * REMIND: Prevent having multiple service resolvers for the same type in the
-     * timer queue.
-     */
-    private class ServiceResolver extends TimerTask
-    {
-        /**
-         * Counts the number of queries being sent.
-         */
-        int count = 0;
-        private String type;
-
-        public ServiceResolver(String type)
-        {
-            this.type = type;
-        }
-
-        public void start()
-        {
-            timer.schedule(this, DNSConstants.QUERY_WAIT_INTERVAL, DNSConstants.QUERY_WAIT_INTERVAL);
-        }
-
-        public void run()
-        {
-            try
-            {
-                if (state == DNSState.ANNOUNCED)
-                {
-                    if (count++ < 3)
-                    {
-                        logger.finer("run() JmDNS querying service");
-                        long now = System.currentTimeMillis();
-                        DNSOutgoing out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
-                        out.addQuestion(new DNSQuestion(type, DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN));
-                        for (Iterator s = services.values().iterator(); s.hasNext();)
-                        {
-                            final ServiceInfo info = (ServiceInfo) s.next();
-                            try
-                            {
-                                out.addAnswer(new DNSRecord.Pointer(info.type, DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.getQualifiedName()), now);
-                            }
-                            catch (IOException ee)
-                            {
-                                break;
-                            }
-                        }
-                        send(out);
-                    }
-                    else
-                    {
-                        // After three queries, we can quit.
-                        cancel();
-                    }
-                    ;
-                }
-                else
-                {
-                    if (state == DNSState.CANCELED)
-                    {
-                        cancel();
-                    }
-                }
-            }
-            catch (Throwable e)
-            {
-                logger.log(Level.WARNING, "run() exception ", e);
-                recover();
-            }
-        }
-    }
-
-    /**
-     * The ServiceInfoResolver queries up to three times consecutively for
-     * a service info, and then removes itself from the timer.
-     * <p/>
-     * The ServiceInfoResolver will run only if JmDNS is in state ANNOUNCED.
-     * REMIND: Prevent having multiple service resolvers for the same info in the
-     * timer queue.
-     */
-    private class ServiceInfoResolver extends TimerTask
-    {
-        /**
-         * Counts the number of queries being sent.
-         */
-        int count = 0;
-        private ServiceInfo info;
-
-        public ServiceInfoResolver(ServiceInfo info)
-        {
-            this.info = info;
-            info.dns = JmDNS.this;
-            addListener(info, new DNSQuestion(info.getQualifiedName(), DNSConstants.TYPE_ANY, DNSConstants.CLASS_IN));
-        }
-
-        public void start()
-        {
-            timer.schedule(this, DNSConstants.QUERY_WAIT_INTERVAL, DNSConstants.QUERY_WAIT_INTERVAL);
-        }
-
-        public void run()
-        {
-            try
-            {
-                if (state == DNSState.ANNOUNCED)
-                {
-                    if (count++ < 3 && !info.hasData())
-                    {
-                        long now = System.currentTimeMillis();
-                        DNSOutgoing out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
-                        out.addQuestion(new DNSQuestion(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN));
-                        out.addQuestion(new DNSQuestion(info.getQualifiedName(), DNSConstants.TYPE_TXT, DNSConstants.CLASS_IN));
-                        if (info.server != null)
-                        {
-                            out.addQuestion(new DNSQuestion(info.server, DNSConstants.TYPE_A, DNSConstants.CLASS_IN));
-                        }
-                        out.addAnswer((DNSRecord) cache.get(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN), now);
-                        out.addAnswer((DNSRecord) cache.get(info.getQualifiedName(), DNSConstants.TYPE_TXT, DNSConstants.CLASS_IN), now);
-                        if (info.server != null)
-                        {
-                            out.addAnswer((DNSRecord) cache.get(info.server, DNSConstants.TYPE_A, DNSConstants.CLASS_IN), now);
-                        }
-                        send(out);
-                    }
-                    else
-                    {
-                        // After three queries, we can quit.
-                        cancel();
-                        removeListener(info);
-                    }
-                    ;
-                }
-                else
-                {
-                    if (state == DNSState.CANCELED)
-                    {
-                        cancel();
-                        removeListener(info);
-                    }
-                }
-            }
-            catch (Throwable e)
-            {
-                logger.log(Level.WARNING, "run() exception ", e);
-                recover();
-            }
-        }
-    }
-
-    /**
-     * The Canceler sends two announces with TTL=0 for the specified services.
-     */
-    private class Canceler extends TimerTask
-    {
-        /**
-         * Counts the number of announces being sent.
-         */
-        int count = 0;
-        /**
-         * The services that need cancelling.
-         * Note: We have to use a local variable here, because the services
-         * that are canceled, are removed immediately from variable JmDNS.services.
-         */
-        private ServiceInfo[] infos;
-        /**
-         * We call notifyAll() on the lock object, when we have canceled the
-         * service infos.
-         * This is used by method JmDNS.unregisterService() and
-         * JmDNS.unregisterAllServices, to ensure that the JmDNS
-         * socket stays open until the Canceler has canceled all services.
-         * <p/>
-         * Note: We need this lock, because ServiceInfos do the transition from
-         * state ANNOUNCED to state CANCELED before we get here. We could get
-         * rid of this lock, if we added a state named CANCELLING to DNSState.
-         */
-        private Object lock;
-        int ttl = 0;
-
-        public Canceler(ServiceInfo info, Object lock)
-        {
-            this.infos = new ServiceInfo[]{info};
-            this.lock = lock;
-            addListener(info, new DNSQuestion(info.getQualifiedName(), DNSConstants.TYPE_ANY, DNSConstants.CLASS_IN));
-        }
-
-        public Canceler(ServiceInfo[] infos, Object lock)
-        {
-            this.infos = infos;
-            this.lock = lock;
-        }
-
-        public Canceler(Collection infos, Object lock)
-        {
-            this.infos = (ServiceInfo[]) infos.toArray(new ServiceInfo[infos.size()]);
-            this.lock = lock;
-        }
-
-        public void start()
-        {
-            timer.schedule(this, 0, DNSConstants.ANNOUNCE_WAIT_INTERVAL);
-        }
-
-        public void run()
-        {
-            try
-            {
-                if (++count < 3)
-                {
-                    logger.finer("run() JmDNS canceling service");
-                    // announce the service
-                    //long now = System.currentTimeMillis();
-                    DNSOutgoing out = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
-                    for (int i = 0; i < infos.length; i++)
-                    {
-                        ServiceInfo info = infos[i];
-                        out.addAnswer(new DNSRecord.Pointer(info.type, DNSConstants.TYPE_PTR, DNSConstants.CLASS_IN, ttl, info.getQualifiedName()), 0);
-                        out.addAnswer(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN, ttl, info.priority, info.weight, info.port, localHost.getName()), 0);
-                        out.addAnswer(new DNSRecord.Text(info.getQualifiedName(), DNSConstants.TYPE_TXT, DNSConstants.CLASS_IN, ttl, info.text), 0);
-                        DNSRecord answer = localHost.getDNS4AddressRecord();
-                        if (answer != null)
-                        {
-                            out.addAnswer(answer, 0);
-                        }
-                        answer = localHost.getDNS6AddressRecord();
-                        if (answer != null)
-                        {
-                            out.addAnswer(answer, 0);
-                        }
-                    }
-                    send(out);
-                }
-                else
-                {
-                    // After three successful announcements, we are finished.
-                    synchronized (lock)
-                    {
-                        closed=true;
-                        lock.notifyAll();
-                    }
-                    cancel();
-                }
-            }
-            catch (Throwable e)
-            {
-                logger.log(Level.WARNING, "run() exception ", e);
-                recover();
-            }
-        }
-    }
-    
-    // REMIND: Why is this not an anonymous inner class?
-    /**
-     * Shutdown operations.
-     */
-    private class Shutdown implements Runnable
-    {
-        public void run()
-        {
-            shutdown = null;
-            close();
-        }
-    }
-
-    /**
-     * Recover jmdns when there is an error.
-     */
-    protected void recover()
-    {
-        logger.finer("recover()");
-        // We have an IO error so lets try to recover if anything happens lets close it.
-        // This should cover the case of the IP address changing under our feet
-        if (DNSState.CANCELED != state)
-        {
-            synchronized (this)
-            { // Synchronize only if we are not already in process to prevent dead locks
-                //
-                logger.finer("recover() Cleanning up");
-                // Stop JmDNS
-                state = DNSState.CANCELED; // This protects against recursive calls
-
-                // We need to keep a copy for reregistration
-                Collection oldServiceInfos = new ArrayList(services.values());
-
-                // Cancel all services
-                unregisterAllServices();
-                disposeServiceCollectors();
-                //
-                // close multicast socket
-                closeMulticastSocket();
-                //
-                cache.clear();
-                logger.finer("recover() All is clean");
-                //
-                // All is clear now start the services
-                //
-                try
-                {
-                    openMulticastSocket(localHost);
-                    start(oldServiceInfos);
-                }
-                catch (Exception exception)
-                {
-                    logger.log(Level.WARNING, "recover() Start services exception ", exception);
-                }
-                logger.log(Level.WARNING, "recover() We are back!");
-            }
-        }
-    }
-
-    /**
-     * Close down jmdns. Release all resources and unregister all services.
-     */
-    public void close()
-    {
-        if (state != DNSState.CANCELED)
-        {
-            synchronized (this)
-            { // Synchronize only if we are not already in process to prevent dead locks
-                // Stop JmDNS
-                state = DNSState.CANCELED; // This protects against recursive calls
-
-                unregisterAllServices();
-                disposeServiceCollectors();
-
-                // close socket
-                closeMulticastSocket();
-
-                // Stop the timer
-                timer.cancel();
-
-                // remove the shutdown hook
-                if (shutdown != null)
-                {
-                    Runtime.getRuntime().removeShutdownHook(shutdown);
-                }
-
-            }
-        }
-    }
-
-    /**
-     * List cache entries, for debugging only.
-     */
-    void print()
-    {
-        System.out.println("---- cache ----");
-        cache.print();
-        System.out.println();
-    }
-
-    /**
-     * List Services and serviceTypes.
-     * Debugging Only
-     */
-
-    public void printServices()
-    {
-        System.err.println(toString());
-    }
-
-    public String toString()
-    {
-        StringBuffer aLog = new StringBuffer();
-        aLog.append("\t---- Services -----");
-        if (services != null)
-        {
-            for (Iterator k = services.keySet().iterator(); k.hasNext();)
-            {
-                Object key = k.next();
-                aLog.append("\n\t\tService: " + key + ": " + services.get(key));
-            }
-        }
-        aLog.append("\n");
-        aLog.append("\t---- Types ----");
-        if (serviceTypes != null)
-        {
-            for (Iterator k = serviceTypes.keySet().iterator(); k.hasNext();)
-            {
-                Object key = k.next();
-                aLog.append("\n\t\tType: " + key + ": " + serviceTypes.get(key));
-            }
-        }
-        aLog.append("\n");
-        aLog.append(cache.toString());
-        aLog.append("\n");
-        aLog.append("\t---- Service Collectors ----");
-        if (serviceCollectors != null)
-        {
-            synchronized (serviceCollectors)
-            {
-                for (Iterator k = serviceCollectors.keySet().iterator(); k.hasNext();)
-                {
-                    Object key = k.next();
-                    aLog.append("\n\t\tService Collector: " + key + ": " + serviceCollectors.get(key));
-                }
-                serviceCollectors.clear();
-            }
-        }
-        return aLog.toString();
-    }
-
-    /**
-     * Returns a list of service infos of the specified type.
-     *
-     * @param type Service type name, such as <code>_http._tcp.local.</code>.
-     * @return An array of service instance names.
-     */
-    public ServiceInfo[] list(String type)
-    {
-        // Implementation note: The first time a list for a given type is
-        // requested, a ServiceCollector is created which collects service
-        // infos. This greatly speeds up the performance of subsequent calls
-        // to this method. The caveats are, that 1) the first call to this method
-        // for a given type is slow, and 2) we spawn a ServiceCollector
-        // instance for each service type which increases network traffic a
-        // little.
-
-        ServiceCollector collector;
-
-        boolean newCollectorCreated;
-        synchronized (serviceCollectors)
-        {
-            collector = (ServiceCollector) serviceCollectors.get(type);
-            if (collector == null)
-            {
-                collector = new ServiceCollector(type);
-                serviceCollectors.put(type, collector);
-                addServiceListener(type, collector);
-                newCollectorCreated = true;
-            }
-            else
-            {
-                newCollectorCreated = false;
-            }
-        }
-
-        // After creating a new ServiceCollector, we collect service infos for
-        // 200 milliseconds. This should be enough time, to get some service
-        // infos from the network.
-        if (newCollectorCreated)
-        {
-            try
-            {
-                Thread.sleep(200);
-            }
-            catch (InterruptedException e)
-            {
-            }
-        }
-
-        return collector.list();
-    }
-
-    /**
-     * This method disposes all ServiceCollector instances which have been
-     * created by calls to method <code>list(type)</code>.
-     *
-     * @see #list
-     */
-    private void disposeServiceCollectors()
-    {
-        logger.finer("disposeServiceCollectors()");
-        synchronized (serviceCollectors)
-        {
-            for (Iterator i = serviceCollectors.values().iterator(); i.hasNext();)
-            {
-                ServiceCollector collector = (ServiceCollector) i.next();
-                removeServiceListener(collector.type, collector);
-            }
-            serviceCollectors.clear();
-        }
-    }
-
-    /**
-     * Instances of ServiceCollector are used internally to speed up the
-     * performance of method <code>list(type)</code>.
-     *
-     * @see #list
-     */
-    private static class ServiceCollector implements ServiceListener
-    {
-        private static Logger logger = Logger.getLogger(ServiceCollector.class.toString());
-        /**
-         * A set of collected service instance names.
-         */
-        private Map infos = Collections.synchronizedMap(new HashMap());
-
-        public String type;
-
-        public ServiceCollector(String type)
-        {
-            this.type = type;
-        }
-
-        /**
-         * A service has been added.
-         */
-        public void serviceAdded(ServiceEvent event)
-        {
-            synchronized (infos)
-            {
-                event.getDNS().requestServiceInfo(event.getType(), event.getName(), 0);
-            }
-        }
-
-        /**
-         * A service has been removed.
-         */
-        public void serviceRemoved(ServiceEvent event)
-        {
-            synchronized (infos)
-            {
-                infos.remove(event.getName());
-            }
-        }
-
-        /**
-         * A service hase been resolved. Its details are now available in the
-         * ServiceInfo record.
-         */
-        public void serviceResolved(ServiceEvent event)
-        {
-            synchronized (infos)
-            {
-                infos.put(event.getName(), event.getInfo());
-            }
-        }
-
-        /**
-         * Returns an array of all service infos which have been collected by this
-         * ServiceCollector.
-         */
-        public ServiceInfo[] list()
-        {
-            synchronized (infos)
-            {
-                return (ServiceInfo[]) infos.values().toArray(new ServiceInfo[infos.size()]);
-            }
-        }
-
-        public String toString()
-        {
-            StringBuffer aLog = new StringBuffer();
-            synchronized (infos)
-            {
-                for (Iterator k = infos.keySet().iterator(); k.hasNext();)
-                {
-                    Object key = k.next();
-                    aLog.append("\n\t\tService: " + key + ": " + infos.get(key));
-                }
-            }
-            return aLog.toString();
-        }
-    };
-    
-    private static String toUnqualifiedName(String type, String qualifiedName)
-    {
-        if (qualifiedName.endsWith(type))
-        {
-            return qualifiedName.substring(0, qualifiedName.length() - type.length() - 1);
-        }
-        else
-        {
-            return qualifiedName;
-        }
-    }
-}
-
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceEvent.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceEvent.java
deleted file mode 100644
index a6df607..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceEvent.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.util.EventObject;
-import java.util.logging.Logger;
-
-/**
- * ServiceEvent.
- *
- * @author Werner Randelshofer, Rick Blair
- * @version %I%, %G%
- */
-public class ServiceEvent extends EventObject
-{
-    private static Logger logger = Logger.getLogger(ServiceEvent.class.toString());
-    /**
-     * The type name of the service.
-     */
-    private String type;
-    /**
-     * The instance name of the service. Or null, if the event was
-     * fired to a service type listener.
-     */
-    private String name;
-    /**
-     * The service info record, or null if the service could be be resolved.
-     * This is also null, if the event was fired to a service type listener.
-     */
-    private ServiceInfo info;
-
-    /**
-     * Creates a new instance.
-     *
-     * @param source the JmDNS instance which originated the event.
-     * @param type   the type name of the service.
-     * @param name   the instance name of the service.
-     * @param info   the service info record, or null if the service could be be resolved.
-     */
-    public ServiceEvent(JmDNS source, String type, String name, ServiceInfo info)
-    {
-        super(source);
-        this.type = type;
-        this.name = name;
-        this.info = info;
-    }
-
-    /**
-     * Returns the JmDNS instance which originated the event.
-     */
-    public JmDNS getDNS()
-    {
-        return (JmDNS) getSource();
-    }
-
-    /**
-     * Returns the fully qualified type of the service.
-     */
-    public String getType()
-    {
-        return type;
-    }
-
-    /**
-     * Returns the instance name of the service.
-     * Always returns null, if the event is sent to a service type listener.
-     */
-    public String getName()
-    {
-        return name;
-    }
-
-    /**
-     * Returns the service info record, or null if the service could not be
-     * resolved.
-     * Always returns null, if the event is sent to a service type listener.
-     */
-    public ServiceInfo getInfo()
-    {
-        return info;
-    }
-
-    public String toString()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append("<" + getClass().getName() + "> ");
-        buf.append(super.toString());
-        buf.append(" name ");
-        buf.append(getName());
-        buf.append(" type ");
-        buf.append(getType());
-        buf.append(" info ");
-        buf.append(getInfo());
-        return buf.toString();
-    }
-
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceInfo.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceInfo.java
deleted file mode 100644
index b91a9a2..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceInfo.java
+++ /dev/null
@@ -1,673 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.TimerTask;
-import java.util.Vector;
-import java.util.logging.Logger;
-
-/**
- * JmDNS service information.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Jeff Sonstein, Werner Randelshofer
- */
-public class ServiceInfo implements DNSListener
-{
-    private static Logger logger = Logger.getLogger(ServiceInfo.class.toString());
-    public final static byte[] NO_VALUE = new byte[0];
-    JmDNS dns;
-    
-    // State machine
-    /**
-     * The state of this service info.
-     * This is used only for services announced by JmDNS.
-     * <p/>
-     * For proper handling of concurrency, this variable must be
-     * changed only using methods advanceState(), revertState() and cancel().
-     */
-    private DNSState state = DNSState.PROBING_1;
-
-    /**
-     * Task associated to this service info.
-     * Possible tasks are JmDNS.Prober, JmDNS.Announcer, JmDNS.Responder,
-     * JmDNS.Canceler.
-     */
-    TimerTask task;
-
-    String type;
-    private String name;
-    String server;
-    int port;
-    int weight;
-    int priority;
-    byte text[];
-    Hashtable props;
-    InetAddress addr;
-
-
-    /**
-     * Construct a service description for registrating with JmDNS.
-     *
-     * @param type fully qualified service type name, such as <code>_http._tcp.local.</code>.
-     * @param name unqualified service instance name, such as <code>foobar</code>
-     * @param port the local port on which the service runs
-     * @param text string describing the service
-     */
-    public ServiceInfo(String type, String name, int port, String text)
-    {
-        this(type, name, port, 0, 0, text);
-    }
-
-    /**
-     * Construct a service description for registrating with JmDNS.
-     *
-     * @param type     fully qualified service type name, such as <code>_http._tcp.local.</code>.
-     * @param name     unqualified service instance name, such as <code>foobar</code>
-     * @param port     the local port on which the service runs
-     * @param weight   weight of the service
-     * @param priority priority of the service
-     * @param text     string describing the service
-     */
-    public ServiceInfo(String type, String name, int port, int weight, int priority, String text)
-    {
-        this(type, name, port, weight, priority, (byte[]) null);
-        try
-        {
-            ByteArrayOutputStream out = new ByteArrayOutputStream(text.length());
-            writeUTF(out, text);
-            this.text = out.toByteArray();
-        }
-        catch (IOException e)
-        {
-            throw new RuntimeException("unexpected exception: " + e);
-        }
-    }
-
-    /**
-     * Construct a service description for registrating with JmDNS. The properties hashtable must
-     * map property names to either Strings or byte arrays describing the property values.
-     *
-     * @param type     fully qualified service type name, such as <code>_http._tcp.local.</code>.
-     * @param name     unqualified service instance name, such as <code>foobar</code>
-     * @param port     the local port on which the service runs
-     * @param weight   weight of the service
-     * @param priority priority of the service
-     * @param props    properties describing the service
-     */
-    public ServiceInfo(String type, String name, int port, int weight, int priority, Hashtable props)
-    {
-        this(type, name, port, weight, priority, new byte[0]);
-        if (props != null)
-        {
-            try
-            {
-                ByteArrayOutputStream out = new ByteArrayOutputStream(256);
-                for (Enumeration e = props.keys(); e.hasMoreElements();)
-                {
-                    String key = (String) e.nextElement();
-                    Object val = props.get(key);
-                    ByteArrayOutputStream out2 = new ByteArrayOutputStream(100);
-                    writeUTF(out2, key);
-                    if (val instanceof String)
-                    {
-                        out2.write('=');
-                        writeUTF(out2, (String) val);
-                    }
-                    else
-                    {
-                        if (val instanceof byte[])
-                        {
-                            out2.write('=');
-                            byte[] bval = (byte[]) val;
-                            out2.write(bval, 0, bval.length);
-                        }
-                        else
-                        {
-                            if (val != NO_VALUE)
-                            {
-                                throw new IllegalArgumentException("invalid property value: " + val);
-                            }
-                        }
-                    }
-                    byte data[] = out2.toByteArray();
-                    out.write(data.length);
-                    out.write(data, 0, data.length);
-                }
-                this.text = out.toByteArray();
-            }
-            catch (IOException e)
-            {
-                throw new RuntimeException("unexpected exception: " + e);
-            }
-        }
-    }
-
-    /**
-     * Construct a service description for registrating with JmDNS.
-     *
-     * @param type     fully qualified service type name, such as <code>_http._tcp.local.</code>.
-     * @param name     unqualified service instance name, such as <code>foobar</code>
-     * @param port     the local port on which the service runs
-     * @param weight   weight of the service
-     * @param priority priority of the service
-     * @param text     bytes describing the service
-     */
-    public ServiceInfo(String type, String name, int port, int weight, int priority, byte text[])
-    {
-        this.type = type;
-        this.name = name;
-        this.port = port;
-        this.weight = weight;
-        this.priority = priority;
-        this.text = text;
-    }
-
-    /**
-     * Construct a service record during service discovery.
-     */
-    ServiceInfo(String type, String name)
-    {
-        if (!type.endsWith("."))
-        {
-            throw new IllegalArgumentException("type must be fully qualified DNS name ending in '.': " + type);
-        }
-
-        this.type = type;
-        this.name = name;
-    }
-
-    /**
-     * During recovery we need to duplicate service info to reregister them
-     */
-    ServiceInfo(ServiceInfo info)
-    {
-        if (info != null)
-        {
-            this.type = info.type;
-            this.name = info.name;
-            this.port = info.port;
-            this.weight = info.weight;
-            this.priority = info.priority;
-            this.text = info.text;
-        }
-    }
-
-    /**
-     * Fully qualified service type name, such as <code>_http._tcp.local.</code> .
-     */
-    public String getType()
-    {
-        return type;
-    }
-
-    /**
-     * Unqualified service instance name, such as <code>foobar</code> .
-     */
-    public String getName()
-    {
-        return name;
-    }
-
-    /**
-     * Sets the service instance name.
-     *
-     * @param name unqualified service instance name, such as <code>foobar</code>
-     */
-    void setName(String name)
-    {
-        this.name = name;
-    }
-
-    /**
-     * Fully qualified service name, such as <code>foobar._http._tcp.local.</code> .
-     */
-    public String getQualifiedName()
-    {
-        return name + "." + type;
-    }
-
-    /**
-     * Get the name of the server.
-     */
-    public String getServer()
-    {
-        return server;
-    }
-
-    /**
-     * Get the host address of the service (ie X.X.X.X).
-     */
-    public String getHostAddress()
-    {
-        return (addr != null ? addr.getHostAddress() : "");
-    }
-
-    public InetAddress getAddress()
-    {
-        return addr;
-    }
-
-    /**
-     * Get the InetAddress of the service.
-     */
-    public InetAddress getInetAddress()
-    {
-        return addr;
-    }
-
-    /**
-     * Get the port for the service.
-     */
-    public int getPort()
-    {
-        return port;
-    }
-
-    /**
-     * Get the priority of the service.
-     */
-    public int getPriority()
-    {
-        return priority;
-    }
-
-    /**
-     * Get the weight of the service.
-     */
-    public int getWeight()
-    {
-        return weight;
-    }
-
-    /**
-     * Get the text for the serivce as raw bytes.
-     */
-    public byte[] getTextBytes()
-    {
-        return text;
-    }
-
-    /**
-     * Get the text for the service. This will interpret the text bytes
-     * as a UTF8 encoded string. Will return null if the bytes are not
-     * a valid UTF8 encoded string.
-     */
-    public String getTextString()
-    {
-        if ((text == null) || (text.length == 0) || ((text.length == 1) && (text[0] == 0)))
-        {
-            return null;
-        }
-        return readUTF(text, 0, text.length);
-    }
-
-    /**
-     * Get the URL for this service. An http URL is created by
-     * combining the address, port, and path properties.
-     */
-    public String getURL()
-    {
-        return getURL("http");
-    }
-
-    /**
-     * Get the URL for this service. An URL is created by
-     * combining the protocol, address, port, and path properties.
-     */
-    public String getURL(String protocol)
-    {
-        String url = protocol + "://" + getAddress() + ":" + getPort();
-        String path = getPropertyString("path");
-        if (path != null)
-        {
-            if (path.indexOf("://") >= 0)
-            {
-                url = path;
-            }
-            else
-            {
-                url += path.startsWith("/") ? path : "/" + path;
-            }
-        }
-        return url;
-    }
-
-    /**
-     * Get a property of the service. This involves decoding the
-     * text bytes into a property list. Returns null if the property
-     * is not found or the text data could not be decoded correctly.
-     */
-    public synchronized byte[] getPropertyBytes(String name)
-    {
-        return (byte[]) getProperties().get(name);
-    }
-
-    /**
-     * Get a property of the service. This involves decoding the
-     * text bytes into a property list. Returns null if the property
-     * is not found, the text data could not be decoded correctly, or
-     * the resulting bytes are not a valid UTF8 string.
-     */
-    public synchronized String getPropertyString(String name)
-    {
-        byte data[] = (byte[]) getProperties().get(name);
-        if (data == null)
-        {
-            return null;
-        }
-        if (data == NO_VALUE)
-        {
-            return "true";
-        }
-        return readUTF(data, 0, data.length);
-    }
-
-    /**
-     * Enumeration of the property names.
-     */
-    public Enumeration getPropertyNames()
-    {
-        Hashtable props = getProperties();
-        return (props != null) ? props.keys() : new Vector().elements();
-    }
-
-    /**
-     * Write a UTF string with a length to a stream.
-     */
-    void writeUTF(OutputStream out, String str) throws IOException
-    {
-        for (int i = 0, len = str.length(); i < len; i++)
-        {
-            int c = str.charAt(i);
-            if ((c >= 0x0001) && (c <= 0x007F))
-            {
-                out.write(c);
-            }
-            else
-            {
-                if (c > 0x07FF)
-                {
-                    out.write(0xE0 | ((c >> 12) & 0x0F));
-                    out.write(0x80 | ((c >> 6) & 0x3F));
-                    out.write(0x80 | ((c >> 0) & 0x3F));
-                }
-                else
-                {
-                    out.write(0xC0 | ((c >> 6) & 0x1F));
-                    out.write(0x80 | ((c >> 0) & 0x3F));
-                }
-            }
-        }
-    }
-
-    /**
-     * Read data bytes as a UTF stream.
-     */
-    String readUTF(byte data[], int off, int len)
-    {
-        StringBuffer buf = new StringBuffer();
-        for (int end = off + len; off < end;)
-        {
-            int ch = data[off++] & 0xFF;
-            switch (ch >> 4)
-            {
-                case 0:
-                case 1:
-                case 2:
-                case 3:
-                case 4:
-                case 5:
-                case 6:
-                case 7:
-                    // 0xxxxxxx
-                    break;
-                case 12:
-                case 13:
-                    if (off >= len)
-                    {
-                        return null;
-                    }
-                    // 110x xxxx   10xx xxxx
-                    ch = ((ch & 0x1F) << 6) | (data[off++] & 0x3F);
-                    break;
-                case 14:
-                    if (off + 2 >= len)
-                    {
-                        return null;
-                    }
-                    // 1110 xxxx  10xx xxxx  10xx xxxx
-                    ch = ((ch & 0x0f) << 12) | ((data[off++] & 0x3F) << 6) | (data[off++] & 0x3F);
-                    break;
-                default:
-                    if (off + 1 >= len)
-                    {
-                        return null;
-                    }
-                    // 10xx xxxx,  1111 xxxx
-                    ch = ((ch & 0x3F) << 4) | (data[off++] & 0x0f);
-                    break;
-            }
-            buf.append((char) ch);
-        }
-        return buf.toString();
-    }
-
-    synchronized Hashtable getProperties()
-    {
-        if ((props == null) && (text != null))
-        {
-            Hashtable props = new Hashtable();
-            int off = 0;
-            while (off < text.length)
-            {
-                // length of the next key value pair
-                int len = text[off++] & 0xFF;
-                if ((len == 0) || (off + len > text.length))
-                {
-                    props.clear();
-                    break;
-                }
-                // look for the '='
-                int i = 0;
-                for (; (i < len) && (text[off + i] != '='); i++)
-                {
-                    ;
-                }
-
-                // get the property name
-                String name = readUTF(text, off, i);
-                if (name == null)
-                {
-                    props.clear();
-                    break;
-                }
-                if (i == len)
-                {
-                    props.put(name, NO_VALUE);
-                }
-                else
-                {
-                    byte value[] = new byte[len - ++i];
-                    System.arraycopy(text, off + i, value, 0, len - i);
-                    props.put(name, value);
-                    off += len;
-                }
-            }
-            this.props = props;
-        }
-        return props;
-    }
-    
-    // REMIND: Oops, this shouldn't be public!
-    /**
-     * JmDNS callback to update a DNS record.
-     */
-    public void updateRecord(JmDNS jmdns, long now, DNSRecord rec)
-    {
-        if ((rec != null) && !rec.isExpired(now))
-        {
-            switch (rec.type)
-            {
-                case DNSConstants.TYPE_A:		// IPv4
-                case DNSConstants.TYPE_AAAA:	// IPv6 FIXME [PJYF Oct 14 2004] This has not been tested
-                    if (rec.name.equals(server))
-                    {
-                        addr = ((DNSRecord.Address) rec).getAddress();
-
-                    }
-                    break;
-                case DNSConstants.TYPE_SRV:
-                    if (rec.name.equals(getQualifiedName()))
-                    {
-                        DNSRecord.Service srv = (DNSRecord.Service) rec;
-                        server = srv.server;
-                        port = srv.port;
-                        weight = srv.weight;
-                        priority = srv.priority;
-                        addr = null;
-                        // changed to use getCache() instead - jeffs
-                        // updateRecord(jmdns, now, (DNSRecord)jmdns.cache.get(server, TYPE_A, CLASS_IN));
-                        updateRecord(jmdns, now, (DNSRecord) jmdns.getCache().get(server, DNSConstants.TYPE_A, DNSConstants.CLASS_IN));
-                    }
-                    break;
-                case DNSConstants.TYPE_TXT:
-                    if (rec.name.equals(getQualifiedName()))
-                    {
-                        DNSRecord.Text txt = (DNSRecord.Text) rec;
-                        text = txt.text;
-                    }
-                    break;
-            }
-            // Future Design Pattern
-            // This is done, to notify the wait loop in method
-            // JmDNS.getServiceInfo(type, name, timeout);
-            if (hasData() && dns != null)
-            {
-                dns.handleServiceResolved(this);
-                dns = null;
-            }
-            synchronized (this)
-            {
-                notifyAll();
-            }
-        }
-    }
-
-    /**
-     * Returns true if the service info is filled with data.
-     */
-    boolean hasData()
-    {
-        return server != null && addr != null && text != null;
-    }
-    
-    
-    // State machine
-    /**
-     * Sets the state and notifies all objects that wait on the ServiceInfo.
-     */
-    synchronized void advanceState()
-    {
-        state = state.advance();
-        notifyAll();
-    }
-
-    /**
-     * Sets the state and notifies all objects that wait on the ServiceInfo.
-     */
-    synchronized void revertState()
-    {
-        state = state.revert();
-        notifyAll();
-    }
-
-    /**
-     * Sets the state and notifies all objects that wait on the ServiceInfo.
-     */
-    synchronized void cancel()
-    {
-        state = DNSState.CANCELED;
-        notifyAll();
-    }
-
-    /**
-     * Returns the current state of this info.
-     */
-    DNSState getState()
-    {
-        return state;
-    }
-
-
-    public int hashCode()
-    {
-        return getQualifiedName().hashCode();
-    }
-
-    public boolean equals(Object obj)
-    {
-        return (obj instanceof ServiceInfo) && getQualifiedName().equals(((ServiceInfo) obj).getQualifiedName());
-    }
-
-    public String getNiceTextString()
-    {
-        StringBuffer buf = new StringBuffer();
-        for (int i = 0, len = text.length; i < len; i++)
-        {
-            if (i >= 20)
-            {
-                buf.append("...");
-                break;
-            }
-            int ch = text[i] & 0xFF;
-            if ((ch < ' ') || (ch > 127))
-            {
-                buf.append("\\0");
-                buf.append(Integer.toString(ch, 8));
-            }
-            else
-            {
-                buf.append((char) ch);
-            }
-        }
-        return buf.toString();
-    }
-
-    public String toString()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append("service[");
-        buf.append(getQualifiedName());
-        buf.append(',');
-        buf.append(getAddress());
-        buf.append(':');
-        buf.append(port);
-        buf.append(',');
-        buf.append(getNiceTextString());
-        buf.append(']');
-        return buf.toString();
-    }
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceListener.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceListener.java
deleted file mode 100644
index 0c52977..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceListener.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.util.EventListener;
-
-/**
- * Listener for service updates.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Werner Randelshofer
- */
-public interface ServiceListener extends EventListener
-{
-    /**
-     * A service has been added.
-     *
-     * @param event The ServiceEvent providing the name and fully qualified type
-     *              of the service.
-     */
-    void serviceAdded(ServiceEvent event);
-
-    /**
-     * A service has been removed.
-     *
-     * @param event The ServiceEvent providing the name and fully qualified type
-     *              of the service.
-     */
-    void serviceRemoved(ServiceEvent event);
-
-    /**
-     * A service has been resolved. Its details are now available in the
-     * ServiceInfo record.
-     *
-     * @param event The ServiceEvent providing the name, the fully qualified
-     *              type of the service, and the service info record, or null if the service
-     *              could not be resolved.
-     */
-    void serviceResolved(ServiceEvent event);
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceTypeListener.java b/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceTypeListener.java
deleted file mode 100644
index 2987aba..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/java/org/apache/activemq/jmdns/ServiceTypeListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright 2003-2005 Arthur van Hoff, Rick Blair
- *
- * 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.jmdns;
-
-import java.util.EventListener;
-
-/**
- * Listener for service types.
- *
- * @version %I%, %G%
- * @author	Arthur van Hoff, Werner Randelshofer
- */
-public interface ServiceTypeListener extends EventListener
-{
-    /**
-     * A new service type was discovered.
-     *
-     * @param event The service event providing the fully qualified type of
-     *              the service.
-     */
-    void serviceTypeAdded(ServiceEvent event);
-}
diff --git a/trunk/activemq-jmdns_1.0/src/main/resources/META-INF/NOTICE b/trunk/activemq-jmdns_1.0/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 1495155..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,17 +0,0 @@
-===============================================================
-==     NOTICE File for JmDNS                                 ==
-===============================================================
-
-Java Multicast Domain Name Server (JmDNS)
-
-This project was originally developed by Arthur van Hoff under the GNU
-Lesser General Public License as jRendevous.  It was moved to Sourceforge
-by Rick Blair and renamed to JmDNS with the Arthur's kind permission.
-
-Currently it has  been re-released under the Apache License, Version 2.0.
-
-Details of the Apache License, Version 2.0 can be found at:
-http://www.apache.org/licenses/
-
-
-For other details please see the README.txt file.
diff --git a/trunk/activemq-jmdns_1.0/src/main/resources/META-INF/README.txt b/trunk/activemq-jmdns_1.0/src/main/resources/META-INF/README.txt
deleted file mode 100644
index e54a65e..0000000
--- a/trunk/activemq-jmdns_1.0/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,117 +0,0 @@
-// %Z%%M%, %I%, %G%
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-//This library is now licensed under the Apache License Version 2.0  Please
-//see the file NOTICE.
-
-
-Arthur van Hoff
-avh@strangeberry.com
-
-Rick Blair
-rickblair@mac.com
-
-** JmDNS
-
-This is an implemenation of multi-cast DNS in Java. It currently
-supports service discovery and service registration. It is fully
-interoperable with Apple's Rendezvous.
-
-
-
-** Requirements
-
-jmdns has been tested using the JDK 1.3.1 and JDK 1.4.0
-on the following platforms:
-
-Windows 9x, XP, 2000
-Linux   RedHat 7.3-9.0, Mandrake
-Mac OSX
-
-
-
-** Running jmdns from the Command Line
-
-GUI browser:
-
-  java -jar lib/jmdns.jar -browse
-
-TTY browser for a particular service type:
-
-  java -jar lib/jmdns.jar -bs _http._tcp local.
-
-Register a service:
-
-  java -jar lib/jmdns.jar -rs foobar _http._tcp local. 1234 path=index.html
-
-List service types:
-
-  java -jar lib/jmdns.jar -bt
-
-To print debugging output specify -d as the first argument.
-
-
-
-** Sample Code for Service Registration
-
-    import javax.jmdns.*;
-
-    JmDNS jmdns = new JmDNS();
-    jmdns.registerService(
-    	new ServiceInfo("_http._tcp.local.", "foo._http._tcp.local.", 1234, 0, 0, "path=index.html")
-    );
-
-
-** Sample code for Serivice Discovery
-
-    import javax.jmdns.*;
-
-    static class SampleListener implements ServiceListener
-    {
-	public void addService(JmDNS jmdns, String type, String name)
-	{
-	    System.out.println("ADD: " + jmdns.getServiceInfo(type, name));
-	}
-	public void removeService(JmDNS jmdns, String type, String name)
-	{
-	    System.out.println("REMOVE: " + name);
-	}
-	public void resolveService(JmDNS jmdns, String type, String name, ServiceInfo info)
-	{
-	    System.out.println("RESOLVED: " + info);
-	}
-    }
-
-    JmDNS jmdns = new JmDNS();
-    jmdns.addServiceListener("_http._tcp.local.", new SampleListener());
-
-
-** Changes since October 2003
-
-- Renamed package com.strangeberry.rendezvous to javax.jmdns
-- fixed unicast queries
-- fixed property handling
-- use the hostname instead of the service name is address resolution
-- Added Apache License.
-
---------------------------------------------------------------------
-The activemq-jmdns_1.0 source is derived from http://repo1.maven.org/maven2/jmdns/jmdns/1.0/jmdns-1.0-sources.jar
-
-Changes to apache activemq version:
-- renamed package javax.jmdns to org.apache.activemq.jmdns
-- removed classes with lgpl source headers, leaving only the org.apache.activemq.jmdns package.
-
diff --git a/trunk/activemq-karaf/pom.xml b/trunk/activemq-karaf/pom.xml
deleted file mode 100644
index badb8de..0000000
--- a/trunk/activemq-karaf/pom.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-karaf</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Apache Karaf</name>
-  <description>Provides resources for running ActiveMQ in Apache Karaf</description>
-
-    <dependencies>
-      <dependency>
-        <groupId>org.apache.karaf.shell</groupId>
-        <artifactId>org.apache.karaf.shell.console</artifactId>
-        <version>${karaf-version}</version>
-      </dependency>
-      <dependency>
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.core</artifactId>
-          <scope>provided</scope>
-      </dependency>
-
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-core</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-optional</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-console</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-pool</artifactId>
-        </dependency>
-
-    </dependencies>
-
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-           <execution>
-              <id>filter</id>
-              <phase>generate-resources</phase>
-              <goals>
-                <goal>resources</goal>
-              </goals>
-           </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-          <artifactId>build-helper-maven-plugin</artifactId>
-          <executions>
-            <execution>
-              <id>attach-artifacts</id>
-              <phase>package</phase>
-              <goals>
-                <goal>attach-artifact</goal>
-              </goals>
-              <configuration>
-                <artifacts>
-                  <artifact>
-                    <file>target/classes/features.xml</file>
-                     <type>xml</type>
-                     <classifier>features</classifier>
-                   </artifact>
-                  <artifact>
-                    <file>target/classes/features-2.1.xml</file>
-                     <type>xml</type>
-                     <classifier>features-2.1</classifier>
-                   </artifact>
-                 </artifacts>
-               </configuration>
-             </execution>
-         </executions>
-       </plugin>
-       <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <configuration>
-            <instructions>
-                <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                <Export-Package>org.apache.activemq.karaf.commands;version=${project.version};-split-package:=merge-first</Export-Package>
-                <Import-Package>
-                  org.apache.felix.gogo.commands,
-                  *
-                </Import-Package>
-                <Private-Package>!*</Private-Package>
-                <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
-            </instructions>
-        </configuration>
-      </plugin>       
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java b/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java
deleted file mode 100644
index 3571a5c..0000000
--- a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- *
- * 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.karaf.commands;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.felix.gogo.commands.Action;
-import org.apache.felix.gogo.commands.Argument;
-import org.apache.felix.gogo.commands.basic.AbstractCommand;
-import org.apache.felix.gogo.commands.basic.ActionPreparator;
-import org.apache.felix.gogo.commands.basic.DefaultActionPreparator;
-import org.apache.felix.service.command.CommandSession;
-import org.apache.karaf.shell.console.BlueprintContainerAware;
-import org.apache.karaf.shell.console.BundleContextAware;
-import org.apache.karaf.shell.console.CompletableFunction;
-import org.apache.karaf.shell.console.Completer;
-import org.apache.karaf.shell.console.commands.GenericType;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.blueprint.container.Converter;
-
-/**
- * Base command to process options and wrap native ActiveMQ console commands.
- */
-public class ActiveMQCommand extends AbstractCommand implements CompletableFunction
-{
-    protected BlueprintContainer blueprintContainer;
-    protected Converter blueprintConverter;
-    protected String actionId;
-    protected List<Completer> completers;
-
-    public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
-        this.blueprintContainer = blueprintContainer;
-    }
-
-    public void setBlueprintConverter(Converter blueprintConverter) {
-        this.blueprintConverter = blueprintConverter;
-    }
-
-    public void setActionId(String actionId) {
-        this.actionId = actionId;
-    }
-
-    @Override
-    public List<Completer> getCompleters() {
-        return completers;
-    }
-
-    public void setCompleters(List<Completer> completers) {
-        this.completers = completers;
-    }
-
-    @Override
-    protected ActionPreparator getPreparator() throws Exception {
-        return new ActiveMQActionPreparator();
-    }
-
-    class ActiveMQActionPreparator extends DefaultActionPreparator {
-        @Override
-        public boolean prepare(Action action, CommandSession session, List<Object> params) throws Exception
-        {
-            Map<Argument, Field> arguments = new HashMap<Argument, Field>();
-            List<Argument> orderedArguments = new ArrayList<Argument>();
-            // Introspect
-            for (Class type = action.getClass(); type != null; type = type.getSuperclass()) {
-                for (Field field : type.getDeclaredFields()) {
-                    Argument argument = field.getAnnotation(Argument.class);
-                    if (argument != null) {
-                        arguments.put(argument, field);
-                        int index = argument.index();
-                        while (orderedArguments.size() <= index) {
-                            orderedArguments.add(null);
-                        }
-                        if (orderedArguments.get(index) != null) {
-                            throw new IllegalArgumentException("Duplicate argument index: " + index);
-                        }
-                        orderedArguments.set(index, argument);
-                    }
-                }
-            }
-            // Check indexes are correct
-            for (int i = 0; i < orderedArguments.size(); i++) {
-                if (orderedArguments.get(i) == null) {
-                    throw new IllegalArgumentException("Missing argument for index: " + i);
-                }
-            }
-            // Populate
-            Map<Argument, Object> argumentValues = new HashMap<Argument, Object>();
-            int argIndex = 0;
-            for (Iterator<Object> it = params.iterator(); it.hasNext();) {
-                Object param = it.next();
-                if (argIndex >= orderedArguments.size()) {
-                    throw new IllegalArgumentException("Too many arguments specified");
-                }
-                Argument argument = orderedArguments.get(argIndex);
-                if (!argument.multiValued()) {
-                    argIndex++;
-                }
-                if (argument.multiValued()) {
-                    List<Object> l = (List<Object>) argumentValues.get(argument);
-                    if (l == null) {
-                        l = new ArrayList<Object>();
-                        argumentValues.put(argument, l);
-                    }
-                    l.add(param);
-                } else {
-                    argumentValues.put(argument, param);
-                }
-            }
-
-            for (Map.Entry<Argument, Object> entry : argumentValues.entrySet()) {
-                Field field = arguments.get(entry.getKey());
-                Object value = convert(action, session, entry.getValue(), field.getGenericType());
-                field.setAccessible(true);
-                field.set(action, value);
-            }
-            return true;
-        }
-
-        @Override
-        protected Object convert(Action action, CommandSession commandSession, Object o, Type type) throws Exception {
-            return blueprintConverter.convert(o, new GenericType(type));
-        }
-    }
-
-    @Override
-    public Action createNewAction() {
-        Action action = (Action) blueprintContainer.getComponentInstance(actionId);
-        if (action instanceof BlueprintContainerAware) {
-            ((BlueprintContainerAware) action).setBlueprintContainer(blueprintContainer);
-        }
-        if (action instanceof BundleContextAware) {
-            BundleContext context = (BundleContext) blueprintContainer.getComponentInstance("blueprintBundleContext");
-            ((BundleContextAware) action).setBundleContext(context);
-        }
-        return action;
-    }
-
-}
diff --git a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommandSupport.java b/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommandSupport.java
deleted file mode 100644
index 5eaaff6..0000000
--- a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommandSupport.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.karaf.commands;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.apache.activemq.console.command.Command;
-import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
-import org.apache.activemq.console.CommandContext;
-import org.apache.karaf.shell.console.OsgiCommandSupport;
-import org.apache.felix.gogo.commands.Argument;
-
-/**
- * @version $Rev: 960482 $ $Date: 2010-07-05 10:28:33 +0200 (Mon, 05 Jul 2010) $
- */
-public class ActiveMQCommandSupport extends OsgiCommandSupport {
-
-    private Command command;
-
-    @Argument(index=0, multiValued=true, required=true)
-    private Collection<String> arguments;
-
-    protected Object doExecute() throws Exception {
-        CommandContext context2 = new CommandContext();
-        context2.setFormatter(new CommandShellOutputFormatter(System.out));
-        Command currentCommand = command.getClass().newInstance();
-
-        try {
-            currentCommand.setCommandContext(context2);
-            currentCommand.execute(arguments != null ? new ArrayList<String>(arguments) : new ArrayList<String>());
-            return null;
-        } catch (Throwable e) {
-            Throwable cur = e;
-            while (cur.getCause() != null) {
-                cur = cur.getCause();
-            }
-            if (cur instanceof java.net.ConnectException) {
-                context2
-                    .print("\n"
-                        + "Could not connect to JMX server.  This command requires that the remote JMX server be enabled.\n"
-                        + "This is typically done by adding the following JVM arguments: \n"
-                        + "   -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false \n"
-                        + "   -Dcom.sun.management.jmxremote.ssl=false \n" + "\n"
-                        + "The connection error was: " + cur + "\n");
-            } else {
-                if (e instanceof Exception) {
-                    throw (Exception)e;
-                } else {
-                    throw new RuntimeException(e);
-                }
-
-            }
-        }
-        return null;
-
-    }
-
-    public Command getCommand() {
-        return command;
-    }
-
-    public void setCommand(Command command) {
-        this.command = command;
-    }
-
-    public static String[] toStringArray(Object args[]) {
-        String strings[] = new String[args.length];
-        for(int i = 0; i < args.length; i++) {
-            strings[i] = String.valueOf(args[i]);
-        }
-        return strings;
-    }
-}
diff --git a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java b/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java
deleted file mode 100644
index 87ce530..0000000
--- a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * 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.karaf.commands;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Scanner;
-
-import org.apache.felix.gogo.commands.Option;
-import org.apache.felix.gogo.commands.Command;
-import org.apache.karaf.shell.console.OsgiCommandSupport;
-
-/**
- * @version $Rev: 960482 $ $Date: 2010-07-05 10:28:33 +0200 (Mon, 05 Jul 2010) $
- */
- @Command(scope="activemq", name="create-broker", description="Creates a broker instance.")
-public class CreateBrokerCommand extends OsgiCommandSupport {
-    
-    @Option(name = "-n", aliases = {"--name"}, description = "The name of the broker (defaults to localhost).")
-    private String name = "localhost";
-    @Option(name = "-t", aliases = {"--type"}, description = "type of configuration to be used: spring or blueprint (defaults to spring)")
-    private String type = "spring";
-
-    /*
-     * (non-Javadoc)
-     * @see
-     * org.apache.karaf.shell.console.OsgiCommandSupport#doExecute()
-     */
-    protected Object doExecute() throws Exception {
-
-        try {
-            String name = getName();
-            File base = new File(System.getProperty("karaf.base"));
-            File deploy = new File(base, "deploy");
-
-            HashMap<String, String> props = new HashMap<String, String>();
-            props.put("${name}", name);
-
-            mkdir(deploy);
-            File configFile = new File(deploy, name + "-broker.xml");
-            
-            if (!type.equalsIgnoreCase("spring") && !type.equalsIgnoreCase("blueprint")) {
-                System.out.println("@|green Unknown type '" + type + "' Using spring by default");
-                type = "spring";
-            }
-            
-            copyFilteredResourceTo(configFile, type.toLowerCase() + ".xml", props);
-
-            System.out.println("");
-            System.out.println("Default ActiveMQ Broker (" + name + ") configuration file created at: "
-                           + configFile.getPath());
-            System.out.println("Please review the configuration and modify to suite your needs.  ");
-            System.out.println("");
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw e;
-        }
-
-        return 0;
-    }
-
-    private void copyFilteredResourceTo(File outFile, String resource, HashMap<String, String> props)
-        throws Exception {
-        if (!outFile.exists()) {
-            System.out.println("Creating file: @|green " + outFile.getPath() + "|");
-            InputStream is = CreateBrokerCommand.class.getResourceAsStream(resource);
-            try {
-                // Read it line at a time so that we can use the platform line
-                // ending when we write it out.
-                PrintStream out = new PrintStream(new FileOutputStream(outFile));
-                try {
-                    Scanner scanner = new Scanner(is);
-                    while (scanner.hasNextLine()) {
-                        String line = scanner.nextLine();
-                        line = filter(line, props);
-                        out.println(line);
-                    }
-                } finally {
-                    safeClose(out);
-                }
-            } finally {
-                safeClose(is);
-            }
-        } else {
-            System.out.println("@|red File already exists|. Move it out of the way if you want it re-created: "
-                           + outFile.getPath() + "");
-        }
-    }
-
-    private void safeClose(InputStream is) throws IOException {
-        if (is == null)
-            return;
-        try {
-            is.close();
-        } catch (Throwable ignore) {
-        }
-    }
-
-    private void safeClose(OutputStream is) throws IOException {
-        if (is == null)
-            return;
-        try {
-            is.close();
-        } catch (Throwable ignore) {
-        }
-    }
-
-    private String filter(String line, HashMap<String, String> props) {
-        for (Map.Entry<String, String> i : props.entrySet()) {
-            int p1;
-            while ((p1 = line.indexOf(i.getKey())) >= 0) {
-                String l1 = line.substring(0, p1);
-                String l2 = line.substring(p1 + i.getKey().length());
-                line = l1 + i.getValue() + l2;
-            }
-        }
-        return line;
-    }
-
-    private void mkdir(File file) {
-        if (!file.exists()) {
-            System.out.println("Creating missing directory: @|green " + file.getPath() + "|");
-            file.mkdirs();
-        }
-    }
-
-    public String getName() {
-        if (name == null) {
-            File base = new File(System.getProperty("karaf.base"));
-            name = base.getName();
-        }
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-}
diff --git a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/DestroyBrokerCommand.java b/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/DestroyBrokerCommand.java
deleted file mode 100644
index 65195a5..0000000
--- a/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/DestroyBrokerCommand.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.karaf.commands;
-
-import java.io.File;
-
-import org.apache.felix.gogo.commands.Option;
-import org.apache.felix.gogo.commands.Command;
-import org.apache.karaf.shell.console.OsgiCommandSupport;
-
-/**
- * @version $Rev: 960482 $ $Date: 2010-07-05 10:28:33 +0200 (Mon, 05 Jul 2010) $
- */
-@Command(scope="activemq", name="destroy-broker", description="Destory a broker instance.")
-public class DestroyBrokerCommand extends OsgiCommandSupport {
-
-    @Option(name = "-n", aliases = {"--name"}, description = "The name of the broker (defaults to localhost).")
-    private String name = "localhost";
-
-    protected Object doExecute() throws Exception {
-
-        try {
-            String name = getName();
-            File base = new File(System.getProperty("karaf.base"));
-            File deploy = new File(base, "deploy");
-            File configFile = new File(deploy, name + "-broker.xml");
-
-            configFile.delete();
-
-            System.out.println("");
-            System.out.println("Default ActiveMQ Broker (" + name + ") configuration file created at: "
-                           + configFile.getPath() + " removed.");
-            System.out.println("");
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw e;
-        }
-
-        return 0;
-    }
-
-    public String getName() {
-        if (name == null) {
-            File base = new File(System.getProperty("karaf.base"));
-            name = base.getName();
-        }
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}
diff --git a/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml b/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
deleted file mode 100644
index f7e66ed..0000000
--- a/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    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.
-
--->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:shell="http://karaf.apache.org/xmlns/shell/v1.0.0">
-
-    <shell:command-bundle>
-
-        <shell:command name="activemq/create-broker">
-            <shell:action class="org.apache.activemq.karaf.commands.CreateBrokerCommand"/>
-        </shell:command>
-
-        <shell:command name="activemq/destroy-broker">
-            <shell:action class="org.apache.activemq.karaf.commands.DestroyBrokerCommand"/>
-        </shell:command>
-
-    </shell:command-bundle>
-    
-    <!-- ActiveMQ List Command -->
-    <bean id="listcommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="listaction"/>
-    </bean>
-
-    <service ref="listcommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="list"/>
-        </service-properties>
-    </service>
-
-    <bean id="listaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.ListCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Query Command -->
-    <bean id="querycommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="queryaction"/>
-    </bean>
-
-    <service ref="querycommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="query"/>
-        </service-properties>
-    </service>
-
-    <bean id="queryaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.QueryCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Browse Command -->
-    <bean id="browsecommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="browseaction"/>
-    </bean>
-
-    <service ref="browsecommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="browse"/>
-        </service-properties>
-    </service>
-
-    <bean id="browseaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.AmqBrowseCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Bstat Command -->
-    <bean id="bstatcommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="bstataction"/>
-    </bean>
-
-    <service ref="bstatcommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="bstat"/>
-        </service-properties>
-    </service>
-
-    <bean id="bstataction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.BstatCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Purge Command -->
-    <bean id="purgecommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="purgeaction"/>
-    </bean>
-
-    <service ref="purgecommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="purge"/>
-        </service-properties>
-    </service>
-
-    <bean id="purgeaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.PurgeCommand"/>
-        </property>
-    </bean>
-
-</blueprint>
diff --git a/trunk/activemq-karaf/src/main/resources/features-2.1.xml b/trunk/activemq-karaf/src/main/resources/features-2.1.xml
deleted file mode 100644
index 4837d63..0000000
--- a/trunk/activemq-karaf/src/main/resources/features-2.1.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<!--
-
-    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.
-
--->
-
-<features name="activemq-${activemq-version}">
-
-    <feature name="activemq" version="${activemq-version}">
-        <bundle>mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>
-        <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle> 
-        <bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle> 
-        <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle> 
-        <bundle>mvn:commons-pool/commons-pool/${commons-pool-version}</bundle>
-        <bundle>mvn:commons-collections/commons-collections/${commons-collections-version}</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_3</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_3</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/2.0.8_3</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/1.6.2_3</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.6_1</bundle>
-        <bundle>mvn:org.apache.activemq/activemq-core/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/kahadb/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/activemq-console/${activemq-version}</bundle>
-        <bundle>mvn:org.apache.activemq/activemq-ra/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/activemq-pool/${activemq-version}</bundle>
-        <bundle>mvn:org.apache.activemq/activemq-karaf/5.4.2</bundle> <!-- use the old one for compatibility reasons -->
-        <bundle>mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/${aries-version}</bundle>
-    </feature>
-
-    <feature name="activemq-spring" version="${activemq-version}">
-        <feature version="1.2.0">spring-dm</feature>
-        <feature version="${activemq-version}">activemq</feature> 
-        <bundle>mvn:org.apache.activemq/activemq-spring/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.xbean/xbean-spring/${xbean-version}</bundle> 
-    </feature>
-
-    <feature name="activemq-blueprint" version="${activemq-version}">
-        <feature version="${activemq-version}">activemq</feature> 
-        <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.scripting-api-1.0/1.5.0</bundle>
-        <bundle>mvn:org.apache.commons/commons-jexl/2.0.1</bundle>
-        <bundle>mvn:org.apache.xbean/xbean-blueprint/${xbean-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/activemq-blueprint/${activemq-version}</bundle> 
-    </feature>
-
-    <!-- do "features:install war" before installing this one  -->
-    <feature name="activemq-web-console" version="${activemq-version}">
-        <bundle>war:mvn:org.apache.activemq/activemq-web-console/${activemq-version}/war?Webapp-Context=activemq-web-console</bundle>
-    </feature>
-</features>
diff --git a/trunk/activemq-karaf/src/main/resources/features.xml b/trunk/activemq-karaf/src/main/resources/features.xml
deleted file mode 100644
index f977bec..0000000
--- a/trunk/activemq-karaf/src/main/resources/features.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
-
-    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.
-
--->
-
-<features name="activemq-${activemq-version}">
-    <feature name="activemq" version="${activemq-version}" resolver="(obr)">
-        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>
-        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle> 
-        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle> 
-        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle> 
-        <bundle dependency="true">mvn:commons-pool/commons-pool/${commons-pool-version}</bundle>
-        <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections-version}</bundle>
-        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_3</bundle>
-        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_3</bundle>
-        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/2.0.8_3</bundle>
-        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/1.6.2_3</bundle>
-        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.6_1</bundle>
-        <bundle>mvn:org.apache.activemq/activemq-core/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/kahadb/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/activemq-console/${activemq-version}</bundle>
-        <bundle>mvn:org.apache.activemq/activemq-ra/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/activemq-pool/${activemq-version}</bundle>
-        <bundle>mvn:org.apache.activemq/activemq-karaf/${activemq-version}</bundle> 
-        <bundle>mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/${aries-version}</bundle>
-    </feature>
-
-    <feature name="activemq-spring" version="${activemq-version}" resolver="(obr)">
-        <feature version="[1,2)">spring-dm</feature> 
-        <feature version="${activemq-version}">activemq</feature> 
-        <bundle dependency="true">mvn:org.apache.xbean/xbean-spring/${xbean-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/activemq-spring/${activemq-version}</bundle> 
-    </feature>
-
-    <feature name="activemq-blueprint" version="${activemq-version}" resolver="(obr)">
-        <feature version="${activemq-version}">activemq</feature> 
-        <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.scripting-api-1.0/1.5.0</bundle>
-        <bundle dependency="true">mvn:org.apache.commons/commons-jexl/2.0.1</bundle>
-        <bundle dependency="true">mvn:org.apache.xbean/xbean-blueprint/${xbean-version}</bundle> 
-        <bundle>mvn:org.apache.activemq/activemq-blueprint/${activemq-version}</bundle> 
-    </feature>
-
-    <!-- do "features:install war" before installing this one  -->
-    <feature name="activemq-web-console" version="${activemq-version}" resolver="(obr)">
-      <feature version="[2,3)">war</feature>
-      <bundle>mvn:org.apache.activemq/activemq-web-console/${activemq-version}/war?Webapp-Context=activemq-web-console</bundle>
-    </feature>
-</features>
-
diff --git a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/AdministrationCommand.properties b/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/AdministrationCommand.properties
deleted file mode 100644
index 97bae95..0000000
--- a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/AdministrationCommand.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-##
-## 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.
-##
-
-##
-## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
-##
-
-command.description=Parent ActiveMQ administration command.
-
-command.manual=\
-  TODO: date manual
diff --git a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/CreateBrokerCommand.properties b/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/CreateBrokerCommand.properties
deleted file mode 100644
index c4c8436..0000000
--- a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/CreateBrokerCommand.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-##
-## 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.
-##
-
-##
-## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
-##
-
-command.description=Creates a broker instance.
-
-command.manual=\
-  TODO: date manual
diff --git a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/DestroyBrokerCommand.properties b/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/DestroyBrokerCommand.properties
deleted file mode 100644
index 3efb220..0000000
--- a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/DestroyBrokerCommand.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-##
-## 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.
-##
-
-##
-## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
-##
-
-command.description=Remove a broker instance.
-
-command.manual=\
-  TODO: date manual
diff --git a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/blueprint.xml b/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/blueprint.xml
deleted file mode 100644
index c231c19..0000000
--- a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/blueprint.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-<!--
-    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.
--->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
-           xmlns:amq="http://activemq.apache.org/schema/core">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <ext:property-placeholder />
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${name}" dataDirectory="${karaf.data}/activemq/${name}" useShutdownHook="false">
-
-       <!--
-            For better performances use VM cursor and small memory limit.
-            For more information, see:
-            
-            http://activemq.apache.org/message-cursors.html
-            
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-              
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
-                  <pendingSubscriberPolicy>
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                  <!-- Use VM cursor for better latency
-                       For more information, see:
-                       
-                       http://activemq.apache.org/message-cursors.html
-                       
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  -->
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy> 
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!-- 
-            Configure message persistence for the broker. The default persistence
-            mechanism is the KahaDB store (identified by the kahaDB tag). 
-            For more information, see: 
-            
-            http://activemq.apache.org/persistence.html 
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${karaf.data}/activemq/${name}/kahadb"/>
-        </persistenceAdapter>
-
-       <!--
-            The systemUsage controls the maximum amount of space the broker will 
-            use before slowing down producers. For more information, see:
-            
-            http://activemq.apache.org/producer-flow-control.html
-             
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-        -->
-
-        <!-- The transport connectors ActiveMQ will listen to -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://localhost:61616"/>
-            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
-        </transportConnectors>
-
-    </broker>
-
-    <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-
-        <property name="brokerURL" value="tcp://localhost:61616" />
-    </bean>
-
-    <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
-        <property name="maxConnections" value="8" />
-        <property name="connectionFactory" ref="activemqConnectionFactory" />
-    </bean>
-
-    <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
-          <property name="transactionManager" ref="transactionManager" />
-          <property name="connectionFactory" ref="activemqConnectionFactory" />
-          <property name="resourceName" value="activemq.${name}" />
-    </bean>
-
-    <reference id="transactionManager" interface="javax.transaction.TransactionManager" />
-
-    <service ref="pooledConnectionFactory" interface="javax.jms.ConnectionFactory">
-        <service-properties>
-            <entry key="name" value="localhost"/>
-        </service-properties>
-    </service>
-
-</blueprint>
-
diff --git a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/spring.xml b/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/spring.xml
deleted file mode 100644
index 2e99646..0000000
--- a/trunk/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/spring.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:osgi="http://www.springframework.org/schema/osgi"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-  http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${name}" dataDirectory="${karaf.data}/activemq/${name}" useShutdownHook="false">
-
-        <!--
-            For better performances use VM cursor and small memory limit.
-            For more information, see:
-            
-            http://activemq.apache.org/message-cursors.html
-            
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-              
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
-                  <pendingSubscriberPolicy>
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                  <!-- Use VM cursor for better latency
-                       For more information, see:
-                       
-                       http://activemq.apache.org/message-cursors.html
-                       
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  -->
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy> 
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!-- 
-            Configure message persistence for the broker. The default persistence
-            mechanism is the KahaDB store (identified by the kahaDB tag). 
-            For more information, see: 
-            
-            http://activemq.apache.org/persistence.html 
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${karaf.data}/activemq/${name}/kahadb"/>
-        </persistenceAdapter>
-
-       <!--
-            The systemUsage controls the maximum amount of space the broker will 
-            use before slowing down producers. For more information, see:
-            
-            http://activemq.apache.org/producer-flow-control.html
-             
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-        -->
-
-        <shutdownHooks>
-           <bean xmlns="http://www.springframework.org/schema/beans" id="hook" class="org.apache.activemq.hooks.SpringContextHook" />
-        </shutdownHooks>
-
-        <!-- The transport connectors ActiveMQ will listen to -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://localhost:61616"/>
-            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
-        </transportConnectors>
-
-    </broker>
-
-    <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-
-        <property name="brokerURL" value="tcp://localhost:61616" />
-    </bean>
-
-    <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
-        <property name="maxConnections" value="8" />
-        <property name="connectionFactory" ref="activemqConnectionFactory" />
-    </bean>
-
-    <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
-          <property name="transactionManager" ref="transactionManager" />
-          <property name="connectionFactory" ref="activemqConnectionFactory" />
-          <property name="resourceName" value="activemq.${name}" />
-    </bean>
-
-    <osgi:reference id="transactionManager" interface="javax.transaction.TransactionManager" />
-
-    <osgi:service ref="pooledConnectionFactory">
-
-        <osgi:interfaces>
-            <value>javax.jms.ConnectionFactory</value>
-        </osgi:interfaces>
-        <osgi:service-properties>
-            <entry key="name" value="${name}"/>
-        </osgi:service-properties>
-    </osgi:service>
-
-</beans>
-
-
diff --git a/trunk/activemq-openwire-generator/pom.xml b/trunk/activemq-openwire-generator/pom.xml
deleted file mode 100644
index d19f109..0000000
--- a/trunk/activemq-openwire-generator/pom.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>activemq-openwire-generator</artifactId>
-  <name>Openwire Generator</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>groovy</groupId>
-      <artifactId>gram</artifactId>
-      <version>1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>groovy</groupId>
-      <artifactId>groovy-all</artifactId>
-      <version>1.0-jsr-03</version>
-    </dependency>
-    <dependency>
-      <groupId>annogen</groupId>
-      <artifactId>annogen</artifactId>
-      <version>0.1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>ant</groupId>
-      <artifactId>ant</artifactId>
-      <version>1.6.2</version>
-    </dependency>
-  </dependencies>
-  
-  <profiles>
-    <profile>
-      <id>default-tools.jar</id>
-      <activation>
-        <property>
-          <name>java.vendor</name>
-          <value>Sun Microsystems Inc.</value>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>com.sun</groupId>
-          <artifactId>tools</artifactId>
-          <version>1.4.2</version>
-          <scope>system</scope>
-          <systemPath>${java.home}/../lib/tools.jar</systemPath>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
- 
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CGeneratorTask.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CGeneratorTask.java
deleted file mode 100644
index c503fa6..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CGeneratorTask.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.codehaus.jam.JamService;
-import org.codehaus.jam.JamServiceFactory;
-import org.codehaus.jam.JamServiceParams;
-
-/**
- * 
- */
-public class CGeneratorTask extends Task {
-
-    int version = 2;
-    File source = new File(".");
-    File target = new File(".");
-
-    public static void main(String[] args) {
-
-        Project project = new Project();
-        project.init();
-        CGeneratorTask generator = new CGeneratorTask();
-        generator.setProject(project);
-
-        if (args.length > 0) {
-            generator.version = Integer.parseInt(args[0]);
-        }
-
-        if (args.length > 1) {
-            generator.source = new File(args[1]);
-        }
-
-        if (args.length > 2) {
-            generator.target = new File(args[2]);
-        }
-
-        generator.execute();
-    }
-
-    public void execute() throws BuildException {
-        try {
-
-            String sourceDir = source + "/src/main/java";
-
-            System.out.println("Parsing source files in: " + sourceDir);
-
-            JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
-            JamServiceParams params = jamServiceFactory.createServiceParams();
-            File[] dirs = new File[] {
-                new File(sourceDir)
-            };
-            params.includeSourcePattern(dirs, "**/*.java");
-            JamService jam = jamServiceFactory.createService(params);
-
-            {
-                CHeadersGenerator script = new CHeadersGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src/libopenwire");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-            {
-                CSourcesGenerator script = new CSourcesGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src/libopenwire");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-
-        } catch (Exception e) {
-            throw new BuildException(e);
-        }
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    public File getSource() {
-        return source;
-    }
-
-    public void setSource(File basedir) {
-        this.source = basedir;
-    }
-
-    public File getTarget() {
-        return target;
-    }
-
-    public void setTarget(File target) {
-        this.target = target;
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CHeadersGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CHeadersGenerator.java
deleted file mode 100644
index e130dc7..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CHeadersGenerator.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class CHeadersGenerator extends SingleSourceGenerator {
-
-    protected String targetDir = "./src/lib/openwire";
-
-    public Object run() {
-        filePostFix = ".h";
-        if (destFile == null) {
-            destFile = new File(targetDir + "/ow_commands_v" + getOpenwireVersion() + ".h");
-        }
-        return super.run();
-    }
-
-    public String getTargetDir() {
-        return targetDir;
-    }
-
-    public void setTargetDir(String targetDir) {
-        this.targetDir = targetDir;
-    }
-
-    protected void generateLicence(PrintWriter out) {
-        out.println("/**");
-        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-        out.println(" * this work for additional information regarding copyright ownership.");
-        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-        out.println(" * (the \"License\"); you may not use this file except in compliance with");
-        out.println(" * the License.  You may obtain a copy of the License at");
-        out.println(" *");
-        out.println(" *      http://www.apache.org/licenses/LICENSE-2.0");
-        out.println(" *");
-        out.println(" * Unless required by applicable law or agreed to in writing, software");
-        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        out.println(" * See the License for the specific language governing permissions and");
-        out.println(" * limitations under the License.");
-        out.println(" */");
-    }
-
-    String changeCase(String value) {
-        StringBuffer b = new StringBuffer();
-        char[] cs = value.toCharArray();
-        for (int i = 0; i < cs.length; i++) {
-            char c = cs[i];
-            if (Character.isUpperCase((char)c)) {
-                b.append('_');
-                b.append(Character.toLowerCase((char)c));
-            } else {
-                b.append(c);
-            }
-        }
-        return b.toString();
-    }
-
-    String toPropertyCase(String value) {
-        return value.substring(0, 1).toLowerCase() + value.substring(1);
-    }
-
-    /**
-     * Sort the class list so that base classes come up first.
-     */
-    protected List<JClass> sort(List source) {
-        LinkedHashMap<JClass, JClass> rc = new LinkedHashMap<JClass, JClass>();
-        ArrayList classes = new ArrayList(source);
-        Collections.sort(classes, new Comparator() {
-            public int compare(Object o1, Object o2) {
-                JClass c1 = (JClass)o1;
-                JClass c2 = (JClass)o2;
-                return c1.getSimpleName().compareTo(c2.getSimpleName());
-            }
-        });
-
-        // lets make a map of all the class names
-        HashMap<JClass, JClass> classNames = new HashMap<JClass, JClass>();
-        for (Iterator iter = classes.iterator(); iter.hasNext();) {
-            JClass c = (JClass)iter.next();
-            classNames.put(c, c);
-        }
-
-        // Add all classes that have no parent first
-        for (Iterator iter = classes.iterator(); iter.hasNext();) {
-            JClass c = (JClass)iter.next();
-            if (!classNames.containsKey(c.getSuperclass())) {
-                rc.put(c, c);
-            }
-        }
-
-        // now lets add the rest
-        for (Iterator iter = classes.iterator(); iter.hasNext();) {
-            JClass c = (JClass)iter.next();
-            if (!rc.containsKey(c)) {
-                rc.put(c, c);
-            }
-        }
-
-        return new ArrayList<JClass>(rc.keySet());
-    }
-
-    void generateFields(PrintWriter out, JClass jclass) {
-
-        if (jclass.getSuperclass() == null || jclass.getSuperclass().getSimpleName().equals("Object")) {
-            out.println("");
-            out.println("   ow_byte structType;");
-        } else {
-            generateFields(out, jclass.getSuperclass());
-        }
-
-        ArrayList<JProperty> properties = new ArrayList<JProperty>();
-        jclass.getDeclaredProperties();
-        for (int i = 0; i < jclass.getDeclaredProperties().length; i++) {
-            JProperty p = jclass.getDeclaredProperties()[i];
-            if (isValidProperty(p)) {
-                properties.add(p);
-            }
-        }
-        for (Iterator<JProperty> iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = iter.next();
-            JAnnotation annotation = property.getGetter().getAnnotation("openwire:property");
-//            JAnnotationValue size = annotation.getValue("size");
-            String name = toPropertyCase(property.getSimpleName());
-//            boolean cached = isCachedProperty(property);
-
-            String type = property.getType().getQualifiedName();
-            if (type.equals("boolean")) {
-                out.println("   ow_" + type + " " + name + ";");
-            } else if (type.equals("byte")) {
-                out.println("   ow_" + type + " " + name + ";");
-            } else if (type.equals("char")) {
-                out.println("   ow_" + type + " " + name + ";");
-            } else if (type.equals("short")) {
-                out.println("   ow_" + type + " " + name + ";");
-            } else if (type.equals("int")) {
-                out.println("   ow_" + type + " " + name + ";");
-            } else if (type.equals("long")) {
-                out.println("   ow_" + type + " " + name + ";");
-            } else if (type.equals("byte[]")) {
-                out.println("   ow_byte_array *" + name + ";");
-            } else if (type.equals("org.apache.activeio.packet.ByteSequence")) {
-                out.println("   ow_byte_array *" + name + ";");
-            } else if (type.equals("org.apache.activeio.packet.ByteSequence")) {
-                out.println("   ow_byte_array *" + name + ";");
-            } else if (type.equals("java.lang.String")) {
-                out.println("   ow_string *" + name + ";");
-            } else {
-                if (property.getType().isArrayType()) {
-                    out.println("   ow_DataStructure_array *" + name + ";");
-                } else if (isThrowable(property.getType())) {
-                    out.println("   ow_throwable *" + name + ";");
-                } else {
-                    out.println("   struct ow_" + property.getType().getSimpleName() + " *" + name + ";");
-                }
-            }
-        }
-    }
-
-    protected void generateSetup(PrintWriter out) {
-        generateLicence(out);
-        out.println("");
-        out.println("/*****************************************************************************************");
-        out.println(" *  ");
-        out.println(" * NOTE!: This file is auto generated - do not modify!");
-        out.println(" *        if you need to make a change, please see the modify the groovy scripts in the");
-        out.println(" *        under src/gram/script and then use maven openwire:generate to regenerate ");
-        out.println(" *        this file.");
-        out.println(" *  ");
-        out.println(" *****************************************************************************************/");
-        out.println(" ");
-        out.println("#ifndef OW_COMMANDS_V" + openwireVersion + "_H");
-        out.println("#define OW_COMMANDS_V" + openwireVersion + "_H");
-        out.println("");
-        out.println("#include \"ow.h\"");
-        out.println("");
-        out.println("#ifdef __cplusplus");
-        out.println("extern \"C\" {");
-        out.println("#endif /* __cplusplus */");
-        out.println("      ");
-        out.println("#define OW_WIREFORMAT_VERSION " + openwireVersion + "");
-
-        out.println("#define OW_WIREFORMAT_STACK_TRACE_MASK     0x00000001;");
-        out.println("#define OW_WIREFORMAT_TCP_NO_DELAY_MASK    0x00000002;");
-        out.println("#define OW_WIREFORMAT_CACHE_MASK           0x00000004;");
-        out.println("#define OW_WIREFORMAT_COMPRESSION_MASK     0x00000008;");
-
-        for (Iterator iterator = sortedClasses.iterator(); iterator.hasNext();) {
-            JClass jclass = (JClass)iterator.next();
-            String name = jclass.getSimpleName();
-            String type = ("ow_" + name).toUpperCase() + "_TYPE";
-            if (!isAbstract(jclass)) {
-                out.println("#define " + type + " " + getOpenWireOpCode(jclass));
-            }
-        }
-
-        out.println("      ");
-        out.println("apr_status_t ow_bitmarshall(ow_bit_buffer *buffer, ow_DataStructure *object);");
-        out.println("apr_status_t ow_marshall(ow_byte_buffer *buffer, ow_DataStructure *object);");
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-
-        String structName = jclass.getSimpleName();
-
-        out.println("");
-        out.println("typedef struct ow_" + structName + " {");
-
-        // This recusivly generates the field definitions of the class and it's
-        // supper classes.
-        generateFields(out, jclass);
-
-        out.println("");
-        out.println("} ow_" + structName + ";");
-        out.println("ow_" + structName + " *ow_" + structName + "_create(apr_pool_t *pool);");
-        out.println("ow_boolean ow_is_a_" + structName + "(ow_DataStructure *object);");
-
-    }
-
-    protected void generateTearDown(PrintWriter out) {
-        out.println("");
-        out.println("#ifdef __cplusplus");
-        out.println("}");
-        out.println("#endif");
-        out.println("");
-        out.println("#endif  /* ! OW_COMMANDS_V" + openwireVersion + "_H */");
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java
deleted file mode 100644
index a596084..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class CSharpClassesGenerator extends MultiSourceGenerator {
-
-    protected String targetDir = "./src/main/csharp";
-
-    public Object run() {
-        filePostFix = ".cs";
-        if (destDir == null) {
-            destDir = new File(targetDir + "/ActiveMQ/Commands");
-        }
-        return super.run();
-    }
-
-    public String makeHashCodeBody() throws Exception {
-        if (simpleName.endsWith("Id")) {
-            StringWriter buffer = new StringWriter();
-            PrintWriter out = new PrintWriter(buffer);
-            out.println("            int answer = 0;");
-            Iterator iter = getProperties().iterator();
-            while (iter.hasNext()) {
-                JProperty property = (JProperty)iter.next();
-                out.println("            answer = (answer * 37) + HashCode(" + property.getSimpleName() + ");");
-            }
-            out.println("            return answer;");
-            return buffer.toString();
-        }
-        return null;
-    }
-
-    public String makeEqualsBody() throws Exception {
-        if (simpleName.endsWith("Id")) {
-            StringWriter buffer = new StringWriter();
-            PrintWriter out = new PrintWriter(buffer);
-
-            Iterator iter = getProperties().iterator();
-            while (iter.hasNext()) {
-                JProperty property = (JProperty)iter.next();
-                String name = property.getSimpleName();
-                out.println("            if (! Equals(this." + name + ", that." + name + ")) return false;");
-            }
-            out.println("            return true;");
-            return buffer.toString();
-        }
-        return null;
-    }
-
-    public String makeToStringBody() throws Exception {
-        StringWriter buffer = new StringWriter();
-        PrintWriter out = new PrintWriter(buffer);
-        out.println("            return GetType().Name + \"[\"");
-        Iterator iter = getProperties().iterator();
-        while (iter.hasNext()) {
-            JProperty property = (JProperty)iter.next();
-            String name = property.getSimpleName();
-            out.println("                + \" " + name + "=\" + " + name);
-        }
-        out.println("                + \" ]\";");
-        return buffer.toString();
-    }
-
-    private void generateLicence(PrintWriter out) {
-        out.println("/*");
-        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-        out.println(" * this work for additional information regarding copyright ownership.");
-        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-        out.println(" * (the \"License\"); you may not use this file except in compliance with");
-        out.println(" * the License.  You may obtain a copy of the License at");
-        out.println(" *");
-        out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
-        out.println(" *");
-        out.println(" * Unless required by applicable law or agreed to in writing, software");
-        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        out.println(" * See the License for the specific language governing permissions and");
-        out.println(" * limitations under the License.");
-        out.println(" */");
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-        generateLicence(out);
-
-        out.println("//");
-        out.println("//  NOTE!: This file is autogenerated - do not modify!");
-        out.println("//         if you need to make a change, please see the Groovy scripts in the");
-        out.println("//         activemq-core module");
-        out.println("//");
-        out.println("");
-        out.println("using System;");
-        out.println("using System.Collections;");
-        out.println("");
-        out.println("using ActiveMQ.OpenWire;");
-        out.println("using ActiveMQ.Commands;");
-        out.println("");
-        out.println("namespace ActiveMQ.Commands");
-        out.println("{");
-        out.println("    /// <summary>");
-        out.println("    ///  The ActiveMQ " + jclass.getSimpleName() + " Command");
-        out.println("    /// </summary>");
-        out.print("    public class " + jclass.getSimpleName() + " : " + baseClass);
-
-        for (int i = 0; i < jclass.getInterfaces().length; i++) {
-            JClass intf = jclass.getInterfaces()[i];
-            out.print(", " + intf.getSimpleName());
-        }
-
-        out.println("");
-        out.println("    {");
-        out.println("        public const byte ID_" + jclass.getSimpleName() + " = " + getOpenWireOpCode(jclass) + ";");
-        out.println("                ");
-
-        List properties = getProperties();
-        String type;
-        Object name;
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            type = toCSharpType(property.getType());
-            name = decapitalize(property.getSimpleName());
-            out.println("        " + type + " " + name + ";");
-        }
-
-        String text = makeHashCodeBody();
-        if (text != null) {
-            out.println("");
-            out.println("        public override int GetHashCode() {");
-            out.println("" + text + "");
-            out.println("        }");
-        }
-
-        text = makeEqualsBody();
-        if (text != null) {
-            out.println("");
-            out.println("        public override bool Equals(object that) {");
-            out.println("            if (that is " + className + ") {");
-            out.println("                return Equals((" + className + ") that);");
-            out.println("            }");
-            out.println("            return false;");
-            out.println("        }");
-            out.println("");
-            out.println("        public virtual bool Equals(" + className + " that) {");
-            out.println("" + text + "");
-            out.println("        }");
-        }
-
-        text = makeToStringBody();
-        if (text != null) {
-            out.println("");
-            out.println("        public override string ToString() {");
-            out.println("" + text + "");
-            out.println("        }");
-        }
-
-        out.println("");
-        out.println("        public override byte GetDataStructureType() {");
-        out.println("            return ID_" + jclass.getSimpleName() + ";");
-        out.println("        }");
-        out.println("");
-        out.println("");
-        out.println("        // Properties");
-
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            type = toCSharpType(property.getType());
-            name = decapitalize(property.getSimpleName());
-            String propertyName = property.getSimpleName();
-
-            out.println("");
-            out.println("        public " + type + " " + propertyName + "");
-            out.println("        {");
-            out.println("            get { return " + name + "; }");
-            out.println("            set { this." + name + " = value; }            ");
-            out.println("        }");
-        }
-
-        out.println("");
-        out.println("    }");
-        out.println("}");
-    }
-
-    public String getTargetDir() {
-        return targetDir;
-    }
-
-    public void setTargetDir(String targetDir) {
-        this.targetDir = targetDir;
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java
deleted file mode 100644
index 5341f61..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.codehaus.jam.JamService;
-import org.codehaus.jam.JamServiceFactory;
-import org.codehaus.jam.JamServiceParams;
-
-/**
- * 
- */
-public class CSharpGeneratorTask extends Task {
-
-    int version = 2;
-    File source = new File(".");
-    File target = new File(".");
-
-    public static void main(String[] args) {
-
-        Project project = new Project();
-        project.init();
-        CSharpGeneratorTask generator = new CSharpGeneratorTask();
-        generator.setProject(project);
-
-        if (args.length > 0) {
-            generator.version = Integer.parseInt(args[0]);
-        }
-
-        if (args.length > 1) {
-            generator.source = new File(args[1]);
-        }
-
-        if (args.length > 2) {
-            generator.target = new File(args[2]);
-        }
-
-        generator.execute();
-    }
-
-    public void execute() throws BuildException {
-        try {
-
-            String sourceDir = source + "/src/main/java";
-
-            System.out.println("Parsing source files in: " + sourceDir);
-
-            JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
-            JamServiceParams params = jamServiceFactory.createServiceParams();
-            File[] dirs = new File[] {
-                new File(sourceDir)
-            };
-            params.includeSourcePattern(dirs, "**/*.java");
-            JamService jam = jamServiceFactory.createService(params);
-
-            {
-                CSharpClassesGenerator script = new CSharpClassesGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src/main/csharp");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-            {
-                CSharpMarshallingGenerator script = new CSharpMarshallingGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src/main/csharp");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-
-        } catch (Exception e) {
-            throw new BuildException(e);
-        }
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    public File getSource() {
-        return source;
-    }
-
-    public void setSource(File basedir) {
-        this.source = basedir;
-    }
-
-    public File getTarget() {
-        return target;
-    }
-
-    public void setTarget(File target) {
-        this.target = target;
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java
deleted file mode 100644
index f884a43..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java
+++ /dev/null
@@ -1,581 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class CSharpMarshallingGenerator extends JavaMarshallingGenerator {
-
-    protected String targetDir = "./src/main/csharp";
-
-    public Object run() {
-        filePostFix = ".cs";
-        if (destDir == null) {
-            destDir = new File(targetDir + "/ActiveMQ/OpenWire/V" + getOpenwireVersion());
-        }
-        return super.run();
-    }
-
-    // ////////////////////////////////////////////////////////////////////////////////////
-    // This section is for the tight wire format encoding generator
-    // ////////////////////////////////////////////////////////////////////////////////////
-
-    protected void generateTightUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-
-        String propertyName = property.getSimpleName();
-        String type = property.getType().getSimpleName();
-
-        if (type.equals("boolean")) {
-            out.println("        info." + propertyName + " = bs.ReadBoolean();");
-        } else if (type.equals("byte")) {
-            out.println("        info." + propertyName + " = dataIn.ReadByte();");
-        } else if (type.equals("char")) {
-            out.println("        info." + propertyName + " = dataIn.ReadChar();");
-        } else if (type.equals("short")) {
-            out.println("        info." + propertyName + " = dataIn.ReadInt16();");
-        } else if (type.equals("int")) {
-            out.println("        info." + propertyName + " = dataIn.ReadInt32();");
-        } else if (type.equals("long")) {
-            out.println("        info." + propertyName + " = TightUnmarshalLong(wireFormat, dataIn, bs);");
-        } else if (type.equals("String")) {
-            out.println("        info." + propertyName + " = TightUnmarshalString(dataIn, bs);");
-        } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-            if (size != null) {
-                out.println("        info." + propertyName + " = ReadBytes(dataIn, " + size.asInt() + ");");
-            } else {
-                out.println("        info." + propertyName + " = ReadBytes(dataIn, bs.ReadBoolean());");
-            }
-        } else if (isThrowable(property.getType())) {
-            out.println("        info." + propertyName + " = TightUnmarshalBrokerError(wireFormat, dataIn, bs);");
-        } else if (isCachedProperty(property)) {
-            out.println("        info." + propertyName + " = (" + type + ") TightUnmarshalCachedObject(wireFormat, dataIn, bs);");
-        } else {
-            out.println("        info." + propertyName + " = (" + type + ") TightUnmarshalNestedObject(wireFormat, dataIn, bs);");
-        }
-    }
-
-    protected void generateTightUnmarshalBodyForArrayProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        JClass propertyType = property.getType();
-        String arrayType = propertyType.getArrayComponentType().getSimpleName();
-        String propertyName = property.getSimpleName();
-        out.println();
-        if (size != null) {
-            out.println("        {");
-            out.println("            " + arrayType + "[] value = new " + arrayType + "[" + size.asInt() + "];");
-            out.println("            " + "for( int i=0; i < " + size.asInt() + "; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") TightUnmarshalNestedObject(wireFormat,dataIn, bs);");
-            out.println("            }");
-            out.println("            info." + propertyName + " = value;");
-            out.println("        }");
-        } else {
-            out.println("        if (bs.ReadBoolean()) {");
-            out.println("            short size = dataIn.ReadInt16();");
-            out.println("            " + arrayType + "[] value = new " + arrayType + "[size];");
-            out.println("            for( int i=0; i < size; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") TightUnmarshalNestedObject(wireFormat,dataIn, bs);");
-            out.println("            }");
-            out.println("            info." + propertyName + " = value;");
-            out.println("        }");
-            out.println("        else {");
-            out.println("            info." + propertyName + " = null;");
-            out.println("        }");
-        }
-    }
-
-    protected int generateTightMarshal1Body(PrintWriter out) {
-        List properties = getProperties();
-        int baseSize = 0;
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getSimpleName();
-
-            if (type.equals("boolean")) {
-                out.println("        bs.WriteBoolean(" + getter + ");");
-            } else if (type.equals("byte")) {
-                baseSize += 1;
-            } else if (type.equals("char")) {
-                baseSize += 2;
-            } else if (type.equals("short")) {
-                baseSize += 2;
-            } else if (type.equals("int")) {
-                baseSize += 4;
-            } else if (type.equals("long")) {
-                out.println("        rc += TightMarshalLong1(wireFormat, " + getter + ", bs);");
-            } else if (type.equals("String")) {
-                out.print("");
-                out.println("        rc += TightMarshalString1(" + getter + ", bs);");
-            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-                if (size == null) {
-                    out.println("        bs.WriteBoolean(" + getter + "!=null);");
-                    out.println("        rc += " + getter + "==null ? 0 : " + getter + ".Length+4;");
-                } else {
-                    baseSize += size.asInt();
-                }
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("        rc += TightMarshalObjectArrayConstSize1(wireFormat, " + getter + ", bs, " + size.asInt() + ");");
-                } else {
-                    out.println("        rc += TightMarshalObjectArray1(wireFormat, " + getter + ", bs);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("        rc += TightMarshalBrokerError1(wireFormat, " + getter + ", bs);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("        rc += TightMarshalCachedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
-                } else {
-                    out.println("        rc += TightMarshalNestedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
-                }
-            }
-        }
-        return baseSize;
-    }
-
-    protected void generateTightMarshal2Body(PrintWriter out) {
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getSimpleName();
-
-            if (type.equals("boolean")) {
-                out.println("        bs.ReadBoolean();");
-            } else if (type.equals("byte")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("char")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("short")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("int")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("long")) {
-                out.println("        TightMarshalLong2(wireFormat, " + getter + ", dataOut, bs);");
-            } else if (type.equals("String")) {
-                out.println("        TightMarshalString2(" + getter + ", dataOut, bs);");
-            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-                if (size != null) {
-                    out.println("        dataOut.Write(" + getter + ", 0, " + size.asInt() + ");");
-                } else {
-                    out.println("        if(bs.ReadBoolean()) {");
-                    out.println("           dataOut.Write(" + getter + ".Length);");
-                    out.println("           dataOut.Write(" + getter + ");");
-                    out.println("        }");
-                }
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("        TightMarshalObjectArrayConstSize2(wireFormat, " + getter + ", dataOut, bs, " + size.asInt() + ");");
-                } else {
-                    out.println("        TightMarshalObjectArray2(wireFormat, " + getter + ", dataOut, bs);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("        TightMarshalBrokerError2(wireFormat, " + getter + ", dataOut, bs);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("        TightMarshalCachedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
-                } else {
-                    out.println("        TightMarshalNestedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
-                }
-            }
-        }
-    }
-
-    // ////////////////////////////////////////////////////////////////////////////////////
-    // This section is for the loose wire format encoding generator
-    // ////////////////////////////////////////////////////////////////////////////////////
-
-    protected void generateLooseUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-
-        String propertyName = property.getSimpleName();
-        String type = property.getType().getSimpleName();
-
-        if (type.equals("boolean")) {
-            out.println("        info." + propertyName + " = dataIn.ReadBoolean();");
-        } else if (type.equals("byte")) {
-            out.println("        info." + propertyName + " = dataIn.ReadByte();");
-        } else if (type.equals("char")) {
-            out.println("        info." + propertyName + " = dataIn.ReadChar();");
-        } else if (type.equals("short")) {
-            out.println("        info." + propertyName + " = dataIn.ReadInt16();");
-        } else if (type.equals("int")) {
-            out.println("        info." + propertyName + " = dataIn.ReadInt32();");
-        } else if (type.equals("long")) {
-            out.println("        info." + propertyName + " = LooseUnmarshalLong(wireFormat, dataIn);");
-        } else if (type.equals("String")) {
-            out.println("        info." + propertyName + " = LooseUnmarshalString(dataIn);");
-        } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-            if (size != null) {
-                out.println("        info." + propertyName + " = ReadBytes(dataIn, " + size.asInt() + ");");
-            } else {
-                out.println("        info." + propertyName + " = ReadBytes(dataIn, dataIn.ReadBoolean());");
-            }
-        } else if (isThrowable(property.getType())) {
-            out.println("        info." + propertyName + " = LooseUnmarshalBrokerError(wireFormat, dataIn);");
-        } else if (isCachedProperty(property)) {
-            out.println("        info." + propertyName + " = (" + type + ") LooseUnmarshalCachedObject(wireFormat, dataIn);");
-        } else {
-            out.println("        info." + propertyName + " = (" + type + ") LooseUnmarshalNestedObject(wireFormat, dataIn);");
-        }
-    }
-
-    protected void generateLooseUnmarshalBodyForArrayProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        JClass propertyType = property.getType();
-        String arrayType = propertyType.getArrayComponentType().getSimpleName();
-        String propertyName = property.getSimpleName();
-        out.println();
-        if (size != null) {
-            out.println("        {");
-            out.println("            " + arrayType + "[] value = new " + arrayType + "[" + size.asInt() + "];");
-            out.println("            " + "for( int i=0; i < " + size.asInt() + "; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") LooseUnmarshalNestedObject(wireFormat,dataIn);");
-            out.println("            }");
-            out.println("            info." + propertyName + " = value;");
-            out.println("        }");
-        } else {
-            out.println("        if (dataIn.ReadBoolean()) {");
-            out.println("            short size = dataIn.ReadInt16();");
-            out.println("            " + arrayType + "[] value = new " + arrayType + "[size];");
-            out.println("            for( int i=0; i < size; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") LooseUnmarshalNestedObject(wireFormat,dataIn);");
-            out.println("            }");
-            out.println("            info." + propertyName + " = value;");
-            out.println("        }");
-            out.println("        else {");
-            out.println("            info." + propertyName + " = null;");
-            out.println("        }");
-        }
-    }
-
-    protected void generateLooseMarshalBody(PrintWriter out) {
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getSimpleName();
-
-            if (type.equals("boolean")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("byte")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("char")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("short")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("int")) {
-                out.println("        dataOut.Write(" + getter + ");");
-            } else if (type.equals("long")) {
-                out.println("        LooseMarshalLong(wireFormat, " + getter + ", dataOut);");
-            } else if (type.equals("String")) {
-                out.println("        LooseMarshalString(" + getter + ", dataOut);");
-            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-                if (size != null) {
-                    out.println("        dataOut.Write(" + getter + ", 0, " + size.asInt() + ");");
-                } else {
-                    out.println("        dataOut.Write(" + getter + "!=null);");
-                    out.println("        if(" + getter + "!=null) {");
-                    out.println("           dataOut.Write(" + getter + ".Length);");
-                    out.println("           dataOut.Write(" + getter + ");");
-                    out.println("        }");
-                }
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("        LooseMarshalObjectArrayConstSize(wireFormat, " + getter + ", dataOut, " + size.asInt() + ");");
-                } else {
-                    out.println("        LooseMarshalObjectArray(wireFormat, " + getter + ", dataOut);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("        LooseMarshalBrokerError(wireFormat, " + getter + ", dataOut);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("        LooseMarshalCachedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
-                } else {
-                    out.println("        LooseMarshalNestedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
-                }
-            }
-        }
-    }
-
-    public String getTargetDir() {
-        return targetDir;
-    }
-
-    public void setTargetDir(String targetDir) {
-        this.targetDir = targetDir;
-    }
-
-    private void generateLicence(PrintWriter out) {
-        out.println("/**");
-        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-        out.println(" * this work for additional information regarding copyright ownership.");
-        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-        out.println(" * (the \"License\"); you may not use this file except in compliance with");
-        out.println(" * the License.  You may obtain a copy of the License at");
-        out.println(" *");
-        out.println(" *      http://www.apache.org/licenses/LICENSE-2.0");
-        out.println(" *");
-        out.println(" * Unless required by applicable law or agreed to in writing, software");
-        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        out.println(" * See the License for the specific language governing permissions and");
-        out.println(" * limitations under the License.");
-        out.println(" */");
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-        generateLicence(out);
-        out.println("");
-        out.println("//");
-        out.println("// NOTE!: This file is autogenerated - do not modify!");
-        out.println("//        if you need to make a change, please see the Groovy scripts in the");
-        out.println("//        activemq-core module");
-        out.println("//");
-        out.println("");
-        out.println("using System;");
-        out.println("using System.Collections;");
-        out.println("using System.IO;");
-        out.println("");
-        out.println("using ActiveMQ.Commands;");
-        out.println("using ActiveMQ.OpenWire;");
-        out.println("using ActiveMQ.OpenWire.V" + getOpenwireVersion() + ";");
-        out.println("");
-        out.println("namespace ActiveMQ.OpenWire.V" + getOpenwireVersion() + "");
-        out.println("{");
-        out.println("  /// <summary>");
-        out.println("  ///  Marshalling code for Open Wire Format for " + jclass.getSimpleName() + "");
-        out.println("  /// </summary>");
-        out.println("  " + getAbstractClassText() + "class " + getClassName() + " : " + getBaseClass() + "");
-        out.println("  {");
-
-        if (!isAbstractClass()) {
-            out.println("");
-            out.println("");
-            out.println("    public override DataStructure CreateObject() ");
-            out.println("    {");
-            out.println("        return new " + jclass.getSimpleName() + "();");
-            out.println("    }");
-            out.println("");
-            out.println("    public override byte GetDataStructureType() ");
-            out.println("    {");
-            out.println("        return " + jclass.getSimpleName() + ".ID_" + jclass.getSimpleName() + ";");
-            out.println("    }");
-        }
-
-        /*
-         * Generate the tight encoding marshallers
-         */
-        out.println("");
-        out.println("    // ");
-        out.println("    // Un-marshal an object instance from the data input stream");
-        out.println("    // ");
-        out.println("    public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) ");
-        out.println("    {");
-        out.println("        base.TightUnmarshal(wireFormat, o, dataIn, bs);");
-
-        if (!getProperties().isEmpty() || isMarshallerAware()) {
-            out.println("");
-            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
-        }
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.BeforeUnmarshall(wireFormat);");
-            out.println("");
-        }
-
-        generateTightUnmarshalBody(out);
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.AfterUnmarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("    }");
-        out.println("");
-        out.println("    //");
-        out.println("    // Write the booleans that this object uses to a BooleanStream");
-        out.println("    //");
-        out.println("    public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {");
-        out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.BeforeMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("        int rc = base.TightMarshal1(wireFormat, info, bs);");
-
-        int baseSize = generateTightMarshal1Body(out);
-
-        out.println("");
-        out.println("        return rc + " + baseSize + ";");
-        out.println("    }");
-        out.println("");
-        out.println("    // ");
-        out.println("    // Write a object instance to data output stream");
-        out.println("    //");
-        out.println("    public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {");
-        out.println("        base.TightMarshal2(wireFormat, o, dataOut, bs);");
-
-        if (!getProperties().isEmpty() || isMarshallerAware()) {
-            out.println("");
-            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
-        }
-
-        generateTightMarshal2Body(out);
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.AfterMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("    }");
-
-        out.println("");
-        out.println("    // ");
-        out.println("    // Un-marshal an object instance from the data input stream");
-        out.println("    // ");
-        out.println("    public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) ");
-        out.println("    {");
-        out.println("        base.LooseUnmarshal(wireFormat, o, dataIn);");
-
-        if (!getProperties().isEmpty() || isMarshallerAware()) {
-            out.println("");
-            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
-        }
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.BeforeUnmarshall(wireFormat);");
-            out.println("");
-        }
-
-        generateLooseUnmarshalBody(out);
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.AfterUnmarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("    }");
-        out.println("");
-        out.println("    // ");
-        out.println("    // Write a object instance to data output stream");
-        out.println("    //");
-        out.println("    public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) {");
-
-        if (!getProperties().isEmpty() || isMarshallerAware()) {
-            out.println("");
-            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
-        }
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.BeforeMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("        base.LooseMarshal(wireFormat, o, dataOut);");
-
-        generateLooseMarshalBody(out);
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.AfterMarshall(wireFormat);");
-        }
-        out.println("");
-        out.println("    }");
-        out.println("  }");
-        out.println("}");
-
-    }
-
-    public void generateFactory(PrintWriter out) {
-        generateLicence(out);
-        out.println("");
-        out.println("//");
-        out.println("// NOTE!: This file is autogenerated - do not modify!");
-        out.println("//        if you need to make a change, please see the Groovy scripts in the");
-        out.println("//        activemq-core module");
-        out.println("//");
-        out.println("");
-        out.println("using System;");
-        out.println("using System.Collections;");
-        out.println("using System.IO;");
-        out.println("");
-        out.println("using ActiveMQ.Commands;");
-        out.println("using ActiveMQ.OpenWire;");
-        out.println("using ActiveMQ.OpenWire.V" + getOpenwireVersion() + ";");
-        out.println("");
-        out.println("namespace ActiveMQ.OpenWire.V" + getOpenwireVersion() + "");
-        out.println("{");
-        out.println("    /// <summary>");
-        out.println("    /// Used to create marshallers for a specific version of the wire protocol");
-        out.println("    /// </summary>");
-        out.println("    public class MarshallerFactory : IMarshallerFactory");
-        out.println("    {");
-        out.println("        public void configure(OpenWireFormat format) ");
-        out.println("        {");
-        out.println("            format.clearMarshallers();");
-
-        List list = new ArrayList(getConcreteClasses());
-        Collections.sort(list, new Comparator() {
-            public int compare(Object o1, Object o2) {
-                JClass c1 = (JClass)o1;
-                JClass c2 = (JClass)o2;
-                return c1.getSimpleName().compareTo(c2.getSimpleName());
-            }
-        });
-
-        for (Iterator iter = list.iterator(); iter.hasNext();) {
-            JClass jclass = (JClass)iter.next();
-            out.println("            format.addMarshaller(new " + jclass.getSimpleName() + "Marshaller());");
-        }
-
-        out.println("");
-        out.println("        }");
-        out.println("    }");
-        out.println("}");
-
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSourcesGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSourcesGenerator.java
deleted file mode 100644
index 8f02d3e..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSourcesGenerator.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class CSourcesGenerator extends CHeadersGenerator {
-
-    public Object run() {
-        filePostFix = ".c";
-        if (destFile == null) {
-            destFile = new File(targetDir + "/ow_commands_v" + getOpenwireVersion() + ".c");
-        }
-        return super.run();
-    }
-
-    protected List sort(List source) {
-        return source;
-    }
-
-    protected void generateSetup(PrintWriter out) {
-        generateLicence(out);
-        out.println("");
-        out.println("/*****************************************************************************************");
-        out.println(" *  ");
-        out.println(" * NOTE!: This file is auto generated - do not modify!");
-        out.println(" *        if you need to make a change, please see the modify the groovy scripts in the");
-        out.println(" *        under src/gram/script and then use maven openwire:generate to regenerate ");
-        out.println(" *        this file.");
-        out.println(" *  ");
-        out.println(" *****************************************************************************************/");
-        out.println("");
-        out.println("");
-        out.println("#include \"ow_commands_v" + openwireVersion + ".h\"");
-        out.println("");
-        out.println("#define SUCCESS_CHECK( f ) { apr_status_t rc=f; if(rc!=APR_SUCCESS) return rc; }");
-        out.println("");
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-
-        ArrayList<JProperty> properties = new ArrayList<JProperty>();
-        jclass.getDeclaredProperties();
-        for (int i = 0; i < jclass.getDeclaredProperties().length; i++) {
-            JProperty p = jclass.getDeclaredProperties()[i];
-            if (isValidProperty(p)) {
-                properties.add(p);
-            }
-        }
-
-        String name = jclass.getSimpleName();
-        String type = ("ow_" + name).toUpperCase() + "_TYPE";
-        String baseName = "DataStructure";
-        JClass superclass = jclass.getSuperclass();
-        while (superclass.getSuperclass() != null) {
-            if (sortedClasses.contains(superclass)) {
-                baseName = superclass.getSimpleName();
-                break;
-            } else {
-                superclass = superclass.getSuperclass();
-            }
-        }
-
-        out.println("ow_boolean ow_is_a_" + name + "(ow_DataStructure *object) {");
-        out.println("   if( object == 0 )");
-        out.println("      return 0;");
-        out.println("      ");
-        out.println("   switch(object->structType) {");
-
-        for (Iterator iterator = sortedClasses.iterator(); iterator.hasNext();) {
-            JClass sub = (JClass)iterator.next();
-            String subtype = "OW_" + sub.getSimpleName().toUpperCase() + "_TYPE";
-            if (jclass.isAssignableFrom(sub) && !isAbstract(sub)) {
-                out.println("");
-                out.println("   case " + subtype + ":");
-            }
-        }
-        out.println("");
-        out.println("      return 1;");
-        out.println("   }");
-        out.println("   return 0;");
-        out.println("}");
-
-        if (!isAbstract(jclass)) {
-            out.println("");
-            out.println("");
-            out.println("ow_" + name + " *ow_" + name + "_create(apr_pool_t *pool) ");
-            out.println("{");
-            out.println("   ow_" + name + " *value = apr_pcalloc(pool,sizeof(ow_" + name + "));");
-            out.println("   if( value!=0 ) {");
-            out.println("      ((ow_DataStructure*)value)->structType = " + type + ";");
-            out.println("   }");
-            out.println("   return value;");
-            out.println("}");
-        }
-
-        out.println("");
-        out.println("");
-        out.println("apr_status_t ow_marshal1_" + name + "(ow_bit_buffer *buffer, ow_" + name + " *object)");
-        out.println("{");
-        out.println("   ow_marshal1_" + baseName + "(buffer, (ow_" + baseName + "*)object);");
-
-        for (Iterator<JProperty> iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = iter.next();
-            String propname = toPropertyCase(property.getSimpleName());
-            boolean cached = isCachedProperty(property);
-            JAnnotation annotation = property.getGetter().getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-
-            type = property.getType().getQualifiedName();
-            if (type.equals("boolean")) {
-                out.println("   ow_bit_buffer_append(buffer, object->" + propname + ");");
-            } else if (type.equals("byte")) {
-            } else if (type.equals("char")) {
-            } else if (type.equals("short")) {
-            } else if (type.equals("int")) {
-            } else if (type.equals("long")) {
-                out.println("   ow_marshal1_long(buffer, object->" + propname + ");");
-            } else if (type.equals("byte[]")) {
-                if (size == null) {
-                    out.println("   ow_bit_buffer_append(buffer,  object->" + propname + "!=0 );");
-                }
-            } else if (type.equals("org.apache.activeio.packet.ByteSequence")) {
-                if (size == null) {
-                    out.println("   ow_bit_buffer_append(buffer,  object->" + propname + "!=0 );");
-                }
-            } else if (type.equals("java.lang.String")) {
-                out.println("   ow_marshal1_string(buffer, object->" + propname + ");");
-            } else {
-                if (property.getType().isArrayType()) {
-                    if (size != null) {
-                        out.println("   SUCCESS_CHECK(ow_marshal1_DataStructure_array_const_size(buffer, object->" + propname + ", " + size.asInt() + "));");
-                    } else {
-                        out.println("   SUCCESS_CHECK(ow_marshal1_DataStructure_array(buffer, object->" + propname + "));");
-                    }
-                } else if (isThrowable(property.getType())) {
-                    out.println("   SUCCESS_CHECK(ow_marshal1_throwable(buffer, object->" + propname + "));");
-                } else {
-                    if (cached) {
-                        out.println("   SUCCESS_CHECK(ow_marshal1_cached_object(buffer, (ow_DataStructure*)object->" + propname + "));");
-                    } else {
-                        out.println("   SUCCESS_CHECK(ow_marshal1_nested_object(buffer, (ow_DataStructure*)object->" + propname + "));");
-                    }
-                }
-            }
-            out.println("");
-        }
-
-        out.println("   ");
-        out.println("   return APR_SUCCESS;");
-        out.println("}");
-        out.println("apr_status_t ow_marshal2_" + name + "(ow_byte_buffer *buffer, ow_bit_buffer *bitbuffer, ow_" + name + " *object)");
-        out.println("{");
-        out.println("   ow_marshal2_" + baseName + "(buffer, bitbuffer, (ow_" + baseName + "*)object);   ");
-
-        for (Iterator<JProperty> iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = iter.next();
-            JAnnotation annotation = property.getGetter().getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            Object propname = toPropertyCase(property.getSimpleName());
-            boolean cached = isCachedProperty(property);
-
-            type = property.getType().getQualifiedName();
-            if (type.equals("boolean")) {
-                out.println("   ow_bit_buffer_read(bitbuffer);");
-            } else if (type.equals("byte")) {
-                out.println("   SUCCESS_CHECK(ow_byte_buffer_append_" + type + "(buffer, object->" + propname + "));");
-            } else if (type.equals("char")) {
-                out.println("   SUCCESS_CHECK(ow_byte_buffer_append_" + type + "(buffer, object->" + propname + "));");
-            } else if (type.equals("short")) {
-                out.println("   SUCCESS_CHECK(ow_byte_buffer_append_" + type + "(buffer, object->" + propname + "));");
-            } else if (type.equals("int")) {
-                out.println("   SUCCESS_CHECK(ow_byte_buffer_append_" + type + "(buffer, object->" + propname + "));");
-            } else if (type.equals("long")) {
-                out.println("   SUCCESS_CHECK(ow_marshal2_long(buffer, bitbuffer, object->" + propname + "));");
-            } else if (type.equals("byte[]")) {
-                if (size != null) {
-                    out.println("   SUCCESS_CHECK(ow_marshal2_byte_array_const_size(buffer, object->" + propname + ", " + size.asInt() + "));");
-                } else {
-                    out.println("   SUCCESS_CHECK(ow_marshal2_byte_array(buffer, bitbuffer, object->" + propname + "));");
-                }
-            } else if (type.equals("org.apache.activeio.packet.ByteSequence")) {
-                if (size != null) {
-                    out.println("   SUCCESS_CHECK(ow_marshal2_byte_array_const_size(buffer, object->" + propname + ", " + size.asInt() + "));");
-                } else {
-                    out.println("   SUCCESS_CHECK(ow_marshal2_byte_array(buffer, bitbuffer, object->" + propname + "));");
-                }
-            } else if (type.equals("java.lang.String")) {
-                out.println("   SUCCESS_CHECK(ow_marshal2_string(buffer, bitbuffer, object->" + propname + "));");
-            } else {
-                if (property.getType().isArrayType()) {
-                    if (size != null) {
-                        out.println("   SUCCESS_CHECK(ow_marshal2_DataStructure_array_const_size(buffer, bitbuffer, object->" + propname + ", " + size.asInt() + "));");
-                    } else {
-                        out.println("   SUCCESS_CHECK(ow_marshal2_DataStructure_array(buffer, bitbuffer, object->" + propname + "));");
-                    }
-                } else if (isThrowable(property.getType())) {
-                    out.println("   SUCCESS_CHECK(ow_marshal2_throwable(buffer, bitbuffer, object->" + propname + "));");
-                } else {
-                    if (cached) {
-                        out.println("   SUCCESS_CHECK(ow_marshal2_cached_object(buffer, bitbuffer, (ow_DataStructure*)object->" + propname + "));");
-                    } else {
-                        out.println("   SUCCESS_CHECK(ow_marshal2_nested_object(buffer, bitbuffer, (ow_DataStructure*)object->" + propname + "));");
-                    }
-                }
-            }
-            out.println("");
-        }
-
-        out.println("   ");
-        out.println("   return APR_SUCCESS;");
-        out.println("}");
-        out.println("");
-        out.println("apr_status_t ow_unmarshal_" + name + "(ow_byte_array *buffer, ow_bit_buffer *bitbuffer, ow_" + name + " *object, apr_pool_t *pool)");
-        out.println("{");
-        out.println("   ow_unmarshal_" + baseName + "(buffer, bitbuffer, (ow_" + baseName + "*)object, pool);   ");
-
-        for (Iterator<JProperty> iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = iter.next();
-            JAnnotation annotation = property.getGetter().getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            String propname = toPropertyCase(property.getSimpleName());
-            boolean cached = isCachedProperty(property);
-
-            type = property.getType().getQualifiedName();
-
-            if (type.equals("boolean")) {
-                out.println("   object->" + propname + " = ow_bit_buffer_read(bitbuffer);");
-            } else if (type.equals("byte")) {
-                out.println("   SUCCESS_CHECK(ow_byte_array_read_" + type + "(buffer, &object->" + propname + "));");
-            } else if (type.equals("char")) {
-                out.println("   SUCCESS_CHECK(ow_byte_array_read_" + type + "(buffer, &object->" + propname + "));");
-            } else if (type.equals("short")) {
-                out.println("   SUCCESS_CHECK(ow_byte_array_read_" + type + "(buffer, &object->" + propname + "));");
-            } else if (type.equals("int")) {
-                out.println("   SUCCESS_CHECK(ow_byte_array_read_" + type + "(buffer, &object->" + propname + "));");
-            } else if (type.equals("long")) {
-                out.println("   SUCCESS_CHECK(ow_unmarshal_long(buffer, bitbuffer, &object->" + propname + ", pool));");
-            } else if (type.equals("byte[]")) {
-                if (size != null) {
-                    out.println("   SUCCESS_CHECK(ow_unmarshal_byte_array_const_size(buffer, &object->" + propname + ", " + size.asInt() + ", pool));");
-                } else {
-                    out.println("   SUCCESS_CHECK(ow_unmarshal_byte_array(buffer, bitbuffer, &object->" + propname + ", pool));");
-                }
-            } else if (type.equals("org.apache.activeio.packet.ByteSequence")) {
-                if (size != null) {
-                    out.println("   SUCCESS_CHECK(ow_unmarshal_byte_array_const_size(buffer, &object->" + propname + ", " + size.asInt() + ", pool));");
-                } else {
-                    out.println("   SUCCESS_CHECK(ow_unmarshal_byte_array(buffer, bitbuffer, &object->" + propname + ", pool));");
-                }
-            } else if (type.equals("java.lang.String")) {
-                out.println("   SUCCESS_CHECK(ow_unmarshal_string(buffer, bitbuffer, &object->" + propname + ", pool));");
-            } else {
-                if (property.getType().isArrayType()) {
-                    if (size != null) {
-                        out.println("   SUCCESS_CHECK(ow_unmarshal_DataStructure_array_const_size(buffer, bitbuffer, &object->" + propname + ", " + size.asInt() + ", pool));");
-                    } else {
-                        out.println("   SUCCESS_CHECK(ow_unmarshal_DataStructure_array(buffer, bitbuffer, &object->" + propname + ", pool));");
-                    }
-                } else if (isThrowable(property.getType())) {
-                    out.println("   SUCCESS_CHECK(ow_unmarshal_throwable(buffer, bitbuffer, &object->" + propname + ", pool));");
-                } else {
-                    if (cached) {
-                        out.println("   SUCCESS_CHECK(ow_unmarshal_cached_object(buffer, bitbuffer, (ow_DataStructure**)&object->" + propname + ", pool));");
-                    } else {
-                        out.println("   SUCCESS_CHECK(ow_unmarshal_nested_object(buffer, bitbuffer, (ow_DataStructure**)&object->" + propname + ", pool));");
-                    }
-                }
-            }
-            out.println("");
-        }
-
-        out.println("   ");
-        out.println("   return APR_SUCCESS;");
-        out.println("}");
-    }
-
-    protected void generateTearDown(PrintWriter out) {
-        out.println("");
-        out.println("ow_DataStructure *ow_create_object(ow_byte type, apr_pool_t *pool)");
-        out.println("{");
-        out.println("   switch( type ) {");
-        for (Iterator iterator = sortedClasses.iterator(); iterator.hasNext();) {
-            JClass jclass = (JClass)iterator.next();
-            String name = jclass.getSimpleName();
-            String type = ("ow_" + name).toUpperCase() + "_TYPE";
-            if (!isAbstract(jclass)) {
-                out.println("      case " + type + ": return (ow_DataStructure *)ow_" + name + "_create(pool);");
-            }
-        }
-
-        out.println("");
-        out.println("   }");
-        out.println("   return 0;");
-        out.println("}");
-        out.println("");
-        out.println("apr_status_t ow_marshal1_object(ow_bit_buffer *buffer, ow_DataStructure *object)");
-        out.println("{");
-        out.println("   switch( object->structType ) {");
-
-        for (Iterator iterator = sortedClasses.iterator(); iterator.hasNext();) {
-            JClass jclass = (JClass)iterator.next();
-            String name = jclass.getSimpleName();
-            String type = ("ow_" + name).toUpperCase() + "_TYPE";
-            if (!isAbstract(jclass)) {
-                out.println("      case " + type + ": return ow_marshal1_" + name + "(buffer, (ow_" + name + "*)object);");
-            }
-        }
-
-        out.println("");
-        out.println("   }");
-        out.println("   return APR_EGENERAL;");
-        out.println("}");
-        out.println("");
-        out.println("apr_status_t ow_marshal2_object(ow_byte_buffer *buffer, ow_bit_buffer *bitbuffer, ow_DataStructure *object)");
-        out.println("{");
-        out.println("   switch( object->structType ) {");
-
-        for (Iterator iterator = sortedClasses.iterator(); iterator.hasNext();) {
-            JClass jclass = (JClass)iterator.next();
-            String name = jclass.getSimpleName();
-            String type = ("ow_" + name).toUpperCase() + "_TYPE";
-            if (!isAbstract(jclass)) {
-                out.println("      case " + type + ": return ow_marshal2_" + name + "(buffer, bitbuffer, (ow_" + name + "*)object);");
-            }
-        }
-
-        out.println("");
-        out.println("   }");
-        out.println("   return APR_EGENERAL;");
-        out.println("}");
-        out.println("");
-        out.println("apr_status_t ow_unmarshal_object(ow_byte_array *buffer, ow_bit_buffer *bitbuffer, ow_DataStructure *object, apr_pool_t *pool)");
-        out.println("{");
-        out.println("   switch( object->structType ) {");
-
-        for (Iterator iterator = sortedClasses.iterator(); iterator.hasNext();) {
-            JClass jclass = (JClass)iterator.next();
-            String name = jclass.getSimpleName();
-            String type = ("ow_" + name).toUpperCase() + "_TYPE";
-            if (!isAbstract(jclass)) {
-                out.println("      case " + type + ": return ow_unmarshal_" + name + "(buffer, bitbuffer, (ow_" + name + "*)object, pool);");
-            }
-        }
-
-        out.println("");
-        out.println("   }");
-        out.println("   return APR_EGENERAL;");
-        out.println("}");
-
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppClassesGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppClassesGenerator.java
deleted file mode 100644
index 43a4966..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppClassesGenerator.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class CppClassesGenerator extends MultiSourceGenerator {
-
-    protected String targetDir = "./src/main/cpp";
-
-    public Object run() {
-        filePostFix = getFilePostFix();
-        if (destDir == null) {
-            destDir = new File(targetDir + "/activemq/command");
-        }
-        return super.run();
-    }
-
-    protected String getFilePostFix() {
-        return ".cpp";
-    }
-
-    /**
-     * Converts the Java type to a C++ type name
-     */
-    public String toCppType(JClass type) {
-        String name = type.getSimpleName();
-        if (name.equals("String")) {
-            return "p<string>";
-        } else if (type.isArrayType()) {
-            if (name.equals("byte[]")) {
-                name = "char[]";
-            } else if (name.equals("DataStructure[]")) {
-                name = "IDataStructure[]";
-            }
-            return "array<" + name.substring(0, name.length() - 2) + ">";
-        } else if (name.equals("Throwable") || name.equals("Exception")) {
-            return "p<BrokerError>";
-        } else if (name.equals("ByteSequence")) {
-            return "array<char>";
-        } else if (name.equals("boolean")) {
-            return "bool";
-        } else if (name.equals("long")) {
-            return "long long";
-        } else if (name.equals("byte")) {
-            return "char";
-        } else if (name.equals("Command") || name.equals("DataStructure")) {
-            return "p<I" + name + ">";
-        } else if (!type.isPrimitiveType()) {
-            return "p<" + name + ">";
-        } else {
-            return name;
-        }
-    }
-
-    /**
-     * Converts the Java type to a C++ default value
-     */
-    public String toCppDefaultValue(JClass type) {
-        String name = type.getSimpleName();
-
-        if (name.equals("boolean")) {
-            return "false";
-        } else if (!type.isPrimitiveType()) {
-            return "NULL";
-        } else {
-            return "0";
-        }
-    }
-
-    /**
-     * Converts the Java type to the name of the C++ marshal method to be used
-     */
-    public String toMarshalMethodName(JClass type) {
-        String name = type.getSimpleName();
-        if (name.equals("String")) {
-            return "marshalString";
-        } else if (type.isArrayType()) {
-            if (type.getArrayComponentType().isPrimitiveType() && name.equals("byte[]")) {
-                return "marshalByteArray";
-            } else {
-                return "marshalObjectArray";
-            }
-        } else if (name.equals("ByteSequence")) {
-            return "marshalByteArray";
-        } else if (name.equals("short")) {
-            return "marshalShort";
-        } else if (name.equals("int")) {
-            return "marshalInt";
-        } else if (name.equals("long")) {
-            return "marshalLong";
-        } else if (name.equals("byte")) {
-            return "marshalByte";
-        } else if (name.equals("double")) {
-            return "marshalDouble";
-        } else if (name.equals("float")) {
-            return "marshalFloat";
-        } else if (name.equals("boolean")) {
-            return "marshalBoolean";
-        } else if (!type.isPrimitiveType()) {
-            return "marshalObject";
-        } else {
-            return name;
-        }
-    }
-
-    /**
-     * Converts the Java type to the name of the C++ unmarshal method to be used
-     */
-    public String toUnmarshalMethodName(JClass type) {
-        String name = type.getSimpleName();
-        if (name.equals("String")) {
-            return "unmarshalString";
-        } else if (type.isArrayType()) {
-            if (type.getArrayComponentType().isPrimitiveType() && name.equals("byte[]")) {
-                return "unmarshalByteArray";
-            } else {
-                return "unmarshalObjectArray";
-            }
-        } else if (name.equals("ByteSequence")) {
-            return "unmarshalByteArray";
-        } else if (name.equals("short")) {
-            return "unmarshalShort";
-        } else if (name.equals("int")) {
-            return "unmarshalInt";
-        } else if (name.equals("long")) {
-            return "unmarshalLong";
-        } else if (name.equals("byte")) {
-            return "unmarshalByte";
-        } else if (name.equals("double")) {
-            return "unmarshalDouble";
-        } else if (name.equals("float")) {
-            return "unmarshalFloat";
-        } else if (name.equals("boolean")) {
-            return "unmarshalBoolean";
-        } else if (!type.isPrimitiveType()) {
-            return "unmarshalObject";
-        } else {
-            return name;
-        }
-    }
-
-    /**
-     * Converts the Java type to a C++ pointer cast
-     */
-    public String toUnmarshalCast(JClass type) {
-        String name = toCppType(type);
-
-        if (name.startsWith("p<")) {
-            return "p_cast<" + name.substring(2);
-        } else if (name.startsWith("array<") && (type.isArrayType() && !type.getArrayComponentType().isPrimitiveType()) && !type.getSimpleName().equals("ByteSequence")) {
-            return "array_cast<" + name.substring(6);
-        } else {
-            return "";
-        }
-    }
-
-    protected void generateLicence(PrintWriter out) {
-        out.println("/**");
-        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-        out.println(" * this work for additional information regarding copyright ownership.");
-        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-        out.println(" * (the \"License\"); you may not use this file except in compliance with");
-        out.println(" * the License.  You may obtain a copy of the License at");
-        out.println(" *");
-        out.println(" *      http://www.apache.org/licenses/LICENSE-2.0");
-        out.println(" *");
-        out.println(" * Unless required by applicable law or agreed to in writing, software");
-        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        out.println(" * See the License for the specific language governing permissions and");
-        out.println(" * limitations under the License.");
-        out.println(" */");
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-        generateLicence(out);
-        out.println("#include \"activemq/command/" + className + ".hpp\"");
-        out.println("");
-        out.println("using namespace apache::activemq::command;");
-        out.println("");
-        out.println("/*");
-        out.println(" *");
-        out.println(" *  Command and marshalling code for OpenWire format for " + className + "");
-        out.println(" *");
-        out.println(" *");
-        out.println(" *  NOTE!: This file is autogenerated - do not modify!");
-        out.println(" *         if you need to make a change, please see the Groovy scripts in the");
-        out.println(" *         activemq-core module");
-        out.println(" *");
-        out.println(" */");
-        out.println("" + className + "::" + className + "()");
-        out.println("{");
-
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            String value = toCppDefaultValue(property.getType());
-            String propertyName = property.getSimpleName();
-            String parameterName = decapitalize(propertyName);
-            out.println("    this->" + parameterName + " = " + value + " ;");
-        }
-        out.println("}");
-        out.println("");
-        out.println("" + className + "::~" + className + "()");
-        out.println("{");
-        out.println("}");
-        out.println("");
-        out.println("unsigned char " + className + "::getDataStructureType()");
-        out.println("{");
-        out.println("    return " + className + "::TYPE ; ");
-        out.println("}");
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            String type = toCppType(property.getType());
-            String propertyName = property.getSimpleName();
-            String parameterName = decapitalize(propertyName);
-            out.println("");
-            out.println("        ");
-            out.println("" + type + " " + className + "::get" + propertyName + "()");
-            out.println("{");
-            out.println("    return " + parameterName + " ;");
-            out.println("}");
-            out.println("");
-            out.println("void " + className + "::set" + propertyName + "(" + type + " " + parameterName + ")");
-            out.println("{");
-            out.println("    this->" + parameterName + " = " + parameterName + " ;");
-            out.println("}");
-        }
-        out.println("");
-        out.println("int " + className + "::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)");
-        out.println("{");
-        out.println("    int size = 0 ;");
-        out.println("");
-        out.println("    size += " + baseClass + "::marshal(marshaller, mode, ostream) ; ");
-
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            String marshalMethod = toMarshalMethodName(property.getType());
-            String propertyName = decapitalize(property.getSimpleName());
-            out.println("    size += marshaller->" + marshalMethod + "(" + propertyName + ", mode, ostream) ; ");
-        }
-        out.println("    return size ;");
-        out.println("}");
-        out.println("");
-        out.println("void " + className + "::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)");
-        out.println("{");
-        out.println("    " + baseClass + "::unmarshal(marshaller, mode, istream) ; ");
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            String cast = toUnmarshalCast(property.getType());
-            String unmarshalMethod = toUnmarshalMethodName(property.getType());
-            String propertyName = decapitalize(property.getSimpleName());
-            out.println("    " + propertyName + " = " + cast + "(marshaller->" + unmarshalMethod + "(mode, istream)) ; ");
-        }
-        out.println("}");
-    }
-
-    public String getTargetDir() {
-        return targetDir;
-    }
-
-    public void setTargetDir(String targetDir) {
-        this.targetDir = targetDir;
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppGeneratorTask.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppGeneratorTask.java
deleted file mode 100644
index 437c66b..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppGeneratorTask.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.codehaus.jam.JamService;
-import org.codehaus.jam.JamServiceFactory;
-import org.codehaus.jam.JamServiceParams;
-
-/**
- * 
- */
-public class CppGeneratorTask extends Task {
-
-    int version = 2;
-    File source = new File(".");
-    File target = new File(".");
-
-    public static void main(String[] args) {
-
-        Project project = new Project();
-        project.init();
-        CppGeneratorTask generator = new CppGeneratorTask();
-        generator.setProject(project);
-
-        if (args.length > 0) {
-            generator.version = Integer.parseInt(args[0]);
-        }
-
-        if (args.length > 1) {
-            generator.source = new File(args[1]);
-        }
-
-        if (args.length > 2) {
-            generator.target = new File(args[2]);
-        }
-
-        generator.execute();
-    }
-
-    public void execute() throws BuildException {
-        try {
-
-            String sourceDir = source + "/src/main/java";
-
-            System.out.println("Parsing source files in: " + sourceDir);
-
-            JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
-            JamServiceParams params = jamServiceFactory.createServiceParams();
-            File[] dirs = new File[] {
-                new File(sourceDir)
-            };
-            params.includeSourcePattern(dirs, "**/*.java");
-            JamService jam = jamServiceFactory.createService(params);
-
-            {
-                CppClassesGenerator script = new CppClassesGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src/main/cpp");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-            {
-                CppHeadersGenerator script = new CppHeadersGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src/main/cpp");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-            {
-                CppMarshallingHeadersGenerator script = new CppMarshallingHeadersGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-            {
-                CppMarshallingClassesGenerator script = new CppMarshallingClassesGenerator();
-                script.setJam(jam);
-                script.setTargetDir(target + "/src");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-
-        } catch (Exception e) {
-            throw new BuildException(e);
-        }
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    public File getSource() {
-        return source;
-    }
-
-    public void setSource(File basedir) {
-        this.source = basedir;
-    }
-
-    public File getTarget() {
-        return target;
-    }
-
-    public void setTarget(File target) {
-        this.target = target;
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppHeadersGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppHeadersGenerator.java
deleted file mode 100644
index 9099e4e..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppHeadersGenerator.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class CppHeadersGenerator extends CppClassesGenerator {
-
-    protected String getFilePostFix() {
-        return ".hpp";
-    }
-
-    protected void generateFile(PrintWriter out) {
-        generateLicence(out);
-
-        out.println("#ifndef ActiveMQ_" + className + "_hpp_");
-        out.println("#define ActiveMQ_" + className + "_hpp_");
-        out.println("");
-        out.println("// Turn off warning message for ignored exception specification");
-        out.println("#ifdef _MSC_VER");
-        out.println("#pragma warning( disable : 4290 )");
-        out.println("#endif");
-        out.println("");
-        out.println("#include <string>");
-        out.println("#include \"activemq/command/" + baseClass + ".hpp\"");
-
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            if (!property.getType().isPrimitiveType() && !property.getType().getSimpleName().equals("String") && !property.getType().getSimpleName().equals("ByteSequence")) {
-                String includeName = toCppType(property.getType());
-                if (property.getType().isArrayType()) {
-                    JClass arrayType = property.getType().getArrayComponentType();
-                    if (arrayType.isPrimitiveType()) {
-                        continue;
-                    }
-                }
-                if (includeName.startsWith("array<")) {
-                    includeName = includeName.substring(6, includeName.length() - 1);
-                } else if (includeName.startsWith("p<")) {
-                    includeName = includeName.substring(2, includeName.length() - 1);
-                }
-                if (includeName.equals("IDataStructure")) {
-                    out.println("#include \"activemq/" + includeName + ".hpp\"");
-                } else {
-                    out.println("#include \"activemq/command/" + includeName + ".hpp\"");
-                }
-            }
-        }
-        out.println("");
-        out.println("#include \"activemq/protocol/IMarshaller.hpp\"");
-        out.println("#include \"ppr/io/IOutputStream.hpp\"");
-        out.println("#include \"ppr/io/IInputStream.hpp\"");
-        out.println("#include \"ppr/io/IOException.hpp\"");
-        out.println("#include \"ppr/util/ifr/array\"");
-        out.println("#include \"ppr/util/ifr/p\"");
-        out.println("");
-        out.println("namespace apache");
-        out.println("{");
-        out.println("  namespace activemq");
-        out.println("  {");
-        out.println("    namespace command");
-        out.println("    {");
-        out.println("      using namespace ifr;");
-        out.println("      using namespace std;");
-        out.println("      using namespace apache::activemq;");
-        out.println("      using namespace apache::activemq::protocol;");
-        out.println("      using namespace apache::ppr::io;");
-        out.println("");
-        out.println("/*");
-        out.println(" *");
-        out.println(" *  Command and marshalling code for OpenWire format for " + className + "");
-        out.println(" *");
-        out.println(" *");
-        out.println(" *  NOTE!: This file is autogenerated - do not modify!");
-        out.println(" *         if you need to make a change, please see the Groovy scripts in the");
-        out.println(" *         activemq-core module");
-        out.println(" *");
-        out.println(" */");
-        out.println("class " + className + " : public " + baseClass + "");
-        out.println("{");
-        out.println("protected:");
-
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            String type = toCppType(property.getType());
-            String name = decapitalize(property.getSimpleName());
-            out.println("    " + type + " " + name + " ;");
-        }
-        out.println("");
-        out.println("public:");
-        out.println("    const static unsigned char TYPE = " + getOpenWireOpCode(jclass) + ";");
-        out.println("");
-        out.println("public:");
-        out.println("    " + className + "() ;");
-        out.println("    virtual ~" + className + "() ;");
-        out.println("");
-        out.println("    virtual unsigned char getDataStructureType() ;");
-
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            String type = toCppType(property.getType());
-            String propertyName = property.getSimpleName();
-            String parameterName = decapitalize(propertyName);
-            out.println("");
-            out.println("    virtual " + type + " get" + propertyName + "() ;");
-            out.println("    virtual void set" + propertyName + "(" + type + " " + parameterName + ") ;");
-        }
-        out.println("");
-        out.println("    virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;");
-        out.println("    virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;");
-        out.println("} ;");
-        out.println("");
-        out.println("/* namespace */");
-        out.println("    }");
-        out.println("  }");
-        out.println("}");
-        out.println("");
-        out.println("#endif /*ActiveMQ_" + className + "_hpp_*/");
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingClassesGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingClassesGenerator.java
deleted file mode 100644
index 6276934..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingClassesGenerator.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class CppMarshallingClassesGenerator extends CppMarshallingHeadersGenerator {
-
-    protected String getFilePostFix() {
-        return ".cpp";
-    }
-
-    protected void generateUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        out.print("    ");
-        String setter = property.getSetter().getSimpleName();
-        String type = property.getType().getSimpleName();
-
-        if (type.equals("boolean")) {
-            out.println("info." + setter + "( bs.readBoolean() );");
-        } else if (type.equals("byte")) {
-            out.println("info." + setter + "( DataStreamMarshaller.readByte(dataIn) );");
-        } else if (type.equals("char")) {
-            out.println("info." + setter + "( DataStreamMarshaller.readChar(dataIn) );");
-        } else if (type.equals("short")) {
-            out.println("info." + setter + "( DataStreamMarshaller.readShort(dataIn) );");
-        } else if (type.equals("int")) {
-            out.println("info." + setter + "( DataStreamMarshaller.readInt(dataIn) );");
-        } else if (type.equals("long")) {
-            out.println("info." + setter + "( UnmarshalLong(wireFormat, dataIn, bs) );");
-        } else if (type.equals("String")) {
-            out.println("info." + setter + "( readString(dataIn, bs) );");
-        } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-            if (size != null) {
-                out.println("info." + setter + "( readBytes(dataIn, " + size.asInt() + ") );");
-            } else {
-                out.println("info." + setter + "( readBytes(dataIn, bs.readBoolean()) );");
-            }
-        } else if (isThrowable(property.getType())) {
-            out.println("info." + setter + "( unmarshalBrokerError(wireFormat, dataIn, bs) );");
-        } else if (isCachedProperty(property)) {
-            out.println("info." + setter + "( (" + type + ") unmarshalCachedObject(wireFormat, dataIn, bs) );");
-        } else {
-            out.println("info." + setter + "( (" + type + ") unmarshalNestedObject(wireFormat, dataIn, bs) );");
-        }
-    }
-
-    protected void generateUnmarshalBodyForArrayProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        JClass propertyType = property.getType();
-        String arrayType = propertyType.getArrayComponentType().getSimpleName();
-        String setter = property.getGetter().getSimpleName();
-        out.println();
-        if (size != null) {
-            out.println("    {");
-            out.println("        " + arrayType + "[] value = new " + arrayType + "[" + size.asInt() + "];");
-            out.println("        " + "for( int i=0; i < " + size.asInt() + "; i++ ) {");
-            out.println("            value[i] = (" + arrayType + ") unmarshalNestedObject(wireFormat,dataIn, bs);");
-            out.println("        }");
-            out.println("        info." + setter + "( value );");
-            out.println("    }");
-        } else {
-            out.println("    if (bs.readBoolean()) {");
-            out.println("        short size = DataStreamMarshaller.readShort(dataIn);");
-            out.println("        " + arrayType + "[] value = new " + arrayType + "[size];");
-            out.println("        for( int i=0; i < size; i++ ) {");
-            out.println("            value[i] = (" + arrayType + ") unmarshalNestedObject(wireFormat,dataIn, bs);");
-            out.println("        }");
-            out.println("        info." + setter + "( value );");
-            out.println("    }");
-            out.println("    else {");
-            out.println("        info." + setter + "( null );");
-            out.println("    }");
-        }
-    }
-
-    protected int generateMarshal1Body(PrintWriter out) {
-        List properties = getProperties();
-        int baseSize = 0;
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getGetter().getSimpleName() + "()";
-
-            out.print(indent);
-            if (type.equals("boolean")) {
-                out.println("bs.writeBoolean(" + getter + ");");
-            } else if (type.equals("byte")) {
-                baseSize += 1;
-            } else if (type.equals("char")) {
-                baseSize += 1;
-            } else if (type.equals("short")) {
-                baseSize += 1;
-            } else if (type.equals("int")) {
-                baseSize += 1;
-            } else if (type.equals("long")) {
-                out.println("rc += marshal1Long(wireFormat, " + getter + ", bs);");
-            } else if (type.equals("String")) {
-                out.println("rc += writeString(" + getter + ", bs);");
-            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-                if (size == null) {
-                    out.println("bs.writeBoolean(" + getter + "!=null);");
-                    out.println("    rc += " + getter + "==null ? 0 : " + getter + ".Length+4;");
-                } else {
-                    baseSize += size.asInt();
-                }
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("rc += marshalObjectArrayConstSize(wireFormat, " + getter + ", bs, " + size.asInt() + ");");
-                } else {
-                    out.println("rc += marshalObjectArray(wireFormat, " + getter + ", bs);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("rc += marshalBrokerError(wireFormat, " + getter + ", bs);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("rc += marshal1CachedObject(wireFormat, " + getter + ", bs);");
-                } else {
-                    out.println("rc += marshal1NestedObject(wireFormat, " + getter + ", bs);");
-                }
-            }
-        }
-        return baseSize;
-    }
-
-    protected void generateMarshal2Body(PrintWriter out) {
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getGetter().getSimpleName() + "()";
-
-            out.print(indent);
-            if (type.equals("boolean")) {
-                out.println("bs.readBoolean();");
-            } else if (type.equals("byte")) {
-                out.println("DataStreamMarshaller.writeByte(" + getter + ", dataOut);");
-            } else if (type.equals("char")) {
-                out.println("DataStreamMarshaller.writeChar(" + getter + ", dataOut);");
-            } else if (type.equals("short")) {
-                out.println("DataStreamMarshaller.writeShort(" + getter + ", dataOut);");
-            } else if (type.equals("int")) {
-                out.println("DataStreamMarshaller.writeInt(" + getter + ", dataOut);");
-            } else if (type.equals("long")) {
-                out.println("marshal2Long(wireFormat, " + getter + ", dataOut, bs);");
-            } else if (type.equals("String")) {
-                out.println("writeString(" + getter + ", dataOut, bs);");
-            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
-                if (size != null) {
-                    out.println("dataOut.write(" + getter + ", 0, " + size.asInt() + ");");
-                } else {
-                    out.println("if(bs.readBoolean()) {");
-                    out.println("       DataStreamMarshaller.writeInt(" + getter + ".Length, dataOut);");
-                    out.println("       dataOut.write(" + getter + ");");
-                    out.println("    }");
-                }
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("marshalObjectArrayConstSize(wireFormat, " + getter + ", dataOut, bs, " + size.asInt() + ");");
-                } else {
-                    out.println("marshalObjectArray(wireFormat, " + getter + ", dataOut, bs);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("marshalBrokerError(wireFormat, " + getter + ", dataOut, bs);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("marshal2CachedObject(wireFormat, " + getter + ", dataOut, bs);");
-                } else {
-                    out.println("marshal2NestedObject(wireFormat, " + getter + ", dataOut, bs);");
-                }
-            }
-        }
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-        generateLicence(out);
-
-        out.println("#include \"marshal/" + className + ".hpp\"");
-        out.println("");
-        out.println("using namespace apache::activemq::client::marshal;");
-        out.println("");
-        out.println("/*");
-        out.println(" *  Marshalling code for Open Wire Format for " + jclass.getSimpleName() + "");
-        out.println(" *");
-        out.println(" * NOTE!: This file is autogenerated - do not modify!");
-        out.println(" *        if you need to make a change, please see the Groovy scripts in the");
-        out.println(" *        activemq-core module");
-        out.println(" */");
-        out.println("");
-        out.println("" + className + "::" + className + "()");
-        out.println("{");
-        out.println("    // no-op");
-        out.println("}");
-        out.println("");
-        out.println("" + className + "::~" + className + "()");
-        out.println("{");
-        out.println("    // no-op");
-        out.println("}");
-        out.println("");
-
-        if (!isAbstractClass()) {
-            out.println("");
-            out.println("");
-            out.println("IDataStructure* " + className + "::createObject() ");
-            out.println("{");
-            out.println("    return new " + jclass.getSimpleName() + "();");
-            out.println("}");
-            out.println("");
-            out.println("char " + className + "::getDataStructureType() ");
-            out.println("{");
-            out.println("    return " + jclass.getSimpleName() + ".ID_" + jclass.getSimpleName() + ";");
-            out.println("}");
-        }
-
-        out.println("");
-        out.println("    /* ");
-        out.println("     * Un-marshal an object instance from the data input stream");
-        out.println("     */ ");
-        out.println("void " + className + "::unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ");
-        out.println("{");
-        out.println("    base.unmarshal(wireFormat, o, dataIn, bs);");
-
-        List properties = getProperties();
-        boolean marshallerAware = isMarshallerAware();
-        if (!properties.isEmpty() || marshallerAware) {
-            out.println("");
-            out.println("    " + jclass.getSimpleName() + "& info = (" + jclass.getSimpleName() + "&) o;");
-        }
-
-        if (marshallerAware) {
-            out.println("");
-            out.println("    info.beforeUnmarshall(wireFormat);");
-            out.println("        ");
-        }
-
-        generateTightUnmarshalBody(out);
-
-        if (marshallerAware) {
-            out.println("");
-            out.println("    info.afterUnmarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("}");
-        out.println("");
-        out.println("");
-        out.println("/*");
-        out.println(" * Write the booleans that this object uses to a BooleanStream");
-        out.println(" */");
-        out.println("int " + className + "::marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream& bs) {");
-        out.println("    " + jclass.getSimpleName() + "& info = (" + jclass.getSimpleName() + "&) o;");
-
-        if (marshallerAware) {
-            out.println("");
-            out.println("    info.beforeMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("    int rc = base.marshal1(wireFormat, info, bs);");
-
-        int baseSize = generateMarshal1Body(out);
-
-        out.println("");
-        out.println("    return rc + " + baseSize + ";");
-        out.println("}");
-        out.println("");
-        out.println("/* ");
-        out.println(" * Write a object instance to data output stream");
-        out.println(" */");
-        out.println("void " + className + "::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) {");
-        out.println("    base.marshal2(wireFormat, o, dataOut, bs);");
-
-        if (!properties.isEmpty() || marshallerAware) {
-            out.println("");
-            out.println("    " + jclass.getSimpleName() + "& info = (" + jclass.getSimpleName() + "&) o;");
-        }
-
-        generateMarshal2Body(out);
-
-        if (marshallerAware) {
-            out.println("");
-            out.println("    info.afterMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("}");
-    }
-
-    @SuppressWarnings("unchecked")
-    public void generateFactory(PrintWriter out) {
-        generateLicence(out);
-        out.println("");
-        out.println("// Marshalling code for Open Wire Format");
-        out.println("//");
-        out.println("//");
-        out.println("// NOTE!: This file is autogenerated - do not modify!");
-        out.println("//        if you need to make a change, please see the Groovy scripts in the");
-        out.println("//        activemq-openwire module");
-        out.println("//");
-        out.println("");
-        out.println("#include \"marshal/" + className + ".hpp\"");
-        out.println("");
-
-        List list = new ArrayList(getConcreteClasses());
-        Collections.sort(list, new Comparator() {
-            public int compare(Object o1, Object o2) {
-                JClass c1 = (JClass)o1;
-                JClass c2 = (JClass)o2;
-                return c1.getSimpleName().compareTo(c2.getSimpleName());
-            }
-        });
-
-        for (Iterator iter = list.iterator(); iter.hasNext();) {
-            JClass jclass = (JClass)iter.next();
-            out.println("#include \"marshal/" + jclass.getSimpleName() + "Marshaller.hpp\"");
-        }
-
-        out.println("");
-        out.println("");
-        out.println("using namespace apache::activemq::client::marshal;");
-        out.println("");
-        out.println("");
-        out.println("void MarshallerFactory::configure(ProtocolFormat& format) ");
-        out.println("{");
-
-        for (Iterator iter = list.iterator(); iter.hasNext();) {
-            JClass jclass = (JClass)iter.next();
-            out.println("    format.addMarshaller(new " + jclass.getSimpleName() + "Marshaller());");
-        }
-
-        out.println("");
-        out.println("}");
-
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingHeadersGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingHeadersGenerator.java
deleted file mode 100644
index 2af6bc0..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingHeadersGenerator.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.PrintWriter;
-
-/**
- * 
- */
-public class CppMarshallingHeadersGenerator extends JavaMarshallingGenerator {
-
-    protected String targetDir = "./src";
-
-    public Object run() {
-        filePostFix = getFilePostFix();
-        if (destDir == null) {
-            destDir = new File(targetDir + "/marshal");
-        }
-        return super.run();
-    }
-
-    protected String getFilePostFix() {
-        return ".hpp";
-    }
-
-    protected void generateLicence(PrintWriter out) {
-        out.println("/**");
-        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-        out.println(" * this work for additional information regarding copyright ownership.");
-        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-        out.println(" * (the \"License\"); you may not use this file except in compliance with");
-        out.println(" * the License.  You may obtain a copy of the License at");
-        out.println(" *");
-        out.println(" *      http://www.apache.org/licenses/LICENSE-2.0");
-        out.println(" *");
-        out.println(" * Unless required by applicable law or agreed to in writing, software");
-        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        out.println(" * See the License for the specific language governing permissions and");
-        out.println(" * limitations under the License.");
-        out.println(" */");
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-        generateLicence(out);
-
-        out.println("#ifndef " + className + "_hpp_");
-        out.println("#define " + className + "_hpp_");
-        out.println("");
-        out.println("#include <string>");
-        out.println("");
-        out.println("#include \"command/IDataStructure.hpp\"");
-        out.println("");
-        out.println("/* we could cut this down  - for now include all possible headers */");
-        out.println("#include \"command/BrokerId.hpp\"");
-        out.println("#include \"command/ConnectionId.hpp\"");
-        out.println("#include \"command/ConsumerId.hpp\"");
-        out.println("#include \"command/ProducerId.hpp\"");
-        out.println("#include \"command/SessionId.hpp\"");
-        out.println("");
-        out.println("#include \"io/BinaryReader.hpp\"");
-        out.println("#include \"io/BinaryWriter.hpp\"");
-        out.println("");
-        out.println("#include \"command/" + baseClass + ".hpp\"");
-        out.println("#include \"util/ifr/p.hpp\"");
-        out.println("");
-        out.println("#include \"protocol/ProtocolFormat.hpp\"");
-        out.println("");
-        out.println("namespace apache");
-        out.println("{");
-        out.println("  namespace activemq");
-        out.println("  {");
-        out.println("    namespace client");
-        out.println("    {");
-        out.println("      namespace marshal");
-        out.println("      {");
-        out.println("        using namespace ifr ;");
-        out.println("        using namespace apache::activemq::client::command;");
-        out.println("        using namespace apache::activemq::client::io;");
-        out.println("        using namespace apache::activemq::client::protocol;");
-        out.println("");
-        out.println("/*");
-        out.println(" *");
-        out.println(" */");
-        out.println("class " + className + " : public " + baseClass + "");
-        out.println("{");
-        out.println("public:");
-        out.println("    " + className + "() ;");
-        out.println("    virtual ~" + className + "() ;");
-        out.println("");
-        out.println("    virtual IDataStructure* createCommand() ;");
-        out.println("    virtual char getDataStructureType() ;");
-        out.println("    ");
-        out.println("    virtual void unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ;");
-        out.println("    virtual int marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream& bs) ;");
-        out.println("    virtual void marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;");
-        out.println("} ;");
-        out.println("");
-        out.println("/* namespace */");
-        out.println("     }");
-        out.println("    }");
-        out.println("  }");
-        out.println("}");
-        out.println("#endif /*" + className + "_hpp_*/");
-    }
-
-    public void generateFactory(PrintWriter out) {
-        generateLicence(out);
-        out.println("");
-        out.println("// Marshalling code for Open Wire Format ");
-        out.println("//");
-        out.println("//");
-        out.println("// NOTE!: This file is autogenerated - do not modify!");
-        out.println("//        if you need to make a change, please see the Groovy scripts in the");
-        out.println("//        activemq-openwire module");
-        out.println("//");
-        out.println("");
-        out.println("#ifndef MarshallerFactory_hpp_");
-        out.println("#define MarshallerFactory_hpp_");
-        out.println("");
-        out.println("");
-        out.println("namespace apache");
-        out.println("{");
-        out.println("  namespace activemq");
-        out.println("  {");
-        out.println("    namespace client");
-        out.println("    {");
-        out.println("      namespace marshal");
-        out.println("      {");
-        out.println("        using namespace ifr ;");
-        out.println("        using namespace std ;");
-        out.println("        using namespace apache::activemq::client;");
-        out.println("        using namespace apache::activemq::client::command;");
-        out.println("        using namespace apache::activemq::client::io;");
-        out.println("");
-        out.println("/*");
-        out.println(" * ");
-        out.println(" */");
-        out.println("class MarshallerFactory");
-        out.println("{");
-        out.println("public:");
-        out.println("    MarshallerFactory() ;");
-        out.println("    virtual ~MarshallerFactory() ;");
-        out.println("");
-        out.println("    virtual void configure(ProtocolFormat& format) ;");
-        out.println("} ;");
-        out.println("");
-        out.println("/* namespace */");
-        out.println("      }");
-        out.println("    }");
-        out.println("  }");
-        out.println("}");
-        out.println("");
-        out.println("#endif /*MarshallerFactory_hpp_*/");
-        out.println("");
-    }
-
-    public String getTargetDir() {
-        return targetDir;
-    }
-
-    public void setTargetDir(String targetDir) {
-        this.targetDir = targetDir;
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaGeneratorTask.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaGeneratorTask.java
deleted file mode 100644
index c6f4013..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaGeneratorTask.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.codehaus.jam.JamService;
-import org.codehaus.jam.JamServiceFactory;
-import org.codehaus.jam.JamServiceParams;
-
-/**
- * 
- */
-public class JavaGeneratorTask extends Task {
-
-    int version = 2;
-    File basedir = new File(".");
-
-    public static void main(String[] args) {
-
-        Project project = new Project();
-        project.init();
-        JavaGeneratorTask generator = new JavaGeneratorTask();
-        generator.setProject(project);
-
-        if (args.length > 0) {
-            generator.version = Integer.parseInt(args[0]);
-        }
-
-        if (args.length > 1) {
-            generator.basedir = new File(args[1]);
-        }
-
-        generator.execute();
-    }
-
-    public void execute() throws BuildException {
-        try {
-
-            String sourceDir = basedir + "/src/main/java";
-
-            System.out.println("Parsing source files in: " + sourceDir);
-
-            JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
-            JamServiceParams params = jamServiceFactory.createServiceParams();
-            File[] dirs = new File[] {
-                new File(sourceDir)
-            };
-            params.includeSourcePattern(dirs, "**/*.java");
-            JamService jam = jamServiceFactory.createService(params);
-
-            {
-                JavaMarshallingGenerator script = new JavaMarshallingGenerator();
-                script.setJam(jam);
-                script.setTargetDir(basedir + "/src/main/java");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-            {
-                JavaTestsGenerator script = new JavaTestsGenerator();
-                script.setJam(jam);
-                script.setTargetDir(basedir + "/src/test/java");
-                script.setOpenwireVersion(version);
-                script.run();
-            }
-
-        } catch (Exception e) {
-            throw new BuildException(e);
-        }
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    public File getBasedir() {
-        return basedir;
-    }
-
-    public void setBasedir(File basedir) {
-        this.basedir = basedir;
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaMarshallingGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaMarshallingGenerator.java
deleted file mode 100644
index 2354e47..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaMarshallingGenerator.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JPackage;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class JavaMarshallingGenerator extends MultiSourceGenerator {
-
-    protected List<JClass> concreteClasses = new ArrayList<JClass>();
-    protected File factoryFile;
-    protected String factoryFileName = "MarshallerFactory";
-    protected String indent = "    ";
-    protected String targetDir = "src/main/java";
-
-    public Object run() {
-        if (destDir == null) {
-            destDir = new File(targetDir + "/org/apache/activemq/openwire/v" + getOpenwireVersion());
-        }
-        Object answer = super.run();
-        processFactory();
-        return answer;
-    }
-
-    protected void generateFile(PrintWriter out) throws Exception {
-
-        generateLicence(out);
-        out.println("");
-        out.println("package org.apache.activemq.openwire.v" + getOpenwireVersion() + ";");
-        out.println("");
-        out.println("import java.io.DataInput;");
-        out.println("import java.io.DataOutput;");
-        out.println("import java.io.IOException;");
-        out.println("");
-        out.println("import org.apache.activemq.openwire.*;");
-        out.println("import org.apache.activemq.command.*;");
-        out.println("");
-        out.println("");
-        for (int i = 0; i < getJclass().getImportedPackages().length; i++) {
-            JPackage pkg = getJclass().getImportedPackages()[i];
-            for (int j = 0; j < pkg.getClasses().length; j++) {
-                JClass clazz = pkg.getClasses()[j];
-                out.println("import " + clazz.getQualifiedName() + ";");
-            }
-        }
-
-        out.println("");
-        out.println("/**");
-        out.println(" * Marshalling code for Open Wire Format for " + getClassName() + "");
-        out.println(" *");
-        out.println(" *");
-        out.println(" * NOTE!: This file is auto generated - do not modify!");
-        out.println(" *        if you need to make a change, please see the modify the groovy scripts in the");
-        out.println(" *        under src/gram/script and then use maven openwire:generate to regenerate ");
-        out.println(" *        this file.");
-        out.println(" *");
-        out.println(" * ");
-        out.println(" */");
-        out.println("public " + getAbstractClassText() + "class " + getClassName() + " extends " + getBaseClass() + " {");
-        out.println("");
-
-        if (!isAbstractClass()) {
-
-            out.println("    /**");
-            out.println("     * Return the type of Data Structure we marshal");
-            out.println("     * @return short representation of the type data structure");
-            out.println("     */");
-            out.println("    public byte getDataStructureType() {");
-            out.println("        return " + getJclass().getSimpleName() + ".DATA_STRUCTURE_TYPE;");
-            out.println("    }");
-            out.println("    ");
-            out.println("    /**");
-            out.println("     * @return a new object instance");
-            out.println("     */");
-            out.println("    public DataStructure createObject() {");
-            out.println("        return new " + getJclass().getSimpleName() + "();");
-            out.println("    }");
-            out.println("");
-        }
-
-        out.println("    /**");
-        out.println("     * Un-marshal an object instance from the data input stream");
-        out.println("     *");
-        out.println("     * @param o the object to un-marshal");
-        out.println("     * @param dataIn the data input stream to build the object from");
-        out.println("     * @throws IOException");
-        out.println("     */");
-        out.println("    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {");
-        out.println("        super.tightUnmarshal(wireFormat, o, dataIn, bs);");
-
-        if (!getProperties().isEmpty()) {
-            out.println("");
-            out.println("        " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
-        }
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.beforeUnmarshall(wireFormat);");
-            out.println("        ");
-        }
-
-        generateTightUnmarshalBody(out);
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.afterUnmarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("    }");
-        out.println("");
-        out.println("");
-        out.println("    /**");
-        out.println("     * Write the booleans that this object uses to a BooleanStream");
-        out.println("     */");
-        out.println("    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {");
-
-        if (!getProperties().isEmpty()) {
-            out.println("");
-            out.println("        " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
-        }
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.beforeMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("        int rc = super.tightMarshal1(wireFormat, o, bs);");
-        int baseSize = generateTightMarshal1Body(out);
-
-        out.println("");
-        out.println("        return rc + " + baseSize + ";");
-        out.println("    }");
-        out.println("");
-        out.println("    /**");
-        out.println("     * Write a object instance to data output stream");
-        out.println("     *");
-        out.println("     * @param o the instance to be marshaled");
-        out.println("     * @param dataOut the output stream");
-        out.println("     * @throws IOException thrown if an error occurs");
-        out.println("     */");
-        out.println("    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {");
-        out.println("        super.tightMarshal2(wireFormat, o, dataOut, bs);");
-        if (!getProperties().isEmpty()) {
-            out.println("");
-            out.println("        " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
-        }
-
-        generateTightMarshal2Body(out);
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.afterMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("    }");
-        out.println("");
-        out.println("    /**");
-        out.println("     * Un-marshal an object instance from the data input stream");
-        out.println("     *");
-        out.println("     * @param o the object to un-marshal");
-        out.println("     * @param dataIn the data input stream to build the object from");
-        out.println("     * @throws IOException");
-        out.println("     */");
-        out.println("    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {");
-        out.println("        super.looseUnmarshal(wireFormat, o, dataIn);");
-
-        if (!getProperties().isEmpty()) {
-            out.println("");
-            out.println("        " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
-        }
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.beforeUnmarshall(wireFormat);");
-            out.println("        ");
-        }
-
-        generateLooseUnmarshalBody(out);
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.afterUnmarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("    }");
-        out.println("");
-        out.println("");
-        out.println("    /**");
-        out.println("     * Write the booleans that this object uses to a BooleanStream");
-        out.println("     */");
-        out.println("    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {");
-
-        if (!getProperties().isEmpty()) {
-            out.println("");
-            out.println("        " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
-        }
-
-        if (isMarshallerAware()) {
-            out.println("");
-            out.println("        info.beforeMarshall(wireFormat);");
-        }
-
-        out.println("");
-        out.println("        super.looseMarshal(wireFormat, o, dataOut);");
-
-        generateLooseMarshalBody(out);
-
-        out.println("");
-        out.println("    }");
-        out.println("}");
-    }
-
-    private void generateLicence(PrintWriter out) {
-        out.println("/**");
-        out.println(" *");
-        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-        out.println(" * this work for additional information regarding copyright ownership.");
-        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-        out.println(" * (the \"License\"); you may not use this file except in compliance with");
-        out.println(" * the License.  You may obtain a copy of the License at");
-        out.println(" *");
-        out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
-        out.println(" *");
-        out.println(" * Unless required by applicable law or agreed to in writing, software");
-        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        out.println(" * See the License for the specific language governing permissions and");
-        out.println(" * limitations under the License.");
-        out.println(" */");
-    }
-
-    protected void processFactory() {
-        if (factoryFile == null) {
-            factoryFile = new File(destDir, factoryFileName + filePostFix);
-        }
-        PrintWriter out = null;
-        try {
-            out = new PrintWriter(new FileWriter(factoryFile));
-            generateFactory(out);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (out != null) {
-                out.close();
-            }
-        }
-    }
-
-    protected void generateFactory(PrintWriter out) {
-        generateLicence(out);
-        out.println("");
-        out.println("package org.apache.activemq.openwire.v" + getOpenwireVersion() + ";");
-        out.println("");
-        out.println("import org.apache.activemq.openwire.DataStreamMarshaller;");
-        out.println("import org.apache.activemq.openwire.OpenWireFormat;");
-        out.println("");
-        out.println("/**");
-        out.println(" * MarshallerFactory for Open Wire Format.");
-        out.println(" *");
-        out.println(" *");
-        out.println(" * NOTE!: This file is auto generated - do not modify!");
-        out.println(" *        if you need to make a change, please see the modify the groovy scripts in the");
-        out.println(" *        under src/gram/script and then use maven openwire:generate to regenerate ");
-        out.println(" *        this file.");
-        out.println(" *");
-        out.println(" * ");
-        out.println(" */");
-        out.println("public class MarshallerFactory {");
-        out.println("");
-        out.println("    /**");
-        out.println("     * Creates a Map of command type -> Marshallers");
-        out.println("     */");
-        out.println("    static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];");
-        out.println("    static {");
-        out.println("");
-
-        List<JClass> list = new ArrayList<JClass>(getConcreteClasses());
-        Collections.sort(list, new Comparator() {
-            public int compare(Object o1, Object o2) {
-                JClass c1 = (JClass)o1;
-                JClass c2 = (JClass)o2;
-                return c1.getSimpleName().compareTo(c2.getSimpleName());
-            }
-        });
-
-        for (Iterator<JClass> iter = list.iterator(); iter.hasNext();) {
-            JClass jclass = iter.next();
-            out.println("        add(new " + jclass.getSimpleName() + "Marshaller());");
-        }
-
-        out.println("");
-        out.println("    }");
-        out.println("");
-        out.println("    static private void add(DataStreamMarshaller dsm) {");
-        out.println("        marshaller[dsm.getDataStructureType()] = dsm;");
-        out.println("    }");
-        out.println("    ");
-        out.println("    static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {");
-        out.println("        return marshaller;");
-        out.println("    }");
-        out.println("}");
-    }
-
-    protected void processClass(JClass jclass) {
-        super.processClass(jclass);
-
-        if (!jclass.isAbstract()) {
-            concreteClasses.add(jclass);
-        }
-    }
-
-    protected String getClassName(JClass jclass) {
-        return super.getClassName(jclass) + "Marshaller";
-    }
-
-    protected String getBaseClassName(JClass jclass) {
-        String answer = "BaseDataStreamMarshaller";
-        JClass superclass = jclass.getSuperclass();
-        if (superclass != null) {
-            String superName = superclass.getSimpleName();
-            if (!superName.equals("Object") && !superName.equals("JNDIBaseStorable") && !superName.equals("DataStructureSupport")) {
-                answer = superName + "Marshaller";
-            }
-        }
-        return answer;
-    }
-
-    protected void initialiseManuallyMaintainedClasses() {
-    }
-
-    protected void generateTightUnmarshalBody(PrintWriter out) {
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String propertyTypeName = propertyType.getSimpleName();
-
-            if (propertyType.isArrayType() && !propertyTypeName.equals("byte[]")) {
-                generateTightUnmarshalBodyForArrayProperty(out, property, size);
-            } else {
-                generateTightUnmarshalBodyForProperty(out, property, size);
-            }
-        }
-    }
-
-    protected void generateTightUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        String setter = property.getSetter().getSimpleName();
-        String type = property.getType().getSimpleName();
-
-        if (type.equals("boolean")) {
-            out.println("        info." + setter + "(bs.readBoolean());");
-        } else if (type.equals("byte")) {
-            out.println("        info." + setter + "(dataIn.readByte());");
-        } else if (type.equals("char")) {
-            out.println("        info." + setter + "(dataIn.readChar());");
-        } else if (type.equals("short")) {
-            out.println("        info." + setter + "(dataIn.readShort());");
-        } else if (type.equals("int")) {
-            out.println("        info." + setter + "(dataIn.readInt());");
-        } else if (type.equals("long")) {
-            out.println("        info." + setter + "(tightUnmarshalLong(wireFormat, dataIn, bs));");
-        } else if (type.equals("String")) {
-            out.println("        info." + setter + "(tightUnmarshalString(dataIn, bs));");
-        } else if (type.equals("byte[]")) {
-            if (size != null) {
-                out.println("        info." + setter + "(tightUnmarshalConstByteArray(dataIn, bs, " + size.asInt() + "));");
-            } else {
-                out.println("        info." + setter + "(tightUnmarshalByteArray(dataIn, bs));");
-            }
-        } else if (type.equals("ByteSequence")) {
-            out.println("        info." + setter + "(tightUnmarshalByteSequence(dataIn, bs));");
-        } else if (isThrowable(property.getType())) {
-            out.println("        info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalThrowable(wireFormat, dataIn, bs));");
-        } else if (isCachedProperty(property)) {
-            out.println("        info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalCachedObject(wireFormat, dataIn, bs));");
-        } else {
-            out.println("        info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalNestedObject(wireFormat, dataIn, bs));");
-        }
-    }
-
-    protected void generateTightUnmarshalBodyForArrayProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        JClass propertyType = property.getType();
-        String arrayType = propertyType.getArrayComponentType().getQualifiedName();
-        String setter = property.getSetter().getSimpleName();
-        out.println();
-        if (size != null) {
-            out.println("        {");
-            out.println("            " + arrayType + " value[] = new " + arrayType + "[" + size.asInt() + "];");
-            out.println("            " + "for( int i=0; i < " + size.asInt() + "; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") tightUnmarsalNestedObject(wireFormat,dataIn, bs);");
-            out.println("            }");
-            out.println("            info." + setter + "(value);");
-            out.println("        }");
-        } else {
-            out.println("        if (bs.readBoolean()) {");
-            out.println("            short size = dataIn.readShort();");
-            out.println("            " + arrayType + " value[] = new " + arrayType + "[size];");
-            out.println("            for( int i=0; i < size; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") tightUnmarsalNestedObject(wireFormat,dataIn, bs);");
-            out.println("            }");
-            out.println("            info." + setter + "(value);");
-            out.println("        }");
-            out.println("        else {");
-            out.println("            info." + setter + "(null);");
-            out.println("        }");
-        }
-    }
-
-    protected int generateTightMarshal1Body(PrintWriter out) {
-        List properties = getProperties();
-        int baseSize = 0;
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getGetter().getSimpleName() + "()";
-
-            if (type.equals("boolean")) {
-                out.println("        bs.writeBoolean(" + getter + ");");
-            } else if (type.equals("byte")) {
-                baseSize += 1;
-            } else if (type.equals("char")) {
-                baseSize += 2;
-            } else if (type.equals("short")) {
-                baseSize += 2;
-            } else if (type.equals("int")) {
-                baseSize += 4;
-            } else if (type.equals("long")) {
-                out.println("        rc+=tightMarshalLong1(wireFormat, " + getter + ", bs);");
-            } else if (type.equals("String")) {
-                out.println("        rc += tightMarshalString1(" + getter + ", bs);");
-            } else if (type.equals("byte[]")) {
-                if (size == null) {
-                    out.println("        rc += tightMarshalByteArray1(" + getter + ", bs);");
-                } else {
-                    out.println("        rc += tightMarshalConstByteArray1(" + getter + ", bs, " + size.asInt() + ");");
-                }
-            } else if (type.equals("ByteSequence")) {
-                out.println("        rc += tightMarshalByteSequence1(" + getter + ", bs);");
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("        rc += tightMarshalObjectArrayConstSize1(wireFormat, " + getter + ", bs, " + size.asInt() + ");");
-                } else {
-                    out.println("        rc += tightMarshalObjectArray1(wireFormat, " + getter + ", bs);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("        rc += tightMarshalThrowable1(wireFormat, " + getter + ", bs);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("        rc += tightMarshalCachedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
-                } else {
-                    out.println("        rc += tightMarshalNestedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
-                }
-            }
-        }
-        return baseSize;
-    }
-
-    protected void generateTightMarshal2Body(PrintWriter out) {
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getGetter().getSimpleName() + "()";
-
-            if (type.equals("boolean")) {
-                out.println("        bs.readBoolean();");
-            } else if (type.equals("byte")) {
-                out.println("        dataOut.writeByte(" + getter + ");");
-            } else if (type.equals("char")) {
-                out.println("        dataOut.writeChar(" + getter + ");");
-            } else if (type.equals("short")) {
-                out.println("        dataOut.writeShort(" + getter + ");");
-            } else if (type.equals("int")) {
-                out.println("        dataOut.writeInt(" + getter + ");");
-            } else if (type.equals("long")) {
-                out.println("        tightMarshalLong2(wireFormat, " + getter + ", dataOut, bs);");
-            } else if (type.equals("String")) {
-                out.println("        tightMarshalString2(" + getter + ", dataOut, bs);");
-            } else if (type.equals("byte[]")) {
-                if (size != null) {
-                    out.println("        tightMarshalConstByteArray2(" + getter + ", dataOut, bs, " + size.asInt() + ");");
-                } else {
-                    out.println("        tightMarshalByteArray2(" + getter + ", dataOut, bs);");
-                }
-            } else if (type.equals("ByteSequence")) {
-                out.println("        tightMarshalByteSequence2(" + getter + ", dataOut, bs);");
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("        tightMarshalObjectArrayConstSize2(wireFormat, " + getter + ", dataOut, bs, " + size.asInt() + ");");
-                } else {
-                    out.println("        tightMarshalObjectArray2(wireFormat, " + getter + ", dataOut, bs);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("        tightMarshalThrowable2(wireFormat, " + getter + ", dataOut, bs);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("        tightMarshalCachedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
-                } else {
-                    out.println("        tightMarshalNestedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
-                }
-            }
-        }
-    }
-
-    protected void generateLooseMarshalBody(PrintWriter out) {
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String type = propertyType.getSimpleName();
-            String getter = "info." + property.getGetter().getSimpleName() + "()";
-
-            if (type.equals("boolean")) {
-                out.println("        dataOut.writeBoolean(" + getter + ");");
-            } else if (type.equals("byte")) {
-                out.println("        dataOut.writeByte(" + getter + ");");
-            } else if (type.equals("char")) {
-                out.println("        dataOut.writeChar(" + getter + ");");
-            } else if (type.equals("short")) {
-                out.println("        dataOut.writeShort(" + getter + ");");
-            } else if (type.equals("int")) {
-                out.println("        dataOut.writeInt(" + getter + ");");
-            } else if (type.equals("long")) {
-                out.println("        looseMarshalLong(wireFormat, " + getter + ", dataOut);");
-            } else if (type.equals("String")) {
-                out.println("        looseMarshalString(" + getter + ", dataOut);");
-            } else if (type.equals("byte[]")) {
-                if (size != null) {
-                    out.println("        looseMarshalConstByteArray(wireFormat, " + getter + ", dataOut, " + size.asInt() + ");");
-                } else {
-                    out.println("        looseMarshalByteArray(wireFormat, " + getter + ", dataOut);");
-                }
-            } else if (type.equals("ByteSequence")) {
-                out.println("        looseMarshalByteSequence(wireFormat, " + getter + ", dataOut);");
-            } else if (propertyType.isArrayType()) {
-                if (size != null) {
-                    out.println("        looseMarshalObjectArrayConstSize(wireFormat, " + getter + ", dataOut, " + size.asInt() + ");");
-                } else {
-                    out.println("        looseMarshalObjectArray(wireFormat, " + getter + ", dataOut);");
-                }
-            } else if (isThrowable(propertyType)) {
-                out.println("        looseMarshalThrowable(wireFormat, " + getter + ", dataOut);");
-            } else {
-                if (isCachedProperty(property)) {
-                    out.println("        looseMarshalCachedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
-                } else {
-                    out.println("        looseMarshalNestedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
-                }
-            }
-        }
-    }
-
-    protected void generateLooseUnmarshalBody(PrintWriter out) {
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            JAnnotationValue size = annotation.getValue("size");
-            JClass propertyType = property.getType();
-            String propertyTypeName = propertyType.getSimpleName();
-
-            if (propertyType.isArrayType() && !propertyTypeName.equals("byte[]")) {
-                generateLooseUnmarshalBodyForArrayProperty(out, property, size);
-            } else {
-                generateLooseUnmarshalBodyForProperty(out, property, size);
-            }
-        }
-    }
-
-    protected void generateLooseUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        String setter = property.getSetter().getSimpleName();
-        String type = property.getType().getSimpleName();
-
-        if (type.equals("boolean")) {
-            out.println("        info." + setter + "(dataIn.readBoolean());");
-        } else if (type.equals("byte")) {
-            out.println("        info." + setter + "(dataIn.readByte());");
-        } else if (type.equals("char")) {
-            out.println("        info." + setter + "(dataIn.readChar());");
-        } else if (type.equals("short")) {
-            out.println("        info." + setter + "(dataIn.readShort());");
-        } else if (type.equals("int")) {
-            out.println("        info." + setter + "(dataIn.readInt());");
-        } else if (type.equals("long")) {
-            out.println("        info." + setter + "(looseUnmarshalLong(wireFormat, dataIn));");
-        } else if (type.equals("String")) {
-            out.println("        info." + setter + "(looseUnmarshalString(dataIn));");
-        } else if (type.equals("byte[]")) {
-            if (size != null) {
-                out.println("        info." + setter + "(looseUnmarshalConstByteArray(dataIn, " + size.asInt() + "));");
-            } else {
-                out.println("        info." + setter + "(looseUnmarshalByteArray(dataIn));");
-            }
-        } else if (type.equals("ByteSequence")) {
-            out.println("        info." + setter + "(looseUnmarshalByteSequence(dataIn));");
-        } else if (isThrowable(property.getType())) {
-            out.println("        info." + setter + "((" + property.getType().getQualifiedName() + ") looseUnmarsalThrowable(wireFormat, dataIn));");
-        } else if (isCachedProperty(property)) {
-            out.println("        info." + setter + "((" + property.getType().getQualifiedName() + ") looseUnmarsalCachedObject(wireFormat, dataIn));");
-        } else {
-            out.println("        info." + setter + "((" + property.getType().getQualifiedName() + ") looseUnmarsalNestedObject(wireFormat, dataIn));");
-        }
-    }
-
-    protected void generateLooseUnmarshalBodyForArrayProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
-        JClass propertyType = property.getType();
-        String arrayType = propertyType.getArrayComponentType().getQualifiedName();
-        String setter = property.getSetter().getSimpleName();
-        out.println();
-        if (size != null) {
-            out.println("        {");
-            out.println("            " + arrayType + " value[] = new " + arrayType + "[" + size.asInt() + "];");
-            out.println("            " + "for( int i=0; i < " + size.asInt() + "; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") looseUnmarsalNestedObject(wireFormat,dataIn);");
-            out.println("            }");
-            out.println("            info." + setter + "(value);");
-            out.println("        }");
-        } else {
-            out.println("        if (dataIn.readBoolean()) {");
-            out.println("            short size = dataIn.readShort();");
-            out.println("            " + arrayType + " value[] = new " + arrayType + "[size];");
-            out.println("            for( int i=0; i < size; i++ ) {");
-            out.println("                value[i] = (" + arrayType + ") looseUnmarsalNestedObject(wireFormat,dataIn);");
-            out.println("            }");
-            out.println("            info." + setter + "(value);");
-            out.println("        }");
-            out.println("        else {");
-            out.println("            info." + setter + "(null);");
-            out.println("        }");
-        }
-    }
-
-    /**
-     * Returns whether or not the given annotation has a mandatory flag on it or
-     * not
-     */
-    protected String getMandatoryFlag(JAnnotation annotation) {
-        JAnnotationValue value = annotation.getValue("mandatory");
-        if (value != null) {
-            String text = value.asString();
-            if (text != null && text.equalsIgnoreCase("true")) {
-                return "true";
-            }
-        }
-        return "false";
-    }
-
-    public List<JClass> getConcreteClasses() {
-        return concreteClasses;
-    }
-
-    public void setConcreteClasses(List<JClass> concreteClasses) {
-        this.concreteClasses = concreteClasses;
-    }
-
-    public File getFactoryFile() {
-        return factoryFile;
-    }
-
-    public void setFactoryFile(File factoryFile) {
-        this.factoryFile = factoryFile;
-    }
-
-    public String getFactoryFileName() {
-        return factoryFileName;
-    }
-
-    public void setFactoryFileName(String factoryFileName) {
-        this.factoryFileName = factoryFileName;
-    }
-
-    public String getIndent() {
-        return indent;
-    }
-
-    public void setIndent(String indent) {
-        this.indent = indent;
-    }
-
-    public String getTargetDir() {
-        return targetDir;
-    }
-
-    public void setTargetDir(String sourceDir) {
-        this.targetDir = sourceDir;
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaTestsGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaTestsGenerator.java
deleted file mode 100644
index bbbb963..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaTestsGenerator.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JPackage;
-import org.codehaus.jam.JProperty;
-
-/**
- * 
- */
-public class JavaTestsGenerator extends MultiSourceGenerator {
-
-    protected String targetDir = "src/test/java";
-
-    public Object run() {
-        if (destDir == null) {
-            destDir = new File(targetDir + "/org/apache/activemq/openwire/v" + getOpenwireVersion());
-        }
-        return super.run();
-    }
-
-    protected String getClassName(JClass jclass) {
-        if (isAbstract(jclass)) {
-            return super.getClassName(jclass) + "TestSupport";
-        } else {
-            return super.getClassName(jclass) + "Test";
-        }
-    }
-
-    protected String getBaseClassName(JClass jclass) {
-        String answer = "DataFileGeneratorTestSupport";
-        if (superclass != null) {
-            String name = superclass.getSimpleName();
-            if (name != null && !name.equals("JNDIBaseStorable") && !name.equals("DataStructureSupport") && !name.equals("Object")) {
-                answer = name + "Test";
-                if (isAbstract(getJclass().getSuperclass())) {
-                    answer += "Support";
-                }
-            }
-        }
-        return answer;
-    }
-
-    private void generateLicence(PrintWriter out) {
-        out.println("/**");
-        out.println(" *");
-        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-        out.println(" * this work for additional information regarding copyright ownership.");
-        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-        out.println(" * (the \"License\"); you may not use this file except in compliance with");
-        out.println(" * the License.  You may obtain a copy of the License at");
-        out.println(" *");
-        out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
-        out.println(" *");
-        out.println(" * Unless required by applicable law or agreed to in writing, software");
-        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        out.println(" * See the License for the specific language governing permissions and");
-        out.println(" * limitations under the License.");
-        out.println(" */");
-    }
-
-    protected void generateFile(PrintWriter out) {
-
-        generateLicence(out);
-
-        out.println("package org.apache.activemq.openwire.v" + openwireVersion + ";");
-        out.println("");
-        out.println("import java.io.DataInputStream;");
-        out.println("import java.io.DataOutputStream;");
-        out.println("import java.io.IOException;");
-        out.println("");
-        out.println("import org.apache.activemq.openwire.*;");
-        out.println("import org.apache.activemq.command.*;");
-        out.println("");
-        for (int i = 0; i < getJclass().getImportedPackages().length; i++) {
-            JPackage pkg = getJclass().getImportedPackages()[i];
-            for (int j = 0; j < pkg.getClasses().length; j++) {
-                JClass clazz = pkg.getClasses()[j];
-                out.println("import " + clazz.getQualifiedName() + ";");
-            }
-        }
-
-        out.println("");
-        out.println("/**");
-        out.println(" * Test case for the OpenWire marshalling for " + jclass.getSimpleName() + "");
-        out.println(" *");
-        out.println(" *");
-        out.println(" * NOTE!: This file is auto generated - do not modify!");
-        out.println(" *        if you need to make a change, please see the modify the groovy scripts in the");
-        out.println(" *        under src/gram/script and then use maven openwire:generate to regenerate ");
-        out.println(" *        this file.");
-        out.println(" *");
-        out.println(" * ");
-        out.println(" */");
-        out.println("public " + getAbstractClassText() + "class " + className + " extends " + baseClass + " {");
-        out.println("");
-        if (!isAbstractClass()) {
-            out.println("");
-            out.println("    public static " + jclass.getSimpleName() + "Test SINGLETON = new " + jclass.getSimpleName() + "Test();");
-            out.println("");
-            out.println("    public Object createObject() throws Exception {");
-            out.println("        " + jclass.getSimpleName() + " info = new " + jclass.getSimpleName() + "();");
-            out.println("        populateObject(info);");
-            out.println("        return info;");
-            out.println("    }");
-        }
-        out.println("");
-        out.println("    protected void populateObject(Object object) throws Exception {");
-        out.println("        super.populateObject(object);");
-        out.println("        " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ") object;");
-        out.println("");
-
-        TestDataGenerator generator = new TestDataGenerator();
-
-        List properties = getProperties();
-        for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty)iter.next();
-
-            JAnnotation annotation = property.getAnnotation("openwire:property");
-            String size = stringValue(annotation, "size");
-            String testSize = stringValue(annotation, "testSize");
-            String type = property.getType().getSimpleName();
-//            boolean cached = isCachedProperty(property);
-            String propertyName = property.getSimpleName();
-            if ("-1".equals(testSize)) {
-                continue;
-            }
-
-            String setterName = property.getSetter().getSimpleName();
-
-            if (type.equals("boolean")) {
-                out.println("        info." + setterName + "(" + generator.createBool() + ");");
-            } else if (type.equals("byte")) {
-                out.println("        info." + setterName + "(" + generator.createByte() + ");");
-            } else if (type.equals("char")) {
-                out.println("        info." + setterName + "(" + generator.createChar() + ");");
-            } else if (type.equals("short")) {
-                out.println("        info." + setterName + "(" + generator.createShort() + ");");
-            } else if (type.equals("int")) {
-                out.println("        info." + setterName + "(" + generator.createInt() + ");");
-            } else if (type.equals("long")) {
-                out.println("        info." + setterName + "(" + generator.createLong() + ");");
-            } else if (type.equals("byte[]")) {
-                out.println("        info." + setterName + "(" + generator.createByteArray(propertyName) + ");");
-            } else if (type.equals("String")) {
-                out.println("        info." + setterName + "(\"" + generator.createString(propertyName) + "\");");
-            } else if (type.equals("ByteSequence")) {
-                out.println("        {");
-                out.println("            byte data[] = " + generator.createByteArray(propertyName) + ";");
-                out.println("            info." + setterName + "(new org.apache.activemq.util.ByteSequence(data,0,data.length));");
-                out.println("}");
-            } else if (type.equals("Throwable")) {
-                out.println("        info." + setterName + "(createThrowable(\"" + generator.createString(propertyName) + "\"));");
-            } else {
-                if (property.getType().isArrayType()) {
-                    String arrayType = property.getType().getArrayComponentType().getSimpleName();
-                    if (size == null) {
-                        size = "2";
-                    }
-                    if (arrayType == jclass.getSimpleName()) {
-                        size = "0";
-                    }
-                    out.println("        {");
-                    out.println("            " + arrayType + " value[] = new " + arrayType + "[" + size + "];");
-                    out.println("            for( int i=0; i < " + size + "; i++ ) {");
-                    out.println("                value[i] = create" + arrayType + "(\"" + generator.createString(propertyName) + "\");");
-                    out.println("            }");
-                    out.println("            info." + setterName + "(value);");
-                    out.println("        }");
-                } else {
-                    out.println("        info." + setterName + "(create" + type + "(\"" + generator.createString(propertyName) + "\"));");
-                }
-            }
-        }
-
-        out.println("    }");
-        out.println("}");
-    }
-
-    public String getTargetDir() {
-        return targetDir;
-    }
-
-    public void setTargetDir(String targetDir) {
-        this.targetDir = targetDir;
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java
deleted file mode 100644
index 050361c..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.FixCRLF;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-import org.codehaus.jam.JamClassIterator;
-
-/**
- * 
- */
-public abstract class MultiSourceGenerator extends OpenWireGenerator {
-    protected Set<String> manuallyMaintainedClasses = new HashSet<String>();
-    protected File destDir;
-    protected File destFile;
-
-    protected JClass jclass;
-    protected JClass superclass;
-    protected String simpleName;
-    protected String className;
-    protected String baseClass;
-    protected StringBuffer buffer;
-
-    public MultiSourceGenerator() {
-        initialiseManuallyMaintainedClasses();
-    }
-
-    public Object run() {
-        if (destDir == null) {
-            throw new IllegalArgumentException("No destDir defined!");
-        }
-        System.out.println(getClass().getName() + " generating files in: " + destDir);
-        destDir.mkdirs();
-        buffer = new StringBuffer();
-
-        JamClassIterator iter = getClasses();
-        while (iter.hasNext()) {
-            try {
-                jclass = iter.nextClass();
-                if (isValidClass(jclass)) {
-                    processClass(jclass);
-                }
-            } catch (Exception e) {
-                System.err.println("Unable to process: " + jclass);
-                e.printStackTrace();
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Returns all the valid properties available on the current class
-     */
-    public List<JProperty> getProperties() {
-        List<JProperty> answer = new ArrayList<JProperty>();
-        JProperty[] properties = jclass.getDeclaredProperties();
-        for (int i = 0; i < properties.length; i++) {
-            JProperty property = properties[i];
-            if (isValidProperty(property)) {
-                answer.add(property);
-            }
-        }
-        return answer;
-    }
-
-    protected boolean isValidClass(JClass jclass) {
-        if (jclass.getAnnotation("openwire:marshaller") == null) {
-            return false;
-        }
-        return !manuallyMaintainedClasses.contains(jclass.getSimpleName());
-    }
-
-    protected void processClass(JClass jclass) {
-        simpleName = jclass.getSimpleName();
-        superclass = jclass.getSuperclass();
-
-        System.out.println(getClass().getName() + " processing class: " + simpleName);
-
-        className = getClassName(jclass);
-
-        destFile = new File(destDir, className + filePostFix);
-
-        baseClass = getBaseClassName(jclass);
-
-        PrintWriter out = null;
-        try {
-            out = new PrintWriter(new FileWriter(destFile));
-            generateFile(out);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (out != null) {
-                out.close();
-            }
-        }
-
-        // Use the FixCRLF Ant Task to make sure the file has consistent
-        // newlines
-        // so that SVN does not complain on checkin.
-        Project project = new Project();
-        project.init();
-        FixCRLF fixCRLF = new FixCRLF();
-        fixCRLF.setProject(project);
-        fixCRLF.setSrcdir(destFile.getParentFile());
-        fixCRLF.setIncludes(destFile.getName());
-        fixCRLF.execute();
-    }
-
-    protected abstract void generateFile(PrintWriter out) throws Exception;
-
-    protected String getBaseClassName(JClass jclass) {
-        String answer = "BaseDataStructure";
-        if (superclass != null) {
-            String name = superclass.getSimpleName();
-            if (name != null && !name.equals("Object")) {
-                answer = name;
-            }
-        }
-        return answer;
-    }
-
-    protected String getClassName(JClass jclass) {
-        return jclass.getSimpleName();
-    }
-
-    public boolean isAbstractClass() {
-        return jclass != null && jclass.isAbstract();
-    }
-
-    public String getAbstractClassText() {
-        return isAbstractClass() ? "abstract " : "";
-    }
-
-    public boolean isMarshallerAware() {
-        return isMarshallAware(jclass);
-    }
-
-    protected void initialiseManuallyMaintainedClasses() {
-        String[] names = {
-            "ActiveMQDestination", "ActiveMQTempDestination", "ActiveMQQueue", "ActiveMQTopic", "ActiveMQTempQueue", "ActiveMQTempTopic", "BaseCommand", "ActiveMQMessage", "ActiveMQTextMessage",
-            "ActiveMQMapMessage", "ActiveMQBytesMessage", "ActiveMQStreamMessage", "ActiveMQBlobMessage", "DataStructureSupport", "WireFormatInfo", "ActiveMQObjectMessage"
-        };
-
-        for (int i = 0; i < names.length; i++) {
-            manuallyMaintainedClasses.add(names[i]);
-        }
-    }
-
-    public String getBaseClass() {
-        return baseClass;
-    }
-
-    public void setBaseClass(String baseClass) {
-        this.baseClass = baseClass;
-    }
-
-    public String getClassName() {
-        return className;
-    }
-
-    public void setClassName(String className) {
-        this.className = className;
-    }
-
-    public File getDestDir() {
-        return destDir;
-    }
-
-    public void setDestDir(File destDir) {
-        this.destDir = destDir;
-    }
-
-    public File getDestFile() {
-        return destFile;
-    }
-
-    public void setDestFile(File destFile) {
-        this.destFile = destFile;
-    }
-
-    public JClass getJclass() {
-        return jclass;
-    }
-
-    public void setJclass(JClass jclass) {
-        this.jclass = jclass;
-    }
-
-    public Set<String> getManuallyMaintainedClasses() {
-        return manuallyMaintainedClasses;
-    }
-
-    public void setManuallyMaintainedClasses(Set<String> manuallyMaintainedClasses) {
-        this.manuallyMaintainedClasses = manuallyMaintainedClasses;
-    }
-
-    public String getSimpleName() {
-        return simpleName;
-    }
-
-    public void setSimpleName(String simpleName) {
-        this.simpleName = simpleName;
-    }
-
-    public JClass getSuperclass() {
-        return superclass;
-    }
-
-    public void setSuperclass(JClass superclass) {
-        this.superclass = superclass;
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/OpenWireGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/OpenWireGenerator.java
deleted file mode 100755
index 6e4db90..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/OpenWireGenerator.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JField;
-import org.codehaus.jam.JMethod;
-import org.codehaus.jam.JProperty;
-import org.codehaus.jam.JamClassIterator;
-import org.codehaus.jam.JamService;
-
-/**
- * 
- */
-public abstract class OpenWireGenerator {
-
-    protected int openwireVersion;
-    protected String filePostFix = ".java";
-    protected JamService jam;
-
-    public boolean isValidProperty(JProperty it) {
-        JMethod getter = it.getGetter();
-        return getter != null && it.getSetter() != null && !getter.isStatic() && getter.getAnnotation("openwire:property") != null;
-    }
-
-    public boolean isCachedProperty(JProperty it) {
-        JMethod getter = it.getGetter();
-        if (!isValidProperty(it)) {
-            return false;
-        }
-        JAnnotationValue value = getter.getAnnotation("openwire:property").getValue("cache");
-        return value != null && value.asBoolean();
-    }
-
-    public boolean isAbstract(JClass j) {
-        JField[] fields = j.getFields();
-        for (int i = 0; i < fields.length; i++) {
-            JField field = fields[i];
-            if (field.isStatic() && field.isPublic() && field.isFinal() && field.getSimpleName().equals("DATA_STRUCTURE_TYPE")) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public boolean isThrowable(JClass j) {
-        if (j.getQualifiedName().equals(Throwable.class.getName())) {
-            return true;
-        }
-        return j.getSuperclass() != null && isThrowable(j.getSuperclass());
-    }
-
-    public boolean isMarshallAware(JClass j) {
-        if (filePostFix.endsWith("java")) {
-            JClass[] interfaces = j.getInterfaces();
-            for (int i = 0; i < interfaces.length; i++) {
-                if (interfaces[i].getQualifiedName().equals("org.apache.activemq.command.MarshallAware")) {
-                    return true;
-                }
-            }
-            return false;
-        } else {
-            String simpleName = j.getSimpleName();
-            return simpleName.equals("ActiveMQMessage") || simpleName.equals("WireFormatInfo");
-        }
-        /*
-         * else { // is it a message type String simpleName = j.getSimpleName();
-         * JClass superclass = j.getSuperclass(); return
-         * simpleName.equals("ActiveMQMessage") || (superclass != null &&
-         * superclass.getSimpleName().equals("ActiveMQMessage")); }
-         */
-    }
-
-    public JamService getJam() {
-        return jam;
-    }
-
-    public JamClassIterator getClasses() {
-        return getJam().getClasses();
-    }
-
-    public int getOpenwireVersion() {
-        return openwireVersion;
-    }
-
-    public void setOpenwireVersion(int openwireVersion) {
-        this.openwireVersion = openwireVersion;
-    }
-
-    /**
-     * Converts the Java type to a C# type name
-     */
-    public String toCSharpType(JClass type) {
-        String name = type.getSimpleName();
-        if (name.equals("String")) {
-            return "string";
-        } else if (name.equals("Throwable") || name.equals("Exception")) {
-            return "BrokerError";
-        } else if (name.equals("ByteSequence")) {
-            return "byte[]";
-        } else if (name.equals("boolean")) {
-            return "bool";
-        } else {
-            return name;
-        }
-    }
-
-    public String getOpenWireOpCode(JClass element) {
-        if (element != null) {
-            JAnnotation annotation = element.getAnnotation("openwire:marshaller");
-            return stringValue(annotation, "code", "0");
-        }
-        return "0";
-    }
-
-    protected String stringValue(JAnnotation annotation, String name) {
-        return stringValue(annotation, name, null);
-    }
-
-    protected String stringValue(JAnnotation annotation, String name, String defaultValue) {
-        if (annotation != null) {
-            JAnnotationValue value = annotation.getValue(name);
-            if (value != null) {
-                return value.asString();
-            }
-        }
-        return defaultValue;
-    }
-
-    public void setJam(JamService jam) {
-        this.jam = jam;
-    }
-
-    public String decapitalize(String text) {
-        if (text == null) {
-            return null;
-        }
-        return text.substring(0, 1).toLowerCase() + text.substring(1);
-    }
-
-    public String capitalize(String text) {
-        if (text == null) {
-            return null;
-        }
-        return text.substring(0, 1).toUpperCase() + text.substring(1);
-    }
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/SingleSourceGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/SingleSourceGenerator.java
deleted file mode 100644
index 696b9bb..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/SingleSourceGenerator.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * 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.openwire.tool;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.FixCRLF;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-import org.codehaus.jam.JamClassIterator;
-
-/**
- * 
- */
-public abstract class SingleSourceGenerator extends OpenWireGenerator {
-
-    protected Set<String> manuallyMaintainedClasses = new HashSet<String>();
-    protected File destFile;
-
-    protected JClass jclass;
-    protected JClass superclass;
-    protected String simpleName;
-    protected String className;
-    protected String baseClass;
-    protected List<JClass> sortedClasses;
-
-    public SingleSourceGenerator() {
-        initialiseManuallyMaintainedClasses();
-    }
-
-    public Object run() {
-
-        if (destFile == null) {
-            throw new IllegalArgumentException("No destFile defined!");
-        }
-        destFile.getParentFile().mkdirs();
-
-        PrintWriter out = null;
-        try {
-            out = new PrintWriter(new FileWriter(destFile));
-
-            ArrayList<JClass> classes = new ArrayList<JClass>();
-            JamClassIterator iter = getClasses();
-            while (iter.hasNext()) {
-                jclass = iter.nextClass();
-                if (isValidClass(jclass)) {
-                    classes.add(jclass);
-                }
-            }
-            sortedClasses = sort(classes);
-
-            generateSetup(out);
-            for (Iterator<JClass> iterator = sortedClasses.iterator(); iterator.hasNext();) {
-                jclass = iterator.next();
-                simpleName = jclass.getSimpleName();
-                superclass = jclass.getSuperclass();
-                className = getClassName(jclass);
-                baseClass = getBaseClassName(jclass);
-
-                System.out.println(getClass().getName() + " processing class: " + simpleName);
-                generateFile(out);
-            }
-            generateTearDown(out);
-
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (out != null) {
-                out.close();
-            }
-        }
-
-        // Use the FixCRLF Ant Task to make sure the file has consistent
-        // newlines
-        // so that SVN does not complain on checkin.
-        Project project = new Project();
-        project.init();
-        FixCRLF fixCRLF = new FixCRLF();
-        fixCRLF.setProject(project);
-        fixCRLF.setSrcdir(destFile.getParentFile());
-        fixCRLF.setIncludes(destFile.getName());
-        fixCRLF.execute();
-        return null;
-    }
-
-    protected List<JClass> sort(List<JClass> classes) {
-        return classes;
-    }
-
-    protected void generateTearDown(PrintWriter out) {
-    }
-
-    protected void generateSetup(PrintWriter out) {
-    }
-
-    /**
-     * Returns all the valid properties available on the current class
-     */
-    public List<JProperty> getProperties() {
-        List<JProperty> answer = new ArrayList<JProperty>();
-        JProperty[] properties = jclass.getDeclaredProperties();
-        for (int i = 0; i < properties.length; i++) {
-            JProperty property = properties[i];
-            if (isValidProperty(property)) {
-                answer.add(property);
-            }
-        }
-        return answer;
-    }
-
-    protected boolean isValidClass(JClass jclass) {
-        if (jclass == null || jclass.getAnnotation("openwire:marshaller") == null) {
-            return false;
-        }
-        return true;
-        // return !manuallyMaintainedClasses.contains(jclass.getSimpleName());
-    }
-
-    protected abstract void generateFile(PrintWriter out) throws Exception;
-
-    protected String getBaseClassName(JClass jclass) {
-        String answer = "BaseDataStructure";
-        if (superclass != null) {
-            String name = superclass.getSimpleName();
-            if (name != null && !name.equals("Object")) {
-                answer = name;
-            }
-        }
-        return answer;
-    }
-
-    protected String getClassName(JClass jclass) {
-        return jclass.getSimpleName();
-    }
-
-    public boolean isAbstractClass() {
-        return jclass != null && jclass.isAbstract();
-    }
-
-    public String getAbstractClassText() {
-        return isAbstractClass() ? "abstract " : "";
-    }
-
-    public boolean isMarshallerAware() {
-        return isMarshallAware(jclass);
-    }
-
-    protected void initialiseManuallyMaintainedClasses() {
-        String[] names = {
-            "ActiveMQDestination", "ActiveMQTempDestination", "ActiveMQQueue", "ActiveMQTopic", "ActiveMQTempQueue", "ActiveMQTempTopic", "BaseCommand", "ActiveMQMessage", "ActiveMQTextMessage",
-            "ActiveMQMapMessage", "ActiveMQBytesMessage", "ActiveMQStreamMessage", "ActiveMQStreamMessage", "DataStructureSupport", "WireFormatInfo", "ActiveMQObjectMessage"
-        };
-
-        for (int i = 0; i < names.length; i++) {
-            manuallyMaintainedClasses.add(names[i]);
-        }
-    }
-
-    public String getBaseClass() {
-        return baseClass;
-    }
-
-    public void setBaseClass(String baseClass) {
-        this.baseClass = baseClass;
-    }
-
-    public String getClassName() {
-        return className;
-    }
-
-    public void setClassName(String className) {
-        this.className = className;
-    }
-
-    public File getDestFile() {
-        return destFile;
-    }
-
-    public void setDestFile(File destFile) {
-        this.destFile = destFile;
-    }
-
-    public JClass getJclass() {
-        return jclass;
-    }
-
-    public void setJclass(JClass jclass) {
-        this.jclass = jclass;
-    }
-
-    public Set<String> getManuallyMaintainedClasses() {
-        return manuallyMaintainedClasses;
-    }
-
-    public void setManuallyMaintainedClasses(Set<String> manuallyMaintainedClasses) {
-        this.manuallyMaintainedClasses = manuallyMaintainedClasses;
-    }
-
-    public String getSimpleName() {
-        return simpleName;
-    }
-
-    public void setSimpleName(String simpleName) {
-        this.simpleName = simpleName;
-    }
-
-    public JClass getSuperclass() {
-        return superclass;
-    }
-
-    public void setSuperclass(JClass superclass) {
-        this.superclass = superclass;
-    }
-
-}
diff --git a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/TestDataGenerator.java b/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/TestDataGenerator.java
deleted file mode 100644
index 8358630..0000000
--- a/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/TestDataGenerator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.openwire.tool;
-
-/**
- * A simple helper class to help auto-generate test data when code generating test cases
- * 
- * 
- */
-public class TestDataGenerator {
-    private int stringCounter;
-
-    private boolean boolCounter;
-    private byte byteCounter;
-    private char charCounter = 'a';
-    private short shortCounter;
-    private int intCounter;
-    private long longCounter;
-    
-    public String createByte() {
-        return "(byte) " + (++byteCounter);
-    }
-    
-    public String createChar() {
-        return "'" + (charCounter++) + "'";
-    }
-    
-    public String createShort() {
-        return "(short) " + (++shortCounter);
-    }
-
-    public int createInt() {
-        return ++intCounter;
-    }
-
-    public long createLong() {
-        return ++longCounter;
-    }
-
-    public String createString(String property) {
-        return property + ":" + (++stringCounter);
-    }
-
-    public boolean createBool() {
-        boolCounter = !boolCounter;
-        return boolCounter;
-    }
-    
-    public String createByteArray(String property) {
-        return "\"" + createString(property) + "\".getBytes()";
-    }
-}
diff --git a/trunk/activemq-optional/pom.xml b/trunk/activemq-optional/pom.xml
deleted file mode 100755
index cc395a4..0000000
--- a/trunk/activemq-optional/pom.xml
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-optional</artifactId>
-  <packaging>jar</packaging>
-  <name>ActiveMQ :: Optional</name>
-
-
-  <repositories>
-   <!-- Holds the josql artifacts -->
-   <repository>
-     <id>fusesource.m2</id>
-     <name>FUSE Community Release Repository</name>
-     <url>http://repo.fusesource.com/maven2</url>
-     <snapshots>
-       <enabled>false</enabled>
-     </snapshots>
-     <releases>
-       <enabled>true</enabled>
-     </releases>
-   </repository>
-  </repositories>
-  
-
-  <dependencies>
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <type>test-jar</type>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-console</artifactId>
-    </dependency>
-        
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-      <version>${spring-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-jms</artifactId>
-      <version>${spring-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>aopalliance</groupId>
-      <artifactId>aopalliance</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>xpp3</groupId>
-      <artifactId>xpp3</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.eclipse.jetty.aggregate</groupId>
-      <artifactId>jetty-all-server</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-webapp</artifactId>
-      <version>${jetty-version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-websocket</artifactId>
-        <version>${jetty-version}</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>axis</groupId>
-      <artifactId>axis</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>compile</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>xmlbeans</groupId>
-      <artifactId>xbean</artifactId>
-      <optional>true</optional>
-    </dependency>
-
-    <dependency>
-      <groupId>xmlbeans</groupId>
-      <artifactId>xmlpublic</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>xmlbeans</groupId>
-      <artifactId>xbean_xpath</artifactId>
-      <optional>true</optional>
-    </dependency>    
-    
-    <dependency>
-      <groupId>xalan</groupId>
-      <artifactId>xalan</artifactId>
-      <optional>true</optional>
-    </dependency>     
-    <dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax-api</artifactId>
-      <optional>true</optional>
-    </dependency>    
-
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>compile</scope>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-    	<groupId>org.springframework.ws</groupId>
-    	<artifactId>spring-oxm-tiger</artifactId>
-    	<optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-      <scope>test</scope>
-    </dependency>    
-    <dependency>
-      <groupId>org.codehaus.jettison</groupId>
-      <artifactId>jettison</artifactId>
-      <scope>test</scope>
-    </dependency>  
-    
-    <dependency>
-      <groupId>org.apache.velocity</groupId>
-      <artifactId>velocity</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>net.sf.josql</groupId>
-      <artifactId>josql</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>net.sf.josql</groupId>
-      <artifactId>gentlyweb-utils</artifactId>
-    </dependency>
-    
-         
-  </dependencies>
-
-  <build>
-    <plugins>
-
-      <!-- Configure which tests are included/excuded -->
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-        </configuration>
-      </plugin>
-
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
deleted file mode 100755
index 2884c2e..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.axis;
-
-import java.util.HashMap;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnectionFactory;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.axis.components.jms.BeanVendorAdapter;
-import org.apache.axis.transport.jms.JMSURLHelper;
-
-/**
- * An adapter for using ActiveMQ inside <a
- * href="http://ws.apache.org/axis/">Apache Axis</a>
- * 
- * 
- */
-public class ActiveMQVendorAdapter extends BeanVendorAdapter {
-
-    /**
-     * The URL to connect to the broker
-     */
-    public static final String BROKER_URL = "brokerURL";
-
-    /**
-     * Specifies the default user name
-     */
-    public static final String DEFAULT_USERNAME = "defaultUser";
-
-    /**
-     * Specifies the default password
-     */
-    public static final String DEFAULT_PASSWORD = "defaultPassword";
-
-    protected static final String QCF_CLASS = ActiveMQConnectionFactory.class.getName();
-    protected static final String TCF_CLASS = QCF_CLASS;
-
-
-    public QueueConnectionFactory getQueueConnectionFactory(HashMap properties) throws Exception {
-        properties = (HashMap)properties.clone();
-        properties.put(CONNECTION_FACTORY_CLASS, QCF_CLASS);
-        return super.getQueueConnectionFactory(properties);
-    }
-
-    public TopicConnectionFactory getTopicConnectionFactory(HashMap properties) throws Exception {
-        properties = (HashMap)properties.clone();
-        properties.put(CONNECTION_FACTORY_CLASS, TCF_CLASS);
-        return super.getTopicConnectionFactory(properties);
-    }
-
-    public void addVendorConnectionFactoryProperties(JMSURLHelper jmsUrl, HashMap properties) {
-        if (jmsUrl.getPropertyValue(BROKER_URL) != null) {
-            properties.put(BROKER_URL, jmsUrl.getPropertyValue(BROKER_URL));
-        }
-
-        if (jmsUrl.getPropertyValue(DEFAULT_USERNAME) != null) {
-            properties.put(DEFAULT_USERNAME, jmsUrl.getPropertyValue(DEFAULT_USERNAME));
-        }
-        if (jmsUrl.getPropertyValue(DEFAULT_PASSWORD) != null) {
-            properties.put(DEFAULT_PASSWORD, jmsUrl.getPropertyValue(DEFAULT_PASSWORD));
-        }
-    }
-
-    public boolean isMatchingConnectionFactory(ConnectionFactory connectionFactory, JMSURLHelper jmsURL, HashMap properties) {
-        String brokerURL = null;
-
-        if (connectionFactory instanceof ActiveMQConnectionFactory) {
-            ActiveMQConnectionFactory amqConnectionFactory = (ActiveMQConnectionFactory)connectionFactory;
-
-            // get existing queue connection factory properties
-            brokerURL = amqConnectionFactory.getBrokerURL();
-        }
-
-        // compare broker url
-        String propertyBrokerURL = (String)properties.get(BROKER_URL);
-        if (brokerURL == null || !brokerURL.equals(propertyBrokerURL)) {
-            return false;
-        }
-        return true;
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/package.html b/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/package.html
deleted file mode 100755
index 8067d74..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-	Support classes for integration with <a href="http://ws.apache.org/axis/">Apache Axis</a>
-	for web service integration
-
-</body>
-</html>
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
deleted file mode 100755
index 2ce7cbf..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.benchmark;
-
-import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.util.IdGenerator;
-
-/**
- * Abstract base class for some simple benchmark tools
- * 
- * @author James Strachan
- * 
- */
-public class BenchmarkSupport {
-
-    protected int connectionCount = 1;
-    protected int batch = 1000;
-    protected Destination destination;
-    protected String[] subjects;
-
-    private boolean topic = true;
-    private boolean durable;
-    private ActiveMQConnectionFactory factory;
-    private String url;
-    private int counter;
-    private List<Object> resources = new ArrayList<Object>();
-    private NumberFormat formatter = NumberFormat.getInstance();
-    private AtomicInteger connectionCounter = new AtomicInteger(0);
-    private IdGenerator idGenerator = new IdGenerator();
-    private boolean timerLoop;
-
-    public BenchmarkSupport() {
-    }
-
-    public void start() {
-        System.out.println("Using: " + connectionCount + " connection(s)");
-        subjects = new String[connectionCount];
-        for (int i = 0; i < connectionCount; i++) {
-            subjects[i] = "BENCHMARK.FEED" + i;
-        }
-        if (useTimerLoop()) {
-            Thread timer = new Thread() {
-                public void run() {
-                    timerLoop();
-                }
-            };
-            timer.start();
-        }
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public boolean isTopic() {
-        return topic;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public ActiveMQConnectionFactory getFactory() {
-        return factory;
-    }
-
-    public void setFactory(ActiveMQConnectionFactory factory) {
-        this.factory = factory;
-    }
-
-    public void setSubject(String subject) {
-        connectionCount = 1;
-        subjects = new String[] {
-            subject
-        };
-    }
-
-    public boolean isDurable() {
-        return durable;
-    }
-
-    public void setDurable(boolean durable) {
-        this.durable = durable;
-    }
-
-    public int getConnectionCount() {
-        return connectionCount;
-    }
-
-    public void setConnectionCount(int connectionCount) {
-        this.connectionCount = connectionCount;
-    }
-
-    protected Session createSession() throws JMSException {
-        if (factory == null) {
-            factory = createFactory();
-        }
-        Connection connection = factory.createConnection();
-        int value = connectionCounter.incrementAndGet();
-        System.out.println("Created connection: " + value + " = " + connection);
-        if (durable) {
-            connection.setClientID(idGenerator.generateId());
-        }
-        addResource(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        addResource(session);
-        return session;
-    }
-
-    protected ActiveMQConnectionFactory createFactory() {
-        ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(getUrl());
-        return answer;
-    }
-
-    protected synchronized void count(int count) {
-        counter += count;
-        /*
-         * if (counter > batch) { counter = 0; long current =
-         * System.currentTimeMillis(); double end = current - time; end /= 1000;
-         * time = current; System.out.println("Processed " + batch + " messages
-         * in " + end + " (secs)"); }
-         */
-    }
-
-    protected synchronized int resetCount() {
-        int answer = counter;
-        counter = 0;
-        return answer;
-    }
-
-    protected void timerLoop() {
-        int times = 0;
-        int total = 0;
-        int dumpVmStatsFrequency = 10;
-        Runtime runtime = Runtime.getRuntime();
-
-        while (true) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            int processed = resetCount();
-            double average = 0;
-            if (processed > 0) {
-                total += processed;
-                times++;
-            }
-            if (times > 0) {
-                average = total / (double) times;
-            }
-
-            System.out.println(getClass().getName() + " Processed: " + processed + " messages this second. Average: " + average);
-
-            if ((times % dumpVmStatsFrequency) == 0 && times != 0) {
-                System.out.println("Used memory: " + asMemoryString(runtime.totalMemory() - runtime.freeMemory()) + " Free memory: " + asMemoryString(runtime.freeMemory()) + " Total memory: "
-                                   + asMemoryString(runtime.totalMemory()) + " Max memory: " + asMemoryString(runtime.maxMemory()));
-            }
-
-        }
-    }
-
-    protected String asMemoryString(long value) {
-        return formatter.format(value / 1024) + " K";
-    }
-
-    protected boolean useTimerLoop() {
-        return timerLoop;
-    }
-
-    protected Destination createDestination(Session session, String subject) throws JMSException {
-        if (topic) {
-            return session.createTopic(subject);
-        } else {
-            return session.createQueue(subject);
-        }
-    }
-
-    protected void addResource(Object resource) {
-        resources.add(resource);
-    }
-
-    public int getCounter() {
-        return counter;
-    }
-
-    public void setTimerLoop(boolean timerLoop) {
-        this.timerLoop = timerLoop;
-    }
-
-    protected static boolean parseBoolean(String text) {
-        return text.equalsIgnoreCase("true");
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Consumer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Consumer.java
deleted file mode 100755
index c213b71..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Consumer.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.benchmark;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-/**
- * @author James Strachan
- * 
- */
-public class Consumer extends BenchmarkSupport implements MessageListener {
-
-    public Consumer() {
-    }
-
-    public static void main(String[] args) {
-        Consumer tool = new Consumer();
-        if (args.length > 0) {
-            tool.setUrl(args[0]);
-        }
-        if (args.length > 1) {
-            tool.setTopic(parseBoolean(args[1]));
-        }
-        if (args.length > 2) {
-            tool.setSubject(args[2]);
-        }
-        if (args.length > 3) {
-            tool.setDurable(parseBoolean(args[3]));
-        }
-        if (args.length > 4) {
-            tool.setConnectionCount(Integer.parseInt(args[4]));
-        }
-
-        try {
-            tool.run();
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void run() throws JMSException {
-        start();
-        subscribe();
-    }
-
-    protected void subscribe() throws JMSException {
-        for (int i = 0; i < subjects.length; i++) {
-            subscribe(subjects[i]);
-        }
-    }
-
-    protected void subscribe(String subject) throws JMSException {
-        Session session = createSession();
-
-        Destination destination = createDestination(session, subject);
-
-        System.out.println("Consuming on : " + destination + " of type: " + destination.getClass().getName());
-
-        MessageConsumer consumer = null;
-        if (isDurable() && isTopic()) {
-            consumer = session.createDurableSubscriber((Topic)destination, getClass().getName());
-        } else {
-            consumer = session.createConsumer(destination);
-        }
-        consumer.setMessageListener(this);
-        addResource(consumer);
-    }
-
-    public void onMessage(Message message) {
-        try {
-            TextMessage textMessage = (TextMessage)message;
-
-            // lets force the content to be deserialized
-            textMessage.getText();
-            count(1);
-
-            // lets count the messages
-
-            // message.acknowledge();
-        } catch (JMSException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
deleted file mode 100755
index 15e621d..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * 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.benchmark;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-/**
- * @author James Strachan
- * 
- */
-public class Producer extends BenchmarkSupport {
-
-    int loops = -1;
-    int loopSize = 1000;
-    private int messageSize = 1000;
-
-    public Producer() {
-    }
-
-    public static void main(String[] args) {
-        Producer tool = new Producer();
-        if (args.length > 0) {
-            tool.setUrl(args[0]);
-        }
-        if (args.length > 1) {
-            tool.setTopic(parseBoolean(args[1]));
-        }
-        if (args.length > 2) {
-            tool.setSubject(args[2]);
-        }
-        if (args.length > 3) {
-            tool.setDurable(parseBoolean(args[3]));
-        }
-        if (args.length > 4) {
-            tool.setMessageSize(Integer.parseInt(args[4]));
-        }
-        if (args.length > 5) {
-            tool.setConnectionCount(Integer.parseInt(args[5]));
-        }
-        try {
-            tool.run();
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void run() throws Exception {
-        start();
-        publish();
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public int getMessageSize() {
-        return messageSize;
-    }
-
-    public void setMessageSize(int messageSize) {
-        this.messageSize = messageSize;
-    }
-
-    public int getLoopSize() {
-        return loopSize;
-    }
-
-    public void setLoopSize(int loopSize) {
-        this.loopSize = loopSize;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    protected void publish() throws Exception {
-        final String text = getMessage();
-
-        System.out.println("Publishing to: " + subjects.length + " subject(s)");
-
-        for (int i = 0; i < subjects.length; i++) {
-            final String subject = subjects[i];
-            Thread thread = new Thread() {
-                public void run() {
-                    try {
-                        publish(text, subject);
-                    } catch (JMSException e) {
-                        System.out.println("Caught: " + e);
-                        e.printStackTrace();
-                    }
-                }
-            };
-            thread.start();
-        }
-
-    }
-
-    protected String getMessage() {
-        StringBuffer buffer = new StringBuffer();
-        for (int i = 0; i < messageSize; i++) {
-            char ch = 'X';
-            buffer.append(ch);
-        }
-        return buffer.toString();
-    }
-
-    protected void publish(String text, String subject) throws JMSException {
-        Session session = createSession();
-
-        Destination destination = createDestination(session, subject);
-
-        MessageProducer publisher = session.createProducer(destination);
-        if (isDurable()) {
-            publisher.setDeliveryMode(DeliveryMode.PERSISTENT);
-        } else {
-            publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        }
-
-        System.out.println("Starting publisher on : " + destination + " of type: " + destination.getClass().getName());
-        System.out.println("Message length: " + text.length());
-
-        if (loops <= 0) {
-            while (true) {
-                publishLoop(session, publisher, text);
-            }
-        } else {
-            for (int i = 0; i < loops; i++) {
-                publishLoop(session, publisher, text);
-            }
-        }
-    }
-
-    protected void publishLoop(Session session, MessageProducer publisher, String text) throws JMSException {
-        for (int i = 0; i < loopSize; i++) {
-            Message message = session.createTextMessage(text);
-
-            publisher.send(message);
-            count(1);
-        }
-    }
-
-    protected String loadFile(String file) throws IOException {
-        System.out.println("Loading file: " + file);
-
-        StringBuffer buffer = new StringBuffer();
-        BufferedReader in = new BufferedReader(new FileReader(file));
-        while (true) {
-            String line = in.readLine();
-            if (line == null) {
-                break;
-            }
-            buffer.append(line);
-            buffer.append(File.separator);
-        }
-        in.close();
-        return buffer.toString();
-    }
-
-    public int getLoops() {
-        return loops;
-    }
-
-    public void setLoops(int loops) {
-        this.loops = loops;
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/ProducerConsumer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/ProducerConsumer.java
deleted file mode 100755
index 3dc099c..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/ProducerConsumer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.benchmark;
-
-/**
- * @author James Strachan
- * 
- */
-public class ProducerConsumer extends Producer {
-
-    private Consumer consumer = new Consumer();
-    
-    public ProducerConsumer() {
-    }
-
-    public static void main(String[] args) {
-        ProducerConsumer tool = new ProducerConsumer();
-        if (args.length > 0) {
-            tool.setUrl(args[0]);
-        }
-        if (args.length > 1) {
-            tool.setTopic(parseBoolean(args[1]));
-        }
-        if (args.length > 2) {
-            tool.setSubject(args[2]);
-        }
-        if (args.length > 3) {
-            tool.setDurable(Boolean.getBoolean(args[3]));
-        }
-        if (args.length > 4) {
-            tool.setConnectionCount(Integer.parseInt(args[4]));
-        }
-        try {
-            tool.run();
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void run() throws Exception {
-        consumer.start();
-        consumer.subscribe();
-        start();
-        publish();
-    }
-
-    public void setTopic(boolean topic) {
-        super.setTopic(topic);
-        consumer.setTopic(topic);
-    }
-
-    public void setSubject(String subject) {
-        super.setSubject(subject);
-        consumer.setSubject(subject);
-    }
-
-    public void setUrl(String url) {
-        super.setUrl(url);
-        consumer.setUrl(url);
-    }
-
-    protected boolean useTimerLoop() {
-        return false;
-    }
-
-    public Consumer getConsumer() {
-        return consumer;
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/JAXPXPathEvaluator.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/JAXPXPathEvaluator.java
deleted file mode 100644
index 4c51ec0..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/JAXPXPathEvaluator.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.filter;
-
-import java.io.StringReader;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.TextMessage;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.xml.sax.InputSource;
-
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteArrayInputStream;
-
-public class JAXPXPathEvaluator implements XPathExpression.XPathEvaluator {
-
-    private static final XPathFactory FACTORY = XPathFactory.newInstance();
-    private javax.xml.xpath.XPathExpression expression;
-
-    public JAXPXPathEvaluator(String xpathExpression) {
-        try {
-            XPath xpath = FACTORY.newXPath();
-            expression = xpath.compile(xpathExpression);
-        } catch (XPathExpressionException e) {
-            throw new RuntimeException("Invalid XPath expression: " + xpathExpression);
-        }
-    }
-
-    public boolean evaluate(Message message) throws JMSException {
-        if (message instanceof TextMessage) {
-            String text = ((TextMessage)message).getText();
-            return evaluate(text);
-        } else if (message instanceof BytesMessage) {
-            BytesMessage bm = (BytesMessage)message;
-            byte data[] = new byte[(int)bm.getBodyLength()];
-            bm.readBytes(data);
-            return evaluate(data);
-        }
-        return false;
-    }
-
-    private boolean evaluate(byte[] data) {
-        try {
-            InputSource inputSource = new InputSource(new ByteArrayInputStream(data));
-            return ((Boolean)expression.evaluate(inputSource, XPathConstants.BOOLEAN)).booleanValue();
-        } catch (XPathExpressionException e) {
-            return false;
-        }
-    }
-
-    private boolean evaluate(String text) {
-        try {
-            InputSource inputSource = new InputSource(new StringReader(text));
-            return ((Boolean)expression.evaluate(inputSource, XPathConstants.BOOLEAN)).booleanValue();
-        } catch (XPathExpressionException e) {
-            return false;
-        }
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/XMLBeansXPathEvaluator.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/XMLBeansXPathEvaluator.java
deleted file mode 100644
index babdacc..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/XMLBeansXPathEvaluator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.filter;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.command.Message;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.xmlbeans.XmlObject;
-
-public class XMLBeansXPathEvaluator implements XPathExpression.XPathEvaluator {
-
-    private final String xpath;
-
-    public XMLBeansXPathEvaluator(String xpath) {
-        this.xpath = xpath;
-    }
-
-    public boolean evaluate(Message message) throws JMSException {
-        if (message instanceof TextMessage) {
-            String text = ((TextMessage)message).getText();
-            try {
-                XmlObject object = XmlObject.Factory.parse(text);
-                XmlObject[] objects = object.selectPath(xpath);
-                return object != null && objects.length > 0;
-            } catch (Throwable e) {
-                return false;
-            }
-
-        } else if (message instanceof BytesMessage) {
-            BytesMessage bm = (BytesMessage)message;
-            byte data[] = new byte[(int)bm.getBodyLength()];
-            bm.readBytes(data);
-            try {
-                XmlObject object = XmlObject.Factory.parse(new ByteArrayInputStream(data));
-                XmlObject[] objects = object.selectPath(xpath);
-                return object != null && objects.length > 0;
-            } catch (Throwable e) {
-                return false;
-            }
-        }
-        return false;
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/AMQJournalTool.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/AMQJournalTool.java
deleted file mode 100644
index 736d012..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/AMQJournalTool.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Scanner;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.command.JournalQueueAck;
-import org.apache.activemq.command.JournalTopicAck;
-import org.apache.activemq.command.JournalTrace;
-import org.apache.activemq.command.JournalTransaction;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.kaha.impl.async.ReadOnlyAsyncDataManager;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.Velocity;
-import org.apache.velocity.app.VelocityEngine;
-import org.josql.Query;
-
-/**
- * Allows you to view the contents of a Journal.
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-public class AMQJournalTool {
-
-	private final ArrayList<File> dirs = new ArrayList<File>();
-	private final WireFormat wireFormat = new OpenWireFormat();
-	private final HashMap<String, String> resources = new HashMap<String, String>();
-
-	private String messageFormat = "${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageId}|${record.properties}|${body}";
-	private String topicAckFormat = "${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.clientId}|${record.subscritionName}|${record.messageId}";
-	private String queueAckFormat = "${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageAck.lastMessageId}";
-	private String transactionFormat = "${location.dataFileId},${location.offset}|${type}|${record.transactionId}";
-	private String traceFormat = "${location.dataFileId},${location.offset}|${type}|${record.message}";
-	private String unknownFormat = "${location.dataFileId},${location.offset}|${type}|${record.class.name}";
-	private String where;
-	private VelocityContext context;
-	private VelocityEngine velocity;
-	private boolean help;
-
-	public static void main(String[] args) throws Exception {
-		AMQJournalTool consumerTool = new AMQJournalTool();
-		String[] directories = CommandLineSupport
-				.setOptions(consumerTool, args);
-		if (directories.length < 1) {
-			System.out
-					.println("Please specify the directories with journal data to scan");
-			return;
-		}
-		for (int i = 0; i < directories.length; i++) {
-			consumerTool.getDirs().add(new File(directories[i]));
-		}
-		consumerTool.execute();
-	}
-
-	public void execute() throws Exception {
-
-		if( help ) {
-			showHelp();
-			return;
-		}
-		
-		if (getDirs().size() < 1) {
-			System.out.println("");
-			System.out.println("Invalid Usage: Please specify the directories with journal data to scan");
-			System.out.println("");
-			showHelp();
-			return;
-		}
-
-		for (File dir : getDirs()) {
-			if( !dir.exists() ) {
-				System.out.println("");
-				System.out.println("Invalid Usage: the directory '"+dir.getPath()+"' does not exist");
-				System.out.println("");
-				showHelp();
-				return;
-			}
-			if( !dir.isDirectory() ) {
-				System.out.println("");
-				System.out.println("Invalid Usage: the argument '"+dir.getPath()+"' is not a directory");
-				System.out.println("");
-				showHelp();
-				return;
-			}
-		}
-		
-		
-		context = new VelocityContext();
-		List keys = Arrays.asList(context.getKeys());
-
-		for (Iterator iterator = System.getProperties().entrySet()
-				.iterator(); iterator.hasNext();) {
-			Map.Entry kv = (Map.Entry) iterator.next();
-			String name = (String) kv.getKey();
-			String value = (String) kv.getValue();
-
-			if (!keys.contains(name)) {
-				context.put(name, value);
-			}
-		}
-		
-		velocity = new VelocityEngine();
-		velocity.setProperty(Velocity.RESOURCE_LOADER, "all");
-		velocity.setProperty("all.resource.loader.class", CustomResourceLoader.class.getName());
-		velocity.init();
-
-
-		resources.put("message", messageFormat);
-		resources.put("topicAck", topicAckFormat);
-		resources.put("queueAck", queueAckFormat);
-		resources.put("transaction", transactionFormat);
-		resources.put("trace", traceFormat);
-		resources.put("unknown", unknownFormat);
-
-		Query query = null;
-		if (where != null) {
-			query = new Query();
-			query.parse("select * from "+Entry.class.getName()+" where "+where);
-
-		}
-
-		ReadOnlyAsyncDataManager manager = new ReadOnlyAsyncDataManager(getDirs());
-		manager.start();
-		try {
-			Location curr = manager.getFirstLocation();
-			while (curr != null) {
-
-				ByteSequence data = manager.read(curr);
-				DataStructure c = (DataStructure) wireFormat.unmarshal(data);
-
-				Entry entry = new Entry();
-				entry.setLocation(curr);
-				entry.setRecord(c);
-				entry.setData(data);
-				entry.setQuery(query);
-				process(entry);
-
-				curr = manager.getNextLocation(curr);
-			}
-		} finally {
-			manager.close();
-		}
-	}
-
-	private void showHelp() {
-		InputStream is = AMQJournalTool.class.getResourceAsStream("help.txt");
-		Scanner scanner = new Scanner(is);
-		while (scanner.hasNextLine()) {
-			String line = scanner.nextLine();
-			System.out.println(line);
-		}
-		scanner.close();	}
-
-	private void process(Entry entry) throws Exception {
-
-		Location location = entry.getLocation();
-		DataStructure record = entry.getRecord();
-
-		switch (record.getDataStructureType()) {
-		case ActiveMQMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQBytesMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQBytesMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQBlobMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQBlobMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQMapMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQMapMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQObjectMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQObjectMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQStreamMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQStreamMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case ActiveMQTextMessage.DATA_STRUCTURE_TYPE:
-			entry.setType("ActiveMQTextMessage");
-			entry.setFormater("message");
-			display(entry);
-			break;
-		case JournalQueueAck.DATA_STRUCTURE_TYPE:
-			entry.setType("Queue Ack");
-			entry.setFormater("queueAck");
-			display(entry);
-			break;
-		case JournalTopicAck.DATA_STRUCTURE_TYPE:
-			entry.setType("Topic Ack");
-			entry.setFormater("topicAck");
-			display(entry);
-			break;
-		case JournalTransaction.DATA_STRUCTURE_TYPE:
-			entry.setType(getType((JournalTransaction) record));
-			entry.setFormater("transaction");
-			display(entry);
-			break;
-		case JournalTrace.DATA_STRUCTURE_TYPE:
-			entry.setType("Trace");
-			entry.setFormater("trace");
-			display(entry);
-			break;
-		default:
-			entry.setType("Unknown");
-			entry.setFormater("unknown");
-			display(entry);
-			break;
-		}
-	}
-
-	private String getType(JournalTransaction record) {
-		switch (record.getType()) {
-		case JournalTransaction.XA_PREPARE:
-			return "XA Prepare";
-		case JournalTransaction.XA_COMMIT:
-			return "XA Commit";
-		case JournalTransaction.XA_ROLLBACK:
-			return "XA Rollback";
-		case JournalTransaction.LOCAL_COMMIT:
-			return "Commit";
-		case JournalTransaction.LOCAL_ROLLBACK:
-			return "Rollback";
-		}
-		return "Unknown Transaction";
-	}
-
-	private void display(Entry entry) throws Exception {
-
-		if (entry.getQuery() != null) {
-			List list = Collections.singletonList(entry);
-			List results = entry.getQuery().execute(list).getResults();
-			if (results.isEmpty()) {
-				return;
-			}
-		}
-
-		CustomResourceLoader.setResources(resources);
-		try {
-
-			context.put("location", entry.getLocation());
-			context.put("record", entry.getRecord());
-			context.put("type", entry.getType());
-			if (entry.getRecord() instanceof ActiveMQMessage) {
-				context.put("body", new MessageBodyFormatter(
-						(ActiveMQMessage) entry.getRecord()));
-			}
-
-			Template template = velocity.getTemplate(entry.getFormater());
-			PrintWriter writer = new PrintWriter(System.out);
-			template.merge(context, writer);
-			writer.println();
-			writer.flush();
-		} finally {
-			CustomResourceLoader.setResources(null);
-		}
-	}
-
-	public void setMessageFormat(String messageFormat) {
-		this.messageFormat = messageFormat;
-	}
-
-	public void setTopicAckFormat(String ackFormat) {
-		this.topicAckFormat = ackFormat;
-	}
-
-	public void setTransactionFormat(String transactionFormat) {
-		this.transactionFormat = transactionFormat;
-	}
-
-	public void setTraceFormat(String traceFormat) {
-		this.traceFormat = traceFormat;
-	}
-
-	public void setUnknownFormat(String unknownFormat) {
-		this.unknownFormat = unknownFormat;
-	}
-
-	public void setQueueAckFormat(String queueAckFormat) {
-		this.queueAckFormat = queueAckFormat;
-	}
-
-	public String getQuery() {
-		return where;
-	}
-
-	public void setWhere(String query) {
-		this.where = query;
-	}
-
-	public boolean isHelp() {
-		return help;
-	}
-
-	public void setHelp(boolean help) {
-		this.help = help;
-	}
-
-	/**
-	 * @return the dirs
-	 */
-	public ArrayList<File> getDirs() {
-		return dirs;
-	}
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/AMQJournalToolCommand.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/AMQJournalToolCommand.java
deleted file mode 100644
index e3fb5a2..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/AMQJournalToolCommand.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.activemq.console.CommandContext;
-import org.apache.activemq.console.command.Command;
-
-public class AMQJournalToolCommand implements Command {
-
-	private CommandContext context;
-
-	public void execute(List<String> tokens) throws Exception {
-		AMQJournalTool consumerTool = new AMQJournalTool();
-		String args[] = new String[tokens.size()];
-		tokens.toArray(args);
-		String[] directories = CommandLineSupport.setOptions(consumerTool, args);
-		for (int i = 0; i < directories.length; i++) {
-			consumerTool.getDirs().add(new File(directories[i]));
-		}
-		consumerTool.execute();		
-	}
-
-	public void setCommandContext(CommandContext context) {
-		this.context = context;		
-	}
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/CommandLineSupport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/CommandLineSupport.java
deleted file mode 100644
index bffba30..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/CommandLineSupport.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.util.ArrayList;
-
-import org.apache.activemq.util.IntrospectionSupport;
-
-/**
- * Helper utility that can be used to set the properties on any object using
- * command line arguments.
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-public final class CommandLineSupport {
-
-    private CommandLineSupport() {
-    }
-    
-    /**
-     * Sets the properties of an object given the command line args.
-     * 
-     * if args contains: --ack-mode=AUTO --url=tcp://localhost:61616 --persistent 
-     * 
-     * then it will try to call the following setters on the target object.
-     * 
-     * target.setAckMode("AUTO");
-     * target.setURL(new URI("tcp://localhost:61616") );
-     * target.setPersistent(true);
-     * 
-     * Notice the the proper conversion for the argument is determined by examining the 
-     * setter arguement type.  
-     * 
-     * @param target the object that will have it's properties set
-     * @param args the commline options
-     * @return any arguments that are not valid options for the target
-     */
-    public static String[] setOptions(Object target, String[] args) {
-        ArrayList<String> rc = new ArrayList<String>();
-
-        for (int i = 0; i < args.length; i++) {
-            if (args[i] == null) {
-                continue;
-            }
-
-            if (args[i].startsWith("--")) {
-
-                // --options without a specified value are considered boolean
-                // flags that are enabled.
-                String value = "true";
-                String name = args[i].substring(2);
-
-                // if --option=value case
-                int p = name.indexOf("=");
-                if (p > 0) {
-                    value = name.substring(p + 1);
-                    name = name.substring(0, p);
-                }
-
-                // name not set, then it's an unrecognized option
-                if (name.length() == 0) {
-                    rc.add(args[i]);
-                    continue;
-                }
-
-                String propName = convertOptionToPropertyName(name);
-                if (!IntrospectionSupport.setProperty(target, propName, value)) {
-                    rc.add(args[i]);
-                    continue;
-                }
-            } else {
-                rc.add(args[i]);
-            }
-
-        }
-
-        String r[] = new String[rc.size()];
-        rc.toArray(r);
-        return r;
-    }
-
-    /**
-     * converts strings like: test-enabled to testEnabled
-     * 
-     * @param name
-     * @return
-     */
-    private static String convertOptionToPropertyName(String name) {
-        String rc = "";
-
-        // Look for '-' and strip and then convert the subsequent char to
-        // uppercase
-        int p = name.indexOf("-");
-        while (p > 0) {
-            // strip
-            rc += name.substring(0, p);
-            name = name.substring(p + 1);
-
-            // can I convert the next char to upper?
-            if (name.length() > 0) {
-                rc += name.substring(0, 1).toUpperCase();
-                name = name.substring(1);
-            }
-
-            p = name.indexOf("-");
-        }
-        return rc + name;
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/CustomResourceLoader.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/CustomResourceLoader.java
deleted file mode 100644
index 7a44018..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/CustomResourceLoader.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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.store.amq;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.HashMap;
-
-import org.apache.commons.collections.ExtendedProperties;
-import org.apache.velocity.exception.ResourceNotFoundException;
-import org.apache.velocity.runtime.RuntimeServices;
-import org.apache.velocity.runtime.resource.Resource;
-import org.apache.velocity.runtime.resource.loader.FileResourceLoader;
-import org.apache.velocity.runtime.resource.loader.ResourceLoader;
-
-public class CustomResourceLoader extends ResourceLoader {
-	
-	private final static ThreadLocal<HashMap<String, String>> resourcesTL = new ThreadLocal<HashMap<String, String>>();
-	private final FileResourceLoader fileResourceLoader = new FileResourceLoader();
-	
-	@Override
-	public void commonInit(RuntimeServices rs, ExtendedProperties configuration) {
-		super.commonInit(rs, configuration);
-		fileResourceLoader.commonInit(rs, configuration);
-	}
-	
-    public void init( ExtendedProperties configuration)
-    {
-    	fileResourceLoader.init(configuration);
-    }
-    
-    /**
-     */
-    public synchronized InputStream getResourceStream( String name )
-        throws ResourceNotFoundException
-    {
-        InputStream result = null;
-        
-        if (name == null || name.length() == 0)
-        {
-            throw new ResourceNotFoundException ("No template name provided");
-        }
-        
-        String value = null;
-        HashMap<String, String> resources = resourcesTL.get();
-        if( resources!=null ) {
-        	value = resources.get(name);
-        }
-        
-    	if( value == null ) {
-    		result = this.fileResourceLoader.getResourceStream(name);
-    	} else {
-            try 
-            {
-            	result = new ByteArrayInputStream(value.getBytes());
-            }
-            catch( Exception e )
-            {
-                throw new ResourceNotFoundException( e.getMessage() );
-            }
-    	}
-        return result;
-    }
-    
-    public boolean isSourceModified(Resource resource)
-    {
-        return false;
-    }
-
-    public long getLastModified(Resource resource)
-    {
-        return 0;
-    }
-
-	static public HashMap<String, String> getResources() {
-		return resourcesTL.get();
-	}
-
-	static public void setResources(HashMap<String, String> arg0) {
-		resourcesTL.set(arg0);
-	}
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/Entry.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/Entry.java
deleted file mode 100644
index 17cd104..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/Entry.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.store.amq;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.util.ByteSequence;
-import org.josql.Query;
-
-public class Entry {
-	
-	Location location;
-	DataStructure record;
-	private ByteSequence data;
-	private String type;
-	private String formater;
-	private Query query;
-	
-	public Location getLocation() {
-		return location;
-	}
-	public void setLocation(Location location) {
-		this.location = location;
-	}
-	public DataStructure getRecord() {
-		return record;
-	}
-	public void setRecord(DataStructure record) {
-		this.record = record;
-	}
-	public void setData(ByteSequence data) {
-		this.data = data;
-	}
-	public void setType(String type) {
-		this.type = type;
-	}
-	public ByteSequence getData() {
-		return data;
-	}
-	public String getType() {
-		return type;
-	}
-	public void setFormater(String formater) {
-		this.formater = formater;
-	}
-	public String getFormater() {
-		return formater;
-	}
-	public void setQuery(Query query) {
-		this.query = query;
-	}
-	public Query getQuery() {
-		return query;
-	}
-	
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/MessageBodyFormatter.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/MessageBodyFormatter.java
deleted file mode 100644
index e2d23dc..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/MessageBodyFormatter.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.store.amq;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.util.ByteSequence;
-
-public class MessageBodyFormatter {
-	final ActiveMQMessage message;
-	
-	public MessageBodyFormatter(ActiveMQMessage message) {
-		this.message=message;
-	}
-
-	@Override
-	public String toString() {
-		try {
-			switch (message.getDataStructureType()) {
-			case ActiveMQMessage.DATA_STRUCTURE_TYPE:
-				return "";
-			case ActiveMQBlobMessage.DATA_STRUCTURE_TYPE:
-				ActiveMQBlobMessage blob = (ActiveMQBlobMessage) message;
-				return blob.getRemoteBlobUrl();
-			case ActiveMQMapMessage.DATA_STRUCTURE_TYPE:
-				ActiveMQMapMessage map = (ActiveMQMapMessage)message;
-				return map.getContentMap().toString();			
-			case ActiveMQTextMessage.DATA_STRUCTURE_TYPE:
-				ActiveMQTextMessage text = (ActiveMQTextMessage)message;
-				return text.getText();
-			case ActiveMQBytesMessage.DATA_STRUCTURE_TYPE:
-			case ActiveMQObjectMessage.DATA_STRUCTURE_TYPE:
-			case ActiveMQStreamMessage.DATA_STRUCTURE_TYPE:
-				ByteSequence data = message.getContent();
-				return "binary payload {length="+data.getLength()+", compressed="+message.isCompressed()+"}";
-			}
-		} catch (JMSException e) {
-		}
-		return "";
-	}
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/AMQIterator.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/AMQIterator.java
deleted file mode 100644
index 1e3e0a5..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/AMQIterator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.store.amq.reader;
-
-import java.util.Iterator;
-
-import javax.jms.Message;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-
-/**
- * An Iterator for the AMQReader
- *
- */
-class AMQIterator  implements Iterator<Message>{
-    private AMQReader reader;
-    private BooleanExpression expression;
-    private MessageLocation currentLocation;
-    private MessageLocation nextLocation;
-    private boolean valid=true;
-    
-        
-    AMQIterator(AMQReader reader, BooleanExpression expression){
-        this.reader=reader;
-        this.expression=expression;
-    } 
-    
-    public boolean hasNext() {
-        try {
-            this.nextLocation = reader.getNextMessage(currentLocation);
-            Message next = nextLocation != null ? nextLocation.getMessage()
-                    : null;
-            if (expression == null) {
-                return next != null;
-            } else {
-                while (next != null) {
-                    MessageEvaluationContext context = new MessageEvaluationContext();
-                    context.setMessageReference((MessageReference) next);
-                    if (expression.matches(context)) {
-                        return true;
-                    }
-                    this.nextLocation = reader.getNextMessage(currentLocation);
-                    next = nextLocation != null ? nextLocation.getMessage()
-                            : null;
-                }
-                valid=false;
-                return false;
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(
-                    "Failed to get next message from reader ", e);
-        }
-    }
-
-   
-    public Message next() {
-        if (valid && (nextLocation != null || hasNext())) {
-            this.currentLocation=nextLocation;
-            return nextLocation.getMessage();
-        }
-        return null;
-    }
-
-   
-    public void remove() {
-        throw new IllegalStateException("Not supported");
-        
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/AMQReader.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/AMQReader.java
deleted file mode 100644
index 0b90924..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/AMQReader.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * 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.store.amq.reader;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.jms.InvalidSelectorException;
-import javax.jms.Message;
-
-import org.apache.activemq.command.DataStructure;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.kaha.impl.async.AsyncDataManager;
-import org.apache.activemq.kaha.impl.async.Location;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.selector.SelectorParser;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Reads and iterates through data log files for the AMQMessage Store
- * 
- */
-public class AMQReader implements Iterable<Message> {
-
-    private AsyncDataManager dataManager;
-    private WireFormat wireFormat = new OpenWireFormat();
-    private File file;
-    private BooleanExpression expression;
-
-    /**
-     * List all the data files in a directory
-     * @param directory
-     * @return
-     * @throws IOException
-     */
-    public static Set<File> listDataFiles(File directory) throws IOException{
-        Set<File>result = new HashSet<File>();
-        if (directory == null || !directory.exists() || !directory.isDirectory()) {
-            throw new IOException("Invalid Directory " + directory);
-        }
-        AsyncDataManager dataManager = new AsyncDataManager();
-        dataManager.setDirectory(directory);
-        dataManager.start();
-        Set<File> set = dataManager.getFiles();
-        if (set != null) {
-            result.addAll(set);
-        }
-        dataManager.close();
-        return result;
-    }
-    /**
-     * Create the AMQReader to read a directory of amq data logs - or an
-     * individual data log file
-     * 
-     * @param file the directory - or file
-     * @throws IOException 
-     * @throws InvalidSelectorException 
-     * @throws IOException
-     * @throws InvalidSelectorException 
-     */
-    public AMQReader(File file) throws InvalidSelectorException, IOException {
-        this(file,null);
-    }
-    
-    /**
-     * Create the AMQReader to read a directory of amq data logs - or an
-     * individual data log file
-     * 
-     * @param file the directory - or file
-     * @param selector the JMS selector or null to select all
-     * @throws IOException
-     * @throws InvalidSelectorException 
-     */
-    public AMQReader(File file, String selector) throws IOException, InvalidSelectorException {
-        String str = selector != null ? selector.trim() : null;
-        if (str != null && str.length() > 0) {
-            this.expression=SelectorParser.parse(str);
-        }
-        dataManager = new AsyncDataManager();
-        dataManager.setArchiveDataLogs(false);
-        if (file.isDirectory()) {
-            dataManager.setDirectory(file);
-        } else {
-            dataManager.setDirectory(file.getParentFile());
-            dataManager.setDirectoryArchive(file);
-            this.file = file;
-        }
-        dataManager.start();
-    }
-
-    public Iterator<Message> iterator() {
-        return new AMQIterator(this,this.expression);
-    }
-
-    
-    protected MessageLocation getNextMessage(MessageLocation lastLocation)
-            throws IllegalStateException, IOException {
-        if (this.file != null) {
-            return getInternalNextMessage(this.file, lastLocation);
-        }
-        return getInternalNextMessage(lastLocation);
-    }
-
-    private MessageLocation getInternalNextMessage(MessageLocation lastLocation)
-            throws IllegalStateException, IOException {
-        return getInternalNextMessage(null, lastLocation);
-    }
-
-    private MessageLocation getInternalNextMessage(File file,
-            MessageLocation lastLocation) throws IllegalStateException,
-            IOException {
-        MessageLocation result = lastLocation;
-        if (result != null) {
-            result.setMessage(null);
-        }
-        Message message = null;
-        Location pos = lastLocation != null ? lastLocation.getLocation() : null;
-        while ((pos = getNextLocation(file, pos)) != null) {
-            message = getMessage(pos);
-            if (message != null) {
-                if (result == null) {
-                    result = new MessageLocation();
-                }
-                result.setMessage(message);
-                break;
-            }
-        }
-        result.setLocation(pos);
-        if (pos == null && message == null) {
-            result = null;
-        } else {
-            result.setLocation(pos);
-        }
-        return result;
-    }
-
-    private Location getNextLocation(File file, Location last)
-            throws IllegalStateException, IOException {
-        if (file != null) {
-            return dataManager.getNextLocation(file, last, true);
-        }
-        return dataManager.getNextLocation(last);
-    }
-
-    private Message getMessage(Location location) throws IOException {
-        ByteSequence data = dataManager.read(location);
-        DataStructure c = (DataStructure) wireFormat.unmarshal(data);
-        if (c instanceof Message) {
-            return (Message) c;
-        }
-        return null;
-
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/MessageLocation.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/MessageLocation.java
deleted file mode 100644
index e4c68c6..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/store/amq/reader/MessageLocation.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.store.amq.reader;
-
-import javax.jms.Message;
-
-import org.apache.activemq.kaha.impl.async.Location;
-
-/**
- * A holder for a message
- *
- */
-class MessageLocation {
-    private Message message;
-    private Location location;
-
-    
-    /**
-     * @return the location
-     */
-    public Location getLocation() {
-        return location;
-    }
-
-    /**
-     * @param location
-     */
-    public void setLocation(Location location) {
-        this.location = location;
-    }
-    /**
-     * @return the message
-     */
-    public Message getMessage() {
-        return message;
-    }
-
-    /**
-     * @param message
-     */
-    public void setMessage(Message message) {
-        this.message = message;
-    }
-
-    
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/AcidTestTool.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/AcidTestTool.java
deleted file mode 100755
index 12650eb..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/AcidTestTool.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/**
- * 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.tool;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-
-/**
- * 
- */
-public class AcidTestTool extends TestCase {
-
-
-    // Worker configuration.
-    protected int recordSize = 1024;
-    protected int batchSize = 5;
-    protected int workerThinkTime = 500;
-    protected Destination target;
-
-    private Random random = new Random();
-    private byte data[];
-    private int workerCount = 10;
-    private AtomicBoolean ignoreJMSErrors = new AtomicBoolean(false);
-    private ActiveMQConnectionFactory factory;
-    private Connection connection;
-    private AtomicInteger publishedBatches = new AtomicInteger(0);
-    private AtomicInteger consumedBatches = new AtomicInteger(0);
-    private List<Throwable> errors = Collections.synchronizedList(new ArrayList<Throwable>());
-
-    private interface Worker extends Runnable {
-        boolean waitForExit(long i) throws InterruptedException;
-    }
-
-    private final class ProducerWorker implements Worker {
-
-        private Session session;
-        private MessageProducer producer;
-        private BytesMessage message;
-        private CountDownLatch doneLatch = new CountDownLatch(1);
-
-        ProducerWorker(Session session, String workerId) throws JMSException {
-            this.session = session;
-            producer = session.createProducer(target);
-            producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            message = session.createBytesMessage();
-            message.setStringProperty("workerId", workerId);
-            message.writeBytes(data);
-        }
-
-        public void run() {
-            try {
-                for (int batchId = 0; true; batchId++) {
-                    // System.out.println("Sending batch: "+workerId+"
-                    // "+batchId);
-                    for (int msgId = 0; msgId < batchSize; msgId++) {
-                        // Sleep some random amount of time less than
-                        // workerThinkTime
-                        try {
-                            Thread.sleep(random.nextInt(workerThinkTime));
-                        } catch (InterruptedException e1) {
-                            return;
-                        }
-
-                        message.setIntProperty("batch-id", batchId);
-                        message.setIntProperty("msg-id", msgId);
-
-                        producer.send(message);
-                    }
-                    session.commit();
-                    publishedBatches.incrementAndGet();
-                    // System.out.println("Commited send batch: "+workerId+"
-                    // "+batchId);
-                }
-            } catch (JMSException e) {
-                if (!ignoreJMSErrors.get()) {
-                    e.printStackTrace();
-                    errors.add(e);
-                }
-                return;
-            } catch (Throwable e) {
-                e.printStackTrace();
-                errors.add(e);
-                return;
-            } finally {
-                System.out.println("Producer exiting.");
-                doneLatch.countDown();
-            }
-        }
-
-        public boolean waitForExit(long i) throws InterruptedException {
-            return doneLatch.await(i, TimeUnit.MILLISECONDS);
-        }
-    }
-
-    private final class ConsumerWorker implements Worker {
-
-        private Session session;
-        private MessageConsumer consumer;
-        private final long timeout;
-        private CountDownLatch doneLatch = new CountDownLatch(1);
-
-        ConsumerWorker(Session session, String workerId, long timeout) throws JMSException {
-            this.session = session;
-            this.timeout = timeout;
-            consumer = session.createConsumer(target, "workerId='" + workerId + "'");
-        }
-
-        public void run() {
-
-            try {
-                int batchId = 0;
-                while (true) {
-                    for (int msgId = 0; msgId < batchSize; msgId++) {
-
-                        // Sleep some random amount of time less than
-                        // workerThinkTime
-                        try {
-                            Thread.sleep(random.nextInt(workerThinkTime));
-                        } catch (InterruptedException e1) {
-                            return;
-                        }
-
-                        Message message = consumer.receive(timeout);
-                        if (msgId > 0) {
-                            assertNotNull(message);
-                            assertEquals(message.getIntProperty("batch-id"), batchId);
-                            assertEquals(message.getIntProperty("msg-id"), msgId);
-                        } else {
-                            if (message == null) {
-                                System.out.println("At end of batch an don't have a next batch to process.  done.");
-                                return;
-                            }
-                            assertEquals(msgId, message.getIntProperty("msg-id"));
-                            batchId = message.getIntProperty("batch-id");
-                            // System.out.println("Receiving batch: "+workerId+"
-                            // "+batchId);
-                        }
-
-                    }
-                    session.commit();
-                    consumedBatches.incrementAndGet();
-                    // System.out.println("Commited receive batch: "+workerId+"
-                    // "+batchId);
-                }
-            } catch (JMSException e) {
-                if (!ignoreJMSErrors.get()) {
-                    e.printStackTrace();
-                    errors.add(e);
-                }
-                return;
-            } catch (Throwable e) {
-                e.printStackTrace();
-                errors.add(e);
-                return;
-            } finally {
-                System.out.println("Consumer exiting.");
-                doneLatch.countDown();
-            }
-        }
-
-        public boolean waitForExit(long i) throws InterruptedException {
-            return doneLatch.await(i, TimeUnit.MILLISECONDS);
-        }
-    }
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-        this.target = new ActiveMQQueue(getClass().getName());
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-            connection = null;
-        }
-    }
-
-    /**
-     * @throws InterruptedException
-     * @throws JMSException
-     * @throws JMSException
-     */
-    private void reconnect() throws InterruptedException, JMSException {
-        if (connection != null) {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-            connection = null;
-        }
-
-        long reconnectDelay = 1000;
-
-        while (connection == null) {
-            if (reconnectDelay > 1000 * 10) {
-                reconnectDelay = 1000 * 10;
-            }
-            try {
-                connection = factory.createConnection();
-                connection.start();
-            } catch (JMSException e) {
-                Thread.sleep(reconnectDelay);
-                reconnectDelay *= 2;
-            }
-        }
-    }
-
-    /**
-     * @throws Throwable
-     * @throws IOException
-     */
-    public void testAcidTransactions() throws Throwable {
-
-        System.out.println("Client threads write records using: Record Size: " + recordSize + ", Batch Size: " + batchSize + ", Worker Think Time: " + workerThinkTime);
-
-        // Create the record and fill it with some values.
-        data = new byte[recordSize];
-        for (int i = 0; i < data.length; i++) {
-            data[i] = (byte)i;
-        }
-
-        System.out.println("==============================================");
-        System.out.println("===> Start the server now.");
-        System.out.println("==============================================");
-        reconnect();
-
-        System.out.println("Starting " + workerCount + " Workers...");
-        ArrayList<Worker> workers = new ArrayList<Worker>();
-        for (int i = 0; i < workerCount; i++) {
-            String workerId = "worker-" + i;
-
-            Worker w = new ConsumerWorker(connection.createSession(true, Session.SESSION_TRANSACTED), workerId, 1000 * 5);
-            workers.add(w);
-            new Thread(w, "Consumer:" + workerId).start();
-
-            w = new ProducerWorker(connection.createSession(true, Session.SESSION_TRANSACTED), workerId);
-            workers.add(w);
-            new Thread(w, "Producer:" + workerId).start();
-        }
-
-        System.out.println("Waiting for " + (workerCount * 10) + " batches to be delivered.");
-
-        //
-        // Wait for about 5 batches of messages per worker to be consumed before
-        // restart.
-        // 
-        while (publishedBatches.get() < workerCount * 5) {
-            System.out.println("Stats: Produced Batches: " + this.publishedBatches.get() + ", Consumed Batches: " + this.consumedBatches.get());
-            Thread.sleep(1000);
-        }
-
-        System.out.println("==============================================");
-        System.out.println("===> Server is under load now.  Kill it!");
-        System.out.println("==============================================");
-        ignoreJMSErrors.set(true);
-
-        // Wait for all the workers to finish.
-        System.out.println("Waiting for all workers to exit due to server shutdown.");
-        for (Iterator<Worker> iter = workers.iterator(); iter.hasNext();) {
-            Worker worker = iter.next();
-            while (!worker.waitForExit(1000)) {
-                System.out.println("==============================================");
-                System.out.println("===> Server is under load now.  Kill it!");
-                System.out.println("==============================================");
-                System.out.println("Stats: Produced Batches: " + this.publishedBatches.get() + ", Consumed Batches: " + this.consumedBatches.get());
-            }
-        }
-        workers.clear();
-
-        // No errors should have occurred so far.
-        if (errors.size() > 0) {
-            throw errors.get(0);
-        }
-
-        System.out.println("==============================================");
-        System.out.println("===> Start the server now.");
-        System.out.println("==============================================");
-        reconnect();
-
-        System.out.println("Restarted.");
-
-        // Validate the all transactions were commited as a uow. Looking for
-        // partial commits.
-        for (int i = 0; i < workerCount; i++) {
-            String workerId = "worker-" + i;
-            Worker w = new ConsumerWorker(connection.createSession(true, Session.SESSION_TRANSACTED), workerId, 5 * 1000);
-            workers.add(w);
-            new Thread(w, "Consumer:" + workerId).start();
-        }
-
-        System.out.println("Waiting for restarted consumers to finish consuming all messages..");
-        for (Iterator<Worker> iter = workers.iterator(); iter.hasNext();) {
-            Worker worker = iter.next();
-            while (!worker.waitForExit(1000 * 5)) {
-                System.out.println("Waiting for restarted consumers to finish consuming all messages..");
-                System.out.println("Stats: Produced Batches: " + this.publishedBatches.get() + ", Consumed Batches: " + this.consumedBatches.get());
-            }
-        }
-        workers.clear();
-
-        System.out.println("Workers finished..");
-        System.out.println("Stats: Produced Batches: " + this.publishedBatches.get() + ", Consumed Batches: " + this.consumedBatches.get());
-
-        if (errors.size() > 0) {
-            throw errors.get(0);
-        }
-
-    }
-
-    public static void main(String[] args) {
-        try {
-            AcidTestTool tool = new AcidTestTool();
-            tool.setUp();
-            tool.testAcidTransactions();
-            tool.tearDown();
-        } catch (Throwable e) {
-            System.out.println("Test Failed: " + e.getMessage());
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ConsumerTool.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ConsumerTool.java
deleted file mode 100755
index 3f130fc..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ConsumerTool.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.tool;
-
-import java.io.IOException;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-/**
- * A simple tool for consuming messages
- * 
- * 
- */
-public class ConsumerTool extends ToolSupport implements MessageListener {
-
-    protected int count;
-    protected int dumpCount = 10;
-    protected boolean verbose = true;
-    protected int maxiumMessages;
-    private boolean pauseBeforeShutdown;
-
-    public static void main(String[] args) {
-        ConsumerTool tool = new ConsumerTool();
-        if (args.length > 0) {
-            tool.url = args[0];
-        }
-        if (args.length > 1) {
-            tool.topic = args[1].equalsIgnoreCase("true");
-        }
-        if (args.length > 2) {
-            tool.subject = args[2];
-        }
-        if (args.length > 3) {
-            tool.durable = args[3].equalsIgnoreCase("true");
-        }
-        if (args.length > 4) {
-            tool.maxiumMessages = Integer.parseInt(args[4]);
-        }
-        tool.run();
-    }
-
-    public void run() {
-        try {
-            System.out.println("Connecting to URL: " + url);
-            System.out.println("Consuming " + (topic ? "topic" : "queue") + ": " + subject);
-            System.out.println("Using " + (durable ? "durable" : "non-durable") + " subscription");
-
-            Connection connection = createConnection();
-            Session session = createSession(connection);
-            MessageConsumer consumer = null;
-            if (durable && topic) {
-                consumer = session.createDurableSubscriber((Topic)destination, consumerName);
-            } else {
-                consumer = session.createConsumer(destination);
-            }
-            if (maxiumMessages <= 0) {
-                consumer.setMessageListener(this);
-            }
-            connection.start();
-
-            if (maxiumMessages > 0) {
-                consumeMessagesAndClose(connection, session, consumer);
-            }
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void onMessage(Message message) {
-        try {
-            if (message instanceof TextMessage) {
-                TextMessage txtMsg = (TextMessage)message;
-                if (verbose) {
-
-                    String msg = txtMsg.getText();
-                    if (msg.length() > 50) {
-                        msg = msg.substring(0, 50) + "...";
-                    }
-
-                    System.out.println("Received: " + msg);
-                }
-            } else {
-                if (verbose) {
-                    System.out.println("Received: " + message);
-                }
-            }
-            /*
-             * if (++count % dumpCount == 0) { dumpStats(connection); }
-             */
-        } catch (JMSException e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer) throws JMSException, IOException {
-        System.out.println("We are about to wait until we consume: " + maxiumMessages + " message(s) then we will shutdown");
-
-        for (int i = 0; i < maxiumMessages; i++) {
-            Message message = consumer.receive();
-            onMessage(message);
-        }
-        System.out.println("Closing connection");
-        consumer.close();
-        session.close();
-        connection.close();
-        if (pauseBeforeShutdown) {
-            System.out.println("Press return to shut down");
-            System.in.read();
-        }
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/JndiProducerTool.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/JndiProducerTool.java
deleted file mode 100755
index 6d9c7c5..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/JndiProducerTool.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.tool;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Queue;
-import javax.naming.InitialContext;
-
-/**
- * 
- */
-public class JndiProducerTool extends ProducerTool {
-
-    public static void main(String[] args) {
-        runTool(args, new JndiProducerTool());
-    }
-
-    protected Connection createConnection() throws Exception {
-        InitialContext jndiContext = new InitialContext();
-
-        ConnectionFactory queueConnectionFactory = (ConnectionFactory) jndiContext.lookup("ConnectionFactory");
-        Connection connection = queueConnectionFactory.createConnection();
-        destination = (Queue) jndiContext.lookup(subject);
-        return connection;
-
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ProducerTool.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ProducerTool.java
deleted file mode 100755
index 98f873b..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ProducerTool.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.tool;
-
-import java.util.Date;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-/**
- * A simple tool for publishing messages
- * 
- * 
- */
-public class ProducerTool extends ToolSupport {
-
-    protected int messageCount = 10;
-    protected long sleepTime;
-    protected boolean verbose = true;
-    protected int messageSize = 255;
-
-    public static void main(String[] args) {
-        runTool(args, new ProducerTool());
-    }
-
-    protected static void runTool(String[] args, ProducerTool tool) {
-        if (args.length > 0) {
-            tool.url = args[0];
-        }
-        if (args.length > 1) {
-            tool.topic = args[1].equalsIgnoreCase("true");
-        }
-        if (args.length > 2) {
-            tool.subject = args[2];
-        }
-        if (args.length > 3) {
-            tool.durable = args[3].equalsIgnoreCase("true");
-        }
-        if (args.length > 4) {
-            tool.messageCount = Integer.parseInt(args[4]);
-        }
-        if (args.length > 5) {
-            tool.messageSize = Integer.parseInt(args[5]);
-        }
-        tool.run();
-    }
-
-    public void run() {
-        try {
-            System.out.println("Connecting to URL: " + url);
-            System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
-            System.out.println("Using " + (durable ? "durable" : "non-durable") + " publishing");
-
-            Connection connection = createConnection();
-            Session session = createSession(connection);
-            MessageProducer producer = createProducer(session);
-            // connection.start();
-
-            sendLoop(session, producer);
-
-            System.out.println("Done.");
-            close(connection, session);
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    protected MessageProducer createProducer(Session session) throws JMSException {
-        MessageProducer producer = session.createProducer(destination);
-        if (durable) {
-            producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        } else {
-            producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        }
-        return producer;
-    }
-
-    protected void sendLoop(Session session, MessageProducer producer) throws Exception {
-
-        for (int i = 0; i < messageCount; i++) {
-
-            TextMessage message = session.createTextMessage(createMessageText(i));
-
-            if (verbose) {
-                String msg = message.getText();
-                if (msg.length() > 50) {
-                    msg = msg.substring(0, 50) + "...";
-                }
-                System.out.println("Sending message: " + msg);
-            }
-
-            producer.send(message);
-            Thread.sleep(sleepTime);
-        }
-        producer.send(session.createMessage());
-    }
-
-    /**
-     * @param i
-     * @return
-     */
-    private String createMessageText(int index) {
-        StringBuffer buffer = new StringBuffer(messageSize);
-        buffer.append("Message: " + index + " sent at: " + new Date());
-        if (buffer.length() > messageSize) {
-            return buffer.substring(0, messageSize);
-        }
-        for (int i = buffer.length(); i < messageSize; i++) {
-            buffer.append(' ');
-        }
-        return buffer.toString();
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ToolSupport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ToolSupport.java
deleted file mode 100755
index c3c9124..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ToolSupport.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.tool;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.util.IndentPrinter;
-
-/**
- * Abstract base class useful for implementation inheritence
- * 
- * 
- */
-public class ToolSupport {
-
-    protected Destination destination;
-    protected String subject = "TOOL.DEFAULT";
-    protected boolean topic = true;
-    protected String user = ActiveMQConnection.DEFAULT_USER;
-    protected String pwd = ActiveMQConnection.DEFAULT_PASSWORD;
-    protected String url = ActiveMQConnection.DEFAULT_BROKER_URL;
-    protected boolean transacted;
-    protected boolean durable;
-    protected String clientID = getClass().getName();
-    protected int ackMode = Session.AUTO_ACKNOWLEDGE;
-    protected String consumerName = "James";
-
-    protected Session createSession(Connection connection) throws Exception {
-        if (durable) {
-            connection.setClientID(clientID);
-        }
-        Session session = connection.createSession(transacted, ackMode);
-        if (topic) {
-            destination = session.createTopic(subject);
-        } else {
-            destination = session.createQueue(subject);
-        }
-        return session;
-    }
-
-    protected Connection createConnection() throws JMSException, Exception {
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, pwd, url);
-        return connectionFactory.createConnection();
-    }
-
-    protected void close(Connection connection, Session session) throws JMSException {
-        // lets dump the stats
-        dumpStats(connection);
-
-        if (session != null) {
-            session.close();
-        }
-        if (connection != null) {
-            connection.close();
-        }
-    }
-
-    protected void dumpStats(Connection connection) {
-        ActiveMQConnection c = (ActiveMQConnection)connection;
-        c.getConnectionStats().dump(new IndentPrinter());
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/WebServer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/WebServer.java
deleted file mode 100755
index 98cf61d..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/WebServer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.tool;
-
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.bio.SocketConnector;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-/**
- * 
- */
-public final class WebServer {
-
-    public static final int PORT = 8080;
-    // public static final String WEBAPP_DIR = "target/activemq";
-    public static final String WEBAPP_DIR = "src/webapp";
-    public static final String WEBAPP_CTX = "/";
-
-    private WebServer() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        Server server = new Server();
-        Connector context = new SocketConnector();
-        context.setServer(server);
-        context.setPort(PORT);
-
-        String webappDir = WEBAPP_DIR;
-        if (args.length > 0) {
-            webappDir = args[0];
-        }
-
-        WebAppContext webapp = new WebAppContext();
-        webapp.setServer(server);
-        webapp.setContextPath(WEBAPP_CTX);
-        webapp.setResourceBase(webappDir);
-
-        server.setHandler(webapp);
-
-        server.setConnectors(new Connector[] {
-            context
-        });
-        server.start();
-
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/DiscoveryRegistryServlet.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/DiscoveryRegistryServlet.java
deleted file mode 100644
index 1d85ccb..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/DiscoveryRegistryServlet.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.transport.discovery.http;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DiscoveryRegistryServlet extends HttpServlet {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(HTTPDiscoveryAgent.class);
-    long maxKeepAge = 1000*60*60; // 1 hour.
-    ConcurrentHashMap<String, ConcurrentHashMap<String, Long>> serviceGroups = new ConcurrentHashMap<String, ConcurrentHashMap<String, Long>>();
-    
-    @Override
-    protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-        String group = req.getPathInfo();
-        String service = req.getHeader("service");
-        LOG.debug("Registering: group="+group+", service="+service);
-        
-        ConcurrentHashMap<String, Long> services = getServiceGroup(group);
-        services.put(service, System.currentTimeMillis());
-    }
-
-    private ConcurrentHashMap<String, Long> getServiceGroup(String group) {
-        ConcurrentHashMap<String, Long> rc = serviceGroups.get(group);
-        if( rc == null ) {
-            rc = new ConcurrentHashMap<String, Long>();
-            serviceGroups.put(group, rc);
-        }
-        return rc;
-    }
-
-    @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-        try {
-            long freshness = 1000*30;
-            String p = req.getParameter("freshness");
-            if( p!=null ) {
-                freshness = Long.parseLong(p);
-            }
-            
-            String group = req.getPathInfo();
-            LOG.debug("group="+group);
-            ConcurrentHashMap<String, Long> services = getServiceGroup(group);
-            PrintWriter writer = resp.getWriter();
-            
-            long now = System.currentTimeMillis();
-            long dropTime = now-maxKeepAge;             
-            long minimumTime = now-freshness;
-            
-            ArrayList<String> dropList = new ArrayList<String>();
-            for (Map.Entry<String, Long> entry : services.entrySet()) {
-                if( entry.getValue() > minimumTime ) {
-                    writer.println(entry.getKey());
-                } else if( entry.getValue() < dropTime ) {
-                    dropList.add(entry.getKey());
-                }
-            }
-            
-            // We might as well get rid of the really old entries.
-            for (String service : dropList) {
-                services.remove(service);
-            }
-            
-            
-        } catch (Exception e) {
-            resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error occured: "+e);
-        }
-    }
-    
-    @Override
-    protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-        String group = req.getPathInfo();
-        String service = req.getHeader("service");
-        LOG.debug("Unregistering: group="+group+", service="+service);
-        
-        ConcurrentHashMap<String, Long> services = getServiceGroup(group);
-        services.remove(service);
-    }
-        
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/EmbeddedJettyServer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/EmbeddedJettyServer.java
deleted file mode 100644
index f42bc44..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/EmbeddedJettyServer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.transport.discovery.http;
-
-import java.net.URI;
-
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-
-public class EmbeddedJettyServer implements org.apache.activemq.Service {
-
-    private HTTPDiscoveryAgent agent;
-    private Server server;
-    private SelectChannelConnector connector;
-    private DiscoveryRegistryServlet camelServlet = new DiscoveryRegistryServlet();
-    
-    public void start() throws Exception {
-        URI uri = new URI(agent.getRegistryURL());
-
-        server = new Server();
-        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.NO_SECURITY | ServletContextHandler.NO_SESSIONS);
-        
-        context.setContextPath("/");
-        ServletHolder holder = new ServletHolder();
-        holder.setServlet(camelServlet);
-        context.addServlet(holder, "/*");
-        server.setHandler(context);
-        server.start();
-        
-        int port = 80;
-        if( uri.getPort() >=0 ) {
-            port = uri.getPort();
-        }
-        
-        connector = new SelectChannelConnector();
-        connector.setPort(port);
-        server.addConnector(connector);
-        connector.start();
-    }
-
-    public void stop() throws Exception {
-        if( connector!=null ) {
-            connector.stop();
-            connector = null;
-        }
-        if( server!=null ) {
-            server.stop();
-            server = null;
-        }
-    }
-
-    public HTTPDiscoveryAgent getAgent() {
-        return agent;
-    }
-
-    public void setAgent(HTTPDiscoveryAgent agent) {
-        this.agent = agent;
-    }
-    
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgent.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgent.java
deleted file mode 100644
index 97c8e15..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgent.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * 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.transport.discovery.http;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Scanner;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryListener;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.methods.DeleteMethod;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.PutMethod;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class HTTPDiscoveryAgent implements DiscoveryAgent {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(HTTPDiscoveryAgent.class);
-    
-    private String registryURL = "http://localhost:8080/discovery-registry/default";
-    private HttpClient httpClient = new HttpClient();
-    private AtomicBoolean running=new AtomicBoolean();
-    private final AtomicReference<DiscoveryListener> discoveryListener = new AtomicReference<DiscoveryListener>();
-    private final HashSet<String> registeredServices = new HashSet<String>();
-    private final HashMap<String, SimpleDiscoveryEvent> discoveredServices = new HashMap<String, SimpleDiscoveryEvent>();    
-    private Thread thread;   
-    private long updateInterval = 1000*10;
-    private String brokerName;
-    private boolean startEmbeddRegistry=false;
-    private Service jetty;
-    private AtomicInteger startCounter=new AtomicInteger(0);
-
-    
-    private long initialReconnectDelay = 1000;
-    private long maxReconnectDelay = 1000 * 30;
-    private long backOffMultiplier = 2;
-    private boolean useExponentialBackOff=true;    
-    private int maxReconnectAttempts;
-    private final Object sleepMutex = new Object();
-    private long minConnectTime = 5000;
-    
-    class SimpleDiscoveryEvent extends DiscoveryEvent {
-
-        private int connectFailures;
-        private long reconnectDelay = initialReconnectDelay;
-        private long connectTime = System.currentTimeMillis();
-        private AtomicBoolean failed = new AtomicBoolean(false);
-        private AtomicBoolean removed = new AtomicBoolean(false);
-
-        public SimpleDiscoveryEvent(String service) {
-            super(service);
-        }
-
-    }
-
-    
-    public String getGroup() {
-        return null;
-    }
-
-    public void registerService(String service) throws IOException {
-        synchronized(registeredServices) {
-            registeredServices.add(service);
-        }
-        doRegister(service);
-    }
-
-    synchronized private void doRegister(String service) {
-        String url = registryURL;
-        try {
-            PutMethod method = new PutMethod(url);
-//            method.setParams(createParams());
-            method.setRequestHeader("service", service);
-            int responseCode = httpClient.executeMethod(method);
-            LOG.debug("PUT to "+url+" got a "+responseCode);
-        } catch (Exception e) {
-            LOG.debug("PUT to "+url+" failed with: "+e);
-        }
-    }
-    
-    synchronized private void doUnRegister(String service) {
-        String url = registryURL;
-        try {
-            DeleteMethod method = new DeleteMethod(url);
-//            method.setParams(createParams());
-            method.setRequestHeader("service", service);
-            int responseCode = httpClient.executeMethod(method);
-            LOG.debug("DELETE to "+url+" got a "+responseCode);
-        } catch (Exception e) {
-            LOG.debug("DELETE to "+url+" failed with: "+e);
-        }
-    }
-
-//    private HttpMethodParams createParams() {
-//        HttpMethodParams params = new HttpMethodParams();
-//        params.setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(0,false));
-//        return params;
-//    }
-    
-    synchronized private Set<String> doLookup(long freshness) {
-        String url = registryURL+"?freshness="+freshness;
-        try {
-            GetMethod method = new GetMethod(url);
-//            method.setParams(createParams());
-            int responseCode = httpClient.executeMethod(method);
-            LOG.debug("GET to "+url+" got a "+responseCode);
-            if( responseCode == 200 ) {
-                Set<String> rc = new HashSet<String>();
-                Scanner scanner = new Scanner(method.getResponseBodyAsStream());
-                while( scanner.hasNextLine() ) {
-                    String service = scanner.nextLine();
-                    if( service.trim().length() != 0 ) {
-                        rc.add(service);
-                    }
-                }
-                return rc;
-            } else {
-                LOG.debug("GET to "+url+" failed with response code: "+responseCode);
-                return null;
-            }
-        } catch (Exception e) {
-            LOG.debug("GET to "+url+" failed with: "+e);
-            return null;
-        }
-    }
-
-    public void serviceFailed(DiscoveryEvent devent) throws IOException {
-
-        final SimpleDiscoveryEvent event = (SimpleDiscoveryEvent)devent;
-        if (event.failed.compareAndSet(false, true)) {
-        	discoveryListener.get().onServiceRemove(event);
-        	if(!event.removed.get()) {
-	        	// Setup a thread to re-raise the event...
-	            Thread thread = new Thread() {
-	                public void run() {
-	
-	                    // We detect a failed connection attempt because the service
-	                    // fails right away.
-	                    if (event.connectTime + minConnectTime > System.currentTimeMillis()) {
-	                        LOG.debug("Failure occured soon after the discovery event was generated.  It will be clasified as a connection failure: "+event);
-	
-	                        event.connectFailures++;
-	
-	                        if (maxReconnectAttempts > 0 && event.connectFailures >= maxReconnectAttempts) {
-	                            LOG.debug("Reconnect attempts exceeded "+maxReconnectAttempts+" tries.  Reconnecting has been disabled.");
-	                            return;
-	                        }
-	
-	                        synchronized (sleepMutex) {
-	                            try {
-	                                if (!running.get() || event.removed.get()) {
-	                                    return;
-	                                }
-	                                LOG.debug("Waiting "+event.reconnectDelay+" ms before attepting to reconnect.");
-	                                sleepMutex.wait(event.reconnectDelay);
-	                            } catch (InterruptedException ie) {
-	                                Thread.currentThread().interrupt();
-	                                return;
-	                            }
-	                        }
-	
-	                        if (!useExponentialBackOff) {
-	                            event.reconnectDelay = initialReconnectDelay;
-	                        } else {
-	                            // Exponential increment of reconnect delay.
-	                            event.reconnectDelay *= backOffMultiplier;
-	                            if (event.reconnectDelay > maxReconnectDelay) {
-	                                event.reconnectDelay = maxReconnectDelay;
-	                            }
-	                        }
-	
-	                    } else {
-	                        event.connectFailures = 0;
-	                        event.reconnectDelay = initialReconnectDelay;
-	                    }
-	
-	                    if (!running.get() || event.removed.get()) {
-	                        return;
-	                    }
-	
-	                    event.connectTime = System.currentTimeMillis();
-	                    event.failed.set(false);
-	                    discoveryListener.get().onServiceAdd(event);
-	                }
-	            };
-	            thread.setDaemon(true);
-	            thread.start();
-        	}
-        }
-    }
-
-
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-    }
-
-    public void setDiscoveryListener(DiscoveryListener discoveryListener) {
-        this.discoveryListener.set(discoveryListener);
-    }
-
-    public void setGroup(String group) {
-    }
-
-    public void start() throws Exception {
-        if( startCounter.addAndGet(1)==1 ) {
-            if( startEmbeddRegistry ) {
-                jetty = createEmbeddedJettyServer();
-                Map props = new HashMap();
-                props.put("agent", this);
-                IntrospectionSupport.setProperties(jetty, props);
-                jetty.start();
-            }
-            
-            running.set(true);
-            thread = new Thread("HTTPDiscovery Agent") {
-                @Override
-                public void run() {
-                    while(running.get()) {
-                        try {
-                            update();
-                            Thread.sleep(updateInterval);
-                        } catch (InterruptedException e) {
-                            return;
-                        }
-                    }
-                }
-            };
-            thread.setDaemon(true);
-            thread.start();
-        }
-    }
-
-    /**
-     * Create the EmbeddedJettyServer instance via reflection so that we can avoid a hard runtime dependency on 
-     * jetty.
-     * 
-     * @return
-     * @throws Exception
-     */
-    private Service createEmbeddedJettyServer()  throws Exception {
-        Class clazz = HTTPDiscoveryAgent.class.getClassLoader().loadClass("org.apache.activemq.transport.discovery.http.EmbeddedJettyServer");
-        return (Service)clazz.newInstance();
-    }
-
-    private void update() {
-        // Register all our services...
-        synchronized(registeredServices) {
-            for (String service : registeredServices) {
-                doRegister(service);
-            }
-        }
-        
-        // Find new registered services...
-        DiscoveryListener discoveryListener = this.discoveryListener.get();
-        if(discoveryListener!=null) {
-            Set<String> activeServices = doLookup(updateInterval*3);
-            // If there is error talking the the central server, then activeServices == null
-            if( activeServices !=null ) {
-                synchronized(discoveredServices) {
-                    
-                    HashSet<String> removedServices = new HashSet<String>(discoveredServices.keySet());
-                    removedServices.removeAll(activeServices);
-                    
-                    HashSet<String> addedServices = new HashSet<String>(activeServices);
-                    addedServices.removeAll(discoveredServices.keySet());
-                    addedServices.removeAll(removedServices);
-                    
-                    for (String service : addedServices) {
-                        SimpleDiscoveryEvent e = new SimpleDiscoveryEvent(service);
-                        discoveredServices.put(service, e);
-                        discoveryListener.onServiceAdd(e);
-                    }
-                    
-                    for (String service : removedServices) {
-                    	SimpleDiscoveryEvent e = discoveredServices.remove(service);
-                    	if( e !=null ) {
-                    		e.removed.set(true);
-                    	}
-                        discoveryListener.onServiceRemove(e);
-                    }
-                }
-            }
-        }
-    }
-
-    public void stop() throws Exception {
-        if( startCounter.decrementAndGet()==0 ) {
-            running.set(false);
-            if( thread!=null ) {
-                thread.join(updateInterval*3);
-                thread=null;
-            }
-            if( jetty!=null ) {
-                jetty.stop();
-                jetty = null;
-            }
-        }
-    }
-
-    public String getRegistryURL() {
-        return registryURL;
-    }
-
-    public void setRegistryURL(String discoveryRegistryURL) {
-        this.registryURL = discoveryRegistryURL;
-    }
-
-    public long getUpdateInterval() {
-        return updateInterval;
-    }
-
-    public void setUpdateInterval(long updateInterval) {
-        this.updateInterval = updateInterval;
-    }
-
-    public boolean isStartEmbeddRegistry() {
-        return startEmbeddRegistry;
-    }
-
-    public void setStartEmbeddRegistry(boolean startEmbeddRegistry) {
-        this.startEmbeddRegistry = startEmbeddRegistry;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgentFactory.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgentFactory.java
deleted file mode 100755
index 02556c5..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/discovery/http/HTTPDiscoveryAgentFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.transport.discovery.http;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-
-public class HTTPDiscoveryAgentFactory extends DiscoveryAgentFactory {
-
-    protected DiscoveryAgent doCreateDiscoveryAgent(URI uri) throws IOException {
-        try {
-            
-            Map options = URISupport.parseParameters(uri);
-            uri = URISupport.removeQuery(uri);
-            
-            HTTPDiscoveryAgent rc = new HTTPDiscoveryAgent();
-            rc.setRegistryURL(uri.toString());
-            
-            IntrospectionSupport.setProperties(rc, options);
-            
-            return rc;
-            
-        } catch (Throwable e) {
-            throw IOExceptionSupport.create("Could not create discovery agent: " + uri, e);
-        }
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java
deleted file mode 100755
index ee826fd..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.io.IOException;
-import java.util.Queue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.activemq.transport.TransportSupport;
-import org.apache.activemq.util.ServiceStopper;
-
-/**
- * A server side HTTP based TransportChannel which processes incoming packets
- * and adds outgoing packets onto a {@link Queue} so that they can be dispatched
- * by the HTTP GET requests from the client.
- *
- * 
- */
-public class BlockingQueueTransport extends TransportSupport {
-    public static final long MAX_TIMEOUT = 30000L;
-
-    private BlockingQueue<Object> queue;
-
-    public BlockingQueueTransport(BlockingQueue<Object> channel) {
-        this.queue = channel;
-    }
-
-    public BlockingQueue<Object> getQueue() {
-        return queue;
-    }
-
-    public void oneway(Object command) throws IOException {
-        try {
-            boolean success = queue.offer(command, MAX_TIMEOUT, TimeUnit.MILLISECONDS);
-            if (!success) {
-                throw new IOException("Fail to add to BlockingQueue. Add timed out after " + MAX_TIMEOUT + "ms: size=" + queue.size());
-            }
-        } catch (InterruptedException e) {
-            throw new IOException("Fail to add to BlockingQueue. Interrupted while waiting for space: size=" + queue.size());
-        }
-    }
-
-
-    public String getRemoteAddress() {
-        return "blockingQueue_" + queue.hashCode();
-    }
-
-    protected void doStart() throws Exception {
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-    }
-
-    public int getReceiveCounter() {
-        return 0;
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
deleted file mode 100755
index 4bda521..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.URI;
-
-import org.apache.activemq.command.ShutdownInfo;
-import org.apache.activemq.transport.FutureResponse;
-import org.apache.activemq.transport.util.TextWireFormat;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.HeadMethod;
-import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.params.HttpClientParams;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A HTTP {@link org.apache.activemq.transport.TransportChannel} which uses the
- * <a href="http://jakarta.apache.org/commons/httpclient/">commons-httpclient</a>
- * library
- * 
- * 
- */
-public class HttpClientTransport extends HttpTransportSupport {
-
-    public static final int MAX_CLIENT_TIMEOUT = 30000;
-    private static final Logger LOG = LoggerFactory.getLogger(HttpClientTransport.class);
-    private static final IdGenerator CLIENT_ID_GENERATOR = new IdGenerator();
-
-    private HttpClient sendHttpClient;
-    private HttpClient receiveHttpClient;
-
-    private final String clientID = CLIENT_ID_GENERATOR.generateId();
-    private boolean trace;
-    private GetMethod httpMethod;
-    private volatile int receiveCounter;
-
-    private int soTimeout = MAX_CLIENT_TIMEOUT;
-    
-    public HttpClientTransport(TextWireFormat wireFormat, URI remoteUrl) {
-        super(wireFormat, remoteUrl);
-    }
-
-    public FutureResponse asyncRequest(Object command) throws IOException {
-        return null;
-    }
-
-    public void oneway(Object command) throws IOException {
-
-        if (isStopped()) {
-            throw new IOException("stopped.");
-        }
-        PostMethod httpMethod = new PostMethod(getRemoteUrl().toString());
-        configureMethod(httpMethod);
-        String data = getTextWireFormat().marshalText(command);
-        byte[] bytes = data.getBytes("UTF-8");
-        InputStreamRequestEntity entity = new InputStreamRequestEntity(new ByteArrayInputStream(bytes));
-        httpMethod.setRequestEntity(entity);
-
-        try {
-
-            HttpClient client = getSendHttpClient();
-            HttpClientParams params = new HttpClientParams();
-            params.setSoTimeout(soTimeout);
-            client.setParams(params);
-            int answer = client.executeMethod(httpMethod);
-            if (answer != HttpStatus.SC_OK) {
-                throw new IOException("Failed to post command: " + command + " as response was: " + answer);
-            }
-            if (command instanceof ShutdownInfo) {
-            	try {
-            		stop();
-            	} catch (Exception e) {
-            		LOG.warn("Error trying to stop HTTP client: "+ e, e);
-            	}
-            }
-        } catch (IOException e) {
-            throw IOExceptionSupport.create("Could not post command: " + command + " due to: " + e, e);
-        } finally {
-            httpMethod.getResponseBody();
-            httpMethod.releaseConnection();
-        }
-    }
-
-    public Object request(Object command) throws IOException {
-        return null;
-    }
-
-    public void run() {
-
-        LOG.trace("HTTP GET consumer thread starting: " + this);
-        HttpClient httpClient = getReceiveHttpClient();
-        URI remoteUrl = getRemoteUrl();
-
-        while (!isStopped() && !isStopping()) {
-
-            httpMethod = new GetMethod(remoteUrl.toString());
-            configureMethod(httpMethod);
-
-            try {
-                int answer = httpClient.executeMethod(httpMethod);
-                if (answer != HttpStatus.SC_OK) {
-                    if (answer == HttpStatus.SC_REQUEST_TIMEOUT) {
-                        LOG.debug("GET timed out");
-                        try {
-                            Thread.sleep(1000);
-                        } catch (InterruptedException e) {
-                            onException(new InterruptedIOException());
-                            break;
-                        }
-                    } else {
-                        onException(new IOException("Failed to perform GET on: " + remoteUrl + " as response was: " + answer));
-                        break;
-                    }
-                } else {
-                    receiveCounter++;
-                    DataInputStream stream = new DataInputStream(httpMethod.getResponseBodyAsStream());
-                    Object command = (Object)getTextWireFormat().unmarshal(stream);
-                    if (command == null) {
-                        LOG.debug("Received null command from url: " + remoteUrl);
-                    } else {
-                        doConsume(command);
-                    }
-                }
-            } catch (IOException e) {
-                onException(IOExceptionSupport.create("Failed to perform GET on: " + remoteUrl + " Reason: " + e.getMessage(), e));
-                break;
-            } finally {
-                httpMethod.releaseConnection();
-            }
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public HttpClient getSendHttpClient() {
-        if (sendHttpClient == null) {
-            sendHttpClient = createHttpClient();
-        }
-        return sendHttpClient;
-    }
-
-    public void setSendHttpClient(HttpClient sendHttpClient) {
-        this.sendHttpClient = sendHttpClient;
-    }
-
-    public HttpClient getReceiveHttpClient() {
-        if (receiveHttpClient == null) {
-            receiveHttpClient = createHttpClient();
-        }
-        return receiveHttpClient;
-    }
-
-    public void setReceiveHttpClient(HttpClient receiveHttpClient) {
-        this.receiveHttpClient = receiveHttpClient;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected void doStart() throws Exception {
-
-        LOG.trace("HTTP GET consumer thread starting: " + this);
-        HttpClient httpClient = getReceiveHttpClient();
-        URI remoteUrl = getRemoteUrl();
-
-        HeadMethod httpMethod = new HeadMethod(remoteUrl.toString());
-        configureMethod(httpMethod);
-
-        int answer = httpClient.executeMethod(httpMethod);
-        if (answer != HttpStatus.SC_OK) {
-            throw new IOException("Failed to perform GET on: " + remoteUrl + " as response was: " + answer);
-        }
-
-        super.doStart();
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        if (httpMethod != null) {
-            httpMethod.abort();
-        }
-    }
-
-    protected HttpClient createHttpClient() {
-        HttpClient client = new HttpClient();
-        if (getProxyHost() != null) {
-            client.getHostConfiguration().setProxy(getProxyHost(), getProxyPort());
-        }
-        return client;
-    }
-
-    protected void configureMethod(HttpMethod method) {
-        method.setRequestHeader("clientID", clientID);
-    }
-
-    public boolean isTrace() {
-        return trace;
-    }
-
-    public void setTrace(boolean trace) {
-        this.trace = trace;
-    }
-
-    public int getReceiveCounter() {
-        return receiveCounter;
-    }
-
-    public int getSoTimeout() {
-        return soTimeout;
-    }
-
-    public void setSoTimeout(int soTimeout) {
-        this.soTimeout = soTimeout;
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpEmbeddedTunnelServlet.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpEmbeddedTunnelServlet.java
deleted file mode 100755
index 1104120..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpEmbeddedTunnelServlet.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.net.URI;
-
-import javax.servlet.ServletException;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.transport.TransportAcceptListener;
-
-/**
- * This servlet embeds an ActiveMQ broker inside a servlet engine which is ideal
- * for deploying ActiveMQ inside a WAR and using this servlet as a HTTP tunnel.
- * 
- * 
- */
-public class HttpEmbeddedTunnelServlet extends HttpTunnelServlet {
-    private static final long serialVersionUID = -3705734740251302361L;
-
-    protected BrokerService broker;
-    protected HttpTransportServer transportConnector;
-
-    public synchronized void init() throws ServletException {
-        // lets initialize the ActiveMQ broker
-        try {
-            if (broker == null) {
-                broker = createBroker();
-
-                // Add the servlet connector
-                String url = getConnectorURL();
-                HttpTransportFactory factory = new HttpTransportFactory();
-                transportConnector = (HttpTransportServer) factory.doBind(new URI(url));
-                broker.addConnector(transportConnector);
-
-                String brokerURL = getServletContext().getInitParameter("org.apache.activemq.brokerURL");
-                if (brokerURL != null) {
-                    log("Listening for internal communication on: " + brokerURL);
-                }
-            }
-            broker.start();
-        } catch (Exception e) {
-            throw new ServletException("Failed to start embedded broker: " + e, e);
-        }
-        // now lets register the listener
-        TransportAcceptListener listener = transportConnector.getAcceptListener();
-        getServletContext().setAttribute("transportChannelListener", listener);
-        super.init();
-    }
-
-    /**
-     * Factory method to create a new broker
-     * 
-     * @throws Exception
-     */
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        return answer;
-    }
-
-    protected String getConnectorURL() {
-        return "http://localhost/" + getServletContext().getServletContextName();
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpSpringEmbeddedTunnelServlet.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpSpringEmbeddedTunnelServlet.java
deleted file mode 100644
index d110bd8..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpSpringEmbeddedTunnelServlet.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.transport.http;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- * This servlet embeds an ActiveMQ broker inside a servlet engine which is ideal
- * for deploying ActiveMQ inside a WAR and using this servlet as a HTTP tunnel.
- * 
- * 
- */
-public class HttpSpringEmbeddedTunnelServlet extends HttpEmbeddedTunnelServlet {
-
-    private static final long serialVersionUID = -6568661997192814908L;
-
-    /**
-     * Factory method to create a new broker
-     */
-    protected BrokerService createBroker() throws Exception {
-
-        String configFile = getServletContext().getInitParameter("org.activemq.config.file");
-        if (configFile == null) {
-            configFile = "activemq.xml";
-        }
-
-        BrokerFactoryBean factory = new BrokerFactoryBean(new ClassPathResource(configFile));
-        factory.afterPropertiesSet();
-
-        return factory.getBroker();
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java
deleted file mode 100755
index 9b5ce35..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.transport.util.TextWireFormat;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.Callback;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- * @deprecated
- * @see HttpClientTransport
- */
-@Deprecated
-public class HttpTransport extends HttpTransportSupport {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(HttpTransport.class);
-    
-    private HttpURLConnection sendConnection;
-    private HttpURLConnection receiveConnection;
-    private URL url;
-    private String clientID;
-    private volatile int receiveCounter;
-    
-    // private String sessionID;
-
-    public HttpTransport(TextWireFormat wireFormat, URI remoteUrl) throws MalformedURLException {
-        super(wireFormat, remoteUrl);
-        url = new URL(remoteUrl.toString());
-    }
-
-    public void oneway(Object o) throws IOException {
-        final Command command = (Command)o;
-        try {
-            if (command.getDataStructureType() == ConnectionInfo.DATA_STRUCTURE_TYPE) {
-                boolean startGetThread = clientID == null;
-                clientID = ((ConnectionInfo)command).getClientId();
-                if (startGetThread && isStarted()) {
-                    try {
-                        super.doStart();
-                    } catch (Exception e) {
-                        throw IOExceptionSupport.create(e);
-                    }
-                }
-            }
-
-            HttpURLConnection connection = getSendConnection();
-            String text = getTextWireFormat().marshalText(command);
-            Writer writer = new OutputStreamWriter(connection.getOutputStream());
-            writer.write(text);
-            writer.flush();
-            int answer = connection.getResponseCode();
-            if (answer != HttpURLConnection.HTTP_OK) {
-                throw new IOException("Failed to post command: " + command + " as response was: " + answer);
-            }
-            // checkSession(connection);
-        } catch (IOException e) {
-            throw IOExceptionSupport.create("Could not post command: " + command + " due to: " + e, e);
-        }
-    }
-
-    public void run() {
-        LOG.trace("HTTP GET consumer thread starting for transport: " + this);
-        URI remoteUrl = getRemoteUrl();
-        while (!isStopped()) {
-            try {
-                HttpURLConnection connection = getReceiveConnection();
-                int answer = connection.getResponseCode();
-                if (answer != HttpURLConnection.HTTP_OK) {
-                    if (answer == HttpURLConnection.HTTP_CLIENT_TIMEOUT) {
-                        LOG.trace("GET timed out");
-                    } else {
-                        LOG.warn("Failed to perform GET on: " + remoteUrl + " as response was: " + answer);
-                    }
-                } else {
-                    // checkSession(connection);
-
-                    // Create a String for the UTF content
-                    receiveCounter++;
-                    InputStream is = connection.getInputStream();
-                    ByteArrayOutputStream baos = new ByteArrayOutputStream(connection.getContentLength() > 0 ? connection.getContentLength() : 1024);
-                    int c = 0;
-                    while ((c = is.read()) >= 0) {
-                        baos.write(c);
-                    }
-                    ByteSequence sequence = baos.toByteSequence();
-                    String data = new String(sequence.data, sequence.offset, sequence.length, "UTF-8");
-
-                    Command command = (Command)getTextWireFormat().unmarshalText(data);
-
-                    if (command == null) {
-                        LOG.warn("Received null packet from url: " + remoteUrl);
-                    } else {
-                        doConsume(command);
-                    }
-                }
-            } catch (Throwable e) {
-                if (!isStopped()) {
-                    LOG.error("Failed to perform GET on: " + remoteUrl + " due to: " + e, e);
-                } else {
-                    LOG.trace("Caught error after closed: " + e, e);
-                }
-            } finally {
-                safeClose(receiveConnection);
-                receiveConnection = null;
-            }
-        }
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected HttpURLConnection createSendConnection() throws IOException {
-        HttpURLConnection conn = (HttpURLConnection)getRemoteURL().openConnection();
-        conn.setDoOutput(true);
-        conn.setRequestMethod("POST");
-        configureConnection(conn);
-        conn.connect();
-        return conn;
-    }
-
-    protected HttpURLConnection createReceiveConnection() throws IOException {
-        HttpURLConnection conn = (HttpURLConnection)getRemoteURL().openConnection();
-        conn.setDoOutput(false);
-        conn.setDoInput(true);
-        conn.setRequestMethod("GET");
-        configureConnection(conn);
-        conn.connect();
-        return conn;
-    }
-
-    // protected void checkSession(HttpURLConnection connection)
-    // {
-    // String set_cookie=connection.getHeaderField("Set-Cookie");
-    // if (set_cookie!=null && set_cookie.startsWith("JSESSIONID="))
-    // {
-    // String[] bits=set_cookie.split("[=;]");
-    // sessionID=bits[1];
-    // }
-    // }
-
-    protected void configureConnection(HttpURLConnection connection) {
-        // if (sessionID !=null) {
-        // connection.addRequestProperty("Cookie", "JSESSIONID="+sessionID);
-        // }
-        // else
-        if (clientID != null) {
-            connection.setRequestProperty("clientID", clientID);
-        }
-    }
-
-    protected URL getRemoteURL() {
-        return url;
-    }
-
-    protected HttpURLConnection getSendConnection() throws IOException {
-        setSendConnection(createSendConnection());
-        return sendConnection;
-    }
-
-    protected HttpURLConnection getReceiveConnection() throws IOException {
-        setReceiveConnection(createReceiveConnection());
-        return receiveConnection;
-    }
-
-    protected void setSendConnection(HttpURLConnection conn) {
-        safeClose(sendConnection);
-        sendConnection = conn;
-    }
-
-    protected void setReceiveConnection(HttpURLConnection conn) {
-        safeClose(receiveConnection);
-        receiveConnection = conn;
-    }
-
-    protected void doStart() throws Exception {
-        // Don't start the background thread until the clientId has been
-        // established.
-        if (clientID != null) {
-            super.doStart();
-        }
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        stopper.run(new Callback() {
-            public void execute() throws Exception {
-                safeClose(sendConnection);
-            }
-        });
-        sendConnection = null;
-        stopper.run(new Callback() {
-            public void execute() {
-                safeClose(receiveConnection);
-            }
-        });
-    }
-
-    /**
-     * @param connection TODO
-     */
-    private void safeClose(HttpURLConnection connection) {
-        if (connection != null) {
-            connection.disconnect();
-        }
-    }
-
-    public int getReceiveCounter() {
-        return receiveCounter;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java
deleted file mode 100755
index 6cbbe40..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.transport.InactivityMonitor;
-import org.apache.activemq.transport.MutexTransport;
-import org.apache.activemq.transport.ThreadNameFilter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportLoggerFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.util.TextWireFormat;
-import org.apache.activemq.transport.xstream.XStreamWireFormat;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
- * 
- */
-public class HttpTransportFactory extends TransportFactory {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(HttpTransportFactory.class);
-
-    public TransportServer doBind(URI location) throws IOException {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-            HttpTransportServer result = new HttpTransportServer(location, this);
-            Map<String, Object> transportOptions = IntrospectionSupport.extractProperties(options, "transport.");
-            result.setTransportOption(transportOptions);
-            return result;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    protected TextWireFormat asTextWireFormat(WireFormat wireFormat) {
-        if (wireFormat instanceof TextWireFormat) {
-            return (TextWireFormat)wireFormat;
-        }
-        LOG.trace("Not created with a TextWireFormat: " + wireFormat);
-        return new XStreamWireFormat();
-    }
-
-    protected String getDefaultWireFormatType() {
-        return "xstream";
-    }
-
-    protected Transport createTransport(URI location, WireFormat wf) throws IOException {
-        TextWireFormat textWireFormat = asTextWireFormat(wf);
-        return new HttpClientTransport(textWireFormat, location);
-    }
-
-    public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception {
-        return compositeConfigure(transport, format, options);
-    }
-
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-        transport = super.compositeConfigure(transport, format, options);
-        HttpClientTransport httpTransport = (HttpClientTransport)transport.narrow(HttpClientTransport.class);
-        if(httpTransport != null && httpTransport.isTrace() ) {
-            try {
-                transport = TransportLoggerFactory.getInstance().createTransportLogger(transport);
-            } catch (Throwable e) {
-                LOG.error("Could not create TransportLogger object for: " + TransportLoggerFactory.defaultLogWriterName + ", reason: " + e, e);
-            }
-        }
-        boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor", "true"));
-        if (useInactivityMonitor) {
-            transport = new InactivityMonitor(transport, null /* ignore wire format as no negotiation over http */);
-            IntrospectionSupport.setProperties(transport, options);
-        }
-
-        return transport;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
deleted file mode 100755
index 4789163..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.net.InetSocketAddress;
-import java.net.URI;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.transport.TransportServerSupport;
-import org.apache.activemq.transport.util.TextWireFormat;
-import org.apache.activemq.transport.xstream.XStreamWireFormat;
-import org.apache.activemq.util.ServiceStopper;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.bio.SocketConnector;
-import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.session.SessionHandler;
-import org.eclipse.jetty.servlet.ServletHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.servlet.ServletMapping;
-
-/**
- * 
- */
-public class HttpTransportServer extends TransportServerSupport {
-    private URI bindAddress;
-    private TextWireFormat wireFormat;
-    private Server server;
-    private Connector connector;
-    private HttpTransportFactory transportFactory;
-
-    public HttpTransportServer(URI uri, HttpTransportFactory factory) {
-        super(uri);
-        this.bindAddress = uri;
-        this.transportFactory = factory;
-    }
-
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public TextWireFormat getWireFormat() {
-        if (wireFormat == null) {
-            wireFormat = createWireFormat();
-        }
-        return wireFormat;
-    }
-
-    public void setWireFormat(TextWireFormat wireFormat) {
-        this.wireFormat = wireFormat;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected TextWireFormat createWireFormat() {
-        return new XStreamWireFormat();
-    }
-
-    protected void setConnector(Connector connector) {
-        this.connector = connector;
-    }
-
-    protected void doStart() throws Exception {
-        server = new Server();
-        if (connector == null) {
-            connector = new SocketConnector();
-        }
-        connector.setHost(bindAddress.getHost());
-        connector.setPort(bindAddress.getPort());
-        connector.setServer(server);
-        server.setConnectors(new Connector[] {
-            connector
-        });
-
-        ContextHandler contextHandler = new ContextHandler();
-        contextHandler.setContextPath("/");
-        contextHandler.setServer(server);
-        server.setHandler(contextHandler);
-
-        SessionHandler sessionHandler = new SessionHandler();
-        contextHandler.setHandler(sessionHandler);
-
-        ServletHandler servletHandler = new ServletHandler();
-        sessionHandler.setHandler(servletHandler);
-
-        ServletHolder holder = new ServletHolder();
-        holder.setName("httpTunnel");
-        holder.setClassName(HttpTunnelServlet.class.getName());
-        servletHandler.setServlets(new ServletHolder[] {
-            holder
-        });
-
-        ServletMapping mapping = new ServletMapping();
-        mapping.setServletName("httpTunnel");
-        mapping.setPathSpec("/*");
-        servletHandler.setServletMappings(new ServletMapping[] {
-            mapping
-        });
-
-        contextHandler.setAttribute("acceptListener", getAcceptListener());
-        contextHandler.setAttribute("wireFormat", getWireFormat());
-        contextHandler.setAttribute("transportFactory", transportFactory);
-        contextHandler.setAttribute("transportOptions", transportOptions);
-        server.start();
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        Server temp = server;
-        server = null;
-        if (temp != null) {
-            temp.stop();
-        }
-    }
-
-    public InetSocketAddress getSocketAddress() {
-        return null;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
deleted file mode 100644
index eaff85c..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.net.URI;
-
-import org.apache.activemq.transport.TransportThreadSupport;
-import org.apache.activemq.transport.util.TextWireFormat;
-
-/**
- * A useful base class for HTTP Transport implementations.
- * 
- * 
- */
-public abstract class HttpTransportSupport extends TransportThreadSupport {
-    private TextWireFormat textWireFormat;
-    private URI remoteUrl;
-    private String proxyHost;
-    private int proxyPort = 8080;
-
-    public HttpTransportSupport(TextWireFormat textWireFormat, URI remoteUrl) {
-        this.textWireFormat = textWireFormat;
-        this.remoteUrl = remoteUrl;
-    }
-
-    public String toString() {
-        return "HTTP Reader " + getRemoteUrl();
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public String getRemoteAddress() {
-        return remoteUrl.toString();
-    }
-
-    public URI getRemoteUrl() {
-        return remoteUrl;
-    }
-
-    public TextWireFormat getTextWireFormat() {
-        return textWireFormat;
-    }
-
-    public void setTextWireFormat(TextWireFormat textWireFormat) {
-        this.textWireFormat = textWireFormat;
-    }
-
-    public String getProxyHost() {
-        return proxyHost;
-    }
-
-    public void setProxyHost(String proxyHost) {
-        this.proxyHost = proxyHost;
-    }
-
-    public int getProxyPort() {
-        return proxyPort;
-    }
-
-    public void setProxyPort(int proxyPort) {
-        this.proxyPort = proxyPort;
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java
deleted file mode 100755
index 2d90396..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.activemq.Service;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.util.TextWireFormat;
-import org.apache.activemq.transport.xstream.XStreamWireFormat;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A servlet which handles server side HTTP transport, delegating to the
- * ActiveMQ broker. This servlet is designed for being embedded inside an
- * ActiveMQ Broker using an embedded Jetty or Tomcat instance.
- * 
- * 
- */
-public class HttpTunnelServlet extends HttpServlet {
-    private static final long serialVersionUID = -3826714430767484333L;
-    private static final Logger LOG = LoggerFactory.getLogger(HttpTunnelServlet.class);
-
-    private TransportAcceptListener listener;
-    private HttpTransportFactory transportFactory;
-    private TextWireFormat wireFormat;
-    private ConcurrentMap<String, BlockingQueueTransport> clients = new ConcurrentHashMap<String, BlockingQueueTransport>();
-    private final long requestTimeout = 30000L;
-    private HashMap transportOptions;
-
-    @Override
-    public void init() throws ServletException {
-        super.init();
-        listener = (TransportAcceptListener)getServletContext().getAttribute("acceptListener");
-        if (listener == null) {
-            throw new ServletException("No such attribute 'acceptListener' available in the ServletContext");
-        }
-        transportFactory = (HttpTransportFactory)getServletContext().getAttribute("transportFactory");
-        if (transportFactory == null) {
-            throw new ServletException("No such attribute 'transportFactory' available in the ServletContext");    
-        }
-        transportOptions = (HashMap)getServletContext().getAttribute("transportOptions");
-        wireFormat = (TextWireFormat)getServletContext().getAttribute("wireFormat");
-        if (wireFormat == null) {
-            wireFormat = createWireFormat();
-        }
-    }
-
-    @Override
-    protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        createTransportChannel(request, response);
-    }
-
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        // lets return the next response
-        Command packet = null;
-        int count = 0;
-        try {
-            BlockingQueueTransport transportChannel = getTransportChannel(request, response);
-            if (transportChannel == null) {
-                return;
-            }
-
-            packet = (Command)transportChannel.getQueue().poll(requestTimeout, TimeUnit.MILLISECONDS);
-
-            DataOutputStream stream = new DataOutputStream(response.getOutputStream());
-            // while( packet !=null ) {
-            wireFormat.marshal(packet, stream);
-            count++;
-            // packet = (Command) transportChannel.getQueue().poll(0,
-            // TimeUnit.MILLISECONDS);
-            // }
-
-        } catch (InterruptedException ignore) {
-        }
-        if (count == 0) {
-            response.setStatus(HttpServletResponse.SC_REQUEST_TIMEOUT);
-        }
-    }
-
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
-            IOException {
-
-        // Read the command directly from the reader, assuming UTF8 encoding
-        ServletInputStream sis = request.getInputStream();
-        Command command = (Command) wireFormat.unmarshalText(new InputStreamReader(sis, "UTF-8"));
-
-        if (command instanceof WireFormatInfo) {
-            WireFormatInfo info = (WireFormatInfo) command;
-            if (!canProcessWireFormatVersion(info.getVersion())) {
-                response.sendError(HttpServletResponse.SC_NOT_FOUND, "Cannot process wire format of version: "
-                        + info.getVersion());
-            }
-
-        } else {
-
-            BlockingQueueTransport transport = getTransportChannel(request, response);
-            if (transport == null) {
-                return;
-            }
-
-            transport.doConsume(command);
-        }
-    }
-
-    private boolean canProcessWireFormatVersion(int version) {
-        // TODO:
-        return true;
-    }
-
-    protected String readRequestBody(HttpServletRequest request) throws IOException {
-        StringBuffer buffer = new StringBuffer();
-        BufferedReader reader = request.getReader();
-        while (true) {
-            String line = reader.readLine();
-            if (line == null) {
-                break;
-            } else {
-                buffer.append(line);
-                buffer.append("\n");
-            }
-        }
-        return buffer.toString();
-    }
-
-    protected BlockingQueueTransport getTransportChannel(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        String clientID = request.getHeader("clientID");
-        if (clientID == null) {
-            response.sendError(HttpServletResponse.SC_BAD_REQUEST, "No clientID header specified");
-            LOG.warn("No clientID header specified");
-            return null;
-        }
-        BlockingQueueTransport answer = clients.get(clientID);
-        if (answer == null) {
-            LOG.warn("The clientID header specified is invalid. Client sesion has not yet been established for it: " + clientID);
-            return null;
-        }
-        return answer;
-    }
-
-    protected BlockingQueueTransport createTransportChannel(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        final String clientID = request.getHeader("clientID");
-
-        if (clientID == null) {
-            response.sendError(HttpServletResponse.SC_BAD_REQUEST, "No clientID header specified");
-            LOG.warn("No clientID header specified");
-            return null;
-        }
-
-        // Optimistically create the client's transport; this transport may be thrown away if the client has already registered.
-        BlockingQueueTransport answer = createTransportChannel();
-
-        // Record the client's transport and ensure that it has not already registered; this is thread-safe and only allows one 
-        // thread to register the client
-        if (clients.putIfAbsent(clientID, answer) != null) {
-            response.sendError(HttpServletResponse.SC_BAD_REQUEST, "A session for clientID '" + clientID + "' has already been established");
-            LOG.warn("A session for clientID '" + clientID + "' has already been established");
-            return null;
-        }
-
-        // Ensure that the client's transport is cleaned up when no longer
-        // needed.
-        answer.addServiceListener(new ServiceListener() {
-            public void started(Service service) {
-                // Nothing to do.
-            }
-
-            public void stopped(Service service) {
-                clients.remove(clientID);
-            }
-        });
-
-        // Configure the transport with any additional properties or filters.  Although the returned transport is not explicitly
-        // persisted, if it is a filter (e.g., InactivityMonitor) it will be linked to the client's transport as a TransportListener
-        // and not GC'd until the client's transport is disposed.
-        Transport transport = answer;
-        try {
-            // Preserve the transportOptions for future use by making a copy before applying (they are removed when applied).
-            HashMap options = new HashMap(transportOptions);
-            transport = transportFactory.serverConfigure(answer, null, options);
-        } catch (Exception e) {
-            IOExceptionSupport.create(e);
-        }
-
-        // Wait for the transport to be connected or disposed.
-        listener.onAccept(transport);
-        while (!transport.isConnected() && !transport.isDisposed()) {
-            try {
-                Thread.sleep(100);
-            } catch (InterruptedException ignore) {
-            }
-        }
-
-        // Ensure that the transport was not prematurely disposed.
-        if (transport.isDisposed()) {
-            response.sendError(HttpServletResponse.SC_BAD_REQUEST, "The session for clientID '" + clientID + "' was prematurely disposed");
-            LOG.warn("The session for clientID '" + clientID + "' was prematurely disposed");
-            return null;
-        }
-
-        return answer;
-    }
-
-    protected BlockingQueueTransport createTransportChannel() {
-       return new BlockingQueueTransport(new LinkedBlockingQueue<Object>());
-    }
-
-    protected TextWireFormat createWireFormat() {
-        return new XStreamWireFormat();
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/package.html b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/package.html
deleted file mode 100755
index a751a05..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	A transport using the HTTP protocol to allow ActiveMQ to tunnel through firewalls.
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsClientTransport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsClientTransport.java
deleted file mode 100755
index 7c19e70..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsClientTransport.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
-*
-* 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.transport.https;
-
-import java.net.URI;
-
-import org.apache.activemq.transport.http.HttpClientTransport;
-import org.apache.activemq.transport.util.TextWireFormat;
-
-/**
- * @author john.silva
- */
-
-public class HttpsClientTransport extends HttpClientTransport {
-  
-  public HttpsClientTransport(TextWireFormat wireFormat, URI remoteUrl) {
-    super(wireFormat, remoteUrl);
-  }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java
deleted file mode 100755
index 8af590e..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.transport.https;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URI;
-
-import javax.net.ssl.HttpsURLConnection;
-
-import org.apache.activemq.transport.http.HttpTransport;
-import org.apache.activemq.transport.util.TextWireFormat;
-
-/**
- * @deprecated
- * @see HttpsClientTransport
- */
-@Deprecated
-public class HttpsTransport extends HttpTransport {
-
-    public HttpsTransport(TextWireFormat wireFormat, URI remoteUrl) throws MalformedURLException {
-        super(wireFormat, remoteUrl);
-    }
-
-    protected synchronized HttpURLConnection createSendConnection() throws IOException {
-        HttpsURLConnection conn = (HttpsURLConnection) getRemoteURL().openConnection();
-        conn.setDoOutput(true);
-        conn.setRequestMethod("POST");
-        configureConnection(conn);
-        conn.connect();
-        return conn;
-    }
-
-    protected synchronized HttpURLConnection createReceiveConnection() throws IOException {
-        HttpsURLConnection conn = (HttpsURLConnection) getRemoteURL().openConnection();
-        conn.setDoOutput(false);
-        conn.setDoInput(true);
-        conn.setRequestMethod("GET");
-        configureConnection(conn);
-        conn.connect();
-        return conn;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java
deleted file mode 100644
index fa42a5c..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.transport.https;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.HashMap;
-
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.http.HttpTransportFactory;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.URISupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Factory of HTTPS based transports
- * 
- * 
- */
-public class HttpsTransportFactory extends HttpTransportFactory {
-    
-    public TransportServer doBind(String brokerId, URI location) throws IOException {
-        return doBind(location);
-    }
-    
-    public TransportServer doBind(URI location) throws IOException {
-        try {
-            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
-            HttpsTransportServer result = new HttpsTransportServer(location, this);
-            Map<String, Object> transportOptions = IntrospectionSupport.extractProperties(options, "transport.");
-            result.setTransportOption(transportOptions);
-            return result;
-        } catch (URISyntaxException e) {
-            throw IOExceptionSupport.create(e);
-        }
-        
-    }
-
-    protected Transport createTransport(URI location, WireFormat wf) throws MalformedURLException {
-        return new HttpsClientTransport(asTextWireFormat(wf), location);
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
deleted file mode 100755
index 644838d..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * 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.transport.https;
-
-import java.net.URI;
-
-import org.apache.activemq.transport.http.HttpTransportServer;
-import org.eclipse.jetty.server.ssl.SslSocketConnector;
-
-public class HttpsTransportServer extends HttpTransportServer {
-
-    private String keyPassword = System.getProperty("javax.net.ssl.keyPassword");
-    private String keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword");
-    private String keyStore = System.getProperty("javax.net.ssl.keyStore");
-    private String keyStoreType;
-    private String secureRandomCertficateAlgorithm;
-    private String trustCertificateAlgorithm;
-    private String keyCertificateAlgorithm;
-    private String protocol;
-
-    public HttpsTransportServer(URI uri, HttpsTransportFactory factory) {
-        super(uri, factory);
-    }
-
-    public void doStart() throws Exception {
-        SslSocketConnector sslConnector = new SslSocketConnector();
-        sslConnector.setKeystore(keyStore);
-        sslConnector.setPassword(keyStorePassword);
-        // if the keyPassword hasn't been set, default it to the
-        // key store password
-        if (keyPassword == null) {
-            sslConnector.setKeyPassword(keyStorePassword);
-        }
-        if (keyStoreType != null) {
-            sslConnector.setKeystoreType(keyStoreType);
-        }
-        if (secureRandomCertficateAlgorithm != null) {
-            sslConnector.setSecureRandomAlgorithm(secureRandomCertficateAlgorithm);
-        }
-        if (keyCertificateAlgorithm != null) {
-            sslConnector.setSslKeyManagerFactoryAlgorithm(keyCertificateAlgorithm);
-        }
-        if (trustCertificateAlgorithm != null) {
-            sslConnector.setSslTrustManagerFactoryAlgorithm(trustCertificateAlgorithm);
-        }
-        if (protocol != null) {
-            sslConnector.setProtocol(protocol);
-        }
-
-        setConnector(sslConnector);
-
-        super.doStart();
-    }
-
-    // Properties
-    // --------------------------------------------------------------------------------
-
-    public String getKeyStore() {
-        return keyStore;
-    }
-
-    public void setKeyStore(String keyStore) {
-        this.keyStore = keyStore;
-    }
-
-    public String getKeyPassword() {
-        return keyPassword;
-    }
-
-    public void setKeyPassword(String keyPassword) {
-        this.keyPassword = keyPassword;
-    }
-
-    public String getKeyStoreType() {
-        return keyStoreType;
-    }
-
-    public void setKeyStoreType(String keyStoreType) {
-        this.keyStoreType = keyStoreType;
-    }
-
-    public String getKeyStorePassword() {
-        return keyStorePassword;
-    }
-
-    public void setKeyStorePassword(String keyStorePassword) {
-        this.keyStorePassword = keyStorePassword;
-    }
-
-    public String getProtocol() {
-        return protocol;
-    }
-
-    public void setProtocol(String protocol) {
-        this.protocol = protocol;
-    }
-
-    public String getSecureRandomCertficateAlgorithm() {
-        return secureRandomCertficateAlgorithm;
-    }
-
-    public void setSecureRandomCertficateAlgorithm(String secureRandomCertficateAlgorithm) {
-        this.secureRandomCertficateAlgorithm = secureRandomCertficateAlgorithm;
-    }
-
-    public String getKeyCertificateAlgorithm() {
-        return keyCertificateAlgorithm;
-    }
-
-    public void setKeyCertificateAlgorithm(String keyCertificateAlgorithm) {
-        this.keyCertificateAlgorithm = keyCertificateAlgorithm;
-    }
-
-    public String getTrustCertificateAlgorithm() {
-        return trustCertificateAlgorithm;
-    }
-
-    public void setTrustCertificateAlgorithm(String trustCertificateAlgorithm) {
-        this.trustCertificateAlgorithm = trustCertificateAlgorithm;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/package.html b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/package.html
deleted file mode 100755
index 9e68ba0..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-A transport using the HTTPS protocol (built on top of the HTTP transport) to allow ActiveMQ to tunnel through firewalls using SSL.
-
-</body>
-</html>
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/util/TextWireFormat.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/util/TextWireFormat.java
deleted file mode 100644
index f4fede8..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/util/TextWireFormat.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.transport.util;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Reader;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * Adds the extra methods available to text based wire format implementations
- * 
- * 
- */
-public abstract class TextWireFormat implements WireFormat {
-
-    public abstract Object unmarshalText(String text);
-
-    public abstract Object unmarshalText(Reader reader);
-
-    public abstract String marshalText(Object command);
-
-    public void marshal(Object command, DataOutput out) throws IOException {
-        String text = marshalText(command);
-        byte[] utf8 = text.getBytes("UTF-8");
-        out.writeInt(utf8.length);
-        out.write(utf8);
-    }
-
-    public Object unmarshal(DataInput in) throws IOException {
-        int length = in.readInt();
-        byte[] utf8 = new byte[length];
-        in.readFully(utf8);
-        String text = new String(utf8, "UTF-8");
-        return unmarshalText(text);
-    }
-
-    public ByteSequence marshal(Object command) throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream dos = new DataOutputStream(baos);
-        marshal(command, dos);
-        dos.close();
-        return baos.toByteSequence();
-    }
-
-    public Object unmarshal(ByteSequence packet) throws IOException {
-        ByteArrayInputStream stream = new ByteArrayInputStream(packet);
-        DataInputStream dis = new DataInputStream(stream);
-        return unmarshal(dis);
-    }
-
-    public boolean inReceive() {
-        // TODO Implement for inactivity monitor
-        return false;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/StompServlet.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/StompServlet.java
deleted file mode 100644
index 267803c..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/StompServlet.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.transport.ws;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.eclipse.jetty.websocket.WebSocket;
-import org.eclipse.jetty.websocket.WebSocketServlet;
-
-/**
- * 
- * Handle connection upgrade requests and creates web sockets
- *
- */
-public class StompServlet extends WebSocketServlet {
-
-    private static final long serialVersionUID = -4716657876092884139L;
-    
-    private TransportAcceptListener listener;
-    
-    public void init() throws ServletException {
-        super.init();
-        listener = (TransportAcceptListener)getServletContext().getAttribute("acceptListener");
-        if (listener == null) {
-            throw new ServletException("No such attribute 'acceptListener' available in the ServletContext");
-        }
-    }
-
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) 
-        throws ServletException ,IOException  {
-        getServletContext().getNamedDispatcher("default").forward(request,response);
-    }
-    
-    protected WebSocket doWebSocketConnect(HttpServletRequest request, String protocol) {
-        StompSocket socket = new StompSocket();
-        listener.onAccept(socket);
-        return socket;
-    }
-    
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/StompSocket.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/StompSocket.java
deleted file mode 100644
index 430c11c..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/StompSocket.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * 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.transport.ws;
-
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.transport.TransportSupport;
-import org.apache.activemq.transport.stomp.LegacyFrameTranslator;
-import org.apache.activemq.transport.stomp.ProtocolConverter;
-import org.apache.activemq.transport.stomp.StompFrame;
-import org.apache.activemq.transport.stomp.StompTransport;
-import org.apache.activemq.transport.stomp.StompWireFormat;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.eclipse.jetty.websocket.WebSocket;
-
-/**
- * 
- * Implements web socket and mediates between servlet and the broker
- *
- */
-class StompSocket extends TransportSupport implements WebSocket, StompTransport {
-    Outbound outbound;
-    ProtocolConverter protocolConverter = new ProtocolConverter(this, new LegacyFrameTranslator(), null);
-    StompWireFormat wireFormat = new StompWireFormat();
-
-    public void onConnect(Outbound outbound) {
-        this.outbound=outbound;
-    }
-    
-    public void onMessage(byte frame, byte[] data,int offset, int length) {}
-
-    public void onMessage(byte frame, String data) {
-        try {
-            protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))));
-        } catch (Exception e) {
-            onException(IOExceptionSupport.create(e));
-        }
-    }
-
-    public void onDisconnect() {
-    }
-
-    protected void doStart() throws Exception {
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-    }
-
-    public int getReceiveCounter() {
-        return 0;
-    }
-
-    public String getRemoteAddress() {
-        return "StompSocket_" + this.hashCode();
-    }
-
-    public void oneway(Object command) throws IOException {
-        try {
-            protocolConverter.onActiveMQCommand((Command)command);
-        } catch (Exception e) {
-            onException(IOExceptionSupport.create(e));
-        }
-    }
-
-    public X509Certificate[] getPeerCertificates() {
-        return null;
-    }
-
-    public void sendToActiveMQ(Command command) {
-        doConsume(command);
-    }
-
-    public void sendToStomp(StompFrame command) throws IOException {
-        outbound.sendMessage(WebSocket.SENTINEL_FRAME, command.toString());
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/WSTransportFactory.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/WSTransportFactory.java
deleted file mode 100644
index 906fbd6..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/WSTransportFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.transport.ws;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-
-/**
- * 
- * Factory for WebSocket (ws) transport
- *
- */
-public class WSTransportFactory extends TransportFactory {
-
-    public TransportServer doBind(URI location) throws IOException {
-        return new WSTransportServer(location);
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java
deleted file mode 100644
index dfd78ca..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.transport.ws;
-
-import java.net.InetSocketAddress;
-import java.net.URI;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.transport.TransportServerSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.bio.SocketConnector;
-import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.session.SessionHandler;
-import org.eclipse.jetty.servlet.ServletHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.servlet.ServletMapping;
-
-/**
- * Creates a web server and registers web socket server
- *
- */
-public class WSTransportServer extends TransportServerSupport {
-    
-    private URI bindAddress;
-    private Server server;
-    private Connector connector;
-    
-    public WSTransportServer(URI location) {
-        super(location);
-        this.bindAddress = location;
-    }
-
-    protected void doStart() throws Exception {
-        server = new Server();
-        if (connector == null) {
-            connector = new SocketConnector();
-        }
-        connector.setHost(bindAddress.getHost());
-        connector.setPort(bindAddress.getPort());
-        server.setConnectors(new Connector[] {
-                connector
-        });
-        
-        ContextHandler contextHandler = new ContextHandler();
-        contextHandler.setContextPath("/");
-        contextHandler.setServer(server);
-        server.setHandler(contextHandler);
-
-        SessionHandler sessionHandler = new SessionHandler();
-        contextHandler.setHandler(sessionHandler);
-
-        ServletHandler servletHandler = new ServletHandler();
-        sessionHandler.setHandler(servletHandler);
-        
-        ServletHolder holder = new ServletHolder();
-        holder.setName("WSStomp");
-        holder.setClassName(StompServlet.class.getName());
-        servletHandler.setServlets(new ServletHolder[] {
-            holder
-        });
-
-        ServletMapping mapping = new ServletMapping();
-        mapping.setServletName("WSStomp");
-        mapping.setPathSpec("/*");
-        servletHandler.setServletMappings(new ServletMapping[] {
-            mapping
-        });
-
-        contextHandler.setAttribute("acceptListener", getAcceptListener());
-        
-        server.start();
-    }
-
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        Server temp = server;
-        server = null;
-        if (temp != null) {
-            temp.stop();
-        }
-    }
-
-    public InetSocketAddress getSocketAddress() {
-        return null;
-    }
-
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
deleted file mode 100755
index 9bd50e2..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.transport.xstream;
-
-import java.io.Reader;
-
-import com.thoughtworks.xstream.XStream;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.transport.util.TextWireFormat;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * A {@link WireFormat} implementation which uses the <a
- * href="http://xstream.codehaus.org/>XStream</a> library to marshall commands
- * onto the wire
- * 
- * 
- */
-public class XStreamWireFormat extends TextWireFormat {
-    private XStream xStream;
-    private int version;
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-
-    public WireFormat copy() {
-        return new XStreamWireFormat();
-    }
-
-    public Object unmarshalText(String text) {
-        return (Command)getXStream().fromXML(text);
-    }
-
-    public Object unmarshalText(Reader reader) {
-        return (Command)getXStream().fromXML(reader);
-    }
-
-    public String marshalText(Object command) {
-        return getXStream().toXML(command);
-    }
-
-    /**
-     * Can this wireformat process packets of this version
-     * 
-     * @param version the version number to test
-     * @return true if can accept the version
-     */
-    public boolean canProcessWireFormatVersion(int version) {
-        return true;
-    }
-
-    /**
-     * @return the current version of this wire format
-     */
-    public int getCurrentWireFormatVersion() {
-        return 1;
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public XStream getXStream() {
-        if (xStream == null) {
-            xStream = createXStream();
-        }
-        return xStream;
-    }
-
-    public void setXStream(XStream xStream) {
-        this.xStream = xStream;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected XStream createXStream() {
-        return new XStream();
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormatFactory.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormatFactory.java
deleted file mode 100644
index ebc50ed..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormatFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.transport.xstream;
-
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.wireformat.WireFormatFactory;
-
-/**
- * 
- * 
- */
-public class XStreamWireFormatFactory implements WireFormatFactory {
-
-    public WireFormat createWireFormat() {
-        return new XStreamWireFormat();
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppender.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppender.java
deleted file mode 100644
index 1996662..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppender.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.util;
-
-import java.net.URISyntaxException;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnection;
-
-/**
- * A JMS 1.1 log4j appender which uses ActiveMQ by default and does not require
- * any JNDI configurations
- * 
- * 
- */
-public class JmsLogAppender extends JmsLogAppenderSupport {
-    private String uri = "tcp://localhost:61616";
-    private String userName;
-    private String password;
-
-    public JmsLogAppender() {
-    }
-
-    public String getUri() {
-        return uri;
-    }
-
-    public void setUri(String uri) {
-        this.uri = uri;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    protected Connection createConnection() throws JMSException {
-        if (userName != null) {
-            try {
-                return ActiveMQConnection.makeConnection(userName, password, uri);
-            } catch (URISyntaxException e) {
-                throw new JMSException("Unable to connect to a broker using " + "userName: \'" + userName + "\' password \'" + password + "\' uri \'" + uri + "\' :: error - " + e.getMessage());
-            }
-        } else {
-            try {
-                return ActiveMQConnection.makeConnection(uri);
-            } catch (URISyntaxException e) {
-                throw new JMSException("Unable to connect to a broker using " + "uri \'" + uri + "\' :: error - " + e.getMessage());
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppenderSupport.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppenderSupport.java
deleted file mode 100644
index 894a60f..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppenderSupport.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * 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.util;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-import org.apache.log4j.AppenderSkeleton;
-import org.apache.log4j.spi.LoggingEvent;
-
-/**
- * An abstract base class for implementation inheritence for a log4j JMS
- * appender
- * 
- * 
- */
-public abstract class JmsLogAppenderSupport extends AppenderSkeleton {
-
-    public static final int JMS_PUBLISH_ERROR_CODE = 61616;
-
-    private Connection connection;
-    private Session session;
-    private MessageProducer producer;
-    private boolean allowTextMessages = true;
-    private String subjectPrefix = "log4j.";
-
-    public JmsLogAppenderSupport() {
-    }
-
-    public Connection getConnection() throws JMSException, NamingException {
-        if (connection == null) {
-            connection = createConnection();
-        }
-        return connection;
-    }
-
-    public void setConnection(Connection connection) {
-        this.connection = connection;
-    }
-
-    public Session getSession() throws JMSException, NamingException {
-        if (session == null) {
-            session = createSession();
-        }
-        return session;
-    }
-
-    public void setSession(Session session) {
-        this.session = session;
-    }
-
-    public MessageProducer getProducer() throws JMSException, NamingException {
-        if (producer == null) {
-            producer = createProducer();
-        }
-        return producer;
-    }
-
-    public void setProducer(MessageProducer producer) {
-        this.producer = producer;
-    }
-
-    public void close() {
-        List<JMSException> errors = new ArrayList<JMSException>();
-        if (producer != null) {
-            try {
-                producer.close();
-            } catch (JMSException e) {
-                errors.add(e);
-            }
-        }
-        if (session != null) {
-            try {
-                session.close();
-            } catch (JMSException e) {
-                errors.add(e);
-            }
-        }
-        if (connection != null) {
-            try {
-                connection.close();
-            } catch (JMSException e) {
-                errors.add(e);
-            }
-        }
-        for (Iterator<JMSException> iter = errors.iterator(); iter.hasNext();) {
-            JMSException e = iter.next();
-            getErrorHandler().error("Error closing JMS resources: " + e, e, JMS_PUBLISH_ERROR_CODE);
-        }
-    }
-
-    public boolean requiresLayout() {
-        return false;
-    }
-
-    public void activateOptions() {
-        try {
-            // lets ensure we're all created
-            getProducer();
-        } catch (Exception e) {
-            getErrorHandler().error("Could not create JMS resources: " + e, e, JMS_PUBLISH_ERROR_CODE);
-        }
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected abstract Connection createConnection() throws JMSException, NamingException;
-
-    protected Session createSession() throws JMSException, NamingException {
-        return getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    protected MessageProducer createProducer() throws JMSException, NamingException {
-        return getSession().createProducer(null);
-    }
-
-    protected void append(LoggingEvent event) {
-        try {
-            Message message = createMessage(event);
-            Destination destination = getDestination(event);
-            getProducer().send(destination, message);
-        } catch (Exception e) {
-            getErrorHandler().error("Could not send message due to: " + e, e, JMS_PUBLISH_ERROR_CODE, event);
-        }
-    }
-
-    protected Message createMessage(LoggingEvent event) throws JMSException, NamingException {
-        Message answer = null;
-        Object value = event.getMessage();
-        if (allowTextMessages && value instanceof String) {
-            answer = getSession().createTextMessage((String)value);
-        } else {
-            answer = getSession().createObjectMessage((Serializable)value);
-        }
-        answer.setStringProperty("level", event.getLevel().toString());
-        answer.setIntProperty("levelInt", event.getLevel().toInt());
-        answer.setStringProperty("threadName", event.getThreadName());
-        return answer;
-    }
-
-    protected Destination getDestination(LoggingEvent event) throws JMSException, NamingException {
-        String name = subjectPrefix + event.getLoggerName();
-        return getSession().createTopic(name);
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JndiJmsLogAppender.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JndiJmsLogAppender.java
deleted file mode 100644
index 0947974..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JndiJmsLogAppender.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * 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.util;
-
-import java.util.Hashtable;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.apache.log4j.helpers.LogLog;
-
-/**
- * A JMS 1.1 log4j appender which uses JNDI to locate a JMS ConnectionFactory to
- * use for logging events.
- * 
- * 
- */
-public class JndiJmsLogAppender extends JmsLogAppenderSupport {
-
-    private String jndiName;
-    private String userName;
-    private String password;
-
-    private String initialContextFactoryName;
-    private String providerURL;
-    private String urlPkgPrefixes;
-    private String securityPrincipalName;
-    private String securityCredentials;
-
-    public JndiJmsLogAppender() {
-    }
-
-    public String getJndiName() {
-        return jndiName;
-    }
-
-    public void setJndiName(String jndiName) {
-        this.jndiName = jndiName;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    // to customize the JNDI context
-    // -------------------------------------------------------------------------
-    public String getInitialContextFactoryName() {
-        return initialContextFactoryName;
-    }
-
-    public void setInitialContextFactoryName(String initialContextFactoryName) {
-        this.initialContextFactoryName = initialContextFactoryName;
-    }
-
-    public String getProviderURL() {
-        return providerURL;
-    }
-
-    public void setProviderURL(String providerURL) {
-        this.providerURL = providerURL;
-    }
-
-    public String getUrlPkgPrefixes() {
-        return urlPkgPrefixes;
-    }
-
-    public void setUrlPkgPrefixes(String urlPkgPrefixes) {
-        this.urlPkgPrefixes = urlPkgPrefixes;
-    }
-
-    public String getSecurityPrincipalName() {
-        return securityPrincipalName;
-    }
-
-    public void setSecurityPrincipalName(String securityPrincipalName) {
-        this.securityPrincipalName = securityPrincipalName;
-    }
-
-    public String getSecurityCredentials() {
-        return securityCredentials;
-    }
-
-    public void setSecurityCredentials(String securityCredentials) {
-        this.securityCredentials = securityCredentials;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected Connection createConnection() throws JMSException, NamingException {
-        InitialContext context = createInitialContext();
-        LogLog.debug("Looking up ConnectionFactory with jndiName: " + jndiName);
-        ConnectionFactory factory = (ConnectionFactory)context.lookup(jndiName);
-        if (factory == null) {
-            throw new JMSException("No such ConnectionFactory for name: " + jndiName);
-        }
-        if (userName != null) {
-            return factory.createConnection(userName, password);
-        } else {
-            return factory.createConnection();
-        }
-    }
-
-    protected InitialContext createInitialContext() throws NamingException {
-        if (initialContextFactoryName == null) {
-            return new InitialContext();
-        } else {
-            Hashtable<String, String> env = new Hashtable<String, String>();
-            env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactoryName);
-            if (providerURL != null) {
-                env.put(Context.PROVIDER_URL, providerURL);
-            } else {
-                LogLog.warn("You have set InitialContextFactoryName option but not the " + "ProviderURL. This is likely to cause problems.");
-            }
-            if (urlPkgPrefixes != null) {
-                env.put(Context.URL_PKG_PREFIXES, urlPkgPrefixes);
-            }
-
-            if (securityPrincipalName != null) {
-                env.put(Context.SECURITY_PRINCIPAL, securityPrincipalName);
-                if (securityCredentials != null) {
-                    env.put(Context.SECURITY_CREDENTIALS, securityCredentials);
-                } else {
-                    LogLog.warn("You have set SecurityPrincipalName option but not the " + "SecurityCredentials. This is likely to cause problems.");
-                }
-            }
-            LogLog.debug("Looking up JNDI context with environment: " + env);
-            return new InitialContext(env);
-        }
-    }
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/AbstractXMLMessageTransformer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/AbstractXMLMessageTransformer.java
deleted file mode 100644
index f12331a..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/AbstractXMLMessageTransformer.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 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.util.oxm;
-
-import java.io.Serializable;
-
-import javax.jms.JMSException;
-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.activemq.MessageTransformerSupport;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
-
-/**
- * Abstract class used as a base for implementing transformers from object to text messages (in XML/JSON format)
- * and vice versa using.
- * Supports plugging of custom marshallers
- */
-public abstract class AbstractXMLMessageTransformer extends
-		MessageTransformerSupport {
-
-    protected MessageTransform transformType;
-
-    /**
-     * Defines the type of transformation. If XML (default), - producer
-     * transformation transforms from Object to XML. - consumer transformation
-     * transforms from XML to Object. If OBJECT, - producer transformation
-     * transforms from XML to Object. - consumer transformation transforms from
-     * Object to XML. If ADAPTIVE, - producer transformation transforms from
-     * Object to XML, or XML to Object depending on the type of the original
-     * message - consumer transformation transforms from XML to Object, or
-     * Object to XML depending on the type of the original message
-     */
-    public enum MessageTransform {
-        XML, OBJECT, ADAPTIVE
-    };
-
-
-    public AbstractXMLMessageTransformer() {
-        this(MessageTransform.XML);
-    }
-
-    public AbstractXMLMessageTransformer(MessageTransform transformType) {
-        this.transformType = transformType;
-    }
-
-    public Message consumerTransform(Session session, MessageConsumer consumer, Message message) throws JMSException {
-        switch (transformType) {
-        case XML:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : message;
-        case OBJECT:
-            return (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        case ADAPTIVE:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        default:
-        }
-        return message;
-    }
-
-    public Message producerTransform(Session session, MessageProducer producer, Message message) throws JMSException {
-        switch (transformType) {
-        case XML:
-            return (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        case OBJECT:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : message;
-        case ADAPTIVE:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        default:
-        }
-        return message;
-    }
-
-    public MessageTransform getTransformType() {
-        return transformType;
-    }
-
-    public void setTransformType(MessageTransform transformType) {
-        this.transformType = transformType;
-    }
-
-    /**
-     * Transforms an incoming XML encoded {@link TextMessage} to an
-     * {@link ObjectMessage}
-     * 
-     * @param session - JMS session currently being used
-     * @param textMessage - text message to transform to object message
-     * @return ObjectMessage
-     * @throws JMSException
-     */
-    protected ObjectMessage textToObject(Session session, TextMessage textMessage) throws JMSException {
-        Object object = unmarshall(session, textMessage);
-        if (object instanceof Serializable) {
-            ObjectMessage answer = session.createObjectMessage((Serializable)object);
-            copyProperties(textMessage, answer);
-            return answer;
-        } else {
-            throw new JMSException("Object is not serializable: " + object);
-        }
-    }
-
-    /**
-     * Transforms an incoming {@link ObjectMessage} to an XML encoded
-     * {@link TextMessage}
-     * 
-     * @param session - JMS session currently being used
-     * @param objectMessage - object message to transform to text message
-     * @return XML encoded TextMessage
-     * @throws JMSException
-     */
-    protected TextMessage objectToText(Session session, ObjectMessage objectMessage) throws JMSException {
-        TextMessage answer = session.createTextMessage(marshall(session, objectMessage));
-        copyProperties(objectMessage, answer);
-        return answer;
-    }
-
-    /**
-     * Marshalls the Object in the {@link ObjectMessage} to a string using XML
-     * encoding
-     */
-    protected abstract String marshall(Session session, ObjectMessage objectMessage) throws JMSException;
-
-    /**
-     * Unmarshalls the XML encoded message in the {@link TextMessage} to an
-     * Object
-     */
-    protected abstract Object unmarshall(Session session, TextMessage textMessage) throws JMSException;
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/OXMMessageTransformer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/OXMMessageTransformer.java
deleted file mode 100644
index e4c473a..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/OXMMessageTransformer.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.util.oxm;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.springframework.oxm.AbstractMarshaller;
-import org.springframework.oxm.Marshaller;
-import org.springframework.oxm.Unmarshaller;
-import org.springframework.xml.transform.StringResult;
-import org.springframework.xml.transform.StringSource;
-
-/**
- * Transforms object messages to text messages and vice versa using {@link Spring OXM}
- *
- */
-public class OXMMessageTransformer extends AbstractXMLMessageTransformer {
-
-	/**
-	 * OXM marshaller used to marshall/unmarshall messages
-	 */
-	private AbstractMarshaller marshaller;
-	
-	public AbstractMarshaller getMarshaller() {
-		return marshaller;
-	}
-
-	public void setMarshaller(AbstractMarshaller marshaller) {
-		this.marshaller = marshaller;
-	}
-
-    /**
-     * Marshalls the Object in the {@link ObjectMessage} to a string using XML
-     * encoding
-     */
-	protected String marshall(Session session, ObjectMessage objectMessage)
-			throws JMSException {
-		StringResult result = new StringResult();
-		try {
-			marshaller.marshal(objectMessage.getObject(), result);
-			return result.toString();
-		} catch (Exception e) {
-			throw new JMSException(e.getMessage());
-		}
-	} 
-	
-    /**
-     * Unmarshalls the XML encoded message in the {@link TextMessage} to an
-     * Object
-     */
-	protected Object unmarshall(Session session, TextMessage textMessage)
-			throws JMSException {
-		try {
-			return marshaller.unmarshal(new StringSource(textMessage.getText()));
-		} catch (Exception e) {
-			throw new JMSException(e.getMessage());
-		}
-	}
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/XStreamMessageTransformer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/XStreamMessageTransformer.java
deleted file mode 100644
index 488842c..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/oxm/XStreamMessageTransformer.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.util.oxm;
-
-import java.io.Serializable;
-import java.io.StringReader;
-import java.io.StringWriter;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
-import com.thoughtworks.xstream.io.xml.XppReader;
-
-/**
- * Transforms object messages to text messages and vice versa using
- * {@link XStream}
- * 
- */
-public class XStreamMessageTransformer extends AbstractXMLMessageTransformer {
-
-    private XStream xStream;
-    
-    /**
-     * Specialized driver to be used with stream readers and writers
-     */
-    private HierarchicalStreamDriver streamDriver;
-    
-    // Properties
-    // -------------------------------------------------------------------------
-    public XStream getXStream() {
-        if (xStream == null) {
-            xStream = createXStream();
-        }
-        return xStream;
-    }
-
-    public void setXStream(XStream xStream) {
-        this.xStream = xStream;
-    }
-
-    public HierarchicalStreamDriver getStreamDriver() {
-		return streamDriver;
-	}
-
-	public void setStreamDriver(HierarchicalStreamDriver streamDriver) {
-		this.streamDriver = streamDriver;
-	}
-	
-	// Implementation methods
-    // -------------------------------------------------------------------------
-    protected XStream createXStream() {
-        return new XStream();
-    }	
-	
-    /**
-     * Marshalls the Object in the {@link ObjectMessage} to a string using XML
-     * encoding
-     */
-    protected String marshall(Session session, ObjectMessage objectMessage) throws JMSException {
-        Serializable object = objectMessage.getObject();
-        StringWriter buffer = new StringWriter();
-        HierarchicalStreamWriter out;
-        if (streamDriver != null) {
-        	out = streamDriver.createWriter(buffer);
-        } else {
-        	out = new PrettyPrintWriter(buffer);
-        }
-        getXStream().marshal(object, out);
-        return buffer.toString();
-    }
-
-    /**
-     * Unmarshalls the XML encoded message in the {@link TextMessage} to an
-     * Object
-     */
-    protected Object unmarshall(Session session, TextMessage textMessage) throws JMSException {
-        HierarchicalStreamReader in;
-        if (streamDriver != null) {
-        	in = streamDriver.createReader(new StringReader(textMessage.getText()));
-        } else {
-        	in = new XppReader(new StringReader(textMessage.getText()));
-        }
-        return getXStream().unmarshal(in);
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/xstream/XStreamMessageTransformer.java b/trunk/activemq-optional/src/main/java/org/apache/activemq/util/xstream/XStreamMessageTransformer.java
deleted file mode 100644
index 7fa7446..0000000
--- a/trunk/activemq-optional/src/main/java/org/apache/activemq/util/xstream/XStreamMessageTransformer.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * 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.util.xstream;
-
-import java.io.Serializable;
-import java.io.StringReader;
-import java.io.StringWriter;
-
-import javax.jms.JMSException;
-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.activemq.MessageTransformerSupport;
-
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
-import com.thoughtworks.xstream.io.xml.XppReader;
-
-/**
- * Transforms object messages to text messages and vice versa using
- * {@link XStream}
- * 
- * @deprecated as of 5.3.0 release replaced by {@link org.apache.activemq.util.oxm.XStreamMessageTransformer}
- * 
- * 
- */
-@Deprecated
-public class XStreamMessageTransformer extends MessageTransformerSupport {
-
-    protected MessageTransform transformType;
-    private XStream xStream;
-    
-    /**
-     * Specialized driver to be used with stream readers and writers
-     */
-    private HierarchicalStreamDriver streamDriver;
-
-    /**
-     * Defines the type of transformation. If XML (default), - producer
-     * transformation transforms from Object to XML. - consumer transformation
-     * transforms from XML to Object. If OBJECT, - producer transformation
-     * transforms from XML to Object. - consumer transformation transforms from
-     * Object to XML. If ADAPTIVE, - producer transformation transforms from
-     * Object to XML, or XML to Object depending on the type of the original
-     * message - consumer transformation transforms from XML to Object, or
-     * Object to XML depending on the type of the original message
-     */
-    public enum MessageTransform {
-        XML, OBJECT, ADAPTIVE
-    };
-
-
-    public XStreamMessageTransformer() {
-        this(MessageTransform.XML);
-    }
-
-    public XStreamMessageTransformer(MessageTransform transformType) {
-        this.transformType = transformType;
-    }
-
-    public Message consumerTransform(Session session, MessageConsumer consumer, Message message) throws JMSException {
-        switch (transformType) {
-        case XML:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : message;
-        case OBJECT:
-            return (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        case ADAPTIVE:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        default:
-        }
-        return message;
-    }
-
-    public Message producerTransform(Session session, MessageProducer producer, Message message) throws JMSException {
-        switch (transformType) {
-        case XML:
-            return (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        case OBJECT:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : message;
-        case ADAPTIVE:
-            return (message instanceof TextMessage) ? textToObject(session, (TextMessage)message) : (message instanceof ObjectMessage) ? objectToText(session, (ObjectMessage)message) : message;
-        default:
-        }
-        return message;
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public XStream getXStream() {
-        if (xStream == null) {
-            xStream = createXStream();
-        }
-        return xStream;
-    }
-
-    public void setXStream(XStream xStream) {
-        this.xStream = xStream;
-    }
-
-    public HierarchicalStreamDriver getStreamDriver() {
-		return streamDriver;
-    }
-
-	public void setStreamDriver(HierarchicalStreamDriver streamDriver) {
-		this.streamDriver = streamDriver;
-    }
-
-	// Implementation methods
-    // -------------------------------------------------------------------------
-    protected XStream createXStream() {
-        return new XStream();
-    }
-
-    public MessageTransform getTransformType() {
-        return transformType;
-    }
-
-    public void setTransformType(MessageTransform transformType) {
-        this.transformType = transformType;
-    }
-
-    /**
-     * Transforms an incoming XML encoded {@link TextMessage} to an
-     * {@link ObjectMessage}
-     * 
-     * @param session - JMS session currently being used
-     * @param textMessage - text message to transform to object message
-     * @return ObjectMessage
-     * @throws JMSException
-     */
-    protected ObjectMessage textToObject(Session session, TextMessage textMessage) throws JMSException {
-        Object object = unmarshall(session, textMessage);
-        if (object instanceof Serializable) {
-            ObjectMessage answer = session.createObjectMessage((Serializable)object);
-            copyProperties(textMessage, answer);
-            return answer;
-        } else {
-            throw new JMSException("Object is not serializable: " + object);
-        }
-    }
-
-    /**
-     * Transforms an incoming {@link ObjectMessage} to an XML encoded
-     * {@link TextMessage}
-     * 
-     * @param session - JMS session currently being used
-     * @param objectMessage - object message to transform to text message
-     * @return XML encoded TextMessage
-     * @throws JMSException
-     */
-    protected TextMessage objectToText(Session session, ObjectMessage objectMessage) throws JMSException {
-        TextMessage answer = session.createTextMessage(marshall(session, objectMessage));
-        copyProperties(objectMessage, answer);
-        return answer;
-    }
-
-    /**
-     * Marshalls the Object in the {@link ObjectMessage} to a string using XML
-     * encoding
-     */
-    protected String marshall(Session session, ObjectMessage objectMessage) throws JMSException {
-        Serializable object = objectMessage.getObject();
-        StringWriter buffer = new StringWriter();
-        HierarchicalStreamWriter out;
-        if (streamDriver != null) {
-        	out = streamDriver.createWriter(buffer);
-        } else {
-        	out = new PrettyPrintWriter(buffer);
-        }
-        getXStream().marshal(object, out);
-        return buffer.toString();
-    }
-
-    /**
-     * Unmarshalls the XML encoded message in the {@link TextMessage} to an
-     * Object
-     */
-    protected Object unmarshall(Session session, TextMessage textMessage) throws JMSException {
-        HierarchicalStreamReader in;
-        if (streamDriver != null) {
-        	in = streamDriver.createReader(new StringReader(textMessage.getText()));
-        } else {
-        	in = new XppReader(new StringReader(textMessage.getText()));
-        }
-        return getXStream().unmarshal(in);
-    }
-
-}
diff --git a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/http b/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/http
deleted file mode 100644
index 6c6ff93..0000000
--- a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/discoveryagent/http
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.discovery.http.HTTPDiscoveryAgentFactory
diff --git a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/http b/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/http
deleted file mode 100644
index a36a3c9..0000000
--- a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/http
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.http.HttpTransportFactory
diff --git a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/https b/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/https
deleted file mode 100644
index b7ca038..0000000
--- a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/https
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.https.HttpsTransportFactory
diff --git a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/ws b/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/ws
deleted file mode 100644
index 3783dfc..0000000
--- a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/transport/ws
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.ws.WSTransportFactory
\ No newline at end of file
diff --git a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/wireformat/xstream b/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/wireformat/xstream
deleted file mode 100644
index d5e2d63..0000000
--- a/trunk/activemq-optional/src/main/resources/META-INF/services/org/apache/activemq/wireformat/xstream
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.xstream.XStreamWireFormatFactory
\ No newline at end of file
diff --git a/trunk/activemq-optional/src/main/resources/org/apache/activemq/store/amq/help.txt b/trunk/activemq-optional/src/main/resources/org/apache/activemq/store/amq/help.txt
deleted file mode 100644
index 7805642..0000000
--- a/trunk/activemq-optional/src/main/resources/org/apache/activemq/store/amq/help.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-Usage:
-  java org.apache.activemq.store.amq.AMQJournalTool [options]* (directory) *
-  
-Displays the records stored in the Journal log files used by ActiveMQ.  This
-tool supports loading the journal data files from multiple directories.  Normally
-it is run against the journal archive directory and the active journal directory.
-
-This tool supports controlling the output format using Velocity [1] templates.  
-It also supports filtering out records using a SQL like WHERE syntax implemented
-using JoSQL.
-  
-Options to control output format:
-  
-Any valid Velocity Template Language (VTL) expression can be used to control the 
-display of the record.  
-  
-  --message-format=VTL          The format used to display message records. Message
-      records get created every time a producer sends a persistent message to the broker.
-      The message gets recorded in the journal even if it's transaction is rolled back.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageId}|${record.properties}|${body}
-      
-  --topic-ack-format=VTL        The format used to display topic ack records.  A topic
-      ack records that a durable subscription for a topic has acknowleged a set of messages.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.clientId}|${record.subscritionName}|${record.messageId}
-      
-  --queue-ack-format=VTL        The format used to display queue ack records. A queue
-      ack records that a consumer for a quue has acknowleged a message.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.destination}|${record.messageAck.lastMessageId}
-      
-  --transaction-format=VTL      The format used to display transaction records. Transaction records
-      are used to record transaction related actions like commit and rollback.
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.transactionId}
-      
-  --trace-format=VTL            The format used to display trace records.
-      Trace records are informational messages stored in the journal that assist in Auditing.  
-      For example a trace message is recorded whenever the broker is restarted or when the 
-      long term store is checkpointed.  
-      Default VTL: ${location.dataFileId},${location.offset}|${type}|${record.message}
-  
-Options to control the selection of records displayed:  
-  --where=VALUE                 The where clause used to control the records selected
-      for display.  It can select on all the fields available in the velocity context.
-      example:  --where="type='ActiveMQTextMessage' and location.dataFileId > 2"
-      
-Other Options:
-  --help                        Show this help screen.
-
-Example:
-
-  java org.apache.activemq.store.amq.AMQJournalTool /path/to/archive /path/to/journal
-  
- 
\ No newline at end of file
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/bugs/AMQ2764Test.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/bugs/AMQ2764Test.java
deleted file mode 100644
index 64f9a66..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/bugs/AMQ2764Test.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/**
- * 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.bugs;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.*;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.advisory.ConsumerEvent;
-import org.apache.activemq.advisory.ConsumerEventSource;
-import org.apache.activemq.advisory.ConsumerListener;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.transport.http.WaitForJettyListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AMQ2764Test extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AMQ2764Test.class);
-
-    private BrokerService brokerOne;
-    private BrokerService brokerTwo;
-    private Destination destination;
-    private ArrayList<Connection> connections = new ArrayList<Connection>();
-
-    public void testInactivityMonitor() throws Exception {
-
-        startBrokerTwo();
-        brokerTwo.waitUntilStarted();
-
-        startBrokerOne();
-        brokerOne.waitUntilStarted();
-
-        Thread.sleep(2000);
-
-        ActiveMQConnectionFactory secondProducerConnectionFactory = createBrokerTwoHttpConnectionFactory();
-        ActiveMQConnectionFactory consumerConnectionFactory = createBrokerOneHttpConnectionFactory();
-
-        MessageConsumer consumer = createConsumer(consumerConnectionFactory);
-        AtomicInteger counter = createConsumerCounter(consumerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        Connection connection = secondProducerConnectionFactory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(destination);
-        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-
-        final int expectedMessagesReceived = 2000;
-
-        for (int i = 0; i < expectedMessagesReceived; i++) {
-            Message message = session.createMessage();
-            producer.send(message);            
-            LOG.info("sent message " + i);
-        }
-
-        for (int i = 0; i < expectedMessagesReceived; i++) {
-            Message message = consumer.receive(2000);
-            if (message == null) {
-                fail("Didn't receive a message");
-            }
-            LOG.info("received message " + i);
-        }
-
-
-    }
-
-    public void testBrokerRestart() throws Exception {
-
-        startBrokerTwo();
-        brokerTwo.waitUntilStarted();        
-
-        startBrokerOne();
-        brokerOne.waitUntilStarted();
-
-        Thread.sleep(5000);
-
-        ActiveMQConnectionFactory producerConnectionFactory = createBrokerOneConnectionFactory();
-        ActiveMQConnectionFactory secondProducerConnectionFactory = createBrokerTwoConnectionFactory();
-        ActiveMQConnectionFactory consumerConnectionFactory = createBrokerOneConnectionFactory();
-
-        MessageConsumer consumer = createConsumer(consumerConnectionFactory);
-        AtomicInteger counter = createConsumerCounter(consumerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        final int expectedMessagesReceived = 25;
-        int actualMessagesReceived = doSendMessage(expectedMessagesReceived, consumer, producerConnectionFactory);
-        assertEquals("Didn't receive the right amount of messages directly connected", expectedMessagesReceived, actualMessagesReceived);
-        assertNull( "Had extra messages", consumer.receiveNoWait());
-
-        actualMessagesReceived = doSendMessage(expectedMessagesReceived, consumer, secondProducerConnectionFactory);
-        assertEquals("Didn't receive the right amount of messages via network", expectedMessagesReceived, actualMessagesReceived);
-        assertNull( "Had extra messages", consumer.receiveNoWait());
-
-        LOG.info("Stopping broker one");
-        stopBrokerOne();
-
-        TimeUnit.SECONDS.sleep(1);
-        LOG.info("Restarting broker");
-        startBrokerOne();
-
-        consumer = createConsumer(consumerConnectionFactory);
-        counter = createConsumerCounter(consumerConnectionFactory);
-        waitForConsumerToArrive(counter);
-
-        actualMessagesReceived = doSendMessage(expectedMessagesReceived, consumer, secondProducerConnectionFactory);
-        assertEquals("Didn't receive the right amount of messages via network after restart", expectedMessagesReceived, actualMessagesReceived);
-        assertNull( "Had extra messages", consumer.receiveNoWait());
-
-        stopBrokerOne();
-        stopBrokerTwo();
-    }
-
-    protected int doSendMessage(int expectedMessagesReceived, MessageConsumer consumer, ActiveMQConnectionFactory connectionFactory) throws Exception {
-        int messagesReceived = 0;
-        for (int i=0; i<expectedMessagesReceived; i++) {
-            String messageId = sendMessage(connectionFactory);
-            Message message = consumer.receive(5000);
-            if ( message!=null ) {
-                messagesReceived++;
-            }
-        }
-        return messagesReceived;
-    }
-
-    protected String sendMessage(ActiveMQConnectionFactory connectionFactory) throws JMSException {
-        Connection connection = null;
-        try {
-            connection = connectionFactory.createConnection();
-            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(destination);
-            Message message = session.createMessage();
-            producer.send(message);
-            return message.getJMSMessageID();
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected BrokerService createFirstBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/bugs/amq2764/reconnect-broker1.xml"));
-    }
-
-    protected BrokerService createSecondBroker() throws Exception {
-        return BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/bugs/amq2764/reconnect-broker2.xml"));
-    }
-    
-    protected ActiveMQConnectionFactory createBrokerOneConnectionFactory() {
-        return new ActiveMQConnectionFactory("vm://broker1");
-    }
-
-    protected ActiveMQConnectionFactory createBrokerTwoConnectionFactory() {
-        return new ActiveMQConnectionFactory("vm://broker2");
-    }
-
-    protected ActiveMQConnectionFactory createBrokerOneHttpConnectionFactory() {
-        return new ActiveMQConnectionFactory("http://localhost:61616");
-    }
-
-    protected ActiveMQConnectionFactory createBrokerTwoHttpConnectionFactory() {
-        return new ActiveMQConnectionFactory("http://localhost:61617");
-    }
-
-    protected void setUp() throws Exception {
-
-        LOG.info("===============================================================================");
-        LOG.info("Running Test Case: " + getName());
-        LOG.info("===============================================================================");
-
-        destination = new ActiveMQQueue("RECONNECT.TEST.QUEUE");
-
-    }
-
-    protected void tearDown() throws Exception {
-        disposeConsumerConnections();
-        try {
-            stopBrokerOne();
-        } catch (Throwable e) {
-        }
-        try {
-            stopBrokerTwo();
-        } catch (Throwable e) {
-        }
-    }
-
-    protected void disposeConsumerConnections() {
-        for (Iterator<Connection> iter = connections.iterator(); iter.hasNext();) {
-            Connection connection = iter.next();
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected void startBrokerOne() throws Exception {
-        if (brokerOne == null) {
-            brokerOne = createFirstBroker();
-            brokerOne.start();
-            brokerOne.waitUntilStarted();
-            WaitForJettyListener.waitForJettySocketToAccept("http://localhost:61616");
-        }
-    }
-
-    protected void stopBrokerOne() throws Exception {
-        if (brokerOne != null) {
-            brokerOne.stop();
-            brokerOne = null;
-        }
-    }
-
-    protected void startBrokerTwo() throws Exception {
-        if (brokerTwo == null) {
-            brokerTwo = createSecondBroker();
-            brokerTwo.start();
-            brokerTwo.waitUntilStarted();
-            WaitForJettyListener.waitForJettySocketToAccept("http://localhost:61617");
-        }
-    }
-
-    protected void stopBrokerTwo() throws Exception {
-        if (brokerTwo != null) {
-            brokerTwo.stop();
-            brokerTwo = null;
-        }
-    }
-
-    protected MessageConsumer createConsumer(ActiveMQConnectionFactory consumerConnectionFactory) throws JMSException {
-        Connection connection = consumerConnectionFactory.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        return session.createConsumer(destination);
-    }
-
-    protected AtomicInteger createConsumerCounter(ActiveMQConnectionFactory cf) throws Exception {
-        final AtomicInteger rc = new AtomicInteger(0);
-        Connection connection = cf.createConnection();
-        connections.add(connection);
-        connection.start();
-
-        ConsumerEventSource source = new ConsumerEventSource(connection, destination);
-        source.setConsumerListener(new ConsumerListener() {
-            public void onConsumerEvent(ConsumerEvent event) {
-                rc.set(event.getConsumerCount());
-            }
-        });
-        source.start();
-
-        return rc;
-    }
-
-    protected void waitForConsumerToArrive(AtomicInteger consumerCounter) throws InterruptedException {
-        for (int i = 0; i < 100; i++) {
-            if (consumerCounter.get() > 0) {
-                return;
-            }
-            Thread.sleep(100);
-        }
-        fail("The consumer did not arrive.");
-    }
-
-    protected void waitForConsumerToLeave(AtomicInteger consumerCounter) throws InterruptedException {
-        for (int i = 0; i < 100; i++) {
-            if (consumerCounter.get() == 0) {
-                return;
-            }
-            Thread.sleep(100);
-        }
-        fail("The consumer did not leave.");
-    }
-
-}
-
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/store/amq/reader/AMQReaderTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/store/amq/reader/AMQReaderTest.java
deleted file mode 100644
index 3bb6491..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/store/amq/reader/AMQReaderTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.store.amq.reader;
-
-import java.io.File;
-import java.util.Set;
-
-import javax.jms.Message;
-import junit.framework.TestCase;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-
-public class AMQReaderTest extends TestCase {
-
-    public void testIterateArchive() throws Exception{
-        String resourceName = getClass().getPackage().getName() + File.separator + "data";
-        resourceName = resourceName.replace('.', File.separatorChar);
-        Resource resource = new ClassPathResource(resourceName);
-        AMQReader reader = new AMQReader(resource.getFile());
-        for (Message m:reader) {
-            assertNotNull(m);
-        }            
-    }
-    
-    public void xtestIterateFile() throws Exception{
-        String resourceName = getClass().getPackage().getName() + File.separator + "data";
-        resourceName = resourceName.replace('.', File.separatorChar);
-        Resource resource = new ClassPathResource(resourceName);
-        Set<File> files = AMQReader.listDataFiles(resource.getFile());
-        assertNotNull(files);
-        assertTrue(files.size() >0);
-        for (File file: files) {
-            System.err.println("READING " + file);
-            AMQReader reader = new AMQReader(file);
-            for (Message m:reader) {
-                assertNotNull(m);
-            } 
-        }         
-    }
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java
deleted file mode 100644
index a7a47d2..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpClientReconnectTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.transport.http;
-
-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.command.ActiveMQQueue;
-
-public class HttpClientReconnectTest extends TestCase {
-	
-	BrokerService broker;
-	ActiveMQConnectionFactory factory;
-
-	protected void setUp() throws Exception {
-        System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore");
-        System.setProperty("javax.net.ssl.trustStorePassword", "password");
-        System.setProperty("javax.net.ssl.trustStoreType", "jks");
-        System.setProperty("javax.net.ssl.keyStore", "src/test/resources/server.keystore");
-        System.setProperty("javax.net.ssl.keyStorePassword", "password");
-        System.setProperty("javax.net.ssl.keyStoreType", "jks");
-
-		broker = new BrokerService();
-		broker.addConnector("https://localhost:61666?trace=true");
-		broker.setPersistent(false);
-		broker.setUseJmx(false);
-		broker.deleteAllMessages();
-		broker.start();
-		factory = new ActiveMQConnectionFactory("https://localhost:61666?trace=true&soTimeout=1000");
-	}
-
-	protected void tearDown() throws Exception {
-		broker.stop();
-	}
-	
-	public void testReconnectClient() throws Exception {
-		for (int i = 0; i < 100; i++) {
-			sendAndReceiveMessage(i);
-		}
-	}
-	
-	private void sendAndReceiveMessage(int i) throws Exception {
-		Connection conn = factory.createConnection();
-		Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		conn.start();
-		Destination dest = new ActiveMQQueue("test");
-		MessageProducer producer = sess.createProducer(dest);
-		MessageConsumer consumer = sess.createConsumer(dest);
-		String messageText = "test " + i;
-		try {
-			producer.send(sess.createTextMessage(messageText));
-			TextMessage msg = (TextMessage)consumer.receive(1000);
-			assertEquals(messageText, msg.getText());
-		} finally {
-			producer.close();
-			consumer.close();
-			conn.close();
-			sess.close();
-		}
-	}
-	
-	
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJMSMessageTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJMSMessageTest.java
deleted file mode 100644
index fc80399..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJMSMessageTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.net.URISyntaxException;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.MapMessage;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import junit.framework.Test;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JMSMessageTest;
-import org.apache.activemq.broker.BrokerService;
-import org.junit.After;
-import org.junit.Before;
-
-public class HttpJMSMessageTest extends JMSMessageTest {
-
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public static Test suite() {
-        return suite(HttpJMSMessageTest.class);
-    }
-
-    @Override
-    protected ConnectionFactory createConnectionFactory() throws URISyntaxException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(getBrokerURL());
-        return factory;
-    }
-
-    protected String getBrokerURL() {
-        return "http://localhost:8161";
-    }
-
-    @Override
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.setUseJmx(false);
-        answer.setManagementContext(null);
-        answer.addConnector(getBrokerURL());
-        return answer;
-    }
-
-    public void testEmptyMapMessage() throws Exception {
-
-        // Receive a message with the JMS API
-        connection.start();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        destination = createDestination(session, destinationType);
-        MessageConsumer consumer = session.createConsumer(destination);
-        MessageProducer producer = session.createProducer(destination);
-
-        // send the message.
-        {
-            MapMessage message = session.createMapMessage();
-            producer.send(message);
-        }
-
-        // get the message.
-        {
-            MapMessage message = (MapMessage)consumer.receive(1000);
-            assertNotNull(message);
-            assertFalse(message.getMapNames().hasMoreElements());
-        }
-        assertNull(consumer.receiveNoWait());
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsDurableTopicSendReceiveTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsDurableTopicSendReceiveTest.java
deleted file mode 100644
index ec2d1ff..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsDurableTopicSendReceiveTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.transport.http;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.JmsDurableTopicSendReceiveTest;
-import org.apache.activemq.broker.BrokerService;
-
-public class HttpJmsDurableTopicSendReceiveTest extends JmsDurableTopicSendReceiveTest {
-    protected BrokerService broker;
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-            broker.start();
-        }
-        super.setUp();
-        WaitForJettyListener.waitForJettySocketToAccept(getBrokerURL());
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() {
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(getBrokerURL());
-        return connectionFactory;
-    }
-
-    protected String getBrokerURL() {
-        return "http://localhost:8161";
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.addConnector(getBrokerURL());
-        return answer;
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsSendAndReceiveTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsSendAndReceiveTest.java
deleted file mode 100755
index cd36fea..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsSendAndReceiveTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.transport.http;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-
-/**
- * 
- */
-public class HttpJmsSendAndReceiveTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-    protected BrokerService broker;
-
-    protected void setUp() throws Exception {
-        if (broker == null) {
-            broker = createBroker();
-            broker.start();
-        }
-        super.setUp();
-        WaitForJettyListener.waitForJettySocketToAccept(getBrokerURL());
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        if (broker != null) {
-            broker.stop();
-        }
-    }
-
-    protected ActiveMQConnectionFactory createConnectionFactory() {
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(getBrokerURL());
-        return connectionFactory;
-    }
-
-    protected String getBrokerURL() {
-        return "http://localhost:8161";
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(false);
-        answer.addConnector(getBrokerURL());
-        return answer;
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpPersistentSendAndReceiveTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpPersistentSendAndReceiveTest.java
deleted file mode 100644
index eda690c..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpPersistentSendAndReceiveTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.transport.http;
-
-import javax.jms.DeliveryMode;
-
-import org.apache.activemq.broker.BrokerService;
-
-public class HttpPersistentSendAndReceiveTest extends HttpJmsSendAndReceiveTest {
-    protected BrokerService broker;
-
-    protected void setUp() throws Exception {
-        this.topic = false;
-        this.deliveryMode = DeliveryMode.PERSISTENT;
-        super.setUp();
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService answer = new BrokerService();
-        answer.setPersistent(true);
-        answer.addConnector(getBrokerURL());
-        return answer;
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpSpringTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpSpringTest.java
deleted file mode 100644
index 0eba5d6..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpSpringTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.transport.http;
-
-import org.apache.activemq.spring.SpringTestSupport;
-
-public class HttpSpringTest extends SpringTestSupport {
-
-    public void testHttpTransportWithSpring() throws Exception {
-        String config = "spring-http.xml";
-        assertSenderConfig(config);
-    }
-	
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpTransportBrokerTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpTransportBrokerTest.java
deleted file mode 100755
index 6197f4b..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpTransportBrokerTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.net.URI;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.transport.TransportBrokerTestSupport;
-
-public class HttpTransportBrokerTest extends TransportBrokerTestSupport {
-
-    protected String getBindLocation() {
-        return "http://localhost:8081";
-    }
-
-    protected void setUp() throws Exception {
-        maxWait = 2000;
-        super.setUp();
-        WaitForJettyListener.waitForJettySocketToAccept(getBindLocation());
-    }
-
-    protected BrokerService createBroker() throws Exception {
-		BrokerService broker = BrokerFactory.createBroker(new URI("broker:()/localhost?persistent=false&useJmx=false"));
-		connector = broker.addConnector(getBindLocation());
-		return broker;
-	}
-
-	protected void tearDown() throws Exception {
-        super.tearDown();
-        // Give the jetty server enough time to shutdown before starting another one
-        Thread.sleep(100);
-    }
-
-    public static Test suite() {
-        return suite(HttpTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/WaitForJettyListener.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/WaitForJettyListener.java
deleted file mode 100644
index dfac627..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/WaitForJettyListener.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.transport.http;
-
-import java.net.Socket;
-import java.net.URL;
-
-import javax.net.SocketFactory;
-
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static junit.framework.Assert.assertTrue;
-
-public class WaitForJettyListener {
-    private static final Logger LOG = LoggerFactory.getLogger(WaitForJettyListener.class);
-    
-    public static void waitForJettySocketToAccept(String bindLocation) throws Exception {
-        final URL url = new URL(bindLocation);
-        assertTrue("Jetty endpoint is available", Wait.waitFor(new Wait.Condition() {
-
-            public boolean isSatisified() throws Exception {
-                boolean canConnect = false;
-                try {
-                    Socket socket = SocketFactory.getDefault().createSocket(url.getHost(), url.getPort());
-                    socket.close();
-                    canConnect = true;
-                } catch (Exception e) {
-                    LOG.warn("verify jetty available, failed to connect to " + url + e);
-                }
-                return canConnect;
-            }}, 60 * 1000));
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsJmsSendAndReceiveTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsJmsSendAndReceiveTest.java
deleted file mode 100644
index 045fbef..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsJmsSendAndReceiveTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.transport.https;
-
-import org.apache.activemq.transport.http.HttpJmsSendAndReceiveTest;
-
-/**
- * 
- */
-public class HttpsJmsSendAndReceiveTest extends HttpJmsSendAndReceiveTest {
-
-    protected void setUp() throws Exception {
-        System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore");
-        System.setProperty("javax.net.ssl.trustStorePassword", "password");
-        System.setProperty("javax.net.ssl.trustStoreType", "jks");
-        System.setProperty("javax.net.ssl.keyStore", "src/test/resources/server.keystore");
-        System.setProperty("javax.net.ssl.keyStorePassword", "password");
-        System.setProperty("javax.net.ssl.keyStoreType", "jks");
-        super.setUp();
-    }
-
-    protected String getBrokerURL() {
-        return "https://localhost:8161";
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsTransportBrokerTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsTransportBrokerTest.java
deleted file mode 100644
index 289d537..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsTransportBrokerTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.transport.https;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-import org.apache.activemq.transport.http.HttpTransportBrokerTest;
-
-public class HttpsTransportBrokerTest extends HttpTransportBrokerTest {
-
-    protected String getBindLocation() {
-        return "https://localhost:8161";
-    }
-
-    protected void setUp() throws Exception {
-        System.setProperty("javax.net.ssl.trustStore", "src/test/resources/client.keystore");
-        System.setProperty("javax.net.ssl.trustStorePassword", "password");
-        System.setProperty("javax.net.ssl.trustStoreType", "jks");
-        System.setProperty("javax.net.ssl.keyStore", "src/test/resources/server.keystore");
-        System.setProperty("javax.net.ssl.keyStorePassword", "password");
-        System.setProperty("javax.net.ssl.keyStoreType", "jks");
-        //System.setProperty("javax.net.debug", "ssl,handshake,data,trustmanager");
-        super.setUp();
-    }
-    
-    public static Test suite() {
-        return suite(HttpsTransportBrokerTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
deleted file mode 100644
index dac379d..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.transport.ws;
-
-import java.net.URI;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.junit.Test;
-
-
-public class WSTransportTest {
-    
-    protected String getBindLocation() {
-        return "ws://localhost:61614";
-    }
-
-    @Test
-    public void testBrokerStart() throws Exception {
-        BrokerService broker = BrokerFactory.createBroker(new URI("broker:()/localhost?persistent=false&useJmx=false"));
-        broker.addConnector(getBindLocation());
-        broker.start();
-        broker.waitUntilStarted();
-        Thread.sleep(2000);
-        //System.in.read();
-        broker.stop();
-        broker.waitUntilStopped();
-    }
-    
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
deleted file mode 100755
index daa1468..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.transport.xstream;
-
-import java.io.IOException;
-
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.MessageTest;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class XStreamWireFormatTest extends MessageTest {
-    private static final Logger LOG = LoggerFactory.getLogger(XStreamWireFormatTest.class);
-
-    public void assertBeanMarshalls(Object original) throws IOException {
-        super.assertBeanMarshalls(original);
-
-        String xml = getXStreamWireFormat().marshalText((Command) original);
-        LOG.info(original.getClass().getName() + " as XML is:");
-        LOG.info(xml);
-    }
-
-    protected XStreamWireFormat getXStreamWireFormat() {
-        return (XStreamWireFormat) wireFormat;
-    }
-
-    protected WireFormat createWireFormat() {
-        return new XStreamWireFormat();
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/JmsLogAppenderTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/util/JmsLogAppenderTest.java
deleted file mode 100644
index 636be91..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/JmsLogAppenderTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.util;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-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.command.ActiveMQTopic;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-
-public class JmsLogAppenderTest extends TestCase {
-    protected BrokerService broker;
-
-    public void testLoggingWithJMS() throws IOException, JMSException {
-        // Setup the consumers
-        MessageConsumer info;
-        MessageConsumer debug;
-        MessageConsumer warn;
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=false");
-        Connection conn = factory.createConnection();
-        conn.start();
-
-        warn = conn.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQTopic("log4j.MAIN.WARN"));
-        info = conn.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQTopic("log4j.MAIN.INFO"));
-        debug = conn.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQTopic("log4j.MAIN.DEBUG"));
-
-        // lets try configure log4j
-        Properties properties = new Properties();
-        properties.load(getClass().getResourceAsStream("test-log4j.properties"));
-        PropertyConfigurator.configure(properties);
-
-        Logger warnLog;
-        Logger infoLog;
-        Logger debugLog;
-
-        warnLog = Logger.getLogger("MAIN.WARN");
-        warnLog.setLevel(Level.WARN);
-        warnLog.warn("Warn Message");
-        warnLog.info("Info Message");
-        warnLog.debug("Debug Message");
-
-        infoLog = Logger.getLogger("MAIN.INFO");
-        infoLog.setLevel(Level.INFO);
-        infoLog.warn("Warn Message");
-        infoLog.info("Info Message");
-        infoLog.debug("Debug Message");
-
-        debugLog = Logger.getLogger("MAIN.DEBUG");
-        debugLog.setLevel(Level.DEBUG);
-        debugLog.warn("Warn Message");
-        debugLog.info("Info Message");
-        debugLog.debug("Debug Message");
-
-        TextMessage msg;
-
-        // Test warn level
-        msg = (TextMessage)warn.receive(1000);
-        assertNotNull(msg);
-        assertEquals("Warn Message", msg.getText());
-
-        msg = (TextMessage)warn.receive(1000);
-        assertNull(msg); // We should not receive anymore message because our
-                            // level is warning only
-
-        // Test info level
-        msg = (TextMessage)info.receive(1000);
-        assertNotNull(msg);
-        assertEquals("Warn Message", msg.getText());
-
-        msg = (TextMessage)info.receive(1000);
-        assertNotNull(msg);
-        assertEquals("Info Message", msg.getText());
-
-        msg = (TextMessage)info.receive(1000);
-        assertNull(msg); // We should not receive the debug message
-
-        // Test debug level
-        msg = (TextMessage)debug.receive(1000);
-        assertNotNull(msg);
-        assertEquals("Warn Message", msg.getText());
-
-        msg = (TextMessage)debug.receive(1000);
-        assertNotNull(msg);
-        assertEquals("Info Message", msg.getText());
-
-        msg = (TextMessage)debug.receive(1000);
-        assertNotNull(msg);
-    }
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/AbstractXMLMessageTransformerTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/AbstractXMLMessageTransformerTest.java
deleted file mode 100644
index 67b1792..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/AbstractXMLMessageTransformerTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/**
- * 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.util.oxm;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQMessageConsumer;
-import org.apache.activemq.MessageTransformer;
-import org.apache.activemq.util.xstream.SamplePojo;
-
-import javax.jms.*;
-
-import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.*;
-
-public abstract class AbstractXMLMessageTransformerTest extends TestCase {
-    protected ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-    protected Connection connection;
-    protected long timeout = 5000;
-    
-    protected Connection createConnection(MessageTransformer transformer) throws Exception {
-        connectionFactory.setTransformer(transformer);
-        connection = connectionFactory.createConnection();
-        connection.start();
-        return connection;
-    }
-    
-    protected abstract AbstractXMLMessageTransformer createTransformer();
-    
-    public void testSendObjectMessageReceiveAsTextMessageAndObjectMessage() throws Exception {
-    	AbstractXMLMessageTransformer transformer = createTransformer();
-    	transformer.setTransformType(XML);
-    	connection = createConnection(transformer);
-
-        // lets create the consumers
-        Session objectSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = objectSession.createTopic(getClass().getName());
-        MessageConsumer objectConsumer = objectSession.createConsumer(destination);
-
-        Session textSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer textConsumer = textSession.createConsumer(destination);
-        // lets clear the transformer on this consumer so we see the message as
-        // it really is
-        ((ActiveMQMessageConsumer)textConsumer).setTransformer(null);
-
-        // send a message
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-
-        ObjectMessage request = producerSession.createObjectMessage(new SamplePojo("James", "London"));
-        producer.send(request);
-
-        // lets consume it as an object message
-        Message message = objectConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        ObjectMessage objectMessage = (ObjectMessage)message;
-        Object object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        SamplePojo body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-        // lets consume it as a text message
-        message = textConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        TextMessage textMessage = (TextMessage)message;
-        String text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-        System.out.println("Received XML...");
-        System.out.println(text);
-    }
-
-    public void testSendTextMessageReceiveAsObjectMessageAndTextMessage() throws Exception {
-    	AbstractXMLMessageTransformer transformer = createTransformer();
-    	transformer.setTransformType(OBJECT);
-    	connection = createConnection(transformer);
-
-        // lets create the consumers
-        Session textSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = textSession.createTopic(getClass().getName());
-        MessageConsumer textConsumer = textSession.createConsumer(destination);
-
-        Session objectSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer objectConsumer = objectSession.createConsumer(destination);
-        // lets clear the transformer on this consumer so we see the message as
-        // it really is
-        ((ActiveMQMessageConsumer)objectConsumer).setTransformer(null);
-
-        // send a message
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-
-        String xmlText = "<org.apache.activemq.util.xstream.SamplePojo>" 
-            + "<name>James</name>" 
-            + "<city>London</city>" 
-            + "</org.apache.activemq.util.xstream.SamplePojo>";
-
-        TextMessage request = producerSession.createTextMessage(xmlText);
-        producer.send(request);
-
-        Message message;
-        // lets consume it as a text message
-        message = textConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        TextMessage textMessage = (TextMessage)message;
-        String text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-
-        // lets consume it as an object message
-        message = objectConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        ObjectMessage objectMessage = (ObjectMessage)message;
-        Object object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        SamplePojo body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-    }
-
-    public void testAdaptiveTransform() throws Exception {
-    	AbstractXMLMessageTransformer transformer = createTransformer();
-    	transformer.setTransformType(ADAPTIVE);
-    	connection = createConnection(transformer);
-
-        // lets create the consumers
-        Session adaptiveSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = adaptiveSession.createTopic(getClass().getName());
-        MessageConsumer adaptiveConsumer = adaptiveSession.createConsumer(destination);
-
-        Session origSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer origConsumer = origSession.createConsumer(destination);
-        // lets clear the transformer on this consumer so we see the message as
-        // it really is
-        ((ActiveMQMessageConsumer)origConsumer).setTransformer(null);
-
-        // Create producer
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-
-        Message message;
-        ObjectMessage objectMessage;
-        TextMessage textMessage;
-        SamplePojo body;
-        Object object;
-        String text;
-
-        // Send a text message
-        String xmlText = "<org.apache.activemq.util.xstream.SamplePojo>" 
-            + "<name>James</name>" 
-            + "<city>London</city>" 
-            + "</org.apache.activemq.util.xstream.SamplePojo>";
-
-        TextMessage txtRequest = producerSession.createTextMessage(xmlText);
-        producer.send(txtRequest);
-
-        // lets consume it as a text message
-        message = adaptiveConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        textMessage = (TextMessage)message;
-        text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-
-        // lets consume it as an object message
-        message = origConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        objectMessage = (ObjectMessage)message;
-        object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-        // Send object message
-        ObjectMessage objRequest = producerSession.createObjectMessage(new SamplePojo("James", "London"));
-        producer.send(objRequest);
-
-        // lets consume it as an object message
-        message = adaptiveConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        objectMessage = (ObjectMessage)message;
-        object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-        // lets consume it as a text message
-        message = origConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        textMessage = (TextMessage)message;
-        text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-        System.out.println("Received XML...");
-        System.out.println(text);
-
-    }
-    
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-    }
-    
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/OXMMessageTransformTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/OXMMessageTransformTest.java
deleted file mode 100644
index 4a0a4a2..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/OXMMessageTransformTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.util.oxm;
-
-import org.springframework.oxm.xstream.XStreamMarshaller;
-
-public class OXMMessageTransformTest extends AbstractXMLMessageTransformerTest {
-
-	protected AbstractXMLMessageTransformer createTransformer()  {
-    	OXMMessageTransformer transformer = new OXMMessageTransformer();
-    	transformer.setMarshaller(new XStreamMarshaller());
-    	return transformer;
-    }
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/XStreamMessageTransformTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/XStreamMessageTransformTest.java
deleted file mode 100644
index 76fcab3..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/oxm/XStreamMessageTransformTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * 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.util.oxm;
-
-import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.ADAPTIVE;
-
-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.activemq.ActiveMQMessageConsumer;
-import org.apache.activemq.util.xstream.SamplePojo;
-
-import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
-
-public class XStreamMessageTransformTest extends
-		AbstractXMLMessageTransformerTest {
-
-	protected AbstractXMLMessageTransformer createTransformer() {
-		return new XStreamMessageTransformer();
-	}
-
-	public void testStreamDriverTransform() throws Exception {
-		XStreamMessageTransformer transformer = (XStreamMessageTransformer) createTransformer();
-		transformer.setTransformType(ADAPTIVE);
-		transformer.setStreamDriver(new JettisonMappedXmlDriver());
-		connection = createConnection(transformer);
-
-		// lets create the consumers
-		Session adaptiveSession = connection.createSession(false,
-				Session.AUTO_ACKNOWLEDGE);
-		Destination destination = adaptiveSession.createTopic(getClass()
-				.getName());
-		MessageConsumer adaptiveConsumer = adaptiveSession
-				.createConsumer(destination);
-
-		Session origSession = connection.createSession(false,
-				Session.AUTO_ACKNOWLEDGE);
-		MessageConsumer origConsumer = origSession.createConsumer(destination);
-		// lets clear the transformer on this consumer so we see the message as
-		// it really is
-		((ActiveMQMessageConsumer) origConsumer).setTransformer(null);
-
-		// Create producer
-		Session producerSession = connection.createSession(false,
-				Session.AUTO_ACKNOWLEDGE);
-		MessageProducer producer = producerSession.createProducer(destination);
-
-		Message message;
-		ObjectMessage objectMessage;
-		TextMessage textMessage;
-		SamplePojo body;
-		Object object;
-		String text;
-
-		// Send a text message
-		String xmlText = "{\"org.apache.activemq.util.xstream.SamplePojo\":{\"name\":\"James\",\"city\":\"London\"}}";
-
-		TextMessage txtRequest = producerSession.createTextMessage(xmlText);
-		producer.send(txtRequest);
-
-		// lets consume it as a text message
-		message = adaptiveConsumer.receive(timeout);
-		assertNotNull("Should have received a message!", message);
-		assertTrue("Should be a TextMessage but was: " + message,
-				message instanceof TextMessage);
-		textMessage = (TextMessage) message;
-		text = textMessage.getText();
-		assertTrue("Text should be non-empty!", text != null
-				&& text.length() > 0);
-
-		// lets consume it as an object message
-		message = origConsumer.receive(timeout);
-		assertNotNull("Should have received a message!", message);
-		assertTrue("Should be an ObjectMessage but was: " + message,
-				message instanceof ObjectMessage);
-		objectMessage = (ObjectMessage) message;
-		object = objectMessage.getObject();
-		assertTrue("object payload of wrong type: " + object,
-				object instanceof SamplePojo);
-		body = (SamplePojo) object;
-		assertEquals("name", "James", body.getName());
-		assertEquals("city", "London", body.getCity());
-
-		// Send object message
-		ObjectMessage objRequest = producerSession
-				.createObjectMessage(new SamplePojo("James", "London"));
-		producer.send(objRequest);
-
-		// lets consume it as an object message
-		message = adaptiveConsumer.receive(timeout);
-		assertNotNull("Should have received a message!", message);
-		assertTrue("Should be an ObjectMessage but was: " + message,
-				message instanceof ObjectMessage);
-		objectMessage = (ObjectMessage) message;
-		object = objectMessage.getObject();
-		assertTrue("object payload of wrong type: " + object,
-				object instanceof SamplePojo);
-		body = (SamplePojo) object;
-		assertEquals("name", "James", body.getName());
-		assertEquals("city", "London", body.getCity());
-
-		// lets consume it as a text message
-		message = origConsumer.receive(timeout);
-		assertNotNull("Should have received a message!", message);
-		assertTrue("Should be a TextMessage but was: " + message,
-				message instanceof TextMessage);
-		textMessage = (TextMessage) message;
-		text = textMessage.getText();
-		assertTrue("Text should be non-empty!", text != null
-				&& text.length() > 0);
-		System.out.println("Received JSON...");
-		System.out.println(text);
-
-	}
-
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/SamplePojo.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/SamplePojo.java
deleted file mode 100644
index 8ae6367..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/SamplePojo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.util.xstream;
-
-import java.io.Serializable;
-
-/**
- * 
- */
-public class SamplePojo implements Serializable {
-    private String name;
-    private String city;
-
-    public SamplePojo() {
-    }
-
-    public SamplePojo(String name, String city) {
-        this.name = name;
-        this.city = city;
-    }
-
-
-    public String getCity() {
-        return city;
-    }
-
-    public void setCity(String city) {
-        this.city = city;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}
diff --git a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/XStreamTransformTest.java b/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/XStreamTransformTest.java
deleted file mode 100644
index d4a8aeb..0000000
--- a/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/XStreamTransformTest.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/**
- * 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.util.xstream;
-
-import javax.jms.Connection;
-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 junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQMessageConsumer;
-
-import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
-
-import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.*;
-
-/**
- * 
- */
-public class XStreamTransformTest extends TestCase {
-    protected ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=false");
-    protected Connection connection;
-    protected long timeout = 5000;
-
-    public void testSendObjectMessageReceiveAsTextMessageAndObjectMessage() throws Exception {
-        org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
-        transformer.setTransformType(XML);
-        connectionFactory.setTransformer(transformer);
-        connection = connectionFactory.createConnection();
-        connection.start();
-
-        // lets create the consumers
-        Session objectSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = objectSession.createTopic(getClass().getName());
-        MessageConsumer objectConsumer = objectSession.createConsumer(destination);
-
-        Session textSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer textConsumer = textSession.createConsumer(destination);
-        // lets clear the transformer on this consumer so we see the message as
-        // it really is
-        ((ActiveMQMessageConsumer)textConsumer).setTransformer(null);
-
-        // send a message
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-
-        ObjectMessage request = producerSession.createObjectMessage(new SamplePojo("James", "London"));
-        producer.send(request);
-
-        // lets consume it as an object message
-        Message message = objectConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        ObjectMessage objectMessage = (ObjectMessage)message;
-        Object object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        SamplePojo body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-        // lets consume it as a text message
-        message = textConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        TextMessage textMessage = (TextMessage)message;
-        String text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-        System.out.println("Received XML...");
-        System.out.println(text);
-    }
-
-    public void testSendTextMessageReceiveAsObjectMessageAndTextMessage() throws Exception {
-        org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
-        transformer.setTransformType(OBJECT);
-        connectionFactory.setTransformer(transformer);
-        connection = connectionFactory.createConnection();
-        connection.start();
-
-        // lets create the consumers
-        Session textSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = textSession.createTopic(getClass().getName());
-        MessageConsumer textConsumer = textSession.createConsumer(destination);
-
-        Session objectSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer objectConsumer = objectSession.createConsumer(destination);
-        // lets clear the transformer on this consumer so we see the message as
-        // it really is
-        ((ActiveMQMessageConsumer)objectConsumer).setTransformer(null);
-
-        // send a message
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-
-        String xmlText = "<org.apache.activemq.util.xstream.SamplePojo>" 
-            + "<name>James</name>" 
-            + "<city>London</city>" 
-            + "</org.apache.activemq.util.xstream.SamplePojo>";
-
-        TextMessage request = producerSession.createTextMessage(xmlText);
-        producer.send(request);
-
-        Message message;
-        // lets consume it as a text message
-        message = textConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        TextMessage textMessage = (TextMessage)message;
-        String text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-
-        // lets consume it as an object message
-        message = objectConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        ObjectMessage objectMessage = (ObjectMessage)message;
-        Object object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        SamplePojo body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-    }
-
-    public void testAdaptiveTransform() throws Exception {
-        org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
-        transformer.setTransformType(ADAPTIVE);
-        connectionFactory.setTransformer(transformer);
-        connection = connectionFactory.createConnection();
-        connection.start();
-
-        // lets create the consumers
-        Session adaptiveSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = adaptiveSession.createTopic(getClass().getName());
-        MessageConsumer adaptiveConsumer = adaptiveSession.createConsumer(destination);
-
-        Session origSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer origConsumer = origSession.createConsumer(destination);
-        // lets clear the transformer on this consumer so we see the message as
-        // it really is
-        ((ActiveMQMessageConsumer)origConsumer).setTransformer(null);
-
-        // Create producer
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-
-        Message message;
-        ObjectMessage objectMessage;
-        TextMessage textMessage;
-        SamplePojo body;
-        Object object;
-        String text;
-
-        // Send a text message
-        String xmlText = "<org.apache.activemq.util.xstream.SamplePojo>" 
-            + "<name>James</name>" 
-            + "<city>London</city>" 
-            + "</org.apache.activemq.util.xstream.SamplePojo>";
-
-        TextMessage txtRequest = producerSession.createTextMessage(xmlText);
-        producer.send(txtRequest);
-
-        // lets consume it as a text message
-        message = adaptiveConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        textMessage = (TextMessage)message;
-        text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-
-        // lets consume it as an object message
-        message = origConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        objectMessage = (ObjectMessage)message;
-        object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-        // Send object message
-        ObjectMessage objRequest = producerSession.createObjectMessage(new SamplePojo("James", "London"));
-        producer.send(objRequest);
-
-        // lets consume it as an object message
-        message = adaptiveConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        objectMessage = (ObjectMessage)message;
-        object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-        // lets consume it as a text message
-        message = origConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        textMessage = (TextMessage)message;
-        text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-        System.out.println("Received XML...");
-        System.out.println(text);
-
-    }
-    
-    public void testStreamDriverTransform() throws Exception {
-    	org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
-        transformer.setTransformType(ADAPTIVE);
-    	transformer.setStreamDriver(new JettisonMappedXmlDriver());
-        connectionFactory.setTransformer(transformer);
-        connection = connectionFactory.createConnection();
-        connection.start();
-
-        // lets create the consumers
-        Session adaptiveSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination destination = adaptiveSession.createTopic(getClass().getName());
-        MessageConsumer adaptiveConsumer = adaptiveSession.createConsumer(destination);
-
-        Session origSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageConsumer origConsumer = origSession.createConsumer(destination);
-        // lets clear the transformer on this consumer so we see the message as
-        // it really is
-        ((ActiveMQMessageConsumer)origConsumer).setTransformer(null);
-
-        // Create producer
-        Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(destination);
-
-        Message message;
-        ObjectMessage objectMessage;
-        TextMessage textMessage;
-        SamplePojo body;
-        Object object;
-        String text;
-
-        // Send a text message
-        String xmlText = "{\"org.apache.activemq.util.xstream.SamplePojo\":{\"name\":\"James\",\"city\":\"London\"}}";
-
-        TextMessage txtRequest = producerSession.createTextMessage(xmlText);
-        producer.send(txtRequest);
-
-        // lets consume it as a text message
-        message = adaptiveConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        textMessage = (TextMessage)message;
-        text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-
-        // lets consume it as an object message
-        message = origConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        objectMessage = (ObjectMessage)message;
-        object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-        
-        // Send object message
-        ObjectMessage objRequest = producerSession.createObjectMessage(new SamplePojo("James", "London"));
-        producer.send(objRequest);
-
-        // lets consume it as an object message
-        message = adaptiveConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be an ObjectMessage but was: " + message, message instanceof ObjectMessage);
-        objectMessage = (ObjectMessage)message;
-        object = objectMessage.getObject();
-        assertTrue("object payload of wrong type: " + object, object instanceof SamplePojo);
-        body = (SamplePojo)object;
-        assertEquals("name", "James", body.getName());
-        assertEquals("city", "London", body.getCity());
-
-        // lets consume it as a text message
-        message = origConsumer.receive(timeout);
-        assertNotNull("Should have received a message!", message);
-        assertTrue("Should be a TextMessage but was: " + message, message instanceof TextMessage);
-        textMessage = (TextMessage)message;
-        text = textMessage.getText();
-        assertTrue("Text should be non-empty!", text != null && text.length() > 0);
-        System.out.println("Received JSON...");
-        System.out.println(text);
-
-    }
-
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-        }
-    }
-}
diff --git a/trunk/activemq-optional/src/test/resources/client.keystore b/trunk/activemq-optional/src/test/resources/client.keystore
deleted file mode 100755
index 8580672..0000000
--- a/trunk/activemq-optional/src/test/resources/client.keystore
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/jndi.properties b/trunk/activemq-optional/src/test/resources/jndi.properties
deleted file mode 100644
index 5739a94..0000000
--- a/trunk/activemq-optional/src/test/resources/jndi.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
-
-# use the following property to configure the default connector
-java.naming.provider.url = vm://localhost
-
-# END SNIPPET: jndi
diff --git a/trunk/activemq-optional/src/test/resources/log4j.properties b/trunk/activemq-optional/src/test/resources/log4j.properties
deleted file mode 100644
index 0488612..0000000
--- a/trunk/activemq-optional/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.spring=WARN
-
-# 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
\ No newline at end of file
diff --git a/trunk/activemq-optional/src/test/resources/org/activemq/axis/activemq-connection-factory.properties b/trunk/activemq-optional/src/test/resources/org/activemq/axis/activemq-connection-factory.properties
deleted file mode 100755
index 5ee6cb9..0000000
--- a/trunk/activemq-optional/src/test/resources/org/activemq/axis/activemq-connection-factory.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#
-# An example config file for using ActiveMQ with Apache Axis
-#
-
-brokerURL=tcp://localhost:61616
-defaultUser=Administrator
-defaultPassword=Administrator
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/bugs/amq2764/reconnect-broker1.xml b/trunk/activemq-optional/src/test/resources/org/apache/activemq/bugs/amq2764/reconnect-broker1.xml
deleted file mode 100644
index db2e0fa..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/bugs/amq2764/reconnect-broker1.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker1" brokerId="broker1" persistent="false" useShutdownHook="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <destinations>
-      <queue physicalName="RECONNECT.TEST.QUEUE"/>
-    </destinations>
-
-    <networkConnectors>
-      <!--<networkConnector uri="static:(http://localhost:61617?proxyHost=localhost&amp;proxyPort=80)" duplex="true">-->
-      <networkConnector name="1-2" uri="static:(http://localhost:61617?readCheckTime=4000&amp;initialDelayTime=4000&amp;keepAliveResponseRequired=true)" duplex="true">
-        <staticallyIncludedDestinations>
-          <queue physicalName="RECONNECT.TEST.QUEUE"/>
-        </staticallyIncludedDestinations>
-      </networkConnector>
-    </networkConnectors>
-    
-    <transportConnectors>
-      <transportConnector uri="http://localhost:61616"/>
-    </transportConnectors>
-
-  </broker>
-  
-</beans>
-
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/bugs/amq2764/reconnect-broker2.xml b/trunk/activemq-optional/src/test/resources/org/apache/activemq/bugs/amq2764/reconnect-broker2.xml
deleted file mode 100644
index f8ff81b..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/bugs/amq2764/reconnect-broker2.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker2" brokerId="broker2" persistent="false" useShutdownHook="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <transportConnectors>
-      <!-- configure a low inactivity monitor check time to ensure all messages are received quickly, ask for a response as
-      peer will have 30 second inactivity delay so won't satisfy our read check till 30+ delay -->
-      <transportConnector uri="http://localhost:61617?transport.readCheckTime=4000&amp;transport.initialDelayTime=4000&amp;transport.keepAliveResponseRequired=true"/>
-      <!--<transportConnector uri="http://localhost:61617"/>-->
-    </transportConnectors>
-
-  </broker>
-
-
-</beans>
-
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-1 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-1
deleted file mode 100644
index bbae0c2..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-1
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-2 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-2
deleted file mode 100644
index 4c48905..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-2
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-3 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-3
deleted file mode 100644
index cff5040..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-3
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-4 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-4
deleted file mode 100644
index b7fb19a..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-4
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-5 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-5
deleted file mode 100644
index 6840d55..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-5
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-6 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-6
deleted file mode 100644
index a3b776e..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-6
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-7 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-7
deleted file mode 100644
index 9488e64..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-7
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-8 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-8
deleted file mode 100644
index ac4cd3b..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-8
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-9 b/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-9
deleted file mode 100644
index 88cdf8f..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/store/amq/reader/data/data-9
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/org/apache/activemq/util/test-log4j.properties b/trunk/activemq-optional/src/test/resources/org/apache/activemq/util/test-log4j.properties
deleted file mode 100644
index 53c0490..0000000
--- a/trunk/activemq-optional/src/test/resources/org/apache/activemq/util/test-log4j.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# Make level to fatal so it would not affect the test case
-log4j.rootLogger=fatal, jms
-
-log4j.appender.jms=org.apache.activemq.util.JndiJmsLogAppender
-log4j.appender.jms.jndiName=ConnectionFactory
diff --git a/trunk/activemq-optional/src/test/resources/server.keystore b/trunk/activemq-optional/src/test/resources/server.keystore
deleted file mode 100755
index d9223d8..0000000
--- a/trunk/activemq-optional/src/test/resources/server.keystore
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-optional/src/test/resources/spring-http.xml b/trunk/activemq-optional/src/test/resources/spring-http.xml
deleted file mode 100644
index e66d49c..0000000
--- a/trunk/activemq-optional/src/test/resources/spring-http.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<!-- START SNIPPET: spring -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
-   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <!--  lets create an embedded ActiveMQ Broker -->
-  <amq:broker useJmx="false" persistent="true" deleteAllMessagesOnStartup="true">
-    <amq:transportConnectors>
-      <amq:transportConnector uri="http://localhost:8081" />
-    </amq:transportConnectors>
-  </amq:broker>
-
-   <!--  ActiveMQ destinations to use  -->
-  <amq:queue id="destination"  physicalName="org.apache.activemq.spring.Test.spring.http"/>
-
-  <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->
-  <amq:connectionFactory id="jmsFactory" brokerURL="http://localhost:8081"/>
-  
-
-  <!-- Spring JMS Template -->
-  <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory">
-      <!-- lets wrap in a pool to avoid creating a connection per send -->
-      <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-          <ref local="jmsFactory" />
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="consumerJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-    <property name="connectionFactory" ref="jmsFactory"/>
-  </bean>
-
-  <!-- a sample POJO which uses a Spring JmsTemplate -->
-  <bean id="producer" class="org.apache.activemq.spring.SpringProducer">
-    <property name="template">
-      <ref bean="myJmsTemplate"></ref>
-    </property>
-
-    <property name="destination">
-      <ref bean="destination" />
-    </property>
-
-    <property name="messageCount">
-      <value>100</value>
-    </property>
-  </bean>
-
-  <!-- a sample POJO consumer -->
-  <bean id="consumer" class="org.apache.activemq.spring.SpringConsumer">
-    <property name="template" ref="consumerJmsTemplate"/>
-    <property name="destination" ref="destination"/>
-  </bean>
-
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-optional/src/webapp/WEB-INF/web.xml b/trunk/activemq-optional/src/webapp/WEB-INF/web.xml
deleted file mode 100755
index 2ae5ca6..0000000
--- a/trunk/activemq-optional/src/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-    "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
-    <display-name>ActiveMQ Message Broker Web Application</display-name>
-    <description>
-    Provides an embedded ActiveMQ Message Broker embedded inside a web application
-    </description>
-
-    <!-- context config -->
-    <context-param>
-        <param-name>org.apache.activemq.brokerURL</param-name>
-        <param-value>tcp://localhost:61616</param-value>
-        <description>The URL that the embedded broker should listen on in addition to HTTP</description>
-    </context-param>
-
-
-
-    <!-- servlet mappings -->
-
-    <!-- the main REST servlet -->
-    <servlet>
-        <servlet-name>TunnelServlet</servlet-name>
-        <servlet-class>org.apache.activemq.transport.http.HttpEmbeddedTunnelServlet</servlet-class>
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-
-    <servlet-mapping>
-        <servlet-name>TunnelServlet</servlet-name>
-        <url-pattern>/*</url-pattern>
-    </servlet-mapping>
-
-</web-app>
diff --git a/trunk/activemq-optional/src/webapp/index.html b/trunk/activemq-optional/src/webapp/index.html
deleted file mode 100755
index 3af3a8e..0000000
--- a/trunk/activemq-optional/src/webapp/index.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-    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.
--->
-<html>
-<head>
-  <title>ActiveMQ HTTP Tunnel</title>
-  <link rel="stylesheet" href="style.css" type="text/css">
-</head>
-
-<body>
-<h1>ActiveMQ HTTP Tunnel</h1>
-
-<p>
-This service allows you to tunnel ActiveMQ traffic through HTTP to work cleanly with firewalls.
-For more information please see the <a href="http://activemq.org/">ActiveMQ home page</a>.
-</p>
-
-
-</body>
-</html>
diff --git a/trunk/activemq-pool/pom.xml b/trunk/activemq-pool/pom.xml
deleted file mode 100755
index 34d1ab1..0000000
--- a/trunk/activemq-pool/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-pool</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Pool</name>
-  <description>ActiveMQ Pooled ConnectionFactory</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-      javax.transaction*;resolution:=optional,
-      org.apache.activemq.ra*;resolution:=optional,
-      org.apache.geronimo.transaction.manager*;resolution:=optional,
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.activemq.pool*;version=${project.version};-noimport:=true,
-    </activemq.osgi.export>
-  </properties>
-
-  <dependencies>
-
-    <!-- =============================== -->
-    <!-- Required Dependencies -->
-    <!-- =============================== -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-ra</artifactId>
-      <optional>true</optional>
-    </dependency> 
-    <dependency>
-      <groupId>org.apache.geronimo.components</groupId>
-      <artifactId>geronimo-transaction</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-annotation_1.0_spec</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-    	<groupId>log4j</groupId>
-    	<artifactId>log4j</artifactId>
-    	<scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ActiveMQResourceManager.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ActiveMQResourceManager.java
deleted file mode 100644
index 95c3de0..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ActiveMQResourceManager.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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.pool;
-
-import java.io.IOException;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Session;
-import javax.jms.JMSException;
-import javax.transaction.TransactionManager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
-import org.apache.geronimo.transaction.manager.NamedXAResource;
-import org.apache.geronimo.transaction.manager.WrapperNamedXAResource;
-
-
-/**
- * This class allows wiring the ActiveMQ broker and the Geronimo transaction manager
- * in a way that will allow the transaction manager to correctly recover XA transactions.
- *
- * For example, it can be used the following way:
- * <pre>
- *   <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
- *      <property name="brokerURL" value="tcp://localhost:61616" />
- *   </bean>
- *
- *   <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactoryFactoryBean">
- *       <property name="maxConnections" value="8" />
- *       <property name="transactionManager" ref="transactionManager" />
- *       <property name="connectionFactory" ref="activemqConnectionFactory" />
- *       <property name="resourceName" value="activemq.broker" />
- *   </bean>
- *
- *   <bean id="resourceManager" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
- *         <property name="transactionManager" ref="transactionManager" />
- *         <property name="connectionFactory" ref="activemqConnectionFactory" />
- *         <property name="resourceName" value="activemq.broker" />
- *   </bean>
- * </pre>
- */
-public class ActiveMQResourceManager {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(ActiveMQResourceManager.class);
-
-    private String resourceName;
-
-    private TransactionManager transactionManager;
-
-    private ConnectionFactory connectionFactory;
-
-    public void recoverResource() {
-        try {
-            if (!Recovery.recover(this)) {
-                LOGGER.info("Resource manager is unrecoverable");
-            }
-        } catch (NoClassDefFoundError e) {
-            LOGGER.info("Resource manager is unrecoverable due to missing classes: " + e);
-        } catch (Throwable e) {
-            LOGGER.warn("Error while recovering resource manager", e);
-        }
-    }
-
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public void setResourceName(String resourceName) {
-        this.resourceName = resourceName;
-    }
-
-    public TransactionManager getTransactionManager() {
-        return transactionManager;
-    }
-
-    public void setTransactionManager(TransactionManager transactionManager) {
-        this.transactionManager = transactionManager;
-    }
-
-    public ConnectionFactory getConnectionFactory() {
-        return connectionFactory;
-    }
-
-    public void setConnectionFactory(ConnectionFactory connectionFactory) {
-        this.connectionFactory = connectionFactory;
-    }
-
-    /**
-     * This class will ensure the broker is properly recovered when wired with
-     * the Geronimo transaction manager.
-     */
-    public static class Recovery {
-
-        public static boolean isRecoverable(ActiveMQResourceManager rm) {
-            return  rm.getConnectionFactory() instanceof ActiveMQConnectionFactory &&
-                    rm.getTransactionManager() instanceof RecoverableTransactionManager &&
-                    rm.getResourceName() != null && !"".equals(rm.getResourceName());
-        }
-
-        public static boolean recover(ActiveMQResourceManager rm) throws IOException {
-            if (isRecoverable(rm)) {
-                try {
-                    ActiveMQConnectionFactory connFactory = (ActiveMQConnectionFactory) rm.getConnectionFactory();
-                    ActiveMQConnection activeConn = (ActiveMQConnection)connFactory.createConnection();
-                    ActiveMQSession session = (ActiveMQSession)activeConn.createSession(true, Session.SESSION_TRANSACTED);
-                    NamedXAResource namedXaResource = new WrapperNamedXAResource(session.getTransactionContext(), rm.getResourceName());
-
-                    RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
-                    rtxManager.recoverResourceManager(namedXaResource);
-                    return true;
-                } catch (JMSException e) {
-                  throw IOExceptionSupport.create(e);
-                }
-            } else {
-                return false;
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/AmqJNDIPooledConnectionFactory.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/AmqJNDIPooledConnectionFactory.java
deleted file mode 100644
index f89bbff..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/AmqJNDIPooledConnectionFactory.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.pool;
-
-import java.util.Properties;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.jndi.JNDIReferenceFactory;
-import org.apache.activemq.jndi.JNDIStorableInterface;
-import org.apache.activemq.pool.PooledConnectionFactory;
-
-/**
-* AmqJNDIPooledConnectionFactory.java
-* Created by linus on 2008-03-07.
-*/
-public class AmqJNDIPooledConnectionFactory extends PooledConnectionFactory
-        implements JNDIStorableInterface {
-    private Properties properties;
-
-    public AmqJNDIPooledConnectionFactory() {
-        super();
-    }
-    
-    public AmqJNDIPooledConnectionFactory(String brokerURL) {
-        super(brokerURL);
-    }
-
-    public AmqJNDIPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory) {
-        super(connectionFactory);
-    }
-
-    /**
-     * set the properties for this instance as retrieved from JNDI
-     * 
-     * @param props
-     */
-    public synchronized void setProperties(Properties props) {
-        this.properties = props;
-        buildFromProperties(props);
-    }
-
-    /**
-     * Get the properties from this instance for storing in JNDI
-     * 
-     * @return the properties
-     */
-    public synchronized Properties getProperties() {
-        if (this.properties == null) {
-            this.properties = new Properties();
-        }
-        populateProperties(this.properties);
-        return this.properties;
-    }
-
-    /**
-     * Retrive a Reference for this instance to store in JNDI
-     * 
-     * @return the built Reference
-     * @throws NamingException
-     *             if error on building Reference
-     */
-    public Reference getReference() throws NamingException {
-        return JNDIReferenceFactory.createReference(this.getClass().getName(),
-                this);
-    }
-
-    public void buildFromProperties(Properties properties) {
-        if (properties == null) {
-            properties = new Properties();
-        }
-        ((ActiveMQConnectionFactory) getConnectionFactory())
-                .buildFromProperties(properties);
-        String temp = properties.getProperty("maximumActive");
-        if (temp != null && temp.length() > 0) {
-            setMaximumActive(Integer.parseInt(temp));
-        }
-        temp = properties.getProperty("maxConnections");
-        if (temp != null && temp.length() > 0) {
-            setMaxConnections(Integer.parseInt(temp));
-        }
-    }
-
-    public void populateProperties(Properties props) {
-        ((ActiveMQConnectionFactory) getConnectionFactory())
-                .populateProperties(props);
-        props
-                .setProperty("maximumActive", Integer
-                        .toString(getMaximumActive()));
-        props.setProperty("maxConnections", Integer
-                .toString(getMaxConnections()));
-    }
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ConnectionKey.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ConnectionKey.java
deleted file mode 100644
index 3538dc4..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ConnectionKey.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.pool;
-
-/**
- * A cache key for the connection details
- * 
- * 
- */
-public class ConnectionKey {
-    private String userName;
-    private String password;
-    private int hash;
-
-    public ConnectionKey(String userName, String password) {
-        this.password = password;
-        this.userName = userName;
-        hash = 31;
-        if (userName != null) {
-            hash += userName.hashCode();
-        }
-        hash *= 31;
-        if (password != null) {
-            hash += password.hashCode();
-        }
-    }
-
-    public int hashCode() {
-        return hash;
-    }
-
-    public boolean equals(Object that) {
-        if (this == that) {
-            return true;
-        }
-        if (that instanceof ConnectionKey) {
-            return equals((ConnectionKey)that);
-        }
-        return false;
-    }
-
-    public boolean equals(ConnectionKey that) {
-        return isEqual(this.userName, that.userName) && isEqual(this.password, that.password);
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public static boolean isEqual(Object o1, Object o2) {
-        if (o1 == o2) {
-            return true;
-        }
-        return o1 != null && o2 != null && o1.equals(o2);
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ConnectionPool.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ConnectionPool.java
deleted file mode 100644
index 741faac..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/ConnectionPool.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/**
- * 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.pool;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.commons.pool.ObjectPoolFactory;
-
-/**
- * Holds a real JMS connection along with the session pools associated with it.
- * 
- * 
- */
-public class ConnectionPool {
-
-    private ActiveMQConnection connection;
-    private Map<SessionKey, SessionPool> cache;
-    private AtomicBoolean started = new AtomicBoolean(false);
-    private int referenceCount;
-    private ObjectPoolFactory poolFactory;
-    private long lastUsed = System.currentTimeMillis();
-    private long firstUsed = lastUsed;
-    private boolean hasFailed;
-    private boolean hasExpired;
-    private int idleTimeout = 30 * 1000;
-    private long expiryTimeout = 0l;
-
-    public ConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory) {
-        this(connection, new HashMap<SessionKey, SessionPool>(), poolFactory);
-        // Add a transport Listener so that we can notice if this connection
-        // should be expired due to
-        // a connection failure.
-        connection.addTransportListener(new TransportListener() {
-            public void onCommand(Object command) {
-            }
-
-            public void onException(IOException error) {
-                synchronized (ConnectionPool.this) {
-                    hasFailed = true;
-                }
-            }
-
-            public void transportInterupted() {
-            }
-
-            public void transportResumed() {
-            }
-        });       
-        //
-        // make sure that we set the hasFailed flag, in case the transport already failed
-        // prior to the addition of our new TransportListener
-        //
-        if(connection.isTransportFailed()) {
-            hasFailed = true;
-        }
-    }
-
-    public ConnectionPool(ActiveMQConnection connection, Map<SessionKey, SessionPool> cache, ObjectPoolFactory poolFactory) {
-        this.connection = connection;
-        this.cache = cache;
-        this.poolFactory = poolFactory;
-    }
-
-    public void start() throws JMSException {
-        if (started.compareAndSet(false, true)) {
-        	try {
-        		connection.start();
-        	} catch (JMSException e) {
-        		started.set(false);
-        		throw(e);
-        	}
-        }
-    }
-
-    public synchronized ActiveMQConnection getConnection() {
-        return connection;
-    }
-
-    public Session createSession(boolean transacted, int ackMode) throws JMSException {
-        SessionKey key = new SessionKey(transacted, ackMode);
-        SessionPool pool = cache.get(key);
-        if (pool == null) {
-            pool = createSessionPool(key);
-            cache.put(key, pool);
-        }
-        PooledSession session = pool.borrowSession();
-        return session;
-    }
-
-    public synchronized void close() {
-        if (connection != null) {
-            try {
-                Iterator<SessionPool> i = cache.values().iterator();
-                while (i.hasNext()) {
-                    SessionPool pool = i.next();
-                    i.remove();
-                    try {
-                        pool.close();
-                    } catch (Exception e) {
-                    }
-                }
-            } finally {
-                try {
-                    connection.close();
-                } catch (Exception e) {
-                } finally {
-                    connection = null;
-                }
-            }
-        }
-    }
-
-    public synchronized void incrementReferenceCount() {
-        referenceCount++;
-        lastUsed = System.currentTimeMillis();
-    }
-
-    public synchronized void decrementReferenceCount() {
-        referenceCount--;
-        lastUsed = System.currentTimeMillis();
-        if (referenceCount == 0) {
-            expiredCheck();
-        }
-    }
-
-    /**
-     * @return true if this connection has expired.
-     */
-    public synchronized boolean expiredCheck() {
-        if (connection == null) {
-            return true;
-        }
-        if (hasExpired) {
-            if (referenceCount == 0) {
-                close();
-            }
-            return true;
-        }
-        if (hasFailed 
-                || (idleTimeout > 0 && System.currentTimeMillis() > lastUsed + idleTimeout)
-                || expiryTimeout > 0 && System.currentTimeMillis() > firstUsed + expiryTimeout) {
-            hasExpired = true;
-            if (referenceCount == 0) {
-                close();
-            }
-            return true;
-        }
-        return false;
-    }
-
-    public int getIdleTimeout() {
-        return idleTimeout;
-    }
-
-    public void setIdleTimeout(int idleTimeout) {
-        this.idleTimeout = idleTimeout;
-    }
-
-    protected SessionPool createSessionPool(SessionKey key) {
-        return new SessionPool(this, key, poolFactory.createPool());
-    }
-
-    public void setExpiryTimeout(long expiryTimeout) {
-        this.expiryTimeout  = expiryTimeout;
-    }
-    
-    public long getExpiryTimeout() {
-        return expiryTimeout;
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java
deleted file mode 100644
index 010bf44..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2006 the original author or authors.
- *
- * 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.
- */
-package org.apache.activemq.pool;
-
-import javax.jms.JMSException;
-import javax.transaction.TransactionManager;
-import javax.transaction.xa.XAResource;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ra.LocalAndXATransaction;
-import org.apache.commons.pool.ObjectPoolFactory;
-import org.apache.geronimo.transaction.manager.WrapperNamedXAResource;
-
-public class JcaConnectionPool extends XaConnectionPool {
-
-    private String name;
-
-    public JcaConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory, TransactionManager transactionManager, String name) {
-        super(connection, poolFactory, transactionManager);
-        this.name = name;
-    }
-
-    protected XAResource createXaResource(PooledSession session) throws JMSException {
-        XAResource xares = new LocalAndXATransaction(session.getInternalSession().getTransactionContext());
-        if (name != null) {
-            xares = new WrapperNamedXAResource(xares, name);
-        }
-        return xares;
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaPooledConnectionFactory.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaPooledConnectionFactory.java
deleted file mode 100644
index a19c351..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaPooledConnectionFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2006 the original author or authors.
- *
- * 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.
- */
-package org.apache.activemq.pool;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class JcaPooledConnectionFactory extends XaPooledConnectionFactory {
-
-    private String name;
-
-    public JcaPooledConnectionFactory() {
-        super();
-    }
-
-    public JcaPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory) {
-        super(connectionFactory);
-    }
-
-    public JcaPooledConnectionFactory(String brokerURL) {
-        super(brokerURL);
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    protected ConnectionPool createConnectionPool(ActiveMQConnection connection) {
-        return new JcaConnectionPool(connection, getPoolFactory(), getTransactionManager(), getName());
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnection.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnection.java
deleted file mode 100755
index d8e664b..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnection.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * 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.pool;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.ConnectionMetaData;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicSession;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.AlreadyClosedException;
-import org.apache.activemq.EnhancedConnection;
-import org.apache.activemq.advisory.DestinationSource;
-
-/**
- * Represents a proxy {@link Connection} which is-a {@link TopicConnection} and
- * {@link QueueConnection} which is pooled and on {@link #close()} will return
- * itself to the sessionPool.
- * 
- * <b>NOTE</b> this implementation is only intended for use when sending
- * messages. It does not deal with pooling of consumers; for that look at a
- * library like <a href="http://jencks.org/">Jencks</a> such as in <a
- * href="http://jencks.org/Message+Driven+POJOs">this example</a>
- * 
- * 
- */
-public class PooledConnection implements TopicConnection, QueueConnection, EnhancedConnection {
-
-    private ConnectionPool pool;
-    private boolean stopped;
-
-    public PooledConnection(ConnectionPool pool) {
-        this.pool = pool;
-        this.pool.incrementReferenceCount();
-    }
-
-    /**
-     * Factory method to create a new instance.
-     */
-    public PooledConnection newInstance() {
-        return new PooledConnection(pool);
-    }
-
-    public void close() throws JMSException {
-        if (this.pool != null) {
-            this.pool.decrementReferenceCount();
-            this.pool = null;
-        }
-    }
-
-    public void start() throws JMSException {
-        assertNotClosed();
-        pool.start();
-    }
-
-    public void stop() throws JMSException {
-        stopped = true;
-    }
-
-    public ConnectionConsumer createConnectionConsumer(Destination destination, String selector,
-                                                       ServerSessionPool serverSessionPool, int maxMessages)
-        throws JMSException {
-        return getConnection()
-            .createConnectionConsumer(destination, selector, serverSessionPool, maxMessages);
-    }
-
-    public ConnectionConsumer createConnectionConsumer(Topic topic, String s,
-                                                       ServerSessionPool serverSessionPool, int maxMessages)
-        throws JMSException {
-        return getConnection().createConnectionConsumer(topic, s, serverSessionPool, maxMessages);
-    }
-
-    public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String selector, String s1,
-                                                              ServerSessionPool serverSessionPool, int i)
-        throws JMSException {
-        return getConnection().createDurableConnectionConsumer(topic, selector, s1, serverSessionPool, i);
-    }
-
-    public String getClientID() throws JMSException {
-        return getConnection().getClientID();
-    }
-
-    public ExceptionListener getExceptionListener() throws JMSException {
-        return getConnection().getExceptionListener();
-    }
-
-    public ConnectionMetaData getMetaData() throws JMSException {
-        return getConnection().getMetaData();
-    }
-
-    public void setExceptionListener(ExceptionListener exceptionListener) throws JMSException {
-        getConnection().setExceptionListener(exceptionListener);
-    }
-
-    public void setClientID(String clientID) throws JMSException {
-        getConnection().setClientID(clientID);
-    }
-
-    public ConnectionConsumer createConnectionConsumer(Queue queue, String selector,
-                                                       ServerSessionPool serverSessionPool, int maxMessages)
-        throws JMSException {
-        return getConnection().createConnectionConsumer(queue, selector, serverSessionPool, maxMessages);
-    }
-
-    // Session factory methods
-    // -------------------------------------------------------------------------
-    public QueueSession createQueueSession(boolean transacted, int ackMode) throws JMSException {
-        return (QueueSession)createSession(transacted, ackMode);
-    }
-
-    public TopicSession createTopicSession(boolean transacted, int ackMode) throws JMSException {
-        return (TopicSession)createSession(transacted, ackMode);
-    }
-
-    public Session createSession(boolean transacted, int ackMode) throws JMSException {
-        return pool.createSession(transacted, ackMode);
-    }
-
-    // EnhancedCollection API
-    // -------------------------------------------------------------------------
-    
-    public DestinationSource getDestinationSource() throws JMSException {
-        return getConnection().getDestinationSource();
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    public ActiveMQConnection getConnection() throws JMSException {
-        assertNotClosed();
-        return pool.getConnection();
-    }
-
-    protected void assertNotClosed() throws AlreadyClosedException {
-        if (stopped || pool == null) {
-            throw new AlreadyClosedException();
-        }
-    }
-
-    protected ActiveMQSession createSession(SessionKey key) throws JMSException {
-        return (ActiveMQSession)getConnection().createSession(key.isTransacted(), key.getAckMode());
-    }
-
-    public String toString() {
-        return "PooledConnection { " + pool + " }";
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
deleted file mode 100644
index 9f9b080..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/**
- * 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.pool;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.Service;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.commons.pool.ObjectPoolFactory;
-import org.apache.commons.pool.impl.GenericObjectPoolFactory;
-
-/**
- * A JMS provider which pools Connection, Session and MessageProducer instances
- * so it can be used with tools like <a href="http://camel.apache.org/activemq.html">Camel</a> and Spring's <a
- * href="http://activemq.apache.org/spring-support.html">JmsTemplate and MessagListenerContainer</a>.
- * Connections, sessions and producers are returned to a pool after use so that they can be reused later
- * without having to undergo the cost of creating them again.
- * 
- * b>NOTE:</b> while this implementation does allow the creation of a collection of active consumers,
- * it does not 'pool' consumers. Pooling makes sense for connections, sessions and producers, which 
- * are expensive to create and can remain idle a minimal cost. Consumers, on the other hand, are usually
- * just created at startup and left active, handling incoming messages as they come. When a consumer is
- * complete, it is best to close it rather than return it to a pool for later reuse: this is because, 
- * even if a consumer is idle, ActiveMQ will keep delivering messages to the consumer's prefetch buffer,
- * where they'll get held until the consumer is active again.
- * 
- * If you are creating a collection of consumers (for example, for multi-threaded message consumption), you
- * might want to consider using a lower prefetch value for each consumer (e.g. 10 or 20), to ensure that 
- * all messages don't end up going to just one of the consumers. See this FAQ entry for more detail: 
- * http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html
- * 
- * @org.apache.xbean.XBean element="pooledConnectionFactory"
- * 
- * 
- */
-public class PooledConnectionFactory implements ConnectionFactory, Service {
-    private static final transient Logger LOG = LoggerFactory.getLogger(PooledConnectionFactory.class);
-    private ConnectionFactory connectionFactory;
-    private Map<ConnectionKey, LinkedList<ConnectionPool>> cache = new HashMap<ConnectionKey, LinkedList<ConnectionPool>>();
-    private ObjectPoolFactory poolFactory;
-    private int maximumActive = 500;
-    private int maxConnections = 1;
-    private int idleTimeout = 30 * 1000;
-    private AtomicBoolean stopped = new AtomicBoolean(false);
-    private long expiryTimeout = 0l;
-
-    public PooledConnectionFactory() {
-        this(new ActiveMQConnectionFactory());
-    }
-
-    public PooledConnectionFactory(String brokerURL) {
-        this(new ActiveMQConnectionFactory(brokerURL));
-    }
-
-    public PooledConnectionFactory(ActiveMQConnectionFactory connectionFactory) {
-        this.connectionFactory = connectionFactory;
-    }
-
-    public ConnectionFactory getConnectionFactory() {
-        return connectionFactory;
-    }
-
-    public void setConnectionFactory(ConnectionFactory connectionFactory) {
-        this.connectionFactory = connectionFactory;
-    }
-
-    public Connection createConnection() throws JMSException {
-        return createConnection(null, null);
-    }
-
-    public synchronized Connection createConnection(String userName, String password) throws JMSException {
-        if (stopped.get()) {
-            LOG.debug("PooledConnectionFactory is stopped, skip create new connection.");
-            return null;
-        }
-        
-        ConnectionKey key = new ConnectionKey(userName, password);
-        LinkedList<ConnectionPool> pools = cache.get(key);
-
-        if (pools == null) {
-            pools = new LinkedList<ConnectionPool>();
-            cache.put(key, pools);
-        }
-
-        ConnectionPool connection = null;
-        if (pools.size() == maxConnections) {
-            connection = pools.removeFirst();
-        }
-
-        // Now.. we might get a connection, but it might be that we need to
-        // dump it..
-        if (connection != null && connection.expiredCheck()) {
-            connection = null;
-        }
-
-        if (connection == null) {
-            ActiveMQConnection delegate = createConnection(key);
-            connection = createConnectionPool(delegate);
-        }
-        pools.add(connection);
-        return new PooledConnection(connection);
-    }
-
-    protected ConnectionPool createConnectionPool(ActiveMQConnection connection) {
-        ConnectionPool result =  new ConnectionPool(connection, getPoolFactory());
-        result.setIdleTimeout(getIdleTimeout());
-        result.setExpiryTimeout(getExpiryTimeout());
-        return result;
-    }
-
-    protected ActiveMQConnection createConnection(ConnectionKey key) throws JMSException {
-        if (key.getUserName() == null && key.getPassword() == null) {
-            return (ActiveMQConnection)connectionFactory.createConnection();
-        } else {
-            return (ActiveMQConnection)connectionFactory.createConnection(key.getUserName(), key.getPassword());
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.service.Service#start()
-     */
-    public void start() {
-        try {
-            stopped.set(false);
-            createConnection();
-        } catch (JMSException e) {
-            LOG.warn("Create pooled connection during start failed.", e);
-            IOExceptionSupport.create(e);
-        }
-    }
-
-    public void stop() {
-        LOG.debug("Stop the PooledConnectionFactory, number of connections in cache: "+cache.size());
-        stopped.set(true);
-        for (Iterator<LinkedList<ConnectionPool>> iter = cache.values().iterator(); iter.hasNext();) {
-            for (ConnectionPool connection : iter.next()) {
-                try {
-                    connection.close();
-                }catch(Exception e) {
-                    LOG.warn("Close connection failed",e);
-                }
-            }
-        }
-        cache.clear();
-    }
-
-    public ObjectPoolFactory getPoolFactory() {
-        if (poolFactory == null) {
-            poolFactory = createPoolFactory();
-        }
-        return poolFactory;
-    }
-
-    /**
-     * Sets the object pool factory used to create individual session pools for
-     * each connection
-     */
-    public void setPoolFactory(ObjectPoolFactory poolFactory) {
-        this.poolFactory = poolFactory;
-    }
-
-    public int getMaximumActive() {
-        return maximumActive;
-    }
-
-    /**
-     * Sets the maximum number of active sessions per connection
-     */
-    public void setMaximumActive(int maximumActive) {
-        this.maximumActive = maximumActive;
-    }
-
-    /**
-     * @return the maxConnections
-     */
-    public int getMaxConnections() {
-        return maxConnections;
-    }
-
-    /**
-     * @param maxConnections the maxConnections to set
-     */
-    public void setMaxConnections(int maxConnections) {
-        this.maxConnections = maxConnections;
-    }
-
-    protected ObjectPoolFactory createPoolFactory() {
-        return new GenericObjectPoolFactory(null, maximumActive);
-    }
-
-    public int getIdleTimeout() {
-        return idleTimeout;
-    }
-
-    public void setIdleTimeout(int idleTimeout) {
-        this.idleTimeout = idleTimeout;
-    }
-
-    /**
-     * allow connections to expire, irrespective of load or idle time. This is useful with failover
-     * to force a reconnect from the pool, to reestablish load balancing or use of the master post recovery
-     * 
-     * @param expiryTimeout non zero in milliseconds
-     */
-    public void setExpiryTimeout(long expiryTimeout) {
-        this.expiryTimeout = expiryTimeout;   
-    }
-    
-    public long getExpiryTimeout() {
-        return expiryTimeout;
-    }
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledProducer.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledProducer.java
deleted file mode 100644
index a2f3bf6..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledProducer.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.pool;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-
-import org.apache.activemq.ActiveMQMessageProducer;
-
-/**
- * A pooled {@link MessageProducer}
- * 
- * 
- */
-public class PooledProducer implements MessageProducer {
-    private ActiveMQMessageProducer messageProducer;
-    private Destination destination;
-    private int deliveryMode;
-    private boolean disableMessageID;
-    private boolean disableMessageTimestamp;
-    private int priority;
-    private long timeToLive;
-
-    public PooledProducer(ActiveMQMessageProducer messageProducer, Destination destination) throws JMSException {
-        this.messageProducer = messageProducer;
-        this.destination = destination;
-
-        this.deliveryMode = messageProducer.getDeliveryMode();
-        this.disableMessageID = messageProducer.getDisableMessageID();
-        this.disableMessageTimestamp = messageProducer.getDisableMessageTimestamp();
-        this.priority = messageProducer.getPriority();
-        this.timeToLive = messageProducer.getTimeToLive();
-    }
-
-    public void close() throws JMSException {
-    }
-
-    public void send(Destination destination, Message message) throws JMSException {
-        send(destination, message, getDeliveryMode(), getPriority(), getTimeToLive());
-    }
-
-    public void send(Message message) throws JMSException {
-        send(destination, message, getDeliveryMode(), getPriority(), getTimeToLive());
-    }
-
-    public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
-        send(destination, message, deliveryMode, priority, timeToLive);
-    }
-
-    public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
-        if (destination == null) {
-            destination = this.destination;
-        }
-        ActiveMQMessageProducer messageProducer = getMessageProducer();
-
-        // just in case let only one thread send at once
-        synchronized (messageProducer) {
-            messageProducer.send(destination, message, deliveryMode, priority, timeToLive);
-        }
-    }
-
-    public Destination getDestination() {
-        return destination;
-    }
-
-    public int getDeliveryMode() {
-        return deliveryMode;
-    }
-
-    public void setDeliveryMode(int deliveryMode) {
-        this.deliveryMode = deliveryMode;
-    }
-
-    public boolean getDisableMessageID() {
-        return disableMessageID;
-    }
-
-    public void setDisableMessageID(boolean disableMessageID) {
-        this.disableMessageID = disableMessageID;
-    }
-
-    public boolean getDisableMessageTimestamp() {
-        return disableMessageTimestamp;
-    }
-
-    public void setDisableMessageTimestamp(boolean disableMessageTimestamp) {
-        this.disableMessageTimestamp = disableMessageTimestamp;
-    }
-
-    public int getPriority() {
-        return priority;
-    }
-
-    public void setPriority(int priority) {
-        this.priority = priority;
-    }
-
-    public long getTimeToLive() {
-        return timeToLive;
-    }
-
-    public void setTimeToLive(long timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected ActiveMQMessageProducer getMessageProducer() {
-        return messageProducer;
-    }
-
-    public String toString() {
-        return "PooledProducer { " + messageProducer + " }";
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledQueueSender.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledQueueSender.java
deleted file mode 100644
index d703dcf..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledQueueSender.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.pool;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueSender;
-
-import org.apache.activemq.ActiveMQQueueSender;
-
-/**
- * 
- */
-public class PooledQueueSender extends PooledProducer implements QueueSender {
-
-    public PooledQueueSender(ActiveMQQueueSender messageProducer, Destination destination) throws JMSException {
-        super(messageProducer, destination);
-    }
-
-    public void send(Queue queue, Message message, int i, int i1, long l) throws JMSException {
-        getQueueSender().send(queue, message, i, i1, l);
-    }
-
-    public void send(Queue queue, Message message) throws JMSException {
-        getQueueSender().send(queue, message);
-    }
-
-    public Queue getQueue() throws JMSException {
-        return getQueueSender().getQueue();
-    }
-
-
-    protected ActiveMQQueueSender getQueueSender() {
-        return (ActiveMQQueueSender) getMessageProducer();
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java
deleted file mode 100644
index 5839da9..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledSession.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/**
- * 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.pool;
-
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import javax.jms.XASession;
-import javax.jms.Session;
-import javax.transaction.xa.XAResource;
-
-import org.apache.activemq.ActiveMQMessageProducer;
-import org.apache.activemq.ActiveMQQueueSender;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.ActiveMQTopicPublisher;
-import org.apache.activemq.AlreadyClosedException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class PooledSession implements Session, TopicSession, QueueSession, XASession {
-    private static final transient Logger LOG = LoggerFactory.getLogger(PooledSession.class);
-
-    private ActiveMQSession session;
-    private SessionPool sessionPool;
-    private ActiveMQMessageProducer messageProducer;
-    private ActiveMQQueueSender queueSender;
-    private ActiveMQTopicPublisher topicPublisher;
-    private boolean transactional = true;
-    private boolean ignoreClose;
-
-    private final CopyOnWriteArrayList<MessageConsumer> consumers = new CopyOnWriteArrayList<MessageConsumer>();
-    private final CopyOnWriteArrayList<QueueBrowser> browsers = new CopyOnWriteArrayList<QueueBrowser>();
-
-    public PooledSession(ActiveMQSession aSession, SessionPool sessionPool) {
-        this.session = aSession;
-        this.sessionPool = sessionPool;
-        this.transactional = session.isTransacted();
-    }
-
-    protected boolean isIgnoreClose() {
-        return ignoreClose;
-    }
-
-    protected void setIgnoreClose(boolean ignoreClose) {
-        this.ignoreClose = ignoreClose;
-    }
-
-    public void close() throws JMSException {
-        if (!ignoreClose) {
-            // TODO a cleaner way to reset??
-
-            // lets reset the session
-            getInternalSession().setMessageListener(null);
-
-            // Close any consumers and browsers that may have been created.
-            for (Iterator<MessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
-                MessageConsumer consumer = iter.next();
-                consumer.close();
-            }
-            consumers.clear();
-
-            for (Iterator<QueueBrowser> iter = browsers.iterator(); iter.hasNext();) {
-                QueueBrowser browser = iter.next();
-                browser.close();
-            }
-            browsers.clear();
-
-            // maybe do a rollback?
-            if (transactional) {
-                try {
-                    getInternalSession().rollback();
-                } catch (JMSException e) {
-                    LOG.warn("Caught exception trying rollback() when putting session back into the pool: " + e, e);
-
-                    // lets close the session and not put the session back into
-                    // the pool
-                    try {
-                        session.close();
-                    } catch (JMSException e1) {
-                        LOG.trace("Ignoring exception as discarding session: " + e1, e1);
-                    }
-                    session = null;
-                    sessionPool.invalidateSession(this);
-                    return;
-                }
-            }
-
-            sessionPool.returnSession(this);
-        }
-    }
-
-    public void commit() throws JMSException {
-        getInternalSession().commit();
-    }
-
-    public BytesMessage createBytesMessage() throws JMSException {
-        return getInternalSession().createBytesMessage();
-    }
-
-    public MapMessage createMapMessage() throws JMSException {
-        return getInternalSession().createMapMessage();
-    }
-
-    public Message createMessage() throws JMSException {
-        return getInternalSession().createMessage();
-    }
-
-    public ObjectMessage createObjectMessage() throws JMSException {
-        return getInternalSession().createObjectMessage();
-    }
-
-    public ObjectMessage createObjectMessage(Serializable serializable) throws JMSException {
-        return getInternalSession().createObjectMessage(serializable);
-    }
-
-    public Queue createQueue(String s) throws JMSException {
-        return getInternalSession().createQueue(s);
-    }
-
-    public StreamMessage createStreamMessage() throws JMSException {
-        return getInternalSession().createStreamMessage();
-    }
-
-    public TemporaryQueue createTemporaryQueue() throws JMSException {
-        return getInternalSession().createTemporaryQueue();
-    }
-
-    public TemporaryTopic createTemporaryTopic() throws JMSException {
-        return getInternalSession().createTemporaryTopic();
-    }
-
-    public void unsubscribe(String s) throws JMSException {
-        getInternalSession().unsubscribe(s);
-    }
-
-    public TextMessage createTextMessage() throws JMSException {
-        return getInternalSession().createTextMessage();
-    }
-
-    public TextMessage createTextMessage(String s) throws JMSException {
-        return getInternalSession().createTextMessage(s);
-    }
-
-    public Topic createTopic(String s) throws JMSException {
-        return getInternalSession().createTopic(s);
-    }
-
-    public int getAcknowledgeMode() throws JMSException {
-        return getInternalSession().getAcknowledgeMode();
-    }
-
-    public boolean getTransacted() throws JMSException {
-        return getInternalSession().getTransacted();
-    }
-
-    public void recover() throws JMSException {
-        getInternalSession().recover();
-    }
-
-    public void rollback() throws JMSException {
-        getInternalSession().rollback();
-    }
-
-    public XAResource getXAResource() {
-        if (session == null) {
-            throw new IllegalStateException("Session is closed");
-        }
-        return session.getTransactionContext();
-    }
-
-    public Session getSession() {
-        return this;
-    }
-
-    public void run() {
-        if (session != null) {
-            session.run();
-        }
-    }
-
-    // Consumer related methods
-    // -------------------------------------------------------------------------
-    public QueueBrowser createBrowser(Queue queue) throws JMSException {
-        return addQueueBrowser(getInternalSession().createBrowser(queue));
-    }
-
-    public QueueBrowser createBrowser(Queue queue, String selector) throws JMSException {
-        return addQueueBrowser(getInternalSession().createBrowser(queue, selector));
-    }
-
-    public MessageConsumer createConsumer(Destination destination) throws JMSException {
-        return addConsumer(getInternalSession().createConsumer(destination));
-    }
-
-    public MessageConsumer createConsumer(Destination destination, String selector) throws JMSException {
-        return addConsumer(getInternalSession().createConsumer(destination, selector));
-    }
-
-    public MessageConsumer createConsumer(Destination destination, String selector, boolean noLocal) throws JMSException {
-        return addConsumer(getInternalSession().createConsumer(destination, selector, noLocal));
-    }
-
-    public TopicSubscriber createDurableSubscriber(Topic topic, String selector) throws JMSException {
-        return addTopicSubscriber(getInternalSession().createDurableSubscriber(topic, selector));
-    }
-
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name, String selector, boolean noLocal) throws JMSException {
-        return addTopicSubscriber(getInternalSession().createDurableSubscriber(topic, name, selector, noLocal));
-    }
-
-    public MessageListener getMessageListener() throws JMSException {
-        return getInternalSession().getMessageListener();
-    }
-
-    public void setMessageListener(MessageListener messageListener) throws JMSException {
-        getInternalSession().setMessageListener(messageListener);
-    }
-
-    public TopicSubscriber createSubscriber(Topic topic) throws JMSException {
-        return addTopicSubscriber(getInternalSession().createSubscriber(topic));
-    }
-
-    public TopicSubscriber createSubscriber(Topic topic, String selector, boolean local) throws JMSException {
-        return addTopicSubscriber(getInternalSession().createSubscriber(topic, selector, local));
-    }
-
-    public QueueReceiver createReceiver(Queue queue) throws JMSException {
-        return addQueueReceiver(getInternalSession().createReceiver(queue));
-    }
-
-    public QueueReceiver createReceiver(Queue queue, String selector) throws JMSException {
-        return addQueueReceiver(getInternalSession().createReceiver(queue, selector));
-    }
-
-    // Producer related methods
-    // -------------------------------------------------------------------------
-    public MessageProducer createProducer(Destination destination) throws JMSException {
-        return new PooledProducer(getMessageProducer(), destination);
-    }
-
-    public QueueSender createSender(Queue queue) throws JMSException {
-        return new PooledQueueSender(getQueueSender(), queue);
-    }
-
-    public TopicPublisher createPublisher(Topic topic) throws JMSException {
-        return new PooledTopicPublisher(getTopicPublisher(), topic);
-    }
-
-    public ActiveMQSession getInternalSession() throws AlreadyClosedException {
-        if (session == null) {
-            throw new AlreadyClosedException("The session has already been closed");
-        }
-        return session;
-    }
-
-    public ActiveMQMessageProducer getMessageProducer() throws JMSException {
-        if (messageProducer == null) {
-            messageProducer = (ActiveMQMessageProducer) getInternalSession().createProducer(null);
-        }
-        return messageProducer;
-    }
-
-    public ActiveMQQueueSender getQueueSender() throws JMSException {
-        if (queueSender == null) {
-            queueSender = (ActiveMQQueueSender) getInternalSession().createSender(null);
-        }
-        return queueSender;
-    }
-
-    public ActiveMQTopicPublisher getTopicPublisher() throws JMSException {
-        if (topicPublisher == null) {
-            topicPublisher = (ActiveMQTopicPublisher) getInternalSession().createPublisher(null);
-        }
-        return topicPublisher;
-    }
-
-    private QueueBrowser addQueueBrowser(QueueBrowser browser) {
-        browsers.add(browser);
-        return browser;
-    }
-
-    private MessageConsumer addConsumer(MessageConsumer consumer) {
-        consumers.add(consumer);
-        return consumer;
-    }
-
-    private TopicSubscriber addTopicSubscriber(TopicSubscriber subscriber) {
-        consumers.add(subscriber);
-        return subscriber;
-    }
-
-    private QueueReceiver addQueueReceiver(QueueReceiver receiver) {
-        consumers.add(receiver);
-        return receiver;
-    }
-
-    public String toString() {
-        return "PooledSession { " + session + " }";
-    }
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledTopicPublisher.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledTopicPublisher.java
deleted file mode 100644
index 09fd57b..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledTopicPublisher.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.pool;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-
-import org.apache.activemq.ActiveMQTopicPublisher;
-
-/**
- * 
- */
-public class PooledTopicPublisher extends PooledProducer implements TopicPublisher {
-
-    public PooledTopicPublisher(ActiveMQTopicPublisher messageProducer, Destination destination) throws JMSException {
-        super(messageProducer, destination);
-    }
-
-    public Topic getTopic() throws JMSException {
-        return getTopicPublisher().getTopic();
-    }
-
-    public void publish(Message message) throws JMSException {
-        getTopicPublisher().publish((Topic) getDestination(), message);
-    }
-
-    public void publish(Message message, int i, int i1, long l) throws JMSException {
-        getTopicPublisher().publish((Topic) getDestination(), message, i, i1, l);
-    }
-
-    public void publish(Topic topic, Message message) throws JMSException {
-        getTopicPublisher().publish(topic, message);
-    }
-
-    public void publish(Topic topic, Message message, int i, int i1, long l) throws JMSException {
-        getTopicPublisher().publish(topic, message, i, i1, l);
-    }
-
-    protected ActiveMQTopicPublisher getTopicPublisher() {
-        return (ActiveMQTopicPublisher) getMessageProducer();
-    }
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionKey.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionKey.java
deleted file mode 100644
index 06185c3..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionKey.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.pool;
-
-/**
- * A cache key for the session details
- *
- * 
- */
-public class SessionKey {
-    private boolean transacted;
-    private int ackMode;
-    private int hash;
-
-    public SessionKey(boolean transacted, int ackMode) {
-        this.transacted = transacted;
-        this.ackMode = ackMode;
-        hash = ackMode;
-        if (transacted) {
-            hash = 31 * hash + 1;
-        }
-    }
-
-    public int hashCode() {
-        return hash;
-    }
-
-    public boolean equals(Object that) {
-        if (this == that) {
-            return true;
-        }
-        if (that instanceof SessionKey) {
-            return equals((SessionKey) that);
-        }
-        return false;
-    }
-
-    public boolean equals(SessionKey that) {
-        return this.transacted == that.transacted && this.ackMode == that.ackMode;
-    }
-
-    public boolean isTransacted() {
-        return transacted;
-    }
-
-    public int getAckMode() {
-        return ackMode;
-    }
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java
deleted file mode 100644
index 626056a..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/SessionPool.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.pool;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.AlreadyClosedException;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.PoolableObjectFactory;
-
-/**
- * Represents the session pool for a given JMS connection.
- * 
- * 
- */
-public class SessionPool implements PoolableObjectFactory {
-    private ConnectionPool connectionPool;
-    private SessionKey key;
-    private ObjectPool sessionPool;
-
-    public SessionPool(ConnectionPool connectionPool, SessionKey key, ObjectPool sessionPool) {
-        this.connectionPool = connectionPool;
-        this.key = key;
-        this.sessionPool = sessionPool;
-        sessionPool.setFactory(this);
-    }
-
-    public void close() throws Exception {
-        if (sessionPool != null) {
-            sessionPool.close();
-        }
-        sessionPool = null;
-    }
-
-    public PooledSession borrowSession() throws JMSException {
-        try {
-            Object object = getSessionPool().borrowObject();
-            return (PooledSession)object;
-        } catch (JMSException e) {
-            throw e;
-        } catch (Exception e) {
-            throw JMSExceptionSupport.create(e);
-        }
-    }
-
-    public void returnSession(PooledSession session) throws JMSException {
-        // lets check if we are already closed
-        getConnection();
-        try {
-            getSessionPool().returnObject(session);
-        } catch (Exception e) {
-            throw JMSExceptionSupport.create("Failed to return session to pool: " + e, e);
-        }
-    }
-    
-    public void invalidateSession(PooledSession session) throws JMSException {
-        try {
-            getSessionPool().invalidateObject(session);
-        } catch (Exception e) {
-            throw JMSExceptionSupport.create("Failed to invalidate session: " + e, e);
-        }
-    }
-         
-
-    // PoolableObjectFactory methods
-    // -------------------------------------------------------------------------
-    public Object makeObject() throws Exception {
-        return new PooledSession(createSession(), this);
-    }
-
-    public void destroyObject(Object o) throws Exception {
-        PooledSession session = (PooledSession)o;
-        session.getInternalSession().close();
-    }
-
-    public boolean validateObject(Object o) {
-        return true;
-    }
-
-    public void activateObject(Object o) throws Exception {
-    }
-
-    public void passivateObject(Object o) throws Exception {
-    }
-
-    // Implemention methods
-    // -------------------------------------------------------------------------
-    protected ObjectPool getSessionPool() throws AlreadyClosedException {
-        if (sessionPool == null) {
-            throw new AlreadyClosedException();
-        }
-        return sessionPool;
-    }
-
-    protected ActiveMQConnection getConnection() throws JMSException {
-        return connectionPool.getConnection();
-    }
-
-    protected ActiveMQSession createSession() throws JMSException {
-        return (ActiveMQSession)getConnection().createSession(key.isTransacted(), key.getAckMode());
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java
deleted file mode 100644
index 06a762f..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.pool;
-
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-import javax.transaction.TransactionManager;
-import javax.transaction.xa.XAResource;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.commons.pool.ObjectPoolFactory;
-
-/**
- * An XA-aware connection pool.  When a session is created and an xa transaction is active,
- * the session will automatically be enlisted in the current transaction.
- * 
- * @author gnodet
- */
-public class XaConnectionPool extends ConnectionPool {
-
-    private TransactionManager transactionManager;
-
-    public XaConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory, TransactionManager transactionManager) {
-        super(connection, poolFactory);
-        this.transactionManager = transactionManager;
-    }
-
-    public Session createSession(boolean transacted, int ackMode) throws JMSException {
-        try {
-            boolean isXa = (transactionManager != null && transactionManager.getStatus() != Status.STATUS_NO_TRANSACTION);
-            if (isXa) {
-                transacted = true;
-                ackMode = Session.SESSION_TRANSACTED;
-            }
-            PooledSession session = (PooledSession) super.createSession(transacted, ackMode);
-            if (isXa) {
-                session.setIgnoreClose(true);
-                transactionManager.getTransaction().registerSynchronization(new Synchronization(session));
-                incrementReferenceCount();
-                transactionManager.getTransaction().enlistResource(createXaResource(session));
-            }
-            return session;
-        } catch (RollbackException e) {
-            final JMSException jmsException = new JMSException("Rollback Exception");
-            jmsException.initCause(e);
-            throw jmsException;
-        } catch (SystemException e) {
-            final JMSException jmsException = new JMSException("System Exception");
-            jmsException.initCause(e);
-            throw jmsException;
-        }
-    }
-
-    protected XAResource createXaResource(PooledSession session) throws JMSException {
-        return session.getXAResource();
-    }
-    
-    
-    protected class Synchronization implements javax.transaction.Synchronization {
-        private final PooledSession session;
-
-        private Synchronization(PooledSession session) {
-            this.session = session;
-        }
-
-        public void beforeCompletion() {
-        }
-        
-        public void afterCompletion(int status) {
-            try {
-                // This will return session to the pool.
-                session.setIgnoreClose(false);
-                session.close();
-                decrementReferenceCount();
-            } catch (JMSException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-    
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaPooledConnectionFactory.java b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaPooledConnectionFactory.java
deleted file mode 100644
index f41644d..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaPooledConnectionFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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.pool;
-
-import javax.transaction.TransactionManager;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * A pooled connection factory that automatically enlists
- * sessions in the current active XA transaction if any.
- */
-public class XaPooledConnectionFactory extends PooledConnectionFactory {
-
-    private TransactionManager transactionManager;
-    
-    public XaPooledConnectionFactory() {
-        super();
-    }
-
-    public XaPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory) {
-        super(connectionFactory);
-    }
-
-    public XaPooledConnectionFactory(String brokerURL) {
-        super(brokerURL);
-    }
-
-    public TransactionManager getTransactionManager() {
-        return transactionManager;
-    }
-
-    public void setTransactionManager(TransactionManager transactionManager) {
-        this.transactionManager = transactionManager;
-    }
-
-    protected ConnectionPool createConnectionPool(ActiveMQConnection connection) {
-        return new XaConnectionPool(connection, getPoolFactory(), getTransactionManager());
-    }
-
-}
diff --git a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/package.html b/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/package.html
deleted file mode 100755
index 8eb8f0c..0000000
--- a/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/package.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-A JMS provider which pools Connection, Session and MessageProducer instances so it can be used with tools like 
-Spring's <a href="http://activemq.org/Spring+Support">JmsTemplate</a>. <b>Note</b> that this package
-does not deal with pooling of consumers; for that look at a library like <a href="http://jencks.org/">Jencks</a>
-such as in <a href="http://jencks.org/Message+Driven+POJOs">this example</a>
-
-</body>
-</html>
diff --git a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionExpiryEvictsFromPoolTest.java b/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionExpiryEvictsFromPoolTest.java
deleted file mode 100644
index 860b4f4..0000000
--- a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionExpiryEvictsFromPoolTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.pool;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.test.TestSupport;
-
-public class ConnectionExpiryEvictsFromPoolTest extends TestSupport {
-
-    private BrokerService broker;
-    private ActiveMQConnectionFactory factory;
-    private PooledConnectionFactory pooledFactory;
-
-    protected void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        TransportConnector connector = broker.addConnector("tcp://localhost:0");
-        broker.start();
-        factory = new ActiveMQConnectionFactory("mock:" + connector.getConnectUri());
-        pooledFactory = new PooledConnectionFactory(factory);
-        pooledFactory.setMaxConnections(1);
-    }
-
-    public void testEvictionOfIdle() throws Exception {
-        pooledFactory.setIdleTimeout(10);
-        PooledConnection connection = (PooledConnection) pooledFactory.createConnection();
-        ActiveMQConnection amq1 = connection.getConnection();
-        
-        connection.close();
-        // let it idle timeout
-        TimeUnit.SECONDS.sleep(1);
-        
-        PooledConnection connection2 = (PooledConnection) pooledFactory.createConnection();
-        ActiveMQConnection amq2 = connection2.getConnection();
-        assertTrue("not equal", !amq1.equals(amq2));
-    }
-    
-    
-    public void testEvictionOfExpired() throws Exception {
-        pooledFactory.setExpiryTimeout(10);
-        Connection connection = pooledFactory.createConnection();
-        ActiveMQConnection amq1 = ((PooledConnection) connection).getConnection();
-        
-        // let it expire while in use
-        TimeUnit.SECONDS.sleep(1);
-        connection.close();
-        
-        Connection connection2 = pooledFactory.createConnection();
-        ActiveMQConnection amq2 = ((PooledConnection) connection2).getConnection();
-        assertTrue("not equal", !amq1.equals(amq2));
-    }
-    
-    
-    protected void tearDown() throws Exception {
-        broker.stop();
-    }
-}
diff --git a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionFailureEvictsFromPoolTest.java b/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionFailureEvictsFromPoolTest.java
deleted file mode 100644
index c338fa4..0000000
--- a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/ConnectionFailureEvictsFromPoolTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.pool;
-
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.test.TestSupport;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.mock.MockTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConnectionFailureEvictsFromPoolTest extends TestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(ConnectionFailureEvictsFromPoolTest.class);
-    private BrokerService broker;
-    private ActiveMQConnectionFactory factory;
-    private PooledConnectionFactory pooledFactory;
-
-    protected void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        TransportConnector connector = broker.addConnector("tcp://localhost:0");
-        broker.start();
-        factory = new ActiveMQConnectionFactory("mock:" + connector.getConnectUri() + "?closeAsync=false");
-        pooledFactory = new PooledConnectionFactory(factory);
-    }
-
-    public void testEviction() throws Exception {
-        PooledConnection connection = (PooledConnection) pooledFactory.createConnection();
-        ActiveMQConnection amqC = connection.getConnection();
-        final CountDownLatch gotExceptionEvent = new CountDownLatch(1);
-        amqC.addTransportListener(new TransportListener() {
-            public void onCommand(Object command) {
-            }
-            public void onException(IOException error) {
-                // we know connection is dead...
-                // listeners are fired async
-                gotExceptionEvent.countDown();
-            }
-            public void transportInterupted() {
-            }
-            public void transportResumed() {
-            }
-        });
-        
-        sendMessage(connection);
-        LOG.info("sent one message worked fine");
-        createConnectionFailure(connection);
-        try {
-            sendMessage(connection);
-            fail("Expected Error");
-        } catch (JMSException e) {
-        } finally {
-            connection.close();
-        }
-        assertTrue("exception event propagated ok", gotExceptionEvent.await(5, TimeUnit.SECONDS));
-        // If we get another connection now it should be a new connection that
-        // works.
-        LOG.info("expect new connection after failure");
-        Connection connection2 = pooledFactory.createConnection();
-        sendMessage(connection2);
-    }
-
-    private void createConnectionFailure(Connection connection) throws Exception {
-        ActiveMQConnection c = ((PooledConnection)connection).getConnection();
-        MockTransport t = (MockTransport)c.getTransportChannel().narrow(MockTransport.class);
-        t.onException(new IOException("forcing exception for " + getName() + " to force pool eviction"));
-        LOG.info("arranged for failure, chucked exception");
-    }
-
-    private void sendMessage(Connection connection) throws JMSException {
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("FOO"));
-        producer.send(session.createTextMessage("Test"));
-        session.close();
-    }
-
-    protected void tearDown() throws Exception {
-        broker.stop();
-    }
-}
diff --git a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java b/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java
deleted file mode 100755
index 79ccdd0..0000000
--- a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.pool;
-
-import javax.jms.Connection;
-
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
-
-/**
- * 
- */
-public class JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
-
-    protected PooledConnectionFactory senderConnectionFactory = new PooledConnectionFactory("vm://localhost?broker.persistent=false");
-
-    protected Connection createSendConnection() throws Exception {
-        return senderConnectionFactory.createConnection();
-    }
-
-    protected void setUp() throws Exception {
-        verbose = true;
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        senderConnectionFactory.stop();
-    }
-
-}
diff --git a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledTopicPublisherTest.java b/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledTopicPublisherTest.java
deleted file mode 100644
index 32d209c..0000000
--- a/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledTopicPublisherTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.pool;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.jms.TopicConnection;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.test.TestSupport;
-import org.apache.activemq.util.SocketProxy;
-
-/**
- * 
- */
-public class PooledTopicPublisherTest extends TestSupport {
-
-    private TopicConnection connection;
-
-    public void testPooledConnectionFactory() throws Exception {
-        ActiveMQTopic topic = new ActiveMQTopic("test");
-        PooledConnectionFactory pcf = new PooledConnectionFactory();
-        pcf.setConnectionFactory(new ActiveMQConnectionFactory("vm://test"));
-
-        connection = (TopicConnection) pcf.createConnection();
-        TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-        TopicPublisher publisher = session.createPublisher(topic);
-        publisher.publish(session.createMessage());
-    }
-
-    
-    public void testSetGetExceptionListener() throws Exception {
-        PooledConnectionFactory pcf = new PooledConnectionFactory();
-        pcf.setConnectionFactory(new ActiveMQConnectionFactory("vm://test"));
-
-        connection = (TopicConnection) pcf.createConnection();
-        ExceptionListener listener = new ExceptionListener() {
-            public void onException(JMSException exception) {
-            }
-        };
-        connection.setExceptionListener(listener);
-        assertEquals(listener, connection.getExceptionListener());
-    }
-    
-    public void testPooledConnectionAfterInactivity() throws Exception {
-        BrokerService broker = new BrokerService();
-        TransportConnector networkConnector = broker.addConnector("tcp://localhost:0");
-        broker.setPersistent(false);
-        broker.setUseJmx(false);
-        broker.start();
-        
-        SocketProxy proxy = new SocketProxy(networkConnector.getConnectUri());
-        
-        PooledConnectionFactory pcf = new PooledConnectionFactory();
-        String uri = proxy.getUrl().toString() + "?trace=true&wireFormat.maxInactivityDuration=500&wireFormat.maxInactivityDurationInitalDelay=500";
-        pcf.setConnectionFactory(new ActiveMQConnectionFactory(uri));
-        
-        PooledConnection conn =  (PooledConnection) pcf.createConnection();
-        ActiveMQConnection amq = conn.getConnection();
-        final CountDownLatch gotException = new CountDownLatch(1);
-        //amq.set
-        conn.setExceptionListener(new ExceptionListener() {
-            public void onException(JMSException exception) {
-                gotException.countDown();
-            }});
-        conn.setClientID(getName());
-        
-        // let it hang, simulate a server hang so inactivity timeout kicks in
-        proxy.pause();
-        //assertTrue("got an exception", gotException.await(5, TimeUnit.SECONDS));
-        TimeUnit.SECONDS.sleep(2);
-        conn.close();
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-        if (connection != null) {
-            connection.close();
-            connection = null;
-        }
-    }
-}
diff --git a/trunk/activemq-pool/src/test/resources/activemq-spring-jdbc.xml b/trunk/activemq-pool/src/test/resources/activemq-spring-jdbc.xml
deleted file mode 100644
index e406d69..0000000
--- a/trunk/activemq-pool/src/test/resources/activemq-spring-jdbc.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="target/" useJmx="false" deleteAllMessagesOnStartup="true">
-         
-        <persistenceAdapter>
-            <jdbcPersistenceAdapter dataSource="#derby-ds" dataDirectory="target/"/>
-        </persistenceAdapter>
-        
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" memoryLimit="10240"/>
-                    <policyEntry topic=">" memoryLimit="10240">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-        
-        
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="102400"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
-        </transportConnectors>
-    </broker>
-
-
-    <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-      <property name="databaseName" value="derbydb"/>
-      <property name="createDatabase" value="create"/>
-    </bean>
-
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/activemq-pool/src/test/resources/log4j.properties b/trunk/activemq-pool/src/test/resources/log4j.properties
deleted file mode 100755
index 9d67ba1..0000000
--- a/trunk/activemq-pool/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.spring=WARN
-#log4j.logger.org.apache.activemq.usecases=DEBUG
-#log4j.logger.org.apache.activemq.broker.region=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
diff --git a/trunk/activemq-ra/pom.xml b/trunk/activemq-ra/pom.xml
deleted file mode 100755
index eeb2ad1..0000000
--- a/trunk/activemq-ra/pom.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-ra</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: RA</name>
-  <description>A JCA Resource Adapter used to integrate ActiveMQ with transactional enterprise containers</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-      javax.resource*;resolution:=optional,
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.activemq.ra*;version=${project.version};-noimport:=true,
-    </activemq.osgi.export>
-  </properties>
-
-  <dependencies>
-
-    <!-- activemq -->
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-core</artifactId>
-      <version>${project.version}</version>
-      <classifier>tests</classifier>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jmock</groupId>
-      <artifactId>jmock-junit4</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jmock</groupId>
-      <artifactId>jmock-legacy</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>maven-xbean-plugin</artifactId>
-        <version>${xbean-version}</version>
-        <executions>
-          <execution>
-            <configuration>
-              <namespace>http://activemq.apache.org/schema/ra</namespace>
-            </configuration>
-            <goals>
-              <goal>mapping</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <!--  lets ensure that the XSD gets deployed  -->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-artifacts</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attach-artifact</goal>
-            </goals>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>${basedir}/target/xbean/activemq-ra.xsd</file>
-                  <type>xsd</type>
-                </artifact>
-                <artifact>
-                  <file>${basedir}/target/xbean/activemq-ra.xsd.html</file>
-                  <type>xsd.html</type>
-                </artifact>
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <!-- Configure which tests are included/excuded -->
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>pertest</forkMode>
-          <childDelegation>false</childDelegation>
-          <useFile>true</useFile>
-          <includes>
-            <!--
-            <include>org.apache.activemq.ra.ServerSessionImplTest</include>
-            -->
-            <include>**/*Test.*</include>
-          </includes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-
-</project>
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
deleted file mode 100644
index 9f6b8d5..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
+++ /dev/null
@@ -1,668 +0,0 @@
-/**
- * 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.ra;
-
-import java.beans.IntrospectionException;
-import java.beans.PropertyDescriptor;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.resource.ResourceException;
-import javax.resource.spi.InvalidPropertyException;
-import javax.resource.spi.ResourceAdapter;
-
-import org.apache.activemq.RedeliveryPolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.selector.SelectorParser;
-
-/**
- * Configures the inbound JMS consumer specification using ActiveMQ
- * 
- * @org.apache.xbean.XBean element="activationSpec"
- *  $Date: 2007-08-11 17:29:21 -0400 (Sat, 11 Aug
- *          2007) $
- */
-public class ActiveMQActivationSpec implements MessageActivationSpec, Serializable {
-
-    /** Auto-acknowledge constant for <code>acknowledgeMode</code> property * */
-    public static final String AUTO_ACKNOWLEDGE_MODE = "Auto-acknowledge";
-    /** Dups-ok-acknowledge constant for <code>acknowledgeMode</code> property * */
-    public static final String DUPS_OK_ACKNOWLEDGE_MODE = "Dups-ok-acknowledge";
-    /** Durable constant for <code>subscriptionDurability</code> property * */
-    public static final String DURABLE_SUBSCRIPTION = "Durable";
-    /** NonDurable constant for <code>subscriptionDurability</code> property * */
-    public static final String NON_DURABLE_SUBSCRIPTION = "NonDurable";
-    public static final int INVALID_ACKNOWLEDGE_MODE = -1;
-
-    private static final long serialVersionUID = -7153087544100459975L;
-
-    private transient MessageResourceAdapter resourceAdapter;
-    private String destinationType;
-    private String messageSelector;
-    private String destination;
-    private String acknowledgeMode = AUTO_ACKNOWLEDGE_MODE;
-    private String userName;
-    private String password;
-    private String clientId;
-    private String subscriptionName;
-    private String subscriptionDurability = NON_DURABLE_SUBSCRIPTION;
-    private String noLocal = "false";
-    private String useRAManagedTransaction = "false";
-    private String maxSessions = "10";
-    private String maxMessagesPerSessions = "10";
-    private String enableBatch = "false";
-    private String maxMessagesPerBatch = "10";
-    private RedeliveryPolicy redeliveryPolicy;
-
-    /**
-     * @see javax.resource.spi.ActivationSpec#validate()
-     */
-    public void validate() throws InvalidPropertyException {
-        List<String> errorMessages = new ArrayList<String>();
-        List<PropertyDescriptor> propsNotSet = new ArrayList<PropertyDescriptor>();
-        try {
-            if (!isValidDestination(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("destination", ActiveMQActivationSpec.class));
-            }
-            if (!isValidDestinationType(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("destinationType", ActiveMQActivationSpec.class));
-            }
-            if (!isValidAcknowledgeMode(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("acknowledgeMode", ActiveMQActivationSpec.class));
-            }
-            if (!isValidSubscriptionDurability(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("subscriptionDurability", ActiveMQActivationSpec.class));
-            }
-            if (!isValidClientId(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("clientId", ActiveMQActivationSpec.class));
-            }
-            if (!isValidSubscriptionName(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("subscriptionName", ActiveMQActivationSpec.class));
-            }
-            if (!isValidMaxMessagesPerSessions(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("maxMessagesPerSessions", ActiveMQActivationSpec.class));
-            }
-            if (!isValidMaxSessions(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("maxSessions", ActiveMQActivationSpec.class));
-            }
-            if (!isValidMessageSelector(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("messageSelector", ActiveMQActivationSpec.class));
-            }
-            if (!isValidNoLocal(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("noLocal", ActiveMQActivationSpec.class));
-            }
-            if (!isValidUseRAManagedTransaction(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("useRAManagedTransaction", ActiveMQActivationSpec.class));
-            }
-            if (!isValidEnableBatch(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("enableBatch", ActiveMQActivationSpec.class));
-            }
-            if (!isValidMaxMessagesPerBatch(errorMessages)) {
-                propsNotSet.add(new PropertyDescriptor("maxMessagesPerBatch", ActiveMQActivationSpec.class));
-            }
-
-        } catch (IntrospectionException e) {
-            e.printStackTrace();
-        }
-
-        if (propsNotSet.size() > 0) {
-            StringBuffer b = new StringBuffer();
-            b.append("Invalid settings:");
-            for (Iterator<String> iter = errorMessages.iterator(); iter.hasNext();) {
-                b.append(" ");
-                b.append(iter.next());
-            }
-            InvalidPropertyException e = new InvalidPropertyException(b.toString());
-            final PropertyDescriptor[] descriptors = propsNotSet.toArray(new PropertyDescriptor[propsNotSet.size()]);
-            e.setInvalidPropertyDescriptors(descriptors);
-            throw e;
-        }
-    }
-
-    public boolean isValidUseRAManagedTransaction(List<String> errorMessages) {
-        try {
-            new Boolean(useRAManagedTransaction);
-            return true;
-        } catch (Throwable e) {
-            //
-        }
-        errorMessages.add("useRAManagedTransaction must be set to: true or false.");
-        return false;
-    }
-
-    public boolean isValidNoLocal(List<String> errorMessages) {
-        try {
-            new Boolean(noLocal);
-            return true;
-        } catch (Throwable e) {
-            //
-        }
-        errorMessages.add("noLocal must be set to: true or false.");
-        return false;
-    }
-
-    public boolean isValidMessageSelector(List<String> errorMessages) {
-        try {
-            if (!isEmpty(messageSelector)) {
-                SelectorParser.parse(messageSelector);
-            }
-            return true;
-        } catch (Throwable e) {
-            errorMessages.add("messageSelector not set to valid message selector: " + e);
-            return false;
-        }
-    }
-
-    public boolean isValidMaxSessions(List<String> errorMessages) {
-        try {
-            if (Integer.parseInt(maxSessions) > 0) {
-                return true;
-            }
-        } catch (NumberFormatException e) {
-            //
-        }
-        errorMessages.add("maxSessions must be set to number > 0");
-        return false;
-    }
-
-    public boolean isValidMaxMessagesPerSessions(List<String> errorMessages) {
-        try {
-            if (Integer.parseInt(maxMessagesPerSessions) > 0) {
-                return true;
-            }
-        } catch (NumberFormatException e) {
-            //
-        }
-        errorMessages.add("maxMessagesPerSessions must be set to number > 0");
-        return false;
-    }
-
-    public boolean isValidMaxMessagesPerBatch(List<String> errorMessages) {
-        try {
-            if (Integer.parseInt(maxMessagesPerBatch) > 0) {
-                return true;
-            }
-        } catch (NumberFormatException e) {
-            //
-        }
-        errorMessages.add("maxMessagesPerBatch must be set to number > 0");
-        return false;
-    }
-
-    public boolean isValidEnableBatch(List<String> errorMessages) {
-        try {
-            new Boolean(enableBatch);
-            return true;
-        } catch (Throwable e) {
-            //
-        }
-        errorMessages.add("enableBatch must be set to: true or false");
-        return false;
-    }
-
-    public ResourceAdapter getResourceAdapter() {
-        return resourceAdapter;
-    }
-
-    /**
-     * @see javax.resource.spi.ResourceAdapterAssociation#setResourceAdapter(javax.resource.spi.ResourceAdapter)
-     */
-    public void setResourceAdapter(ResourceAdapter resourceAdapter) throws ResourceException {
-        // spec section 5.3.3
-        if (this.resourceAdapter != null) {
-            throw new ResourceException("ResourceAdapter already set");
-        }
-        if (!(resourceAdapter instanceof MessageResourceAdapter)) {
-            throw new ResourceException("ResourceAdapter is not of type: " + MessageResourceAdapter.class.getName());
-        }
-        this.resourceAdapter = (MessageResourceAdapter)resourceAdapter;
-    }
-
-    // ///////////////////////////////////////////////////////////////////////
-    //
-    // Java Bean getters and setters for this ActivationSpec class.
-    //
-    // ///////////////////////////////////////////////////////////////////////
-    public String getDestinationType() {
-        if (!isEmpty(destinationType)) {
-            return destinationType;
-        }
-        return null;
-    }
-
-    /**
-     * @param destinationType The destinationType to set.
-     */
-    public void setDestinationType(String destinationType) {
-        this.destinationType = destinationType;
-    }
-
-    public String getPassword() {
-        if (!isEmpty(password)) {
-            return password;
-        }
-        return null;
-    }
-
-    /**
-     * 
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getUserName() {
-        if (!isEmpty(userName)) {
-            return userName;
-        }
-        return null;
-    }
-
-    /**
-     * 
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getMessageSelector() {
-        if (!isEmpty(messageSelector)) {
-            return messageSelector;
-        }
-        return null;
-    }
-
-    /**
-     * @param messageSelector The messageSelector to set.
-     */
-    public void setMessageSelector(String messageSelector) {
-        this.messageSelector = messageSelector;
-    }
-
-    public String getNoLocal() {
-        return noLocal;
-    }
-
-    /**
-     * @param noLocal The noLocal to set.
-     */
-    public void setNoLocal(String noLocal) {
-        if (noLocal != null) {
-            this.noLocal = noLocal;
-        }
-    }
-
-    public String getAcknowledgeMode() {
-        if (!isEmpty(acknowledgeMode)) {
-            return acknowledgeMode;
-        }
-        return null;
-    }
-
-    /**
-     * 
-     */
-    public void setAcknowledgeMode(String acknowledgeMode) {
-        this.acknowledgeMode = acknowledgeMode;
-    }
-
-    public String getClientId() {
-        if (!isEmpty(clientId)) {
-            return clientId;
-        }
-        return null;
-    }
-
-    /**
-     * 
-     */
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public String getDestination() {
-        if (!isEmpty(destination)) {
-            return destination;
-        }
-        return null;
-    }
-
-    /**
-     * 
-     */
-    public void setDestination(String destination) {
-        this.destination = destination;
-    }
-
-    public String getSubscriptionDurability() {
-        if (!isEmpty(subscriptionDurability)) {
-            return subscriptionDurability;
-        }
-        return null;
-    }
-
-    /**
-     * 
-     */
-    public void setSubscriptionDurability(String subscriptionDurability) {
-        this.subscriptionDurability = subscriptionDurability;
-    }
-
-    public String getSubscriptionName() {
-        if (!isEmpty(subscriptionName)) {
-            return subscriptionName;
-        }
-        return null;
-    }
-
-    /**
-     * 
-     */
-    public void setSubscriptionName(String subscriptionName) {
-        this.subscriptionName = subscriptionName;
-    }
-
-    public boolean isValidSubscriptionName(List<String> errorMessages) {
-        if (!isDurableSubscription() ? true : subscriptionName != null && subscriptionName.trim().length() > 0) {
-            return true;
-        }
-        errorMessages.add("subscriptionName must be set since durable subscription was requested.");
-        return false;
-    }
-
-    public boolean isValidClientId(List<String> errorMessages) {
-        if (!isDurableSubscription() ? true : clientId != null && clientId.trim().length() > 0) {
-            return true;
-        }
-        errorMessages.add("clientId must be set since durable subscription was requested.");
-        return false;
-    }
-
-    public boolean isDurableSubscription() {
-        return DURABLE_SUBSCRIPTION.equals(subscriptionDurability);
-    }
-
-    public boolean isValidSubscriptionDurability(List<String> errorMessages) {
-        // subscriptionDurability only applies to Topics
-        if (DURABLE_SUBSCRIPTION.equals(subscriptionDurability) && getDestinationType() != null && !Topic.class.getName().equals(getDestinationType())) {
-            errorMessages.add("subscriptionDurability cannot be set to: " + DURABLE_SUBSCRIPTION + " when destinationType is set to " + Queue.class.getName()
-                              + " as it is only valid when destinationType is set to " + Topic.class.getName() + ".");
-            return false;
-        }
-        if (NON_DURABLE_SUBSCRIPTION.equals(subscriptionDurability) || DURABLE_SUBSCRIPTION.equals(subscriptionDurability)) {
-            return true;
-        }
-        errorMessages.add("subscriptionDurability must be set to: " + NON_DURABLE_SUBSCRIPTION + " or " + DURABLE_SUBSCRIPTION + ".");
-        return false;
-    }
-
-    public boolean isValidAcknowledgeMode(List<String> errorMessages) {
-        if (AUTO_ACKNOWLEDGE_MODE.equals(acknowledgeMode) || DUPS_OK_ACKNOWLEDGE_MODE.equals(acknowledgeMode)) {
-            return true;
-        }
-        errorMessages.add("acknowledgeMode must be set to: " + AUTO_ACKNOWLEDGE_MODE + " or " + DUPS_OK_ACKNOWLEDGE_MODE + ".");
-        return false;
-    }
-
-    public boolean isValidDestinationType(List<String> errorMessages) {
-        if (Queue.class.getName().equals(destinationType) || Topic.class.getName().equals(destinationType)) {
-            return true;
-        }
-        errorMessages.add("destinationType must be set to: " + Queue.class.getName() + " or " + Topic.class.getName() + ".");
-        return false;
-    }
-
-    public boolean isValidDestination(List<String> errorMessages) {
-        if (!(destination == null || destination.equals(""))) {
-            return true;
-        }
-        errorMessages.add("destination is a required field and must be set to the destination name.");
-        return false;
-    }
-
-    public boolean isEmpty(String value) {
-        return value == null || "".equals(value.trim());
-    }
-
-    /**
-     * 
-     */
-    @Override
-    public String toString() {
-        return "ActiveMQActivationSpec{" + "acknowledgeMode='" + acknowledgeMode + "'" + ", destinationType='" + destinationType + "'" + ", messageSelector='" + messageSelector + "'"
-               + ", destination='" + destination + "'" + ", clientId='" + clientId + "'" + ", subscriptionName='" + subscriptionName + "'" + ", subscriptionDurability='" + subscriptionDurability
-               + "'" + "}";
-    }
-
-    public int getAcknowledgeModeForSession() {
-        if (AUTO_ACKNOWLEDGE_MODE.equals(acknowledgeMode)) {
-            return Session.AUTO_ACKNOWLEDGE;
-        } else if (DUPS_OK_ACKNOWLEDGE_MODE.equals(acknowledgeMode)) {
-            return Session.DUPS_OK_ACKNOWLEDGE;
-        } else {
-            return INVALID_ACKNOWLEDGE_MODE;
-        }
-    }
-
-    /**
-     * A helper method mostly for use in Dependency Injection containers which
-     * allows you to customize the destination and destinationType properties
-     * from a single ActiveMQDestination POJO
-     */
-    public void setActiveMQDestination(ActiveMQDestination destination) {
-        setDestination(destination.getPhysicalName());
-        if (destination instanceof Queue) {
-            setDestinationType(Queue.class.getName());
-        } else {
-            setDestinationType(Topic.class.getName());
-        }
-    }
-
-    /**
-     * 
-     */
-    public ActiveMQDestination createDestination() {
-        if (isEmpty(destinationType) || isEmpty(destination)) {
-            return null;
-        }
-
-        ActiveMQDestination dest = null;
-        if (Queue.class.getName().equals(destinationType)) {
-            dest = new ActiveMQQueue(destination);
-        } else if (Topic.class.getName().equals(destinationType)) {
-            dest = new ActiveMQTopic(destination);
-        } else {
-            assert false : "Execution should never reach here";
-        }
-        return dest;
-    }
-
-    public String getMaxMessagesPerSessions() {
-        return maxMessagesPerSessions;
-    }
-
-    /**
-     * 
-     */
-    public void setMaxMessagesPerSessions(String maxMessagesPerSessions) {
-        if (maxMessagesPerSessions != null) {
-            this.maxMessagesPerSessions = maxMessagesPerSessions;
-        }
-    }
-
-    public String getMaxSessions() {
-        return maxSessions;
-    }
-
-    /**
-     * 
-     */
-    public void setMaxSessions(String maxSessions) {
-        if (maxSessions != null) {
-            this.maxSessions = maxSessions;
-        }
-    }
-
-    public String getUseRAManagedTransaction() {
-        return useRAManagedTransaction;
-    }
-
-    /**
-     * 
-     */
-    public void setUseRAManagedTransaction(String useRAManagedTransaction) {
-        if (useRAManagedTransaction != null) {
-            this.useRAManagedTransaction = useRAManagedTransaction;
-        }
-    }
-
-    public int getMaxMessagesPerSessionsIntValue() {
-        return Integer.parseInt(maxMessagesPerSessions);
-    }
-
-    public int getMaxSessionsIntValue() {
-        return Integer.parseInt(maxSessions);
-    }
-
-    public boolean isUseRAManagedTransactionEnabled() {
-        return Boolean.valueOf(useRAManagedTransaction).booleanValue();
-    }
-
-    public boolean getNoLocalBooleanValue() {
-        return Boolean.valueOf(noLocal).booleanValue();
-    }
-
-    public String getEnableBatch() {
-        return enableBatch;
-    }
-
-    /**
-     * 
-     */
-    public void setEnableBatch(String enableBatch) {
-        if (enableBatch != null) {
-            this.enableBatch = enableBatch;
-        }
-    }
-
-    public boolean getEnableBatchBooleanValue() {
-        return Boolean.valueOf(enableBatch).booleanValue();
-    }
-
-    public int getMaxMessagesPerBatchIntValue() {
-        return Integer.parseInt(maxMessagesPerBatch);
-    }
-
-    public String getMaxMessagesPerBatch() {
-        return maxMessagesPerBatch;
-    }
-
-    /**
-     * 
-     */
-    public void setMaxMessagesPerBatch(String maxMessagesPerBatch) {
-        if (maxMessagesPerBatch != null) {
-            this.maxMessagesPerBatch = maxMessagesPerBatch;
-        }
-    }
-
-    public double getBackOffMultiplier() {
-        if (redeliveryPolicy == null) {
-            return 0;
-        }
-        return redeliveryPolicy.getBackOffMultiplier();
-    }
-
-    public long getInitialRedeliveryDelay() {
-        if (redeliveryPolicy == null) {
-            return 0;
-        }
-        return redeliveryPolicy.getInitialRedeliveryDelay();
-    }
-
-    public int getMaximumRedeliveries() {
-        if (redeliveryPolicy == null) {
-            return 0;
-        }
-        return redeliveryPolicy.getMaximumRedeliveries();
-    }
-
-    public boolean isUseExponentialBackOff() {
-        if (redeliveryPolicy == null) {
-            return false;
-        }
-        return redeliveryPolicy.isUseExponentialBackOff();
-    }
-
-    /**
-     * 
-     */
-    public void setBackOffMultiplier(double backOffMultiplier) {
-        lazyCreateRedeliveryPolicy().setBackOffMultiplier(backOffMultiplier);
-    }
-    
-    public long getMaximumRedeliveryDelay() {
-        if (redeliveryPolicy == null) {
-            return 0;
-        }
-        return redeliveryPolicy.getMaximumRedeliveryDelay();
-    }
-    
-    public void setMaximumRedeliveryDelay(long maximumRedeliveryDelay) {
-        lazyCreateRedeliveryPolicy().setMaximumRedeliveryDelay(maximumRedeliveryDelay);
-    }
-
-    /**
-     * 
-     */
-    public void setInitialRedeliveryDelay(long initialRedeliveryDelay) {
-        lazyCreateRedeliveryPolicy().setInitialRedeliveryDelay(initialRedeliveryDelay);
-    }
-
-    /**
-     * 
-     */
-    public void setMaximumRedeliveries(int maximumRedeliveries) {
-        lazyCreateRedeliveryPolicy().setMaximumRedeliveries(maximumRedeliveries);
-    }
-
-    /**
-     * 
-     */
-    public void setUseExponentialBackOff(boolean useExponentialBackOff) {
-        lazyCreateRedeliveryPolicy().setUseExponentialBackOff(useExponentialBackOff);
-    }
-
-    // don't use getter to avoid causing introspection errors in containers
-    public RedeliveryPolicy redeliveryPolicy() {
-        return redeliveryPolicy;
-    }
-
-    public RedeliveryPolicy lazyCreateRedeliveryPolicy() {
-        if (redeliveryPolicy == null) {
-            redeliveryPolicy = new RedeliveryPolicy();
-        }
-        return redeliveryPolicy;
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
deleted file mode 100755
index 4ef3684..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.Serializable;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.naming.Reference;
-import javax.resource.Referenceable;
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionManager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ActiveMQConnectionFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory, Referenceable, Serializable {
-
-    private static final long serialVersionUID = -5754338187296859149L;
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQConnectionFactory.class);
-    private ConnectionManager manager;
-    private ActiveMQManagedConnectionFactory factory;
-    private Reference reference;
-    private final ActiveMQConnectionRequestInfo info;
-
-    /**
-     * @param factory
-     * @param manager
-     * @param connectionRequestInfo
-     */
-    public ActiveMQConnectionFactory(
-            ActiveMQManagedConnectionFactory factory, 
-            ConnectionManager manager, 
-            ActiveMQConnectionRequestInfo connectionRequestInfo) {
-        this.factory = factory;
-        this.manager = manager;
-        this.info = connectionRequestInfo;
-    }
-
-    /**
-     * @see javax.jms.ConnectionFactory#createConnection()
-     */
-    public Connection createConnection() throws JMSException {
-        return createConnection(info.copy());
-    }
-
-    /**
-     * @see javax.jms.ConnectionFactory#createConnection(java.lang.String,
-     *      java.lang.String)
-     */
-    public Connection createConnection(String userName, String password) throws JMSException {
-        ActiveMQConnectionRequestInfo i = info.copy();
-        i.setUserName(userName);
-        i.setPassword(password);
-        return createConnection(i);
-    }
-
-    /**
-     * @param connectionRequestInfo
-     * @return
-     * @throws JMSException
-     */
-    private Connection createConnection(ActiveMQConnectionRequestInfo connectionRequestInfo) throws JMSException {
-        try {
-            if (connectionRequestInfo.isUseInboundSessionEnabled()) {
-                return new InboundConnectionProxy();
-            }
-            if (manager == null) {
-                throw new JMSException("No JCA ConnectionManager configured! Either enable UseInboundSessionEnabled or get your JCA container to configure one.");
-            }
-            return (Connection)manager.allocateConnection(factory, connectionRequestInfo);
-        } catch (ResourceException e) {
-            // Throw the root cause if it was a JMSException..
-            if (e.getCause() instanceof JMSException) {
-                throw (JMSException)e.getCause();
-            }
-            LOG.debug("Connection could not be created:", e);
-            throw new JMSException(e.getMessage());
-        }
-    }
-
-    /**
-     * @see javax.naming.Referenceable#getReference()
-     */
-    public Reference getReference() {
-        return reference;
-    }
-
-    /**
-     * @see javax.resource.Referenceable#setReference(javax.naming.Reference)
-     */
-    public void setReference(Reference reference) {
-        this.reference = reference;
-    }
-
-    public QueueConnection createQueueConnection() throws JMSException {
-        return (QueueConnection)createConnection();
-    }
-
-    public QueueConnection createQueueConnection(String userName, String password) throws JMSException {
-        return (QueueConnection)createConnection(userName, password);
-    }
-
-    public TopicConnection createTopicConnection() throws JMSException {
-        return (TopicConnection)createConnection();
-    }
-
-    public TopicConnection createTopicConnection(String userName, String password) throws JMSException {
-        return (TopicConnection)createConnection(userName, password);
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
deleted file mode 100755
index c930b28..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.Serializable;
-
-import javax.resource.spi.ConnectionRequestInfo;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.RedeliveryPolicy;
-
-/**
- *  Must override equals and hashCode (JCA spec 16.4)
- */
-public class ActiveMQConnectionRequestInfo implements ConnectionRequestInfo, Serializable, Cloneable {
-
-    private static final long serialVersionUID = -5754338187296859149L;
-
-    private String userName;
-    private String password;
-    private String serverUrl;
-    private String clientid;
-    private Boolean useInboundSession;
-    private RedeliveryPolicy redeliveryPolicy;
-    private ActiveMQPrefetchPolicy prefetchPolicy;
-
-    public ActiveMQConnectionRequestInfo copy() {
-        try {
-            ActiveMQConnectionRequestInfo answer = (ActiveMQConnectionRequestInfo)clone();
-            if (redeliveryPolicy != null) {
-                answer.redeliveryPolicy = redeliveryPolicy.copy();
-            }
-            return answer;
-        } catch (CloneNotSupportedException e) {
-            throw new RuntimeException("Could not clone: " + e, e);
-        }
-    }
-
-    /**
-     * Returns true if this object will configure an ActiveMQConnectionFactory
-     * in any way
-     */
-    public boolean isConnectionFactoryConfigured() {
-        return serverUrl != null || clientid != null || redeliveryPolicy != null || prefetchPolicy != null;
-    }
-
-    /**
-     * Configures the given connection factory
-     */
-    public void configure(ActiveMQConnectionFactory factory) {
-        if (serverUrl != null) {
-            factory.setBrokerURL(serverUrl);
-        }
-        if (clientid != null) {
-            factory.setClientID(clientid);
-        }
-        if (redeliveryPolicy != null) {
-            factory.setRedeliveryPolicy(redeliveryPolicy);
-        }
-        if (prefetchPolicy != null) {
-            factory.setPrefetchPolicy(prefetchPolicy);
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionRequestInfo#hashCode()
-     */
-    public int hashCode() {
-        int rc = 0;
-        if (useInboundSession != null) {
-            rc ^= useInboundSession.hashCode();
-        }
-        if (serverUrl != null) {
-            rc ^= serverUrl.hashCode();
-        }
-        return rc;
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionRequestInfo#equals(java.lang.Object)
-     */
-    public boolean equals(Object o) {
-        if (o == null) {
-            return false;
-        }
-        if (!getClass().equals(o.getClass())) {
-            return false;
-        }
-        ActiveMQConnectionRequestInfo i = (ActiveMQConnectionRequestInfo)o;
-        if (notEqual(serverUrl, i.serverUrl)) {
-            return false;
-        }
-        if (notEqual(useInboundSession, i.useInboundSession)) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * @param i
-     * @return
-     */
-    private boolean notEqual(Object o1, Object o2) {
-        return (o1 == null ^ o2 == null) || (o1 != null && !o1.equals(o2));
-    }
-
-    /**
-     * @return Returns the url.
-     */
-    public String getServerUrl() {
-        return serverUrl;
-    }
-
-    /**
-     * @param url The url to set.
-     */
-    public void setServerUrl(String url) {
-        this.serverUrl = url;
-    }
-
-    /**
-     * @return Returns the password.
-     */
-    public String getPassword() {
-        return password;
-    }
-
-    /**
-     * @param password The password to set.
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    /**
-     * @return Returns the userid.
-     */
-    public String getUserName() {
-        return userName;
-    }
-
-    /**
-     * @param userid The userid to set.
-     */
-    public void setUserName(String userid) {
-        this.userName = userid;
-    }
-
-    /**
-     * @return Returns the clientid.
-     */
-    public String getClientid() {
-        return clientid;
-    }
-
-    /**
-     * @param clientid The clientid to set.
-     */
-    public void setClientid(String clientid) {
-        this.clientid = clientid;
-    }
-
-    @Override
-    public String toString() {
-        return new StringBuffer("ActiveMQConnectionRequestInfo{ userName = '").append(userName).append("' ")
-                .append(", serverUrl = '").append(serverUrl).append("' ")
-                .append(", clientid = '").append(clientid).append("' ")
-                .append(", userName = '").append(userName).append("' ")
-                .append(", useInboundSession = '").append(useInboundSession).append("'  }")
-                .toString();
-    }
-
-    public Boolean getUseInboundSession() {
-        return useInboundSession;
-    }
-
-    public void setUseInboundSession(Boolean useInboundSession) {
-        this.useInboundSession = useInboundSession;
-    }
-
-    public boolean isUseInboundSessionEnabled() {
-        return useInboundSession != null && useInboundSession.booleanValue();
-    }
-
-    public Double getRedeliveryBackOffMultiplier() {
-        return Double.valueOf(redeliveryPolicy().getBackOffMultiplier());
-    }
-
-    public Long getInitialRedeliveryDelay() {
-        return Long.valueOf(redeliveryPolicy().getInitialRedeliveryDelay());
-    }
-
-    public Long getMaximumRedeliveryDelay() {
-        return Long.valueOf(redeliveryPolicy().getMaximumRedeliveryDelay());
-    }
-
-    public Integer getMaximumRedeliveries() {
-        return Integer.valueOf(redeliveryPolicy().getMaximumRedeliveries());
-    }
-
-    public Boolean getRedeliveryUseExponentialBackOff() {
-        return Boolean.valueOf(redeliveryPolicy().isUseExponentialBackOff());
-    }
-
-    public void setRedeliveryBackOffMultiplier(Double value) {
-        if (value != null) {
-            redeliveryPolicy().setBackOffMultiplier(value);
-        }
-    }
-
-    public void setInitialRedeliveryDelay(Long value) {
-        if (value != null) {
-            redeliveryPolicy().setInitialRedeliveryDelay(value.longValue());
-        }
-    }
-
-    public void setMaximumRedeliveryDelay(Long value) {
-        if (value != null) {
-            redeliveryPolicy().setMaximumRedeliveryDelay(value.longValue());
-        }
-    }
-
-    public void setMaximumRedeliveries(Integer value) {
-        if (value != null) {
-            redeliveryPolicy().setMaximumRedeliveries(value.intValue());
-        }
-    }
-
-    public void setRedeliveryUseExponentialBackOff(Boolean value) {
-        if (value != null) {
-            redeliveryPolicy().setUseExponentialBackOff(value.booleanValue());
-        }
-    }
-
-    public Integer getDurableTopicPrefetch() {
-        return Integer.valueOf(prefetchPolicy().getDurableTopicPrefetch());
-    }
-
-    public Integer getInputStreamPrefetch() {
-        return Integer.valueOf(prefetchPolicy().getInputStreamPrefetch());
-    }
-
-    public Integer getQueueBrowserPrefetch() {
-        return Integer.valueOf(prefetchPolicy().getQueueBrowserPrefetch());
-    }
-
-    public Integer getQueuePrefetch() {
-        return Integer.valueOf(prefetchPolicy().getQueuePrefetch());
-    }
-
-    public Integer getTopicPrefetch() {
-        return Integer.valueOf(prefetchPolicy().getTopicPrefetch());
-    }
-
-    public void setAllPrefetchValues(Integer i) {
-        if (i != null) {
-            prefetchPolicy().setAll(i.intValue());
-        }
-    }
-
-    public void setDurableTopicPrefetch(Integer durableTopicPrefetch) {
-        if (durableTopicPrefetch != null) {
-            prefetchPolicy().setDurableTopicPrefetch(durableTopicPrefetch.intValue());
-        }
-    }
-
-    public void setInputStreamPrefetch(Integer inputStreamPrefetch) {
-        if (inputStreamPrefetch != null) {
-            prefetchPolicy().setInputStreamPrefetch(inputStreamPrefetch.intValue());
-        }
-    }
-
-    public void setQueueBrowserPrefetch(Integer queueBrowserPrefetch) {
-        if (queueBrowserPrefetch != null) {
-            prefetchPolicy().setQueueBrowserPrefetch(queueBrowserPrefetch.intValue());
-        }
-    }
-
-    public void setQueuePrefetch(Integer queuePrefetch) {
-        if (queuePrefetch != null) {
-            prefetchPolicy().setQueuePrefetch(queuePrefetch.intValue());
-        }
-    }
-
-    public void setTopicPrefetch(Integer topicPrefetch) {
-        if (topicPrefetch != null) {
-            prefetchPolicy().setTopicPrefetch(topicPrefetch.intValue());
-        }
-    }
-
-    /**
-     * Returns the redelivery policy; not using bean properties to avoid
-     * breaking compatibility with JCA configuration in J2EE
-     */
-    public RedeliveryPolicy redeliveryPolicy() {
-        if (redeliveryPolicy == null) {
-            redeliveryPolicy = new RedeliveryPolicy();
-        }
-        return redeliveryPolicy;
-    }
-
-    /**
-     * Returns the prefetch policy; not using bean properties to avoid breaking
-     * compatibility with JCA configuration in J2EE
-     */
-    public ActiveMQPrefetchPolicy prefetchPolicy() {
-        if (prefetchPolicy == null) {
-            prefetchPolicy = new ActiveMQPrefetchPolicy();
-        }
-        return prefetchPolicy;
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
deleted file mode 100644
index ead9edb..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Abstract base class providing support for creating physical
- * connections to an ActiveMQ instance.
- * 
- * 
- */
-public class ActiveMQConnectionSupport {
-    
-    private ActiveMQConnectionRequestInfo info = new ActiveMQConnectionRequestInfo();
-    protected Logger log = LoggerFactory.getLogger(getClass());
-    
-    /**
-     * Creates a factory for obtaining physical connections to an Active MQ
-     * broker. The factory is configured with the given configuration information.
-     * 
-     * @param connectionRequestInfo the configuration request information
-     * @return the connection factory
-     * @throws java.lang.IllegalArgumentException if the server URL given in the
-     * configuration information is not a valid URL
-     */
-    protected ActiveMQConnectionFactory createConnectionFactory(ActiveMQConnectionRequestInfo connectionRequestInfo) {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
-        connectionRequestInfo.configure(factory);
-        return factory;
-    }
-
-    /**
-     * Creates a new physical connection to an Active MQ broker identified by given
-     * connection request information.
-     * 
-     * @param connectionRequestInfo the connection request information identifying the broker and any
-     * required connection parameters, e.g. username/password
-     * @return the physical connection
-     * @throws JMSException if the connection could not be established
-     */
-    public ActiveMQConnection makeConnection(ActiveMQConnectionRequestInfo connectionRequestInfo) throws JMSException{
-        return makeConnection(connectionRequestInfo, createConnectionFactory(connectionRequestInfo));
-    }
-
-    /**
-     * Creates a new physical connection to an Active MQ broker using a given
-     * connection factory and credentials supplied in connection request information.
-     * 
-     * @param connectionRequestInfo the connection request information containing the credentials to use
-     * for the connection request
-     * @return the physical connection
-     * @throws JMSException if the connection could not be established
-     */
-    public ActiveMQConnection makeConnection(
-            ActiveMQConnectionRequestInfo connectionRequestInfo,
-            ActiveMQConnectionFactory connectionFactory) throws JMSException
-    {
-        String userName = connectionRequestInfo.getUserName();
-        String password = connectionRequestInfo.getPassword();
-        ActiveMQConnection physicalConnection = (ActiveMQConnection) connectionFactory.createConnection(userName, password);
-
-        String clientId = connectionRequestInfo.getClientid();
-        if ( clientId != null && clientId.length() > 0 )
-        {
-            physicalConnection.setClientID(clientId);
-        }
-        return physicalConnection;
-    }
-
-    /**
-     * Gets the connection request information.
-     * 
-     * @return the connection request information
-     */
-    public ActiveMQConnectionRequestInfo getInfo()
-    {
-        return info;
-    }
-    
-    /**
-     * Sets the connection request information as a whole.
-     * 
-     * @param connectionRequestInfo the connection request information
-     */
-    protected void setInfo(ActiveMQConnectionRequestInfo connectionRequestInfo){
-        info = connectionRequestInfo;
-    }    
-
-    protected boolean notEqual(Object o1, Object o2) {
-        return (o1 == null ^ o2 == null) || (o1 != null && !o1.equals(o2));
-    }
-
-    protected String emptyToNull(String value) {
-        if (value == null || value.length() == 0)
-        {
-            return null;
-        }
-        else
-        {
-            return value;
-        }
-    }
-
-    protected String defaultValue(String value, String defaultValue) {
-        if (value != null) {
-            return value;
-        }
-        return defaultValue;
-    }
-
-    // ///////////////////////////////////////////////////////////////////////
-    //
-    // Java Bean getters and setters for this ResourceAdapter class.
-    //
-    // ///////////////////////////////////////////////////////////////////////
-
-    /**
-     * @return client id
-     */
-    public String getClientid() {
-        return emptyToNull(info.getClientid());
-    }
-
-    /**
-     * @param clientid
-     */
-    public void setClientid(String clientid) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [clientid] to: " + clientid);
-        }
-        info.setClientid(clientid);
-    }
-
-    /**
-     * @return password
-     */
-    public String getPassword() {
-        return emptyToNull(info.getPassword());
-    }
-
-    /**
-     * @param password
-     */
-    public void setPassword(String password) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [password] property");
-        }
-        info.setPassword(password);
-    }
-
-    /**
-     * @return server URL
-     */
-    public String getServerUrl() {
-        return info.getServerUrl();
-    }
-
-    /**
-     * @param url
-     */
-    public void setServerUrl(String url) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [serverUrl] to: " + url);
-        }
-        info.setServerUrl(url);
-    }
-
-    /**
-     * @return user name
-     */
-    public String getUserName() {
-        return emptyToNull(info.getUserName());
-    }
-
-    /**
-     * @param userid
-     */
-    public void setUserName(String userid) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [userName] to: " + userid);
-        }
-        info.setUserName(userid);
-    }
-
-    /**
-     * @return durable topic prefetch
-     */
-    public Integer getDurableTopicPrefetch() {
-        return info.getDurableTopicPrefetch();
-    }
-
-    /**
-     * @param durableTopicPrefetch
-     */
-    public void setDurableTopicPrefetch(Integer durableTopicPrefetch) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [durableTopicPrefetch] to: " + durableTopicPrefetch);
-        }
-        info.setDurableTopicPrefetch(durableTopicPrefetch);
-    }
-
-    /**
-     * @return initial redelivery delay
-     */
-    public Long getInitialRedeliveryDelay() {
-        return info.getInitialRedeliveryDelay();
-    }
-
-    /**
-     * @param value
-     */
-    public void setInitialRedeliveryDelay(Long value) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [initialRedeliveryDelay] to: " + value);
-        }
-        info.setInitialRedeliveryDelay(value);
-    }
-
-
-    /**
-     * @return initial redelivery delay
-     */
-    public Long getMaximumRedeliveryDelay() {
-        return info.getMaximumRedeliveryDelay();
-    }
-
-    /**
-     * @param value
-     */
-    public void setMaximumRedeliveryDelay(Long value) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [maximumRedeliveryDelay] to: " + value);
-        }
-        info.setMaximumRedeliveryDelay(value);
-    }
-
-    /**
-     * @return input stream prefetch
-     */
-    public Integer getInputStreamPrefetch() {
-        return info.getInputStreamPrefetch();
-    }
-
-    /**
-     * @param inputStreamPrefetch
-     */
-    public void setInputStreamPrefetch(Integer inputStreamPrefetch) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [inputStreamPrefetch] to: " + inputStreamPrefetch);
-        }
-        info.setInputStreamPrefetch(inputStreamPrefetch);
-    }
-
-    /**
-     * @return maximum redeliveries
-     */
-    public Integer getMaximumRedeliveries() {
-        return info.getMaximumRedeliveries();
-    }
-
-    /**
-     * @param value
-     */
-    public void setMaximumRedeliveries(Integer value) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [maximumRedeliveries] to: " + value);
-        }
-        info.setMaximumRedeliveries(value);
-    }
-
-    /**
-     * @return queue browser prefetch
-     */
-    public Integer getQueueBrowserPrefetch() {
-        return info.getQueueBrowserPrefetch();
-    }
-
-    /**
-     * @param queueBrowserPrefetch
-     */
-    public void setQueueBrowserPrefetch(Integer queueBrowserPrefetch) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [queueBrowserPrefetch] to: " + queueBrowserPrefetch);
-        }
-        info.setQueueBrowserPrefetch(queueBrowserPrefetch);
-    }
-
-    /**
-     * @return queue prefetch
-     */
-    public Integer getQueuePrefetch() {
-        return info.getQueuePrefetch();
-    }
-
-    /**
-     * @param queuePrefetch
-     */
-    public void setQueuePrefetch(Integer queuePrefetch) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [queuePrefetch] to: " + queuePrefetch);
-        }
-        info.setQueuePrefetch(queuePrefetch);
-    }
-
-    /**
-     * @return redelivery backoff multiplier
-     */
-    public Double getRedeliveryBackOffMultiplier() {
-        return info.getRedeliveryBackOffMultiplier();
-    }
-
-    /**
-     * @param value
-     */
-    public void setRedeliveryBackOffMultiplier(Double value) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [redeliveryBackOffMultiplier] to: " + value);
-        }
-        info.setRedeliveryBackOffMultiplier(value);
-    }
-
-    /**
-     * @return redelivery use exponential backoff
-     */
-    public Boolean getRedeliveryUseExponentialBackOff() {
-        return info.getRedeliveryUseExponentialBackOff();
-    }
-
-    /**
-     * @param value
-     */
-    public void setRedeliveryUseExponentialBackOff(Boolean value) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [redeliveryUseExponentialBackOff] to: " + value);
-        }
-        info.setRedeliveryUseExponentialBackOff(value);
-    }
-
-    /**
-     * @return topic prefetch
-     */
-    public Integer getTopicPrefetch() {
-        return info.getTopicPrefetch();
-    }
-
-    /**
-     * @param topicPrefetch
-     */
-    public void setTopicPrefetch(Integer topicPrefetch) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [topicPrefetch] to: " + topicPrefetch);
-        }
-        info.setTopicPrefetch(topicPrefetch);
-    }
-
-    /**
-     * @param i
-     */
-    public void setAllPrefetchValues(Integer i) {
-        info.setAllPrefetchValues(i);
-    }
-
-    /**
-     * @return use inbound session enabled
-     */
-    public boolean isUseInboundSessionEnabled() {
-        return info.isUseInboundSessionEnabled();
-    }
-
-    /**
-     * @return use inbound session
-     */
-    public Boolean getUseInboundSession() {
-        return info.getUseInboundSession();
-    }
-
-    /**
-     * @param useInboundSession
-     */
-    public void setUseInboundSession(Boolean useInboundSession) {
-        if ( log.isDebugEnabled() ) {
-            log.debug("setting [useInboundSession] to: " + useInboundSession);
-        }
-        info.setUseInboundSession(useInboundSession);
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointActivationKey.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointActivationKey.java
deleted file mode 100755
index c7aecc7..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointActivationKey.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.ra;
-
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-
-
-public class ActiveMQEndpointActivationKey {
-    private final MessageEndpointFactory messageEndpointFactory;
-    private final MessageActivationSpec activationSpec;
-
-    /**
-     * For testing
-     */ 
-    protected ActiveMQEndpointActivationKey() {
-        this(null, null);
-    }
-
-    /**
-     * @param messageEndpointFactory
-     * @param activationSpec
-     */
-    public ActiveMQEndpointActivationKey(MessageEndpointFactory messageEndpointFactory, MessageActivationSpec activationSpec) {
-        this.messageEndpointFactory = messageEndpointFactory;
-        this.activationSpec = activationSpec;
-    }
-
-    /**
-     * @return Returns the activationSpec.
-     */
-    public MessageActivationSpec getActivationSpec() {
-        return activationSpec;
-    }
-
-    /**
-     * @return Returns the messageEndpointFactory.
-     */
-    public MessageEndpointFactory getMessageEndpointFactory() {
-        return messageEndpointFactory;
-    }
-
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return messageEndpointFactory.hashCode() ^ activationSpec.hashCode();
-    }
-
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || !(obj instanceof ActiveMQEndpointActivationKey)) {
-            return false;
-        }
-        ActiveMQEndpointActivationKey o = (ActiveMQEndpointActivationKey) obj;
-
-        //Per the 12.4.9 spec: 
-        //   MessageEndpointFactory does not implement equals()
-        //   ActivationSpec does not implement equals()
-        return o.activationSpec == activationSpec && o.messageEndpointFactory == messageEndpointFactory;
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
deleted file mode 100755
index 4160332..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * 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.ra;
-
-import java.lang.reflect.Method;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.resource.ResourceException;
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-import javax.resource.spi.work.Work;
-import javax.resource.spi.work.WorkException;
-import javax.resource.spi.work.WorkManager;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *  $Date$
- */
-public class ActiveMQEndpointWorker {
-
-    public static final Method ON_MESSAGE_METHOD;
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQEndpointWorker.class);
-
-    private static final long INITIAL_RECONNECT_DELAY = 1000; // 1 second.
-    private static final long MAX_RECONNECT_DELAY = 1000 * 30; // 30 seconds.
-    private static final ThreadLocal<Session> THREAD_LOCAL = new ThreadLocal<Session>();
-
-    static {
-        try {
-            ON_MESSAGE_METHOD = MessageListener.class.getMethod("onMessage", new Class[] {
-                Message.class
-            });
-        } catch (Exception e) {
-            throw new ExceptionInInitializerError(e);
-        }
-    }
-
-    protected final ActiveMQEndpointActivationKey endpointActivationKey;
-    protected final MessageEndpointFactory endpointFactory;
-    protected final WorkManager workManager;
-    protected final boolean transacted;
-
-    private final ActiveMQDestination dest;
-    private final Work connectWork;
-    private final AtomicBoolean connecting = new AtomicBoolean(false);    
-    private final Object shutdownMutex = new String("shutdownMutex");
-    
-    private ActiveMQConnection connection;
-    private ConnectionConsumer consumer;
-    private ServerSessionPoolImpl serverSessionPool;
-    private boolean running;
-
-    protected ActiveMQEndpointWorker(final MessageResourceAdapter adapter, ActiveMQEndpointActivationKey key) throws ResourceException {
-        this.endpointActivationKey = key;
-        this.endpointFactory = endpointActivationKey.getMessageEndpointFactory();
-        this.workManager = adapter.getBootstrapContext().getWorkManager();
-        try {
-            this.transacted = endpointFactory.isDeliveryTransacted(ON_MESSAGE_METHOD);
-        } catch (NoSuchMethodException e) {
-            throw new ResourceException("Endpoint does not implement the onMessage method.");
-        }
-
-        connectWork = new Work() {
-            long currentReconnectDelay = INITIAL_RECONNECT_DELAY;
-
-            public void release() {
-                //
-            }
-
-            public synchronized void run() {
-                currentReconnectDelay = INITIAL_RECONNECT_DELAY;
-                MessageActivationSpec activationSpec = endpointActivationKey.getActivationSpec();
-                if ( LOG.isInfoEnabled() ) {
-                    LOG.info("Establishing connection to broker [" + adapter.getInfo().getServerUrl() + "]");
-                }
-
-                while ( connecting.get() && running ) {
-                try {
-                    connection = adapter.makeConnection(activationSpec);
-                    connection.setExceptionListener(new ExceptionListener() {
-                        public void onException(JMSException error) {
-                            if (!serverSessionPool.isClosing()) {
-                                    // initiate reconnection only once, i.e. on initial exception
-                                    // and only if not already trying to connect
-                                    LOG.error("Connection to broker failed: " + error.getMessage(), error);
-                                    if ( connecting.compareAndSet(false, true) ) {
-                                        synchronized ( connectWork ) {
-                                            disconnect();
-                                            serverSessionPool.closeIdleSessions();
-                                            connect();
-                            }
-                                    } else {
-                                        // connection attempt has already been initiated
-                                        LOG.info("Connection attempt already in progress, ignoring connection exception");
-                        }
-                                }
-                            }
-                    });
-                        connection.start();
-
-                        int prefetchSize = activationSpec.getMaxMessagesPerSessionsIntValue() * activationSpec.getMaxSessionsIntValue();
-                    if (activationSpec.isDurableSubscription()) {
-                            consumer = connection.createDurableConnectionConsumer(
-                                    (Topic) dest,
-                                    activationSpec.getSubscriptionName(), 
-                                    emptyToNull(activationSpec.getMessageSelector()),
-                                    serverSessionPool, 
-                                    prefetchSize,
-                                    activationSpec.getNoLocalBooleanValue());
-                    } else {
-                            consumer = connection.createConnectionConsumer(
-                                    dest, 
-                                    emptyToNull(activationSpec.getMessageSelector()), 
-                                    serverSessionPool, 
-                                    prefetchSize,
-                                                                       activationSpec.getNoLocalBooleanValue());
-                    }
-
-
-                        if ( connecting.compareAndSet(true, false) ) {
-                            if ( LOG.isInfoEnabled() ) {
-                                LOG.info("Successfully established connection to broker [" + adapter.getInfo().getServerUrl() + "]");
-                            }
-                        } else {
-                            LOG.error("Could not release connection lock");
-                        }
-                } catch (JMSException error) {
-                        if ( LOG.isDebugEnabled() ) {
-                            LOG.debug("Failed to connect: " + error.getMessage(), error);
-                }
-                        disconnect();
-                        pause(error);
-            }
-                }
-            }
-            
-            private void pause(JMSException error) {
-                if (currentReconnectDelay == MAX_RECONNECT_DELAY) {
-                    LOG.error("Failed to connect to broker [" + adapter.getInfo().getServerUrl() + "]: " 
-                            + error.getMessage(), error);
-                    LOG.error("Endpoint will try to reconnect to the JMS broker in " + (MAX_RECONNECT_DELAY / 1000) + " seconds");
-                }
-                try {
-                    synchronized ( shutdownMutex ) {
-                        // shutdownMutex will be notified by stop() method in
-                        // order to accelerate shutdown of endpoint
-                        shutdownMutex.wait(currentReconnectDelay);
-                    }
-                } catch ( InterruptedException e ) {
-                    Thread.interrupted();
-                }
-                currentReconnectDelay *= 2;
-                if (currentReconnectDelay > MAX_RECONNECT_DELAY) {
-                    currentReconnectDelay = MAX_RECONNECT_DELAY;
-                }                
-            }
-        };
-
-        MessageActivationSpec activationSpec = endpointActivationKey.getActivationSpec();
-        if ("javax.jms.Queue".equals(activationSpec.getDestinationType())) {
-            dest = new ActiveMQQueue(activationSpec.getDestination());
-        } else if ("javax.jms.Topic".equals(activationSpec.getDestinationType())) {
-            dest = new ActiveMQTopic(activationSpec.getDestination());
-        } else {
-            throw new ResourceException("Unknown destination type: " + activationSpec.getDestinationType());
-        }
-
-    }
-
-    /**
-     * @param c
-     */
-    public static void safeClose(Connection c) {
-        try {
-            if (c != null) {
-                LOG.debug("Closing connection to broker");
-                c.close();
-            }
-        } catch (JMSException e) {
-            //
-        }
-    }
-
-    /**
-     * @param cc
-     */
-    public static void safeClose(ConnectionConsumer cc) {
-        try {
-            if (cc != null) {
-                LOG.debug("Closing ConnectionConsumer");
-                cc.close();
-            }
-        } catch (JMSException e) {
-            //
-        }
-    }
-
-    /**
-     * 
-     */
-    public void start() throws ResourceException {
-        synchronized (connectWork) {
-            if (running)
-            return;
-        running = true;
-
-            if ( connecting.compareAndSet(false, true) ) {
-                LOG.info("Starting");
-        serverSessionPool = new ServerSessionPoolImpl(this, endpointActivationKey.getActivationSpec().getMaxSessionsIntValue());
-        connect();
-            } else {
-                LOG.warn("Ignoring start command, EndpointWorker is already trying to connect");
-    }
-        }
-    }
-
-    /**
-     * 
-     */
-    public void stop() throws InterruptedException {
-        synchronized (shutdownMutex) {
-            if (!running)
-                return;
-            running = false;
-            LOG.info("Stopping");
-            // wake up pausing reconnect attempt
-            shutdownMutex.notifyAll();
-            serverSessionPool.close();
-        }
-        disconnect();
-    }
-
-    private boolean isRunning() {
-        return running;
-    }
-
-    private void connect() {
-        synchronized ( connectWork ) {
-        if (!running) {
-            return;
-        }
-
-        try {
-            workManager.scheduleWork(connectWork, WorkManager.INDEFINITE, null, null);
-        } catch (WorkException e) {
-            running = false;
-            LOG.error("Work Manager did not accept work: ", e);
-        }
-    }
-    }
-
-    /**
-     * 
-     */
-    private void disconnect() {
-        synchronized ( connectWork ) {
-        safeClose(consumer);
-        consumer = null;
-        safeClose(connection);
-        connection = null;
-    }
-            }
-
-    protected void registerThreadSession(Session session) {
-        THREAD_LOCAL.set(session);
-    }
-
-    protected void unregisterThreadSession(Session session) {
-        THREAD_LOCAL.set(null);
-    }
-
-    protected ActiveMQConnection getConnection() {
-        // make sure we only return a working connection
-        // in particular make sure that we do not return null
-        // after the resource adapter got disconnected from
-        // the broker via the disconnect() method
-        synchronized ( connectWork ) {
-            return connection;
-        }
-    }
-
-    private String emptyToNull(String value) {
-        if (value == null || value.length() == 0) {
-            return null;
-        }
-        return value;
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
deleted file mode 100755
index 571fbf3..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.PrintWriter;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import javax.jms.Connection;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionEvent;
-import javax.resource.spi.ConnectionEventListener;
-import javax.resource.spi.ConnectionRequestInfo;
-import javax.resource.spi.LocalTransaction;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.spi.ManagedConnectionMetaData;
-import javax.security.auth.Subject;
-import javax.transaction.xa.XAResource;
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.LocalTransactionEventListener;
-import org.apache.activemq.TransactionContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * ActiveMQManagedConnection maps to real physical connection to the server.
- * Since a ManagedConnection has to provide a transaction managment interface to
- * the physical connection, and sessions are the objects implement transaction
- * managment interfaces in the JMS API, this object also maps to a singe
- * physical JMS session. <p/> The side-effect is that JMS connection the
- * application gets will allways create the same session object. This is good if
- * running in an app server since the sessions are elisted in the context
- * transaction. This is bad if used outside of an app server since the user may
- * be trying to create 2 different sessions to coordinate 2 different uow.
- * 
- * 
- */
-public class ActiveMQManagedConnection implements ManagedConnection, ExceptionListener { // TODO:
-                                                                                            // ,
-                                                                                            // DissociatableManagedConnection
-                                                                                            // {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ActiveMQManagedConnection.class);
-
-    private PrintWriter logWriter;
-
-    private final ActiveMQConnection physicalConnection;
-    private final TransactionContext transactionContext;
-    private final List<ManagedConnectionProxy> proxyConnections = new CopyOnWriteArrayList<ManagedConnectionProxy>();
-    private final List<ConnectionEventListener> listeners = new CopyOnWriteArrayList<ConnectionEventListener>();
-    private final LocalAndXATransaction localAndXATransaction;
-
-    private Subject subject;
-    private ActiveMQConnectionRequestInfo info;
-    private boolean destroyed;
-
-    public ActiveMQManagedConnection(Subject subject, ActiveMQConnection physicalConnection, ActiveMQConnectionRequestInfo info) throws ResourceException {
-        try {
-            this.subject = subject;
-            this.info = info;
-            this.physicalConnection = physicalConnection;
-            this.transactionContext = new TransactionContext(physicalConnection);
-
-            this.localAndXATransaction = new LocalAndXATransaction(transactionContext) {
-                public void setInManagedTx(boolean inManagedTx) throws JMSException {
-                    super.setInManagedTx(inManagedTx);
-                    for (ManagedConnectionProxy proxy:proxyConnections) {
-                        proxy.setUseSharedTxContext(inManagedTx);
-                    }
-                }
-            };
-
-            this.transactionContext.setLocalTransactionEventListener(new LocalTransactionEventListener() {
-                public void beginEvent() {
-                    fireBeginEvent();
-                }
-
-                public void commitEvent() {
-                    fireCommitEvent();
-                }
-
-                public void rollbackEvent() {
-                    fireRollbackEvent();
-                }
-            });
-
-            physicalConnection.setExceptionListener(this);
-        } catch (JMSException e) {
-            throw new ResourceException("Could not create a new connection: " + e.getMessage(), e);
-        }
-    }
-
-    public boolean isInManagedTx() {
-        return localAndXATransaction.isInManagedTx();
-    }
-
-    public static boolean matches(Object x, Object y) {
-        if (x == null ^ y == null) {
-            return false;
-        }
-        if (x != null && !x.equals(y)) {
-            return false;
-        }
-        return true;
-    }
-
-    public void associate(Subject subject, ActiveMQConnectionRequestInfo info) throws JMSException {
-
-        // Do we need to change the associated userid/password
-        if (!matches(info.getUserName(), this.info.getUserName()) || !matches(info.getPassword(), this.info.getPassword())) {
-            physicalConnection.changeUserInfo(info.getUserName(), info.getPassword());
-        }
-
-        // Do we need to set the clientId?
-        if (info.getClientid() != null && info.getClientid().length() > 0) {
-            physicalConnection.setClientID(info.getClientid());
-        }
-
-        this.subject = subject;
-        this.info = info;
-    }
-
-    public Connection getPhysicalConnection() {
-        return physicalConnection;
-    }
-
-    private void fireBeginEvent() {
-        ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
-        for(ConnectionEventListener l:listeners) {
-            l.localTransactionStarted(event);
-        }
-    }
-
-    private void fireCommitEvent() {
-        ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
-        for(ConnectionEventListener l:listeners) {
-            l.localTransactionCommitted(event);
-        }
-    }
-
-    private void fireRollbackEvent() {
-        ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
-        for(ConnectionEventListener l:listeners) {
-            l.localTransactionRolledback(event);
-        }
-    }
-
-    private void fireCloseEvent(ManagedConnectionProxy proxy) {
-        ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this, ConnectionEvent.CONNECTION_CLOSED);
-        event.setConnectionHandle(proxy);
-
-        for(ConnectionEventListener l:listeners) {
-            l.connectionClosed(event);
-        }
-    }
-
-    private void fireErrorOccurredEvent(Exception error) {
-        ConnectionEvent event = new ConnectionEvent(ActiveMQManagedConnection.this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, error);
-        for(ConnectionEventListener l:listeners) {
-            l.connectionErrorOccurred(event);
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#getConnection(javax.security.auth.Subject,
-     *      javax.resource.spi.ConnectionRequestInfo)
-     */
-    public Object getConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException {
-        ManagedConnectionProxy proxy = new ManagedConnectionProxy(this);
-        proxyConnections.add(proxy);
-        return proxy;
-    }
-
-    private boolean isDestroyed() {
-        return destroyed;
-    }
-
-    /**
-     * Close down the physical connection to the server.
-     * 
-     * @see javax.resource.spi.ManagedConnection#destroy()
-     */
-    public void destroy() throws ResourceException {
-        // Have we allready been destroyed??
-        if (isDestroyed()) {
-            return;
-        }
-
-        cleanup();
-
-        try {
-            physicalConnection.close();
-            destroyed = true;
-        } catch (JMSException e) {
-            LOG.info("Error occured during close of a JMS connection.", e);
-        }
-    }
-
-    /**
-     * Cleans up all proxy handles attached to this physical connection so that
-     * they cannot be used anymore.
-     * 
-     * @see javax.resource.spi.ManagedConnection#cleanup()
-     */
-    public void cleanup() throws ResourceException {
-
-        // Have we allready been destroyed??
-        if (isDestroyed()) {
-            return;
-        }
-
-        for (ManagedConnectionProxy proxy:proxyConnections) {
-            proxy.cleanup();
-        }
-        proxyConnections.clear();
-
-        try {
-            physicalConnection.cleanup();
-        } catch (JMSException e) {
-            throw new ResourceException("Could cleanup the ActiveMQ connection: " + e, e);
-        }
-        // defer transaction cleanup till after close so that close is aware of the current tx
-        localAndXATransaction.cleanup();
-
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#associateConnection(java.lang.Object)
-     */
-    public void associateConnection(Object connection) throws ResourceException {
-        if (connection instanceof ManagedConnectionProxy) {
-            ManagedConnectionProxy proxy = (ManagedConnectionProxy)connection;
-            proxyConnections.add(proxy);
-        } else {
-            throw new ResourceException("Not supported : associating connection instance of " + connection.getClass().getName());
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#addConnectionEventListener(javax.resource.spi.ConnectionEventListener)
-     */
-    public void addConnectionEventListener(ConnectionEventListener listener) {
-        listeners.add(listener);
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#removeConnectionEventListener(javax.resource.spi.ConnectionEventListener)
-     */
-    public void removeConnectionEventListener(ConnectionEventListener listener) {
-        listeners.remove(listener);
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#getXAResource()
-     */
-    public XAResource getXAResource() throws ResourceException {
-        return localAndXATransaction;
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#getLocalTransaction()
-     */
-    public LocalTransaction getLocalTransaction() throws ResourceException {
-        return localAndXATransaction;
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#getMetaData()
-     */
-    public ManagedConnectionMetaData getMetaData() throws ResourceException {
-        return new ManagedConnectionMetaData() {
-
-            public String getEISProductName() throws ResourceException {
-                if (physicalConnection == null) {
-                    throw new ResourceException("Not connected.");
-                }
-                try {
-                    return physicalConnection.getMetaData().getJMSProviderName();
-                } catch (JMSException e) {
-                    throw new ResourceException("Error accessing provider.", e);
-                }
-            }
-
-            public String getEISProductVersion() throws ResourceException {
-                if (physicalConnection == null) {
-                    throw new ResourceException("Not connected.");
-                }
-                try {
-                    return physicalConnection.getMetaData().getProviderVersion();
-                } catch (JMSException e) {
-                    throw new ResourceException("Error accessing provider.", e);
-                }
-            }
-
-            public int getMaxConnections() throws ResourceException {
-                if (physicalConnection == null) {
-                    throw new ResourceException("Not connected.");
-                }
-                return Integer.MAX_VALUE;
-            }
-
-            public String getUserName() throws ResourceException {
-                if (physicalConnection == null) {
-                    throw new ResourceException("Not connected.");
-                }
-                try {
-                    return physicalConnection.getClientID();
-                } catch (JMSException e) {
-                    throw new ResourceException("Error accessing provider.", e);
-                }
-            }
-        };
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#setLogWriter(java.io.PrintWriter)
-     */
-    public void setLogWriter(PrintWriter logWriter) throws ResourceException {
-        this.logWriter = logWriter;
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnection#getLogWriter()
-     */
-    public PrintWriter getLogWriter() throws ResourceException {
-        return logWriter;
-    }
-
-    /**
-     * @param subject subject to match
-     * @param info cri to match
-     * @return whether the subject and cri match sufficiently to allow using this connection under the new circumstances
-     */
-    public boolean matches(Subject subject, ConnectionRequestInfo info) {
-        // Check to see if it is our info class
-        if (info == null) {
-            return false;
-        }
-        if (info.getClass() != ActiveMQConnectionRequestInfo.class) {
-            return false;
-        }
-
-        // Do the subjects match?
-        if (subject == null ^ this.subject == null) {
-            return false;
-        }
-        if (subject != null && !subject.equals(this.subject)) {
-            return false;
-        }
-
-        // Does the info match?
-        return info.equals(this.info);
-    }
-
-    /**
-     * When a proxy is closed this cleans up the proxy and notifys the
-     * ConnectionEventListeners that a connection closed.
-     * 
-     * @param proxy
-     */
-    public void proxyClosedEvent(ManagedConnectionProxy proxy) {
-        proxyConnections.remove(proxy);
-        proxy.cleanup();
-        fireCloseEvent(proxy);
-    }
-
-    public void onException(JMSException e) {
-        LOG.warn("Connection failed: " + e);
-        LOG.debug("Cause: ", e);
-
-        for (ManagedConnectionProxy proxy:proxyConnections) {
-            proxy.onException(e);
-        }
-        // Let the container know that the error occured.
-        fireErrorOccurredEvent(e);
-    }
-
-    /**
-     * @return Returns the transactionContext.
-     */
-    public TransactionContext getTransactionContext() {
-        return transactionContext;
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
deleted file mode 100755
index d7cf3f7..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintWriter;
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.jms.JMSException;
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionManager;
-import javax.resource.spi.ConnectionRequestInfo;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.spi.ManagedConnectionFactory;
-import javax.resource.spi.ResourceAdapter;
-import javax.resource.spi.ResourceAdapterAssociation;
-import javax.security.auth.Subject;
-import org.slf4j.LoggerFactory;
-
-/**
- * @version $Revisio n$ TODO: Must override equals and hashCode (JCA spec 16.4)
- * @org.apache.xbean.XBean element="managedConnectionFactory"
- */
-public class ActiveMQManagedConnectionFactory extends ActiveMQConnectionSupport
-        implements ManagedConnectionFactory, ResourceAdapterAssociation {
-
-    private static final long serialVersionUID = 6196921962230582875L;
-    private PrintWriter logWriter;
-
-    /**
-     * @see javax.resource.spi.ResourceAdapterAssociation#setResourceAdapter(javax.resource.spi.ResourceAdapter)
-     */
-    public void setResourceAdapter(ResourceAdapter adapter) throws ResourceException {
-        if (!(adapter instanceof MessageResourceAdapter)) {
-            throw new ResourceException("ResourceAdapter is not of type: " + MessageResourceAdapter.class.getName());
-        }
-        else
-        {
-            if ( log.isDebugEnabled() ) {
-                log.debug("copying standard ResourceAdapter configuration properties");
-        }
-            ActiveMQConnectionRequestInfo baseInfo = ((MessageResourceAdapter) adapter).getInfo().copy();
-            if (getClientid() == null) {
-                setClientid(baseInfo.getClientid());
-        }
-            if (getPassword() == null) {
-                setPassword(baseInfo.getPassword());
-        }
-            if (getServerUrl() == null) {
-                setServerUrl(baseInfo.getServerUrl());
-        }
-            if (getUseInboundSession() == null) {
-                setUseInboundSession(baseInfo.getUseInboundSession());
-        }
-            if (getUserName() == null) {
-                setUserName(baseInfo.getUserName());
-    }
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
-     */
-    public ResourceAdapter getResourceAdapter() {
-        return null;
-    }
-
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(Object object) {
-        if (object == null || object.getClass() != ActiveMQManagedConnectionFactory.class) {
-            return false;
-        }
-        return ((ActiveMQManagedConnectionFactory)object).getInfo().equals(getInfo());
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return getInfo().hashCode();
-    }
-
-    /**
-     * Writes this factory during serialization along with the superclass' <i>info</i> property.
-     * This needs to be done manually since the superclass is not serializable itself.
-     * 
-     * @param out the stream to write object state to
-     * @throws java.io.IOException if the object cannot be serialized
-     */
-    private void writeObject(ObjectOutputStream out) throws IOException {
-        if ( logWriter != null && !(logWriter instanceof Serializable) ) {
-            // if the PrintWriter injected by the application server is not
-            // serializable we just drop the reference and let the application
-            // server re-inject a PrintWriter later (after this factory has been
-            // deserialized again) using the standard setLogWriter() method
-            logWriter = null;
-    }
-        out.defaultWriteObject();
-        out.writeObject(getInfo());
-    }
-
-    /**
-     * Restores this factory along with the superclass' <i>info</i> property.
-     * This needs to be done manually since the superclass is not serializable itself.
-     * 
-     * @param in the stream to read object state from
-     * @throws java.io.IOException if the object state could not be restored
-     * @throws java.lang.ClassNotFoundException if the object state could not be restored
-     */
-    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
-        in.defaultReadObject();
-        setInfo((ActiveMQConnectionRequestInfo) in.readObject());
-        log = LoggerFactory.getLogger(getClass());
-    }
-    
-    /**
-     * @see javax.resource.spi.ManagedConnectionFactory#createConnectionFactory(javax.resource.spi.ConnectionManager)
-     */
-    public Object createConnectionFactory(ConnectionManager manager) throws ResourceException {
-        return new ActiveMQConnectionFactory(this, manager, getInfo());
-    }
-
-    /**
-     * This is used when not running in an app server. For now we are creating a
-     * ConnectionFactory that has our SimpleConnectionManager implementation but
-     * it may be a better idea to not support this. The JMS api will have many
-     * quirks the user may not expect when running through the resource adapter.
-     * 
-     * @see javax.resource.spi.ManagedConnectionFactory#createConnectionFactory()
-     */
-    public Object createConnectionFactory() throws ResourceException {
-        return new ActiveMQConnectionFactory(this, new SimpleConnectionManager(), getInfo());
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnectionFactory#createManagedConnection(javax.security.auth.Subject,
-     *      javax.resource.spi.ConnectionRequestInfo)
-     */
-    public ManagedConnection createManagedConnection(
-            Subject subject, 
-            ConnectionRequestInfo connectionRequestInfo) throws ResourceException {
-        ActiveMQConnectionRequestInfo amqInfo = getInfo();
-        if ( connectionRequestInfo instanceof ActiveMQConnectionRequestInfo ) {
-            amqInfo = (ActiveMQConnectionRequestInfo) connectionRequestInfo;
-            }
-        try {
-            return new ActiveMQManagedConnection(subject, makeConnection(amqInfo), amqInfo);
-        } catch (JMSException e) {
-            throw new ResourceException("Could not create connection.", e);
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnectionFactory#matchManagedConnections(java.util.Set,
-     *      javax.security.auth.Subject,
-     *      javax.resource.spi.ConnectionRequestInfo)
-     */
-    public ManagedConnection matchManagedConnections(
-            Set connections, 
-            Subject subject, 
-            ConnectionRequestInfo connectionRequestInfo) throws ResourceException {
-        Iterator iterator = connections.iterator();
-        while (iterator.hasNext()) {
-            ActiveMQManagedConnection c = (ActiveMQManagedConnection)iterator.next();
-            if (c.matches(subject, connectionRequestInfo)) {
-                try {
-                    c.associate(subject, (ActiveMQConnectionRequestInfo) connectionRequestInfo);
-                    return c;
-                } catch (JMSException e) {
-                    throw new ResourceException(e);
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnectionFactory#setLogWriter(java.io.PrintWriter)
-     */
-    public void setLogWriter(PrintWriter aLogWriter) throws ResourceException {
-        if ( log.isTraceEnabled() ) {
-            log.trace("setting log writer [" + aLogWriter + "]");
-    }
-        this.logWriter = aLogWriter;
-    }
-
-    /**
-     * @see javax.resource.spi.ManagedConnectionFactory#getLogWriter()
-     */
-    public PrintWriter getLogWriter() throws ResourceException {
-        if ( log.isTraceEnabled() ) {
-            log.trace("getting log writer [" + logWriter + "]");
-        }
-        return logWriter;
-    }
-
-    }
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
deleted file mode 100644
index 585f54b..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- * 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.ra;
-
-import java.net.URI;
-import java.util.HashMap;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.XAConnection;
-import javax.jms.XASession;
-import javax.resource.NotSupportedException;
-import javax.resource.ResourceException;
-import javax.resource.spi.ActivationSpec;
-import javax.resource.spi.BootstrapContext;
-import javax.resource.spi.ResourceAdapterInternalException;
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-import javax.transaction.xa.XAResource;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.RedeliveryPolicy;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.ServiceSupport;
-
-/**
- * Knows how to connect to one ActiveMQ server. It can then activate endpoints
- * and deliver messages to those end points using the connection configure in
- * the resource adapter. <p/>Must override equals and hashCode (JCA spec 16.4)
- * 
- * @org.apache.xbean.XBean element="resourceAdapter" rootElement="true"
- *                         description="The JCA Resource Adaptor for ActiveMQ"
- * 
- */
-public class ActiveMQResourceAdapter extends ActiveMQConnectionSupport implements MessageResourceAdapter {
-
-    private final HashMap<ActiveMQEndpointActivationKey, ActiveMQEndpointWorker> endpointWorkers = new HashMap<ActiveMQEndpointActivationKey, ActiveMQEndpointWorker>();
-
-    private BootstrapContext bootstrapContext;
-    private String brokerXmlConfig;
-    private BrokerService broker;
-    private Thread brokerStartThread;
-    private ActiveMQConnectionFactory connectionFactory;
-    
-    /**
-     * 
-     */
-    public ActiveMQResourceAdapter() {
-        super();
-    }
-
-    /**
-     * @see javax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext)
-     */
-    public void start(BootstrapContext bootstrapContext) throws ResourceAdapterInternalException {
-        this.bootstrapContext = bootstrapContext;
-        if (brokerXmlConfig != null && brokerXmlConfig.trim().length() > 0) {
-            brokerStartThread = new Thread("Starting ActiveMQ Broker") {
-                @Override
-                public void run () {
-                    try {
-                        // ensure RAR resources are available to xbean (needed for weblogic)
-                        log.debug("original thread context classLoader: " + Thread.currentThread().getContextClassLoader());
-                        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-                        log.debug("current (from getClass()) thread context classLoader: " + Thread.currentThread().getContextClassLoader());
-                        
-                        synchronized( ActiveMQResourceAdapter.this ) {
-                            broker = BrokerFactory.createBroker(new URI(brokerXmlConfig));
-                        }
-                        broker.start();
-                    } catch (Throwable e) {
-                        log.warn("Could not start up embeded ActiveMQ Broker '"+brokerXmlConfig+"': "+e.getMessage());
-                        log.debug("Reason for: "+e.getMessage(), e);
-                    }
-                }
-            };
-            brokerStartThread.setDaemon(true);
-            brokerStartThread.start();
-            
-            // Wait up to 5 seconds for the broker to start up in the async thread.. otherwise keep going without it..
-            try {
-                brokerStartThread.join(1000*5);
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-            }                
-        }
-    }
-
-    /**
-     * @see org.apache.activemq.ra.MessageResourceAdapter#makeConnection()
-     */
-    public ActiveMQConnection makeConnection() throws JMSException {
-        if( connectionFactory == null ) {
-            return makeConnection(getInfo());
-        } else {
-            return makeConnection(getInfo(), connectionFactory);
-        }
-    }
-
-    /**
-     * @param activationSpec
-     */
-    public ActiveMQConnection makeConnection(MessageActivationSpec activationSpec) throws JMSException {
-        ActiveMQConnectionFactory cf = getConnectionFactory();
-        if (cf == null) {
-            cf = createConnectionFactory(getInfo());
-        }
-        String userName = defaultValue(activationSpec.getUserName(), getInfo().getUserName());
-        String password = defaultValue(activationSpec.getPassword(), getInfo().getPassword());
-        String clientId = activationSpec.getClientId();
-        if (clientId != null) {
-            cf.setClientID(clientId);
-        } else {
-            if (activationSpec.isDurableSubscription()) {
-                log.warn("No clientID specified for durable subscription: " + activationSpec);
-            }
-        }
-        ActiveMQConnection physicalConnection = (ActiveMQConnection) cf.createConnection(userName, password);
-
-        // have we configured a redelivery policy
-        RedeliveryPolicy redeliveryPolicy = activationSpec.redeliveryPolicy();
-        if (redeliveryPolicy != null) {
-            physicalConnection.setRedeliveryPolicy(redeliveryPolicy);
-        }
-        return physicalConnection;
-    }
-
-    /**
-     * @see javax.resource.spi.ResourceAdapter#stop()
-     */
-    public void stop() {
-        while (endpointWorkers.size() > 0) {
-            ActiveMQEndpointActivationKey key = endpointWorkers.keySet().iterator().next();
-            endpointDeactivation(key.getMessageEndpointFactory(), key.getActivationSpec());
-        }
-        
-        synchronized( this ) {
-            if (broker != null) {
-                if( brokerStartThread.isAlive() ) {
-                    brokerStartThread.interrupt();
-                }
-                ServiceSupport.dispose(broker);
-                broker = null;
-            }
-        }
-        
-        this.bootstrapContext = null;
-    }
-
-    /**
-     * @see org.apache.activemq.ra.MessageResourceAdapter#getBootstrapContext()
-     */
-    public BootstrapContext getBootstrapContext() {
-        return bootstrapContext;
-    }
-
-    /**
-     * @see javax.resource.spi.ResourceAdapter#endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory,
-     *      javax.resource.spi.ActivationSpec)
-     */
-    public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec activationSpec) throws ResourceException {
-
-        // spec section 5.3.3
-        if (!equals(activationSpec.getResourceAdapter())) {
-            throw new ResourceException("Activation spec not initialized with this ResourceAdapter instance (" + activationSpec.getResourceAdapter() + " != " + this + ")");
-        }
-
-        if (!(activationSpec instanceof MessageActivationSpec)) {
-            throw new NotSupportedException("That type of ActicationSpec not supported: " + activationSpec.getClass());
-        }
-
-        ActiveMQEndpointActivationKey key = new ActiveMQEndpointActivationKey(endpointFactory, (MessageActivationSpec)activationSpec);
-        // This is weird.. the same endpoint activated twice.. must be a
-        // container error.
-        if (endpointWorkers.containsKey(key)) {
-            throw new IllegalStateException("Endpoint previously activated");
-        }
-
-        ActiveMQEndpointWorker worker = new ActiveMQEndpointWorker(this, key);
-
-        endpointWorkers.put(key, worker);
-        worker.start();
-    }
-
-    /**
-     * @see javax.resource.spi.ResourceAdapter#endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory,
-     *      javax.resource.spi.ActivationSpec)
-     */
-    public void endpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec activationSpec) {
-
-        if (activationSpec instanceof MessageActivationSpec) {
-            ActiveMQEndpointActivationKey key = new ActiveMQEndpointActivationKey(endpointFactory, (MessageActivationSpec)activationSpec);
-            ActiveMQEndpointWorker worker = endpointWorkers.remove(key);
-            if (worker == null) {
-                // This is weird.. that endpoint was not activated.. oh well..
-                // this method
-                // does not throw exceptions so just return.
-                return;
-            }
-            try {
-                worker.stop();
-            } catch (InterruptedException e) {
-                // We interrupted.. we won't throw an exception but will stop
-                // waiting for the worker
-                // to stop.. we tried our best. Keep trying to interrupt the
-                // thread.
-                Thread.currentThread().interrupt();
-            }
-
-        }
-
-    }
-
-    /**
-     * We only connect to one resource manager per ResourceAdapter instance, so
-     * any ActivationSpec will return the same XAResource.
-     * 
-     * @see javax.resource.spi.ResourceAdapter#getXAResources(javax.resource.spi.ActivationSpec[])
-     */
-    public XAResource[] getXAResources(ActivationSpec[] activationSpecs) throws ResourceException {
-        Connection connection = null;
-        try {
-            connection = makeConnection();
-            if (connection instanceof XAConnection) {
-                XASession session = ((XAConnection)connection).createXASession();
-                XAResource xaResource = session.getXAResource();
-                return new XAResource[] {
-                    xaResource
-                };
-            }
-            return new XAResource[] {};
-        } catch (JMSException e) {
-            throw new ResourceException(e);
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-                //
-            }
-        }
-    }
-
-    // ///////////////////////////////////////////////////////////////////////
-    //
-    // Java Bean getters and setters for this ResourceAdapter class.
-    //
-    // ///////////////////////////////////////////////////////////////////////
-
-    /**
-     * @see org.apache.activemq.ra.MessageResourceAdapter#getBrokerXmlConfig()
-     */
-    public String getBrokerXmlConfig() {
-        return brokerXmlConfig;
-    }
-
-    /**
-     * Sets the <a href="http://activemq.org/Xml+Configuration">XML
-     * configuration file </a> used to configure the ActiveMQ broker via Spring
-     * if using embedded mode.
-     * 
-     * @param brokerXmlConfig is the filename which is assumed to be on the
-     *                classpath unless a URL is specified. So a value of
-     *                <code>foo/bar.xml</code> would be assumed to be on the
-     *                classpath whereas <code>file:dir/file.xml</code> would
-     *                use the file system. Any valid URL string is supported.
-     */
-    public void setBrokerXmlConfig(String brokerXmlConfig) {
-        this.brokerXmlConfig = brokerXmlConfig;
-    }
-
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (!(o instanceof MessageResourceAdapter)) {
-            return false;
-        }
-
-        final MessageResourceAdapter activeMQResourceAdapter = (MessageResourceAdapter)o;
-
-        if (!getInfo().equals(activeMQResourceAdapter.getInfo())) {
-            return false;
-        }
-        if (notEqual(brokerXmlConfig, activeMQResourceAdapter.getBrokerXmlConfig())) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        int result;
-        result = getInfo().hashCode();
-        if (brokerXmlConfig != null) {
-            result ^= brokerXmlConfig.hashCode();
-        }
-        return result;
-    }
-
-    public ActiveMQConnectionFactory getConnectionFactory() {
-        return connectionFactory;
-    }
-
-    public void setConnectionFactory(ActiveMQConnectionFactory aConnectionFactory) {
-        this.connectionFactory = aConnectionFactory;
-    }
-
-
-    }
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxy.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxy.java
deleted file mode 100755
index 800e73a..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxy.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.ConnectionMetaData;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicSession;
-
-import org.apache.activemq.ActiveMQConnectionMetaData;
-
-/**
- * A {@link Connection} implementation which can be used with the ActiveMQ JCA
- * Resource Adapter to publish messages using the same JMS session that is used to dispatch
- * messages.
- *
- * 
- */
-public class InboundConnectionProxy implements Connection, QueueConnection, TopicConnection {
-
-    public Session createSession(boolean transacted, int ackMode) throws JMSException {
-        // TODO we could decide to barf if someone passes in incompatible options
-        return new InboundSessionProxy();
-    }
-
-    public QueueSession createQueueSession(boolean transacted, int ackMode) throws JMSException {
-        // TODO we could decide to barf if someone passes in incompatible options
-        return new InboundSessionProxy();
-    }
-
-    public TopicSession createTopicSession(boolean transacted, int ackMode) throws JMSException {
-        // TODO we could decide to barf if someone passes in incompatible options
-        return new InboundSessionProxy();
-    }
-
-    public void start() throws JMSException {
-        // the JCA RA is in control of this
-    }
-
-    public void stop() throws JMSException {
-        // the JCA RA is in control of this
-    }
-
-    public void close() throws JMSException {
-        // the JCA RA is in control of this
-    }
-
-    public ConnectionMetaData getMetaData() throws JMSException {
-        return ActiveMQConnectionMetaData.INSTANCE;
-    }
-
-    public String getClientID() throws JMSException {
-        throw createNotSupported("getClientID()");
-    }
-
-    public void setClientID(String s) throws JMSException {
-        throw createNotSupported("setClient()");
-    }
-
-    public ExceptionListener getExceptionListener() throws JMSException {
-        throw createNotSupported("getExceptionListener()");
-    }
-
-    public void setExceptionListener(ExceptionListener exceptionListener) throws JMSException {
-        throw createNotSupported("setExceptionListener()");
-    }
-
-    public ConnectionConsumer createConnectionConsumer(Destination destination, String s, ServerSessionPool serverSessionPool, int i) throws JMSException {
-        throw createNotSupported("createConnectionConsumer()");
-    }
-
-    public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String s, String s1, ServerSessionPool serverSessionPool, int i) throws JMSException {
-        throw createNotSupported("createDurableConnectionConsumer()");
-    }
-
-    public ConnectionConsumer createConnectionConsumer(Queue queue, String s, ServerSessionPool serverSessionPool, int i) throws JMSException {
-        throw createNotSupported("createConnectionConsumer()");
-    }
-
-    public ConnectionConsumer createConnectionConsumer(Topic topic, String s, ServerSessionPool serverSessionPool, int i) throws JMSException {
-        throw createNotSupported("createConnectionConsumer()");
-    }
-
-    protected JMSException createNotSupported(String text) {
-        return new JMSException("Operation: " + text + " is not supported for this proxy JCA ResourceAdapter provider");
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxyFactory.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxyFactory.java
deleted file mode 100755
index 57119ae..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxyFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-
-/**
- * A {@link ConnectionFactory} implementation which creates connections which can
- * be used with the ActiveMQ JCA Resource Adapter to publish messages using the
- * same underlying JMS session that is used to dispatch messages.
- *
- * 
- */
-public class InboundConnectionProxyFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory {
-
-    public Connection createConnection() throws JMSException {
-        return new InboundConnectionProxy();
-    }
-
-    public Connection createConnection(String userName, String password) throws JMSException {
-        return createConnection();
-    }
-
-    public QueueConnection createQueueConnection() throws JMSException {
-        return new InboundConnectionProxy();
-    }
-
-    public QueueConnection createQueueConnection(String userName, String password) throws JMSException {
-        return createQueueConnection();
-    }
-
-    public TopicConnection createTopicConnection() throws JMSException {
-        return new InboundConnectionProxy();
-    }
-
-    public TopicConnection createTopicConnection(String userName, String password) throws JMSException {
-        return createTopicConnection();
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContext.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContext.java
deleted file mode 100755
index 645a9e7..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContext.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-/**
- * Represents an object which has-a {@link Session} instance and
- * an optional, lazily created {@link MessageProducer} instance
- * which can them be used by a pooling based JMS provider for publishing
- * messages using the session used by the current thread.
- *
- * 
- */
-public interface InboundContext {
-
-    /**
-     * Returns the current session being used to process a JMS message in the current thread.
-     */
-    Session getSession() throws JMSException;
-
-    /**
-     * Lazily creates a message producer that can be used to send messages using the
-     * same JMS Session which is being used to dispatch messages which minimises the XA
-     * overheard of consuming and producing or allows JMS transactions to be used for consuming
-     * and producing messages.
-     *
-     * @return the current message producer or a new one is lazily created, using a null
-     *         destination so the destination must be specified on a send() method.
-     * @throws javax.jms.JMSException
-     */
-    MessageProducer getMessageProducer() throws JMSException;
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContextSupport.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContextSupport.java
deleted file mode 100755
index 5264b43..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContextSupport.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.ra;
-
-/**
- * A helper class used to provide access to the current active
- * {@link InboundContext} instance being used to process a message in the
- * current thread so that messages can be produced using the same session.
- * 
- * 
- */
-public final class InboundContextSupport {
-
-    private static final ThreadLocal<InboundContext> THREAD_LOCAL = new ThreadLocal<InboundContext>();
-
-    private InboundContextSupport() {
-    }
-
-    /**
-     * Returns the current {@link InboundContext} used by the current thread
-     * which is processing a message. This allows us to access the current
-     * Session to send a message using the same underlying session to avoid
-     * unnecessary XA or to use regular JMS transactions while using message
-     * driven POJOs.
-     * 
-     * @return
-     */
-    public static InboundContext getActiveSessionAndProducer() {
-        return THREAD_LOCAL.get();
-    }
-
-    /**
-     * Registers the session and producer which should be called before the
-     * {@link javax.resource.spi.endpoint.MessageEndpoint#beforeDelivery(java.lang.reflect.Method)}
-     * method is called.
-     * 
-     * @param sessionAndProducer
-     */
-    public static void register(InboundContext sessionAndProducer) {
-        THREAD_LOCAL.set(sessionAndProducer);
-    }
-
-    /**
-     * Unregisters the session and producer which should be called after the
-     * {@link javax.resource.spi.endpoint.MessageEndpoint#afterDelivery()}
-     * method is called.
-     * 
-     * @param sessionAndProducer
-     */
-    public static void unregister(InboundContext sessionAndProducer) {
-        THREAD_LOCAL.set(null);
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundMessageProducerProxy.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundMessageProducerProxy.java
deleted file mode 100755
index 3ed5ef8..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundMessageProducerProxy.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueSender;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-
-/**
- * An implementation of {@link MessageProducer} which uses the ActiveMQ JCA ResourceAdapter's
- * current thread's JMS {@link javax.jms.Session} to send messages.
- *
- * 
- */
-public class InboundMessageProducerProxy implements MessageProducer, QueueSender, TopicPublisher {
-    
-    private MessageProducer messageProducer;
-    private Destination destination;
-    private int deliveryMode;
-    private boolean disableMessageID;
-    private boolean disableMessageTimestamp;
-    private int priority;
-    private long timeToLive;
-
-    public InboundMessageProducerProxy(MessageProducer messageProducer, Destination destination) throws JMSException {
-        this.messageProducer = messageProducer;
-        this.destination = destination;
-
-        this.deliveryMode = messageProducer.getDeliveryMode();
-        this.disableMessageID = messageProducer.getDisableMessageID();
-        this.disableMessageTimestamp = messageProducer.getDisableMessageTimestamp();
-        this.priority = messageProducer.getPriority();
-        this.timeToLive = messageProducer.getTimeToLive();
-    }
-
-    public void close() throws JMSException {
-        // do nothing as we just go back into the pool
-        // though lets reset the various settings which may have been changed
-        messageProducer.setDeliveryMode(deliveryMode);
-        messageProducer.setDisableMessageID(disableMessageID);
-        messageProducer.setDisableMessageTimestamp(disableMessageTimestamp);
-        messageProducer.setPriority(priority);
-        messageProducer.setTimeToLive(timeToLive);
-    }
-
-    public Destination getDestination() throws JMSException {
-        return destination;
-    }
-
-    public int getDeliveryMode() throws JMSException {
-        return messageProducer.getDeliveryMode();
-    }
-
-    public boolean getDisableMessageID() throws JMSException {
-        return messageProducer.getDisableMessageID();
-    }
-
-    public boolean getDisableMessageTimestamp() throws JMSException {
-        return messageProducer.getDisableMessageTimestamp();
-    }
-
-    public int getPriority() throws JMSException {
-        return messageProducer.getPriority();
-    }
-
-    public long getTimeToLive() throws JMSException {
-        return messageProducer.getTimeToLive();
-    }
-
-    public void send(Destination destination, Message message) throws JMSException {
-        if (destination == null) {
-            destination = this.destination;
-        }
-        messageProducer.send(destination, message);
-    }
-
-    public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
-        if (destination == null) {
-            destination = this.destination;
-        }
-        messageProducer.send(destination, message, deliveryMode, priority, timeToLive);
-    }
-
-    public void send(Message message) throws JMSException {
-        messageProducer.send(destination, message);
-    }
-
-    public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
-        messageProducer.send(destination, message, deliveryMode, priority, timeToLive);
-    }
-
-    public void setDeliveryMode(int i) throws JMSException {
-        messageProducer.setDeliveryMode(i);
-    }
-
-    public void setDisableMessageID(boolean b) throws JMSException {
-        messageProducer.setDisableMessageID(b);
-    }
-
-    public void setDisableMessageTimestamp(boolean b) throws JMSException {
-        messageProducer.setDisableMessageTimestamp(b);
-    }
-
-    public void setPriority(int i) throws JMSException {
-        messageProducer.setPriority(i);
-    }
-
-    public void setTimeToLive(long l) throws JMSException {
-        messageProducer.setTimeToLive(l);
-    }
-
-    public Queue getQueue() throws JMSException {
-        return (Queue) messageProducer.getDestination();
-    }
-
-    public void send(Queue arg0, Message arg1) throws JMSException {
-        messageProducer.send(arg0, arg1);
-    }
-
-    public void send(Queue arg0, Message arg1, int arg2, int arg3, long arg4) throws JMSException {
-        messageProducer.send(arg0, arg1, arg2, arg3, arg4);
-    }
-
-    public Topic getTopic() throws JMSException {
-        return (Topic) messageProducer.getDestination();
-    }
-
-    public void publish(Message arg0) throws JMSException {
-        messageProducer.send(arg0);
-    }
-
-    public void publish(Message arg0, int arg1, int arg2, long arg3) throws JMSException {
-        messageProducer.send(arg0, arg1, arg2, arg3);
-    }
-
-    public void publish(Topic arg0, Message arg1) throws JMSException {
-        messageProducer.send(arg0, arg1);
-    }
-
-    public void publish(Topic arg0, Message arg1, int arg2, int arg3, long arg4) throws JMSException {
-        messageProducer.send(arg0, arg1, arg2, arg3, arg4);
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundSessionProxy.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundSessionProxy.java
deleted file mode 100755
index ae9d848..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundSessionProxy.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.Serializable;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-
-/**
- * A {@link Session} implementation which can be used with the ActiveMQ JCA
- * Resource Adapter to publish messages using the same JMS session that is used
- * to dispatch messages.
- * 
- * 
- */
-public class InboundSessionProxy implements Session, QueueSession, TopicSession {
-
-    private InboundContext sessionAndProducer;
-
-    public Session getSession() throws JMSException {
-        return getSessionAndProducer().getSession();
-    }
-
-    public QueueSession getQueueSession() throws JMSException {
-        Session session = getSession();
-        if (session instanceof QueueSession) {
-            return (QueueSession)session;
-        } else {
-            throw new JMSException("The underlying JMS Session does not support QueueSession semantics: " + session);
-        }
-    }
-
-    public TopicSession getTopicSession() throws JMSException {
-        Session session = getSession();
-        if (session instanceof TopicSession) {
-            return (TopicSession)session;
-        } else {
-            throw new JMSException("The underlying JMS Session does not support TopicSession semantics: " + session);
-        }
-    }
-
-    public InboundContext getSessionAndProducer() throws JMSException {
-        if (sessionAndProducer == null) {
-            sessionAndProducer = InboundContextSupport.getActiveSessionAndProducer();
-            if (sessionAndProducer == null) {
-                throw new JMSException("No currently active Session. This JMS provider cannot be used outside a MessageListener.onMessage() invocation");
-            }
-        }
-        return sessionAndProducer;
-    }
-
-    public MessageProducer createProducer(Destination destination) throws JMSException {
-        return new InboundMessageProducerProxy(getSessionAndProducer().getMessageProducer(), destination);
-    }
-
-    public void close() throws JMSException {
-        // we don't allow users to close this session
-        // as its used by the JCA container
-    }
-
-    public void commit() throws JMSException {
-        // the JCA container will handle transactions
-    }
-
-    public void rollback() throws JMSException {
-        // the JCA container will handle transactions
-    }
-
-    public void recover() throws JMSException {
-        // the JCA container will handle recovery
-    }
-
-    public void run() {
-        try {
-            getSession().run();
-        } catch (JMSException e) {
-            throw new RuntimeException("Failed to run() on session due to: " + e, e);
-        }
-    }
-
-    // Straightforward delegation methods
-    // -------------------------------------------------------------------------
-
-    public QueueBrowser createBrowser(Queue queue) throws JMSException {
-        return getSession().createBrowser(queue);
-    }
-
-    public QueueBrowser createBrowser(Queue queue, String s) throws JMSException {
-        return getSession().createBrowser(queue, s);
-    }
-
-    public BytesMessage createBytesMessage() throws JMSException {
-        return getSession().createBytesMessage();
-    }
-
-    public MessageConsumer createConsumer(Destination destination) throws JMSException {
-        return getSession().createConsumer(destination);
-    }
-
-    public MessageConsumer createConsumer(Destination destination, String s) throws JMSException {
-        return getSession().createConsumer(destination, s);
-    }
-
-    public MessageConsumer createConsumer(Destination destination, String s, boolean b) throws JMSException {
-        return getSession().createConsumer(destination, s, b);
-    }
-
-    public TopicSubscriber createDurableSubscriber(Topic topic, String s) throws JMSException {
-        return getSession().createDurableSubscriber(topic, s);
-    }
-
-    public TopicSubscriber createDurableSubscriber(Topic topic, String s, String s1, boolean b) throws JMSException {
-        return getSession().createDurableSubscriber(topic, s, s1, b);
-    }
-
-    public MapMessage createMapMessage() throws JMSException {
-        return getSession().createMapMessage();
-    }
-
-    public Message createMessage() throws JMSException {
-        return getSession().createMessage();
-    }
-
-    public ObjectMessage createObjectMessage() throws JMSException {
-        return getSession().createObjectMessage();
-    }
-
-    public ObjectMessage createObjectMessage(Serializable serializable) throws JMSException {
-        return getSession().createObjectMessage(serializable);
-    }
-
-    public Queue createQueue(String s) throws JMSException {
-        return getSession().createQueue(s);
-    }
-
-    public StreamMessage createStreamMessage() throws JMSException {
-        return getSession().createStreamMessage();
-    }
-
-    public TemporaryQueue createTemporaryQueue() throws JMSException {
-        return getSession().createTemporaryQueue();
-    }
-
-    public TemporaryTopic createTemporaryTopic() throws JMSException {
-        return getSession().createTemporaryTopic();
-    }
-
-    public TextMessage createTextMessage() throws JMSException {
-        return getSession().createTextMessage();
-    }
-
-    public TextMessage createTextMessage(String s) throws JMSException {
-        return getSession().createTextMessage(s);
-    }
-
-    public Topic createTopic(String s) throws JMSException {
-        return getSession().createTopic(s);
-    }
-
-    public int getAcknowledgeMode() throws JMSException {
-        return getSession().getAcknowledgeMode();
-    }
-
-    public MessageListener getMessageListener() throws JMSException {
-        return getSession().getMessageListener();
-    }
-
-    public boolean getTransacted() throws JMSException {
-        return getSession().getTransacted();
-    }
-
-    public void setMessageListener(MessageListener messageListener) throws JMSException {
-        getSession().setMessageListener(messageListener);
-    }
-
-    public void unsubscribe(String s) throws JMSException {
-        getSession().unsubscribe(s);
-    }
-
-    public QueueReceiver createReceiver(Queue queue) throws JMSException {
-        return getQueueSession().createReceiver(queue);
-    }
-
-    public QueueReceiver createReceiver(Queue queue, String s) throws JMSException {
-        return getQueueSession().createReceiver(queue, s);
-    }
-
-    public QueueSender createSender(Queue queue) throws JMSException {
-        return new InboundMessageProducerProxy(getSessionAndProducer().getMessageProducer(), queue);
-    }
-
-    public TopicSubscriber createSubscriber(Topic topic) throws JMSException {
-        return getTopicSession().createSubscriber(topic);
-    }
-
-    public TopicSubscriber createSubscriber(Topic topic, String s, boolean b) throws JMSException {
-        return getTopicSession().createSubscriber(topic, s, b);
-    }
-
-    public TopicPublisher createPublisher(Topic topic) throws JMSException {
-        return getTopicSession().createPublisher(topic);
-    }
-
-    public String toString() {
-        try {
-            return "InboundSessionProxy { " + getSession() + " }";
-        } catch (JMSException e) {
-            return "InboundSessionProxy { null }";
-        }
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InvalidMessageEndpointException.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InvalidMessageEndpointException.java
deleted file mode 100755
index 6bac7da..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InvalidMessageEndpointException.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.ra;
-
-/**
- * Thrown to indicate that a MessageEndpoint is no longer valid
- * and should be discarded. 
- *  
- * @author <a href="mailto:michael.gaffney@panacya.com">Michael Gaffney </a>
- */
-public class InvalidMessageEndpointException extends RuntimeException {
-
-    private static final long serialVersionUID = -9007051892399939057L;
-
-    /**
-     * Constructs a new exception with <code>null</code> as its detail message.
-     * The cause is not initialized, and may subsequently be initialized by a
-     * call to {@link #initCause}.
-     */
-    public InvalidMessageEndpointException() {
-        super();
-    }
-
-    /**
-     * Constructs a new exception with the specified detail message.  The
-     * cause is not initialized, and may subsequently be initialized by
-     * a call to {@link #initCause}.
-     *
-     * @param message the detail message. The detail message is saved for
-     *                later retrieval by the {@link #getMessage()} method.
-     */
-    public InvalidMessageEndpointException(final String message) {
-        super(message);
-    }
-
-    /**
-     * Constructs a new exception with the specified detail message and
-     * cause.  <p>Note that the detail message associated with
-     * <code>cause</code> is <i>not</i> automatically incorporated in
-     * this exception's detail message.
-     *
-     * @param message the detail message (which is saved for later retrieval
-     *                by the {@link #getMessage()} method).
-     * @param cause   the cause (which is saved for later retrieval by the
-     *                {@link #getCause()} method).  (A <tt>null</tt> value is
-     *                permitted, and indicates that the cause is nonexistent or
-     *                unknown.)
-     */
-    public InvalidMessageEndpointException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Constructs a new exception with the specified cause and a detail
-     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
-     * typically contains the class and detail message of <tt>cause</tt>).
-     * This constructor is useful for exceptions that are little more than
-     * wrappers for other throwables (for example, {@link
-     * java.security.PrivilegedActionException}).
-     *
-     * @param cause the cause (which is saved for later retrieval by the
-     *              {@link #getCause()} method).  (A <tt>null</tt> value is
-     *              permitted, and indicates that the cause is nonexistent or
-     *              unknown.)
-     */
-    public InvalidMessageEndpointException(final Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
deleted file mode 100755
index e53cd5c..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.JMSException;
-import javax.resource.ResourceException;
-import javax.resource.spi.LocalTransaction;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import org.apache.activemq.TransactionContext;
-
-/**
- * Used to provide a LocalTransaction and XAResource to a JMS session.
- */
-public class LocalAndXATransaction implements XAResource, LocalTransaction {
-
-    private final TransactionContext transactionContext;
-    private boolean inManagedTx;
-
-    public LocalAndXATransaction(TransactionContext transactionContext) {
-        this.transactionContext = transactionContext;
-    }
-
-    public void setInManagedTx(boolean inManagedTx) throws JMSException {
-        this.inManagedTx = inManagedTx;
-        if (!inManagedTx) {
-            transactionContext.cleanup();
-        }
-    }
-
-    public void begin() throws ResourceException {
-        try {
-            transactionContext.begin();
-            setInManagedTx(true);
-        } catch (JMSException e) {
-            throw new ResourceException("begin failed.", e);
-        }
-    }
-
-    public void commit() throws ResourceException {
-        try {
-            transactionContext.commit();
-        } catch (JMSException e) {
-            throw new ResourceException("commit failed.", e);
-        } finally {
-            try {
-                setInManagedTx(false);
-            } catch (JMSException e) {
-                throw new ResourceException("commit failed.", e);
-            }
-        }
-    }
-
-    public void rollback() throws ResourceException {
-        try {
-            transactionContext.rollback();
-        } catch (JMSException e) {
-            throw new ResourceException("rollback failed.", e);
-        } finally {
-            try {
-                setInManagedTx(false);
-            } catch (JMSException e) {
-                throw new ResourceException("rollback failed.", e);
-            }
-        }
-    }
-
-    public void commit(Xid arg0, boolean arg1) throws XAException {
-        transactionContext.commit(arg0, arg1);
-    }
-
-    public void end(Xid arg0, int arg1) throws XAException {
-        try {
-            transactionContext.end(arg0, arg1);
-        } finally {
-            try {
-                setInManagedTx(false);
-            } catch (JMSException e) {
-                throw (XAException)new XAException(XAException.XAER_PROTO).initCause(e);
-            }
-        }
-    }
-
-    public void forget(Xid arg0) throws XAException {
-        transactionContext.forget(arg0);
-    }
-
-    public int getTransactionTimeout() throws XAException {
-        return transactionContext.getTransactionTimeout();
-    }
-
-    public boolean isSameRM(XAResource xaresource) throws XAException {
-        if (xaresource == null) {
-            return false;
-        }
-        // Do we have to unwrap?
-        if (xaresource instanceof LocalAndXATransaction) {
-            xaresource = ((LocalAndXATransaction)xaresource).transactionContext;
-        }
-        return transactionContext.isSameRM(xaresource);
-    }
-
-    public int prepare(Xid arg0) throws XAException {
-        return transactionContext.prepare(arg0);
-    }
-
-    public Xid[] recover(int arg0) throws XAException {
-        return transactionContext.recover(arg0);
-    }
-
-    public void rollback(Xid arg0) throws XAException {
-        transactionContext.rollback(arg0);
-    }
-
-    public boolean setTransactionTimeout(int arg0) throws XAException {
-        return transactionContext.setTransactionTimeout(arg0);
-    }
-
-    public void start(Xid arg0, int arg1) throws XAException {
-        transactionContext.start(arg0, arg1);
-        try {
-            setInManagedTx(true);
-        } catch (JMSException e) {
-            throw (XAException)new XAException(XAException.XAER_PROTO).initCause(e);
-        }
-    }
-
-    public boolean isInManagedTx() {
-        return inManagedTx;
-    }
-
-    public void cleanup() {
-        transactionContext.cleanup();
-        inManagedTx = false;
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedConnectionProxy.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedConnectionProxy.java
deleted file mode 100755
index c4dc8d7..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedConnectionProxy.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/**
- * 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.ra;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionConsumer;
-import javax.jms.ConnectionMetaData;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.IllegalStateException;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicSession;
-import org.apache.activemq.ActiveMQQueueSession;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.ActiveMQTopicSession;
-
-/**
- * Acts as a pass through proxy for a JMS Connection object. It intercepts
- * events that are of interest of the ActiveMQManagedConnection.
- *
- * 
- */
-public class ManagedConnectionProxy implements Connection, QueueConnection, TopicConnection, ExceptionListener {
-
-    private ActiveMQManagedConnection managedConnection;
-    private final List<ManagedSessionProxy> sessions = new ArrayList<ManagedSessionProxy>();
-    private ExceptionListener exceptionListener;
-
-    public ManagedConnectionProxy(ActiveMQManagedConnection managedConnection) {
-        this.managedConnection = managedConnection;
-    }
-
-    /**
-     * Used to let the ActiveMQManagedConnection that this connection handel is
-     * not needed by the app.
-     *
-     * @throws JMSException
-     */
-    public void close() throws JMSException {
-        if (managedConnection != null) {
-            managedConnection.proxyClosedEvent(this);
-        }
-    }
-
-    /**
-     * Called by the ActiveMQManagedConnection to invalidate this proxy.
-     */
-    public void cleanup() {
-        exceptionListener = null;
-        managedConnection = null;
-        synchronized (sessions) {
-            for (ManagedSessionProxy p : sessions) {
-                try {
-                    //TODO is this dangerous?  should we copy the list before iterating?
-                    p.cleanup();
-                } catch (JMSException ignore) {
-                }
-            }
-            sessions.clear();
-        }
-    }
-
-    /**
-     * @return "physical" underlying activemq connection, if proxy is associated with a managed connection
-     * @throws javax.jms.JMSException if managed connection is null
-     */
-    private Connection getConnection() throws JMSException {
-        if (managedConnection == null) {
-            throw new IllegalStateException("The Connection is closed");
-        }
-        return managedConnection.getPhysicalConnection();
-    }
-
-    /**
-     * @param transacted      Whether session is transacted
-     * @param acknowledgeMode session acknowledge mode
-     * @return session proxy
-     * @throws JMSException on error
-     */
-    public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException {
-        return createSessionProxy(transacted, acknowledgeMode);
-    }
-
-    /**
-     * @param transacted      Whether session is transacted
-     * @param acknowledgeMode session acknowledge mode
-     * @return session proxy
-     * @throws JMSException on error
-     */
-    private ManagedSessionProxy createSessionProxy(boolean transacted, int acknowledgeMode) throws JMSException {
-        if (!transacted && acknowledgeMode == Session.SESSION_TRANSACTED) {
-            acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
-        }
-        ActiveMQSession session = (ActiveMQSession) getConnection().createSession(transacted, acknowledgeMode);
-        ManagedTransactionContext txContext = new ManagedTransactionContext(managedConnection.getTransactionContext());
-        session.setTransactionContext(txContext);
-        ManagedSessionProxy p = new ManagedSessionProxy(session, this);
-        p.setUseSharedTxContext(managedConnection.isInManagedTx());
-        synchronized (sessions) {
-            sessions.add(p);
-        }
-        return p;
-    }
-
-    protected void sessionClosed(ManagedSessionProxy session) {
-        synchronized (sessions) {
-            sessions.remove(session);
-        }
-    }
-
-    public void setUseSharedTxContext(boolean enable) throws JMSException {
-        synchronized (sessions) {
-            for (ManagedSessionProxy p : sessions) {
-                p.setUseSharedTxContext(enable);
-            }
-        }
-    }
-
-    /**
-     * @param transacted      Whether session is transacted
-     * @param acknowledgeMode session acknowledge mode
-     * @return session proxy
-     * @throws JMSException on error
-     */
-    public QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws JMSException {
-        return new ActiveMQQueueSession(createSessionProxy(transacted, acknowledgeMode));
-    }
-
-    /**
-     * @param transacted      Whether session is transacted
-     * @param acknowledgeMode session acknowledge mode
-     * @return session proxy
-     * @throws JMSException on error
-     */
-    public TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws JMSException {
-        return new ActiveMQTopicSession(createSessionProxy(transacted, acknowledgeMode));
-    }
-
-    /**
-     * @return client id from delegate
-     * @throws JMSException
-     */
-    public String getClientID() throws JMSException {
-        return getConnection().getClientID();
-    }
-
-    /**
-     * @return exception listener from delegate
-     * @throws JMSException
-     */
-    public ExceptionListener getExceptionListener() throws JMSException {
-        return getConnection().getExceptionListener();
-    }
-
-    /**
-     * @return connection metadata from delegate
-     * @throws JMSException
-     */
-    public ConnectionMetaData getMetaData() throws JMSException {
-        return getConnection().getMetaData();
-    }
-
-    /**
-     * Sets client id on delegate
-     * @param clientID new clientId
-     * @throws JMSException
-     */
-    public void setClientID(String clientID) throws JMSException {
-        getConnection().setClientID(clientID);
-    }
-
-    /**
-     * sets exception listener on delegate
-     * @param listener new listener
-     * @throws JMSException
-     */
-    public void setExceptionListener(ExceptionListener listener) throws JMSException {
-        getConnection();
-        exceptionListener = listener;
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void start() throws JMSException {
-        getConnection().start();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void stop() throws JMSException {
-        getConnection().stop();
-    }
-
-    /**
-     * @param queue
-     * @param messageSelector
-     * @param sessionPool
-     * @param maxMessages
-     * @return
-     * @throws JMSException
-     */
-    public ConnectionConsumer createConnectionConsumer(Queue queue, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
-        throw new JMSException("Not Supported.");
-    }
-
-    /**
-     * @param topic
-     * @param messageSelector
-     * @param sessionPool
-     * @param maxMessages
-     * @return
-     * @throws JMSException
-     */
-    public ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
-        throw new JMSException("Not Supported.");
-    }
-
-    /**
-     * @param destination
-     * @param messageSelector
-     * @param sessionPool
-     * @param maxMessages
-     * @return
-     * @throws JMSException
-     */
-    public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
-        throw new JMSException("Not Supported.");
-    }
-
-    /**
-     * @param topic
-     * @param subscriptionName
-     * @param messageSelector
-     * @param sessionPool
-     * @param maxMessages
-     * @return
-     * @throws JMSException
-     */
-    public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
-        throw new JMSException("Not Supported.");
-    }
-
-    /**
-     * @return Returns the managedConnection.
-     */
-    public ActiveMQManagedConnection getManagedConnection() {
-        return managedConnection;
-    }
-
-    public void onException(JMSException e) {
-        if (exceptionListener != null && managedConnection != null) {
-            try {
-                exceptionListener.onException(e);
-            } catch (Throwable ignore) {
-                // We can never trust user code so ignore any exceptions.
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedSessionProxy.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedSessionProxy.java
deleted file mode 100755
index a71e48a..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedSessionProxy.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.Serializable;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-
-import org.apache.activemq.ActiveMQSession;
-
-/**
- * Acts as a pass through proxy for a JMS Session object. It intercepts events
- * that are of interest of the ActiveMQManagedConnection. There is one proxy for each session.
- * 
- * 
- */
-public class ManagedSessionProxy implements Session, QueueSession, TopicSession {
-
-    private final ActiveMQSession session;
-    private boolean closed;
-    private ManagedConnectionProxy connectionProxy;
-
-    public ManagedSessionProxy(ActiveMQSession session, ManagedConnectionProxy connectionProxy) {
-        this.session = session;
-        this.connectionProxy = connectionProxy;
-    }
-
-    public void setUseSharedTxContext(boolean enable) throws JMSException {
-        if (session.getTransactionContext() != null) {
-            ((ManagedTransactionContext)session.getTransactionContext()).setUseSharedTxContext(enable);
-        }
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void close() throws JMSException {
-    	if (closed) {
-    		return;
-        }
-        cleanup();
-        connectionProxy.sessionClosed(this);
-    }
-
-    /**
-     * Called by the ManagedConnectionProxy to invalidate this proxy.
-     * 
-     * @throws JMSException if session proxy has a problem
-     */
-    public void cleanup() throws JMSException {
-        closed = true;
-        session.close();
-    }
-
-    /**
-     *
-     * @return underlying session, unless this proxy is closed
-     * @throws javax.jms.JMSException if session is closed
-     */
-    private Session getSession() throws JMSException {
-        if (closed) {
-            throw new IllegalStateException("The Session is closed");
-        }
-        return session;
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void commit() throws JMSException {
-        getSession().commit();
-    }
-
-    /**
-     * @param queue
-     * @return
-     * @throws JMSException
-     */
-    public QueueBrowser createBrowser(Queue queue) throws JMSException {
-        return getSession().createBrowser(queue);
-    }
-
-    /**
-     * @param queue
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException {
-        return getSession().createBrowser(queue, messageSelector);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public BytesMessage createBytesMessage() throws JMSException {
-        return getSession().createBytesMessage();
-    }
-
-    /**
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination) throws JMSException {
-        return getSession().createConsumer(destination);
-    }
-
-    /**
-     * @param destination
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException {
-        return getSession().createConsumer(destination, messageSelector);
-    }
-
-    /**
-     * @param destination
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException {
-        return getSession().createConsumer(destination, messageSelector, noLocal);
-    }
-
-    /**
-     * @param topic
-     * @param name
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException {
-        return getSession().createDurableSubscriber(topic, name);
-    }
-
-    /**
-     * @param topic
-     * @param name
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
-        return getSession().createDurableSubscriber(topic, name, messageSelector, noLocal);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public MapMessage createMapMessage() throws JMSException {
-        return getSession().createMapMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public Message createMessage() throws JMSException {
-        return getSession().createMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public ObjectMessage createObjectMessage() throws JMSException {
-        return getSession().createObjectMessage();
-    }
-
-    /**
-     * @param object
-     * @return
-     * @throws JMSException
-     */
-    public ObjectMessage createObjectMessage(Serializable object) throws JMSException {
-        return getSession().createObjectMessage(object);
-    }
-
-    /**
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public MessageProducer createProducer(Destination destination) throws JMSException {
-        return getSession().createProducer(destination);
-    }
-
-    /**
-     * @param queueName
-     * @return
-     * @throws JMSException
-     */
-    public Queue createQueue(String queueName) throws JMSException {
-        return getSession().createQueue(queueName);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public StreamMessage createStreamMessage() throws JMSException {
-        return getSession().createStreamMessage();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TemporaryQueue createTemporaryQueue() throws JMSException {
-        return getSession().createTemporaryQueue();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TemporaryTopic createTemporaryTopic() throws JMSException {
-        return getSession().createTemporaryTopic();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public TextMessage createTextMessage() throws JMSException {
-        return getSession().createTextMessage();
-    }
-
-    /**
-     * @param text
-     * @return
-     * @throws JMSException
-     */
-    public TextMessage createTextMessage(String text) throws JMSException {
-        return getSession().createTextMessage(text);
-    }
-
-    /**
-     * @param topicName
-     * @return
-     * @throws JMSException
-     */
-    public Topic createTopic(String topicName) throws JMSException {
-        return getSession().createTopic(topicName);
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public int getAcknowledgeMode() throws JMSException {
-        return getSession().getAcknowledgeMode();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public MessageListener getMessageListener() throws JMSException {
-        return getSession().getMessageListener();
-    }
-
-    /**
-     * @return
-     * @throws JMSException
-     */
-    public boolean getTransacted() throws JMSException {
-        return getSession().getTransacted();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void recover() throws JMSException {
-        getSession().recover();
-    }
-
-    /**
-     * @throws JMSException
-     */
-    public void rollback() throws JMSException {
-        getSession().rollback();
-    }
-
-    /**
-     * @param listener
-     * @throws JMSException
-     */
-    public void setMessageListener(MessageListener listener) throws JMSException {
-        getSession().setMessageListener(listener);
-    }
-
-    /**
-     * @param name
-     * @throws JMSException
-     */
-    public void unsubscribe(String name) throws JMSException {
-        getSession().unsubscribe(name);
-    }
-
-    /**
-     * @param queue
-     * @return
-     * @throws JMSException
-     */
-    public QueueReceiver createReceiver(Queue queue) throws JMSException {
-        return ((QueueSession)getSession()).createReceiver(queue);
-    }
-
-    /**
-     * @param queue
-     * @param messageSelector
-     * @return
-     * @throws JMSException
-     */
-    public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException {
-        return ((QueueSession)getSession()).createReceiver(queue, messageSelector);
-    }
-
-    /**
-     * @param queue
-     * @return
-     * @throws JMSException
-     */
-    public QueueSender createSender(Queue queue) throws JMSException {
-        return ((QueueSession)getSession()).createSender(queue);
-    }
-
-    /**
-     * @param topic
-     * @return
-     * @throws JMSException
-     */
-    public TopicPublisher createPublisher(Topic topic) throws JMSException {
-        return ((TopicSession)getSession()).createPublisher(topic);
-    }
-
-    /**
-     * @param topic
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createSubscriber(Topic topic) throws JMSException {
-        return ((TopicSession)getSession()).createSubscriber(topic);
-    }
-
-    /**
-     * @param topic
-     * @param messageSelector
-     * @param noLocal
-     * @return
-     * @throws JMSException
-     */
-    public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException {
-        return ((TopicSession)getSession()).createSubscriber(topic, messageSelector, noLocal);
-    }
-
-    /**
-     * @see javax.jms.Session#run()
-     */
-    public void run() {
-        throw new RuntimeException("Operation not supported.");
-    }
-
-    public String toString() {
-        return "ManagedSessionProxy { " + session + " }";
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedTransactionContext.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedTransactionContext.java
deleted file mode 100755
index cd8d5e8..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedTransactionContext.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.JMSException;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import org.apache.activemq.TransactionContext;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.transaction.Synchronization;
-
-/**
- * Allows us to switch between using a shared transaction context, or using a
- * local transaction context.
- * 
- * 
- */
-public class ManagedTransactionContext extends TransactionContext {
-
-    private final TransactionContext sharedContext;
-    private boolean useSharedTxContext;
-
-    public ManagedTransactionContext(TransactionContext sharedContext) {
-        super(sharedContext.getConnection());
-        this.sharedContext = sharedContext;
-        setLocalTransactionEventListener(sharedContext.getLocalTransactionEventListener());
-    }
-
-    public void setUseSharedTxContext(boolean enable) throws JMSException {
-        if (isInLocalTransaction() || isInXATransaction()) {
-            throw new JMSException("The resource is allready being used in transaction context.");
-        }
-        useSharedTxContext = enable;
-    }
-
-    public void begin() throws JMSException {
-        if (useSharedTxContext) {
-            sharedContext.begin();
-        } else {
-            super.begin();
-        }
-    }
-
-    public void commit() throws JMSException {
-        if (useSharedTxContext) {
-            sharedContext.commit();
-        } else {
-            super.commit();
-        }
-    }
-
-    public void commit(Xid xid, boolean onePhase) throws XAException {
-        if (useSharedTxContext) {
-            sharedContext.commit(xid, onePhase);
-        } else {
-            super.commit(xid, onePhase);
-        }
-    }
-
-    public void end(Xid xid, int flags) throws XAException {
-        if (useSharedTxContext) {
-            sharedContext.end(xid, flags);
-        } else {
-            super.end(xid, flags);
-        }
-    }
-
-    public void forget(Xid xid) throws XAException {
-        if (useSharedTxContext) {
-            sharedContext.forget(xid);
-        } else {
-            super.forget(xid);
-        }
-    }
-
-    public TransactionId getTransactionId() {
-        if (useSharedTxContext) {
-            return sharedContext.getTransactionId();
-        } else {
-            return super.getTransactionId();
-        }
-    }
-
-    public int getTransactionTimeout() throws XAException {
-        if (useSharedTxContext) {
-            return sharedContext.getTransactionTimeout();
-        } else {
-            return super.getTransactionTimeout();
-        }
-    }
-
-    public boolean isInLocalTransaction() {
-        if (useSharedTxContext) {
-            return sharedContext.isInLocalTransaction();
-        } else {
-            return super.isInLocalTransaction();
-        }
-    }
-
-    public boolean isInXATransaction() {
-        if (useSharedTxContext) {
-            // context considers endesd XA transactions as active, so just check for presence
-            // of tx when it is shared
-            return sharedContext.isInTransaction();
-        } else {
-            return super.isInXATransaction();
-        }
-    }
-
-    @Override
-    public boolean isInTransaction() {
-        return isInXATransaction() || isInLocalTransaction();
-    }
- 
-    public boolean isSameRM(XAResource xaResource) throws XAException {
-        if (useSharedTxContext) {
-            return sharedContext.isSameRM(xaResource);
-        } else {
-            return super.isSameRM(xaResource);
-        }
-    }
-
-    public int prepare(Xid xid) throws XAException {
-        if (useSharedTxContext) {
-            return sharedContext.prepare(xid);
-        } else {
-            return super.prepare(xid);
-        }
-    }
-
-    public Xid[] recover(int flag) throws XAException {
-        if (useSharedTxContext) {
-            return sharedContext.recover(flag);
-        } else {
-            return super.recover(flag);
-        }
-    }
-
-    public void rollback() throws JMSException {
-        if (useSharedTxContext) {
-            sharedContext.rollback();
-        } else {
-            super.rollback();
-        }
-    }
-
-    public void rollback(Xid xid) throws XAException {
-        if (useSharedTxContext) {
-            sharedContext.rollback(xid);
-        } else {
-            super.rollback(xid);
-        }
-    }
-
-    public boolean setTransactionTimeout(int seconds) throws XAException {
-        if (useSharedTxContext) {
-            return sharedContext.setTransactionTimeout(seconds);
-        } else {
-            return super.setTransactionTimeout(seconds);
-        }
-    }
-
-    public void start(Xid xid, int flags) throws XAException {
-        if (useSharedTxContext) {
-            sharedContext.start(xid, flags);
-        } else {
-            super.start(xid, flags);
-        }
-    }
-
-    public void addSynchronization(Synchronization s) {
-        if (useSharedTxContext) {
-            sharedContext.addSynchronization(s);
-        } else {
-            super.addSynchronization(s);
-        }
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
deleted file mode 100755
index 64812cf..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- *
- * 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.ra;
-
-import org.apache.activemq.RedeliveryPolicy;
-
-import javax.resource.spi.ResourceAdapter;
-import javax.resource.spi.ActivationSpec;
-import java.util.List;
-
-/**
- * 
- */
-public interface MessageActivationSpec extends ActivationSpec {
-    boolean isValidUseRAManagedTransaction(List<String> errorMessages);
-
-    boolean isValidNoLocal(List<String> errorMessages);
-
-    boolean isValidMessageSelector(List<String> errorMessages);
-
-    boolean isValidMaxSessions(List<String> errorMessages);
-
-    boolean isValidMaxMessagesPerSessions(List<String> errorMessages);
-
-    boolean isValidMaxMessagesPerBatch(List<String> errorMessages);
-
-    boolean isValidEnableBatch(List<String> errorMessages);
-
-    /**
-     * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
-     */
-    ResourceAdapter getResourceAdapter();
-
-    /**
-     * @return Returns the destinationType.
-     */
-    String getDestinationType();
-
-    String getPassword();
-
-    String getUserName();
-
-    /**
-     * @return Returns the messageSelector.
-     */
-    String getMessageSelector();
-
-    /**
-     * @return Returns the noLocal.
-     */
-    String getNoLocal();
-
-    String getAcknowledgeMode();
-
-    String getClientId();
-
-    String getDestination();
-
-    String getSubscriptionDurability();
-
-    String getSubscriptionName();
-
-    boolean isValidSubscriptionName(List<String> errorMessages);
-
-    boolean isValidClientId(List<String> errorMessages);
-
-    boolean isDurableSubscription();
-
-    boolean isValidSubscriptionDurability(List<String> errorMessages);
-
-    boolean isValidAcknowledgeMode(List<String> errorMessages);
-
-    boolean isValidDestinationType(List<String> errorMessages);
-
-    boolean isValidDestination(List<String> errorMessages);
-
-    boolean isEmpty(String value);
-
-    int getAcknowledgeModeForSession();
-
-    String getMaxMessagesPerSessions();
-
-    String getMaxSessions();
-
-    String getUseRAManagedTransaction();
-
-    int getMaxMessagesPerSessionsIntValue();
-
-    int getMaxSessionsIntValue();
-
-    boolean isUseRAManagedTransactionEnabled();
-
-    boolean getNoLocalBooleanValue();
-
-    String getEnableBatch();
-
-    boolean getEnableBatchBooleanValue();
-
-    int getMaxMessagesPerBatchIntValue();
-
-    String getMaxMessagesPerBatch();
-
-    double getBackOffMultiplier();
-    
-    long getMaximumRedeliveryDelay();
-
-    long getInitialRedeliveryDelay();
-
-    int getMaximumRedeliveries();
-
-    boolean isUseExponentialBackOff();
-
-    RedeliveryPolicy redeliveryPolicy();
-
-    RedeliveryPolicy lazyCreateRedeliveryPolicy();
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java
deleted file mode 100755
index 14a2e10..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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.ra;
-
-import java.lang.reflect.Method;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.resource.ResourceException;
-import javax.resource.spi.endpoint.MessageEndpoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:michael.gaffney@panacya.com">Michael Gaffney </a>
- */
-public class MessageEndpointProxy implements MessageListener, MessageEndpoint {
-
-    private static final MessageEndpointState ALIVE = new MessageEndpointAlive();
-    private static final MessageEndpointState DEAD = new MessageEndpointDead();
-    private static final Logger LOG = LoggerFactory.getLogger(MessageEndpointProxy.class);
-
-    private static int proxyCount;
-    private final int proxyID;
-
-    private final MessageEndpoint endpoint;
-    private final MessageListener messageListener;
-    private MessageEndpointState state = ALIVE;
-
-    public MessageEndpointProxy(MessageEndpoint endpoint) {
-        if (!(endpoint instanceof MessageListener)) {
-            throw new IllegalArgumentException("MessageEndpoint is not a MessageListener");
-        }
-        messageListener = (MessageListener)endpoint;
-        proxyID = getID();
-        this.endpoint = endpoint;
-    }
-
-    private static int getID() {
-        return ++proxyCount;
-    }
-
-    public void beforeDelivery(Method method) throws NoSuchMethodException, ResourceException {
-        LOG.trace("Invoking MessageEndpoint.beforeDelivery()");
-        state.beforeDelivery(this, method);
-    }
-
-    public void onMessage(Message message) {
-        LOG.trace("Invoking MessageEndpoint.onMethod()");
-        state.onMessage(this, message);
-    }
-
-    public void afterDelivery() throws ResourceException {
-        LOG.trace("Invoking MessageEndpoint.afterDelivery()");
-        state.afterDelivery(this);
-    }
-
-    public void release() {
-        LOG.trace("Invoking MessageEndpoint.release()");
-        state.release(this);
-    }
-
-    public String toString() {
-        return "MessageEndpointProxy{ " + "proxyID: " + proxyID + ", endpoint: " + endpoint + " }";
-    }
-
-    private abstract static class MessageEndpointState {
-
-        public void beforeDelivery(MessageEndpointProxy proxy, Method method) throws NoSuchMethodException, ResourceException {
-            throw new IllegalStateException();
-        }
-
-        public void onMessage(MessageEndpointProxy proxy, Message message) {
-            throw new IllegalStateException();
-        }
-
-        public void afterDelivery(MessageEndpointProxy proxy) throws ResourceException {
-            throw new IllegalStateException();
-        }
-
-        public void release(MessageEndpointProxy proxy) {
-            throw new IllegalStateException();
-        }
-
-        protected final void transition(MessageEndpointProxy proxy, MessageEndpointState nextState) {
-            proxy.state = nextState;
-            nextState.enter(proxy);
-        }
-
-        protected void enter(MessageEndpointProxy proxy) {
-        }
-    }
-
-    private static class MessageEndpointAlive extends MessageEndpointState {
-
-        public void beforeDelivery(MessageEndpointProxy proxy, Method method) throws NoSuchMethodException, ResourceException {
-            try {
-                proxy.endpoint.beforeDelivery(method);
-            } catch (NoSuchMethodException e) {
-                transition(proxy, DEAD);
-                throw e;
-            } catch (ResourceException e) {
-                transition(proxy, DEAD);
-                throw e;
-            }
-        }
-
-        public void onMessage(MessageEndpointProxy proxy, Message message) {
-            proxy.messageListener.onMessage(message);
-        }
-
-        public void afterDelivery(MessageEndpointProxy proxy) throws ResourceException {
-            try {
-                proxy.endpoint.afterDelivery();
-            } catch (ResourceException e) {
-                transition(proxy, DEAD);
-                throw e;
-            }
-        }
-
-        public void release(MessageEndpointProxy proxy) {
-            transition(proxy, DEAD);
-        }
-    }
-
-    private static class MessageEndpointDead extends MessageEndpointState {
-
-        protected void enter(MessageEndpointProxy proxy) {
-            proxy.endpoint.release();
-        }
-
-        public void beforeDelivery(MessageEndpointProxy proxy, Method method) throws NoSuchMethodException, ResourceException {
-            throw new InvalidMessageEndpointException();
-        }
-
-        public void onMessage(MessageEndpointProxy proxy, Message message) {
-            throw new InvalidMessageEndpointException();
-        }
-
-        public void afterDelivery(MessageEndpointProxy proxy) throws ResourceException {
-            throw new InvalidMessageEndpointException();
-        }
-
-        public void release(MessageEndpointProxy proxy) {
-            throw new InvalidMessageEndpointException();
-        }
-    }
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageResourceAdapter.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageResourceAdapter.java
deleted file mode 100755
index 667c81f..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageResourceAdapter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.JMSException;
-import javax.resource.spi.BootstrapContext;
-import javax.resource.spi.ResourceAdapter;
-
-import org.apache.activemq.ActiveMQConnection;
-
-/**
- * Knows how to connect to one ActiveMQ server. It can then activate endpoints
- * and deliver messages to those end points using the connection configure in
- * the resource adapter. <p/>Must override equals and hashCode (JCA spec 16.4)
- * 
- * 
- */
-public interface MessageResourceAdapter extends ResourceAdapter {
-
-    /**
-     */
-    ActiveMQConnection makeConnection(ActiveMQConnectionRequestInfo info) throws JMSException;
-
-    /**
-     * @param activationSpec
-     */
-    ActiveMQConnection makeConnection(MessageActivationSpec activationSpec) throws JMSException;
-
-    /**
-     * @return bootstrap context
-     */
-    BootstrapContext getBootstrapContext();
-
-    /**
-     */
-    String getBrokerXmlConfig();
-
-    /**
-     * @return Returns the info.
-     */
-    ActiveMQConnectionRequestInfo getInfo();
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
deleted file mode 100755
index 71bf9b4..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/**
- * 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.ra;
-
-import java.lang.reflect.Method;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ServerSession;
-import javax.jms.Session;
-import javax.resource.spi.endpoint.MessageEndpoint;
-import javax.resource.spi.work.Work;
-import javax.resource.spi.work.WorkEvent;
-import javax.resource.spi.work.WorkException;
-import javax.resource.spi.work.WorkListener;
-import javax.resource.spi.work.WorkManager;
-
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.ActiveMQSession.DeliveryListener;
-import org.apache.activemq.TransactionContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class ServerSessionImpl implements ServerSession, InboundContext, Work, DeliveryListener {
-
-    public static final Method ON_MESSAGE_METHOD;
-    private static int nextLogId;
-
-    static {
-        try {
-            ON_MESSAGE_METHOD = MessageListener.class.getMethod("onMessage", new Class[] {
-                Message.class
-            });
-        } catch (Exception e) {
-            throw new ExceptionInInitializerError(e);
-        }
-    }
-
-
-    private int serverSessionId = getNextLogId();
-    private final Logger log = LoggerFactory.getLogger(ServerSessionImpl.class.getName() + ":" + serverSessionId);
-
-    private ActiveMQSession session;
-    private WorkManager workManager;
-    private MessageEndpoint endpoint;
-    private MessageProducer messageProducer;
-    private final ServerSessionPoolImpl pool;
-
-    private Object runControlMutex = new Object();
-    private boolean runningFlag;
-    /**
-     * True if an error was detected that cause this session to be stale. When a
-     * session is stale, it should not be used again for proccessing.
-     */
-    private boolean stale;
-    /**
-     * Does the TX commit need to be managed by the RA?
-     */
-    private final boolean useRAManagedTx;
-    /**
-     * The maximum number of messages to batch
-     */
-    private final int batchSize;
-    /**
-     * The current number of messages in the batch
-     */
-    private int currentBatchSize;
-
-    public ServerSessionImpl(ServerSessionPoolImpl pool, ActiveMQSession session, WorkManager workManager, MessageEndpoint endpoint, boolean useRAManagedTx, int batchSize) throws JMSException {
-        this.pool = pool;
-        this.session = session;
-        this.workManager = workManager;
-        this.endpoint = endpoint;
-        this.useRAManagedTx = useRAManagedTx;
-        this.session.setMessageListener((MessageListener)endpoint);
-        this.session.setDeliveryListener(this);
-        this.batchSize = batchSize;
-    }
-
-    private static synchronized int getNextLogId() {
-        return nextLogId++;
-    }
-
-    public Session getSession() throws JMSException {
-        return session;
-    }
-
-    protected boolean isStale() {
-        return stale || !session.isRunning();
-    }
-
-    public MessageProducer getMessageProducer() throws JMSException {
-        if (messageProducer == null) {
-            messageProducer = getSession().createProducer(null);
-        }
-        return messageProducer;
-    }
-
-    /**
-     * @see javax.jms.ServerSession#start()
-     */
-    public void start() throws JMSException {
-
-        synchronized (runControlMutex) {
-            if (runningFlag) {
-                log.debug("Start request ignored, already running.");
-                return;
-            }
-            runningFlag = true;
-        }
-
-        // We get here because we need to start a async worker.
-        log.debug("Starting run.");
-        try {
-            workManager.scheduleWork(this, WorkManager.INDEFINITE, null, new WorkListener() {
-                // The work listener is useful only for debugging...
-                public void workAccepted(WorkEvent event) {
-                    log.debug("Work accepted: " + event);
-                }
-
-                public void workRejected(WorkEvent event) {
-                    log.debug("Work rejected: " + event);
-                }
-
-                public void workStarted(WorkEvent event) {
-                    log.debug("Work started: " + event);
-                }
-
-                public void workCompleted(WorkEvent event) {
-                    log.debug("Work completed: " + event);
-                }
-
-            });
-        } catch (WorkException e) {
-            throw (JMSException)new JMSException("Start failed: " + e).initCause(e);
-        }
-    }
-
-    /**
-     * @see java.lang.Runnable#run()
-     */
-    public void run() {
-        log.debug("Running");
-        currentBatchSize = 0;
-        while (true) {
-            log.debug("run loop start");
-            try {
-                InboundContextSupport.register(this);
-                if ( session.isRunning() ) {
-                session.run();
-                } else {
-                    log.debug("JMS Session is no longer running (maybe due to loss of connection?), marking ServerSesison as stale");
-                    stale = true;
-                }
-            } catch (Throwable e) {
-                stale = true;
-                if ( log.isDebugEnabled() ) {
-                    log.debug("Endpoint failed to process message.", e);
-                } else if ( log.isInfoEnabled() ) {
-                    log.info("Endpoint failed to process message. Reason: " + e.getMessage());                    
-                }
-            } finally {
-                InboundContextSupport.unregister(this);
-                log.debug("run loop end");
-                synchronized (runControlMutex) {
-                    // This endpoint may have gone stale due to error
-                    if (stale) {
-                        runningFlag = false;
-                        pool.removeFromPool(this);
-                        break;
-                    }
-                    if (!session.hasUncomsumedMessages()) {
-                        runningFlag = false;
-                        pool.returnToPool(this);
-                        break;
-                    }
-                }
-            }
-        }
-        log.debug("Run finished");
-    }
-
-    /**
-     * The ActiveMQSession's run method will call back to this method before
-     * dispactching a message to the MessageListener.
-     */
-    public void beforeDelivery(ActiveMQSession session, Message msg) {
-        if (currentBatchSize == 0) {
-            try {
-                endpoint.beforeDelivery(ON_MESSAGE_METHOD);
-            } catch (Throwable e) {
-                throw new RuntimeException("Endpoint before delivery notification failure", e);
-            }
-        }
-    }
-
-    /**
-     * The ActiveMQSession's run method will call back to this method after
-     * dispactching a message to the MessageListener.
-     */
-    public void afterDelivery(ActiveMQSession session, Message msg) {
-        if (++currentBatchSize >= batchSize || !session.hasUncomsumedMessages()) {
-            currentBatchSize = 0;
-            try {
-                endpoint.afterDelivery();
-            } catch (Throwable e) {
-                throw new RuntimeException("Endpoint after delivery notification failure", e);
-            } finally {
-                TransactionContext transactionContext = session.getTransactionContext();
-                if (transactionContext != null && transactionContext.isInLocalTransaction()) {
-                    if (!useRAManagedTx) {
-                        // Sanitiy Check: If the local transaction has not been
-                        // commited..
-                        // Commit it now.
-                        log.warn("Local transaction had not been commited. Commiting now.");
-                    }
-                    try {
-                        session.commit();
-                    } catch (JMSException e) {
-                        log.info("Commit failed:", e);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.work.Work#release()
-     */
-    public void release() {
-        log.debug("release called");
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return "ServerSessionImpl:" + serverSessionId;
-    }
-
-    public void close() {
-        try {
-            endpoint.release();
-        } catch (Throwable e) {
-            log.debug("Endpoint did not release properly: " + e.getMessage(), e);
-        }
-        try {
-            session.close();
-        } catch (Throwable e) {
-            log.debug("Session did not close properly: " + e.getMessage(), e);
-        }
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java
deleted file mode 100755
index ccae078..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/**
- * 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.ra;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import javax.jms.JMSException;
-import javax.jms.ServerSession;
-import javax.jms.ServerSessionPool;
-import javax.jms.Session;
-import javax.resource.spi.UnavailableException;
-import javax.resource.spi.endpoint.MessageEndpoint;
-
-import org.apache.activemq.ActiveMQQueueSession;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.ActiveMQTopicSession;
-import org.apache.activemq.command.MessageDispatch;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *  $Date$
- */
-public class ServerSessionPoolImpl implements ServerSessionPool {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ServerSessionPoolImpl.class);
-
-    private final ActiveMQEndpointWorker activeMQAsfEndpointWorker;
-    private final int maxSessions;
-
-    private final List<ServerSessionImpl> idleSessions = new ArrayList<ServerSessionImpl>();
-    private final List<ServerSessionImpl> activeSessions = new ArrayList<ServerSessionImpl>();
-    private final Lock sessionLock = new ReentrantLock();
-    private final AtomicBoolean closing = new AtomicBoolean(false);
-
-    public ServerSessionPoolImpl(ActiveMQEndpointWorker activeMQAsfEndpointWorker, int maxSessions) {
-        this.activeMQAsfEndpointWorker = activeMQAsfEndpointWorker;
-        this.maxSessions = maxSessions;
-    }
-
-    private ServerSessionImpl createServerSessionImpl() throws JMSException {
-        MessageActivationSpec activationSpec = activeMQAsfEndpointWorker.endpointActivationKey.getActivationSpec();
-        int acknowledge = (activeMQAsfEndpointWorker.transacted) ? Session.SESSION_TRANSACTED : activationSpec.getAcknowledgeModeForSession();
-        final ActiveMQSession session = (ActiveMQSession)activeMQAsfEndpointWorker.getConnection().createSession(activeMQAsfEndpointWorker.transacted, acknowledge);
-        MessageEndpoint endpoint;
-        try {
-            int batchSize = 0;
-            if (activationSpec.getEnableBatchBooleanValue()) {
-                batchSize = activationSpec.getMaxMessagesPerBatchIntValue();
-            }
-            if (activationSpec.isUseRAManagedTransactionEnabled()) {
-                // The RA will manage the transaction commit.
-                endpoint = createEndpoint(null);
-                return new ServerSessionImpl(this, (ActiveMQSession)session, activeMQAsfEndpointWorker.workManager, endpoint, true, batchSize);
-            } else {
-                // Give the container an object to manage to transaction with.
-                endpoint = createEndpoint(new LocalAndXATransaction(session.getTransactionContext()));
-                return new ServerSessionImpl(this, (ActiveMQSession)session, activeMQAsfEndpointWorker.workManager, endpoint, false, batchSize);
-            }
-        } catch (UnavailableException e) {
-            // The container could be limiting us on the number of endpoints
-            // that are being created.
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Could not create an endpoint.", e);
-            }
-            session.close();
-            return null;
-        }
-    }
-
-    private MessageEndpoint createEndpoint(LocalAndXATransaction txResourceProxy) throws UnavailableException {
-        MessageEndpoint endpoint;
-        endpoint = activeMQAsfEndpointWorker.endpointFactory.createEndpoint(txResourceProxy);
-        MessageEndpointProxy endpointProxy = new MessageEndpointProxy(endpoint);
-        return endpointProxy;
-    }
-
-    /**
-     */
-    public ServerSession getServerSession() throws JMSException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("ServerSession requested.");
-        }
-        if (closing.get()) {
-            throw new JMSException("Session Pool Shutting Down.");
-        }
-        ServerSessionImpl ss = null;
-        sessionLock.lock();
-        try {
-            ss = getExistingServerSession(false);
-        } finally {
-            sessionLock.unlock();
-        }
-        if (ss != null) {
-            return ss;
-        }
-        ss = createServerSessionImpl();
-        sessionLock.lock();
-        try {
-            // We may not be able to create a session due to the container
-            // restricting us.
-            if (ss == null) {
-                if (activeSessions.isEmpty() && idleSessions.isEmpty()) {
-                    throw new JMSException("Endpoint factory did not allow creation of any endpoints.");
-                }
-
-                ss = getExistingServerSession(true);
-            } else {
-                activeSessions.add(ss);
-            }
-        } finally {
-            sessionLock.unlock();
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Created a new session: " + ss);
-        }
-        return ss;
-
-    }
-
-    /**
-     * Must be called with sessionLock held.
-     * Returns an idle session if one exists or an active session if no more
-     * sessions can be created.  Sessions can not be created if force is true
-     * or activeSessions >= maxSessions.
-     * @param force do not check activeSessions >= maxSessions, return an active connection anyway.
-     * @return an already existing session.
-     */
-    private ServerSessionImpl getExistingServerSession(boolean force) {
-        ServerSessionImpl ss = null;
-        if (idleSessions.size() > 0) {
-            ss = idleSessions.remove(idleSessions.size() - 1);
-        }
-        if (ss != null) {
-            activeSessions.add(ss);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Using idle session: " + ss);
-            }
-        } else if (force || activeSessions.size() >= maxSessions) {
-            // If we are at the upper limit
-            // then reuse the already created sessions..
-            // This is going to queue up messages into a session for
-            // processing.
-            ss = getExistingActiveServerSession();
-        }
-        return ss;
-    }
-
-    /**
-     * Must be called with sessionLock held.
-     * Returns the first session from activeSessions, shifting it to last.
-     * @return session
-     */
-    private ServerSessionImpl getExistingActiveServerSession() {
-        ServerSessionImpl ss = null;
-        if (!activeSessions.isEmpty()) {
-            if (activeSessions.size() > 1) {
-                // round robin
-                ss = activeSessions.remove(0);
-                activeSessions.add(ss);
-            } else {
-                ss = activeSessions.get(0);
-            }
-        }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Reusing an active session: " + ss);
-        }
-        return ss;
-    }
-
-    public void returnToPool(ServerSessionImpl ss) {
-        sessionLock.lock();
-            activeSessions.remove(ss);
-        try {
-            // make sure we only return non-stale sessions to the pool
-            if ( ss.isStale() ) {
-                if ( LOG.isDebugEnabled() ) {
-                    LOG.debug("Discarding stale ServerSession to be returned to pool: " + ss);
-                }
-                ss.close();
-            } else {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("ServerSession returned to pool: " + ss);
-                }
-            idleSessions.add(ss);
-            }
-        } finally {
-            sessionLock.unlock();
-        }
-        synchronized (closing) {
-            closing.notify();
-        }
-    }
-
-    public void removeFromPool(ServerSessionImpl ss) {
-        sessionLock.lock();
-        try {
-            activeSessions.remove(ss);
-        } finally {
-            sessionLock.unlock();
-        }
-        try {
-            ActiveMQSession session = (ActiveMQSession)ss.getSession();
-            List l = session.getUnconsumedMessages();
-            for (Iterator i = l.iterator(); i.hasNext();) {
-                dispatchToSession((MessageDispatch)i.next());
-            }
-        } catch (Throwable t) {
-            LOG.error("Error redispatching unconsumed messages from stale session", t);
-        }
-        ss.close();
-        synchronized (closing) {
-            closing.notify();
-        }
-    }
-
-    /**
-     * @param messageDispatch
-     *            the message to dispatch
-     * @throws JMSException
-     */
-    private void dispatchToSession(MessageDispatch messageDispatch)
-            throws JMSException {
-
-        ServerSession serverSession = getServerSession();
-        Session s = serverSession.getSession();
-        ActiveMQSession session = null;
-        if (s instanceof ActiveMQSession) {
-            session = (ActiveMQSession) s;
-        } else if (s instanceof ActiveMQQueueSession) {
-            session = (ActiveMQSession) s;
-        } else if (s instanceof ActiveMQTopicSession) {
-            session = (ActiveMQSession) s;
-        } else {
-            activeMQAsfEndpointWorker.getConnection()
-                    .onAsyncException(new JMSException(
-                            "Session pool provided an invalid session type: "
-                                    + s.getClass()));
-        }
-        session.dispatch(messageDispatch);
-        serverSession.start();
-    }
-
-    public void close() {
-        closing.set(true);
-        int activeCount = closeIdleSessions();
-        // we may have to wait erroneously 250ms if an
-        // active session is removed during our wait and we
-        // are not notified
-        while (activeCount > 0) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Active Sessions = " + activeCount);
-            }
-            try {
-                synchronized (closing) {
-                    closing.wait(250);
-                }
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-                return;
-            }
-            activeCount = closeIdleSessions();
-        }
-    }
-
-
-    protected int closeIdleSessions() {
-        sessionLock.lock();
-        try {
-            for (ServerSessionImpl ss : idleSessions) {
-                ss.close();
-            }
-            idleSessions.clear();
-            return activeSessions.size();
-        } finally {
-            sessionLock.unlock();
-        }
-    }
-
-    /**
-     * @return Returns the closing.
-     */
-    public boolean isClosing() {
-        return closing.get();
-    }
-
-    /**
-     * @param closing The closing to set.
-     */
-    public void setClosing(boolean closing) {
-        this.closing.set(closing);
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java
deleted file mode 100755
index 68f4ce9..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.ra;
-
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionEvent;
-import javax.resource.spi.ConnectionEventListener;
-import javax.resource.spi.ConnectionManager;
-import javax.resource.spi.ConnectionRequestInfo;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.spi.ManagedConnectionFactory;
-import javax.security.auth.Subject;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple implementation of a ConnectionManager. An Application Server will
- * have a better implementation with pooling and security etc.
- * 
- * 
- */
-public class SimpleConnectionManager implements ConnectionManager, ConnectionEventListener {
-
-    private static final long serialVersionUID = -7662970495944876239L;
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleConnectionManager.class);
-
-    /**
-     * @see javax.resource.spi.ConnectionManager#allocateConnection(javax.resource.spi.ManagedConnectionFactory,
-     *      javax.resource.spi.ConnectionRequestInfo)
-     */
-    public Object allocateConnection(ManagedConnectionFactory connectionFactory, ConnectionRequestInfo info) throws ResourceException {
-        Subject subject = null;
-        ManagedConnection connection = connectionFactory.createManagedConnection(subject, info);
-        connection.addConnectionEventListener(this);
-        return connection.getConnection(subject, info);
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#connectionClosed(javax.resource.spi.ConnectionEvent)
-     */
-    public void connectionClosed(ConnectionEvent event) {
-        try {
-            ((ManagedConnection)event.getSource()).cleanup();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the cleanup of a managed connection: ", e);
-        }
-        try {
-            ((ManagedConnection)event.getSource()).destroy();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the destruction of a managed connection: ", e);
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionStarted(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionStarted(ConnectionEvent event) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionCommitted(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionCommitted(ConnectionEvent event) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionRolledback(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionRolledback(ConnectionEvent event) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#connectionErrorOccurred(javax.resource.spi.ConnectionEvent)
-     */
-    public void connectionErrorOccurred(ConnectionEvent event) {
-        LOG.warn("Managed connection experiened an error: ", event.getException());
-        try {
-            ((ManagedConnection)event.getSource()).cleanup();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the cleanup of a managed connection: ", e);
-        }
-        try {
-            ((ManagedConnection)event.getSource()).destroy();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the destruction of a managed connection: ", e);
-        }
-    }
-
-}
diff --git a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/package.html b/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/package.html
deleted file mode 100755
index 3ce3970..0000000
--- a/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	JCA managed connections and resource adapters for working with ActiveMQ
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQActivationSpecTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQActivationSpecTest.java
deleted file mode 100755
index 28ae590..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQActivationSpecTest.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
- * 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.ra;
-
-import java.beans.IntrospectionException;
-import java.beans.PropertyDescriptor;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.resource.spi.InvalidPropertyException;
-
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * 
- */
-public class ActiveMQActivationSpecTest extends TestCase {
-
-    private static final String DESTINATION = "defaultQueue";
-    private static final String DESTINATION_TYPE = Queue.class.getName();
-    private static final String EMPTY_STRING = "   ";
-
-    private ActiveMQActivationSpec activationSpec;
-    private PropertyDescriptor destinationProperty;
-    private PropertyDescriptor destinationTypeProperty;
-    private PropertyDescriptor acknowledgeModeProperty;
-    private PropertyDescriptor subscriptionDurabilityProperty;
-    private PropertyDescriptor clientIdProperty;
-    private PropertyDescriptor subscriptionNameProperty;
-
-    public ActiveMQActivationSpecTest(String name) {
-        super(name);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        activationSpec = new ActiveMQActivationSpec();
-        activationSpec.setDestination(DESTINATION);
-        activationSpec.setDestinationType(DESTINATION_TYPE);
-
-        destinationProperty = new PropertyDescriptor("destination", ActiveMQActivationSpec.class);
-        destinationTypeProperty = new PropertyDescriptor("destinationType", ActiveMQActivationSpec.class);
-        acknowledgeModeProperty = new PropertyDescriptor("acknowledgeMode", ActiveMQActivationSpec.class);
-        subscriptionDurabilityProperty = new PropertyDescriptor("subscriptionDurability", ActiveMQActivationSpec.class);
-        clientIdProperty = new PropertyDescriptor("clientId", ActiveMQActivationSpec.class);
-        subscriptionNameProperty = new PropertyDescriptor("subscriptionName", ActiveMQActivationSpec.class);
-    }
-
-    public void testDefaultContructionValidation() throws IntrospectionException {
-        PropertyDescriptor[] expected = {destinationTypeProperty, destinationProperty};
-        assertActivationSpecInvalid(new ActiveMQActivationSpec(), expected);
-    }
-
-    public void testMinimalSettings() {
-        assertEquals(DESTINATION, activationSpec.getDestination());
-        assertEquals(DESTINATION_TYPE, activationSpec.getDestinationType());
-        assertActivationSpecValid();
-    }
-
-    public void testNoDestinationTypeFailure() {
-        activationSpec.setDestinationType(null);
-        PropertyDescriptor[] expected = {destinationTypeProperty};
-        assertActivationSpecInvalid(expected);
-    }
-
-    public void testInvalidDestinationTypeFailure() {
-        activationSpec.setDestinationType("foobar");
-        PropertyDescriptor[] expected = {destinationTypeProperty};
-        assertActivationSpecInvalid(expected);
-    }
-
-    public void testQueueDestinationType() {
-        activationSpec.setDestinationType(Queue.class.getName());
-        assertActivationSpecValid();
-    }
-
-    public void testTopicDestinationType() {
-        activationSpec.setDestinationType(Topic.class.getName());
-        assertActivationSpecValid();
-    }
-
-    public void testSuccessfulCreateQueueDestination() {
-        activationSpec.setDestinationType(Queue.class.getName());
-        activationSpec.setDestination(DESTINATION);
-        assertActivationSpecValid();
-        ActiveMQDestination destination = activationSpec.createDestination();
-        assertNotNull("ActiveMQDestination not created", destination);
-        assertEquals("Physical name not the same", activationSpec.getDestination(), destination.getPhysicalName());
-        assertTrue("Destination is not a Queue", destination instanceof Queue);
-    }
-
-    public void testSuccessfulCreateTopicDestination() {
-        activationSpec.setDestinationType(Topic.class.getName());
-        activationSpec.setDestination(DESTINATION);
-        assertActivationSpecValid();
-        ActiveMQDestination destination = activationSpec.createDestination();
-        assertNotNull("ActiveMQDestination not created", destination);
-        assertEquals("Physical name not the same", activationSpec.getDestination(), destination.getPhysicalName());
-        assertTrue("Destination is not a Topic", destination instanceof Topic);
-    }
-
-    public void testCreateDestinationIncorrectType() {
-        activationSpec.setDestinationType(null);
-        activationSpec.setDestination(DESTINATION);
-        ActiveMQDestination destination = activationSpec.createDestination();
-        assertNull("ActiveMQDestination should not have been created", destination);
-    }
-
-    public void testCreateDestinationIncorrectDestinationName() {
-        activationSpec.setDestinationType(Topic.class.getName());
-        activationSpec.setDestination(null);
-        ActiveMQDestination destination = activationSpec.createDestination();
-        assertNull("ActiveMQDestination should not have been created", destination);
-    }
-
-//----------- acknowledgeMode tests
-    public void testDefaultAcknowledgeModeSetCorrectly() {
-        assertEquals("Incorrect default value", ActiveMQActivationSpec.AUTO_ACKNOWLEDGE_MODE,
-                activationSpec.getAcknowledgeMode());
-        assertEquals("Incorrect default value", Session.AUTO_ACKNOWLEDGE,
-                activationSpec.getAcknowledgeModeForSession());
-    }
-
-    public void testInvalidAcknowledgeMode() {
-        activationSpec.setAcknowledgeMode("foobar");
-        PropertyDescriptor[] expected = {acknowledgeModeProperty};
-        assertActivationSpecInvalid(expected);
-        assertEquals("Incorrect acknowledge mode", ActiveMQActivationSpec.INVALID_ACKNOWLEDGE_MODE, 
-                activationSpec.getAcknowledgeModeForSession());
-    }
-
-    public void testNoAcknowledgeMode() {
-        activationSpec.setAcknowledgeMode(null);
-        PropertyDescriptor[] expected = {acknowledgeModeProperty};
-        assertActivationSpecInvalid(expected);
-        assertEquals("Incorrect acknowledge mode", ActiveMQActivationSpec.INVALID_ACKNOWLEDGE_MODE,
-                activationSpec.getAcknowledgeModeForSession());
-    }
-
-    public void testSettingAutoAcknowledgeMode() {
-        activationSpec.setAcknowledgeMode(ActiveMQActivationSpec.AUTO_ACKNOWLEDGE_MODE);
-        assertActivationSpecValid();
-        assertEquals("Incorrect acknowledge mode", Session.AUTO_ACKNOWLEDGE,
-                activationSpec.getAcknowledgeModeForSession());
-    }
-
-    public void testSettingDupsOkAcknowledgeMode() {
-        activationSpec.setAcknowledgeMode(ActiveMQActivationSpec.DUPS_OK_ACKNOWLEDGE_MODE);
-        assertActivationSpecValid();
-        assertEquals("Incorrect acknowledge mode", Session.DUPS_OK_ACKNOWLEDGE,
-                activationSpec.getAcknowledgeModeForSession());
-    }
-
-//----------- subscriptionDurability tests
-    public void testDefaultSubscriptionDurabilitySetCorrectly() {
-        assertEquals("Incorrect default value", ActiveMQActivationSpec.NON_DURABLE_SUBSCRIPTION,
-                activationSpec.getSubscriptionDurability());
-    }
-    
-    public void testInvalidSubscriptionDurability() {
-        activationSpec.setSubscriptionDurability("foobar");
-        PropertyDescriptor[] expected = {subscriptionDurabilityProperty};
-        assertActivationSpecInvalid(expected);
-    }
-
-    public void testNullSubscriptionDurability() {
-        activationSpec.setSubscriptionDurability(null);
-        PropertyDescriptor[] expected = {subscriptionDurabilityProperty};
-        assertActivationSpecInvalid(expected);
-    }
-
-    public void testSettingNonDurableSubscriptionDurability() {
-        activationSpec.setSubscriptionDurability(ActiveMQActivationSpec.NON_DURABLE_SUBSCRIPTION);
-        assertActivationSpecValid();
-    }
-
-//----------- durable subscriber tests    
-    public void testValidDurableSubscriber() {
-        activationSpec.setDestinationType(Topic.class.getName());
-        activationSpec.setSubscriptionDurability(ActiveMQActivationSpec.DURABLE_SUBSCRIPTION);
-        activationSpec.setClientId("foobar");
-        activationSpec.setSubscriptionName("foobar");
-        assertActivationSpecValid();        
-        assertTrue(activationSpec.isDurableSubscription());
-    }
-
-    public void testDurableSubscriberWithQueueDestinationTypeFailure() {
-        activationSpec.setDestinationType(Queue.class.getName());
-        activationSpec.setSubscriptionDurability(ActiveMQActivationSpec.DURABLE_SUBSCRIPTION);
-        activationSpec.setClientId("foobar");
-        activationSpec.setSubscriptionName("foobar");
-        PropertyDescriptor[] expected = {subscriptionDurabilityProperty};
-        assertActivationSpecInvalid(expected);
-    }
-    
-    public void testDurableSubscriberNoClientIdNoSubscriptionNameFailure() {
-        activationSpec.setDestinationType(Topic.class.getName());
-        activationSpec.setSubscriptionDurability(ActiveMQActivationSpec.DURABLE_SUBSCRIPTION);
-        activationSpec.setClientId(null);
-        assertNull(activationSpec.getClientId());
-        activationSpec.setSubscriptionName(null);
-        assertNull(activationSpec.getSubscriptionName());
-        PropertyDescriptor[] expected = {clientIdProperty, subscriptionNameProperty};
-        assertActivationSpecInvalid(expected);
-    }    
-    
-    public void testDurableSubscriberEmptyClientIdEmptySubscriptionNameFailure() {
-        activationSpec.setDestinationType(Topic.class.getName());
-        activationSpec.setSubscriptionDurability(ActiveMQActivationSpec.DURABLE_SUBSCRIPTION);
-        activationSpec.setClientId(EMPTY_STRING);
-        assertNull(activationSpec.getClientId());
-        activationSpec.setSubscriptionName(EMPTY_STRING);
-        assertNull(activationSpec.getSubscriptionName());
-        PropertyDescriptor[] expected = {clientIdProperty, subscriptionNameProperty};
-        assertActivationSpecInvalid(expected);
-    }    
-    
-    public void testSetEmptyStringButGetNullValue() {
-        ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
-        
-        activationSpec.setDestinationType(EMPTY_STRING);
-        assertNull("Property not null", activationSpec.getDestinationType());
-        
-        activationSpec.setMessageSelector(EMPTY_STRING);
-        assertNull("Property not null", activationSpec.getMessageSelector());
-        
-        activationSpec.setDestination(EMPTY_STRING);
-        assertNull("Property not null", activationSpec.getDestination());
-        
-        activationSpec.setUserName(EMPTY_STRING);
-        assertNull("Property not null", activationSpec.getUserName());
-        
-        activationSpec.setPassword(EMPTY_STRING);
-        assertNull("Property not null", activationSpec.getPassword());
-        
-        activationSpec.setClientId(EMPTY_STRING);
-        assertNull("Property not null", activationSpec.getClientId());
-        
-        activationSpec.setSubscriptionName(EMPTY_STRING);
-        assertNull("Property not null", activationSpec.getSubscriptionName());        
-    }
-
-//----------- helper methods    
-    private void assertActivationSpecValid() {
-        try {
-            activationSpec.validate();
-        } catch (InvalidPropertyException e) {
-            fail("InvalidPropertyException should not be thrown");
-        }
-    }
-    
-    private void assertActivationSpecInvalid(PropertyDescriptor[] expected) {
-        assertActivationSpecInvalid(activationSpec, expected);
-    }
-
-    private void assertActivationSpecInvalid(ActiveMQActivationSpec testActivationSpec, PropertyDescriptor[] expected) {
-        try {
-            testActivationSpec.validate();
-            fail("InvalidPropertyException should have been thrown");
-        } catch (InvalidPropertyException e) {
-            PropertyDescriptor[] actual = e.getInvalidPropertyDescriptors();
-            assertEquals(expected, actual);
-        }
-    }
-
-    private static void assertEquals(PropertyDescriptor[] expected, PropertyDescriptor[] actual) {
-        /*
-        * This is kind of ugly.  I originally created two HashSets and did an assertEquals(set1, set2) 
-        * but because of a bug in the PropertyDescriptor class, it incorrectly fails.  The problem is that the 
-        * PropertyDescriptor class implements the equals() method but not the hashCode() method and almost all
-        * of the java collection classes use hashCode() for testing equality.  The one exception I found was
-        * the ArrayList class which uses equals() for testing equality.  Since Arrays.asList(...) returns an
-        * ArrayList, I use it below.  Yes, ugly ... I know.
-        *
-        * see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4634390
-        */
-        assertNotNull("No PropertyDescriptors returned", expected);
-        assertEquals("PropertyDescriptor array size is incorrect ", expected.length, actual.length);
-        List<PropertyDescriptor> expectedList = Arrays.asList(expected);
-        List<PropertyDescriptor> actualList = Arrays.asList(actual);
-        assertTrue("Incorrect PropertyDescriptors returned", expectedList.containsAll(actualList));
-    }
-    
-    public void testSelfEquality() {
-        assertEquality(activationSpec, activationSpec);
-    }
-
-    public void testSamePropertiesButNotEqual() {
-        assertNonEquality(new ActiveMQActivationSpec(), new ActiveMQActivationSpec());
-    }
-
-    private void assertEquality(ActiveMQActivationSpec leftSpec, ActiveMQActivationSpec rightSpec) {
-        assertTrue("ActiveMQActivationSpecs are not equal", leftSpec.equals(rightSpec));
-        assertTrue("ActiveMQActivationSpecs are not equal", rightSpec.equals(leftSpec));
-        assertTrue("HashCodes are not equal", leftSpec.hashCode() == rightSpec.hashCode());
-    }
-    
-    private void assertNonEquality(ActiveMQActivationSpec leftSpec, ActiveMQActivationSpec rightSpec) {
-        assertFalse("ActiveMQActivationSpecs are equal", leftSpec.equals(rightSpec));
-        assertFalse("ActiveMQActivationSpecs are equal", rightSpec.equals(leftSpec));
-        assertFalse("HashCodes are equal", leftSpec.hashCode() == rightSpec.hashCode());
-    }
-    
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java
deleted file mode 100644
index 4ed767d..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *  Copyright 2008 hak8fe.
- * 
- *  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.
- *  under the License.
- */
-
-package org.apache.activemq.ra;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import javax.jms.Connection;
-import junit.framework.TestCase;
-
-/**
- *
- * @author hak8fe
- */
-public class ActiveMQConnectionFactoryTest extends TestCase {
-    
-    ActiveMQManagedConnectionFactory mcf;
-    ActiveMQConnectionRequestInfo info;
-    String url = "vm://localhost";
-    String user = "defaultUser";
-    String pwd = "defaultPasswd";
-    
-    public ActiveMQConnectionFactoryTest(String testName) {
-        super(testName);
-    }            
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        mcf = new ActiveMQManagedConnectionFactory();
-        info = new ActiveMQConnectionRequestInfo();
-        info.setServerUrl(url);
-        info.setUserName(user);
-        info.setPassword(pwd);
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    public void testSerializability() throws Exception
-    {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(mcf, new ConnectionManagerAdapter(), info);
-        
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        ObjectOutputStream oos = new ObjectOutputStream(bos);
-        oos.writeObject(factory);
-        oos.close();
-        byte[] byteArray = bos.toByteArray();
-        
-        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(byteArray));
-        ActiveMQConnectionFactory deserializedFactory = (ActiveMQConnectionFactory) ois.readObject();
-        ois.close();
-        
-        Connection con = deserializedFactory.createConnection("defaultUser", "defaultPassword");
-        assertNotNull("Connection object returned by ActiveMQConnectionFactory.createConnection() is null", con);
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQResourceAdapterJavaBeanEqualityTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQResourceAdapterJavaBeanEqualityTest.java
deleted file mode 100755
index c0fabea..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQResourceAdapterJavaBeanEqualityTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * 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.ra;
-
-import junit.framework.TestCase;
-
-/**
- * 
- */
-public class ActiveMQResourceAdapterJavaBeanEqualityTest extends TestCase {
-
-    private ActiveMQResourceAdapter raOne;
-    private ActiveMQResourceAdapter raTwo;
-
-    public ActiveMQResourceAdapterJavaBeanEqualityTest(String name) {
-        super(name);
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        raOne = new ActiveMQResourceAdapter();
-        raTwo = new ActiveMQResourceAdapter();
-    }
-
-    public void testSelfEquality() {
-        assertEquality(raOne, raOne);
-    }
-
-    public void testEmptyEquality() {
-        assertEquality(raOne, raTwo);
-    }
-
-    public void testNullEqualityFailure() {
-        assertFalse(raOne.equals(null));
-    }
-
-    public void testServerUrlEquality() {
-        raOne.setServerUrl("one");
-        raTwo.setServerUrl("one");
-        assertEquality(raOne, raTwo);
-    }
-
-    public void testServerUrlInequality() {
-        raOne.setServerUrl("one");
-        raTwo.setServerUrl("two");
-        assertNonEquality(raOne, raTwo);
-    }
-
-    public void testServerUrlInequalityDifferentCase() {
-        raOne.setServerUrl("one");
-        raTwo.setServerUrl("ONE");
-        assertNonEquality(raOne, raTwo);
-    }
-
-    public void testNullServerUrlInequality() {
-        raOne.setServerUrl("one");
-        raTwo.setServerUrl(null);
-        assertNonEquality(raOne, raTwo);
-    }
-
-    public void testBrokerXMLConfigEquality() {
-        raOne.setBrokerXmlConfig("one");
-        raTwo.setBrokerXmlConfig("one");
-        assertEquality(raOne, raTwo);
-    }
-
-    public void testBrokerXMLConfigInequality() {
-        raOne.setBrokerXmlConfig("one");
-        raTwo.setBrokerXmlConfig("two");
-        assertNonEquality(raOne, raTwo);
-    }
-
-    public void testBrokerXMLConfigInequalityDifferentCase() {
-        raOne.setBrokerXmlConfig("one");
-        raTwo.setBrokerXmlConfig("ONE");
-        assertNonEquality(raOne, raTwo);
-    }
-
-    public void testNullBrokerXMLConfigInequality() {
-        raOne.setBrokerXmlConfig("one");
-        raTwo.setBrokerXmlConfig(null);
-        assertNonEquality(raOne, raTwo);
-    }
-
-    public void testPasswordNotPartOfEquality() {
-        raOne.setClientid("one");
-        raTwo.setClientid("one");
-        raOne.setPassword("foo");
-        raTwo.setPassword("bar");
-        assertEquality(raOne, raTwo);
-    }
-
-    private void assertEquality(ActiveMQResourceAdapter leftRa, ActiveMQResourceAdapter rightRa) {
-        assertTrue("ActiveMQResourceAdapters are not equal", leftRa.equals(rightRa));
-        assertTrue("ActiveMQResourceAdapters are not equal", rightRa.equals(leftRa));
-        assertTrue("HashCodes are not equal", leftRa.hashCode() == rightRa.hashCode());
-    }
-
-    private void assertNonEquality(ActiveMQResourceAdapter leftRa, ActiveMQResourceAdapter rightRa) {
-        assertFalse("ActiveMQResourceAdapters are equal", leftRa.equals(rightRa));
-        assertFalse("ActiveMQResourceAdapters are equal", rightRa.equals(leftRa));
-        assertFalse("HashCodes are equal", leftRa.hashCode() == rightRa.hashCode());
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionEventListenerAdapter.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionEventListenerAdapter.java
deleted file mode 100755
index aef11dd..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionEventListenerAdapter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.ra;
-
-import javax.resource.spi.ConnectionEvent;
-import javax.resource.spi.ConnectionEventListener;
-
-
-/**
- * 
- */
-public class ConnectionEventListenerAdapter implements ConnectionEventListener {
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#connectionClosed(javax.resource.spi.ConnectionEvent)
-     */
-    public void connectionClosed(ConnectionEvent arg0) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionStarted(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionStarted(ConnectionEvent arg0) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionCommitted(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionCommitted(ConnectionEvent arg0) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionRolledback(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionRolledback(ConnectionEvent arg0) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#connectionErrorOccurred(javax.resource.spi.ConnectionEvent)
-     */
-    public void connectionErrorOccurred(ConnectionEvent arg0) {
-    }
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java
deleted file mode 100755
index 55e0b2c..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.ra;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionEvent;
-import javax.resource.spi.ConnectionEventListener;
-import javax.resource.spi.ConnectionManager;
-import javax.resource.spi.ConnectionRequestInfo;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.spi.ManagedConnectionFactory;
-import javax.security.auth.Subject;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple implementation of a ConnectionManager that can be extended so that
- * it can see how the RA connections are interacting with it.
- * 
- * 
- */
-public class ConnectionManagerAdapter implements ConnectionManager, ConnectionEventListener {
-
-    private static final long serialVersionUID = 5205646563916645831L;
-
-    private static final Logger LOG = LoggerFactory.getLogger(ConnectionManagerAdapter.class);
-    ArrayList<ConnectionEventListener> listners = new ArrayList<ConnectionEventListener>();
-    ArrayList<ManagedConnection> connections = new ArrayList<ManagedConnection>();
-
-    /**
-     * Adds a listener to all connections created by this connection manager.
-     * This listener will be added to all previously created connections.
-     * 
-     * @param l
-     */
-    public void addConnectionEventListener(ConnectionEventListener l) {
-        for (Iterator<ManagedConnection> iter = connections.iterator(); iter.hasNext();) {
-            ManagedConnection c = iter.next();
-            c.addConnectionEventListener(l);
-        }
-        listners.add(l);
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionManager#allocateConnection(javax.resource.spi.ManagedConnectionFactory,
-     *      javax.resource.spi.ConnectionRequestInfo)
-     */
-    public Object allocateConnection(ManagedConnectionFactory connectionFactory, ConnectionRequestInfo info) throws ResourceException {
-        Subject subject = null;
-        ManagedConnection connection = connectionFactory.createManagedConnection(subject, info);
-        connection.addConnectionEventListener(this);
-        for (Iterator<ConnectionEventListener> iter = listners.iterator(); iter.hasNext();) {
-            ConnectionEventListener l = iter.next();
-            connection.addConnectionEventListener(l);
-        }
-        connections.add(connection);
-        return connection.getConnection(subject, info);
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#connectionClosed(javax.resource.spi.ConnectionEvent)
-     */
-    public void connectionClosed(ConnectionEvent event) {
-        connections.remove(event.getSource());
-        try {
-            ((ManagedConnection)event.getSource()).cleanup();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the cleanup of a managed connection: ", e);
-        }
-        try {
-            ((ManagedConnection)event.getSource()).destroy();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the destruction of a managed connection: ", e);
-        }
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionStarted(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionStarted(ConnectionEvent event) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionCommitted(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionCommitted(ConnectionEvent event) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#localTransactionRolledback(javax.resource.spi.ConnectionEvent)
-     */
-    public void localTransactionRolledback(ConnectionEvent event) {
-    }
-
-    /**
-     * @see javax.resource.spi.ConnectionEventListener#connectionErrorOccurred(javax.resource.spi.ConnectionEvent)
-     */
-    public void connectionErrorOccurred(ConnectionEvent event) {
-        LOG.warn("Managed connection experiened an error: ", event.getException());
-        try {
-            ((ManagedConnection)event.getSource()).cleanup();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the cleanup of a managed connection: ", e);
-        }
-        try {
-            ((ManagedConnection)event.getSource()).destroy();
-        } catch (ResourceException e) {
-            LOG.warn("Error occured during the destruction of a managed connection: ", e);
-        }
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedClusterTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedClusterTest.java
deleted file mode 100644
index 0b549f5..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedClusterTest.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.Timer;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.resource.ResourceException;
-import javax.resource.spi.BootstrapContext;
-import javax.resource.spi.UnavailableException;
-import javax.resource.spi.XATerminator;
-import javax.resource.spi.endpoint.MessageEndpoint;
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-import javax.resource.spi.work.ExecutionContext;
-import javax.resource.spi.work.Work;
-import javax.resource.spi.work.WorkException;
-import javax.resource.spi.work.WorkListener;
-import javax.resource.spi.work.WorkManager;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class FailoverManagedClusterTest extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(FailoverManagedClusterTest.class);
-    
-    long txGenerator = System.currentTimeMillis();
-    
-    private static final String MASTER_BIND_ADDRESS = "tcp://0.0.0.0:61616";
-    private static final String SLAVE_BIND_ADDRESS = "tcp://0.0.0.0:61617";
-
-    private static final String BROKER_URL = "failover://(" + MASTER_BIND_ADDRESS + "," + SLAVE_BIND_ADDRESS + ")?randomize=false";
-    
-    private BrokerService master;
-    private BrokerService slave;
-    private CountDownLatch slaveThreadStarted = new CountDownLatch(1);
-
-    @Override
-    protected void setUp() throws Exception {
-        createAndStartMaster();
-        createAndStartSlave();    
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-        if (slave != null) {
-            slave.stop();
-        }
-        if (master != null) {
-            master.stop();
-        }
-    }
-
-
-
-    private void createAndStartMaster() throws Exception {
-        master = new BrokerService();
-        master.setDeleteAllMessagesOnStartup(true);
-        master.setUseJmx(false);
-        master.setBrokerName("BROKER");
-        master.addConnector(MASTER_BIND_ADDRESS);
-        master.start();
-        master.waitUntilStarted();
-    }
-
-    private void createAndStartSlave() throws Exception {
-        slave = new BrokerService();
-        slave.setUseJmx(false);
-        slave.setBrokerName("BROKER");
-        slave.addConnector(SLAVE_BIND_ADDRESS);
-
-        // Start the slave asynchronously, since this will block
-        new Thread(new Runnable() {
-            public void run() {
-                try {
-                    slaveThreadStarted.countDown();
-                    slave.start();
-                    LOG.info("slave has started");
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }).start();
-    }
-
-    public void testFailover() throws Exception {
-        
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(BROKER_URL);
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter();
-        adapter.setServerUrl(BROKER_URL);
-        adapter.start(new StubBootstrapContext());
-
-        final CountDownLatch messageDelivered = new CountDownLatch(1);
-
-        final StubMessageEndpoint endpoint = new StubMessageEndpoint() {
-            public void onMessage(Message message) {
-                LOG.info("Received message " + message);
-                super.onMessage(message);
-                messageDelivered.countDown();
-            };
-        };
-
-        ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
-        activationSpec.setDestinationType(Queue.class.getName());
-        activationSpec.setDestination("TEST");
-        activationSpec.setResourceAdapter(adapter);
-        activationSpec.validate();
-
-        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
-            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
-                endpoint.xaresource = resource;
-                return endpoint;
-            }
-
-            public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException {
-                return true;
-            }
-        };
-
-        // Activate an Endpoint
-        adapter.endpointActivation(messageEndpointFactory, activationSpec);
-
-        // Give endpoint a moment to setup and register its listeners
-        try {
-            Thread.sleep(2000);
-        } catch (InterruptedException e) {
-        }
-
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("TEST"));
-        slaveThreadStarted.await(10, TimeUnit.SECONDS);
-        
-        // force a failover before send
-        LOG.info("Stopping master to force failover..");
-        master.stop();
-        master = null;
-        assertTrue("slave started ok", slave.waitUntilStarted());
-
-        producer.send(session.createTextMessage("Hello, again!"));
-
-        // Wait for the message to be delivered.
-        assertTrue(messageDelivered.await(5000, TimeUnit.MILLISECONDS));                
-    }
-
-
-    private static final class StubBootstrapContext implements BootstrapContext {
-        public WorkManager getWorkManager() {
-            return new WorkManager() {
-                public void doWork(Work work) throws WorkException {
-                    new Thread(work).start();
-                }
-
-                public void doWork(Work work, long arg1, ExecutionContext arg2, WorkListener arg3) throws WorkException {
-                    new Thread(work).start();
-                }
-
-                public long startWork(Work work) throws WorkException {
-                    new Thread(work).start();
-                    return 0;
-                }
-
-                public long startWork(Work work, long arg1, ExecutionContext arg2, WorkListener arg3) throws WorkException {
-                    new Thread(work).start();
-                    return 0;
-                }
-
-                public void scheduleWork(Work work) throws WorkException {
-                    new Thread(work).start();
-                }
-
-                public void scheduleWork(Work work, long arg1, ExecutionContext arg2, WorkListener arg3) throws WorkException {
-                    new Thread(work).start();
-                }
-            };
-        }
-
-        public XATerminator getXATerminator() {
-            return null;
-        }
-
-        public Timer createTimer() throws UnavailableException {
-            return null;
-        }
-    }
-
-    public class StubMessageEndpoint implements MessageEndpoint, MessageListener {
-        public int messageCount;
-        public XAResource xaresource;
-        public Xid xid;
-
-        public void beforeDelivery(Method method) throws NoSuchMethodException, ResourceException {
-            try {
-                if (xid == null) {
-                    xid = createXid();
-                }
-                xaresource.start(xid, 0);
-            } catch (Throwable e) {
-                throw new ResourceException(e);
-            }
-        }
-
-        public void afterDelivery() throws ResourceException {
-            try {
-                xaresource.end(xid, XAResource.TMSUCCESS);
-                xaresource.prepare(xid);
-                xaresource.commit(xid, false);
-            } catch (Throwable e) {
-                e.printStackTrace();
-                throw new ResourceException(e);
-            }
-        }
-
-        public void release() {
-        }
-
-        public void onMessage(Message message) {
-            messageCount++;
-        }
-
-    }
-    
-    public Xid createXid() throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream os = new DataOutputStream(baos);
-        os.writeLong(++txGenerator);
-        os.close();
-        final byte[] bs = baos.toByteArray();
-
-        return new Xid() {
-            public int getFormatId() {
-                return 86;
-            }
-
-            public byte[] getGlobalTransactionId() {
-                return bs;
-            }
-
-            public byte[] getBranchQualifier() {
-                return bs;
-            }
-        };
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedConnectionTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedConnectionTest.java
deleted file mode 100755
index 49661eb..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/FailoverManagedConnectionTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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.ra;
-
-import java.util.HashSet;
-
-import javax.resource.spi.ManagedConnection;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-
-
-public class FailoverManagedConnectionTest extends TestCase {
-
-    private static final String BROKER_TRANSPORT = "tcp://localhost:61616";
-    private static final String BROKER_URL = "failover://" + BROKER_TRANSPORT;
-    
-    private ActiveMQManagedConnectionFactory managedConnectionFactory;
-    private ManagedConnection managedConnection;
-    private ManagedConnectionProxy proxy;
-    private BrokerService broker;
-    private HashSet<ManagedConnection> connections;
-    private ActiveMQConnectionRequestInfo connectionInfo;
-
-    protected void setUp() throws Exception {
-
-        createAndStartBroker();
-    
-        connectionInfo = new ActiveMQConnectionRequestInfo();
-        connectionInfo.setServerUrl(BROKER_URL);
-        connectionInfo.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-        connectionInfo.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-
-        managedConnectionFactory = new ActiveMQManagedConnectionFactory();
-        managedConnection = managedConnectionFactory.createManagedConnection(null, connectionInfo);
-        
-        connections = new HashSet<ManagedConnection>();
-        connections.add(managedConnection);
-    }
-    
-
-    private void createAndStartBroker() throws Exception {
-        broker = new BrokerService();
-        broker.addConnector(BROKER_TRANSPORT);
-        broker.start();
-        broker.waitUntilStarted();
-    }
-
-    public void testFailoverBeforeClose() throws Exception {  
-        
-        createConnectionAndProxyAndSession();
-        
-        stopBroker();
-        
-        cleanupConnectionAndProxyAndSession();
-        
-        createAndStartBroker();
-        
-        for (int i=0; i<2; i++) {
-            createConnectionAndProxyAndSession();
-            cleanupConnectionAndProxyAndSession();
-        }
-    }
-    
-
-    private void cleanupConnectionAndProxyAndSession() throws Exception {
-        proxy.close();
-        managedConnection.cleanup();
-    }
-
-
-    private void createConnectionAndProxyAndSession() throws Exception {
-        managedConnection = 
-            managedConnectionFactory.matchManagedConnections(connections, null, connectionInfo);
-        proxy = 
-            (ManagedConnectionProxy) managedConnection.getConnection(null, null);
-        proxy.createSession(false, 0);
-    }
-
-
-    private void stopBroker() throws Exception {
-        broker.stop();
-        broker.waitUntilStopped();
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java
deleted file mode 100644
index 114e32c..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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.ra;
-
-import java.io.IOException;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.ResourceException;
-
-import org.apache.activemq.*;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * @version $Rev$ $Date$
- */
-public class JmsXAQueueTransactionTest extends JmsQueueTransactionTest {
-    private static final String DEFAULT_HOST = "vm://localhost";
-
-    private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
-    private ActiveMQManagedConnectionFactory managedConnectionFactory;
-    private XAResource xaResource;
-    private static long txGenerator;
-    private Xid xid;
-
-    @Override
-    protected void setSessionTransacted() {
-        resourceProvider.setTransacted(false);
-        resourceProvider.setAckMode(Session.AUTO_ACKNOWLEDGE);
-    }
-
-    @Override
-    protected ConnectionFactory newConnectionFactory() throws Exception {
-        managedConnectionFactory = new ActiveMQManagedConnectionFactory();
-        managedConnectionFactory.setServerUrl(DEFAULT_HOST);
-        managedConnectionFactory.setUserName(org.apache.activemq.ActiveMQConnectionFactory.DEFAULT_USER);
-        managedConnectionFactory.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-
-        return (ConnectionFactory)managedConnectionFactory.createConnectionFactory(connectionManager);
-    }
-
-
-    /**
-     * Recreates the connection.
-     *
-     * @throws javax.jms.JMSException
-     */
-    @Override
-    protected void reconnect() throws Exception {
-        super.reconnect();
-        ManagedConnectionProxy proxy = (ManagedConnectionProxy) connection;
-        ManagedConnection mc = proxy.getManagedConnection();
-        xaResource = mc.getXAResource();
-    }
-
-    @Override
-    protected ActiveMQPrefetchPolicy getPrefetchPolicy() {
-        ManagedConnectionProxy proxy = (ManagedConnectionProxy) connection;
-        ActiveMQManagedConnection mc = proxy.getManagedConnection();
-        ActiveMQConnection conn = (ActiveMQConnection) mc.getPhysicalConnection();
-        return conn.getPrefetchPolicy();
-    }
-
-    @Override
-    protected void beginTx() throws Exception {
-        xid = createXid();
-        xaResource.start(xid, XAResource.TMNOFLAGS);
-    }
-
-    @Override
-    protected void commitTx() throws Exception {
-        xaResource.end(xid, XAResource.TMSUCCESS);
-        int result = xaResource.prepare(xid);
-        if (result == XAResource.XA_OK) {
-            xaResource.commit(xid, false);
-        }
-        xid = null;
-    }
-
-    @Override
-    protected void rollbackTx() throws Exception {
-        xaResource.end(xid, XAResource.TMSUCCESS);
-        xaResource.rollback(xid);
-        xid = null;
-    }
-
-    //This test won't work with xa tx it is overridden to do nothing here
-    @Override
-    public void testMessageListener() throws Exception {
-    }
-
-    /**
-     * Sends a batch of messages and validates that the message sent before
-     * session close is not consumed.
-     * <p/>
-     * This test only works with local transactions, not xa. so its commented out here
-     *
-     * @throws Exception
-     */
-    @Override
-    public void testSendSessionClose() throws Exception {
-    }
-
-    public Xid createXid() throws IOException {
-
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream os = new DataOutputStream(baos);
-        os.writeLong(++txGenerator);
-        os.close();
-        final byte[] bs = baos.toByteArray();
-
-        return new Xid() {
-            public int getFormatId() {
-                return 86;
-            }
-
-            public byte[] getGlobalTransactionId() {
-                return bs;
-            }
-
-            public byte[] getBranchQualifier() {
-                return bs;
-            }
-        };
-
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
deleted file mode 100644
index fc88be2..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * 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.ra;
-
-import java.io.IOException;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Session;
-import javax.jms.Connection;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.ResourceException;
-
-import org.apache.activemq.*;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * @version $Rev$ $Date$
- */
-public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest {
-    private static final String DEFAULT_HOST = "vm://localhost?create=false";
-
-    private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
-    private static long txGenerator;
-    private Xid xid;
-    private XAResource[] xares = new XAResource[2];
-    private int index = 0;
-
-    @Override
-    protected void setSessionTransacted() {
-        resourceProvider.setTransacted(false);
-        resourceProvider.setAckMode(Session.AUTO_ACKNOWLEDGE);
-    }
-
-    @Override
-    protected ConnectionFactory newConnectionFactory() throws Exception {
-        ActiveMQManagedConnectionFactory managedConnectionFactory = new ActiveMQManagedConnectionFactory();
-        managedConnectionFactory.setServerUrl(DEFAULT_HOST);
-        managedConnectionFactory.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-        managedConnectionFactory.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-
-        return (ConnectionFactory) managedConnectionFactory.createConnectionFactory(connectionManager);
-    }
-
-    public void testReconnectWithClientId() throws Exception {
-        for (index = 0; index< 20; index ++) {
-            reconnect();
-        }
-    }
-
-    public void testRepeatReceiveTwoThenRollback() throws Exception {
-        for (index = 0; index< 2; index ++) {
-            testReceiveTwoThenRollback();
-        }
-    }
-
-    /**
-     * Recreates the connection.
-     *
-     * @throws javax.jms.JMSException
-     */
-    @Override
-    protected void reconnect() throws Exception {
-        super.reconnect();
-        xares[0] = getXAResource(connection);
-        ManagedConnectionProxy cx2 = (ManagedConnectionProxy) connectionFactory.createConnection();
-        xares[1] = getXAResource(cx2);
-    }
-
-    private XAResource getXAResource(Connection connection) throws ResourceException {
-        ManagedConnectionProxy proxy = (ManagedConnectionProxy) connection;
-        ManagedConnection mc = proxy.getManagedConnection();
-        return mc.getXAResource();
-    }
-
-    @Override
-    protected ActiveMQPrefetchPolicy getPrefetchPolicy() {
-        ManagedConnectionProxy proxy = (ManagedConnectionProxy) connection;
-        ActiveMQManagedConnection mc = proxy.getManagedConnection();
-        ActiveMQConnection conn = (ActiveMQConnection) mc.getPhysicalConnection();
-        return conn.getPrefetchPolicy();
-    }
-
-    @Override
-    protected void beginTx() throws Exception {
-        xid = createXid();
-        xares[index%2].start(xid, XAResource.TMNOFLAGS);
-        xares[(index+ 1)%2].start(xid, XAResource.TMJOIN);
-    }
-
-    @Override
-    protected void commitTx() throws Exception {
-        xares[index%2].end(xid, XAResource.TMSUCCESS);
-        xares[(index+ 1)%2].end(xid, XAResource.TMSUCCESS);
-        int result = xares[index%2].prepare(xid);
-        if (result == XAResource.XA_OK) {
-            xares[index%2].commit(xid, false);
-        }
-        xid = null;
-    }
-
-    @Override
-    protected void rollbackTx() throws Exception {
-        xares[index%2].end(xid, XAResource.TMSUCCESS);
-        xares[(index+ 1)%2].end(xid, XAResource.TMSUCCESS);
-        xares[index%2].rollback(xid);
-        xid = null;
-    }
-
-    //This test won't work with xa tx it is overridden to do nothing here
-    @Override
-    public void testMessageListener() throws Exception {
-    }
-
-    /**
-     * Sends a batch of messages and validates that the message sent before
-     * session close is not consumed.
-     * <p/>
-     * This test only works with local transactions, not xa. so its commented out here
-     *
-     * @throws Exception
-     */
-    @Override
-    public void testSendSessionClose() throws Exception {
-    }
-
-    public Xid createXid() throws IOException {
-
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream os = new DataOutputStream(baos);
-        os.writeLong(++txGenerator);
-        os.close();
-        final byte[] bs = baos.toByteArray();
-
-        return new Xid() {
-            public int getFormatId() {
-                return 86;
-            }
-
-            public byte[] getGlobalTransactionId() {
-                return bs;
-            }
-
-            public byte[] getBranchQualifier() {
-                return bs;
-            }
-        };
-
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MDBTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MDBTest.java
deleted file mode 100644
index 9a357bd..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MDBTest.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.Timer;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.resource.ResourceException;
-import javax.resource.spi.BootstrapContext;
-import javax.resource.spi.UnavailableException;
-import javax.resource.spi.XATerminator;
-import javax.resource.spi.endpoint.MessageEndpoint;
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-import javax.resource.spi.work.ExecutionContext;
-import javax.resource.spi.work.Work;
-import javax.resource.spi.work.WorkException;
-import javax.resource.spi.work.WorkListener;
-import javax.resource.spi.work.WorkManager;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-
-public class MDBTest extends TestCase {
-
-    long txGenerator = System.currentTimeMillis();
-
-    private static final class StubBootstrapContext implements BootstrapContext {
-        public WorkManager getWorkManager() {
-            return new WorkManager() {
-                public void doWork(Work work) throws WorkException {
-                    new Thread(work).start();
-                }
-
-                public void doWork(Work work, long arg1, ExecutionContext arg2, WorkListener arg3) throws WorkException {
-                    new Thread(work).start();
-                }
-
-                public long startWork(Work work) throws WorkException {
-                    new Thread(work).start();
-                    return 0;
-                }
-
-                public long startWork(Work work, long arg1, ExecutionContext arg2, WorkListener arg3) throws WorkException {
-                    new Thread(work).start();
-                    return 0;
-                }
-
-                public void scheduleWork(Work work) throws WorkException {
-                    new Thread(work).start();
-                }
-
-                public void scheduleWork(Work work, long arg1, ExecutionContext arg2, WorkListener arg3) throws WorkException {
-                    new Thread(work).start();
-                }
-            };
-        }
-
-        public XATerminator getXATerminator() {
-            return null;
-        }
-
-        public Timer createTimer() throws UnavailableException {
-            return null;
-        }
-    }
-
-    public class StubMessageEndpoint implements MessageEndpoint, MessageListener {
-        public int messageCount;
-        public XAResource xaresource;
-        public Xid xid;
-
-        public void beforeDelivery(Method method) throws NoSuchMethodException, ResourceException {
-            try {
-                if (xid == null) {
-                    xid = createXid();
-                }
-                xaresource.start(xid, 0);
-            } catch (Throwable e) {
-                throw new ResourceException(e);
-            }
-        }
-
-        public void afterDelivery() throws ResourceException {
-            try {
-                xaresource.end(xid, 0);
-                xaresource.prepare(xid);
-                xaresource.commit(xid, false);
-            } catch (Throwable e) {
-                throw new ResourceException(e);
-            }
-        }
-
-        public void release() {
-        }
-
-        public void onMessage(Message message) {
-            messageCount++;
-        }
-
-    }
-
-    public void testMessageDelivery() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter();
-        adapter.setServerUrl("vm://localhost?broker.persistent=false");
-        adapter.start(new StubBootstrapContext());
-
-        final CountDownLatch messageDelivered = new CountDownLatch(1);
-
-        final StubMessageEndpoint endpoint = new StubMessageEndpoint() {
-            public void onMessage(Message message) {
-                super.onMessage(message);
-                messageDelivered.countDown();
-            };
-        };
-
-        ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
-        activationSpec.setDestinationType(Queue.class.getName());
-        activationSpec.setDestination("TEST");
-        activationSpec.setResourceAdapter(adapter);
-        activationSpec.validate();
-
-        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
-            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
-                endpoint.xaresource = resource;
-                return endpoint;
-            }
-
-            public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException {
-                return true;
-            }
-        };
-
-        // Activate an Endpoint
-        adapter.endpointActivation(messageEndpointFactory, activationSpec);
-
-        // Give endpoint a chance to setup and register its listeners
-        try {
-            Thread.sleep(1000);
-        } catch (Exception e) {
-
-        }
-
-        // Send the broker a message to that endpoint
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("TEST"));
-        producer.send(session.createTextMessage("Hello!"));
-        connection.close();
-
-        // Wait for the message to be delivered.
-        assertTrue(messageDelivered.await(5000, TimeUnit.MILLISECONDS));
-
-        // Shut the Endpoint down.
-        adapter.endpointDeactivation(messageEndpointFactory, activationSpec);
-        adapter.stop();
-
-    }
-
-
-    public void testMessageExceptionReDelivery() throws Exception {
-
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        Connection connection = factory.createConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-        ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter();
-        adapter.setServerUrl("vm://localhost?broker.persistent=false");
-        adapter.start(new StubBootstrapContext());
-
-        final CountDownLatch messageDelivered = new CountDownLatch(2);
-
-        final StubMessageEndpoint endpoint = new StubMessageEndpoint() {
-            public void onMessage(Message message) {
-                super.onMessage(message);
-                try {
-                    messageDelivered.countDown();
-                    if (!messageDelivered.await(1, TimeUnit.MILLISECONDS)) {
-                        throw new RuntimeException(getName() + " ex on first delivery");
-                    } else {
-                        try {
-                            assertTrue(message.getJMSRedelivered());
-                        } catch (JMSException e) {
-                            e.printStackTrace();
-                        }
-                    }
-                } catch (InterruptedException ignored) {
-                }
-            };
-            
-            public void afterDelivery() throws ResourceException {
-                try {
-                    if (!messageDelivered.await(1, TimeUnit.MILLISECONDS)) {
-                        xaresource.end(xid, XAResource.TMFAIL);
-                        xaresource.rollback(xid);
-                    } else {
-                        xaresource.end(xid, XAResource.TMSUCCESS);
-                        xaresource.prepare(xid);
-                        xaresource.commit(xid, false);
-                    }
-                } catch (Throwable e) {
-                    throw new ResourceException(e);
-                }
-            }
-        };
-
-        ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
-        activationSpec.setDestinationType(Queue.class.getName());
-        activationSpec.setDestination("TEST");
-        activationSpec.setResourceAdapter(adapter);
-        activationSpec.validate();
-
-        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
-            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
-                endpoint.xaresource = resource;
-                return endpoint;
-            }
-
-            public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException {
-                return true;
-            }
-        };
-
-        // Activate an Endpoint
-        adapter.endpointActivation(messageEndpointFactory, activationSpec);
-
-        // Give endpoint a chance to setup and register its listeners
-        try {
-            Thread.sleep(1000);
-        } catch (Exception e) {
-
-        }
-
-        // Send the broker a message to that endpoint
-        MessageProducer producer = session.createProducer(new ActiveMQQueue("TEST"));
-        producer.send(session.createTextMessage("Hello!"));
-        connection.close();
-
-        // Wait for the message to be delivered twice.
-        assertTrue(messageDelivered.await(10000, TimeUnit.MILLISECONDS));
-
-        // Shut the Endpoint down.
-        adapter.endpointDeactivation(messageEndpointFactory, activationSpec);
-        adapter.stop();
-
-    }
-
-
-    public Xid createXid() throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream os = new DataOutputStream(baos);
-        os.writeLong(++txGenerator);
-        os.close();
-        final byte[] bs = baos.toByteArray();
-
-        return new Xid() {
-            public int getFormatId() {
-                return 86;
-            }
-
-            public byte[] getGlobalTransactionId() {
-                return bs;
-            }
-
-            public byte[] getBranchQualifier() {
-                return bs;
-            }
-        };
-
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionFactoryTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionFactoryTest.java
deleted file mode 100755
index f1680cf..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionFactoryTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * 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.ra;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintWriter;
-import java.io.Serializable;
-import java.util.HashSet;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnectionFactory;
-import javax.resource.Referenceable;
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionRequestInfo;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.spi.ManagedConnectionFactory;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class ManagedConnectionFactoryTest extends TestCase {
-
-    private static final String DEFAULT_HOST = "vm://localhost?broker.persistent=false&broker.schedulerSupport=false";
-    private static final String REMOTE_HOST = "vm://remotehost?broker.persistent=false&broker.schedulerSupport=false";
-    private ActiveMQManagedConnectionFactory managedConnectionFactory;
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-
-        managedConnectionFactory = new ActiveMQManagedConnectionFactory();
-        managedConnectionFactory.setServerUrl(DEFAULT_HOST);
-        managedConnectionFactory.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-        managedConnectionFactory.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-    }
-
-    public void testConnectionFactoryAllocation() throws ResourceException, JMSException {
-
-        // Make sure that the ConnectionFactory is asking the connection manager
-        // to
-        // allocate the connection.
-        final boolean allocateRequested[] = new boolean[] {
-            false
-        };
-        Object cf = managedConnectionFactory.createConnectionFactory(new ConnectionManagerAdapter() {
-            private static final long serialVersionUID = 1699499816530099939L;
-
-            public Object allocateConnection(ManagedConnectionFactory connectionFactory, ConnectionRequestInfo info) throws ResourceException {
-                allocateRequested[0] = true;
-                return super.allocateConnection(connectionFactory, info);
-            }
-        });
-
-        // We should be getting a JMS Connection Factory.
-        assertTrue(cf instanceof ConnectionFactory);
-        ConnectionFactory connectionFactory = (ConnectionFactory)cf;
-
-        // Make sure that the connection factory is using the
-        // ConnectionManager..
-        Connection connection = connectionFactory.createConnection();
-        assertTrue(allocateRequested[0]);
-
-        // Make sure that the returned connection is of the expected type.
-        assertTrue(connection != null);
-        assertTrue(connection instanceof ManagedConnectionProxy);
-
-    }
-
-    public void testConnectionFactoryConnectionMatching() throws ResourceException, JMSException {
-
-        ActiveMQConnectionRequestInfo ri1 = new ActiveMQConnectionRequestInfo();
-        ri1.setServerUrl(DEFAULT_HOST);
-        ri1.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-        ri1.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-
-        ActiveMQConnectionRequestInfo ri2 = new ActiveMQConnectionRequestInfo();
-        ri2.setServerUrl(REMOTE_HOST);
-        ri2.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-        ri2.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-        assertNotSame(ri1, ri2);
-
-        ManagedConnection connection1 = managedConnectionFactory.createManagedConnection(null, ri1);
-        ManagedConnection connection2 = managedConnectionFactory.createManagedConnection(null, ri2);
-        assertTrue(connection1 != connection2);
-
-        HashSet<ManagedConnection> set = new HashSet<ManagedConnection>();
-        set.add(connection1);
-        set.add(connection2);
-
-        // Can we match for the first connection?
-        ActiveMQConnectionRequestInfo ri3 = ri1.copy();
-        assertTrue(ri1 != ri3 && ri1.equals(ri3));
-        ManagedConnection test = managedConnectionFactory.matchManagedConnections(set, null, ri3);
-        assertTrue(connection1 == test);
-
-        // Can we match for the second connection?
-        ri3 = ri2.copy();
-        assertTrue(ri2 != ri3 && ri2.equals(ri3));
-        test = managedConnectionFactory.matchManagedConnections(set, null, ri2);
-        assertTrue(connection2 == test);
-
-    }
-
-    public void testConnectionFactoryIsSerializableAndReferenceable() throws ResourceException, JMSException {
-        Object cf = managedConnectionFactory.createConnectionFactory(new ConnectionManagerAdapter());
-        assertTrue(cf != null);
-        assertTrue(cf instanceof Serializable);
-        assertTrue(cf instanceof Referenceable);
-    }
-
-    public void testImplementsQueueAndTopicConnectionFactory() throws Exception {
-        Object cf = managedConnectionFactory.createConnectionFactory(new ConnectionManagerAdapter());
-        assertTrue(cf instanceof QueueConnectionFactory);
-        assertTrue(cf instanceof TopicConnectionFactory);
-    }
-
-    public void testSerializability() throws Exception {
-        
-        managedConnectionFactory.setLogWriter(new PrintWriter(new ByteArrayOutputStream()));
-        
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        ObjectOutputStream oos = new ObjectOutputStream(bos);
-        oos.writeObject(managedConnectionFactory);
-        oos.close();
-        byte[] byteArray = bos.toByteArray();
-        
-        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(byteArray));
-        ActiveMQManagedConnectionFactory deserializedFactory = (ActiveMQManagedConnectionFactory) ois.readObject();
-        ois.close();
-        
-        assertNull(
-                "[logWriter] property of deserialized ActiveMQManagedConnectionFactory is not null", 
-                deserializedFactory.getLogWriter());
-        assertNotNull(
-                "ConnectionRequestInfo of deserialized ActiveMQManagedConnectionFactory is null", 
-                deserializedFactory.getInfo());
-        assertEquals(
-                "[serverUrl] property of deserialized ConnectionRequestInfo object is not [" + DEFAULT_HOST + "]", 
-                DEFAULT_HOST,
-                deserializedFactory.getInfo().getServerUrl());
-        assertNotNull(
-                "Log instance of deserialized ActiveMQManagedConnectionFactory is null",
-                deserializedFactory.log);
-}
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java
deleted file mode 100755
index 1c31c52..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.Session;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionEvent;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class ManagedConnectionTest extends TestCase {
-
-    private static final String DEFAULT_HOST = "vm://localhost";
-
-    private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
-    private ActiveMQManagedConnectionFactory managedConnectionFactory;
-    private ConnectionFactory connectionFactory;
-    private ManagedConnectionProxy connection;
-    private ActiveMQManagedConnection managedConnection;
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-
-        managedConnectionFactory = new ActiveMQManagedConnectionFactory();
-        managedConnectionFactory.setServerUrl(DEFAULT_HOST);
-        managedConnectionFactory.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-        managedConnectionFactory.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-
-        connectionFactory = (ConnectionFactory)managedConnectionFactory.createConnectionFactory(connectionManager);
-        connection = (ManagedConnectionProxy)connectionFactory.createConnection();
-        managedConnection = connection.getManagedConnection();
-
-    }
-
-    public void testConnectionCloseEvent() throws ResourceException, JMSException {
-
-        final boolean test[] = new boolean[] {
-            false
-        };
-        connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-            public void connectionClosed(ConnectionEvent arg0) {
-                test[0] = true;
-            }
-        });
-        connection.close();
-        assertTrue(test[0]);
-    }
-
-    public void testLocalTransactionCommittedEvent() throws ResourceException, JMSException {
-
-        final boolean test[] = new boolean[] {
-            false
-        };
-        connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-            public void localTransactionCommitted(ConnectionEvent arg0) {
-                test[0] = true;
-            }
-        });
-
-        managedConnection.getLocalTransaction().begin();
-        Session session = connection.createSession(true, 0);
-
-        doWork(session);
-        session.commit();
-
-        assertTrue(test[0]);
-
-    }
-
-    public void testLocalTransactionRollbackEvent() throws ResourceException, JMSException {
-
-        final boolean test[] = new boolean[] {
-            false
-        };
-        connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-            public void localTransactionRolledback(ConnectionEvent arg0) {
-                test[0] = true;
-            }
-        });
-        managedConnection.getLocalTransaction().begin();
-        Session session = connection.createSession(true, 0);
-        doWork(session);
-        session.rollback();
-
-        assertTrue(test[0]);
-    }
-
-    public void testLocalTransactionStartedEvent() throws ResourceException, JMSException {
-
-        final boolean test[] = new boolean[] {
-            false
-        };
-        connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-            public void localTransactionStarted(ConnectionEvent arg0) {
-                test[0] = true;
-            }
-        });
-
-        // Begin the transaction... that should kick off the event.
-        managedConnection.getLocalTransaction().begin();
-        Session session = connection.createSession(true, 0);
-        doWork(session);
-
-        assertTrue(test[0]);
-    }
-
-    /**
-     * A managed connection that has been clean up should throw exceptions when
-     * it used.
-     */
-    public void testCleanup() throws ResourceException, JMSException {
-
-        // Do some work and close it...
-        Session session = connection.createSession(true, 0);
-        doWork(session);
-        connection.close();
-        try {
-            // This should throw expection
-            doWork(session);
-            fail("Using a session after the connection is closed should throw exception.");
-        } catch (JMSException e) {
-        }
-    }
-
-    public void testSessionCloseIndependance() throws ResourceException, JMSException {
-
-        Session session1 = connection.createSession(true, 0);
-        Session session2 = connection.createSession(true, 0);
-        assertTrue(session1 != session2);
-
-        doWork(session1);
-        session1.close();
-        try {
-            // This should throw expection
-            doWork(session1);
-            fail("Using a session after the connection is closed should throw exception.");
-        } catch (JMSException e) {
-        }
-
-        // Make sure that closing session 1 does not close session 2
-        doWork(session2);
-        session2.close();
-        try {
-            // This should throw expection
-            doWork(session2);
-            fail("Using a session after the connection is closed should throw exception.");
-        } catch (JMSException e) {
-        }
-    }
-
-    /**
-     * Does some work so that we can test commit/rollback etc.
-     * 
-     * @throws JMSException
-     */
-    public void doWork(Session session) throws JMSException {
-        Queue t = session.createQueue("TEST");
-        MessageProducer producer = session.createProducer(t);
-        producer.send(session.createTextMessage("test message."));
-    }
-
-    public void testImplementsQueueAndTopicConnection() throws Exception {
-        QueueConnection qc = ((QueueConnectionFactory)connectionFactory).createQueueConnection();
-        assertNotNull(qc);
-        TopicConnection tc = ((TopicConnectionFactory)connectionFactory).createTopicConnection();
-        assertNotNull(tc);
-    }
-
-    public void testSelfEquality() {
-        assertEquality(managedConnection, managedConnection);
-    }
-
-    public void testSamePropertiesButNotEqual() throws Exception {
-        ManagedConnectionProxy newConnection = (ManagedConnectionProxy)connectionFactory.createConnection();
-        assertNonEquality(managedConnection, newConnection.getManagedConnection());
-    }
-
-    private void assertEquality(ActiveMQManagedConnection leftCon, ActiveMQManagedConnection rightCon) {
-        assertTrue("ActiveMQManagedConnection are not equal", leftCon.equals(rightCon));
-        assertTrue("ActiveMQManagedConnection are not equal", rightCon.equals(leftCon));
-        assertTrue("HashCodes are not equal", leftCon.hashCode() == rightCon.hashCode());
-    }
-
-    private void assertNonEquality(ActiveMQManagedConnection leftCon, ActiveMQManagedConnection rightCon) {
-        assertFalse("ActiveMQManagedConnection are equal", leftCon.equals(rightCon));
-        assertFalse("ActiveMQManagedConnection are equal", rightCon.equals(leftCon));
-        assertFalse("HashCodes are equal", leftCon.hashCode() == rightCon.hashCode());
-    }
-
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java
deleted file mode 100755
index 7daa645..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * 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.ra;
-
-import java.lang.reflect.Method;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.resource.ResourceException;
-import javax.resource.spi.endpoint.MessageEndpoint;
-
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import junit.framework.TestCase;
-
-/**
- * @author <a href="mailto:michael.gaffney@panacya.com">Michael Gaffney </a>
- */
-@RunWith(JMock.class)
-public class MessageEndpointProxyTest extends TestCase {
-
-    private MessageEndpoint mockEndpoint;
-    private EndpointAndListener mockEndpointAndListener;
-    private Message stubMessage;
-    private MessageEndpointProxy endpointProxy;
-    private Mockery context;
-    
-    @Before
-    public void setUp() {
-        context = new Mockery();
-        mockEndpoint = context.mock(MessageEndpoint.class);
-        context.mock(MessageListener.class);
-        mockEndpointAndListener = context.mock(EndpointAndListener.class);
-        stubMessage = context.mock(Message.class);
-        endpointProxy = new MessageEndpointProxy(mockEndpointAndListener);
-    }
-
-    @Test
-    public void testInvalidConstruction() {
-        try {
-            new MessageEndpointProxy(mockEndpoint);
-            fail("An exception should have been thrown");
-        } catch (IllegalArgumentException e) {
-            assertTrue(true);
-        }
-    }
-
-    @Test
-    public void testSuccessfulCallSequence() throws Exception {
-        setupBeforeDeliverySuccessful();
-        setupOnMessageSuccessful();
-        setupAfterDeliverySuccessful();
-
-        doBeforeDeliveryExpectSuccess();
-        doOnMessageExpectSuccess();
-        doAfterDeliveryExpectSuccess();
-    }
-
-    @Test
-    public void testBeforeDeliveryFailure() throws Exception {
-        context.checking(new Expectations() {{
-            oneOf (mockEndpointAndListener).beforeDelivery(with(any(Method.class)));
-            will(throwException(new ResourceException()));
-        }});
-        context.checking(new Expectations() {{
-            never (mockEndpointAndListener).onMessage(null);
-            never (mockEndpointAndListener).afterDelivery();
-        }});
-        
-        setupExpectRelease();
-
-        try {
-            endpointProxy.beforeDelivery(ActiveMQEndpointWorker.ON_MESSAGE_METHOD);
-            fail("An exception should have been thrown");
-        } catch (Exception e) {
-            assertTrue(true);
-        }
-        doOnMessageExpectInvalidMessageEndpointException();
-        doAfterDeliveryExpectInvalidMessageEndpointException();
-        
-        doFullyDeadCheck();
-    }
-
-    @Test
-    public void testOnMessageFailure() throws Exception {
-        setupBeforeDeliverySuccessful();
-     
-        context.checking(new Expectations() {{
-            oneOf (mockEndpointAndListener).onMessage(with(same(stubMessage)));
-            will(throwException(new RuntimeException()));
-        }});
-        
-        setupAfterDeliverySuccessful();
-
-        doBeforeDeliveryExpectSuccess();
-        try {
-            endpointProxy.onMessage(stubMessage);
-            fail("An exception should have been thrown");
-        } catch (Exception e) {
-            assertTrue(true);
-        }
-        doAfterDeliveryExpectSuccess();
-
-    }
-
-    @Test
-    public void testAfterDeliveryFailure() throws Exception {
-        setupBeforeDeliverySuccessful();
-        setupOnMessageSuccessful();
-        
-        context.checking(new Expectations() {{
-            oneOf (mockEndpointAndListener).afterDelivery(); will(throwException(new ResourceException()));
-        }});
-
-        setupExpectRelease();
-
-        doBeforeDeliveryExpectSuccess();
-        doOnMessageExpectSuccess();
-        try {
-            endpointProxy.afterDelivery();
-            fail("An exception should have been thrown");
-        } catch (Exception e) {
-            assertTrue(true);
-        }
-
-        doFullyDeadCheck();
-    }
-
-    private void doFullyDeadCheck() {
-        doBeforeDeliveryExpectInvalidMessageEndpointException();
-        doOnMessageExpectInvalidMessageEndpointException();
-        doAfterDeliveryExpectInvalidMessageEndpointException();
-        doReleaseExpectInvalidMessageEndpointException();
-    }
-
-    private void setupAfterDeliverySuccessful() throws Exception {
-        context.checking(new Expectations() {{
-            oneOf (mockEndpointAndListener).afterDelivery();
-        }});
-    }
-
-    private void setupOnMessageSuccessful() {
-        context.checking(new Expectations() {{
-            oneOf (mockEndpointAndListener).onMessage(with(stubMessage));
-        }});
-    }
-
-    private void setupBeforeDeliverySuccessful() throws Exception {
-        context.checking(new Expectations() {{
-            oneOf (mockEndpointAndListener).beforeDelivery(with(any(Method.class)));
-        }});
-    }
-
-    private void setupExpectRelease() {
-        context.checking(new Expectations() {{
-            oneOf (mockEndpointAndListener).release();
-        }});
-    }
-    
-    private void doBeforeDeliveryExpectSuccess() {
-        try {
-            endpointProxy.beforeDelivery(ActiveMQEndpointWorker.ON_MESSAGE_METHOD);
-        } catch (Exception e) {
-            fail("No exception should have been thrown");
-        }
-    }
-
-    private void doOnMessageExpectSuccess() {
-        try {
-            endpointProxy.onMessage(stubMessage);
-        } catch (Exception e) {
-            fail("No exception should have been thrown");
-        }
-    }
-
-    private void doAfterDeliveryExpectSuccess() {
-        try {
-            endpointProxy.afterDelivery();
-        } catch (Exception e) {
-            fail("No exception should have been thrown");
-        }
-    }
-
-    private void doBeforeDeliveryExpectInvalidMessageEndpointException() {
-        try {
-            endpointProxy.beforeDelivery(ActiveMQEndpointWorker.ON_MESSAGE_METHOD);
-            fail("An InvalidMessageEndpointException should have been thrown");
-        } catch (InvalidMessageEndpointException e) {
-            assertTrue(true);
-        } catch (Exception e) {
-            fail("An InvalidMessageEndpointException should have been thrown");
-        }
-    }
-
-    private void doOnMessageExpectInvalidMessageEndpointException() {
-        try {
-            endpointProxy.onMessage(stubMessage);
-            fail("An InvalidMessageEndpointException should have been thrown");
-        } catch (InvalidMessageEndpointException e) {
-            assertTrue(true);
-        }
-    }
-
-    private void doAfterDeliveryExpectInvalidMessageEndpointException() {
-        try {
-            endpointProxy.afterDelivery();
-            fail("An InvalidMessageEndpointException should have been thrown");
-        } catch (InvalidMessageEndpointException e) {
-            assertTrue(true);
-        } catch (Exception e) {
-            fail("An InvalidMessageEndpointException should have been thrown");
-        }
-    }
-
-    private void doReleaseExpectInvalidMessageEndpointException() {
-        try {
-            endpointProxy.release();
-            fail("An InvalidMessageEndpointException should have been thrown");
-        } catch (InvalidMessageEndpointException e) {
-            assertTrue(true);
-        }
-    }
-
-    private interface EndpointAndListener extends MessageListener, MessageEndpoint {
-    }
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java
deleted file mode 100644
index a862110..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.Session;
-import javax.resource.spi.endpoint.MessageEndpoint;
-import javax.resource.spi.work.WorkManager;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQSession;
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * 
- */
-@RunWith(JMock.class)
-public class ServerSessionImplTest extends TestCase {
-    private static final String BROKER_URL = "vm://localhost";
-    private ServerSessionImpl serverSession;
-    private ServerSessionPoolImpl pool;
-    private WorkManager workManager;
-    private MessageEndpoint messageEndpoint;
-    private ActiveMQConnection con;
-    private ActiveMQSession session;
-    private Mockery context;
-    
-    @Before
-    public void setUp() throws Exception
-    {
-        super.setUp();
-        context = new Mockery() {{
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }};
-        
-        org.apache.activemq.ActiveMQConnectionFactory factory = 
-                new org.apache.activemq.ActiveMQConnectionFactory(BROKER_URL);
-        con = (ActiveMQConnection) factory.createConnection();
-        session = (ActiveMQSession) con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        pool = context.mock(ServerSessionPoolImpl.class);        
-        workManager = context.mock(WorkManager.class);
-        
-        serverSession = new ServerSessionImpl(
-                (ServerSessionPoolImpl) pool, 
-                session, 
-                (WorkManager) workManager, 
-                messageEndpoint, 
-                false, 
-                10);
-    }
-    
-    @Test
-    public void testRunDetectsStoppedSession() throws Exception {
-        con.close();
-        context.checking(new Expectations() {{
-            oneOf (pool).removeFromPool(with(same(serverSession)));
-        }});   
-        serverSession.run();
-    }
-}
diff --git a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/UnsubscribeResubscribeTest.java b/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/UnsubscribeResubscribeTest.java
deleted file mode 100644
index a0e254e..0000000
--- a/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/UnsubscribeResubscribeTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.ra;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-import javax.resource.ResourceException;
-import javax.transaction.xa.XAException;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * 
- */
-public class UnsubscribeResubscribeTest extends TestCase {
-
-    private static final String DEFAULT_HOST = "vm://localhost";
-
-    private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
-    private ActiveMQManagedConnectionFactory managedConnectionFactory;
-    private ConnectionFactory connectionFactory;
-    private ManagedConnectionProxy connection;
-    private ActiveMQManagedConnection managedConnection;
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-
-        managedConnectionFactory = new ActiveMQManagedConnectionFactory();
-        managedConnectionFactory.setServerUrl(DEFAULT_HOST);
-        managedConnectionFactory.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-        managedConnectionFactory.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-        managedConnectionFactory.setClientid("clientId");
-
-    }
-
-    private void getConnection() throws ResourceException, JMSException {
-        connectionFactory = (ConnectionFactory)managedConnectionFactory.createConnectionFactory(connectionManager);
-        connection = (ManagedConnectionProxy)connectionFactory.createConnection();
-        managedConnection = connection.getManagedConnection();
-    }
-
-    public void testUnsubscribeResubscribe() throws ResourceException, JMSException, XAException {
-        getConnection();
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Topic topic = session.createTopic("topic");
-        TopicSubscriber sub = session.createDurableSubscriber(topic, "sub");
-        Message message = session.createTextMessage("text message");
-        MessageProducer producer = session.createProducer(topic);
-        producer.send(message);
-        sub.close();
-        session.unsubscribe("sub");
-        sub = session.createDurableSubscriber(topic, "sub");
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-ra/src/test/resources/log4j.properties b/trunk/activemq-ra/src/test/resources/log4j.properties
deleted file mode 100755
index 4d44fd5..0000000
--- a/trunk/activemq-ra/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.spring=WARN
-#log4j.logger.org.apache.activemq.ra=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
diff --git a/trunk/activemq-rar/pom.xml b/trunk/activemq-rar/pom.xml
deleted file mode 100644
index a09ddd7..0000000
--- a/trunk/activemq-rar/pom.xml
+++ /dev/null
@@ -1,270 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-rar</artifactId>
-  <packaging>rar</packaging>
-  <name>ActiveMQ :: RAR</name>
-  <description>A JCA Resource Adapter used to integrate ActiveMQ with transactional enterprise containers</description>
-
-  <dependencies>
-  
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-ra</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-jms_1.1_spec</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-ejb_2.1_spec</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-jacc_1.1_spec</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-servlet_2.5_spec</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>mx4j</groupId>
-           <artifactId>mx4j</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>geronimo</groupId>
-           <artifactId>geronimo-kernel</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>geronimo</groupId>
-           <artifactId>geronimo-j2ee</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>axion</groupId>
-           <artifactId>axion</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>${project.groupId}</groupId>
-           <artifactId>activemq-jaas</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>howl</groupId>
-           <artifactId>howl-logger</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>activemq</groupId>
-           <artifactId>smackx</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>activemq</groupId>
-           <artifactId>smack</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>mx4j</groupId>
-           <artifactId>mx4j-jmx</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>mx4j</groupId>
-           <artifactId>mx4j-impl</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>mx4j</groupId>
-           <artifactId>mx4j-remote</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>mx4j</groupId>
-           <artifactId>mx4j-tools</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>qdox</groupId>
-           <artifactId>qdox</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>stax</groupId>
-           <artifactId>stax-api</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>stax</groupId>
-           <artifactId>stax</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>junit</groupId>
-           <artifactId>junit</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>regexp</groupId>
-           <artifactId>regexp</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>org.apache.activemq</groupId>
-           <artifactId>activemq-jmdns_1.0</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>xalan</groupId>
-           <artifactId>xalan</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>xmlbeans</groupId>
-           <artifactId>xbean</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>xmlbeans</groupId>
-           <artifactId>xmlpublic</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>xmlbeans</groupId>
-           <artifactId>xbean_xpath</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>xerces</groupId>
-           <artifactId>xercesImpl</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>xml-apis</groupId>
-           <artifactId>xml-apis</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>ant</groupId>
-           <artifactId>ant</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>commons-collections</groupId>
-           <artifactId>commons-collections</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>commons-primitives</groupId>
-           <artifactId>commons-primitives</artifactId>
-        </exclusion>
-        <exclusion>
-           <groupId>commons-pool</groupId>
-           <artifactId>commons-pool</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>mx4j</groupId>
-          <artifactId>mx4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>ant</groupId>
-          <artifactId>ant</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>stax</groupId>
-          <artifactId>stax-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>qdox</groupId>
-          <artifactId>qdox</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-    </dependency>
-    <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-context</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>  
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>pertest</forkMode>
-          <childDelegation>false</childDelegation>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>copy-conf</id>
-            <phase>process-test-resources</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>target/test-classes</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>src/main/rar</directory>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-  
-</project>
-
diff --git a/trunk/activemq-rar/src/main/rar/META-INF/LICENSE b/trunk/activemq-rar/src/main/rar/META-INF/LICENSE
deleted file mode 100644
index 9b304d9..0000000
--- a/trunk/activemq-rar/src/main/rar/META-INF/LICENSE
+++ /dev/null
@@ -1,252 +0,0 @@
-
-                                 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.
-
-=========================================================================
-== For the backport-util-concurrent library                            ==
-=========================================================================
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
-<html><head><title>Creative Commons Public Domain</title>
-
-<body>
-
-<p align="center"><em>Copyright-Only Dedication (based on United States law) or Public Domain Certification</em></p>
-
-        <p>The
-person or persons who have associated work with this document (the
-"Dedicator" or "Certifier") hereby either (a) certifies that, to the
-best of his knowledge, the work of authorship identified is in the
-public domain of the country from which the work is published, or (b)
-hereby dedicates whatever copyright the dedicators holds in the work of
-authorship identified below (the "Work") to the public domain. A
-certifier, morever, dedicates any copyright interest he may have in the
-associated work, and for these purposes, is described as a "dedicator"
-below.</p>
-
-        <p>A certifier has taken reasonable steps to verify
-the copyright status of this work. Certifier recognizes that his good
-faith efforts may not shield him from liability if in fact the work
-certified is not in the public domain.</p>
-
-        <p>Dedicator makes
-this dedication for the benefit of the public at large and to the
-detriment of the Dedicator's heirs and successors. Dedicator intends
-this dedication to be an overt act of relinquishment in perpetuity of
-all present and future rights under copyright law, whether vested or
-contingent, in the Work. Dedicator understands that such relinquishment
-of all rights includes the relinquishment of all rights to enforce (by
-lawsuit or otherwise) those copyrights in the Work.</p>
-
-        <p>Dedicator
-recognizes that, once placed in the public domain, the Work may be
-freely reproduced, distributed, transmitted, used, modified, built
-upon, or otherwise exploited by anyone for any purpose, commercial or
-non-commercial, and in any way, including by methods that have not yet
-been invented or conceived.</p>
-    </div>
-</div>
-</body></html>
-
-=========================================================================
-== Spring is licensed under the Apache License Version 2.0             ==
-=========================================================================
diff --git a/trunk/activemq-rar/src/main/rar/META-INF/NOTICE b/trunk/activemq-rar/src/main/rar/META-INF/NOTICE
deleted file mode 100644
index 5f66a8e..0000000
--- a/trunk/activemq-rar/src/main/rar/META-INF/NOTICE
+++ /dev/null
@@ -1,46 +0,0 @@
-Apache ActiveMQ
-Copyright 2005-2008 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-=========================================================================
-==  Derby Notice                                                       ==
-=========================================================================
-
-Portions of Derby were orginally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-
-The portion of the functionTests under 'nist' was originally
-developed by the National Institute of Standards and Technology (NIST),
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-=========================================================================
-==  Spring Notice                                                      ==
-=========================================================================
-
-This product includes software developed by
-the Apache Software Foundation (http://www.apache.org).
-
-This product also includes software developed by
-Clinton Begin (http://www.ibatis.com).
-
-The end-user documentation included with a redistribution, if any,
-must include the following acknowledgement:
-
- "This product includes software developed by the Spring Framework
-  Project (http://www.springframework.org)."
-
-Alternately, this acknowledgement may appear in the software itself,
-if and wherever such third-party acknowledgements normally appear.
-
-The names "Spring" and "Spring Framework" must not be used to
-endorse or promote products derived from this software without
-prior written permission. For written permission, please contact
-rod.johnson@interface21.com or juergen.hoeller@interface21.com.
diff --git a/trunk/activemq-rar/src/main/rar/META-INF/ra.xml b/trunk/activemq-rar/src/main/rar/META-INF/ra.xml
deleted file mode 100644
index 93a67d8..0000000
--- a/trunk/activemq-rar/src/main/rar/META-INF/ra.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<connector xmlns="http://java.sun.com/xml/ns/j2ee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-    http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
-    version="1.5">
-    <description>ActiveMQ  inbound and outbound JMS ResourceAdapter</description>
-    <display-name>ActiveMQ JMS Resource Adapter</display-name>
-    <vendor-name>activemq.org</vendor-name>
-    <eis-type>JMS 1.1</eis-type>
-    <resourceadapter-version>1.0</resourceadapter-version>
-    <license>
-        <description>
-    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.
-        </description>
-        <license-required>true</license-required>
-    </license>
-    <resourceadapter>
-        <resourceadapter-class>org.apache.activemq.ra.ActiveMQResourceAdapter</resourceadapter-class>
-        <config-property>
-            <description>
-              The URL to the ActiveMQ server that you want this connection to connect to.  If using
-              an embedded broker, this value should be 'vm://localhost'.
-            </description>
-            <config-property-name>ServerUrl</config-property-name>
-            <config-property-type>java.lang.String</config-property-type>
-            <config-property-value>tcp://localhost:61616</config-property-value>
-            <!-- <config-property-value>vm://localhost</config-property-value> -->
-        </config-property>
-        <config-property>
-            <description>The default user name that will be used to establish connections to the ActiveMQ server.</description>
-            <config-property-name>UserName</config-property-name>
-            <config-property-type>java.lang.String</config-property-type>
-            <config-property-value>defaultUser</config-property-value>
-        </config-property>
-        <config-property>
-            <description>The default password that will be used to log the default user into the ActiveMQ server.</description>
-            <config-property-name>Password</config-property-name>
-            <config-property-type>java.lang.String</config-property-type>
-            <config-property-value>defaultPassword</config-property-value>
-        </config-property>
-        <config-property>
-            <description>The client id that will be set on the connection that is established to the ActiveMQ server.</description>
-            <config-property-name>Clientid</config-property-name>
-            <config-property-type>java.lang.String</config-property-type>
-        </config-property>
-        <config-property>
-            <description>Boolean to configure if outbound connections should reuse the inbound connection's session for sending messages.</description>
-            <config-property-name>UseInboundSession</config-property-name>
-            <config-property-type>java.lang.Boolean</config-property-type>
-            <config-property-value>false</config-property-value>
-        </config-property>
-
-			  <!-- NOTE disable the following property if you do not wish to deploy an embedded broker -->
-        <config-property>
-            <description>
-              Sets the XML configuration file used to configure the embedded ActiveMQ broker via 
-              Spring if using embedded mode.
-              
-              BrokerXmlConfig is the filename which is assumed to be on the classpath unless 
-              a URL is specified. So a value of foo/bar.xml would be assumed to be on the 
-              classpath whereas file:dir/file.xml would use the file system. 
-              Any valid URL string is supported.              
-            </description>
-            <config-property-name>BrokerXmlConfig</config-property-name>
-            <config-property-type>java.lang.String</config-property-type>
-            <config-property-value></config-property-value>
-            <!--
-             To use the broker-config.xml from the root for the RAR
-               <config-property-value>xbean:broker-config.xml</config-property-value>
-             To use an external file or url location
-               <config-property-value>xbean:file:///amq/config/jee/broker-config.xml</config-property-value>
-            -->
-        </config-property>
-
-        <outbound-resourceadapter>
-            <connection-definition>
-                <managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory</managedconnectionfactory-class>
-                <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
-                <connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory</connectionfactory-impl-class>
-                <connection-interface>javax.jms.Connection</connection-interface>
-                <connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy</connection-impl-class>
-            </connection-definition>
-            <connection-definition>
-                <managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory</managedconnectionfactory-class>
-                <connectionfactory-interface>javax.jms.QueueConnectionFactory</connectionfactory-interface>
-                <connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory</connectionfactory-impl-class>
-                <connection-interface>javax.jms.QueueConnection</connection-interface>
-                <connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy</connection-impl-class>
-            </connection-definition>
-            <connection-definition>
-                <managedconnectionfactory-class>org.apache.activemq.ra.ActiveMQManagedConnectionFactory</managedconnectionfactory-class>
-                <connectionfactory-interface>javax.jms.TopicConnectionFactory</connectionfactory-interface>
-                <connectionfactory-impl-class>org.apache.activemq.ra.ActiveMQConnectionFactory</connectionfactory-impl-class>
-                <connection-interface>javax.jms.TopicConnection</connection-interface>
-                <connection-impl-class>org.apache.activemq.ra.ManagedConnectionProxy</connection-impl-class>
-            </connection-definition>
-            <transaction-support>XATransaction</transaction-support>
-            <authentication-mechanism>
-                <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
-                <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
-            </authentication-mechanism>
-            <reauthentication-support>false</reauthentication-support>
-        </outbound-resourceadapter>
-        <inbound-resourceadapter>
-            <messageadapter>
-                <messagelistener>
-                    <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
-                    <activationspec>
-                        <activationspec-class>org.apache.activemq.ra.ActiveMQActivationSpec</activationspec-class>
-                        
-                        <required-config-property>
-                            <config-property-name>destination</config-property-name>
-                        </required-config-property>
-                        <required-config-property>
-                            <config-property-name>destinationType</config-property-name>
-                        </required-config-property>
-                        
-                    </activationspec>
-                </messagelistener>
-            </messageadapter>
-        </inbound-resourceadapter>
-        <adminobject>
-            <adminobject-interface>javax.jms.Queue</adminobject-interface>
-            <adminobject-class>org.apache.activemq.command.ActiveMQQueue</adminobject-class>
-            <config-property>
-                <config-property-name>PhysicalName</config-property-name>
-                <config-property-type>java.lang.String</config-property-type>
-            </config-property>
-        </adminobject>
-        <adminobject>
-            <adminobject-interface>javax.jms.Topic</adminobject-interface>
-            <adminobject-class>org.apache.activemq.command.ActiveMQTopic</adminobject-class>
-            <config-property>
-                <config-property-name>PhysicalName</config-property-name>
-                <config-property-type>java.lang.String</config-property-type>
-            </config-property>
-        </adminobject>
-    </resourceadapter>
-</connector>
diff --git a/trunk/activemq-rar/src/main/rar/broker-config.xml b/trunk/activemq-rar/src/main/rar/broker-config.xml
deleted file mode 100644
index 3b1dd3b..0000000
--- a/trunk/activemq-rar/src/main/rar/broker-config.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <!--  shutdown hook is disabled as RAR classloader may be gone at shutdown -->
-  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" useShutdownHook="false">
-
-     <managementContext>
-       <!-- use appserver provided context instead of creating one,
-            for jboss use: -Djboss.platform.mbeanserver -->
-       <managementContext createConnector="false"/>
-     </managementContext>
-
-    <persistenceAdapter>
-       <kahaDB directory="activemq-data/kahadb"/>
-     </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnectors>
-    
-  </broker>
-</beans>
diff --git a/trunk/activemq-rar/src/main/rar/log4j.properties b/trunk/activemq-rar/src/main/rar/log4j.properties
deleted file mode 100755
index e28a354..0000000
--- a/trunk/activemq-rar/src/main/rar/log4j.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-log4j.rootLogger=INFO, stdout
-
-log4j.logger.org.apache.activemq.spring=WARN
-log4j.logger.org.springframework=WARN
-log4j.logger.org.apache.xbean.spring=WARN
-
-
-# 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=activemq-ra.log
-log4j.appender.out.append=true
diff --git a/trunk/activemq-rar/src/test/java/org/apache/activemq/BrokerConfigTest.java b/trunk/activemq-rar/src/test/java/org/apache/activemq/BrokerConfigTest.java
deleted file mode 100644
index 533ecdf..0000000
--- a/trunk/activemq-rar/src/test/java/org/apache/activemq/BrokerConfigTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.junit.Test;
-
-public class BrokerConfigTest {
-
-    @Test
-    public void testEmbeddedxMLConfig() throws Exception {
-        BrokerService broker = BrokerFactory.createBroker("xbean:broker-config.xml");
-        broker.stop();
-    }
-}
\ No newline at end of file
diff --git a/trunk/activemq-run/pom.xml b/trunk/activemq-run/pom.xml
deleted file mode 100644
index 96e8d84..0000000
--- a/trunk/activemq-run/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-run</artifactId>
-  <name>ActiveMQ :: Run Jar</name>
-  <description>run.jar for starting a standalone ActiveMQ broker</description>
-
-  <dependencies>
-
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-console</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-
-    <plugins>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifest>
-              <mainClass>org.apache.activemq.console.Main</mainClass>
-            </manifest>
-          </archive>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>1.0.1</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <id>main-class</id>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <!--<shadedArtifactAttached>true</shadedArtifactAttached>-->
-              <!--<shadedClassifierName>run</shadedClassifierName>-->
-              <artifactSet>
-                <includes>
-                  <include>${project.groupId}:activemq-console</include>
-                </includes>
-              </artifactSet>
-              <filters>
-                <filter>
-                  <artifact>${project.groupId}:activemq-console</artifact>
-                  <includes>
-                    <include>org/apache/activemq/console/Main*.class</include>
-                  </includes>
-                </filter>
-              </filters>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-spring/pom.xml b/trunk/activemq-spring/pom.xml
deleted file mode 100755
index 1214ea9..0000000
--- a/trunk/activemq-spring/pom.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-spring</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Spring</name>
-  <description>ActiveMQ Spring Integration</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-      javax.transaction*;resolution:=optional,
-      org.apache.geronimo.transaction.manager*;resolution:=optional,
-      org.springframework*;resolution:=optional,
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.activemq.pool*;version=${project.version};-noimport:=;-split-package:=merge-last,
-      org.apache.activemq.xbean*;version=${project.version};-noimport:=true;-split-package:=merge-last,
-      org.apache.activemq.hooks*;version=${project.version};-noimport:=;-split-package:=merge-last
-    </activemq.osgi.export>
-  </properties>
-
-  <dependencies>
-
-    <!-- =============================== -->
-    <!-- Required Dependencies -->
-    <!-- =============================== -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-pool</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.components</groupId>
-      <artifactId>geronimo-transaction</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-annotation_1.0_spec</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <version>${spring-version}</version>  
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-jms</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-    	<groupId>org.apache.xbean</groupId>
-    	<artifactId>xbean-spring</artifactId>
-    	<scope>test</scope>
-    </dependency>
-    <dependency>
-    	<groupId>log4j</groupId>
-    	<artifactId>log4j</artifactId>
-    	<scope>test</scope>
-    </dependency>
-    <dependency>
-         <groupId>org.jencks</groupId>
-         <artifactId>jencks</artifactId>
-         <version>2.2</version>
-         <scope>test</scope>
-    </dependency>
-    <dependency>
-         <groupId>org.slf4j</groupId>
-         <artifactId>slf4j-log4j12</artifactId>
-         <scope>test</scope>
-    </dependency>
-    <dependency>
-         <groupId>${project.groupId}</groupId>
-         <artifactId>activemq-ra</artifactId>
-         <scope>test</scope>
-    </dependency>
-    <dependency>
-        <groupId>org.springframework.osgi</groupId>
-        <artifactId>spring-osgi-core</artifactId>
-        <exclusions>
-            <exclusion>
-                <groupId>org.springframework</groupId>
-                <artifactId>org.springframework.context</artifactId>
-            </exclusion>
-            <exclusion>
-                <groupId>org.springframework</groupId>
-                <artifactId>org.springframework.beans</artifactId>
-            </exclusion>
-            <exclusion>
-                <groupId>org.springframework</groupId>
-                <artifactId>org.springframework.aop</artifactId>
-            </exclusion>
-            <exclusion>
-                <groupId>org.springframework</groupId>
-                <artifactId>org.springframework.core</artifactId>
-            </exclusion>
-        </exclusions>
-    </dependency>    
-    
-  </dependencies>
-
-</project>
diff --git a/trunk/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java b/trunk/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java
deleted file mode 100644
index 5b1fef65..0000000
--- a/trunk/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.hooks;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.osgi.framework.BundleException;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
-
-public class SpringContextHook implements Runnable, ApplicationContextAware {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(SpringContextHook.class);
-    ApplicationContext applicationContext;
-    
-    public void run() {
-        if (applicationContext instanceof ConfigurableApplicationContext) {
-            ((ConfigurableApplicationContext) applicationContext).close();
-        }
-        if (applicationContext instanceof OsgiBundleXmlApplicationContext){
-            try {
-                ((OsgiBundleXmlApplicationContext)applicationContext).getBundle().stop();
-            } catch (BundleException e) {
-                LOG.info("Error stopping OSGi bundle " + e, e);
-            }
-        }
-
-    }
-
-    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
-        this.applicationContext = applicationContext;
-    }
-
-}
diff --git a/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java b/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
deleted file mode 100644
index bde33a8..0000000
--- a/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * 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.pool;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.jms.ConnectionFactory;
-import javax.transaction.TransactionManager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.commons.pool.ObjectPoolFactory;
-import org.springframework.beans.factory.FactoryBean;
-
-/**
- * Simple factory bean used to create a jencks connection pool.
- * Depending on the properties set, it will create a simple pool,
- * a transaction aware connection pool, or a jca aware connection pool.
- *
- * <pre class="code">
- * <bean id="pooledConnectionFactory" class="javax.script.ScriptEngineFactory.PooledConnectionFactoryFactoryBean">
- *   <property name="connectionFactory" ref="connectionFactory" />
- *   <property name="transactionManager" ref="transactionManager" />
- *   <property name="resourceName" value="ResourceName" />
- * </bean>
- * </pre>
- *
- * The <code>resourceName</code> property should be used along with the {@link ActiveMQResourceManager} and have
- * the same value than its <code>resourceName</code> property. This will make sure the transaction manager
- * maps correctly the connection factory to the recovery process.
- *
- * @org.apache.xbean.XBean
- */
-public class PooledConnectionFactoryBean implements FactoryBean {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(PooledConnectionFactoryBean.class);
-
-    private PooledConnectionFactory pooledConnectionFactory;
-    private ConnectionFactory connectionFactory;
-    private int maxConnections = 1;
-    private int maximumActive = 500;
-    private Object transactionManager;
-    private String resourceName;
-    private ObjectPoolFactory poolFactory;
-
-    public int getMaxConnections() {
-        return maxConnections;
-    }
-
-    public void setMaxConnections(int maxConnections) {
-        this.maxConnections = maxConnections;
-    }
-
-    public int getMaximumActive() {
-        return maximumActive;
-    }
-
-    public void setMaximumActive(int maximumActive) {
-        this.maximumActive = maximumActive;
-    }
-
-    public Object getTransactionManager() {
-        return transactionManager;
-    }
-
-    public void setTransactionManager(Object transactionManager) {
-        this.transactionManager = transactionManager;
-    }
-
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public void setResourceName(String resourceName) {
-        this.resourceName = resourceName;
-    }
-
-    public ConnectionFactory getConnectionFactory() {
-        return connectionFactory;
-    }
-
-    public void setConnectionFactory(ConnectionFactory connectionFactory) {
-        this.connectionFactory = connectionFactory;
-    }
-
-    public ObjectPoolFactory getPoolFactory() {
-        return poolFactory;
-    }
-
-    public void setPoolFactory(ObjectPoolFactory poolFactory) {
-        this.poolFactory = poolFactory;
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.InitMethod
-     */
-    @PostConstruct
-    public void afterPropertiesSet() throws Exception {
-        if (pooledConnectionFactory == null && transactionManager != null && resourceName != null) {
-            try {
-                LOGGER.debug("Trying to build a JcaPooledConnectionFactory");
-                JcaPooledConnectionFactory f = new JcaPooledConnectionFactory();
-                f.setName(resourceName);
-                f.setTransactionManager((TransactionManager) transactionManager);
-                f.setMaxConnections(maxConnections);
-                f.setMaximumActive(maximumActive);
-                f.setConnectionFactory(connectionFactory);
-                f.setPoolFactory(poolFactory);
-                this.pooledConnectionFactory = f;
-            } catch (Throwable t) {
-                LOGGER.debug("Could not create JCA enabled connection factory: " + t, t);
-            }
-        }
-        if (pooledConnectionFactory == null && transactionManager != null) {
-            try {
-                LOGGER.debug("Trying to build a XaPooledConnectionFactory");
-                XaPooledConnectionFactory f = new XaPooledConnectionFactory();
-                f.setTransactionManager((TransactionManager) transactionManager);
-                f.setMaxConnections(maxConnections);
-                f.setMaximumActive(maximumActive);
-                f.setConnectionFactory(connectionFactory);
-                f.setPoolFactory(poolFactory);
-                this.pooledConnectionFactory = f;
-            } catch (Throwable t) {
-                LOGGER.debug("Could not create XA enabled connection factory: " + t, t);
-            }
-        }
-        if (pooledConnectionFactory == null) {
-            try {
-                LOGGER.debug("Trying to build a PooledConnectionFactory");
-                PooledConnectionFactory f = new PooledConnectionFactory();
-                f.setMaxConnections(maxConnections);
-                f.setMaximumActive(maximumActive);
-                f.setConnectionFactory(connectionFactory);
-                f.setPoolFactory(poolFactory);
-                this.pooledConnectionFactory = f;
-            } catch (Throwable t) {
-                LOGGER.debug("Could not create pooled connection factory: " + t, t);
-            }
-        }
-        if (pooledConnectionFactory == null) {
-            throw new IllegalStateException("Unable to create pooled connection factory.  Enable DEBUG log level for more informations");
-        }
-    }
-
-    /**
-     *
-     * @throws Exception
-     * @org.apache.xbean.DestroyMethod
-     */
-    @PreDestroy
-    public void destroy() throws Exception {
-        if (pooledConnectionFactory != null) {
-            pooledConnectionFactory.stop();
-            pooledConnectionFactory = null;
-        }
-    }
-
-    // FactoryBean methods
-    public Object getObject() throws Exception {
-        return pooledConnectionFactory;
-    }
-
-    public Class getObjectType() {
-        return ConnectionFactory.class;
-    }
-
-    public boolean isSingleton() {
-        return true;
-    }
-}
diff --git a/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/PooledBrokerFactoryBean.java b/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/PooledBrokerFactoryBean.java
deleted file mode 100644
index 735857c..0000000
--- a/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/PooledBrokerFactoryBean.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * 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.xbean;
-
-import java.util.HashMap;
-
-import org.apache.activemq.broker.BrokerService;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.core.io.Resource;
-
-/**
- * Used to share a single broker even if you have multiple broker bean
- * definitions. A use case is where you have multiple web applications that want
- * to start an embedded broker but only the first one to deploy should actually
- * start it.
- * 
- * 
- */
-public class PooledBrokerFactoryBean implements FactoryBean, InitializingBean, DisposableBean {
-
-    static final HashMap<String, SharedBroker> SHARED_BROKER_MAP = new HashMap<String, SharedBroker>();
-
-    private boolean start;
-    private Resource config;
-
-    static class SharedBroker {
-        BrokerFactoryBean factory;
-        int refCount;
-    }
-
-    public void afterPropertiesSet() throws Exception {
-        synchronized (SHARED_BROKER_MAP) {
-            SharedBroker sharedBroker = SHARED_BROKER_MAP.get(config.getFilename());
-            if (sharedBroker == null) {
-                sharedBroker = new SharedBroker();
-                sharedBroker.factory = new BrokerFactoryBean();
-                sharedBroker.factory.setConfig(config);
-                sharedBroker.factory.setStart(start);
-                sharedBroker.factory.afterPropertiesSet();
-                SHARED_BROKER_MAP.put(config.getFilename(), sharedBroker);
-            }
-            sharedBroker.refCount++;
-        }
-    }
-
-    public void destroy() throws Exception {
-        synchronized (SHARED_BROKER_MAP) {
-            SharedBroker sharedBroker = SHARED_BROKER_MAP.get(config.getFilename());
-            if (sharedBroker != null) {
-                sharedBroker.refCount--;
-                if (sharedBroker.refCount == 0) {
-                    sharedBroker.factory.destroy();
-                    SHARED_BROKER_MAP.remove(config.getFilename());
-                }
-            }
-        }
-    }
-
-    public Resource getConfig() {
-        return config;
-    }
-
-    public Object getObject() throws Exception {
-        synchronized (SHARED_BROKER_MAP) {
-            SharedBroker sharedBroker = SHARED_BROKER_MAP.get(config.getFilename());
-            if (sharedBroker != null) {
-                return sharedBroker.factory.getObject();
-            }
-        }
-        return null;
-    }
-
-    public Class getObjectType() {
-        return BrokerService.class;
-    }
-
-    public boolean isSingleton() {
-        return true;
-    }
-
-    public boolean isStart() {
-        return start;
-    }
-
-    public void setConfig(Resource config) {
-        this.config = config;
-    }
-
-    public void setStart(boolean start) {
-        this.start = start;
-    }
-
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/Listener.java b/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/Listener.java
deleted file mode 100644
index b1747d9..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/Listener.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.spring;
-
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import java.util.ArrayList;
-import java.util.List;
-
-public class Listener implements MessageListener {
-    private static final Logger LOG = LoggerFactory.getLogger(Listener.class);
-
-	List<Message> messages = new ArrayList<Message>();
-	long lastReceived = 0L;
-
-
-	public void onMessage(Message message)  {
-
-        try {
-            LOG.info("LISTENER received " + message.getJMSDestination() + " " + ((ActiveMQTextMessage)message).getText());
-            lastReceived = System.currentTimeMillis();
-            synchronized (messages) {
-                messages.add(message);
-            }
-        } catch (JMSException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java b/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java
deleted file mode 100644
index de1fed0..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.spring;
-
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.transaction.TransactionConfiguration;
-
-import javax.annotation.Resource;
-import javax.jms.*;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-
-@ContextConfiguration(locations = {"classpath:spring/spring.xml"})
-@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false)
-public class ListenerTest {
-    private static final Logger LOG = LoggerFactory.getLogger(ListenerTest.class);
-
-    int msgNum = 10;
-
-    protected String bindAddress = "vm://localhost";    
-
-    @Resource
-    Listener listener;
-
-    @Test
-    @DirtiesContext
-    public void testSimple() throws Exception {
-        sendMessages("SIMPLE", msgNum);
-
-        Thread.sleep(3000);
-
-        LOG.info("messages received= " + listener.messages.size());
-        Assert.assertEquals(msgNum, listener.messages.size());
-    }
-
-
-    @Test
-    @DirtiesContext
-    public void testComposite() throws Exception {
-        sendMessages("TEST.1,TEST.2,TEST.3,TEST.4,TEST.5,TEST.6", msgNum);
-
-        Wait.waitFor(new Wait.Condition() {
-            public boolean isSatisified() throws Exception {
-                return (6 * msgNum) <= listener.messages.size();
-            }
-        });
-
-        LOG.info("messages received= " + listener.messages.size());
-        Assert.assertEquals(6 * msgNum, listener.messages.size());
-    }
-
-    public void sendMessages(String destName, int msgNum) throws Exception {
-        ConnectionFactory factory = new org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:61616");
-        Connection conn = factory.createConnection();
-        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        Destination dest = sess.createQueue(destName);
-        MessageProducer producer = sess.createProducer(dest);
-        for (int i = 0; i < msgNum; i++) {
-            String messageText = i +" test";
-            LOG.info("sending message '" + messageText + "'");
-            producer.send(sess.createTextMessage(messageText));
-        }
-    }
-
-
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java b/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java
deleted file mode 100644
index 867e87e..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * 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.spring;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.transaction.TransactionConfiguration;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.TransactionException;
-import org.springframework.transaction.TransactionStatus;
-import org.springframework.transaction.support.TransactionCallbackWithoutResult;
-import org.springframework.transaction.support.TransactionTemplate;
-
-import javax.annotation.Resource;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import java.util.Arrays;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-
-@ContextConfiguration(locations = {"classpath:spring/xa.xml"})
-@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false)
-public class ParallelXATransactionTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ParallelXATransactionTest.class);
-
-    @Resource(name = "transactionManager")
-    PlatformTransactionManager txManager = null;
-
-    @Resource(name = "transactionManager2")
-    PlatformTransactionManager txManager2 = null;
-
-
-    @Resource(name = "jmsTemplate")
-    JmsTemplate jmsTemplate = null;
-
-    @Resource(name = "jmsTemplate2")
-    JmsTemplate jmsTemplate2 = null;
-
-
-    public static final int NB_MSG = 100;
-    public static final String BODY = Arrays.toString(new int[1024]);
-    private static final String[] QUEUES = {"TEST.queue1", "TEST.queue2", "TEST.queue3", "TEST.queue4", "TEST.queue5"};
-    private static final String AUDIT = "TEST.audit";
-    public static final int SLEEP = 500;
-
-    @Test
-    @DirtiesContext
-    public void testParalellXaTx() throws Exception {
-
-
-        class ProducerThread extends Thread {
-
-            PlatformTransactionManager txManager;
-            JmsTemplate jmsTemplate;
-            Exception lastException;
-
-
-            public ProducerThread(JmsTemplate jmsTemplate, PlatformTransactionManager txManager) {
-               this.jmsTemplate = jmsTemplate;
-               this.txManager = txManager;
-            }
-
-            public void run() {
-                int i = 0;
-                while (i++ < 10) {
-
-                    try {
-                        Thread.sleep((long) (Math.random() * SLEEP));
-                    } catch (InterruptedException e) {
-                        e.printStackTrace();
-                    }
-                    TransactionTemplate tt = new TransactionTemplate(this.txManager);
-
-
-                    try {
-                        tt.execute(new TransactionCallbackWithoutResult() {
-                            @Override
-                            protected void doInTransactionWithoutResult(TransactionStatus status) {
-                                try {
-
-                                    for (final String queue : QUEUES) {
-                                        jmsTemplate.send(queue + "," + AUDIT, new MessageCreator() {
-                                            public Message createMessage(Session session) throws JMSException {
-                                                return session.createTextMessage("P1: " + queue + " - " + BODY);
-                                            }
-                                        });
-                                        Thread.sleep((long) (Math.random() * SLEEP));
-                                        LOG.info("P1: Send msg to " + queue + "," + AUDIT);
-                                    }
-
-                                } catch (Exception e) {
-                                    Assert.fail("Exception occurred " + e);
-                                }
-
-
-                            }
-                        });
-                    } catch (TransactionException e) {
-                        lastException = e;
-                        break;
-                    }
-
-                }
-            }
-
-            public Exception getLastException() {
-                return lastException;
-            }
-        }
-
-
-        ProducerThread t1 = new ProducerThread(jmsTemplate, txManager);
-        ProducerThread t2 = new ProducerThread(jmsTemplate2, txManager2);
-
-        t1.start();
-        t2.start();
-
-        t1.join();
-        t2.join();
-
-        if (t1.getLastException() != null) {
-            Assert.fail("Exception occurred " + t1.getLastException());
-        }
-
-        if (t2.getLastException() != null) {
-            Assert.fail("Exception occurred " + t2.getLastException());
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/SpringTest.java b/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/SpringTest.java
deleted file mode 100644
index e2a580d..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/activemq/spring/SpringTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.spring;
-
-import org.apache.activemq.broker.BrokerService;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import junit.framework.TestCase;
-
-public class SpringTest extends TestCase {
-    
-	/**
-     * Make sure that brokers are being pooled properly.
-     *
-     * @throws Exception
-     */
-    public void testSenderWithSpringXmlEmbeddedPooledBrokerConfiguredViaXml() throws Exception {
-        String config = "spring-embedded-pooled.xml";
-
-        Thread.currentThread().setContextClassLoader(SpringTest.class.getClassLoader());
-        ClassPathXmlApplicationContext context1 = new ClassPathXmlApplicationContext(config);
-
-        BrokerService bs1 = (BrokerService) context1.getBean("broker1");
-        assertNotNull(bs1);
-        BrokerService bs2 = (BrokerService) context1.getBean("broker2");
-        assertNotNull(bs1);
-
-        // It should be the same broker;
-        assertEquals(bs1, bs2);
-
-        // Even if we load up another context, it should still be the same broker.
-        ClassPathXmlApplicationContext context2 = new ClassPathXmlApplicationContext(config);
-
-        BrokerService bs3 = (BrokerService) context2.getBean("broker1");
-        assertNotNull(bs3);
-        BrokerService bs4 = (BrokerService) context2.getBean("broker2");
-        assertNotNull(bs4);
-
-        // It should be the same broker;
-        assertEquals(bs1, bs3);
-        assertEquals(bs1, bs4);
-
-        // And it should be started.
-        assertTrue(bs1.isStarted());
-
-        // should still be started asfter the 2nd context closes.
-        context2.close();
-        assertTrue(bs1.isStarted());
-
-        // Should stop once all contexts close.
-        context1.close();
-        assertFalse(bs1.isStarted());
-    }
-    
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTest3.java b/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTest3.java
deleted file mode 100644
index 61da048..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTest3.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import junit.framework.Assert;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-
-public class AMQDeadlockTest3 extends org.apache.activemq.test.TestSupport {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(AMQDeadlockTest3.class);
-
-    private static final String URL1 = "tcp://localhost:61616";
-
-    private static final String URL2 = "tcp://localhost:61617";
-
-    private static final String QUEUE1_NAME = "test.queue.1";
-
-    private static final String QUEUE2_NAME = "test.queue.2";
-
-    private static final int MAX_CONSUMERS = 1;
-
-    private static final int MAX_PRODUCERS = 1;
-
-    private static final int NUM_MESSAGE_TO_SEND = 10;
-
-    private AtomicInteger messageCount = new AtomicInteger();
-    private CountDownLatch doneLatch;
-
-    public void setUp() throws Exception {
-    }
-
-    public void tearDown() throws Exception {
-    }
-
-    // This should fail with incubator-activemq-fuse-4.1.0.5
-    public void testQueueLimitsWithOneBrokerSameConnection() throws Exception {
-
-        BrokerService brokerService1 = null;
-        ActiveMQConnectionFactory acf = null;
-        PooledConnectionFactory pcf = null;
-        DefaultMessageListenerContainer container1 = null;
-
-        try {
-            brokerService1 = createBrokerService("broker1", URL1, null);
-            brokerService1.start();
-
-            acf = createConnectionFactory(URL1);
-            pcf = new PooledConnectionFactory(acf);
-
-            // Only listen on the first queue.. let the 2nd queue fill up.
-            doneLatch = new CountDownLatch(NUM_MESSAGE_TO_SEND);
-            container1 = createDefaultMessageListenerContainer(acf, new TestMessageListener1(500), QUEUE1_NAME);
-            container1.afterPropertiesSet();
-
-            Thread.sleep(2000);
-
-            final ExecutorService executor = Executors.newCachedThreadPool();
-            for (int i = 0; i < MAX_PRODUCERS; i++) {
-                executor.submit(new PooledProducerTask(pcf, QUEUE2_NAME));
-                Thread.sleep(1000);
-                executor.submit(new PooledProducerTask(pcf, QUEUE1_NAME));
-            }
-
-            // Wait for all message to arrive.
-            assertTrue(doneLatch.await(20, TimeUnit.SECONDS));
-            executor.shutdownNow();
-
-            Assert.assertEquals(NUM_MESSAGE_TO_SEND, messageCount.get());
-
-        } finally {
-
-            container1.stop();
-            container1.destroy();
-            container1 = null;
-            brokerService1.stop();
-            brokerService1 = null;
-
-        }
-
-    }
-
-    // This should fail with incubator-activemq-fuse-4.1.0.5
-    public void testQueueLimitsWithTwoBrokerProduceandConsumeonDifferentBrokersWithOneConnectionForProducing() throws Exception {
-
-        BrokerService brokerService1 = null;
-        BrokerService brokerService2 = null;
-        ActiveMQConnectionFactory acf1 = null;
-        ActiveMQConnectionFactory acf2 = null;
-        PooledConnectionFactory pcf = null;
-        DefaultMessageListenerContainer container1 = null;
-
-        try {
-            brokerService1 = createBrokerService("broker1", URL1, URL2);
-            brokerService1.start();
-            brokerService2 = createBrokerService("broker2", URL2, URL1);
-            brokerService2.start();
-
-            acf1 = createConnectionFactory(URL1);
-            acf2 = createConnectionFactory(URL2);
-
-            pcf = new PooledConnectionFactory(acf1);
-
-            Thread.sleep(1000);
-
-            doneLatch = new CountDownLatch(MAX_PRODUCERS * NUM_MESSAGE_TO_SEND);
-            container1 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(500), QUEUE1_NAME);
-            container1.afterPropertiesSet();
-
-            final ExecutorService executor = Executors.newCachedThreadPool();
-            for (int i = 0; i < MAX_PRODUCERS; i++) {
-                executor.submit(new PooledProducerTask(pcf, QUEUE2_NAME));
-                Thread.sleep(1000);
-                executor.submit(new PooledProducerTask(pcf, QUEUE1_NAME));
-            }
-
-            assertTrue(doneLatch.await(20, TimeUnit.SECONDS));
-            executor.shutdownNow();
-
-            Assert.assertEquals(MAX_PRODUCERS * NUM_MESSAGE_TO_SEND, messageCount.get());
-        } finally {
-
-            container1.stop();
-            container1.destroy();
-            container1 = null;
-
-            brokerService1.stop();
-            brokerService1 = null;
-            brokerService2.stop();
-            brokerService2 = null;
-        }
-    }
-
-    // This should fail with incubator-activemq-fuse-4.1.0.5
-    public void testQueueLimitsWithTwoBrokerProduceandConsumeonDifferentBrokersWithSeperateConnectionsForProducing() throws Exception {
-
-        BrokerService brokerService1 = null;
-        BrokerService brokerService2 = null;
-        ActiveMQConnectionFactory acf1 = null;
-        ActiveMQConnectionFactory acf2 = null;
-        DefaultMessageListenerContainer container1 = null;
-        DefaultMessageListenerContainer container2 = null;
-
-        try {
-            brokerService1 = createBrokerService("broker1", URL1, URL2);
-            brokerService1.start();
-            brokerService2 = createBrokerService("broker2", URL2, URL1);
-            brokerService2.start();
-
-            acf1 = createConnectionFactory(URL1);
-            acf2 = createConnectionFactory(URL2);
-
-            Thread.sleep(1000);
-
-            doneLatch = new CountDownLatch(NUM_MESSAGE_TO_SEND * MAX_PRODUCERS);
-
-            container1 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(500), QUEUE1_NAME);
-            container1.afterPropertiesSet();
-            container2 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(30000), QUEUE2_NAME);
-            container2.afterPropertiesSet();
-
-            final ExecutorService executor = Executors.newCachedThreadPool();
-            for (int i = 0; i < MAX_PRODUCERS; i++) {
-                executor.submit(new NonPooledProducerTask(acf1, QUEUE2_NAME));
-                Thread.sleep(1000);
-                executor.submit(new NonPooledProducerTask(acf1, QUEUE1_NAME));
-            }
-
-            assertTrue(doneLatch.await(20, TimeUnit.SECONDS));
-            executor.shutdownNow();
-
-            Assert.assertEquals(MAX_PRODUCERS * NUM_MESSAGE_TO_SEND, messageCount.get());
-        } finally {
-
-            container1.stop();
-            container1.destroy();
-            container1 = null;
-
-            container2.stop();
-            container2.destroy();
-            container2 = null;
-
-            brokerService1.stop();
-            brokerService1 = null;
-            brokerService2.stop();
-            brokerService2 = null;
-        }
-    }
-
-    private BrokerService createBrokerService(final String brokerName, final String uri1, final String uri2) throws Exception {
-        final BrokerService brokerService = new BrokerService();
-
-        brokerService.setBrokerName(brokerName);
-        brokerService.setPersistent(false);
-        brokerService.setUseJmx(true);
-
-        final SystemUsage memoryManager = new SystemUsage();
-        memoryManager.getMemoryUsage().setLimit(5000000);
-        brokerService.setSystemUsage(memoryManager);
-
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setQueue(">");
-        // entry.setQueue(QUEUE1_NAME);
-        entry.setMemoryLimit(1000);
-        policyEntries.add(entry);
-
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        brokerService.setDestinationPolicy(policyMap);
-
-        final TransportConnector tConnector = new TransportConnector();
-        tConnector.setUri(new URI(uri1));
-        tConnector.setName(brokerName + ".transportConnector");
-        brokerService.addConnector(tConnector);
-
-        if (uri2 != null) {
-            final NetworkConnector nc = new DiscoveryNetworkConnector(new URI("static:" + uri2));
-            nc.setBridgeTempDestinations(true);
-            nc.setBrokerName(brokerName);
-            brokerService.addNetworkConnector(nc);
-        }
-
-        return brokerService;
-
-    }
-
-    public DefaultMessageListenerContainer createDefaultMessageListenerContainer(final ConnectionFactory acf, final MessageListener listener, final String queue) {
-        final DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
-        container.setConnectionFactory(acf);
-        container.setDestinationName(queue);
-        container.setMessageListener(listener);
-        container.setSessionTransacted(false);
-        container.setSessionAcknowledgeMode(Session.AUTO_ACKNOWLEDGE);
-        container.setConcurrentConsumers(MAX_CONSUMERS);
-        return container;
-    }
-
-    public ActiveMQConnectionFactory createConnectionFactory(final String url) {
-        final ActiveMQConnectionFactory acf = new ActiveMQConnectionFactory(url);
-        acf.setCopyMessageOnSend(false);
-        acf.setUseAsyncSend(false);
-        acf.setDispatchAsync(true);
-        acf.setUseCompression(false);
-        acf.setOptimizeAcknowledge(false);
-        acf.setOptimizedMessageDispatch(true);
-        acf.setAlwaysSyncSend(true);
-        return acf;
-    }
-
-    private class TestMessageListener1 implements MessageListener {
-
-        private final long waitTime;
-
-        public TestMessageListener1(long waitTime) {
-            this.waitTime = waitTime;
-
-        }
-
-        public void onMessage(Message msg) {
-
-            try {
-                LOG.info("Listener1 Consumed message " + msg.getIntProperty("count"));
-
-                messageCount.incrementAndGet();
-                doneLatch.countDown();
-
-                Thread.sleep(waitTime);
-            } catch (JMSException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            } catch (InterruptedException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
-
-        }
-    }
-
-    private static class PooledProducerTask implements Runnable {
-
-        private final String queueName;
-
-        private final PooledConnectionFactory pcf;
-
-        public PooledProducerTask(final PooledConnectionFactory pcf, final String queueName) {
-            this.pcf = pcf;
-            this.queueName = queueName;
-        }
-
-        public void run() {
-
-            try {
-
-                final JmsTemplate jmsTemplate = new JmsTemplate(pcf);
-                jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                jmsTemplate.setExplicitQosEnabled(true);
-                jmsTemplate.setMessageIdEnabled(false);
-                jmsTemplate.setMessageTimestampEnabled(false);
-                jmsTemplate.afterPropertiesSet();
-
-                final byte[] bytes = new byte[2048];
-                final Random r = new Random();
-                r.nextBytes(bytes);
-
-                Thread.sleep(2000);
-
-                final AtomicInteger count = new AtomicInteger();
-                for (int i = 0; i < NUM_MESSAGE_TO_SEND; i++) {
-                    jmsTemplate.send(queueName, new MessageCreator() {
-
-                        public Message createMessage(Session session) throws JMSException {
-
-                            final BytesMessage message = session.createBytesMessage();
-
-                            message.writeBytes(bytes);
-                            message.setIntProperty("count", count.incrementAndGet());
-                            message.setStringProperty("producer", "pooled");
-                            return message;
-                        }
-                    });
-
-                    LOG.info("PooledProducer sent message: " + count.get());
-                    // Thread.sleep(1000);
-                }
-
-            } catch (final Throwable e) {
-                LOG.error("Producer 1 is exiting", e);
-            }
-        }
-    }
-
-    private static class NonPooledProducerTask implements Runnable {
-
-        private final String queueName;
-
-        private final ConnectionFactory cf;
-
-        public NonPooledProducerTask(final ConnectionFactory cf, final String queueName) {
-            this.cf = cf;
-            this.queueName = queueName;
-        }
-
-        public void run() {
-
-            try {
-
-                final JmsTemplate jmsTemplate = new JmsTemplate(cf);
-                jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                jmsTemplate.setExplicitQosEnabled(true);
-                jmsTemplate.setMessageIdEnabled(false);
-                jmsTemplate.setMessageTimestampEnabled(false);
-                jmsTemplate.afterPropertiesSet();
-
-                final byte[] bytes = new byte[2048];
-                final Random r = new Random();
-                r.nextBytes(bytes);
-
-                Thread.sleep(2000);
-
-                final AtomicInteger count = new AtomicInteger();
-                for (int i = 0; i < NUM_MESSAGE_TO_SEND; i++) {
-                    jmsTemplate.send(queueName, new MessageCreator() {
-
-                        public Message createMessage(Session session) throws JMSException {
-
-                            final BytesMessage message = session.createBytesMessage();
-
-                            message.writeBytes(bytes);
-                            message.setIntProperty("count", count.incrementAndGet());
-                            message.setStringProperty("producer", "non-pooled");
-                            return message;
-                        }
-                    });
-
-                    LOG.info("Non-PooledProducer sent message: " + count.get());
-
-                    // Thread.sleep(1000);
-                }
-
-            } catch (final Throwable e) {
-                LOG.error("Producer 1 is exiting", e);
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java b/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java
deleted file mode 100644
index 42797c6..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.BytesMessage;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.test.*;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-
-public class AMQDeadlockTestW4Brokers extends org.apache.activemq.test.TestSupport {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(AMQDeadlockTestW4Brokers.class);
-
-    private static final String BROKER_URL1 = "tcp://localhost:61616";
-    private static final String BROKER_URL2 = "tcp://localhost:61617";
-    private static final String BROKER_URL3 = "tcp://localhost:61618";
-    private static final String BROKER_URL4 = "tcp://localhost:61619";
-    private static final String URL1 = "tcp://localhost:61616?wireFormat.cacheEnabled=false"
-                                       + "&wireFormat.tightEncodingEnabled=false&wireFormat.maxInactivityDuration=30000&wireFormat.tcpNoDelayEnabled=false";
-    private static final String URL2 = "tcp://localhost:61617?wireFormat.cacheEnabled=false"
-                                       + "&wireFormat.tightEncodingEnabled=false&wireFormat.maxInactivityDuration=30000&wireFormat.tcpNoDelayEnabled=false";
-    private static final String URL3 = "tcp://localhost:61618?wireFormat.cacheEnabled=false"
-                                       + "&wireFormat.tightEncodingEnabled=false&wireFormat.maxInactivityDuration=30000&wireFormat.tcpNoDelayEnabled=false";
-    private static final String URL4 = "tcp://localhost:61619?wireFormat.cacheEnabled=false"
-                                       + "&wireFormat.tightEncodingEnabled=false&wireFormat.maxInactivityDuration=30000&wireFormat.tcpNoDelayEnabled=false";
-    private static final String QUEUE1_NAME = "test.queue.1";
-    private static final int MAX_CONSUMERS = 5;
-    private static final int NUM_MESSAGE_TO_SEND = 10000;
-    private static final CountDownLatch LATCH = new CountDownLatch(MAX_CONSUMERS * NUM_MESSAGE_TO_SEND);
-
-    @Override
-    public void setUp() throws Exception {
-
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-
-    }
-
-    public void test4BrokerWithOutLingo() throws Exception {
-
-        BrokerService brokerService1 = null;
-        BrokerService brokerService2 = null;
-        BrokerService brokerService3 = null;
-        BrokerService brokerService4 = null;
-        ActiveMQConnectionFactory acf1 = null;
-        ActiveMQConnectionFactory acf2 = null;
-        PooledConnectionFactory pcf1 = null;
-        PooledConnectionFactory pcf2 = null;
-        ActiveMQConnectionFactory acf3 = null;
-        ActiveMQConnectionFactory acf4 = null;
-        PooledConnectionFactory pcf3 = null;
-        PooledConnectionFactory pcf4 = null;
-        DefaultMessageListenerContainer container1 = null;
-
-        try {
-
-            // Test with and without queue limits.
-            brokerService1 = createBrokerService("broker1", BROKER_URL1, BROKER_URL2, BROKER_URL3, BROKER_URL4, 0 /* 10000000 */);
-            brokerService1.start();
-            brokerService2 = createBrokerService("broker2", BROKER_URL2, BROKER_URL1, BROKER_URL3, BROKER_URL4, 0/* 40000000 */);
-            brokerService2.start();
-            brokerService3 = createBrokerService("broker3", BROKER_URL3, BROKER_URL2, BROKER_URL1, BROKER_URL4, 0/* 10000000 */);
-            brokerService3.start();
-            brokerService4 = createBrokerService("broker4", BROKER_URL4, BROKER_URL1, BROKER_URL3, BROKER_URL2, 0/* 10000000 */);
-            brokerService4.start();
-
-            final String failover1 = "failover:(" + URL1
-                                     + ")?initialReconnectDelay=10&maxReconnectDelay=30000&useExponentialBackOff=true&backOffMultiplier=2&maxReconnectAttempts=0&randomize=false";
-            final String failover2 = "failover:(" + URL2
-                                     + ")?initialReconnectDelay=10&maxReconnectDelay=30000&useExponentialBackOff=true&backOffMultiplier=2&maxReconnectAttempts=0&randomize=false";
-
-            final String failover3 = "failover:(" + URL3
-                                     + ")?initialReconnectDelay=10&maxReconnectDelay=30000&useExponentialBackOff=true&backOffMultiplier=2&maxReconnectAttempts=0&randomize=false";
-
-            final String failover4 = "failover:(" + URL4
-                                     + ")?initialReconnectDelay=10&maxReconnectDelay=30000&useExponentialBackOff=true&backOffMultiplier=2&maxReconnectAttempts=0&randomize=false";
-
-            acf1 = createConnectionFactory(failover1);
-            acf2 = createConnectionFactory(failover2);
-            acf3 = createConnectionFactory(failover3);
-            acf4 = createConnectionFactory(failover4);
-
-            pcf1 = new PooledConnectionFactory(acf1);
-            pcf2 = new PooledConnectionFactory(acf2);
-            pcf3 = new PooledConnectionFactory(acf3);
-            pcf4 = new PooledConnectionFactory(acf4);
-
-            container1 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(0), QUEUE1_NAME);
-            container1.afterPropertiesSet();
-
-            final PooledProducerTask[] task = new PooledProducerTask[4];
-            task[0] = new PooledProducerTask(pcf1, QUEUE1_NAME, "producer1");
-            task[1] = new PooledProducerTask(pcf2, QUEUE1_NAME, "producer2");
-            task[2] = new PooledProducerTask(pcf3, QUEUE1_NAME, "producer3");
-            task[3] = new PooledProducerTask(pcf4, QUEUE1_NAME, "producer4");
-
-            final ExecutorService executor = Executors.newCachedThreadPool();
-
-            for (int i = 0; i < 4; i++) {
-                executor.submit(task[i]);
-            }
-
-            LATCH.await(15, TimeUnit.SECONDS);
-            assertTrue(LATCH.getCount() == MAX_CONSUMERS * NUM_MESSAGE_TO_SEND);
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-
-            container1.stop();
-            container1.destroy();
-            container1 = null;
-
-            brokerService1.stop();
-            brokerService1 = null;
-            brokerService2.stop();
-            brokerService2 = null;
-            brokerService3.stop();
-            brokerService3 = null;
-            brokerService4.stop();
-            brokerService4 = null;
-        }
-    }
-
-    private BrokerService createBrokerService(final String brokerName, final String uri1, final String uri2, final String uri3, final String uri4, final int queueLimit)
-        throws Exception {
-        final BrokerService brokerService = new BrokerService();
-
-        brokerService.setBrokerName(brokerName);
-        brokerService.setPersistent(false);
-        brokerService.setUseJmx(true);
-
-        final SystemUsage memoryManager = new SystemUsage();
-        memoryManager.getMemoryUsage().setLimit(100000000);
-        brokerService.setSystemUsage(memoryManager);
-
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setQueue(">");
-        entry.setMemoryLimit(queueLimit);
-        policyEntries.add(entry);
-
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        brokerService.setDestinationPolicy(policyMap);
-
-        final TransportConnector tConnector = new TransportConnector();
-        tConnector.setUri(new URI(uri1));
-        tConnector.setName(brokerName + ".transportConnector");
-        brokerService.addConnector(tConnector);
-
-        if (uri2 != null) {
-            final NetworkConnector nc = new DiscoveryNetworkConnector(new URI("static:" + uri2 + "," + uri3 + "," + uri4));
-            nc.setBridgeTempDestinations(true);
-            nc.setBrokerName(brokerName);
-
-            // When using queue limits set this to 1
-            nc.setPrefetchSize(1000);
-            nc.setNetworkTTL(1);
-            brokerService.addNetworkConnector(nc);
-        }
-
-        return brokerService;
-    }
-
-    public DefaultMessageListenerContainer createDefaultMessageListenerContainer(final ConnectionFactory acf, final MessageListener listener, final String queue) {
-        final DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
-        container.setConnectionFactory(acf);
-        container.setDestinationName(queue);
-        container.setMessageListener(listener);
-        container.setSessionTransacted(false);
-        container.setSessionAcknowledgeMode(Session.AUTO_ACKNOWLEDGE);
-        container.setConcurrentConsumers(MAX_CONSUMERS);
-        return container;
-    }
-
-    public ActiveMQConnectionFactory createConnectionFactory(final String url) {
-        final ActiveMQConnectionFactory acf = new ActiveMQConnectionFactory(url);
-        acf.setCopyMessageOnSend(false);
-        acf.setUseAsyncSend(false);
-        acf.setDispatchAsync(true);
-        acf.setUseCompression(false);
-        acf.setOptimizeAcknowledge(false);
-        acf.setOptimizedMessageDispatch(true);
-        acf.setUseAsyncSend(false);
-
-        return acf;
-    }
-
-    private static class TestMessageListener1 implements MessageListener {
-        final AtomicInteger count = new AtomicInteger(0);
-        private final long waitTime;
-
-        public TestMessageListener1(long waitTime) {
-            this.waitTime = waitTime;
-        }
-
-        public void onMessage(Message msg) {
-
-            try {
-                /*
-                 * log.info("Listener1 Consumed message " +
-                 * msg.getIntProperty("count") + " from " +
-                 * msg.getStringProperty("producerName"));
-                 */
-                int value = count.incrementAndGet();
-                if (value % 1000 == 0) {
-                    LOG.info("Consumed message: " + value);
-                }
-
-                Thread.sleep(waitTime);
-                LATCH.countDown();
-                /*
-                 * } catch (JMSException e) { e.printStackTrace();
-                 */
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    private class PooledProducerTask implements Runnable {
-        private final String queueName;
-        private final PooledConnectionFactory pcf;
-        private final String producerName;
-
-        public PooledProducerTask(final PooledConnectionFactory pcf, final String queueName, final String producerName) {
-            this.pcf = pcf;
-            this.queueName = queueName;
-            this.producerName = producerName;
-        }
-
-        public void run() {
-
-            try {
-
-                final JmsTemplate jmsTemplate = new JmsTemplate(pcf);
-                jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                jmsTemplate.setExplicitQosEnabled(true);
-                jmsTemplate.setMessageIdEnabled(false);
-                jmsTemplate.setMessageTimestampEnabled(false);
-                jmsTemplate.afterPropertiesSet();
-
-                final byte[] bytes = new byte[2048];
-                final Random r = new Random();
-                r.nextBytes(bytes);
-
-                for (int i = 0; i < NUM_MESSAGE_TO_SEND; i++) {
-                    final int count = i;
-                    jmsTemplate.send(queueName, new MessageCreator() {
-                        public Message createMessage(Session session) throws JMSException {
-
-                            final BytesMessage message = session.createBytesMessage();
-
-                            message.writeBytes(bytes);
-                            message.setIntProperty("count", count);
-                            message.setStringProperty("producerName", producerName);
-                            return message;
-                        }
-                    });
-
-                    // log.info("PooledProducer " + producerName + " sent
-                    // message: " + count);
-
-                    // Thread.sleep(1000);
-                }
-            } catch (final Throwable e) {
-                LOG.error("Producer 1 is exiting", e);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQFailoverIssue.java b/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQFailoverIssue.java
deleted file mode 100644
index 7ec0876..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/activemq/usecases/AMQFailoverIssue.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- * 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.usecases;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.BytesMessage;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.test.*;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.network.DiscoveryNetworkConnector;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.activemq.usage.SystemUsage;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-
-public class AMQFailoverIssue extends org.apache.activemq.test.TestSupport {
-
-    private static final String URL1 = "tcp://localhost:61616";
-    private static final String QUEUE1_NAME = "test.queue.1";
-    private static final int MAX_CONSUMERS = 10;
-    private static final int MAX_PRODUCERS = 5;
-    private static final int NUM_MESSAGE_TO_SEND = 10000;
-    private static final int TOTAL_MESSAGES = MAX_PRODUCERS * NUM_MESSAGE_TO_SEND;
-    private static final boolean USE_FAILOVER = true;
-    private AtomicInteger messageCount = new AtomicInteger();
-    private CountDownLatch doneLatch;
-
-    @Override
-    public void setUp() throws Exception {
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-    }
-
-    // This should fail with incubator-activemq-fuse-4.1.0.5
-    public void testFailoverIssue() throws Exception {
-        BrokerService brokerService1 = null;
-        ActiveMQConnectionFactory acf;
-        PooledConnectionFactory pcf;
-        DefaultMessageListenerContainer container1 = null;
-        try {
-            brokerService1 = createBrokerService("broker1", URL1, null);
-            brokerService1.start();
-            acf = createConnectionFactory(URL1, USE_FAILOVER);
-            pcf = new PooledConnectionFactory(acf);
-            // Only listen on the first queue.. let the 2nd queue fill up.
-            doneLatch = new CountDownLatch(TOTAL_MESSAGES);
-            container1 = createDefaultMessageListenerContainer(acf, new TestMessageListener1(0), QUEUE1_NAME);
-            container1.afterPropertiesSet();
-            Thread.sleep(5000);
-            final ExecutorService executor = Executors.newCachedThreadPool();
-            for (int i = 0; i < MAX_PRODUCERS; i++) {
-                executor.submit(new PooledProducerTask(pcf, QUEUE1_NAME));
-            }
-            // Wait for all message to arrive.
-            assertTrue(doneLatch.await(45, TimeUnit.SECONDS));
-            executor.shutdown();
-            // Thread.sleep(30000);
-            Assert.assertEquals(TOTAL_MESSAGES, messageCount.get());
-        } finally {
-            container1.stop();
-            container1.destroy();
-            container1 = null;
-            brokerService1.stop();
-            brokerService1 = null;
-        }
-    }
-
-    private BrokerService createBrokerService(final String brokerName, final String uri1, final String uri2) throws Exception {
-        final BrokerService brokerService = new BrokerService();
-        brokerService.setBrokerName(brokerName);
-        brokerService.setPersistent(false);
-        brokerService.setUseJmx(true);
-        final SystemUsage memoryManager = new SystemUsage();
-        memoryManager.getMemoryUsage().setLimit(5000000);
-        brokerService.setSystemUsage(memoryManager);
-        final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-        final PolicyEntry entry = new PolicyEntry();
-        entry.setQueue(">");
-        // entry.setQueue(QUEUE1_NAME);
-        entry.setMemoryLimit(1);
-        policyEntries.add(entry);
-        final PolicyMap policyMap = new PolicyMap();
-        policyMap.setPolicyEntries(policyEntries);
-        brokerService.setDestinationPolicy(policyMap);
-        final TransportConnector tConnector = new TransportConnector();
-        tConnector.setUri(new URI(uri1));
-        tConnector.setName(brokerName + ".transportConnector");
-        brokerService.addConnector(tConnector);
-        if (uri2 != null) {
-            final NetworkConnector nc = new DiscoveryNetworkConnector(new URI("static:" + uri2));
-            nc.setBridgeTempDestinations(true);
-            nc.setBrokerName(brokerName);
-            nc.setPrefetchSize(1);
-            brokerService.addNetworkConnector(nc);
-        }
-        return brokerService;
-    }
-
-    public DefaultMessageListenerContainer createDefaultMessageListenerContainer(final ConnectionFactory acf, final MessageListener listener, final String queue) {
-        final DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
-        container.setConnectionFactory(acf);
-        container.setDestinationName(queue);
-        container.setMessageListener(listener);
-        container.setSessionTransacted(false);
-        container.setSessionAcknowledgeMode(Session.AUTO_ACKNOWLEDGE);
-        container.setConcurrentConsumers(MAX_CONSUMERS);
-        return container;
-    }
-
-    public ActiveMQConnectionFactory createConnectionFactory(final String url, final boolean useFailover) {
-        final String failoverUrl = "failover:(" + url + ")";
-        final ActiveMQConnectionFactory acf = new ActiveMQConnectionFactory(useFailover ? failoverUrl : url);
-        acf.setCopyMessageOnSend(false);
-        acf.setUseAsyncSend(false);
-        acf.setDispatchAsync(true);
-        acf.setUseCompression(false);
-        acf.setOptimizeAcknowledge(false);
-        acf.setOptimizedMessageDispatch(true);
-        acf.setUseAsyncSend(false);
-        return acf;
-    }
-
-    private class TestMessageListener1 implements MessageListener {
-
-        private final long waitTime;
-
-        public TestMessageListener1(long waitTime) {
-            this.waitTime = waitTime;
-        }
-
-        public void onMessage(Message msg) {
-            try {
-                messageCount.incrementAndGet();
-                doneLatch.countDown();
-                Thread.sleep(waitTime);
-            } catch (InterruptedException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
-        }
-    }
-
-    private static class PooledProducerTask implements Runnable {
-
-        private final String queueName;
-        private final PooledConnectionFactory pcf;
-
-        public PooledProducerTask(final PooledConnectionFactory pcf, final String queueName) {
-            this.pcf = pcf;
-            this.queueName = queueName;
-        }
-
-        public void run() {
-            try {
-                final JmsTemplate jmsTemplate = new JmsTemplate(pcf);
-                jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-                jmsTemplate.setExplicitQosEnabled(true);
-                jmsTemplate.setMessageIdEnabled(false);
-                jmsTemplate.setMessageTimestampEnabled(false);
-                jmsTemplate.afterPropertiesSet();
-                final byte[] bytes = new byte[2048];
-                final Random r = new Random();
-                r.nextBytes(bytes);
-                Thread.sleep(2000);
-                final AtomicInteger count = new AtomicInteger();
-                for (int i = 0; i < NUM_MESSAGE_TO_SEND; i++) {
-                    jmsTemplate.send(queueName, new MessageCreator() {
-
-                        public Message createMessage(Session session) throws JMSException {
-                            final BytesMessage message = session.createBytesMessage();
-                            message.writeBytes(bytes);
-                            message.setIntProperty("count", count.incrementAndGet());
-                            message.setStringProperty("producer", "pooled");
-                            return message;
-                        }
-                    });
-                }
-            } catch (final Throwable e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/bugs/AMQ1730Test.java b/trunk/activemq-spring/src/test/java/org/apache/bugs/AMQ1730Test.java
deleted file mode 100644
index 63766b2..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/bugs/AMQ1730Test.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * 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.bugs;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import java.util.concurrent.CountDownLatch;
-
-
-public class AMQ1730Test extends TestCase {
-
-    private static final Logger log = LoggerFactory.getLogger(AMQ1730Test.class);
-
-
-    private static final String JMSX_DELIVERY_COUNT = "JMSXDeliveryCount";
-
-
-    BrokerService brokerService;
-
-    private static final int MESSAGE_COUNT = 250;
-
-    public AMQ1730Test() {
-        super();
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        brokerService = new BrokerService();
-        brokerService.addConnector("tcp://localhost:0");
-        brokerService.setUseJmx(false);
-        brokerService.start();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        brokerService.stop();
-    }
-
-    public void testRedelivery() throws Exception {
-
-        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
-                brokerService.getTransportConnectors().get(0).getConnectUri().toString() + "?jms.prefetchPolicy.queuePrefetch=100");
-
-        Connection connection = connectionFactory.createConnection();
-        connection.start();
-
-        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        Queue queue = session.createQueue("queue.test");
-
-        MessageProducer producer = session.createProducer(queue);
-
-        for (int i = 0; i < MESSAGE_COUNT; i++) {
-            log.info("Sending message " + i);
-            TextMessage message = session.createTextMessage("Message " + i);
-            producer.send(message);
-        }
-
-        producer.close();
-        session.close();
-        connection.stop();
-        connection.close();
-
-        final CountDownLatch countDownLatch = new CountDownLatch(MESSAGE_COUNT);
-
-        final ValueHolder<Boolean> messageRedelivered = new ValueHolder<Boolean>(false);
-
-        DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
-        messageListenerContainer.setConnectionFactory(connectionFactory);
-        messageListenerContainer.setDestination(queue);
-        messageListenerContainer.setAutoStartup(false);
-        messageListenerContainer.setConcurrentConsumers(1);
-        messageListenerContainer.setMaxConcurrentConsumers(16);
-        messageListenerContainer.setMaxMessagesPerTask(10);
-        messageListenerContainer.setReceiveTimeout(10000);
-        messageListenerContainer.setRecoveryInterval(5000);
-        messageListenerContainer.setAcceptMessagesWhileStopping(false);
-        messageListenerContainer.setCacheLevel(DefaultMessageListenerContainer.CACHE_NONE);
-        messageListenerContainer.setSessionTransacted(false);
-        messageListenerContainer.setMessageListener(new MessageListener() {
-
-
-            public void onMessage(Message message) {
-                if (!(message instanceof TextMessage)) {
-                    throw new RuntimeException();
-                }
-                try {
-                    TextMessage textMessage = (TextMessage) message;
-                    String text = textMessage.getText();
-                    int messageDeliveryCount = message.getIntProperty(JMSX_DELIVERY_COUNT);
-                    if (messageDeliveryCount > 1) {
-                        messageRedelivered.set(true);
-                    }
-                    log.info("[Count down latch: " + countDownLatch.getCount() + "][delivery count: " + messageDeliveryCount + "] - " + "Received message with id: " + message.getJMSMessageID() + " with text: " + text);
-
-                } catch (JMSException e) {
-                    e.printStackTrace();
-                }
-                finally {
-                    countDownLatch.countDown();
-                }
-            }
-
-        });
-        messageListenerContainer.afterPropertiesSet();
-
-        messageListenerContainer.start();
-
-        countDownLatch.await();
-        messageListenerContainer.stop();
-        messageListenerContainer.destroy();
-
-        assertFalse("no message has redelivery > 1", messageRedelivered.get());
-    }
-
-    private class ValueHolder<T> {
-
-        private T value;
-
-        public ValueHolder(T value) {
-            super();
-            this.value = value;
-        }
-
-        void set(T value) {
-            this.value = value;
-        }
-
-        T get() {
-            return value;
-        }
-
-    }
-
-}
diff --git a/trunk/activemq-spring/src/test/java/org/apache/bugs/AMQ2754Test.java b/trunk/activemq-spring/src/test/java/org/apache/bugs/AMQ2754Test.java
deleted file mode 100644
index a1f87a9..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/bugs/AMQ2754Test.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * 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.bugs;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-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.command.ActiveMQQueue;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.pool.PooledConnectionFactory;
-//import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-
-public class AMQ2754Test extends TestCase {
-
-    public void testNetworkOfBrokers() throws Exception {
-        BrokerService brokerService1 = null;
-        BrokerService brokerService2 = null;
-
-        final int total = 100;
-        final CountDownLatch latch = new CountDownLatch(total);
-        final boolean conduitSubscriptions = true;
-        try {
-
-        {
-            brokerService1 = new BrokerService();
-            brokerService1.setBrokerName("consumer");
-            brokerService1.setUseJmx(false);
-            brokerService1.setPersistenceAdapter(new MemoryPersistenceAdapter());
-            brokerService1.addConnector("tcp://0.0.0.0:61616");
-            brokerService1.start();
-        }
-
-        {
-            brokerService2 = new BrokerService();
-            brokerService2.setBrokerName("producer");
-            brokerService2.setUseJmx(false);
-            brokerService2.setPersistenceAdapter(new MemoryPersistenceAdapter());
-            brokerService2.addConnector("tcp://0.0.0.0:51515");
-            NetworkConnector network2 = brokerService2.addNetworkConnector("static:(tcp://localhost:61616)");
-            network2.setName("network1");
-            network2.setDynamicOnly(true);
-            network2.setConduitSubscriptions(conduitSubscriptions);
-            network2.setNetworkTTL(3);
-            network2.setPrefetchSize(1);
-            brokerService2.start();
-        }
-
-        ExecutorService pool = Executors.newSingleThreadExecutor();
-
-        ActiveMQConnectionFactory connectionFactory1 = 
-            new ActiveMQConnectionFactory("failover:(tcp://localhost:61616)");
-
-        connectionFactory1.setWatchTopicAdvisories(false);
-        final DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
-        container.setConnectionFactory(connectionFactory1);
-        container.setMaxConcurrentConsumers(10);
-        container.setSessionAcknowledgeMode(Session.AUTO_ACKNOWLEDGE);
-        container.setCacheLevel(DefaultMessageListenerContainer.CACHE_CONSUMER);
-        container.setDestination(new ActiveMQQueue("testingqueue"));
-        container.setMessageListener(new MessageListener() {
-            public void onMessage(Message message) {
-                latch.countDown();
-            }
-        });
-        container.setMaxMessagesPerTask(1);
-        container.afterPropertiesSet();
-        container.start();
-
-        pool.submit(new Callable<Object>() {
-            public Object call() throws Exception {
-                try {
-                    final int batch = 10;
-                    ActiveMQConnectionFactory connectionFactory2 = 
-                        new ActiveMQConnectionFactory("failover:(tcp://localhost:51515)");
-                    PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory(connectionFactory2);
-                    connectionFactory2.setWatchTopicAdvisories(false);
-                    JmsTemplate template = new JmsTemplate(pooledConnectionFactory);
-                    ActiveMQQueue queue = new ActiveMQQueue("testingqueue");
-                    for(int b = 0; b < batch; b++) {
-                        for(int i = 0; i < (total / batch); i++) {
-                            final String id = ":batch=" + b + "i=" + i;
-                            template.send(queue, new MessageCreator() {
-                                public Message createMessage(Session session) throws JMSException {
-                                    TextMessage message = session.createTextMessage();
-                                    message.setText("Hello World!" + id);
-                                    return message;
-                                }
-                            });
-                        }
-                        // give spring time to scale back again
-                        while(container.getActiveConsumerCount() > 1) {
-                            System.out.println("active consumer count:" + container.getActiveConsumerCount());
-                            System.out.println("concurrent consumer count: " + container.getConcurrentConsumers());
-                            Thread.sleep(1000);
-                        }
-                    }
-                    //pooledConnectionFactory.stop();
-                } catch(Throwable t) {
-                    t.printStackTrace();
-                }
-                return null;
-            }
-        });
-
-        pool.shutdown();
-        pool.awaitTermination(10, TimeUnit.SECONDS);
-
-        int count = 0;
-
-        // give it 20 seconds
-        while(!latch.await(1, TimeUnit.SECONDS) && count++ < 20) {
-            System.out.println("count " + latch.getCount());
-        }
-
-
-        container.destroy();
-
-        } finally {
-            try { if(brokerService1 != null) { 
-                brokerService1.stop();
-            }} catch(Throwable t) { t.printStackTrace(); }
-            try { if(brokerService2 != null) { 
-                brokerService2.stop();
-            }} catch(Throwable t) { t.printStackTrace(); }
-        }
-
-        if(latch.getCount() > 0) {
-            fail("latch should have gone down to 0 but was " + latch.getCount());
-        }
-
-    }
-
-} 
\ No newline at end of file
diff --git a/trunk/activemq-spring/src/test/java/org/apache/bugs/LoadBalanceTest.java b/trunk/activemq-spring/src/test/java/org/apache/bugs/LoadBalanceTest.java
deleted file mode 100644
index 0abcfbb..0000000
--- a/trunk/activemq-spring/src/test/java/org/apache/bugs/LoadBalanceTest.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/**
- * 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.bugs;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Test;
-import org.springframework.jms.connection.CachingConnectionFactory;
-import org.springframework.jms.connection.SingleConnectionFactory;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.jms.core.MessageCreator;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-
-public class LoadBalanceTest {
-    private static final Logger LOG = LoggerFactory.getLogger(LoadBalanceTest.class);
-    private static final String TESTING_QUEUE = "testingqueue";
-    private static int networkBridgePrefetch = 1000;
-
-    @Test
-    public void does_load_balance_between_consumers() throws Exception {
-        BrokerService brokerService1 = null;
-        BrokerService brokerService2 = null;
-        final int total = 100;
-        final AtomicInteger broker1Count = new AtomicInteger(0);
-        final AtomicInteger broker2Count = new AtomicInteger(0);
-        final CountDownLatch startProducer = new CountDownLatch(1);
-        try {
-            {
-                brokerService1 = new BrokerService();
-                brokerService1.setBrokerName("one");
-                brokerService1.setUseJmx(false);
-                brokerService1
-                        .setPersistenceAdapter(new MemoryPersistenceAdapter());
-                brokerService1.addConnector("nio://0.0.0.0:61616");
-                final NetworkConnector network1 = brokerService1
-                        .addNetworkConnector("static:(tcp://localhost:51515)");
-                network1.setName("network1");
-                network1.setDynamicOnly(true);
-                network1.setNetworkTTL(3);
-                network1.setPrefetchSize(networkBridgePrefetch);
-                network1.setConduitSubscriptions(false);
-                network1.setDecreaseNetworkConsumerPriority(false);
-                network1.setDispatchAsync(false);
-                brokerService1.start();
-            }
-            {
-                brokerService2 = new BrokerService();
-                brokerService2.setBrokerName("two");
-                brokerService2.setUseJmx(false);
-                brokerService2
-                        .setPersistenceAdapter(new MemoryPersistenceAdapter());
-                brokerService2.addConnector("nio://0.0.0.0:51515");
-                final NetworkConnector network2 = brokerService2
-                        .addNetworkConnector("static:(tcp://localhost:61616)");
-                network2.setName("network1");
-                network2.setDynamicOnly(true);
-                network2.setNetworkTTL(3);
-                network2.setPrefetchSize(networkBridgePrefetch);
-                network2.setConduitSubscriptions(false);
-                network2.setDecreaseNetworkConsumerPriority(false);
-                network2.setDispatchAsync(false);
-                brokerService2.start();
-            }
-            final ExecutorService pool = Executors.newSingleThreadExecutor();
-            final ActiveMQConnectionFactory connectionFactory1 = new ActiveMQConnectionFactory(
-                    "vm://one");
-            final SingleConnectionFactory singleConnectionFactory1 = new SingleConnectionFactory(
-                    connectionFactory1);
-            singleConnectionFactory1.setReconnectOnException(true);
-            final DefaultMessageListenerContainer container1 = new DefaultMessageListenerContainer();
-            container1.setConnectionFactory(singleConnectionFactory1);
-            container1.setMaxConcurrentConsumers(1);
-            container1.setDestination(new ActiveMQQueue("testingqueue"));
-            container1.setMessageListener(new MessageListener() {
-
-                public void onMessage(final Message message) {
-                    broker1Count.incrementAndGet();
-                }
-            });
-            container1.afterPropertiesSet();
-            container1.start();
-            pool.submit(new Callable<Object>() {
-
-                public Object call() throws Exception {
-                    try {
-                        final ActiveMQConnectionFactory connectionFactory2 = new ActiveMQConnectionFactory(
-                                "vm://two");
-                        final SingleConnectionFactory singleConnectionFactory2 = new SingleConnectionFactory(
-                                connectionFactory2);
-                        singleConnectionFactory2.setReconnectOnException(true);
-                        final DefaultMessageListenerContainer container2 = new DefaultMessageListenerContainer();
-                        container2
-                                .setConnectionFactory(singleConnectionFactory2);
-                        container2.setMaxConcurrentConsumers(1);
-                        container2.setDestination(new ActiveMQQueue(
-                                "testingqueue"));
-                        container2.setMessageListener(new MessageListener() {
-
-                            public void onMessage(final Message message) {
-                                broker2Count.incrementAndGet();
-                            }
-                        });
-                        container2.afterPropertiesSet();
-                        container2.start();
-
-                        assertTrue("wait for start signal", startProducer.await(20, TimeUnit.SECONDS));
-
-                        final CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(
-                                singleConnectionFactory2);
-                        final JmsTemplate template = new JmsTemplate(
-                                cachingConnectionFactory);
-                        final ActiveMQQueue queue = new ActiveMQQueue(
-                                "testingqueue");
-                        for (int i = 0; i < total; i++) {
-                            template.send(queue, new MessageCreator() {
-
-                                public Message createMessage(
-                                        final Session session)
-                                        throws JMSException {
-                                    final TextMessage message = session
-                                            .createTextMessage();
-                                    message.setText("Hello World!");
-                                    return message;
-                                }
-                            });
-                        }
-                        // give spring time to scale back again
-                        while (container2.getActiveConsumerCount() > 1) {
-                            System.out.println("active consumer count: "
-                                    + container2.getActiveConsumerCount());
-                            System.out.println("concurrent consumer count: "
-                                    + container2.getConcurrentConsumers());
-                            Thread.sleep(1000);
-                        }
-                        cachingConnectionFactory.destroy();
-                        container2.destroy();
-                    } catch (final Throwable t) {
-                        t.printStackTrace();
-                    }
-                    return null;
-                }
-            });
-
-            waitForBridgeFormation(10000);
-            startProducer.countDown();
-
-            pool.shutdown();
-            pool.awaitTermination(10, TimeUnit.SECONDS);
-            LOG.info("broker1Count " + broker1Count.get() + ", broker2Count " + broker2Count.get());
-
-            int count = 0;
-            // give it 10 seconds
-            while (count++ < 10
-                    && broker1Count.get() + broker2Count.get() != total) {
-                LOG.info("broker1Count " + broker1Count.get() + ", broker2Count " + broker2Count.get());
-                Thread.sleep(1000);
-            }
-            container1.destroy();
-        } finally {
-            try {
-                if (brokerService1 != null) {
-                    brokerService1.stop();
-                }
-            } catch (final Throwable t) {
-                t.printStackTrace();
-            }
-            try {
-                if (brokerService2 != null) {
-                    brokerService2.stop();
-                }
-            } catch (final Throwable t) {
-                t.printStackTrace();
-            }
-        }
-        
-        if (broker1Count.get() < 25 || broker2Count.get() < 25) {
-            fail("Each broker should have gotten at least 25 messages but instead broker1 got "
-                    + broker1Count.get()
-                    + " and broker2 got "
-                    + broker2Count.get());
-        }
-    }
-
-    @Test
-    public void does_xml_multicast_load_balance_between_consumers() throws Exception {
-        final int total = 100;
-        final AtomicInteger broker1Count = new AtomicInteger(0);
-        final AtomicInteger broker2Count = new AtomicInteger(0);
-        final ExecutorService pool = Executors.newSingleThreadExecutor();
-        final CountDownLatch startProducer = new CountDownLatch(1);
-        final String xmlConfig = getClass().getPackage().getName().replace('.','/') + "/loadbalancetest.xml";
-        System.setProperty("lbt.networkBridgePrefetch", String.valueOf(networkBridgePrefetch));
-        System.setProperty("lbt.brokerName", "one");
-        final ActiveMQConnectionFactory connectionFactory1 = new ActiveMQConnectionFactory(
-                "vm://one?brokerConfig=xbean:" + xmlConfig);
-        final SingleConnectionFactory singleConnectionFactory1 = new SingleConnectionFactory(
-                connectionFactory1);
-        singleConnectionFactory1.setReconnectOnException(true);
-        final DefaultMessageListenerContainer container1 = new DefaultMessageListenerContainer();
-        container1.setConnectionFactory(singleConnectionFactory1);
-        container1.setMaxConcurrentConsumers(1);
-        container1.setDestination(new ActiveMQQueue(TESTING_QUEUE));
-        container1.setMessageListener(new MessageListener() {
-
-            public void onMessage(final Message message) {
-                broker1Count.incrementAndGet();
-            }
-        });
-        container1.afterPropertiesSet();
-        container1.start();
-        pool.submit(new Callable<Object>() {
-
-            public Object call() throws Exception {
-                System.setProperty("lbt.brokerName", "two");
-                final ActiveMQConnectionFactory connectionFactory2 = new ActiveMQConnectionFactory(
-                        "vm://two?brokerConfig=xbean:" + xmlConfig);
-                final SingleConnectionFactory singleConnectionFactory2 = new SingleConnectionFactory(
-                        connectionFactory2);
-                singleConnectionFactory2.setReconnectOnException(true);
-                final DefaultMessageListenerContainer container2 = new DefaultMessageListenerContainer();
-                container2.setConnectionFactory(singleConnectionFactory2);
-                container2.setMaxConcurrentConsumers(1);
-                container2.setDestination(new ActiveMQQueue(TESTING_QUEUE));
-                container2.setMessageListener(new MessageListener() {
-
-                    public void onMessage(final Message message) {
-                        broker2Count.incrementAndGet();
-                    }
-                });
-                container2.afterPropertiesSet();
-                container2.start();
-                
-                
-                assertTrue("wait for start signal", startProducer.await(20, TimeUnit.SECONDS));
-                
-                final CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(
-                        singleConnectionFactory2);
-                final JmsTemplate template = new JmsTemplate(
-                        cachingConnectionFactory);
-                final ActiveMQQueue queue = new ActiveMQQueue(TESTING_QUEUE);
-                for (int i = 0; i < total; i++) {
-                    template.send(queue, new MessageCreator() {
-
-                        public Message createMessage(final Session session)
-                                throws JMSException {
-                            final TextMessage message = session
-                                    .createTextMessage();
-                            message.setText("Hello World!");
-                            return message;
-                        }
-                    });
-                }
-                return null;
-            }
-        });
-        
-        // give network a chance to build, needs advisories
-        waitForBridgeFormation(10000);
-        startProducer.countDown();
-        
-        pool.shutdown();
-        pool.awaitTermination(10, TimeUnit.SECONDS);
-        
-        LOG.info("broker1Count " + broker1Count.get() + ", broker2Count " + broker2Count.get());
-
-        int count = 0;
-        // give it 10 seconds
-        while (count++ < 10 && broker1Count.get() + broker2Count.get() != total) {
-            LOG.info("broker1Count " + broker1Count.get() + ", broker2Count " + broker2Count.get());
-            Thread.sleep(1000);
-        }
-        if (broker1Count.get() < 25 || broker2Count.get() < 25) {
-            fail("Each broker should have gotten at least 25 messages but instead broker1 got "
-                    + broker1Count.get()
-                    + " and broker2 got "
-                    + broker2Count.get());
-        }
-    }
-
-    // need to ensure broker bridge is alive before starting the consumer
-    // peeking at the internals will give us this info
-    private void waitForBridgeFormation(long delay) throws Exception {
-        long done = System.currentTimeMillis() + delay;
-        while (done > System.currentTimeMillis()) {
-            BrokerService broker = BrokerRegistry.getInstance().lookup("two");
-            if (broker != null && !broker.getNetworkConnectors().isEmpty()) {
-                 if (!broker.getNetworkConnectors().get(0).activeBridges().isEmpty()) {
-                     return;
-                 }
-            }
-            Thread.sleep(1000);
-        }
-    }
-}
diff --git a/trunk/activemq-spring/src/test/resources/activemq.xml b/trunk/activemq-spring/src/test/resources/activemq.xml
deleted file mode 100755
index 0434580..0000000
--- a/trunk/activemq-spring/src/test/resources/activemq.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans 
-  xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
- 
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker useJmx="false"  xmlns="http://activemq.apache.org/schema/core" persistent="false">
-  
-    <networkConnectors>
-      <networkConnector uri="multicast://default"/>
-    </networkConnectors>
-
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default"/>
-    </transportConnectors>
-        
-  </broker>
-  
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-spring/src/test/resources/log4j.properties b/trunk/activemq-spring/src/test/resources/log4j.properties
deleted file mode 100755
index b3e9e9a..0000000
--- a/trunk/activemq-spring/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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
-#log4j.logger.org.apache.activemq.broker.region=TRACE
-
-# 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
diff --git a/trunk/activemq-spring/src/test/resources/org/apache/bugs/loadbalancetest.xml b/trunk/activemq-spring/src/test/resources/org/apache/bugs/loadbalancetest.xml
deleted file mode 100644
index 1e5be75..0000000
--- a/trunk/activemq-spring/src/test/resources/org/apache/bugs/loadbalancetest.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:amq="http://activemq.apache.org/schema/core"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-    http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-	<!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-       <property name="systemPropertiesModeName">
-         <value>SYSTEM_PROPERTIES_MODE_OVERRIDE</value>
-       </property>
-    </bean>   
-	
-	<!-- Configures a broker with the system's hostname as its name with jmx but no persistence or adivsory support -->
-	<amq:broker brokerName="${lbt.brokerName}" useJmx="false" persistent="false" advisorySupport="true" useLocalHostBrokerName="false">
-
-	    <amq:networkConnectors>
-            <amq:networkConnector conduitSubscriptions="false" decreaseNetworkConsumerPriority="false" networkTTL="3"
-                                  dispatchAsync="false"
-                dynamicOnly="true" uri="multicast://239.255.2.25:6155" name="network" prefetchSize="${lbt.networkBridgePrefetch}">
-                <amq:excludedDestinations>
-	                <amq:topic physicalName=">"/>
-	            </amq:excludedDestinations>
-                <amq:staticallyIncludedDestinations>
-                    <amq:queue physicalName=">"/>
-                </amq:staticallyIncludedDestinations>
-            </amq:networkConnector>
-	    </amq:networkConnectors>
-
-	    <amq:transportConnectors>
-	       <amq:transportConnector name="transport" uri="nio://0.0.0.0:0" discoveryUri="multicast://239.255.2.25:6155"/>
-        </amq:transportConnectors>
-	</amq:broker>
-</beans>
diff --git a/trunk/activemq-spring/src/test/resources/spring-embedded-pooled.xml b/trunk/activemq-spring/src/test/resources/spring-embedded-pooled.xml
deleted file mode 100755
index 5fa5f28..0000000
--- a/trunk/activemq-spring/src/test/resources/spring-embedded-pooled.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<!-- START SNIPPET: spring -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-
-    <bean id="broker1" class="org.apache.activemq.xbean.PooledBrokerFactoryBean">
-      <property name="config" value="classpath:activemq.xml"/>
-    </bean>
-
-    <bean id="broker2" class="org.apache.activemq.xbean.PooledBrokerFactoryBean">
-      <property name="config" value="classpath:activemq.xml"/>
-    </bean>
-    
-</beans>
-
-<!-- END SNIPPET: spring -->
diff --git a/trunk/activemq-spring/src/test/resources/spring/spring.xml b/trunk/activemq-spring/src/test/resources/spring/spring.xml
deleted file mode 100644
index 9291a5a..0000000
--- a/trunk/activemq-spring/src/test/resources/spring/spring.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:amq="http://activemq.apache.org/schema/core"
-       xsi:schemaLocation="
-	   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-	   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
-	   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
-	   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <amq:broker brokerName="test" useJmx="false" persistent="false">
-        <amq:transportConnectors>
-            <amq:transportConnector name="transport" uri="nio://0.0.0.0:61616"/>
-        </amq:transportConnectors>
-    </amq:broker>
-
-
-    <bean id="connectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
-        <property name="maxConnections" value="100"/>
-        <property name="maximumActive" value="50"/>
-        <property name="connectionFactory">
-            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-                <property name="brokerURL" value="tcp://localhost:61616"/>
-            </bean>
-        </property>
-    </bean>
-
-    <bean id="transactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
-        <property name="connectionFactory" ref="connectionFactory"/>
-    </bean>
-
-    <bean id="messageListener" class="org.apache.activemq.spring.Listener"/>
-
-    <bean id="simpleContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
-        <property name="connectionFactory" ref="connectionFactory"/>
-        <property name="messageListener" ref="messageListener"/>
-        <property name="destinationName" value="SIMPLE"/>
-        <property name="sessionTransacted" value="true"/>
-    </bean>
-
-    <bean id="compositeContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
-        <property name="connectionFactory" ref="connectionFactory"/>
-        <property name="messageListener" ref="messageListener"/>
-        <property name="destinationName" value="TEST.>?consumer.prefetchSize=1"/>
-        <property name="transactionManager" ref="transactionManager"/>
-    </bean>
-
-</beans>   
\ No newline at end of file
diff --git a/trunk/activemq-spring/src/test/resources/spring/xa.xml b/trunk/activemq-spring/src/test/resources/spring/xa.xml
deleted file mode 100644
index 691fce0..0000000
--- a/trunk/activemq-spring/src/test/resources/spring/xa.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:amq="http://activemq.apache.org/schema/core"
-       xsi:schemaLocation="
-	   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-	   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
-	   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
-	   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- broker -->
-
-    <amq:broker brokerName="test" useJmx="false" persistent="false">
-        <amq:transportConnectors>
-            <amq:transportConnector name="transport" uri="nio://0.0.0.0:61616"/>
-        </amq:transportConnectors>
-    </amq:broker>
-
-    <!-- simple tx -->
-
-    <bean id="jmsTemplate2" class="org.springframework.jms.core.JmsTemplate">
-        <property name="connectionFactory" ref="connectionFactory2"/>
-    </bean>
-
-
-    <bean id="transactionManager2" class="org.springframework.jms.connection.JmsTransactionManager">
-        <property name="connectionFactory" ref="connectionFactory2"/>
-    </bean>
-
-
-    <bean id="connectionFactory2" class="org.apache.activemq.ActiveMQConnectionFactory">
-        <property name="brokerURL" value="tcp://localhost:61616"/>
-        <property name="userName" value="smx"/>
-        <property name="password" value="smx"/>
-    </bean>
-
-    <!-- xa tx -->
-
-    <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
-        <property name="connectionFactory" ref="connectionFactory"/>
-    </bean>
-
-    <bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean">
-        <property name="defaultTransactionTimeoutSeconds" value="300"/>
-    </bean>
-
-    <bean id="connectionFactory" class="org.jencks.factory.ConnectionFactoryFactoryBean">
-        <property name="connectionManager" ref="jmsConnectionManager"/>
-        <property name="managedConnectionFactory" ref="jmsManagedConnectionFactory"/>
-    </bean>
-
-    <bean id="jmsConnectionManager" class="org.jencks.factory.ConnectionManagerFactoryBean">
-        <property name="transaction" value="xa"/>
-        <property name="transactionManager" ref="transactionManager"/>
-        <property name="poolMaxSize" value="20"/>
-        <property name="connectionTracker">
-            <bean class="org.jencks.factory.ConnectionTrackerFactoryBean">
-                <property name="geronimoTransactionManager" ref="transactionManager"/>
-            </bean>
-        </property>
-    </bean>
-
-    <bean id="jmsManagedConnectionFactory" class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
-        <property name="resourceAdapter">
-            <bean class="org.apache.activemq.ra.ActiveMQResourceAdapter">
-                <property name="serverUrl" value="tcp://localhost:61616"/>
-                <property name="maximumRedeliveries" value="6"/>
-                <property name="allPrefetchValues" value="1"/>
-            </bean>
-        </property>
-    </bean>
-
-</beans>    
\ No newline at end of file
diff --git a/trunk/activemq-tooling/etc/css/stylesheet.css b/trunk/activemq-tooling/etc/css/stylesheet.css
deleted file mode 100644
index 6fb7a9d..0000000
--- a/trunk/activemq-tooling/etc/css/stylesheet.css
+++ /dev/null
@@ -1,184 +0,0 @@
-vadoc style sheet */
-/**
- * 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.
- */
-
-/* Define colors, fonts and other style attributes here to override the defaults  */
-
-/* Page background color */
-body { 	font-family: Arial;
-	background-color: white;
-	font-size: 8px;
- }
-
-td { 	
-	font-family: Arial;
-	font-size: 10pt;
- }
-/* Table colors */
-.TableHeadingColor     { background: #F4F4F4 }
-.TableSubHeadingColor  { background: #F4F4F4 }
-.TableRowColor         { background: #FFFFFF }
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont   { font-size: normal; font-family: Arial,Helvetica,sans-serif; font-size:12pt; line-height: normal; }
-.FrameHeadingFont { font-size: normal; font-family: Arial,Helvetica,sans-serif; font-size:10pt; line-height: normal;}
-.FrameItemFont    { font-size: normal; font-family: Arial,Helvetica,sans-serif; font-size:8pt; line-height: normal;}
-
-/* Example of smaller, sans-serif font in frames */
-/* .FrameItemFont  { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
-
-/* Navigation bar fonts and colors */
-
-/* .NavBarCell1    { background-color:#F4F4F4;} */
-.NavBarCell1    { background:transparent url("http://activemq.apache.org/images/top-red-bar.png") repeat; 
-font-family: Verdana, arial, sans-serif;
-font-size: 11px;
-font-weight: bold;	
-line-height: 16px;
-color: #777;
-}
-
-.NavBarCell1 a:link, .NavBarCell1 a:visited {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 16px;
-  color: #ffffff;
-  text-decoration: none;
-}
-.NavBarCell1 a:active, .NavBarCell1 a:hover {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 13px;
-  color: #c0c0c0;
-  text-decoration: underline;
-}
-
-.NavBarCell1Rev { background-color:silver;}
-
-.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-
-A:link, A:visited, A:active, A:hover {
-   color: #880055;
-   text-decoration: none;
-}
-
-A:active, A:hover {
-   text-decoration: underline;
-   color: #202020;
-}
-
-P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
-    color: #000000;
-}
-
-TD, TH, SPAN {
-    color: #000000;
-}
-
-BLOCKQUOTE {
-    margin-right: 0px;
-}
-
-/*H1, H2, H3, H4, H5, H6    {
-    color: #000000;
-    font-weight:500;
-    margin-top:10px;
-    padding-top:15px;
-}
-
-H1 { font-size: 150%; }
-H2 { font-size: 140%; }
-H3 { font-size: 110%; font-weight: bold; }
-H4 { font-size: 110%; font-weight: bold;}
-H5 { font-size: 100%; font-style: italic; }
-H6 { font-size: 100%; font-style: italic; }*/
-
-TT {
-font-size: 90%;
-    font-family: "Courier New", Courier, monospace;
-    color: #000000;
-}
-
-PRE {
-font-size: 90%;
-    padding: 5px;
-    border-style: solid;
-    border-width: 1px;
-    border-color: #CCCCCC;
-    background-color: #F4F4F4;
-}
-
-UL, OL, LI {
-    list-style: disc;
-}
-
-HR  {
-    width: 100%;
-    height: 1px;
-    background-color: #CCCCCC;
-    border-width: 0px;
-    padding: 0px;
-    color: #CCCCCC;
-}
-
-.variablelist { 
-    padding-top: 10; 
-    padding-bottom:10; 
-    margin:0;
-}
-
-.itemizedlist, UL { 
-    padding-top: 0; 
-    padding-bottom:0; 
-    margin:0; 
-}
-
-.term { 
-    font-weight:bold;
-}
-body center {
-	text-align: left;
-    color: #660033;
-}
-
-table, td, th {
-	border: 0px;
-}
-
-th {
-	border-bottom: 1px solid;
-	border-color: #aaa;
-}
-
-tr.TableRowColor td {
-	border-bottom: 1px solid;
-	border-color: #aaa;
-}
-
-dl dd {
-	font-size: 90%;
-	line-height: 120%;
-}
-
-p {
-	padding-left: 5px;
-	padding-top: 0px;
-	padding-bottom: 0px;
-}
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/pom.xml b/trunk/activemq-tooling/maven-activemq-memtest-plugin/pom.xml
deleted file mode 100644
index 7a1a48a..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq.tooling</groupId>
-    <artifactId>activemq-tooling</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>maven-activemq-memtest-plugin</artifactId>
-  <packaging>maven-plugin</packaging>
-  <name>ActiveMQ :: Memory Usage Test Plugin</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-console</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derbynet</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/readme.txt b/trunk/activemq-tooling/maven-activemq-memtest-plugin/readme.txt
deleted file mode 100644
index 009de45..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/readme.txt
+++ /dev/null
@@ -1,99 +0,0 @@
-####################################################################################################
-# Running Maven 2 Memory usage Test
-####################################################################################################
-
-Goal                      | Description
---------------------------|----------------------------------------------------------
- activemq-memtest:memtest | Starts the broker, producer, consumer and the memory monitoring thread all in the same VM and
-                          | generate the heap and non-heap memory usage of the jvm.
-                          | The plugin is included by default in the \activemq-perf module.
-                          |
-                          | Parameters :
-                          |
-                          |    1. -DmessageCount - specifies number of messages to send/receive
-                          |                      - default value : 100000
-                          |
-                          |    2. -Dtopic  - specifies domain type. Valid value is true or false
-                          |                - default value : true
-                          |
-                          |    3. -Ddurable - specifies delivery mode: Valid value is true or false
-                          |                 - default value : false
-                          |
-                          |    4. -DconnectionCheckpointSize - specifies size of messages sent in KB before we close and
-                          |                                    start the producer/consumer to see if there is a memory
-                          |                                    leak using different connections.
-                          |                                  - a  value of -1 indicates that no checkpoint is set and will
-                          |                                    send/consume messages using one producer/consumer conneciton
-                          |                                  - default value : -1
-                          |
-                          |    5. -DmessageSize - specifies the message size  in bytes
-                          |                     - default value : 10240  (10KB)
-                          |
-                          |    6. -DcheckpointInterval - specifies the interval in seconds on which the monitoring tool
-                          |                              will get the memory usage of test run.
-                          |                            - default value :  2  (seconds)
-                          |
-                          |    7. -DprefetchSize - specifies the prefetch size to be used
-                          |                      - a value of -1 will indicates that test will use the default prefetch
-                          |                        size (32000)
-                          |                      - default value : -1
-                          |
-                          |    8. -Durl - species the broker url to use if not going to be using the embedded broker
-                          |             - default value : null
-                          |
-                          |    9. -DreportName - specifies the name of the output xml file.
-                          |                    - default value : activemq-memory-usage-report
-                          |
-                          |   10. -DreportDirectory - specifies the directory of the output file
-                          |                         - default value : ${project.build.directory}/test-memtest
-                          |
-                          |   11. -DproducerCount - specifies the number of producers
-                          |                       - default value : 1
-                          |
-                          |   12. -DconsumerCount - specifies the number of consumers
-                          |                       - default value : 1
-
------------------------------------------------------------------------------------------------
-|Memory Usage Test sample output
-|-----------------------------------------------------------------------------------------------
-|<test-report>
-|  <test-information>
-|    <os-name>Windows XP</os-name>
-|    <java-version>1.5.0_05</java-version>
-|    <jvm_memory_settings>
-|      <heap_memory>
-|        <committed>9502720</committed>
-|        <max>66650112</max>
-|      </heap_memory>
-|      <non_heap_memory>
-|        <committed>30736384</committed>
-|        <max>121634816</max>
-|      </non_heap_memory>
-|    </jvm_memory_settings>
-|    <test-settings>
-|      <durable>non-durable</durable>
-|      <message_size>10240</message_size>
-|      <destination_name>FOO.BAR</destination_name>
-|      <connection_checkpoint_size>-1</connection_checkpoint_size>
-|      <consumer_count>1</consumer_count>
-|      <report_name>activemq-memory-usage-report</report_name>
-|      <prefetchSize>-1</prefetchSize>
-|      <domain>topic</domain>
-|      <producer_count>1</producer_count>
-|      <connection_checkpoint_size_kb>-1</connection_checkpoint_size_kb>
-|      <message_count>100000</message_count>
-|      <report_directory>C:\Projects\logicblaze\activemq\activemq-perftest\target/test-memtest</report_directory>
-|    </test-settings>
-|  </test-information>
-|  <test-result checkpoint_interval_in_sec=5 >
-|      <memory_usage index=0 non_heap_mb=21 non_heap_bytes=22963904 heap_mb=6 heap_bytes=7275808/>
-|      <memory_usage index=1 non_heap_mb=23 non_heap_bytes=24598560 heap_mb=11 heap_bytes=12474400/>
-|      ....
-|      ....
-|  </test-result>
-|</test-report>
-|
--------------------------------------------------------------------------------------------------
-
-
-
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java b/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java
deleted file mode 100644
index 306de48..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.maven;
-
-import org.apache.activemq.tool.JMSMemtest;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-/**
- * Goal which does a memory usage test to check for any memory leak
- * 
- * @goal memtest
- * @phase process-sources
- */
-public class MemtestMojo extends AbstractMojo {
-
-    /**
-     * @parameter expression="${url}
-     */
-    private String url;
-
-    /**
-     * @parameter expression="${topic}" default-value="true"
-     * @required
-     */
-    private String topic;
-
-    /**
-     * @parameter expression="${connectionCheckpointSize}" default-value="-1"
-     * @required
-     */
-    private String connectionCheckpointSize;
-
-    /**
-     * @parameter expression="${durable}" default-value="false"
-     * @required
-     */
-    private String durable;
-
-    /**
-     * @parameter expression="${producerCount}" default-value="1"
-     * @required
-     */
-    private String producerCount;
-
-    /**
-     * @parameter expression="${prefetchSize}" default-value="-1"
-     * @required
-     */
-    private String prefetchSize;
-
-    /**
-     * @parameter expression="${consumerCount}" default-value="1"
-     * @required
-     */
-    private String consumerCount;
-
-    /**
-     * @parameter expression="${messageCount}" default-value="100000"
-     * @required
-     */
-    private String messageCount;
-
-    /**
-     * @parameter expression="${messageSize}" default-value="10240"
-     * @required
-     */
-    private String messageSize;
-
-    /**
-     * @parameter expression="${checkpointInterval}" default-value="2"
-     * @required
-     */
-    private String checkpointInterval;
-
-    /**
-     * @parameter expression="${destinationName}" default-value="FOO.BAR"
-     * @required
-     */
-    private String destinationName;
-
-    /**
-     * @parameter expression="${reportName}"
-     *            default-value="activemq-memory-usage-report"
-     * @required
-     */
-    private String reportName;
-
-    /**
-     * @parameter expression="${reportDirectory}"
-     *            default-value="${project.build.directory}/test-memtest"
-     * @required
-     */
-    private String reportDirectory;
-
-    public void execute() throws MojoExecutionException {
-
-        JMSMemtest.main(createArgument());
-    }
-
-    public String[] createArgument() {
-        String[] options = {
-            "url=" + url, "topic=" + topic, "durable=" + durable, "connectionCheckpointSize=" + connectionCheckpointSize, "producerCount=" + producerCount, "consumerCount=" + consumerCount,
-            "messageCount=" + messageCount, "messageSize=" + messageSize, "checkpointInterval=" + checkpointInterval, "destinationName=" + destinationName, "reportName=" + reportName,
-            "prefetchSize=" + prefetchSize, "reportDirectory=" + reportDirectory,
-        };
-        return options;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java b/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java
deleted file mode 100644
index a633695..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/**
- * 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.tool;
-
-import java.util.Properties;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class JMSMemtest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(JMSMemtest.class);
-    private static final int DEFAULT_MESSAGECOUNT = 5000;
-    
-    protected BrokerService broker;
-    protected boolean topic = true;
-    protected boolean durable;
-    protected long messageCount;
-
-    //  how large the message in kb before we close/start the producer/consumer with a new connection.  -1 means no connectionCheckpointSize
-    protected int connectionCheckpointSize;
-    protected long connectionInterval;
-
-
-    protected int consumerCount;
-    protected int producerCount;
-    protected int checkpointInterval;
-    protected int prefetchSize;
-    //set 10 kb of payload as default
-    protected int messageSize;
-
-    protected String reportDirectory;
-    protected String reportName;
-
-
-    protected String url = "";
-    protected MemProducer[] producers;
-    protected MemConsumer[] consumers;
-    protected String destinationName;
-    protected boolean allMessagesConsumed = true;
-    protected MemConsumer allMessagesList = new MemConsumer();
-
-    protected Message payload;
-
-    protected ActiveMQConnectionFactory connectionFactory;
-    protected Connection connection;
-    protected Destination destination;
-
-
-    protected boolean createConnectionPerClient = true;
-
-    protected boolean transacted;
-    protected boolean useEmbeddedBroker = true;
-    protected MemoryMonitoringTool memoryMonitoringTool;
-
-    public JMSMemtest(Properties settings) {
-        url = settings.getProperty("url");
-        topic = new Boolean(settings.getProperty("topic")).booleanValue();
-        durable = new Boolean(settings.getProperty("durable")).booleanValue();
-        connectionCheckpointSize = new Integer(settings.getProperty("connectionCheckpointSize")).intValue();
-        producerCount = new Integer(settings.getProperty("producerCount")).intValue();
-        consumerCount = new Integer(settings.getProperty("consumerCount")).intValue();
-        messageCount = new Integer(settings.getProperty("messageCount")).intValue();
-        messageSize = new Integer(settings.getProperty("messageSize")).intValue();
-        prefetchSize = new Integer(settings.getProperty("prefetchSize")).intValue();
-        checkpointInterval = new Integer(settings.getProperty("checkpointInterval")).intValue() * 1000;
-        producerCount = new Integer(settings.getProperty("producerCount")).intValue();
-        reportName = settings.getProperty("reportName");
-        destinationName = settings.getProperty("destinationName");
-        reportDirectory = settings.getProperty("reportDirectory");
-        connectionInterval = connectionCheckpointSize * 1024;
-    }
-
-    public static void main(String[] args) {
-
-
-        Properties sysSettings = new Properties();
-
-        for (int i = 0; i < args.length; i++) {
-
-            int index = args[i].indexOf("=");
-            String key = args[i].substring(0, index);
-            String val = args[i].substring(index + 1);
-            sysSettings.setProperty(key, val);
-
-        }
-
-
-        JMSMemtest memtest = new JMSMemtest(sysSettings);
-        try {
-            memtest.start();
-        } catch (Exception e) {
-
-            e.printStackTrace();
-        }
-
-    }
-
-    protected void start() throws Exception {
-        LOG.info("Starting Monitor");
-        memoryMonitoringTool = new MemoryMonitoringTool();
-        memoryMonitoringTool.setTestSettings(getSysTestSettings());
-        Thread monitorThread = memoryMonitoringTool.startMonitor();
-
-        if (messageCount == 0) {
-            messageCount = DEFAULT_MESSAGECOUNT;
-        }
-
-
-        if (useEmbeddedBroker) {
-            if (broker == null) {
-                broker = createBroker();
-            }
-        }
-
-
-        connectionFactory = (ActiveMQConnectionFactory) createConnectionFactory();
-        if (prefetchSize > 0) {
-            connectionFactory.getPrefetchPolicy().setTopicPrefetch(prefetchSize);
-            connectionFactory.getPrefetchPolicy().setQueuePrefetch(prefetchSize);
-        }
-
-        connection = connectionFactory.createConnection();
-        Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-
-        if (topic) {
-            destination = session.createTopic(destinationName);
-        } else {
-            destination = session.createQueue(destinationName);
-        }
-
-        createPayload(session);
-
-        publishAndConsume();
-
-        LOG.info("Closing resources");
-        this.close();
-
-        monitorThread.join();
-
-
-    }
-
-
-    protected boolean resetConnection(int counter) {
-        if (connectionInterval > 0) {
-            long totalMsgSizeConsumed = counter * 1024;
-            if (connectionInterval < totalMsgSizeConsumed) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    protected void publishAndConsume() throws Exception {
-
-        createConsumers();
-        createProducers();
-        int counter = 0;
-        boolean resetCon = false;
-        LOG.info("Start sending messages ");
-        for (int i = 0; i < messageCount; i++) {
-            if (resetCon) {
-                closeConsumers();
-                closeProducers();
-                createConsumers();
-                createProducers();
-                resetCon = false;
-            }
-
-            for (int k = 0; k < producers.length; k++) {
-                producers[k].sendMessage(payload, "counter", counter);
-                counter++;
-                if (resetConnection(counter)) {
-                    resetCon = true;
-                    break;
-                }
-            }
-        }
-    }
-
-
-    protected void close() throws Exception {
-        connection.close();
-        broker.stop();
-
-        memoryMonitoringTool.stopMonitor();
-    }
-
-    protected void createPayload(Session session) throws JMSException {
-
-        byte[] array = new byte[messageSize];
-        for (int i = 0; i < array.length; i++) {
-            array[i] = (byte) i;
-        }
-
-        BytesMessage bystePayload = session.createBytesMessage();
-        bystePayload.writeBytes(array);
-        payload = (Message) bystePayload;
-    }
-
-
-    protected void createProducers() throws JMSException {
-        producers = new MemProducer[producerCount];
-        for (int i = 0; i < producerCount; i++) {
-            producers[i] = new MemProducer(connectionFactory, destination);
-            if (durable) {
-                producers[i].setDeliveryMode(DeliveryMode.PERSISTENT);
-            } else {
-                producers[i].setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-            }
-            producers[i].start();
-        }
-
-    }
-
-    protected void createConsumers() throws JMSException {
-        consumers = new MemConsumer[consumerCount];
-        for (int i = 0; i < consumerCount; i++) {
-            consumers[i] = new MemConsumer(connectionFactory, destination);
-            consumers[i].setParent(allMessagesList);
-            consumers[i].start();
-
-
-        }
-    }
-
-    protected void closeProducers() throws JMSException {
-        for (int i = 0; i < producerCount; i++) {
-            producers[i].shutDown();
-        }
-
-    }
-
-    protected void closeConsumers() throws JMSException {
-        for (int i = 0; i < consumerCount; i++) {
-            consumers[i].shutDown();
-        }
-    }
-
-    protected ConnectionFactory createConnectionFactory() throws JMSException {
-
-        if (url == null || url.trim().equals("") || url.trim().equals("null")) {
-            return new ActiveMQConnectionFactory("vm://localhost");
-        } else {
-            return new ActiveMQConnectionFactory(url);
-        }
-    }
-
-    protected BrokerService createBroker() throws Exception {
-        BrokerService broker = new BrokerService();
-        configureBroker(broker);
-        broker.start();
-        return broker;
-    }
-
-    protected void configureBroker(BrokerService broker) throws Exception {
-        broker.addConnector("vm://localhost");
-        broker.setDeleteAllMessagesOnStartup(true);
-    }
-
-    protected Properties getSysTestSettings() {
-        Properties settings = new Properties();
-        settings.setProperty("domain", topic ? "topic" : "queue");
-        settings.setProperty("durable", durable ? "durable" : "non-durable");
-        settings.setProperty("connection_checkpoint_size_kb", new Integer(connectionCheckpointSize).toString());
-        settings.setProperty("producer_count", new Integer(producerCount).toString());
-        settings.setProperty("consumer_count", new Integer(consumerCount).toString());
-        settings.setProperty("message_count", new Long(messageCount).toString());
-        settings.setProperty("message_size", new Integer(messageSize).toString());
-        settings.setProperty("prefetchSize", new Integer(prefetchSize).toString());
-        settings.setProperty("checkpoint_interval", new Integer(checkpointInterval).toString());
-        settings.setProperty("destination_name", destinationName);
-        settings.setProperty("report_name", reportName);
-        settings.setProperty("report_directory", reportDirectory);
-        settings.setProperty("connection_checkpoint_size", new Integer(connectionCheckpointSize).toString());
-        return settings;
-    }
-
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java b/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java
deleted file mode 100644
index 79181a7..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.tool;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.Topic;
-
-/**
- * 
- */
-public class MemConsumer extends MemMessageIdList implements MessageListener {
-
-    static long ctr;
-
-    protected Connection connection;
-    protected MessageConsumer consumer;
-    protected long counter;
-    protected boolean isParent;
-    protected boolean inOrder = true;
-
-
-    public MemConsumer() {
-        super();
-    }
-
-    public MemConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException {
-        connection = fac.createConnection();
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        if (dest instanceof Topic && consumerName != null && consumerName.length() > 0) {
-            consumer = s.createDurableSubscriber((Topic) dest, consumerName);
-        } else {
-            consumer = s.createConsumer(dest);
-        }
-        consumer.setMessageListener(this);
-    }
-
-    public MemConsumer(ConnectionFactory fac, Destination dest) throws JMSException {
-        this(fac, dest, null);
-    }
-
-    public void start() throws JMSException {
-        connection.start();
-    }
-
-    public void stop() throws JMSException {
-        connection.stop();
-    }
-
-    public void shutDown() throws JMSException {
-        connection.close();
-    }
-
-
-    public Message receive() throws JMSException {
-        return consumer.receive();
-    }
-
-    public Message receive(long wait) throws JMSException {
-        return consumer.receive(wait);
-    }
-
-    public void onMessage(Message msg) {
-        super.onMessage(msg);
-
-        if (isParent) {
-            try {
-                long ctr = msg.getLongProperty("counter");
-                if (counter != ctr) {
-                    inOrder = false;
-                }
-                counter++;
-
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-
-    public boolean isInOrder() {
-        return inOrder;
-    }
-
-
-    public void setAsParent(boolean isParent) {
-        this.isParent = isParent;
-    }
-
-    public boolean isParent() {
-        return this.isParent;
-    }
-
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java b/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java
deleted file mode 100644
index c014d4d..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * 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.tool;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A simple container of messages for performing testing and rendezvous style
- * code. You can use this class a {@link MessageListener} and then make
- * assertions about how many messages it has received allowing a certain maximum
- * amount of time to ensure that the test does not hang forever.
- * <p/>
- * Also you can chain these instances together with the
- * {@link #setParent(MessageListener)} method so that you can aggregate the
- * total number of messages consumed across a number of consumers.
- *
- * 
- */
-public class MemMessageIdList implements MessageListener {
-
-    protected static final Logger LOG = LoggerFactory.getLogger(MemMessageIdList.class);
-
-    private List<String> messageIds = new ArrayList<String>();
-    private Object semaphore;
-    private boolean verbose;
-    private MessageListener parent;
-    private long maximumDuration = 15000L;
-
-    public MemMessageIdList() {
-        this(new Object());
-    }
-
-    public MemMessageIdList(Object semaphore) {
-        this.semaphore = semaphore;
-    }
-
-    public boolean equals(Object that) {
-        if (that instanceof MemMessageIdList) {
-            MemMessageIdList thatListMem = (MemMessageIdList) that;
-            return getMessageIds().equals(thatListMem.getMessageIds());
-        }
-        return false;
-    }
-
-    public int hashCode() {
-        synchronized (semaphore) {
-            return messageIds.hashCode() + 1;
-        }
-    }
-
-    public String toString() {
-        synchronized (semaphore) {
-            return messageIds.toString();
-        }
-    }
-
-    /**
-     * @return all the messages on the list so far, clearing the buffer
-     */
-    public List<String> flushMessages() {
-        synchronized (semaphore) {
-            List<String> answer = new ArrayList<String>(messageIds);
-            messageIds.clear();
-            return answer;
-        }
-    }
-
-    public synchronized List<String> getMessageIds() {
-        synchronized (semaphore) {
-            return new ArrayList<String>(messageIds);
-        }
-    }
-
-    public void onMessage(Message message) {
-        String id = null;
-        try {
-            id = message.getJMSMessageID();
-            synchronized (semaphore) {
-                messageIds.add(id);
-                semaphore.notifyAll();
-            }
-            if (verbose) {
-                LOG.info("Received message: " + message);
-            }
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-        if (parent != null) {
-            parent.onMessage(message);
-        }
-    }
-
-    public int getMessageCount() {
-        synchronized (semaphore) {
-            return messageIds.size();
-        }
-    }
-
-    public void waitForMessagesToArrive(int messageCount) {
-        LOG.info("Waiting for " + messageCount + " message(s) to arrive");
-
-        long start = System.currentTimeMillis();
-
-        for (int i = 0; i < messageCount; i++) {
-            try {
-                if (hasReceivedMessages(messageCount)) {
-                    break;
-                }
-                long duration = System.currentTimeMillis() - start;
-                if (duration >= maximumDuration) {
-                    break;
-                }
-                synchronized (semaphore) {
-                    semaphore.wait(maximumDuration - duration);
-                }
-            } catch (InterruptedException e) {
-                LOG.info("Caught: " + e);
-            }
-        }
-        long end = System.currentTimeMillis() - start;
-
-        LOG.info("End of wait for " + end + " millis and received: " + getMessageCount() + " messages");
-    }
-
-
-    public boolean hasReceivedMessage() {
-        return getMessageCount() == 0;
-    }
-
-    public boolean hasReceivedMessages(int messageCount) {
-        return getMessageCount() >= messageCount;
-    }
-
-    public boolean isVerbose() {
-        return verbose;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public MessageListener getParent() {
-        return parent;
-    }
-
-    /**
-     * Allows a parent listener to be specified such as to aggregate messages
-     * consumed across consumers
-     */
-    public void setParent(MessageListener parent) {
-        this.parent = parent;
-    }
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemProducer.java b/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemProducer.java
deleted file mode 100644
index 05f486b..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemProducer.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.tool;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-/**
- * 
- */
-public class MemProducer {
-    protected Connection connection;
-    protected MessageProducer producer;
-
-    public MemProducer(ConnectionFactory fac, Destination dest) throws JMSException {
-        connection = fac.createConnection();
-        Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = s.createProducer(dest);
-    }
-
-    public void setDeliveryMode(int mode) throws JMSException {
-        producer.setDeliveryMode(mode);
-    }
-
-    public void start() throws JMSException {
-        connection.start();
-    }
-
-    public void stop() throws JMSException {
-        connection.stop();
-    }
-
-    public void shutDown() throws JMSException {
-        connection.close();
-    }
-
-    public void sendMessage(Message msg) throws JMSException {
-        sendMessage(msg, null, 0);
-    }
-
-    /*
-    *   allow producer to attach message counter on its header. This will be used to verify message order
-    *
-    */
-    public void sendMessage(Message msg, String headerName, long headerValue) throws JMSException {
-        if (headerName != null) {
-            msg.setLongProperty(headerName, headerValue);
-        }
-
-        producer.send(msg);
-
-    }
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java b/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java
deleted file mode 100644
index 31d2a46..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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.tool;
-
-import java.io.DataOutputStream;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryMXBean;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-public class MemoryMonitoringTool implements Runnable {
-
-    protected Properties testSettings = new Properties();
-    protected ReportGenerator reportGenerator = new ReportGenerator();
-
-    private long checkpointInterval = 5000;          // 5 sec sample checkpointInterval
-    private long resultIndex;
-    private AtomicBoolean isRunning = new AtomicBoolean(false);
-    private DataOutputStream dataDoutputStream;
-    private MemoryMXBean memoryBean;
-
-    public Properties getTestSettings() {
-        return testSettings;
-    }
-
-    public void setTestSettings(Properties sysTestSettings) {
-        this.testSettings = sysTestSettings;
-    }
-
-    public DataOutputStream getDataOutputStream() {
-        return dataDoutputStream;
-    }
-
-    public void setDataOutputStream(DataOutputStream dataDoutputStream) {
-        this.dataDoutputStream = dataDoutputStream;
-    }
-
-
-    public void stopMonitor() {
-        isRunning.set(false);
-    }
-
-
-    public long getCheckpointInterval() {
-        return checkpointInterval;
-    }
-
-    public void setCheckpointInterval(long checkpointInterval) {
-        this.checkpointInterval = checkpointInterval;
-    }
-
-
-    public Thread startMonitor() {
-
-        String intervalStr = this.getTestSettings().getProperty("checkpoint_interval");
-        checkpointInterval = new Integer(intervalStr).intValue();
-        this.getTestSettings().remove("checkpoint_interval");
-
-        memoryBean = ManagementFactory.getMemoryMXBean();
-        reportGenerator.setTestSettings(getTestSettings());
-        addTestInformation();
-
-        Thread t = new Thread(this);
-        t.setName("Memory monitoring tool");
-        isRunning.set(true);
-        t.start();
-
-        return t;
-
-    }
-
-
-    public void addTestInformation() {
-        reportGenerator.setReportName(this.getTestSettings().getProperty("report_name"));
-        reportGenerator.setReportDirectory(this.getTestSettings().getProperty("report_directory"));
-        reportGenerator.startGenerateReport();
-
-        reportGenerator.addTestInformation();
-        reportGenerator.writeWithIndent(4, "<jvm_memory_settings>");
-        reportGenerator.writeWithIndent(6, "<heap_memory>");
-        reportGenerator.writeWithIndent(8, "<committed>" + memoryBean.getHeapMemoryUsage().getCommitted() + "</committed>");
-        reportGenerator.writeWithIndent(8, "<max>" + memoryBean.getHeapMemoryUsage().getMax() + "</max>");
-        reportGenerator.writeWithIndent(6, "</heap_memory>");
-        reportGenerator.writeWithIndent(6, "<non_heap_memory>");
-        reportGenerator.writeWithIndent(8, "<committed>" + memoryBean.getNonHeapMemoryUsage().getCommitted() + "</committed>");
-        reportGenerator.writeWithIndent(8, "<max>" + memoryBean.getNonHeapMemoryUsage().getMax() + "</max>");
-        reportGenerator.writeWithIndent(6, "</non_heap_memory>");
-        reportGenerator.writeWithIndent(4, "</jvm_memory_settings>");
-
-        reportGenerator.addClientSettings();
-        reportGenerator.endTestInformation();
-    }
-
-
-    public void run() {
-
-        long nonHeapMB = 0;
-        long heapMB = 0;
-        long oneMB = 1024 * 1024;
-
-        reportGenerator.startTestResult(getCheckpointInterval());
-        while (isRunning.get()) {
-
-            try {
-                //wait every check point before getting the next memory usage
-                Thread.sleep(checkpointInterval);
-
-                nonHeapMB = memoryBean.getNonHeapMemoryUsage().getUsed() / oneMB;
-                heapMB = memoryBean.getHeapMemoryUsage().getUsed() / oneMB;
-
-                reportGenerator.writeWithIndent(6, "<memory_usage index='" + resultIndex
-                                                + "' non_heap_mb='" + nonHeapMB
-                                                + "' non_heap_bytes='"
-                                                + memoryBean.getNonHeapMemoryUsage().getUsed()
-                                                + "' heap_mb='" + heapMB
-                                                + "' heap_bytes='" + memoryBean.getHeapMemoryUsage().getUsed() + "'/>");
-
-                resultIndex++;
-
-            } catch (Exception e) {
-                e.printStackTrace();
-
-            }
-
-
-        }
-        reportGenerator.endTestResult();
-        reportGenerator.stopGenerateReport();
-
-    }
-
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java b/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java
deleted file mode 100644
index 984cb6e..0000000
--- a/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.tool;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ReportGenerator {
-
-    private static final Logger LOG = LoggerFactory.getLogger(ReportGenerator.class);
-    private String reportDirectory;
-    private String reportName;
-    private PrintWriter writer;
-    private File reportFile;
-    private Properties testSettings;
-
-    public ReportGenerator() {
-    }
-
-    public ReportGenerator(String reportDirectory, String reportName) {
-        this.setReportDirectory(reportDirectory);
-        this.setReportName(reportName);
-    }
-
-    public void startGenerateReport() {
-
-        File reportDir = new File(getReportDirectory());
-
-        // Create output directory if it doesn't exist.
-        if (!reportDir.exists()) {
-            reportDir.mkdirs();
-        }
-
-        if (reportDir != null) {
-            reportFile = new File(this.getReportDirectory() + File.separator + this.getReportName() + ".xml");
-        }
-
-        try {
-            this.writer = new PrintWriter(new FileOutputStream(reportFile));
-        } catch (IOException e1) {
-            e1.printStackTrace(); // To change body of catch statement use
-                                    // File | Settings | File Templates.
-        }
-    }
-
-    public void stopGenerateReport() {
-        writeWithIndent(0, "</test-report>");
-        this.getWriter().flush();
-        this.getWriter().close();
-        LOG.info(" TEST REPORT OUTPUT : " + reportFile.getAbsolutePath());
-
-    }
-
-    protected void addTestInformation() {
-
-        writeWithIndent(0, "<test-report>");
-        writeWithIndent(2, "<test-information>");
-
-        writeWithIndent(4, "<os-name>" + System.getProperty("os.name") + "</os-name>");
-        writeWithIndent(4, "<java-version>" + System.getProperty("java.version") + "</java-version>");
-
-    }
-
-    protected void addClientSettings() {
-        if (this.getTestSettings() != null) {
-            Enumeration keys = getTestSettings().propertyNames();
-
-            writeWithIndent(4, "<test-settings>");
-
-            String key;
-            while (keys.hasMoreElements()) {
-                key = (String)keys.nextElement();
-                writeWithIndent(6, "<" + key + ">" + getTestSettings().get(key) + "</" + key + ">");
-            }
-
-            writeWithIndent(4, "</test-settings>");
-        }
-    }
-
-    protected void endTestInformation() {
-        writeWithIndent(2, "</test-information>");
-
-    }
-
-    protected void startTestResult(long checkpointInterval) {
-        long intervalInSec = checkpointInterval / 1000;
-        writeWithIndent(2, "<test-result checkpoint_interval_in_sec='" + intervalInSec + "' >");
-    }
-
-    protected void endTestResult() {
-        writeWithIndent(2, "</test-result>");
-    }
-
-    protected void writeWithIndent(int indent, String result) {
-        StringBuffer buffer = new StringBuffer();
-
-        for (int i = 0; i < indent; ++i) {
-            buffer.append(" ");
-        }
-
-        buffer.append(result);
-        writer.println(buffer.toString());
-    }
-
-    public PrintWriter getWriter() {
-        return this.writer;
-    }
-
-    public String getReportDirectory() {
-        return reportDirectory;
-    }
-
-    public void setReportDirectory(String reportDirectory) {
-        this.reportDirectory = reportDirectory;
-    }
-
-    public String getReportName() {
-        return reportName;
-    }
-
-    public void setReportName(String reportName) {
-        this.reportName = reportName;
-    }
-
-    public Properties getTestSettings() {
-        return testSettings;
-    }
-
-    public void setTestSettings(Properties testSettings) {
-        this.testSettings = testSettings;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/pom.xml b/trunk/activemq-tooling/maven-activemq-perf-plugin/pom.xml
deleted file mode 100644
index 45a1b90..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.activemq.tooling</groupId>
-        <artifactId>activemq-tooling</artifactId>
-        <version>5.5.0</version>
-	</parent>
-
-    <artifactId>maven-activemq-perf-plugin</artifactId>
-    <packaging>maven-plugin</packaging>
-    <name>ActiveMQ :: Performance Test Plugin</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-plugin-api</artifactId>
-            <version>2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-console</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activeio-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derby</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derbynet</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java
deleted file mode 100644
index 52e7323..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.maven;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.activemq.tool.JmsConsumerSystem;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-/**
- * Goal which touches a timestamp file.
- * 
- * @goal consumer
- * @phase process-sources
- */
-public class ConsumerMojo extends AbstractMojo {
-
-    private String[] validPrefix = {
-        "sysTest.", "factory.", "consumer.", "tpSampler.", "cpuSampler."
-    };
-
-    public void execute() throws MojoExecutionException {
-        JmsConsumerSystem.main(createArgument());
-    }
-
-    protected String[] createArgument() {
-        List args = new ArrayList();
-        Properties sysProps = System.getProperties();
-        Set keys = new HashSet(sysProps.keySet());
-
-        for (Iterator i = keys.iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            if (isRecognizedProperty(key)) {
-                args.add(key + "=" + sysProps.remove(key));
-            }
-        }
-        return (String[])args.toArray(new String[0]);
-    }
-
-    protected boolean isRecognizedProperty(String key) {
-        for (int j = 0; j < validPrefix.length; j++) {
-            if (key.startsWith(validPrefix[j])) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java
deleted file mode 100644
index d1bb424..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.maven;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.activemq.tool.JmsProducerSystem;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-/**
- * Goal which touches a timestamp file.
- * 
- * @goal producer
- * @phase process
- */
-public class ProducerMojo extends AbstractMojo {
-
-    private String[] validPrefix = {
-        "sysTest.", "factory.", "producer.", "tpSampler.", "cpuSampler."
-    };
-
-    public void execute() throws MojoExecutionException {
-        JmsProducerSystem.main(createArgument());
-    }
-
-    protected String[] createArgument() {
-        List args = new ArrayList();
-        Properties sysProps = System.getProperties();
-        Set keys = new HashSet(sysProps.keySet());
-
-        for (Iterator i = keys.iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            if (isRecognizedProperty(key)) {
-                args.add(key + "=" + sysProps.remove(key));
-            }
-        }
-        return (String[])args.toArray(new String[0]);
-    }
-
-    protected boolean isRecognizedProperty(String key) {
-        for (int j = 0; j < validPrefix.length; j++) {
-            if (key.startsWith(validPrefix[j])) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
deleted file mode 100644
index 8f3169b..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * 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.maven;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
-
-import org.apache.activemq.console.Main;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-/**
- * Goal which starts activemq broker.
- * 
- * @goal broker
- * @phase process-sources
- */
-public class ServerMojo extends AbstractMojo {
-    /**
-     * Location of the output directory. Defaults to target.
-     * 
-     * @parameter expression="${project.build.directory}"
-     * @required
-     */
-    private File outputDirectory;
-
-    /**
-     * Location of the predefined config files.
-     * 
-     * @parameter expression="${configDirectory}"
-     *            default-value="${basedir}/src/main/resources/broker-conf"
-     * @required
-     */
-    private String configDirectory;
-
-    /**
-     * Type of activemq configuration to use. This is also the filename used.
-     * 
-     * @parameter expression="${configType}" default-value="activemq"
-     * @required
-     */
-    private String configType;
-
-    /**
-     * Location of activemq config file other those found in resources/config.
-     * 
-     * @parameter expression="${configFile}"
-     */
-    private File configFile;
-
-    /**
-     * Broker URL.
-     * 
-     * @parameter expression="${url}"
-     */
-    private String url;
-
-    public void execute() throws MojoExecutionException {
-
-        File out = outputDirectory;
-
-        // Create output directory if it doesn't exist.
-        if (!out.exists()) {
-            out.mkdirs();
-        }
-
-        String[] args = new String[2];
-        if (url != null) {
-            args[0] = "start";
-            args[1] = url;
-        } else {
-            File config;
-            if (configFile != null) {
-                config = configFile;
-            } else {
-
-                config = new File(configDirectory + File.separator + configType + ".xml");
-            }
-
-            try {
-                config = copy(config);
-            } catch (IOException e) {
-                throw new MojoExecutionException(e.getMessage());
-            }
-            args[0] = "start";
-            args[1] = "xbean:" + (config.toURI()).toString();
-        }
-
-        Main.main(args);
-    }
-
-    /**
-     * Copy activemq configuration file to output directory.
-     * 
-     * @param source
-     * @return
-     * @throws IOException
-     */
-    public File copy(File source) throws IOException {
-        FileChannel in = null;
-        FileChannel out = null;
-
-        File dest = new File(outputDirectory.getAbsolutePath() + File.separator + "activemq.xml");
-
-        try {
-            in = new FileInputStream(source).getChannel();
-            out = new FileOutputStream(dest).getChannel();
-
-            long size = in.size();
-            MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size);
-
-            out.write(buf);
-
-        } finally {
-            if (in != null) {
-                in.close();
-            }
-            if (out != null) {
-                out.close();
-            }
-        }
-
-        return dest;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
deleted file mode 100644
index 4f3ffbe..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * 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.tool;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.tool.properties.JmsClientProperties;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class AbstractJmsClient {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractJmsClient.class);
-
-    protected ConnectionFactory factory;
-    protected Connection jmsConnection;
-    protected Session jmsSession;
-
-    protected int destCount = 1;
-    protected int destIndex;
-    protected String clientName = "";
-
-    public AbstractJmsClient(ConnectionFactory factory) {
-        this.factory = factory;
-    }
-
-    public abstract JmsClientProperties getClient();
-
-    public abstract void setClient(JmsClientProperties client);
-
-    public ConnectionFactory getFactory() {
-        return factory;
-    }
-
-    public void setFactory(ConnectionFactory factory) {
-        this.factory = factory;
-    }
-
-    public int getDestCount() {
-        return destCount;
-    }
-
-    public void setDestCount(int destCount) {
-        this.destCount = destCount;
-    }
-
-    public int getDestIndex() {
-        return destIndex;
-    }
-
-    public void setDestIndex(int destIndex) {
-        this.destIndex = destIndex;
-    }
-
-    public String getClientName() {
-        return clientName;
-    }
-
-    public void setClientName(String clientName) {
-        this.clientName = clientName;
-    }
-
-    public Connection getConnection() throws JMSException {
-        if (jmsConnection == null) {
-            jmsConnection = factory.createConnection();
-            jmsConnection.setClientID(getClientName());
-            LOG.info("Creating JMS Connection: Provider=" + getClient().getJmsProvider() + ", JMS Spec=" + getClient().getJmsVersion());
-        }
-        return jmsConnection;
-    }
-
-    public Session getSession() throws JMSException {
-        if (jmsSession == null) {
-            int ackMode;
-            if (getClient().getSessAckMode().equalsIgnoreCase(JmsClientProperties.SESSION_AUTO_ACKNOWLEDGE)) {
-                ackMode = Session.AUTO_ACKNOWLEDGE;
-            } else if (getClient().getSessAckMode().equalsIgnoreCase(JmsClientProperties.SESSION_CLIENT_ACKNOWLEDGE)) {
-                ackMode = Session.CLIENT_ACKNOWLEDGE;
-            } else if (getClient().getSessAckMode().equalsIgnoreCase(JmsClientProperties.SESSION_DUPS_OK_ACKNOWLEDGE)) {
-                ackMode = Session.DUPS_OK_ACKNOWLEDGE;
-            } else if (getClient().getSessAckMode().equalsIgnoreCase(JmsClientProperties.SESSION_TRANSACTED)) {
-                ackMode = Session.SESSION_TRANSACTED;
-            } else {
-                ackMode = Session.AUTO_ACKNOWLEDGE;
-            }
-            jmsSession = getConnection().createSession(getClient().isSessTransacted(), ackMode);
-        }
-        return jmsSession;
-    }
-
-    public Destination[] createDestination(int destIndex, int destCount) throws JMSException {
-
-        if (getClient().isDestComposite()) {
-            return new Destination[] {
-                createCompositeDestination(getClient().getDestName(), destIndex, destCount)
-            };
-        } else {
-            Destination[] dest = new Destination[destCount];
-            for (int i = 0; i < destCount; i++) {
-                dest[i] = createDestination(getClient().getDestName() + "." + (destIndex + i));
-            }
-
-            return dest;
-        }
-    }
-
-    public Destination createCompositeDestination(int destIndex, int destCount) throws JMSException {
-        return createCompositeDestination(getClient().getDestName(), destIndex, destCount);
-    }
-
-    protected Destination createCompositeDestination(String name, int destIndex, int destCount) throws JMSException {
-        String compDestName;
-        String simpleName;
-
-        if (name.startsWith("queue://")) {
-            simpleName = name.substring("queue://".length());
-        } else if (name.startsWith("topic://")) {
-            simpleName = name.substring("topic://".length());
-        } else {
-            simpleName = name;
-        }
-
-        int i;
-        compDestName = name + "." + destIndex + ","; // First destination
-        for (i = 1; i < destCount - 1; i++) {
-            compDestName += simpleName + "." + (destIndex + i) + ",";
-        }
-        // Last destination (minus the comma)
-        compDestName += simpleName + "." + (destIndex + i);
-
-        return createDestination(compDestName);
-    }
-
-    protected Destination createDestination(String name) throws JMSException {
-        if (name.startsWith("queue://")) {
-            return getSession().createQueue(name.substring("queue://".length()));
-        } else if (name.startsWith("topic://")) {
-            return getSession().createTopic(name.substring("topic://".length()));
-        } else {
-            return getSession().createTopic(name);
-        }
-    }
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java
deleted file mode 100644
index 9d0c7fe..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/**
- * 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.tool;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.ConnectionMetaData;
-import javax.jms.JMSException;
-
-import org.apache.activemq.tool.properties.AbstractObjectProperties;
-import org.apache.activemq.tool.properties.JmsClientProperties;
-import org.apache.activemq.tool.properties.JmsClientSystemProperties;
-import org.apache.activemq.tool.properties.JmsFactoryProperties;
-import org.apache.activemq.tool.properties.ReflectionUtil;
-import org.apache.activemq.tool.reports.PerformanceReportWriter;
-import org.apache.activemq.tool.reports.VerbosePerfReportWriter;
-import org.apache.activemq.tool.reports.XmlFilePerfReportWriter;
-import org.apache.activemq.tool.sampler.CpuSamplerTask;
-import org.apache.activemq.tool.sampler.ThroughputSamplerTask;
-import org.apache.activemq.tool.spi.SPIConnectionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class AbstractJmsClientSystem extends AbstractObjectProperties {
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractJmsClientSystem.class);
-
-    protected ThreadGroup clientThreadGroup;
-    protected ConnectionFactory jmsConnFactory;
-
-    // Properties
-    protected JmsFactoryProperties factory = new JmsFactoryProperties();
-    protected ThroughputSamplerTask tpSampler = new ThroughputSamplerTask();
-    protected CpuSamplerTask cpuSampler = new CpuSamplerTask();
-
-    private int clientDestIndex;
-    private int clientDestCount;
-
-    public void runSystemTest() throws JMSException {
-        // Create connection factory
-        jmsConnFactory = loadJmsFactory(getSysTest().getSpiClass(), factory.getFactorySettings());
-
-        setProviderMetaData(jmsConnFactory.createConnection().getMetaData(), getJmsClientProperties());
-
-        // Create performance sampler
-        PerformanceReportWriter writer = createPerfWriter();
-        tpSampler.setPerfReportWriter(writer);
-        cpuSampler.setPerfReportWriter(writer);
-
-        writer.openReportWriter();
-        writer.writeProperties("jvmSettings", System.getProperties());
-        writer.writeProperties("testSystemSettings", ReflectionUtil.retrieveObjectProperties(getSysTest()));
-        writer.writeProperties("jmsFactorySettings", ReflectionUtil.retrieveObjectProperties(jmsConnFactory));
-        writer.writeProperties("jmsClientSettings", ReflectionUtil.retrieveObjectProperties(getJmsClientProperties()));
-        writer.writeProperties("tpSamplerSettings", ReflectionUtil.retrieveObjectProperties(tpSampler));
-        writer.writeProperties("cpuSamplerSettings", ReflectionUtil.retrieveObjectProperties(cpuSampler));
-
-        clientThreadGroup = new ThreadGroup(getSysTest().getClientPrefix() + " Thread Group");
-        for (int i = 0; i < getSysTest().getNumClients(); i++) {
-            distributeDestinations(getSysTest().getDestDistro(), i, getSysTest().getNumClients(), getSysTest().getTotalDests());
-
-            final String clientName = getSysTest().getClientPrefix() + i;
-            final int clientDestIndex = this.clientDestIndex;
-            final int clientDestCount = this.clientDestCount;
-            Thread t = new Thread(clientThreadGroup, new Runnable() {
-                public void run() {
-                    runJmsClient(clientName, clientDestIndex, clientDestCount);
-                }
-            });
-            t.setName(getSysTest().getClientPrefix() + i + " Thread");
-            t.start();
-        }
-
-        // Run samplers
-        if (getSysTest().getSamplers().indexOf(JmsClientSystemProperties.SAMPLER_TP) > -1) {
-            tpSampler.startSampler();
-        }
-
-        if (getSysTest().getSamplers().indexOf(JmsClientSystemProperties.SAMPLER_CPU) > -1) {
-            try {
-                cpuSampler.createPlugin();
-                cpuSampler.startSampler();
-            } catch (IOException e) {
-                LOG.warn("Unable to start CPU sampler plugin. Reason: " + e.getMessage());
-            }
-        }
-
-        tpSampler.waitUntilDone();
-        cpuSampler.waitUntilDone();
-
-        writer.closeReportWriter();
-    }
-
-    public ThroughputSamplerTask getTpSampler() {
-        return tpSampler;
-    }
-
-    public void setTpSampler(ThroughputSamplerTask tpSampler) {
-        this.tpSampler = tpSampler;
-    }
-
-    public CpuSamplerTask getCpuSampler() {
-        return cpuSampler;
-    }
-
-    public void setCpuSampler(CpuSamplerTask cpuSampler) {
-        this.cpuSampler = cpuSampler;
-    }
-
-    public JmsFactoryProperties getFactory() {
-        return factory;
-    }
-
-    public void setFactory(JmsFactoryProperties factory) {
-        this.factory = factory;
-    }
-
-    public abstract JmsClientSystemProperties getSysTest();
-
-    public abstract void setSysTest(JmsClientSystemProperties sysTestProps);
-
-    public abstract JmsClientProperties getJmsClientProperties();
-
-    protected PerformanceReportWriter createPerfWriter() {
-        if (getSysTest().getReportType().equalsIgnoreCase(JmsClientSystemProperties.REPORT_XML_FILE)) {
-            String reportName;
-
-            if ((reportName = getSysTest().getReportName()) == null) {
-                reportName = getSysTest().getClientPrefix() + "_" + "numClients" + getSysTest().getNumClients() + "_" + "numDests" + getSysTest().getTotalDests() + "_" + getSysTest().getDestDistro();
-            }
-            return new XmlFilePerfReportWriter(getSysTest().getReportDir(), reportName);
-        } else if (getSysTest().getReportType().equalsIgnoreCase(JmsClientSystemProperties.REPORT_VERBOSE)) {
-            return new VerbosePerfReportWriter();
-        } else {
-            // Use verbose if unknown report type
-            return new VerbosePerfReportWriter();
-        }
-    }
-
-    protected void distributeDestinations(String distroType, int clientIndex, int numClients, int numDests) {
-        if (distroType.equalsIgnoreCase(JmsClientSystemProperties.DEST_DISTRO_ALL)) {
-            clientDestCount = numDests;
-            clientDestIndex = 0;
-        } else if (distroType.equalsIgnoreCase(JmsClientSystemProperties.DEST_DISTRO_EQUAL)) {
-            int destPerClient = numDests / numClients;
-            // There are equal or more destinations per client
-            if (destPerClient > 0) {
-                clientDestCount = destPerClient;
-                clientDestIndex = destPerClient * clientIndex;
-                // If there are more clients than destinations, share
-                // destinations per client
-            } else {
-                clientDestCount = 1; // At most one destination per client
-                clientDestIndex = clientIndex % numDests;
-            }
-        } else if (distroType.equalsIgnoreCase(JmsClientSystemProperties.DEST_DISTRO_DIVIDE)) {
-            int destPerClient = numDests / numClients;
-            // There are equal or more destinations per client
-            if (destPerClient > 0) {
-                int remain = numDests % numClients;
-                int nextIndex;
-                if (clientIndex < remain) {
-                    destPerClient++;
-                    nextIndex = clientIndex * destPerClient;
-                } else {
-                    nextIndex = (clientIndex * destPerClient) + remain;
-                }
-
-                clientDestCount = destPerClient;
-                clientDestIndex = nextIndex;
-
-                // If there are more clients than destinations, share
-                // destinations per client
-            } else {
-                clientDestCount = 1; // At most one destination per client
-                clientDestIndex = clientIndex % numDests;
-            }
-
-            // Send to all for unknown behavior
-        } else {
-            LOG.warn("Unknown destination distribution type: " + distroType);
-            clientDestCount = numDests;
-            clientDestIndex = 0;
-        }
-    }
-
-    protected ConnectionFactory loadJmsFactory(String spiClass, Properties factorySettings) throws JMSException {
-        try {
-            Class spi = Class.forName(spiClass);
-            SPIConnectionFactory spiFactory = (SPIConnectionFactory)spi.newInstance();
-            ConnectionFactory jmsFactory = spiFactory.createConnectionFactory(factorySettings);
-            LOG.info("Created: " + jmsFactory.getClass().getName() + " using SPIConnectionFactory: " + spiFactory.getClass().getName());
-            return jmsFactory;
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new JMSException(e.getMessage());
-        }
-    }
-
-    protected void setProviderMetaData(ConnectionMetaData metaData, JmsClientProperties props) throws JMSException {
-        props.setJmsProvider(metaData.getJMSProviderName() + "-" + metaData.getProviderVersion());
-        props.setJmsVersion(metaData.getJMSVersion());
-
-        String jmsProperties = "";
-        Enumeration jmsProps = metaData.getJMSXPropertyNames();
-        while (jmsProps.hasMoreElements()) {
-            jmsProperties += jmsProps.nextElement().toString() + ",";
-        }
-        if (jmsProperties.length() > 0) {
-            // Remove the last comma
-            jmsProperties = jmsProperties.substring(0, jmsProperties.length() - 1);
-        }
-        props.setJmsProperties(jmsProperties);
-    }
-
-    protected abstract void runJmsClient(String clientName, int clientDestIndex, int clientDestCount);
-
-    protected static Properties parseStringArgs(String[] args) {
-        File configFile = null;
-        Properties props = new Properties();
-
-        if (args == null || args.length == 0) {
-            return props; // Empty properties
-        }
-
-        for (int i = 0; i < args.length; i++) {
-            String arg = args[i];
-            if (arg.startsWith("-D") || arg.startsWith("-d")) {
-                arg = arg.substring(2);
-            }
-            int index = arg.indexOf("=");
-            String key = arg.substring(0, index);
-            String val = arg.substring(index + 1);
-
-            if (key.equalsIgnoreCase("sysTest.propsConfigFile")) {
-                if (!val.endsWith(".properties")) {
-                    val += ".properties";
-                }
-                configFile = new File(val);
-            }
-            props.setProperty(key, val);
-        }
-
-        Properties fileProps = new Properties();
-        try {
-            if (configFile != null) {
-                LOG.info("Loading properties file: " + configFile.getAbsolutePath());
-                fileProps.load(new FileInputStream(configFile));
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        // Overwrite file settings with command line settings
-        fileProps.putAll(props);
-        return fileProps;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java
deleted file mode 100644
index a9d5598..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.tool;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.activemq.tool.sampler.MeasurableClient;
-
-public abstract class AbstractJmsMeasurableClient extends AbstractJmsClient implements MeasurableClient {
-    protected AtomicLong throughput = new AtomicLong(0);
-
-    public AbstractJmsMeasurableClient(ConnectionFactory factory) {
-        super(factory);
-    }
-
-    public void reset() {
-        setThroughput(0);
-    }
-
-    public long getThroughput() {
-        return throughput.get();
-    }
-
-    public void setThroughput(long val) {
-        throughput.set(val);
-    }
-
-    public void incThroughput() {
-        throughput.incrementAndGet();
-    }
-
-    public void incThroughput(long val) {
-        throughput.addAndGet(val);
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
deleted file mode 100644
index 9036be3..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/**
- * 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.tool;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Topic;
-
-import org.apache.activemq.tool.properties.JmsClientProperties;
-import org.apache.activemq.tool.properties.JmsConsumerProperties;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JmsConsumerClient extends AbstractJmsMeasurableClient {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsConsumerClient.class);
-
-    protected MessageConsumer jmsConsumer;
-    protected JmsConsumerProperties client;
-
-    public JmsConsumerClient(ConnectionFactory factory) {
-        this(new JmsConsumerProperties(), factory);
-    }
-
-    public JmsConsumerClient(JmsConsumerProperties clientProps, ConnectionFactory factory) {
-        super(factory);
-        client = clientProps;
-    }
-
-    public void receiveMessages() throws JMSException {
-        if (client.isAsyncRecv()) {
-            if (client.getRecvType().equalsIgnoreCase(JmsConsumerProperties.TIME_BASED_RECEIVING)) {
-                receiveAsyncTimeBasedMessages(client.getRecvDuration());
-            } else {
-                receiveAsyncCountBasedMessages(client.getRecvCount());
-            }
-        } else {
-            if (client.getRecvType().equalsIgnoreCase(JmsConsumerProperties.TIME_BASED_RECEIVING)) {
-                receiveSyncTimeBasedMessages(client.getRecvDuration());
-            } else {
-                receiveSyncCountBasedMessages(client.getRecvCount());
-            }
-        }
-    }
-
-    public void receiveMessages(int destCount) throws JMSException {
-        this.destCount = destCount;
-        receiveMessages();
-    }
-
-    public void receiveMessages(int destIndex, int destCount) throws JMSException {
-        this.destIndex = destIndex;
-        receiveMessages(destCount);
-    }
-
-    public void receiveSyncTimeBasedMessages(long duration) throws JMSException {
-        if (getJmsConsumer() == null) {
-            createJmsConsumer();
-        }
-
-        try {
-            getConnection().start();
-
-            LOG.info("Starting to synchronously receive messages for " + duration + " ms...");
-            long endTime = System.currentTimeMillis() + duration;
-            while (System.currentTimeMillis() < endTime) {
-                getJmsConsumer().receive();
-                incThroughput();
-                sleep();
-            }
-        } finally {
-            if (client.isDurable() && client.isUnsubscribe()) {
-                LOG.info("Unsubscribing durable subscriber: " + getClientName());
-                getJmsConsumer().close();
-                getSession().unsubscribe(getClientName());
-            }
-            getConnection().close();
-        }
-    }
-
-    public void receiveSyncCountBasedMessages(long count) throws JMSException {
-        if (getJmsConsumer() == null) {
-            createJmsConsumer();
-        }
-
-        try {
-            getConnection().start();
-            LOG.info("Starting to synchronously receive " + count + " messages...");
-
-            int recvCount = 0;
-            while (recvCount < count) {
-                getJmsConsumer().receive();
-                incThroughput();
-                recvCount++;
-                sleep();
-            }
-        } finally {
-            if (client.isDurable() && client.isUnsubscribe()) {
-                LOG.info("Unsubscribing durable subscriber: " + getClientName());
-                getJmsConsumer().close();
-                getSession().unsubscribe(getClientName());
-            }
-            getConnection().close();
-        }
-    }
-
-    public void receiveAsyncTimeBasedMessages(long duration) throws JMSException {
-        if (getJmsConsumer() == null) {
-            createJmsConsumer();
-        }
-
-        getJmsConsumer().setMessageListener(new MessageListener() {
-            public void onMessage(Message msg) {
-                incThroughput();
-                sleep();
-            }
-        });
-
-        try {
-            getConnection().start();
-            LOG.info("Starting to asynchronously receive messages for " + duration + " ms...");
-            try {
-                Thread.sleep(duration);
-            } catch (InterruptedException e) {
-                throw new JMSException("JMS consumer thread sleep has been interrupted. Message: " + e.getMessage());
-            }
-        } finally {
-            if (client.isDurable() && client.isUnsubscribe()) {
-                LOG.info("Unsubscribing durable subscriber: " + getClientName());
-                getJmsConsumer().close();
-                getSession().unsubscribe(getClientName());
-            }
-            getConnection().close();
-        }
-    }
-
-    public void receiveAsyncCountBasedMessages(long count) throws JMSException {
-        if (getJmsConsumer() == null) {
-            createJmsConsumer();
-        }
-
-        final AtomicInteger recvCount = new AtomicInteger(0);
-        getJmsConsumer().setMessageListener(new MessageListener() {
-            public void onMessage(Message msg) {
-                incThroughput();
-                recvCount.incrementAndGet();
-                synchronized (recvCount) {
-                    recvCount.notify();
-                }
-            }
-        });
-
-        try {
-            getConnection().start();
-            LOG.info("Starting to asynchronously receive " + client.getRecvCount() + " messages...");
-            try {
-                while (recvCount.get() < count) {
-                    synchronized (recvCount) {
-                        recvCount.wait();
-                    }
-                }
-            } catch (InterruptedException e) {
-                throw new JMSException("JMS consumer thread wait has been interrupted. Message: " + e.getMessage());
-            }
-        } finally {
-            if (client.isDurable() && client.isUnsubscribe()) {
-                LOG.info("Unsubscribing durable subscriber: " + getClientName());
-                getJmsConsumer().close();
-                getSession().unsubscribe(getClientName());
-            }
-            getConnection().close();
-        }
-    }
-
-    public MessageConsumer createJmsConsumer() throws JMSException {
-        Destination[] dest = createDestination(destIndex, destCount);
-        return createJmsConsumer(dest[0]);
-    }
-
-    public MessageConsumer createJmsConsumer(Destination dest) throws JMSException {
-        if (client.isDurable()) {
-            String clientName = getClientName();
-            if (clientName == null) {
-                clientName = "JmsConsumer";
-                setClientName(clientName);
-            }
-            LOG.info("Creating durable subscriber (" + clientName + ") to: " + dest.toString());
-            jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName);
-        } else {
-            LOG.info("Creating non-durable consumer to: " + dest.toString());
-            jmsConsumer = getSession().createConsumer(dest);
-        }
-        return jmsConsumer;
-    }
-
-    public MessageConsumer createJmsConsumer(Destination dest, String selector, boolean noLocal) throws JMSException {
-        if (client.isDurable()) {
-            String clientName = getClientName();
-            if (clientName == null) {
-                clientName = "JmsConsumer";
-                setClientName(clientName);
-            }
-            LOG.info("Creating durable subscriber (" + clientName + ") to: " + dest.toString());
-            jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName, selector, noLocal);
-        } else {
-            LOG.info("Creating non-durable consumer to: " + dest.toString());
-            jmsConsumer = getSession().createConsumer(dest, selector, noLocal);
-        }
-        return jmsConsumer;
-    }
-
-    public MessageConsumer getJmsConsumer() {
-        return jmsConsumer;
-    }
-
-    public JmsClientProperties getClient() {
-        return client;
-    }
-
-    public void setClient(JmsClientProperties clientProps) {
-        client = (JmsConsumerProperties)clientProps;
-    }
-    
-    protected void sleep() {
-        if (client.getRecvDelay() > 0) {
-        	try {
-        		LOG.trace("Sleeping for " + client.getRecvDelay() + " milliseconds");
-        		Thread.sleep(client.getRecvDelay());
-        	} catch (java.lang.InterruptedException ex) {
-        		LOG.warn(ex.getMessage());
-        	}
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
deleted file mode 100644
index 640d52f..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.tool;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.tool.properties.JmsClientProperties;
-import org.apache.activemq.tool.properties.JmsClientSystemProperties;
-import org.apache.activemq.tool.properties.JmsConsumerProperties;
-import org.apache.activemq.tool.properties.JmsConsumerSystemProperties;
-import org.apache.activemq.tool.sampler.ThroughputSamplerTask;
-
-public class JmsConsumerSystem extends AbstractJmsClientSystem {
-    protected JmsConsumerSystemProperties sysTest = new JmsConsumerSystemProperties();
-    protected JmsConsumerProperties consumer = new JmsConsumerProperties();
-
-    public JmsClientSystemProperties getSysTest() {
-        return sysTest;
-    }
-
-    public void setSysTest(JmsClientSystemProperties sysTestProps) {
-        sysTest = (JmsConsumerSystemProperties)sysTestProps;
-    }
-
-    public JmsClientProperties getJmsClientProperties() {
-        return getConsumer();
-    }
-
-    public JmsConsumerProperties getConsumer() {
-        return consumer;
-    }
-
-    public void setConsumer(JmsConsumerProperties consumer) {
-        this.consumer = consumer;
-    }
-
-    protected void runJmsClient(String clientName, int clientDestIndex, int clientDestCount) {
-        ThroughputSamplerTask sampler = getTpSampler();
-
-        JmsConsumerClient consumerClient = new JmsConsumerClient(consumer, jmsConnFactory);
-        consumerClient.setClientName(clientName);
-
-        if (sampler != null) {
-            sampler.registerClient(consumerClient);
-        }
-
-        try {
-            consumerClient.receiveMessages(clientDestIndex, clientDestCount);
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public static void main(String[] args) {
-        JmsConsumerSystem sys = new JmsConsumerSystem();
-        sys.configureProperties(AbstractJmsClientSystem.parseStringArgs(args));
-
-        try {
-            sys.runSystemTest();
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java
deleted file mode 100644
index 9694a26..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- * 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.tool;
-
-import java.util.Arrays;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-
-import org.apache.activemq.tool.properties.JmsClientProperties;
-import org.apache.activemq.tool.properties.JmsProducerProperties;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JmsProducerClient extends AbstractJmsMeasurableClient {
-    private static final Logger LOG = LoggerFactory.getLogger(JmsProducerClient.class);
-
-    protected JmsProducerProperties client;
-    protected MessageProducer jmsProducer;
-    protected TextMessage jmsTextMessage;
-
-    public JmsProducerClient(ConnectionFactory factory) {
-        this(new JmsProducerProperties(), factory);
-    }
-
-    public JmsProducerClient(JmsProducerProperties clientProps, ConnectionFactory factory) {
-        super(factory);
-        this.client = clientProps;
-    }
-
-    public void sendMessages() throws JMSException {
-        // Send a specific number of messages
-        if (client.getSendType().equalsIgnoreCase(JmsProducerProperties.COUNT_BASED_SENDING)) {
-            sendCountBasedMessages(client.getSendCount());
-
-        // Send messages for a specific duration
-        } else {
-            sendTimeBasedMessages(client.getSendDuration());
-        }
-    }
-
-    public void sendMessages(int destCount) throws JMSException {
-        this.destCount = destCount;
-        sendMessages();
-    }
-
-    public void sendMessages(int destIndex, int destCount) throws JMSException {
-        this.destIndex = destIndex;
-        sendMessages(destCount);
-    }
-
-    public void sendCountBasedMessages(long messageCount) throws JMSException {
-        // Parse through different ways to send messages
-        // Avoided putting the condition inside the loop to prevent effect on performance
-        Destination[] dest = createDestination(destIndex, destCount);
-
-        // Create a producer, if none is created.
-        if (getJmsProducer() == null) {
-            if (dest.length == 1) {
-                createJmsProducer(dest[0]);
-            } else {
-                createJmsProducer();
-            }
-        }
-        try {
-            getConnection().start();
-            LOG.info("Starting to publish " + client.getMessageSize() + " byte(s) of " + messageCount + " messages...");
-
-            // Send one type of message only, avoiding the creation of different messages on sending
-            if (!client.isCreateNewMsg()) {
-                // Create only a single message
-                createJmsTextMessage();
-
-                // Send to more than one actual destination
-                if (dest.length > 1) {
-                    for (int i = 0; i < messageCount; i++) {
-                        for (int j = 0; j < dest.length; j++) {
-                            getJmsProducer().send(dest[j], getJmsTextMessage());
-                            incThroughput();
-                            sleep();
-                        }
-                    }
-                    // Send to only one actual destination
-                } else {
-                    for (int i = 0; i < messageCount; i++) {
-                        getJmsProducer().send(getJmsTextMessage());
-                        incThroughput();
-                        sleep();
-                    }
-                }
-
-                // Send different type of messages using indexing to identify each one.
-                // Message size will vary. Definitely slower, since messages properties
-                // will be set individually each send.
-            } else {
-                // Send to more than one actual destination
-                if (dest.length > 1) {
-                    for (int i = 0; i < messageCount; i++) {
-                        for (int j = 0; j < dest.length; j++) {
-                            getJmsProducer().send(dest[j], createJmsTextMessage("Text Message [" + i + "]"));
-                            incThroughput();
-                            sleep();
-                        }
-                    }
-
-                    // Send to only one actual destination
-                } else {
-                    for (int i = 0; i < messageCount; i++) {
-                        getJmsProducer().send(createJmsTextMessage("Text Message [" + i + "]"));
-                        incThroughput();
-                        sleep();
-                    }
-                }
-            }
-        } finally {
-            getConnection().close();
-        }
-    }
-
-    public void sendTimeBasedMessages(long duration) throws JMSException {
-        long endTime = System.currentTimeMillis() + duration;
-        // Parse through different ways to send messages
-        // Avoided putting the condition inside the loop to prevent effect on performance
-
-        Destination[] dest = createDestination(destIndex, destCount);
-
-        // Create a producer, if none is created.
-        if (getJmsProducer() == null) {
-            if (dest.length == 1) {
-                createJmsProducer(dest[0]);
-            } else {
-                createJmsProducer();
-            }
-        }
-
-        try {
-            getConnection().start();
-            LOG.info("Starting to publish " + client.getMessageSize() + " byte(s) messages for " + duration + " ms");
-
-            // Send one type of message only, avoiding the creation of different messages on sending
-            if (!client.isCreateNewMsg()) {
-                // Create only a single message
-                createJmsTextMessage();
-
-                // Send to more than one actual destination
-                if (dest.length > 1) {
-                    while (System.currentTimeMillis() < endTime) {
-                        for (int j = 0; j < dest.length; j++) {
-                            getJmsProducer().send(dest[j], getJmsTextMessage());
-                            incThroughput();
-                            sleep();
-                        }
-                    }
-                    // Send to only one actual destination
-                } else {
-                    while (System.currentTimeMillis() < endTime) {
-                        getJmsProducer().send(getJmsTextMessage());
-                        incThroughput();
-                        sleep();
-                    }
-                }
-
-                // Send different type of messages using indexing to identify each one.
-                // Message size will vary. Definitely slower, since messages properties
-                // will be set individually each send.
-            } else {
-                // Send to more than one actual destination
-                long count = 1;
-                if (dest.length > 1) {
-                    while (System.currentTimeMillis() < endTime) {
-                        for (int j = 0; j < dest.length; j++) {
-                            getJmsProducer().send(dest[j], createJmsTextMessage("Text Message [" + count++ + "]"));
-                            incThroughput();
-                            sleep();
-                        }
-                    }
-
-                    // Send to only one actual destination
-                } else {
-                    while (System.currentTimeMillis() < endTime) {
-
-                        getJmsProducer().send(createJmsTextMessage("Text Message [" + count++ + "]"));
-                        incThroughput();
-                        sleep();
-                    }
-                }
-            }
-        } finally {
-            getConnection().close();
-        }
-    }
-
-    public MessageProducer createJmsProducer() throws JMSException {
-        jmsProducer = getSession().createProducer(null);
-        if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_PERSISTENT)) {
-            LOG.info("Creating producer to possible multiple destinations with persistent delivery.");
-            jmsProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        } else if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_NON_PERSISTENT)) {
-            LOG.info("Creating producer to possible multiple destinations with non-persistent delivery.");
-            jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        } else {
-            LOG.warn("Unknown deliveryMode value. Defaulting to non-persistent.");
-            jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        }
-        return jmsProducer;
-    }
-
-    public MessageProducer createJmsProducer(Destination dest) throws JMSException {
-        jmsProducer = getSession().createProducer(dest);
-        if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_PERSISTENT)) {
-            LOG.info("Creating producer to: " + dest.toString() + " with persistent delivery.");
-            jmsProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
-        } else if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_NON_PERSISTENT)) {
-            LOG.info("Creating  producer to: " + dest.toString() + " with non-persistent delivery.");
-            jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        } else {
-            LOG.warn("Unknown deliveryMode value. Defaulting to non-persistent.");
-            jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        }
-        return jmsProducer;
-    }
-
-    public MessageProducer getJmsProducer() {
-        return jmsProducer;
-    }
-
-    public TextMessage createJmsTextMessage() throws JMSException {
-        return createJmsTextMessage(client.getMessageSize());
-    }
-
-    public TextMessage createJmsTextMessage(int size) throws JMSException {
-        jmsTextMessage = getSession().createTextMessage(buildText("", size));
-        return jmsTextMessage;
-    }
-
-    public TextMessage createJmsTextMessage(String text) throws JMSException {
-        jmsTextMessage = getSession().createTextMessage(buildText(text, client.getMessageSize()));
-        return jmsTextMessage;
-    }
-
-    public TextMessage getJmsTextMessage() {
-        return jmsTextMessage;
-    }
-
-    public JmsClientProperties getClient() {
-        return client;
-    }
-
-    public void setClient(JmsClientProperties clientProps) {
-        client = (JmsProducerProperties)clientProps;
-    }
-
-    protected String buildText(String text, int size) {
-        byte[] data = new byte[size - text.length()];
-        Arrays.fill(data, (byte) 0);
-        return text + new String(data);
-    }
-    
-    protected void sleep() {
-        if (client.getSendDelay() > 0) {
-        	try {
-        		LOG.trace("Sleeping for " + client.getSendDelay() + " milliseconds");
-        		Thread.sleep(client.getSendDelay());
-        	} catch (java.lang.InterruptedException ex) {
-        		LOG.warn(ex.getMessage());
-        	}
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java
deleted file mode 100644
index f501270..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.tool;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.tool.properties.JmsClientProperties;
-import org.apache.activemq.tool.properties.JmsClientSystemProperties;
-import org.apache.activemq.tool.properties.JmsProducerProperties;
-import org.apache.activemq.tool.properties.JmsProducerSystemProperties;
-import org.apache.activemq.tool.sampler.ThroughputSamplerTask;
-
-public class JmsProducerSystem extends AbstractJmsClientSystem {
-    protected JmsProducerSystemProperties sysTest = new JmsProducerSystemProperties();
-    protected JmsProducerProperties producer = new JmsProducerProperties();
-
-    public JmsClientSystemProperties getSysTest() {
-        return sysTest;
-    }
-
-    public void setSysTest(JmsClientSystemProperties sysTestProps) {
-        sysTest = (JmsProducerSystemProperties)sysTestProps;
-    }
-
-    public JmsClientProperties getJmsClientProperties() {
-        return getProducer();
-    }
-
-    public JmsProducerProperties getProducer() {
-        return producer;
-    }
-
-    public void setProducer(JmsProducerProperties producer) {
-        this.producer = producer;
-    }
-
-    protected void runJmsClient(String clientName, int clientDestIndex, int clientDestCount) {
-        ThroughputSamplerTask sampler = getTpSampler();
-
-        JmsProducerClient producerClient = new JmsProducerClient(producer, jmsConnFactory);
-        producerClient.setClientName(clientName);
-
-        if (sampler != null) {
-            sampler.registerClient(producerClient);
-        }
-
-        try {
-            producerClient.sendMessages(clientDestIndex, clientDestCount);
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public static void main(String[] args) {
-        JmsProducerSystem sys = new JmsProducerSystem();
-        sys.configureProperties(AbstractJmsClientSystem.parseStringArgs(args));
-
-        try {
-            sys.runSystemTest();
-        } catch (JMSException e) {
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/AbstractObjectProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/AbstractObjectProperties.java
deleted file mode 100644
index b5d3265..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/AbstractObjectProperties.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.tool.properties;
-
-import java.util.Properties;
-
-public abstract class AbstractObjectProperties implements ReflectionConfigurable {
-
-    public void configureProperties(Properties props) {
-        ReflectionUtil.configureClass(this, props);
-    }
-
-    public Properties retrieveProperties(Properties props) {
-        return null;
-    }
-
-    public boolean acceptConfig(String key, String val) {
-        return true; // accept by default
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java
deleted file mode 100644
index 8c7dc12..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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.tool.properties;
-
-public class JmsClientProperties extends AbstractObjectProperties {
-    public static final String SESSION_AUTO_ACKNOWLEDGE = "autoAck";
-    public static final String SESSION_CLIENT_ACKNOWLEDGE = "clientAck";
-    public static final String SESSION_DUPS_OK_ACKNOWLEDGE = "dupsAck";
-    public static final String SESSION_TRANSACTED = "transacted";
-
-    protected String destName = "TEST.FOO";
-    protected boolean destComposite;
-
-    protected String sessAckMode = SESSION_AUTO_ACKNOWLEDGE;
-    protected boolean sessTransacted;
-
-    protected String jmsProvider;
-    protected String jmsVersion;
-    protected String jmsProperties;
-
-    public String getDestName() {
-        return destName;
-    }
-
-    public void setDestName(String destName) {
-        this.destName = destName;
-    }
-
-    public boolean isDestComposite() {
-        return destComposite;
-    }
-
-    public void setDestComposite(boolean destComposite) {
-        this.destComposite = destComposite;
-    }
-
-    public String getSessAckMode() {
-        return sessAckMode;
-    }
-
-    public void setSessAckMode(String sessAckMode) {
-        this.sessAckMode = sessAckMode;
-    }
-
-    public boolean isSessTransacted() {
-        return sessTransacted;
-    }
-
-    public void setSessTransacted(boolean sessTransacted) {
-        this.sessTransacted = sessTransacted;
-    }
-
-    public String getJmsProvider() {
-        return jmsProvider;
-    }
-
-    public void setJmsProvider(String jmsProvider) {
-        this.jmsProvider = jmsProvider;
-    }
-
-    public String getJmsVersion() {
-        return jmsVersion;
-    }
-
-    public void setJmsVersion(String jmsVersion) {
-        this.jmsVersion = jmsVersion;
-    }
-
-    public String getJmsProperties() {
-        return jmsProperties;
-    }
-
-    public void setJmsProperties(String jmsProperties) {
-        this.jmsProperties = jmsProperties;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientSystemProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientSystemProperties.java
deleted file mode 100644
index 091b283..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientSystemProperties.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * 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.tool.properties;
-
-import java.io.File;
-
-public class JmsClientSystemProperties extends AbstractObjectProperties {
-    public static final String DEST_DISTRO_ALL    = "all";    // Each client will send/receive to all destination;
-    public static final String DEST_DISTRO_EQUAL  = "equal";  // Equally divide the number of destinations to the number of clients
-    public static final String DEST_DISTRO_DIVIDE = "divide"; // Divide the destination among the clients, even if some have more destination than others
-
-    public static final String REPORT_VERBOSE  = "verbose"; // Report would be generated to the console
-    public static final String REPORT_XML_FILE = "xml"; // Report would be generated to an xml file
-
-    public static final String SAMPLER_TP  = "tp";
-    public static final String SAMPLER_CPU = "cpu";
-
-    protected File propsConfigFile;
-
-    protected String reportType = REPORT_XML_FILE;
-    protected String reportDir  = "./";
-    protected String reportName;
-
-    protected String samplers = SAMPLER_TP + "," + SAMPLER_CPU; // Start both samplers
-
-    protected String spiClass = "org.apache.activemq.tool.spi.ActiveMQReflectionSPI";
-    protected String clientPrefix = "JmsClient";
-    protected int numClients = 1;
-    protected int totalDests = 1;
-    protected String destDistro = DEST_DISTRO_ALL;
-
-    public String getReportType() {
-        return reportType;
-    }
-
-    public void setReportType(String reportType) {
-        this.reportType = reportType;
-    }
-
-    public String getReportDir() {
-        return reportDir;
-    }
-
-    public void setReportDir(String reportDir) {
-        this.reportDir = reportDir;
-    }
-
-    public String getReportName() {
-        return reportName;
-    }
-
-    public void setReportName(String reportName) {
-        this.reportName = reportName;
-    }
-
-    public String getSamplers() {
-        return samplers;
-    }
-
-    public void setSamplers(String samplers) {
-        this.samplers = samplers;
-    }
-
-    public String getSpiClass() {
-        return spiClass;
-    }
-
-    public void setSpiClass(String spiClass) {
-        this.spiClass = spiClass;
-    }
-
-    public String getClientPrefix() {
-        return clientPrefix;
-    }
-
-    public void setClientPrefix(String clientPrefix) {
-        this.clientPrefix = clientPrefix;
-    }
-
-    public int getNumClients() {
-        return numClients;
-    }
-
-    public void setNumClients(int numClients) {
-        this.numClients = numClients;
-    }
-
-    public int getTotalDests() {
-        return totalDests;
-    }
-
-    public void setTotalDests(int totalDests) {
-        this.totalDests = totalDests;
-    }
-
-    public String getDestDistro() {
-        return destDistro;
-    }
-
-    public void setDestDistro(String destDistro) {
-        this.destDistro = destDistro;
-    }
-
-    public String getPropsConfigFile() {
-        return this.propsConfigFile + "";
-    }
-
-    public void setPropsConfigFile(String propsConfigFile) {
-        this.propsConfigFile = new File(propsConfigFile);
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerProperties.java
deleted file mode 100644
index b51e252..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerProperties.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.tool.properties;
-
-public class JmsConsumerProperties extends JmsClientProperties {
-    public static final String TIME_BASED_RECEIVING = "time"; // Receive messages on a time-based interval
-    public static final String COUNT_BASED_RECEIVING = "count"; // Receive a specific count of messages
-
-    protected boolean durable; // Consumer is a durable subscriber
-    protected boolean unsubscribe = true; // If true, unsubscribe a durable subscriber after it finishes running
-    protected boolean asyncRecv = true;  // If true, use onMessage() to receive messages, else use receive()
-
-    protected long recvCount    = 1000000;       // Receive a million messages by default
-    protected long recvDuration = 5 * 60 * 1000; // Receive for 5 mins by default
-    protected long recvDelay = 0; // delay in milliseconds for processing received msg 
-    protected String recvType   = TIME_BASED_RECEIVING;
-
-    public boolean isDurable() {
-        return durable;
-    }
-
-    public void setDurable(boolean durable) {
-        this.durable = durable;
-    }
-
-    public boolean isUnsubscribe() {
-        return unsubscribe;
-    }
-
-    public void setUnsubscribe(boolean unsubscribe) {
-        this.unsubscribe = unsubscribe;
-    }
-
-    public boolean isAsyncRecv() {
-        return asyncRecv;
-    }
-
-    public void setAsyncRecv(boolean asyncRecv) {
-        this.asyncRecv = asyncRecv;
-    }
-
-    public long getRecvCount() {
-        return recvCount;
-    }
-
-    public void setRecvCount(long recvCount) {
-        this.recvCount = recvCount;
-    }
-
-    public long getRecvDuration() {
-        return recvDuration;
-    }
-
-    public void setRecvDuration(long recvDuration) {
-        this.recvDuration = recvDuration;
-    }
-
-    public String getRecvType() {
-        return recvType;
-    }
-
-    public void setRecvType(String recvType) {
-        this.recvType = recvType;
-    }
-    
-    public void setRecvDelay(long delay) {
-    	this.recvDelay = delay;
-    }
-    
-    public long getRecvDelay() {
-    	return this.recvDelay;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerSystemProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerSystemProperties.java
deleted file mode 100644
index 74a2dbc..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerSystemProperties.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.tool.properties;
-
-public class JmsConsumerSystemProperties extends JmsClientSystemProperties {
-    public JmsConsumerSystemProperties() {
-        clientPrefix = "JmsConsumer";
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsFactoryProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsFactoryProperties.java
deleted file mode 100644
index bc820e6..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsFactoryProperties.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.tool.properties;
-
-import java.util.Properties;
-
-public class JmsFactoryProperties extends AbstractObjectProperties {
-    Properties factorySettings = new Properties();
-
-    public boolean acceptConfig(String key, String val) {
-        // Since we do not know the specific properties of each factory,
-        // lets cache it first and give it to the spi later
-        factorySettings.setProperty(key, val);
-        return false;
-    }
-
-    public Properties getFactorySettings() {
-        return factorySettings;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerProperties.java
deleted file mode 100644
index fcb0aea..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerProperties.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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.tool.properties;
-
-public class JmsProducerProperties extends JmsClientProperties {
-    public static final String TIME_BASED_SENDING  = "time"; // Produce messages base on a time interval
-    public static final String COUNT_BASED_SENDING = "count"; // Produce a specific count of messages
-    public static final String DELIVERY_MODE_PERSISTENT     = "persistent"; // Persistent message delivery
-    public static final String DELIVERY_MODE_NON_PERSISTENT = "nonpersistent"; // Non-persistent message delivery
-
-    protected String deliveryMode = DELIVERY_MODE_NON_PERSISTENT; // Message delivery mode
-    protected int messageSize = 1024; // Send 1kb messages by default
-    protected long sendCount  = 1000000; // Send a million messages by default
-    protected long sendDuration = 5 * 60 * 1000; // Send for 5 mins by default
-    protected String sendType = TIME_BASED_SENDING;
-    protected long sendDelay = 0;  // delay in milliseconds between each producer send
-    
-    // If true, create a different message on each send, otherwise reuse.
-    protected boolean createNewMsg; 
-
-    public String getDeliveryMode() {
-        return deliveryMode;
-    }
-
-    public void setDeliveryMode(String deliveryMode) {
-        this.deliveryMode = deliveryMode;
-    }
-
-    public int getMessageSize() {
-        return messageSize;
-    }
-
-    public void setMessageSize(int messageSize) {
-        this.messageSize = messageSize;
-    }
-
-    public long getSendCount() {
-        return sendCount;
-    }
-
-    public void setSendCount(long sendCount) {
-        this.sendCount = sendCount;
-    }
-
-    public long getSendDuration() {
-        return sendDuration;
-    }
-
-    public void setSendDuration(long sendDuration) {
-        this.sendDuration = sendDuration;
-    }
-
-    public String getSendType() {
-        return sendType;
-    }
-
-    public void setSendType(String sendType) {
-        this.sendType = sendType;
-    }
-
-    public boolean isCreateNewMsg() {
-        return createNewMsg;
-    }
-
-    public void setCreateNewMsg(boolean createNewMsg) {
-        this.createNewMsg = createNewMsg;
-    }
-    
-    public void setSendDelay(long delay) {
-    	this.sendDelay = delay;
-    }
-    
-    public long getSendDelay() {
-    	return this.sendDelay;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerSystemProperties.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerSystemProperties.java
deleted file mode 100644
index 58843a3..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerSystemProperties.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.tool.properties;
-
-public class JmsProducerSystemProperties extends JmsClientSystemProperties {
-    public JmsProducerSystemProperties() {
-        clientPrefix = "JmsProducer";
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionConfigurable.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionConfigurable.java
deleted file mode 100644
index 2d62c90..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionConfigurable.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.tool.properties;
-
-import java.util.Properties;
-
-public interface ReflectionConfigurable {
-    void configureProperties(Properties props);
-    Properties retrieveProperties(Properties props);
-    boolean acceptConfig(String key, String val);
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
deleted file mode 100644
index 974ffff..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/**
- * 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.tool.properties;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class ReflectionUtil {
-    private static final Logger LOG = LoggerFactory.getLogger(ReflectionUtil.class);
-
-    private ReflectionUtil() {
-    }
-
-    public static void configureClass(Object obj, String key, String val) {
-        try {
-            String debugInfo;
-
-            Object target = obj;
-            Class targetClass = obj.getClass();
-
-            // DEBUG: Debugging Info
-            debugInfo = "Invoking: " + targetClass.getName();
-
-            StringTokenizer tokenizer = new StringTokenizer(key, ".");
-            String keySubString = key;
-            int tokenCount = tokenizer.countTokens();
-
-            // For nested settings, get the object first. -1, do not count the
-            // last token
-            for (int j = 0; j < tokenCount - 1; j++) {
-                // Find getter method first
-                String name = tokenizer.nextToken();
-
-                // Check if the target object will accept the settings
-                if (target instanceof ReflectionConfigurable && !((ReflectionConfigurable)target).acceptConfig(keySubString, val)) {
-                    return;
-                } else {
-                    // This will reduce the key, so that it will be recognize by
-                    // the next object. i.e.
-                    // Property name: factory.prefetchPolicy.queuePrefetch
-                    // Calling order:
-                    // this.getFactory().prefetchPolicy().queuePrefetch();
-                    // If factory does not accept the config, it should be given
-                    // prefetchPolicy.queuePrefetch as the key
-                    // +1 to account for the '.'
-                    keySubString = keySubString.substring(name.length() + 1);
-                }
-
-                String getMethod = "get" + name.substring(0, 1).toUpperCase() + name.substring(1);
-                Method method = targetClass.getMethod(getMethod, new Class[] {});
-                target = method.invoke(target, null);
-                targetClass = target.getClass();
-
-                debugInfo += "." + getMethod + "()";
-            }
-
-            // Property name
-            String property = tokenizer.nextToken();
-            // Check if the target object will accept the settings
-            if (target instanceof ReflectionConfigurable && !((ReflectionConfigurable)target).acceptConfig(property, val)) {
-                return;
-            }
-
-            // Find setter method
-            Method setterMethod = findSetterMethod(targetClass, property);
-
-            // Get the first parameter type. This assumes that there is only one
-            // parameter.
-            if (setterMethod == null) {
-                throw new IllegalAccessException("Unable to find appropriate setter method signature for property: " + property);
-            }
-            Class paramType = setterMethod.getParameterTypes()[0];
-
-            // Set primitive type
-            debugInfo += "." + setterMethod + "(" + paramType.getName() + ": " + val + ")";
-            if (paramType.isPrimitive()) {
-                if (paramType == Boolean.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        Boolean.valueOf(val)
-                    });
-                } else if (paramType == Integer.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        Integer.valueOf(val)
-                    });
-                } else if (paramType == Long.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        Long.valueOf(val)
-                    });
-                } else if (paramType == Double.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        Double.valueOf(val)
-                    });
-                } else if (paramType == Float.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        Float.valueOf(val)
-                    });
-                } else if (paramType == Short.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        Short.valueOf(val)
-                    });
-                } else if (paramType == Byte.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        Byte.valueOf(val)
-                    });
-                } else if (paramType == Character.TYPE) {
-                    setterMethod.invoke(target, new Object[] {
-                        new Character(val.charAt(0))
-                    });
-                }
-            } else {
-                // Set String type
-                if (paramType == String.class) {
-                    setterMethod.invoke(target, new Object[] {
-                        val
-                    });
-
-                    // For unknown object type, try to create an instance of the
-                    // object using a String constructor
-                } else {
-                    Constructor c = paramType.getConstructor(new Class[] {
-                        String.class
-                    });
-                    Object paramObject = c.newInstance(new Object[] {
-                        val
-                    });
-
-                    setterMethod.invoke(target, new Object[] {
-                        paramObject
-                    });
-                }
-            }
-            LOG.debug(debugInfo);
-
-        } catch (Exception e) {
-            LOG.warn(e.toString());
-        }
-    }
-
-    public static void configureClass(Object obj, Properties props) {
-        for (Iterator i = props.keySet().iterator(); i.hasNext();) {
-            try {
-                String key = (String)i.next();
-                String val = props.getProperty(key);
-
-                configureClass(obj, key, val);
-            } catch (Throwable t) {
-                // Let's catch any exception as this could be cause by the
-                // foreign class
-                t.printStackTrace();
-            }
-        }
-    }
-
-    public static Properties retrieveObjectProperties(Object obj) {
-        Properties props = new Properties();
-        try {
-            props.putAll(retrieveClassProperties("", obj.getClass(), obj));
-        } catch (Exception e) {
-            LOG.warn(e.toString());
-        }
-        return props;
-    }
-
-    protected static Properties retrieveClassProperties(String prefix, Class targetClass, Object targetObject) {
-        if (targetClass == null || targetObject == null) {
-            return new Properties();
-        } else {
-            Properties props = new Properties();
-            Method[] getterMethods = findAllGetterMethods(targetClass);
-            for (int i = 0; i < getterMethods.length; i++) {
-                try {
-                    String propertyName = getPropertyName(getterMethods[i].getName());
-                    Class retType = getterMethods[i].getReturnType();
-
-                    // If primitive or string type, return it
-                    if (retType.isPrimitive() || retType == String.class) {
-                        // Check for an appropriate setter method to consider it
-                        // as a property
-                        if (findSetterMethod(targetClass, propertyName) != null) {
-                            Object val = null;
-                            try {
-                                val = getterMethods[i].invoke(targetObject, null);
-                            } catch (InvocationTargetException e) {
-                                e.printStackTrace();
-                            } catch (IllegalAccessException e) {
-                                e.printStackTrace();
-                            }
-                            props.setProperty(prefix + propertyName, val + "");
-                        }
-                    } else {
-                        try {
-                            Object val = getterMethods[i].invoke(targetObject, null);
-                            if (val != null) {
-                                props.putAll(retrieveClassProperties(propertyName + ".", val.getClass(), val));
-                            }
-                        } catch (InvocationTargetException e) {
-                            e.printStackTrace();
-                        } catch (IllegalAccessException e) {
-                            e.printStackTrace();
-                        }
-                    }
-                } catch (Throwable t) {
-                    // Let's catch any exception, cause this could be cause by
-                    // the foreign class
-                    t.printStackTrace();
-                }
-            }
-            return props;
-        }
-    }
-
-    private static Method findSetterMethod(Class targetClass, String propertyName) {
-        String methodName = "set" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
-
-        Method[] methods = targetClass.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            if (methods[i].getName().equals(methodName) && isSetterMethod(methods[i])) {
-                return methods[i];
-            }
-        }
-        return null;
-    }
-
-    private static Method findGetterMethod(Class targetClass, String propertyName) {
-        String methodName1 = "get" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
-        String methodName2 = "is" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
-
-        Method[] methods = targetClass.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            if ((methods[i].getName().equals(methodName1) || methods[i].getName().equals(methodName2)) && isGetterMethod(methods[i])) {
-                return methods[i];
-            }
-        }
-        return null;
-    }
-
-    private static Method[] findAllGetterMethods(Class targetClass) {
-        List getterMethods = new ArrayList();
-        Method[] methods = targetClass.getMethods();
-
-        for (int i = 0; i < methods.length; i++) {
-            if (isGetterMethod(methods[i])) {
-                getterMethods.add(methods[i]);
-            }
-        }
-
-        return (Method[])getterMethods.toArray(new Method[] {});
-    }
-
-    private static boolean isGetterMethod(Method method) {
-        // Check method signature first
-        // If 'get' method, must return a non-void value
-        // If 'is' method, must return a boolean value
-        // Both must have no parameters
-        // Method must not belong to the Object class to prevent infinite loop
-        return ((method.getName().startsWith("is") && method.getReturnType() == Boolean.TYPE) || (method.getName().startsWith("get") && method.getReturnType() != Void.TYPE))
-               && (method.getParameterTypes().length == 0) && method.getDeclaringClass() != Object.class;
-    }
-
-    private static boolean isSetterMethod(Method method) {
-        // Check method signature first
-        if (method.getName().startsWith("set") && method.getReturnType() == Void.TYPE) {
-            Class[] paramType = method.getParameterTypes();
-            // Check that it can only accept one parameter
-            if (paramType.length == 1) {
-                // Check if parameter is a primitive or can accept a String
-                // parameter
-                if (paramType[0].isPrimitive() || paramType[0] == String.class) {
-                    return true;
-                } else {
-                    // Check if object can accept a string as a constructor
-                    try {
-                        if (paramType[0].getConstructor(new Class[] {
-                            String.class
-                        }) != null) {
-                            return true;
-                        }
-                    } catch (NoSuchMethodException e) {
-                        // Do nothing
-                    }
-                }
-            }
-        }
-        return false;
-    }
-
-    private static String getPropertyName(String methodName) {
-        String name;
-        if (methodName.startsWith("get")) {
-            name = methodName.substring(3);
-        } else if (methodName.startsWith("set")) {
-            name = methodName.substring(3);
-        } else if (methodName.startsWith("is")) {
-            name = methodName.substring(2);
-        } else {
-            name = "";
-        }
-
-        return name.substring(0, 1).toLowerCase() + name.substring(1);
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java
deleted file mode 100644
index d5127e4..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.tool.reports;
-
-import java.util.Map;
-
-import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
-import org.apache.activemq.tool.reports.plugins.ReportPlugin;
-import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
-
-public abstract class AbstractPerfReportWriter implements PerformanceReportWriter {
-
-    public static final int REPORT_PLUGIN_THROUGHPUT = 0;
-    public static final int REPORT_PLUGIN_CPU = 1;
-
-    protected ReportPlugin[] plugins = new ReportPlugin[] {
-        new ThroughputReportPlugin(), new CpuReportPlugin()
-    };
-
-    protected void handleCsvData(int pluginType, String csvData) {
-        plugins[pluginType].handleCsvData(csvData);
-    }
-
-    protected Map getSummary(int pluginType) {
-        return plugins[pluginType].getSummary();
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java
deleted file mode 100644
index 2ebda86..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.tool.reports;
-
-import java.util.Properties;
-
-public interface PerformanceReportWriter {
-    void openReportWriter();
-    void closeReportWriter();
-    void writeInfo(String info);
-    void writeCsvData(int csvType, String csvData);
-    void writeProperties(String header, Properties props);
-    void writeProperties(Properties props);
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java
deleted file mode 100644
index f5a8661..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.tool.reports;
-
-import java.util.Iterator;
-import java.util.List;
-
-public final class PerformanceStatisticsUtil {
-    private PerformanceStatisticsUtil() {
-    }
-
-    public static long getSum(List numList) {
-        long sum = 0;
-        if (numList != null) {
-            for (Iterator i = numList.iterator(); i.hasNext();) {
-                sum += ((Long)i.next()).longValue();
-            }
-        } else {
-            sum = -1;
-        }
-        return sum;
-    }
-
-    public static long getMin(List numList) {
-        long min = Long.MAX_VALUE;
-        if (numList != null) {
-            for (Iterator i = numList.iterator(); i.hasNext();) {
-                min = Math.min(((Long)i.next()).longValue(), min);
-            }
-        } else {
-            min = -1;
-        }
-        return min;
-    }
-
-    public static long getMax(List numList) {
-        long max = Long.MIN_VALUE;
-        if (numList != null) {
-            for (Iterator i = numList.iterator(); i.hasNext();) {
-                max = Math.max(((Long)i.next()).longValue(), max);
-            }
-        } else {
-            max = -1;
-        }
-        return max;
-    }
-
-    public static double getAve(List numList) {
-        double ave;
-        if (numList != null) {
-            int sampleCount = 0;
-            long totalTP = 0;
-            for (Iterator i = numList.iterator(); i.hasNext();) {
-                sampleCount++;
-                totalTP += ((Long)i.next()).longValue();
-            }
-            return (double)totalTP / (double)sampleCount;
-        } else {
-            ave = -1;
-        }
-        return ave;
-    }
-
-    public static double getAveEx(List numList) {
-        double ave;
-        long minTP = getMin(numList);
-        long maxTP = getMax(numList);
-        if (numList != null) {
-            int sampleCount = 0;
-            long totalTP = 0;
-            long sampleTP;
-            for (Iterator i = numList.iterator(); i.hasNext();) {
-                sampleCount++;
-                sampleTP = ((Long)i.next()).longValue();
-                if (sampleTP != minTP && sampleTP != maxTP) {
-                    totalTP += sampleTP;
-                }
-            }
-            return (double)totalTP / (double)sampleCount;
-        } else {
-            ave = -1;
-        }
-        return ave;
-    }
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java
deleted file mode 100644
index f90e58f..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.tool.reports;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
-import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
-
-public class VerbosePerfReportWriter extends AbstractPerfReportWriter {
-
-    public void openReportWriter() {
-        // Do nothing
-    }
-
-    public void closeReportWriter() {
-        writeHeader("Performance Summary");
-        writePerfSummary();
-    }
-
-    public void writeInfo(String info) {
-        System.out.println("[PERF-INFO]: " + info);
-    }
-
-    public void writeCsvData(int csvType, String csvData) {
-        if (csvType == REPORT_PLUGIN_THROUGHPUT) {
-            System.out.println("[PERF-TP]: " + csvData);
-        } else if (csvType == REPORT_PLUGIN_CPU) {
-            System.out.println("[PERF-CPU]: " + csvData);
-        }
-        handleCsvData(csvType, csvData);
-    }
-
-    public void writeProperties(String header, Properties props) {
-        writeHeader(header);
-        writeProperties(props);
-    }
-
-    public void writeProperties(Properties props) {
-        for (Iterator i = props.keySet().iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            String val = props.getProperty(key, "");
-            System.out.println("[PERF-PROP]: " + key + "=" + val);
-        }
-    }
-
-    public void writePerfSummary() {
-
-        Map summary;
-
-        summary = getSummary(REPORT_PLUGIN_THROUGHPUT);
-        if (summary != null && summary.size() > 0) {
-            writeThroughputSummary(summary);
-        }
-
-        summary = getSummary(REPORT_PLUGIN_CPU);
-        if (summary != null && summary.size() > 0) {
-            writeCpuSummary(summary);
-        }
-
-    }
-
-    protected void writeThroughputSummary(Map summary) {
-        writeHeader("SYSTEM THROUGHPUT SUMMARY");
-        System.out.println("[PERF-TP-SUMMARY] System Total Throughput: " + summary.get(ThroughputReportPlugin.KEY_SYS_TOTAL_TP));
-        System.out.println("[PERF-TP-SUMMARY] System Total Clients: " + summary.get(ThroughputReportPlugin.KEY_SYS_TOTAL_CLIENTS));
-        System.out.println("[PERF-TP-SUMMARY] System Average Throughput: " + summary.get(ThroughputReportPlugin.KEY_SYS_AVE_TP));
-        System.out.println("[PERF-TP-SUMMARY] System Average Throughput Excluding Min/Max: " + summary.get(ThroughputReportPlugin.KEY_SYS_AVE_EMM_TP));
-        System.out.println("[PERF-TP-SUMMARY] System Average Client Throughput: " + summary.get(ThroughputReportPlugin.KEY_SYS_AVE_CLIENT_TP));
-        System.out.println("[PERF-TP-SUMMARY] System Average Client Throughput Excluding Min/Max: " + summary.get(ThroughputReportPlugin.KEY_SYS_AVE_CLIENT_EMM_TP));
-        System.out.println("[PERF-TP-SUMMARY] Min Client Throughput Per Sample: " + summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_TP));
-        System.out.println("[PERF-TP-SUMMARY] Max Client Throughput Per Sample: " + summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_TP));
-        System.out.println("[PERF-TP-SUMMARY] Min Client Total Throughput: " + summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_TOTAL_TP));
-        System.out.println("[PERF-TP-SUMMARY] Max Client Total Throughput: " + summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_TOTAL_TP));
-        System.out.println("[PERF-TP-SUMMARY] Min Client Average Throughput: " + summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_TP));
-        System.out.println("[PERF-TP-SUMMARY] Max Client Average Throughput: " + summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_TP));
-        System.out.println("[PERF-TP-SUMMARY] Min Client Average Throughput Excluding Min/Max: " + summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_EMM_TP));
-        System.out.println("[PERF-TP-SUMMARY] Max Client Average Throughput Excluding Min/Max: " + summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_EMM_TP));
-    }
-
-    protected void writeCpuSummary(Map summary) {
-        writeHeader("SYSTEM CPU USAGE SUMMARY");
-        System.out.println("[PERF-CPU-SUMMARY] Total Blocks Received: " + summary.get(CpuReportPlugin.KEY_BLOCK_RECV));
-        System.out.println("[PERF-CPU-SUMMARY] Ave Blocks Received: " + summary.get(CpuReportPlugin.KEY_AVE_BLOCK_RECV));
-
-        System.out.println("[PERF-CPU-SUMMARY] Total Blocks Sent: " + summary.get(CpuReportPlugin.KEY_BLOCK_SENT));
-        System.out.println("[PERF-CPU-SUMMARY] Ave Blocks Sent: " + summary.get(CpuReportPlugin.KEY_AVE_BLOCK_SENT));
-
-        System.out.println("[PERF-CPU-SUMMARY] Total Context Switches: " + summary.get(CpuReportPlugin.KEY_CTX_SWITCH));
-        System.out.println("[PERF-CPU-SUMMARY] Ave Context Switches: " + summary.get(CpuReportPlugin.KEY_AVE_CTX_SWITCH));
-
-        System.out.println("[PERF-CPU-SUMMARY] Total User Time: " + summary.get(CpuReportPlugin.KEY_USER_TIME));
-        System.out.println("[PERF-CPU-SUMMARY] Ave User Time: " + summary.get(CpuReportPlugin.KEY_AVE_USER_TIME));
-
-        System.out.println("[PERF-CPU-SUMMARY] Total System Time: " + summary.get(CpuReportPlugin.KEY_SYS_TIME));
-        System.out.println("[PERF-CPU-SUMMARY] Ave System Time: " + summary.get(CpuReportPlugin.KEY_AVE_SYS_TIME));
-
-        System.out.println("[PERF-CPU-SUMMARY] Total Idle Time: " + summary.get(CpuReportPlugin.KEY_IDLE_TIME));
-        System.out.println("[PERF-CPU-SUMMARY] Ave Idle Time: " + summary.get(CpuReportPlugin.KEY_AVE_IDLE_TIME));
-
-        System.out.println("[PERF-CPU-SUMMARY] Total Wait Time: " + summary.get(CpuReportPlugin.KEY_WAIT_TIME));
-        System.out.println("[PERF-CPU-SUMMARY] Ave Wait Time: " + summary.get(CpuReportPlugin.KEY_AVE_WAIT_TIME));
-    }
-
-    protected void writeHeader(String header) {
-        char[] border = new char[header.length() + 8]; // +8 for spacing
-        Arrays.fill(border, '#');
-        String borderStr = new String(border);
-
-        System.out.println(borderStr);
-        System.out.println("#   " + header + "   #");
-        System.out.println(borderStr);
-    }
-
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java
deleted file mode 100644
index 520153a..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/**
- * 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.tool.reports;
-
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
-import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class XmlFilePerfReportWriter extends AbstractPerfReportWriter {
-
-    private static final Logger LOG = LoggerFactory.getLogger(XmlFilePerfReportWriter.class);
-
-    private File tempLogFile;
-    private PrintWriter tempLogFileWriter;
-
-    private File xmlFile;
-    private PrintWriter xmlFileWriter;
-
-    private String reportDir;
-    private String reportName;
-
-    private Map<String, Properties> testPropsMap;
-    private List<Properties> testPropsList;
-
-    public XmlFilePerfReportWriter() {
-        this("", "PerformanceReport.xml");
-    }
-
-    public XmlFilePerfReportWriter(String reportDir, String reportName) {
-        this.testPropsMap = new HashMap<String, Properties>();
-        this.testPropsList = new ArrayList<Properties>();
-        this.reportDir = reportDir;
-        this.reportName = reportName;
-    }
-
-    public void openReportWriter() {
-        if (tempLogFile == null) {
-            tempLogFile = createTempLogFile();
-        }
-
-        try {
-            // Disable auto-flush and allocate 100kb of buffer
-            tempLogFileWriter = new PrintWriter(new BufferedOutputStream(new FileOutputStream(tempLogFile), 102400), false);
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void closeReportWriter() {
-        // Flush and close log file writer
-        tempLogFileWriter.flush();
-        tempLogFileWriter.close();
-
-        writeToXml();
-    }
-
-    public String getReportDir() {
-        return reportDir;
-    }
-
-    public void setReportDir(String reportDir) {
-        this.reportDir = reportDir;
-    }
-
-    public String getReportName() {
-        return reportName;
-    }
-
-    public void setReportName(String reportName) {
-        this.reportName = reportName;
-    }
-
-    public File getXmlFile() {
-        return xmlFile;
-    }
-
-    public void setXmlFile(File xmlFile) {
-        this.xmlFile = xmlFile;
-    }
-
-    public void writeInfo(String info) {
-        tempLogFileWriter.println("[INFO]" + info);
-    }
-
-    public void writeCsvData(int csvType, String csvData) {
-        if (csvType == REPORT_PLUGIN_THROUGHPUT) {
-            tempLogFileWriter.println("[TP-DATA]" + csvData);
-        } else if (csvType == REPORT_PLUGIN_CPU) {
-            tempLogFileWriter.println("[CPU-DATA]" + csvData);
-        }
-    }
-
-    public void writeProperties(String header, Properties props) {
-        testPropsMap.put(header, props);
-    }
-
-    public void writeProperties(Properties props) {
-        testPropsList.add(props);
-    }
-
-    protected File createTempLogFile() {
-        File f;
-        try {
-            f = File.createTempFile("tmpPL", null);
-        } catch (IOException e) {
-            f = new File("tmpPL" + System.currentTimeMillis() + ".tmp");
-        }
-        f.deleteOnExit();
-        return f;
-    }
-
-    protected File createXmlFile() {
-        String filename = getReportName().endsWith(".xml") ? getReportName() : (getReportName() + ".xml");
-        String path = (getReportDir() == null) ? "" : getReportDir();
-
-        return new File(path + filename);
-    }
-
-    protected void writeToXml() {
-        try {
-            xmlFile = createXmlFile();
-            xmlFileWriter = new PrintWriter(new FileOutputStream(xmlFile));
-            writeXmlHeader();
-            writeXmlTestSettings();
-            writeXmlLogFile();
-            writeXmlPerfSummary();
-            writeXmlFooter();
-            xmlFileWriter.close();
-
-            LOG.info("Created performance report: " + xmlFile.getAbsolutePath());
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    protected void writeXmlHeader() {
-        xmlFileWriter.println("<testResult>");
-    }
-
-    protected void writeXmlFooter() {
-        xmlFileWriter.println("</testResult>");
-    }
-
-    protected void writeXmlTestSettings() {
-        Properties props;
-
-        // Write test settings
-        for (Iterator<String> i = testPropsMap.keySet().iterator(); i.hasNext();) {
-            String key = i.next();
-            props = testPropsMap.get(key);
-            writeMap(key, props);
-        }
-
-        int count = 1;
-        for (Iterator<Properties> i = testPropsList.iterator(); i.hasNext();) {
-            props = i.next();
-            writeMap("settings" + count++, props);
-        }
-    }
-
-    protected void writeXmlLogFile() throws IOException {
-        // Write throughput data
-        xmlFileWriter.println("<property name='performanceData'>");
-        xmlFileWriter.println("<list>");
-
-        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(tempLogFile)));
-        String line;
-        while ((line = reader.readLine()) != null) {
-            if (line.startsWith("[TP-DATA]")) {
-                handleCsvData(REPORT_PLUGIN_THROUGHPUT, line.substring("[TP-DATA]".length()));
-                parsePerfCsvData("tpdata", line.substring("[TP-DATA]".length()));
-            } else if (line.startsWith("[CPU-DATA]")) {
-                handleCsvData(REPORT_PLUGIN_CPU, line.substring("[CPU-DATA]".length()));
-                parsePerfCsvData("cpudata", line.substring("[CPU-DATA]".length()));
-            } else if (line.startsWith("[INFO]")) {
-                xmlFileWriter.println("<info>" + line + "</info>");
-            } else {
-                xmlFileWriter.println("<error>" + line + "</error>");
-            }
-        }
-
-        xmlFileWriter.println("</list>");
-        xmlFileWriter.println("</property>");
-    }
-
-    protected void writeXmlPerfSummary() {
-
-        Map summary;
-
-        summary = getSummary(REPORT_PLUGIN_THROUGHPUT);
-        if (summary != null && summary.size() > 0) {
-            writeThroughputSummary(summary);
-        }
-
-        summary = getSummary(REPORT_PLUGIN_CPU);
-        if (summary != null && summary.size() > 0) {
-            writeCpuSummary(summary);
-        }
-
-    }
-
-    protected void writeThroughputSummary(Map summary) {
-        // Write throughput summary
-        xmlFileWriter.println("<property name='perfTpSummary'>");
-        xmlFileWriter.println("<props>");
-
-        String val;
-        String clientName;
-        String clientVal;
-
-        System.out.println("#########################################");
-        System.out.println("####    SYSTEM THROUGHPUT SUMMARY    ####");
-        System.out.println("#########################################");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_SYS_TOTAL_TP);
-        System.out.println("System Total Throughput: " + val);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_SYS_TOTAL_TP + "'>" + val + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_SYS_TOTAL_CLIENTS);
-        System.out.println("System Total Clients: " + val);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_SYS_TOTAL_CLIENTS + "'>" + val + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_SYS_AVE_TP);
-        System.out.println("System Average Throughput: " + val);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_SYS_AVE_TP + "'>" + val + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_SYS_AVE_EMM_TP);
-        System.out.println("System Average Throughput Excluding Min/Max: " + val);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_SYS_AVE_EMM_TP + "'>" + val + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_SYS_AVE_CLIENT_TP);
-        System.out.println("System Average Client Throughput: " + val);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_SYS_AVE_CLIENT_TP + "'>" + val + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_SYS_AVE_CLIENT_EMM_TP);
-        System.out.println("System Average Client Throughput Excluding Min/Max: " + val);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_SYS_AVE_CLIENT_EMM_TP + "'>" + val + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Min Client Throughput Per Sample: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Max Client Throughput Per Sample: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_TOTAL_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Min Client Total Throughput: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_TOTAL_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_TOTAL_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Max Client Total Throughput: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_TOTAL_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Min Average Client Throughput: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Max Average Client Throughput: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_EMM_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Min Average Client Throughput Excluding Min/Max: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_EMM_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_EMM_TP);
-        clientName = val.substring(0, val.indexOf("="));
-        clientVal = val.substring(val.indexOf("=") + 1);
-        System.out.println("Max Average Client Throughput Excluding Min/Max: clientName=" + clientName + ", value=" + clientVal);
-        xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_EMM_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
-
-        xmlFileWriter.println("</props>");
-        xmlFileWriter.println("</property>");
-    }
-
-    protected void writeCpuSummary(Map summary) {
-        xmlFileWriter.println("<property name='perfTpSummary'>");
-        xmlFileWriter.println("<props>");
-
-        System.out.println("########################################");
-        System.out.println("####    SYSTEM CPU USAGE SUMMARY    ####");
-        System.out.println("########################################");
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_BLOCK_RECV + "'>" + summary.get(CpuReportPlugin.KEY_BLOCK_RECV) + "</prop>");
-        System.out.println("Total Blocks Received: " + summary.get(CpuReportPlugin.KEY_BLOCK_RECV));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_AVE_BLOCK_RECV + "'>" + summary.get(CpuReportPlugin.KEY_AVE_BLOCK_RECV) + "</prop>");
-        System.out.println("Ave Blocks Received: " + summary.get(CpuReportPlugin.KEY_AVE_BLOCK_RECV));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_BLOCK_SENT + "'>" + summary.get(CpuReportPlugin.KEY_BLOCK_SENT) + "</prop>");
-        System.out.println("Total Blocks Sent: " + summary.get(CpuReportPlugin.KEY_BLOCK_SENT));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_AVE_BLOCK_SENT + "'>" + summary.get(CpuReportPlugin.KEY_AVE_BLOCK_SENT) + "</prop>");
-        System.out.println("Ave Blocks Sent: " + summary.get(CpuReportPlugin.KEY_AVE_BLOCK_SENT));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_CTX_SWITCH + "'>" + summary.get(CpuReportPlugin.KEY_CTX_SWITCH) + "</prop>");
-        System.out.println("Total Context Switches: " + summary.get(CpuReportPlugin.KEY_CTX_SWITCH));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_AVE_CTX_SWITCH + "'>" + summary.get(CpuReportPlugin.KEY_AVE_CTX_SWITCH) + "</prop>");
-        System.out.println("Ave Context Switches: " + summary.get(CpuReportPlugin.KEY_AVE_CTX_SWITCH));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_USER_TIME + "'>" + summary.get(CpuReportPlugin.KEY_USER_TIME) + "</prop>");
-        System.out.println("Total User Time: " + summary.get(CpuReportPlugin.KEY_USER_TIME));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_AVE_USER_TIME + "'>" + summary.get(CpuReportPlugin.KEY_AVE_USER_TIME) + "</prop>");
-        System.out.println("Ave User Time: " + summary.get(CpuReportPlugin.KEY_AVE_USER_TIME));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_SYS_TIME + "'>" + summary.get(CpuReportPlugin.KEY_SYS_TIME) + "</prop>");
-        System.out.println("Total System Time: " + summary.get(CpuReportPlugin.KEY_SYS_TIME));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_AVE_SYS_TIME + "'>" + summary.get(CpuReportPlugin.KEY_AVE_SYS_TIME) + "</prop>");
-        System.out.println("Ave System Time: " + summary.get(CpuReportPlugin.KEY_AVE_SYS_TIME));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_IDLE_TIME + "'>" + summary.get(CpuReportPlugin.KEY_IDLE_TIME) + "</prop>");
-        System.out.println("Total Idle Time: " + summary.get(CpuReportPlugin.KEY_IDLE_TIME));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_AVE_IDLE_TIME + "'>" + summary.get(CpuReportPlugin.KEY_AVE_IDLE_TIME) + "</prop>");
-        System.out.println("Ave Idle Time: " + summary.get(CpuReportPlugin.KEY_AVE_IDLE_TIME));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_WAIT_TIME + "'>" + summary.get(CpuReportPlugin.KEY_WAIT_TIME) + "</prop>");
-        System.out.println("Total Wait Time: " + summary.get(CpuReportPlugin.KEY_WAIT_TIME));
-
-        xmlFileWriter.println("<prop key='" + CpuReportPlugin.KEY_AVE_WAIT_TIME + "'>" + summary.get(CpuReportPlugin.KEY_AVE_WAIT_TIME) + "</prop>");
-        System.out.println("Ave Wait Time: " + summary.get(CpuReportPlugin.KEY_AVE_WAIT_TIME));
-
-        xmlFileWriter.println("</props>");
-        xmlFileWriter.println("</property>");
-    }
-
-    protected void writeMap(String name, Map map) {
-        xmlFileWriter.println("<property name='" + name + "'>");
-        xmlFileWriter.println("<props>");
-        for (Iterator i = map.keySet().iterator(); i.hasNext();) {
-            String propKey = (String)i.next();
-            Object propVal = map.get(propKey);
-            xmlFileWriter.println("<prop key='" + propKey + "'>" + propVal.toString() + "</prop>");
-        }
-        xmlFileWriter.println("</props>");
-        xmlFileWriter.println("</property>");
-    }
-
-    protected void parsePerfCsvData(String elementName, String csvData) {
-        StringTokenizer tokenizer = new StringTokenizer(csvData, ",;");
-        String xmlElement;
-
-        xmlElement = "<" + elementName;
-        String data;
-        String key;
-        String val;
-        while (tokenizer.hasMoreTokens()) {
-            data = tokenizer.nextToken();
-            key = data.substring(0, data.indexOf("="));
-            val = data.substring(data.indexOf("=") + 1);
-            xmlElement += " " + key + "='" + val + "'";
-        }
-        xmlElement += " />";
-        xmlFileWriter.println(xmlElement);
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java
deleted file mode 100644
index 4285cad..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * 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.tool.reports.plugins;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.activemq.tool.reports.PerformanceStatisticsUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class CpuReportPlugin implements ReportPlugin {
-
-    public static final String NAME_IGNORE_LIST = "$index$timeUnit$r$b$w$swpd$inact$active$free$buff$cache$si$so$in$";
-    public static final String NAME_BLOCK_RECV = "bi";
-    public static final String NAME_BLOCK_SENT = "bo";
-    public static final String NAME_CTX_SWITCH = "cs";
-    public static final String NAME_USER_TIME  = "us";
-    public static final String NAME_SYS_TIME   = "sy";
-    public static final String NAME_IDLE_TIME  = "id";
-    public static final String NAME_WAIT_TIME  = "wa";
-
-    public static final String KEY_BLOCK_RECV = "BlocksReceived";
-    public static final String KEY_BLOCK_SENT = "BlocksSent";
-    public static final String KEY_CTX_SWITCH = "ContextSwitches";
-    public static final String KEY_USER_TIME  = "UserTime";
-    public static final String KEY_SYS_TIME   = "SystemTime";
-    public static final String KEY_IDLE_TIME  = "IdleTime";
-    public static final String KEY_WAIT_TIME  = "WaitingTime";
-
-    public static final String KEY_AVE_BLOCK_RECV = "AveBlocksReceived";
-    public static final String KEY_AVE_BLOCK_SENT = "AveBlocksSent";
-    public static final String KEY_AVE_CTX_SWITCH = "AveContextSwitches";
-    public static final String KEY_AVE_USER_TIME  = "AveUserTime";
-    public static final String KEY_AVE_SYS_TIME   = "AveSystemTime";
-    public static final String KEY_AVE_IDLE_TIME  = "AveIdleTime";
-    public static final String KEY_AVE_WAIT_TIME  = "AveWaitingTime";
-
-    private static final Logger LOG = LoggerFactory.getLogger(CpuReportPlugin.class);
-
-    protected List<Long> blockRecv = new ArrayList<Long>();
-    protected List<Long> blockSent = new ArrayList<Long>();
-    protected List<Long> ctxSwitch = new ArrayList<Long>();
-    protected List<Long> userTime  = new ArrayList<Long>();
-    protected List<Long> sysTime   = new ArrayList<Long>();
-    protected List<Long> idleTime  = new ArrayList<Long>();
-    protected List<Long> waitTime  = new ArrayList<Long>();
-
-    public void handleCsvData(String csvData) {
-        StringTokenizer tokenizer = new StringTokenizer(csvData, ",");
-        String data;
-        String key;
-        String val;
-        while (tokenizer.hasMoreTokens()) {
-            data = tokenizer.nextToken();
-            key  = data.substring(0, data.indexOf("="));
-            val  = data.substring(data.indexOf("=") + 1);
-
-            addToCpuList(key, val);
-        }
-    }
-
-    public Map<String, String> getSummary() {
-        long val;
-
-        Map<String, String> summary = new HashMap<String, String>();
-
-        if (blockRecv.size() > 0) {
-            val = PerformanceStatisticsUtil.getSum(blockRecv);
-            summary.put(KEY_BLOCK_RECV, String.valueOf(val));
-            summary.put(KEY_AVE_BLOCK_RECV, String.valueOf((double)val / (double)blockRecv.size()));
-        }
-
-        if (blockSent.size() > 0) {
-            val = PerformanceStatisticsUtil.getSum(blockSent);
-            summary.put(KEY_BLOCK_SENT, String.valueOf(val));
-            summary.put(KEY_AVE_BLOCK_SENT, String.valueOf((double)val / (double)blockSent.size()));
-        }
-
-        if (ctxSwitch.size() > 0) {
-            val = PerformanceStatisticsUtil.getSum(ctxSwitch);
-            summary.put(KEY_CTX_SWITCH, String.valueOf(val));
-            summary.put(KEY_AVE_CTX_SWITCH, String.valueOf((double)val / (double)ctxSwitch.size()));
-        }
-
-        if (userTime.size() > 0) {
-            val = PerformanceStatisticsUtil.getSum(userTime);
-            summary.put(KEY_USER_TIME, String.valueOf(val));
-            summary.put(KEY_AVE_USER_TIME, String.valueOf((double)val / (double)userTime.size()));
-        }
-
-        if (sysTime.size() > 0) {
-            val = PerformanceStatisticsUtil.getSum(sysTime);
-            summary.put(KEY_SYS_TIME, String.valueOf(val));
-            summary.put(KEY_AVE_SYS_TIME, String.valueOf((double)val / (double)sysTime.size()));
-        }
-
-        if (idleTime.size() > 0) {
-            val = PerformanceStatisticsUtil.getSum(idleTime);
-            summary.put(KEY_IDLE_TIME, String.valueOf(val));
-            summary.put(KEY_AVE_IDLE_TIME, String.valueOf((double)val / (double)idleTime.size()));
-        }
-
-        if (waitTime.size() > 0) {
-            val = PerformanceStatisticsUtil.getSum(waitTime);
-            summary.put(KEY_WAIT_TIME, String.valueOf(val));
-            summary.put(KEY_AVE_WAIT_TIME, String.valueOf((double)val / (double)waitTime.size()));
-        }
-
-        if (summary.size() > 0) {
-            return summary;
-        } else {
-            return null;
-        }
-    }
-
-    protected void addToCpuList(String key, String val) {
-        if (key.equals(NAME_BLOCK_RECV)) {
-            blockRecv.add(Long.valueOf(val));
-        } else if (key.equals(NAME_BLOCK_SENT)) {
-            blockSent.add(Long.valueOf(val));
-        } else if (key.equals(NAME_CTX_SWITCH)) {
-            ctxSwitch.add(Long.valueOf(val));
-        } else if (key.equals(NAME_USER_TIME)) {
-            userTime.add(Long.valueOf(val));
-        } else if (key.equals(NAME_SYS_TIME)) {
-            sysTime.add(Long.valueOf(val));
-        } else if (key.equals(NAME_IDLE_TIME)) {
-            idleTime.add(Long.valueOf(val));
-        } else if (key.equals(NAME_WAIT_TIME)) {
-            waitTime.add(Long.valueOf(val));
-        } else if (NAME_IGNORE_LIST.indexOf("$" + key + "$") != -1) {
-            // Ignore key
-        } else {
-            LOG.warn("Unrecognized CPU data. " + key + "=" + val);
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java
deleted file mode 100644
index 62d3ce6..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.tool.reports.plugins;
-
-import java.util.Map;
-
-public interface ReportPlugin {
-    void handleCsvData(String csvData);
-    Map getSummary();
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java
deleted file mode 100644
index 420f277..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * 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.tool.reports.plugins;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.activemq.tool.reports.PerformanceStatisticsUtil;
-
-public class ThroughputReportPlugin implements ReportPlugin {
-    public static final String KEY_SYS_TOTAL_TP = "SystemTotalTP";
-    public static final String KEY_SYS_TOTAL_CLIENTS = "SystemTotalClients";
-    public static final String KEY_SYS_AVE_TP = "SystemAveTP";
-    public static final String KEY_SYS_AVE_EMM_TP = "SystemAveEMMTP";
-    public static final String KEY_SYS_AVE_CLIENT_TP = "SystemAveClientTP";
-    public static final String KEY_SYS_AVE_CLIENT_EMM_TP = "SystemAveClientEMMTP";
-    public static final String KEY_MIN_CLIENT_TP = "MinClientTP";
-    public static final String KEY_MAX_CLIENT_TP = "MaxClientTP";
-    public static final String KEY_MIN_CLIENT_TOTAL_TP = "MinClientTotalTP";
-    public static final String KEY_MAX_CLIENT_TOTAL_TP = "MaxClientTotalTP";
-    public static final String KEY_MIN_CLIENT_AVE_TP = "MinClientAveTP";
-    public static final String KEY_MAX_CLIENT_AVE_TP = "MaxClientAveTP";
-    public static final String KEY_MIN_CLIENT_AVE_EMM_TP = "MinClientAveEMMTP";
-    public static final String KEY_MAX_CLIENT_AVE_EMM_TP = "MaxClientAveEMMTP";
-
-    protected Map<String, List> clientThroughputs = new HashMap<String, List>();
-
-    public void handleCsvData(String csvData) {
-        StringTokenizer tokenizer = new StringTokenizer(csvData, ",");
-        String data;
-        String key;
-        String val;
-        String clientName = null;
-        Long throughput = null;
-        while (tokenizer.hasMoreTokens()) {
-            data = tokenizer.nextToken();
-            key = data.substring(0, data.indexOf("="));
-            val = data.substring(data.indexOf("=") + 1);
-
-            if (key.equalsIgnoreCase("clientName")) {
-                clientName = val;
-            } else if (key.equalsIgnoreCase("throughput")) {
-                throughput = Long.valueOf(val);
-            } else {
-                // Ignore unknown token
-            }
-        }
-        addToClientTPList(clientName, throughput);
-    }
-
-    public Map<String, String> getSummary() {
-        // Check if tp sampler wasn't used.
-        if (clientThroughputs.size() == 0) {
-            return new HashMap<String, String>();
-        }
-
-        long minClientTP = Long.MAX_VALUE; // TP = throughput
-        long maxClientTP = Long.MIN_VALUE;
-        long minClientTotalTP = Long.MAX_VALUE;
-        long maxClientTotalTP = Long.MIN_VALUE;
-        long systemTotalTP = 0;
-
-        double minClientAveTP = Double.MAX_VALUE;
-        double maxClientAveTP = Double.MIN_VALUE;
-        double minClientAveEMMTP = Double.MAX_VALUE; // EMM = Excluding Min/Max
-        double maxClientAveEMMTP = Double.MIN_VALUE;
-        double systemAveTP = 0.0;
-        double systemAveEMMTP = 0.0;
-
-        String nameMinClientTP = "";
-        String nameMaxClientTP = "";
-        String nameMinClientTotalTP = "";
-        String nameMaxClientTotalTP = "";
-        String nameMinClientAveTP = "";
-        String nameMaxClientAveTP = "";
-        String nameMinClientAveEMMTP = "";
-        String nameMaxClientAveEMMTP = "";
-
-        Set<String> clientNames = clientThroughputs.keySet();
-        String clientName;
-        List clientTPList;
-        long tempLong;
-        double tempDouble;
-        int clientCount = 0;
-        for (Iterator<String> i = clientNames.iterator(); i.hasNext();) {
-            clientName = i.next();
-            clientTPList = clientThroughputs.get(clientName);
-            clientCount++;
-
-            tempLong = PerformanceStatisticsUtil.getMin(clientTPList);
-            if (tempLong < minClientTP) {
-                minClientTP = tempLong;
-                nameMinClientTP = clientName;
-            }
-
-            tempLong = PerformanceStatisticsUtil.getMax(clientTPList);
-            if (tempLong > maxClientTP) {
-                maxClientTP = tempLong;
-                nameMaxClientTP = clientName;
-            }
-
-            tempLong = PerformanceStatisticsUtil.getSum(clientTPList);
-            systemTotalTP += tempLong; // Accumulate total TP
-            if (tempLong < minClientTotalTP) {
-                minClientTotalTP = tempLong;
-                nameMinClientTotalTP = clientName;
-            }
-
-            if (tempLong > maxClientTotalTP) {
-                maxClientTotalTP = tempLong;
-                nameMaxClientTotalTP = clientName;
-            }
-
-            tempDouble = PerformanceStatisticsUtil.getAve(clientTPList);
-            systemAveTP += tempDouble; // Accumulate ave throughput
-            if (tempDouble < minClientAveTP) {
-                minClientAveTP = tempDouble;
-                nameMinClientAveTP = clientName;
-            }
-
-            if (tempDouble > maxClientAveTP) {
-                maxClientAveTP = tempDouble;
-                nameMaxClientAveTP = clientName;
-            }
-
-            tempDouble = PerformanceStatisticsUtil.getAveEx(clientTPList);
-            systemAveEMMTP += tempDouble; // Accumulate ave throughput
-                                            // excluding min/max
-            if (tempDouble < minClientAveEMMTP) {
-                minClientAveEMMTP = tempDouble;
-                nameMinClientAveEMMTP = clientName;
-            }
-
-            if (tempDouble > maxClientAveEMMTP) {
-                maxClientAveEMMTP = tempDouble;
-                nameMaxClientAveEMMTP = clientName;
-            }
-        }
-
-        Map<String, String> summary = new HashMap<String, String>();
-        summary.put(KEY_SYS_TOTAL_TP, String.valueOf(systemTotalTP));
-        summary.put(KEY_SYS_TOTAL_CLIENTS, String.valueOf(clientCount));
-        summary.put(KEY_SYS_AVE_TP, String.valueOf(systemAveTP));
-        summary.put(KEY_SYS_AVE_EMM_TP, String.valueOf(systemAveEMMTP));
-        summary.put(KEY_SYS_AVE_CLIENT_TP, String.valueOf(systemAveTP / clientCount));
-        summary.put(KEY_SYS_AVE_CLIENT_EMM_TP, String.valueOf(systemAveEMMTP / clientCount));
-        summary.put(KEY_MIN_CLIENT_TP, nameMinClientTP + "=" + minClientTP);
-        summary.put(KEY_MAX_CLIENT_TP, nameMaxClientTP + "=" + maxClientTP);
-        summary.put(KEY_MIN_CLIENT_TOTAL_TP, nameMinClientTotalTP + "=" + minClientTotalTP);
-        summary.put(KEY_MAX_CLIENT_TOTAL_TP, nameMaxClientTotalTP + "=" + maxClientTotalTP);
-        summary.put(KEY_MIN_CLIENT_AVE_TP, nameMinClientAveTP + "=" + minClientAveTP);
-        summary.put(KEY_MAX_CLIENT_AVE_TP, nameMaxClientAveTP + "=" + maxClientAveTP);
-        summary.put(KEY_MIN_CLIENT_AVE_EMM_TP, nameMinClientAveEMMTP + "=" + minClientAveEMMTP);
-        summary.put(KEY_MAX_CLIENT_AVE_EMM_TP, nameMaxClientAveEMMTP + "=" + maxClientAveEMMTP);
-
-        return summary;
-    }
-
-    protected void addToClientTPList(String clientName, Long throughput) {
-        // Write to client's throughput list
-        if (clientName == null || throughput == null) {
-            throw new IllegalArgumentException("Invalid Throughput CSV Data: clientName=" + clientName + ", throughput=" + throughput);
-        }
-
-        List<Long> clientTPList = clientThroughputs.get(clientName);
-        if (clientTPList == null) {
-            clientTPList = new ArrayList<Long>();
-            clientThroughputs.put(clientName, clientTPList);
-        }
-        clientTPList.add(throughput);
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/AbstractPerformanceSampler.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/AbstractPerformanceSampler.java
deleted file mode 100644
index 47d5cb6..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/AbstractPerformanceSampler.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.tool.sampler;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.activemq.tool.properties.AbstractObjectProperties;
-import org.apache.activemq.tool.reports.PerformanceReportWriter;
-
-public abstract class AbstractPerformanceSampler extends AbstractObjectProperties implements PerformanceSampler {
-    
-    protected long rampUpTime = 30 * 1000; // 30 secs
-    protected long rampDownTime = 30 * 1000; // 30 secs
-    protected long duration = 5 * 60 * 1000; // 5 mins
-    protected long interval = 1000; // 1 sec
-    protected PerformanceReportWriter perfReportWriter;
-    protected PerformanceEventListener perfEventListener;
-    protected final AtomicBoolean isRunning = new AtomicBoolean(false);
-    protected long sampleIndex;
-
-    public long getRampUpTime() {
-        return rampUpTime;
-    }
-
-    public void setRampUpTime(long rampUpTime) {
-        this.rampUpTime = rampUpTime;
-    }
-
-    public long getRampDownTime() {
-        return rampDownTime;
-    }
-
-    public void setRampDownTime(long rampDownTime) {
-        this.rampDownTime = rampDownTime;
-    }
-
-    public long getDuration() {
-        return duration;
-    }
-
-    public void setDuration(long duration) {
-        this.duration = duration;
-    }
-
-    public long getInterval() {
-        return interval;
-    }
-
-    public void setInterval(long interval) {
-        this.interval = interval;
-    }
-
-    public PerformanceReportWriter getPerfReportWriter() {
-        return perfReportWriter;
-    }
-
-    public void setPerfReportWriter(PerformanceReportWriter perfReportWriter) {
-        this.perfReportWriter = perfReportWriter;
-    }
-
-    public PerformanceEventListener getPerfEventListener() {
-        return perfEventListener;
-    }
-
-    public void setPerfEventListener(PerformanceEventListener perfEventListener) {
-        this.perfEventListener = perfEventListener;
-    }
-
-    public void startSampler() {
-        isRunning.set(true);
-        Thread t = new Thread(this);
-        t.start();
-    }
-
-    public void run() {
-        try {
-            onRampUpStart();
-            if (perfEventListener != null) {
-                perfEventListener.onRampUpStart(this);
-            }
-
-            try {
-                Thread.sleep(rampUpTime);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-
-            onSamplerStart();
-            if (perfEventListener != null) {
-                perfEventListener.onSamplerStart(this);
-            }
-
-            sample();
-
-            onSamplerEnd();
-            if (perfEventListener != null) {
-                perfEventListener.onSamplerEnd(this);
-            }
-
-            try {
-                Thread.sleep(rampDownTime);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-
-            onRampDownEnd();
-            if (perfEventListener != null) {
-                perfEventListener.onRampDownEnd(this);
-            }
-        } finally {
-            isRunning.set(false);
-            synchronized (isRunning) {
-                isRunning.notifyAll();
-            }
-        }
-    }
-
-    protected void sample() {
-        // Compute for the actual duration window of the sampler
-        long endTime = System.currentTimeMillis() + duration - rampDownTime - rampUpTime;
-
-        while (System.currentTimeMillis() < endTime) {
-            try {
-                Thread.sleep(interval);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            sampleData();
-            sampleIndex++;
-        }
-    }
-
-    public abstract void sampleData();
-
-    public boolean isRunning() {
-        return isRunning.get();
-    }
-
-    public void waitUntilDone() {
-        while (isRunning()) {
-            try {
-                synchronized (isRunning) {
-                    isRunning.wait(0);
-                }
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    // Call back functions to customize behavior of thread.
-    protected void onRampUpStart() {
-    }
-
-    protected void onSamplerStart() {
-    }
-
-    protected void onSamplerEnd() {
-    }
-
-    protected void onRampDownEnd() {
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/CpuSamplerTask.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/CpuSamplerTask.java
deleted file mode 100644
index 9cc91dc..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/CpuSamplerTask.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.tool.sampler;
-
-import java.io.IOException;
-
-import org.apache.activemq.tool.reports.AbstractPerfReportWriter;
-import org.apache.activemq.tool.sampler.plugins.CpuSamplerPlugin;
-import org.apache.activemq.tool.sampler.plugins.LinuxCpuSamplerPlugin;
-
-public class CpuSamplerTask extends AbstractPerformanceSampler {
-
-    private CpuSamplerPlugin plugin;
-
-    public void createPlugin() throws IOException {
-        createPlugin(System.getProperty("os.name"));
-    }
-
-    public void createPlugin(String osName) throws IOException {
-        if (osName == null) {
-            throw new IOException("No defined OS name found. Found: " + osName);
-        }
-
-        if (osName.equalsIgnoreCase(CpuSamplerPlugin.LINUX)) {
-            plugin = new LinuxCpuSamplerPlugin(getInterval());
-        } else {
-            throw new IOException("No CPU Sampler Plugin found for OS: " + osName + ". CPU Sampler will not be started.");
-        }
-    }
-
-    public void sampleData() {
-        if (plugin != null && perfReportWriter != null) {
-            perfReportWriter.writeCsvData(AbstractPerfReportWriter.REPORT_PLUGIN_CPU, "index=" + sampleIndex + "," + plugin.getCpuUtilizationStats());
-        }
-    }
-
-    protected void onRampUpStart() {
-        super.onRampUpStart();
-        if (plugin != null) {
-            plugin.start();
-        }
-    }
-
-    protected void onRampDownEnd() {
-        super.onRampDownEnd();
-        if (plugin != null) {
-            plugin.stop();
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java
deleted file mode 100644
index 5ff3733..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.tool.sampler;
-
-public interface MeasurableClient {
-    
-    void reset();
-    String getClientName();
-    long getThroughput();
-    
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceEventListener.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceEventListener.java
deleted file mode 100644
index 69bf5cd..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceEventListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.tool.sampler;
-
-interface PerformanceEventListener {
-    void onRampUpStart(PerformanceSampler sampler);
-
-    void onSamplerStart(PerformanceSampler sampler);
-
-    void onSamplerEnd(PerformanceSampler sampler);
-
-    void onRampDownEnd(PerformanceSampler sampler);
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceSampler.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceSampler.java
deleted file mode 100644
index 9efe5a3..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceSampler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.tool.sampler;
-
-import org.apache.activemq.tool.reports.PerformanceReportWriter;
-
-public interface PerformanceSampler extends Runnable {
-    
-    long getRampUpTime();
-
-    void setRampUpTime(long rampUpTime);
-
-    long getRampDownTime();
-
-    void setRampDownTime(long rampDownTime);
-
-    long getDuration();
-
-    void setDuration(long duration);
-
-    long getInterval();
-
-    void setInterval(long interval);
-
-    PerformanceReportWriter getPerfReportWriter();
-
-    void setPerfReportWriter(PerformanceReportWriter writer);
-
-    PerformanceEventListener getPerfEventListener();
-
-    void setPerfEventListener(PerformanceEventListener listener);
-
-    void sampleData();
-
-    boolean isRunning();
-
-    void waitUntilDone();
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java
deleted file mode 100644
index d717912..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.tool.sampler;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.activemq.tool.reports.AbstractPerfReportWriter;
-
-public class ThroughputSamplerTask extends AbstractPerformanceSampler {
-
-    private final Object mutex = new Object();
-    private List<MeasurableClient> clients = new ArrayList<MeasurableClient>();
-
-    public void registerClient(MeasurableClient client) {
-        synchronized (mutex) {
-            clients.add(client);
-        }
-    }
-
-    public void sampleData() {
-        for (Iterator<MeasurableClient> i = clients.iterator(); i.hasNext();) {
-            MeasurableClient client = i.next();
-            if (perfReportWriter != null) {
-                perfReportWriter.writeCsvData(AbstractPerfReportWriter.REPORT_PLUGIN_THROUGHPUT, "index=" + sampleIndex + ",clientName=" + client.getClientName() + ",throughput="
-                                                                                                 + client.getThroughput());
-            }
-            client.reset();
-        }
-    }
-
-    protected void onSamplerStart() {
-        // Reset the throughput of the clients
-        for (Iterator<MeasurableClient> i = clients.iterator(); i.hasNext();) {
-            MeasurableClient client = i.next();
-            client.reset();
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/CpuSamplerPlugin.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/CpuSamplerPlugin.java
deleted file mode 100644
index fbc6de5..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/CpuSamplerPlugin.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.tool.sampler.plugins;
-
-public interface CpuSamplerPlugin {
-    
-    String WINDOWS_2000 = "Windows 2000";
-    String WINDOWS_NT = "Windows NT";
-    String WINDOWS_XP = "Windows XP";
-    String WINDOWS_95 = "Windows 95";
-    String WINDOWS_CE = "Windows CE";
-    String LINUX = "Linux";
-    String SOLARIS = "Solaris";
-    String AIX = "AIX";
-    String FREEBSD = "FreeBSD";
-    String MAC_OS = "Mac OS";
-    String MAC_OS_X = "Mac OS X";
-    String POWERPC = "PowerPC";
-    String OS_2 = "OS/2";
-
-    String getCpuUtilizationStats();
-
-    void start();
-
-    void stop();
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/LinuxCpuSamplerPlugin.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/LinuxCpuSamplerPlugin.java
deleted file mode 100644
index 0ef0753..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/LinuxCpuSamplerPlugin.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.tool.sampler.plugins;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.StringTokenizer;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-public class LinuxCpuSamplerPlugin implements CpuSamplerPlugin, Runnable {
-
-    private Process vmstatProcess;
-    private String vmstat;
-    private String result = "";
-    private final Object mutex = new Object();
-    private AtomicBoolean stop = new AtomicBoolean(false);
-
-    public LinuxCpuSamplerPlugin(long intervalInMs) {
-        vmstat = "vmstat -n " + (int)(intervalInMs / 1000);
-    }
-
-    public void start() {
-        stop.set(false);
-        Thread t = new Thread(this);
-        t.start();
-    }
-
-    public void stop() {
-        stop.set(true);
-        try {
-            vmstatProcess.waitFor();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void run() {
-
-        try {
-            vmstatProcess = Runtime.getRuntime().exec(vmstat);
-            BufferedReader br = new BufferedReader(new InputStreamReader(vmstatProcess.getInputStream()), 1024);
-
-            br.readLine(); // throw away the first line
-
-            String header = br.readLine();
-            String data;
-
-            while (!stop.get()) {
-                data = br.readLine();
-                if (data != null) {
-                    String csvData = convertToCSV(header, data);
-                    synchronized (mutex) {
-                        result = csvData;
-                    }
-                }
-            }
-            br.close();
-            vmstatProcess.destroy();
-
-        } catch (IOException ioe) {
-            ioe.printStackTrace();
-        }
-    }
-
-    public String getCpuUtilizationStats() {
-        String data;
-        synchronized (mutex) {
-            data = result;
-            result = "";
-        }
-        return data;
-    }
-
-    public String getVmstat() {
-        return vmstat;
-    }
-
-    public void setVmstat(String vmstat) {
-        this.vmstat = vmstat;
-    }
-
-    protected String convertToCSV(String header, String data) {
-        StringTokenizer headerTokens = new StringTokenizer(header, " ");
-        StringTokenizer dataTokens = new StringTokenizer(data, " ");
-
-        String csv = "";
-        while (headerTokens.hasMoreTokens()) {
-            csv += headerTokens.nextToken() + "=" + dataTokens.nextToken() + ",";
-        }
-
-        return csv;
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java
deleted file mode 100644
index 90ff7e3..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * 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.tool.spi;
-
-import java.util.Properties;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-public class ActiveMQPojoSPI implements SPIConnectionFactory {
-    public static final String KEY_BROKER_URL        = "brokerUrl";
-    public static final String KEY_USERNAME          = "username";
-    public static final String KEY_PASSWORD          = "password";
-    public static final String KEY_CLIENT_ID         = "clientID";
-
-    public static final String KEY_ASYNC_SEND        = "asyncSend";
-    public static final String KEY_ASYNC_DISPATCH    = "asyncDispatch";
-    public static final String KEY_ASYNC_SESSION     = "asyncSession";
-    public static final String KEY_CLOSE_TIMEOUT     = "closeTimeout";
-    public static final String KEY_COPY_MSG_ON_SEND  = "copyMsgOnSend";
-    public static final String KEY_DISABLE_TIMESTAMP = "disableTimestamp";
-    public static final String KEY_DEFER_OBJ_SERIAL  = "deferObjSerial";
-    public static final String KEY_OPTIM_ACK         = "optimAck";
-    public static final String KEY_OPTIM_DISPATCH    = "optimDispatch";
-    public static final String KEY_PREFETCH_QUEUE    = "prefetchQueue";
-    public static final String KEY_PREFETCH_TOPIC    = "prefetchTopic";
-    public static final String KEY_USE_COMPRESSION   = "useCompression";
-    public static final String KEY_USE_RETROACTIVE   = "useRetroactive";
-
-    public ConnectionFactory createConnectionFactory(Properties settings) throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
-        configureConnectionFactory(factory, settings);
-        return factory;
-    }
-
-    public void configureConnectionFactory(ConnectionFactory jmsFactory, Properties settings) throws Exception {
-        ActiveMQConnectionFactory factory = (ActiveMQConnectionFactory)jmsFactory;
-        String setting;
-
-        setting = settings.getProperty(KEY_BROKER_URL);
-        if (setting != null && setting.length() > 0) {
-            factory.setBrokerURL(setting);
-        }
-
-        setting = settings.getProperty(KEY_USERNAME);
-        if (setting != null && setting.length() > 0) {
-            factory.setUserName(setting);
-        }
-
-        setting = settings.getProperty(KEY_PASSWORD);
-        if (setting != null && setting.length() > 0) {
-            factory.setPassword(setting);
-        }
-
-        setting = settings.getProperty(KEY_CLIENT_ID);
-        if (setting != null && setting.length() > 0) {
-            factory.setClientID(setting);
-        }
-
-        setting = settings.getProperty(KEY_ASYNC_SEND);
-        if (setting != null && setting.length() > 0) {
-            factory.setUseAsyncSend(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_ASYNC_DISPATCH);
-        if (setting != null && setting.length() > 0) {
-            factory.setDispatchAsync(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_ASYNC_SESSION);
-        if (setting != null && setting.length() > 0) {
-            factory.setAlwaysSessionAsync(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_CLOSE_TIMEOUT);
-        if (setting != null && setting.length() > 0) {
-            factory.setCloseTimeout(Integer.parseInt(setting));
-        }
-
-        setting = settings.getProperty(KEY_COPY_MSG_ON_SEND);
-        if (setting != null && setting.length() > 0) {
-            factory.setCopyMessageOnSend(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_DISABLE_TIMESTAMP);
-        if (setting != null && setting.length() > 0) {
-            factory.setDisableTimeStampsByDefault(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_DEFER_OBJ_SERIAL);
-        if (setting != null && setting.length() > 0) {
-            factory.setObjectMessageSerializationDefered(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_OPTIM_ACK);
-        if (setting != null && setting.length() > 0) {
-            factory.setOptimizeAcknowledge(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_OPTIM_DISPATCH);
-        if (setting != null && setting.length() > 0) {
-            factory.setOptimizedMessageDispatch(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_PREFETCH_QUEUE);
-        if (setting != null && setting.length() > 0) {
-            factory.getPrefetchPolicy().setQueuePrefetch(Integer.parseInt(setting));
-        }
-
-        setting = settings.getProperty(KEY_PREFETCH_TOPIC);
-        if (setting != null && setting.length() > 0) {
-            factory.getPrefetchPolicy().setTopicPrefetch(Integer.parseInt(setting));
-        }
-
-        setting = settings.getProperty(KEY_USE_COMPRESSION);
-        if (setting != null && setting.length() > 0) {
-            factory.setUseCompression(Boolean.getBoolean(setting));
-        }
-
-        setting = settings.getProperty(KEY_USE_RETROACTIVE);
-        if (setting != null && setting.length() > 0) {
-            factory.setUseRetroactiveConsumer(Boolean.getBoolean(setting));
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQReflectionSPI.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQReflectionSPI.java
deleted file mode 100644
index e33e980..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQReflectionSPI.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.tool.spi;
-
-public class ActiveMQReflectionSPI extends ReflectionSPIConnectionFactory {
-    public String getClassName() {
-        return "org.apache.activemq.ActiveMQConnectionFactory";
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
deleted file mode 100644
index 8b84798..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.tool.spi;
-
-import java.io.File;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import javax.jms.ConnectionFactory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class ClassLoaderSPIConnectionFactory implements SPIConnectionFactory {
-
-    public static final String KEY_EXT_DIR = "extDir";
-    private static final Logger LOG = LoggerFactory.getLogger(ClassLoaderSPIConnectionFactory.class);
-
-    public final ConnectionFactory createConnectionFactory(Properties settings) throws Exception {
-
-        // Load new context class loader
-        ClassLoader newClassLoader = getContextClassLoader(settings);
-        Thread.currentThread().setContextClassLoader(newClassLoader);
-
-        return instantiateConnectionFactory(settings);
-    }
-
-    protected ClassLoader getContextClassLoader(Properties settings) {
-        String extDir = (String)settings.remove(KEY_EXT_DIR);
-        if (extDir != null) {
-            StringTokenizer tokens = new StringTokenizer(extDir, ";,");
-            List<URL> urls = new ArrayList<URL>();
-            while (tokens.hasMoreTokens()) {
-                String dir = tokens.nextToken();
-                try {
-                    File f = new File(dir);
-                    if (!f.exists()) {
-                        LOG.warn("Cannot find extension dir: " + f.getAbsolutePath());
-                    } else {
-                        LOG.info("Adding extension dir: " + f.getAbsolutePath());
-
-                        urls.add(f.toURL());
-
-                        File[] files = f.listFiles();
-                        if (files != null) {
-                            for (int j = 0; j < files.length; j++) {
-                                if (files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar")) {
-                                    LOG.info("Adding extension dir: " + files[j].getAbsolutePath());
-                                    urls.add(files[j].toURL());
-                                }
-                            }
-                        }
-                    }
-                } catch (Exception e) {
-                    LOG.warn("Failed to load ext dir: " + dir + ". Reason: " + e);
-                }
-            }
-
-            URL u[] = new URL[urls.size()];
-            urls.toArray(u);
-            return new URLClassLoader(u, Thread.currentThread().getContextClassLoader());
-        }
-        return ClassLoaderSPIConnectionFactory.class.getClassLoader();
-    }
-
-    protected abstract ConnectionFactory instantiateConnectionFactory(Properties settings) throws Exception;
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java
deleted file mode 100644
index 47a32c4..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.tool.spi;
-
-import java.util.Properties;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.activemq.tool.properties.ReflectionUtil;
-
-public abstract class ReflectionSPIConnectionFactory extends ClassLoaderSPIConnectionFactory {
-
-    public ConnectionFactory instantiateConnectionFactory(Properties settings) throws Exception {
-        Class factoryClass = Thread.currentThread().getContextClassLoader().loadClass(getClassName());
-        ConnectionFactory factory = (ConnectionFactory)factoryClass.newInstance();
-        configureConnectionFactory(factory, settings);
-        return factory;
-    }
-
-    public void configureConnectionFactory(ConnectionFactory jmsFactory, Properties settings) throws Exception {
-        ReflectionUtil.configureClass(jmsFactory, settings);
-    }
-
-    public abstract String getClassName();
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java
deleted file mode 100644
index 8824391..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.tool.spi;
-
-import java.util.Properties;
-
-import javax.jms.ConnectionFactory;
-
-public interface SPIConnectionFactory {
-    
-    ConnectionFactory createConnectionFactory(Properties settings) throws Exception;
-
-    void configureConnectionFactory(ConnectionFactory jmsFactory, Properties settings) throws Exception;
-    
-}
diff --git a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java b/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java
deleted file mode 100644
index 3f219b7..0000000
--- a/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/**
- * 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.tool;
-
-import java.io.File;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-import org.apache.activemq.tool.properties.ReflectionConfigurable;
-import org.apache.activemq.tool.properties.ReflectionUtil;
-
-public class ReflectionUtilTest extends TestCase {
-    public void testConfigurableOption() {
-        TestClass5 data = new TestClass5();
-
-        data.willIntercept = true;
-        ReflectionUtil.configureClass(data, "this-should-not-matter", "this-should-not-matter");
-        assertTrue(data.intercepted);
-
-        data.willIntercept = false;
-        data.nest = new TestClass5();
-        data.nest.willIntercept = true;
-        ReflectionUtil.configureClass(data, "nest.this-should-not-matter", "this-should-not-matter");
-        assertTrue(data.intercepted);
-        assertTrue(data.nest.intercepted);
-
-        data.willIntercept = false;
-        data.nest = new TestClass5();
-        data.nest.willIntercept = false;
-        data.nest.nest = new TestClass5();
-        data.nest.nest.willIntercept = true;
-        ReflectionUtil.configureClass(data, "nest.nest.this-should-not-matter", "this-should-not-matter");
-        assertTrue(data.intercepted);
-        assertTrue(data.nest.intercepted);
-        assertTrue(data.nest.nest.intercepted);
-
-        TestClass6 data2 = new TestClass6();
-        data2.nestConfig = new TestClass5();
-        data2.nestConfig.willIntercept = true;
-        ReflectionUtil.configureClass(data2, "nestConfig.this-should-not-matter", "this-should-not-matter");
-        assertTrue(data2.nestConfig.intercepted);
-
-        data2.nestNotConfig = new TestClass6();
-        data2.nestNotConfig.nestConfig = new TestClass5();
-        data2.nestNotConfig.nestConfig.willIntercept = true;
-        ReflectionUtil.configureClass(data2, "nestNotConfig.nestConfig.this-should-not-matter", "this-should-not-matter");
-        assertTrue(data2.nestNotConfig.nestConfig.intercepted);
-    }
-
-    public void testDataTypeConfig() {
-        TestClass3 targetObj = new TestClass3();
-
-        // Initialize variables;
-        targetObj.setBooleanData(false);
-        targetObj.setIntData(0);
-        targetObj.setLongData(0);
-        targetObj.setShortData((short)0);
-        targetObj.setDoubleData(0.0);
-        targetObj.setFloatData(0.0F);
-        targetObj.setByteData((byte)0);
-        targetObj.setCharData('0');
-        targetObj.setStringData("false");
-
-        // Set properties
-        Properties props = new Properties();
-        props.setProperty("booleanData", "true");
-        props.setProperty("intData", "1000");
-        props.setProperty("longData", "2000");
-        props.setProperty("shortData", "3000");
-        props.setProperty("doubleData", "1234.567");
-        props.setProperty("floatData", "9876.543");
-        props.setProperty("byteData", "127");
-        props.setProperty("charData", "A");
-        props.setProperty("stringData", "true");
-
-        ReflectionUtil.configureClass(targetObj, props);
-
-        // Check config
-        assertEquals(true, targetObj.isBooleanData());
-        assertEquals(1000, targetObj.getIntData());
-        assertEquals(2000, targetObj.getLongData());
-        assertEquals(3000, targetObj.getShortData());
-        assertEquals(1234.567, targetObj.getDoubleData(), 0.0001);
-        assertEquals(9876.543, targetObj.getFloatData(), 0.0001);
-        assertEquals(127, targetObj.getByteData());
-        assertEquals('A', targetObj.getCharData());
-        assertEquals("true", targetObj.getStringData());
-    }
-
-    public void testValueOfMethod() {
-        TestClass4 targetObj = new TestClass4();
-
-        ReflectionUtil.configureClass(targetObj, "testFile", "TEST.FOO.BAR");
-
-        assertEquals("TEST.FOO.BAR", targetObj.testFile.toString());
-    }
-
-    public void testGetProperties() {
-
-        TestClass3 testData = new TestClass3();
-        testData.setBooleanData(false);
-        testData.setByteData((byte)15);
-        testData.setCharData('G');
-        testData.setDoubleData(765.43);
-        testData.setFloatData(543.21F);
-        testData.setIntData(654321);
-        testData.setLongData(987654321);
-        testData.setShortData((short)4321);
-        testData.setStringData("BAR.TEST.FOO");
-
-        TestClass3 targetObj = new TestClass3();
-        targetObj.setBooleanData(true);
-        targetObj.setByteData((byte)10);
-        targetObj.setCharData('D');
-        targetObj.setDoubleData(1234.567);
-        targetObj.setFloatData(4567.89F);
-        targetObj.setIntData(123456);
-        targetObj.setLongData(1234567890);
-        targetObj.setShortData((short)1234);
-        targetObj.setStringData("Test.FOO.BAR");
-        targetObj.setTestData(testData);
-
-        Properties p = ReflectionUtil.retrieveObjectProperties(targetObj);
-        assertEquals("true", p.getProperty("booleanData"));
-        assertEquals("10", p.getProperty("byteData"));
-        assertEquals("D", p.getProperty("charData"));
-        assertEquals("1234.567", p.getProperty("doubleData"));
-        assertEquals("4567.89", p.getProperty("floatData"));
-        assertEquals("123456", p.getProperty("intData"));
-        assertEquals("1234567890", p.getProperty("longData"));
-        assertEquals("1234", p.getProperty("shortData"));
-        assertEquals("Test.FOO.BAR", p.getProperty("stringData"));
-        assertEquals("false", p.getProperty("testData.booleanData"));
-        assertEquals("15", p.getProperty("testData.byteData"));
-        assertEquals("G", p.getProperty("testData.charData"));
-        assertEquals("765.43", p.getProperty("testData.doubleData"));
-        assertEquals("543.21", p.getProperty("testData.floatData"));
-        assertEquals("654321", p.getProperty("testData.intData"));
-        assertEquals("987654321", p.getProperty("testData.longData"));
-        assertEquals("4321", p.getProperty("testData.shortData"));
-        assertEquals("BAR.TEST.FOO", p.getProperty("testData.stringData"));
-
-    }
-
-    public void testNestedConfig() {
-        TestClass3 t1 = new TestClass3();
-        TestClass3 t2 = new TestClass3();
-        TestClass3 t3 = new TestClass3();
-        TestClass3 t4 = new TestClass3();
-        TestClass3 t5 = new TestClass3();
-
-        ReflectionUtil.configureClass(t1, "stringData", "t1");
-        assertEquals("t1", t1.getStringData());
-
-        t1.setTestData(t2);
-        ReflectionUtil.configureClass(t1, "testData.stringData", "t2");
-        assertEquals("t2", t2.getStringData());
-
-        t2.setTestData(t3);
-        ReflectionUtil.configureClass(t1, "testData.testData.stringData", "t3");
-        assertEquals("t3", t3.getStringData());
-
-        t3.setTestData(t4);
-        ReflectionUtil.configureClass(t1, "testData.testData.testData.stringData", "t4");
-        assertEquals("t4", t4.getStringData());
-
-        t4.setTestData(t5);
-        ReflectionUtil.configureClass(t1, "testData.testData.testData.testData.stringData", "t5");
-        assertEquals("t5", t5.getStringData());
-    }
-
-    public class TestClass1 {
-        private boolean booleanData;
-        private int intData;
-        private long longData;
-
-        public boolean isBooleanData() {
-            return booleanData;
-        }
-
-        public void setBooleanData(boolean booleanData) {
-            this.booleanData = booleanData;
-        }
-
-        public int getIntData() {
-            return intData;
-        }
-
-        public void setIntData(int intData) {
-            this.intData = intData;
-        }
-
-        public long getLongData() {
-            return longData;
-        }
-
-        public void setLongData(long longData) {
-            this.longData = longData;
-        }
-    }
-
-    public class TestClass2 extends TestClass1 {
-        private float floatData;
-        private byte byteData;
-        private char charData;
-
-        public float getFloatData() {
-            return floatData;
-        }
-
-        public void setFloatData(float floatData) {
-            this.floatData = floatData;
-        }
-
-        public byte getByteData() {
-            return byteData;
-        }
-
-        public void setByteData(byte byteData) {
-            this.byteData = byteData;
-        }
-
-        public char getCharData() {
-            return charData;
-        }
-
-        public void setCharData(char charData) {
-            this.charData = charData;
-        }
-    }
-
-    public class TestClass3 extends TestClass2 {
-        private short shortData;
-        private double doubleData;
-        private String stringData;
-        private TestClass3 testData;
-
-        public short getShortData() {
-            return shortData;
-        }
-
-        public void setShortData(short shortData) {
-            this.shortData = shortData;
-        }
-
-        public double getDoubleData() {
-            return doubleData;
-        }
-
-        public void setDoubleData(double doubleData) {
-            this.doubleData = doubleData;
-        }
-
-        public String getStringData() {
-            return stringData;
-        }
-
-        public void setStringData(String stringData) {
-            this.stringData = stringData;
-        }
-
-        public TestClass3 getTestData() {
-            return testData;
-        }
-
-        public void setTestData(TestClass3 testData) {
-            this.testData = testData;
-        }
-    }
-
-    public class TestClass4 {
-        private File testFile;
-
-        public String getTestFile() {
-            return testFile.toString();
-        }
-
-        public void setTestFile(String testFile) {
-            this.testFile = new File(testFile);
-        }
-    }
-
-    public class TestClass5 implements ReflectionConfigurable {
-        public boolean intercepted;
-        public boolean willIntercept = true;
-        public TestClass5 nest;
-
-        public void configureProperties(Properties props) {
-            // Do nothing
-        }
-
-        public Properties retrieveProperties(Properties props) {
-            return null;
-        }
-
-        public boolean acceptConfig(String key, String val) {
-            intercepted = true;
-
-            return !willIntercept;
-        }
-
-        public TestClass5 getNest() {
-            return nest;
-        }
-
-        public void setNest(TestClass5 nest) {
-            this.nest = nest;
-        }
-    }
-
-    public class TestClass6 {
-        public TestClass6 nestNotConfig;
-        public TestClass5 nestConfig;
-
-        public TestClass6 getNestNotConfig() {
-            return nestNotConfig;
-        }
-
-        public void setNestNotConfig(TestClass6 nestNotConfig) {
-            this.nestNotConfig = nestNotConfig;
-        }
-
-        public TestClass5 getNestConfig() {
-            return nestConfig;
-        }
-
-        public void setNestConfig(TestClass5 nestConfig) {
-            this.nestConfig = nestConfig;
-        }
-    }
-}
diff --git a/trunk/activemq-tooling/maven-activemq-plugin/pom.xml b/trunk/activemq-tooling/maven-activemq-plugin/pom.xml
deleted file mode 100644
index 82a27c4..0000000
--- a/trunk/activemq-tooling/maven-activemq-plugin/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq.tooling</groupId>
-    <artifactId>activemq-tooling</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>maven-activemq-plugin</artifactId>
-  <packaging>maven-plugin</packaging>
-  <name>ActiveMQ :: StartUp Plugin</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-console</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derbynet</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-</project>
diff --git a/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java b/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java
deleted file mode 100644
index 574e07d..0000000
--- a/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * 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.maven;
-
-/**
- * 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.
- */
-
-import java.util.Properties;
-
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Goal which starts an activemq broker.
- * 
- * @goal run
- * @phase process-sources
- */
-public class BrokerMojo extends AbstractMojo {
-    /**
-     * The maven project.
-     * 
-     * @parameter expression="${project}"
-     * @required
-     * @readonly
-     */
-    protected MavenProject project;
-
-    /**
-     * The broker configuration uri The list of currently supported URI syntaxes
-     * is described <a
-     * href="http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html">here</a>
-     * 
-     * @parameter expression="${configUri}"
-     *            default-value="broker:(tcp://localhost:61616)?useJmx=false&persistent=false"
-     * @required
-     */
-    private String configUri;
-
-    /**
-     * Indicates whether to fork the broker, useful for integration tests.
-     * 
-     * @parameter expression="${fork}" default-value="false"
-     */
-    private boolean fork;
-
-    /**
-     * System properties to add
-     * 
-     * @parameter expression="${systemProperties}"
-     */
-    private Properties systemProperties;
-
-    public void execute() throws MojoExecutionException {
-        try {
-            setSystemProperties();
-            getLog().info("Loading broker configUri: " + configUri);
-
-            final BrokerService broker = BrokerFactory.createBroker(configUri);
-            if (fork) {
-                new Thread(new Runnable() {
-                    public void run() {
-                        try {
-                            broker.start();
-                            waitForShutdown(broker);
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
-                    }
-                }).start();
-            } else {
-                broker.start();
-                waitForShutdown(broker);
-            }
-        } catch (Exception e) {
-            throw new MojoExecutionException("Failed to start ActiveMQ Broker", e);
-        }
-    }
-
-    /**
-     * Wait for a shutdown invocation elsewhere
-     * 
-     * @throws Exception
-     */
-    protected void waitForShutdown(BrokerService broker) throws Exception {
-        final boolean[] shutdown = new boolean[] {
-            false
-        };
-        Runtime.getRuntime().addShutdownHook(new Thread() {
-            public void run() {
-                synchronized (shutdown) {
-                    shutdown[0] = true;
-                    shutdown.notify();
-                }
-            }
-        });
-
-        // Wait for any shutdown event
-        synchronized (shutdown) {
-            while (!shutdown[0]) {
-                try {
-                    shutdown.wait();
-                } catch (InterruptedException e) {
-                }
-            }
-        }
-
-        // Stop broker
-        broker.stop();
-    }
-
-    /**
-     * Set system properties
-     */
-    protected void setSystemProperties() {
-        // Set the default properties
-        System.setProperty("activemq.base", project.getBuild().getDirectory() + "/");
-        System.setProperty("activemq.home", project.getBuild().getDirectory() + "/");
-        System.setProperty("org.apache.activemq.UseDedicatedTaskRunner", "true");
-        System.setProperty("org.apache.activemq.default.directory.prefix", project.getBuild().getDirectory() + "/");
-        System.setProperty("derby.system.home", project.getBuild().getDirectory() + "/");
-        System.setProperty("derby.storage.fileSyncTransactionLog", "true");
-
-        // Overwrite any custom properties
-        System.getProperties().putAll(systemProperties);
-    }
-}
diff --git a/trunk/activemq-tooling/pom.xml b/trunk/activemq-tooling/pom.xml
deleted file mode 100644
index e46efd9..0000000
--- a/trunk/activemq-tooling/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <groupId>org.apache.activemq.tooling</groupId>
-  <artifactId>activemq-tooling</artifactId>
-  <packaging>pom</packaging>
-  <name>ActiveMQ Tooling</name>
-
-  <modules>
-    <module>maven-activemq-memtest-plugin</module>
-    <module>maven-activemq-perf-plugin</module>
-    <module>maven-activemq-plugin</module>
-  </modules> 
-
-</project>
diff --git a/trunk/activemq-web-console/README.txt b/trunk/activemq-web-console/README.txt
deleted file mode 100755
index 44dfc71..0000000
--- a/trunk/activemq-web-console/README.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-Welcome to the ActiveMQ Web Console
-
-To run the console you must install a recent distro of Maven
-such as version 2.0.4 or later
-	
-		http://maven.apache.org/
-
-You can then run the ActiveMQ Web Console via the following command.
-
-	mvn jetty:run
-
diff --git a/trunk/activemq-web-console/pom.xml b/trunk/activemq-web-console/pom.xml
deleted file mode 100755
index e3c8c3e..0000000
--- a/trunk/activemq-web-console/pom.xml
+++ /dev/null
@@ -1,302 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-web-console</artifactId>
-  <packaging>war</packaging>
-  <name>ActiveMQ :: Web Console</name>
-  <description>Web Console for ActiveMQ</description>
-    
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-war-plugin</artifactId>
-        <version>2.1-beta-1</version>
-        <configuration>
-          <packagingExcludes>
-            WEB-INF/lib/jetty*.jar,
-            WEB-INF/lib/servlet*.jar
-          </packagingExcludes>
-            <archive>
-            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
-          </archive>          
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>jetty-maven-plugin</artifactId>
-        <version>${jetty-version}</version>
-        <configuration>
-          <connectors>
-            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
-              <port>${jetty.port}</port>
-              <maxIdleTime>60000</maxIdleTime>
-            </connector>
-          </connectors>
-
-          <webAppConfig>
-            <contextPath>/</contextPath>
-          </webAppConfig>
-
-          <systemProperties>
-            <!-- enable easy connection to JConsole -->
-            <systemProperty>
-              <name>com.sun.management.jmxremote</name>
-              <value />
-            </systemProperty>
-
-            <!-- Start an own broker -->
-            <systemProperty>
-              <name>webconsole.type</name>
-              <value>embedded</value>
-            </systemProperty>
-
-            <!--
-               Use the following configuration to connect to a remote broker using JMX
-                        <systemProperty>
-                          <name>webconsole.type</name>
-                          <value>properties</value>
-                        </systemProperty>
-                        <systemProperty>
-                          <name>webconsole.jms.url</name>
-                          <value>tcp://localhost:61616</value>
-                        </systemProperty>
-                        <systemProperty>
-                          <name>webconsole.jmx.url</name>
-                          <value>service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</value>
-                        </systemProperty>
-            -->
-          </systemProperties>
-          <scanIntervalSeconds>10</scanIntervalSeconds>
-        </configuration>
-      </plugin>
-        <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>bundle-manifest</id>
-            <phase>process-classes</phase>
-            <goals>
-              <goal>manifest</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <supportedProjectTypes>
-            <supportedProjectType>jar</supportedProjectType>
-            <supportedProjectType>bundle</supportedProjectType>
-            <supportedProjectType>war</supportedProjectType>
-          </supportedProjectTypes>
-          <instructions>
-            <Webapp-Context>activemqweb</Webapp-Context>
-            <Web-ContextPath>activemqweb</Web-ContextPath>
-            <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
-            <Embed-Directory>WEB-INF/lib</Embed-Directory>
-            <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
-            <Embed-Transitive>true</Embed-Transitive>
-            <Import-Package>
-				org.xml.sax,
-				org.xml.sax.helpers,
-				javax.xml.parsers,
-				javax.xml.transform,
-				javax.management.remote,
-				javax.naming,
-				org.w3c.dom,
-				javax.servlet*,
-				javax.servlet.jsp,
-				javax.servlet.jsp.tagext,
-				javax.servlet.jsp.el,
-				javax.management,
-				javax.management.openmbean,
-				javax.net,
-				org.apache.commons.logging*;version="[1.1,2)";resolution:=optional,
-				org.slf4j*;version="[1.5,2)";resolution:=optional,
-				org.apache.log4j*;version="[1.2.14,2)";resolution:=optional,
-			</Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-servlet_2.5_spec</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    
-    <!-- j2ee jars -->
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jacc_1.1_spec</artifactId>
-    </dependency>
-
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-web</artifactId>
-    </dependency>
-
-    <!-- XMPP support -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-xmpp</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-console</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <!-- TODO this should not be needed, but transitive dependencies are not working -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-jaas</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-    </dependency>
-
-    <!-- web container -->
-    <dependency>
-      <groupId>org.eclipse.jetty.aggregate</groupId>
-      <artifactId>jetty-all-server</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mortbay.jetty</groupId>
-      <artifactId>jsp-2.1-glassfish</artifactId>
-      <scope>provided</scope>
-    </dependency> 
- 
-    <!-- enable commons-logging when inside jetty6:run -->
-    <!--
-    <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>jcl104-over-slf4j</artifactId>
-        <version>1.5.0</version>
-    </dependency>
-    -->
-    <!--
-        <dependency>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-jcl</artifactId>
-        </dependency>
-    -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
-
-
-    <!-- SiteMesh for layout -->
-    <dependency>
-      <groupId>opensymphony</groupId>
-      <artifactId>sitemesh</artifactId>
-    </dependency>
-    
-    <!-- JSTL support -->
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>jstl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>taglibs</groupId>
-      <artifactId>standard</artifactId>
-    </dependency>
-
-
-    <!-- XStream marshalling -->
-    <dependency>
-      <groupId>xpp3</groupId>
-      <artifactId>xpp3</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-    </dependency>
-
-    <!-- used for testing -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- Derby SQL DB used for testing JDBC message store -->
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-    </dependency>
-  </dependencies>
-
-  <properties>
-    <jetty.port>8080</jetty.port>
-<!--      <activemq.osgi.dynamic.import>
-        javax.naming,
-        org.xml.*,
-        javax.xml.*,
-        org.w3c.*,
-    </activemq.osgi.dynamic.import> -->
-  </properties>
-</project>
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java
deleted file mode 100644
index af32291..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * 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.web;
-
-import javax.jms.ConnectionFactory;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-import org.springframework.web.context.support.XmlWebApplicationContext;
-
-/**
- * Starts the WebConsole.
- * 
- * 
- */
-public class WebConsoleStarter implements ServletContextListener {
-    
-    private static final Logger LOG = LoggerFactory.getLogger(WebConsoleStarter.class);
-
-    public void contextInitialized(ServletContextEvent event) {
-        LOG.debug("Initializing ActiveMQ WebConsole...");
-
-        ServletContext servletContext = event.getServletContext();
-        WebApplicationContext context = createWebapplicationContext(servletContext);
-
-        initializeWebClient(servletContext, context);
-
-        LOG.info("ActiveMQ WebConsole initialized.");
-    }
-
-    private WebApplicationContext createWebapplicationContext(ServletContext servletContext) {
-        String webconsoleType = System.getProperty("webconsole.type", "embedded");
-        String configuration = "/WEB-INF/webconsole-" + webconsoleType + ".xml";
-
-        XmlWebApplicationContext context = new XmlWebApplicationContext();
-        context.setServletContext(servletContext);
-        context.setConfigLocations(new String[] {
-            configuration
-        });
-        context.refresh();
-        context.start();
-
-        servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, context);
-
-        return context;
-    }
-
-    private void initializeWebClient(ServletContext servletContext, WebApplicationContext context) {
-        ConnectionFactory connectionFactory = (ConnectionFactory)context.getBean("connectionFactory");
-        servletContext.setAttribute(WebClient.CONNECTION_FACTORY_ATTRIBUTE, connectionFactory);
-    }
-
-    public void contextDestroyed(ServletContextEvent event) {
-        XmlWebApplicationContext context = (XmlWebApplicationContext)WebApplicationContextUtils.getWebApplicationContext(event.getServletContext());
-        if (context != null) {
-            context.stop();
-            context.destroy();
-        }
-        // do nothing, since the context is destoyed anyway
-    }
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java
deleted file mode 100644
index a4eec45..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * Copies a message from one to another queue
- * 
- * @author <a href="http://www.nighttale.net">Dejan Bosanac</a>
- * 
- */
-public class CopyMessage extends DestinationFacade implements Controller {
-    private String messageId;
-    private String destination;
-    private static final Logger log = LoggerFactory.getLogger(CopyMessage.class);
-
-    public CopyMessage(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        if (messageId != null) {
-            QueueViewMBean queueView = getQueueView();
-            if (queueView != null) {
-            	log.info(getJMSDestination() + "(" + messageId + ")" + " copy to " + destination);
-                queueView.copyMessageTo(messageId, destination);
-            } else {
-            	log.warn("No queue named: " + getPhysicalDestinationName());
-            }
-        }
-        return redirectToBrowseView();
-    }
-
-    public String getMessageId() {
-        return messageId;
-    }
-
-    public void setMessageId(String messageId) {
-        this.messageId = messageId;
-    }
-    
-    
-
-    public String getDestination() {
-		return destination;
-	}
-
-	public void setDestination(String destination) {
-		this.destination = destination;
-	}
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java
deleted file mode 100644
index d3e115f..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * 
- * 
- */
-public class CreateDestination extends DestinationFacade implements Controller {
-
-    public CreateDestination(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        addDestination();
-        return redirectToBrowseView();
-    }
-
-	public String[] getSupportedHttpMethods() {
-		return new String[]{"POST"};
-	}
-    
-    
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java
deleted file mode 100644
index fecfec9..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DurableSubscriberFacade;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * 
- * 
- */
-public class CreateSubscriber extends DurableSubscriberFacade implements Controller {
-    private String selector;
-
-    public CreateSubscriber(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public String getSelector() {
-        return selector;
-    }
-
-    public void setSelector(String selector) {
-        this.selector = selector;
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        if (selector != null && selector.length() == 0) {
-            selector = null;
-        }
-        getBrokerAdmin().createDurableSubscriber(getClientId(), getSubscriberName(), getValidDestination(), selector);
-        return new ModelAndView("redirect:subscribers.jsp");
-    }
-    
-	public String[] getSupportedHttpMethods() {
-		return new String[]{"POST"};
-	}
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java
deleted file mode 100644
index af3fbce..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * 
- * 
- */
-public class DeleteDestination extends DestinationFacade implements Controller {
-
-    public DeleteDestination(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        removeDestination();
-        return redirectToBrowseView();
-    }
-
-    
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteJob.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteJob.java
deleted file mode 100644
index 9331840..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteJob.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.activemq.broker.jmx.JobSchedulerViewMBean;
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * 
- */
-public class DeleteJob extends DestinationFacade implements Controller {
-    private String jobId;
-    private static final Logger LOG = LoggerFactory.getLogger(DeleteJob.class);
-
-    public DeleteJob(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        if (jobId != null) {
-            JobSchedulerViewMBean jobScheduler = getBrokerFacade().getJobScheduler();
-            if (jobScheduler != null) {
-                jobScheduler.removeJob(jobId);
-                LOG.info("Removed scheduled Job " + jobId);
-            } else {
-            	LOG.warn("Scheduler not configured");
-            }
-        }
-        return new ModelAndView("redirect:scheduled.jsp");
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String id) {
-        this.jobId=id;
-    }
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
deleted file mode 100644
index 1f060fe..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * 
- */
-public class DeleteMessage extends DestinationFacade implements Controller {
-    private String messageId;
-    private static final Logger log = LoggerFactory.getLogger(DeleteMessage.class);
-
-    public DeleteMessage(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        if (messageId != null) {
-            QueueViewMBean queueView = getQueueView();
-            if (queueView != null) {
-                log.info("Removing message " + getJMSDestination() + "(" + messageId + ")");
-                queueView.removeMessage(messageId);
-            } else {
-            	log.warn("No queue named: " + getPhysicalDestinationName());
-            }
-        }
-        return redirectToBrowseView();
-    }
-
-    public String getMessageId() {
-        return messageId;
-    }
-
-    public void setMessageId(String messageId) {
-        this.messageId = messageId;
-    }
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java
deleted file mode 100644
index 460a780..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DurableSubscriberFacade;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- *
- * 
- */
-public class DeleteSubscriber extends DurableSubscriberFacade implements Controller {
-
-    public DeleteSubscriber(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        getBrokerAdmin().destroyDurableSubscriber(getClientId(), getSubscriberName());
-        return new ModelAndView("redirect:subscribers.jsp");
-    }
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java
deleted file mode 100644
index 53d1e68..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * Moves a message from one to another queue
- * 
- * @author <a href="http://www.nighttale.net">Dejan Bosanac</a>
- * 
- */
-public class MoveMessage extends DestinationFacade implements Controller {
-    private String messageId;
-    private String destination;
-    private static final Logger log = LoggerFactory.getLogger(MoveMessage.class);
-
-    public MoveMessage(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        if (messageId != null) {
-            QueueViewMBean queueView = getQueueView();
-            if (queueView != null) {
-            	log.info("Moving message " + getJMSDestination() + "(" + messageId + ")" + " to " + destination);
-                queueView.moveMessageTo(messageId, destination);
-            } else {
-            	log.warn("No queue named: " + getPhysicalDestinationName());
-            }
-        }
-        return redirectToBrowseView();
-    }
-
-    public String getMessageId() {
-        return messageId;
-    }
-
-    public void setMessageId(String messageId) {
-        this.messageId = messageId;
-    }
-    
-    
-
-    public String getDestination() {
-		return destination;
-	}
-
-	public void setDestination(String destination) {
-		this.destination = destination;
-	}
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/PurgeDestination.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/PurgeDestination.java
deleted file mode 100644
index 1921b0c..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/PurgeDestination.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.web.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * 
- */
-public class PurgeDestination extends DestinationFacade implements Controller {
-
-    public PurgeDestination(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        purgeDestination();
-        return redirectToBrowseView();
-    }
-
-    public void purgeDestination() throws Exception {
-        if (isQueue()) {
-            getBrokerFacade().purgeQueue(createDestination());
-        } else {
-            throw new UnsupportedOperationException("Purge supported for queues only. Receieved JMSDestinationType=" + getJMSDestinationType());
-        }
-    }
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
deleted file mode 100644
index e3c611c..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * 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.web.controller;
-
-import java.util.Iterator;
-import java.util.Map;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.web.BrokerFacade;
-import org.apache.activemq.web.DestinationFacade;
-import org.apache.activemq.web.WebClient;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.mvc.Controller;
-
-/**
- * Sends a message
- * 
- * 
- */
-public class SendMessage extends DestinationFacade implements Controller {
-
-    private String jmsText;
-    private boolean jmsPersistent;
-    private int jmsPriority;
-    private int jmsTimeToLive = -1;
-    private String jmsCorrelationID;
-    private String jmsReplyTo;
-    private String jmsType;
-    private int jmsMessageCount = 1;
-    private String jmsMessageCountHeader = "JMSXMessageNumber";
-    private boolean redirectToBrowse;
-
-    public SendMessage(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        WebClient client = WebClient.getWebClient(request);
-        ActiveMQDestination dest = createDestination();
-
-        sendMessages(request, client, dest);
-        if (redirectToBrowse) {
-            if (isQueue()) {
-                return new ModelAndView("redirect:browse.jsp?destination=" + getJMSDestination());
-            }
-        }
-        return redirectToBrowseView();
-    }
-
-    protected void sendMessages(HttpServletRequest request, WebClient client, ActiveMQDestination dest)
-            throws JMSException {
-        if (jmsMessageCount <= 1) {
-            jmsMessageCount = 1;
-        }
-        for (int i = 0; i < jmsMessageCount; i++) {
-            Message message = createMessage(client, request);
-            appendHeaders(message, request);
-            if (jmsMessageCount > 1) {
-                message.setIntProperty(jmsMessageCountHeader, i + 1);
-            }
-
-            client.send(dest, message, jmsPersistent, jmsPriority, jmsTimeToLive);
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-
-    public String getJMSCorrelationID() {
-        return jmsCorrelationID;
-    }
-
-    public void setJMSCorrelationID(String correlationID) {
-        jmsCorrelationID = correlationID;
-    }
-
-    public String getJMSReplyTo() {
-        return jmsReplyTo;
-    }
-
-    public void setJMSReplyTo(String replyTo) {
-        jmsReplyTo = replyTo;
-    }
-
-    public String getJMSType() {
-        return jmsType;
-    }
-
-    public void setJMSType(String type) {
-        jmsType = type;
-    }
-
-    public boolean isJMSPersistent() {
-        return jmsPersistent;
-    }
-
-    public void setJMSPersistent(boolean persistent) {
-        this.jmsPersistent = persistent;
-    }
-
-    public int getJMSPriority() {
-        return jmsPriority;
-    }
-
-    public void setJMSPriority(int priority) {
-        this.jmsPriority = priority;
-    }
-
-    public String getJMSText() {
-        return jmsText;
-    }
-
-    public void setJMSText(String text) {
-        this.jmsText = text;
-    }
-
-    public int getJMSTimeToLive() {
-        return jmsTimeToLive;
-    }
-
-    public void setJMSTimeToLive(int timeToLive) {
-        this.jmsTimeToLive = timeToLive;
-    }
-
-    public int getJMSMessageCount() {
-        return jmsMessageCount;
-    }
-
-    public void setJMSMessageCount(int copies) {
-        jmsMessageCount = copies;
-    }
-
-    public String getJMSMessageCountHeader() {
-        return jmsMessageCountHeader;
-    }
-
-    public void setJMSMessageCountHeader(String messageCountHeader) {
-        jmsMessageCountHeader = messageCountHeader;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected Message createMessage(WebClient client, HttpServletRequest request) throws JMSException {
-        if (jmsText != null) {
-            return client.getSession().createTextMessage(jmsText);
-        }
-        // TODO create Bytes message from request body...
-        return client.getSession().createMessage();
-    }
-
-    protected void appendHeaders(Message message, HttpServletRequest request) throws JMSException {
-        message.setJMSCorrelationID(jmsCorrelationID);
-        if (jmsReplyTo != null && jmsReplyTo.trim().length() > 0) {
-            message.setJMSReplyTo(ActiveMQDestination.createDestination(jmsReplyTo, ActiveMQDestination.QUEUE_TYPE));
-        }
-        message.setJMSType(jmsType);
-
-        // now lets add all of the parameters
-        Map map = request.getParameterMap();
-        if (map != null) {
-            for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
-                Map.Entry entry = (Map.Entry) iter.next();
-                String name = (String) entry.getKey();
-                if (name.equals("secret")) {
-                	continue;
-                }
-                Object value = entry.getValue();
-                if (isValidPropertyName(name)) {
-                    if (value instanceof String[]) {
-                        String[] array = (String[]) value;
-                        if (array.length > 0) {
-                            value = array[0];
-                        } else {
-                            value = null;
-                        }
-                    }
-                    if ((name.equals("AMQ_SCHEDULED_DELAY") || name.equals("AMQ_SCHEDULED_PERIOD"))) {
-                        if (value != null) {
-                            String str = value.toString().trim();
-                            if (str.length() > 0) {
-                                message.setLongProperty(name, Long.parseLong(str));
-                            }
-                        }
-                    } else if (name.equals("AMQ_SCHEDULED_REPEAT")) {
-                        if (value != null) {
-                            String str = value.toString().trim();
-                            if (str.length() > 0) {
-                                message.setIntProperty(name, Integer.parseInt(str));
-                            }
-                        }
-                    } else if (name.equals("AMQ_SCHEDULED_CRON")) {
-                        if (value != null) {
-                            String str = value.toString().trim();
-                            if (str.length() > 0) {
-                                message.setStringProperty(name, str);
-                            }
-                        }
-                    } else {
-                        if (value instanceof String) {
-                            String text = value.toString().trim();
-                            if (text.length() == 0) {
-                                value = null;
-                            } else {
-                                value = text;
-                            }
-                        }
-                        if (value != null) {
-                            message.setObjectProperty(name, value);
-                        }
-                    }
-                }
-            }
-        }
-    }
-    protected boolean isValidPropertyName(String name) {
-        // allow JMSX extensions or non JMS properties
-        return name.startsWith("JMSX") || !name.startsWith("JMS");
-    }
-    
-	public String[] getSupportedHttpMethods() {
-		return new String[]{"POST"};
-	}
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt
deleted file mode 100644
index 7c6fcf1..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * 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.
- */
-
-With a small amount of work to the controller, we should be able to delete these classes and instead
-just expose the methods of the facades directly
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java
deleted file mode 100644
index e949371..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.web.filter;
-
-import java.io.IOException;
-import java.util.AbstractMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.springframework.web.bind.ServletRequestDataBinder;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-/**
- * Exposes Spring ApplicationContexts to JSP EL and other view technologies.
- * Currently a variable is placed in application scope (by default called
- * 'applicationContext') so that POJOs can be pulled out of Spring in a JSP page
- * to render things using EL expressions. <br/>
- * 
- * e.g. ${applicationContext.cheese} would access the cheese POJO. Or
- * ${applicationContext.cheese.name} would access the name property of the
- * cheese POJO. <br/>
- * 
- * You can then use JSTL to work with these POJOs such as &lt;c.set var="myfoo"
- * value="${applicationContext.foo}"/&gt; <br/>
- * 
- * In addition to applicationContext a 'requestContext' variable is created
- * which will automatically bind any request parameters to the POJOs extracted
- * from the applicationContext - which is ideal for POJOs which implement
- * queries in view technologies.
- * 
- * 
- */
-public class ApplicationContextFilter implements Filter {
-
-    private ServletContext servletContext;
-    private String applicationContextName = "applicationContext";
-    private String requestContextName = "requestContext";
-    private String requestName = "request";
-
-    public void init(FilterConfig config) throws ServletException {
-        this.servletContext = config.getServletContext();
-        this.applicationContextName = getInitParameter(config, "applicationContextName", applicationContextName);
-        this.requestContextName = getInitParameter(config, "requestContextName", requestContextName);
-        this.requestName = getInitParameter(config, "requestName", requestName);
-
-        // register the application context in the applicationScope
-        WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
-        Map wrapper = createApplicationContextWrapper(context);
-        servletContext.setAttribute(applicationContextName, wrapper);
-    }
-
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
-        // lets register a requestContext in the requestScope
-        Map requestContextWrapper = createRequestContextWrapper(request);
-        request.setAttribute(requestContextName, requestContextWrapper);
-        request.setAttribute(requestName, request);
-        chain.doFilter(request, response);
-    }
-
-    public void destroy() {
-    }
-
-    public ServletContext getServletContext() {
-        return servletContext;
-    }
-
-    public String getApplicationContextName() {
-        return applicationContextName;
-    }
-
-    public void setApplicationContextName(String variableName) {
-        this.applicationContextName = variableName;
-    }
-
-    public String getRequestContextName() {
-        return requestContextName;
-    }
-
-    public void setRequestContextName(String requestContextName) {
-        this.requestContextName = requestContextName;
-    }
-
-    protected String getInitParameter(FilterConfig config, String key, String defaultValue) {
-        String parameter = config.getInitParameter(key);
-        return (parameter != null) ? parameter : defaultValue;
-    }
-
-    /**
-     * Creates a wrapper around the web application context so that it can be
-     * accessed easily from inside JSP EL (or other expression languages in
-     * other view technologies).
-     */
-    protected Map createApplicationContextWrapper(final WebApplicationContext context) {
-        Map wrapper = new AbstractMap() {
-
-            public WebApplicationContext getContext() {
-                return context;
-            }
-
-            public Object get(Object key) {
-                if (key == null) {
-                    return null;
-                }
-                return context.getBean(key.toString());
-            }
-
-            public Set entrySet() {
-                return Collections.EMPTY_SET;
-            }
-
-        };
-        return wrapper;
-    }
-
-    /**
-     * Creates a wrapper around the request context (e.g. to allow POJOs to be
-     * auto-injected from request parameter values etc) so that it can be
-     * accessed easily from inside JSP EL (or other expression languages in
-     * other view technologies).
-     */
-    protected Map createRequestContextWrapper(final ServletRequest request) {
-        final WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
-        Map wrapper = new AbstractMap() {
-
-            public WebApplicationContext getContext() {
-                return context;
-            }
-
-            public Object get(Object key) {
-                if (key == null) {
-                    return null;
-                }
-                return bindRequestBean(context.getBean(key.toString()), request);
-            }
-
-            public Set entrySet() {
-                return Collections.EMPTY_SET;
-            }
-
-        };
-        return wrapper;
-
-    }
-
-    /**
-     * Binds properties from the request parameters to the given POJO which is
-     * useful for POJOs which are configurable via request parameters such as
-     * for query/view POJOs
-     */
-    protected Object bindRequestBean(Object bean, ServletRequest request) {
-        ServletRequestDataBinder binder = new ServletRequestDataBinder(bean, null);
-        binder.bind(request);
-        return bean;
-    }
-
-}
diff --git a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java b/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java
deleted file mode 100644
index 3e83ea1..0000000
--- a/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * 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.web.handler;
-
-import java.util.Arrays;
-import java.util.UUID;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.activemq.web.DestinationFacade;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.bind.ServletRequestDataBinder;
-import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping;
-import org.springframework.web.servlet.HandlerExecutionChain;
-
-/**
- * 
- */
-public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping {
-    private static final transient Logger LOG = LoggerFactory.getLogger(BindingBeanNameUrlHandlerMapping.class);
-
-    protected Object getHandlerInternal(HttpServletRequest request) throws Exception {
-        Object object = super.getHandlerInternal(request);
-
-        if (object instanceof String) {
-            String handlerName = (String) object;
-            object = getApplicationContext().getBean(handlerName);
-        }
-        if (object instanceof HandlerExecutionChain) {
-            HandlerExecutionChain handlerExecutionChain = (HandlerExecutionChain) object;
-            object = handlerExecutionChain.getHandler();
-        }
-        
-        if (object != null) {
-        	// prevent CSRF attacks
-        	if (object instanceof DestinationFacade) {
-        		// check supported methods
-        		if (!Arrays.asList(((DestinationFacade)object).getSupportedHttpMethods()).contains(request.getMethod())) {
-        			throw new UnsupportedOperationException("Unsupported method " + request.getMethod() + " for path " + request.getRequestURI());
-        		}
-        		// check the 'secret'
-        		if (!request.getSession().getAttribute("secret").equals(request.getParameter("secret"))) {
-        			throw new UnsupportedOperationException("Possible CSRF attack");
-        		}
-        	}
-        	
-        	
-            ServletRequestDataBinder binder = new ServletRequestDataBinder(object, "request");
-            try {
-                binder.bind(request);
-                binder.setIgnoreUnknownFields(true);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Bound POJO is now: " + object);
-                }
-            }
-            catch (Exception e) {
-                LOG.warn("Caught: " + e, e);
-                throw e;
-            }
-        }
-        
-        return object;
-    }
-}
diff --git a/trunk/activemq-web-console/src/main/resources/log4j.properties b/trunk/activemq-web-console/src/main/resources/log4j.properties
deleted file mode 100755
index a4f59aa..0000000
--- a/trunk/activemq-web-console/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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, stdout
-
-log4j.logger.org.apache.activemq=INFO
-log4j.logger.org.apache.activemq.spring=WARN
-log4j.logger.org.springframework=warn
-
-
-# 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=activemq-console.log
-log4j.appender.out.append=true
diff --git a/trunk/activemq-web-console/src/main/webapp/404.html b/trunk/activemq-web-console/src/main/webapp/404.html
deleted file mode 100644
index b9bb837..0000000
--- a/trunk/activemq-web-console/src/main/webapp/404.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!--
-  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.
--->
- 
- 
- 
- 
- 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
-<html> 
-<head> 
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
-    <title>Apache ActiveMQ</title> 
-    <style type="text/css" media="screen"> 
-        @import url(styles/type-settings.css);
-        @import url(styles/site.css);
-    </style> 
-    
- 
-    
-</head> 
- 
-<body> 
- 
- 
-<div class="white_box"> 
-    <div class="header"> 
-        <div class="header_l"> 
-            <div class="header_r"> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="content"> 
-        <div class="content_l"> 
-            <div class="content_r"> 
- 
-                <div> 
- 
-                    <!-- Banner --> 
-                    <div id="asf_logo"> 
-                        <div id="activemq_logo"> 
-                            <a style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;"
-                               href="http://activemq.apache.org/"
-                               title="The most popular and powerful open source Message Broker">ActiveMQ</a> 
-                            <a style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;"
-                               href="http://www.apache.org/" title="The Apache Software Foundation">ASF</a> 
-                        </div> 
-                    </div> 
- 
- 
-                    <div class="top_red_bar"> 
-                        <div id="site-breadcrumbs"> 
-                        </div> 
-                        <div id="site-quicklinks"><P> 
-                            <a href="http://activemq.apache.org/support.html"
-                               title="Get help and support using Apache ActiveMQ">Support</a></p> 
-                        </div> 
-                    </div> 
- 
-                    <table border="0"> 
-                        <tbody> 
-                            <tr> 
-                                <td valign="top" width="100%" style="overflow:hidden;"> 
-                                    <div class="body-content"> 
-                                        <p class="error">Page Not Found!</p> 
-                                            
-                                                <p>What do you want to do next?</p>
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a title="Manage ActiveMQ broker" href="/admin/">Manage ActiveMQ broker</a></li> 
-                                                    <li><a title="Manage Camel instance" href="/camel/">Manage Camel instance</a></li> 
-                                                    <li><a title="See some Web demos" href="/demo/">See some Web demos</a></li>  
-                                                </ul> 
-                                    </div> 
-                                </td> 
-                                <td valign="top"> 
- 
-                                    <div class="navigation"> 
-                                        <div class="navigation_top"> 
-                                            <div class="navigation_bottom"> 
-                                                <H3>Useful Links</H3> 
- 
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a href="http://activemq.apache.org/"
-                                                           title="The most popular and powerful open source Message Broker">Documentation</a></li> 
-                                                    <li><a href="http://activemq.apache.org/faq.html">FAQ</a></li> 
-                                                    <li><a href="http://activemq.apache.org/download.html">Downloads</a> 
-                                                    </li> 
-                                                    <li><a href="http://activemq.apache.org/discussion-forums.html">Forums</a> 
-                                                    </li> 
-                                                </ul> 
-                                            </div> 
-                                        </div> 
-                                    </div> 
-                                </td> 
-                            </tr> 
-                        </tbody> 
-                    </table> 
- 
- 
-                    <div class="bottom_red_bar"></div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="black_box"> 
-        <div class="footer"> 
-            <div class="footer_l"> 
-                <div class="footer_r"> 
-                    <div> 
-                        Copyright 2005-2007 The Apache Software Foundation.
- 
-                        (<a href="?printable=true">printable version</a>)
-                    </div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-</div> 
-<div class="design_attribution"><a href="http://hiramchirino.com/">Graphic Design By Hiram</a></div> 
- 
-</body> 
-</html> 
diff --git a/trunk/activemq-web-console/src/main/webapp/500.html b/trunk/activemq-web-console/src/main/webapp/500.html
deleted file mode 100644
index 959bd15..0000000
--- a/trunk/activemq-web-console/src/main/webapp/500.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!--
-  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.
--->
- 
- 
- 
- 
- 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
-<html> 
-<head> 
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
-    <title>Apache ActiveMQ</title> 
-    <style type="text/css" media="screen"> 
-        @import url(styles/type-settings.css);
-        @import url(styles/site.css);
-    </style> 
-    
- 
-    
-</head> 
- 
-<body> 
- 
- 
-<div class="white_box"> 
-    <div class="header"> 
-        <div class="header_l"> 
-            <div class="header_r"> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="content"> 
-        <div class="content_l"> 
-            <div class="content_r"> 
- 
-                <div> 
- 
-                    <!-- Banner --> 
-                    <div id="asf_logo"> 
-                        <div id="activemq_logo"> 
-                            <a style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;"
-                               href="http://activemq.apache.org/"
-                               title="The most popular and powerful open source Message Broker">ActiveMQ</a> 
-                            <a style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;"
-                               href="http://www.apache.org/" title="The Apache Software Foundation">ASF</a> 
-                        </div> 
-                    </div> 
- 
- 
-                    <div class="top_red_bar"> 
-                        <div id="site-breadcrumbs"> 
-                        </div> 
-                        <div id="site-quicklinks"><P> 
-                            <a href="http://activemq.apache.org/support.html"
-                               title="Get help and support using Apache ActiveMQ">Support</a></p> 
-                        </div> 
-                    </div> 
- 
-                    <table border="0"> 
-                        <tbody> 
-                            <tr> 
-                                <td valign="top" width="100%" style="overflow:hidden;"> 
-                                    <div class="body-content"> 
-                                        <p class="error">Error!</p> 
-                                        <p align="center">Exception occurred while processing this request, check the log for more information!</p>
-                                            
-                                                <p>What do you want to do next?</p>
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a title="Manage ActiveMQ broker" href="/admin/">Manage ActiveMQ broker</a></li> 
-                                                    <li><a title="Manage Camel instance" href="/camel/">Manage Camel instance</a></li> 
-                                                    <li><a title="See some Web demos" href="/demo/">See some Web demos</a></li>  
-                                                </ul> 
-                                    </div> 
-                                </td> 
-                                <td valign="top"> 
- 
-                                    <div class="navigation"> 
-                                        <div class="navigation_top"> 
-                                            <div class="navigation_bottom"> 
-                                                <H3>Useful Links</H3> 
- 
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a href="http://activemq.apache.org/"
-                                                           title="The most popular and powerful open source Message Broker">Documentation</a></li> 
-                                                    <li><a href="http://activemq.apache.org/faq.html">FAQ</a></li> 
-                                                    <li><a href="http://activemq.apache.org/download.html">Downloads</a> 
-                                                    </li> 
-                                                    <li><a href="http://activemq.apache.org/discussion-forums.html">Forums</a> 
-                                                    </li> 
-                                                </ul> 
-                                            </div> 
-                                        </div> 
-                                    </div> 
-                                </td> 
-                            </tr> 
-                        </tbody> 
-                    </table> 
- 
- 
-                    <div class="bottom_red_bar"></div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="black_box"> 
-        <div class="footer"> 
-            <div class="footer_l"> 
-                <div class="footer_r"> 
-                    <div> 
-                        Copyright 2005-2007 The Apache Software Foundation.
- 
-                        (<a href="?printable=true">printable version</a>)
-                    </div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-</div> 
-<div class="design_attribution"><a href="http://hiramchirino.com/">Graphic Design By Hiram</a></div> 
- 
-</body> 
-</html> 
diff --git a/trunk/activemq-web-console/src/main/webapp/META-INF/LICENSE b/trunk/activemq-web-console/src/main/webapp/META-INF/LICENSE
deleted file mode 100644
index 8731741..0000000
--- a/trunk/activemq-web-console/src/main/webapp/META-INF/LICENSE
+++ /dev/null
@@ -1,1026 +0,0 @@
-
-                                 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.
-
-=========================================================================
-== 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 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 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 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 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 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.
-
-=========================================================================
-== For the style.css library                                           ==
-== For the common.js library                                           ==
-=========================================================================
-
-<p><em>License</em> </p>
-
-<p>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. </p>
-
-<p>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. </p>
-
-
-<p><strong>1. Definitions</strong> </p>
-
-<ol type="a">
-
-<li>
-<strong>"Collective Work"</strong> 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.
-</li>
-
-<li>
-<strong>"Derivative Work"</strong> 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.</li>
-
-<li>
-<strong>"Licensor"</strong> means the individual or entity that offers the Work under the terms of this License.
-</li>
-
-<li>
-<strong>"Original Author"</strong> means the individual or entity who created the Work.
-</li>
-
-<li>
-<strong>"Work"</strong> means the copyrightable work of authorship offered under the terms of this License.
-</li>
-
-<li>
-<strong>"You"</strong> 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.
-
-</li>
-</ol>
-
-<p><strong>2. Fair Use Rights.</strong> 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. </p>
-
-
-<p><strong>3. License Grant.</strong> 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: </p>
-
-
-<ol type="a">
-<li>
-
-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;
-</li>
-
-<li>
-to create and reproduce Derivative Works;
-</li>
-
-<li>
-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;
-
-</li>
-
-<li>
-to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
-</li>
-
-<li><p>For the avoidance of doubt, where the work is a musical composition:</p>
-
-<ol type="i">
-<li><strong>Performance Royalties Under Blanket Licenses</strong>. 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.</li>
-
-<li><strong>Mechanical Rights and Statutory Royalties</strong>. 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).</li></ol></li>
-
-<li><strong>Webcasting Rights and Statutory Royalties</strong>. 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).</li>
-
-</ol>
-
-
-<p>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.</p>
-
-<p><strong>4. Restrictions.</strong>The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: </p>
-
-
-<ol type="a">
-<li>
-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.
-</li>
-
-
-<li>
-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.
-</li>
-
-</ol>
-
-
-
-
-
-
-<p><strong>5. Representations, Warranties and Disclaimer</strong></p>
-
-<p>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.</p>
-
-
-<p><strong>6. Limitation on Liability.</strong> 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. </p>
-
-<p><strong>7. Termination</strong> </p>
-
-<ol type="a">
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-</ol>
-
-<p><strong>8. Miscellaneous</strong> </p>
-
-<ol type="a">
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-
-<li>
-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.
-
-</li>
-
-<li>
-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.
-</li>
-</ol>
-
-=========================================================================
-== Jetty is under the Apache License v 2.0                             ==
-=========================================================================
-
--- Licenses for included libraries
-
-=========================================================================
-== For jaxb-api and jaxb-impl (CDDL)                                   ==
-== Source code is at java.net                                          ==
-=========================================================================
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
-Version 1.0
-
-    *
-
-      1. Definitions.
-          o
-
-            1.1. “Contributor” means each individual or entity that creates or contributes to the creation of Modifications.
-          o
-
-            1.2. “Contributor Version” means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-          o
-
-            1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-          o
-
-            1.4. “Executable” means the Covered Software in any form other than Source Code.
-          o
-
-            1.5. “Initial Developer” means the individual or entity that first makes Original Software available under this License.
-          o
-
-            1.6. “Larger Work” means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-          o
-
-            1.7. “License” means this document.
-          o
-
-            1.8. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-          o
-
-            1.9. “Modifications” means the Source Code and Executable form of any of the following:
-                +
-
-                  A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-                +
-
-                  B. Any new file that contains any part of the Original Software or previous Modification; or
-                +
-
-                  C. Any new file that is contributed or otherwise made available under the terms of this License.
-          o
-
-            1.10. “Original Software” means the Source Code and Executable form of computer software code that is originally released under this License.
-          o
-
-            1.11. “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-          o
-
-            1.12. “Source Code” means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-          o
-
-            1.13. “You” (or “Your”) 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 which controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-    *
-
-      2. License Grants.
-          o
-
-            2.1. The Initial Developer Grant.
-
-            Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-                +
-
-                  (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-                +
-
-                  (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-                +
-
-                  (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-                +
-
-                  (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
-          o
-
-            2.2. Contributor Grant.
-
-            Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-                +
-
-                  (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-                +
-
-                  (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-                +
-
-                  (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-                +
-
-                  (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
-    *
-
-      3. Distribution Obligations.
-          o
-
-            3.1. Availability of Source Code.
-
-            Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
-          o
-
-            3.2. Modifications.
-
-            The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-          o
-
-            3.3. Required Notices.
-
-            You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-          o
-
-            3.4. Application of Additional Terms.
-
-            You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients’ rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
-          o
-
-            3.5. Distribution of Executable Versions.
-
-            You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient’s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
-          o
-
-            3.6. Larger Works.
-
-            You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-    *
-
-      4. Versions of the License.
-          o
-
-            4.1. New Versions.
-
-            Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-          o
-
-            4.2. Effect of New Versions.
-
-            You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
-          o
-
-            4.3. Modified Versions.
-
-            When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
-    *
-
-      5. DISCLAIMER OF WARRANTY.
-
-      COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-    *
-
-      6. TERMINATION.
-          o
-
-            6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-          o
-
-            6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as “Participant”) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
-          o
-
-            6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-    *
-
-      7. LIMITATION OF LIABILITY.
-
-      UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY’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.
-    *
-
-      8. U.S. GOVERNMENT END USERS.
-
-      The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-    *
-
-      9. MISCELLANEOUS.
-
-      This License represents the complete agreement concerning 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. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction’s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys’ fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
-    *
-
-      10. RESPONSIBILITY FOR CLAIMS.
-
-      As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
-
-=========================================================================
-== jstl and taglibs standard are under either the Apache License v 2.0 or CDDL ==
-=========================================================================
-=========================================================================
-== For JDom                                                            ==
-=========================================================================
-Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows
-    these conditions in the documentation and/or other materials
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
-
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
-
- In addition, we request (but do not require) that you include in the
- end-user documentation provided with the redistribution and/or in the
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JDOM AUTHORS OR THE PROJECT
- 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.
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the JDOM Project and was originally
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>.
-
-=========================================================================
-== For the mx4j, mx4j-remote, and mx4j-tools library                   ==
-=========================================================================
-
-         The MX4J License, Version 1.0
-
-         Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
-
-         Redistribution and use in source and binary forms, with or without
-         modification, are permitted provided that the following conditions
-         are met:
-
-         1. Redistributions of source code must retain the above copyright
-            notice, this list of conditions and the following disclaimer.
-
-         2. 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.
-
-         3. The end-user documentation included with the redistribution,
-            if any, must include the following acknowledgment:
-               "This product includes software developed by the
-                MX4J project (http://mx4j.sourceforge.net)."
-            Alternately, this acknowledgment may appear in the software itself,
-            if and wherever such third-party acknowledgments normally appear.
-
-         4. The name "MX4J" must not be used to endorse or promote
-            products derived from this software without prior written
-            permission.
-            For written permission, please contact
-            biorn_steedom [at] users [dot] sourceforge [dot] net
-
-         5. Products derived from this software may not be called "MX4J",
-            nor may "MX4J" appear in their name, without prior written
-            permission of Simone Bordet.
-
-         THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 MX4J 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.
-         ====================================================================
-
-         This software consists of voluntary contributions made by many
-         individuals on behalf of the MX4J project.  For more information on
-         MX4J, please see
-         <a href="http://mx4j.sourceforge.net" target="_top">the MX4J website</a>.
-
-
-=========================================================================
-== Rome is under the Apache License v 2.0                              ==
-=========================================================================
-=========================================================================
-== For Sitemesh                                                        ==
-=========================================================================
-/* ====================================================================
- * The OpenSymphony Software License, Version 1.1
- *
- * (this license is derived and fully compatible with the Apache Software
- * License - see http://www.apache.org/LICENSE.txt)
- *
- * Copyright (c) 2001-2004 The OpenSymphony Group. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        OpenSymphony Group (http://www.opensymphony.com/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "OpenSymphony" and "The OpenSymphony Group"
- *    must not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact license@opensymphony.com .
- *
- * 5. Products derived from this software may not be called "OpenSymphony"
- *    or "SiteMesh", nor may "OpenSymphony" or "SiteMesh" appear in their
- *    name, without prior written permission of the OpenSymphony Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- * ITS 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 slf4j                                                           ==
-=========================================================================
-Copyright (c) 2004-2007 QOS.ch 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.
-=========================================================================
-== Smackx is under the Apache License v 2.0                            ==
-=========================================================================
-=========================================================================
-== Spring is under the Apache License v 2.0                            ==
-=========================================================================
-=========================================================================
-== Woodstox is under the Apache License v 2.0                          ==
-=========================================================================
-=========================================================================
-== For the xmlpull library                                             ==
-=========================================================================
-
-XMLPULL API IS FREE
--------------------
-
-All of the XMLPULL API source code, compiled code, and documentation
-contained in this distribution *except* for tests (see separate LICENSE_TESTS.txt)
-are in the Public Domain.
-
-XMLPULL API comes with NO WARRANTY or guarantee of fitness for any purpose.
-
-Initial authors:
-
-  Stefan Haustein
-  Aleksander Slominski
-
-2001-12-12
-
-=========================================================================
-== For the xstream library                                             ==
-=========================================================================
-
-(BSD Style License)
-
-Copyright (c) 2003-2004, Joe Walnes
-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 XStream 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.
diff --git a/trunk/activemq-web-console/src/main/webapp/META-INF/NOTICE b/trunk/activemq-web-console/src/main/webapp/META-INF/NOTICE
deleted file mode 100644
index b91150c..0000000
--- a/trunk/activemq-web-console/src/main/webapp/META-INF/NOTICE
+++ /dev/null
@@ -1,107 +0,0 @@
-Apache ActiveMQ
-Copyright 2005-2006 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-=========================================================================
-==  Derby Notice                                                       ==
-=========================================================================
-
-Portions of Derby were orginally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-
-The portion of the functionTests under 'nist' was originally
-developed by the National Institute of Standards and Technology (NIST),
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-==============================================================
- 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.
-
-=========================================================================
-==  Spring Notice                                                      ==
-=========================================================================
-
-This product includes software developed by
-the Apache Software Foundation (http://www.apache.org).
-
-This product also includes software developed by
-Clinton Begin (http://www.ibatis.com).
-
-The end-user documentation included with a redistribution, if any,
-must include the following acknowledgement:
-
- "This product includes software developed by the Spring Framework
-  Project (http://www.springframework.org)."
-
-Alternately, this acknowledgement may appear in the software itself,
-if and wherever such third-party acknowledgements normally appear.
-
-The names "Spring" and "Spring Framework" must not be used to
-endorse or promote products derived from this software without
-prior written permission. For written permission, please contact
-rod.johnson@interface21.com or juergen.hoeller@interface21.com.
-
-
-=========================================================================
-==  MX4J Notice                                                        ==
-=========================================================================
-
-This product includes software developed by the MX4J project
-(http://sourceforge.net/projects/mx4j).
-=========================================================================
-==  Sitemesh Notice                                                    ==
-=========================================================================
-
-This product includes software developed by the
-OpenSymphony Group (http://www.opensymphony.com/).
-
-=========================================================================
-==  Smackx Notice (not from Jive Software)                             ==
-=========================================================================
-
-This product includes software developed by JiveSoftware
-(http://www.igniterealtime.org/).
-
-=========================================================================
-==  Woodstox Notice (http://woodstox.codehaus.org)                     ==
-=========================================================================
-This product currently only contains code developed by authors
-of specific components, as identified by the source code files.
-
-Since product implements StAX API, it has dependencies to StAX API
-classes.
-
-For additional credits (generally to people who reported problems)
-see CREDITS file.
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml
deleted file mode 100755
index 9e3e195..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--
-    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.
--->
-        <!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:osgi="http://www.springframework.org/schema/osgi"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-  http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-
-  <broker  brokerName="web-console" useJmx="true" xmlns="http://activemq.apache.org/schema/core">
-
-    <persistenceAdapter>
-      <kahaDB directory="${activemq.base}/data/kahadb"/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-      <transportConnector name="openwire" uri="tcp://localhost:61616"/>
-      <transportConnector name="stomp" uri="stomp://localhost:61613"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
-        <!-- END SNIPPET: xbean -->
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml
deleted file mode 100644
index b350d84..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  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.
--->
-
-<decorators defaultdir="/decorators">
-  <excludes>
-    <pattern>/xml/*</pattern>
-  </excludes>
-
-  <decorator name="main" page="main.jsp">
-    <pattern>/*</pattern>
-  </decorator>
-
-  <decorator name="panel" page="panel.jsp" />
-  <decorator name="printable" page="printable.jsp" />
-</decorators>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/dispatcher-servlet.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/dispatcher-servlet.xml
deleted file mode 100644
index da02abe..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/dispatcher-servlet.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-
-  <bean id="handlerMapping" class="org.apache.activemq.web.handler.BindingBeanNameUrlHandlerMapping" singleton="false">
-    <!--
-    <property name="uriToClassNames">
-      <props><prop key="/foo.action">org.apache.activemq.web.controller.Foo</prop></props>
-    </property>
-    -->
-  </bean>
-
-  <bean name="/createDestination.action" class="org.apache.activemq.web.controller.CreateDestination" autowire="constructor"  singleton="false"/>
-  <bean name="/deleteDestination.action" class="org.apache.activemq.web.controller.DeleteDestination" autowire="constructor"  singleton="false"/>
-  <bean name="/createSubscriber.action" class="org.apache.activemq.web.controller.CreateSubscriber" autowire="constructor"  singleton="false"/>
-  <bean name="/deleteSubscriber.action" class="org.apache.activemq.web.controller.DeleteSubscriber" autowire="constructor"  singleton="false"/>
-  <bean name="/sendMessage.action" class="org.apache.activemq.web.controller.SendMessage" autowire="constructor"  singleton="false"/>
-  <bean name="/purgeDestination.action" class="org.apache.activemq.web.controller.PurgeDestination" autowire="constructor"  singleton="false"/>
-  <bean name="/deleteMessage.action" class="org.apache.activemq.web.controller.DeleteMessage" autowire="constructor"  singleton="false"/>
-  <bean name="/copyMessage.action" class="org.apache.activemq.web.controller.CopyMessage" autowire="constructor"  singleton="false"/>	
-  <bean name="/moveMessage.action" class="org.apache.activemq.web.controller.MoveMessage" autowire="constructor"  singleton="false"/>
-  <bean name="/deleteJob.action" class="org.apache.activemq.web.controller.DeleteJob" autowire="constructor"  singleton="false"/>
-
-  <!--
-    - This bean resolves specific types of exception to corresponding error views.
-    - The default behaviour of DispatcherServlet is to propagate all exceptions to the
-    - servlet container: This will happen here with all other types of exception.
-  -->
-  <bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
-    <property name="exceptionMappings">
-      <props><!-- <prop key="org.springframework.dao.DataAccessException">dataAccessFailure</prop> --></props>
-    </property>
-  </bean>
-
-  <!--
-    - This bean resolves default view names for controllers that do not explicitly
-    - specify a view name in their return ModelAndView (see ClinicController).
-    - This translator takes the request URL and extracts a view name from it: e.g.
-    - "/welcome.html" -> "welcome", plus configured "View" suffix -> "welcomeView".
-  -->
-  <!--
-    <bean id="viewNameTranslator" class="org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator">
-    <property name="suffix" value="View"/>
-    </bean>
-  -->
-</beans>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/headertags.jspf b/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/headertags.jspf
deleted file mode 100644
index 4b69830..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/headertags.jspf
+++ /dev/null
@@ -1,21 +0,0 @@
-<%--
-    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.
---%>
-<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
-<%@ taglib prefix="form" tagdir="/WEB-INF/tags/form" %>
-<%@ taglib prefix="jms" tagdir="/WEB-INF/tags/jms" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/old.jspf b/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/old.jspf
deleted file mode 100644
index f952019..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/old.jspf
+++ /dev/null
@@ -1,21 +0,0 @@
-<%--
-    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.
---%>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@ taglib prefix="display" uri="http://displaytag.sf.net"  %>
-
-<%@ taglib prefix="c" tagdir="/WEB-INF/tags/c" %>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/checkbox.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/checkbox.tag
deleted file mode 100644
index 4a5dec5..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/checkbox.tag
+++ /dev/null
@@ -1,18 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="name" type="java.lang.String" required="true"  %>
- <input type="checkbox" name="${name}" value="true" ${param[name] ? 'checked' : ''}/>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/forEachMapEntry.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/forEachMapEntry.tag
deleted file mode 100644
index 70baff9..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/forEachMapEntry.tag
+++ /dev/null
@@ -1,29 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="var" type="java.lang.String" required="true"  %>
-<%@ attribute name="items" type="java.util.Map" required="true"  %>
-<%@ tag import="java.util.Iterator" %>
-<%
-  Iterator iter = items.entrySet().iterator();
-  while (iter.hasNext()) {
-  		 request.setAttribute(var, iter.next());
-%>
-<jsp:doBody/>
-<%
-	}
-%>       
-    
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/option.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/option.tag
deleted file mode 100644
index 4227c41..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/option.tag
+++ /dev/null
@@ -1,20 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="name" type="java.lang.String" required="true"  %>
-<%@ attribute name="value" type="java.lang.String" required="true"  %>
-<%@ attribute name="label" type="java.lang.String" required="true"  %>
-<option ${param[name] == value ? 'selected' : ''} value="${value}">${label}</option>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/short.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/short.tag
deleted file mode 100644
index ed82a97..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/short.tag
+++ /dev/null
@@ -1,29 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="text" type="java.lang.String" required="true"  %>
-<%@ attribute name="length" type="java.lang.Integer" required="false" %>
-<%
- text = org.apache.commons.lang.StringEscapeUtils.escapeHtml(text);
- text = org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(text);
- if (length == null)
-    length = 20;
- if (text.length() <= 20) {
-     out.print(text);
- } else {
-     out.println(text.substring(0, 10) + "..." + text.substring(text.length() - 5));
- }
-%>
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/text.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/text.tag
deleted file mode 100644
index 521bc6d..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/text.tag
+++ /dev/null
@@ -1,30 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="name" type="java.lang.String" required="true"  %>
-<%@ attribute name="defaultValue" type="java.lang.String" required="false"  %>
-<%
-    String value = request.getParameter(name);
-    if (value == null || value.trim().length() == 0) {
-    	value = defaultValue;
-	}
-	if (value == null) {
-		value = "";
-	}
-	value = org.apache.commons.lang.StringEscapeUtils.escapeHtml(value);
-
-%>
-<input type="text" name="${name}" value="<%= value %>"/>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/tooltip.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/tooltip.tag
deleted file mode 100644
index 0f2d495..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/tooltip.tag
+++ /dev/null
@@ -1,29 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="text" type="java.lang.String" required="true"  %>
-<%@ attribute name="length" type="java.lang.Integer" required="false" %>
-<%
- text = text.replaceAll("<", "&lt;");
- text = text.replaceAll(">", "&gt;");
- if (length == null)
-    length = 23;
- if (text.length() <= length) {
-     out.print(text);
- } else {
-     out.println("<span class=\"tooltip\"> " + text.substring(0, length - 3) + "... <span>" + text + "</span></span>");
- }
-%>
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/uri.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/uri.tag
deleted file mode 100644
index a9abb16..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/uri.tag
+++ /dev/null
@@ -1,18 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="name" type="java.lang.String" required="true"  %>
- <input type="text" name="${name}" value="${param[name]}" />
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachConnection.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachConnection.tag
deleted file mode 100644
index 6b6af7e..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachConnection.tag
+++ /dev/null
@@ -1,35 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="connection" type="java.lang.String" required="true"  %>
-<%@ attribute name="connectionName" type="java.lang.String" required="true"  %>
-<%@ attribute name="broker" type="org.apache.activemq.web.BrokerFacade" required="true"  %>
-<%@ attribute name="connectorName" type="java.lang.String" required="true"  %>
-<%@ tag import="java.util.Iterator" %>
-<%@ tag import="org.apache.activemq.broker.jmx.ConnectionViewMBean" %>
-<%
-	Iterator it = broker.getConnections(connectorName).iterator();
-	while (it.hasNext()) {
-		String conName = (String) it.next();
-		ConnectionViewMBean con = broker.getConnection(conName);
-		request.setAttribute(connectionName, conName);
-		request.setAttribute(connection, con);
-%>
-<jsp:doBody/>
-<%
-	}
-%>       
-    
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachMessage.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachMessage.tag
deleted file mode 100644
index 6dae9db..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachMessage.tag
+++ /dev/null
@@ -1,34 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="var" type="java.lang.String" required="true"  %>
-<%@ attribute name="queueBrowser" type="javax.jms.QueueBrowser" required="true"  %>
-<%@ tag import="java.util.Enumeration" %>
-<%@ tag import="javax.jms.Message" %>
-<%
-
-	Enumeration iter = queueBrowser.getEnumeration();
-	while (iter.hasMoreElements()) {
-	    Message message = (Message) iter.nextElement();
-	    if (message != null) {
-	    		request.setAttribute(var, message);
-%>
-<jsp:doBody/>
-<%
-			}
-	}
-%>       
-    
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/formatTimestamp.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/formatTimestamp.tag
deleted file mode 100644
index 1a4a54b..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/formatTimestamp.tag
+++ /dev/null
@@ -1,29 +0,0 @@
-<%--

-    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.

---%>

-<%@ attribute name="timestamp" type="java.lang.String"%>

-<%@ tag import="java.util.Date" %>

-<%@ tag import="java.text.SimpleDateFormat" %>

-<%

-	if (timestamp != null) { 

-		long time = Long.parseLong(timestamp);

-		Date date =  new Date(time);

-		

-		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS z");		

-

-		out.println(formatter.format(date));

-  	}

-%>

diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/persistent.tag b/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/persistent.tag
deleted file mode 100644
index f7f33a6..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/persistent.tag
+++ /dev/null
@@ -1,27 +0,0 @@
-<%--
-    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.
---%>
-<%@ attribute name="message" type="javax.jms.Message" required="true"  %>
-<%
-	if (message != null) { 
-	  if (message.getJMSDeliveryMode() == javax.jms.DeliveryMode.PERSISTENT) {
-  		  	  out.println("Persistent");
-  		}
-  		else {
-		  	  out.println("Non Persistent");
-  	  }
-  	}
-%>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml
deleted file mode 100755
index 152f740..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
-         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
-         version="2.4">
-
-  <description>
-    Apache ActiveMQ Web Console
-  </description>
-  <display-name>ActiveMQ Console</display-name>
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <!--              Configuration of the SiteMesh Filter.                                                                 -->
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <filter>
-    <filter-name>sitemesh</filter-name>
-    <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
-  </filter>
-
-  <filter-mapping>
-    <filter-name>sitemesh</filter-name>
-    <url-pattern>/*</url-pattern>
-  </filter-mapping>
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <!--              Expose Spring POJOs to JSP                   .                                                             -->
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <filter>
-    <filter-name>spring</filter-name>
-    <filter-class>org.apache.activemq.web.filter.ApplicationContextFilter</filter-class>
-  </filter>
-
-  <filter-mapping>
-    <filter-name>spring</filter-name>
-    <url-pattern>/*</url-pattern>
-  </filter-mapping>
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <!--              ActiveMQ servlets                                                                                                -->
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
-  <!-- the subscription REST servlet -->
-  <servlet>
-    <servlet-name>AjaxServlet</servlet-name>
-    <servlet-class>org.apache.activemq.web.AjaxServlet</servlet-class>
-    <load-on-startup>1</load-on-startup>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>AjaxServlet</servlet-name>
-    <url-pattern>/ajax/*</url-pattern>
-  </servlet-mapping>
-
-  <servlet>
-    <servlet-name>SendServlet</servlet-name>
-    <servlet-class>org.apache.activemq.web.MessageServlet</servlet-class>
-    <load-on-startup>1</load-on-startup>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>SendServlet</servlet-name>
-    <url-pattern>/send/*</url-pattern>
-  </servlet-mapping>
-
-  <!-- the queue browse servlet -->
-  <servlet>
-    <servlet-name>QueueBrowseServlet</servlet-name>
-    <servlet-class>org.apache.activemq.web.QueueBrowseServlet</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>QueueBrowseServlet</servlet-name>
-    <url-pattern>/queueBrowse/*</url-pattern>
-  </servlet-mapping>
-
-  <!-- track the session usage for web JMS clients -->
-  <filter>
-    <filter-name>session</filter-name>
-    <filter-class>org.apache.activemq.web.SessionFilter</filter-class>
-  </filter>
-
-  <filter>
-    <filter-name>spring-rq</filter-name>
-    <filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>
-  </filter>
-
-  <filter-mapping>
-    <filter-name>session</filter-name>
-    <url-pattern>*.jsp</url-pattern>
-  </filter-mapping>
-  <filter-mapping>
-    <filter-name>spring-rq</filter-name>
-    <url-pattern>/*</url-pattern>
-  </filter-mapping>
-
-  <!-- enable audit logging -->
-  <filter>
-    <filter-name>audit</filter-name>
-    <filter-class>org.apache.activemq.web.AuditFilter</filter-class>
-  </filter>
-  <filter-mapping>
-    <filter-name>audit</filter-name>
-    <url-pattern>*.action</url-pattern>
-  </filter-mapping>
-
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <!--              Spring listener.                 						 -->
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <listener>
-    <listener-class>org.apache.activemq.web.WebConsoleStarter</listener-class>
-  </listener>
-
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <!--         Configuration of the Spring MVC dispatcher    		         -->
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <servlet>
-    <servlet-name>dispatcher</servlet-name>
-    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-    <load-on-startup>2</load-on-startup>
-  </servlet>
-
-  <servlet-mapping>
-    <servlet-name>dispatcher</servlet-name>
-    <url-pattern>*.action</url-pattern>
-  </servlet-mapping>
-
-  <welcome-file-list>
-    <welcome-file>index.html</welcome-file>
-    <welcome-file>index.jsp</welcome-file>
-  </welcome-file-list>
-
-
-  <!-- JNDI Stuff
-<resource-ref>
- <res-ref-name>jms/connectionFactory</res-ref-name>
- <res-type>javax.jms.ConnectionFactory</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
- <resource-ref>
-   <res-ref-name>jmx/url</res-ref-name>
-   <res-type>java.lang.String</res-type>
- </resource-ref>
-  -->
-
-
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <!--         Factor out common headers in JSP pages            -->
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <jsp-config>
-    <jsp-property-group>
-      <url-pattern>*.jsp</url-pattern>
-      <include-prelude>/WEB-INF/jspf/headertags.jspf</include-prelude>
-    </jsp-property-group>
-  </jsp-config>
-  
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  <!--         Error pages       -->
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-  
-  <error-page>
-     <error-code>404</error-code>
-     <location>/404.html</location>
-  </error-page>
-  
-  <error-page>
-     <exception-type>java.lang.Exception</exception-type>
-     <location>/500.html</location>
-  </error-page>
-  
-</web-app>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-default.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-default.xml
deleted file mode 100644
index 2a8b381..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-default.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-                           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
-
-
-  <import resource="webconsole-jndi.xml"/>
-  
-</beans>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-embedded.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-embedded.xml
deleted file mode 100644
index 5e487ac..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-embedded.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-                           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
-
-  <import resource="webconsole-query.xml"/>
-  <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-    
-  <bean id="sessionPool" class="org.apache.activemq.web.SessionPool">
-  	<property name="connectionFactory" ref="connectionFactory"/>
-  </bean>
-
-  <bean id="brokerService" class="org.apache.activemq.xbean.BrokerFactoryBean">
-    <property name="config" value="/WEB-INF/activemq.xml"/>
-  </bean>
-  <bean id="brokerURL" factory-bean="brokerService" factory-method="getVmConnectorURI"/>
-
-  <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-    <constructor-arg ref="brokerURL"/>
-  </bean>
-
-  <bean id="brokerQuery" class="org.apache.activemq.web.LocalBrokerFacade" autowire="constructor" scope="prototype"/>
-
-</beans>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-invm.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-invm.xml
deleted file mode 100644
index e766e8a..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-invm.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-                           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
-
-  <import resource="webconsole-query.xml"/>
-  <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-  
-  
-  <bean id="sessionPool" class="org.apache.activemq.web.SessionPool">
-  	<property name="connectionFactory" ref="connectionFactory"/>
-  </bean>
-
-  <bean id="brokerRegistry" class="org.apache.activemq.broker.BrokerRegistry" factory-method="getInstance"/>
-  <bean id="brokerService" factory-bean="brokerRegistry" factory-method="findFirst"/>
-  <bean id="brokerURL" factory-bean="brokerService" factory-method="getVmConnectorURI"/>
-
-  <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-    <constructor-arg ref="brokerURL"/>
-  </bean>
-
-  <bean id="brokerQuery" class="org.apache.activemq.web.LocalBrokerFacade" autowire="constructor" scope="prototype"/>
-
-</beans>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-jndi.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-jndi.xml
deleted file mode 100644
index 84148a0..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-jndi.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-                           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
-
-  <import resource="webconsole-query.xml"/>  
-  <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-  
-  <bean id="sessionPool" class="org.apache.activemq.web.SessionPool">
-  	<property name="connectionFactory" ref="connectionFactory"/>
-  </bean>
-
-  <bean id="configuration" class="org.apache.activemq.web.config.JNDIConfiguration"/>
-
-  <bean id="brokerQuery" class="org.apache.activemq.web.RemoteJMXBrokerFacade" autowire="constructor" destroy-method="shutdown">
-  	<property name="configuration" ref="configuration"/>
-  	<property name="brokerName"><null/></property>
-  </bean>
-  
-  <bean id="connectionFactory" factory-bean="configuration" factory-method="getConnectionFactory"/> 
-
-</beans>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-properties.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-properties.xml
deleted file mode 100644
index eb42b4f..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-properties.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:aop="http://www.springframework.org/schema/aop"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-                           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
-
-  <import resource="webconsole-query.xml"/>
-  <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-  
-  <bean id="sessionPool" class="org.apache.activemq.web.SessionPool">
-  	<property name="connectionFactory" ref="connectionFactory"/>
-  </bean>
-  
-  <bean id="configuration" class="org.apache.activemq.web.config.SystemPropertiesConfiguration"/>
-
-  <bean id="brokerQuery" class="org.apache.activemq.web.RemoteJMXBrokerFacade" autowire="constructor" destroy-method="shutdown">
-  	<property name="configuration" ref="configuration"/>
-  	<property name="brokerName"><null/></property>
-  </bean>
-  
-  <bean id="connectionFactory" factory-bean="configuration" factory-method="getConnectionFactory"/>
-
-</beans>
diff --git a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-query.xml b/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-query.xml
deleted file mode 100644
index 6a1fcf6..0000000
--- a/trunk/activemq-web-console/src/main/webapp/WEB-INF/webconsole-query.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-  
-  <bean id="queueBrowser" class="org.apache.activemq.web.QueueBrowseQuery" autowire="constructor" destroy-method="destroy" scope="request"/>
-  <bean id="messageQuery" class="org.apache.activemq.web.MessageQuery" autowire="constructor" destroy-method="destroy" scope="request"/>
-  <bean id="queueConsumerQuery" class="org.apache.activemq.web.QueueConsumerQuery" autowire="constructor" destroy-method="destroy" scope="request"/>
-  <bean id="connectionQuery" class="org.apache.activemq.web.ConnectionQuery" autowire="constructor" destroy-method="destroy" scope="request"/>
-</beans>
diff --git a/trunk/activemq-web-console/src/main/webapp/browse.jsp b/trunk/activemq-web-console/src/main/webapp/browse.jsp
deleted file mode 100644
index 1630e84..0000000
--- a/trunk/activemq-web-console/src/main/webapp/browse.jsp
+++ /dev/null
@@ -1,64 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Browse <form:short text="${requestContext.queueBrowser.JMSDestination}"/></title>
-</head>
-<body>
-
-<h2>Browse <form:tooltip text="${requestContext.queueBrowser.JMSDestination}"/></h2>
-
-<table id="messages" class="sortable autostripe">
-<thead>
-<tr>
-<th>Message ID</th>
-<th>Correlation ID</th>
-<th>Persistence</th>
-<th>Priority</th>
-<th>Redelivered</th>
-<th>Reply To</th>
-<th>Timestamp</th>
-<th>Type</th>
-<th>Operations</th>
-</tr>
-</thead>
-<tbody>
-<jms:forEachMessage queueBrowser="${requestContext.queueBrowser.browser}" var="row">
-<tr>
-<td><a href="message.jsp?id=${row.JMSMessageID}&JMSDestination=<c:out value="${requestContext.queueBrowser.JMSDestination}" />" 
-    title="${row.properties}">${row.JMSMessageID}</a></td>
-<td><c:out value="${row.JMSCorrelationID}"/></td>
-<td><jms:persistent message="${row}"/></td>
-<td><c:out value="${row.JMSPriority}"/></td>
-<td><c:out value="${row.JMSRedelivered}"/></td>
-<td><c:out value="${row.JMSReplyTo}"/></td>
-<td><jms:formatTimestamp timestamp="${row.JMSTimestamp}"/></td>
-<td><c:out value="${row.JMSType}"/></td>
-<td>
-    <a href="deleteMessage.action?JMSDestination=<c:out value="${row.JMSDestination}"/>&messageId=${row.JMSMessageID}&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a>
-</td>
-</tr>
-</jms:forEachMessage>
-</tbody>
-</table>
-
-<div>
-<a href="queueConsumers.jsp?JMSDestination=<c:out value="${requestContext.queueBrowser.JMSDestination}"/>">View Consumers</a>
-</div>
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/connection.jsp b/trunk/activemq-web-console/src/main/webapp/connection.jsp
deleted file mode 100644
index 62b9e5e..0000000
--- a/trunk/activemq-web-console/src/main/webapp/connection.jsp
+++ /dev/null
@@ -1,138 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<c:set var="row" value="${requestContext.connectionQuery.connection}"/>
-<title>Connection <c:out value="${requestContext.connectionQuery.connectionID}" /></title>
-</head>
-<body>
-
-
-<c:choose>
-<c:when test="${empty row}">
-
-<div>
-No connection could be found for ID <c:out value="${requestContext.connectionQuery.connectionID}" />
-</div>
-
-</c:when>
-
-<c:otherwise>
-
-<h2>Connection <c:out value="${requestContext.connectionQuery.connectionID}" /></h2>
-
-<table id="header" class="sortable autostripe">
-	<tbody>
-		<tr>
-			<td class="label" title="Unique ID for this connection">Connection ID</td>
-			<td><c:out value="${requestContext.connectionQuery.connectionID}" /></td>
-		</tr>
-		<tr>
-			<td class="label" tite="Hostname and port of the connected party">Remote Address</td>
-			<td><c:out value="${row.remoteAddress}" /></td>
-		</tr>
-		<tr>
-			<td class="label">Active</td>
-			<td><c:out value="${row.active}" /></td>
-		</tr>
-		<tr>
-			<td class="label">Connected</td>
-			<td><c:out value="${row.connected}" /></td>
-		</tr>
-		<tr>
-			<td class="label">Blocked</td>
-			<td><c:out value="${row.blocked}" /></td>
-		</tr>
-		<tr>
-			<td class="label">Slow</td>
-			<td><c:out value="${row.slow}" /></td>
-		</tr>
-	</tbody>
-</table>
-
-
-
-<h3>Consumers</h3>
-
-<table id="messages" class="sortable autostripe">
-<thead>
-<tr>
-	<th>Destination</th>
-	<th>SessionId</th>
-	<th>Selector</th>
-	<th>Enqueues</th>
-	<th>Dequeues</th>
-	<th>Dispatched</th>
-	<th>Dispatched Queue</th>
-	<th>
-		<span>Prefetch</span>
-		<br/>
-		<span>Max pending</span>
-	</th>
-	<th>
-		<span>Exclusive</span>
-		<br/>
-		<span>Retroactive</span>
-	</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.connectionQuery.consumers}" var="consumer">
-<tr>
-	<td>
-		<c:choose>
-			<c:when test="${consumer.destinationQueue}">
-				Queue <a href="browse.jsp?JMSDestination=${consumer.destinationName}"><c:out value="${consumer.destinationName}" /></a>
-			</c:when>
-			<c:when test="${consumer.destinationTopic}">
-				Topic <a href="send.jsp?JMSDestination=${consumer.destinationName}"><c:out value="${consumer.destinationName}" /></a>
-			</c:when>
-			<c:otherwise>
-				<c:out value="${consumer.destinationName}" />
-			</c:otherwise>
-		</c:choose>
-	</td>
-	<td><c:out value="${consumer.sessionId}" /></td>
-	<td><c:out value="${consumer.selector}" /></td>
-	<td><c:out value="${consumer.enqueueCounter}" /></td>
-	<td><c:out value="${consumer.dequeueCounter}" /></td>
-	<td><c:out value="${consumer.dispatchedCounter}" /></td>
-	<td><c:out value="${consumer.dispatchedQueueSize}" /></td>
-	<td>
-		<c:out value="${consumer.prefetchSize}" /><br/>
-		<c:out value="${consumer.maximumPendingMessageLimit}" />
-	</td>
-	<td>
-		<c:out value="${consumer.exclusive}" /><br/>
-		<c:out value="${consumer.retroactive}" />
-	</td>
-</tr>
-</c:forEach>
-</tbody>
-</table>
-
-
-</c:otherwise>
-</c:choose>
-
-
-
-
-
-</body>
-</html>
-	
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/connections.jsp b/trunk/activemq-web-console/src/main/webapp/connections.jsp
deleted file mode 100644
index 5f0a360..0000000
--- a/trunk/activemq-web-console/src/main/webapp/connections.jsp
+++ /dev/null
@@ -1,85 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Connections</title>
-</head>
-<body>
-
-<h2>Connections</h2>
-
-<c:forEach items="${requestContext.brokerQuery.connectors}" var="connectorName">
-<h3>Connector ${connectorName}</h3>
-
-<table id="connections" class="sortable autostripe">
-<thead>
-<tr>
-	<th>Name</th>
-	<th>Remote Address</th>
-	<th>Active</th>
-	<th>Slow</th>
-</tr>
-</thead>
-<tbody>
-<jms:forEachConnection broker="${requestContext.brokerQuery}" connectorName="${connectorName}"
-	connection="con" connectionName="conName">
-<tr>
-	<td><a href="connection.jsp?connectionID=${conName}">${conName}</a></td>
-	<td>${con.remoteAddress}</td>
-	<td>${con.active}</td>
-	<td>${con.slow}</td>
-</tr>
-</jms:forEachConnection>
-</tbody>
-</table>
-
-</c:forEach>
-
-<div style="margin-top: 5em">
-<h2>Network Connectors</h2>
-
-<table id="connections" class="sortable autostripe">
-<thead>
-<tr>
-	<th>Name</th>
-	<th>Network TTL</th>
-	<th>Dynamic Only</th>
-	<th>Conduit Subscriptions</th>
-	<th>Bridge Temps</th>
-	<th>Decrease Priorities</th>
-	<th>Dispatch Async</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.brokerQuery.networkConnectors}" var="nc">
-<tr>
-	<td>${nc.name}</td>
-	<td>${nc.networkTTL}</td>
-	<td>${nc.dynamicOnly}</td>
-	<td>${nc.conduitSubscriptions}</td>
-	<td>${nc.bridgeTempDestinations}</td>
-	<td>${nc.decreaseNetworkConsumerPriority}</td>
-	<td>${nc.dispatchAsync}</td>
-</tr>
-</c:forEach>
-</tbody>
-</table>
-</div>
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/decorators/main.jsp b/trunk/activemq-web-console/src/main/webapp/decorators/main.jsp
deleted file mode 100644
index dfa6242..0000000
--- a/trunk/activemq-web-console/src/main/webapp/decorators/main.jsp
+++ /dev/null
@@ -1,165 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<%--
-    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.
---%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-    <title>${requestContext.brokerQuery.brokerAdmin.brokerName} : <decorator:title default="ActiveMQ Console" /></title>
-    <style type="text/css" media="screen">
-        @import url(<c:url value="/styles/sorttable.css"/>);
-        @import url(<c:url value="/styles/type-settings.css"/>);
-        @import url(<c:url value="/styles/site.css"/>);
-        @import url(<c:url value="/styles/prettify.css"/>);
-    </style>
-    <c:if test="${!disableJavaScript}">
-        <script type='text/javascript' src='<c:url value="/js/common.js"/>'></script>
-        <script type='text/javascript' src='<c:url value="/js/css.js"/>'></script>
-        <script type='text/javascript' src='<c:url value="/js/standardista-table-sorting.js"/>'></script>
-        <script type='text/javascript' src='<c:url value="/js/prettify.js"/>'></script>
-        <script>addEvent(window, 'load', prettyPrint)</script>
-    </c:if>
-
-    <decorator:head />
-</head>
-
-<body>
-
-<div class="white_box">
-    <div class="header">
-        <div class="header_l">
-            <div class="header_r">
-            </div>
-        </div>
-    </div>
-    <div class="content">
-        <div class="content_l">
-            <div class="content_r">
-
-                <div>
-
-                    <!-- Banner -->
-                    <div id="asf_logo">
-                        <div id="activemq_logo">
-                            <a style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;"
-                               href="http://activemq.apache.org/"
-                               title="The most popular and powerful open source Message Broker">ActiveMQ</a>
-                            <a style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;"
-                               href="http://www.apache.org/" title="The Apache Software Foundation">ASF</a>
-                        </div>
-                    </div>
-
-
-                    <div class="top_red_bar">
-                        <div id="site-breadcrumbs">
-                            <a href="<c:url value='/index.jsp'/>" title="Home">Home</a>
-                            &#124;
-                            <a href="<c:url value='/queues.jsp'/>" title="Queues">Queues</a>
-                            &#124;
-                            <a href="<c:url value='/topics.jsp'/>" title="Topics">Topics</a>
-                            &#124;
-                            <a href="<c:url value='/subscribers.jsp'/>" title="Subscribers">Subscribers</a>
-                            &#124;
-                            <a href="<c:url value='/connections.jsp'/>" title="Connections">Connections</a>
-                            &#124;
-                            <a href="<c:url value='/network.jsp'/>" title="Network">Network</a>
-                            &#124;
-                             <a href="<c:url value='/scheduled.jsp'/>" title="Scheduled">Scheduled</a>
-                            &#124;
-                            <a href="<c:url value='/send.jsp'/>"
-                               title="Send">Send</a>
-                        </div>
-                        <div id="site-quicklinks"><P>
-                            <a href="http://activemq.apache.org/support.html"
-                               title="Get help and support using Apache ActiveMQ">Support</a></p>
-                        </div>
-                    </div>
-
-                    <table border="0">
-                        <tbody>
-                            <tr>
-                                <td valign="top" width="100%" style="overflow:hidden;">
-                                    <div class="body-content">
-                                        <decorator:body/>
-                                    </div>
-                                </td>
-                                <td valign="top">
-
-                                    <div class="navigation">
-                                        <div class="navigation_top">
-                                            <div class="navigation_bottom">
-                                                <H3>Queue Views</H3>
-
-                                                <ul class="alternate" type="square">
-
-
-
-                                                    <li><a href="queueGraph.jsp" title="View the queue depths as a graph">Graph</a></li>
-                                                    <li><a href="xml/queues.jsp" title="View the queues as XML">XML</a></li>
-                                                </ul>
-                                                <H3>Topic Views</H3>
-
-                                                <ul class="alternate" type="square">
-
-
-
-                                                    <li><a href="xml/topics.jsp" title="View the topics as XML">XML</a></li>
-                                                </ul>
-                                                <H3>Useful Links</H3>
-
-                                                <ul class="alternate" type="square">
-                                                    <li><a href="http://activemq.apache.org/"
-                                                           title="The most popular and powerful open source Message Broker">Documentation</a></li>
-                                                    <li><a href="http://activemq.apache.org/faq.html">FAQ</a></li>
-                                                    <li><a href="http://activemq.apache.org/download.html">Downloads</a>
-                                                    </li>
-                                                    <li><a href="http://activemq.apache.org/discussion-forums.html">Forums</a>
-                                                    </li>
-                                                </ul>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </td>
-                            </tr>
-                        </tbody>
-                    </table>
-
-
-                    <div class="bottom_red_bar"></div>
-                </div>
-            </div>
-        </div>
-    </div>
-    <div class="black_box">
-        <div class="footer">
-            <div class="footer_l">
-                <div class="footer_r">
-                    <div>
-                        Copyright 2005-2011 The Apache Software Foundation.
-
-                        (<a href="?printable=true">printable version</a>)
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>
-<div class="design_attribution"><a href="http://hiramchirino.com/">Graphic Design By Hiram</a></div>
-
-</body>
-</html>
-
diff --git a/trunk/activemq-web-console/src/main/webapp/decorators/panel.jsp b/trunk/activemq-web-console/src/main/webapp/decorators/panel.jsp
deleted file mode 100644
index 4746808..0000000
--- a/trunk/activemq-web-console/src/main/webapp/decorators/panel.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
-<%--
-    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.
---%>
-<p>
-	<table border="0" cellpadding="0" cellspacing="0">
-		<tr>
-			<th class="panelTitle">
-				<decorator:title default="Unknown panel" />
-			</th>
-		</tr>
-		<tr>
-			<td class="panelBody">
-				<decorator:body />
-			</td>
-		</tr>
-	</table>
-</p>
diff --git a/trunk/activemq-web-console/src/main/webapp/decorators/printable.jsp b/trunk/activemq-web-console/src/main/webapp/decorators/printable.jsp
deleted file mode 100644
index 6b78947..0000000
--- a/trunk/activemq-web-console/src/main/webapp/decorators/printable.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
-<%--
-    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.
---%>
-
-<html>
-    <head>
-        <title><decorator:title default="Welcome!" /></title>
-        <decorator:head />
-    </head>
-
-    <body onload="window.print();">
-        Printed on <%=new java.util.Date()%>.<br/>
-        <hr noshade="noshade" size="1"/>
-        <br/>
-        <decorator:body />
-    </body>
-</html>
diff --git a/trunk/activemq-web-console/src/main/webapp/graph.jsp b/trunk/activemq-web-console/src/main/webapp/graph.jsp
deleted file mode 100644
index 8736b9c..0000000
--- a/trunk/activemq-web-console/src/main/webapp/graph.jsp
+++ /dev/null
@@ -1,67 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Browse ${requestContext.queueBrowser.JMSDestination}</title>
-</head>
-<body>
-
-<h2>Browse ${requestContext.queueBrowser.JMSDestination}</h2>
-
-<table id="messages" class="sortable autostripe">
-<thead>
-<tr>
-<th>Message ID</th>
-<th>Correlation ID</th>
-<th>Persistence</th>
-<th>Priority</th>
-<th>Redelivered</th>
-<th>Reply To</th>
-<th>Timestamp</th>
-<th>Type</th>
-<th>Operations</th>
-</tr>
-</thead>
-<tbody>
-<%--    
-<c:forEach items="${requestContext.queueBrowser.browser.enumeration}" var="row">
----%>
-<jms:forEachMessage queueBrowser="${requestContext.queueBrowser.browser}" var="row">
-<tr>
-<td><a href="message.jsp?id=${row.JMSMessageID}" title="${row.JMSDestination}">${row.JMSMessageID}</a></td>
-<td>${row.JMSCorrelationID}</td>
-<td><jms:persistent message="${row}"/></td>
-<td>${row.JMSPriority}</td>
-<td>${row.JMSRedelivered}</td>
-<td>${row.JMSReplyTo}</td>
-<td>${row.JMSTimestamp}</td>
-<td>${row.JMSType}</td>
-<td>
-    <a href="deleteDestination.action?destination=${row.JMSMessageID}&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a>
-</td>
-</tr>
-</jms:forEachMessage>
-<%--    
-</c:forEach>
---%>
-</tbody>
-</table>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/images/activemq-logo.png b/trunk/activemq-web-console/src/main/webapp/images/activemq-logo.png
deleted file mode 100644
index d514448..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/activemq-logo.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/asf-logo.png b/trunk/activemq-web-console/src/main/webapp/images/asf-logo.png
deleted file mode 100644
index d824fab..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/asf-logo.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/big-bullet.png b/trunk/activemq-web-console/src/main/webapp/images/big-bullet.png
deleted file mode 100644
index bc66207..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/big-bullet.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/black-footer-bottom.png b/trunk/activemq-web-console/src/main/webapp/images/black-footer-bottom.png
deleted file mode 100644
index 998fdc3..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/black-footer-bottom.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/black-footer-left.png b/trunk/activemq-web-console/src/main/webapp/images/black-footer-left.png
deleted file mode 100644
index 01ed47d..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/black-footer-left.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/black-footer-right.png b/trunk/activemq-web-console/src/main/webapp/images/black-footer-right.png
deleted file mode 100644
index 27204f1..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/black-footer-right.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/bottom-red-bar.png b/trunk/activemq-web-console/src/main/webapp/images/bottom-red-bar.png
deleted file mode 100644
index ea241a1..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/bottom-red-bar.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/checker-bg.png b/trunk/activemq-web-console/src/main/webapp/images/checker-bg.png
deleted file mode 100644
index 17c4bdc..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/checker-bg.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/content-left.png b/trunk/activemq-web-console/src/main/webapp/images/content-left.png
deleted file mode 100644
index 78051fc..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/content-left.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/content-right.png b/trunk/activemq-web-console/src/main/webapp/images/content-right.png
deleted file mode 100644
index 0e7b231..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/content-right.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/feed_atom.png b/trunk/activemq-web-console/src/main/webapp/images/feed_atom.png
deleted file mode 100644
index 99ae34e..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/feed_atom.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/feed_rss.png b/trunk/activemq-web-console/src/main/webapp/images/feed_rss.png
deleted file mode 100644
index 603cff5..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/feed_rss.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/left-box-bottom.png b/trunk/activemq-web-console/src/main/webapp/images/left-box-bottom.png
deleted file mode 100644
index 2aaaa63..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/left-box-bottom.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/left-box-right.png b/trunk/activemq-web-console/src/main/webapp/images/left-box-right.png
deleted file mode 100644
index f922287..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/left-box-right.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/left-box-top.png b/trunk/activemq-web-console/src/main/webapp/images/left-box-top.png
deleted file mode 100644
index cbfe245..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/left-box-top.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/oval-arrow.png b/trunk/activemq-web-console/src/main/webapp/images/oval-arrow.png
deleted file mode 100644
index 17d3404..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/oval-arrow.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/right-box-bottom.png b/trunk/activemq-web-console/src/main/webapp/images/right-box-bottom.png
deleted file mode 100644
index 63250b3..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/right-box-bottom.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/right-box-left.png b/trunk/activemq-web-console/src/main/webapp/images/right-box-left.png
deleted file mode 100644
index fbdf0eb..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/right-box-left.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/right-box-top.png b/trunk/activemq-web-console/src/main/webapp/images/right-box-top.png
deleted file mode 100644
index 656f124..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/right-box-top.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/small-bullet-gray.png b/trunk/activemq-web-console/src/main/webapp/images/small-bullet-gray.png
deleted file mode 100644
index 8af9e18..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/small-bullet-gray.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/small-bullet-red.png b/trunk/activemq-web-console/src/main/webapp/images/small-bullet-red.png
deleted file mode 100644
index c17f695..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/small-bullet-red.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/spacer.gif b/trunk/activemq-web-console/src/main/webapp/images/spacer.gif
deleted file mode 100644
index fc25609..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/spacer.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/top-red-bar.png b/trunk/activemq-web-console/src/main/webapp/images/top-red-bar.png
deleted file mode 100644
index 23fde24..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/top-red-bar.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/white-header-left.png b/trunk/activemq-web-console/src/main/webapp/images/white-header-left.png
deleted file mode 100644
index 9ee1fd3..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/white-header-left.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/white-header-right.png b/trunk/activemq-web-console/src/main/webapp/images/white-header-right.png
deleted file mode 100644
index e91de97..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/white-header-right.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/images/white-header-top.png b/trunk/activemq-web-console/src/main/webapp/images/white-header-top.png
deleted file mode 100644
index 18f0f91..0000000
--- a/trunk/activemq-web-console/src/main/webapp/images/white-header-top.png
+++ /dev/null
Binary files differ
diff --git a/trunk/activemq-web-console/src/main/webapp/index.jsp b/trunk/activemq-web-console/src/main/webapp/index.jsp
deleted file mode 100644
index 628ec81..0000000
--- a/trunk/activemq-web-console/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,65 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>ActiveMQ Console</title>
-</head>
-<body>
-
-<h2>Welcome!</h2>
-
-<p>
-Welcome to the ActiveMQ Console of <b>${requestContext.brokerQuery.brokerName}</b> (${requestContext.brokerQuery.brokerAdmin.brokerId})
-</p>
-
-<p>
-You can find more information about ActiveMQ on the <a href="http://activemq.apache.org/">Apache ActiveMQ Site</a>
-</p>
-
-<h2>Broker</h2>
-
-
-<table>
-    <tr>
-        <td>Name</td>
-        <td><b>${requestContext.brokerQuery.brokerAdmin.brokerName}</b></td>
-    </tr>
-    <tr>
-        <td>Version</td>
-        <td><b>${requestContext.brokerQuery.brokerAdmin.brokerVersion}</b></td>
-    </tr>
-    <tr>
-        <td>ID</td>
-        <td><b>${requestContext.brokerQuery.brokerAdmin.brokerId}</b></td>
-    </tr>
-    <tr>
-        <td>Store percent used</td>
-        <td><b>${requestContext.brokerQuery.brokerAdmin.storePercentUsage}</b></td>
-    </tr>
-    <tr>
-        <td>Memory percent used</td>
-        <td><b>${requestContext.brokerQuery.brokerAdmin.memoryPercentUsage}</b></td>
-    </tr>
-    <tr>
-        <td>Temp percent used</td>
-        <td><b>${requestContext.brokerQuery.brokerAdmin.tempPercentUsage}</b></td>
-    </tr>
-</table>
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/js/common.js b/trunk/activemq-web-console/src/main/webapp/js/common.js
deleted file mode 100644
index e20a34f..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/common.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * This software is licensed under the Creative Commons Licence 2.5
- * http://creativecommons.org/licenses/by/2.5/
- *
- * addEvent written by Dean Edwards, 2005
- * with input from Tino Zijdel
- *
- * http://dean.edwards.name/weblog/2005/10/add-event/
- **/
-function addEvent(element, type, handler) {
-	// assign each event handler a unique ID
-	if (!handler.$$guid) handler.$$guid = addEvent.guid++;
-	// create a hash table of event types for the element
-	if (!element.events) element.events = {};
-	// create a hash table of event handlers for each element/event pair
-	var handlers = element.events[type];
-	if (!handlers) {
-		handlers = element.events[type] = {};
-		// store the existing event handler (if there is one)
-		if (element["on" + type]) {
-			handlers[0] = element["on" + type];
-		}
-	}
-	// store the event handler in the hash table
-	handlers[handler.$$guid] = handler;
-	// assign a global event handler to do all the work
-	element["on" + type] = handleEvent;
-};
-// a counter used to create unique IDs
-addEvent.guid = 1;
-
-function removeEvent(element, type, handler) {
-	// delete the event handler from the hash table
-	if (element.events && element.events[type]) {
-		delete element.events[type][handler.$$guid];
-	}
-};
-
-function handleEvent(event) {
-	var returnValue = true;
-	// grab the event object (IE uses a global event object)
-	event = event || fixEvent(window.event);
-	// get a reference to the hash table of event handlers
-	var handlers = this.events[event.type];
-	// execute each event handler
-	for (var i in handlers) {
-		this.$$handleEvent = handlers[i];
-		if (this.$$handleEvent(event) === false) {
-			returnValue = false;
-		}
-	}
-	return returnValue;
-};
-
-function fixEvent(event) {
-	// add W3C standard event methods
-	event.preventDefault = fixEvent.preventDefault;
-	event.stopPropagation = fixEvent.stopPropagation;
-	return event;
-};
-fixEvent.preventDefault = function() {
-	this.returnValue = false;
-};
-fixEvent.stopPropagation = function() {
-	this.cancelBubble = true;
-};
-
-// end from Dean Edwards
-
-
-/**
- * Creates an Element for insertion into the DOM tree.
- * From http://simon.incutio.com/archive/2003/06/15/javascriptWithXML
- *
- * @param element the element type to be created.
- *				e.g. ul (no angle brackets)
- **/
-function createElement(element) {
-	if (typeof document.createElementNS != 'undefined') {
-		return document.createElementNS('http://www.w3.org/1999/xhtml', element);
-	}
-	if (typeof document.createElement != 'undefined') {
-		return document.createElement(element);
-	}
-	return false;
-}
-
-/**
- * "targ" is the element which caused this function to be called
- * from http://www.quirksmode.org/js/events_properties.html
- **/
-function getEventTarget(e) {
-	var targ;
-	if (!e) {
-		e = window.event;
-	}
-	if (e.target) {
-		targ = e.target;
-	} else if (e.srcElement) {
-		targ = e.srcElement;
-	}
-	if (targ.nodeType == 3) { // defeat Safari bug
-		targ = targ.parentNode;
-	}
-
-	return targ;
-}
-
-function confirmAction(id, url) {
-	//TODO i18n messages
-	var select = document.getElementById(id);
-	var selectedIndex = select.selectedIndex; 
-	if (select.selectedIndex == 0) {
-		alert("Please select a value");
-		return;
-	}
-	var value = select.options[selectedIndex].value;
-	url = url.replace(/%target%/gi, value);
-	if (confirm("Are you sure?"))
-	  location.href=url;
-}
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/js/css.js b/trunk/activemq-web-console/src/main/webapp/js/css.js
deleted file mode 100644
index ec8d278..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/css.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Written by Neil Crosby. 
- * http://www.workingwith.me.uk/
- *
- * Use this wherever you want, but please keep this comment at the top of this file.
- *
- * 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.
- **/
-var css = {
-	/**
-	 * Returns an array containing references to all elements
-	 * of a given tag type within a certain node which have a given class
-	 *
-	 * @param node		the node to start from 
-	 *					(e.g. document, 
-	 *						  getElementById('whateverStartpointYouWant')
-	 *					)
-	 * @param searchClass the class we're wanting
-	 *					(e.g. 'some_class')
-	 * @param tag		 the tag that the found elements are allowed to be
-	 *					(e.g. '*', 'div', 'li')
-	 **/
-	getElementsByClass : function(node, searchClass, tag) {
-		var classElements = new Array();
-		var els = node.getElementsByTagName(tag);
-		var elsLen = els.length;
-		var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
-		
-		
-		for (var i = 0, j = 0; i < elsLen; i++) {
-			if (this.elementHasClass(els[i], searchClass) ) {
-				classElements[j] = els[i];
-				j++;
-			}
-		}
-		return classElements;
-	},
-
-
-	/**
-	 * PRIVATE.  Returns an array containing all the classes applied to this
-	 * element.
-	 *
-	 * Used internally by elementHasClass(), addClassToElement() and 
-	 * removeClassFromElement().
-	 **/
-	privateGetClassArray: function(el) {
-		return el.className.split(' '); 
-	},
-
-	/**
-	 * PRIVATE.  Creates a string from an array of class names which can be used 
-	 * by the className function.
-	 *
-	 * Used internally by addClassToElement().
-	 **/
-	privateCreateClassString: function(classArray) {
-		return classArray.join(' ');
-	},
-
-	/**
-	 * Returns true if the given element has been assigned the given class.
-	 **/
-	elementHasClass: function(el, classString) {
-		if (!el) {
-			return false;
-		}
-		
-		var regex = new RegExp('\\b'+classString+'\\b');
-		if (el.className.match(regex)) {
-			return true;
-		}
-
-		return false;
-	},
-
-	/**
-	 * Adds classString to the classes assigned to the element with id equal to
-	 * idString.
-	 **/
-	addClassToId: function(idString, classString) {
-		this.addClassToElement(document.getElementById(idString), classString);
-	},
-
-	/**
-	 * Adds classString to the classes assigned to the given element.
-	 * If the element already has the class which was to be added, then
-	 * it is not added again.
-	 **/
-	addClassToElement: function(el, classString) {
-		var classArray = this.privateGetClassArray(el);
-
-		if (this.elementHasClass(el, classString)) {
-			return; // already has element so don't need to add it
-		}
-
-		classArray.push(classString);
-
-		el.className = this.privateCreateClassString(classArray);
-	},
-
-	/**
-	 * Removes the given classString from the list of classes assigned to the
-	 * element with id equal to idString
-	 **/
-	removeClassFromId: function(idString, classString) {
-		this.removeClassFromElement(document.getElementById(idString), classString);
-	},
-
-	/**
-	 * Removes the given classString from the list of classes assigned to the
-	 * given element.  If the element has the same class assigned to it twice, 
-	 * then only the first instance of that class is removed.
-	 **/
-	removeClassFromElement: function(el, classString) {
-		var classArray = this.privateGetClassArray(el);
-
-		for (x in classArray) {
-			if (classString == classArray[x]) {
-				classArray[x] = '';
-				break;
-			}
-		}
-
-		el.className = this.privateCreateClassString(classArray);
-	}
-}
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/js/mochi/MochiKit.js b/trunk/activemq-web-console/src/main/webapp/js/mochi/MochiKit.js
deleted file mode 100644
index 6189d56..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/mochi/MochiKit.js
+++ /dev/null
@@ -1,4804 +0,0 @@
-/***
-
-    MochiKit.MochiKit 1.3 : PACKED VERSION
-
-    THIS FILE IS AUTOMATICALLY GENERATED.  If creating patches, please
-    diff against the source tree, not this file.
-
-    See <http://mochikit.com/> for documentation, downloads, license, etc.
-
-    (c) 2005 Bob Ippolito.  All rights Reserved.
-
-***/
-
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Base");
-}
-if(typeof (MochiKit)=="undefined"){
-MochiKit={};
-}
-if(typeof (MochiKit.Base)=="undefined"){
-MochiKit.Base={};
-}
-MochiKit.Base.VERSION="1.3";
-MochiKit.Base.NAME="MochiKit.Base";
-MochiKit.Base.update=function(_1,_2){
-if(_1===null){
-_1={};
-}
-for(var i=1;i<arguments.length;i++){
-var o=arguments[i];
-if(typeof (o)!="undefined"&&o!==null){
-for(var k in o){
-_1[k]=o[k];
-}
-}
-}
-return _1;
-};
-MochiKit.Base.update(MochiKit.Base,{__repr__:function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-},toString:function(){
-return this.__repr__();
-},counter:function(n){
-if(arguments.length===0){
-n=1;
-}
-return function(){
-return n++;
-};
-},clone:function(_7){
-var me=arguments.callee;
-if(arguments.length==1){
-me.prototype=_7;
-return new me();
-}
-},flattenArguments:function(_9){
-var res=[];
-var m=MochiKit.Base;
-var _12=m.extend(null,arguments);
-while(_12.length){
-var o=_12.shift();
-if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){
-for(var i=o.length-1;i>=0;i--){
-_12.unshift(o[i]);
-}
-}else{
-res.push(o);
-}
-}
-return res;
-},extend:function(_13,obj,_15){
-if(!_15){
-_15=0;
-}
-if(obj){
-var l=obj.length;
-if(typeof (l)!="number"){
-if(typeof (MochiKit.Iter)!="undefined"){
-obj=MochiKit.Iter.list(obj);
-l=obj.length;
-}else{
-throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
-}
-}
-if(!_13){
-_13=[];
-}
-for(var i=_15;i<l;i++){
-_13.push(obj[i]);
-}
-}
-return _13;
-},updatetree:function(_17,obj){
-if(_17===null){
-_17={};
-}
-for(var i=1;i<arguments.length;i++){
-var o=arguments[i];
-if(typeof (o)!="undefined"&&o!==null){
-for(var k in o){
-var v=o[k];
-if(typeof (_17[k])=="object"&&typeof (v)=="object"){
-arguments.callee(_17[k],v);
-}else{
-_17[k]=v;
-}
-}
-}
-}
-return _17;
-},setdefault:function(_19,obj){
-if(_19===null){
-_19={};
-}
-for(var i=1;i<arguments.length;i++){
-var o=arguments[i];
-for(var k in o){
-if(!(k in _19)){
-_19[k]=o[k];
-}
-}
-}
-return _19;
-},keys:function(obj){
-var _20=[];
-for(var _21 in obj){
-_20.push(_21);
-}
-return _20;
-},items:function(obj){
-var _22=[];
-var e;
-for(var _24 in obj){
-var v;
-try{
-v=obj[_24];
-}
-catch(e){
-continue;
-}
-_22.push([_24,v]);
-}
-return _22;
-},_newNamedError:function(_25,_26,_27){
-_27.prototype=new MochiKit.Base.NamedError(_25.NAME+"."+_26);
-_25[_26]=_27;
-},operator:{truth:function(a){
-return !!a;
-},lognot:function(a){
-return !a;
-},identity:function(a){
-return a;
-},not:function(a){
-return ~a;
-},neg:function(a){
-return -a;
-},add:function(a,b){
-return a+b;
-},sub:function(a,b){
-return a-b;
-},div:function(a,b){
-return a/b;
-},mod:function(a,b){
-return a%b;
-},mul:function(a,b){
-return a*b;
-},and:function(a,b){
-return a&b;
-},or:function(a,b){
-return a|b;
-},xor:function(a,b){
-return a^b;
-},lshift:function(a,b){
-return a<<b;
-},rshift:function(a,b){
-return a>>b;
-},zrshift:function(a,b){
-return a>>>b;
-},eq:function(a,b){
-return a==b;
-},ne:function(a,b){
-return a!=b;
-},gt:function(a,b){
-return a>b;
-},ge:function(a,b){
-return a>=b;
-},lt:function(a,b){
-return a<b;
-},le:function(a,b){
-return a<=b;
-},ceq:function(a,b){
-return MochiKit.Base.compare(a,b)===0;
-},cne:function(a,b){
-return MochiKit.Base.compare(a,b)!==0;
-},cgt:function(a,b){
-return MochiKit.Base.compare(a,b)==1;
-},cge:function(a,b){
-return MochiKit.Base.compare(a,b)!=-1;
-},clt:function(a,b){
-return MochiKit.Base.compare(a,b)==-1;
-},cle:function(a,b){
-return MochiKit.Base.compare(a,b)!=1;
-},logand:function(a,b){
-return a&&b;
-},logor:function(a,b){
-return a||b;
-},contains:function(a,b){
-return b in a;
-}},forwardCall:function(_30){
-return function(){
-return this[_30].apply(this,arguments);
-};
-},itemgetter:function(_31){
-return function(arg){
-return arg[_31];
-};
-},typeMatcher:function(){
-var _33={};
-for(var i=0;i<arguments.length;i++){
-var typ=arguments[i];
-_33[typ]=typ;
-}
-return function(){
-for(var i=0;i<arguments.length;i++){
-if(!(typeof (arguments[i]) in _33)){
-return false;
-}
-}
-return true;
-};
-},isNull:function(){
-for(var i=0;i<arguments.length;i++){
-if(arguments[i]!==null){
-return false;
-}
-}
-return true;
-},isUndefinedOrNull:function(){
-for(var i=0;i<arguments.length;i++){
-var o=arguments[i];
-if(!(typeof (o)=="undefined"||o===null)){
-return false;
-}
-}
-return true;
-},isEmpty:function(obj){
-return !MochiKit.Base.isNotEmpty.apply(this,arguments);
-},isNotEmpty:function(obj){
-for(var i=0;i<arguments.length;i++){
-var o=arguments[i];
-if(!(o&&o.length)){
-return false;
-}
-}
-return true;
-},isArrayLike:function(){
-for(var i=0;i<arguments.length;i++){
-var o=arguments[i];
-var typ=typeof (o);
-if((typ!="object"&&!(typ=="function"&&typeof (o.item)=="function"))||o===null||typeof (o.length)!="number"){
-return false;
-}
-}
-return true;
-},isDateLike:function(){
-for(var i=0;i<arguments.length;i++){
-var o=arguments[i];
-if(typeof (o)!="object"||o===null||typeof (o.getTime)!="function"){
-return false;
-}
-}
-return true;
-},xmap:function(fn){
-if(fn===null){
-return MochiKit.Base.extend(null,arguments,1);
-}
-var _36=[];
-for(var i=1;i<arguments.length;i++){
-_36.push(fn(arguments[i]));
-}
-return _36;
-},map:function(fn,lst){
-var m=MochiKit.Base;
-var itr=MochiKit.Iter;
-var _39=m.isArrayLike;
-if(arguments.length<=2){
-if(!_39(lst)){
-if(itr){
-lst=itr.list(lst);
-if(fn===null){
-return lst;
-}
-}else{
-throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
-}
-}
-if(fn===null){
-return m.extend(null,lst);
-}
-var _40=[];
-for(var i=0;i<lst.length;i++){
-_40.push(fn(lst[i]));
-}
-return _40;
-}else{
-if(fn===null){
-fn=Array;
-}
-var _41=null;
-for(i=1;i<arguments.length;i++){
-if(!_39(arguments[i])){
-if(itr){
-return itr.list(itr.imap.apply(null,arguments));
-}else{
-throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
-}
-}
-var l=arguments[i].length;
-if(_41===null||_41>l){
-_41=l;
-}
-}
-_40=[];
-for(i=0;i<_41;i++){
-var _42=[];
-for(var j=1;j<arguments.length;j++){
-_42.push(arguments[j][i]);
-}
-_40.push(fn.apply(this,_42));
-}
-return _40;
-}
-},xfilter:function(fn){
-var _44=[];
-if(fn===null){
-fn=MochiKit.Base.operator.truth;
-}
-for(var i=1;i<arguments.length;i++){
-var o=arguments[i];
-if(fn(o)){
-_44.push(o);
-}
-}
-return _44;
-},filter:function(fn,lst,_45){
-var _46=[];
-var m=MochiKit.Base;
-if(!m.isArrayLike(lst)){
-if(MochiKit.Iter){
-lst=MochiKit.Iter.list(lst);
-}else{
-throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
-}
-}
-if(fn===null){
-fn=m.operator.truth;
-}
-if(typeof (Array.prototype.filter)=="function"){
-return Array.prototype.filter.call(lst,fn,_45);
-}else{
-if(typeof (_45)=="undefined"||_45===null){
-for(var i=0;i<lst.length;i++){
-var o=lst[i];
-if(fn(o)){
-_46.push(o);
-}
-}
-}else{
-for(i=0;i<lst.length;i++){
-o=lst[i];
-if(fn.call(_45,o)){
-_46.push(o);
-}
-}
-}
-}
-return _46;
-},_wrapDumbFunction:function(_47){
-return function(){
-switch(arguments.length){
-case 0:
-return _47();
-case 1:
-return _47(arguments[0]);
-case 2:
-return _47(arguments[0],arguments[1]);
-case 3:
-return _47(arguments[0],arguments[1],arguments[2]);
-}
-var _48=[];
-for(var i=0;i<arguments.length;i++){
-_48.push("arguments["+i+"]");
-}
-return eval("(func("+_48.join(",")+"))");
-};
-},method:function(_49,_50){
-var m=MochiKit.Base;
-return m.bind.apply(this,m.extend([_50,_49],arguments,2));
-},bind:function(_51,_52){
-if(typeof (_51)=="string"){
-_51=_52[_51];
-}
-var _53=_51.im_func;
-var _54=_51.im_preargs;
-var _55=_51.im_self;
-var m=MochiKit.Base;
-if(typeof (_51)=="function"&&typeof (_51.apply)=="undefined"){
-_51=m._wrapDumbFunction(_51);
-}
-if(typeof (_53)!="function"){
-_53=_51;
-}
-if(typeof (_52)!="undefined"){
-_55=_52;
-}
-if(typeof (_54)=="undefined"){
-_54=[];
-}else{
-_54=_54.slice();
-}
-m.extend(_54,arguments,2);
-var _56=function(){
-var _57=arguments;
-var me=arguments.callee;
-if(me.im_preargs.length>0){
-_57=m.concat(me.im_preargs,_57);
-}
-var _52=me.im_self;
-if(!_52){
-_52=this;
-}
-return me.im_func.apply(_52,_57);
-};
-_56.im_self=_55;
-_56.im_func=_53;
-_56.im_preargs=_54;
-return _56;
-},bindMethods:function(_58){
-var _59=MochiKit.Base.bind;
-for(var k in _58){
-var _60=_58[k];
-if(typeof (_60)=="function"){
-_58[k]=_59(_60,_58);
-}
-}
-},registerComparator:function(_61,_62,_63,_64){
-MochiKit.Base.comparatorRegistry.register(_61,_62,_63,_64);
-},_primitives:{"bool":true,"string":true,"number":true},compare:function(a,b){
-if(a==b){
-return 0;
-}
-var _65=(typeof (a)=="undefined"||a===null);
-var _66=(typeof (b)=="undefined"||b===null);
-if(_65&&_66){
-return 0;
-}else{
-if(_65){
-return -1;
-}else{
-if(_66){
-return 1;
-}
-}
-}
-var m=MochiKit.Base;
-var _67=m._primitives;
-if(!(typeof (a) in _67&&typeof (b) in _67)){
-try{
-return m.comparatorRegistry.match(a,b);
-}
-catch(e){
-if(e!=m.NotFound){
-throw e;
-}
-}
-}
-if(a<b){
-return -1;
-}else{
-if(a>b){
-return 1;
-}
-}
-var _68=m.repr;
-throw new TypeError(_68(a)+" and "+_68(b)+" can not be compared");
-},compareDateLike:function(a,b){
-return MochiKit.Base.compare(a.getTime(),b.getTime());
-},compareArrayLike:function(a,b){
-var _69=MochiKit.Base.compare;
-var _70=a.length;
-var _71=0;
-if(_70>b.length){
-_71=1;
-_70=b.length;
-}else{
-if(_70<b.length){
-_71=-1;
-}
-}
-for(var i=0;i<_70;i++){
-var cmp=_69(a[i],b[i]);
-if(cmp){
-return cmp;
-}
-}
-return _71;
-},registerRepr:function(_73,_74,_75,_76){
-MochiKit.Base.reprRegistry.register(_73,_74,_75,_76);
-},repr:function(o){
-if(typeof (o)=="undefined"){
-return "undefined";
-}else{
-if(o===null){
-return "null";
-}
-}
-try{
-if(typeof (o.__repr__)=="function"){
-return o.__repr__();
-}else{
-if(typeof (o.repr)=="function"&&o.repr!=arguments.callee){
-return o.repr();
-}
-}
-return MochiKit.Base.reprRegistry.match(o);
-}
-catch(e){
-if(typeof (o.NAME)=="string"&&(o.toString==Function.prototype.toString||o.toString==Object.prototype.toString)){
-return o.NAME;
-}
-}
-try{
-var _77=(o+"");
-}
-catch(e){
-return "["+typeof (o)+"]";
-}
-if(typeof (o)=="function"){
-o=_77.replace(/^\s+/,"");
-var idx=o.indexOf("{");
-if(idx!=-1){
-o=o.substr(0,idx)+"{...}";
-}
-}
-return _77;
-},reprArrayLike:function(o){
-var m=MochiKit.Base;
-return "["+m.map(m.repr,o).join(", ")+"]";
-},reprString:function(o){
-return ("\""+o.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
-},reprNumber:function(o){
-return o+"";
-},registerJSON:function(_79,_80,_81,_82){
-MochiKit.Base.jsonRegistry.register(_79,_80,_81,_82);
-},evalJSON:function(){
-return eval("("+arguments[0]+")");
-},serializeJSON:function(o){
-var _83=typeof (o);
-if(_83=="undefined"){
-return "undefined";
-}else{
-if(_83=="number"||_83=="boolean"){
-return o+"";
-}else{
-if(o===null){
-return "null";
-}
-}
-}
-var m=MochiKit.Base;
-var _84=m.reprString;
-if(_83=="string"){
-return _84(o);
-}
-var me=arguments.callee;
-var _85;
-if(typeof (o.__json__)=="function"){
-_85=o.__json__();
-if(o!==_85){
-return me(_85);
-}
-}
-if(typeof (o.json)=="function"){
-_85=o.json();
-if(o!==_85){
-return me(_85);
-}
-}
-if(_83!="function"&&typeof (o.length)=="number"){
-var res=[];
-for(var i=0;i<o.length;i++){
-var val=me(o[i]);
-if(typeof (val)!="string"){
-val="undefined";
-}
-res.push(val);
-}
-return "["+res.join(", ")+"]";
-}
-try{
-_85=m.jsonRegistry.match(o);
-return me(_85);
-}
-catch(e){
-if(e!=m.NotFound){
-throw e;
-}
-}
-if(_83=="function"){
-return null;
-}
-res=[];
-for(var k in o){
-var _87;
-if(typeof (k)=="number"){
-_87="\""+k+"\"";
-}else{
-if(typeof (k)=="string"){
-_87=_84(k);
-}else{
-continue;
-}
-}
-val=me(o[k]);
-if(typeof (val)!="string"){
-continue;
-}
-res.push(_87+":"+val);
-}
-return "{"+res.join(", ")+"}";
-},objEqual:function(a,b){
-return (MochiKit.Base.compare(a,b)===0);
-},arrayEqual:function(_88,arr){
-if(_88.length!=arr.length){
-return false;
-}
-return (MochiKit.Base.compare(_88,arr)===0);
-},concat:function(){
-var _90=[];
-var _91=MochiKit.Base.extend;
-for(var i=0;i<arguments.length;i++){
-_91(_90,arguments[i]);
-}
-return _90;
-},keyComparator:function(key){
-var m=MochiKit.Base;
-var _93=m.compare;
-if(arguments.length==1){
-return function(a,b){
-return _93(a[key],b[key]);
-};
-}
-var _94=m.extend(null,arguments);
-return function(a,b){
-var _95=0;
-for(var i=0;(_95===0)&&(i<_94.length);i++){
-var key=_94[i];
-_95=_93(a[key],b[key]);
-}
-return _95;
-};
-},reverseKeyComparator:function(key){
-var _96=MochiKit.Base.keyComparator.apply(this,arguments);
-return function(a,b){
-return _96(b,a);
-};
-},partial:function(_97){
-var m=MochiKit.Base;
-return m.bind.apply(this,m.extend([_97,undefined],arguments,1));
-},listMinMax:function(_98,lst){
-if(lst.length===0){
-return null;
-}
-var cur=lst[0];
-var _100=MochiKit.Base.compare;
-for(var i=1;i<lst.length;i++){
-var o=lst[i];
-if(_100(o,cur)==_98){
-cur=o;
-}
-}
-return cur;
-},objMax:function(){
-return MochiKit.Base.listMinMax(1,arguments);
-},objMin:function(){
-return MochiKit.Base.listMinMax(-1,arguments);
-},findIdentical:function(lst,_101,_102,end){
-if(typeof (end)=="undefined"||end===null){
-end=lst.length;
-}
-for(var i=(_102||0);i<end;i++){
-if(lst[i]===_101){
-return i;
-}
-}
-return -1;
-},findValue:function(lst,_104,_105,end){
-if(typeof (end)=="undefined"||end===null){
-end=lst.length;
-}
-var cmp=MochiKit.Base.compare;
-for(var i=(_105||0);i<end;i++){
-if(cmp(lst[i],_104)===0){
-return i;
-}
-}
-return -1;
-},nodeWalk:function(node,_107){
-var _108=[node];
-var _109=MochiKit.Base.extend;
-while(_108.length){
-var res=_107(_108.shift());
-if(res){
-_109(_108,res);
-}
-}
-},nameFunctions:function(_110){
-var base=_110.NAME;
-if(typeof (base)=="undefined"){
-base="";
-}else{
-base=base+".";
-}
-for(var name in _110){
-var o=_110[name];
-if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
-try{
-o.NAME=base+name;
-}
-catch(e){
-}
-}
-}
-},queryString:function(_113,_114){
-if(typeof (MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof (_113)=="string"||(typeof (_113.nodeType)!="undefined"&&_113.nodeType>0))){
-var kv=MochiKit.DOM.formContents(_113);
-_113=kv[0];
-_114=kv[1];
-}else{
-if(arguments.length==1){
-var o=_113;
-_113=[];
-_114=[];
-for(var k in o){
-var v=o[k];
-if(typeof (v)!="function"){
-_113.push(k);
-_114.push(v);
-}
-}
-}
-}
-var rval=[];
-var len=Math.min(_113.length,_114.length);
-var _118=MochiKit.Base.urlEncode;
-for(var i=0;i<len;i++){
-v=_114[i];
-if(typeof (v)!="undefined"&&v!==null){
-rval.push(_118(_113[i])+"="+_118(v));
-}
-}
-return rval.join("&");
-},parseQueryString:function(_119,_120){
-var _121=_119.replace(/\+/g,"%20").split("&");
-var o={};
-var _122;
-if(typeof (decodeURIComponent)!="undefined"){
-_122=decodeURIComponent;
-}else{
-_122=unescape;
-}
-if(_120){
-for(var i=0;i<_121.length;i++){
-var pair=_121[i].split("=");
-var name=_122(pair[0]);
-var arr=o[name];
-if(!(arr instanceof Array)){
-arr=[];
-o[name]=arr;
-}
-arr.push(_122(pair[1]));
-}
-}else{
-for(i=0;i<_121.length;i++){
-pair=_121[i].split("=");
-o[_122(pair[0])]=_122(pair[1]);
-}
-}
-return o;
-}});
-MochiKit.Base.AdapterRegistry=function(){
-this.pairs=[];
-};
-MochiKit.Base.AdapterRegistry.prototype={register:function(name,_124,wrap,_126){
-if(_126){
-this.pairs.unshift([name,_124,wrap]);
-}else{
-this.pairs.push([name,_124,wrap]);
-}
-},match:function(){
-for(var i=0;i<this.pairs.length;i++){
-var pair=this.pairs[i];
-if(pair[1].apply(this,arguments)){
-return pair[2].apply(this,arguments);
-}
-}
-throw MochiKit.Base.NotFound;
-},unregister:function(name){
-for(var i=0;i<this.pairs.length;i++){
-var pair=this.pairs[i];
-if(pair[0]==name){
-this.pairs.splice(i,1);
-return true;
-}
-}
-return false;
-}};
-MochiKit.Base.EXPORT=["counter","clone","extend","update","updatetree","setdefault","keys","items","NamedError","operator","forwardCall","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isEmpty","isNotEmpty","isArrayLike","isDateLike","xmap","map","xfilter","filter","bind","bindMethods","NotFound","AdapterRegistry","registerComparator","compare","registerRepr","repr","objEqual","arrayEqual","concat","keyComparator","reverseKeyComparator","partial","merge","listMinMax","listMax","listMin","objMax","objMin","nodeWalk","zip","urlEncode","queryString","serializeJSON","registerJSON","evalJSON","parseQueryString","findValue","findIdentical","flattenArguments","method"];
-MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","jsonRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber"];
-MochiKit.Base._exportSymbols=function(_127,_128){
-if(typeof (MochiKit.__export__)=="undefined"){
-MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined"));
-}
-if(!MochiKit.__export__){
-return;
-}
-var all=_128.EXPORT_TAGS[":all"];
-for(var i=0;i<all.length;i++){
-_127[all[i]]=_128[all[i]];
-}
-};
-MochiKit.Base.__new__=function(){
-var m=this;
-m.forward=m.forwardCall;
-m.find=m.findValue;
-if(typeof (encodeURIComponent)!="undefined"){
-m.urlEncode=function(_130){
-return encodeURIComponent(_130).replace(/\'/g,"%27");
-};
-}else{
-m.urlEncode=function(_131){
-return escape(_131).replace(/\+/g,"%2B").replace(/\"/g,"%22").rval.replace(/\'/g,"%27");
-};
-}
-m.NamedError=function(name){
-this.message=name;
-this.name=name;
-};
-m.NamedError.prototype=new Error();
-m.update(m.NamedError.prototype,{repr:function(){
-if(this.message&&this.message!=this.name){
-return this.name+"("+m.repr(this.message)+")";
-}else{
-return this.name+"()";
-}
-},toString:m.forwardCall("repr")});
-m.NotFound=new m.NamedError("MochiKit.Base.NotFound");
-m.listMax=m.partial(m.listMinMax,1);
-m.listMin=m.partial(m.listMinMax,-1);
-m.isCallable=m.typeMatcher("function");
-m.isUndefined=m.typeMatcher("undefined");
-m.merge=m.partial(m.update,null);
-m.zip=m.partial(m.map,null);
-m.comparatorRegistry=new m.AdapterRegistry();
-m.registerComparator("dateLike",m.isDateLike,m.compareDateLike);
-m.registerComparator("arrayLike",m.isArrayLike,m.compareArrayLike);
-m.reprRegistry=new m.AdapterRegistry();
-m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);
-m.registerRepr("string",m.typeMatcher("string"),m.reprString);
-m.registerRepr("numbers",m.typeMatcher("number","boolean"),m.reprNumber);
-m.jsonRegistry=new m.AdapterRegistry();
-var all=m.concat(m.EXPORT,m.EXPORT_OK);
-m.EXPORT_TAGS={":common":m.concat(m.EXPORT_OK),":all":all};
-m.nameFunctions(this);
-};
-MochiKit.Base.__new__();
-if(!MochiKit.__compat__){
-compare=MochiKit.Base.compare;
-}
-MochiKit.Base._exportSymbols(this,MochiKit.Base);
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Iter");
-dojo.require("MochiKit.Base");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Base",[]);
-}
-try{
-if(typeof (MochiKit.Base)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.Iter depends on MochiKit.Base!";
-}
-if(typeof (MochiKit.Iter)=="undefined"){
-MochiKit.Iter={};
-}
-MochiKit.Iter.NAME="MochiKit.Iter";
-MochiKit.Iter.VERSION="1.3";
-MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-},toString:function(){
-return this.__repr__();
-},registerIteratorFactory:function(name,_132,_133,_134){
-MochiKit.Iter.iteratorRegistry.register(name,_132,_133,_134);
-},iter:function(_135,_136){
-var self=MochiKit.Iter;
-if(arguments.length==2){
-return self.takewhile(function(a){
-return a!=_136;
-},_135);
-}
-if(typeof (_135.next)=="function"){
-return _135;
-}else{
-if(typeof (_135.iter)=="function"){
-return _135.iter();
-}
-}
-try{
-return self.iteratorRegistry.match(_135);
-}
-catch(e){
-var m=MochiKit.Base;
-if(e==m.NotFound){
-e=new TypeError(typeof (_135)+": "+m.repr(_135)+" is not iterable");
-}
-throw e;
-}
-},count:function(n){
-if(!n){
-n=0;
-}
-var m=MochiKit.Base;
-return {repr:function(){
-return "count("+n+")";
-},toString:m.forwardCall("repr"),next:m.counter(n)};
-},cycle:function(p){
-var self=MochiKit.Iter;
-var m=MochiKit.Base;
-var lst=[];
-var _139=self.iter(p);
-return {repr:function(){
-return "cycle(...)";
-},toString:m.forwardCall("repr"),next:function(){
-try{
-var rval=_139.next();
-lst.push(rval);
-return rval;
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-if(lst.length===0){
-this.next=function(){
-throw self.StopIteration;
-};
-}else{
-var i=-1;
-this.next=function(){
-i=(i+1)%lst.length;
-return lst[i];
-};
-}
-return this.next();
-}
-}};
-},repeat:function(elem,n){
-var m=MochiKit.Base;
-if(typeof (n)=="undefined"){
-return {repr:function(){
-return "repeat("+m.repr(elem)+")";
-},toString:m.forwardCall("repr"),next:function(){
-return elem;
-}};
-}
-return {repr:function(){
-return "repeat("+m.repr(elem)+", "+n+")";
-},toString:m.forwardCall("repr"),next:function(){
-if(n<=0){
-throw MochiKit.Iter.StopIteration;
-}
-n-=1;
-return elem;
-}};
-},next:function(_141){
-return _141.next();
-},izip:function(p,q){
-var m=MochiKit.Base;
-var next=MochiKit.Iter.next;
-var _144=m.map(iter,arguments);
-return {repr:function(){
-return "izip(...)";
-},toString:m.forwardCall("repr"),next:function(){
-return m.map(next,_144);
-}};
-},ifilter:function(pred,seq){
-var m=MochiKit.Base;
-seq=MochiKit.Iter.iter(seq);
-if(pred===null){
-pred=m.operator.truth;
-}
-return {repr:function(){
-return "ifilter(...)";
-},toString:m.forwardCall("repr"),next:function(){
-while(true){
-var rval=seq.next();
-if(pred(rval)){
-return rval;
-}
-}
-return undefined;
-}};
-},ifilterfalse:function(pred,seq){
-var m=MochiKit.Base;
-seq=MochiKit.Iter.iter(seq);
-if(pred===null){
-pred=m.operator.truth;
-}
-return {repr:function(){
-return "ifilterfalse(...)";
-},toString:m.forwardCall("repr"),next:function(){
-while(true){
-var rval=seq.next();
-if(!pred(rval)){
-return rval;
-}
-}
-return undefined;
-}};
-},islice:function(seq){
-var self=MochiKit.Iter;
-var m=MochiKit.Base;
-seq=self.iter(seq);
-var _147=0;
-var stop=0;
-var step=1;
-var i=-1;
-if(arguments.length==2){
-stop=arguments[1];
-}else{
-if(arguments.length==3){
-_147=arguments[1];
-stop=arguments[2];
-}else{
-_147=arguments[1];
-stop=arguments[2];
-step=arguments[3];
-}
-}
-return {repr:function(){
-return "islice("+["...",_147,stop,step].join(", ")+")";
-},toString:m.forwardCall("repr"),next:function(){
-var rval;
-while(i<_147){
-rval=seq.next();
-i++;
-}
-if(_147>=stop){
-throw self.StopIteration;
-}
-_147+=step;
-return rval;
-}};
-},imap:function(fun,p,q){
-var m=MochiKit.Base;
-var self=MochiKit.Iter;
-var _151=m.map(self.iter,m.extend(null,arguments,1));
-var map=m.map;
-var next=self.next;
-return {repr:function(){
-return "imap(...)";
-},toString:m.forwardCall("repr"),next:function(){
-return fun.apply(this,map(next,_151));
-}};
-},applymap:function(fun,seq,self){
-seq=MochiKit.Iter.iter(seq);
-var m=MochiKit.Base;
-return {repr:function(){
-return "applymap(...)";
-},toString:m.forwardCall("repr"),next:function(){
-return fun.apply(self,seq.next());
-}};
-},chain:function(p,q){
-var self=MochiKit.Iter;
-var m=MochiKit.Base;
-if(arguments.length==1){
-return self.iter(arguments[0]);
-}
-var _153=m.map(self.iter,arguments);
-return {repr:function(){
-return "chain(...)";
-},toString:m.forwardCall("repr"),next:function(){
-while(_153.length>1){
-try{
-return _153[0].next();
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-_153.shift();
-}
-}
-if(_153.length==1){
-var arg=_153.shift();
-this.next=m.bind("next",arg);
-return this.next();
-}
-throw self.StopIteration;
-}};
-},takewhile:function(pred,seq){
-var self=MochiKit.Iter;
-seq=self.iter(seq);
-return {repr:function(){
-return "takewhile(...)";
-},toString:MochiKit.Base.forwardCall("repr"),next:function(){
-var rval=seq.next();
-if(!pred(rval)){
-this.next=function(){
-throw self.StopIteration;
-};
-this.next();
-}
-return rval;
-}};
-},dropwhile:function(pred,seq){
-seq=MochiKit.Iter.iter(seq);
-var m=MochiKit.Base;
-var bind=m.bind;
-return {"repr":function(){
-return "dropwhile(...)";
-},"toString":m.forwardCall("repr"),"next":function(){
-while(true){
-var rval=seq.next();
-if(!pred(rval)){
-break;
-}
-}
-this.next=bind("next",seq);
-return rval;
-}};
-},_tee:function(_155,sync,_157){
-sync.pos[_155]=-1;
-var m=MochiKit.Base;
-var _158=m.listMin;
-return {repr:function(){
-return "tee("+_155+", ...)";
-},toString:m.forwardCall("repr"),next:function(){
-var rval;
-var i=sync.pos[_155];
-if(i==sync.max){
-rval=_157.next();
-sync.deque.push(rval);
-sync.max+=1;
-sync.pos[_155]+=1;
-}else{
-rval=sync.deque[i-sync.min];
-sync.pos[_155]+=1;
-if(i==sync.min&&_158(sync.pos)!=sync.min){
-sync.min+=1;
-sync.deque.shift();
-}
-}
-return rval;
-}};
-},tee:function(_159,n){
-var rval=[];
-var sync={"pos":[],"deque":[],"max":-1,"min":-1};
-if(arguments.length==1){
-n=2;
-}
-var self=MochiKit.Iter;
-_159=self.iter(_159);
-var _tee=self._tee;
-for(var i=0;i<n;i++){
-rval.push(_tee(i,sync,_159));
-}
-return rval;
-},list:function(_161){
-var m=MochiKit.Base;
-if(typeof (_161.slice)=="function"){
-return _161.slice();
-}else{
-if(m.isArrayLike(_161)){
-return m.concat(_161);
-}
-}
-var self=MochiKit.Iter;
-_161=self.iter(_161);
-var rval=[];
-try{
-while(true){
-rval.push(_161.next());
-}
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-return rval;
-}
-return undefined;
-},reduce:function(fn,_162,_163){
-var i=0;
-var x=_163;
-var self=MochiKit.Iter;
-_162=self.iter(_162);
-if(arguments.length<3){
-try{
-x=_162.next();
-}
-catch(e){
-if(e==self.StopIteration){
-e=new TypeError("reduce() of empty sequence with no initial value");
-}
-throw e;
-}
-i++;
-}
-try{
-while(true){
-x=fn(x,_162.next());
-}
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-}
-return x;
-},range:function(){
-var _165=0;
-var stop=0;
-var step=1;
-if(arguments.length==1){
-stop=arguments[0];
-}else{
-if(arguments.length==2){
-_165=arguments[0];
-stop=arguments[1];
-}else{
-if(arguments.length==3){
-_165=arguments[0];
-stop=arguments[1];
-step=arguments[2];
-}else{
-throw new TypeError("range() takes 1, 2, or 3 arguments!");
-}
-}
-}
-if(step===0){
-throw new TypeError("range() step must not be 0");
-}
-return {next:function(){
-if((step>0&&_165>=stop)||(step<0&&_165<=stop)){
-throw MochiKit.Iter.StopIteration;
-}
-var rval=_165;
-_165+=step;
-return rval;
-},repr:function(){
-return "range("+[_165,stop,step].join(", ")+")";
-},toString:MochiKit.Base.forwardCall("repr")};
-},sum:function(_166,_167){
-var x=_167||0;
-var self=MochiKit.Iter;
-_166=self.iter(_166);
-try{
-while(true){
-x+=_166.next();
-}
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-}
-return x;
-},exhaust:function(_168){
-var self=MochiKit.Iter;
-_168=self.iter(_168);
-try{
-while(true){
-_168.next();
-}
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-}
-},forEach:function(_169,func,self){
-var m=MochiKit.Base;
-if(arguments.length>2){
-func=m.bind(func,self);
-}
-if(m.isArrayLike(_169)){
-try{
-for(var i=0;i<_169.length;i++){
-func(_169[i]);
-}
-}
-catch(e){
-if(e!=MochiKit.Iter.StopIteration){
-throw e;
-}
-}
-}else{
-self=MochiKit.Iter;
-self.exhaust(self.imap(func,_169));
-}
-},every:function(_171,func){
-var self=MochiKit.Iter;
-try{
-self.ifilterfalse(func,_171).next();
-return false;
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-return true;
-}
-},sorted:function(_172,cmp){
-var rval=MochiKit.Iter.list(_172);
-if(arguments.length==1){
-cmp=MochiKit.Base.compare;
-}
-rval.sort(cmp);
-return rval;
-},reversed:function(_173){
-var rval=MochiKit.Iter.list(_173);
-rval.reverse();
-return rval;
-},some:function(_174,func){
-var self=MochiKit.Iter;
-try{
-self.ifilter(func,_174).next();
-return true;
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-return false;
-}
-},iextend:function(lst,_175){
-if(MochiKit.Base.isArrayLike(_175)){
-for(var i=0;i<_175.length;i++){
-lst.push(_175[i]);
-}
-}else{
-var self=MochiKit.Iter;
-_175=self.iter(_175);
-try{
-while(true){
-lst.push(_175.next());
-}
-}
-catch(e){
-if(e!=self.StopIteration){
-throw e;
-}
-}
-}
-return lst;
-},groupby:function(_176,_177){
-var m=MochiKit.Base;
-var self=MochiKit.Iter;
-if(arguments.length<2){
-_177=m.operator.identity;
-}
-_176=self.iter(_176);
-var pk=undefined;
-var k=undefined;
-var v;
-function fetch(){
-v=_176.next();
-k=_177(v);
-}
-function eat(){
-var ret=v;
-v=undefined;
-return ret;
-}
-var _180=true;
-return {repr:function(){
-return "groupby(...)";
-},next:function(){
-while(k==pk){
-fetch();
-if(_180){
-_180=false;
-break;
-}
-}
-pk=k;
-return [k,{next:function(){
-if(v==undefined){
-fetch();
-}
-if(k!=pk){
-throw self.StopIteration;
-}
-return eat();
-}}];
-}};
-},groupby_as_array:function(_181,_182){
-var m=MochiKit.Base;
-var self=MochiKit.Iter;
-if(arguments.length<2){
-_182=m.operator.identity;
-}
-_181=self.iter(_181);
-var _183=[];
-var _184=true;
-var _185;
-while(true){
-try{
-var _186=_181.next();
-var key=_182(_186);
-}
-catch(e){
-if(e==self.StopIteration){
-break;
-}
-throw e;
-}
-if(_184||key!=_185){
-var _187=[];
-_183.push([key,_187]);
-}
-_187.push(_186);
-_184=false;
-_185=key;
-}
-return _183;
-},arrayLikeIter:function(_188){
-var i=0;
-return {repr:function(){
-return "arrayLikeIter(...)";
-},toString:MochiKit.Base.forwardCall("repr"),next:function(){
-if(i>=_188.length){
-throw MochiKit.Iter.StopIteration;
-}
-return _188[i++];
-}};
-},hasIterateNext:function(_189){
-return (_189&&typeof (_189.iterateNext)=="function");
-},iterateNextIter:function(_190){
-return {repr:function(){
-return "iterateNextIter(...)";
-},toString:MochiKit.Base.forwardCall("repr"),next:function(){
-var rval=_190.iterateNext();
-if(rval===null||rval===undefined){
-throw MochiKit.Iter.StopIteration;
-}
-return rval;
-}};
-}});
-MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",];
-MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"];
-MochiKit.Iter.__new__=function(){
-var m=MochiKit.Base;
-this.StopIteration=new m.NamedError("StopIteration");
-this.iteratorRegistry=new m.AdapterRegistry();
-this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter);
-this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);
-this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
-m.nameFunctions(this);
-};
-MochiKit.Iter.__new__();
-if(!MochiKit.__compat__){
-reduce=MochiKit.Iter.reduce;
-}
-MochiKit.Base._exportSymbols(this,MochiKit.Iter);
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Logging");
-dojo.require("MochiKit.Base");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Base",[]);
-}
-try{
-if(typeof (MochiKit.Base)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.Logging depends on MochiKit.Base!";
-}
-if(typeof (MochiKit.Logging)=="undefined"){
-MochiKit.Logging={};
-}
-MochiKit.Logging.NAME="MochiKit.Logging";
-MochiKit.Logging.VERSION="1.3";
-MochiKit.Logging.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.Logging.toString=function(){
-return this.__repr__();
-};
-MochiKit.Logging.EXPORT=["LogLevel","LogMessage","Logger","alertListener","logger","log","logError","logDebug","logFatal","logWarning"];
-MochiKit.Logging.EXPORT_OK=["logLevelAtLeast","isLogMessage","compareLogMessage"];
-MochiKit.Logging.LogMessage=function(num,_192,info){
-this.num=num;
-this.level=_192;
-this.info=info;
-this.timestamp=new Date();
-};
-MochiKit.Logging.LogMessage.prototype={repr:function(){
-var m=MochiKit.Base;
-return "LogMessage("+m.map(m.repr,[this.num,this.level,this.info]).join(", ")+")";
-},toString:MochiKit.Base.forwardCall("repr")};
-MochiKit.Base.update(MochiKit.Logging,{logLevelAtLeast:function(_194){
-var self=MochiKit.Logging;
-if(typeof (_194)=="string"){
-_194=self.LogLevel[_194];
-}
-return function(msg){
-var _196=msg.level;
-if(typeof (_196)=="string"){
-_196=self.LogLevel[_196];
-}
-return _196>=_194;
-};
-},isLogMessage:function(){
-var _197=MochiKit.Logging.LogMessage;
-for(var i=0;i<arguments.length;i++){
-if(!(arguments[i] instanceof _197)){
-return false;
-}
-}
-return true;
-},compareLogMessage:function(a,b){
-return MochiKit.Base.compare([a.level,a.info],[b.level,b.info]);
-},alertListener:function(msg){
-alert("num: "+msg.num+"\nlevel: "+msg.level+"\ninfo: "+msg.info.join(" "));
-}});
-MochiKit.Logging.Logger=function(_198){
-this.counter=0;
-if(typeof (_198)=="undefined"||_198===null){
-_198=-1;
-}
-this.maxSize=_198;
-this._messages=[];
-this.listeners={};
-this.useNativeConsole=false;
-};
-MochiKit.Logging.Logger.prototype={clear:function(){
-this._messages.splice(0,this._messages.length);
-},logToConsole:function(msg){
-if(typeof (window)!="undefined"&&window.console&&window.console.log){
-window.console.log(msg);
-}else{
-if(typeof (opera)!="undefined"&&opera.postError){
-opera.postError(msg);
-}else{
-if(typeof (printfire)=="function"){
-printfire(msg);
-}
-}
-}
-},dispatchListeners:function(msg){
-for(var k in this.listeners){
-var pair=this.listeners[k];
-if(pair.ident!=k||(pair[0]&&!pair[0](msg))){
-continue;
-}
-pair[1](msg);
-}
-},addListener:function(_199,_200,_201){
-if(typeof (_200)=="string"){
-_200=MochiKit.Logging.logLevelAtLeast(_200);
-}
-var _202=[_200,_201];
-_202.ident=_199;
-this.listeners[_199]=_202;
-},removeListener:function(_203){
-delete this.listeners[_203];
-},baseLog:function(_204,_205){
-var msg=new MochiKit.Logging.LogMessage(this.counter,_204,MochiKit.Base.extend(null,arguments,1));
-this._messages.push(msg);
-this.dispatchListeners(msg);
-if(this.useNativeConsole){
-this.logToConsole(msg.level+": "+msg.info.join(" "));
-}
-this.counter+=1;
-while(this.maxSize>=0&&this._messages.length>this.maxSize){
-this._messages.shift();
-}
-},getMessages:function(_206){
-var _207=0;
-if(!(typeof (_206)=="undefined"||_206===null)){
-_207=Math.max(0,this._messages.length-_206);
-}
-return this._messages.slice(_207);
-},getMessageText:function(_208){
-if(typeof (_208)=="undefined"||_208===null){
-_208=30;
-}
-var _209=this.getMessages(_208);
-if(_209.length){
-var lst=map(function(m){
-return "\n  ["+m.num+"] "+m.level+": "+m.info.join(" ");
-},_209);
-lst.unshift("LAST "+_209.length+" MESSAGES:");
-return lst.join("");
-}
-return "";
-},debuggingBookmarklet:function(_210){
-if(typeof (MochiKit.LoggingPane)=="undefined"){
-alert(this.getMessageText());
-}else{
-MochiKit.LoggingPane.createLoggingPane(_210||false);
-}
-}};
-MochiKit.Logging.__new__=function(){
-this.LogLevel={ERROR:40,FATAL:50,WARNING:30,INFO:20,DEBUG:10};
-var m=MochiKit.Base;
-m.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage);
-var _211=m.partial;
-var _212=this.Logger;
-var _213=_212.prototype.baseLog;
-m.update(this.Logger.prototype,{debug:_211(_213,"DEBUG"),log:_211(_213,"INFO"),error:_211(_213,"ERROR"),fatal:_211(_213,"FATAL"),warning:_211(_213,"WARNING")});
-var self=this;
-var _214=function(name){
-return function(){
-self.logger[name].apply(self.logger,arguments);
-};
-};
-this.log=_214("log");
-this.logError=_214("error");
-this.logDebug=_214("debug");
-this.logFatal=_214("fatal");
-this.logWarning=_214("warning");
-this.logger=new _212();
-this.logger.useNativeConsole=true;
-this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
-m.nameFunctions(this);
-};
-if(typeof (printfire)=="undefined"&&typeof (document)!="undefined"&&document.createEvent&&typeof (dispatchEvent)!="undefined"){
-function printfire(){
-printfire.args=arguments;
-var ev=document.createEvent("Events");
-ev.initEvent("printfire",false,true);
-dispatchEvent(ev);
-}
-}
-MochiKit.Logging.__new__();
-MochiKit.Base._exportSymbols(this,MochiKit.Logging);
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.DateTime");
-}
-if(typeof (MochiKit)=="undefined"){
-MochiKit={};
-}
-if(typeof (MochiKit.DateTime)=="undefined"){
-MochiKit.DateTime={};
-}
-MochiKit.DateTime.NAME="MochiKit.DateTime";
-MochiKit.DateTime.VERSION="1.3";
-MochiKit.DateTime.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.DateTime.toString=function(){
-return this.__repr__();
-};
-MochiKit.DateTime.isoDate=function(str){
-str=str+"";
-if(typeof (str)!="string"||str.length===0){
-return null;
-}
-var iso=str.split("-");
-if(iso.length===0){
-return null;
-}
-return new Date(iso[0],iso[1]-1,iso[2]);
-};
-MochiKit.DateTime._isoRegexp=/(\d{4,})(?:-(\d{1,2})(?:-(\d{1,2})(?:[T ](\d{1,2}):(\d{1,2})(?::(\d{1,2})(?:\.(\d+))?)?(?:(Z)|([+-])(\d{1,2})(?::(\d{1,2}))?)?)?)?)?/;
-MochiKit.DateTime.isoTimestamp=function(str){
-str=str+"";
-if(typeof (str)!="string"||str.length===0){
-return null;
-}
-var res=str.match(MochiKit.DateTime._isoRegexp);
-if(typeof (res)=="undefined"||res===null){
-return null;
-}
-var year,month,day,hour,min,sec,msec;
-year=parseInt(res[1],10);
-if(typeof (res[2])=="undefined"||res[2]===""){
-return new Date(year);
-}
-month=parseInt(res[2],10)-1;
-day=parseInt(res[3],10);
-if(typeof (res[4])=="undefined"||res[4]===""){
-return new Date(year,month,day);
-}
-hour=parseInt(res[4],10);
-min=parseInt(res[5],10);
-sec=(typeof (res[6])!="undefined"&&res[6]!=="")?parseInt(res[6],10):0;
-if(typeof (res[7])!="undefined"&&res[7]!==""){
-msec=Math.round(1000*parseFloat("0."+res[7]));
-}else{
-msec=0;
-}
-if((typeof (res[8])=="undefined"||res[8]==="")&&(typeof (res[9])=="undefined"||res[9]==="")){
-return new Date(year,month,day,hour,min,sec,msec);
-}
-var ofs;
-if(typeof (res[9])!="undefined"&&res[9]!==""){
-ofs=parseInt(res[10],10)*3600000;
-if(typeof (res[11])!="undefined"&&res[11]!==""){
-ofs+=parseInt(res[11],10)*60000;
-}
-if(res[9]=="-"){
-ofs=-ofs;
-}
-}else{
-ofs=0;
-}
-return new Date(Date.UTC(year,month,day,hour,min,sec,msec)-ofs);
-};
-MochiKit.DateTime.toISOTime=function(date,_221){
-if(typeof (date)=="undefined"||date===null){
-return null;
-}
-var hh=date.getHours();
-var mm=date.getMinutes();
-var ss=date.getSeconds();
-var lst=[((_221&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];
-return lst.join(":");
-};
-MochiKit.DateTime.toISOTimestamp=function(date,_225){
-if(typeof (date)=="undefined"||date===null){
-return null;
-}
-var sep=_225?"T":" ";
-var foot=_225?"Z":"";
-if(_225){
-date=new Date(date.getTime()+(date.getTimezoneOffset()*60000));
-}
-return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date,_225)+foot;
-};
-MochiKit.DateTime.toISODate=function(date){
-if(typeof (date)=="undefined"||date===null){
-return null;
-}
-var _228=MochiKit.DateTime._padTwo;
-return [date.getFullYear(),_228(date.getMonth()+1),_228(date.getDate())].join("-");
-};
-MochiKit.DateTime.americanDate=function(d){
-d=d+"";
-if(typeof (d)!="string"||d.length===0){
-return null;
-}
-var a=d.split("/");
-return new Date(a[2],a[0]-1,a[1]);
-};
-MochiKit.DateTime._padTwo=function(n){
-return (n>9)?n:"0"+n;
-};
-MochiKit.DateTime.toPaddedAmericanDate=function(d){
-if(typeof (d)=="undefined"||d===null){
-return null;
-}
-var _230=MochiKit.DateTime._padTwo;
-return [_230(d.getMonth()+1),_230(d.getDate()),d.getFullYear()].join("/");
-};
-MochiKit.DateTime.toAmericanDate=function(d){
-if(typeof (d)=="undefined"||d===null){
-return null;
-}
-return [d.getMonth()+1,d.getDate(),d.getFullYear()].join("/");
-};
-MochiKit.DateTime.EXPORT=["isoDate","isoTimestamp","toISOTime","toISOTimestamp","toISODate","americanDate","toPaddedAmericanDate","toAmericanDate"];
-MochiKit.DateTime.EXPORT_OK=[];
-MochiKit.DateTime.EXPORT_TAGS={":common":MochiKit.DateTime.EXPORT,":all":MochiKit.DateTime.EXPORT};
-MochiKit.DateTime.__new__=function(){
-var base=this.NAME+".";
-for(var k in this){
-var o=this[k];
-if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
-try{
-o.NAME=base+k;
-}
-catch(e){
-}
-}
-}
-};
-MochiKit.DateTime.__new__();
-if(typeof (MochiKit.Base)!="undefined"){
-MochiKit.Base._exportSymbols(this,MochiKit.DateTime);
-}else{
-(function(_231,_232){
-if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
-var all=_232.EXPORT_TAGS[":all"];
-for(var i=0;i<all.length;i++){
-_231[all[i]]=_232[all[i]];
-}
-}
-})(this,MochiKit.DateTime);
-}
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Format");
-}
-if(typeof (MochiKit)=="undefined"){
-MochiKit={};
-}
-if(typeof (MochiKit.Format)=="undefined"){
-MochiKit.Format={};
-}
-MochiKit.Format.NAME="MochiKit.Format";
-MochiKit.Format.VERSION="1.3";
-MochiKit.Format.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.Format.toString=function(){
-return this.__repr__();
-};
-MochiKit.Format._numberFormatter=function(_233,_234,_235,_236,_237,_238,_239,_240,_241){
-return function(num){
-num=parseFloat(num);
-if(typeof (num)=="undefined"||num===null||isNaN(num)){
-return _233;
-}
-var _242=_234;
-var _243=_235;
-if(num<0){
-num=-num;
-}else{
-_242=_242.replace(/-/,"");
-}
-var me=arguments.callee;
-var fmt=MochiKit.Format.formatLocale(_236);
-if(_237){
-num=num*100;
-_243=fmt.percent+_243;
-}
-num=MochiKit.Format.roundToFixed(num,_238);
-var _245=num.split(/\./);
-var _246=_245[0];
-var frac=(_245.length==1)?"":_245[1];
-var res="";
-while(_246.length<_239){
-_246="0"+_246;
-}
-if(_240){
-while(_246.length>_240){
-var i=_246.length-_240;
-res=fmt.separator+_246.substring(i,_246.length)+res;
-_246=_246.substring(0,i);
-}
-}
-res=_246+res;
-if(_238>0){
-while(frac.length<_241){
-frac=frac+"0";
-}
-res=res+fmt.decimal+frac;
-}
-return _242+res+_243;
-};
-};
-MochiKit.Format.numberFormatter=function(_248,_249,_250){
-if(typeof (_249)=="undefined"){
-_249="";
-}
-var _251=_248.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/);
-if(!_251){
-throw TypeError("Invalid pattern");
-}
-var _252=_248.substr(0,_251.index);
-var _253=_248.substr(_251.index+_251[0].length);
-if(_252.search(/-/)==-1){
-_252=_252+"-";
-}
-var _254=_251[1];
-var frac=(typeof (_251[2])=="string"&&_251[2]!="")?_251[2]:"";
-var _255=(typeof (_251[3])=="string"&&_251[3]!="");
-var tmp=_254.split(/,/);
-var _257;
-if(typeof (_250)=="undefined"){
-_250="default";
-}
-if(tmp.length==1){
-_257=null;
-}else{
-_257=tmp[1].length;
-}
-var _258=_254.length-_254.replace(/0/g,"").length;
-var _259=frac.length-frac.replace(/0/g,"").length;
-var _260=frac.length;
-var rval=MochiKit.Format._numberFormatter(_249,_252,_253,_250,_255,_260,_258,_257,_259);
-var m=MochiKit.Base;
-if(m){
-var fn=arguments.callee;
-var args=m.concat(arguments);
-rval.repr=function(){
-return [self.NAME,"(",map(m.repr,args).join(", "),")"].join("");
-};
-}
-return rval;
-};
-MochiKit.Format.formatLocale=function(_262){
-if(typeof (_262)=="undefined"||_262===null){
-_262="default";
-}
-if(typeof (_262)=="string"){
-var rval=MochiKit.Format.LOCALE[_262];
-if(typeof (rval)=="string"){
-rval=arguments.callee(rval);
-MochiKit.Format.LOCALE[_262]=rval;
-}
-return rval;
-}else{
-return _262;
-}
-};
-MochiKit.Format.twoDigitAverage=function(_263,_264){
-if(_264){
-var res=_263/_264;
-if(!isNaN(res)){
-return MochiKit.Format.twoDigitFloat(_263/_264);
-}
-}
-return "0";
-};
-MochiKit.Format.twoDigitFloat=function(_265){
-var sign=(_265<0?"-":"");
-var s=Math.floor(Math.abs(_265)*100).toString();
-if(s=="0"){
-return s;
-}
-if(s.length<3){
-while(s.charAt(s.length-1)=="0"){
-s=s.substring(0,s.length-1);
-}
-return sign+"0."+s;
-}
-var head=sign+s.substring(0,s.length-2);
-var tail=s.substring(s.length-2,s.length);
-if(tail=="00"){
-return head;
-}else{
-if(tail.charAt(1)=="0"){
-return head+"."+tail.charAt(0);
-}else{
-return head+"."+tail;
-}
-}
-};
-MochiKit.Format.lstrip=function(str,_270){
-str=str+"";
-if(typeof (str)!="string"){
-return null;
-}
-if(!_270){
-return str.replace(/^\s+/,"");
-}else{
-return str.replace(new RegExp("^["+_270+"]+"),"");
-}
-};
-MochiKit.Format.rstrip=function(str,_271){
-str=str+"";
-if(typeof (str)!="string"){
-return null;
-}
-if(!_271){
-return str.replace(/\s+$/,"");
-}else{
-return str.replace(new RegExp("["+_271+"]+$"),"");
-}
-};
-MochiKit.Format.strip=function(str,_272){
-var self=MochiKit.Format;
-return self.rstrip(self.lstrip(str,_272),_272);
-};
-MochiKit.Format.truncToFixed=function(_273,_274){
-_273=Math.floor(_273*Math.pow(10,_274));
-var res=(_273*Math.pow(10,-_274)).toFixed(_274);
-if(res.charAt(0)=="."){
-res="0"+res;
-}
-return res;
-};
-MochiKit.Format.roundToFixed=function(_275,_276){
-return MochiKit.Format.truncToFixed(_275+0.5*Math.pow(10,-_276),_276);
-};
-MochiKit.Format.percentFormat=function(_277){
-return MochiKit.Format.twoDigitFloat(100*_277)+"%";
-};
-MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"];
-MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"};
-MochiKit.Format.EXPORT_OK=[];
-MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT};
-MochiKit.Format.__new__=function(){
-var base=this.NAME+".";
-var k,v,o;
-for(k in this.LOCALE){
-o=this.LOCALE[k];
-if(typeof (o)=="object"){
-o.repr=function(){
-return this.NAME;
-};
-o.NAME=base+"LOCALE."+k;
-}
-}
-for(k in this){
-o=this[k];
-if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
-try{
-o.NAME=base+k;
-}
-catch(e){
-}
-}
-}
-};
-MochiKit.Format.__new__();
-if(typeof (MochiKit.Base)!="undefined"){
-MochiKit.Base._exportSymbols(this,MochiKit.Format);
-}else{
-(function(_278,_279){
-if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
-var all=_279.EXPORT_TAGS[":all"];
-for(var i=0;i<all.length;i++){
-_278[all[i]]=_279[all[i]];
-}
-}
-})(this,MochiKit.Format);
-}
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Async");
-dojo.require("MochiKit.Base");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Base",[]);
-}
-try{
-if(typeof (MochiKit.Base)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.Async depends on MochiKit.Base!";
-}
-if(typeof (MochiKit.Async)=="undefined"){
-MochiKit.Async={};
-}
-MochiKit.Async.NAME="MochiKit.Async";
-MochiKit.Async.VERSION="1.3";
-MochiKit.Async.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.Async.toString=function(){
-return this.__repr__();
-};
-MochiKit.Async.Deferred=function(_280){
-this.chain=[];
-this.id=this._nextId();
-this.fired=-1;
-this.paused=0;
-this.results=[null,null];
-this.canceller=_280;
-this.silentlyCancelled=false;
-this.chained=false;
-};
-MochiKit.Async.Deferred.prototype={repr:function(){
-var _281;
-if(this.fired==-1){
-_281="unfired";
-}else{
-if(this.fired===0){
-_281="success";
-}else{
-_281="error";
-}
-}
-return "Deferred("+this.id+", "+_281+")";
-},toString:MochiKit.Base.forwardCall("repr"),_nextId:MochiKit.Base.counter(),cancel:function(){
-var self=MochiKit.Async;
-if(this.fired==-1){
-if(this.canceller){
-this.canceller(this);
-}else{
-this.silentlyCancelled=true;
-}
-if(this.fired==-1){
-this.errback(new self.CancelledError(this));
-}
-}else{
-if((this.fired===0)&&(this.results[0] instanceof self.Deferred)){
-this.results[0].cancel();
-}
-}
-},_pause:function(){
-this.paused++;
-},_unpause:function(){
-this.paused--;
-if((this.paused===0)&&(this.fired>=0)){
-this._fire();
-}
-},_continue:function(res){
-this._resback(res);
-this._unpause();
-},_resback:function(res){
-this.fired=((res instanceof Error)?1:0);
-this.results[this.fired]=res;
-this._fire();
-},_check:function(){
-if(this.fired!=-1){
-if(!this.silentlyCancelled){
-throw new MochiKit.Async.AlreadyCalledError(this);
-}
-this.silentlyCancelled=false;
-return;
-}
-},callback:function(res){
-this._check();
-if(res instanceof MochiKit.Async.Deferred){
-throw new Error("Deferred instances can only be chained if they are the result of a callback");
-}
-this._resback(res);
-},errback:function(res){
-this._check();
-var self=MochiKit.Async;
-if(res instanceof self.Deferred){
-throw new Error("Deferred instances can only be chained if they are the result of a callback");
-}
-if(!(res instanceof Error)){
-res=new self.GenericError(res);
-}
-this._resback(res);
-},addBoth:function(fn){
-if(arguments.length>1){
-fn=MochiKit.Base.partial.apply(null,arguments);
-}
-return this.addCallbacks(fn,fn);
-},addCallback:function(fn){
-if(arguments.length>1){
-fn=MochiKit.Base.partial.apply(null,arguments);
-}
-return this.addCallbacks(fn,null);
-},addErrback:function(fn){
-if(arguments.length>1){
-fn=MochiKit.Base.partial.apply(null,arguments);
-}
-return this.addCallbacks(null,fn);
-},addCallbacks:function(cb,eb){
-if(this.chained){
-throw new Error("Chained Deferreds can not be re-used");
-}
-this.chain.push([cb,eb]);
-if(this.fired>=0){
-this._fire();
-}
-return this;
-},_fire:function(){
-var _284=this.chain;
-var _285=this.fired;
-var res=this.results[_285];
-var self=this;
-var cb=null;
-while(_284.length>0&&this.paused===0){
-var pair=_284.shift();
-var f=pair[_285];
-if(f===null){
-continue;
-}
-try{
-res=f(res);
-_285=((res instanceof Error)?1:0);
-if(res instanceof MochiKit.Async.Deferred){
-cb=function(res){
-self._continue(res);
-};
-this._pause();
-}
-}
-catch(err){
-_285=1;
-if(!(err instanceof Error)){
-err=new MochiKit.Async.GenericError(err);
-}
-res=err;
-}
-}
-this.fired=_285;
-this.results[_285]=res;
-if(cb&&this.paused){
-res.addBoth(cb);
-res.chained=true;
-}
-}};
-MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(){
-return eval("("+arguments[0].responseText+")");
-},succeed:function(_287){
-var d=new MochiKit.Async.Deferred();
-d.callback.apply(d,arguments);
-return d;
-},fail:function(_288){
-var d=new MochiKit.Async.Deferred();
-d.errback.apply(d,arguments);
-return d;
-},getXMLHttpRequest:function(){
-var self=arguments.callee;
-if(!self.XMLHttpRequest){
-var _289=[function(){
-return new XMLHttpRequest();
-},function(){
-return new ActiveXObject("Msxml2.XMLHTTP");
-},function(){
-return new ActiveXObject("Microsoft.XMLHTTP");
-},function(){
-return new ActiveXObject("Msxml2.XMLHTTP.4.0");
-},function(){
-throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest");
-}];
-for(var i=0;i<_289.length;i++){
-var func=_289[i];
-try{
-self.XMLHttpRequest=func;
-return func();
-}
-catch(e){
-}
-}
-}
-return self.XMLHttpRequest();
-},sendXMLHttpRequest:function(req,_291){
-if(_291===null){
-_291="";
-}
-var _292=function(){
-try{
-req.onreadystatechange=null;
-}
-catch(e){
-try{
-req.onreadystatechange=function(){
-};
-}
-catch(e){
-}
-}
-req.abort();
-};
-var self=MochiKit.Async;
-var d=new self.Deferred(_292);
-var _293=function(){
-if(req.readyState==4){
-try{
-req.onreadystatechange=null;
-}
-catch(e){
-try{
-req.onreadystatechange=function(){
-};
-}
-catch(e){
-}
-}
-var _294=null;
-try{
-_294=req.status;
-if(!_294&&MochiKit.Base.isNotEmpty(req.responseText)){
-_294=304;
-}
-}
-catch(e){
-}
-if(_294==200||_294==304){
-d.callback(req);
-}else{
-var err=new self.XMLHttpRequestError(req,"Request failed");
-if(err.number){
-d.errback(err);
-}else{
-d.errback(err);
-}
-}
-}
-};
-try{
-req.onreadystatechange=_293;
-req.send(_291);
-}
-catch(e){
-try{
-req.onreadystatechange=null;
-}
-catch(ignore){
-}
-d.errback(e);
-}
-return d;
-},doSimpleXMLHttpRequest:function(url){
-var self=MochiKit.Async;
-var req=self.getXMLHttpRequest();
-if(arguments.length>1){
-var m=MochiKit.Base;
-var qs=m.queryString.apply(null,m.extend(null,arguments,1));
-if(qs){
-url+="?"+qs;
-}
-}
-req.open("GET",url,true);
-return self.sendXMLHttpRequest(req);
-},loadJSONDoc:function(url){
-var self=MochiKit.Async;
-var d=self.doSimpleXMLHttpRequest.apply(self,arguments);
-d=d.addCallback(self.evalJSONRequest);
-return d;
-},wait:function(_298,_299){
-var d=new MochiKit.Async.Deferred();
-var m=MochiKit.Base;
-if(typeof (_299)!="undefined"){
-d.addCallback(function(){
-return _299;
-});
-}
-var _300=setTimeout(m.bind("callback",d),Math.floor(_298*1000));
-d.canceller=function(){
-try{
-clearTimeout(_300);
-}
-catch(e){
-}
-};
-return d;
-},callLater:function(_301,func){
-var m=MochiKit.Base;
-var _302=m.partial.apply(m,m.extend(null,arguments,1));
-return MochiKit.Async.wait(_301).addCallback(function(res){
-return _302();
-});
-}});
-MochiKit.Async.DeferredLock=function(){
-this.waiting=[];
-this.locked=false;
-this.id=this._nextId();
-};
-MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){
-d=new MochiKit.Async.Deferred();
-if(this.locked){
-this.waiting.push(d);
-}else{
-this.locked=true;
-d.callback(this);
-}
-return d;
-},release:function(){
-if(!this.locked){
-throw TypeError("Tried to release an unlocked DeferredLock");
-}
-this.locked=false;
-if(this.waiting.length>0){
-this.locked=true;
-this.waiting.shift().callback(this);
-}
-},_nextId:MochiKit.Base.counter(),repr:function(){
-var _303;
-if(this.locked){
-_303="locked, "+this.waiting.length+" waiting";
-}else{
-_303="unlocked";
-}
-return "DeferredLock("+this.id+", "+_303+")";
-},toString:MochiKit.Base.forwardCall("repr")};
-MochiKit.Async.DeferredList=function(list,_305,_306,_307,_308){
-this.list=list;
-this.resultList=new Array(this.list.length);
-this.chain=[];
-this.id=this._nextId();
-this.fired=-1;
-this.paused=0;
-this.results=[null,null];
-this.canceller=_308;
-this.silentlyCancelled=false;
-if(this.list.length===0&&!_305){
-this.callback(this.resultList);
-}
-this.finishedCount=0;
-this.fireOnOneCallback=_305;
-this.fireOnOneErrback=_306;
-this.consumeErrors=_307;
-var _309=0;
-MochiKit.Base.map(MochiKit.Base.bind(function(d){
-d.addCallback(MochiKit.Base.bind(this._cbDeferred,this),_309,true);
-d.addErrback(MochiKit.Base.bind(this._cbDeferred,this),_309,false);
-_309+=1;
-},this),this.list);
-};
-MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,MochiKit.Async.Deferred.prototype);
-MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,{_cbDeferred:function(_310,_311,_312){
-this.resultList[_310]=[_311,_312];
-this.finishedCount+=1;
-if(this.fired!==0){
-if(_311&&this.fireOnOneCallback){
-this.callback([_310,_312]);
-}else{
-if(!_311&&this.fireOnOneErrback){
-this.errback(_312);
-}else{
-if(this.finishedCount==this.list.length){
-this.callback(this.resultList);
-}
-}
-}
-}
-if(!_311&&this.consumeErrors){
-_312=null;
-}
-return _312;
-}});
-MochiKit.Async.gatherResults=function(_313){
-var d=new MochiKit.Async.DeferredList(_313,false,true,false);
-d.addCallback(function(_314){
-var ret=[];
-for(var i=0;i<_314.length;i++){
-ret.push(_314[i][1]);
-}
-return ret;
-});
-return d;
-};
-MochiKit.Async.maybeDeferred=function(func){
-var self=MochiKit.Async;
-var _315;
-try{
-var r=func.apply(null,MochiKit.Base.extend([],arguments,1));
-if(r instanceof self.Deferred){
-_315=r;
-}else{
-if(r instanceof Error){
-_315=self.fail(r);
-}else{
-_315=self.succeed(r);
-}
-}
-}
-catch(e){
-_315=self.fail(e);
-}
-return _315;
-};
-MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred"];
-MochiKit.Async.EXPORT_OK=["evalJSONRequest"];
-MochiKit.Async.__new__=function(){
-var m=MochiKit.Base;
-var ne=m.partial(m._newNamedError,this);
-ne("AlreadyCalledError",function(_318){
-this.deferred=_318;
-});
-ne("CancelledError",function(_319){
-this.deferred=_319;
-});
-ne("BrowserComplianceError",function(msg){
-this.message=msg;
-});
-ne("GenericError",function(msg){
-this.message=msg;
-});
-ne("XMLHttpRequestError",function(req,msg){
-this.req=req;
-this.message=msg;
-try{
-this.number=req.status;
-}
-catch(e){
-}
-});
-this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
-m.nameFunctions(this);
-};
-MochiKit.Async.__new__();
-MochiKit.Base._exportSymbols(this,MochiKit.Async);
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.DOM");
-dojo.require("MochiKit.Iter");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Iter",[]);
-}
-try{
-if(typeof (MochiKit.Iter)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.DOM depends on MochiKit.Iter!";
-}
-if(typeof (MochiKit.DOM)=="undefined"){
-MochiKit.DOM={};
-}
-MochiKit.DOM.NAME="MochiKit.DOM";
-MochiKit.DOM.VERSION="1.3";
-MochiKit.DOM.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.DOM.toString=function(){
-return this.__repr__();
-};
-MochiKit.DOM.EXPORT=["formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","getNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","replaceChildNodes","removeElement","swapDOM","BUTTON","TT","PRE","H1","H2","H3","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","computedStyle","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","setDisplayForElement","hideElement","showElement","scrapeText","elementDimensions","elementPosition","setElementDimensions","setElementPosition","getViewportDimensions","setOpacity"];
-MochiKit.DOM.EXPORT_OK=["domConverters"];
-MochiKit.DOM.Dimensions=function(w,h){
-this.w=w;
-this.h=h;
-};
-MochiKit.DOM.Dimensions.prototype.repr=function(){
-var repr=MochiKit.Base.repr;
-return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}";
-};
-MochiKit.DOM.Coordinates=function(x,y){
-this.x=x;
-this.y=y;
-};
-MochiKit.DOM.Coordinates.prototype.repr=function(){
-var repr=MochiKit.Base.repr;
-return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}";
-};
-MochiKit.DOM.Coordinates.prototype.toString=function(){
-return this.repr();
-};
-MochiKit.Base.update(MochiKit.DOM,{setOpacity:function(elem,o){
-elem=MochiKit.DOM.getElement(elem);
-MochiKit.DOM.updateNodeAttributes(elem,{"style":{"opacity":o,"-moz-opacity":o,"-khtml-opacity":o,"filter":" alpha(opacity="+(o*100)+")"}});
-},getViewportDimensions:function(){
-var d=new MochiKit.DOM.Dimensions();
-var w=MochiKit.DOM._window;
-var b=MochiKit.DOM._document.body;
-if(w.innerWidth){
-d.w=w.innerWidth;
-d.h=w.innerHeight;
-}else{
-if(b.parentElement.clientWidth){
-d.w=b.parentElement.clientWidth;
-d.h=b.parentElement.clientHeight;
-}else{
-if(b&&b.clientWidth){
-d.w=b.clientWidth;
-d.h=b.clientHeight;
-}
-}
-}
-return d;
-},elementDimensions:function(elem){
-var self=MochiKit.DOM;
-if(typeof (elem.w)=="number"||typeof (elem.h)=="number"){
-return new self.Dimensions(elem.w||0,elem.h||0);
-}
-elem=self.getElement(elem);
-if(!elem){
-return undefined;
-}
-if(self.computedStyle(elem,"display")!="none"){
-return new self.Dimensions(elem.offsetWidth||0,elem.offsetHeight||0);
-}
-var s=elem.style;
-var _324=s.visibility;
-var _325=s.position;
-s.visibility="hidden";
-s.position="absolute";
-s.display="";
-var _326=elem.offsetWidth;
-var _327=elem.offsetHeight;
-s.display="none";
-s.position=_325;
-s.visibility=_324;
-return new self.Dimensions(_326,_327);
-},elementPosition:function(elem,_328){
-var self=MochiKit.DOM;
-elem=self.getElement(elem);
-if(!elem){
-return undefined;
-}
-var c=new self.Coordinates(0,0);
-if(elem.x&&elem.y){
-c.x+=elem.x||0;
-c.y+=elem.y||0;
-return c;
-}else{
-if(elem.parentNode===null||self.computedStyle(elem,"display")=="none"){
-return undefined;
-}
-}
-var box=null;
-var _331=null;
-var d=MochiKit.DOM._document;
-var de=d.documentElement;
-var b=d.body;
-if(elem.getBoundingClientRect){
-box=elem.getBoundingClientRect();
-c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft);
-c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop);
-}else{
-if(d.getBoxObjectFor){
-box=d.getBoxObjectFor(elem);
-c.x+=box.x;
-c.y+=box.y;
-}else{
-if(elem.offsetParent){
-c.x+=elem.offsetLeft;
-c.y+=elem.offsetTop;
-_331=elem.offsetParent;
-if(_331!=elem){
-while(_331){
-c.x+=_331.offsetLeft;
-c.y+=_331.offsetTop;
-_331=_331.offsetParent;
-}
-}
-var ua=navigator.userAgent.toLowerCase();
-if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("safari")!=-1&&self.computedStyle(elem,"position")=="absolute")){
-c.x-=b.offsetLeft;
-c.y-=b.offsetTop;
-}
-}
-}
-}
-if(typeof (_328)!="undefined"){
-_328=arguments.callee(_328);
-if(_328){
-c.x-=(_328.x||0);
-c.y-=(_328.y||0);
-}
-}
-if(elem.parentNode){
-_331=elem.parentNode;
-}else{
-_331=null;
-}
-while(_331&&_331.tagName!="BODY"&&_331.tagName!="HTML"){
-c.x-=_331.scrollLeft;
-c.y-=_331.scrollTop;
-if(_331.parentNode){
-_331=_331.parentNode;
-}else{
-_331=null;
-}
-}
-return c;
-},setElementDimensions:function(elem,_334,_335){
-elem=MochiKit.DOM.getElement(elem);
-if(typeof (_335)=="undefined"){
-_335="px";
-}
-MochiKit.DOM.updateNodeAttributes(elem,{"style":{"width":_334.w+_335,"height":_334.h+_335}});
-},setElementPosition:function(elem,_336,_337){
-elem=MochiKit.DOM.getElement(elem);
-if(typeof (_337)=="undefined"){
-_337="px";
-}
-MochiKit.DOM.updateNodeAttributes(elem,{"style":{"left":_336.x+_337,"top":_336.y+_337}});
-},currentWindow:function(){
-return MochiKit.DOM._window;
-},currentDocument:function(){
-return MochiKit.DOM._document;
-},withWindow:function(win,func){
-var self=MochiKit.DOM;
-var _339=self._document;
-var _340=self._win;
-var rval;
-try{
-self._window=win;
-self._document=win.document;
-rval=func();
-}
-catch(e){
-self._window=_340;
-self._document=_339;
-throw e;
-}
-self._window=_340;
-self._document=_339;
-return rval;
-},formContents:function(elem){
-var _341=[];
-var _342=[];
-var m=MochiKit.Base;
-var self=MochiKit.DOM;
-if(typeof (elem)=="undefined"||elem===null){
-elem=self._document;
-}else{
-elem=self.getElement(elem);
-}
-m.nodeWalk(elem,function(elem){
-var name=elem.name;
-if(m.isNotEmpty(name)){
-var _343=elem.nodeName;
-if(_343=="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){
-return null;
-}
-if(_343=="SELECT"){
-if(elem.selectedIndex>=0){
-var opt=elem.options[elem.selectedIndex];
-_341.push(name);
-_342.push((opt.value)?opt.value:opt.text);
-return null;
-}
-_341.push(name);
-_342.push("");
-return null;
-}
-if(_343=="FORM"||_343=="P"||_343=="SPAN"||_343=="DIV"){
-return elem.childNodes;
-}
-_341.push(name);
-_342.push(elem.value||"");
-return null;
-}
-return elem.childNodes;
-});
-return [_341,_342];
-},withDocument:function(doc,func){
-var self=MochiKit.DOM;
-var _346=self._document;
-var rval;
-try{
-self._document=doc;
-rval=func();
-}
-catch(e){
-self._document=_346;
-throw e;
-}
-self._document=_346;
-return rval;
-},registerDOMConverter:function(name,_347,wrap,_348){
-MochiKit.DOM.domConverters.register(name,_347,wrap,_348);
-},coerceToDOM:function(node,ctx){
-var im=MochiKit.Iter;
-var self=MochiKit.DOM;
-var iter=im.iter;
-var _352=im.repeat;
-var imap=im.imap;
-var _354=self.domConverters;
-var _355=self.coerceToDOM;
-var _356=MochiKit.Base.NotFound;
-while(true){
-if(typeof (node)=="undefined"||node===null){
-return null;
-}
-if(typeof (node.nodeType)!="undefined"&&node.nodeType>0){
-return node;
-}
-if(typeof (node)=="number"||typeof (node)=="bool"){
-node=node.toString();
-}
-if(typeof (node)=="string"){
-return self._document.createTextNode(node);
-}
-if(typeof (node.toDOM)=="function"){
-node=node.toDOM(ctx);
-continue;
-}
-if(typeof (node)=="function"){
-node=node(ctx);
-continue;
-}
-var _357=null;
-try{
-_357=iter(node);
-}
-catch(e){
-}
-if(_357){
-return imap(_355,_357,_352(ctx));
-}
-try{
-node=_354.match(node,ctx);
-continue;
-}
-catch(e){
-if(e!=_356){
-throw e;
-}
-}
-return self._document.createTextNode(node.toString());
-}
-return undefined;
-},setNodeAttribute:function(node,attr,_359){
-var o={};
-o[attr]=_359;
-try{
-return MochiKit.DOM.updateNodeAttributes(node,o);
-}
-catch(e){
-}
-return null;
-},getNodeAttribute:function(node,attr){
-var self=MochiKit.DOM;
-var _360=self.attributeArray.renames[attr];
-node=self.getElement(node);
-try{
-if(_360){
-return node[_360];
-}
-return node.getAttribute(attr);
-}
-catch(e){
-}
-return null;
-},updateNodeAttributes:function(node,_361){
-var elem=node;
-var self=MochiKit.DOM;
-if(typeof (node)=="string"){
-elem=self.getElement(node);
-}
-if(_361){
-var _362=MochiKit.Base.updatetree;
-if(self.attributeArray.compliant){
-for(var k in _361){
-var v=_361[k];
-if(typeof (v)=="object"&&typeof (elem[k])=="object"){
-_362(elem[k],v);
-}else{
-if(k.substring(0,2)=="on"){
-if(typeof (v)=="string"){
-v=new Function(v);
-}
-elem[k]=v;
-}else{
-elem.setAttribute(k,v);
-}
-}
-}
-}else{
-var _363=self.attributeArray.renames;
-for(k in _361){
-v=_361[k];
-var _364=_363[k];
-if(k=="style"&&typeof (v)=="string"){
-elem.style.cssText=v;
-}else{
-if(typeof (_364)=="string"){
-elem[_364]=v;
-}else{
-if(typeof (elem[k])=="object"&&typeof (v)=="object"){
-_362(elem[k],v);
-}else{
-if(k.substring(0,2)=="on"){
-if(typeof (v)=="string"){
-v=new Function(v);
-}
-elem[k]=v;
-}else{
-elem.setAttribute(k,v);
-}
-}
-}
-}
-}
-}
-}
-return elem;
-},appendChildNodes:function(node){
-var elem=node;
-var self=MochiKit.DOM;
-if(typeof (node)=="string"){
-elem=self.getElement(node);
-}
-var _365=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
-var _366=MochiKit.Base.concat;
-while(_365.length){
-var n=_365.shift();
-if(typeof (n)=="undefined"||n===null){
-}else{
-if(typeof (n.nodeType)=="number"){
-elem.appendChild(n);
-}else{
-_365=_366(n,_365);
-}
-}
-}
-return elem;
-},replaceChildNodes:function(node){
-var elem=node;
-var self=MochiKit.DOM;
-if(typeof (node)=="string"){
-elem=self.getElement(node);
-arguments[0]=elem;
-}
-var _367;
-while((_367=elem.firstChild)){
-elem.removeChild(_367);
-}
-if(arguments.length<2){
-return elem;
-}else{
-return self.appendChildNodes.apply(this,arguments);
-}
-},createDOM:function(name,_368){
-var elem;
-var self=MochiKit.DOM;
-var m=MochiKit.Base;
-if(typeof (_368)=="string"||typeof (_368)=="number"){
-var args=m.extend([name,null],arguments,1);
-return arguments.callee.apply(this,args);
-}
-if(typeof (name)=="string"){
-if(_368&&"name" in _368&&!self.attributeArray.compliant){
-name=("<"+name+" name=\""+self.escapeHTML(_368.name)+"\">");
-}
-elem=self._document.createElement(name);
-}else{
-elem=name;
-}
-if(_368){
-self.updateNodeAttributes(elem,_368);
-}
-if(arguments.length<=2){
-return elem;
-}else{
-var args=m.extend([elem],arguments,2);
-return self.appendChildNodes.apply(this,args);
-}
-},createDOMFunc:function(){
-var m=MochiKit.Base;
-return m.partial.apply(this,m.extend([MochiKit.DOM.createDOM],arguments));
-},swapDOM:function(dest,src){
-var self=MochiKit.DOM;
-dest=self.getElement(dest);
-var _371=dest.parentNode;
-if(src){
-src=self.getElement(src);
-_371.replaceChild(src,dest);
-}else{
-_371.removeChild(dest);
-}
-return src;
-},getElement:function(id){
-var self=MochiKit.DOM;
-if(arguments.length==1){
-return ((typeof (id)=="string")?self._document.getElementById(id):id);
-}else{
-return MochiKit.Base.map(self.getElement,arguments);
-}
-},computedStyle:function(_373,_374,_375){
-if(arguments.length==2){
-_375=_374;
-}
-var self=MochiKit.DOM;
-var el=self.getElement(_373);
-var _377=self._document;
-if(!el||el==_377){
-return undefined;
-}
-if(el.currentStyle){
-return el.currentStyle[_374];
-}
-if(typeof (_377.defaultView)=="undefined"){
-return undefined;
-}
-if(_377.defaultView===null){
-return undefined;
-}
-var _378=_377.defaultView.getComputedStyle(el,null);
-if(typeof (_378)=="undefined"||_378===null){
-return undefined;
-}
-return _378.getPropertyValue(_375);
-},getElementsByTagAndClassName:function(_379,_380,_381){
-var self=MochiKit.DOM;
-if(typeof (_379)=="undefined"||_379===null){
-_379="*";
-}
-if(typeof (_381)=="undefined"||_381===null){
-_381=self._document;
-}
-_381=self.getElement(_381);
-var _382=(_381.getElementsByTagName(_379)||self._document.all);
-if(typeof (_380)=="undefined"||_380===null){
-return MochiKit.Base.extend(null,_382);
-}
-var _383=[];
-for(var i=0;i<_382.length;i++){
-var _384=_382[i];
-var _385=_384.className.split(" ");
-for(var j=0;j<_385.length;j++){
-if(_385[j]==_380){
-_383.push(_384);
-break;
-}
-}
-}
-return _383;
-},_newCallStack:function(path,once){
-var rval=function(){
-var _388=arguments.callee.callStack;
-for(var i=0;i<_388.length;i++){
-if(_388[i].apply(this,arguments)===false){
-break;
-}
-}
-if(once){
-try{
-this[path]=null;
-}
-catch(e){
-}
-}
-};
-rval.callStack=[];
-return rval;
-},addToCallStack:function(_389,path,func,once){
-var self=MochiKit.DOM;
-var _390=_389[path];
-var _391=_390;
-if(!(typeof (_390)=="function"&&typeof (_390.callStack)=="object"&&_390.callStack!==null)){
-_391=self._newCallStack(path,once);
-if(typeof (_390)=="function"){
-_391.callStack.push(_390);
-}
-_389[path]=_391;
-}
-_391.callStack.push(func);
-},addLoadEvent:function(func){
-var self=MochiKit.DOM;
-self.addToCallStack(self._window,"onload",func,true);
-},focusOnLoad:function(_392){
-var self=MochiKit.DOM;
-self.addLoadEvent(function(){
-_392=self.getElement(_392);
-if(_392){
-_392.focus();
-}
-});
-},setElementClass:function(_393,_394){
-var self=MochiKit.DOM;
-var obj=self.getElement(_393);
-if(self.attributeArray.compliant){
-obj.setAttribute("class",_394);
-}else{
-obj.setAttribute("className",_394);
-}
-},toggleElementClass:function(_395){
-var self=MochiKit.DOM;
-for(var i=1;i<arguments.length;i++){
-var obj=self.getElement(arguments[i]);
-if(!self.addElementClass(obj,_395)){
-self.removeElementClass(obj,_395);
-}
-}
-},addElementClass:function(_396,_397){
-var self=MochiKit.DOM;
-var obj=self.getElement(_396);
-var cls=obj.className;
-if(cls.length===0){
-self.setElementClass(obj,_397);
-return true;
-}
-if(cls==_397){
-return false;
-}
-var _399=obj.className.split(" ");
-for(var i=0;i<_399.length;i++){
-if(_399[i]==_397){
-return false;
-}
-}
-self.setElementClass(obj,cls+" "+_397);
-return true;
-},removeElementClass:function(_400,_401){
-var self=MochiKit.DOM;
-var obj=self.getElement(_400);
-var cls=obj.className;
-if(cls.length===0){
-return false;
-}
-if(cls==_401){
-self.setElementClass(obj,"");
-return true;
-}
-var _402=obj.className.split(" ");
-for(var i=0;i<_402.length;i++){
-if(_402[i]==_401){
-_402.splice(i,1);
-self.setElementClass(obj,_402.join(" "));
-return true;
-}
-}
-return false;
-},swapElementClass:function(_403,_404,_405){
-var obj=MochiKit.DOM.getElement(_403);
-var res=MochiKit.DOM.removeElementClass(obj,_404);
-if(res){
-MochiKit.DOM.addElementClass(obj,_405);
-}
-return res;
-},hasElementClass:function(_406,_407){
-var obj=MochiKit.DOM.getElement(_406);
-var _408=obj.className.split(" ");
-for(var i=1;i<arguments.length;i++){
-var good=false;
-for(var j=0;j<_408.length;j++){
-if(_408[j]==arguments[i]){
-good=true;
-break;
-}
-}
-if(!good){
-return false;
-}
-}
-return true;
-},escapeHTML:function(s){
-return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
-},toHTML:function(dom){
-return MochiKit.DOM.emitHTML(dom).join("");
-},emitHTML:function(dom,lst){
-if(typeof (lst)=="undefined"||lst===null){
-lst=[];
-}
-var _411=[dom];
-var self=MochiKit.DOM;
-var _412=self.escapeHTML;
-var _413=self.attributeArray;
-while(_411.length){
-dom=_411.pop();
-if(typeof (dom)=="string"){
-lst.push(dom);
-}else{
-if(dom.nodeType==1){
-lst.push("<"+dom.nodeName.toLowerCase());
-var _414=[];
-var _415=_413(dom);
-for(var i=0;i<_415.length;i++){
-var a=_415[i];
-_414.push([" ",a.name,"=\"",_412(a.value),"\""]);
-}
-_414.sort();
-for(i=0;i<_414.length;i++){
-var _416=_414[i];
-for(var j=0;j<_416.length;j++){
-lst.push(_416[j]);
-}
-}
-if(dom.hasChildNodes()){
-lst.push(">");
-_411.push("</"+dom.nodeName.toLowerCase()+">");
-var _417=dom.childNodes;
-for(i=_417.length-1;i>=0;i--){
-_411.push(_417[i]);
-}
-}else{
-lst.push("/>");
-}
-}else{
-if(dom.nodeType==3){
-lst.push(_412(dom.nodeValue));
-}
-}
-}
-}
-return lst;
-},setDisplayForElement:function(_418,_419){
-var m=MochiKit.Base;
-var _420=m.extend(null,arguments,1);
-MochiKit.Iter.forEach(m.filter(null,m.map(MochiKit.DOM.getElement,_420)),function(_419){
-_419.style.display=_418;
-});
-},scrapeText:function(node,_421){
-var rval=[];
-(function(node){
-var cn=node.childNodes;
-if(cn){
-for(var i=0;i<cn.length;i++){
-arguments.callee.call(this,cn[i]);
-}
-}
-var _423=node.nodeValue;
-if(typeof (_423)=="string"){
-rval.push(_423);
-}
-})(MochiKit.DOM.getElement(node));
-if(_421){
-return rval;
-}else{
-return rval.join("");
-}
-},__new__:function(win){
-var m=MochiKit.Base;
-this._document=document;
-this._window=win;
-this.domConverters=new m.AdapterRegistry();
-var _424=this._document.createElement("span");
-var _425;
-if(_424&&_424.attributes&&_424.attributes.length>0){
-var _426=m.filter;
-_425=function(node){
-return _426(_425.ignoreAttrFilter,node.attributes);
-};
-_425.ignoreAttr={};
-MochiKit.Iter.forEach(_424.attributes,function(a){
-_425.ignoreAttr[a.name]=a.value;
-});
-_425.ignoreAttrFilter=function(a){
-return (_425.ignoreAttr[a.name]!=a.value);
-};
-_425.compliant=false;
-_425.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor"};
-}else{
-_425=function(node){
-return node.attributes;
-};
-_425.compliant=true;
-_425.renames={};
-}
-this.attributeArray=_425;
-var _427=this.createDOMFunc;
-this.UL=_427("ul");
-this.OL=_427("ol");
-this.LI=_427("li");
-this.TD=_427("td");
-this.TR=_427("tr");
-this.TBODY=_427("tbody");
-this.THEAD=_427("thead");
-this.TFOOT=_427("tfoot");
-this.TABLE=_427("table");
-this.TH=_427("th");
-this.INPUT=_427("input");
-this.SPAN=_427("span");
-this.A=_427("a");
-this.DIV=_427("div");
-this.IMG=_427("img");
-this.BUTTON=_427("button");
-this.TT=_427("tt");
-this.PRE=_427("pre");
-this.H1=_427("h1");
-this.H2=_427("h2");
-this.H3=_427("h3");
-this.BR=_427("br");
-this.HR=_427("hr");
-this.LABEL=_427("label");
-this.TEXTAREA=_427("textarea");
-this.FORM=_427("form");
-this.P=_427("p");
-this.SELECT=_427("select");
-this.OPTION=_427("option");
-this.OPTGROUP=_427("optgroup");
-this.LEGEND=_427("legend");
-this.FIELDSET=_427("fieldset");
-this.STRONG=_427("strong");
-this.CANVAS=_427("canvas");
-this.hideElement=m.partial(this.setDisplayForElement,"none");
-this.showElement=m.partial(this.setDisplayForElement,"block");
-this.removeElement=this.swapDOM;
-this.$=this.getElement;
-this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
-m.nameFunctions(this);
-}});
-MochiKit.DOM.__new__(((typeof (window)=="undefined")?this:window));
-if(!MochiKit.__compat__){
-withWindow=MochiKit.DOM.withWindow;
-withDocument=MochiKit.DOM.withDocument;
-}
-MochiKit.Base._exportSymbols(this,MochiKit.DOM);
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.LoggingPane");
-dojo.require("MochiKit.Logging");
-dojo.require("MochiKit.Base");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Logging",[]);
-JSAN.use("MochiKit.Base",[]);
-}
-try{
-if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.Logging)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.LoggingPane depends on MochiKit.Base and MochiKit.Logging!";
-}
-if(typeof (MochiKit.LoggingPane)=="undefined"){
-MochiKit.LoggingPane={};
-}
-MochiKit.LoggingPane.NAME="MochiKit.LoggingPane";
-MochiKit.LoggingPane.VERSION="1.3";
-MochiKit.LoggingPane.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.LoggingPane.toString=function(){
-return this.__repr__();
-};
-MochiKit.LoggingPane.createLoggingPane=function(_428){
-var m=MochiKit.LoggingPane;
-_428=!(!_428);
-if(m._loggingPane&&m._loggingPane.inline!=_428){
-m._loggingPane.closePane();
-m._loggingPane=null;
-}
-if(!m._loggingPane||m._loggingPane.closed){
-m._loggingPane=new m.LoggingPane(_428,MochiKit.Logging.logger);
-}
-return m._loggingPane;
-};
-MochiKit.LoggingPane.LoggingPane=function(_429,_430){
-if(typeof (_430)=="undefined"||_430===null){
-_430=MochiKit.Logging.logger;
-}
-this.logger=_430;
-var _431=MochiKit.Base.update;
-var _432=MochiKit.Base.updatetree;
-var bind=MochiKit.Base.bind;
-var _433=MochiKit.Base.clone;
-var win=window;
-var uid="_MochiKit_LoggingPane";
-if(typeof (MochiKit.DOM)!="undefined"){
-win=MochiKit.DOM.currentWindow();
-}
-if(!_429){
-var url=win.location.href.split("?")[0].replace(/[:\/.><&]/g,"_");
-var name=uid+"_"+url;
-var nwin=win.open("",name,"dependent,resizable,height=200");
-if(!nwin){
-alert("Not able to open debugging window due to pop-up blocking.");
-return undefined;
-}
-nwin.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" "+"\"http://www.w3.org/TR/html4/loose.dtd\">"+"<html><head><title>[MochiKit.LoggingPane]</title></head>"+"<body></body></html>");
-nwin.document.close();
-nwin.document.title+=" "+win.document.title;
-win=nwin;
-}
-var doc=win.document;
-this.doc=doc;
-var _436=doc.getElementById(uid);
-var _437=!!_436;
-if(_436&&typeof (_436.loggingPane)!="undefined"){
-_436.loggingPane.logger=this.logger;
-_436.loggingPane.buildAndApplyFilter();
-return _436.loggingPane;
-}
-if(_437){
-var _438;
-while((_438=_436.firstChild)){
-_436.removeChild(_438);
-}
-}else{
-_436=doc.createElement("div");
-_436.id=uid;
-}
-_436.loggingPane=this;
-var _439=doc.createElement("input");
-var _440=doc.createElement("input");
-var _441=doc.createElement("button");
-var _442=doc.createElement("button");
-var _443=doc.createElement("button");
-var _444=doc.createElement("button");
-var _445=doc.createElement("div");
-var _446=doc.createElement("div");
-var _447=uid+"_Listener";
-this.colorTable=_433(this.colorTable);
-var _448=[];
-var _449=null;
-var _450=function(msg){
-var _451=msg.level;
-if(typeof (_451)=="number"){
-_451=MochiKit.Logging.LogLevel[_451];
-}
-return _451;
-};
-var _452=function(msg){
-return msg.info.join(" ");
-};
-var _453=bind(function(msg){
-var _454=_450(msg);
-var text=_452(msg);
-var c=this.colorTable[_454];
-var p=doc.createElement("span");
-p.className="MochiKit-LogMessage MochiKit-LogLevel-"+_454;
-p.style.cssText="margin: 0px; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; wrap-option: emergency; color: "+c;
-p.appendChild(doc.createTextNode(_454+": "+text));
-_446.appendChild(p);
-_446.appendChild(doc.createElement("br"));
-if(_445.offsetHeight>_445.scrollHeight){
-_445.scrollTop=0;
-}else{
-_445.scrollTop=_445.scrollHeight;
-}
-},this);
-var _456=function(msg){
-_448[_448.length]=msg;
-_453(msg);
-};
-var _457=function(){
-var _458,infore;
-try{
-_458=new RegExp(_439.value);
-infore=new RegExp(_440.value);
-}
-catch(e){
-logDebug("Error in filter regex: "+e.message);
-return null;
-}
-return function(msg){
-return (_458.test(_450(msg))&&infore.test(_452(msg)));
-};
-};
-var _459=function(){
-while(_446.firstChild){
-_446.removeChild(_446.firstChild);
-}
-};
-var _460=function(){
-_448=[];
-_459();
-};
-var _461=bind(function(){
-if(this.closed){
-return;
-}
-this.closed=true;
-if(MochiKit.LoggingPane._loggingPane==this){
-MochiKit.LoggingPane._loggingPane=null;
-}
-this.logger.removeListener(_447);
-_436.loggingPane=null;
-if(_429){
-_436.parentNode.removeChild(_436);
-}else{
-this.win.close();
-}
-},this);
-var _462=function(){
-_459();
-for(var i=0;i<_448.length;i++){
-var msg=_448[i];
-if(_449===null||_449(msg)){
-_453(msg);
-}
-}
-};
-this.buildAndApplyFilter=function(){
-_449=_457();
-_462();
-this.logger.removeListener(_447);
-this.logger.addListener(_447,_449,_456);
-};
-var _463=bind(function(){
-_448=this.logger.getMessages();
-_462();
-},this);
-var _464=bind(function(_465){
-_465=_465||window.event;
-key=_465.which||_465.keyCode;
-if(key==13){
-this.buildAndApplyFilter();
-}
-},this);
-var _466="display: block; z-index: 1000; left: 0px; bottom: 0px; position: fixed; width: 100%; background-color: white; font: "+this.logFont;
-if(_429){
-_466+="; height: 10em; border-top: 2px solid black";
-}else{
-_466+="; height: 100%;";
-}
-_436.style.cssText=_466;
-if(!_437){
-doc.body.appendChild(_436);
-}
-_466={"cssText":"width: 33%; display: inline; font: "+this.logFont};
-_432(_439,{"value":"FATAL|ERROR|WARNING|INFO|DEBUG","onkeypress":_464,"style":_466});
-_436.appendChild(_439);
-_432(_440,{"value":".*","onkeypress":_464,"style":_466});
-_436.appendChild(_440);
-_466="width: 8%; display:inline; font: "+this.logFont;
-_441.appendChild(doc.createTextNode("Filter"));
-_441.onclick=bind("buildAndApplyFilter",this);
-_441.style.cssText=_466;
-_436.appendChild(_441);
-_442.appendChild(doc.createTextNode("Load"));
-_442.onclick=_463;
-_442.style.cssText=_466;
-_436.appendChild(_442);
-_443.appendChild(doc.createTextNode("Clear"));
-_443.onclick=_460;
-_443.style.cssText=_466;
-_436.appendChild(_443);
-_444.appendChild(doc.createTextNode("Close"));
-_444.onclick=_461;
-_444.style.cssText=_466;
-_436.appendChild(_444);
-_445.style.cssText="overflow: auto; width: 100%";
-_446.style.cssText="width: 100%; height: "+(_429?"8em":"100%");
-_445.appendChild(_446);
-_436.appendChild(_445);
-this.buildAndApplyFilter();
-_463();
-if(_429){
-this.win=undefined;
-}else{
-this.win=win;
-}
-this.inline=_429;
-this.closePane=_461;
-this.closed=false;
-return this;
-};
-MochiKit.LoggingPane.LoggingPane.prototype={"logFont":"8pt Verdana,sans-serif","colorTable":{"ERROR":"red","FATAL":"darkred","WARNING":"blue","INFO":"black","DEBUG":"green"}};
-MochiKit.LoggingPane.EXPORT_OK=["LoggingPane"];
-MochiKit.LoggingPane.EXPORT=["createLoggingPane"];
-MochiKit.LoggingPane.__new__=function(){
-this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
-MochiKit.Base.nameFunctions(this);
-MochiKit.LoggingPane._loggingPane=null;
-};
-MochiKit.LoggingPane.__new__();
-MochiKit.Base._exportSymbols(this,MochiKit.LoggingPane);
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Color");
-dojo.require("MochiKit.Base");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Base",[]);
-}
-try{
-if(typeof (MochiKit.Base)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.Color depends on MochiKit.Base";
-}
-if(typeof (MochiKit.Color)=="undefined"){
-MochiKit.Color={};
-}
-MochiKit.Color.NAME="MochiKit.Color";
-MochiKit.Color.VERSION="1.3";
-MochiKit.Color.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.Color.toString=function(){
-return this.__repr__();
-};
-MochiKit.Color.Color=function(red,_468,blue,_470){
-if(typeof (_470)=="undefined"||_470===null){
-_470=1;
-}
-this.rgb={r:red,g:_468,b:blue,a:_470};
-};
-MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_471){
-var rgb=this.rgb;
-var m=MochiKit.Color;
-return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_471);
-},colorWithHue:function(hue){
-var hsl=this.asHSL();
-hsl.h=hue;
-var m=MochiKit.Color;
-return m.Color.fromHSL(hsl);
-},colorWithSaturation:function(_475){
-var hsl=this.asHSL();
-hsl.s=_475;
-var m=MochiKit.Color;
-return m.Color.fromHSL(hsl);
-},colorWithLightness:function(_476){
-var hsl=this.asHSL();
-hsl.l=_476;
-var m=MochiKit.Color;
-return m.Color.fromHSL(hsl);
-},darkerColorWithLevel:function(_477){
-var hsl=this.asHSL();
-hsl.l=Math.max(hsl.l-_477,0);
-var m=MochiKit.Color;
-return m.Color.fromHSL(hsl);
-},lighterColorWithLevel:function(_478){
-var hsl=this.asHSL();
-hsl.l=Math.min(hsl.l+_478,1);
-var m=MochiKit.Color;
-return m.Color.fromHSL(hsl);
-},blendedColor:function(_479,_480){
-if(typeof (_480)=="undefined"||_480===null){
-_480=0.5;
-}
-var sf=1-_480;
-var s=this.rgb;
-var d=_479.rgb;
-var df=_480;
-return MochiKit.Color.Color.fromRGB((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df));
-},compareRGB:function(_483){
-var a=this.asRGB();
-var b=_483.asRGB();
-return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]);
-},isLight:function(){
-return this.asHSL().b>0.5;
-},isDark:function(){
-return (!this.isLight());
-},toHSLString:function(){
-var c=this.asHSL();
-var ccc=MochiKit.Color.clampColorComponent;
-var rval=this._hslString;
-if(!rval){
-var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4)+"%");
-var a=c.a;
-if(a>=1){
-a=1;
-rval="hsl("+mid+")";
-}else{
-if(a<=0){
-a=0;
-}
-rval="hsla("+mid+","+a+")";
-}
-this._hslString=rval;
-}
-return rval;
-},toRGBString:function(){
-var c=this.rgb;
-var ccc=MochiKit.Color.clampColorComponent;
-var rval=this._rgbString;
-if(!rval){
-var mid=(ccc(c.r,255).toFixed(0)+","+ccc(c.g,255).toFixed(0)+","+ccc(c.b,255).toFixed(0));
-if(c.a!=1){
-rval="rgba("+mid+","+c.a+")";
-}else{
-rval="rgb("+mid+")";
-}
-this._rgbString=rval;
-}
-return rval;
-},asRGB:function(){
-return MochiKit.Base.clone(this.rgb);
-},toHexString:function(){
-var m=MochiKit.Color;
-var c=this.rgb;
-var ccc=MochiKit.Color.clampColorComponent;
-var rval=this._hexString;
-if(!rval){
-rval=("#"+m.toColorPart(ccc(c.r,255))+m.toColorPart(ccc(c.g,255))+m.toColorPart(ccc(c.b,255)));
-this._hexString=rval;
-}
-return rval;
-},asHSV:function(){
-var hsv=this.hsv;
-var c=this.rgb;
-if(typeof (hsv)=="undefined"||hsv===null){
-hsv=MochiKit.Color.rgbToHSV(this.rgb);
-this.hsv=hsv;
-}
-return MochiKit.Base.clone(hsv);
-},asHSL:function(){
-var hsl=this.hsl;
-var c=this.rgb;
-if(typeof (hsl)=="undefined"||hsl===null){
-hsl=MochiKit.Color.rgbToHSL(this.rgb);
-this.hsl=hsl;
-}
-return MochiKit.Base.clone(hsl);
-},toString:function(){
-return this.toRGBString();
-},repr:function(){
-var c=this.rgb;
-var col=[c.r,c.g,c.b,c.a];
-return this.__class__.NAME+"("+col.join(", ")+")";
-}};
-MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_488,blue,_489){
-var _490=MochiKit.Color.Color;
-if(arguments.length==1){
-var rgb=red;
-red=rgb.r;
-_488=rgb.g;
-blue=rgb.b;
-if(typeof (rgb.a)=="undefined"){
-_489=undefined;
-}else{
-_489=rgb.a;
-}
-}
-return new _490(red,_488,blue,_489);
-},fromHSL:function(hue,_491,_492,_493){
-var m=MochiKit.Color;
-return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));
-},fromHSV:function(hue,_494,_495,_496){
-var m=MochiKit.Color;
-return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));
-},fromName:function(name){
-var _497=MochiKit.Color.Color;
-if(name.charAt(0)=="\""){
-name=name.substr(1,name.length-2);
-}
-var _498=_497._namedColors[name.toLowerCase()];
-if(typeof (_498)=="string"){
-return _497.fromHexString(_498);
-}else{
-if(name=="transparent"){
-return _497.transparentColor();
-}
-}
-return null;
-},fromString:function(_499){
-var self=MochiKit.Color.Color;
-var _500=_499.substr(0,3);
-if(_500=="rgb"){
-return self.fromRGBString(_499);
-}else{
-if(_500=="hsl"){
-return self.fromHSLString(_499);
-}else{
-if(_499.charAt(0)=="#"){
-return self.fromHexString(_499);
-}
-}
-}
-return self.fromName(_499);
-},fromHexString:function(_501){
-if(_501.charAt(0)=="#"){
-_501=_501.substring(1);
-}
-var _502=[];
-var i,hex;
-if(_501.length==3){
-for(i=0;i<3;i++){
-hex=_501.substr(i,1);
-_502.push(parseInt(hex+hex,16)/255);
-}
-}else{
-for(i=0;i<6;i+=2){
-hex=_501.substr(i,2);
-_502.push(parseInt(hex,16)/255);
-}
-}
-var _503=MochiKit.Color.Color;
-return _503.fromRGB.apply(_503,_502);
-},_fromColorString:function(pre,_505,_506,_507){
-if(_507.indexOf(pre)===0){
-_507=_507.substring(_507.indexOf("(",3)+1,_507.length-1);
-}
-var _508=_507.split(/\s*,\s*/);
-var _509=[];
-for(var i=0;i<_508.length;i++){
-var c=_508[i];
-var val;
-var _510=c.substring(c.length-3);
-if(c.charAt(c.length-1)=="%"){
-val=0.01*parseFloat(c.substring(0,c.length-1));
-}else{
-if(_510=="deg"){
-val=parseFloat(c)/360;
-}else{
-if(_510=="rad"){
-val=parseFloat(c)/(Math.PI*2);
-}else{
-val=_506[i]*parseFloat(c);
-}
-}
-}
-_509.push(val);
-}
-return this[_505].apply(this,_509);
-},fromComputedStyle:function(elem,_511,_512){
-var d=MochiKit.DOM;
-var cls=MochiKit.Color.Color;
-for(elem=d.getElement(elem);elem;elem=elem.parentNode){
-var _513=d.computedStyle.apply(d,arguments);
-if(!_513){
-continue;
-}
-var _514=cls.fromString(_513);
-if(!_514){
-break;
-}
-if(_514.asRGB().a>0){
-return _514;
-}
-}
-return null;
-},fromBackground:function(elem){
-var cls=MochiKit.Color.Color;
-return cls.fromComputedStyle(elem,"backgroundColor","background-color")||cls.whiteColor();
-},fromText:function(elem){
-var cls=MochiKit.Color.Color;
-return cls.fromComputedStyle(elem,"color","color")||cls.blackColor();
-},namedColors:function(){
-return MochiKit.Base.clone(MochiKit.Color.Color._namedColors);
-}});
-MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_515){
-v*=_515;
-if(v<0){
-return 0;
-}else{
-if(v>_515){
-return _515;
-}else{
-return v;
-}
-}
-},_hslValue:function(n1,n2,hue){
-if(hue>6){
-hue-=6;
-}else{
-if(hue<0){
-hue+=6;
-}
-}
-var val;
-if(hue<1){
-val=n1+(n2-n1)*hue;
-}else{
-if(hue<3){
-val=n2;
-}else{
-if(hue<4){
-val=n1+(n2-n1)*(4-hue);
-}else{
-val=n1;
-}
-}
-}
-return val;
-},hsvToRGB:function(hue,_518,_519,_520){
-if(arguments.length==1){
-var hsv=hue;
-hue=hsv.h;
-_518=hsv.s;
-_519=hsv.v;
-_520=hsv.a;
-}
-var red;
-var _521;
-var blue;
-if(_518===0){
-red=0;
-_521=0;
-blue=0;
-}else{
-var i=Math.floor(hue*6);
-var f=(hue*6)-i;
-var p=_519*(1-_518);
-var q=_519*(1-(_518*f));
-var t=_519*(1-(_518*(1-f)));
-switch(i){
-case 1:
-red=q;
-_521=_519;
-blue=p;
-break;
-case 2:
-red=p;
-_521=_519;
-blue=t;
-break;
-case 3:
-red=p;
-_521=q;
-blue=_519;
-break;
-case 4:
-red=t;
-_521=p;
-blue=_519;
-break;
-case 5:
-red=_519;
-_521=p;
-blue=q;
-break;
-case 6:
-case 0:
-red=_519;
-_521=t;
-blue=p;
-break;
-}
-}
-return {r:red,g:_521,b:blue,a:_520};
-},hslToRGB:function(hue,_523,_524,_525){
-if(arguments.length==1){
-var hsl=hue;
-hue=hsl.h;
-_523=hsl.s;
-_524=hsl.l;
-_525=hsl.a;
-}
-var red;
-var _526;
-var blue;
-if(_523===0){
-red=_524;
-_526=_524;
-blue=_524;
-}else{
-var m2;
-if(_524<=0.5){
-m2=_524*(1+_523);
-}else{
-m2=_524+_523-(_524*_523);
-}
-var m1=(2*_524)-m2;
-var f=MochiKit.Color._hslValue;
-var h6=hue*6;
-red=f(m1,m2,h6+2);
-_526=f(m1,m2,h6);
-blue=f(m1,m2,h6-2);
-}
-return {r:red,g:_526,b:blue,a:_525};
-},rgbToHSV:function(red,_530,blue,_531){
-if(arguments.length==1){
-var rgb=red;
-red=rgb.r;
-_530=rgb.g;
-blue=rgb.b;
-_531=rgb.a;
-}
-var max=Math.max(Math.max(red,_530),blue);
-var min=Math.min(Math.min(red,_530),blue);
-var hue;
-var _534;
-var _535=max;
-if(min==max){
-hue=0;
-_534=0;
-}else{
-var _536=(max-min);
-_534=_536/max;
-if(red==max){
-hue=(_530-blue)/_536;
-}else{
-if(_530==max){
-hue=2+((blue-red)/_536);
-}else{
-hue=4+((red-_530)/_536);
-}
-}
-hue/=6;
-if(hue<0){
-hue+=1;
-}
-if(hue>1){
-hue-=1;
-}
-}
-return {h:hue,s:_534,v:_535,a:_531};
-},rgbToHSL:function(red,_537,blue,_538){
-if(arguments.length==1){
-var rgb=red;
-red=rgb.r;
-_537=rgb.g;
-blue=rgb.b;
-_538=rgb.a;
-}
-var max=Math.max(red,Math.max(_537,blue));
-var min=Math.min(red,Math.min(_537,blue));
-var hue;
-var _539;
-var _540=(max+min)/2;
-var _541=max-min;
-if(_541===0){
-hue=0;
-_539=0;
-}else{
-if(_540<=0.5){
-_539=_541/(max+min);
-}else{
-_539=_541/(2-max-min);
-}
-if(red==max){
-hue=(_537-blue)/_541;
-}else{
-if(_537==max){
-hue=2+((blue-red)/_541);
-}else{
-hue=4+((red-_537)/_541);
-}
-}
-hue/=6;
-if(hue<0){
-hue+=1;
-}
-if(hue>1){
-hue-=1;
-}
-}
-return {h:hue,s:_539,l:_540,a:_538};
-},toColorPart:function(num){
-num=Math.round(num);
-var _542=num.toString(16);
-if(num<16){
-return "0"+_542;
-}
-return _542;
-},__new__:function(){
-var m=MochiKit.Base;
-this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]);
-this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]);
-var _543=1/3;
-var _544={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_543,_543,_543],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_543,2*_543,2*_543],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]};
-var _545=function(name,r,g,b,a){
-var rval=this.fromRGB(r,g,b,a);
-this[name]=function(){
-return rval;
-};
-return rval;
-};
-for(var k in _544){
-var name=k+"Color";
-var _547=m.concat([_545,this.Color,name],_544[k]);
-this.Color[name]=m.bind.apply(null,_547);
-}
-var _548=function(){
-for(var i=0;i<arguments.length;i++){
-if(!(arguments[i] instanceof Color)){
-return false;
-}
-}
-return true;
-};
-var _549=function(a,b){
-return a.compareRGB(b);
-};
-m.nameFunctions(this);
-m.registerComparator(this.Color.NAME,_548,_549);
-this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
-}});
-MochiKit.Color.EXPORT=["Color"];
-MochiKit.Color.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"];
-MochiKit.Color.__new__();
-MochiKit.Base._exportSymbols(this,MochiKit.Color);
-MochiKit.Color.Color._namedColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Signal");
-dojo.require("MochiKit.Base");
-dojo.require("MochiKit.DOM");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Base",[]);
-JSAN.use("MochiKit.DOM",[]);
-}
-try{
-if(typeof (MochiKit.Base)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.Signal depends on MochiKit.Base!";
-}
-try{
-if(typeof (MochiKit.DOM)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.Signal depends on MochiKit.DOM!";
-}
-if(typeof (MochiKit.Signal)=="undefined"){
-MochiKit.Signal={};
-}
-MochiKit.Signal.NAME="MochiKit.Signal";
-MochiKit.Signal.VERSION="1.3";
-MochiKit.Signal._observers=[];
-MochiKit.Signal.Event=function(src,e){
-this._event=e||window.event;
-this._src=src;
-};
-MochiKit.Base.update(MochiKit.Signal.Event.prototype,{__repr__:function(){
-var repr=MochiKit.Base.repr;
-var str="{event(): "+repr(this.event())+", src(): "+repr(this.src())+", type(): "+repr(this.type())+", target(): "+repr(this.target())+", modifier(): "+"{alt: "+repr(this.modifier().alt)+", ctrl: "+repr(this.modifier().ctrl)+", meta: "+repr(this.modifier().meta)+", shift: "+repr(this.modifier().shift)+", any: "+repr(this.modifier().any)+"}";
-if(this.type()&&this.type().indexOf("key")===0){
-str+=", key(): {code: "+repr(this.key().code)+", string: "+repr(this.key().string)+"}";
-}
-if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){
-str+=", mouse(): {page: "+repr(this.mouse().page)+", client: "+repr(this.mouse().client);
-if(this.type()!="mousemove"){
-str+=", button: {left: "+repr(this.mouse().button.left)+", middle: "+repr(this.mouse().button.middle)+", right: "+repr(this.mouse().button.right)+"}}";
-}else{
-str+="}";
-}
-}
-if(this.type()=="mouseover"||this.type()=="mouseout"){
-str+=", relatedTarget(): "+repr(this.relatedTarget());
-}
-str+="}";
-return str;
-},toString:function(){
-return this.__repr__();
-},src:function(){
-return this._src;
-},event:function(){
-return this._event;
-},type:function(){
-return this._event.type||undefined;
-},target:function(){
-return this._event.target||this._event.srcElement;
-},relatedTarget:function(){
-if(this.type()=="mouseover"){
-return (this._event.relatedTarget||this._event.fromElement);
-}else{
-if(this.type()=="mouseout"){
-return (this._event.relatedTarget||this._event.toElement);
-}
-}
-return undefined;
-},modifier:function(){
-var m={};
-m.alt=this._event.altKey;
-m.ctrl=this._event.ctrlKey;
-m.meta=this._event.metaKey||false;
-m.shift=this._event.shiftKey;
-m.any=m.alt||m.ctrl||m.shift||m.meta;
-return m;
-},key:function(){
-var k={};
-if(this.type()&&this.type().indexOf("key")===0){
-if(this.type()=="keydown"||this.type()=="keyup"){
-k.code=this._event.keyCode;
-k.string=(MochiKit.Signal._specialKeys[k.code]||"KEY_UNKNOWN");
-return k;
-}else{
-if(this.type()=="keypress"){
-k.code=0;
-k.string="";
-if(typeof (this._event.charCode)!="undefined"&&this._event.charCode!==0&&!MochiKit.Signal._specialMacKeys[this._event.charCode]){
-k.code=this._event.charCode;
-k.string=String.fromCharCode(k.code);
-}else{
-if(this._event.keyCode&&typeof (this._event.charCode)=="undefined"){
-k.code=this._event.keyCode;
-k.string=String.fromCharCode(k.code);
-}
-}
-return k;
-}
-}
-}
-return undefined;
-},mouse:function(){
-var m={};
-var e=this._event;
-if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){
-m.client=new MochiKit.DOM.Coordinates(0,0);
-if(e.clientX||e.clientY){
-m.client.x=(!e.clientX||e.clientX<0)?0:e.clientX;
-m.client.y=(!e.clientY||e.clientY<0)?0:e.clientY;
-}
-m.page=new MochiKit.DOM.Coordinates(0,0);
-if(e.pageX||e.pageY){
-m.page.x=(!e.pageX||e.pageX<0)?0:e.pageX;
-m.page.y=(!e.pageY||e.pageY<0)?0:e.pageY;
-}else{
-var de=MochiKit.DOM._document.documentElement;
-var b=MochiKit.DOM._document.body;
-m.page.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft);
-m.page.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop);
-}
-if(this.type()!="mousemove"){
-m.button={};
-m.button.left=false;
-m.button.right=false;
-m.button.middle=false;
-if(e.which){
-m.button.left=(e.which==1);
-m.button.middle=(e.which==2);
-m.button.right=(e.which==3);
-}else{
-m.button.left=!!(e.button&1);
-m.button.right=!!(e.button&2);
-m.button.middle=!!(e.button&4);
-}
-}
-return m;
-}
-return undefined;
-},stop:function(){
-this.stopPropagation();
-this.preventDefault();
-},stopPropagation:function(){
-if(this._event.stopPropagation){
-this._event.stopPropagation();
-}else{
-this._event.cancelBubble=true;
-}
-},preventDefault:function(){
-if(this._event.preventDefault){
-this._event.preventDefault();
-}else{
-this._event.returnValue=false;
-}
-}});
-MochiKit.Signal._specialMacKeys={3:"KEY_ENTER",63289:"KEY_NUM_PAD_CLEAR",63276:"KEY_PAGE_UP",63277:"KEY_PAGE_DOWN",63275:"KEY_END",63273:"KEY_HOME",63234:"KEY_ARROW_LEFT",63232:"KEY_ARROW_UP",63235:"KEY_ARROW_RIGHT",63233:"KEY_ARROW_DOWN",63302:"KEY_INSERT",63272:"KEY_DELETE"};
-for(i=63236;i<=63242;i++){
-MochiKit.Signal._specialMacKeys[i]="KEY_F"+(i-63236+1);
-}
-MochiKit.Signal._specialKeys={8:"KEY_BACKSPACE",9:"KEY_TAB",12:"KEY_NUM_PAD_CLEAR",13:"KEY_ENTER",16:"KEY_SHIFT",17:"KEY_CTRL",18:"KEY_ALT",19:"KEY_PAUSE",20:"KEY_CAPS_LOCK",27:"KEY_ESCAPE",32:"KEY_SPACEBAR",33:"KEY_PAGE_UP",34:"KEY_PAGE_DOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_ARROW_LEFT",38:"KEY_ARROW_UP",39:"KEY_ARROW_RIGHT",40:"KEY_ARROW_DOWN",44:"KEY_PRINT_SCREEN",45:"KEY_INSERT",46:"KEY_DELETE",59:"KEY_SEMICOLON",91:"KEY_WINDOWS_LEFT",92:"KEY_WINDOWS_RIGHT",93:"KEY_SELECT",106:"KEY_NUM_PAD_ASTERISK",107:"KEY_NUM_PAD_PLUS_SIGN",109:"KEY_NUM_PAD_HYPHEN-MINUS",110:"KEY_NUM_PAD_FULL_STOP",111:"KEY_NUM_PAD_SOLIDUS",144:"KEY_NUM_LOCK",145:"KEY_SCROLL_LOCK",186:"KEY_SEMICOLON",187:"KEY_EQUALS_SIGN",188:"KEY_COMMA",189:"KEY_HYPHEN-MINUS",190:"KEY_FULL_STOP",191:"KEY_SOLIDUS",192:"KEY_GRAVE_ACCENT",219:"KEY_LEFT_SQUARE_BRACKET",220:"KEY_REVERSE_SOLIDUS",221:"KEY_RIGHT_SQUARE_BRACKET",222:"KEY_APOSTROPHE"};
-for(var i=48;i<=57;i++){
-MochiKit.Signal._specialKeys[i]="KEY_"+(i-48);
-}
-for(i=65;i<=90;i++){
-MochiKit.Signal._specialKeys[i]="KEY_"+String.fromCharCode(i);
-}
-for(i=96;i<=105;i++){
-MochiKit.Signal._specialKeys[i]="KEY_NUM_PAD_"+(i-96);
-}
-for(i=112;i<=123;i++){
-MochiKit.Signal._specialKeys[i]="KEY_F"+(i-112+1);
-}
-MochiKit.Base.update(MochiKit.Signal,{__repr__:function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-},toString:function(){
-return this.__repr__();
-},_unloadCache:function(){
-var self=MochiKit.Signal;
-var _550=self._observers;
-for(var i=0;i<_550.length;i++){
-self._disconnect(_550[i]);
-}
-delete self._observers;
-try{
-window.onload=undefined;
-}
-catch(e){
-}
-try{
-window.onunload=undefined;
-}
-catch(e){
-}
-},_listener:function(src,func,obj,_551){
-var E=MochiKit.Signal.Event;
-if(!_551){
-return MochiKit.Base.bind(func,obj);
-}
-obj=obj||src;
-if(typeof (func)=="string"){
-return function(_553){
-obj[func].apply(obj,[new E(src,_553)]);
-};
-}else{
-return function(_554){
-func.apply(obj,[new E(src,_554)]);
-};
-}
-},connect:function(src,sig,_556,_557){
-src=MochiKit.DOM.getElement(src);
-var self=MochiKit.Signal;
-if(typeof (sig)!="string"){
-throw new Error("'sig' must be a string");
-}
-var obj=null;
-var func=null;
-if(typeof (_557)!="undefined"){
-obj=_556;
-func=_557;
-if(typeof (_557)=="string"){
-if(typeof (_556[_557])!="function"){
-throw new Error("'funcOrStr' must be a function on 'objOrFunc'");
-}
-}else{
-if(typeof (_557)!="function"){
-throw new Error("'funcOrStr' must be a function or string");
-}
-}
-}else{
-if(typeof (_556)!="function"){
-throw new Error("'objOrFunc' must be a function if 'funcOrStr' is not given");
-}else{
-func=_556;
-}
-}
-if(typeof (obj)=="undefined"||obj===null){
-obj=src;
-}
-var _558=!!(src.addEventListener||src.attachEvent);
-var _559=self._listener(src,func,obj,_558);
-if(src.addEventListener){
-src.addEventListener(sig.substr(2),_559,false);
-}else{
-if(src.attachEvent){
-src.attachEvent(sig,_559);
-}
-}
-var _560=[src,sig,_559,_558,_556,_557];
-self._observers.push(_560);
-return _560;
-},_disconnect:function(_561){
-if(!_561[3]){
-return;
-}
-var src=_561[0];
-var sig=_561[1];
-var _562=_561[2];
-if(src.removeEventListener){
-src.removeEventListener(sig.substr(2),_562,false);
-}else{
-if(src.detachEvent){
-src.detachEvent(sig,_562);
-}else{
-throw new Error("'src' must be a DOM element");
-}
-}
-},disconnect:function(_563){
-var self=MochiKit.Signal;
-var _564=self._observers;
-var m=MochiKit.Base;
-if(arguments.length>1){
-var src=MochiKit.DOM.getElement(arguments[0]);
-var sig=arguments[1];
-var obj=arguments[2];
-var func=arguments[3];
-for(var i=_564.length-1;i>=0;i--){
-var o=_564[i];
-if(o[0]===src&&o[1]===sig&&o[4]===obj&&o[5]===func){
-self._disconnect(o);
-_564.splice(i,1);
-return true;
-}
-}
-}else{
-var idx=m.findIdentical(_564,_563);
-if(idx>=0){
-self._disconnect(_563);
-_564.splice(idx,1);
-return true;
-}
-}
-return false;
-},disconnectAll:function(src,sig){
-src=MochiKit.DOM.getElement(src);
-var m=MochiKit.Base;
-var _565=m.flattenArguments(m.extend(null,arguments,1));
-var self=MochiKit.Signal;
-var _566=self._disconnect;
-var _567=self._observers;
-if(_565.length===0){
-for(var i=_567.length-1;i>=0;i--){
-var _568=_567[i];
-if(_568[0]===src){
-_566(_568);
-_567.splice(i,1);
-}
-}
-}else{
-var sigs={};
-for(var i=0;i<_565.length;i++){
-sigs[_565[i]]=true;
-}
-for(var i=_567.length-1;i>=0;i--){
-var _568=_567[i];
-if(_568[0]===src&&_568[1] in sigs){
-_566(_568);
-_567.splice(i,1);
-}
-}
-}
-},signal:function(src,sig){
-var _570=MochiKit.Signal._observers;
-src=MochiKit.DOM.getElement(src);
-var args=MochiKit.Base.extend(null,arguments,2);
-var _571=[];
-for(var i=0;i<_570.length;i++){
-var _572=_570[i];
-if(_572[0]===src&&_572[1]===sig){
-try{
-_572[2].apply(src,args);
-}
-catch(e){
-_571.push(e);
-}
-}
-}
-if(_571.length==1){
-throw _571[0];
-}else{
-if(_571.length>1){
-var e=new Error("Multiple errors thrown in handling 'sig', see errors property");
-e.errors=_571;
-throw e;
-}
-}
-}});
-MochiKit.Signal.EXPORT_OK=[];
-MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll"];
-MochiKit.Signal.__new__=function(win){
-var m=MochiKit.Base;
-this._document=document;
-this._window=win;
-try{
-this.connect(window,"onunload",this._unloadCache);
-}
-catch(e){
-}
-this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
-m.nameFunctions(this);
-};
-MochiKit.Signal.__new__(this);
-if(!MochiKit.__compat__){
-connect=MochiKit.Signal.connect;
-disconnect=MochiKit.Signal.disconnect;
-disconnectAll=MochiKit.Signal.disconnectAll;
-signal=MochiKit.Signal.signal;
-}
-MochiKit.Base._exportSymbols(this,MochiKit.Signal);
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.Visual");
-dojo.require("MochiKit.Base");
-dojo.require("MochiKit.DOM");
-dojo.require("MochiKit.Color");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Base",[]);
-JSAN.use("MochiKit.DOM",[]);
-JSAN.use("MochiKit.Color",[]);
-}
-try{
-if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"){
-throw "";
-}
-}
-catch(e){
-throw "MochiKit.Visual depends on MochiKit.Base, MochiKit.DOM and MochiKit.Color!";
-}
-if(typeof (MochiKit.Visual)=="undefined"){
-MochiKit.Visual={};
-}
-MochiKit.Visual.NAME="MochiKit.Visual";
-MochiKit.Visual.VERSION="1.3";
-MochiKit.Visual.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.Visual.toString=function(){
-return this.__repr__();
-};
-MochiKit.Visual._RoundCorners=function(e,_573){
-e=MochiKit.DOM.getElement(e);
-this._setOptions(_573);
-if(this.options.__unstable__wrapElement){
-e=this._doWrap(e);
-}
-var _574=this.options.color;
-var C=MochiKit.Color.Color;
-if(this.options.color=="fromElement"){
-_574=C.fromBackground(e);
-}else{
-if(!(_574 instanceof C)){
-_574=C.fromString(_574);
-}
-}
-this.isTransparent=(_574.asRGB().a<=0);
-var _576=this.options.bgColor;
-if(this.options.bgColor=="fromParent"){
-_576=C.fromBackground(e.offsetParent);
-}else{
-if(!(_576 instanceof C)){
-_576=C.fromString(_576);
-}
-}
-this._roundCornersImpl(e,_574,_576);
-};
-MochiKit.Visual._RoundCorners.prototype={_doWrap:function(e){
-var _577=e.parentNode;
-var doc=MochiKit.DOM.currentDocument();
-if(typeof (doc.defaultView)=="undefined"||doc.defaultView===null){
-return e;
-}
-var _578=doc.defaultView.getComputedStyle(e,null);
-if(typeof (_578)=="undefined"||_578===null){
-return e;
-}
-var _579=MochiKit.DOM.DIV({"style":{display:"block",marginTop:_578.getPropertyValue("padding-top"),marginRight:_578.getPropertyValue("padding-right"),marginBottom:_578.getPropertyValue("padding-bottom"),marginLeft:_578.getPropertyValue("padding-left"),padding:"0px"}});
-_579.innerHTML=e.innerHTML;
-e.innerHTML="";
-e.appendChild(_579);
-return e;
-},_roundCornersImpl:function(e,_580,_581){
-if(this.options.border){
-this._renderBorder(e,_581);
-}
-if(this._isTopRounded()){
-this._roundTopCorners(e,_580,_581);
-}
-if(this._isBottomRounded()){
-this._roundBottomCorners(e,_580,_581);
-}
-},_renderBorder:function(el,_582){
-var _583="1px solid "+this._borderColor(_582);
-var _584="border-left: "+_583;
-var _585="border-right: "+_583;
-var _586="style='"+_584+";"+_585+"'";
-el.innerHTML="<div "+_586+">"+el.innerHTML+"</div>";
-},_roundTopCorners:function(el,_587,_588){
-var _589=this._createCorner(_588);
-for(var i=0;i<this.options.numSlices;i++){
-_589.appendChild(this._createCornerSlice(_587,_588,i,"top"));
-}
-el.style.paddingTop=0;
-el.insertBefore(_589,el.firstChild);
-},_roundBottomCorners:function(el,_590,_591){
-var _592=this._createCorner(_591);
-for(var i=(this.options.numSlices-1);i>=0;i--){
-_592.appendChild(this._createCornerSlice(_590,_591,i,"bottom"));
-}
-el.style.paddingBottom=0;
-el.appendChild(_592);
-},_createCorner:function(_593){
-var dom=MochiKit.DOM;
-return dom.DIV({style:{backgroundColor:_593.toString()}});
-},_createCornerSlice:function(_594,_595,n,_596){
-var _597=MochiKit.DOM.SPAN();
-var _598=_597.style;
-_598.backgroundColor=_594.toString();
-_598.display="block";
-_598.height="1px";
-_598.overflow="hidden";
-_598.fontSize="1px";
-var _599=this._borderColor(_594,_595);
-if(this.options.border&&n===0){
-_598.borderTopStyle="solid";
-_598.borderTopWidth="1px";
-_598.borderLeftWidth="0px";
-_598.borderRightWidth="0px";
-_598.borderBottomWidth="0px";
-_598.height="0px";
-_598.borderColor=_599.toString();
-}else{
-if(_599){
-_598.borderColor=_599.toString();
-_598.borderStyle="solid";
-_598.borderWidth="0px 1px";
-}
-}
-if(!this.options.compact&&(n==(this.options.numSlices-1))){
-_598.height="2px";
-}
-this._setMargin(_597,n,_596);
-this._setBorder(_597,n,_596);
-return _597;
-},_setOptions:function(_600){
-this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false};
-MochiKit.Base.update(this.options,_600);
-this.options.numSlices=(this.options.compact?2:4);
-},_whichSideTop:function(){
-var _601=this.options.corners;
-if(this._hasString(_601,"all","top")){
-return "";
-}
-var _602=(_601.indexOf("tl")!=-1);
-var _603=(_601.indexOf("tr")!=-1);
-if(_602&&_603){
-return "";
-}
-if(_602){
-return "left";
-}
-if(_603){
-return "right";
-}
-return "";
-},_whichSideBottom:function(){
-var _604=this.options.corners;
-if(this._hasString(_604,"all","bottom")){
-return "";
-}
-var _605=(_604.indexOf("bl")!=-1);
-var _606=(_604.indexOf("br")!=-1);
-if(_605&&_606){
-return "";
-}
-if(_605){
-return "left";
-}
-if(_606){
-return "right";
-}
-return "";
-},_borderColor:function(_607,_608){
-if(_607=="transparent"){
-return _608;
-}else{
-if(this.options.border){
-return this.options.border;
-}else{
-if(this.options.blend){
-return _608.blendedColor(_607);
-}
-}
-}
-return "";
-},_setMargin:function(el,n,_609){
-var _610=this._marginSize(n)+"px";
-var _611=(_609=="top"?this._whichSideTop():this._whichSideBottom());
-var _612=el.style;
-if(_611=="left"){
-_612.marginLeft=_610;
-_612.marginRight="0px";
-}else{
-if(_611=="right"){
-_612.marginRight=_610;
-_612.marginLeft="0px";
-}else{
-_612.marginLeft=_610;
-_612.marginRight=_610;
-}
-}
-},_setBorder:function(el,n,_613){
-var _614=this._borderSize(n)+"px";
-var _615=(_613=="top"?this._whichSideTop():this._whichSideBottom());
-var _616=el.style;
-if(_615=="left"){
-_616.borderLeftWidth=_614;
-_616.borderRightWidth="0px";
-}else{
-if(_615=="right"){
-_616.borderRightWidth=_614;
-_616.borderLeftWidth="0px";
-}else{
-_616.borderLeftWidth=_614;
-_616.borderRightWidth=_614;
-}
-}
-},_marginSize:function(n){
-if(this.isTransparent){
-return 0;
-}
-var o=this.options;
-if(o.compact&&o.blend){
-var _617=[1,0];
-return _617[n];
-}else{
-if(o.compact){
-var _618=[2,1];
-return _618[n];
-}else{
-if(o.blend){
-var _619=[3,2,1,0];
-return _619[n];
-}else{
-var _620=[5,3,2,1];
-return _620[n];
-}
-}
-}
-},_borderSize:function(n){
-var o=this.options;
-var _621;
-if(o.compact&&(o.blend||this.isTransparent)){
-return 1;
-}else{
-if(o.compact){
-_621=[1,0];
-}else{
-if(o.blend){
-_621=[2,1,1,1];
-}else{
-if(o.border){
-_621=[0,2,0,0];
-}else{
-if(this.isTransparent){
-_621=[5,3,2,1];
-}else{
-return 0;
-}
-}
-}
-}
-}
-return _621[n];
-},_hasString:function(str){
-for(var i=1;i<arguments.length;i++){
-if(str.indexOf(arguments[i])!=-1){
-return true;
-}
-}
-return false;
-},_isTopRounded:function(){
-return this._hasString(this.options.corners,"all","top","tl","tr");
-},_isBottomRounded:function(){
-return this._hasString(this.options.corners,"all","bottom","bl","br");
-},_hasSingleTextChild:function(el){
-return (el.childNodes.length==1&&el.childNodes[0].nodeType==3);
-}};
-MochiKit.Visual.roundElement=function(e,_622){
-new MochiKit.Visual._RoundCorners(e,_622);
-};
-MochiKit.Visual.roundClass=function(_623,_624,_625){
-var _626=MochiKit.DOM.getElementsByTagAndClassName(_623,_624);
-for(var i=0;i<_626.length;i++){
-MochiKit.Visual.roundElement(_626[i],_625);
-}
-};
-MochiKit.Visual.Color=MochiKit.Color.Color;
-MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle;
-MochiKit.Visual.__new__=function(){
-var m=MochiKit.Base;
-m.nameFunctions(this);
-this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
-};
-MochiKit.Visual.EXPORT=["roundElement","roundClass"];
-MochiKit.Visual.EXPORT_OK=[];
-MochiKit.Visual.__new__();
-MochiKit.Base._exportSymbols(this,MochiKit.Visual);
-if(typeof (MochiKit)=="undefined"){
-MochiKit={};
-}
-if(typeof (MochiKit.MochiKit)=="undefined"){
-MochiKit.MochiKit={};
-}
-MochiKit.MochiKit.NAME="MochiKit.MochiKit";
-MochiKit.MochiKit.VERSION="1.3";
-MochiKit.MochiKit.__repr__=function(){
-return "["+this.NAME+" "+this.VERSION+"]";
-};
-MochiKit.MochiKit.toString=function(){
-return this.__repr__();
-};
-MochiKit.MochiKit.SUBMODULES=["Base","Iter","Logging","DateTime","Format","Async","DOM","LoggingPane","Color","Signal","Visual"];
-if(typeof (JSAN)!="undefined"||typeof (dojo)!="undefined"){
-if(typeof (dojo)!="undefined"){
-dojo.provide("MochiKit.MochiKit");
-dojo.require("MochiKit.*");
-}
-if(typeof (JSAN)!="undefined"){
-JSAN.use("MochiKit.Base",[]);
-JSAN.use("MochiKit.Iter",[]);
-JSAN.use("MochiKit.Logging",[]);
-JSAN.use("MochiKit.DateTime",[]);
-JSAN.use("MochiKit.Format",[]);
-JSAN.use("MochiKit.Async",[]);
-JSAN.use("MochiKit.DOM",[]);
-JSAN.use("MochiKit.LoggingPane",[]);
-JSAN.use("MochiKit.Color",[]);
-JSAN.use("MochiKit.Signal",[]);
-JSAN.use("MochiKit.Visual",[]);
-}
-(function(){
-var _627=MochiKit.Base.extend;
-var self=MochiKit.MochiKit;
-var _628=self.SUBMODULES;
-var _629=[];
-var _630=[];
-var _631={};
-var i,k,m,all;
-for(i=0;i<_628.length;i++){
-m=MochiKit[_628[i]];
-_627(_629,m.EXPORT);
-_627(_630,m.EXPORT_OK);
-for(k in m.EXPORT_TAGS){
-_631[k]=_627(_631[k],m.EXPORT_TAGS[k]);
-}
-all=m.EXPORT_TAGS[":all"];
-if(!all){
-all=_627(null,m.EXPORT,m.EXPORT_OK);
-}
-var j;
-for(j=0;j<all.length;j++){
-k=all[j];
-self[k]=m[k];
-}
-}
-self.EXPORT=_629;
-self.EXPORT_OK=_630;
-self.EXPORT_TAGS=_631;
-}());
-}else{
-if(typeof (MochiKit.__compat__)=="undefined"){
-MochiKit.__compat__=true;
-}
-(function(){
-var _632=document.getElementsByTagName("script");
-var _633="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-var base=null;
-var _634=null;
-var _635={};
-var i;
-for(i=0;i<_632.length;i++){
-var src=_632[i].getAttribute("src");
-if(!src){
-continue;
-}
-_635[src]=true;
-if(src.match(/MochiKit.js$/)){
-base=src.substring(0,src.lastIndexOf("MochiKit.js"));
-_634=_632[i];
-}
-}
-if(base===null){
-return;
-}
-var _636=MochiKit.MochiKit.SUBMODULES;
-for(var i=0;i<_636.length;i++){
-if(MochiKit[_636[i]]){
-continue;
-}
-var uri=base+_636[i]+".js";
-if(uri in _635){
-continue;
-}
-if(document.documentElement&&document.documentElement.namespaceURI==_633){
-var s=document.createElementNS(_633,"script");
-s.setAttribute("id","MochiKit_"+base+_636[i]);
-s.setAttribute("src",uri);
-s.setAttribute("type","application/x-javascript");
-_634.parentNode.appendChild(s);
-}else{
-document.write("<script src=\""+uri+"\" type=\"text/javascript\"></script>");
-}
-}
-})();
-}
-
-
diff --git a/trunk/activemq-web-console/src/main/webapp/js/mochi/__package__.js b/trunk/activemq-web-console/src/main/webapp/js/mochi/__package__.js
deleted file mode 100644
index b8e9158..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/mochi/__package__.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/***
-
-    MochiKit.MochiKit 1.3 : PACKED VERSION
-
-    THIS FILE IS AUTOMATICALLY GENERATED.  If creating patches, please
-    diff against the source tree, not this file.
-
-    See <http://mochikit.com/> for documentation, downloads, license, etc.
-
-    (c) 2005 Bob Ippolito.  All rights Reserved.
-
-***/
-dojo.hostenv.conditionalLoadModule({"common": ["MochiKit.MochiKit"]});
-dojo.hostenv.moduleLoaded("MochiKit.*");
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/Base.js b/trunk/activemq-web-console/src/main/webapp/js/plotkit/Base.js
deleted file mode 100644
index ae9ec0b..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/Base.js
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
-    PlotKit
-    =======
-    PlotKit is a collection of Javascript classes that allows
-    you to quickly visualise data using different types of charts.
-
-    For license/info/documentation: http://www.liquidx.net/plotkit/
-
-    Copyright
-    ---------
-    Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
-    For use under the BSD license. <http://www.liquidx.net/plotkit>
-*/
-
-// --------------------------------------------------------------------
-// Check required components
-// --------------------------------------------------------------------
-
-try {    
-    if (typeof(MochiKit.Base) == 'undefined'   ||
-        typeof(MochiKit.DOM) == 'undefined'    ||
-        typeof(MochiKit.Color) == 'undefined'  ||
-        typeof(MochiKit.Format) == 'undefined')
-    {
-        throw "";    
-    }
-} 
-catch (e) {    
-    throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format}"
-}
-
-// -------------------------------------------------------------------
-// Inject Common Shortcuts we use into MochiKit.Color.Color
-// -------------------------------------------------------------------
-
-MochiKit.Base.update(MochiKit.Color.Color.prototype, {
-    asFillColor: function() {
-        return this.lighterColorWithLevel(0.3);
-    },
-        
-    asStrokeColor: function() {
-        return this.darkerColorWithLevel(0.1);
-    },
-
-    asPointColor: function() {
-        return this.lighterColorWithLevel(0.1);
-    }
-});
-
-
-// -------------------------------------------------------------------
-// Define our own PlotKit namespace
-// -------------------------------------------------------------------
-
-if (typeof(PlotKit) == 'undefined') {
-    PlotKit = {};
-}
-
-PlotKit.NAME = "PlotKit";
-PlotKit.VERSION = "0.8";
-PlotKit.__repr__ = function() {
-    return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-PlotKit.toString = function() {
-    return this.__repr__();
-}
-
-// -------------------------------------------------------------------
-//  Encapsulate all our utility function into it's own namespace.
-// -------------------------------------------------------------------
-
-if (typeof(PlotKit.Base) == 'undefined') {
-    PlotKit.Base = {};
-}
-
-PlotKit.Base.NAME = 'PlotKit.Base';
-PlotKit.Base.VERSION = PlotKit.VERSION;
-
-PlotKit.Base.__repr__ = function() {
-    return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-PlotKit.Base.toString = function() {
-    return this.__repr__();
-}
-
-MochiKit.Base.update(PlotKit.Base, {
-    roundInterval: function(range, intervals, precision) {
-        // We want to make the interval look regular,
-        var trunc = MochiKit.Format.roundToFixed;
-        var sep = range/intervals;
-        return parseFloat(trunc(sep, precision));
-    },
-
-    collapse: function(lst) {
-        var m = MochiKit.Base;
-        var biggerList = new Array();
-        for (var i = 0; i < lst.length; i++) {
-            biggerList = m.concat(biggerList, lst[i]);
-        }
-        return biggerList;
-    },
-    
-    uniq: function(sortedList) {
-        // get unique elements in list, exactly the same as unix shell's uniq.
-        var m = MochiKit.Base;
-        
-        if (!m.isArrayLike(sortedList) || (sortedList.length < 1))
-            return new Array();
-
-        var uniq = new Array();
-        var lastElem = sortedList[0];    
-        uniq.push(sortedList[0]);
-        for (var i = 1; i < sortedList.length; i++) {
-            if (m.compare(sortedList[i], lastElem) != 0) {
-                lastElem = sortedList[i];
-                uniq.push(sortedList[i]);            
-            }
-        }
-        return uniq;
-    },
-    
-    colorScheme: function() {
-        var mb = MochiKit.Base;
-        var mc = MochiKit.Color
-        var scheme = ["red", "orange", "yellow", "green", "cyan", "blue", "purple", "magenta"];
-        
-        var makeColor = function(name) {
-            return mc.Color[name + "Color"]()
-        };
-        
-        return mb.map(makeColor, scheme);
-    },
-
-    baseDarkPrimaryColors: function () {
-        var hexColor = MochiKit.Color.Color.fromHexString;
-        return [hexColor("#ad3f40"),
-                hexColor("#ddac2c"),
-                hexColor("#dfdd0c"),
-                hexColor("#5276c4"),
-                hexColor("#739c5a")];
-    },
-
-    basePrimaryColors: function () {
-        var hexColor = MochiKit.Color.Color.fromHexString;
-        return [hexColor("#d24c4d"),
-                hexColor("#f2b32f"),
-                hexColor("#ece90e"),
-                hexColor("#5d83da"),
-                hexColor("#78a15d")];
-    },
-    
-    baseBlueColors: function () {
-         var hexColor = MochiKit.Color.Color.fromHexString;
-         return [hexColor("#4b6b94"), hexColor("#5d81b4"), hexColor("#acbad2")];
-    },
-
-    palette: function(baseColor, fromLevel, toLevel, increment) {
-        var isNil = MochiKit.Base.isUndefinedOrNull;
-        var fractions = new Array();
-        if (isNil(increment))
-            increment = 0.1;
-        if (isNil(toLevel))
-            toLevel = 0.4;
-        if (isNil(fromLevel))
-            fromLevel = -0.2;
-
-        var level = fromLevel;
-        while (level <= toLevel) {
-            fractions.push(level);
-            level += increment;
-        }
-            
-        var makeColor = function(color, fraction) {
-            return color.lighterColorWithLevel(fraction);
-        };
-        return MochiKit.Base.map(partial(makeColor, baseColor), fractions);
-    },
-    
-
-                       
-
-    // The follow functions are from quirksmode.org
-    // http://www.quirksmode.org/js/findpos.html
-
-    findPosX: function(obj) {
-        var curleft = 0;
-        if (obj.offsetParent)
-            {
-                while (obj.offsetParent)
-                    {
-                        curleft += obj.offsetLeft
-                            obj = obj.offsetParent;
-                    }
-            }
-        else if (obj.x)
-            curleft += obj.x;
-        return curleft;
-    },
-                       
-   findPosY: function(obj) {
-       var curtop = 0;
-       if (obj.offsetParent)
-           {
-               while (obj.offsetParent)
-                   {
-                       curtop += obj.offsetTop
-                           obj = obj.offsetParent;
-                   }
-           }
-       else if (obj.y)
-           curtop += obj.y;
-       return curtop;
-   }
-});    
-
-PlotKit.Base.baseColors = function () {
-   var hexColor = MochiKit.Color.Color.fromHexString;
-   return [hexColor("#476fb2"),
-           hexColor("#be2c2b"),
-           hexColor("#85b730"),
-           hexColor("#734a99"),
-           hexColor("#26a1c5"),
-           hexColor("#fb8707"),
-           hexColor("#000000")];
-};
-
-PlotKit.Base.officeBaseStyle = {
-    "axisLineWidth": 2.0,
-    "axisLabelColor": Color.grayColor(),
-    "axisLineColor": Color.whiteColor(),
-    "padding": {top: 5, bottom: 10, left: 30, right: 30}
-};    
-
-MochiKit.Base.update(PlotKit.Base,{
-    officeBlue: function() {
-        var r = {
-        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
-        "backgroundColor": PlotKit.Base.baseColors()[0].lighterColorWithLevel(0.45)
-        };
-        MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
-        return r;
-    },
-    officeRed: function() {
-        var r = {
-        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),
-        "backgroundColor": PlotKit.Base.baseColors()[1].lighterColorWithLevel(0.5)
-        };
-        MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
-        return r;
-    },
-    officeGreen: function() {
-        var r = {
-        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[2]),
-        "backgroundColor": PlotKit.Base.baseColors()[2].lighterColorWithLevel(0.5)
-        };
-        MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
-        return r;
-    },
-    officePurple: function() {
-        var r = {
-        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[3]),
-        "backgroundColor": PlotKit.Base.baseColors()[3].lighterColorWithLevel(0.5)
-        };
-        MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
-        return r;
-    },
-    
-    officeCyan: function() {
-        var r = {
-            "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[4]),
-            "backgroundColor": PlotKit.Base.baseColors()[4].lighterColorWithLevel(0.5)
-            };
-        MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
-        return r;
-    },
-    
-    officeOrange: function() {
-        var r = {
-            "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[5]),
-            "backgroundColor": PlotKit.Base.baseColors()[5].lighterColorWithLevel(0.4)
-            };
-        MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
-        return r;
-    },
-    
-    officeBlack: function() {
-        var r = {
-        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[6], 0.0, 0.6),
-        "backgroundColor": PlotKit.Base.baseColors()[6].lighterColorWithLevel(0.9)
-        };
-        MochiKit.Base.update(r, PlotKit.Base.officeBaseStyle);
-        return r;
-    }
-});
-
-
-PlotKit.Base.EXPORT = [
-   "baseColors",
-   "collapse",
-   "colorScheme",
-   "findPosX",
-   "findPosY",
-   "officeBaseStyle",
-   "officeBlue",
-   "officeRed",
-   "officeGreen",
-   "officePurple",
-   "officeCyan",
-   "officeOrange",
-   "officeBlack",
-   "roundInterval",
-   "uniq",
-];
-
-PlotKit.Base.EXPORT_OK = [];
-
-PlotKit.Base.__new__ = function() {
-    var m = MochiKit.Base;
-    
-    m.nameFunctions(this);
-    
-    this.EXPORT_TAGS = {
-        ":common": this.EXPORT,
-        ":all": m.concat(this.EXPORT, this.EXPORT_OK)
-    };
-};
-
-PlotKit.Base.__new__();
-MochiKit.Base._exportSymbols(this, PlotKit.Base);
-
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/Canvas.js b/trunk/activemq-web-console/src/main/webapp/js/plotkit/Canvas.js
deleted file mode 100644
index b3ba168..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/Canvas.js
+++ /dev/null
@@ -1,707 +0,0 @@
-/* 
-    PlotKit Canvas
-    --------------
-    
-    Provides HTML Canvas Renderer. This is supported under:
-    
-    - Safari 2.0
-    - Mozilla Firefox 1.5
-    - Opera 9.0 preview 2
-    - IE 6 (via VML Emulation)
-    
-    It uses DIVs for labels.
-    
-    Notes About IE Support
-    ----------------------
-    
-    This class relies on iecanvas.htc for Canvas Emulation under IE[1].
-    iecanvas.htc is included in the distribution of PlotKit for convenience. In order to enable IE support, you must set the following option when initialising the renderer:
-    
-    var renderOptions = {
-        "IECanvasHTC": "contrib/iecanvas.htc"
-    };
-    var engine = new CanvasRenderer(canvasElement, layout, renderOptions);
-    
-    Where "contrib/iecanvas.htc" is the path to the htc behavior relative
-    to where your HTML is.
-    
-    This is only needed for IE support.
-    
-    Copyright
-    ---------
-    Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
-    For use under the BSD license. <http://www.liquidx.net/plotkit>
-    
-*/
-// --------------------------------------------------------------------
-// Check required components
-// --------------------------------------------------------------------
-
-try {    
-    if (typeof(PlotKit.Layout) == 'undefined')
-    {
-        throw "";    
-    }
-} 
-catch (e) {    
-    throw "PlotKit.Layout depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Base and PlotKit.Layout"
-}
-
-
-// ------------------------------------------------------------------------
-//  Defines the renderer class
-// ------------------------------------------------------------------------
-
-if (typeof(PlotKit.CanvasRenderer) == 'undefined') {
-    PlotKit.CanvasRenderer = {};
-}
-
-PlotKit.CanvasRenderer.NAME = "PlotKit.CanvasRenderer";
-PlotKit.CanvasRenderer.VERSION = PlotKit.VERSION;
-
-PlotKit.CanvasRenderer.__repr__ = function() {
-    return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-PlotKit.CanvasRenderer.toString = function() {
-    return this.__repr__();
-}
-
-PlotKit.CanvasRenderer = function(element, layout, options) {
-    if (arguments.length  > 0)
-        this.__init__(element, layout, options);
-};
-
-PlotKit.CanvasRenderer.prototype.__init__ = function(element, layout, options) {
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-    var Color = MochiKit.Color.Color;
-    
-    // default options
-    this.options = {
-        "drawBackground": true,
-        "backgroundColor": Color.whiteColor(),
-        "padding": {left: 30, right: 30, top: 5, bottom: 10},
-        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
-        "strokeColor": Color.whiteColor(),
-        "strokeColorTransform": "asStrokeColor",
-        "strokeWidth": 0.5,
-        "shouldFill": true,
-        "shouldStroke": true,
-        "drawXAxis": true,
-        "drawYAxis": true,
-        "axisLineColor": Color.blackColor(),
-        "axisLineWidth": 0.5,
-        "axisTickSize": 3,
-        "axisLabelColor": Color.blackColor(),
-        "axisLabelFont": "Arial",
-        "axisLabelFontSize": 9,
-		"axisLabelWidth": 50,
-		"pieRadius": 0.4,
-        "enableEvents": true,
-        "IECanvasHTC": "PlotKit/iecanvas.htc"
-    };
-    MochiKit.Base.update(this.options, options ? options : {});
-
-    // we need to refetch the element because of this horrible Canvas on IE
-    // crap
-    this.element_id = element.id ? element.id : element;
-
-    // Stuff relating to Canvas on IE support
-    var self = PlotKit.CanvasRenderer;
-    this.isIE = self.IECanvasEmulationIfNeeded(this.options.IECanvasHTC);
-    this.IEDelay = 0.5;
-    this.maxTries = 5;
-    this.renderDelay = null;
-    this.clearDelay = null;
-
-    this.layout = layout;
-    this.style = layout.style;
-    this.element = MochiKit.DOM.getElement(this.element_id);
-    //this.element = element;
-    this.container = this.element.parentNode;
-    this.height = this.element.height;
-    this.width = this.element.width;
-
-    // --- check whether everything is ok before we return
-
-    if (isNil(this.element))
-        throw "CanvasRenderer() - passed canvas is not found";
-
-    if (!this.isIE && !(PlotKit.CanvasRenderer.isSupported(this.element)))
-        throw "CanvasRenderer() - Canvas is not supported.";
-
-    if (isNil(this.container) || (this.container.nodeName.toLowerCase() != "div"))
-        throw "CanvasRenderer() - <canvas> needs to be enclosed in <div>";
-
-    // internal state
-    this.xlabels = new Array();
-    this.ylabels = new Array();
-    this.isFirstRender = true;
-
-    this.area = {
-        x: this.options.padding.left,
-        y: this.options.padding.top,
-        w: this.width - this.options.padding.left - this.options.padding.right,
-        h: this.height - this.options.padding.top - this.options.padding.bottom
-    };
-
-    MochiKit.DOM.updateNodeAttributes(this.container, 
-    {"style":{ "position": "relative", "width": this.width + "px"}});
-
-    // load event system if we have Signals
-    try {
-        this.event_isinside = null;
-        if (MochiKit.Signal && this.options.enableEvents) {
-            this._initialiseEvents();
-        }
-    }
-    catch (e) {
-        // still experimental
-    }
-};
-
-PlotKit.CanvasRenderer.IECanvasEmulationIfNeeded = function(htc) {
-    var ie = navigator.appVersion.match(/MSIE (\d\.\d)/);
-    var opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
-    if ((!ie) || (ie[1] < 6) || (opera))
-        return false;
-
-    if (isUndefinedOrNull(MochiKit.DOM.getElement('VMLRender'))) {
-        // before we add VMLRender, we need to recreate all canvas tags
-        // programmatically otherwise IE will not recognise it
-
-        var nodes = document.getElementsByTagName('canvas');
-        for (var i = 0; i < nodes.length; i++) {
-            var node = nodes[i];
-            if (node.getContext) { return; } // Other implementation, abort
-            var newNode = MochiKit.DOM.CANVAS(
-               {id: node.id, 
-                width: "" + parseInt(node.width),
-                height: "" + parseInt(node.height)}, "");
-            newNode.style.width = parseInt(node.width) + "px";
-            newNode.style.height = parseInt(node.height) + "px";
-            node.id = node.id + "_old";
-            MochiKit.DOM.swapDOM(node, newNode);
-        }
-
-        document.namespaces.add("v");
-        var vmlopts = {'id':'VMLRender',
-                       'codebase':'vgx.dll',
-                       'classid':'CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E'};
-        var vml = MochiKit.DOM.createDOM('object', vmlopts);
-        document.body.appendChild(vml);
-        var vmlStyle = document.createStyleSheet();
-        vmlStyle.addRule("canvas", "behavior: url('" + htc + "');");
-        vmlStyle.addRule("v\\:*", "behavior: url(#VMLRender);");
-    }
-    return true;
-};
-
-PlotKit.CanvasRenderer.prototype.render = function() {
-    if (this.isIE) {
-        // VML takes a while to start up, so we just poll every this.IEDelay
-        try {
-            if (this.renderDelay) {
-                this.renderDelay.cancel();
-                this.renderDelay = null;
-            }
-            var context = this.element.getContext("2d");
-        }
-        catch (e) {
-            this.isFirstRender = false;
-            if (this.maxTries-- > 0) {
-                this.renderDelay = MochiKit.Async.wait(this.IEDelay);
-                this.renderDelay.addCallback(bind(this.render, this));
-            }
-            return;
-        }
-    }
-
-    if (this.options.drawBackground)
-        this._renderBackground();
-
-    if (this.style == "bar") {
-        this._renderBarChart();
-		this._renderBarAxis(); 
-	}
-    else if (this.style == "pie") {
-        this._renderPieChart();
-		this._renderPieAxis();
-	}
-    else if (this.style == "line") {
-        this._renderLineChart();
-		this._renderLineAxis();
-	}
-};
-
-PlotKit.CanvasRenderer.prototype._renderBarChartWrap = function(data, plotFunc) {
-    var context = this.element.getContext("2d");
-    var colorCount = this.options.colorScheme.length;
-    var colorScheme = this.options.colorScheme;
-    var setNames = MochiKit.Base.keys(this.layout.datasets);
-    var setCount = setNames.length;
-
-    for (var i = 0; i < setCount; i++) {
-        var setName = setNames[i];
-        var color = colorScheme[i%colorCount];
-        context.save();
-        context.fillStyle = color.toRGBString();
-        if (this.options.strokeColor)
-            context.strokeStyle = this.options.strokeColor.toRGBString();
-        else if (this.options.strokeColorTransform) 
-            context.strokeStyle = color[this.options.strokeColorTransform]().toRGBString();
-        
-        context.lineWidth = this.options.strokeWidth;
-        var forEachFunc = function(obj) {
-            if (obj.name == setName)
-                plotFunc(context, obj);
-        };                
-
-        MochiKit.Iter.forEach(data, bind(forEachFunc, this));
-        context.restore();
-    }
-};
-
-PlotKit.CanvasRenderer.prototype._renderBarChart = function() {
-    var bind = MochiKit.Base.bind;
-
-    var drawRect = function(context, bar) {
-        var x = this.area.w * bar.x + this.area.x;
-        var y = this.area.h * bar.y + this.area.y;
-        var w = this.area.w * bar.w;
-        var h = this.area.h * bar.h;       
-        if ((w < 1) || (h < 1))
-            return;
-        if (this.options.shouldFill)
-            context.fillRect(x, y, w, h);
-        if (this.options.shouldStroke)
-            context.strokeRect(x, y, w, h);                
-    };
-    this._renderBarChartWrap(this.layout.bars, bind(drawRect, this));
-};
-
-PlotKit.CanvasRenderer.prototype._renderLineChart = function() {
-    var context = this.element.getContext("2d");
-    var colorCount = this.options.colorScheme.length;
-    var colorScheme = this.options.colorScheme;
-    var setNames = MochiKit.Base.keys(this.layout.datasets);
-    var setCount = setNames.length;
-    var bind = MochiKit.Base.bind;
-    var partial = MochiKit.Base.partial;
-
-    for (var i = 0; i < setCount; i++) {
-        var setName = setNames[i];
-        var color = colorScheme[i%colorCount];
-        var strokeX = this.options.strokeColorTransform;
-
-        // setup graphics context
-        context.save();
-        context.fillStyle = color.toRGBString();
-        if (this.options.strokeColor)
-            context.strokeStyle = this.options.strokeColor.toRGBString();
-        else if (this.options.strokeColorTransform) 
-            context.strokeStyle = color[strokeX]().toRGBString();
-        
-        context.lineWidth = this.options.strokeWidth;
-        
-        // create paths
-        var makePath = function() {
-            context.beginPath();
-            context.moveTo(this.area.x, this.area.y + this.area.h);
-            var addPoint = function(context, point) {
-            if (point.name == setName)
-                context.lineTo(this.area.w * point.x + this.area.x,
-                               this.area.h * point.y + this.area.y);
-            };
-            MochiKit.Iter.forEach(this.layout.points, partial(addPoint, context), this);
-            context.lineTo(this.area.w + this.area.x,
-                           this.area.h + this.area.y);
-            context.lineTo(this.area.x, this.area.y + this.area.h);
-            context.closePath();
-        };
-
-        if (this.options.shouldFill) {
-            bind(makePath, this)();
-            context.fill();
-        }
-        if (this.options.shouldStroke) {
-            bind(makePath, this)();
-            context.stroke();
-        }
-
-        context.restore();
-    }
-};
-
-PlotKit.CanvasRenderer.prototype._renderPieChart = function() {
-    var context = this.element.getContext("2d");
-    var colorCount = this.options.colorScheme.length;
-    var slices = this.layout.slices;
-
-    var centerx = this.area.x + this.area.w * 0.5;
-    var centery = this.area.y + this.area.h * 0.5;
-    var radius = Math.min(this.area.w * this.options.pieRadius, 
-                          this.area.h * this.options.pieRadius);
-
-    if (this.isIE) {
-        centerx = parseInt(centerx);
-        centery = parseInt(centery);
-        radius = parseInt(radius);
-    }
-
-
-	// NOTE NOTE!! Canvas Tag draws the circle clockwise from the y = 0, x = 1
-	// so we have to subtract 90 degrees to make it start at y = 1, x = 0
-
-    for (var i = 0; i < slices.length; i++) {
-        var color = this.options.colorScheme[i%colorCount];
-        context.save();
-        context.fillStyle = color.toRGBString();
-
-        var makePath = function() {
-            context.beginPath();
-            context.moveTo(centerx, centery);
-            context.arc(centerx, centery, radius, 
-                        slices[i].startAngle - Math.PI/2,
-                        slices[i].endAngle - Math.PI/2,
-                        false);
-            context.lineTo(centerx, centery);
-            context.closePath();
-        };
-
-        if (Math.abs(slices[i].startAngle - slices[i].endAngle) > 0.001) {
-            if (this.options.shouldFill) {
-                makePath();
-                context.fill();
-            }
-            
-            if (this.options.shouldStroke) {
-                makePath();
-                context.lineWidth = this.options.strokeWidth;
-                if (this.options.strokeColor)
-                    context.strokeStyle = this.options.strokeColor.toRGBString();
-                else if (this.options.strokeColorTransform)
-                    context.strokeStyle = color[this.options.strokeColorTransform]().toRGBString();
-                context.stroke();
-            }
-        }
-        context.restore();
-    }
-};
-
-PlotKit.CanvasRenderer.prototype._renderBarAxis = function() {
-	this._renderAxis();
-}
-
-PlotKit.CanvasRenderer.prototype._renderLineAxis = function() {
-	this._renderAxis();
-};
-
-
-PlotKit.CanvasRenderer.prototype._renderAxis = function() {
-    if (!this.options.drawXAxis && !this.options.drawYAxis)
-        return;
-
-    var context = this.element.getContext("2d");
-
-    var labelStyle = {"style":
-         {"position": "absolute",
-          "fontSize": this.options.axisLabelFontSize + "px",
-          "zIndex": 10,
-          "color": this.options.axisLabelColor.toRGBString(),
-          "width": this.options.axisLabelWidth + "px",
-          "overflow": "hidden"
-         }
-    };
-
-    // axis lines
-    context.save();
-    context.strokeStyle = this.options.axisLineColor.toRGBString();
-    context.lineWidth = this.options.axisLineWidth;
-
-
-    if (this.options.drawYAxis) {
-        if (this.layout.yticks) {
-            var drawTick = function(tick) {
-                var x = this.area.x;
-                var y = this.area.y + tick[0] * this.area.h;
-                context.beginPath();
-                context.moveTo(x, y);
-                context.lineTo(x - this.options.axisTickSize, y);
-                context.closePath();
-                context.stroke();
-
-                var label = DIV(labelStyle, tick[1]);
-                label.style.top = (y - this.options.axisLabelFontSize) + "px";
-                label.style.left = (x - this.options.padding.left - this.options.axisTickSize) + "px";
-                label.style.textAlign = "right";
-                label.style.width = (this.options.padding.left - this.options.axisTickSize * 2) + "px";
-                MochiKit.DOM.appendChildNodes(this.container, label);
-                this.ylabels.push(label);
-            };
-            
-            MochiKit.Iter.forEach(this.layout.yticks, bind(drawTick, this));
-        }
-
-        context.beginPath();
-        context.moveTo(this.area.x, this.area.y);
-        context.lineTo(this.area.x, this.area.y + this.area.h);
-        context.closePath();
-        context.stroke();
-    }
-
-    if (this.options.drawXAxis) {
-        if (this.layout.xticks) {
-            var drawTick = function(tick) {
-                var x = this.area.x + tick[0] * this.area.w;
-                var y = this.area.y + this.area.h;
-                context.beginPath();
-                context.moveTo(x, y);
-                context.lineTo(x, y + this.options.axisTickSize);
-                context.closePath();
-                context.stroke();
-
-                var label = DIV(labelStyle, tick[1]);
-                label.style.top = (y + this.options.axisTickSize) + "px";
-                label.style.left = (x - this.options.axisLabelWidth/2) + "px";
-                label.style.textAlign = "center";
-                label.style.width = this.options.axisLabelWidth + "px";
-                MochiKit.DOM.appendChildNodes(this.container, label);
-                this.xlabels.push(label);
-            };
-            
-            MochiKit.Iter.forEach(this.layout.xticks, bind(drawTick, this));
-        }
-
-        context.beginPath();
-        context.moveTo(this.area.x, this.area.y + this.area.h);
-        context.lineTo(this.area.x + this.area.w, this.area.y + this.area.h);
-        context.closePath();
-        context.stroke();
-    }
-
-    context.restore();
-
-};
-
-PlotKit.CanvasRenderer.prototype._renderPieAxis = function() {
-    if (!this.options.drawXAxis)
-        return;
-
-	if (this.layout.xticks) {
-		// make a lookup dict for x->slice values
-		var lookup = new Array();
-		for (var i = 0; i < this.layout.slices.length; i++) {
-			lookup[this.layout.slices[i].xval] = this.layout.slices[i];
-		}
-		
-		var centerx = this.area.x + this.area.w * 0.5;
-	    var centery = this.area.y + this.area.h * 0.5;
-	    var radius = Math.min(this.area.w * this.options.pieRadius,
-	                          this.area.h * this.options.pieRadius);
-		var labelWidth = this.options.axisLabelWidth;
-		
-		for (var i = 0; i < this.layout.xticks.length; i++) {
-			var slice = lookup[this.layout.xticks[i][0]];
-			if (MochiKit.Base.isUndefinedOrNull(slice))
-				continue;
-				
-				
-			var angle = (slice.startAngle + slice.endAngle)/2;
-			// normalize the angle
-			var normalisedAngle = angle;
-			if (normalisedAngle > Math.PI * 2)
-				normalisedAngle = normalisedAngle - Math.PI * 2;
-			else if (normalisedAngle < 0)
-				normalisedAngle = normalisedAngle + Math.PI * 2;
-				
-			var labelx = centerx + Math.sin(normalisedAngle) * (radius + 10);
-	        var labely = centery - Math.cos(normalisedAngle) * (radius + 10);
-
-			var attrib = {"position": "absolute",
-	                      "zIndex": 11,
-	                      "width": labelWidth + "px",
-	                      "fontSize": this.options.axisLabelFontSize + "px",
-	                      "overflow": "hidden",
-						  "color": this.options.axisLabelColor.toHexString()
-						};
-
-			if (normalisedAngle <= Math.PI * 0.5) {
-	            // text on top and align left
-	            attrib["textAlign"] = "left";
-	            attrib["verticalAlign"] = "top";
-	            attrib["left"] = labelx + "px";
-	            attrib["top"] = (labely - this.options.axisLabelFontSize) + "px";
-	        }
-	        else if ((normalisedAngle > Math.PI * 0.5) && (normalisedAngle <= Math.PI)) {
-	            // text on bottom and align left
-	            attrib["textAlign"] = "left";
-	            attrib["verticalAlign"] = "bottom";     
-	            attrib["left"] = labelx + "px";
-	            attrib["top"] = labely + "px";
-
-	        }
-	        else if ((normalisedAngle > Math.PI) && (normalisedAngle <= Math.PI*1.5)) {
-	            // text on bottom and align right
-	            attrib["textAlign"] = "right";
-	            attrib["verticalAlign"] = "bottom"; 
-	            attrib["left"] = (labelx  - labelWidth) + "px";
-	            attrib["top"] = labely + "px";
-	        }
-	        else {
-	            // text on top and align right
-	            attrib["textAlign"] = "right";
-	            attrib["verticalAlign"] = "bottom";  
-	            attrib["left"] = (labelx  - labelWidth) + "px";
-	            attrib["top"] = (labely - this.options.axisLabelFontSize) + "px";
-	        }
-	
-			var label = DIV({'style': attrib}, this.layout.xticks[i][1]);
-			this.xlabels.push(label);
-			MochiKit.DOM.appendChildNodes(this.container, label);
-	  }
-		
-	}
-};
-
-PlotKit.CanvasRenderer.prototype._renderBackground = function() {
-    var context = this.element.getContext("2d");
-    context.save();
-    context.fillStyle = this.options.backgroundColor.toRGBString();
-    context.fillRect(0, 0, this.width, this.height);
-    context.restore();
-};
-
-PlotKit.CanvasRenderer.prototype.clear = function() {
-    if (this.isIE) {
-        // VML takes a while to start up, so we just poll every this.IEDelay
-        try {
-            if (this.clearDelay) {
-                this.clearDelay.cancel();
-                this.clearDelay = null;
-            }
-            var context = this.element.getContext("2d");
-        }
-        catch (e) {
-            this.isFirstRender = false;
-            this.clearDelay = MochiKit.Async.wait(this.IEDelay);
-            this.clearDelay.addCallback(bind(this.clear, this));
-            return;
-        }
-    }
-
-    var context = this.element.getContext("2d");
-    context.clearRect(0, 0, this.width, this.height);
-
-    
-    for (var i = 0; i < this.xlabels.length; i++) {
-        MochiKit.DOM.removeElement(this.xlabels[i]);
-    }        
-    for (var i = 0; i < this.ylabels.length; i++) {
-        MochiKit.DOM.removeElement(this.ylabels[i]);
-    }            
-    this.xlabels = new Array();
-    this.ylabels = new Array();
-    
-};
-
-PlotKit.CanvasRenderer.prototype._initialiseEvents = function() {
-    var connect = MochiKit.Signal.connect;
-    var bind = MochiKit.Base.bind;
-    MochiKit.Signal.registerSignals(this, ['onmouseover', 'onclick', 'onmouseout', 'onmousemove']);
-    //connect(this.element, 'onmouseover', bind(this.onmouseover, this));
-    //connect(this.element, 'onmouseout', bind(this.onmouseout, this));
-    //connect(this.element, 'onmousemove', bind(this.onmousemove, this));
-    connect(this.element, 'onclick', bind(this.onclick, this));
-};
-
-PlotKit.CanvasRenderer.prototype._resolveObject = function(e) {
-    // does not work in firefox
-	//var x = (e.event().offsetX - this.area.x) / this.area.w;
-	//var y = (e.event().offsetY - this.area.y) / this.area.h;
-
-    var x = (e.mouse().page.x - PlotKit.Base.findPosX(this.element) - this.area.x) / this.area.w;
-    var y = (e.mouse().page.y - PlotKit.Base.findPosY(this.element) - this.area.y) / this.area.h;
-	
-    //log(x, y);
-
-    var isHit = this.layout.hitTest(x, y);
-    if (isHit)
-        return isHit;
-    return null;
-};
-
-PlotKit.CanvasRenderer.prototype._createEventObject = function(layoutObj, e) {
-    if (layoutObj == null) {
-        return null;
-    }
-
-    e.chart = layoutObj
-    return e;
-};
-
-
-PlotKit.CanvasRenderer.prototype.onclick = function(e) {
-    var layoutObject = this._resolveObject(e);
-    var eventObject = this._createEventObject(layoutObject, e);
-    if (eventObject != null)
-        MochiKit.Signal.signal(this, "onclick", eventObject);
-};
-
-PlotKit.CanvasRenderer.prototype.onmouseover = function(e) {
-    var layoutObject = this._resolveObject(e);
-    var eventObject = this._createEventObject(layoutObject, e);
-    if (eventObject != null) 
-        signal(this, "onmouseover", eventObject);
-};
-
-PlotKit.CanvasRenderer.prototype.onmouseout = function(e) {
-    var layoutObject = this._resolveObject(e);
-    var eventObject = this._createEventObject(layoutObject, e);
-    if (eventObject == null)
-        signal(this, "onmouseout", e);
-    else 
-        signal(this, "onmouseout", eventObject);
-
-};
-
-PlotKit.CanvasRenderer.prototype.onmousemove = function(e) {
-    var layoutObject = this._resolveObject(e);
-    var eventObject = this._createEventObject(layoutObject, e);
-
-    if ((layoutObject == null) && (this.event_isinside == null)) {
-        // TODO: should we emit an event anyway?
-        return;
-    }
-
-    if ((layoutObject != null) && (this.event_isinside == null))
-        signal(this, "onmouseover", eventObject);
-
-    if ((layoutObject == null) && (this.event_isinside != null))
-        signal(this, "onmouseout", eventObject);
-
-    if ((layoutObject != null) && (this.event_isinside != null))
-        signal(this, "onmousemove", eventObject);
-
-    this.event_isinside = layoutObject;
-    //log("move", x, y);    
-};
-
-PlotKit.CanvasRenderer.isSupported = function(canvasName) {
-    var canvas = null;
-    try {
-        if (MochiKit.Base.isUndefinedOrNull(canvasName)) 
-            canvas = MochiKit.DOM.CANVAS({});
-        else
-            canvas = MochiKit.DOM.getElement(canvasName);
-        var context = canvas.getContext("2d");
-    }
-    catch (e) {
-        var ie = navigator.appVersion.match(/MSIE (\d\.\d)/);
-        var opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
-        if ((!ie) || (ie[1] < 6) || (opera))
-            return false;
-        return true;
-    }
-    return true;
-};
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/Layout.js b/trunk/activemq-web-console/src/main/webapp/js/plotkit/Layout.js
deleted file mode 100644
index f57951a..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/Layout.js
+++ /dev/null
@@ -1,588 +0,0 @@
-/* 
-    PlotKit Layout
-    --------------
-    
-    Handles laying out data on to a virtual canvas square canvas between 0.0 
-    and 1.0. If you want to add new chart/plot types such as point plots,
-    you need to add them here.
-    
-    Copyright
-    ---------
-    Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
-    For use under the BSD license. <http://www.liquidx.net/plotkit>
-    
-*/
-
-try {    
-    if (typeof(PlotKit.Base) == 'undefined')
-    {
-        throw ""
-    }
-} 
-catch (e) {    
-    throw "PlotKit.Layout depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Base"
-}
-
-// --------------------------------------------------------------------
-// Start of Layout definition
-// --------------------------------------------------------------------
-
-if (typeof(PlotKit.Layout) == 'undefined') {
-    PlotKit.Layout = {};
-}
-
-PlotKit.Layout.NAME = "PlotKit.Layout";
-PlotKit.Layout.VERSION = PlotKit.VERSION;
-
-PlotKit.Layout.__repr__ = function() {
-    return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-PlotKit.Layout.toString = function() {
-    return this.__repr__();
-}
-
-PlotKit.Layout.valid_styles = ["bar", "line", "pie", "point"];
-
-// --------------------------------------------------------------------
-// Start of Layout definition
-// --------------------------------------------------------------------
-
-PlotKit.Layout = function(style, options) {
-    
-    this.options = {
-        "barWidthFillFraction": 0.75,
-        "xOriginIsZero": true,
-        "yOriginIsZero": true,
-        "xAxis": null, // [xmin, xmax]
-        "yAxis": null, // [ymin, ymax]
-        "xTicks": null, // [{label: "somelabel", v: value}, ..] (label opt.)
-        "yTicks": null, // [{label: "somelabel", v: value}, ..] (label opt.)
-        "xNumberOfTicks": 10,
-        "yNumberOfTicks": 5,
-        "xTickPrecision": 1,
-        "yTickPrecision": 3,
-        "pieRadius": 0.4
-    };
-
-    // valid external options : TODO: input verification
-    this.style = style; 
-    MochiKit.Base.update(this.options, options ? options : {});
-
-    // externally visible states
-    // overriden if xAxis and yAxis are set in options
-    if (!MochiKit.Base.isUndefinedOrNull(this.options.xAxis)) {
-        this.minxval = this.options.xAxis[0];
-        this.maxxval = this.options.xAxis[1];
-        this.xscale = this.maxxval - this.minxval; 
-    }
-    else {
-        this.minxval = 0;
-        this.maxxval = null;
-        this.xscale = null; // val -> pos factor (eg, xval * xscale = xpos)
-    }
-
-    if (!MochiKit.Base.isUndefinedOrNull(this.options.yAxis)) {
-        this.minyval = this.options.yAxis[0];
-        this.maxyval = this.options.yAxis[1];
-        this.yscale = this.maxyval - this.maxymin;
-    }
-    else {
-        this.minyval = 0;
-        this.maxyval = null;
-        this.yscale = null;
-    }
-
-    this.bars = new Array();   // array of bars to plot for bar charts
-    this.points = new Array(); // array of points to plot for line plots
-    this.slices = new Array(); // array of slices to draw for pie charts
-
-    this.xticks = new Array();
-    this.yticks = new Array();
-
-    // internal states
-    this.datasets = new Array();
-    this.minxdelta = 0;
-    this.xrange = 1;
-    this.yrange = 1;
-
-    this.hitTestCache = {x2maxy: null};
-    
-};
-
-// --------------------------------------------------------------------
-// Dataset Manipulation
-// --------------------------------------------------------------------
-
-
-PlotKit.Layout.prototype.addDataset = function(setname, set_xy) {
-    this.datasets[setname] = set_xy;
-};
-
-PlotKit.Layout.prototype.removeDataset = function(setname, set_xy) {
-    this.datasets[setname] = null;
-};
-
-PlotKit.Layout.prototype.addDatasetFromTable = function(name, tableElement, xcol, ycol) {
-	var isNil = MochiKit.Base.isUndefinedOrNull;
-	var scrapeText = MochiKit.DOM.scrapeText;
-	var strip = MochiKit.Format.strip;
-	
-	if (isNil(xcol))
-		xcol = 0;
-	if (isNil(ycol))
-		ycol = 1;
-        
-    var rows = tableElement.tBodies[0].rows;
-    var data = new Array();
-    if (!isNil(rows)) {
-        for (var i = 0; i < rows.length; i++) {
-            data.push([parseFloat(strip(scrapeText(rows[i].cells[xcol]))),
-                       parseFloat(strip(scrapeText(rows[i].cells[ycol])))]);
-        }
-        this.addDataset(name, data);
-        return true;
-    }
-    return false;
-};
-
-// --------------------------------------------------------------------
-// Evaluates the layout for the current data and style.
-// --------------------------------------------------------------------
-
-PlotKit.Layout.prototype.evaluate = function() {
-    this._evaluateLimits();
-    this._evaluateScales();
-    if (this.style == "bar") {
-        this._evaluateBarCharts();
-        this._evaluateBarTicks();
-    }
-    else if (this.style == "line") {
-        this._evaluateLineCharts();
-        this._evaluateLineTicks();
-    }
-    else if (this.style == "pie") {
-        this._evaluatePieCharts();
-        this._evaluatePieTicks();
-    }
-};
-
-
-
-// Given the fractional x, y positions, report the corresponding
-// x, y values.
-PlotKit.Layout.prototype.hitTest = function(x, y) {
-    // TODO: make this more efficient with better datastructures
-    //       for this.bars, this.points and this.slices
-
-    var f = MochiKit.Format.twoDigitFloat;
-
-    if ((this.style == "bar") && this.bars && (this.bars.length > 0)) {
-        for (var i = 0; i < this.bars.length; i++) {
-            var bar = this.bars[i];
-            if ((x >= bar.x) && (x <= bar.x + bar.w) 
-                && (y >= bar.y) && (y - bar.y <= bar.h))
-                return bar;
-        }
-    }
-
-    else if (this.style == "line") {
-        if (this.hitTestCache.x2maxy == null) {
-            this._regenerateHitTestCache();
-        }
-
-        // 1. find the xvalues that equal or closest to the give x
-        var xval = x / this.xscale;
-        var xvalues = this.hitTestCache.xvalues;
-        var xbefore = null;
-        var xafter = null;
-
-        for (var i = 1; i < xvalues.length; i++) {
-            if (xvalues[i] > xval) {
-                xbefore = xvalues[i-1];
-                xafter = xvalues[i];
-                break;
-            }
-        }
-
-        if ((xbefore != null)) {
-            var ybefore = this.hitTestCache.x2maxy[xbefore];
-            var yafter = this.hitTestCache.x2maxy[xafter];
-            var yval = (1.0 - y)/this.yscale;
-
-            // interpolate whether we will fall inside or outside
-            var gradient = (yafter - ybefore) / (xafter - xbefore);
-            var projmaxy = ybefore + gradient * (xval - xbefore);
-            if (projmaxy >= yval) {
-                // inside the highest curve (roughly)
-                var obj = {xval: xval, yval: yval,
-                           xafter: xafter, yafter: yafter,
-                           xbefore: xbefore, ybefore: ybefore,
-                           yprojected: projmaxy
-                };
-                return obj;
-            }
-        }
-    }
-
-    else if (this.style == "pie") {
-        var dist = Math.sqrt((y-0.5)*(y-0.5) + (x-0.5)*(x-0.5));
-        if (dist > this.options.pieRadius)
-            return null;
-
-        // TODO: actually doesn't work if we don't know how the Canvas
-        //       lays it out, need to fix!
-        var angle = Math.atan2(y - 0.5, x - 0.5) - Math.PI/2;
-        for (var i = 0; i < this.slices.length; i++) {
-            var slice = this.slices[i];
-            if (slice.startAngle < angle && slice.endAngle >= angle)
-                return slice;
-        }
-    }
-
-    return null;
-};
-
-// Reports valid position rectangle for X value (only valid for bar charts)
-PlotKit.Layout.prototype.rectForX = function(x) {
-    return null;
-};
-
-// Reports valid angles through which X value encloses (only valid for pie charts)
-PlotKit.Layout.prototype.angleRangeForX = function(x) {
-    return null;
-};
-
-// --------------------------------------------------------------------
-// START Internal Functions
-// --------------------------------------------------------------------
-
-PlotKit.Layout.prototype._evaluateLimits = function() {
-    // take all values from all datasets and find max and min
-    var map = MochiKit.Base.map;
-    var items = MochiKit.Base.items;
-    var itemgetter = MochiKit.Base.itemgetter;
-    var collapse = PlotKit.Base.collapse;
-    var listMin = MochiKit.Base.listMin;
-    var listMax = MochiKit.Base.listMax;
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-
-    var all = collapse(map(itemgetter(1), items(this.datasets)));
-
-    if (isNil(this.options.xAxis)) {
-        if (this.options.xOriginIsZero)
-            this.minxval = 0;
-        else
-            this.minxval = listMin(map(parseFloat, map(itemgetter(0), all)));
-    }
-    
-    if (isNil(this.options.yAxis)) {
-        if (this.options.yOriginIsZero)
-            this.minyval = 0;
-        else
-            this.minyval = listMin(map(parseFloat, map(itemgetter(1), all)));
-    }
-
-    this.maxxval = listMax(map(parseFloat, map(itemgetter(0), all)));
-    this.maxyval = listMax(map(parseFloat, map(itemgetter(1), all)));
-};
-
-PlotKit.Layout.prototype._evaluateScales = function() {
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-
-    this.xrange = this.maxxval - this.minxval;
-    if (this.xrange == 0)
-        this.xscale = 1.0;
-    else
-        this.xscale = 1/this.xrange;
-
-    this.yrange = this.maxyval - this.minyval;
-    if (this.yrange == 0)
-        this.yscale = 1.0;
-    else
-        this.yscale = 1/this.yrange;
-};
-
-PlotKit.Layout.prototype._uniqueXValues = function() {
-    var collapse = PlotKit.Base.collapse;
-    var map = MochiKit.Base.map;
-    var uniq = PlotKit.Base.uniq;
-    var getter = MochiKit.Base.itemgetter;
-
-    var xvalues = map(parseFloat, map(getter(0), collapse(map(getter(1), items(this.datasets)))));
-    xvalues.sort(MochiKit.Base.compare);
-    return uniq(xvalues);
-};
-
-// Create the bars
-PlotKit.Layout.prototype._evaluateBarCharts = function() {
-    var keys = MochiKit.Base.keys;
-    var items = MochiKit.Base.items;
-
-    var setCount = keys(this.datasets).length;
-
-    // work out how far separated values are
-    var xdelta = 10000000;
-    var xvalues = this._uniqueXValues();
-    for (var i = 1; i < xvalues.length; i++) {
-        xdelta = Math.min(Math.abs(xvalues[i] - xvalues[i-1]), xdelta);
-    }
-
-    var barWidth = 0;
-    var barWidthForSet = 0;
-    var barMargin = 0;
-    if (xvalues.length == 1) {
-        // note we have to do something smarter if we only plot one value
-        xdelta = 1.0;
-        this.xscale = 1.0;
-        this.minxval = xvalues[0];
-        barWidth = 1.0 * this.options.barWidthFillFraction;
-        barWidthForSet = barWidth/setCount;
-        barMargin = (1.0 - this.options.barWidthFillFraction)/2;
-    }
-    else {
-        // readjust xscale to fix with bar charts
-        this.xscale = (1.0 - xdelta/this.xrange)/this.xrange;
-        barWidth = xdelta * this.xscale * this.options.barWidthFillFraction;
-        barWidthForSet = barWidth / setCount;
-        barMargin = xdelta * this.xscale * (1.0 - this.options.barWidthFillFraction)/2;
-    }
-
-    this.minxdelta = xdelta; // need this for tick positions
-
-    // add all the rects
-    this.bars = new Array();
-    var i = 0;
-    for (var setName in this.datasets) {
-        var dataset = this.datasets[setName];
-        for (var j = 0; j < dataset.length; j++) {
-            var item = dataset[j];
-            var rect = {
-                x: ((parseFloat(item[0]) - this.minxval) * this.xscale) + (i * barWidthForSet) + barMargin,
-                y: 1.0 - ((parseFloat(item[1]) - this.minyval) * this.yscale),
-                w: barWidthForSet,
-                h: ((parseFloat(item[1]) - this.minyval) * this.yscale),
-                xval: parseFloat(item[0]),
-                yval: parseFloat(item[1]),
-                name: setName
-            };
-            this.bars.push(rect);
-        }
-        i++;
-    }
-};
-
-
-// Create the line charts
-PlotKit.Layout.prototype._evaluateLineCharts = function() {
-    var keys = MochiKit.Base.keys;
-    var items = MochiKit.Base.items;
-
-    var setCount = keys(this.datasets).length;
-
-    // add all the rects
-    this.points = new Array();
-    var i = 0;
-    for (var setName in this.datasets) {
-        var dataset = this.datasets[setName];
-        dataset.sort(function(a, b) { return compare(parseFloat(a[0]), parseFloat(b[0])); });
-        for (var j = 0; j < dataset.length; j++) {
-            var item = dataset[j];
-            var point = {
-                x: ((parseFloat(item[0]) - this.minxval) * this.xscale),
-                y: 1.0 - ((parseFloat(item[1]) - this.minyval) * this.yscale),
-                xval: parseFloat(item[0]),
-                yval: parseFloat(item[1]),
-                name: setName
-            };
-            this.points.push(point);
-        }
-        i++;
-    }
-};
-
-// Create the pie charts
-PlotKit.Layout.prototype._evaluatePieCharts = function() {
-    var items = MochiKit.Base.items;
-    var sum = MochiKit.Iter.sum;
-    var getter = MochiKit.Base.itemgetter;
-
-    var setCount = keys(this.datasets).length;
-
-    // we plot the y values of the first dataset
-    var dataset = items(this.datasets)[0][1];
-    var total = sum(map(getter(1), dataset));
-
-    this.slices = new Array();
-    var currentAngle = 0.0;
-    for (var i = 0; i < dataset.length; i++) {
-        var fraction = dataset[i][1] / total;
-		var startAngle = currentAngle * Math.PI * 2;
-		var endAngle = (currentAngle + fraction) * Math.PI * 2;
-			
-        var slice = {fraction: fraction,
-                     xval: dataset[i][0],
-                     yval: dataset[i][1],
-                     startAngle: startAngle,
-                     endAngle: endAngle
-        };
-        this.slices.push(slice);
-        currentAngle += fraction;
-    }
-};
-
-PlotKit.Layout.prototype._evaluateLineTicksForXAxis = function() {
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-    
-    if (this.options.xTicks) {
-        // we use use specified ticks with optional labels
-
-        this.xticks = new Array();
-        var makeTicks = function(tick) {
-            var label = tick.label;
-            if (isNil(label))
-                label = tick.v.toString();
-            var pos = this.xscale * (tick.v - this.minxval);
-            this.xticks.push([pos, label]);
-        };
-        MochiKit.Iter.forEach(this.options.xTicks, bind(makeTicks, this));
-    }
-    else if (this.options.xNumberOfTicks) {
-        // we use defined number of ticks as hint to auto generate
-        var xvalues = this._uniqueXValues();
-        var roughSeparation = this.xrange / this.options.xNumberOfTicks;
-        var tickCount = 0;
-
-        this.xticks = new Array();
-        for (var i = 0; i <= xvalues.length; i++) {
-            if (xvalues[i] >= (tickCount) * roughSeparation) {
-                var pos = this.xscale * (xvalues[i] - this.minxval);
-                if ((pos > 1.0) || (pos < 0.0))
-                    return;
-                this.xticks.push([pos, xvalues[i]]);
-                tickCount++;
-            }
-            if (tickCount > this.options.xNumberOfTicks)
-                break;
-        }
-    }
-};
-
-PlotKit.Layout.prototype._evaluateLineTicksForYAxis = function() {
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-
-
-    if (this.options.yTicks) {
-        this.yticks = new Array();
-        var makeTicks = function(tick) {
-            var label = tick.label;
-            if (isNil(label))
-                label = tick.v.toString();
-            var pos = 1.0 - (this.yscale * (tick.v + this.minxval));
-            if ((pos < 0.0) || (pos > 1.0))
-                return;
-            this.yticks.push([pos, label]);
-        };
-        MochiKit.Iter.forEach(this.options.yTicks, bind(makeTicks, this));
-    }
-    else if (this.options.yNumberOfTicks) {
-        // We use the optionally defined number of ticks as a guide        
-        this.yticks = new Array();
-
-        // if we get this separation right, we'll have good looking graphs
-        var roundInt = PlotKit.Base.roundInterval;
-        var prec = this.options.yTickPrecision;
-        var roughSeparation = roundInt(this.yrange, 
-                                       this.options.yNumberOfTicks,
-                                       this.options.yTickPrecision);
-
-        for (var i = 0; i <= this.options.yNumberOfTicks; i++) {
-            var yval = this.minyval + (i * roughSeparation);
-            var pos = 1.0 - ((yval - this.minyval) * this.yscale);
-            this.yticks.push([pos, MochiKit.Format.roundToFixed(yval, 1)]);
-        }
-    }
-};
-
-PlotKit.Layout.prototype._evaluateLineTicks = function() {
-    this._evaluateLineTicksForXAxis();
-    this._evaluateLineTicksForYAxis();
-};
-
-PlotKit.Layout.prototype._evaluateBarTicks = function() {
-    this._evaluateLineTicks();
-    var centerInBar = function(tick) {
-        return [tick[0] + (this.minxdelta * this.xscale)/2, tick[1]];
-    };
-    this.xticks = MochiKit.Base.map(bind(centerInBar, this), this.xticks);
-};
-
-PlotKit.Layout.prototype._evaluatePieTicks = function() {
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-	var formatter = MochiKit.Format.numberFormatter("#%");
-
-    this.xticks = new Array();
-	if (this.options.xTicks) {
-		// make a lookup dict for x->slice values
-		var lookup = new Array();
-		for (var i = 0; i < this.slices.length; i++) {
-			lookup[this.slices[i].xval] = this.slices[i];
-		}
-		
-		for (var i =0; i < this.options.xTicks.length; i++) {
-			var tick = this.options.xTicks[i];
-			var slice = lookup[tick.v]; 
-            var label = tick.label;
-			if (slice) {
-                if (isNil(label))
-                    label = tick.v.toString();
-				label += " (" + formatter(slice.fraction) + ")";
-				this.xticks.push([tick.v, label]);
-			}
-		}
-	}
-	else {
-		// we make our own labels from all the slices
-		for (var i =0; i < this.slices.length; i++) {
-			var slice = this.slices[i];
-			var label = slice.xval + " (" + formatter(slice.fraction) + ")";
-			this.xticks.push([slice.xval, label]);
-		}
-	}
-};
-
-PlotKit.Layout.prototype._regenerateHitTestCache = function() {
-    this.hitTestCache.xvalues = this._uniqueXValues();
-    this.hitTestCache.xlookup = new Array();
-    this.hitTestCache.x2maxy = new Array();
-
-    var listMax = MochiKit.Base.listMax;
-    var itemgetter = MochiKit.Base.itemgetter;
-    var map = MochiKit.Base.map;
-
-    // generate a lookup table for x values to y values
-    var setNames = keys(this.datasets);
-    for (var i = 0; i < setNames.length; i++) {
-        var dataset = this.datasets[setNames[i]];
-        for (var j = 0; j < dataset.length; j++) {
-            var xval = dataset[j][0];
-            var yval = dataset[j][1];
-            if (this.hitTestCache.xlookup[xval])
-                this.hitTestCache.xlookup[xval].push([yval, setNames[i]]);
-            else 
-                this.hitTestCache.xlookup[xval] = [[yval, setNames[i]]];
-        }
-    }
-
-    for (var x in this.hitTestCache.xlookup) {
-        var yvals = this.hitTestCache.xlookup[x];
-        this.hitTestCache.x2maxy[x] = listMax(map(itemgetter(0), yvals));
-    }
-
-
-};
-
-// --------------------------------------------------------------------
-// END Internal Functions
-// --------------------------------------------------------------------
-
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/SVG.js b/trunk/activemq-web-console/src/main/webapp/js/plotkit/SVG.js
deleted file mode 100644
index ce2427c..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/SVG.js
+++ /dev/null
@@ -1,677 +0,0 @@
-/*
-    PlotKit SVG
-    ===========
-    SVG Renderer for PlotKit
-
-    Copyright
-    ---------
-    Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
-    For use under the BSD license. <http://www.liquidx.net/plotkit>
-*/
-
-// -------------------------------------------------------------------------
-// NOTES: - If you use XHTML1.1 strict, then you must include each MochiKit
-//          file individuall.
-//        - For IE support, you must include the AdobeSVG object hack.
-//          See tests/svg.html for details.
-// -------------------------------------------------------------------------
-// -------------------------------------------------------------------------
-// Check required components
-// -------------------------------------------------------------------------
-
-try {    
-    if (typeof(PlotKit.Layout) == 'undefined')
-    {
-        throw "";    
-    }
-} 
-catch (e) {    
-    throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Layout"
-}
-
-
-// ---------------------------------------------------------------------------
-//  SVG Renderer
-// ---------------------------------------------------------------------------
-
-PlotKit.SVGRenderer = function(element, layout, options) {
-    if (arguments.length > 0) 
-        this.__init__(element, layout, options);
-};
-
-PlotKit.SVGRenderer.NAME = "PlotKit.SVGRenderer";
-PlotKit.SVGRenderer.VERSION = PlotKit.VERSION;
-
-PlotKit.SVGRenderer.__repr__ = function() {
-    return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-PlotKit.SVGRenderer.toString = function() {
-    return this.__repr__();
-}
-
-PlotKit.SVGRenderer.isSupported = function() {
-    // TODO
-    return true;
-};
-
-PlotKit.SVGRenderer.prototype.__init__ = function(element, layout, options) {
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-
-    // default options
-    this.options = {
-        "drawBackground": true,
-        "backgroundColor": Color.whiteColor(),
-        "padding": {left: 30, right: 30, top: 5, bottom: 10},
-        "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),
-        "strokeColor": Color.whiteColor(),
-        "strokeColorTransform": "asStrokeColor",
-        "strokeWidth": 0.5,
-        "shouldFill": true,
-        "shouldStroke": true,
-        "drawXAxis": true,
-        "drawYAxis": true,
-        "axisLineColor": Color.blackColor(),
-        "axisLineWidth": 0.5,
-        "axisTickSize": 3,
-        "axisLabelColor": Color.blackColor(),
-        "axisLabelFont": "Arial",
-        "axisLabelFontSize": 9,
-        "axisLabelWidth": 50,
-        "axisLabelUseDiv": true,
-        "pieRadius": 0.4,
-        "enableEvents": true
-    };
-
-    MochiKit.Base.update(this.options, options ? options : {});
-    this.layout = layout;
-    this.style = layout.style;
-    this.element = MochiKit.DOM.getElement(element);
-    this.container = this.element.parentNode;
-    this.height = parseInt(this.element.getAttribute("height"));
-    this.width = parseInt(this.element.getAttribute("width"));
-    this.document = document;
-    this.root = this.element;
-
-    // Adobe SVG Support:
-    // - if an exception is thrown, then no Adobe SVG Plugin support.
-    try {
-        this.document = this.element.getSVGDocument();
-        this.root = isNil(this.document.documentElement) ? this.element : this.document.documentElement;
-    }
-    catch (e) {
-    }
-
-    this.element.style.zIndex = 1;
-
-    if (isNil(this.element))
-        throw "SVGRenderer() - passed SVG object is not found";
-
-    if (isNil(this.container) || this.container.nodeName.toLowerCase() != "div")
-        throw "SVGRenderer() - No DIV's around the SVG.";
-
-    // internal state
-    this.xlabels = new Array();
-    this.ylabels = new Array();
-
-    // initialise some meta structures in SVG
-    this.defs = this.createSVGElement("defs");
-
-    this.area = {
-        x: this.options.padding.left,
-        y: this.options.padding.top,
-        w: this.width - this.options.padding.left - this.options.padding.right,
-        h: this.height - this.options.padding.top - this.options.padding.bottom
-    };
-
-    MochiKit.DOM.updateNodeAttributes(this.container, 
-    {"style":{ "position": "relative", "width": this.width + "px"}});
-
-    
-};
-
-
-PlotKit.SVGRenderer.prototype.render = function() {
-    if (this.options.drawBackground)
-        this._renderBackground();
-
-    if (this.style == "bar") {
-        this._renderBarChart();
-        this._renderBarAxis();
-    }
-    else if (this.style == "pie") {
-        this._renderPieChart();
-        this._renderPieAxis();
-    }
-    else if (this.style == "line") {
-        this._renderLineChart();
-        this._renderLineAxis();
-    }
-};
-
-PlotKit.SVGRenderer.prototype._renderBarOrLine = function(data, plotFunc, startFunc, endFunc) {
-    
-    var colorCount = this.options.colorScheme.length;
-    var colorScheme = this.options.colorScheme;
-    var setNames = MochiKit.Base.keys(this.layout.datasets);
-    var setCount = setNames.length;
-
-    for (var i = 0; i < setCount; i++) {
-        var setName = setNames[i];
-        var attrs = new Array();
-        var color = colorScheme[i%colorCount];
-
-        if (this.options.shouldFill)
-            attrs["fill"] = color.toRGBString();
-        else
-            attrs["fill"] = "none";
-
-        if (this.options.shouldStroke && 
-            (this.options.strokeColor || this.options.strokeColorTransform)) {
-            if (this.options.strokeColor)
-                attrs["stroke"] = this.options.strokeColor.toRGBString();
-            else if (this.options.strokeColorTransform)
-                attrs["stroke"] = color[this.options.strokeColorTransform]().toRGBString();
-            attrs["strokeWidth"] = this.options.strokeWidth;
-        }
-
-        if (startFunc)
-            startFunc(attrs);
-
-        var forEachFunc = function(obj) {
-            if (obj.name == setName)
-                plotFunc(attrs, obj);
-        };                
-
-        MochiKit.Iter.forEach(data, bind(forEachFunc, this));
-        if (endFunc)
-            endFunc(attrs);
-    }
-};
-
-PlotKit.SVGRenderer.prototype._renderBarChart = function() {
-    var bind = MochiKit.Base.bind;
-
-    var drawRect = function(attrs, bar) {
-        var x = this.area.w * bar.x + this.area.x;
-        var y = this.area.h * bar.y + this.area.y;
-        var w = this.area.w * bar.w;
-        var h = this.area.h * bar.h;
-        this._drawRect(x, y, w, h, attrs);
-    };
-    this._renderBarOrLine(this.layout.bars, bind(drawRect, this));
-};
-
-PlotKit.SVGRenderer.prototype._renderLineChart = function() {
-    var bind = MochiKit.Base.bind;
-
-    var addPoint = function(attrs, point) {
-        this._tempPointsBuffer += (this.area.w * point.x + this.area.x) + "," +
-                                 (this.area.h * point.y + this.area.y) + " ";
-    };
-
-    var startLine = function(attrs) {
-        this._tempPointsBuffer = "";
-        this._tempPointsBuffer += (this.area.x) + "," + (this.area.y+this.area.h) + " ";
-    };
-
-    var endLine = function(attrs) {
-        this._tempPointsBuffer += (this.area.w + this.area.x) + ","  +(this.area.h + this.area.y);
-        attrs["points"] = this._tempPointsBuffer;
-        var elem = this.createSVGElement("polygon", attrs);
-        this.root.appendChild(elem);
-    };
-
-    this._renderBarOrLine(this.layout.points, 
-                          bind(addPoint, this), 
-                          bind(startLine, this), 
-                          bind(endLine, this));
-};
-
-
-PlotKit.SVGRenderer.prototype._renderPieChart = function() {
-    var colorCount = this.options.colorScheme.length;
-    var slices = this.layout.slices;
-
-    var centerx = this.area.x + this.area.w * 0.5;
-    var centery = this.area.y + this.area.h * 0.5;
-    var radius = Math.min(this.area.w * this.options.pieRadius, 
-                          this.area.h * this.options.pieRadius);
-
-    // NOTE NOTE!! Canvas Tag draws the circle clockwise from the y = 0, x = 1
-    // so we have to subtract 90 degrees to make it start at y = 1, x = 0
-
-	// workaround if we only have 1 slice of 100%
-	if (slices.length == 1 && (Math.abs(slices[0].startAngle) - Math.abs(slices[0].endAngle) < 0.1)) {
-        var attrs = {"cx": centerx , "cy": centery , "r": radius };
-        var color = this.options.colorScheme[0];
-        if (this.options.shouldFill)
-            attrs["fill"] = color.toRGBString();
-        else
-            attrs["fill"] = "none";
-
-        if (this.options.shouldStroke && 
-            (this.options.strokeColor || this.options.strokeColorTransform)) {
-            if (this.options.strokeColor)
-                attrs["stroke"] = this.options.strokeColor.toRGBString();
-            else if (this.options.strokeColorTransform)
-                attrs["stroke"] = color[this.options.strokeColorTransform]().toRGBString();
-            attrs["style"] = "stroke-width: " + this.options.strokeWidth;
-        }
-
-        this.root.appendChild(this.createSVGElement("circle", attrs));
-        return;
-	}
-
-    for (var i = 0; i < slices.length; i++) {
-        var attrs = new Array();
-        var color = this.options.colorScheme[i%colorCount];
-        if (this.options.shouldFill)
-            attrs["fill"] = color.toRGBString();
-        else
-            attrs["fill"] = "none";
-
-        if (this.options.shouldStroke &&
-            (this.options.strokeColor || this.options.strokeColorTransform)) {
-            if (this.options.strokeColor)
-                attrs["stroke"] = this.options.strokeColor.toRGBString();
-            else if (this.options.strokeColorTransform)
-                attrs["stroke"] = color[this.options.strokeColorTransform]().toRGBString();
-            attrs["style"] = "stroke-width:" + this.options.strokeWidth;
-        }
-
-        var largearc = 0;
-        if (Math.abs(slices[i].endAngle - slices[i].startAngle) > Math.PI)
-            largearc = 1;
-        var x1 = Math.cos(slices[i].startAngle - Math.PI/2) * radius;
-        var y1 = Math.sin(slices[i].startAngle - Math.PI/2) * radius;
-        var x2 = Math.cos(slices[i].endAngle - Math.PI/2) * radius;
-        var y2 = Math.sin(slices[i].endAngle - Math.PI/2) * radius;
-        var rx = x2 - x1;
-        var ry = y2 - y1;
-
-        var pathString = "M" + centerx + "," + centery + " ";       
-        pathString += "l" + x1 + "," + y1 + " ";
-        pathString += "a" + radius + "," + radius + " 0 " + largearc + ",1 " + rx + "," + ry + " z";
-
-        attrs["d"] = pathString;
-
-        var elem = this.createSVGElement("path", attrs);
-        this.root.appendChild(elem);
-    }
-};
-
-PlotKit.SVGRenderer.prototype._renderBarAxis = function() {
-    this._renderAxis();
-}
-
-PlotKit.SVGRenderer.prototype._renderLineAxis = function() {
-    this._renderAxis();
-};
-
-
-PlotKit.SVGRenderer.prototype._renderAxis = function() {
-
-    if (!this.options.drawXAxis && !this.options.drawYAxis)
-        return;
-
-    var labelStyle = {"style":
-         {"position": "absolute",
-          "textAlign": "center",
-          "fontSize": this.options.axisLabelFontSize + "px",
-          "zIndex": 10,
-          "color": this.options.axisLabelColor.toRGBString(),
-          "width": this.options.axisLabelWidth + "px",
-          "overflow": "hidden"
-         }
-    };
-
-    // axis lines
-    var lineAttrs = {
-        "stroke": this.options.axisLineColor.toRGBString(),
-        "strokeWidth": this.options.axisLineWidth
-    };
-    
-
-    if (this.options.drawYAxis) {
-        if (this.layout.yticks) {
-            var drawTick = function(tick) {
-                var x = this.area.x;
-                var y = this.area.y + tick[0] * this.area.h;
-                this._drawLine(x, y, x - 3, y, lineAttrs);
-                
-                if (this.options.axisLabelUseDiv) {
-                    var label = DIV(labelStyle, tick[1]);
-                    label.style.top = (y - this.options.axisLabelFontSize) + "px";
-                    label.style.left = (x - this.options.padding.left + this.options.axisTickSize) + "px";
-                    label.style.textAlign = "left";
-                    label.style.width = (this.options.padding.left - 3) + "px";
-                    MochiKit.DOM.appendChildNodes(this.container, label);
-                    this.ylabels.push(label);
-                }
-                else {
-                    var attrs = {
-                        y: y + 3,
-                        x: (x - this.options.padding.left + 3),
-                        width: (this.options.padding.left - this.options.axisTickSize) + "px",
-                        height: (this.options.axisLabelFontSize + 3) + "px",
-                        fontFamily: "Arial",
-                        fontSize: this.options.axisLabelFontSize + "px",
-                        fill: this.options.axisLabelColor.toRGBString()
-                    };
-                    
-                    /* we can do clipping just like DIVs
-                    http://www.xml.com/pub/a/2004/06/02/svgtype.html */
-                    /*
-                    var mask = this.createSVGElement("mask", {id: "mask" + tick[0]});
-                    var maskShape = this.createSVGElement("rect",
-                        {y: y + 3,
-                         x: (x - this.options.padding.left + 3),
-                         width: (this.options.padding.left - this.options.axisTickSize) + "px",
-                         height: (this.options.axisLabelFontSize + 3) + "px",
-                         style: {"fill": "#ffffff", "stroke": "#000000"}});
-                    mask.appendChild(maskShape);
-                    this.defs.appendChild(mask);
-                    
-                    attrs["filter"] = "url(#mask" + tick[0] + ")";
-                    */
-                    
-                    var label = this.createSVGElement("text", attrs);
-                    label.appendChild(this.document.createTextNode(tick[1]));
-                    this.root.appendChild(label);
-                }
-            };
-            
-            MochiKit.Iter.forEach(this.layout.yticks, bind(drawTick, this));
-        }
-
-        this._drawLine(this.area.x, this.area.y, this.area.x, this.area.y + this.area.h, lineAttrs);
-    }
-
-    if (this.options.drawXAxis) {
-        if (this.layout.xticks) {
-            var drawTick = function(tick) {
-                var x = this.area.x + tick[0] * this.area.w;
-                var y = this.area.y + this.area.h;
-                this._drawLine(x, y, x, y + this.options.axisTickSize, lineAttrs);
-
-                if (this.options.axisLabelUseDiv) {
-                    var label = DIV(labelStyle, tick[1]);
-                    label.style.top = (y + this.options.axisTickSize) + "px";
-                    label.style.left = (x - this.options.axisLabelWidth/2) + "px";
-                    label.style.textAlign = "center";
-                    label.style.width = this.options.axisLabelWidth + "px";
-                    MochiKit.DOM.appendChildNodes(this.container, label);
-                    this.xlabels.push(label);
-                }
-                else {
-                    var attrs = {
-                        y: (y + this.options.axisTickSize + this.options.axisLabelFontSize),
-                        x: x - 3,
-                        width: this.options.axisLabelWidth + "px",
-                        height: (this.options.axisLabelFontSize + 3) + "px",
-                        fontFamily: "Arial",
-                        fontSize: this.options.axisLabelFontSize + "px",
-                        fill: this.options.axisLabelColor.toRGBString(),
-                        textAnchor: "middle"
-                    };
-                    var label = this.createSVGElement("text", attrs);
-                    label.appendChild(this.document.createTextNode(tick[1]));
-                    this.root.appendChild(label);
-                }
-            };
-            
-            MochiKit.Iter.forEach(this.layout.xticks, bind(drawTick, this));
-        }
-
-        this._drawLine(this.area.x, this.area.y + this.area.h, this.area.x + this.area.w, this.area.y + this.area.h, lineAttrs)
-    }
-};
-
-PlotKit.SVGRenderer.prototype._renderPieAxis = function() {
-
-    if (this.layout.xticks) {
-        // make a lookup dict for x->slice values
-        var lookup = new Array();
-        for (var i = 0; i < this.layout.slices.length; i++) {
-            lookup[this.layout.slices[i].xval] = this.layout.slices[i];
-        }
-        
-        var centerx = this.area.x + this.area.w * 0.5;
-        var centery = this.area.y + this.area.h * 0.5;
-        var radius = Math.min(this.area.w * this.options.pieRadius + 10, 
-                              this.area.h * this.options.pieRadius + 10);
-        var labelWidth = this.options.axisLabelWidth;
-        
-        for (var i = 0; i < this.layout.xticks.length; i++) {
-            var slice = lookup[this.layout.xticks[i][0]];
-            if (MochiKit.Base.isUndefinedOrNull(slice))
-                continue;
-                
-                
-            var angle = (slice.startAngle + slice.endAngle)/2;
-            // normalize the angle
-            var normalisedAngle = angle;
-            if (normalisedAngle > Math.PI * 2)
-                normalisedAngle = normalisedAngle - Math.PI * 2;
-            else if (normalisedAngle < 0)
-                normalisedAngle = normalisedAngle + Math.PI * 2;
-                
-            var labelx = centerx + Math.sin(normalisedAngle) * (radius + 10);
-            var labely = centery - Math.cos(normalisedAngle) * (radius + 10);
-
-            var attrib = {
-                "position": "absolute",
-                 "zIndex": 11,
-                "width": labelWidth + "px",
-                "fontSize": this.options.axisLabelFontSize + "px",
-                "overflow": "hidden",
-                "color": this.options.axisLabelColor.toHexString()
-            };
-
-            var svgattrib = {
-                "width": labelWidth + "px",
-                "fontSize": this.options.axisLabelFontSize + "px",
-                "height": (this.options.axisLabelFontSize + 3) + "px",
-                "fill": this.options.axisLabelColor.toRGBString()
-            };
-
-            if (normalisedAngle <= Math.PI * 0.5) {
-                // text on top and align left
-                MochiKit.Base.update(attrib, {
-                    'textAlign': 'left', 'verticalAlign': 'top',
-                    'left': labelx + 'px',
-                    'top':  (labely - this.options.axisLabelFontSize) + "px"
-                });
-                MochiKit.Base.update(svgattrib, {
-                    "x": labelx,
-                    "y" :(labely - this.options.axisLabelFontSize),
-                    "textAnchor": "left"
-                        });
-            }
-            else if ((normalisedAngle > Math.PI * 0.5) && (normalisedAngle <= Math.PI)) {
-                // text on bottom and align left
-                MochiKit.Base.update(attrib, {
-                    'textAlign': 'left', 'verticalAlign': 'bottom',
-                    'left': labelx + 'px',
-                    'top':  labely + "px"
-                });
-                MochiKit.Base.update(svgattrib, {
-                    'textAnchor': 'left',
-                    'x': labelx,
-                    'y':  labely
-                });
-            }
-            else if ((normalisedAngle > Math.PI) && (normalisedAngle <= Math.PI*1.5)) {
-                // text on bottom and align right
-                MochiKit.Base.update(attrib, {
-                    'textAlign': 'right', 'verticalAlign': 'bottom',
-                    'left': labelx + 'px',
-                    'top':  labely + "px"
-                });
-                MochiKit.Base.update(svgattrib, {
-                    'textAnchor': 'right',
-                    'x': labelx - labelWidth,
-                    'y':  labely
-                });
-            }
-            else {
-                // text on top and align right
-                MochiKit.Base.update(attrib, {
-                    'textAlign': 'left', 'verticalAlign': 'bottom',
-                    'left': labelx + 'px',
-                    'top':  labely + "px"
-                });
-                MochiKit.Base.update(svgattrib, {
-                    'textAnchor': 'left',
-                    'x': labelx - labelWidth,
-                    'y':  labely - this.options.axisLabelFontSize
-                });
-            }
-
-            if (this.options.axisLabelUseDiv) {
-                var label = DIV({'style': attrib}, this.layout.xticks[i][1]);
-                this.xlabels.push(label);
-                MochiKit.DOM.appendChildNodes(this.container, label);
-            }
-            else {
-                var label = this.createSVGElement("text", svgattrib);
-                label.appendChild(this.document.createTextNode(this.layout.xticks[i][1]))
-                this.root.appendChild(label);
-            }
-      }
-        
-    }
-};
-
-PlotKit.SVGRenderer.prototype._renderBackground = function() {
-    var opts = {"stroke": "none",
-                  "fill": this.options.backgroundColor.toRGBString()
-    };
-    this._drawRect(0, 0, this.width, this.height, opts);
-};
-
-PlotKit.SVGRenderer.prototype._drawRect = function(x, y, w, h, moreattrs) {
-    var attrs = {x: x + "px", y: y + "px", width: w + "px", height: h + "px"};
-    if (moreattrs)
-        MochiKit.Base.update(attrs, moreattrs);
-
-    var elem = this.createSVGElement("rect", attrs);
-    this.root.appendChild(elem);
-};
-
-PlotKit.SVGRenderer.prototype._drawLine = function(x1, y1, x2, y2, moreattrs) {
-    var attrs = {x1: x1 + "px", y1: y1 + "px", x2: x2 + "px", y2: y2 + "px"};
-    if (moreattrs)
-        MochiKit.Base.update(attrs, moreattrs);
-
-    var elem = this.createSVGElement("line", attrs);
-    this.root.appendChild(elem);
-}
-
-PlotKit.SVGRenderer.prototype.clear = function() {
-    while(this.element.firstChild) {
-        this.element.removeChild(this.element.firstChild);
-    }
-    
-    if (this.options.axisLabelUseDiv) {
-        for (var i = 0; i < this.xlabels.length; i++) {
-            MochiKit.DOM.removeElement(this.xlabels[i]);
-        }        
-        for (var i = 0; i < this.ylabels.length; i++) {
-            MochiKit.DOM.removeElement(this.ylabels[i]);
-        }            
-    }
-    this.xlabels = new Array();
-    this.ylabels = new Array();
-};
-
-PlotKit.SVGRenderer.prototype.createSVGElement = function(name, attrs) {
-    var isNil = MochiKit.Base.isUndefinedOrNull;
-    var elem;
-    var doc = isNil(this.document) ? document : this.document;
-
-    try {
-        elem = doc.createElementNS("http://www.w3.org/2000/svg", name);
-    }
-    catch (e) {
-        elem = doc.createElement(name);
-        elem.setAttribute("xmlns", "http://www.w3.org/2000/svg");
-    }
-
-    if (attrs)
-        MochiKit.DOM.updateNodeAttributes(elem, attrs);
-
-    // TODO: we don't completely emulate the MochiKit.DOM.createElement
-    //       as we don't care about nodes contained. We really should though.
-
-    return elem;
-
-};
-
-PlotKit.SVGRenderer.SVGNS = 'http://www.w3.org/2000/svg';
-
-PlotKit.SVGRenderer.SVG = function(attrs) {
-    // we have to do things differently for IE+AdobeSVG.
-    // My guess this works (via trial and error) is that we need to
-    // have an SVG object in order to use SVGDocument.createElementNS
-    // but IE doesn't allow us to that.
-
-    var ie = navigator.appVersion.match(/MSIE (\d\.\d)/);
-    var opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
-    if (ie && (ie[1] >= 6) && (!opera)) {
-        var width = attrs["width"] ? attrs["width"] : "100";
-        var height = attrs["height"] ? attrs["height"] : "100";
-        var eid = attrs["id"] ? attrs["id"] : "notunique";
-        
-        var html = '<svg:svg width="' + width + '" height="' + height + '" ';
-        html += 'id="' + eid + '" version="1.1" baseProfile="full">';
-
-        var canvas = document.createElement(html);
-
-        // create embedded SVG inside SVG.
-        var group = canvas.getSVGDocument().createElementNS(PlotKit.SVGRenderer.SVGNS, "svg");
-        group.setAttribute("width", width);
-        group.setAttribute("height", height);
-        canvas.getSVGDocument().appendChild(group);
-
-        return canvas;
-    }
-    else {
-        return PlotKit.SVGRenderer.prototype.createSVGElement("svg", attrs);
-    }
-};
-
-PlotKit.SVGRenderer.isSupported = function() {
-    var isOpera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
-    var ieVersion = navigator.appVersion.match(/MSIE (\d\.\d)/);
-    var safariVersion = navigator.userAgent.match(/AppleWebKit\/(\d+)/);
-    var operaVersion = navigator.userAgent.match(/Opera\/(\d*\.\d*)/);
-    var mozillaVersion = navigator.userAgent.match(/rv:(\d*\.\d*).*Gecko/);
-    
-
-    if (ieVersion && (ieVersion[1] >= 6) && !isOpera) {
-        var dummysvg = document.createElement('<svg:svg width="1" height="1" baseProfile="full" version="1.1" id="dummy">');
-        try {
-            dummysvg.getSVGDocument();
-            dummysvg = null;
-            return true;
-        }
-        catch (e) {
-            return false;
-        }
-    }
-    
-    /* support not really there yet. no text and paths are buggy
-    if (safariVersion && (safariVersion[1] > 419))
-        return true;
-    */
-
-    if (operaVersion && (operaVersion[1] > 8.9))
-        return true
-    
-    if (mozillaVersion && (mozillaVersion > 1.7))
-        return true;
-    
-    return false;
-};
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/SweetCanvas.js b/trunk/activemq-web-console/src/main/webapp/js/plotkit/SweetCanvas.js
deleted file mode 100644
index 07492ae..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/SweetCanvas.js
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
-    PlotKit Sweet Canvas Renderer
-    =============================
-    Canvas Renderer for PlotKit which looks pretty!
-
-    Copyright
-    ---------
-    Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
-    For use under the BSD license. <http://www.liquidx.net/plotkit>
-*/
-
-// -------------------------------------------------------------------------
-// Check required components
-// -------------------------------------------------------------------------
-
-try {    
-    if (typeof(PlotKit.CanvasRenderer) == 'undefined')
-    {
-        throw "";    
-    }
-} 
-catch (e) {    
-    throw "SweetCanvas depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, Canvas}"
-}
-
-
-if (typeof(PlotKit.SweetCanvasRenderer) == 'undefined') {
-    PlotKit.SweetCanvasRenderer = {};
-}
-
-PlotKit.SweetCanvasRenderer = function(element, layout, options) {
-    if (arguments.length > 0) {
-        this.__init__(element, layout, options);
-    }
-};
-
-PlotKit.SweetCanvasRenderer.NAME = "PlotKit.SweetCanvasRenderer";
-PlotKit.SweetCanvasRenderer.VERSION = PlotKit.VERSION;
-
-PlotKit.SweetCanvasRenderer.__repr__ = function() {
-    return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-PlotKit.SweetCanvasRenderer.toString = function() {
-    return this.__repr__();
-};
-
-// ---------------------------------------------------------------------
-// Subclassing Magic
-// ---------------------------------------------------------------------
-
-PlotKit.SweetCanvasRenderer.prototype = new PlotKit.CanvasRenderer();
-PlotKit.SweetCanvasRenderer.prototype.constructor = PlotKit.SweetCanvasRenderer;
-PlotKit.SweetCanvasRenderer.__super__ = PlotKit.CanvasRenderer.prototype;
-
-// ---------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------
-
-PlotKit.SweetCanvasRenderer.prototype.__init__ = function(el, layout, opts) { 
-    var moreOpts = PlotKit.Base.officeBlue();
-    MochiKit.Base.update(moreOpts, opts);
-    PlotKit.SweetCanvasRenderer.__super__.__init__.call(this, el, layout, moreOpts);
-};
-
-// ---------------------------------------------------------------------
-// Extended Plotting Functions
-// ---------------------------------------------------------------------
-
-PlotKit.SweetCanvasRenderer.prototype._renderBarChart = function() {
-    var bind = MochiKit.Base.bind;
-    var shadowColor = Color.blackColor().colorWithAlpha(0.1).toRGBString();
-
-    var prepareFakeShadow = function(context, x, y, w, h) {
-        context.fillStyle = shadowColor;
-        context.fillRect(x-2, y-2, w+4, h+2); 
-        context.fillStyle = shadowColor;
-        context.fillRect(x-1, y-1, w+2, h+1); 
-    };
-
-    var colorCount = this.options.colorScheme.length;
-    var colorScheme =  this.options.colorScheme;
-    var setNames = MochiKit.Base.keys(this.layout.datasets);
-    var setCount = setNames.length;
-
-    var chooseColor = function(name) {
-        for (var i = 0; i < setCount; i++) {
-            if (name == setNames[i])
-                return colorScheme[i%colorCount];
-        }
-        return colorScheme[0];
-    };
-
-    var drawRect = function(context, bar) {
-        var x = this.area.w * bar.x + this.area.x;
-        var y = this.area.h * bar.y + this.area.y;
-        var w = this.area.w * bar.w;
-        var h = this.area.h * bar.h;
-
-        if ((w < 1) || (h < 1))
-            return;        
-
-        context.save();
-
-        context.shadowBlur = 5.0;
-        context.shadowColor = Color.fromHexString("#888888").toRGBString();
-
-        if (this.isIE) {
-            context.save();
-            context.fillStyle = "#cccccc";
-            context.fillRect(x-2, y-2, w+4, h+2); 
-            context.restore();
-        }
-        else {
-            prepareFakeShadow(context, x, y, w, h);
-        }
-
-        context.fillStyle = chooseColor(bar.name).toRGBString();
-        context.fillRect(x, y, w, h);
-
-        context.shadowBlur = 0;
-        context.strokeStyle = Color.whiteColor().toRGBString();
-        context.lineWidth = 2.0;
-
-        context.strokeRect(x, y, w, h);                
-
-        context.restore();
-
-    };
-    this._renderBarChartWrap(this.layout.bars, bind(drawRect, this));
-};
-
-PlotKit.CanvasRenderer.prototype._renderLineChart = function() {
-    var context = this.element.getContext("2d");
-    var colorCount = this.options.colorScheme.length;
-    var colorScheme = this.options.colorScheme;
-    var setNames = MochiKit.Base.keys(this.layout.datasets);
-    var setCount = setNames.length;
-    var bind = MochiKit.Base.bind;
-
-
-    for (var i = 0; i < setCount; i++) {
-        var setName = setNames[i];
-        var color = colorScheme[i%colorCount];
-        var strokeX = this.options.strokeColorTransform;
-
-        // setup graphics context
-        context.save();
-        
-        // create paths
-        var makePath = function() {
-            context.beginPath();
-            context.moveTo(this.area.x, this.area.y + this.area.h);
-            var addPoint = function(context, point) {
-            if (point.name == setName)
-                context.lineTo(this.area.w * point.x + this.area.x,
-                               this.area.h * point.y + this.area.y);
-            };
-            MochiKit.Iter.forEach(this.layout.points, partial(addPoint, context), this);
-            context.lineTo(this.area.w + this.area.x,
-                           this.area.h + this.area.y);
-            context.lineTo(this.area.x, this.area.y + this.area.h);
-            context.closePath();
-        };
-
-        // faux shadow for firefox
-        context.save();
-        if (this.isIE) {
-            context.fillStyle = "#cccccc";
-        }
-        else {
-            context.fillStyle = Color.blackColor().colorWithAlpha(0.2).toRGBString();
-        }
-
-        context.translate(-1, -2);
-        bind(makePath, this)();        
-        context.fill();
-        context.restore();
-
-        context.shadowBlur = 5.0;
-        context.shadowColor = Color.fromHexString("#888888").toRGBString();
-        context.fillStyle = color.toRGBString();
-        context.lineWidth = 2.0;
-        context.strokeStyle = Color.whiteColor().toRGBString();
-
-        bind(makePath, this)();
-        context.fill();
-        bind(makePath, this)();
-        context.stroke();
-
-        context.restore();
-    }
-};
-
-PlotKit.CanvasRenderer.prototype._renderPieChart = function() {
-    var context = this.element.getContext("2d");
-
-    var colorCount = this.options.colorScheme.length;
-    var slices = this.layout.slices;
-
-    var centerx = this.area.x + this.area.w * 0.5;
-    var centery = this.area.y + this.area.h * 0.5;
-    var radius = Math.min(this.area.w * this.options.pieRadius, 
-                          this.area.h * this.options.pieRadius);
-
-    if (this.isIE) {
-        centerx = parseInt(centerx);
-        centery = parseInt(centery);
-        radius = parseInt(radius);
-    }
-
-	// NOTE NOTE!! Canvas Tag draws the circle clockwise from the y = 0, x = 1
-	// so we have to subtract 90 degrees to make it start at y = 1, x = 0
-
-    if (!this.isIE) {
-        context.save();
-        var shadowColor = Color.blackColor().colorWithAlpha(0.2);
-        context.fillStyle = shadowColor.toRGBString();
-        context.shadowBlur = 5.0;
-        context.shadowColor = Color.fromHexString("#888888").toRGBString();
-        context.translate(1, 1);
-        context.beginPath();
-        context.moveTo(centerx, centery);
-        context.arc(centerx, centery, radius + 2, 0, Math.PI*2, false);
-        context.closePath();
-        context.fill();
-        context.restore();
-    }
-
-    context.save();
-    context.strokeStyle = Color.whiteColor().toRGBString();
-    context.lineWidth = 2.0;    
-    for (var i = 0; i < slices.length; i++) {
-        var color = this.options.colorScheme[i%colorCount];
-        context.fillStyle = color.toRGBString();
-
-        var makePath = function() {
-            context.beginPath();
-            context.moveTo(centerx, centery);
-            context.arc(centerx, centery, radius, 
-                        slices[i].startAngle - Math.PI/2,
-                        slices[i].endAngle - Math.PI/2,
-                        false);
-            context.lineTo(centerx, centery);
-            context.closePath();
-        };
-
-        if (Math.abs(slices[i].startAngle - slices[i].endAngle) > 0.0001) {
-            makePath();
-            context.fill();
-            makePath();
-            context.stroke();
-        }
-    }
-    context.restore();
-};
-
-PlotKit.SweetCanvasRenderer.prototype._renderBackground = function() {
-    var context = this.element.getContext("2d");
-   
-    if (this.layout.style == "bar" || this.layout.style == "line") {
-        context.save();
-        context.fillStyle = this.options.backgroundColor.toRGBString();
-        context.fillRect(this.area.x, this.area.y, this.area.w, this.area.h);
-        context.strokeStyle = Color.whiteColor().toRGBString();
-        context.lineWidth = 1.0;
-        for (var i = 0; i < this.layout.yticks.length; i++) {
-            var y = this.layout.yticks[i][0] * this.area.h + this.area.y;
-            var x = this.area.x;
-            context.beginPath();
-            context.moveTo(x, y);
-            context.lineTo(x + this.area.w, y);
-            context.closePath();
-            context.stroke();
-        }
-        context.restore();
-    }
-    else {
-        PlotKit.SweetCanvasRenderer.__super__._renderBackground.call(this);
-    }
-};
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/SweetSVG.js b/trunk/activemq-web-console/src/main/webapp/js/plotkit/SweetSVG.js
deleted file mode 100644
index 6fd6d47..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/SweetSVG.js
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
-    PlotKit Sweet SVG Renderer
-    ==========================
-    SVG Renderer for PlotKit which looks pretty!
-
-    Copyright
-    ---------
-    Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
-    For use under the BSD license. <http://www.liquidx.net/plotkit>
-*/
-
-
-// -------------------------------------------------------------------------
-// Check required components
-// -------------------------------------------------------------------------
-
-try {    
-    if (typeof(PlotKit.SVGRenderer) == 'undefined')
-    {
-        throw "";    
-    }
-} 
-catch (e) {    
-    throw "SweetSVG depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, SVG}"
-}
-
-
-if (typeof(PlotKit.SweetSVGRenderer) == 'undefined') {
-    PlotKit.SweetSVGRenderer = {};
-}
-
-PlotKit.SweetSVGRenderer = function(element, layout, options) {
-    if (arguments.length > 0) {
-        this.__init__(element, layout, options);
-    }
-};
-
-PlotKit.SweetSVGRenderer.NAME = "PlotKit.SweetSVGRenderer";
-PlotKit.SweetSVGRenderer.VERSION = PlotKit.VERSION;
-
-PlotKit.SweetSVGRenderer.__repr__ = function() {
-    return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-PlotKit.SweetSVGRenderer.toString = function() {
-    return this.__repr__();
-};
-
-// ---------------------------------------------------------------------
-// Subclassing Magic
-// ---------------------------------------------------------------------
-
-PlotKit.SweetSVGRenderer.prototype = new PlotKit.SVGRenderer();
-PlotKit.SweetSVGRenderer.prototype.constructor = PlotKit.SweetSVGRenderer;
-PlotKit.SweetSVGRenderer.__super__ = PlotKit.SVGRenderer.prototype;
-
-// ---------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------
-
-PlotKit.SweetSVGRenderer.prototype.__init__ = function(element, layout, options) { 
-    var moreOpts = PlotKit.Base.officeBlue();
-    MochiKit.Base.update(moreOpts, options);
-    PlotKit.SweetSVGRenderer.__super__.__init__.call(this, element, layout, moreOpts);
-    //this._addDropShadowFilter();
-};
-
-PlotKit.SweetSVGRenderer.prototype._addDropShadowFilter = function() {
-    var filter = this.createSVGElement("filter", {x: 0, y: 0, "id":"dropShadow"});
-    var goffset = this.createSVGElement("feOffset",
-        {"in": "SourceGraphic", "dx": 0, "dy": 0, "result": "topCopy"});
-    var blur = this.createSVGElement("feGaussianBlur",
-        {"in": "SourceAlpha", "StdDeviation": 2, "result": "shadow"});
-    var soffset = this.createSVGElement("feOffset",
-        {"in": "shadow", "dx": -1, "dy": -2, "result":"movedShadow"});
-    var merge = this.createSVGElement("feMerge");
-    var gmerge = this.createSVGElement("feMergeNode", {"in":"topCopy"});
-    var smerge = this.createSVGElement("feMergeNode", {"in":"movedShadow"});
-    
-    merge.appendChild(gmerge);
-    merge.appendChild(smerge);
-    filter.appendChild(goffset);
-    filter.appendChild(blur);
-    filter.appendChild(soffset);
-    filter.appendChild(merge);
-    this.defs.appendChild(filter);
-};
-
-// ---------------------------------------------------------------------
-// Extended Plotting Functions
-// ---------------------------------------------------------------------
-
-PlotKit.SweetSVGRenderer.prototype._renderBarChart = function() {
-    var bind = MochiKit.Base.bind;
-    var shadowColor = Color.blackColor().toRGBString();
-    var shadowStyle = "fill:" + shadowColor + ";fill-opacity:0.15";
-    var strokeStyle = "stroke-width: 2.0; stroke:" + Color.whiteColor().toRGBString();
-    
-    var drawRect = function(attrs, bar) {
-        var x = this.area.w * bar.x + this.area.x;
-        var y = this.area.h * bar.y + this.area.y;
-        var w = this.area.w * bar.w;
-        var h = this.area.h * bar.h;
-
-        if ((w < 1) || (h < 1))
-            return;        
-
-        //attrs["filter"] = "url(#dropShadow)";
-        attrs["style"] = strokeStyle;
-        this._drawRect(x - 2, y - 1, w+4, h+2, {"style":shadowStyle});
-        this._drawRect(x, y, w, h, attrs);
-    };
-    this._renderBarOrLine(this.layout.bars, bind(drawRect, this));
-
-};
-
-PlotKit.SweetSVGRenderer.prototype._renderLineChart = function() {
-    var bind = MochiKit.Base.bind;
-    var shadowColor = Color.blackColor().toRGBString();
-    var shadowStyle = "fill:" + shadowColor + ";fill-opacity:0.15";
-    var strokeStyle = "stroke-width: 2.0; stroke:" + Color.whiteColor().toRGBString();
-
-    var addPoint = function(attrs, point) {
-        this._tempPointsBuffer += (this.area.w * point.x + this.area.x) + "," +
-                                 (this.area.h * point.y + this.area.y) + " ";
-    };
-
-    var startLine = function(attrs) {
-        this._tempPointsBuffer = "";
-        this._tempPointsBuffer += (this.area.x) + "," + (this.area.y+this.area.h) + " ";
-    };
-
-    var endLine = function(attrs) {
-        this._tempPointsBuffer += (this.area.w + this.area.x) + ","  +(this.area.h + this.area.y);
-        attrs["points"] = this._tempPointsBuffer;    
-            
-        attrs["stroke"] = "none";
-        attrs["transform"] = "translate(-2, -1)";
-        attrs["style"] = shadowStyle;
-        var shadow = this.createSVGElement("polygon", attrs);
-        this.root.appendChild(shadow);
-        
-        attrs["transform"] = "";
-        attrs["style"] = strokeStyle;
-        var elem = this.createSVGElement("polygon", attrs);
-        this.root.appendChild(elem);
-        
-       
-    };
-
-    this._renderBarOrLine(this.layout.points, 
-                             bind(addPoint, this), 
-                             bind(startLine, this), 
-                             bind(endLine, this));
-};
-
-PlotKit.SweetSVGRenderer.prototype._renderPieChart = function() {
-    var centerx = this.area.x + this.area.w * 0.5;
-    var centery = this.area.y + this.area.h * 0.5;
-    var shadowColor = Color.blackColor().toRGBString();
-    var radius = Math.min(this.area.w * this.options.pieRadius, 
-                          this.area.h * this.options.pieRadius);
-    var shadowStyle = "fill:" + shadowColor + ";fill-opacity:0.15";
-    
-    var shadow = this.createSVGElement("circle", 
-        {"style": shadowStyle, "cx": centerx + 1, "cy": centery + 1, "r": radius + 1});
-    this.root.appendChild(shadow);
-                             
-    PlotKit.SweetSVGRenderer.__super__._renderPieChart.call(this);
-};
-    
-
-PlotKit.SweetSVGRenderer.prototype._renderBackground = function() {
-    var attrs = {
-        "fill": this.options.backgroundColor.toRGBString(),
-        "stroke": "none"
-    };
-    
-
-    if (this.layout.style == "bar" || this.layout.style == "line") {
-        this._drawRect(this.area.x, this.area.y, 
-                       this.area.w, this.area.h, attrs);                
-        for (var i = 0; i < this.layout.yticks.length; i++) {
-            this._drawRect(this.area.x,
-                           this.layout.yticks[i][0] * this.area.h + this.area.y,
-                           this.area.w,
-                           1,
-                           {"fill": Color.whiteColor().toRGBString()});
-        }
-    }
-    else {
-        PlotKit.SweetSVGRenderer.__super__._renderBackground.call(this);
-        
-    }
-    
-};
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/dummy.svg b/trunk/activemq-web-console/src/main/webapp/js/plotkit/dummy.svg
deleted file mode 100644
index 722ec75..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/dummy.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-    Copyright
-    ---------
-    Copyright 2005,2006 (c) Alastair Tse <alastair^liquidx.net>
-    For use under the BSD license. <http://www.liquidx.net/plotkit>
--->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://web.resource.org/cc/"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink">
-</svg>
diff --git a/trunk/activemq-web-console/src/main/webapp/js/plotkit/iecanvas.htc b/trunk/activemq-web-console/src/main/webapp/js/plotkit/iecanvas.htc
deleted file mode 100644
index c89e437..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/plotkit/iecanvas.htc
+++ /dev/null
@@ -1,389 +0,0 @@
-/*----------------------------------------------------------------------------\
-|                                IE Canvas 1.0                                |
-|-----------------------------------------------------------------------------|
-|                          Created by Emil A Eklund                           |
-|                        (http://eae.net/contact/emil)                        |
-|-----------------------------------------------------------------------------|
-| Implementation of the canvas API for Internet Explorer. Uses VML.           |
-|-----------------------------------------------------------------------------|
-|                      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.                                                   |
-|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
-|                         http://eae.net/license/mit                          |
-|-----------------------------------------------------------------------------|
-| Dependencies: canvas.js           - For initialization of canvas elements   |
-|-----------------------------------------------------------------------------|
-| 2005-12-27 | Work started.                                                  |
-| 2005-12-29 | First version posted.                                          |
-| 2006-01-03 | Fixed bug in moveTo and lineTo,  arguments where not converted |
-|            | to int which could cause IE to enter an endless loop. Disabled |
-|            | antalias for fillRect to better comply with the Mozilla, Opera |
-|            | and possibly  Safari  implementations where  using fillRect is |
-|            | about the only way to raw non antialiased lines.               |
-|-----------------------------------------------------------------------------|
-| Created 2005-12-27 | All changes are in the log above. | Updated 2006-01-03 |
-\----------------------------------------------------------------------------*/
-
-<public:component>
-	<public:method name="getContext" />
-	<public:attach event="oncontentready" onevent="initCanvas()"/>
-</public:component>
-
-<script language="JScript">
-
-	function getContext() {
-		return element.context;
-	}
-
-	function initCanvas() {
-		element.context = new IECanvasContext();
-		element.style.position = 'relative';
-		element.style.display  = 'block';
-		element.style.overflow = 'hidden';
-	}
-
-
-
-	function IECanvasContext() {
-		this.fillStyle = 'black';
-		this.globalAlpha = 1.0;
-		this.globalCompositeOperation = '';
-		this.lineCap = '';
-		this.lineJoin = '';
-		this.lineWidth = '0';
-		this.miterLimit = '';
-		this.shadowBlur = '';
-		this.shadowColor = '';
-		this.shadowOffsetX = '';
-		this.shadowOffsetY = '';
-		this.strokeStyle = 'black';
-		this._path = '';
-		this._stateStack = new Array();
-		this._offsetX = 0;
-		this._offsetY = 0;
-		this._rotation = 0;
-	};
-
-	IECanvasContext.prototype.save = function() {
-		var o;
-
-		o = new Object();
-		this._copyState(this, o);
-		this._stateStack.push(o);
-	};
-
-	IECanvasContext.prototype.restore = function() {
-		var o, n;
-
-		n = this._stateStack.length - 1;
-		if (n < 0) { return; }
-
-		o = this._stateStack[n];
-		this._copyState(o, this);
-		this._stateStack.splice(n, 1);
-	};
-
-	IECanvasContext.prototype._copyState = function(oFrom, oTo) {
-		oTo.fillStyle     = oFrom.fillStyle;
-		oTo.lineCap       = oFrom.lineCap;
-		oTo.lineJoin      = oFrom.lineJoin;
-		oTo.lineWidth     = oFrom.lineWidth;
-		oTo.miterLimit    = oFrom.miterLimit;
-		oTo.shadowBlur    = oFrom.shadowBlur;
-		oTo.shadowColor   = oFrom.shadowColor;
-		oTo.shadowOffsetX = oFrom.shadowOffsetX;
-		oTo.shadowOffsetY = oFrom.shadowOffsetY;
-		oTo._offsetX      = oFrom._offsetX;
-		oTo._offsetY      = oFrom._offsetY;
-		oTo._rotation     = oFrom._rotation;
-	};
-
-	IECanvasContext.prototype.rotate = function(r) {
-		var MAX = Math.PI * 2;
-
-		this._rotation += r;
-		while (this._rotation > MAX) { this._rotation = MAX - this._rotation; }
-	};
-
-	IECanvasContext.prototype.scale = function() { };
-
-	IECanvasContext.prototype.translate = function(x, y) {
-		this._offsetX += x;
-		this._offsetY += y;
-	};
-
-	IECanvasContext.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
-		if (this._path) { this._path += ' '; }
-
-		this._path += 'qb' + cp1x + ',' + cp1y + ',' + cp2x + ',' + cp2y + ',' + x + ',' + y;
-	};
-
-
-	IECanvasContext.prototype.clip = function() { };
-
-	IECanvasContext.prototype.beginPath = function() {
-		this._path = '';
-	};
-
-	IECanvasContext.prototype.closePath = function() {
-		if (this._path) { this._path += ' '; }
-		this._path += 'x';
-	};
-
-	IECanvasContext.prototype.lineTo = function(x, y) {
-		if (this._path) { this._path += ' '; }
-		this._path += 'l' + parseInt(x) + ',' + parseInt(y);
-	};
-
-	IECanvasContext.prototype.moveTo = function(x, y) {
-		if (this._path) { this._path += ' '; }
-		this._path += 'm' + parseInt(x) + ',' + parseInt(y);
-	};
-
-	IECanvasContext.prototype.stroke = function() {
-		var o, s, cosa, sina, cx, cy, x, y;
-
-		if (!this._path) { return; }
-
-		this._path += ' e';
-
-		o = element.ownerDocument.createElement('v:shape');
-		o.fillColor = 'none';
-		o.filled = false;
-		o.strokeColor = this.strokeStyle;
-		o.stroked = true;
-		o.weight = this.lineWidth;
-		o.coordsize = element.offsetWidth + ',' + element.offsetHeight;
-		o.style.position = 'absolute';
-		o.style.left = this._offsetX;
-		o.style.top = this._offsetY;
-		o.style.width = element.offsetWidth;
-		o.style.height = element.offsetHeight;
-		o.path = this._path;
-
-		s = element.ownerDocument.createElement('v:stroke');
-		s.opacity = this.globalAlpha;
-		o.appendChild(s);
-
-		if (this._rotation) {
-			r = element.ownerDocument.createElement('v:group');
-			r.style.position = 'absolute';
-			r.style.left = 0;
-			r.style.top = 0;
-			r.style.width = element.offsetWidth;
-			r.style.height = element.offsetHeight;
-			r.coordsize = o.coordsize;
-			r.style.rotation = Math.round((this._rotation * 180) / Math.PI);
-			r.style.rotationCenter = '0,0';
-			r.appendChild(o);
-			element.appendChild(r);
-
-			cosa = Math.cos(this._rotation);
-			sina = Math.sin(this._rotation);
-			cx = element.offsetWidth / 2;
-			cy = element.offsetHeight / 2;
-
-			x = ( cx*(1-cosa) + cy*sina);
-			y = (-cx*sina     + cy*(1-cosa));
-
-			r.style.left = x * -1;
-			r.style.top = y * -1;
-		}
-		else { element.appendChild(o); }
-	};
-
-	IECanvasContext.prototype.fill = function() {
-		var o, f, r;
-
-		if (!this._path) { return; }
-
-		this._path += ' e';
-
-		o = element.ownerDocument.createElement('v:shape');
-		o.fillColor = this.fillStyle;
-		o.strokeColor = this.strokeStyle;
-		o.stroked = false;
-		o.weight = this.lineWidth;
-		o.coordsize = element.offsetWidth + ',' + element.offsetHeight;
-		o.style.position = 'absolute';
-		o.style.left = this._offsetX;
-		o.style.top = this._offsetY;
-		o.style.width = element.offsetWidth;
-		o.style.height = element.offsetHeight;
-		o.path = this._path;
-
-		f = element.ownerDocument.createElement('v:fill');
-		f.opacity = this.globalAlpha;
-		o.appendChild(f);
-
-		if (this._rotation) {
-			r = element.ownerDocument.createElement('v:group');
-			r.style.position = 'absolute';
-			r.style.left = 0;
-			r.style.top = 0;
-			r.style.width = element.offsetWidth;
-			r.style.height = element.offsetHeight;
-			r.coordsize = o.coordsize;
-			r.style.rotation = Math.round((this._rotation * 180) / Math.PI);
-			r.style.rotationCenter = '0,0';
-			r.appendChild(o);
-			element.appendChild(r);
-
-			cosa = Math.cos(this._rotation);
-			sina = Math.sin(this._rotation);
-			cx = (element.offsetWidth) / 2;
-			cy = (element.offsetHeight) / 2;
-			x = ( cx*(1-cosa) + cy*sina);
-			y = (-cx*sina     + cy*(1-cosa));
-
-			r.style.left = x * -1;
-			r.style.top = y * -1;
-		}
-		else { element.appendChild(o); }
-	};
-
-	IECanvasContext.prototype.arcTo = function(x1, y1, x2, y2, radius) {
-		// not implemented in gecko, not implemented here
-	};
-
-	IECanvasContext.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {
-		if (this._path) { this._path += ' '; }
-
-		this._path += 'qb' + cpx + ',' + cpy + ',' + x + ',' + y;
-	};
-
-	IECanvasContext.prototype.arc = function(x, y, radius, startAngle, endAngle, clockwise) {
-		var xi, yi, x1, y1, x2, y2, x3, y3, x4, y4;
-
-		if (this._path) { this._path += ' '; }
-
-		xi = parseFloat(x);
-		yi = parseFloat(y);
-
-        x1 = xi - radius;
-        y1 = yi - radius;
-        
-        x2 = xi + radius;
-        y2 = yi + radius;
-
-        if (clockwise) {
-            x3 = xi + (Math.cos(startAngle) * radius);
-            y3 = yi + (Math.sin(startAngle) * radius);
-
-            x4 = xi + (Math.cos(endAngle) * radius);
-            y4 = yi + (Math.sin(endAngle) * radius);
-        }
-        else {
-            x3 = xi + (Math.cos(endAngle) * radius);
-            y3 = yi + (Math.sin(endAngle) * radius);
-
-            x4 = xi + (Math.cos(startAngle) * radius);
-            y4 = yi + (Math.sin(startAngle) * radius);
-        }
-
-		x3 = Math.round(x3);
-		y3 = Math.round(y3);
-		x4 = Math.round(x4);
-		y4 = Math.round(y4);
-
-		this._path += 'ar' + x1 + ',' + y1 + ',' + x2 + ',' + y2 + ',' + x3 + ',' + y3 + ',' + x4 + ',' + y4;
-	};
-
-
-	IECanvasContext.prototype.rect = function(x, y, w, h) {
-		var x1, y1, x2, y2;
-
-		x2 = x + w;
-		y2 = y + h;
-
-		x1 = Math.round(x);
-		y1 = Math.round(y);
-		x2 = Math.round(x2);
-		y2 = Math.round(y2);
-
-		this._path += 'm' + x1 + ',' + y1;
-		this._path += ' l' + x2 + ',' + y1;
-		this._path += ' l' + x2 + ',' + y2;
-		this._path += ' l' + x1 + ',' + y2;
-		this._path += ' x'
-	};
-
-	IECanvasContext.prototype.strokeRect = function(x, y, w, h) {
-		var o, s;
-
-		o = element.ownerDocument.createElement('v:rect');
-		o.fillColor = 'none';
-		o.filled = false;
-		o.strokeColor = this.strokeStyle;
-		o.stroked = true;
-		o.weight = this.lineWidth;
-		o.style.position = 'absolute';
-		o.style.left = this._offsetX + x;
-		o.style.top = this._offsetY + y;
-		o.style.width = w;
-		o.style.height = h;
-
-		s = element.ownerDocument.createElement('v:fill');
-		s.opacity = this.globalAlpha;
-		o.appendChild(s);
-
-		element.appendChild(o);
-	};
-
-	IECanvasContext.prototype.clearRect = function(x, y, w, h) { };
-
-
-	IECanvasContext.prototype.fillRect = function(x, y, w, h) {
-		var o, f;
-		
-		if ((x == 0) && (y == 0) && (w == element.offsetWidth) && (h == element.offsetHeight) && (this._offsetX == 0) && (this._offsetY == 0) && (this.globalAlpha == 1)) {
-			while (element.firstChild) { element.removeChild(element.lastChild); }
-		}
-
-		o = element.ownerDocument.createElement('v:rect');
-		o.fillColor = this.fillStyle;
-		o.filled = true;
-		o.stroked = false;
-		o.weight = 0;
-		o.style.position = 'absolute';
-		o.style.left = this._offsetX + x;
-		o.style.top = this._offsetY + y;
-		o.style.width = w;
-		o.style.height = h;
-		o.style.antialias = 'false';
-
-		f = element.ownerDocument.createElement('v:fill');
-		f.opacity = this.globalAlpha;
-		o.appendChild(f);
-
-		element.appendChild(o);
-	};
-
-	IECanvasContext.prototype.addColorStop = function() { };
-	IECanvasContext.prototype.createLinearGradient = function() { };
-	IECanvasContext.prototype.createPattern = function() { };
-	IECanvasContext.prototype.createRadialGradient = function() { };
-
-	IECanvasContext.prototype.drawImage = function() { };
-	IECanvasContext.prototype.drawImageFromRect = function() { };
-
-</script>
diff --git a/trunk/activemq-web-console/src/main/webapp/js/prettify.js b/trunk/activemq-web-console/src/main/webapp/js/prettify.js
deleted file mode 100644
index 51b2430..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/prettify.js
+++ /dev/null
@@ -1,1424 +0,0 @@
-// Copyright (C) 2006 Google Inc.
-//
-// 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.
-
-
-/**
- * @fileoverview
- * some functions for browser-side pretty printing of code contained in html.
- *
- * The lexer should work on a number of languages including C and friends,
- * Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles.
- * It works passably on Ruby, PHP and Awk and a decent subset of Perl, but,
- * because of commenting conventions, doesn't work on Smalltalk, Lisp-like, or
- * CAML-like languages.
- *
- * If there's a language not mentioned here, then I don't know it, and don't
- * know whether it works.  If it has a C-like, Bash-like, or XML-like syntax
- * then it should work passably.
- *
- * Usage:
- * 1) include this source file in an html page via
- * <script type="text/javascript" src="/path/to/prettify.js"></script>
- * 2) define style rules.  See the example page for examples.
- * 3) mark the <pre> and <code> tags in your source with class=prettyprint.
- *    You can also use the (html deprecated) <xmp> tag, but the pretty printer
- *    needs to do more substantial DOM manipulations to support that, so some
- *    css styles may not be preserved.
- * That's it.  I wanted to keep the API as simple as possible, so there's no
- * need to specify which language the code is in.
- *
- * Change log:
- * cbeust, 2006/08/22
- *   Java annotations (start with "@") are now captured as literals ("lit")
- */
-
-// JSLint declarations
-/*global console, document, navigator, setTimeout, window */
-
-/**
- * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
- * UI events.
- * If set to {@code false}, {@code prettyPrint()} is synchronous.
- */
-window['PR_SHOULD_USE_CONTINUATION'] = true;
-
-/** the number of characters between tab columns */
-window['PR_TAB_WIDTH'] = 8;
-
-/** Walks the DOM returning a properly escaped version of innerHTML.
-  * @param {Node} node
-  * @param {Array.<string>} out output buffer that receives chunks of HTML.
-  */
-window['PR_normalizedHtml']
-
-/** Contains functions for creating and registering new language handlers.
-  * @type {Object}
-  */
-  = window['PR']
-
-/** Pretty print a chunk of code.
-  *
-  * @param {string} sourceCodeHtml code as html
-  * @return {string} code as html, but prettier
-  */
-  = window['prettyPrintOne']
-/** Find all the {@code <pre>} and {@code <code>} tags in the DOM with
-  * {@code class=prettyprint} and prettify them.
-  * @param {Function?} opt_whenDone if specified, called when the last entry
-  *     has been finished.
-  */
-  = window['prettyPrint'] = void 0;
-
-/** browser detection. @extern */
-window['_pr_isIE6'] = function () {
-  var isIE6 = navigator && navigator.userAgent &&
-      /\bMSIE 6\./.test(navigator.userAgent);
-  window['_pr_isIE6'] = function () { return isIE6; };
-  return isIE6;
-};
-
-
-(function () {
-  // Keyword lists for various languages.
-  var FLOW_CONTROL_KEYWORDS =
-      "break continue do else for if return while ";
-  var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " +
-      "double enum extern float goto int long register short signed sizeof " +
-      "static struct switch typedef union unsigned void volatile ";
-  var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " +
-      "new operator private protected public this throw true try ";
-  var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " +
-      "concept concept_map const_cast constexpr decltype " +
-      "dynamic_cast explicit export friend inline late_check " +
-      "mutable namespace nullptr reinterpret_cast static_assert static_cast " +
-      "template typeid typename typeof using virtual wchar_t where ";
-  var JAVA_KEYWORDS = COMMON_KEYWORDS +
-      "boolean byte extends final finally implements import instanceof null " +
-      "native package strictfp super synchronized throws transient ";
-  var CSHARP_KEYWORDS = JAVA_KEYWORDS +
-      "as base by checked decimal delegate descending event " +
-      "fixed foreach from group implicit in interface internal into is lock " +
-      "object out override orderby params partial readonly ref sbyte sealed " +
-      "stackalloc string select uint ulong unchecked unsafe ushort var ";
-  var JSCRIPT_KEYWORDS = COMMON_KEYWORDS +
-      "debugger eval export function get null set undefined var with " +
-      "Infinity NaN ";
-  var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " +
-      "goto if import last local my next no our print package redo require " +
-      "sub undef unless until use wantarray while BEGIN END ";
-  var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " +
-      "elif except exec finally from global import in is lambda " +
-      "nonlocal not or pass print raise try with yield " +
-      "False True None ";
-  var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" +
-      " defined elsif end ensure false in module next nil not or redo rescue " +
-      "retry self super then true undef unless until when yield BEGIN END ";
-  var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " +
-      "function in local set then until ";
-  var ALL_KEYWORDS = (
-      CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS +
-      PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS);
-
-  // token style names.  correspond to css classes
-  /** token style for a string literal */
-  var PR_STRING = 'str';
-  /** token style for a keyword */
-  var PR_KEYWORD = 'kwd';
-  /** token style for a comment */
-  var PR_COMMENT = 'com';
-  /** token style for a type */
-  var PR_TYPE = 'typ';
-  /** token style for a literal value.  e.g. 1, null, true. */
-  var PR_LITERAL = 'lit';
-  /** token style for a punctuation string. */
-  var PR_PUNCTUATION = 'pun';
-  /** token style for a punctuation string. */
-  var PR_PLAIN = 'pln';
-
-  /** token style for an sgml tag. */
-  var PR_TAG = 'tag';
-  /** token style for a markup declaration such as a DOCTYPE. */
-  var PR_DECLARATION = 'dec';
-  /** token style for embedded source. */
-  var PR_SOURCE = 'src';
-  /** token style for an sgml attribute name. */
-  var PR_ATTRIB_NAME = 'atn';
-  /** token style for an sgml attribute value. */
-  var PR_ATTRIB_VALUE = 'atv';
-
-  /**
-   * A class that indicates a section of markup that is not code, e.g. to allow
-   * embedding of line numbers within code listings.
-   */
-  var PR_NOCODE = 'nocode';
-
-  /** A set of tokens that can precede a regular expression literal in
-    * javascript.
-    * http://www.mozilla.org/js/language/js20/rationale/syntax.html has the full
-    * list, but I've removed ones that might be problematic when seen in
-    * languages that don't support regular expression literals.
-    *
-    * <p>Specifically, I've removed any keywords that can't precede a regexp
-    * literal in a syntactically legal javascript program, and I've removed the
-    * "in" keyword since it's not a keyword in many languages, and might be used
-    * as a count of inches.
-    *
-    * <p>The link a above does not accurately describe EcmaScript rules since
-    * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
-    * very well in practice.
-    *
-    * @private
-    */
-  var REGEXP_PRECEDER_PATTERN = function () {
-      var preceders = [
-          "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=",
-          "&=", "(", "*", "*=", /* "+", */ "+=", ",", /* "-", */ "-=",
-          "->", /*".", "..", "...", handled below */ "/", "/=", ":", "::", ";",
-          "<", "<<", "<<=", "<=", "=", "==", "===", ">",
-          ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[",
-          "^", "^=", "^^", "^^=", "{", "|", "|=", "||",
-          "||=", "~" /* handles =~ and !~ */,
-          "break", "case", "continue", "delete",
-          "do", "else", "finally", "instanceof",
-          "return", "throw", "try", "typeof"
-          ];
-      var pattern = '(?:^^|[+-]';
-      for (var i = 0; i < preceders.length; ++i) {
-        pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1');
-      }
-      pattern += ')\\s*';  // matches at end, and matches empty string
-      return pattern;
-      // CAVEAT: this does not properly handle the case where a regular
-      // expression immediately follows another since a regular expression may
-      // have flags for case-sensitivity and the like.  Having regexp tokens
-      // adjacent is not valid in any language I'm aware of, so I'm punting.
-      // TODO: maybe style special characters inside a regexp as punctuation.
-    }();
-
-  // Define regexps here so that the interpreter doesn't have to create an
-  // object each time the function containing them is called.
-  // The language spec requires a new object created even if you don't access
-  // the $1 members.
-  var pr_amp = /&/g;
-  var pr_lt = /</g;
-  var pr_gt = />/g;
-  var pr_quot = /\"/g;
-  /** like textToHtml but escapes double quotes to be attribute safe. */
-  function attribToHtml(str) {
-    return str.replace(pr_amp, '&amp;')
-        .replace(pr_lt, '&lt;')
-        .replace(pr_gt, '&gt;')
-        .replace(pr_quot, '&quot;');
-  }
-
-  /** escapest html special characters to html. */
-  function textToHtml(str) {
-    return str.replace(pr_amp, '&amp;')
-        .replace(pr_lt, '&lt;')
-        .replace(pr_gt, '&gt;');
-  }
-
-
-  var pr_ltEnt = /&lt;/g;
-  var pr_gtEnt = /&gt;/g;
-  var pr_aposEnt = /&apos;/g;
-  var pr_quotEnt = /&quot;/g;
-  var pr_ampEnt = /&amp;/g;
-  var pr_nbspEnt = /&nbsp;/g;
-  /** unescapes html to plain text. */
-  function htmlToText(html) {
-    var pos = html.indexOf('&');
-    if (pos < 0) { return html; }
-    // Handle numeric entities specially.  We can't use functional substitution
-    // since that doesn't work in older versions of Safari.
-    // These should be rare since most browsers convert them to normal chars.
-    for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
-      var end = html.indexOf(';', pos);
-      if (end >= 0) {
-        var num = html.substring(pos + 3, end);
-        var radix = 10;
-        if (num && num.charAt(0) === 'x') {
-          num = num.substring(1);
-          radix = 16;
-        }
-        var codePoint = parseInt(num, radix);
-        if (!isNaN(codePoint)) {
-          html = (html.substring(0, pos) + String.fromCharCode(codePoint) +
-                  html.substring(end + 1));
-        }
-      }
-    }
-
-    return html.replace(pr_ltEnt, '<')
-        .replace(pr_gtEnt, '>')
-        .replace(pr_aposEnt, "'")
-        .replace(pr_quotEnt, '"')
-        .replace(pr_ampEnt, '&')
-        .replace(pr_nbspEnt, ' ');
-  }
-
-  /** is the given node's innerHTML normally unescaped? */
-  function isRawContent(node) {
-    return 'XMP' === node.tagName;
-  }
-
-  function normalizedHtml(node, out) {
-    switch (node.nodeType) {
-      case 1:  // an element
-        var name = node.tagName.toLowerCase();
-        out.push('<', name);
-        for (var i = 0; i < node.attributes.length; ++i) {
-          var attr = node.attributes[i];
-          if (!attr.specified) { continue; }
-          out.push(' ');
-          normalizedHtml(attr, out);
-        }
-        out.push('>');
-        for (var child = node.firstChild; child; child = child.nextSibling) {
-          normalizedHtml(child, out);
-        }
-        if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
-          out.push('<\/', name, '>');
-        }
-        break;
-      case 2: // an attribute
-        out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"');
-        break;
-      case 3: case 4: // text
-        out.push(textToHtml(node.nodeValue));
-        break;
-    }
-  }
-
-  /**
-   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
-   * matches the union o the sets o strings matched d by the input RegExp.
-   * Since it matches globally, if the input strings have a start-of-input
-   * anchor (/^.../), it is ignored for the purposes of unioning.
-   * @param {Array.<RegExpr>} regexs non multiline, non-global regexs.
-   * @return {RegExp} a global regex.
-   */
-  function combinePrefixPatterns(regexs) {
-    var capturedGroupIndex = 0;
-
-    var needToFoldCase = false;
-    var ignoreCase = false;
-    for (var i = 0, n = regexs.length; i < n; ++i) {
-      var regex = regexs[i];
-      if (regex.ignoreCase) {
-        ignoreCase = true;
-      } else if (/[a-z]/i.test(regex.source.replace(
-                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
-        needToFoldCase = true;
-        ignoreCase = false;
-        break;
-      }
-    }
-
-    function decodeEscape(charsetPart) {
-      if (charsetPart.charAt(0) !== '\\') { return charsetPart.charCodeAt(0); }
-      switch (charsetPart.charAt(1)) {
-        case 'b': return 8;
-        case 't': return 9;
-        case 'n': return 0xa;
-        case 'v': return 0xb;
-        case 'f': return 0xc;
-        case 'r': return 0xd;
-        case 'u': case 'x':
-          return parseInt(charsetPart.substring(2), 16)
-              || charsetPart.charCodeAt(1);
-        case '0': case '1': case '2': case '3': case '4':
-        case '5': case '6': case '7':
-          return parseInt(charsetPart.substring(1), 8);
-        default: return charsetPart.charCodeAt(1);
-      }
-    }
-
-    function encodeEscape(charCode) {
-      if (charCode < 0x20) {
-        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
-      }
-      var ch = String.fromCharCode(charCode);
-      if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
-        ch = '\\' + ch;
-      }
-      return ch;
-    }
-
-    function caseFoldCharset(charSet) {
-      var charsetParts = charSet.substring(1, charSet.length - 1).match(
-          new RegExp(
-              '\\\\u[0-9A-Fa-f]{4}'
-              + '|\\\\x[0-9A-Fa-f]{2}'
-              + '|\\\\[0-3][0-7]{0,2}'
-              + '|\\\\[0-7]{1,2}'
-              + '|\\\\[\\s\\S]'
-              + '|-'
-              + '|[^-\\\\]',
-              'g'));
-      var groups = [];
-      var ranges = [];
-      var inverse = charsetParts[0] === '^';
-      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
-        var p = charsetParts[i];
-        switch (p) {
-          case '\\B': case '\\b':
-          case '\\D': case '\\d':
-          case '\\S': case '\\s':
-          case '\\W': case '\\w':
-            groups.push(p);
-            continue;
-        }
-        var start = decodeEscape(p);
-        var end;
-        if (i + 2 < n && '-' === charsetParts[i + 1]) {
-          end = decodeEscape(charsetParts[i + 2]);
-          i += 2;
-        } else {
-          end = start;
-        }
-        ranges.push([start, end]);
-        // If the range might intersect letters, then expand it.
-        if (!(end < 65 || start > 122)) {
-          if (!(end < 65 || start > 90)) {
-            ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
-          }
-          if (!(end < 97 || start > 122)) {
-            ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
-          }
-        }
-      }
-
-      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
-      // -> [[1, 12], [14, 14], [16, 17]]
-      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
-      var consolidatedRanges = [];
-      var lastRange = [NaN, NaN];
-      for (var i = 0; i < ranges.length; ++i) {
-        var range = ranges[i];
-        if (range[0] <= lastRange[1] + 1) {
-          lastRange[1] = Math.max(lastRange[1], range[1]);
-        } else {
-          consolidatedRanges.push(lastRange = range);
-        }
-      }
-
-      var out = ['['];
-      if (inverse) { out.push('^'); }
-      out.push.apply(out, groups);
-      for (var i = 0; i < consolidatedRanges.length; ++i) {
-        var range = consolidatedRanges[i];
-        out.push(encodeEscape(range[0]));
-        if (range[1] > range[0]) {
-          if (range[1] + 1 > range[0]) { out.push('-'); }
-          out.push(encodeEscape(range[1]));
-        }
-      }
-      out.push(']');
-      return out.join('');
-    }
-
-    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
-      // Split into character sets, escape sequences, punctuation strings
-      // like ('(', '(?:', ')', '^'), and runs of characters that do not
-      // include any of the above.
-      var parts = regex.source.match(
-          new RegExp(
-              '(?:'
-              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
-              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
-              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
-              + '|\\\\[0-9]+'  // a back-reference or octal escape
-              + '|\\\\[^ux0-9]'  // other escape sequence
-              + '|\\(\\?[:!=]'  // start of a non-capturing group
-              + '|[\\(\\)\\^]'  // start/emd of a group, or line start
-              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
-              + ')',
-              'g'));
-      var n = parts.length;
-
-      // Maps captured group numbers to the number they will occupy in
-      // the output or to -1 if that has not been determined, or to
-      // undefined if they need not be capturing in the output.
-      var capturedGroups = [];
-
-      // Walk over and identify back references to build the capturedGroups
-      // mapping.
-      var groupIndex;
-      for (var i = 0, groupIndex = 0; i < n; ++i) {
-        var p = parts[i];
-        if (p === '(') {
-          // groups are 1-indexed, so max group index is count of '('
-          ++groupIndex;
-        } else if ('\\' === p.charAt(0)) {
-          var decimalValue = +p.substring(1);
-          if (decimalValue && decimalValue <= groupIndex) {
-            capturedGroups[decimalValue] = -1;
-          }
-        }
-      }
-
-      // Renumber groups and reduce capturing groups to non-capturing groups
-      // where possible.
-      for (var i = 1; i < capturedGroups.length; ++i) {
-        if (-1 === capturedGroups[i]) {
-          capturedGroups[i] = ++capturedGroupIndex;
-        }
-      }
-      for (var i = 0, groupIndex = 0; i < n; ++i) {
-        var p = parts[i];
-        if (p === '(') {
-          ++groupIndex;
-          if (capturedGroups[groupIndex] === undefined) {
-            parts[i] = '(?:';
-          }
-        } else if ('\\' === p.charAt(0)) {
-          var decimalValue = +p.substring(1);
-          if (decimalValue && decimalValue <= groupIndex) {
-            parts[i] = '\\' + capturedGroups[groupIndex];
-          }
-        }
-      }
-
-      // Remove any prefix anchors so that the output will match anywhere.
-      // ^^ really does mean an anchored match though.
-      for (var i = 0, groupIndex = 0; i < n; ++i) {
-        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
-      }
-
-      // Expand letters to groupts to handle mixing of case-sensitive and
-      // case-insensitive patterns if necessary.
-      if (regex.ignoreCase && needToFoldCase) {
-        for (var i = 0; i < n; ++i) {
-          var p = parts[i];
-          var ch0 = p.charAt(0);
-          if (p.length >= 2 && ch0 === '[') {
-            parts[i] = caseFoldCharset(p);
-          } else if (ch0 !== '\\') {
-            // TODO: handle letters in numeric escapes.
-            parts[i] = p.replace(
-                /[a-zA-Z]/g,
-                function (ch) {
-                  var cc = ch.charCodeAt(0);
-                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
-                });
-          }
-        }
-      }
-
-      return parts.join('');
-    }
-
-    var rewritten = [];
-    for (var i = 0, n = regexs.length; i < n; ++i) {
-      var regex = regexs[i];
-      if (regex.global || regex.multiline) { throw new Error('' + regex); }
-      rewritten.push(
-          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
-    }
-
-    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
-  }
-
-  var PR_innerHtmlWorks = null;
-  function getInnerHtml(node) {
-    // inner html is hopelessly broken in Safari 2.0.4 when the content is
-    // an html description of well formed XML and the containing tag is a PRE
-    // tag, so we detect that case and emulate innerHTML.
-    if (null === PR_innerHtmlWorks) {
-      var testNode = document.createElement('PRE');
-      testNode.appendChild(
-          document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
-      PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
-    }
-
-    if (PR_innerHtmlWorks) {
-      var content = node.innerHTML;
-      // XMP tags contain unescaped entities so require special handling.
-      if (isRawContent(node)) {
-        content = textToHtml(content);
-      }
-      return content;
-    }
-
-    var out = [];
-    for (var child = node.firstChild; child; child = child.nextSibling) {
-      normalizedHtml(child, out);
-    }
-    return out.join('');
-  }
-
-  /** returns a function that expand tabs to spaces.  This function can be fed
-    * successive chunks of text, and will maintain its own internal state to
-    * keep track of how tabs are expanded.
-    * @return {function (string) : string} a function that takes
-    *   plain text and return the text with tabs expanded.
-    * @private
-    */
-  function makeTabExpander(tabWidth) {
-    var SPACES = '                ';
-    var charInLine = 0;
-
-    return function (plainText) {
-      // walk over each character looking for tabs and newlines.
-      // On tabs, expand them.  On newlines, reset charInLine.
-      // Otherwise increment charInLine
-      var out = null;
-      var pos = 0;
-      for (var i = 0, n = plainText.length; i < n; ++i) {
-        var ch = plainText.charAt(i);
-
-        switch (ch) {
-          case '\t':
-            if (!out) { out = []; }
-            out.push(plainText.substring(pos, i));
-            // calculate how much space we need in front of this part
-            // nSpaces is the amount of padding -- the number of spaces needed
-            // to move us to the next column, where columns occur at factors of
-            // tabWidth.
-            var nSpaces = tabWidth - (charInLine % tabWidth);
-            charInLine += nSpaces;
-            for (; nSpaces >= 0; nSpaces -= SPACES.length) {
-              out.push(SPACES.substring(0, nSpaces));
-            }
-            pos = i + 1;
-            break;
-          case '\n':
-            charInLine = 0;
-            break;
-          default:
-            ++charInLine;
-        }
-      }
-      if (!out) { return plainText; }
-      out.push(plainText.substring(pos));
-      return out.join('');
-    };
-  }
-
-  var pr_chunkPattern = new RegExp(
-      '[^<]+'  // A run of characters other than '<'
-      + '|<\!--[\\s\\S]*?--\>'  // an HTML comment
-      + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>'  // a CDATA section
-      + '|</?[a-zA-Z][^>]*>'  // a probable tag that should not be highlighted
-      + '|<',  // A '<' that does not begin a larger chunk
-      'g');
-  var pr_commentPrefix = /^<\!--/;
-  var pr_cdataPrefix = /^<\[CDATA\[/;
-  var pr_brPrefix = /^<br\b/i;
-  var pr_tagNameRe = /^<(\/?)([a-zA-Z]+)/;
-
-  /** split markup into chunks of html tags (style null) and
-    * plain text (style {@link #PR_PLAIN}), converting tags which are
-    * significant for tokenization (<br>) into their textual equivalent.
-    *
-    * @param {string} s html where whitespace is considered significant.
-    * @return {Object} source code and extracted tags.
-    * @private
-    */
-  function extractTags(s) {
-    // since the pattern has the 'g' modifier and defines no capturing groups,
-    // this will return a list of all chunks which we then classify and wrap as
-    // PR_Tokens
-    var matches = s.match(pr_chunkPattern);
-    var sourceBuf = [];
-    var sourceBufLen = 0;
-    var extractedTags = [];
-    if (matches) {
-      for (var i = 0, n = matches.length; i < n; ++i) {
-        var match = matches[i];
-        if (match.length > 1 && match.charAt(0) === '<') {
-          if (pr_commentPrefix.test(match)) { continue; }
-          if (pr_cdataPrefix.test(match)) {
-            // strip CDATA prefix and suffix.  Don't unescape since it's CDATA
-            sourceBuf.push(match.substring(9, match.length - 3));
-            sourceBufLen += match.length - 12;
-          } else if (pr_brPrefix.test(match)) {
-            // <br> tags are lexically significant so convert them to text.
-            // This is undone later.
-            sourceBuf.push('\n');
-            ++sourceBufLen;
-          } else {
-            if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) {
-              // A <span class="nocode"> will start a section that should be
-              // ignored.  Continue walking the list until we see a matching end
-              // tag.
-              var name = match.match(pr_tagNameRe)[2];
-              var depth = 1;
-              var j;
-              end_tag_loop:
-              for (j = i + 1; j < n; ++j) {
-                var name2 = matches[j].match(pr_tagNameRe);
-                if (name2 && name2[2] === name) {
-                  if (name2[1] === '/') {
-                    if (--depth === 0) { break end_tag_loop; }
-                  } else {
-                    ++depth;
-                  }
-                }
-              }
-              if (j < n) {
-                extractedTags.push(
-                    sourceBufLen, matches.slice(i, j + 1).join(''));
-                i = j;
-              } else {  // Ignore unclosed sections.
-                extractedTags.push(sourceBufLen, match);
-              }
-            } else {
-              extractedTags.push(sourceBufLen, match);
-            }
-          }
-        } else {
-          var literalText = htmlToText(match);
-          sourceBuf.push(literalText);
-          sourceBufLen += literalText.length;
-        }
-      }
-    }
-    return { source: sourceBuf.join(''), tags: extractedTags };
-  }
-
-  /** True if the given tag contains a class attribute with the nocode class. */
-  function isNoCodeTag(tag) {
-    return !!tag
-        // First canonicalize the representation of attributes
-        .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,
-                 ' $1="$2$3$4"')
-        // Then look for the attribute we want.
-        .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/);
-  }
-
-  /**
-   * Apply the given language handler to sourceCode and add the resulting
-   * decorations to out.
-   * @param {number} basePos the index of sourceCode within the chunk of source
-   *    whose decorations are already present on out.
-   */
-  function appendDecorations(basePos, sourceCode, langHandler, out) {
-    if (!sourceCode) { return; }
-    var job = {
-      source: sourceCode,
-      basePos: basePos
-    };
-    langHandler(job);
-    out.push.apply(out, job.decorations);
-  }
-
-  /** Given triples of [style, pattern, context] returns a lexing function,
-    * The lexing function interprets the patterns to find token boundaries and
-    * returns a decoration list of the form
-    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
-    * where index_n is an index into the sourceCode, and style_n is a style
-    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
-    * all characters in sourceCode[index_n-1:index_n].
-    *
-    * The stylePatterns is a list whose elements have the form
-    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
-    *
-    * Style is a style constant like PR_PLAIN, or can be a string of the
-    * form 'lang-FOO', where FOO is a language extension describing the
-    * language of the portion of the token in $1 after pattern executes.
-    * E.g., if style is 'lang-lisp', and group 1 contains the text
-    * '(hello (world))', then that portion of the token will be passed to the
-    * registered lisp handler for formatting.
-    * The text before and after group 1 will be restyled using this decorator
-    * so decorators should take care that this doesn't result in infinite
-    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
-    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
-    * '<script>foo()<\/script>', which would cause the current decorator to
-    * be called with '<script>' which would not match the same rule since
-    * group 1 must not be empty, so it would be instead styled as PR_TAG by
-    * the generic tag rule.  The handler registered for the 'js' extension would
-    * then be called with 'foo()', and finally, the current decorator would
-    * be called with '<\/script>' which would not match the original rule and
-    * so the generic tag rule would identify it as a tag.
-    *
-    * Pattern must only match prefixes, and if it matches a prefix, then that
-    * match is considered a token with the same style.
-    *
-    * Context is applied to the last non-whitespace, non-comment token
-    * recognized.
-    *
-    * Shortcut is an optional string of characters, any of which, if the first
-    * character, gurantee that this pattern and only this pattern matches.
-    *
-    * @param {Array} shortcutStylePatterns patterns that always start with
-    *   a known character.  Must have a shortcut string.
-    * @param {Array} fallthroughStylePatterns patterns that will be tried in
-    *   order if the shortcut ones fail.  May have shortcuts.
-    *
-    * @return {function (Object)} a
-    *   function that takes source code and returns a list of decorations.
-    */
-  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
-    var shortcuts = {};
-    var tokenizer;
-    (function () {
-      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
-      var allRegexs = [];
-      var regexKeys = {};
-      for (var i = 0, n = allPatterns.length; i < n; ++i) {
-        var patternParts = allPatterns[i];
-        var shortcutChars = patternParts[3];
-        if (shortcutChars) {
-          for (var c = shortcutChars.length; --c >= 0;) {
-            shortcuts[shortcutChars.charAt(c)] = patternParts;
-          }
-        }
-        var regex = patternParts[1];
-        var k = '' + regex;
-        if (!regexKeys.hasOwnProperty(k)) {
-          allRegexs.push(regex);
-          regexKeys[k] = null;
-        }
-      }
-      allRegexs.push(/[\0-\uffff]/);
-      tokenizer = combinePrefixPatterns(allRegexs);
-    })();
-
-    var nPatterns = fallthroughStylePatterns.length;
-    var notWs = /\S/;
-
-    /**
-     * Lexes job.source and produces an output array job.decorations of style
-     * classes preceded by the position at which they start in job.source in
-     * order.
-     *
-     * @param {Object} job an object like {@code
-     *    source: {string} sourceText plain text,
-     *    basePos: {int} position of job.source in the larger chunk of
-     *        sourceCode.
-     * }
-     */
-    var decorate = function (job) {
-      var sourceCode = job.source, basePos = job.basePos;
-      /** Even entries are positions in source in ascending order.  Odd enties
-        * are style markers (e.g., PR_COMMENT) that run from that position until
-        * the end.
-        * @type {Array.<number|string>}
-        */
-      var decorations = [basePos, PR_PLAIN];
-      var pos = 0;  // index into sourceCode
-      var tokens = sourceCode.match(tokenizer) || [];
-      var styleCache = {};
-
-      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
-        var token = tokens[ti];
-        var style = styleCache[token];
-        var match;
-
-        var isEmbedded;
-        if (typeof style === 'string') {
-          isEmbedded = false;
-        } else {
-          var patternParts = shortcuts[token.charAt(0)];
-          if (patternParts) {
-            match = token.match(patternParts[1]);
-            style = patternParts[0];
-          } else {
-            for (var i = 0; i < nPatterns; ++i) {
-              patternParts = fallthroughStylePatterns[i];
-              match = token.match(patternParts[1]);
-              if (match) {
-                style = patternParts[0];
-                break;
-              }
-            }
-
-            if (!match) {  // make sure that we make progress
-              style = PR_PLAIN;
-            }
-          }
-
-          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
-          if (isEmbedded && !(match && match[1])) {
-            isEmbedded = false;
-            style = PR_SOURCE;
-          }
-
-          if (!isEmbedded) { styleCache[token] = style; }
-        }
-
-        var tokenStart = pos;
-        pos += token.length;
-
-        if (!isEmbedded) {
-          decorations.push(basePos + tokenStart, style);
-        } else {  // Treat group 1 as an embedded block of source code.
-          var embeddedSource = match[1];
-          var embeddedSourceStart = token.indexOf(embeddedSource);
-          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
-          var lang = style.substring(5);
-          var size = decorations.length - 10;
-          // Decorate the left of the embedded source
-          appendDecorations(
-              basePos + tokenStart,
-              token.substring(0, embeddedSourceStart),
-              decorate, decorations);
-          // Decorate the embedded source
-          appendDecorations(
-              basePos + tokenStart + embeddedSourceStart,
-              embeddedSource,
-              langHandlerForExtension(lang, embeddedSource),
-              decorations);
-          // Decorate the right of the embedded section
-          appendDecorations(
-              basePos + tokenStart + embeddedSourceEnd,
-              token.substring(embeddedSourceEnd),
-              decorate, decorations);
-        }
-      }
-      job.decorations = decorations;
-    };
-    return decorate;
-  }
-
-  /** returns a function that produces a list of decorations from source text.
-    *
-    * This code treats ", ', and ` as string delimiters, and \ as a string
-    * escape.  It does not recognize perl's qq() style strings.
-    * It has no special handling for double delimiter escapes as in basic, or
-    * the tripled delimiters used in python, but should work on those regardless
-    * although in those cases a single string literal may be broken up into
-    * multiple adjacent string literals.
-    *
-    * It recognizes C, C++, and shell style comments.
-    *
-    * @param {Object} options a set of optional parameters.
-    * @return {function (Object)} a function that examines the source code
-    *     in the input job and builds the decoration list.
-    */
-  function sourceDecorator(options) {
-    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
-    if (options['tripleQuotedStrings']) {
-      // '''multi-line-string''', 'single-line-string', and double-quoted
-      shortcutStylePatterns.push(
-          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
-           null, '\'"']);
-    } else if (options['multiLineStrings']) {
-      // 'multi-line-string', "multi-line-string"
-      shortcutStylePatterns.push(
-          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
-           null, '\'"`']);
-    } else {
-      // 'single-line-string', "single-line-string"
-      shortcutStylePatterns.push(
-          [PR_STRING,
-           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
-           null, '"\'']);
-    }
-    if (options['hashComments']) {
-      if (options['cStyleComments']) {
-        // Stop C preprocessor declarations at an unclosed open comment
-        shortcutStylePatterns.push(
-            [PR_COMMENT, /^#(?:[^\r\n\/]|\/(?!\*)|\/\*[^\r\n]*?\*\/)*/,
-             null, '#']);
-      } else {
-        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
-      }
-    }
-    if (options['cStyleComments']) {
-      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
-      fallthroughStylePatterns.push(
-          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
-    }
-    if (options['regexLiterals']) {
-      var REGEX_LITERAL = (
-          // A regular expression literal starts with a slash that is
-          // not followed by * or / so that it is not confused with
-          // comments.
-          '/(?=[^/*])'
-          // and then contains any number of raw characters,
-          + '(?:[^/\\x5B\\x5C]'
-          // escape sequences (\x5C),
-          +    '|\\x5C[\\s\\S]'
-          // or non-nesting character sets (\x5B\x5D);
-          +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
-          // finally closed by a /.
-          + '/');
-      fallthroughStylePatterns.push(
-          ['lang-regex',
-           new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
-           ]);
-    }
-
-    var keywords = options['keywords'].replace(/^\s+|\s+$/g, '');
-    if (keywords.length) {
-      fallthroughStylePatterns.push(
-          [PR_KEYWORD,
-           new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null]);
-    }
-
-    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
-    fallthroughStylePatterns.push(
-        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
-        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null, '@'],
-        [PR_TYPE,        /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
-        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
-        [PR_LITERAL,
-         new RegExp(
-             '^(?:'
-             // A hex number
-             + '0x[a-f0-9]+'
-             // or an octal or decimal number,
-             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
-             // possibly in scientific notation
-             + '(?:e[+\\-]?\\d+)?'
-             + ')'
-             // with an optional modifier like UL for unsigned long
-             + '[a-z]*', 'i'),
-         null, '0123456789'],
-        [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
-
-    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
-  }
-
-  var decorateSource = sourceDecorator({
-        'keywords': ALL_KEYWORDS,
-        'hashComments': true,
-        'cStyleComments': true,
-        'multiLineStrings': true,
-        'regexLiterals': true
-      });
-
-  /** Breaks {@code job.source} around style boundaries in
-    * {@code job.decorations} while re-interleaving {@code job.extractedTags},
-    * and leaves the result in {@code job.prettyPrintedHtml}.
-    * @param {Object} job like {
-    *    source: {string} source as plain text,
-    *    extractedTags: {Array.<number|string>} extractedTags chunks of raw
-    *                   html preceded by their position in {@code job.source}
-    *                   in order
-    *    decorations: {Array.<number|string} an array of style classes preceded
-    *                 by the position at which they start in job.source in order
-    * }
-    * @private
-    */
-  function recombineTagsAndDecorations(job) {
-    var sourceText = job.source;
-    var extractedTags = job.extractedTags;
-    var decorations = job.decorations;
-
-    var html = [];
-    // index past the last char in sourceText written to html
-    var outputIdx = 0;
-
-    var openDecoration = null;
-    var currentDecoration = null;
-    var tagPos = 0;  // index into extractedTags
-    var decPos = 0;  // index into decorations
-    var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']);
-
-    var adjacentSpaceRe = /([\r\n ]) /g;
-    var startOrSpaceRe = /(^| ) /gm;
-    var newlineRe = /\r\n?|\n/g;
-    var trailingSpaceRe = /[ \r\n]$/;
-    var lastWasSpace = true;  // the last text chunk emitted ended with a space.
-
-    // A helper function that is responsible for opening sections of decoration
-    // and outputing properly escaped chunks of source
-    function emitTextUpTo(sourceIdx) {
-      if (sourceIdx > outputIdx) {
-        if (openDecoration && openDecoration !== currentDecoration) {
-          // Close the current decoration
-          html.push('</span>');
-          openDecoration = null;
-        }
-        if (!openDecoration && currentDecoration) {
-          openDecoration = currentDecoration;
-          html.push('<span class="', openDecoration, '">');
-        }
-        // This interacts badly with some wikis which introduces paragraph tags
-        // into pre blocks for some strange reason.
-        // It's necessary for IE though which seems to lose the preformattedness
-        // of <pre> tags when their innerHTML is assigned.
-        // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
-        // and it serves to undo the conversion of <br>s to newlines done in
-        // chunkify.
-        var htmlChunk = textToHtml(
-            tabExpander(sourceText.substring(outputIdx, sourceIdx)))
-            .replace(lastWasSpace
-                     ? startOrSpaceRe
-                     : adjacentSpaceRe, '$1&nbsp;');
-        // Keep track of whether we need to escape space at the beginning of the
-        // next chunk.
-        lastWasSpace = trailingSpaceRe.test(htmlChunk);
-        // IE collapses multiple adjacient <br>s into 1 line break.
-        // Prefix every <br> with '&nbsp;' can prevent such IE's behavior.
-        var lineBreakHtml = window['_pr_isIE6']() ? '&nbsp;<br />' : '<br />';
-        html.push(htmlChunk.replace(newlineRe, lineBreakHtml));
-        outputIdx = sourceIdx;
-      }
-    }
-
-    while (true) {
-      // Determine if we're going to consume a tag this time around.  Otherwise
-      // we consume a decoration or exit.
-      var outputTag;
-      if (tagPos < extractedTags.length) {
-        if (decPos < decorations.length) {
-          // Pick one giving preference to extractedTags since we shouldn't open
-          // a new style that we're going to have to immediately close in order
-          // to output a tag.
-          outputTag = extractedTags[tagPos] <= decorations[decPos];
-        } else {
-          outputTag = true;
-        }
-      } else {
-        outputTag = false;
-      }
-      // Consume either a decoration or a tag or exit.
-      if (outputTag) {
-        emitTextUpTo(extractedTags[tagPos]);
-        if (openDecoration) {
-          // Close the current decoration
-          html.push('</span>');
-          openDecoration = null;
-        }
-        html.push(extractedTags[tagPos + 1]);
-        tagPos += 2;
-      } else if (decPos < decorations.length) {
-        emitTextUpTo(decorations[decPos]);
-        currentDecoration = decorations[decPos + 1];
-        decPos += 2;
-      } else {
-        break;
-      }
-    }
-    emitTextUpTo(sourceText.length);
-    if (openDecoration) {
-      html.push('</span>');
-    }
-    job.prettyPrintedHtml = html.join('');
-  }
-
-  /** Maps language-specific file extensions to handlers. */
-  var langHandlerRegistry = {};
-  /** Register a language handler for the given file extensions.
-    * @param {function (Object)} handler a function from source code to a list
-    *      of decorations.  Takes a single argument job which describes the
-    *      state of the computation.   The single parameter has the form
-    *      {@code {
-    *        source: {string} as plain text.
-    *        decorations: {Array.<number|string>} an array of style classes
-    *                     preceded by the position at which they start in
-    *                     job.source in order.
-    *                     The language handler should assigned this field.
-    *        basePos: {int} the position of source in the larger source chunk.
-    *                 All positions in the output decorations array are relative
-    *                 to the larger source chunk.
-    *      } }
-    * @param {Array.<string>} fileExtensions
-    */
-  function registerLangHandler(handler, fileExtensions) {
-    for (var i = fileExtensions.length; --i >= 0;) {
-      var ext = fileExtensions[i];
-      if (!langHandlerRegistry.hasOwnProperty(ext)) {
-        langHandlerRegistry[ext] = handler;
-      } else if ('console' in window) {
-        console.warn('cannot override language handler %s', ext);
-      }
-    }
-  }
-  function langHandlerForExtension(extension, source) {
-    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
-      // Treat it as markup if the first non whitespace character is a < and
-      // the last non-whitespace character is a >.
-      extension = /^\s*</.test(source)
-          ? 'default-markup'
-          : 'default-code';
-    }
-    return langHandlerRegistry[extension];
-  }
-  registerLangHandler(decorateSource, ['default-code']);
-  registerLangHandler(
-      createSimpleLexer(
-          [],
-          [
-           [PR_PLAIN,       /^[^<?]+/],
-           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
-           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
-           // Unescaped content in an unknown language
-           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
-           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
-           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
-           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
-           // Unescaped content in javascript.  (Or possibly vbscript).
-           ['lang-js',      /^<script\b[^>]*>([\s\S]+?)<\/script\b[^>]*>/i],
-           // Contains unescaped stylesheet content
-           ['lang-css',     /^<style\b[^>]*>([\s\S]+?)<\/style\b[^>]*>/i],
-           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
-          ]),
-      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
-  registerLangHandler(
-      createSimpleLexer(
-          [
-           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
-           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
-           ],
-          [
-           [PR_TAG,          /^^<\/?[a-z](?:[\w:-]*\w)?|\/?>$/],
-           [PR_ATTRIB_NAME,  /^(?!style\b|on)[a-z](?:[\w:-]*\w)?/],
-           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
-           [PR_PUNCTUATION,  /^[=<>\/]+/],
-           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
-           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
-           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
-           ['lang-css',      /^sty\w+\s*=\s*\"([^\"]+)\"/i],
-           ['lang-css',      /^sty\w+\s*=\s*\'([^\']+)\'/i],
-           ['lang-css',      /^sty\w+\s*=\s*([^\"\'>\s]+)/i]
-           ]),
-      ['in.tag']);
-  registerLangHandler(
-      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
-  registerLangHandler(sourceDecorator({
-          'keywords': CPP_KEYWORDS,
-          'hashComments': true,
-          'cStyleComments': true
-        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
-  registerLangHandler(sourceDecorator({
-          'keywords': 'null true false'
-        }), ['json']);
-  registerLangHandler(sourceDecorator({
-          'keywords': CSHARP_KEYWORDS,
-          'hashComments': true,
-          'cStyleComments': true
-        }), ['cs']);
-  registerLangHandler(sourceDecorator({
-          'keywords': JAVA_KEYWORDS,
-          'cStyleComments': true
-        }), ['java']);
-  registerLangHandler(sourceDecorator({
-          'keywords': SH_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true
-        }), ['bsh', 'csh', 'sh']);
-  registerLangHandler(sourceDecorator({
-          'keywords': PYTHON_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true,
-          'tripleQuotedStrings': true
-        }), ['cv', 'py']);
-  registerLangHandler(sourceDecorator({
-          'keywords': PERL_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true,
-          'regexLiterals': true
-        }), ['perl', 'pl', 'pm']);
-  registerLangHandler(sourceDecorator({
-          'keywords': RUBY_KEYWORDS,
-          'hashComments': true,
-          'multiLineStrings': true,
-          'regexLiterals': true
-        }), ['rb']);
-  registerLangHandler(sourceDecorator({
-          'keywords': JSCRIPT_KEYWORDS,
-          'cStyleComments': true,
-          'regexLiterals': true
-        }), ['js']);
-  registerLangHandler(
-      createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
-
-  function applyDecorator(job) {
-    var sourceCodeHtml = job.sourceCodeHtml;
-    var opt_langExtension = job.langExtension;
-
-    // Prepopulate output in case processing fails with an exception.
-    job.prettyPrintedHtml = sourceCodeHtml;
-
-    try {
-      // Extract tags, and convert the source code to plain text.
-      var sourceAndExtractedTags = extractTags(sourceCodeHtml);
-      /** Plain text. @type {string} */
-      var source = sourceAndExtractedTags.source;
-      job.source = source;
-      job.basePos = 0;
-
-      /** Even entries are positions in source in ascending order.  Odd entries
-        * are tags that were extracted at that position.
-        * @type {Array.<number|string>}
-        */
-      job.extractedTags = sourceAndExtractedTags.tags;
-
-      // Apply the appropriate language handler
-      langHandlerForExtension(opt_langExtension, source)(job);
-      // Integrate the decorations and tags back into the source code to produce
-      // a decorated html string which is left in job.prettyPrintedHtml.
-      recombineTagsAndDecorations(job);
-    } catch (e) {
-      if ('console' in window) {
-        console.log(e);
-        console.trace();
-      }
-    }
-  }
-
-  function prettyPrintOne(sourceCodeHtml, opt_langExtension) {
-    var job = {
-      sourceCodeHtml: sourceCodeHtml,
-      langExtension: opt_langExtension
-    };
-    applyDecorator(job);
-    return job.prettyPrintedHtml;
-  }
-
-  function prettyPrint(opt_whenDone) {
-    var isIE6 = window['_pr_isIE6']();
-
-    // fetch a list of nodes to rewrite
-    var codeSegments = [
-        document.getElementsByTagName('pre'),
-        document.getElementsByTagName('code'),
-        document.getElementsByTagName('xmp') ];
-    var elements = [];
-    for (var i = 0; i < codeSegments.length; ++i) {
-      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
-        elements.push(codeSegments[i][j]);
-      }
-    }
-    codeSegments = null;
-
-    var clock = Date;
-    if (!clock['now']) {
-      clock = { 'now': function () { return (new Date).getTime(); } };
-    }
-
-    // The loop is broken into a series of continuations to make sure that we
-    // don't make the browser unresponsive when rewriting a large page.
-    var k = 0;
-    var prettyPrintingJob;
-
-    function doWork() {
-      var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
-                     clock.now() + 250 /* ms */ :
-                     Infinity);
-      for (; k < elements.length && clock.now() < endTime; k++) {
-        var cs = elements[k];
-        if (cs.className && cs.className.indexOf('prettyprint') >= 0) {
-          // If the classes includes a language extensions, use it.
-          // Language extensions can be specified like
-          //     <pre class="prettyprint lang-cpp">
-          // the language extension "cpp" is used to find a language handler as
-          // passed to PR_registerLangHandler.
-          var langExtension = cs.className.match(/\blang-(\w+)\b/);
-          if (langExtension) { langExtension = langExtension[1]; }
-
-          // make sure this is not nested in an already prettified element
-          var nested = false;
-          for (var p = cs.parentNode; p; p = p.parentNode) {
-            if ((p.tagName === 'pre' || p.tagName === 'code' ||
-                 p.tagName === 'xmp') &&
-                p.className && p.className.indexOf('prettyprint') >= 0) {
-              nested = true;
-              break;
-            }
-          }
-          if (!nested) {
-            // fetch the content as a snippet of properly escaped HTML.
-            // Firefox adds newlines at the end.
-            var content = getInnerHtml(cs);
-            content = content.replace(/(?:\r\n?|\n)$/, '');
-
-            // do the pretty printing
-            prettyPrintingJob = {
-              sourceCodeHtml: content,
-              langExtension: langExtension,
-              sourceNode: cs
-            };
-            applyDecorator(prettyPrintingJob);
-            replaceWithPrettyPrintedHtml();
-          }
-        }
-      }
-      if (k < elements.length) {
-        // finish up in a continuation
-        setTimeout(doWork, 250);
-      } else if (opt_whenDone) {
-        opt_whenDone();
-      }
-    }
-
-    function replaceWithPrettyPrintedHtml() {
-      var newContent = prettyPrintingJob.prettyPrintedHtml;
-      if (!newContent) { return; }
-      var cs = prettyPrintingJob.sourceNode;
-
-      // push the prettified html back into the tag.
-      if (!isRawContent(cs)) {
-        // just replace the old html with the new
-        cs.innerHTML = newContent;
-      } else {
-        // we need to change the tag to a <pre> since <xmp>s do not allow
-        // embedded tags such as the span tags used to attach styles to
-        // sections of source code.
-        var pre = document.createElement('PRE');
-        for (var i = 0; i < cs.attributes.length; ++i) {
-          var a = cs.attributes[i];
-          if (a.specified) {
-            var aname = a.name.toLowerCase();
-            if (aname === 'class') {
-              pre.className = a.value;  // For IE 6
-            } else {
-              pre.setAttribute(a.name, a.value);
-            }
-          }
-        }
-        pre.innerHTML = newContent;
-
-        // remove the old
-        cs.parentNode.replaceChild(pre, cs);
-        cs = pre;
-      }
-
-      // Replace <br>s with line-feeds so that copying and pasting works
-      // on IE 6.
-      // Doing this on other browsers breaks lots of stuff since \r\n is
-      // treated as two newlines on Firefox, and doing this also slows
-      // down rendering.
-      if (isIE6 && cs.tagName === 'PRE') {
-        var lineBreaks = cs.getElementsByTagName('br');
-        for (var j = lineBreaks.length; --j >= 0;) {
-          var lineBreak = lineBreaks[j];
-          lineBreak.parentNode.replaceChild(
-              document.createTextNode('\r'), lineBreak);
-        }
-      }
-    }
-
-    doWork();
-  }
-
-  window['PR_normalizedHtml'] = normalizedHtml;
-  window['prettyPrintOne'] = prettyPrintOne;
-  window['prettyPrint'] = prettyPrint;
-  window['PR'] = {
-        'combinePrefixPatterns': combinePrefixPatterns,
-        'createSimpleLexer': createSimpleLexer,
-        'registerLangHandler': registerLangHandler,
-        'sourceDecorator': sourceDecorator,
-        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
-        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
-        'PR_COMMENT': PR_COMMENT,
-        'PR_DECLARATION': PR_DECLARATION,
-        'PR_KEYWORD': PR_KEYWORD,
-        'PR_LITERAL': PR_LITERAL,
-        'PR_NOCODE': PR_NOCODE,
-        'PR_PLAIN': PR_PLAIN,
-        'PR_PUNCTUATION': PR_PUNCTUATION,
-        'PR_SOURCE': PR_SOURCE,
-        'PR_STRING': PR_STRING,
-        'PR_TAG': PR_TAG,
-        'PR_TYPE': PR_TYPE
-      };
-})();
diff --git a/trunk/activemq-web-console/src/main/webapp/js/standardista-table-sorting.js b/trunk/activemq-web-console/src/main/webapp/js/standardista-table-sorting.js
deleted file mode 100644
index 0596984..0000000
--- a/trunk/activemq-web-console/src/main/webapp/js/standardista-table-sorting.js
+++ /dev/null
@@ -1,434 +0,0 @@
-/**
- * Written by Neil Crosby. 
- * http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting
- *
- * This module is based on Stuart Langridge's "sorttable" code.  Specifically, 
- * the determineSortFunction, sortCaseInsensitive, sortDate, sortNumeric, and
- * sortCurrency functions are heavily based on his code.  This module would not
- * have been possible without Stuart's earlier outstanding work.
- *
- * Use this wherever you want, but please keep this comment at the top of this file.
- *
- * 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.
- **/
-var standardistaTableSorting = {
-
-	that: false,
-	isOdd: false,
-
-	sortColumnIndex : -1,
-	lastAssignedId : 0,
-	newRows: -1,
-	lastSortedTable: -1,
-
-	/**
-	 * Initialises the Standardista Table Sorting module
-	 **/
-	init : function() {
-		// first, check whether this web browser is capable of running this script
-		if (!document.getElementsByTagName) {
-			return;
-		}
-		
-		this.that = this;
-		
-		this.run();
-		
-	},
-	
-	/**
-	 * Runs over each table in the document, making it sortable if it has a class
-	 * assigned named "sortable" and an id assigned.
-	 **/
-	run : function() {
-		var tables = document.getElementsByTagName("table");
-		
-		for (var i=0; i < tables.length; i++) {
-			var thisTable = tables[i];
-			
-			if (css.elementHasClass(thisTable, 'sortable')) {
-				this.makeSortable(thisTable);
-			}
-		}
-	},
-	
-	/**
-	 * Makes the given table sortable.
-	 **/
-	makeSortable : function(table) {
-	
-		// first, check if the table has an id.  if it doesn't, give it one
-		if (!table.id) {
-			table.id = 'sortableTable'+this.lastAssignedId++;
-		}
-		
-		// if this table does not have a thead, we don't want to know about it
-		if (!table.tHead || !table.tHead.rows || 0 == table.tHead.rows.length) {
-			return;
-		}
-		
-		// we'll assume that the last row of headings in the thead is the row that 
-		// wants to become clickable
-		var row = table.tHead.rows[table.tHead.rows.length - 1];
-		
-		for (var i=0; i < row.cells.length; i++) {
-		
-			// create a link with an onClick event which will 
-			// control the sorting of the table
-			var linkEl = createElement('a');
-			linkEl.href = '#';
-			linkEl.onclick = this.headingClicked;
-			linkEl.setAttribute('columnId', i);
-			linkEl.title = 'Click to sort';
-			
-			// move the current contents of the cell that we're 
-			// hyperlinking into the hyperlink
-			var innerEls = row.cells[i].childNodes;
-			for (var j = 0; j < innerEls.length; j++) {
-				linkEl.appendChild(innerEls[j]);
-			}
-			
-			// and finally add the new link back into the cell
-			row.cells[i].appendChild(linkEl);
-
-			var spanEl = createElement('span');
-			spanEl.className = 'tableSortArrow';
-			spanEl.appendChild(document.createTextNode('\u00A0\u00A0'));
-			row.cells[i].appendChild(spanEl);
-
-		}
-	
-		if (css.elementHasClass(table, 'autostripe')) {
-			this.isOdd = false;
-			var rows = table.tBodies[0].rows;
-		
-			// We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
-			for (var i=0;i<rows.length;i++) { 
-				this.doStripe(rows[i]);
-			}
-		}
-	},
-	
-	headingClicked: function(e) {
-		
-		var that = standardistaTableSorting.that;
-		
-		// linkEl is the hyperlink that was clicked on which caused
-		// this method to be called
-		var linkEl = getEventTarget(e);
-		
-		// directly outside it is a td, tr, thead and table
-		var td     = linkEl.parentNode;
-		var tr     = td.parentNode;
-		var thead  = tr.parentNode;
-		var table  = thead.parentNode;
-		
-		// if the table we're looking at doesn't have any rows
-		// (or only has one) then there's no point trying to sort it
-		if (!table.tBodies || table.tBodies[0].rows.length <= 1) {
-			return false;
-		}
-
-		// the column we want is indicated by td.cellIndex
-		var column = linkEl.getAttribute('columnId') || td.cellIndex;
-		//var column = td.cellIndex;
-		
-		// find out what the current sort order of this column is
-		var arrows = css.getElementsByClass(td, 'tableSortArrow', 'span');
-		var previousSortOrder = '';
-		if (arrows.length > 0) {
-			previousSortOrder = arrows[0].getAttribute('sortOrder');
-		}
-		
-		// work out how we want to sort this column using the data in the first cell
-		// but just getting the first cell is no good if it contains no data
-		// so if the first cell just contains white space then we need to track
-		// down until we find a cell which does contain some actual data
-		var itm = ''
-		var rowNum = 0;
-		while ('' == itm && rowNum < table.tBodies[0].rows.length) {
-			itm = that.getInnerText(table.tBodies[0].rows[rowNum].cells[column]);
-			rowNum++;
-		}
-		var sortfn = that.determineSortFunction(itm);
-
-		// if the last column that was sorted was this one, then all we need to 
-		// do is reverse the sorting on this column
-		if (table.id == that.lastSortedTable && column == that.sortColumnIndex) {
-			newRows = that.newRows;
-			newRows.reverse();
-		// otherwise, we have to do the full sort
-		} else {
-			that.sortColumnIndex = column;
-			var newRows = new Array();
-
-			for (var j = 0; j < table.tBodies[0].rows.length; j++) { 
-				newRows[j] = table.tBodies[0].rows[j]; 
-			}
-
-			newRows.sort(sortfn);
-		}
-
-		that.moveRows(table, newRows);
-		that.newRows = newRows;
-		that.lastSortedTable = table.id;
-		
-		// now, give the user some feedback about which way the column is sorted
-		
-		// first, get rid of any arrows in any heading cells
-		var arrows = css.getElementsByClass(tr, 'tableSortArrow', 'span');
-		for (var j = 0; j < arrows.length; j++) {
-			var arrowParent = arrows[j].parentNode;
-			arrowParent.removeChild(arrows[j]);
-
-			if (arrowParent != td) {
-				spanEl = createElement('span');
-				spanEl.className = 'tableSortArrow';
-				spanEl.appendChild(document.createTextNode('\u00A0\u00A0'));
-				arrowParent.appendChild(spanEl);
-			}
-		}
-		
-		// now, add back in some feedback 
-		var spanEl = createElement('span');
-		spanEl.className = 'tableSortArrow';
-		if (null == previousSortOrder || '' == previousSortOrder || 'DESC' == previousSortOrder) {
-			spanEl.appendChild(document.createTextNode(' \u2191'));
-			spanEl.setAttribute('sortOrder', 'ASC');
-		} else {
-			spanEl.appendChild(document.createTextNode(' \u2193'));
-			spanEl.setAttribute('sortOrder', 'DESC');
-		}
-		
-		td.appendChild(spanEl);
-		
-		return false;
-	},
-
-	getInnerText : function(el) {
-		
-		if ('string' == typeof el || 'undefined' == typeof el) {
-			return el;
-		}
-		
-		if (el.innerText) {
-			return el.innerText;  // Not needed but it is faster
-		}
-
-		var str = el.getAttribute('standardistaTableSortingInnerText');
-		if (null != str && '' != str) {
-			return str;
-		}
-		str = '';
-
-		var cs = el.childNodes;
-		var l = cs.length;
-		for (var i = 0; i < l; i++) {
-			// 'if' is considerably quicker than a 'switch' statement, 
-			// in Internet Explorer which translates up to a good time 
-			// reduction since this is a very often called recursive function
-			if (1 == cs[i].nodeType) { // ELEMENT NODE
-				str += this.getInnerText(cs[i]);
-				break;
-			} else if (3 == cs[i].nodeType) { //TEXT_NODE
-				str += cs[i].nodeValue;
-				break;
-			}
-		}
-		
-		// set the innertext for this element directly on the element
-		// so that it can be retrieved early next time the innertext
-		// is requested
-		el.setAttribute('standardistaTableSortingInnerText', str);
-		
-		return str;
-	},
-
-	determineSortFunction : function(itm) {
-		
-		var sortfn = this.sortCaseInsensitive;
-		
-		if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) {
-			sortfn = this.sortDate;
-		}
-		if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) {
-			sortfn = this.sortDate;
-		}
-		if (itm.match(/^[£$]/)) {
-			sortfn = this.sortCurrency;
-		}
-		if (itm.match(/^\d?\.?\d+$/)) {
-			sortfn = this.sortNumeric;
-		}
-		if (itm.match(/^[+-]?\d*\.?\d+([eE]-?\d+)?$/)) {
-			sortfn = this.sortNumeric;
-		}
-    		if (itm.match(/^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$/)) {
-        		sortfn = this.sortIP;
-   		}
-
-		return sortfn;
-	},
-	
-	sortCaseInsensitive : function(a, b) {
-		var that = standardistaTableSorting.that;
-		
-		var aa = that.getInnerText(a.cells[that.sortColumnIndex]).toLowerCase();
-		var bb = that.getInnerText(b.cells[that.sortColumnIndex]).toLowerCase();
-		if (aa==bb) {
-			return 0;
-		} else if (aa<bb) {
-			return -1;
-		} else {
-			return 1;
-		}
-	},
-	
-	sortDate : function(a,b) {
-		var that = standardistaTableSorting.that;
-
-		// y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
-		var aa = that.getInnerText(a.cells[that.sortColumnIndex]);
-		var bb = that.getInnerText(b.cells[that.sortColumnIndex]);
-		
-		var dt1, dt2, yr = -1;
-		
-		if (aa.length == 10) {
-			dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
-		} else {
-			yr = aa.substr(6,2);
-			if (parseInt(yr) < 50) { 
-				yr = '20'+yr; 
-			} else { 
-				yr = '19'+yr; 
-			}
-			dt1 = yr+aa.substr(3,2)+aa.substr(0,2);
-		}
-		
-		if (bb.length == 10) {
-			dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
-		} else {
-			yr = bb.substr(6,2);
-			if (parseInt(yr) < 50) { 
-				yr = '20'+yr; 
-			} else { 
-				yr = '19'+yr; 
-			}
-			dt2 = yr+bb.substr(3,2)+bb.substr(0,2);
-		}
-		
-		if (dt1==dt2) {
-			return 0;
-		} else if (dt1<dt2) {
-			return -1;
-		}
-		return 1;
-	},
-
-	sortCurrency : function(a,b) { 
-		var that = standardistaTableSorting.that;
-
-		var aa = that.getInnerText(a.cells[that.sortColumnIndex]).replace(/[^0-9.]/g,'');
-		var bb = that.getInnerText(b.cells[that.sortColumnIndex]).replace(/[^0-9.]/g,'');
-		return parseFloat(aa) - parseFloat(bb);
-	},
-
-	sortNumeric : function(a,b) { 
-		var that = standardistaTableSorting.that;
-
-		var aa = parseFloat(that.getInnerText(a.cells[that.sortColumnIndex]));
-		if (isNaN(aa)) { 
-			aa = 0;
-		}
-		var bb = parseFloat(that.getInnerText(b.cells[that.sortColumnIndex])); 
-		if (isNaN(bb)) { 
-			bb = 0;
-		}
-		return aa-bb;
-	},
-
-	makeStandardIPAddress : function(val) {
-		var vals = val.split('.');
-
-		for (x in vals) {
-			val = vals[x];
-
-			while (3 > val.length) {
-				val = '0'+val;
-			}
-			vals[x] = val;
-		}
-
-		val = vals.join('.');
-
-		return val;
-	},
-
-	sortIP : function(a,b) { 
-		var that = standardistaTableSorting.that;
-
-		var aa = that.makeStandardIPAddress(that.getInnerText(a.cells[that.sortColumnIndex]).toLowerCase());
-		var bb = that.makeStandardIPAddress(that.getInnerText(b.cells[that.sortColumnIndex]).toLowerCase());
-		if (aa==bb) {
-			return 0;
-		} else if (aa<bb) {
-			return -1;
-		} else {
-			return 1;
-		}
-	},
-
-	moveRows : function(table, newRows) {
-		this.isOdd = false;
-
-		// We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
-		for (var i=0;i<newRows.length;i++) { 
-			var rowItem = newRows[i];
-
-			this.doStripe(rowItem);
-
-			table.tBodies[0].appendChild(rowItem); 
-		}
-	},
-	
-	doStripe : function(rowItem) {
-		if (this.isOdd) {
-			css.addClassToElement(rowItem, 'odd');
-		} else {
-			css.removeClassFromElement(rowItem, 'odd');
-		}
-		
-		this.isOdd = !this.isOdd;
-	}
-
-}
-
-function standardistaTableSortingInit() {
-	standardistaTableSorting.init();
-	if (document.getElementsByTagName("TH")[0] != null) {
-		var e = {};
-		var obj = document.getElementsByTagName("TH")[0].firstChild; // 0 points to the first column, use 3 if you want to sort on the 4th column
-		e.target = obj;
-		standardistaTableSorting.headingClicked(e);  // will sort Ascending
-	}
-}
-
-addEvent(window, 'load', standardistaTableSortingInit)
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/message.jsp b/trunk/activemq-web-console/src/main/webapp/message.jsp
deleted file mode 100644
index 25143a1..0000000
--- a/trunk/activemq-web-console/src/main/webapp/message.jsp
+++ /dev/null
@@ -1,185 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<c:set var="row" value="${requestContext.messageQuery.message}"/>
-<title>Message <c:out value="${requestContext.messageQuery.id}"/></title>
-</head>
-<body>
-
-
-<c:choose>
-<c:when test="${empty row}">
-
-<div>
-No message could be found for ID <c:out value="${requestContext.messageQuery.id}"/>
-</div>
-
-</c:when>
-
-<c:otherwise>
-
-<table class="layout">
-	<tr>
-		<td class="layout"  valign="top">
-			<table id="header" class="sortable autostripe">
-				<thead>
-					<tr>
-						<th colspan="2">
-						    Headers
-						</th>
-					</tr>
-				</thead>
-				<tbody>
-					<tr>
-						<td class="label" title="Unique Message ID for this message">Message ID</td>
-						<td><c:out value="${row.JMSMessageID}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Destination</td>
-						<td><form:tooltip text="${row.JMSDestination}" length="50"/></td>
-					</tr>
-					<tr>
-						<td class="label" title="The ID used to correlate messages together in a conversation">Correlation ID</td>
-						<td><c:out value="${row.JMSCorrelationID}"/></td>
-					</tr>
-					<tr>
-						<td class="label" title="Message Group Identifier">Group</td>
-						<td><c:out value="${row.groupID}"/></td>
-					</tr>
-					<tr>
-						<td class="label" title="Message Group Sequence Number">Sequence</td>
-						<td><c:out value="${row.groupSequence}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Expiration</td>
-						<td><c:out value="${row.JMSExpiration}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Persistence</td>
-						<td><jms:persistent message="${row}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Priority</td>
-						<td><c:out value="${row.JMSPriority}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Redelivered</td>
-					    <td><c:out value="${row.JMSRedelivered}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Reply To</td>
-						<td><c:out value="${row.JMSReplyTo}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Timestamp</td>
-						<td><jms:formatTimestamp timestamp="${row.JMSTimestamp}"/></td>
-					</tr>
-					<tr>
-						<td class="label">Type</td>
-						<td><c:out value="${row.JMSType}"/></td>
-					</tr>
-				</tbody>
-			</table>
-        </td>
-
-        <td  class="layout" valign="top">
-			<table id="properties" class="sortable autostripe">
-				<thead>
-					<tr>
-						<th colspan="2">
-						    Properties
-						</th>
-					</tr>
-				</thead>
-				<tbody>
-                   <form:forEachMapEntry items="${requestContext.messageQuery.propertiesMap}" var="prop">
-						<tr>
-							<td class="label"><c:out value="${prop.key}"/></td>
-							<td><c:out value="${prop.value}"/></td>
-						</tr>
-						<tr>
-					</form:forEachMapEntry>
-				</tbody>
-			</table>
-		</td>
-	</tr>
-    <tr>
-        <td class="layout" colspan="2">
-            <table id="body" width="100%">
-                <thead>
-                    <tr>
-                        <th colspan="2">
-                            Message Actions
-                        </th>
-                    </tr>
-                </thead>
-                <tbody>
-                    <tr>
-                        <td colspan="2"><a href="deleteMessage.action?JMSDestination=<c:out value="${row.JMSDestination}" />&messageId=${row.JMSMessageID}&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a></td>
-                    </tr>
-                    <tr class="odd">
-                    <td><a href="javascript:confirmAction('queue', 'copyMessage.action?destination=%target%&JMSDestination=<c:out value="${row.JMSDestination}" />&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=<c:out value='${sessionScope["secret"]}'/>')">Copy</a></td>
-                        <td rowspan="2">
-                            <select id="queue">
-                                <option value=""> -- Please select --</option>
-                                <c:forEach items="${requestContext.brokerQuery.queues}" var="queues">
-                                    <c:if test="${queues.name != requestContext.messageQuery.JMSDestination}">
-                                    <option value="<c:out value="${queues.name}" />"><form:short text="${queues.name}"/></option>
-                                    </c:if>
-                                </c:forEach>
-                            </select>
-                        </td>
-                        
-                    </tr>
-                    <tr class="odd">
-                        <td><a href="javascript:confirmAction('queue', 'moveMessage.action?destination=%target%&JMSDestination=<c:out value="${row.JMSDestination}" />&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=<c:out value='${sessionScope["secret"]}'/>')">Move</a></td>
-                    </tr>
-                </tbody>
-            </table>
-        </td>
-    </tr>   	
-	<tr>
-		<td class="layout" colspan="2">
-			<table id="body" width="100%">
-				<thead>
-					<tr>
-						<th>
-						    Message Details
-						</th>
-					</tr>
-				</thead>
-				<tbody>
-					<tr>
-						<td><div class="message"><pre class="prettyprint"><c:out value="${requestContext.messageQuery.body}"/></pre></div></td>
-					</tr>
-				</tbody>
-			</table>
-		</td>
-	</tr>
-</table>
-
-</c:otherwise>
-</c:choose>
-
-
-
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/network.jsp b/trunk/activemq-web-console/src/main/webapp/network.jsp
deleted file mode 100644
index 408cf36..0000000
--- a/trunk/activemq-web-console/src/main/webapp/network.jsp
+++ /dev/null
@@ -1,52 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Network Bridges</title>
-</head>
-<body>
-
-<div style="margin-top: 5em">
-<h2>Network Bridges</h2>
-
-<table id="bridges" class="sortable autostripe">
-<thead>
-<tr>
-    <th>Remote Broker</th>
-    <th>Remote Address</th>
-    <th>Created By Duplex</th>
-    <th>Messages Enqueued</th>
-    <th>Messages Dequeued</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.brokerQuery.networkBridges}" var="nb">
-<tr>
-	<td>${nb.remoteBrokerName}</td>
-	<td>${nb.remoteAddress}</td>
-	<td>${nb.createdByDuplex}</td>
-	<td>${nb.enqueueCounter}</td>
-	<td>${nb.dequeueCounter}</td>
-</tr>
-</c:forEach>
-</tbody>
-</table>
-</div>
-
-</body>
-</html>
-
diff --git a/trunk/activemq-web-console/src/main/webapp/queueConsumers.jsp b/trunk/activemq-web-console/src/main/webapp/queueConsumers.jsp
deleted file mode 100644
index cb88645..0000000
--- a/trunk/activemq-web-console/src/main/webapp/queueConsumers.jsp
+++ /dev/null
@@ -1,79 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Consumers for <c:out value="${requestContext.queueConsumerQuery.JMSDestination}" /></title>
-</head>
-<body>
-
-<h2>Active Consumers for <c:out value="${requestContext.queueConsumerQuery.JMSDestination}" /></h2>
-
-<table id="messages" class="sortable autostripe">
-<thead>
-<tr>
-	<th>
-		<span>Client ID</span>
-		<br/>
-		<span>Connection ID</span>
-	</th>
-	<th>SessionId</th>
-	<th>Selector</th>
-	<th>Enqueues</th>
-	<th>Dequeues</th>
-	<th>Dispatched</th>
-	<th>Dispatched Queue</th>
-	<th>
-		<span>Prefetch</span>
-		<br/>
-		<span>Max pending</span>
-	</th>
-	<th>
-		<span>Exclusive</span>
-		<br/>
-		<span>Retroactive</span>
-	</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.queueConsumerQuery.consumers}" var="row">
-<tr>
-	<td>
-		<a href="connection.jsp?connectionID=${row.clientId}">${row.clientId}</a><br/>
-	    ${row.connectionId}</a>
-	</td>
-	<td>${row.sessionId}</td>
-	<td>${row.selector}</td>
-	<td>${row.enqueueCounter}</td>
-	<td>${row.dequeueCounter}</td>
-	<td>${row.dispatchedCounter}</td>
-	<td>${row.dispatchedQueueSize}</td>
-	<td>
-		${row.prefetchSize}<br/>
-		${row.maximumPendingMessageLimit}
-	</td>
-	<td>
-		${row.exclusive}<br/>
-		${row.retroactive}
-	</td>
-</tr>
-</c:forEach>
-</tbody>
-</table>
-
-</body>
-</html>
-	
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/queueGraph.jsp b/trunk/activemq-web-console/src/main/webapp/queueGraph.jsp
deleted file mode 100644
index 3e26c1d..0000000
--- a/trunk/activemq-web-console/src/main/webapp/queueGraph.jsp
+++ /dev/null
@@ -1,68 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Queues</title>
-
-    <c:set var="disableJavaScript" value="true" scope="request"/>
-
-   <script src='<c:url value="/js/mochi/MochiKit.js"/>' type="text/javascript"></script>
-   <script src='<c:url value="/js/plotkit/Base.js"/>' type="text/javascript"></script>
-   <script src='<c:url value="/js/plotkit/Layout.js"/>' type="text/javascript"></script>
-   <script src='<c:url value="/js/plotkit/Canvas.js"/>' type="text/javascript"></script>
-   <script src='<c:url value="/js/plotkit/SweetCanvas.js"/>' type="text/javascript"></script>
-</head>
-<body>
-
-<script>
-var options = {
-   "IECanvasHTC": "<c:url value="/js/plotkit/iecanvas.htc"/>",
-   "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),
-   "padding": {left: 0, right: 0, top: 10, bottom: 30},
-   "xTicks": [<c:forEach items="${requestContext.brokerQuery.queues}" var="row" varStatus="status"
-         ><c:if 
-         test="${status.count > 1}">, </c:if>{v:${status.count}, label:"${row.name}"}</c:forEach>]
-};
-
-function drawGraph() {
-    var layout = new PlotKit.Layout("bar", options);
-    
-    layout.addDataset("sqrt",  [<c:forEach items="${requestContext.brokerQuery.queues}" var="row" varStatus="status"><c:if 
-         test="${status.count > 1}">, </c:if> [${status.count},  ${row.queueSize}] </c:forEach> ]);
-    layout.evaluate();
-    
-    var canvas = MochiKit.DOM.getElement("graph");
-    var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout, options);
-    plotter.render();
-}
-MochiKit.DOM.addLoadEvent(drawGraph);
-</script>
-
- <div><canvas id="graph" height="400" width="760"></canvas></div>
- 
-<%---    
-Other values we can graph...
-
-<td>${row.consumerCount}</td>
-<td>${row.enqueueCount}</td>
-<td>${row.dequeueCount}</td>
---%>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/queues.jsp b/trunk/activemq-web-console/src/main/webapp/queues.jsp
deleted file mode 100644
index ab535e4..0000000
--- a/trunk/activemq-web-console/src/main/webapp/queues.jsp
+++ /dev/null
@@ -1,78 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Queues</title>
-</head>
-<body>
-
-<div>
-<form action="createDestination.action" method="post">
-    <input type="hidden" name="JMSDestinationType" value="queue"/>
-    <input type="hidden" name="secret" value="<c:out value='${sessionScope["secret"]}'/>"/>
-
-    <label name="destination">Queue Name</label>
-    <input type="text" name="JMSDestination" value=""/>
-
-    <input type="submit" value="Create"/>
-</form>
-</div>
-
-
-<h2>Queues</h2>
-
-<table id="queues" class="sortable autostripe">
-<thead>
-<tr>
-<th>Name</th>
-<th>Number Of Pending Messages</th>
-<th>Number Of Consumers</th>
-<th>Messages Enqueued</th>
-<th>Messages Dequeued</th>
-<th>Views</th>
-<th>Operations</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.brokerQuery.queues}" var="row">
-
-<tr>
-<td><a href="browse.jsp?JMSDestination=<c:out value="${row.name}" />"><form:tooltip text="${row.name}" length="50"/></a></td>
-<td>${row.queueSize}</td>
-<td>${row.consumerCount}</td>
-<td>${row.enqueueCount}</td>
-<td>${row.dequeueCount}</td>
-<td>
-    <a href="browse.jsp?JMSDestination=<c:out value="${row.name}" />">Browse</a>
-	<a href="queueConsumers.jsp?JMSDestination=<c:out value="${row.name}" />">Active Consumers</a><br/>
-    <a href="queueBrowse/<c:out value="${row.name}" />?view=rss&feedType=atom_1.0" title="Atom 1.0"><img src="images/feed_atom.png"/></a>
-    <a href="queueBrowse/<c:out value="${row.name}" />?view=rss&feedType=rss_2.0" title="RSS 2.0"><img src="images/feed_rss.png"/></a>
-</td>
-<td>
-    <a href="send.jsp?JMSDestination=<c:out value="${row.name}" />&JMSDestinationType=queue">Send To</a>
-    <a href="purgeDestination.action?JMSDestination=<c:out value="${row.name}" />&JMSDestinationType=queue&secret=<c:out value='${sessionScope["secret"]}'/>">Purge</a>
-    <a href="deleteDestination.action?JMSDestination=<c:out value="${row.name}" />&JMSDestinationType=queue&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a>
-</td>
-</tr>
-</c:forEach>
-</tbody>
-</table>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/scheduled.jsp b/trunk/activemq-web-console/src/main/webapp/scheduled.jsp
deleted file mode 100644
index 6f64179..0000000
--- a/trunk/activemq-web-console/src/main/webapp/scheduled.jsp
+++ /dev/null
@@ -1,67 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Messages Scheduled for Future Delivery</title>
-</head>
-<body>
-
-<c:choose>
-<c:when test="${requestContext.brokerQuery.jobSchedulerStarted}">
-<div style="margin-top: 5em">
-	<table id="Jobs" class="sortable autostripe">
-	<thead>
-		<tr>
-			<th>Job ID</th>
-			<th>Cron Entry</th>
-			<th>next scheduled time</th>
-			<th>start</th>
-			<th>delay</th>
-			<th>period</th>
-			<th>repeat</th>
-			<th>Operations</th>
-		</tr>
-	</thead>
-	<tbody>
-		<c:forEach items="${requestContext.brokerQuery.scheduledJobs}"
-		var="row">
-		<tr>
-		 <td>${row.jobId}</td>
-		 <td>${row.cronEntry}</td>
-		 <td>${row.nextExecutionTime}</td>
-		 <td>${row.start}</td>
-		 <td>${row.delay}</td>
-	 	 <td>${row.period}</td>
-	     <td>${row.repeat}</td>
-		<td>
-		    <a href="deleteJob.action?jobId=${row.jobId}&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a>
-		</td>
-	    </tr>
-	</c:forEach>
-	</tbody>
-	</table>
-</c:when>
-<c:otherwise>
-<div style="margin-top: 5em">
-<p align="center">Scheduler not started!</p>
-</div>
-</c:otherwise>
-</c:choose>
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/send.jsp b/trunk/activemq-web-console/src/main/webapp/send.jsp
deleted file mode 100644
index cbccf85..0000000
--- a/trunk/activemq-web-console/src/main/webapp/send.jsp
+++ /dev/null
@@ -1,173 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Send Messages</title>
-</head>
-<body>
-
-<h2>Send a JMS Message</h2>
-
-<form action="sendMessage.action" method="post">
-<input type="hidden" name="secret" value="<c:out value='${sessionScope["secret"]}'/>"/>
-
-<table id="headers" class="autostripe">
-<thead>
-<tr>
-<th colspan="4">Message Header</th>
-</tr>
-</thead>
-
-<tbody>
-<tr>
-	<td class="label">
-	    <label for="JMSDestination">Destination</label>
-	</td>
-	<td>
-	    <form:text name="JMSDestination" defaultValue="foo.bar" />
-	</td>
-	<td class="label">
-	    <label for="queue">Queue or Topic</label>
-	</td>
-	<td>
-	    <select name="JMSDestinationType">
-	      <form:option name="JMSDestinationType" value="queue" label="Queue"/>
-	      <form:option name="JMSDestinationType" value="topic" label="Topic"/>
-	   </select>
-	</td>
-</tr>
-<tr>
-	<td class="label">
-	    <label for="JMSCorrelationID">Correlation ID</label>
-	</td>
-	<td>
-	    <form:text name="JMSCorrelationID"/>
-	</td>
-	<td class="label">
-	    <label for="JMSPersistent">Persistent Delivery</label>
-	</td>
-	<td>
-	    <form:checkbox name="JMSPersistent"/>
-	</td>
-</tr>
-<tr>
-	<td class="label">
-	    <label for="JMSReplyTo">Reply To</label>
-	</td>
-	<td>
-	    <form:text name="JMSReplyTo"/>
-	</td>
-	<td class="label">
-	    <label for="JMSPriority">Priority</label>
-	</td>
-	<td>
-	    <form:text name="JMSPriority"/>
-	</td>
-</tr>
-<tr>
-	<td class="label">
-	    <label for="JMSType">Type</label>
-	</td>
-	<td>
-	    <form:text name="JMSType"/>
-	</td>
-	<td class="label">
-	    <label for="JMSTimeToLive">Time to live</label>
-	</td>
-	<td>
-	    <form:text name="JMSTimeToLive"/>
-	</td>
-</tr>
-<tr>
-	<td class="label">
-	    <label for="JMSXGroupID">Message Group</label>
-	</td>
-	<td>
-	    <form:text name="JMSXGroupID"/>
-	</td>
-	<td class="label">
-	    <label for="JMSXGroupSeq">Message Group Sequence Number</label>
-	</td>
-	<td>
-	    <form:text name="JMSXGroupSeq"/>
-	</td>
-</tr>
-<tr>
-	<td class="label">
-	    <label for="AMQ_SCHEDULED_DELAY">delay(ms)</label>
-	</td>
-	<td>
-	    <form:text name="AMQ_SCHEDULED_DELAY"/>
-	</td>
-	<td class="label">
-	    <label for="AMQ_SCHEDULED_PERIOD">Time(ms) to wait before scheduling again</label>
-	</td>
-	<td>
-	    <form:text name="AMQ_SCHEDULED_PERIOD"/>
-	</td>
-</tr>
-<tr>
-	<td class="label">
-	    <label for="AMQ_SCHEDULED_REPEAT">Number of repeats</label>
-	</td>
-	<td>
-	    <form:text name="AMQ_SCHEDULED_REPEAT"/>
-	</td>
-	<td class="label">
-	    <label for="AMQ_SCHEDULED_CRON">Use a CRON string for scheduling</label>
-	</td>
-	<td>
-	    <form:text name="AMQ_SCHEDULED_CRON"/>
-	</td>
-</tr>
-<tr>
-	<td class="label">
-	    <label for="JMSMessageCount">Number of messages to send</label>
-	</td>
-	<td>
-	    <form:text name="JMSMessageCount" defaultValue="1"/>
-	</td>
-	<td class="label">
-	    <label for="JMSMessageCountHeader">Header to store the counter</label>
-	</td>
-	<td>
-	    <form:text name="JMSMessageCountHeader" defaultValue="JMSXMessageCounter"/>
-	</td>
-</tr>
-<tr>
- <td colspan="4" align="center">
-     <input type="submit" value="Send"/>
-     <input type="reset"/>
- </td>
-</tr>
-<tr>
-	<th colspan="4" class="label">
-	    <label for="text">Message body</label>
-	</th>
-</tr>
-<tr>
-	<td colspan="4">
-	    <textarea name="JMSText" rows="30" cols="80">Enter some text here for the message body...</textarea>
-	</td>
-</tr>
-</tbody>
-</table>
-
-</form>
-
-</body>
-</html>
diff --git a/trunk/activemq-web-console/src/main/webapp/styles/prettify.css b/trunk/activemq-web-console/src/main/webapp/styles/prettify.css
deleted file mode 100644
index 7ea724b..0000000
--- a/trunk/activemq-web-console/src/main/webapp/styles/prettify.css
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.
- */
-
-/* Pretty printing styles. Used with prettify.js. */
-
-.str { color: #080; }
-.kwd { color: #008; }
-.com { color: #800; }
-.typ { color: #606; }
-.lit { color: #066; }
-.pun { color: #660; }
-.pln { color: #000; }
-.tag { color: #008; }
-.atn { color: #606; }
-.atv { color: #080; }
-.dec { color: #606; }
-pre.prettyprint { padding: 2px; }
-
-@media print {
-  .str { color: #060; }
-  .kwd { color: #006; font-weight: bold; }
-  .com { color: #600; font-style: italic; }
-  .typ { color: #404; font-weight: bold; }
-  .lit { color: #044; }
-  .pun { color: #440; }
-  .pln { color: #000; }
-  .tag { color: #006; font-weight: bold; }
-  .atn { color: #404; }
-  .atv { color: #060; }
-}
diff --git a/trunk/activemq-web-console/src/main/webapp/styles/site.css b/trunk/activemq-web-console/src/main/webapp/styles/site.css
deleted file mode 100644
index 13cfc54..0000000
--- a/trunk/activemq-web-console/src/main/webapp/styles/site.css
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * 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.
- */
-
-body {
-    padding: 20px;
-}
-
-/* ====================================================== */
-/*  Rounded Box Styles */
-/* ====================================================== */
-div.white_box div.header   {background: transparent url("../images/white-header-top.png") repeat-x 0pt;}
-div.white_box div.header_l {background: transparent url("../images/white-header-left.png") no-repeat 0pt;}
-div.white_box div.header_r {background: transparent url("../images/white-header-right.png") no-repeat 100% 0pt;}
-div.white_box div.header_r {height: 18px;}
-
-div.white_box div.content   {background: #ffffff; } 
-div.white_box div.content_l {background: transparent url("../images/content-left.png") repeat-y 0pt;}
-div.white_box div.content_r {background: transparent url("../images/content-right.png") repeat-y 100% 0pt;}
-div.white_box div.content_r {padding-left: 6px; padding-right: 9px;}
-
-div.white_box div.footer {background: transparent url("../images/white-footer-bottom.png") repeat-x 0pt;}
-div.white_box div.footer_l {background: transparent url("../images/white-footer-left.png") no-repeat 0pt;}
-div.white_box div.footer_r {background: transparent url("../images/white-footer-right.png") no-repeat 100% 0pt;}
-div.white_box div.footer_r {color: #ffffff; height:37px; padding:0px;}
-div.white_box div.footer_r {padding-left: 6px;padding-right: 9px;}
-
-div.black_box div.footer {background: transparent url("../images/black-footer-bottom.png") repeat-x 0pt;}
-div.black_box div.footer_l {background: transparent url("../images/black-footer-left.png") no-repeat 0pt;}
-div.black_box div.footer_r {background: transparent url("../images/black-footer-right.png") no-repeat right bottom;}
-div.black_box div.footer_r {color: #ffffff; height:37; padding:0px;}
-div.black_box div.footer_r {padding-left: 6px;padding-right: 9px;}
-
-/* ====================================================== */
-/*  Logo Positioning */
-/* ====================================================== */
-div#activemq_logo{background: transparent url("../images/activemq-logo.png") no-repeat left top; height: 100px; }
-div#activemq_logo{margin-left: 20px; overflow: hidden;}
-div#asf_logo {background: transparent url("../images/asf-logo.png") no-repeat right center; height: 100px; }
-
-/* ====================================================== */
-/*  Top and Bottom Bar Styling */
-/* ====================================================== */
-div.top_red_bar {
-  background: transparent url("../images/top-red-bar.png") repeat 0pt; 
-  overflow: hidden;
-}
-div.bottom_red_bar {
-  background: transparent url("../images/bottom-red-bar.png") repeat 0pt; height: 11px;
-  overflow: hidden;
-}
-
-div#site-breadcrumbs {
-  margin: 0px;
-  padding: 0px;
-  float:left;
-  padding: 2px;
-  padding-left: 20px;
-}
-div#site-quicklinks {
-  margin: 0px;
-  padding: 2px;
-  padding-right: 20px;
-}
-div#site-quicklinks p {
-  text-align: right;
-  padding: 0px; 
-  margin: 0px;
-}
-
-div#site-quicklinks, div#site-breadcrumbs, div#site-quicklinks p, div#site-breadcrumbs p,
-div#site-quicklinks a:link, div#site-quicklinks a:visited,
-div#site-breadcrumbs a:link, div#site-breadcrumbs a:visited {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 16px;
-  color: #ffffff;
-  text-decoration: none;
-}
-div#site-quicklinks a:active, div#site-quicklinks a:hover,
-div#site-breadcrumbs a:active, div#site-breadcrumbs a:hover {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 13px;
-  color: #c0c0c0;
-  text-decoration: underline;
-}
-div#site-quicklinks sup img {
-  height: 0px;
-  width: 0px;
-}
-
-/* ====================================================== */
-/*  Navigation Styling */
-/* ====================================================== */
-div.navigation {background: #ffffff url("../images/right-box-left.png") repeat-y left 0pt; width:200px;}
-div.navigation_top {background: transparent url("../images/right-box-top.png") no-repeat left top;} 
-div.navigation_bottom {background: transparent url("../images/right-box-bottom.png") no-repeat left bottom;}
-div.navigation_bottom {padding-left: 5px;padding-right:11px; padding-top:17px; padding-bottom:17px;}
-
-/* div.navigation {float:right;} */
-div.navigation_bottom ol, 
-div.navigation_bottom ul, 
-div.navigation_bottom {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 13px;
-  text-align: left;
-  padding-left: 11px;
-}
-
-div.navigation {
-  text-align: left;
-  clear: left;
-}
-
-
-div.navigation h3, 
-div.navigation h3 a:link, div.navigation h3 a:visited, div.navigation h3 a:active, div.navigation h3 a:hover { 
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 120%;
-
-  border: none;
-  font-size: 15px; 
-  text-decoration: none;
-  color: #660033;
-  margin:5px;
-}
-
-div.navigation h3 {
-  background: url("../images/big-bullet.png") no-repeat 0pt;
-  background-position:left center;
-  margin-left:15px;
-  padding-left: 20px;
-}
-
-div.navigation a:link, div.navigation a:visited, div.navigation a:active, div.navigation a:hover {
-  text-decoration: none;
-  color: #000000;
-}
-div.navigation a:active, div.navigation a:hover {
-  text-decoration: underline;
-  color: #880055;
-}
-
-div.navigation ul {
-  padding-left: 25px;
-  list-style: none; 
-  padding-bottom: 10px;
-  border-bottom:1px solid #CACACA;
-  margin: 0px;
-  margin-left: 10px;
-  margin-bottom: 10px;
-}
-
-div.navigation_bottom div { 
-  margin-left:10px;
-  padding-left:25px;
-  padding-bottom: 10px;
-  margin-bottom: 10px;
-  border-bottom:1px solid #CACACA;
-}
-
-div.navigation img {
-  margin-left:15px;
-  padding-left: 20px;
-}
-
-div.navigation sup img { height: 0px; width: 0px; }
-
-/* ====================================================== */
-/*  Footer Styling */
-/* ====================================================== */
-div.black_box div.footer_r div {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 10px;
-  font-weight: normal;	
-  line-height: normal;
-  padding:5px;
-  padding-left:20px;
-}
-
-div.design_attribution, div.design_attribution a {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 10px;
-  text-align:center;
-  color: #a0a0a0;
-}
diff --git a/trunk/activemq-web-console/src/main/webapp/styles/sorttable.css b/trunk/activemq-web-console/src/main/webapp/styles/sorttable.css
deleted file mode 100644
index 98cd35a..0000000
--- a/trunk/activemq-web-console/src/main/webapp/styles/sorttable.css
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.
- */
-
-table.sortable {
-  margin: 0px;
-  padding: 0px;
-  margin-bottom: 1em;
-
-  margin: 1em auto;
-}
-
-th {                              
-  padding: 2px;
-  padding-left: 10px;
-  text-align: left;
-  background-color: #ccc;
-}
-
-tfoot {
- /*  border-top: 1px solid black; */
-}
-
-td {
-  padding: 0.5em;
- /*  border: 1px solid black;  */
-  /** border-top: 1px solid black; */
-}
-
-tr {
-  background-color: #ffffff;
-}
-
-tr.odd {
-  background-color: #f3f3f3;
-}
-
-td.numeric,
-  th.numeric {
-  text-align: right;
-}
-
-/** forms using table layout */
-td.label {
-  background-color: #f3f3f3;
-}
-/*
-table.layout {
-  border-bottom: solid white;
-  border-right: solid white;
-}
-
-td.layout {
-  border-top: 1px solid black;
-  border: solid white;
-}
-*/
diff --git a/trunk/activemq-web-console/src/main/webapp/styles/type-settings.css b/trunk/activemq-web-console/src/main/webapp/styles/type-settings.css
deleted file mode 100644
index e1ba15b..0000000
--- a/trunk/activemq-web-console/src/main/webapp/styles/type-settings.css
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.
- */
-body, p, ul, ol {
-    font-family: verdana,arial,helvetica,sans-serif;
-    font-size: 14px;
-    font-size-adjust: none;
-    font-style: normal;
-    font-font-variant: normal;
-    font-weight: normal;
-    line-height: 140%;
-    color: #000000;
-}
-
-div.body-content {
-    padding-left: 25px;
-}
-
-td, table, tr {
-    font-family: verdana,arial,helvetica,sans-serif;
-    font-size: 10px;
-    font-size-adjust: none;
-    font-style: normal;
-    font-font-variant: normal;
-    font-weight: normal;
-    line-height: normal; 
-    color: #000000;
-}
-
-a:link, a:visited, a:active, a:hover {
-   color: #880055;
-   text-decoration: none;
-}
-
-a:active, a:hover {
-   text-decoration: underline;
-   color: #202020;
-}
-
-ul, ol {
-    margin-left: 15px;
-    margin-top: 5px;
-    margin-bottom: 5px;
-    padding: 0px;
-    font-size: 12px;
-}
-
-ul li {
-    list-style-image: url("../images/small-bullet-red.png");
-}
-ul li ul li{
-    list-style-image: url("../images/small-bullet-gray.png");
-}
-
-pre {
-    padding: 0px;
-    margin-top: 5px;
-    margin-left: 15px;
-    margin-bottom: 5px;
-    margin-right: 5px;
-    text-align: left;
-}
-
-hr {
-    color: #3c78b5;
-    height: 1;
-}
-
-input {
-    font-family: verdana, geneva, arial, sans-serif;
-    font-size: 11px;
-    color: #000000;
-}
-
-textarea {
-    font-family: verdana, geneva, arial, sans-serif;
-    font-size: 11px;
-    color: #333333;
-}
-
-h1, h2, h3, h4, h5, h6  {
-  font-family: Georgia,'Times New Roman',serif;
-  line-height: normal;
-  font-weight: bold;
-}
-
-h1 {
-  border-bottom: 1px solid #808080;
-  padding: 2px;
-  margin: 36px 0px 4px -25px;
-  font-size: 20px;
-}
-h1 a:link, h1 a:visited, h1 a:active {
-    text-decoration: none;
-}
-
-h1 a:hover {
-    border-bottom: 1px dotted #660033;
-}
-
-h2 {
-  border-bottom: 1px solid #a0a0a0;
-  padding: 2px;
-  margin: 27px 0px 4px -20px;
-  font-size: 18px;
-}
-
-h3 {
-  border-bottom: 1px solid #c0c0c0;
-  padding: 2px;
-  margin: 21px 0px 4px -15px;
-  font-size: 16px;
-}
-
-h4 {
-  border-bottom: 1px solid #c0c0c0;
-  padding: 2px;
-  margin: 18px 0px 4px -10px;
-  font-size: 15px;
-}
-
-h5 {
-  padding: 2px;
-  margin: 14px 0px 4px -5px;
-  font-size: 14px;
-}
-
-h6 {
-  padding: 2px;
-  margin: 14px 0px 4px -5px;
-  font-size: 13px;
-}
-
-blockquote {
-    padding-left: 10px;
-    padding-right: 10px;
-    margin-left: 5px;
-    margin-right: 0px;
-    border-left: 1px solid #3c78b5;
-}
-
-.tooltip {  position: relative;
-    text-decoration: none;
-}
-
-.tooltip span {
-    display: none;
-}
-
-.tooltip:hover span {
-    position: absolute;
-    top: 10px;
-    left: 25px;
-    display: block;
-    background: #ccc;
-    color: #880055;
-    border: 1px solid #880055;
-}
-
-div.message {
-    width: 1000px;
-    height: 750px;
-    overflow : scroll;
-}
\ No newline at end of file
diff --git a/trunk/activemq-web-console/src/main/webapp/subscribers.jsp b/trunk/activemq-web-console/src/main/webapp/subscribers.jsp
deleted file mode 100644
index 411d655..0000000
--- a/trunk/activemq-web-console/src/main/webapp/subscribers.jsp
+++ /dev/null
@@ -1,158 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Durable Topic Subscribers</title>
-</head>
-<body>
-
-<form action="createSubscriber.action" method="post">
-    <input type="hidden" name="JMSDestinationType" value="topic"/>
-    <input type="hidden" name="secret" value="<c:out value='${sessionScope["secret"]}'/>"/>
-
-<table id="createSubscribers" class="sortable autostripe">
-<thead>
-<tr>
-    <th colspan="4">Create Durable Topic Subscribers</th>
-</tr>
-</thead>
-<tbody>
-
-<tr>
-	<td class="label">
-	    <label name="clientId">Client ID</label>
-	</td>
-    <td>
-        <input type="text" name="clientId" value=""/>
-    </td>
-    <td class="label">
-        <label name="subscriberName">Subscriber Name</label>
-    </td>
-    <td>
-        <input type="text" name="subscriberName" value=""/>
-    </td>
-</tr>
-<tr>
-    <td>
-		<label name="JMSDestination">Topic Name</label>
-    </td>
-    <td>
-		<input type="text" name="JMSDestination" value=""/>
-    </td>
-    <td>
-        <label name="selector">JMS Selector</label>
-    </td>
-    <td>
-        <input type="text" name="selector" value=""/>
-    </td>
-</tr>
-<tr>
-    <td colspan="4" align="center">
-        <input type="submit" value="Create Durable Topic Subscriber"/>
-    </td>
-</tr>
-</tbody>
-</table>
-</form>
-
-
-<h2>Active Durable Topic Subscribers</h2>
-
-
-<table id="topics" class="sortable autostripe">
-<thead>
-<tr>
-<th>Client ID</th>
-<th>Subscription Name</th>
-<th>Connection ID</th>
-<th>Destination</th>
-<th>Selector</th>
-<th>Pending Queue Size</th>
-<th>Dispatched Queue Size</th>
-<th>Dispatched Counter</th>
-<th>Enqueue Counter</th>
-<th>Dequeue Counter</th>
-<th>Operations</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.brokerQuery.durableTopicSubscribers}" var="row">
-<tr>
-<td><form:tooltip text="${row.clientId}" length="10"/></td>
-<td><form:tooltip text="${row.subscriptionName}" length="10"/></td>
-<td><form:tooltip text="${row.connectionId}" length="10"/></td>
-<td><form:tooltip text="${row.destinationName}" length="10"/></td>
-<td>${row.selector}</td>
-<td>${row.pendingQueueSize}</td>
-<td>${row.dispatchedQueueSize}</td>
-<td>${row.dispatchedCounter}</td>
-<td>${row.enqueueCounter}</td>
-<td>${row.dequeueCounter}</td>
-<td>
-    <a href="deleteSubscriber.action?clientId=${row.clientId}&subscriberName=${row.subscriptionName}&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a>
-</td>
-</tr>
-</c:forEach>
-
-</tbody>
-</table>
-
-<h2>Offline Durable Topic Subscribers</h2>
-
-
-<table id="topics" class="sortable autostripe">
-<thead>
-<tr>
-<th>Client ID</th>
-<th>Subscription Name</th>
-<th>Connection ID</th>
-<th>Destination</th>
-<th>Selector</th>
-<th>Pending Queue Size</th>
-<th>Dispatched Queue Size</th>
-<th>Dispatched Counter</th>
-<th>Enqueue Counter</th>
-<th>Dequeue Counter</th>
-<th>Operations</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.brokerQuery.inactiveDurableTopicSubscribers}" var="row">
-<tr>
-<td><form:tooltip text="${row.clientId}" length="10"/></td>
-<td><form:tooltip text="${row.subscriptionName}" length="10"/></td>
-<td><form:tooltip text="${row.connectionId}" length="10"/></td>
-<td><form:tooltip text="${row.destinationName}" length="10"/></td>
-<td>${row.selector}</td>
-<td>${row.pendingQueueSize}</td>
-<td>${row.dispatchedQueueSize}</td>
-<td>${row.dispatchedCounter}</td>
-<td>${row.enqueueCounter}</td>
-<td>${row.dequeueCounter}</td>
-<td>
-    <a href="deleteSubscriber.action?clientId=${row.clientId}&subscriberName=${row.subscriptionName}&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a>
-</td>
-</tr>
-</c:forEach>
-
-</tbody>
-</table>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/test/dummy.jsp b/trunk/activemq-web-console/src/main/webapp/test/dummy.jsp
deleted file mode 100644
index cdb062b..0000000
--- a/trunk/activemq-web-console/src/main/webapp/test/dummy.jsp
+++ /dev/null
@@ -1,52 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Test Pages</title>
-</head>
-<body>
-
-<h2>Test Pages</h2>
-
-These pages are used to test out the environment and web framework.
-
-<table class="autostripe">
-<thead>
-<tr>
-<th colspan="2">Values</th>
-</tr>
-</thead>
-<tbody>
-<tr> 
-  <td class="label">Broker type</td>
-  <td>${requestContext.brokerQuery.broker.class}</td>
-</tr>
-<tr> 
-  <td class="label">Managed broker</td>
-  <td>${requestContext.brokerQuery.brokerAdmin.broker.class}</td>
-</tr>
-<tr> 
-  <td class="label">Destinations</td>
-  <td>${requestContext.brokerQuery.managedBroker.queueRegion.destinationMap}</td>
-</tr>
-</tbody>
-</table>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/test/index.jsp b/trunk/activemq-web-console/src/main/webapp/test/index.jsp
deleted file mode 100644
index 65719d4..0000000
--- a/trunk/activemq-web-console/src/main/webapp/test/index.jsp
+++ /dev/null
@@ -1,84 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Test Pages</title>
-</head>
-<body>
-
-<h2>Test Pages</h2>
-
-These pages are used to test out the environment and web framework.
-
-<table class="autostripe">
-<thead>
-<tr>
-<th colspan="2">Headers</th>
-</tr>
-</thead>
-<tbody>
-<tr> 
-  <td class="label">request.contextPath</td>
-  <td>${request.contextPath}</td>
-</tr>
-<tr> 
-  <td class="label">request.requestURI</td>
-  <td>${request.requestURI}</td>
-</tr>
-<tr> 
-  <td class="label">request.remoteAddr</td>
-  <td>${request.remoteAddr}</td>
-</tr>
-<tr> 
-  <td class="label">request.remoteHost</td>
-  <td>${request.remoteHost}</td>
-</tr>
-<tr> 
-  <td class="label">request.queryString</td>
-  <td>${request.queryString}</td>
-</tr>
-<tr> 
-  <td class="label">request.scheme</td>
-  <td>${request.scheme}</td>
-</tr>
-<tr> 
-  <td class="label">request.serverName</td>
-  <td>${request.serverName}</td>
-</tr>
-<tr> 
-  <td class="label">request.serverPort</td>
-  <td>${request.serverPort}</td>
-</tr>
-<tr> 
-  <td class="label">Spring applicationContext</td>
-  <td>${applicationContext}</td>
-</tr>
-<tr> 
-  <td class="label">Spring requestContext</td>
-  <td>${requestContext}</td>
-</tr>
-<tr> 
-  <td class="label">System properties</td>
-  <td><%= System.getProperties() %></td>
-</tr>
-</tbody>
-</table>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/test/systemProperties.jsp b/trunk/activemq-web-console/src/main/webapp/test/systemProperties.jsp
deleted file mode 100644
index a4b2bc6..0000000
--- a/trunk/activemq-web-console/src/main/webapp/test/systemProperties.jsp
+++ /dev/null
@@ -1,53 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Test Pages</title>
-</head>
-<body>
-
-<h2>Test Pages</h2>
-
-These pages are used to test out the environment and web framework.
-
-<table class="sortable autostripe">
-<thead>
-<tr>
-<th>System Property</th>
-<th>Value</th>
-</tr>
-</thead>
-<tbody>
-    
-<%
-    for (java.util.Iterator iter = System.getProperties().entrySet().iterator(); iter.hasNext(); ) {
-        request.setAttribute("entry", iter.next());
-%>    
-<tr> 
-  <td class="label">${entry.key}</td>
-  <td>${entry.value}</td>
-</tr>
-<%
-}
-%>
-</tbody>
-</table>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/topics.jsp b/trunk/activemq-web-console/src/main/webapp/topics.jsp
deleted file mode 100644
index ae608d1..0000000
--- a/trunk/activemq-web-console/src/main/webapp/topics.jsp
+++ /dev/null
@@ -1,66 +0,0 @@
-<%--
-    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.
---%>
-<html>
-<head>
-<title>Topics</title>
-</head>
-<body>
-
-<div>
-<form action="createDestination.action" method="post">
-    <input type="hidden" name="JMSDestinationType" value="topic"/>
-    <input type="hidden" name="secret" value="<c:out value='${sessionScope["secret"]}'/>"/>
-
-    <label name="destination">Topic Name</label>
-    <input type="text" name="JMSDestination" value=""/>
-
-    <input type="submit" value="Create"/>
-</form>
-</div>
-
-<h2>Topics</h2>
-
-<table id="topics" class="sortable autostripe">
-<thead>
-<tr>
-<th>Name</th>
-<th>Number Of Consumers</th>
-<th>Messages Enqueued</th>
-<th>Messages Dequeued</th>
-<th>Operations</th>
-</tr>
-</thead>
-<tbody>
-<c:forEach items="${requestContext.brokerQuery.topics}" var="row">
-<tr>
-<td><a href="send.jsp?JMSDestination=<c:out value="${row.name}" />&JMSDestinationType=topic"><form:tooltip text="${row.name}" length="50"/></a></td>
-<td>${row.consumerCount}</td>
-<td>${row.enqueueCount}</td>
-<td>${row.dequeueCount}</td>
-<td>
-    <a href="send.jsp?JMSDestination=<c:out value="${row.name}" />&JMSDestinationType=topic">Send To</a>
-    <a href="deleteDestination.action?JMSDestination=<c:out value="${row.name}" />&JMSDestinationType=topic&secret=<c:out value='${sessionScope["secret"]}'/>">Delete</a>
-</td>
-</tr>
-</c:forEach>
-</tbody>
-</table>
-
-
-</body>
-</html>
-	
diff --git a/trunk/activemq-web-console/src/main/webapp/xml/queues.jsp b/trunk/activemq-web-console/src/main/webapp/xml/queues.jsp
deleted file mode 100644
index 6a09e22..0000000
--- a/trunk/activemq-web-console/src/main/webapp/xml/queues.jsp
+++ /dev/null
@@ -1,34 +0,0 @@
-<%@ page contentType="text/xml;charset=ISO-8859-1"%>
-<%--
-    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.
---%>
-<queues>
-<c:forEach items="${requestContext.brokerQuery.queues}" var="row">
-<queue name="${row.name}">
-
-  <stats size="${row.queueSize}"
-         consumerCount="${row.consumerCount}"
-         enqueueCount="${row.enqueueCount}"
-         dequeueCount="${row.dequeueCount}"/>
-
-
-  <feed>
-    <atom><c:url value="queueBrowse/${row.name}?view=rss&amp;feedType=atom_1.0"/></atom>
-    <rss><c:url value="queueBrowse/${row.name}?view=rss&amp;feedType=rss_2.0"/></rss>
-  </feed>
-</queue>
-</c:forEach>
-</queues>
diff --git a/trunk/activemq-web-console/src/main/webapp/xml/topics.jsp b/trunk/activemq-web-console/src/main/webapp/xml/topics.jsp
deleted file mode 100644
index bb31a89..0000000
--- a/trunk/activemq-web-console/src/main/webapp/xml/topics.jsp
+++ /dev/null
@@ -1,29 +0,0 @@
-<%@ page contentType="text/xml;charset=ISO-8859-1"%>
-<%--
-    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.
---%>
-<topics>
-<c:forEach items="${requestContext.brokerQuery.topics}" var="row">
-<topic name="${row.name}">
-
-  <stats size="${row.queueSize}"
-         consumerCount="${row.consumerCount}"
-         enqueueCount="${row.enqueueCount}"
-         dequeueCount="${row.dequeueCount}"/>
-
-</topic>
-</c:forEach>
-</topics>
diff --git a/trunk/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java b/trunk/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java
deleted file mode 100644
index 549e3c1..0000000
--- a/trunk/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.web.tool;
-
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-/**
- * A simple bootstrap class for starting Jetty in your IDE using the local web
- * application.
- * 
- * 
- */
-public final class Main {
-
-    public static final int PORT = 8080;
-
-    public static final String WEBAPP_DIR = "src/main/webapp";
-
-    public static final String WEBAPP_CTX = "/";
-
-    private Main() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        // now lets start the web server
-        int port = PORT;
-        if (args.length > 0) {
-            String text = args[0];
-            port = Integer.parseInt(text);
-        }
-        System.out.println("Starting Web Server on port: " + port);
-        Server server = new Server();
-        SelectChannelConnector connector = new SelectChannelConnector();
-        connector.setPort(port);
-        connector.setServer(server);
-        WebAppContext context = new WebAppContext();
-
-        context.setResourceBase(WEBAPP_DIR);
-        context.setContextPath(WEBAPP_CTX);
-        context.setServer(server);
-        server.setHandler(context);
-        server.setConnectors(new Connector[] {
-            connector
-        });
-        server.start();
-
-        System.out.println();
-        System.out.println("==============================================================================");
-        System.out.println("Started the ActiveMQ Console: point your web browser at http://localhost:" + port + "/");
-        System.out.println("==============================================================================");
-        System.out.println();
-    }
-}
diff --git a/trunk/activemq-web-demo/README.txt b/trunk/activemq-web-demo/README.txt
deleted file mode 100755
index eba4246..0000000
--- a/trunk/activemq-web-demo/README.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Welcome to the Web Demo which shows how to use ActiveMQ with REST and Ajax services
-
-To run the console you must install a recent distro of Maven
-such as version 2.0.4 or later
-	
-		http://maven.apache.org/
-
-You can then run the ActiveMQ Web Console via the following command.
-
-	mvn jetty6:run
-
-
diff --git a/trunk/activemq-web-demo/pom.xml b/trunk/activemq-web-demo/pom.xml
deleted file mode 100755
index 9beea5b..0000000
--- a/trunk/activemq-web-demo/pom.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-web-demo</artifactId>
-  <packaging>war</packaging>
-  <name>ActiveMQ :: Web Demo</name>
-  <description>Web Demo for REST API and Streamlets support</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>jetty-maven-plugin</artifactId>
-        <version>${jetty-version}</version>
-        <configuration>
-          <connectors>
-            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
-              <port>${jetty.port}</port>
-              <maxIdleTime>60000</maxIdleTime>
-            </connector>
-          </connectors>
-          <scanIntervalSeconds>10</scanIntervalSeconds>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-
-    <!-- j2ee jars -->
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jacc_1.1_spec</artifactId>
-    </dependency>
-
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-web</artifactId>
-    </dependency>
-
-    <!-- TODO this should not be needed, but transitive dependencies are not working -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <scope>test</scope>
-      <type>test-jar</type>
-    </dependency>
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-jaas</artifactId>
-      <optional>true</optional>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- web container -->
-    <dependency>
-      <groupId>org.eclipse.jetty.aggregate</groupId>
-      <artifactId>jetty-all-server</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <!--  for custom XML parsing -->
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>xpp3</groupId>
-      <artifactId>xpp3</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-    </dependency>
-
-    <!-- used for testing -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-      <version>${commons-lang-version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- Derby SQL DB used for testing JDBC message store -->
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-    </dependency>
-
-  </dependencies>
-
-  <properties>
-    <jetty.port>8080</jetty.port>
-  </properties>
-</project>
diff --git a/trunk/activemq-web-demo/src/main/resources/log4j.properties b/trunk/activemq-web-demo/src/main/resources/log4j.properties
deleted file mode 100755
index df9480b..0000000
--- a/trunk/activemq-web-demo/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.spring=WARN
-log4j.logger.org.apache.activemq.web=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/test-reports/activemq-test.log
-log4j.appender.out.append=true
diff --git a/trunk/activemq-web-demo/src/main/webapp/META-INF/LICENSE b/trunk/activemq-web-demo/src/main/webapp/META-INF/LICENSE
deleted file mode 100644
index e9fa337..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/META-INF/LICENSE
+++ /dev/null
@@ -1,494 +0,0 @@
-
-                                 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.
-
-=========================================================================
-== jetty-util is under the Apache License v 2.0                        ==
-=========================================================================
-=========================================================================
-== For the xmlpull library                                             ==
-=========================================================================
-
-XMLPULL API IS FREE
--------------------
-
-All of the XMLPULL API source code, compiled code, and documentation 
-contained in this distribution *except* for tests (see separate LICENSE_TESTS.txt)
-are in the Public Domain.
-
-XMLPULL API comes with NO WARRANTY or guarantee of fitness for any purpose.
-
-Initial authors:
-
-  Stefan Haustein
-  Aleksander Slominski
-
-2001-12-12
-
-=========================================================================
-== Spring is under the Apache License v 2.0                            ==
-=========================================================================
-
-=========================================================================
-== Rome 0.8 is under the Apache License v 2.0                          ==
-=========================================================================
-
-=========================================================================
-== For the xstream library                                             ==
-=========================================================================
-
-(BSD Style License)
-
-Copyright (c) 2003-2004, Joe Walnes
-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 XStream 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 JDom library                                                ==
-=========================================================================
-/*--
-
- $Id$
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions, and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions, and the disclaimer that follows
-    these conditions in the documentation and/or other materials
-    provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
-    derived from this software without prior written permission.  For
-    written permission, please contact <request_AT_jdom_DOT_org>.
-
- 4. Products derived from this software may not be called "JDOM", nor
-    may "JDOM" appear in their name, without prior written permission
-    from the JDOM Project Management <request_AT_jdom_DOT_org>.
-
- In addition, we request (but do not require) that you include in the
- end-user documentation provided with the redistribution and/or in the
- software itself an acknowledgement equivalent to the following:
-     "This product includes software developed by the
-      JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JDOM AUTHORS OR THE PROJECT
- 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.
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the JDOM Project and was originally
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
- on the JDOM Project, please see <http://www.jdom.org/>.
-
- */
-=========================================================================
-== 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                                           ==
-=========================================================================
-
-<p><em>License</em> </p>
-
-<p>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. </p>
-
-<p>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. </p>
-
-
-<p><strong>1. Definitions</strong> </p>
-
-<ol type="a">
-
-<li>
-<strong>"Collective Work"</strong> 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.
-</li>
-
-<li>
-<strong>"Derivative Work"</strong> 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.</li>
-
-<li>
-<strong>"Licensor"</strong> means the individual or entity that offers the Work under the terms of this License.
-</li>
-
-<li>
-<strong>"Original Author"</strong> means the individual or entity who created the Work.
-</li>
-
-<li>
-<strong>"Work"</strong> means the copyrightable work of authorship offered under the terms of this License.
-</li>
-
-<li>
-<strong>"You"</strong> 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.
-
-</li>
-</ol>
-
-<p><strong>2. Fair Use Rights.</strong> 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. </p>
-
-
-<p><strong>3. License Grant.</strong> 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: </p>
-
-
-<ol type="a">
-<li>
-
-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;
-</li>
-
-<li>
-to create and reproduce Derivative Works;
-</li>
-
-<li>
-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;
-
-</li>
-
-<li>
-to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
-</li>
-
-<li><p>For the avoidance of doubt, where the work is a musical composition:</p>
-
-<ol type="i">
-<li><strong>Performance Royalties Under Blanket Licenses</strong>. 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.</li>
-
-<li><strong>Mechanical Rights and Statutory Royalties</strong>. 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).</li></ol></li>
-
-<li><strong>Webcasting Rights and Statutory Royalties</strong>. 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).</li>
-
-</ol>
-
-
-<p>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.</p>
-
-<p><strong>4. Restrictions.</strong>The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: </p>
-
-
-<ol type="a">
-<li>
-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.
-</li>
-
-
-<li>
-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.
-</li>
-
-</ol>
-
-
-
-
-
-
-<p><strong>5. Representations, Warranties and Disclaimer</strong></p>
-
-<p>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.</p>
-
-
-<p><strong>6. Limitation on Liability.</strong> 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. </p>
-
-<p><strong>7. Termination</strong> </p>
-
-<ol type="a">
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-</ol>
-
-<p><strong>8. Miscellaneous</strong> </p>
-
-<ol type="a">
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-
-<li>
-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.
-</li>
-
-<li>
-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.
-
-</li>
-
-<li>
-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.
-</li>
-</ol>
diff --git a/trunk/activemq-web-demo/src/main/webapp/META-INF/NOTICE b/trunk/activemq-web-demo/src/main/webapp/META-INF/NOTICE
deleted file mode 100644
index 5436772..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/META-INF/NOTICE
+++ /dev/null
@@ -1,82 +0,0 @@
-
-Apache ActiveMQ
-Copyright 2005-2006 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-=========================================================================
-==  Derby Notice                                                       ==
-=========================================================================
-
-Portions of Derby were orginally developed by
-International Business Machines Corporation and are
-licensed to the Apache Software Foundation under the
-"Software Grant and Corporate Contribution License Agreement",
-informally known as the "Derby CLA".
-
-The portion of the functionTests under 'nist' was originally
-developed by the National Institute of Standards and Technology (NIST),
-an agency of the United States Department of Commerce, and adapted by
-International Business Machines Corporation in accordance with the NIST
-Software Acknowledgment and Redistribution document at
-http://www.itl.nist.gov/div897/ctg/sql_form.htm
-
-=========================================================================
-==  Spring Notice                                                      ==
-=========================================================================
-
-This product includes software developed by
-the Apache Software Foundation (http://www.apache.org).
-
-This product also includes software developed by
-Clinton Begin (http://www.ibatis.com).
-
-The end-user documentation included with a redistribution, if any,
-must include the following acknowledgement:
-
- "This product includes software developed by the Spring Framework
-  Project (http://www.springframework.org)."
-
-Alternately, this acknowledgement may appear in the software itself,
-if and wherever such third-party acknowledgements normally appear.
-
-The names "Spring" and "Spring Framework" must not be used to
-endorse or promote products derived from this software without
-prior written permission. For written permission, please contact
-rod.johnson@interface21.com or juergen.hoeller@interface21.com.
-
-=========================================================================
-==  Rome Notice (not from Rome site)                                   ==
-=========================================================================
-Rome 0.8 Copyright 2004 Sun Microsystems, Inc.
-This product includes software developed by the Sun Microsystems, Inc.
-(http://wiki.java.net/bin/view/Javawsxml/Rome).
-
-==============================================================
- 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.
diff --git a/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml b/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml
deleted file mode 100755
index 002b61c..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-    "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
-    <display-name>ActiveMQ Web Demos</display-name>
-    <description>
-    Apache ActiveMQ Web Demos
-    </description>
-
-    <!-- context config -->
-    <context-param>
-        <param-name>org.apache.activemq.brokerURL</param-name>
-        <param-value>vm://localhost</param-value>
-        <description>The URL of the Message Broker to connect to</description>
-    </context-param>
-
-    <context-param>
-        <param-name>org.apache.activemq.embeddedBroker</param-name>
-        <param-value>true</param-value>
-        <description>Whether we should include an embedded broker or not</description>
-    </context-param>
-
-    <!-- servlet mappings -->
-    
-    <!-- the subscription REST servlet -->
-    <servlet>
-        <servlet-name>AjaxServlet</servlet-name>
-        <servlet-class>org.apache.activemq.web.AjaxServlet</servlet-class>
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-
-    <servlet>
-        <servlet-name>MessageServlet</servlet-name>
-        <servlet-class>org.apache.activemq.web.MessageServlet</servlet-class>
-        <load-on-startup>1</load-on-startup>
-        <!--
-        Uncomment this parameter if you plan to use multiple consumers over REST
-        <init-param>
-                <param-name>destinationOptions</param-name>
-                <param-value>consumer.prefetchSize=1</param-value>
-        </init-param> 
-        -->
-
-    </servlet>
-
-    <!-- the queue browse servlet -->
-    <servlet>
-        <servlet-name>QueueBrowseServlet</servlet-name>
-        <servlet-class>org.apache.activemq.web.QueueBrowseServlet</servlet-class>
-    </servlet>
-
-    <!-- servlets for the portfolio demo -->
-    <servlet>
-        <servlet-name>PortfolioPublishServlet</servlet-name>
-        <servlet-class>org.apache.activemq.web.PortfolioPublishServlet</servlet-class>
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-    
-    <servlet-mapping>
-        <servlet-name>AjaxServlet</servlet-name>
-        <url-pattern>/amq/*</url-pattern>
-    </servlet-mapping>
-    
-    <servlet-mapping>
-        <servlet-name>MessageServlet</servlet-name>
-        <url-pattern>/message/*</url-pattern>
-    </servlet-mapping>
-    
-    <servlet-mapping>
-        <servlet-name>QueueBrowseServlet</servlet-name>
-        <url-pattern>/queueBrowse/*</url-pattern>
-    </servlet-mapping>
-    
-    <servlet-mapping>
-        <servlet-name>PortfolioPublishServlet</servlet-name>
-        <url-pattern>/portfolioPublish</url-pattern>
-    </servlet-mapping>
-
-    <filter>
-      <filter-name>session</filter-name>
-      <filter-class>org.apache.activemq.web.SessionFilter</filter-class>
-    </filter>
-    
-    <filter-mapping>
-      <filter-name>session</filter-name>
-      <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
-    <listener>
-        <listener-class>org.apache.activemq.web.SessionListener</listener-class>
-    </listener>
-</web-app>
diff --git a/trunk/activemq-web-demo/src/main/webapp/chat.css b/trunk/activemq-web-demo/src/main/webapp/chat.css
deleted file mode 100644
index c0319ad..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/chat.css
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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.
- */
-div#chatroom
-{
-  width: 81em;
-  background-color: #e0e0e0;
-  border: 1px solid black; 
-}
-
-div#chat
-{
-  float: left;
-  width: 60em;
-  height: 40ex;
-  overflow: auto; 
-  background-color: #f0f0f0;
-  padding: 4px;
-  border-right: 1px solid black; 
-}
-
-div#members
-{
-  float: left;
-  clear: right;
-  width: 20em;
-  border: 0px solid black; 
-}
-
-div#input
-{
-  clear: both;
-  padding: 4px;
-  border-top: 1px solid black; 
-}
-
-input#phrase
-{
-  width:28em;
-  background-color: #e0f0f0;
-}
-
-input#username
-{
-  width:14em;
-  background-color: #e0f0f0;
-}
-
-div.hidden
-{
-  display: none;
-}
-
-span.from
-{
-  font-weight: bold;
-}
-
-span.alert
-{
-  font-style: italic;
-}
-
diff --git a/trunk/activemq-web-demo/src/main/webapp/chat.html b/trunk/activemq-web-demo/src/main/webapp/chat.html
deleted file mode 100755
index 73592bc..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/chat.html
+++ /dev/null
@@ -1,219 +0,0 @@
-<!--
-  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.
--->
- 
- 
- 
- 
- 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
-<html> 
-<head> 
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
-    <title>Chat Example - ActiveMQ Web Demos</title> 
-    <link rel="stylesheet" href="chat.css" type="text/css">
-    <style type="text/css" media="screen"> 
-        @import url(/admin/styles/sorttable.css);
-        @import url(/admin/styles/type-settings.css);
-        @import url(/admin/styles/site.css);
-        @import url(/admin/styles/prettify.css);
-    </style>
-
-	<!--<script type="text/javascript" src="js/prototype.js"></script>-->
-	<!--<script type="text/javascript" src="js/amq_prototype_adapter.js"></script>-->
-	<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
-	<script type="text/javascript" src="js/amq_jquery_adapter.js"></script>
-
-	<script type="text/javascript" src="js/amq.js"></script>
-	<script type="text/javascript" src="js/chat.js"></script>
-	<script type="text/javascript">
-
-		// Note, normally you wouldn't just add an onload function in this
-		// manner. In fact, you typically want to fire this method on the
-		// document.onready event, however this type of functionality is verbose
-		// and best left to the domain of your favorite js library.
-		//
-		// For example, in jQuery the following onload would be replaced with:
-		// jQuery(function() {
-		//     org.activemq.Amq.init({ uri: 'amq' });
-		//     org.activemq.Chat.init();
-		// }
-		window.onload = function() {
-			org.activemq.Amq.init({ uri: 'amq', logging: true, timeout: 45, clientId:(new Date()).getTime().toString() });
-			org.activemq.Chat.init();
-		};
-	</script>    
-    
-</head> 
- 
-<body> 
- 
- 
-<div class="white_box"> 
-    <div class="header"> 
-        <div class="header_l"> 
-            <div class="header_r"> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="content"> 
-        <div class="content_l"> 
-            <div class="content_r"> 
- 
-                <div> 
- 
-                    <!-- Banner --> 
-                    <div id="asf_logo"> 
-                        <div id="activemq_logo"> 
-                            <a style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;"
-                               href="http://activemq.apache.org/"
-                               title="The most popular and powerful open source Message Broker">ActiveMQ</a> 
-                            <a style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;"
-                               href="http://www.apache.org/" title="The Apache Software Foundation">ASF</a> 
-                        </div> 
-                    </div> 
- 
- 
-                    <div class="top_red_bar"> 
-                        <div id="site-breadcrumbs"> 
-                            <a href="index.html" title="Home">Home</a>
-                        </div> 
-                        <div id="site-quicklinks"><P> 
-                            <a href="http://activemq.apache.org/support.html"
-                               title="Get help and support using Apache ActiveMQ">Support</a></p> 
-                        </div> 
-                    </div> 
- 
-                    <table border="0"> 
-                        <tbody> 
-                            <tr> 
-                                <td valign="top" width="100%" style="overflow:hidden;"> 
-                                    <div class="body-content">
-
-<h1>Chat Example</h1>
-
-<p>Welcome to the Ajax chat example</p>
-
-<div id="chatroom">
-	<div id="chat"></div>
-
-	<div id="members"></div>
-
-	<div id="input">
-		<div id="join" class="hidden">
-			Username:&nbsp;
-			<input id="username" type="text"/>
-			<button id="joinB">Join</button>
-		</div>
-		<div id="joined" class="hidden">
-			Chat:&nbsp;
-			<input id="phrase" type="text" />
-			<button id="sendB">Send</button>
-			<button id="leaveB">Leave</button>
-		</div>
-	</div>
-</div>
-
-<p>
-	This Chat example creates an ActiveMQ broker using the configuration
-	information found in the <code>web.xml</code> file. There isn't much there.
-	Just a name-value parameter named <code>org.apache.activemq.brokerURL</code>
-	is assigned a value of <code>vm://localhost?broker.persistent=false</code>.
-	This is enough however to lazy-initialize the broker when it is needed.
-</p>
-<p>
-	The client leverages a javascript library <code>amq.js</code> to perform all
-	of the JMS-related client side code. This involves establishing a
-	communication pipeline to the JMS server. This pipeline uses a long-poll
-	connection to the server. All JMS communication will be received down this
-	pipe, and when the JMS server has no traffic to send, this pipeline will
-	patiently wait until there is new traffic or until it times out. If a
-	timeout does occur, the connection will reconnect to the server for another
-	round. (Of course you will want/need to use a server that supports
-	continuations in order for this to scale beyond a few hundred clients.)
-</p>
-<p>
-	The <code>chat.js</code> file contains the script to respond to the UI
-	interactions. It also talks to the <code>amq.js</code> file to send messages
-	and provides a message handler that will respond to incoming JMS messages.
-</p>
-<p>
-	There is no server-side state in this application. The client sets up a JMS
-	Topic on the server and attaches itself as a listener to this topic. From
-	that point, all messages that are sent to the topic are received by each
-	listener. Even the list of members in the chat room are the result of
-	clients replying to a ping request.
-</p>
-<p>
-	Please note that <code>amq.js</code> has been refactored to allow AJAX calls
-	to be made using any javascript library. Example adapter classes for <a href="http://jquery.com/">jQuery</a>
-	and <a href="http://www.prototypejs.org/">Prototype</a> have been provided.
-</p>
-
-
-                                  </div> 
-                                </td> 
-                                <td valign="top"> 
- 
-                                    <div class="navigation"> 
-                                        <div class="navigation_top"> 
-                                            <div class="navigation_bottom"> 
-                                                <H3>Useful Links</H3> 
- 
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a href="http://activemq.apache.org/"
-                                                           title="The most popular and powerful open source Message Broker">Documentation</a></li> 
-                                                    <li><a href="http://activemq.apache.org/faq.html">FAQ</a></li> 
-                                                    <li><a href="http://activemq.apache.org/download.html">Downloads</a> 
-                                                    </li> 
-                                                    <li><a href="http://activemq.apache.org/discussion-forums.html">Forums</a> 
-                                                    </li> 
-                                                </ul> 
-                                            </div> 
-                                        </div> 
-                                    </div> 
-                                </td> 
-                            </tr> 
-                        </tbody> 
-                    </table> 
- 
- 
-                    <div class="bottom_red_bar"></div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="black_box"> 
-        <div class="footer"> 
-            <div class="footer_l"> 
-                <div class="footer_r"> 
-                    <div> 
-                        Copyright 2005-2007 The Apache Software Foundation.
- 
-                        (<a href="?printable=true">printable version</a>)
-                    </div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-</div> 
-<div class="design_attribution"><a href="http://hiramchirino.com/">Graphic Design By Hiram</a></div> 
- 
-</body> 
-</html> 
diff --git a/trunk/activemq-web-demo/src/main/webapp/index.html b/trunk/activemq-web-demo/src/main/webapp/index.html
deleted file mode 100755
index 134f00b..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/index.html
+++ /dev/null
@@ -1,181 +0,0 @@
-<!--
-  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.
--->
- 
- 
- 
- 
- 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
-<html> 
-<head> 
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
-    <title>ActiveMQ Web Demos</title> 
-    <style type="text/css" media="screen"> 
-        @import url(/admin/styles/sorttable.css);
-        @import url(/admin/styles/type-settings.css);
-        @import url(/admin/styles/site.css);
-        @import url(/admin/styles/prettify.css);
-    </style> 
-    
-        <script type='text/javascript' src='/js/common.js'></script> 
-        <script type='text/javascript' src='/js/css.js'></script> 
-        <script type='text/javascript' src='/js/standardista-table-sorting.js'></script> 
-        <script type='text/javascript' src='/js/prettify.js'></script> 
-        <script>addEvent(window, 'load', prettyPrint)</script> 
-    
- 
-    
-</head> 
- 
-<body> 
- 
- 
-<div class="white_box"> 
-    <div class="header"> 
-        <div class="header_l"> 
-            <div class="header_r"> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="content"> 
-        <div class="content_l"> 
-            <div class="content_r"> 
- 
-                <div> 
- 
-                    <!-- Banner --> 
-                    <div id="asf_logo"> 
-                        <div id="activemq_logo"> 
-                            <a style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;"
-                               href="http://activemq.apache.org/"
-                               title="The most popular and powerful open source Message Broker">ActiveMQ</a> 
-                            <a style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;"
-                               href="http://www.apache.org/" title="The Apache Software Foundation">ASF</a> 
-                        </div> 
-                    </div> 
- 
- 
-                    <div class="top_red_bar"> 
-                        <div id="site-breadcrumbs"> 
-                        </div> 
-                        <div id="site-quicklinks"><P> 
-                            <a href="http://activemq.apache.org/support.html"
-                               title="Get help and support using Apache ActiveMQ">Support</a></p> 
-                        </div> 
-                    </div> 
- 
-                    <table border="0"> 
-                        <tbody> 
-                            <tr> 
-                                <td valign="top" width="100%" style="overflow:hidden;"> 
-                                    <div class="body-content"> 
-                                        <h1>ActiveMQ Web Demos</h1>
-
-                                        <p>
-                                            Here you can find some examples on how you can exchange messages with ActiveMQ broker, using REST and Ajax APIs
-                                        </p>
-
-                                        <h2>Market data example</h2>
-
-                                        <p>
-                                            <a href="portfolioPublish?count=1&refresh=2&stocks=IBMW&stocks=BEAS&stocks=MSFT&stocks=SUNW">Market data publisher</a> starts publishing
-                                            some mock market data prices
-                                        </p>
-
-                                        <p>
-                                            <a href="portfolio/portfolio.html">Portfolio</a> example shows how you could make an interactive trading portfolio which
-                                            updates in real time as the market prices change
-                                        </p>
-
-                                        <h2>Chat example</h2>
-
-                                        <p>
-                                            <a href="chat.html">Chat room</a> example shows how you can use Streamlets and ActiveMQ to create a simple chat room
-                                        </p>
-
-                                        <h2>Simple Form based browser example</h2>
-
-                                        <p>
-                                            <a href="send.html">Send a message</a>
-                                        </p>
-
-                                        <p>
-                                            <a href="message/FOO/BAR?readTimeout=10000&type=queue">Receive a message</a>
-                                        </p>
-
-                                        <h2>Queue browser example</h2>
-
-                                        <ul>
-                                            <li><a href="queueBrowse/FOO/BAR">Browse a queue</a></li>
-                                            <li><a href="queueBrowse/FOO/BAR?view=xml">Browse a queue as XML</a></li>
-                                            <li><a href="queueBrowse/FOO/BAR?view=rss&feedType=atom_1.0">Browse a queue as Atom</a></li>
-                                            <li><a href="queueBrowse/FOO/BAR?view=rss&feedType=rss_1.0">Browse a queue as RSS 1.0</a></li>
-                                            <li><a href="queueBrowse/FOO/BAR?view=rss&feedType=rss_2.0">Browse a queue as RSS 2.0</a></li>
-                                        </ul>
-                                    </div> 
-                                </td> 
-                                <td valign="top"> 
- 
-                                    <div class="navigation"> 
-                                        <div class="navigation_top"> 
-                                            <div class="navigation_bottom"> 
-                                                <H3>Useful Links</H3> 
- 
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a href="http://activemq.apache.org/"
-                                                           title="The most popular and powerful open source Message Broker">Documentation</a></li> 
-                                                    <li><a href="http://activemq.apache.org/faq.html">FAQ</a></li> 
-                                                    <li><a href="http://activemq.apache.org/download.html">Downloads</a> 
-                                                    </li> 
-                                                    <li><a href="http://activemq.apache.org/discussion-forums.html">Forums</a> 
-                                                    </li> 
-                                                </ul> 
-                                            </div> 
-                                        </div> 
-                                    </div> 
-                                </td> 
-                            </tr> 
-                        </tbody> 
-                    </table> 
- 
- 
-                    <div class="bottom_red_bar"></div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="black_box"> 
-        <div class="footer"> 
-            <div class="footer_l"> 
-                <div class="footer_r"> 
-                    <div> 
-                        Copyright 2005-2007 The Apache Software Foundation.
- 
-                        (<a href="?printable=true">printable version</a>)
-                    </div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-</div> 
-<div class="design_attribution"><a href="http://hiramchirino.com/">Graphic Design By Hiram</a></div> 
- 
-</body> 
-</html> 
diff --git a/trunk/activemq-web-demo/src/main/webapp/js/amq.js b/trunk/activemq-web-demo/src/main/webapp/js/amq.js
deleted file mode 100644
index 533cbe3..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/amq.js
+++ /dev/null
@@ -1,307 +0,0 @@
-/**

- *

- * 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.

- */

-

-// AMQ Ajax handler

-// This class provides the main API for using the Ajax features of AMQ. It

-// allows JMS messages to be sent and received from javascript when used

-// with the org.apache.activemq.web.MessageListenerServlet.

-//

-// This version of the file provides an adapter interface for the jquery library

-// and a namespace for the Javascript file, private/public variables and

-// methods, and other scripting niceties. -- jim cook 2007/08/28

-

-var org = org || {};

-org.activemq = org.activemq || {};

-

-org.activemq.Amq = function() {

-	var connectStatusHandler;

-

-	// Just a shortcut to eliminate some redundant typing.

-	var adapter = org.activemq.AmqAdapter;

-

-	if (typeof adapter == 'undefined') {

-		throw 'An org.activemq.AmqAdapter must be declared before the amq.js script file.'

-	}

-

-	// The URI of the AjaxServlet.

-	var uri;

-

-	// The number of seconds that the long-polling socket will stay connected.

-	// Best to keep this to a value less than one minute.

-	var timeout;

-

-	// A session should not be considered initialized until the JSESSIONID is returned

-	// from the initial GET request.  Otherwise subscription POSTS may register the

-	// subscription with the wrong session.

-	var sessionInitialized = false;

-

-	// This callback will be called after the first GET request returns.

-	var sessionInitializedCallback;	

-

-	// Poll delay. if set to positive integer, this is the time to wait in ms

-	// before sending the next poll after the last completes.

-	var pollDelay;

-

-	// Inidicates whether logging is active or not. Not by default.

-	var logging = false;

-

-	// 5 second delay if an error occurs during poll. This could be due to

-	// server capacity problems or a timeout condition.

-	var pollErrorDelay = 5000;

-

-	// Map of handlers that will respond to message receipts. The id used during

-	// addListener(id, destination, handler) is used to key the callback

-	// handler.  

-	var messageHandlers = {};

-

-	// Indicates whether an AJAX post call is in progress.

-	var batchInProgress = false;

-

-	// A collection of pending messages that accumulate when an AJAX call is in

-	// progress. These messages will be delivered as soon as the current call

-	// completes. The array contains objects in the format { destination,

-	// message, messageType }.

-	var messageQueue = [];

-

-  // String to distinguish this client from others sharing the same session.

-  // This can occur when multiple browser windows or tabs using amq.js simultaneously.

-  // All windows share the same JESSIONID, but need to consume messages independently.

-  var clientId = null;

-  

-	/**

-	 * Iterate over the returned XML and for each message in the response, 

-	 * invoke the handler with the matching id.

-	 */

-	var messageHandler = function(data) {

-		var response = data.getElementsByTagName("ajax-response");

-		if (response != null && response.length == 1) {

-			connectStatusHandler(true);

-			var responses = response[0].childNodes;    // <response>

-			for (var i = 0; i < responses.length; i++) {

-				var responseElement = responses[i];

-

-				// only process nodes of type element.....

-				if (responseElement.nodeType != 1) continue;

-

-				var id = responseElement.getAttribute('id');

-

-				var handler = messageHandlers[id];

-

-				if (logging && handler == null) {

-					adapter.log('No handler found to match message with id = ' + id);

-					continue;

-				}

-

-				// Loop thru and handle each <message>

-				for (var j = 0; j < responseElement.childNodes.length; j++) {

-					handler(responseElement.childNodes[j]);

-				}

-			}

-		}

-	};

-

-	var errorHandler = function(xhr, status, ex) {

-		connectStatusHandler(false);

-		if (logging) adapter.log('Error occurred in ajax call. HTTP result: ' +

-		                         xhr.status + ', status: ' + status);

-	}

-

-	var pollErrorHandler = function(xhr, status, ex) {

-		connectStatusHandler(false);

-		if (status === 'error' && xhr.status === 0) {

-			if (logging) adapter.log('Server connection dropped.');

-			setTimeout(function() { sendPoll(); }, pollErrorDelay);

-			return;

-		}

-		if (logging) adapter.log('Error occurred in poll. HTTP result: ' +

-		                         xhr.status + ', status: ' + status);

-		setTimeout(function() { sendPoll(); }, pollErrorDelay);

-	}

-

-	var pollHandler = function(data) {

-		try {

-			messageHandler(data);

-		} catch(e) {

-			if (logging) adapter.log('Exception in the poll handler: ' + data, e);

-			throw(e);

-		} finally {

-			setTimeout(sendPoll, pollDelay);

-		}

-	};

-

-	var initHandler = function(data) {

-		sessionInitialized = true;

-		if(sessionInitializedCallback) {

-			sessionInitializedCallback();

-		}

-		sendPoll();

-	}

-

-	var sendPoll = function() {

-		// Workaround IE6 bug where it caches the response

-		// Generate a unique query string with date and random

-		var now = new Date();

-		var timeoutArg = sessionInitialized ? timeout : 0.001;

-		var data = 'timeout=' + timeoutArg * 1000

-				 + '&d=' + now.getTime()

-				 + '&r=' + Math.random();

-		var successCallback = sessionInitialized ? pollHandler : initHandler;

-

-		var options = { method: 'get',

-			data: addClientId( data ),

-			success: successCallback,

-			error: pollErrorHandler};

-		adapter.ajax(uri, options);

-	};

-

-	var sendJmsMessage = function(destination, message, type, headers) {

-		var message = {

-			destination: destination,

-			message: message,

-			messageType: type

-		};

-		// Add message to outbound queue

-		if (batchInProgress) {

-			messageQueue[messageQueue.length] = {message:message, headers:headers};

-		} else {

-			org.activemq.Amq.startBatch();

-			adapter.ajax(uri, { method: 'post',

-				data: addClientId( buildParams( [message] ) ),

-				error: errorHandler,

-				headers: headers,

-				success: org.activemq.Amq.endBatch});

-		}

-	};

-

-	var buildParams = function(msgs) {

-		var s = [];

-		for (var i = 0, c = msgs.length; i < c; i++) {

-			if (i != 0) s[s.length] = '&';

-			s[s.length] = ((i == 0) ? 'destination' : 'd' + i);

-			s[s.length] = '=';

-			s[s.length] = msgs[i].destination;

-			s[s.length] = ((i == 0) ? '&message' : '&m' + i);

-			s[s.length] = '=';

-			s[s.length] = msgs[i].message;

-			s[s.length] = ((i == 0) ? '&type' : '&t' + i);

-			s[s.length] = '=';

-			s[s.length] = msgs[i].messageType;

-		}

-		return s.join('');

-	}

-	

-	// add clientId to data if it exists, before passing data to ajax connection adapter.

-	var addClientId = function( data ) {

-		var output = data || '';

-		if( clientId ) {

-			if( output.length > 0 ) {

-				output += '&';

-			}

-			output += 'clientId='+clientId;

-		}

-		return output;

-	}

-

-	return {

-		// optional clientId can be supplied to allow multiple clients (browser windows) within the same session.

-		init : function(options) {

-			connectStatusHandler = options.connectStatusHandler || function(connected){};

-			uri = options.uri || '/amq';

-			pollDelay = typeof options.pollDelay == 'number' ? options.pollDelay : 0;

-			timeout = typeof options.timeout == 'number' ? options.timeout : 25;

-			logging = options.logging;

-			sessionInitializedCallback = options.sessionInitializedCallback

-			clientId = options.clientId;

-			adapter.init(options);

-			sendPoll();

-			

-		},

-		    

-		startBatch : function() {

-			batchInProgress = true;

-		},

-

-		endBatch : function() {

-			if (messageQueue.length > 0) {

-				var messagesToSend = [];

-				var messagesToQueue = [];

-				var outgoingHeaders = null;

-				

-				// we need to ensure that messages which set headers are sent by themselves.

-				// if 2 'listen' messages were sent together, and a 'selector' header were added to one of them,

-				// AMQ would add the selector to both 'listen' commands.

-				for(i=0;i<messageQueue.length;i++) {

-					// a message with headers should always be sent by itself.	if other messages have been added, send this one later.

-					if ( messageQueue[ i ].headers && messagesToSend.length == 0 ) {

-						messagesToSend[ messagesToSend.length ] = messageQueue[ i ].message;

-						outgoingHeaders = messageQueue[ i ].headers;

-					} else if ( ! messageQueue[ i ].headers && ! outgoingHeaders ) {

-						messagesToSend[ messagesToSend.length ] = messageQueue[ i ].message;

-					} else {

-						messagesToQueue[ messagesToQueue.length ] = messageQueue[ i ];

-					}

-				}

-				var body = buildParams(messagesToSend);

-				messageQueue = messagesToQueue;

-				org.activemq.Amq.startBatch();

-				adapter.ajax(uri, {

-					method: 'post',

-					headers: outgoingHeaders,

-					data: addClientId( body ),

-					success: org.activemq.Amq.endBatch, 

-					error: errorHandler});

-			} else {

-				batchInProgress = false;

-			}

-		},

-

-		// Send a JMS message to a destination (eg topic://MY.TOPIC).  Message

-		// should be xml or encoded xml content.

-		sendMessage : function(destination, message) {

-			sendJmsMessage(destination, message, 'send');

-		},

-

-		// Listen on a channel or topic.

-		// handler must be a function taking a message argument

-		//

-		// Supported options:

-		//  selector: If supplied, it should be a SQL92 string like "property-name='value'"

-		//            http://activemq.apache.org/selectors.html

-		//

-		// Example: addListener( 'handler', 'topic://test-topic', function(msg) { return msg; }, { selector: "property-name='property-value'" } )

-		addListener : function(id, destination, handler, options) {

-			messageHandlers[id] = handler;

-			var headers = options && options.selector ? {selector:options.selector} : null;

-			sendJmsMessage(destination, id, 'listen', headers);

-		},

-

-		// remove Listener from channel or topic.

-		removeListener : function(id, destination) {

-			messageHandlers[id] = null;

-			sendJmsMessage(destination, id, 'unlisten');

-		},

-		

-		// for unit testing

-		getMessageQueue: function() {

-			return messageQueue;

-		},

-		testPollHandler: function( data ) {

-			return pollHandler( data );

-		}

-	};

-}();

diff --git a/trunk/activemq-web-demo/src/main/webapp/js/amq_dojo_adapter.js b/trunk/activemq-web-demo/src/main/webapp/js/amq_dojo_adapter.js
deleted file mode 100644
index 5197e0d..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/amq_dojo_adapter.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**

- *

- * 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.

- */

-

-// AMQ Ajax Adapter for Dojo 

-// This class provides an adapter interface for the Dojo library to perform

-// some of the library-dependent tasks...namely logging and ajax.

-

-var org = org || {};

-org.activemq = org.activemq || {};

-

-org.activemq.AmqAdapter = {

-

-	init: function(options) {

-	},

-

-/**

- *  Implement this method to make an AJAX call to the AjaxServlet. An

- *  options object will accompany this class and will contain the properties

- *  that describe the details of the AJAX call. The options object will

- *  have the following properties:

- *

- *  - method:  'get' or 'post'

- *  - data:    query data to accompany the post or get.

- *  - success: A callback function that is invoked upon successful

- *             completion of the AJAX call. The parameter is:

- *             - data: The result of the AJAX call. In the case of XML

- *                     data should resolve to a Document element.

- *  - error:   A callback when some type of error occurs. The callback

- *             function's parameters should be:

- *             - xhr:    The XmlHttpRequest object.

- *             - status: A text string of the status.

- *             - ex:     The exception that caused the error.

- *  - headers: An object containing additional headers for the ajax request.

- */

-	ajax: function(uri, options) {

-		if (options.method == 'post') {

-			dojo.xhrPost({

-				url: uri,

-				handleAs: "xml",

-				postData: options.data,

-				headers: options.headers,

-				load : options.success ? options.success : function() {},

-				error: options.error ? function(ex, ioargs) {

-						options.error(ioargs.xhr,ioargs.xhr.status, ex);

-					} : function() {}

-			});

-		} else {

-			if (options.data)

-			{

-				uri += "?";

-				uri += options.data;

-			}

-			dojo.xhrGet({

-				url: uri,

-				handleAs: "xml",

-				headers: options.headers,

-				load : options.success ? options.success : function() {},

-				error: options.error ? function(ex, ioargs) {

-						options.error(ioargs.xhr,ioargs.xhr.status, ex);

-					} : function() {}

-			});

-		}

-	},

-

-	log: function(message, exception) {

-		if (typeof console != 'undefined' && console.log) console.log(message);

-	}

-

-};

diff --git a/trunk/activemq-web-demo/src/main/webapp/js/amq_jquery_adapter.js b/trunk/activemq-web-demo/src/main/webapp/js/amq_jquery_adapter.js
deleted file mode 100755
index d73fc0e..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/amq_jquery_adapter.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/**

- *

- * 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.

- */

-

-// AMQ Ajax Adapter for jQuery

-// This class provides an adapter interface for the jquery library to perform

-// some of the library-dependent tasks...namely logging and ajax.

-

-var org = org || {};

-org.activemq = org.activemq || {};

-

-org.activemq.AmqAdapter = {

-

-	init: function(options) {

-	},

-

-	/**

-	 *  Implement this method to make an AJAX call to the AjaxServlet. An

-	 *  options object will accompany this class and will contain the properties

-	 *  that describe the details of the AJAX call. The options object will

-	 *  have the following properties:

-	 *

-	 *  - method:  'get' or 'post'

-	 *  - data:    query data to accompany the post or get.

-	 *  - success: A callback function that is invoked upon successful

-	 *             completion of the AJAX call. The parameter is:

-	 *             - data: The result of the AJAX call. In the case of XML

-	 *                     data should resolve to a Document element.

-	 *  - error:   A callback when some type of error occurs. The callback

-	 *             function's parameters should be:

-	 *             - xhr:    The XmlHttpRequest object.

-	 *             - status: A text string of the status.

-	 *             - ex:     The exception that caused the error.

-	 *  - headers: An object containing additional headers for the ajax request.

-	 */

-	ajax: function(uri, options) {

-		request = {

-			url: uri,

-			data: options.data,

-			success: options.success || function(){},

-			error: options.error || function(){}

-		}

-		var headers = {};

-		if( options.headers ) {

-			headers = options.headers;

-		}

-		

-		if (options.method == 'post') {

-			request.type = 'POST';

-			/* Force "Connection: close" for Mozilla browsers to work around

-			 * a bug where XMLHttpReqeuest sends an incorrect Content-length

-			 * header. See Mozilla Bugzilla #246651.

-			 */

-			headers[ 'Connection' ] = 'close';

-		} else {

-			request.type = 'GET';

-			request.dataType = 'xml';

-		}

-		

-		if( headers ) {

-			request.beforeSend = function(xhr) {

-				for( h in headers ) {

-					xhr.setRequestHeader( h, headers[ h ] );

-				}

-			}

-		}

-		

-		jQuery.ajax( request );

-	},

-

-	log: function(message, exception) {

-		if (typeof console != 'undefined' && console.log) console.log(message);

-	}

-};

diff --git a/trunk/activemq-web-demo/src/main/webapp/js/amq_prototype_adapter.js b/trunk/activemq-web-demo/src/main/webapp/js/amq_prototype_adapter.js
deleted file mode 100755
index 5f4f1c9..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/amq_prototype_adapter.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**

- *

- * 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.

- */

-

-// AMQ Ajax Adapter for Prototype

-// This class provides an adapter interface for the prototype library to perform

-// some of the library-dependent tasks...namely logging and ajax.

-

-var org = org || {};

-org.activemq = org.activemq || {};

-

-org.activemq.AmqAdapter = {

-

-	init: function(options) {

-	},

-

-/**

- *  Implement this method to make an AJAX call to the AjaxServlet. An

- *  options object will accompany this class and will contain the properties

- *  that describe the details of the AJAX call. The options object will

- *  have the following properties:

- *

- *  - method:  'get' or 'post'

- *  - data:    query data to accompany the post or get.

- *  - success: A callback function that is invoked upon successful

- *             completion of the AJAX call. The parameter is:

- *             - data: The result of the AJAX call. In the case of XML

- *                     data should resolve to a Document element.

- *  - error:   A callback when some type of error occurs. The callback

- *             function's parameters should be:

- *             - xhr:    The XmlHttpRequest object.

- *             - status: A text string of the status.

- *             - ex:     The exception that caused the error.

- *  - headers: An object containing additional headers for the ajax request.

- */

-	ajax: function(uri, options) {

-		request = {

-			onSuccess: options.success ? function(xhr, header) {

-				if (options.success) {

-					var ct = xhr.getResponseHeader("content-type");

-					var xml = ct && ct.indexOf("xml") >= 0;

-					var data = xml ? xhr.responseXML : xhr.responseText;

-					options.success(data);

-				}

-			} : function() {},

-			onFailure: options.error || function() {

-			},

-			onException: options.error || function() {

-			}

-		}

-		

-		if( options.headers ) {

-			request.requestHeaders = options.headers;

-		}

-		

-		if (options.method == 'post') {

-			request.postBody = options.data;

-		} else {

-			request.parameters = options.data;

-			request.method = 'get';

-		}

-		

-		new Ajax.Request( uri, request );

-	},

-

-	log: function(message, exception) {

-		if (typeof console != 'undefined' && console.log) console.log(message);

-	}

-

-};

diff --git a/trunk/activemq-web-demo/src/main/webapp/js/chat.js b/trunk/activemq-web-demo/src/main/webapp/js/chat.js
deleted file mode 100755
index ed6d8aa..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/chat.js
+++ /dev/null
@@ -1,209 +0,0 @@
-/**

- *

- * 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.

- */

-

-var amq = org.activemq.Amq;

-

-org.activemq.Chat = function() {

-	var last = '';

-

-	var user = null;

-

-	var chatTopic = 'topic://CHAT.DEMO';

-

-	var chat, join, joined, phrase, members, username = null;

-

-	var chatHandler = function(message) {

-		var type = message.getAttribute('type');

-		var from = message.getAttribute('from');

-

-		switch (type) {

-			// Incoming chat message

-			case 'chat' : {

-				var text = message.childNodes[0].data;

-

-				if (from == last) from = '...';

-				else {

-					last = from;

-					from += ':';

-				}

-

-				chat.innerHTML += '<span class=\'from\'>' + from + '&nbsp;</span><span class=\'text\'>' + text + '</span><br/>';

-				break;

-			}

-

-			// Incoming ping request, add the person's name to your list.

-			case 'ping' : {

-				members.innerHTML += '<span class="member">' + from + '</span><br/>';

-				break;

-			}

-

-			// someone new joined the chatroom, clear your list and

-			// broadcast your name to all users.

-			case 'join' : {

-				members.innerHTML = '';

-				if (user != null)

-					amq.sendMessage(chatTopic, '<message type="ping" from="' + user + '"/>');

-				chat.innerHTML += '<span class="alert"><span class="from">' + from + '&nbsp;</span><span class="text">has joined the room!</span></span><br/>';

-				break;

-			}

-

-			// Screw you guys, I'm going home...

-			// When I (and everyone else) receive a leave message, we broadcast

-			// our own names in a ping in order to update everyone's list.

-			// todo: Make this more efficient by simply removing the person's name from the list.

-			case 'leave': {

-				members.innerHTML = '';

-				chat.innerHTML += '<span class="alert"><span class="from">' + from + '&nbsp;</span><span class="text">has left the room!</span></span><br/>';

-

-				// If we are the one that is leaving...

-				if (from == user) {

-				// switch the input form

-					join.className = '';

-					joined.className = 'hidden';

-					username.focus();

-

-					user = null;

-					amq.removeListener('chat', chatTopic);

-				}

-				if (user != null)

-					amq.sendMessage(chatTopic, '<message type="ping" from="' + user + '"/>');

-				break;

-			}

-		}

-

-		chat.scrollTop = chat.scrollHeight - chat.clientHeight;

-	};

-

-	var getKeyCode = function (ev) {

-		var keyc;

-		if (window.event) keyc = window.event.keyCode;

-		else keyc = ev.keyCode;

-		return keyc;

-	};

-

-	var addEvent = function(obj, type, fn) {

-		if (obj.addEventListener)

-			obj.addEventListener(type, fn, false);

-		else if (obj.attachEvent) {

-			obj["e"+type+fn] = fn;

-			obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }

-			obj.attachEvent( "on"+type, obj[type+fn] );

-		}

-	};

-

-	var initEventHandlers = function() {

-		addEvent(username, 'keyup', function(ev) {

-			var keyc = getKeyCode(ev);

-			if (keyc == 13 || keyc == 10) {

-				org.activemq.Chat.join();

-				return false;

-			}

-			return true;

-		});

-

-		addEvent(document.getElementById('joinB'), 'click', function() {

-			org.activemq.Chat.join();

-			return true;

-		});

-

-		addEvent(phrase, 'keyup', function(ev) {

-			var keyc = getKeyCode(ev);

-

-			if (keyc == 13 || keyc == 10) {

-				var text = phrase.value;

-				phrase.value = '';

-				org.activemq.Chat.chat(text);

-				return false;

-			}

-			return true;

-		});

-

-		addEvent(document.getElementById('sendB'), 'click', function() {

-			var text = phrase.value;

-			phrase.value = '';

-			org.activemq.Chat.chat(text);

-		});

-

-		addEvent(document.getElementById('leaveB'), 'click', function() {

-			org.activemq.Chat.leave();

-			return false;

-		});

-	};

-

-	return {

-		join: function() {

-			var name = username.value;

-			if (name == null || name.length == 0) {

-				alert('Please enter a username!');

-			} else {

-				user = name;

-

-				amq.addListener('chat', chatTopic, chatHandler);

-				join.className = 'hidden';

-				joined.className = '';

-				phrase.focus();

-

-				amq.sendMessage(chatTopic, '<message type="join" from="' + user + '"/>');

-			}

-		},

-

-		leave: function() {

-			amq.sendMessage(chatTopic, '<message type="leave" from="' + user + '"/>');

-		},

-

-		chat: function(text) {

-			if (text != null && text.length > 0) {

-				// TODO more encoding?

-				text = text.replace('<', '&lt;');

-				text = text.replace('>', '&gt;');

-

-				amq.sendMessage(chatTopic, '<message type="chat" from="' + user + '">' + text + '</message>');

-			}

-		},

-

-		init: function() {

-			join = document.getElementById('join');

-			joined = document.getElementById('joined');

-			chat = document.getElementById('chat');

-			members = document.getElementById('members');

-			username = document.getElementById('username');

-			phrase = document.getElementById('phrase');

-

-			if (join.className == 'hidden' && joined.className == 'hidden') {

-				join.className = '';

-				joined.className = 'hidden';

-				username.focus();

-			}

-

-			initEventHandlers();

-		}

-	}

-}();

-

-

-

-

-

-

-

-

-

-

-

-

-

diff --git a/trunk/activemq-web-demo/src/main/webapp/js/dojo.js b/trunk/activemq-web-demo/src/main/webapp/js/dojo.js
deleted file mode 100644
index 42c4618..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/dojo.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
-	Available via Academic Free License >= 2.1 OR the modified BSD license.
-	see: http://dojotoolkit.org/license for details
-*/
-
-/*
-	This is a compiled version of Dojo, built for deployment and not for
-	development. To get an editable version, please visit:
-
-		http://dojotoolkit.org
-
-	for documentation and information on getting the source.
-*/
-
-(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _7=_1[i];_2+="var "+_7[0]+" = {}; "+_7[1]+" = "+_7[0]+";"+_7[1]+"._scopeName = '"+_7[1]+"';";_3+=(i==0?"":",")+_7[0];_4+=(i==0?"":",")+_7[1];_5[_7[0]]=_7[1];_6[_7[1]]=_7[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]();}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _8=tn+"";console[_8]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(_8+":");console["log"](a.join(" "));}:function(){};console[_8]._fake=true;})();}}}if(typeof dojo=="undefined"){dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _9 in djConfig){d.config[_9]=djConfig[_9];}}dojo.locale=d.config.locale;var _a="$Rev: 21516 $".match(/\d+/);dojo.version={major:1,minor:4,patch:2,flag:"",revision:_a?+_a[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}var _b,_c,_d={};for(var i in {toString:1}){_b=[];break;}dojo._extraNames=_b=_b||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];_c=_b.length;dojo._mixin=function(_e,_f){var _10,s,i;for(_10 in _f){s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}if(_c&&_f){for(i=0;i<_c;++i){_10=_b[i];s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}}return _e;};dojo.mixin=function(obj,_11){if(!obj){obj={};}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_12,_13,_14){var obj=_14||d.global;for(var i=0,p;obj&&(p=_12[i]);i++){if(i==0&&d._scopeMap[p]){p=d._scopeMap[p];}obj=(p in obj?obj[p]:(_13?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_15,_16,_17){var _18=_15.split("."),p=_18.pop(),obj=d._getProp(_18,true,_17);return obj&&p?(obj[p]=_16):undefined;};dojo.getObject=function(_19,_1a,_1b){return d._getProp(_19.split("."),_1a,_1b);};dojo.exists=function(_1c,obj){return !!d.getObject(_1c,false,obj);};dojo["eval"]=function(_1d){return d.global.eval?d.global.eval(_1d):eval(_1d);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_1e){var mp=d._modulePrefixes;return !!(mp[_1e]&&mp[_1e].value);},_getModulePrefix:function(_1f){var mp=d._modulePrefixes;if(d._moduleHasPrefix(_1f)){return mp[_1f].value;}return _1f;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_20,_21,cb){var uri=((_20.charAt(0)=="/"||_20.match(/^\w+:/))?"":d.baseUrl)+_20;try{return !_21?d._loadUri(uri,cb):d._loadUriAndCheck(uri,_21,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(d._loadedUrls[uri]){return true;}d._inFlightCount++;var _22=d._getText(uri,true);if(_22){d._loadedUrls[uri]=true;d._loadedUrls.push(uri);if(cb){_22="("+_22+")";}else{_22=d._scopePrefix+_22+d._scopeSuffix;}if(!d.isIE){_22+="\r\n//@ sourceURL="+uri;}var _23=d["eval"](_22);if(cb){cb(_23);}}if(--d._inFlightCount==0&&d._postLoad&&d._loaders.length){setTimeout(function(){if(d._inFlightCount==0){d._callLoaded();}},0);}return !!_22;};dojo._loadUriAndCheck=function(uri,_24,cb){var ok=false;try{ok=d._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&d._loadedModules[_24]);};dojo.loaded=function(){d._loadNotifying=true;d._postLoad=true;var mll=d._loaders;d._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}d._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())();}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _25=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_25.call(obj);});}}};dojo.ready=dojo.addOnLoad=function(obj,_26){d._onto(d._loaders,obj,_26);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);}dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(d.config.useXDomain&&d.isOpera)){setTimeout(d.isAIR?function(){d.loaded();}:d._scopeName+".loaded();",0);}else{d.loaded();}};dojo._getModuleSymbols=function(_27){var _28=_27.split(".");for(var i=_28.length;i>0;i--){var _29=_28.slice(0,i).join(".");if(i==1&&!d._moduleHasPrefix(_29)){_28[0]="../"+_28[0];}else{var _2a=d._getModulePrefix(_29);if(_2a!=_29){_28.splice(0,i,_2a);break;}}}return _28;};dojo._global_omit_module_check=false;dojo.loadInit=function(_2b){_2b();};dojo._loadModule=dojo.require=function(_2c,_2d){_2d=d._global_omit_module_check||_2d;var _2e=d._loadedModules[_2c];if(_2e){return _2e;}var _2f=d._getModuleSymbols(_2c).join("/")+".js";var _30=!_2d?_2c:null;var ok=d._loadPath(_2f,_30);if(!ok&&!_2d){throw new Error("Could not load '"+_2c+"'; last tried '"+_2f+"'");}if(!_2d&&!d._isXDomain){_2e=d._loadedModules[_2c];if(!_2e){throw new Error("symbol '"+_2c+"' is not defined after loading '"+_2f+"'");}}return _2e;};dojo.provide=function(_31){_31=_31+"";return (d._loadedModules[_31]=d.getObject(_31,true));};dojo.platformRequire=function(_32){var _33=_32.common||[];var _34=_33.concat(_32[d._name]||_32["default"]||[]);for(var x=0;x<_34.length;x++){var _35=_34[x];if(_35.constructor==Array){d._loadModule.apply(d,_35);}else{d._loadModule(_35);}}};dojo.requireIf=function(_36,_37){if(_36===true){var _38=[];for(var i=1;i<arguments.length;i++){_38.push(arguments[i]);}d.require.apply(d,_38);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_39,_3a){d._modulePrefixes[_39]={name:_39,value:_3a};};dojo.requireLocalization=function(_3b,_3c,_3d,_3e){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null,_3f=arguments,uri=[_3f[0]];for(var i=1;i<_3f.length;i++){if(!_3f[i]){continue;}var _40=new d._Url(_3f[i]+""),_41=new d._Url(uri[0]+"");if(_40.path==""&&!_40.scheme&&!_40.authority&&!_40.query){if(_40.fragment!=n){_41.fragment=_40.fragment;}_40=_41;}else{if(!_40.scheme){_40.scheme=_41.scheme;if(!_40.authority){_40.authority=_41.authority;if(_40.path.charAt(0)!="/"){var _42=_41.path.substring(0,_41.path.lastIndexOf("/")+1)+_40.path;var _43=_42.split("/");for(var j=0;j<_43.length;j++){if(_43[j]=="."){if(j==_43.length-1){_43[j]="";}else{_43.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_43[0]=="")&&_43[j]==".."&&_43[j-1]!=".."){if(j==(_43.length-1)){_43.splice(j,1);_43[j-1]="";}else{_43.splice(j-1,2);j-=2;}}}}_40.path=_43.join("/");}}}}uri=[];if(_40.scheme){uri.push(_40.scheme,":");}if(_40.authority){uri.push("//",_40.authority);}uri.push(_40.path);if(_40.query){uri.push("?",_40.query);}if(_40.fragment){uri.push("#",_40.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_44,url){var loc=d._getModuleSymbols(_44).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _45=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_45==-1||_45>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _46=document.getElementsByTagName("script");var _47=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_46.length;i++){var src=_46[i].getAttribute("src");if(!src){continue;}var m=src.match(_47);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_46[i].getAttribute("djConfig");if(cfg){var _48=eval("({ "+cfg+" })");for(var x in _48){dojo.config[x]=_48[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv;}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1;}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;d.isMac=dav.indexOf("Macintosh")>=0;var _49=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_49&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(_49+7))<=419.3){d.isSafari=2;}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv;}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1])||undefined;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;var _4a=document.documentMode;if(_4a&&_4a!=5&&Math.floor(d.isIE)!=_4a){d.isIE=_4a;}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}d.isQuirks=document.compatMode=="BackCompat";d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _4b,_4c;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_4b=new XMLHttpRequest();}catch(e){}}if(!_4b){for(var i=0;i<3;++i){var _4d=d._XMLHTTP_PROGIDS[i];try{_4b=new ActiveXObject(_4d);}catch(e){_4c=e;}if(_4b){d._XMLHTTP_PROGIDS=[_4d];break;}}}if(!_4b){throw new Error("XMLHTTP not available: "+_4c);}return _4b;};d._isDocumentOk=function(_4e){var _4f=_4e.status||0,lp=location.protocol;return (_4f>=200&&_4f<300)||_4f==304||_4f==1223||(!_4f&&(lp=="file:"||lp=="chrome:"||lp=="app:"));};var _50=window.location+"";var _51=document.getElementsByTagName("base");var _52=(_51&&_51.length>0);d._getText=function(uri,_53){var _54=d._xhrObj();if(!_52&&dojo._Url){uri=(new dojo._Url(_50,uri)).toString();}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_54.open("GET",uri,false);try{_54.send(null);if(!d._isDocumentOk(_54)){var err=Error("Unable to load "+uri+" status:"+_54.status);err.status=_54.status;err.responseText=_54.responseText;throw err;}}catch(e){if(_53){return null;}throw e;}return _54.responseText;};var _55=window;var _56=function(_57,fp){var _58=_55.attachEvent||_55.addEventListener;_57=_55.attachEvent?_57:_57.substring(2);_58(_57,function(){fp.apply(_55,arguments);},false);};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())();}};var _59=0;d.addOnWindowUnload=function(obj,_5a){d._onto(d._windowUnloaders,obj,_5a);if(!_59){_59=1;_56("onunload",d.windowUnloaded);}};var _5b=0;d.addOnUnload=function(obj,_5c){d._onto(d._unloaders,obj,_5c);if(!_5b){_5b=1;_56("onbeforeunload",dojo.unloaded);}};})();dojo._initFired=false;dojo._loadInit=function(e){if(!dojo._initFired){dojo._initFired=true;if(!dojo.config.afterOnLoad&&window.detachEvent){window.detachEvent("onload",dojo._loadInit);}if(dojo._inFlightCount==0){dojo._modulesLoaded();}}};if(!dojo.config.afterOnLoad){if(document.addEventListener){document.addEventListener("DOMContentLoaded",dojo._loadInit,false);window.addEventListener("load",dojo._loadInit,false);}else{if(window.attachEvent){window.attachEvent("onload",dojo._loadInit);}}}if(dojo.isIE){if(!dojo.config.afterOnLoad&&!dojo.config.skipIeDomLoaded){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");var _5d=["*","group","roundrect","oval","shape","rect","imagedata"],i=0,l=1,s=document.createStyleSheet();if(dojo.isIE>=8){i=1;l=_5d.length;}for(;i<l;++i){s.addRule("v\\:"+_5d[i],"behavior:url(#default#VML); display:inline-block");}}catch(e){}}}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _5e in mp){dojo.registerModulePath(_5e,mp[_5e]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");(function(){var d=dojo,_5f=Object.prototype.toString;dojo.isString=function(it){return (typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=function(it){return _5f.call(it)==="[object Function]";};dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));};dojo.isArrayLike=function(it){return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_60,_61){for(var i=1,l=arguments.length;i<l;i++){d._mixin(_60.prototype,arguments[i]);}return _60;};dojo._hitchArgs=function(_62,_63){var pre=d._toArray(arguments,2);var _64=d.isString(_63);return function(){var _65=d._toArray(arguments);var f=_64?(_62||d.global)[_63]:_63;return f&&f.apply(_62||this,pre.concat(_65));};};dojo.hitch=function(_66,_67){if(arguments.length>2){return d._hitchArgs.apply(d,arguments);}if(!_67){_67=_66;_66=null;}if(d.isString(_67)){_66=_66||d.global;if(!_66[_67]){throw (["dojo.hitch: scope[\"",_67,"\"] is null (scope=\"",_66,"\")"].join(""));}return function(){return _66[_67].apply(_66,arguments||[]);};}return !_66?_67:function(){return _67.apply(_66,arguments||[]);};};dojo.delegate=dojo._delegate=(function(){function TMP(){};return function(obj,_68){TMP.prototype=obj;var tmp=new TMP();TMP.prototype=null;if(_68){d._mixin(tmp,_68);}return tmp;};})();var _69=function(obj,_6a,_6b){return (_6b||[]).concat(Array.prototype.slice.call(obj,_6a||0));};var _6c=function(obj,_6d,_6e){var arr=_6e||[];for(var x=_6d||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo._toArray=d.isIE?function(obj){return ((obj.item)?_6c:_69).apply(this,arguments);}:_69;dojo.partial=function(_6f){var arr=[null];return d.hitch.apply(d,arr.concat(d._toArray(arguments)));};var _70=d._extraNames,_71=_70.length,_72={};dojo.clone=function(o){if(!o||typeof o!="object"||d.isFunction(o)){return o;}if(o.nodeType&&"cloneNode" in o){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}var r,i,l,s,_73;if(d.isArray(o)){r=[];for(i=0,l=o.length;i<l;++i){if(i in o){r.push(d.clone(o[i]));}}}else{r=o.constructor?new o.constructor():{};}for(_73 in o){s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=d.clone(s);}}if(_71){for(i=0;i<_71;++i){_73=_70[i];s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=s;}}}return r;};dojo.trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};var _74=/\{([^\}]+)\}/g;dojo.replace=function(_75,map,_76){return _75.replace(_76||_74,d.isFunction(map)?map:function(_77,k){return d.getObject(k,false,map);});};})();}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _78=function(arr,obj,cb){return [(typeof arr=="string")?arr.split(""):arr,obj||dojo.global,(typeof cb=="string")?new Function("item","index","array",cb):cb];};var _79=function(_7a,arr,_7b,_7c){var _7d=_78(arr,_7c,_7b);arr=_7d[0];for(var i=0,l=arr.length;i<l;++i){var _7e=!!_7d[2].call(_7d[1],arr[i],i,arr);if(_7a^_7e){return _7e;}}return _7a;};dojo.mixin(dojo,{indexOf:function(_7f,_80,_81,_82){var _83=1,end=_7f.length||0,i=0;if(_82){i=end-1;_83=end=-1;}if(_81!=undefined){i=_81;}if((_82&&i>end)||i<end){for(;i!=end;i+=_83){if(_7f[i]==_80){return i;}}}return -1;},lastIndexOf:function(_84,_85,_86){return dojo.indexOf(_84,_85,_86,true);},forEach:function(arr,_87,_88){if(!arr||!arr.length){return;}var _89=_78(arr,_88,_87);arr=_89[0];for(var i=0,l=arr.length;i<l;++i){_89[2].call(_89[1],arr[i],i,arr);}},every:function(arr,_8a,_8b){return _79(true,arr,_8a,_8b);},some:function(arr,_8c,_8d){return _79(false,arr,_8c,_8d);},map:function(arr,_8e,_8f){var _90=_78(arr,_8f,_8e);arr=_90[0];var _91=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){_91.push(_90[2].call(_90[1],arr[i],i,arr));}return _91;},filter:function(arr,_92,_93){var _94=_78(arr,_93,_92);arr=_94[0];var _95=[];for(var i=0,l=arr.length;i<l;++i){if(_94[2].call(_94[1],arr[i],i,arr)){_95.push(arr[i]);}}return _95;}});})();}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");(function(){var d=dojo,mix=d._mixin,op=Object.prototype,_96=op.toString,_97=new Function,_98=0,_99="constructor";function err(msg){throw new Error("declare: "+msg);};function _9a(_9b){var _9c=[],_9d=[{cls:0,refs:[]}],_9e={},_9f=1,l=_9b.length,i=0,j,lin,_a0,top,_a1,rec,_a2,_a3;for(;i<l;++i){_a0=_9b[i];if(!_a0){err("mixin #"+i+" is null");}lin=_a0._meta?_a0._meta.bases:[_a0];top=0;for(j=lin.length-1;j>=0;--j){_a1=lin[j].prototype;if(!_a1.hasOwnProperty("declaredClass")){_a1.declaredClass="uniqName_"+(_98++);}_a2=_a1.declaredClass;if(!_9e.hasOwnProperty(_a2)){_9e[_a2]={count:0,refs:[],cls:lin[j]};++_9f;}rec=_9e[_a2];if(top&&top!==rec){rec.refs.push(top);++top.count;}top=rec;}++top.count;_9d[0].refs.push(top);}while(_9d.length){top=_9d.pop();_9c.push(top.cls);--_9f;while(_a3=top.refs,_a3.length==1){top=_a3[0];if(!top||--top.count){top=0;break;}_9c.push(top.cls);--_9f;}if(top){for(i=0,l=_a3.length;i<l;++i){top=_a3[i];if(!--top.count){_9d.push(top);}}}}if(_9f){err("can't build consistent linearization");}_a0=_9b[0];_9c[0]=_a0?_a0._meta&&_a0===_9c[_9c.length-_a0._meta.bases.length]?_a0._meta.bases.length:1:0;return _9c;};function _a4(_a5,a,f){var _a6,_a7,_a8,_a9,_aa,_ab,_ac,opf,pos,_ad=this._inherited=this._inherited||{};if(typeof _a5=="string"){_a6=_a5;_a5=a;a=f;}f=0;_a9=_a5.callee;_a6=_a6||_a9.nom;if(!_a6){err("can't deduce a name to call inherited()");}_aa=this.constructor._meta;_a8=_aa.bases;pos=_ad.p;if(_a6!=_99){if(_ad.c!==_a9){pos=0;_ab=_a8[0];_aa=_ab._meta;if(_aa.hidden[_a6]!==_a9){_a7=_aa.chains;if(_a7&&typeof _a7[_a6]=="string"){err("calling chained method with inherited: "+_a6);}do{_aa=_ab._meta;_ac=_ab.prototype;if(_aa&&(_ac[_a6]===_a9&&_ac.hasOwnProperty(_a6)||_aa.hidden[_a6]===_a9)){break;}}while(_ab=_a8[++pos]);pos=_ab?pos:-1;}}_ab=_a8[++pos];if(_ab){_ac=_ab.prototype;if(_ab._meta&&_ac.hasOwnProperty(_a6)){f=_ac[_a6];}else{opf=op[_a6];do{_ac=_ab.prototype;f=_ac[_a6];if(f&&(_ab._meta?_ac.hasOwnProperty(_a6):f!==opf)){break;}}while(_ab=_a8[++pos]);}}f=_ab&&f||op[_a6];}else{if(_ad.c!==_a9){pos=0;_aa=_a8[0]._meta;if(_aa&&_aa.ctor!==_a9){_a7=_aa.chains;if(!_a7||_a7.constructor!=="manual"){err("calling chained constructor with inherited");}while(_ab=_a8[++pos]){_aa=_ab._meta;if(_aa&&_aa.ctor===_a9){break;}}pos=_ab?pos:-1;}}while(_ab=_a8[++pos]){_aa=_ab._meta;f=_aa?_aa.ctor:_ab;if(f){break;}}f=_ab&&f;}_ad.c=f;_ad.p=pos;if(f){return a===true?f:f.apply(this,a||_a5);}};function _ae(_af,_b0){if(typeof _af=="string"){return this.inherited(_af,_b0,true);}return this.inherited(_af,true);};function _b1(cls){var _b2=this.constructor._meta.bases;for(var i=0,l=_b2.length;i<l;++i){if(_b2[i]===cls){return true;}}return this instanceof cls;};function _b3(_b4,_b5){var _b6,t,i=0,l=d._extraNames.length;for(_b6 in _b5){t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}for(;i<l;++i){_b6=d._extraNames[i];t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}return _b4;};function _b7(_b8){_b3(this.prototype,_b8);return this;};function _b9(_ba,_bb){return function(){var a=arguments,_bc=a,a0=a[0],f,i,m,l=_ba.length,_bd;if(_bb&&(a0&&a0.preamble||this.preamble)){_bd=new Array(_ba.length);_bd[0]=a;for(i=0;;){a0=a[0];if(a0){f=a0.preamble;if(f){a=f.apply(this,a)||a;}}f=_ba[i].prototype;f=f.hasOwnProperty("preamble")&&f.preamble;if(f){a=f.apply(this,a)||a;}if(++i==l){break;}_bd[i]=a;}}for(i=l-1;i>=0;--i){f=_ba[i];m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,_bd?_bd[i]:a);}}f=this.postscript;if(f){f.apply(this,_bc);}};};function _be(_bf,_c0){return function(){var a=arguments,t=a,a0=a[0],f;if(_c0){if(a0){f=a0.preamble;if(f){t=f.apply(this,t)||t;}}f=this.preamble;if(f){f.apply(this,t);}}if(_bf){_bf.apply(this,a);}f=this.postscript;if(f){f.apply(this,a);}};};function _c1(_c2){return function(){var a=arguments,i=0,f;for(;f=_c2[i];++i){m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,a);break;}}f=this.postscript;if(f){f.apply(this,a);}};};function _c3(_c4,_c5,_c6){return function(){var b,m,f,i=0,_c7=1;if(_c6){i=_c5.length-1;_c7=-1;}for(;b=_c5[i];i+=_c7){m=b._meta;f=(m?m.hidden:b.prototype)[_c4];if(f){f.apply(this,arguments);}}};};d.declare=function(_c8,_c9,_ca){var _cb,i,t,_cc,_cd,_ce,_cf,_d0=1,_d1=_c9;if(typeof _c8!="string"){_ca=_c9;_c9=_c8;_c8="";}_ca=_ca||{};if(_96.call(_c9)=="[object Array]"){_ce=_9a(_c9);t=_ce[0];_d0=_ce.length-t;_c9=_ce[_d0];}else{_ce=[0];if(_c9){t=_c9._meta;_ce=_ce.concat(t?t.bases:_c9);}}if(_c9){for(i=_d0-1;;--i){_97.prototype=_c9.prototype;_cb=new _97;if(!i){break;}t=_ce[i];mix(_cb,t._meta?t._meta.hidden:t.prototype);_cc=new Function;_cc.superclass=_c9;_cc.prototype=_cb;_c9=_cb.constructor=_cc;}}else{_cb={};}_b3(_cb,_ca);t=_ca.constructor;if(t!==op.constructor){t.nom=_99;_cb.constructor=t;}_97.prototype=0;for(i=_d0-1;i;--i){t=_ce[i]._meta;if(t&&t.chains){_cf=mix(_cf||{},t.chains);}}if(_cb["-chains-"]){_cf=mix(_cf||{},_cb["-chains-"]);}t=!_cf||!_cf.hasOwnProperty(_99);_ce[0]=_cc=(_cf&&_cf.constructor==="manual")?_c1(_ce):(_ce.length==1?_be(_ca.constructor,t):_b9(_ce,t));_cc._meta={bases:_ce,hidden:_ca,chains:_cf,parents:_d1,ctor:_ca.constructor};_cc.superclass=_c9&&_c9.prototype;_cc.extend=_b7;_cc.prototype=_cb;_cb.constructor=_cc;_cb.getInherited=_ae;_cb.inherited=_a4;_cb.isInstanceOf=_b1;if(_c8){_cb.declaredClass=_c8;d.setObject(_c8,_cc);}if(_cf){for(_cd in _cf){if(_cb[_cd]&&typeof _cf[_cd]=="string"&&_cd!=_99){t=_cb[_cd]=_c3(_cd,_ce,_cf[_cd]==="after");t.nom=_cd;}}}return _cc;};d.safeMixin=_b3;})();}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments);}}return r;};},add:function(_d2,_d3,_d4){_d2=_d2||dojo.global;var f=_d2[_d3];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_d2[_d3]=d;}return f._listeners.push(_d4);},remove:function(_d5,_d6,_d7){var f=(_d5||dojo.global)[_d6];if(f&&f._listeners&&_d7--){delete f._listeners[_d7];}}};dojo.connect=function(obj,_d8,_d9,_da,_db){var a=arguments,_dc=[],i=0;_dc.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];_dc.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_dc.push(a[i]);}return dojo._connect.apply(this,_dc);};dojo._connect=function(obj,_dd,_de,_df){var l=dojo._listener,h=l.add(obj,_dd,dojo.hitch(_de,_df));return [obj,_dd,h,l];};dojo.disconnect=function(_e0){if(_e0&&_e0[0]!==undefined){dojo._disconnect.apply(this,_e0);delete _e0[0];}};dojo._disconnect=function(obj,_e1,_e2,_e3){_e3.remove(obj,_e1,_e2);};dojo._topics={};dojo.subscribe=function(_e4,_e5,_e6){return [_e4,dojo._listener.add(dojo._topics,_e4,dojo.hitch(_e5,_e6))];};dojo.unsubscribe=function(_e7){if(_e7){dojo._listener.remove(dojo._topics,_e7[0],_e7[1]);}};dojo.publish=function(_e8,_e9){var f=dojo._topics[_e8];if(f){f.apply(this,_e9||[]);}};dojo.connectPublisher=function(_ea,obj,_eb){var pf=function(){dojo.publish(_ea,arguments);};return (_eb)?dojo.connect(obj,_eb,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_ec){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_ec;this.silentlyCancelled=false;this.isFiring=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString();}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,_ed){var _ee=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_ee,_ee);},addCallback:function(cb,_ef){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,_f0){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0&&!this.isFiring){this._fire();}return this;},_fire:function(){this.isFiring=true;var _f1=this.chain;var _f2=this.fired;var res=this.results[_f2];var _f3=this;var cb=null;while((_f1.length>0)&&(this.paused==0)){var f=_f1.shift()[_f2];if(!f){continue;}var _f4=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret;}_f2=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){_f3._resback(res);_f3.paused--;if((_f3.paused==0)&&(_f3.fired>=0)){_f3._fire();}};this.paused++;}};if(dojo.config.debugAtAllCosts){_f4.call(this);}else{try{_f4.call(this);}catch(err){_f2=1;res=err;}}}this.fired=_f2;this.results[_f2]=res;this.isFiring=false;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(_f5){return eval("("+_f5+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_f6,_f7){if(it===undefined){return "undefined";}var _f8=typeof it;if(_f8=="number"||_f8=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}var _f9=arguments.callee;var _fa;_f7=_f7||"";var _fb=_f6?_f7+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){_fa=tf.call(it);if(it!==_fa){return _f9(_fa,_f6,_fb);}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes");}var sep=_f6?" ":"";var _fc=_f6?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_f9(obj,_f6,_fb);if(typeof val!="string"){val="undefined";}return _fc+_fb+val;});return "["+res.join(","+sep)+_fc+_f7+"]";}if(_f8=="function"){return null;}var _fd=[],key;for(key in it){var _fe,val;if(typeof key=="number"){_fe="\""+key+"\"";}else{if(typeof key=="string"){_fe=dojo._escapeString(key);}else{continue;}}val=_f9(it[key],_f6,_fb);if(typeof val!="string"){continue;}_fd.push(_fc+_fb+_fe+":"+sep+val);}return "{"+_fd.join(","+sep)+_fc+_f7+"}";};}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(_ff){if(_ff){this.setColor(_ff);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.config.transparentColor||[255,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_100){if(d.isString(_100)){d.colorFromString(_100,this);}else{if(d.isArray(_100)){d.colorFromArray(_100,this);}else{this._set(_100.r,_100.g,_100.b,_100.a);if(!(_100 instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_101){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_101?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_102,end,_103,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_102[x]+(end[x]-_102[x])*_103;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_104,obj){var m=_104.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_105,obj){var t=obj||new d.Color(),bits=(_105.length==4)?4:8,mask=(1<<bits)-1;_105=Number("0x"+_105.substr(1));if(isNaN(_105)){return null;}d.forEach(["b","g","r"],function(x){var c=_105&mask;_105>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);};})();}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_106,_107){dojo.global=_106;dojo.doc=_107;};dojo.withGlobal=function(_108,_109,_10a,_10b){var _10c=dojo.global;try{dojo.global=_108;return dojo.withDoc.call(null,_108.document,_109,_10a,_10b);}finally{dojo.global=_10c;}};dojo.withDoc=function(_10d,_10e,_10f,_110){var _111=dojo.doc,_112=dojo._bodyLtr,oldQ=dojo.isQuirks;try{dojo.doc=_10d;delete dojo._bodyLtr;dojo.isQuirks=dojo.doc.compatMode=="BackCompat";if(_10f&&typeof _10e=="string"){_10e=_10f[_10e];}return _10e.apply(_10f,_110||[]);}finally{dojo.doc=_111;delete dojo._bodyLtr;if(_112!==undefined){dojo._bodyLtr=_112;}dojo.isQuirks=oldQ;}};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _113=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_114,_115){if(node){_114=del._normalizeEventName(_114);if(!dojo.isIE&&(_114=="mouseenter"||_114=="mouseleave")){_114=(_114=="mouseenter")?"mouseover":"mouseout";}node.removeEventListener(_114,_115,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_116){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,_117){return del._fixEvent(evt,_117);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _118=dojo._listener;dojo._connect=function(obj,_119,_11a,_11b,_11c){var _11d=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=_11d?(_11c?2:1):0,l=[dojo._listener,del,_118][lid];var h=l.add(obj,_119,dojo.hitch(_11a,_11b));return [obj,_119,h,lid];};dojo._disconnect=function(obj,_11e,_11f,_120){([dojo._listener,del,_118][_120]).remove(obj,_11e,_11f);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:dojo.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:dojo.isMac&&!dojo.isAIR?(dojo.isSafari?91:224):17};var _121=dojo.isMac?"metaKey":"ctrlKey";dojo.isCopyKey=function(e){return e[_121];};if(dojo.isIE){dojo.mouseButtons={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_122){return e.button&_122;},isLeft:function(e){return e.button&1;},isMiddle:function(e){return e.button&4;},isRight:function(e){return e.button&2;}};}else{dojo.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_123){return e.button==_123;},isLeft:function(e){return e.button==0;},isMiddle:function(e){return e.button==1;},isRight:function(e){return e.button==2;}};}if(dojo.isIE){var _124=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;var _125=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){_118=iel=dojo._ie_listener={handlers:[],add:function(_126,_127,_128){_126=_126||dojo.global;var f=_126[_127];if(!f||!f[_125]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[_125]=[];f=_126[_127]=d;}return f[_125].push(ieh.push(_128)-1);},remove:function(_129,_12a,_12b){var f=(_129||dojo.global)[_12a],l=f&&f[_125];if(f&&l&&_12b--){delete ieh[l[_12b]];delete l[_12b];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_12c,fp){if(!node){return;}_12c=del._normalizeEventName(_12c);if(_12c=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[_125]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_12c,del._fixCallback(fp));},remove:function(node,_12d,_12e){_12d=del._normalizeEventName(_12d);iel.remove(node,_12d,_12e);if(_12d=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_12f){return _12f.slice(0,2)!="on"?"on"+_12f:_12f;},_nop:function(){},_fixEvent:function(evt,_130){if(!evt){var w=_130&&(_130.ownerDocument||_130.document||_130).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_130||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _131=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _132=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_131.scrollLeft||0)-_132.x;evt.pageY=evt.clientY+(_131.scrollTop||0)-_132.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[_125]){return;}var k=evt.keyCode;var _133=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_133||evt.ctrlKey){var c=_133?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_124(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_124(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_134){var faux=dojo.mixin({},evt,_134);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_135){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,_136,fp){if(!node){return;}var _137=del._add(node,_136,fp);if(del._normalizeEventName(_136)=="keypress"){_137._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var _138=k!=13&&k!=32&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_138||evt.ctrlKey){var c=_138?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux);}});}return _137;},remove:function(node,_139,_13a){if(node){if(_13a._stealthKeyDownHandle){del._remove(node,"keydown",_13a._stealthKeyDownHandle);}del._remove(node,_139,_13a);}},_fixEvent:function(evt,_13b){switch(evt.type){case "keypress":if(evt.faux){return evt;}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true});}return evt;}});}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_13c){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(_13c,args);var lls=[].concat(ls);for(var i in lls){var f=h[lls[i]];if(!(i in ap)&&f){f.apply(_13c,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(typeof id!="string"){return id;}var _13d=doc||dojo.doc,te=_13d.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te;}else{var eles=_13d.all[id];if(!eles||eles.nodeName){eles=[eles];}var i=0;while((te=eles[i++])){if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){return te;}}}};}else{dojo.byId=function(id,doc){return (typeof id=="string")?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var byId=d.byId;var _13e=null,_13f;d.addOnWindowUnload(function(){_13e=null;});dojo._destroyElement=dojo.destroy=function(node){node=byId(node);try{var doc=node.ownerDocument;if(!_13e||_13f!=doc){_13e=doc.createElement("div");_13f=doc;}_13e.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_13e.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_140){try{node=byId(node);_140=byId(_140);while(node){if(node==_140){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_141){node=byId(node);if(d.isMozilla){node.style.MozUserSelect=_141?"":"none";}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=_141?"auto":"none";}else{if(d.isIE){var v=(node.unselectable=_141?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'");}}}};var _142=function(node,ref){var _143=ref.parentNode;if(_143){_143.insertBefore(node,ref);}};var _144=function(node,ref){var _145=ref.parentNode;if(_145){if(_145.lastChild==ref){_145.appendChild(node);}else{_145.insertBefore(node,ref.nextSibling);}}};dojo.place=function(node,_146,_147){_146=byId(_146);if(typeof node=="string"){node=node.charAt(0)=="<"?d._toDom(node,_146.ownerDocument):byId(node);}if(typeof _147=="number"){var cn=_146.childNodes;if(!cn.length||cn.length<=_147){_146.appendChild(node);}else{_142(node,cn[_147<0?0:_147]);}}else{switch(_147){case "before":_142(node,_146);break;case "after":_144(node,_146);break;case "replace":_146.parentNode.replaceChild(node,_146);break;case "only":d.empty(_146);_146.appendChild(node);break;case "first":if(_146.firstChild){_142(node,_146.firstChild);break;}default:_146.appendChild(node);}}return node;};dojo.boxModel="content-box";if(d.isIE){d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node.nodeType==1){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}}return s||{};};}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{};};}else{gcs=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(_148,_149){return parseFloat(_149)||0;};}else{d._toPixelValue=function(_14a,_14b){if(!_14b){return 0;}if(_14b=="medium"){return 4;}if(_14b.slice&&_14b.slice(-2)=="px"){return parseFloat(_14b);}with(_14a){var _14c=style.left;var _14d=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_14b;_14b=style.pixelLeft;}catch(e){_14b=0;}style.left=_14c;runtimeStyle.left=_14d;}return _14b;};}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_14e){var ov=_14e*100;node.style.zoom=1;af(node,1).Enabled=!(_14e==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,_14e);});}return _14e;}:function(node,_14f){return node.style.opacity=_14f;};var _150={left:true,top:true};var _151=/margin|padding|width|height|max|min|offset/;var _152=function(node,type,_153){type=type.toLowerCase();if(d.isIE){if(_153=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_153){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _150)){_150[type]=_151.test(type);}return _150[type]?px(node,_153):_153;};var _154=d.isIE?"styleFloat":"cssFloat",_155={"cssFloat":_154,"styleFloat":_154,"float":_154};dojo.style=function(node,_156,_157){var n=byId(node),args=arguments.length,op=(_156=="opacity");_156=_155[_156]||_156;if(args==3){return op?d._setOpacity(n,_157):n.style[_156]=_157;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&typeof _156!="string"){for(var x in _156){d.style(node,x,_156[x]);}return s;}return (args==1)?s:_152(n,_156,s[_156]||n.style[_156]);};dojo._getPadExtents=function(n,_158){var s=_158||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_159){var ne="none",s=_159||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_15a){var s=_15a||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_15b){var s=_15b||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_15c){var s=_15c||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera||(d.isIE>7&&!d.isQuirks)){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_15d){var s=_15d||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_15e){var s=_15e||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&(node.getAttribute("type")||"").toUpperCase()=="BUTTON";};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);};dojo._setContentSize=function(node,_15f,_160,_161){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_161);if(_15f>=0){_15f+=pb.w;}if(_160>=0){_160+=pb.h;}}d._setBox(node,NaN,NaN,_15f,_160);};dojo._setMarginBox=function(node,_162,_163,_164,_165,_166){var s=_166||gcs(node),bb=d._usesBorderBox(node),pb=bb?_167:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(_164>=0&&!ns.width){ns.width="4px";}if(_165>=0&&!ns.height){ns.height="4px";}}}var mb=d._getMarginExtents(node,s);if(_164>=0){_164=Math.max(_164-pb.w-mb.w,0);}if(_165>=0){_165=Math.max(_165-pb.h-mb.h,0);}d._setBox(node,_162,_163,_164,_165);};var _167={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _168=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_169=0,_16a=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_169+=val-0;if(node==_16a){break;}}node=node.parentNode;}return _169;};dojo._docScroll=function(){var n=d.global;return "pageXOffset" in n?{x:n.pageXOffset,y:n.pageYOffset}:(n=d.doc.documentElement,n.clientHeight?{x:d._fixIeBiDiScrollLeft(n.scrollLeft),y:n.scrollTop}:(n=d.body(),{x:n.scrollLeft||0,y:n.scrollTop||0}));};dojo._isBodyLtr=function(){return "_bodyLtr" in d?d._bodyLtr:d._bodyLtr=(d.body().dir||d.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;if(d.isIE<8){var r=de.getBoundingClientRect();var l=r.left,t=r.top;if(d.isIE<7){l+=de.clientLeft;t+=de.clientTop;}return {x:l<0?0:l,y:t<0?0:t};}else{return {x:0,y:0};}};dojo._fixIeBiDiScrollLeft=function(_16b){var dd=d.doc;if(d.isIE<8&&!d._isBodyLtr()){var de=d.isQuirks?dd.body:dd.documentElement;return _16b+de.clientWidth-de.scrollWidth;}return _16b;};dojo._abs=dojo.position=function(node,_16c){var db=d.body(),dh=db.parentNode,ret;node=byId(node);if(node["getBoundingClientRect"]){ret=node.getBoundingClientRect();ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};if(d.isIE){var _16d=d._getIeDocumentElementOffset();ret.x-=_16d.x+(d.isQuirks?db.clientLeft+db.offsetLeft:0);ret.y-=_16d.y+(d.isQuirks?db.clientTop+db.offsetTop:0);}else{if(d.isFF==3){var cs=gcs(dh);ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);}}}else{ret={x:0,y:0,w:node.offsetWidth,h:node.offsetHeight};if(node["offsetParent"]){ret.x-=_168(node,"scrollLeft");ret.y-=_168(node,"scrollTop");var _16e=node;do{var n=_16e.offsetLeft,t=_16e.offsetTop;ret.x+=isNaN(n)?0:n;ret.y+=isNaN(t)?0:t;cs=gcs(_16e);if(_16e!=node){if(d.isMoz){ret.x+=2*px(_16e,cs.borderLeftWidth);ret.y+=2*px(_16e,cs.borderTopWidth);}else{ret.x+=px(_16e,cs.borderLeftWidth);ret.y+=px(_16e,cs.borderTopWidth);}}if(d.isMoz&&cs.position=="static"){var _16f=_16e.parentNode;while(_16f!=_16e.offsetParent){var pcs=gcs(_16f);if(pcs.position=="static"){ret.x+=px(_16e,pcs.borderLeftWidth);ret.y+=px(_16e,pcs.borderTopWidth);}_16f=_16f.parentNode;}}_16e=_16e.offsetParent;}while((_16e!=dh)&&_16e);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}if(_16c){var _170=d._docScroll();ret.x+=_170.x;ret.y+=_170.y;}return ret;};dojo.coords=function(node,_171){var n=byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d.position(n,_171);mb.x=abs.x;mb.y=abs.y;return mb;};var _172={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},_173={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},_174={innerHTML:1,className:1,htmlFor:d.isIE,value:1};var _175=function(name){return _173[name.toLowerCase()]||name;};var _176=function(node,name){var attr=node.getAttributeNode&&node.getAttributeNode(name);return attr&&attr.specified;};dojo.hasAttr=function(node,name){var lc=name.toLowerCase();return _174[_172[lc]||name]||_176(byId(node),_173[lc]||name);};var _177={},_178=0,_179=dojo._scopeName+"attrid",_17a={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};dojo.attr=function(node,name,_17b){node=byId(node);var args=arguments.length,prop;if(args==2&&typeof name!="string"){for(var x in name){d.attr(node,x,name[x]);}return node;}var lc=name.toLowerCase(),_17c=_172[lc]||name,_17d=_174[_17c],_17e=_173[lc]||name;if(args==3){do{if(_17c=="style"&&typeof _17b!="string"){d.style(node,_17b);break;}if(_17c=="innerHTML"){if(d.isIE&&node.tagName.toLowerCase() in _17a){d.empty(node);node.appendChild(d._toDom(_17b,node.ownerDocument));}else{node[_17c]=_17b;}break;}if(d.isFunction(_17b)){var _17f=d.attr(node,_179);if(!_17f){_17f=_178++;d.attr(node,_179,_17f);}if(!_177[_17f]){_177[_17f]={};}var h=_177[_17f][_17c];if(h){d.disconnect(h);}else{try{delete node[_17c];}catch(e){}}_177[_17f][_17c]=d.connect(node,_17c,_17b);break;}if(_17d||typeof _17b=="boolean"){node[_17c]=_17b;break;}node.setAttribute(_17e,_17b);}while(false);return node;}_17b=node[_17c];if(_17d&&typeof _17b!="undefined"){return _17b;}if(_17c!="href"&&(typeof _17b=="boolean"||d.isFunction(_17b))){return _17b;}return _176(node,_17e)?node.getAttribute(_17e):null;};dojo.removeAttr=function(node,name){byId(node).removeAttribute(_175(name));};dojo.getNodeProp=function(node,name){node=byId(node);var lc=name.toLowerCase(),_180=_172[lc]||name;if((_180 in node)&&_180!="href"){return node[_180];}var _181=_173[lc]||name;return _176(node,_181)?node.getAttribute(_181):null;};dojo.create=function(tag,_182,_183,pos){var doc=d.doc;if(_183){_183=byId(_183);doc=_183.ownerDocument;}if(typeof tag=="string"){tag=doc.createElement(tag);}if(_182){d.attr(tag,_182);}if(_183){d.place(tag,_183,pos);}return tag;};d.empty=d.isIE?function(node){node=byId(node);for(var c;c=node.lastChild;){d.destroy(c);}}:function(node){byId(node).innerHTML="";};var _184={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_185=/<\s*([\w\:]+)/,_186={},_187=0,_188="__"+d._scopeName+"ToDomId";for(var _189 in _184){var tw=_184[_189];tw.pre=_189=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">";}d._toDom=function(frag,doc){doc=doc||d.doc;var _18a=doc[_188];if(!_18a){doc[_188]=_18a=++_187+"";_186[_18a]=doc.createElement("div");}frag+="";var _18b=frag.match(_185),tag=_18b?_18b[1].toLowerCase():"",_18c=_186[_18a],wrap,i,fc,df;if(_18b&&_184[tag]){wrap=_184[tag];_18c.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){_18c=_18c.firstChild;}}else{_18c.innerHTML=frag;}if(_18c.childNodes.length==1){return _18c.removeChild(_18c.firstChild);}df=doc.createDocumentFragment();while(fc=_18c.firstChild){df.appendChild(fc);}return df;};var _18d="className";dojo.hasClass=function(node,_18e){return ((" "+byId(node)[_18d]+" ").indexOf(" "+_18e+" ")>=0);};var _18f=/\s+/,a1=[""],_190=function(s){if(typeof s=="string"||s instanceof String){if(s.indexOf(" ")<0){a1[0]=s;return a1;}else{return s.split(_18f);}}return s;};dojo.addClass=function(node,_191){node=byId(node);_191=_190(_191);var cls=" "+node[_18d]+" ";for(var i=0,len=_191.length,c;i<len;++i){c=_191[i];if(c&&cls.indexOf(" "+c+" ")<0){cls+=c+" ";}}node[_18d]=d.trim(cls);};dojo.removeClass=function(node,_192){node=byId(node);var cls;if(_192!==undefined){_192=_190(_192);cls=" "+node[_18d]+" ";for(var i=0,len=_192.length;i<len;++i){cls=cls.replace(" "+_192[i]+" "," ");}cls=d.trim(cls);}else{cls="";}if(node[_18d]!=cls){node[_18d]=cls;}};dojo.toggleClass=function(node,_193,_194){if(_194===undefined){_194=!d.hasClass(node,_193);}d[_194?"addClass":"removeClass"](node,_193);};})();}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var ap=Array.prototype,aps=ap.slice,apc=ap.concat;var tnl=function(a,_195,_196){if(!a.sort){a=aps.call(a,0);}var ctor=_196||this._NodeListCtor||d._NodeListCtor;a.constructor=ctor;dojo._mixin(a,ctor.prototype);a._NodeListCtor=ctor;return _195?a._stash(_195):a;};var _197=function(f,a,o){a=[0].concat(aps.call(a,0));o=o||d.global;return function(node){a[0]=node;return f.apply(o,a);};};var _198=function(f,o){return function(){this.forEach(_197(f,arguments,o));return this;};};var _199=function(f,o){return function(){return this.map(_197(f,arguments,o));};};var _19a=function(f,o){return function(){return this.filter(_197(f,arguments,o));};};var _19b=function(f,g,o){return function(){var a=arguments,body=_197(f,a,o);if(g.call(o||d.global,a)){return this.map(body);}this.forEach(body);return this;};};var _19c=function(a){return a.length==1&&(typeof a[0]=="string");};var _19d=function(node){var p=node.parentNode;if(p){p.removeChild(node);}};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};d._NodeListCtor=d.NodeList;var nl=d.NodeList,nlp=nl.prototype;nl._wrap=nlp._wrap=tnl;nl._adaptAsMap=_199;nl._adaptAsForEach=_198;nl._adaptAsFilter=_19a;nl._adaptWithCondition=_19b;d.forEach(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return this._wrap(f.apply(this,arguments),name=="slice"?this:null);};});d.forEach(["indexOf","lastIndexOf","every","some"],function(name){var f=d[name];nlp[name]=function(){return f.apply(d,[this].concat(aps.call(arguments,0)));};});d.forEach(["attr","style"],function(name){nlp[name]=_19b(d[name],_19c);});d.forEach(["connect","addClass","removeClass","toggleClass","empty","removeAttr"],function(name){nlp[name]=_198(d[name]);});dojo.extend(dojo.NodeList,{_normalize:function(_19e,_19f){var _1a0=_19e.parse===true?true:false;if(typeof _19e.template=="string"){var _1a1=_19e.templateFunc||(dojo.string&&dojo.string.substitute);_19e=_1a1?_1a1(_19e.template,_19e):_19e;}var type=(typeof _19e);if(type=="string"||type=="number"){_19e=dojo._toDom(_19e,(_19f&&_19f.ownerDocument));if(_19e.nodeType==11){_19e=dojo._toArray(_19e.childNodes);}else{_19e=[_19e];}}else{if(!dojo.isArrayLike(_19e)){_19e=[_19e];}else{if(!dojo.isArray(_19e)){_19e=dojo._toArray(_19e);}}}if(_1a0){_19e._runParse=true;}return _19e;},_cloneNode:function(node){return node.cloneNode(true);},_place:function(ary,_1a2,_1a3,_1a4){if(_1a2.nodeType!=1&&_1a3=="only"){return;}var _1a5=_1a2,_1a6;var _1a7=ary.length;for(var i=_1a7-1;i>=0;i--){var node=(_1a4?this._cloneNode(ary[i]):ary[i]);if(ary._runParse&&dojo.parser&&dojo.parser.parse){if(!_1a6){_1a6=_1a5.ownerDocument.createElement("div");}_1a6.appendChild(node);dojo.parser.parse(_1a6);node=_1a6.firstChild;while(_1a6.firstChild){_1a6.removeChild(_1a6.firstChild);}}if(i==_1a7-1){dojo.place(node,_1a5,_1a3);}else{_1a5.parentNode.insertBefore(node,_1a5);}_1a5=node;}},_stash:function(_1a8){this._parent=_1a8;return this;},end:function(){if(this._parent){return this._parent;}else{return new this._NodeListCtor();}},concat:function(item){var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){return a&&!d.isArray(a)&&(typeof NodeList!="undefined"&&a.constructor===NodeList||a.constructor===this._NodeListCtor)?aps.call(a,0):a;});return this._wrap(apc.apply(t,m),this);},map:function(func,obj){return this._wrap(d.map(this,func,obj),this);},forEach:function(_1a9,_1aa){d.forEach(this,_1a9,_1aa);return this;},coords:_199(d.coords),position:_199(d.position),place:function(_1ab,_1ac){var item=d.query(_1ab)[0];return this.forEach(function(node){d.place(node,item,_1ac);});},orphan:function(_1ad){return (_1ad?d._filterQueryResult(this,_1ad):this).forEach(_19d);},adopt:function(_1ae,_1af){return d.query(_1ae).place(this[0],_1af)._stash(this);},query:function(_1b0){if(!_1b0){return this;}var ret=this.map(function(node){return d.query(_1b0,node).filter(function(_1b1){return _1b1!==undefined;});});return this._wrap(apc.apply([],ret),this);},filter:function(_1b2){var a=arguments,_1b3=this,_1b4=0;if(typeof _1b2=="string"){_1b3=d._filterQueryResult(this,a[0]);if(a.length==1){return _1b3._stash(this);}_1b4=1;}return this._wrap(d.filter(_1b3,a[_1b4],a[_1b4+1]),this);},addContent:function(_1b5,_1b6){_1b5=this._normalize(_1b5,this[0]);for(var i=0,node;node=this[i];i++){this._place(_1b5,node,_1b6,i>0);}return this;},instantiate:function(_1b7,_1b8){var c=d.isFunction(_1b7)?_1b7:d.getObject(_1b7);_1b8=_1b8||{};return this.forEach(function(node){new c(_1b8,node);});},at:function(){var t=new this._NodeListCtor();d.forEach(arguments,function(i){if(this[i]){t.push(this[i]);}},this);return t._stash(this);}});nl.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];d.forEach(nl.events,function(evt){var _1b9="on"+evt;nlp[_1b9]=function(a,b){return this.connect(_1b9,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;if(typeof dojo!="undefined"){dojo.provide("dojo._base.query");}(function(d){var trim=d.trim;var each=d.forEach;var qlc=d._NodeListCtor=d.NodeList;var _1ba=function(){return d.doc;};var _1bb=((d.isWebKit||d.isMozilla)&&((_1ba().compatMode)=="BackCompat"));var _1bc=!!_1ba().firstChild["children"]?"children":"childNodes";var _1bd=">~+";var _1be=false;var _1bf=function(){return true;};var _1c0=function(_1c1){if(_1bd.indexOf(_1c1.slice(-1))>=0){_1c1+=" * ";}else{_1c1+=" ";}var ts=function(s,e){return trim(_1c1.slice(s,e));};var _1c2=[];var _1c3=-1,_1c4=-1,_1c5=-1,_1c6=-1,_1c7=-1,inId=-1,_1c8=-1,lc="",cc="",_1c9;var x=0,ql=_1c1.length,_1ca=null,_1cb=null;var _1cc=function(){if(_1c8>=0){var tv=(_1c8==x)?null:ts(_1c8,x);_1ca[(_1bd.indexOf(tv)<0)?"tag":"oper"]=tv;_1c8=-1;}};var _1cd=function(){if(inId>=0){_1ca.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _1ce=function(){if(_1c7>=0){_1ca.classes.push(ts(_1c7+1,x).replace(/\\/g,""));_1c7=-1;}};var _1cf=function(){_1cd();_1cc();_1ce();};var _1d0=function(){_1cf();if(_1c6>=0){_1ca.pseudos.push({name:ts(_1c6+1,x)});}_1ca.loops=(_1ca.pseudos.length||_1ca.attrs.length||_1ca.classes.length);_1ca.oquery=_1ca.query=ts(_1c9,x);_1ca.otag=_1ca.tag=(_1ca["oper"])?null:(_1ca.tag||"*");if(_1ca.tag){_1ca.tag=_1ca.tag.toUpperCase();}if(_1c2.length&&(_1c2[_1c2.length-1].oper)){_1ca.infixOper=_1c2.pop();_1ca.query=_1ca.infixOper.query+" "+_1ca.query;}_1c2.push(_1ca);_1ca=null;};for(;lc=cc,cc=_1c1.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_1ca){_1c9=x;_1ca={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return (_1be)?this.otag:this.tag;}};_1c8=x;}if(_1c3>=0){if(cc=="]"){if(!_1cb.attr){_1cb.attr=ts(_1c3+1,x);}else{_1cb.matchFor=ts((_1c5||_1c3+1),x);}var cmf=_1cb.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_1cb.matchFor=cmf.slice(1,-1);}}_1ca.attrs.push(_1cb);_1cb=null;_1c3=_1c5=-1;}else{if(cc=="="){var _1d1=("|~^$*".indexOf(lc)>=0)?lc:"";_1cb.type=_1d1+cc;_1cb.attr=ts(_1c3+1,x-_1d1.length);_1c5=x+1;}}}else{if(_1c4>=0){if(cc==")"){if(_1c6>=0){_1cb.value=ts(_1c4+1,x);}_1c6=_1c4=-1;}}else{if(cc=="#"){_1cf();inId=x+1;}else{if(cc=="."){_1cf();_1c7=x;}else{if(cc==":"){_1cf();_1c6=x;}else{if(cc=="["){_1cf();_1c3=x;_1cb={};}else{if(cc=="("){if(_1c6>=0){_1cb={name:ts(_1c6+1,x),value:null};_1ca.pseudos.push(_1cb);}_1c4=x;}else{if((cc==" ")&&(lc!=cc)){_1d0();}}}}}}}}}return _1c2;};var _1d2=function(_1d3,_1d4){if(!_1d3){return _1d4;}if(!_1d4){return _1d3;}return function(){return _1d3.apply(window,arguments)&&_1d4.apply(window,arguments);};};var _1d5=function(i,arr){var r=arr||[];if(i){r.push(i);}return r;};var _1d6=function(n){return (1==n.nodeType);};var _1d7="";var _1d8=function(elem,attr){if(!elem){return _1d7;}if(attr=="class"){return elem.className||_1d7;}if(attr=="for"){return elem.htmlFor||_1d7;}if(attr=="style"){return elem.style.cssText||_1d7;}return (_1be?elem.getAttribute(attr):elem.getAttribute(attr,2))||_1d7;};var _1d9={"*=":function(attr,_1da){return function(elem){return (_1d8(elem,attr).indexOf(_1da)>=0);};},"^=":function(attr,_1db){return function(elem){return (_1d8(elem,attr).indexOf(_1db)==0);};},"$=":function(attr,_1dc){var tval=" "+_1dc;return function(elem){var ea=" "+_1d8(elem,attr);return (ea.lastIndexOf(_1dc)==(ea.length-_1dc.length));};},"~=":function(attr,_1dd){var tval=" "+_1dd+" ";return function(elem){var ea=" "+_1d8(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_1de){var _1df=" "+_1de+"-";return function(elem){var ea=" "+_1d8(elem,attr);return ((ea==_1de)||(ea.indexOf(_1df)==0));};},"=":function(attr,_1e0){return function(elem){return (_1d8(elem,attr)==_1e0);};}};var _1e1=(typeof _1ba().firstChild.nextElementSibling=="undefined");var _1e2=!_1e1?"nextElementSibling":"nextSibling";var _1e3=!_1e1?"previousElementSibling":"previousSibling";var _1e4=(_1e1?_1d6:_1bf);var _1e5=function(node){while(node=node[_1e3]){if(_1e4(node)){return false;}}return true;};var _1e6=function(node){while(node=node[_1e2]){if(_1e4(node)){return false;}}return true;};var _1e7=function(node){var root=node.parentNode;var i=0,tret=root[_1bc],ci=(node["_i"]||-1),cl=(root["_l"]||-1);if(!tret){return -1;}var l=tret.length;if(cl==l&&ci>=0&&cl>=0){return ci;}root["_l"]=l;ci=-1;for(var te=root["firstElementChild"]||root["firstChild"];te;te=te[_1e2]){if(_1e4(te)){te["_i"]=++i;if(node===te){ci=i;}}}return ci;};var _1e8=function(elem){return !((_1e7(elem))%2);};var _1e9=function(elem){return ((_1e7(elem))%2);};var _1ea={"checked":function(name,_1eb){return function(elem){return !!("checked" in elem?elem.checked:elem.selected);};},"first-child":function(){return _1e5;},"last-child":function(){return _1e6;},"only-child":function(name,_1ec){return function(node){if(!_1e5(node)){return false;}if(!_1e6(node)){return false;}return true;};},"empty":function(name,_1ed){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt===1)||(nt==3)){return false;}}return true;};},"contains":function(name,_1ee){var cz=_1ee.charAt(0);if(cz=="\""||cz=="'"){_1ee=_1ee.slice(1,-1);}return function(elem){return (elem.innerHTML.indexOf(_1ee)>=0);};},"not":function(name,_1ef){var p=_1c0(_1ef)[0];var _1f0={el:1};if(p.tag!="*"){_1f0.tag=1;}if(!p.classes.length){_1f0.classes=1;}var ntf=_1f1(p,_1f0);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_1f2){var pi=parseInt;if(_1f2=="odd"){return _1e9;}else{if(_1f2=="even"){return _1e8;}}if(_1f2.indexOf("n")!=-1){var _1f3=_1f2.split("n",2);var pred=_1f3[0]?((_1f3[0]=="-")?-1:pi(_1f3[0])):1;var idx=_1f3[1]?pi(_1f3[1]):0;var lb=0,ub=-1;if(pred>0){if(idx<0){idx=(idx%pred)&&(pred+(idx%pred));}else{if(idx>0){if(idx>=pred){lb=idx-idx%pred;}idx=idx%pred;}}}else{if(pred<0){pred*=-1;if(idx>0){ub=idx;idx=idx%pred;}}}if(pred>0){return function(elem){var i=_1e7(elem);return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);};}else{_1f2=idx;}}var _1f4=pi(_1f2);return function(elem){return (_1e7(elem)==_1f4);};}};var _1f5=(d.isIE)?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className";}return function(elem){return (_1be?elem.getAttribute(cond):elem[cond]||elem[clc]);};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _1f1=function(_1f6,_1f7){if(!_1f6){return _1bf;}_1f7=_1f7||{};var ff=null;if(!("el" in _1f7)){ff=_1d2(ff,_1d6);}if(!("tag" in _1f7)){if(_1f6.tag!="*"){ff=_1d2(ff,function(elem){return (elem&&(elem.tagName==_1f6.getTag()));});}}if(!("classes" in _1f7)){each(_1f6.classes,function(_1f8,idx,arr){var re=new RegExp("(?:^|\\s)"+_1f8+"(?:\\s|$)");ff=_1d2(ff,function(elem){return re.test(elem.className);});ff.count=idx;});}if(!("pseudos" in _1f7)){each(_1f6.pseudos,function(_1f9){var pn=_1f9.name;if(_1ea[pn]){ff=_1d2(ff,_1ea[pn](pn,_1f9.value));}});}if(!("attrs" in _1f7)){each(_1f6.attrs,function(attr){var _1fa;var a=attr.attr;if(attr.type&&_1d9[attr.type]){_1fa=_1d9[attr.type](a,attr.matchFor);}else{if(a.length){_1fa=_1f5(a);}}if(_1fa){ff=_1d2(ff,_1fa);}});}if(!("id" in _1f7)){if(_1f6.id){ff=_1d2(ff,function(elem){return (!!elem&&(elem.id==_1f6.id));});}}if(!ff){if(!("default" in _1f7)){ff=_1bf;}}return ff;};var _1fb=function(_1fc){return function(node,ret,bag){while(node=node[_1e2]){if(_1e1&&(!_1d6(node))){continue;}if((!bag||_1fd(node,bag))&&_1fc(node)){ret.push(node);}break;}return ret;};};var _1fe=function(_1ff){return function(root,ret,bag){var te=root[_1e2];while(te){if(_1e4(te)){if(bag&&!_1fd(te,bag)){break;}if(_1ff(te)){ret.push(te);}}te=te[_1e2];}return ret;};};var _200=function(_201){_201=_201||_1bf;return function(root,ret,bag){var te,x=0,tret=root[_1bc];while(te=tret[x++]){if(_1e4(te)&&(!bag||_1fd(te,bag))&&(_201(te,x))){ret.push(te);}}return ret;};};var _202=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break;}pn=pn.parentNode;}return !!pn;};var _203={};var _204=function(_205){var _206=_203[_205.query];if(_206){return _206;}var io=_205.infixOper;var oper=(io?io.oper:"");var _207=_1f1(_205,{el:1});var qt=_205.tag;var _208=("*"==qt);var ecs=_1ba()["getElementsByClassName"];if(!oper){if(_205.id){_207=(!_205.loops&&_208)?_1bf:_1f1(_205,{el:1,id:1});_206=function(root,arr){var te=d.byId(_205.id,(root.ownerDocument||root));if(!te||!_207(te)){return;}if(9==root.nodeType){return _1d5(te,arr);}else{if(_202(te,root)){return _1d5(te,arr);}}};}else{if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_205.classes.length&&!_1bb){_207=_1f1(_205,{el:1,classes:1,id:1});var _209=_205.classes.join(" ");_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByClassName(_209);while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}else{if(!_208&&!_205.loops){_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_1fd(te,bag)){ret.push(te);}}return ret;};}else{_207=_1f1(_205,{el:1,tag:1,id:1});_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}}}}else{var _20a={el:1};if(_208){_20a.tag=1;}_207=_1f1(_205,_20a);if("+"==oper){_206=_1fb(_207);}else{if("~"==oper){_206=_1fe(_207);}else{if(">"==oper){_206=_200(_207);}}}}return _203[_205.query]=_206;};var _20b=function(root,_20c){var _20d=_1d5(root),qp,x,te,qpl=_20c.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=_20c[i];x=_20d.length-1;if(x>0){bag={};ret.nozip=true;}var gef=_204(qp);for(var j=0;(te=_20d[j]);j++){gef(te,ret,bag);}if(!ret.length){break;}_20d=ret;}return ret;};var _20e={},_20f={};var _210=function(_211){var _212=_1c0(trim(_211));if(_212.length==1){var tef=_204(_212[0]);return function(root){var r=tef(root,new qlc());if(r){r.nozip=true;}return r;};}return function(root){return _20b(root,_212);};};var nua=navigator.userAgent;var wk="WebKit/";var _213=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var _214=d.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var _215=(!!_1ba()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_213));var _216=/n\+\d|([^ ])?([>~+])([^ =])?/g;var _217=function(_218,pre,ch,post){return ch?(pre?pre+" ":"")+ch+(post?" "+post:""):_218;};var _219=function(_21a,_21b){_21a=_21a.replace(_216,_217);if(_215){var _21c=_20f[_21a];if(_21c&&!_21b){return _21c;}}var _21d=_20e[_21a];if(_21d){return _21d;}var qcz=_21a.charAt(0);var _21e=(-1==_21a.indexOf(" "));if((_21a.indexOf("#")>=0)&&(_21e)){_21b=true;}var _21f=(_215&&(!_21b)&&(_1bd.indexOf(qcz)==-1)&&(!d.isIE||(_21a.indexOf(":")==-1))&&(!(_1bb&&(_21a.indexOf(".")>=0)))&&(_21a.indexOf(":contains")==-1)&&(_21a.indexOf(":checked")==-1)&&(_21a.indexOf("|=")==-1));if(_21f){var tq=(_1bd.indexOf(_21a.charAt(_21a.length-1))>=0)?(_21a+" *"):_21a;return _20f[_21a]=function(root){try{if(!((9==root.nodeType)||_21e)){throw "";}var r=root[qsa](tq);r[_214]=true;return r;}catch(e){return _219(_21a,true)(root);}};}else{var _220=_21a.split(/\s*,\s*/);return _20e[_21a]=((_220.length<2)?_210(_21a):function(root){var _221=0,ret=[],tp;while((tp=_220[_221++])){ret=ret.concat(_210(tp)(root));}return ret;});}};var _222=0;var _223=d.isIE?function(node){if(_1be){return (node.getAttribute("_uid")||node.setAttribute("_uid",++_222)||_222);}else{return node.uniqueID;}}:function(node){return (node._uid||(node._uid=++_222));};var _1fd=function(node,bag){if(!bag){return 1;}var id=_223(node);if(!bag[id]){return bag[id]=1;}return 0;};var _224="_zipIdx";var _225=function(arr){if(arr&&arr.nozip){return (qlc._wrap)?qlc._wrap(arr):arr;}var ret=new qlc();if(!arr||!arr.length){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_222++;if(d.isIE&&_1be){var _226=_222+"";arr[0].setAttribute(_224,_226);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_224)!=_226){ret.push(te);}te.setAttribute(_224,_226);}}else{if(d.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_1d6(te)){ret.push(te);}}}catch(e){}}else{if(arr[0]){arr[0][_224]=_222;}for(var x=1,te;te=arr[x];x++){if(arr[x][_224]!=_222){ret.push(te);}te[_224]=_222;}}}return ret;};d.query=function(_227,root){qlc=d._NodeListCtor;if(!_227){return new qlc();}if(_227.constructor==qlc){return _227;}if(typeof _227!="string"){return new qlc(_227);}if(typeof root=="string"){root=d.byId(root);if(!root){return new qlc();}}root=root||_1ba();var od=root.ownerDocument||root.documentElement;_1be=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=_219(_227)(root);if(r&&r.nozip&&!qlc._wrap){return r;}return _225(r);};d.query.pseudos=_1ea;d._filterQueryResult=function(_228,_229){var _22a=new d._NodeListCtor();var _22b=_1f1(_1c0(_229)[0]);for(var x=0,te;te=_228[x];x++){if(_22b(te)){_22a.push(te);}}return _22a;};})(this["queryPortability"]||this["acme"]||dojo);}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _22c=dojo,cfg=_22c.config;function _22d(obj,name,_22e){if(_22e===null){return;}var val=obj[name];if(typeof val=="string"){obj[name]=[val,_22e];}else{if(_22c.isArray(val)){val.push(_22e);}else{obj[name]=_22e;}}};dojo.fieldToObject=function(_22f){var ret=null;var item=_22c.byId(_22f);if(item){var _230=item.name;var type=(item.type||"").toLowerCase();if(_230&&type&&!item.disabled){if(type=="radio"||type=="checkbox"){if(item.checked){ret=item.value;}}else{if(item.multiple){ret=[];_22c.query("option",item).forEach(function(opt){if(opt.selected){ret.push(opt.value);}});}else{ret=item.value;}}}}return ret;};dojo.formToObject=function(_231){var ret={};var _232="file|submit|image|reset|button|";_22c.forEach(dojo.byId(_231).elements,function(item){var _233=item.name;var type=(item.type||"").toLowerCase();if(_233&&type&&_232.indexOf(type)==-1&&!item.disabled){_22d(ret,_233,_22c.fieldToObject(item));if(type=="image"){ret[_233+".x"]=ret[_233+".y"]=ret[_233].x=ret[_233].y=0;}}});return ret;};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var _234=[];var _235={};for(var name in map){var _236=map[name];if(_236!=_235[name]){var _237=enc(name)+"=";if(_22c.isArray(_236)){for(var i=0;i<_236.length;i++){_234.push(_237+enc(_236[i]));}}else{_234.push(_237+enc(_236));}}}return _234.join("&");};dojo.formToQuery=function(_238){return _22c.objectToQuery(_22c.formToObject(_238));};dojo.formToJson=function(_239,_23a){return _22c.toJson(_22c.formToObject(_239),_23a);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_22c.forEach(qp,function(item){if(item.length){var _23b=item.split("=");var name=dec(_23b.shift());var val=dec(_23b.join("="));if(typeof ret[name]=="string"){ret[name]=[ret[name]];}if(_22c.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;var _23c=_22c._contentHandlers=dojo.contentHandlers={text:function(xhr){return xhr.responseText;},json:function(xhr){return _22c.fromJson(xhr.responseText||null);},"json-comment-filtered":function(xhr){if(!dojo.config.useCommentedJson){console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");}var _23d=xhr.responseText;var _23e=_23d.indexOf("/*");var _23f=_23d.lastIndexOf("*/");if(_23e==-1||_23f==-1){throw new Error("JSON was not comment filtered");}return _22c.fromJson(_23d.substring(_23e+2,_23f));},javascript:function(xhr){return _22c.eval(xhr.responseText);},xml:function(xhr){var _240=xhr.responseXML;if(_22c.isIE&&(!_240||!_240.documentElement)){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_22c.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);_240=dom;}catch(e){return false;}return true;});}return _240;},"json-comment-optional":function(xhr){if(xhr.responseText&&/^[^{\[]*\/\*/.test(xhr.responseText)){return _23c["json-comment-filtered"](xhr);}else{return _23c["json"](xhr);}}};dojo._ioSetArgs=function(args,_241,_242,_243){var _244={args:args,url:args.url};var _245=null;if(args.form){var form=_22c.byId(args.form);var _246=form.getAttributeNode("action");_244.url=_244.url||(_246?_246.value:null);_245=_22c.formToObject(form);}var _247=[{}];if(_245){_247.push(_245);}if(args.content){_247.push(args.content);}if(args.preventCache){_247.push({"dojo.preventCache":new Date().valueOf()});}_244.query=_22c.objectToQuery(_22c.mixin.apply(null,_247));_244.handleAs=args.handleAs||"text";var d=new _22c.Deferred(_241);d.addCallbacks(_242,function(_248){return _243(_248,d);});var ld=args.load;if(ld&&_22c.isFunction(ld)){d.addCallback(function(_249){return ld.call(args,_249,_244);});}var err=args.error;if(err&&_22c.isFunction(err)){d.addErrback(function(_24a){return err.call(args,_24a,_244);});}var _24b=args.handle;if(_24b&&_22c.isFunction(_24b)){d.addBoth(function(_24c){return _24b.call(args,_24c,_244);});}if(cfg.ioPublish&&_22c.publish&&_244.args.ioPublish!==false){d.addCallbacks(function(res){_22c.publish("/dojo/io/load",[d,res]);return res;},function(res){_22c.publish("/dojo/io/error",[d,res]);return res;});d.addBoth(function(res){_22c.publish("/dojo/io/done",[d,res]);return res;});}d.ioArgs=_244;return d;};var _24d=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _24e=typeof xhr.abort;if(_24e=="function"||_24e=="object"||_24e=="unknown"){xhr.abort();}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel";}return err;};var _24f=function(dfd){var ret=_23c[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret;};var _250=function(_251,dfd){if(!dfd.ioArgs.args.failOk){console.error(_251);}return _251;};var _252=null;var _253=[];var _254=0;var _255=function(dfd){if(_254<=0){_254=0;if(cfg.ioPublish&&_22c.publish&&(!dfd||dfd&&dfd.ioArgs.args.ioPublish!==false)){_22c.publish("/dojo/io/stop");}}};var _256=function(){var now=(new Date()).getTime();if(!_22c._blockAsync){for(var i=0,tif;i<_253.length&&(tif=_253[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_253.splice(i--,1);_254-=1;}else{if(tif.ioCheck(dfd)){_253.splice(i--,1);tif.resHandle(dfd);_254-=1;}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_253.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();_254-=1;}}}}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(e){dfd.errback(e);}}}}_255(dfd);if(!_253.length){clearInterval(_252);_252=null;return;}};dojo._ioCancelAll=function(){try{_22c.forEach(_253,function(i){try{i.dfd.cancel();}catch(e){}});}catch(e){}};if(_22c.isIE){_22c.addOnWindowUnload(_22c._ioCancelAll);}_22c._ioNotifyStart=function(dfd){if(cfg.ioPublish&&_22c.publish&&dfd.ioArgs.args.ioPublish!==false){if(!_254){_22c.publish("/dojo/io/start");}_254+=1;_22c.publish("/dojo/io/send",[dfd]);}};_22c._ioWatch=function(dfd,_257,_258,_259){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime();}_253.push({dfd:dfd,validCheck:_257,ioCheck:_258,resHandle:_259});if(!_252){_252=setInterval(_256,50);}if(args.sync){_256();}};var _25a="application/x-www-form-urlencoded";var _25b=function(dfd){return dfd.ioArgs.xhr.readyState;};var _25c=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _25d=function(dfd){var xhr=dfd.ioArgs.xhr;if(_22c._isDocumentOk(xhr)){dfd.callback(dfd);}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err);}};dojo._ioAddQueryToUrl=function(_25e){if(_25e.query.length){_25e.url+=(_25e.url.indexOf("?")==-1?"?":"&")+_25e.query;_25e.query=null;}};dojo.xhr=function(_25f,args,_260){var dfd=_22c._ioSetArgs(args,_24d,_24f,_250);var _261=dfd.ioArgs;var xhr=_261.xhr=_22c._xhrObj(_261.args);if(!xhr){dfd.cancel();return dfd;}if("postData" in args){_261.query=args.postData;}else{if("putData" in args){_261.query=args.putData;}else{if("rawBody" in args){_261.query=args.rawBody;}else{if((arguments.length>2&&!_260)||"POST|PUT".indexOf(_25f.toUpperCase())==-1){_22c._ioAddQueryToUrl(_261);}}}}xhr.open(_25f,_261.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{if(args.headers[hdr]){xhr.setRequestHeader(hdr,args.headers[hdr]);}}}}xhr.setRequestHeader("Content-Type",args.contentType||_25a);if(!args.headers||!("X-Requested-With" in args.headers)){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}_22c._ioNotifyStart(dfd);if(dojo.config.debugAtAllCosts){xhr.send(_261.query);}else{try{xhr.send(_261.query);}catch(e){_261.error=e;dfd.cancel();}}_22c._ioWatch(dfd,_25b,_25c,_25d);xhr=null;return dfd;};dojo.xhrGet=function(args){return _22c.xhr("GET",args);};dojo.rawXhrPost=dojo.xhrPost=function(args){return _22c.xhr("POST",args,true);};dojo.rawXhrPut=dojo.xhrPut=function(args){return _22c.xhr("PUT",args,true);};dojo.xhrDelete=function(args){return _22c.xhr("DELETE",args);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;var _262=d._mixin;dojo._Line=function(_263,end){this.start=_263;this.end=end;};dojo._Line.prototype.getValue=function(n){return ((this.end-this.start)*n)+this.start;};dojo.Animation=function(args){_262(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1]);}};d._Animation=d.Animation;d.extend(dojo.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var _264=this._percent,_265=this.easing;return _265?_265(_264):_264;},_fire:function(evt,args){var a=args||[];if(this[evt]){if(d.config.debugAtAllCosts){this[evt].apply(this,a);}else{try{this[evt].apply(this,a);}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}}}return this;},play:function(_266,_267){var _268=this;if(_268._delayTimer){_268._clearTimer();}if(_267){_268._stopTimer();_268._active=_268._paused=false;_268._percent=0;}else{if(_268._active&&!_268._paused){return _268;}}_268._fire("beforeBegin",[_268.node]);var de=_266||_268.delay,_269=dojo.hitch(_268,"_play",_267);if(de>0){_268._delayTimer=setTimeout(_269,de);return _268;}_269();return _268;},_play:function(_26a){var _26b=this;if(_26b._delayTimer){_26b._clearTimer();}_26b._startTime=new Date().valueOf();if(_26b._paused){_26b._startTime-=_26b.duration*_26b._percent;}_26b._endTime=_26b._startTime+_26b.duration;_26b._active=true;_26b._paused=false;var _26c=_26b.curve.getValue(_26b._getStep());if(!_26b._percent){if(!_26b._startRepeatCount){_26b._startRepeatCount=_26b.repeat;}_26b._fire("onBegin",[_26c]);}_26b._fire("onPlay",[_26c]);_26b._cycle();return _26b;},pause:function(){var _26d=this;if(_26d._delayTimer){_26d._clearTimer();}_26d._stopTimer();if(!_26d._active){return _26d;}_26d._paused=true;_26d._fire("onPause",[_26d.curve.getValue(_26d._getStep())]);return _26d;},gotoPercent:function(_26e,_26f){var _270=this;_270._stopTimer();_270._active=_270._paused=true;_270._percent=_26e;if(_26f){_270.play();}return _270;},stop:function(_271){var _272=this;if(_272._delayTimer){_272._clearTimer();}if(!_272._timer){return _272;}_272._stopTimer();if(_271){_272._percent=1;}_272._fire("onStop",[_272.curve.getValue(_272._getStep())]);_272._active=_272._paused=false;return _272;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _273=this;if(_273._active){var curr=new Date().valueOf();var step=(curr-_273._startTime)/(_273._endTime-_273._startTime);if(step>=1){step=1;}_273._percent=step;if(_273.easing){step=_273.easing(step);}_273._fire("onAnimate",[_273.curve.getValue(step)]);if(_273._percent<1){_273._startTimer();}else{_273._active=false;if(_273.repeat>0){_273.repeat--;_273.play(null,true);}else{if(_273.repeat==-1){_273.play(null,true);}else{if(_273._startRepeatCount){_273.repeat=_273._startRepeatCount;_273._startRepeatCount=0;}}}_273._percent=0;_273._fire("onEnd",[_273.node]);!_273.repeat&&_273._stopTimer();}}return _273;},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer;}});var ctr=0,_274=[],_275=null,_276={run:function(){}};d.extend(d.Animation,{_startTimer:function(){if(!this._timer){this._timer=d.connect(_276,"run",this,"_cycle");ctr++;}if(!_275){_275=setInterval(d.hitch(_276,"run"),this.rate);}},_stopTimer:function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_275);_275=null;ctr=0;}}});var _277=d.isIE?function(node){var ns=node.style;if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _278=_262({properties:{}},args),_279=(_278.properties.opacity={});_279.start=!("start" in _278)?function(){return +d.style(_278.node,"opacity")||0;}:_278.start;_279.end=_278.end;var anim=d.animateProperty(_278);d.connect(anim,"beforeBegin",d.partial(_277,_278.node));return anim;};dojo.fadeIn=function(args){return d._fade(_262({end:1},args));};dojo.fadeOut=function(args){return d._fade(_262({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _27a=function(_27b){this._properties=_27b;for(var p in _27b){var prop=_27b[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}};_27a.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],_27c=prop.start;if(_27c instanceof d.Color){ret[p]=d.blendColors(_27c,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_27c)){ret[p]=((prop.end-_27c)*r)+_27c+(p!="opacity"?prop.units||"px":0);}}}return ret;};dojo.animateProperty=function(args){var n=args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block";}var prop=this.properties[p];if(d.isFunction(prop)){prop=prop(n);}prop=pm[p]=_262({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start(n);}if(d.isFunction(prop.end)){prop.end=prop.end(n);}var _27d=(p.toLowerCase().indexOf("color")>=0);function _27e(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?+v:(_27d?v:parseFloat(v));};if(!("end" in prop)){prop.end=_27e(n,p);}else{if(!("start" in prop)){prop.start=_27e(n,p);}}if(_27d){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);}}this.curve=new _27a(pm);});d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));return anim;};dojo.anim=function(node,_27f,_280,_281,_282,_283){return d.animateProperty({node:node,duration:_280||d.Animation.prototype.duration,properties:_27f,easing:_281,onEnd:_282}).play(_283||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");dojo.forEach(dojo.config.require,function(i){dojo["require"](i);});}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._loadInit,1000);}})();
diff --git a/trunk/activemq-web-demo/src/main/webapp/js/jquery-1.4.2.min.js b/trunk/activemq-web-demo/src/main/webapp/js/jquery-1.4.2.min.js
deleted file mode 100644
index 7c24308..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/jquery-1.4.2.min.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.2
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Sat Feb 13 22:33:48 2010 -0500
- */
-(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
-e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
-j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
-"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
-true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
-c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
-L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
-"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
-a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
-d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
-a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
-!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
-true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
-parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
-s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
-applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
-else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
-a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
-w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
-cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
-i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
-" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
-this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
-e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
-c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
-a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
-function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
-k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
-C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
-null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
-e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
-f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
-if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
-d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
-"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
-a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
-isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
-{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
-if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
-e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
-"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
-d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
-!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
-toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
-u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
-function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
-if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
-t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
-g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
-for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
-1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
-relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
-l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
-h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
-h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
-m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
-!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
-h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
-gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
-c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
-a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
-this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
-u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
-1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
-"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
-serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
-function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
-global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
-e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
-"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
-false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
-false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
-c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
-d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
-g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
-1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
-"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
-if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
-this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
-"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
-animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
-j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
-this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
-"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
-c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
-this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
-this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
-e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
-c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
-function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
-this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
-k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
-f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
-a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
-c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
-d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
-"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
-e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/trunk/activemq-web-demo/src/main/webapp/js/prototype.js b/trunk/activemq-web-demo/src/main/webapp/js/prototype.js
deleted file mode 100755
index 9fe6e12..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/js/prototype.js
+++ /dev/null
@@ -1,4874 +0,0 @@
-/*  Prototype JavaScript framework, version 1.6.1
- *  (c) 2005-2009 Sam Stephenson
- *
- *  Prototype is freely distributable under the terms of an MIT-style license.
- *  For details, see the Prototype web site: http://www.prototypejs.org/
- *
- *--------------------------------------------------------------------------*/
-
-var Prototype = {
-  Version: '1.6.1',
-
-  Browser: (function(){
-    var ua = navigator.userAgent;
-    var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
-    return {
-      IE:             !!window.attachEvent && !isOpera,
-      Opera:          isOpera,
-      WebKit:         ua.indexOf('AppleWebKit/') > -1,
-      Gecko:          ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
-      MobileSafari:   /Apple.*Mobile.*Safari/.test(ua)
-    }
-  })(),
-
-  BrowserFeatures: {
-    XPath: !!document.evaluate,
-    SelectorsAPI: !!document.querySelector,
-    ElementExtensions: (function() {
-      var constructor = window.Element || window.HTMLElement;
-      return !!(constructor && constructor.prototype);
-    })(),
-    SpecificElementExtensions: (function() {
-      if (typeof window.HTMLDivElement !== 'undefined')
-        return true;
-
-      var div = document.createElement('div');
-      var form = document.createElement('form');
-      var isSupported = false;
-
-      if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
-        isSupported = true;
-      }
-
-      div = form = null;
-
-      return isSupported;
-    })()
-  },
-
-  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
-  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
-
-  emptyFunction: function() { },
-  K: function(x) { return x }
-};
-
-if (Prototype.Browser.MobileSafari)
-  Prototype.BrowserFeatures.SpecificElementExtensions = false;
-
-
-var Abstract = { };
-
-
-var Try = {
-  these: function() {
-    var returnValue;
-
-    for (var i = 0, length = arguments.length; i < length; i++) {
-      var lambda = arguments[i];
-      try {
-        returnValue = lambda();
-        break;
-      } catch (e) { }
-    }
-
-    return returnValue;
-  }
-};
-
-/* Based on Alex Arnell's inheritance implementation. */
-
-var Class = (function() {
-  function subclass() {};
-  function create() {
-    var parent = null, properties = $A(arguments);
-    if (Object.isFunction(properties[0]))
-      parent = properties.shift();
-
-    function klass() {
-      this.initialize.apply(this, arguments);
-    }
-
-    Object.extend(klass, Class.Methods);
-    klass.superclass = parent;
-    klass.subclasses = [];
-
-    if (parent) {
-      subclass.prototype = parent.prototype;
-      klass.prototype = new subclass;
-      parent.subclasses.push(klass);
-    }
-
-    for (var i = 0; i < properties.length; i++)
-      klass.addMethods(properties[i]);
-
-    if (!klass.prototype.initialize)
-      klass.prototype.initialize = Prototype.emptyFunction;
-
-    klass.prototype.constructor = klass;
-    return klass;
-  }
-
-  function addMethods(source) {
-    var ancestor   = this.superclass && this.superclass.prototype;
-    var properties = Object.keys(source);
-
-    if (!Object.keys({ toString: true }).length) {
-      if (source.toString != Object.prototype.toString)
-        properties.push("toString");
-      if (source.valueOf != Object.prototype.valueOf)
-        properties.push("valueOf");
-    }
-
-    for (var i = 0, length = properties.length; i < length; i++) {
-      var property = properties[i], value = source[property];
-      if (ancestor && Object.isFunction(value) &&
-          value.argumentNames().first() == "$super") {
-        var method = value;
-        value = (function(m) {
-          return function() { return ancestor[m].apply(this, arguments); };
-        })(property).wrap(method);
-
-        value.valueOf = method.valueOf.bind(method);
-        value.toString = method.toString.bind(method);
-      }
-      this.prototype[property] = value;
-    }
-
-    return this;
-  }
-
-  return {
-    create: create,
-    Methods: {
-      addMethods: addMethods
-    }
-  };
-})();
-(function() {
-
-  var _toString = Object.prototype.toString;
-
-  function extend(destination, source) {
-    for (var property in source)
-      destination[property] = source[property];
-    return destination;
-  }
-
-  function inspect(object) {
-    try {
-      if (isUndefined(object)) return 'undefined';
-      if (object === null) return 'null';
-      return object.inspect ? object.inspect() : String(object);
-    } catch (e) {
-      if (e instanceof RangeError) return '...';
-      throw e;
-    }
-  }
-
-  function toJSON(object) {
-    var type = typeof object;
-    switch (type) {
-      case 'undefined':
-      case 'function':
-      case 'unknown': return;
-      case 'boolean': return object.toString();
-    }
-
-    if (object === null) return 'null';
-    if (object.toJSON) return object.toJSON();
-    if (isElement(object)) return;
-
-    var results = [];
-    for (var property in object) {
-      var value = toJSON(object[property]);
-      if (!isUndefined(value))
-        results.push(property.toJSON() + ': ' + value);
-    }
-
-    return '{' + results.join(', ') + '}';
-  }
-
-  function toQueryString(object) {
-    return $H(object).toQueryString();
-  }
-
-  function toHTML(object) {
-    return object && object.toHTML ? object.toHTML() : String.interpret(object);
-  }
-
-  function keys(object) {
-    var results = [];
-    for (var property in object)
-      results.push(property);
-    return results;
-  }
-
-  function values(object) {
-    var results = [];
-    for (var property in object)
-      results.push(object[property]);
-    return results;
-  }
-
-  function clone(object) {
-    return extend({ }, object);
-  }
-
-  function isElement(object) {
-    return !!(object && object.nodeType == 1);
-  }
-
-  function isArray(object) {
-    return _toString.call(object) == "[object Array]";
-  }
-
-
-  function isHash(object) {
-    return object instanceof Hash;
-  }
-
-  function isFunction(object) {
-    return typeof object === "function";
-  }
-
-  function isString(object) {
-    return _toString.call(object) == "[object String]";
-  }
-
-  function isNumber(object) {
-    return _toString.call(object) == "[object Number]";
-  }
-
-  function isUndefined(object) {
-    return typeof object === "undefined";
-  }
-
-  extend(Object, {
-    extend:        extend,
-    inspect:       inspect,
-    toJSON:        toJSON,
-    toQueryString: toQueryString,
-    toHTML:        toHTML,
-    keys:          keys,
-    values:        values,
-    clone:         clone,
-    isElement:     isElement,
-    isArray:       isArray,
-    isHash:        isHash,
-    isFunction:    isFunction,
-    isString:      isString,
-    isNumber:      isNumber,
-    isUndefined:   isUndefined
-  });
-})();
-Object.extend(Function.prototype, (function() {
-  var slice = Array.prototype.slice;
-
-  function update(array, args) {
-    var arrayLength = array.length, length = args.length;
-    while (length--) array[arrayLength + length] = args[length];
-    return array;
-  }
-
-  function merge(array, args) {
-    array = slice.call(array, 0);
-    return update(array, args);
-  }
-
-  function argumentNames() {
-    var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
-      .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
-      .replace(/\s+/g, '').split(',');
-    return names.length == 1 && !names[0] ? [] : names;
-  }
-
-  function bind(context) {
-    if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
-    var __method = this, args = slice.call(arguments, 1);
-    return function() {
-      var a = merge(args, arguments);
-      return __method.apply(context, a);
-    }
-  }
-
-  function bindAsEventListener(context) {
-    var __method = this, args = slice.call(arguments, 1);
-    return function(event) {
-      var a = update([event || window.event], args);
-      return __method.apply(context, a);
-    }
-  }
-
-  function curry() {
-    if (!arguments.length) return this;
-    var __method = this, args = slice.call(arguments, 0);
-    return function() {
-      var a = merge(args, arguments);
-      return __method.apply(this, a);
-    }
-  }
-
-  function delay(timeout) {
-    var __method = this, args = slice.call(arguments, 1);
-    timeout = timeout * 1000
-    return window.setTimeout(function() {
-      return __method.apply(__method, args);
-    }, timeout);
-  }
-
-  function defer() {
-    var args = update([0.01], arguments);
-    return this.delay.apply(this, args);
-  }
-
-  function wrap(wrapper) {
-    var __method = this;
-    return function() {
-      var a = update([__method.bind(this)], arguments);
-      return wrapper.apply(this, a);
-    }
-  }
-
-  function methodize() {
-    if (this._methodized) return this._methodized;
-    var __method = this;
-    return this._methodized = function() {
-      var a = update([this], arguments);
-      return __method.apply(null, a);
-    };
-  }
-
-  return {
-    argumentNames:       argumentNames,
-    bind:                bind,
-    bindAsEventListener: bindAsEventListener,
-    curry:               curry,
-    delay:               delay,
-    defer:               defer,
-    wrap:                wrap,
-    methodize:           methodize
-  }
-})());
-
-
-Date.prototype.toJSON = function() {
-  return '"' + this.getUTCFullYear() + '-' +
-    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
-    this.getUTCDate().toPaddedString(2) + 'T' +
-    this.getUTCHours().toPaddedString(2) + ':' +
-    this.getUTCMinutes().toPaddedString(2) + ':' +
-    this.getUTCSeconds().toPaddedString(2) + 'Z"';
-};
-
-
-RegExp.prototype.match = RegExp.prototype.test;
-
-RegExp.escape = function(str) {
-  return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-};
-var PeriodicalExecuter = Class.create({
-  initialize: function(callback, frequency) {
-    this.callback = callback;
-    this.frequency = frequency;
-    this.currentlyExecuting = false;
-
-    this.registerCallback();
-  },
-
-  registerCallback: function() {
-    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
-  },
-
-  execute: function() {
-    this.callback(this);
-  },
-
-  stop: function() {
-    if (!this.timer) return;
-    clearInterval(this.timer);
-    this.timer = null;
-  },
-
-  onTimerEvent: function() {
-    if (!this.currentlyExecuting) {
-      try {
-        this.currentlyExecuting = true;
-        this.execute();
-        this.currentlyExecuting = false;
-      } catch(e) {
-        this.currentlyExecuting = false;
-        throw e;
-      }
-    }
-  }
-});
-Object.extend(String, {
-  interpret: function(value) {
-    return value == null ? '' : String(value);
-  },
-  specialChar: {
-    '\b': '\\b',
-    '\t': '\\t',
-    '\n': '\\n',
-    '\f': '\\f',
-    '\r': '\\r',
-    '\\': '\\\\'
-  }
-});
-
-Object.extend(String.prototype, (function() {
-
-  function prepareReplacement(replacement) {
-    if (Object.isFunction(replacement)) return replacement;
-    var template = new Template(replacement);
-    return function(match) { return template.evaluate(match) };
-  }
-
-  function gsub(pattern, replacement) {
-    var result = '', source = this, match;
-    replacement = prepareReplacement(replacement);
-
-    if (Object.isString(pattern))
-      pattern = RegExp.escape(pattern);
-
-    if (!(pattern.length || pattern.source)) {
-      replacement = replacement('');
-      return replacement + source.split('').join(replacement) + replacement;
-    }
-
-    while (source.length > 0) {
-      if (match = source.match(pattern)) {
-        result += source.slice(0, match.index);
-        result += String.interpret(replacement(match));
-        source  = source.slice(match.index + match[0].length);
-      } else {
-        result += source, source = '';
-      }
-    }
-    return result;
-  }
-
-  function sub(pattern, replacement, count) {
-    replacement = prepareReplacement(replacement);
-    count = Object.isUndefined(count) ? 1 : count;
-
-    return this.gsub(pattern, function(match) {
-      if (--count < 0) return match[0];
-      return replacement(match);
-    });
-  }
-
-  function scan(pattern, iterator) {
-    this.gsub(pattern, iterator);
-    return String(this);
-  }
-
-  function truncate(length, truncation) {
-    length = length || 30;
-    truncation = Object.isUndefined(truncation) ? '...' : truncation;
-    return this.length > length ?
-      this.slice(0, length - truncation.length) + truncation : String(this);
-  }
-
-  function strip() {
-    return this.replace(/^\s+/, '').replace(/\s+$/, '');
-  }
-
-  function stripTags() {
-    return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
-  }
-
-  function stripScripts() {
-    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
-  }
-
-  function extractScripts() {
-    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
-    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
-    return (this.match(matchAll) || []).map(function(scriptTag) {
-      return (scriptTag.match(matchOne) || ['', ''])[1];
-    });
-  }
-
-  function evalScripts() {
-    return this.extractScripts().map(function(script) { return eval(script) });
-  }
-
-  function escapeHTML() {
-    return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
-  }
-
-  function unescapeHTML() {
-    return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');
-  }
-
-
-  function toQueryParams(separator) {
-    var match = this.strip().match(/([^?#]*)(#.*)?$/);
-    if (!match) return { };
-
-    return match[1].split(separator || '&').inject({ }, function(hash, pair) {
-      if ((pair = pair.split('='))[0]) {
-        var key = decodeURIComponent(pair.shift());
-        var value = pair.length > 1 ? pair.join('=') : pair[0];
-        if (value != undefined) value = decodeURIComponent(value);
-
-        if (key in hash) {
-          if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
-          hash[key].push(value);
-        }
-        else hash[key] = value;
-      }
-      return hash;
-    });
-  }
-
-  function toArray() {
-    return this.split('');
-  }
-
-  function succ() {
-    return this.slice(0, this.length - 1) +
-      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
-  }
-
-  function times(count) {
-    return count < 1 ? '' : new Array(count + 1).join(this);
-  }
-
-  function camelize() {
-    var parts = this.split('-'), len = parts.length;
-    if (len == 1) return parts[0];
-
-    var camelized = this.charAt(0) == '-'
-      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
-      : parts[0];
-
-    for (var i = 1; i < len; i++)
-      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
-
-    return camelized;
-  }
-
-  function capitalize() {
-    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
-  }
-
-  function underscore() {
-    return this.replace(/::/g, '/')
-               .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
-               .replace(/([a-z\d])([A-Z])/g, '$1_$2')
-               .replace(/-/g, '_')
-               .toLowerCase();
-  }
-
-  function dasherize() {
-    return this.replace(/_/g, '-');
-  }
-
-  function inspect(useDoubleQuotes) {
-    var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) {
-      if (character in String.specialChar) {
-        return String.specialChar[character];
-      }
-      return '\\u00' + character.charCodeAt().toPaddedString(2, 16);
-    });
-    if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
-    return "'" + escapedString.replace(/'/g, '\\\'') + "'";
-  }
-
-  function toJSON() {
-    return this.inspect(true);
-  }
-
-  function unfilterJSON(filter) {
-    return this.replace(filter || Prototype.JSONFilter, '$1');
-  }
-
-  function isJSON() {
-    var str = this;
-    if (str.blank()) return false;
-    str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
-    return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
-  }
-
-  function evalJSON(sanitize) {
-    var json = this.unfilterJSON();
-    try {
-      if (!sanitize || json.isJSON()) return eval('(' + json + ')');
-    } catch (e) { }
-    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
-  }
-
-  function include(pattern) {
-    return this.indexOf(pattern) > -1;
-  }
-
-  function startsWith(pattern) {
-    return this.indexOf(pattern) === 0;
-  }
-
-  function endsWith(pattern) {
-    var d = this.length - pattern.length;
-    return d >= 0 && this.lastIndexOf(pattern) === d;
-  }
-
-  function empty() {
-    return this == '';
-  }
-
-  function blank() {
-    return /^\s*$/.test(this);
-  }
-
-  function interpolate(object, pattern) {
-    return new Template(this, pattern).evaluate(object);
-  }
-
-  return {
-    gsub:           gsub,
-    sub:            sub,
-    scan:           scan,
-    truncate:       truncate,
-    strip:          String.prototype.trim ? String.prototype.trim : strip,
-    stripTags:      stripTags,
-    stripScripts:   stripScripts,
-    extractScripts: extractScripts,
-    evalScripts:    evalScripts,
-    escapeHTML:     escapeHTML,
-    unescapeHTML:   unescapeHTML,
-    toQueryParams:  toQueryParams,
-    parseQuery:     toQueryParams,
-    toArray:        toArray,
-    succ:           succ,
-    times:          times,
-    camelize:       camelize,
-    capitalize:     capitalize,
-    underscore:     underscore,
-    dasherize:      dasherize,
-    inspect:        inspect,
-    toJSON:         toJSON,
-    unfilterJSON:   unfilterJSON,
-    isJSON:         isJSON,
-    evalJSON:       evalJSON,
-    include:        include,
-    startsWith:     startsWith,
-    endsWith:       endsWith,
-    empty:          empty,
-    blank:          blank,
-    interpolate:    interpolate
-  };
-})());
-
-var Template = Class.create({
-  initialize: function(template, pattern) {
-    this.template = template.toString();
-    this.pattern = pattern || Template.Pattern;
-  },
-
-  evaluate: function(object) {
-    if (object && Object.isFunction(object.toTemplateReplacements))
-      object = object.toTemplateReplacements();
-
-    return this.template.gsub(this.pattern, function(match) {
-      if (object == null) return (match[1] + '');
-
-      var before = match[1] || '';
-      if (before == '\\') return match[2];
-
-      var ctx = object, expr = match[3];
-      var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
-      match = pattern.exec(expr);
-      if (match == null) return before;
-
-      while (match != null) {
-        var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1];
-        ctx = ctx[comp];
-        if (null == ctx || '' == match[3]) break;
-        expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
-        match = pattern.exec(expr);
-      }
-
-      return before + String.interpret(ctx);
-    });
-  }
-});
-Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
-
-var $break = { };
-
-var Enumerable = (function() {
-  function each(iterator, context) {
-    var index = 0;
-    try {
-      this._each(function(value) {
-        iterator.call(context, value, index++);
-      });
-    } catch (e) {
-      if (e != $break) throw e;
-    }
-    return this;
-  }
-
-  function eachSlice(number, iterator, context) {
-    var index = -number, slices = [], array = this.toArray();
-    if (number < 1) return array;
-    while ((index += number) < array.length)
-      slices.push(array.slice(index, index+number));
-    return slices.collect(iterator, context);
-  }
-
-  function all(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result = true;
-    this.each(function(value, index) {
-      result = result && !!iterator.call(context, value, index);
-      if (!result) throw $break;
-    });
-    return result;
-  }
-
-  function any(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result = false;
-    this.each(function(value, index) {
-      if (result = !!iterator.call(context, value, index))
-        throw $break;
-    });
-    return result;
-  }
-
-  function collect(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var results = [];
-    this.each(function(value, index) {
-      results.push(iterator.call(context, value, index));
-    });
-    return results;
-  }
-
-  function detect(iterator, context) {
-    var result;
-    this.each(function(value, index) {
-      if (iterator.call(context, value, index)) {
-        result = value;
-        throw $break;
-      }
-    });
-    return result;
-  }
-
-  function findAll(iterator, context) {
-    var results = [];
-    this.each(function(value, index) {
-      if (iterator.call(context, value, index))
-        results.push(value);
-    });
-    return results;
-  }
-
-  function grep(filter, iterator, context) {
-    iterator = iterator || Prototype.K;
-    var results = [];
-
-    if (Object.isString(filter))
-      filter = new RegExp(RegExp.escape(filter));
-
-    this.each(function(value, index) {
-      if (filter.match(value))
-        results.push(iterator.call(context, value, index));
-    });
-    return results;
-  }
-
-  function include(object) {
-    if (Object.isFunction(this.indexOf))
-      if (this.indexOf(object) != -1) return true;
-
-    var found = false;
-    this.each(function(value) {
-      if (value == object) {
-        found = true;
-        throw $break;
-      }
-    });
-    return found;
-  }
-
-  function inGroupsOf(number, fillWith) {
-    fillWith = Object.isUndefined(fillWith) ? null : fillWith;
-    return this.eachSlice(number, function(slice) {
-      while(slice.length < number) slice.push(fillWith);
-      return slice;
-    });
-  }
-
-  function inject(memo, iterator, context) {
-    this.each(function(value, index) {
-      memo = iterator.call(context, memo, value, index);
-    });
-    return memo;
-  }
-
-  function invoke(method) {
-    var args = $A(arguments).slice(1);
-    return this.map(function(value) {
-      return value[method].apply(value, args);
-    });
-  }
-
-  function max(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result;
-    this.each(function(value, index) {
-      value = iterator.call(context, value, index);
-      if (result == null || value >= result)
-        result = value;
-    });
-    return result;
-  }
-
-  function min(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result;
-    this.each(function(value, index) {
-      value = iterator.call(context, value, index);
-      if (result == null || value < result)
-        result = value;
-    });
-    return result;
-  }
-
-  function partition(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var trues = [], falses = [];
-    this.each(function(value, index) {
-      (iterator.call(context, value, index) ?
-        trues : falses).push(value);
-    });
-    return [trues, falses];
-  }
-
-  function pluck(property) {
-    var results = [];
-    this.each(function(value) {
-      results.push(value[property]);
-    });
-    return results;
-  }
-
-  function reject(iterator, context) {
-    var results = [];
-    this.each(function(value, index) {
-      if (!iterator.call(context, value, index))
-        results.push(value);
-    });
-    return results;
-  }
-
-  function sortBy(iterator, context) {
-    return this.map(function(value, index) {
-      return {
-        value: value,
-        criteria: iterator.call(context, value, index)
-      };
-    }).sort(function(left, right) {
-      var a = left.criteria, b = right.criteria;
-      return a < b ? -1 : a > b ? 1 : 0;
-    }).pluck('value');
-  }
-
-  function toArray() {
-    return this.map();
-  }
-
-  function zip() {
-    var iterator = Prototype.K, args = $A(arguments);
-    if (Object.isFunction(args.last()))
-      iterator = args.pop();
-
-    var collections = [this].concat(args).map($A);
-    return this.map(function(value, index) {
-      return iterator(collections.pluck(index));
-    });
-  }
-
-  function size() {
-    return this.toArray().length;
-  }
-
-  function inspect() {
-    return '#<Enumerable:' + this.toArray().inspect() + '>';
-  }
-
-
-
-
-
-
-
-
-
-  return {
-    each:       each,
-    eachSlice:  eachSlice,
-    all:        all,
-    every:      all,
-    any:        any,
-    some:       any,
-    collect:    collect,
-    map:        collect,
-    detect:     detect,
-    findAll:    findAll,
-    select:     findAll,
-    filter:     findAll,
-    grep:       grep,
-    include:    include,
-    member:     include,
-    inGroupsOf: inGroupsOf,
-    inject:     inject,
-    invoke:     invoke,
-    max:        max,
-    min:        min,
-    partition:  partition,
-    pluck:      pluck,
-    reject:     reject,
-    sortBy:     sortBy,
-    toArray:    toArray,
-    entries:    toArray,
-    zip:        zip,
-    size:       size,
-    inspect:    inspect,
-    find:       detect
-  };
-})();
-function $A(iterable) {
-  if (!iterable) return [];
-  if ('toArray' in Object(iterable)) return iterable.toArray();
-  var length = iterable.length || 0, results = new Array(length);
-  while (length--) results[length] = iterable[length];
-  return results;
-}
-
-function $w(string) {
-  if (!Object.isString(string)) return [];
-  string = string.strip();
-  return string ? string.split(/\s+/) : [];
-}
-
-Array.from = $A;
-
-
-(function() {
-  var arrayProto = Array.prototype,
-      slice = arrayProto.slice,
-      _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available
-
-  function each(iterator) {
-    for (var i = 0, length = this.length; i < length; i++)
-      iterator(this[i]);
-  }
-  if (!_each) _each = each;
-
-  function clear() {
-    this.length = 0;
-    return this;
-  }
-
-  function first() {
-    return this[0];
-  }
-
-  function last() {
-    return this[this.length - 1];
-  }
-
-  function compact() {
-    return this.select(function(value) {
-      return value != null;
-    });
-  }
-
-  function flatten() {
-    return this.inject([], function(array, value) {
-      if (Object.isArray(value))
-        return array.concat(value.flatten());
-      array.push(value);
-      return array;
-    });
-  }
-
-  function without() {
-    var values = slice.call(arguments, 0);
-    return this.select(function(value) {
-      return !values.include(value);
-    });
-  }
-
-  function reverse(inline) {
-    return (inline !== false ? this : this.toArray())._reverse();
-  }
-
-  function uniq(sorted) {
-    return this.inject([], function(array, value, index) {
-      if (0 == index || (sorted ? array.last() != value : !array.include(value)))
-        array.push(value);
-      return array;
-    });
-  }
-
-  function intersect(array) {
-    return this.uniq().findAll(function(item) {
-      return array.detect(function(value) { return item === value });
-    });
-  }
-
-
-  function clone() {
-    return slice.call(this, 0);
-  }
-
-  function size() {
-    return this.length;
-  }
-
-  function inspect() {
-    return '[' + this.map(Object.inspect).join(', ') + ']';
-  }
-
-  function toJSON() {
-    var results = [];
-    this.each(function(object) {
-      var value = Object.toJSON(object);
-      if (!Object.isUndefined(value)) results.push(value);
-    });
-    return '[' + results.join(', ') + ']';
-  }
-
-  function indexOf(item, i) {
-    i || (i = 0);
-    var length = this.length;
-    if (i < 0) i = length + i;
-    for (; i < length; i++)
-      if (this[i] === item) return i;
-    return -1;
-  }
-
-  function lastIndexOf(item, i) {
-    i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
-    var n = this.slice(0, i).reverse().indexOf(item);
-    return (n < 0) ? n : i - n - 1;
-  }
-
-  function concat() {
-    var array = slice.call(this, 0), item;
-    for (var i = 0, length = arguments.length; i < length; i++) {
-      item = arguments[i];
-      if (Object.isArray(item) && !('callee' in item)) {
-        for (var j = 0, arrayLength = item.length; j < arrayLength; j++)
-          array.push(item[j]);
-      } else {
-        array.push(item);
-      }
-    }
-    return array;
-  }
-
-  Object.extend(arrayProto, Enumerable);
-
-  if (!arrayProto._reverse)
-    arrayProto._reverse = arrayProto.reverse;
-
-  Object.extend(arrayProto, {
-    _each:     _each,
-    clear:     clear,
-    first:     first,
-    last:      last,
-    compact:   compact,
-    flatten:   flatten,
-    without:   without,
-    reverse:   reverse,
-    uniq:      uniq,
-    intersect: intersect,
-    clone:     clone,
-    toArray:   clone,
-    size:      size,
-    inspect:   inspect,
-    toJSON:    toJSON
-  });
-
-  var CONCAT_ARGUMENTS_BUGGY = (function() {
-    return [].concat(arguments)[0][0] !== 1;
-  })(1,2)
-
-  if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;
-
-  if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;
-  if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;
-})();
-function $H(object) {
-  return new Hash(object);
-};
-
-var Hash = Class.create(Enumerable, (function() {
-  function initialize(object) {
-    this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
-  }
-
-  function _each(iterator) {
-    for (var key in this._object) {
-      var value = this._object[key], pair = [key, value];
-      pair.key = key;
-      pair.value = value;
-      iterator(pair);
-    }
-  }
-
-  function set(key, value) {
-    return this._object[key] = value;
-  }
-
-  function get(key) {
-    if (this._object[key] !== Object.prototype[key])
-      return this._object[key];
-  }
-
-  function unset(key) {
-    var value = this._object[key];
-    delete this._object[key];
-    return value;
-  }
-
-  function toObject() {
-    return Object.clone(this._object);
-  }
-
-  function keys() {
-    return this.pluck('key');
-  }
-
-  function values() {
-    return this.pluck('value');
-  }
-
-  function index(value) {
-    var match = this.detect(function(pair) {
-      return pair.value === value;
-    });
-    return match && match.key;
-  }
-
-  function merge(object) {
-    return this.clone().update(object);
-  }
-
-  function update(object) {
-    return new Hash(object).inject(this, function(result, pair) {
-      result.set(pair.key, pair.value);
-      return result;
-    });
-  }
-
-  function toQueryPair(key, value) {
-    if (Object.isUndefined(value)) return key;
-    return key + '=' + encodeURIComponent(String.interpret(value));
-  }
-
-  function toQueryString() {
-    return this.inject([], function(results, pair) {
-      var key = encodeURIComponent(pair.key), values = pair.value;
-
-      if (values && typeof values == 'object') {
-        if (Object.isArray(values))
-          return results.concat(values.map(toQueryPair.curry(key)));
-      } else results.push(toQueryPair(key, values));
-      return results;
-    }).join('&');
-  }
-
-  function inspect() {
-    return '#<Hash:{' + this.map(function(pair) {
-      return pair.map(Object.inspect).join(': ');
-    }).join(', ') + '}>';
-  }
-
-  function toJSON() {
-    return Object.toJSON(this.toObject());
-  }
-
-  function clone() {
-    return new Hash(this);
-  }
-
-  return {
-    initialize:             initialize,
-    _each:                  _each,
-    set:                    set,
-    get:                    get,
-    unset:                  unset,
-    toObject:               toObject,
-    toTemplateReplacements: toObject,
-    keys:                   keys,
-    values:                 values,
-    index:                  index,
-    merge:                  merge,
-    update:                 update,
-    toQueryString:          toQueryString,
-    inspect:                inspect,
-    toJSON:                 toJSON,
-    clone:                  clone
-  };
-})());
-
-Hash.from = $H;
-Object.extend(Number.prototype, (function() {
-  function toColorPart() {
-    return this.toPaddedString(2, 16);
-  }
-
-  function succ() {
-    return this + 1;
-  }
-
-  function times(iterator, context) {
-    $R(0, this, true).each(iterator, context);
-    return this;
-  }
-
-  function toPaddedString(length, radix) {
-    var string = this.toString(radix || 10);
-    return '0'.times(length - string.length) + string;
-  }
-
-  function toJSON() {
-    return isFinite(this) ? this.toString() : 'null';
-  }
-
-  function abs() {
-    return Math.abs(this);
-  }
-
-  function round() {
-    return Math.round(this);
-  }
-
-  function ceil() {
-    return Math.ceil(this);
-  }
-
-  function floor() {
-    return Math.floor(this);
-  }
-
-  return {
-    toColorPart:    toColorPart,
-    succ:           succ,
-    times:          times,
-    toPaddedString: toPaddedString,
-    toJSON:         toJSON,
-    abs:            abs,
-    round:          round,
-    ceil:           ceil,
-    floor:          floor
-  };
-})());
-
-function $R(start, end, exclusive) {
-  return new ObjectRange(start, end, exclusive);
-}
-
-var ObjectRange = Class.create(Enumerable, (function() {
-  function initialize(start, end, exclusive) {
-    this.start = start;
-    this.end = end;
-    this.exclusive = exclusive;
-  }
-
-  function _each(iterator) {
-    var value = this.start;
-    while (this.include(value)) {
-      iterator(value);
-      value = value.succ();
-    }
-  }
-
-  function include(value) {
-    if (value < this.start)
-      return false;
-    if (this.exclusive)
-      return value < this.end;
-    return value <= this.end;
-  }
-
-  return {
-    initialize: initialize,
-    _each:      _each,
-    include:    include
-  };
-})());
-
-
-
-var Ajax = {
-  getTransport: function() {
-    return Try.these(
-      function() {return new XMLHttpRequest()},
-      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
-      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
-    ) || false;
-  },
-
-  activeRequestCount: 0
-};
-
-Ajax.Responders = {
-  responders: [],
-
-  _each: function(iterator) {
-    this.responders._each(iterator);
-  },
-
-  register: function(responder) {
-    if (!this.include(responder))
-      this.responders.push(responder);
-  },
-
-  unregister: function(responder) {
-    this.responders = this.responders.without(responder);
-  },
-
-  dispatch: function(callback, request, transport, json) {
-    this.each(function(responder) {
-      if (Object.isFunction(responder[callback])) {
-        try {
-          responder[callback].apply(responder, [request, transport, json]);
-        } catch (e) { }
-      }
-    });
-  }
-};
-
-Object.extend(Ajax.Responders, Enumerable);
-
-Ajax.Responders.register({
-  onCreate:   function() { Ajax.activeRequestCount++ },
-  onComplete: function() { Ajax.activeRequestCount-- }
-});
-Ajax.Base = Class.create({
-  initialize: function(options) {
-    this.options = {
-      method:       'post',
-      asynchronous: true,
-      contentType:  'application/x-www-form-urlencoded',
-      encoding:     'UTF-8',
-      parameters:   '',
-      evalJSON:     true,
-      evalJS:       true
-    };
-    Object.extend(this.options, options || { });
-
-    this.options.method = this.options.method.toLowerCase();
-
-    if (Object.isString(this.options.parameters))
-      this.options.parameters = this.options.parameters.toQueryParams();
-    else if (Object.isHash(this.options.parameters))
-      this.options.parameters = this.options.parameters.toObject();
-  }
-});
-Ajax.Request = Class.create(Ajax.Base, {
-  _complete: false,
-
-  initialize: function($super, url, options) {
-    $super(options);
-    this.transport = Ajax.getTransport();
-    this.request(url);
-  },
-
-  request: function(url) {
-    this.url = url;
-    this.method = this.options.method;
-    var params = Object.clone(this.options.parameters);
-
-    if (!['get', 'post'].include(this.method)) {
-      params['_method'] = this.method;
-      this.method = 'post';
-    }
-
-    this.parameters = params;
-
-    if (params = Object.toQueryString(params)) {
-      if (this.method == 'get')
-        this.url += (this.url.include('?') ? '&' : '?') + params;
-      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
-        params += '&_=';
-    }
-
-    try {
-      var response = new Ajax.Response(this);
-      if (this.options.onCreate) this.options.onCreate(response);
-      Ajax.Responders.dispatch('onCreate', this, response);
-
-      this.transport.open(this.method.toUpperCase(), this.url,
-        this.options.asynchronous);
-
-      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
-
-      this.transport.onreadystatechange = this.onStateChange.bind(this);
-      this.setRequestHeaders();
-
-      this.body = this.method == 'post' ? (this.options.postBody || params) : null;
-      this.transport.send(this.body);
-
-      /* Force Firefox to handle ready state 4 for synchronous requests */
-      if (!this.options.asynchronous && this.transport.overrideMimeType)
-        this.onStateChange();
-
-    }
-    catch (e) {
-      this.dispatchException(e);
-    }
-  },
-
-  onStateChange: function() {
-    var readyState = this.transport.readyState;
-    if (readyState > 1 && !((readyState == 4) && this._complete))
-      this.respondToReadyState(this.transport.readyState);
-  },
-
-  setRequestHeaders: function() {
-    var headers = {
-      'X-Requested-With': 'XMLHttpRequest',
-      'X-Prototype-Version': Prototype.Version,
-      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
-    };
-
-    if (this.method == 'post') {
-      headers['Content-type'] = this.options.contentType +
-        (this.options.encoding ? '; charset=' + this.options.encoding : '');
-
-      /* Force "Connection: close" for older Mozilla browsers to work
-       * around a bug where XMLHttpRequest sends an incorrect
-       * Content-length header. See Mozilla Bugzilla #246651.
-       */
-      if (this.transport.overrideMimeType &&
-          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
-            headers['Connection'] = 'close';
-    }
-
-    if (typeof this.options.requestHeaders == 'object') {
-      var extras = this.options.requestHeaders;
-
-      if (Object.isFunction(extras.push))
-        for (var i = 0, length = extras.length; i < length; i += 2)
-          headers[extras[i]] = extras[i+1];
-      else
-        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
-    }
-
-    for (var name in headers)
-      this.transport.setRequestHeader(name, headers[name]);
-  },
-
-  success: function() {
-    var status = this.getStatus();
-    return !status || (status >= 200 && status < 300);
-  },
-
-  getStatus: function() {
-    try {
-      return this.transport.status || 0;
-    } catch (e) { return 0 }
-  },
-
-  respondToReadyState: function(readyState) {
-    var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
-
-    if (state == 'Complete') {
-      try {
-        this._complete = true;
-        (this.options['on' + response.status]
-         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
-         || Prototype.emptyFunction)(response, response.headerJSON);
-      } catch (e) {
-        this.dispatchException(e);
-      }
-
-      var contentType = response.getHeader('Content-type');
-      if (this.options.evalJS == 'force'
-          || (this.options.evalJS && this.isSameOrigin() && contentType
-          && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
-        this.evalResponse();
-    }
-
-    try {
-      (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
-      Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
-    } catch (e) {
-      this.dispatchException(e);
-    }
-
-    if (state == 'Complete') {
-      this.transport.onreadystatechange = Prototype.emptyFunction;
-    }
-  },
-
-  isSameOrigin: function() {
-    var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
-    return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
-      protocol: location.protocol,
-      domain: document.domain,
-      port: location.port ? ':' + location.port : ''
-    }));
-  },
-
-  getHeader: function(name) {
-    try {
-      return this.transport.getResponseHeader(name) || null;
-    } catch (e) { return null; }
-  },
-
-  evalResponse: function() {
-    try {
-      return eval((this.transport.responseText || '').unfilterJSON());
-    } catch (e) {
-      this.dispatchException(e);
-    }
-  },
-
-  dispatchException: function(exception) {
-    (this.options.onException || Prototype.emptyFunction)(this, exception);
-    Ajax.Responders.dispatch('onException', this, exception);
-  }
-});
-
-Ajax.Request.Events =
-  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-
-
-
-
-
-
-
-Ajax.Response = Class.create({
-  initialize: function(request){
-    this.request = request;
-    var transport  = this.transport  = request.transport,
-        readyState = this.readyState = transport.readyState;
-
-    if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
-      this.status       = this.getStatus();
-      this.statusText   = this.getStatusText();
-      this.responseText = String.interpret(transport.responseText);
-      this.headerJSON   = this._getHeaderJSON();
-    }
-
-    if(readyState == 4) {
-      var xml = transport.responseXML;
-      this.responseXML  = Object.isUndefined(xml) ? null : xml;
-      this.responseJSON = this._getResponseJSON();
-    }
-  },
-
-  status:      0,
-
-  statusText: '',
-
-  getStatus: Ajax.Request.prototype.getStatus,
-
-  getStatusText: function() {
-    try {
-      return this.transport.statusText || '';
-    } catch (e) { return '' }
-  },
-
-  getHeader: Ajax.Request.prototype.getHeader,
-
-  getAllHeaders: function() {
-    try {
-      return this.getAllResponseHeaders();
-    } catch (e) { return null }
-  },
-
-  getResponseHeader: function(name) {
-    return this.transport.getResponseHeader(name);
-  },
-
-  getAllResponseHeaders: function() {
-    return this.transport.getAllResponseHeaders();
-  },
-
-  _getHeaderJSON: function() {
-    var json = this.getHeader('X-JSON');
-    if (!json) return null;
-    json = decodeURIComponent(escape(json));
-    try {
-      return json.evalJSON(this.request.options.sanitizeJSON ||
-        !this.request.isSameOrigin());
-    } catch (e) {
-      this.request.dispatchException(e);
-    }
-  },
-
-  _getResponseJSON: function() {
-    var options = this.request.options;
-    if (!options.evalJSON || (options.evalJSON != 'force' &&
-      !(this.getHeader('Content-type') || '').include('application/json')) ||
-        this.responseText.blank())
-          return null;
-    try {
-      return this.responseText.evalJSON(options.sanitizeJSON ||
-        !this.request.isSameOrigin());
-    } catch (e) {
-      this.request.dispatchException(e);
-    }
-  }
-});
-
-Ajax.Updater = Class.create(Ajax.Request, {
-  initialize: function($super, container, url, options) {
-    this.container = {
-      success: (container.success || container),
-      failure: (container.failure || (container.success ? null : container))
-    };
-
-    options = Object.clone(options);
-    var onComplete = options.onComplete;
-    options.onComplete = (function(response, json) {
-      this.updateContent(response.responseText);
-      if (Object.isFunction(onComplete)) onComplete(response, json);
-    }).bind(this);
-
-    $super(url, options);
-  },
-
-  updateContent: function(responseText) {
-    var receiver = this.container[this.success() ? 'success' : 'failure'],
-        options = this.options;
-
-    if (!options.evalScripts) responseText = responseText.stripScripts();
-
-    if (receiver = $(receiver)) {
-      if (options.insertion) {
-        if (Object.isString(options.insertion)) {
-          var insertion = { }; insertion[options.insertion] = responseText;
-          receiver.insert(insertion);
-        }
-        else options.insertion(receiver, responseText);
-      }
-      else receiver.update(responseText);
-    }
-  }
-});
-
-Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
-  initialize: function($super, container, url, options) {
-    $super(options);
-    this.onComplete = this.options.onComplete;
-
-    this.frequency = (this.options.frequency || 2);
-    this.decay = (this.options.decay || 1);
-
-    this.updater = { };
-    this.container = container;
-    this.url = url;
-
-    this.start();
-  },
-
-  start: function() {
-    this.options.onComplete = this.updateComplete.bind(this);
-    this.onTimerEvent();
-  },
-
-  stop: function() {
-    this.updater.options.onComplete = undefined;
-    clearTimeout(this.timer);
-    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
-  },
-
-  updateComplete: function(response) {
-    if (this.options.decay) {
-      this.decay = (response.responseText == this.lastText ?
-        this.decay * this.options.decay : 1);
-
-      this.lastText = response.responseText;
-    }
-    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
-  },
-
-  onTimerEvent: function() {
-    this.updater = new Ajax.Updater(this.container, this.url, this.options);
-  }
-});
-
-
-
-function $(element) {
-  if (arguments.length > 1) {
-    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
-      elements.push($(arguments[i]));
-    return elements;
-  }
-  if (Object.isString(element))
-    element = document.getElementById(element);
-  return Element.extend(element);
-}
-
-if (Prototype.BrowserFeatures.XPath) {
-  document._getElementsByXPath = function(expression, parentElement) {
-    var results = [];
-    var query = document.evaluate(expression, $(parentElement) || document,
-      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
-    for (var i = 0, length = query.snapshotLength; i < length; i++)
-      results.push(Element.extend(query.snapshotItem(i)));
-    return results;
-  };
-}
-
-/*--------------------------------------------------------------------------*/
-
-if (!window.Node) var Node = { };
-
-if (!Node.ELEMENT_NODE) {
-  Object.extend(Node, {
-    ELEMENT_NODE: 1,
-    ATTRIBUTE_NODE: 2,
-    TEXT_NODE: 3,
-    CDATA_SECTION_NODE: 4,
-    ENTITY_REFERENCE_NODE: 5,
-    ENTITY_NODE: 6,
-    PROCESSING_INSTRUCTION_NODE: 7,
-    COMMENT_NODE: 8,
-    DOCUMENT_NODE: 9,
-    DOCUMENT_TYPE_NODE: 10,
-    DOCUMENT_FRAGMENT_NODE: 11,
-    NOTATION_NODE: 12
-  });
-}
-
-
-(function(global) {
-
-  var SETATTRIBUTE_IGNORES_NAME = (function(){
-    var elForm = document.createElement("form");
-    var elInput = document.createElement("input");
-    var root = document.documentElement;
-    elInput.setAttribute("name", "test");
-    elForm.appendChild(elInput);
-    root.appendChild(elForm);
-    var isBuggy = elForm.elements
-      ? (typeof elForm.elements.test == "undefined")
-      : null;
-    root.removeChild(elForm);
-    elForm = elInput = null;
-    return isBuggy;
-  })();
-
-  var element = global.Element;
-  global.Element = function(tagName, attributes) {
-    attributes = attributes || { };
-    tagName = tagName.toLowerCase();
-    var cache = Element.cache;
-    if (SETATTRIBUTE_IGNORES_NAME && attributes.name) {
-      tagName = '<' + tagName + ' name="' + attributes.name + '">';
-      delete attributes.name;
-      return Element.writeAttribute(document.createElement(tagName), attributes);
-    }
-    if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
-    return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
-  };
-  Object.extend(global.Element, element || { });
-  if (element) global.Element.prototype = element.prototype;
-})(this);
-
-Element.cache = { };
-Element.idCounter = 1;
-
-Element.Methods = {
-  visible: function(element) {
-    return $(element).style.display != 'none';
-  },
-
-  toggle: function(element) {
-    element = $(element);
-    Element[Element.visible(element) ? 'hide' : 'show'](element);
-    return element;
-  },
-
-
-  hide: function(element) {
-    element = $(element);
-    element.style.display = 'none';
-    return element;
-  },
-
-  show: function(element) {
-    element = $(element);
-    element.style.display = '';
-    return element;
-  },
-
-  remove: function(element) {
-    element = $(element);
-    element.parentNode.removeChild(element);
-    return element;
-  },
-
-  update: (function(){
-
-    var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
-      var el = document.createElement("select"),
-          isBuggy = true;
-      el.innerHTML = "<option value=\"test\">test</option>";
-      if (el.options && el.options[0]) {
-        isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION";
-      }
-      el = null;
-      return isBuggy;
-    })();
-
-    var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){
-      try {
-        var el = document.createElement("table");
-        if (el && el.tBodies) {
-          el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>";
-          var isBuggy = typeof el.tBodies[0] == "undefined";
-          el = null;
-          return isBuggy;
-        }
-      } catch (e) {
-        return true;
-      }
-    })();
-
-    var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {
-      var s = document.createElement("script"),
-          isBuggy = false;
-      try {
-        s.appendChild(document.createTextNode(""));
-        isBuggy = !s.firstChild ||
-          s.firstChild && s.firstChild.nodeType !== 3;
-      } catch (e) {
-        isBuggy = true;
-      }
-      s = null;
-      return isBuggy;
-    })();
-
-    function update(element, content) {
-      element = $(element);
-
-      if (content && content.toElement)
-        content = content.toElement();
-
-      if (Object.isElement(content))
-        return element.update().insert(content);
-
-      content = Object.toHTML(content);
-
-      var tagName = element.tagName.toUpperCase();
-
-      if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {
-        element.text = content;
-        return element;
-      }
-
-      if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) {
-        if (tagName in Element._insertionTranslations.tags) {
-          while (element.firstChild) {
-            element.removeChild(element.firstChild);
-          }
-          Element._getContentFromAnonymousElement(tagName, content.stripScripts())
-            .each(function(node) {
-              element.appendChild(node)
-            });
-        }
-        else {
-          element.innerHTML = content.stripScripts();
-        }
-      }
-      else {
-        element.innerHTML = content.stripScripts();
-      }
-
-      content.evalScripts.bind(content).defer();
-      return element;
-    }
-
-    return update;
-  })(),
-
-  replace: function(element, content) {
-    element = $(element);
-    if (content && content.toElement) content = content.toElement();
-    else if (!Object.isElement(content)) {
-      content = Object.toHTML(content);
-      var range = element.ownerDocument.createRange();
-      range.selectNode(element);
-      content.evalScripts.bind(content).defer();
-      content = range.createContextualFragment(content.stripScripts());
-    }
-    element.parentNode.replaceChild(content, element);
-    return element;
-  },
-
-  insert: function(element, insertions) {
-    element = $(element);
-
-    if (Object.isString(insertions) || Object.isNumber(insertions) ||
-        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
-          insertions = {bottom:insertions};
-
-    var content, insert, tagName, childNodes;
-
-    for (var position in insertions) {
-      content  = insertions[position];
-      position = position.toLowerCase();
-      insert = Element._insertionTranslations[position];
-
-      if (content && content.toElement) content = content.toElement();
-      if (Object.isElement(content)) {
-        insert(element, content);
-        continue;
-      }
-
-      content = Object.toHTML(content);
-
-      tagName = ((position == 'before' || position == 'after')
-        ? element.parentNode : element).tagName.toUpperCase();
-
-      childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
-
-      if (position == 'top' || position == 'after') childNodes.reverse();
-      childNodes.each(insert.curry(element));
-
-      content.evalScripts.bind(content).defer();
-    }
-
-    return element;
-  },
-
-  wrap: function(element, wrapper, attributes) {
-    element = $(element);
-    if (Object.isElement(wrapper))
-      $(wrapper).writeAttribute(attributes || { });
-    else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
-    else wrapper = new Element('div', wrapper);
-    if (element.parentNode)
-      element.parentNode.replaceChild(wrapper, element);
-    wrapper.appendChild(element);
-    return wrapper;
-  },
-
-  inspect: function(element) {
-    element = $(element);
-    var result = '<' + element.tagName.toLowerCase();
-    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
-      var property = pair.first(), attribute = pair.last();
-      var value = (element[property] || '').toString();
-      if (value) result += ' ' + attribute + '=' + value.inspect(true);
-    });
-    return result + '>';
-  },
-
-  recursivelyCollect: function(element, property) {
-    element = $(element);
-    var elements = [];
-    while (element = element[property])
-      if (element.nodeType == 1)
-        elements.push(Element.extend(element));
-    return elements;
-  },
-
-  ancestors: function(element) {
-    return Element.recursivelyCollect(element, 'parentNode');
-  },
-
-  descendants: function(element) {
-    return Element.select(element, "*");
-  },
-
-  firstDescendant: function(element) {
-    element = $(element).firstChild;
-    while (element && element.nodeType != 1) element = element.nextSibling;
-    return $(element);
-  },
-
-  immediateDescendants: function(element) {
-    if (!(element = $(element).firstChild)) return [];
-    while (element && element.nodeType != 1) element = element.nextSibling;
-    if (element) return [element].concat($(element).nextSiblings());
-    return [];
-  },
-
-  previousSiblings: function(element) {
-    return Element.recursivelyCollect(element, 'previousSibling');
-  },
-
-  nextSiblings: function(element) {
-    return Element.recursivelyCollect(element, 'nextSibling');
-  },
-
-  siblings: function(element) {
-    element = $(element);
-    return Element.previousSiblings(element).reverse()
-      .concat(Element.nextSiblings(element));
-  },
-
-  match: function(element, selector) {
-    if (Object.isString(selector))
-      selector = new Selector(selector);
-    return selector.match($(element));
-  },
-
-  up: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return $(element.parentNode);
-    var ancestors = Element.ancestors(element);
-    return Object.isNumber(expression) ? ancestors[expression] :
-      Selector.findElement(ancestors, expression, index);
-  },
-
-  down: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return Element.firstDescendant(element);
-    return Object.isNumber(expression) ? Element.descendants(element)[expression] :
-      Element.select(element, expression)[index || 0];
-  },
-
-  previous: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
-    var previousSiblings = Element.previousSiblings(element);
-    return Object.isNumber(expression) ? previousSiblings[expression] :
-      Selector.findElement(previousSiblings, expression, index);
-  },
-
-  next: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
-    var nextSiblings = Element.nextSiblings(element);
-    return Object.isNumber(expression) ? nextSiblings[expression] :
-      Selector.findElement(nextSiblings, expression, index);
-  },
-
-
-  select: function(element) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return Selector.findChildElements(element, args);
-  },
-
-  adjacent: function(element) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return Selector.findChildElements(element.parentNode, args).without(element);
-  },
-
-  identify: function(element) {
-    element = $(element);
-    var id = Element.readAttribute(element, 'id');
-    if (id) return id;
-    do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));
-    Element.writeAttribute(element, 'id', id);
-    return id;
-  },
-
-  readAttribute: function(element, name) {
-    element = $(element);
-    if (Prototype.Browser.IE) {
-      var t = Element._attributeTranslations.read;
-      if (t.values[name]) return t.values[name](element, name);
-      if (t.names[name]) name = t.names[name];
-      if (name.include(':')) {
-        return (!element.attributes || !element.attributes[name]) ? null :
-         element.attributes[name].value;
-      }
-    }
-    return element.getAttribute(name);
-  },
-
-  writeAttribute: function(element, name, value) {
-    element = $(element);
-    var attributes = { }, t = Element._attributeTranslations.write;
-
-    if (typeof name == 'object') attributes = name;
-    else attributes[name] = Object.isUndefined(value) ? true : value;
-
-    for (var attr in attributes) {
-      name = t.names[attr] || attr;
-      value = attributes[attr];
-      if (t.values[attr]) name = t.values[attr](element, value);
-      if (value === false || value === null)
-        element.removeAttribute(name);
-      else if (value === true)
-        element.setAttribute(name, name);
-      else element.setAttribute(name, value);
-    }
-    return element;
-  },
-
-  getHeight: function(element) {
-    return Element.getDimensions(element).height;
-  },
-
-  getWidth: function(element) {
-    return Element.getDimensions(element).width;
-  },
-
-  classNames: function(element) {
-    return new Element.ClassNames(element);
-  },
-
-  hasClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    var elementClassName = element.className;
-    return (elementClassName.length > 0 && (elementClassName == className ||
-      new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
-  },
-
-  addClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    if (!Element.hasClassName(element, className))
-      element.className += (element.className ? ' ' : '') + className;
-    return element;
-  },
-
-  removeClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    element.className = element.className.replace(
-      new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
-    return element;
-  },
-
-  toggleClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    return Element[Element.hasClassName(element, className) ?
-      'removeClassName' : 'addClassName'](element, className);
-  },
-
-  cleanWhitespace: function(element) {
-    element = $(element);
-    var node = element.firstChild;
-    while (node) {
-      var nextNode = node.nextSibling;
-      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
-        element.removeChild(node);
-      node = nextNode;
-    }
-    return element;
-  },
-
-  empty: function(element) {
-    return $(element).innerHTML.blank();
-  },
-
-  descendantOf: function(element, ancestor) {
-    element = $(element), ancestor = $(ancestor);
-
-    if (element.compareDocumentPosition)
-      return (element.compareDocumentPosition(ancestor) & 8) === 8;
-
-    if (ancestor.contains)
-      return ancestor.contains(element) && ancestor !== element;
-
-    while (element = element.parentNode)
-      if (element == ancestor) return true;
-
-    return false;
-  },
-
-  scrollTo: function(element) {
-    element = $(element);
-    var pos = Element.cumulativeOffset(element);
-    window.scrollTo(pos[0], pos[1]);
-    return element;
-  },
-
-  getStyle: function(element, style) {
-    element = $(element);
-    style = style == 'float' ? 'cssFloat' : style.camelize();
-    var value = element.style[style];
-    if (!value || value == 'auto') {
-      var css = document.defaultView.getComputedStyle(element, null);
-      value = css ? css[style] : null;
-    }
-    if (style == 'opacity') return value ? parseFloat(value) : 1.0;
-    return value == 'auto' ? null : value;
-  },
-
-  getOpacity: function(element) {
-    return $(element).getStyle('opacity');
-  },
-
-  setStyle: function(element, styles) {
-    element = $(element);
-    var elementStyle = element.style, match;
-    if (Object.isString(styles)) {
-      element.style.cssText += ';' + styles;
-      return styles.include('opacity') ?
-        element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
-    }
-    for (var property in styles)
-      if (property == 'opacity') element.setOpacity(styles[property]);
-      else
-        elementStyle[(property == 'float' || property == 'cssFloat') ?
-          (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
-            property] = styles[property];
-
-    return element;
-  },
-
-  setOpacity: function(element, value) {
-    element = $(element);
-    element.style.opacity = (value == 1 || value === '') ? '' :
-      (value < 0.00001) ? 0 : value;
-    return element;
-  },
-
-  getDimensions: function(element) {
-    element = $(element);
-    var display = Element.getStyle(element, 'display');
-    if (display != 'none' && display != null) // Safari bug
-      return {width: element.offsetWidth, height: element.offsetHeight};
-
-    var els = element.style;
-    var originalVisibility = els.visibility;
-    var originalPosition = els.position;
-    var originalDisplay = els.display;
-    els.visibility = 'hidden';
-    if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari
-      els.position = 'absolute';
-    els.display = 'block';
-    var originalWidth = element.clientWidth;
-    var originalHeight = element.clientHeight;
-    els.display = originalDisplay;
-    els.position = originalPosition;
-    els.visibility = originalVisibility;
-    return {width: originalWidth, height: originalHeight};
-  },
-
-  makePositioned: function(element) {
-    element = $(element);
-    var pos = Element.getStyle(element, 'position');
-    if (pos == 'static' || !pos) {
-      element._madePositioned = true;
-      element.style.position = 'relative';
-      if (Prototype.Browser.Opera) {
-        element.style.top = 0;
-        element.style.left = 0;
-      }
-    }
-    return element;
-  },
-
-  undoPositioned: function(element) {
-    element = $(element);
-    if (element._madePositioned) {
-      element._madePositioned = undefined;
-      element.style.position =
-        element.style.top =
-        element.style.left =
-        element.style.bottom =
-        element.style.right = '';
-    }
-    return element;
-  },
-
-  makeClipping: function(element) {
-    element = $(element);
-    if (element._overflow) return element;
-    element._overflow = Element.getStyle(element, 'overflow') || 'auto';
-    if (element._overflow !== 'hidden')
-      element.style.overflow = 'hidden';
-    return element;
-  },
-
-  undoClipping: function(element) {
-    element = $(element);
-    if (!element._overflow) return element;
-    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
-    element._overflow = null;
-    return element;
-  },
-
-  cumulativeOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      element = element.offsetParent;
-    } while (element);
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  positionedOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      element = element.offsetParent;
-      if (element) {
-        if (element.tagName.toUpperCase() == 'BODY') break;
-        var p = Element.getStyle(element, 'position');
-        if (p !== 'static') break;
-      }
-    } while (element);
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  absolutize: function(element) {
-    element = $(element);
-    if (Element.getStyle(element, 'position') == 'absolute') return element;
-
-    var offsets = Element.positionedOffset(element);
-    var top     = offsets[1];
-    var left    = offsets[0];
-    var width   = element.clientWidth;
-    var height  = element.clientHeight;
-
-    element._originalLeft   = left - parseFloat(element.style.left  || 0);
-    element._originalTop    = top  - parseFloat(element.style.top || 0);
-    element._originalWidth  = element.style.width;
-    element._originalHeight = element.style.height;
-
-    element.style.position = 'absolute';
-    element.style.top    = top + 'px';
-    element.style.left   = left + 'px';
-    element.style.width  = width + 'px';
-    element.style.height = height + 'px';
-    return element;
-  },
-
-  relativize: function(element) {
-    element = $(element);
-    if (Element.getStyle(element, 'position') == 'relative') return element;
-
-    element.style.position = 'relative';
-    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
-    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
-
-    element.style.top    = top + 'px';
-    element.style.left   = left + 'px';
-    element.style.height = element._originalHeight;
-    element.style.width  = element._originalWidth;
-    return element;
-  },
-
-  cumulativeScrollOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.scrollTop  || 0;
-      valueL += element.scrollLeft || 0;
-      element = element.parentNode;
-    } while (element);
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  getOffsetParent: function(element) {
-    if (element.offsetParent) return $(element.offsetParent);
-    if (element == document.body) return $(element);
-
-    while ((element = element.parentNode) && element != document.body)
-      if (Element.getStyle(element, 'position') != 'static')
-        return $(element);
-
-    return $(document.body);
-  },
-
-  viewportOffset: function(forElement) {
-    var valueT = 0, valueL = 0;
-
-    var element = forElement;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-
-      if (element.offsetParent == document.body &&
-        Element.getStyle(element, 'position') == 'absolute') break;
-
-    } while (element = element.offsetParent);
-
-    element = forElement;
-    do {
-      if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
-        valueT -= element.scrollTop  || 0;
-        valueL -= element.scrollLeft || 0;
-      }
-    } while (element = element.parentNode);
-
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  clonePosition: function(element, source) {
-    var options = Object.extend({
-      setLeft:    true,
-      setTop:     true,
-      setWidth:   true,
-      setHeight:  true,
-      offsetTop:  0,
-      offsetLeft: 0
-    }, arguments[2] || { });
-
-    source = $(source);
-    var p = Element.viewportOffset(source);
-
-    element = $(element);
-    var delta = [0, 0];
-    var parent = null;
-    if (Element.getStyle(element, 'position') == 'absolute') {
-      parent = Element.getOffsetParent(element);
-      delta = Element.viewportOffset(parent);
-    }
-
-    if (parent == document.body) {
-      delta[0] -= document.body.offsetLeft;
-      delta[1] -= document.body.offsetTop;
-    }
-
-    if (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
-    if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
-    if (options.setWidth)  element.style.width = source.offsetWidth + 'px';
-    if (options.setHeight) element.style.height = source.offsetHeight + 'px';
-    return element;
-  }
-};
-
-Object.extend(Element.Methods, {
-  getElementsBySelector: Element.Methods.select,
-
-  childElements: Element.Methods.immediateDescendants
-});
-
-Element._attributeTranslations = {
-  write: {
-    names: {
-      className: 'class',
-      htmlFor:   'for'
-    },
-    values: { }
-  }
-};
-
-if (Prototype.Browser.Opera) {
-  Element.Methods.getStyle = Element.Methods.getStyle.wrap(
-    function(proceed, element, style) {
-      switch (style) {
-        case 'left': case 'top': case 'right': case 'bottom':
-          if (proceed(element, 'position') === 'static') return null;
-        case 'height': case 'width':
-          if (!Element.visible(element)) return null;
-
-          var dim = parseInt(proceed(element, style), 10);
-
-          if (dim !== element['offset' + style.capitalize()])
-            return dim + 'px';
-
-          var properties;
-          if (style === 'height') {
-            properties = ['border-top-width', 'padding-top',
-             'padding-bottom', 'border-bottom-width'];
-          }
-          else {
-            properties = ['border-left-width', 'padding-left',
-             'padding-right', 'border-right-width'];
-          }
-          return properties.inject(dim, function(memo, property) {
-            var val = proceed(element, property);
-            return val === null ? memo : memo - parseInt(val, 10);
-          }) + 'px';
-        default: return proceed(element, style);
-      }
-    }
-  );
-
-  Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
-    function(proceed, element, attribute) {
-      if (attribute === 'title') return element.title;
-      return proceed(element, attribute);
-    }
-  );
-}
-
-else if (Prototype.Browser.IE) {
-  Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
-    function(proceed, element) {
-      element = $(element);
-      try { element.offsetParent }
-      catch(e) { return $(document.body) }
-      var position = element.getStyle('position');
-      if (position !== 'static') return proceed(element);
-      element.setStyle({ position: 'relative' });
-      var value = proceed(element);
-      element.setStyle({ position: position });
-      return value;
-    }
-  );
-
-  $w('positionedOffset viewportOffset').each(function(method) {
-    Element.Methods[method] = Element.Methods[method].wrap(
-      function(proceed, element) {
-        element = $(element);
-        try { element.offsetParent }
-        catch(e) { return Element._returnOffset(0,0) }
-        var position = element.getStyle('position');
-        if (position !== 'static') return proceed(element);
-        var offsetParent = element.getOffsetParent();
-        if (offsetParent && offsetParent.getStyle('position') === 'fixed')
-          offsetParent.setStyle({ zoom: 1 });
-        element.setStyle({ position: 'relative' });
-        var value = proceed(element);
-        element.setStyle({ position: position });
-        return value;
-      }
-    );
-  });
-
-  Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
-    function(proceed, element) {
-      try { element.offsetParent }
-      catch(e) { return Element._returnOffset(0,0) }
-      return proceed(element);
-    }
-  );
-
-  Element.Methods.getStyle = function(element, style) {
-    element = $(element);
-    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
-    var value = element.style[style];
-    if (!value && element.currentStyle) value = element.currentStyle[style];
-
-    if (style == 'opacity') {
-      if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
-        if (value[1]) return parseFloat(value[1]) / 100;
-      return 1.0;
-    }
-
-    if (value == 'auto') {
-      if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
-        return element['offset' + style.capitalize()] + 'px';
-      return null;
-    }
-    return value;
-  };
-
-  Element.Methods.setOpacity = function(element, value) {
-    function stripAlpha(filter){
-      return filter.replace(/alpha\([^\)]*\)/gi,'');
-    }
-    element = $(element);
-    var currentStyle = element.currentStyle;
-    if ((currentStyle && !currentStyle.hasLayout) ||
-      (!currentStyle && element.style.zoom == 'normal'))
-        element.style.zoom = 1;
-
-    var filter = element.getStyle('filter'), style = element.style;
-    if (value == 1 || value === '') {
-      (filter = stripAlpha(filter)) ?
-        style.filter = filter : style.removeAttribute('filter');
-      return element;
-    } else if (value < 0.00001) value = 0;
-    style.filter = stripAlpha(filter) +
-      'alpha(opacity=' + (value * 100) + ')';
-    return element;
-  };
-
-  Element._attributeTranslations = (function(){
-
-    var classProp = 'className';
-    var forProp = 'for';
-
-    var el = document.createElement('div');
-
-    el.setAttribute(classProp, 'x');
-
-    if (el.className !== 'x') {
-      el.setAttribute('class', 'x');
-      if (el.className === 'x') {
-        classProp = 'class';
-      }
-    }
-    el = null;
-
-    el = document.createElement('label');
-    el.setAttribute(forProp, 'x');
-    if (el.htmlFor !== 'x') {
-      el.setAttribute('htmlFor', 'x');
-      if (el.htmlFor === 'x') {
-        forProp = 'htmlFor';
-      }
-    }
-    el = null;
-
-    return {
-      read: {
-        names: {
-          'class':      classProp,
-          'className':  classProp,
-          'for':        forProp,
-          'htmlFor':    forProp
-        },
-        values: {
-          _getAttr: function(element, attribute) {
-            return element.getAttribute(attribute);
-          },
-          _getAttr2: function(element, attribute) {
-            return element.getAttribute(attribute, 2);
-          },
-          _getAttrNode: function(element, attribute) {
-            var node = element.getAttributeNode(attribute);
-            return node ? node.value : "";
-          },
-          _getEv: (function(){
-
-            var el = document.createElement('div');
-            el.onclick = Prototype.emptyFunction;
-            var value = el.getAttribute('onclick');
-            var f;
-
-            if (String(value).indexOf('{') > -1) {
-              f = function(element, attribute) {
-                attribute = element.getAttribute(attribute);
-                if (!attribute) return null;
-                attribute = attribute.toString();
-                attribute = attribute.split('{')[1];
-                attribute = attribute.split('}')[0];
-                return attribute.strip();
-              };
-            }
-            else if (value === '') {
-              f = function(element, attribute) {
-                attribute = element.getAttribute(attribute);
-                if (!attribute) return null;
-                return attribute.strip();
-              };
-            }
-            el = null;
-            return f;
-          })(),
-          _flag: function(element, attribute) {
-            return $(element).hasAttribute(attribute) ? attribute : null;
-          },
-          style: function(element) {
-            return element.style.cssText.toLowerCase();
-          },
-          title: function(element) {
-            return element.title;
-          }
-        }
-      }
-    }
-  })();
-
-  Element._attributeTranslations.write = {
-    names: Object.extend({
-      cellpadding: 'cellPadding',
-      cellspacing: 'cellSpacing'
-    }, Element._attributeTranslations.read.names),
-    values: {
-      checked: function(element, value) {
-        element.checked = !!value;
-      },
-
-      style: function(element, value) {
-        element.style.cssText = value ? value : '';
-      }
-    }
-  };
-
-  Element._attributeTranslations.has = {};
-
-  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
-      'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
-    Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
-    Element._attributeTranslations.has[attr.toLowerCase()] = attr;
-  });
-
-  (function(v) {
-    Object.extend(v, {
-      href:        v._getAttr2,
-      src:         v._getAttr2,
-      type:        v._getAttr,
-      action:      v._getAttrNode,
-      disabled:    v._flag,
-      checked:     v._flag,
-      readonly:    v._flag,
-      multiple:    v._flag,
-      onload:      v._getEv,
-      onunload:    v._getEv,
-      onclick:     v._getEv,
-      ondblclick:  v._getEv,
-      onmousedown: v._getEv,
-      onmouseup:   v._getEv,
-      onmouseover: v._getEv,
-      onmousemove: v._getEv,
-      onmouseout:  v._getEv,
-      onfocus:     v._getEv,
-      onblur:      v._getEv,
-      onkeypress:  v._getEv,
-      onkeydown:   v._getEv,
-      onkeyup:     v._getEv,
-      onsubmit:    v._getEv,
-      onreset:     v._getEv,
-      onselect:    v._getEv,
-      onchange:    v._getEv
-    });
-  })(Element._attributeTranslations.read.values);
-
-  if (Prototype.BrowserFeatures.ElementExtensions) {
-    (function() {
-      function _descendants(element) {
-        var nodes = element.getElementsByTagName('*'), results = [];
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node.tagName !== "!") // Filter out comment nodes.
-            results.push(node);
-        return results;
-      }
-
-      Element.Methods.down = function(element, expression, index) {
-        element = $(element);
-        if (arguments.length == 1) return element.firstDescendant();
-        return Object.isNumber(expression) ? _descendants(element)[expression] :
-          Element.select(element, expression)[index || 0];
-      }
-    })();
-  }
-
-}
-
-else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
-  Element.Methods.setOpacity = function(element, value) {
-    element = $(element);
-    element.style.opacity = (value == 1) ? 0.999999 :
-      (value === '') ? '' : (value < 0.00001) ? 0 : value;
-    return element;
-  };
-}
-
-else if (Prototype.Browser.WebKit) {
-  Element.Methods.setOpacity = function(element, value) {
-    element = $(element);
-    element.style.opacity = (value == 1 || value === '') ? '' :
-      (value < 0.00001) ? 0 : value;
-
-    if (value == 1)
-      if(element.tagName.toUpperCase() == 'IMG' && element.width) {
-        element.width++; element.width--;
-      } else try {
-        var n = document.createTextNode(' ');
-        element.appendChild(n);
-        element.removeChild(n);
-      } catch (e) { }
-
-    return element;
-  };
-
-  Element.Methods.cumulativeOffset = function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      if (element.offsetParent == document.body)
-        if (Element.getStyle(element, 'position') == 'absolute') break;
-
-      element = element.offsetParent;
-    } while (element);
-
-    return Element._returnOffset(valueL, valueT);
-  };
-}
-
-if ('outerHTML' in document.documentElement) {
-  Element.Methods.replace = function(element, content) {
-    element = $(element);
-
-    if (content && content.toElement) content = content.toElement();
-    if (Object.isElement(content)) {
-      element.parentNode.replaceChild(content, element);
-      return element;
-    }
-
-    content = Object.toHTML(content);
-    var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
-
-    if (Element._insertionTranslations.tags[tagName]) {
-      var nextSibling = element.next();
-      var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
-      parent.removeChild(element);
-      if (nextSibling)
-        fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
-      else
-        fragments.each(function(node) { parent.appendChild(node) });
-    }
-    else element.outerHTML = content.stripScripts();
-
-    content.evalScripts.bind(content).defer();
-    return element;
-  };
-}
-
-Element._returnOffset = function(l, t) {
-  var result = [l, t];
-  result.left = l;
-  result.top = t;
-  return result;
-};
-
-Element._getContentFromAnonymousElement = function(tagName, html) {
-  var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
-  if (t) {
-    div.innerHTML = t[0] + html + t[1];
-    t[2].times(function() { div = div.firstChild });
-  } else div.innerHTML = html;
-  return $A(div.childNodes);
-};
-
-Element._insertionTranslations = {
-  before: function(element, node) {
-    element.parentNode.insertBefore(node, element);
-  },
-  top: function(element, node) {
-    element.insertBefore(node, element.firstChild);
-  },
-  bottom: function(element, node) {
-    element.appendChild(node);
-  },
-  after: function(element, node) {
-    element.parentNode.insertBefore(node, element.nextSibling);
-  },
-  tags: {
-    TABLE:  ['<table>',                '</table>',                   1],
-    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],
-    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],
-    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
-    SELECT: ['<select>',               '</select>',                  1]
-  }
-};
-
-(function() {
-  var tags = Element._insertionTranslations.tags;
-  Object.extend(tags, {
-    THEAD: tags.TBODY,
-    TFOOT: tags.TBODY,
-    TH:    tags.TD
-  });
-})();
-
-Element.Methods.Simulated = {
-  hasAttribute: function(element, attribute) {
-    attribute = Element._attributeTranslations.has[attribute] || attribute;
-    var node = $(element).getAttributeNode(attribute);
-    return !!(node && node.specified);
-  }
-};
-
-Element.Methods.ByTag = { };
-
-Object.extend(Element, Element.Methods);
-
-(function(div) {
-
-  if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {
-    window.HTMLElement = { };
-    window.HTMLElement.prototype = div['__proto__'];
-    Prototype.BrowserFeatures.ElementExtensions = true;
-  }
-
-  div = null;
-
-})(document.createElement('div'))
-
-Element.extend = (function() {
-
-  function checkDeficiency(tagName) {
-    if (typeof window.Element != 'undefined') {
-      var proto = window.Element.prototype;
-      if (proto) {
-        var id = '_' + (Math.random()+'').slice(2);
-        var el = document.createElement(tagName);
-        proto[id] = 'x';
-        var isBuggy = (el[id] !== 'x');
-        delete proto[id];
-        el = null;
-        return isBuggy;
-      }
-    }
-    return false;
-  }
-
-  function extendElementWith(element, methods) {
-    for (var property in methods) {
-      var value = methods[property];
-      if (Object.isFunction(value) && !(property in element))
-        element[property] = value.methodize();
-    }
-  }
-
-  var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');
-
-  if (Prototype.BrowserFeatures.SpecificElementExtensions) {
-    if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {
-      return function(element) {
-        if (element && typeof element._extendedByPrototype == 'undefined') {
-          var t = element.tagName;
-          if (t && (/^(?:object|applet|embed)$/i.test(t))) {
-            extendElementWith(element, Element.Methods);
-            extendElementWith(element, Element.Methods.Simulated);
-            extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);
-          }
-        }
-        return element;
-      }
-    }
-    return Prototype.K;
-  }
-
-  var Methods = { }, ByTag = Element.Methods.ByTag;
-
-  var extend = Object.extend(function(element) {
-    if (!element || typeof element._extendedByPrototype != 'undefined' ||
-        element.nodeType != 1 || element == window) return element;
-
-    var methods = Object.clone(Methods),
-        tagName = element.tagName.toUpperCase();
-
-    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
-
-    extendElementWith(element, methods);
-
-    element._extendedByPrototype = Prototype.emptyFunction;
-    return element;
-
-  }, {
-    refresh: function() {
-      if (!Prototype.BrowserFeatures.ElementExtensions) {
-        Object.extend(Methods, Element.Methods);
-        Object.extend(Methods, Element.Methods.Simulated);
-      }
-    }
-  });
-
-  extend.refresh();
-  return extend;
-})();
-
-Element.hasAttribute = function(element, attribute) {
-  if (element.hasAttribute) return element.hasAttribute(attribute);
-  return Element.Methods.Simulated.hasAttribute(element, attribute);
-};
-
-Element.addMethods = function(methods) {
-  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
-
-  if (!methods) {
-    Object.extend(Form, Form.Methods);
-    Object.extend(Form.Element, Form.Element.Methods);
-    Object.extend(Element.Methods.ByTag, {
-      "FORM":     Object.clone(Form.Methods),
-      "INPUT":    Object.clone(Form.Element.Methods),
-      "SELECT":   Object.clone(Form.Element.Methods),
-      "TEXTAREA": Object.clone(Form.Element.Methods)
-    });
-  }
-
-  if (arguments.length == 2) {
-    var tagName = methods;
-    methods = arguments[1];
-  }
-
-  if (!tagName) Object.extend(Element.Methods, methods || { });
-  else {
-    if (Object.isArray(tagName)) tagName.each(extend);
-    else extend(tagName);
-  }
-
-  function extend(tagName) {
-    tagName = tagName.toUpperCase();
-    if (!Element.Methods.ByTag[tagName])
-      Element.Methods.ByTag[tagName] = { };
-    Object.extend(Element.Methods.ByTag[tagName], methods);
-  }
-
-  function copy(methods, destination, onlyIfAbsent) {
-    onlyIfAbsent = onlyIfAbsent || false;
-    for (var property in methods) {
-      var value = methods[property];
-      if (!Object.isFunction(value)) continue;
-      if (!onlyIfAbsent || !(property in destination))
-        destination[property] = value.methodize();
-    }
-  }
-
-  function findDOMClass(tagName) {
-    var klass;
-    var trans = {
-      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
-      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
-      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
-      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
-      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
-      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
-      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
-      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
-      "FrameSet", "IFRAME": "IFrame"
-    };
-    if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
-    if (window[klass]) return window[klass];
-    klass = 'HTML' + tagName + 'Element';
-    if (window[klass]) return window[klass];
-    klass = 'HTML' + tagName.capitalize() + 'Element';
-    if (window[klass]) return window[klass];
-
-    var element = document.createElement(tagName);
-    var proto = element['__proto__'] || element.constructor.prototype;
-    element = null;
-    return proto;
-  }
-
-  var elementPrototype = window.HTMLElement ? HTMLElement.prototype :
-   Element.prototype;
-
-  if (F.ElementExtensions) {
-    copy(Element.Methods, elementPrototype);
-    copy(Element.Methods.Simulated, elementPrototype, true);
-  }
-
-  if (F.SpecificElementExtensions) {
-    for (var tag in Element.Methods.ByTag) {
-      var klass = findDOMClass(tag);
-      if (Object.isUndefined(klass)) continue;
-      copy(T[tag], klass.prototype);
-    }
-  }
-
-  Object.extend(Element, Element.Methods);
-  delete Element.ByTag;
-
-  if (Element.extend.refresh) Element.extend.refresh();
-  Element.cache = { };
-};
-
-
-document.viewport = {
-
-  getDimensions: function() {
-    return { width: this.getWidth(), height: this.getHeight() };
-  },
-
-  getScrollOffsets: function() {
-    return Element._returnOffset(
-      window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
-      window.pageYOffset || document.documentElement.scrollTop  || document.body.scrollTop);
-  }
-};
-
-(function(viewport) {
-  var B = Prototype.Browser, doc = document, element, property = {};
-
-  function getRootElement() {
-    if (B.WebKit && !doc.evaluate)
-      return document;
-
-    if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)
-      return document.body;
-
-    return document.documentElement;
-  }
-
-  function define(D) {
-    if (!element) element = getRootElement();
-
-    property[D] = 'client' + D;
-
-    viewport['get' + D] = function() { return element[property[D]] };
-    return viewport['get' + D]();
-  }
-
-  viewport.getWidth  = define.curry('Width');
-
-  viewport.getHeight = define.curry('Height');
-})(document.viewport);
-
-
-Element.Storage = {
-  UID: 1
-};
-
-Element.addMethods({
-  getStorage: function(element) {
-    if (!(element = $(element))) return;
-
-    var uid;
-    if (element === window) {
-      uid = 0;
-    } else {
-      if (typeof element._prototypeUID === "undefined")
-        element._prototypeUID = [Element.Storage.UID++];
-      uid = element._prototypeUID[0];
-    }
-
-    if (!Element.Storage[uid])
-      Element.Storage[uid] = $H();
-
-    return Element.Storage[uid];
-  },
-
-  store: function(element, key, value) {
-    if (!(element = $(element))) return;
-
-    if (arguments.length === 2) {
-      Element.getStorage(element).update(key);
-    } else {
-      Element.getStorage(element).set(key, value);
-    }
-
-    return element;
-  },
-
-  retrieve: function(element, key, defaultValue) {
-    if (!(element = $(element))) return;
-    var hash = Element.getStorage(element), value = hash.get(key);
-
-    if (Object.isUndefined(value)) {
-      hash.set(key, defaultValue);
-      value = defaultValue;
-    }
-
-    return value;
-  },
-
-  clone: function(element, deep) {
-    if (!(element = $(element))) return;
-    var clone = element.cloneNode(deep);
-    clone._prototypeUID = void 0;
-    if (deep) {
-      var descendants = Element.select(clone, '*'),
-          i = descendants.length;
-      while (i--) {
-        descendants[i]._prototypeUID = void 0;
-      }
-    }
-    return Element.extend(clone);
-  }
-});
-/* Portions of the Selector class are derived from Jack Slocum's DomQuery,
- * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
- * license.  Please see http://www.yui-ext.com/ for more information. */
-
-var Selector = Class.create({
-  initialize: function(expression) {
-    this.expression = expression.strip();
-
-    if (this.shouldUseSelectorsAPI()) {
-      this.mode = 'selectorsAPI';
-    } else if (this.shouldUseXPath()) {
-      this.mode = 'xpath';
-      this.compileXPathMatcher();
-    } else {
-      this.mode = "normal";
-      this.compileMatcher();
-    }
-
-  },
-
-  shouldUseXPath: (function() {
-
-    var IS_DESCENDANT_SELECTOR_BUGGY = (function(){
-      var isBuggy = false;
-      if (document.evaluate && window.XPathResult) {
-        var el = document.createElement('div');
-        el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>';
-
-        var xpath = ".//*[local-name()='ul' or local-name()='UL']" +
-          "//*[local-name()='li' or local-name()='LI']";
-
-        var result = document.evaluate(xpath, el, null,
-          XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
-
-        isBuggy = (result.snapshotLength !== 2);
-        el = null;
-      }
-      return isBuggy;
-    })();
-
-    return function() {
-      if (!Prototype.BrowserFeatures.XPath) return false;
-
-      var e = this.expression;
-
-      if (Prototype.Browser.WebKit &&
-       (e.include("-of-type") || e.include(":empty")))
-        return false;
-
-      if ((/(\[[\w-]*?:|:checked)/).test(e))
-        return false;
-
-      if (IS_DESCENDANT_SELECTOR_BUGGY) return false;
-
-      return true;
-    }
-
-  })(),
-
-  shouldUseSelectorsAPI: function() {
-    if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
-
-    if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false;
-
-    if (!Selector._div) Selector._div = new Element('div');
-
-    try {
-      Selector._div.querySelector(this.expression);
-    } catch(e) {
-      return false;
-    }
-
-    return true;
-  },
-
-  compileMatcher: function() {
-    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
-        c = Selector.criteria, le, p, m, len = ps.length, name;
-
-    if (Selector._cache[e]) {
-      this.matcher = Selector._cache[e];
-      return;
-    }
-
-    this.matcher = ["this.matcher = function(root) {",
-                    "var r = root, h = Selector.handlers, c = false, n;"];
-
-    while (e && le != e && (/\S/).test(e)) {
-      le = e;
-      for (var i = 0; i<len; i++) {
-        p = ps[i].re;
-        name = ps[i].name;
-        if (m = e.match(p)) {
-          this.matcher.push(Object.isFunction(c[name]) ? c[name](m) :
-            new Template(c[name]).evaluate(m));
-          e = e.replace(m[0], '');
-          break;
-        }
-      }
-    }
-
-    this.matcher.push("return h.unique(n);\n}");
-    eval(this.matcher.join('\n'));
-    Selector._cache[this.expression] = this.matcher;
-  },
-
-  compileXPathMatcher: function() {
-    var e = this.expression, ps = Selector.patterns,
-        x = Selector.xpath, le, m, len = ps.length, name;
-
-    if (Selector._cache[e]) {
-      this.xpath = Selector._cache[e]; return;
-    }
-
-    this.matcher = ['.//*'];
-    while (e && le != e && (/\S/).test(e)) {
-      le = e;
-      for (var i = 0; i<len; i++) {
-        name = ps[i].name;
-        if (m = e.match(ps[i].re)) {
-          this.matcher.push(Object.isFunction(x[name]) ? x[name](m) :
-            new Template(x[name]).evaluate(m));
-          e = e.replace(m[0], '');
-          break;
-        }
-      }
-    }
-
-    this.xpath = this.matcher.join('');
-    Selector._cache[this.expression] = this.xpath;
-  },
-
-  findElements: function(root) {
-    root = root || document;
-    var e = this.expression, results;
-
-    switch (this.mode) {
-      case 'selectorsAPI':
-        if (root !== document) {
-          var oldId = root.id, id = $(root).identify();
-          id = id.replace(/([\.:])/g, "\\$1");
-          e = "#" + id + " " + e;
-        }
-
-        results = $A(root.querySelectorAll(e)).map(Element.extend);
-        root.id = oldId;
-
-        return results;
-      case 'xpath':
-        return document._getElementsByXPath(this.xpath, root);
-      default:
-       return this.matcher(root);
-    }
-  },
-
-  match: function(element) {
-    this.tokens = [];
-
-    var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
-    var le, p, m, len = ps.length, name;
-
-    while (e && le !== e && (/\S/).test(e)) {
-      le = e;
-      for (var i = 0; i<len; i++) {
-        p = ps[i].re;
-        name = ps[i].name;
-        if (m = e.match(p)) {
-          if (as[name]) {
-            this.tokens.push([name, Object.clone(m)]);
-            e = e.replace(m[0], '');
-          } else {
-            return this.findElements(document).include(element);
-          }
-        }
-      }
-    }
-
-    var match = true, name, matches;
-    for (var i = 0, token; token = this.tokens[i]; i++) {
-      name = token[0], matches = token[1];
-      if (!Selector.assertions[name](element, matches)) {
-        match = false; break;
-      }
-    }
-
-    return match;
-  },
-
-  toString: function() {
-    return this.expression;
-  },
-
-  inspect: function() {
-    return "#<Selector:" + this.expression.inspect() + ">";
-  }
-});
-
-if (Prototype.BrowserFeatures.SelectorsAPI &&
- document.compatMode === 'BackCompat') {
-  Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){
-    var div = document.createElement('div'),
-     span = document.createElement('span');
-
-    div.id = "prototype_test_id";
-    span.className = 'Test';
-    div.appendChild(span);
-    var isIgnored = (div.querySelector('#prototype_test_id .test') !== null);
-    div = span = null;
-    return isIgnored;
-  })();
-}
-
-Object.extend(Selector, {
-  _cache: { },
-
-  xpath: {
-    descendant:   "//*",
-    child:        "/*",
-    adjacent:     "/following-sibling::*[1]",
-    laterSibling: '/following-sibling::*',
-    tagName:      function(m) {
-      if (m[1] == '*') return '';
-      return "[local-name()='" + m[1].toLowerCase() +
-             "' or local-name()='" + m[1].toUpperCase() + "']";
-    },
-    className:    "[contains(concat(' ', @class, ' '), ' #{1} ')]",
-    id:           "[@id='#{1}']",
-    attrPresence: function(m) {
-      m[1] = m[1].toLowerCase();
-      return new Template("[@#{1}]").evaluate(m);
-    },
-    attr: function(m) {
-      m[1] = m[1].toLowerCase();
-      m[3] = m[5] || m[6];
-      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
-    },
-    pseudo: function(m) {
-      var h = Selector.xpath.pseudos[m[1]];
-      if (!h) return '';
-      if (Object.isFunction(h)) return h(m);
-      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
-    },
-    operators: {
-      '=':  "[@#{1}='#{3}']",
-      '!=': "[@#{1}!='#{3}']",
-      '^=': "[starts-with(@#{1}, '#{3}')]",
-      '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
-      '*=': "[contains(@#{1}, '#{3}')]",
-      '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
-      '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
-    },
-    pseudos: {
-      'first-child': '[not(preceding-sibling::*)]',
-      'last-child':  '[not(following-sibling::*)]',
-      'only-child':  '[not(preceding-sibling::* or following-sibling::*)]',
-      'empty':       "[count(*) = 0 and (count(text()) = 0)]",
-      'checked':     "[@checked]",
-      'disabled':    "[(@disabled) and (@type!='hidden')]",
-      'enabled':     "[not(@disabled) and (@type!='hidden')]",
-      'not': function(m) {
-        var e = m[6], p = Selector.patterns,
-            x = Selector.xpath, le, v, len = p.length, name;
-
-        var exclusion = [];
-        while (e && le != e && (/\S/).test(e)) {
-          le = e;
-          for (var i = 0; i<len; i++) {
-            name = p[i].name
-            if (m = e.match(p[i].re)) {
-              v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m);
-              exclusion.push("(" + v.substring(1, v.length - 1) + ")");
-              e = e.replace(m[0], '');
-              break;
-            }
-          }
-        }
-        return "[not(" + exclusion.join(" and ") + ")]";
-      },
-      'nth-child':      function(m) {
-        return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
-      },
-      'nth-last-child': function(m) {
-        return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
-      },
-      'nth-of-type':    function(m) {
-        return Selector.xpath.pseudos.nth("position() ", m);
-      },
-      'nth-last-of-type': function(m) {
-        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
-      },
-      'first-of-type':  function(m) {
-        m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
-      },
-      'last-of-type':   function(m) {
-        m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
-      },
-      'only-of-type':   function(m) {
-        var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
-      },
-      nth: function(fragment, m) {
-        var mm, formula = m[6], predicate;
-        if (formula == 'even') formula = '2n+0';
-        if (formula == 'odd')  formula = '2n+1';
-        if (mm = formula.match(/^(\d+)$/)) // digit only
-          return '[' + fragment + "= " + mm[1] + ']';
-        if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
-          if (mm[1] == "-") mm[1] = -1;
-          var a = mm[1] ? Number(mm[1]) : 1;
-          var b = mm[2] ? Number(mm[2]) : 0;
-          predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
-          "((#{fragment} - #{b}) div #{a} >= 0)]";
-          return new Template(predicate).evaluate({
-            fragment: fragment, a: a, b: b });
-        }
-      }
-    }
-  },
-
-  criteria: {
-    tagName:      'n = h.tagName(n, r, "#{1}", c);      c = false;',
-    className:    'n = h.className(n, r, "#{1}", c);    c = false;',
-    id:           'n = h.id(n, r, "#{1}", c);           c = false;',
-    attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
-    attr: function(m) {
-      m[3] = (m[5] || m[6]);
-      return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
-    },
-    pseudo: function(m) {
-      if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
-      return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
-    },
-    descendant:   'c = "descendant";',
-    child:        'c = "child";',
-    adjacent:     'c = "adjacent";',
-    laterSibling: 'c = "laterSibling";'
-  },
-
-  patterns: [
-    { name: 'laterSibling', re: /^\s*~\s*/ },
-    { name: 'child',        re: /^\s*>\s*/ },
-    { name: 'adjacent',     re: /^\s*\+\s*/ },
-    { name: 'descendant',   re: /^\s/ },
-
-    { name: 'tagName',      re: /^\s*(\*|[\w\-]+)(\b|$)?/ },
-    { name: 'id',           re: /^#([\w\-\*]+)(\b|$)/ },
-    { name: 'className',    re: /^\.([\w\-\*]+)(\b|$)/ },
-    { name: 'pseudo',       re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ },
-    { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ },
-    { name: 'attr',         re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ }
-  ],
-
-  assertions: {
-    tagName: function(element, matches) {
-      return matches[1].toUpperCase() == element.tagName.toUpperCase();
-    },
-
-    className: function(element, matches) {
-      return Element.hasClassName(element, matches[1]);
-    },
-
-    id: function(element, matches) {
-      return element.id === matches[1];
-    },
-
-    attrPresence: function(element, matches) {
-      return Element.hasAttribute(element, matches[1]);
-    },
-
-    attr: function(element, matches) {
-      var nodeValue = Element.readAttribute(element, matches[1]);
-      return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
-    }
-  },
-
-  handlers: {
-    concat: function(a, b) {
-      for (var i = 0, node; node = b[i]; i++)
-        a.push(node);
-      return a;
-    },
-
-    mark: function(nodes) {
-      var _true = Prototype.emptyFunction;
-      for (var i = 0, node; node = nodes[i]; i++)
-        node._countedByPrototype = _true;
-      return nodes;
-    },
-
-    unmark: (function(){
-
-      var PROPERTIES_ATTRIBUTES_MAP = (function(){
-        var el = document.createElement('div'),
-            isBuggy = false,
-            propName = '_countedByPrototype',
-            value = 'x'
-        el[propName] = value;
-        isBuggy = (el.getAttribute(propName) === value);
-        el = null;
-        return isBuggy;
-      })();
-
-      return PROPERTIES_ATTRIBUTES_MAP ?
-        function(nodes) {
-          for (var i = 0, node; node = nodes[i]; i++)
-            node.removeAttribute('_countedByPrototype');
-          return nodes;
-        } :
-        function(nodes) {
-          for (var i = 0, node; node = nodes[i]; i++)
-            node._countedByPrototype = void 0;
-          return nodes;
-        }
-    })(),
-
-    index: function(parentNode, reverse, ofType) {
-      parentNode._countedByPrototype = Prototype.emptyFunction;
-      if (reverse) {
-        for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
-          var node = nodes[i];
-          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
-        }
-      } else {
-        for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
-          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
-      }
-    },
-
-    unique: function(nodes) {
-      if (nodes.length == 0) return nodes;
-      var results = [], n;
-      for (var i = 0, l = nodes.length; i < l; i++)
-        if (typeof (n = nodes[i])._countedByPrototype == 'undefined') {
-          n._countedByPrototype = Prototype.emptyFunction;
-          results.push(Element.extend(n));
-        }
-      return Selector.handlers.unmark(results);
-    },
-
-    descendant: function(nodes) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        h.concat(results, node.getElementsByTagName('*'));
-      return results;
-    },
-
-    child: function(nodes) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        for (var j = 0, child; child = node.childNodes[j]; j++)
-          if (child.nodeType == 1 && child.tagName != '!') results.push(child);
-      }
-      return results;
-    },
-
-    adjacent: function(nodes) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        var next = this.nextElementSibling(node);
-        if (next) results.push(next);
-      }
-      return results;
-    },
-
-    laterSibling: function(nodes) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        h.concat(results, Element.nextSiblings(node));
-      return results;
-    },
-
-    nextElementSibling: function(node) {
-      while (node = node.nextSibling)
-        if (node.nodeType == 1) return node;
-      return null;
-    },
-
-    previousElementSibling: function(node) {
-      while (node = node.previousSibling)
-        if (node.nodeType == 1) return node;
-      return null;
-    },
-
-    tagName: function(nodes, root, tagName, combinator) {
-      var uTagName = tagName.toUpperCase();
-      var results = [], h = Selector.handlers;
-      if (nodes) {
-        if (combinator) {
-          if (combinator == "descendant") {
-            for (var i = 0, node; node = nodes[i]; i++)
-              h.concat(results, node.getElementsByTagName(tagName));
-            return results;
-          } else nodes = this[combinator](nodes);
-          if (tagName == "*") return nodes;
-        }
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node.tagName.toUpperCase() === uTagName) results.push(node);
-        return results;
-      } else return root.getElementsByTagName(tagName);
-    },
-
-    id: function(nodes, root, id, combinator) {
-      var targetNode = $(id), h = Selector.handlers;
-
-      if (root == document) {
-        if (!targetNode) return [];
-        if (!nodes) return [targetNode];
-      } else {
-        if (!root.sourceIndex || root.sourceIndex < 1) {
-          var nodes = root.getElementsByTagName('*');
-          for (var j = 0, node; node = nodes[j]; j++) {
-            if (node.id === id) return [node];
-          }
-        }
-      }
-
-      if (nodes) {
-        if (combinator) {
-          if (combinator == 'child') {
-            for (var i = 0, node; node = nodes[i]; i++)
-              if (targetNode.parentNode == node) return [targetNode];
-          } else if (combinator == 'descendant') {
-            for (var i = 0, node; node = nodes[i]; i++)
-              if (Element.descendantOf(targetNode, node)) return [targetNode];
-          } else if (combinator == 'adjacent') {
-            for (var i = 0, node; node = nodes[i]; i++)
-              if (Selector.handlers.previousElementSibling(targetNode) == node)
-                return [targetNode];
-          } else nodes = h[combinator](nodes);
-        }
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node == targetNode) return [targetNode];
-        return [];
-      }
-      return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
-    },
-
-    className: function(nodes, root, className, combinator) {
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      return Selector.handlers.byClassName(nodes, root, className);
-    },
-
-    byClassName: function(nodes, root, className) {
-      if (!nodes) nodes = Selector.handlers.descendant([root]);
-      var needle = ' ' + className + ' ';
-      for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
-        nodeClassName = node.className;
-        if (nodeClassName.length == 0) continue;
-        if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
-          results.push(node);
-      }
-      return results;
-    },
-
-    attrPresence: function(nodes, root, attr, combinator) {
-      if (!nodes) nodes = root.getElementsByTagName("*");
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      var results = [];
-      for (var i = 0, node; node = nodes[i]; i++)
-        if (Element.hasAttribute(node, attr)) results.push(node);
-      return results;
-    },
-
-    attr: function(nodes, root, attr, value, operator, combinator) {
-      if (!nodes) nodes = root.getElementsByTagName("*");
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      var handler = Selector.operators[operator], results = [];
-      for (var i = 0, node; node = nodes[i]; i++) {
-        var nodeValue = Element.readAttribute(node, attr);
-        if (nodeValue === null) continue;
-        if (handler(nodeValue, value)) results.push(node);
-      }
-      return results;
-    },
-
-    pseudo: function(nodes, name, value, root, combinator) {
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      if (!nodes) nodes = root.getElementsByTagName("*");
-      return Selector.pseudos[name](nodes, value, root);
-    }
-  },
-
-  pseudos: {
-    'first-child': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        if (Selector.handlers.previousElementSibling(node)) continue;
-          results.push(node);
-      }
-      return results;
-    },
-    'last-child': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        if (Selector.handlers.nextElementSibling(node)) continue;
-          results.push(node);
-      }
-      return results;
-    },
-    'only-child': function(nodes, value, root) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
-          results.push(node);
-      return results;
-    },
-    'nth-child':        function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root);
-    },
-    'nth-last-child':   function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root, true);
-    },
-    'nth-of-type':      function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root, false, true);
-    },
-    'nth-last-of-type': function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root, true, true);
-    },
-    'first-of-type':    function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, "1", root, false, true);
-    },
-    'last-of-type':     function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, "1", root, true, true);
-    },
-    'only-of-type':     function(nodes, formula, root) {
-      var p = Selector.pseudos;
-      return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
-    },
-
-    getIndices: function(a, b, total) {
-      if (a == 0) return b > 0 ? [b] : [];
-      return $R(1, total).inject([], function(memo, i) {
-        if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
-        return memo;
-      });
-    },
-
-    nth: function(nodes, formula, root, reverse, ofType) {
-      if (nodes.length == 0) return [];
-      if (formula == 'even') formula = '2n+0';
-      if (formula == 'odd')  formula = '2n+1';
-      var h = Selector.handlers, results = [], indexed = [], m;
-      h.mark(nodes);
-      for (var i = 0, node; node = nodes[i]; i++) {
-        if (!node.parentNode._countedByPrototype) {
-          h.index(node.parentNode, reverse, ofType);
-          indexed.push(node.parentNode);
-        }
-      }
-      if (formula.match(/^\d+$/)) { // just a number
-        formula = Number(formula);
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node.nodeIndex == formula) results.push(node);
-      } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
-        if (m[1] == "-") m[1] = -1;
-        var a = m[1] ? Number(m[1]) : 1;
-        var b = m[2] ? Number(m[2]) : 0;
-        var indices = Selector.pseudos.getIndices(a, b, nodes.length);
-        for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
-          for (var j = 0; j < l; j++)
-            if (node.nodeIndex == indices[j]) results.push(node);
-        }
-      }
-      h.unmark(nodes);
-      h.unmark(indexed);
-      return results;
-    },
-
-    'empty': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        if (node.tagName == '!' || node.firstChild) continue;
-        results.push(node);
-      }
-      return results;
-    },
-
-    'not': function(nodes, selector, root) {
-      var h = Selector.handlers, selectorType, m;
-      var exclusions = new Selector(selector).findElements(root);
-      h.mark(exclusions);
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (!node._countedByPrototype) results.push(node);
-      h.unmark(exclusions);
-      return results;
-    },
-
-    'enabled': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (!node.disabled && (!node.type || node.type !== 'hidden'))
-          results.push(node);
-      return results;
-    },
-
-    'disabled': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (node.disabled) results.push(node);
-      return results;
-    },
-
-    'checked': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (node.checked) results.push(node);
-      return results;
-    }
-  },
-
-  operators: {
-    '=':  function(nv, v) { return nv == v; },
-    '!=': function(nv, v) { return nv != v; },
-    '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
-    '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
-    '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
-    '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
-    '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
-     '-').include('-' + (v || "").toUpperCase() + '-'); }
-  },
-
-  split: function(expression) {
-    var expressions = [];
-    expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
-      expressions.push(m[1].strip());
-    });
-    return expressions;
-  },
-
-  matchElements: function(elements, expression) {
-    var matches = $$(expression), h = Selector.handlers;
-    h.mark(matches);
-    for (var i = 0, results = [], element; element = elements[i]; i++)
-      if (element._countedByPrototype) results.push(element);
-    h.unmark(matches);
-    return results;
-  },
-
-  findElement: function(elements, expression, index) {
-    if (Object.isNumber(expression)) {
-      index = expression; expression = false;
-    }
-    return Selector.matchElements(elements, expression || '*')[index || 0];
-  },
-
-  findChildElements: function(element, expressions) {
-    expressions = Selector.split(expressions.join(','));
-    var results = [], h = Selector.handlers;
-    for (var i = 0, l = expressions.length, selector; i < l; i++) {
-      selector = new Selector(expressions[i].strip());
-      h.concat(results, selector.findElements(element));
-    }
-    return (l > 1) ? h.unique(results) : results;
-  }
-});
-
-if (Prototype.Browser.IE) {
-  Object.extend(Selector.handlers, {
-    concat: function(a, b) {
-      for (var i = 0, node; node = b[i]; i++)
-        if (node.tagName !== "!") a.push(node);
-      return a;
-    }
-  });
-}
-
-function $$() {
-  return Selector.findChildElements(document, $A(arguments));
-}
-
-var Form = {
-  reset: function(form) {
-    form = $(form);
-    form.reset();
-    return form;
-  },
-
-  serializeElements: function(elements, options) {
-    if (typeof options != 'object') options = { hash: !!options };
-    else if (Object.isUndefined(options.hash)) options.hash = true;
-    var key, value, submitted = false, submit = options.submit;
-
-    var data = elements.inject({ }, function(result, element) {
-      if (!element.disabled && element.name) {
-        key = element.name; value = $(element).getValue();
-        if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
-            submit !== false && (!submit || key == submit) && (submitted = true)))) {
-          if (key in result) {
-            if (!Object.isArray(result[key])) result[key] = [result[key]];
-            result[key].push(value);
-          }
-          else result[key] = value;
-        }
-      }
-      return result;
-    });
-
-    return options.hash ? data : Object.toQueryString(data);
-  }
-};
-
-Form.Methods = {
-  serialize: function(form, options) {
-    return Form.serializeElements(Form.getElements(form), options);
-  },
-
-  getElements: function(form) {
-    var elements = $(form).getElementsByTagName('*'),
-        element,
-        arr = [ ],
-        serializers = Form.Element.Serializers;
-    for (var i = 0; element = elements[i]; i++) {
-      arr.push(element);
-    }
-    return arr.inject([], function(elements, child) {
-      if (serializers[child.tagName.toLowerCase()])
-        elements.push(Element.extend(child));
-      return elements;
-    })
-  },
-
-  getInputs: function(form, typeName, name) {
-    form = $(form);
-    var inputs = form.getElementsByTagName('input');
-
-    if (!typeName && !name) return $A(inputs).map(Element.extend);
-
-    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
-      var input = inputs[i];
-      if ((typeName && input.type != typeName) || (name && input.name != name))
-        continue;
-      matchingInputs.push(Element.extend(input));
-    }
-
-    return matchingInputs;
-  },
-
-  disable: function(form) {
-    form = $(form);
-    Form.getElements(form).invoke('disable');
-    return form;
-  },
-
-  enable: function(form) {
-    form = $(form);
-    Form.getElements(form).invoke('enable');
-    return form;
-  },
-
-  findFirstElement: function(form) {
-    var elements = $(form).getElements().findAll(function(element) {
-      return 'hidden' != element.type && !element.disabled;
-    });
-    var firstByIndex = elements.findAll(function(element) {
-      return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
-    }).sortBy(function(element) { return element.tabIndex }).first();
-
-    return firstByIndex ? firstByIndex : elements.find(function(element) {
-      return /^(?:input|select|textarea)$/i.test(element.tagName);
-    });
-  },
-
-  focusFirstElement: function(form) {
-    form = $(form);
-    form.findFirstElement().activate();
-    return form;
-  },
-
-  request: function(form, options) {
-    form = $(form), options = Object.clone(options || { });
-
-    var params = options.parameters, action = form.readAttribute('action') || '';
-    if (action.blank()) action = window.location.href;
-    options.parameters = form.serialize(true);
-
-    if (params) {
-      if (Object.isString(params)) params = params.toQueryParams();
-      Object.extend(options.parameters, params);
-    }
-
-    if (form.hasAttribute('method') && !options.method)
-      options.method = form.method;
-
-    return new Ajax.Request(action, options);
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-
-Form.Element = {
-  focus: function(element) {
-    $(element).focus();
-    return element;
-  },
-
-  select: function(element) {
-    $(element).select();
-    return element;
-  }
-};
-
-Form.Element.Methods = {
-
-  serialize: function(element) {
-    element = $(element);
-    if (!element.disabled && element.name) {
-      var value = element.getValue();
-      if (value != undefined) {
-        var pair = { };
-        pair[element.name] = value;
-        return Object.toQueryString(pair);
-      }
-    }
-    return '';
-  },
-
-  getValue: function(element) {
-    element = $(element);
-    var method = element.tagName.toLowerCase();
-    return Form.Element.Serializers[method](element);
-  },
-
-  setValue: function(element, value) {
-    element = $(element);
-    var method = element.tagName.toLowerCase();
-    Form.Element.Serializers[method](element, value);
-    return element;
-  },
-
-  clear: function(element) {
-    $(element).value = '';
-    return element;
-  },
-
-  present: function(element) {
-    return $(element).value != '';
-  },
-
-  activate: function(element) {
-    element = $(element);
-    try {
-      element.focus();
-      if (element.select && (element.tagName.toLowerCase() != 'input' ||
-          !(/^(?:button|reset|submit)$/i.test(element.type))))
-        element.select();
-    } catch (e) { }
-    return element;
-  },
-
-  disable: function(element) {
-    element = $(element);
-    element.disabled = true;
-    return element;
-  },
-
-  enable: function(element) {
-    element = $(element);
-    element.disabled = false;
-    return element;
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-var Field = Form.Element;
-
-var $F = Form.Element.Methods.getValue;
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element.Serializers = {
-  input: function(element, value) {
-    switch (element.type.toLowerCase()) {
-      case 'checkbox':
-      case 'radio':
-        return Form.Element.Serializers.inputSelector(element, value);
-      default:
-        return Form.Element.Serializers.textarea(element, value);
-    }
-  },
-
-  inputSelector: function(element, value) {
-    if (Object.isUndefined(value)) return element.checked ? element.value : null;
-    else element.checked = !!value;
-  },
-
-  textarea: function(element, value) {
-    if (Object.isUndefined(value)) return element.value;
-    else element.value = value;
-  },
-
-  select: function(element, value) {
-    if (Object.isUndefined(value))
-      return this[element.type == 'select-one' ?
-        'selectOne' : 'selectMany'](element);
-    else {
-      var opt, currentValue, single = !Object.isArray(value);
-      for (var i = 0, length = element.length; i < length; i++) {
-        opt = element.options[i];
-        currentValue = this.optionValue(opt);
-        if (single) {
-          if (currentValue == value) {
-            opt.selected = true;
-            return;
-          }
-        }
-        else opt.selected = value.include(currentValue);
-      }
-    }
-  },
-
-  selectOne: function(element) {
-    var index = element.selectedIndex;
-    return index >= 0 ? this.optionValue(element.options[index]) : null;
-  },
-
-  selectMany: function(element) {
-    var values, length = element.length;
-    if (!length) return null;
-
-    for (var i = 0, values = []; i < length; i++) {
-      var opt = element.options[i];
-      if (opt.selected) values.push(this.optionValue(opt));
-    }
-    return values;
-  },
-
-  optionValue: function(opt) {
-    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-
-Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
-  initialize: function($super, element, frequency, callback) {
-    $super(callback, frequency);
-    this.element   = $(element);
-    this.lastValue = this.getValue();
-  },
-
-  execute: function() {
-    var value = this.getValue();
-    if (Object.isString(this.lastValue) && Object.isString(value) ?
-        this.lastValue != value : String(this.lastValue) != String(value)) {
-      this.callback(this.element, value);
-      this.lastValue = value;
-    }
-  }
-});
-
-Form.Element.Observer = Class.create(Abstract.TimedObserver, {
-  getValue: function() {
-    return Form.Element.getValue(this.element);
-  }
-});
-
-Form.Observer = Class.create(Abstract.TimedObserver, {
-  getValue: function() {
-    return Form.serialize(this.element);
-  }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.EventObserver = Class.create({
-  initialize: function(element, callback) {
-    this.element  = $(element);
-    this.callback = callback;
-
-    this.lastValue = this.getValue();
-    if (this.element.tagName.toLowerCase() == 'form')
-      this.registerFormCallbacks();
-    else
-      this.registerCallback(this.element);
-  },
-
-  onElementEvent: function() {
-    var value = this.getValue();
-    if (this.lastValue != value) {
-      this.callback(this.element, value);
-      this.lastValue = value;
-    }
-  },
-
-  registerFormCallbacks: function() {
-    Form.getElements(this.element).each(this.registerCallback, this);
-  },
-
-  registerCallback: function(element) {
-    if (element.type) {
-      switch (element.type.toLowerCase()) {
-        case 'checkbox':
-        case 'radio':
-          Event.observe(element, 'click', this.onElementEvent.bind(this));
-          break;
-        default:
-          Event.observe(element, 'change', this.onElementEvent.bind(this));
-          break;
-      }
-    }
-  }
-});
-
-Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
-  getValue: function() {
-    return Form.Element.getValue(this.element);
-  }
-});
-
-Form.EventObserver = Class.create(Abstract.EventObserver, {
-  getValue: function() {
-    return Form.serialize(this.element);
-  }
-});
-(function() {
-
-  var Event = {
-    KEY_BACKSPACE: 8,
-    KEY_TAB:       9,
-    KEY_RETURN:   13,
-    KEY_ESC:      27,
-    KEY_LEFT:     37,
-    KEY_UP:       38,
-    KEY_RIGHT:    39,
-    KEY_DOWN:     40,
-    KEY_DELETE:   46,
-    KEY_HOME:     36,
-    KEY_END:      35,
-    KEY_PAGEUP:   33,
-    KEY_PAGEDOWN: 34,
-    KEY_INSERT:   45,
-
-    cache: {}
-  };
-
-  var docEl = document.documentElement;
-  var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl
-    && 'onmouseleave' in docEl;
-
-  var _isButton;
-  if (Prototype.Browser.IE) {
-    var buttonMap = { 0: 1, 1: 4, 2: 2 };
-    _isButton = function(event, code) {
-      return event.button === buttonMap[code];
-    };
-  } else if (Prototype.Browser.WebKit) {
-    _isButton = function(event, code) {
-      switch (code) {
-        case 0: return event.which == 1 && !event.metaKey;
-        case 1: return event.which == 1 && event.metaKey;
-        default: return false;
-      }
-    };
-  } else {
-    _isButton = function(event, code) {
-      return event.which ? (event.which === code + 1) : (event.button === code);
-    };
-  }
-
-  function isLeftClick(event)   { return _isButton(event, 0) }
-
-  function isMiddleClick(event) { return _isButton(event, 1) }
-
-  function isRightClick(event)  { return _isButton(event, 2) }
-
-  function element(event) {
-    event = Event.extend(event);
-
-    var node = event.target, type = event.type,
-     currentTarget = event.currentTarget;
-
-    if (currentTarget && currentTarget.tagName) {
-      if (type === 'load' || type === 'error' ||
-        (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
-          && currentTarget.type === 'radio'))
-            node = currentTarget;
-    }
-
-    if (node.nodeType == Node.TEXT_NODE)
-      node = node.parentNode;
-
-    return Element.extend(node);
-  }
-
-  function findElement(event, expression) {
-    var element = Event.element(event);
-    if (!expression) return element;
-    var elements = [element].concat(element.ancestors());
-    return Selector.findElement(elements, expression, 0);
-  }
-
-  function pointer(event) {
-    return { x: pointerX(event), y: pointerY(event) };
-  }
-
-  function pointerX(event) {
-    var docElement = document.documentElement,
-     body = document.body || { scrollLeft: 0 };
-
-    return event.pageX || (event.clientX +
-      (docElement.scrollLeft || body.scrollLeft) -
-      (docElement.clientLeft || 0));
-  }
-
-  function pointerY(event) {
-    var docElement = document.documentElement,
-     body = document.body || { scrollTop: 0 };
-
-    return  event.pageY || (event.clientY +
-       (docElement.scrollTop || body.scrollTop) -
-       (docElement.clientTop || 0));
-  }
-
-
-  function stop(event) {
-    Event.extend(event);
-    event.preventDefault();
-    event.stopPropagation();
-
-    event.stopped = true;
-  }
-
-  Event.Methods = {
-    isLeftClick: isLeftClick,
-    isMiddleClick: isMiddleClick,
-    isRightClick: isRightClick,
-
-    element: element,
-    findElement: findElement,
-
-    pointer: pointer,
-    pointerX: pointerX,
-    pointerY: pointerY,
-
-    stop: stop
-  };
-
-
-  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
-    m[name] = Event.Methods[name].methodize();
-    return m;
-  });
-
-  if (Prototype.Browser.IE) {
-    function _relatedTarget(event) {
-      var element;
-      switch (event.type) {
-        case 'mouseover': element = event.fromElement; break;
-        case 'mouseout':  element = event.toElement;   break;
-        default: return null;
-      }
-      return Element.extend(element);
-    }
-
-    Object.extend(methods, {
-      stopPropagation: function() { this.cancelBubble = true },
-      preventDefault:  function() { this.returnValue = false },
-      inspect: function() { return '[object Event]' }
-    });
-
-    Event.extend = function(event, element) {
-      if (!event) return false;
-      if (event._extendedByPrototype) return event;
-
-      event._extendedByPrototype = Prototype.emptyFunction;
-      var pointer = Event.pointer(event);
-
-      Object.extend(event, {
-        target: event.srcElement || element,
-        relatedTarget: _relatedTarget(event),
-        pageX:  pointer.x,
-        pageY:  pointer.y
-      });
-
-      return Object.extend(event, methods);
-    };
-  } else {
-    Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;
-    Object.extend(Event.prototype, methods);
-    Event.extend = Prototype.K;
-  }
-
-  function _createResponder(element, eventName, handler) {
-    var registry = Element.retrieve(element, 'prototype_event_registry');
-
-    if (Object.isUndefined(registry)) {
-      CACHE.push(element);
-      registry = Element.retrieve(element, 'prototype_event_registry', $H());
-    }
-
-    var respondersForEvent = registry.get(eventName);
-    if (Object.isUndefined(respondersForEvent)) {
-      respondersForEvent = [];
-      registry.set(eventName, respondersForEvent);
-    }
-
-    if (respondersForEvent.pluck('handler').include(handler)) return false;
-
-    var responder;
-    if (eventName.include(":")) {
-      responder = function(event) {
-        if (Object.isUndefined(event.eventName))
-          return false;
-
-        if (event.eventName !== eventName)
-          return false;
-
-        Event.extend(event, element);
-        handler.call(element, event);
-      };
-    } else {
-      if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&
-       (eventName === "mouseenter" || eventName === "mouseleave")) {
-        if (eventName === "mouseenter" || eventName === "mouseleave") {
-          responder = function(event) {
-            Event.extend(event, element);
-
-            var parent = event.relatedTarget;
-            while (parent && parent !== element) {
-              try { parent = parent.parentNode; }
-              catch(e) { parent = element; }
-            }
-
-            if (parent === element) return;
-
-            handler.call(element, event);
-          };
-        }
-      } else {
-        responder = function(event) {
-          Event.extend(event, element);
-          handler.call(element, event);
-        };
-      }
-    }
-
-    responder.handler = handler;
-    respondersForEvent.push(responder);
-    return responder;
-  }
-
-  function _destroyCache() {
-    for (var i = 0, length = CACHE.length; i < length; i++) {
-      Event.stopObserving(CACHE[i]);
-      CACHE[i] = null;
-    }
-  }
-
-  var CACHE = [];
-
-  if (Prototype.Browser.IE)
-    window.attachEvent('onunload', _destroyCache);
-
-  if (Prototype.Browser.WebKit)
-    window.addEventListener('unload', Prototype.emptyFunction, false);
-
-
-  var _getDOMEventName = Prototype.K;
-
-  if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {
-    _getDOMEventName = function(eventName) {
-      var translations = { mouseenter: "mouseover", mouseleave: "mouseout" };
-      return eventName in translations ? translations[eventName] : eventName;
-    };
-  }
-
-  function observe(element, eventName, handler) {
-    element = $(element);
-
-    var responder = _createResponder(element, eventName, handler);
-
-    if (!responder) return element;
-
-    if (eventName.include(':')) {
-      if (element.addEventListener)
-        element.addEventListener("dataavailable", responder, false);
-      else {
-        element.attachEvent("ondataavailable", responder);
-        element.attachEvent("onfilterchange", responder);
-      }
-    } else {
-      var actualEventName = _getDOMEventName(eventName);
-
-      if (element.addEventListener)
-        element.addEventListener(actualEventName, responder, false);
-      else
-        element.attachEvent("on" + actualEventName, responder);
-    }
-
-    return element;
-  }
-
-  function stopObserving(element, eventName, handler) {
-    element = $(element);
-
-    var registry = Element.retrieve(element, 'prototype_event_registry');
-
-    if (Object.isUndefined(registry)) return element;
-
-    if (eventName && !handler) {
-      var responders = registry.get(eventName);
-
-      if (Object.isUndefined(responders)) return element;
-
-      responders.each( function(r) {
-        Element.stopObserving(element, eventName, r.handler);
-      });
-      return element;
-    } else if (!eventName) {
-      registry.each( function(pair) {
-        var eventName = pair.key, responders = pair.value;
-
-        responders.each( function(r) {
-          Element.stopObserving(element, eventName, r.handler);
-        });
-      });
-      return element;
-    }
-
-    var responders = registry.get(eventName);
-
-    if (!responders) return;
-
-    var responder = responders.find( function(r) { return r.handler === handler; });
-    if (!responder) return element;
-
-    var actualEventName = _getDOMEventName(eventName);
-
-    if (eventName.include(':')) {
-      if (element.removeEventListener)
-        element.removeEventListener("dataavailable", responder, false);
-      else {
-        element.detachEvent("ondataavailable", responder);
-        element.detachEvent("onfilterchange",  responder);
-      }
-    } else {
-      if (element.removeEventListener)
-        element.removeEventListener(actualEventName, responder, false);
-      else
-        element.detachEvent('on' + actualEventName, responder);
-    }
-
-    registry.set(eventName, responders.without(responder));
-
-    return element;
-  }
-
-  function fire(element, eventName, memo, bubble) {
-    element = $(element);
-
-    if (Object.isUndefined(bubble))
-      bubble = true;
-
-    if (element == document && document.createEvent && !element.dispatchEvent)
-      element = document.documentElement;
-
-    var event;
-    if (document.createEvent) {
-      event = document.createEvent('HTMLEvents');
-      event.initEvent('dataavailable', true, true);
-    } else {
-      event = document.createEventObject();
-      event.eventType = bubble ? 'ondataavailable' : 'onfilterchange';
-    }
-
-    event.eventName = eventName;
-    event.memo = memo || { };
-
-    if (document.createEvent)
-      element.dispatchEvent(event);
-    else
-      element.fireEvent(event.eventType, event);
-
-    return Event.extend(event);
-  }
-
-
-  Object.extend(Event, Event.Methods);
-
-  Object.extend(Event, {
-    fire:          fire,
-    observe:       observe,
-    stopObserving: stopObserving
-  });
-
-  Element.addMethods({
-    fire:          fire,
-
-    observe:       observe,
-
-    stopObserving: stopObserving
-  });
-
-  Object.extend(document, {
-    fire:          fire.methodize(),
-
-    observe:       observe.methodize(),
-
-    stopObserving: stopObserving.methodize(),
-
-    loaded:        false
-  });
-
-  if (window.Event) Object.extend(window.Event, Event);
-  else window.Event = Event;
-})();
-
-(function() {
-  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
-     Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */
-
-  var timer;
-
-  function fireContentLoadedEvent() {
-    if (document.loaded) return;
-    if (timer) window.clearTimeout(timer);
-    document.loaded = true;
-    document.fire('dom:loaded');
-  }
-
-  function checkReadyState() {
-    if (document.readyState === 'complete') {
-      document.stopObserving('readystatechange', checkReadyState);
-      fireContentLoadedEvent();
-    }
-  }
-
-  function pollDoScroll() {
-    try { document.documentElement.doScroll('left'); }
-    catch(e) {
-      timer = pollDoScroll.defer();
-      return;
-    }
-    fireContentLoadedEvent();
-  }
-
-  if (document.addEventListener) {
-    document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
-  } else {
-    document.observe('readystatechange', checkReadyState);
-    if (window == top)
-      timer = pollDoScroll.defer();
-  }
-
-  Event.observe(window, 'load', fireContentLoadedEvent);
-})();
-
-Element.addMethods();
-
-/*------------------------------- DEPRECATED -------------------------------*/
-
-Hash.toQueryString = Object.toQueryString;
-
-var Toggle = { display: Element.toggle };
-
-Element.Methods.childOf = Element.Methods.descendantOf;
-
-var Insertion = {
-  Before: function(element, content) {
-    return Element.insert(element, {before:content});
-  },
-
-  Top: function(element, content) {
-    return Element.insert(element, {top:content});
-  },
-
-  Bottom: function(element, content) {
-    return Element.insert(element, {bottom:content});
-  },
-
-  After: function(element, content) {
-    return Element.insert(element, {after:content});
-  }
-};
-
-var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
-
-var Position = {
-  includeScrollOffsets: false,
-
-  prepare: function() {
-    this.deltaX =  window.pageXOffset
-                || document.documentElement.scrollLeft
-                || document.body.scrollLeft
-                || 0;
-    this.deltaY =  window.pageYOffset
-                || document.documentElement.scrollTop
-                || document.body.scrollTop
-                || 0;
-  },
-
-  within: function(element, x, y) {
-    if (this.includeScrollOffsets)
-      return this.withinIncludingScrolloffsets(element, x, y);
-    this.xcomp = x;
-    this.ycomp = y;
-    this.offset = Element.cumulativeOffset(element);
-
-    return (y >= this.offset[1] &&
-            y <  this.offset[1] + element.offsetHeight &&
-            x >= this.offset[0] &&
-            x <  this.offset[0] + element.offsetWidth);
-  },
-
-  withinIncludingScrolloffsets: function(element, x, y) {
-    var offsetcache = Element.cumulativeScrollOffset(element);
-
-    this.xcomp = x + offsetcache[0] - this.deltaX;
-    this.ycomp = y + offsetcache[1] - this.deltaY;
-    this.offset = Element.cumulativeOffset(element);
-
-    return (this.ycomp >= this.offset[1] &&
-            this.ycomp <  this.offset[1] + element.offsetHeight &&
-            this.xcomp >= this.offset[0] &&
-            this.xcomp <  this.offset[0] + element.offsetWidth);
-  },
-
-  overlap: function(mode, element) {
-    if (!mode) return 0;
-    if (mode == 'vertical')
-      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
-        element.offsetHeight;
-    if (mode == 'horizontal')
-      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
-        element.offsetWidth;
-  },
-
-
-  cumulativeOffset: Element.Methods.cumulativeOffset,
-
-  positionedOffset: Element.Methods.positionedOffset,
-
-  absolutize: function(element) {
-    Position.prepare();
-    return Element.absolutize(element);
-  },
-
-  relativize: function(element) {
-    Position.prepare();
-    return Element.relativize(element);
-  },
-
-  realOffset: Element.Methods.cumulativeScrollOffset,
-
-  offsetParent: Element.Methods.getOffsetParent,
-
-  page: Element.Methods.viewportOffset,
-
-  clone: function(source, target, options) {
-    options = options || { };
-    return Element.clonePosition(target, source, options);
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
-  function iter(name) {
-    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
-  }
-
-  instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
-  function(element, className) {
-    className = className.toString().strip();
-    var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
-    return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
-  } : function(element, className) {
-    className = className.toString().strip();
-    var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
-    if (!classNames && !className) return elements;
-
-    var nodes = $(element).getElementsByTagName('*');
-    className = ' ' + className + ' ';
-
-    for (var i = 0, child, cn; child = nodes[i]; i++) {
-      if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
-          (classNames && classNames.all(function(name) {
-            return !name.toString().blank() && cn.include(' ' + name + ' ');
-          }))))
-        elements.push(Element.extend(child));
-    }
-    return elements;
-  };
-
-  return function(className, parentElement) {
-    return $(parentElement || document.body).getElementsByClassName(className);
-  };
-}(Element.Methods);
-
-/*--------------------------------------------------------------------------*/
-
-Element.ClassNames = Class.create();
-Element.ClassNames.prototype = {
-  initialize: function(element) {
-    this.element = $(element);
-  },
-
-  _each: function(iterator) {
-    this.element.className.split(/\s+/).select(function(name) {
-      return name.length > 0;
-    })._each(iterator);
-  },
-
-  set: function(className) {
-    this.element.className = className;
-  },
-
-  add: function(classNameToAdd) {
-    if (this.include(classNameToAdd)) return;
-    this.set($A(this).concat(classNameToAdd).join(' '));
-  },
-
-  remove: function(classNameToRemove) {
-    if (!this.include(classNameToRemove)) return;
-    this.set($A(this).without(classNameToRemove).join(' '));
-  },
-
-  toString: function() {
-    return $A(this).join(' ');
-  }
-};
-
-Object.extend(Element.ClassNames.prototype, Enumerable);
-
-/*--------------------------------------------------------------------------*/
diff --git a/trunk/activemq-web-demo/src/main/webapp/portfolio/portfolio.html b/trunk/activemq-web-demo/src/main/webapp/portfolio/portfolio.html
deleted file mode 100644
index 97023f5..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/portfolio/portfolio.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-<title>My Portfolio</title>
-<link rel="stylesheet" type="text/css" href="../style.css"></link>
-<script type="text/javascript" src="../amq/amq.js"></script>
-<script type="text/javascript">amq.uri='../amq';</script>
-<script type="text/javascript" src="portfolio.js"></script>
-<style>
-      .stocks                { border: 1 solid black; }
-      .stocks td, .stocks th { width: 200; text-align: right; }
-      .stocks .up            { background-color: #9f9; }
-      .stocks .down          { background-color: #f99; }
-    </style>
-</head>
-<body>
-
-<h1>My Portfolio</h1>
-
-<p>This example displays an example stock portfolio. In a real system
-this page would be generated dynamically based on the users current
-stock portfolio</p>
-
-<table class="stocks">
- <tr>
-  <th>Stock</th>
-  <th>Description</th>
-  <th>Amount</th>
-  <th>Price</th>
-  <th>Value</th>
-  <th>Cost</th>
-  <th>P & L</th>
- </tr>
- <tr id="IBMW">
-  <td>IBMW</td>
-  <td>IBM Stock</td>
-  <td id="amount">1000</td>
-  <td id="price"></td>
-  <td id="value"></td>
-  <td id="cost">19000</td>
-  <td id="pl"></td>
- </tr>
- <tr id="MSFT">
-  <td>MSFT</td>
-  <td>Microsoft</td>
-  <td id="amount">6000</td>
-  <td id="price"></td>
-  <td id="value"></td>
-  <td id="cost">22000</td>
-  <td id="pl"></td>
- </tr>
- <tr id="BEAS">
-  <td>BEAS</td>
-  <td>BEA Stock</td>
-  <td id="amount">1100</td>
-  <td id="price"></td>
-  <td id="value"></td>
-  <td id="cost">12342</td>
-  <td id="pl"></td>
- </tr>
- <tr id="SUNW">
-  <td>SUNW</td>
-  <td>Sun Microsystems Inc</td>
-  <td id="amount">3000</td>
-  <td id="price"></td>
-  <td id="value"></td>
-  <td id="cost">7700</td>
-  <td id="pl"></td>
- </tr>
-</table>
-</body>
-</html>
diff --git a/trunk/activemq-web-demo/src/main/webapp/portfolio/portfolio.js b/trunk/activemq-web-demo/src/main/webapp/portfolio/portfolio.js
deleted file mode 100644
index 8abe6f4..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/portfolio/portfolio.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.
- */
-
-var priceHandler = 
-{
-  _price: function(message) 
-  {
-    if (message != null) {
-		
-      var price = parseFloat(message.getAttribute('bid'))
-      var symbol = message.getAttribute('stock')
-      var movement = message.getAttribute('movement')
-      if (movement == null) {
-	        movement = 'up'
-      }
-	    
-      var row = document.getElementById(symbol)
-      if (row) {
-		    // perform portfolio calculations
-		    var value = asFloat(find(row, 'amount')) * price
-		    var pl = value - asFloat(find(row, 'cost'))
-		    
-		    // now lets update the HTML DOM
-		    find(row, 'price').innerHTML = fixedDigits(price, 2)
-		    find(row, 'value').innerHTML = fixedDigits(value, 2)
-		    find(row, 'pl').innerHTML    = fixedDigits(pl, 2)
-		    find(row, 'price').className = movement
-		    find(row, 'pl').className    = pl >= 0 ? 'up' : 'down'
-      }
-    }
-  }
-};
-
-
-function portfolioPoll(first)
-{
-   if (first)
-   {
-     amq.addListener('stocks','topic://STOCKS.*',priceHandler._price);
-   }
-}
-
-amq.addPollHandler(portfolioPoll);
-
-
-/// -----------------
-// Original code by Joe Walnes
-// -----------------
-
-/*** Convenience methods, added as mixins to standard classes (object prototypes) ***/
-
-/**
- * Return number as fixed number of digits. 
- */
-function fixedDigits(t, digits) {
-    return (t.toFixed) ? t.toFixed(digits) : this
-}
-
-/** 
- * Find direct child of an element, by id. 
- */
-function find(t, id) {
-    for (i = 0; i < t.childNodes.length; i++) {
-        var child = t.childNodes[i]
-        if (child.id == id) {
-            return child
-        }
-    }
-    return null
-}
-
-/**
- * Return the text contents of an element as a floating point number. 
- */
-function asFloat(t) {
-    return parseFloat(t.innerHTML)
-}
diff --git a/trunk/activemq-web-demo/src/main/webapp/sandbox/index.html b/trunk/activemq-web-demo/src/main/webapp/sandbox/index.html
deleted file mode 100644
index b682214..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/sandbox/index.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-<title>Sandbox</title>
-<link rel="stylesheet" type="text/css" href="../style.css"></link>
-</head>
-<body>
-
-<h1>Sandbox</h1>
-
-<p>This area contains the old HTML and JavaScript demos. We've now
-migrated to <a href="http://openrico.org/">OpenRico</a> instead to reuse
-an off the shelf Ajax library.</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.html b/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.html
deleted file mode 100755
index 4ce1e9d..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
-    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.
--->
-<html>
-  <head>
-    <title>My Portfolio</title>
-    <link rel="stylesheet" href="style.css" type="text/css">
-    <style>
-      .stocks                { border: 1 solid black; }
-      .stocks td, .stocks th { width: 200; text-align: right; }
-      .stocks .up            { background-color: #9f9; }
-      .stocks .down          { background-color: #f99; }
-    </style>
-  </head>
-  <body onload="subscribe()">
-
-    <script src="prototype.js" language="JavaScript1.2"></script>
-    <script src="portfolio2.js" language="JavaScript1.2"></script>
-
-    <h1>My Portfolio</h1>
-
-    <p>
-      This example displays an example stock portfolio.
-      In a real system this page would be generated dynamically based on the
-      users current stock portfolio
-    </p>
-
-    <table class="stocks">
-      <tr>
-        <th>Stock</th>
-        <th>Description</th>
-        <th>Amount</th>
-        <th>Price</th>
-        <th>Value</th>
-        <th>Cost</th>
-        <th>P & L</th>
-      </tr>
-      <tr id="IBMW">
-        <td>IBMW</td>
-        <td>IBM Stock</td>
-        <td id="amount">1000</td>
-        <td id="price"></td>
-        <td id="value"></td>
-        <td id="cost">19000</td>
-        <td id="pl"></td>
-      </tr>
-      <tr id="MSFT">
-        <td>MSFT</td>
-        <td>Microsoft</td>
-        <td id="amount">6000</td>
-        <td id="price"></td>
-        <td id="value"></td>
-        <td id="cost">22000</td>
-        <td id="pl"></td>
-      </tr>
-      <tr id="BEAS">
-        <td>BEAS</td>
-        <td>BEA Stock</td>
-        <td id="amount">1100</td>
-        <td id="price"></td>
-        <td id="value"></td>
-        <td id="cost">12342</td>
-        <td id="pl"></td>
-      </tr>
-      <tr id="SUNW">
-        <td>SUNW</td>
-        <td>Sun Microsystems Inc</td>
-        <td id="amount">3000</td>
-        <td id="price"></td>
-        <td id="value"></td>
-        <td id="cost">7700</td>
-        <td id="pl"></td>
-      </tr>
-    </table>
-
-    <div id="stuff"></div>
-
-
-  </body>
-</html>
diff --git a/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.js b/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.js
deleted file mode 100755
index 5a74f8f..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.
- */
-
-// updates the portfolio row for a given message and symbol
-function updatePortfolioRow(message, destination) {
-
-    var priceMessage = message.documentElement
-
-    var price = parseFloat(priceMessage.getAttribute('bid'))
-    var symbol = priceMessage.getAttribute('stock')
-    var movement = priceMessage.getAttribute('movement')
-    if (movement == null) {
-        movement = 'up'
-    }
-
-    var row = document.getElementById(symbol)
-    
-    // perform portfolio calculations
-    var value = asFloat(find(row, 'amount')) * price
-    var pl = value - asFloat(find(row, 'cost'))
-    
-    // now lets update the HTML DOM
-    find(row, 'price').innerHTML = fixedDigits(price, 2)
-    find(row, 'value').innerHTML = fixedDigits(value, 2)
-    find(row, 'pl').innerHTML    = fixedDigits(pl, 2)
-    find(row, 'price').className = movement
-    find(row, 'pl').className    = pl >= 0 ? 'up' : 'down'
-}
-
-var connection = new Connection("jms/STOCKS/*")
-
-function subscribe() {
-    connection.addMessageListener(/^STOCKS\..*$/, updatePortfolioRow)
-}
-
diff --git a/trunk/activemq-web-demo/src/main/webapp/sandbox/util.js b/trunk/activemq-web-demo/src/main/webapp/sandbox/util.js
deleted file mode 100755
index 2d051e0..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/sandbox/util.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.
- */
-
-/// -----------------
-// Original code by Joe Walnes
-// -----------------
-
-/*** Convenience methods, added as mixins to standard classes (object prototypes) ***/
-
-/**
- * Return number as fixed number of digits. 
- */
-//Number.prototype.fixedDigits = function(digits) {
-function fixedDigits(t, digits) {
-    return (t.toFixed) ? t.toFixed(digits) : this
-}
-
-/** 
- * Find direct child of an element, by id. 
- */
-// Element.prototype.find = function(id) {
-function find(t, id) {
-    for (i = 0; i < t.childNodes.length; i++) {
-        var child = t.childNodes[i]
-        if (child.id == id) {
-            return child
-        }
-    }
-    return null
-}
-
-/**
- * Return the text contents of an element as a floating point number. 
- */
-//Element.prototype.asFloat = function() {
-function asFloat(t) {
-    return parseFloat(t.innerHTML)
-}
diff --git a/trunk/activemq-web-demo/src/main/webapp/sandbox/webmq.js b/trunk/activemq-web-demo/src/main/webapp/sandbox/webmq.js
deleted file mode 100755
index 6b0bc3d..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/sandbox/webmq.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 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.
- */
-
-// -----------------
-// Original code by Joe Walnes
-// -----------------
-
-function Connection(webmqUrl, id) {
-    this.messageListeners = new Array()
-    this.webmqUrl = webmqUrl
-    if (id == null) {
-        // TODO use secure random id generation
-        id = Math.round(Math.random() * 100000000)
-    }
-    this.id = id
-    // TODO don't start anything until document has finished loading
-    var http = this.createHttpControl()
-    this.getNextMessageAndLoop(webmqUrl, id, http)
-}
-
-Connection.prototype.getNextMessageAndLoop = function(webmqUrl, id, http) {
-    http.open("GET", webmqUrl + "?id=" + id + "&xml=true", true)
-    var connection = this
-    http.onreadystatechange = function() {     
-        if (http.readyState == 4) {
-            var ok
-            try {
-                ok = http.status && http.status == 200
-            } 
-            catch (e) {
-                ok = false // sometimes accessing the http.status fields causes errors in firefox. dunno why. -joe
-            }
-            if (ok) {
-                connection.processIncomingMessage(http)
-            }
-            // why do we have to create a new instance?
-            // this is not required on firefox but is on mozilla
-            //http.abort()
-            http = connection.createHttpControl()
-            connection.getNextMessageAndLoop(webmqUrl, id, http)
-        }
-    }
-    http.send(null)
-}
-
-Connection.prototype.sendMessage = function(destination, message) {
-    // TODO should post via body rather than URL
-    // TODO specify destination in message
-    var http = this.createHttpControl()
-    http.open("POST", this.webmqUrl + "?id=" + this.id + "&body=" + message, true)
-    http.send(null)
-}
-
-Connection.prototype.processIncomingMessage = function(http) {
-    var destination = http.getResponseHeader("destination")
-    var message = http.responseXML
-    if (message == null) {
-        message = http.responseText
-    }
-    //alert(message.responseText)
-    for (var j = 0; j < this.messageListeners.length; j++) {
-        var registration = this.messageListeners[j]
-        if (registration.matcher(destination)) {
-            registration.messageListener(message, destination)
-        }
-    }
-}
-
-Connection.prototype.addMessageListener = function(matcher, messageListener) {
-    var wrappedMatcher
-    if (matcher.constructor == RegExp) {
-        wrappedMatcher = function(destination) { 
-            return matcher.test(destination)
-        }
-    } 
-    else if (matcher.constructor == String) {
-        wrappedMatcher = function(destination) { 
-            return matcher == destination
-        }
-    } 
-    else {
-        wrappedMatcher = matcher
-    }
-    this.messageListeners[this.messageListeners.length] = { matcher: wrappedMatcher, messageListener: messageListener }
-}
-
-Connection.prototype.createHttpControl = function() {
-    // for details on using XMLHttpRequest see
-    // http://webfx.eae.net/dhtml/xmlextras/xmlextras.html
-   try {
-      if (window.XMLHttpRequest) {
-         var req = new XMLHttpRequest()
-
-         // some older versions of Moz did not support the readyState property
-         // and the onreadystate event so we patch it!
-         if (req.readyState == null) {
-            req.readyState = 1
-            req.addEventListener("load", function () {
-               req.readyState = 4
-               if (typeof req.onreadystatechange == "function") {
-                  req.onreadystatechange()
-               }
-            }, false)
-         }
-
-         return req
-      }
-      if (window.ActiveXObject) {
-         return new ActiveXObject(this.getControlPrefix() + ".XmlHttp")
-      }
-   }
-   catch (ex) {}
-   // fell through
-   throw new Error("Your browser does not support XmlHttp objects")
-}
-
-Connection.prototype.getControlPrefix = function() {
-   if (this.prefix) {
-      return this.prefix
-   }
-
-   var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"]
-   var o, o2
-   for (var i = 0; i < prefixes.length; i++) {
-      try {
-         // try to create the objects
-         o = new ActiveXObject(prefixes[i] + ".XmlHttp")
-         o2 = new ActiveXObject(prefixes[i] + ".XmlDom")
-         return this.prefix = prefixes[i]
-      }
-      catch (ex) {}
-   }
-   throw new Error("Could not find an installed XML parser")
-}
-
diff --git a/trunk/activemq-web-demo/src/main/webapp/send.html b/trunk/activemq-web-demo/src/main/webapp/send.html
deleted file mode 100755
index c45c413..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/send.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-    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.
--->
-<html>
-<head>
-  <title>Send a JMS Message</title>
-  <link rel="stylesheet" href="style.css" type="text/css">
-</head>
-
-<body>
-<h1>Send a JMS Message</h1>
-
-<form action="message/FOO/BAR" method="post">
-  <p>
-    <label for="destination">Destination name</label>
-    <input type="text" name="destination" value="FOO.BAR"/>
-  </p>
-  <p>
-    <label for="type">Destination Type: </label>
-    <select name="type">
-      <option selected value="queue">Queue</option>
-      <option type" value="topic">Topic</option>
-   </select>
-  </p>
-  <p>
-    <textarea name="body" rows="30" cols="80">
-Enter some text here for the message body...
-    </textarea>
-  </p>
-  <p>
-    <input type="submit" value="Send"/>
-    <input type="reset"/>
-  </p>
-</form>
-
-</body>
-</html>
diff --git a/trunk/activemq-web-demo/src/main/webapp/style.css b/trunk/activemq-web-demo/src/main/webapp/style.css
deleted file mode 100755
index 5d4f632..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/style.css
+++ /dev/null
@@ -1,440 +0,0 @@
-/**
- * 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.
- */
-body th {
-  font-family: Verdana, Helvetica, Arial, sans-serif;
-  margin: 0;
-}
-
-div {
-  line-height: 1.5em;
-}
-
-a {
-  color: #008800;
-  text-decoration: none;
-  font-weight: bold;
-}
-
-table, th, td {
-	border: none;
-}
-
-.a td {
- background: #ddd;
- color: #000;
- }
-
-.b td {
- background: #efefef;
- color: #000;
- }
-
-
-.navLink a {
-  font-weight: normal;
-}
-
-.navLink {
-  margin-left: 5px;
-}
-
-.navLink:first-line {
-  margin-left: -5px;
-}
-
-
-a:link.selfref, a:visited.selfref {
-}
-
-a:link, a:visited {
-}
-
-a:active, a:hover {
-  text-decoration: underline;
-}
-
-a.plain:active, a.plain:hover {
-  text-decoration: none;
-}
-
-.sectionTitle a {
-  text-decoration: underline;
-}
-.subsectionTitle a {
-  text-decoration: underline;
-}
-
-span.highlight {
-  font-weight: bold;
-  color: #990000;
-}
-
-#layout {
-  margin: 0px;
-  padding: 0px;
-}
-
-#banner {
-  padding: 8px;
-}
-
-#breadcrumbs {
-  border-top: 1px solid #009900;
-  padding-left: 12px;
-  padding-right: 12px;
-  padding-top: 2px;
-  padding-bottom: 2px;
-  font-size: x-small;
-}
-
-#breadcrumbs td {
-  font-size: x-small;
-}
-
-#breadcrumbs a {
-  font-weight: bold;
-}
-
-#layout {
-  border-top: 1px solid #009900;
-  padding: 0px;
-  margin: 0px;
-
-}
-
-.navSection {
-  background-color: #ffffff;
-  border: 1px solid #999999;
-  border-top: none;
-  padding: 0px;
-  margin-bottom: 8px;
-  font-size: small;
-}
-
-.navSection a {
-  font-weight: normal;
-}
-
-.navSectionHead {
-  border-top: 1px solid #999999;
-  border-bottom: 1px solid #999999;
-  color: #555555;
-  padding: 4px;
-  margin-left: 0px;
-  margin-right: 0px;
-  background-color: #eeeeee;
-  font-weight: bold;
-  font-size: x-small;
-}
-
-.navLink {
-  padding-top: 2px;
-  padding-bottom: 2px;
-  padding-left: 14px;
-  font-size: small;
-}
-
-.section {
-  padding-bottom: 16px;
-}
-
-.sectionTitle, h1 {
-  padding: 4px;
-  border: 1px solid #aaaaaa;
-  color: #007700;
-  font-size: x-large;
-  background-color: #dddddd;
-}
-
-h1 {
-  margin: 0px;
-  margin-bottom: .2em;
-}
-
-.subsection {
-  padding-left: 20px;
-  margin-top: 10px;
-  margin-bottom: 10px;
-}
-
-body:first-child {
-  padding-top: 0px;
-}
-
-.subsectionTitle, h2 {
-  margin-top: 8px;
-  margin-bottom: 8px;
-  padding: 6px;
-/*
-  border-left: 1px solid #999999;
-  border-bottom: 1px solid #999999;
-  border: 1px solid #999999;
-*/
-  border-top: 1px solid #dddddd;
-  border-bottom: 1px solid #dddddd;
-  border-left: 2px solid #999999;
-  border-right: 2px solid #999999;
-  color: #007700;
-  background-color: #eeeeee;
-  font-weight: normal;
-  font-size: larger;
-}
-
-.sectionTitle a {
-  font-weight: normal;
-}
-
-.subsectionTitle a {
-  font-weight: normal;
-}
-
-.subsubsection {
-  padding-left: 30px;
-}
-
-.subsubsectionTitle, h3, .blogheading {
-  font-weight: bold;
-  /*background-color: #eeeeee;*/
-  border: 1px solid #cccccc;
-  padding: .2em;
-}
-
-
-p {
-  line-height: 1.8em;
-  /*padding-left: 20px;*/
-  padding-right: 20px;
-}
-
-blockquote p {
-  padding-left: 0px;
-  padding-right: 0px;
-}
-
-ul {
-  padding-left: 1.5em;
-}
-
-li {
-  margin-right: 15%;
-  line-height: 1.6em;
-}
-
-#leftColumn {
-  border-right: 1px solid #cccccc;
-  background-color: #ffffff;
-  padding: 12px;
-  font-size: small;
-}
-
-#extraColumn {
-  padding: 12px;
-}
-
-#navBox {
-}
-
-#rightColumn {
-  padding: 12px;
-  border-right: 1px solid #cccccc;
-}
-
-#contentBox {
-
-}
-
-table.bodyTable, table.wikitable {
-  margin: 10px;
-  border-collapse: collapse;
-  border-spacing: 0pt;
-  background-color: #eeeeee;
-}
-
-#Content table.grid {
-  border: 1px solid #bbbbbb;
-}
-
-table.grid {
-  padding: 0px;
-  border-collapse: collapse;
-  border-spacing: 0pt;
-}
-
-table.grid th {
-  background-color: #eeeeee;
-  font-size: smaller;
-  padding: 4px;
-  border-bottom: 1px solid #bbbbbb;
-}
-
-table.grid td {
-  font-size: x-small;
-  border: 1px solid #bbbbbb;
-  padding: 3px;
-}
-
-table.bodyTable th, table.bodyTable td, table.wikitable th, table.wikitable td {
-  border: 1px solid #999999;
-  font-size: smaller;
-  padding: 4px;
-}
-
-
-table.bodyTable th, table.wikitable th {
-  text-align: left;
-  background-color: #dddddd;
-  border: 2px solid #999999;
-  padding: 4px;
-}
-
-.nobr
-  white-space: nowrap;
-}
-
-table.bodyTable td {
-  padding: 4px;
-}
-
-/*
-table.bodyTable th, table.wikitable th {
-  border-bottom: 2px solid #999999;
-}
-
-table.bodyTable tr.a {
-  background-color: #dedede;
-}
-
-table.bodyTable tr.b {
-  background-color: #efefef;
-}
-*/
-
-.source, .code {
-  padding: 12px;
-  margin: 12px;
-  border: 1px solid #007700;
-  border-left: 2px solid #007700;
-  border-right: 2px solid #007700;
-  color: #555555;
-}
-
-pre {
-  padding: 12px;
-}
-
-.java-keyword {
-  color: #009900;
-}
-
-.java-object {
-  color: #000099;
-}
-
-.java-quote {
-  color: #990000;
-}
-
-
-.source, .code pre {
-  margin: 0px;
-  margin-left: 8px;
-  padding: 0px;
-}
-
-#footer {
-  padding-left: 4px;
-  border-top: 1px solid #999999;
-  color: #888888;
-  font-size: x-small;
-}
-
-blockquote {
-  border-top: 1px solid #bbbbbb;
-  border-bottom: 1px solid #bbbbbb;
-  border-left: 3px solid #bbbbbb;
-  border-right: 3px solid #bbbbbb;
-  padding: 12px;
-  margin-left: 10%;
-  margin-right: 15%;
-  color: #666666;
-  background-color: white;
-  line-height: 1.5em;
-}
-
-input[type="text"] {
-  margin: 0px;
-  border: 1px solid #999999;
-  background-color: #dddddd;
-}
-
-input.required {
-  margin: 0px;
-  border: 1px solid #990000;
-}
-
-input {
-  border: 1px solid #999999;
-}
-
-textarea {
-  border: 1px solid #999999;
-}
-
-textarea.required {
-  border: 1px solid #990000;
-}
-
-label {
-  font-size: smaller;
-}
-
-label.required {
-  color: #990000;
-}
-
-.searchResults {
-  color: black;
-}
-
-.searchResults b {
-  color: #007700;
-}
-
-
-.linecomment { color: #bbbbbbb; }
-.blockcomment { color: #bbbbbbb; }
-.prepro { color: #0000BB; }
-.select {}
-.quote { color: #770000; }
-.category1 { color: #007700; }
-.category2 { color: #0000BB; }
-.category3 { color: #0000BB; }
-
-
-/* Portfolio demo */
-td.amount, td.price, td.value, td.pl, td.cost {
-    text-align: right
-}
-
-div.up {
-  color: black;
-}
-
-div.down {
-  color: red;
-}
-
diff --git a/trunk/activemq-web-demo/src/main/webapp/test/amq_test.html b/trunk/activemq-web-demo/src/main/webapp/test/amq_test.html
deleted file mode 100644
index 69a871e..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/test/amq_test.html
+++ /dev/null
@@ -1,311 +0,0 @@
-<!--
-  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.
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-  <title>AMQ test</title>
-  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-  <script src="assets/jsunittest.js" type="text/javascript"></script>
-
-  <script>
-  var org = org || {};
-  org.activemq = org.activemq || {};
-
-  org.activemq.AmqAdapter = {
-    // implement org.activemq.AmqAdapter API
-    init: function(options) {},
-    ajax: function(uri, options) {
-      ajaxRequests[ajaxRequests.length] = { uri:uri, options:options };
-    },
-    
-    // add additional functionality for testing.
-    ajaxRequests: [],
-    getRequests: function() {
-      return ajaxRequests;
-    },
-    reset: function() {
-      ajaxRequests=[];
-    }
-  };
-  </script>
-  <script src="../js/amq.js" type="text/javascript"></script>
-  
-  <link rel="stylesheet" href="assets/unittest.css" type="text/css" />
-</head>
-<body>
-
-<div id="content">
-
-  <div id="header">
-    <h1>AMQ tests</h1>
-    <p>
-      This file tests amq.js.
-    </p>
-  </div>
-
-  <!-- Log output (one per Runner, via {testLog: "testlog"} option)-->
-  <div id="testlog"></div>
-  
-  <!-- Put sample/test html here -->
-  <div id="sample">
-  </div>
-</div>
-
-<script type="text/javascript">
-  function createXmlFromString( xmlString ) {
-    // http://developer.taboca.com/cases/en/client-javascript-dom-parser/
-    // Mozilla and Netscape browsers
-    if (document.implementation.createDocument) {
-      var parser = new DOMParser()
-      response = parser.parseFromString( xmlString, "text/xml")
-    // MSIE
-    } else if (window.ActiveXObject) {
-      response = new ActiveXObject("Microsoft.XMLDOM")
-      response.async="false"
-      response.loadXML( xmlString )
-    }
-    return response;
-  }
-  
-// <![CDATA[
-  new Test.Unit.Runner({
-    setup: function() {
-      org.activemq.AmqAdapter.reset();
-      org.activemq.Amq.init({ uri: '../amq', timeout: 30 });
-    },
-    
-    teardown: function() {
-      org.activemq.Amq.endBatch();
-    },
-    
-    testMessagesAreSentToUrlDefinedInInit: function() { with( this ) {
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      var requests = org.activemq.AmqAdapter.getRequests();
-      assertEqual( 2, requests.length );
-      assertEqual( '../amq', requests[ 0 ].uri );
-      assertEqual( '../amq', requests[ 1 ].uri );
-    }},
-    
-    testFirstMessageIsAPoll: function() { with( this ) {
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      var requests = org.activemq.AmqAdapter.getRequests();
-      
-      assertEqual( 'get', requests[ 0 ].options.method );
-      assert( requests[ 0 ].options.data.match( /timeout=1&d=\d+&r=[\d.]+/ ) );
-    }},
-    
-    testPostIsSentIfNoBatchIsInProgress: function() { with( this ) {
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      var requests = org.activemq.AmqAdapter.getRequests();
-      
-      assertEqual( 2, requests.length );
-      assertEqual( 'post', requests[ 1 ].options.method );
-      assertEqual( 'destination=queue://test&message=<message>test</message>&type=send', requests[ 1 ].options.data );
-    }},
-    
-    testMessagesAreDeliveredInABatchIfAjaxRequestIsInProgressWhenSendMessageIsCalled: function() { with( this ) {
-      // use startBatch to indicate a previous message POST is currently in progress.
-      org.activemq.Amq.startBatch();
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      org.activemq.Amq.sendMessage( 'queue://test2', '<message>test2</message>' );
-      // endBatch is the callback once the previous POST finishes.  Triggers delivery of queued messages.
-      org.activemq.Amq.endBatch();
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      assertEqual( 2, requests.length );
-      assertEqual( 'post', requests[1].options.method );
-      assertEqual( "destination=queue://test&message=<message>test</message>&type=send&d1=queue://test2&m1=<message>test2</message>&t1=send", requests[1].options.data );
-    }},
-    
-    testAddListenerSendsListenMessage: function() { with( this ) {
-      org.activemq.Amq.addListener( 'client_id', 'topic://test', function(){} );
-      var requests = org.activemq.AmqAdapter.getRequests();
-      
-      assertEqual( 2, requests.length );
-      assertEqual( 'post', requests[1].options.method );
-      assertEqual( "destination=topic://test&message=client_id&type=listen", requests[1].options.data );
-    }},
-    
-    testAddListenerMayIncludeASelector: function() { with( this ) {
-      org.activemq.Amq.addListener( 'client_id', 'topic://test', function(){}, {selector:"identifier='ALPHA'"} );
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      assertEqual( 2, requests.length );
-      assertEqual( 'post', requests[1].options.method );
-      assertEqual( "destination=topic://test&message=client_id&type=listen", requests[1].options.data );
-      assertHashEqual( { selector: "identifier='ALPHA'" }, requests[1].options.headers );
-    }},
-    
-    testAllQueuedMessagesContainingHeadersAreDeliveredIndividuallyToPreventHeaderConflicts: function() { with( this ) {
-      org.activemq.Amq.startBatch();
-      org.activemq.Amq.addListener( 'client_id_1', 'topic://test1', function(){}, {selector:"identifier='ALPHA'"} );
-      org.activemq.Amq.addListener( 'client_id_2', 'topic://test2', function(){}, {selector:"identifier='BRAVO'"} );
-      
-      // simulate 1st post returning, which triggers 2nd post.
-      org.activemq.Amq.endBatch();
-      
-      // poll & first listen have been sent.
-      assertEqual( 2, org.activemq.AmqAdapter.getRequests().length );
-      
-      // second listen is still in the queue.
-      var queued = org.activemq.Amq.getMessageQueue();
-      assertEqual( 1, queued.length );
-      assertHashEqual( { selector: "identifier='BRAVO'" }, queued[ 0 ].headers );
-      assertHashEqual( { destination: 'topic://test2', message: 'client_id_2', messageType: 'listen' }, queued[ 0 ].message );
-      
-      // when first post returns, the second listen gets sent.
-      // this endBatch simulates that second post returning.
-      org.activemq.Amq.endBatch();
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      var queued = org.activemq.Amq.getMessageQueue();
-      
-      assertEqual( 3, requests.length );
-      assertEqual( 'post', requests[1].options.method );
-      assertEqual( "destination=topic://test1&message=client_id_1&type=listen", requests[1].options.data );
-      assertHashEqual( { selector: "identifier='ALPHA'" }, requests[1].options.headers );
-      
-      assertEqual( 'post', requests[2].options.method );
-      assertEqual( "destination=topic://test2&message=client_id_2&type=listen", requests[2].options.data );
-      assertHashEqual( { selector: "identifier='BRAVO'" }, requests[2].options.headers );
-      
-      assertEqual( 0, queued.length );
-    }},
-    
-    // Is this desired behavior?  Message order changes from that specified by the client.
-    testQueuedMessagesWithoutHeadersAreDeliveredInASinglePost: function() { with( this ) {
-      org.activemq.Amq.startBatch();
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      org.activemq.Amq.addListener( 'client_id_1', 'topic://test1', function(){}, {selector:"identifier='ALPHA'"} );
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      org.activemq.Amq.addListener( 'client_id_2', 'topic://test2', function(){}, {selector:"identifier='BRAVO'"} );
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      
-      // poll & all sendMessage calls go out first.
-      org.activemq.Amq.endBatch();
-      assertEqual( 2, org.activemq.AmqAdapter.getRequests().length );
-      assertEqual( 2, org.activemq.Amq.getMessageQueue().length );
-      
-      // first listen goes next.
-      org.activemq.Amq.endBatch();
-      assertEqual( 3, org.activemq.AmqAdapter.getRequests().length );
-      assertEqual( 1, org.activemq.Amq.getMessageQueue().length );
-      
-      // final listen goes out.
-      org.activemq.Amq.endBatch();
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      assertEqual( 4, requests.length );
-      assertEqual( 0, org.activemq.Amq.getMessageQueue().length );
-      
-      assertEqual( "destination=queue://test&message=<message>test</message>&type=send&d1=queue://test&m1=<message>test</message>&t1=send&d2=queue://test&m2=<message>test</message>&t2=send", requests[ 1 ].options.data );
-      assertHashEqual( {}, requests[ 1 ].options.headers );
-      
-      assertEqual( "destination=topic://test1&message=client_id_1&type=listen", requests[ 2 ].options.data );
-      assertEqual( "destination=topic://test2&message=client_id_2&type=listen", requests[ 3 ].options.data );
-      
-    }},
-    
-    testSelectorFromQueuedListenerIsNotAddedToLaterMessages: function() { with( this ) {
-      org.activemq.Amq.startBatch();
-      org.activemq.Amq.addListener( 'client_id_1', 'topic://test1', function(){}, {selector:"identifier='ALPHA'"} );
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      
-      // poll & listener go out first.
-      org.activemq.Amq.endBatch();
-      assertEqual( 2, org.activemq.AmqAdapter.getRequests().length );
-      assertEqual( 2, org.activemq.Amq.getMessageQueue().length );
-      
-      // 2 sendMessages go next.
-      org.activemq.Amq.endBatch();
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      assertEqual( 3, requests.length );
-      assertEqual( 0, org.activemq.Amq.getMessageQueue().length );
-      
-      assertEqual( "destination=topic://test1&message=client_id_1&type=listen", requests[ 1 ].options.data );
-      assertHashEqual( { selector: "identifier='ALPHA'" }, requests[ 1 ].options.headers );
-      assertEqual( "destination=queue://test&message=<message>test</message>&type=send&d1=queue://test&m1=<message>test</message>&t1=send", requests[ 2 ].options.data );
-      assertHashEqual( {}, requests[ 2 ].options.headers );
-    }},
-    
-    testAddListenerWithoutSelectorWillBeBatchedWithOtherMessages: function() { with( this ) {
-      org.activemq.Amq.startBatch();
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      org.activemq.Amq.addListener( 'client_id_1', 'topic://test1', function(){} );
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      org.activemq.Amq.addListener( 'client_id_2', 'topic://test2', function(){} );
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      
-      org.activemq.Amq.endBatch();
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      assertEqual( 2, requests.length );
-      assertEqual( 0, org.activemq.Amq.getMessageQueue().length );
-      assertEqual( "destination=queue://test&message=<message>test</message>&type=send&d1=topic://test1&m1=client_id_1&t1=listen&d2=queue://test&m2=<message>test</message>&t2=send&d3=topic://test2&m3=client_id_2&t3=listen&d4=queue://test&m4=<message>test</message>&t4=send", requests[ 1 ].options.data );
-    }},
-    
-    testRemoveListenerSendsUnlistenMessage: function() { with( this ) {
-      org.activemq.Amq.removeListener( 'client_id', 'topic://test' );
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      assertEqual( 2, requests.length );
-      assertEqual( 'post', requests[1].options.method );
-      assertEqual( "destination=topic://test&message=client_id&type=unlisten", requests[1].options.data );
-    }},
-    
-    testAddListenerCallbackIsCalledForReceivedMessages: function() { with( this ) {
-      // build an XML document like the one which the ajax implementers would pass to pollHandler
-      response = createXmlFromString( '<ajax-response><response id="client_id" destination="queue://test" >test message</response></ajax-response>' );
-      
-      // we'll expect the callback to set this value
-      var callbackValue;
-      
-      org.activemq.Amq.addListener( 'client_id', 'queue://test', function( msg ) { callbackValue = msg; } );
-      org.activemq.Amq.testPollHandler( response );
-      
-      assertEqual( 'test message', callbackValue.textContent );
-    }},
-    
-    testClientIdSpecifiedInInitIsAddedToAllAjaxRequests: function() { with( this ) {
-      // need to reset to remove the poll message sent when init() is called in setup().
-      org.activemq.AmqAdapter.reset();
-      org.activemq.Amq.init({ uri: '../amq', timeout: 30, clientId:'uniqueClientName' });
-      
-      org.activemq.Amq.addListener( 'id', 'queue://test', function(){} );
-      org.activemq.Amq.sendMessage( 'queue://test', '<message>test</message>' );
-      org.activemq.Amq.removeListener( 'id', 'topic://test' );      
-      org.activemq.Amq.endBatch();
-      
-      var requests = org.activemq.AmqAdapter.getRequests();
-      var clientNameRegex = /clientId=uniqueClientName/;
-      
-      assertEqual( 3, requests.length );
-      assertMatch( clientNameRegex, requests[0].options.data );
-      assertMatch( clientNameRegex, requests[1].options.data );
-      assertMatch( clientNameRegex, requests[2].options.data );
-      
-    }}
-    
-  }); 
-// ]]>
-</script>
-</body>
-</html>
diff --git a/trunk/activemq-web-demo/src/main/webapp/test/assets/README b/trunk/activemq-web-demo/src/main/webapp/test/assets/README
deleted file mode 100644
index 1426be6..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/test/assets/README
+++ /dev/null
@@ -1,4 +0,0 @@
-jsunittest.js from http://jsunittest.com/
-
-This directory is for core jsunittest files only! Put your unit test .html files up one level.
-You should be referencing files in public/javascripts/ in your test files. 
diff --git a/trunk/activemq-web-demo/src/main/webapp/test/assets/jsunittest.js b/trunk/activemq-web-demo/src/main/webapp/test/assets/jsunittest.js
deleted file mode 100644
index 202c896..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/test/assets/jsunittest.js
+++ /dev/null
@@ -1,1017 +0,0 @@
-/*  Jsunittest, version 0.7.3
- *  (c) 2008 Dr Nic Williams
- *
- *  Jsunittest is freely distributable under
- *  the terms of an MIT-style license.
- *  For details, see the web site: http://jsunittest.rubyforge.org
- *
- *--------------------------------------------------------------------------*/
-
-var JsUnitTest = {
-  Unit: {},
-  inspect: function(object) {
-    try {
-      if (typeof object == "undefined") return 'undefined';
-      if (object === null) return 'null';
-      if (typeof object == "string") {
-        var useDoubleQuotes = arguments[1];
-        var escapedString = this.gsub(object, /[\x00-\x1f\\]/, function(match) {
-          var character = String.specialChar[match[0]];
-          return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
-        });
-        if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
-        return "'" + escapedString.replace(/'/g, '\\\'') + "'";
-      };
-      return String(object);
-    } catch (e) {
-      if (e instanceof RangeError) return '...';
-      throw e;
-    }
-  },
-  $: function(element) {
-    if (arguments.length > 1) {
-      for (var i = 0, elements = [], length = arguments.length; i < length; i++)
-        elements.push(this.$(arguments[i]));
-      return elements;
-    }
-    if (typeof element == "string")
-      element = document.getElementById(element);
-    return element;
-  },
-  gsub: function(source, pattern, replacement) {
-    var result = '', match;
-    replacement = arguments.callee.prepareReplacement(replacement);
-
-    while (source.length > 0) {
-      if (match = source.match(pattern)) {
-        result += source.slice(0, match.index);
-        result += JsUnitTest.String.interpret(replacement(match));
-        source  = source.slice(match.index + match[0].length);
-      } else {
-        result += source, source = '';
-      }
-    }
-    return result;
-  },
-  scan: function(source, pattern, iterator) {
-    this.gsub(source, pattern, iterator);
-    return String(source);
-  },
-  escapeHTML: function(data) {
-    return data.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
-  },
-  arrayfromargs: function(args) {
-  	var myarray = new Array();
-  	var i;
-
-  	for (i=0;i<args.length;i++)
-  		myarray[i] = args[i];
-
-  	return myarray;
-  },
-  hashToSortedArray: function(hash) {
-    var results = [];
-    for (key in hash) {
-      results.push([key, hash[key]]);
-    }
-    return results.sort();
-  },
-  flattenArray: function(array) {
-    var results = arguments[1] || [];
-    for (var i=0; i < array.length; i++) {
-      var object = array[i];
-      if (object != null && typeof object == "object" &&
-        'splice' in object && 'join' in object) {
-          this.flattenArray(object, results);
-      } else {
-        results.push(object);
-      }
-    };
-    return results;
-  },
-  selectorMatch: function(expression, element) {
-    var tokens = [];
-    var patterns = {
-      // combinators must be listed first
-      // (and descendant needs to be last combinator)
-      laterSibling: /^\s*~\s*/,
-      child:        /^\s*>\s*/,
-      adjacent:     /^\s*\+\s*/,
-      descendant:   /^\s/,
-
-      // selectors follow
-      tagName:      /^\s*(\*|[\w\-]+)(\b|$)?/,
-      id:           /^#([\w\-\*]+)(\b|$)/,
-      className:    /^\.([\w\-\*]+)(\b|$)/,
-      pseudo:
-  /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
-      attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/,
-      attr:         /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
-    };
-
-    var assertions = {
-      tagName: function(element, matches) {
-        return matches[1].toUpperCase() == element.tagName.toUpperCase();
-      },
-
-      className: function(element, matches) {
-        return Element.hasClassName(element, matches[1]);
-      },
-
-      id: function(element, matches) {
-        return element.id === matches[1];
-      },
-
-      attrPresence: function(element, matches) {
-        return Element.hasAttribute(element, matches[1]);
-      },
-
-      attr: function(element, matches) {
-        var nodeValue = Element.readAttribute(element, matches[1]);
-        return nodeValue && operators[matches[2]](nodeValue, matches[5] || matches[6]);
-      }
-    };
-    var e = this.expression, ps = patterns, as = assertions;
-    var le, p, m;
-
-    while (e && le !== e && (/\S/).test(e)) {
-      le = e;
-      for (var i in ps) {
-        p = ps[i];
-        if (m = e.match(p)) {
-          // use the Selector.assertions methods unless the selector
-          // is too complex.
-          if (as[i]) {
-            tokens.push([i, Object.clone(m)]);
-            e = e.replace(m[0], '');
-          }
-        }
-      }
-    }
-
-    var match = true, name, matches;
-    for (var i = 0, token; token = tokens[i]; i++) {
-      name = token[0], matches = token[1];
-      if (!assertions[name](element, matches)) {
-        match = false; break;
-      }
-    }
-
-    return match;
-  },
-  toQueryParams: function(query, separator) {
-    var query = query || window.location.search;
-    var match = query.replace(/^\s+/, '').replace(/\s+$/, '').match(/([^?#]*)(#.*)?$/);
-    if (!match) return { };
-
-    var hash = {};
-    var parts = match[1].split(separator || '&');
-    for (var i=0; i < parts.length; i++) {
-      var pair = parts[i].split('=');
-      if (pair[0]) {
-        var key = decodeURIComponent(pair.shift());
-        var value = pair.length > 1 ? pair.join('=') : pair[0];
-        if (value != undefined) value = decodeURIComponent(value);
-
-        if (key in hash) {
-          var object = hash[key];
-          var isArray = object != null && typeof object == "object" &&
-            'splice' in object && 'join' in object
-          if (!isArray) hash[key] = [hash[key]];
-          hash[key].push(value);
-        }
-        else hash[key] = value;
-      }
-    };
-    return hash;
-  },
-
-  String: {
-    interpret: function(value) {
-      return value == null ? '' : String(value);
-    }
-  }
-};
-
-JsUnitTest.gsub.prepareReplacement = function(replacement) {
-  if (typeof replacement == "function") return replacement;
-  var template = new Template(replacement);
-  return function(match) { return template.evaluate(match) };
-};
-
-JsUnitTest.Version = '0.7.3';
-
-JsUnitTest.Template = function(template, pattern) {
-  this.template = template; //template.toString();
-  this.pattern = pattern || JsUnitTest.Template.Pattern;
-};
-
-JsUnitTest.Template.prototype.evaluate = function(object) {
-  if (typeof object.toTemplateReplacements == "function")
-    object = object.toTemplateReplacements();
-
-  return JsUnitTest.gsub(this.template, this.pattern, function(match) {
-    if (object == null) return '';
-
-    var before = match[1] || '';
-    if (before == '\\') return match[2];
-
-    var ctx = object, expr = match[3];
-    var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
-    match = pattern.exec(expr);
-    if (match == null) return before;
-
-    while (match != null) {
-      var comp = (match[1].indexOf('[]') === 0) ? match[2].gsub('\\\\]', ']') : match[1];
-      ctx = ctx[comp];
-      if (null == ctx || '' == match[3]) break;
-      expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
-      match = pattern.exec(expr);
-    }
-
-    return before + JsUnitTest.String.interpret(ctx);
-  });
-}
-
-JsUnitTest.Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
-JsUnitTest.Event = {};
-// written by Dean Edwards, 2005
-// with input from Tino Zijdel, Matthias Miller, Diego Perini
-// namespaced by Dr Nic Williams 2008
-
-// http://dean.edwards.name/weblog/2005/10/add-event/
-// http://dean.edwards.name/weblog/2005/10/add-event2/
-JsUnitTest.Event.addEvent = function(element, type, handler) {
-	if (element.addEventListener) {
-		element.addEventListener(type, handler, false);
-	} else {
-		// assign each event handler a unique ID
-		if (!handler.$$guid) handler.$$guid = JsUnitTest.Event.addEvent.guid++;
-		// create a hash table of event types for the element
-		if (!element.events) element.events = {};
-		// create a hash table of event handlers for each element/event pair
-		var handlers = element.events[type];
-		if (!handlers) {
-			handlers = element.events[type] = {};
-			// store the existing event handler (if there is one)
-			if (element["on" + type]) {
-				handlers[0] = element["on" + type];
-			}
-		}
-		// store the event handler in the hash table
-		handlers[handler.$$guid] = handler;
-		// assign a global event handler to do all the work
-		element["on" + type] = this.handleEvent;
-	}
-};
-// a counter used to create unique IDs
-JsUnitTest.Event.addEvent.guid = 1;
-
-JsUnitTest.Event.removeEvent = function(element, type, handler) {
-	if (element.removeEventListener) {
-		element.removeEventListener(type, handler, false);
-	} else {
-		// delete the event handler from the hash table
-		if (element.events && element.events[type]) {
-			delete element.events[type][handler.$$guid];
-		}
-	}
-};
-
-JsUnitTest.Event.handleEvent = function(event) {
-	var returnValue = true;
-	// grab the event object (IE uses a global event object)
-	event = event || JsUnitTest.Event.fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
-	// get a reference to the hash table of event handlers
-	var handlers = this.events[event.type];
-	// execute each event handler
-	for (var i in handlers) {
-		this.$$handleEvent = handlers[i];
-		if (this.$$handleEvent(event) === false) {
-			returnValue = false;
-		}
-	}
-	return returnValue;
-};
-
-JsUnitTest.Event.fixEvent = function(event) {
-	// add W3C standard event methods
-	event.preventDefault = this.fixEvent.preventDefault;
-	event.stopPropagation = this.fixEvent.stopPropagation;
-	return event;
-};
-JsUnitTest.Event.fixEvent.preventDefault = function() {
-	this.returnValue = false;
-};
-JsUnitTest.Event.fixEvent.stopPropagation = function() {
-	this.cancelBubble = true;
-};
-
-JsUnitTest.Unit.Logger = function(element) {
-  this.element = JsUnitTest.$(element);
-  if (this.element) this._createLogTable();
-};
-
-JsUnitTest.Unit.Logger.prototype.start = function(testName) {
-  if (!this.element) return;
-  var tbody = this.element.getElementsByTagName('tbody')[0];
-
-  var tr = document.createElement('tr');
-  var td;
-
-  //testname
-  td = document.createElement('td');
-  td.appendChild(document.createTextNode(testName));
-  tr.appendChild(td)
-
-  tr.appendChild(document.createElement('td'));//status
-  tr.appendChild(document.createElement('td'));//message
-
-  tbody.appendChild(tr);
-};
-
-JsUnitTest.Unit.Logger.prototype.setStatus = function(status) {
-  var logline = this.getLastLogLine();
-  logline.className = status;
-  var statusCell = logline.getElementsByTagName('td')[1];
-  statusCell.appendChild(document.createTextNode(status));
-};
-
-JsUnitTest.Unit.Logger.prototype.finish = function(status, summary) {
-  if (!this.element) return;
-  this.setStatus(status);
-  this.message(summary);
-};
-
-JsUnitTest.Unit.Logger.prototype.message = function(message) {
-  if (!this.element) return;
-  var cell = this.getMessageCell();
-
-  // cell.appendChild(document.createTextNode(this._toHTML(message)));
-  cell.innerHTML = this._toHTML(message);
-};
-
-JsUnitTest.Unit.Logger.prototype.summary = function(summary) {
-  if (!this.element) return;
-  var div = this.element.getElementsByTagName('div')[0];
-  div.innerHTML = this._toHTML(summary);
-};
-
-JsUnitTest.Unit.Logger.prototype.getLastLogLine = function() {
-  var tbody = this.element.getElementsByTagName('tbody')[0];
-  var loglines = tbody.getElementsByTagName('tr');
-  return loglines[loglines.length - 1];
-};
-
-JsUnitTest.Unit.Logger.prototype.getMessageCell = function() {
-  var logline = this.getLastLogLine();
-  return logline.getElementsByTagName('td')[2];
-};
-
-JsUnitTest.Unit.Logger.prototype._createLogTable = function() {
-  var html = '<div class="logsummary">running...</div>' +
-  '<table class="logtable">' +
-  '<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' +
-  '<tbody class="loglines"></tbody>' +
-  '</table>';
-  this.element.innerHTML = html;
-};
-
-JsUnitTest.Unit.Logger.prototype.appendActionButtons = function(actions) {
-  // actions = $H(actions);
-  // if (!actions.any()) return;
-  // var div = new Element("div", {className: 'action_buttons'});
-  // actions.inject(div, function(container, action) {
-  //   var button = new Element("input").setValue(action.key).observe("click", action.value);
-  //   button.type = "button";
-  //   return container.insert(button);
-  // });
-  // this.getMessageCell().insert(div);
-};
-
-JsUnitTest.Unit.Logger.prototype._toHTML = function(txt) {
-  return JsUnitTest.escapeHTML(txt).replace(/\n/g,"<br/>");
-};
-JsUnitTest.Unit.MessageTemplate = function(string) {
-  var parts = [];
-  var str = JsUnitTest.scan((string || ''), /(?=[^\\])\?|(?:\\\?|[^\?])+/, function(part) {
-    parts.push(part[0]);
-  });
-  this.parts = parts;
-};
-
-JsUnitTest.Unit.MessageTemplate.prototype.evaluate = function(params) {
-  var results = [];
-  for (var i=0; i < this.parts.length; i++) {
-    var part = this.parts[i];
-    var result = (part == '?') ? JsUnitTest.inspect(params.shift()) : part.replace(/\\\?/, '?');
-    results.push(result);
-  };
-  return results.join('');
-};
-// A generic function for performming AJAX requests
-// It takes one argument, which is an object that contains a set of options
-// All of which are outline in the comments, below
-// From John Resig's book Pro JavaScript Techniques
-// published by Apress, 2006-8
-JsUnitTest.ajax = function( options ) {
-
-    // Load the options object with defaults, if no
-    // values were provided by the user
-    options = {
-        // The type of HTTP Request
-        type: options.type || "POST",
-
-        // The URL the request will be made to
-        url: options.url || "",
-
-        // How long to wait before considering the request to be a timeout
-        timeout: options.timeout || 5000,
-
-        // Functions to call when the request fails, succeeds,
-        // or completes (either fail or succeed)
-        onComplete: options.onComplete || function(){},
-        onError: options.onError || function(){},
-        onSuccess: options.onSuccess || function(){},
-
-        // The data type that'll be returned from the server
-        // the default is simply to determine what data was returned from the
-        // and act accordingly.
-        data: options.data || ""
-    };
-
-    // Create the request object
-    var xml = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest();
-
-    // Open the asynchronous POST request
-    xml.open(options.type, options.url, true);
-
-    // We're going to wait for a request for 5 seconds, before giving up
-    var timeoutLength = 5000;
-
-    // Keep track of when the request has been succesfully completed
-    var requestDone = false;
-
-    // Initalize a callback which will fire 5 seconds from now, cancelling
-    // the request (if it has not already occurred).
-    setTimeout(function(){
-         requestDone = true;
-    }, timeoutLength);
-
-    // Watch for when the state of the document gets updated
-    xml.onreadystatechange = function(){
-        // Wait until the data is fully loaded,
-        // and make sure that the request hasn't already timed out
-        if ( xml.readyState == 4 && !requestDone ) {
-
-            // Check to see if the request was successful
-            if ( httpSuccess( xml ) ) {
-
-                // Execute the success callback with the data returned from the server
-                options.onSuccess( httpData( xml, options.type ) );
-
-            // Otherwise, an error occurred, so execute the error callback
-            } else {
-                options.onError();
-            }
-
-            // Call the completion callback
-            options.onComplete();
-
-            // Clean up after ourselves, to avoid memory leaks
-            xml = null;
-        }
-    };
-
-    // Establish the connection to the server
-    xml.send(null);
-
-    // Determine the success of the HTTP response
-    function httpSuccess(r) {
-        try {
-            // If no server status is provided, and we're actually
-            // requesting a local file, then it was successful
-            return !r.status && location.protocol == "file:" ||
-
-                // Any status in the 200 range is good
-                ( r.status >= 200 && r.status < 300 ) ||
-
-                // Successful if the document has not been modified
-                r.status == 304 ||
-
-                // Safari returns an empty status if the file has not been modified
-                navigator.userAgent.indexOf("Safari") >= 0 && typeof r.status == "undefined";
-        } catch(e){}
-
-        // If checking the status failed, then assume that the request failed too
-        return false;
-    }
-
-    // Extract the correct data from the HTTP response
-    function httpData(r,type) {
-        // Get the content-type header
-        var ct = r.getResponseHeader("content-type");
-
-        // If no default type was provided, determine if some
-        // form of XML was returned from the server
-        var data = !type && ct && ct.indexOf("xml") >= 0;
-
-        // Get the XML Document object if XML was returned from
-        // the server, otherwise return the text contents returned by the server
-        data = type == "xml" || data ? r.responseXML : r.responseText;
-
-        // If the specified type is "script", execute the returned text
-        // response as if it was JavaScript
-        if ( type == "script" )
-            eval.call( window, data );
-
-        // Return the response data (either an XML Document or a text string)
-        return data;
-    }
-
-};
-JsUnitTest.Unit.Assertions = {
-  buildMessage: function(message, template) {
-    var args = JsUnitTest.arrayfromargs(arguments).slice(2);
-    return (message ? message + '\n' : '') +
-      new JsUnitTest.Unit.MessageTemplate(template).evaluate(args);
-  },
-
-  flunk: function(message) {
-    this.assertBlock(message || 'Flunked', function() { return false });
-  },
-
-  assertBlock: function(message, block) {
-    try {
-      block.call(this) ? this.pass() : this.fail(message);
-    } catch(e) { this.error(e) }
-  },
-
-  assert: function(expression, message) {
-    message = this.buildMessage(message || 'assert', 'got <?>', expression);
-    this.assertBlock(message, function() { return expression });
-  },
-
-  assertEqual: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertEqual', 'expected <?>, actual: <?>', expected, actual);
-    this.assertBlock(message, function() { return expected == actual });
-  },
-
-  assertNotEqual: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertNotEqual', 'expected <?>, actual: <?>', expected, actual);
-    this.assertBlock(message, function() { return expected != actual });
-  },
-
-  assertEnumEqual: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertEnumEqual', 'expected <?>, actual: <?>', expected, actual);
-    var expected_array = JsUnitTest.flattenArray(expected);
-    var actual_array   = JsUnitTest.flattenArray(actual);
-    this.assertBlock(message, function() {
-      if (expected_array.length == actual_array.length) {
-        for (var i=0; i < expected_array.length; i++) {
-          if (expected_array[i] != actual_array[i]) return false;
-        };
-        return true;
-      }
-      return false;
-    });
-  },
-
-  assertEnumNotEqual: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertEnumNotEqual', '<?> was the same as <?>', expected, actual);
-    var expected_array = JsUnitTest.flattenArray(expected);
-    var actual_array   = JsUnitTest.flattenArray(actual);
-    this.assertBlock(message, function() {
-      if (expected_array.length == actual_array.length) {
-        for (var i=0; i < expected_array.length; i++) {
-          if (expected_array[i] != actual_array[i]) return true;
-        };
-        return false;
-      }
-      return true;
-    });
-  },
-
-  assertHashEqual: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertHashEqual', 'expected <?>, actual: <?>', expected, actual);
-    var expected_array = JsUnitTest.flattenArray(JsUnitTest.hashToSortedArray(expected));
-    var actual_array   = JsUnitTest.flattenArray(JsUnitTest.hashToSortedArray(actual));
-    var block = function() {
-      if (expected_array.length == actual_array.length) {
-        for (var i=0; i < expected_array.length; i++) {
-          if (expected_array[i] != actual_array[i]) return false;
-        };
-        return true;
-      }
-      return false;
-    };
-    this.assertBlock(message, block);
-  },
-
-  assertHashNotEqual: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertHashNotEqual', '<?> was the same as <?>', expected, actual);
-    var expected_array = JsUnitTest.flattenArray(JsUnitTest.hashToSortedArray(expected));
-    var actual_array   = JsUnitTest.flattenArray(JsUnitTest.hashToSortedArray(actual));
-    // from now we recursively zip & compare nested arrays
-    var block = function() {
-      if (expected_array.length == actual_array.length) {
-        for (var i=0; i < expected_array.length; i++) {
-          if (expected_array[i] != actual_array[i]) return true;
-        };
-        return false;
-      }
-      return true;
-    };
-    this.assertBlock(message, block);
-  },
-
-  assertIdentical: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertIdentical', 'expected <?>, actual: <?>', expected, actual);
-    this.assertBlock(message, function() { return expected === actual });
-  },
-
-  assertNotIdentical: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertNotIdentical', 'expected <?>, actual: <?>', expected, actual);
-    this.assertBlock(message, function() { return expected !== actual });
-  },
-
-  assertNull: function(obj, message) {
-    message = this.buildMessage(message || 'assertNull', 'got <?>', obj);
-    this.assertBlock(message, function() { return obj === null });
-  },
-
-  assertNotNull: function(obj, message) {
-    message = this.buildMessage(message || 'assertNotNull', 'got <?>', obj);
-    this.assertBlock(message, function() { return obj !== null });
-  },
-
-  assertUndefined: function(obj, message) {
-    message = this.buildMessage(message || 'assertUndefined', 'got <?>', obj);
-    this.assertBlock(message, function() { return typeof obj == "undefined" });
-  },
-
-  assertNotUndefined: function(obj, message) {
-    message = this.buildMessage(message || 'assertNotUndefined', 'got <?>', obj);
-    this.assertBlock(message, function() { return typeof obj != "undefined" });
-  },
-
-  assertNullOrUndefined: function(obj, message) {
-    message = this.buildMessage(message || 'assertNullOrUndefined', 'got <?>', obj);
-    this.assertBlock(message, function() { return obj == null });
-  },
-
-  assertNotNullOrUndefined: function(obj, message) {
-    message = this.buildMessage(message || 'assertNotNullOrUndefined', 'got <?>', obj);
-    this.assertBlock(message, function() { return obj != null });
-  },
-
-  assertMatch: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertMatch', 'regex <?> did not match <?>', expected, actual);
-    this.assertBlock(message, function() { return new RegExp(expected).exec(actual) });
-  },
-
-  assertNoMatch: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertNoMatch', 'regex <?> matched <?>', expected, actual);
-    this.assertBlock(message, function() { return !(new RegExp(expected).exec(actual)) });
-  },
-
-  assertHasClass: function(element, klass, message) {
-    element = JsUnitTest.$(element);
-    message = this.buildMessage(message || 'assertHasClass', '? doesn\'t have class <?>.', element, klass);
-    this.assertBlock(message, function() {
-      var elementClassName = element.className;
-      return (elementClassName.length > 0 && (elementClassName == klass ||
-        new RegExp("(^|\\s)" + klass + "(\\s|$)").test(elementClassName)));
-      // return !!element.className.match(new RegExp(klass))
-    });
-  },
-
-  assertNotHasClass: function(element, klass, message) {
-    element = JsUnitTest.$(element);
-    message = this.buildMessage(message || 'assertNotHasClass', '? does have class <?>.', element, klass);
-    this.assertBlock(message, function() {
-      var elementClassName = element.className;
-      return !(elementClassName.length > 0 && (elementClassName == klass ||
-        new RegExp("(^|\\s)" + klass + "(\\s|$)").test(elementClassName)));
-    });
-  },
-
-  assertHidden: function(element, message) {
-    element = JsUnitTest.$(element);
-    message = this.buildMessage(message || 'assertHidden', '? isn\'t hidden.', element);
-    this.assertBlock(message, function() { return !element.style.display || element.style.display == 'none' });
-  },
-
-  assertInstanceOf: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertInstanceOf', '<?> was not an instance of the expected type', actual);
-    this.assertBlock(message, function() { return actual instanceof expected });
-  },
-
-  assertNotInstanceOf: function(expected, actual, message) {
-    message = this.buildMessage(message || 'assertNotInstanceOf', '<?> was an instance of the expected type', actual);
-    this.assertBlock(message, function() { return !(actual instanceof expected) });
-  },
-
-  assertRespondsTo: function(method, obj, message) {
-    message = this.buildMessage(message || 'assertRespondsTo', 'object doesn\'t respond to <?>', method);
-    this.assertBlock(message, function() { return (method in obj && typeof obj[method] == 'function') });
-  },
-
-  assertRaise: function(exceptionName, method, message) {
-    message = this.buildMessage(message || 'assertRaise', '<?> exception expected but none was raised', exceptionName);
-    var block = function() {
-      try {
-        method();
-        return false;
-      } catch(e) {
-        if (e.name == exceptionName) return true;
-        else throw e;
-      }
-    };
-    this.assertBlock(message, block);
-  },
-
-  assertNothingRaised: function(method, message) {
-    try {
-      method();
-      this.assert(true, "Expected nothing to be thrown");
-    } catch(e) {
-      message = this.buildMessage(message || 'assertNothingRaised', '<?> was thrown when nothing was expected.', e);
-      this.flunk(message);
-    }
-  },
-
-  _isVisible: function(element) {
-    element = JsUnitTest.$(element);
-    if(!element.parentNode) return true;
-    this.assertNotNull(element);
-    if(element.style && (element.style.display == 'none'))
-      return false;
-
-    return arguments.callee.call(this, element.parentNode);
-  },
-
-  assertVisible: function(element, message) {
-    message = this.buildMessage(message, '? was not visible.', element);
-    this.assertBlock(message, function() { return this._isVisible(element) });
-  },
-
-  assertNotVisible: function(element, message) {
-    message = this.buildMessage(message, '? was not hidden and didn\'t have a hidden parent either.', element);
-    this.assertBlock(message, function() { return !this._isVisible(element) });
-  },
-
-  assertElementsMatch: function() {
-    var pass = true, expressions = JsUnitTest.arrayfromargs(arguments);
-    var elements = expressions.shift();
-    if (elements.length != expressions.length) {
-      message = this.buildMessage('assertElementsMatch', 'size mismatch: ? elements, ? expressions (?).', elements.length, expressions.length, expressions);
-      this.flunk(message);
-      pass = false;
-    }
-    for (var i=0; i < expressions.length; i++) {
-      var expression = expressions[i];
-      var element    = JsUnitTest.$(elements[i]);
-      if (JsUnitTest.selectorMatch(expression, element)) {
-        pass = true;
-        break;
-      }
-      message = this.buildMessage('assertElementsMatch', 'In index <?>: expected <?> but got ?', index, expression, element);
-      this.flunk(message);
-      pass = false;
-    };
-    this.assert(pass, "Expected all elements to match.");
-  },
-
-  assertElementMatches: function(element, expression, message) {
-    this.assertElementsMatch([element], expression);
-  }
-};
-JsUnitTest.Unit.Runner = function(testcases) {
-  var argumentOptions = arguments[1] || {};
-  var options = this.options = {};
-  options.testLog = ('testLog' in argumentOptions) ? argumentOptions.testLog : 'testlog';
-  options.resultsURL = this.queryParams.resultsURL;
-  options.testLog = JsUnitTest.$(options.testLog);
-
-  this.tests = this.getTests(testcases);
-  this.currentTest = 0;
-  this.logger = new JsUnitTest.Unit.Logger(options.testLog);
-
-  var self = this;
-  JsUnitTest.Event.addEvent(window, "load", function() {
-    setTimeout(function() {
-      self.runTests();
-    }, 0.1);
-  });
-};
-
-JsUnitTest.Unit.Runner.prototype.queryParams = JsUnitTest.toQueryParams();
-
-JsUnitTest.Unit.Runner.prototype.portNumber = function() {
-  if (window.location.search.length > 0) {
-    var matches = window.location.search.match(/\:(\d{3,5})\//);
-    if (matches) {
-      return parseInt(matches[1]);
-    }
-  }
-  return null;
-};
-
-JsUnitTest.Unit.Runner.prototype.getTests = function(testcases) {
-  var tests = [], options = this.options;
-  if (this.queryParams.tests) tests = this.queryParams.tests.split(',');
-  else if (options.tests) tests = options.tests;
-  else if (options.test) tests = [option.test];
-  else {
-    for (testname in testcases) {
-      if (testname.match(/^test/)) tests.push(testname);
-    }
-  }
-  var results = [];
-  for (var i=0; i < tests.length; i++) {
-    var test = tests[i];
-    if (testcases[test])
-      results.push(
-        new JsUnitTest.Unit.Testcase(test, testcases[test], testcases.setup, testcases.teardown)
-      );
-  };
-  return results;
-};
-
-JsUnitTest.Unit.Runner.prototype.getResult = function() {
-  var results = {
-    tests: this.tests.length,
-    assertions: 0,
-    failures: 0,
-    errors: 0,
-    warnings: 0
-  };
-
-  for (var i=0; i < this.tests.length; i++) {
-    var test = this.tests[i];
-    results.assertions += test.assertions;
-    results.failures   += test.failures;
-    results.errors     += test.errors;
-    results.warnings   += test.warnings;
-  };
-  return results;
-};
-
-JsUnitTest.Unit.Runner.prototype.postResults = function() {
-  if (this.options.resultsURL) {
-    // new Ajax.Request(this.options.resultsURL,
-    //   { method: 'get', parameters: this.getResult(), asynchronous: false });
-    var results = this.getResult();
-    var url = this.options.resultsURL + "?";
-    url += "tests="+ this.tests.length + "&";
-    url += "assertions="+ results.assertions + "&";
-    url += "warnings="  + results.warnings + "&";
-    url += "failures="  + results.failures + "&";
-    url += "errors="    + results.errors;
-    JsUnitTest.ajax({
-      url: url,
-      type: 'GET'
-    })
-  }
-};
-
-JsUnitTest.Unit.Runner.prototype.runTests = function() {
-  var test = this.tests[this.currentTest], actions;
-
-  if (!test) return this.finish();
-  if (!test.isWaiting) this.logger.start(test.name);
-  test.run();
-  var self = this;
-  if(test.isWaiting) {
-    this.logger.message("Waiting for " + test.timeToWait + "ms");
-    // setTimeout(this.runTests.bind(this), test.timeToWait || 1000);
-    setTimeout(function() {
-      self.runTests();
-    }, test.timeToWait || 1000);
-    return;
-  }
-
-  this.logger.finish(test.status(), test.summary());
-  if (actions = test.actions) this.logger.appendActionButtons(actions);
-  this.currentTest++;
-  // tail recursive, hopefully the browser will skip the stackframe
-  this.runTests();
-};
-
-JsUnitTest.Unit.Runner.prototype.finish = function() {
-  this.postResults();
-  this.logger.summary(this.summary());
-};
-
-JsUnitTest.Unit.Runner.prototype.summary = function() {
-  return new JsUnitTest.Template('#{tests} tests, #{assertions} assertions, #{failures} failures, #{errors} errors, #{warnings} warnings').evaluate(this.getResult());
-};
-JsUnitTest.Unit.Testcase = function(name, test, setup, teardown) {
-  this.name           = name;
-  this.test           = test     || function() {};
-  this.setup          = setup    || function() {};
-  this.teardown       = teardown || function() {};
-  this.messages       = [];
-  this.actions        = {};
-};
-// import JsUnitTest.Unit.Assertions
-
-for (method in JsUnitTest.Unit.Assertions) {
-  JsUnitTest.Unit.Testcase.prototype[method] = JsUnitTest.Unit.Assertions[method];
-}
-
-JsUnitTest.Unit.Testcase.prototype.isWaiting         = false;
-JsUnitTest.Unit.Testcase.prototype.timeToWait        = 1000;
-JsUnitTest.Unit.Testcase.prototype.assertions        = 0;
-JsUnitTest.Unit.Testcase.prototype.failures          = 0;
-JsUnitTest.Unit.Testcase.prototype.errors            = 0;
-JsUnitTest.Unit.Testcase.prototype.warnings          = 0;
-JsUnitTest.Unit.Testcase.prototype.isRunningFromRake = window.location.port;
-
-// JsUnitTest.Unit.Testcase.prototype.isRunningFromRake = window.location.port == 4711;
-
-JsUnitTest.Unit.Testcase.prototype.wait = function(time, nextPart) {
-  this.isWaiting = true;
-  this.test = nextPart;
-  this.timeToWait = time;
-};
-
-JsUnitTest.Unit.Testcase.prototype.run = function(rethrow) {
-  try {
-    try {
-      if (!this.isWaiting) this.setup();
-      this.isWaiting = false;
-      this.test();
-    } finally {
-      if(!this.isWaiting) {
-        this.teardown();
-      }
-    }
-  }
-  catch(e) {
-    if (rethrow) throw e;
-    this.error(e, this);
-  }
-};
-
-JsUnitTest.Unit.Testcase.prototype.summary = function() {
-  var msg = '#{assertions} assertions, #{failures} failures, #{errors} errors, #{warnings} warnings\n';
-  return new JsUnitTest.Template(msg).evaluate(this) +
-    this.messages.join("\n");
-};
-
-JsUnitTest.Unit.Testcase.prototype.pass = function() {
-  this.assertions++;
-};
-
-JsUnitTest.Unit.Testcase.prototype.fail = function(message) {
-  this.failures++;
-  var line = "";
-  try {
-    throw new Error("stack");
-  } catch(e){
-    line = (/\.html:(\d+)/.exec(e.stack || '') || ['',''])[1];
-  }
-  this.messages.push("Failure: " + message + (line ? " Line #" + line : ""));
-};
-
-JsUnitTest.Unit.Testcase.prototype.warning = function(message) {
-  this.warnings++;
-  var line = "";
-  try {
-    throw new Error("stack");
-  } catch(e){
-    line = (/\.html:(\d+)/.exec(e.stack || '') || ['',''])[1];
-  }
-  this.messages.push("Warning: " + message + (line ? " Line #" + line : ""));
-};
-JsUnitTest.Unit.Testcase.prototype.warn = JsUnitTest.Unit.Testcase.prototype.warning;
-
-JsUnitTest.Unit.Testcase.prototype.info = function(message) {
-  this.messages.push("Info: " + message);
-};
-
-JsUnitTest.Unit.Testcase.prototype.error = function(error, test) {
-  this.errors++;
-  this.actions['retry with throw'] = function() { test.run(true) };
-  this.messages.push(error.name + ": "+ error.message + "(" + JsUnitTest.inspect(error) + ")");
-};
-
-JsUnitTest.Unit.Testcase.prototype.status = function() {
-  if (this.failures > 0) return 'failed';
-  if (this.errors > 0) return 'error';
-  if (this.warnings > 0) return 'warning';
-  return 'passed';
-};
-
-JsUnitTest.Unit.Testcase.prototype.benchmark = function(operation, iterations) {
-  var startAt = new Date();
-  (iterations || 1).times(operation);
-  var timeTaken = ((new Date())-startAt);
-  this.info((arguments[2] || 'Operation') + ' finished ' +
-     iterations + ' iterations in ' + (timeTaken/1000)+'s' );
-  return timeTaken;
-};
-
-Test = JsUnitTest
diff --git a/trunk/activemq-web-demo/src/main/webapp/test/assets/unittest.css b/trunk/activemq-web-demo/src/main/webapp/test/assets/unittest.css
deleted file mode 100644
index e1b7605..0000000
--- a/trunk/activemq-web-demo/src/main/webapp/test/assets/unittest.css
+++ /dev/null
@@ -1,54 +0,0 @@
-body, div, p, h1, h2, h3, ul, ol, span, a, table, td, form, img, li {
-  font-family: sans-serif;
-}
-
-body {
-  font-size:0.8em;
-}
-
-#log {
-  padding-bottom: 1em;
-  border-bottom: 2px solid #000;
-  margin-bottom: 2em;
-}
-
-.logsummary {
-  margin-top: 1em;
-  margin-bottom: 1em;
-  padding: 1ex;
-  border: 1px solid #000;
-  font-weight: bold;
-}
-
-.logtable {
-  width:100%;
-  border-collapse: collapse;
-  border: 1px dotted #666;
-}
-
-.logtable td, .logtable th {
-  text-align: left;
-  padding: 3px 8px;
-  border: 1px dotted #666;
-}
-
-.logtable .passed {
-  background-color: #cfc;
-}
-
-.logtable .failed, .logtable .error {
-  background-color: #fcc;
-}
-
-.logtable .warning {
-  background-color: #FC6;
-}
-
-.logtable td div.action_buttons {
-  display: inline;
-}
-
-.logtable td div.action_buttons input {
-  margin: 0 5px;
-  font-size: 10px;
-}
diff --git a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java b/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java
deleted file mode 100644
index 4174e36..0000000
--- a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/AjaxTest.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/**
- * 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.web;
-
-import org.apache.activemq.transport.stomp.StompConnection;
-import org.apache.activemq.transport.stomp.StompFrame;
-import org.apache.activemq.transport.stomp.Stomp;
-
-import java.lang.Thread;
-import java.net.SocketTimeoutException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.*;
-import org.eclipse.jetty.io.Buffer;
-import org.eclipse.jetty.client.ContentExchange;
-import org.eclipse.jetty.client.HttpClient;
-import org.eclipse.jetty.http.HttpFields;
-import org.eclipse.jetty.io.ByteArrayBuffer;
-
-import javax.jms.MessageProducer;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-public class AjaxTest extends JettyTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(AjaxTest.class);
-
-    private class AjaxTestContentExchange extends ContentExchange  {
-        private HashMap<String,String> headers;
-        private String responseContent;
-
-        AjaxTestContentExchange() {
-            super(true);
-            this.headers = new HashMap<String,String>();
-            this.responseContent = "";
-        }
-        protected void onResponseContent( Buffer content ) {
-            this.responseContent += content.toString();
-        }
-        protected void onResponseHeader( Buffer name, Buffer value ) {
-          headers.put( name.toString(), value.toString() );
-        }
-        public String getJsessionId() {
-            String cookie = headers.get( "Set-Cookie" );
-            String[] cookie_parts = cookie.split( ";" );
-            return cookie_parts[0];
-        }
-        public String getResponseContent() {
-            return responseContent;
-        }
-    }
-
-    public void assertContains( String expected, String actual ) {
-        assertTrue( "'"+actual+"' does not contain expected fragment '"+expected+"'", actual.indexOf( expected ) != -1 );
-    }
-    public void assertResponseCount( int expected, String actual ) {
-        int occurrences = StringUtils.countMatches( actual, "<response" );
-        assertEquals( "Expected number of <response> elements is not correct.", expected, occurrences );
-    }
-
-    public void testAjaxClientReceivesMessagesWhichAreSentToQueueWhileClientIsPolling() throws Exception {
-        LOG.debug( "*** testAjaxClientReceivesMessagesWhichAreSentToQueueWhileClientIsPolling ***" );
-
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        // client 1 subscribes to a queue
-        LOG.debug( "SENDING LISTEN" );
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer("destination=queue://test&type=listen&message=handler") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        String jsessionid = contentExchange.getJsessionId();
-
-        // client 1 polls for messages
-        LOG.debug( "SENDING POLL" );
-        AjaxTestContentExchange poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-
-        // while client 1 is polling, client 2 sends messages to the queue
-        LOG.debug( "SENDING MESSAGES" );
-        contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer(
-            "destination=queue://test&type=send&message=msg1&"+
-            "d1=queue://test&t1=send&m1=msg2&"+
-            "d2=queue://test&t2=send&m2=msg3"
-        ) );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        LOG.debug( "DONE POSTING MESSAGES" );
-
-        // wait for poll to finish
-        poll.waitForDone();
-        String response = poll.getResponseContent();
-
-        // messages might not all be delivered during the 1st poll.  We need to check again.
-        poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-        poll.waitForDone();
-
-        String fullResponse = response + poll.getResponseContent();
-        LOG.debug( "full response : " + fullResponse );
-
-        assertContains( "<response id='handler' destination='queue://test' >msg1</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='queue://test' >msg2</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='queue://test' >msg3</response>\n", fullResponse );
-        assertResponseCount( 3, fullResponse );
-    }
-
-    public void testAjaxClientReceivesMessagesWhichAreSentToTopicWhileClientIsPolling() throws Exception {
-        LOG.debug( "*** testAjaxClientReceivesMessagesWhichAreSentToTopicWhileClientIsPolling ***" );
-
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        // client 1 subscribes to a queue
-        LOG.debug( "SENDING LISTEN" );
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer("destination=topic://test&type=listen&message=handler") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        String jsessionid = contentExchange.getJsessionId();
-
-        // client 1 polls for messages
-        LOG.debug( "SENDING POLL" );
-        AjaxTestContentExchange poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-
-        // while client 1 is polling, client 2 sends messages to the queue
-        LOG.debug( "SENDING MESSAGES" );
-        contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer(
-            "destination=topic://test&type=send&message=msg1&"+
-            "d1=topic://test&t1=send&m1=msg2&"+
-            "d2=topic://test&t2=send&m2=msg3"
-        ) );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        LOG.debug( "DONE POSTING MESSAGES" );
-
-        // wait for poll to finish
-        poll.waitForDone();
-        String response = poll.getResponseContent();
-
-        // not all messages might be delivered during the 1st poll.  We need to check again.
-        poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-        poll.waitForDone();
-
-        String fullResponse = response + poll.getResponseContent();
-        LOG.debug( "full response : " + fullResponse );
-
-        assertContains( "<response id='handler' destination='topic://test' >msg1</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='topic://test' >msg2</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='topic://test' >msg3</response>\n", fullResponse );
-        assertResponseCount( 3, fullResponse );
-    }
-
-    public void testAjaxClientReceivesMessagesWhichAreQueuedBeforeClientSubscribes() throws Exception {
-        LOG.debug( "*** testAjaxClientReceivesMessagesWhichAreQueuedBeforeClientSubscribes ***" );
-        // send messages to queue://test
-        producer.send( session.createTextMessage("test one") );
-        producer.send( session.createTextMessage("test two") );
-        producer.send( session.createTextMessage("test three") );
-
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        // client 1 subscribes to queue
-        LOG.debug( "SENDING LISTEN" );
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer("destination=queue://test&type=listen&message=handler") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        String jsessionid = contentExchange.getJsessionId();
-
-        // client 1 polls for messages
-        LOG.debug( "SENDING POLL" );
-        AjaxTestContentExchange poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-
-        // wait for poll to finish
-        poll.waitForDone();
-        String response = poll.getResponseContent();
-
-        assertContains( "<response id='handler' destination='queue://test' >test one</response>\n", response );
-        assertContains( "<response id='handler' destination='queue://test' >test two</response>\n", response );
-        assertContains( "<response id='handler' destination='queue://test' >test three</response>\n", response );
-        assertResponseCount( 3, response );
-    }
-
-    public void testStompMessagesAreReceivedByAjaxClient() throws Exception {
-        LOG.debug( "*** testStompMessagesAreRecievedByAjaxClient ***" );
-
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        // client 1 subscribes to a queue
-        LOG.debug( "SENDING LISTEN" );
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer("destination=queue://test&type=listen&message=handler") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        String jsessionid = contentExchange.getJsessionId();
-
-        // client 1 polls for messages
-        LOG.debug( "SENDING POLL" );
-        AjaxTestContentExchange poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-
-        // stomp client queues some messages
-        StompConnection connection = new StompConnection();
-        connection.open(stompUri.getHost(), stompUri.getPort());
-        connection.connect("user", "password");
-        HashMap<String, String> headers = new HashMap<String, String>();
-        headers.put( "amq-msg-type", "text" );
-        connection.send( "/queue/test", "message1", (String)null, headers );
-        connection.send( "/queue/test", "message2", (String)null, headers );
-        connection.send( "/queue/test", "message3", (String)null, headers );
-        connection.send( "/queue/test", "message4", (String)null, headers );
-        connection.send( "/queue/test", "message5", (String)null, headers );
-        connection.disconnect();
-
-        // wait for poll to finish
-        poll.waitForDone();
-        String response = poll.getResponseContent();
-
-        // not all messages might be delivered during the 1st poll.  We need to check again.
-        poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-        poll.waitForDone();
-
-        String fullResponse = response + poll.getResponseContent();
-
-        assertContains( "<response id='handler' destination='queue://test' >message1</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='queue://test' >message2</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='queue://test' >message3</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='queue://test' >message4</response>\n", fullResponse );
-        assertContains( "<response id='handler' destination='queue://test' >message5</response>\n", fullResponse );
-        assertResponseCount( 5, fullResponse );
-    }
-
-    public void testAjaxMessagesAreReceivedByStompClient() throws Exception {
-        LOG.debug( "*** testAjaxMessagesAreReceivedByStompClient ***" );
-
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer(
-            "destination=queue://test&type=send&message=msg1&"+
-            "d1=queue://test&t1=send&m1=msg2&"+
-            "d2=queue://test&t2=send&m2=msg3&"+
-            "d3=queue://test&t3=send&m3=msg4") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-
-        StompConnection connection = new StompConnection();
-        connection.open(stompUri.getHost(), stompUri.getPort());
-        connection.connect("user", "password");
-        connection.subscribe( "/queue/test" );
-
-        StompFrame message;
-        String allMessageBodies = "";
-        try {
-            while( true ) {
-                message = connection.receive(5000);
-                allMessageBodies = allMessageBodies +"\n"+ message.getBody();
-            }
-        } catch (SocketTimeoutException e) {}
-
-        LOG.debug( "All message bodies : " + allMessageBodies );
-
-        assertContains( "msg1", allMessageBodies );
-        assertContains( "msg2", allMessageBodies );
-        assertContains( "msg3", allMessageBodies );
-        assertContains( "msg4", allMessageBodies );
-    }
-
-    public void testAjaxClientMayUseSelectors() throws Exception {
-        LOG.debug( "*** testAjaxClientMayUseSelectors ***" );
-
-        // send 2 messages to the same queue w/ different 'filter' values.
-        Message msg = session.createTextMessage("test one");
-        msg.setStringProperty( "filter", "one" );
-        producer.send( msg );
-        msg = session.createTextMessage("test two");
-        msg.setStringProperty( "filter", "two" );
-        producer.send( msg );
-
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        // client ubscribes to queue
-        LOG.debug( "SENDING LISTEN" );
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer("destination=queue://test&type=listen&message=handler") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        // SELECTOR
-        contentExchange.setRequestHeader( "selector", "filter='two'" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        String jsessionid = contentExchange.getJsessionId();
-
-        // client 1 polls for messages
-        LOG.debug( "SENDING POLL" );
-        AjaxTestContentExchange poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-        poll.waitForDone();
-
-        LOG.debug( poll.getResponseContent() );
-
-        String expected = "<ajax-response>\n" +
-            "<response id='handler' destination='queue://test' >test two</response>\n" +
-            "</ajax-response>\n";
-        assertEquals( "Poll response is not correct.", expected, poll.getResponseContent() );
-
-    }
-
-    public void testMultipleAjaxClientsMayExistInTheSameSession() throws Exception {
-        LOG.debug( "*** testMultipleAjaxClientsMayExistInTheSameSession ***" );
-
-        // send messages to queues testA and testB.
-        MessageProducer producerA = session.createProducer(session.createQueue("testA"));
-        MessageProducer producerB = session.createProducer(session.createQueue("testB"));
-        producerA.send( session.createTextMessage("A1") );
-        producerA.send( session.createTextMessage("A2") );
-        producerB.send( session.createTextMessage("B1") );
-        producerB.send( session.createTextMessage("B2") );
-
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        // clientA subscribes to /queue/testA
-        LOG.debug( "SENDING LISTEN" );
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer(
-            "destination=queue://testA&"+
-            "type=listen&"+
-            "message=handlerA&"+
-            "clientId=clientA"
-        ) );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        String jsessionid = contentExchange.getJsessionId();
-
-        // clientB subscribes to /queue/testB using the same JSESSIONID.
-        contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestHeader( "Cookie", jsessionid );
-        contentExchange.setRequestContent( new ByteArrayBuffer(
-            "destination=queue://testB&"+
-            "type=listen&"+
-            "message=handlerB&"+
-            "clientId=clientB"
-        ) );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-
-        // clientA polls for messages
-        AjaxTestContentExchange poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000&clientId=clientA");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-        poll.waitForDone();
-
-        LOG.debug( "clientA response : " + poll.getResponseContent() );
-        String expected = "<ajax-response>\n" +
-            "<response id='handlerA' destination='queue://testA' >A1</response>\n" +
-            "<response id='handlerA' destination='queue://testA' >A2</response>\n" +
-            "</ajax-response>\n";
-        assertEquals( "Poll response is not correct.", expected, poll.getResponseContent() );
-
-        // clientB polls for messages
-        poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000&clientId=clientB");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-        poll.waitForDone();
-
-        LOG.debug( "clientB response : " + poll.getResponseContent() );
-        expected = "<ajax-response>\n" +
-            "<response id='handlerB' destination='queue://testB' >B1</response>\n" +
-            "<response id='handlerB' destination='queue://testB' >B2</response>\n" +
-            "</ajax-response>\n";
-        assertEquals( "Poll response is not correct.", expected, poll.getResponseContent() );
-    }
-
-    public void testAjaxClientReceivesMessagesForMultipleTopics() throws Exception {
-        LOG.debug( "*** testAjaxClientReceivesMessagesForMultipleTopics ***" );
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-
-        LOG.debug( "SENDING LISTEN FOR /topic/topicA" );
-        AjaxTestContentExchange contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer("destination=topic://topicA&type=listen&message=handlerA") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        String jsessionid = contentExchange.getJsessionId();
-
-        LOG.debug( "SENDING LISTEN FOR /topic/topicB" );
-        contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer("destination=topic://topicB&type=listen&message=handlerB") );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        contentExchange.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-
-        // client 1 polls for messages
-        LOG.debug( "SENDING POLL" );
-        AjaxTestContentExchange poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-
-        // while client 1 is polling, client 2 sends messages to the topics
-        LOG.debug( "SENDING MESSAGES" );
-        contentExchange = new AjaxTestContentExchange();
-        contentExchange.setMethod( "POST" );
-        contentExchange.setURL("http://localhost:8080/amq");
-        contentExchange.setRequestContent( new ByteArrayBuffer(
-            "destination=topic://topicA&type=send&message=A1&"+
-            "d1=topic://topicB&t1=send&m1=B1&"+
-            "d2=topic://topicA&t2=send&m2=A2&"+
-            "d3=topic://topicB&t3=send&m3=B2"
-        ) );
-        contentExchange.setRequestContentType( "application/x-www-form-urlencoded; charset=UTF-8" );
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        LOG.debug( "DONE POSTING MESSAGES" );
-
-        // wait for poll to finish
-        poll.waitForDone();
-        String response = poll.getResponseContent();
-
-        // not all messages might be delivered during the 1st poll.  We need to check again.
-        poll = new AjaxTestContentExchange();
-        poll.setMethod( "GET" );
-        poll.setURL("http://localhost:8080/amq?timeout=5000");
-        poll.setRequestHeader( "Cookie", jsessionid );
-        httpClient.send( poll );
-        poll.waitForDone();
-
-        String fullResponse = response + poll.getResponseContent();
-        LOG.debug( "full response " + fullResponse );
-        assertContains( "<response id='handlerA' destination='topic://topicA' >A1</response>\n", fullResponse );
-        assertContains( "<response id='handlerB' destination='topic://topicB' >B1</response>\n", fullResponse );
-        assertContains( "<response id='handlerA' destination='topic://topicA' >A2</response>\n", fullResponse );
-        assertContains( "<response id='handlerB' destination='topic://topicB' >B2</response>\n", fullResponse );
-        assertResponseCount( 4, fullResponse );
-     }
-
-}
diff --git a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyServer.java b/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyServer.java
deleted file mode 100644
index f8889fd..0000000
--- a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyServer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.web;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.demo.DefaultQueueSender;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-/**
- * A simple bootstrap class for starting Jetty in your IDE using the local web
- * application.
- * 
- * 
- */
-public final class JettyServer {
-
-    public static final int PORT = 8080;
-
-    public static final String WEBAPP_DIR = "src/main/webapp";
-
-    public static final String WEBAPP_CTX = "/";
-
-    private JettyServer() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        // lets create a broker
-        BrokerService broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setUseJmx(true);
-        broker.addConnector("tcp://localhost:61616");
-        broker.addConnector("stomp://localhost:61613");
-        broker.start();
-
-        // lets publish some messages so that there is some stuff to browse
-        DefaultQueueSender.main(new String[] {
-            "FOO.BAR"
-        });
-
-        // now lets start the web server
-        int port = PORT;
-        if (args.length > 0) {
-            String text = args[0];
-            port = Integer.parseInt(text);
-        }
-        System.out.println("Starting Web Server on port: " + port);
-        Server server = new Server();
-        SelectChannelConnector connector = new SelectChannelConnector();
-        connector.setPort(port);
-        connector.setServer(server);
-        WebAppContext context = new WebAppContext();
-
-        context.setResourceBase(WEBAPP_DIR);
-        context.setContextPath(WEBAPP_CTX);
-        context.setServer(server);
-        server.setHandler(context);
-        server.setConnectors(new Connector[] {
-            connector
-        });
-        server.start();
-    }
-}
diff --git a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyTestSupport.java b/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyTestSupport.java
deleted file mode 100644
index 1f0209e..0000000
--- a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/JettyTestSupport.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * 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.web;
-
-import java.net.Socket;
-import java.net.URI;
-import java.net.URL;
-
-import javax.jms.Connection;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.net.SocketFactory;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.util.Wait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-public class JettyTestSupport extends TestCase {
-    private static final Logger LOG = LoggerFactory.getLogger(JettyTestSupport.class);
-
-    BrokerService broker;
-    Server server;
-    ActiveMQConnectionFactory factory;
-    Connection connection;
-    Session session;
-    MessageProducer producer;
-
-    URI tcpUri;
-    URI stompUri;
-
-    protected void setUp() throws Exception {
-        broker = new BrokerService();
-        broker.setPersistent(false);
-        broker.setUseJmx(true);
-        tcpUri = broker.addConnector("tcp://localhost:61616").getConnectUri();
-        stompUri = broker.addConnector("stomp://localhost:61613").getConnectUri();
-        broker.start();
-        broker.waitUntilStarted();
-
-        server = new Server();
-        SelectChannelConnector connector = new SelectChannelConnector();
-        connector.setPort(8080);
-        connector.setServer(server);
-        WebAppContext context = new WebAppContext();
-
-        context.setResourceBase("src/main/webapp");
-        context.setContextPath("/");
-        context.setServer(server);
-        server.setHandler(context);
-        server.setConnectors(new Connector[] {
-            connector
-        });
-        server.start();
-        waitForJettySocketToAccept("http://localhost:8080");
-
-        factory = new ActiveMQConnectionFactory(tcpUri);
-        connection = factory.createConnection();
-        connection.start();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        producer = session.createProducer(session.createQueue("test"));
-    }
-
-    protected void tearDown() throws Exception {
-        server.stop();
-        broker.stop();
-        broker.waitUntilStopped();
-        session.close();
-        connection.close();
-    }
-
-    public void waitForJettySocketToAccept(String bindLocation) throws Exception {
-        final URL url = new URL(bindLocation);
-        assertTrue("Jetty endpoint is available", Wait.waitFor(new Wait.Condition() {
-
-            public boolean isSatisified() throws Exception {
-                boolean canConnect = false;
-                try {
-                    Socket socket = SocketFactory.getDefault().createSocket(url.getHost(), url.getPort());
-                    socket.close();
-                    canConnect = true;
-                } catch (Exception e) {
-                    LOG.warn("verify jetty available, failed to connect to " + url + e);
-                }
-                return canConnect;
-            }}, 60 * 1000));
-    }
-
-}
diff --git a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java b/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java
deleted file mode 100644
index c96cac2..0000000
--- a/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * 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.web;
-
-import javax.jms.TextMessage;
-import javax.management.ObjectName;
-
-import org.apache.activemq.broker.jmx.DestinationViewMBean;
-import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
-import org.apache.commons.lang.RandomStringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.eclipse.jetty.client.ContentExchange;
-import org.eclipse.jetty.client.HttpClient;
-
-import java.util.Set;
-
-public class RestTest extends JettyTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(RestTest.class);
-	
-	public void testConsume() throws Exception {
-	    producer.send(session.createTextMessage("test"));
-	    LOG.info("message sent");
-	    
-	    HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        ContentExchange contentExchange = new ContentExchange();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-        contentExchange.setURL("http://localhost:8080/message/test?readTimeout=1000&type=queue");
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        assertEquals("test", contentExchange.getResponseContent());	    
-	}
-	
-	public void testSubscribeFirst() throws Exception {
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        ContentExchange contentExchange = new ContentExchange();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-        contentExchange.setURL("http://localhost:8080/message/test?readTimeout=5000&type=queue");
-        httpClient.send(contentExchange);
-        
-        Thread.sleep(1000);
-        
-        producer.send(session.createTextMessage("test"));
-        LOG.info("message sent");
-        
-        contentExchange.waitForDone();
-        assertEquals("test", contentExchange.getResponseContent());	    
-	}
-	
-	public void testSelector() throws Exception {
-	    TextMessage msg1 = session.createTextMessage("test1");
-	    msg1.setIntProperty("test", 1);
-	    producer.send(msg1);
-	    LOG.info("message 1 sent");
-	    
-	    TextMessage msg2 = session.createTextMessage("test2");
-	    msg2.setIntProperty("test", 2);
-	    producer.send(msg2);
-	    LOG.info("message 2 sent");
-	    
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        ContentExchange contentExchange = new ContentExchange();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-        contentExchange.setURL("http://localhost:8080/message/test?readTimeout=1000&type=queue");
-        contentExchange.setRequestHeader("selector", "test=2");
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        assertEquals("test2", contentExchange.getResponseContent());
-	}
-	
-	// test for https://issues.apache.org/activemq/browse/AMQ-2827
-	public void testCorrelation() throws Exception {
-	    for (int i = 0; i < 200; i++) {
-            String correlId = "RESTY" + RandomStringUtils.randomNumeric(10);
-            
-            TextMessage message = session.createTextMessage(correlId);
-            message.setStringProperty("correlationId", correlId);
-            message.setJMSCorrelationID(correlId);
-            
-            LOG.info("Sending: " + correlId);
-            
-            producer.send(message);
-            
-            HttpClient httpClient = new HttpClient();
-            httpClient.start();
-            ContentExchange contentExchange = new ContentExchange();
-            httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-            contentExchange.setURL("http://localhost:8080/message/test?readTimeout=1000&type=queue&clientId=test");
-            httpClient.send(contentExchange);
-            contentExchange.waitForDone();
-            LOG.info("Received: [" + contentExchange.getResponseStatus() + "] " + contentExchange.getResponseContent());
-            assertEquals(200, contentExchange.getResponseStatus());
-            assertEquals(correlId, contentExchange.getResponseContent());
-	    }
-	}
-
-    public void testDisconnect() throws Exception {
-
-        producer.send(session.createTextMessage("test"));
-        HttpClient httpClient = new HttpClient();
-        httpClient.start();
-        ContentExchange contentExchange = new ContentExchange();
-        httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
-        contentExchange.setURL("http://localhost:8080/message/test?readTimeout=1000&type=queue&clientId=test");
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-        LOG.info("Received: [" + contentExchange.getResponseStatus() + "] " + contentExchange.getResponseContent());
-
-        contentExchange = new ContentExchange();
-        contentExchange.setMethod("POST");
-        contentExchange.setURL("http://localhost:8080/message/test?clientId=test&action=unsubscribe");
-        httpClient.send(contentExchange);
-        contentExchange.waitForDone();
-
-        httpClient.stop();
-
-
-
-        ObjectName name = new ObjectName("org.apache.activemq" + ":BrokerName=localhost,Type=Queue,Destination=test");
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Subscription,destinationType=Queue,destinationName=test,*");
-        Set subs = broker.getManagementContext().queryNames(query, null);
-        assertEquals("Consumers not closed", 0 , subs.size());
-    }
-
-}
diff --git a/trunk/activemq-web-demo/src/test/resources/log4j.properties b/trunk/activemq-web-demo/src/test/resources/log4j.properties
deleted file mode 100755
index df9480b..0000000
--- a/trunk/activemq-web-demo/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.spring=WARN
-log4j.logger.org.apache.activemq.web=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/test-reports/activemq-test.log
-log4j.appender.out.append=true
diff --git a/trunk/activemq-web/README.txt b/trunk/activemq-web/README.txt
deleted file mode 100755
index 5b52f8d..0000000
--- a/trunk/activemq-web/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Here be the home of the web-module.
-
-The demonstration webapp has been moved to the activemq-web-demo module.
-This module now onlu builds the jar for activemq-web.
-The javascript modules needed for the AJAX interface are included as 
-resources and served my the MessageListenerServlet
-
diff --git a/trunk/activemq-web/pom.xml b/trunk/activemq-web/pom.xml
deleted file mode 100755
index 3142c55..0000000
--- a/trunk/activemq-web/pom.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-web</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: Web</name>
-  <description>Web Connector for REST API and Streamlets support</description>
-  
-  <properties>
-    <activemq.osgi.import.pkg>
-      org.apache.activemq*;resolution:=optional,
-      org.apache.camel*;resolution:=optional,
-      org.eclipse.jetty*;resolution:=optional,
-      org.springframework*;resolution:=optional,
-      com.thoughtworks.xstream*;resolution:=optional,
-      com.sun*;resolution:=optional,
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.activemq.web*;version=${project.version};-noimport:=true,
-    </activemq.osgi.export>
-  </properties>
-  
-  <dependencies>
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-        <groupId>${project.groupId}</groupId>
-        <artifactId>activemq-camel</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <scope>test</scope>
-      <type>test-jar</type>
-    </dependency>
-    
-    <!-- web container -->
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-servlet_2.5_spec</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.eclipse.jetty.aggregate</groupId>
-      <artifactId>jetty-all-server</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-        <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-websocket</artifactId>
-        <version>${jetty-version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-continuation</artifactId>
-      <version>${jetty-version}</version>
-    </dependency>
-    
-    <!-- Rome RSS Reader -->
-    <dependency>
-      <groupId>rome</groupId>
-      <artifactId>rome</artifactId>
-    </dependency>
-
-    <!-- XML -->
-    <dependency>
-      <groupId>jdom</groupId>
-      <artifactId>jdom</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-      <optional>false</optional>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-web</artifactId>
-      <optional>false</optional>
-    </dependency>
-
-    <dependency>
-      <groupId>xpp3</groupId>
-      <artifactId>xpp3</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-    </dependency>
-
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-  </dependencies>
-
-</project>
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/appended-resources/META-INF/LICENSE b/trunk/activemq-web/src/main/appended-resources/META-INF/LICENSE
deleted file mode 100644
index d8569bf..0000000
--- a/trunk/activemq-web/src/main/appended-resources/META-INF/LICENSE
+++ /dev/null
@@ -1,57 +0,0 @@
-=========================================================================
-== Jetty is distributed under the Apache 2 license                     ==
-=========================================================================
-=========================================================================
-== 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.
-
diff --git a/trunk/activemq-web/src/main/appended-resources/META-INF/NOTICE b/trunk/activemq-web/src/main/appended-resources/META-INF/NOTICE
deleted file mode 100644
index c540315..0000000
--- a/trunk/activemq-web/src/main/appended-resources/META-INF/NOTICE
+++ /dev/null
@@ -1,27 +0,0 @@
-==============================================================
- 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.
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxListener.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxListener.java
deleted file mode 100644
index ac0f093..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxListener.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * 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.web;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-
-import org.eclipse.jetty.continuation.Continuation;
-import org.eclipse.jetty.continuation.ContinuationSupport;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.activemq.MessageAvailableListener;
-
-import java.util.LinkedList;
-
-/*
- * Listen for available messages and wakeup any continuations.
- */
-public class AjaxListener implements MessageAvailableListener {
-    private static final Logger LOG = LoggerFactory.getLogger(AjaxListener.class);
-    
-    private long maximumReadTimeout;
-    private AjaxWebClient client;
-    private long lastAccess;
-    private Continuation continuation;
-    private LinkedList<UndeliveredAjaxMessage> undeliveredMessages = new LinkedList<UndeliveredAjaxMessage>();
-
-    AjaxListener(AjaxWebClient client, long maximumReadTimeout) {
-        this.client = client;
-        this.maximumReadTimeout = maximumReadTimeout;
-        access();
-    }
-
-    public void access() {
-        lastAccess = System.currentTimeMillis();
-    }
-
-    public synchronized void setContinuation(Continuation continuation) {
-        this.continuation = continuation;
-    }
-
-    public LinkedList<UndeliveredAjaxMessage> getUndeliveredMessages() {
-        return undeliveredMessages;
-    }
-    
-    public synchronized void onMessageAvailable(MessageConsumer consumer) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("message for " + consumer + " continuation=" + continuation);
-        }
-        if (continuation != null) {
-            try {
-                Message message = consumer.receive(10);
-                LOG.debug( "message is " + message );
-                if( message != null ) {
-                    if( continuation.isSuspended() ) {
-                        LOG.debug( "Resuming suspended continuation " + continuation );
-                        continuation.setAttribute("undelivered_message", new UndeliveredAjaxMessage( message, consumer ) );
-                        continuation.resume();
-                    } else {
-                        LOG.debug( "Message available, but continuation is already resumed.  Buffer for next time." );
-                        bufferMessageForDelivery( message, consumer );
-                    }
-                }
-            } catch (Exception e) {
-                LOG.error("Error receiving message " + e, e);
-            }
-            
-        } else if (System.currentTimeMillis() - lastAccess > 2 * this.maximumReadTimeout) {
-            new Thread() {
-                public void run() {
-                    client.closeConsumers();
-                };
-            }.start();
-        } else {
-            try {
-                Message message = consumer.receive(10);
-                bufferMessageForDelivery( message, consumer );
-            } catch (Exception e) {
-                LOG.error("Error receiving message " + e, e);
-            }
-        }
-    }
-    
-    public void bufferMessageForDelivery( Message message, MessageConsumer consumer ) {
-        if( message != null ) {
-            synchronized( undeliveredMessages ) {
-                undeliveredMessages.addLast( new UndeliveredAjaxMessage( message, consumer ) );
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxServlet.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxServlet.java
deleted file mode 100644
index b29bf05..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxServlet.java
+++ /dev/null
@@ -1,100 +0,0 @@
-//========================================================================
-//Copyright 2006 Mort Bay Consulting Pty. Ltd.
-//------------------------------------------------------------------------
-//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.
-//========================================================================
-
-package org.apache.activemq.web;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/* ------------------------------------------------------------ */
-/**
- * AjaxServlet. The AjaxServlet extends the {@link MessageListenerServlet} with
- * the capability to server the <code>amq.js</code> script and associated
- * scripts from resources within the activemq-web jar. The amq.js script is the
- * client side companion to the MessageListenerServlet and supports sending
- * messages and long polling for receiving messages (Also called Comet style
- * Ajax).
- */
-public class AjaxServlet extends MessageListenerServlet {
-
-    private static final long serialVersionUID = -3875280764356406114L;
-    private Map<String, byte[]> jsCache = new HashMap<String, byte[]>();
-    private long jsLastModified = 1000 * (System.currentTimeMillis() / 1000);
-
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        if (request.getPathInfo() != null && request.getPathInfo().endsWith(".js")) {
-            doJavaScript(request, response);
-        } else {
-            super.doGet(request, response);
-        }
-    }
-
-    protected void doJavaScript(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
-
-        // Look for a local resource first.
-        String js = request.getServletPath() + request.getPathInfo();
-        URL url = getServletContext().getResource(js);
-        if (url != null) {
-            getServletContext().getNamedDispatcher("default").forward(request, response);
-            return;
-        }
-
-        // Serve from the classpath resources
-        String resource = "org/apache/activemq/web" + request.getPathInfo();
-        synchronized (jsCache) {
-
-            byte[] data = jsCache.get(resource);
-            if (data == null) {
-                InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
-                if (in != null) {
-                    ByteArrayOutputStream out = new ByteArrayOutputStream();
-                    byte[] buf = new byte[4096];
-                    int len = in.read(buf);
-                    while (len >= 0) {
-                        out.write(buf, 0, len);
-                        len = in.read(buf);
-                    }
-                    in.close();
-                    out.close();
-                    data = out.toByteArray();
-                    jsCache.put(resource, data);
-                }
-            }
-
-            if (data != null) {
-
-                long ifModified = request.getDateHeader("If-Modified-Since");
-
-                if (ifModified == jsLastModified) {
-                    response.sendError(HttpServletResponse.SC_NOT_MODIFIED);
-                } else {
-                    response.setContentType("application/x-javascript");
-                    response.setContentLength(data.length);
-                    response.setDateHeader("Last-Modified", jsLastModified);
-                    response.getOutputStream().write(data);
-                }
-            } else {
-                response.sendError(HttpServletResponse.SC_NOT_FOUND);
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxWebClient.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxWebClient.java
deleted file mode 100644
index 62a022c..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AjaxWebClient.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.web;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Date;
-
-import javax.jms.MessageConsumer;
-import javax.servlet.http.HttpServletRequest;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.activemq.MessageAvailableConsumer;
-
-/*
- * Collection of all data needed to fulfill requests from a single web client.
- */
-public class AjaxWebClient extends WebClient {
-    private static final Logger LOG = LoggerFactory.getLogger(AjaxWebClient.class);
-    
-    // an instance which has not been accessed in this many milliseconds can be removed.
-    final long expireAfter = 60 * 1000;
-    
-    Map<MessageAvailableConsumer, String> idMap;
-    Map<MessageAvailableConsumer, String> destinationNameMap;
-    AjaxListener listener;
-    Long lastAccessed;
-    
-    public AjaxWebClient( HttpServletRequest request, long maximumReadTimeout ) {
-        // 'id' meaning the first argument to the JavaScript addListener() function.
-        // used to indicate which JS callback should handle a given message.
-        this.idMap = new HashMap<MessageAvailableConsumer, String>();
-        
-        // map consumers to destinations like topic://test, etc.
-        this.destinationNameMap = new HashMap<MessageAvailableConsumer, String>();
-        
-        this.listener = new AjaxListener( this, maximumReadTimeout );
-        
-        this.lastAccessed = this.getNow();
-    }
-    
-    public Map<MessageAvailableConsumer, String> getIdMap() {
-        return this.idMap;
-    }
-    
-    public Map<MessageAvailableConsumer, String> getDestinationNameMap() {
-        return this.destinationNameMap;
-    }
-    
-    public AjaxListener getListener() {
-        return this.listener;
-    }
-    
-    public long getMillisSinceLastAccessed() {
-        return this.getNow() - this.lastAccessed;
-    }
-    
-    public void updateLastAccessed() {
-        this.lastAccessed = this.getNow();
-    }
-    
-    public boolean closeIfExpired() {
-        long now = (new Date()).getTime();
-        boolean returnVal = false;
-        if( this.getMillisSinceLastAccessed() > this.expireAfter ) {
-            this.close();
-            returnVal = true;
-        }
-        return returnVal;
-    }
-    
-    protected long getNow() {
-        return (new Date()).getTime();
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AuditFilter.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/AuditFilter.java
deleted file mode 100644
index 0b37341..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/AuditFilter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.web;
-
-import org.apache.activemq.broker.util.AuditLogEntry;
-import org.apache.activemq.broker.util.AuditLogService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.servlet.*;
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-
-public class AuditFilter implements Filter {
-
-    private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit");
-
-    private boolean audit;
-    private AuditLogService auditLog;
-
-    public void init(FilterConfig filterConfig) throws ServletException {
-        audit = "true".equalsIgnoreCase(System.getProperty("org.apache.activemq.audit"));
-        if (audit) {
-            auditLog = AuditLogService.getAuditLog();
-        }
-    }
-
-    public void destroy() {
-    }
-
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
-        if (audit && request instanceof HttpServletRequest) {
-
-            HttpServletRequest http = (HttpServletRequest)request;
-            AuditLogEntry entry = new HttpAuditLogEntry();
-            if (http.getRemoteUser() != null) {
-                entry.setUser(http.getRemoteUser());
-            }
-            entry.setTimestamp(System.currentTimeMillis());
-            entry.setOperation(http.getRequestURI());
-            entry.setRemoteAddr(http.getRemoteAddr());
-            entry.getParameters().put("params", http.getParameterMap());
-            auditLog.log(entry);
-        }
-        chain.doFilter(request, response);
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java
deleted file mode 100644
index d4bf13a..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacade.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * 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.web;
-
-import java.util.Collection;
-
-import org.apache.activemq.broker.jmx.*;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * A facade for either a local in JVM broker or a remote broker over JMX
- *
- * 
- * 
- */
-public interface BrokerFacade {
-
-	/**
-	 * The name of the active broker (f.e. 'localhost' or 'my broker').
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	String getBrokerName() throws Exception;
-
-	/**
-	 * Admin view of the broker.
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	BrokerViewMBean getBrokerAdmin() throws Exception;
-
-	/**
-	 * All queues known to the broker.
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<QueueViewMBean> getQueues() throws Exception;
-
-	/**
-	 * All topics known to the broker.
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<TopicViewMBean> getTopics() throws Exception;
-
-	/**
-	 * All active consumers of a queue.
-	 * 
-	 * @param queueName
-	 *            the name of the queue, not <code>null</code>
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<SubscriptionViewMBean> getQueueConsumers(String queueName)
-			throws Exception;
-
-	/**
-	 * Active durable subscribers to topics of the broker.
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<DurableSubscriptionViewMBean> getDurableTopicSubscribers()
-			throws Exception;
-
-
-	/**
-	 * Inactive durable subscribers to topics of the broker.
-	 *
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<DurableSubscriptionViewMBean> getInactiveDurableTopicSubscribers()
-			throws Exception;
-
-	/**
-	 * The names of all transport connectors of the broker (f.e. openwire, ssl)
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<String> getConnectors() throws Exception;
-
-	/**
-	 * A transport connectors.
-	 * 
-	 * @param name
-	 *            name of the connector (f.e. openwire)
-	 * @return <code>null</code> if not found
-	 * @throws Exception
-	 */
-	ConnectorViewMBean getConnector(String name) throws Exception;
-
-	/**
-	 * All connections to all transport connectors of the broker.
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<ConnectionViewMBean> getConnections() throws Exception;
-
-	/**
-	 * The names of all connections to a specific transport connectors of the
-	 * broker.
-	 * 
-	 * @see #getConnection(String)
-	 * @param connectorName
-	 *            not <code>null</code>
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<String> getConnections(String connectorName) throws Exception;
-
-	/**
-	 * A specific connection to the broker.
-	 * 
-	 * @param connectionName
-	 *            the name of the connection, not <code>null</code>
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	ConnectionViewMBean getConnection(String connectionName) throws Exception;
-	/**
-	 * Returns all consumers of a connection.
-	 * 
-	 * @param connectionName
-	 *            the name of the connection, not <code>null</code>
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<SubscriptionViewMBean> getConsumersOnConnection(
-			String connectionName) throws Exception;
-	/**
-	 * The brokers network connectors.
-	 * 
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-	Collection<NetworkConnectorViewMBean> getNetworkConnectors()
-			throws Exception;
-
-
-	/**
-	 * The brokers network bridges.
-	 *
-	 * @return not <code>null</code>
-	 * @throws Exception
-	 */
-    Collection<NetworkBridgeViewMBean> getNetworkBridges()
-            throws Exception;
-
-    /**
-	 * Purges the given destination
-	 * 
-	 * @param destination
-	 * @throws Exception
-	 */
-	void purgeQueue(ActiveMQDestination destination) throws Exception;
-	/**
-	 * Get the view of the queue with the specified name.
-	 * 
-	 * @param name
-	 *            not <code>null</code>
-	 * @return <code>null</code> if no queue with this name exists
-	 * @throws Exception
-	 */
-	QueueViewMBean getQueue(String name) throws Exception;
-	/**
-	 * Get the view of the topic with the specified name.
-	 * 
-	 * @param name
-	 *            not <code>null</code>
-	 * @return <code>null</code> if no topic with this name exists
-	 * @throws Exception
-	 */
-	TopicViewMBean getTopic(String name) throws Exception;
-	
-	/**
-	 * Get the JobScheduler MBean
-	 * @return the jobScheduler or null if not configured
-	 * @throws Exception
-	 */
-	JobSchedulerViewMBean getJobScheduler() throws Exception;
-	
-	/**
-     * Get the JobScheduler MBean
-     * @return the jobScheduler or null if not configured
-     * @throws Exception
-     */
-    Collection<JobFacade> getScheduledJobs() throws Exception;
-
-    boolean isJobSchedulerStarted();
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
deleted file mode 100644
index 2d36d7c..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * 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.web;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import javax.management.ObjectName;
-import javax.management.QueryExp;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.TabularData;
-
-import org.apache.activemq.broker.jmx.*;
-import org.springframework.util.StringUtils;
-
-/**
- * A useful base class for an implementation of {@link BrokerFacade}
- * 
- * 
- */
-public abstract class BrokerFacadeSupport implements BrokerFacade {
-    public abstract ManagementContext getManagementContext();
-    public abstract Set queryNames(ObjectName name, QueryExp query) throws Exception;
-    public abstract Object newProxyInstance( ObjectName objectName, Class interfaceClass, boolean notificationBroadcaster) throws Exception;
-
-    public Collection<QueueViewMBean> getQueues() throws Exception {
-        BrokerViewMBean broker = getBrokerAdmin();
-        if (broker == null) {
-            return Collections.EMPTY_LIST;
-        }
-        ObjectName[] queues = broker.getQueues();
-        return getManagedObjects(queues, QueueViewMBean.class);
-    }
-
-    public Collection<TopicViewMBean> getTopics() throws Exception {
-        BrokerViewMBean broker = getBrokerAdmin();
-        if (broker == null) {
-            return Collections.EMPTY_LIST;
-        }
-        ObjectName[] queues = broker.getTopics();
-        return getManagedObjects(queues, TopicViewMBean.class);
-    }
-
-    public Collection<DurableSubscriptionViewMBean> getDurableTopicSubscribers() throws Exception {
-        BrokerViewMBean broker = getBrokerAdmin();
-        if (broker == null) {
-            return Collections.EMPTY_LIST;
-        }
-        ObjectName[] queues = broker.getDurableTopicSubscribers();
-        return getManagedObjects(queues, DurableSubscriptionViewMBean.class);
-    }
-
-    public Collection<DurableSubscriptionViewMBean> getInactiveDurableTopicSubscribers() throws Exception {
-        BrokerViewMBean broker = getBrokerAdmin();
-        if (broker == null) {
-            return Collections.EMPTY_LIST;
-        }
-        ObjectName[] queues = broker.getInactiveDurableTopicSubscribers();
-        return getManagedObjects(queues, DurableSubscriptionViewMBean.class);
-    }
-
-    public QueueViewMBean getQueue(String name) throws Exception {
-        return (QueueViewMBean) getDestinationByName(getQueues(), name);
-    }
-
-    public TopicViewMBean getTopic(String name) throws Exception {
-        return (TopicViewMBean) getDestinationByName(getTopics(), name);
-    }
-
-    protected DestinationViewMBean getDestinationByName(Collection<? extends DestinationViewMBean> collection,
-            String name) {
-        Iterator<? extends DestinationViewMBean> iter = collection.iterator();
-        while (iter.hasNext()) {
-            DestinationViewMBean destinationViewMBean = iter.next();
-            if (name.equals(destinationViewMBean.getName())) {
-                return destinationViewMBean;
-            }
-        }
-        return null;
-    }
-
-    @SuppressWarnings("unchecked")
-    protected <T> Collection<T> getManagedObjects(ObjectName[] names, Class<T> type) throws Exception {
-        List<T> answer = new ArrayList<T>();
-        for (int i = 0; i < names.length; i++) {
-            ObjectName name = names[i];
-            T value = (T) newProxyInstance(name, type, true);
-            if (value != null) {
-                answer.add(value);
-            }
-        }
-        return answer;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<ConnectionViewMBean> getConnections() throws Exception {
-        String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName + ",Type=Connection,*");
-        Set<ObjectName> queryResult = queryNames(query, null);
-        return getManagedObjects(queryResult.toArray(new ObjectName[queryResult.size()]), ConnectionViewMBean.class);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<String> getConnections(String connectorName) throws Exception {
-        String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Connection,ConnectorName=" + connectorName + ",*");
-        Set<ObjectName> queryResult = queryNames(query, null);
-        Collection<String> result = new ArrayList<String>(queryResult.size());
-        for (ObjectName on : queryResult) {
-            String name = StringUtils.replace(on.getKeyProperty("Connection"), "_", ":");
-            result.add(name);
-        }
-        return result;
-    }
-
-    @SuppressWarnings("unchecked")
-    public ConnectionViewMBean getConnection(String connectionName) throws Exception {
-        connectionName = StringUtils.replace(connectionName, ":", "_");
-        String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Connection,*,Connection=" + connectionName);
-        Set<ObjectName> queryResult = queryNames(query, null);
-        if (queryResult.size() == 0)
-            return null;
-        ObjectName objectName = queryResult.iterator().next();
-        return (ConnectionViewMBean) newProxyInstance(objectName, ConnectionViewMBean.class,
-                true);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<String> getConnectors() throws Exception {
-        String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName + ",Type=Connector,*");
-        Set<ObjectName> queryResult = queryNames(query, null);
-        Collection<String> result = new ArrayList<String>(queryResult.size());
-        for (ObjectName on : queryResult)
-            result.add(on.getKeyProperty("ConnectorName"));
-        return result;
-    }
-
-    public ConnectorViewMBean getConnector(String name) throws Exception {
-        String brokerName = getBrokerName();
-        ObjectName objectName = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Connector,ConnectorName=" + name);
-        return (ConnectorViewMBean) newProxyInstance(objectName, ConnectorViewMBean.class, true);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<NetworkConnectorViewMBean> getNetworkConnectors() throws Exception {
-        String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName + ",Type=NetworkConnector,*");
-        Set<ObjectName> queryResult = queryNames(query, null);
-        return getManagedObjects(queryResult.toArray(new ObjectName[queryResult.size()]),
-                NetworkConnectorViewMBean.class);
-    }
-
-    public Collection<NetworkBridgeViewMBean> getNetworkBridges() throws Exception {
-        String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName + ",Type=NetworkBridge,*");
-        Set<ObjectName> queryResult = queryNames(query, null);
-        return getManagedObjects(queryResult.toArray(new ObjectName[queryResult.size()]),
-                NetworkBridgeViewMBean.class);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<SubscriptionViewMBean> getQueueConsumers(String queueName) throws Exception {
-        String brokerName = getBrokerName();
-        queueName = StringUtils.replace(queueName, "\"", "_");
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Subscription,destinationType=Queue,destinationName=" + queueName + ",*");
-        Set<ObjectName> queryResult = queryNames(query, null);
-        return getManagedObjects(queryResult.toArray(new ObjectName[queryResult.size()]), SubscriptionViewMBean.class);
-    }
-
-    @SuppressWarnings("unchecked")
-    public Collection<SubscriptionViewMBean> getConsumersOnConnection(String connectionName) throws Exception {
-        connectionName = StringUtils.replace(connectionName, ":", "_");
-        String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Subscription,clientId=" + connectionName + ",*");
-        Set<ObjectName> queryResult = queryNames(query, null);
-        return getManagedObjects(queryResult.toArray(new ObjectName[queryResult.size()]), SubscriptionViewMBean.class);
-    }
-
-    public JobSchedulerViewMBean getJobScheduler() throws Exception {
-        ObjectName name = getBrokerAdmin().getJMSJobScheduler();
-        return (JobSchedulerViewMBean) newProxyInstance(name, JobSchedulerViewMBean.class, true);
-    }
-
-    public Collection<JobFacade> getScheduledJobs() throws Exception {
-        JobSchedulerViewMBean jobScheduler = getJobScheduler();
-        List<JobFacade> result = new ArrayList<JobFacade>();
-        TabularData table = jobScheduler.getAllJobs();
-        for (Object object : table.values()) {
-            CompositeData cd = (CompositeData) object;
-            JobFacade jf = new JobFacade(cd);
-            result.add(jf);
-        }
-        return result;
-    }
-
-
-    public boolean isJobSchedulerStarted() {
-        try {
-            JobSchedulerViewMBean jobScheduler = getJobScheduler();
-            return true;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/ConnectionQuery.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/ConnectionQuery.java
deleted file mode 100644
index 27d5334..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/ConnectionQuery.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.web;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.apache.activemq.broker.jmx.ConnectionViewMBean;
-import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
-
-/**
- * Query for a single connection.
- * 
- * @author ms
- */
-public class ConnectionQuery {
-
-	private final BrokerFacade mBrokerFacade;
-	private String mConnectionID;
-
-	public ConnectionQuery(BrokerFacade brokerFacade) {
-		mBrokerFacade = brokerFacade;
-	}
-
-	public void destroy() {
-		// empty
-	}
-
-	public void setConnectionID(String connectionID) {
-		mConnectionID = connectionID;
-	}
-
-	public String getConnectionID() {
-		return mConnectionID;
-	}
-
-	public ConnectionViewMBean getConnection() throws Exception {
-		String connectionID = getConnectionID();
-		if (connectionID == null)
-			return null;
-		return mBrokerFacade.getConnection(connectionID);
-	}
-
-	public Collection<SubscriptionViewMBean> getConsumers() throws Exception {
-		String connectionID = getConnectionID();
-		if (connectionID == null)
-			return Collections.emptyList();
-		return mBrokerFacade.getConsumersOnConnection(connectionID);
-	}
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java
deleted file mode 100644
index cf2e362..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.web;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.springframework.web.servlet.ModelAndView;
-
-/**
- * 
- */
-public class DestinationFacade {
-
-    private String jmsDestination;
-    private String jmsDestinationType;
-    private BrokerFacade brokerFacade;
-
-    public DestinationFacade(BrokerFacade brokerFacade) {
-        this.brokerFacade = brokerFacade;
-    }
-
-    public String toString() {
-        return super.toString() + "[destination:" + jmsDestination + "; type=" + jmsDestinationType + "]";
-    }
-
-    // Operations
-    // -------------------------------------------------------------------------
-    public void removeDestination() throws Exception {
-        getValidDestination();
-        if (isQueue()) {
-            getBrokerAdmin().removeQueue(getJMSDestination());
-        } else {
-            getBrokerAdmin().removeTopic(getJMSDestination());
-        }
-    }
-
-    public void addDestination() throws Exception {
-        if (isQueue()) {
-            getBrokerAdmin().addQueue(getValidDestination());
-        } else {
-            getBrokerAdmin().addTopic(getValidDestination());
-        }
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public BrokerViewMBean getBrokerAdmin() throws Exception {
-        if (brokerFacade == null) {
-            throw new IllegalArgumentException("No brokerFacade injected!");
-        }
-        BrokerViewMBean answer = brokerFacade.getBrokerAdmin();
-        if (answer == null) {
-            throw new IllegalArgumentException("No brokerAdmin on the injected brokerFacade: " + brokerFacade);
-        }
-        return answer;
-    }
-
-    public BrokerFacade getBrokerFacade() {
-        return brokerFacade;
-    }
-
-    public boolean isQueue() {
-        if (jmsDestinationType != null && jmsDestinationType.equalsIgnoreCase("topic")) {
-            return false;
-        }
-        return true;
-    }
-
-    public String getJMSDestination() {
-        return jmsDestination;
-    }
-
-    public void setJMSDestination(String destination) {
-        this.jmsDestination = destination;
-    }
-
-    public String getJMSDestinationType() {
-        return jmsDestinationType;
-    }
-
-    public void setJMSDestinationType(String type) {
-        this.jmsDestinationType = type;
-    }
-
-    protected ActiveMQDestination createDestination() {
-        byte destinationType = isQueue() ? ActiveMQDestination.QUEUE_TYPE : ActiveMQDestination.TOPIC_TYPE;
-        return ActiveMQDestination.createDestination(getValidDestination(), destinationType);
-    }
-
-    protected String getValidDestination() {
-        if (jmsDestination == null) {
-            throw new IllegalArgumentException("No JMSDestination parameter specified");
-        }
-        return jmsDestination;
-    }
-    
-    protected QueueViewMBean getQueueView() throws Exception {
-        String name = getPhysicalDestinationName();
-        return getBrokerFacade().getQueue(name);
-    }    
-
-    protected ModelAndView redirectToRequest(HttpServletRequest request) {
-        String view = "redirect:" + request.getRequestURI();
-        return new ModelAndView(view);
-    }
-
-    protected ModelAndView redirectToBrowseView() {
-        return new ModelAndView("redirect:" + (isQueue() ? "queues.jsp" : "topics.jsp"));
-    }
-
-    protected String getPhysicalDestinationName() {
-        return createDestination().getPhysicalName();
-    }
-    
-    public String[] getSupportedHttpMethods() {
-    	return new String[]{"GET", "POST"};
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java
deleted file mode 100644
index 9709152..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.web;
-
-/**
- * 
- * 
- */
-public class DurableSubscriberFacade extends DestinationFacade {
-
-    private String clientId;
-    private String subscriberName;
-
-    public DurableSubscriberFacade(BrokerFacade brokerFacade) {
-        super(brokerFacade);
-    }
-
-    public String getClientId() {
-        return clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public String getSubscriberName() {
-        return subscriberName;
-    }
-
-    public void setSubscriberName(String subscriberName) {
-        this.subscriberName = subscriberName;
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/HttpAuditLogEntry.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/HttpAuditLogEntry.java
deleted file mode 100644
index 8282603..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/HttpAuditLogEntry.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.web;
-
-import org.apache.activemq.broker.util.AuditLogEntry;
-
-import java.util.Arrays;
-import java.util.Map;
-
-public class HttpAuditLogEntry extends AuditLogEntry {
-    @Override
-    public String toString() {
-        String formattedParams = "";
-        Map<String, String[]> params = (Map<String, String[]>)parameters.get("params");
-        if (params != null) {
-            for (String paramName : params.keySet()) {
-                formattedParams += paramName + "='" + Arrays.toString(params.get(paramName)) + "' ";
-            }
-        }
-
-        return user + " requested " + operation + " [" + formattedParams + "] from  " + remoteAddr +" at " + getFormattedTime();
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/JobFacade.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/JobFacade.java
deleted file mode 100644
index a7b429f..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/JobFacade.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.web;
-
-import javax.management.openmbean.CompositeData;
-
-public class JobFacade {
-    private final CompositeData data;
-    public JobFacade(CompositeData data) {
-        this.data = data;
-    }
-    public String getCronEntry() {
-        return data.get("cronEntry").toString();
-    }
-
-    public String getJobId() {
-        return toString(data.get("jobId"));
-    }
-
-    public String getNextExecutionTime() {
-        return toString(data.get("next"));
-    }
-    
-    public long getDelay() {
-        Long result = (Long) data.get("delay");
-        if (result != null) {
-            return result.longValue();
-        }
-        return 0l;
-    }
-
-    public long getPeriod() {
-        Long result = (Long) data.get("period");
-        if (result != null) {
-            return result.longValue();
-        }
-        return 0l;
-    }
-
-    public int getRepeat() {
-        Integer result = (Integer) data.get("repeat");
-        if (result != null) {
-            return result.intValue();
-        }
-        return 0;
-    }
-
-    public String getStart() {
-        return toString(data.get("start"));
-    }
-
-    private String toString(Object object) {
-        return object != null ? object.toString() : "";
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java
deleted file mode 100644
index 99e0cd8..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.web;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.management.ObjectName;
-import javax.management.QueryExp;
-
-import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.jmx.BrokerView;
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.broker.jmx.ManagedRegionBroker;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.Queue;
-import org.apache.activemq.command.ActiveMQDestination;
-
-/**
- * An implementation of {@link BrokerFacade} which uses a local in JVM broker
- * 
- * 
- */
-public class LocalBrokerFacade extends BrokerFacadeSupport {
-	private BrokerService brokerService;
-
-	public LocalBrokerFacade(BrokerService brokerService) {
-		this.brokerService = brokerService;
-	}
-
-	public BrokerService getBrokerService() {
-		return brokerService;
-	}
-	public String getBrokerName() throws Exception {
-		return brokerService.getBrokerName();
-	}
-	public Broker getBroker() throws Exception {
-		return brokerService.getBroker();
-	}
-	public ManagementContext getManagementContext() {
-		return brokerService.getManagementContext();
-	}
-	public BrokerViewMBean getBrokerAdmin() throws Exception {
-		return brokerService.getAdminView();
-	}
-	public ManagedRegionBroker getManagedBroker() throws Exception {
-		BrokerView adminView = brokerService.getAdminView();
-		if (adminView == null) {
-			return null;
-		}
-		return adminView.getBroker();
-	}
-
-    public void purgeQueue(ActiveMQDestination destination) throws Exception {
-        Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
-        for (Iterator i = destinations.iterator(); i.hasNext();) {
-            Destination dest = (Destination) i.next();
-            if (dest instanceof Queue) {
-                Queue regionQueue = (Queue) dest;
-                regionQueue.purge();
-            }
-        }
-    }
-
-    @Override
-    public Set queryNames(ObjectName name, QueryExp query) throws Exception {
-        return getManagementContext().queryNames(name, query);
-    }
-
-    @Override
-    public Object newProxyInstance(ObjectName objectName, Class interfaceClass, boolean notificationBroadcaster) {
-        return getManagementContext().newProxyInstance(objectName, interfaceClass, notificationBroadcaster);
-    }
-    
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
deleted file mode 100644
index 45c5fda..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/**
- * 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.web;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.*;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.activemq.MessageAvailableConsumer;
-import org.apache.activemq.MessageAvailableListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.eclipse.jetty.continuation.Continuation;
-import org.eclipse.jetty.continuation.ContinuationSupport;
-
-/**
- * A servlet for sending and receiving messages to/from JMS destinations using
- * HTTP POST for sending and HTTP GET for receiving. <p/> You can specify the
- * destination and whether it is a topic or queue via configuration details on
- * the servlet or as request parameters. <p/> For reading messages you can
- * specify a readTimeout parameter to determine how long the servlet should
- * block for. The servlet can be configured with the following init parameters:
- * <dl>
- * <dt>defaultReadTimeout</dt>
- * <dd>The default time in ms to wait for messages. May be overridden by a
- * request using the 'timeout' parameter</dd>
- * <dt>maximumReadTimeout</dt>
- * <dd>The maximum value a request may specify for the 'timeout' parameter</dd>
- * <dt>maximumMessages</dt>
- * <dd>maximum messages to send per response</dd>
- * <dt></dt>
- * <dd></dd>
- * </dl>
- * 
- * 
- */
-public class MessageListenerServlet extends MessageServletSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(MessageListenerServlet.class);
-    
-    private String readTimeoutParameter = "timeout";
-    private long defaultReadTimeout = -1;
-    private long maximumReadTimeout = 25000;
-    private int maximumMessages = 100;
-    private Timer clientCleanupTimer = new Timer();
-    private HashMap<String,AjaxWebClient> ajaxWebClients = new HashMap<String,AjaxWebClient>();
-    
-    public void init() throws ServletException {
-        ServletConfig servletConfig = getServletConfig();
-        String name = servletConfig.getInitParameter("defaultReadTimeout");
-        if (name != null) {
-            defaultReadTimeout = asLong(name);
-        }
-        name = servletConfig.getInitParameter("maximumReadTimeout");
-        if (name != null) {
-            maximumReadTimeout = asLong(name);
-        }
-        name = servletConfig.getInitParameter("maximumMessages");
-        if (name != null) {
-            maximumMessages = (int)asLong(name);
-        }
-        clientCleanupTimer.schedule( new ClientCleaner(), 5000, 60000 );
-    }
-    
-    /**
-     * Sends a message to a destination or manage subscriptions. If the the
-     * content type of the POST is
-     * <code>application/x-www-form-urlencoded</code>, then the form
-     * parameters "destination", "message" and "type" are used to pass a message
-     * or a subscription. If multiple messages or subscriptions are passed in a
-     * single post, then additional parameters are shortened to "dN", "mN" and
-     * "tN" where N is an index starting from 1. The type is either "send",
-     * "listen" or "unlisten". For send types, the message is the text of the
-     * TextMessage, otherwise it is the ID to be used for the subscription. If
-     * the content type is not <code>application/x-www-form-urlencoded</code>,
-     * then the body of the post is sent as the message to a destination that is
-     * derived from a query parameter, the URL or the default destination.
-     * 
-     * @param request
-     * @param response
-     * @throws ServletException
-     * @throws IOException
-     */
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-
-        // lets turn the HTTP post into a JMS Message
-        AjaxWebClient client = getAjaxWebClient( request );
-        String messageIds = "";
-
-        synchronized (client) {
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("POST client=" + client + " session=" + request.getSession().getId() + " clientId="+ request.getParameter("clientId") + " info=" + request.getPathInfo() + " contentType=" + request.getContentType());
-                // dump(request.getParameterMap());
-            }
-
-            int messages = 0;
-
-            // loop until no more messages
-            while (true) {
-                // Get the message parameters. Multiple messages are encoded
-                // with more compact parameter names.
-                String destinationName = request.getParameter(messages == 0 ? "destination" : ("d" + messages));
-
-                if (destinationName == null) {
-                    destinationName = request.getHeader("destination");
-                }
-
-                String message = request.getParameter(messages == 0 ? "message" : ("m" + messages));
-                String type = request.getParameter(messages == 0 ? "type" : ("t" + messages));
-
-                if (destinationName == null || message == null || type == null) {
-                    break;
-                }
-
-                try {
-                    Destination destination = getDestination(client, request, destinationName);
-
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(messages + " destination=" + destinationName + " message=" + message + " type=" + type);
-                        LOG.debug(destination + " is a " + destination.getClass().getName());
-                    }
-
-                    messages++;
-
-                    if ("listen".equals(type)) {
-                        AjaxListener listener = client.getListener();
-                        Map<MessageAvailableConsumer, String> consumerIdMap = client.getIdMap();
-                        Map<MessageAvailableConsumer, String> consumerDestinationNameMap = client.getDestinationNameMap();
-                        client.closeConsumer(destination); // drop any existing
-                        // consumer.
-                        MessageAvailableConsumer consumer = (MessageAvailableConsumer)client.getConsumer(destination, request.getHeader(WebClient.selectorName));
-
-                        consumer.setAvailableListener(listener);
-                        consumerIdMap.put(consumer, message);
-                        consumerDestinationNameMap.put(consumer, destinationName);
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Subscribed: " + consumer + " to " + destination + " id=" + message);
-                        }
-                    } else if ("unlisten".equals(type)) {
-                        Map<MessageAvailableConsumer, String> consumerIdMap = client.getIdMap();
-                        Map consumerDestinationNameMap = client.getDestinationNameMap();
-                        MessageAvailableConsumer consumer = (MessageAvailableConsumer)client.getConsumer(destination, request.getHeader(WebClient.selectorName));
-
-                        consumer.setAvailableListener(null);
-                        consumerIdMap.remove(consumer);
-                        consumerDestinationNameMap.remove(consumer);
-                        client.closeConsumer(destination);
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Unsubscribed: " + consumer);
-                        }
-                    } else if ("send".equals(type)) {
-                        TextMessage text = client.getSession().createTextMessage(message);
-                        appendParametersToMessage(request, text);
-
-                        client.send(destination, text);
-                        messageIds += text.getJMSMessageID() + "\n";
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Sent " + message + " to " + destination);
-                        }
-                    } else {
-                        LOG.warn("unknown type " + type);
-                    }
-
-                } catch (JMSException e) {
-                    LOG.warn("jms", e);
-                }
-            }
-        }
-
-        if ("true".equals(request.getParameter("poll"))) {
-            try {
-                // TODO return message IDs
-                doMessages(client, request, response);
-            } catch (JMSException e) {
-                throw new ServletException("JMS problem: " + e, e);
-            }
-        } else {
-            // handle simple POST of a message
-            if (request.getContentLength() != 0 && (request.getContentType() == null || !request.getContentType().toLowerCase().startsWith("application/x-www-form-urlencoded"))) {
-                try {
-                    Destination destination = getDestination(client, request);
-                    String body = getPostedMessageBody(request);
-                    TextMessage message = client.getSession().createTextMessage(body);
-                    appendParametersToMessage(request, message);
-
-                    client.send(destination, message);
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Sent to destination: " + destination + " body: " + body);
-                    }
-                    messageIds += message.getJMSMessageID() + "\n";
-                } catch (JMSException e) {
-                    throw new ServletException(e);
-                }
-            }
-
-            response.setContentType("text/plain");
-            response.setHeader("Cache-Control", "no-cache");
-            response.getWriter().print(messageIds);
-        }
-    }
-
-    /**
-     * Supports a HTTP DELETE to be equivlanent of consuming a singe message
-     * from a queue
-     */
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        try {
-            AjaxWebClient client = getAjaxWebClient(request);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("GET client=" + client + " session=" + request.getSession().getId() + " clientId="+ request.getParameter("clientId") + " uri=" + request.getRequestURI() + " query=" + request.getQueryString());
-            }
-
-            doMessages(client, request, response);
-        } catch (JMSException e) {
-            throw new ServletException("JMS problem: " + e, e);
-        }
-    }
-
-    /**
-     * Reads a message from a destination up to some specific timeout period
-     * 
-     * @param client The webclient
-     * @param request
-     * @param response
-     * @throws ServletException
-     * @throws IOException
-     */
-    protected void doMessages(AjaxWebClient client, HttpServletRequest request, HttpServletResponse response) throws JMSException, IOException {
-
-        int messages = 0;
-        // This is a poll for any messages
-
-        long timeout = getReadTimeout(request);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("doMessage timeout=" + timeout);
-        }
-        
-        // this is non-null if we're resuming the continuation.
-        // attributes set in AjaxListener
-        UndeliveredAjaxMessage undelivered_message = null;
-        Message message = null;
-        undelivered_message = (UndeliveredAjaxMessage)request.getAttribute("undelivered_message");
-        if( undelivered_message != null ) {
-            message = (Message)undelivered_message.getMessage();
-        }
-        
-        synchronized (client) {
-
-            List consumers = client.getConsumers();
-            MessageAvailableConsumer consumer = null;
-            if( undelivered_message != null ) {
-                consumer = (MessageAvailableConsumer)undelivered_message.getConsumer();
-            }
-
-            if (message == null) {
-                // Look for a message that is ready to go
-                for (int i = 0; message == null && i < consumers.size(); i++) {
-                    consumer = (MessageAvailableConsumer)consumers.get(i);
-                    if (consumer.getAvailableListener() == null) {
-                        continue;
-                    }
-    
-                    // Look for any available messages
-                    message = consumer.receive(10);
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("received " + message + " from " + consumer);
-                    }
-                }
-            }
-            
-            // prepare the response
-            response.setContentType("text/xml");
-            response.setHeader("Cache-Control", "no-cache");
-            
-            if (message == null && client.getListener().getUndeliveredMessages().size() == 0) {
-                Continuation continuation = ContinuationSupport.getContinuation(request);
-                
-                if (continuation.isExpired()) {
-                    response.setStatus(HttpServletResponse.SC_OK);
-                    StringWriter swriter = new StringWriter();
-                    PrintWriter writer = new PrintWriter(swriter);
-                    writer.println("<ajax-response>");
-                    writer.print("</ajax-response>");
-
-                    writer.flush();
-                    String m = swriter.toString();
-                    response.getWriter().println(m); 
-                    
-                    return;
-                }
-
-                continuation.setTimeout(timeout);
-                continuation.suspend();
-                LOG.debug( "Suspending continuation " + continuation );
-                
-                // Fetch the listeners
-                AjaxListener listener = client.getListener();
-                listener.access();
-
-                // register this continuation with our listener.
-                listener.setContinuation(continuation);
-                
-                return;
-            }
-
-            StringWriter swriter = new StringWriter();
-            PrintWriter writer = new PrintWriter(swriter);
-            
-            Map<MessageAvailableConsumer, String> consumerIdMap = client.getIdMap();
-            Map<MessageAvailableConsumer, String> consumerDestinationNameMap = client.getDestinationNameMap();
-            response.setStatus(HttpServletResponse.SC_OK);
-            writer.println("<ajax-response>");
-            
-            // Send any message we already have
-            if (message != null) {
-                String id = consumerIdMap.get(consumer);
-                String destinationName = consumerDestinationNameMap.get(consumer);
-                LOG.debug( "sending pre-existing message" );
-                writeMessageResponse(writer, message, id, destinationName);
-                
-                messages++;
-            }
-            
-            // send messages buffered while continuation was unavailable.
-            LinkedList<UndeliveredAjaxMessage> undeliveredMessages = ((AjaxListener)consumer.getAvailableListener()).getUndeliveredMessages();
-            LOG.debug("Send " + undeliveredMessages.size() + " unconsumed messages");
-            synchronized( undeliveredMessages ) {
-                for (Iterator<UndeliveredAjaxMessage> it = undeliveredMessages.iterator(); it.hasNext(); ) {
-                    messages++;
-                    UndeliveredAjaxMessage undelivered = it.next();
-                    Message msg = (Message)undelivered.getMessage();
-                    consumer = (MessageAvailableConsumer)undelivered.getConsumer();
-                    String id = consumerIdMap.get(consumer);
-                    String destinationName = consumerDestinationNameMap.get(consumer);
-                    LOG.debug( "sending undelivered/buffered messages" );
-                    LOG.debug( "msg:" +msg+ ", id:" +id+ ", destinationName:" +destinationName);
-                    writeMessageResponse(writer, msg, id, destinationName);
-                    it.remove();
-                    if (messages >= maximumMessages) {
-                        break;
-                    }
-                }
-            }
-            
-            // Send the rest of the messages
-            for (int i = 0; i < consumers.size() && messages < maximumMessages; i++) {
-                consumer = (MessageAvailableConsumer)consumers.get(i);
-                if (consumer.getAvailableListener() == null) {
-                    continue;
-                }
-
-                // Look for any available messages
-                while (messages < maximumMessages) {
-                    message = consumer.receiveNoWait();
-                    if (message == null) {
-                        break;
-                    }
-                    messages++;
-                    String id = consumerIdMap.get(consumer);
-                    String destinationName = consumerDestinationNameMap.get(consumer);
-                    LOG.debug( "sending final available messages" );
-                    writeMessageResponse(writer, message, id, destinationName);
-                }
-            }
-
-            writer.print("</ajax-response>");
-
-            writer.flush();
-            String m = swriter.toString();
-            response.getWriter().println(m);
-        }
-
-    }
-
-    protected void writeMessageResponse(PrintWriter writer, Message message, String id, String destinationName) throws JMSException, IOException {
-        writer.print("<response id='");
-        writer.print(id);
-        writer.print("'");
-        if (destinationName != null) {
-            writer.print(" destination='" + destinationName + "' ");
-        }
-        writer.print(">");
-        if (message instanceof TextMessage) {
-            TextMessage textMsg = (TextMessage)message;
-            String txt = textMsg.getText();
-            if (txt.startsWith("<?")) {
-                txt = txt.substring(txt.indexOf("?>") + 2);
-            }
-            writer.print(txt);
-        } else if (message instanceof ObjectMessage) {
-            ObjectMessage objectMsg = (ObjectMessage)message;
-            Object object = objectMsg.getObject();
-            writer.print(object.toString());
-        }
-        writer.println("</response>");
-    }
-    
-    /*
-     * Return the AjaxWebClient for this session+clientId.
-     * Create one if it does not already exist.
-     */
-    protected AjaxWebClient getAjaxWebClient( HttpServletRequest request ) {
-        long now = (new Date()).getTime();
-        HttpSession session = request.getSession(true);
-        
-        String clientId = request.getParameter( "clientId" );      
-        // if user doesn't supply a 'clientId', we'll just use a default.
-        if( clientId == null ) {
-            clientId = "defaultAjaxWebClient";
-        }
-        String sessionKey = session.getId() + '-' + clientId;
-        
-        AjaxWebClient client = ajaxWebClients.get( sessionKey );
-        synchronized (ajaxWebClients) {
-            // create a new AjaxWebClient if one does not already exist for this sessionKey.
-            if( client == null ) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug( "creating new AjaxWebClient in "+sessionKey );
-                }
-                client = new AjaxWebClient( request, maximumReadTimeout );
-                ajaxWebClients.put( sessionKey, client );
-            }
-            client.updateLastAccessed();
-        }
-        return client;
-    }
-
-    /**
-     * @return the timeout value for read requests which is always >= 0 and <=
-     *         maximumReadTimeout to avoid DoS attacks
-     */
-    protected long getReadTimeout(HttpServletRequest request) {
-        long answer = defaultReadTimeout;
-
-        String name = request.getParameter(readTimeoutParameter);
-        if (name != null) {
-            answer = asLong(name);
-        }
-        if (answer < 0 || answer > maximumReadTimeout) {
-            answer = maximumReadTimeout;
-        }
-        return answer;
-    }
-    
-    /*
-     * an instance of this class runs every minute (started in init), to clean up old web clients & free resources.
-     */
-    private class ClientCleaner extends TimerTask {
-        public void run() {
-            if( LOG.isDebugEnabled() ) {
-                LOG.debug( "Cleaning up expired web clients." );
-            }
-            
-            synchronized( ajaxWebClients ) {
-                Iterator it = ajaxWebClients.entrySet().iterator();
-                while ( it.hasNext() ) {
-                    Map.Entry<String,AjaxWebClient> e = (Map.Entry<String,AjaxWebClient>)it.next();
-                    String key = e.getKey();
-                    AjaxWebClient val = e.getValue();
-                    if ( LOG.isDebugEnabled() ) {
-                        LOG.debug( "AjaxWebClient " + key + " last accessed " + val.getMillisSinceLastAccessed()/1000 + " seconds ago." );
-                    }
-                    // close an expired client and remove it from the ajaxWebClients hash.
-                    if( val.closeIfExpired() ) {
-                        if ( LOG.isDebugEnabled() ) {
-                            LOG.debug( "Removing expired AjaxWebClient " + key );
-                        }
-                        it.remove();
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java
deleted file mode 100644
index 1d0ec06..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageQuery.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.web;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.ObjectMessage;
-import javax.jms.QueueBrowser;
-import javax.jms.TextMessage;
-
-/**
- * Allow the user to browse a message on a queue by its ID
- * 
- * 
- */
-public class MessageQuery extends QueueBrowseQuery {
-
-    private String id;
-    private Message message;
-
-    public MessageQuery(BrokerFacade brokerFacade, SessionPool sessionPool) throws JMSException {
-        super(brokerFacade, sessionPool);
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public void setMessage(Message message) {
-        this.message = message;
-    }
-
-    public Message getMessage() throws JMSException {
-        if (message == null) {
-            if (id != null) {
-                QueueBrowser tempBrowser=getBrowser();
-                Enumeration iter = tempBrowser.getEnumeration();
-                while (iter.hasMoreElements()) {
-                    Message item = (Message) iter.nextElement();
-                    if (id.equals(item.getJMSMessageID())) {
-                        message = item;
-                        break;
-                    }
-                }
-                tempBrowser.close();
-            }
-
-        }
-        return message;
-    }
-
-    public Object getBody() throws JMSException {
-        Message message = getMessage();
-        if (message instanceof TextMessage) {
-            return ((TextMessage) message).getText();
-        }
-        if (message instanceof ObjectMessage) {
-            try {
-                return ((ObjectMessage) message).getObject();
-            } catch (JMSException e) {
-                //message could not be parsed, make the reason available
-                return e;
-            }
-        }
-        if (message instanceof MapMessage) {
-            return createMapBody((MapMessage) message);
-        }
-        return null;
-    }
-
-    public Map<String, Object> getPropertiesMap() throws JMSException {
-        Map<String, Object> answer = new HashMap<String, Object>();
-        Message aMessage = getMessage();
-        Enumeration iter = aMessage.getPropertyNames();
-        while (iter.hasMoreElements()) {
-            String name = (String) iter.nextElement();
-            Object value = aMessage.getObjectProperty(name);
-            if (value != null) {
-                answer.put(name, value);
-            }
-        }
-        return answer;
-    }
-
-    protected Map<String, Object> createMapBody(MapMessage mapMessage) throws JMSException {
-        Map<String, Object> answer = new HashMap<String, Object>();
-        Enumeration iter = mapMessage.getMapNames();
-        while (iter.hasMoreElements()) {
-            String name = (String) iter.nextElement();
-            Object value = mapMessage.getObject(name);
-            if (value != null) {
-                answer.put(name, value);
-            }
-        }
-        return answer;
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java
deleted file mode 100644
index 8936e55..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/**
- * 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.web;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.HashMap;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.MessageAvailableConsumer;
-import org.apache.activemq.MessageAvailableListener;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.eclipse.jetty.continuation.Continuation;
-import org.eclipse.jetty.continuation.ContinuationSupport;
-
-/**
- * A servlet for sending and receiving messages to/from JMS destinations using
- * HTTP POST for sending and HTTP GET for receiving. <p/> You can specify the
- * destination and whether it is a topic or queue via configuration details on
- * the servlet or as request parameters. <p/> For reading messages you can
- * specify a readTimeout parameter to determine how long the servlet should
- * block for.
- * 
- * 
- */
-public class MessageServlet extends MessageServletSupport {
-
-    private static final long serialVersionUID = 8737914695188481219L;
-
-    private static final Logger LOG = LoggerFactory.getLogger(MessageServlet.class);
-
-    private String readTimeoutParameter = "readTimeout";
-    private long defaultReadTimeout = -1;
-    private long maximumReadTimeout = 20000;
-    private long requestTimeout = 1000;
-    
-    private HashMap<String, WebClient> clients = new HashMap<String, WebClient>();
-
-    public void init() throws ServletException {
-        ServletConfig servletConfig = getServletConfig();
-        String name = servletConfig.getInitParameter("defaultReadTimeout");
-        if (name != null) {
-            defaultReadTimeout = asLong(name);
-        }
-        name = servletConfig.getInitParameter("maximumReadTimeout");
-        if (name != null) {
-            maximumReadTimeout = asLong(name);
-        }
-        name = servletConfig.getInitParameter("replyTimeout");
-        if (name != null) {
-        	requestTimeout = asLong(name);
-        }        
-    }
-
-    /**
-     * Sends a message to a destination
-     * 
-     * @param request
-     * @param response
-     * @throws ServletException
-     * @throws IOException
-     */
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        // lets turn the HTTP post into a JMS Message
-        try {
-
-            String action = request.getParameter("action");
-            String clientId = request.getParameter("clientId");
-            if (action != null && clientId != null && action.equals("unsubscribe")) {
-                LOG.info("Unsubscribing client " + clientId);
-                WebClient client = getWebClient(request);
-                client.close();
-                clients.remove(clientId);
-                return;
-            }
-
-            WebClient client = getWebClient(request);
-
-            String text = getPostedMessageBody(request);
-
-            // lets create the destination from the URI?
-            Destination destination = getDestination(client, request);
-            if (destination == null) {
-                throw new NoDestinationSuppliedException();
-            }
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Sending message to: " + destination + " with text: " + text);
-            }
-
-            boolean sync = isSync(request);
-            TextMessage message = client.getSession().createTextMessage(text);
-
-            if (sync) {
-               String point = "activemq:" 
-            	   + ((ActiveMQDestination)destination).getPhysicalName().replace("//", "")
-            	   + "?requestTimeout=" + requestTimeout;
-               try {
-            	   String body = (String)client.getProducerTemplate().requestBody(point, text);
-                   ActiveMQTextMessage answer = new ActiveMQTextMessage();
-                   answer.setText(body);
-            	   writeMessageResponse(response.getWriter(), answer);
-               } catch (Exception e) {
-            	   IOException ex = new IOException();
-            	   ex.initCause(e);
-            	   throw ex;
-               }
-            } else {
-                appendParametersToMessage(request, message);
-                boolean persistent = isSendPersistent(request);
-                int priority = getSendPriority(request);
-                long timeToLive = getSendTimeToLive(request);            	
-                client.send(destination, message, persistent, priority, timeToLive);
-            }
-
-            // lets return a unique URI for reliable messaging
-            response.setHeader("messageID", message.getJMSMessageID());
-            response.setStatus(HttpServletResponse.SC_OK);
-        } catch (JMSException e) {
-            throw new ServletException("Could not post JMS message: " + e, e);
-        }
-    }
-
-    /**
-     * Supports a HTTP DELETE to be equivlanent of consuming a singe message
-     * from a queue
-     */
-    protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        doMessages(request, response);
-    }
-
-    /**
-     * Supports a HTTP DELETE to be equivlanent of consuming a singe message
-     * from a queue
-     */
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        doMessages(request, response);
-    }
-
-    /**
-     * Reads a message from a destination up to some specific timeout period
-     * 
-     * @param request
-     * @param response
-     * @throws ServletException
-     * @throws IOException
-     */
-    protected void doMessages(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        try {
-            WebClient client = getWebClient(request);
-            Destination destination = getDestination(client, request);
-            if (destination == null) {
-                throw new NoDestinationSuppliedException();
-            }
-            MessageAvailableConsumer consumer = (MessageAvailableConsumer)client.getConsumer(destination, request.getHeader(WebClient.selectorName));
-            Message message = null;
-            message = (Message)request.getAttribute("message"); 
-            if (message != null) {
-                // we're resuming continuation,
-                // so just write the message and return
-                writeResponse(request, response, message);
-                return;
-            }
-            long timeout = getReadTimeout(request);
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Receiving message(s) from: " + destination + " with timeout: " + timeout);
-            }
-
-            Continuation continuation = null;
-            Listener listener = null;
-            
-
-            // Look for any available messages
-            message = consumer.receive(10);
-
-            // Get an existing Continuation or create a new one if there are
-            // no events.
-            if (message == null) {
-                continuation = ContinuationSupport.getContinuation(request);
-                
-                if (continuation.isExpired()) {
-                    response.setStatus(HttpServletResponse.SC_NO_CONTENT);
-                    return;
-                }
-
-                continuation.setTimeout(timeout);
-                continuation.suspend();
-                
-                // Fetch the listeners
-                listener = (Listener)consumer.getAvailableListener();
-                if (listener == null) {
-                    listener = new Listener(consumer);
-                    consumer.setAvailableListener(listener);
-                }
-
-                // register this continuation with our listener.
-                listener.setContinuation(continuation);
-            }
-
-            writeResponse(request, response, message);
-        } catch (JMSException e) {
-            throw new ServletException("Could not post JMS message: " + e, e);
-        }
-    }
-    
-    protected void writeResponse(HttpServletRequest request, HttpServletResponse response, Message message) throws IOException, JMSException {
-        int messages = 0;
-        try {
-
-            // write a responds
-            response.setContentType("text/xml");
-            PrintWriter writer = response.getWriter();
-
-            // handle any message(s)
-            if (message == null) {
-                // No messages so OK response of for ajax else no content.
-                response.setStatus(HttpServletResponse.SC_NO_CONTENT);
-            } else {
-                // We have at least one message so set up the response
-                response.setStatus(HttpServletResponse.SC_OK);
-                String type = getContentType(request);
-                if (type != null) {
-                    response.setContentType(type);
-                }
-                
-                setResponseHeaders(response, message);
-                writeMessageResponse(writer, message);
-            }
-        } finally {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Received " + messages + " message(s)");
-            }
-        }
-    }
-
-    protected void writeMessageResponse(PrintWriter writer, Message message) throws JMSException, IOException {
-        if (message instanceof TextMessage) {
-            TextMessage textMsg = (TextMessage)message;
-            String txt = textMsg.getText();
-            if (txt.startsWith("<?")) {
-                txt = txt.substring(txt.indexOf("?>") + 2);
-            }
-            writer.print(txt);
-        } else if (message instanceof ObjectMessage) {
-            ObjectMessage objectMsg = (ObjectMessage)message;
-            Object object = objectMsg.getObject();
-            writer.print(object.toString());
-        }
-    }
-
-    protected boolean isRicoAjax(HttpServletRequest request) {
-        String rico = request.getParameter("rico");
-        return rico != null && rico.equals("true");
-    }
-    
-    public WebClient getWebClient(HttpServletRequest request) {
-    	String clientId = request.getParameter("clientId");
-    	if (clientId != null) {
-    		synchronized(this) {
-    			LOG.debug("Getting local client [" + clientId + "]");
-    			WebClient client = clients.get(clientId);
-    			if (client == null) {
-    				LOG.debug("Creating new client [" + clientId + "]");
-    				client = new WebClient();
-    				clients.put(clientId, client);
-    			}
-    			return client;
-    		}
-    		
-    	} else {
-    		return WebClient.getWebClient(request);
-    	}
-    }    
-
-    protected String getContentType(HttpServletRequest request) {
-        /*
-         * log("Params: " + request.getParameterMap()); Enumeration iter =
-         * request.getHeaderNames(); while (iter.hasMoreElements()) { String
-         * name = (String) iter.nextElement(); log("Header: " + name + " = " +
-         * request.getHeader(name)); }
-         */
-        String value = request.getParameter("xml");
-        if (value != null && "true".equalsIgnoreCase(value)) {
-            return "text/xml";
-        }
-        return null;
-    }
-
-    protected void setResponseHeaders(HttpServletResponse response, Message message) throws JMSException {
-        response.setHeader("destination", message.getJMSDestination().toString());
-        response.setHeader("id", message.getJMSMessageID());
-    }
-
-    /**
-     * @return the timeout value for read requests which is always >= 0 and <=
-     *         maximumReadTimeout to avoid DoS attacks
-     */
-    protected long getReadTimeout(HttpServletRequest request) {
-        long answer = defaultReadTimeout;
-
-        String name = request.getParameter(readTimeoutParameter);
-        if (name != null) {
-            answer = asLong(name);
-        }
-        if (answer < 0 || answer > maximumReadTimeout) {
-            answer = maximumReadTimeout;
-        }
-        return answer;
-    }
-
-    /*
-     * Listen for available messages and wakeup any continuations.
-     */
-    private static class Listener implements MessageAvailableListener {
-        MessageConsumer consumer;
-        Continuation continuation;
-
-        Listener(MessageConsumer consumer) {
-            this.consumer = consumer;
-        }
-
-        public void setContinuation(Continuation continuation) {
-            synchronized (consumer) {
-                this.continuation = continuation;
-            }
-        }
-
-        public void onMessageAvailable(MessageConsumer consumer) {
-            assert this.consumer == consumer;
-
-            synchronized (this.consumer) {
-                if (continuation != null) {
-                    try {
-                        Message message = consumer.receiveNoWait();
-                        continuation.setAttribute("message", message);
-                    } catch (Exception e) {
-                        LOG.error("Error receiving message " + e, e);
-                    }
-                    continuation.resume();   
-                }
-            }
-        }
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
deleted file mode 100644
index 94c3622..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/**
- * 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.web;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.TextMessage;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A useful base class for any JMS related servlet; there are various ways to
- * map JMS operations to web requests so we put most of the common behaviour in
- * a reusable base class. This servlet can be configured with the following init
- * paramters
- * <dl>
- * <dt>topic</dt>
- * <dd>Set to 'true' if the servle should default to using topics rather than
- * channels</dd>
- * <dt>destination</dt>
- * <dd>The default destination to use if one is not specifiied</dd>
- * <dt></dt>
- * <dd></dd>
- * </dl>
- * 
- * 
- */
-public abstract class MessageServletSupport extends HttpServlet {
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(MessageServletSupport.class);
-
-    private boolean defaultTopicFlag = true;
-    private Destination defaultDestination;
-    private String destinationParameter = "destination";
-    private String typeParameter = "type";
-    private String bodyParameter = "body";
-    private boolean defaultMessagePersistent = true;
-    private int defaultMessagePriority = 5;
-    private long defaultMessageTimeToLive;
-    private String destinationOptions;
-
-    public void init(ServletConfig servletConfig) throws ServletException {
-        super.init(servletConfig);
-
-        destinationOptions = servletConfig.getInitParameter("destinationOptions");
-
-        String name = servletConfig.getInitParameter("topic");
-        if (name != null) {
-            defaultTopicFlag = asBoolean(name);
-        }
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Defaulting to use topics: " + defaultTopicFlag);
-        }
-        name = servletConfig.getInitParameter("destination");
-        if (name != null) {
-            if (defaultTopicFlag) {
-                defaultDestination = new ActiveMQTopic(name);
-            } else {
-                defaultDestination = new ActiveMQQueue(name);
-            }
-        }
-
-        // lets check to see if there's a connection factory set
-        WebClient.initContext(getServletContext());
-    }
-
-    public static boolean asBoolean(String param) {
-        return asBoolean(param, false);
-    }
-
-    public static boolean asBoolean(String param, boolean defaultValue) {
-        if (param == null) {
-            return defaultValue;
-        } else {
-            return param.equalsIgnoreCase("true");
-        }
-    }
-
-    protected void appendParametersToMessage(HttpServletRequest request, TextMessage message) throws JMSException {
-        Map parameterMap = request.getParameterMap();
-        if (parameterMap == null) {
-            return;
-        }
-        Map parameters = new HashMap(parameterMap);
-        String correlationID = asString(parameters.remove("JMSCorrelationID"));
-        if (correlationID != null) {
-            message.setJMSCorrelationID(correlationID);
-        }
-        Long expiration = asLong(parameters.remove("JMSExpiration"));
-        if (expiration != null) {
-            message.setJMSExpiration(expiration.longValue());
-        }
-        Destination replyTo = asDestination(parameters.remove("JMSReplyTo"));
-        if (replyTo != null) {
-            message.setJMSReplyTo(replyTo);
-        }
-        String type = (String)asString(parameters.remove("JMSType"));
-        if (correlationID != null) {
-            message.setJMSType(type);
-        }
-
-        for (Iterator iter = parameters.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            String name = (String)entry.getKey();
-            if (!destinationParameter.equals(name) && !typeParameter.equals(name) && !bodyParameter.equals(name) && !"JMSDeliveryMode".equals(name) && !"JMSPriority".equals(name)
-                && !"JMSTimeToLive".equals(name)) {
-                Object value = entry.getValue();
-                if (value instanceof Object[]) {
-                    Object[] array = (Object[])value;
-                    if (array.length == 1) {
-                        value = array[0];
-                    } else {
-                        LOG.warn("Can't use property: " + name + " which is of type: " + value.getClass().getName() + " value");
-                        value = null;
-                        int size = array.length;
-                        for (int i = 0; i < size; i++) {
-                            LOG.debug("value[" + i + "] = " + array[i]);
-                        }
-                    }
-                }
-                if (value != null) {
-                    message.setObjectProperty(name, value);
-                }
-            }
-        }
-    }
-
-    protected long getSendTimeToLive(HttpServletRequest request) {
-        String text = request.getParameter("JMSTimeToLive");
-        if (text != null) {
-            return asLong(text);
-        }
-        return defaultMessageTimeToLive;
-    }
-
-    protected int getSendPriority(HttpServletRequest request) {
-        String text = request.getParameter("JMSPriority");
-        if (text != null) {
-            return asInt(text);
-        }
-        return defaultMessagePriority;
-    }
-
-    protected boolean isSendPersistent(HttpServletRequest request) {
-        String text = request.getParameter("JMSDeliveryMode");
-        if (text != null) {
-            return text.trim().equalsIgnoreCase("persistent");
-        }
-        return defaultMessagePersistent;
-    }
-
-    protected boolean isSync(HttpServletRequest request) {
-        String text = request.getParameter("sync");
-        if (text != null) {
-            return true;
-        }
-        return false;
-    }    
-
-    protected Destination asDestination(Object value) {
-        if (value instanceof Destination) {
-            return (Destination)value;
-        }
-        if (value instanceof String) {
-            String text = (String)value;
-            return ActiveMQDestination.createDestination(text, ActiveMQDestination.QUEUE_TYPE);
-        }
-        if (value instanceof String[]) {
-            String text = ((String[])value)[0];
-            if (text == null) {
-                return null;
-            }
-            return ActiveMQDestination.createDestination(text, ActiveMQDestination.QUEUE_TYPE);
-        }
-        return null;
-    }
-
-    protected Integer asInteger(Object value) {
-        if (value instanceof Integer) {
-            return (Integer)value;
-        }
-        if (value instanceof String) {
-            return Integer.valueOf((String)value);
-        }
-        if (value instanceof String[]) {
-            return Integer.valueOf(((String[])value)[0]);
-        }
-        return null;
-    }
-
-    protected Long asLong(Object value) {
-        if (value instanceof Long) {
-            return (Long)value;
-        }
-        if (value instanceof String) {
-            return Long.valueOf((String)value);
-        }
-        if (value instanceof String[]) {
-            return Long.valueOf(((String[])value)[0]);
-        }
-        return null;
-    }
-
-    protected long asLong(String name) {
-        return Long.parseLong(name);
-    }
-
-    protected int asInt(String name) {
-        return Integer.parseInt(name);
-    }
-
-    protected String asString(Object value) {
-        if (value instanceof String[]) {
-            return ((String[])value)[0];
-        }
-
-        if (value != null) {
-            return value.toString();
-        }
-
-        return null;
-    }
-
-    /**
-     * @return the destination to use for the current request
-     */
-    protected Destination getDestination(WebClient client, HttpServletRequest request) throws JMSException {
-        String destinationName = request.getParameter(destinationParameter);
-        if (destinationName == null  || destinationName.equals("")) {
-            if (defaultDestination == null) {
-                return getDestinationFromURI(client, request);
-            } else {
-                return defaultDestination;
-            }
-        }
-
-        return getDestination(client, request, destinationName);
-    }
-
-    /**
-     * @return the destination to use for the current request using the relative
-     *         URI from where this servlet was invoked as the destination name
-     */
-    protected Destination getDestinationFromURI(WebClient client, HttpServletRequest request) throws JMSException {
-        String uri = request.getPathInfo();
-        if (uri == null) {
-            return null;
-        }
-
-        // replace URI separator with JMS destination separator
-        if (uri.startsWith("/")) {
-            uri = uri.substring(1);
-            if (uri.length() == 0) {
-                return null;
-            }
-        }
-
-        uri = uri.replace('/', '.');
-        LOG.debug("destination uri=" + uri);
-        return getDestination(client, request, uri);
-    }
-
-    /**
-     * @return the Destination object for the given destination name
-     */
-    protected Destination getDestination(WebClient client, HttpServletRequest request, String destinationName) throws JMSException {
-
-        // TODO cache destinations ???
-
-        boolean isTopic = defaultTopicFlag;
-        if (destinationName.startsWith("topic://")) {
-            isTopic = true;
-        } else if (destinationName.startsWith("channel://") || destinationName.startsWith("queue://")) {
-            isTopic = false;
-        } else {
-            isTopic = isTopic(request);
-        }
-        if (destinationName.indexOf("://") != -1) {
-            destinationName = destinationName.substring(destinationName.indexOf("://") + 3);
-        }
-
-        if (destinationOptions != null) {
-            destinationName += "?" + destinationOptions;
-        }
-        LOG.debug(destinationName + " (" + (isTopic ? "topic" : "queue") + ")");
-        if (isTopic) {
-            return client.getSession().createTopic(destinationName);
-        } else {
-            return client.getSession().createQueue(destinationName);
-        }
-    }
-
-    /**
-     * @return true if the current request is for a topic destination, else
-     *         false if its for a queue
-     */
-    protected boolean isTopic(HttpServletRequest request) {
-        String typeText = request.getParameter(typeParameter);
-        if (typeText == null) {
-            return defaultTopicFlag;
-        }
-        return typeText.equalsIgnoreCase("topic");
-    }
-
-    /**
-     * @return the text that was posted to the servlet which is used as the body
-     *         of the message to be sent
-     */
-    protected String getPostedMessageBody(HttpServletRequest request) throws IOException {
-        String answer = request.getParameter(bodyParameter);
-        if (answer == null && "text/xml".equals(request.getContentType())) {
-            // lets read the message body instead
-            BufferedReader reader = request.getReader();
-            StringBuffer buffer = new StringBuffer();
-            while (true) {
-                String line = reader.readLine();
-                if (line == null) {
-                    break;
-                }
-                buffer.append(line);
-                buffer.append("\n");
-            }
-            return buffer.toString();
-        }
-        return answer;
-    }
-    
-    protected String getSelector(HttpServletRequest request) throws IOException {
-    	return request.getHeader(WebClient.selectorName);
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoDestinationSuppliedException.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoDestinationSuppliedException.java
deleted file mode 100644
index fa3e202..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoDestinationSuppliedException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.web;
-
-import javax.servlet.ServletException;
-
-/**
- * Exception thrown if there was no destination available
- *
- * 
- */
-public class NoDestinationSuppliedException extends ServletException {
-
-    public NoDestinationSuppliedException() {
-        super("Could not perform the JMS operation as no Destination was supplied");
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoSuchViewStyleException.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoSuchViewStyleException.java
deleted file mode 100644
index cc9d8ff..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoSuchViewStyleException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.web;
-
-import javax.servlet.ServletException;
-
-/**
- * 
- * 
- */
-public class NoSuchViewStyleException extends ServletException {
-
-    private static final long serialVersionUID = -3590398087507019767L;
-    
-    private final String style;
-
-    public NoSuchViewStyleException(String style, Throwable cause) {
-        super("The view style '" + style + "' could not be created", cause);
-        this.style = style;
-    }
-
-    public String getStyle() {
-        return style;
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/PortfolioPublishServlet.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/PortfolioPublishServlet.java
deleted file mode 100644
index 046ea0d..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/PortfolioPublishServlet.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * 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.web;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Hashtable;
-import java.util.Map;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * A servlet which will publish dummy market data prices
- * 
- * 
- */
-public class PortfolioPublishServlet extends MessageServletSupport {
-
-    private static final int MAX_DELTA_PERCENT = 1;
-    private static final Map<String, Double> LAST_PRICES = new Hashtable<String, Double>();
-
-    public void init() throws ServletException {
-        super.init();
-    }
-
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        PrintWriter out = response.getWriter();
-        String[] stocks = request.getParameterValues("stocks");
-        if (stocks == null || stocks.length == 0) {
-            out.println("<html><body>No <b>stocks</b> query parameter specified. Cannot publish market data</body></html>");
-        } else {
-            Integer total = (Integer)request.getSession(true).getAttribute("total");
-            if (total == null) {
-                total = Integer.valueOf(0);
-            }
-
-            int count = getNumberOfMessages(request);
-            total = Integer.valueOf(total.intValue() + count);
-            request.getSession().setAttribute("total", total);
-
-            try {
-                WebClient client = WebClient.getWebClient(request);
-                for (int i = 0; i < count; i++) {
-                    sendMessage(client, stocks);
-                }
-                out.print("<html><head><meta http-equiv='refresh' content='");
-                String refreshRate = request.getParameter("refresh");
-                if (refreshRate == null || refreshRate.length() == 0) {
-                    refreshRate = "1";
-                }
-                out.print(refreshRate);
-                out.println("'/></head>");
-                out.println("<body>Published <b>" + count + "</b> of " + total + " price messages.  Refresh = " + refreshRate + "s");
-                out.println("</body></html>");
-
-            } catch (JMSException e) {
-                out.println("<html><body>Failed sending price messages due to <b>" + e + "</b></body></html>");
-                log("Failed to send message: " + e, e);
-            }
-        }
-    }
-
-    protected void sendMessage(WebClient client, String[] stocks) throws JMSException {
-        Session session = client.getSession();
-
-        int idx = 0;
-        while (true) {
-            idx = (int)Math.round(stocks.length * Math.random());
-            if (idx < stocks.length) {
-                break;
-            }
-        }
-        String stock = stocks[idx];
-        Destination destination = session.createTopic("STOCKS." + stock);
-        String stockText = createStockText(stock);
-        log("Sending: " + stockText + " on destination: " + destination);
-        Message message = session.createTextMessage(stockText);
-        client.send(destination, message);
-    }
-
-    protected String createStockText(String stock) {
-        Double value = LAST_PRICES.get(stock);
-        if (value == null) {
-            value = new Double(Math.random() * 100);
-        }
-
-        // lets mutate the value by some percentage
-        double oldPrice = value.doubleValue();
-        value = new Double(mutatePrice(oldPrice));
-        LAST_PRICES.put(stock, value);
-        double price = value.doubleValue();
-
-        double offer = price * 1.001;
-
-        String movement = (price > oldPrice) ? "up" : "down";
-        return "<price stock='" + stock + "' bid='" + price + "' offer='" + offer + "' movement='" + movement + "'/>";
-    }
-
-    protected double mutatePrice(double price) {
-        double percentChange = (2 * Math.random() * MAX_DELTA_PERCENT) - MAX_DELTA_PERCENT;
-
-        return price * (100 + percentChange) / 100;
-    }
-
-    protected int getNumberOfMessages(HttpServletRequest request) {
-        String name = request.getParameter("count");
-        if (name != null) {
-            return Integer.parseInt(name);
-        }
-        return 1;
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
deleted file mode 100644
index e2532b9..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.web;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-
-import org.springframework.beans.factory.DisposableBean;
-
-/**
- * 
- * 
- */
-public class QueueBrowseQuery extends DestinationFacade implements DisposableBean {
-    private SessionPool sessionPool;
-    private String selector;
-    private Session session;
-    private Queue queue;
-    private QueueBrowser browser;
-
-    public QueueBrowseQuery(BrokerFacade brokerFacade, SessionPool sessionPool) throws JMSException {
-        super(brokerFacade);
-        this.sessionPool = sessionPool;
-        this.session = sessionPool.borrowSession();
-        setJMSDestinationType("query");
-    }
-
-    public void destroy() throws Exception {
-        if (browser != null) {
-            browser.close();
-        }
-        sessionPool.returnSession(session);
-        session = null;
-    }
-
-    public QueueBrowser getBrowser() throws JMSException {
-        if (browser == null) {
-            browser = createBrowser();
-        }
-        return browser;
-    }
-
-    public void setBrowser(QueueBrowser browser) {
-        this.browser = browser;
-    }
-
-    public Queue getQueue() throws JMSException {
-        if (queue == null) {
-            queue = session.createQueue(getValidDestination());
-        }
-        return queue;
-    }
-
-    public void setQueue(Queue queue) {
-        this.queue = queue;
-    }
-
-    public String getSelector() {
-        return selector;
-    }
-
-    public void setSelector(String selector) {
-        this.selector = selector;
-    }
-
-    public Session getSession() {
-        return session;
-    }
-
-    public boolean isQueue() {
-        return true;
-    }
-
-    protected QueueBrowser createBrowser() throws JMSException {
-        return getSession().createBrowser(getQueue(), getSelector());
-    }
-
-    
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java
deleted file mode 100644
index c43e538..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * 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.web;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.activemq.util.FactoryFinder;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.web.view.MessageRenderer;
-import org.apache.activemq.web.view.XmlMessageRenderer;
-
-/**
- * Renders the contents of a queue using some kind of view. The URI is assumed
- * to be the queue. The following parameters can be used
- * <p/>
- * <ul>
- * <li>view - specifies the type of the view such as simple, xml, rss</li>
- * <li>selector - specifies the SQL 92 selector to apply to the queue</li>
- * </ul>
- *
- * 
- */
-public class QueueBrowseServlet extends HttpServlet {
-    private static FactoryFinder factoryFinder = new FactoryFinder("META-INF/services/org/apache/activemq/web/view/");
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        try {
-            WebClient client = WebClient.getWebClient(request);
-            Session session = client.getSession();
-            Queue queue = getQueue(request, session);
-            if (queue == null) {
-                throw new ServletException("No queue URI specified");
-            }
-
-            String msgId = request.getParameter("msgId");
-            if (msgId == null) {
-                MessageRenderer renderer = getMessageRenderer(request);
-                configureRenderer(request, renderer);
-
-                String selector = getSelector(request);
-                QueueBrowser browser = session.createBrowser(queue, selector);
-                renderer.renderMessages(request, response, browser);
-            }
-            else {
-                XmlMessageRenderer renderer = new XmlMessageRenderer();
-                QueueBrowser browser = session.createBrowser(queue, "JMSMessageID='" + msgId + "'");
-                if (!browser.getEnumeration().hasMoreElements()) {
-                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
-                    return;
-                }
-                Message message = (Message) browser.getEnumeration().nextElement();
-
-                PrintWriter writer = response.getWriter();
-                renderer.renderMessage(writer, request, response, browser, message);
-                writer.flush();
-            }
-        }
-        catch (JMSException e) {
-            throw new ServletException(e);
-        }
-    }
-
-    protected MessageRenderer getMessageRenderer(HttpServletRequest request) throws IOException, ServletException {
-        String style = request.getParameter("view");
-        if (style == null) {
-            style = "simple";
-        }
-        try {
-            return (MessageRenderer) factoryFinder.newInstance(style);
-        }
-        catch (IllegalAccessException e) {
-            throw new NoSuchViewStyleException(style, e);
-        }
-        catch (InstantiationException e) {
-            throw new NoSuchViewStyleException(style, e);
-        }
-        catch (ClassNotFoundException e) {
-            throw new NoSuchViewStyleException(style, e);
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    protected void configureRenderer(HttpServletRequest request, MessageRenderer renderer) {
-        Map<String, String> properties = new HashMap<String, String>();
-        for (Enumeration<String> iter = request.getParameterNames(); iter.hasMoreElements();) {
-            String name = (String) iter.nextElement();
-            properties.put(name, request.getParameter(name));
-        }
-        IntrospectionSupport.setProperties(renderer, properties);
-    }
-
-    protected String getSelector(HttpServletRequest request) {
-        return request.getParameter("selector");
-    }
-
-    protected Queue getQueue(HttpServletRequest request, Session session) throws JMSException {
-        String uri = request.getPathInfo();
-        if (uri == null) {
-            return null;
-        }
-
-        // replace URI separator with JMS destination separator
-        if (uri.startsWith("/")) {
-            uri = uri.substring(1);
-            if (uri.length() == 0) {
-                return null;
-            }
-        }
-        uri = uri.replace('/', '.');
-
-        return session.createQueue(uri);
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueConsumerQuery.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueConsumerQuery.java
deleted file mode 100644
index c5a21b9..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueConsumerQuery.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.web;
-
-import java.util.Collection;
-
-import javax.jms.JMSException;
-
-import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
-
-/**
- * Query for Queue consumers.
- * 
- * 
- */
-public class QueueConsumerQuery extends DestinationFacade {
-
-	public QueueConsumerQuery(BrokerFacade brokerFacade) throws JMSException {
-		super(brokerFacade);
-		setJMSDestinationType("queue");
-	}
-
-	public Collection<SubscriptionViewMBean> getConsumers() throws Exception {
-		return getBrokerFacade().getQueueConsumers(getJMSDestination());
-	}
-
-	public void destroy() {
-		// empty
-	}
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java
deleted file mode 100644
index 1ead437..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/**
- * 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.web;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.QueryExp;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.web.config.WebConsoleConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link BrokerFacade} which uses a JMX-Connection to communicate with a
- * broker
- * 
- * 
- */
-public class RemoteJMXBrokerFacade extends BrokerFacadeSupport {
-    
-    private static final transient Logger LOG = LoggerFactory.getLogger(RemoteJMXBrokerFacade.class);
-    
-    private String brokerName;
-    private JMXConnector connector;
-    private WebConsoleConfiguration configuration;
-
-    public void setBrokerName(String brokerName) {
-        this.brokerName = brokerName;
-    }
-
-    public WebConsoleConfiguration getConfiguration() {
-		return configuration;
-	}
-
-	public void setConfiguration(WebConsoleConfiguration configuration) {
-		this.configuration = configuration;
-	}
-
-	/**
-     * Shutdown this facade aka close any open connection.
-     */
-    public void shutdown() {
-        closeConnection();
-    }
-    
-    private ObjectName getBrokerObjectName(MBeanServerConnection connection)
-			throws IOException, MalformedObjectNameException {
-		Set<ObjectName> brokers = findBrokers(connection);
-		if (brokers.size() == 0) {
-			throw new IOException("No broker could be found in the JMX.");
-		}
-		ObjectName name = brokers.iterator().next();
-		return name;
-	}
-
-    public BrokerViewMBean getBrokerAdmin() throws Exception {
-        MBeanServerConnection connection = getMBeanServerConnection();
-
-        Set brokers = findBrokers(connection);
-        if (brokers.size() == 0) {
-            throw new IOException("No broker could be found in the JMX.");
-        }
-        ObjectName name = (ObjectName)brokers.iterator().next();
-        BrokerViewMBean mbean = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(connection, name, BrokerViewMBean.class, true);
-        return mbean;
-    }
-
-    public String getBrokerName() throws Exception,
-			MalformedObjectNameException {
-        return getBrokerAdmin().getBrokerName();
-    }
-    
-    protected MBeanServerConnection getMBeanServerConnection() throws Exception {
-        JMXConnector connector = this.connector;
-        if (isConnectionActive(connector)) {
-            return connector.getMBeanServerConnection();
-        }
-
-        synchronized (this) {
-            closeConnection();
-
-            LOG.debug("Creating a new JMX-Connection to the broker");
-            this.connector = createConnection();
-            return this.connector.getMBeanServerConnection();
-        }
-    }
-
-    protected boolean isConnectionActive(JMXConnector connector) {
-        if (connector == null) {
-            return false;
-        }
-
-        try {
-            MBeanServerConnection connection = connector.getMBeanServerConnection();
-            int brokerCount = findBrokers(connection).size();
-            return brokerCount > 0;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    protected JMXConnector createConnection() {
-
-        Map<String, Object> env = new HashMap<String, Object>();
-		if (this.configuration.getJmxUser() != null) {
-			env.put("jmx.remote.credentials", new String[] {
-					this.configuration.getJmxUser(),
-					this.configuration.getJmxPassword() });
-		}
-        Collection<JMXServiceURL> jmxUrls = this.configuration.getJmxUrls();
-
-        Exception exception = null;
-		for (JMXServiceURL url : jmxUrls) {
-			try {
-				JMXConnector connector = JMXConnectorFactory.connect(url, env);
-				connector.connect();
-				MBeanServerConnection connection = connector
-						.getMBeanServerConnection();
-
-				Set<ObjectName> brokers = findBrokers(connection);
-				if (brokers.size() > 0) {
-					LOG.info("Connected via JMX to the broker at " + url);
-					return connector;
-				}
-			} catch (Exception e) {
-				// Keep the exception for later
-				exception = e;
-			}
-		}
-		if (exception != null) {
-			if (exception instanceof RuntimeException) {
-				throw (RuntimeException) exception;
-			} else {
-				throw new RuntimeException(exception);
-			}
-		}
-		throw new IllegalStateException("No broker is found at any of the "
-				+ jmxUrls.size() + " configured urls");
-	}
-
-    protected synchronized void closeConnection() {
-        if (connector != null) {
-            try {
-                LOG.debug("Closing a connection to a broker (" + connector.getConnectionId() + ")");
-
-                connector.close();
-            } catch (IOException e) {
-                // Ignore the exception, since it most likly won't matter
-                // anymore
-            }
-        }
-    }
-
-	/**
-	 * Finds all ActiveMQ-Brokers registered on a certain JMX-Server or, if a
-	 * JMX-BrokerName has been set, the broker with that name.
-	 * 
-	 * @param connection
-	 *            not <code>null</code>
-	 * @return Set with ObjectName-elements
-	 * @throws IOException
-	 * @throws MalformedObjectNameException
-	 */
-	@SuppressWarnings("unchecked")
-	protected Set<ObjectName> findBrokers(MBeanServerConnection connection)
-			throws IOException, MalformedObjectNameException {
-		ObjectName name;
-		if (this.brokerName == null) {
-			name = new ObjectName("org.apache.activemq:Type=Broker,*");
-		} else {
-			name = new ObjectName("org.apache.activemq:BrokerName="
-					+ this.brokerName + ",Type=Broker");
-		}
-
-		Set<ObjectName> brokers = connection.queryNames(name, null);
-		return brokers;
-	}
-	
-	public void purgeQueue(ActiveMQDestination destination) throws Exception {
-		QueueViewMBean queue = getQueue(destination.getPhysicalName());
-		queue.purge();
-	}
-	
-	public ManagementContext getManagementContext() {
-		throw new IllegalStateException("not supported");
-	}
-
-	
-	@SuppressWarnings("unchecked")
-	protected <T> Collection<T> getManagedObjects(ObjectName[] names,
-			Class<T> type) {
-		MBeanServerConnection connection;
-		try {
-			connection = getMBeanServerConnection();
-		} catch (Exception e) {
-			throw new RuntimeException(e);
-		}
-
-		List<T> answer = new ArrayList<T>();
-		if (connection != null) {
-			for (int i = 0; i < names.length; i++) {
-				ObjectName name = names[i];
-				T value = (T) MBeanServerInvocationHandler.newProxyInstance(
-						connection, name, type, true);
-				if (value != null) {
-					answer.add(value);
-				}
-			}
-		}
-		return answer;
-    }
-
-    @Override
-    public Set queryNames(ObjectName name, QueryExp query) throws Exception {
-        return getMBeanServerConnection().queryNames(name, query);
-    }
-
-    @Override
-    public Object newProxyInstance(ObjectName objectName, Class interfaceClass,boolean notificationBroadcaster) throws Exception {
-        return MBeanServerInvocationHandler.newProxyInstance(getMBeanServerConnection(), objectName, interfaceClass, notificationBroadcaster);
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionFilter.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionFilter.java
deleted file mode 100644
index 9a69883..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionFilter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.web;
-
-import java.io.IOException;
-import java.util.UUID;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-/* ------------------------------------------------------------ */
-/**
- * SessionFilter. Simple filter to ensure that all clients have a session.
- * Prevents problems with AJAX requests.
- */
-public class SessionFilter implements Filter {
-
-    public void init(FilterConfig filterConfig) throws ServletException {
-    }
-
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
-    	// set secret to prevent CSRF attacks
-        ((HttpServletRequest)request).getSession(true).setAttribute("secret", UUID.randomUUID().toString());;
-        chain.doFilter(request, response);
-    }
-
-    public void destroy() {
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java
deleted file mode 100644
index 1c04e93..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionListener.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.web;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
-
-
-public class SessionListener implements HttpSessionListener {
-    private static final Logger LOG = LoggerFactory.getLogger(SessionListener.class);
-
-    public void sessionCreated(HttpSessionEvent se) {
-    }
-
-    public void sessionDestroyed(HttpSessionEvent se) {
-        WebClient client = WebClient.getWebClient(se.getSession());
-        if (client != null) {
-            client.close();
-        }
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionPool.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionPool.java
deleted file mode 100644
index ccfefeb..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionPool.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.web;
-
-import java.util.LinkedList;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-/**
- * A simple pool of JMS Session objects intended for use by Queue browsers.
- * 
- * 
- */
-public class SessionPool {
-
-    private ConnectionFactory connectionFactory;
-    private Connection connection;
-    private LinkedList<Session> sessions = new LinkedList<Session>();
-
-    public Connection getConnection() throws JMSException {
-        if (checkConnection()) {
-            return connection;
-        }
-
-        synchronized (this) {
-            connection = getConnectionFactory().createConnection();
-            connection.start();
-            return connection;
-        }
-    }
-
-    private boolean checkConnection() {
-        if (connection == null) {
-            return false;
-        }
-
-        try {
-            connection.getMetaData();
-            return true;
-        } catch (JMSException e) {
-            return false;
-        }
-    }
-
-    public void setConnection(Connection connection) {
-        this.connection = connection;
-    }
-
-    public ConnectionFactory getConnectionFactory() {
-        if (connectionFactory == null) {
-            throw new IllegalStateException("No ConnectionFactory has been set for the session pool");
-        }
-        return connectionFactory;
-    }
-
-    public void setConnectionFactory(ConnectionFactory connectionFactory) {
-        this.connectionFactory = connectionFactory;
-    }
-
-    public Session borrowSession() throws JMSException {
-        Session answer = null;
-        synchronized (sessions) {
-            if (sessions.isEmpty()) {
-                answer = createSession();
-            } else {
-                answer = sessions.removeLast();
-            }
-        }
-        return answer;
-    }
-
-    public void returnSession(Session session) {
-        if (session != null) {
-            synchronized (sessions) {
-                sessions.add(session);
-            }
-        }
-    }
-
-    protected Session createSession() throws JMSException {
-        return getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
deleted file mode 100644
index 8e4f3d3..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.web;
-
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * A facade for the broker in the same JVM and ClassLoader
- * 
- * 
- */
-public class SingletonBrokerFacade extends LocalBrokerFacade {
-    public SingletonBrokerFacade() {
-        super(findSingletonBroker());
-    }
-
-    protected static BrokerService findSingletonBroker() {
-        BrokerService broker = BrokerRegistry.getInstance().findFirst();
-        if (broker == null) {
-            throw new IllegalArgumentException("No BrokerService is registered with the BrokerRegistry. Are you sure there is a configured broker in the same ClassLoader?");
-        }
-        return broker;
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SpringBrokerContextListener.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/SpringBrokerContextListener.java
deleted file mode 100644
index 04e1626..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/SpringBrokerContextListener.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * 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.web;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.springframework.core.io.Resource;
-import org.springframework.web.context.support.ServletContextResource;
-
-/**
- * Used to configure and instance of ActiveMQ <tt>BrokerService</tt> using
- * ActiveMQ/Spring's xml configuration. <p/> The configuration file is specified
- * via the context init parameter <tt>brokerURI</tt>, typically: <code>
- * &lt;context-param&gt;
- * &lt;param-name&gt;brokerURI&lt;/param-name&gt;
- * &lt;param-value&gt;/WEB-INF/activemq.xml&lt;/param-value&gt;
- * &lt;/context-param&gt;
- * </code>
- * As a a default, if a <tt>brokerURI</tt> is not specified it will look up
- * for <tt>activemq.xml</tt>
- * 
- * 
- */
-public class SpringBrokerContextListener implements ServletContextListener {
-
-    /** broker uri context parameter name: <tt>brokerURI</tt> */
-    public static final String INIT_PARAM_BROKER_URI = "brokerURI";
-
-    /** the broker container instance */
-    private BrokerService brokerContainer;
-
-    /**
-     * Set the broker container to be used by this listener
-     * 
-     * @param container the container to be used.
-     */
-    protected void setBrokerService(BrokerService container) {
-        this.brokerContainer = container;
-    }
-
-    /**
-     * Return the broker container.
-     */
-    protected BrokerService getBrokerService() {
-        return this.brokerContainer;
-    }
-
-    public void contextInitialized(ServletContextEvent event) {
-        ServletContext context = event.getServletContext();
-        context.log("Creating ActiveMQ Broker...");
-        brokerContainer = createBroker(context);
-
-        context.log("Starting ActiveMQ Broker");
-        try {
-            brokerContainer.start();
-
-            context.log("Started ActiveMQ Broker");
-        } catch (Exception e) {
-            context.log("Failed to start ActiveMQ broker: " + e, e);
-        }
-    }
-
-    public void contextDestroyed(ServletContextEvent event) {
-        ServletContext context = event.getServletContext();
-        if (brokerContainer != null) {
-            try {
-                brokerContainer.stop();
-            } catch (Exception e) {
-                context.log("Failed to stop the ActiveMQ Broker: " + e, e);
-            }
-            brokerContainer = null;
-        }
-    }
-
-    /**
-     * Factory method to create a new ActiveMQ Broker
-     */
-    protected BrokerService createBroker(ServletContext context) {
-        String brokerURI = context.getInitParameter(INIT_PARAM_BROKER_URI);
-        if (brokerURI == null) {
-            brokerURI = "activemq.xml";
-        }
-        context.log("Loading ActiveMQ Broker configuration from: " + brokerURI);
-        Resource resource = new ServletContextResource(context, brokerURI);
-        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
-        try {
-            factory.afterPropertiesSet();
-        } catch (Exception e) {
-            context.log("Failed to create broker: " + e, e);
-        }
-        return factory.getBroker();
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/UndeliveredAjaxMessage.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/UndeliveredAjaxMessage.java
deleted file mode 100644
index 8320e9e..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/UndeliveredAjaxMessage.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.web;
-
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-
-class UndeliveredAjaxMessage {
-    private Message message;
-    private MessageConsumer consumer;
-    
-    UndeliveredAjaxMessage( Message message, MessageConsumer consumer ) {
-        this.message = message;
-        this.consumer = consumer;
-    }
-    
-    public MessageConsumer getConsumer() {
-        return this.consumer;
-    }
-    
-    public Message getMessage() {
-        return this.message;
-    }
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
deleted file mode 100644
index 5fdbc11..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/**
- * 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.web;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Semaphore;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionActivationListener;
-import javax.servlet.http.HttpSessionBindingEvent;
-import javax.servlet.http.HttpSessionBindingListener;
-import javax.servlet.http.HttpSessionEvent;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.MessageAvailableConsumer;
-import org.apache.activemq.camel.component.ActiveMQComponent;
-import org.apache.activemq.camel.component.ActiveMQConfiguration;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Represents a messaging client used from inside a web container typically
- * stored inside a HttpSession TODO controls to prevent DOS attacks with users
- * requesting many consumers TODO configure consumers with small prefetch.
- * 
- * 
- */
-public class WebClient implements HttpSessionActivationListener, HttpSessionBindingListener, Externalizable {
-
-    public static final String WEB_CLIENT_ATTRIBUTE = "org.apache.activemq.webclient";
-    public static final String CONNECTION_FACTORY_ATTRIBUTE = "org.apache.activemq.connectionFactory";
-    public static final String CONNECTION_FACTORY_PREFETCH_PARAM = "org.apache.activemq.connectionFactory.prefetch";
-    public static final String CONNECTION_FACTORY_OPTIMIZE_ACK_PARAM = "org.apache.activemq.connectionFactory.optimizeAck";
-    public static final String BROKER_URL_INIT_PARAM = "org.apache.activemq.brokerURL";
-    public static final String SELECTOR_NAME = "org.apache.activemq.selectorName";
-
-    private static final Logger LOG = LoggerFactory.getLogger(WebClient.class);
-
-    private static transient ConnectionFactory factory;
-
-    private transient Map<Destination, MessageConsumer> consumers = new HashMap<Destination, MessageConsumer>();
-    private transient Connection connection;
-    private transient Session session;
-    private transient MessageProducer producer;
-    private int deliveryMode = DeliveryMode.NON_PERSISTENT;
-    public static String selectorName;
-
-    private final Semaphore semaphore = new Semaphore(1);
-
-    private CamelContext camelContext;
-    private ProducerTemplate producerTemplate;
-
-    public WebClient() {
-        if (factory == null) {
-            throw new IllegalStateException("initContext(ServletContext) not called");
-        }
-    }
-
-    /**
-     * Helper method to get the client for the current session, lazily creating
-     * a client if there is none currently
-     * 
-     * @param request is the current HTTP request
-     * @return the current client or a newly creates
-     */
-    public static WebClient getWebClient(HttpServletRequest request) {
-        HttpSession session = request.getSession(true);
-        WebClient client = getWebClient(session);
-        if (client == null || client.isClosed()) {
-            client = WebClient.createWebClient(request);
-            session.setAttribute(WEB_CLIENT_ATTRIBUTE, client);
-        }
-
-        return client;
-    }
-
-    /**
-     * @return the web client for the current HTTP session or null if there is
-     *         not a web client created yet
-     */
-    public static WebClient getWebClient(HttpSession session) {
-        return (WebClient)session.getAttribute(WEB_CLIENT_ATTRIBUTE);
-    }
-
-    public static void initContext(ServletContext context) {
-        initConnectionFactory(context);
-        context.setAttribute("webClients", new HashMap<String, WebClient>());
-        if (selectorName == null) {
-            selectorName = context.getInitParameter(SELECTOR_NAME);
-        }
-        if (selectorName == null) {
-            selectorName = "selector";
-        }        
-    }
-
-    public int getDeliveryMode() {
-        return deliveryMode;
-    }
-
-    public void setDeliveryMode(int deliveryMode) {
-        this.deliveryMode = deliveryMode;
-    }
-
-    public synchronized void closeConsumers() {
-        for (Iterator<MessageConsumer> it = consumers.values().iterator(); it.hasNext();) {
-            MessageConsumer consumer = it.next();
-            it.remove();
-            try {
-                consumer.setMessageListener(null);
-                if (consumer instanceof MessageAvailableConsumer) {
-                    ((MessageAvailableConsumer)consumer).setAvailableListener(null);
-                }
-                consumer.close();
-            } catch (JMSException e) {
-                LOG.debug("caught exception closing consumer", e);
-            }
-        }
-    }
-
-    public synchronized void close() {
-        try {
-            if (consumers != null) {
-                closeConsumers();
-            }
-            if (connection != null) {
-                connection.close();
-            }
-            if (producerTemplate != null) {
-            	producerTemplate.stop();
-            }
-        } catch (Exception e) {
-            LOG.debug("caught exception closing consumer", e);
-        } finally {
-            producer = null;
-            session = null;
-            connection = null;
-            producerTemplate = null;
-            if (consumers != null) {
-                consumers.clear();
-            }
-            consumers = null;
-
-        }
-    }
-
-    public boolean isClosed() {
-        return consumers == null;
-    }
-
-    public void writeExternal(ObjectOutput out) throws IOException {
-        if (consumers != null) {
-            out.write(consumers.size());
-            Iterator<Destination> i = consumers.keySet().iterator();
-            while (i.hasNext()) {
-                out.writeObject(i.next().toString());
-            }
-        } else {
-            out.write(-1);
-        }
-
-    }
-
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        int size = in.readInt();
-        if (size >= 0) {
-            consumers = new HashMap<Destination, MessageConsumer>();
-            for (int i = 0; i < size; i++) {
-                String destinationName = in.readObject().toString();
-
-                try {
-                    Destination destination = destinationName.startsWith("topic://") ? (Destination)getSession().createTopic(destinationName) : (Destination)getSession().createQueue(destinationName);
-                    consumers.put(destination, getConsumer(destination, null, true));
-                } catch (JMSException e) {
-                    LOG.debug("Caought Exception ", e);
-                    IOException ex = new IOException(e.getMessage());
-                    ex.initCause(e.getCause() != null ? e.getCause() : e);
-                    throw ex;
-
-                }
-            }
-        }
-    }
-
-    public void send(Destination destination, Message message) throws JMSException {
-        getProducer().send(destination, message);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Sent! to destination: " + destination + " message: " + message);
-        }
-    }
-
-    public void send(Destination destination, Message message, boolean persistent, int priority, long timeToLive) throws JMSException {
-        int deliveryMode = persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT;
-        getProducer().send(destination, message, deliveryMode, priority, timeToLive);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Sent! to destination: " + destination + " message: " + message);
-        }
-    }
-
-    public Session getSession() throws JMSException {
-        if (session == null) {
-            session = createSession();
-        }
-        return session;
-    }
-
-    public Connection getConnection() throws JMSException {
-        if (connection == null) {
-            connection = factory.createConnection();
-            connection.start();
-        }
-        return connection;
-    }
-
-    protected static synchronized void initConnectionFactory(ServletContext servletContext) {
-        if (factory == null) {
-            factory = (ConnectionFactory)servletContext.getAttribute(CONNECTION_FACTORY_ATTRIBUTE);
-        }
-        if (factory == null) {
-            String brokerURL = servletContext.getInitParameter(BROKER_URL_INIT_PARAM);
-
-            LOG.debug("Value of: " + BROKER_URL_INIT_PARAM + " is: " + brokerURL);
-
-            if (brokerURL == null) {
-                throw new IllegalStateException("missing brokerURL (specified via " + BROKER_URL_INIT_PARAM + " init-Param");
-            }
-
-            ActiveMQConnectionFactory amqfactory = new ActiveMQConnectionFactory(brokerURL);
-
-            // Set prefetch policy for factory
-            if (servletContext.getInitParameter(CONNECTION_FACTORY_PREFETCH_PARAM) != null) {
-                int prefetch = Integer.valueOf(servletContext.getInitParameter(CONNECTION_FACTORY_PREFETCH_PARAM)).intValue();
-                amqfactory.getPrefetchPolicy().setAll(prefetch);
-            }
-
-            // Set optimize acknowledge setting
-            if (servletContext.getInitParameter(CONNECTION_FACTORY_OPTIMIZE_ACK_PARAM) != null) {
-                boolean optimizeAck = Boolean.valueOf(servletContext.getInitParameter(CONNECTION_FACTORY_OPTIMIZE_ACK_PARAM)).booleanValue();
-                amqfactory.setOptimizeAcknowledge(optimizeAck);
-            }
-
-            factory = amqfactory;
-
-            servletContext.setAttribute(CONNECTION_FACTORY_ATTRIBUTE, factory);
-        }
-    }
-    
-    public synchronized CamelContext getCamelContext() {
-    	if (camelContext == null) {
-    		LOG.debug("Creating camel context");
-    		camelContext = new DefaultCamelContext();
-    		ActiveMQConfiguration conf = new ActiveMQConfiguration();
-    		conf.setConnectionFactory(new PooledConnectionFactory((ActiveMQConnectionFactory)factory));
-    		ActiveMQComponent component = new ActiveMQComponent(conf);
-    		camelContext.addComponent("activemq", component);
-    	}
-    	return camelContext;
-    }
-    
-    public synchronized ProducerTemplate getProducerTemplate() throws Exception {
-    	if (producerTemplate == null) {
-    		LOG.debug("Creating producer template");
-    		producerTemplate = getCamelContext().createProducerTemplate();
-    		producerTemplate.start();
-    	}
-    	return producerTemplate;
-    }
-
-    public synchronized MessageProducer getProducer() throws JMSException {
-        if (producer == null) {
-            producer = getSession().createProducer(null);
-            producer.setDeliveryMode(deliveryMode);
-        }
-        return producer;
-    }
-
-    public void setProducer(MessageProducer producer) {
-        this.producer = producer;
-    }
-
-    public synchronized MessageConsumer getConsumer(Destination destination, String selector) throws JMSException {
-        return getConsumer(destination, selector, true);
-    }
-
-    public synchronized MessageConsumer getConsumer(Destination destination, String selector, boolean create) throws JMSException {
-        MessageConsumer consumer = consumers.get(destination);
-        if (create && consumer == null) {
-            consumer = getSession().createConsumer(destination, selector);
-            consumers.put(destination, consumer);
-        }
-        return consumer;
-    }
-
-    public synchronized void closeConsumer(Destination destination) throws JMSException {
-        MessageConsumer consumer = consumers.get(destination);
-        if (consumer != null) {
-            consumers.remove(destination);
-            consumer.setMessageListener(null);
-            if (consumer instanceof MessageAvailableConsumer) {
-                ((MessageAvailableConsumer)consumer).setAvailableListener(null);
-            }
-            consumer.close();
-        }
-    }
-
-    public synchronized List<MessageConsumer> getConsumers() {
-        return new ArrayList<MessageConsumer>(consumers.values());
-    }
-
-    protected Session createSession() throws JMSException {
-        return getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
-    }
-
-    public Semaphore getSemaphore() {
-        return semaphore;
-    }
-
-    public void sessionWillPassivate(HttpSessionEvent event) {
-        close();
-    }
-
-    public void sessionDidActivate(HttpSessionEvent event) {
-    }
-
-    public void valueBound(HttpSessionBindingEvent event) {
-    }
-
-    public void valueUnbound(HttpSessionBindingEvent event) {
-        close();
-    }
-
-    protected static WebClient createWebClient(HttpServletRequest request) {
-        return new WebClient();
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/AbstractConfiguration.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/AbstractConfiguration.java
deleted file mode 100644
index f3d2d50..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/AbstractConfiguration.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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.web.config;
-
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import javax.jms.ConnectionFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * Base class for configurations.
- * 
- * 
- */
-public abstract class AbstractConfiguration implements WebConsoleConfiguration {
-
-	public ConnectionFactory getConnectionFactory() {
-		return null;
-	}
-
-	public String getJmxPassword() {
-		return null;
-	}
-
-	public Collection<JMXServiceURL> getJmxUrls() {
-		return null;
-	}
-
-	public String getJmxUser() {
-		return null;
-	}
-
-	/**
-	 * Creates the ActiveMQ-ConnectionFactory.
-	 * 
-	 * @param jmsUrl
-	 *            not <code>null</code>
-	 * @param jmsUser
-	 *            <code>null</code> if no authentication
-	 * @param jmsPassword
-	 *            <code>null</code> is ok
-	 * @return not <code>null</code>
-	 */
-	protected ConnectionFactory makeConnectionFactory(String jmsUrl, String jmsUser,
-			String jmsPassword) {
-				if (jmsUser != null && jmsUser.length() > 0)
-					return new ActiveMQConnectionFactory(jmsUser, jmsPassword, jmsUrl);
-				else
-					return new ActiveMQConnectionFactory(jmsUrl);
-			}
-
-	/**
-	 * Splits the JMX-Url string into a series of JMSServiceURLs.
-	 * 
-	 * @param jmxUrls
-	 *            the JMX-url, multiple URLs are separated by commas.
-	 * @return not <code>null</code>, contains at least one element.
-	 */
-	protected Collection<JMXServiceURL> makeJmxUrls(String jmxUrls) {
-		String[] urls = jmxUrls.split(",");
-		if (urls == null || urls.length == 0) {
-			urls = new String[] { jmxUrls };
-		}
-	
-		try {
-			Collection<JMXServiceURL> result = new ArrayList<JMXServiceURL>(
-					jmxUrls.length());
-			for (String url : urls) {
-				result.add(new JMXServiceURL(url));
-			}
-			return result;
-		} catch (MalformedURLException e) {
-			throw new IllegalArgumentException("Invalid JMX-url", e);
-		}
-	}
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/JNDIConfiguration.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/JNDIConfiguration.java
deleted file mode 100644
index 12dd122..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/JNDIConfiguration.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.web.config;
-
-import java.util.Collection;
-
-import javax.jms.ConnectionFactory;
-import javax.management.remote.JMXServiceURL;
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-/**
- * Configuration based on JNDI values.
- *
- * 
- */
-public class JNDIConfiguration extends AbstractConfiguration {
-
-    private static final String JNDI_JMS_CONNECTION_FACTORY = "java:comp/env/jms/connectionFactory";
-    private static final String JNDI_JMS_URL = "java:comp/env/jms/url";
-    private static final String JNDI_JMS_USER = "java:comp/env/jms/user";
-    private static final String JNDI_JMS_PASSWORD = "java:comp/env/jms/password";
-
-    private static final String JNDI_JMX_URL = "java:comp/env/jmx/url";
-    private static final String JNDI_JMX_USER = "java:comp/env/jmx/user";
-    private static final String JNDI_JMX_PASSWORD = "java:comp/env/jmx/password";
-
-    private InitialContext context;
-
-    public JNDIConfiguration() throws NamingException {
-        this.context = new InitialContext();
-    }
-
-    public JNDIConfiguration(InitialContext context) {
-        this.context = context;
-    }
-
-    public ConnectionFactory getConnectionFactory() {
-        try {
-            ConnectionFactory connectionFactory = (ConnectionFactory) this.context
-                    .lookup(JNDI_JMS_CONNECTION_FACTORY);
-            return connectionFactory;
-        } catch (NameNotFoundException e) {
-            // try to find an url
-        } catch (NamingException e) {
-            throw new RuntimeException(e);
-        }
-
-        try {
-            String jmsUrl = (String) this.context.lookup(JNDI_JMS_URL);
-            if (jmsUrl == null) {
-                throw new IllegalArgumentException(
-                        "A JMS-url must be specified (system property "
-                                + JNDI_JMS_URL);
-            }
-
-            String jmsUser = getJndiString(JNDI_JMS_USER);
-            String jmsPassword = getJndiString(JNDI_JMS_PASSWORD);
-            return makeConnectionFactory(jmsUrl, jmsUser, jmsPassword);
-        } catch (NameNotFoundException e) {
-            throw new IllegalArgumentException(
-                    "Neither a ConnectionFactory nor a JMS-url were specified");
-        } catch (NamingException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    protected String getJndiString(String name) {
-        try {
-            return (String) this.context.lookup(name);
-        } catch (NamingException e) {
-            return null;
-        }
-    }
-
-    public Collection<JMXServiceURL> getJmxUrls() {
-        String jmxUrls = getJndiString(JNDI_JMX_URL);
-        return makeJmxUrls(jmxUrls);
-    }
-
-    public String getJmxPassword() {
-        return getJndiString(JNDI_JMX_PASSWORD);
-    }
-
-    public String getJmxUser() {
-        return getJndiString(JNDI_JMX_USER);
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/SystemPropertiesConfiguration.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/SystemPropertiesConfiguration.java
deleted file mode 100644
index 3199a2c..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/SystemPropertiesConfiguration.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.web.config;
-
-import java.util.Collection;
-
-import javax.jms.ConnectionFactory;
-import javax.management.remote.JMXServiceURL;
-
-
-/**
- * Configuration based on system-properties.
- * 
- * 
- */
-public class SystemPropertiesConfiguration extends AbstractConfiguration {
-
-	private static final String PROPERTY_JMS_URL = "webconsole.jms.url";
-	private static final String PROPERTY_JMS_USER = "webconsole.jms.user";
-	private static final String PROPERTY_JMS_PASSWORD = "webconsole.jms.password";
-
-	private static final String PROPERTY_JMX_URL = "webconsole.jmx.url";
-	private static final String PROPERTY_JMX_USER = "webconsole.jmx.user";
-	private static final String PROPERTY_JMX_PASSWORD = "webconsole.jmx.password";
-
-	public ConnectionFactory getConnectionFactory() {
-		String jmsUrl = System.getProperty(PROPERTY_JMS_URL);
-		if (jmsUrl == null)
-			throw new IllegalArgumentException(
-					"A JMS-url must be specified (system property "
-							+ PROPERTY_JMS_URL);
-
-		String jmsUser = System.getProperty(PROPERTY_JMS_USER);
-		String jmsPassword = System.getProperty(PROPERTY_JMS_PASSWORD);
-		return makeConnectionFactory(jmsUrl, jmsUser, jmsPassword);
-	}
-
-	public Collection<JMXServiceURL> getJmxUrls() {
-		String jmxUrls = System.getProperty(PROPERTY_JMX_URL);
-		return makeJmxUrls(jmxUrls);
-	}
-
-	public String getJmxPassword() {
-		return System.getProperty(PROPERTY_JMX_PASSWORD);
-	}
-
-	public String getJmxUser() {
-		return System.getProperty(PROPERTY_JMX_USER);
-	}
-
-}
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/WebConsoleConfiguration.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/WebConsoleConfiguration.java
deleted file mode 100644
index 7c48445..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/config/WebConsoleConfiguration.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.web.config;
-
-import java.util.Collection;
-
-import javax.jms.ConnectionFactory;
-import javax.management.remote.JMXServiceURL;
-
-/**
- * The configuration used for the web console.
- * 
- * 
- */
-public interface WebConsoleConfiguration {
-
-	/**
-	 * The connection factory to use for sending/receiving messages.
-	 * 
-	 * @return not <code>null</code>
-	 */
-	ConnectionFactory getConnectionFactory();
-
-	/**
-	 * The URL to the JMX connectors of the broker. The names of any failover
-	 * (master-slave configuration) must also be specified.
-	 * 
-	 * @return not <code>null</code>, must contain at least one entry
-	 */
-	Collection<JMXServiceURL> getJmxUrls();
-
-	/**
-	 * The user that is used in case of authenticated JMX connections. The user
-	 * must be the same for all the brokers.
-	 * 
-	 * @return <code>null</code> if no authentication should be used.
-	 */
-	String getJmxUser();
-
-	/**
-	 * Password for the JMX-user.
-	 * 
-	 * @see #getJmxUser()
-	 * @return <code>null</code> if no authentication
-	 */
-	String getJmxPassword();
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/package.html b/trunk/activemq-web/src/main/java/org/apache/activemq/web/package.html
deleted file mode 100644
index a6871b7..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	Web Connectors so that messages can be sent via HTTP POST or read via
-	HTTP POST or GET as well as support for web streaming to we browser or
-	JavaScript clients.
-</p>
-
-</body>
-</html>
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/MessageRenderer.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/MessageRenderer.java
deleted file mode 100644
index 0504a66..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/MessageRenderer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.web.view;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.QueueBrowser;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Represents a rendering of the messages
- * 
- * 
- */
-public interface MessageRenderer {
-
-    void renderMessages(HttpServletRequest request, HttpServletResponse response, QueueBrowser browser) throws IOException, JMSException, ServletException;
-
-    void renderMessage(PrintWriter writer, HttpServletRequest request, HttpServletResponse response, QueueBrowser browser, Message message) throws JMSException, ServletException;
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/RssMessageRenderer.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/RssMessageRenderer.java
deleted file mode 100644
index 53f62e3..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/RssMessageRenderer.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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.web.view;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Date;
-import java.util.List;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.QueueBrowser;
-import javax.jms.TextMessage;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.sun.syndication.feed.synd.SyndContent;
-import com.sun.syndication.feed.synd.SyndContentImpl;
-import com.sun.syndication.feed.synd.SyndEntry;
-import com.sun.syndication.feed.synd.SyndEntryImpl;
-import com.sun.syndication.feed.synd.SyndFeed;
-import com.sun.syndication.feed.synd.SyndFeedImpl;
-import com.sun.syndication.io.FeedException;
-import com.sun.syndication.io.SyndFeedOutput;
-
-/**
- * This renderer uses XStream to render messages on a queue as full XML elements
- * 
- * 
- */
-public class RssMessageRenderer extends SimpleMessageRenderer {
-
-    // private String feedType = "atom_0.3";
-    private String feedType = "rss_2.0";
-    private SyndFeed feed;
-    private String description = "This feed is auto-generated by Apache ActiveMQ";
-    private String entryContentType = "text/plain";
-
-    public void renderMessage(PrintWriter writer, HttpServletRequest request, HttpServletResponse response, QueueBrowser browser, Message message) throws JMSException {
-        SyndFeed feed = getFeed(browser, request);
-
-        List<SyndEntry> entries = feed.getEntries();
-        SyndEntry entry = createEntry(browser, message, request);
-        SyndContent description = createEntryContent(browser, message, request);
-        entry.setDescription(description);
-        entries.add(entry);
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String feedDescription) {
-        this.description = feedDescription;
-    }
-
-    public String getFeedType() {
-        return feedType;
-    }
-
-    public void setFeedType(String feedType) {
-        this.feedType = feedType;
-    }
-
-    public String getEntryContentType() {
-        return entryContentType;
-    }
-
-    public void setEntryContentType(String entryContentType) {
-        this.entryContentType = entryContentType;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    protected void printFooter(PrintWriter writer, QueueBrowser browser, HttpServletRequest request) throws IOException, JMSException, ServletException {
-        // now lets actually write out the content
-        SyndFeed feed = getFeed(browser, request);
-        SyndFeedOutput output = new SyndFeedOutput();
-        try {
-            output.output(feed, writer);
-        } catch (FeedException e) {
-            throw new ServletException(e);
-        }
-    }
-
-    protected void printHeader(PrintWriter writer, QueueBrowser browser, HttpServletRequest request) throws IOException, JMSException {
-    }
-
-    public SyndFeed getFeed(QueueBrowser browser, HttpServletRequest request) throws JMSException {
-        if (feed == null) {
-            feed = createFeed(browser, request);
-        }
-        return feed;
-    }
-
-    protected SyndEntry createEntry(QueueBrowser browser, Message message, HttpServletRequest request) throws JMSException {
-        SyndEntry entry = new SyndEntryImpl();
-        String title = message.getJMSMessageID();
-        entry.setTitle(title);
-        String link = request.getRequestURI() + "?msgId=" + title;
-        entry.setLink(link);
-        entry.setPublishedDate(new Date());
-        return entry;
-    }
-
-    protected SyndContent createEntryContent(QueueBrowser browser, Message message, HttpServletRequest request) throws JMSException {
-        SyndContent description = new SyndContentImpl();
-        description.setType(entryContentType);
-
-        if (message instanceof TextMessage) {
-            String text = ((TextMessage)message).getText();
-            description.setValue(text);
-        }
-        return description;
-    }
-
-    protected SyndFeed createFeed(QueueBrowser browser, HttpServletRequest request) throws JMSException {
-        SyndFeed feed = new SyndFeedImpl();
-        feed.setFeedType(feedType);
-
-        String title = browser.getQueue().toString();
-        String selector = browser.getMessageSelector();
-        if (selector != null) {
-            title += " with selector: " + selector;
-        }
-        feed.setTitle(title);
-        feed.setLink(request.getRequestURI());
-        feed.setDescription(getDescription());
-        return feed;
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/SimpleMessageRenderer.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/SimpleMessageRenderer.java
deleted file mode 100644
index 35983ae..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/SimpleMessageRenderer.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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.web.view;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.QueueBrowser;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * A simple rendering of the contents of a queue appear as a list of message
- * elements which just contain an ID attribute.
- * 
- * 
- */
-public class SimpleMessageRenderer implements MessageRenderer {
-
-    private String contentType = "text/xml";
-    private int maxMessages;
-
-    public void renderMessages(HttpServletRequest request, HttpServletResponse response, QueueBrowser browser) throws IOException, JMSException, ServletException {
-        // lets use XML by default
-        response.setContentType(getContentType());
-        PrintWriter writer = response.getWriter();
-        printHeader(writer, browser, request);
-
-        Enumeration iter = browser.getEnumeration();
-        for (int counter = 0; iter.hasMoreElements() && (maxMessages <= 0 || counter < maxMessages); counter++) {
-            Message message = (Message)iter.nextElement();
-            renderMessage(writer, request, response, browser, message);
-        }
-
-        printFooter(writer, browser, request);
-    }
-
-    public void renderMessage(PrintWriter writer, HttpServletRequest request, HttpServletResponse response, QueueBrowser browser, Message message) throws JMSException, ServletException {
-        // lets just write the message IDs for now
-        writer.print("<message id='");
-        writer.print(message.getJMSMessageID());
-        writer.println("'/>");
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public int getMaxMessages() {
-        return maxMessages;
-    }
-
-    public void setMaxMessages(int maxMessages) {
-        this.maxMessages = maxMessages;
-    }
-
-    public String getContentType() {
-        return contentType;
-    }
-
-    public void setContentType(String contentType) {
-        this.contentType = contentType;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    protected void printHeader(PrintWriter writer, QueueBrowser browser, HttpServletRequest request) throws IOException, JMSException, ServletException {
-        writer.println("");
-        writer.print("<messages queue='");
-        writer.print(browser.getQueue());
-        writer.print("'");
-        String selector = browser.getMessageSelector();
-        if (selector != null) {
-            writer.print(" selector='");
-            writer.print(selector);
-            writer.print("'");
-        }
-        writer.println(">");
-    }
-
-    protected void printFooter(PrintWriter writer, QueueBrowser browser, HttpServletRequest request) throws IOException, JMSException, ServletException {
-        writer.println("</messages>");
-    }
-
-}
diff --git a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/XmlMessageRenderer.java b/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/XmlMessageRenderer.java
deleted file mode 100644
index 10caf9b..0000000
--- a/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/XmlMessageRenderer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.web.view;
-
-import java.io.PrintWriter;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.QueueBrowser;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.thoughtworks.xstream.XStream;
-
-/**
- * This renderer uses XStream to render messages on a queue as full XML elements
- * 
- * 
- */
-public class XmlMessageRenderer extends SimpleMessageRenderer {
-
-    private XStream xstream;
-    
-    public void renderMessage(PrintWriter writer, HttpServletRequest request, HttpServletResponse response, QueueBrowser browser, Message message) throws JMSException {
-        getXstream().toXML(message, writer);
-    }
-
-    public XStream getXstream() {
-        if (xstream == null) {
-            xstream = new XStream();
-        }
-        return xstream;
-    }
-
-    public void setXstream(XStream xstream) {
-        this.xstream = xstream;
-    }
-}
diff --git a/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/rss b/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/rss
deleted file mode 100644
index 830ddd6..0000000
--- a/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/rss
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.web.view.RssMessageRenderer
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/simple b/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/simple
deleted file mode 100644
index de51ea1..0000000
--- a/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/simple
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.web.view.SimpleMessageRenderer
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/xml b/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/xml
deleted file mode 100644
index 5301fd2..0000000
--- a/trunk/activemq-web/src/main/resources/META-INF/services/org/apache/activemq/web/view/xml
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.web.view.XmlMessageRenderer
\ No newline at end of file
diff --git a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/_amq.js b/trunk/activemq-web/src/main/resources/org/apache/activemq/web/_amq.js
deleted file mode 100644
index ab0a3d5..0000000
--- a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/_amq.js
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
- * 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.
- */
-
-// AMQ Ajax handler
-// This class provides the main API for using the Ajax features of AMQ. It
-// allows JMS messages to be sent and received from javascript when used
-// with the org.apache.activemq.web.MessageListenerServlet
-//
-var amq =
-{
-  // The URI of the MessageListenerServlet
-  uri: '/amq',
-
-  // Polling. Set to true (default) if waiting poll for messages is needed
-  poll: true,
-  
-  // Poll delay. if set to positive integer, this is the time to wait in ms before
-  // sending the next poll after the last completes.
-  _pollDelay: 0,
-
-  _first: true,
-  _pollEvent: function(first) {},
-  _handlers: new Array(),
-
-  _messages:0,
-  _messageQueue: '',
-  _queueMessages: 0,
-
-  _messageHandler: function(request)
-  {
-    try
-    {
-      if (request.status == 200)
-      {
-        var response = request.responseXML.getElementsByTagName("ajax-response");
-        if (response != null && response.length == 1)
-        {
-          for ( var i = 0 ; i < response[0].childNodes.length ; i++ )
-          {
-            var responseElement = response[0].childNodes[i];
-
-            // only process nodes of type element.....
-            if ( responseElement.nodeType != 1 )
-              continue;
-
-            var id   = responseElement.getAttribute('id');
-
-
-            var handler = amq._handlers[id];
-            if (handler!=null)
-            {
-              for (var j = 0; j < responseElement.childNodes.length; j++)
-              {
-                handler(responseElement.childNodes[j]);
-	      }
-            }
-          }
-        }
-      }
-    }
-    catch(e)
-    {
-      alert(e);
-    }
-  },
-
-  startBatch: function()
-  {
-    amq._queueMessages++;
-  },
-
-  endBatch: function()
-  {
-    amq._queueMessages--;
-    if (amq._queueMessages==0 && amq._messages>0)
-    {
-      var body = amq._messageQueue;
-      amq._messageQueue='';
-      amq._messages=0;
-      amq._queueMessages++;
-      new Ajax.Request(amq.uri, { method: 'post', postBody: body, onSuccess: amq.endBatch});
-    }
-  },
-
-  _pollHandler: function(request)
-  {
-    amq.startBatch();
-    try
-    {
-      amq._messageHandler(request);
-      amq._pollEvent(amq._first);
-      amq._first=false;
-    }
-    catch(e)
-    {
-        alert(e);
-    }
-    amq.endBatch();
-
-    if (amq._pollDelay>0)
-      setTimeout('amq._sendPoll()',amq._pollDelay);
-    else
-      amq._sendPoll();
-  },
-  
-  _sendPoll: function(request)
-  {
-    new Ajax.Request(amq.uri, { method: 'get', onSuccess: amq._pollHandler });
-  },
-
-  // Add a function that gets called on every poll response, after all received
-  // messages have been handled.  The poll handler is past a boolean that indicates
-  // if this is the first poll for the page.
-  addPollHandler : function(func)
-  {
-    var old = amq._pollEvent;
-    amq._pollEvent = function(first)
-    {
-      old(first);
-      func(first);
-    }
-  },
-
-  // Send a JMS message to a destination (eg topic://MY.TOPIC).  Message should be xml or encoded
-  // xml content.
-  sendMessage : function(destination,message)
-  {
-    amq._sendMessage(destination,message,'send');
-  },
-
-  // Listen on a channel or topic.   handler must be a function taking a message arguement
-  addListener : function(id,destination,handler)
-  {
-    amq._handlers[id]=handler;
-    amq._sendMessage(destination,id,'listen');
-  },
-
-  // remove Listener from channel or topic.
-  removeListener : function(id,destination)
-  {
-    amq._handlers[id]=null;
-    amq._sendMessage(destination,id,'unlisten');
-  },
-
-  _sendMessage : function(destination,message,type)
-  {
-    if (amq._queueMessages>0)
-    {
-      if (amq._messages==0)
-      {
-        amq._messageQueue='destination='+destination+'&message='+message+'&type='+type;
-      }
-      else
-      {
-        amq._messageQueue+='&d'+amq._messages+'='+destination+'&m'+amq._messages+'='+message+'&t'+amq._messages+'='+type;
-      }
-      amq._messages++;
-    }
-    else
-    {
-      amq.startBatch();
-      new Ajax.Request(amq.uri, { method: 'post', postBody: 'destination='+destination+'&message='+message+'&type='+type, onSuccess: amq.endBatch});
-    }
-  },
-  
-  _startPolling : function()
-  {
-   if (amq.poll)
-      new Ajax.Request(amq.uri, { method: 'get', parameters: 'timeout=10', onSuccess: amq._pollHandler });
-  }
-};
-
-Behaviour.addLoadEvent(amq._startPolling);
-
-function getKeyCode(ev)
-{
-    var keyc;
-    if (window.event)
-        keyc=window.event.keyCode;
-    else
-        keyc=ev.keyCode;
-    return keyc;
-}
diff --git a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/amq.js b/trunk/activemq-web/src/main/resources/org/apache/activemq/web/amq.js
deleted file mode 100644
index 05901aa..0000000
--- a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/amq.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.
- */
-
-// Technique borrowed from scriptaculous to do includes.
-
-var _AMQ_INCLUDE = {
-  Version: 'AMQ JS',
-  script: function(libraryName) {
-    document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
-  },
-  load: function() {
-    var scriptTags = document.getElementsByTagName("script");
-    for(var i=0;i<scriptTags.length;i++) {
-      if(scriptTags[i].src && scriptTags[i].src.match(/amq\.js$/)) {
-        var path = scriptTags[i].src.replace(/amq\.js$/,'');
-        this.script(path + 'prototype.js');
-        this.script(path + 'behaviour.js');
-        this.script(path + '_amq.js');
-        // this.script(path + 'scriptaculous.js');
-        break;
-      }
-    }
-  }
-}
-
-_AMQ_INCLUDE.load();
-
diff --git a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js b/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js
deleted file mode 100644
index 90cf5ea..0000000
--- a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-   Behaviour v1.1 by Ben Nolan, June 2005. Based largely on the work
-   of Simon Willison (see comments by Simon below).
-
-   Description:
-   	
-   	Uses css selectors to apply javascript behaviours to enable
-   	unobtrusive javascript in html documents.
-   	
-   Usage:   
-   
-	var myrules = {
-		'b.someclass' : function(element){
-			element.onclick = function(){
-				alert(this.innerHTML);
-			}
-		},
-		'#someid u' : function(element){
-			element.onmouseover = function(){
-				this.innerHTML = "BLAH!";
-			}
-		}
-	};
-	
-	Behaviour.register(myrules);
-	
-	// Call Behaviour.apply() to re-apply the rules (if you
-	// update the dom, etc).
-
-   License:
-   
-   	This file is entirely BSD licensed.
-   	
-   More information:
-   	
-   	http://ripcord.co.nz/behaviour/
-   
-*/   
-
-var Behaviour = {
-	list : new Array,
-	
-	register : function(sheet){
-		Behaviour.list.push(sheet);
-	},
-	
-	start : function(){
-		Behaviour.addLoadEvent(function(){
-			Behaviour.apply();
-		});
-	},
-	
-	apply : function(){
-		for (var h=0;sheet=Behaviour.list[h];h++){
-			for (selector in sheet){
-				list = document.getElementsBySelector(selector);
-
-				if (!list){
-					continue;
-				}
-
-				for (var i=0;element=list[i];i++){
-					sheet[selector](element);
-				}
-			}
-		}
-	},
-	
-	addLoadEvent : function(func){
-		var oldonload = window.onload;
-		if (typeof window.onload != 'function') {
-			window.onload = func;
-		} else {
-			window.onload = function() {
-				oldonload();
-				if(func != null) {
-				   func();
-				}
-			}
-		}
-	}
-}
-
-Behaviour.start();
-
-/*
-   The following code is Copyright (C) Simon Willison 2004.
-
-   document.getElementsBySelector(selector)
-   - returns an array of element objects from the current document
-     matching the CSS selector. Selectors can contain element names, 
-     class names and ids and can be nested. For example:
-     
-       elements = document.getElementsBySelect('div#main p a.external')
-     
-     Will return an array of all 'a' elements with 'external' in their 
-     class attribute that are contained inside 'p' elements that are 
-     contained inside the 'div' element which has id="main"
-
-   New in version 0.4: Support for CSS2 and CSS3 attribute selectors:
-   See http://www.w3.org/TR/css3-selectors/#attribute-selectors
-
-   Version 0.4 - Simon Willison, March 25th 2003
-   -- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows
-   -- Opera 7 fails 
-*/
-
-function getAllChildren(e) {
-  // Returns all children of element. Workaround required for IE5/Windows. Ugh.
-  return e.all ? e.all : e.getElementsByTagName('*');
-}
-
-document.getElementsBySelector = function(selector) {
-  // Attempt to fail gracefully in lesser browsers
-  if (!document.getElementsByTagName) {
-    return new Array();
-  }
-  // Split selector in to tokens
-  var tokens = selector.split(' ');
-  var currentContext = new Array(document);
-  for (var i = 0; i < tokens.length; i++) {
-    token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;
-    if (token.indexOf('#') > -1) {
-      // Token is an ID selector
-      var bits = token.split('#');
-      var tagName = bits[0];
-      var id = bits[1];
-      var element = document.getElementById(id);
-      if (tagName && element.nodeName.toLowerCase() != tagName) {
-        // tag with that ID not found, return false
-        return new Array();
-      }
-      // Set currentContext to contain just this element
-      currentContext = new Array(element);
-      continue; // Skip to next token
-    }
-    if (token.indexOf('.') > -1) {
-      // Token contains a class selector
-      var bits = token.split('.');
-      var tagName = bits[0];
-      var className = bits[1];
-      if (!tagName) {
-        tagName = '*';
-      }
-      // Get elements matching tag, filter them for class selector
-      var found = new Array;
-      var foundCount = 0;
-      for (var h = 0; h < currentContext.length; h++) {
-        var elements;
-        if (tagName == '*') {
-            elements = getAllChildren(currentContext[h]);
-        } else {
-            elements = currentContext[h].getElementsByTagName(tagName);
-        }
-        for (var j = 0; j < elements.length; j++) {
-          found[foundCount++] = elements[j];
-        }
-      }
-      currentContext = new Array;
-      var currentContextIndex = 0;
-      for (var k = 0; k < found.length; k++) {
-        if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) {
-          currentContext[currentContextIndex++] = found[k];
-        }
-      }
-      continue; // Skip to next token
-    }
-    // Code to deal with attribute selectors
-    if (token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)) {
-      var tagName = RegExp.$1;
-      var attrName = RegExp.$2;
-      var attrOperator = RegExp.$3;
-      var attrValue = RegExp.$4;
-      if (!tagName) {
-        tagName = '*';
-      }
-      // Grab all of the tagName elements within current context
-      var found = new Array;
-      var foundCount = 0;
-      for (var h = 0; h < currentContext.length; h++) {
-        var elements;
-        if (tagName == '*') {
-            elements = getAllChildren(currentContext[h]);
-        } else {
-            elements = currentContext[h].getElementsByTagName(tagName);
-        }
-        for (var j = 0; j < elements.length; j++) {
-          found[foundCount++] = elements[j];
-        }
-      }
-      currentContext = new Array;
-      var currentContextIndex = 0;
-      var checkFunction; // This function will be used to filter the elements
-      switch (attrOperator) {
-        case '=': // Equality
-          checkFunction = function(e) { return (e.getAttribute(attrName) == attrValue); };
-          break;
-        case '~': // Match one of space seperated words 
-          checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b'))); };
-          break;
-        case '|': // Match start with value followed by optional hyphen
-          checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?'))); };
-          break;
-        case '^': // Match starts with value
-          checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) == 0); };
-          break;
-        case '$': // Match ends with value - fails with "Warning" in Opera 7
-          checkFunction = function(e) { return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length); };
-          break;
-        case '*': // Match ends with value
-          checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) > -1); };
-          break;
-        default :
-          // Just test for existence of attribute
-          checkFunction = function(e) { return e.getAttribute(attrName); };
-      }
-      currentContext = new Array;
-      var currentContextIndex = 0;
-      for (var k = 0; k < found.length; k++) {
-        if (checkFunction(found[k])) {
-          currentContext[currentContextIndex++] = found[k];
-        }
-      }
-      // alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue);
-      continue; // Skip to next token
-    }
-    
-    if (!currentContext[0]){
-    	return;
-    }
-    
-    // If we get here, token is JUST an element (not a class or ID selector)
-    tagName = token;
-    var found = new Array;
-    var foundCount = 0;
-    for (var h = 0; h < currentContext.length; h++) {
-      var elements = currentContext[h].getElementsByTagName(tagName);
-      for (var j = 0; j < elements.length; j++) {
-        found[foundCount++] = elements[j];
-      }
-    }
-    currentContext = found;
-  }
-  return currentContext;
-}
-
-/* That revolting regular expression explained 
-/^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/
-  \---/  \---/\-------------/    \-------/
-    |      |         |               |
-    |      |         |           The value
-    |      |    ~,|,^,$,* or =
-    |   Attribute 
-   Tag
-*/
diff --git a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/prototype.js b/trunk/activemq-web/src/main/resources/org/apache/activemq/web/prototype.js
deleted file mode 100644
index e9ccd3c..0000000
--- a/trunk/activemq-web/src/main/resources/org/apache/activemq/web/prototype.js
+++ /dev/null
@@ -1,1785 +0,0 @@
-/*  Prototype JavaScript framework, version 1.4.0
- *  (c) 2005 Sam Stephenson <sam@conio.net>
- *
- *  THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff
- *  against the source tree, available from the Prototype darcs repository.
- *
- *  Prototype is freely distributable under the terms of an MIT-style license.
- *
- *  For details, see the Prototype web site: http://prototype.conio.net/
- *
-/*--------------------------------------------------------------------------*/
-
-var Prototype = {
-  Version: '1.4.0',
-  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
-
-  emptyFunction: function() {},
-  K: function(x) {return x}
-}
-
-var Class = {
-  create: function() {
-    return function() {
-      this.initialize.apply(this, arguments);
-    }
-  }
-}
-
-var Abstract = new Object();
-
-Object.extend = function(destination, source) {
-  for (property in source) {
-    destination[property] = source[property];
-  }
-  return destination;
-}
-
-Object.inspect = function(object) {
-  try {
-    if (object == undefined) return 'undefined';
-    if (object == null) return 'null';
-    return object.inspect ? object.inspect() : object.toString();
-  } catch (e) {
-    if (e instanceof RangeError) return '...';
-    throw e;
-  }
-}
-
-Function.prototype.bind = function() {
-  var __method = this, args = $A(arguments), object = args.shift();
-  return function() {
-    return __method.apply(object, args.concat($A(arguments)));
-  }
-}
-
-Function.prototype.bindAsEventListener = function(object) {
-  var __method = this;
-  return function(event) {
-    return __method.call(object, event || window.event);
-  }
-}
-
-Object.extend(Number.prototype, {
-  toColorPart: function() {
-    var digits = this.toString(16);
-    if (this < 16) return '0' + digits;
-    return digits;
-  },
-
-  succ: function() {
-    return this + 1;
-  },
-
-  times: function(iterator) {
-    $R(0, this, true).each(iterator);
-    return this;
-  }
-});
-
-var Try = {
-  these: function() {
-    var returnValue;
-
-    for (var i = 0; i < arguments.length; i++) {
-      var lambda = arguments[i];
-      try {
-        returnValue = lambda();
-        break;
-      } catch (e) {}
-    }
-
-    return returnValue;
-  }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var PeriodicalExecuter = Class.create();
-PeriodicalExecuter.prototype = {
-  initialize: function(callback, frequency) {
-    this.callback = callback;
-    this.frequency = frequency;
-    this.currentlyExecuting = false;
-
-    this.registerCallback();
-  },
-
-  registerCallback: function() {
-    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
-  },
-
-  onTimerEvent: function() {
-    if (!this.currentlyExecuting) {
-      try {
-        this.currentlyExecuting = true;
-        this.callback();
-      } finally {
-        this.currentlyExecuting = false;
-      }
-    }
-  }
-}
-
-/*--------------------------------------------------------------------------*/
-
-function $() {
-  var elements = new Array();
-
-  for (var i = 0; i < arguments.length; i++) {
-    var element = arguments[i];
-    if (typeof element == 'string')
-      element = document.getElementById(element);
-
-    if (arguments.length == 1)
-      return element;
-
-    elements.push(element);
-  }
-
-  return elements;
-}
-Object.extend(String.prototype, {
-  stripTags: function() {
-    return this.replace(/<\/?[^>]+>/gi, '');
-  },
-
-  stripScripts: function() {
-    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
-  },
-
-  extractScripts: function() {
-    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
-    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
-    return (this.match(matchAll) || []).map(function(scriptTag) {
-      return (scriptTag.match(matchOne) || ['', ''])[1];
-    });
-  },
-
-  evalScripts: function() {
-    return this.extractScripts().map(eval);
-  },
-
-  escapeHTML: function() {
-    var div = document.createElement('div');
-    var text = document.createTextNode(this);
-    div.appendChild(text);
-    return div.innerHTML;
-  },
-
-  unescapeHTML: function() {
-    var div = document.createElement('div');
-    div.innerHTML = this.stripTags();
-    return div.childNodes[0] ? div.childNodes[0].nodeValue : '';
-  },
-
-  toQueryParams: function() {
-    var pairs = this.match(/^\??(.*)$/)[1].split('&');
-    return pairs.inject({}, function(params, pairString) {
-      var pair = pairString.split('=');
-      params[pair[0]] = pair[1];
-      return params;
-    });
-  },
-
-  toArray: function() {
-    return this.split('');
-  },
-
-  camelize: function() {
-    var oStringList = this.split('-');
-    if (oStringList.length == 1) return oStringList[0];
-
-    var camelizedString = this.indexOf('-') == 0
-      ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
-      : oStringList[0];
-
-    for (var i = 1, len = oStringList.length; i < len; i++) {
-      var s = oStringList[i];
-      camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
-    }
-
-    return camelizedString;
-  },
-
-  inspect: function() {
-    return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'";
-  }
-});
-
-String.prototype.parseQuery = String.prototype.toQueryParams;
-
-var $break    = new Object();
-var $continue = new Object();
-
-var Enumerable = {
-  each: function(iterator) {
-    var index = 0;
-    try {
-      this._each(function(value) {
-        try {
-          iterator(value, index++);
-        } catch (e) {
-          if (e != $continue) throw e;
-        }
-      });
-    } catch (e) {
-      if (e != $break) throw e;
-    }
-  },
-
-  all: function(iterator) {
-    var result = true;
-    this.each(function(value, index) {
-      result = result && !!(iterator || Prototype.K)(value, index);
-      if (!result) throw $break;
-    });
-    return result;
-  },
-
-  any: function(iterator) {
-    var result = true;
-    this.each(function(value, index) {
-      if (result = !!(iterator || Prototype.K)(value, index))
-        throw $break;
-    });
-    return result;
-  },
-
-  collect: function(iterator) {
-    var results = [];
-    this.each(function(value, index) {
-      results.push(iterator(value, index));
-    });
-    return results;
-  },
-
-  detect: function (iterator) {
-    var result;
-    this.each(function(value, index) {
-      if (iterator(value, index)) {
-        result = value;
-        throw $break;
-      }
-    });
-    return result;
-  },
-
-  findAll: function(iterator) {
-    var results = [];
-    this.each(function(value, index) {
-      if (iterator(value, index))
-        results.push(value);
-    });
-    return results;
-  },
-
-  grep: function(pattern, iterator) {
-    var results = [];
-    this.each(function(value, index) {
-      var stringValue = value.toString();
-      if (stringValue.match(pattern))
-        results.push((iterator || Prototype.K)(value, index));
-    })
-    return results;
-  },
-
-  include: function(object) {
-    var found = false;
-    this.each(function(value) {
-      if (value == object) {
-        found = true;
-        throw $break;
-      }
-    });
-    return found;
-  },
-
-  inject: function(memo, iterator) {
-    this.each(function(value, index) {
-      memo = iterator(memo, value, index);
-    });
-    return memo;
-  },
-
-  invoke: function(method) {
-    var args = $A(arguments).slice(1);
-    return this.collect(function(value) {
-      return value[method].apply(value, args);
-    });
-  },
-
-  max: function(iterator) {
-    var result;
-    this.each(function(value, index) {
-      value = (iterator || Prototype.K)(value, index);
-      if (value >= (result || value))
-        result = value;
-    });
-    return result;
-  },
-
-  min: function(iterator) {
-    var result;
-    this.each(function(value, index) {
-      value = (iterator || Prototype.K)(value, index);
-      if (value <= (result || value))
-        result = value;
-    });
-    return result;
-  },
-
-  partition: function(iterator) {
-    var trues = [], falses = [];
-    this.each(function(value, index) {
-      ((iterator || Prototype.K)(value, index) ?
-        trues : falses).push(value);
-    });
-    return [trues, falses];
-  },
-
-  pluck: function(property) {
-    var results = [];
-    this.each(function(value, index) {
-      results.push(value[property]);
-    });
-    return results;
-  },
-
-  reject: function(iterator) {
-    var results = [];
-    this.each(function(value, index) {
-      if (!iterator(value, index))
-        results.push(value);
-    });
-    return results;
-  },
-
-  sortBy: function(iterator) {
-    return this.collect(function(value, index) {
-      return {value: value, criteria: iterator(value, index)};
-    }).sort(function(left, right) {
-      var a = left.criteria, b = right.criteria;
-      return a < b ? -1 : a > b ? 1 : 0;
-    }).pluck('value');
-  },
-
-  toArray: function() {
-    return this.collect(Prototype.K);
-  },
-
-  zip: function() {
-    var iterator = Prototype.K, args = $A(arguments);
-    if (typeof args.last() == 'function')
-      iterator = args.pop();
-
-    var collections = [this].concat(args).map($A);
-    return this.map(function(value, index) {
-      iterator(value = collections.pluck(index));
-      return value;
-    });
-  },
-
-  inspect: function() {
-    return '#<Enumerable:' + this.toArray().inspect() + '>';
-  }
-}
-
-Object.extend(Enumerable, {
-  map:     Enumerable.collect,
-  find:    Enumerable.detect,
-  select:  Enumerable.findAll,
-  member:  Enumerable.include,
-  entries: Enumerable.toArray
-});
-var $A = Array.from = function(iterable) {
-  if (!iterable) return [];
-  if (iterable.toArray) {
-    return iterable.toArray();
-  } else {
-    var results = [];
-    for (var i = 0; i < iterable.length; i++)
-      results.push(iterable[i]);
-    return results;
-  }
-}
-
-Object.extend(Array.prototype, Enumerable);
-
-Array.prototype._reverse = Array.prototype.reverse;
-
-Object.extend(Array.prototype, {
-  _each: function(iterator) {
-    for (var i = 0; i < this.length; i++)
-      iterator(this[i]);
-  },
-
-  clear: function() {
-    this.length = 0;
-    return this;
-  },
-
-  first: function() {
-    return this[0];
-  },
-
-  last: function() {
-    return this[this.length - 1];
-  },
-
-  compact: function() {
-    return this.select(function(value) {
-      return value != undefined || value != null;
-    });
-  },
-
-  flatten: function() {
-    return this.inject([], function(array, value) {
-      return array.concat(value.constructor == Array ?
-        value.flatten() : [value]);
-    });
-  },
-
-  without: function() {
-    var values = $A(arguments);
-    return this.select(function(value) {
-      return !values.include(value);
-    });
-  },
-
-  indexOf: function(object) {
-    for (var i = 0; i < this.length; i++)
-      if (this[i] == object) return i;
-    return -1;
-  },
-
-  reverse: function(inline) {
-    return (inline !== false ? this : this.toArray())._reverse();
-  },
-
-  shift: function() {
-    var result = this[0];
-    for (var i = 0; i < this.length - 1; i++)
-      this[i] = this[i + 1];
-    this.length--;
-    return result;
-  },
-
-  inspect: function() {
-    return '[' + this.map(Object.inspect).join(', ') + ']';
-  }
-});
-var Hash = {
-  _each: function(iterator) {
-    for (key in this) {
-      var value = this[key];
-      if (typeof value == 'function') continue;
-
-      var pair = [key, value];
-      pair.key = key;
-      pair.value = value;
-      iterator(pair);
-    }
-  },
-
-  keys: function() {
-    return this.pluck('key');
-  },
-
-  values: function() {
-    return this.pluck('value');
-  },
-
-  merge: function(hash) {
-    return $H(hash).inject($H(this), function(mergedHash, pair) {
-      mergedHash[pair.key] = pair.value;
-      return mergedHash;
-    });
-  },
-
-  toQueryString: function() {
-    return this.map(function(pair) {
-      return pair.map(encodeURIComponent).join('=');
-    }).join('&');
-  },
-
-  inspect: function() {
-    return '#<Hash:{' + this.map(function(pair) {
-      return pair.map(Object.inspect).join(': ');
-    }).join(', ') + '}>';
-  }
-}
-
-function $H(object) {
-  var hash = Object.extend({}, object || {});
-  Object.extend(hash, Enumerable);
-  Object.extend(hash, Hash);
-  return hash;
-}
-ObjectRange = Class.create();
-Object.extend(ObjectRange.prototype, Enumerable);
-Object.extend(ObjectRange.prototype, {
-  initialize: function(start, end, exclusive) {
-    this.start = start;
-    this.end = end;
-    this.exclusive = exclusive;
-  },
-
-  _each: function(iterator) {
-    var value = this.start;
-    do {
-      iterator(value);
-      value = value.succ();
-    } while (this.include(value));
-  },
-
-  include: function(value) {
-    if (value < this.start)
-      return false;
-    if (this.exclusive)
-      return value < this.end;
-    return value <= this.end;
-  }
-});
-
-var $R = function(start, end, exclusive) {
-  return new ObjectRange(start, end, exclusive);
-}
-
-var Ajax = {
-  getTransport: function() {
-    return Try.these(
-      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
-      function() {return new ActiveXObject('Microsoft.XMLHTTP')},
-      function() {return new XMLHttpRequest()}
-    ) || false;
-  },
-
-  activeRequestCount: 0
-}
-
-Ajax.Responders = {
-  responders: [],
-
-  _each: function(iterator) {
-    this.responders._each(iterator);
-  },
-
-  register: function(responderToAdd) {
-    if (!this.include(responderToAdd))
-      this.responders.push(responderToAdd);
-  },
-
-  unregister: function(responderToRemove) {
-    this.responders = this.responders.without(responderToRemove);
-  },
-
-  dispatch: function(callback, request, transport, json) {
-    this.each(function(responder) {
-      if (responder[callback] && typeof responder[callback] == 'function') {
-        try {
-          responder[callback].apply(responder, [request, transport, json]);
-        } catch (e) {}
-      }
-    });
-  }
-};
-
-Object.extend(Ajax.Responders, Enumerable);
-
-Ajax.Responders.register({
-  onCreate: function() {
-    Ajax.activeRequestCount++;
-  },
-
-  onComplete: function() {
-    Ajax.activeRequestCount--;
-  }
-});
-
-Ajax.Base = function() {};
-Ajax.Base.prototype = {
-  setOptions: function(options) {
-    this.options = {
-      method:       'post',
-      asynchronous: true,
-      parameters:   ''
-    }
-    Object.extend(this.options, options || {});
-  },
-
-  responseIsSuccess: function() {
-    return this.transport.status == undefined
-        || this.transport.status == 0
-        || (this.transport.status >= 200 && this.transport.status < 300);
-  },
-
-  responseIsFailure: function() {
-    return !this.responseIsSuccess();
-  }
-}
-
-Ajax.Request = Class.create();
-Ajax.Request.Events =
-  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
-  initialize: function(url, options) {
-    this.transport = Ajax.getTransport();
-    this.setOptions(options);
-    this.request(url);
-  },
-
-  request: function(url) {
-    var parameters = this.options.parameters || '';
-    if (parameters.length > 0) parameters += '&_=';
-
-    try {
-      this.url = url;
-      if (this.options.method == 'get' && parameters.length > 0)
-        this.url += (this.url.match(/\?/) ? '&' : '?') + parameters;
-
-      Ajax.Responders.dispatch('onCreate', this, this.transport);
-
-      this.transport.open(this.options.method, this.url,
-        this.options.asynchronous);
-
-      if (this.options.asynchronous) {
-        this.transport.onreadystatechange = this.onStateChange.bind(this);
-        setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10);
-      }
-
-      this.setRequestHeaders();
-
-      var body = this.options.postBody ? this.options.postBody : parameters;
-      this.transport.send(this.options.method == 'post' ? body : null);
-
-    } catch (e) {
-      this.dispatchException(e);
-    }
-  },
-
-  setRequestHeaders: function() {
-    var requestHeaders =
-      ['X-Requested-With', 'XMLHttpRequest',
-       'X-Prototype-Version', Prototype.Version];
-
-    if (this.options.method == 'post') {
-      requestHeaders.push('Content-type',
-        'application/x-www-form-urlencoded');
-
-      /* Force "Connection: close" for Mozilla browsers to work around
-       * a bug where XMLHttpReqeuest sends an incorrect Content-length
-       * header. See Mozilla Bugzilla #246651.
-       */
-      if (this.transport.overrideMimeType)
-        requestHeaders.push('Connection', 'close');
-    }
-
-    if (this.options.requestHeaders)
-      requestHeaders.push.apply(requestHeaders, this.options.requestHeaders);
-
-    for (var i = 0; i < requestHeaders.length; i += 2)
-      this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);
-  },
-
-  onStateChange: function() {
-    var readyState = this.transport.readyState;
-    if (readyState != 1)
-      this.respondToReadyState(this.transport.readyState);
-  },
-
-  header: function(name) {
-    try {
-      return this.transport.getResponseHeader(name);
-    } catch (e) {}
-  },
-
-  evalJSON: function() {
-    try {
-      return eval(this.header('X-JSON'));
-    } catch (e) {}
-  },
-
-  evalResponse: function() {
-    try {
-      return eval(this.transport.responseText);
-    } catch (e) {
-      this.dispatchException(e);
-    }
-  },
-
-  respondToReadyState: function(readyState) {
-    var event = Ajax.Request.Events[readyState];
-    var transport = this.transport, json = this.evalJSON();
-
-    if (event == 'Complete') {
-      try {
-        (this.options['on' + this.transport.status]
-         || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')]
-         || Prototype.emptyFunction)(transport, json);
-      } catch (e) {
-        this.dispatchException(e);
-      }
-
-      if ((this.header('Content-type') || '').match(/^text\/javascript/i))
-        this.evalResponse();
-    }
-
-    try {
-      (this.options['on' + event] || Prototype.emptyFunction)(transport, json);
-      Ajax.Responders.dispatch('on' + event, this, transport, json);
-    } catch (e) {
-      this.dispatchException(e);
-    }
-
-    /* Avoid memory leak in MSIE: clean up the oncomplete event handler */
-    if (event == 'Complete')
-      this.transport.onreadystatechange = Prototype.emptyFunction;
-  },
-
-  dispatchException: function(exception) {
-    (this.options.onException || Prototype.emptyFunction)(this, exception);
-    Ajax.Responders.dispatch('onException', this, exception);
-  }
-});
-
-Ajax.Updater = Class.create();
-
-Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
-  initialize: function(container, url, options) {
-    this.containers = {
-      success: container.success ? $(container.success) : $(container),
-      failure: container.failure ? $(container.failure) :
-        (container.success ? null : $(container))
-    }
-
-    this.transport = Ajax.getTransport();
-    this.setOptions(options);
-
-    var onComplete = this.options.onComplete || Prototype.emptyFunction;
-    this.options.onComplete = (function(transport, object) {
-      this.updateContent();
-      onComplete(transport, object);
-    }).bind(this);
-
-    this.request(url);
-  },
-
-  updateContent: function() {
-    var receiver = this.responseIsSuccess() ?
-      this.containers.success : this.containers.failure;
-    var response = this.transport.responseText;
-
-    if (!this.options.evalScripts)
-      response = response.stripScripts();
-
-    if (receiver) {
-      if (this.options.insertion) {
-        new this.options.insertion(receiver, response);
-      } else {
-        Element.update(receiver, response);
-      }
-    }
-
-    if (this.responseIsSuccess()) {
-      if (this.onComplete)
-        setTimeout(this.onComplete.bind(this), 10);
-    }
-  }
-});
-
-Ajax.PeriodicalUpdater = Class.create();
-Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
-  initialize: function(container, url, options) {
-    this.setOptions(options);
-    this.onComplete = this.options.onComplete;
-
-    this.frequency = (this.options.frequency || 2);
-    this.decay = (this.options.decay || 1);
-
-    this.updater = {};
-    this.container = container;
-    this.url = url;
-
-    this.start();
-  },
-
-  start: function() {
-    this.options.onComplete = this.updateComplete.bind(this);
-    this.onTimerEvent();
-  },
-
-  stop: function() {
-    this.updater.onComplete = undefined;
-    clearTimeout(this.timer);
-    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
-  },
-
-  updateComplete: function(request) {
-    if (this.options.decay) {
-      this.decay = (request.responseText == this.lastText ?
-        this.decay * this.options.decay : 1);
-
-      this.lastText = request.responseText;
-    }
-    this.timer = setTimeout(this.onTimerEvent.bind(this),
-      this.decay * this.frequency * 1000);
-  },
-
-  onTimerEvent: function() {
-    this.updater = new Ajax.Updater(this.container, this.url, this.options);
-  }
-});
-document.getElementsByClassName = function(className, parentElement) {
-  var children = ($(parentElement) || document.body).getElementsByTagName('*');
-  return $A(children).inject([], function(elements, child) {
-    if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
-      elements.push(child);
-    return elements;
-  });
-}
-
-/*--------------------------------------------------------------------------*/
-
-if (!window.Element) {
-  var Element = new Object();
-}
-
-Object.extend(Element, {
-  visible: function(element) {
-    return $(element).style.display != 'none';
-  },
-
-  toggle: function() {
-    for (var i = 0; i < arguments.length; i++) {
-      var element = $(arguments[i]);
-      Element[Element.visible(element) ? 'hide' : 'show'](element);
-    }
-  },
-
-  hide: function() {
-    for (var i = 0; i < arguments.length; i++) {
-      var element = $(arguments[i]);
-      element.style.display = 'none';
-    }
-  },
-
-  show: function() {
-    for (var i = 0; i < arguments.length; i++) {
-      var element = $(arguments[i]);
-      element.style.display = '';
-    }
-  },
-
-  remove: function(element) {
-    element = $(element);
-    element.parentNode.removeChild(element);
-  },
-
-  update: function(element, html) {
-    $(element).innerHTML = html.stripScripts();
-    setTimeout(function() {html.evalScripts()}, 10);
-  },
-
-  getHeight: function(element) {
-    element = $(element);
-    return element.offsetHeight;
-  },
-
-  classNames: function(element) {
-    return new Element.ClassNames(element);
-  },
-
-  hasClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    return Element.classNames(element).include(className);
-  },
-
-  addClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    return Element.classNames(element).add(className);
-  },
-
-  removeClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    return Element.classNames(element).remove(className);
-  },
-
-  // removes whitespace-only text node children
-  cleanWhitespace: function(element) {
-    element = $(element);
-    for (var i = 0; i < element.childNodes.length; i++) {
-      var node = element.childNodes[i];
-      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
-        Element.remove(node);
-    }
-  },
-
-  empty: function(element) {
-    return $(element).innerHTML.match(/^\s*$/);
-  },
-
-  scrollTo: function(element) {
-    element = $(element);
-    var x = element.x ? element.x : element.offsetLeft,
-        y = element.y ? element.y : element.offsetTop;
-    window.scrollTo(x, y);
-  },
-
-  getStyle: function(element, style) {
-    element = $(element);
-    var value = element.style[style.camelize()];
-    if (!value) {
-      if (document.defaultView && document.defaultView.getComputedStyle) {
-        var css = document.defaultView.getComputedStyle(element, null);
-        value = css ? css.getPropertyValue(style) : null;
-      } else if (element.currentStyle) {
-        value = element.currentStyle[style.camelize()];
-      }
-    }
-
-    if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
-      if (Element.getStyle(element, 'position') == 'static') value = 'auto';
-
-    return value == 'auto' ? null : value;
-  },
-
-  setStyle: function(element, style) {
-    element = $(element);
-    for (name in style)
-      element.style[name.camelize()] = style[name];
-  },
-
-  getDimensions: function(element) {
-    element = $(element);
-    if (Element.getStyle(element, 'display') != 'none')
-      return {width: element.offsetWidth, height: element.offsetHeight};
-
-    // All *Width and *Height properties give 0 on elements with display none,
-    // so enable the element temporarily
-    var els = element.style;
-    var originalVisibility = els.visibility;
-    var originalPosition = els.position;
-    els.visibility = 'hidden';
-    els.position = 'absolute';
-    els.display = '';
-    var originalWidth = element.clientWidth;
-    var originalHeight = element.clientHeight;
-    els.display = 'none';
-    els.position = originalPosition;
-    els.visibility = originalVisibility;
-    return {width: originalWidth, height: originalHeight};
-  },
-
-  makePositioned: function(element) {
-    element = $(element);
-    var pos = Element.getStyle(element, 'position');
-    if (pos == 'static' || !pos) {
-      element._madePositioned = true;
-      element.style.position = 'relative';
-      // Opera returns the offset relative to the positioning context, when an
-      // element is position relative but top and left have not been defined
-      if (window.opera) {
-        element.style.top = 0;
-        element.style.left = 0;
-      }
-    }
-  },
-
-  undoPositioned: function(element) {
-    element = $(element);
-    if (element._madePositioned) {
-      element._madePositioned = undefined;
-      element.style.position =
-        element.style.top =
-        element.style.left =
-        element.style.bottom =
-        element.style.right = '';
-    }
-  },
-
-  makeClipping: function(element) {
-    element = $(element);
-    if (element._overflow) return;
-    element._overflow = element.style.overflow;
-    if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
-      element.style.overflow = 'hidden';
-  },
-
-  undoClipping: function(element) {
-    element = $(element);
-    if (element._overflow) return;
-    element.style.overflow = element._overflow;
-    element._overflow = undefined;
-  }
-});
-
-var Toggle = new Object();
-Toggle.display = Element.toggle;
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.Insertion = function(adjacency) {
-  this.adjacency = adjacency;
-}
-
-Abstract.Insertion.prototype = {
-  initialize: function(element, content) {
-    this.element = $(element);
-    this.content = content.stripScripts();
-
-    if (this.adjacency && this.element.insertAdjacentHTML) {
-      try {
-        this.element.insertAdjacentHTML(this.adjacency, this.content);
-      } catch (e) {
-        if (this.element.tagName.toLowerCase() == 'tbody') {
-          this.insertContent(this.contentFromAnonymousTable());
-        } else {
-          throw e;
-        }
-      }
-    } else {
-      this.range = this.element.ownerDocument.createRange();
-      if (this.initializeRange) this.initializeRange();
-      this.insertContent([this.range.createContextualFragment(this.content)]);
-    }
-
-    setTimeout(function() {content.evalScripts()}, 10);
-  },
-
-  contentFromAnonymousTable: function() {
-    var div = document.createElement('div');
-    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
-    return $A(div.childNodes[0].childNodes[0].childNodes);
-  }
-}
-
-var Insertion = new Object();
-
-Insertion.Before = Class.create();
-Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
-  initializeRange: function() {
-    this.range.setStartBefore(this.element);
-  },
-
-  insertContent: function(fragments) {
-    fragments.each((function(fragment) {
-      this.element.parentNode.insertBefore(fragment, this.element);
-    }).bind(this));
-  }
-});
-
-Insertion.Top = Class.create();
-Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
-  initializeRange: function() {
-    this.range.selectNodeContents(this.element);
-    this.range.collapse(true);
-  },
-
-  insertContent: function(fragments) {
-    fragments.reverse(false).each((function(fragment) {
-      this.element.insertBefore(fragment, this.element.firstChild);
-    }).bind(this));
-  }
-});
-
-Insertion.Bottom = Class.create();
-Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
-  initializeRange: function() {
-    this.range.selectNodeContents(this.element);
-    this.range.collapse(this.element);
-  },
-
-  insertContent: function(fragments) {
-    fragments.each((function(fragment) {
-      this.element.appendChild(fragment);
-    }).bind(this));
-  }
-});
-
-Insertion.After = Class.create();
-Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
-  initializeRange: function() {
-    this.range.setStartAfter(this.element);
-  },
-
-  insertContent: function(fragments) {
-    fragments.each((function(fragment) {
-      this.element.parentNode.insertBefore(fragment,
-        this.element.nextSibling);
-    }).bind(this));
-  }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Element.ClassNames = Class.create();
-Element.ClassNames.prototype = {
-  initialize: function(element) {
-    this.element = $(element);
-  },
-
-  _each: function(iterator) {
-    this.element.className.split(/\s+/).select(function(name) {
-      return name.length > 0;
-    })._each(iterator);
-  },
-
-  set: function(className) {
-    this.element.className = className;
-  },
-
-  add: function(classNameToAdd) {
-    if (this.include(classNameToAdd)) return;
-    this.set(this.toArray().concat(classNameToAdd).join(' '));
-  },
-
-  remove: function(classNameToRemove) {
-    if (!this.include(classNameToRemove)) return;
-    this.set(this.select(function(className) {
-      return className != classNameToRemove;
-    }).join(' '));
-  },
-
-  toString: function() {
-    return this.toArray().join(' ');
-  }
-}
-
-Object.extend(Element.ClassNames.prototype, Enumerable);
-var Field = {
-  clear: function() {
-    for (var i = 0; i < arguments.length; i++)
-      $(arguments[i]).value = '';
-  },
-
-  focus: function(element) {
-    $(element).focus();
-  },
-
-  present: function() {
-    for (var i = 0; i < arguments.length; i++)
-      if ($(arguments[i]).value == '') return false;
-    return true;
-  },
-
-  select: function(element) {
-    $(element).select();
-  },
-
-  activate: function(element) {
-    element = $(element);
-    element.focus();
-    if (element.select)
-      element.select();
-  }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var Form = {
-  serialize: function(form) {
-    var elements = Form.getElements($(form));
-    var queryComponents = new Array();
-
-    for (var i = 0; i < elements.length; i++) {
-      var queryComponent = Form.Element.serialize(elements[i]);
-      if (queryComponent)
-        queryComponents.push(queryComponent);
-    }
-
-    return queryComponents.join('&');
-  },
-
-  getElements: function(form) {
-    form = $(form);
-    var elements = new Array();
-
-    for (tagName in Form.Element.Serializers) {
-      var tagElements = form.getElementsByTagName(tagName);
-      for (var j = 0; j < tagElements.length; j++)
-        elements.push(tagElements[j]);
-    }
-    return elements;
-  },
-
-  getInputs: function(form, typeName, name) {
-    form = $(form);
-    var inputs = form.getElementsByTagName('input');
-
-    if (!typeName && !name)
-      return inputs;
-
-    var matchingInputs = new Array();
-    for (var i = 0; i < inputs.length; i++) {
-      var input = inputs[i];
-      if ((typeName && input.type != typeName) ||
-          (name && input.name != name))
-        continue;
-      matchingInputs.push(input);
-    }
-
-    return matchingInputs;
-  },
-
-  disable: function(form) {
-    var elements = Form.getElements(form);
-    for (var i = 0; i < elements.length; i++) {
-      var element = elements[i];
-      element.blur();
-      element.disabled = 'true';
-    }
-  },
-
-  enable: function(form) {
-    var elements = Form.getElements(form);
-    for (var i = 0; i < elements.length; i++) {
-      var element = elements[i];
-      element.disabled = '';
-    }
-  },
-
-  findFirstElement: function(form) {
-    return Form.getElements(form).find(function(element) {
-      return element.type != 'hidden' && !element.disabled &&
-        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
-    });
-  },
-
-  focusFirstElement: function(form) {
-    Field.activate(Form.findFirstElement(form));
-  },
-
-  reset: function(form) {
-    $(form).reset();
-  }
-}
-
-Form.Element = {
-  serialize: function(element) {
-    element = $(element);
-    var method = element.tagName.toLowerCase();
-    var parameter = Form.Element.Serializers[method](element);
-
-    if (parameter) {
-      var key = encodeURIComponent(parameter[0]);
-      if (key.length == 0) return;
-
-      if (parameter[1].constructor != Array)
-        parameter[1] = [parameter[1]];
-
-      return parameter[1].map(function(value) {
-        return key + '=' + encodeURIComponent(value);
-      }).join('&');
-    }
-  },
-
-  getValue: function(element) {
-    element = $(element);
-    var method = element.tagName.toLowerCase();
-    var parameter = Form.Element.Serializers[method](element);
-
-    if (parameter)
-      return parameter[1];
-  }
-}
-
-Form.Element.Serializers = {
-  input: function(element) {
-    switch (element.type.toLowerCase()) {
-      case 'submit':
-      case 'hidden':
-      case 'password':
-      case 'text':
-        return Form.Element.Serializers.textarea(element);
-      case 'checkbox':
-      case 'radio':
-        return Form.Element.Serializers.inputSelector(element);
-    }
-    return false;
-  },
-
-  inputSelector: function(element) {
-    if (element.checked)
-      return [element.name, element.value];
-  },
-
-  textarea: function(element) {
-    return [element.name, element.value];
-  },
-
-  select: function(element) {
-    return Form.Element.Serializers[element.type == 'select-one' ?
-      'selectOne' : 'selectMany'](element);
-  },
-
-  selectOne: function(element) {
-    var value = '', opt, index = element.selectedIndex;
-    if (index >= 0) {
-      opt = element.options[index];
-      value = opt.value;
-      if (!value && !('value' in opt))
-        value = opt.text;
-    }
-    return [element.name, value];
-  },
-
-  selectMany: function(element) {
-    var value = new Array();
-    for (var i = 0; i < element.length; i++) {
-      var opt = element.options[i];
-      if (opt.selected) {
-        var optValue = opt.value;
-        if (!optValue && !('value' in opt))
-          optValue = opt.text;
-        value.push(optValue);
-      }
-    }
-    return [element.name, value];
-  }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var $F = Form.Element.getValue;
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.TimedObserver = function() {}
-Abstract.TimedObserver.prototype = {
-  initialize: function(element, frequency, callback) {
-    this.frequency = frequency;
-    this.element   = $(element);
-    this.callback  = callback;
-
-    this.lastValue = this.getValue();
-    this.registerCallback();
-  },
-
-  registerCallback: function() {
-    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
-  },
-
-  onTimerEvent: function() {
-    var value = this.getValue();
-    if (this.lastValue != value) {
-      this.callback(this.element, value);
-      this.lastValue = value;
-    }
-  }
-}
-
-Form.Element.Observer = Class.create();
-Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
-  getValue: function() {
-    return Form.Element.getValue(this.element);
-  }
-});
-
-Form.Observer = Class.create();
-Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
-  getValue: function() {
-    return Form.serialize(this.element);
-  }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.EventObserver = function() {}
-Abstract.EventObserver.prototype = {
-  initialize: function(element, callback) {
-    this.element  = $(element);
-    this.callback = callback;
-
-    this.lastValue = this.getValue();
-    if (this.element.tagName.toLowerCase() == 'form')
-      this.registerFormCallbacks();
-    else
-      this.registerCallback(this.element);
-  },
-
-  onElementEvent: function() {
-    var value = this.getValue();
-    if (this.lastValue != value) {
-      this.callback(this.element, value);
-      this.lastValue = value;
-    }
-  },
-
-  registerFormCallbacks: function() {
-    var elements = Form.getElements(this.element);
-    for (var i = 0; i < elements.length; i++)
-      this.registerCallback(elements[i]);
-  },
-
-  registerCallback: function(element) {
-    if (element.type) {
-      switch (element.type.toLowerCase()) {
-        case 'checkbox':
-        case 'radio':
-          Event.observe(element, 'click', this.onElementEvent.bind(this));
-          break;
-        case 'password':
-        case 'text':
-        case 'textarea':
-        case 'select-one':
-        case 'select-multiple':
-          Event.observe(element, 'change', this.onElementEvent.bind(this));
-          break;
-      }
-    }
-  }
-}
-
-Form.Element.EventObserver = Class.create();
-Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
-  getValue: function() {
-    return Form.Element.getValue(this.element);
-  }
-});
-
-Form.EventObserver = Class.create();
-Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
-  getValue: function() {
-    return Form.serialize(this.element);
-  }
-});
-if (!window.Event) {
-  var Event = new Object();
-}
-
-Object.extend(Event, {
-  KEY_BACKSPACE: 8,
-  KEY_TAB:       9,
-  KEY_RETURN:   13,
-  KEY_ESC:      27,
-  KEY_LEFT:     37,
-  KEY_UP:       38,
-  KEY_RIGHT:    39,
-  KEY_DOWN:     40,
-  KEY_DELETE:   46,
-
-  element: function(event) {
-    return event.target || event.srcElement;
-  },
-
-  isLeftClick: function(event) {
-    return (((event.which) && (event.which == 1)) ||
-            ((event.button) && (event.button == 1)));
-  },
-
-  pointerX: function(event) {
-    return event.pageX || (event.clientX +
-      (document.documentElement.scrollLeft || document.body.scrollLeft));
-  },
-
-  pointerY: function(event) {
-    return event.pageY || (event.clientY +
-      (document.documentElement.scrollTop || document.body.scrollTop));
-  },
-
-  stop: function(event) {
-    if (event.preventDefault) {
-      event.preventDefault();
-      event.stopPropagation();
-    } else {
-      event.returnValue = false;
-      event.cancelBubble = true;
-    }
-  },
-
-  // find the first node with the given tagName, starting from the
-  // node the event was triggered on; traverses the DOM upwards
-  findElement: function(event, tagName) {
-    var element = Event.element(event);
-    while (element.parentNode && (!element.tagName ||
-        (element.tagName.toUpperCase() != tagName.toUpperCase())))
-      element = element.parentNode;
-    return element;
-  },
-
-  observers: false,
-
-  _observeAndCache: function(element, name, observer, useCapture) {
-    if (!this.observers) this.observers = [];
-    if (element.addEventListener) {
-      this.observers.push([element, name, observer, useCapture]);
-      element.addEventListener(name, observer, useCapture);
-    } else if (element.attachEvent) {
-      this.observers.push([element, name, observer, useCapture]);
-      element.attachEvent('on' + name, observer);
-    }
-  },
-
-  unloadCache: function() {
-    if (!Event.observers) return;
-    for (var i = 0; i < Event.observers.length; i++) {
-      Event.stopObserving.apply(this, Event.observers[i]);
-      Event.observers[i][0] = null;
-    }
-    Event.observers = false;
-  },
-
-  observe: function(element, name, observer, useCapture) {
-    var element = $(element);
-    useCapture = useCapture || false;
-
-    if (name == 'keypress' &&
-        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
-        || element.attachEvent))
-      name = 'keydown';
-
-    this._observeAndCache(element, name, observer, useCapture);
-  },
-
-  stopObserving: function(element, name, observer, useCapture) {
-    var element = $(element);
-    useCapture = useCapture || false;
-
-    if (name == 'keypress' &&
-        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
-        || element.detachEvent))
-      name = 'keydown';
-
-    if (element.removeEventListener) {
-      element.removeEventListener(name, observer, useCapture);
-    } else if (element.detachEvent) {
-      element.detachEvent('on' + name, observer);
-    }
-  }
-});
-
-/* prevent memory leaks in IE */
-Event.observe(window, 'unload', Event.unloadCache, false);
-var Position = {
-  // set to true if needed, warning: firefox performance problems
-  // NOT neeeded for page scrolling, only if draggable contained in
-  // scrollable elements
-  includeScrollOffsets: false,
-
-  // must be called before calling withinIncludingScrolloffset, every time the
-  // page is scrolled
-  prepare: function() {
-    this.deltaX =  window.pageXOffset
-                || document.documentElement.scrollLeft
-                || document.body.scrollLeft
-                || 0;
-    this.deltaY =  window.pageYOffset
-                || document.documentElement.scrollTop
-                || document.body.scrollTop
-                || 0;
-  },
-
-  realOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.scrollTop  || 0;
-      valueL += element.scrollLeft || 0;
-      element = element.parentNode;
-    } while (element);
-    return [valueL, valueT];
-  },
-
-  cumulativeOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      element = element.offsetParent;
-    } while (element);
-    return [valueL, valueT];
-  },
-
-  positionedOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      element = element.offsetParent;
-      if (element) {
-        p = Element.getStyle(element, 'position');
-        if (p == 'relative' || p == 'absolute') break;
-      }
-    } while (element);
-    return [valueL, valueT];
-  },
-
-  offsetParent: function(element) {
-    if (element.offsetParent) return element.offsetParent;
-    if (element == document.body) return element;
-
-    while ((element = element.parentNode) && element != document.body)
-      if (Element.getStyle(element, 'position') != 'static')
-        return element;
-
-    return document.body;
-  },
-
-  // caches x/y coordinate pair to use with overlap
-  within: function(element, x, y) {
-    if (this.includeScrollOffsets)
-      return this.withinIncludingScrolloffsets(element, x, y);
-    this.xcomp = x;
-    this.ycomp = y;
-    this.offset = this.cumulativeOffset(element);
-
-    return (y >= this.offset[1] &&
-            y <  this.offset[1] + element.offsetHeight &&
-            x >= this.offset[0] &&
-            x <  this.offset[0] + element.offsetWidth);
-  },
-
-  withinIncludingScrolloffsets: function(element, x, y) {
-    var offsetcache = this.realOffset(element);
-
-    this.xcomp = x + offsetcache[0] - this.deltaX;
-    this.ycomp = y + offsetcache[1] - this.deltaY;
-    this.offset = this.cumulativeOffset(element);
-
-    return (this.ycomp >= this.offset[1] &&
-            this.ycomp <  this.offset[1] + element.offsetHeight &&
-            this.xcomp >= this.offset[0] &&
-            this.xcomp <  this.offset[0] + element.offsetWidth);
-  },
-
-  // within must be called directly before
-  overlap: function(mode, element) {
-    if (!mode) return 0;
-    if (mode == 'vertical')
-      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
-        element.offsetHeight;
-    if (mode == 'horizontal')
-      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
-        element.offsetWidth;
-  },
-
-  clone: function(source, target) {
-    source = $(source);
-    target = $(target);
-    target.style.position = 'absolute';
-    var offsets = this.cumulativeOffset(source);
-    target.style.top    = offsets[1] + 'px';
-    target.style.left   = offsets[0] + 'px';
-    target.style.width  = source.offsetWidth + 'px';
-    target.style.height = source.offsetHeight + 'px';
-  },
-
-  page: function(forElement) {
-    var valueT = 0, valueL = 0;
-
-    var element = forElement;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-
-      // Safari fix
-      if (element.offsetParent==document.body)
-        if (Element.getStyle(element,'position')=='absolute') break;
-
-    } while (element = element.offsetParent);
-
-    element = forElement;
-    do {
-      valueT -= element.scrollTop  || 0;
-      valueL -= element.scrollLeft || 0;
-    } while (element = element.parentNode);
-
-    return [valueL, valueT];
-  },
-
-  clone: function(source, target) {
-    var options = Object.extend({
-      setLeft:    true,
-      setTop:     true,
-      setWidth:   true,
-      setHeight:  true,
-      offsetTop:  0,
-      offsetLeft: 0
-    }, arguments[2] || {})
-
-    // find page position of source
-    source = $(source);
-    var p = Position.page(source);
-
-    // find coordinate system to use
-    target = $(target);
-    var delta = [0, 0];
-    var parent = null;
-    // delta [0,0] will do fine with position: fixed elements,
-    // position:absolute needs offsetParent deltas
-    if (Element.getStyle(target,'position') == 'absolute') {
-      parent = Position.offsetParent(target);
-      delta = Position.page(parent);
-    }
-
-    // correct by body offsets (fixes Safari)
-    if (parent == document.body) {
-      delta[0] -= document.body.offsetLeft;
-      delta[1] -= document.body.offsetTop;
-    }
-
-    // set position
-    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
-    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
-    if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
-    if(options.setHeight) target.style.height = source.offsetHeight + 'px';
-  },
-
-  absolutize: function(element) {
-    element = $(element);
-    if (element.style.position == 'absolute') return;
-    Position.prepare();
-
-    var offsets = Position.positionedOffset(element);
-    var top     = offsets[1];
-    var left    = offsets[0];
-    var width   = element.clientWidth;
-    var height  = element.clientHeight;
-
-    element._originalLeft   = left - parseFloat(element.style.left  || 0);
-    element._originalTop    = top  - parseFloat(element.style.top || 0);
-    element._originalWidth  = element.style.width;
-    element._originalHeight = element.style.height;
-
-    element.style.position = 'absolute';
-    element.style.top    = top + 'px';;
-    element.style.left   = left + 'px';;
-    element.style.width  = width + 'px';;
-    element.style.height = height + 'px';;
-  },
-
-  relativize: function(element) {
-    element = $(element);
-    if (element.style.position == 'relative') return;
-    Position.prepare();
-
-    element.style.position = 'relative';
-    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
-    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
-
-    element.style.top    = top + 'px';
-    element.style.left   = left + 'px';
-    element.style.height = element._originalHeight;
-    element.style.width  = element._originalWidth;
-  }
-}
-
-// Safari returns margins on body which is incorrect if the child is absolutely
-// positioned.  For performance reasons, redefine Position.cumulativeOffset for
-// KHTML/WebKit only.
-if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
-  Position.cumulativeOffset = function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      if (element.offsetParent == document.body)
-        if (Element.getStyle(element, 'position') == 'absolute') break;
-
-      element = element.offsetParent;
-    } while (element);
-
-    return [valueL, valueT];
-  }
-}
\ No newline at end of file
diff --git a/trunk/activemq-xmpp/pom.xml b/trunk/activemq-xmpp/pom.xml
deleted file mode 100755
index 80422f0..0000000
--- a/trunk/activemq-xmpp/pom.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>activemq-xmpp</artifactId>
-  <packaging>jar</packaging>
-  <name>ActiveMQ :: XMPP</name>
-
-  <repositories>
-    <repository>
-      <id>maven2-repository.dev.java.net</id>
-      <name>Java.net Maven 2 Repository</name>
-      <url>http://download.java.net/maven/2</url>
-    </repository>
-    <repository>
-      <id>maven-repository.dev.java.net</id>
-      <name>Java.net Maven 1 Repository (legacy)</name>
-      <url>http://download.java.net/maven/1</url>
-      <layout>legacy</layout>
-    </repository>
-  </repositories>
-  <pluginRepositories>
-    <pluginRepository>
-      <id>maven2-repository.dev.java.net</id>
-      <name>Java.net Maven 2 Repository (legacy)</name>
-      <url>http://download.java.net/maven/2</url>
-    </pluginRepository>
-    <pluginRepository>
-      <id>maven-repository.dev.java.net</id>
-      <name>Java.net Maven 1 Repository (legacy)</name>
-      <url>http://download.java.net/maven/1</url>
-      <layout>legacy</layout>
-    </pluginRepository>
-  </pluginRepositories>
-
-  <dependencies>
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.codehaus.woodstox</groupId>
-      <artifactId>woodstox-core-asl</artifactId>
-      <version>4.0.7</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.woodstox</groupId>
-      <artifactId>stax2-api</artifactId>
-      <version>3.0.1</version>
-    </dependency>
-    <dependency>
-     <groupId>com.sun.xml.bind</groupId>
-     <artifactId>jaxb-impl</artifactId>
-     <version>2.1.12</version>
-     <exclusions>
-       <exclusion>
-         <groupId>javax.xml.bind</groupId>
-         <artifactId>jsr173_api</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>javax.xml</groupId>
-         <artifactId>jsr173</artifactId>
-       </exclusion>
-       <exclusion>
-         <groupId>javax.activation</groupId>
-         <artifactId>activation</artifactId>
-       </exclusion>
-       <exclusion>
-         <!-- needed so explicitly pull in geronimo .. spec below -->
-         <groupId>javax.xml.bind</groupId>
-         <artifactId>activation</artifactId>
-       </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-activation_1.1_spec</artifactId>
-      <version>1.0.2</version>
-    </dependency>
-    <dependency>
-      <groupId>jivesoftware</groupId>
-      <artifactId>smack</artifactId>
-      <version>3.1.0</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>jivesoftware</groupId>
-      <artifactId>smackx</artifactId>
-      <version>3.1.0</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <defaultGoal>install</defaultGoal>
-
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <inherited>true</inherited>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <inherited>true</inherited>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <excludes>
-            <!--<exclude>**/XmppTest.*</exclude>-->
-          </excludes>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.jvnet.jaxb2.maven2</groupId>
-        <artifactId>maven-jaxb2-plugin</artifactId>
-        <version>0.7.2</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>generate</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <strict>true</strict>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/activemq-xmpp/src/main/appended-resources/META-INF/LICENSE b/trunk/activemq-xmpp/src/main/appended-resources/META-INF/LICENSE
deleted file mode 100644
index 2017288..0000000
--- a/trunk/activemq-xmpp/src/main/appended-resources/META-INF/LICENSE
+++ /dev/null
@@ -1,64 +0,0 @@
-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/.
diff --git a/trunk/activemq-xmpp/src/main/appended-resources/META-INF/NOTICE b/trunk/activemq-xmpp/src/main/appended-resources/META-INF/NOTICE
deleted file mode 100644
index 60f1aad..0000000
--- a/trunk/activemq-xmpp/src/main/appended-resources/META-INF/NOTICE
+++ /dev/null
@@ -1,12 +0,0 @@
-=========================================================================
-==  Jabber Notice                                                      ==
-=========================================================================
-
-  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/
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java
deleted file mode 100644
index 583a68a..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java
+++ /dev/null
@@ -1,669 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.JMSException;
-import org.w3c.dom.Element;
-
-import ietf.params.xml.ns.xmpp_sasl.Auth;
-import ietf.params.xml.ns.xmpp_sasl.Challenge;
-import ietf.params.xml.ns.xmpp_sasl.Success;
-import ietf.params.xml.ns.xmpp_tls.Proceed;
-import ietf.params.xml.ns.xmpp_tls.Starttls;
-import jabber.client.Body;
-import jabber.client.Error;
-import jabber.client.Iq;
-import jabber.client.Message;
-import jabber.client.Presence;
-import jabber.iq.auth.Query;
-
-import org.apache.activemq.advisory.AdvisorySupport;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.ExceptionResponse;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.transport.xmpp.command.Handler;
-import org.apache.activemq.transport.xmpp.command.HandlerRegistry;
-import org.apache.activemq.util.IdGenerator;
-import org.apache.activemq.util.IntSequenceGenerator;
-import org.apache.activemq.util.LongSequenceGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.jabber.protocol.disco_info.Feature;
-import org.jabber.protocol.disco_info.Identity;
-import org.jabber.protocol.disco_items.Item;
-import org.jabber.protocol.muc_user.X;
-
-/**
- * TODO lots of this code could be shared with Stomp
- */
-public class ProtocolConverter {
-    private static final transient Logger LOG = LoggerFactory.getLogger(ProtocolConverter.class);
-    private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
-    private static final IdGenerator CLIENT_ID_GENERATOR = new IdGenerator("xmpp");
-
-    private HandlerRegistry registry = new HandlerRegistry();
-    private XmppTransport transport;
-
-    private final ConnectionId connectionId = new ConnectionId(CONNECTION_ID_GENERATOR.generateId());
-    private final SessionId sessionId = new SessionId(connectionId, -1);
-    private final ProducerId producerId = new ProducerId(sessionId, 1);
-
-    private final ConnectionInfo connectionInfo = new ConnectionInfo(connectionId);
-    private final SessionInfo sessionInfo = new SessionInfo(sessionId);
-    private final ProducerInfo producerInfo = new ProducerInfo(producerId);
-
-    private final LongSequenceGenerator consumerIdGenerator = new LongSequenceGenerator();
-    private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator();
-    private final IntSequenceGenerator tempDestinationIdGenerator = new IntSequenceGenerator();
-
-    private final Map<Integer, Handler<Response>> responseHandlers = new ConcurrentHashMap<Integer, Handler<Response>>();
-    private final Map<ConsumerId, Handler<MessageDispatch>> subscriptionsByConsumerId = new ConcurrentHashMap<ConsumerId, Handler<MessageDispatch>>();
-    private final Map<String, ConsumerInfo> jidToConsumerMap = new HashMap<String, ConsumerInfo>();
-    private final Map<String, ConsumerInfo> jidToInboxConsumerMap = new HashMap<String, ConsumerInfo>();
-
-    private final Object commnadIdMutex = new Object();
-    private int lastCommandId;
-    private final AtomicBoolean connected = new AtomicBoolean(false);
-    private ActiveMQTempQueue inboxDestination;
-
-    //to avoid calling into sendToActiveMq from a handler
-    private ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1);
-
-    public ProtocolConverter(XmppTransport transport) {
-        this.transport = transport;
-        initialiseRegistry();
-    }
-
-    protected int generateCommandId() {
-        synchronized (commnadIdMutex) {
-            return lastCommandId++;
-        }
-    }
-
-    protected void initialiseRegistry() {
-        // this kinda wiring muck is soooo much cleaner in C# :(
-        registry.registerHandler(Message.class, new Handler<Message>() {
-            public void handle(Message event) throws Exception {
-                onMessage(event);
-            }
-        });
-        registry.registerHandler(Auth.class, new Handler<Auth>() {
-            public void handle(Auth event) throws Exception {
-                onAuth(event);
-            }
-        });
-        registry.registerHandler(Starttls.class, new Handler<Starttls>() {
-            public void handle(Starttls event) throws Exception {
-                onStarttls(event);
-            }
-        });
-        registry.registerHandler(Iq.class, new Handler<Iq>() {
-            public void handle(Iq event) throws Exception {
-                onIq(event);
-            }
-        });
-        registry.registerHandler(Presence.class, new Handler<Presence>() {
-            public void handle(Presence event) throws Exception {
-                onPresence(event);
-            }
-        });
-    }
-
-    public void onXmppCommand(Object command) throws Exception {
-        // TODO we could do some nice code generation to boost performance
-        // by autogenerating the bytecode to statically lookup a handler from a
-        // registry maybe?
-
-        Handler handler = registry.getHandler(command.getClass());
-        if (handler == null) {
-            unknownCommand(command);
-        } else {
-            handler.handle(command);
-        }
-    }
-
-    public void onActiveMQCommand(Command command) throws Exception {
-        if (command.isResponse()) {
-            Response response = (Response)command;
-            Handler<Response> handler = responseHandlers.remove(new Integer(response.getCorrelationId()));
-            if (handler != null) {
-                handler.handle(response);
-            } else {
-                LOG.warn("No handler for response: " + response);
-            }
-        } else if (command.isMessageDispatch()) {
-            MessageDispatch md = (MessageDispatch)command;
-            Handler<MessageDispatch> handler = subscriptionsByConsumerId.get(md.getConsumerId());
-            if (handler != null) {
-                handler.handle(md);
-            } else {
-                LOG.warn("No handler for message: " + md);
-            }
-        }
-    }
-
-    protected void unknownCommand(Object command) throws Exception {
-        LOG.warn("Unkown command: " + command + " of type: " + command.getClass().getName());
-    }
-
-    protected void onIq(final Iq iq) throws Exception {
-        Object any = iq.getAny();
-
-        if (any instanceof Query) {
-            onAuthQuery(any, iq);
-
-        } else if (any instanceof jabber.iq._private.Query) {
-            jabber.iq._private.Query query = (jabber.iq._private.Query)any;
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Iq Private " + debugString(iq) + " any: " + query.getAny());
-            }
-
-            Iq result = createResult(iq);
-            jabber.iq._private.Query answer = new jabber.iq._private.Query();
-            result.setAny(answer);
-            transport.marshall(result);
-        } else if (any instanceof jabber.iq.roster.Query) {
-            jabber.iq.roster.Query query = (jabber.iq.roster.Query)any;
-
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Iq Roster " + debugString(iq) + " item: " + query.getItem());
-            }
-
-            Iq result = createResult(iq);
-            jabber.iq.roster.Query roster = new jabber.iq.roster.Query();
-            result.setAny(roster);
-            transport.marshall(result);
-        } else if (any instanceof org.jabber.protocol.disco_items.Query) {
-            onDiscoItems(iq, (org.jabber.protocol.disco_items.Query)any);
-        } else if (any instanceof org.jabber.protocol.disco_info.Query) {
-            onDiscoInfo(iq, (org.jabber.protocol.disco_info.Query)any);
-        } else {
-            if (any instanceof Element) {
-                Element element = (Element)any;
-                LOG.warn("Iq Unknown " + debugString(iq) + " element namespace: " + element.getNamespaceURI() + " localName: " + element.getLocalName());
-            } else {
-                LOG.warn("Iq Unknown " + debugString(iq) + " any: " + any + " of type: " + any.getClass().getName());
-            }
-            Iq result = createResult(iq);
-            jabber.client.Error error = new Error();
-            error.setUnexpectedRequest("Don't understand: " + any.toString());
-            result.setAny(error);
-            transport.marshall(result);
-        }
-    }
-
-    protected void onAuthQuery(Object any, final Iq iq) throws IOException, JMSException {
-        Query query = (Query)any;
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Iq Auth Query " + debugString(iq) + " resource: " + query.getResource() + " username: " + query.getUsername());
-        }
-        if (query.getPassword() == null) {
-            Iq result = createResult(iq);
-            Query required = new Query();
-            required.setPassword("");
-            required.setUsername("");
-            result.setAny(required);
-            transport.marshall(result);
-            return;
-        }
-
-        // connectionInfo.setClientId(query.getResource());
-        connectionInfo.setUserName(query.getUsername());
-        connectionInfo.setPassword(query.getPassword());
-
-        // TODO support digest?
-
-        if (connectionInfo.getClientId() == null) {
-            connectionInfo.setClientId(CLIENT_ID_GENERATOR.generateId());
-        }
-
-        sendToActiveMQ(connectionInfo, new Handler<Response>() {
-            public void handle(Response response) throws Exception {
-
-                Iq result = createResult(iq);
-
-                if (response instanceof ExceptionResponse) {
-                    ExceptionResponse exceptionResponse = (ExceptionResponse)response;
-                    Throwable exception = exceptionResponse.getException();
-
-                    LOG.warn("Failed to create connection: " + exception, exception);
-
-                    Error error = new Error();
-                    result.setError(error);
-
-                    StringWriter buffer = new StringWriter();
-                    exception.printStackTrace(new PrintWriter(buffer));
-                    error.setInternalServerError(buffer.toString());
-                } else {
-                    connected.set(true);
-                }
-                transport.marshall(result);
-
-                sendToActiveMQ(sessionInfo, createErrorHandler("create sesssion"));
-                sendToActiveMQ(producerInfo, createErrorHandler("create producer"));
-            }
-        });
-
-        // create a destination for this client
-        final String to = query.getUsername();
-        createDestination(to);
-    }
-
-    public void createDestination(String to) throws IOException, JMSException {
-        ActiveMQDestination destination = createActiveMQDestination(to);
-        if (destination == null) {
-            LOG.debug("Unable to create destination for " + to);
-            return;
-        }
-        subscribe(to, destination, jidToConsumerMap);
-
-        // lets subscribe to a personal inbox for replies
-
-        // Check if Destination info is of temporary type.
-        if (inboxDestination == null) {
-            inboxDestination = new ActiveMQTempQueue(connectionInfo.getConnectionId(), tempDestinationIdGenerator.getNextSequenceId());
-
-            DestinationInfo info = new DestinationInfo();
-            info.setConnectionId(connectionInfo.getConnectionId());
-            info.setOperationType(DestinationInfo.ADD_OPERATION_TYPE);
-            info.setDestination(inboxDestination);
-            sendToActiveMQ(info, null);
-
-            subscribe(to, inboxDestination, jidToInboxConsumerMap);
-        }
-    }
-
-    protected String debugString(Iq iq) {
-        return "to: " + iq.getTo() + " type: " + iq.getType() + " from: " + iq.getFrom() + " id: " + iq.getId();
-    }
-
-    protected void onDiscoItems(Iq iq, org.jabber.protocol.disco_items.Query query) throws IOException {
-        String to = iq.getTo();
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Iq Disco Items query " + debugString(iq) + " node: " + query.getNode() + " item: " + query.getItem());
-        }
-
-        Iq result = createResult(iq);
-        org.jabber.protocol.disco_items.Query answer = new org.jabber.protocol.disco_items.Query();
-        if (to == null || to.length() == 0) {
-            answer.getItem().add(createItem("queues", "Queues", "queues"));
-            answer.getItem().add(createItem("topics", "Topics", "topics"));
-        } else {
-            // lets not add anything?
-        }
-
-        result.setAny(answer);
-        transport.marshall(result);
-    }
-
-    protected void onDiscoInfo(Iq iq, org.jabber.protocol.disco_info.Query query) throws IOException {
-        String to = iq.getTo();
-
-        // TODO lets create the topic 'to'
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Iq Disco Info query " + debugString(iq) + " node: " + query.getNode() + " features: " + query.getFeature() + " identity: " + query.getIdentity());
-        }
-
-        Iq result = createResult(iq);
-        org.jabber.protocol.disco_info.Query answer = new org.jabber.protocol.disco_info.Query();
-        answer.setNode(to);
-        answer.getFeature().add(createFeature("http://jabber.org/protocol/disco#info"));
-        answer.getFeature().add(createFeature("http://jabber.org/protocol/disco#items"));
-        if (to == null || to.length() == 0) {
-            answer.getIdentity().add(createIdentity("directory", "chatroom", "queues"));
-            answer.getIdentity().add(createIdentity("directory", "chatroom", "topics"));
-            /*
-             * answer.getIdentity().add(createIdentity("hierarchy", "queues",
-             * "branch")); answer.getIdentity().add(createIdentity("hierarchy",
-             * "topics", "branch"));
-             */
-        } else {
-            // for queues/topics
-            if (to.equals("queues")) {
-                answer.getIdentity().add(createIdentity("conference", "queue.a", "text"));
-                answer.getIdentity().add(createIdentity("conference", "queue.b", "text"));
-            } else if (to.equals("topics")) {
-                answer.getIdentity().add(createIdentity("conference", "topic.x", "text"));
-                answer.getIdentity().add(createIdentity("conference", "topic.y", "text"));
-                answer.getIdentity().add(createIdentity("conference", "topic.z", "text"));
-            } else {
-                // lets reply to an actual room
-                answer.getIdentity().add(createIdentity("conference", to, "text"));
-                answer.getFeature().add(createFeature("http://jabber.org/protocol/muc"));
-                answer.getFeature().add(createFeature("muc-open"));
-            }
-        }
-
-        result.setAny(answer);
-        transport.marshall(result);
-    }
-
-    protected void onPresence(Presence presence) throws IOException, JMSException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Presence: " + presence.getFrom() + " id: " + presence.getId() + " to: " + presence.getTo() + " type: " + presence.getType() + " showOrStatusOrPriority: "
-                      + presence.getShowOrStatusOrPriority() + " any: " + presence.getAny());
-        }
-        org.jabber.protocol.muc_user.Item item = new org.jabber.protocol.muc_user.Item();
-        item.setAffiliation("owner");
-        item.setRole("moderator");
-        item.setNick("broker");
-        sendPresence(presence, item);
-
-        /*
-         * item = new org.jabber.protocol.muc_user.Item();
-         * item.setAffiliation("admin"); item.setRole("moderator");
-         * sendPresence(presence, item);
-         */
-
-        // lets create a subscription for the room, Jabber clients would use
-        // "room/nickname", so we need to strip off the nickname
-        String to = presence.getTo();
-        if ( to != null ) {
-            to = to.substring(0, to.indexOf("/"));
-        }
-        createDestination(to);
-    }
-
-    protected void subscribe(final String to, ActiveMQDestination destination, Map<String, ConsumerInfo> consumerMap) {
-        boolean createConsumer = false;
-        ConsumerInfo consumerInfo = null;
-        synchronized (consumerMap) {
-            consumerInfo = consumerMap.get(to);
-            if (consumerInfo == null) {
-                consumerInfo = new ConsumerInfo();
-                consumerMap.put(to, consumerInfo);
-
-                ConsumerId consumerId = new ConsumerId(sessionId, consumerIdGenerator.getNextSequenceId());
-                consumerInfo.setConsumerId(consumerId);
-                consumerInfo.setPrefetchSize(10);
-                consumerInfo.setNoLocal(true);
-                createConsumer = true;
-            }
-        }
-        if (!createConsumer) {
-            return;
-        }
-
-        consumerInfo.setDestination(destination);
-
-        subscriptionsByConsumerId.put(consumerInfo.getConsumerId(), new Handler<MessageDispatch>() {
-            public void handle(final MessageDispatch messageDispatch) throws Exception {
-                // processing the inbound message
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Receiving inbound: " + messageDispatch.getMessage());
-                }
-
-                // lets send back an ACK
-                final MessageAck ack = new MessageAck(messageDispatch, MessageAck.STANDARD_ACK_TYPE, 1);
-
-                FutureTask<Void> task = new FutureTask<Void>(new Callable<Void>() {
-                    public Void call() {
-                        sendToActiveMQ(ack, createErrorHandler("Ack of message: " + messageDispatch.getMessage().getMessageId()));
-                        return null;
-                    }
-                });
-
-                scheduledThreadPoolExecutor.submit(task);
-
-                Message message = createXmppMessage(to, messageDispatch);
-                if (message != null) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Sending message to XMPP client from: " + message.getFrom() + " to: " + message.getTo() + " type: " + message.getType() + " with body: " + message.getAny());
-                    }
-                    transport.marshall(message);
-                }
-            }
-        });
-        sendToActiveMQ(consumerInfo, createErrorHandler("subscribe to destination: " + destination));
-    }
-
-    protected Message createXmppMessage(String to, MessageDispatch messageDispatch) throws IOException, JMSException {
-        
-        org.apache.activemq.command.Message message = messageDispatch.getMessage();
-
-        Message answer = new Message();
-        String from = (String)message.getProperty("XMPPFrom");
-        if ( from == null ) {
-            from = to;
-            int idx = from.indexOf('/');
-            if (idx > 0) {
-                from = from.substring(0, idx) + "/broker";
-            }
-            answer.setType("groupchat");
-        } else {
-            answer.setType("chat");
-        }
-        LOG.debug("Sending message from " + from + " and to " + to);
-        answer.setFrom(from);
-        answer.setTo(to);
-
-        // answer.setType(message.getType());
-        if (message instanceof ActiveMQTextMessage) {
-            ActiveMQTextMessage activeMQTextMessage = (ActiveMQTextMessage)message;
-            Body body = new Body();
-            String text = activeMQTextMessage.getText();
-            LOG.info("Setting the body text to be: " + text);
-            body.setValue(text);
-            answer.getAny().add(body);
-        } else {
-            // TODO support other message types
-            LOG.warn("Could not convert the message to a complete Jabber message: " + message);
-        }
-        return answer;
-    }
-
-    protected void sendPresence(Presence presence, org.jabber.protocol.muc_user.Item item) throws IOException {
-        Presence answer = new Presence();
-        answer.setFrom(presence.getTo());
-        answer.setType(presence.getType());
-        answer.setTo(presence.getFrom());
-        X x = new X();
-        x.getDeclineOrDestroyOrInvite().add(item);
-        answer.getShowOrStatusOrPriority().add(x);
-        transport.marshall(answer);
-    }
-
-    protected Item createItem(String jid, String name, String node) {
-        Item answer = new Item();
-        answer.setJid(jid);
-        answer.setName(name);
-        answer.setNode(node);
-        return answer;
-    }
-
-    protected Identity createIdentity(String category, String type, String name) {
-        Identity answer = new Identity();
-        answer.setCategory(category);
-        answer.setName(name);
-        answer.setType(type);
-        return answer;
-    }
-
-    protected Feature createFeature(String var) {
-        Feature feature = new Feature();
-        feature.setVar(var);
-        return feature;
-    }
-
-    /**
-     * Creates a result command from the input
-     */
-    protected Iq createResult(Iq iq) {
-        Iq result = new Iq();
-        result.setId(iq.getId());
-        result.setFrom(transport.getFrom());
-        result.setTo(iq.getFrom());
-        result.setLang(iq.getLang());
-        result.setType("result");
-        return result;
-    }
-
-    protected void sendToActiveMQ(Command command, Handler<Response> handler) {
-        command.setCommandId(generateCommandId());
-        if (handler != null) {
-            command.setResponseRequired(true);
-            responseHandlers.put(command.getCommandId(), handler);
-        }
-        transport.getTransportListener().onCommand(command);
-    }
-
-    protected void onStarttls(Starttls starttls) throws Exception {
-        LOG.debug("Starttls");
-        transport.marshall(new Proceed());
-    }
-
-    protected void onMessage(Message message) throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Message from: " + message.getFrom() + " to: " + message.getTo() + " subjectOrBodyOrThread: " + message.getSubjectOrBodyOrThread());
-        }
-
-        final ActiveMQMessage activeMQMessage = createActiveMQMessage(message);
-
-        ActiveMQDestination destination = createActiveMQDestination(message.getTo());
-
-        activeMQMessage.setMessageId(new MessageId(producerInfo, messageIdGenerator.getNextSequenceId()));
-        activeMQMessage.setDestination(destination);
-        activeMQMessage.setProducerId(producerId);
-        activeMQMessage.setTimestamp(System.currentTimeMillis());
-        addActiveMQMessageHeaders(activeMQMessage, message);
-
-        /*
-         * MessageDispatch dispatch = new MessageDispatch();
-         * dispatch.setDestination(destination);
-         * dispatch.setMessage(activeMQMessage);
-         */
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Sending ActiveMQ message: " + activeMQMessage);
-        }
-        sendToActiveMQ(activeMQMessage, createErrorHandler("send message"));
-    }
-
-    protected Handler<Response> createErrorHandler(final String text) {
-        return new Handler<Response>() {
-            public void handle(Response event) throws Exception {
-                if (event instanceof ExceptionResponse) {
-                    ExceptionResponse exceptionResponse = (ExceptionResponse)event;
-                    Throwable exception = exceptionResponse.getException();
-                    LOG.error("Failed to " + text + ". Reason: " + exception, exception);
-                } else if (LOG.isDebugEnabled()) {
-                    LOG.debug("Completed " + text);
-                }
-            }
-        };
-    }
-
-    /**
-     * Converts the Jabber destination name into a destination in ActiveMQ
-     */
-    protected ActiveMQDestination createActiveMQDestination(String jabberDestination) throws JMSException {
-        if (jabberDestination == null) {
-            return null;
-        }
-        String name = jabberDestination;
-        int idx = jabberDestination.indexOf('@');
-        if (idx > 0) {
-            name = name.substring(0, idx);
-        }
-        // lets support lower-case versions of the agent topic
-        if (name.equalsIgnoreCase(AdvisorySupport.AGENT_TOPIC)) {
-            name = AdvisorySupport.AGENT_TOPIC;
-        }
-        return new ActiveMQTopic(name);
-    }
-
-    protected ActiveMQMessage createActiveMQMessage(Message message) throws JMSException {
-        ActiveMQTextMessage answer = new ActiveMQTextMessage();
-        String text = "";
-        List<Object> list = message.getSubjectOrBodyOrThread();
-        for (Object object : list) {
-            if (object instanceof Body) {
-                Body body = (Body)object;
-                text = body.getValue();
-                break;
-            }
-        }
-        answer.setText(text);
-        return answer;
-    }
-
-    protected void addActiveMQMessageHeaders(ActiveMQMessage answer, Message message) throws JMSException {
-        answer.setStringProperty("XMPPFrom", message.getFrom());
-        answer.setStringProperty("XMPPID", message.getId());
-        answer.setStringProperty("XMPPLang", message.getLang());
-        answer.setStringProperty("XMPPTo", message.getTo());
-        answer.setJMSType(message.getType());
-        ActiveMQDestination replyTo = createActiveMQDestination(message.getFrom());
-        if (replyTo == null) {
-            replyTo = inboxDestination;
-        }
-        LOG.info("Setting reply to destination to: " + replyTo);
-        answer.setJMSReplyTo(replyTo);
-    }
-
-    protected void onAuth(Auth auth) throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Auth mechanism: " + auth.getMechanism() + " value: " + auth.getValue());
-        }
-        String value = createChallengeValue(auth);
-        if (value != null) {
-            Challenge challenge = new Challenge();
-            challenge.setValue(value);
-            transport.marshall(challenge);
-        } else {
-            transport.marshall(new Success());
-        }
-    }
-
-    protected String createChallengeValue(Auth auth) {
-        // TODO implement the challenge
-        return null;
-    }
-
-}
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java
deleted file mode 100644
index 90431f5..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.URI;
-
-import javax.net.SocketFactory;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLReporter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-
-import ietf.params.xml.ns.xmpp_sasl.Mechanisms;
-
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.transport.tcp.TcpBufferedInputStream;
-import org.apache.activemq.transport.tcp.TcpBufferedOutputStream;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.apache.activemq.util.IOExceptionSupport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.jabber.etherx.streams.Features;
-
-/**
- * 
- */
-public class XmppTransport extends TcpTransport {
-    protected static final QName ATTRIBUTE_TO = new QName("to");
-
-    private static final transient Logger LOG = LoggerFactory.getLogger(XmppTransport.class);
-
-    protected OutputStream outputStream;
-    protected InputStream inputStream;
-
-    private static JAXBContext context;
-    private XMLEventReader xmlReader;
-    private Unmarshaller unmarshaller;
-    private Marshaller marshaller;
-    private XMLStreamWriter xmlWriter;
-    private String to = "client";
-    private ProtocolConverter converter;
-    private String from = "localhost";
-    private String brokerId = "broker-id-1";
-
-    public XmppTransport(WireFormat wireFormat, Socket socket) throws IOException {
-        super(wireFormat, socket);
-        init();
-    }
-
-    public XmppTransport(WireFormat wireFormat, SocketFactory socketFactory, URI uri, URI uri1) throws IOException {
-        super(wireFormat, socketFactory, uri, uri1);
-        init();
-    }
-
-    private void init() {
-        LOG.debug("Creating new instance of XmppTransport");
-        converter = new ProtocolConverter(this);
-    }
-
-    @Override
-    public void oneway(Object object) throws IOException {
-        if (object instanceof Command) {
-            Command command = (Command)object;
-
-            if (command instanceof BrokerInfo) {
-                BrokerInfo brokerInfo = (BrokerInfo)command;
-
-                brokerId = brokerInfo.getBrokerId().toString();
-                from = brokerInfo.getBrokerName();
-                try {
-                    writeOpenStream(brokerId, from);
-                } catch (XMLStreamException e) {
-                    throw IOExceptionSupport.create(e);
-                }
-            } else {
-                try {
-                    converter.onActiveMQCommand(command);
-                } catch (IOException e) {
-                    throw e;
-                } catch (Exception e) {
-                    throw IOExceptionSupport.create(e);
-                }
-            }
-        } else {
-            LOG.warn("Unkown command: " + object);
-        }
-    }
-
-    /**
-     * Marshalls the given POJO to the client
-     */
-    public void marshall(Object command) throws IOException {
-        if (isStopped() || isStopping()) {
-            LOG.warn("Not marshalling command as shutting down: " + command);
-            return;
-        }
-        try {
-            marshaller.marshal(command, xmlWriter);
-            xmlWriter.flush();
-            outputStream.flush();
-        } catch (JAXBException e) {
-            throw IOExceptionSupport.create(e);
-        } catch (XMLStreamException e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    @Override
-    public void doRun() throws IOException {
-        LOG.debug("XMPP consumer thread starting");
-        try {
-            XMLInputFactory xif = XMLInputFactory.newInstance();
-            xif.setXMLReporter(new XMLReporter() {
-                public void report(String message, String errorType, Object relatedInformation, Location location) throws XMLStreamException {
-                    LOG.warn(message + " errorType: " + errorType + " relatedInfo: " + relatedInformation);
-                }
-            });
-
-            xmlReader = xif.createXMLEventReader(inputStream);
-
-            XMLEvent docStart = xmlReader.nextEvent();
-
-            XMLEvent rootElement = xmlReader.nextTag();
-
-            if (rootElement instanceof StartElement) {
-                StartElement startElement = (StartElement)rootElement;
-                Attribute toAttribute = startElement.getAttributeByName(ATTRIBUTE_TO);
-                if (toAttribute != null) {
-                    to = toAttribute.getValue();
-                }
-            }
-            while (true) {
-                if (isStopped()) {
-                    break;
-                }
-
-                XMLEvent event = xmlReader.peek();
-                if (event.isStartElement()) {
-                    // unmarshal a new object
-                    Object object = unmarshaller.unmarshal(xmlReader);
-                    if (object != null) {
-                        LOG.debug("Unmarshalled new incoming event - " + object.getClass().getName());
-                        converter.onXmppCommand(object);
-                    }
-                } else {
-                    if (event.getEventType() == XMLEvent.END_ELEMENT) {
-                        break;
-                    } else if (event.getEventType() == XMLEvent.END_ELEMENT || event.getEventType() == XMLEvent.END_DOCUMENT) {
-                        break;
-                    } else {
-                        xmlReader.nextEvent();
-                    }
-
-                }
-            }
-        } catch (Exception e) {
-            throw IOExceptionSupport.create(e);
-        }
-    }
-
-    public String getFrom() {
-        return from;
-    }
-
-    @Override
-    protected void doStop(ServiceStopper stopper) throws Exception {
-        if (xmlWriter != null) {
-            try {
-                xmlWriter.writeEndElement();
-                xmlWriter.writeEndDocument();
-                xmlWriter.close();
-            } catch (XMLStreamException e) {
-                // the client may have closed first so ignore this
-                LOG.info("Caught trying to close transport: " + e, e);
-            }
-        }
-        if (xmlReader != null) {
-            try {
-                xmlReader.close();
-            } catch (XMLStreamException e) {
-                // the client may have closed first so ignore this
-                LOG.info("Caught trying to close transport: " + e, e);
-            }
-        }
-        super.doStop(stopper);
-    }
-
-    @Override
-    protected void initializeStreams() throws Exception {
-        // TODO it would be preferable to use class discovery here!
-        if ( context == null ) {
-            context = JAXBContext.newInstance(
-                    "jabber.server:" +
-                    "jabber.server.dialback:" +
-                    "jabber.client:" +
-                    "jabber.iq._private:" +
-                    "jabber.iq.auth:" +
-                    "jabber.iq.gateway:" +
-                    "jabber.iq.version:" +
-                    "jabber.iq.roster:" +
-                    "jabber.iq.pass:" +
-                    "jabber.iq.last:" +
-                    "jabber.iq.oob:" +
-                    "jabber.iq.time:" +
-                    "storage.rosternotes:" +
-                    "ietf.params.xml.ns.xmpp_streams:" +
-                    "ietf.params.xml.ns.xmpp_sasl:" +
-                    "ietf.params.xml.ns.xmpp_stanzas:" +
-                    "ietf.params.xml.ns.xmpp_bind:" +
-                    "ietf.params.xml.ns.xmpp_tls:" +
-                    "org.jabber.protocol.muc:" +
-                    "org.jabber.protocol.rosterx:" +
-                    "org.jabber.protocol.disco_info:" +
-                    "org.jabber.protocol.disco_items:" +
-                    "org.jabber.protocol.activity:" +
-                    "org.jabber.protocol.amp_errors:" +
-                    "org.jabber.protocol.amp:" +
-                    "org.jabber.protocol.address:" +
-                    "org.jabber.protocol.muc_user:" +
-                    "org.jabber.protocol.muc_admin:" +
-                    "org.jabber.etherx.streams");
-        }
-        inputStream = new TcpBufferedInputStream(socket.getInputStream(), 8 * 1024);
-        outputStream = new TcpBufferedOutputStream(socket.getOutputStream(), 16 * 1024);
-
-        unmarshaller = context.createUnmarshaller();
-        marshaller = context.createMarshaller();
-        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
-    }
-
-    protected void writeOpenStream(String id, String from) throws IOException, XMLStreamException {
-        LOG.debug("Sending initial stream element");
-
-        XMLOutputFactory factory = XMLOutputFactory.newInstance();
-        // factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
-        xmlWriter = factory.createXMLStreamWriter(outputStream);
-        xmlWriter.writeStartDocument();
-        xmlWriter.writeStartElement("stream", "stream", "http://etherx.jabber.org/streams");
-        xmlWriter.writeDefaultNamespace("jabber:client");
-        xmlWriter.writeNamespace("stream", "http://etherx.jabber.org/streams");
-        xmlWriter.writeAttribute("version", "1.0");
-        xmlWriter.writeAttribute("id", id);
-        if (to == null) {
-            to = "client";
-        }
-        xmlWriter.writeAttribute("to", to);
-        xmlWriter.writeAttribute("from", from);
-
-        // now lets write the features
-        Features features = new Features();
-
-        // TODO support TLS
-        // features.getAny().add(new Starttls());
-
-        //Mechanisms mechanisms = new Mechanisms();
-
-        // TODO support SASL
-        // mechanisms.getMechanism().add("DIGEST-MD5");
-        // mechanisms.getMechanism().add("PLAIN");
-        //features.getAny().add(mechanisms);
-        features.getAny().add(new ietf.params.xml.ns.xmpp_bind.ObjectFactory().createBind());
-        features.getAny().add(new ietf.params.xml.ns.xmpp_session.ObjectFactory().createSession(""));
-        marshall(features);
-
-        LOG.debug("Initial stream element sent!");
-    }
-
-}
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportFactory.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportFactory.java
deleted file mode 100644
index 64fb66e..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.TcpTransport;
-import org.apache.activemq.transport.tcp.TcpTransportFactory;
-import org.apache.activemq.transport.tcp.TcpTransportServer;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * 
- */
-public class XmppTransportFactory extends TcpTransportFactory {
-
-    protected String getDefaultWireFormatType() {
-        return "xmpp";
-    }
-
-    @Override
-    public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
-        //transport = new StompTransportFilter(transport, new LegacyFrameTranslator());
-        return super.compositeConfigure(transport, format, options);
-    }
-
-    @Override
-    protected TcpTransport createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws IOException {
-        return new XmppTransport(wf, socketFactory, location, localLocation);
-    }
-
-    @Override
-    protected TcpTransportServer createTcpTransportServer(final URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-        return new XmppTransportServer(this, location, serverSocketFactory);
-    }
-}
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportServer.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportServer.java
deleted file mode 100644
index e898a9c..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportServer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.net.ServerSocketFactory;
-
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.tcp.TcpTransportFactory;
-import org.apache.activemq.transport.tcp.TcpTransportServer;
-import org.apache.activemq.wireformat.WireFormat;
-
-/**
- * 
- */
-public class XmppTransportServer extends TcpTransportServer {
-
-    public XmppTransportServer(TcpTransportFactory transportFactory, URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException {
-        super(transportFactory, location, serverSocketFactory);
-    }
-
-    @Override
-    protected Transport createTransport(Socket socket, WireFormat format) throws IOException {
-        return new XmppTransport(format, socket);
-    }
-}
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java
deleted file mode 100644
index c6ef408..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.wireformat.WireFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A wire format which uses XMPP format of messages
- *
- * 
- */
-public class XmppWireFormat implements WireFormat {
-    
-    private int version = 1;
-
-    public WireFormat copy() {
-        return new XmppWireFormat();
-    }
-
-    /*
-    public Packet readPacket(DataInput in) throws IOException {
-        return null;
-    }
-
-    public Packet readPacket(int firstByte, DataInput in) throws IOException {
-        return null;
-    }
-
-    public Packet writePacket(Packet packet, DataOutput out) throws IOException, JMSException {
-        switch (packet.getPacketType()) {
-            case Packet.ACTIVEMQ_MESSAGE:
-                writeMessage((ActiveMQMessage) packet, "", out);
-                break;
-
-            case Packet.ACTIVEMQ_TEXT_MESSAGE:
-                writeTextMessage((ActiveMQTextMessage) packet, out);
-                break;
-
-            case Packet.ACTIVEMQ_BYTES_MESSAGE:
-                writeBytesMessage((ActiveMQBytesMessage) packet, out);
-                break;
-
-            case Packet.ACTIVEMQ_OBJECT_MESSAGE:
-                writeObjectMessage((ActiveMQObjectMessage) packet, out);
-                break;
-
-            case Packet.ACTIVEMQ_MAP_MESSAGE:
-            case Packet.ACTIVEMQ_STREAM_MESSAGE:
-
-
-            case Packet.ACTIVEMQ_BROKER_INFO:
-            case Packet.ACTIVEMQ_CONNECTION_INFO:
-            case Packet.ACTIVEMQ_MSG_ACK:
-            case Packet.CONSUMER_INFO:
-            case Packet.DURABLE_UNSUBSCRIBE:
-            case Packet.INT_RESPONSE_RECEIPT_INFO:
-            case Packet.PRODUCER_INFO:
-            case Packet.RECEIPT_INFO:
-            case Packet.RESPONSE_RECEIPT_INFO:
-            case Packet.SESSION_INFO:
-            case Packet.TRANSACTION_INFO:
-            case Packet.XA_TRANSACTION_INFO:
-            default:
-                log.warn("Ignoring message type: " + packet.getPacketType() + " packet: " + packet);
-        }
-        return null;
-    }
-*/
-
-//    /**
-//     * Can this wireformat process packets of this version
-//     * @param version the version number to test
-//     * @return true if can accept the version
-//     */
-//    public boolean canProcessWireFormatVersion(int version){
-//        return true;
-//    }
-//
-//    /**
-//     * @return the current version of this wire format
-//     */
-//    public int getCurrentWireFormatVersion(){
-//        return 1;
-//    }
-//
-//    // Implementation methods
-//    //-------------------------------------------------------------------------
-//    protected void writeObjectMessage(ActiveMQObjectMessage message, DataOutput out) throws JMSException, IOException {
-//        Serializable object = message.getObject();
-//        String text = (object != null) ? object.toString() : "";
-//        writeMessage(message, text, out);
-//    }
-//
-//    protected void writeTextMessage(ActiveMQTextMessage message, DataOutput out) throws JMSException, IOException {
-//        writeMessage(message, message.getText(), out);
-//    }
-//
-//    protected void writeBytesMessage(ActiveMQBytesMessage message, DataOutput out) throws IOException {
-//        ByteArray data = message.getBodyAsBytes();
-//        String text = encodeBinary(data.getBuf(),data.getOffset(),data.getLength());
-//        writeMessage(message, text, out);
-//    }
-//
-//    protected void writeMessage(ActiveMQMessage message, String body, DataOutput out) throws IOException {
-//        String type = getXmppType(message);
-//
-//        StringBuffer buffer = new StringBuffer("<");
-//        buffer.append(type);
-//        buffer.append(" to='");
-//        buffer.append(message.getJMSDestination().toString());
-//        buffer.append("' from='");
-//        buffer.append(message.getJMSReplyTo().toString());
-//        String messageID = message.getJMSMessageID();
-//        if (messageID != null) {
-//            buffer.append("' id='");
-//            buffer.append(messageID);
-//        }
-//
-//        HashMap properties = message.getProperties();
-//        if (properties != null) {
-//            for (Iterator iter = properties.entrySet().iterator(); iter.hasNext();) {
-//                Map.Entry entry = (Map.Entry) iter.next();
-//                Object key = entry.getKey();
-//                Object value = entry.getValue();
-//                if (value != null) {
-//                    buffer.append("' ");
-//                    buffer.append(key.toString());
-//                    buffer.append("='");
-//                    buffer.append(value.toString());
-//                }
-//            }
-//        }
-//
-//        buffer.append("'>");
-//
-//        String id = message.getJMSCorrelationID();
-//        if (id != null) {
-//            buffer.append("<thread>");
-//            buffer.append(id);
-//            buffer.append("</thread>");
-//        }
-//        buffer.append(body);
-//        buffer.append("</");
-//        buffer.append(type);
-//        buffer.append(">");
-//
-//        out.write(buffer.toString().getBytes());
-//    }
-//
-//    protected String encodeBinary(byte[] data,int offset,int length) {
-//        // TODO
-//        throw new RuntimeException("Not implemented yet!");
-//    }
-//
-//    protected String getXmppType(ActiveMQMessage message) {
-//        String type = message.getJMSType();
-//        if (type == null) {
-//            type = "message";
-//        }
-//        return type;
-//    }
-
-
-    public ByteSequence marshal(Object command) throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        DataOutputStream dos = new DataOutputStream(baos);
-        marshal(command, dos);
-        dos.close();
-        return baos.toByteSequence();
-    }
-
-    public Object unmarshal(ByteSequence packet) throws IOException {
-        ByteArrayInputStream stream = new ByteArrayInputStream(packet);
-        DataInputStream dis = new DataInputStream(stream);
-        return unmarshal(dis);
-    }
-
-    public void marshal(Object object, DataOutput dataOutput) throws IOException {
-        /** TODO */
-    }
-
-    public Object unmarshal(DataInput dataInput) throws IOException {
-        return null;  /** TODO */
-    }
-
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-    
-	public boolean inReceive() {
-		// TODO Implement for inactivity monitor
-		return false;
-	}
-}
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormatFactory.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormatFactory.java
deleted file mode 100644
index 5265d8b..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormatFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import org.apache.activemq.wireformat.WireFormat;
-import org.apache.activemq.wireformat.WireFormatFactory;
-
-/**
- * 
- */
-public class XmppWireFormatFactory implements WireFormatFactory {
-    public WireFormat createWireFormat() {
-        return new XmppWireFormat();
-    }
-}
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/Handler.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/Handler.java
deleted file mode 100644
index b74d41e..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/Handler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.transport.xmpp.command;
-
-/**
- * Represents a handler of a type of event
- *
- * 
- */
-public interface Handler<T> {
-    void handle(T event) throws Exception;
-}
diff --git a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/HandlerRegistry.java b/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/HandlerRegistry.java
deleted file mode 100644
index 08cf9db..0000000
--- a/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/HandlerRegistry.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.transport.xmpp.command;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A registry of handlers
- *
- * 
- */
-public class HandlerRegistry {
-    private Map<Class, Handler> map = new HashMap<Class, Handler>();
-
-    public Handler getHandler(Class eventType) {
-        synchronized (map) {
-            return map.get(eventType);
-        }
-    }
-
-    public void registerHandler(Class eventType, Handler handler) {
-        synchronized (map) {
-            map.put(eventType, handler);
-        }
-    }
-}
diff --git a/trunk/activemq-xmpp/src/main/resources/META-INF/services/org/apache/activemq/transport/xmpp b/trunk/activemq-xmpp/src/main/resources/META-INF/services/org/apache/activemq/transport/xmpp
deleted file mode 100644
index 8b059dc..0000000
--- a/trunk/activemq-xmpp/src/main/resources/META-INF/services/org/apache/activemq/transport/xmpp
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.xmpp.XmppTransportFactory
diff --git a/trunk/activemq-xmpp/src/main/resources/META-INF/services/org/apache/activemq/wireformat/xmpp b/trunk/activemq-xmpp/src/main/resources/META-INF/services/org/apache/activemq/wireformat/xmpp
deleted file mode 100644
index e6a0525..0000000
--- a/trunk/activemq-xmpp/src/main/resources/META-INF/services/org/apache/activemq/wireformat/xmpp
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.transport.xmpp.XmppWireFormatFactory
diff --git a/trunk/activemq-xmpp/src/main/resources/activity.xsd b/trunk/activemq-xmpp/src/main/resources/activity.xsd
deleted file mode 100644
index 3d8cd88..0000000
--- a/trunk/activemq-xmpp/src/main/resources/activity.xsd
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/activity'
-    xmlns='http://jabber.org/protocol/activity'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0108: http://www.xmpp.org/extensions/xep-0108.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='activity'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:choice>
-          <xs:element name='doing_chores' type='general'/>
-          <xs:element name='drinking' type='general'/>
-          <xs:element name='eating' type='general'/>
-          <xs:element name='exercising' type='general'/>
-          <xs:element name='grooming' type='general'/>
-          <xs:element name='having_appointment' type='general'/>
-          <xs:element name='inactive' type='general'/>
-          <xs:element name='relaxing' type='general'/>
-          <xs:element name='talking' type='general'/>
-          <xs:element name='traveling' type='general'/>
-          <xs:element name='working' type='general'/>
-        </xs:choice>
-        <xs:element name='text' minOccurs='0' type='xs:string'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:complexType name='general'>
-    <xs:choice minOccurs='0'>
-      <xs:choice minOccurs='0'>
-        <xs:element name='at_the_spa' type='specific'/>
-        <xs:element name='brushing_teeth' type='specific'/>
-        <xs:element name='buying_groceries' type='specific'/>
-        <xs:element name='cleaning' type='specific'/>
-        <xs:element name='coding' type='specific'/>
-        <xs:element name='commuting' type='specific'/>
-        <xs:element name='cooking' type='specific'/>
-        <xs:element name='cycling' type='specific'/>
-        <xs:element name='day_off' type='specific'/>
-        <xs:element name='doing_maintenance' type='specific'/>
-        <xs:element name='doing_the_dishes' type='specific'/>
-        <xs:element name='doing_the_laundry' type='specific'/>
-        <xs:element name='driving' type='specific'/>
-        <xs:element name='gaming' type='specific'/>
-        <xs:element name='gardening' type='specific'/>
-        <xs:element name='getting_a_haircut' type='specific'/>
-        <xs:element name='going_out' type='specific'/>
-        <xs:element name='hanging_out' type='specific'/>
-        <xs:element name='having_a_beer' type='specific'/>
-        <xs:element name='having_a_snack' type='specific'/>
-        <xs:element name='having_breakfast' type='specific'/>
-        <xs:element name='having_coffee' type='specific'/>
-        <xs:element name='having_dinner' type='specific'/>
-        <xs:element name='having_lunch' type='specific'/>
-        <xs:element name='having_tea' type='specific'/>
-        <xs:element name='hiking' type='specific'/>
-        <xs:element name='in_a_car' type='specific'/>
-        <xs:element name='in_a_meeting' type='specific'/>
-        <xs:element name='in_real_life' type='specific'/>
-        <xs:element name='jogging' type='specific'/>
-        <xs:element name='on_a_bus' type='specific'/>
-        <xs:element name='on_a_plane' type='specific'/>
-        <xs:element name='on_a_train' type='specific'/>
-        <xs:element name='on_a_trip' type='specific'/>
-        <xs:element name='on_the_phone' type='specific'/>
-        <xs:element name='on_vacation' type='specific'/>
-        <xs:element name='other' type='specific'/>
-        <xs:element name='partying' type='specific'/>
-        <xs:element name='playing_sports' type='specific'/>
-        <xs:element name='reading' type='specific'/>
-        <xs:element name='rehearsing' type='specific'/>
-        <xs:element name='running' type='specific'/>
-        <xs:element name='running_an_errand' type='specific'/>
-        <xs:element name='scheduled_holiday' type='specific'/>
-        <xs:element name='shaving' type='specific'/>
-        <xs:element name='shopping' type='specific'/>
-        <xs:element name='skiing' type='specific'/>
-        <xs:element name='sleeping' type='specific'/>
-        <xs:element name='socializing' type='specific'/>
-        <xs:element name='studying' type='specific'/>
-        <xs:element name='sunbathing' type='specific'/>
-        <xs:element name='swimming' type='specific'/>
-        <xs:element name='taking_a_bath' type='specific'/>
-        <xs:element name='taking_a_shower' type='specific'/>
-        <xs:element name='walking' type='specific'/>
-        <xs:element name='walking_the_dog' type='specific'/>
-        <xs:element name='watching_tv' type='specific'/>
-        <xs:element name='watching_a_movie' type='specific'/>
-        <xs:element name='working_out' type='specific'/>
-        <xs:element name='writing' type='specific'/>
-      </xs:choice>
-      <xs:any namespace='##other'/>
-    </xs:choice>
-  </xs:complexType>
-
-  <xs:complexType name='specific'>
-    <xs:sequence minOccurs='0'>
-      <xs:any namespace='##other'/>
-    </xs:sequence>
-  </xs:complexType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/address.xsd b/trunk/activemq-xmpp/src/main/resources/address.xsd
deleted file mode 100644
index 20c699d..0000000
--- a/trunk/activemq-xmpp/src/main/resources/address.xsd
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/address'
-    xmlns='http://jabber.org/protocol/address'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0033: http://www.xmpp.org/extensions/xep-0033.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='addresses'>
-     <xs:complexType>
-        <xs:sequence>
-           <xs:element ref='address'
-                       minOccurs='1'
-                       maxOccurs='unbounded'/>
-        </xs:sequence>
-     </xs:complexType>
-  </xs:element>
-
-  <xs:element name='address'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='empty'>
-          <xs:attribute name='delivered' use='optional' fixed='true'/>
-          <xs:attribute name='desc' use='optional' type='xs:string'/>
-          <xs:attribute name='jid' use='optional' type='xs:string'/>
-          <xs:attribute name='node' use='optional' type='xs:string'/>
-          <xs:attribute name='type' use='required'>
-            <xs:simpleType>
-              <xs:restriction base='xs:NCName'>
-                <xs:enumeration value='bcc'/>
-                <xs:enumeration value='cc'/>
-                <xs:enumeration value='noreply'/>
-                <xs:enumeration value='replyroom'/>
-                <xs:enumeration value='replyto'/>
-                <xs:enumeration value='to'/>
-              </xs:restriction>
-            </xs:simpleType>
-          </xs:attribute>
-          <xs:attribute name='uri' use='optional' type='xs:string'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/amp-errors.xsd b/trunk/activemq-xmpp/src/main/resources/amp-errors.xsd
deleted file mode 100644
index a680131..0000000
--- a/trunk/activemq-xmpp/src/main/resources/amp-errors.xsd
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/amp#errors'
-    xmlns='http://jabber.org/protocol/amp#errors'
-    elementFormDefault='qualified'>
- 
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0079: http://www.xmpp.org/extensions/xep-0079.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='failed-rules'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='rule' minOccurs='1' maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='rule'>
-    <xs:complexType>
-      <xs:attribute name='action' use='required' type='xs:NCName'/>
-      <xs:attribute name='condition' use='required' type='xs:NCName'/>
-      <xs:attribute name='value' use='required' type='xs:string'/>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/amp-feature.xsd b/trunk/activemq-xmpp/src/main/resources/amp-feature.xsd
deleted file mode 100644
index 7e0721f..0000000
--- a/trunk/activemq-xmpp/src/main/resources/amp-feature.xsd
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/features/amp'
-    xmlns='http://jabber.org/features/amp'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0079: http://www.xmpp.org/extensions/xep-0079.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='amp' type='empty'/>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/amp.xsd b/trunk/activemq-xmpp/src/main/resources/amp.xsd
deleted file mode 100644
index 390d7f6..0000000
--- a/trunk/activemq-xmpp/src/main/resources/amp.xsd
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/amp'
-    xmlns='http://jabber.org/protocol/amp'
-    elementFormDefault='qualified'>
- 
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0079: http://www.xmpp.org/extensions/xep-0079.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='amp'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='rule' minOccurs='1' maxOccurs='unbounded'/>
-      </xs:sequence>
-      <xs:attribute name='from' use='optional' type='xs:string'/>
-      <xs:attribute name='per-hop' use='optional' type='xs:boolean' default='false'/>
-      <xs:attribute name='status' use='optional' type='xs:NCName'/>
-      <xs:attribute name='to' use='optional' type='xs:string'/>
-    </xs:complexType>
-  </xs:element>
- 
-  <xs:element name='invalid-rules'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='rule' minOccurs='1' maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='unsupported-actions'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='rule' minOccurs='1' maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='unsupported-conditions'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='rule' minOccurs='1' maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='rule'>
-    <xs:complexType>
-      <xs:attribute name='action' use='required' type='xs:NCName'/>
-      <xs:attribute name='condition' use='required' type='xs:NCName'/>
-      <xs:attribute name='value' use='required' type='xs:string'/>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/bind.xsd b/trunk/activemq-xmpp/src/main/resources/bind.xsd
deleted file mode 100644
index 5a843bb..0000000
--- a/trunk/activemq-xmpp/src/main/resources/bind.xsd
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='urn:ietf:params:xml:ns:xmpp-bind'
-    xmlns='urn:ietf:params:xml:ns:xmpp-bind'
-    elementFormDefault='qualified'>
-
-  <xs:element name='bind'>
-    <xs:complexType>
-      <xs:choice minOccurs='0' maxOccurs='1'>
-        <xs:element name='resource' type='resourceType'/>
-        <xs:element name='jid' type='fullJIDType'/>
-      </xs:choice>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='resourceType'>
-    <xs:restriction base='xs:string'>
-      <xs:minLength value='1'/>
-      <xs:maxLength value='1023'/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name='fullJIDType'>
-    <xs:restriction base='xs:string'>
-      <xs:minLength value='8'/>
-      <xs:maxLength value='3071'/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/dialback.xsd b/trunk/activemq-xmpp/src/main/resources/dialback.xsd
deleted file mode 100755
index 3a873df..0000000
--- a/trunk/activemq-xmpp/src/main/resources/dialback.xsd
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:server:dialback'
-    xmlns='jabber:server:dialback'
-    elementFormDefault='qualified'>
-
-  <xs:element name='result'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:token'>
-          <xs:attribute name='from' type='xs:string' use='required'/>
-          <xs:attribute name='to' type='xs:string' use='required'/>
-          <xs:attribute name='type' use='optional'>
-            <xs:simpleType>
-              <xs:restriction base='xs:NCName'>
-                <xs:enumeration value='invalid'/>
-                <xs:enumeration value='valid'/>
-              </xs:restriction>
-            </xs:simpleType>
-          </xs:attribute>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='verify'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:token'>
-          <xs:attribute name='from' type='xs:string' use='required'/>
-          <xs:attribute name='id' type='xs:NMTOKEN' use='required'/>
-          <xs:attribute name='to' type='xs:string' use='required'/>
-          <xs:attribute name='type' use='optional'>
-            <xs:simpleType>
-              <xs:restriction base='xs:NCName'>
-                <xs:enumeration value='invalid'/>
-                <xs:enumeration value='valid'/>
-              </xs:restriction>
-            </xs:simpleType>
-          </xs:attribute>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/disco-info.xsd b/trunk/activemq-xmpp/src/main/resources/disco-info.xsd
deleted file mode 100644
index 4ff7db2..0000000
--- a/trunk/activemq-xmpp/src/main/resources/disco-info.xsd
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/disco#info'
-    xmlns='http://jabber.org/protocol/disco#info'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0030: http://www.xmpp.org/extensions/xep-0030.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence minOccurs='0'>
-        <xs:element ref='identity' maxOccurs='unbounded'/>
-        <xs:element ref='feature' maxOccurs='unbounded'/>
-      </xs:sequence>
-      <xs:attribute name='node' type='xs:string' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='identity'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='empty'>
-          <xs:attribute name='category' type='xs:string' use='required'/>
-          <xs:attribute name='name' type='xs:string' use='optional'/>
-          <xs:attribute name='type' type='xs:string' use='required'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='feature'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='empty'>
-          <xs:attribute name='var' type='xs:string' use='required'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/disco-items.xsd b/trunk/activemq-xmpp/src/main/resources/disco-items.xsd
deleted file mode 100644
index cc3ce68..0000000
--- a/trunk/activemq-xmpp/src/main/resources/disco-items.xsd
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/disco#items'
-    xmlns='http://jabber.org/protocol/disco#items'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0030: http://www.xmpp.org/extensions/xep-0030.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence minOccurs='0'>
-        <xs:element ref='item' minOccurs='0' maxOccurs='unbounded'/>
-      </xs:sequence>
-      <xs:attribute name='node' type='xs:string' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='item'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='empty'>
-          <xs:attribute name='action' use='optional'>
-            <xs:simpleType>
-              <xs:restriction base='xs:NCName'>
-                <xs:enumeration value='remove'/>
-                <xs:enumeration value='update'/>
-              </xs:restriction>
-            </xs:simpleType>
-          </xs:attribute>
-          <xs:attribute name='jid' type='xs:string' use='required'/>
-          <xs:attribute name='name' type='xs:string' use='optional'/>
-          <xs:attribute name='node' type='xs:string' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-auth.xsd b/trunk/activemq-xmpp/src/main/resources/iq-auth.xsd
deleted file mode 100644
index 7db2bee..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-auth.xsd
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:auth'
-    xmlns='jabber:iq:auth'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      NOTE WELL: Non-SASL Authentication via the jabber:iq:auth
-      protocol has been superseded by SASL Authentication as 
-      defined in RFC 3920, and is now obsolete.
-
-      For historical purposes, the protocol documented by this 
-      schema is defined in XEP-0078: 
-
-      http://www.xmpp.org/extensions/xep-0078.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element name='username' type='xs:string' minOccurs='0'/>
-        <xs:choice>
-          <xs:element name='password' type='xs:string' minOccurs='0'/>
-          <xs:element name='digest' type='xs:string' minOccurs='0'/>
-        </xs:choice>
-        <xs:element name='resource' type='xs:string' minOccurs='0'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-gateway.xsd b/trunk/activemq-xmpp/src/main/resources/iq-gateway.xsd
deleted file mode 100644
index c8fae05..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-gateway.xsd
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:gateway'
-    xmlns='jabber:iq:gateway'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0100: http://www.xmpp.org/extensions/xep-0100.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:choice>
-        <xs:sequence>
-          <xs:element name='desc' minOccurs='0' type='xs:string'/>
-          <xs:element name='prompt' type='xs:string'/>
-        </xs:sequence>
-        <xs:element name='jid' type='xs:string'/>
-      </xs:choice>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-last.xsd b/trunk/activemq-xmpp/src/main/resources/iq-last.xsd
deleted file mode 100644
index f7e5dee..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-last.xsd
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:last'
-    xmlns='jabber:iq:last'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0012: http://www.xmpp.org/extensions/xep-0012.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'>
-          <xs:attribute name='seconds' type='xs:unsignedLong' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-oob.xsd b/trunk/activemq-xmpp/src/main/resources/iq-oob.xsd
deleted file mode 100644
index 6f2b3ca..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-oob.xsd
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:oob'
-    xmlns='jabber:iq:oob'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0066: http://www.xmpp.org/extensions/xep-0066.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element name='url' type='xs:string' minOccurs='1'/>
-        <xs:element name='desc' type='xs:string' minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='sid' type='xs:string' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-pass.xsd b/trunk/activemq-xmpp/src/main/resources/iq-pass.xsd
deleted file mode 100644
index 0cee571..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-pass.xsd
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:pass'
-    xmlns='jabber:iq:pass'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0003: http://www.xmpp.org/extensions/xep-0003.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:choice minOccurs='0' maxOccurs='unbounded'>
-        <xs:element name='client' type='PassEntity'/>
-        <xs:element name='close' type='empty'/>
-        <xs:element name='expire' type='xs:unsignedLong'/>
-        <xs:element name='oneshot' type='empty'/>
-        <xs:element name='proxy' type='PassEntity'/>
-        <xs:element name='server' type='PassEntity'/>
-      </xs:choice>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:complexType name='PassEntity'>
-    <xs:simpleContent>
-      <xs:extension base='xs:NMTOKEN'>
-        <xs:attribute name='port' type='xs:short' use='optional'/>
-      </xs:extension>
-    </xs:simpleContent>
-  </xs:complexType>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-private.xsd b/trunk/activemq-xmpp/src/main/resources/iq-private.xsd
deleted file mode 100644
index 0b849d8..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-private.xsd
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:private'
-    xmlns='jabber:iq:private'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0049: http://www.xmpp.org/extensions/xep-0049.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence minOccurs='0'>
-        <xs:any namespace='##other'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-time.xsd b/trunk/activemq-xmpp/src/main/resources/iq-time.xsd
deleted file mode 100644
index 161da3d..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-time.xsd
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:time'
-    xmlns='jabber:iq:time'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0090: http://www.xmpp.org/extensions/xep-0090.html
-
-      NOTE: This protocol has been deprecated in favor of the 
-            Entity Time protocol specified in XEP-0202:
-            http://www.xmpp.org/extensions/xep-0202.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence minOccurs='0'>
-        <xs:element name='utc' type='xs:string' minOccurs='1'/>
-        <xs:element name='tz' type='xs:string' minOccurs='0'/>
-        <xs:element name='display' type='xs:string' minOccurs='0'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/iq-version.xsd b/trunk/activemq-xmpp/src/main/resources/iq-version.xsd
deleted file mode 100644
index 239bdf4..0000000
--- a/trunk/activemq-xmpp/src/main/resources/iq-version.xsd
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:version'
-    xmlns='jabber:iq:version'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0092: http://www.xmpp.org/extensions/xep-0092.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence minOccurs='0'>
-        <xs:element name='name' type='xs:string' minOccurs='1'/>
-        <xs:element name='version' type='xs:string' minOccurs='1'/>
-        <xs:element name='os' type='xs:string' minOccurs='0'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/jabber-client.xsd b/trunk/activemq-xmpp/src/main/resources/jabber-client.xsd
deleted file mode 100755
index 88b10bd..0000000
--- a/trunk/activemq-xmpp/src/main/resources/jabber-client.xsd
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:client'
-    xmlns='jabber:client'
-    elementFormDefault='qualified'>
-
-  <xs:import namespace='urn:ietf:params:xml:ns:xmpp-stanzas'
-             schemaLocation='stanzaerror.xsd'/>
-
-  <xs:import namespace='http://www.w3.org/XML/1998/namespace'
-             schemaLocation='xml.xsd'/>
-
-  <xs:element name='message'>
-     <xs:complexType>
-        <xs:sequence>
-          <xs:choice minOccurs='0' maxOccurs='unbounded'>
-            <xs:element ref='subject'/>
-            <xs:element ref='body'/>
-            <xs:element ref='thread'/>
-          </xs:choice>
-          <xs:any     namespace='##other'
-                      minOccurs='0'
-                      maxOccurs='unbounded'/>
-          <xs:element ref='error'
-                      minOccurs='0'/>
-        </xs:sequence>
-        <xs:attribute name='from'
-                      type='xs:string'
-                      use='optional'/>
-        <xs:attribute name='id'
-                      type='xs:NMTOKEN'
-                      use='optional'/>
-        <xs:attribute name='to'
-                      type='xs:string'
-                      use='optional'/>
-        <xs:attribute name='type' use='optional' default='normal'>
-          <xs:simpleType>
-            <xs:restriction base='xs:NCName'>
-              <xs:enumeration value='chat'/>
-              <xs:enumeration value='error'/>
-              <xs:enumeration value='groupchat'/>
-              <xs:enumeration value='headline'/>
-              <xs:enumeration value='normal'/>
-            </xs:restriction>
-          </xs:simpleType>
-        </xs:attribute>
-        <xs:attribute ref='xml:lang' use='optional'/>
-     </xs:complexType>
-  </xs:element>
-
-  <xs:element name='body'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='nonEmptyString'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='subject'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='thread' type='xs:NMTOKEN'/>
-
-  <xs:element name='presence'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:choice minOccurs='0' maxOccurs='unbounded'>
-          <xs:element ref='show'/>
-          <xs:element ref='status'/>
-          <xs:element ref='priority'/>
-        </xs:choice>
-        <xs:any     namespace='##other'
-                    minOccurs='0'
-                    maxOccurs='unbounded'/>
-        <xs:element ref='error'
-                    minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='from'
-                    type='xs:string'
-                    use='optional'/>
-      <xs:attribute name='id'
-                    type='xs:NMTOKEN'
-                    use='optional'/>
-      <xs:attribute name='to'
-                    type='xs:string'
-                    use='optional'/>
-      <xs:attribute name='type' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='error'/>
-            <xs:enumeration value='probe'/>
-            <xs:enumeration value='subscribe'/>
-            <xs:enumeration value='subscribed'/>
-            <xs:enumeration value='unavailable'/>
-            <xs:enumeration value='unsubscribe'/>
-            <xs:enumeration value='unsubscribed'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute ref='xml:lang' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='show'>
-    <xs:simpleType>
-      <xs:restriction base='xs:NCName'>
-        <xs:enumeration value='away'/>
-        <xs:enumeration value='chat'/>
-        <xs:enumeration value='dnd'/>
-        <xs:enumeration value='xa'/>
-      </xs:restriction>
-    </xs:simpleType>
-  </xs:element>
-
-  <xs:element name='status'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='statusType'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='priority' type='xs:byte'/>
-
-  <xs:element name='iq'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:any     namespace='##other'
-                    minOccurs='0'/>
-        <xs:element ref='error'
-                    minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='from'
-                    type='xs:string'
-                    use='optional'/>
-      <xs:attribute name='id'
-                    type='xs:NMTOKEN'
-                    use='required'/>
-      <xs:attribute name='to'
-                    type='xs:string'
-                    use='optional'/>
-      <xs:attribute name='type' use='required'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='error'/>
-            <xs:enumeration value='get'/>
-            <xs:enumeration value='result'/>
-            <xs:enumeration value='set'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute ref='xml:lang' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='error'>
-    <xs:complexType>
-      <xs:sequence  xmlns:err='urn:ietf:params:xml:ns:xmpp-stanzas'>
-        <xs:group   ref='err:stanzaErrorGroup'/>
-        <xs:element xmlns:err='urn:ietf:params:xml:ns:xmpp-stanzas' ref='err:text'
-                    minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='code' type='xs:unsignedShort' use='optional'/>
-      <xs:attribute name='type' use='required'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='auth'/>
-            <xs:enumeration value='cancel'/>
-            <xs:enumeration value='continue'/>
-            <xs:enumeration value='modify'/>
-            <xs:enumeration value='wait'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='statusType'>
-    <xs:restriction base='xs:string'>
-      <xs:minLength value='1'/>
-      <xs:maxLength value='1024'/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name='nonEmptyString'>
-    <xs:restriction base='xs:string'>
-      <xs:minLength value='1'/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/jabber-server.xsd b/trunk/activemq-xmpp/src/main/resources/jabber-server.xsd
deleted file mode 100755
index a047788..0000000
--- a/trunk/activemq-xmpp/src/main/resources/jabber-server.xsd
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:server'
-    xmlns='jabber:server'
-    elementFormDefault='qualified'>
-
-  <xs:import namespace='urn:ietf:params:xml:ns:xmpp-stanzas'
-             schemaLocation='stanzaerror.xsd'/>
-
-  <xs:import namespace='http://www.w3.org/XML/1998/namespace'
-             schemaLocation='xml.xsd'/>
-
-  <xs:element name='message'>
-     <xs:complexType>
-        <xs:sequence>
-          <xs:choice minOccurs='0' maxOccurs='unbounded'>
-            <xs:element ref='subject'/>
-            <xs:element ref='body'/>
-            <xs:element ref='thread'/>
-          </xs:choice>
-          <xs:any     namespace='##other'
-                      minOccurs='0'
-                      maxOccurs='unbounded'/>
-          <xs:element ref='error'
-                      minOccurs='0'/>
-        </xs:sequence>
-        <xs:attribute name='from'
-                      type='xs:string'
-                      use='required'/>
-        <xs:attribute name='id'
-                      type='xs:NMTOKEN'
-                      use='optional'/>
-        <xs:attribute name='to'
-                      type='xs:string'
-                      use='required'/>
-        <xs:attribute name='type' use='optional' default='normal'>
-          <xs:simpleType>
-            <xs:restriction base='xs:NCName'>
-              <xs:enumeration value='chat'/>
-              <xs:enumeration value='error'/>
-              <xs:enumeration value='groupchat'/>
-              <xs:enumeration value='headline'/>
-              <xs:enumeration value='normal'/>
-            </xs:restriction>
-          </xs:simpleType>
-        </xs:attribute>
-        <xs:attribute ref='xml:lang' use='optional'/>
-     </xs:complexType>
-  </xs:element>
-
-  <xs:element name='body'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='nonEmptyString'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='subject'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='thread' type='xs:NMTOKEN'/>
-
-  <xs:element name='presence'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:choice minOccurs='0' maxOccurs='unbounded'>
-          <xs:element ref='show'/>
-          <xs:element ref='status'/>
-          <xs:element ref='priority'/>
-        </xs:choice>
-        <xs:any     namespace='##other'
-                    minOccurs='0'
-                    maxOccurs='unbounded'/>
-        <xs:element ref='error'
-                    minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='from'
-                    type='xs:string'
-                    use='required'/>
-      <xs:attribute name='id'
-                    type='xs:NMTOKEN'
-                    use='optional'/>
-      <xs:attribute name='to'
-                    type='xs:string'
-                    use='required'/>
-      <xs:attribute name='type' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='error'/>
-            <xs:enumeration value='probe'/>
-            <xs:enumeration value='subscribe'/>
-            <xs:enumeration value='subscribed'/>
-            <xs:enumeration value='unavailable'/>
-            <xs:enumeration value='unsubscribe'/>
-            <xs:enumeration value='unsubscribed'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute ref='xml:lang' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='show'>
-    <xs:simpleType>
-      <xs:restriction base='xs:NCName'>
-        <xs:enumeration value='away'/>
-        <xs:enumeration value='chat'/>
-        <xs:enumeration value='dnd'/>
-        <xs:enumeration value='xa'/>
-      </xs:restriction>
-    </xs:simpleType>
-  </xs:element>
-
-  <xs:element name='status'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='statusType'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='priority' type='xs:byte'/>
-
-  <xs:element name='iq'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:any     namespace='##other'
-                    minOccurs='0'/>
-        <xs:element ref='error'
-                    minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='from'
-                    type='xs:string'
-                    use='required'/>
-      <xs:attribute name='id'
-                    type='xs:NMTOKEN'
-                    use='required'/>
-      <xs:attribute name='to'
-                    type='xs:string'
-                    use='required'/>
-      <xs:attribute name='type' use='required'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='error'/>
-            <xs:enumeration value='get'/>
-            <xs:enumeration value='result'/>
-            <xs:enumeration value='set'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute ref='xml:lang' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='error'>
-    <xs:complexType>
-      <xs:sequence  xmlns:err='urn:ietf:params:xml:ns:xmpp-stanzas'>
-        <xs:group   ref='err:stanzaErrorGroup'/>
-        <xs:element xmlns:err='urn:ietf:params:xml:ns:xmpp-stanzas' ref='err:text'
-                    minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='code' type='xs:unsignedShort' use='optional'/>
-      <xs:attribute name='type' use='required'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='auth'/>
-            <xs:enumeration value='cancel'/>
-            <xs:enumeration value='continue'/>
-            <xs:enumeration value='modify'/>
-            <xs:enumeration value='wait'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='statusType'>
-    <xs:restriction base='xs:string'>
-      <xs:minLength value='1'/>
-      <xs:maxLength value='1024'/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name='nonEmptyString'>
-    <xs:restriction base='xs:string'>
-      <xs:minLength value='1'/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/muc-admin.xsd b/trunk/activemq-xmpp/src/main/resources/muc-admin.xsd
deleted file mode 100644
index 12e23dc..0000000
--- a/trunk/activemq-xmpp/src/main/resources/muc-admin.xsd
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/muc#admin'
-    xmlns='http://jabber.org/protocol/muc#admin'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0045: http://www.xmpp.org/extensions/xep-0045.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='item' maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='item'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='actor' minOccurs='0'/>
-        <xs:element ref='reason' minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='affiliation' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='admin'/>
-            <xs:enumeration value='member'/>
-            <xs:enumeration value='none'/>
-            <xs:enumeration value='outcast'/>
-            <xs:enumeration value='owner'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute name='jid' type='xs:string' use='optional'/>
-      <xs:attribute name='nick' type='xs:string' use='optional'/>
-      <xs:attribute name='role' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='moderator'/>
-            <xs:enumeration value='none'/>
-            <xs:enumeration value='participant'/>
-            <xs:enumeration value='visitor'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='actor'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='empty'>
-          <xs:attribute name='jid' type='xs:string' use='required'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='reason' type='xs:string'/>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/muc-unique.xsd b/trunk/activemq-xmpp/src/main/resources/muc-unique.xsd
deleted file mode 100644
index 121d7cf..0000000
--- a/trunk/activemq-xmpp/src/main/resources/muc-unique.xsd
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/muc#unique'
-    xmlns='http://jabber.org/protocol/muc#unique'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0045: http://www.xmpp.org/extensions/xep-0045.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='unique' type='xs:string'/>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/muc-user.xsd b/trunk/activemq-xmpp/src/main/resources/muc-user.xsd
deleted file mode 100644
index 42dde87..0000000
--- a/trunk/activemq-xmpp/src/main/resources/muc-user.xsd
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/muc#user'
-    xmlns='http://jabber.org/protocol/muc#user'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0045: http://www.xmpp.org/extensions/xep-0045.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='x'>
-    <xs:complexType>
-      <xs:choice minOccurs='0' maxOccurs='unbounded'>
-        <xs:element ref='decline' minOccurs='0'/>
-        <xs:element ref='destroy' minOccurs='0'/>
-        <xs:element ref='invite' minOccurs='0' maxOccurs='unbounded'/>
-        <xs:element ref='item' minOccurs='0'/>
-        <xs:element name='password' type='xs:string' minOccurs='0'/>
-        <xs:element ref='status' minOccurs='0' maxOccurs='unbounded'/>
-      </xs:choice>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='decline'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='reason' minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='from' type='xs:string' use='optional'/>
-      <xs:attribute name='to' type='xs:string' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='destroy'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='reason' minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='jid' type='xs:string' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='invite'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='reason' minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='from' type='xs:string' use='optional'/>
-      <xs:attribute name='to' type='xs:string' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='item'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='actor' minOccurs='0'/>
-        <xs:element ref='reason' minOccurs='0'/>
-        <xs:element name='continue' type='empty' minOccurs='0'/>
-      </xs:sequence>
-      <xs:attribute name='affiliation' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='admin'/>
-            <xs:enumeration value='member'/>
-            <xs:enumeration value='none'/>
-            <xs:enumeration value='outcast'/>
-            <xs:enumeration value='owner'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute name='jid' type='xs:string' use='optional'/>
-      <xs:attribute name='nick' type='xs:string' use='optional'/>
-      <xs:attribute name='role' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='moderator'/>
-            <xs:enumeration value='none'/>
-            <xs:enumeration value='participant'/>
-            <xs:enumeration value='visitor'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='actor'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='empty'>
-          <xs:attribute name='jid' type='xs:string' use='required'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='status'>
-    <xs:complexType>
-      <xs:attribute name='code' use='required'>
-        <xs:simpleType>
-          <xs:restriction base='xs:int'>
-            <xs:minInclusive value='100'/>
-            <xs:maxInclusive value='999'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='reason' type='xs:string'/>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/muc.xsd b/trunk/activemq-xmpp/src/main/resources/muc.xsd
deleted file mode 100644
index 7e52b8e..0000000
--- a/trunk/activemq-xmpp/src/main/resources/muc.xsd
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/muc'
-    xmlns='http://jabber.org/protocol/muc'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0045: http://www.xmpp.org/extensions/xep-0045.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='x'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='history' minOccurs='0'/>
-        <xs:element name='password' type='xs:string' minOccurs='0'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='history'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='empty'>
-         <xs:attribute name='maxchars' type='xs:int' use='optional'/>
-         <xs:attribute name='maxstanzas' type='xs:int' use='optional'/>
-         <xs:attribute name='seconds' type='xs:int' use='optional'/>
-         <xs:attribute name='since' type='xs:dateTime' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/roster.xsd b/trunk/activemq-xmpp/src/main/resources/roster.xsd
deleted file mode 100755
index bf85745..0000000
--- a/trunk/activemq-xmpp/src/main/resources/roster.xsd
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='jabber:iq:roster'
-    xmlns='jabber:iq:roster'
-    elementFormDefault='qualified'>
-
-  <xs:element name='query'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='item'
-                    minOccurs='0'
-                    maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='item'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='group'
-                    minOccurs='0'
-                    maxOccurs='unbounded'/>
-      </xs:sequence>
-      <xs:attribute name='ask' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='subscribe'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute name='jid' type='xs:string' use='required'/>
-      <xs:attribute name='name' type='xs:string' use='optional'/>
-      <xs:attribute name='subscription' use='optional'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='both'/>
-            <xs:enumeration value='from'/>
-            <xs:enumeration value='none'/>
-            <xs:enumeration value='remove'/>
-            <xs:enumeration value='to'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='group' type='xs:string'/>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/rosternotes.xsd b/trunk/activemq-xmpp/src/main/resources/rosternotes.xsd
deleted file mode 100644
index 7cc7a46..0000000
--- a/trunk/activemq-xmpp/src/main/resources/rosternotes.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='storage:rosternotes'
-    xmlns='storage:rosternotes'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0145: http://www.xmpp.org/extensions/xep-0145.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='storage'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='note' minOccurs='0' maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='note'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'>
-          <xs:attribute name='jid' type='xs:string' use='required'/>
-          <xs:attribute name='cdate' type='xs:dateTime' use='optional'/>
-          <xs:attribute name='mdate' type='xs:dateTime' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/rosterx.xsd b/trunk/activemq-xmpp/src/main/resources/rosterx.xsd
deleted file mode 100644
index fe7b468..0000000
--- a/trunk/activemq-xmpp/src/main/resources/rosterx.xsd
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='http://jabber.org/protocol/rosterx'
-    xmlns='http://jabber.org/protocol/rosterx'
-    elementFormDefault='qualified'>
-
-  <xs:annotation>
-    <xs:documentation>
-      The protocol documented by this schema is defined in
-      XEP-0144: http://www.xmpp.org/extensions/xep-0144.html
-    </xs:documentation>
-  </xs:annotation>
-
-  <xs:element name='x'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref='item' minOccurs='1' maxOccurs='unbounded'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='item'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element name='group' type='xs:string' minOccurs='0' maxOccurs='unbounded'/>
-      </xs:sequence>
-      <xs:attribute name='action' use='optional' default='add'>
-        <xs:simpleType>
-          <xs:restriction base='xs:NCName'>
-            <xs:enumeration value='add'/>
-            <xs:enumeration value='delete'/>
-            <xs:enumeration value='modify'/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute name='jid' type='xs:string' use='required'/>
-      <xs:attribute name='name' type='xs:string' use='optional'/>
-    </xs:complexType>
-  </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/sasl.xsd b/trunk/activemq-xmpp/src/main/resources/sasl.xsd
deleted file mode 100755
index bc0b121..0000000
--- a/trunk/activemq-xmpp/src/main/resources/sasl.xsd
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-  copyright (c) 1999-2006 The Jabber Software Foundation
-  http://www.xmpp.org/about/copyright.shtml
-
-  This XSD is licensed under the Creative Commons License 2.5
-  http://creativecommons.org/licenses/by/2.5/
--->
-
-<xs:schema
-        xmlns:xs='http://www.w3.org/2001/XMLSchema'
-        targetNamespace='urn:ietf:params:xml:ns:xmpp-sasl'
-        xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
-        elementFormDefault='qualified'>
-
-  <xs:element name='mechanisms'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element name='mechanism'
-                    maxOccurs='unbounded'
-                    type='xs:string'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='auth'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'>
-          <xs:attribute name='mechanism'
-                        type='xs:string'
-                        use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='challenge'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'/>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='response'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'/>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='success'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'/>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='abort'>
-    <xs:complexType>
-    </xs:complexType>
-  </xs:element>
-
-  <!--
-  <xs:element name='challenge' type='xs:string'/>
-  <xs:element name='response' type='xs:string'/>
-  <xs:element name='abort' type='empty'/>
-  <xs:element name='success' type='xs:string'/>
-  -->
-
-  <xs:element name='failure'>
-    <xs:complexType>
-      <xs:choice minOccurs='0'>
-        <xs:element name='aborted' type='empty'/>
-        <xs:element name='incorrect-encoding' type='empty'/>
-        <xs:element name='invalid-authzid' type='empty'/>
-        <xs:element name='invalid-mechanism' type='empty'/>
-        <xs:element name='mechanism-too-weak' type='empty'/>
-        <xs:element name='not-authorized' type='empty'/>
-        <xs:element name='temporary-auth-failure' type='empty'/>
-      </xs:choice>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/session.xsd b/trunk/activemq-xmpp/src/main/resources/session.xsd
deleted file mode 100755
index 30b147a..0000000
--- a/trunk/activemq-xmpp/src/main/resources/session.xsd
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='urn:ietf:params:xml:ns:xmpp-session'
-    xmlns='urn:ietf:params:xml:ns:xmpp-session'
-    elementFormDefault='qualified'>
-
-  <xs:element name='session' type='empty'/>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/stanzaerror.xsd b/trunk/activemq-xmpp/src/main/resources/stanzaerror.xsd
deleted file mode 100755
index cb0a166..0000000
--- a/trunk/activemq-xmpp/src/main/resources/stanzaerror.xsd
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='urn:ietf:params:xml:ns:xmpp-stanzas'
-    xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
-    elementFormDefault='qualified'>
-
-  <xs:import namespace='http://www.w3.org/XML/1998/namespace'
-             schemaLocation='xml.xsd'/>
-
-  <xs:element name='bad-request' type='empty'/>
-  <xs:element name='conflict' type='empty'/>
-  <xs:element name='feature-not-implemented' type='empty'/>
-  <xs:element name='forbidden' type='empty'/>
-  <xs:element name='gone' type='xs:string'/>
-  <xs:element name='internal-server-error' type='empty'/>
-  <xs:element name='item-not-found' type='empty'/>
-  <xs:element name='jid-malformed' type='empty'/>
-  <xs:element name='not-acceptable' type='empty'/>
-  <xs:element name='not-allowed' type='empty'/>
-  <xs:element name='payment-required' type='empty'/>
-  <xs:element name='recipient-unavailable' type='empty'/>
-  <xs:element name='redirect' type='xs:string'/>
-  <xs:element name='registration-required' type='empty'/>
-  <xs:element name='remote-server-not-found' type='empty'/>
-  <xs:element name='remote-server-timeout' type='empty'/>
-  <xs:element name='resource-constraint' type='empty'/>
-  <xs:element name='service-unavailable' type='empty'/>
-  <xs:element name='subscription-required' type='empty'/>
-  <xs:element name='undefined-condition' type='empty'/>
-  <xs:element name='unexpected-request' type='empty'/>
-
-  <xs:group name='stanzaErrorGroup'>
-    <xs:choice>
-      <xs:element ref='bad-request'/>
-      <xs:element ref='conflict'/>
-      <xs:element ref='feature-not-implemented'/>
-      <xs:element ref='forbidden'/>
-      <xs:element ref='gone'/>
-      <xs:element ref='internal-server-error'/>
-      <xs:element ref='item-not-found'/>
-      <xs:element ref='jid-malformed'/>
-      <xs:element ref='not-acceptable'/>
-      <xs:element ref='not-allowed'/>
-      <xs:element ref='payment-required'/>
-      <xs:element ref='recipient-unavailable'/>
-      <xs:element ref='redirect'/>
-      <xs:element ref='registration-required'/>
-      <xs:element ref='remote-server-not-found'/>
-      <xs:element ref='remote-server-timeout'/>
-      <xs:element ref='resource-constraint'/>
-      <xs:element ref='service-unavailable'/>
-      <xs:element ref='subscription-required'/>
-      <xs:element ref='undefined-condition'/>
-      <xs:element ref='unexpected-request'/>
-    </xs:choice>
-  </xs:group>
-
-  <xs:element name='text'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/streamerror.xsd b/trunk/activemq-xmpp/src/main/resources/streamerror.xsd
deleted file mode 100755
index 47b8031..0000000
--- a/trunk/activemq-xmpp/src/main/resources/streamerror.xsd
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='urn:ietf:params:xml:ns:xmpp-streams'
-    xmlns='urn:ietf:params:xml:ns:xmpp-streams'
-    elementFormDefault='qualified'>
-
-  <xs:import namespace='http://www.w3.org/XML/1998/namespace'
-             schemaLocation='xml.xsd'/>
-
-  <xs:element name='bad-format' type='empty'/>
-  <xs:element name='bad-namespace-prefix' type='empty'/>
-  <xs:element name='conflict' type='empty'/>
-  <xs:element name='connection-timeout' type='empty'/>
-  <xs:element name='host-gone' type='empty'/>
-  <xs:element name='host-unknown' type='empty'/>
-  <xs:element name='improper-addressing' type='empty'/>
-  <xs:element name='internal-server-error' type='empty'/>
-  <xs:element name='invalid-from' type='empty'/>
-  <xs:element name='invalid-id' type='empty'/>
-  <xs:element name='invalid-namespace' type='empty'/>
-  <xs:element name='invalid-xml' type='empty'/>
-  <xs:element name='not-authorized' type='empty'/>
-  <xs:element name='policy-violation' type='empty'/>
-  <xs:element name='remote-connection-failed' type='empty'/>
-  <xs:element name='resource-constraint' type='empty'/>
-  <xs:element name='restricted-xml' type='empty'/>
-  <xs:element name='see-other-host' type='xs:string'/>
-  <xs:element name='system-shutdown' type='empty'/>
-  <xs:element name='undefined-condition' type='empty'/>
-  <xs:element name='unsupported-encoding' type='empty'/>
-  <xs:element name='unsupported-stanza-type' type='empty'/>
-  <xs:element name='unsupported-version' type='empty'/>
-  <xs:element name='xml-not-well-formed' type='empty'/>
-
-  <xs:group name='streamErrorGroup'>
-    <xs:choice>
-      <xs:element ref='bad-format'/>
-      <xs:element ref='bad-namespace-prefix'/>
-      <xs:element ref='conflict'/>
-      <xs:element ref='connection-timeout'/>
-      <xs:element ref='host-gone'/>
-      <xs:element ref='host-unknown'/>
-      <xs:element ref='improper-addressing'/>
-      <xs:element ref='internal-server-error'/>
-      <xs:element ref='invalid-from'/>
-      <xs:element ref='invalid-id'/>
-      <xs:element ref='invalid-namespace'/>
-      <xs:element ref='invalid-xml'/>
-      <xs:element ref='not-authorized'/>
-      <xs:element ref='policy-violation'/>
-      <xs:element ref='remote-connection-failed'/>
-      <xs:element ref='resource-constraint'/>
-      <xs:element ref='restricted-xml'/>
-      <xs:element ref='see-other-host'/>
-      <xs:element ref='system-shutdown'/>
-      <xs:element ref='undefined-condition'/>
-      <xs:element ref='unsupported-encoding'/>
-      <xs:element ref='unsupported-stanza-type'/>
-      <xs:element ref='unsupported-version'/>
-      <xs:element ref='xml-not-well-formed'/>
-    </xs:choice>
-  </xs:group>
-
-  <xs:element name='text'>
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base='xs:string'>
-          <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/streams.xsd b/trunk/activemq-xmpp/src/main/resources/streams.xsd
deleted file mode 100755
index f713ad9..0000000
--- a/trunk/activemq-xmpp/src/main/resources/streams.xsd
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    xmlns:jaxb='http://java.sun.com/xml/ns/jaxb'
-    targetNamespace='http://etherx.jabber.org/streams'
-    xmlns='http://etherx.jabber.org/streams'
-    elementFormDefault='unqualified'
-    jaxb:version="2.0">
-
-    <xs:import namespace='jabber:client'
-        schemaLocation='jabber-client.xsd'/>
-
-    <xs:import namespace='jabber:server'
-        schemaLocation='jabber-server.xsd'/>
-
-    <xs:import namespace='jabber:server:dialback'
-        schemaLocation='dialback.xsd'/>
-
-    <xs:import namespace='urn:ietf:params:xml:ns:xmpp-streams'
-        schemaLocation='streamerror.xsd'/>
-
-    <xs:import namespace='http://www.w3.org/XML/1998/namespace'
-        schemaLocation='xml.xsd'/>
-
-    <xs:element name='stream'>
-        <xs:complexType>
-            <xs:sequence xmlns:client='jabber:client'
-                xmlns:server='jabber:server'
-                xmlns:db='jabber:server:dialback'>
-                <xs:element ref='features' minOccurs='0' maxOccurs='1'/>
-                <xs:any namespace='urn:ietf:params:xml:ns:xmpp-tls'
-                    minOccurs='0'
-                    maxOccurs='unbounded'>
-                    <xs:annotation>
-                        <xs:appinfo>
-                            <jaxb:property name="xmppTls"/>
-                        </xs:appinfo>
-                    </xs:annotation>
-                </xs:any>
-                <xs:any namespace='urn:ietf:params:xml:ns:xmpp-sasl'
-                    minOccurs='0'
-                    maxOccurs='unbounded'>
-                    <xs:annotation>
-                        <xs:appinfo>
-                            <jaxb:property name="xmppSasl"/>
-                        </xs:appinfo>
-                    </xs:annotation>
-                </xs:any>
-                <xs:choice minOccurs='0' maxOccurs='1'>
-                    <xs:choice minOccurs='0' maxOccurs='unbounded'>
-                        <xs:annotation>
-                            <xs:appinfo>
-                                <jaxb:property name="clientMessages"/>
-                            </xs:appinfo>
-                        </xs:annotation>
-                        <xs:element xmlns:client='jabber:client' ref='client:message'/>
-                        <xs:element xmlns:client='jabber:client' ref='client:presence'/>
-                        <xs:element xmlns:client='jabber:client' ref='client:iq'/>
-                    </xs:choice>
-                    <xs:choice minOccurs='0' maxOccurs='unbounded'>
-                        <xs:annotation>
-                            <xs:appinfo>
-                                <jaxb:property name="serverMessages"/>
-                            </xs:appinfo>
-                        </xs:annotation>
-                        <xs:element xmlns:server='jabber:server' ref='server:message'/>
-                        <xs:element xmlns:server='jabber:server' ref='server:presence'/>
-                        <xs:element xmlns:server='jabber:server' ref='server:iq'/>
-                        <xs:element xmlns:db='jabber:server:dialback' ref='db:result'/>
-                        <xs:element xmlns:db='jabber:server:dialback' ref='db:verify'/>
-                    </xs:choice>
-                </xs:choice>
-                <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
-            </xs:sequence>
-            <xs:attribute name='from' type='xs:string' use='optional'/>
-            <xs:attribute name='id' type='xs:NMTOKEN' use='optional'/>
-            <xs:attribute name='to' type='xs:string' use='optional'/>
-            <xs:attribute name='version' type='xs:decimal' use='optional'/>
-            <xs:attribute ref='xml:lang' use='optional'/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name='features'>
-        <xs:complexType>
-            <xs:choice minOccurs='0' maxOccurs='unbounded'>
-                <xs:any namespace='##other'/>
-            </xs:choice>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name='error'>
-        <xs:complexType>
-            <xs:sequence  xmlns:err='urn:ietf:params:xml:ns:xmpp-streams'>
-                <xs:group   ref='err:streamErrorGroup'/>
-                <xs:element xmlns:err='urn:ietf:params:xml:ns:xmpp-streams' ref='err:text'
-                    minOccurs='0'
-                    maxOccurs='1'/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/tls.xsd b/trunk/activemq-xmpp/src/main/resources/tls.xsd
deleted file mode 100755
index cf81fff..0000000
--- a/trunk/activemq-xmpp/src/main/resources/tls.xsd
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-  copyright (c) 1999-2006 The Jabber Software Foundation
-  http://www.xmpp.org/about/copyright.shtml
-
-  This XSD is licensed under the Creative Commons License 2.5
-  http://creativecommons.org/licenses/by/2.5/
--->
-
-<xs:schema
-    xmlns:xs='http://www.w3.org/2001/XMLSchema'
-    targetNamespace='urn:ietf:params:xml:ns:xmpp-tls'
-    xmlns='urn:ietf:params:xml:ns:xmpp-tls'
-    elementFormDefault='qualified'>
-
-  <xs:element name='starttls'>
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element
-            name='required'
-            minOccurs='0'
-            maxOccurs='1'
-            type='empty'/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='proceed'>
-    <xs:complexType>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name='failure'>
-    <xs:complexType>
-    </xs:complexType>
-  </xs:element>
-
-  <!--
-  <xs:element name='proceed' type='empty'/>
-  <xs:element name='failure' type='empty'/>
-  -->
-
-  <xs:simpleType name='empty'>
-    <xs:restriction base='xs:string'>
-      <xs:enumeration value=''/>
-    </xs:restriction>
-  </xs:simpleType>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/main/resources/xml.xsd b/trunk/activemq-xmpp/src/main/resources/xml.xsd
deleted file mode 100644
index 7a9139f..0000000
--- a/trunk/activemq-xmpp/src/main/resources/xml.xsd
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version='1.0'?>
-<!--
-        Copyright © 2004 World Wide Web Consortium, 
-        (Massachusetts Institute of Technology, European Research 
-        Consortium for Informatics and Mathematics, Keio University). 
-        All Rights Reserved. 
-        http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
-        
-        The original file is available at 
-             http://www.w3.org/2001/xml.xsd
-  -->
-<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
-
- <xs:annotation>
-  <xs:documentation>
-   See http://www.w3.org/XML/1998/namespace.html and
-   http://www.w3.org/TR/REC-xml for information about this namespace.
-
-    This schema document describes the XML namespace, in a form
-    suitable for import by other schema documents.
-
-    Note that local names in this namespace are intended to be defined
-    only by the World Wide Web Consortium or its subgroups.  The
-    following names are currently defined in this namespace and should
-    not be used with conflicting semantics by any Working Group,
-    specification, or document instance:
-
-    base (as an attribute name): denotes an attribute whose value
-         provides a URI to be used as the base for interpreting any
-         relative URIs in the scope of the element on which it
-         appears; its value is inherited.  This name is reserved
-         by virtue of its definition in the XML Base specification.
-
-    id   (as an attribute name): denotes an attribute whose value
-         should be interpreted as if declared to be of type ID.
-         The xml:id specification is not yet a W3C Recommendation,
-         but this attribute is included here to facilitate experimentation
-         with the mechanisms it proposes.  Note that it is _not_ included
-         in the specialAttrs attribute group.
-
-    lang (as an attribute name): denotes an attribute whose value
-         is a language code for the natural language of the content of
-         any element; its value is inherited.  This name is reserved
-         by virtue of its definition in the XML specification.
-
-    space (as an attribute name): denotes an attribute whose
-         value is a keyword indicating what whitespace processing
-         discipline is intended for the content of the element; its
-         value is inherited.  This name is reserved by virtue of its
-         definition in the XML specification.
-
-    Father (in any context at all): denotes Jon Bosak, the chair of
-         the original XML Working Group.  This name is reserved by
-         the following decision of the W3C XML Plenary and
-         XML Coordination groups:
-
-             In appreciation for his vision, leadership and dedication
-             the W3C XML Plenary on this 10th day of February, 2000
-             reserves for Jon Bosak in perpetuity the XML name
-             xml:Father
-  </xs:documentation>
- </xs:annotation>
-
- <xs:annotation>
-  <xs:documentation>This schema defines attributes and an attribute group
-        suitable for use by
-        schemas wishing to allow xml:base, xml:lang or xml:space attributes
-        on elements they define.
-
-        To enable this, such a schema must import this schema
-        for the XML namespace, e.g. as follows:
-        &lt;schema . . .>
-         . . .
-         &lt;import namespace="http://www.w3.org/XML/1998/namespace"
-                    schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
-
-        Subsequently, qualified reference to any of the attributes
-        or the group defined below will have the desired effect, e.g.
-
-        &lt;type . . .>
-         . . .
-         &lt;attributeGroup ref="xml:specialAttrs"/>
-
-         will define a type which will schema-validate an instance
-         element with any of those attributes</xs:documentation>
-
- </xs:annotation>
-
- <xs:annotation>
-  <xs:documentation>In keeping with the XML Schema WG's standard versioning
-   policy, this schema document will persist at
-   http://www.w3.org/2004/10/xml.xsd.
-   At the date of issue it can also be found at
-   http://www.w3.org/2001/xml.xsd.
-   The schema document at that URI may however change in the future,
-   in order to remain compatible with the latest version of XML Schema
-   itself, or with the XML namespace itself.  In other words, if the XML
-   Schema or XML namespaces change, the version of this document at
-   http://www.w3.org/2001/xml.xsd will change
-   accordingly; the version at
-   http://www.w3.org/2004/10/xml.xsd will not change.
-  </xs:documentation>
- </xs:annotation>
-
- <xs:attribute name="lang" type="xs:language">
-  <xs:annotation>
-   <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
-         codes as the enumerated possible values is probably never
-         going to be a realistic possibility.  See
-         RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
-         at http://www.iana.org/assignments/lang-tag-apps.htm for
-         further information.</xs:documentation>
-
-  </xs:annotation>
- </xs:attribute>
-
- <xs:attribute name="space">
-  <xs:simpleType>
-   <xs:restriction base="xs:NCName">
-    <xs:enumeration value="default"/>
-    <xs:enumeration value="preserve"/>
-   </xs:restriction>
-
-  </xs:simpleType>
- </xs:attribute>
-
- <xs:attribute name="base" type="xs:anyURI">
-  <xs:annotation>
-   <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
-                     information about this attribute.</xs:documentation>
-  </xs:annotation>
- </xs:attribute>
-
- <xs:attribute name="id" type="xs:ID">
-
-  <xs:annotation>
-   <xs:documentation>See http://www.w3.org/TR/xml-id/ for
-                     information about this attribute.</xs:documentation>
-  </xs:annotation>
- </xs:attribute>
-
- <xs:attributeGroup name="specialAttrs">
-  <xs:attribute ref="xml:base"/>
-  <xs:attribute ref="xml:lang"/>
-  <xs:attribute ref="xml:space"/>
-
- </xs:attributeGroup>
-
-</xs:schema>
diff --git a/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java b/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java
deleted file mode 100644
index 7f3112a..0000000
--- a/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * 
- */
-public class XmppBroker implements Service {
-    private BrokerService broker = new BrokerService();
-
-    public static void main(String[] args) {
-        try {
-            XmppBroker broker = new XmppBroker();
-            broker.start();
-
-            System.out.println("Press any key to terminate");
-            System.in.read();
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void start() throws Exception {
-        broker.setPersistent(false);
-        broker.setUseJmx(false);
-        broker.addConnector("xmpp://localhost:61222");
-        broker.start();
-    }
-
-    public void stop() throws Exception {
-        broker.stop();
-    }
-}
diff --git a/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java b/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
deleted file mode 100644
index 3361678..0000000
--- a/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * 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.transport.xmpp;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-import org.jivesoftware.smack.Chat;
-import org.jivesoftware.smack.ChatManager;
-import org.jivesoftware.smack.ChatManagerListener;
-import org.jivesoftware.smack.ConnectionConfiguration;
-import org.jivesoftware.smack.MessageListener;
-import org.jivesoftware.smack.PacketListener;
-import org.jivesoftware.smack.XMPPConnection;
-import org.jivesoftware.smack.XMPPException;
-import org.jivesoftware.smack.filter.PacketFilter;
-import org.jivesoftware.smack.packet.Message;
-import org.jivesoftware.smack.packet.Packet;
-import org.jivesoftware.smackx.muc.MultiUserChat;
-
-/**
- * 
- */
-public class XmppTest extends TestCase {
-
-    protected static boolean block;
-
-    private final XmppBroker broker = new XmppBroker();
-
-    private final long sleepTime = 5000;
-
-    public static void main(String[] args) {
-        block = true;
-        TestRunner.run(XmppTest.class);
-    }
-
-    public void testConnect() throws Exception {
-        ConnectionConfiguration config = new
-            ConnectionConfiguration("localhost", 61222);
-        // config.setDebuggerEnabled(true);
-
-        try {
-            // SmackConfiguration.setPacketReplyTimeout(1000);
-            XMPPConnection con = new XMPPConnection(config);
-            con.connect(); 
-            con.login("amq-user", "amq-pwd");
-            ChatManager chatManager = con.getChatManager();
-            Chat chat = chatManager.createChat("test@localhost", new MessageListener() {
-                public void processMessage(Chat chat, Message message) {
-                    System.out.println("Got XMPP message from chat " + chat.getParticipant() + " message - " + message.getBody());
-                }
-            });
-            for (int i = 0; i < 10; i++) {
-                System.out.println("Sending message: " + i);
-                chat.sendMessage("Hello from Message: " + i);
-            }
-            System.out.println("Sent all messages!");
-            con.disconnect();
-        } catch (XMPPException e) {
-            if (block) {
-                System.out.println("Caught: " + e);
-                e.printStackTrace();
-            } else {
-                throw e;
-            }
-        }
-        if (block) {
-            Thread.sleep(20000);
-            System.out.println("Press any key to quit!: ");
-            System.in.read();
-        }
-        System.out.println("Done!");
-    }
-
-
-
-    public void testChat() throws Exception {
-        ConnectionConfiguration config = new ConnectionConfiguration("localhost", 61222);
-        //config.setDebuggerEnabled(true);
-
-        XMPPConnection consumerCon = new XMPPConnection(config);
-        consumerCon.connect();
-        consumerCon.login("consumer", "consumer");
-        consumerCon.addPacketListener(new XmppLogger("CONSUMER INBOUND"), new PacketFilter() {
-            public boolean accept(Packet packet) {
-                return true;
-            }
-        });
-        consumerCon.addPacketWriterListener(new XmppLogger("CONSUMER OUTBOUND"), new PacketFilter() {
-            public boolean accept(Packet packet) {
-                return true;
-            }
-        });
-        final ConsumerMessageListener listener = new ConsumerMessageListener();
-
-        consumerCon.getChatManager().addChatListener(new ChatManagerListener() {
-            public void chatCreated(Chat chat, boolean createdLocally) {
-                chat.addMessageListener(listener);
-            }
-        });
-
-
-        XMPPConnection producerCon = new XMPPConnection(config);
-        producerCon.connect();
-        producerCon.login("producer", "producer");
-        producerCon.addPacketListener(new XmppLogger("PRODUCER INBOUND"), new PacketFilter() {
-            public boolean accept(Packet packet) {
-                return true;
-            }
-        });
-        producerCon.addPacketWriterListener(new XmppLogger("PRODUCER OUTBOUND"), new PacketFilter() {
-            public boolean accept(Packet packet) {
-                return true;
-            }
-        });
-
-        Chat chat = producerCon.getChatManager().createChat("consumer", new MessageListener() {
-            public void processMessage(Chat chat, Message message) {
-                System.out.println("Got XMPP message from chat " + chat.getParticipant() + " message - " + message.getBody());
-            }
-        });
-
-        for (int i = 0; i < 10; i++) {
-            System.out.println("Sending message: " + i);
-            Message message = new Message("consumer");
-            message.setType(Message.Type.chat);
-            message.setBody("Hello from producer, message # " + i);
-            chat.sendMessage(message);
-        }
-        System.out.println("Sent all messages!");
-
-        Thread.sleep(sleepTime);
-        System.out.println("Consumer received - " + listener.getMessageCount());
-        assertEquals(10, listener.getMessageCount());
-    }
-
-
-
-    public void testMultiUserChat() throws Exception {
-        System.out.println("\n\n\n\n\n\n");
-        ConnectionConfiguration config = new ConnectionConfiguration("localhost", 61222);
-        //config.setDebuggerEnabled(true);
-        //
-        XMPPConnection consumerCon = new XMPPConnection(config);
-        consumerCon.connect();
-        consumerCon.login("consumer", "consumer");
-        MultiUserChat consumerMuc = new MultiUserChat(consumerCon, "muc-test");
-        consumerMuc.join("consumer");
-
-        ConsumerMUCMessageListener listener = new ConsumerMUCMessageListener();
-        consumerMuc.addMessageListener(listener);
-
-        XMPPConnection producerCon = new XMPPConnection(config);
-        producerCon.connect();
-        producerCon.login("producer", "producer");
-        MultiUserChat producerMuc = new MultiUserChat(producerCon, "muc-test");
-        producerMuc.join("producer");
-
-        for (int i = 0; i < 10; i++) {
-            System.out.println("Sending message: " + i);
-            Message message = producerMuc.createMessage();
-            message.setBody("Hello from producer, message # " + i);
-            producerMuc.sendMessage(message);
-        }
-        System.out.println("Sent all messages!");
-
-        Thread.sleep(sleepTime);
-        System.out.println("Consumer received - " + listener.getMessageCount());
-        assertEquals(10, listener.getMessageCount());
-    }
-
-    public void addLoggingListeners(String name, XMPPConnection connection) {
-        connection.addPacketListener(new XmppLogger(name + " INBOUND"), new PacketFilter() {
-            public boolean accept(Packet packet) {
-                return true;
-            }
-        });
-        connection.addPacketWriterListener(new XmppLogger(name + " OUTBOUND"), new PacketFilter() {
-            public boolean accept(Packet packet) {
-                return true;
-            }
-        });
-    }
-
-    public void testTwoConnections() throws Exception {
-        System.out.println("\n\n\n\n\n\n");
-        ConnectionConfiguration config = new ConnectionConfiguration("localhost", 61222);
-        //config.setDebuggerEnabled(true);
-
-        //create the consumer first...
-        XMPPConnection consumerCon = new XMPPConnection(config);
-        consumerCon.connect();
-        addLoggingListeners("CONSUMER", consumerCon);
-        consumerCon.login("consumer", "consumer");
-
-        final ConsumerMessageListener listener1 = new ConsumerMessageListener();
-        consumerCon.getChatManager().addChatListener(new ChatManagerListener() {
-            public void chatCreated(Chat chat, boolean createdLocally) {
-                chat.addMessageListener(listener1);
-            }
-        });
-        
-        //now create the producer
-        XMPPConnection producerCon = new XMPPConnection(config);
-        System.out.println("Connecting producer and consumer");
-        producerCon.connect();
-        addLoggingListeners("PRODUCER", producerCon);
-        producerCon.login("producer", "producer");
-
-        //create the chat and send some messages
-        Chat chat = producerCon.getChatManager().createChat("consumer", new MessageListener() {
-            public void processMessage(Chat chat, Message message) {
-                System.out.println("Got XMPP message from chat " + chat.getParticipant() + " message - " + message.getBody());
-            }
-        });
-        
-        for (int i = 0; i < 10; i++) {
-            System.out.println("Sending message: " + i);
-            Message message = new Message("consumer");
-            message.setType(Message.Type.chat);
-            message.setBody("Hello from producer, message # " + i);
-            chat.sendMessage(message);
-        }
-       
-        //make sure the consumer has time to receive all the messages...
-        Thread.sleep(sleepTime); 
-
-        //create an identical 2nd consumer
-        XMPPConnection lastguyCon = new XMPPConnection(config);
-        lastguyCon.connect();
-        addLoggingListeners("LASTGUY", consumerCon);
-        lastguyCon.login("consumer", "consumer");
-        final ConsumerMessageListener listener2 = new ConsumerMessageListener();
-        lastguyCon.getChatManager().addChatListener(new ChatManagerListener() {
-            public void chatCreated(Chat chat, boolean createdLocally) {
-                chat.addMessageListener(listener2);
-            }
-        });
-
-        for (int i = 0; i < 10; i++) {
-            System.out.println("Sending message: " + i);
-            Message message = new Message("consumer");
-            message.setType(Message.Type.chat);
-            message.setBody("Hello from producer, message # " + i);
-            chat.sendMessage(message);
-        }
-
-        System.out.println("Sent all messages!");
-        Thread.sleep(sleepTime);
-        System.out.println("Consumer received - " + listener1.getMessageCount());
-        assertEquals(20, listener1.getMessageCount());
-        System.out.println("Consumer received - " + listener2.getMessageCount());
-        assertEquals(10, listener2.getMessageCount());
-    }
-
-    class XmppLogger implements PacketListener {
-
-        private final String direction;
-
-        public XmppLogger(String direction) {
-            this.direction = direction;
-        }
-
-        public void processPacket(Packet packet) {
-            System.out.println(direction + " : " + packet.toXML());
-        }
-    }
-
-    class ConsumerMUCMessageListener implements PacketListener {
-        private int messageCount=0;
-
-        public void processPacket(Packet packet) {
-            if ( packet instanceof Message) {
-                System.out.println("Received message number : " + (messageCount++));
-            }
-        }
-        public int getMessageCount() {
-            return messageCount;
-        }
-    }
-
-    class ConsumerMessageListener implements MessageListener {
-        private int messageCount=0;
-
-        public void processMessage(Chat chat, Message message) {
-            System.out.println("Received message number : " + (messageCount++));
-        }
-
-        public int getMessageCount() {
-            return messageCount;
-        }
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        broker.start();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        broker.stop();
-    }
-}
diff --git a/trunk/activemq-xmpp/src/test/resources/example-xmpp.xml b/trunk/activemq-xmpp/src/test/resources/example-xmpp.xml
deleted file mode 100644
index 6dd3f7c..0000000
--- a/trunk/activemq-xmpp/src/test/resources/example-xmpp.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version='1.0'?>
-<!--
-  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.
--->
-<stream:stream
-        to='example.com'
-        xmlns='jabber:client'
-        xmlns:stream='http://etherx.jabber.org/streams'
-        version='1.0'>
-
-  <message xml:lang='en'>
-    <body>Hello world!</body>
-  </message>
-
-</stream:stream>
diff --git a/trunk/activemq-xmpp/src/test/resources/log4j.properties b/trunk/activemq-xmpp/src/test/resources/log4j.properties
deleted file mode 100644
index 15ad252..0000000
--- a/trunk/activemq-xmpp/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-## ------------------------------------------------------------------------
-## 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 for eclipse testing, We want to see debug output on the console.
-#
-log4j.rootLogger=INFO, out
-
-log4j.logger.org.apache.activemq=DEBUG
-
-# CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
-#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
diff --git a/trunk/assembly/pom-deb.xml b/trunk/assembly/pom-deb.xml
deleted file mode 100644
index d6530a9..0000000
--- a/trunk/assembly/pom-deb.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.4-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>apache-activemq-deb</artifactId>
-  <packaging>dpkg</packaging>
-  <name>ActiveMQ :: Assembly</name>
-  <description>Puts together the ActiveMQ distribution</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>unix-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <contact>ActiveMQ</contact>
-          <contactEmail>users@activemq.apache.org</contactEmail>
-          <assembly>
-            <extractFile>
-              <archive>target/apache-activemq-${activemq-version}-bin.tar.gz</archive>
-              <to>/opt/activemq</to>
-            </extractFile>
-          </assembly>
-          <dpkg>
-            <section>Applications/Engineering</section>
-            <priority>1</priority>
-          </dpkg>
-        </configuration>    
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/assembly/pom-pkg.xml b/trunk/assembly/pom-pkg.xml
deleted file mode 100644
index dd6da77..0000000
--- a/trunk/assembly/pom-pkg.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.4-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>apache-activemq-pkg</artifactId>
-  <packaging>pkg</packaging>
-  <name>ActiveMQ :: Assembly</name>
-  <description>Puts together the ActiveMQ distribution</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>unix-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <contact>ActiveMQ</contact>
-          <contactEmail>users@activemq.apache.org</contactEmail>
-          <assembly>
-            <extractFile>
-              <archive>target/apache-activemq-${activemq-version}-bin.tar.gz</archive>
-              <to>/opt/activemq</to>
-            </extractFile>
-          </assembly>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/assembly/pom-rpm.xml b/trunk/assembly/pom-rpm.xml
deleted file mode 100644
index afe13a2..0000000
--- a/trunk/assembly/pom-rpm.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.4-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>apache-activemq-rpm</artifactId>
-  <packaging>rpm</packaging>
-  <name>ActiveMQ :: Assembly</name>
-  <description>Puts together the ActiveMQ distribution</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>unix-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <contact>ActiveMQ</contact>
-          <contactEmail>users@activemq.apache.org</contactEmail>
-          <assembly>
-            <extractFile>
-              <archive>target/apache-activemq-${activemq-version}-bin.tar.gz</archive>
-              <to>/opt/activemq</to>
-            </extractFile>
-          </assembly>
-          <rpm>
-            <group>Applications/Engineering</group>
-          </rpm>
-        </configuration>      
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/assembly/pom.xml b/trunk/assembly/pom.xml
deleted file mode 100755
index 12b9aff..0000000
--- a/trunk/assembly/pom.xml
+++ /dev/null
@@ -1,463 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <artifactId>apache-activemq</artifactId>
-  <packaging>pom</packaging>
-  <name>ActiveMQ :: Assembly</name>
-  <description>Puts together the ActiveMQ distribution</description>
-
-  <repositories>
-    <!-- for camel-web's jersey dependencies -->
-    <repository>
-      <id>java.net.maven2</id>
-      <name>java.net Maven 2 Repo</name>
-      <url>http://download.java.net/maven/2</url>
-    </repository>
-  </repositories>
-  
-  <dependencies>
-    
-    <!-- activemq -->
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-all</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-camel</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-core</artifactId>
-      <type>test-jar</type>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activeio-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-console</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-fileserver</artifactId>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-optional</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-pool</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-web</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-jaas</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-xmpp</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-spring</artifactId>
-    </dependency>    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-web-demo</artifactId>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-web-console</artifactId>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-rar</artifactId>
-      <type>rar</type>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>activemq-run</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>kahadb</artifactId>
-    </dependency>
-    
-    <!-- camel -->
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-spring</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-jetty</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-web</artifactId>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-jms</artifactId>
-    </dependency>
-    <!-- for the XML parsing -->
-    <dependency>
-      <groupId>javax.xml.bind</groupId>
-      <artifactId>jaxb-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.sun.xml.bind</groupId>
-      <artifactId>jaxb-impl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.activation</groupId>
-      <artifactId>activation</artifactId>
-      <version>1.1</version>
-    </dependency>
-
-    <!-- commons -->
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-beanutils</groupId>
-      <artifactId>commons-beanutils</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-dbcp</groupId>
-      <artifactId>commons-dbcp</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-      <optional>true</optional>
-    </dependency>
-    
-    <dependency>
-      <groupId>activesoap</groupId>
-      <artifactId>jaxp-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-jmdns_1.0</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>xpp3</groupId>
-      <artifactId>xpp3</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jsp_2.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jacc_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-servlet_2.5_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-    </dependency>
-    <dependency>
-       <groupId>org.apache.xbean</groupId>
-       <artifactId>xbean-spring</artifactId>
-       <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aop</artifactId>
-    </dependency>      
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-jms</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-tx</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-web</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-      <optional>false</optional>
-    </dependency>
-    <dependency>
-        <groupId>org.springframework.ws</groupId>
-        <artifactId>spring-oxm-tiger</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.jettison</groupId>
-      <artifactId>jettison</artifactId>
-    </dependency>  
-
-    <dependency>
-      <groupId>org.eclipse.jetty.aggregate</groupId>
-      <artifactId>jetty-all-server</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jdt</groupId>
-      <artifactId>core</artifactId>
-      <version>3.1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derbynet</artifactId>
-      <optional>true</optional>
-    </dependency>
-    
-    <!-- copied dependencies from activemq-web-console -->
-    <!-- enable commons-logging when inside jetty6:run -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-    </dependency>
-    <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>jcl-over-slf4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>opensymphony</groupId>
-      <artifactId>sitemesh</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>jstl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>taglibs</groupId>
-      <artifactId>standard</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.mortbay.jetty</groupId>
-      <artifactId>jsp-2.1-glassfish</artifactId>
-    </dependency>
-                     
-    <dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jasypt</groupId>
-      <artifactId>jasypt</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <!-- dependencies specific to this module -->
-    <dependency>
-      <groupId>jrms</groupId>
-      <artifactId>jrms</artifactId>
-      <version>1.1</version>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-      <version>2.6.2</version>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xmlParserAPIs</artifactId>
-      <version>2.6.2</version>
-    </dependency>
-    
-  </dependencies>
-
-  <build>
-    
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>unpack</id>
-            <phase>package</phase>
-            <goals>
-              <goal>unpack-dependencies</goal>
-            </goals>
-            <configuration>
-              <includeGroupIds>${project.groupId}</includeGroupIds>
-              <includeArtifactIds>activemq-console</includeArtifactIds>
-              <outputDirectory>target/classes</outputDirectory>
-              <overWriteReleases>false</overWriteReleases>
-              <overWriteSnapshots>true</overWriteSnapshots>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>validate-config</id>
-            <phase>test</phase>
-            <goals>
-             <goal>test</goal>
-            </goals>
-            <configuration>
-             <forkMode>pertest</forkMode>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>unix-bin</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attached</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                 <descriptor>src/main/descriptors/unix-bin.xml</descriptor>  
-              </descriptors>
-              <!--<finalName>${pom.artifactId}-${project.version}</finalName>-->
-              <!--<appendAssemblyId>false</appendAssemblyId>-->
-            </configuration>
-          </execution>
-          <execution>
-            <id>windows-bin</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attached</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                 <descriptor>src/main/descriptors/windows-bin.xml</descriptor>  
-              </descriptors>
-              <!--<finalName>${pom.artifactId}-${project.version}</finalName>-->
-              <!--<appendAssemblyId>false</appendAssemblyId>-->
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <!-- plugin>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>maven-activemq-plugin</artifactId>
-        <version>${project.version}</version>
-        <configuration>
-          <configFile>${basedir}/src/release/conf/activemq.xml</configFile>
-          <url>broker:(tcp://localhost:61616)?useJmx=false</url>
-        </configuration>
-      </plugin -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>copy-conf</id>
-            <phase>process-test-resources</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>target/conf</outputDirectory>
-              <resources> 
-                <resource>
-                  <directory>src/release/conf</directory>
-                </resource>
-                <resource>
-                  <directory>src/sample-conf</directory>
-                </resource>
-              </resources> 
-            </configuration>            
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/assembly/src/main/descriptors/common-bin.xml b/trunk/assembly/src/main/descriptors/common-bin.xml
deleted file mode 100644
index a84bdf6..0000000
--- a/trunk/assembly/src/main/descriptors/common-bin.xml
+++ /dev/null
@@ -1,244 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<component>
-  <!--<id>common-bin</id>-->
-
-  <fileSets>
-    <!-- Copy over files that should not get the line endings converted -->
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>bin/*.jar</include>
-        <include>conf/*.ts</include>
-        <include>conf/*.ks</include>
-        <include>conf/*.cert</include>
-      </includes>
-    </fileSet>
-    
-    <!-- Copy over all sample configurations -->
-    <fileSet>
-      <directory>src/sample-conf</directory>
-      <outputDirectory>conf/</outputDirectory>
-      <includes>
-        <include>activemq-*.xml</include>
-      </includes>
-    </fileSet>
-
-    <!-- lets copy the portions of the admin web app we need - as we can't exclude stuff from the WAR -->
-    <fileSet>
-      <directory>../activemq-web-console/src/main/webapp</directory>
-      <outputDirectory>/webapps/admin</outputDirectory>
-      <excludes>
-        <exclude>**/activemq.xml</exclude>
-        <exclude>**/webconsole-embedded.xml</exclude>
-      </excludes>
-    </fileSet>
-    <fileSet>
-      <directory>../activemq-web-console/target/classes</directory>
-      <outputDirectory>/webapps/admin/WEB-INF/classes</outputDirectory>
-      <includes>
-        <include>**/*.class</include>
-      </includes>
-    </fileSet>
-
-    <!-- the web demo -->
-    <fileSet>
-      <directory>../activemq-web-demo/src/main/webapp</directory>
-      <outputDirectory>/webapps/demo</outputDirectory>
-      <excludes>
-        <exclude>**/activemq.xml</exclude>
-        <exclude>**/webconsole-embedded.xml</exclude>
-      </excludes>
-    </fileSet>
-
-    <!-- the file server -->
-    <fileSet>
-      <directory>../activemq-fileserver/src/main/webapp</directory>
-      <outputDirectory>/webapps/fileserver</outputDirectory>
-    </fileSet>
-    <fileSet>
-      <directory>../activemq-fileserver/target/classes</directory>
-      <outputDirectory>/webapps/fileserver/WEB-INF/classes</outputDirectory>
-      <includes>
-        <include>**/*.class</include>
-      </includes>
-    </fileSet>
-  </fileSets> 
-  
-  <dependencySets>
-    
-    <!-- Copy over jar files -->
-    <dependencySet>
-      <outputDirectory>/bin</outputDirectory>
-      <unpack>false</unpack>
-      <outputFileNameMapping>run.jar</outputFileNameMapping>
-      <includes>
-        <include>${pom.groupId}:activemq-run</include>
-      </includes>
-    </dependencySet>
-
-    <dependencySet>
-      <outputDirectory>/webapps/camel</outputDirectory>
-      <unpack>true</unpack>
-      <unpackOptions>
-        <excludes>
-          <exclude>**/applicationContext.xml</exclude>
-          <!-- ignore jars already in distro -->
-          <exclude>**/act*.jar</exclude>
-          <exclude>**/ant*.jar</exclude>
-          <exclude>**/aop*.jar</exclude>
-<!--
-          <exclude>**/asm*.jar</exclude>
--->
-          <exclude>**/camel-*.jar</exclude>
-          <exclude>**/commons*.jar</exclude>
-          <exclude>**/groovy*.jar</exclude>
-          <exclude>**/jackson*.jar</exclude>
-          <exclude>**/jaxb*.jar</exclude>
-          <exclude>**/jdom*.jar</exclude>
-          <exclude>**/jettison*.jar</exclude>
-          <exclude>**/jruby*.jar</exclude>
-          <exclude>**/jstl*.jar</exclude>
-          <exclude>**/rome*.jar</exclude>
-          <exclude>**/sitemesh*.jar</exclude>
-          <exclude>**/slf4j-*.jar</exclude>
-          <exclude>**/spring-*.jar</exclude>
-          <exclude>**/standard*.jar</exclude>
-          <exclude>**/stax*.jar</exclude>
-          <!-- exclude unused javascript  -->
-          <exclude>**/bespin/</exclude>
-          <exclude>**/dijit/</exclude>
-          <exclude>**/dojo/</exclude>
-          <exclude>**/dojox/</exclude>
-        </excludes>
-      </unpackOptions>
-      <includes>
-        <include>org.apache.camel:camel-web:war</include>
-      </includes>
-    </dependencySet>
-    
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-      <includes>
-        <include>${pom.groupId}:activemq-all</include>
-      </includes>
-    </dependencySet>
-    <dependencySet>
-      <outputDirectory>/lib</outputDirectory>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-      <includes>
-        <include>org.slf4j:slf4j-api</include>
-        <include>org.slf4j:jcl-over-slf4j</include>
-        <include>${pom.groupId}:activemq-core</include>
-        <include>${pom.groupId}:activemq-console</include>
-        <include>${pom.groupId}:activemq-jaas</include>
-        <include>${pom.groupId}:kahadb</include>
-        <include>org.apache.activemq.protobuf:activemq-protobuf</include>
-        <include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
-        <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
-        <include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
-        <include>${pom.groupId}:activemq-web</include>
-
-        <!-- camel -->
-        <include>org.apache.camel:camel-core</include>
-        <include>org.apache.camel:camel-spring</include>
-        <include>org.apache.camel:camel-jetty</include>
-        <include>org.apache.camel:camel-jms</include>
-        <include>org.apache.activemq:activemq-camel</include>
-				<!-- Java 5 only -->
-        <include>javax.xml.bind:jaxb-api</include>
-        <include>javax.activation:activation</include>
-        <include>com.sun.xml.bind:jaxb-impl</include>
-        <include>stax:stax-api</include>
-        <include>stax:stax</include>
-      </includes>
-    </dependencySet>
-    <dependencySet>
-      <outputDirectory>/lib/optional</outputDirectory>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-      <includes>
-        <include>${pom.groupId}:activemq-optional</include>
-        <include>${pom.groupId}:activemq-pool</include>
-        <include>${pom.groupId}:activemq-xmpp</include>
-        <include>${pom.groupId}:activemq-spring</include>
-        <include>${pom.groupId}:activeio-core</include>
-        <include>${pom.groupId}:activemq-jmdns_1.0</include>
-        <include>commons-beanutils:commons-beanutils</include>
-        <include>commons-collections:commons-collections</include>
-        <include>commons-httpclient:commons-httpclient</include>
-        <include>commons-dbcp:commons-dbcp</include>
-        <include>commons-pool:commons-pool</include>
-        <include>commons-codec:commons-codec</include>
-        <include>commons-net:commons-net</include>
-        <include>commons-lang:commons-lang</include>
-        <include>org.slf4j:slf4j-log4j12</include>
-        <include>log4j:log4j</include>
-        <include>org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec</include>
-        <include>org.apache.xbean:xbean-spring</include>
-        <include>org.springframework:spring-aop</include>
-        <include>org.springframework:spring-core</include>
-        <include>org.springframework:spring-beans</include>
-        <include>org.springframework:spring-context</include>
-        <include>org.springframework:spring-tx</include>
-        <include>org.springframework:spring-jms</include>
-        <include>org.springframework:spring-asm</include>
-        <include>org.springframework:spring-expression</include>
-        <include>com.thoughtworks.xstream:xstream</include>
-        <include>xpp3:xpp3</include>
-        <include>org.codehaus.woodstox:woodstox-core-asl</include>
-        <include>org.codehaus.woodstox:stax2-api</include>
-        <include>org.springframework.ws:spring-oxm-tiger</include>
-        <include>org.codehaus.jettison:jettison</include>
-        <include>org.apache.velocity:velocity</include>
-        <include>net.sf.josql:josql</include>
-        <include>org.jasypt:jasypt</include>
-      </includes>
-    </dependencySet>
-    <dependencySet>
-      <outputDirectory>/lib/web</outputDirectory>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-      <includes>
-        <include>org.springframework:spring-web</include>
-        <include>org.springframework:spring-webmvc</include>
-        <include>org.eclipse.jetty.aggregate:jetty-all-server</include>
-        <include>org.eclipse.jetty:jetty-websocket</include>
-        <include>org.apache.geronimo.specs:geronimo-servlet_2.5_spec</include>
-
-        <!-- JSP support -->
-        <include>org.mortbay.jetty:jsp-2.1-glassfish</include>
-        <include>org.mortbay.jetty:jsp-api-2.1-glassfish</include>
-        <include>org.eclipse.jdt:core</include>
-
-        <!-- JSTL and other web stuff -->
-        <include>opensymphony:sitemesh</include>
-
-        <!-- Atom/RSS support -->
-        <include>rome:rome</include>
-        <include>jdom:jdom</include>
-        <!--  Camel web dependencies -->
-        <include>org.fusesource.commonman:commons-management</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>
-</component>
diff --git a/trunk/assembly/src/main/descriptors/unix-bin.xml b/trunk/assembly/src/main/descriptors/unix-bin.xml
deleted file mode 100644
index 9639a1a..0000000
--- a/trunk/assembly/src/main/descriptors/unix-bin.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<assembly>
-  <id>bin</id>
-  <formats>
-    <format>tar.gz</format>
-  </formats>
-  <fileSets>
-
-    <!-- Copy over everything that needs to get unix line endings -->
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory>/</outputDirectory>
-      <excludes>
-        <exclude>bin/**</exclude>
-        <exclude>conf/*.ts</exclude>
-        <exclude>conf/*.ks</exclude>
-        <exclude>conf/*.cert</exclude>
-      </excludes>
-      <lineEnding>unix</lineEnding>
-    </fileSet>
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>bin/macosx/wrapper.conf</include>
-        <include>bin/linux-*/wrapper.conf</include>
-      </includes>
-      <lineEnding>unix</lineEnding>
-    </fileSet>
-
-    <!-- Copy over the files that should not get the line endings converted but need to be chmod to 755 -->
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory></outputDirectory>
-      <includes>
-        <include>bin/linux-*/wrapper</include>
-        <include>bin/linux-*/libwrapper.so</include>
-        <include>bin/macosx/wrapper</include>
-        <include>bin/macosx/libwrapper.jnilib</include>
-      </includes>
-      <fileMode>0755</fileMode>
-    </fileSet>
-
-    <!-- Copy over the files that need unix line endings and also chmod to 755 -->
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory></outputDirectory>
-      <includes>
-        <include>bin/activemq</include>
-        <include>bin/activemq-admin</include>
-        <include>bin/macosx/activemq</include>
-        <include>bin/linux-*/activemq</include>
-      </includes>
-      <fileMode>0755</fileMode>
-      <lineEnding>unix</lineEnding>
-    </fileSet>
-
-  </fileSets>
-  
-  <componentDescriptors>
-    <componentDescriptor>src/main/descriptors/common-bin.xml</componentDescriptor>
-  </componentDescriptors>
-    
-</assembly>
diff --git a/trunk/assembly/src/main/descriptors/unix-src.xml b/trunk/assembly/src/main/descriptors/unix-src.xml
deleted file mode 100644
index e248440..0000000
--- a/trunk/assembly/src/main/descriptors/unix-src.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<assembly>
-  <id>src</id>
-  <formats>
-    <format>tar.gz</format>
-  </formats>
-  <fileSets>
-    <!-- Binary Files -->
-    <fileSet>
-      <directory>${project.basedir}/..</directory>
-      <outputDirectory>src</outputDirectory>
-      <includes>
-        <include>**/*.jpeg</include>
-        <include>**/*.jpg</include>
-        <include>**/*.gif</include>
-        <include>**/*.png</include>
-        <include>**/*.exe</include>
-        <include>**/*.dll</include>
-        <include>**/*.jar</include>
-        <include>**/*.so</include>
-        <include>**/*.ks</include>
-        <include>**/*.ts</include>
-        <include>**/*.keystore</include>
-        <include>**/*.bin</include>
-        <include>**/*.jnilib</include>
-        <include>**/*.cert</include>
-        <include>assembly/src/release/bin/*/wrapper</include>
-      </includes>
-      <excludes>
-        <exclude>**/eclipse-classes/**</exclude>
-        <exclude>**/target/**</exclude>
-      </excludes>
-    </fileSet>
-
-    <!-- Text Files -->
-    <fileSet>
-      <directory>${project.basedir}/..</directory>
-      <outputDirectory>src</outputDirectory>
-      <includes>
-        <include>**/*</include>
-      </includes>
-      <excludes>
-        <exclude>**/*.jpeg</exclude>
-        <exclude>**/*.jpg</exclude>
-        <exclude>**/*.gif</exclude>
-        <exclude>**/*.png</exclude>
-        <exclude>**/*.exe</exclude>
-        <exclude>**/*.dll</exclude>
-        <exclude>**/*.jar</exclude>
-        <exclude>**/*.so</exclude>
-        <exclude>**/*.ks</exclude>
-        <exclude>**/*.ts</exclude>
-        <exclude>**/*.keystore</exclude>
-        <exclude>**/*.bin</exclude>
-        <exclude>**/*.jnilib</exclude>
-        <exclude>**/*.cert</exclude>
-        <exclude>assembly/src/release/bin/*/wrapper</exclude>
-        <exclude>**/target/**</exclude>
-        <exclude>**/build/**</exclude>
-        <!-- exclude>data/**</exclude>
-        <exclude>*/data/**</exclude -->
-        <exclude>activemq-data/**</exclude>
-        <exclude>*/activemq-data/**</exclude>
-        <exclude>**/eclipse-classes/**</exclude>
-        <exclude>**/.*</exclude>
-        <exclude>**/.*/**</exclude>
-
-        <exclude>**/surefire*</exclude>
-        <exclude>**/svn-commit*</exclude>
-
-        <exclude>**/*.iml</exclude>
-        <exclude>**/*.ipr</exclude>
-        <exclude>**/*.iws</exclude>
-
-        <exclude>**/cobertura.ser</exclude>
-
-      </excludes>
-      <lineEnding>unix</lineEnding>
-    </fileSet>
-  </fileSets>
-</assembly>
diff --git a/trunk/assembly/src/main/descriptors/windows-bin.xml b/trunk/assembly/src/main/descriptors/windows-bin.xml
deleted file mode 100644
index d8331ab..0000000
--- a/trunk/assembly/src/main/descriptors/windows-bin.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<assembly>
-  <id>bin</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <fileSets>
-
-    <!-- Copy over everything that needs to get dos line endings -->
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory>/</outputDirectory>
-      <excludes>
-        <exclude>bin/**</exclude>
-        <exclude>conf/*.ts</exclude>
-        <exclude>conf/*.ks</exclude>
-        <exclude>conf/*.cert</exclude>
-      </excludes>
-      <lineEnding>dos</lineEnding>
-    </fileSet>
-    
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>bin/*.bat</include>
-		 <include>bin/activemq</include>
-		 <include>bin/activemq-admin</include>
-        <include>bin/win32/*.bat</include>
-        <include>bin/win32/*.conf</include>
-      </includes>
-      <lineEnding>dos</lineEnding>
-    </fileSet>
-    
-    <!-- Copy over files that should not get the line endings converted -->
-    <fileSet>
-      <directory>src/release</directory>
-      <outputDirectory></outputDirectory>
-      <includes>
-        <include>bin/win32/*.exe</include>
-        <include>bin/win32/*.dll</include>
-      </includes>
-    </fileSet>
-
-   </fileSets>
-  
-  <componentDescriptors>
-    <componentDescriptor>src/main/descriptors/common-bin.xml</componentDescriptor>
-  </componentDescriptors>
-  
-</assembly>
diff --git a/trunk/assembly/src/main/descriptors/windows-src.xml b/trunk/assembly/src/main/descriptors/windows-src.xml
deleted file mode 100644
index 0ae8441..0000000
--- a/trunk/assembly/src/main/descriptors/windows-src.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<assembly>
-  <id>src</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <fileSets>
-    <!-- Binary Files -->
-    <fileSet>
-      <directory>${project.basedir}/..</directory>
-      <outputDirectory>src</outputDirectory>
-      <includes>
-        <include>**/*.jpeg</include>
-        <include>**/*.jpg</include>
-        <include>**/*.gif</include>
-        <include>**/*.png</include>
-        <include>**/*.exe</include>
-        <include>**/*.dll</include>
-        <include>**/*.jar</include>
-        <include>**/*.so</include>
-        <include>**/*.ks</include>
-        <include>**/*.ts</include>
-        <include>**/*.keystore</include>
-        <include>**/*.bin</include>
-        <include>**/*.jnilib</include>
-        <include>**/*.cert</include>
-        <include>assembly/src/release/bin/*/wrapper</include>
-      </includes>
-      <excludes>
-        <exclude>**/eclipse-classes/**</exclude>
-        <exclude>**/target/**</exclude>
-      </excludes>
-    </fileSet>
-
-    <!-- Text Files -->
-    <fileSet>
-      <directory>${project.basedir}/..</directory>
-      <outputDirectory>src</outputDirectory>
-      <includes>
-        <include>**/*</include>
-      </includes>
-      <excludes>
-        <exclude>**/*.jpeg</exclude>
-        <exclude>**/*.jpg</exclude>
-        <exclude>**/*.gif</exclude>
-        <exclude>**/*.png</exclude>
-        <exclude>**/*.exe</exclude>
-        <exclude>**/*.dll</exclude>
-        <exclude>**/*.jar</exclude>
-        <exclude>**/*.so</exclude>
-        <exclude>**/*.ks</exclude>
-        <exclude>**/*.ts</exclude>
-        <exclude>**/*.keystore</exclude>
-        <exclude>**/*.bin</exclude>
-        <exclude>**/*.jnilib</exclude>
-        <exclude>**/*.cert</exclude>
-        <exclude>assembly/src/release/bin/*/wrapper</exclude>
-
-        <exclude>**/target/**</exclude>
-        <exclude>**/build/**</exclude>
-        <!-- exclude>data/**</exclude>
-        <exclude>*/data/**</exclude -->
-        <exclude>activemq-data/**</exclude>
-        <exclude>*/activemq-data/**</exclude>
-        <exclude>**/eclipse-classes/**</exclude>
-        <exclude>**/.*</exclude>
-        <exclude>**/.*/**</exclude>
-
-        <exclude>**/surefire*</exclude>
-        <exclude>**/svn-commit*</exclude>
-
-        <exclude>**/*.iml</exclude>
-        <exclude>**/*.ipr</exclude>
-        <exclude>**/*.iws</exclude>
-
-        <exclude>**/cobertura.ser</exclude>
-
-      </excludes>
-      <lineEnding>dos</lineEnding>
-    </fileSet>
-  </fileSets>
-</assembly>
diff --git a/trunk/assembly/src/release/LICENSE b/trunk/assembly/src/release/LICENSE
deleted file mode 100755
index 9be94f5..0000000
--- a/trunk/assembly/src/release/LICENSE
+++ /dev/null
@@ -1,619 +0,0 @@
-
-                                 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-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.
-
-
-====================================================================
-== Licenses for non-apache libraries included in this assembly    ==
-====================================================================
-
-jetty
-jmdns
-mx4j
-spring
-tanuki wrapper
-xmlpull
-xstream
-
-=========================================================================
-== Jetty is licensed under the Apache License Version 2.0              ==
-=========================================================================
-=========================================================================
-== jmdns is licensed under the Apache License Version 2.0              ==
-=========================================================================
-=========================================================================
-== For the mx4j, mx4j-remote, and mx4j-tools library                   ==
-=========================================================================
-
-         The MX4J License, Version 1.0
-
-         Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.
-
-         Redistribution and use in source and binary forms, with or without
-         modification, are permitted provided that the following conditions
-         are met:
-
-         1. Redistributions of source code must retain the above copyright
-            notice, this list of conditions and the following disclaimer.
-
-         2. 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.
-
-         3. The end-user documentation included with the redistribution,
-            if any, must include the following acknowledgment:
-               "This product includes software developed by the
-                MX4J project (http://mx4j.sourceforge.net)."
-            Alternately, this acknowledgment may appear in the software itself,
-            if and wherever such third-party acknowledgments normally appear.
-
-         4. The name "MX4J" must not be used to endorse or promote
-            products derived from this software without prior written
-            permission.
-            For written permission, please contact
-            biorn_steedom [at] users [dot] sourceforge [dot] net
-
-         5. Products derived from this software may not be called "MX4J",
-            nor may "MX4J" appear in their name, without prior written
-            permission of Simone Bordet.
-
-         THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 MX4J 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.
-         ====================================================================
-
-         This software consists of voluntary contributions made by many
-         individuals on behalf of the MX4J project.  For more information on
-         MX4J, please see
-         <a href="http://mx4j.sourceforge.net" target="_top">the MX4J website</a>.
-
-
-=========================================================================
-== Spring is licensed under the Apache License Version 2.0             ==
-=========================================================================
-
-=========================================================================
-== For the Tanuki Software libraries                                   ==
-=========================================================================
-Copyright (c) 1999, 2004 Tanuki Software
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of the Java Service Wrapper 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, sub-license,
-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
-NON-INFRINGEMENT. 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.
-
-
-Portions of the Software have been derived from source code
-developed by Silver Egg Technology under the following license:
-
-Copyright (c) 2001 Silver Egg Technology
-
-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, sub-license, 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.
-
-
-=========================================================================
-== For the xmlpull library                                             ==
-=========================================================================
-
-XMLPULL API IS FREE
--------------------
-
-All of the XMLPULL API source code, compiled code, and documentation
-contained in this distribution *except* for tests (see separate LICENSE_TESTS.txt)
-are in the Public Domain.
-
-XMLPULL API comes with NO WARRANTY or guarantee of fitness for any purpose.
-
-Initial authors:
-
-  Stefan Haustein
-  Aleksander Slominski
-
-2001-12-12
-
-=========================================================================
-== For the xstream library                                             ==
-=========================================================================
-
-(BSD Style License)
-
-Copyright (c) 2003-2004, Joe Walnes
-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 XStream 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 jaxb-api and jaxb-impl (CDDL)                                   ==
-== Source code is at java.net                                          ==
-=========================================================================
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
-Version 1.0
-
-    *
-
-      1. Definitions.
-          o
-
-            1.1. “Contributor” means each individual or entity that creates or contributes to the creation of Modifications.
-          o
-
-            1.2. “Contributor Version” means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-          o
-
-            1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-          o
-
-            1.4. “Executable” means the Covered Software in any form other than Source Code.
-          o
-
-            1.5. “Initial Developer” means the individual or entity that first makes Original Software available under this License.
-          o
-
-            1.6. “Larger Work” means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-          o
-
-            1.7. “License” means this document.
-          o
-
-            1.8. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-          o
-
-            1.9. “Modifications” means the Source Code and Executable form of any of the following:
-                +
-
-                  A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-                +
-
-                  B. Any new file that contains any part of the Original Software or previous Modification; or
-                +
-
-                  C. Any new file that is contributed or otherwise made available under the terms of this License.
-          o
-
-            1.10. “Original Software” means the Source Code and Executable form of computer software code that is originally released under this License.
-          o
-
-            1.11. “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-          o
-
-            1.12. “Source Code” means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-          o
-
-            1.13. “You” (or “Your”) 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 which controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-    *
-
-      2. License Grants.
-          o
-
-            2.1. The Initial Developer Grant.
-
-            Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-                +
-
-                  (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-                +
-
-                  (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-                +
-
-                  (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-                +
-
-                  (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
-          o
-
-            2.2. Contributor Grant.
-
-            Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-                +
-
-                  (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-                +
-
-                  (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-                +
-
-                  (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-                +
-
-                  (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
-    *
-
-      3. Distribution Obligations.
-          o
-
-            3.1. Availability of Source Code.
-
-            Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
-          o
-
-            3.2. Modifications.
-
-            The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-          o
-
-            3.3. Required Notices.
-
-            You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-          o
-
-            3.4. Application of Additional Terms.
-
-            You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients’ rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
-          o
-
-            3.5. Distribution of Executable Versions.
-
-            You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient’s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
-          o
-
-            3.6. Larger Works.
-
-            You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-    *
-
-      4. Versions of the License.
-          o
-
-            4.1. New Versions.
-
-            Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-          o
-
-            4.2. Effect of New Versions.
-
-            You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
-          o
-
-            4.3. Modified Versions.
-
-            When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
-    *
-
-      5. DISCLAIMER OF WARRANTY.
-
-      COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-    *
-
-      6. TERMINATION.
-          o
-
-            6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-          o
-
-            6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as “Participant”) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
-          o
-
-            6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-    *
-
-      7. LIMITATION OF LIABILITY.
-
-      UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY’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.
-    *
-
-      8. U.S. GOVERNMENT END USERS.
-
-      The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-    *
-
-      9. MISCELLANEOUS.
-
-      This License represents the complete agreement concerning 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. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction’s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys’ fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
-    *
-
-      10. RESPONSIBILITY FOR CLAIMS.
-
-      As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
diff --git a/trunk/assembly/src/release/NOTICE b/trunk/assembly/src/release/NOTICE
deleted file mode 100644
index ec429f0..0000000
--- a/trunk/assembly/src/release/NOTICE
+++ /dev/null
@@ -1,85 +0,0 @@
-
-Apache ActiveMQ
-Copyright 2005-2008 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-
-=========================================================================
-==  Spring Notice                                                      ==
-=========================================================================
-
-This product includes software developed by
-the Apache Software Foundation (http://www.apache.org).
-
-This product also includes software developed by
-Clinton Begin (http://www.ibatis.com).
-
-The end-user documentation included with a redistribution, if any,
-must include the following acknowledgement:
-
- "This product includes software developed by the Spring Framework
-  Project (http://www.springframework.org)."
-
-Alternately, this acknowledgement may appear in the software itself,
-if and wherever such third-party acknowledgements normally appear.
-
-The names "Spring" and "Spring Framework" must not be used to
-endorse or promote products derived from this software without
-prior written permission. For written permission, please contact
-rod.johnson@interface21.com or juergen.hoeller@interface21.com.
-
-
-=========================================================================
-==  MX4J Notice                                                        ==
-=========================================================================
-
-This product includes software developed by the MX4J project
-(http://sourceforge.net/projects/mx4j).
-
-==============================================================
- 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.
-
-===============================================================
-==     NOTICE File for JmDNS                                 ==
-===============================================================
-
-Java Multicast Domain Name Server (JmDNS)
-
-This project was originally developed by Arthur van Hoff under the GNU
-Lesser General Public License as jRendevous.  It was moved to Sourceforge
-by Rick Blair and renamed to JmDNS with the Arthur's kind permission.
-
-Currently it has  been re-released under the Apache License, Version 2.0.
-
-Details of the Apache License, Version 2.0 can be found at:
-http://www.apache.org/licenses/
-
-
-For other details please see the README.txt file.
diff --git a/trunk/assembly/src/release/README.txt b/trunk/assembly/src/release/README.txt
deleted file mode 100755
index 5010626..0000000
--- a/trunk/assembly/src/release/README.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-Welcome 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/version-5-getting-started.html
-
-Building
-http://activemq.apache.org/version-5-getting-started.html#GettingStarted-WindowsSourceInstallation
-http://activemq.apache.org/version-5-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 <http://www.wassenaar.org/> 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
-   <http://java.sun.com/javase/technologies/security/>.  ActiveMQ does 
-   not include these libraries itself, but is designed to use them.
-
diff --git a/trunk/assembly/src/release/WebConsole-README.txt b/trunk/assembly/src/release/WebConsole-README.txt
deleted file mode 100644
index d235386..0000000
--- a/trunk/assembly/src/release/WebConsole-README.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Deploying the ActiveMQ-WebConsole
-=================================
-
-In the default configuration ActiveMQ automatically starts the web console in the
-same VM as the broker. The console is accessibly under http://localhost:8161/admin/.
-
-
-However it's also possible to start the web console in a seperate VM and connect it
-to the broker via JMS and JMX. The reasons to do so may include increased reliablity
-of the broker itself (f.e. the embedded web console could use up all the available
-memory) or the monitoring of a master/slave system.
-
-Just deploy the war into your prefered servlet container and add the apache-activemq.jar
-to the classpath of the container (f.e. under Tomcat that'd be common/lib and under
-Jetty the lib-directory). Two options are available for the configuration of the broker
-and jmx uri(s):
-
- * System Properties
-   -----------------
-     Specify the following system properties in your webcontainer:
-         -Dwebconsole.type=properties
-         -Dwebconsole.jms.url=<url of the broker> (f.e. tcp://localhost:61616)
-         -Dwebconsole.jmx.url=<jmx url to the broker> (f.e. service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
- 
- * JNDI
-   ----
-     If your servlet container supports JNDI it's possible to use a JMS-ConnectionFactory
-     configured outside the war:
-	java:comp/env/jms/connectionFactory: javax.jms.ConnectionFactory for the broker
-	java:comp/env/jmx/url: URL of the brokers JMX (Type java.lang.String)       
-	
-	
-	
-Master/Slave monitoring
------------------------
-To configure the web console to monitor a master/slave configuration configure the jms/jmx
-as follows (system properties shown, but this option is also avaiable when using JNDI):
-   -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)
-   -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi
-With this configuration the web console with switch to the slave as the master is no longer
-available and back as soon as the master is back up.
-
diff --git a/trunk/assembly/src/release/bin/activemq b/trunk/assembly/src/release/bin/activemq
deleted file mode 100755
index c159d11..0000000
--- a/trunk/assembly/src/release/bin/activemq
+++ /dev/null
@@ -1,653 +0,0 @@
-#!/bin/sh 
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-#
-# This script controls standalone Apache ActiveMQ service processes.
-# To ensure compatibility to macosx and cygwin we do not utilize 
-# lsb standard infrastructure for controlling daemons like 
-# "start-stop-daemon".
-#
-# See also http://activemq.apache.org/activemq-command-line-tools-reference.html
-# for additional commandline arguments
-#
-# Authors:
-# Marc Schoechlin <ms@256bit.org>
-
-# ------------------------------------------------------------------------
-# CONFIGURATION
-ACTIVEMQ_CONFIGS="/etc/default/activemq $HOME/.activemqrc"
-
-# Backup invocation parameters
-COMMANDLINE_ARGS="$@"
-
-# For using instances
-if ( basename $0 | grep "activemq-instance-" > /dev/null);then
-   INST="$(basename $0|sed 's/^activemq-instance-//;s/\.sh$//')"
-   ACTIVEMQ_CONFIGS="/etc/default/activemq-instance-${INST} $HOME/.activemqrc-instance-${INST}"
-   echo "INFO: Using alternative activemq configuration files: $ACCTIVEMQ_CONFIGS"
-fi
-
-## START:DEFAULTCONFIG
-# ------------------------------------------------------------------------
-# Configuration file for running Apache Active MQ as standalone provider
-# 
-# This file overwrites the predefined settings of the sysv init-script
-#
-# Active MQ installation dir
-if [ -z "$ACTIVEMQ_HOME" ] ; then
-  # try to find ACTIVEMQ
-  if [ -d /opt/activemq ] ; then
-    ACTIVEMQ_HOME=/opt/activemq
-  fi
-
-  if [ -d "${HOME}/opt/activemq" ] ; then
-    ACTIVEMQ_HOME="${HOME}/opt/activemq"
-  fi
-
-  ## resolve links - $0 may be a link to activemq's home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ACTIVEMQ_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  ACTIVEMQ_HOME=`cd "$ACTIVEMQ_HOME" && pwd`
-fi
-
-if [ -z "$ACTIVEMQ_BASE" ] ; then
-  ACTIVEMQ_BASE="$ACTIVEMQ_HOME"
-fi
-
-# Active MQ configuration directory
-ACTIVEMQ_CONFIG_DIR="$ACTIVEMQ_BASE/conf"
-
-# Active MQ configuration directory
-if [ -z "$ACTIVEMQ_DATA_DIR" ]; then
-  ACTIVEMQ_DATA_DIR="$ACTIVEMQ_BASE/data"
-fi
-
-if [ ! -d "$ACTIVEMQ_DATA_DIR" ]; then
-    mkdir $ACTIVEMQ_DATA_DIR
-fi
-
-# Location of the pidfile
-if [ -z "$ACTIVEMQ_PIDFILE" ]; then
-  ACTIVEMQ_PIDFILE="$ACTIVEMQ_DATA_DIR/activemq.pid"
-fi
-
-# Location of the java installation
-# Specify the location of your java installation using JAVA_HOME, or specify the 
-# path to the "java" binary using JAVACMD
-# (set JAVACMD to "auto" for automatic detection)
-#JAVA_HOME=""
-JAVACMD="auto"
-
-# Configure a user with non root priviledges, if no user is specified do not change user
-ACTIVEMQ_USER=""
-
-# Set jvm memory configuration
-ACTIVEMQ_OPTS_MEMORY="-Xms256M -Xmx256M"
-
-if [ -z "$ACTIVEMQ_OPTS" ] ; then
-    ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties"
-fi
-
-# Uncomment to enable audit logging
-#ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS -Dorg.apache.activemq.audit=true"
-
-# Set jvm jmx configuration
-# This enables jmx access over a configured jmx-tcp-port.
-# You have to configure the first four settings if you run a ibm jvm, caused by the
-# fact that IBM's jvm does not support VirtualMachine.attach(PID).
-# JMX access is needed for quering a running activemq instance to gain data or to
-# trigger management operations.
-# 
-# Example for ${ACTIVEMQ_CONFIG_DIR}/jmx.access:
-# ---
-# # The "monitorRole" role has readonly access.
-# # The "controlRole" role has readwrite access.
-# monitorRole readonly
-# controlRole readwrite
-# ---
-#
-# Example for ${ACTIVEMQ_CONFIG_DIR}/jmx.password:
-# ---
-# # The "monitorRole" role has password "abc123".
-# # # The "controlRole" role has password "abcd1234".
-# monitorRole abc123
-# controlRole abcd1234
-# ---
-#
-# ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=11099 "
-# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONFIG_DIR}/jmx.password"
-# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONFIG_DIR}/jmx.access"
-# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false"
-ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote"
-
-# Set jvm jmx configuration for controlling the broker process
-# You only have to configure the first four settings if you run a ibm jvm, caused by the
-# fact that IBM's jvm does not support VirtualMachine.attach(PID)
-# (see also com.sun.management.jmxremote.port, .jmx.password.file and .jmx.access.file )
-#ACTIVEMQ_SUNJMX_CONTROL="--jmxurl service:jmx:rmi:///jndi/rmi://127.0.0.1:11099/jmxrmi --jmxuser controlRole --jmxpassword abcd1234"
-ACTIVEMQ_SUNJMX_CONTROL=""
-
-# Specify the queue manager URL for using "browse" option of sysv initscript
-ACTIVEMQ_QUEUEMANAGERURL="--amqurl tcp://localhost:61616"
-
-# Set additional JSE arguments
-ACTIVEMQ_SSL_OPTS="$SSL_OPTS"
-
-# Uncomment to enable YourKit profiling
-#ACTIVEMQ_DEBUG_OPTS="-agentlib:yjpagent"
-
-# Uncomment to enable remote debugging
-#ACTIVEMQ_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
-
-# ActiveMQ tries to shutdown the broker by jmx, 
-# after a specified number of seconds send SIGKILL
-ACTIVEMQ_KILL_MAXSECONDS=30
-
-## END:DEFAULTCONFIG
-
-# ------------------------------------------------------------------------
-# LOAD CONFIGURATION
-
-# load activemq configuration
-CONFIG_LOAD="no"
-for ACTIVEMQ_CONFIG in $ACTIVEMQ_CONFIGS;do
-   if [ -f "$ACTIVEMQ_CONFIG" ] ; then
-     ( . $ACTIVEMQ_CONFIG >/dev/null 2>&1 )
-     if [ "$?" != "0" ];then
-      echo "ERROR: There are syntax errors in '$ACTIVEMQ_CONFIG'"
-      exit 1
-     else
-       echo "INFO: Loading '$ACTIVEMQ_CONFIG'"
-       . $ACTIVEMQ_CONFIG
-      CONFIG_LOAD="yes"
-     fi
-   fi
-done
-
-# inform user that default configuration is loaded, no suitable configfile found
-if [ "$CONFIG_LOAD" != "yes" ];then
-   if [ "$1" != "setup" ];then
-      echo "INFO: Using default configuration";
-      echo "(you can configure options in one of these file: $ACTIVEMQ_CONFIGS)"
-      echo
-      echo "INFO: Invoke the following command to create a configuration file"
-      CONFIGS=`echo $ACTIVEMQ_CONFIGS|sed 's/[ ][ ]*/ | /'`
-      echo "$0 setup [ $CONFIGS ]"
-      echo
-   fi
-fi
-
-# create configuration if requested
-if [ "$1" = "setup" ];then
-   if [ -z "$2" ];then
-      echo "ERROR: Specify configuration file"
-      exit 1
-   fi
-   echo "INFO: Creating configuration file: $2"
-   (
-   P_STATE="0"
-   while read LINE ;do
-      if (echo "$LINE" | grep "START:DEFAULTCONFIG" >/dev/null );then
-         P_STATE="1"
-         continue;
-      fi
-      if (echo "$LINE" | grep "END:DEFAULTCONFIG" >/dev/null);then
-         P_STATE="0"
-         break;
-      fi
-      if [ "$P_STATE" -eq "1" ];then
-         echo $LINE
-      fi
-   done < $0
-   ) > $2
-   echo "INFO: It's recommend to limit access to '$2' to the priviledged user"
-   echo "INFO: (recommended: chown `whoami`:nogroup '$2'; chmod 600 '$2')"
-   exit $?
-fi
-
-# ------------------------------------------------------------------------
-# OS SPECIFIC SUPPORT
-
-OSTYPE="unknown"
-
-case "`uname`" in
-  CYGWIN*) OSTYPE="cygwin" ;;
-  Darwin*) 
-           OSTYPE="darwin"
-           if [-z "$JAVA_HOME"] && [ "$JAVACMD" = "auto" ];then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if [ "$OSTYPE" = "cygwin" ]; then
-  [ -n "$ACTIVEMQ_HOME" ] &&
-    ACTIVEMQ_HOME="`cygpath --unix "$ACTIVEMQ_HOME"`"
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME="`cygpath --unix "$JAVA_HOME"`"
-  [ -n "$CLASSPATH" ] &&
-    CLASSPATH="`cygpath --path --unix "$CLASSPATH"`"
-fi
-
-# Detect the location of the java binary
-if [ -z "$JAVACMD" ] || [ "$JAVACMD" = "auto" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  fi
-fi
-
-# Hm, we still do not know the location of the java binary
-if [ ! -x "$JAVACMD" ] ; then
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-fi
-# Stop here if no java installation is defined/found
-if [ ! -x "$JAVACMD" ] ; then
-  echo "ERROR: Configuration variable JAVA_HOME or JAVACMD is not defined correctly."
-  echo "       (JAVA_HOME='$JAVAHOME', JAVACMD='$JAVACMD')"
-  exit 1
-fi
-
-echo "INFO: Using java '$JAVACMD'"
-
-if [ -z "$ACTIVEMQ_BASE" ] ; then
-  ACTIVEMQ_BASE="$ACTIVEMQ_HOME"
-fi
-
-# For Cygwin, switch paths to Windows format before running java if [ "$OSTYPE" = "cygwin" ]; then
-if [ "$OSTYPE" = "cygwin" ];then
-  ACTIVEMQ_HOME=`cygpath --windows "$ACTIVEMQ_HOME"`
-  ACTIVEMQ_BASE=`cygpath --windows "$ACTIVEMQ_BASE"`
-  ACTIVEMQ_CLASSPATH=`cygpath --path --windows "$ACTIVEMQ_CLASSPATH"`
-  JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
-  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-  CYGHOME=`cygpath --windows "$HOME"`
-  if [ -n "$CYGHOME" ]; then
-      ACTIVEMQ_CYGWIN="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-fi
-
-# Set default classpath
-# Add instance conf dir before AMQ install conf dir to pick up instance-specific classpath entries first
-ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONFIG_DIR};${ACTIVEMQ_CLASSPATH}"
-if [ "${ACTIVEMQ_BASE}" != "${ACTIVEMQ_HOME}" ]; then
-    ACTIVEMQ_CLASSPATH="${ACTIVEMQ_BASE}/conf;${ACTIVEMQ_CLASSPATH}"
-fi
-
-
-
-# ------------------------------------------------------------------------
-# HELPER FUNCTIONS
-
-# Start the ActiveMQ JAR
-#
-#
-# @ARG1 : the name of the PID-file
-#         If specified, this function starts the java process in background as a daemon
-#         and stores the pid of the created process in the file.
-#         Output on stdout/stderr will be supressed if this parameter is specified
-# @RET  : If unless 0 something went wrong
-#
-# Note: This function uses a lot of globally defined variables
-# - if $ACTIVEMQ_USER is set, the function tries starts the java process whith the specified
-#   user
-invokeJar(){
-   PIDFILE="$1"
-   RET="1"
-   CUSER="$(whoami 2>/dev/null)"
-
-   # Solaris fix
-   if [ ! $? -eq 0 ]; then
-      CUSER="$(/usr/ucb/whoami)"
-   fi
-
-   if [ ! -f "${ACTIVEMQ_HOME}/bin/run.jar" ];then
-    echo "ERROR: '${ACTIVEMQ_HOME}/bin/run.jar' does not exist"
-    exit 1
-   fi
-  
-   if ( [ -z "$ACTIVEMQ_USER" ] || [ "$ACTIVEMQ_USER" = "$CUSER" ] );then
-      DOIT_PREFIX="sh -c "
-      DOIT_POSTFIX=";"
-   elif [ "$(id -u)" = "0" ];then
-      DOIT_PREFIX="su -c "
-      DOIT_POSTFIX=" - $ACTIVEMQ_USER"
-      echo "INFO: changing to user '$ACTIVEMQ_USER' to invoke java"
-   fi
-   # Execute java binary
-   if [ -n "$PIDFILE" ] && [ "$PIDFILE" != "stop" ];then
-      $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
-              -Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
-              -Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
-              -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
-              $ACTIVEMQ_CYGWIN \
-              -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS >/dev/null 2>&1 & 
-              RET=\"\$?\"; APID=\"\$!\";
-              echo \$APID > $PIDFILE;
-              echo \"INFO: pidfile created : '$PIDFILE' (pid '\$APID')\";exit \$RET" $DOIT_POSTFIX
-      RET="$?"
-   elif [ -n "$PIDFILE" ] && [ "$PIDFILE" = "stop" ];then
-          PID=`cat $ACTIVEMQ_PIDFILE`
-          $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
-              -Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
-              -Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
-              -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
-              $ACTIVEMQ_CYGWIN \
-              -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS --pid $PID &
-              RET=\"\$?\"; APID=\"\$!\"; 
-              echo \$APID > $ACTIVEMQ_DATA_DIR/stop.pid; exit \$RET" $DOIT_POSTFIX
-      RET="$?"
-   else
-      $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
-              -Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
-              -Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
-              -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
-              $ACTIVEMQ_CYGWIN \
-              -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS" $DOIT_POSTFIX
-      RET="$?"
-   fi
-   return $RET
-}
-
-# Check if ActiveMQ is running
-#
-# @RET  : 0 => the activemq process is running
-#         1 => process id in $ACTIVEMQ_PIDFILE does not exist anymore
-#         2 => something is wrong with the pid file
-#
-# Note: This function uses globally defined variables
-# - $ACTIVEMQ_PIDFILE : the name of the pid file
-
-
-checkRunning(){
-    if [ -f "$ACTIVEMQ_PIDFILE" ]; then
-       if  [ -z "$(cat $ACTIVEMQ_PIDFILE)" ];then
-        echo "ERROR: Pidfile '$ACTIVEMQ_PIDFILE' exists but contains no pid"
-        return 2
-       fi
-       PID=`cat $ACTIVEMQ_PIDFILE`
-       RET=`ps -p $PID|grep java`
-       if [ -n "$RET" ];then
-         return 0;
-       else
-         return 1;
-       fi
-    else
-         return 1;
-    fi
-}
-
-checkStopRunning(){
-    PID=$ACTIVEMQ_DATA_DIR/stop.pid
-    if [ -f "$PID" ]; then
-       if  [ -z "$(cat $PID)" ];then
-        echo "ERROR: Pidfile '$PID' exists but contains no pid"
-        return 2
-       fi
-       RET=`ps -p $(cat $PID)|grep java`
-       if [ -n "$RET" ];then
-         return 0;
-       else
-         return 1;
-       fi
-    else
-         return 1;
-    fi
-}
-
-# Check if ActiveMQ is running
-#
-# @RET  : 0 => the activemq process is running
-#         1 => the activemq process is not running
-#
-# Note: This function uses globally defined variables
-# - $ACTIVEMQ_PIDFILE : the name of the pid file
-
-
-invoke_status(){
-    if ( checkRunning );then
-         PID=`cat $ACTIVEMQ_PIDFILE`
-         echo "ActiveMQ is running (pid '$PID')"
-         exit 0
-    fi
-    echo "ActiveMQ not running"
-    exit 1
-}
-
-# Start ActiveMQ if not already running
-#
-# @RET  : 0 => is now started, is already started
-#         !0 => something went wrong
-#
-# Note: This function uses globally defined variables
-# - $ACTIVEMQ_PIDFILE      : the name of the pid file
-# - $ACTIVEMQ_OPTS         : Additional options 
-# - $ACTIVEMQ_SUNJMX_START : options for JMX settings
-# - $ACTIVEMQ_SSL_OPTS     : options for SSL encryption
-
-invoke_start(){
-    if ( checkRunning );then
-      PID=`cat $ACTIVEMQ_PIDFILE`
-      echo "INFO: Process with pid '$PID' is already running"
-      exit 0
-    fi
-
-    ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $ACTIVEMQ_SUNJMX_START $ACTIVEMQ_SSL_OPTS"
-
-    echo "INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details"
-    invokeJar $ACTIVEMQ_PIDFILE
-    exit "$?" 
-}
-
-# Start ActiveMQ in foreground (for debugging)
-#
-# @RET  : 0 => is now started, is already started
-#         !0 => something went wrong
-#
-# Note: This function uses globally defined variables
-# - $ACTIVEMQ_PIDFILE      : the name of the pid file
-# - $ACTIVEMQ_OPTS         : Additional options 
-# - $ACTIVEMQ_SUNJMX_START : options for JMX settings
-# - $ACTIVEMQ_SSL_OPTS     : options for SSL encryption
-
-invoke_console(){
-    if ( checkRunning );then
-      echo "ERROR: ActiveMQ is already running"
-      exit 1
-    fi
-
-    ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $ACTIVEMQ_SUNJMX_START $ACTIVEMQ_SSL_OPTS"
-
-    COMMANDLINE_ARGS="start $(echo $COMMANDLINE_ARGS|sed 's,^console,,')"
-    echo "INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)"
-    invokeJar
-    exit "$?" 
-}
-
-# Stop ActiveMQ
-#
-# @RET  : 0 => stop was successful
-#         !0 => something went wrong
-#
-# Note: This function uses globally defined variables
-# - $ACTIVEMQ_PIDFILE         : the name of the pid file
-# - $ACTIVEMQ_KILL_MAXSECONDS : the number of seconds to wait for termination of broker after sending 
-#                              shutdown signal by jmx interface
-
-invoke_stop(){
-    RET="1"
-    if ( checkRunning );then
-       ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $ACTIVEMQ_SSL_OPTS"
-       COMMANDLINE_ARGS="$COMMANDLINE_ARGS $ACTIVEMQ_SUNJMX_CONTROL"
-       invokeJar "stop"
-       RET="$?"
-       PID=`cat $ACTIVEMQ_PIDFILE`
-       echo "INFO: Waiting at least $ACTIVEMQ_KILL_MAXSECONDS seconds for regular process termination of pid '$PID' : "
-       FOUND="0"
-       i=1
-       while [ $i != $ACTIVEMQ_KILL_MAXSECONDS ]; do
-        
-         if [ ! checkStopRunning ];then
-            if [ ! checkRunning ]; then
-               echo " FINISHED"
-               FOUND="1"              
-            fi
-            break
-         fi
-        
-         if (checkRunning);then
-            sleep 1
-            printf  "."
-         else
-            echo " FINISHED"
-            FOUND="1"
-            break
-         fi
-         i=`expr $i + 1`
-       done
-       if [ "$FOUND" -ne "1" ];then
-         echo
-         echo "INFO: Regular shutdown not successful,  sending SIGKILL to process with pid '$PID'"
-         kill -KILL $PID
-         RET="1"
-       fi
-    elif [ -f "$ACTIVEMQ_PIDFILE" ];then
-       echo "ERROR: No or outdated process id in '$ACTIVEMQ_PIDFILE'"
-       echo
-       echo "INFO: Removing $ACTIVEMQ_PIDFILE"
-    else
-       echo "ActiveMQ not running"
-       exit 0
-    fi
-    rm -f $ACTIVEMQ_PIDFILE >/dev/null 2>&1
-    rm -f $ACTIVEMQ_DATA_DIR/stop.pid >/dev/null 2>&1
-    exit $RET
-}
-
-# Invoke a task on a running ActiveMQ instance
-#
-# @RET  : 0 => successful
-#         !0 => something went wrong
-#
-# Note: This function uses globally defined variables
-# - $ACTIVEMQ_QUEUEMANAGERURL : The url of the queuemanager
-# - $ACTIVEMQ_OPTS            : Additional options
-# - $ACTIVEMQ_SUNJMX_START    : options for JMX settings
-# - $ACTIVEMQ_SSL_OPTS        : options for SSL encryption
-invoke_task(){
-    # call task in java binary
-    if ( checkRunning );then
-      if [ "$1" = "browse" ] && [ -n "$ACTIVEMQ_QUEUEMANAGERURL" ];then
-         ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $ACTIVEMQ_SSL_OPTS"
-         COMMANDLINE_ARGS="$1 $ACTIVEMQ_QUEUEMANAGERURL $(echo $COMMANDLINE_ARGS|sed 's,^browse,,')"
-      elif [ "$1" = "query" ]  && [ -n "$ACTIVEMQ_QUEUEMANAGERURL" ];then
-         ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $ACTIVEMQ_SSL_OPTS"
-         COMMANDLINE_ARGS="$1 $ACTIVEMQ_SUNJMX_CONTROL $(echo $COMMANDLINE_ARGS|sed 's,^query,,')"
-      else 
-         ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $ACTIVEMQ_SSL_OPTS"
-         COMMANDLINE_ARGS="$COMMANDLINE_ARGS $ACTIVEMQ_SUNJMX_CONTROL"
-      fi
-      invokeJar
-      exit $?
-    else
-      invokeJar
-      exit 1
-    fi
-}
-
-show_help() {
-  invokeJar
-  RET="$?"
-  cat << EOF
-Tasks provided by the sysv init script:
-    restart         - stop running instance (if there is one), start new instance
-    console         - start broker in foreground, useful for debugging purposes
-    status          - check if activemq process is running
-    setup           - create the specified configuration file for this init script
-                      (see next usage section)
-
-Configuration of this script:
-    The configuration of this script can be placed on /etc/default/activemq or $HOME/.activemqrc.
-    To use additional configurations for running multiple instances on the same operating system
-    rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>.
-    This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and
-    \$HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in /etc have higher precedence. 
-EOF
-  exit $RET
-}
-
-# ------------------------------------------------------------------------
-# MAIN
-
-# show help
-if [ -z "$1" ];then
- show_help
-fi
-
-case "$1" in
-  status)    
-      invoke_status
-    ;;
-  restart)
-    if ( checkRunning );then
-      $0 stop
-    fi
-    $0 status
-    $0 start
-    $0 status
-    ;;
-  start)    
-    invoke_start
-    ;;
-  console)
-    invoke_console
-    ;;
-  stop)    
-    invoke_stop
-    ;;
-  *)
-    invoke_task
-esac
diff --git a/trunk/assembly/src/release/bin/activemq-admin b/trunk/assembly/src/release/bin/activemq-admin
deleted file mode 100644
index 4e60ff8..0000000
--- a/trunk/assembly/src/release/bin/activemq-admin
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/bin/sh
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-# load system-wide activemq configuration
-if [ -f "/etc/activemq.conf" ] ; then
-  . /etc/activemq.conf
-fi
-
-# provide default values for people who don't use RPMs
-if [ -z "$usejikes" ] ; then
-  usejikes=false;
-fi
-
-# load user activemq configuration
-if [ -f "$HOME/.activemqrc" ] ; then
-  . "$HOME/.activemqrc"
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ACTIVEMQ_HOME" ] ; then
-  # try to find ACTIVEMQ
-  if [ -d /opt/activemq ] ; then
-    ACTIVEMQ_HOME=/opt/activemq
-  fi
-
-  if [ -d "${HOME}/opt/activemq" ] ; then
-    ACTIVEMQ_HOME="${HOME}/opt/activemq"
-  fi
-
-  ## resolve links - $0 may be a link to activemq's home
-  PRG="$0"
-  progname=`basename "$0"`
-  saveddir=`pwd`
-
-  # need this for relative symlinks
-  dirname_prg=`dirname "$PRG"`
-  cd "$dirname_prg"
-
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ACTIVEMQ_HOME=`dirname "$PRG"`/..
-
-  cd "$saveddir"
-
-  # make it fully qualified
-  ACTIVEMQ_HOME=`cd "$ACTIVEMQ_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ACTIVEMQ_HOME" ] &&
-    ACTIVEMQ_HOME=`cygpath --unix "$ACTIVEMQ_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-  [ -n "$CLASSPATH" ] &&
-    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-if [ -z "$ACTIVEMQ_BASE" ] ; then
-  ACTIVEMQ_BASE="$ACTIVEMQ_HOME"
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-  ACTIVEMQ_HOME=`cygpath --windows "$ACTIVEMQ_HOME"`
-  ACTIVEMQ_BASE=`cygpath --windows "$ACTIVEMQ_BASE"`
-  ACTIVEMQ_CLASSPATH=`cygpath --path --windows "$ACTIVEMQ_CLASSPATH"`
-  JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
-  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-  CYGHOME=`cygpath --windows "$HOME"`
-fi
-
-# Set default classpath
-ACTIVEMQ_CLASSPATH="${ACTIVEMQ_BASE}/conf;"$ACTIVEMQ_CLASSPATH
-
-if [ $1 = "start" ] ; then
-    if [ -z "$ACTIVEMQ_OPTS" ] ; then
-        ACTIVEMQ_OPTS="-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties"
-    fi
-
-    if [ -z "$SUNJMX" ] ; then
-        #SUNJMX="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
-        SUNJMX="-Dcom.sun.management.jmxremote"
-    fi
-
-    ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $SUNJMX $SSL_OPTS"
-fi
-
-# Uncomment to enable YourKit profiling
-#ACTIVEMQ_DEBUG_OPTS="-agentlib:yjpagent"
-
-# Uncomment to enable remote debugging
-#ACTIVEMQ_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
-
-if [ -n "$CYGHOME" ]; then
-    exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
-else
-    exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
-fi
diff --git a/trunk/assembly/src/release/bin/activemq-admin.bat b/trunk/assembly/src/release/bin/activemq-admin.bat
deleted file mode 100644
index 9c1c6e3..0000000
--- a/trunk/assembly/src/release/bin/activemq-admin.bat
+++ /dev/null
@@ -1,106 +0,0 @@
-@echo off
-
-REM ------------------------------------------------------------------------
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements.  See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License.  You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM ------------------------------------------------------------------------
-
-if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
-
-if "%OS%"=="Windows_NT" @setlocal
-
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ACTIVEMQ_HOME=%~dp0..
-
-if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
-set DEFAULT_ACTIVEMQ_HOME=
-
-:doneStart
-rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
-
-rem check for activemq in Program Files on system drive
-if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
-set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
-goto checkJava
-
-:checkSystemDrive
-rem check for activemq in root directory of system drive
-if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
-set ACTIVEMQ_HOME=%SystemDrive%\activemq
-goto checkJava
-
-:checkCDrive
-rem check for activemq in C:\activemq for Win9X users
-if not exist C:\activemq\README.txt goto noAntHome
-set ACTIVEMQ_HOME=C:\activemq
-goto checkJava
-
-:noAntHome
-echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto runAnt
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe
-echo.
-echo Warning: JAVA_HOME environment variable is not set.
-echo.
-
-:runAnt
-
-if "%ACTIVEMQ_BASE%" == "" set ACTIVEMQ_BASE=%ACTIVEMQ_HOME%
-
-if /i not "%1" == "start" goto debugOpts
-
-
-if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties
-
-if "%SUNJMX%" == "" set SUNJMX=-Dcom.sun.management.jmxremote
-REM set SUNJMX=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-
-
-:debugOpts
-REM Uncomment to enable YourKit profiling
-REM SET ACTIVEMQ_DEBUG_OPTS="-agentlib:yjpagent"
-
-REM Uncomment to enable remote debugging
-REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
-
-REM Setup ActiveMQ Classpath. Default is the conf directory.
-set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_CLASSPATH%
-
-"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %*
-
-goto end
-
-
-:end
-set _JAVACMD=
-
-if "%OS%"=="Windows_NT" @endlocal
-
-:mainEnd
-if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
-
-
diff --git a/trunk/assembly/src/release/bin/activemq.bat b/trunk/assembly/src/release/bin/activemq.bat
deleted file mode 100755
index 6097e22..0000000
--- a/trunk/assembly/src/release/bin/activemq.bat
+++ /dev/null
@@ -1,101 +0,0 @@
-@echo off
-
-REM ------------------------------------------------------------------------
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements.  See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License.  You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM ------------------------------------------------------------------------
-
-if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
-
-if "%OS%"=="Windows_NT" @setlocal
-
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ACTIVEMQ_HOME=%~dp0..
-
-if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
-set DEFAULT_ACTIVEMQ_HOME=
-
-:doneStart
-rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
-
-rem check for activemq in Program Files on system drive
-if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
-set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
-goto checkJava
-
-:checkSystemDrive
-rem check for activemq in root directory of system drive
-if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
-set ACTIVEMQ_HOME=%SystemDrive%\activemq
-goto checkJava
-
-:checkCDrive
-rem check for activemq in C:\activemq for Win9X users
-if not exist C:\activemq\README.txt goto noAntHome
-set ACTIVEMQ_HOME=C:\activemq
-goto checkJava
-
-:noAntHome
-echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto runAnt
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe
-echo.
-echo Warning: JAVA_HOME environment variable is not set.
-echo.
-
-:runAnt
-
-if "%ACTIVEMQ_BASE%" == "" set ACTIVEMQ_BASE=%ACTIVEMQ_HOME%
-
-if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties
-
-if "%SUNJMX%" == "" set SUNJMX=-Dcom.sun.management.jmxremote
-REM set SUNJMX=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-
-REM Uncomment to enable YourKit profiling
-REM SET ACTIVEMQ_DEBUG_OPTS="-agentlib:yjpagent"
-
-REM Uncomment to enable remote debugging
-REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
-
-REM Setup ActiveMQ Classpath. 
-REM Add instance conf dir before AMQ install conf dir to pick up instance-specific classpath entries first
-set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_HOME%/conf;%ACTIVEMQ_CLASSPATH%
-
-"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" start %*
-
-goto end
-
-
-:end
-set _JAVACMD=
-if "%OS%"=="Windows_NT" @endlocal
-
-:mainEnd
-if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
-
-
diff --git a/trunk/assembly/src/release/bin/linux-x86-32/activemq b/trunk/assembly/src/release/bin/linux-x86-32/activemq
deleted file mode 100644
index f661012..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-32/activemq
+++ /dev/null
@@ -1,543 +0,0 @@
-#! /bin/sh
-
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-# Application
-APP_NAME="ActiveMQ"
-APP_LONG_NAME="ActiveMQ Broker"
-ACTIVEMQ_HOME="../.."
-
-# Wrapper
-WRAPPER_CMD="wrapper"
-WRAPPER_CONF="wrapper.conf"
-
-# Priority at which to run the wrapper.  See "man nice" for valid priorities.
-#  nice is only used if a priority is specified.
-PRIORITY=
-
-# Location of the pid file.
-PIDDIR="."
-
-# If uncommented, causes the Wrapper to be shutdown using an anchor file.
-#  When launched with the 'start' command, it will also ignore all INT and
-#  TERM signals.
-#IGNORE_SIGNALS=true
-
-# If specified, the Wrapper will be run as the specified user.
-# IMPORTANT - Make sure that the user has the required privileges to write
-#  the PID file and wrapper.log files.  Failure to be able to write the log
-#  file will cause the Wrapper to exit without any way to write out an error
-#  message.
-# NOTE - This will set the user which is used to run the Wrapper as well as
-#  the JVM and is not useful in situations where a privileged resource or
-#  port needs to be allocated prior to the user being changed.
-#RUN_AS_USER=
-
-# The following two lines are used by the chkconfig command. Change as is
-#  appropriate for your application.  They should remain commented.
-# chkconfig: 2345 20 80
-# description: @app.long.name@
-
-# Do not modify anything beyond this point
-#-----------------------------------------------------------------------------
-
-# load system-wide activemq configuration
-if [ -f "/etc/sysconfig/activemq" ] ; then
-  . /etc/sysconfig/activemq
-fi
-
-# Get the fully qualified path to the script
-case $0 in
-    /*)
-        SCRIPT="$0"
-        ;;
-    *)
-        PWD=`pwd`
-        SCRIPT="$PWD/$0"
-        ;;
-esac
-
-# Resolve the true real path without any sym links.
-CHANGED=true
-while [ "X$CHANGED" != "X" ]
-do
-    # Change spaces to ":" so the tokens can be parsed.
-    SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
-    # Get the real path to this script, resolving any symbolic links
-    TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
-    REALPATH=
-    for C in $TOKENS; do
-        REALPATH="$REALPATH/$C"
-        while [ -h "$REALPATH" ] ; do
-            LS="`ls -ld "$REALPATH"`"
-            LINK="`expr "$LS" : '.*-> \(.*\)$'`"
-            if expr "$LINK" : '/.*' > /dev/null; then
-                REALPATH="$LINK"
-            else
-                REALPATH="`dirname "$REALPATH"`""/$LINK"
-            fi
-        done
-    done
-    # Change ":" chars back to spaces.
-    REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`
-
-    if [ "$REALPATH" = "$SCRIPT" ]
-    then
-        CHANGED=""
-    else
-        SCRIPT="$REALPATH"
-    fi
-done
-
-# Change the current directory to the location of the script
-cd "`dirname "$REALPATH"`"
-REALDIR=`pwd`
-
-# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if
-#  the working directory is later changed.
-FIRST_CHAR=`echo $PIDDIR | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    PIDDIR=$REALDIR/$PIDDIR
-fi
-# Same test for WRAPPER_CMD
-FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    WRAPPER_CMD=$REALDIR/$WRAPPER_CMD
-fi
-# Same test for WRAPPER_CONF
-FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    WRAPPER_CONF=$REALDIR/$WRAPPER_CONF
-fi
-
-# Process ID
-ANCHORFILE="$PIDDIR/$APP_NAME.anchor"
-PIDFILE="$PIDDIR/$APP_NAME.pid"
-LOCKDIR="/var/lock/subsys"
-LOCKFILE="$LOCKDIR/$APP_NAME"
-pid=""
-
-# Resolve the location of the 'ps' command
-PSEXE="/usr/bin/ps"
-if [ ! -x $PSEXE ]
-then
-    PSEXE="/bin/ps"
-    if [ ! -x $PSEXE ]
-    then
-        echo "Unable to locate 'ps'."
-        echo "Please report this message along with the location of the command on your system."
-        exit 1
-    fi
-fi
-
-# Resolve the os
-DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]`
-case "$DIST_OS" in
-    'sunos')
-        DIST_OS="solaris"
-        ;;
-    'hp-ux' | 'hp-ux64')
-        DIST_OS="hpux"
-        ;;
-    'darwin')
-        DIST_OS="macosx"
-        ;;
-    'unix_sv')
-        DIST_OS="unixware"
-        ;;
-esac
-
-# Resolve the architecture
-DIST_ARCH=`uname -p 2>/dev/null | tr [:upper:] [:lower:] | tr -d [:blank:]`
-if [ "$DIST_ARCH" = "unknown" ] || [ "$DIST_ARCH" = "" ]
-then
-    DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]`
-fi
-case "$DIST_ARCH" in
-    'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64')
-        DIST_ARCH="x86"
-        ;;
-    'ip27')
-        DIST_ARCH="mips"
-        ;;
-    'power' | 'powerpc' | 'power_pc' | 'ppc64')
-        DIST_ARCH="ppc"
-        ;;
-    'pa_risc' | 'pa-risc')
-        DIST_ARCH="parisc"
-        ;;
-    'sun4u' | 'sparcv9')
-        DIST_ARCH="sparc"
-        ;;
-    '9000/800')
-        DIST_ARCH="parisc"
-        ;;
-esac
-
-# Decide on the wrapper binary to use.
-# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit
-#  platforms, if the 64-bit binary exists then the distribution most
-#  likely wants to use long names.  Otherwise, look for the default.
-# For macosx, we also want to look for universal binaries.
-WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-if [ -x $WRAPPER_TEST_CMD ]
-then
-    WRAPPER_CMD="$WRAPPER_TEST_CMD"
-else
-    if [ "$DIST_OS" = "macosx" ]
-    then
-        WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32"
-        if [ -x $WRAPPER_TEST_CMD ]
-        then
-            WRAPPER_CMD="$WRAPPER_TEST_CMD"
-        else
-            WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-            if [ -x $WRAPPER_TEST_CMD ]
-            then
-                WRAPPER_CMD="$WRAPPER_TEST_CMD"
-            else
-                WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64"
-                if [ -x $WRAPPER_TEST_CMD ]
-                then
-                    WRAPPER_CMD="$WRAPPER_TEST_CMD"
-                else
-                    if [ ! -x $WRAPPER_CMD ]
-                    then
-                        echo "Unable to locate any of the following binaries:"
-                        echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-                        echo "  $WRAPPER_CMD-$DIST_OS-universal-32"
-                        echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-                        echo "  $WRAPPER_CMD-$DIST_OS-universal-64"
-                        echo "  $WRAPPER_CMD"
-                        exit 1
-                    fi
-                fi
-            fi
-        fi
-    else
-        WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-        if [ -x $WRAPPER_TEST_CMD ]
-        then
-            WRAPPER_CMD="$WRAPPER_TEST_CMD"
-        else
-            if [ ! -x $WRAPPER_CMD ]
-            then
-                echo "Unable to locate any of the following binaries:"
-                echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-                echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-                echo "  $WRAPPER_CMD"
-                exit 1
-            fi
-        fi
-    fi
-fi
- 
-# Build the nice clause
-if [ "X$PRIORITY" = "X" ]
-then
-    CMDNICE=""
-else
-    CMDNICE="nice -$PRIORITY"
-fi
-
-# Build the anchor file clause.
-if [ "X$IGNORE_SIGNALS" = "X" ]
-then
-   ANCHORPROP=
-   IGNOREPROP=
-else
-   ANCHORPROP=wrapper.anchorfile=$ANCHORFILE
-   IGNOREPROP=wrapper.ignore_signals=TRUE
-fi
-
-# Build the lock file clause.  Only create a lock file if the lock directory exists on this platform.
-if [ -d $LOCKDIR ]
-then
-    LOCKPROP=wrapper.lockfile=$LOCKFILE
-else
-    LOCKPROP=
-fi
-
-checkUser() {
-    # Check the configured user.  If necessary rerun this script as the desired user.
-    if [ "X$RUN_AS_USER" != "X" ]
-    then
-        # Resolve the location of the 'id' command
-        IDEXE="/usr/xpg4/bin/id"
-        if [ ! -x $IDEXE ]
-        then
-            IDEXE="/usr/bin/id"
-            if [ ! -x $IDEXE ]
-            then
-                echo "Unable to locate 'id'."
-                echo "Please report this message along with the location of the command on your system."
-                exit 1
-            fi
-        fi
-    
-        if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
-        then
-            # Already running as the configured user.  Avoid password prompts by not calling su.
-            RUN_AS_USER=""
-        fi
-    fi
-    if [ "X$RUN_AS_USER" != "X" ]
-    then
-        # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be
-        # able to create the lock file.  The Wrapper will be able to update this file once it
-        # is created but will not be able to delete it on shutdown.  If $2 is defined then
-        # the lock file should be created for the current command
-        if [ "X$LOCKPROP" != "X" ]
-        then
-            if [ "X$2" != "X" ]
-            then
-                # Resolve the primary group 
-                RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
-                if [ "X$RUN_AS_GROUP" = "X" ]
-                then
-                    RUN_AS_GROUP=$RUN_AS_USER
-                fi
-                touch $LOCKFILE
-                chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE
-            fi
-        fi
-
-        # Still want to change users, recurse.  This means that the user will only be
-        #  prompted for a password once.
-        su -m $RUN_AS_USER -c "$REALPATH $1"
-
-        # Now that we are the original user again, we may need to clean up the lock file.
-        if [ "X$LOCKPROP" != "X" ]
-        then
-            getpid
-            if [ "X$pid" = "X" ]
-            then
-                # Wrapper is not running so make sure the lock file is deleted.
-                if [ -f $LOCKFILE ]
-                then
-                    rm $LOCKFILE
-                fi
-            fi
-        fi
-
-        exit 0
-    fi
-}
-
-getpid() {
-    if [ -f $PIDFILE ]
-    then
-        if [ -r $PIDFILE ]
-        then
-            pid=`cat $PIDFILE`
-            if [ "X$pid" != "X" ]
-            then
-                # It is possible that 'a' process with the pid exists but that it is not the
-                #  correct process.  This can happen in a number of cases, but the most
-                #  common is during system startup after an unclean shutdown.
-                # The ps statement below looks for the specific wrapper command running as
-                #  the pid.  If it is not found then the pid file is considered to be stale.
-                pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1`
-                if [ "X$pidtest" = "X" ]
-                then
-                    # This is a stale pid file.
-                    rm -f $PIDFILE
-                    echo "Removed stale pid file: $PIDFILE"
-                    pid=""
-                fi
-            fi
-        else
-            echo "Cannot read $PIDFILE."
-            exit 1
-        fi
-    fi
-}
-
-testpid() {
-    pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
-    if [ "X$pid" = "X" ]
-    then
-        # Process is gone so remove the pid file.
-        rm -f $PIDFILE
-        pid=""
-    fi
-}
-
-console() {
-    echo "Running $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP"
-        exec $COMMAND_LINE
-    else
-        echo "$APP_LONG_NAME is already running."
-        exit 1
-    fi
-}
- 
-start() {
-    echo "Starting $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
-        exec $COMMAND_LINE
-    else
-        echo "$APP_LONG_NAME is already running."
-        exit 1
-    fi
-}
- 
-stopit() {
-    echo "Stopping $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME was not running."
-    else
-        if [ "X$IGNORE_SIGNALS" = "X" ]
-        then
-            # Running so try to stop it.
-            kill $pid
-            if [ $? -ne 0 ]
-            then
-                # An explanation for the failure should have been given
-                echo "Unable to stop $APP_LONG_NAME."
-                exit 1
-            fi
-        else
-            rm -f $ANCHORFILE
-            if [ -f $ANCHORFILE ]
-            then
-                # An explanation for the failure should have been given
-                echo "Unable to stop $APP_LONG_NAME."
-                exit 1
-            fi
-        fi
-
-        # We can not predict how long it will take for the wrapper to
-        #  actually stop as it depends on settings in wrapper.conf.
-        #  Loop until it does.
-        savepid=$pid
-        CNT=0
-        TOTCNT=0
-        while [ "X$pid" != "X" ]
-        do
-            # Show a waiting message every 5 seconds.
-            if [ "$CNT" -lt "5" ]
-            then
-                CNT=`expr $CNT + 1`
-            else
-                echo "Waiting for $APP_LONG_NAME to exit..."
-                CNT=0
-            fi
-            TOTCNT=`expr $TOTCNT + 1`
-
-            sleep 1
-
-            testpid
-        done
-
-        pid=$savepid
-        testpid
-        if [ "X$pid" != "X" ]
-        then
-            echo "Failed to stop $APP_LONG_NAME."
-            exit 1
-        else
-            echo "Stopped $APP_LONG_NAME."
-        fi
-    fi
-}
-
-status() {
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME is not running."
-        exit 1
-    else
-        echo "$APP_LONG_NAME is running ($pid)."
-        exit 0
-    fi
-}
-
-dump() {
-    echo "Dumping $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME was not running."
-
-    else
-        kill -3 $pid
-
-        if [ $? -ne 0 ]
-        then
-            echo "Failed to dump $APP_LONG_NAME."
-            exit 1
-        else
-            echo "Dumped $APP_LONG_NAME."
-        fi
-    fi
-}
-
-case "$1" in
-
-    'console')
-        checkUser $1 touchlock
-        console
-        ;;
-
-    'start')
-        checkUser $1 touchlock
-        start
-        ;;
-
-    'stop')
-        checkUser $1
-        stopit
-        ;;
-
-    'restart')
-        checkUser $1 touchlock
-        stopit
-        start
-        ;;
-
-    'status')
-        checkUser $1
-        status
-        ;;
-
-    'dump')
-        checkUser $1
-        dump
-        ;;
-
-    *)
-        echo "Usage: $0 { console | start | stop | restart | status | dump }"
-        exit 1
-        ;;
-esac
-
-exit 0
diff --git a/trunk/assembly/src/release/bin/linux-x86-32/libwrapper.so b/trunk/assembly/src/release/bin/linux-x86-32/libwrapper.so
deleted file mode 100644
index 2cc4ab3..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-32/libwrapper.so
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/linux-x86-32/wrapper b/trunk/assembly/src/release/bin/linux-x86-32/wrapper
deleted file mode 100644
index 7e00645..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-32/wrapper
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/linux-x86-32/wrapper.conf b/trunk/assembly/src/release/bin/linux-x86-32/wrapper.conf
deleted file mode 100644
index 4a03382..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-32/wrapper.conf
+++ /dev/null
@@ -1,139 +0,0 @@
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-#********************************************************************
-# Wrapper Properties
-#********************************************************************
-
-#wrapper.debug=TRUE
-set.default.ACTIVEMQ_HOME=../..
-set.default.ACTIVEMQ_BASE=../..
-wrapper.working.dir=.
-
-# Java Application
-wrapper.java.command=java
-
-# Java Main class.  This class must implement the WrapperListener interface
-#  or guarantee that the WrapperManager class is initialized.  Helper
-#  classes are provided to do this for you.  See the Integration section
-#  of the documentation for details.
-wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
-
-# Java Classpath (include wrapper.jar)  Add class path elements as
-#  needed starting from 1
-wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
-wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
-
-# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/linux/
-
-# Java Additional Parameters
-# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dactivemq.home=%ACTIVEMQ_HOME%
-wrapper.java.additional.2=-Dactivemq.base=%ACTIVEMQ_BASE%
-wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
-wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
-wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.ks
-wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts
-wrapper.java.additional.7=-Dcom.sun.management.jmxremote
-wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-wrapper.java.additional.9=-Djava.util.logging.config.file=logging.properties
-
-# Uncomment to enable jmx
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
-
-# Uncomment to enable YourKit profiling
-#wrapper.java.additional.n=-Xrunyjpagent
-
-# Uncomment to enable remote debugging
-#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE 
-#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
-
-# Initial Java Heap Size (in MB)
-#wrapper.java.initmemory=3
-
-# Maximum Java Heap Size (in MB)
-wrapper.java.maxmemory=512
-
-# Application parameters.  Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.activemq.console.Main
-wrapper.app.parameter.2=start
-
-#********************************************************************
-# Wrapper Logging Properties
-#********************************************************************
-# Format of output for the console.  (See docs for formats)
-wrapper.console.format=PM
-
-# Log Level for console output.  (See docs for log levels)
-wrapper.console.loglevel=INFO
-
-# Log file to use for wrapper output logging.
-wrapper.logfile=%ACTIVEMQ_BASE%/data/wrapper.log
-
-# Format of output for the log file.  (See docs for formats)
-wrapper.logfile.format=LPTM
-
-# Log Level for log file output.  (See docs for log levels)
-wrapper.logfile.loglevel=INFO
-
-# Maximum size that the log file will be allowed to grow to before
-#  the log is rolled. Size is specified in bytes.  The default value
-#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
-#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
-wrapper.logfile.maxsize=0
-
-# Maximum number of rolled log files which will be allowed before old
-#  files are deleted.  The default value of 0 implies no limit.
-wrapper.logfile.maxfiles=0
-
-# Log Level for sys/event log output.  (See docs for log levels)
-wrapper.syslog.loglevel=NONE
-
-#********************************************************************
-# Wrapper Windows Properties
-#********************************************************************
-# Title to use when running as a console
-wrapper.console.title=ActiveMQ
-
-#********************************************************************
-# Wrapper Windows NT/2000/XP Service Properties
-#********************************************************************
-# WARNING - Do not modify any of these properties when an application
-#  using this configuration file has been installed as a service.
-#  Please uninstall the service before modifying this section.  The
-#  service can then be reinstalled.
-
-# Name of the service
-wrapper.ntservice.name=ActiveMQ
-
-# Display name of the service
-wrapper.ntservice.displayname=ActiveMQ
-
-# Description of the service
-wrapper.ntservice.description=ActiveMQ Broker
-
-# Service dependencies.  Add dependencies as needed starting from 1
-wrapper.ntservice.dependency.1=
-
-# Mode in which the service is installed.  AUTO_START or DEMAND_START
-wrapper.ntservice.starttype=AUTO_START
-
-# Allow the service to interact with the desktop.
-wrapper.ntservice.interactive=false
diff --git a/trunk/assembly/src/release/bin/linux-x86-64/activemq b/trunk/assembly/src/release/bin/linux-x86-64/activemq
deleted file mode 100644
index f661012..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-64/activemq
+++ /dev/null
@@ -1,543 +0,0 @@
-#! /bin/sh
-
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-# Application
-APP_NAME="ActiveMQ"
-APP_LONG_NAME="ActiveMQ Broker"
-ACTIVEMQ_HOME="../.."
-
-# Wrapper
-WRAPPER_CMD="wrapper"
-WRAPPER_CONF="wrapper.conf"
-
-# Priority at which to run the wrapper.  See "man nice" for valid priorities.
-#  nice is only used if a priority is specified.
-PRIORITY=
-
-# Location of the pid file.
-PIDDIR="."
-
-# If uncommented, causes the Wrapper to be shutdown using an anchor file.
-#  When launched with the 'start' command, it will also ignore all INT and
-#  TERM signals.
-#IGNORE_SIGNALS=true
-
-# If specified, the Wrapper will be run as the specified user.
-# IMPORTANT - Make sure that the user has the required privileges to write
-#  the PID file and wrapper.log files.  Failure to be able to write the log
-#  file will cause the Wrapper to exit without any way to write out an error
-#  message.
-# NOTE - This will set the user which is used to run the Wrapper as well as
-#  the JVM and is not useful in situations where a privileged resource or
-#  port needs to be allocated prior to the user being changed.
-#RUN_AS_USER=
-
-# The following two lines are used by the chkconfig command. Change as is
-#  appropriate for your application.  They should remain commented.
-# chkconfig: 2345 20 80
-# description: @app.long.name@
-
-# Do not modify anything beyond this point
-#-----------------------------------------------------------------------------
-
-# load system-wide activemq configuration
-if [ -f "/etc/sysconfig/activemq" ] ; then
-  . /etc/sysconfig/activemq
-fi
-
-# Get the fully qualified path to the script
-case $0 in
-    /*)
-        SCRIPT="$0"
-        ;;
-    *)
-        PWD=`pwd`
-        SCRIPT="$PWD/$0"
-        ;;
-esac
-
-# Resolve the true real path without any sym links.
-CHANGED=true
-while [ "X$CHANGED" != "X" ]
-do
-    # Change spaces to ":" so the tokens can be parsed.
-    SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
-    # Get the real path to this script, resolving any symbolic links
-    TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
-    REALPATH=
-    for C in $TOKENS; do
-        REALPATH="$REALPATH/$C"
-        while [ -h "$REALPATH" ] ; do
-            LS="`ls -ld "$REALPATH"`"
-            LINK="`expr "$LS" : '.*-> \(.*\)$'`"
-            if expr "$LINK" : '/.*' > /dev/null; then
-                REALPATH="$LINK"
-            else
-                REALPATH="`dirname "$REALPATH"`""/$LINK"
-            fi
-        done
-    done
-    # Change ":" chars back to spaces.
-    REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`
-
-    if [ "$REALPATH" = "$SCRIPT" ]
-    then
-        CHANGED=""
-    else
-        SCRIPT="$REALPATH"
-    fi
-done
-
-# Change the current directory to the location of the script
-cd "`dirname "$REALPATH"`"
-REALDIR=`pwd`
-
-# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if
-#  the working directory is later changed.
-FIRST_CHAR=`echo $PIDDIR | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    PIDDIR=$REALDIR/$PIDDIR
-fi
-# Same test for WRAPPER_CMD
-FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    WRAPPER_CMD=$REALDIR/$WRAPPER_CMD
-fi
-# Same test for WRAPPER_CONF
-FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    WRAPPER_CONF=$REALDIR/$WRAPPER_CONF
-fi
-
-# Process ID
-ANCHORFILE="$PIDDIR/$APP_NAME.anchor"
-PIDFILE="$PIDDIR/$APP_NAME.pid"
-LOCKDIR="/var/lock/subsys"
-LOCKFILE="$LOCKDIR/$APP_NAME"
-pid=""
-
-# Resolve the location of the 'ps' command
-PSEXE="/usr/bin/ps"
-if [ ! -x $PSEXE ]
-then
-    PSEXE="/bin/ps"
-    if [ ! -x $PSEXE ]
-    then
-        echo "Unable to locate 'ps'."
-        echo "Please report this message along with the location of the command on your system."
-        exit 1
-    fi
-fi
-
-# Resolve the os
-DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]`
-case "$DIST_OS" in
-    'sunos')
-        DIST_OS="solaris"
-        ;;
-    'hp-ux' | 'hp-ux64')
-        DIST_OS="hpux"
-        ;;
-    'darwin')
-        DIST_OS="macosx"
-        ;;
-    'unix_sv')
-        DIST_OS="unixware"
-        ;;
-esac
-
-# Resolve the architecture
-DIST_ARCH=`uname -p 2>/dev/null | tr [:upper:] [:lower:] | tr -d [:blank:]`
-if [ "$DIST_ARCH" = "unknown" ] || [ "$DIST_ARCH" = "" ]
-then
-    DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]`
-fi
-case "$DIST_ARCH" in
-    'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64')
-        DIST_ARCH="x86"
-        ;;
-    'ip27')
-        DIST_ARCH="mips"
-        ;;
-    'power' | 'powerpc' | 'power_pc' | 'ppc64')
-        DIST_ARCH="ppc"
-        ;;
-    'pa_risc' | 'pa-risc')
-        DIST_ARCH="parisc"
-        ;;
-    'sun4u' | 'sparcv9')
-        DIST_ARCH="sparc"
-        ;;
-    '9000/800')
-        DIST_ARCH="parisc"
-        ;;
-esac
-
-# Decide on the wrapper binary to use.
-# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit
-#  platforms, if the 64-bit binary exists then the distribution most
-#  likely wants to use long names.  Otherwise, look for the default.
-# For macosx, we also want to look for universal binaries.
-WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-if [ -x $WRAPPER_TEST_CMD ]
-then
-    WRAPPER_CMD="$WRAPPER_TEST_CMD"
-else
-    if [ "$DIST_OS" = "macosx" ]
-    then
-        WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32"
-        if [ -x $WRAPPER_TEST_CMD ]
-        then
-            WRAPPER_CMD="$WRAPPER_TEST_CMD"
-        else
-            WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-            if [ -x $WRAPPER_TEST_CMD ]
-            then
-                WRAPPER_CMD="$WRAPPER_TEST_CMD"
-            else
-                WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64"
-                if [ -x $WRAPPER_TEST_CMD ]
-                then
-                    WRAPPER_CMD="$WRAPPER_TEST_CMD"
-                else
-                    if [ ! -x $WRAPPER_CMD ]
-                    then
-                        echo "Unable to locate any of the following binaries:"
-                        echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-                        echo "  $WRAPPER_CMD-$DIST_OS-universal-32"
-                        echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-                        echo "  $WRAPPER_CMD-$DIST_OS-universal-64"
-                        echo "  $WRAPPER_CMD"
-                        exit 1
-                    fi
-                fi
-            fi
-        fi
-    else
-        WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-        if [ -x $WRAPPER_TEST_CMD ]
-        then
-            WRAPPER_CMD="$WRAPPER_TEST_CMD"
-        else
-            if [ ! -x $WRAPPER_CMD ]
-            then
-                echo "Unable to locate any of the following binaries:"
-                echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-                echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-                echo "  $WRAPPER_CMD"
-                exit 1
-            fi
-        fi
-    fi
-fi
- 
-# Build the nice clause
-if [ "X$PRIORITY" = "X" ]
-then
-    CMDNICE=""
-else
-    CMDNICE="nice -$PRIORITY"
-fi
-
-# Build the anchor file clause.
-if [ "X$IGNORE_SIGNALS" = "X" ]
-then
-   ANCHORPROP=
-   IGNOREPROP=
-else
-   ANCHORPROP=wrapper.anchorfile=$ANCHORFILE
-   IGNOREPROP=wrapper.ignore_signals=TRUE
-fi
-
-# Build the lock file clause.  Only create a lock file if the lock directory exists on this platform.
-if [ -d $LOCKDIR ]
-then
-    LOCKPROP=wrapper.lockfile=$LOCKFILE
-else
-    LOCKPROP=
-fi
-
-checkUser() {
-    # Check the configured user.  If necessary rerun this script as the desired user.
-    if [ "X$RUN_AS_USER" != "X" ]
-    then
-        # Resolve the location of the 'id' command
-        IDEXE="/usr/xpg4/bin/id"
-        if [ ! -x $IDEXE ]
-        then
-            IDEXE="/usr/bin/id"
-            if [ ! -x $IDEXE ]
-            then
-                echo "Unable to locate 'id'."
-                echo "Please report this message along with the location of the command on your system."
-                exit 1
-            fi
-        fi
-    
-        if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
-        then
-            # Already running as the configured user.  Avoid password prompts by not calling su.
-            RUN_AS_USER=""
-        fi
-    fi
-    if [ "X$RUN_AS_USER" != "X" ]
-    then
-        # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be
-        # able to create the lock file.  The Wrapper will be able to update this file once it
-        # is created but will not be able to delete it on shutdown.  If $2 is defined then
-        # the lock file should be created for the current command
-        if [ "X$LOCKPROP" != "X" ]
-        then
-            if [ "X$2" != "X" ]
-            then
-                # Resolve the primary group 
-                RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
-                if [ "X$RUN_AS_GROUP" = "X" ]
-                then
-                    RUN_AS_GROUP=$RUN_AS_USER
-                fi
-                touch $LOCKFILE
-                chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE
-            fi
-        fi
-
-        # Still want to change users, recurse.  This means that the user will only be
-        #  prompted for a password once.
-        su -m $RUN_AS_USER -c "$REALPATH $1"
-
-        # Now that we are the original user again, we may need to clean up the lock file.
-        if [ "X$LOCKPROP" != "X" ]
-        then
-            getpid
-            if [ "X$pid" = "X" ]
-            then
-                # Wrapper is not running so make sure the lock file is deleted.
-                if [ -f $LOCKFILE ]
-                then
-                    rm $LOCKFILE
-                fi
-            fi
-        fi
-
-        exit 0
-    fi
-}
-
-getpid() {
-    if [ -f $PIDFILE ]
-    then
-        if [ -r $PIDFILE ]
-        then
-            pid=`cat $PIDFILE`
-            if [ "X$pid" != "X" ]
-            then
-                # It is possible that 'a' process with the pid exists but that it is not the
-                #  correct process.  This can happen in a number of cases, but the most
-                #  common is during system startup after an unclean shutdown.
-                # The ps statement below looks for the specific wrapper command running as
-                #  the pid.  If it is not found then the pid file is considered to be stale.
-                pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1`
-                if [ "X$pidtest" = "X" ]
-                then
-                    # This is a stale pid file.
-                    rm -f $PIDFILE
-                    echo "Removed stale pid file: $PIDFILE"
-                    pid=""
-                fi
-            fi
-        else
-            echo "Cannot read $PIDFILE."
-            exit 1
-        fi
-    fi
-}
-
-testpid() {
-    pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
-    if [ "X$pid" = "X" ]
-    then
-        # Process is gone so remove the pid file.
-        rm -f $PIDFILE
-        pid=""
-    fi
-}
-
-console() {
-    echo "Running $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP"
-        exec $COMMAND_LINE
-    else
-        echo "$APP_LONG_NAME is already running."
-        exit 1
-    fi
-}
- 
-start() {
-    echo "Starting $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
-        exec $COMMAND_LINE
-    else
-        echo "$APP_LONG_NAME is already running."
-        exit 1
-    fi
-}
- 
-stopit() {
-    echo "Stopping $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME was not running."
-    else
-        if [ "X$IGNORE_SIGNALS" = "X" ]
-        then
-            # Running so try to stop it.
-            kill $pid
-            if [ $? -ne 0 ]
-            then
-                # An explanation for the failure should have been given
-                echo "Unable to stop $APP_LONG_NAME."
-                exit 1
-            fi
-        else
-            rm -f $ANCHORFILE
-            if [ -f $ANCHORFILE ]
-            then
-                # An explanation for the failure should have been given
-                echo "Unable to stop $APP_LONG_NAME."
-                exit 1
-            fi
-        fi
-
-        # We can not predict how long it will take for the wrapper to
-        #  actually stop as it depends on settings in wrapper.conf.
-        #  Loop until it does.
-        savepid=$pid
-        CNT=0
-        TOTCNT=0
-        while [ "X$pid" != "X" ]
-        do
-            # Show a waiting message every 5 seconds.
-            if [ "$CNT" -lt "5" ]
-            then
-                CNT=`expr $CNT + 1`
-            else
-                echo "Waiting for $APP_LONG_NAME to exit..."
-                CNT=0
-            fi
-            TOTCNT=`expr $TOTCNT + 1`
-
-            sleep 1
-
-            testpid
-        done
-
-        pid=$savepid
-        testpid
-        if [ "X$pid" != "X" ]
-        then
-            echo "Failed to stop $APP_LONG_NAME."
-            exit 1
-        else
-            echo "Stopped $APP_LONG_NAME."
-        fi
-    fi
-}
-
-status() {
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME is not running."
-        exit 1
-    else
-        echo "$APP_LONG_NAME is running ($pid)."
-        exit 0
-    fi
-}
-
-dump() {
-    echo "Dumping $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME was not running."
-
-    else
-        kill -3 $pid
-
-        if [ $? -ne 0 ]
-        then
-            echo "Failed to dump $APP_LONG_NAME."
-            exit 1
-        else
-            echo "Dumped $APP_LONG_NAME."
-        fi
-    fi
-}
-
-case "$1" in
-
-    'console')
-        checkUser $1 touchlock
-        console
-        ;;
-
-    'start')
-        checkUser $1 touchlock
-        start
-        ;;
-
-    'stop')
-        checkUser $1
-        stopit
-        ;;
-
-    'restart')
-        checkUser $1 touchlock
-        stopit
-        start
-        ;;
-
-    'status')
-        checkUser $1
-        status
-        ;;
-
-    'dump')
-        checkUser $1
-        dump
-        ;;
-
-    *)
-        echo "Usage: $0 { console | start | stop | restart | status | dump }"
-        exit 1
-        ;;
-esac
-
-exit 0
diff --git a/trunk/assembly/src/release/bin/linux-x86-64/libwrapper.so b/trunk/assembly/src/release/bin/linux-x86-64/libwrapper.so
deleted file mode 100755
index 24197bf..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-64/libwrapper.so
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/linux-x86-64/wrapper b/trunk/assembly/src/release/bin/linux-x86-64/wrapper
deleted file mode 100755
index 3128b95..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-64/wrapper
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/linux-x86-64/wrapper.conf b/trunk/assembly/src/release/bin/linux-x86-64/wrapper.conf
deleted file mode 100644
index 4a03382..0000000
--- a/trunk/assembly/src/release/bin/linux-x86-64/wrapper.conf
+++ /dev/null
@@ -1,139 +0,0 @@
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-#********************************************************************
-# Wrapper Properties
-#********************************************************************
-
-#wrapper.debug=TRUE
-set.default.ACTIVEMQ_HOME=../..
-set.default.ACTIVEMQ_BASE=../..
-wrapper.working.dir=.
-
-# Java Application
-wrapper.java.command=java
-
-# Java Main class.  This class must implement the WrapperListener interface
-#  or guarantee that the WrapperManager class is initialized.  Helper
-#  classes are provided to do this for you.  See the Integration section
-#  of the documentation for details.
-wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
-
-# Java Classpath (include wrapper.jar)  Add class path elements as
-#  needed starting from 1
-wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
-wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
-
-# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/linux/
-
-# Java Additional Parameters
-# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dactivemq.home=%ACTIVEMQ_HOME%
-wrapper.java.additional.2=-Dactivemq.base=%ACTIVEMQ_BASE%
-wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
-wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
-wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.ks
-wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts
-wrapper.java.additional.7=-Dcom.sun.management.jmxremote
-wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-wrapper.java.additional.9=-Djava.util.logging.config.file=logging.properties
-
-# Uncomment to enable jmx
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
-
-# Uncomment to enable YourKit profiling
-#wrapper.java.additional.n=-Xrunyjpagent
-
-# Uncomment to enable remote debugging
-#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE 
-#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
-
-# Initial Java Heap Size (in MB)
-#wrapper.java.initmemory=3
-
-# Maximum Java Heap Size (in MB)
-wrapper.java.maxmemory=512
-
-# Application parameters.  Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.activemq.console.Main
-wrapper.app.parameter.2=start
-
-#********************************************************************
-# Wrapper Logging Properties
-#********************************************************************
-# Format of output for the console.  (See docs for formats)
-wrapper.console.format=PM
-
-# Log Level for console output.  (See docs for log levels)
-wrapper.console.loglevel=INFO
-
-# Log file to use for wrapper output logging.
-wrapper.logfile=%ACTIVEMQ_BASE%/data/wrapper.log
-
-# Format of output for the log file.  (See docs for formats)
-wrapper.logfile.format=LPTM
-
-# Log Level for log file output.  (See docs for log levels)
-wrapper.logfile.loglevel=INFO
-
-# Maximum size that the log file will be allowed to grow to before
-#  the log is rolled. Size is specified in bytes.  The default value
-#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
-#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
-wrapper.logfile.maxsize=0
-
-# Maximum number of rolled log files which will be allowed before old
-#  files are deleted.  The default value of 0 implies no limit.
-wrapper.logfile.maxfiles=0
-
-# Log Level for sys/event log output.  (See docs for log levels)
-wrapper.syslog.loglevel=NONE
-
-#********************************************************************
-# Wrapper Windows Properties
-#********************************************************************
-# Title to use when running as a console
-wrapper.console.title=ActiveMQ
-
-#********************************************************************
-# Wrapper Windows NT/2000/XP Service Properties
-#********************************************************************
-# WARNING - Do not modify any of these properties when an application
-#  using this configuration file has been installed as a service.
-#  Please uninstall the service before modifying this section.  The
-#  service can then be reinstalled.
-
-# Name of the service
-wrapper.ntservice.name=ActiveMQ
-
-# Display name of the service
-wrapper.ntservice.displayname=ActiveMQ
-
-# Description of the service
-wrapper.ntservice.description=ActiveMQ Broker
-
-# Service dependencies.  Add dependencies as needed starting from 1
-wrapper.ntservice.dependency.1=
-
-# Mode in which the service is installed.  AUTO_START or DEMAND_START
-wrapper.ntservice.starttype=AUTO_START
-
-# Allow the service to interact with the desktop.
-wrapper.ntservice.interactive=false
diff --git a/trunk/assembly/src/release/bin/macosx/activemq b/trunk/assembly/src/release/bin/macosx/activemq
deleted file mode 100644
index 8390085..0000000
--- a/trunk/assembly/src/release/bin/macosx/activemq
+++ /dev/null
@@ -1,537 +0,0 @@
-#! /bin/sh
-
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-# Application
-APP_NAME="ActiveMQ"
-APP_LONG_NAME="ActiveMQ Broker"
-
-# Wrapper
-WRAPPER_CMD="wrapper"
-WRAPPER_CONF="wrapper.conf"
-
-# Priority at which to run the wrapper.  See "man nice" for valid priorities.
-#  nice is only used if a priority is specified.
-PRIORITY=
-
-# Location of the pid file.
-PIDDIR="."
-
-# If uncommented, causes the Wrapper to be shutdown using an anchor file.
-#  When launched with the 'start' command, it will also ignore all INT and
-#  TERM signals.
-#IGNORE_SIGNALS=true
-
-# If specified, the Wrapper will be run as the specified user.
-# IMPORTANT - Make sure that the user has the required privileges to write
-#  the PID file and wrapper.log files.  Failure to be able to write the log
-#  file will cause the Wrapper to exit without any way to write out an error
-#  message.
-# NOTE - This will set the user which is used to run the Wrapper as well as
-#  the JVM and is not useful in situations where a privileged resource or
-#  port needs to be allocated prior to the user being changed.
-#RUN_AS_USER=
-
-# The following two lines are used by the chkconfig command. Change as is
-#  appropriate for your application.  They should remain commented.
-# chkconfig: 2345 20 80
-# description: @app.long.name@
-
-# Do not modify anything beyond this point
-#-----------------------------------------------------------------------------
-
-# Get the fully qualified path to the script
-case $0 in
-    /*)
-        SCRIPT="$0"
-        ;;
-    *)
-        PWD=`pwd`
-        SCRIPT="$PWD/$0"
-        ;;
-esac
-
-# Resolve the true real path without any sym links.
-CHANGED=true
-while [ "X$CHANGED" != "X" ]
-do
-    # Change spaces to ":" so the tokens can be parsed.
-    SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
-    # Get the real path to this script, resolving any symbolic links
-    TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
-    REALPATH=
-    for C in $TOKENS; do
-        REALPATH="$REALPATH/$C"
-        while [ -h "$REALPATH" ] ; do
-            LS="`ls -ld "$REALPATH"`"
-            LINK="`expr "$LS" : '.*-> \(.*\)$'`"
-            if expr "$LINK" : '/.*' > /dev/null; then
-                REALPATH="$LINK"
-            else
-                REALPATH="`dirname "$REALPATH"`""/$LINK"
-            fi
-        done
-    done
-    # Change ":" chars back to spaces.
-    REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`
-
-    if [ "$REALPATH" = "$SCRIPT" ]
-    then
-        CHANGED=""
-    else
-        SCRIPT="$REALPATH"
-    fi
-done
-
-# Change the current directory to the location of the script
-cd "`dirname "$REALPATH"`"
-REALDIR=`pwd`
-
-# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if
-#  the working directory is later changed.
-FIRST_CHAR=`echo $PIDDIR | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    PIDDIR=$REALDIR/$PIDDIR
-fi
-# Same test for WRAPPER_CMD
-FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    WRAPPER_CMD=$REALDIR/$WRAPPER_CMD
-fi
-# Same test for WRAPPER_CONF
-FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1`
-if [ "$FIRST_CHAR" != "/" ]
-then
-    WRAPPER_CONF=$REALDIR/$WRAPPER_CONF
-fi
-
-# Process ID
-ANCHORFILE="$PIDDIR/$APP_NAME.anchor"
-PIDFILE="$PIDDIR/$APP_NAME.pid"
-LOCKDIR="/var/lock/subsys"
-LOCKFILE="$LOCKDIR/$APP_NAME"
-pid=""
-
-# Resolve the location of the 'ps' command
-PSEXE="/usr/bin/ps"
-if [ ! -x $PSEXE ]
-then
-    PSEXE="/bin/ps"
-    if [ ! -x $PSEXE ]
-    then
-        echo "Unable to locate 'ps'."
-        echo "Please report this message along with the location of the command on your system."
-        exit 1
-    fi
-fi
-
-# Resolve the os
-DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]`
-case "$DIST_OS" in
-    'sunos')
-        DIST_OS="solaris"
-        ;;
-    'hp-ux' | 'hp-ux64')
-        DIST_OS="hpux"
-        ;;
-    'darwin')
-        DIST_OS="macosx"
-        ;;
-    'unix_sv')
-        DIST_OS="unixware"
-        ;;
-esac
-
-# Resolve the architecture
-DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]`
-if [ "$DIST_ARCH" = "unknown" ]
-then
-    DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]`
-fi
-case "$DIST_ARCH" in
-    'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64')
-        DIST_ARCH="x86"
-        ;;
-    'ip27')
-        DIST_ARCH="mips"
-        ;;
-    'power' | 'powerpc' | 'power_pc' | 'ppc64')
-        DIST_ARCH="ppc"
-        ;;
-    'pa_risc' | 'pa-risc')
-        DIST_ARCH="parisc"
-        ;;
-    'sun4u' | 'sparcv9')
-        DIST_ARCH="sparc"
-        ;;
-    '9000/800')
-        DIST_ARCH="parisc"
-        ;;
-esac
-
-# Decide on the wrapper binary to use.
-# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit
-#  platforms, if the 64-bit binary exists then the distribution most
-#  likely wants to use long names.  Otherwise, look for the default.
-# For macosx, we also want to look for universal binaries.
-WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-if [ -x $WRAPPER_TEST_CMD ]
-then
-    WRAPPER_CMD="$WRAPPER_TEST_CMD"
-else
-    if [ "$DIST_OS" = "macosx" ]
-    then
-        WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32"
-        if [ -x $WRAPPER_TEST_CMD ]
-        then
-            WRAPPER_CMD="$WRAPPER_TEST_CMD"
-        else
-            WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-            if [ -x $WRAPPER_TEST_CMD ]
-            then
-                WRAPPER_CMD="$WRAPPER_TEST_CMD"
-            else
-                WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64"
-                if [ -x $WRAPPER_TEST_CMD ]
-                then
-                    WRAPPER_CMD="$WRAPPER_TEST_CMD"
-                else
-                    if [ ! -x $WRAPPER_CMD ]
-                    then
-                        echo "Unable to locate any of the following binaries:"
-                        echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-                        echo "  $WRAPPER_CMD-$DIST_OS-universal-32"
-                        echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-                        echo "  $WRAPPER_CMD-$DIST_OS-universal-64"
-                        echo "  $WRAPPER_CMD"
-                        exit 1
-                    fi
-                fi
-            fi
-        fi
-    else
-        WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-        if [ -x $WRAPPER_TEST_CMD ]
-        then
-            WRAPPER_CMD="$WRAPPER_TEST_CMD"
-        else
-            if [ ! -x $WRAPPER_CMD ]
-            then
-                echo "Unable to locate any of the following binaries:"
-                echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
-                echo "  $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
-                echo "  $WRAPPER_CMD"
-                exit 1
-            fi
-        fi
-    fi
-fi
- 
-# Build the nice clause
-if [ "X$PRIORITY" = "X" ]
-then
-    CMDNICE=""
-else
-    CMDNICE="nice -$PRIORITY"
-fi
-
-# Build the anchor file clause.
-if [ "X$IGNORE_SIGNALS" = "X" ]
-then
-   ANCHORPROP=
-   IGNOREPROP=
-else
-   ANCHORPROP=wrapper.anchorfile=$ANCHORFILE
-   IGNOREPROP=wrapper.ignore_signals=TRUE
-fi
-
-# Build the lock file clause.  Only create a lock file if the lock directory exists on this platform.
-if [ -d $LOCKDIR ]
-then
-    LOCKPROP=wrapper.lockfile=$LOCKFILE
-else
-    LOCKPROP=
-fi
-
-checkUser() {
-    # Check the configured user.  If necessary rerun this script as the desired user.
-    if [ "X$RUN_AS_USER" != "X" ]
-    then
-        # Resolve the location of the 'id' command
-        IDEXE="/usr/xpg4/bin/id"
-        if [ ! -x $IDEXE ]
-        then
-            IDEXE="/usr/bin/id"
-            if [ ! -x $IDEXE ]
-            then
-                echo "Unable to locate 'id'."
-                echo "Please report this message along with the location of the command on your system."
-                exit 1
-            fi
-        fi
-    
-        if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
-        then
-            # Already running as the configured user.  Avoid password prompts by not calling su.
-            RUN_AS_USER=""
-        fi
-    fi
-    if [ "X$RUN_AS_USER" != "X" ]
-    then
-        # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be
-        # able to create the lock file.  The Wrapper will be able to update this file once it
-        # is created but will not be able to delete it on shutdown.  If $2 is defined then
-        # the lock file should be created for the current command
-        if [ "X$LOCKPROP" != "X" ]
-        then
-            if [ "X$2" != "X" ]
-            then
-                # Resolve the primary group 
-                RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
-                if [ "X$RUN_AS_GROUP" = "X" ]
-                then
-                    RUN_AS_GROUP=$RUN_AS_USER
-                fi
-                touch $LOCKFILE
-                chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE
-            fi
-        fi
-
-        # Still want to change users, recurse.  This means that the user will only be
-        #  prompted for a password once.
-        su -m $RUN_AS_USER -c "$REALPATH $1"
-
-        # Now that we are the original user again, we may need to clean up the lock file.
-        if [ "X$LOCKPROP" != "X" ]
-        then
-            getpid
-            if [ "X$pid" = "X" ]
-            then
-                # Wrapper is not running so make sure the lock file is deleted.
-                if [ -f $LOCKFILE ]
-                then
-                    rm $LOCKFILE
-                fi
-            fi
-        fi
-
-        exit 0
-    fi
-}
-
-getpid() {
-    if [ -f $PIDFILE ]
-    then
-        if [ -r $PIDFILE ]
-        then
-            pid=`cat $PIDFILE`
-            if [ "X$pid" != "X" ]
-            then
-                # It is possible that 'a' process with the pid exists but that it is not the
-                #  correct process.  This can happen in a number of cases, but the most
-                #  common is during system startup after an unclean shutdown.
-                # The ps statement below looks for the specific wrapper command running as
-                #  the pid.  If it is not found then the pid file is considered to be stale.
-                pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1`
-                if [ "X$pidtest" = "X" ]
-                then
-                    # This is a stale pid file.
-                    rm -f $PIDFILE
-                    echo "Removed stale pid file: $PIDFILE"
-                    pid=""
-                fi
-            fi
-        else
-            echo "Cannot read $PIDFILE."
-            exit 1
-        fi
-    fi
-}
-
-testpid() {
-    pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
-    if [ "X$pid" = "X" ]
-    then
-        # Process is gone so remove the pid file.
-        rm -f $PIDFILE
-        pid=""
-    fi
-}
-
-console() {
-    echo "Running $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP"
-        exec $COMMAND_LINE
-    else
-        echo "$APP_LONG_NAME is already running."
-        exit 1
-    fi
-}
- 
-start() {
-    echo "Starting $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
-        exec $COMMAND_LINE
-    else
-        echo "$APP_LONG_NAME is already running."
-        exit 1
-    fi
-}
- 
-stopit() {
-    echo "Stopping $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME was not running."
-    else
-        if [ "X$IGNORE_SIGNALS" = "X" ]
-        then
-            # Running so try to stop it.
-            kill $pid
-            if [ $? -ne 0 ]
-            then
-                # An explanation for the failure should have been given
-                echo "Unable to stop $APP_LONG_NAME."
-                exit 1
-            fi
-        else
-            rm -f $ANCHORFILE
-            if [ -f $ANCHORFILE ]
-            then
-                # An explanation for the failure should have been given
-                echo "Unable to stop $APP_LONG_NAME."
-                exit 1
-            fi
-        fi
-
-        # We can not predict how long it will take for the wrapper to
-        #  actually stop as it depends on settings in wrapper.conf.
-        #  Loop until it does.
-        savepid=$pid
-        CNT=0
-        TOTCNT=0
-        while [ "X$pid" != "X" ]
-        do
-            # Show a waiting message every 5 seconds.
-            if [ "$CNT" -lt "5" ]
-            then
-                CNT=`expr $CNT + 1`
-            else
-                echo "Waiting for $APP_LONG_NAME to exit..."
-                CNT=0
-            fi
-            TOTCNT=`expr $TOTCNT + 1`
-
-            sleep 1
-
-            testpid
-        done
-
-        pid=$savepid
-        testpid
-        if [ "X$pid" != "X" ]
-        then
-            echo "Failed to stop $APP_LONG_NAME."
-            exit 1
-        else
-            echo "Stopped $APP_LONG_NAME."
-        fi
-    fi
-}
-
-status() {
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME is not running."
-        exit 1
-    else
-        echo "$APP_LONG_NAME is running ($pid)."
-        exit 0
-    fi
-}
-
-dump() {
-    echo "Dumping $APP_LONG_NAME..."
-    getpid
-    if [ "X$pid" = "X" ]
-    then
-        echo "$APP_LONG_NAME was not running."
-
-    else
-        kill -3 $pid
-
-        if [ $? -ne 0 ]
-        then
-            echo "Failed to dump $APP_LONG_NAME."
-            exit 1
-        else
-            echo "Dumped $APP_LONG_NAME."
-        fi
-    fi
-}
-
-case "$1" in
-
-    'console')
-        checkUser $1 touchlock
-        console
-        ;;
-
-    'start')
-        checkUser $1 touchlock
-        start
-        ;;
-
-    'stop')
-        checkUser $1
-        stopit
-        ;;
-
-    'restart')
-        checkUser $1 touchlock
-        stopit
-        start
-        ;;
-
-    'status')
-        checkUser $1
-        status
-        ;;
-
-    'dump')
-        checkUser $1
-        dump
-        ;;
-
-    *)
-        echo "Usage: $0 { console | start | stop | restart | status | dump }"
-        exit 1
-        ;;
-esac
-
-exit 0
diff --git a/trunk/assembly/src/release/bin/macosx/libwrapper.jnilib b/trunk/assembly/src/release/bin/macosx/libwrapper.jnilib
deleted file mode 100644
index 2b10f10..0000000
--- a/trunk/assembly/src/release/bin/macosx/libwrapper.jnilib
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/macosx/wrapper b/trunk/assembly/src/release/bin/macosx/wrapper
deleted file mode 100644
index fcbd0ce..0000000
--- a/trunk/assembly/src/release/bin/macosx/wrapper
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/macosx/wrapper.conf b/trunk/assembly/src/release/bin/macosx/wrapper.conf
deleted file mode 100644
index b2a3f80..0000000
--- a/trunk/assembly/src/release/bin/macosx/wrapper.conf
+++ /dev/null
@@ -1,139 +0,0 @@
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-#********************************************************************
-# Wrapper Properties
-#********************************************************************
-
-#wrapper.debug=TRUE
-set.default.ACTIVEMQ_HOME=../..
-set.default.ACTIVEMQ_BASE=../..
-wrapper.working.dir=.
-
-# Java Application
-wrapper.java.command=java
-
-# Java Main class.  This class must implement the WrapperListener interface
-#  or guarantee that the WrapperManager class is initialized.  Helper
-#  classes are provided to do this for you.  See the Integration section
-#  of the documentation for details.
-wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
-
-# Java Classpath (include wrapper.jar)  Add class path elements as
-#  needed starting from 1
-wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
-wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
-
-# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/macosx/
-
-# Java Additional Parameters
-# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dactivemq.home=%ACTIVEMQ_HOME%
-wrapper.java.additional.2=-Dactivemq.base=%ACTIVEMQ_BASE%
-wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
-wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
-wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.ks
-wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts
-wrapper.java.additional.7=-Dcom.sun.management.jmxremote
-wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-wrapper.java.additional.9=-Djava.util.logging.config.file=logging.properties
-
-# Uncomment to enable jmx
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
-
-# Uncomment to enable YourKit profiling
-#wrapper.java.additional.n=-Xrunyjpagent
-
-# Uncomment to enable remote debugging
-#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE 
-#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
-
-# Initial Java Heap Size (in MB)
-#wrapper.java.initmemory=3
-
-# Maximum Java Heap Size (in MB)
-wrapper.java.maxmemory=512
-
-# Application parameters.  Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.activemq.console.Main
-wrapper.app.parameter.2=start
-
-#********************************************************************
-# Wrapper Logging Properties
-#********************************************************************
-# Format of output for the console.  (See docs for formats)
-wrapper.console.format=PM
-
-# Log Level for console output.  (See docs for log levels)
-wrapper.console.loglevel=INFO
-
-# Log file to use for wrapper output logging.
-wrapper.logfile=%ACTIVEMQ_BASE%/data/wrapper.log
-
-# Format of output for the log file.  (See docs for formats)
-wrapper.logfile.format=LPTM
-
-# Log Level for log file output.  (See docs for log levels)
-wrapper.logfile.loglevel=INFO
-
-# Maximum size that the log file will be allowed to grow to before
-#  the log is rolled. Size is specified in bytes.  The default value
-#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
-#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
-wrapper.logfile.maxsize=0
-
-# Maximum number of rolled log files which will be allowed before old
-#  files are deleted.  The default value of 0 implies no limit.
-wrapper.logfile.maxfiles=0
-
-# Log Level for sys/event log output.  (See docs for log levels)
-wrapper.syslog.loglevel=NONE
-
-#********************************************************************
-# Wrapper Windows Properties
-#********************************************************************
-# Title to use when running as a console
-wrapper.console.title=ActiveMQ
-
-#********************************************************************
-# Wrapper Windows NT/2000/XP Service Properties
-#********************************************************************
-# WARNING - Do not modify any of these properties when an application
-#  using this configuration file has been installed as a service.
-#  Please uninstall the service before modifying this section.  The
-#  service can then be reinstalled.
-
-# Name of the service
-wrapper.ntservice.name=ActiveMQ
-
-# Display name of the service
-wrapper.ntservice.displayname=ActiveMQ
-
-# Description of the service
-wrapper.ntservice.description=ActiveMQ Broker
-
-# Service dependencies.  Add dependencies as needed starting from 1
-wrapper.ntservice.dependency.1=
-
-# Mode in which the service is installed.  AUTO_START or DEMAND_START
-wrapper.ntservice.starttype=AUTO_START
-
-# Allow the service to interact with the desktop.
-wrapper.ntservice.interactive=false
diff --git a/trunk/assembly/src/release/bin/solaris/activemq.xml b/trunk/assembly/src/release/bin/solaris/activemq.xml
deleted file mode 100644
index 0c776a9..0000000
--- a/trunk/assembly/src/release/bin/solaris/activemq.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE service_bundle SYSTEM
-"/usr/share/lib/xml/dtd/service_bundle.dtd.1">
-
-<!--
-    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.
--->     
-<service_bundle type='manifest' name='activemq'>
-
-<service
-        name='network/activemq'
-        type='service'
-        version='1'>
-
-                <create_default_instance enabled='true' />
-
-        <single_instance/>
-
-        <dependency
-                name='activemq-multi-user-server-milestone'
-                grouping='require_all'
-                restart_on='none'
-                type='service'>
-                <service_fmri value='svc:/milestone/multi-user-server' />
-        </dependency>
-	<method_context>
-		<method_credential user='activemq' group='other'/>
-	       <method_environment>
-                     <envvar name="PATH" value="/usr/wsfm/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/local/bin:/usr/bin:" />
-                     <envvar name="PWD" value="/home/activemq/activemq" />
-                     <envvar name="HOME" value="/home/activemq" />
-                     <envvar name="ACTIVEMQ_BASE" value="/home/activemq/activemq" />
-                     <envvar name="ACTIVEMQ_HOME" value="/home/activemq/activemq" />
-               </method_environment>
-	</method_context>
-
-
-        <exec_method
-                type='method'
-                name='start'
-                exec='/home/activemq/activemq/bin/activemq start'
-                timeout_seconds='60' />
-
-        <exec_method
-        type='method'
-        name='stop'
-        exec=':kill'
-        timeout_seconds='60' />
-        <stability value='Unstable' />
-
-        <template>
-                <common_name>
-                        <loctext xml:lang='C'>Apache ActiveMQ
-                        </loctext>
-                </common_name>
-		<documentation>
-			<doc_link name='apache.org' uri='http://activemq.apache.org/' />
-		</documentation>
-        </template>
-</service>
-
-</service_bundle>
\ No newline at end of file
diff --git a/trunk/assembly/src/release/bin/win32/InstallService.bat b/trunk/assembly/src/release/bin/win32/InstallService.bat
deleted file mode 100644
index ddec441..0000000
--- a/trunk/assembly/src/release/bin/win32/InstallService.bat
+++ /dev/null
@@ -1,52 +0,0 @@
-@echo off
-
-REM ------------------------------------------------------------------------
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements.  See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License.  You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM ------------------------------------------------------------------------
-
-setlocal
-
-rem Java Service Wrapper general NT service install script
-
-
-if "%OS%"=="Windows_NT" goto nt
-echo This script only works with NT-based versions of Windows.
-goto :eof
-
-:nt
-rem
-rem Find the application home.
-rem
-rem %~dp0 is location of current script under NT
-set _REALPATH=%~dp0
-
-set ACTIVEMQ_HOME=%~dp0..\..
-set ACTIVEMQ_BASE=%~dp0..\..
-
-:conf
-set _WRAPPER_CONF="%ACTIVEMQ_HOME%\bin\win32\wrapper.conf"
-
-set _ACTIVEMQ_HOME="set.ACTIVEMQ_HOME=%ACTIVEMQ_HOME%"
-set _ACTIVEMQ_BASE="set.ACTIVEMQ_BASE=%ACTIVEMQ_BASE%"
-
-rem
-rem Install the Wrapper as an NT service.
-rem
-:startup
-"wrapper.exe" -i %_WRAPPER_CONF% %_ACTIVEMQ_HOME% %_ACTIVEMQ_BASE%
-if not errorlevel 1 goto :eof
-pause
-
diff --git a/trunk/assembly/src/release/bin/win32/UninstallService.bat b/trunk/assembly/src/release/bin/win32/UninstallService.bat
deleted file mode 100644
index 36c498e..0000000
--- a/trunk/assembly/src/release/bin/win32/UninstallService.bat
+++ /dev/null
@@ -1,48 +0,0 @@
-@echo off
-
-REM ------------------------------------------------------------------------
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements.  See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License.  You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM ------------------------------------------------------------------------
-
-setlocal
-
-rem Java Service Wrapper general NT service uninstall script
-
-if "%OS%"=="Windows_NT" goto nt
-echo This script only works with NT-based versions of Windows.
-goto :eof
-
-:nt
-rem
-rem Find the application home.
-rem
-rem %~dp0 is location of current script under NT
-set _REALPATH=%~dp0
-
-set ACTIVEMQ_HOME=%~dp0\..\..
-
-:conf
-set _WRAPPER_CONF="%ACTIVEMQ_HOME%\bin\win32\wrapper.conf"
-
-
-rem
-rem Uninstall the Wrapper as an NT service.
-rem
-:startup
-"%_APP_HOME%wrapper.exe" -r %_WRAPPER_CONF%
-if not errorlevel 1 goto :eof
-pause
-
diff --git a/trunk/assembly/src/release/bin/win32/activemq.bat b/trunk/assembly/src/release/bin/win32/activemq.bat
deleted file mode 100644
index c49922f..0000000
--- a/trunk/assembly/src/release/bin/win32/activemq.bat
+++ /dev/null
@@ -1,50 +0,0 @@
-@echo off
-
-REM ------------------------------------------------------------------------
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements.  See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License.  You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM ------------------------------------------------------------------------
-
-rem
-rem Find the application home.
-rem
-if "%OS%"=="Windows_NT" goto nt
-
-echo This is not NT, so please edit this script and set _APP_HOME manually
-set _APP_HOME=..
-
-goto conf
-
-:nt
-rem %~dp0 is name of current script under NT
-set _APP_HOME=%~dp0
-
-rem
-rem Find the wrapper.conf
-rem
-:conf
-set _WRAPPER_CONF=wrapper.conf
-
-rem
-rem Run the application.
-rem At runtime, the current directory will be that of Wrapper.exe
-rem
-"%_APP_HOME%wrapper.exe" -c %_WRAPPER_CONF% 
-if not errorlevel 1 goto end
-pause
-
-:end
-set _APP_HOME=
-set _WRAPPER_CONF=
diff --git a/trunk/assembly/src/release/bin/win32/wrapper.conf b/trunk/assembly/src/release/bin/win32/wrapper.conf
deleted file mode 100644
index 9982d73..0000000
--- a/trunk/assembly/src/release/bin/win32/wrapper.conf
+++ /dev/null
@@ -1,139 +0,0 @@
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-#********************************************************************
-# Wrapper Properties
-#********************************************************************
-
-# wrapper.debug=TRUE
-set.default.ACTIVEMQ_HOME=../..
-set.default.ACTIVEMQ_BASE=../..
-wrapper.working.dir=.
-
-# Java Application
-wrapper.java.command=java
-
-# Java Main class.  This class must implement the WrapperListener interface
-#  or guarantee that the WrapperManager class is initialized.  Helper
-#  classes are provided to do this for you.  See the Integration section
-#  of the documentation for details.
-wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
-
-# Java Classpath (include wrapper.jar)  Add class path elements as
-#  needed starting from 1
-wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
-wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
-
-# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/win32
-
-# Java Additional Parameters
-# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dactivemq.home="%ACTIVEMQ_HOME%"
-wrapper.java.additional.2=-Dactivemq.base="%ACTIVEMQ_BASE%"
-wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
-wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
-wrapper.java.additional.5=-Djavax.net.ssl.keyStore="%ACTIVEMQ_BASE%/conf/broker.ks"
-wrapper.java.additional.6=-Djavax.net.ssl.trustStore="%ACTIVEMQ_BASE%/conf/broker.ts"
-wrapper.java.additional.7=-Dcom.sun.management.jmxremote
-wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-wrapper.java.additional.9=-Djava.util.logging.config.file=logging.properties
-
-# Uncomment to enable remote jmx
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false 
-#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
-
-# Uncomment to enable YourKit profiling
-#wrapper.java.additional.n=-Xrunyjpagent
-
-# Uncomment to enable remote debugging
-#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE 
-#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
-
-# Initial Java Heap Size (in MB)
-#wrapper.java.initmemory=3
-
-# Maximum Java Heap Size (in MB)
-wrapper.java.maxmemory=512
-
-# Application parameters.  Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.activemq.console.Main
-wrapper.app.parameter.2=start
-
-#********************************************************************
-# Wrapper Logging Properties
-#********************************************************************
-# Format of output for the console.  (See docs for formats)
-wrapper.console.format=PM
-
-# Log Level for console output.  (See docs for log levels)
-wrapper.console.loglevel=INFO
-
-# Log file to use for wrapper output logging.
-wrapper.logfile=%ACTIVEMQ_BASE%/data/wrapper.log
-
-# Format of output for the log file.  (See docs for formats)
-wrapper.logfile.format=LPTM
-
-# Log Level for log file output.  (See docs for log levels)
-wrapper.logfile.loglevel=INFO
-
-# Maximum size that the log file will be allowed to grow to before
-#  the log is rolled. Size is specified in bytes.  The default value
-#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
-#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
-wrapper.logfile.maxsize=0
-
-# Maximum number of rolled log files which will be allowed before old
-#  files are deleted.  The default value of 0 implies no limit.
-wrapper.logfile.maxfiles=0
-
-# Log Level for sys/event log output.  (See docs for log levels)
-wrapper.syslog.loglevel=NONE
-
-#********************************************************************
-# Wrapper Windows Properties
-#********************************************************************
-# Title to use when running as a console
-wrapper.console.title=ActiveMQ
-
-#********************************************************************
-# Wrapper Windows NT/2000/XP Service Properties
-#********************************************************************
-# WARNING - Do not modify any of these properties when an application
-#  using this configuration file has been installed as a service.
-#  Please uninstall the service before modifying this section.  The
-#  service can then be reinstalled.
-
-# Name of the service
-wrapper.ntservice.name=ActiveMQ
-
-# Display name of the service
-wrapper.ntservice.displayname=ActiveMQ
-
-# Description of the service
-wrapper.ntservice.description=ActiveMQ Broker
-
-# Service dependencies.  Add dependencies as needed starting from 1
-wrapper.ntservice.dependency.1=
-
-# Mode in which the service is installed.  AUTO_START or DEMAND_START
-wrapper.ntservice.starttype=AUTO_START
-
-# Allow the service to interact with the desktop.
-wrapper.ntservice.interactive=false
diff --git a/trunk/assembly/src/release/bin/win32/wrapper.dll b/trunk/assembly/src/release/bin/win32/wrapper.dll
deleted file mode 100644
index cb553c1..0000000
--- a/trunk/assembly/src/release/bin/win32/wrapper.dll
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/win32/wrapper.exe b/trunk/assembly/src/release/bin/win32/wrapper.exe
deleted file mode 100644
index b4cfc55..0000000
--- a/trunk/assembly/src/release/bin/win32/wrapper.exe
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/bin/wrapper.jar b/trunk/assembly/src/release/bin/wrapper.jar
deleted file mode 100755
index 4db355b..0000000
--- a/trunk/assembly/src/release/bin/wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/conf/activemq.xml b/trunk/assembly/src/release/conf/activemq.xml
deleted file mode 100755
index a0e594c..0000000
--- a/trunk/assembly/src/release/conf/activemq.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: example -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:${activemq.base}/conf/credentials.properties</value>
-        </property>      
-    </bean>
-
-    <!-- 
-        The <broker> element is used to configure the ActiveMQ broker. 
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true">
- 
-        <!--
-			For better performances use VM cursor and small memory limit.
-			For more information, see:
-            
-            http://activemq.apache.org/message-cursors.html
-            
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-              
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
-                  <pendingSubscriberPolicy>
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                  <!-- Use VM cursor for better latency
-                       For more information, see:
-                       
-                       http://activemq.apache.org/message-cursors.html
-                       
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  -->
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy> 
- 
-        
-        <!-- 
-            The managementContext is used to configure how ActiveMQ is exposed in 
-            JMX. By default, ActiveMQ uses the MBean server that is started by 
-            the JVM. For more information, see: 
-            
-            http://activemq.apache.org/jmx.html 
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!-- 
-            Configure message persistence for the broker. The default persistence
-            mechanism is the KahaDB store (identified by the kahaDB tag). 
-            For more information, see: 
-            
-            http://activemq.apache.org/persistence.html 
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.base}/data/kahadb"/>
-        </persistenceAdapter>
-        
-        
-          <!--
-            The systemUsage controls the maximum amount of space the broker will 
-            use before slowing down producers. For more information, see:
-            
-            http://activemq.apache.org/producer-flow-control.html
-             
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-		-->
-		  
-        <!-- 
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see: 
-            
-            http://activemq.apache.org/configuring-transports.html 
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-
-    <!-- 
-        Enable web consoles, REST and Ajax APIs and demos
-        It also includes Camel (with its web console), see ${ACTIVEMQ_HOME}/conf/camel.xml for more info
-        
-        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details 
-    -->
-    <import resource="jetty.xml"/>
-    
-</beans>
-<!-- END SNIPPET: example -->
diff --git a/trunk/assembly/src/release/conf/broker-localhost.cert b/trunk/assembly/src/release/conf/broker-localhost.cert
deleted file mode 100644
index dd07c75..0000000
--- a/trunk/assembly/src/release/conf/broker-localhost.cert
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/conf/broker.ks b/trunk/assembly/src/release/conf/broker.ks
deleted file mode 100644
index 674a604..0000000
--- a/trunk/assembly/src/release/conf/broker.ks
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/conf/broker.ts b/trunk/assembly/src/release/conf/broker.ts
deleted file mode 100644
index 073c4d5..0000000
--- a/trunk/assembly/src/release/conf/broker.ts
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/conf/camel.xml b/trunk/assembly/src/release/conf/camel.xml
deleted file mode 100644
index f42328b..0000000
--- a/trunk/assembly/src/release/conf/camel.xml
+++ /dev/null
@@ -1,71 +0,0 @@
- <!--
-    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.
--->
-<!-- 
-
-    Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
-    For more information, see:
-    
-    http://camel.apache.org
-    
-    Include this file in your configuration to enable Camel
-    
-    e.g. <import resource="camel.xml"/>
-    
-    Note: this configuration is already included in a default configuration via Camel Web Console.
-    See ${ACTIVEMQ_HOME}/conf/jetty.xml for more info on how to disable it, in case you want to do so.
-    Also check ${ACTIVEMQ_HOME}/webapps/camel/WEB-INF/application-context.xml to see how this config is included in Camel Web Console
-    
-    
--->
-<beans
-   xmlns="http://www.springframework.org/schema/beans"  
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-  
-  	<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-
-        <!-- You can use a <packages> element for each root package to search for Java routes -->
-        <packageScan>
-           <package>org.foo.bar</package>
-        </packageScan>
-
-        <!-- You can use Spring XML syntax to define the routes here using the <route> element -->
-        <route>
-            <description>Example Camel Route</description>
-            <from uri="activemq:example.A"/>
-            <to uri="activemq:example.B"/>
-        </route>
-    </camelContext>
-
-    <!--
-       Lets configure some Camel endpoints
-    
-       http://camel.apache.org/components.html
-    -->
-
-    <!-- configure the camel activemq component to use the current broker -->
-    <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
-        <property name="connectionFactory">
-          <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-            <property name="brokerURL" value="vm://localhost?create=false&amp;waitForStart=10000" />
-            <property name="userName" value="${activemq.username}"/>
-            <property name="password" value="${activemq.password}"/>
-          </bean>
-        </property>
-    </bean>
-</beans>
diff --git a/trunk/assembly/src/release/conf/client.ks b/trunk/assembly/src/release/conf/client.ks
deleted file mode 100644
index 69b2fec..0000000
--- a/trunk/assembly/src/release/conf/client.ks
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/conf/client.ts b/trunk/assembly/src/release/conf/client.ts
deleted file mode 100644
index 073c4d5..0000000
--- a/trunk/assembly/src/release/conf/client.ts
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/conf/credentials-enc.properties b/trunk/assembly/src/release/conf/credentials-enc.properties
deleted file mode 100644
index cecb793..0000000
--- a/trunk/assembly/src/release/conf/credentials-enc.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# Defines credentials that will be used by components (like web console) to access the broker
-
-activemq.username=system
-activemq.password=ENC(mYRkg+4Q4hua1kvpCCI2hg==)
-guest.password=ENC(Cf3Jf3tM+UrSOoaKU50od5CuBa8rxjoL)
\ No newline at end of file
diff --git a/trunk/assembly/src/release/conf/credentials.properties b/trunk/assembly/src/release/conf/credentials.properties
deleted file mode 100644
index 7f56375..0000000
--- a/trunk/assembly/src/release/conf/credentials.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# Defines credentials that will be used by components (like web console) to access the broker
-
-activemq.username=system
-activemq.password=manager
-guest.password=password
\ No newline at end of file
diff --git a/trunk/assembly/src/release/conf/jetty-realm.properties b/trunk/assembly/src/release/conf/jetty-realm.properties
deleted file mode 100644
index 714eefc..0000000
--- a/trunk/assembly/src/release/conf/jetty-realm.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# Defines users that can access the web (console, demo, etc.)
-# username: password [,rolename ...]
-admin: admin, admin
\ No newline at end of file
diff --git a/trunk/assembly/src/release/conf/jetty.xml b/trunk/assembly/src/release/conf/jetty.xml
deleted file mode 100644
index 752dcbd..0000000
--- a/trunk/assembly/src/release/conf/jetty.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-
-    <!--
-        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.
-    -->
-    <!--
-        An embedded servlet engine for serving up the Admin consoles, REST and Ajax APIs and
-        some demos Include this file in your configuration to enable ActiveMQ web components
-        e.g. <import resource="jetty.xml"/>
-    -->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-    <bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
-        <property name="name" value="ActiveMQRealm" />
-        <property name="config" value="${activemq.base}/conf/jetty-realm.properties" />
-    </bean>
-
-    <bean id="securityConstraint" class="org.eclipse.jetty.http.security.Constraint">
-        <property name="name" value="BASIC" />
-        <property name="roles" value="admin" />
-        <property name="authenticate" value="false" />
-    </bean>
-    <bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
-        <property name="constraint" ref="securityConstraint" />
-        <property name="pathSpec" value="/*" />
-    </bean>
-    <bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler">
-        <property name="loginService" ref="securityLoginService" />
-        <property name="authenticator">
-            <bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator" />
-        </property>
-        <property name="constraintMappings">
-            <list>
-                <ref bean="securityConstraintMapping" />
-            </list>
-        </property>
-        <property name="handler">
-            <bean id="sec" class="org.eclipse.jetty.server.handler.HandlerCollection">
-                <property name="handlers">
-                    <list>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/admin" />
-                            <property name="resourceBase" value="${activemq.home}/webapps/admin" />
-                            <property name="logUrlOnStart" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/camel" />
-                            <property name="resourceBase" value="${activemq.home}/webapps/camel" />
-                            <property name="logUrlOnStart" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/demo" />
-                            <property name="resourceBase" value="${activemq.home}/webapps/demo" />
-                            <property name="logUrlOnStart" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.webapp.WebAppContext">
-                            <property name="contextPath" value="/fileserver" />
-                            <property name="resourceBase" value="${activemq.home}/webapps/fileserver" />
-                            <property name="logUrlOnStart" value="true" />
-                            <property name="parentLoaderPriority" value="true" />
-                        </bean>
-                        <bean class="org.eclipse.jetty.server.handler.ResourceHandler">
-                            <property name="directoriesListed" value="false" />
-                            <property name="welcomeFiles">
-                                <list>
-                                    <value>index.html</value>
-                                </list>
-                            </property>
-                            <property name="resourceBase" value="${activemq.home}/webapps/" />
-                        </bean>
-                        <bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler">
-                            <property name="serveIcon" value="false" />
-                        </bean>
-                    </list>
-                </property>
-            </bean>
-        </property>
-    </bean>
-
-    <bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
-    </bean>
-
-    <bean id="Server" class="org.eclipse.jetty.server.Server" init-method="start"
-        destroy-method="stop">
-
-        <property name="connectors">
-            <list>
-                <bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
-                    <property name="port" value="8161" />
-                </bean>
-            </list>
-        </property>
-
-        <property name="handler">
-            <bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
-                <property name="handlers">
-                    <list>
-                        <ref bean="contexts" />
-                        <ref bean="securityHandler" />
-                    </list>
-                </property>
-            </bean>
-        </property>
-
-    </bean>
-
-</beans>
diff --git a/trunk/assembly/src/release/conf/jmx.access b/trunk/assembly/src/release/conf/jmx.access
deleted file mode 100644
index 4625b7d..0000000
--- a/trunk/assembly/src/release/conf/jmx.access
+++ /dev/null
@@ -1,18 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-admin readwrite
\ No newline at end of file
diff --git a/trunk/assembly/src/release/conf/jmx.password b/trunk/assembly/src/release/conf/jmx.password
deleted file mode 100644
index 053aa65..0000000
--- a/trunk/assembly/src/release/conf/jmx.password
+++ /dev/null
@@ -1,18 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-admin activemq
\ No newline at end of file
diff --git a/trunk/assembly/src/release/conf/log4j.properties b/trunk/assembly/src/release/conf/log4j.properties
deleted file mode 100755
index c55d3a7..0000000
--- a/trunk/assembly/src/release/conf/log4j.properties
+++ /dev/null
@@ -1,75 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#
-# This file controls most of the logging in ActiveMQ which is mainly based around 
-# the commons logging API.
-#
-log4j.rootLogger=INFO, console, logfile
-log4j.logger.org.apache.activemq.spring=WARN
-log4j.logger.org.apache.activemq.web.handler=WARN
-log4j.logger.org.springframework=WARN
-log4j.logger.org.apache.xbean=WARN
-log4j.logger.org.apache.camel=INFO
-
-# When debugging or reporting problems to the ActiveMQ team,
-# comment out the above lines and uncomment the next.
-
-#log4j.rootLogger=DEBUG, logfile, console
-
-# Or for more fine grained debug logging uncomment one of these
-#log4j.logger.org.apache.activemq=DEBUG
-#log4j.logger.org.apache.camel=DEBUG
-
-# Console appender
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%5p | %m%n
-log4j.appender.console.threshold=INFO
-
-# File appender
-log4j.appender.logfile=org.apache.log4j.RollingFileAppender
-log4j.appender.logfile.file=${activemq.base}/data/activemq.log
-log4j.appender.logfile.maxFileSize=1024KB
-log4j.appender.logfile.maxBackupIndex=5
-log4j.appender.logfile.append=true
-log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n
-# use some of the following patterns to see MDC logging data
-#
-# %X{activemq.broker}
-# %X{activemq.connector}
-# %X{activemq.destination}
-#
-# e.g.
-#
-# log4j.appender.logfile.layout.ConversionPattern=%d | %-20.20X{activemq.connector} | %-5p | %m | %c | %t%n
-
-###########
-# Audit log
-###########
-
-log4j.additivity.org.apache.activemq.audit=false
-log4j.logger.org.apache.activemq.audit=INFO, audit
-
-log4j.appender.audit=org.apache.log4j.RollingFileAppender
-log4j.appender.audit.file=${activemq.base}/data/audit.log
-log4j.appender.audit.maxFileSize=1024KB
-log4j.appender.audit.maxBackupIndex=5
-log4j.appender.audit.append=true
-log4j.appender.audit.layout=org.apache.log4j.PatternLayout
-log4j.appender.audit.layout.ConversionPattern=%-5p | %m | %t%n
\ No newline at end of file
diff --git a/trunk/assembly/src/release/conf/logging.properties b/trunk/assembly/src/release/conf/logging.properties
deleted file mode 100644
index 7551b7d..0000000
--- a/trunk/assembly/src/release/conf/logging.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#
-# This file controls logging which is done over the java.logging API
-#
-
-#handlers = java.util.logging.ConsoleHandler
-#java.util.logging.ConsoleHandler.level=INFO
-#java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
-#.level=INFO#
\ No newline at end of file
diff --git a/trunk/assembly/src/release/data/activemq.log b/trunk/assembly/src/release/data/activemq.log
deleted file mode 100755
index e69de29..0000000
--- a/trunk/assembly/src/release/data/activemq.log
+++ /dev/null
diff --git a/trunk/assembly/src/release/docs/index.html b/trunk/assembly/src/release/docs/index.html
deleted file mode 100755
index aee7c4a..0000000
--- a/trunk/assembly/src/release/docs/index.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-    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.
--->
-<html>
-  <frameset cols = "100%">
-    <frame src ="http://activemq.apache.org/" />
-  </frameset>
-</html>
-
diff --git a/trunk/assembly/src/release/example/build.xml b/trunk/assembly/src/release/example/build.xml
deleted file mode 100755
index 3fda964..0000000
--- a/trunk/assembly/src/release/example/build.xml
+++ /dev/null
@@ -1,317 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project name="Inbox" default="help" basedir=".">
-
-	<property name="class.dir" value="target/classes" />
-	<property name="activemq.home" value=".." />
-
-	<!-- example program defaults -->
-	<property name="url" value="tcp://localhost:61616" />
-	<property name="topic" value="false" />
-	<property name="subject" value="TEST.FOO" />
-	<property name="durable" value="false" />
-	<property name="max" value="2000" />
-	<property name="parallelThreads" value="1" />
-	<property name="messageSize" value="1000" />
-	<property name="clientId" value="consumer1" />
-	<property name="producerClientId" value="null" />
-	<property name="timeToLive" value="0" />
-	<property name="sleepTime" value="0" />
-	<property name="transacted" value="false" />
-	<property name="reply-subject" value="" />
-	<property name="verbose" value="true"/>
-	<property name="ack-mode" value="AUTO_ACKNOWLEDGE"/>
-	<property name="receive-time-out" value="0"/>
-	<property name="subscribers" value="1"/>
-	<property name="batch" value="10"/>
-	
-	<!-- for WAR -->
-	<property name="app.name" value="activemq-web" />
-	<property name="app.base.dir" location="target/${app.name}" />
-	<property name="app.webinf.dir" value="${app.base.dir}/WEB-INF" />
-	<property name="app.classes.dir" value="${app.webinf.dir}/classes" />
-	<property name="app.lib.dir" value="${app.webinf.dir}/lib" />
-	<property name="app.src.dir" value="src" />
-	<property name="app.conf.dir" value="conf" />
-	<property name="app.dist.dir" value="target" />
-
-
-	<target name="help">
-		<echo>
-            This script requires Ant 1.6 or higher
-
-            NOTE: All options should be specified as system properties 
-               on the command line, e.g.:
-
-               ant consumer -Durl=tcp://hostname:1234 -Dtopic=true
-
-                 OR 
-
-               ant producer -Durl=tcp://hostname:61616 -Dmax=1000
-      
-            Usage:
-              ant &lt;ant-task> &lt;options>
-
-            --------------------------------------------------------
-            ant consumer &lt;options> - Creates a consumer which waits until a specific number 
-                                     of messages have been received
-	
-            Consumer Options: 
-                              url - Used to specify acustom URL for the 
-                                    broker, e.g., tcp://hostname:1234
-                            topic - A boolean to determine whether to use
-                                    topics or queues; the default is false
-                          subject - Used to specify a custom destination 
-                                    name, e.g. MyDestination
-                          durable - A boolean to specify that you want to 
-                                    create a durable topic? 
-                              max - The maximum number of messages to wait 
-                                    for before shutting down 
-                         clientId - A string to use as the client id
-                       transacted - A boolean to specify that you want to use 
-                                    transactions? 
-                        sleepTime - The time to sleep between message consumptions
-                          verbose - Used to print out more info; the default is
-                                    true 
-                         ack-mode - The type of message acknowledgement to use; 
-                                    see the Javadocs for javax.jms.Session for
-                                    more information
-                 receive-time-out - An integer to specify the time to wait for
-                                    message consumption
-                  parallelThreads - The number of parallel threads
-                            batch - Batch size for transactions and client acknowledgment (default 10)
-				
-            --------------------------------------------------------				
-            ant producer &lt;options&gt; - Creates a producer publishing a number of messages
-
-            Producer Options: 
-                            url - Used to specify acustom URL for the broker,
-                                  e.g., tcp://hostname:1234
-                          topic - A boolean to determine whether to use topics 
-		                        or queues
-                        subject - Used to specify a custom destination name, 
-                                  e.g. MyDestination
-                        durable - A boolean to specify that you want to create 
-                                  a durable topic subscriber? 
-                           max - The maximum number of messages to wait for 
-                                 before shutting down 
-                     sleepTime - The time to sleep between message consumptions
-                    transacted - A boolean to specify that you want to use 
-                                 transactions? 
-                       verbose - Used to print out more info; the default is true
-                   messageSize - The size of the message in 1-byte characters
-               parallelThreads - The number of parallel threads
-
-		   
-           --------------------------------------------------------
-		
-                   ant -help  - Display ant help screen
-                    ant help  - Display this message
-                   ant clean  - Delete the built directory
-             ant embedBroker  - Runs an embedded broker inside Java code
-                     ant war  - Creates a WAR deployment unit of the ActiveMQ Broker
-    </echo>
-	</target>
-
-	<target name="clean">
-		<delete dir="target" quiet="true" />
-		<delete dir="${class.dir}" quiet="true" />
-	</target>
-
-	<target name="init">
-		<mkdir dir="${class.dir}" />
-		<mkdir dir="src/ddl" />
-
-		<path id="javac.classpath">
-			<pathelement path="${class.dir}" />
-			<pathelement path="conf" />
-			<fileset dir="../lib">
-				<include name="**/*.jar" />
-			</fileset>
-		</path>
-	</target>
-
-
-	<target name="compile" depends="init" description="Compile all Java">
-		<javac srcdir="src" destdir="${class.dir}">
-			<classpath refid="javac.classpath" />
-		</javac>
-		<copy todir="${class.dir}">
-			<fileset dir="src">
-				<include name="**/*.properties" />
-				<include name="**/*.xml" />
-			</fileset>
-		</copy>
-	</target>
-
-	<target name="war" depends="compile" description="Create the activemq broker war file.">
-		<!--Copy the required jar files-->
-		<copy todir="${app.lib.dir}">
-			<fileset dir="../lib">
-				<include name="*.jar" />
-				<exclude name="servlet.jar" />
-			</fileset>
-
-			<fileset dir="../lib/optional">
-				<include name="activemq-web*.jar" />
-				<include name="activemq-container*.jar" />
-				<include name="commons-bean*.jar" />
-				<include name="spring*.jar" />
-				<include name="xbean*.jar" />				
-
-				<!-- include Apache Derby for persistence -->
-				<include name="derby*.jar" />
-
-				<!-- include database pooling just in case -->
-				<include name="commons-pool*.jar" />
-				<include name="commons-db*.jar" />
-			</fileset>
-		</copy>
-		<!--Copy the configuration file-->
-		<copy todir="${app.webinf.dir}">
-			<fileset dir="${app.conf.dir}">
-				<!--Web application configuration file-->
-				<include name="web.xml" />
-				<!--ActiveMQ configuration file-->
-				<include name="activemq.xml" />
-			</fileset>
-		</copy>
-		<copy todir="${app.classes.dir}">
-			<fileset dir="${app.conf.dir}">
-				<!--Log4j configuration file-->
-				<include name="log4j.properties" />
-			</fileset>
-		</copy>
-		<!-- Create the war file -->
-		<jar jarfile="${app.dist.dir}/${app.name}.war" basedir="${app.base.dir}" />
-	</target>
-
-	<target name="consumer" depends="compile" description="Runs a simple consumer">
-
-		<echo>Running consumer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
-		<java classname="ConsumerTool" fork="yes" maxmemory="100M">
-			<classpath refid="javac.classpath" />
-			<jvmarg value="-server" />
-		    <sysproperty key="activemq.home" value="${activemq.home}"/>
-			<arg value="--url=${url}" />
-			<arg value="--topic=${topic}" />
-			<arg value="--subject=${subject}" />
-			<arg value="--durable=${durable}" />
-			<arg value="--maxium-messages=${max}" />
-			<arg value="--client-id=${clientId}" />
-			<arg value="--parallel-threads=${parallelThreads}" />
-			<arg value="--transacted=${transacted}" />
-			<arg value="--sleep-time=${sleepTime}" />
-			<arg value="--verbose=${verbose}"/>
-			<arg value="--ack-mode=${ack-mode}"/>		
-			<arg value="--receive-time-out=${receive-time-out}"/>
-            <arg value="--batch=${batch}"/>
-		</java>
-	</target>
-
-	<target name="producer" depends="compile" description="Runs a simple producer">
-
-		<echo>Running producer against server at $$url = ${url} for subject $$subject = ${subject}</echo>
-		<java classname="ProducerTool" fork="yes" maxmemory="100M">
-			<classpath refid="javac.classpath" />
-			<jvmarg value="-server" />
-		    <sysproperty key="activemq.home" value="${activemq.home}"/>
-			<arg value="--url=${url}" />
-			<arg value="--topic=${topic}" />
-			<arg value="--subject=${subject}" />
-			<arg value="--persistent=${durable}" />
-			<arg value="--message-count=${max}" />
-			<arg value="--message-size=${messageSize}" />
-			<arg value="--parallel-threads=${parallelThreads}" />
-			<arg value="--time-to-live=${timeToLive}" />
-			<arg value="--sleep-time=${sleepTime}" />
-			<arg value="--transacted=${transacted}" />
-			<arg value="--verbose=${verbose}"/>			
-		</java>
-	</target>
-
-	<target name="requester" depends="compile" description="Runs a simple requester">
-
-		<echo>Running requester against server at $$url = ${url} for subject $$subject = ${subject}</echo>
-		<java classname="RequesterTool" fork="yes" maxmemory="100M">
-			<classpath refid="javac.classpath" />
-			<jvmarg value="-server" />
-		    <sysproperty key="activemq.home" value="${activemq.home}"/>
-			<arg value="--url=${url}" />
-			<arg value="--topic=${topic}" />
-			<arg value="--subject=${subject}" />
-			<arg value="--persistent=${durable}" />
-			<arg value="--message-count=${max}" />
-			<arg value="--message-size=${messageSize}" />
-			<arg value="--client-id=${producerClientId}" />
-			<arg value="--time-to-live=${timeToLive}" />
-			<arg value="--sleep-time=${sleepTime}" />
-			<arg value="--transacted=${transacted}" />
-			<arg value="--reply-subject=${reply-subject}" />
-			<arg value="--verbose=${verbose}"/>			
-		</java>
-	</target>
-
-	<target name="embedBroker" depends="compile" description="Runs a simple producer">
-
-		<echo>Running an embedded broker example</echo>
-		<java classname="EmbeddedBroker" fork="yes" maxmemory="100M">
-			<classpath refid="javac.classpath" />
-			<jvmarg value="-server" />
-		    <sysproperty key="activemq.home" value="${activemq.home}"/>
-		</java>
-	</target>
-	
-	<target name="topic-publisher" depends="compile" description="Runs a publisher">
-		<java classname="TopicPublisher" fork="yes" maxmemory="100M">
-			<classpath refid="javac.classpath" />
-			<jvmarg value="-server" />
-			<arg value="--url=${url}" />
-			<arg value="--size=${messageSize}" />
-			<arg value="--subscribers=${subscribers}" />
-			<arg value="--messages=${max}" />
-			<arg value="--delay=${sleepTime}" />
-			<arg value="--batch=${batch}" />			
-		</java>
-	</target>	
-	
-	<target name="topic-listener" depends="compile" description="Runs a listener">
-		<java classname="TopicListener" fork="yes" maxmemory="100M">
-			<classpath refid="javac.classpath" />
-			<jvmarg value="-server" />
-			<arg value="--url=${url}" />
-		</java>
-	</target>	
-	
-	<target name="stomp" depends="compile" description="Runs a Stomp example">
-		<echo>Running a Stomp example</echo>
-		<java classname="StompExample" fork="yes" maxmemory="100M">
-			<classpath refid="javac.classpath" />
-			<jvmarg value="-server" />
-		</java>
-	</target>
-	
-	<target name="log4j-jms" depends="compile" description="Runs a Log4j JMS Appender example">
-		<echo>Running a Log4j JMS Appender example</echo>
-	    <java classname="Log4jJMSAppenderExample" fork="yes" maxmemory="100M">
-	        <classpath refid="javac.classpath" />
-	        <jvmarg value="-Dlog4j.configuration=log4j-jms.properties" />
-	    </java>
-	</target>
-	
-</project>
diff --git a/trunk/assembly/src/release/example/conf/activemq.xml b/trunk/assembly/src/release/example/conf/activemq.xml
deleted file mode 100644
index d70f16a..0000000
--- a/trunk/assembly/src/release/example/conf/activemq.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  
-  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false">
-
-    <persistenceFactory>
-      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="../data"/>
-    </persistenceFactory>
-  
-    <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>      
-      <transportConnector uri="stomp://localhost:61613"/>
-    </transportConnectors>
-        
-  </broker>
-  
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/assembly/src/release/example/conf/log4j.properties b/trunk/assembly/src/release/example/conf/log4j.properties
deleted file mode 100644
index ac07489..0000000
--- a/trunk/assembly/src/release/example/conf/log4j.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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 by the standalone ActiveMQ broker
-#
-log4j.rootLogger=INFO, stdout, logfile
-
-# CONSOLE appender
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %-5p %m%n
-
-# Log File appender
-log4j.appender.logfile=org.apache.log4j.FileAppender
-log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.logfile.file=activemq.log
-log4j.appender.logfile.append=true
-
-#
-#  You can change logger levels here.
-#
-log4j.logger.org.apache.activemq=INFO
-log4j.logger.org.apache.activemq.spring=WARN
diff --git a/trunk/assembly/src/release/example/conf/resin-web.xml b/trunk/assembly/src/release/example/conf/resin-web.xml
deleted file mode 100644
index 1641549..0000000
--- a/trunk/assembly/src/release/example/conf/resin-web.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-    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.
--->
-<web-app>
-  <!--
-      In order to be able to compatiable with Resin 2.1.x and 3.0.x,
-      both XML and XSLT have to be replaced.
-      If only xalan is included, Resin 2.1.x will fail but not 3.0.x.
-      Therefore the best way is to use the compatiable version of the
-      XML parser ans XSLT.
-       - Please refere to the following link for more detailed information.
-       - http://www.caucho.com/resin-3.0/xml/jaxp.xtp
-  -->
-  <!-- xml -->
-  <system-property javax.xml.parsers.DocumentBuilderFactory=
-               "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
-  <system-property javax.xml.parsers.SAXParserFactory=
-               "org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
-  <!--  xslt -->
-  <system-property javax.xml.transform.TransformerFactory=
-               "org.apache.xalan.processor.TransformerFactoryImpl"/>
-</web-app>
diff --git a/trunk/assembly/src/release/example/conf/web.xml b/trunk/assembly/src/release/example/conf/web.xml
deleted file mode 100644
index e6452fb..0000000
--- a/trunk/assembly/src/release/example/conf/web.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    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.
--->
-
-<!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-    "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
-  <display-name>ActiveMQ Message Broker Web Application</display-name>
-
-  <description>
-        ActiveMQ web application to deploy the Broker in a servlet engine.
-  </description>
-
-  <context-param>
-    <param-name>brokerURI</param-name>
-    <param-value>/WEB-INF/activemq.xml</param-value>
-  </context-param>
-
-  <listener>
-    <listener-class>org.apache.activemq.web.SpringBrokerContextListener</listener-class>
-  </listener>
-</web-app>
-
diff --git a/trunk/assembly/src/release/example/perfharness/perfharness-activemq.sh b/trunk/assembly/src/release/example/perfharness/perfharness-activemq.sh
deleted file mode 100755
index 3d9a001..0000000
--- a/trunk/assembly/src/release/example/perfharness/perfharness-activemq.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-# ==================================================================
-# Helper script to run the IBM JMS performance harness against
-# the ActiveMQ message broker.
-#
-# Sample Usage: 
-#   ./perfharness-activemq.sh -d dynamicQueues/FOO -tc jms.r11.PutGet -nt 6
-#
-# It assumes that the apache-activemq-5.0-SNAPSHOT.jar and 
-# perfharness.jar files are in the current directory.  If they are not,
-# set the ACTIVEMQ_HOME and PERFHARNESS_HOME env variable to the correct location.
-#
-# You can download the perfharness.jar file from:
-# http://www.alphaworks.ibm.com/tech/perfharness
-#
-# By Default the test connects the the vm://localhost broker.  To change that, use
-# set the BROKER_URL to the broker url you want to use.
-#
-# ==================================================================
-
-if [ -z "$PERFHARNESS_HOME" ] ; then
-   PERFHARNESS_HOME=.
-fi
-
-if [ -z "$ACTIVEMQ_HOME" ] ; then
-   ACTIVEMQ_HOME=../..
-fi
-
-if [ -z "$BROKER_URL" ] ; then
-   BROKER_URL='vm://(broker://()/localhost?useJmx=false)/localhost'
-fi
-
-java ${JAVA_OPTIONS} -cp ${ACTIVEMQ_HOME}/apache-activemq-5.0-SNAPSHOT.jar:${PERFHARNESS_HOME}/perfharness.jar JMSPerfHarness -pc JNDI -ii org.apache.activemq.jndi.ActiveMQInitialContextFactory -iu $BROKER_URL -cf ConnectionFactory -d dynamic$DESTINATION $@
diff --git a/trunk/assembly/src/release/example/ruby/README.txt b/trunk/assembly/src/release/example/ruby/README.txt
deleted file mode 100644
index 150a971..0000000
--- a/trunk/assembly/src/release/example/ruby/README.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-
-Prereqs
-=======
-
-- Install RubyGems see: http://docs.rubygems.org/
-- Install the stomp gem.  Run: gem install stomp
-
-Overview of stompcat.rb and catstomp.rb 
-==========================================
-
-The basic idea behind these scripts to to create something like netcat except over JMS destinations.
-
-catstomp - takes stdin and sends it to a stomp destination
-stompcat - outputs data received from a stomp destination
-
-A simple example usage:
-
-In console 1 run:
-cat | ./catstomp.rb
-
-In console 2 run:
-./stompcat.rb
-
-now any line you enter into console 1 will get sent to console 2.
-
-Hopefully these to scripts can get merged together in the future and the command line arguments can change
-so that it look more like netcat.
diff --git a/trunk/assembly/src/release/example/ruby/catstomp.rb b/trunk/assembly/src/release/example/ruby/catstomp.rb
deleted file mode 100755
index 96c6c49..0000000
--- a/trunk/assembly/src/release/example/ruby/catstomp.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-require 'rubygems'
-require 'stomp'
-
-begin
-  
-    @port = 61613
-    @host = "localhost"
-    @user = ENV["STOMP_USER"];
-    @password = ENV["STOMP_PASSWORD"]
-    
-    @host = ENV["STOMP_HOST"] if ENV["STOMP_HOST"] != NIL
-    @port = ENV["STOMP_PORT"] if ENV["STOMP_PORT"] != NIL
-    
-    @destination = "/topic/stompcat"
-    @destination = $*[0] if $*[0] != NIL
-    
-    $stderr.print "Connecting to stomp://#{@host}:#{@port} as #{@user}\n"
-    @conn = Stomp::Connection.open @user, @password, @host, @port, true
-    $stderr.print "Sending input to #{@destination}\n"
-
-    @headers = {'persistent'=>'false'} 
-    @headers['reply-to'] = $*[1] if $*[1] != NIL
-
-    STDIN.each_line { |line| 
-        @conn.send @destination, line, @headers
-    }
-    @conn.disconnect
-
-rescue 
-end
-
diff --git a/trunk/assembly/src/release/example/ruby/listener.rb b/trunk/assembly/src/release/example/ruby/listener.rb
deleted file mode 100755
index c11efc3..0000000
--- a/trunk/assembly/src/release/example/ruby/listener.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
- 
-require 'rubygems'
-require 'stomp'
-
-@conn = Stomp::Connection.open '', '', 'localhost', 61613, false 
-@count = 0
-
-@conn.subscribe '/topic/event', { :ack =>"auto" }
-while true 
-	@msg = @conn.receive
-	if @msg.command == "MESSAGE" 
-		if @msg.body == "SHUTDOWN"
-			exit 0
-	
-		elsif @msg.body == "REPORT"
-			@diff = Time.now - @start
-			@body = "Received #{@count} in #{@diff} seconds";
-			@conn.send '/queue/response', @body, {'persistent'=>'false'}
-			@count = 0;
-		else
-			if @count == 0 
-				@start = Time.now
-			end
-
-			@count += 1;
-			if @count % 1000 == 0
- 				$stdout.print "Received #{@count} messages.\n"
-			end
-		end
-	else
- 		$stdout.print "#{@msg.command}: #{@msg.body}\n"
-	end
-end
-@conn.disconnect
\ No newline at end of file
diff --git a/trunk/assembly/src/release/example/ruby/publisher.rb b/trunk/assembly/src/release/example/ruby/publisher.rb
deleted file mode 100755
index ed647ba..0000000
--- a/trunk/assembly/src/release/example/ruby/publisher.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
- 
-require 'rubygems'
-require 'stomp'
-
-@conn = Stomp::Connection.open '', '', 'localhost', 61613, false 
-@messages = 10000
-@batches = 40
-@subscribers = 10
-@size = 256
-
-@DATA = "abcdefghijklmnopqrstuvwxyz";
-@body = "";
-for i in 0..(@size-1)
-	@body += @DATA[ i % @DATA.length,1]
-end
-
-@times = []
-@conn.subscribe '/queue/response', { :ack =>"auto" }
-
-for i in 1..(@batches)
-	@body += @DATA[ i % @DATA.length,1]
-	sleep 1 if i == 1
-
- 	@start = Time.now	
-
-	for j in 1..@messages
-		@conn.send '/topic/event', @body, {'persistent'=>'false'}
-		$stdout.print "Sent #{j} messages\n" if j%1000==0
-	end
-	@conn.send '/topic/event', "REPORT", {'persistent'=>'false'}
-
-	@remaining = @subscribers
-	while @remaining > 0
-		@msg = @conn.receive
-		if @msg.command == "MESSAGE" 
-			@remaining -= 1
-			$stdout.print "Received report: #{@msg.body}, remaining: #{@remaining}\n"
-		else
- 			$stdout.print "#{@msg.command}: #{@msg.body}\n"
-		end
-	end
- 	@diff = Time.now-@start
-
-	$stdout.print "Batch #{i} of #{@batches} completed in #{@diff} seconds.\n"
-	@times[i] = @diff
-end
-
-@conn.send '/topic/event', "SHUTDOWN", {'persistent'=>'false'}
-
-@conn.disconnect
\ No newline at end of file
diff --git a/trunk/assembly/src/release/example/ruby/stompcat.rb b/trunk/assembly/src/release/example/ruby/stompcat.rb
deleted file mode 100755
index a77b77e..0000000
--- a/trunk/assembly/src/release/example/ruby/stompcat.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/ruby
-# ------------------------------------------------------------------------
-# 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.
-# ------------------------------------------------------------------------
-
-require 'rubygems'
-require 'stomp'
-
-begin
-
-    @port = 61613
-    @host = "localhost"
-    @user = ENV["STOMP_USER"];
-    @password = ENV["STOMP_PASSWORD"]
-    
-    @host = ENV["STOMP_HOST"] if ENV["STOMP_HOST"] != NIL
-    @port = ENV["STOMP_PORT"] if ENV["STOMP_PORT"] != NIL
-    
-    @destination = "/topic/stompcat"
-    @destination = $*[0] if $*[0] != NIL
-    
-    $stderr.print "Connecting to stomp://#{@host}:#{@port} as #{@user}\n"
-    @conn = Stomp::Connection.open @user, @password, @host, @port, true
-    $stderr.print "Getting output from #{@destination}\n"
-
-    @conn.subscribe @destination, { :ack =>"client" }
-    while true
-        @msg = @conn.receive
-        $stdout.print @msg.body
-        $stdout.flush
-        @conn.ack @msg.headers["message-id"]
-    end
-    @conn.disconnect
-  
-rescue 
-end
-
diff --git a/trunk/assembly/src/release/example/src/CommandLineSupport.java b/trunk/assembly/src/release/example/src/CommandLineSupport.java
deleted file mode 100644
index cbde8a4..0000000
--- a/trunk/assembly/src/release/example/src/CommandLineSupport.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**

- * 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.

- */

-

-import java.util.ArrayList;

-

-import org.apache.activemq.util.IntrospectionSupport;

-

-/**

- * Helper utility that can be used to set the properties on any object using

- * command line arguments.

- * 

- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>

- */

-public final class CommandLineSupport {

-

-    private CommandLineSupport() {

-    }

-    

-    /**

-     * Sets the properties of an object given the command line args.

-     * 

-     * if args contains: --ack-mode=AUTO --url=tcp://localhost:61616 --persistent 

-     * 

-     * then it will try to call the following setters on the target object.

-     * 

-     * target.setAckMode("AUTO");

-     * target.setURL(new URI("tcp://localhost:61616") );

-     * target.setPersistent(true);

-     * 

-     * Notice the the proper conversion for the argument is determined by examining the 

-     * setter arguement type.  

-     * 

-     * @param target the object that will have it's properties set

-     * @param args the commline options

-     * @return any arguments that are not valid options for the target

-     */

-    public static String[] setOptions(Object target, String[] args) {

-        ArrayList<String> rc = new ArrayList<String>();

-

-        for (int i = 0; i < args.length; i++) {

-            if (args[i] == null) {

-                continue;

-            }

-

-            if (args[i].startsWith("--")) {

-

-                // --options without a specified value are considered boolean

-                // flags that are enabled.

-                String value = "true";

-                String name = args[i].substring(2);

-

-                // if --option=value case

-                int p = name.indexOf("=");

-                if (p > 0) {

-                    value = name.substring(p + 1);

-                    name = name.substring(0, p);

-                }

-

-                // name not set, then it's an unrecognized option

-                if (name.length() == 0) {

-                    rc.add(args[i]);

-                    continue;

-                }

-

-                String propName = convertOptionToPropertyName(name);

-                if (!IntrospectionSupport.setProperty(target, propName, value)) {

-                    rc.add(args[i]);

-                    continue;

-                }

-            }

-

-        }

-

-        String r[] = new String[rc.size()];

-        rc.toArray(r);

-        return r;

-    }

-

-    /**

-     * converts strings like: test-enabled to testEnabled

-     * 

-     * @param name

-     * @return

-     */

-    private static String convertOptionToPropertyName(String name) {

-        String rc = "";

-

-        // Look for '-' and strip and then convert the subsequent char to

-        // uppercase

-        int p = name.indexOf("-");

-        while (p > 0) {

-            // strip

-            rc += name.substring(0, p);

-            name = name.substring(p + 1);

-

-            // can I convert the next char to upper?

-            if (name.length() > 0) {

-                rc += name.substring(0, 1).toUpperCase();

-                name = name.substring(1);

-            }

-

-            p = name.indexOf("-");

-        }

-        return rc + name;

-    }

-}

diff --git a/trunk/assembly/src/release/example/src/ConsumerTool.java b/trunk/assembly/src/release/example/src/ConsumerTool.java
deleted file mode 100755
index 4c5063f..0000000
--- a/trunk/assembly/src/release/example/src/ConsumerTool.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * 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.
- */
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * A simple tool for consuming messages
- * 
- * 
- */
-public class ConsumerTool extends Thread implements MessageListener, ExceptionListener {
-
-    private boolean running;
-
-    private Session session;
-    private Destination destination;
-    private MessageProducer replyProducer;
-
-    private boolean pauseBeforeShutdown = false;
-    private boolean verbose = true;
-    private int maxiumMessages;
-    private static int parallelThreads = 1;
-    private String subject = "TOOL.DEFAULT";
-    private boolean topic;
-    private String user = ActiveMQConnection.DEFAULT_USER;
-    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
-    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
-    private boolean transacted;
-    private boolean durable;
-    private String clientId;
-    private int ackMode = Session.AUTO_ACKNOWLEDGE;
-    private String consumerName = "James";
-    private long sleepTime;
-    private long receiveTimeOut;
-	private long batch = 10; // Default batch size for CLIENT_ACKNOWLEDGEMENT or SESSION_TRANSACTED
-	private long messagesReceived = 0;
-
-    public static void main(String[] args) {
-        ArrayList<ConsumerTool> threads = new ArrayList();
-        ConsumerTool consumerTool = new ConsumerTool();
-        String[] unknown = CommandLineSupport.setOptions(consumerTool, args);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        consumerTool.showParameters();
-        for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) {
-            consumerTool = new ConsumerTool();
-            CommandLineSupport.setOptions(consumerTool, args);
-            consumerTool.start();
-            threads.add(consumerTool);
-        }
-
-        while (true) {
-            Iterator<ConsumerTool> itr = threads.iterator();
-            int running = 0;
-            while (itr.hasNext()) {
-                ConsumerTool thread = itr.next();
-                if (thread.isAlive()) {
-                    running++;
-                }
-            }
-
-            if (running <= 0) {
-                System.out.println("All threads completed their work");
-                break;
-            }
-
-            try {
-                Thread.sleep(1000);
-            } catch (Exception e) {
-            }
-        }
-        Iterator<ConsumerTool> itr = threads.iterator();
-        while (itr.hasNext()) {
-            ConsumerTool thread = itr.next();
-        }
-    }
-
-    public void showParameters() {
-        System.out.println("Connecting to URL: " + url);
-        System.out.println("Consuming " + (topic ? "topic" : "queue") + ": " + subject);
-        System.out.println("Using a " + (durable ? "durable" : "non-durable") + " subscription");
-        System.out.println("Running " + parallelThreads + " parallel threads");
-    }
-
-    public void run() {
-        try {
-            running = true;
-
-            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-            Connection connection = connectionFactory.createConnection();
-            if (durable && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
-                connection.setClientID(clientId);
-            }
-            connection.setExceptionListener(this);
-            connection.start();
-
-            session = connection.createSession(transacted, ackMode);
-            if (topic) {
-                destination = session.createTopic(subject);
-            } else {
-                destination = session.createQueue(subject);
-            }
-
-            replyProducer = session.createProducer(null);
-            replyProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-            MessageConsumer consumer = null;
-            if (durable && topic) {
-                consumer = session.createDurableSubscriber((Topic) destination, consumerName);
-            } else {
-                consumer = session.createConsumer(destination);
-            }
-
-            if (maxiumMessages > 0) {
-                consumeMessagesAndClose(connection, session, consumer);
-            } else {
-                if (receiveTimeOut == 0) {
-                    consumer.setMessageListener(this);
-                } else {
-                    consumeMessagesAndClose(connection, session, consumer, receiveTimeOut);
-                }
-            }
-
-        } catch (Exception e) {
-            System.out.println("[" + this.getName() + "] Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void onMessage(Message message) {
-
-		messagesReceived++;
-
-        try {
-
-            if (message instanceof TextMessage) {
-                TextMessage txtMsg = (TextMessage) message;
-                if (verbose) {
-
-                    String msg = txtMsg.getText();
-                    int length = msg.length();
-                    if (length > 50) {
-                        msg = msg.substring(0, 50) + "...";
-                    }
-                    System.out.println("[" + this.getName() + "] Received: '" + msg + "' (length " + length + ")");
-                }
-            } else {
-                if (verbose) {
-                    System.out.println("[" + this.getName() + "] Received: '" + message + "'");
-                }
-            }
-
-            if (message.getJMSReplyTo() != null) {
-                replyProducer.send(message.getJMSReplyTo(), session.createTextMessage("Reply: " + message.getJMSMessageID()));
-            }
-
-            if (transacted) {
-				if ((messagesReceived % batch) == 0) {
-					System.out.println("Commiting transaction for last " + batch + " messages; messages so far = " + messagesReceived);
-					session.commit();
-				}
-            } else if (ackMode == Session.CLIENT_ACKNOWLEDGE) {
-				if ((messagesReceived % batch) == 0) {
-					System.out.println("Acknowledging last " + batch + " messages; messages so far = " + messagesReceived);
-					message.acknowledge();
-				}
-            }
-
-        } catch (JMSException e) {
-            System.out.println("[" + this.getName() + "] Caught: " + e);
-            e.printStackTrace();
-        } finally {
-            if (sleepTime > 0) {
-                try {
-                    Thread.sleep(sleepTime);
-                } catch (InterruptedException e) {
-                }
-            }
-        }
-    }
-
-    public synchronized void onException(JMSException ex) {
-        System.out.println("[" + this.getName() + "] JMS Exception occured.  Shutting down client.");
-        running = false;
-    }
-
-    synchronized boolean isRunning() {
-        return running;
-    }
-
-    protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer) throws JMSException,
-            IOException {
-        System.out.println("[" + this.getName() + "] We are about to wait until we consume: " + maxiumMessages
-                + " message(s) then we will shutdown");
-
-        for (int i = 0; i < maxiumMessages && isRunning();) {
-            Message message = consumer.receive(1000);
-            if (message != null) {
-                i++;
-                onMessage(message);
-            }
-        }
-        System.out.println("[" + this.getName() + "] Closing connection");
-        consumer.close();
-        session.close();
-        connection.close();
-        if (pauseBeforeShutdown) {
-            System.out.println("[" + this.getName() + "] Press return to shut down");
-            System.in.read();
-        }
-    }
-
-    protected void consumeMessagesAndClose(Connection connection, Session session, MessageConsumer consumer, long timeout)
-            throws JMSException, IOException {
-        System.out.println("[" + this.getName() + "] We will consume messages while they continue to be delivered within: " + timeout
-                + " ms, and then we will shutdown");
-
-        Message message;
-        while ((message = consumer.receive(timeout)) != null) {
-            onMessage(message);
-        }
-
-        System.out.println("[" + this.getName() + "] Closing connection");
-        consumer.close();
-        session.close();
-        connection.close();
-        if (pauseBeforeShutdown) {
-            System.out.println("[" + this.getName() + "] Press return to shut down");
-            System.in.read();
-        }
-    }
-
-    public void setAckMode(String ackMode) {
-        if ("CLIENT_ACKNOWLEDGE".equals(ackMode)) {
-            this.ackMode = Session.CLIENT_ACKNOWLEDGE;
-        }
-        if ("AUTO_ACKNOWLEDGE".equals(ackMode)) {
-            this.ackMode = Session.AUTO_ACKNOWLEDGE;
-        }
-        if ("DUPS_OK_ACKNOWLEDGE".equals(ackMode)) {
-            this.ackMode = Session.DUPS_OK_ACKNOWLEDGE;
-        }
-        if ("SESSION_TRANSACTED".equals(ackMode)) {
-            this.ackMode = Session.SESSION_TRANSACTED;
-        }
-    }
-
-    public void setClientId(String clientID) {
-        this.clientId = clientID;
-    }
-
-    public void setConsumerName(String consumerName) {
-        this.consumerName = consumerName;
-    }
-
-    public void setDurable(boolean durable) {
-        this.durable = durable;
-    }
-
-    public void setMaxiumMessages(int maxiumMessages) {
-        this.maxiumMessages = maxiumMessages;
-    }
-
-    public void setPauseBeforeShutdown(boolean pauseBeforeShutdown) {
-        this.pauseBeforeShutdown = pauseBeforeShutdown;
-    }
-
-    public void setPassword(String pwd) {
-        this.password = pwd;
-    }
-
-    public void setReceiveTimeOut(long receiveTimeOut) {
-        this.receiveTimeOut = receiveTimeOut;
-    }
-
-    public void setSleepTime(long sleepTime) {
-        this.sleepTime = sleepTime;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public void setParallelThreads(int parallelThreads) {
-        if (parallelThreads < 1) {
-            parallelThreads = 1;
-        }
-        this.parallelThreads = parallelThreads;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public void setQueue(boolean queue) {
-        this.topic = !queue;
-    }
-
-    public void setTransacted(boolean transacted) {
-        this.transacted = transacted;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public void setBatch(long batch) {
-        this.batch = batch;
-    }
-}
diff --git a/trunk/assembly/src/release/example/src/EmbeddedBroker.java b/trunk/assembly/src/release/example/src/EmbeddedBroker.java
deleted file mode 100644
index d45ceff..0000000
--- a/trunk/assembly/src/release/example/src/EmbeddedBroker.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.
- */
-import org.apache.activemq.broker.BrokerService;
-
-/**
- * This example demonstrates how to run an embedded broker inside your Java code
- * 
- * 
- */
-public final class EmbeddedBroker {
-
-    private EmbeddedBroker() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        BrokerService broker = new BrokerService();
-        broker.setUseJmx(true);
-        broker.addConnector("tcp://localhost:61616");
-        broker.start();
-
-        // now lets wait forever to avoid the JVM terminating immediately
-        Object lock = new Object();
-        synchronized (lock) {
-            lock.wait();
-        }
-    }
-}
diff --git a/trunk/assembly/src/release/example/src/Log4jJMSAppenderExample.java b/trunk/assembly/src/release/example/src/Log4jJMSAppenderExample.java
deleted file mode 100644
index 657b9b2..0000000
--- a/trunk/assembly/src/release/example/src/Log4jJMSAppenderExample.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.
- */
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.log4j.Logger;
-import org.apache.log4j.spi.LoggingEvent;
-
-
-/**
- * A simple example of log4j jms appender in conjuction with ActiveMQ
- */
-public class Log4jJMSAppenderExample implements MessageListener {
-
-	public Log4jJMSAppenderExample() throws Exception {
-		// create a logTopic topic consumer
-		ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
-		Connection conn = factory.createConnection();
-		Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		conn.start();
-		MessageConsumer consumer = sess.createConsumer(sess.createTopic("logTopic"));
-		consumer.setMessageListener(this);
-		// log a message
-		Logger log = Logger.getLogger(Log4jJMSAppenderExample.class);
-		log.info("Test log");
-		// clean up
-		Thread.sleep(1000);
-		consumer.close();
-		sess.close();
-		conn.close();
-		System.exit(1);
-	}
-	
-	public static void main(String[] args) throws Exception {
-		new Log4jJMSAppenderExample();
-	}
-
-	public void onMessage(Message message) {
-		try {
-			// receive log event in your consumer
-			LoggingEvent event = (LoggingEvent)((ActiveMQObjectMessage)message).getObject();
-			System.out.println("Received log [" + event.getLevel() + "]: "+ event.getMessage());
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-	
-	
-	
-}
\ No newline at end of file
diff --git a/trunk/assembly/src/release/example/src/ProducerAndConsumerTool.java b/trunk/assembly/src/release/example/src/ProducerAndConsumerTool.java
deleted file mode 100644
index a1b96ff..0000000
--- a/trunk/assembly/src/release/example/src/ProducerAndConsumerTool.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.
- */
-
-import java.util.Arrays;
-import java.util.HashSet;
-
-import javax.jms.MessageListener;
-
-/**
- * A simple tool for producing and consuming messages
- * 
- * 
- */
-public class ProducerAndConsumerTool extends ConsumerTool implements MessageListener {
-
-    public static void main(String[] args) {
-
-        ConsumerTool consumerTool = new ConsumerTool();
-        String[] unknown = CommandLineSupport.setOptions(consumerTool, args);
-        HashSet<String> set1 = new HashSet<String>(Arrays.asList(unknown));
-
-        ProducerTool producerTool = new ProducerTool();
-        unknown = CommandLineSupport.setOptions(producerTool, args);
-        HashSet<String> set2 = new HashSet<String>(Arrays.asList(unknown));
-
-        set1.retainAll(set2);
-        if (set1.size() > 0) {
-            System.out.println("Unknown options: " + set1);
-            System.exit(-1);
-        }
-
-        consumerTool.run();
-        producerTool.run();
-
-    }
-
-}
diff --git a/trunk/assembly/src/release/example/src/ProducerTool.java b/trunk/assembly/src/release/example/src/ProducerTool.java
deleted file mode 100755
index 43630fe..0000000
--- a/trunk/assembly/src/release/example/src/ProducerTool.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
- * 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.
- */
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-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.util.IndentPrinter;
-
-/**
- * A simple tool for publishing messages
- * 
- * 
- */
-public class ProducerTool extends Thread {
-
-    private Destination destination;
-    private int messageCount = 10;
-    private long sleepTime;
-    private boolean verbose = true;
-    private int messageSize = 255;
-    private static int parallelThreads = 1;
-    private long timeToLive;
-    private String user = ActiveMQConnection.DEFAULT_USER;
-    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
-    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
-    private String subject = "TOOL.DEFAULT";
-    private boolean topic;
-    private boolean transacted;
-    private boolean persistent;
-    private static Object lockResults = new Object();
-
-    public static void main(String[] args) {
-        ArrayList<ProducerTool> threads = new ArrayList();
-        ProducerTool producerTool = new ProducerTool();
-        String[] unknown = CommandLineSupport.setOptions(producerTool, args);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        producerTool.showParameters();
-        for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) {
-            producerTool = new ProducerTool();
-            CommandLineSupport.setOptions(producerTool, args);
-            producerTool.start();
-            threads.add(producerTool);
-        }
-
-        while (true) {
-            Iterator<ProducerTool> itr = threads.iterator();
-            int running = 0;
-            while (itr.hasNext()) {
-                ProducerTool thread = itr.next();
-                if (thread.isAlive()) {
-                    running++;
-                }
-            }
-            if (running <= 0) {
-                System.out.println("All threads completed their work");
-                break;
-            }
-            try {
-                Thread.sleep(1000);
-            } catch (Exception e) {
-            }
-        }
-    }
-
-    public void showParameters() {
-        System.out.println("Connecting to URL: " + url);
-        System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
-        System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
-        System.out.println("Sleeping between publish " + sleepTime + " ms");
-        System.out.println("Running " + parallelThreads + " parallel threads");
-
-        if (timeToLive != 0) {
-            System.out.println("Messages time to live " + timeToLive + " ms");
-        }
-    }
-
-    public void run() {
-        Connection connection = null;
-        try {
-            // Create the connection.
-            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-            connection = connectionFactory.createConnection();
-            connection.start();
-
-            // Create the session
-            Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-            if (topic) {
-                destination = session.createTopic(subject);
-            } else {
-                destination = session.createQueue(subject);
-            }
-
-            // Create the producer.
-            MessageProducer producer = session.createProducer(destination);
-            if (persistent) {
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            } else {
-                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-            }
-            if (timeToLive != 0) {
-                producer.setTimeToLive(timeToLive);
-            }
-
-            // Start sending messages
-            sendLoop(session, producer);
-
-            System.out.println("[" + this.getName() + "] Done.");
-
-            synchronized (lockResults) {
-                ActiveMQConnection c = (ActiveMQConnection) connection;
-                System.out.println("[" + this.getName() + "] Results:\n");
-                c.getConnectionStats().dump(new IndentPrinter());
-            }
-
-        } catch (Exception e) {
-            System.out.println("[" + this.getName() + "] Caught: " + e);
-            e.printStackTrace();
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected void sendLoop(Session session, MessageProducer producer) throws Exception {
-
-        for (int i = 0; i < messageCount || messageCount == 0; i++) {
-
-            TextMessage message = session.createTextMessage(createMessageText(i));
-
-            if (verbose) {
-                String msg = message.getText();
-                if (msg.length() > 50) {
-                    msg = msg.substring(0, 50) + "...";
-                }
-                System.out.println("[" + this.getName() + "] Sending message: '" + msg + "'");
-            }
-
-            producer.send(message);
-
-            if (transacted) {
-                System.out.println("[" + this.getName() + "] Committing " + messageCount + " messages");
-                session.commit();
-            }
-            Thread.sleep(sleepTime);
-        }
-    }
-
-    private String createMessageText(int index) {
-        StringBuffer buffer = new StringBuffer(messageSize);
-        buffer.append("Message: " + index + " sent at: " + new Date());
-        if (buffer.length() > messageSize) {
-            return buffer.substring(0, messageSize);
-        }
-        for (int i = buffer.length(); i < messageSize; i++) {
-            buffer.append(' ');
-        }
-        return buffer.toString();
-    }
-
-    public void setPersistent(boolean durable) {
-        this.persistent = durable;
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    public void setMessageSize(int messageSize) {
-        this.messageSize = messageSize;
-    }
-
-    public void setPassword(String pwd) {
-        this.password = pwd;
-    }
-
-    public void setSleepTime(long sleepTime) {
-        this.sleepTime = sleepTime;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public void setTimeToLive(long timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-    public void setParallelThreads(int parallelThreads) {
-        if (parallelThreads < 1) {
-            parallelThreads = 1;
-        }
-        this.parallelThreads = parallelThreads;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public void setQueue(boolean queue) {
-        this.topic = !queue;
-    }
-
-    public void setTransacted(boolean transacted) {
-        this.transacted = transacted;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-}
diff --git a/trunk/assembly/src/release/example/src/RequesterTool.java b/trunk/assembly/src/release/example/src/RequesterTool.java
deleted file mode 100644
index cd1a650..0000000
--- a/trunk/assembly/src/release/example/src/RequesterTool.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * 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.
- */
-import java.util.Arrays;
-import java.util.Date;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.Message;
-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.util.IndentPrinter;
-
-/**
- * A simple tool for publishing messages
- * 
- * 
- */
-public class RequesterTool {
-
-    private int messageCount = 10;
-    private long sleepTime;
-    private boolean verbose = true;
-    private int messageSize = 255;
-    private long timeToLive;
-    private String subject = "TOOL.DEFAULT";
-    private String replySubject;
-    private boolean topic;
-    private String user = ActiveMQConnection.DEFAULT_USER;
-    private String password = ActiveMQConnection.DEFAULT_PASSWORD;
-    private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
-    private boolean transacted;
-    private boolean persistent;
-    private String clientId;
-
-    private Destination destination;
-    private Destination replyDest;
-    private MessageProducer producer;
-    private MessageConsumer consumer;
-    private Session session;
-
-    public static void main(String[] args) {
-        RequesterTool requesterTool = new RequesterTool();
-        String[] unknown = CommandLineSupport.setOptions(requesterTool, args);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        requesterTool.run();
-    }
-
-    public void run() {
-
-        Connection connection = null;
-        try {
-
-            System.out.println("Connecting to URL: " + url);
-            System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
-            System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
-            System.out.println("Sleeping between publish " + sleepTime + " ms");
-
-            // Create the connection
-            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-            connection = connectionFactory.createConnection();
-            if (persistent && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
-                connection.setClientID(clientId);
-            }
-            connection.start();
-
-            // Create the Session
-            session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
-
-            // And the Destinations..
-            if (topic) {
-                destination = session.createTopic(subject);
-                if (replySubject == null || replySubject.equals("")) {
-                    replyDest = session.createTemporaryTopic();
-                } else {
-                    replyDest = session.createTopic(replySubject);
-                }
-            } else {
-                destination = session.createQueue(subject);
-                if (replySubject == null || replySubject.equals("")) {
-                    replyDest = session.createTemporaryQueue();
-                } else {
-                    replyDest = session.createQueue(replySubject);
-                }
-            }
-            System.out.println("Reply Destination: " + replyDest);
-
-            // Create the producer
-            producer = session.createProducer(destination);
-            if (persistent) {
-                producer.setDeliveryMode(DeliveryMode.PERSISTENT);
-            } else {
-                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-            }
-            if (timeToLive != 0) {
-                System.out.println("Messages time to live " + timeToLive + " ms");
-                producer.setTimeToLive(timeToLive);
-            }
-
-            // Create the reply consumer
-            consumer = session.createConsumer(replyDest);
-
-            // Start sending reqests.
-            requestLoop();
-
-            System.out.println("Done.");
-
-            // Use the ActiveMQConnection interface to dump the connection
-            // stats.
-            ActiveMQConnection c = (ActiveMQConnection)connection;
-            c.getConnectionStats().dump(new IndentPrinter());
-
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        } finally {
-            try {
-                connection.close();
-            } catch (Throwable ignore) {
-            }
-        }
-    }
-
-    protected void requestLoop() throws Exception {
-
-        for (int i = 0; i < messageCount || messageCount == 0; i++) {
-
-            TextMessage message = session.createTextMessage(createMessageText(i));
-            message.setJMSReplyTo(replyDest);
-
-            if (verbose) {
-                String msg = message.getText();
-                if (msg.length() > 50) {
-                    msg = msg.substring(0, 50) + "...";
-                }
-                System.out.println("Sending message: " + msg);
-            }
-
-            producer.send(message);
-            if (transacted) {
-                session.commit();
-            }
-
-            System.out.println("Waiting for reponse message...");
-            Message message2 = consumer.receive();
-            if (message2 instanceof TextMessage) {
-                System.out.println("Reponse message: " + ((TextMessage)message2).getText());
-            } else {
-                System.out.println("Reponse message: " + message2);
-            }
-            if (transacted) {
-                session.commit();
-            }
-
-            Thread.sleep(sleepTime);
-
-        }
-    }
-
-    /**
-     * @param i
-     * @return
-     */
-    private String createMessageText(int index) {
-        StringBuffer buffer = new StringBuffer(messageSize);
-        buffer.append("Message: " + index + " sent at: " + new Date());
-        if (buffer.length() > messageSize) {
-            return buffer.substring(0, messageSize);
-        }
-        for (int i = buffer.length(); i < messageSize; i++) {
-            buffer.append(' ');
-        }
-        return buffer.toString();
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public void setPersistent(boolean durable) {
-        this.persistent = durable;
-    }
-
-    public void setMessageCount(int messageCount) {
-        this.messageCount = messageCount;
-    }
-
-    public void setMessageSize(int messageSize) {
-        this.messageSize = messageSize;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public void setSleepTime(long sleepTime) {
-        this.sleepTime = sleepTime;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public void setTimeToLive(long timeToLive) {
-        this.timeToLive = timeToLive;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public void setQueue(boolean queue) {
-        this.topic = !queue;
-    }
-
-    public void setTransacted(boolean transacted) {
-        this.transacted = transacted;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public void setUser(String user) {
-        this.user = user;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public void setReplySubject(String replySubject) {
-        this.replySubject = replySubject;
-    }
-}
diff --git a/trunk/assembly/src/release/example/src/StompExample.java b/trunk/assembly/src/release/example/src/StompExample.java
deleted file mode 100644
index 56446c4..0000000
--- a/trunk/assembly/src/release/example/src/StompExample.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.
- */
-import org.apache.activemq.transport.stomp.Stomp;
-import org.apache.activemq.transport.stomp.StompConnection;
-import org.apache.activemq.transport.stomp.StompFrame;
-import org.apache.activemq.transport.stomp.Stomp.Headers.Subscribe;
-
-/**
- * 
- * This example demonstrates Stomp Java API
- * 
- * 
- *
- */
-public class StompExample {
-
-	public static void main(String args[]) throws Exception {
-		StompConnection connection = new StompConnection();
-		connection.open("localhost", 61613);
-		
-		connection.connect("system", "manager");
-		
-		connection.begin("tx1");
-		connection.send("/queue/test", "message1");
-		connection.send("/queue/test", "message2");
-		connection.commit("tx1");
-		
-		connection.subscribe("/queue/test", Subscribe.AckModeValues.CLIENT);
-		
-		connection.begin("tx2");
-		
-		StompFrame message = connection.receive();
-		System.out.println(message.getBody());
-		connection.ack(message, "tx2");
-		
-		message = connection.receive();
-		System.out.println(message.getBody());
-		connection.ack(message, "tx2");
-		
-		connection.commit("tx2");
-		
-		connection.disconnect();
-	}
-	
-}
diff --git a/trunk/assembly/src/release/example/src/TopicListener.java b/trunk/assembly/src/release/example/src/TopicListener.java
deleted file mode 100644
index dbecafd..0000000
--- a/trunk/assembly/src/release/example/src/TopicListener.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * 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.
- */
-import java.util.Arrays;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * Use in conjunction with TopicPublisher to test the performance of ActiveMQ
- * Topics.
- */
-public class TopicListener implements MessageListener {
-
-    private Connection connection;
-    private MessageProducer producer;
-    private Session session;
-    private int count;
-    private long start;
-    private Topic topic;
-    private Topic control;
-
-    private String url = "tcp://localhost:61616";
-
-    public static void main(String[] argv) throws Exception {
-        TopicListener l = new TopicListener();
-        String[] unknown = CommandLineSupport.setOptions(l, argv);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        l.run();
-    }
-
-    public void run() throws JMSException {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
-        connection = factory.createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = session.createTopic("topictest.messages");
-        control = session.createTopic("topictest.control");
-
-        MessageConsumer consumer = session.createConsumer(topic);
-        consumer.setMessageListener(this);
-
-        connection.start();
-
-        producer = session.createProducer(control);
-        System.out.println("Waiting for messages...");
-    }
-
-    private static boolean checkText(Message m, String s) {
-        try {
-            return m instanceof TextMessage && ((TextMessage)m).getText().equals(s);
-        } catch (JMSException e) {
-            e.printStackTrace(System.out);
-            return false;
-        }
-    }
-
-    public void onMessage(Message message) {
-        if (checkText(message, "SHUTDOWN")) {
-
-            try {
-                connection.close();
-            } catch (Exception e) {
-                e.printStackTrace(System.out);
-            }
-
-        } else if (checkText(message, "REPORT")) {
-            // send a report:
-            try {
-                long time = System.currentTimeMillis() - start;
-                String msg = "Received " + count + " in " + time + "ms";
-                producer.send(session.createTextMessage(msg));
-            } catch (Exception e) {
-                e.printStackTrace(System.out);
-            }
-            count = 0;
-
-        } else {
-
-            if (count == 0) {
-                start = System.currentTimeMillis();
-            }
-
-            if (++count % 1000 == 0) {
-                System.out.println("Received " + count + " messages.");
-            }
-        }
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-}
diff --git a/trunk/assembly/src/release/example/src/TopicPublisher.java b/trunk/assembly/src/release/example/src/TopicPublisher.java
deleted file mode 100644
index dd99846..0000000
--- a/trunk/assembly/src/release/example/src/TopicPublisher.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * 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.
- */
-import java.util.Arrays;
-
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * Use in conjunction with TopicListener to test the performance of ActiveMQ
- * Topics.
- */
-public class TopicPublisher implements MessageListener {
-
-    private static final char[] DATA = "abcdefghijklmnopqrstuvwxyz".toCharArray();
-
-    private final Object mutex = new Object();
-    private Connection connection;
-    private Session session;
-    private MessageProducer publisher;
-    private Topic topic;
-    private Topic control;
-
-    private String url = "tcp://localhost:61616";
-    private int size = 256;
-    private int subscribers = 1;
-    private int remaining;
-    private int messages = 10000;
-    private long delay;
-    private int batch = 2000;
-
-    private byte[] payload;
-
-    public static void main(String[] argv) throws Exception {
-        TopicPublisher p = new TopicPublisher();
-        String[] unknown = CommandLineSupport.setOptions(p, argv);
-        if (unknown.length > 0) {
-            System.out.println("Unknown options: " + Arrays.toString(unknown));
-            System.exit(-1);
-        }
-        p.run();
-    }
-
-    private void run() throws Exception {
-        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
-        connection = factory.createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        topic = session.createTopic("topictest.messages");
-        control = session.createTopic("topictest.control");
-
-        publisher = session.createProducer(topic);
-        publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-
-        payload = new byte[size];
-        for (int i = 0; i < size; i++) {
-            payload[i] = (byte)DATA[i % DATA.length];
-        }
-
-        session.createConsumer(control).setMessageListener(this);
-        connection.start();
-
-        long[] times = new long[batch];
-        for (int i = 0; i < batch; i++) {
-            if (i > 0) {
-                Thread.sleep(delay * 1000);
-            }
-            times[i] = batch(messages);
-            System.out.println("Batch " + (i + 1) + " of " + batch + " completed in " + times[i] + " ms.");
-        }
-
-        long min = min(times);
-        long max = max(times);
-        System.out.println("min: " + min + ", max: " + max + " avg: " + avg(times, min, max));
-
-        // request shutdown
-        publisher.send(session.createTextMessage("SHUTDOWN"));
-
-        connection.stop();
-        connection.close();
-    }
-
-    private long batch(int msgCount) throws Exception {
-        long start = System.currentTimeMillis();
-        remaining = subscribers;
-        publish();
-        waitForCompletion();
-        return System.currentTimeMillis() - start;
-    }
-
-    private void publish() throws Exception {
-
-        // send events
-        BytesMessage msg = session.createBytesMessage();
-        msg.writeBytes(payload);
-        for (int i = 0; i < messages; i++) {
-            publisher.send(msg);
-            if ((i + 1) % 1000 == 0) {
-                System.out.println("Sent " + (i + 1) + " messages");
-            }
-        }
-
-        // request report
-        publisher.send(session.createTextMessage("REPORT"));
-    }
-
-    private void waitForCompletion() throws Exception {
-        System.out.println("Waiting for completion...");
-        synchronized (mutex) {
-            while (remaining > 0) {
-                mutex.wait();
-            }
-        }
-    }
-
-    public void onMessage(Message message) {
-        synchronized (mutex) {
-            System.out.println("Received report " + getReport(message) + " " + --remaining + " remaining");
-            if (remaining == 0) {
-                mutex.notify();
-            }
-        }
-    }
-
-    Object getReport(Message m) {
-        try {
-            return ((TextMessage)m).getText();
-        } catch (JMSException e) {
-            e.printStackTrace(System.out);
-            return e.toString();
-        }
-    }
-
-    static long min(long[] times) {
-        long min = times.length > 0 ? times[0] : 0;
-        for (int i = 0; i < times.length; i++) {
-            min = Math.min(min, times[i]);
-        }
-        return min;
-    }
-
-    static long max(long[] times) {
-        long max = times.length > 0 ? times[0] : 0;
-        for (int i = 0; i < times.length; i++) {
-            max = Math.max(max, times[i]);
-        }
-        return max;
-    }
-
-    static long avg(long[] times, long min, long max) {
-        long sum = 0;
-        for (int i = 0; i < times.length; i++) {
-            sum += times[i];
-        }
-        sum -= min;
-        sum -= max;
-        return sum / times.length - 2;
-    }
-
-    public void setBatch(int batch) {
-        this.batch = batch;
-    }
-
-    public void setDelay(long delay) {
-        this.delay = delay;
-    }
-
-    public void setMessages(int messages) {
-        this.messages = messages;
-    }
-
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-    public void setSubscribers(int subscribers) {
-        this.subscribers = subscribers;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-}
diff --git a/trunk/assembly/src/release/example/src/jndi.properties b/trunk/assembly/src/release/example/src/jndi.properties
deleted file mode 100644
index 19dad58..0000000
--- a/trunk/assembly/src/release/example/src/jndi.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-topic.logTopic=logTopic
\ No newline at end of file
diff --git a/trunk/assembly/src/release/example/src/log4j-jms.properties b/trunk/assembly/src/release/example/src/log4j-jms.properties
deleted file mode 100644
index e28d6d6..0000000
--- a/trunk/assembly/src/release/example/src/log4j-jms.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-log4j.rootLogger=INFO, stdout, jms
-
-## Be sure that ActiveMQ messages are not logged to 'jms' appender
-log4j.logger.org.apache.activemq=INFO, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c - %m%n
-
-## Configure 'jms' appender. You'll also need jndi.properties file in order to make it work
-log4j.appender.jms=org.apache.log4j.net.JMSAppender
-log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
-log4j.appender.jms.ProviderURL=tcp://localhost:61616
-log4j.appender.jms.TopicBindingName=logTopic
-log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory
\ No newline at end of file
diff --git a/trunk/assembly/src/release/example/transactions/README.txt b/trunk/assembly/src/release/example/transactions/README.txt
deleted file mode 100644
index 2c3238a..0000000
--- a/trunk/assembly/src/release/example/transactions/README.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-Transactions Demo
-=================
-This example is an ActiveMQ implementation of the "TransactedExample" from
-Sun's JMS Tutorial (http://java.sun.com/products/jms/tutorial/index.html).
-
-The example simulates a simplified eCommerce application with four parts:
-the retailer who places the orders, the vendor who assemples the computers,
-and two suppliers--one for hard drives and another for monitors.
-
-The retailer sends a message to the vendor's queue and awaits a reply.
-The vendor receives the message and sends a message to each of the
-supplier's queues. It does this in a single transaction, and will randomly
-throw an exception simulating a database error, triggering a rollback.
-Each supplier receives the order, checks inventory and replies to the
-message stating how many items were sent.
-The vendor collects both responses and responds to the retailer, notifying
-wheather it cna fulfill the complete order or not.
-The retailer receives the message from the vendor.
-
-Running the Example
-===================
-To run the complete demo in a single JVM, with ActiveMQ running on the local
-computer:
-  ant transactions_demo
-
-If you are running ActiveMQ on a non-standard port, or on a different host,
-you can pass a url on the commandline:
-  ant -Durl=tcp://localhost:61616 transactions_demo
-
-If your ActiveMQ instance is password-protected, you can also pass a
-username and password on the command line:
-  ant -Duser=myusername -Dpassword=supersecret transactions_demo
-
-You can also run the individual components seperately, again with optional
-url and/or authentication parameters:
-  ant retailer &
-  ant vendor &
-  ant hdsupplier &
-  ant monitorsupplier &
-
diff --git a/trunk/assembly/src/release/example/transactions/build.xml b/trunk/assembly/src/release/example/transactions/build.xml
deleted file mode 100644
index 839cde2..0000000
--- a/trunk/assembly/src/release/example/transactions/build.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project name="transactions" default="help" basedir=".">
-
-    <property name="class.dir" value="target/classes" />
-    <property name="activemq.home" value="../.." />
-
-    <!-- example program defaults -->
-    <property name="url" value="tcp://localhost:61616" />
-    <target name="help">
-        <echo>
-      For the full demo:
-         ant transactions_demo -Durl=tcp://hostname:1234
-      For the indicual components:
-         ant retailer -Durl=tcp://hostname:1234
-         ant vendor -Durl=tcp://hostname:1234
-         ant hdsupplier -Durl=tcp://hostname:1234
-         ant monitorsupplier -Durl=tcp://hostname:1234
-        </echo>
-    </target>
-
-    <target name="clean">
-        <delete dir="target" quiet="true" />
-        <delete dir="${class.dir}" quiet="true" />
-    </target>
-
-    <target name="init">
-        <mkdir dir="${class.dir}" />
-
-        <path id="javac.classpath">
-            <pathelement path="${class.dir}" />
-            <pathelement path="../conf" />
-            <fileset dir="${activemq.home}/lib">
-                <include name="**/*.jar" />
-            </fileset>
-        </path>
-    </target>
-
-    <target name="compile" depends="init" description="Compile all Java">
-        <javac srcdir="src" destdir="${class.dir}" debug="true">
-            <classpath refid="javac.classpath" />
-        </javac>
-    </target>
-
-    <target name="transactions_demo" depends="compile" description="Runs the full demo">
-        <java classname="TransactionsDemo" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-
-    <target name="retailer" depends="compile" description="Runs the retailer">
-        <java classname="Retailer" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-    <target name="vendor" depends="compile" description="Runs the vendor">
-        <java classname="Vendor" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-    <target name="hdsupplier" depends="compile" description="Runs the Hard Drive Supplier">
-        <java classname="Supplier" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="HardDrive" />
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-    <target name="monitorsupplier" depends="compile" description="Runs the Monitor Supplier">
-        <java classname="Supplier" fork="yes">
-            <classpath refid="javac.classpath" />
-            <jvmarg value="-server" />
-            <sysproperty key="activemq.home" value="${activemq.home}"/>
-            <arg value="Monitor" />
-            <arg value="${url}" />
-            <arg value="${user}" />
-            <arg value="${password}" />
-        </java>
-    </target>
-</project>
diff --git a/trunk/assembly/src/release/example/transactions/src/Retailer.java b/trunk/assembly/src/release/example/transactions/src/Retailer.java
deleted file mode 100644
index 01ecfef..0000000
--- a/trunk/assembly/src/release/example/transactions/src/Retailer.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *  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.
- */
-import org.apache.activemq.ActiveMQConnectionFactory;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-/**
- * The Retailer orders computers from the Vendor by sending a message via
- * the VendorOrderQueue. It then syncronously receives the reponse message
- * and reports if the order was successful or not.
- */
-public class Retailer implements Runnable {
-	private String url;
-	private String user;
-	private String password;
-	
-	public Retailer(String url, String user, String password) {
-		this.url = url;
-		this.user = user;
-		this.password = password;
-	}
-	
-	public void run() {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-		try {
-			Connection connection = connectionFactory.createConnection();
-			
-			// The Retailer's session is non-trasacted.
-			Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-			Destination vendorOrderQueue = session.createQueue("VendorOrderQueue");
-			TemporaryQueue retailerConfirmQueue = session.createTemporaryQueue();
-			
-			MessageProducer producer = session.createProducer(vendorOrderQueue);
-			MessageConsumer replyConsumer = session.createConsumer(retailerConfirmQueue);
-
-			connection.start();
-
-			for (int i = 0; i < 5; i++) {
-				MapMessage message = session.createMapMessage();
-				message.setString("Item", "Computer(s)");
-				int quantity = (int)(Math.random() * 4) + 1;
-				message.setInt("Quantity", quantity);
-				message.setJMSReplyTo(retailerConfirmQueue);
-				producer.send(message);
-				System.out.println("Retailer: Ordered " + quantity + " computers.");
-				
-				MapMessage reply = (MapMessage) replyConsumer.receive();
-				if (reply.getBoolean("OrderAccepted")) {
-					System.out.println("Retailer: Order Filled");
-				} else {
-					System.out.println("Retailer: Order Not Filled");
-				}
-			}
-			
-			// Send a non-MapMessage to signal the end
-			producer.send(session.createMessage());
-			
-			replyConsumer.close();
-			connection.close();
-			
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		
-		if (args.length >= 1) {
-			url = args[0];
-		}
-		
-		if (args.length >= 2) {
-			user = args[1];
-		}
-
-		if (args.length >= 3) {
-			password = args[2];
-		}
-		
-		Retailer r = new Retailer(url, user, password);
-		
-		new Thread(r, "Retailer").start();
-	}
-}
diff --git a/trunk/assembly/src/release/example/transactions/src/Supplier.java b/trunk/assembly/src/release/example/transactions/src/Supplier.java
deleted file mode 100644
index ed02cc2..0000000
--- a/trunk/assembly/src/release/example/transactions/src/Supplier.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *  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.
- */
-import java.util.Random;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * The Supplier synchronously receives the order from the Vendor and
- * randomly responds with either the number ordered, or some lower
- * quantity. 
- */
-public class Supplier implements Runnable {
-	private String url;
-	private String user;
-	private String password;
-	private final String ITEM;
-	private final String QUEUE;
-	
-	public Supplier(String item, String queue, String url, String user, String password) {
-		this.url = url;
-		this.user = user;
-		this.password = password;
-		this.ITEM = item;
-		this.QUEUE = queue;
-	}
-	
-	public void run() {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-		Session session = null;
-		Destination orderQueue;
-		try {
-			Connection connection = connectionFactory.createConnection();
-
-			session = connection.createSession(true, Session.SESSION_TRANSACTED);
-			orderQueue = session.createQueue(QUEUE);
-			MessageConsumer consumer = session.createConsumer(orderQueue);
-			
-			connection.start();
-			
-			while (true) {
-				Message message = consumer.receive();
-				MessageProducer producer = session.createProducer(message.getJMSReplyTo());
-				MapMessage orderMessage;
-				if (message instanceof MapMessage) {
-					orderMessage = (MapMessage) message;
-				} else {
-					// End of Stream
-					producer.send(session.createMessage());
-					session.commit();
-					producer.close();
-					break;
-				}
-				
-				int quantity = orderMessage.getInt("Quantity");
-				System.out.println(ITEM + " Supplier: Vendor ordered " + quantity + " " + orderMessage.getString("Item"));
-				
-				MapMessage outMessage = session.createMapMessage();
-				outMessage.setInt("VendorOrderNumber", orderMessage.getInt("VendorOrderNumber"));
-				outMessage.setString("Item", ITEM);
-				
-				quantity = Math.min(
-						orderMessage.getInt("Quantity"),
-						new Random().nextInt(orderMessage.getInt("Quantity") * 10));
-				outMessage.setInt("Quantity", quantity);
-				
-				producer.send(outMessage);
-				System.out.println(ITEM + " Supplier: Sent " + quantity + " " + ITEM + "(s)");
-				session.commit();
-				System.out.println(ITEM + " Supplier: committed transaction");
-				producer.close();
-			}
-			connection.close();
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		String item = "HardDrive";
-		
-		if (args.length >= 1) {
-			item = args[0];
-		}
-		String queue;
-		if ("HardDrive".equals(item)) {
-			queue = "StorageOrderQueue";
-		} else if ("Monitor".equals(item)) {
-			queue = "MonitorOrderQueue";
-		} else {
-			throw new IllegalArgumentException("Item must be either HardDrive or Monitor");
-		}
-		
-		if (args.length >= 2) {
-			url = args[1];
-		}
-		
-		if (args.length >= 3) {
-			user = args[2];
-		}
-
-		if (args.length >= 4) {
-			password = args[3];
-		}
-		
-		Supplier s = new Supplier(item, queue, url, user, password);
-		
-		new Thread(s, "Supplier " + item).start();
-	}
-}
diff --git a/trunk/assembly/src/release/example/transactions/src/TransactionsDemo.java b/trunk/assembly/src/release/example/transactions/src/TransactionsDemo.java
deleted file mode 100644
index 4dc1171..0000000
--- a/trunk/assembly/src/release/example/transactions/src/TransactionsDemo.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  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.
- */
-public class TransactionsDemo {
-
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		
-		if (args.length >= 1) {
-			url = args[0];
-		}
-		
-		if (args.length >= 2) {
-			user = args[1];
-		}
-
-		if (args.length >= 3) {
-			password = args[2];
-		}
-		
-		Retailer r = new Retailer(url, user, password);
-		Vendor v = new Vendor(url, user, password);
-		Supplier s1 = new Supplier("HardDrive", "StorageOrderQueue", url, user, password);
-		Supplier s2 = new Supplier("Monitor", "MonitorOrderQueue", url, user, password);
-		
-		new Thread(r, "Retailer").start();
-		new Thread(v, "Vendor").start();
-		new Thread(s1, "Supplier 1").start();
-		new Thread(s2, "Supplier 2").start();
-	}
-
-}
diff --git a/trunk/assembly/src/release/example/transactions/src/Vendor.java b/trunk/assembly/src/release/example/transactions/src/Vendor.java
deleted file mode 100644
index 0f2ce93..0000000
--- a/trunk/assembly/src/release/example/transactions/src/Vendor.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- *  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.
- */
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-
-/**
- * The Vendor synchronously, and in a single transaction, receives the
- * order from VendorOrderQueue and sends messages to the two Suppliers via
- * MonitorOrderQueue and StorageOrderQueue.
- * The responses are received asynchronously; when both responses come
- * back, the order confirmation message is sent back to the Retailer.
- */
-public class Vendor implements Runnable, MessageListener {
-	private String url;
-	private String user;
-	private String password;
-	private	Session asyncSession;
-	private int numSuppliers = 2;
-	private Object supplierLock = new Object();
-	
-	public Vendor(String url, String user, String password) {
-		this.url = url;
-		this.user = user;
-		this.password = password;
-	}
-	
-	public void run() {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
-		Session session = null;
-		Destination orderQueue;
-		Destination monitorOrderQueue;
-		Destination storageOrderQueue;
-		TemporaryQueue vendorConfirmQueue;
-		MessageConsumer orderConsumer = null;
-		MessageProducer monitorProducer = null;
-		MessageProducer storageProducer = null;
-
-		try {
-			Connection connection = connectionFactory.createConnection();
-
-			session = connection.createSession(true, Session.SESSION_TRANSACTED);
-			orderQueue = session.createQueue("VendorOrderQueue");
-			monitorOrderQueue = session.createQueue("MonitorOrderQueue");
-			storageOrderQueue = session.createQueue("StorageOrderQueue");
-			
-			orderConsumer = session.createConsumer(orderQueue);
-			monitorProducer = session.createProducer(monitorOrderQueue);
-			storageProducer = session.createProducer(storageOrderQueue);
-			
-			Connection asyncconnection = connectionFactory.createConnection();
-			asyncSession = asyncconnection.createSession(true, Session.SESSION_TRANSACTED);
-			
-			vendorConfirmQueue = asyncSession.createTemporaryQueue();
-			MessageConsumer confirmConsumer = asyncSession.createConsumer(vendorConfirmQueue);
-			confirmConsumer.setMessageListener(this);
-			
-			asyncconnection.start();
-
-			connection.start();
-
-		
-			while (true) {
-				Order order = null;
-				try {
-					Message inMessage = orderConsumer.receive();
-					MapMessage message;
-					if (inMessage instanceof MapMessage) {
-						message = (MapMessage) inMessage;
-						
-					} else {
-						// end of stream
-						Message outMessage = session.createMessage();
-						outMessage.setJMSReplyTo(vendorConfirmQueue);
-						monitorProducer.send(outMessage);
-						storageProducer.send(outMessage);
-						session.commit();
-						break;
-					}
-					
-					// Randomly throw an exception in here to simulate a Database error
-					// and trigger a rollback of the transaction
-					if (new Random().nextInt(3) == 0) {
-						throw new JMSException("Simulated Database Error.");
-					}
-					
-					order = new Order(message);
-					
-					MapMessage orderMessage = session.createMapMessage();
-					orderMessage.setJMSReplyTo(vendorConfirmQueue);
-					orderMessage.setInt("VendorOrderNumber", order.getOrderNumber());
-					int quantity = message.getInt("Quantity");
-					System.out.println("Vendor: Retailer ordered " + quantity + " " + message.getString("Item"));
-					
-					orderMessage.setInt("Quantity", quantity);
-					orderMessage.setString("Item", "Monitor");
-					monitorProducer.send(orderMessage);
-					System.out.println("Vendor: ordered " + quantity + " Monitor(s)");
-					
-					orderMessage.setString("Item", "HardDrive");
-					storageProducer.send(orderMessage);
-					System.out.println("Vendor: ordered " + quantity + " Hard Drive(s)");
-					
-					session.commit();
-					System.out.println("Vendor: Comitted Transaction 1");
-					
-				} catch (JMSException e) {
-					System.out.println("Vendor: JMSException Occured: " + e.getMessage());
-					e.printStackTrace();
-					session.rollback();
-					System.out.println("Vendor: Rolled Back Transaction.");
-				}
-			}
-			
-			synchronized (supplierLock) {
-				while (numSuppliers > 0) {
-					try {
-						supplierLock.wait();
-					} catch (InterruptedException e) {
-						e.printStackTrace();
-					}
-				}
-			}
-			
-			connection.close();
-			asyncconnection.close();
-		
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-
-	}
-
-	public void onMessage(Message message) {
-		if (!(message instanceof MapMessage)) {
-			synchronized(supplierLock) {
-				numSuppliers--;
-				supplierLock.notifyAll();
-			}
-			try {
-				asyncSession.commit();
-				return;
-			} catch (JMSException e) {
-				e.printStackTrace();
-			}
-		}
-		
-		int orderNumber = -1;
-		try {
-			MapMessage componentMessage = (MapMessage) message;
-			
-			orderNumber = componentMessage.getInt("VendorOrderNumber");
-			Order order = Order.getOrder(orderNumber);
-			order.processSubOrder(componentMessage);
-			asyncSession.commit();
-			
-			if (! "Pending".equals(order.getStatus())) {
-				System.out.println("Vendor: Completed processing for order " + orderNumber);
-				
-				MessageProducer replyProducer = asyncSession.createProducer(order.getMessage().getJMSReplyTo());
-				MapMessage replyMessage = asyncSession.createMapMessage();
-				if ("Fulfilled".equals(order.getStatus())) {
-					replyMessage.setBoolean("OrderAccepted", true);
-					System.out.println("Vendor: sent " + order.quantity + " computer(s)");
-				} else {
-					replyMessage.setBoolean("OrderAccepted", false);
-					System.out.println("Vendor: unable to send " + order.quantity + " computer(s)");
-				}
-				replyProducer.send(replyMessage);
-				asyncSession.commit();
-				System.out.println("Vender: committed transaction 2");
-			}
-		} catch (JMSException e) {
-			e.printStackTrace();
-		}
-	}
-
-	public static class Order {
-		private static Map<Integer, Order> pendingOrders = new HashMap<Integer, Order>();
-		private static int nextOrderNumber = 1;
-
-		private int orderNumber;
-		private int quantity;
-		private MapMessage monitor = null;
-		private MapMessage storage = null;
-		private MapMessage message;
-		private String status;
-		
-		public Order(MapMessage message) {
-			this.orderNumber = nextOrderNumber++;
-			this.message = message;
-			try {
-				this.quantity = message.getInt("Quantity");
-			} catch (JMSException e) {
-				e.printStackTrace();
-				this.quantity = 0;
-			}
-			status = "Pending";
-			pendingOrders.put(orderNumber, this);
-		}
-		
-		public Object getStatus() {
-			return status;
-		}
-		
-		public int getOrderNumber() {
-			return orderNumber;
-		}
-		
-		public static int getOutstandingOrders() {
-			return pendingOrders.size();
-		}
-		
-		public static Order getOrder(int number) {
-			return pendingOrders.get(number);
-		}
-		
-		public MapMessage getMessage() {
-			return message;
-		}
-		
-		public void processSubOrder(MapMessage message) {
-			String itemName = null;
-			try {
-				itemName = message.getString("Item");
-			} catch (JMSException e) {
-				e.printStackTrace();
-			}
-			
-			if ("Monitor".equals(itemName)) {
-				monitor = message;
-			} else if ("HardDrive".equals(itemName)) {
-				storage = message;
-			}
-			
-			if (null != monitor && null != storage) {
-				// Received both messages
-				try {
-					if (quantity > monitor.getInt("Quantity")) {
-						status = "Cancelled";
-					} else if (quantity > storage.getInt("Quantity")) {
-						status = "Cancelled";
-					} else {
-						status = "Fulfilled";
-					}
-				} catch (JMSException e) {
-					e.printStackTrace();
-					status = "Cancelled";
-				}
-			}
-		}		
-	}
-
-	public static void main(String[] args) {
-		String url = "tcp://localhost:61616";
-		String user = null;
-		String password = null;
-		
-		if (args.length >= 1) {
-			url = args[0];
-		}
-		
-		if (args.length >= 2) {
-			user = args[1];
-		}
-
-		if (args.length >= 3) {
-			password = args[2];
-		}
-		
-		Vendor v = new Vendor(url, user, password);
-		
-		new Thread(v, "Vendor").start();
-	}	
-}
diff --git a/trunk/assembly/src/release/lib/activemq-rar.txt b/trunk/assembly/src/release/lib/activemq-rar.txt
deleted file mode 100644
index c2402dc..0000000
--- a/trunk/assembly/src/release/lib/activemq-rar.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * 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.
- */
-
-ActiveMQ RAR is no longer included in the distribution.
-
-Please download it separately from: http://repo1.maven.org/maven2/org/apache/activemq/activemq-rar/
\ No newline at end of file
diff --git a/trunk/assembly/src/release/user-guide.html b/trunk/assembly/src/release/user-guide.html
deleted file mode 100755
index 74000a1..0000000
--- a/trunk/assembly/src/release/user-guide.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-    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.
--->
-<html><head>
-  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
-  <title>Getting Started</title>
-
-</head>
-<body>
-<h1>Getting Started<br>
-</h1>
-
-<p>
-Welcome to Apache ActiveMQ. This document gives you a quick overview of how to get started trying out Apache ActiveMQ.
-</p>
-
-<h2>Running the broker</h2>
-
-<p>
-From the binary distribution you can run the Apache ActiveMQ server pretty easily via the bin/activemq command.
-If you're using Windows, just type
-</p>
-<pre>
-    cd bin
-    activemq
-</pre>
-<p>
-On Unix-like systems, type
-</p>
-<pre>
-    cd bin
-    activemq console
-</pre>
-<p>to start the broker in foreground.</p>
-<p>
-The Apache ActiveMQ broker should now have started
-</p>
-
-<h2>Running the example programs</h2>
-
-<p>
-To run the demo producer/consumer tools, you need Java and Ant installed.
-</p>
-
-<h3>Installing Ant</h3>
-
-
-<p>
-The example programs depend on <a href="http://ant.apache.org/">Ant</a> being installed. There are more detailed
-instructions on the Ant website - but essentially you need to follow these steps.
-</p>
-<ul>
-<li>
-JAVA_HOME must point to your JDK installation, such that $JAVA_HOME/bin contains the java executable and $JAVA_HOME/lib contains some jar files.
-</li>
-<li>
-ANT_HOME must point to where you installed Apache Ant (http://ant.apache.org)
-</li>
-<li>
-then you need to add $JAVA_HOME/bin and $ANT_HOME/bin to your PATH variable.
-</li>
-</ul>
-
-<p>
-To test this is all working, try typing
-</p>
-
-<pre>
-    java -version
-    cd example
-    ant -version
-</pre>
-
-<h3>Running the example producer and consumer</h3>
-
-<p>
-Once you've got Java and Ant installed correctly you should be able to run
-</p>
-
-<pre>
-    cd example
-    ant consumer
-</pre>
-
-<p>
-and in another shell
-</p>
-
-<pre>
-    cd example
-    ant producer
-</pre>
-
-<p>
-you can specify exact URLs to connect to via command like arguments. e.g.
-</p>
-
-<pre>
-    ant producer -Durl=tcp://somehost:port
-</pre>
-
-</body>
-</html>
-
-
diff --git a/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml b/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml
deleted file mode 100644
index 7cfe704..0000000
--- a/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-     
-     
-  <import resource="webconsole-query.xml"/>
-     
-  <!-- Allows us to use system properties as variables in this configuration file -->
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-      <property name="locations">
-          <value>file:${activemq.base}/conf/credentials.properties</value>
-      </property>      
-  </bean> 
-  
-  <!-- use the following bean for a local in-JVM broker -->
-  <bean id="brokerQuery" class="org.apache.activemq.web.SingletonBrokerFacade" autowire="constructor" scope="prototype"/>
-
-
-  <bean id="sessionPool" class="org.apache.activemq.web.SessionPool">
-  	<property name="connectionFactory" ref="connectionFactory"/>
-  </bean>
-
-  <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
-    <property name="brokerURL" value="vm://localhost"/>
-    <property name="userName" value="${activemq.username}"/>
-    <property name="password" value="${activemq.password}"/>    
-  </bean>
-
-</beans>
diff --git a/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml b/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml
deleted file mode 100644
index 710de25..0000000
--- a/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
-       http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:${activemq.base}/conf/credentials.properties</value>
-        </property>      
-    </bean> 
-    
-    <import resource="file:${activemq.base}/conf/camel.xml"/>
-    
-</beans>
diff --git a/trunk/assembly/src/release/webapps/camel/js/dojo/dojo.js b/trunk/assembly/src/release/webapps/camel/js/dojo/dojo.js
deleted file mode 100644
index dff19dd..0000000
--- a/trunk/assembly/src/release/webapps/camel/js/dojo/dojo.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
-	Available via Academic Free License >= 2.1 OR the modified BSD license.
-	see: http://dojotoolkit.org/license for details
-*/
-
-/*
-	This is a compiled version of Dojo, built for deployment and not for
-	development. To get an editable version, please visit:
-
-		http://dojotoolkit.org
-
-	for documentation and information on getting the source.
-*/
-
-(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _8=_1[i];_2+="var "+_8[0]+" = {}; "+_8[1]+" = "+_8[0]+";"+_8[1]+"._scopeName = '"+_8[1]+"';";_3+=(i==0?"":",")+_8[0];_4+=(i==0?"":",")+_8[1];_5[_8[0]]=_8[1];_6[_8[1]]=_8[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]();}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _c=tn+"";console[_c]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(_c+":");console["log"](a.join(" "));}:function(){};})();}}}if(typeof dojo=="undefined"){this.dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){this.dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){this.dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _f in djConfig){d.config[_f]=djConfig[_f];}}dojo.locale=d.config.locale;var rev="$Rev: 16827 $".match(/\d+/);dojo.version={major:1,minor:3,patch:0,flag:"b2",revision:rev?+rev[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}var _11={};dojo._mixin=function(obj,_13){for(var x in _13){if(_11[x]===undefined||_11[x]!=_13[x]){obj[x]=_13[x];}}if(d.isIE&&_13){var p=_13.toString;if(typeof p=="function"&&p!=obj.toString&&p!=_11.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){obj.toString=_13.toString;}}return obj;};dojo.mixin=function(obj,_17){if(!obj){obj={};}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_1a,_1b,_1c){var obj=_1c||d.global;for(var i=0,p;obj&&(p=_1a[i]);i++){if(i==0&&this._scopeMap[p]){p=this._scopeMap[p];}obj=(p in obj?obj[p]:(_1b?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_20,_21,_22){var _23=_20.split("."),p=_23.pop(),obj=d._getProp(_23,true,_22);return obj&&p?(obj[p]=_21):undefined;};dojo.getObject=function(_26,_27,_28){return d._getProp(_26.split("."),_27,_28);};dojo.exists=function(_29,obj){return !!d.getObject(_29,false,obj);};dojo["eval"]=function(_2b){return d.global.eval?d.global.eval(_2b):eval(_2b);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_2d){var mp=this._modulePrefixes;return !!(mp[_2d]&&mp[_2d].value);},_getModulePrefix:function(_2f){var mp=this._modulePrefixes;if(this._moduleHasPrefix(_2f)){return mp[_2f].value;}return _2f;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_31,_32,cb){var uri=((_31.charAt(0)=="/"||_31.match(/^\w+:/))?"":this.baseUrl)+_31;try{return !_32?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_32,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(this._loadedUrls[uri]){return true;}var _37=this._getText(uri,true);if(!_37){return false;}this._loadedUrls[uri]=true;this._loadedUrls.push(uri);if(cb){_37="("+_37+")";}else{_37=this._scopePrefix+_37+this._scopeSuffix;}if(d.isMoz){_37+="\r\n//@ sourceURL="+uri;}var _38=d["eval"](_37);if(cb){cb(_38);}return true;};dojo._loadUriAndCheck=function(uri,_3a,cb){var ok=false;try{ok=this._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&this._loadedModules[_3a]);};dojo.loaded=function(){this._loadNotifying=true;this._postLoad=true;var mll=d._loaders;this._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}this._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())();}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _43=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_43.call(obj);});}}};dojo.addOnLoad=function(obj,_45){d._onto(d._loaders,obj,_45);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);}dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(dojo.config.useXDomain&&d.isOpera)){if(dojo.isAIR){setTimeout(function(){dojo.loaded();},0);}else{setTimeout(dojo._scopeName+".loaded();",0);}}else{d.loaded();}};dojo._getModuleSymbols=function(_47){var _48=_47.split(".");for(var i=_48.length;i>0;i--){var _4a=_48.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(_4a)){_48[0]="../"+_48[0];}else{var _4b=this._getModulePrefix(_4a);if(_4b!=_4a){_48.splice(0,i,_4b);break;}}}return _48;};dojo._global_omit_module_check=false;dojo.loadInit=function(_4c){_4c();};dojo._loadModule=dojo.require=function(_4d,_4e){_4e=this._global_omit_module_check||_4e;var _4f=this._loadedModules[_4d];if(_4f){return _4f;}var _50=this._getModuleSymbols(_4d).join("/")+".js";var _51=(!_4e)?_4d:null;var ok=this._loadPath(_50,_51);if(!ok&&!_4e){throw new Error("Could not load '"+_4d+"'; last tried '"+_50+"'");}if(!_4e&&!this._isXDomain){_4f=this._loadedModules[_4d];if(!_4f){throw new Error("symbol '"+_4d+"' is not defined after loading '"+_50+"'");}}return _4f;};dojo.provide=function(_53){_53=_53+"";return (d._loadedModules[_53]=d.getObject(_53,true));};dojo.platformRequire=function(_54){var _55=_54.common||[];var _56=_55.concat(_54[d._name]||_54["default"]||[]);for(var x=0;x<_56.length;x++){var _58=_56[x];if(_58.constructor==Array){d._loadModule.apply(d,_58);}else{d._loadModule(_58);}}};dojo.requireIf=function(_59,_5a){if(_59===true){var _5b=[];for(var i=1;i<arguments.length;i++){_5b.push(arguments[i]);}d.require.apply(d,_5b);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_5d,_5e){d._modulePrefixes[_5d]={name:_5d,value:_5e};};dojo.requireLocalization=function(_5f,_60,_61,_62){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");var ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null;var _a=arguments;var uri=[_a[0]];for(var i=1;i<_a.length;i++){if(!_a[i]){continue;}var _69=new d._Url(_a[i]+"");var _6a=new d._Url(uri[0]+"");if(_69.path==""&&!_69.scheme&&!_69.authority&&!_69.query){if(_69.fragment!=n){_6a.fragment=_69.fragment;}_69=_6a;}else{if(!_69.scheme){_69.scheme=_6a.scheme;if(!_69.authority){_69.authority=_6a.authority;if(_69.path.charAt(0)!="/"){var _6b=_6a.path.substring(0,_6a.path.lastIndexOf("/")+1)+_69.path;var _6c=_6b.split("/");for(var j=0;j<_6c.length;j++){if(_6c[j]=="."){if(j==_6c.length-1){_6c[j]="";}else{_6c.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_6c[0]=="")&&_6c[j]==".."&&_6c[j-1]!=".."){if(j==(_6c.length-1)){_6c.splice(j,1);_6c[j-1]="";}else{_6c.splice(j-1,2);j-=2;}}}}_69.path=_6c.join("/");}}}}uri=[];if(_69.scheme){uri.push(_69.scheme,":");}if(_69.authority){uri.push("//",_69.authority);}uri.push(_69.path);if(_69.query){uri.push("?",_69.query);}if(_69.fragment){uri.push("#",_69.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_6f,url){var loc=d._getModuleSymbols(_6f).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _72=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_72==-1||_72>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _74=document.getElementsByTagName("script");var _75=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_74.length;i++){var src=_74[i].getAttribute("src");if(!src){continue;}var m=src.match(_75);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_74[i].getAttribute("djConfig");if(cfg){var _7a=eval("({ "+cfg+" })");for(var x in _7a){dojo.config[x]=_7a[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv;}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1;}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;var _80=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_80&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(_80+7))<=419.3){d.isSafari=2;}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv;}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1])||undefined;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;if(d.isIE>=8&&document.documentMode!=5){d.isIE=document.documentMode;}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}var cm=document.compatMode;d.isQuirks=cm=="BackCompat"||cm=="QuirksMode"||d.isIE<6;d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _82,_83;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_82=new XMLHttpRequest();}catch(e){}}if(!_82){for(var i=0;i<3;++i){var _85=d._XMLHTTP_PROGIDS[i];try{_82=new ActiveXObject(_85);}catch(e){_83=e;}if(_82){d._XMLHTTP_PROGIDS=[_85];break;}}}if(!_82){throw new Error("XMLHTTP not available: "+_83);}return _82;};d._isDocumentOk=function(_86){var _87=_86.status||0;return (_87>=200&&_87<300)||_87==304||_87==1223||(!_87&&(location.protocol=="file:"||location.protocol=="chrome:"));};var _88=window.location+"";var _89=document.getElementsByTagName("base");var _8a=(_89&&_89.length>0);d._getText=function(uri,_8c){var _8d=this._xhrObj();if(!_8a&&dojo._Url){uri=(new dojo._Url(_88,uri)).toString();}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_8d.open("GET",uri,false);try{_8d.send(null);if(!d._isDocumentOk(_8d)){var err=Error("Unable to load "+uri+" status:"+_8d.status);err.status=_8d.status;err.responseText=_8d.responseText;throw err;}}catch(e){if(_8c){return null;}throw e;}return _8d.responseText;};var _w=window;var _90=function(_91,fp){var _93=_w[_91]||function(){};_w[_91]=function(){fp.apply(_w,arguments);_93.apply(_w,arguments);};};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())();}};var _95=0;d.addOnWindowUnload=function(obj,_97){d._onto(d._windowUnloaders,obj,_97);if(!_95){_95=1;_90("onunload",d.windowUnloaded);}};var _98=0;d.addOnUnload=function(obj,_9a){d._onto(d._unloaders,obj,_9a);if(!_98){_98=1;_90("onbeforeunload",dojo.unloaded);}};})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var _9c=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_9c!="domcontentloaded"&&_9c!="load")){return;}arguments.callee.initialized=true;if("_khtmlTimer" in dojo){clearInterval(dojo._khtmlTimer);delete dojo._khtmlTimer;}if(dojo._inFlightCount==0){dojo._modulesLoaded();}};dojo._fakeLoadInit=function(){dojo._loadInit({type:"load"});};if(!dojo.config.afterOnLoad){if(document.addEventListener){if(dojo.isWebKit>525||dojo.isOpera||dojo.isFF>=3||(dojo.isMoz&&dojo.config.enableMozDomContentLoaded===true)){document.addEventListener("DOMContentLoaded",dojo._loadInit,null);}window.addEventListener("load",dojo._loadInit,null);}if(dojo.isAIR){window.addEventListener("load",dojo._loadInit,null);}else{if((dojo.isWebKit<525)||dojo.isKhtml){dojo._khtmlTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dojo._loadInit();}},10);}}}if(dojo.isIE){if(!dojo.config.afterOnLoad){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML);  display:inline-block");}catch(e){}}}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _9e in mp){dojo.registerModulePath(_9e,mp[_9e]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");dojo.isString=function(it){return !!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=(function(){var _a1=function(it){return it&&(typeof it=="function"||it instanceof Function);};return dojo.isSafari?function(it){if(typeof it=="function"&&it=="[object NodeList]"){return false;}return _a1(it);}:_a1;})();dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));};dojo.isArrayLike=function(it){var d=dojo;return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_a8,_a9){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(_a8.prototype,arguments[i]);}return _a8;};dojo._hitchArgs=function(_ac,_ad){var pre=dojo._toArray(arguments,2);var _af=dojo.isString(_ad);return function(){var _b0=dojo._toArray(arguments);var f=_af?(_ac||dojo.global)[_ad]:_ad;return f&&f.apply(_ac||this,pre.concat(_b0));};};dojo.hitch=function(_b2,_b3){if(arguments.length>2){return dojo._hitchArgs.apply(dojo,arguments);}if(!_b3){_b3=_b2;_b2=null;}if(dojo.isString(_b3)){_b2=_b2||dojo.global;if(!_b2[_b3]){throw (["dojo.hitch: scope[\"",_b3,"\"] is null (scope=\"",_b2,"\")"].join(""));}return function(){return _b2[_b3].apply(_b2,arguments||[]);};}return !_b2?_b3:function(){return _b3.apply(_b2,arguments||[]);};};dojo.delegate=dojo._delegate=(function(){function TMP(){};return function(obj,_b6){TMP.prototype=obj;var tmp=new TMP();if(_b6){dojo._mixin(tmp,_b6);}return tmp;};})();(function(){var _b8=function(obj,_ba,_bb){return (_bb||[]).concat(Array.prototype.slice.call(obj,_ba||0));};var _bc=function(obj,_be,_bf){var arr=_bf||[];for(var x=_be||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo._toArray=dojo.isIE?function(obj){return ((obj.item)?_bc:_b8).apply(this,arguments);}:_b8;})();dojo.partial=function(_c3){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));};dojo.clone=function(o){if(!o){return o;}if(dojo.isArray(o)){var r=[];for(var i=0;i<o.length;++i){r.push(dojo.clone(o[i]));}return r;}if(!dojo.isObject(o)){return o;}if(o.nodeType&&o.cloneNode){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}r=new o.constructor();for(i in o){if(!(i in r)||r[i]!=o[i]){r[i]=dojo.clone(o[i]);}}return r;};dojo.trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");dojo.declare=function(_ca,_cb,_cc){var dd=arguments.callee,_ce;if(dojo.isArray(_cb)){_ce=_cb;_cb=_ce.shift();}if(_ce){dojo.forEach(_ce,function(m,i){if(!m){throw (_ca+": mixin #"+i+" is null");}_cb=dd._delegate(_cb,m);});}var _d1=dd._delegate(_cb);_cc=_cc||{};_d1.extend(_cc);dojo.extend(_d1,{declaredClass:_ca,_constructor:_cc.constructor});_d1.prototype.constructor=_d1;return dojo.setObject(_ca,_d1);};dojo.mixin(dojo.declare,{_delegate:function(_d2,_d3){var bp=(_d2||0).prototype,mp=(_d3||0).prototype,dd=dojo.declare;var _d7=dd._makeCtor();dojo.mixin(_d7,{superclass:bp,mixin:mp,extend:dd._extend});if(_d2){_d7.prototype=dojo._delegate(bp);}dojo.extend(_d7,dd._core,mp||0,{_constructor:null,preamble:null});_d7.prototype.constructor=_d7;_d7.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;return _d7;},_extend:function(_d8){var i,fn;for(i in _d8){if(dojo.isFunction(fn=_d8[i])&&!0[i]){fn.nom=i;fn.ctor=this;}}dojo.extend(this,_d8);},_makeCtor:function(){return function(){this._construct(arguments);};},_core:{_construct:function(_db){var c=_db.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_db,ii,fn;if(a[0]){if(((fn=a[0].preamble))){a=fn.apply(this,a)||a;}}if((fn=c.prototype.preamble)){a=fn.apply(this,a)||a;}if(ct&&ct.apply){ct.apply(this,a);}if(mct&&mct.apply){mct.apply(this,a);}if((ii=c.prototype._constructor)){ii.apply(this,_db);}if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){ct.apply(this,_db);}},_findMixin:function(_e4){var c=this.constructor,p,m;while(c){p=c.superclass;m=c.mixin;if(m==_e4||(m instanceof _e4.constructor)){return p;}if(m&&m._findMixin&&(m=m._findMixin(_e4))){return m;}c=p&&p.constructor;}},_findMethod:function(_e8,_e9,_ea,has){var p=_ea,c,m,f;do{c=p.constructor;m=c.mixin;if(m&&(m=this._findMethod(_e8,_e9,m,has))){return m;}if((f=p[_e8])&&(has==(f==_e9))){return p;}p=c.superclass;}while(p);return !has&&(p=this._findMixin(_ea))&&this._findMethod(_e8,_e9,p,has);},inherited:function(_f0,_f1,_f2){var a=arguments;if(!dojo.isString(a[0])){_f2=_f1;_f1=_f0;_f0=_f1.callee.nom;}a=_f2||_f1;var c=_f1.callee,p=this.constructor.prototype,fn,mp;if(this[_f0]!=c||p[_f0]==c){mp=(c.ctor||0).superclass||this._findMethod(_f0,c,p,true);if(!mp){throw (this.declaredClass+": inherited method \""+_f0+"\" mismatch");}p=this._findMethod(_f0,c,mp,false);}fn=p&&p[_f0];if(!fn){throw (mp.declaredClass+": inherited method \""+_f0+"\" not found");}return fn.apply(this,a);}}});}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments);}}return r;};},add:function(_ff,_100,_101){_ff=_ff||dojo.global;var f=_ff[_100];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_ff[_100]=d;}return f._listeners.push(_101);},remove:function(_104,_105,_106){var f=(_104||dojo.global)[_105];if(f&&f._listeners&&_106--){delete f._listeners[_106];}}};dojo.connect=function(obj,_109,_10a,_10b,_10c){var a=arguments,args=[],i=0;args.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];args.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){args.push(a[i]);}return dojo._connect.apply(this,args);};dojo._connect=function(obj,_112,_113,_114){var l=dojo._listener,h=l.add(obj,_112,dojo.hitch(_113,_114));return [obj,_112,h,l];};dojo.disconnect=function(_117){if(_117&&_117[0]!==undefined){dojo._disconnect.apply(this,_117);delete _117[0];}};dojo._disconnect=function(obj,_119,_11a,_11b){_11b.remove(obj,_119,_11a);};dojo._topics={};dojo.subscribe=function(_11c,_11d,_11e){return [_11c,dojo._listener.add(dojo._topics,_11c,dojo.hitch(_11d,_11e))];};dojo.unsubscribe=function(_11f){if(_11f){dojo._listener.remove(dojo._topics,_11f[0],_11f[1]);}};dojo.publish=function(_120,args){var f=dojo._topics[_120];if(f){f.apply(this,args||[]);}};dojo.connectPublisher=function(_123,obj,_125){var pf=function(){dojo.publish(_123,arguments);};return (_125)?dojo.connect(obj,_125,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_127){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_127;this.silentlyCancelled=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString();}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,cbfn){var _131=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_131,_131);},addCallback:function(cb,cbfn){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,cbfn){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0){this._fire();}return this;},_fire:function(){var _138=this.chain;var _139=this.fired;var res=this.results[_139];var self=this;var cb=null;while((_138.length>0)&&(this.paused==0)){var f=_138.shift()[_139];if(!f){continue;}var func=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret;}_139=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){self._resback(res);self.paused--;if((self.paused==0)&&(self.fired>=0)){self._fire();}};this.paused++;}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(err){_139=1;res=err;}}}this.fired=_139;this.results[_139]=res;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(json){return eval("("+json+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_144,_145){if(it===undefined){return "undefined";}var _146=typeof it;if(_146=="number"||_146=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}var _147=arguments.callee;var _148;_145=_145||"";var _149=_144?_145+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){_148=tf.call(it);if(it!==_148){return _147(_148,_144,_149);}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes");}var sep=_144?" ":"";var _14c=_144?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_147(obj,_144,_149);if(typeof val!="string"){val="undefined";}return _14c+_149+val;});return "["+res.join(","+sep)+_14c+_145+"]";}if(_146=="function"){return null;}var _150=[],key;for(key in it){var _152,val;if(typeof key=="number"){_152="\""+key+"\"";}else{if(typeof key=="string"){_152=dojo._escapeString(key);}else{continue;}}val=_147(it[key],_144,_149);if(typeof val!="string"){continue;}_150.push(_14c+_149+_152+":"+sep+val);}return "{"+_150.join(","+sep)+_14c+_145+"}";};}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _154=function(arr,obj,cb){return [dojo.isString(arr)?arr.split(""):arr,obj||dojo.global,dojo.isString(cb)?new Function("item","index","array",cb):cb];};dojo.mixin(dojo,{indexOf:function(_158,_159,_15a,_15b){var step=1,end=_158.length||0,i=0;if(_15b){i=end-1;step=end=-1;}if(_15a!=undefined){i=_15a;}if((_15b&&i>end)||i<end){for(;i!=end;i+=step){if(_158[i]==_159){return i;}}}return -1;},lastIndexOf:function(_15e,_15f,_160){return dojo.indexOf(_15e,_15f,_160,true);},forEach:function(arr,_162,_163){if(!arr||!arr.length){return;}var _p=_154(arr,_163,_162);arr=_p[0];for(var i=0,l=arr.length;i<l;++i){_p[2].call(_p[1],arr[i],i,arr);}},_everyOrSome:function(_167,arr,_169,_16a){var _p=_154(arr,_16a,_169);arr=_p[0];for(var i=0,l=arr.length;i<l;++i){var _16e=!!_p[2].call(_p[1],arr[i],i,arr);if(_167^_16e){return _16e;}}return _167;},every:function(arr,_170,_171){return this._everyOrSome(true,arr,_170,_171);},some:function(arr,_173,_174){return this._everyOrSome(false,arr,_173,_174);},map:function(arr,_176,_177){var _p=_154(arr,_177,_176);arr=_p[0];var _179=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){_179.push(_p[2].call(_p[1],arr[i],i,arr));}return _179;},filter:function(arr,_17d,_17e){var _p=_154(arr,_17e,_17d);arr=_p[0];var _180=[];for(var i=0,l=arr.length;i<l;++i){if(_p[2].call(_p[1],arr[i],i,arr)){_180.push(arr[i]);}}return _180;}});})();}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(_184){if(_184){this.setColor(_184);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_18a){if(d.isString(_18a)){d.colorFromString(_18a,this);}else{if(d.isArray(_18a)){d.colorFromArray(_18a,this);}else{this._set(_18a.r,_18a.g,_18a.b,_18a.a);if(!(_18a instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_190){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_190?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_193,end,_195,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_193[x]+(end[x]-_193[x])*_195;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_199,obj){var m=_199.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_19c,obj){var t=obj||new d.Color(),bits=(_19c.length==4)?4:8,mask=(1<<bits)-1;_19c=Number("0x"+_19c.substr(1));if(isNaN(_19c)){return null;}d.forEach(["b","g","r"],function(x){var c=_19c&mask;_19c>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);};})();}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_1a9,_1aa){dojo.global=_1a9;dojo.doc=_1aa;};dojo.withGlobal=function(_1ab,_1ac,_1ad,_1ae){var _1af=dojo.global;try{dojo.global=_1ab;return dojo.withDoc.call(null,_1ab.document,_1ac,_1ad,_1ae);}finally{dojo.global=_1af;}};dojo.withDoc=function(_1b0,_1b1,_1b2,_1b3){var _1b4=dojo.doc,_1b5=dojo._bodyLtr;try{dojo.doc=_1b0;delete dojo._bodyLtr;if(_1b2&&dojo.isString(_1b1)){_1b1=_1b2[_1b1];}return _1b1.apply(_1b2,_1b3||[]);}finally{dojo.doc=_1b4;if(_1b5!==undefined){dojo._bodyLtr=_1b5;}}};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _1ba=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(dojo.isFF<=2){try{e.relatedTarget.tagName;}catch(e2){return;}}if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_1be,_1bf){if(node){_1be=del._normalizeEventName(_1be);if(!dojo.isIE&&(_1be=="mouseenter"||_1be=="mouseleave")){_1be=(_1be=="mouseenter")?"mouseover":"mouseout";}node.removeEventListener(_1be,_1bf,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_1c5){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,_1c8){return del._fixEvent(evt,_1c8);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _1ca=dojo._listener;dojo._connect=function(obj,_1cc,_1cd,_1ce,_1cf){var _1d0=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=_1d0?(_1cf?2:1):0,l=[dojo._listener,del,_1ca][lid];var h=l.add(obj,_1cc,dojo.hitch(_1cd,_1ce));return [obj,_1cc,h,lid];};dojo._disconnect=function(obj,_1d5,_1d6,_1d7){([dojo._listener,del,_1ca][_1d7]).remove(obj,_1d5,_1d6);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};if(dojo.isIE){var _1d8=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;var _1dc=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){_1ca=iel=dojo._ie_listener={handlers:[],add:function(_1dd,_1de,_1df){_1dd=_1dd||dojo.global;var f=_1dd[_1de];if(!f||!f[_1dc]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[_1dc]=[];f=_1dd[_1de]=d;}return f[_1dc].push(ieh.push(_1df)-1);},remove:function(_1e3,_1e4,_1e5){var f=(_1e3||dojo.global)[_1e4],l=f&&f[_1dc];if(f&&l&&_1e5--){delete ieh[l[_1e5]];delete l[_1e5];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_1e9,fp){if(!node){return;}_1e9=del._normalizeEventName(_1e9);if(_1e9=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[_1dc]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_1e9,del._fixCallback(fp));},remove:function(node,_1ee,_1ef){_1ee=del._normalizeEventName(_1ee);iel.remove(node,_1ee,_1ef);if(_1ee=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_1f1){return _1f1.slice(0,2)!="on"?"on"+_1f1:_1f1;},_nop:function(){},_fixEvent:function(evt,_1f3){if(!evt){var w=_1f3&&(_1f3.ownerDocument||_1f3.document||_1f3).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_1f3||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _1f7=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _1f8=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1f7.scrollLeft||0)-_1f8.x;evt.pageY=evt.clientY+(_1f7.scrollTop||0)-_1f8.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[_1dc]){return;}var k=evt.keyCode;var _1fe=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_1fe||evt.ctrlKey){var c=_1fe?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_1d8(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_1d8(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_203){var faux=dojo.mixin({},evt,_203);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_206){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,_209,fp){if(!node){return;}var _20b=del._add(node,_209,fp);if(del._normalizeEventName(_209)=="keypress"){_20b._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var _20e=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_20e||evt.ctrlKey){var c=_20e?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux);}});}return _20b;},remove:function(node,_212,_213){if(node){if(_213._stealthKeyDownHandle){del._remove(node,"keydown",_213._stealthKeyDownHandle);}del._remove(node,_212,_213);}},_fixEvent:function(evt,_215){switch(evt.type){case "keypress":if(evt.faux){return evt;}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true});}return evt;}});}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_218){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(_218,args);var lls=[].concat(ls);for(var i in lls){if(!(i in ap)){h[lls[i]].apply(_218,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(dojo.isString(id)){var _d=doc||dojo.doc;var te=_d.getElementById(id);if(te&&te.attributes.id.value==id){return te;}else{var eles=_d.all[id];if(!eles||eles.nodeName){eles=[eles];}var i=0;while((te=eles[i++])){if(te.attributes&&te.attributes.id&&te.attributes.id.value==id){return te;}}}}else{return id;}};}else{dojo.byId=function(id,doc){return dojo.isString(id)?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var _22d=null;d.addOnWindowUnload(function(){_22d=null;});dojo._destroyElement=dojo.destroy=function(node){node=d.byId(node);try{if(!_22d||_22d.ownerDocument!=node.ownerDocument){_22d=node.ownerDocument.createElement("div");}_22d.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_22d.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_230){try{node=d.byId(node);_230=d.byId(_230);while(node){if(node===_230){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_232){node=d.byId(node);if(d.isMozilla){node.style.MozUserSelect=_232?"":"none";}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=_232?"auto":"none";}else{if(d.isIE){var v=(node.unselectable=_232?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'");}}}};var _234=function(node,ref){var _237=ref.parentNode;if(_237){_237.insertBefore(node,ref);}};var _238=function(node,ref){var _23b=ref.parentNode;if(_23b){if(_23b.lastChild==ref){_23b.appendChild(node);}else{_23b.insertBefore(node,ref.nextSibling);}}};dojo.place=function(node,_23d,_23e){_23d=d.byId(_23d);if(d.isString(node)){node=node.charAt(0)=="<"?d._toDom(node,_23d.ownerDocument):d.byId(node);}if(typeof _23e=="number"){var cn=_23d.childNodes;if(!cn.length||cn.length<=_23e){_23d.appendChild(node);}else{_234(node,cn[_23e<0?0:_23e]);}}else{switch(_23e){case "before":_234(node,_23d);break;case "after":_238(node,_23d);break;case "replace":_23d.parentNode.replaceChild(node,_23d);break;case "only":d.empty(_23d);_23d.appendChild(node);break;case "first":if(_23d.firstChild){_234(node,_23d.firstChild);break;}default:_23d.appendChild(node);}}return node;};dojo.boxModel="content-box";if(d.isIE){var _dcm=document.compatMode;d.boxModel=_dcm=="BackCompat"||_dcm=="QuirksMode"||d.isIE<6?"border-box":"content-box";}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node instanceof HTMLElement){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}}return s||{};};}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{};};}else{gcs=function(node){return node instanceof HTMLElement?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(_247,_248){return parseFloat(_248)||0;};}else{d._toPixelValue=function(_249,_24a){if(!_24a){return 0;}if(_24a=="medium"){return 4;}if(_24a.slice&&_24a.slice(-2)=="px"){return parseFloat(_24a);}with(_249){var _24b=style.left;var _24c=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_24a;_24a=style.pixelLeft;}catch(e){_24a=0;}style.left=_24b;runtimeStyle.left=_24c;}return _24a;};}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_255){var ov=_255*100;node.style.zoom=1;af(node,1).Enabled=!(_255==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,_255);});}return _255;}:function(node,_259){return node.style.opacity=_259;};var _25a={left:true,top:true};var _25b=/margin|padding|width|height|max|min|offset/;var _25c=function(node,type,_25f){type=type.toLowerCase();if(d.isIE){if(_25f=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_25f){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _25a)){_25a[type]=_25b.test(type);}return _25a[type]?px(node,_25f):_25f;};var _260=d.isIE?"styleFloat":"cssFloat",_261={"cssFloat":_260,"styleFloat":_260,"float":_260};dojo.style=function(node,_263,_264){var n=d.byId(node),args=arguments.length,op=(_263=="opacity");_263=_261[_263]||_263;if(args==3){return op?d._setOpacity(n,_264):n.style[_263]=_264;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&!d.isString(_263)){for(var x in _263){d.style(node,x,_263[x]);}return s;}return (args==1)?s:_25c(n,_263,s[_263]||n.style[_263]);};dojo._getPadExtents=function(n,_26b){var s=_26b||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_270){var ne="none",s=_270||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_276){var s=_276||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_27b){var s=_27b||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_282){var s=_282||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_28d){var s=_28d||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_294){var s=_294||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&node.getAttribute("type").toUpperCase()=="BUTTON";};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);};dojo._setContentSize=function(node,_2a3,_2a4,_2a5){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_2a5);if(_2a3>=0){_2a3+=pb.w;}if(_2a4>=0){_2a4+=pb.h;}}d._setBox(node,NaN,NaN,_2a3,_2a4);};dojo._setMarginBox=function(node,_2a8,_2a9,_2aa,_2ab,_2ac){var s=_2ac||gcs(node),bb=d._usesBorderBox(node),pb=bb?_2b0:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(_2aa>=0&&!ns.width){ns.width="4px";}if(_2ab>=0&&!ns.height){ns.height="4px";}}}var mb=d._getMarginExtents(node,s);if(_2aa>=0){_2aa=Math.max(_2aa-pb.w-mb.w,0);}if(_2ab>=0){_2ab=Math.max(_2ab-pb.h-mb.h,0);}d._setBox(node,_2a8,_2a9,_2aa,_2ab);};var _2b0={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=d.byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=d.byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _2bd=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_2c1=0,_b=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_2c1+=val-0;if(node==_b){break;}}node=node.parentNode;}return _2c1;};dojo._docScroll=function(){var _b=d.body(),_w=d.global,de=d.doc.documentElement;return {y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||d._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};};dojo._isBodyLtr=function(){return ("_bodyLtr" in d)?d._bodyLtr:d._bodyLtr=gcs(d.body()).direction=="ltr";};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;if(d.isIE<7){return {x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};}else{if(d.isIE<8){return {x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top};}else{return {x:0,y:0};}}};dojo._fixIeBiDiScrollLeft=function(_2c7){var dd=d.doc;if(d.isIE&&!d._isBodyLtr()){var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;return _2c7+de.clientWidth-de.scrollWidth;}return _2c7;};dojo._abs=function(node,_2cb){var db=d.body(),dh=d.body().parentNode,ret;if(node["getBoundingClientRect"]){var _2cf=node.getBoundingClientRect();ret={x:_2cf.left,y:_2cf.top};if(d.isFF>=3){var cs=gcs(dh);ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);}if(d.isIE){var _2d1=d._getIeDocumentElementOffset();ret.x-=_2d1.x+(d.isQuirks?db.clientLeft:0);ret.y-=_2d1.y+(d.isQuirks?db.clientTop:0);}}else{ret={x:0,y:0};if(node["offsetParent"]){ret.x-=_2bd(node,"scrollLeft");ret.y-=_2bd(node,"scrollTop");var _2d2=node;do{var n=_2d2.offsetLeft,t=_2d2.offsetTop;ret.x+=isNaN(n)?0:n;ret.y+=isNaN(t)?0:t;cs=gcs(_2d2);if(_2d2!=node){if(d.isFF){ret.x+=2*px(_2d2,cs.borderLeftWidth);ret.y+=2*px(_2d2,cs.borderTopWidth);}else{ret.x+=px(_2d2,cs.borderLeftWidth);ret.y+=px(_2d2,cs.borderTopWidth);}}if(d.isFF&&cs.position=="static"){var _2d5=_2d2.parentNode;while(_2d5!=_2d2.offsetParent){var pcs=gcs(_2d5);if(pcs.position=="static"){ret.x+=px(_2d2,pcs.borderLeftWidth);ret.y+=px(_2d2,pcs.borderTopWidth);}_2d5=_2d5.parentNode;}}_2d2=_2d2.offsetParent;}while((_2d2!=dh)&&_2d2);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}if(_2cb){var _2d7=d._docScroll();ret.x+=_2d7.x;ret.y+=_2d7.y;}return ret;};dojo.coords=function(node,_2d9){var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d._abs(n,_2d9);mb.x=abs.x;mb.y=abs.y;return mb;};var _2de=d.isIE<8;var _2df=function(name){switch(name.toLowerCase()){case "tabindex":return _2de?"tabIndex":"tabindex";case "readonly":return "readOnly";case "class":return "className";case "for":case "htmlfor":return _2de?"htmlFor":"for";default:return name;}};var _2e1={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType",classname:"className",innerhtml:"innerHTML"};dojo.hasAttr=function(node,name){node=d.byId(node);var _2e4=_2df(name);_2e4=_2e4=="htmlFor"?"for":_2e4;var attr=node.getAttributeNode&&node.getAttributeNode(_2e4);return attr?attr.specified:false;};var _2e6={},_ctr=0,_2e8=dojo._scopeName+"attrid",_2e9={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};dojo.attr=function(node,name,_2ec){node=d.byId(node);var args=arguments.length;if(args==2&&!d.isString(name)){for(var x in name){d.attr(node,x,name[x]);}return;}name=_2df(name);if(args==3){if(d.isFunction(_2ec)){var _2ef=d.attr(node,_2e8);if(!_2ef){_2ef=_ctr++;d.attr(node,_2e8,_2ef);}if(!_2e6[_2ef]){_2e6[_2ef]={};}var h=_2e6[_2ef][name];if(h){d.disconnect(h);}else{try{delete node[name];}catch(e){}}_2e6[_2ef][name]=d.connect(node,name,_2ec);}else{if(typeof _2ec=="boolean"){node[name]=_2ec;}else{if(name==="style"&&!d.isString(_2ec)){d.style(node,_2ec);}else{if(name=="className"){node.className=_2ec;}else{if(name==="innerHTML"){if(d.isIE&&node.tagName.toLowerCase() in _2e9){d.empty(node);node.appendChild(d._toDom(_2ec,node.ownerDocument));}else{node[name]=_2ec;}}else{node.setAttribute(name,_2ec);}}}}}}else{var prop=_2e1[name.toLowerCase()];if(prop){return node[prop];}var _2f2=node[name];return (typeof _2f2=="boolean"||typeof _2f2=="function")?_2f2:(d.hasAttr(node,name)?node.getAttribute(name):null);}};dojo.removeAttr=function(node,name){d.byId(node).removeAttribute(_2df(name));};dojo.create=function(tag,_2f6,_2f7,pos){var doc=d.doc;if(_2f7){_2f7=d.byId(_2f7);doc=_2f7.ownerDocument;}if(d.isString(tag)){tag=doc.createElement(tag);}if(_2f6){d.attr(tag,_2f6);}if(_2f7){d.place(tag,_2f7,pos);}return tag;};d.empty=d.isIE?function(node){node=d.byId(node);for(var c;c=node.lastChild;){d.destroy(c);}}:function(node){d.byId(node).innerHTML="";};var _2fd={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_2fe=/<\s*([\w\:]+)/,_2ff={},_300=0,_301="__"+d._scopeName+"ToDomId";for(var _302 in _2fd){var tw=_2fd[_302];tw.pre=_302=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">";}d._toDom=function(frag,doc){doc=doc||d.doc;var _306=doc[_301];if(!_306){doc[_301]=_306=++_300+"";_2ff[_306]=doc.createElement("div");}frag+="";var _307=frag.match(_2fe),tag=_307?_307[1].toLowerCase():"",_309=_2ff[_306],wrap,i,fc,df;if(_307&&_2fd[tag]){wrap=_2fd[tag];_309.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){_309=_309.firstChild;}}else{_309.innerHTML=frag;}if(_309.childNodes.length==1){return _309.removeChild(_309.firstChild);}df=doc.createDocumentFragment();while(fc=_309.firstChild){df.appendChild(fc);}return df;};var _30d="className";dojo.hasClass=function(node,_30f){return ((" "+d.byId(node)[_30d]+" ").indexOf(" "+_30f+" ")>=0);};dojo.addClass=function(node,_311){node=d.byId(node);var cls=node[_30d];if((" "+cls+" ").indexOf(" "+_311+" ")<0){node[_30d]=cls+(cls?" ":"")+_311;}};dojo.removeClass=function(node,_314){node=d.byId(node);var t=d.trim((" "+node[_30d]+" ").replace(" "+_314+" "," "));if(node[_30d]!=t){node[_30d]=t;}};dojo.toggleClass=function(node,_317,_318){if(_318===undefined){_318=!d.hasClass(node,_317);}d[_318?"addClass":"removeClass"](node,_317);};})();}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var ap=Array.prototype,aps=ap.slice,apc=ap.concat;var tnl=function(a){a.constructor=d.NodeList;dojo._mixin(a,d.NodeList.prototype);return a;};var _31f=function(f,a,o){a=[0].concat(aps.call(a,0));o=o||d.global;return function(node){a[0]=node;return f.apply(o,a);};};var _324=function(f,o){return function(){this.forEach(_31f(f,arguments,o));return this;};};var _327=function(f,o){return function(){return this.map(_31f(f,arguments,o));};};var _32a=function(f,o){return function(){return this.filter(_31f(f,arguments,o));};};var _32d=function(f,g,o){return function(){var a=arguments,body=_31f(f,a,o);if(g.call(o||d.global,a)){return this.map(body);}this.forEach(body);return this;};};var _333=function(a){return a.length==1&&d.isString(a[0]);};var _335=function(node){var p=node.parentNode;if(p){p.removeChild(node);}};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};var nl=d.NodeList,nlp=nl.prototype;nl._wrap=tnl;nl._adaptAsMap=_327;nl._adaptAsForEach=_324;nl._adaptAsFilter=_32a;nl._adaptWithCondition=_32d;d.forEach(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return tnl(f.apply(this,arguments));};});d.forEach(["indexOf","lastIndexOf","every","some"],function(name){var f=d[name];nlp[name]=function(){return f.apply(d,[this].concat(aps.call(arguments,0)));};});d.forEach(["attr","style"],function(name){nlp[name]=_32d(d[name],_333);});d.forEach(["connect","addClass","removeClass","toggleClass","empty"],function(name){nlp[name]=_324(d[name]);});dojo.extend(dojo.NodeList,{concat:function(item){var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){return a&&!d.isArray(a)&&(a.constructor===NodeList||a.constructor==nl)?aps.call(a,0):a;});return tnl(apc.apply(t,m));},map:function(func,obj){return tnl(d.map(this,func,obj));},forEach:function(_346,_347){d.forEach(this,_346,_347);return this;},coords:_327(d.coords),place:function(_348,_349){var item=d.query(_348)[0];return this.forEach(function(node){d.place(node,item,_349);});},orphan:function(_34c){return (_34c?d._filterQueryResult(this,_34c):this).forEach(_335);},adopt:function(_34d,_34e){return d.query(_34d).place(item[0],_34e);},query:function(_34f){if(!_34f){return this;}var ret=this.map(function(node){return d.query(_34f,node).filter(function(_352){return _352!==undefined;});});return tnl(apc.apply([],ret));},filter:function(_353){var a=arguments,_355=this,_356=0;if(d.isString(_353)){_355=d._filterQueryResult(this,a[0]);if(a.length==1){return _355;}_356=1;}return tnl(d.filter(_355,a[_356],a[_356+1]));},addContent:function(_357,_358){var c=d.isString(_357)?d._toDom(_357,this[0]&&this[0].ownerDocument):_357,i,l=this.length-1;for(i=0;i<l;++i){d.place(c.cloneNode(true),this[i],_358);}if(l>=0){d.place(c,this[l],_358);}return this;},instantiate:function(_35b,_35c){var c=d.isFunction(_35b)?_35b:d.getObject(_35b);_35c=_35c||{};return this.forEach(function(node){new c(_35c,node);});},at:function(){var t=new dojo.NodeList();d.forEach(arguments,function(i){if(this[i]){t.push(this[i]);}},this);return t;}});d.forEach(["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"],function(evt){var _oe="on"+evt;nlp[_oe]=function(a,b){return this.connect(_oe,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;if(typeof dojo!="undefined"){dojo.provide("dojo._base.query");}(function(d){var trim=d.trim;var each=d.forEach;d._queryListCtor=d.NodeList;var _368=d.isString;var _369=function(){return d.doc;};var _36a=!!_369().firstChild["children"]?"children":"childNodes";var _36b=">~+";var _36c=false;var _36d=function(){return true;};var _36e=function(_36f){if(_36b.indexOf(_36f.slice(-1))>=0){_36f+=" * ";}else{_36f+=" ";}var ts=function(s,e){return trim(_36f.slice(s,e));};var _373=[];var _374=-1,_375=-1,_376=-1,_377=-1,_378=-1,inId=-1,_37a=-1,lc="",cc="",_37d;var x=0,ql=_36f.length,_380=null,_cp=null;var _382=function(){if(_37a>=0){var tv=(_37a==x)?null:ts(_37a,x);_380[(_36b.indexOf(tv)<0)?"tag":"oper"]=tv;_37a=-1;}};var _384=function(){if(inId>=0){_380.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _385=function(){if(_378>=0){_380.classes.push(ts(_378+1,x).replace(/\\/g,""));_378=-1;}};var _386=function(){_384();_382();_385();};var _387=function(){_386();if(_377>=0){_380.pseudos.push({name:ts(_377+1,x)});}_380.loops=(_380.pseudos.length||_380.attrs.length||_380.classes.length);_380.oquery=_380.query=ts(_37d,x);_380.otag=_380.tag=(_380["oper"])?null:(_380.tag||"*");if(_380.tag){_380.tag=_380.tag.toUpperCase();}if(_373.length&&(_373[_373.length-1].oper)){_380.infixOper=_373.pop();_380.query=_380.infixOper.query+" "+_380.query;}_373.push(_380);_380=null;};for(;lc=cc,cc=_36f.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_380){_37d=x;_380={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return (_36c)?this.otag:this.tag;}};_37a=x;}if(_374>=0){if(cc=="]"){if(!_cp.attr){_cp.attr=ts(_374+1,x);}else{_cp.matchFor=ts((_376||_374+1),x);}var cmf=_cp.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_cp.matchFor=cmf.slice(1,-1);}}_380.attrs.push(_cp);_cp=null;_374=_376=-1;}else{if(cc=="="){var _389=("|~^$*".indexOf(lc)>=0)?lc:"";_cp.type=_389+cc;_cp.attr=ts(_374+1,x-_389.length);_376=x+1;}}}else{if(_375>=0){if(cc==")"){if(_377>=0){_cp.value=ts(_375+1,x);}_377=_375=-1;}}else{if(cc=="#"){_386();inId=x+1;}else{if(cc=="."){_386();_378=x;}else{if(cc==":"){_386();_377=x;}else{if(cc=="["){_386();_374=x;_cp={};}else{if(cc=="("){if(_377>=0){_cp={name:ts(_377+1,x),value:null};_380.pseudos.push(_cp);}_375=x;}else{if((cc==" ")&&(lc!=cc)){_387();}}}}}}}}}return _373;};var _38a=function(_38b,_38c){if(!_38b){return _38c;}if(!_38c){return _38b;}return function(){return _38b.apply(window,arguments)&&_38c.apply(window,arguments);};};var _38d=function(i,arr){var r=arr||[];if(i){r.push(i);}return r;};var _391=function(n){return (1==n.nodeType);};var _393="";var _394=function(elem,attr){if(!elem){return _393;}if(attr=="class"){return elem.className||_393;}if(attr=="for"){return elem.htmlFor||_393;}if(attr=="style"){return elem.style.cssText||_393;}return (_36c?elem.getAttribute(attr):elem.getAttribute(attr,2))||_393;};var _397={"*=":function(attr,_399){return function(elem){return (_394(elem,attr).indexOf(_399)>=0);};},"^=":function(attr,_39c){return function(elem){return (_394(elem,attr).indexOf(_39c)==0);};},"$=":function(attr,_39f){var tval=" "+_39f;return function(elem){var ea=" "+_394(elem,attr);return (ea.lastIndexOf(_39f)==(ea.length-_39f.length));};},"~=":function(attr,_3a4){var tval=" "+_3a4+" ";return function(elem){var ea=" "+_394(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_3a9){var _3aa=" "+_3a9+"-";return function(elem){var ea=" "+_394(elem,attr);return ((ea==_3a9)||(ea.indexOf(_3aa)==0));};},"=":function(attr,_3ae){return function(elem){return (_394(elem,attr)==_3ae);};}};var _3b0=(typeof _369().firstChild.nextElementSibling=="undefined");var _ns=!_3b0?"nextElementSibling":"nextSibling";var _ps=!_3b0?"previousElementSibling":"previousSibling";var _3b3=(_3b0?_391:_36d);var _3b4=function(node){while(node=node[_ps]){if(_3b3(node)){return false;}}return true;};var _3b6=function(node){while(node=node[_ns]){if(_3b3(node)){return false;}}return true;};var _3b8=function(node){var root=node.parentNode;var te,x=0,i=0,tret=root[_36a],ret=-1,ci=parseInt(node["_cidx"]||-1),cl=parseInt(root["_clen"]||-1);if(!tret){return -1;}if(ci>=0&&cl>=0&&cl==tret.length){return ci;}root["_clen"]=tret.length;while(te=tret[x++]){if(_3b3(te)){i++;if(node===te){ret=i;}te["_cix"]=i;}}return ret;};var _3c1={"checked":function(name,_3c3){return function(elem){return !!d.attr(elem,"checked");};},"first-child":function(){return _3b4;},"last-child":function(){return _3b6;},"only-child":function(name,_3c6){return function(node){if(!_3b4(node)){return false;}if(!_3b6(node)){return false;}return true;};},"empty":function(name,_3c9){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt===1)||(nt==3)){return false;}}return true;};},"contains":function(name,_3d0){var cz=_3d0.charAt(0);if(cz=="\""||cz=="'"){_3d0=_3d0.slice(1,-1);}return function(elem){return (elem.innerHTML.indexOf(_3d0)>=0);};},"not":function(name,_3d4){var ntf=_3d6(_36e(_3d4)[0]);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_3d9){var pi=parseInt;if(_3d9=="odd"){_3d9="2n+1";}else{if(_3d9=="even"){_3d9="2n";}}if(_3d9.indexOf("n")!=-1){var _3db=_3d9.split("n",2);var pred=_3db[0]?((_3db[0]=="-")?-1:pi(_3db[0])):1;var idx=_3db[1]?pi(_3db[1]):0;var lb=0,ub=-1;if(pred>0){if(idx<0){idx=(idx%pred)&&(pred+(idx%pred));}else{if(idx>0){if(idx>=pred){lb=idx-idx%pred;}idx=idx%pred;}}}else{if(pred<0){pred*=-1;if(idx>0){ub=idx;idx=idx%pred;}}}if(pred>0){return function(elem){var i=_3b8(elem);return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);};}else{_3d9=idx;}}var _3e2=pi(_3d9);return function(elem){return (_3b8(elem)==_3e2);};}};var _3e4=(d.isIE)?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className";}return function(elem){return (_36c?elem.getAttribute(cond):elem[cond]||elem[clc]);};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _3d6=function(_3ea,_3eb){if(!_3ea){return _36d;}_3eb=_3eb||{};var ff=null;if(!("el" in _3eb)){ff=_38a(ff,_391);}if(!("tag" in _3eb)){if(_3ea.tag!="*"){ff=_38a(ff,function(elem){return (elem&&(elem.tagName==_3ea.getTag()));});}}if(!("classes" in _3eb)){each(_3ea.classes,function(_3ee,idx,arr){var re=new RegExp("(?:^|\\s)"+_3ee+"(?:\\s|$)");ff=_38a(ff,function(elem){return re.test(elem.className);});ff.count=idx;});}if(!("pseudos" in _3eb)){each(_3ea.pseudos,function(_3f3){var pn=_3f3.name;if(_3c1[pn]){ff=_38a(ff,_3c1[pn](pn,_3f3.value));}});}if(!("attrs" in _3eb)){each(_3ea.attrs,function(attr){var _3f6;var a=attr.attr;if(attr.type&&_397[attr.type]){_3f6=_397[attr.type](a,attr.matchFor);}else{if(a.length){_3f6=_3e4(a);}}if(_3f6){ff=_38a(ff,_3f6);}});}if(!("id" in _3eb)){if(_3ea.id){ff=_38a(ff,function(elem){return (!!elem&&(elem.id==_3ea.id));});}}if(!ff){if(!("default" in _3eb)){ff=_36d;}}return ff;};var _3f9=function(_3fa){return function(node,ret,bag){while(node=node[_ns]){if(_3b0&&(!_391(node))){continue;}if((!bag||_3fe(node,bag))&&_3fa(node)){ret.push(node);}break;}return ret;};};var _3ff=function(_400){return function(root,ret,bag){var te=root[_ns];while(te){if(_3b3(te)){if(bag&&!_3fe(te,bag)){break;}if(_400(te)){ret.push(te);}}te=te[_ns];}return ret;};};var _405=function(_406){_406=_406||_36d;return function(root,ret,bag){var te,x=0,tret=root[_36a];while(te=tret[x++]){if(_3b3(te)&&(!bag||_3fe(te,bag))&&(_406(te,x))){ret.push(te);}}return ret;};};var _40d=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break;}pn=pn.parentNode;}return !!pn;};var _411={};var _412=function(_413){var _414=_411[_413.query];if(_414){return _414;}var io=_413.infixOper;var oper=(io?io.oper:"");var _417=_3d6(_413,{el:1});var qt=_413.tag;var _419=("*"==qt);if(!oper){if(_413.id){filerFunc=(!_413.loops&&!qt)?_36d:_3d6(_413,{el:1,id:1});_414=function(root,arr){var te=d.byId(_413.id,(root.ownerDocument||root));if(!_417(te)){return;}if(9==root.nodeType){return _38d(te,arr);}else{if(_40d(te,root)){return _38d(te,arr);}}};}else{if(_369()["getElementsByClassName"]&&_413.classes.length){_417=_3d6(_413,{el:1,classes:1,id:1});var _41d=_413.classes.join(" ");_414=function(root,arr){var ret=_38d(0,arr),te,x=0;var tret=root.getElementsByClassName(_41d);while((te=tret[x++])){if(_417(te,root)){ret.push(te);}}return ret;};}else{_417=_3d6(_413,{el:1,tag:1,id:1});_414=function(root,arr){var ret=_38d(0,arr),te,x=0;var tret=root.getElementsByTagName(_413.getTag());while((te=tret[x++])){if(_417(te,root)){ret.push(te);}}return ret;};}}}else{var _42a={el:1};if(_419){_42a.tag=1;}_417=_3d6(_413,_42a);if("+"==oper){_414=_3f9(_417);}else{if("~"==oper){_414=_3ff(_417);}else{if(">"==oper){_414=_405(_417);}}}}return _411[_413.query]=_414;};var _42b=function(root,_42d){var _42e=_38d(root),qp,x,te,qpl=_42d.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=_42d[i];x=_42e.length-1;if(x>0){bag={};ret.nozip=true;}var gef=_412(qp);while(te=_42e[x--]){gef(te,ret,bag);}if(!ret.length){break;}_42e=ret;}return ret;};var _437={},_438={};var _439=function(_43a){var _43b=_36e(trim(_43a));if(_43b.length==1){var tef=_412(_43b[0]);return function(root){var r=tef(root,new d._queryListCtor());if(r){r.nozip=true;}return r;};}return function(root){return _42b(root,_43b);};};var nua=navigator.userAgent;var wk="WebKit/";var _442=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var _443=d.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var _445=(!!_369()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_442));var _446=function(_447,_448){if(_445){var _449=_438[_447];if(_449&&!_448){return _449;}}var _44a=_437[_447];if(_44a){return _44a;}var qcz=_447.charAt(0);var _44c=(-1==_447.indexOf(" "));if((qcz=="#")&&(_44c)&&(!/[.:\[\(]/.test(_447))){_448=true;}var _44d=(_445&&(!_448)&&(_36b.indexOf(qcz)==-1)&&(!d.isIE||(_447.indexOf(":")==-1))&&(_447.indexOf(":contains")==-1)&&(_447.indexOf("|=")==-1)&&true);if(_44d){var tq=(_36b.indexOf(_447.charAt(_447.length-1))>=0)?(_447+" *"):_447;return _438[_447]=function(root){try{if(!((9==root.nodeType)||_44c)){throw "";}var r=root[qsa](tq);r[_443]=true;return r;}catch(e){return _446(_447,true)(root);}};}else{var _451=_447.split(/\s*,\s*/);return _437[_447]=((_451.length<2)?_439(_447):function(root){var _453=0;var ret=[];var tp;while((tp=_451[_453++])){ret=ret.concat(_439(tp)(root));}return ret;});}};var _456=0;var _457=d.isIE?function(node){if(_36c){return (node.getAttribute("_uid")||node.setAttribute("_uid",++_456)||_456);}else{return node.uniqueID;}}:function(node){return (node._uid||(node._uid=++_456));};var _3fe=function(node,bag){if(!bag){return 1;}var id=_457(node);if(!bag[id]){return bag[id]=1;}return 0;};var _45d="_zipIdx";var _zip=function(arr){if(arr&&arr.nozip){return (d._queryListCtor._wrap)?d._queryListCtor._wrap(arr):arr;}var ret=new d._queryListCtor();if(!arr||!arr.length){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_456++;if(d.isIE&&_36c){var _461=_456+"";arr[0].setAttribute(_45d,_461);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_45d)!=_461){ret.push(te);}te.setAttribute(_45d,_461);}}else{if(d.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_391(te)){ret.push(te);}}}catch(e){}}else{if(arr[0]){arr[0][_45d]=_456;}for(var x=1,te;te=arr[x];x++){if(arr[x][_45d]!=_456){ret.push(te);}te[_45d]=_456;}}}return ret;};d.query=function(_464,root){if(!_464){return new d._queryListCtor();}if(_464.constructor==d._queryListCtor){return _464;}if(!_368(_464)){return new d._queryListCtor(_464);}if(_368(root)){root=d.byId(root);if(!root){return new d._queryListCtor();}}root=root||_369();var od=root.ownerDocument||root.documentElement;_36c=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&root.doctype)||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=_446(_464)(root);if(r&&r.nozip&&!d._queryListCtor._wrap){return r;}return _zip(r);};d.query.pseudos=_3c1;d._filterQueryResult=function(_468,_469){var _46a=new d._queryListCtor();var _46b=_3d6(_36e(_469)[0]);for(var x=0,te;te=_468[x];x++){if(_46b(te)){_46a.push(te);}}return _46a;};})(this["queryPortability"]||this["acme"]||dojo);}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _d=dojo;function _46f(obj,name,_472){var val=obj[name];if(_d.isString(val)){obj[name]=[val,_472];}else{if(_d.isArray(val)){val.push(_472);}else{obj[name]=_472;}}};dojo.formToObject=function(_474){var ret={};var _476="file|submit|image|reset|button|";_d.forEach(dojo.byId(_474).elements,function(item){var _in=item.name;var type=(item.type||"").toLowerCase();if(_in&&type&&_476.indexOf(type)==-1&&!item.disabled){if(type=="radio"||type=="checkbox"){if(item.checked){_46f(ret,_in,item.value);}}else{if(item.multiple){ret[_in]=[];_d.query("option",item).forEach(function(opt){if(opt.selected){_46f(ret,_in,opt.value);}});}else{_46f(ret,_in,item.value);if(type=="image"){ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0;}}}}});return ret;};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var _47d=[];var _47e={};for(var name in map){var _480=map[name];if(_480!=_47e[name]){var _481=enc(name)+"=";if(_d.isArray(_480)){for(var i=0;i<_480.length;i++){_47d.push(_481+enc(_480[i]));}}else{_47d.push(_481+enc(_480));}}}return _47d.join("&");};dojo.formToQuery=function(_483){return _d.objectToQuery(_d.formToObject(_483));};dojo.formToJson=function(_484,_485){return _d.toJson(_d.formToObject(_484),_485);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_d.forEach(qp,function(item){if(item.length){var _48b=item.split("=");var name=dec(_48b.shift());var val=dec(_48b.join("="));if(_d.isString(ret[name])){ret[name]=[ret[name]];}if(_d.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;dojo._contentHandlers={text:function(xhr){return xhr.responseText;},json:function(xhr){return _d.fromJson(xhr.responseText||null);},"json-comment-filtered":function(xhr){if(!dojo.config.useCommentedJson){console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");}var _491=xhr.responseText;var _492=_491.indexOf("/*");var _493=_491.lastIndexOf("*/");if(_492==-1||_493==-1){throw new Error("JSON was not comment filtered");}return _d.fromJson(_491.substring(_492+2,_493));},javascript:function(xhr){return _d.eval(xhr.responseText);},xml:function(xhr){var _496=xhr.responseXML;if(_d.isIE&&(!_496||!_496.documentElement)){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_d.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);_496=dom;}catch(e){return false;}return true;});}return _496;}};dojo._contentHandlers["json-comment-optional"]=function(xhr){var _49d=_d._contentHandlers;if(xhr.responseText&&xhr.responseText.indexOf("/*")!=-1){return _49d["json-comment-filtered"](xhr);}else{return _49d["json"](xhr);}};dojo._ioSetArgs=function(args,_49f,_4a0,_4a1){var _4a2={args:args,url:args.url};var _4a3=null;if(args.form){var form=_d.byId(args.form);var _4a5=form.getAttributeNode("action");_4a2.url=_4a2.url||(_4a5?_4a5.value:null);_4a3=_d.formToObject(form);}var _4a6=[{}];if(_4a3){_4a6.push(_4a3);}if(args.content){_4a6.push(args.content);}if(args.preventCache){_4a6.push({"dojo.preventCache":new Date().valueOf()});}_4a2.query=_d.objectToQuery(_d.mixin.apply(null,_4a6));_4a2.handleAs=args.handleAs||"text";var d=new _d.Deferred(_49f);d.addCallbacks(_4a0,function(_4a8){return _4a1(_4a8,d);});var ld=args.load;if(ld&&_d.isFunction(ld)){d.addCallback(function(_4aa){return ld.call(args,_4aa,_4a2);});}var err=args.error;if(err&&_d.isFunction(err)){d.addErrback(function(_4ac){return err.call(args,_4ac,_4a2);});}var _4ad=args.handle;if(_4ad&&_d.isFunction(_4ad)){d.addBoth(function(_4ae){return _4ad.call(args,_4ae,_4a2);});}d.ioArgs=_4a2;return d;};var _4af=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _at=typeof xhr.abort;if(_at=="function"||_at=="object"||_at=="unknown"){xhr.abort();}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel";}return err;};var _4b4=function(dfd){var ret=_d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret;};var _4b7=function(_4b8,dfd){console.error(_4b8);return _4b8;};var _4ba=null;var _4bb=[];var _4bc=function(){var now=(new Date()).getTime();if(!_d._blockAsync){for(var i=0,tif;i<_4bb.length&&(tif=_4bb[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_4bb.splice(i--,1);}else{if(tif.ioCheck(dfd)){_4bb.splice(i--,1);tif.resHandle(dfd);}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_4bb.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();}}}}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(e){dfd.errback(e);}}}}if(!_4bb.length){clearInterval(_4ba);_4ba=null;return;}};dojo._ioCancelAll=function(){try{_d.forEach(_4bb,function(i){try{i.dfd.cancel();}catch(e){}});}catch(e){}};if(_d.isIE){_d.addOnWindowUnload(_d._ioCancelAll);}_d._ioWatch=function(dfd,_4c5,_4c6,_4c7){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime();}_4bb.push({dfd:dfd,validCheck:_4c5,ioCheck:_4c6,resHandle:_4c7});if(!_4ba){_4ba=setInterval(_4bc,50);}if(args.sync){_4bc();}};var _4c9="application/x-www-form-urlencoded";var _4ca=function(dfd){return dfd.ioArgs.xhr.readyState;};var _4cc=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _4ce=function(dfd){var xhr=dfd.ioArgs.xhr;if(_d._isDocumentOk(xhr)){dfd.callback(dfd);}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err);}};dojo._ioAddQueryToUrl=function(_4d2){if(_4d2.query.length){_4d2.url+=(_4d2.url.indexOf("?")==-1?"?":"&")+_4d2.query;_4d2.query=null;}};dojo.xhr=function(_4d3,args,_4d5){var dfd=_d._ioSetArgs(args,_4af,_4b4,_4b7);dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);if(_4d5){if("postData" in args){dfd.ioArgs.query=args.postData;}else{if("putData" in args){dfd.ioArgs.query=args.putData;}}}else{_d._ioAddQueryToUrl(dfd.ioArgs);}var _4d7=dfd.ioArgs;var xhr=_4d7.xhr;xhr.open(_4d3,_4d7.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{xhr.setRequestHeader(hdr,args.headers[hdr]);}}}xhr.setRequestHeader("Content-Type",args.contentType||_4c9);if(!args.headers||!args.headers["X-Requested-With"]){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}if(dojo.config.debugAtAllCosts){xhr.send(_4d7.query);}else{try{xhr.send(_4d7.query);}catch(e){dfd.ioArgs.error=e;dfd.cancel();}}_d._ioWatch(dfd,_4ca,_4cc,_4ce);xhr=null;return dfd;};dojo.xhrGet=function(args){return _d.xhr("GET",args);};dojo.rawXhrPost=dojo.xhrPost=function(args){return _d.xhr("POST",args,true);};dojo.rawXhrPut=dojo.xhrPut=function(args){return _d.xhr("PUT",args,true);};dojo.xhrDelete=function(args){return _d.xhr("DELETE",args);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;var _4df=d.mixin;dojo._Line=function(_4e0,end){this.start=_4e0;this.end=end;};dojo._Line.prototype.getValue=function(n){return ((this.end-this.start)*n)+this.start;};d.declare("dojo._Animation",null,{constructor:function(args){_4df(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1]);}},duration:350,repeat:0,rate:10,_percent:0,_startRepeatCount:0,_fire:function(evt,args){if(this[evt]){if(dojo.config.debugAtAllCosts){this[evt].apply(this,args||[]);}else{try{this[evt].apply(this,args||[]);}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}}}return this;},play:function(_4e6,_4e7){var _t=this;if(_t._delayTimer){_t._clearTimer();}if(_4e7){_t._stopTimer();_t._active=_t._paused=false;_t._percent=0;}else{if(_t._active&&!_t._paused){return _t;}}_t._fire("beforeBegin");var de=_4e6||_t.delay,_p=dojo.hitch(_t,"_play",_4e7);if(de>0){_t._delayTimer=setTimeout(_p,de);return _t;}_p();return _t;},_play:function(_4eb){var _t=this;if(_t._delayTimer){_t._clearTimer();}_t._startTime=new Date().valueOf();if(_t._paused){_t._startTime-=_t.duration*_t._percent;}_t._endTime=_t._startTime+_t.duration;_t._active=true;_t._paused=false;var _4ed=_t.curve.getValue(_t._percent);if(!_t._percent){if(!_t._startRepeatCount){_t._startRepeatCount=_t.repeat;}_t._fire("onBegin",[_4ed]);}_t._fire("onPlay",[_4ed]);_t._cycle();return _t;},pause:function(){var _t=this;if(_t._delayTimer){_t._clearTimer();}_t._stopTimer();if(!_t._active){return _t;}_t._paused=true;_t._fire("onPause",[_t.curve.getValue(_t._percent)]);return _t;},gotoPercent:function(_4ef,_4f0){var _t=this;_t._stopTimer();_t._active=_t._paused=true;_t._percent=_4ef;if(_4f0){_t.play();}return _t;},stop:function(_4f2){var _t=this;if(_t._delayTimer){_t._clearTimer();}if(!_t._timer){return _t;}_t._stopTimer();if(_4f2){_t._percent=1;}_t._fire("onStop",[_t.curve.getValue(_t._percent)]);_t._active=_t._paused=false;return _t;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _t=this;if(_t._active){var curr=new Date().valueOf();var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);if(step>=1){step=1;}_t._percent=step;if(_t.easing){step=_t.easing(step);}_t._fire("onAnimate",[_t.curve.getValue(step)]);if(_t._percent<1){_t._startTimer();}else{_t._active=false;if(_t.repeat>0){_t.repeat--;_t.play(null,true);}else{if(_t.repeat==-1){_t.play(null,true);}else{if(_t._startRepeatCount){_t.repeat=_t._startRepeatCount;_t._startRepeatCount=0;}}}_t._percent=0;_t._fire("onEnd");_t._stopTimer();}}return _t;},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer;}});var ctr=0,_4f8=[],_4f9=null,_4fa={run:function(){}};dojo._Animation.prototype._startTimer=function(){if(!this._timer){this._timer=d.connect(_4fa,"run",this,"_cycle");ctr++;}if(!_4f9){_4f9=setInterval(d.hitch(_4fa,"run"),this.rate);}};dojo._Animation.prototype._stopTimer=function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_4f9);_4f9=null;ctr=0;}};var _4fb=d.isIE?function(node){var ns=node.style;if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _4ff=_4df({properties:{}},args),_500=(_4ff.properties.opacity={});_500.start=!("start" in _4ff)?function(){return +d.style(_4ff.node,"opacity")||0;}:_4ff.start;_500.end=_4ff.end;var anim=d.animateProperty(_4ff);d.connect(anim,"beforeBegin",d.partial(_4fb,_4ff.node));return anim;};dojo.fadeIn=function(args){return d._fade(_4df({end:1},args));};dojo.fadeOut=function(args){return d._fade(_4df({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _505=function(_506){this._properties=_506;for(var p in _506){var prop=_506[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}};_505.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],_50d=prop.start;if(_50d instanceof d.Color){ret[p]=d.blendColors(_50d,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_50d)){ret[p]=((prop.end-_50d)*r)+_50d+(p!="opacity"?prop.units||"px":0);}}}return ret;};dojo.animateProperty=function(args){args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d._Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block";}var prop=this.properties[p];prop=pm[p]=_4df({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start();}if(d.isFunction(prop.end)){prop.end=prop.end();}var _513=(p.toLowerCase().indexOf("color")>=0);function _514(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?+v:(_513?v:parseFloat(v));};if(!("end" in prop)){prop.end=_514(this.node,p);}else{if(!("start" in prop)){prop.start=_514(this.node,p);}}if(_513){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);}}this.curve=new _505(pm);});d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));return anim;};dojo.anim=function(node,_519,_51a,_51b,_51c,_51d){return d.animateProperty({node:node,duration:_51a||d._Animation.prototype.duration,properties:_519,easing:_51b,onEnd:_51c}).play(_51d||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");dojo.forEach(dojo.config.require,function(i){dojo["require"](i);});}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._fakeLoadInit,1000);}})();
diff --git a/trunk/assembly/src/release/webapps/favicon.ico b/trunk/assembly/src/release/webapps/favicon.ico
deleted file mode 100644
index a2caf8a..0000000
--- a/trunk/assembly/src/release/webapps/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/trunk/assembly/src/release/webapps/index.html b/trunk/assembly/src/release/webapps/index.html
deleted file mode 100644
index fe3f737..0000000
--- a/trunk/assembly/src/release/webapps/index.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!--
-  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.
--->
- 
- 
- 
- 
- 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
- 
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
-<html> 
-<head> 
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
-    <title>Apache ActiveMQ</title> 
-    <style type="text/css" media="screen"> 
-        @import url(/admin/styles/sorttable.css);
-        @import url(/admin/styles/type-settings.css);
-        @import url(/admin/styles/site.css);
-        @import url(/admin/styles/prettify.css);
-    </style> 
-    
-        <script type='text/javascript' src='/js/common.js'></script> 
-        <script type='text/javascript' src='/js/css.js'></script> 
-        <script type='text/javascript' src='/js/standardista-table-sorting.js'></script> 
-        <script type='text/javascript' src='/js/prettify.js'></script> 
-        <script>addEvent(window, 'load', prettyPrint)</script> 
-    
- 
-    
-</head> 
- 
-<body> 
- 
- 
-<div class="white_box"> 
-    <div class="header"> 
-        <div class="header_l"> 
-            <div class="header_r"> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="content"> 
-        <div class="content_l"> 
-            <div class="content_r"> 
- 
-                <div> 
- 
-                    <!-- Banner --> 
-                    <div id="asf_logo"> 
-                        <div id="activemq_logo"> 
-                            <a style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;"
-                               href="http://activemq.apache.org/"
-                               title="The most popular and powerful open source Message Broker">ActiveMQ</a> 
-                            <a style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;"
-                               href="http://www.apache.org/" title="The Apache Software Foundation">ASF</a> 
-                        </div> 
-                    </div> 
- 
- 
-                    <div class="top_red_bar"> 
-                        <div id="site-breadcrumbs"> 
-                        </div> 
-                        <div id="site-quicklinks"><P> 
-                            <a href="http://activemq.apache.org/support.html"
-                               title="Get help and support using Apache ActiveMQ">Support</a></p> 
-                        </div> 
-                    </div> 
- 
-                    <table border="0"> 
-                        <tbody> 
-                            <tr> 
-                                <td valign="top" width="100%" style="overflow:hidden;"> 
-                                    <div class="body-content"> 
-                                        <h2>Welcome to the Apache ActiveMQ!</h2> 
-                                            
-                                                <p>What do you want to do next?</p>
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a title="Manage ActiveMQ broker" href="/admin/">Manage ActiveMQ broker</a></li> 
-                                                    <li><a title="Manage Camel instance" href="/camel/">Manage Camel instance</a></li> 
-                                                    <li><a title="See some Web demos" href="/demo/">See some Web demos</a></li>  
-                                                </ul> 
-                                    </div> 
-                                </td> 
-                                <td valign="top"> 
- 
-                                    <div class="navigation"> 
-                                        <div class="navigation_top"> 
-                                            <div class="navigation_bottom"> 
-                                                <H3>Useful Links</H3> 
- 
-                                                <ul class="alternate" type="square"> 
-                                                    <li><a href="http://activemq.apache.org/"
-                                                           title="The most popular and powerful open source Message Broker">Documentation</a></li> 
-                                                    <li><a href="http://activemq.apache.org/faq.html">FAQ</a></li> 
-                                                    <li><a href="http://activemq.apache.org/download.html">Downloads</a> 
-                                                    </li> 
-                                                    <li><a href="http://activemq.apache.org/discussion-forums.html">Forums</a> 
-                                                    </li> 
-                                                </ul> 
-                                            </div> 
-                                        </div> 
-                                    </div> 
-                                </td> 
-                            </tr> 
-                        </tbody> 
-                    </table> 
- 
- 
-                    <div class="bottom_red_bar"></div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-    <div class="black_box"> 
-        <div class="footer"> 
-            <div class="footer_l"> 
-                <div class="footer_r"> 
-                    <div> 
-                        Copyright 2005-2007 The Apache Software Foundation.
- 
-                        (<a href="?printable=true">printable version</a>)
-                    </div> 
-                </div> 
-            </div> 
-        </div> 
-    </div> 
-</div> 
-<div class="design_attribution"><a href="http://hiramchirino.com/">Graphic Design By Hiram</a></div> 
- 
-</body> 
-</html> 
diff --git a/trunk/assembly/src/release/webapps/styles/site.css b/trunk/assembly/src/release/webapps/styles/site.css
deleted file mode 100644
index 13cfc54..0000000
--- a/trunk/assembly/src/release/webapps/styles/site.css
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * 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.
- */
-
-body {
-    padding: 20px;
-}
-
-/* ====================================================== */
-/*  Rounded Box Styles */
-/* ====================================================== */
-div.white_box div.header   {background: transparent url("../images/white-header-top.png") repeat-x 0pt;}
-div.white_box div.header_l {background: transparent url("../images/white-header-left.png") no-repeat 0pt;}
-div.white_box div.header_r {background: transparent url("../images/white-header-right.png") no-repeat 100% 0pt;}
-div.white_box div.header_r {height: 18px;}
-
-div.white_box div.content   {background: #ffffff; } 
-div.white_box div.content_l {background: transparent url("../images/content-left.png") repeat-y 0pt;}
-div.white_box div.content_r {background: transparent url("../images/content-right.png") repeat-y 100% 0pt;}
-div.white_box div.content_r {padding-left: 6px; padding-right: 9px;}
-
-div.white_box div.footer {background: transparent url("../images/white-footer-bottom.png") repeat-x 0pt;}
-div.white_box div.footer_l {background: transparent url("../images/white-footer-left.png") no-repeat 0pt;}
-div.white_box div.footer_r {background: transparent url("../images/white-footer-right.png") no-repeat 100% 0pt;}
-div.white_box div.footer_r {color: #ffffff; height:37px; padding:0px;}
-div.white_box div.footer_r {padding-left: 6px;padding-right: 9px;}
-
-div.black_box div.footer {background: transparent url("../images/black-footer-bottom.png") repeat-x 0pt;}
-div.black_box div.footer_l {background: transparent url("../images/black-footer-left.png") no-repeat 0pt;}
-div.black_box div.footer_r {background: transparent url("../images/black-footer-right.png") no-repeat right bottom;}
-div.black_box div.footer_r {color: #ffffff; height:37; padding:0px;}
-div.black_box div.footer_r {padding-left: 6px;padding-right: 9px;}
-
-/* ====================================================== */
-/*  Logo Positioning */
-/* ====================================================== */
-div#activemq_logo{background: transparent url("../images/activemq-logo.png") no-repeat left top; height: 100px; }
-div#activemq_logo{margin-left: 20px; overflow: hidden;}
-div#asf_logo {background: transparent url("../images/asf-logo.png") no-repeat right center; height: 100px; }
-
-/* ====================================================== */
-/*  Top and Bottom Bar Styling */
-/* ====================================================== */
-div.top_red_bar {
-  background: transparent url("../images/top-red-bar.png") repeat 0pt; 
-  overflow: hidden;
-}
-div.bottom_red_bar {
-  background: transparent url("../images/bottom-red-bar.png") repeat 0pt; height: 11px;
-  overflow: hidden;
-}
-
-div#site-breadcrumbs {
-  margin: 0px;
-  padding: 0px;
-  float:left;
-  padding: 2px;
-  padding-left: 20px;
-}
-div#site-quicklinks {
-  margin: 0px;
-  padding: 2px;
-  padding-right: 20px;
-}
-div#site-quicklinks p {
-  text-align: right;
-  padding: 0px; 
-  margin: 0px;
-}
-
-div#site-quicklinks, div#site-breadcrumbs, div#site-quicklinks p, div#site-breadcrumbs p,
-div#site-quicklinks a:link, div#site-quicklinks a:visited,
-div#site-breadcrumbs a:link, div#site-breadcrumbs a:visited {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 16px;
-  color: #ffffff;
-  text-decoration: none;
-}
-div#site-quicklinks a:active, div#site-quicklinks a:hover,
-div#site-breadcrumbs a:active, div#site-breadcrumbs a:hover {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 13px;
-  color: #c0c0c0;
-  text-decoration: underline;
-}
-div#site-quicklinks sup img {
-  height: 0px;
-  width: 0px;
-}
-
-/* ====================================================== */
-/*  Navigation Styling */
-/* ====================================================== */
-div.navigation {background: #ffffff url("../images/right-box-left.png") repeat-y left 0pt; width:200px;}
-div.navigation_top {background: transparent url("../images/right-box-top.png") no-repeat left top;} 
-div.navigation_bottom {background: transparent url("../images/right-box-bottom.png") no-repeat left bottom;}
-div.navigation_bottom {padding-left: 5px;padding-right:11px; padding-top:17px; padding-bottom:17px;}
-
-/* div.navigation {float:right;} */
-div.navigation_bottom ol, 
-div.navigation_bottom ul, 
-div.navigation_bottom {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 13px;
-  text-align: left;
-  padding-left: 11px;
-}
-
-div.navigation {
-  text-align: left;
-  clear: left;
-}
-
-
-div.navigation h3, 
-div.navigation h3 a:link, div.navigation h3 a:visited, div.navigation h3 a:active, div.navigation h3 a:hover { 
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 120%;
-
-  border: none;
-  font-size: 15px; 
-  text-decoration: none;
-  color: #660033;
-  margin:5px;
-}
-
-div.navigation h3 {
-  background: url("../images/big-bullet.png") no-repeat 0pt;
-  background-position:left center;
-  margin-left:15px;
-  padding-left: 20px;
-}
-
-div.navigation a:link, div.navigation a:visited, div.navigation a:active, div.navigation a:hover {
-  text-decoration: none;
-  color: #000000;
-}
-div.navigation a:active, div.navigation a:hover {
-  text-decoration: underline;
-  color: #880055;
-}
-
-div.navigation ul {
-  padding-left: 25px;
-  list-style: none; 
-  padding-bottom: 10px;
-  border-bottom:1px solid #CACACA;
-  margin: 0px;
-  margin-left: 10px;
-  margin-bottom: 10px;
-}
-
-div.navigation_bottom div { 
-  margin-left:10px;
-  padding-left:25px;
-  padding-bottom: 10px;
-  margin-bottom: 10px;
-  border-bottom:1px solid #CACACA;
-}
-
-div.navigation img {
-  margin-left:15px;
-  padding-left: 20px;
-}
-
-div.navigation sup img { height: 0px; width: 0px; }
-
-/* ====================================================== */
-/*  Footer Styling */
-/* ====================================================== */
-div.black_box div.footer_r div {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 10px;
-  font-weight: normal;	
-  line-height: normal;
-  padding:5px;
-  padding-left:20px;
-}
-
-div.design_attribution, div.design_attribution a {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 10px;
-  text-align:center;
-  color: #a0a0a0;
-}
diff --git a/trunk/assembly/src/release/webapps/styles/type-settings.css b/trunk/assembly/src/release/webapps/styles/type-settings.css
deleted file mode 100644
index e1ba15b..0000000
--- a/trunk/assembly/src/release/webapps/styles/type-settings.css
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * 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.
- */
-body, p, ul, ol {
-    font-family: verdana,arial,helvetica,sans-serif;
-    font-size: 14px;
-    font-size-adjust: none;
-    font-style: normal;
-    font-font-variant: normal;
-    font-weight: normal;
-    line-height: 140%;
-    color: #000000;
-}
-
-div.body-content {
-    padding-left: 25px;
-}
-
-td, table, tr {
-    font-family: verdana,arial,helvetica,sans-serif;
-    font-size: 10px;
-    font-size-adjust: none;
-    font-style: normal;
-    font-font-variant: normal;
-    font-weight: normal;
-    line-height: normal; 
-    color: #000000;
-}
-
-a:link, a:visited, a:active, a:hover {
-   color: #880055;
-   text-decoration: none;
-}
-
-a:active, a:hover {
-   text-decoration: underline;
-   color: #202020;
-}
-
-ul, ol {
-    margin-left: 15px;
-    margin-top: 5px;
-    margin-bottom: 5px;
-    padding: 0px;
-    font-size: 12px;
-}
-
-ul li {
-    list-style-image: url("../images/small-bullet-red.png");
-}
-ul li ul li{
-    list-style-image: url("../images/small-bullet-gray.png");
-}
-
-pre {
-    padding: 0px;
-    margin-top: 5px;
-    margin-left: 15px;
-    margin-bottom: 5px;
-    margin-right: 5px;
-    text-align: left;
-}
-
-hr {
-    color: #3c78b5;
-    height: 1;
-}
-
-input {
-    font-family: verdana, geneva, arial, sans-serif;
-    font-size: 11px;
-    color: #000000;
-}
-
-textarea {
-    font-family: verdana, geneva, arial, sans-serif;
-    font-size: 11px;
-    color: #333333;
-}
-
-h1, h2, h3, h4, h5, h6  {
-  font-family: Georgia,'Times New Roman',serif;
-  line-height: normal;
-  font-weight: bold;
-}
-
-h1 {
-  border-bottom: 1px solid #808080;
-  padding: 2px;
-  margin: 36px 0px 4px -25px;
-  font-size: 20px;
-}
-h1 a:link, h1 a:visited, h1 a:active {
-    text-decoration: none;
-}
-
-h1 a:hover {
-    border-bottom: 1px dotted #660033;
-}
-
-h2 {
-  border-bottom: 1px solid #a0a0a0;
-  padding: 2px;
-  margin: 27px 0px 4px -20px;
-  font-size: 18px;
-}
-
-h3 {
-  border-bottom: 1px solid #c0c0c0;
-  padding: 2px;
-  margin: 21px 0px 4px -15px;
-  font-size: 16px;
-}
-
-h4 {
-  border-bottom: 1px solid #c0c0c0;
-  padding: 2px;
-  margin: 18px 0px 4px -10px;
-  font-size: 15px;
-}
-
-h5 {
-  padding: 2px;
-  margin: 14px 0px 4px -5px;
-  font-size: 14px;
-}
-
-h6 {
-  padding: 2px;
-  margin: 14px 0px 4px -5px;
-  font-size: 13px;
-}
-
-blockquote {
-    padding-left: 10px;
-    padding-right: 10px;
-    margin-left: 5px;
-    margin-right: 0px;
-    border-left: 1px solid #3c78b5;
-}
-
-.tooltip {  position: relative;
-    text-decoration: none;
-}
-
-.tooltip span {
-    display: none;
-}
-
-.tooltip:hover span {
-    position: absolute;
-    top: 10px;
-    left: 25px;
-    display: block;
-    background: #ccc;
-    color: #880055;
-    border: 1px solid #880055;
-}
-
-div.message {
-    width: 1000px;
-    height: 750px;
-    overflow : scroll;
-}
\ No newline at end of file
diff --git a/trunk/assembly/src/sample-conf/activemq-command.xml b/trunk/assembly/src/sample-conf/activemq-command.xml
deleted file mode 100644
index 680689a..0000000
--- a/trunk/assembly/src/sample-conf/activemq-command.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Communicate with a broker using command agent over XMPP 
-    For more information, see:
-    
-    http://activemq.apache.org/command-agent.html and
-    http://activemq.apache.org/xmpp.html
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-command.xml to your command
-    
-    e.g. $ bin/activemq console xbean:conf/activemq-command.xml
- -->
- <beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-     <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- 
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="command-broker" dataDirectory="${activemq.base}/data">
-        <managementContext>
-            <managementContext createConnector="true"/>
-        </managementContext>
-    
-        <transportConnectors>
-            <!-- Create a XMPP transport for XMPP clients. -->
-            <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-    </broker>
-    
-    <!-- Create a command agent -->
-    <commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/>
-</beans>
\ No newline at end of file
diff --git a/trunk/assembly/src/sample-conf/activemq-demo.xml b/trunk/assembly/src/sample-conf/activemq-demo.xml
deleted file mode 100644
index b01c919..0000000
--- a/trunk/assembly/src/sample-conf/activemq-demo.xml
+++ /dev/null
@@ -1,289 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Demonstrates various ActiveMQ configuration options
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-demo.xml to your command
-    
-    e.g. $ bin/activemq console xbean:conf/activemq-demo.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-  http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-    <!-- 
-        Allows us to use system properties as variables in this configuration 
-        file. For more information, see the Javadoc:
-        
-        http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html    
-    -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:${activemq.base}/conf/credentials.properties</value>
-        </property>      
-    </bean>
-    
-    <!-- 
-        The <broker> element is used to configure the ActiveMQ broker. 
-        
-        Tips: 
-          - Change the brokerName attribute to something unique  
-    -->
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="amq-broker" useJmx="true" destroyApplicationContextOnStop="true">
-
-        <!-- 
-            Examples of destination-specific policies using destination 
-            names or wildcards. For more information, see: 
-            
-            http://activemq.apache.org/per-destination-policies.html
-            http://activemq.apache.org/destination-features.html
-            http://activemq.apache.org/slow-consumer-handling.html
-            http://activemq.apache.org/subscription-recovery-policy.html
-        -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <!-- 
-                        Limit ALL queues and topics to using 5mb of memory and turn on producer flow control
-                    -->
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="5mb"/>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="5mb">
-                        <dispatchPolicy>
-                            <!-- 
-                              Use total ordering, see:
-                             	http://activemq.apache.org/total-ordering.html
-                            -->
-                            <strictOrderDispatchPolicy/>
-                        </dispatchPolicy>
-                        <subscriptionRecoveryPolicy>
-                            <!-- 
-                                Upon subscription, receive the last image sent 
-                                on the destination. 
-                            -->
-                            <lastImageSubscriptionRecoveryPolicy/>
-                        </subscriptionRecoveryPolicy>
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- 
-            The managementContext is used to configure how ActiveMQ is exposed in 
-            JMX. By default, ActiveMQ uses the MBean server that is started by 
-            the JVM. For more information, see: 
-            
-            http://activemq.apache.org/jmx.html 
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!-- 
-            The network connectors are used to create a network of brokers. For 
-            more information, see: 
-            
-            http://activemq.apache.org/networks-of-brokers.html 
-        -->
-        <!-- networkConnectors-->
-            <!-- 
-                This connector automatically discovers the other brokers using
-                IP multicast. Such discovery is possible only because the 
-                openwire transport connector is advertised via the default IP
-                multicast group. For more information on multicast, see: 
-                
-                http://activemq.apache.org/multicast-transport-reference.html
-
-            <networkConnector name="default-nc" uri="multicast://default"/>
-            -->
-            
-            <!-- 
-                Example of a static configuration. For more information, see:
-                
-                http://activemq.apache.org/static-transport-reference.html
-            
-            <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-            -->
-        <!-- /networkConnectors-->
-
-        <!-- 
-            Configure message persistence for the broker. The default persistence
-            mechanism is the AMQ store (identified by the amqPersistenceAdapter). 
-            For more information, see: 
-            
-            http://activemq.apache.org/persistence.html 
-        -->
-        <persistenceAdapter>
-             <kahaDB directory="${activemq.base}/data/dynamic-broker1/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" />
-        </persistenceAdapter>
-
-        <!-- 
-            Configure the following if you wish to use journaled JDBC for message 
-            persistence. 
-        
-        <persistenceFactory>
-            <journalPersistenceAdapterFactory dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>
-        </persistenceFactory>
-        -->
-
-        <!-- 
-            Configure the following if you wish to use non-journaled JDBC for message 
-            persistence.
-        
-        <persistenceAdapter>
-            <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
-        </persistenceAdapter>
-        -->
-
-        <!-- 
-            The sslContext can be used to configure broker-specific SSL properties.
-            For more information, see: 
-            
-            http://activemq.apache.org/how-do-i-use-ssl.html 
-        -->
-        <sslContext>
-            <sslContext keyStore="file:${activemq.base}/conf/broker.ks" 
-              keyStorePassword="password" trustStore="file:${activemq.base}/conf/broker.ts" 
-              trustStorePassword="password"/>
-        </sslContext>
-        
-        
-        <!--  
-            The systemUsage controls the maximum amount of space the broker will 
-            use before slowing down producers. For more information, see: 
-            
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-        <systemUsage>
-          <systemUsage>
-            <memoryUsage>
-              <memoryUsage limit="20 mb" />
-            </memoryUsage>
-            <storeUsage>
-              <storeUsage limit="1 gb" />
-            </storeUsage>
-            <tempUsage>
-              <tempUsage limit="100 mb" />
-            </tempUsage>
-          </systemUsage>
-        </systemUsage>
-
-
-        <!-- 
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see: 
-            
-            http://activemq.apache.org/configuring-transports.html 
-        -->
-        <transportConnectors>
-            <!-- Create a TCP transport that is advertised on via an IP multicast 
-              group named default. -->
-            <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
-            <!-- Create a SSL transport. Make sure to configure the SSL options
-              via the system properties or the sslContext element. -->
-            <transportConnector name="ssl" uri="ssl://localhost:61617"/>
-            <!-- Create a STOMP transport for STOMP clients. -->
-            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
-            <!-- Create a XMPP transport for XMPP clients. -->
-            <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
-        </transportConnectors>
-
-    </broker>
-
-    <!--
-       Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
-       For more details see
-      
-       http://activemq.apache.org/enterprise-integration-patterns.html
-    -->
-    <import resource="camel.xml"/>
-
-
-    <!-- 
-        An embedded servlet engine for serving up the Admin console and other demos. 
-        For more information, see: 
-        
-          http://activemq.apache.org/web-console.html
-    -->
-    <import resource="jetty.xml"/>
-    
-    
-    <!-- 
-        Uncomment to create a command agent to respond to message based admin 
-        commands on the ActiveMQ.Agent topic. For more information, see: 
-        
-        http://activemq.apache.org/command-agent.html
-    
-    <commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/>
-    -->
-
-
-    <!-- 
-        This xbean configuration file supports all the standard Spring XML 
-        configuration options such as the following bean definitions. 
-    -->
-
-    <!-- Postgres DataSource Sample Setup -->
-    <!--
-    <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
-      <property name="serverName" value="localhost"/>
-      <property name="databaseName" value="activemq"/>
-      <property name="portNumber" value="0"/>
-      <property name="user" value="activemq"/>
-      <property name="password" value="activemq"/>
-      <property name="dataSourceName" value="postgres"/>
-      <property name="initialConnections" value="1"/>
-      <property name="maxConnections" value="10"/>
-    </bean>
-    -->
-
-    <!-- MySql DataSource Sample Setup -->
-    <!--
-    <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-      <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-      <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
-      <property name="username" value="activemq"/>
-      <property name="password" value="activemq"/>
-      <property name="maxActive" value="200"/>
-      <property name="poolPreparedStatements" value="true"/>
-    </bean>
-    -->
-
-    <!-- Oracle DataSource Sample Setup -->
-    <!--
-    <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-      <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
-      <property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB"/>
-      <property name="username" value="scott"/>
-      <property name="password" value="tiger"/>
-      <property name="maxActive" value="200"/>
-      <property name="poolPreparedStatements" value="true"/>
-    </bean>
-    -->
-
-    <!-- Embedded Derby DataSource Sample Setup -->
-    <!--
-    <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-      <property name="databaseName" value="derbydb"/>
-      <property name="createDatabase" value="create"/>
-    </bean>
-    -->
-
-</beans>
\ No newline at end of file
diff --git a/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml b/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml
deleted file mode 100644
index 7e7e7c4..0000000
--- a/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Create a dynamic network of brokers
-    For more information, see:
-    
-    http://activemq.apache.org/networks-of-brokers.html
-    
-    To run this example network of ActiveMQ brokers run
-    
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
-    
-    and
-    
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
-    
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker1" dataDirectory="${activemq.base}/data">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true"/>
-        </managementContext>
-
-        <!--
-            Configure network connector to use multicast protocol
-            For more information, see
-            
-            http://activemq.apache.org/multicast-transport-reference.html
-        -->
-	    <networkConnectors>
-	      <networkConnector uri="multicast://default"
-	        dynamicOnly="true" 
-	        networkTTL="3" 
-	        prefetchSize="1" 
-	        decreaseNetworkConsumerPriority="true" />
-	    </networkConnectors>
-	    
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.base}/data/dynamic-broker1/kahadb"/>
-        </persistenceAdapter>
-        
-        <!--  The maximum amount of space the broker will use before slowing down producers -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-	    <!-- 
-            The transport connectors ActiveMQ will listen to
-            Configure discovery URI to use multicast protocol
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default" />
-        </transportConnectors>
-        
-
-    </broker>
-
-</beans>
diff --git a/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml b/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml
deleted file mode 100644
index 9eced17..0000000
--- a/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Create a dynamic network of brokers
-    For more information, see:
-    
-    http://activemq.apache.org/networks-of-brokers.html
-    
-    To run this example network of ActiveMQ brokers run
-    
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
-    
-    and
-    
-    $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
-    
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker2" dataDirectory="${activemq.base}/data">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true" connectorPort="1100"/>
-        </managementContext>
-
-        <!--
-            Configure network connector to use multicast protocol
-            For more information, see
-            
-            http://activemq.apache.org/multicast-transport-reference.html
-        -->
-        <networkConnectors>
-          <networkConnector uri="multicast://default"
-            dynamicOnly="true" 
-            networkTTL="3" 
-            prefetchSize="1" 
-            decreaseNetworkConsumerPriority="true" />
-        </networkConnectors>
-        
-	
-	    <persistenceAdapter>
-	        <kahaDB directory="${activemq.base}/data/dynamic-broker2/kahadb" />
-	    </persistenceAdapter>
-	    
-	    <!--  The maximum amount of space the broker will use before slowing down producers -->
-	    <systemUsage>
-	        <systemUsage>
-	            <memoryUsage>
-	                <memoryUsage limit="20 mb"/>
-	            </memoryUsage>
-	            <storeUsage>
-	                <storeUsage limit="1 gb" name="foo"/>
-	            </storeUsage>
-	            <tempUsage>
-	                <tempUsage limit="100 mb"/>
-	            </tempUsage>
-	        </systemUsage>
-	    </systemUsage>
-
-        <!-- 
-            The transport connectors ActiveMQ will listen to
-            Configure discovery URI to use multicast protocol
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618" discoveryUri="multicast://default" />
-        </transportConnectors>
-
-    </broker>
-
-</beans>
diff --git a/trunk/assembly/src/sample-conf/activemq-jdbc.xml b/trunk/assembly/src/sample-conf/activemq-jdbc.xml
deleted file mode 100644
index 7d8a2d9..0000000
--- a/trunk/assembly/src/sample-conf/activemq-jdbc.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Use JDBC for message persistence
-    For more information, see:
-    
-    http://activemq.apache.org/persistence.html
-    
-    You need to add Derby database to your classpath in order to make this example work.
-    Download it from http://db.apache.org/derby/ and put it in the ${ACTIVEMQ_HOME}/lib/optional/ folder
-    Optionally you can configure any other RDBM as shown below
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-jdbc.xml to your command
-    
-    e.g. $ bin/activemq console xbean:conf/activemq-jdbc.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-  <!-- Allows us to use system properties as variables in this configuration file -->
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-      <property name="locations">
-          <value>file:${activemq.base}/conf/credentials.properties</value>
-      </property>
-  </bean>
-
-  <broker useJmx="false" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core">
-    <persistenceAdapter>
-       <jdbcPersistenceAdapter dataDirectory="${activemq.base}/data" dataSource="#derby-ds"/>
-    </persistenceAdapter>
-
-    <transportConnectors>
-       <transportConnector name="default" uri="tcp://0.0.0.0:61616"/>
-    </transportConnectors>
-  </broker>
- 
-  <!-- Embedded Derby DataSource Sample Setup -->
-  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-    <property name="databaseName" value="derbydb"/>
-    <property name="createDatabase" value="create"/>
-  </bean>
- 
-  <!-- Postgres DataSource Sample Setup -->
-  <!--
-  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
-    <property name="serverName" value="localhost"/>
-    <property name="databaseName" value="activemq"/>
-    <property name="portNumber" value="0"/>
-    <property name="user" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="dataSourceName" value="postgres"/>
-    <property name="initialConnections" value="1"/>
-    <property name="maxConnections" value="10"/>
-  </bean>
-  -->
-
-  <!-- MySql DataSource Sample Setup -->
-  <!--
-  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
-    <property name="username" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="maxActive" value="200"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-  -->
-
-  <!-- Oracle DataSource Sample Setup -->
-  <!--
-  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
-    <property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB"/>
-    <property name="username" value="scott"/>
-    <property name="password" value="tiger"/>
-    <property name="maxActive" value="200"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-  -->
-
-</beans>
\ No newline at end of file
diff --git a/trunk/assembly/src/sample-conf/activemq-scalability.xml b/trunk/assembly/src/sample-conf/activemq-scalability.xml
deleted file mode 100644
index 725ffb9..0000000
--- a/trunk/assembly/src/sample-conf/activemq-scalability.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Tune ActiveMQ broker so it can handle large number of queues (tens of thousands)
-    For more information, see:
-    http://activemq.apache.org/how-do-i-configure-10s-of-1000s-of-queues-in-a-single-broker-.html
-    
-    Be sure to make necessary changes in your startup script, to 
-    
-    1. Give broker enough memory 
-    2. Disable dedicated task runner
-    
-    e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-scalability.xml to your command
-    e.g. $ bin/activemq console xbean:conf/activemq-scalability.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" useJmx="false" advisorySupport="false">
-
-        <!-- 
-            Turn on optimizedDispatch
-            For more information, see:
-            http://activemq.apache.org/per-destination-policies.html 
-        -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" optimizedDispatch="true" />
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- 
-            Use KahaDB for persistence
-            For more information, see:
-            http://activemq.apache.org/kahadb.html
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.base}/data/kahadb" enableIndexWriteAsync="true"/>
-        </persistenceAdapter>
-
-        <!-- 
-            Use NIO transport 
-            For more information, see:
-            http://activemq.apache.org/configuring-transports.html#ConfiguringTransports-TheNIOTransport
-        -->
-        <transportConnectors>
-            <transportConnector name="nio" uri="nio://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-    
-</beans>
diff --git a/trunk/assembly/src/sample-conf/activemq-security.xml b/trunk/assembly/src/sample-conf/activemq-security.xml
deleted file mode 100644
index d273c04..0000000
--- a/trunk/assembly/src/sample-conf/activemq-security.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<!--  
-    Secure ActiveMQ broker
-    For more information, see:
-    
-    http://activemq.apache.org/security.html
-    
-    Before you can run this configuration, you need to set ACTIVEMQ_ENCRYPTION_PASSWORD environment variable, like
-    
-    $ export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq
-    
-    For more information see: http://activemq.apache.org/encrypted-passwords.html
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-security.xml to your command
-    
-    e.g. $ bin/activemq console xbean:conf/activemq-security.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <!-- Allows us to use encrypted system properties as variables in this configuration file -->
-  <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
-    <property name="algorithm" value="PBEWithMD5AndDES" />
-    <property name="passwordEnvName" value="ACTIVEMQ_ENCRYPTION_PASSWORD" />
-  </bean>
-                                                                     
-  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
-    <property name="config" ref="environmentVariablesConfiguration" />
-  </bean>  
-    
-  <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer"> 
-      <constructor-arg ref="configurationEncryptor" /> 
-      <property name="location" value="file:${activemq.base}/conf/credentials-enc.properties"/> 
-  </bean> 
-  
-  <!--     
-    Use this configuration if you don't want to set encryptor password using environment variable
-    Note however, that with this solution your passwords can be easily decrypted once the encrypter password is known
-    
-  <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
-     <property name="algorithm" value="PBEWithMD5AndDES"/>
-     <property name="password" value="activemq"/>
-  </bean> 
-  -->
-
-  <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" destroyApplicationContextOnStop="true">
-
-    <managementContext>
-        <managementContext createConnector="true">
-            <property xmlns="http://www.springframework.org/schema/beans" name="environment">
-                <map xmlns="http://www.springframework.org/schema/beans">
-                    <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.password.file"
-                           value="conf/jmx.password"/>
-                    <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.access.file"
-                           value="conf/jmx.access"/>
-                </map>
-            </property>
-        </managementContext>
-    </managementContext>
-
-    <plugins>
-        <!-- Configure authentication; Username, passwords and groups -->
-        <simpleAuthenticationPlugin>
-            <users>
-                <authenticationUser username="system" password="${activemq.password}"
-                    groups="users,admins"/>
-                <authenticationUser username="user" password="${guest.password}"
-                    groups="users"/>
-                <authenticationUser username="guest" password="${guest.password}" groups="guests"/>
-            </users>
-        </simpleAuthenticationPlugin>
-
-
-      <!--  Lets configure a destination based authorization mechanism -->
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries>
-              <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry queue="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry queue="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry queue="TEST.Q" read="guests" write="guests" />
-              
-              <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
-              <authorizationEntry topic="USERS.>" read="users" write="users" admin="users" />
-              <authorizationEntry topic="GUEST.>" read="guests" write="guests,users" admin="guests,users" />
-              
-              <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
-            </authorizationEntries>
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-    
-    <transportConnectors>
-       <transportConnector name="default" uri="tcp://0.0.0.0:61616"/>
-    </transportConnectors>
-    
-  </broker>
-
-  <!-- 
-      Configure command agent to be used in secured broker environment
-      Notice how we used ${activemq.username} and ${activemq.password} configured in credential.properties
-  -->
-  <commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost" username="${activemq.username}" password="${activemq.password}"/>
-
-  <!-- Use Web applications and Camel in secured broker environment -->
-  <import resource="jetty.xml"/>
-  <import resource="camel.xml"/>
-
-</beans>
diff --git a/trunk/assembly/src/sample-conf/activemq-specjms.xml b/trunk/assembly/src/sample-conf/activemq-specjms.xml
deleted file mode 100644
index 65cd993..0000000
--- a/trunk/assembly/src/sample-conf/activemq-specjms.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<!--
-    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.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
-
-    <!-- 
-        The <broker> element is used to configure the ActiveMQ broker. 
-        
-        advisories incurr a hit with every add connection|destination|producer|consumer
-          - client side:  providerUrl = tcp://localhost:61616?jms.watchTopicAdvisories=false
-        statistics have a small impact on concurrency so disable
-        schedualer has a small impact as it checks for the presence three properties on each message
-        jmx adds a bunch of wrapper classes
-
-        ACTIVEMQ_OPTS_MEMORY="-Xmx11g -Xms6g -Dorg.apache.activemq.UseDedicatedTaskRunner=false -Djava.util.logging.config.file=logging.properties -XX:+UseLargePages"
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" 
-        dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" deleteAllMessagesOnStartup="true"        
-        advisorySupport="false"
-        enableStatistics="false"
-        schedulerSupport="false"
-        useJmx="false">
- 
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <!-- 
-                    producerFlowControll thread unnecessary with no memory limits
-                    with no failover, no need to suppress duplicates so audit can be disabled  
-                    message expiry thread unnecessary as normal dispatch will handle expiry
-                -->
-                <policyEntry topic=">" producerFlowControl="false" enableAudit="false" expireMessagesPeriod="0">
-                  <pendingSubscriberPolicy>
-                    <!-- keep all references in memory -->
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="false" enableAudit="false" expireMessagesPeriod="0">
-                  <pendingQueuePolicy>
-                    <!-- keep all references in memory -->
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy> 
- 
-        
-        <!-- 
-            The managementContext is used to configure how ActiveMQ is exposed in 
-            JMX. By default, ActiveMQ uses the MBean server that is started by 
-            the JVM. For more information, see: 
-            
-            http://activemq.apache.org/jmx.html 
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <persistenceAdapter>
-            <!-- defer cleanup/checkpoint -->
-            <!-- write in max 62k chunks to max disk io bandwith -->
-            <!-- use small number of data files (seldom switch) -->
-            <!-- keep index off the disk (in cache) -->
-            
-            <kahaDB directory="${activemq.base}/data/kahadb" 
-                cleanupInterval="300000" checkpointInterval="50000"
-                journalMaxWriteBatchSize="62k"
-                journalMaxFileLength="1g"
-                indexCacheSize="100000" indexWriteBatchSize="100000"
-            /> 
-        </persistenceAdapter>
-        
-        <!-- ensure there is loads or memory for destinations -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="2 g"/>
-                </memoryUsage>
-            </systemUsage>
-        </systemUsage>
-		
-		  
-        <!-- 
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see: 
-            
-            http://activemq.apache.org/configuring-transports.html 
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-    
-</beans>
diff --git a/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml b/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml
deleted file mode 100644
index a1a5646..0000000
--- a/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Create a static network of brokers
-    For more information, see:
-    
-    http://activemq.apache.org/networks-of-brokers.html
-    
-    To run this example network of ActiveMQ brokers run
-    
-    $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
-    
-    and
-    
-    $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
-    
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.base}/data">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true"/>
-        </managementContext>
-
-        <!-- 
-            The store and forward broker networks ActiveMQ will listen to.
-            We'll leave it empty as duplex network will be configured by another broker
-            Take a look at activemq-static_network-broker2.xml for example
-        -->
-        <networkConnectors>
-        </networkConnectors>
-        
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.base}/data/static-broker1/kahadb" />
-        </persistenceAdapter>
-        
-        <!--  The maximum amount of space the broker will use before slowing down producers -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!-- The transport connectors ActiveMQ will listen to -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-        
-    </broker>
-
-</beans>
diff --git a/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml b/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml
deleted file mode 100644
index 9a6db84..0000000
--- a/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Create a static network of brokers
-    For more information, see:
-    
-    http://activemq.apache.org/networks-of-brokers.html
-    
-    To run this example network of ActiveMQ brokers run
-    
-    $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
-    
-    and
-    
-    $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
-    
-    in separate consoles
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
-  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.base}/data">
-
-        <!-- Destination specific policies using destination names or wildcards -->
-        <destinationPolicy>
-            <policyMap>
-                <policyEntries>
-                    <policyEntry queue=">" producerFlowControl="true" memoryLimit="20mb">
-                        <deadLetterStrategy>
-                          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" />
-                        </deadLetterStrategy>
-                    </policyEntry>
-                    <policyEntry topic=">" producerFlowControl="true" memoryLimit="20mb">
-                    </policyEntry>
-                </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-
-        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
-        <managementContext>
-            <managementContext createConnector="true" connectorPort="1100"/>
-        </managementContext>
-
-        <!-- 
-            The store and forward broker networks ActiveMQ will listen to
-            Create a duplex connector to the first broker 
-        -->
-        <networkConnectors>
-            <networkConnector uri="static:(tcp://localhost:61616)" duplex="true"/>
-        </networkConnectors>
-        
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.base}/data/static-broker2/kahadb" />
-        </persistenceAdapter>
-        
-        <!--  The maximum amount of space the broker will use before slowing down producers -->
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb" name="foo"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-
-        <!-- The transport connectors ActiveMQ will listen to -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61618"/>
-        </transportConnectors>
-        
-    </broker>
-
-</beans>
diff --git a/trunk/assembly/src/sample-conf/activemq-stomp.xml b/trunk/assembly/src/sample-conf/activemq-stomp.xml
deleted file mode 100644
index 9de4229..0000000
--- a/trunk/assembly/src/sample-conf/activemq-stomp.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Use Stomp protocol
-    
-    For better behavior under heavy usage, be sure to:
-    
-    1. Give broker enough memory 
-    2. Disable dedicated task runner
-    
-    e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-stomp.xml to your command
-    e.g. $ bin/activemq console xbean:conf/activemq-stomp.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <value>file:${activemq.base}/conf/credentials.properties</value>
-        </property>      
-    </bean>
-
-    <!-- 
-        The <broker> element is used to configure the ActiveMQ broker. 
-    -->
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data">
-             
-        <!--
-            For better performances use VM cursor and small memory limit.
-            For more information, see:
-            
-            http://activemq.apache.org/message-cursors.html
-            
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-              
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="false">
-                  <pendingSubscriberPolicy>
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="false">
-                  <!-- Use VM cursor for better latency
-                       For more information, see:
-                       
-                       http://activemq.apache.org/message-cursors.html
-                       
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  -->
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy>
-        
-           
-        <!-- 
-            The managementContext is used to configure how ActiveMQ is exposed in 
-            JMX. By default, ActiveMQ uses the MBean server that is started by 
-            the JVM. For more information, see: 
-            
-            http://activemq.apache.org/jmx.html 
-        -->
-        <managementContext>
-            <managementContext createConnector="false"/>
-        </managementContext>
-
-        <!-- 
-            Configure message persistence for the broker. The default persistence
-            mechanism is the KahaDB store (identified by the kahaDB tag). 
-            For more information, see: 
-            
-            http://activemq.apache.org/persistence.html 
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.base}/data/kahadb"/>
-        </persistenceAdapter>
-         
-          
-        <!-- 
-            The transport connectors expose ActiveMQ over a given protocol to
-            clients and other brokers. For more information, see: 
-            
-            http://activemq.apache.org/configuring-transports.html 
-        -->
-        <transportConnectors>
-            <transportConnector name="stomp" uri="stomp://0.0.0.0:61612?transport.closeAsync=false"/> 
-            <transportConnector name="stomp+nio" uri="stomp+nio://0.0.0.0:61613?transport.closeAsync=false"/> 
-        </transportConnectors>
-
-    </broker>
-
-    <!-- 
-        Uncomment to enable Camel
-        Take a look at activemq-camel.xml for more details
-         
-    <import resource="camel.xml"/>
-    -->
-
-    <!-- 
-        Enable web consoles, REST and Ajax APIs and demos
-        Take a look at activemq-jetty.xml for more details 
-    -->
-    <import resource="jetty.xml"/>
-    
-</beans>
\ No newline at end of file
diff --git a/trunk/assembly/src/sample-conf/activemq-throughput.xml b/trunk/assembly/src/sample-conf/activemq-throughput.xml
deleted file mode 100644
index 0182488..0000000
--- a/trunk/assembly/src/sample-conf/activemq-throughput.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-    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.
--->
-<!--  
-    Tune ActiveMQ broker for high throughput of messages
-    Be sure to make necessary changes in your producer and consumer, since there you can make the most notable difference
-    
-    For more information, see:
-    http://activemq.apache.org/performance-tuning.html
-    
-    To run ActiveMQ with this configuration add xbean:conf/activemq-throughput.xml to your command
-    e.g. $ bin/activemq console xbean:conf/activemq-throughput.xml
- -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <!-- Allows us to use system properties as variables in this configuration file -->
-    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" useJmx="false" advisorySupport="false">
-
-        <!-- 
-            Use VM cursor
-            For more information, see:           
-            http://activemq.apache.org/message-cursors.html
-        -->
-        <destinationPolicy>
-            <policyMap>
-              <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
-                  <pendingSubscriberPolicy>
-                    <vmCursor />
-                  </pendingSubscriberPolicy>
-                </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                </policyEntry>
-              </policyEntries>
-            </policyMap>
-        </destinationPolicy> 
-
-        <!-- 
-            Use KahaDB for persistence
-            Tune it a bit so we minimize IO operations
-            For more information, see:            
-            http://activemq.apache.org/kahadb.html
-        -->
-        <persistenceAdapter>
-            <kahaDB directory="${activemq.base}/data/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
-        </persistenceAdapter>
-
-        <!-- 
-            Use TCP transport 
-            For more information, see:            
-            http://activemq.apache.org/configuring-transports.html
-        -->
-        <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
-        </transportConnectors>
-
-    </broker>
-    
-</beans>
diff --git a/trunk/assembly/src/sample-conf/journaledMem-example.xml b/trunk/assembly/src/sample-conf/journaledMem-example.xml
deleted file mode 100644
index 21e7f55..0000000
--- a/trunk/assembly/src/sample-conf/journaledMem-example.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
-    <amq:broker brokerName="journaledMemBroker" start="false" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
-
-        <amq:persistenceAdapter>
-            <amq:journalPersistenceAdapter>
-                <amq:journal>
-                    <ref bean="myJournalImpl"/>
-                </amq:journal>
-
-                <amq:persistenceAdapter>
-                    <amq:memoryPersistenceAdapter createTransactionStore="true"/>
-                </amq:persistenceAdapter>
-
-                <amq:taskRunnerFactory>
-                    <bean id="myTaskRunnerFactory" class="org.apache.activemq.thread.TaskRunnerFactory"/>
-                </amq:taskRunnerFactory>
-            </amq:journalPersistenceAdapter>
-        </amq:persistenceAdapter>
-
-        <amq:transportConnectors>
-            <amq:transportConnector uri="tcp://localhost:61616"/>
-        </amq:transportConnectors>
-
-    </amq:broker>
-
-    <!-- The journal implementation that will be used -->
-    <bean id="myJournalImpl" class="org.apache.activeio.journal.active.JournalImpl">
-        <constructor-arg index="0">
-            <bean id="myFile" class="java.io.File">
-                <constructor-arg index="0">
-                    <value>target/journaledMem-data</value>
-                </constructor-arg>
-            </bean>
-        </constructor-arg>
-    </bean>
-
-</beans>
diff --git a/trunk/assembly/src/sample-conf/kaha-example.xml b/trunk/assembly/src/sample-conf/kaha-example.xml
deleted file mode 100644
index 2006c7f..0000000
--- a/trunk/assembly/src/sample-conf/kaha-example.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-  
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <broker brokerName="broker" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
-
-    <persistenceAdapter>
-      <kahaPersistenceAdapter directory = "${activemq.home}/activemq-data"/>
-    </persistenceAdapter>
-
-     <transportConnectors>
-      <transportConnector uri="tcp://localhost:61616"/>
-    </transportConnectors>
-
-  </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/assembly/src/sample-conf/memory-example.xml b/trunk/assembly/src/sample-conf/memory-example.xml
deleted file mode 100644
index 5100b11..0000000
--- a/trunk/assembly/src/sample-conf/memory-example.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-    
-  <broker useJmx="false" brokerName="memoryBroker" xmlns="http://activemq.apache.org/schema/core">
-    <persistenceAdapter>
-       <memoryPersistenceAdapter/>
-    </persistenceAdapter>
-    
-    <transportConnectors>
-       <transportConnector name="default" uri="vm://localhost"/>
-    </transportConnectors>
-  </broker>
-</beans>
-
diff --git a/trunk/assembly/src/sample-conf/quickJdbc-example.xml b/trunk/assembly/src/sample-conf/quickJdbc-example.xml
deleted file mode 100644
index bdd4059..0000000
--- a/trunk/assembly/src/sample-conf/quickJdbc-example.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<!--
-    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.
--->
-<!-- START SNIPPET: xbean -->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-    
-  <broker useJmx="false" brokerName="quickJdbcBroker" xmlns="http://activemq.apache.org/schema/core">
-    <persistenceFactory>
-       <journalPersistenceAdapterFactory journalLogFiles="4" 
-                      journalLogFileSize="32768" 
-		      useJournal="true" 
-		      useQuickJournal="true" 
-		      dataSource="#derby-ds" 
-		      dataDirectory="target/quickJdbc-data"/>
-		      
-    </persistenceFactory>
-  
-    <transportConnectors>
-       <transportConnector name="default" uri="tcp://localhost:61616"/>
-    </transportConnectors>
-  </broker>
-  
-  <!--  This xbean configuration file supports all the standard spring xml configuration options -->
-  
-  <!-- Postgres DataSource Sample Setup -->
-  <!-- 
-  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
-    <property name="serverName" value="localhost"/>
-    <property name="databaseName" value="activemq"/>
-    <property name="portNumber" value="0"/>
-    <property name="user" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="dataSourceName" value="postgres"/>
-    <property name="initialConnections" value="1"/>
-    <property name="maxConnections" value="10"/>
-  </bean>
-  -->
-  
-  <!-- MySql DataSource Sample Setup -->
-  <!-- 
-  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
-    <property name="username" value="activemq"/>
-    <property name="password" value="activemq"/>
-    <property name="poolPreparedStatements" value="true"/>
-  </bean>
-  -->  
-   
-  <!-- Embedded Derby DataSource Sample Setup -->
-  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
-    <property name="databaseName" value="derbydb"/>
-    <property name="createDatabase" value="create"/>
-  </bean>
-
-</beans>
-<!-- END SNIPPET: xbean -->
diff --git a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java b/trunk/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java
deleted file mode 100755
index 29c1c86..0000000
--- a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- * 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.benchmark;
-
-import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.util.IdGenerator;
-
-/**
- * Abstract base class for some simple benchmark tools
- * 
- * @author James Strachan
- * 
- */
-public class BenchmarkSupport {
-
-    protected int connectionCount = 1;
-    protected int batch = 1000;
-    protected Destination destination;
-    protected String[] subjects;
-
-    private boolean topic = true;
-    private boolean durable;
-    private ActiveMQConnectionFactory factory;
-    private String url;
-    private int counter;
-    private List<Object> resources = new ArrayList<Object>();
-    private NumberFormat formatter = NumberFormat.getInstance();
-    private AtomicInteger connectionCounter = new AtomicInteger(0);
-    private IdGenerator idGenerator = new IdGenerator();
-
-    public BenchmarkSupport() {
-    }
-
-    public void start() {
-        System.out.println("Using: " + connectionCount + " connection(s)");
-        subjects = new String[connectionCount];
-        for (int i = 0; i < connectionCount; i++) {
-            subjects[i] = "BENCHMARK.FEED" + i;
-        }
-        if (useTimerLoop()) {
-            Thread timer = new Thread() {
-                public void run() {
-                    timerLoop();
-                }
-            };
-            timer.start();
-        }
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public boolean isTopic() {
-        return topic;
-    }
-
-    public void setTopic(boolean topic) {
-        this.topic = topic;
-    }
-
-    public ActiveMQConnectionFactory getFactory() {
-        return factory;
-    }
-
-    public void setFactory(ActiveMQConnectionFactory factory) {
-        this.factory = factory;
-    }
-
-    public void setSubject(String subject) {
-        connectionCount = 1;
-        subjects = new String[] {
-            subject
-        };
-    }
-
-    public boolean isDurable() {
-        return durable;
-    }
-
-    public void setDurable(boolean durable) {
-        this.durable = durable;
-    }
-
-    public int getConnectionCount() {
-        return connectionCount;
-    }
-
-    public void setConnectionCount(int connectionCount) {
-        this.connectionCount = connectionCount;
-    }
-
-    protected Session createSession() throws JMSException {
-        if (factory == null) {
-            factory = createFactory();
-        }
-        Connection connection = factory.createConnection();
-        int value = connectionCounter.incrementAndGet();
-        System.out.println("Created connection: " + value + " = " + connection);
-        if (durable) {
-            connection.setClientID(idGenerator.generateId());
-        }
-        addResource(connection);
-        connection.start();
-
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        addResource(session);
-        return session;
-    }
-
-    protected ActiveMQConnectionFactory createFactory() {
-        ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(getUrl());
-        return answer;
-    }
-
-    protected synchronized void count(int count) {
-        counter += count;
-        /*
-         * if (counter > batch) { counter = 0; long current =
-         * System.currentTimeMillis(); double end = current - time; end /= 1000;
-         * time = current; System.out.println("Processed " + batch + " messages
-         * in " + end + " (secs)"); }
-         */
-    }
-
-    protected synchronized int resetCount() {
-        int answer = counter;
-        counter = 0;
-        return answer;
-    }
-
-    protected void timerLoop() {
-        int times = 0;
-        int total = 0;
-        int dumpVmStatsFrequency = 10;
-        Runtime runtime = Runtime.getRuntime();
-
-        while (true) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            int processed = resetCount();
-            double average = 0;
-            if (processed > 0) {
-                total += processed;
-                times++;
-            }
-            if (times > 0) {
-                average = total / (double)times;
-            }
-
-            System.out.println(getClass().getName() + " Processed: " + processed + " messages this second. Average: " + average);
-
-            if ((times % dumpVmStatsFrequency) == 0 && times != 0) {
-                System.out.println("Used memory: " + asMemoryString(runtime.totalMemory() - runtime.freeMemory()) + " Free memory: " + asMemoryString(runtime.freeMemory()) + " Total memory: "
-                                   + asMemoryString(runtime.totalMemory()) + " Max memory: " + asMemoryString(runtime.maxMemory()));
-            }
-
-        }
-    }
-
-    protected String asMemoryString(long value) {
-        return formatter.format(value / 1024) + " K";
-    }
-
-    protected boolean useTimerLoop() {
-        return true;
-    }
-
-    protected Destination createDestination(Session session, String subject) throws JMSException {
-        if (topic) {
-            return session.createTopic(subject);
-        } else {
-            return session.createQueue(subject);
-        }
-    }
-
-    protected void addResource(Object resource) {
-        resources.add(resource);
-    }
-
-    protected static boolean parseBoolean(String text) {
-        return text.equalsIgnoreCase("true");
-    }
-}
diff --git a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java b/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java
deleted file mode 100755
index c213b71..0000000
--- a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.benchmark;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-/**
- * @author James Strachan
- * 
- */
-public class Consumer extends BenchmarkSupport implements MessageListener {
-
-    public Consumer() {
-    }
-
-    public static void main(String[] args) {
-        Consumer tool = new Consumer();
-        if (args.length > 0) {
-            tool.setUrl(args[0]);
-        }
-        if (args.length > 1) {
-            tool.setTopic(parseBoolean(args[1]));
-        }
-        if (args.length > 2) {
-            tool.setSubject(args[2]);
-        }
-        if (args.length > 3) {
-            tool.setDurable(parseBoolean(args[3]));
-        }
-        if (args.length > 4) {
-            tool.setConnectionCount(Integer.parseInt(args[4]));
-        }
-
-        try {
-            tool.run();
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void run() throws JMSException {
-        start();
-        subscribe();
-    }
-
-    protected void subscribe() throws JMSException {
-        for (int i = 0; i < subjects.length; i++) {
-            subscribe(subjects[i]);
-        }
-    }
-
-    protected void subscribe(String subject) throws JMSException {
-        Session session = createSession();
-
-        Destination destination = createDestination(session, subject);
-
-        System.out.println("Consuming on : " + destination + " of type: " + destination.getClass().getName());
-
-        MessageConsumer consumer = null;
-        if (isDurable() && isTopic()) {
-            consumer = session.createDurableSubscriber((Topic)destination, getClass().getName());
-        } else {
-            consumer = session.createConsumer(destination);
-        }
-        consumer.setMessageListener(this);
-        addResource(consumer);
-    }
-
-    public void onMessage(Message message) {
-        try {
-            TextMessage textMessage = (TextMessage)message;
-
-            // lets force the content to be deserialized
-            textMessage.getText();
-            count(1);
-
-            // lets count the messages
-
-            // message.acknowledge();
-        } catch (JMSException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-    }
-
-}
diff --git a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java b/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java
deleted file mode 100755
index ea16806..0000000
--- a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.benchmark;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-/**
- * @author James Strachan
- * 
- */
-public class Producer extends BenchmarkSupport {
-
-    int loops = -1;
-    int loopSize = 1000;
-    private int messageSize = 1000;
-
-    public Producer() {
-    }
-
-    public static void main(String[] args) {
-        Producer tool = new Producer();
-        if (args.length > 0) {
-            tool.setUrl(args[0]);
-        }
-        if (args.length > 1) {
-            tool.setTopic(parseBoolean(args[1]));
-        }
-        if (args.length > 2) {
-            tool.setSubject(args[2]);
-        }
-        if (args.length > 3) {
-            tool.setDurable(parseBoolean(args[3]));
-        }
-        if (args.length > 4) {
-            tool.setMessageSize(Integer.parseInt(args[4]));
-        }
-        if (args.length > 5) {
-            tool.setConnectionCount(Integer.parseInt(args[5]));
-        }
-        try {
-            tool.run();
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void run() throws Exception {
-        start();
-        publish();
-    }
-
-    // Properties
-    // -------------------------------------------------------------------------
-    public int getMessageSize() {
-        return messageSize;
-    }
-
-    public void setMessageSize(int messageSize) {
-        this.messageSize = messageSize;
-    }
-
-    public int getLoopSize() {
-        return loopSize;
-    }
-
-    public void setLoopSize(int loopSize) {
-        this.loopSize = loopSize;
-    }
-
-    // Implementation methods
-    // -------------------------------------------------------------------------
-
-    protected void publish() throws Exception {
-        final String text = getMessage();
-
-        System.out.println("Publishing to: " + subjects.length + " subject(s)");
-
-        for (int i = 0; i < subjects.length; i++) {
-            final String subject = subjects[i];
-            Thread thread = new Thread() {
-                public void run() {
-                    try {
-                        publish(text, subject);
-                    } catch (JMSException e) {
-                        System.out.println("Caught: " + e);
-                        e.printStackTrace();
-                    }
-                }
-            };
-            thread.start();
-        }
-
-    }
-
-    protected String getMessage() {
-        StringBuffer buffer = new StringBuffer();
-        for (int i = 0; i < messageSize; i++) {
-            char ch = 'X';
-            buffer.append(ch);
-        }
-        return buffer.toString();
-    }
-
-    protected void publish(String text, String subject) throws JMSException {
-        Session session = createSession();
-
-        Destination destination = createDestination(session, subject);
-
-        MessageProducer publisher = session.createProducer(destination);
-        if (isDurable()) {
-            publisher.setDeliveryMode(DeliveryMode.PERSISTENT);
-        } else {
-            publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-        }
-
-        System.out.println("Starting publisher on : " + destination + " of type: " + destination.getClass().getName());
-        System.out.println("Message length: " + text.length());
-
-        if (loops <= 0) {
-            while (true) {
-                publishLoop(session, publisher, text);
-            }
-        } else {
-            for (int i = 0; i < loops; i++) {
-                publishLoop(session, publisher, text);
-            }
-        }
-    }
-
-    protected void publishLoop(Session session, MessageProducer publisher, String text) throws JMSException {
-        for (int i = 0; i < loopSize; i++) {
-            Message message = session.createTextMessage(text);
-
-            publisher.send(message);
-            count(1);
-        }
-    }
-
-    protected String loadFile(String file) throws IOException {
-        System.out.println("Loading file: " + file);
-
-        StringBuffer buffer = new StringBuffer();
-        BufferedReader in = new BufferedReader(new FileReader(file));
-        while (true) {
-            String line = in.readLine();
-            if (line == null) {
-                break;
-            }
-            buffer.append(line);
-            buffer.append(File.separator);
-        }
-        in.close();
-        return buffer.toString();
-    }
-}
diff --git a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/ProducerConsumer.java b/trunk/assembly/src/test/java/org/apache/activemq/benchmark/ProducerConsumer.java
deleted file mode 100755
index 967edb2..0000000
--- a/trunk/assembly/src/test/java/org/apache/activemq/benchmark/ProducerConsumer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * 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.benchmark;
-
-/**
- * @author James Strachan
- * 
- */
-public class ProducerConsumer extends Producer {
-
-    private Consumer consumer = new Consumer();
-
-    public ProducerConsumer() {
-    }
-
-    public static void main(String[] args) {
-        ProducerConsumer tool = new ProducerConsumer();
-        if (args.length > 0) {
-            tool.setUrl(args[0]);
-        }
-        if (args.length > 1) {
-            tool.setTopic(parseBoolean(args[1]));
-        }
-        if (args.length > 2) {
-            tool.setSubject(args[2]);
-        }
-        if (args.length > 3) {
-            tool.setDurable(Boolean.getBoolean(args[3]));
-        }
-        if (args.length > 4) {
-            tool.setConnectionCount(Integer.parseInt(args[4]));
-        }
-        try {
-            tool.run();
-        } catch (Exception e) {
-            System.out.println("Caught: " + e);
-            e.printStackTrace();
-        }
-    }
-
-    public void run() throws Exception {
-        consumer.start();
-        consumer.subscribe();
-        start();
-        publish();
-    }
-
-    public void setTopic(boolean topic) {
-        super.setTopic(topic);
-        consumer.setTopic(topic);
-    }
-
-    public void setSubject(String subject) {
-        super.setSubject(subject);
-        consumer.setSubject(subject);
-    }
-
-    public void setUrl(String url) {
-        super.setUrl(url);
-        consumer.setUrl(url);
-    }
-
-    protected boolean useTimerLoop() {
-        return false;
-    }
-}
diff --git a/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java b/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
deleted file mode 100755
index 7300e06..0000000
--- a/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * 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.config;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.net.URI;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.transport.stomp.StompConnection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BrokerXmlConfigStartTest extends TestCase {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BrokerXmlConfigStartTest.class);
-    Properties secProps;
-    public void testStartBrokerUsingXmlConfig() throws Exception {
-        doTestStartBrokerUsingXmlConfig("xbean:src/release/conf/activemq.xml");
-    }
-
-    public void testStartBrokerUsingSampleConfig() throws Exception {
-        // resource:copy-resource brings all config files into target/conf
-        File sampleConfDir = new File("target/conf");
-        
-        for (File xmlFile : sampleConfDir.listFiles(new FileFilter() {
-            public boolean accept(File pathname) {
-                return pathname.isFile() &&
-                pathname.getName().startsWith("activemq-") &&
-                pathname.getName().endsWith("xml");
-            }})) {
-            
-            doTestStartBrokerUsingXmlConfig("xbean:" + sampleConfDir.getAbsolutePath() + "/" + xmlFile.getName());
-        }
-    }
-
-    public void doTestStartBrokerUsingXmlConfig(String configUrl) throws Exception {
-
-        BrokerService broker = null;
-        LOG.info("Broker config: " + configUrl);
-        System.err.println("Broker config: " + configUrl);
-        broker = BrokerFactory.createBroker(configUrl);
-        // alive, now try connect to connect
-        try {
-            for (TransportConnector transport : broker.getTransportConnectors()) {
-                final URI UriToConnectTo = transport.getConnectUri();
-                 
-                if (UriToConnectTo.getScheme().startsWith("stomp")) {
-                    LOG.info("validating alive with connection to: " + UriToConnectTo);
-                    StompConnection connection = new StompConnection();
-                    connection.open(UriToConnectTo.getHost(), UriToConnectTo.getPort());
-                    connection.close();
-                    break;
-                } else if (UriToConnectTo.getScheme().startsWith("tcp")) {
-                    LOG.info("validating alive with connection to: " + UriToConnectTo);
-                    ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(UriToConnectTo);
-                    Connection connection = connectionFactory.createConnection(secProps.getProperty("activemq.username"),
-                            secProps.getProperty("activemq.password"));
-                    connection.start();
-                    connection.close();
-                    break;
-                } else {
-                    LOG.info("not validating connection to: " + UriToConnectTo);
-                }
-            }
-        } finally {
-            if (broker != null) {
-                broker.stop();
-                broker = null;
-            }
-        }
-    }
-
-    public void setUp() throws Exception {
-        System.setProperty("activemq.base", "target");
-        secProps = new Properties();
-        secProps.load(new FileInputStream(new File("target/conf/credentials.properties")));
-    }
-    
-    public void tearDown() throws Exception {
-        TimeUnit.SECONDS.sleep(1);
-    }
-}
diff --git a/trunk/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java b/trunk/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java
deleted file mode 100755
index 92f5a17..0000000
--- a/trunk/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.config;
-
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.junit.Test;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-public class ValidateXMLConfigTest {
-    private static final String SCHEMA_LANGUAGE_ATTRIBUTE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
-    private static final String XSD_SCHEMA_LANGUAGE = "http://www.w3.org/2001/XMLSchema";
-
-    
-    @Test
-    public void validateDefaultConfig() throws Exception {
-        validateXML("src/release/conf/activemq.xml");
-    }
-    
-    @Test
-    public void validateExampleConfig() throws Exception {
-        // resource:copy-resource brings all config files into target/conf
-        File sampleConfDir = new File("target/conf");
-        
-        for (File xmlFile : sampleConfDir.listFiles(new FileFilter() {
-            public boolean accept(File pathname) {
-                return pathname.isFile() && pathname.getName().endsWith("xml");
-            }})) {
-            
-            validateXML(xmlFile);
-        }
-    }
-    
-    private void validateXML(String fileName) throws Exception {
-        File xmlFile = new File(fileName);
-        validateXML(xmlFile);
-    }
-        
-    private void validateXML(File file) throws Exception {
-        getDocumentBuilder(file.getAbsolutePath()).parse(file);
-    }
-    
-    private DocumentBuilder getDocumentBuilder(final String fileName) throws Exception {
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setValidating(true);
-        factory.setNamespaceAware(true);       
-        factory.setAttribute(SCHEMA_LANGUAGE_ATTRIBUTE, XSD_SCHEMA_LANGUAGE);
-        
-        DocumentBuilder builder = factory.newDocumentBuilder();
-       
-        builder.setEntityResolver(new EntityResolver() {
-
-            public InputSource resolveEntity(String publicId, String systemId)
-                    throws SAXException, IOException {
-                System.err.println("resolve: " + publicId + ", sys: " +  systemId);
-                InputSource source = null;
-                if (systemId.endsWith("activemq-core.xsd")) {
-                   InputStream stream = this.getClass().getClassLoader().getResourceAsStream("activemq.xsd");
-                   source = new InputSource(stream);
-                   source.setPublicId(publicId);
-                   source.setSystemId(systemId);
-                }
-                return source;       
-            }
-        });
-        
-        builder.setErrorHandler(new ErrorHandler() {
-            public void error(SAXParseException exception) throws SAXException {
-                fail(fileName + ", " + exception.toString());
-            }
-            public void fatalError(SAXParseException exception)
-                    throws SAXException {
-                fail(fileName + ", " + exception.toString());
-            }
-            public void warning(SAXParseException exception)
-                    throws SAXException {
-                fail(fileName + ", " + exception.toString());
-            }
-        });
-        
-        return builder;
-    }
-    
-    
-}
diff --git a/trunk/assembly/src/test/resources/log4j.properties b/trunk/assembly/src/test/resources/log4j.properties
deleted file mode 100755
index 1ab5a2b..0000000
--- a/trunk/assembly/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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, stdout
-
-# 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/test-reports/activemq-test.log
-log4j.appender.out.append=true
diff --git a/trunk/doap.rdf b/trunk/doap.rdf
deleted file mode 100644
index 19b1fc2..0000000
--- a/trunk/doap.rdf
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  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.
--->
-
-<?xml-stylesheet type="text/xsl"?>
-<rdf:RDF xml:lang="en"
-         xmlns="http://usefulinc.com/ns/doap#" 
-         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
-         xmlns:asfext="http://projects.apache.org/ns/asfext#"
-         xmlns:foaf="http://xmlns.com/foaf/0.1/">
-<!--
-  =======================================================================
-
-   Copyright (c) 2006 The Apache Software Foundation.  
-   All rights reserved.
-
-  =======================================================================
--->
-  <Project rdf:about="http://ActiveMQ.rdf.apache.org/">
-    <created>2006-03-27</created>
-    <license rdf:resource="http://usefulinc.com/doap/licenses/asl20" />
-    <name>Apache ActiveMQ</name>
-    <homepage rdf:resource="http://activemq.apache.org/" />
-    <asfext:pmc rdf:resource="http://activemq.apache.org/" />
-    <shortdesc>ActiveMQ is the most popular and powerful open source Message Broker.</shortdesc>
-    <description>ActiveMQ is a fast and powerful Message Broker which supports many Cross Language Clients and Protocols and many advanced features while fully supporting JMS 1.1 and J2EE 1.4.</description>
-    <bug-database rdf:resource="http://issues.apache.org/activemq/browse/AMQ" />
-    <mailing-list rdf:resource="http://activemq.apache.org/mailing-lists.html" />
-    <download-page rdf:resource="http://activemq.apache.org/download.html" />
-
-    <programming-language>Java</programming-language>
-    <programming-language>C</programming-language>
-    <programming-language>C++</programming-language>
-    <programming-language>Ruby</programming-language>
-    <programming-language>Perl</programming-language>
-    <programming-language>Python</programming-language>
-    <programming-language>PHP</programming-language>
-    <programming-language>C#</programming-language>
-
-    <category rdf:resource="http://projects.apache.org/category/network-server" />
-    <category rdf:resource="http://projects.apache.org/category/network-client" />
-    <maintainer>
-      <foaf:Person>
-        <foaf:name>Hiram Chirino</foaf:name>
-          <foaf:mbox rdf:resource="mailto:chirino@apache.org"/>
-      </foaf:Person>
-    </maintainer>
-  </Project>
-</rdf:RDF>
diff --git a/trunk/etc/css/stylesheet.css b/trunk/etc/css/stylesheet.css
deleted file mode 100644
index 6fb7a9d..0000000
--- a/trunk/etc/css/stylesheet.css
+++ /dev/null
@@ -1,184 +0,0 @@
-vadoc style sheet */
-/**
- * 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.
- */
-
-/* Define colors, fonts and other style attributes here to override the defaults  */
-
-/* Page background color */
-body { 	font-family: Arial;
-	background-color: white;
-	font-size: 8px;
- }
-
-td { 	
-	font-family: Arial;
-	font-size: 10pt;
- }
-/* Table colors */
-.TableHeadingColor     { background: #F4F4F4 }
-.TableSubHeadingColor  { background: #F4F4F4 }
-.TableRowColor         { background: #FFFFFF }
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont   { font-size: normal; font-family: Arial,Helvetica,sans-serif; font-size:12pt; line-height: normal; }
-.FrameHeadingFont { font-size: normal; font-family: Arial,Helvetica,sans-serif; font-size:10pt; line-height: normal;}
-.FrameItemFont    { font-size: normal; font-family: Arial,Helvetica,sans-serif; font-size:8pt; line-height: normal;}
-
-/* Example of smaller, sans-serif font in frames */
-/* .FrameItemFont  { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
-
-/* Navigation bar fonts and colors */
-
-/* .NavBarCell1    { background-color:#F4F4F4;} */
-.NavBarCell1    { background:transparent url("http://activemq.apache.org/images/top-red-bar.png") repeat; 
-font-family: Verdana, arial, sans-serif;
-font-size: 11px;
-font-weight: bold;	
-line-height: 16px;
-color: #777;
-}
-
-.NavBarCell1 a:link, .NavBarCell1 a:visited {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 16px;
-  color: #ffffff;
-  text-decoration: none;
-}
-.NavBarCell1 a:active, .NavBarCell1 a:hover {
-  font-family: Verdana, arial, sans-serif;
-  font-size: 11px;
-  font-weight: bold;	
-  line-height: 13px;
-  color: #c0c0c0;
-  text-decoration: underline;
-}
-
-.NavBarCell1Rev { background-color:silver;}
-
-.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-
-A:link, A:visited, A:active, A:hover {
-   color: #880055;
-   text-decoration: none;
-}
-
-A:active, A:hover {
-   text-decoration: underline;
-   color: #202020;
-}
-
-P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
-    color: #000000;
-}
-
-TD, TH, SPAN {
-    color: #000000;
-}
-
-BLOCKQUOTE {
-    margin-right: 0px;
-}
-
-/*H1, H2, H3, H4, H5, H6    {
-    color: #000000;
-    font-weight:500;
-    margin-top:10px;
-    padding-top:15px;
-}
-
-H1 { font-size: 150%; }
-H2 { font-size: 140%; }
-H3 { font-size: 110%; font-weight: bold; }
-H4 { font-size: 110%; font-weight: bold;}
-H5 { font-size: 100%; font-style: italic; }
-H6 { font-size: 100%; font-style: italic; }*/
-
-TT {
-font-size: 90%;
-    font-family: "Courier New", Courier, monospace;
-    color: #000000;
-}
-
-PRE {
-font-size: 90%;
-    padding: 5px;
-    border-style: solid;
-    border-width: 1px;
-    border-color: #CCCCCC;
-    background-color: #F4F4F4;
-}
-
-UL, OL, LI {
-    list-style: disc;
-}
-
-HR  {
-    width: 100%;
-    height: 1px;
-    background-color: #CCCCCC;
-    border-width: 0px;
-    padding: 0px;
-    color: #CCCCCC;
-}
-
-.variablelist { 
-    padding-top: 10; 
-    padding-bottom:10; 
-    margin:0;
-}
-
-.itemizedlist, UL { 
-    padding-top: 0; 
-    padding-bottom:0; 
-    margin:0; 
-}
-
-.term { 
-    font-weight:bold;
-}
-body center {
-	text-align: left;
-    color: #660033;
-}
-
-table, td, th {
-	border: 0px;
-}
-
-th {
-	border-bottom: 1px solid;
-	border-color: #aaa;
-}
-
-tr.TableRowColor td {
-	border-bottom: 1px solid;
-	border-color: #aaa;
-}
-
-dl dd {
-	font-size: 90%;
-	line-height: 120%;
-}
-
-p {
-	padding-left: 5px;
-	padding-top: 0px;
-	padding-bottom: 0px;
-}
diff --git a/trunk/kahadb/README b/trunk/kahadb/README
deleted file mode 100644
index 9d60609..0000000
--- a/trunk/kahadb/README
+++ /dev/null
@@ -1,24 +0,0 @@
-=======================================================================
- KahaDB : An Embedded Lightweight Non-Relational Database
-=======================================================================
-
-Goals:
-  * Provide a simple collections based interface for storing persistent
-    data.
-  * Provide a lower level key value interface for storing data. Secondary
-    keys should be supported.
-  * Fast recovery
-
-Status:
-  * Moved the org.apache.activemq.kaha package into this module
-    and renamed it as org.apache.kahadb
-  * Moved a refactored version of the low level indexing logic
-    used by Apache xindice to the org.apache.kahadb.xindice page.
-  
-TODO:
-  * None of our current index support fast recovery.  They suffer
-    from partial page write failures so on a crash, they have
-    to be fully rebuilt from the data logs.
-  * Indexes should know what the last transaction id that updated
-    it, so that missing operations can be replayed. 
-  * Investigate implementing data log replication for HA.
\ No newline at end of file
diff --git a/trunk/kahadb/pom.xml b/trunk/kahadb/pom.xml
deleted file mode 100755
index b9c5856..0000000
--- a/trunk/kahadb/pom.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-  <parent>
-    <groupId>org.apache.activemq</groupId>
-    <artifactId>activemq-parent</artifactId>
-    <version>5.5.0</version>
-  </parent>
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.activemq</groupId>
-  <artifactId>kahadb</artifactId>
-  <packaging>bundle</packaging>
-  <name>ActiveMQ :: KahaDB</name>
-  <description>An Embedded Lightweight Non-Relational Database</description>
-
-  <properties>
-    <activemq.osgi.import.pkg>
-      *
-    </activemq.osgi.import.pkg>
-    <activemq.osgi.export>
-      org.apache.kahadb*;version=${project.version};-noimport:=true
-    </activemq.osgi.export>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>test</scope>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-  </dependencies>
-
-
-  <build>
-    <plugins>
-      <!--
-      <plugin>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>maven-xbean-plugin</artifactId>
-        <version>3.4</version>
-        <executions>
-          <execution>
-            <configuration>
-              <namespace>http://activemq.apache.org/schema/kahadb</namespace>
-            </configuration>
-            <goals>
-              <goal>mapping</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>pertest</forkMode>
-          <childDelegation>false</childDelegation>
-          <useFile>true</useFile>
-          <argLine>-Xmx512M</argLine>
-
-           <systemProperties>
-            <property>
-              <name>org.apache.activemq.default.directory.prefix</name>
-              <value>target/</value>
-            </property>
-          </systemProperties>
-
-          <includes>
-            <include>**/*Test.*</include>
-          </includes>
-          <excludes>
-            <exclude>**/perf/*</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java b/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java
deleted file mode 100644
index c96d495..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.Marshaller;
-
-/**
- * BTreeIndex represents a Variable Magnitude B+Tree in a Page File.
- * A BTree is a bit flexible in that it can be used for set or
- * map-based indexing.  Leaf nodes are linked together for faster
- * iteration of the values. 
- *
- * <br>
- * The Variable Magnitude attribute means that the BTree attempts
- * to store as many values and pointers on one page as is possible.
- * 
- * <br>
- * The implementation can optionally a be Simple-Prefix B+Tree.
- * 
- * <br>
- * For those who don't know how a Simple-Prefix B+Tree works, the primary
- * distinction is that instead of promoting actual keys to branch pages,
- * when leaves are split, a shortest-possible separator is generated at
- * the pivot.  That separator is what is promoted to the parent branch
- * (and continuing up the list).  As a result, actual keys and pointers
- * can only be found at the leaf level.  This also affords the index the
- * ability to ignore costly merging and redistribution of pages when
- * deletions occur.  Deletions only affect leaf pages in this
- * implementation, and so it is entirely possible for a leaf page to be
- * completely empty after all of its keys have been removed.
- *
- * , $Date$
- */
-public class BTreeIndex<Key,Value> implements Index<Key,Value> {
-
-    private static final Logger LOG = LoggerFactory.getLogger(BTreeIndex.class);
-
-    /**
-     * Interface used to determine the simple prefix of two keys.
-     *
-     * , $Date$
-     */
-    static public interface Prefixer<Key> {
-        
-        /**
-         * This methods should return shortest prefix of value2 where the following still holds:<br/>
-         * value1 <= prefix <= value2.<br/><br/>
-         * 
-         * When this method is called, the following is guaranteed:<br/>
-         * value1 < value2<br/><br/>
-         * 
-         * 
-         * @param value1
-         * @param value2
-         * @return
-         */
-        public Key getSimplePrefix(Key value1, Key value2);
-    }
-    
-    /**
-     * StringPrefixer is a Prefixer implementation that works on strings.
-     */
-    static public class StringPrefixer implements Prefixer<String> {
-        
-        /**
-         * Example:
-         * If value1 is "Hello World"
-         * and value 2 is "Help Me"
-         * then the result will be: "Help"
-         * 
-         * @see  Prefixer#getSimplePrefix
-         */
-        public String getSimplePrefix(String value1, String value2) {
-            char[] c1 = value1.toCharArray();
-            char[] c2 = value2.toCharArray();
-            int n = Math.min(c1.length, c2.length);
-            int i =0;
-            while (i < n) {
-                if (c1[i] != c2[i]) {
-                    return value2.substring(0,i+1);
-                }
-                i++;
-            }
-            
-            if( n == c2.length ) {
-                return value2;
-            }
-            return value2.substring(0,n);
-        }
-    }    
-
-    private PageFile pageFile;
-    private long pageId;
-    private AtomicBoolean loaded = new AtomicBoolean();
-    
-    private final BTreeNode.Marshaller<Key, Value> marshaller = new BTreeNode.Marshaller<Key, Value>(this);
-    private Marshaller<Key> keyMarshaller;
-    private Marshaller<Value> valueMarshaller;
-    private Prefixer<Key> prefixer;
-
-    public BTreeIndex() {
-    }
-
-    public BTreeIndex(long rootPageId) {
-        this.pageId = rootPageId;
-    }
-    
-    @SuppressWarnings("unchecked")
-    public BTreeIndex(Page page) {
-        this(page.getPageId());
-    }
-    
-    public BTreeIndex(PageFile pageFile, long rootPageId) {
-        this.pageFile = pageFile;
-        this.pageId = rootPageId;
-    }
-
-    @SuppressWarnings("unchecked")
-    public BTreeIndex(PageFile pageFile, Page page) {
-        this(pageFile, page.getPageId());
-    }
-
-    synchronized public void load(Transaction tx) throws IOException {
-        if (loaded.compareAndSet(false, true)) {
-            LOG.debug("loading");
-            if( keyMarshaller == null ) {
-                throw new IllegalArgumentException("The key marshaller must be set before loading the BTreeIndex");
-            }
-            if( valueMarshaller == null ) {
-                throw new IllegalArgumentException("The value marshaller must be set before loading the BTreeIndex");
-            }
-            
-            final Page<BTreeNode<Key,Value>> p = tx.load(pageId, null);
-            if( p.getType() == Page.PAGE_FREE_TYPE ) {
-                 // Need to initialize it..
-                BTreeNode<Key, Value> root = createNode(p, null);
-                storeNode(tx, root, true);
-            }
-        }
-    }
-    
-    synchronized public void unload(Transaction tx) {
-        if (loaded.compareAndSet(true, false)) {
-        }    
-    }
-    
-    private BTreeNode<Key,Value> getRoot(Transaction tx) throws IOException {
-        return loadNode(tx, pageId, null);
-    }
-    
-    synchronized public boolean containsKey(Transaction tx, Key key) throws IOException {
-        assertLoaded();
-        return getRoot(tx).contains(tx, key);
-    }
-
-    synchronized public Value get(Transaction tx, Key key) throws IOException {
-        assertLoaded();
-        return getRoot(tx).get(tx, key);
-    }
-
-    synchronized public Value put(Transaction tx, Key key, Value value) throws IOException {
-        assertLoaded();
-        return getRoot(tx).put(tx, key, value);
-    }
-
-    synchronized public Value remove(Transaction tx, Key key) throws IOException {
-        assertLoaded();
-        return getRoot(tx).remove(tx, key);
-    }
-    
-    public boolean isTransient() {
-        return false;
-    }
-
-    synchronized public void clear(Transaction tx) throws IOException {
-        getRoot(tx).clear(tx);
-    }
-
-    synchronized public int getMinLeafDepth(Transaction tx) throws IOException {
-        return getRoot(tx).getMinLeafDepth(tx, 0);
-    }
-
-    synchronized public int getMaxLeafDepth(Transaction tx) throws IOException {
-        return getRoot(tx).getMaxLeafDepth(tx, 0);
-    }
-
-    synchronized public void printStructure(Transaction tx, PrintWriter out) throws IOException {
-        getRoot(tx).printStructure(tx, out, "");
-    }
-    
-    synchronized public void printStructure(Transaction tx, OutputStream out) throws IOException {
-        PrintWriter pw = new PrintWriter(out,false);
-        getRoot(tx).printStructure(tx, pw, "");
-        pw.flush();
-    }
-
-    synchronized public boolean isEmpty(final Transaction tx) throws IOException {
-        return getRoot(tx).isEmpty(tx);
-    }
-
-    synchronized public Iterator<Map.Entry<Key,Value>> iterator(final Transaction tx) throws IOException {
-        return getRoot(tx).iterator(tx);
-    }
-    
-    synchronized public Iterator<Map.Entry<Key,Value>> iterator(final Transaction tx, Key initialKey) throws IOException {
-        return getRoot(tx).iterator(tx, initialKey);
-    }
-    
-    synchronized public void visit(Transaction tx, BTreeVisitor<Key, Value> visitor) throws IOException {
-        getRoot(tx).visit(tx, visitor);
-    }
-
-    synchronized public Map.Entry<Key,Value> getFirst(Transaction tx) throws IOException {
-        return getRoot(tx).getFirst(tx);
-    }
-
-    synchronized public Map.Entry<Key,Value> getLast(Transaction tx) throws IOException {
-        return getRoot(tx).getLast(tx);
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    // Internal implementation methods
-    ///////////////////////////////////////////////////////////////////
-    
-    private void assertLoaded() throws IllegalStateException {
-        if( !loaded.get() ) {
-            throw new IllegalStateException("The BTreeIndex is not loaded");
-        }
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    // Internal methods made accessible to BTreeNode
-    ///////////////////////////////////////////////////////////////////
-
-    BTreeNode<Key,Value> loadNode(Transaction tx, long pageId, BTreeNode<Key,Value> parent) throws IOException {
-        Page<BTreeNode<Key,Value>> page = tx.load(pageId, marshaller);
-        BTreeNode<Key, Value> node = page.get();
-        node.setPage(page);
-        node.setParent(parent);
-        return node;
-    }
-
-    BTreeNode<Key,Value> createNode(Transaction tx, BTreeNode<Key,Value> parent) throws IOException {
-        Page<BTreeNode<Key,Value>> p = tx.allocate();
-        BTreeNode<Key,Value> node = new BTreeNode<Key,Value>(this);
-        node.setPage(p);
-        node.setParent(parent);
-        node.setEmpty();
-        p.set(node);
-        return node;
-    }
-
-    BTreeNode<Key,Value> createNode(Page<BTreeNode<Key,Value>> p, BTreeNode<Key,Value> parent) throws IOException {
-        BTreeNode<Key,Value> node = new BTreeNode<Key,Value>(this);
-        node.setPage(p);
-        node.setParent(parent);
-        node.setEmpty();
-        p.set(node);
-        return node;
-    }
-    
-    void storeNode(Transaction tx, BTreeNode<Key,Value> node, boolean overflow) throws IOException {
-        tx.store(node.getPage(), marshaller, overflow);
-    }
-        
-   
-    ///////////////////////////////////////////////////////////////////
-    // Property Accessors
-    ///////////////////////////////////////////////////////////////////
-
-    public PageFile getPageFile() {
-        return pageFile;
-    }
-    public long getPageId() {
-        return pageId;
-    }
-
-    public Marshaller<Key> getKeyMarshaller() {
-        return keyMarshaller;
-    }
-    public void setKeyMarshaller(Marshaller<Key> keyMarshaller) {
-        this.keyMarshaller = keyMarshaller;
-    }
-
-    public Marshaller<Value> getValueMarshaller() {
-        return valueMarshaller;
-    }
-    public void setValueMarshaller(Marshaller<Value> valueMarshaller) {
-        this.valueMarshaller = valueMarshaller;
-    }
-
-    public Prefixer<Key> getPrefixer() {
-        return prefixer;
-    }
-    public void setPrefixer(Prefixer<Key> prefixer) {
-        this.prefixer = prefixer;
-    }
-
-    public void setPageFile(PageFile pageFile) {
-        this.pageFile = pageFile;
-    }
-
-    public void setPageId(long pageId) {
-        this.pageId = pageId;
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeNode.java b/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeNode.java
deleted file mode 100644
index 96f1311..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeNode.java
+++ /dev/null
@@ -1,829 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Map.Entry;
-
-import org.apache.kahadb.index.BTreeIndex.Prefixer;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.VariableMarshaller;
-
-
-/**
- * The BTreeNode class represents a node in the BTree object graph.  It is stored in 
- * one Page of a PageFile.
- */
-public final class BTreeNode<Key,Value> {
-
-    // The index that this node is part of.
-    private final BTreeIndex<Key,Value> index;
-    // The parent node or null if this is the root node of the BTree
-    private BTreeNode<Key,Value> parent;
-    // The page associated with this node
-    private Page<BTreeNode<Key,Value>> page;
-    
-    // Order list of keys in the node
-    private Key[] keys;
-    // Values associated with the Keys. Null if this is a branch node.
-    private Value[] values;
-    // nodeId pointers to children BTreeNodes. Null if this is a leaf node.
-    private long[] children;
-    // The next leaf node after this one.  Used for fast iteration of the entries.
-    private long next = -1;
-    
-    private final class KeyValueEntry implements Map.Entry<Key, Value> {
-        private final Key key;
-        private final Value value;
-
-        public KeyValueEntry(Key key, Value value) {
-            this.key = key;
-            this.value = value;
-        }
-
-        public Key getKey() {
-            return key;
-        }
-
-        public Value getValue() {
-            return value;
-        }
-
-        public Value setValue(Value value) {
-            throw new UnsupportedOperationException();
-        }
-
-    }
-
-    private final class BTreeIterator implements Iterator<Map.Entry<Key, Value>> {
-        
-        private final Transaction tx;
-        BTreeNode<Key,Value> current;
-        int nextIndex;
-        Map.Entry<Key,Value> nextEntry;
-
-        private BTreeIterator(Transaction tx, BTreeNode<Key,Value> current, int nextIndex) {
-            this.tx = tx;
-            this.current = current;
-            this.nextIndex=nextIndex;
-        }
-
-        synchronized private void findNextPage() {
-            if( nextEntry!=null ) {
-                return;
-            }
-            
-            try {
-                while( current!=null ) {
-                    if( nextIndex >= current.keys.length ) {
-                        // we need to roll to the next leaf..
-                        if( current.next >= 0 ) {
-                            current = index.loadNode(tx, current.next, null);
-                            assert !current.isBranch() : "Should have linked to the next leaf node.";
-                            nextIndex=0;
-                        } else {
-                            break;
-                        }
-                    }  else {
-                        nextEntry = new KeyValueEntry(current.keys[nextIndex], current.values[nextIndex]);
-                        nextIndex++;
-                        break;
-                    }
-                    
-                }
-            } catch (IOException e) {
-            }
-        }
-
-        public boolean hasNext() {
-            findNextPage();
-            return nextEntry !=null;
-        }
-
-        public Entry<Key, Value> next() {
-            findNextPage(); 
-            if( nextEntry !=null ) {
-                Entry<Key, Value> lastEntry = nextEntry;
-                nextEntry=null;
-                return lastEntry;
-            } else {
-                throw new NoSuchElementException();
-            }
-        }
-
-        public void remove() {
-            throw new UnsupportedOperationException();
-        }
-    }
-
-    /**
-     * The Marshaller is used to store and load the data in the BTreeNode into a Page.
-     *  
-     * @param <Key>
-     * @param <Value>
-     */
-    static public class Marshaller<Key,Value> extends VariableMarshaller<BTreeNode<Key,Value>> {
-        private final BTreeIndex<Key,Value> index;
-        
-        public Marshaller(BTreeIndex<Key,Value> index) {
-            this.index = index;
-        }
-
-        public void writePayload(BTreeNode<Key,Value> node, DataOutput os) throws IOException {
-            // Write the keys
-            short count = (short)node.keys.length; // cast may truncate value...
-            if( count != node.keys.length ) {
-                throw new IOException("Too many keys");
-            }
-            
-            os.writeShort(count);
-            for (int i = 0; i < node.keys.length; i++) {
-                index.getKeyMarshaller().writePayload(node.keys[i], os);
-            }
-            
-            if( node.isBranch() ) {
-                // If this is a branch...
-                os.writeBoolean(true);
-                for (int i = 0; i < count+1; i++) {
-                    os.writeLong(node.children[i]);
-                }
-                
-            } else {
-                // If this is a leaf
-                os.writeBoolean(false);
-                for (int i = 0; i < count; i++) {
-                    index.getValueMarshaller().writePayload(node.values[i], os);
-                }
-                os.writeLong(node.next);
-            }
-        }
-
-        @SuppressWarnings("unchecked")
-        public BTreeNode<Key,Value> readPayload(DataInput is) throws IOException {
-            BTreeNode<Key,Value>  node = new BTreeNode<Key,Value>(index);
-            int count = is.readShort();
-            
-            node.keys = (Key[])new Object[count];
-            for (int i = 0; i < count; i++) {
-                node.keys[i] = index.getKeyMarshaller().readPayload(is);
-            }
-            
-            if( is.readBoolean() ) {
-                node.children = new long[count+1];
-                for (int i = 0; i < count+1; i++) {
-                    node.children[i] = is.readLong();
-                }
-            } else {
-                node.values = (Value[])new Object[count];
-                for (int i = 0; i < count; i++) {
-                    node.values[i] = index.getValueMarshaller().readPayload(is);
-                }
-                node.next = is.readLong();
-            }
-            return node;
-        }
-    }
-
-    public BTreeNode(BTreeIndex<Key,Value> index) {
-        this.index = index;
-    }
-    
-    public void setEmpty() {
-        setLeafData(createKeyArray(0), createValueArray(0));
-    }
-    
-
-    /**
-     * Internal (to the BTreeNode) method. Because this method is called only by
-     * BTreeNode itself, no synchronization done inside of this method.
-     * @throws IOException 
-     */
-    private BTreeNode<Key,Value> getChild(Transaction tx, int idx) throws IOException {
-        if (isBranch() && idx >= 0 && idx < children.length) {
-            BTreeNode<Key, Value> result = this.index.loadNode(tx, children[idx], this);
-            return result;
-        } else {
-            return null;
-        }
-    }
-
-
-    /**
-     * Returns the right most leaf from the current btree graph.
-     * @throws IOException
-     */
-    private BTreeNode<Key,Value> getRightLeaf(Transaction tx) throws IOException {
-        BTreeNode<Key,Value> cur = this;
-        while(cur.isBranch()) {
-            cur = cur.getChild(tx, cur.keys.length);
-        }
-        return cur;
-    }
-
-    /**
-     * Returns the left most leaf from the current btree graph.
-     * @throws IOException
-     */
-    private BTreeNode<Key,Value> getLeftLeaf(Transaction tx) throws IOException {
-        BTreeNode<Key,Value> cur = this;
-        while(cur.isBranch()) {
-            cur = cur.getChild(tx, 0);
-        }
-        return cur;
-    }
-
-    /**
-     * Returns the left most leaf from the current btree graph.
-     * @throws IOException
-     */
-    private BTreeNode<Key,Value> getLeftPeer(Transaction tx, BTreeNode<Key,Value> x) throws IOException {
-        BTreeNode<Key,Value> cur = x;
-        while( cur.parent !=null ) {
-            if( cur.parent.children[0] == cur.getPageId() ) {
-                cur = cur.parent;
-            } else {
-                for( int i=0; i < cur.parent.children.length; i ++) {
-                    if( cur.parent.children[i]==cur.getPageId() ) {
-                        return  cur.parent.getChild(tx, i-1);
-                    }
-                }
-                throw new AssertionError("page "+x+" was decendent of "+cur.getPageId());
-            }
-        }
-        return null;
-    }
-
-    public Value remove(Transaction tx, Key key) throws IOException {
-
-        if(isBranch()) {
-            int idx = Arrays.binarySearch(keys, key);
-            idx = idx < 0 ? -(idx + 1) : idx + 1;
-            BTreeNode<Key, Value> child = getChild(tx, idx);
-            if( child.getPageId() == index.getPageId() ) {
-                throw new IOException("BTree corrupted: Cylce detected.");
-            }
-            Value rc = child.remove(tx, key);
-            
-            // child node is now empty.. remove it from the branch node.
-            if( child.keys.length == 0 ) {
-                
-                // If the child node is a branch, promote
-                if( child.isBranch() ) {
-                    // This is cause branches are never really empty.. they just go down to 1 child..
-                    children[idx] = child.children[0];
-                } else {
-                    
-                    // The child was a leaf. Then we need to actually remove it from this branch node..
-                    // and relink the previous leaf to skip to the next leaf.
-
-                    BTreeNode<Key, Value> previousLeaf = null;
-                    if( idx > 0 ) {
-                        // easy if we this node hold the previous child.
-                        previousLeaf = getChild(tx, idx-1).getRightLeaf(tx);
-                    } else {
-                        // less easy if we need to go to the parent to find the previous child.
-                        BTreeNode<Key, Value> lp = getLeftPeer(tx, this);
-                        if( lp!=null ) {
-                            previousLeaf = lp.getRightLeaf(tx);
-                        }
-                        // lp will be null if there was no previous child.
-                    }
-
-                    if( previousLeaf !=null ) {
-                        previousLeaf.next = child.next;
-                        index.storeNode(tx, previousLeaf, true);
-                    }
-
-                    if( idx < children.length-1 ) {
-                        // Delete it and key to the right.
-                        setBranchData(arrayDelete(keys, idx), arrayDelete(children, idx));
-                    } else {
-                        // It was the last child.. Then delete it and key to the left
-                        setBranchData(arrayDelete(keys, idx-1), arrayDelete(children, idx));
-                    }
-                    
-                    // If we are the root node, and only have 1 child left.  Then 
-                    // make the root be the leaf node.
-                    if( children.length == 1 && parent==null ) {
-                        child = getChild(tx, 0);
-                        keys = child.keys;
-                        children = child.children;
-                        values = child.values;
-                        // free up the page..
-                        tx.free(child.getPage());
-                    }
-                    
-                }
-                index.storeNode(tx, this, true);
-            }
-            
-            return rc;
-        } else {
-            int idx = Arrays.binarySearch(keys, key);
-            if (idx < 0) {
-                return null;
-            } else {
-                Value oldValue = values[idx];
-                setLeafData(arrayDelete(keys, idx), arrayDelete(values, idx));
-                
-                if( keys.length==0 && parent!=null) {
-                    tx.free(getPage());
-                } else {
-                    index.storeNode(tx, this, true);
-                }
-                
-                return oldValue;
-            }
-        }
-    }
-
-    public Value put(Transaction tx, Key key, Value value) throws IOException {
-        if (key == null) {
-            throw new IllegalArgumentException("Key cannot be null");
-        }
-
-        if( isBranch() ) {
-            return getLeafNode(tx, this, key).put(tx, key, value);
-        } else {
-            int idx = Arrays.binarySearch(keys, key);
-            
-            Value oldValue=null;
-            if (idx >= 0) {
-                // Key was found... Overwrite
-                oldValue = values[idx];
-                values[idx] = value;
-                setLeafData(keys, values);
-            } else {
-                // Key was not found, Insert it
-                idx = -(idx + 1);
-                setLeafData(arrayInsert(keys, key, idx), arrayInsert(values, value, idx));
-            }
-            
-            try {
-                index.storeNode(tx, this, allowOverflow());
-            } catch ( Transaction.PageOverflowIOException e ) {
-                // If we get an overflow 
-                split(tx);
-            }
-            
-            return oldValue;
-        }
-    }
-
-    private void promoteValue(Transaction tx, Key key, long nodeId) throws IOException {
-
-        int idx = Arrays.binarySearch(keys, key);
-        idx = idx < 0 ? -(idx + 1) : idx + 1;
-        setBranchData(arrayInsert(keys, key, idx), arrayInsert(children, nodeId, idx + 1));
-
-        try {
-            index.storeNode(tx, this, allowOverflow());
-        } catch ( Transaction.PageOverflowIOException e ) {
-            split(tx);
-        }
-
-    }
-
-    /**
-     * Internal to the BTreeNode method
-     */
-    private void split(Transaction tx) throws IOException {
-        Key[] leftKeys;
-        Key[] rightKeys;
-        Value[] leftValues=null;
-        Value[] rightValues=null;
-        long[] leftChildren=null;
-        long[] rightChildren=null;
-        Key separator;
-
-        int vc = keys.length;
-        int pivot = vc / 2;
-
-        // Split the node into two nodes
-        if( isBranch() ) {
-
-            leftKeys = createKeyArray(pivot);
-            leftChildren = new long[leftKeys.length + 1];
-            rightKeys = createKeyArray(vc - (pivot + 1));
-            rightChildren = new long[rightKeys.length + 1];
-
-            System.arraycopy(keys, 0, leftKeys, 0, leftKeys.length);
-            System.arraycopy(children, 0, leftChildren, 0, leftChildren.length);
-            System.arraycopy(keys, leftKeys.length + 1, rightKeys, 0, rightKeys.length);
-            System.arraycopy(children, leftChildren.length, rightChildren, 0, rightChildren.length);
-
-            // Is it a Simple Prefix BTree??
-            Prefixer<Key> prefixer = index.getPrefixer();
-            if(prefixer!=null) {
-                separator = prefixer.getSimplePrefix(leftKeys[leftKeys.length - 1], rightKeys[0]);
-            } else {
-                separator = keys[leftKeys.length];
-            }
-                
-            
-        } else {
-
-            leftKeys = createKeyArray(pivot);
-            leftValues = createValueArray(leftKeys.length);
-            rightKeys = createKeyArray(vc - pivot);
-            rightValues = createValueArray(rightKeys.length);
-
-            System.arraycopy(keys, 0, leftKeys, 0, leftKeys.length);
-            System.arraycopy(values, 0, leftValues, 0, leftValues.length);
-            System.arraycopy(keys, leftKeys.length, rightKeys, 0, rightKeys.length);
-            System.arraycopy(values, leftValues.length, rightValues, 0, rightValues.length);
-
-            // separator = getSeparator(leftVals[leftVals.length - 1],
-            // rightVals[0]);
-            separator = rightKeys[0];
-
-        }
-
-        // Promote the pivot to the parent branch
-        if (parent == null) {
-            
-            // This can only happen if this is the root
-            BTreeNode<Key,Value> rNode = this.index.createNode(tx, this);
-            BTreeNode<Key,Value> lNode = this.index.createNode(tx, this);
-
-            if( isBranch() ) {
-                rNode.setBranchData(rightKeys, rightChildren);
-                lNode.setBranchData(leftKeys, leftChildren);
-            } else {
-                rNode.setLeafData(rightKeys, rightValues);
-                lNode.setLeafData(leftKeys, leftValues);
-                lNode.setNext(rNode.getPageId());
-            }
-
-            Key[] v = createKeyArray(1);
-            v[0]=separator;
-            setBranchData(v, new long[] { lNode.getPageId(), rNode.getPageId() });
-
-            index.storeNode(tx, this, true);
-            index.storeNode(tx, rNode, true);
-            index.storeNode(tx, lNode, true);
-            
-        } else {
-            BTreeNode<Key,Value> rNode = this.index.createNode(tx, parent);
-            
-            if( isBranch() ) {
-                setBranchData(leftKeys, leftChildren);
-                rNode.setBranchData(rightKeys, rightChildren);
-            } else {
-                rNode.setNext(next);
-                next = rNode.getPageId();
-                setLeafData(leftKeys, leftValues);
-                rNode.setLeafData(rightKeys, rightValues);
-            }
-
-            index.storeNode(tx, this, true);
-            index.storeNode(tx, rNode, true);
-            parent.promoteValue(tx, separator, rNode.getPageId());
-        }
-    }
-
-    public void printStructure(Transaction tx, PrintWriter out, String prefix) throws IOException {
-        if( prefix.length()>0 && parent == null ) {
-            throw new IllegalStateException("Cycle back to root node detected.");
-        }
-        
-        if( isBranch() ) {
-            for(int i=0 ; i < children.length; i++) {
-                BTreeNode<Key, Value> child = getChild(tx, i);
-                if( i == children.length-1) {
-                    out.println(prefix+"\\- "+child.getPageId()+(child.isBranch()?" ("+child.children.length+")":""));
-                    child.printStructure(tx, out, prefix+"   ");
-                } else {
-                    out.println(prefix+"|- "+child.getPageId()+(child.isBranch()?" ("+child.children.length+")":"")+" : "+keys[i]);
-                    child.printStructure(tx, out, prefix+"   ");
-                }
-            }
-        }
-    }
-    
-    
-    public int getMinLeafDepth(Transaction tx, int depth) throws IOException {
-        depth++;
-        if( isBranch() ) {
-            int min = Integer.MAX_VALUE;
-            for(int i=0 ; i < children.length; i++) {
-                min = Math.min(min, getChild(tx, i).getMinLeafDepth(tx, depth));
-            }
-            return min;
-        } else {
-//            print(depth*2, "- "+page.getPageId());
-            return depth;
-        }
-    }
-
-    public int getMaxLeafDepth(Transaction tx, int depth) throws IOException {
-        depth++;
-        if( isBranch() ) {
-            int v = 0;
-            for(int i=0 ; i < children.length; i++) {
-                v = Math.max(v, getChild(tx, i).getMaxLeafDepth(tx, depth));
-            }
-            depth = v;
-        } 
-        return depth;
-    }
-
-    public Value get(Transaction tx, Key key) throws IOException {
-        if (key == null) {
-            throw new IllegalArgumentException("Key cannot be null");
-        }
-        if( isBranch() ) {
-            return getLeafNode(tx, this, key).get(tx, key);
-        } else {
-            int idx = Arrays.binarySearch(keys, key);
-            if (idx < 0) {
-                return null;
-            } else {
-                return values[idx];
-            }
-        }
-    }
-    
-    public boolean isEmpty(final Transaction tx) throws IOException {
-        return keys.length==0;
-    }
-
-    public void visit(Transaction tx, BTreeVisitor<Key, Value> visitor) throws IOException {
-        if (visitor == null) {
-            throw new IllegalArgumentException("Visitor cannot be null");
-        }
-        if( isBranch() ) {
-            for(int i=0; i < this.children.length; i++) {
-                Key key1 = null;
-                if( i!=0 ) {
-                    key1 = keys[i-1];
-                }
-                Key key2 = null;
-                if( i!=this.children.length-1 ) {
-                    key2 = keys[i];
-                }
-                if( visitor.isInterestedInKeysBetween(key1, key2) ) {
-                    BTreeNode<Key, Value> child = getChild(tx, i);
-                    child.visit(tx, visitor);
-                }
-            }
-        } else {
-            visitor.visit(Arrays.asList(keys), Arrays.asList(values));
-        }
-    }
-    
-    public Map.Entry<Key,Value> getFirst(Transaction tx) throws IOException {
-        BTreeNode<Key, Value> node = this;
-        while( node .isBranch() ) {
-            node = node.getChild(tx, 0);
-        }
-        if( node.values.length>0 ) {
-            return new KeyValueEntry(node.keys[0], node.values[0]);
-        } else {
-            return null;
-        }
-    }
-
-    public Map.Entry<Key,Value> getLast(Transaction tx) throws IOException {
-        BTreeNode<Key, Value> node = this;
-        while( node.isBranch() ) {
-            node = node.getChild(tx, node.children.length-1);
-        }
-        if( node.values.length>0 ) {
-            int idx = node.values.length-1;
-            return new KeyValueEntry(node.keys[idx], node.values[idx]);
-        } else {
-            return null;
-        }
-    }
-    
-    public BTreeNode<Key,Value> getFirstLeafNode(Transaction tx) throws IOException {
-        BTreeNode<Key, Value> node = this;
-        while( node .isBranch() ) {
-            node = node.getChild(tx, 0);
-        }
-        return node;
-    }
-    
-    public Iterator<Map.Entry<Key,Value>> iterator(final Transaction tx, Key startKey) throws IOException {
-        if (startKey == null) {
-            return iterator(tx);
-        }
-        if( isBranch() ) {
-            return getLeafNode(tx, this, startKey).iterator(tx, startKey);
-        } else {
-            int idx = Arrays.binarySearch(keys, startKey);
-            if (idx < 0) {
-                idx = -(idx + 1);
-            }
-            return new BTreeIterator(tx, this, idx);
-        }
-    }
-
-    public Iterator<Map.Entry<Key,Value>> iterator(final Transaction tx) throws IOException {
-        return new BTreeIterator(tx, getFirstLeafNode(tx), 0);
-    }
-    
-    public void clear(Transaction tx) throws IOException {
-        if( isBranch() ) {
-            for (int i = 0; i < children.length; i++) {
-                BTreeNode<Key, Value> node = index.loadNode(tx, children[i], this);
-                node.clear(tx);
-                tx.free(node.getPage());
-            }
-        }
-        // Reset the root node to be a leaf.
-        if( parent == null ) {
-            setLeafData(createKeyArray(0), createValueArray(0));
-            next=-1;
-            index.storeNode(tx, this, true);
-        }
-    }
-
-
-    private static <Key,Value> BTreeNode<Key, Value> getLeafNode(Transaction tx, final BTreeNode<Key, Value> node, Key key) throws IOException {
-        BTreeNode<Key, Value> current = node;
-        while( true ) {
-            if( current.isBranch() ) {
-                int idx = Arrays.binarySearch(current.keys, key);
-                idx = idx < 0 ? -(idx + 1) : idx + 1;
-                BTreeNode<Key, Value> child = current.getChild(tx, idx);        
-
-                // A little cycle detection for sanity's sake
-                if( child == node ) {
-                    throw new IOException("BTree corrupted: Cylce detected.");
-                }
-                
-                current = child;
-            } else {
-                break;
-            }
-        }
-        return current;
-    }
-
-    public boolean contains(Transaction tx, Key key) throws IOException {
-        if (key == null) {
-            throw new IllegalArgumentException("Key cannot be null");
-        }
-
-        if( isBranch() ) {
-            return getLeafNode(tx, this, key).contains(tx, key);
-        } else {
-            int idx = Arrays.binarySearch(keys, key);
-            if (idx < 0) {
-                return false;
-            } else {
-                return true;
-            }
-        }
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    // Implementation methods
-    ///////////////////////////////////////////////////////////////////
- 
-
-    private boolean allowOverflow() {
-        // Only allow page overflow if there are <= 3 keys in the node.  Otherwise a split will occur on overflow
-        return this.keys.length<=3;
-    }
-
-
-    private void setLeafData(Key[] keys, Value[] values) {
-        this.keys = keys;
-        this.values = values;
-        this.children = null;
-    }
-    
-    private void setBranchData(Key[] keys, long[] nodeIds) {
-        this.keys = keys;
-        this.children = nodeIds;
-        this.values = null;
-    }
-
-    @SuppressWarnings("unchecked")
-    private Key[] createKeyArray(int size) {
-        return (Key[])new Object[size];
-    }
-
-    @SuppressWarnings("unchecked")
-    private Value[] createValueArray(int size) {
-        return (Value[])new Object[size];
-    }
-    
-    @SuppressWarnings("unchecked")
-    static private <T> T[] arrayDelete(T[] vals, int idx) {
-        T[] newVals = (T[])new Object[vals.length - 1];
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        if (idx < newVals.length) {
-            System.arraycopy(vals, idx + 1, newVals, idx, newVals.length - idx);
-        }
-        return newVals;
-    }
-    
-    static private long[] arrayDelete(long[] vals, int idx) {
-        long[] newVals = new long[vals.length - 1];
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        if (idx < newVals.length) {
-            System.arraycopy(vals, idx + 1, newVals, idx, newVals.length - idx);
-        }
-        return newVals;
-    }
-
-    @SuppressWarnings("unchecked")
-    static private <T> T[] arrayInsert(T[] vals, T val, int idx) {
-        T[] newVals = (T[])new Object[vals.length + 1];
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        newVals[idx] = val;
-        if (idx < vals.length) {
-            System.arraycopy(vals, idx, newVals, idx + 1, vals.length - idx);
-        }
-        return newVals;
-    }
-
-
-    static private long[] arrayInsert(long[] vals, long val, int idx) {
-        
-        long[] newVals = new long[vals.length + 1];
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        newVals[idx] = val;
-        if (idx < vals.length) {
-            System.arraycopy(vals, idx, newVals, idx + 1, vals.length - idx);
-        }
-        return newVals;
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    // Property Accessors
-    ///////////////////////////////////////////////////////////////////
-    private boolean isBranch() {
-        return children!=null;
-    }
-
-    public long getPageId() {
-        return page.getPageId();
-    }
-
-    public BTreeNode<Key, Value> getParent() {
-        return parent;
-    }
-
-    public void setParent(BTreeNode<Key, Value> parent) {
-        this.parent = parent;
-    }
-
-    public Page<BTreeNode<Key, Value>> getPage() {
-        return page;
-    }
-
-    public void setPage(Page<BTreeNode<Key, Value>> page) {
-        this.page = page;
-    }
-
-    public long getNext() {
-        return next;
-    }
-
-    public void setNext(long next) {
-        this.next = next;
-    }
-    
-    @Override
-    public String toString() {
-        return "[BTreeNode "+(isBranch()?"branch":"leaf")+": "+Arrays.asList(keys)+"]";
-    }
-
-}
-
-
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeVisitor.java b/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeVisitor.java
deleted file mode 100644
index 1cc6978..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/index/BTreeVisitor.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.util.List;
-
-/**
- * Interface used to selectively visit the entries in a BTree.
- * 
- * @param <Key>
- * @param <Value>
- */
-public interface BTreeVisitor<Key,Value> {
-
-    /**
-     * Do you want to visit the range of BTree entries between the first and and second key?
-     * 
-     * @param first if null indicates the range of values before the second key. 
-     * @param second if null indicates the range of values after the first key.
-     * @return true if you want to visit the values between the first and second key.
-     */
-    boolean isInterestedInKeysBetween(Key first, Key second);
-
-    /**
-     * The keys and values of a BTree leaf node.
-     * 
-     * @param keys
-     * @param values
-     */
-    void visit(List<Key> keys, List<Value> values);
-
-    public interface Predicate<Key> {
-        boolean isInterestedInKeysBetween(Key first, Key second);
-        boolean isInterestedInKey(Key key);
-    }
-
-    abstract class PredicateVisitor<Key, Value> implements BTreeVisitor<Key, Value>, Predicate<Key> {
-		public void visit(List<Key> keys, List<Value> values) {
-			for( int i=0; i < keys.size(); i++) {
-				Key key = keys.get(i);
-				if( isInterestedInKey(key) ) {
-					matched(key, values.get(i));
-				}
-			}
-		}
-
-		protected void matched(Key key, Value value) {
-        }
-    }
-
-    class OrVisitor<Key, Value> extends PredicateVisitor<Key, Value> {
-        private final List<Predicate<Key>> conditions;
-
-        public OrVisitor(List<Predicate<Key>> conditions) {
-            this.conditions = conditions;
-        }
-
-		public boolean isInterestedInKeysBetween(Key first, Key second) {
-            for (Predicate<Key> condition : conditions) {
-                if( condition.isInterestedInKeysBetween(first, second) ) {
-                    return true;
-                }
-            }
-            return false;
-		}
-
-        public boolean isInterestedInKey(Key key) {
-            for (Predicate<Key> condition : conditions) {
-                if( condition.isInterestedInKey(key) ) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            boolean first=true;
-            for (Predicate<Key> condition : conditions) {
-                if( !first ) {
-                    sb.append(" OR ");
-                }
-                first=false;
-                sb.append("(");
-                sb.append(condition);
-                sb.append(")");
-            }
-            return sb.toString();
-        }
-    }
-
-    class AndVisitor<Key, Value> extends PredicateVisitor<Key, Value> {
-        private final List<Predicate<Key>> conditions;
-
-        public AndVisitor(List<Predicate<Key>> conditions) {
-            this.conditions = conditions;
-        }
-
-		public boolean isInterestedInKeysBetween(Key first, Key second) {
-            for (Predicate<Key> condition : conditions) {
-                if( !condition.isInterestedInKeysBetween(first, second) ) {
-                    return false;
-                }
-            }
-            return true;
-		}
-
-        public boolean isInterestedInKey(Key key) {
-            for (Predicate<Key> condition : conditions) {
-                if( !condition.isInterestedInKey(key) ) {
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            boolean first=true;
-            for (Predicate<Key> condition : conditions) {
-                if( !first ) {
-                    sb.append(" AND ");
-                }
-                first=false;
-                sb.append("(");
-                sb.append(condition);
-                sb.append(")");
-            }
-            return sb.toString();
-        }
-    }
-
-    class BetweenVisitor<Key extends Comparable<Key>, Value> extends PredicateVisitor<Key, Value> {
-		private final Key first;
-        private final Key last;
-
-        public BetweenVisitor(Key first, Key last) {
-			this.first = first;
-            this.last = last;
-        }
-
-		public boolean isInterestedInKeysBetween(Key first, Key second) {
-        	return (second==null || second.compareTo(this.first)>=0)
-                   && (first==null || first.compareTo(last)<0);
-		}
-
-        public boolean isInterestedInKey(Key key) {
-            return key.compareTo(first) >=0 && key.compareTo(last) <0;
-        }
-
-        @Override
-        public String toString() {
-            return first+" <= key < "+last;
-        }
-    }
-
-    class GTVisitor<Key extends Comparable<Key>, Value> extends PredicateVisitor<Key, Value> {
-		final private Key value;
-
-		public GTVisitor(Key value) {
-			this.value = value;
-		}
-
-		public boolean isInterestedInKeysBetween(Key first, Key second) {
-        	return second==null || second.compareTo(value)>0;
-		}
-
-        public boolean isInterestedInKey(Key key) {
-            return key.compareTo(value)>0;
-        }
-
-        @Override
-        public String toString() {
-            return "key > "+ value;
-        }
-    }
-
-    class GTEVisitor<Key extends Comparable<Key>, Value> extends PredicateVisitor<Key, Value> {
-		final private Key value;
-
-		public GTEVisitor(Key value) {
-			this.value = value;
-		}
-
-		public boolean isInterestedInKeysBetween(Key first, Key second) {
-        	return second==null || second.compareTo(value)>=0;
-		}
-
-        public boolean isInterestedInKey(Key key) {
-            return key.compareTo(value)>=0;
-        }
-
-        @Override
-        public String toString() {
-            return "key >= "+ value;
-        }
-    }
-    
-    class LTVisitor<Key extends Comparable<Key>, Value> extends PredicateVisitor<Key, Value> {
-		final private Key value;
-
-		public LTVisitor(Key value) {
-			this.value = value;
-		}
-
-		public boolean isInterestedInKeysBetween(Key first, Key second) {
-        	return first==null || first.compareTo(value)<0;
-		}
-
-        public boolean isInterestedInKey(Key key) {
-            return key.compareTo(value)<0;
-        }
-
-        @Override
-        public String toString() {
-            return "key < "+ value;
-        }
-    }
-    
-    class LTEVisitor<Key extends Comparable<Key>, Value> extends PredicateVisitor<Key, Value> {
-		final private Key value;
-
-		public LTEVisitor(Key value) {
-			this.value = value;
-		}
-
-		public boolean isInterestedInKeysBetween(Key first, Key second) {
-        	return first==null || first.compareTo(value)<=0;
-		}
-
-        public boolean isInterestedInKey(Key key) {
-            return key.compareTo(value)<=0;
-        }
-
-        @Override
-        public String toString() {
-            return "key <= "+ value;
-        }
-    }
-}
\ No newline at end of file
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java b/trunk/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java
deleted file mode 100644
index cb4a5ef..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.VariableMarshaller;
-
-/**
- * Bin in a HashIndex
- * 
- * 
- */
-class HashBin<Key, Value> {
-    
-    
-    static public class Marshaller<Key, Value> extends VariableMarshaller<HashBin<Key, Value>> {
-        private final HashIndex<Key, Value> hashIndex;
-
-        public Marshaller(HashIndex<Key, Value> index) {
-            this.hashIndex = index;
-        }
-        
-        public HashBin<Key, Value> readPayload(DataInput is) throws IOException {
-            HashBin<Key, Value> bin = new HashBin<Key, Value>();
-            int size = is.readInt();
-            for(int i=0; i < size; i++) {
-                Key key = hashIndex.getKeyMarshaller().readPayload(is);
-                Value value = hashIndex.getValueMarshaller().readPayload(is);
-                bin.data.put(key, value);
-            }
-            return bin;
-        }
-
-        public void writePayload(HashBin<Key, Value> bin, DataOutput os) throws IOException {
-            os.writeInt(bin.data.size());
-            for (Map.Entry<Key, Value> entry : bin.data.entrySet()) {
-                hashIndex.getKeyMarshaller().writePayload(entry.getKey(), os);
-                hashIndex.getValueMarshaller().writePayload(entry.getValue(), os);
-            }
-        }
-        
-    }
-    
-    private Page<HashBin<Key, Value>> page;
-    private TreeMap<Key, Value> data = new TreeMap<Key, Value>();
-    
-    public int size() {
-        return data.size();
-    }
-
-    public Value put(Key key, Value value) throws IOException {
-        return data.put(key, value);
-    }
-
-    public Value get(Key key) throws IOException {
-        return data.get(key);
-    }
-    
-    public boolean containsKey(Key key) throws IOException {
-        return data.containsKey(key);
-    }
-    
-    public Map<Key, Value> getAll(Transaction tx) throws IOException {
-        return data;
-    }
-    
-    public Value remove(Key key) throws IOException {
-        return data.remove(key);
-    }
-
-    public Page<HashBin<Key, Value>> getPage() {
-        return page;
-    }
-
-    public void setPage(Page<HashBin<Key, Value>> page) {
-        this.page = page;
-        this.page.set(this);
-    }
-
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java b/trunk/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java
deleted file mode 100644
index 8f89b97..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.page.Page;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.Marshaller;
-import org.apache.kahadb.util.VariableMarshaller;
-
-/**
- * BTree implementation
- * 
- * 
- */
-public class HashIndex<Key,Value> implements Index<Key,Value> {
-
-    public static final int CLOSED_STATE = 1;
-    public static final int OPEN_STATE = 2;
-
-
-    private static final Logger LOG = LoggerFactory.getLogger(HashIndex.class);
-
-    public static final int DEFAULT_BIN_CAPACITY;
-    public static final int DEFAULT_MAXIMUM_BIN_CAPACITY;
-    public static final int DEFAULT_MINIMUM_BIN_CAPACITY;
-    public static final int DEFAULT_LOAD_FACTOR;
-
-    static {
-        DEFAULT_BIN_CAPACITY = Integer.parseInt(System.getProperty("defaultBinSize", "1024"));
-        DEFAULT_MAXIMUM_BIN_CAPACITY = Integer.parseInt(System.getProperty("maximumCapacity", "16384"));
-        DEFAULT_MINIMUM_BIN_CAPACITY = Integer.parseInt(System.getProperty("minimumCapacity", "16"));
-        DEFAULT_LOAD_FACTOR = Integer.parseInt(System.getProperty("defaultLoadFactor", "75"));
-    }
-
-    private AtomicBoolean loaded = new AtomicBoolean();
-
-
-    private int increaseThreshold;
-    private int decreaseThreshold;
-
-    // Where the bin page array starts at.
-    private int maximumBinCapacity = DEFAULT_MAXIMUM_BIN_CAPACITY;
-    private int minimumBinCapacity = DEFAULT_MINIMUM_BIN_CAPACITY;
-
-
-
-    // Once binsActive/binCapacity reaches the loadFactor, then we need to
-    // increase the capacity
-    private int loadFactor = DEFAULT_LOAD_FACTOR;
-
-    private PageFile pageFile;
-    // This page holds the index metadata.
-    private long pageId;
-
-    static class Metadata {
-        
-        private Page<Metadata> page;
-        
-        // When the index is initializing or resizing.. state changes so that
-        // on failure it can be properly recovered.
-        private int state;
-        private long binPageId;
-        private int binCapacity = DEFAULT_BIN_CAPACITY;
-        private int binsActive;
-        private int size;
-
-        
-        public void read(DataInput is) throws IOException {
-            state = is.readInt();
-            binPageId = is.readLong();
-            binCapacity = is.readInt();
-            size = is.readInt();
-            binsActive = is.readInt();
-        }
-        public void write(DataOutput os) throws IOException {
-            os.writeInt(state);
-            os.writeLong(binPageId);
-            os.writeInt(binCapacity);
-            os.writeInt(size);
-            os.writeInt(binsActive);
-        }
-        
-        static class Marshaller extends VariableMarshaller<Metadata> {
-            public Metadata readPayload(DataInput dataIn) throws IOException {
-                Metadata rc = new Metadata();
-                rc.read(dataIn);
-                return rc;
-            }
-
-            public void writePayload(Metadata object, DataOutput dataOut) throws IOException {
-                object.write(dataOut);
-            }
-        }
-    }
-    
-    private Metadata metadata = new Metadata();
-    
-    private Metadata.Marshaller metadataMarshaller = new Metadata.Marshaller();
-    private HashBin.Marshaller<Key,Value> hashBinMarshaller = new HashBin.Marshaller<Key,Value>(this);
-    private Marshaller<Key> keyMarshaller;
-    private Marshaller<Value> valueMarshaller;
-
-    
-    /**
-     * Constructor
-     * 
-     * @param directory
-     * @param name
-     * @param indexManager
-     * @param numberOfBins
-     * @throws IOException
-     */
-    public HashIndex(PageFile pageFile, long pageId) throws IOException {
-        this.pageFile = pageFile;
-        this.pageId = pageId;
-    }
-
-    public synchronized void load(Transaction tx) throws IOException {
-        if (loaded.compareAndSet(false, true)) {
-            final Page<Metadata> metadataPage = tx.load(pageId, metadataMarshaller);
-            // Is this a brand new index?
-            if (metadataPage.getType() == Page.PAGE_FREE_TYPE) {
-                // We need to create the pages for the bins
-                Page binPage = tx.allocate(metadata.binCapacity);
-                metadata.binPageId = binPage.getPageId();
-                metadata.page = metadataPage;
-                metadataPage.set(metadata);
-                clear(tx);
-
-                // If failure happens now we can continue initializing the
-                // the hash bins...
-            } else {
-
-                metadata = metadataPage.get();
-                metadata.page = metadataPage;
-                
-                // If we did not have a clean shutdown...
-                if (metadata.state == OPEN_STATE ) {
-                    // Figure out the size and the # of bins that are
-                    // active. Yeah This loads the first page of every bin. :(
-                    // We might want to put this in the metadata page, but
-                    // then that page would be getting updated on every write.
-                    metadata.size = 0;
-                    for (int i = 0; i < metadata.binCapacity; i++) {
-                        int t = sizeOfBin(tx, i);
-                        if (t > 0) {
-                            metadata.binsActive++;
-                        }
-                        metadata.size += t;
-                    }
-                }
-            }
-
-            calcThresholds();
-
-            metadata.state = OPEN_STATE;
-            tx.store(metadataPage, metadataMarshaller, true);
-            
-            LOG.debug("HashIndex loaded. Using "+metadata.binCapacity+" bins starting at page "+metadata.binPageId);
-        }
-    }
-
-    public synchronized void unload(Transaction tx) throws IOException {
-        if (loaded.compareAndSet(true, false)) {
-            metadata.state = CLOSED_STATE;
-            tx.store(metadata.page, metadataMarshaller, true);
-        }
-    }
-
-    private int sizeOfBin(Transaction tx, int index) throws IOException {
-        return getBin(tx, index).size();
-    }
-
-    public synchronized Value get(Transaction tx, Key key) throws IOException {
-        assertLoaded();
-        return getBin(tx, key).get(key);
-    }
-    
-    public synchronized boolean containsKey(Transaction tx, Key key) throws IOException {
-        assertLoaded();
-        return getBin(tx, key).containsKey(key);
-    }
-
-    synchronized public Value put(Transaction tx, Key key, Value value) throws IOException {
-        assertLoaded();
-        HashBin<Key,Value> bin = getBin(tx, key);
-
-        int originalSize = bin.size();
-        Value result = bin.put(key,value);
-        store(tx, bin);
-
-        int newSize = bin.size();
-
-        if (newSize != originalSize) {
-            metadata.size++;
-            if (newSize == 1) {
-                metadata.binsActive++;
-            }
-        }
-
-        if (metadata.binsActive >= this.increaseThreshold) {
-            newSize = Math.min(maximumBinCapacity, metadata.binCapacity*2);
-            if(metadata.binCapacity!=newSize) {
-                resize(tx, newSize);
-            }
-        }
-        return result;
-    }
-    
-    synchronized public Value remove(Transaction tx, Key key) throws IOException {
-        assertLoaded();
-
-        HashBin<Key,Value> bin = getBin(tx, key);
-        int originalSize = bin.size();
-        Value result = bin.remove(key);
-        int newSize = bin.size();
-        
-        if (newSize != originalSize) {
-            store(tx, bin);
-
-            metadata.size--;
-            if (newSize == 0) {
-                metadata.binsActive--;
-            }
-        }
-
-        if (metadata.binsActive <= this.decreaseThreshold) {
-            newSize = Math.max(minimumBinCapacity, metadata.binCapacity/2);
-            if(metadata.binCapacity!=newSize) {
-                resize(tx, newSize);
-            }
-        }
-        return result;
-    }
-    
-
-    public synchronized void clear(Transaction tx) throws IOException {
-        assertLoaded();
-        for (int i = 0; i < metadata.binCapacity; i++) {
-            long pageId = metadata.binPageId + i;
-            clearBinAtPage(tx, pageId);
-        }
-        metadata.size = 0;
-        metadata.binsActive = 0;
-    }
-    
-    public Iterator<Entry<Key, Value>> iterator(Transaction tx) throws IOException, UnsupportedOperationException {
-        throw new UnsupportedOperationException();
-    }
-
-
-    /**
-     * @param tx
-     * @param pageId
-     * @throws IOException
-     */
-    private void clearBinAtPage(Transaction tx, long pageId) throws IOException {
-        Page<HashBin<Key,Value>> page = tx.load(pageId, null);
-        HashBin<Key, Value> bin = new HashBin<Key,Value>();
-        bin.setPage(page);
-        page.set(bin);
-        store(tx, bin);
-    }
-
-    public String toString() {
-        String str = "HashIndex" + System.identityHashCode(this) + ": " + pageFile;
-        return str;
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Implementation Methods
-    // /////////////////////////////////////////////////////////////////
-
-    private void assertLoaded() throws IllegalStateException {
-        if( !loaded.get() ) {
-            throw new IllegalStateException("The HashIndex is not loaded");
-        }
-    }
-
-    public synchronized void store(Transaction tx, HashBin<Key,Value> bin) throws IOException {
-        tx.store(bin.getPage(), hashBinMarshaller, true);
-    }
-
-    // While resizing, the following contains the new resize data.
-    
-    private void resize(Transaction tx, final int newSize) throws IOException {
-        LOG.debug("Resizing to: "+newSize);
-        
-        int resizeCapacity = newSize;
-        long resizePageId = tx.allocate(resizeCapacity).getPageId();
-
-        // In Phase 1 we copy the data to the new bins..
-        // Initialize the bins..
-        for (int i = 0; i < resizeCapacity; i++) {
-            long pageId = resizePageId + i;
-            clearBinAtPage(tx, pageId);
-        }
-
-        metadata.binsActive = 0;
-        // Copy the data from the old bins to the new bins.
-        for (int i = 0; i < metadata.binCapacity; i++) {
-            
-            HashBin<Key,Value> bin = getBin(tx, i);
-            for (Map.Entry<Key, Value> entry : bin.getAll(tx).entrySet()) {
-                HashBin<Key,Value> resizeBin = getBin(tx, entry.getKey(), resizePageId, resizeCapacity);
-                resizeBin.put(entry.getKey(), entry.getValue());
-                store(tx, resizeBin);
-                if( resizeBin.size() == 1) {
-                    metadata.binsActive++;
-                }
-            }
-        }
-        
-        // In phase 2 we free the old bins and switch the the new bins.
-        tx.free(metadata.binPageId, metadata.binCapacity);
-        
-        metadata.binCapacity = resizeCapacity;
-        metadata.binPageId = resizePageId;
-        metadata.state = OPEN_STATE;
-        tx.store(metadata.page, metadataMarshaller, true);
-        calcThresholds();
-
-        LOG.debug("Resizing done.  New bins start at: "+metadata.binPageId);        
-        resizeCapacity=0;
-        resizePageId=0;
-    }
-
-    private void calcThresholds() {
-        increaseThreshold = (metadata.binCapacity * loadFactor)/100;
-        decreaseThreshold = (metadata.binCapacity * loadFactor * loadFactor ) / 20000;
-    }
-    
-    private HashBin<Key,Value> getBin(Transaction tx, Key key) throws IOException {
-        return getBin(tx, key, metadata.binPageId, metadata.binCapacity);
-    }
-
-    private HashBin<Key,Value> getBin(Transaction tx, int i) throws IOException {
-        return getBin(tx, i, metadata.binPageId);
-    }
-    
-    private HashBin<Key,Value> getBin(Transaction tx, Key key, long basePage, int capacity) throws IOException {
-        int i = indexFor(key, capacity);
-        return getBin(tx, i, basePage);
-    }
-
-    private HashBin<Key,Value> getBin(Transaction tx, int i, long basePage) throws IOException {
-        Page<HashBin<Key, Value>> page = tx.load(basePage + i, hashBinMarshaller);
-        HashBin<Key, Value> rc = page.get();
-        rc.setPage(page);
-        return rc;
-    }
-
-    int indexFor(Key x, int length) {
-        return Math.abs(x.hashCode()%length);
-    }
-
-    // /////////////////////////////////////////////////////////////////
-    // Property Accessors
-    // /////////////////////////////////////////////////////////////////
-
-    public Marshaller<Key> getKeyMarshaller() {
-        return keyMarshaller;
-    }
-
-    /**
-     * Set the marshaller for key objects
-     * 
-     * @param marshaller
-     */
-    public synchronized void setKeyMarshaller(Marshaller<Key> marshaller) {
-        this.keyMarshaller = marshaller;
-    }
-
-    public Marshaller<Value> getValueMarshaller() {
-        return valueMarshaller;
-    }
-    /**
-     * Set the marshaller for value objects
-     * 
-     * @param marshaller
-     */
-    public void setValueMarshaller(Marshaller<Value> valueMarshaller) {
-        this.valueMarshaller = valueMarshaller;
-    }
-    
-    /**
-     * @return number of bins in the index
-     */
-    public int getBinCapacity() {
-        return metadata.binCapacity;
-    }
-
-    /**
-     * @param binCapacity
-     */
-    public void setBinCapacity(int binCapacity) {
-        if (loaded.get() && binCapacity != metadata.binCapacity) {
-            throw new RuntimeException("Pages already loaded - can't reset bin capacity");
-        }
-        metadata.binCapacity = binCapacity;
-    }
-
-    public boolean isTransient() {
-        return false;
-    }
-
-    /**
-     * @return the loadFactor
-     */
-    public int getLoadFactor() {
-        return loadFactor;
-    }
-
-    /**
-     * @param loadFactor the loadFactor to set
-     */
-    public void setLoadFactor(int loadFactor) {
-        this.loadFactor = loadFactor;
-    }
-
-    /**
-     * @return the maximumCapacity
-     */
-    public int setMaximumBinCapacity() {
-        return maximumBinCapacity;
-    }
-
-    /**
-     * @param maximumCapacity the maximumCapacity to set
-     */
-    public void setMaximumBinCapacity(int maximumCapacity) {
-        this.maximumBinCapacity = maximumCapacity;
-    }
-
-    public synchronized int size(Transaction tx) {
-        return metadata.size;
-    }
-
-    public synchronized int getActiveBins() {
-        return metadata.binsActive;
-    }
-
-    public long getBinPageId() {
-        return metadata.binPageId;
-    }
-
-    public PageFile getPageFile() {
-        return pageFile;
-    }
-
-    public int getBinsActive() {
-        return metadata.binsActive;
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/index/Index.java b/trunk/kahadb/src/main/java/org/apache/kahadb/index/Index.java
deleted file mode 100644
index 38fff30..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/index/Index.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.Marshaller;
-
-/**
- * Simpler than a Map
- * 
- * 
- */
-public interface Index<Key,Value> {
-    
-    /**
-     * Set the marshaller for key objects
-     * 
-     * @param marshaller
-     */
-    void setKeyMarshaller(Marshaller<Key> marshaller);
-    
-    /**
-     * Set the marshaller for key objects
-     * 
-     * @param marshaller
-     */
-    void setValueMarshaller(Marshaller<Value> marshaller);
-
-    /**
-     * load indexes
-     */
-    void load(Transaction tx) throws IOException;
-
-    /**
-     * unload indexes
-     * 
-     * @throws IOException
-     */
-    void unload(Transaction tx) throws IOException;
-
-    /**
-     * clear the index
-     * 
-     * @throws IOException
-     * 
-     */
-    void clear(Transaction tx) throws IOException;
-
-    /**
-     * @param key
-     * @return true if it contains the key
-     * @throws IOException
-     */
-    boolean containsKey(Transaction tx, Key key) throws IOException;
-
-    /**
-     * remove the index key
-     * 
-     * @param key
-     * @return StoreEntry removed
-     * @throws IOException
-     */
-    Value remove(Transaction tx, Key key) throws IOException;
-
-    /**
-     * store the key, item
-     * 
-     * @param key
-     * @param entry
-     * @throws IOException
-     */
-    Value put(Transaction tx, Key key, Value entry) throws IOException;
-
-    /**
-     * @param key
-     * @return the entry
-     * @throws IOException
-     */
-    Value get(Transaction tx, Key key) throws IOException;
-
-    /**
-     * @return true if the index is transient
-     */
-    boolean isTransient();
-    
-    /**
-     * @param tx
-     * @return
-     * @throws IOException
-     * @trhows UnsupportedOperationException 
-     *         if the index does not support fast iteration of the elements.
-     */
-    Iterator<Map.Entry<Key,Value>> iterator(final Transaction tx) throws IOException, UnsupportedOperationException;
-    
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java
deleted file mode 100644
index f5d9b12..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-import org.apache.kahadb.util.IOHelper;
-import org.apache.kahadb.util.LinkedNode;
-import org.apache.kahadb.util.SequenceSet;
-
-/**
- * DataFile
- * 
- * 
- */
-public class DataFile extends LinkedNode<DataFile> implements Comparable<DataFile> {
-
-    protected final File file;
-    protected final Integer dataFileId;
-    protected int length;
-    protected final SequenceSet corruptedBlocks = new SequenceSet();
-
-    DataFile(File file, int number, int preferedSize) {
-        this.file = file;
-        this.dataFileId = Integer.valueOf(number);
-        length = (int)(file.exists() ? file.length() : 0);
-    }
-    
-    public File getFile() {
-        return file;
-    }
-
-    public Integer getDataFileId() {
-        return dataFileId;
-    }
-
-    public synchronized int getLength() {
-        return length;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-
-    public synchronized void incrementLength(int size) {
-        length += size;
-    }
-
-    public synchronized String toString() {
-        return file.getName() + " number = " + dataFileId + " , length = " + length;
-    }
-
-    public synchronized RandomAccessFile openRandomAccessFile() throws IOException {
-        return new RandomAccessFile(file, "rw");
-    }
-
-    public synchronized void closeRandomAccessFile(RandomAccessFile file) throws IOException {
-        file.close();
-    }
-
-    public synchronized boolean delete() throws IOException {
-        return file.delete();
-    }
-    
-    public synchronized void move(File targetDirectory) throws IOException{
-        IOHelper.moveFile(file,targetDirectory);
-    }
-
-    public SequenceSet getCorruptedBlocks() {
-        return corruptedBlocks;
-    }
-    
-    public int compareTo(DataFile df) {
-        return dataFileId - df.dataFileId;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        boolean result = false;
-        if (o instanceof DataFile) {
-            result = compareTo((DataFile)o) == 0;
-        }
-        return result;
-    }
-
-    @Override
-    public int hashCode() {
-        return dataFileId;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java
deleted file mode 100644
index da89131..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.Map;
-
-import org.apache.kahadb.journal.DataFileAppender.WriteCommand;
-import org.apache.kahadb.journal.DataFileAppender.WriteKey;
-import org.apache.kahadb.util.ByteSequence;
-
-/**
- * Optimized Store reader and updater. Single threaded and synchronous. Use in
- * conjunction with the DataFileAccessorPool of concurrent use.
- * 
- * 
- */
-final class DataFileAccessor {
-
-    private final DataFile dataFile;
-    private final Map<WriteKey, WriteCommand> inflightWrites;
-    private final RandomAccessFile file;
-    private boolean disposed;
-
-    /**
-     * Construct a Store reader
-     * 
-     * @param fileId
-     * @throws IOException
-     */
-    public DataFileAccessor(Journal dataManager, DataFile dataFile) throws IOException {
-        this.dataFile = dataFile;
-        this.inflightWrites = dataManager.getInflightWrites();
-        this.file = dataFile.openRandomAccessFile();
-    }
-
-    public DataFile getDataFile() {
-        return dataFile;
-    }
-
-    public void dispose() {
-        if (disposed) {
-            return;
-        }
-        disposed = true;
-        try {
-            dataFile.closeRandomAccessFile(file);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public ByteSequence readRecord(Location location) throws IOException {
-
-        if (!location.isValid()) {
-            throw new IOException("Invalid location: " + location);
-        }
-
-        WriteCommand asyncWrite = (WriteCommand)inflightWrites.get(new WriteKey(location));
-        if (asyncWrite != null) {
-            return asyncWrite.data;
-        }
-
-        try {
-
-            if (location.getSize() == Location.NOT_SET) {
-                file.seek(location.getOffset());
-                location.setSize(file.readInt());
-                location.setType(file.readByte());
-            } else {
-                file.seek(location.getOffset() + Journal.RECORD_HEAD_SPACE);
-            }
-
-            byte[] data = new byte[location.getSize() - Journal.RECORD_HEAD_SPACE];
-            file.readFully(data);
-            return new ByteSequence(data, 0, data.length);
-
-        } catch (RuntimeException e) {
-            throw new IOException("Invalid location: " + location + ", : " + e);
-        }
-    }
-    
-    public void readFully(long offset, byte data[]) throws IOException {
-       file.seek(offset);
-       file.readFully(data);
-    }
-
-    public int read(long offset, byte data[]) throws IOException {
-       file.seek(offset);
-       return file.read(data);
-    }
-
-    public void readLocationDetails(Location location) throws IOException {
-        WriteCommand asyncWrite = (WriteCommand)inflightWrites.get(new WriteKey(location));
-        if (asyncWrite != null) {
-            location.setSize(asyncWrite.location.getSize());
-            location.setType(asyncWrite.location.getType());
-        } else {
-            file.seek(location.getOffset());
-            location.setSize(file.readInt());
-            location.setType(file.readByte());
-        }
-    }
-
-//    public boolean readLocationDetailsAndValidate(Location location) {
-//        try {
-//            WriteCommand asyncWrite = (WriteCommand)inflightWrites.get(new WriteKey(location));
-//            if (asyncWrite != null) {
-//                location.setSize(asyncWrite.location.getSize());
-//                location.setType(asyncWrite.location.getType());
-//            } else {
-//                file.seek(location.getOffset());
-//                location.setSize(file.readInt());
-//                location.setType(file.readByte());
-//
-//                byte data[] = new byte[3];
-//                file.seek(location.getOffset() + Journal.ITEM_HEAD_OFFSET_TO_SOR);
-//                file.readFully(data);
-//                if (data[0] != Journal.ITEM_HEAD_SOR[0]
-//                    || data[1] != Journal.ITEM_HEAD_SOR[1]
-//                    || data[2] != Journal.ITEM_HEAD_SOR[2]) {
-//                    return false;
-//                }
-//                file.seek(location.getOffset() + location.getSize() - Journal.ITEM_FOOT_SPACE);
-//                file.readFully(data);
-//                if (data[0] != Journal.ITEM_HEAD_EOR[0]
-//                    || data[1] != Journal.ITEM_HEAD_EOR[1]
-//                    || data[2] != Journal.ITEM_HEAD_EOR[2]) {
-//                    return false;
-//                }
-//            }
-//        } catch (IOException e) {
-//            return false;
-//        }
-//        return true;
-//    }
-
-    public void updateRecord(Location location, ByteSequence data, boolean sync) throws IOException {
-
-        file.seek(location.getOffset() + Journal.RECORD_HEAD_SPACE);
-        int size = Math.min(data.getLength(), location.getSize());
-        file.write(data.getData(), data.getOffset(), size);
-        if (sync) {
-            file.getFD().sync();
-        }
-
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessorPool.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessorPool.java
deleted file mode 100644
index 276dd81..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessorPool.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Used to pool DataFileAccessors.
- * 
- * @author chirino
- */
-public class DataFileAccessorPool {
-
-    private final Journal journal;
-    private final Map<Integer, Pool> pools = new HashMap<Integer, Pool>();
-    private boolean closed;
-    private int maxOpenReadersPerFile = 5;
-
-    class Pool {
-
-        private final DataFile file;
-        private final List<DataFileAccessor> pool = new ArrayList<DataFileAccessor>();
-        private boolean used;
-        private int openCounter;
-        private boolean disposed;
-
-        public Pool(DataFile file) {
-            this.file = file;
-        }
-
-        public DataFileAccessor openDataFileReader() throws IOException {
-            DataFileAccessor rc = null;
-            if (pool.isEmpty()) {
-                rc = new DataFileAccessor(journal, file);
-            } else {
-                rc = pool.remove(pool.size() - 1);
-            }
-            used = true;
-            openCounter++;
-            return rc;
-        }
-
-        public synchronized void closeDataFileReader(DataFileAccessor reader) {
-            openCounter--;
-            if (pool.size() >= maxOpenReadersPerFile || disposed) {
-                reader.dispose();
-            } else {
-                pool.add(reader);
-            }
-        }
-
-        public synchronized void clearUsedMark() {
-            used = false;
-        }
-
-        public synchronized boolean isUsed() {
-            return used;
-        }
-
-        public synchronized void dispose() {
-            for (DataFileAccessor reader : pool) {
-                reader.dispose();
-            }
-            pool.clear();
-            disposed = true;
-        }
-
-        public synchronized int getOpenCounter() {
-            return openCounter;
-        }
-
-    }
-
-    public DataFileAccessorPool(Journal dataManager) {
-        this.journal = dataManager;
-    }
-
-    synchronized void clearUsedMark() {
-        for (Iterator<Pool> iter = pools.values().iterator(); iter.hasNext();) {
-            Pool pool = iter.next();
-            pool.clearUsedMark();
-        }
-    }
-
-    synchronized void disposeUnused() {
-        for (Iterator<Pool> iter = pools.values().iterator(); iter.hasNext();) {
-            Pool pool = iter.next();
-            if (!pool.isUsed()) {
-                pool.dispose();
-                iter.remove();
-            }
-        }
-    }
-
-    synchronized void disposeDataFileAccessors(DataFile dataFile) {
-        if (closed) {
-            throw new IllegalStateException("Closed.");
-        }
-        Pool pool = pools.get(dataFile.getDataFileId());
-        if (pool != null) {
-            if (pool.getOpenCounter() == 0) {
-                pool.dispose();
-                pools.remove(dataFile.getDataFileId());
-            } else {
-                throw new IllegalStateException("The data file is still in use: " + dataFile + ", use count: " + pool.getOpenCounter());
-            }
-        }
-    }
-
-    synchronized DataFileAccessor openDataFileAccessor(DataFile dataFile) throws IOException {
-        if (closed) {
-            throw new IOException("Closed.");
-        }
-
-        Pool pool = pools.get(dataFile.getDataFileId());
-        if (pool == null) {
-            pool = new Pool(dataFile);
-            pools.put(dataFile.getDataFileId(), pool);
-        }
-        return pool.openDataFileReader();
-    }
-
-    synchronized void closeDataFileAccessor(DataFileAccessor reader) {
-        Pool pool = pools.get(reader.getDataFile().getDataFileId());
-        if (pool == null || closed) {
-            reader.dispose();
-        } else {
-            pool.closeDataFileReader(reader);
-        }
-    }
-
-    public synchronized void close() {
-        if (closed) {
-            return;
-        }
-        closed = true;
-        for (Iterator<Pool> iter = pools.values().iterator(); iter.hasNext();) {
-            Pool pool = iter.next();
-            pool.dispose();
-        }
-        pools.clear();
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
deleted file mode 100644
index 63cce00..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.RandomAccessFile;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.zip.Adler32;
-import java.util.zip.Checksum;
-
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.DataByteArrayOutputStream;
-import org.apache.kahadb.util.LinkedNode;
-import org.apache.kahadb.util.LinkedNodeList;
-
-/**
- * An optimized writer to do batch appends to a data file. This object is thread
- * safe and gains throughput as you increase the number of concurrent writes it
- * does.
- * 
- * 
- */
-class DataFileAppender {
-
-    protected final Journal journal;
-    protected final Map<WriteKey, WriteCommand> inflightWrites;
-    protected final Object enqueueMutex = new Object() {
-    };
-    protected WriteBatch nextWriteBatch;
-
-    protected boolean shutdown;
-    protected IOException firstAsyncException;
-    protected final CountDownLatch shutdownDone = new CountDownLatch(1);
-    protected int maxWriteBatchSize;
-
-    private boolean running;
-    private Thread thread;
-
-    public static class WriteKey {
-        private final int file;
-        private final long offset;
-        private final int hash;
-
-        public WriteKey(Location item) {
-            file = item.getDataFileId();
-            offset = item.getOffset();
-            // TODO: see if we can build a better hash
-            hash = (int)(file ^ offset);
-        }
-
-        public int hashCode() {
-            return hash;
-        }
-
-        public boolean equals(Object obj) {
-            if (obj instanceof WriteKey) {
-                WriteKey di = (WriteKey)obj;
-                return di.file == file && di.offset == offset;
-            }
-            return false;
-        }
-    }
-
-    public class WriteBatch {
-
-        public final DataFile dataFile;
-
-        public final LinkedNodeList<WriteCommand> writes = new LinkedNodeList<WriteCommand>();
-        public final CountDownLatch latch = new CountDownLatch(1);
-		private final int offset;
-        public int size = Journal.BATCH_CONTROL_RECORD_SIZE;
-        public AtomicReference<IOException> exception = new AtomicReference<IOException>();
-
-        public WriteBatch(DataFile dataFile, int offset, WriteCommand write) throws IOException {
-            this.dataFile = dataFile;
-			this.offset = offset;
-            this.dataFile.incrementLength(Journal.BATCH_CONTROL_RECORD_SIZE);
-            this.size=Journal.BATCH_CONTROL_RECORD_SIZE;
-            journal.addToTotalLength(Journal.BATCH_CONTROL_RECORD_SIZE);
-            append(write);
-        }
-
-        public boolean canAppend(WriteCommand write) {
-            int newSize = size + write.location.getSize();
-			if (newSize >= maxWriteBatchSize || offset+newSize > journal.getMaxFileLength() ) {
-                return false;
-            }
-            return true;
-        }
-
-        public void append(WriteCommand write) throws IOException {
-            this.writes.addLast(write);
-            write.location.setDataFileId(dataFile.getDataFileId());
-            write.location.setOffset(offset+size);
-            int s = write.location.getSize();
-			size += s;
-            dataFile.incrementLength(s);
-            journal.addToTotalLength(s);
-        }
-    }
-
-    public static class WriteCommand extends LinkedNode<WriteCommand> {
-        public final Location location;
-        public final ByteSequence data;
-        final boolean sync;
-        public final Runnable onComplete;
-
-        public WriteCommand(Location location, ByteSequence data, boolean sync) {
-            this.location = location;
-            this.data = data;
-            this.sync = sync;
-            this.onComplete = null;
-        }
-
-        public WriteCommand(Location location, ByteSequence data, Runnable onComplete) {
-            this.location = location;
-            this.data = data;
-            this.onComplete = onComplete;
-            this.sync = false;
-        }
-    }
-
-    /**
-     * Construct a Store writer
-     */
-    public DataFileAppender(Journal dataManager) {
-        this.journal = dataManager;
-        this.inflightWrites = this.journal.getInflightWrites();
-        this.maxWriteBatchSize = this.journal.getWriteBatchSize();
-    }
-
-    public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException {
-    	
-        // Write the packet our internal buffer.
-        int size = data.getLength() + Journal.RECORD_HEAD_SPACE;
-
-        final Location location = new Location();
-        location.setSize(size);
-        location.setType(type);
-
-        WriteCommand write = new WriteCommand(location, data, sync);
-
-        WriteBatch batch = enqueue(write);
-        location.setLatch(batch.latch);
-        if (sync) {
-            try {
-                batch.latch.await();
-            } catch (InterruptedException e) {
-                throw new InterruptedIOException();
-            }
-            IOException exception = batch.exception.get(); 
-            if (exception != null) {
-            	throw exception;
-            }
-        }	
-
-        return location;
-    }
-
-    public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException {
-        // Write the packet our internal buffer.
-        int size = data.getLength() + Journal.RECORD_HEAD_SPACE;
-
-        final Location location = new Location();
-        location.setSize(size);
-        location.setType(type);
-
-        WriteCommand write = new WriteCommand(location, data, onComplete);
-
-        WriteBatch batch = enqueue(write);
- 
-        location.setLatch(batch.latch);
-        return location;
-    }
-
-    private WriteBatch enqueue(WriteCommand write) throws IOException {
-        synchronized (enqueueMutex) {
-            if (shutdown) {
-                throw new IOException("Async Writter Thread Shutdown");
-            }
-            
-            if (!running) {
-                running = true;
-                thread = new Thread() {
-                    public void run() {
-                        processQueue();
-                    }
-                };
-                thread.setPriority(Thread.MAX_PRIORITY);
-                thread.setDaemon(true);
-                thread.setName("ActiveMQ Data File Writer");
-                thread.start();
-                firstAsyncException = null;
-            }
-            
-            if (firstAsyncException != null) {
-                throw firstAsyncException;
-            }
-
-            while ( true ) {
-	            if (nextWriteBatch == null) {
-	            	DataFile file = journal.getCurrentWriteFile();
-	            	if( file.getLength() > journal.getMaxFileLength() ) {
-	            		file = journal.rotateWriteFile();
-	            	}
-	            	
-	                nextWriteBatch = new WriteBatch(file, file.getLength(), write);
-	                enqueueMutex.notifyAll();
-	                break;
-	            } else {
-	                // Append to current batch if possible..
-	                if (nextWriteBatch.canAppend(write)) {
-	                    nextWriteBatch.append(write);
-	                    break;
-	                } else {
-	                    // Otherwise wait for the queuedCommand to be null
-	                    try {
-	                        while (nextWriteBatch != null) {
-	                            final long start = System.currentTimeMillis();
-	                            enqueueMutex.wait();
-	                            if (maxStat > 0) { 
-	                                System.err.println("Watiting for write to finish with full batch... millis: " + (System.currentTimeMillis() - start));
-	                            }
-	                        }
-	                    } catch (InterruptedException e) {
-	                        throw new InterruptedIOException();
-	                    }
-	                    if (shutdown) {
-	                        throw new IOException("Async Writter Thread Shutdown");
-	                    }
-	                }
-	            }
-            }
-            if (!write.sync) {
-                inflightWrites.put(new WriteKey(write.location), write);
-            }
-            return nextWriteBatch;
-        }
-    }
-
-    public void close() throws IOException {
-        synchronized (enqueueMutex) {
-            if (!shutdown) {
-                shutdown = true;
-                if (running) {
-                    enqueueMutex.notifyAll();
-                } else {
-                    shutdownDone.countDown();
-                }
-            }
-        }
-
-        try {
-            shutdownDone.await();
-        } catch (InterruptedException e) {
-            throw new InterruptedIOException();
-        }
-
-    }
-
-    public static final String PROPERTY_LOG_WRITE_STAT_WINDOW = "org.apache.kahadb.journal.appender.WRITE_STAT_WINDOW";
-    public static final int maxStat = Integer.parseInt(System.getProperty(PROPERTY_LOG_WRITE_STAT_WINDOW, "0"));
-    int statIdx = 0;
-    int[] stats = new int[maxStat];
-    /**
-     * The async processing loop that writes to the data files and does the
-     * force calls. Since the file sync() call is the slowest of all the
-     * operations, this algorithm tries to 'batch' or group together several
-     * file sync() requests into a single file sync() call. The batching is
-     * accomplished attaching the same CountDownLatch instance to every force
-     * request in a group.
-     */
-    protected void processQueue() {
-        DataFile dataFile = null;
-        RandomAccessFile file = null;
-        WriteBatch wb = null;
-        try {
-
-            DataByteArrayOutputStream buff = new DataByteArrayOutputStream(maxWriteBatchSize);
-            while (true) {
-
-                Object o = null;
-
-                // Block till we get a command.
-                synchronized (enqueueMutex) {
-                    while (true) {
-                        if (nextWriteBatch != null) {
-                            o = nextWriteBatch;
-                            nextWriteBatch = null;
-                            break;
-                        }
-                        if (shutdown) {
-                            return;
-                        }
-                        enqueueMutex.wait();
-                    }
-                    enqueueMutex.notifyAll();
-                }
-
-                wb = (WriteBatch)o;
-                if (dataFile != wb.dataFile) {
-                    if (file != null) {
-                        file.setLength(dataFile.getLength());
-                        dataFile.closeRandomAccessFile(file);
-                    }
-                    dataFile = wb.dataFile;
-                    file = dataFile.openRandomAccessFile();
-                    if( file.length() < journal.preferedFileLength ) {
-                        file.setLength(journal.preferedFileLength);
-                    }
-                }
-
-                WriteCommand write = wb.writes.getHead();
-
-                // Write an empty batch control record.
-                buff.reset();
-                buff.writeInt(Journal.BATCH_CONTROL_RECORD_SIZE);
-                buff.writeByte(Journal.BATCH_CONTROL_RECORD_TYPE);
-                buff.write(Journal.BATCH_CONTROL_RECORD_MAGIC);
-                buff.writeInt(0);
-                buff.writeLong(0);
-                
-                boolean forceToDisk = false;
-                while (write != null) {
-                    forceToDisk |= write.sync | write.onComplete != null;
-                    buff.writeInt(write.location.getSize());
-                    buff.writeByte(write.location.getType());
-                    buff.write(write.data.getData(), write.data.getOffset(), write.data.getLength());
-                    write = write.getNext();
-                }
-
-                ByteSequence sequence = buff.toByteSequence();
-                
-                // Now we can fill in the batch control record properly. 
-                buff.reset();
-                buff.skip(5+Journal.BATCH_CONTROL_RECORD_MAGIC.length);
-                buff.writeInt(sequence.getLength()-Journal.BATCH_CONTROL_RECORD_SIZE);
-                if( journal.isChecksum() ) {
-	                Checksum checksum = new Adler32();
-	                checksum.update(sequence.getData(), sequence.getOffset()+Journal.BATCH_CONTROL_RECORD_SIZE, sequence.getLength()-Journal.BATCH_CONTROL_RECORD_SIZE);
-	                buff.writeLong(checksum.getValue());
-                }
-
-                // Now do the 1 big write.
-                file.seek(wb.offset);
-                if (maxStat > 0) {
-                    if (statIdx < maxStat) {
-                        stats[statIdx++] = sequence.getLength();
-                    } else {
-                        long all = 0;
-                        for (;statIdx > 0;) {
-                            all+= stats[--statIdx];
-                        }
-                        System.err.println("Ave writeSize: " + all/maxStat);
-                    }
-                }
-                file.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
-                
-                ReplicationTarget replicationTarget = journal.getReplicationTarget();
-                if( replicationTarget!=null ) {
-                	replicationTarget.replicate(wb.writes.getHead().location, sequence, forceToDisk);
-                }
-                
-                if (forceToDisk) {
-                    file.getFD().sync();
-                }
-
-                WriteCommand lastWrite = wb.writes.getTail();
-                journal.setLastAppendLocation(lastWrite.location);
-
-                // Now that the data is on disk, remove the writes from the in
-                // flight
-                // cache.
-                write = wb.writes.getHead();
-                while (write != null) {
-                    if (!write.sync) {
-                        inflightWrites.remove(new WriteKey(write.location));
-                    }
-                    if (write.onComplete != null) {
-                        try {
-                            write.onComplete.run();
-                        } catch (Throwable e) {
-                            e.printStackTrace();
-                        }
-                    }
-                    write = write.getNext();
-                }
-
-                // Signal any waiting threads that the write is on disk.
-                wb.latch.countDown();
-            }
-        } catch (IOException e) {
-            synchronized (enqueueMutex) {
-                firstAsyncException = e;
-                if (wb != null) {
-                    wb.exception.set(e);
-                    wb.latch.countDown();
-                }
-                if (nextWriteBatch != null) {
-                    nextWriteBatch.exception.set(e);
-                    nextWriteBatch.latch.countDown();
-                }
-            }
-        } catch (InterruptedException e) {
-        } finally {
-            try {
-                if (file != null) {
-                    dataFile.closeRandomAccessFile(file);
-                }
-            } catch (Throwable ignore) {
-            }
-            shutdownDone.countDown();
-            running = false;
-        }
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java
deleted file mode 100644
index d3854dc..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java
+++ /dev/null
@@ -1,751 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.TreeMap;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.zip.Adler32;
-import java.util.zip.Checksum;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.journal.DataFileAppender.WriteCommand;
-import org.apache.kahadb.journal.DataFileAppender.WriteKey;
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.DataByteArrayInputStream;
-import org.apache.kahadb.util.DataByteArrayOutputStream;
-import org.apache.kahadb.util.LinkedNodeList;
-import org.apache.kahadb.util.SchedulerTimerTask;
-import org.apache.kahadb.util.Sequence;
-
-/**
- * Manages DataFiles
- * 
- * 
- */
-public class Journal {
-
-    private static final int MAX_BATCH_SIZE = 32*1024*1024;
-
-	// ITEM_HEAD_SPACE = length + type+ reserved space + SOR
-    public static final int RECORD_HEAD_SPACE = 4 + 1;
-    
-    public static final byte USER_RECORD_TYPE = 1;
-    public static final byte BATCH_CONTROL_RECORD_TYPE = 2;
-    // Batch Control Item holds a 4 byte size of the batch and a 8 byte checksum of the batch. 
-    public static final byte[] BATCH_CONTROL_RECORD_MAGIC = bytes("WRITE BATCH");
-    public static final int BATCH_CONTROL_RECORD_SIZE = RECORD_HEAD_SPACE+BATCH_CONTROL_RECORD_MAGIC.length+4+8;
-    public static final byte[] BATCH_CONTROL_RECORD_HEADER = createBatchControlRecordHeader();
-
-    private static byte[] createBatchControlRecordHeader() {
-        try {
-            DataByteArrayOutputStream os = new DataByteArrayOutputStream();
-            os.writeInt(BATCH_CONTROL_RECORD_SIZE);
-            os.writeByte(BATCH_CONTROL_RECORD_TYPE);
-            os.write(BATCH_CONTROL_RECORD_MAGIC);
-            ByteSequence sequence = os.toByteSequence();
-            sequence.compact();
-            return sequence.getData();
-        } catch (IOException e) {
-            throw new RuntimeException("Could not create batch control record header.");
-        }
-    }
-
-    public static final String DEFAULT_DIRECTORY = ".";
-    public static final String DEFAULT_ARCHIVE_DIRECTORY = "data-archive";
-    public static final String DEFAULT_FILE_PREFIX = "db-";
-    public static final String DEFAULT_FILE_SUFFIX = ".log";
-    public static final int DEFAULT_MAX_FILE_LENGTH = 1024 * 1024 * 32;
-    public static final int DEFAULT_CLEANUP_INTERVAL = 1000 * 30;
-    public static final int PREFERED_DIFF = 1024 * 512;
-    public static final int DEFAULT_MAX_WRITE_BATCH_SIZE = 1024 * 1024 * 4;
-    
-    private static final Logger LOG = LoggerFactory.getLogger(Journal.class);
-
-    protected final Map<WriteKey, WriteCommand> inflightWrites = new ConcurrentHashMap<WriteKey, WriteCommand>();
-
-    protected File directory = new File(DEFAULT_DIRECTORY);
-    protected File directoryArchive = new File(DEFAULT_ARCHIVE_DIRECTORY);
-    protected String filePrefix = DEFAULT_FILE_PREFIX;
-    protected String fileSuffix = DEFAULT_FILE_SUFFIX;
-    protected boolean started;
-    
-    protected int maxFileLength = DEFAULT_MAX_FILE_LENGTH;
-    protected int preferedFileLength = DEFAULT_MAX_FILE_LENGTH - PREFERED_DIFF;
-    protected int writeBatchSize = DEFAULT_MAX_WRITE_BATCH_SIZE;
-    
-    protected DataFileAppender appender;
-    protected DataFileAccessorPool accessorPool;
-
-    protected Map<Integer, DataFile> fileMap = new HashMap<Integer, DataFile>();
-    protected Map<File, DataFile> fileByFileMap = new LinkedHashMap<File, DataFile>();
-    protected LinkedNodeList<DataFile> dataFiles = new LinkedNodeList<DataFile>();
-
-    protected final AtomicReference<Location> lastAppendLocation = new AtomicReference<Location>();
-    protected Runnable cleanupTask;
-    protected AtomicLong totalLength = new AtomicLong();
-    protected boolean archiveDataLogs;
-	private ReplicationTarget replicationTarget;
-    protected boolean checksum;
-    protected boolean checkForCorruptionOnStartup;
-    private Timer timer;
-   
-
-    public synchronized void start() throws IOException {
-        if (started) {
-            return;
-        }
-        
-        long start = System.currentTimeMillis();
-        accessorPool = new DataFileAccessorPool(this);
-        started = true;
-        preferedFileLength = Math.max(PREFERED_DIFF, getMaxFileLength() - PREFERED_DIFF);
-
-        appender = new DataFileAppender(this);
-
-        File[] files = directory.listFiles(new FilenameFilter() {
-            public boolean accept(File dir, String n) {
-                return dir.equals(directory) && n.startsWith(filePrefix) && n.endsWith(fileSuffix);
-            }
-        });
-
-        if (files != null) {
-            for (int i = 0; i < files.length; i++) {
-                try {
-                    File file = files[i];
-                    String n = file.getName();
-                    String numStr = n.substring(filePrefix.length(), n.length()-fileSuffix.length());
-                    int num = Integer.parseInt(numStr);
-                    DataFile dataFile = new DataFile(file, num, preferedFileLength);
-                    fileMap.put(dataFile.getDataFileId(), dataFile);
-                    totalLength.addAndGet(dataFile.getLength());
-                } catch (NumberFormatException e) {
-                    // Ignore file that do not match the pattern.
-                }
-            }
-
-            // Sort the list so that we can link the DataFiles together in the
-            // right order.
-            List<DataFile> l = new ArrayList<DataFile>(fileMap.values());
-            Collections.sort(l);
-            for (DataFile df : l) {
-                if (df.getLength() == 0) {
-                    // possibly the result of a previous failed write
-                    LOG.info("ignoring zero length, partially initialised journal data file: " + df);
-                    continue;
-                }
-                dataFiles.addLast(df);
-                fileByFileMap.put(df.getFile(), df);
-
-                if( isCheckForCorruptionOnStartup() ) {
-                    lastAppendLocation.set(recoveryCheck(df));
-                }
-            }
-        }
-
-    	getCurrentWriteFile();
-
-        if( lastAppendLocation.get()==null ) {
-            DataFile df = dataFiles.getTail();
-            lastAppendLocation.set(recoveryCheck(df));
-        }
-
-        cleanupTask = new Runnable() {
-            public void run() {
-                cleanup();
-            }
-        };
-        this.timer = new Timer("KahaDB Scheduler", true);
-        TimerTask task = new SchedulerTimerTask(cleanupTask);
-        this.timer.scheduleAtFixedRate(task, DEFAULT_CLEANUP_INTERVAL,DEFAULT_CLEANUP_INTERVAL);
-        long end = System.currentTimeMillis();
-        LOG.trace("Startup took: "+(end-start)+" ms");
-    }
-
-    private static byte[] bytes(String string) {
-    	try {
-			return string.getBytes("UTF-8");
-		} catch (UnsupportedEncodingException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-	protected Location recoveryCheck(DataFile dataFile) throws IOException {
-        Location location = new Location();
-        location.setDataFileId(dataFile.getDataFileId());
-        location.setOffset(0);
-
-    	DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-        try {
-            while( true ) {
-                int size = checkBatchRecord(reader, location.getOffset());
-                if ( size>=0 ) {
-                    location.setOffset(location.getOffset()+BATCH_CONTROL_RECORD_SIZE+size);
-                } else {
-
-                    // Perhaps it's just some corruption... scan through the file to find the next valid batch record.  We
-                    // may have subsequent valid batch records.
-                    int nextOffset = findNextBatchRecord(reader, location.getOffset()+1);
-                    if( nextOffset >=0 ) {
-                        Sequence sequence = new Sequence(location.getOffset(), nextOffset - 1);
-                        LOG.info("Corrupt journal records found in '"+dataFile.getFile()+"' between offsets: "+sequence);
-                        dataFile.corruptedBlocks.add(sequence);
-                        location.setOffset(nextOffset);
-                    } else {
-                        break;
-                    }
-                }
-            }
-            
-        } catch (IOException e) {
-		} finally {
-            accessorPool.closeDataFileAccessor(reader);
-        }
-
-        int existingLen = dataFile.getLength();
-        dataFile.setLength(location.getOffset());
-        if (existingLen > dataFile.getLength()) {
-            totalLength.addAndGet(dataFile.getLength() - existingLen);
-        }
-
-        if( !dataFile.corruptedBlocks.isEmpty() ) {
-            // Is the end of the data file corrupted?
-            if( dataFile.corruptedBlocks.getTail().getLast()+1 == location.getOffset() ) {
-                dataFile.setLength((int) dataFile.corruptedBlocks.removeLastSequence().getFirst());
-            }
-        }
-
-        return location;
-    }
-
-    private int findNextBatchRecord(DataFileAccessor reader, int offset) throws IOException {
-        ByteSequence header = new ByteSequence(BATCH_CONTROL_RECORD_HEADER);
-        byte data[] = new byte[1024*4];
-        ByteSequence bs = new ByteSequence(data, 0, reader.read(offset, data));
-
-        int pos = 0;
-        while( true ) {
-            pos = bs.indexOf(header, pos);
-            if( pos >= 0 ) {
-                return offset+pos;
-            } else {
-                // need to load the next data chunck in..
-                if( bs.length != data.length ) {
-                    // If we had a short read then we were at EOF
-                    return -1;
-                }
-                offset += bs.length-BATCH_CONTROL_RECORD_HEADER.length;
-                bs = new ByteSequence(data, 0, reader.read(offset, data));
-                pos=0;
-            }
-        }
-    }
-
-
-    public int checkBatchRecord(DataFileAccessor reader, int offset) throws IOException {
-        byte controlRecord[] = new byte[BATCH_CONTROL_RECORD_SIZE];
-        DataByteArrayInputStream controlIs = new DataByteArrayInputStream(controlRecord);
-
-        reader.readFully(offset, controlRecord);
-
-        // Assert that it's  a batch record.
-        for( int i=0; i < BATCH_CONTROL_RECORD_HEADER.length; i++ ) {
-            if( controlIs.readByte() != BATCH_CONTROL_RECORD_HEADER[i] ) {
-                return -1;
-            }
-        }
-
-        int size = controlIs.readInt();
-        if( size > MAX_BATCH_SIZE ) {
-            return -1;
-        }
-
-        if( isChecksum() ) {
-
-            long expectedChecksum = controlIs.readLong();
-            if( expectedChecksum == 0 ) {
-                // Checksuming was not enabled when the record was stored.
-                // we can't validate the record :(
-                return size;
-            }
-
-            byte data[] = new byte[size];
-            reader.readFully(offset+BATCH_CONTROL_RECORD_SIZE, data);
-
-            Checksum checksum = new Adler32();
-            checksum.update(data, 0, data.length);
-
-            if( expectedChecksum!=checksum.getValue() ) {
-                return -1;
-            }
-
-        }
-        return size;
-    }
-
-
-	void addToTotalLength(int size) {
-		totalLength.addAndGet(size);
-	}
-    
-    
-    synchronized DataFile getCurrentWriteFile() throws IOException {
-        if (dataFiles.isEmpty()) {
-            rotateWriteFile();
-        }
-        return dataFiles.getTail();
-    }
-
-    synchronized DataFile rotateWriteFile() {
-		int nextNum = !dataFiles.isEmpty() ? dataFiles.getTail().getDataFileId().intValue() + 1 : 1;
-		File file = getFile(nextNum);
-		DataFile nextWriteFile = new DataFile(file, nextNum, preferedFileLength);
-		// actually allocate the disk space
-		fileMap.put(nextWriteFile.getDataFileId(), nextWriteFile);
-		fileByFileMap.put(file, nextWriteFile);
-		dataFiles.addLast(nextWriteFile);
-		return nextWriteFile;
-	}
-
-	public File getFile(int nextNum) {
-		String fileName = filePrefix + nextNum + fileSuffix;
-		File file = new File(directory, fileName);
-		return file;
-	}
-
-    synchronized DataFile getDataFile(Location item) throws IOException {
-        Integer key = Integer.valueOf(item.getDataFileId());
-        DataFile dataFile = fileMap.get(key);
-        if (dataFile == null) {
-            LOG.error("Looking for key " + key + " but not found in fileMap: " + fileMap);
-            throw new IOException("Could not locate data file " + getFile(item.getDataFileId()));
-        }
-        return dataFile;
-    }
-
-    synchronized File getFile(Location item) throws IOException {
-        Integer key = Integer.valueOf(item.getDataFileId());
-        DataFile dataFile = fileMap.get(key);
-        if (dataFile == null) {
-            LOG.error("Looking for key " + key + " but not found in fileMap: " + fileMap);
-            throw new IOException("Could not locate data file " + getFile(item.getDataFileId()));
-        }
-        return dataFile.getFile();
-    }
-
-    private DataFile getNextDataFile(DataFile dataFile) {
-        return dataFile.getNext();
-    }
-
-    public synchronized void close() throws IOException {
-        if (!started) {
-            return;
-        }
-        if (this.timer != null) {
-            this.timer.cancel();
-        }
-        accessorPool.close();
-        appender.close();
-        fileMap.clear();
-        fileByFileMap.clear();
-        dataFiles.clear();
-        lastAppendLocation.set(null);
-        started = false;
-    }
-
-    synchronized void cleanup() {
-        if (accessorPool != null) {
-            accessorPool.disposeUnused();
-        }
-    }
-
-    public synchronized boolean delete() throws IOException {
-
-        // Close all open file handles...
-        appender.close();
-        accessorPool.close();
-
-        boolean result = true;
-        for (Iterator<DataFile> i = fileMap.values().iterator(); i.hasNext();) {
-            DataFile dataFile = i.next();
-            totalLength.addAndGet(-dataFile.getLength());
-            result &= dataFile.delete();
-        }
-        fileMap.clear();
-        fileByFileMap.clear();
-        lastAppendLocation.set(null);
-        dataFiles = new LinkedNodeList<DataFile>();
-
-        // reopen open file handles...
-        accessorPool = new DataFileAccessorPool(this);
-        appender = new DataFileAppender(this);
-        return result;
-    }
-
-    public synchronized void removeDataFiles(Set<Integer> files) throws IOException {
-        for (Integer key : files) {
-            // Can't remove the data file (or subsequent files) that is currently being written to.
-        	if( key >= lastAppendLocation.get().getDataFileId() ) {
-        		continue;
-        	}
-            DataFile dataFile = fileMap.get(key);
-            if( dataFile!=null ) {
-            	forceRemoveDataFile(dataFile);
-            }
-        }
-    }
-
-    private synchronized void forceRemoveDataFile(DataFile dataFile) throws IOException {
-        accessorPool.disposeDataFileAccessors(dataFile);
-        fileByFileMap.remove(dataFile.getFile());
-        fileMap.remove(dataFile.getDataFileId());
-        totalLength.addAndGet(-dataFile.getLength());
-        dataFile.unlink();
-        if (archiveDataLogs) {
-            dataFile.move(getDirectoryArchive());
-            LOG.debug("moved data file " + dataFile + " to " + getDirectoryArchive());
-        } else {
-            if ( dataFile.delete() ) {
-            	LOG.debug("Discarded data file " + dataFile);
-            } else {
-            	LOG.warn("Failed to discard data file " + dataFile.getFile());
-            }
-        }
-    }
-
-    /**
-     * @return the maxFileLength
-     */
-    public int getMaxFileLength() {
-        return maxFileLength;
-    }
-
-    /**
-     * @param maxFileLength the maxFileLength to set
-     */
-    public void setMaxFileLength(int maxFileLength) {
-        this.maxFileLength = maxFileLength;
-    }
-
-    @Override
-    public String toString() {
-        return directory.toString();
-    }
-
-	public synchronized void appendedExternally(Location loc, int length) throws IOException {
-		DataFile dataFile = null;
-		if( dataFiles.getTail().getDataFileId() == loc.getDataFileId() ) {
-			// It's an update to the current log file..
-			dataFile = dataFiles.getTail();
-			dataFile.incrementLength(length);
-		} else if( dataFiles.getTail().getDataFileId()+1 == loc.getDataFileId() ) {
-			// It's an update to the next log file.
-            int nextNum = loc.getDataFileId();
-            File file = getFile(nextNum);
-            dataFile = new DataFile(file, nextNum, preferedFileLength);
-            // actually allocate the disk space
-            fileMap.put(dataFile.getDataFileId(), dataFile);
-            fileByFileMap.put(file, dataFile);
-            dataFiles.addLast(dataFile);
-		} else {
-			throw new IOException("Invalid external append.");
-		}
-	}
-
-    public synchronized Location getNextLocation(Location location) throws IOException, IllegalStateException {
-
-        Location cur = null;
-        while (true) {
-            if (cur == null) {
-                if (location == null) {
-                    DataFile head = dataFiles.getHead();
-                    if( head == null ) {
-                    	return null;
-                    }
-                    cur = new Location();
-                    cur.setDataFileId(head.getDataFileId());
-                    cur.setOffset(0);
-                } else {
-                    // Set to the next offset..
-                    if (location.getSize() == -1) {
-                        cur = new Location(location);
-                    } else {
-                        cur = new Location(location);
-                        cur.setOffset(location.getOffset() + location.getSize());
-                    }
-                }
-            } else {
-                cur.setOffset(cur.getOffset() + cur.getSize());
-            }
-
-            DataFile dataFile = getDataFile(cur);
-
-            // Did it go into the next file??
-            if (dataFile.getLength() <= cur.getOffset()) {
-                dataFile = getNextDataFile(dataFile);
-                if (dataFile == null) {
-                    return null;
-                } else {
-                    cur.setDataFileId(dataFile.getDataFileId().intValue());
-                    cur.setOffset(0);
-                }
-            }
-
-            // Load in location size and type.
-            DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-            try {
-				reader.readLocationDetails(cur);
-            } finally {
-                accessorPool.closeDataFileAccessor(reader);
-            }
-
-            if (cur.getType() == 0) {
-                return null;
-            } else if (cur.getType() == USER_RECORD_TYPE) {
-                // Only return user records.
-                return cur;
-            }
-        }
-    }
-
-    public synchronized Location getNextLocation(File file, Location lastLocation, boolean thisFileOnly) throws IllegalStateException, IOException {
-        DataFile df = fileByFileMap.get(file);
-        return getNextLocation(df, lastLocation, thisFileOnly);
-    }
-
-    public synchronized Location getNextLocation(DataFile dataFile, Location lastLocation, boolean thisFileOnly) throws IOException, IllegalStateException {
-
-        Location cur = null;
-        while (true) {
-            if (cur == null) {
-                if (lastLocation == null) {
-                    DataFile head = dataFile.getHeadNode();
-                    cur = new Location();
-                    cur.setDataFileId(head.getDataFileId());
-                    cur.setOffset(0);
-                } else {
-                    // Set to the next offset..
-                    cur = new Location(lastLocation);
-                    cur.setOffset(cur.getOffset() + cur.getSize());
-                }
-            } else {
-                cur.setOffset(cur.getOffset() + cur.getSize());
-            }
-
-            // Did it go into the next file??
-            if (dataFile.getLength() <= cur.getOffset()) {
-                if (thisFileOnly) {
-                    return null;
-                } else {
-                    dataFile = getNextDataFile(dataFile);
-                    if (dataFile == null) {
-                        return null;
-                    } else {
-                        cur.setDataFileId(dataFile.getDataFileId().intValue());
-                        cur.setOffset(0);
-                    }
-                }
-            }
-
-            // Load in location size and type.
-            DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-            try {
-                reader.readLocationDetails(cur);
-            } finally {
-                accessorPool.closeDataFileAccessor(reader);
-            }
-
-            if (cur.getType() == 0) {
-                return null;
-            } else if (cur.getType() > 0) {
-                // Only return user records.
-                return cur;
-            }
-        }
-    }
-
-    public synchronized ByteSequence read(Location location) throws IOException, IllegalStateException {
-        DataFile dataFile = getDataFile(location);
-        DataFileAccessor reader = accessorPool.openDataFileAccessor(dataFile);
-        ByteSequence rc = null;
-        try {
-            rc = reader.readRecord(location);
-        } finally {
-            accessorPool.closeDataFileAccessor(reader);
-        }
-        return rc;
-    }
-
-    public Location write(ByteSequence data, boolean sync) throws IOException, IllegalStateException {
-        Location loc = appender.storeItem(data, Location.USER_TYPE, sync);
-        return loc;
-    }
-
-    public Location write(ByteSequence data, Runnable onComplete) throws IOException, IllegalStateException {
-        Location loc = appender.storeItem(data, Location.USER_TYPE, onComplete);
-        return loc;
-    }
-
-    public void update(Location location, ByteSequence data, boolean sync) throws IOException {
-        DataFile dataFile = getDataFile(location);
-        DataFileAccessor updater = accessorPool.openDataFileAccessor(dataFile);
-        try {
-            updater.updateRecord(location, data, sync);
-        } finally {
-            accessorPool.closeDataFileAccessor(updater);
-        }
-    }
-
-    public File getDirectory() {
-        return directory;
-    }
-
-    public void setDirectory(File directory) {
-        this.directory = directory;
-    }
-
-    public String getFilePrefix() {
-        return filePrefix;
-    }
-
-    public void setFilePrefix(String filePrefix) {
-        this.filePrefix = filePrefix;
-    }
-
-    public Map<WriteKey, WriteCommand> getInflightWrites() {
-        return inflightWrites;
-    }
-
-    public Location getLastAppendLocation() {
-        return lastAppendLocation.get();
-    }
-
-    public void setLastAppendLocation(Location lastSyncedLocation) {
-        this.lastAppendLocation.set(lastSyncedLocation);
-    }
-
-    public File getDirectoryArchive() {
-        return directoryArchive;
-    }
-
-    public void setDirectoryArchive(File directoryArchive) {
-        this.directoryArchive = directoryArchive;
-    }
-
-    public boolean isArchiveDataLogs() {
-        return archiveDataLogs;
-    }
-
-    public void setArchiveDataLogs(boolean archiveDataLogs) {
-        this.archiveDataLogs = archiveDataLogs;
-    }
-
-    synchronized public Integer getCurrentDataFileId() {
-        if (dataFiles.isEmpty())
-            return null;
-        return dataFiles.getTail().getDataFileId();
-    }
-
-    /**
-     * Get a set of files - only valid after start()
-     * 
-     * @return files currently being used
-     */
-    public Set<File> getFiles() {
-        return fileByFileMap.keySet();
-    }
-
-    public synchronized Map<Integer, DataFile> getFileMap() {
-        return new TreeMap<Integer, DataFile>(fileMap);
-    }
-    
-    public long getDiskSize() {
-        long tailLength=0;
-        synchronized( this ) {
-            if( !dataFiles.isEmpty() ) {
-                tailLength = dataFiles.getTail().getLength();
-            }
-        }
-        
-        long rc = totalLength.get();
-        
-        // The last file is actually at a minimum preferedFileLength big.
-        if( tailLength < preferedFileLength ) {
-            rc -= tailLength;
-            rc += preferedFileLength;
-        }
-        return rc;
-    }
-
-	public void setReplicationTarget(ReplicationTarget replicationTarget) {
-		this.replicationTarget = replicationTarget;
-	}
-	public ReplicationTarget getReplicationTarget() {
-		return replicationTarget;
-	}
-
-    public String getFileSuffix() {
-        return fileSuffix;
-    }
-
-    public void setFileSuffix(String fileSuffix) {
-        this.fileSuffix = fileSuffix;
-    }
-
-	public boolean isChecksum() {
-		return checksum;
-	}
-
-	public void setChecksum(boolean checksumWrites) {
-		this.checksum = checksumWrites;
-	}
-
-    public boolean isCheckForCorruptionOnStartup() {
-        return checkForCorruptionOnStartup;
-    }
-
-    public void setCheckForCorruptionOnStartup(boolean checkForCorruptionOnStartup) {
-        this.checkForCorruptionOnStartup = checkForCorruptionOnStartup;
-    }
-
-    public void setWriteBatchSize(int writeBatchSize) {
-        this.writeBatchSize = writeBatchSize;
-    }
-    
-    public int getWriteBatchSize() {
-        return writeBatchSize;
-    }
-
-    public void setSizeAccumulator(AtomicLong storeSizeAccumulator) {
-       this.totalLength = storeSizeAccumulator;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/Location.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/Location.java
deleted file mode 100755
index 5e87b5a..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/Location.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * Used as a location in the data store.
- * 
- * 
- */
-public final class Location implements Comparable<Location> {
-
-    public static final byte USER_TYPE = 1;
-    public static final byte NOT_SET_TYPE = 0;
-    public static final int NOT_SET = -1;
-
-    private int dataFileId = NOT_SET;
-    private int offset = NOT_SET;
-    private int size = NOT_SET;
-    private byte type = NOT_SET_TYPE;
-    private CountDownLatch latch;
-
-    public Location() {
-    }
-
-    public Location(Location item) {
-        this.dataFileId = item.dataFileId;
-        this.offset = item.offset;
-        this.size = item.size;
-        this.type = item.type;
-    }
-
-    public Location(int dataFileId, int offset) {
-        this.dataFileId=dataFileId;
-        this.offset=offset;
-    }
-
-    boolean isValid() {
-        return dataFileId != NOT_SET;
-    }
-
-    /**
-     * @return the size of the data record including the header.
-     */
-    public int getSize() {
-        return size;
-    }
-
-    /**
-     * @param size the size of the data record including the header.
-     */
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-    public int getOffset() {
-        return offset;
-    }
-
-    public void setOffset(int offset) {
-        this.offset = offset;
-    }
-
-    public int getDataFileId() {
-        return dataFileId;
-    }
-
-    public void setDataFileId(int file) {
-        this.dataFileId = file;
-    }
-
-    public byte getType() {
-        return type;
-    }
-
-    public void setType(byte type) {
-        this.type = type;
-    }
-
-    public String toString() {
-        return dataFileId+":"+offset;
-    }
-
-    public void writeExternal(DataOutput dos) throws IOException {
-        dos.writeInt(dataFileId);
-        dos.writeInt(offset);
-        dos.writeInt(size);
-        dos.writeByte(type);
-    }
-
-    public void readExternal(DataInput dis) throws IOException {
-        dataFileId = dis.readInt();
-        offset = dis.readInt();
-        size = dis.readInt();
-        type = dis.readByte();
-    }
-
-    public CountDownLatch getLatch() {
-        return latch;
-    }
-
-    public void setLatch(CountDownLatch latch) {
-        this.latch = latch;
-    }
-
-    public int compareTo(Location o) {
-        Location l = (Location)o;
-        if (dataFileId == l.dataFileId) {
-            int rc = offset - l.offset;
-            return rc;
-        }
-        return dataFileId - l.dataFileId;
-    }
-
-    public boolean equals(Object o) {
-        boolean result = false;
-        if (o instanceof Location) {
-            result = compareTo((Location)o) == 0;
-        }
-        return result;
-    }
-
-    public int hashCode() {
-        return dataFileId ^ offset;
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyDataFile.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyDataFile.java
deleted file mode 100644
index 892742f..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyDataFile.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-/**
- * Allows you to open a data file in read only mode.  Useful when working with 
- * archived data files.
- */
-public class ReadOnlyDataFile extends DataFile {
-
-    ReadOnlyDataFile(File file, int number, int preferedSize) {
-        super(file, number, preferedSize);
-    }
-    
-    public RandomAccessFile openRandomAccessFile(boolean appender) throws IOException {
-        return new RandomAccessFile(file, "r");
-    }
-
-    public void closeRandomAccessFile(RandomAccessFile file) throws IOException {
-        file.close();
-    }
-
-    public synchronized boolean delete() throws IOException {
-        throw new RuntimeException("Not valid on a read only file.");
-    }
-    
-    public synchronized void move(File targetDirectory) throws IOException{
-        throw new RuntimeException("Not valid on a read only file.");
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyJournal.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyJournal.java
deleted file mode 100644
index 12b2351..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyJournal.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * An AsyncDataManager that works in read only mode against multiple data directories.
- * Useful for reading back archived data files.
- */
-public class ReadOnlyJournal extends Journal {
-    
-    private final ArrayList<File> dirs;
-
-    public ReadOnlyJournal(final ArrayList<File> dirs) {
-        this.dirs = dirs;
-    }
-
-    public synchronized void start() throws IOException {
-        if (started) {
-            return;
-        }
-
-        started = true;
-                
-        ArrayList<File> files = new ArrayList<File>();
-        for (File directory : dirs) {
-            final File d = directory;
-            File[] f = d.listFiles(new FilenameFilter() {
-                public boolean accept(File dir, String n) {
-                    return dir.equals(d) && n.startsWith(filePrefix);
-                }
-            });
-            for (int i = 0; i < f.length; i++) {
-                files.add(f[i]);
-            }
-        }
-       
-        for (File file : files) {
-            try {
-                String n = file.getName();
-                String numStr = n.substring(filePrefix.length(), n.length());
-                int num = Integer.parseInt(numStr);
-                DataFile dataFile = new ReadOnlyDataFile(file, num, preferedFileLength);
-                fileMap.put(dataFile.getDataFileId(), dataFile);
-                totalLength.addAndGet(dataFile.getLength());
-            } catch (NumberFormatException e) {
-                // Ignore file that do not match the pattern.
-            }
-        }
-
-        // Sort the list so that we can link the DataFiles together in the
-        // right order.
-        List<DataFile> list = new ArrayList<DataFile>(fileMap.values());
-        Collections.sort(list);
-        for (DataFile df : list) {
-            dataFiles.addLast(df);
-            fileByFileMap.put(df.getFile(), df);
-        }
-        
-//        // Need to check the current Write File to see if there was a partial
-//        // write to it.
-//        if (!dataFiles.isEmpty()) {
-//
-//            // See if the lastSyncedLocation is valid..
-//            Location l = lastAppendLocation.get();
-//            if (l != null && l.getDataFileId() != dataFiles.getTail().getDataFileId().intValue()) {
-//                l = null;
-//            }
-//            
-//            // If we know the last location that was ok.. then we can skip lots
-//            // of checking
-//            try {
-//                l = recoveryCheck(dataFiles.getTail(), l);
-//                lastAppendLocation.set(l);
-//            } catch (IOException e) {
-//                LOG.warn("recovery check failed", e);
-//            }
-//        }
-    }
-    
-    public synchronized void close() throws IOException {
-        if (!started) {
-            return;
-        }
-        accessorPool.close();
-        fileMap.clear();
-        fileByFileMap.clear();
-        started = false;
-    }
-
-    
-    public Location getFirstLocation() throws IllegalStateException, IOException {
-        if( dataFiles.isEmpty() ) {
-            return null;
-        }
-        
-        DataFile first = dataFiles.getHead();
-        Location cur = new Location();
-        cur.setDataFileId(first.getDataFileId());
-        cur.setOffset(0);
-        cur.setSize(0);
-        return getNextLocation(cur);
-    }
-    
-    @Override
-    public synchronized boolean delete() throws IOException {
-        throw new RuntimeException("Cannot delete a ReadOnlyAsyncDataManager");
-    }    
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReplicationTarget.java b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReplicationTarget.java
deleted file mode 100644
index 29f89f3..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/ReplicationTarget.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**

- * 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.kahadb.journal;

-

-import org.apache.kahadb.util.ByteSequence;

-

-public interface ReplicationTarget {

-

-	void replicate(Location location, ByteSequence sequence, boolean sync);

-

-}

diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/package.html b/trunk/kahadb/src/main/java/org/apache/kahadb/journal/package.html
deleted file mode 100755
index 6f6779b..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/journal/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
- journal based data storage - scalable and fast
-
-</body>
-</html>
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/package.html b/trunk/kahadb/src/main/java/org/apache/kahadb/package.html
deleted file mode 100755
index ea1503a..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    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.
--->
-<html>
-<head>
-</head>
-<body>
-
-<p>
-	fast message persistence implementation
-</p>
-
-</body>
-</html>
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/page/Page.java b/trunk/kahadb/src/main/java/org/apache/kahadb/page/Page.java
deleted file mode 100644
index 0e49f23..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/page/Page.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * 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.kahadb.page;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.DataByteArrayInputStream;
-import org.apache.kahadb.util.DataByteArrayOutputStream;
-import org.apache.kahadb.util.Marshaller;
-
-/**
- * A Page within a file.
- * 
- * 
- */
-public class Page<T> {
-
-    public static final int PAGE_HEADER_SIZE = 21;
-
-    public static final byte PAGE_FREE_TYPE = 0;
-    public static final byte PAGE_PART_TYPE = 1;
-    public static final byte PAGE_END_TYPE = 2;
-
-    long pageId;
-
-    // The following fields are persisted
-    byte type = PAGE_FREE_TYPE;
-    long txId;
-    // A field reserved to hold checksums..  Not in use (yet)
-    int checksum;
-    
-    // Points to the next page in the chunk stream
-    long next;
-    T data;
-
-    public Page() {
-    }
-
-    public Page(long pageId) {
-        this.pageId=pageId;
-    }
-
-    public void copy(Page<T> other) {
-        this.pageId = other.pageId;
-        this.txId = other.txId;
-        this.type = other.type;
-        this.next = other.next;
-        this.data = other.data;
-    }
-
-    Page<T> copy() {
-        Page<T> rc = new Page<T>();
-        rc.copy(this);
-        return rc;
-    }
-
-    void makeFree(long txId) {
-        this.type = Page.PAGE_FREE_TYPE;
-        this.txId = txId;
-        this.data = null;
-        this.next = 0;
-    }
-    
-    public void makePagePart(long next, long txId) {
-        this.type = Page.PAGE_PART_TYPE;
-        this.next = next;
-        this.txId = txId;
-    }
-    
-    public void makePageEnd(long size, long txId) {
-        this.type = Page.PAGE_END_TYPE;
-        this.next = size;
-        this.txId = txId;
-    }
-
-    void write(DataOutput os) throws IOException {
-        os.writeByte(type);
-        os.writeLong(txId);
-        os.writeLong(next);
-        os.writeInt(checksum);
-    }
-
-    void read(DataInput is) throws IOException {
-        type = is.readByte();
-        txId = is.readLong();
-        next = is.readLong();
-        checksum = is.readInt();
-    }
-
-    public long getPageId() {
-        return pageId;
-    }
-
-    public long getTxId() {
-        return txId;
-    }
-
-    public T get() {
-        return data;
-    }
-
-    public void set(T data) {
-        this.data = data;
-    }
-
-    public short getType() {
-        return type;
-    }
-
-    public long getNext() {
-        return next;
-    }
-
-    public String toString() {
-        return "[Page:" + getPageId()+", type: "+type+"]";
-    }
-
-    public int getChecksum() {
-        return checksum;
-    }
-
-    public void setChecksum(int checksum) {
-        this.checksum = checksum;
-    }
-
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java b/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java
deleted file mode 100644
index ba8f6d8..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java
+++ /dev/null
@@ -1,1134 +0,0 @@
-/**
- * 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.kahadb.page;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.RandomAccessFile;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.zip.Adler32;
-import java.util.zip.Checksum;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.kahadb.util.DataByteArrayOutputStream;
-import org.apache.kahadb.util.IOExceptionSupport;
-import org.apache.kahadb.util.IOHelper;
-import org.apache.kahadb.util.IntrospectionSupport;
-import org.apache.kahadb.util.LRUCache;
-import org.apache.kahadb.util.Sequence;
-import org.apache.kahadb.util.SequenceSet;
-
-/**
- * A PageFile provides you random access to fixed sized disk pages. This object is not thread safe and therefore access to it should 
- * be externally synchronized.
- * 
- * The file has 3 parts:
- * Metadata Space: 4k : Reserved metadata area. Used to store persistent config about the file.
- * Recovery Buffer Space: Page Size * 1000 : This is a redo log used to prevent partial page writes from making the file inconsistent
- * Page Space: The pages in the page file.
- * 
- * 
- */
-public class PageFile {
-    
-    private static final String PAGEFILE_SUFFIX = ".data";
-    private static final String RECOVERY_FILE_SUFFIX = ".redo";
-    private static final String FREE_FILE_SUFFIX = ".free";
-    
-    // 4k Default page size.
-    public static final int DEFAULT_PAGE_SIZE = Integer.parseInt(System.getProperty("defaultPageSize", ""+1024*4)); 
-    public static final int DEFAULT_WRITE_BATCH_SIZE = Integer.parseInt(System.getProperty("defaultWriteBatchSize", ""+1000));
-    private static final int RECOVERY_FILE_HEADER_SIZE=1024*4;
-    private static final int PAGE_FILE_HEADER_SIZE=1024*4;
-
-    // Recovery header is (long offset)
-    private static final Logger LOG = LoggerFactory.getLogger(PageFile.class);
-
-    // A PageFile will use a couple of files in this directory
-    private File directory;
-    // And the file names in that directory will be based on this name.
-    private final String name;
-    
-    // File handle used for reading pages..
-    private RandomAccessFile readFile;
-    // File handle used for writing pages..
-    private RandomAccessFile writeFile;
-    // File handle used for writing pages..
-    private RandomAccessFile recoveryFile;
-
-    // The size of pages
-    private int pageSize = DEFAULT_PAGE_SIZE;
-    
-    // The minimum number of space allocated to the recovery file in number of pages.
-    private int recoveryFileMinPageCount = 1000;
-    // The max size that we let the recovery file grow to.. ma exceed the max, but the file will get resize 
-    // to this max size as soon as  possible.
-    private int recoveryFileMaxPageCount = 10000;
-    // The number of pages in the current recovery buffer
-    private int recoveryPageCount;
-
-    private AtomicBoolean loaded = new AtomicBoolean();
-    // The number of pages we are aiming to write every time we 
-    // write to disk.
-    int writeBatchSize = DEFAULT_WRITE_BATCH_SIZE;
-
-    // We keep a cache of pages recently used?
-    private Map<Long, Page> pageCache;
-    // The cache of recently used pages.
-    private boolean enablePageCaching=true;
-    // How many pages will we keep in the cache?
-    private int pageCacheSize = 100;
-    
-    // Should first log the page write to the recovery buffer? Avoids partial
-    // page write failures..
-    private boolean enableRecoveryFile=true;
-    // Will we sync writes to disk. Ensures that data will not be lost after a checkpoint()
-    private boolean enableDiskSyncs=true;
-    // Will writes be done in an async thread?
-    private boolean enabledWriteThread=false;
-
-    // These are used if enableAsyncWrites==true 
-    private AtomicBoolean stopWriter = new AtomicBoolean();
-    private Thread writerThread;
-    private CountDownLatch checkpointLatch;
-
-    // Keeps track of writes that are being written to disk.
-    private TreeMap<Long, PageWrite> writes=new TreeMap<Long, PageWrite>();
-
-    // Keeps track of free pages.
-    private final AtomicLong nextFreePageId = new AtomicLong();
-    private SequenceSet freeList = new SequenceSet();
-    
-    private AtomicLong nextTxid = new AtomicLong();
-    
-    // Persistent settings stored in the page file. 
-    private MetaData metaData;
-    
-    /**
-     * Use to keep track of updated pages which have not yet been committed.
-     */
-    static class PageWrite {
-        Page page;
-        byte[] current;
-        byte[] diskBound;
-
-        public PageWrite(Page page, byte[] data) {
-            this.page=page;
-            current=data;
-        }
-                
-        public void setCurrent(Page page, byte[] data) {
-            this.page=page;
-            current=data;
-        }
-
-        @Override
-        public String toString() {
-            return "[PageWrite:"+page.getPageId()+"]";
-        }
-
-        @SuppressWarnings("unchecked")
-        public Page getPage() {
-            return page;
-        }
-        
-        void begin() {
-           diskBound = current;
-           current = null;
-        }
-        
-        /**
-         * @return true if there is no pending writes to do.
-         */
-        boolean done() {
-            diskBound=null;
-            return current == null;
-        }
-        
-        boolean isDone() {
-            return diskBound == null && current == null;
-        }
-
-    }
-    
-    /**
-     * The MetaData object hold the persistent data associated with a PageFile object. 
-     */
-    public static class MetaData {
-        
-        String fileType;
-        String fileTypeVersion;
-        
-        long metaDataTxId=-1;
-        int pageSize;
-        boolean cleanShutdown;
-        long lastTxId;
-        long freePages;
-        
-        public String getFileType() {
-            return fileType;
-        }
-        public void setFileType(String fileType) {
-            this.fileType = fileType;
-        }
-        public String getFileTypeVersion() {
-            return fileTypeVersion;
-        }
-        public void setFileTypeVersion(String version) {
-            this.fileTypeVersion = version;
-        }
-        public long getMetaDataTxId() {
-            return metaDataTxId;
-        }
-        public void setMetaDataTxId(long metaDataTxId) {
-            this.metaDataTxId = metaDataTxId;
-        }
-        public int getPageSize() {
-            return pageSize;
-        }
-        public void setPageSize(int pageSize) {
-            this.pageSize = pageSize;
-        }
-        public boolean isCleanShutdown() {
-            return cleanShutdown;
-        }
-        public void setCleanShutdown(boolean cleanShutdown) {
-            this.cleanShutdown = cleanShutdown;
-        }
-        public long getLastTxId() {
-            return lastTxId;
-        }
-        public void setLastTxId(long lastTxId) {
-            this.lastTxId = lastTxId;
-        }
-        public long getFreePages() {
-            return freePages;
-        }
-        public void setFreePages(long value) {
-            this.freePages = value;
-        }
-    }
-
-    public Transaction tx() {
-        assertLoaded();
-        return new Transaction(this);
-    }
-    
-    /**
-     * Creates a PageFile in the specified directory who's data files are named by name.
-     * 
-     * @param directory
-     * @param name
-     */
-    public PageFile(File directory, String name) {
-        this.directory = directory;
-        this.name = name;
-    }
-    
-    /**
-     * Deletes the files used by the PageFile object.  This method can only be used when this object is not loaded.
-     * 
-     * @throws IOException 
-     *         if the files cannot be deleted.
-     * @throws IllegalStateException 
-     *         if this PageFile is loaded
-     */
-    public void delete() throws IOException {
-        if( loaded.get() ) {
-            throw new IllegalStateException("Cannot delete page file data when the page file is loaded");
-        }
-        delete(getMainPageFile());
-        delete(getFreeFile());
-        delete(getRecoveryFile());
-    }
-
-    /**
-     * @param file
-     * @throws IOException
-     */
-    private void delete(File file) throws IOException {
-        if( file.exists() ) {
-            if( !file.delete() ) {
-                throw new IOException("Could not delete: "+file.getPath());
-            }
-        }
-    }
-    
-    /**
-     * Loads the page file so that it can be accessed for read/write purposes.  This allocates OS resources.  If this is the 
-     * first time the page file is loaded, then this creates the page file in the file system.
-     * 
-     * @throws IOException
-     *         If the page file cannot be loaded. This could be cause the existing page file is corrupt is a bad version or if 
-     *         there was a disk error.
-     * @throws IllegalStateException 
-     *         If the page file was already loaded.
-     */
-    public void load() throws IOException, IllegalStateException {
-        if (loaded.compareAndSet(false, true)) {
-            
-            if( enablePageCaching ) {
-                pageCache = Collections.synchronizedMap(new LRUCache<Long, Page>(pageCacheSize, pageCacheSize, 0.75f, true));
-            }
-            
-            File file = getMainPageFile();
-            IOHelper.mkdirs(file.getParentFile());
-            writeFile = new RandomAccessFile(file, "rw");
-            readFile = new RandomAccessFile(file, "r");
-            
-            if (readFile.length() > 0) {
-                // Load the page size setting cause that can't change once the file is created.
-                loadMetaData();
-                pageSize = metaData.getPageSize();
-            } else {
-                // Store the page size setting cause that can't change once the file is created.
-                metaData = new MetaData();
-                metaData.setFileType(PageFile.class.getName());
-                metaData.setFileTypeVersion("1");
-                metaData.setPageSize(getPageSize());
-                metaData.setCleanShutdown(true);
-                metaData.setFreePages(-1);
-                metaData.setLastTxId(0);
-                storeMetaData();
-            }
-
-            if( enableRecoveryFile ) {
-                recoveryFile = new RandomAccessFile(getRecoveryFile(), "rw");
-            }
-            
-            if(  metaData.isCleanShutdown() ) {
-                nextTxid.set(metaData.getLastTxId()+1);
-                if( metaData.getFreePages()>0 ) {
-                    loadFreeList();
-                } 
-            } else {
-                LOG.debug(toString() + ", Recovering page file...");
-                nextTxid.set(redoRecoveryUpdates());
-                
-                // Scan all to find the free pages.
-                freeList = new SequenceSet();
-                for (Iterator i = tx().iterator(true); i.hasNext();) {
-                    Page page = (Page)i.next();
-                    if( page.getType() == Page.PAGE_FREE_TYPE ) {
-                        freeList.add(page.getPageId());
-                    }
-                }
-                
-            }
-            
-            metaData.setCleanShutdown(false);
-            storeMetaData();
-            getFreeFile().delete();
-            
-            if( writeFile.length() < PAGE_FILE_HEADER_SIZE) {
-                writeFile.setLength(PAGE_FILE_HEADER_SIZE);
-            }
-            nextFreePageId.set((writeFile.length()-PAGE_FILE_HEADER_SIZE)/pageSize);
-            startWriter();
-                
-        } else {
-            throw new IllegalStateException("Cannot load the page file when it is allready loaded.");
-        }
-    }
-
-
-    /**
-     * Unloads a previously loaded PageFile.  This deallocates OS related resources like file handles.
-     * once unloaded, you can no longer use the page file to read or write Pages.
-     * 
-     * @throws IOException
-     *         if there was a disk error occurred while closing the down the page file.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public void unload() throws IOException {
-        if (loaded.compareAndSet(true, false)) {
-            flush();
-            try {
-                stopWriter();
-            } catch (InterruptedException e) {
-                throw new InterruptedIOException();
-            }
-            
-            if( freeList.isEmpty() ) {
-                metaData.setFreePages(0);
-            } else {
-                storeFreeList();
-                metaData.setFreePages(freeList.size());
-            }
-            
-            metaData.setLastTxId( nextTxid.get()-1 );
-            metaData.setCleanShutdown(true);
-            storeMetaData();
-            
-            if (readFile != null) {
-                readFile.close();
-                readFile = null;
-                writeFile.close();
-                writeFile=null;
-                if( enableRecoveryFile ) {
-                    recoveryFile.close();
-                    recoveryFile=null;
-                }
-                freeList.clear();
-                if( pageCache!=null ) {
-                    pageCache=null;
-                }
-                synchronized(writes) {
-                    writes.clear();
-                }
-            }
-        } else {
-            throw new IllegalStateException("Cannot unload the page file when it is not loaded");
-        }
-    }
-        
-    public boolean isLoaded() {
-        return loaded.get();
-    }
-
-    /**
-     * Flush and sync all write buffers to disk.
-     * 
-     * @throws IOException
-     *         If an disk error occurred.
-     */
-    public void flush() throws IOException {
-
-        if( enabledWriteThread && stopWriter.get() ) {
-            throw new IOException("Page file already stopped: checkpointing is not allowed");
-        }
-        
-        // Setup a latch that gets notified when all buffered writes hits the disk.
-        CountDownLatch checkpointLatch;
-        synchronized( writes ) {
-            if( writes.isEmpty()) {                
-                return;
-            }
-            if( enabledWriteThread ) {
-                if( this.checkpointLatch == null ) {
-                    this.checkpointLatch = new CountDownLatch(1);
-                }
-                checkpointLatch = this.checkpointLatch;
-                writes.notify();
-            } else {
-                writeBatch();
-                return;
-            }
-        }
-        try {
-            checkpointLatch.await();
-        } catch (InterruptedException e) {
-            throw new InterruptedIOException();
-        }
-    }
-
-    
-    public String toString() {
-        return "Page File: "+getMainPageFile();
-    }
-    
-    ///////////////////////////////////////////////////////////////////
-    // Private Implementation Methods
-    ///////////////////////////////////////////////////////////////////
-    private File getMainPageFile() {
-        return new File(directory, IOHelper.toFileSystemSafeName(name)+PAGEFILE_SUFFIX);
-    }
-    
-    public File getFreeFile() {
-        return new File(directory, IOHelper.toFileSystemSafeName(name)+FREE_FILE_SUFFIX);
-    } 
-
-    public File getRecoveryFile() {
-        return new File(directory, IOHelper.toFileSystemSafeName(name)+RECOVERY_FILE_SUFFIX);
-    } 
-
-    private long toOffset(long pageId) {
-        return PAGE_FILE_HEADER_SIZE+(pageId*pageSize);
-    }
-
-    private void loadMetaData() throws IOException {
-
-        ByteArrayInputStream is;
-        MetaData v1 = new MetaData();
-        MetaData v2 = new MetaData();
-        try {
-            Properties p = new Properties();
-            byte[] d = new byte[PAGE_FILE_HEADER_SIZE/2];
-            readFile.seek(0);
-            readFile.readFully(d);
-            is = new ByteArrayInputStream(d);
-            p.load(is);
-            IntrospectionSupport.setProperties(v1, p);
-        } catch (IOException e) {
-            v1 = null;
-        }
-        
-        try {
-            Properties p = new Properties();
-            byte[] d = new byte[PAGE_FILE_HEADER_SIZE/2];
-            readFile.seek(PAGE_FILE_HEADER_SIZE/2);
-            readFile.readFully(d);
-            is = new ByteArrayInputStream(d);
-            p.load(is);
-            IntrospectionSupport.setProperties(v2, p);
-        } catch (IOException e) {
-            v2 = null;
-        }
-        
-        if( v1==null && v2==null ) {
-            throw new IOException("Could not load page file meta data");
-        } 
-        
-        if( v1 == null || v1.metaDataTxId<0 ) {
-            metaData = v2;
-        } else if( v2==null || v1.metaDataTxId<0 ) {
-            metaData = v1;
-        } else if( v1.metaDataTxId==v2.metaDataTxId ) {
-            metaData = v1; // use the first since the 2nd could be a partial..
-        } else {
-            metaData = v2; // use the second cause the first is probably a partial.
-        }
-    }
-    
-    private void storeMetaData() throws IOException {
-        // Convert the metadata into a property format
-        metaData.metaDataTxId++;
-        Properties p = new Properties();
-        IntrospectionSupport.getProperties(metaData, p, null);
-        
-        ByteArrayOutputStream os = new ByteArrayOutputStream(PAGE_FILE_HEADER_SIZE);
-        p.store(os, "");
-        if( os.size() > PAGE_FILE_HEADER_SIZE/2) { 
-            throw new IOException("Configuation is to larger than: "+PAGE_FILE_HEADER_SIZE/2);
-        }
-        // Fill the rest with space...
-        byte[] filler = new byte[(PAGE_FILE_HEADER_SIZE/2)-os.size()];
-        Arrays.fill(filler, (byte)' ');
-        os.write(filler);
-        os.flush();
-        
-        byte[] d = os.toByteArray();
-
-        // So we don't loose it.. write it 2 times...
-        writeFile.seek(0);
-        writeFile.write(d);
-        writeFile.getFD().sync();
-        writeFile.seek(PAGE_FILE_HEADER_SIZE/2);
-        writeFile.write(d);
-        writeFile.getFD().sync();
-    }
-
-    private void storeFreeList() throws IOException {
-        FileOutputStream os = new FileOutputStream(getFreeFile());
-        DataOutputStream dos = new DataOutputStream(os);
-        SequenceSet.Marshaller.INSTANCE.writePayload(freeList, dos);
-        dos.close();
-    }
-
-    private void loadFreeList() throws IOException {
-        freeList.clear();
-        FileInputStream is = new FileInputStream(getFreeFile());
-        DataInputStream dis = new DataInputStream(is);
-        freeList = SequenceSet.Marshaller.INSTANCE.readPayload(dis);
-        dis.close();
-    }
-    
-    ///////////////////////////////////////////////////////////////////
-    // Property Accessors 
-    ///////////////////////////////////////////////////////////////////
-    
-    /**
-     * Is the recovery buffer used to double buffer page writes.  Enabled by default.
-     * 
-     * @return is the recovery buffer enabled.
-     */
-    public boolean isEnableRecoveryFile() {
-        return enableRecoveryFile;
-    }
-
-    /**
-     * Sets if the recovery buffer uses to double buffer page writes.  Enabled by default.  Disabling this
-     * may potentially cause partial page writes which can lead to page file corruption.
-     */
-    public void setEnableRecoveryFile(boolean doubleBuffer) {
-        assertNotLoaded();
-        this.enableRecoveryFile = doubleBuffer;
-    }
-
-    /**
-     * @return Are page writes synced to disk?
-     */
-    public boolean isEnableDiskSyncs() {
-        return enableDiskSyncs;
-    }
-
-    /**
-     * Allows you enable syncing writes to disk.
-     * @param syncWrites
-     */
-    public void setEnableDiskSyncs(boolean syncWrites) {
-        assertNotLoaded();
-        this.enableDiskSyncs = syncWrites;
-    }
-    
-    /**
-     * @return the page size
-     */
-    public int getPageSize() {
-        return this.pageSize;
-    }
-
-    /**
-     * @return the amount of content data that a page can hold.
-     */
-    public int getPageContentSize() {
-        return this.pageSize-Page.PAGE_HEADER_SIZE;
-    }
-    
-    /**
-     * Configures the page size used by the page file.  By default it is 4k.  Once a page file is created on disk,
-     * subsequent loads of that file will use the original pageSize.  Once the PageFile is loaded, this setting
-     * can no longer be changed.
-     * 
-     * @param pageSize the pageSize to set
-     * @throws IllegalStateException
-     *         once the page file is loaded.
-     */
-    public void setPageSize(int pageSize) throws IllegalStateException {
-        assertNotLoaded();
-        this.pageSize = pageSize;
-    }
-    
-    /**
-     * @return true if read page caching is enabled
-     */
-    public boolean isEnablePageCaching() {
-        return this.enablePageCaching;
-    }
-
-    /**
-     * @param allows you to enable read page caching
-     */
-    public void setEnablePageCaching(boolean enablePageCaching) {
-        assertNotLoaded();
-        this.enablePageCaching = enablePageCaching;
-    }
-
-    /**
-     * @return the maximum number of pages that will get stored in the read page cache.
-     */
-    public int getPageCacheSize() {
-        return this.pageCacheSize;
-    }
-
-    /**
-     * @param Sets the maximum number of pages that will get stored in the read page cache.
-     */
-    public void setPageCacheSize(int pageCacheSize) {
-        assertNotLoaded();
-        this.pageCacheSize = pageCacheSize;
-    }
-
-    public boolean isEnabledWriteThread() {
-        return enabledWriteThread;
-    }
-
-    public void setEnableWriteThread(boolean enableAsyncWrites) {
-        assertNotLoaded();
-        this.enabledWriteThread = enableAsyncWrites;
-    }
-
-    public long getDiskSize() throws IOException {
-        return toOffset(nextFreePageId.get());
-    }
-    
-    /**
-     * @return the number of pages allocated in the PageFile
-     */
-    public long getPageCount() {
-        return nextFreePageId.get();
-    }
-
-    public int getRecoveryFileMinPageCount() {
-        return recoveryFileMinPageCount;
-    }
-
-    public void setRecoveryFileMinPageCount(int recoveryFileMinPageCount) {
-        assertNotLoaded();
-        this.recoveryFileMinPageCount = recoveryFileMinPageCount;
-    }
-
-    public int getRecoveryFileMaxPageCount() {
-        return recoveryFileMaxPageCount;
-    }
-
-    public void setRecoveryFileMaxPageCount(int recoveryFileMaxPageCount) {
-        assertNotLoaded();
-        this.recoveryFileMaxPageCount = recoveryFileMaxPageCount;
-    }
-
-	public int getWriteBatchSize() {
-		return writeBatchSize;
-	}
-
-	public void setWriteBatchSize(int writeBatchSize) {
-        assertNotLoaded();
-		this.writeBatchSize = writeBatchSize;
-	}
-
-	///////////////////////////////////////////////////////////////////
-    // Package Protected Methods exposed to Transaction
-    ///////////////////////////////////////////////////////////////////
-
-    /**
-     * @throws IllegalStateException if the page file is not loaded.
-     */
-    void assertLoaded() throws IllegalStateException {
-        if( !loaded.get() ) {
-            throw new IllegalStateException("PageFile is not loaded");
-        }
-    }
-    void assertNotLoaded() throws IllegalStateException {
-        if( loaded.get() ) {
-            throw new IllegalStateException("PageFile is loaded");
-        }
-    }
-        
-    /** 
-     * Allocates a block of free pages that you can write data to.
-     * 
-     * @param count the number of sequential pages to allocate
-     * @return the first page of the sequential set. 
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    <T> Page<T> allocate(int count) throws IOException {
-        assertLoaded();
-        if (count <= 0) {
-            throw new IllegalArgumentException("The allocation count must be larger than zero");
-        }
-
-        Sequence seq = freeList.removeFirstSequence(count);
-
-        // We may need to create new free pages...
-        if (seq == null) {
-
-            Page<T> first = null;
-            int c = count;
-            while (c > 0) {
-                Page<T> page = new Page<T>(nextFreePageId.getAndIncrement());
-                page.makeFree(getNextWriteTransactionId());
-
-                if (first == null) {
-                    first = page;
-                }
-
-                addToCache(page);
-                DataByteArrayOutputStream out = new DataByteArrayOutputStream(pageSize);
-                page.write(out);
-                write(page, out.getData());
-
-                // LOG.debug("allocate writing: "+page.getPageId());
-                c--;
-            }
-
-            return first;
-        }
-
-        Page<T> page = new Page<T>(seq.getFirst());
-        page.makeFree(0);
-        // LOG.debug("allocated: "+page.getPageId());
-        return page;
-    }
-
-    long getNextWriteTransactionId() {
-        return nextTxid.incrementAndGet();
-    }
-
-    void readPage(long pageId, byte[] data) throws IOException {
-        readFile.seek(toOffset(pageId));
-        readFile.readFully(data);
-    }
-
-    public void freePage(long pageId) {
-        freeList.add(pageId);
-        if( enablePageCaching ) {
-            pageCache.remove(pageId);
-        }
-    }
-    
-    @SuppressWarnings("unchecked")
-    private <T> void write(Page<T> page, byte[] data) throws IOException {
-        final PageWrite write = new PageWrite(page, data);
-        Entry<Long, PageWrite> entry = new Entry<Long, PageWrite>(){
-            public Long getKey() {
-                return write.getPage().getPageId();
-            }
-            public PageWrite getValue() {
-                return write;
-            }
-            public PageWrite setValue(PageWrite value) {
-                return null;
-            }
-        };
-        Entry<Long, PageWrite>[] entries = new Map.Entry[]{entry};
-        write(Arrays.asList(entries));
-    }
-
-    void write(Collection<Map.Entry<Long, PageWrite>> updates) throws IOException {
-        synchronized( writes ) {
-            if( enabledWriteThread  ) {
-                while( writes.size() >= writeBatchSize && !stopWriter.get() ) {
-                    try {
-                        writes.wait();
-                    } catch (InterruptedException e) {
-                        Thread.currentThread().interrupt();
-                        throw new InterruptedIOException();
-                    }
-                }
-            }
-
-            for (Map.Entry<Long, PageWrite> entry : updates) {
-                Long key = entry.getKey();
-                PageWrite value = entry.getValue();
-                PageWrite write = writes.get(key);
-                if( write==null ) {
-                    writes.put(key, value);
-                } else {
-                    write.setCurrent(value.page, value.current);
-                }
-            }
-            
-            // Once we start approaching capacity, notify the writer to start writing
-            if( canStartWriteBatch() ) {
-                if( enabledWriteThread  ) {
-                    writes.notify();
-                } else {
-                    writeBatch();
-                }
-            }
-        }            
-    }
-    
-    private boolean canStartWriteBatch() {
-		int capacityUsed = ((writes.size() * 100)/writeBatchSize);
-        if( enabledWriteThread ) {
-            // The constant 10 here controls how soon write batches start going to disk..
-            // would be nice to figure out how to auto tune that value.  Make to small and
-            // we reduce through put because we are locking the write mutex too often doing writes
-            return capacityUsed >= 10 || checkpointLatch!=null;
-        } else {
-            return capacityUsed >= 80 || checkpointLatch!=null;
-        }
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    // Cache Related operations
-    ///////////////////////////////////////////////////////////////////
-    @SuppressWarnings("unchecked")
-    <T> Page<T> getFromCache(long pageId) {
-        synchronized(writes) {
-            PageWrite pageWrite = writes.get(pageId);
-            if( pageWrite != null ) {
-                return pageWrite.page;
-            }
-        }
-
-        Page<T> result = null;
-        if (enablePageCaching) {
-            result = pageCache.get(pageId);
-        }
-        return result;
-    }
-
-    void addToCache(Page page) {
-        if (enablePageCaching) {
-            pageCache.put(page.getPageId(), page);
-        }
-    }
-
-    void removeFromCache(Page page) {
-        if (enablePageCaching) {
-            pageCache.remove(page.getPageId());
-        }
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    // Internal Double write implementation follows...
-    ///////////////////////////////////////////////////////////////////
-    /**
-     * 
-     */
-    private void pollWrites() {
-        try {
-            while( !stopWriter.get() ) {
-                // Wait for a notification...
-                synchronized( writes ) {  
-                    writes.notifyAll();
-                    
-                    // If there is not enough to write, wait for a notification...
-                    while( writes.isEmpty() && checkpointLatch==null && !stopWriter.get() ) {
-                        writes.wait(100);
-                    }
-                    
-                    if( writes.isEmpty() ) {
-                        releaseCheckpointWaiter();
-                    }
-                }
-                writeBatch();
-            }
-        } catch (Throwable e) {
-            e.printStackTrace();
-        } finally {
-            releaseCheckpointWaiter();
-        }
-    }
-
-    /**
-     * 
-     * @param timeout
-     * @param unit
-     * @return true if there are still pending writes to do.
-     * @throws InterruptedException 
-     * @throws IOException 
-     */
-    private void writeBatch() throws IOException {
-            
-        CountDownLatch checkpointLatch;
-        ArrayList<PageWrite> batch;
-        synchronized( writes ) {
-            // If there is not enough to write, wait for a notification...
-
-            batch = new ArrayList<PageWrite>(writes.size());
-            // build a write batch from the current write cache.
-            for (PageWrite write : writes.values()) {
-                batch.add(write);
-                // Move the current write to the diskBound write, this lets folks update the 
-                // page again without blocking for this write.
-                write.begin();
-                if (write.diskBound == null) {
-                    batch.remove(write);
-                }
-            }
-
-            // Grab on to the existing checkpoint latch cause once we do this write we can 
-            // release the folks that were waiting for those writes to hit disk.
-            checkpointLatch = this.checkpointLatch;
-            this.checkpointLatch=null;
-        }
-        
-       try {
-            if (enableRecoveryFile) {
-
-                // Using Adler-32 instead of CRC-32 because it's much faster and
-                // it's
-                // weakness for short messages with few hundred bytes is not a
-                // factor in this case since we know
-                // our write batches are going to much larger.
-                Checksum checksum = new Adler32();
-                for (PageWrite w : batch) {
-                    try {
-                        checksum.update(w.diskBound, 0, pageSize);
-                    } catch (Throwable t) {
-                        throw IOExceptionSupport.create(
-                                "Cannot create recovery file. Reason: " + t, t);
-                    }
-                }
-
-                // Can we shrink the recovery buffer??
-                if (recoveryPageCount > recoveryFileMaxPageCount) {
-                    int t = Math.max(recoveryFileMinPageCount, batch.size());
-                    recoveryFile.setLength(recoveryFileSizeForPages(t));
-                }
-
-                // Record the page writes in the recovery buffer.
-                recoveryFile.seek(0);
-                // Store the next tx id...
-                recoveryFile.writeLong(nextTxid.get());
-                // Store the checksum for thw write batch so that on recovery we
-                // know if we have a consistent
-                // write batch on disk.
-                recoveryFile.writeLong(checksum.getValue());
-                // Write the # of pages that will follow
-                recoveryFile.writeInt(batch.size());
-
-                // Write the pages.
-                recoveryFile.seek(RECOVERY_FILE_HEADER_SIZE);
-
-                for (PageWrite w : batch) {
-                    recoveryFile.writeLong(w.page.getPageId());
-                    recoveryFile.write(w.diskBound, 0, pageSize);
-                }
-
-                if (enableDiskSyncs) {
-                    // Sync to make sure recovery buffer writes land on disk..
-                    recoveryFile.getFD().sync();
-                }
-
-                recoveryPageCount = batch.size();
-            }
-
-            for (PageWrite w : batch) {
-                writeFile.seek(toOffset(w.page.getPageId()));
-                writeFile.write(w.diskBound, 0, pageSize);
-                w.done();
-            }
-
-            // Sync again
-            if (enableDiskSyncs) {
-                writeFile.getFD().sync();
-            }
-
-        } finally {
-            synchronized (writes) {
-                for (PageWrite w : batch) {
-                    // If there are no more pending writes, then remove it from
-                    // the write cache.
-                    if (w.isDone()) {
-                        writes.remove(w.page.getPageId());
-                    }
-                }
-            }
-            
-            if( checkpointLatch!=null ) {
-                checkpointLatch.countDown();
-            }
-        }
-    }
-
-    private long recoveryFileSizeForPages(int pageCount) {
-        return RECOVERY_FILE_HEADER_SIZE+((pageSize+8)*pageCount);
-    }
-
-    private void releaseCheckpointWaiter() {
-        if( checkpointLatch!=null ) {
-            checkpointLatch.countDown();
-            checkpointLatch=null;
-        }
-    }       
-    
-    /**
-     * Inspects the recovery buffer and re-applies any 
-     * partially applied page writes.
-     * 
-     * @return the next transaction id that can be used.
-     * @throws IOException
-     */
-    private long redoRecoveryUpdates() throws IOException {
-        if( !enableRecoveryFile ) {
-            return 0;
-        }
-        recoveryPageCount=0;
-        
-        // Are we initializing the recovery file?
-        if( recoveryFile.length() == 0 ) {
-            // Write an empty header..
-            recoveryFile.write(new byte[RECOVERY_FILE_HEADER_SIZE]);
-            // Preallocate the minium size for better performance.
-            recoveryFile.setLength(recoveryFileSizeForPages(recoveryFileMinPageCount));
-            return 0;
-        }
-        
-        // How many recovery pages do we have in the recovery buffer?
-        recoveryFile.seek(0);
-        long nextTxId = recoveryFile.readLong();
-        long expectedChecksum = recoveryFile.readLong();
-        int pageCounter = recoveryFile.readInt();
-        
-        recoveryFile.seek(RECOVERY_FILE_HEADER_SIZE);
-        Checksum checksum = new Adler32();
-        LinkedHashMap<Long, byte[]> batch = new LinkedHashMap<Long, byte[]>();
-        try {
-            for (int i = 0; i < pageCounter; i++) {
-                long offset = recoveryFile.readLong();
-                byte []data = new byte[pageSize];
-                if( recoveryFile.read(data, 0, pageSize) != pageSize ) {
-                    // Invalid recovery record, Could not fully read the data". Probably due to a partial write to the recovery buffer
-                    return nextTxId;
-                }
-                checksum.update(data, 0, pageSize);
-                batch.put(offset, data);
-            }
-        } catch (Exception e) {
-            // If an error occurred it was cause the redo buffer was not full written out correctly.. so don't redo it. 
-            // as the pages should still be consistent.
-            LOG.debug("Redo buffer was not fully intact: ", e);
-            return nextTxId;
-        }
-        
-        recoveryPageCount = pageCounter;
-        
-        // If the checksum is not valid then the recovery buffer was partially written to disk.
-        if( checksum.getValue() != expectedChecksum ) {
-            return nextTxId;
-        }
-        
-        // Re-apply all the writes in the recovery buffer.
-        for (Map.Entry<Long, byte[]> e : batch.entrySet()) {
-            writeFile.seek(toOffset(e.getKey()));
-            writeFile.write(e.getValue());
-        }
-        
-        // And sync it to disk
-        writeFile.getFD().sync();
-        return nextTxId;
-    }
-
-    private void startWriter() {
-        synchronized( writes ) {
-            if( enabledWriteThread ) {
-                stopWriter.set(false);
-                writerThread = new Thread("KahaDB Page Writer") {
-                    @Override
-                    public void run() {
-                        pollWrites();
-                    }
-                };
-                writerThread.setPriority(Thread.MAX_PRIORITY);
-                writerThread.setDaemon(true);
-                writerThread.start();
-            }
-        }
-    }
- 
-    private void stopWriter() throws InterruptedException {
-        if( enabledWriteThread ) {
-            stopWriter.set(true);
-            writerThread.join();
-        }
-    }
-
-	public File getFile() {
-		return getMainPageFile();
-	}
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/page/Transaction.java b/trunk/kahadb/src/main/java/org/apache/kahadb/page/Transaction.java
deleted file mode 100644
index 7efe7f1..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/page/Transaction.java
+++ /dev/null
@@ -1,763 +0,0 @@
-/**
- * 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.kahadb.page;
-
-import java.io.DataInputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import org.apache.kahadb.page.PageFile.PageWrite;
-import org.apache.kahadb.util.ByteSequence;
-import org.apache.kahadb.util.DataByteArrayInputStream;
-import org.apache.kahadb.util.DataByteArrayOutputStream;
-import org.apache.kahadb.util.Marshaller;
-import org.apache.kahadb.util.Sequence;
-import org.apache.kahadb.util.SequenceSet;
-
-/**
- * The class used to read/update a PageFile object.  Using a transaction allows you to
- * do multiple update operations in a single unit of work.
- */
-public class Transaction implements Iterable<Page> {
-    
-    /**
-     * The PageOverflowIOException occurs when a page write is requested
-     * and it's data is larger than what would fit into a single page.
-     */
-    public class PageOverflowIOException extends IOException {
-        public PageOverflowIOException(String message) {
-            super(message);
-        }
-    }
-    
-    /**
-     * The InvalidPageIOException is thrown if try to load/store a a page
-     * with an invalid page id.
-     */
-    public class InvalidPageIOException extends IOException {
-        private final long page;
-
-        public InvalidPageIOException(String message, long page) {
-            super(message);
-            this.page = page;
-        }
-
-        public long getPage() {
-            return page;
-        }
-    }    
-    
-    /**
-     * This closure interface is intended for the end user implement callbacks for the Transaction.exectue() method.
-     * 
-     * @param <T> The type of exceptions that operation will throw.
-     */
-    public interface Closure <T extends Throwable> {
-        public void execute(Transaction tx) throws T;
-    }
-
-    /**
-     * This closure interface is intended for the end user implement callbacks for the Transaction.exectue() method.
-     * 
-     * @param <R> The type of result that the closure produces.
-     * @param <T> The type of exceptions that operation will throw.
-     */
-    public interface CallableClosure<R, T extends Throwable> {
-        public R execute(Transaction tx) throws T;
-    }
-    
-
-    // The page file that this Transaction operates against.
-    private final PageFile pageFile;
-    // If this transaction is updating stuff.. this is the tx of 
-    private long writeTransactionId=-1;
-    // List of pages that this transaction has modified.
-    private HashMap<Long, PageWrite> writes=new HashMap<Long, PageWrite>();
-    // List of pages allocated in this transaction
-    private final SequenceSet allocateList = new SequenceSet();
-    // List of pages freed in this transaction
-    private final SequenceSet freeList = new SequenceSet();
-
-    Transaction(PageFile pageFile) {
-        this.pageFile = pageFile;
-    }
-
-    /**
-     * @return the page file that created this Transaction
-     */
-    public PageFile getPageFile() {
-        return this.pageFile;
-    }
-
-    /** 
-     * Allocates a free page that you can write data to.
-     * 
-     * @return a newly allocated page.  
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public <T> Page<T> allocate() throws IOException {
-        return allocate(1);
-    }
-
-    /** 
-     * Allocates a block of free pages that you can write data to.
-     * 
-     * @param count the number of sequential pages to allocate
-     * @return the first page of the sequential set. 
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public <T> Page<T> allocate(int count) throws IOException {
-        // TODO: we need to track allocated pages so that they can be returned if the 
-        // transaction gets rolled back.
-        Page<T> rc = pageFile.allocate(count);
-        allocateList.add(new Sequence(rc.getPageId(), rc.getPageId()+count-1));
-        return rc;
-    }
-
-    /**
-     * Frees up a previously allocated page so that it can be re-allocated again.
-     * 
-     * @param page the page to free up
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public void free(long pageId) throws IOException {
-        free(load(pageId, null));
-    }
-
-    /**
-     * Frees up a previously allocated sequence of pages so that it can be re-allocated again.
-     * 
-     * @param page the initial page of the sequence that will be getting freed
-     * @param count the number of pages in the sequence
-     * 
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public void free(long pageId, int count) throws IOException {
-        free(load(pageId, null), count);
-    }
-
-    /**
-     * Frees up a previously allocated sequence of pages so that it can be re-allocated again.
-     * 
-     * @param page the initial page of the sequence that will be getting freed
-     * @param count the number of pages in the sequence
-     * 
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public <T> void free(Page<T> page, int count) throws IOException {
-        pageFile.assertLoaded();
-        long offsetPage = page.getPageId();
-        for (int i = 0; i < count; i++) {
-            if (page == null) {
-                page = load(offsetPage + i, null);
-            }
-            free(page);
-            page = null;
-        }
-    }
-    
-    /**
-     * Frees up a previously allocated page so that it can be re-allocated again.
-     * 
-     * @param page the page to free up
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public <T> void free(Page<T> page) throws IOException {
-        pageFile.assertLoaded();
-
-        // We may need loop to free up a page chain.
-        while (page != null) {
-
-            // Is it already free??
-            if (page.getType() == Page.PAGE_FREE_TYPE) {
-                return;
-            }
-
-            Page<T> next = null;
-            if (page.getType() == Page.PAGE_PART_TYPE) {
-                next = load(page.getNext(), null);
-            }
-
-            page.makeFree(getWriteTransactionId());
-
-            DataByteArrayOutputStream out = new DataByteArrayOutputStream(pageFile.getPageSize());
-            page.write(out);
-            write(page, out.getData());
-
-            freeList.add(page.getPageId());
-            page = next;
-        }
-    }
-
-    /**
-     * 
-     * @param page
-     *        the page to write. The Page object must be fully populated with a valid pageId, type, and data.
-     * @param marshaller
-     *        the marshaler to use to load the data portion of the Page, may be null if you do not wish to write the data.
-     * @param overflow
-     *        If true, then if the page data marshalls to a bigger size than can fit in one page, then additional 
-     *        overflow pages are automatically allocated and chained to this page to store all the data.  If false,
-     *        and the overflow condition would occur, then the PageOverflowIOException is thrown. 
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws PageOverflowIOException
-     *         If the page data marshalls to size larger than maximum page size and overflow was false.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public <T> void store(Page<T> page, Marshaller<T> marshaller, final boolean overflow) throws IOException {
-        DataByteArrayOutputStream out = (DataByteArrayOutputStream)openOutputStream(page, overflow);
-        if (marshaller != null) {
-            marshaller.writePayload(page.get(), out);
-        }
-        out.close();
-    }
-
-    /**
-     * @throws IOException
-     */
-    public OutputStream openOutputStream(Page page, final boolean overflow) throws IOException {
-        pageFile.assertLoaded();
-
-        // Copy to protect against the end user changing
-        // the page instance while we are doing a write.
-        final Page copy = page.copy();
-        pageFile.addToCache(copy);
-
-        //
-        // To support writing VERY large data, we override the output stream so
-        // that we
-        // we do the page writes incrementally while the data is being
-        // marshalled.
-        DataByteArrayOutputStream out = new DataByteArrayOutputStream(pageFile.getPageSize() * 2) {
-            Page current = copy;
-
-            @SuppressWarnings("unchecked")
-            @Override
-            protected void onWrite() throws IOException {
-
-                // Are we at an overflow condition?
-                final int pageSize = pageFile.getPageSize();
-                if (pos >= pageSize) {
-                    // If overflow is allowed
-                    if (overflow) {
-
-                        Page next;
-                        if (current.getType() == Page.PAGE_PART_TYPE) {
-                            next = load(current.getNext(), null);
-                        } else {
-                            next = allocate();
-                        }
-
-                        next.txId = current.txId;
-
-                        // Write the page header
-                        int oldPos = pos;
-                        pos = 0;
-
-                        current.makePagePart(next.getPageId(), getWriteTransactionId());
-                        current.write(this);
-
-                        // Do the page write..
-                        byte[] data = new byte[pageSize];
-                        System.arraycopy(buf, 0, data, 0, pageSize);
-                        Transaction.this.write(current, data);
-
-                        // Reset for the next page chunk
-                        pos = 0;
-                        // The page header marshalled after the data is written.
-                        skip(Page.PAGE_HEADER_SIZE);
-                        // Move the overflow data after the header.
-                        System.arraycopy(buf, pageSize, buf, pos, oldPos - pageSize);
-                        pos += oldPos - pageSize;
-                        current = next;
-
-                    } else {
-                        throw new PageOverflowIOException("Page overflow.");
-                    }
-                }
-
-            }
-
-            @SuppressWarnings("unchecked")
-            @Override
-            public void close() throws IOException {
-                super.close();
-
-                // We need to free up the rest of the page chain..
-                if (current.getType() == Page.PAGE_PART_TYPE) {
-                    free(current.getNext());
-                }
-
-                current.makePageEnd(pos, getWriteTransactionId());
-
-                // Write the header..
-                pos = 0;
-                current.write(this);
-
-                Transaction.this.write(current, buf);
-            }
-        };
-
-        // The page header marshaled after the data is written.
-        out.skip(Page.PAGE_HEADER_SIZE);
-        return out;
-    }
-
-    /**
-     * Loads a page from disk.
-     * 
-     * @param pageId 
-     *        the id of the page to load
-     * @param marshaller
-     *        the marshaler to use to load the data portion of the Page, may be null if you do not wish to load the data.
-     * @return The page with the given id
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public <T> Page<T> load(long pageId, Marshaller<T> marshaller) throws IOException {
-        pageFile.assertLoaded();
-        Page<T> page = new Page<T>(pageId);
-        load(page, marshaller);
-        return page;
-    }
-
-    /**
-     * Loads a page from disk.
-     * 
-     * @param page - The pageId field must be properly set 
-     * @param marshaller
-     *        the marshaler to use to load the data portion of the Page, may be null if you do not wish to load the data.
-     * @throws IOException
-     *         If an disk error occurred.
-     * @throws InvalidPageIOException
-     *         If the page is is not valid.      
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    @SuppressWarnings("unchecked")
-    public <T> void load(Page<T> page, Marshaller<T> marshaller) throws IOException {
-        pageFile.assertLoaded();
-
-        // Can't load invalid offsets...
-        long pageId = page.getPageId();
-        if (pageId < 0) {
-            throw new InvalidPageIOException("Page id is not valid", pageId);
-        }
-
-        // It might be a page this transaction has modified...
-        PageWrite update = writes.get(pageId);
-        if (update != null) {
-            page.copy(update.getPage());
-            return;
-        }
-
-        // We may be able to get it from the cache...
-        Page<T> t = pageFile.getFromCache(pageId);
-        if (t != null) {
-            page.copy(t);
-            return;
-        }
-
-        if (marshaller != null) {
-            // Full page read..
-            InputStream is = openInputStream(page);
-            DataInputStream dataIn = new DataInputStream(is);
-            page.set(marshaller.readPayload(dataIn));
-            is.close();
-        } else {
-            // Page header read.
-            DataByteArrayInputStream in = new DataByteArrayInputStream(new byte[Page.PAGE_HEADER_SIZE]);
-            pageFile.readPage(pageId, in.getRawData());
-            page.read(in);
-            page.set(null);
-        }
-
-        // Cache it.
-        if (marshaller != null) {
-            pageFile.addToCache(page);
-        }
-    }
-
-    /**
-     * @see org.apache.kahadb.page.Transaction#load(org.apache.kahadb.page.Page,
-     *      org.apache.kahadb.util.Marshaller)
-     */
-    public InputStream openInputStream(final Page p) throws IOException {
-
-        return new InputStream() {
-
-            private ByteSequence chunk = new ByteSequence(new byte[pageFile.getPageSize()]);
-            private Page page = readPage(p);
-            private int pageCount = 1;
-
-            private Page markPage;
-            private ByteSequence markChunk;
-
-            private Page readPage(Page page) throws IOException {
-                // Read the page data
-                
-                pageFile.readPage(page.getPageId(), chunk.getData());
-                
-                chunk.setOffset(0);
-                chunk.setLength(pageFile.getPageSize());
-
-                DataByteArrayInputStream in = new DataByteArrayInputStream(chunk);
-                page.read(in);
-
-                chunk.setOffset(Page.PAGE_HEADER_SIZE);
-                if (page.getType() == Page.PAGE_END_TYPE) {
-                    chunk.setLength((int)(page.getNext()));
-                }
-
-                if (page.getType() == Page.PAGE_FREE_TYPE) {
-                    throw new EOFException("Chunk stream does not exist at page: " + page.getPageId());
-                }
-
-                return page;
-            }
-
-            public int read() throws IOException {
-                if (!atEOF()) {
-                    return chunk.data[chunk.offset++] & 0xff;
-                } else {
-                    return -1;
-                }
-            }
-
-            private boolean atEOF() throws IOException {
-                if (chunk.offset < chunk.length) {
-                    return false;
-                }
-                if (page.getType() == Page.PAGE_END_TYPE) {
-                    return true;
-                }
-                fill();
-                return chunk.offset >= chunk.length;
-            }
-
-            private void fill() throws IOException {
-                page = readPage(new Page(page.getNext()));
-                pageCount++;
-            }
-
-            public int read(byte[] b) throws IOException {
-                return read(b, 0, b.length);
-            }
-
-            public int read(byte b[], int off, int len) throws IOException {
-                if (!atEOF()) {
-                    int rc = 0;
-                    while (!atEOF() && rc < len) {
-                        len = Math.min(len, chunk.length - chunk.offset);
-                        if (len > 0) {
-                            System.arraycopy(chunk.data, chunk.offset, b, off, len);
-                            chunk.offset += len;
-                        }
-                        rc += len;
-                    }
-                    return rc;
-                } else {
-                    return -1;
-                }
-            }
-
-            public long skip(long len) throws IOException {
-                if (atEOF()) {
-                    int rc = 0;
-                    while (!atEOF() && rc < len) {
-                        len = Math.min(len, chunk.length - chunk.offset);
-                        if (len > 0) {
-                            chunk.offset += len;
-                        }
-                        rc += len;
-                    }
-                    return rc;
-                } else {
-                    return -1;
-                }
-            }
-
-            public int available() {
-                return chunk.length - chunk.offset;
-            }
-
-            public boolean markSupported() {
-                return true;
-            }
-
-            public void mark(int markpos) {
-                markPage = page;
-                byte data[] = new byte[pageFile.getPageSize()];
-                System.arraycopy(chunk.getData(), 0, data, 0, pageFile.getPageSize());
-                markChunk = new ByteSequence(data, chunk.getOffset(), chunk.getLength());
-            }
-
-            public void reset() {
-                page = markPage;
-                chunk = markChunk;
-            }
-
-        };
-    }
-
-    /**
-     * Allows you to iterate through all active Pages in this object.  Pages with type Page.FREE_TYPE are 
-     * not included in this iteration. 
-     * 
-     * Pages removed with Iterator.remove() will not actually get removed until the transaction commits.
-     * 
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    @SuppressWarnings("unchecked")
-    public Iterator<Page> iterator() {
-        return (Iterator<Page>)iterator(false);
-    }
-
-    /**
-     * Allows you to iterate through all active Pages in this object.  You can optionally include free pages in the pages
-     * iterated.
-     * 
-     * @param includeFreePages - if true, free pages are included in the iteration
-     * @param tx - if not null, then the remove() opeation on the Iterator will operate in scope of that transaction.
-     * @throws IllegalStateException
-     *         if the PageFile is not loaded
-     */
-    public Iterator<Page> iterator(final boolean includeFreePages) {
-
-        pageFile.assertLoaded();
-
-        return new Iterator<Page>() {
-            long nextId;
-            Page nextPage;
-            Page lastPage;
-
-            private void findNextPage() {
-                if (!pageFile.isLoaded()) {
-                    throw new IllegalStateException("Cannot iterate the pages when the page file is not loaded");
-                }
-
-                if (nextPage != null) {
-                    return;
-                }
-
-                try {
-                    while (nextId < pageFile.getPageCount()) {
-
-                        Page page = load(nextId, null);
-
-                        if (includeFreePages || page.getType() != Page.PAGE_FREE_TYPE) {
-                            nextPage = page;
-                            return;
-                        } else {
-                            nextId++;
-                        }
-                    }
-                } catch (IOException e) {
-                }
-            }
-
-            public boolean hasNext() {
-                findNextPage();
-                return nextPage != null;
-            }
-
-            public Page next() {
-                findNextPage();
-                if (nextPage != null) {
-                    lastPage = nextPage;
-                    nextPage = null;
-                    nextId++;
-                    return lastPage;
-                } else {
-                    throw new NoSuchElementException();
-                }
-            }
-
-            @SuppressWarnings("unchecked")
-            public void remove() {
-                if (lastPage == null) {
-                    throw new IllegalStateException();
-                }
-                try {
-                    free(lastPage);
-                    lastPage = null;
-                } catch (IOException e) {
-                    new RuntimeException(e);
-                }
-            }
-        };
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    // Commit / Rollback related methods..
-    ///////////////////////////////////////////////////////////////////
-    
-    /**
-     * Commits the transaction to the PageFile as a single 'Unit of Work'. Either all page updates associated
-     * with the transaction are written to disk or none will.
-     */
-    public void commit() throws IOException {
-        if( writeTransactionId!=-1 ) {
-            // Actually do the page writes...
-            pageFile.write(writes.entrySet());
-            // Release the pages that were freed up in the transaction..
-            freePages(freeList);
-            
-            freeList.clear();
-            allocateList.clear();
-            writes.clear();
-            writeTransactionId = -1;
-        }
-    }
-
-    /**
-     * Rolls back the transaction.
-     */
-    public void rollback() throws IOException {
-        if( writeTransactionId!=-1 ) {
-            // Release the pages that were allocated in the transaction...
-            freePages(allocateList);
-
-            freeList.clear();
-            allocateList.clear();
-            writes.clear();
-            writeTransactionId = -1;
-        }
-    }
-
-    private long getWriteTransactionId() {
-        if( writeTransactionId==-1 ) {
-            writeTransactionId = pageFile.getNextWriteTransactionId();
-        }
-        return writeTransactionId;
-    }
-
-    /**
-     * Queues up a page write that should get done when commit() gets called.
-     */
-    @SuppressWarnings("unchecked")
-    private void write(final Page page, byte[] data) throws IOException {
-        Long key = page.getPageId();
-        // TODO: if a large update transaction is in progress, we may want to move
-        // all the current updates to a temp file so that we don't keep using 
-        // up memory.
-        writes.put(key, new PageWrite(page, data));        
-    }   
-
-    /**
-     * @param list
-     * @throws RuntimeException
-     */
-    private void freePages(SequenceSet list) throws RuntimeException {
-        Sequence seq = list.getHead();
-        while( seq!=null ) {
-            seq.each(new Sequence.Closure<RuntimeException>(){
-                public void execute(long value) {
-                    pageFile.freePage(value);
-                }
-            });
-            seq = seq.getNext();
-        }
-    }
-    
-    /**
-     * @return true if there are no uncommitted page file updates associated with this transaction.
-     */
-    public boolean isReadOnly() {
-        return writeTransactionId==-1;
-    }
-    
-    ///////////////////////////////////////////////////////////////////
-    // Transaction closure helpers...
-    ///////////////////////////////////////////////////////////////////
-    
-    /**
-     * Executes a closure and if it does not throw any exceptions, then it commits the transaction.
-     * If the closure throws an Exception, then the transaction is rolled back.
-     * 
-     * @param <T>
-     * @param closure - the work to get exectued.
-     * @throws T if the closure throws it
-     * @throws IOException If the commit fails.
-     */
-    public <T extends Throwable> void execute(Closure<T> closure) throws T, IOException {
-        boolean success = false;
-        try {
-            closure.execute(this);
-            success = true;
-        } finally {
-            if (success) {
-                commit();
-            } else {
-                rollback();
-            }
-        }
-    }
-
-    /**
-     * Executes a closure and if it does not throw any exceptions, then it commits the transaction.
-     * If the closure throws an Exception, then the transaction is rolled back.
-     * 
-     * @param <T>
-     * @param closure - the work to get exectued.
-     * @throws T if the closure throws it
-     * @throws IOException If the commit fails.
-     */
-    public <R, T extends Throwable> R execute(CallableClosure<R, T> closure) throws T, IOException {
-        boolean success = false;
-        try {
-            R rc = closure.execute(this);
-            success = true;
-            return rc;
-        } finally {
-            if (success) {
-                commit();
-            } else {
-                rollback();
-            }
-        }
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayInputStream.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayInputStream.java
deleted file mode 100644
index 07caa46..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayInputStream.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Very similar to the java.io.ByteArrayInputStream but this version is not
- * thread safe.
- */
-public class ByteArrayInputStream extends InputStream {
-
-    byte buffer[];
-    int limit;
-    int pos;
-    int mark;
-
-    public ByteArrayInputStream(byte data[]) {
-        this(data, 0, data.length);
-    }
-
-    public ByteArrayInputStream(ByteSequence sequence) {
-        this(sequence.getData(), sequence.getOffset(), sequence.getLength());
-    }
-
-    public ByteArrayInputStream(byte data[], int offset, int size) {
-        this.buffer = data;
-        this.mark = offset;
-        this.pos = offset;
-        this.limit = offset + size;
-    }
-
-    public int read() throws IOException {
-        if (pos < limit) {
-            return buffer[pos++] & 0xff;
-        } else {
-            return -1;
-        }
-    }
-
-    public int read(byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-
-    public int read(byte b[], int off, int len) {
-        if (pos < limit) {
-            len = Math.min(len, limit - pos);
-            if (len > 0) {
-                System.arraycopy(buffer, pos, b, off, len);
-                pos += len;
-            }
-            return len;
-        } else {
-            return -1;
-        }
-    }
-
-    public long skip(long len) throws IOException {
-        if (pos < limit) {
-            len = Math.min(len, limit - pos);
-            if (len > 0) {
-                pos += len;
-            }
-            return len;
-        } else {
-            return -1;
-        }
-    }
-
-    public int available() {
-        return limit - pos;
-    }
-
-    public boolean markSupported() {
-        return true;
-    }
-
-    public void mark(int markpos) {
-        mark = pos;
-    }
-
-    public void reset() {
-        pos = mark;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayOutputStream.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayOutputStream.java
deleted file mode 100644
index 037bc0a..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayOutputStream.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.OutputStream;
-
-
-/**
- * Very similar to the java.io.ByteArrayOutputStream but this version 
- * is not thread safe and the resulting data is returned in a ByteSequence
- * to avoid an extra byte[] allocation.
- */
-public class ByteArrayOutputStream extends OutputStream {
-
-    byte buffer[];
-    int size;
-
-    public ByteArrayOutputStream() {
-        this(1028);
-    }
-    public ByteArrayOutputStream(int capacity) {
-        buffer = new byte[capacity];
-    }
-
-    public void write(int b) {
-        int newsize = size + 1;
-        checkCapacity(newsize);
-        buffer[size] = (byte) b;
-        size = newsize;
-    }
-
-    public void write(byte b[], int off, int len) {
-        int newsize = size + len;
-        checkCapacity(newsize);
-        System.arraycopy(b, off, buffer, size, len);
-        size = newsize;
-    }
-    
-    /**
-     * Ensures the the buffer has at least the minimumCapacity specified. 
-     * @param i
-     */
-    private void checkCapacity(int minimumCapacity) {
-        if (minimumCapacity > buffer.length) {
-            byte b[] = new byte[Math.max(buffer.length << 1, minimumCapacity)];
-            System.arraycopy(buffer, 0, b, 0, size);
-            buffer = b;
-        }
-    }
-
-    public void reset() {
-        size = 0;
-    }
-
-    public ByteSequence toByteSequence() {
-        return new ByteSequence(buffer, 0, size);
-    }
-    
-    public byte[] toByteArray() {
-        byte rc[] = new byte[size];
-        System.arraycopy(buffer, 0, rc, 0, size);
-        return rc;
-    }
-    
-    public int size() {
-        return size;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteSequence.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteSequence.java
deleted file mode 100644
index fab2614..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ByteSequence.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * 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.kahadb.util;
-
-public class ByteSequence {
-
-    public byte[] data;
-    public int offset;
-    public int length;
-
-    public ByteSequence() {
-    }
-    
-    public ByteSequence(byte data[]) {
-        this.data = data;
-        this.offset = 0;
-        this.length = data.length;
-    }
-
-    public ByteSequence(byte data[], int offset, int length) {
-        this.data = data;
-        this.offset = offset;
-        this.length = length;
-    }
-
-    public byte[] getData() {
-        return data;
-    }
-
-    public int getLength() {
-        return length;
-    }
-
-    public int getOffset() {
-        return offset;
-    }
-
-    public void setData(byte[] data) {
-        this.data = data;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-
-    public void setOffset(int offset) {
-        this.offset = offset;
-    }
-
-    public void compact() {
-        if (length != data.length) {
-            byte t[] = new byte[length];
-            System.arraycopy(data, offset, t, 0, length);
-            data = t;
-            offset = 0;
-        }
-    }
-
-    public int indexOf(ByteSequence needle, int pos) {
-        int max = length - needle.length;
-        for (int i = pos; i < max; i++) {
-            if (matches(needle, i)) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-    private boolean matches(ByteSequence needle, int pos) {
-        for (int i = 0; i < needle.length; i++) {
-            if( data[offset + pos+ i] != needle.data[needle.offset + i] ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    private byte getByte(int i) {
-        return data[offset+i];
-    }
-
-    final public int indexOf(byte value, int pos) {
-        for (int i = pos; i < length; i++) {
-            if (data[offset + i] == value) {
-                return i;
-            }
-        }
-        return -1;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/BytesMarshaller.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/BytesMarshaller.java
deleted file mode 100644
index 4e53466..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/BytesMarshaller.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * Implementation of a Marshaller for byte arrays
- * 
- * 
- */
-public class BytesMarshaller implements Marshaller<byte[]> {
-
-    public void writePayload(byte[] data, DataOutput dataOut) throws IOException {
-        dataOut.writeInt(data.length);
-        dataOut.write(data);
-    }
-
-    public byte[] readPayload(DataInput dataIn) throws IOException {
-        int size = dataIn.readInt();
-        byte[] data = new byte[size];
-        dataIn.readFully(data);
-        return data;
-    }
-    
-    public int getFixedSize() {
-        return -1;
-    }
-
-    public byte[] deepCopy(byte[] source) {
-        byte []rc = new byte[source.length];
-        System.arraycopy(source, 0, rc, 0, source.length);
-        return rc;
-    }
-
-    public boolean isDeepCopySupported() {
-        return true;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/CommandLineSupport.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/CommandLineSupport.java
deleted file mode 100644
index f389d08..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/CommandLineSupport.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- *
- * 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.kahadb.util;
-
-import java.util.ArrayList;
-
-/**
- * Support utility that can be used to set the properties on any object
- * using command line arguments.
- * 
- * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- */
-public class CommandLineSupport {
-	
-	/**
-	 * Sets the properties of an object given the command line args.
-	 * 
-	 * if args contains: --ack-mode=AUTO --url=tcp://localhost:61616 --persistent 
-	 * 
-	 * then it will try to call the following setters on the target object.
-	 * 
-	 * target.setAckMode("AUTO");
-	 * target.setURL(new URI("tcp://localhost:61616") );
-	 * target.setPersistent(true);
-	 * 
-	 * Notice the the proper conversion for the argument is determined by examining the 
-	 * setter argument type.  
-	 * 
-	 * @param target the object that will have it's properties set
-	 * @param args the command line options
-	 * @return any arguments that are not valid options for the target
-	 */
-	static public String[] setOptions(Object target, String []args) {
-		ArrayList rc = new ArrayList();
-		
-		for (int i = 0; i < args.length; i++) {
-			if( args[i] == null )
-				continue;
-			
-			if( args[i].startsWith("--") ) {
-				
-				// --options without a specified value are considered boolean flags that are enabled.
-				String value="true";
-				String name = args[i].substring(2);
-				
-				// if --option=value case
-				int p = name.indexOf("=");
-				if( p > 0 ) {
-					value = name.substring(p+1);
-					name = name.substring(0,p);
-				}
-				
-				// name not set, then it's an unrecognized option
-				if( name.length()==0 ) {
-					rc.add(args[i]);
-					continue;
-				}
-				
-				String propName = convertOptionToPropertyName(name);
-				if( !IntrospectionSupport.setProperty(target, propName, value) ) {					
-					rc.add(args[i]);
-					continue;
-				}
-			} else {
-                            rc.add(args[i]);
-			}
-			
-		}
-		
-		String r[] = new String[rc.size()];
-		rc.toArray(r);
-		return r;
-	}
-
-	/**
-	 * converts strings like: test-enabled to testEnabled
-	 * @param name
-	 * @return
-	 */
-	private static String convertOptionToPropertyName(String name) {
-		String rc="";
-		
-		// Look for '-' and strip and then convert the subsequent char to uppercase
-		int p = name.indexOf("-");
-		while( p > 0 ) {
-			// strip
-			rc += name.substring(0, p);
-			name = name.substring(p+1);
-			
-			// can I convert the next char to upper?
-			if( name.length() >0 ) {
-				rc += name.substring(0,1).toUpperCase();
-				name = name.substring(1);
-			}
-			
-			p = name.indexOf("-");
-		}
-		return rc+name;
-	}
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayInputStream.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayInputStream.java
deleted file mode 100755
index 519250b..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayInputStream.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataInput;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UTFDataFormatException;
-
-/**
- * Optimized ByteArrayInputStream that can be used more than once
- * 
- * 
- */
-public final class DataByteArrayInputStream extends InputStream implements DataInput {
-    private byte[] buf;
-    private int pos;
-    private int offset;
-    private int length;
-
-    /**
-     * Creates a <code>StoreByteArrayInputStream</code>.
-     * 
-     * @param buf the input buffer.
-     */
-    public DataByteArrayInputStream(byte buf[]) {
-        this.buf = buf;
-        this.pos = 0;
-        this.offset = 0;
-        this.length = buf.length;
-    }
-
-    /**
-     * Creates a <code>StoreByteArrayInputStream</code>.
-     * 
-     * @param sequence the input buffer.
-     */
-    public DataByteArrayInputStream(ByteSequence sequence) {
-        this.buf = sequence.getData();
-        this.offset = sequence.getOffset();
-        this.pos =  this.offset;
-        this.length = sequence.length;
-    }
-
-    /**
-     * Creates <code>WireByteArrayInputStream</code> with a minmalist byte
-     * array
-     */
-    public DataByteArrayInputStream() {
-        this(new byte[0]);
-    }
-
-    /**
-     * @return the size
-     */
-    public int size() {
-        return pos - offset;
-    }
-
-    /**
-     * @return the underlying data array
-     */
-    public byte[] getRawData() {
-        return buf;
-    }
-
-    /**
-     * reset the <code>StoreByteArrayInputStream</code> to use an new byte
-     * array
-     * 
-     * @param newBuff
-     */
-    public void restart(byte[] newBuff) {
-        buf = newBuff;
-        pos = 0;
-        length = newBuff.length;
-    }
-
-    public void restart() {
-        pos = 0;
-        length = buf.length;
-    }
-
-    /**
-     * reset the <code>StoreByteArrayInputStream</code> to use an new
-     * ByteSequence
-     * 
-     * @param sequence
-     */
-    public void restart(ByteSequence sequence) {
-        this.buf = sequence.getData();
-        this.pos = sequence.getOffset();
-        this.length = sequence.getLength();
-    }
-
-    /**
-     * re-start the input stream - reusing the current buffer
-     * 
-     * @param size
-     */
-    public void restart(int size) {
-        if (buf == null || buf.length < size) {
-            buf = new byte[size];
-        }
-        restart(buf);
-        this.length = size;
-    }
-
-    /**
-     * Reads the next byte of data from this input stream. The value byte is
-     * returned as an <code>int</code> in the range <code>0</code> to
-     * <code>255</code>. If no byte is available because the end of the
-     * stream has been reached, the value <code>-1</code> is returned.
-     * <p>
-     * This <code>read</code> method cannot block.
-     * 
-     * @return the next byte of data, or <code>-1</code> if the end of the
-     *         stream has been reached.
-     */
-    public int read() {
-        return (pos < length) ? (buf[pos++] & 0xff) : -1;
-    }
-
-    /**
-     * Reads up to <code>len</code> bytes of data into an array of bytes from
-     * this input stream.
-     * 
-     * @param b the buffer into which the data is read.
-     * @param off the start offset of the data.
-     * @param len the maximum number of bytes read.
-     * @return the total number of bytes read into the buffer, or
-     *         <code>-1</code> if there is no more data because the end of the
-     *         stream has been reached.
-     */
-    public int read(byte b[], int off, int len) {
-        if (b == null) {
-            throw new NullPointerException();
-        }
-        if (pos >= length) {
-            return -1;
-        }
-        if (pos + len > length) {
-            len = length - pos;
-        }
-        if (len <= 0) {
-            return 0;
-        }
-        System.arraycopy(buf, pos, b, off, len);
-        pos += len;
-        return len;
-    }
-
-    /**
-     * @return the number of bytes that can be read from the input stream
-     *         without blocking.
-     */
-    public int available() {
-        return length - pos;
-    }
-
-    public void readFully(byte[] b) {
-        read(b, 0, b.length);
-    }
-
-    public void readFully(byte[] b, int off, int len) {
-        read(b, off, len);
-    }
-
-    public int skipBytes(int n) {
-        if (pos + n > length) {
-            n = length - pos;
-        }
-        if (n < 0) {
-            return 0;
-        }
-        pos += n;
-        return n;
-    }
-
-    public boolean readBoolean() {
-        return read() != 0;
-    }
-
-    public byte readByte() {
-        return (byte)read();
-    }
-
-    public int readUnsignedByte() {
-        return read();
-    }
-
-    public short readShort() {
-        int ch1 = read();
-        int ch2 = read();
-        return (short)((ch1 << 8) + (ch2 << 0));
-    }
-
-    public int readUnsignedShort() {
-        int ch1 = read();
-        int ch2 = read();
-        return (ch1 << 8) + (ch2 << 0);
-    }
-
-    public char readChar() {
-        int ch1 = read();
-        int ch2 = read();
-        return (char)((ch1 << 8) + (ch2 << 0));
-    }
-
-    public int readInt() {
-        int ch1 = read();
-        int ch2 = read();
-        int ch3 = read();
-        int ch4 = read();
-        return (ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0);
-    }
-
-    public long readLong() {
-        long rc = ((long)buf[pos++] << 56) + ((long)(buf[pos++] & 255) << 48) + ((long)(buf[pos++] & 255) << 40) + ((long)(buf[pos++] & 255) << 32);
-        return rc + ((long)(buf[pos++] & 255) << 24) + ((buf[pos++] & 255) << 16) + ((buf[pos++] & 255) << 8) + ((buf[pos++] & 255) << 0);
-    }
-
-    public float readFloat() throws IOException {
-        return Float.intBitsToFloat(readInt());
-    }
-
-    public double readDouble() throws IOException {
-        return Double.longBitsToDouble(readLong());
-    }
-
-    public String readLine() {
-        int start = pos;
-        while (pos < length) {
-            int c = read();
-            if (c == '\n') {
-                break;
-            }
-            if (c == '\r') {
-                c = read();
-                if (c != '\n' && c != -1) {
-                    pos--;
-                }
-                break;
-            }
-        }
-        return new String(buf, start, pos);
-    }
-
-    public String readUTF() throws IOException {
-        int length = readUnsignedShort();
-        char[] characters = new char[length];
-        int c;
-        int c2;
-        int c3;
-        int count = 0;
-        int total = pos + length;
-        while (pos < total) {
-            c = (int)buf[pos] & 0xff;
-            if (c > 127) {
-                break;
-            }
-            pos++;
-            characters[count++] = (char)c;
-        }
-        while (pos < total) {
-            c = (int)buf[pos] & 0xff;
-            switch (c >> 4) {
-            case 0:
-            case 1:
-            case 2:
-            case 3:
-            case 4:
-            case 5:
-            case 6:
-            case 7:
-                pos++;
-                characters[count++] = (char)c;
-                break;
-            case 12:
-            case 13:
-                pos += 2;
-                if (pos > length) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                c2 = (int)buf[pos - 1];
-                if ((c2 & 0xC0) != 0x80) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                characters[count++] = (char)(((c & 0x1F) << 6) | (c2 & 0x3F));
-                break;
-            case 14:
-                pos += 3;
-                if (pos > length) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                c2 = (int)buf[pos - 2];
-                c3 = (int)buf[pos - 1];
-                if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80)) {
-                    throw new UTFDataFormatException("bad string");
-                }
-                characters[count++] = (char)(((c & 0x0F) << 12) | ((c2 & 0x3F) << 6) | ((c3 & 0x3F) << 0));
-                break;
-            default:
-                throw new UTFDataFormatException("bad string");
-            }
-        }
-        return new String(characters, 0, count);
-    }
-
-    public int getPos() {
-        return pos;
-    }
-
-    public void setPos(int pos) {
-        this.pos = pos;
-    }
-
-    public int getLength() {
-        return length;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayOutputStream.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayOutputStream.java
deleted file mode 100755
index 8dfe986..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayOutputStream.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UTFDataFormatException;
-
-/**
- * Optimized ByteArrayOutputStream
- * 
- * 
- */
-public class DataByteArrayOutputStream extends OutputStream implements DataOutput {
-    private static final int DEFAULT_SIZE = 2048;
-    protected byte buf[];
-    protected int pos;
-
-    /**
-     * Creates a new byte array output stream, with a buffer capacity of the
-     * specified size, in bytes.
-     * 
-     * @param size the initial size.
-     * @exception IllegalArgumentException if size is negative.
-     */
-    public DataByteArrayOutputStream(int size) {
-        if (size < 0) {
-            throw new IllegalArgumentException("Invalid size: " + size);
-        }
-        buf = new byte[size];
-    }
-
-    /**
-     * Creates a new byte array output stream.
-     */
-    public DataByteArrayOutputStream() {
-        this(DEFAULT_SIZE);
-    }
-
-    /**
-     * start using a fresh byte array
-     * 
-     * @param size
-     */
-    public void restart(int size) {
-        buf = new byte[size];
-        pos = 0;
-    }
-
-    /**
-     * start using a fresh byte array
-     */
-    public void restart() {
-        restart(DEFAULT_SIZE);
-    }
-
-    /**
-     * Get a ByteSequence from the stream
-     * 
-     * @return the byte sequence
-     */
-    public ByteSequence toByteSequence() {
-        return new ByteSequence(buf, 0, pos);
-    }
-
-    /**
-     * Writes the specified byte to this byte array output stream.
-     * 
-     * @param b the byte to be written.
-     * @throws IOException 
-     */
-    public void write(int b) throws IOException {
-        int newcount = pos + 1;
-        ensureEnoughBuffer(newcount);
-        buf[pos] = (byte)b;
-        pos = newcount;
-        onWrite();
-    }
-
-    /**
-     * Writes <code>len</code> bytes from the specified byte array starting at
-     * offset <code>off</code> to this byte array output stream.
-     * 
-     * @param b the data.
-     * @param off the start offset in the data.
-     * @param len the number of bytes to write.
-     * @throws IOException 
-     */
-    public void write(byte b[], int off, int len) throws IOException {
-        if (len == 0) {
-            return;
-        }
-        int newcount = pos + len;
-        ensureEnoughBuffer(newcount);
-        System.arraycopy(b, off, buf, pos, len);
-        pos = newcount;
-        onWrite();
-    }
-
-    /**
-     * @return the underlying byte[] buffer
-     */
-    public byte[] getData() {
-        return buf;
-    }
-
-    /**
-     * reset the output stream
-     */
-    public void reset() {
-        pos = 0;
-    }
-
-    /**
-     * Set the current position for writing
-     * 
-     * @param offset
-     * @throws IOException 
-     */
-    public void position(int offset) throws IOException {
-        ensureEnoughBuffer(offset);
-        pos = offset;
-        onWrite();
-    }
-
-    public int size() {
-        return pos;
-    }
-
-    public void writeBoolean(boolean v) throws IOException {
-        ensureEnoughBuffer(pos + 1);
-        buf[pos++] = (byte)(v ? 1 : 0);
-        onWrite();
-    }
-
-    public void writeByte(int v) throws IOException {
-        ensureEnoughBuffer(pos + 1);
-        buf[pos++] = (byte)(v >>> 0);
-        onWrite();
-    }
-
-    public void writeShort(int v) throws IOException {
-        ensureEnoughBuffer(pos + 2);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-        onWrite();
-    }
-
-    public void writeChar(int v) throws IOException {
-        ensureEnoughBuffer(pos + 2);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-        onWrite();
-    }
-
-    public void writeInt(int v) throws IOException {
-        ensureEnoughBuffer(pos + 4);
-        buf[pos++] = (byte)(v >>> 24);
-        buf[pos++] = (byte)(v >>> 16);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-        onWrite();
-    }
-
-    public void writeLong(long v) throws IOException {
-        ensureEnoughBuffer(pos + 8);
-        buf[pos++] = (byte)(v >>> 56);
-        buf[pos++] = (byte)(v >>> 48);
-        buf[pos++] = (byte)(v >>> 40);
-        buf[pos++] = (byte)(v >>> 32);
-        buf[pos++] = (byte)(v >>> 24);
-        buf[pos++] = (byte)(v >>> 16);
-        buf[pos++] = (byte)(v >>> 8);
-        buf[pos++] = (byte)(v >>> 0);
-        onWrite();
-    }
-
-    public void writeFloat(float v) throws IOException {
-        writeInt(Float.floatToIntBits(v));
-    }
-
-    public void writeDouble(double v) throws IOException {
-        writeLong(Double.doubleToLongBits(v));
-    }
-
-    public void writeBytes(String s) throws IOException {
-        int length = s.length();
-        for (int i = 0; i < length; i++) {
-            write((byte)s.charAt(i));
-        }
-    }
-
-    public void writeChars(String s) throws IOException {
-        int length = s.length();
-        for (int i = 0; i < length; i++) {
-            int c = s.charAt(i);
-            write((c >>> 8) & 0xFF);
-            write((c >>> 0) & 0xFF);
-        }
-    }
-
-    public void writeUTF(String str) throws IOException {
-        int strlen = str.length();
-        int encodedsize = 0;
-        int c;
-        for (int i = 0; i < strlen; i++) {
-            c = str.charAt(i);
-            if ((c >= 0x0001) && (c <= 0x007F)) {
-                encodedsize++;
-            } else if (c > 0x07FF) {
-                encodedsize += 3;
-            } else {
-                encodedsize += 2;
-            }
-        }
-        if (encodedsize > 65535) {
-            throw new UTFDataFormatException("encoded string too long: " + encodedsize + " bytes");
-        }
-        ensureEnoughBuffer(pos + encodedsize + 2);
-        writeShort(encodedsize);
-        int i = 0;
-        for (i = 0; i < strlen; i++) {
-            c = str.charAt(i);
-            if (!((c >= 0x0001) && (c <= 0x007F))) {
-                break;
-            }
-            buf[pos++] = (byte)c;
-        }
-        for (; i < strlen; i++) {
-            c = str.charAt(i);
-            if ((c >= 0x0001) && (c <= 0x007F)) {
-                buf[pos++] = (byte)c;
-            } else if (c > 0x07FF) {
-                buf[pos++] = (byte)(0xE0 | ((c >> 12) & 0x0F));
-                buf[pos++] = (byte)(0x80 | ((c >> 6) & 0x3F));
-                buf[pos++] = (byte)(0x80 | ((c >> 0) & 0x3F));
-            } else {
-                buf[pos++] = (byte)(0xC0 | ((c >> 6) & 0x1F));
-                buf[pos++] = (byte)(0x80 | ((c >> 0) & 0x3F));
-            }
-        }
-        onWrite();
-    }
-
-    private void ensureEnoughBuffer(int newcount) {
-        if (newcount > buf.length) {
-            byte newbuf[] = new byte[Math.max(buf.length << 1, newcount)];
-            System.arraycopy(buf, 0, newbuf, 0, pos);
-            buf = newbuf;
-        }
-    }
-    
-    /**
-     * This method is called after each write to the buffer.  This should allow subclasses 
-     * to take some action based on the writes, for example flushing data to an external system based on size. 
-     */
-    protected void onWrite() throws IOException {
-    }
-
-    public void skip(int size) throws IOException {
-        ensureEnoughBuffer(pos + size);
-        pos+=size;
-        onWrite();
-    }
-
-    public ByteSequence getByteSequence() {
-        return new ByteSequence(buf, 0, pos);
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/DiskBenchmark.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/DiskBenchmark.java
deleted file mode 100644
index 36e790e..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/DiskBenchmark.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-/**
- * This class is used to get a benchmark the raw disk performance.
- */
-public class DiskBenchmark {
-
-    boolean verbose;
-    // reads and writes work with 4k of data at a time.
-    int bs=1024*4; 
-    // Work with 100 meg file.
-    long size=1024*1024*500; 
-    long sampleInterval = 10*1000; 
-    
-    public static void main(String[] args) {
-
-        DiskBenchmark benchmark = new DiskBenchmark();
-        args = CommandLineSupport.setOptions(benchmark, args);
-        ArrayList<String> files = new ArrayList<String>();
-        if (args.length == 0) {
-            files.add("disk-benchmark.dat");
-        } else {
-            files.addAll(Arrays.asList(args));
-        }
-
-        for (String f : files) {
-            try {
-                File file = new File(f);
-                if (file.exists()) {
-                    System.out.println("File " + file + " allready exists, will not benchmark.");
-                } else {
-                    System.out.println("Benchmarking: " + file.getCanonicalPath());
-                    Report report = benchmark.benchmark(file);
-                    file.delete();
-                    System.out.println(report.toString());
-                }
-            } catch (Throwable e) {
-                if (benchmark.verbose) {
-                    System.out.println("ERROR:");
-                    e.printStackTrace(System.out);
-                } else {
-                    System.out.println("ERROR: " + e);
-                }
-            }
-        }
-
-    }
-    
-    public static class Report {
-
-        public int size;
-        
-        public int writes;
-        public long writeDuration;
-        
-        public int syncWrites;
-        public long syncWriteDuration;
-        
-        public int reads;
-        public long readDuration;
-
-        @Override
-        public String toString() {
-            return 
-            "Writes: \n" +
-            "  "+writes+" writes of size "+size+" written in "+(writeDuration/1000.0)+" seconds.\n"+
-            "  "+getWriteRate()+" writes/second.\n"+
-            "  "+getWriteSizeRate()+" megs/second.\n"+
-            "\n"+
-            "Sync Writes: \n" +
-            "  "+syncWrites+" writes of size "+size+" written in "+(syncWriteDuration/1000.0)+" seconds.\n"+
-            "  "+getSyncWriteRate()+" writes/second.\n"+
-            "  "+getSyncWriteSizeRate()+" megs/second.\n"+
-            "\n"+
-            "Reads: \n" +
-            "  "+reads+" reads of size "+size+" read in "+(readDuration/1000.0)+" seconds.\n"+
-            "  "+getReadRate()+" writes/second.\n"+
-            "  "+getReadSizeRate()+" megs/second.\n"+
-            "\n"+
-            "";
-        }
-
-        private float getWriteSizeRate() {
-            float rc = writes;
-            rc *= size;
-            rc /= (1024*1024); // put it in megs
-            rc /= (writeDuration/1000.0); // get rate. 
-            return rc;
-        }
-
-        private float getWriteRate() {
-            float rc = writes;
-            rc /= (writeDuration/1000.0); // get rate. 
-            return rc;
-        }
-        
-        private float getSyncWriteSizeRate() {
-            float rc = syncWrites;
-            rc *= size;
-            rc /= (1024*1024); // put it in megs
-            rc /= (syncWriteDuration/1000.0); // get rate. 
-            return rc;
-        }
-
-        private float getSyncWriteRate() {
-            float rc = syncWrites;
-            rc /= (syncWriteDuration/1000.0); // get rate. 
-            return rc;
-        }
-        private float getReadSizeRate() {
-            float rc = reads;
-            rc *= size;
-            rc /= (1024*1024); // put it in megs
-            rc /= (readDuration/1000.0); // get rate. 
-            return rc;
-        }
-
-        private float getReadRate() {
-            float rc = reads;
-            rc /= (readDuration/1000.0); // get rate. 
-            return rc;
-        }
-
-        public int getSize() {
-            return size;
-        }
-
-        public void setSize(int size) {
-            this.size = size;
-        }
-
-        public int getWrites() {
-            return writes;
-        }
-
-        public void setWrites(int writes) {
-            this.writes = writes;
-        }
-
-        public long getWriteDuration() {
-            return writeDuration;
-        }
-
-        public void setWriteDuration(long writeDuration) {
-            this.writeDuration = writeDuration;
-        }
-
-        public int getSyncWrites() {
-            return syncWrites;
-        }
-
-        public void setSyncWrites(int syncWrites) {
-            this.syncWrites = syncWrites;
-        }
-
-        public long getSyncWriteDuration() {
-            return syncWriteDuration;
-        }
-
-        public void setSyncWriteDuration(long syncWriteDuration) {
-            this.syncWriteDuration = syncWriteDuration;
-        }
-
-        public int getReads() {
-            return reads;
-        }
-
-        public void setReads(int reads) {
-            this.reads = reads;
-        }
-
-        public long getReadDuration() {
-            return readDuration;
-        }
-
-        public void setReadDuration(long readDuration) {
-            this.readDuration = readDuration;
-        }
-    }
-
-
-    public Report benchmark(File file) throws IOException {
-        Report rc = new Report();
-        
-        // Initialize the block we will be writing to disk.
-        byte []data = new byte[bs];
-        for (int i = 0; i < data.length; i++) {
-            data[i] = (byte)('a'+(i%26));
-        }
-        
-        rc.size = data.length;
-        RandomAccessFile raf = new RandomAccessFile(file, "rw");
-        raf.setLength(size);
-        
-        // Figure out how many writes we can do in the sample interval.
-        long start = System.currentTimeMillis();
-        long now = System.currentTimeMillis();
-        int ioCount=0;
-        while( true ) {
-            if( (now-start)>sampleInterval ) {
-                break;
-            }
-            raf.seek(0);
-            for( long i=0; i+data.length < size; i+=data.length) {
-                raf.write(data);
-                ioCount++;
-                now = System.currentTimeMillis();
-                if( (now-start)>sampleInterval ) {
-                    break;
-                }
-            }
-            // Sync to disk so that the we actually write the data to disk.. otherwise 
-            // OS buffering might not really do the write.
-            raf.getFD().sync();
-        }
-        raf.getFD().sync();
-        raf.close();
-        now = System.currentTimeMillis();
-        
-        rc.size = data.length;
-        rc.writes = ioCount;
-        rc.writeDuration = (now-start);
-
-        raf = new RandomAccessFile(file, "rw");
-        start = System.currentTimeMillis();
-        now = System.currentTimeMillis();
-        ioCount=0;
-        while( true ) {
-            if( (now-start)>sampleInterval ) {
-                break;
-            }
-            for( long i=0; i+data.length < size; i+=data.length) {
-                raf.seek(i);
-                raf.write(data);
-                raf.getFD().sync();
-                ioCount++;
-                now = System.currentTimeMillis();
-                if( (now-start)>sampleInterval ) {
-                    break;
-                }
-            }
-        }
-        raf.close();
-        now = System.currentTimeMillis();
-        rc.syncWrites = ioCount;
-        rc.syncWriteDuration = (now-start);
-
-        raf = new RandomAccessFile(file, "rw");
-        start = System.currentTimeMillis();
-        now = System.currentTimeMillis();
-        ioCount=0;
-        while( true ) {
-            if( (now-start)>sampleInterval ) {
-                break;
-            }
-            raf.seek(0);
-            for( long i=0; i+data.length < size; i+=data.length) {
-                raf.seek(i);
-                raf.readFully(data);
-                ioCount++;
-                now = System.currentTimeMillis();
-                if( (now-start)>sampleInterval ) {
-                    break;
-                }
-            }
-        }
-        raf.close();
-        
-        rc.reads = ioCount;
-        rc.readDuration = (now-start);
-        return rc;
-    }
-
-
-    public boolean isVerbose() {
-        return verbose;
-    }
-
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-
-    public int getBs() {
-        return bs;
-    }
-
-
-    public void setBs(int bs) {
-        this.bs = bs;
-    }
-
-
-    public long getSize() {
-        return size;
-    }
-
-
-    public void setSize(long size) {
-        this.size = size;
-    }
-
-
-    public long getSampleInterval() {
-        return sampleInterval;
-    }
-
-
-    public void setSampleInterval(long sampleInterval) {
-        this.sampleInterval = sampleInterval;
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/HexSupport.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/HexSupport.java
deleted file mode 100755
index 192cde2..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/HexSupport.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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.kahadb.util;
-
-/**
- * Used to convert to hex from byte arrays and back.
- * 
- * 
- */
-public final class HexSupport {
-    
-    private static final String[] HEX_TABLE = new String[]{
-        "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f",
-        "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f",
-        "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f",
-        "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f",
-        "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f",
-        "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f",
-        "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f",
-        "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f",
-        "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f",
-        "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f",
-        "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af",
-        "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf",
-        "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf",
-        "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df",
-        "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef",
-        "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff",
-    };
-    private static final int[] INT_OFFSETS = new int[]{
-    	24,16,8,0
-    };
-    
-    private HexSupport() {
-    }
-    
-    /**
-     * @param hex
-     * @return
-     */
-    public static byte[] toBytesFromHex(String hex) {
-        byte rc[] = new byte[hex.length() / 2];
-        for (int i = 0; i < rc.length; i++) {
-            String h = hex.substring(i * 2, i * 2 + 2);
-            int x = Integer.parseInt(h, 16);
-            rc[i] = (byte) x;
-        }
-        return rc;
-    }
-
-    /**
-     * @param bytes
-     * @return
-     */
-    public static String toHexFromBytes(byte[] bytes) {
-        StringBuffer rc = new StringBuffer(bytes.length * 2);
-        for (int i = 0; i < bytes.length; i++) {
-            rc.append(HEX_TABLE[0xFF & bytes[i]]);
-        }
-        return rc.toString();
-    }
-
-    /**
-     * 
-     * @param value 
-     * @param trim if the leading 0's should be trimmed off.
-     * @return
-     */
-    public static String toHexFromInt(int value, boolean trim) {
-        StringBuffer rc = new StringBuffer(INT_OFFSETS.length*2);
-        for (int i = 0; i < INT_OFFSETS.length; i++) {
-        	int b = 0xFF & (value>>INT_OFFSETS[i]);
-        	if( !(trim && b == 0) ) { 
-        		rc.append(HEX_TABLE[b]);
-        		trim=false;
-        	}
-        }
-        return rc.toString();
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IOExceptionSupport.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/IOExceptionSupport.java
deleted file mode 100755
index 68338c5..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IOExceptionSupport.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.IOException;
-
-public final class IOExceptionSupport {
-
-    private IOExceptionSupport() {
-    }
-
-    public static IOException create(String msg, Throwable cause) {
-        IOException exception = new IOException(msg);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static IOException create(String msg, Exception cause) {
-        IOException exception = new IOException(msg);
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static IOException create(Throwable cause) {
-        IOException exception = new IOException(cause.getMessage());
-        exception.initCause(cause);
-        return exception;
-    }
-
-    public static IOException create(Exception cause) {
-        IOException exception = new IOException(cause.getMessage());
-        exception.initCause(cause);
-        return exception;
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IOHelper.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/IOHelper.java
deleted file mode 100644
index 0504221..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IOHelper.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * 
- */
-public final class IOHelper {
-    protected static final int MAX_DIR_NAME_LENGTH;
-    protected static final int MAX_FILE_NAME_LENGTH;
-    private static final int DEFAULT_BUFFER_SIZE = 4096;
-    private IOHelper() {
-    }
-
-    public static String getDefaultDataDirectory() {
-        return getDefaultDirectoryPrefix() + "activemq-data";
-    }
-
-    public static String getDefaultStoreDirectory() {
-        return getDefaultDirectoryPrefix() + "amqstore";
-    }
-
-    /**
-     * Allows a system property to be used to overload the default data
-     * directory which can be useful for forcing the test cases to use a target/
-     * prefix
-     */
-    public static String getDefaultDirectoryPrefix() {
-        try {
-            return System.getProperty("org.apache.activemq.default.directory.prefix", "");
-        } catch (Exception e) {
-            return "";
-        }
-    }
-
-    /**
-     * Converts any string into a string that is safe to use as a file name.
-     * The result will only include ascii characters and numbers, and the "-","_", and "." characters.
-     *
-     * @param name
-     * @return
-     */
-    public static String toFileSystemDirectorySafeName(String name) {
-        return toFileSystemSafeName(name, true, MAX_DIR_NAME_LENGTH);
-    }
-    
-    public static String toFileSystemSafeName(String name) {
-        return toFileSystemSafeName(name, false, MAX_FILE_NAME_LENGTH);
-    }
-    
-    /**
-     * Converts any string into a string that is safe to use as a file name.
-     * The result will only include ascii characters and numbers, and the "-","_", and "." characters.
-     *
-     * @param name
-     * @param dirSeparators 
-     * @param maxFileLength 
-     * @return
-     */
-    public static String toFileSystemSafeName(String name,boolean dirSeparators,int maxFileLength) {
-        int size = name.length();
-        StringBuffer rc = new StringBuffer(size * 2);
-        for (int i = 0; i < size; i++) {
-            char c = name.charAt(i);
-            boolean valid = c >= 'a' && c <= 'z';
-            valid = valid || (c >= 'A' && c <= 'Z');
-            valid = valid || (c >= '0' && c <= '9');
-            valid = valid || (c == '_') || (c == '-') || (c == '.') || (c=='#')
-                    ||(dirSeparators && ( (c == '/') || (c == '\\')));
-
-            if (valid) {
-                rc.append(c);
-            } else {
-                // Encode the character using hex notation
-                rc.append('#');
-                rc.append(HexSupport.toHexFromInt(c, true));
-            }
-        }
-        String result = rc.toString();
-        if (result.length() > maxFileLength) {
-            result = result.substring(result.length()-maxFileLength,result.length());
-        }
-        return result;
-    }
-    
-    public static boolean deleteFile(File fileToDelete) {
-        if (fileToDelete == null || !fileToDelete.exists()) {
-            return true;
-        }
-        boolean result = deleteChildren(fileToDelete);
-        result &= fileToDelete.delete();
-        return result;
-    }
-    
-    public static boolean deleteChildren(File parent) {
-        if (parent == null || !parent.exists()) {
-            return false;
-        }
-        boolean result = true;
-        if (parent.isDirectory()) {
-            File[] files = parent.listFiles();
-            if (files == null) {
-                result = false;
-            } else {
-                for (int i = 0; i < files.length; i++) {
-                    File file = files[i];
-                    if (file.getName().equals(".")
-                            || file.getName().equals("..")) {
-                        continue;
-                    }
-                    if (file.isDirectory()) {
-                        result &= deleteFile(file);
-                    } else {
-                        result &= file.delete();
-                    }
-                }
-            }
-        }
-       
-        return result;
-    }
-    
-    
-    public static void moveFile(File src, File targetDirectory) throws IOException {
-        if (!src.renameTo(new File(targetDirectory, src.getName()))) {
-            throw new IOException("Failed to move " + src + " to " + targetDirectory);
-        }
-    }
-    
-    public static void copyFile(File src, File dest) throws IOException {
-        FileInputStream fileSrc = new FileInputStream(src);
-        FileOutputStream fileDest = new FileOutputStream(dest);
-        copyInputStream(fileSrc, fileDest);
-    }
-    
-    public static void copyInputStream(InputStream in, OutputStream out) throws IOException {
-        byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
-        int len = in.read(buffer);
-        while (len >= 0) {
-            out.write(buffer, 0, len);
-            len = in.read(buffer);
-        }
-        in.close();
-        out.close();
-    }
-    
-    static {
-        MAX_DIR_NAME_LENGTH = Integer.valueOf(System.getProperty("MaximumDirNameLength","200")).intValue();  
-        MAX_FILE_NAME_LENGTH = Integer.valueOf(System.getProperty("MaximumFileNameLength","64")).intValue();             
-    }
-
-    
-    public static void mkdirs(File dir) throws IOException {
-        if (dir.exists()) {
-            if (!dir.isDirectory()) {
-                throw new IOException("Failed to create directory '" + dir +"', regular file already existed with that name");
-            }
-            
-        } else {
-            if (!dir.mkdirs()) {
-                throw new IOException("Failed to create directory '" + dir+"'");
-            }
-        }
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IntegerMarshaller.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/IntegerMarshaller.java
deleted file mode 100644
index d99da95..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IntegerMarshaller.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * Implementation of a Marshaller for a Integer
- * 
- * 
- */
-public class IntegerMarshaller implements Marshaller<Integer> {
-    
-    public static final IntegerMarshaller INSTANCE = new IntegerMarshaller();
-    
-    public void writePayload(Integer object, DataOutput dataOut) throws IOException {
-        dataOut.writeInt(object);
-    }
-
-    public Integer readPayload(DataInput dataIn) throws IOException {
-        return dataIn.readInt();
-    }
-
-    public int getFixedSize() {
-        return 4;
-    }
-
-    
-    /** 
-     * @return the source object since integers are immutable. 
-     */
-    public Integer deepCopy(Integer source) {
-        return source;
-    }
-
-    public boolean isDeepCopySupported() {
-        return true;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IntrospectionSupport.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/IntrospectionSupport.java
deleted file mode 100755
index 1233fa2..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/IntrospectionSupport.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.beans.PropertyEditor;
-import java.beans.PropertyEditorManager;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-public final class IntrospectionSupport {
-    
-    private IntrospectionSupport() {
-    }
-
-    public static boolean getProperties(Object target, Map props, String optionPrefix) {
-
-        boolean rc = false;
-        if (target == null) {
-            throw new IllegalArgumentException("target was null.");
-        }
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        if (optionPrefix == null) {
-            optionPrefix = "";
-        }
-
-        Class clazz = target.getClass();
-        Method[] methods = clazz.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-            String name = method.getName();
-            Class type = method.getReturnType();
-            Class params[] = method.getParameterTypes();
-            if ((name.startsWith("is") || name.startsWith("get")) && params.length == 0 && type != null && isSettableType(type)) {
-
-                try {
-
-                    Object value = method.invoke(target, new Object[] {});
-                    if (value == null) {
-                        continue;
-                    }
-
-                    String strValue = convertToString(value, type);
-                    if (strValue == null) {
-                        continue;
-                    }
-                    if (name.startsWith("get")) {
-                        name = name.substring(3, 4).toLowerCase()
-                                + name.substring(4);
-                    } else {
-                        name = name.substring(2, 3).toLowerCase()
-                                + name.substring(3);
-                    }
-                    props.put(optionPrefix + name, strValue);
-                    rc = true;
-
-                } catch (Throwable ignore) {
-                    ignore.printStackTrace();
-                }
-
-            }
-        }
-
-        return rc;
-    }
-
-    public static boolean setProperties(Object target, Map props, String optionPrefix) {
-        boolean rc = false;
-        if (target == null) {
-            throw new IllegalArgumentException("target was null.");
-        }
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        for (Iterator<String> iter = props.keySet().iterator(); iter.hasNext();) {
-            String name = iter.next();
-            if (name.startsWith(optionPrefix)) {
-                Object value = props.get(name);
-                name = name.substring(optionPrefix.length());
-                if (setProperty(target, name, value)) {
-                    iter.remove();
-                    rc = true;
-                }
-            }
-        }
-        return rc;
-    }
-
-    public static Map<String, Object> extractProperties(Map props, String optionPrefix) {
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        HashMap<String, Object> rc = new HashMap<String, Object>(props.size());
-
-        for (Iterator iter = props.keySet().iterator(); iter.hasNext();) {
-            String name = (String)iter.next();
-            if (name.startsWith(optionPrefix)) {
-                Object value = props.get(name);
-                name = name.substring(optionPrefix.length());
-                rc.put(name, value);
-                iter.remove();
-            }
-        }
-
-        return rc;
-    }
-
-    public static boolean setProperties(Object target, Map props) {
-        boolean rc = false;
-
-        if (target == null) {
-            throw new IllegalArgumentException("target was null.");
-        }
-        if (props == null) {
-            throw new IllegalArgumentException("props was null.");
-        }
-
-        for (Iterator iter = props.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Entry)iter.next();
-            if (setProperty(target, (String)entry.getKey(), entry.getValue())) {
-                iter.remove();
-                rc = true;
-            }
-        }
-
-        return rc;
-    }
-
-    public static boolean setProperty(Object target, String name, Object value) {
-        try {
-            Class clazz = target.getClass();
-            Method setter = findSetterMethod(clazz, name);
-            if (setter == null) {
-                return false;
-            }
-
-            // If the type is null or it matches the needed type, just use the
-            // value directly
-            if (value == null || value.getClass() == setter.getParameterTypes()[0]) {
-                setter.invoke(target, new Object[] {value});
-            } else {
-                // We need to convert it
-                setter.invoke(target, new Object[] {convert(value, setter.getParameterTypes()[0])});
-            }
-            return true;
-        } catch (Throwable ignore) {
-            return false;
-        }
-    }
-
-    private static Object convert(Object value, Class type) throws URISyntaxException {
-        PropertyEditor editor = PropertyEditorManager.findEditor(type);
-        if (editor != null) {
-            editor.setAsText(value.toString());
-            return editor.getValue();
-        }
-        if (type == URI.class) {
-            return new URI(value.toString());
-        }
-        return null;
-    }
-
-    private static String convertToString(Object value, Class type) throws URISyntaxException {
-        PropertyEditor editor = PropertyEditorManager.findEditor(type);
-        if (editor != null) {
-            editor.setValue(value);
-            return editor.getAsText();
-        }
-        if (type == URI.class) {
-            return ((URI)value).toString();
-        }
-        return null;
-    }
-
-    private static Method findSetterMethod(Class clazz, String name) {
-        // Build the method name.
-        name = "set" + name.substring(0, 1).toUpperCase() + name.substring(1);
-        Method[] methods = clazz.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-            Class params[] = method.getParameterTypes();
-            if (method.getName().equals(name) && params.length == 1 ) {
-                return method;
-            }
-        }
-        return null;
-    }
-
-    private static boolean isSettableType(Class clazz) {
-        if (PropertyEditorManager.findEditor(clazz) != null) {
-            return true;
-        }
-        if (clazz == URI.class) {
-            return true;
-        }
-        if (clazz == Boolean.class) {
-            return true;
-        }
-        return false;
-    }
-
-    public static String toString(Object target) {
-        return toString(target, Object.class);
-    }
-
-    public static String toString(Object target, Class stopClass) {
-        LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();
-        addFields(target, target.getClass(), stopClass, map);
-        StringBuffer buffer = new StringBuffer(simpleName(target.getClass()));
-        buffer.append(" {");
-        Set entrySet = map.entrySet();
-        boolean first = true;
-        for (Iterator iter = entrySet.iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
-            if (first) {
-                first = false;
-            } else {
-                buffer.append(", ");
-            }
-            buffer.append(entry.getKey());
-            buffer.append(" = ");
-            appendToString(buffer, entry.getValue());
-        }
-        buffer.append("}");
-        return buffer.toString();
-    }
-
-    protected static void appendToString(StringBuffer buffer, Object value) {
-        buffer.append(value);
-    }
-
-    public static String simpleName(Class clazz) {
-        String name = clazz.getName();
-        int p = name.lastIndexOf(".");
-        if (p >= 0) {
-            name = name.substring(p + 1);
-        }
-        return name;
-    }
-
-    private static void addFields(Object target, Class startClass, Class<Object> stopClass, LinkedHashMap<String, Object> map) {
-
-        if (startClass != stopClass) {
-            addFields(target, startClass.getSuperclass(), stopClass, map);
-        }
-
-        Field[] fields = startClass.getDeclaredFields();
-        for (int i = 0; i < fields.length; i++) {
-            Field field = fields[i];
-            if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())
-                || Modifier.isPrivate(field.getModifiers())) {
-                continue;
-            }
-
-            try {
-                field.setAccessible(true);
-                Object o = field.get(target);
-                if (o != null && o.getClass().isArray()) {
-                    try {
-                        o = Arrays.asList((Object[])o);
-                    } catch (Throwable e) {
-                    }
-                }
-                map.put(field.getName(), o);
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LRUCache.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/LRUCache.java
deleted file mode 100755
index ae4d479..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LRUCache.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * A Simple LRU Cache
- * 
- * 
- * @param <K>
- * @param <V>
- */
-
-public class LRUCache<K, V> extends LinkedHashMap<K, V> {
-    private static final long serialVersionUID = -342098639681884413L;
-    protected int maxCacheSize = 10000;
-
-    /**
-     * Default constructor for an LRU Cache The default capacity is 10000
-     */
-    public LRUCache() {
-        this(0,10000, 0.75f, true);
-    }
-
-    /**
-     * Constructs a LRUCache with a maximum capacity
-     * 
-     * @param maximumCacheSize
-     */
-    public LRUCache(int maximumCacheSize) {
-        this(0, maximumCacheSize, 0.75f, true);
-    }
-
-    /**
-     * Constructs an empty <tt>LRUCache</tt> instance with the specified
-     * initial capacity, maximumCacheSize,load factor and ordering mode.
-     * 
-     * @param initialCapacity the initial capacity.
-     * @param maximumCacheSize
-     * @param loadFactor the load factor.
-     * @param accessOrder the ordering mode - <tt>true</tt> for access-order,
-     *                <tt>false</tt> for insertion-order.
-     * @throws IllegalArgumentException if the initial capacity is negative or
-     *                 the load factor is non-positive.
-     */
-
-    public LRUCache(int initialCapacity, int maximumCacheSize, float loadFactor, boolean accessOrder) {
-        super(initialCapacity, loadFactor, accessOrder);
-        this.maxCacheSize = maximumCacheSize;
-    }
-
-    /**
-     * @return Returns the maxCacheSize.
-     */
-    public int getMaxCacheSize() {
-        return maxCacheSize;
-    }
-
-    /**
-     * @param maxCacheSize The maxCacheSize to set.
-     */
-    public void setMaxCacheSize(int maxCacheSize) {
-        this.maxCacheSize = maxCacheSize;
-    }
-
-    protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
-        return size() > maxCacheSize;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java
deleted file mode 100644
index f0e23dd..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/**
- * 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.kahadb.util;
-
-/**
- * Provides a base class for you to extend when you want object to maintain a
- * doubly linked list to other objects without using a collection class.
- * 
- * @author chirino
- */
-public class LinkedNode<T extends LinkedNode<T>> {
-
-    protected LinkedNodeList<T> list;
-    protected T next;
-    protected T prev;
-
-    public LinkedNode() {
-    }
-
-    @SuppressWarnings("unchecked")
-    private T getThis() {
-        return (T) this;
-    }
-
-    public T getHeadNode() {
-        return list.head;
-    }
-
-    public T getTailNode() {
-        return list.head.prev;
-    }
-
-    public T getNext() {
-        return isTailNode() ? null : next;
-    }
-
-    public T getPrevious() {
-        return isHeadNode() ? null : prev;
-    }
-
-    public T getNextCircular() {
-        return next;
-    }
-
-    public T getPreviousCircular() {
-        return prev;
-    }
-
-    public boolean isHeadNode() {
-        return list.head == this;
-    }
-
-    public boolean isTailNode() {
-        return list.head.prev == this;
-    }
-
-    /**
-     * @param node
-     *            the node to link after this node.
-     * @return this
-     */
-    public void linkAfter(T node) {
-        if (node == this) {
-            throw new IllegalArgumentException("You cannot link to yourself");
-        }
-        if (node.list != null) {
-            throw new IllegalArgumentException("You only insert nodes that are not in a list");
-        }
-        if (list == null) {
-            throw new IllegalArgumentException("This node is not yet in a list");
-        }
-
-        node.list = list;
-
-        // given we linked this<->next and are inserting node in between
-        node.prev = getThis(); // link this<-node
-        node.next = next; // link node->next
-        next.prev = node; // link node<-next
-        next = node; // this->node
-        list.size++;
-    }
-
-    /**
-     * @param rightList
-     *            the node to link after this node.
-     * @return this
-     */
-    public void linkAfter(LinkedNodeList<T> rightList) {
-
-        if (rightList == list) {
-            throw new IllegalArgumentException("You cannot link to yourself");
-        }
-        if (list == null) {
-            throw new IllegalArgumentException("This node is not yet in a list");
-        }
-
-        T rightHead = rightList.head;
-        T rightTail = rightList.head.prev;
-        list.reparent(rightList);
-
-        // given we linked this<->next and are inserting list in between
-        rightHead.prev = getThis(); // link this<-list
-        rightTail.next = next; // link list->next
-        next.prev = rightTail; // link list<-next
-        next = rightHead; // this->list
-    }
-
-    /**
-     * @param node
-     *            the node to link after this node.
-     * @return
-     * @return this
-     */
-    public void linkBefore(T node) {
-
-        if (node == this) {
-            throw new IllegalArgumentException("You cannot link to yourself");
-        }
-        if (node.list != null) {
-            throw new IllegalArgumentException("You only insert nodes that are not in a list");
-        }
-        if (list == null) {
-            throw new IllegalArgumentException("This node is not yet in a list");
-        }
-
-        node.list = list;
-
-        // given we linked prev<->this and are inserting node in between
-        node.next = getThis(); // node->this
-        node.prev = prev; // prev<-node
-        prev.next = node; // prev->node
-        prev = node; // node<-this
-
-        if (this == list.head) {
-            list.head = node;
-        }
-        list.size++;
-    }
-
-    /**
-     * @param leftList
-     *            the node to link after this node.
-     * @return
-     * @return this
-     */
-    public void linkBefore(LinkedNodeList<T> leftList) {
-
-        if (leftList == list) {
-            throw new IllegalArgumentException("You cannot link to yourself");
-        }
-        if (list == null) {
-            throw new IllegalArgumentException("This node is not yet in a list");
-        }
-
-        T leftHead = leftList.head;
-        T leftTail = leftList.head.prev;
-        list.reparent(leftList);
-
-        // given we linked prev<->this and are inserting list in between
-        leftTail.next = getThis(); // list->this
-        leftHead.prev = prev; // prev<-list
-        prev.next = leftHead; // prev->list
-        prev = leftTail; // list<-this
-
-        if (isHeadNode()) {
-            list.head = leftHead;
-        }
-    }
-
-    public void linkToTail(LinkedNodeList<T> target) {
-        if (list != null) {
-            throw new IllegalArgumentException("This node is already linked to a node");
-        }
-
-        if (target.head == null) {
-            next = prev = target.head = getThis();
-            list = target;
-            list.size++;
-        } else {
-            target.head.prev.linkAfter(getThis());
-        }
-    }
-
-    public void linkToHead(LinkedNodeList<T> target) {
-        if (list != null) {
-            throw new IllegalArgumentException("This node is already linked to a node");
-        }
-
-        if (target.head == null) {
-            next = prev = target.head = getThis();
-            list = target;
-            list.size++;
-        } else {
-            target.head.linkBefore(getThis());
-        }
-    }
-
-    /**
-     * Removes this node out of the linked list it is chained in.
-     */
-    public boolean unlink() {
-
-        // If we are allready unlinked...
-        if (list == null) {
-            return false;
-        }
-
-        if (getThis() == prev) {
-            // We are the only item in the list
-            list.head = null;
-        } else {
-            // given we linked prev<->this<->next
-            next.prev = prev; // prev<-next
-            prev.next = next; // prev->next
-
-            if (isHeadNode()) {
-                list.head = next;
-            }
-        }
-        list.size--;
-        list = null;
-        return true;
-    }
-
-    /**
-     * Splits the list into 2 lists. This node becomes the tail of this list.
-     * Then 2nd list is returned.
-     * 
-     * @return An empty list if this is a tail node.
-     */
-    public LinkedNodeList<T> splitAfter() {
-
-        if (isTailNode()) {
-            return new LinkedNodeList<T>();
-        }
-
-        // Create the new list
-        LinkedNodeList<T> newList = new LinkedNodeList<T>();
-        newList.head = next;
-
-        // Update the head and tail of the new list so that they point to each
-        // other.
-        newList.head.prev = list.head.prev; // new list: tail<-head
-        newList.head.prev.next = newList.head; // new list: tail->head
-        next = list.head; // old list: tail->head
-        list.head.prev = getThis(); // old list: tail<-head
-
-        // Update all the nodes in the new list so that they know of their new
-        // list owner.
-        T n = newList.head;
-        newList.size++;
-        list.size--;
-        do {
-            n.list = newList;
-            n = n.next;
-            newList.size++;
-            list.size--;
-        } while (n != newList.head);
-
-        return newList;
-    }
-
-    /**
-     * Splits the list into 2 lists. This node becomes the head of this list.
-     * Then 2nd list is returned.
-     * 
-     * @return An empty list if this is a head node.
-     */
-    public LinkedNodeList<T> splitBefore() {
-
-        if (isHeadNode()) {
-            return new LinkedNodeList<T>();
-        }
-
-        // Create the new list
-        LinkedNodeList<T> newList = new LinkedNodeList<T>();
-        newList.head = list.head;
-        list.head = getThis();
-
-        T newListTail = prev;
-
-        prev = newList.head.prev; // old list: tail<-head
-        prev.next = getThis(); // old list: tail->head
-        newList.head.prev = newListTail; // new list: tail<-head
-        newListTail.next = newList.head; // new list: tail->head
-
-        // Update all the nodes in the new list so that they know of their new
-        // list owner.
-        T n = newList.head;
-        newList.size++;
-        list.size--;
-        do {
-            n.list = newList;
-            n = n.next;
-            newList.size++;
-            list.size--;
-        } while (n != newList.head);
-
-        return newList;
-    }
-
-    public boolean isLinked() {
-        return list != null;
-    }
-
-	public LinkedNodeList<T> getList() {
-		return list;
-	}
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LinkedNodeList.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/LinkedNodeList.java
deleted file mode 100644
index ec1e967..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LinkedNodeList.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.util.ArrayList;
-
-/**
- * Provides a list of LinkedNode objects. 
- * 
- * @author chirino
- */
-public class LinkedNodeList<T extends LinkedNode<T>> {
-
-    T head;
-    int size;
-
-    public LinkedNodeList() {
-    }
-
-    public boolean isEmpty() {
-        return head == null;
-    }
-
-    public void addLast(T node) {
-        node.linkToTail(this);
-    }
-
-    public void addFirst(T node) {
-        node.linkToHead(this);
-    }
-
-    public T getHead() {
-        return head;
-    }
-
-    public T getTail() {
-        return head.prev;
-    }
-    
-    public void clear() {
-        while (head != null) {
-            head.unlink();
-        }
-    }
-
-    public void addLast(LinkedNodeList<T> list) {
-        if (list.isEmpty()) {
-            return;
-        }
-        if (head == null) {
-            head = list.head;
-            reparent(list);
-        } else {
-            getTail().linkAfter(list);
-        }
-    }
-
-    public void addFirst(LinkedNodeList<T> list) {
-        if (list.isEmpty()) {
-            return;
-        }
-        if (head == null) {
-            reparent(list);
-            head = list.head;
-            list.head = null;
-        } else {
-            getHead().linkBefore(list);
-        }
-    }
-
-    public T reparent(LinkedNodeList<T> list) {
-        size += list.size;
-        T n = list.head;
-        do {
-            n.list = this;
-            n = n.next;
-        } while (n != list.head);
-        list.head = null;
-        list.size = 0;
-        return n;
-    }
-
-    /**
-     * Move the head to the tail and returns the new head node.
-     * 
-     * @return
-     */
-    public T rotate() {
-    	if( head ==null )
-    		return null;
-        return head = head.getNextCircular();
-    }
-
-    /**
-     * Move the head to the tail and returns the new head node.
-     * 
-     * @return
-     */
-    public void rotateTo(T head) {
-    	assert head!=null: "Cannot rotate to a null head";
-    	assert head.list == this : "Cannot rotate to a node not linked to this list";
-        this.head = head;
-    }
-
-    public int size() {
-        return size;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("[");
-        boolean first=true;
-        T cur = getHead();
-        while( cur!=null ) {
-            if( !first ) {
-                sb.append(", ");
-            }
-            sb.append(cur);
-            first=false;
-            cur = cur.getNext();
-        }
-        sb.append("]");
-        return sb.toString();
-    }
-    
-    /**
-     * Copies the nodes of the LinkedNodeList to an ArrayList.
-     * @return
-     */
-    public ArrayList<T> toArrayList() {
-    	ArrayList<T> rc = new ArrayList<T>(size);
-    	T cur = head;
-    	while( cur!=null ) {
-    		rc.add(cur);
-    		cur = cur.getNext();
-    	}
-    	return rc;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LockFile.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/LockFile.java
deleted file mode 100644
index 6e419d5..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LockFile.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**

- * 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.kahadb.util;

-

-import java.io.File;

-import java.io.IOException;

-import java.io.RandomAccessFile;

-import java.nio.channels.FileLock;

-import java.nio.channels.OverlappingFileLockException;

-import java.util.Date;

-

-/**

- * Used to lock a File.

- * 

- * @author chirino

- */

-public class LockFile {

-    

-    private static final boolean DISABLE_FILE_LOCK = "true".equals(System.getProperty("java.nio.channels.FileLock.broken", "false"));

-    final private File file;

-    

-    private FileLock lock;

-    private RandomAccessFile readFile;

-    private int lockCounter;

-    private final boolean deleteOnUnlock;

-    

-    public LockFile(File file, boolean deleteOnUnlock) {

-        this.file = file;

-        this.deleteOnUnlock = deleteOnUnlock;

-    }

-

-    /**

-     * @throws IOException

-     */

-    synchronized public void lock() throws IOException {

-        if (DISABLE_FILE_LOCK) {

-            return;

-        }

-

-        if( lockCounter>0 ) {

-            return;

-        }

-        

-        IOHelper.mkdirs(file.getParentFile());

-        if (System.getProperty(getVmLockKey()) != null) {

-            throw new IOException("File '" + file + "' could not be locked as lock is already held for this jvm.");

-        }

-        if (lock == null) {

-            readFile = new RandomAccessFile(file, "rw");

-            IOException reason = null;

-            try {

-                lock = readFile.getChannel().tryLock(0, readFile.getChannel().size(), false);

-            } catch (OverlappingFileLockException e) {

-                reason = IOExceptionSupport.create("File '" + file + "' could not be locked.",e);

-            } catch (IOException ioe) {

-                reason = ioe;

-            }

-            if (lock != null) {

-                lockCounter++;

-                System.setProperty(getVmLockKey(), new Date().toString());

-            } else {

-                // new read file for next attempt

-                closeReadFile();

-                if (reason != null) {

-                    throw reason;

-                }

-                throw new IOException("File '" + file + "' could not be locked.");

-            }

-              

-        }

-    }

-

-    /**

-     */

-    public void unlock() {

-        if (DISABLE_FILE_LOCK) {

-            return;

-        }

-        

-        lockCounter--;

-        if( lockCounter!=0 ) {

-            return;

-        }

-        

-        // release the lock..

-        if (lock != null) {

-            try {

-                lock.release();

-                System.getProperties().remove(getVmLockKey());

-            } catch (Throwable ignore) {

-            }

-            lock = null;

-        }

-        closeReadFile();

-        

-        if( deleteOnUnlock ) {

-            file.delete();

-        }

-    }

-

-    private String getVmLockKey() throws IOException {

-        return getClass().getName() + ".lock." + file.getCanonicalPath();

-    }

-

-    private void closeReadFile() {

-        // close the file.

-        if (readFile != null) {

-            try {

-                readFile.close();

-            } catch (Throwable ignore) {

-            }

-            readFile = null;

-        }

-        

-    }

-

-}

diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LongMarshaller.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/LongMarshaller.java
deleted file mode 100644
index 7ca1f8d..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/LongMarshaller.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * Implementation of a Marshaller for a Long
- * 
- * 
- */
-public class LongMarshaller implements Marshaller<Long> {
-    
-    public static final LongMarshaller INSTANCE = new LongMarshaller();
-    
-    public void writePayload(Long object, DataOutput dataOut) throws IOException {
-        dataOut.writeLong(object);
-    }
-
-    public Long readPayload(DataInput dataIn) throws IOException {
-        return dataIn.readLong();
-    }
-
-    public int getFixedSize() {
-        return 8;
-    }
-
-    public Long deepCopy(Long source) {
-        return source;
-    }
-
-    public boolean isDeepCopySupported() {
-        return true;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/Marshaller.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/Marshaller.java
deleted file mode 100644
index 4e6a79b..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/Marshaller.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * 
- */
-public interface Marshaller<T> {
-    
-    /**
-     * Write the payload of the object to the DataOutput stream.
-     * 
-     * @param object 
-     * @param dataOut
-     * @throws IOException
-     */
-    void writePayload(T object, DataOutput dataOut) throws IOException;
-    
-    
-    /**
-     * Read the payload of the object from the DataInput stream.
-     * 
-     * @param dataIn 
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    T readPayload(DataInput dataIn) throws IOException;
-
-    /** 
-     * @return -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
-     */
-    int getFixedSize();
-    
-    /**
-     * 
-     * @return true if the {@link #deepCopy(Object)} operations is supported.
-     */
-    boolean isDeepCopySupported();
-
-    /**
-     * @return a deep copy of the source object.
-     */
-    T deepCopy(T source);
-   
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ObjectMarshaller.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/ObjectMarshaller.java
deleted file mode 100644
index bdaad7d..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/ObjectMarshaller.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-/**
- * Implementation of a Marshaller for Objects
- * 
- * 
- */
-public class ObjectMarshaller extends VariableMarshaller<Object> {
-
-    public void writePayload(Object object, DataOutput dataOut) throws IOException {
-        ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-        ObjectOutputStream objectOut = new ObjectOutputStream(bytesOut);
-        objectOut.writeObject(object);
-        objectOut.close();
-        byte[] data = bytesOut.toByteArray();
-        dataOut.writeInt(data.length);
-        dataOut.write(data);
-    }
-
-    public Object readPayload(DataInput dataIn) throws IOException {
-        int size = dataIn.readInt();
-        byte[] data = new byte[size];
-        dataIn.readFully(data);
-        ByteArrayInputStream bytesIn = new ByteArrayInputStream(data);
-        ObjectInputStream objectIn = new ObjectInputStream(bytesIn);
-        try {
-            return objectIn.readObject();
-        } catch (ClassNotFoundException e) {
-            throw new IOException(e.getMessage());
-        }
-    }
-    
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/Scheduler.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/Scheduler.java
deleted file mode 100755
index 7804523..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/Scheduler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.util.HashMap;
-import java.util.Timer;
-import java.util.TimerTask;
-
-/**
- * 
- */
-public final class Scheduler {
-
-    
-
-	public static final Timer CLOCK_DAEMON = new Timer("KahaDB Scheduler", true);
-    private static final HashMap<Runnable, TimerTask> TIMER_TASKS = new HashMap<Runnable, TimerTask>();
-
-    private Scheduler() {
-    }
-
-    public static synchronized void executePeriodically(final Runnable task, long period) {
-    	TimerTask timerTask = new SchedulerTimerTask(task);
-        CLOCK_DAEMON.scheduleAtFixedRate(timerTask, period, period);
-        TIMER_TASKS.put(task, timerTask);
-    }
-
-    public static synchronized void cancel(Runnable task) {
-    	TimerTask ticket = TIMER_TASKS.remove(task);
-        if (ticket != null) {
-            ticket.cancel();
-            CLOCK_DAEMON.purge();//remove cancelled TimerTasks
-        }
-    }
-
-    public static void executeAfterDelay(final Runnable task, long redeliveryDelay) {
-    	TimerTask timerTask = new SchedulerTimerTask(task);
-        CLOCK_DAEMON.schedule(timerTask, redeliveryDelay);
-    }
-    
-    public static void shutdown() {
-        CLOCK_DAEMON.cancel();
-    }
-
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/SchedulerTimerTask.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/SchedulerTimerTask.java
deleted file mode 100644
index 144e941..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/SchedulerTimerTask.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.util.TimerTask;
-
-/**
- * A TimeTask for a Runnable object
- *
- */
-public class SchedulerTimerTask extends TimerTask {
-    private final Runnable task;
-
-    public SchedulerTimerTask(Runnable task) {
-        this.task = task;
-    }
-
-    public void run() {
-        this.task.run();                         
-    }
-}
\ No newline at end of file
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/Sequence.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/Sequence.java
deleted file mode 100644
index 7a75407..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/Sequence.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.kahadb.util;
-
-/**
- * Represents a range of numbers.
- * 
- * @author chirino
- */
-public class Sequence extends LinkedNode<Sequence> {
-    long first;
-    long last;
-
-    public Sequence(long value) {
-        first = last = value;
-    }
-
-    public Sequence(long first, long last) {
-        this.first = first;
-        this.last = last;
-    }
-
-    public boolean isAdjacentToLast(long value) {
-        return last + 1 == value;
-    }
-
-    public boolean isAdjacentToFirst(long value) {
-        return first - 1 == value;
-    }
-
-    public boolean contains(long value) {
-        return first <= value && value <= last;
-    }
-
-    public long range() {
-        return first == last ? 1 : (last - first) + 1;
-    }
-    
-    @Override
-    public String toString() {
-        return first == last ? "" + first : first + "-" + last;
-    }
-
-    public long getFirst() {
-        return first;
-    }
-
-    public void setFirst(long first) {
-        this.first = first;
-    }
-
-    public long getLast() {
-        return last;
-    }
-
-    public void setLast(long last) {
-        this.last = last;
-    }
-    
-    public interface Closure<T extends Throwable> {
-        public void execute(long value) throws T;
-    }
-
-    public <T extends Throwable> void each(Closure<T> closure) throws T {
-        for( long i=first; i<=last; i++ ) {
-            closure.execute(i);
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/SequenceSet.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/SequenceSet.java
deleted file mode 100644
index de195e7..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/SequenceSet.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * Keeps track of a added long values. Collapses ranges of numbers using a
- * Sequence representation. Use to keep track of received message ids to find
- * out if a message is duplicate or if there are any missing messages.
- * 
- * @author chirino
- */
-public class SequenceSet extends LinkedNodeList<Sequence> {
-
-    public static class Marshaller implements org.apache.kahadb.util.Marshaller<SequenceSet> {
-
-        public static final Marshaller INSTANCE = new Marshaller();
-        
-        public SequenceSet readPayload(DataInput in) throws IOException {
-            SequenceSet value = new SequenceSet();
-            int count = in.readInt();
-            for (int i = 0; i < count; i++) {
-                if( in.readBoolean() ) {
-                    Sequence sequence = new Sequence(in.readLong(), in.readLong());
-                    value.addLast(sequence);
-                } else {
-                    Sequence sequence = new Sequence(in.readLong());
-                    value.addLast(sequence);
-                }
-            }
-            return value;
-        }
-
-        public void writePayload(SequenceSet value, DataOutput out) throws IOException {
-            out.writeInt(value.size());
-            Sequence sequence = value.getHead();
-            while (sequence != null ) {
-                if( sequence.range() > 1 ) {
-                    out.writeBoolean(true);
-                    out.writeLong(sequence.first);
-                    out.writeLong(sequence.last);
-                } else {
-                    out.writeBoolean(false);
-                    out.writeLong(sequence.first);
-                }
-                sequence = sequence.getNext();
-            }
-        }
-
-        public int getFixedSize() {
-            return -1;
-        }
-
-        public SequenceSet deepCopy(SequenceSet value) {
-            SequenceSet rc = new SequenceSet();
-            Sequence sequence = value.getHead();
-            while (sequence != null ) {
-                rc.add(new Sequence(sequence.first, sequence.last));
-                sequence = sequence.getNext();
-            }
-            return rc;
-        }
-
-        public boolean isDeepCopySupported() {
-            return true;
-        }
-    }
-    
-    public void add(Sequence value) {
-        // TODO we can probably optimize this a bit
-        for(long i=value.first; i<value.last+1; i++) {
-            add(i);
-        }
-    }
-    
-    
-    /**
-     * 
-     * @param value
-     *            the value to add to the list
-     * @return false if the value was a duplicate.
-     */
-    public boolean add(long value) {
-
-        if (isEmpty()) {
-            addFirst(new Sequence(value));
-            return true;
-        }
-
-        Sequence sequence = getHead();
-        while (sequence != null) {
-
-            if (sequence.isAdjacentToLast(value)) {
-                // grow the sequence...
-                sequence.last = value;
-                // it might connect us to the next sequence..
-                if (sequence.getNext() != null) {
-                    Sequence next = sequence.getNext();
-                    if (next.isAdjacentToFirst(value)) {
-                        // Yep the sequence connected.. so join them.
-                        sequence.last = next.last;
-                        next.unlink();
-                    }
-                }
-                return true;
-            }
-
-            if (sequence.isAdjacentToFirst(value)) {
-                // grow the sequence...
-                sequence.first = value;
-
-                // it might connect us to the previous
-                if (sequence.getPrevious() != null) {
-                    Sequence prev = sequence.getPrevious();
-                    if (prev.isAdjacentToLast(value)) {
-                        // Yep the sequence connected.. so join them.
-                        sequence.first = prev.first;
-                        prev.unlink();
-                    }
-                }
-                return true;
-            }
-
-            // Did that value land before this sequence?
-            if (value < sequence.first) {
-                // Then insert a new entry before this sequence item.
-                sequence.linkBefore(new Sequence(value));
-                return true;
-            }
-
-            // Did that value land within the sequence? The it's a duplicate.
-            if (sequence.contains(value)) {
-                return false;
-            }
-
-            sequence = sequence.getNext();
-        }
-
-        // Then the value is getting appended to the tail of the sequence.
-        addLast(new Sequence(value));
-        return true;
-    }
-    
-    /**
-     * Removes and returns the first element from this list.
-     *
-     * @return the first element from this list.
-     * @throws NoSuchElementException if this list is empty.
-     */
-    public long removeFirst() {
-        if (isEmpty()) {
-            throw new NoSuchElementException();
-        }
-        
-        Sequence rc = removeFirstSequence(1);
-        return rc.first;
-    }
-
-
-    public Sequence removeLastSequence() {
-        if (isEmpty()) {
-            return null;
-        }
-
-        Sequence rc = getTail();
-        rc.unlink();
-        return rc;
-    }
-
-    /**
-     * Removes and returns the first sequence that is count range large.
-     *
-     * @return a sequence that is count range large, or null if no sequence is that large in the list.
-     */
-    public Sequence removeFirstSequence(long count) {
-        if (isEmpty()) {
-            return null;
-        }
-        
-        Sequence sequence = getHead();
-        while (sequence != null ) {
-            if (sequence.range() == count ) {
-                sequence.unlink();
-                return sequence;
-            }
-            if (sequence.range() > count ) {
-                Sequence rc = new Sequence(sequence.first, sequence.first+count);
-                sequence.first+=count;
-                return rc;
-            }
-            sequence = sequence.getNext();
-        }
-        return null;
-    }
-
-
-    /**
-     * @return all the id Sequences that are missing from this set that are not
-     *         in between the range provided.
-     */
-    public List<Sequence> getMissing(long first, long last) {
-        ArrayList<Sequence> rc = new ArrayList<Sequence>();
-        if (first > last) {
-            throw new IllegalArgumentException("First cannot be more than last");
-        }
-        if (isEmpty()) {
-            // We are missing all the messages.
-            rc.add(new Sequence(first, last));
-            return rc;
-        }
-
-        Sequence sequence = getHead();
-        while (sequence != null && first <= last) {
-            if (sequence.contains(first)) {
-                first = sequence.last + 1;
-            } else {
-                if (first < sequence.first) {
-                    if (last < sequence.first) {
-                        rc.add(new Sequence(first, last));
-                        return rc;
-                    } else {
-                        rc.add(new Sequence(first, sequence.first - 1));
-                        first = sequence.last + 1;
-                    }
-                }
-            }
-            sequence = sequence.getNext();
-        }
-
-        if (first <= last) {
-            rc.add(new Sequence(first, last));
-        }
-        return rc;
-    }
-
-    /**
-     * @return all the Sequence that are in this list
-     */
-    public List<Sequence> getReceived() {
-        ArrayList<Sequence> rc = new ArrayList<Sequence>(size());
-        Sequence sequence = getHead();
-        while (sequence != null) {
-            rc.add(new Sequence(sequence.first, sequence.last));
-            sequence = sequence.getNext();
-        }
-        return rc;
-    }
-
-    public boolean contains(int first, int last) {
-        if (isEmpty()) {
-            return false;
-        }
-        Sequence sequence = getHead();
-        while (sequence != null) {
-            if (sequence.first <= first && first <= sequence.last ) {
-                return last <= sequence.last ;
-            }
-            sequence = sequence.getNext();
-        }
-        return false;
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/StringMarshaller.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/StringMarshaller.java
deleted file mode 100644
index 532ef54..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/StringMarshaller.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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.kahadb.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * Implementation of a Marshaller for Strings
- * 
- * 
- */
-public class StringMarshaller implements Marshaller<String> {
-    
-    public static final StringMarshaller INSTANCE = new StringMarshaller();
-    
-    /**
-     * Write the payload of this entry to the RawContainer
-     * 
-     * @param object
-     * @param dataOut
-     * @throws IOException
-     */
-    public void writePayload(String object, DataOutput dataOut) throws IOException {
-        dataOut.writeUTF(object);
-    }
-
-    /**
-     * Read the entry from the RawContainer
-     * 
-     * @param dataIn
-     * @return unmarshalled object
-     * @throws IOException
-     */
-    public String readPayload(DataInput dataIn) throws IOException {
-        return dataIn.readUTF();
-    }
-
-
-    public int getFixedSize() {
-        return -1;
-    }
-
-    public String deepCopy(String source) {
-        return source;
-    }
-
-    public boolean isDeepCopySupported() {
-        return true;
-    }
-}
diff --git a/trunk/kahadb/src/main/java/org/apache/kahadb/util/VariableMarshaller.java b/trunk/kahadb/src/main/java/org/apache/kahadb/util/VariableMarshaller.java
deleted file mode 100644
index 89b180e..0000000
--- a/trunk/kahadb/src/main/java/org/apache/kahadb/util/VariableMarshaller.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.kahadb.util;
-
-/**
- * Convenience base class for Marshaller implementations which do not deepCopy and
- * which use variable size encodings.
- * 
- * @author chirino
- * @param <T>
- */
-abstract public class VariableMarshaller<T> implements Marshaller<T> {
-
-    public int getFixedSize() {
-        return -1;
-    }
-
-    public boolean isDeepCopySupported() {
-        return false;
-    }
-
-    public T deepCopy(T source) {
-        throw new UnsupportedOperationException();
-    }
-
-}
diff --git a/trunk/kahadb/src/main/resources/META-INF/services/org/apache/activemq/transport/kdbr b/trunk/kahadb/src/main/resources/META-INF/services/org/apache/activemq/transport/kdbr
deleted file mode 100644
index 271bd40..0000000
--- a/trunk/kahadb/src/main/resources/META-INF/services/org/apache/activemq/transport/kdbr
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.kahadb.replication.transport.KDBRTransportFactory
diff --git a/trunk/kahadb/src/main/resources/META-INF/services/org/apache/activemq/wireformat/kdbr b/trunk/kahadb/src/main/resources/META-INF/services/org/apache/activemq/wireformat/kdbr
deleted file mode 100644
index 2b6eb7f..0000000
--- a/trunk/kahadb/src/main/resources/META-INF/services/org/apache/activemq/wireformat/kdbr
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.kahadb.replication.transport.KDBRWireFormatFactory
diff --git a/trunk/kahadb/src/test/eclipse-resources/log4j.properties b/trunk/kahadb/src/test/eclipse-resources/log4j.properties
deleted file mode 100644
index 66385de..0000000
--- a/trunk/kahadb/src/test/eclipse-resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-## ------------------------------------------------------------------------
-## 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 for eclipse testing, We want to see debug output on the console.
-#
-log4j.rootLogger=INFO, out
-
-
-
-# CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
-#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-# File appender
-log4j.appender.fout=org.apache.log4j.FileAppender
-log4j.appender.fout.layout=org.apache.log4j.PatternLayout
-log4j.appender.fout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.fout.file=target/amq-testlog.log
-log4j.appender.fout.append=true
\ No newline at end of file
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexBenchMark.java b/trunk/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexBenchMark.java
deleted file mode 100644
index d60e0ca..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexBenchMark.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.IOException;
-import java.text.NumberFormat;
-
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.LongMarshaller;
-import org.apache.kahadb.util.StringMarshaller;
-
-public class BTreeIndexBenchMark extends IndexBenchmark {
-
-    private NumberFormat nf;
-
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        nf = NumberFormat.getIntegerInstance();
-        nf.setMinimumIntegerDigits(10);
-        nf.setGroupingUsed(false);
-    }
-    
-    @Override
-    protected Index<String, Long> createIndex() throws Exception {
-
-        Transaction tx = pf.tx();
-        long id = tx.allocate().getPageId();
-        tx.commit();
-
-        BTreeIndex<String, Long> index = new BTreeIndex<String, Long>(pf, id);
-        index.setKeyMarshaller(StringMarshaller.INSTANCE);
-        index.setValueMarshaller(LongMarshaller.INSTANCE);
-        
-        return index;
-    }
-    
-    @Override
-    protected void dumpIndex(Index<String, Long> index) throws IOException {
-        Transaction tx = pf.tx();
-        ((BTreeIndex)index).printStructure(tx, System.out);
-    }
-
-    /**
-     * Overriding so that this generates keys that are the worst case for the BTree. Keys that
-     * always insert to the end of the BTree.  
-     */
-    @Override
-    protected String key(long i) {
-        return "a-long-message-id-like-key:"+nf.format(i);
-    }
-
-}
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexTest.java b/trunk/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexTest.java
deleted file mode 100644
index 569c2b7..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexTest.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.PrintWriter;
-import java.text.NumberFormat;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-import org.apache.kahadb.index.BTreeIndex;
-import org.apache.kahadb.index.Index;
-import org.apache.kahadb.util.LongMarshaller;
-import org.apache.kahadb.util.StringMarshaller;
-
-public class BTreeIndexTest extends IndexTestSupport {
-
-    private NumberFormat nf;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        nf = NumberFormat.getIntegerInstance();
-        nf.setMinimumIntegerDigits(6);
-        nf.setGroupingUsed(false);
-    }
-    
-    @Override
-    protected Index<String, Long> createIndex() throws Exception {
-        
-        long id = tx.allocate().getPageId();
-        tx.commit();
-
-        BTreeIndex<String, Long> index = new BTreeIndex<String,Long>(pf, id);
-        index.setKeyMarshaller(StringMarshaller.INSTANCE);
-        index.setValueMarshaller(LongMarshaller.INSTANCE);
-        
-        return index;
-    }
-
-    /**
-     * Yeah, the current implementation does NOT try to balance the tree.  Here is 
-     * a test case showing that it gets out of balance.  
-     * 
-     * @throws Exception
-     */
-    public void disabled_testTreeBalancing() throws Exception {
-        createPageFileAndIndex(100);
-
-        BTreeIndex index = ((BTreeIndex)this.index);
-        this.index.load(tx);
-        tx.commit();
-        
-        doInsert(50);
-        
-        int minLeafDepth = index.getMinLeafDepth(tx);
-        int maxLeafDepth = index.getMaxLeafDepth(tx);
-        assertTrue("Tree is balanced", maxLeafDepth-minLeafDepth <= 1);
-
-        // Remove some of the data
-        doRemove(16);
-        minLeafDepth = index.getMinLeafDepth(tx);
-        maxLeafDepth = index.getMaxLeafDepth(tx);
-
-        System.out.println( "min:"+minLeafDepth );
-        System.out.println( "max:"+maxLeafDepth );
-        index.printStructure(tx, new PrintWriter(System.out));
-
-        assertTrue("Tree is balanced", maxLeafDepth-minLeafDepth <= 1);
-
-        this.index.unload(tx);
-    }
-    
-    public void testPruning() throws Exception {
-        createPageFileAndIndex(100);
-
-        BTreeIndex<String,Long> index = ((BTreeIndex<String,Long>)this.index);
-
-        this.index.load(tx);
-        tx.commit();
-     
-        int minLeafDepth = index.getMinLeafDepth(tx);
-        int maxLeafDepth = index.getMaxLeafDepth(tx);
-        assertEquals(1, minLeafDepth);
-        assertEquals(1, maxLeafDepth);
-        
-        doInsert(1000);
-        
-        minLeafDepth = index.getMinLeafDepth(tx);
-        maxLeafDepth = index.getMaxLeafDepth(tx);
-        assertTrue("Depth of tree grew", minLeafDepth > 1);
-        assertTrue("Depth of tree grew", maxLeafDepth > 1);
-
-        // Remove the data.
-        doRemove(1000);
-        minLeafDepth = index.getMinLeafDepth(tx);
-        maxLeafDepth = index.getMaxLeafDepth(tx);
-
-        assertEquals(1, minLeafDepth);
-        assertEquals(1, maxLeafDepth);
-
-        this.index.unload(tx);
-        tx.commit();
-    }
-
-    public void testIteration() throws Exception {
-        createPageFileAndIndex(100);
-        BTreeIndex<String,Long> index = ((BTreeIndex<String,Long>)this.index);
-        this.index.load(tx);
-        tx.commit();
-          
-        // Insert in reverse order..
-        doInsertReverse(1000);
-        
-        this.index.unload(tx);
-        tx.commit();
-        this.index.load(tx);
-        tx.commit();
-
-        // BTree should iterate it in sorted order.
-        int counter=0;
-        for (Iterator<Map.Entry<String,Long>> i = index.iterator(tx); i.hasNext();) {
-            Map.Entry<String,Long> entry = (Map.Entry<String,Long>)i.next();
-            assertEquals(key(counter),entry.getKey());
-            assertEquals(counter,(long)entry.getValue());
-            counter++;
-        }
-
-        this.index.unload(tx);
-        tx.commit();
-    }
-    
-    
-    public void testVisitor() throws Exception {
-        createPageFileAndIndex(100);
-        BTreeIndex<String,Long> index = ((BTreeIndex<String,Long>)this.index);
-        this.index.load(tx);
-        tx.commit();
-          
-        // Insert in reverse order..
-        doInsert(1000);
-        
-        this.index.unload(tx);
-        tx.commit();
-        this.index.load(tx);
-        tx.commit();
-
-        // BTree should iterate it in sorted order.
-        
-        index.visit(tx, new BTreeVisitor<String, Long>(){
-            public boolean isInterestedInKeysBetween(String first, String second) {
-                return true;
-            }
-            public void visit(List<String> keys, List<Long> values) {
-            }
-        });
-        
-
-        this.index.unload(tx);
-        tx.commit();
-    }
-
-
-    public void testRandomRemove() throws Exception {
-
-        createPageFileAndIndex(100);
-        BTreeIndex<String,Long> index = ((BTreeIndex<String,Long>)this.index);
-        this.index.load(tx);
-        tx.commit();
-
-        final int count = 4000;
-        doInsert(count);
-
-        Random rand = new Random(System.currentTimeMillis());
-        int i = 0, prev = 0;
-        while (!index.isEmpty(tx)) {
-            prev = i;
-            i = rand.nextInt(count);
-            try {
-                index.remove(tx, key(i));
-            } catch (Exception e) {
-                e.printStackTrace();
-                fail("unexpected exception on " + i + ", prev: " + prev + ", ex: " + e);
-            }
-        }
-    }
-
-    public void testRemovePattern() throws Exception {
-        createPageFileAndIndex(100);
-        BTreeIndex<String,Long> index = ((BTreeIndex<String,Long>)this.index);
-        this.index.load(tx);
-        tx.commit();
-
-        final int count = 4000;
-        doInsert(count);
-
-        index.remove(tx, key(3697));
-        index.remove(tx, key(1566));
-    }
-    
-    void doInsertReverse(int count) throws Exception {
-        for (int i = count-1; i >= 0; i--) {
-            index.put(tx, key(i), (long)i);
-            tx.commit();
-        }
-    }
-    /**
-     * Overriding so that this generates keys that are the worst case for the BTree. Keys that
-     * always insert to the end of the BTree.  
-     */
-    @Override
-    protected String key(int i) {
-        return "key:"+nf.format(i);
-    }
-}
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/index/HashIndexBenchMark.java b/trunk/kahadb/src/test/java/org/apache/kahadb/index/HashIndexBenchMark.java
deleted file mode 100644
index 9682998..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/index/HashIndexBenchMark.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.LongMarshaller;
-import org.apache.kahadb.util.StringMarshaller;
-
-public class HashIndexBenchMark extends IndexBenchmark {
-
-    @Override
-    protected Index<String, Long> createIndex() throws Exception {
-
-        Transaction tx = pf.tx();
-        long id = tx.allocate().getPageId();
-        tx.commit();
-
-        HashIndex<String, Long> index = new HashIndex<String, Long>(pf, id);
-        index.setKeyMarshaller(StringMarshaller.INSTANCE);
-        index.setValueMarshaller(LongMarshaller.INSTANCE);
-        
-        return index;
-    }
-
-}
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/index/HashIndexTest.java b/trunk/kahadb/src/test/java/org/apache/kahadb/index/HashIndexTest.java
deleted file mode 100644
index 1f6fa5c..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/index/HashIndexTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import org.apache.kahadb.index.HashIndex;
-import org.apache.kahadb.index.Index;
-import org.apache.kahadb.util.LongMarshaller;
-import org.apache.kahadb.util.StringMarshaller;
-
-public class HashIndexTest extends IndexTestSupport {
-
-    @Override
-    protected Index<String, Long> createIndex() throws Exception {
-        
-        long id = tx.allocate().getPageId();
-        tx.commit();
-
-        HashIndex<String, Long> index = new HashIndex<String,Long>(pf, id);
-        index.setBinCapacity(12);
-        index.setKeyMarshaller(StringMarshaller.INSTANCE);
-        index.setValueMarshaller(LongMarshaller.INSTANCE);
-        
-        return index;
-    }
-
-}
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexBenchmark.java b/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexBenchmark.java
deleted file mode 100755
index c35579b..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexBenchmark.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
-import junit.framework.TestCase;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.IOHelper;
-
-/**
- * @author chirino
- */
-public abstract class IndexBenchmark extends TestCase {
-
-    // Slower machines might need to make this bigger.
-    private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
-    // How many times do we sample?
-    private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", "" + 60 * 1000 / SAMPLE_DURATION));
-    // How many indexes will we be benchmarking concurrently?
-    private static final int INDEX_COUNT = Integer.parseInt(System.getProperty("INDEX_COUNT", "" + 1));
-    // Indexes tend to perform worse when they get big.. so how many items
-    // should we put into the index before we start sampling.
-    private static final int INDEX_PRE_LOAD_COUNT = Integer.parseInt(System.getProperty("INDEX_PRE_LOAD_COUNT", "" + 10000 / INDEX_COUNT));
-
-    protected File ROOT_DIR;
-    protected final HashMap<String, Index<String, Long>> indexes = new HashMap<String, Index<String, Long>>();
-    protected PageFile pf;
-
-    public void setUp() throws Exception {
-        ROOT_DIR = new File(IOHelper.getDefaultDataDirectory());
-        IOHelper.mkdirs(ROOT_DIR);
-        IOHelper.deleteChildren(ROOT_DIR);
-        
-        pf = new PageFile(ROOT_DIR, getClass().getName());
-        pf.load();
-    }
-
-    protected void tearDown() throws Exception {
-        Transaction tx = pf.tx();
-        for (Index i : indexes.values()) {
-            try {
-                i.unload(tx);
-            } catch (Throwable ignore) {
-            }
-        }
-        tx.commit();
-    }
-
-    abstract protected Index<String, Long> createIndex() throws Exception;
-
-    synchronized private Index<String, Long> openIndex(String name) throws Exception {
-        Transaction tx = pf.tx();
-        Index<String, Long> index = indexes.get(name);
-        if (index == null) {
-            index = createIndex();
-            index.load(tx);
-            indexes.put(name, index);
-        }
-        tx.commit();
-        return index;
-    }
-
-    class Producer extends Thread {
-        private final String name;
-        AtomicBoolean shutdown = new AtomicBoolean();
-
-        public Producer(String name) {
-            super("Producer: " + name);
-            this.name = name;
-        }
-
-        public void shutdown() {
-            shutdown.set(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-
-                Transaction tx = pf.tx();
-                
-                Index<String,Long> index = openIndex(name);
-                long counter = 0;
-                while (!shutdown.get()) {
-                    long c = counter;
-
-                    String key = key(c);
-                    index.put(tx, key, c);
-                    tx.commit();
-                    Thread.yield(); // This avoids consumer starvation..
-                    
-                    onProduced(counter++);
-                }
-
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-
-        public void onProduced(long counter) {
-        }
-    }
-    
-    protected String key(long c) {
-        return "a-long-message-id-like-key-" + c;
-    }
-
-
-    class Consumer extends Thread {
-        private final String name;
-        AtomicBoolean shutdown = new AtomicBoolean();
-
-        public Consumer(String name) {
-            super("Consumer: " + name);
-            this.name = name;
-        }
-
-        public void shutdown() {
-            shutdown.set(true);
-        }
-
-        @Override
-        public void run() {
-            try {
-                Transaction tx = pf.tx();
-
-                Index<String,Long> index = openIndex(name);
-                long counter = 0;
-                while (!shutdown.get()) {
-                    long c = counter;
-                    String key = key(c);
-                    
-                    Long record = index.get(tx, key);
-                    if (record != null) {
-                        if( index.remove(tx, key) == null ) {
-                            System.out.print("Remove failed...");
-                        }
-                        tx.commit();
-                        onConsumed(counter++);
-                    }
-                }
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-
-        public void onConsumed(long counter) {
-        }
-    }
-
-    protected void dumpIndex(Index<String, Long> index) throws IOException {
-    }
-
-    public void testLoad() throws Exception {
-
-        final Producer producers[] = new Producer[INDEX_COUNT];
-        final Consumer consumers[] = new Consumer[INDEX_COUNT];
-        final CountDownLatch preloadCountDown = new CountDownLatch(INDEX_COUNT);
-        final AtomicLong producedRecords = new AtomicLong();
-        final AtomicLong consumedRecords = new AtomicLong();
-
-        System.out.println("Starting: " + INDEX_COUNT + " producers");
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            producers[i] = new Producer("test-" + i) {
-                private boolean prelaodDone;
-
-                public void onProduced(long counter) {
-                    if (!prelaodDone && counter >= INDEX_PRE_LOAD_COUNT) {
-                        prelaodDone = true;
-                        preloadCountDown.countDown();
-                    }
-                    producedRecords.incrementAndGet();
-                }
-            };
-            producers[i].start();
-        }
-
-        long start = System.currentTimeMillis();
-        System.out.println("Waiting for each producer create " + INDEX_PRE_LOAD_COUNT + " records before starting the consumers.");
-        preloadCountDown.await();
-        long end = System.currentTimeMillis();
-        System.out.println("Preloaded " + INDEX_PRE_LOAD_COUNT * INDEX_COUNT + " records at " + (INDEX_PRE_LOAD_COUNT * INDEX_COUNT * 1000f / (end - start)) + " records/sec");
-
-        System.out.println("Starting: " + INDEX_COUNT + " consumers");
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            consumers[i] = new Consumer("test-" + i) {
-                public void onConsumed(long counter) {
-                    consumedRecords.incrementAndGet();
-                }
-            };
-            consumers[i].start();
-        }
-
-        long sample_start = System.currentTimeMillis();
-        System.out.println("Taking " + SAMPLES + " performance samples every " + SAMPLE_DURATION + " ms");
-        System.out.println("time (s), produced, produce rate (r/s), consumed, consume rate (r/s), used memory (k)");
-        producedRecords.set(0);
-        consumedRecords.set(0);
-        for (int i = 0; i < SAMPLES; i++) {
-            start = System.currentTimeMillis();
-            Thread.sleep(SAMPLE_DURATION);
-            end = System.currentTimeMillis();
-            long p = producedRecords.getAndSet(0);
-            long c = consumedRecords.getAndSet(0);
-
-            long usedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
-
-            System.out.println(((end-sample_start)/1000f)+", "+p+", "+(p * 1000f / (end - start)) + ", "+ c+", " + (c * 1000f / (end - start))+", "+(usedMemory/(1024)) );
-        }
-        System.out.println("Samples done... Shutting down the producers and consumers...");
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            producers[i].shutdown();
-            consumers[i].shutdown();
-        }
-        for (int i = 0; i < INDEX_COUNT; i++) {
-            producers[i].join(1000 * 5);
-            consumers[i].join(1000 * 5);
-        }
-        System.out.println("Shutdown.");
-    }
-
-}
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java b/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java
deleted file mode 100644
index a157b00..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.kahadb.index;
-
-import java.io.File;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.page.Transaction;
-import org.apache.kahadb.util.IOHelper;
-
-/**
- * Test a HashIndex
- */
-public abstract class IndexTestSupport extends TestCase {
-
-    private static final int COUNT = 10000;
-
-    protected Index<String,Long> index;
-    protected File directory;
-    protected PageFile pf;
-    protected Transaction tx;
-
-    /**
-     * @throws java.lang.Exception
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        directory = new File(IOHelper.getDefaultDataDirectory());
-        IOHelper.mkdirs(directory);
-        IOHelper.deleteChildren(directory);
-        
-    }
-
-    protected void tearDown() throws Exception {
-        if( pf!=null ) {
-            pf.unload();
-            pf.delete();
-        }
-    }
-    
-    protected void createPageFileAndIndex(int pageSize) throws Exception {
-        pf = new PageFile(directory, getClass().getName());
-        pf.setPageSize(pageSize);
-        pf.load();
-        tx = pf.tx();
-        this.index = createIndex();
-    }
-
-    abstract protected Index<String, Long> createIndex() throws Exception;
-
-    public void testIndex() throws Exception {
-        createPageFileAndIndex(500);
-        this.index.load(tx);
-        tx.commit();
-        doInsert(COUNT);
-        this.index.unload(tx);
-        tx.commit();
-        this.index.load(tx);
-        tx.commit();
-        checkRetrieve(COUNT);
-        doRemove(COUNT);
-        this.index.unload(tx);
-        tx.commit();
-        this.index.load(tx);
-        tx.commit();
-        doInsert(COUNT);
-        doRemoveHalf(COUNT);
-        doInsertHalf(COUNT);
-        this.index.unload(tx);
-        tx.commit();
-        this.index.load(tx);
-        tx.commit();
-        checkRetrieve(COUNT);
-        this.index.unload(tx);
-        tx.commit();
-    }
-
-    void doInsert(int count) throws Exception {
-        for (int i = 0; i < count; i++) {
-            index.put(tx, key(i), (long)i);
-            tx.commit();
-        }
-    }
-
-    protected String key(int i) {
-        return "key:"+i;
-    }
-
-    void checkRetrieve(int count) throws IOException {
-        for (int i = 0; i < count; i++) {
-            Long item = index.get(tx, key(i));
-            assertNotNull("Key missing: "+key(i), item);
-        }
-    }
-
-    void doRemoveHalf(int count) throws Exception {
-        for (int i = 0; i < count; i++) {
-            if (i % 2 == 0) {
-                assertNotNull("Expected remove to return value for index "+i, index.remove(tx, key(i)));
-                tx.commit();
-            }
-
-        }
-    }
-
-    void doInsertHalf(int count) throws Exception {
-        for (int i = 0; i < count; i++) {
-            if (i % 2 == 0) {
-                index.put(tx, key(i), (long)i);
-                tx.commit();
-            }
-        }
-    }
-
-    void doRemove(int count) throws Exception {
-        for (int i = 0; i < count; i++) {
-            assertNotNull("Expected remove to return value for index "+i, index.remove(tx, key(i)));
-            tx.commit();
-        }
-        for (int i = 0; i < count; i++) {
-            Long item = index.get(tx, key(i));
-            assertNull(item);
-        }
-    }
-
-    void doRemoveBackwards(int count) throws Exception {
-        for (int i = count - 1; i >= 0; i--) {
-            index.remove(tx, key(i));
-            tx.commit();
-        }
-        for (int i = 0; i < count; i++) {
-            Long item = index.get(tx, key(i));
-            assertNull(item);
-        }
-    }
-
-}
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/journal/JournalTest.java b/trunk/kahadb/src/test/java/org/apache/kahadb/journal/JournalTest.java
deleted file mode 100644
index 0b7f621..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/journal/JournalTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * 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.kahadb.journal;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import junit.framework.TestCase;
-import org.apache.kahadb.journal.Journal;
-import org.apache.kahadb.util.ByteSequence;
-
-public class JournalTest extends TestCase {
-    protected static final int DEFAULT_MAX_BATCH_SIZE = 1024 * 1024 * 4;
-
-    Journal dataManager;
-    File dir;
-    
-    @Override
-    public void setUp() throws Exception {
-        dir = new File("target/tests/DataFileAppenderTest");
-        dir.mkdirs();
-        dataManager = new Journal();
-        dataManager.setDirectory(dir);
-        configure(dataManager);
-        dataManager.start();
-    }
-    
-    protected void configure(Journal dataManager) {
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        dataManager.close();
-        deleteFilesInDirectory(dir);
-        dir.delete();
-    }
-
-    private void deleteFilesInDirectory(File directory) {
-        File[] files = directory.listFiles();
-        for (int i=0; i<files.length; i++) {
-            File f = files[i];
-            if (f.isDirectory()) {
-                deleteFilesInDirectory(f);
-            }   
-            f.delete();
-        }  
-    }  
-
-    public void testBatchWriteCallbackCompleteAfterTimeout() throws Exception {
-        final int iterations = 10;
-        final CountDownLatch latch = new CountDownLatch(iterations);
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        for (int i=0; i < iterations; i++) {
-            dataManager.write(data, new Runnable() {
-                public void run() {
-                    latch.countDown();                 
-                }
-            });
-        }
-        // at this point most probably dataManager.getInflightWrites().size() >= 0
-        // as the Thread created in DataFileAppender.enqueue() may not have caught up.
-        assertTrue("queued data is written", latch.await(5, TimeUnit.SECONDS));
-    }
-
-    public void testBatchWriteCallbackCompleteAfterClose() throws Exception {
-        final int iterations = 10;
-        final CountDownLatch latch = new CountDownLatch(iterations);
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        for (int i=0; i<iterations; i++) {
-            dataManager.write(data, new Runnable() {
-                public void run() {
-                    latch.countDown();                 
-                }
-            });
-        }
-        dataManager.close();
-        assertTrue("queued data is written", dataManager.getInflightWrites().isEmpty());
-        assertEquals("none written", 0, latch.getCount());
-    }
-    
-    public void testBatchWriteCompleteAfterClose() throws Exception {
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        final int iterations = 10;
-        for (int i=0; i<iterations; i++) {
-            dataManager.write(data, false);
-        }
-        dataManager.close();
-        assertTrue("queued data is written:" + dataManager.getInflightWrites().size(), dataManager.getInflightWrites().isEmpty());
-    }
-    
-    public void testBatchWriteToMaxMessageSize() throws Exception {
-        final int iterations = 4;
-        final CountDownLatch latch = new CountDownLatch(iterations);
-        Runnable done = new Runnable() {
-            public void run() {
-                latch.countDown();                 
-            }
-        };
-        int messageSize = DEFAULT_MAX_BATCH_SIZE / iterations;
-        byte[] message = new byte[messageSize];
-        ByteSequence data = new ByteSequence(message);
-        
-        for (int i=0; i< iterations; i++) {
-            dataManager.write(data, done);
-        }
-        
-        // write may take some time
-        assertTrue("all callbacks complete", latch.await(10, TimeUnit.SECONDS));
-    }
-    
-    public void testNoBatchWriteWithSync() throws Exception {
-        ByteSequence data = new ByteSequence("DATA".getBytes());
-        final int iterations = 10;
-        for (int i=0; i<iterations; i++) {
-            dataManager.write(data, true);
-            assertTrue("queued data is written", dataManager.getInflightWrites().isEmpty());
-        }
-    }
-}
diff --git a/trunk/kahadb/src/test/java/org/apache/kahadb/page/PageFileTest.java b/trunk/kahadb/src/test/java/org/apache/kahadb/page/PageFileTest.java
deleted file mode 100644
index 822ccb8..0000000
--- a/trunk/kahadb/src/test/java/org/apache/kahadb/page/PageFileTest.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * 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.kahadb.page;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashSet;
-
-import org.apache.kahadb.util.StringMarshaller;
-
-import junit.framework.TestCase;
-
-public class PageFileTest extends TestCase {
-
-    public void testCRUD() throws IOException {
-
-        PageFile pf = new PageFile(new File("target/test-data"), getName());
-        pf.delete();
-        pf.load();
-
-        HashSet<String> expected = new HashSet<String>();
-
-        // Insert some data into the page file.
-        Transaction tx = pf.tx();
-        for (int i = 0; i < 100; i++) {
-            Page<String> page = tx.allocate();
-            assertEquals(Page.PAGE_FREE_TYPE, page.getType());
-
-            String t = "page:" + i;
-            expected.add(t);
-            page.set(t);
-            tx.store(page, StringMarshaller.INSTANCE, false);
-            tx.commit();
-        }
-
-        // Reload it...
-        pf.unload();
-        pf.load();
-        tx = pf.tx();
-
-        // Iterate it to make sure they are still there..
-        HashSet<String> actual = new HashSet<String>();
-        for (Page<String> page : tx) {
-            tx.load(page, StringMarshaller.INSTANCE);
-            actual.add(page.get());
-        }
-        assertEquals(expected, actual);
-
-        // Remove the odd records..
-        for (int i = 0; i < 100; i++) {
-            if (i % 2 == 0) {
-                break;
-            }
-            String t = "page:" + i;
-            expected.remove(t);
-        }
-        for (Page<String> page : tx) {
-            tx.load(page, StringMarshaller.INSTANCE);
-            if (!expected.contains(page.get())) {
-                tx.free(page);
-            }
-        }
-        tx.commit();
-
-        // Reload it...
-        pf.unload();
-        pf.load();
-        tx = pf.tx();
-
-        // Iterate it to make sure the even records are still there..
-        actual.clear();
-        for (Page<String> page : tx) {
-            tx.load(page, StringMarshaller.INSTANCE);
-            actual.add((String)page.get());
-        }
-        assertEquals(expected, actual);
-
-        // Update the records...
-        HashSet<String> t = expected;
-        expected = new HashSet<String>();
-        for (String s : t) {
-            expected.add(s + ":updated");
-        }
-        for (Page<String> page : tx) {
-            tx.load(page, StringMarshaller.INSTANCE);
-            page.set(page.get() + ":updated");
-            tx.store(page, StringMarshaller.INSTANCE, false);
-        }
-        tx.commit();
-
-        // Reload it...
-        pf.unload();
-        pf.load();
-        tx = pf.tx();
-
-        // Iterate it to make sure the updated records are still there..
-        actual.clear();
-        for (Page<String> page : tx) {
-            tx.load(page, StringMarshaller.INSTANCE);
-            actual.add(page.get());
-        }
-        assertEquals(expected, actual);
-
-        pf.unload();
-    }
-
-    public void testStreams() throws IOException {
-
-        PageFile pf = new PageFile(new File("target/test-data"), getName());
-        pf.delete();
-        pf.load();
-
-        Transaction tx = pf.tx();
-        Page page = tx.allocate();
-        tx.commit();
-
-        OutputStream pos = tx.openOutputStream(page, true);
-        DataOutputStream os = new DataOutputStream(pos);
-        for (int i = 0; i < 10000; i++) {
-            os.writeUTF("Test string:" + i);
-        }
-
-        os.close();
-        tx.commit();
-
-        // Reload the page file.
-        pf.unload();
-        pf.load();
-        tx = pf.tx();
-
-        InputStream pis = tx.openInputStream(page);
-        DataInputStream is = new DataInputStream(pis);
-        for (int i = 0; i < 10000; i++) {
-            assertEquals("Test string:" + i, is.readUTF());
-        }
-        assertEquals(-1, is.read());
-        is.close();
-
-        pf.unload();
-    }
-
-    public void testAddRollback() throws IOException {
-
-        PageFile pf = new PageFile(new File("target/test-data"), getName());
-        pf.delete();
-        pf.load();
-
-        HashSet<String> expected = new HashSet<String>();
-
-        // Insert some data into the page file.
-        Transaction tx = pf.tx();
-        for (int i = 0; i < 100; i++) {
-            Page<String> page = tx.allocate();
-            assertEquals(Page.PAGE_FREE_TYPE, page.getType());
-
-            String t = "page:" + i;
-            page.set(t);
-            tx.store(page, StringMarshaller.INSTANCE, false);
-
-            // Rollback every other insert.
-            if (i % 2 == 0) {
-                expected.add(t);
-                tx.commit();
-            } else {
-                tx.rollback();
-            }
-
-        }
-
-        // Reload it...
-        pf.unload();
-        pf.load();
-        tx = pf.tx();
-
-        // Iterate it to make sure they are still there..
-        HashSet<String> actual = new HashSet<String>();
-        for (Page<String> page : tx) {
-            tx.load(page, StringMarshaller.INSTANCE);
-            actual.add(page.get());
-        }
-        assertEquals(expected, actual);
-    }
-}
diff --git a/trunk/kahadb/src/test/resources/log4j.properties b/trunk/kahadb/src/test/resources/log4j.properties
deleted file mode 100644
index 12cbd08..0000000
--- a/trunk/kahadb/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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, stdout
-
-log4j.logger.org.apache.activemq.spring=WARN
-log4j.logger.org.apache.zookeeper=WARN
-
-# 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
diff --git a/trunk/pom.xml b/trunk/pom.xml
deleted file mode 100755
index 9932c37..0000000
--- a/trunk/pom.xml
+++ /dev/null
@@ -1,1320 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.apache</groupId>
-    <artifactId>apache</artifactId>
-    <version>7</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.activemq</groupId>
-  <artifactId>activemq-parent</artifactId>
-  <version>5.5.0</version>
-  <packaging>pom</packaging>
-  <name>ActiveMQ</name>
-  <inceptionYear>2005</inceptionYear>
-
-  <properties>
-    <activemq-version>5.5.0</activemq-version>
-    <siteId>activemq-${activemq-version}</siteId>
-    <projectName>Apache ActiveMQ</projectName>
-    <!-- base url for site deployment.  See distribution management for full url.  Override this in settings.xml for staging -->
-    <staging.siteURL>scp://people.apache.org/x1/www/activemq.apache.org</staging.siteURL>
-    <spring-version>3.0.3.RELEASE</spring-version>
-    <spring-osgi-version>1.2.1</spring-osgi-version>
-    <activesoap-version>1.3</activesoap-version>
-    <annogen-version>0.1.0</annogen-version>
-    <ant-version>1.7.1</ant-version>
-    <aopalliance-version>1.0</aopalliance-version>
-    <aries-version>0.2-incubating</aries-version>
-    <axion-version>1.0-M3-dev</axion-version>
-    <axis-version>1.2-RC1</axis-version>
-    <camel-version>2.7.0</camel-version>
-    <cglib-version>2.0</cglib-version>
-    <commons-beanutils-version>1.6.1</commons-beanutils-version>
-    <commons-collections-version>3.2.1</commons-collections-version>
-    <openjpa-version>1.2.0</openjpa-version>
-    <commons-dbcp-version>1.2.2</commons-dbcp-version>
-    <commons-httpclient-version>3.1</commons-httpclient-version>
-    <commons-io-version>1.4</commons-io-version>
-    <commons-lang-version>2.4</commons-lang-version>
-    <commons-logging-version>1.1</commons-logging-version>
-    <commons-pool-version>1.5.4</commons-pool-version>
-    <commons-primitives-version>1.0</commons-primitives-version>
-    <directory-version>1.5.5</directory-version>
-    <geronimo-version>1.0</geronimo-version>
-    <howl-version>0.1.8</howl-version>
-    <hsqldb-version>1.7.2.2</hsqldb-version>
-    <jasypt-version>1.7</jasypt-version>
-    <jdom-version>1.0</jdom-version>
-    <jetty-version>7.1.6.v20100715</jetty-version>
-    <jsp-version>2.1.v20100127</jsp-version>
-    <jettison-version>1.2</jettison-version>
-    <jmock-version>2.5.1</jmock-version>
-    <junit-version>4.5</junit-version>
-    <jxta-version>2.0</jxta-version>
-    <karaf-version>2.2.0</karaf-version>
-    <log4j-version>1.2.14</log4j-version>
-    <org-apache-derby-version>10.1.3.1</org-apache-derby-version>
-    <p2psockets-version>1.1.2</p2psockets-version>
-    <regexp-version>1.3</regexp-version>
-    <rome-version>0.8</rome-version>
-    <!-- pax-logging (osgi) dont support slf4j 1.6.x -->
-    <slf4j-version>1.5.11</slf4j-version>
-    <spring-oxm-version>1.5.8</spring-oxm-version>
-    <stax-api-version>1.0.1</stax-api-version>
-    <stax-version>1.2.0</stax-version>
-    <xalan-version>2.6.0</xalan-version>
-    <xmlbeans-version>2.0.0-beta1</xmlbeans-version>
-    <xpp3-version>1.1.4c</xpp3-version>
-    <xstream-version>1.3.1</xstream-version>
-    <xbean-version>3.7</xbean-version>
-    <velocity-version>1.6.2</velocity-version>
-    <maven-bundle-plugin-version>2.1.0</maven-bundle-plugin-version>
-    <maven-surefire-plugin-version>2.5</maven-surefire-plugin-version>
-    <commons-net-version>2.0</commons-net-version>
-    <ftpserver-version>1.0.0</ftpserver-version>
-    <activemq-protobuf-version>1.1</activemq-protobuf-version>
-    <site-repo-url>scpexe://people.apache.org/www/activemq.apache.org/maven/</site-repo-url>
-    <!-- OSGi bundles properties -->
-    <activemq.osgi.import.pkg>*</activemq.osgi.import.pkg>
-    <activemq.osgi.export.pkg>org.apache.activemq*</activemq.osgi.export.pkg>
-    <activemq.osgi.private.pkg>!*</activemq.osgi.private.pkg>
-    <activemq.osgi.export>${activemq.osgi.export.pkg}*;version=${activemq.osgi.export.version};-noimport:=true</activemq.osgi.export>
-    <activemq.osgi.export.version>${project.version}</activemq.osgi.export.version>
-    <activemq.osgi.import>${activemq.osgi.import.pkg}</activemq.osgi.import>
-    <activemq.osgi.dynamic.import />
-    <activemq.osgi.symbolic.name>${project.groupId}.${project.artifactId}</activemq.osgi.symbolic.name>
-<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-  <prerequisites>
-    <maven>2.0.9</maven>
-  </prerequisites>
-
-  <url>http://activemq.apache.org</url>
-
-  <mailingLists>
-    <mailingList>
-      <name>Development List</name>
-      <subscribe>dev-subscribe@activemq.apache.org</subscribe>
-      <unsubscribe>dev-unsubscribe@activemq.apache.org</unsubscribe>
-      <post>dev@activemq.apache.org</post>
-    </mailingList>
-  </mailingLists>
-
-  <distributionManagement>
-    <site>
-      <!-- this needs to match a server in your settings.xml with upload settings -->
-      <id>activemq-website</id>
-      <!-- set the staging.siteURL in your ~/.m2/settings.xml in a release or other profile -->
-      <url>${staging.siteURL}/maven/${activemq-version}</url>
-      <!--<url>${site-repo-url}</url>-->
-    </site>
-    <snapshotRepository>
-      <id>apache.snapshots.https</id>
-      <name>Apache Development Snapshot Repository</name>
-      <url>https://repository.apache.org/content/repositories/snapshots</url>
-      <uniqueVersion>false</uniqueVersion>
-    </snapshotRepository>
-  </distributionManagement>
-
-  <modules>
-    <module>activemq-all</module>
-    <module>activemq-camel</module>
-    <module>activemq-console</module>
-    <module>activemq-core</module>
-    <module>activemq-fileserver</module>
-    <module>activemq-jaas</module>
-    <module>activemq-blueprint</module>
-    <module>activemq-karaf</module>
-    <module>activemq-openwire-generator</module>
-    <module>activemq-optional</module>
-    <module>activemq-pool</module>
-    <module>activemq-ra</module>
-    <module>activemq-rar</module>
-    <module>activemq-run</module>
-    <module>activemq-spring</module>
-    <module>activemq-tooling</module>
-    <module>activemq-web</module>
-    <module>activemq-web-demo</module>
-    <module>activemq-web-console</module>
-    <module>activemq-xmpp</module>
-    <module>assembly</module>
-    <module>activemq-jmdns_1.0</module>
-    <module>kahadb</module>
-  </modules>
-
-  <scm>
-    <connection>scm:svn:https://svn.apache.org/repos/asf/activemq/tags/activemq-5.5.0</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/activemq/tags/activemq-5.5.0</developerConnection>
-    <url>http://svn.apache.org/viewvc/activemq/tags/activemq-5.5.0</url>
-  </scm>
-  
-  <repositories>
-    <repository>
-        <id>com.springsource.repository.bundles.external</id>
-        <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
-        <url>http://repository.springsource.com/maven/bundles/external</url>
-    </repository> 
-    <repository>
-      <id>apache.snapshots</id>
-      <url>https://repository.apache.org/content/repositories/snapshots/</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-    </repository>
-  </repositories>
-
-  <!-- This is only here since the activemq-protobuf plugin has not been released yet -->
-  <pluginRepositories>
-    <pluginRepository>
-      <id>apache.snapshots</id>
-      <url>https://repository.apache.org/content/repositories/snapshots/</url>
-    </pluginRepository>
-  </pluginRepositories>
-
-  <dependencyManagement>
-    <dependencies>
-      <!-- =============================== -->
-      <!-- Internal ActiveMQ Dependencies -->
-      <!-- =============================== -->
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-all</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-camel</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-core</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-core</artifactId>
-        <version>${activemq-version}</version>
-        <type>test-jar</type>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-jaas</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-jmdns_1.0</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-pool</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-spring</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>      
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-web</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-xmpp</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-web-demo</artifactId>
-        <version>${activemq-version}</version>
-        <type>war</type>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-web-console</artifactId>
-        <version>${activemq-version}</version>
-        <type>war</type>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-console</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-fileserver</artifactId>
-        <version>${activemq-version}</version>
-        <type>war</type>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-optional</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-ra</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-rar</artifactId>
-        <version>${activemq-version}</version>
-        <type>rar</type>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-run</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-web</artifactId>
-        <version>${activemq-version}</version>
-        <type>war</type>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activeio-core</artifactId>
-        <version>3.1.2</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activeio-core</artifactId>
-        <version>3.1.2</version>
-        <type>test-jar</type>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-openwire-generator</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>kahadb</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-     <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-karaf</artifactId>
-        <version>${activemq-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.activemq.protobuf</groupId>
-        <artifactId>activemq-protobuf</artifactId>
-        <version>${activemq-protobuf-version}</version>
-      </dependency>
-
-      <!-- =============================== -->
-      <!-- Required dependencies -->
-      <!-- =============================== -->
-      <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>${commons-logging-version}</version>
-        <exclusions>
-          <exclusion>
-            <groupId>avalon-framework</groupId>
-            <artifactId>avalon-framework</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>logkit</groupId>
-            <artifactId>logkit</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-jms_1.1_spec</artifactId>
-        <version>1.1.1</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-        <version>1.0.1</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-        <version>1.0.1</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-jacc_1.1_spec</artifactId>
-        <version>1.0.1</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-        <version>2.0.0</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-jsp_2.1_spec</artifactId>
-        <version>1.0.1</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-servlet_2.5_spec</artifactId>
-        <version>1.2</version>
-      </dependency>
-      
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-annotation_1.0_spec</artifactId>
-        <version>1.1.1</version>
-      </dependency>
-
-
-      <!-- =============================== -->
-      <!-- Optional dependencies -->
-      <!-- =============================== -->
-
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-core</artifactId>
-        <version>${camel-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-spring</artifactId>
-        <version>${camel-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-jetty</artifactId>
-        <version>${camel-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-jms</artifactId>
-        <version>${camel-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-web</artifactId>
-        <version>2.4.0</version>
-        <type>war</type>
-      </dependency>
-
-      <dependency>
-        <groupId>org.osgi</groupId>
-        <artifactId>org.osgi.core</artifactId>
-        <version>4.1.0</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.hadoop.zookeeper</groupId>
-        <artifactId>zookeeper</artifactId>
-        <version>3.0.0</version>
-        <optional>true</optional>
-      </dependency>
-      
-    <!-- For jsvc support -->
-    <dependency>
-      <groupId>commons-daemon</groupId>
-      <artifactId>commons-daemon</artifactId>
-      <version>1.0.3</version>
-    </dependency> 
-
-      <!-- for the XML parsing -->
-      <dependency>
-        <groupId>javax.xml.bind</groupId>
-        <artifactId>jaxb-api</artifactId>
-        <version>2.1</version>
-        <exclusions>
-          <exclusion>
-            <groupId>javax.xml</groupId>
-            <artifactId>jsr173</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>com.sun.xml.bind</groupId>
-        <artifactId>jaxb-impl</artifactId>
-        <version>2.1.6</version>
-        <exclusions>
-          <exclusion>
-            <groupId>javax.jws</groupId>
-            <artifactId>jsr181-api</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-
-      <!-- camel testing -->
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-core</artifactId>
-        <version>${camel-version}</version>
-        <type>test-jar</type>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-spring</artifactId>
-        <version>${camel-version}</version>
-        <type>test-jar</type>
-        <scope>test</scope>
-      </dependency>
-
-
-      <!--  for custom XML parsing -->
-      <dependency>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>xbean-spring</artifactId>
-        <version>${xbean-version}</version>
-        <optional>true</optional>
-        <exclusions>
-          <exclusion>
-            <groupId>qdox</groupId>
-            <artifactId>qdox</artifactId>
-          </exclusion>
-        </exclusions>
-
-      </dependency>
-
-      <!-- Used to configure the activemq logs -->
-      <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>${log4j-version}</version>
-        <scope>runtime</scope>
-      </dependency>
-
-      <!-- used to support optional transport configuration via URI query strings -->
-
-      <dependency>
-        <groupId>commons-beanutils</groupId>
-        <artifactId>commons-beanutils</artifactId>
-        <version>${commons-beanutils-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>commons-collections</groupId>
-        <artifactId>commons-collections</artifactId>
-        <version>${commons-collections-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.openjpa</groupId>
-        <artifactId>openjpa-persistence-jdbc</artifactId>
-        <version>${openjpa-version}</version>
-      </dependency>
-
-      <!-- Optional Spring Support -->
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-aop</artifactId>
-        <version>${spring-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-beans</artifactId>
-        <version>${spring-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-context</artifactId>
-        <version>${spring-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-core</artifactId>
-        <version>${spring-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-jms</artifactId>
-        <version>${spring-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-tx</artifactId>
-        <version>${spring-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <!--
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring</artifactId>
-        <version>${spring-version}</version>
-        <optional>true</optional>
-        <exclusions>
-          <exclusion>
-            <groupId>javax.mail</groupId>
-            <artifactId>mail</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>javax.resource</groupId>
-            <artifactId>connector</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>javax.transaction</groupId>
-            <artifactId>jta</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-support</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-orm</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-hibernate</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-remoting</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-      -->
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-webmvc</artifactId>
-        <version>${spring-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-web</artifactId>
-        <version>${spring-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-test</artifactId>
-        <version>${spring-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework.ws</groupId>
-        <artifactId>spring-oxm-tiger</artifactId>
-        <version>${spring-oxm-version}</version>
-      </dependency>
-      <dependency>
-          <groupId>org.springframework.osgi</groupId>
-          <artifactId>spring-osgi-core</artifactId>
-          <version>${spring-osgi-version}</version>
-      </dependency>
-
-      <!-- Optional Derby support-->
-      <dependency>
-        <groupId>org.apache.derby</groupId>
-        <artifactId>derby</artifactId>
-        <version>${org-apache-derby-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.derby</groupId>
-        <artifactId>derbynet</artifactId>
-        <version>${org-apache-derby-version}</version>
-        <optional>true</optional>
-      </dependency>
-
-      <!-- Optional Axion support -->
-      <dependency>
-        <groupId>axion</groupId>
-        <artifactId>axion</artifactId>
-        <version>${axion-version}</version>
-        <optional>true</optional>
-      </dependency>
-
-      <dependency>
-        <groupId>commons-primitives</groupId>
-        <artifactId>commons-primitives</artifactId>
-        <version>${commons-primitives-version}</version>
-        <optional>true</optional>
-      </dependency>
-
-      <dependency>
-        <groupId>regexp</groupId>
-        <artifactId>regexp</artifactId>
-        <version>${regexp-version}</version>
-        <optional>true</optional>
-      </dependency>
-
-      <!-- Optional HSQL DB Support -->
-      <!--
-        <dependency>
-        <groupId>hsqldb</groupId>
-        <artifactId>hsqldb</artifactId>
-        <version>${hsqldb-version}</version>
-        <optional>true</optional>
-        </dependency>
-      -->
-
-      <dependency>
-        <groupId>commons-dbcp</groupId>
-        <artifactId>commons-dbcp</artifactId>
-        <version>${commons-dbcp-version}</version>
-        <optional>true</optional>
-      </dependency>
-
-      <dependency>
-        <groupId>commons-pool</groupId>
-        <artifactId>commons-pool</artifactId>
-        <version>${commons-pool-version}</version>
-        <optional>true</optional>
-      </dependency>
-
-      <!-- Optional Journal Implementation -->
-      <!--
-        <dependency>
-        <groupId>howl</groupId>
-        <artifactId>howl-logger</artifactId>
-        <version>${howl-version}</version>
-        <optional>true</optional>
-        </dependency>
-      -->
-
-      <!-- Optional Jabber support -->
-      <dependency>
-        <groupId>activemq</groupId>
-        <artifactId>smack</artifactId>
-        <version>1.5.0</version>
-        <optional>true</optional>
-      </dependency>
-
-      <dependency>
-        <groupId>activemq</groupId>
-        <artifactId>smackx</artifactId>
-        <version>1.5.0</version>
-        <optional>true</optional>
-      </dependency>
-
-      <!-- =============================== -->
-      <!-- XML processing dependencies -->
-      <!-- =============================== -->
-      <!-- For XMLBeans -->
-      <dependency>
-        <groupId>xmlbeans</groupId>
-        <artifactId>xbean</artifactId>
-        <version>${xmlbeans-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>xmlbeans</groupId>
-        <artifactId>xmlpublic</artifactId>
-        <version>${xmlbeans-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>xmlbeans</groupId>
-        <artifactId>xbean_xpath</artifactId>
-        <version>${xmlbeans-version}</version>
-      </dependency>
-
-      <!-- For Stax -->
-      <dependency>
-        <groupId>stax</groupId>
-        <artifactId>stax-api</artifactId>
-        <version>${stax-api-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>stax</groupId>
-        <artifactId>stax</artifactId>
-        <version>${stax-version}</version>
-      </dependency>
-
-      <!-- To use XPath using JAXP 1.3 (std in Java 5) -->
-      <dependency>
-        <groupId>activesoap</groupId>
-        <artifactId>jaxp-api</artifactId>
-        <version>${activesoap-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>xalan</groupId>
-        <artifactId>xalan</artifactId>
-        <version>2.6.0</version>
-      </dependency>
-
-      <dependency>
-        <groupId>com.thoughtworks.xstream</groupId>
-        <artifactId>xstream</artifactId>
-        <version>${xstream-version}</version>
-        <exclusions>
-          <exclusion>
-            <!-- xom is an optional dependency of xstream. Its also 
-              LGPL, so its really not ASF compatible. -->
-            <groupId>xom</groupId>
-            <artifactId>xom</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-
-      <dependency>
-        <groupId>xpp3</groupId>
-        <artifactId>xpp3</artifactId>
-        <version>${xpp3-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>jsp-2.1-glassfish</artifactId>
-        <version>${jsp-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.eclipse.jetty.aggregate</groupId>
-        <artifactId>jetty-all-server</artifactId>
-        <version>${jetty-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>axis</groupId>
-        <artifactId>axis</artifactId>
-        <version>${axis-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>commons-httpclient</groupId>
-        <artifactId>commons-httpclient</artifactId>
-        <version>${commons-httpclient-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>aopalliance</groupId>
-        <artifactId>aopalliance</artifactId>
-        <version>${aopalliance-version}</version>
-      </dependency>
-      
-      <dependency>
-        <groupId>org.jasypt</groupId>
-        <artifactId>jasypt</artifactId>
-        <version>${jasypt-version}</version>
-      </dependency>
-
-      <!-- testing dependencies -->
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>${junit-version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.jmock</groupId>
-        <artifactId>jmock-junit4</artifactId>
-        <version>${jmock-version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.jmock</groupId>
-        <artifactId>jmock-legacy</artifactId>
-        <version>${jmock-version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.hamcrest</groupId>
-        <artifactId>hamcrest-all</artifactId>
-        <version>1.1</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.codehaus.jettison</groupId>
-        <artifactId>jettison</artifactId>
-        <version>${jettison-version}</version>
-    </dependency>  
-
-      <dependency>
-        <groupId>annogen</groupId>
-        <artifactId>annogen</artifactId>
-        <version>${annogen-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>commons-io</groupId>
-        <artifactId>commons-io</artifactId>
-        <version>${commons-io-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.ant</groupId>
-        <artifactId>ant</artifactId>
-        <version>${ant-version}</version>
-      </dependency>
-
-      <!-- ACTIVEMQ-WEB Specific Dependencies -->
-      <dependency>
-        <groupId>rome</groupId>
-        <artifactId>rome</artifactId>
-        <version>${rome-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>jdom</groupId>
-        <artifactId>jdom</artifactId>
-        <version>${jdom-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>p2psockets</groupId>
-        <artifactId>p2psockets-core</artifactId>
-        <version>${p2psockets-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>jxta</groupId>
-        <artifactId>jxta</artifactId>
-        <version>${jxta-version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>slf4j-api</artifactId>
-        <version>${slf4j-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>slf4j-log4j12</artifactId>
-        <version>${slf4j-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>jcl-over-slf4j</artifactId>
-        <version>${slf4j-version}</version>
-      </dependency>
-      <dependency>
-        <groupId>opensymphony</groupId>
-        <artifactId>sitemesh</artifactId>
-        <version>2.2.1</version>
-      </dependency>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>jstl</artifactId>
-        <version>1.0</version>
-      </dependency>
-      <dependency>
-        <groupId>taglibs</groupId>
-        <artifactId>standard</artifactId>
-        <version>1.1.2</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.geronimo.components</groupId>
-        <artifactId>geronimo-transaction</artifactId>
-        <version>2.1</version>
-      </dependency>
-      
-      <!-- FTP support for BlobMessages -->
-        <dependency>
-            <groupId>commons-net</groupId>
-            <artifactId>commons-net</artifactId>
-            <version>${commons-net-version}</version>
-        </dependency>
-
-      <dependency>
-        <groupId>org.apache.velocity</groupId>
-        <artifactId>velocity</artifactId>
-        <version>${velocity-version}</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>net.sf.josql</groupId>
-        <artifactId>josql</artifactId>
-        <version>1.5</version>
-        <optional>true</optional>
-      </dependency>
-      <dependency>
-        <groupId>net.sf.josql</groupId>
-        <artifactId>gentlyweb-utils</artifactId>
-        <version>1.5</version>
-        <optional>true</optional>
-      </dependency>
-
-    </dependencies>
-  </dependencyManagement>
-
-  <build>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.activemq.protobuf</groupId>
-          <artifactId>activemq-protobuf</artifactId>
-          <version>${activemq-protobuf-version}</version>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-antrun-plugin</artifactId>
-          <version>1.1</version>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-assembly-plugin</artifactId>
-          <version>2.2-beta-4</version>
-          <configuration>
-            <tarLongFileMode>gnu</tarLongFileMode>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-jar-plugin</artifactId>
-          <configuration>
-            <archive>
-              <index>true</index>
-              <compress>true</compress>
-            </archive>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-release-plugin</artifactId>
-          <version>2.0</version>
-          <configuration>
-            <autoVersionSubmodules>true</autoVersionSubmodules>
-            <allowTimestampedSnapshots>false</allowTimestampedSnapshots>
-            <preparationGoals>clean install</preparationGoals>
-            <goals>deploy</goals>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <version>${maven-surefire-plugin-version}</version>
-          <configuration>
-            <redirectTestOutputToFile>true</redirectTestOutputToFile>
-            <forkMode>once</forkMode>
-            <argLine>-enableassertions</argLine>
-            <failIfNoTests>false</failIfNoTests>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>maven-bundle-plugin</artifactId>
-          <version>${maven-bundle-plugin-version}</version>
-        </plugin>
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>ianal-maven-plugin</artifactId>
-          <version>1.0-alpha-1</version>
-        </plugin>
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>javacc-maven-plugin</artifactId>
-          <version>2.0</version>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.rat</groupId>
-          <artifactId>apache-rat-plugin</artifactId>
-          <version>0.7</version>
-        </plugin>
-        <plugin>
-          <groupId>org.eclipse.jetty</groupId>
-          <artifactId>maven-jetty-plugin</artifactId>
-          <version>${jetty-version}</version>
-        </plugin>
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>build-helper-maven-plugin</artifactId>
-          <version>1.2</version>
-        </plugin>
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>cobertura-maven-plugin</artifactId>
-          <version>2.0</version>
-          <configuration>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-eclipse-plugin</artifactId>
-          <version>2.5.1</version>
-          <configuration>
-            <downloadSources>true</downloadSources>
-            <downloadJavadocs>false</downloadJavadocs>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-          <optimize>true</optimize>
-          <debug>true</debug>
-          <showDeprecation>true</showDeprecation>
-          <showWarnings>true</showWarnings>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-enforcer-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>validate</phase>
-            <goals>
-              <goal>enforce</goal>
-            </goals>
-            <configuration>
-              <rules>
-                <requireMavenVersion>
-                  <version>[2.0.9,)</version>
-                </requireMavenVersion>
-              </rules>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>ianal-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>verify-legal-files</goal>
-            </goals>
-            <configuration>
-              <strict>true</strict>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
-        <inherited>true</inherited>
-        <configuration>
-          <instructions>
-            <Bundle-Name>${project.artifactId}</Bundle-Name>
-            <Bundle-SymbolicName>${activemq.osgi.symbolic.name}</Bundle-SymbolicName>
-            <Export-Package>${activemq.osgi.export}</Export-Package>
-            <Import-Package>${activemq.osgi.import}</Import-Package>
-            <DynamicImport-Package>${activemq.osgi.dynamic.import}</DynamicImport-Package>
-            <Private-Package>${activemq.osgi.private.pkg}</Private-Package>
-            <Implementation-Title>Apache ActiveMQ</Implementation-Title>
-            <Implementation-Version>${project.version}</Implementation-Version>
-            <_versionpolicy-impl>[$(version;==;$(@)),$(version;=+;$(@)))</_versionpolicy-impl>
-            <_versionpolicy-uses>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy-uses>
-            <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
-            <_failok>${servicemix.osgi.failok}</_failok>
-          </instructions>
-        </configuration>
-        <executions>
-          <execution>
-            <id>cleanVersions</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>cleanVersions</goal>
-            </goals>
-            <configuration>
-              <versions>
-                <activemq.osgi.version>${project.version}</activemq.osgi.version>
-              </versions>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <configuration>
-          <excludeSubProjects>false</excludeSubProjects>
-          <excludes>
-            <exclude>**/*.bin</exclude>
-            <exclude>**/*.log</exclude>
-            <exclude>**/*README.txt</exclude>
-            <exclude>**/store/amq/help.txt</exclude>
-            <exclude>**/kahadb/**/*.data</exclude>
-            <!-- activemq-xmpp schemas -->
-            <exclude>**/resources/*.xsd</exclude>
-            <!-- web, web-console, web-demo files -->
-            <exclude>**/webapps/camel/js/dojo/dojo.js</exclude>
-            <exclude>**/webapp/js/dojo.js</exclude>
-            <exclude>**/webapp/js/jquery-*.js</exclude>
-            <exclude>**/webapp/js/prototype.js</exclude>
-            <exclude>**/web/behaviour.js</exclude>
-            <exclude>**/webapp/js/common.js</exclude>
-            <exclude>**/webapp/js/css.js</exclude>
-            <exclude>**/webapp/js/standardista-table-sorting.js</exclude>
-            <exclude>**/webapp/test/assets/*</exclude>
-            <!-- plotkit -->
-            <exclude>**/webapp/js/plotkit/**/*</exclude>
-            <!-- Eclipse files -->
-            <exclude>**/.*</exclude>
-            <exclude>**/eclipse-classes/**/*</exclude>
-            <exclude>**/target/**/*</exclude>
-            <exclude>**/*.iml</exclude>
-            <exclude>.idea/**/*</exclude>
-            <exclude>.git/**/*</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  <reporting>
-    <plugins>
-      <!--
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jxr-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-report-plugin</artifactId>
-        <version>${maven-surefire-plugin-version}</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-pmd-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-      </plugin>
-      -->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>taglist-maven-plugin</artifactId>
-        <version>2.4</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.5</version>
-        <configuration>
-          <links>
-            <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
-            <link>http://java.sun.com/javaee/5/docs/api/</link>
-            <link>http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_0/</link>
-            <link>http://jakarta.apache.org/commons/dbcp/apidocs/</link>
-            <link>http://jakarta.apache.org/commons/fileupload/apidocs/</link>
-            <link>http://jakarta.apache.org/commons/httpclient/apidocs/</link>
-            <link>http://jakarta.apache.org/commons/logging/apidocs/</link>
-            <link>http://jakarta.apache.org/commons/pool/apidocs/</link>
-            <link>http://junit.sourceforge.net/javadoc/</link>
-            <link>http://logging.apache.org/log4j/docs/api/</link>
-          </links>
-          <stylesheetfile>${basedir}/../etc/css/stylesheet.css</stylesheetfile>
-          <linksource>true</linksource>
-          <maxmemory>900m</maxmemory>
-          <source>1.5</source>
-          <additionalJOption>-J-Xmx256m</additionalJOption>
-        </configuration>
-      </plugin>
-      <!--<plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <formats>
-            <format>html</format>
-            <format>xml</format>
-          </formats>
-        </configuration>
-      </plugin>-->
-
-    </plugins>
-  </reporting>
-  
-  <profiles>
-
-    <profile>
-      <id>apache-release</id>
-      <activation>
-        <property>
-          <name>apache-release</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <version>${maven-surefire-plugin-version}</version>
-            <configuration>
-              <test>false</test>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile> 
-      <id>deploy</id> 
-      <build> 
-        <defaultGoal>deploy</defaultGoal> 
-        <plugins> 
-          <plugin> 
-            <groupId>org.apache.maven.plugins</groupId> 
-            <artifactId>maven-source-plugin</artifactId> 
-            <version>2.1</version> 
-            <executions> 
-              <execution> 
-                <id>attach-sources</id> 
-                <goals> 
-                  <goal>jar</goal> 
-                </goals> 
-              </execution> 
-            </executions> 
-          </plugin> 
-          <plugin> 
-            <groupId>org.apache.maven.plugins</groupId> 
-            <artifactId>maven-javadoc-plugin</artifactId> 
-            <executions> 
-              <execution> 
-                <id>attach-javadocs</id> 
-                  <goals> 
-                    <goal>jar</goal> 
-                  </goals> 
-              </execution> 
-            </executions> 
-          </plugin> 
-        </plugins> 
-      </build> 
-    </profile>
-  </profiles>
-
-</project>